decocms 2.277.0 → 2.277.1

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 (320) hide show
  1. package/dist/client/assets/{AlertCircle-CDrkM01U.js → AlertCircle-ZN1y5-aw.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-D40KhznE.js → ArrowNarrowLeft-BPki4rs6.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-BTIsSwsN.js → CheckCircle-CzlD2NtZ.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-CYdW9NBw.js → ChevronDown-BjlYfwkz.js} +1 -1
  5. package/dist/client/assets/{ChevronRight-YkSQYi3B.js → ChevronRight-Ers_V2D1.js} +1 -1
  6. package/dist/client/assets/{ChevronUp-BcPC1hCC.js → ChevronUp-BFd66NER.js} +1 -1
  7. package/dist/client/assets/{Container-ChD3KoS4.js → Container-BH-IjM7q.js} +1 -1
  8. package/dist/client/assets/{LinkExternal01-l0w4_WlJ.js → LinkExternal01-Df1708RH.js} +1 -1
  9. package/dist/client/assets/{Lock01-CmojMPTn.js → Lock01-DC87zCkJ.js} +1 -1
  10. package/dist/client/assets/{Palette-D4s8zWmN.js → Palette-BAefAlJJ.js} +1 -1
  11. package/dist/client/assets/{Play-CiTVDuYt.js → Play-8RSCt4_z.js} +1 -1
  12. package/dist/client/assets/{Plus-CVdax6FK.js → Plus-D7R85tnb.js} +1 -1
  13. package/dist/client/assets/{SearchMd-DJ0JdIz3.js → SearchMd-CuF0EE4i.js} +1 -1
  14. package/dist/client/assets/{Settings02-D-hypCbK.js → Settings02-0biYSyip.js} +1 -1
  15. package/dist/client/assets/{Star01-Vcjv0Tzc.js → Star01-DG4GVqjt.js} +1 -1
  16. package/dist/client/assets/{Sun-51uZR1E5.js → Sun-bNHtETAN.js} +1 -1
  17. package/dist/client/assets/{Tool01-DCaYwllU.js → Tool01-BYIP93fl.js} +1 -1
  18. package/dist/client/assets/{Trash01-D5ZS0TOT.js → Trash01-DiVIK0OP.js} +1 -1
  19. package/dist/client/assets/{Upload01-CBYhGwn0.js → Upload01-1ZdG7oJK.js} +1 -1
  20. package/dist/client/assets/{User01-Dq3q9cE-.js → User01-ZdNcPumq.js} +1 -1
  21. package/dist/client/assets/{Users03-BIYd5t8v.js → Users03-C4Ee_frB.js} +1 -1
  22. package/dist/client/assets/{X-D_4PiiTE.js → X-DJVuZ58d.js} +1 -1
  23. package/dist/client/assets/{XCircle-rGav0QLs.js → XCircle-C-PtnVDi.js} +1 -1
  24. package/dist/client/assets/{Zap-qFCEz_qt.js → Zap-DFbFP4h9.js} +1 -1
  25. package/dist/client/assets/{ZapSquare-BYfCzFpy.js → ZapSquare-Bn1DnHGa.js} +1 -1
  26. package/dist/client/assets/{accordion-C_FjDGY7.js → accordion-BKyKwvi4.js} +1 -1
  27. package/dist/client/assets/{agent-icon-31CiXnkF.js → agent-icon-BCqNXHrJ.js} +1 -1
  28. package/dist/client/assets/{agents-list-kGMjebHK.js → agents-list-st6j9oA0.js} +1 -1
  29. package/dist/client/assets/ai-providers-Cq8P81dq.js +1 -0
  30. package/dist/client/assets/{alert-dialog-BpydK2MI.js → alert-dialog-Cce2zNSt.js} +1 -1
  31. package/dist/client/assets/{auth-catchall-I0vdEcHs.js → auth-catchall-DOZwh2ME.js} +1 -1
  32. package/dist/client/assets/{automation-list-row-mTTWiKQ6.js → automation-list-row-D3uOWcPZ.js} +1 -1
  33. package/dist/client/assets/{automations-Z179s9qX.js → automations-_4yX33cm.js} +1 -1
  34. package/dist/client/assets/{avatar-BVvDTfBW.js → avatar-DtO_DjAh.js} +1 -1
  35. package/dist/client/assets/{badge-BhfSxzi-.js → badge-y-hsEihY.js} +1 -1
  36. package/dist/client/assets/{brand-context-Bn_7uvJT.js → brand-context-zVTleDgN.js} +1 -1
  37. package/dist/client/assets/{card-BAp6Jwgi.js → card-Dgjac7df.js} +1 -1
  38. package/dist/client/assets/{chat-context-Dp5HM8R-.js → chat-context-jZHB4zZq.js} +1 -1
  39. package/dist/client/assets/{checkbox-BhkHXCse.js → checkbox-BK1FOOnx.js} +1 -1
  40. package/dist/client/assets/{collection-detail-Bm3mvhEG.js → collection-detail-x76KaTbs.js} +1 -1
  41. package/dist/client/assets/{collection-display-button-jqECsu1f.js → collection-display-button-Gr_qxtzC.js} +1 -1
  42. package/dist/client/assets/{collection-search-C0B93tJw.js → collection-search-9bv6LiW5.js} +1 -1
  43. package/dist/client/assets/{collection-table-wrapper-Bf17fkBP.js → collection-table-wrapper-BD46An7o.js} +1 -1
  44. package/dist/client/assets/{collection-tabs-CMC3SILy.js → collection-tabs-DBij18bF.js} +1 -1
  45. package/dist/client/assets/{collections-DIuw_dNV.js → collections-BZR-yDlA.js} +1 -1
  46. package/dist/client/assets/{command-CRMnQTof.js → command-DsPZNxzv.js} +1 -1
  47. package/dist/client/assets/{connection-card-CJ6uOT9E.js → connection-card-Cavj0z1s.js} +1 -1
  48. package/dist/client/assets/{connection-detail-Dj-OLW3C.js → connection-detail-B_MywG2r.js} +1 -1
  49. package/dist/client/assets/{connection-form-helpers-CDPt3S_P.js → connection-form-helpers-BickqfM0.js} +1 -1
  50. package/dist/client/assets/{connections-aYS5E8PJ.js → connections-Di7YhHpL.js} +1 -1
  51. package/dist/client/assets/{constants-BG70AVFL.js → constants-B6BlNNCv.js} +1 -1
  52. package/dist/client/assets/{constants-CdNdiXMf.js → constants-D4bpaQIy.js} +1 -1
  53. package/dist/client/assets/{dialog-C0FUDu40.js → dialog-CrC-U752.js} +1 -1
  54. package/dist/client/assets/{drawer-D4_wXu6X.js → drawer-D164IDvt.js} +1 -1
  55. package/dist/client/assets/{dropdown-menu-aG44dJsz.js → dropdown-menu-BCSsOhoD.js} +1 -1
  56. package/dist/client/assets/{dynamic-plugin-layout-pzG9mWCw.js → dynamic-plugin-layout-PtppgAts.js} +1 -1
  57. package/dist/client/assets/{empty-state-BjAjwUcB.js → empty-state-Burt6Pjq.js} +1 -1
  58. package/dist/client/assets/{empty-state-BGqwS_3w.js → empty-state-CMAHTHUe.js} +1 -1
  59. package/dist/client/assets/{extract-connection-data-CAAXAkZY.js → extract-connection-data-CIGH4JOA.js} +1 -1
  60. package/dist/client/assets/{features-DCfAHIGS.js → features-DkrqQmvn.js} +1 -1
  61. package/dist/client/assets/{form-BQFhlKGv.js → form-NpftjNqr.js} +1 -1
  62. package/dist/client/assets/{general-0YlUSUig.js → general-CPi9v1zL.js} +1 -1
  63. package/dist/client/assets/{index-C6SXa4V4.js → index-BabWp460.js} +1 -1
  64. package/dist/client/assets/{index-CN1oVHjb.js → index-C7Syt5sm.js} +4 -4
  65. package/dist/client/assets/{index-BRiQU6du.js → index-CESHAiFx.js} +1 -1
  66. package/dist/client/assets/{index-DRjT3wqk.js → index-CMJ6GQ7C.js} +3 -3
  67. package/dist/client/assets/{index-CoTOPljc.js → index-CSCpQ3nk.js} +1 -1
  68. package/dist/client/assets/{index-mdSoEPSF.js → index-ClWc2yds.js} +1 -1
  69. package/dist/client/assets/{index-CEQG3Gi2.js → index-CmG3u4sk.js} +1 -1
  70. package/dist/client/assets/{index-EE9r4ne7.js → index-D0eg_rFC.js} +2 -2
  71. package/dist/client/assets/{index-NYDZhYFt.js → index-DE-s5va1.js} +1 -1
  72. package/dist/client/assets/{index-CIlSPTSj.js → index-MDHGBKc3.js} +1 -1
  73. package/dist/client/assets/{infiniteQueryObserver-BQYXKuj2.js → infiniteQueryObserver-CpBPXtl6.js} +1 -1
  74. package/dist/client/assets/{input-r_oEqK-V.js → input-B0rO4kCw.js} +1 -1
  75. package/dist/client/assets/{integration-icon-BKKqOsd5.js → integration-icon-yOwsHf6q.js} +1 -1
  76. package/dist/client/assets/{label-CenAgqhm.js → label-DEuSkBBi.js} +1 -1
  77. package/dist/client/assets/{layout-DB6YepVn.js → layout-CEdjROI5.js} +1 -1
  78. package/dist/client/assets/{lean-canvas-recruit-modal-TnasvQfT.js → lean-canvas-recruit-modal-BMnsbvdl.js} +1 -1
  79. package/dist/client/assets/{login-DDMVtz0x.js → login-vu3mdB5z.js} +1 -1
  80. package/dist/client/assets/{members-BH6aFn0i.js → members-DtGUx-F1.js} +1 -1
  81. package/dist/client/assets/{monaco-editor-C3TYqqnp.js → monaco-editor-wLqdDZ5S.js} +1 -1
  82. package/dist/client/assets/{monitoring-stats-row-DosCpU_L.js → monitoring-stats-row-5HVh1Gjz.js} +1 -1
  83. package/dist/client/assets/{oauth-callback-BV7Kg1aN.js → oauth-callback-DXN54EUy.js} +1 -1
  84. package/dist/client/assets/{oauth-callback-ai-provider-DjkxS6zo.js → oauth-callback-ai-provider-W7GdFBbP.js} +1 -1
  85. package/dist/client/assets/{onboarding-DmzJa5qN.js → onboarding-BeW6omQ6.js} +1 -1
  86. package/dist/client/assets/{org-layout-D05CVA_8.js → org-layout-Cp3RupKt.js} +1 -1
  87. package/dist/client/assets/{org-plugin-layout-Cv_313Tb.js → org-plugin-layout-Bnfoicc4.js} +1 -1
  88. package/dist/client/assets/{plugin-empty-state-CQeGBgOP.js → plugin-empty-state-0LwQ6R3R.js} +1 -1
  89. package/dist/client/assets/{plugin-header-BXYsY1_p.js → plugin-header-BYiR1ua4.js} +1 -1
  90. package/dist/client/assets/{plugin-layout-Do_Ws-WY.js → plugin-layout-DCOghZWx.js} +1 -1
  91. package/dist/client/assets/{popover-BktSfQG9.js → popover-DUh9iDm9.js} +1 -1
  92. package/dist/client/assets/{profile-BSS2RbEG.js → profile-Bk0bLa4g.js} +1 -1
  93. package/dist/client/assets/{project-app-view-B_z1QorU.js → project-app-view-BtOMb74o.js} +1 -1
  94. package/dist/client/assets/registry-CorCxIMC.js +2 -0
  95. package/dist/client/assets/{registry-layout-B0UM9hrK.js → registry-layout-TU21GgUM.js} +1 -1
  96. package/dist/client/assets/{required-auth-layout-C6TLzB3T.js → required-auth-layout-eS3mZHM3.js} +1 -1
  97. package/dist/client/assets/{reset-password-BV1UW9SB.js → reset-password-nmqGdy62.js} +1 -1
  98. package/dist/client/assets/{scroll-area-C6ws31M0.js → scroll-area-BPvcbDba.js} +1 -1
  99. package/dist/client/assets/{search-input-Dxw50-Fc.js → search-input-DuumYWEB.js} +1 -1
  100. package/dist/client/assets/{select-DMKL-iI9.js → select-DV6Y5fbl.js} +1 -1
  101. package/dist/client/assets/{select-model-D2d213qn.js → select-model-BhJ9eJ30.js} +1 -1
  102. package/dist/client/assets/{settings-layout-BBdiRp4e.js → settings-layout-C6WZX8H8.js} +1 -1
  103. package/dist/client/assets/{shell-layout-CDe1Q4z8.js → shell-layout-Bx85tvr4.js} +1 -1
  104. package/dist/client/assets/{skeleton-C8k5qVSG.js → skeleton-C_5kHpZw.js} +1 -1
  105. package/dist/client/assets/{sso-CChrq6HN.js → sso-Du9xnoxY.js} +1 -1
  106. package/dist/client/assets/{store-Dk4svl-0.js → store-DFSqH5M5.js} +1 -1
  107. package/dist/client/assets/store-registry-ysGrUhGY.js +2 -0
  108. package/dist/client/assets/{switch-BlmZa3uf.js → switch-CbAhbOmy.js} +1 -1
  109. package/dist/client/assets/{table-omg9OiL8.js → table-D03jqlLZ.js} +1 -1
  110. package/dist/client/assets/{tabs-ZI6fRQkw.js → tabs-DtdegoWH.js} +1 -1
  111. package/dist/client/assets/{task-status-erNd2Sbl.js → task-status-BgBSzATn.js} +1 -1
  112. package/dist/client/assets/{textarea-CpW5pfml.js → textarea-D_j-5IAu.js} +1 -1
  113. package/dist/client/assets/{toggle-group-By5F9baT.js → toggle-group-DDh5VZ6f.js} +1 -1
  114. package/dist/client/assets/{tools-list-2T2hc8nL.js → tools-list-CJJNUxfe.js} +1 -1
  115. package/dist/client/assets/{types-BOQuLrVp.js → types-CXkK-iOI.js} +1 -1
  116. package/dist/client/assets/{use-ai-providers-CITI1iNq.js → use-ai-providers-ElYJdGU0.js} +1 -1
  117. package/dist/client/assets/{use-collections-CRzXRke9.js → use-collections-ByN3iK_-.js} +1 -1
  118. package/dist/client/assets/{use-connection-CeSGdaGP.js → use-connection-DS4JMmfK.js} +1 -1
  119. package/dist/client/assets/{use-copy-DGEKKbaG.js → use-copy-1vU78qsX.js} +1 -1
  120. package/dist/client/assets/{use-create-virtual-mcp-UIh1S6RD.js → use-create-virtual-mcp-C0ZtxKxG.js} +1 -1
  121. package/dist/client/assets/{use-decopilot-events-CN7YV5I-.js → use-decopilot-events-Dv7rn_zQ.js} +1 -1
  122. package/dist/client/assets/{use-delete-connection-DeXytvwf.js → use-delete-connection-CnPoPnuN.js} +1 -1
  123. package/dist/client/assets/{use-infinite-scroll-DjXaeUEQ.js → use-infinite-scroll-D9oxXo_y.js} +1 -1
  124. package/dist/client/assets/{use-list-state-UZMoJUvO.js → use-list-state-Bt2BkuK4.js} +1 -1
  125. package/dist/client/assets/{use-mcp-tools-BKQPDk4x.js → use-mcp-tools-CpSp-YOn.js} +1 -1
  126. package/dist/client/assets/{use-members-afZV5Me8.js → use-members-CN2GRsgZ.js} +1 -1
  127. package/dist/client/assets/{use-mobile-DP4MR1ix.js → use-mobile-D5xdghWW.js} +1 -1
  128. package/dist/client/assets/{use-navigate-to-agent-C0iuNKaP.js → use-navigate-to-agent-DC2aXNSM.js} +1 -1
  129. package/dist/client/assets/{use-org-sso-B4mWsSMh.js → use-org-sso-HLMtUxyI.js} +1 -1
  130. package/dist/client/assets/{use-organization-settings-CcvcpCtE.js → use-organization-settings-CRVxUE8d.js} +1 -1
  131. package/dist/client/assets/{use-registry-connections-Bj_DPVwf.js → use-registry-connections-DiPCzdOz.js} +1 -1
  132. package/dist/client/assets/{use-status-sounds-ChUYFOhF.js → use-status-sounds-CepswEV9.js} +1 -1
  133. package/dist/client/assets/{use-tasks-DGmrkFpo.js → use-tasks-Cvm0js2U.js} +1 -1
  134. package/dist/client/assets/{use-view-mode-zFqL6G4U.js → use-view-mode-Qb4bThwm.js} +1 -1
  135. package/dist/client/assets/{use-virtual-mcp-Dn9ixQmR.js → use-virtual-mcp-DmXmoSMd.js} +1 -1
  136. package/dist/client/assets/useInfiniteQuery-BmiRpP8z.js +1 -0
  137. package/dist/client/assets/{user-D7q59BB0.js → user-rEzOpeDj.js} +1 -1
  138. package/dist/client/assets/{view-mode-toggle-BTfIGFL4.js → view-mode-toggle-EUXERI9v.js} +1 -1
  139. package/dist/client/assets/{workflow-DXb2lFI1.js → workflow-CD3p-F8j.js} +1 -1
  140. package/dist/client/assets/workflow-detail-DH47DpCR.js +1 -0
  141. package/dist/client/index.html +1 -1
  142. package/dist/server/cli.js +1 -1
  143. package/dist/server/node_modules/deepmerge/.editorconfig +7 -0
  144. package/dist/server/node_modules/deepmerge/.eslintcache +1 -0
  145. package/dist/server/node_modules/deepmerge/changelog.md +167 -0
  146. package/dist/server/node_modules/deepmerge/dist/cjs.js +133 -0
  147. package/dist/server/node_modules/deepmerge/dist/umd.js +139 -0
  148. package/dist/server/node_modules/deepmerge/index.d.ts +20 -0
  149. package/dist/server/node_modules/deepmerge/index.js +106 -0
  150. package/dist/server/node_modules/{postgres-date/license → deepmerge/license.txt} +1 -1
  151. package/dist/server/node_modules/deepmerge/package.json +42 -0
  152. package/dist/server/node_modules/deepmerge/readme.md +264 -0
  153. package/dist/server/node_modules/deepmerge/rollup.config.js +22 -0
  154. package/dist/server/node_modules/onetime/index.d.ts +64 -0
  155. package/dist/server/node_modules/onetime/index.js +44 -0
  156. package/dist/server/node_modules/{mimic-fn → onetime}/package.json +16 -15
  157. package/dist/server/node_modules/onetime/readme.md +94 -0
  158. package/package.json +1 -1
  159. package/dist/client/assets/ai-providers-Bykzb-xW.js +0 -1
  160. package/dist/client/assets/registry-B_QfL3wE.js +0 -2
  161. package/dist/client/assets/store-registry-DNqLsJlQ.js +0 -2
  162. package/dist/client/assets/useInfiniteQuery-7hq96Va6.js +0 -1
  163. package/dist/client/assets/workflow-detail-CC_ctEsy.js +0 -1
  164. package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
  165. package/dist/server/node_modules/ansi-styles/index.js +0 -223
  166. package/dist/server/node_modules/ansi-styles/package.json +0 -54
  167. package/dist/server/node_modules/ansi-styles/readme.md +0 -173
  168. package/dist/server/node_modules/convert-to-spaces/dist/index.d.ts +0 -2
  169. package/dist/server/node_modules/convert-to-spaces/dist/index.js +0 -4
  170. package/dist/server/node_modules/convert-to-spaces/license +0 -21
  171. package/dist/server/node_modules/convert-to-spaces/package.json +0 -40
  172. package/dist/server/node_modules/convert-to-spaces/readme.md +0 -39
  173. package/dist/server/node_modules/environment/index.d.ts +0 -74
  174. package/dist/server/node_modules/environment/index.js +0 -47
  175. package/dist/server/node_modules/environment/license +0 -9
  176. package/dist/server/node_modules/environment/package.json +0 -74
  177. package/dist/server/node_modules/environment/readme.md +0 -94
  178. package/dist/server/node_modules/escape-string-regexp/index.d.ts +0 -18
  179. package/dist/server/node_modules/escape-string-regexp/index.js +0 -11
  180. package/dist/server/node_modules/escape-string-regexp/license +0 -9
  181. package/dist/server/node_modules/escape-string-regexp/package.json +0 -43
  182. package/dist/server/node_modules/escape-string-regexp/readme.md +0 -29
  183. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  184. package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
  185. package/dist/server/node_modules/is-fullwidth-code-point/license +0 -9
  186. package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
  187. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
  188. package/dist/server/node_modules/is-unicode-supported/index.d.ts +0 -12
  189. package/dist/server/node_modules/is-unicode-supported/index.js +0 -21
  190. package/dist/server/node_modules/is-unicode-supported/license +0 -9
  191. package/dist/server/node_modules/is-unicode-supported/package.json +0 -47
  192. package/dist/server/node_modules/is-unicode-supported/readme.md +0 -35
  193. package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
  194. package/dist/server/node_modules/mimic-fn/index.js +0 -13
  195. package/dist/server/node_modules/mimic-fn/license +0 -9
  196. package/dist/server/node_modules/mimic-fn/readme.md +0 -69
  197. package/dist/server/node_modules/pg-cloudflare/LICENSE +0 -21
  198. package/dist/server/node_modules/pg-cloudflare/README.md +0 -112
  199. package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +0 -2
  200. package/dist/server/node_modules/pg-cloudflare/dist/empty.js +0 -6
  201. package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +0 -1
  202. package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +0 -31
  203. package/dist/server/node_modules/pg-cloudflare/dist/index.js +0 -152
  204. package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +0 -1
  205. package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +0 -3
  206. package/dist/server/node_modules/pg-cloudflare/package.json +0 -39
  207. package/dist/server/node_modules/pg-cloudflare/src/empty.ts +0 -3
  208. package/dist/server/node_modules/pg-cloudflare/src/index.ts +0 -166
  209. package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +0 -25
  210. package/dist/server/node_modules/pg-connection-string/LICENSE +0 -21
  211. package/dist/server/node_modules/pg-connection-string/README.md +0 -105
  212. package/dist/server/node_modules/pg-connection-string/esm/index.mjs +0 -8
  213. package/dist/server/node_modules/pg-connection-string/index.d.ts +0 -36
  214. package/dist/server/node_modules/pg-connection-string/index.js +0 -231
  215. package/dist/server/node_modules/pg-connection-string/package.json +0 -52
  216. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  217. package/dist/server/node_modules/pg-int8/README.md +0 -16
  218. package/dist/server/node_modules/pg-int8/index.js +0 -100
  219. package/dist/server/node_modules/pg-int8/package.json +0 -24
  220. package/dist/server/node_modules/pg-protocol/LICENSE +0 -21
  221. package/dist/server/node_modules/pg-protocol/README.md +0 -3
  222. package/dist/server/node_modules/pg-protocol/dist/b.d.ts +0 -1
  223. package/dist/server/node_modules/pg-protocol/dist/b.js +0 -23
  224. package/dist/server/node_modules/pg-protocol/dist/b.js.map +0 -1
  225. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +0 -15
  226. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +0 -55
  227. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +0 -1
  228. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +0 -16
  229. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +0 -81
  230. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +0 -1
  231. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +0 -1
  232. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +0 -530
  233. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +0 -1
  234. package/dist/server/node_modules/pg-protocol/dist/index.d.ts +0 -6
  235. package/dist/server/node_modules/pg-protocol/dist/index.js +0 -15
  236. package/dist/server/node_modules/pg-protocol/dist/index.js.map +0 -1
  237. package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +0 -162
  238. package/dist/server/node_modules/pg-protocol/dist/messages.js +0 -160
  239. package/dist/server/node_modules/pg-protocol/dist/messages.js.map +0 -1
  240. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +0 -1
  241. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +0 -252
  242. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +0 -1
  243. package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +0 -24
  244. package/dist/server/node_modules/pg-protocol/dist/parser.js +0 -324
  245. package/dist/server/node_modules/pg-protocol/dist/parser.js.map +0 -1
  246. package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +0 -42
  247. package/dist/server/node_modules/pg-protocol/dist/serializer.js +0 -189
  248. package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +0 -1
  249. package/dist/server/node_modules/pg-protocol/esm/index.js +0 -11
  250. package/dist/server/node_modules/pg-protocol/package.json +0 -45
  251. package/dist/server/node_modules/pg-protocol/src/b.ts +0 -25
  252. package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +0 -58
  253. package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +0 -85
  254. package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +0 -575
  255. package/dist/server/node_modules/pg-protocol/src/index.ts +0 -11
  256. package/dist/server/node_modules/pg-protocol/src/messages.ts +0 -262
  257. package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +0 -276
  258. package/dist/server/node_modules/pg-protocol/src/parser.ts +0 -413
  259. package/dist/server/node_modules/pg-protocol/src/serializer.ts +0 -274
  260. package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +0 -67
  261. package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +0 -166
  262. package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +0 -1
  263. package/dist/server/node_modules/pg-types/.travis.yml +0 -7
  264. package/dist/server/node_modules/pg-types/Makefile +0 -14
  265. package/dist/server/node_modules/pg-types/README.md +0 -75
  266. package/dist/server/node_modules/pg-types/index.d.ts +0 -137
  267. package/dist/server/node_modules/pg-types/index.js +0 -47
  268. package/dist/server/node_modules/pg-types/index.test-d.ts +0 -21
  269. package/dist/server/node_modules/pg-types/lib/arrayParser.js +0 -11
  270. package/dist/server/node_modules/pg-types/lib/binaryParsers.js +0 -257
  271. package/dist/server/node_modules/pg-types/lib/builtins.js +0 -73
  272. package/dist/server/node_modules/pg-types/lib/textParsers.js +0 -215
  273. package/dist/server/node_modules/pg-types/package.json +0 -42
  274. package/dist/server/node_modules/pg-types/test/index.js +0 -24
  275. package/dist/server/node_modules/pg-types/test/types.js +0 -597
  276. package/dist/server/node_modules/pgpass/README.md +0 -74
  277. package/dist/server/node_modules/pgpass/lib/helper.js +0 -233
  278. package/dist/server/node_modules/pgpass/lib/index.js +0 -23
  279. package/dist/server/node_modules/pgpass/package.json +0 -41
  280. package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
  281. package/dist/server/node_modules/postgres-array/index.js +0 -97
  282. package/dist/server/node_modules/postgres-array/license +0 -21
  283. package/dist/server/node_modules/postgres-array/package.json +0 -35
  284. package/dist/server/node_modules/postgres-array/readme.md +0 -43
  285. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  286. package/dist/server/node_modules/postgres-bytea/license +0 -21
  287. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  288. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  289. package/dist/server/node_modules/postgres-date/index.js +0 -116
  290. package/dist/server/node_modules/postgres-date/package.json +0 -33
  291. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  292. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  293. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  294. package/dist/server/node_modules/postgres-interval/license +0 -21
  295. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  296. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
  297. package/dist/server/node_modules/restore-cursor/index.d.ts +0 -11
  298. package/dist/server/node_modules/restore-cursor/index.js +0 -11
  299. package/dist/server/node_modules/restore-cursor/license +0 -9
  300. package/dist/server/node_modules/restore-cursor/package.json +0 -55
  301. package/dist/server/node_modules/restore-cursor/readme.md +0 -31
  302. package/dist/server/node_modules/split2/LICENSE +0 -13
  303. package/dist/server/node_modules/split2/README.md +0 -85
  304. package/dist/server/node_modules/split2/bench.js +0 -27
  305. package/dist/server/node_modules/split2/index.js +0 -141
  306. package/dist/server/node_modules/split2/package.json +0 -39
  307. package/dist/server/node_modules/split2/test.js +0 -409
  308. package/dist/server/node_modules/string-width/index.d.ts +0 -39
  309. package/dist/server/node_modules/string-width/index.js +0 -82
  310. package/dist/server/node_modules/string-width/license +0 -9
  311. package/dist/server/node_modules/string-width/package.json +0 -64
  312. package/dist/server/node_modules/string-width/readme.md +0 -66
  313. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  314. package/dist/server/node_modules/xtend/LICENSE +0 -20
  315. package/dist/server/node_modules/xtend/README.md +0 -32
  316. package/dist/server/node_modules/xtend/immutable.js +0 -19
  317. package/dist/server/node_modules/xtend/mutable.js +0 -17
  318. package/dist/server/node_modules/xtend/package.json +0 -55
  319. package/dist/server/node_modules/xtend/test.js +0 -103
  320. /package/dist/server/node_modules/{ansi-styles → onetime}/license +0 -0
@@ -1,4 +1,4 @@
1
- import{co as Fe,bm as Os,y as oe,aD as ge,a$ as ti,bR as _i,aL as Ie,bk as mt,b0 as qe,_ as mr,cp as rn,v as _e,cq as Ii,cr as ws,cs as ec,bP as tc,ct as ia,cu as nc,cv as rc,cw as ic,cx as fn,cy as Tr,cz as xs,bK as sa,bC as sc,aK as ze,bQ as oc,aJ as On,bc as Ci,cA as ac,r as N,j as w,cB as oa,cC as lc}from"./index-EE9r4ne7.js";import{e as cc,f as uc,n as fc,h as dc,C as hc,A as pc}from"./constants-CdNdiXMf.js";import{B as Ti,c as Pi}from"./collections-DIuw_dNV.js";import{R as Es}from"./index-NYDZhYFt.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Cc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Tc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Tn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Tn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Tn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Tn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Tn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Tn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Cc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Tc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Ce,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Ce),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Ce)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Ce,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Ce)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Ce)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Ce,this.CLOSED),he(this,ct,void 0))}}Ce=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Ce,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Ce)!==this.CLOSED&&he(this,Ce,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Tr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Cs=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Ts=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Cs(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Cs(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Ts(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Ts(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
1
+ import{co as Fe,bm as Os,y as oe,aD as ge,a$ as ti,bR as _i,aL as Ie,bk as mt,b0 as qe,_ as mr,cp as rn,v as _e,cq as Ii,cr as ws,cs as ec,bP as tc,ct as ia,cu as nc,cv as rc,cw as ic,cx as fn,cy as Tr,cz as xs,bK as sa,bC as sc,aK as ze,bQ as oc,aJ as On,bc as Ci,cA as ac,r as N,j as w,cB as oa,cC as lc}from"./index-D0eg_rFC.js";import{e as cc,f as uc,n as fc,h as dc,C as hc,A as pc}from"./constants-D4bpaQIy.js";import{B as Ti,c as Pi}from"./collections-BZR-yDlA.js";import{R as Es}from"./index-DE-s5va1.js";var mc=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||ge();i instanceof rn&&(e.number=i.int())}}},yc=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=qe(n):typeof n=="number"?e.number=qe(n):typeof n=="boolean"?e.boolean=qe(n):n===null?e.null=_i():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},gc=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?_i():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return qe(e[0]);if(t==="string")return mr(e);if(t==="number"){const[n,r,...i]=e;return mt([qe(n),qe(r),...i.map(s=>qe(s))])}return t==="boolean"?mt([qe(!0),qe(!1)]):!1}},bc=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=ic();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Sc=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=oe())}},vc=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Oc=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||oe();r instanceof Ii&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},wc=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||oe();if(r instanceof Ii){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},xc=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.min(n.minimum))}}},Ec=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.max(n.maximum))}}},Ac=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},_c=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Ic=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||ge();r instanceof rn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Cc=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Ie(Fe()))}},Tc=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).min(n.minItems))}},Pc=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Ie(Fe())).max(n.maxItems))}},Fc=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Ie(Fe());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ae(n.items);let i=Ie(r);if(e.array&&e.array instanceof ec){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Ie(Fe()):e.array=Ie(Fe()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||Ie(Fe()):n.prefixItems&&(e.array=e.array||Ie(Fe()))}},jc=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>Ae(s));let i;r.length===0?i=ws([]):i=ws(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},$c=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||_e({}).passthrough())}},Dc=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=_e({}).passthrough())}},Nc=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Rc=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||_e({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Tn(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>Tn(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Tn(e[i],t[i]))}return!1}function Mc(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>Tn(n,i))?!1:(t.push(n),!0))}}function cr(e,t){return e.safeParse(t).success}var Uc=class{apply(e,t){if(!t.not)return e;const n=Ae(t.not);return e.refine(r=>!cr(n,r),{message:"Value must not match the 'not' schema"})}},kc=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Mc(),{message:"Array items must be unique"})}},Lc=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>Ae(r)).reduce((r,i)=>ia(r,i),e)}},Bc=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?Ae(t.anyOf[0]):mt([Ae(t.anyOf[0]),Ae(t.anyOf[1]),...t.anyOf.slice(2).map(r=>Ae(r))]);return ia(e,n)}},Wc=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>Ae(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},qc=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ae(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Ae(n.items);for(let a=i.length;a<s.length;a++)if(!cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},Vc=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof nc||e instanceof rc){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ae(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?_e(r):_e(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Ae(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},Hc=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Tn(r,i)),{message:"Value must match one of the enum values"})}},Kc=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>Tn(r,n),{message:"Value must equal the const value"})}},Gc=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},zc=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Fe().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},Yc=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=Ae(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)cr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Jc=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},Zc=[new yc,new gc,new mc,new bc,new Sc,new Cc,new Dc,new vc,new Oc,new wc,new xc,new Ec,new Ac,new _c,new Ic,new jc,new Tc,new Pc,new Fc,new Nc,new Rc,new $c],Xc=[new zc,new Hc,new Kc,new Lc,new Bc,new Wc,new qc,new Vc,new Yc,new Uc,new kc,new Jc,new Gc];function Ae(e){if(typeof e=="boolean")return e?Fe():Os();const t={};for(const i of Zc)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||oe()),t.number!==!1&&n.push(t.number||ge()),t.boolean!==!1&&n.push(t.boolean||ti()),t.null!==!1&&n.push(t.null||_i()),t.array!==!1&&n.push(t.array||Ie(Fe())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=tc(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Os():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=mt(n):r=Fe();for(const i of Xc)r=i.apply(r,e);return r}class As extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_s(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_s(this),n)}}function Qc(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ni(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ni).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ni(e.cause)}`:e.message:`${e}`}function _s(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var aa=e=>{throw TypeError(e)},Fi=(e,t,n)=>t.has(e)||aa("Cannot "+n),G=(e,t,n)=>(Fi(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?aa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Fi(e,t,"write to private field"),t.set(e,n),n),Qe=(e,t,n)=>(Fi(e,t,"access private method"),n),Ce,Et,kt,Qn,ur,wn,qt,xn,ct,Lt,Gt,Bt,mn,Re,ri,ii,si,Is,oi,ai,yn,li,ci;class er extends EventTarget{constructor(t,n){var r,i;super(),Se(this,Re),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Se(this,Ce),Se(this,Et),Se(this,kt),Se(this,Qn),Se(this,ur),Se(this,wn),Se(this,qt),Se(this,xn,null),Se(this,ct),Se(this,Lt),Se(this,Gt,null),Se(this,Bt,null),Se(this,mn,null),Se(this,ii,async s=>{var o;G(this,Lt).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){Qe(this,Re,yn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?he(this,kt,new URL(s.url)):he(this,kt,void 0),c!==200){Qe(this,Re,yn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){Qe(this,Re,yn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.OPEN);const f=new Event("open");if((o=G(this,mn))==null||o.call(this,f),this.dispatchEvent(f),typeof a!="object"||!a||!("getReader"in a)){Qe(this,Re,yn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const h=new TextDecoder,m=a.getReader();let d=!0;do{const{done:p,value:y}=await m.read();y&&G(this,Lt).feed(h.decode(y,{stream:!p})),p&&(d=!1,G(this,Lt).reset(),Qe(this,Re,li).call(this))}while(d)}),Se(this,si,s=>{he(this,ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&Qe(this,Re,li).call(this,ni(s))}),Se(this,oi,s=>{typeof s.id=="string"&&he(this,xn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:G(this,kt)?G(this,kt).origin:G(this,Et).origin,lastEventId:s.id||""});G(this,Bt)&&(!s.event||s.event==="message")&&G(this,Bt).call(this,o),this.dispatchEvent(o)}),Se(this,ai,s=>{he(this,wn,s)}),Se(this,ci,()=>{he(this,qt,void 0),G(this,Ce)===this.CONNECTING&&Qe(this,Re,ri).call(this)});try{if(t instanceof URL)he(this,Et,t);else if(typeof t=="string")he(this,Et,new URL(t,eu()));else throw new Error("Invalid URL")}catch{throw Qc("An invalid or illegal string was specified")}he(this,Lt,cc({onEvent:G(this,oi),onRetry:G(this,ai)})),he(this,Ce,this.CONNECTING),he(this,wn,3e3),he(this,ur,(r=n?.fetch)!=null?r:globalThis.fetch),he(this,Qn,(i=n?.withCredentials)!=null?i:!1),Qe(this,Re,ri).call(this)}get readyState(){return G(this,Ce)}get url(){return G(this,Et).href}get withCredentials(){return G(this,Qn)}get onerror(){return G(this,Gt)}set onerror(t){he(this,Gt,t)}get onmessage(){return G(this,Bt)}set onmessage(t){he(this,Bt,t)}get onopen(){return G(this,mn)}set onopen(t){he(this,mn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){G(this,qt)&&clearTimeout(G(this,qt)),G(this,Ce)!==this.CLOSED&&(G(this,ct)&&G(this,ct).abort(),he(this,Ce,this.CLOSED),he(this,ct,void 0))}}Ce=new WeakMap,Et=new WeakMap,kt=new WeakMap,Qn=new WeakMap,ur=new WeakMap,wn=new WeakMap,qt=new WeakMap,xn=new WeakMap,ct=new WeakMap,Lt=new WeakMap,Gt=new WeakMap,Bt=new WeakMap,mn=new WeakMap,Re=new WeakSet,ri=function(){he(this,Ce,this.CONNECTING),he(this,ct,new AbortController),G(this,ur)(G(this,Et),Qe(this,Re,Is).call(this)).then(G(this,ii)).catch(G(this,si))},ii=new WeakMap,si=new WeakMap,Is=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...G(this,xn)?{"Last-Event-ID":G(this,xn)}:void 0},cache:"no-store",signal:(e=G(this,ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},oi=new WeakMap,ai=new WeakMap,yn=function(e,t){var n;G(this,Ce)!==this.CLOSED&&he(this,Ce,this.CLOSED);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r)},li=function(e,t){var n;if(G(this,Ce)===this.CLOSED)return;he(this,Ce,this.CONNECTING);const r=new As("error",{code:t,message:e});(n=G(this,Gt))==null||n.call(this,r),this.dispatchEvent(r),he(this,qt,setTimeout(G(this,ci),G(this,wn)))},ci=new WeakMap,er.CONNECTING=0,er.OPEN=1,er.CLOSED=2;function eu(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class tu extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class nu{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=uc(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new fn("No auth provider");let t;try{t=await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new fn;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=fc(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new er(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=xs(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new tu(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=sa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new fn("No auth provider");if(await Tr(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=xs(i);if(this._resourceMetadataUrl=o,this._scope=a,await Tr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new fn;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const ru="mcp";class iu{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,ru),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=sa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class su extends dc{constructor(t,n){super(t,n)}send(t,n){const r=ou(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ou(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class au extends hc{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},sc,n)}}const lu=async(e,t,n)=>{const r=cu(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new au({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},cu=(e,t,n)=>{if(e.type==="Websocket")return new iu(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new nu(new URL(e.url),s)}return new su(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},Cs=e=>{try{return JSON.parse(e)}catch{return e}},zn=new Map,Ts=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?Ae(e.inputSchema):void 0,outputSchema:e.outputSchema?Ae(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function uu(e){const t=n=>"connection"in e?lu({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),f=u?{"x-trace-debug-id":u}:void 0,{client:h}=await t(f),{structuredContent:m,isError:d,content:p}=await h.callTool({name:String(c),arguments:l});if(d){const S=p?.[0]?.text,O=typeof S=="string"?Cs(S):null,E=O?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(O.code,O.message,O.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(m??p)}`)}if(m!==void 0)return m;const y=p?.[0]?.text;return typeof y=="string"?Cs(y):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return zn.has(c)||zn.set(c,s()),await zn.get(c)}catch(u){console.error("Failed to list tools",u),zn.delete(c);return}}async function a(){return(await o()??[]).map(c=>Ts(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Ts(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>fu({connection:n}):global[t]}});function fu(e){return uu(e)}const du=_e({toolName:oe().describe("Name of the tool to invoke on that connection"),transformCode:oe().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(stepInput): Output { ... }`\n The stepInput will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output.\n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),hu=_e({code:oe().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(stepInput): Output { ... }\`
2
2
  The stepInput is the resolved value of the references in the input field. Example:
3
3
  {
4
4
  "input": {
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-BXYsY1_p.js","assets/ChevronDown-CYdW9NBw.js","assets/login-DDMVtz0x.js","assets/input-r_oEqK-V.js","assets/reset-password-BV1UW9SB.js","assets/shell-layout-CDe1Q4z8.js","assets/dialog-C0FUDu40.js","assets/X-D_4PiiTE.js","assets/required-auth-layout-C6TLzB3T.js","assets/use-tasks-DGmrkFpo.js","assets/use-collections-CRzXRke9.js","assets/constants-CdNdiXMf.js","assets/use-organization-settings-CcvcpCtE.js","assets/use-org-sso-B4mWsSMh.js","assets/Lock01-CmojMPTn.js","assets/onboarding-DmzJa5qN.js","assets/label-CenAgqhm.js","assets/Users03-BIYd5t8v.js","assets/CheckCircle-BTIsSwsN.js","assets/Palette-D4s8zWmN.js","assets/index-CN1oVHjb.js","assets/chat-context-Dp5HM8R-.js","assets/use-virtual-mcp-Dn9ixQmR.js","assets/use-ai-providers-CITI1iNq.js","assets/use-decopilot-events-CN7YV5I-.js","assets/create-sse-subscription-CxkOgzKf.js","assets/task-status-erNd2Sbl.js","assets/agent-icon-31CiXnkF.js","assets/AlertCircle-CDrkM01U.js","assets/Tool01-DCaYwllU.js","assets/SearchMd-DJ0JdIz3.js","assets/ArrowNarrowLeft-D40KhznE.js","assets/XCircle-rGav0QLs.js","assets/ZapSquare-BYfCzFpy.js","assets/ChevronRight-YkSQYi3B.js","assets/ChevronUp-BcPC1hCC.js","assets/Container-ChD3KoS4.js","assets/Star01-Vcjv0Tzc.js","assets/index-BRiQU6du.js","assets/use-mobile-DP4MR1ix.js","assets/LinkExternal01-l0w4_WlJ.js","assets/Sun-51uZR1E5.js","assets/Play-CiTVDuYt.js","assets/Plus-CVdax6FK.js","assets/Settings02-D-hypCbK.js","assets/Trash01-D5ZS0TOT.js","assets/Upload01-CBYhGwn0.js","assets/User01-Dq3q9cE-.js","assets/Zap-qFCEz_qt.js","assets/scroll-area-C6ws31M0.js","assets/select-DMKL-iI9.js","assets/use-copy-DGEKKbaG.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/content-blocks-o63cs2vh.js","assets/types-BOQuLrVp.js","assets/integration-icon-BKKqOsd5.js","assets/drawer-D4_wXu6X.js","assets/collection-search-C0B93tJw.js","assets/tabs-ZI6fRQkw.js","assets/form-BQFhlKGv.js","assets/dropdown-menu-aG44dJsz.js","assets/toggle-group-By5F9baT.js","assets/select-model-D2d213qn.js","assets/checkbox-BhkHXCse.js","assets/skeleton-C8k5qVSG.js","assets/ai-providers-logos-CS4PCiqI.js","assets/card-BAp6Jwgi.js","assets/switch-BlmZa3uf.js","assets/avatar-BVvDTfBW.js","assets/alert-dialog-BpydK2MI.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/accordion-C_FjDGY7.js","assets/use-connection-CeSGdaGP.js","assets/question-004-sINsf4GQ.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-CJ6uOT9E.js","assets/use-registry-connections-Bj_DPVwf.js","assets/useInfiniteQuery-7hq96Va6.js","assets/infiniteQueryObserver-BQYXKuj2.js","assets/extract-connection-data-CAAXAkZY.js","assets/constants-BG70AVFL.js","assets/collections-DIuw_dNV.js","assets/collection-tabs-CMC3SILy.js","assets/badge-BhfSxzi-.js","assets/textarea-CpW5pfml.js","assets/connection-form-helpers-CDPt3S_P.js","assets/use-infinite-scroll-DjXaeUEQ.js","assets/command-CRMnQTof.js","assets/index-C6SXa4V4.js","assets/lean-canvas-recruit-modal-TnasvQfT.js","assets/use-navigate-to-agent-C0iuNKaP.js","assets/use-mcp-tools-BKQPDk4x.js","assets/use-create-virtual-mcp-UIh1S6RD.js","assets/popover-BktSfQG9.js","assets/empty-state-BjAjwUcB.js","assets/index-CIlSPTSj.js","assets/use-status-sounds-ChUYFOhF.js","assets/tools-list-2T2hc8nL.js","assets/view-mode-toggle-BTfIGFL4.js","assets/user-D7q59BB0.js","assets/automation-list-row-mTTWiKQ6.js","assets/search-input-Dxw50-Fc.js","assets/index-DDGTF8rc.css","assets/settings-layout-BBdiRp4e.js","assets/connections-aYS5E8PJ.js","assets/collection-display-button-jqECsu1f.js","assets/use-delete-connection-DeXytvwf.js","assets/use-list-state-UZMoJUvO.js","assets/use-view-mode-zFqL6G4U.js","assets/connection-detail-Dj-OLW3C.js","assets/index-CoTOPljc.js","assets/index-CEQG3Gi2.js","assets/index-NYDZhYFt.js","assets/use-members-afZV5Me8.js","assets/layout-DB6YepVn.js","assets/monitoring-stats-row-DosCpU_L.js","assets/collection-detail-Bm3mvhEG.js","assets/index-mdSoEPSF.js","assets/monaco-editor-C3TYqqnp.js","assets/empty-state-BGqwS_3w.js","assets/index-DRjT3wqk.js","assets/table-omg9OiL8.js","assets/general-0YlUSUig.js","assets/features-DCfAHIGS.js","assets/brand-context-Bn_7uvJT.js","assets/ai-providers-Bykzb-xW.js","assets/members-BH6aFn0i.js","assets/collection-table-wrapper-Bf17fkBP.js","assets/sso-CChrq6HN.js","assets/profile-BSS2RbEG.js","assets/store-Dk4svl-0.js","assets/workflow-DXb2lFI1.js","assets/workflow-detail-CC_ctEsy.js","assets/org-plugin-layout-Cv_313Tb.js","assets/plugin-layout-Do_Ws-WY.js","assets/agents-list-kGMjebHK.js","assets/automations-Z179s9qX.js","assets/dynamic-plugin-layout-pzG9mWCw.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-BYiR1ua4.js","assets/ChevronDown-BjlYfwkz.js","assets/login-vu3mdB5z.js","assets/input-B0rO4kCw.js","assets/reset-password-nmqGdy62.js","assets/shell-layout-Bx85tvr4.js","assets/dialog-CrC-U752.js","assets/X-DJVuZ58d.js","assets/required-auth-layout-eS3mZHM3.js","assets/use-tasks-Cvm0js2U.js","assets/use-collections-ByN3iK_-.js","assets/constants-D4bpaQIy.js","assets/use-organization-settings-CRVxUE8d.js","assets/use-org-sso-HLMtUxyI.js","assets/Lock01-DC87zCkJ.js","assets/onboarding-BeW6omQ6.js","assets/label-DEuSkBBi.js","assets/Users03-C4Ee_frB.js","assets/CheckCircle-CzlD2NtZ.js","assets/Palette-BAefAlJJ.js","assets/index-C7Syt5sm.js","assets/chat-context-jZHB4zZq.js","assets/use-virtual-mcp-DmXmoSMd.js","assets/use-ai-providers-ElYJdGU0.js","assets/use-decopilot-events-Dv7rn_zQ.js","assets/create-sse-subscription-CxkOgzKf.js","assets/task-status-BgBSzATn.js","assets/agent-icon-BCqNXHrJ.js","assets/AlertCircle-ZN1y5-aw.js","assets/Tool01-BYIP93fl.js","assets/SearchMd-CuF0EE4i.js","assets/ArrowNarrowLeft-BPki4rs6.js","assets/XCircle-C-PtnVDi.js","assets/ZapSquare-Bn1DnHGa.js","assets/ChevronRight-Ers_V2D1.js","assets/ChevronUp-BFd66NER.js","assets/Container-BH-IjM7q.js","assets/Star01-DG4GVqjt.js","assets/index-CESHAiFx.js","assets/use-mobile-D5xdghWW.js","assets/LinkExternal01-Df1708RH.js","assets/Sun-bNHtETAN.js","assets/Play-8RSCt4_z.js","assets/Plus-D7R85tnb.js","assets/Settings02-0biYSyip.js","assets/Trash01-DiVIK0OP.js","assets/Upload01-1ZdG7oJK.js","assets/User01-ZdNcPumq.js","assets/Zap-DFbFP4h9.js","assets/scroll-area-BPvcbDba.js","assets/select-DV6Y5fbl.js","assets/use-copy-1vU78qsX.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/content-blocks-o63cs2vh.js","assets/types-CXkK-iOI.js","assets/integration-icon-yOwsHf6q.js","assets/drawer-D164IDvt.js","assets/collection-search-9bv6LiW5.js","assets/tabs-DtdegoWH.js","assets/form-NpftjNqr.js","assets/dropdown-menu-BCSsOhoD.js","assets/toggle-group-DDh5VZ6f.js","assets/select-model-BhJ9eJ30.js","assets/checkbox-BK1FOOnx.js","assets/skeleton-C_5kHpZw.js","assets/ai-providers-logos-CS4PCiqI.js","assets/card-Dgjac7df.js","assets/switch-CbAhbOmy.js","assets/avatar-DtO_DjAh.js","assets/alert-dialog-Cce2zNSt.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/accordion-BKyKwvi4.js","assets/use-connection-DS4JMmfK.js","assets/question-004-sINsf4GQ.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-Cavj0z1s.js","assets/use-registry-connections-DiPCzdOz.js","assets/useInfiniteQuery-BmiRpP8z.js","assets/infiniteQueryObserver-CpBPXtl6.js","assets/extract-connection-data-CIGH4JOA.js","assets/constants-B6BlNNCv.js","assets/collections-BZR-yDlA.js","assets/collection-tabs-DBij18bF.js","assets/badge-y-hsEihY.js","assets/textarea-D_j-5IAu.js","assets/connection-form-helpers-BickqfM0.js","assets/use-infinite-scroll-D9oxXo_y.js","assets/command-DsPZNxzv.js","assets/index-BabWp460.js","assets/lean-canvas-recruit-modal-BMnsbvdl.js","assets/use-navigate-to-agent-DC2aXNSM.js","assets/use-mcp-tools-CpSp-YOn.js","assets/use-create-virtual-mcp-C0ZtxKxG.js","assets/popover-DUh9iDm9.js","assets/empty-state-Burt6Pjq.js","assets/index-MDHGBKc3.js","assets/use-status-sounds-CepswEV9.js","assets/tools-list-CJJNUxfe.js","assets/view-mode-toggle-EUXERI9v.js","assets/user-rEzOpeDj.js","assets/automation-list-row-D3uOWcPZ.js","assets/search-input-DuumYWEB.js","assets/index-DDGTF8rc.css","assets/settings-layout-C6WZX8H8.js","assets/connections-Di7YhHpL.js","assets/collection-display-button-Gr_qxtzC.js","assets/use-delete-connection-CnPoPnuN.js","assets/use-list-state-Bt2BkuK4.js","assets/use-view-mode-Qb4bThwm.js","assets/connection-detail-B_MywG2r.js","assets/index-CSCpQ3nk.js","assets/index-CmG3u4sk.js","assets/index-DE-s5va1.js","assets/use-members-CN2GRsgZ.js","assets/layout-CEdjROI5.js","assets/monitoring-stats-row-5HVh1Gjz.js","assets/collection-detail-x76KaTbs.js","assets/index-ClWc2yds.js","assets/monaco-editor-wLqdDZ5S.js","assets/empty-state-CMAHTHUe.js","assets/index-CMJ6GQ7C.js","assets/table-D03jqlLZ.js","assets/general-CPi9v1zL.js","assets/features-DkrqQmvn.js","assets/brand-context-zVTleDgN.js","assets/ai-providers-Cq8P81dq.js","assets/members-DtGUx-F1.js","assets/collection-table-wrapper-BD46An7o.js","assets/sso-Du9xnoxY.js","assets/profile-Bk0bLa4g.js","assets/store-DFSqH5M5.js","assets/workflow-CD3p-F8j.js","assets/workflow-detail-DH47DpCR.js","assets/org-plugin-layout-Bnfoicc4.js","assets/plugin-layout-DCOghZWx.js","assets/agents-list-st6j9oA0.js","assets/automations-_4yX33cm.js","assets/dynamic-plugin-layout-PtppgAts.js"])))=>i.map(i=>d[i]);
2
2
  function j$(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const U$="modulepreload",z$=function(e){return"/"+e},W2={},Lt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");i=l(n.map(f=>{if(f=z$(f),f in W2)return;W2[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":U$,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var Yae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var __={exports:{}},Fu={};var Q2;function F$(){if(Q2)return Fu;Q2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var l=null;if(s!==void 0&&(l=""+s),i.key!==void 0&&(l=""+i.key),"key"in i){s={};for(var c in i)c!=="key"&&(s[c]=i[c])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:s}}return Fu.Fragment=t,Fu.jsx=n,Fu.jsxs=n,Fu}var X2;function V$(){return X2||(X2=1,__.exports=F$()),__.exports}var T=V$(),y_={exports:{}},Vu={},b_={exports:{}},w_={};var J2;function B$(){return J2||(J2=1,(function(e){function t(q,W){var ee=q.length;q.push(W);e:for(;0<ee;){var ae=ee-1>>>1,Q=q[ae];if(0<i(Q,W))q[ae]=W,q[ee]=Q,ee=ae;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],ee=q.pop();if(ee!==W){q[0]=ee;e:for(var ae=0,Q=q.length,k=Q>>>1;ae<k;){var K=2*(ae+1)-1,B=q[K],D=K+1,z=q[D];if(0>i(B,ee))D<Q&&0>i(z,B)?(q[ae]=z,q[D]=ee,ae=D):(q[ae]=B,q[K]=ee,ae=K);else if(D<Q&&0>i(z,ee))q[ae]=z,q[D]=ee,ae=D;else break e}}return W}function i(q,W){var ee=q.sortIndex-W.sortIndex;return ee!==0?ee:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],m=1,p=null,g=3,v=!1,y=!1,b=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function O(q){if(b=!1,C(q),!y)if(n(d)!==null)y=!0,A||(A=!0,V());else{var W=n(f);W!==null&&re(O,W.startTime-q)}}var A=!1,M=-1,P=5,L=-1;function H(){return x?!0:!(e.unstable_now()-L<P)}function j(){if(x=!1,A){var q=e.unstable_now();L=q;var W=!0;try{e:{y=!1,b&&(b=!1,E(M),M=-1),v=!0;var ee=g;try{t:{for(C(q),p=n(d);p!==null&&!(p.expirationTime>q&&H());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,g=p.priorityLevel;var Q=ae(p.expirationTime<=q);if(q=e.unstable_now(),typeof Q=="function"){p.callback=Q,C(q),W=!0;break t}p===n(d)&&r(d),C(q)}else r(d);p=n(d)}if(p!==null)W=!0;else{var k=n(f);k!==null&&re(O,k.startTime-q),W=!1}}break e}finally{p=null,g=ee,v=!1}W=void 0}}finally{W?V():A=!1}}}var V;if(typeof R=="function")V=function(){R(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Z=U.port2;U.port1.onmessage=j,V=function(){Z.postMessage(null)}}else V=function(){S(j,0)};function re(q,W){M=S(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var ee=g;g=W;try{return q()}finally{g=ee}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ee=g;g=q;try{return W()}finally{g=ee}},e.unstable_scheduleCallback=function(q,W,ee){var ae=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ae+ee:ae):ee=ae,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=ee+Q,q={id:m++,callback:W,priorityLevel:q,startTime:ee,expirationTime:Q,sortIndex:-1},ee>ae?(q.sortIndex=ee,t(f,q),n(d)===null&&q===n(f)&&(b?(E(M),M=-1):b=!0,re(O,ee-ae))):(q.sortIndex=Q,t(d,q),y||v||(y=!0,A||(A=!0,V()))),q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(q){var W=g;return function(){var ee=g;g=W;try{return q.apply(this,arguments)}finally{g=ee}}}})(w_)),w_}var eO;function q$(){return eO||(eO=1,b_.exports=B$()),b_.exports}var S_={exports:{}},rt={};var tO;function H$(){if(tO)return rt;tO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=g&&k[g]||k["@@iterator"],typeof k=="function"?k:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function S(k,K,B){this.props=k,this.context=K,this.refs=x,this.updater=B||y}S.prototype.isReactComponent={},S.prototype.setState=function(k,K){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,K,"setState")},S.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=S.prototype;function R(k,K,B){this.props=k,this.context=K,this.refs=x,this.updater=B||y}var C=R.prototype=new E;C.constructor=R,b(C,S.prototype),C.isPureReactComponent=!0;var O=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function L(k,K,B){var D=B.ref;return{$$typeof:e,type:k,key:K,ref:D!==void 0?D:null,props:B}}function H(k,K){return L(k.type,K,k.props)}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function V(k){var K={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(B){return K[B]})}var U=/\/+/g;function Z(k,K){return typeof k=="object"&&k!==null&&k.key!=null?V(""+k.key):K.toString(36)}function re(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(A,A):(k.status="pending",k.then(function(K){k.status==="pending"&&(k.status="fulfilled",k.value=K)},function(K){k.status==="pending"&&(k.status="rejected",k.reason=K)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function q(k,K,B,D,z){var X=typeof k;(X==="undefined"||X==="boolean")&&(k=null);var fe=!1;if(k===null)fe=!0;else switch(X){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(k.$$typeof){case e:case t:fe=!0;break;case m:return fe=k._init,q(fe(k._payload),K,B,D,z)}}if(fe)return z=z(k),fe=D===""?"."+Z(k,0):D,O(z)?(B="",fe!=null&&(B=fe.replace(U,"$&/")+"/"),q(z,K,B,"",function(Ue){return Ue})):z!=null&&(j(z)&&(z=H(z,B+(z.key==null||k&&k.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+fe)),K.push(z)),1;fe=0;var pe=D===""?".":D+":";if(O(k))for(var xe=0;xe<k.length;xe++)D=k[xe],X=pe+Z(D,xe),fe+=q(D,K,B,X,z);else if(xe=v(k),typeof xe=="function")for(k=xe.call(k),xe=0;!(D=k.next()).done;)D=D.value,X=pe+Z(D,xe++),fe+=q(D,K,B,X,z);else if(X==="object"){if(typeof k.then=="function")return q(re(k),K,B,D,z);throw K=String(k),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return fe}function W(k,K,B){if(k==null)return k;var D=[],z=0;return q(k,D,"","",function(X){return K.call(B,X,z++)}),D}function ee(k){if(k._status===-1){var K=k._result;K=K(),K.then(function(B){(k._status===0||k._status===-1)&&(k._status=1,k._result=B)},function(B){(k._status===0||k._status===-1)&&(k._status=2,k._result=B)}),k._status===-1&&(k._status=0,k._result=K)}if(k._status===1)return k._result.default;throw k._result}var ae=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Q={map:W,forEach:function(k,K,B){W(k,function(){K.apply(this,arguments)},B)},count:function(k){var K=0;return W(k,function(){K++}),K},toArray:function(k){return W(k,function(K){return K})||[]},only:function(k){if(!j(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return rt.Activity=p,rt.Children=Q,rt.Component=S,rt.Fragment=n,rt.Profiler=i,rt.PureComponent=R,rt.StrictMode=r,rt.Suspense=d,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,rt.__COMPILER_RUNTIME={__proto__:null,c:function(k){return M.H.useMemoCache(k)}},rt.cache=function(k){return function(){return k.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(k,K,B){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var D=b({},k.props),z=k.key;if(K!=null)for(X in K.key!==void 0&&(z=""+K.key),K)!P.call(K,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&K.ref===void 0||(D[X]=K[X]);var X=arguments.length-2;if(X===1)D.children=B;else if(1<X){for(var fe=Array(X),pe=0;pe<X;pe++)fe[pe]=arguments[pe+2];D.children=fe}return L(k.type,z,D)},rt.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},rt.createElement=function(k,K,B){var D,z={},X=null;if(K!=null)for(D in K.key!==void 0&&(X=""+K.key),K)P.call(K,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(z[D]=K[D]);var fe=arguments.length-2;if(fe===1)z.children=B;else if(1<fe){for(var pe=Array(fe),xe=0;xe<fe;xe++)pe[xe]=arguments[xe+2];z.children=pe}if(k&&k.defaultProps)for(D in fe=k.defaultProps,fe)z[D]===void 0&&(z[D]=fe[D]);return L(k,X,z)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(k){return{$$typeof:c,render:k}},rt.isValidElement=j,rt.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:ee}},rt.memo=function(k,K){return{$$typeof:f,type:k,compare:K===void 0?null:K}},rt.startTransition=function(k){var K=M.T,B={};M.T=B;try{var D=k(),z=M.S;z!==null&&z(B,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(A,ae)}catch(X){ae(X)}finally{K!==null&&B.types!==null&&(K.types=B.types),M.T=K}},rt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},rt.use=function(k){return M.H.use(k)},rt.useActionState=function(k,K,B){return M.H.useActionState(k,K,B)},rt.useCallback=function(k,K){return M.H.useCallback(k,K)},rt.useContext=function(k){return M.H.useContext(k)},rt.useDebugValue=function(){},rt.useDeferredValue=function(k,K){return M.H.useDeferredValue(k,K)},rt.useEffect=function(k,K){return M.H.useEffect(k,K)},rt.useEffectEvent=function(k){return M.H.useEffectEvent(k)},rt.useId=function(){return M.H.useId()},rt.useImperativeHandle=function(k,K,B){return M.H.useImperativeHandle(k,K,B)},rt.useInsertionEffect=function(k,K){return M.H.useInsertionEffect(k,K)},rt.useLayoutEffect=function(k,K){return M.H.useLayoutEffect(k,K)},rt.useMemo=function(k,K){return M.H.useMemo(k,K)},rt.useOptimistic=function(k,K){return M.H.useOptimistic(k,K)},rt.useReducer=function(k,K,B){return M.H.useReducer(k,K,B)},rt.useRef=function(k){return M.H.useRef(k)},rt.useState=function(k){return M.H.useState(k)},rt.useSyncExternalStore=function(k,K,B){return M.H.useSyncExternalStore(k,K,B)},rt.useTransition=function(){return M.H.useTransition()},rt.version="19.2.5",rt}var nO;function ca(){return nO||(nO=1,S_.exports=H$()),S_.exports}var E_={exports:{}},yr={};var rO;function G$(){if(rO)return yr;rO=1;var e=ca();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return yr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,m)},yr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},yr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},yr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},yr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},yr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},yr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},yr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},yr.requestFormReset=function(d){r.d.r(d)},yr.unstable_batchedUpdates=function(d,f){return d(f)},yr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},yr.useFormStatus=function(){return l.H.useHostTransitionStatus()},yr.version="19.2.5",yr}var iO;function CM(){if(iO)return E_.exports;iO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),E_.exports=G$(),E_.exports}var oO;function K$(){if(oO)return Vu;oO=1;var e=q$(),t=ca(),n=CM();function r(o){var a="https://react.dev/errors/"+o;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var a=o,u=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(u=a.return),o=a.return;while(o)}return a.tag===3?u:null}function l(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function c(o){if(o.tag===31){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function d(o){if(s(o)!==o)throw Error(r(188))}function f(o){var a=o.alternate;if(!a){if(a=s(o),a===null)throw Error(r(188));return a!==o?null:o}for(var u=o,h=a;;){var _=u.return;if(_===null)break;var w=_.alternate;if(w===null){if(h=_.return,h!==null){u=h;continue}break}if(_.child===w.child){for(w=_.child;w;){if(w===u)return d(_),o;if(w===h)return d(_),a;w=w.sibling}throw Error(r(188))}if(u.return!==h.return)u=_,h=w;else{for(var N=!1,$=_.child;$;){if($===u){N=!0,u=_,h=w;break}if($===h){N=!0,h=_,u=w;break}$=$.sibling}if(!N){for($=w.child;$;){if($===u){N=!0,u=w,h=_;break}if($===h){N=!0,h=w,u=_;break}$=$.sibling}if(!N)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?o:a}function m(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o;for(o=o.child;o!==null;){if(a=m(o),a!==null)return a;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function V(o){return o===null||typeof o!="object"?null:(o=j&&o[j]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function Z(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case b:return"Fragment";case S:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case y:return"Portal";case R:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case C:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return a=o.displayName||null,a!==null?a:Z(o.type)||"Memo";case P:a=o._payload,o=o._init;try{return Z(o(a))}catch{}}return null}var re=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ae=[],Q=-1;function k(o){return{current:o}}function K(o){0>Q||(o.current=ae[Q],ae[Q]=null,Q--)}function B(o,a){Q++,ae[Q]=o.current,o.current=a}var D=k(null),z=k(null),X=k(null),fe=k(null);function pe(o,a){switch(B(X,a),B(z,o),B(D,null),a.nodeType){case 9:case 11:o=(o=a.documentElement)&&(o=o.namespaceURI)?y2(o):0;break;default:if(o=a.tagName,a=a.namespaceURI)a=y2(a),o=b2(a,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}K(D),B(D,o)}function xe(){K(D),K(z),K(X)}function Ue(o){o.memoizedState!==null&&B(fe,o);var a=D.current,u=b2(a,o.type);a!==u&&(B(z,o),B(D,u))}function Y(o){z.current===o&&(K(D),K(z)),fe.current===o&&(K(fe),$u._currentValue=ee)}var te,ve;function se(o){if(te===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",ve=-1<u.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+te+o+ve}var we=!1;function Oe(o,a){if(!o||we)return"";we=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(ge){var he=ge}Reflect.construct(o,[],Se)}else{try{Se.call()}catch(ge){he=ge}o.call(Se.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Se=o())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=h.DetermineComponentFrameRoot(),N=w[0],$=w[1];if(N&&$){var J=N.split(`
@@ -168,4 +168,4 @@ ${r}
168
168
  ${r}
169
169
  }`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
170
170
 
171
- `),document.head.appendChild(r)}}function Wse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:qM.publicConfig(),queryFn:Zse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=BM(r),[s]=Gse();i.internalUrl&&$se(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Yse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const Qse=new _8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function Xse(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(dH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(LD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(y8,{client:Qse,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Wse,{children:T.jsx(k8,{children:T.jsx(Uee,{children:T.jsx(Zne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function Jse(...e){return zP(hw(e))}const eae=v4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function Y1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?$w:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=Jse(eae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const OM="__mesh_chunk_reload_ts";function TM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class Xle extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),PD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class tae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=TM(t);if(PD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(OM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(OM,String(s)),window.location.reload())}render(){return this.state.hasError&&TM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(DD,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(Y1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const nae="MCP Workflows",rae="Create workflows using your MCP tools",iae=I.lazy(()=>Lt(()=>import("./plugin-header-BXYsY1_p.js"),__vite__mapDeps([0,1]))),oae=I.lazy(()=>Lt(()=>import("./plugin-empty-state-CQeGBgOP.js"),[])),sae={id:nae,description:rae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(iae,{...e}),renderEmptyState:()=>T.jsx(oae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(ND,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},aae=[sae],ma=Jj({component:()=>T.jsx(tae,{children:T.jsx(Xse,{children:T.jsx(I.Suspense,{fallback:T.jsx(LD,{}),children:T.jsx(hP,{})})})})}),lae=xt({getParentRoute:()=>ma,path:"/login",component:Ut(()=>Lt(()=>import("./login-DDMVtz0x.js"),__vite__mapDeps([2,3]))),validateSearch:Zc(()=>Ee({next:F().optional(),client_id:F().optional(),redirect_uri:F().optional(),response_type:F().optional(),state:F().optional(),scope:F().optional(),code_challenge:F().optional(),code_challenge_method:F().optional()}))}),cae=xt({getParentRoute:()=>ma,path:"/reset-password",component:Ut(()=>Lt(()=>import("./reset-password-BV1UW9SB.js"),__vite__mapDeps([4,3]))),validateSearch:Zc(()=>Ee({token:F().optional(),error:F().optional()}))}),uae=xt({getParentRoute:()=>ma,path:"/auth/$pathname",component:Ut(()=>Lt(()=>import("./auth-catchall-I0vdEcHs.js"),[]))}),dae=xt({getParentRoute:()=>ma,path:"/oauth/callback",component:Ut(()=>Lt(()=>import("./oauth-callback-BV7Kg1aN.js"),[]))}),fae=xt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:Ut(()=>Lt(()=>import("./oauth-callback-ai-provider-DjkxS6zo.js"),[]))}),rE=xt({getParentRoute:()=>ma,id:"shell",component:Ut(()=>Lt(()=>import("./shell-layout-CDe1Q4z8.js").then(e=>e.s),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14])))}),hae=xt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Xa({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Xa(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),pae=xt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Xa({to:"/"})},component:Ut(()=>Lt(()=>import("./onboarding-DmzJa5qN.js"),__vite__mapDeps([15,8,3,16,17,18,19])))}),iE=xt({getParentRoute:()=>rE,path:"/$org",component:Ut(()=>Lt(()=>import("./org-layout-D05CVA_8.js"),[]))}),av=xt({getParentRoute:()=>iE,id:"agent-shell",component:Ut(()=>Lt(()=>import("./index-CN1oVHjb.js"),__vite__mapDeps([20,21,11,22,10,23,24,25,9,12,26,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,5,8,13,55,56,57,58,59,16,3,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103])))}),mae=Ee({virtualmcpid:F().optional(),tab:F().optional(),main:F().optional(),id:F().optional(),toolName:F().optional(),tasks:wt().optional(),mainOpen:wt().optional(),chat:wt().optional()}),xL=xt({getParentRoute:()=>av,path:"/$taskId",validateSearch:mae,component:()=>null}),gae=xt({getParentRoute:()=>av,path:"/",beforeLoad:({params:e})=>{const t=crypto.randomUUID();throw Xa({to:"/$org/$taskId",params:{org:e.org,taskId:t}})},component:()=>null}),Bn=xt({getParentRoute:()=>iE,path:"/settings",component:Ut(()=>Lt(()=>import("./settings-layout-BBdiRp4e.js"),__vite__mapDeps([104,38,39,7,31,33,17,34,14,47,48,97,74,24,25])))}),vae=xt({getParentRoute:()=>Bn,path:"/",beforeLoad:({params:e})=>{throw Xa({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),_ae=xt({getParentRoute:()=>Bn,path:"/connections",component:Ut(()=>Lt(()=>import("./connections-aYS5E8PJ.js"),__vite__mapDeps([105,81,82,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,102,83,76,75,77,73,10,11,12,78,79,80,66,55,95,107,69,87,108,109,63,6,56,59,16,3,50,85,22,86]))),validateSearch:Zc(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),yae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug",component:Ut(()=>Lt(()=>import("./connection-detail-Dj-OLW3C.js"),__vite__mapDeps([110,81,82,95,86,3,43,45,111,11,92,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,44,46,47,48,73,10,112,113,80,77,12,50,89,94,22,93,91,98,84,54,114,68,58,55,59,16,107,69,115,116,75,57,66,60]))),validateSearch:Zc(()=>Ee({tab:F().optional()}))}),bae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug/$collectionName/$itemId",component:Ut(()=>Lt(()=>import("./collection-detail-Bm3mvhEG.js"),__vite__mapDeps([117,95,10,11,59,16,3,85,115,38,39,7,118,112,82,113,22,119,49,50,1,35,72,27,28,29,30,31,32,33,17,18,34,36,37,19,40,14,41,42,43,44,45,46,47,48,84,99,73,92,6,60,55,96,120,25,54,111,80,81,77,12,89,94,93,91,75,98,53,21,23,24,9,5,8,13]))),validateSearch:Zc(()=>Ee({replayId:F().optional()}))}),wae=xt({getParentRoute:()=>Bn,path:"/monitor",component:Ut(()=>Lt(()=>import("./index-DRjT3wqk.js"),__vite__mapDeps([121,102,30,38,39,7,95,84,94,1,32,42,27,28,29,31,33,17,18,34,35,36,37,19,40,14,41,43,44,45,46,47,48,119,49,50,114,73,10,11,22,3,63,88,79,89,85,83,67,16,55,68,66,116,113,92,75,122,87,78,26,51,52,6,53,54,21,23,24,25,9,12,5,8,13]))),validateSearch:Zc(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:F().default("now-30m"),to:F().default("now"),connectionId:Ie(F()).optional().default([]),virtualMcpId:Ie(F()).optional().default([]),tool:F().default(""),status:dn(["all","success","errors"]).default("all"),search:F().default(""),page:wt().optional(),streaming:It().default(!0),propertyFilters:F().default(""),hideSystem:It().default(!1)}))}),Sae=xt({getParentRoute:()=>Bn,path:"/general",component:Ut(()=>Lt(()=>import("./general-0YlUSUig.js"),__vite__mapDeps([123,38,39,7,66,3,16,46,71,11,67])))}),Eae=xt({getParentRoute:()=>Bn,path:"/features",component:Ut(()=>Lt(()=>import("./features-DCfAHIGS.js"),__vite__mapDeps([124,38,39,7,12,11,67,36])))}),xae=xt({getParentRoute:()=>Bn,path:"/brand-context",component:Ut(()=>Lt(()=>import("./brand-context-Bn_7uvJT.js"),__vite__mapDeps([125,11,1,34,37,40,43,45,7,48,3,85,38,39,71])))}),Rae=xt({getParentRoute:()=>Bn,path:"/ai-providers",component:Ut(()=>Lt(()=>import("./ai-providers-Bykzb-xW.js"),__vite__mapDeps([126,62,63,1,3,6,7,56,39,50,35,64,29,30,44,23,11,21,22,10,24,25,9,12,65,48,28,18,45,38,66,67,61,68,47,69,70,52,71])))}),Oae=xt({getParentRoute:()=>Bn,path:"/members",component:Ut(()=>Lt(()=>import("./members-BH6aFn0i.js"),__vite__mapDeps([127,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,102,128,122,65,55,87,63,88,79,89,11,57,114,73,10,23,68,69,6,3,67,95,59,16,50,85,66,94])))}),Tae=xt({getParentRoute:()=>Bn,path:"/sso",component:Ut(()=>Lt(()=>import("./sso-CChrq6HN.js"),__vite__mapDeps([129,38,39,7,3,16,67,13,28,18,45])))}),Cae=xt({getParentRoute:()=>Bn,path:"/profile",component:Ut(()=>Lt(()=>import("./profile-BSS2RbEG.js"),__vite__mapDeps([130,38,39,7,68,47,66,67,50,1,35,61,3,16,41,42,74,96])))}),Aae=xt({getParentRoute:()=>Bn,path:"/store",component:Ut(()=>Lt(()=>import("./store-Dk4svl-0.js"),__vite__mapDeps([131,28,34,43,45,66,3,67,64,68,47,94,73,10,11,38,39,7,77,12])))}),Iae=xt({getParentRoute:()=>Bn,path:"/registry",component:Ut(()=>Lt(()=>import("./registry-B_QfL3wE.js"),[]))}),Mae=xt({getParentRoute:()=>Bn,path:"/store/registry",component:Ut(()=>Lt(()=>import("./store-registry-DNqLsJlQ.js"),[]))}),Pae=xt({getParentRoute:()=>Bn,path:"/workflows",component:Ut(()=>Lt(()=>import("./workflow-DXb2lFI1.js"),__vite__mapDeps([132,11,81,82,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,57,66,55,128,122,120,100,68,95,108,109,75,69,10,73,115])))}),Nae=xt({getParentRoute:()=>Bn,path:"/workflows/$itemId",component:Ut(()=>Lt(()=>import("./workflow-detail-CC_ctEsy.js"),__vite__mapDeps([133,118,112,11,82,113,22,10,119,49,50,39,1,35,72,27,28,29,30,31,32,33,17,18,34,36,37,19,38,7,40,14,41,42,43,44,45,46,47,48,84,99,115,73,92,6,60,55,96,120,25,3])))}),kae=xt({getParentRoute:()=>av,path:"/plugins/$pluginId",component:Ut(()=>Lt(()=>import("./org-plugin-layout-Cv_313Tb.js"),__vite__mapDeps([134,135,73,10,11,44,38,39,7])))}),Dae=xt({getParentRoute:()=>Bn,path:"/agents",component:Ut(()=>Lt(()=>import("./agents-list-kGMjebHK.js"),__vite__mapDeps([136,60,1,34,32,17,90,11,91,22,10,6,7,30,57,56,39,55,36,27,28,29,31,33,18,35,37,19,38,40,14,41,42,43,44,45,46,47,48,73,92,80,81,82,66,70,52,95,93,69,102])))}),Lae=xt({getParentRoute:()=>Bn,path:"/automations",component:Ut(()=>Lt(()=>import("./automations-Z179s9qX.js"),__vite__mapDeps([137,43,48,102,30,38,39,7,95,101,69,60,1,34,32,27,28,29,31,33,17,18,35,36,37,19,40,14,41,42,44,45,46,47,22,10,11,91])))}),RL=xt({getParentRoute:()=>xL,path:"/$pluginId",component:Ut(()=>Lt(()=>import("./dynamic-plugin-layout-pzG9mWCw.js"),__vite__mapDeps([138,135,73,10,11,44,38,39,7])))}),$ae=[],jae=[],Uae=[],OL=[];aae.forEach(e=>{if(!e.setup)return;const t={parentRoute:RL,routing:{createRoute:xt,lazyRouteComponent:Ut},registerRootSidebarItem:n=>$ae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>jae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Uae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{OL.push(...n)}};e.setup(t)});const zae=RL.addChildren(OL),Fae=Bn.addChildren([vae,_ae,yae,bae,Dae,Lae,wae,Sae,Eae,xae,Rae,Oae,Tae,Cae,Aae,Mae,Iae,Pae,Nae]),Vae=xL.addChildren([zae]),Bae=av.addChildren([gae,Vae,kae]),qae=iE.addChildren([Bae,Fae]),Hae=rE.addChildren([hae,qae]),Gae=ma.addChildren([Hae,pae,lae,cae,uae,dae,fae]),Kae=l7({routeTree:Gae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Zae=document.getElementById("root");Y$.createRoot(Zae).render(T.jsx(I.StrictMode,{children:T.jsx(d7,{router:Kae})}));export{wle as $,Ole as A,Y1 as B,Gse as C,PS as D,Xle as E,uC as F,nY as G,ro as H,Gd as I,Ig as J,qM as K,Yw as L,Lc as M,ile as N,hP as O,aa as P,fs as Q,W1 as R,LD as S,io as T,J4 as U,BM as V,iY as W,aY as X,oY as Y,GZ as Z,dn as _,P8 as a,It as a$,Wle as a0,Zle as a1,Bse as a2,Rg as a3,Yr as a4,$ae as a5,jae as a6,nae as a7,ND as a8,HM as a9,ele as aA,Kle as aB,JH as aC,wt as aD,DD as aE,Lt as aF,kJ as aG,Uae as aH,Wae as aI,jt as aJ,Xt as aK,Ie as aL,QH as aM,Gle as aN,Hle as aO,qS as aP,vg as aQ,NY as aR,S3 as aS,W4 as aT,af as aU,ta as aV,PY as aW,ds as aX,v4 as aY,$w as aZ,Wr as a_,tle as aa,xo as ab,XJ as ac,ht as ad,ne as ae,no as af,aW as ag,lW as ah,yn as ai,lt as aj,cW as ak,uW as al,hW as am,_W as an,C3 as ao,dl as ap,dW as aq,fW as ar,pW as as,mW as at,gW as au,vW as av,yW as aw,wW as ax,SW as ay,dw as az,Mg as b,XK as b$,Ye as b0,EB as b1,zP as b2,hw as b3,Ek as b4,Rk as b5,KW as b6,Wn as b7,yQ as b8,c3 as b9,Sre as bA,Nre as bB,Gre as bC,Yre as bD,_re as bE,bre as bF,Ere as bG,xre as bH,kre as bI,Vre as bJ,jle as bK,aae as bL,fB as bM,ole as bN,ule as bO,pq as bP,Zc as bQ,FN as bR,qN as bS,ale as bT,Qle as bU,tG as bV,eG as bW,l4 as bX,VM as bY,T8 as bZ,hf as b_,Y4 as ba,eae as bb,la as bc,Yae as bd,nZ as be,Ile as bf,lP as bg,ca as bh,as as bi,Mle as bj,rn as bk,sle as bl,VN as bm,jre as bn,Ure as bo,VS as bp,sL as bq,BS as br,nv as bs,qD as bt,Jre as bu,GD as bv,Zre as bw,aie as bx,vre as by,yre as bz,Jse as c,zle as c$,eZ as c0,tZ as c1,sf as c2,b3 as c3,yY as c4,zw as c5,d3 as c6,P4 as c7,Fw as c8,Hd as c9,Xie as cA,pt as cB,Boe as cC,WW as cD,uP as cE,to as cF,xle as cG,rZ as cH,iZ as cI,oZ as cJ,JK as cK,zz as cL,BD as cM,KD as cN,WD as cO,XD as cP,JD as cQ,tL as cR,Lle as cS,$le as cT,kle as cU,Dle as cV,Qne as cW,Nle as cX,ZD as cY,QD as cZ,eL as c_,E4 as ca,Uw as cb,jw as cc,bY as cd,wY as ce,rQ as cf,iQ as cg,nQ as ch,Or as ci,rle as cj,YH as ck,KH as cl,BH as cm,e4 as cn,BB as co,ww as cp,wB as cq,lle as cr,GB as cs,Ew as ct,Sw as cu,WB as cv,cle as cw,Ble as cx,gse as cy,qle as cz,uw as d,YD as d0,Vle as d1,NS as d2,ure as d3,Ple as d4,VD as d5,Nie as d6,Fre as d7,Fle as d8,Rie as d9,Cie as da,cie as db,lie as dc,Ule as dd,dle as de,zW as df,FW as dg,qW as dh,VW as di,BW as dj,ple as dk,mle as dl,yle as dm,ble as dn,Sle as dp,_le as dq,vle as dr,gle as ds,hle as dt,fle as du,$M as dv,vO as dw,Xae as dx,Qae as dy,Ro as e,nf as f,cw as g,Tle as h,Rle as i,T as j,Cle as k,kD as l,Yle as m,M8 as n,tw as o,IM as p,Zn as q,I as r,Wne as s,Ale as t,nle as u,Ee as v,To as w,Oo as x,F as y,ET as z};
171
+ `),document.head.appendChild(r)}}function Wse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:qM.publicConfig(),queryFn:Zse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=BM(r),[s]=Gse();i.internalUrl&&$se(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Yse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const Qse=new _8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function Xse(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(dH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(LD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(y8,{client:Qse,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Wse,{children:T.jsx(k8,{children:T.jsx(Uee,{children:T.jsx(Zne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function Jse(...e){return zP(hw(e))}const eae=v4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function Y1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?$w:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=Jse(eae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const OM="__mesh_chunk_reload_ts";function TM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class Xle extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),PD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class tae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=TM(t);if(PD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(OM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(OM,String(s)),window.location.reload())}render(){return this.state.hasError&&TM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(DD,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(Y1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const nae="MCP Workflows",rae="Create workflows using your MCP tools",iae=I.lazy(()=>Lt(()=>import("./plugin-header-BYiR1ua4.js"),__vite__mapDeps([0,1]))),oae=I.lazy(()=>Lt(()=>import("./plugin-empty-state-0LwQ6R3R.js"),[])),sae={id:nae,description:rae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(iae,{...e}),renderEmptyState:()=>T.jsx(oae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(ND,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},aae=[sae],ma=Jj({component:()=>T.jsx(tae,{children:T.jsx(Xse,{children:T.jsx(I.Suspense,{fallback:T.jsx(LD,{}),children:T.jsx(hP,{})})})})}),lae=xt({getParentRoute:()=>ma,path:"/login",component:Ut(()=>Lt(()=>import("./login-vu3mdB5z.js"),__vite__mapDeps([2,3]))),validateSearch:Zc(()=>Ee({next:F().optional(),client_id:F().optional(),redirect_uri:F().optional(),response_type:F().optional(),state:F().optional(),scope:F().optional(),code_challenge:F().optional(),code_challenge_method:F().optional()}))}),cae=xt({getParentRoute:()=>ma,path:"/reset-password",component:Ut(()=>Lt(()=>import("./reset-password-nmqGdy62.js"),__vite__mapDeps([4,3]))),validateSearch:Zc(()=>Ee({token:F().optional(),error:F().optional()}))}),uae=xt({getParentRoute:()=>ma,path:"/auth/$pathname",component:Ut(()=>Lt(()=>import("./auth-catchall-DOZwh2ME.js"),[]))}),dae=xt({getParentRoute:()=>ma,path:"/oauth/callback",component:Ut(()=>Lt(()=>import("./oauth-callback-DXN54EUy.js"),[]))}),fae=xt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:Ut(()=>Lt(()=>import("./oauth-callback-ai-provider-W7GdFBbP.js"),[]))}),rE=xt({getParentRoute:()=>ma,id:"shell",component:Ut(()=>Lt(()=>import("./shell-layout-Bx85tvr4.js").then(e=>e.s),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14])))}),hae=xt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Xa({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Xa(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),pae=xt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Xa({to:"/"})},component:Ut(()=>Lt(()=>import("./onboarding-BeW6omQ6.js"),__vite__mapDeps([15,8,3,16,17,18,19])))}),iE=xt({getParentRoute:()=>rE,path:"/$org",component:Ut(()=>Lt(()=>import("./org-layout-Cp3RupKt.js"),[]))}),av=xt({getParentRoute:()=>iE,id:"agent-shell",component:Ut(()=>Lt(()=>import("./index-C7Syt5sm.js"),__vite__mapDeps([20,21,11,22,10,23,24,25,9,12,26,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,5,8,13,55,56,57,58,59,16,3,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103])))}),mae=Ee({virtualmcpid:F().optional(),tab:F().optional(),main:F().optional(),id:F().optional(),toolName:F().optional(),tasks:wt().optional(),mainOpen:wt().optional(),chat:wt().optional()}),xL=xt({getParentRoute:()=>av,path:"/$taskId",validateSearch:mae,component:()=>null}),gae=xt({getParentRoute:()=>av,path:"/",beforeLoad:({params:e})=>{const t=crypto.randomUUID();throw Xa({to:"/$org/$taskId",params:{org:e.org,taskId:t}})},component:()=>null}),Bn=xt({getParentRoute:()=>iE,path:"/settings",component:Ut(()=>Lt(()=>import("./settings-layout-C6WZX8H8.js"),__vite__mapDeps([104,38,39,7,31,33,17,34,14,47,48,97,74,24,25])))}),vae=xt({getParentRoute:()=>Bn,path:"/",beforeLoad:({params:e})=>{throw Xa({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),_ae=xt({getParentRoute:()=>Bn,path:"/connections",component:Ut(()=>Lt(()=>import("./connections-Di7YhHpL.js"),__vite__mapDeps([105,81,82,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,102,83,76,75,77,73,10,11,12,78,79,80,66,55,95,107,69,87,108,109,63,6,56,59,16,3,50,85,22,86]))),validateSearch:Zc(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),yae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug",component:Ut(()=>Lt(()=>import("./connection-detail-B_MywG2r.js"),__vite__mapDeps([110,81,82,95,86,3,43,45,111,11,92,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,44,46,47,48,73,10,112,113,80,77,12,50,89,94,22,93,91,98,84,54,114,68,58,55,59,16,107,69,115,116,75,57,66,60]))),validateSearch:Zc(()=>Ee({tab:F().optional()}))}),bae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug/$collectionName/$itemId",component:Ut(()=>Lt(()=>import("./collection-detail-x76KaTbs.js"),__vite__mapDeps([117,95,10,11,59,16,3,85,115,38,39,7,118,112,82,113,22,119,49,50,1,35,72,27,28,29,30,31,32,33,17,18,34,36,37,19,40,14,41,42,43,44,45,46,47,48,84,99,73,92,6,60,55,96,120,25,54,111,80,81,77,12,89,94,93,91,75,98,53,21,23,24,9,5,8,13]))),validateSearch:Zc(()=>Ee({replayId:F().optional()}))}),wae=xt({getParentRoute:()=>Bn,path:"/monitor",component:Ut(()=>Lt(()=>import("./index-CMJ6GQ7C.js"),__vite__mapDeps([121,102,30,38,39,7,95,84,94,1,32,42,27,28,29,31,33,17,18,34,35,36,37,19,40,14,41,43,44,45,46,47,48,119,49,50,114,73,10,11,22,3,63,88,79,89,85,83,67,16,55,68,66,116,113,92,75,122,87,78,26,51,52,6,53,54,21,23,24,25,9,12,5,8,13]))),validateSearch:Zc(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:F().default("now-30m"),to:F().default("now"),connectionId:Ie(F()).optional().default([]),virtualMcpId:Ie(F()).optional().default([]),tool:F().default(""),status:dn(["all","success","errors"]).default("all"),search:F().default(""),page:wt().optional(),streaming:It().default(!0),propertyFilters:F().default(""),hideSystem:It().default(!1)}))}),Sae=xt({getParentRoute:()=>Bn,path:"/general",component:Ut(()=>Lt(()=>import("./general-CPi9v1zL.js"),__vite__mapDeps([123,38,39,7,66,3,16,46,71,11,67])))}),Eae=xt({getParentRoute:()=>Bn,path:"/features",component:Ut(()=>Lt(()=>import("./features-DkrqQmvn.js"),__vite__mapDeps([124,38,39,7,12,11,67,36])))}),xae=xt({getParentRoute:()=>Bn,path:"/brand-context",component:Ut(()=>Lt(()=>import("./brand-context-zVTleDgN.js"),__vite__mapDeps([125,11,1,34,37,40,43,45,7,48,3,85,38,39,71])))}),Rae=xt({getParentRoute:()=>Bn,path:"/ai-providers",component:Ut(()=>Lt(()=>import("./ai-providers-Cq8P81dq.js"),__vite__mapDeps([126,62,63,1,3,6,7,56,39,50,35,64,29,30,44,23,11,21,22,10,24,25,9,12,65,48,28,18,45,38,66,67,61,68,47,69,70,52,71])))}),Oae=xt({getParentRoute:()=>Bn,path:"/members",component:Ut(()=>Lt(()=>import("./members-DtGUx-F1.js"),__vite__mapDeps([127,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,102,128,122,65,55,87,63,88,79,89,11,57,114,73,10,23,68,69,6,3,67,95,59,16,50,85,66,94])))}),Tae=xt({getParentRoute:()=>Bn,path:"/sso",component:Ut(()=>Lt(()=>import("./sso-Du9xnoxY.js"),__vite__mapDeps([129,38,39,7,3,16,67,13,28,18,45])))}),Cae=xt({getParentRoute:()=>Bn,path:"/profile",component:Ut(()=>Lt(()=>import("./profile-Bk0bLa4g.js"),__vite__mapDeps([130,38,39,7,68,47,66,67,50,1,35,61,3,16,41,42,74,96])))}),Aae=xt({getParentRoute:()=>Bn,path:"/store",component:Ut(()=>Lt(()=>import("./store-DFSqH5M5.js"),__vite__mapDeps([131,28,34,43,45,66,3,67,64,68,47,94,73,10,11,38,39,7,77,12])))}),Iae=xt({getParentRoute:()=>Bn,path:"/registry",component:Ut(()=>Lt(()=>import("./registry-CorCxIMC.js"),[]))}),Mae=xt({getParentRoute:()=>Bn,path:"/store/registry",component:Ut(()=>Lt(()=>import("./store-registry-ysGrUhGY.js"),[]))}),Pae=xt({getParentRoute:()=>Bn,path:"/workflows",component:Ut(()=>Lt(()=>import("./workflow-CD3p-F8j.js"),__vite__mapDeps([132,11,81,82,106,60,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,99,84,57,66,55,128,122,120,100,68,95,108,109,75,69,10,73,115])))}),Nae=xt({getParentRoute:()=>Bn,path:"/workflows/$itemId",component:Ut(()=>Lt(()=>import("./workflow-detail-DH47DpCR.js"),__vite__mapDeps([133,118,112,11,82,113,22,10,119,49,50,39,1,35,72,27,28,29,30,31,32,33,17,18,34,36,37,19,38,7,40,14,41,42,43,44,45,46,47,48,84,99,115,73,92,6,60,55,96,120,25,3])))}),kae=xt({getParentRoute:()=>av,path:"/plugins/$pluginId",component:Ut(()=>Lt(()=>import("./org-plugin-layout-Bnfoicc4.js"),__vite__mapDeps([134,135,73,10,11,44,38,39,7])))}),Dae=xt({getParentRoute:()=>Bn,path:"/agents",component:Ut(()=>Lt(()=>import("./agents-list-st6j9oA0.js"),__vite__mapDeps([136,60,1,34,32,17,90,11,91,22,10,6,7,30,57,56,39,55,36,27,28,29,31,33,18,35,37,19,38,40,14,41,42,43,44,45,46,47,48,73,92,80,81,82,66,70,52,95,93,69,102])))}),Lae=xt({getParentRoute:()=>Bn,path:"/automations",component:Ut(()=>Lt(()=>import("./automations-_4yX33cm.js"),__vite__mapDeps([137,43,48,102,30,38,39,7,95,101,69,60,1,34,32,27,28,29,31,33,17,18,35,36,37,19,40,14,41,42,44,45,46,47,22,10,11,91])))}),RL=xt({getParentRoute:()=>xL,path:"/$pluginId",component:Ut(()=>Lt(()=>import("./dynamic-plugin-layout-PtppgAts.js"),__vite__mapDeps([138,135,73,10,11,44,38,39,7])))}),$ae=[],jae=[],Uae=[],OL=[];aae.forEach(e=>{if(!e.setup)return;const t={parentRoute:RL,routing:{createRoute:xt,lazyRouteComponent:Ut},registerRootSidebarItem:n=>$ae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>jae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Uae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{OL.push(...n)}};e.setup(t)});const zae=RL.addChildren(OL),Fae=Bn.addChildren([vae,_ae,yae,bae,Dae,Lae,wae,Sae,Eae,xae,Rae,Oae,Tae,Cae,Aae,Mae,Iae,Pae,Nae]),Vae=xL.addChildren([zae]),Bae=av.addChildren([gae,Vae,kae]),qae=iE.addChildren([Bae,Fae]),Hae=rE.addChildren([hae,qae]),Gae=ma.addChildren([Hae,pae,lae,cae,uae,dae,fae]),Kae=l7({routeTree:Gae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Zae=document.getElementById("root");Y$.createRoot(Zae).render(T.jsx(I.StrictMode,{children:T.jsx(d7,{router:Kae})}));export{wle as $,Ole as A,Y1 as B,Gse as C,PS as D,Xle as E,uC as F,nY as G,ro as H,Gd as I,Ig as J,qM as K,Yw as L,Lc as M,ile as N,hP as O,aa as P,fs as Q,W1 as R,LD as S,io as T,J4 as U,BM as V,iY as W,aY as X,oY as Y,GZ as Z,dn as _,P8 as a,It as a$,Wle as a0,Zle as a1,Bse as a2,Rg as a3,Yr as a4,$ae as a5,jae as a6,nae as a7,ND as a8,HM as a9,ele as aA,Kle as aB,JH as aC,wt as aD,DD as aE,Lt as aF,kJ as aG,Uae as aH,Wae as aI,jt as aJ,Xt as aK,Ie as aL,QH as aM,Gle as aN,Hle as aO,qS as aP,vg as aQ,NY as aR,S3 as aS,W4 as aT,af as aU,ta as aV,PY as aW,ds as aX,v4 as aY,$w as aZ,Wr as a_,tle as aa,xo as ab,XJ as ac,ht as ad,ne as ae,no as af,aW as ag,lW as ah,yn as ai,lt as aj,cW as ak,uW as al,hW as am,_W as an,C3 as ao,dl as ap,dW as aq,fW as ar,pW as as,mW as at,gW as au,vW as av,yW as aw,wW as ax,SW as ay,dw as az,Mg as b,XK as b$,Ye as b0,EB as b1,zP as b2,hw as b3,Ek as b4,Rk as b5,KW as b6,Wn as b7,yQ as b8,c3 as b9,Sre as bA,Nre as bB,Gre as bC,Yre as bD,_re as bE,bre as bF,Ere as bG,xre as bH,kre as bI,Vre as bJ,jle as bK,aae as bL,fB as bM,ole as bN,ule as bO,pq as bP,Zc as bQ,FN as bR,qN as bS,ale as bT,Qle as bU,tG as bV,eG as bW,l4 as bX,VM as bY,T8 as bZ,hf as b_,Y4 as ba,eae as bb,la as bc,Yae as bd,nZ as be,Ile as bf,lP as bg,ca as bh,as as bi,Mle as bj,rn as bk,sle as bl,VN as bm,jre as bn,Ure as bo,VS as bp,sL as bq,BS as br,nv as bs,qD as bt,Jre as bu,GD as bv,Zre as bw,aie as bx,vre as by,yre as bz,Jse as c,zle as c$,eZ as c0,tZ as c1,sf as c2,b3 as c3,yY as c4,zw as c5,d3 as c6,P4 as c7,Fw as c8,Hd as c9,Xie as cA,pt as cB,Boe as cC,WW as cD,uP as cE,to as cF,xle as cG,rZ as cH,iZ as cI,oZ as cJ,JK as cK,zz as cL,BD as cM,KD as cN,WD as cO,XD as cP,JD as cQ,tL as cR,Lle as cS,$le as cT,kle as cU,Dle as cV,Qne as cW,Nle as cX,ZD as cY,QD as cZ,eL as c_,E4 as ca,Uw as cb,jw as cc,bY as cd,wY as ce,rQ as cf,iQ as cg,nQ as ch,Or as ci,rle as cj,YH as ck,KH as cl,BH as cm,e4 as cn,BB as co,ww as cp,wB as cq,lle as cr,GB as cs,Ew as ct,Sw as cu,WB as cv,cle as cw,Ble as cx,gse as cy,qle as cz,uw as d,YD as d0,Vle as d1,NS as d2,ure as d3,Ple as d4,VD as d5,Nie as d6,Fre as d7,Fle as d8,Rie as d9,Cie as da,cie as db,lie as dc,Ule as dd,dle as de,zW as df,FW as dg,qW as dh,VW as di,BW as dj,ple as dk,mle as dl,yle as dm,ble as dn,Sle as dp,_le as dq,vle as dr,gle as ds,hle as dt,fle as du,$M as dv,vO as dw,Xae as dx,Qae as dy,Ro as e,nf as f,cw as g,Tle as h,Rle as i,T as j,Cle as k,kD as l,Yle as m,M8 as n,tw as o,IM as p,Zn as q,I as r,Wne as s,Ale as t,nle as u,Ee as v,To as w,Oo as x,F as y,ET as z};
@@ -1 +1 @@
1
- import{bc as _}from"./index-EE9r4ne7.js";var S={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"),b;b=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===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
1
+ import{bc as _}from"./index-D0eg_rFC.js";var S={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"),b;b=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===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
@@ -1 +1 @@
1
- import{r as h}from"./index-EE9r4ne7.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
1
+ import{r as h}from"./index-D0eg_rFC.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
@@ -1 +1 @@
1
- import{dv as d,dw as f,dx as v,dy as x}from"./index-EE9r4ne7.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:x(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};export{N as I};
1
+ import{dv as d,dw as f,dx as v,dy as x}from"./index-D0eg_rFC.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:x(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};export{N as I};
@@ -1 +1 @@
1
- import{e as s,c as a,j as d}from"./index-EE9r4ne7.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
1
+ import{e as s,c as a,j as d}from"./index-D0eg_rFC.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
@@ -1 +1 @@
1
- import{e as A,j as h,r as z,c as _}from"./index-EE9r4ne7.js";import{n as L}from"./Container-ChD3KoS4.js";import{A as k}from"./agent-icon-31CiXnkF.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
1
+ import{e as A,j as h,r as z,c as _}from"./index-D0eg_rFC.js";import{n as L}from"./Container-BH-IjM7q.js";import{A as k}from"./agent-icon-BCqNXHrJ.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
@@ -1 +1 @@
1
- import{e as n,c as r,j as i,b6 as p}from"./index-EE9r4ne7.js";function c(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
1
+ import{e as n,c as r,j as i,b6 as p}from"./index-D0eg_rFC.js";function c(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
@@ -1 +1 @@
1
- import{e as C,r as i,c as A,j as a,J as V}from"./index-EE9r4ne7.js";import{P as E}from"./index-BRiQU6du.js";const H=i.createContext(null);function q(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const z=D;function B(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{B as V,z as a,q as b};
1
+ import{e as C,r as i,c as A,j as a,J as V}from"./index-D0eg_rFC.js";import{P as E}from"./index-CESHAiFx.js";const H=i.createContext(null);function q(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const z=D;function B(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{B as V,z as a,q as b};
@@ -1,4 +1,4 @@
1
- import{e as L,s as G,o as je,b as $e,r as v,K as Z,n as ze,a as He,j as t,c as me,B as ee,t as U,z as fe,a0 as We,a1 as Je,aA as be,C as Xe,l as ge,V as Ze,f as et}from"./index-EE9r4ne7.js";import{S as ne,u as P,d as ve,W as Be,j as Te}from"./constants-CdNdiXMf.js";import{u as pe}from"./use-navigate-to-agent-C0iuNKaP.js";import{c as se,d as ie,a as oe,D as ae,b as tt}from"./dialog-C0FUDu40.js";import{i as Ee}from"./SearchMd-DJ0JdIz3.js";import{C as Fe}from"./collection-search-C0B93tJw.js";import{c as we,b as Se,D as Oe,a as Ae}from"./drawer-D4_wXu6X.js";import{u as Le}from"./use-mobile-DP4MR1ix.js";import{I as Re}from"./integration-icon-BKKqOsd5.js";import{a as Me,u as nt}from"./use-connection-CeSGdaGP.js";import{u as st,d as qe}from"./use-mcp-tools-BKQPDk4x.js";import{b as Ue,u as it}from"./use-virtual-mcp-Dn9ixQmR.js";import{i as ot}from"./Lock01-CmojMPTn.js";import{I as at}from"./agent-icon-31CiXnkF.js";import{e as rt}from"./extract-connection-data-CAAXAkZY.js";function ct(a){return a.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function lt(){const a=await fetch("/api/deco-sites");if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${a.status})`)}return a.json()}function Qt(a){const e=L.c(65),{open:n,onOpenChange:o,onBack:d}=a,{org:s}=G(),m=pe(),u=je(),{data:r}=$e.useSession(),[c,f]=v.useState(null),[h,l]=v.useState("");let g;e[0]!==s.id?(g={connectionId:ne,orgId:s.id},e[0]=s.id,e[1]=g):g=e[1];const I=P(g);let p;e[2]!==r?.user?.email?(p=Z.decoSites(r?.user?.email),e[2]=r?.user?.email,e[3]=p):p=e[3];const i=n&&!!r?.user?.email;let N;e[4]!==p||e[5]!==i?(N={queryKey:p,queryFn:lt,enabled:i,staleTime:6e4,retry:!1},e[4]=p,e[5]=i,e[6]=N):N=e[6];const{data:_,isLoading:x,error:y}=ze(N),C=_?.sites??[];let T;e[7]!==o?(T=b=>{b||(f(null),l("")),o(b)},e[7]=o,e[8]=T):T=e[8];const j=T;let S;e[9]!==h?(S=b=>b.name.toLowerCase().includes(h.toLowerCase())||b.domains?.[0]?.domain.toLowerCase().includes(h.toLowerCase()),e[9]=h,e[10]=S):S=e[10];const E=C.filter(S),w=!c||E.some(b=>b.name===c);let O;e[11]!==I||e[12]!==s.id?(O=async b=>{U("deco_site_import_started",{site_name:b});const R=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:b,orgId:s.id})}),M=await R.json().catch(mt);if(!R.ok)throw new Error(M.error??`Failed to create connection (${R.status})`);const A=M.connId;if(!A)throw new Error("Server did not return a connection ID");const ue=M.icon??null,X=ct(b),ke=await I.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:b,description:"Imported from deco.cx",pinned:!0,icon:ue??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:ue,themeColor:"#22C55E",slug:X,pinnedViews:[{connectionId:A,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:A,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:A,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:A,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:A,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:A,toolName:"file_explorer"}}}},connections:[{connection_id:A}]}}}),Pe=ke.structuredContent??ke;return{slug:X,virtualMcpId:Pe.item.id,connId:A,item:Pe.item}},e[11]=I,e[12]=s.id,e[13]=O):O=e[13];let D;e[14]!==I||e[15]!==j||e[16]!==m||e[17]!==s.id||e[18]!==u?(D=b=>{const{slug:R,virtualMcpId:M,item:A}=b;U("deco_site_import_succeeded",{site_name:A.title,virtual_mcp_id:M,slug:R}),u.setQueryData(Z.collectionItem(I,s.id,"","VIRTUAL_MCP",M),{item:A}),u.invalidateQueries({predicate:ue=>{const X=ue.queryKey;return X[1]===s.id&&X[3]==="collection"&&X[4]==="VIRTUAL_MCP"}}),u.invalidateQueries({queryKey:Z.projects(s.id)}),fe.success(`Imported ${R} from deco.cx`),j(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),m(M)},e[14]=I,e[15]=j,e[16]=m,e[17]=s.id,e[18]=u,e[19]=D):D=e[19];let re;e[20]!==O||e[21]!==D?(re={mutationFn:O,onSuccess:D,onError:ut},e[20]=O,e[21]=D,e[22]=re):re=e[22];const k=He(re),he=ie,xe=se,Ke="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let V;e[23]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(oe,{className:"sr-only",children:t.jsx(ae,{children:"Import from deco.cx"})}),e[23]=V):V=e[23];let $;e[24]!==d?($=d&&t.jsx("button",{type:"button",onClick:d,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ee,{size:18})}),e[24]=d,e[25]=$):$=e[25];let ce;e[26]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[26]=ce):ce=e[26];let z;e[27]!==$?(z=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[$,ce]}),e[27]=$,e[28]=z):z=e[28];let le;e[29]===Symbol.for("react.memo_cache_sentinel")?(le=b=>{b.key==="Escape"&&l("")},e[29]=le):le=e[29];let H;e[30]!==h?(H=t.jsx("div",{children:t.jsx(Fe,{value:h,onChange:l,placeholder:"Search sites...",onKeyDown:le})}),e[30]=h,e[31]=H):H=e[31];const Ye="pb-0 min-h-[300px]";let B;e[32]!==x?(B=x&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[32]=x,e[33]=B):B=e[33];const Ne=!x&&!y&&C.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),_e=!x&&C.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[E.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",h,"”"]}),E.map(b=>{const R=b.domains?.find(dt)?.domain??b.domains?.[0]?.domain,M=c===b.name;return t.jsxs("button",{type:"button",onClick:()=>f(b.name),className:me("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",M?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:b.thumb_url?t.jsx("img",{src:b.thumb_url,alt:b.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:b.name}),R&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:R})]})]},b.name)})]});let F;e[34]!==B||e[35]!==Ne||e[36]!==_e?(F=t.jsxs("div",{className:Ye,children:[B,Ne,_e]}),e[34]=B,e[35]=Ne,e[36]=_e,e[37]=F):F=e[37];let q;e[38]!==j?(q=()=>j(!1),e[38]=j,e[39]=q):q=e[39];let Q;e[40]!==k.isPending||e[41]!==q?(Q=t.jsx(ee,{variant:"outline",onClick:q,disabled:k.isPending,children:"Cancel"}),e[40]=k.isPending,e[41]=q,e[42]=Q):Q=e[42];const Ce=!c||!w||k.isPending||x;let K;e[43]!==k||e[44]!==c?(K=()=>c&&k.mutate(c),e[43]=k,e[44]=c,e[45]=K):K=e[45];const Ie=k.isPending?"Importing...":"Import";let Y;e[46]!==Ce||e[47]!==K||e[48]!==Ie?(Y=t.jsx(ee,{disabled:Ce,onClick:K,children:Ie}),e[46]=Ce,e[47]=K,e[48]=Ie,e[49]=Y):Y=e[49];let W;e[50]!==Q||e[51]!==Y?(W=t.jsxs(tt,{className:"px-8 py-5 border-t border-border",children:[Q,Y]}),e[50]=Q,e[51]=Y,e[52]=W):W=e[52];let J;e[53]!==xe||e[54]!==V||e[55]!==z||e[56]!==H||e[57]!==F||e[58]!==W?(J=t.jsxs(xe,{className:Ke,children:[V,z,H,F,W]}),e[53]=xe,e[54]=V,e[55]=z,e[56]=H,e[57]=F,e[58]=W,e[59]=J):J=e[59];let de;return e[60]!==he||e[61]!==j||e[62]!==n||e[63]!==J?(de=t.jsx(he,{open:n,onOpenChange:j,children:J}),e[60]=he,e[61]=j,e[62]=n,e[63]=J,e[64]=de):de=e[64],de}function dt(a){return a.production}function ut(a){U("deco_site_import_failed",{error:a instanceof Error?a.message:"Unknown error"}),fe.error("Import failed: "+(a instanceof Error?a.message:"Unknown error"))}function mt(){return{}}function Qe(a,e){const n=L.c(11),{org:o}=G();let d;n[0]!==o.id?(d=ve.REGISTRY(o.id),n[0]=o.id,n[1]=d):d=n[1];const s=d;let m;n[2]!==o.id||n[3]!==s?(m={connectionId:s,orgId:o.id},n[2]=o.id,n[3]=s,n[4]=m):m=n[4];const u=P(m);let r;n[5]!==a?(r={name:a},n[5]=a,n[6]=r):r=n[6];const c=e?.enabled??!0;let f;return n[7]!==u||n[8]!==r||n[9]!==c?(f={client:u,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:r,enabled:c,staleTime:3e5,select:ft},n[7]=u,n[8]=r,n[9]=c,n[10]=f):f=n[10],st(f)}function ft(a){return a.structuredContent?.item??null}const gt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function Ge(a){const e=L.c(7),{onRecruit:n,isRecruiting:o,isLoading:d}=a;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=s):s=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=m):m=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"space-y-2",children:[m,t.jsx("ul",{className:"space-y-1.5",children:gt.map(pt)})]}),e[2]=u):u=e[2];const r=o||d,c=o?"Setting up...":"Add Site Diagnostics";let f;return e[3]!==n||e[4]!==r||e[5]!==c?(f=t.jsxs("div",{className:"flex flex-col gap-6",children:[s,u,t.jsx(ee,{onClick:n,disabled:r,className:"w-full cursor-pointer",children:c})]}),e[3]=n,e[4]=r,e[5]=c,e[6]=f):f=e[6],f}function pt(a){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),a]},a)}function Kt({open:a,onOpenChange:e,existingAgent:n}){const o=Le(),{org:d}=G(),s=pe(),m=Me(),u=Ue(),r=P({connectionId:ne,orgId:d.id}),c=qe({client:r}),[f,h]=v.useState(!1),l=Be.find(C=>C.id==="site-diagnostics"),{data:g,isLoading:I}=Qe(l.appId,{enabled:a}),p=g?.title||g?.server?.title||g?.server?.name||l.title,i=g?.server?.icons?.[0]?.src??l.icon,N=g?.server?.description??null,_=t.jsx(Re,{icon:i,name:p,size:"sm"}),x=async()=>{if(g){if(n){e(!1),s(n.id);return}h(!0);try{const C=await c.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:l.appId},limit:1,offset:0}});let T;const S=C?.structuredContent?.items?.find(w=>w.app_id===l.appId);if(S)T=S.id;else{const w=g.server?.remotes?.[0]?.url;if(!w)throw new Error("Registry item is missing a remote URL for site-diagnostics");T=(await m.create.mutateAsync({title:p,description:N,icon:g.server?.icons?.[0]?.src??l.icon,connection_type:"HTTP",connection_url:w,app_name:g.server?.name??"site-diagnostics",app_id:l.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:l.appId,verified:!0}})).id}const E=await u.create.mutateAsync({title:p,description:N,icon:i,status:"active",connections:[{connection_id:T,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:T,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:T,toolName:"diagnose"}}}}});U("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:E.id}),e(!1),s(E.id)}catch(C){U("agent_recruit_failed",{template_id:"site-diagnostics",error:C instanceof Error?C.message:String(C)}),console.error("Failed to create Site Diagnostics agent:",C)}finally{h(!1)}}},y=`Add ${p}`;return o?t.jsx(we,{open:a,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(Ae,{className:"text-xl font-semibold",children:y})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ge,{onRecruit:x,isRecruiting:f,isLoading:I})})]})}):t.jsx(ie,{open:a,onOpenChange:e,children:t.jsxs(se,{className:"sm:max-w-[500px] p-8",children:[t.jsx(oe,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(ae,{className:"text-xl font-semibold",children:y})]})}),t.jsx(Ge,{onRecruit:x,isRecruiting:f,isLoading:I})]})})}function te(a){const e=L.c(4),{size:n,className:o}=a;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=d):d=e[0];let s;return e[1]!==o||e[2]!==n?(s=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:o,children:d}),e[1]=o,e[2]=n,e[3]=s):s=e[3],s}const ht="deco/mcp-github";function xt(a){const{org:e}=G(),{data:n}=$e.useSession(),o=Me(),d=je(),[s,m]=v.useState("idle"),[u,r]=v.useState(null),[c,f]=v.useState(null),{data:h,isLoading:l}=Qe(ht,{enabled:a.enabled}),g=v.useRef(!1);a.enabled&&h&&!l&&!g.current&&n?.user?.id&&s==="idle"&&(g.current=!0,I());async function I(){if(!(!h||!n?.user?.id||!e))try{m("installing"),r(null);const i=rt(h,e.id,n.user.id,{remoteIndex:0});if(!i.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:_}=await o.create.mutateAsync(i);m("authenticating");const x=new URL(`/mcp/${_}`,window.location.origin),y=await We({url:x.href,token:null});if(y.supportsOAuth&&!y.isAuthenticated){const{token:C,tokenInfo:T,error:j}=await Je({connectionId:_,scope:"offline_access"});if(j||!C){try{await o.delete.mutateAsync(_)}catch{}throw new Error(j??"No token received from GitHub")}if(T)try{(await fetch(`/api/connections/${_}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:T.accessToken,refreshToken:T.refreshToken,expiresIn:T.expiresIn,scope:T.scope,clientId:T.clientId,clientSecret:T.clientSecret,tokenEndpoint:T.tokenEndpoint})})).ok||await o.update.mutateAsync({id:_,data:{connection_token:C}})}catch{await o.update.mutateAsync({id:_,data:{connection_token:C}})}}be(d,e.id),f(i),m("ready")}catch(i){r(i instanceof Error?i.message:String(i)),m("error")}}function p(){m("idle"),r(null),f(null),g.current=!1}return a.enabled&&l&&s==="idle"?{status:"installing",error:null,connection:null,retry:p}:{status:s,error:u,connection:c,retry:p}}function Yt(a){const e=L.c(16),{open:n,onOpenChange:o}=a,[d]=Xe(),[s,m]=v.useState(null);if(!d.experimental_vibecode)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(oe,{className:"sr-only",children:t.jsx(ae,{children:"Import from GitHub"})}),e[0]=u):u=e[0];let r;e[1]!==s?(r=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:s?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>m(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(Ee,{size:16})}),t.jsx("img",{src:s.avatarUrl,alt:s.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:s.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(te,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from GitHub"})]})}),e[1]=s,e[2]=r):r=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[3]=c):c=e[3];let f;e[4]!==o?(f=()=>o(!1),e[4]=o,e[5]=f):f=e[5];let h;e[6]!==s||e[7]!==f?(h=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(v.Suspense,{fallback:c,children:t.jsx(Nt,{onComplete:f,selectedInstallation:s,onSelectInstallation:m})})}),e[6]=s,e[7]=f,e[8]=h):h=e[8];let l;e[9]!==r||e[10]!==h?(l=t.jsxs(se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[u,r,h]}),e[9]=r,e[10]=h,e[11]=l):l=e[11];let g;return e[12]!==o||e[13]!==n||e[14]!==l?(g=t.jsx(ie,{open:n,onOpenChange:o,children:l}),e[12]=o,e[13]=n,e[14]=l,e[15]=g):g=e[15],g}function Nt({onComplete:a,selectedInstallation:e,onSelectInstallation:n}){const{org:o}=G(),d=je(),s=pe(),[m,u]=v.useState(null),r=nt({slug:"mcp-github"}),c=xt({enabled:r.length===0}),f=r.length===1?r[0]??null:m,h=P({connectionId:f?.id??"",orgId:o.id}),l=P({connectionId:ne,orgId:o.id}),g=async(i,N)=>{try{const x=await h.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:N}});if(x.isError)return null;const C=x.content?.find(T=>T.type==="resource")?.resource?.text;if(!C)return null;try{const T=JSON.parse(C);return typeof T=="string"?T:JSON.stringify(T)}catch{return C}}catch{return null}},I=(i,N)=>{Promise.all([g(N,"AGENTS.md"),g(N,"CLAUDE.md")]).then(async([_,x])=>{const y=_??x??null;y&&(await l.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:y}}}}),be(d,o.id))}).catch(_=>{console.error("GitHub instructions fetch failed:",_)})},p=He({mutationFn:async i=>{if(!f||!e)throw new Error("No GitHub connection or installation");const N=f.id,_=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!0,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:e.installationId,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"}}}},connections:[{connection_id:N}]}}}),x=_.structuredContent??_;return{virtualMcpId:x.item.id,repo:i,item:x.item}},onSuccess:({virtualMcpId:i,repo:N,item:_})=>{fe.success(`Imported ${N.name} from GitHub`),d.setQueryData(Z.collectionItem(l,o.id,"","VIRTUAL_MCP",i),{item:_}),be(d,o.id),a(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),s(i),I(i,N)},onError:i=>{fe.error("Failed to import repo: "+(i instanceof Error?i.message:"Unknown error"))}});return c.status==="installing"||c.status==="authenticating"?t.jsx(ye,{status:c.status,error:null,retry:c.retry}):c.status==="error"?t.jsx(ye,{status:"error",error:c.error,retry:c.retry}):r.length===0&&c.status==="idle"?t.jsx(ye,{status:"installing",error:null,retry:c.retry}):r.length>1&&!f?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),r.map(i=>t.jsxs("button",{type:"button",onClick:()=>u(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(te,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):f?e?t.jsx(Ct,{connectionId:f.id,orgId:o.id,installation:e,onSelectRepo:i=>p.mutate(i),isSaving:p.isPending}):t.jsx(_t,{connectionId:f.id,orgId:o.id,onSelect:n,showBackButton:r.length>1,onBack:()=>u(null)}):null}function _t(a){const e=L.c(30),{connectionId:n,orgId:o,onSelect:d,showBackButton:s,onBack:m}=a;let u;e[0]!==o?(u={connectionId:ne,orgId:o},e[0]=o,e[1]=u):u=e[1];const r=P(u);let c;e[2]!==n||e[3]!==o?(c=Z.githubUserOrgs(o,n),e[2]=n,e[3]=o,e[4]=c):c=e[4];let f;e[5]!==n||e[6]!==r?(f=async()=>{const T=(await r.callTool({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:n}})).content?.[0]?.text;if(!T)throw new Error("No response from GITHUB_LIST_USER_ORGS");return JSON.parse(T)},e[5]=n,e[6]=r,e[7]=f):f=e[7];let h;e[8]!==c||e[9]!==f?(h={queryKey:c,queryFn:f},e[8]=c,e[9]=f,e[10]=h):h=e[10];const l=ze(h);if(l.isLoading){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[11]=C):C=e[11],C}if(l.isError){let C;return e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[12]=C):C=e[12],C}const g=l.data;if(!g)return null;let I;e[13]!==m||e[14]!==s?(I=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(Ee,{size:12}),"Change connection"]})}),e[13]=m,e[14]=s,e[15]=I):I=e[15];let p;if(e[16]!==g.installations||e[17]!==d){let C;e[19]!==d?(C=T=>t.jsxs("button",{type:"button",onClick:()=>d(T),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:T.avatarUrl,alt:T.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:T.login}),T.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},T.installationId),e[19]=d,e[20]=C):C=e[20],p=g.installations.map(C),e[16]=g.installations,e[17]=d,e[18]=p}else p=e[18];let i;e[21]!==p?(i=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:p}),e[21]=p,e[22]=i):i=e[22];const N=g.appSlug?`https://github.com/apps/${g.appSlug}/installations/new`:"https://github.com/settings/installations";let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[23]=_):_=e[23];let x;e[24]!==N?(x=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:N,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",_]})}),e[24]=N,e[25]=x):x=e[25];let y;return e[26]!==x||e[27]!==I||e[28]!==i?(y=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[I,i,x]}),e[26]=x,e[27]=I,e[28]=i,e[29]=y):y=e[29],y}function Ct(a){const e=L.c(19),{connectionId:n,orgId:o,installation:d,onSelectRepo:s,isSaving:m}=a,[u,r]=v.useState(""),c=v.useDeferredValue(u),f=u!==c;let h;e[0]!==f||e[1]!==u?(h=t.jsx(Fe,{placeholder:"Search repositories...",value:u,onChange:r,isSearching:f}),e[0]=f,e[1]=u,e[2]=h):h=e[2];const l=f?"opacity-40":"opacity-100";let g;e[3]!==l?(g=me("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[3]=l,e[4]=g):g=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let p;e[6]!==n||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==s||e[11]!==o?(p=t.jsx(v.Suspense,{fallback:I,children:t.jsx(It,{connectionId:n,orgId:o,installation:d,query:c,onSelectRepo:s,isSaving:m})}),e[6]=n,e[7]=c,e[8]=d,e[9]=m,e[10]=s,e[11]=o,e[12]=p):p=e[12];let i;e[13]!==g||e[14]!==p?(i=t.jsx("div",{className:g,children:p}),e[13]=g,e[14]=p,e[15]=i):i=e[15];let N;return e[16]!==h||e[17]!==i?(N=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,i]}),e[16]=h,e[17]=i,e[18]=N):N=e[18],N}function It(a){const e=L.c(28),{connectionId:n,orgId:o,installation:d,query:s,onSelectRepo:m,isSaving:u}=a;let r;e[0]!==n||e[1]!==o?(r={connectionId:n,orgId:o},e[0]=n,e[1]=o,e[2]=r):r=e[2];const c=P(r),f=d.type==="User"?"user":"org",h=s?`${f}:${d.login} ${s} in:name`:`${f}:${d.login}`;let l;e[3]!==n||e[4]!==d.login||e[5]!==o||e[6]!==s?(l=Z.githubOrgRepos(o,n,d.login,s),e[3]=n,e[4]=d.login,e[5]=o,e[6]=s,e[7]=l):l=e[7];let g;e[8]!==c||e[9]!==h?(g=async()=>{const x=(await c.callTool({name:"search_repositories",arguments:{query:h,page:1,perPage:30}})).content?.[0]?.text;if(!x)throw new Error("No response from search_repositories");return(JSON.parse(x).items??[]).map(Tt)},e[8]=c,e[9]=h,e[10]=g):g=e[10];let I;e[11]!==l||e[12]!==g?(I={queryKey:l,queryFn:g},e[11]=l,e[12]=g,e[13]=I):I=e[13];const{data:p}=Ze(I);if(p.length===0){let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[14]=_):_=e[14];let x;e[15]!==s?(x=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[15]=s,e[16]=x):x=e[16];let y;return e[17]!==x?(y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[_,x]}),e[17]=x,e[18]=y):y=e[18],y}let i;if(e[19]!==u||e[20]!==m||e[21]!==p){let _;e[23]!==u||e[24]!==m?(_=x=>t.jsxs("button",{type:"button",onClick:()=>m(x),disabled:u,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(te,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:x.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[x.private?t.jsx(ot,{size:10}):t.jsx(at,{size:10}),x.private?"Private":"Public"]})]},x.fullName),e[23]=u,e[24]=m,e[25]=_):_=e[25],i=p.map(_),e[19]=u,e[20]=m,e[21]=p,e[22]=i}else i=e[22];let N;return e[26]!==i?(N=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:i}),e[26]=i,e[27]=N):N=e[27],N}function Tt(a){return{name:a.name,fullName:a.full_name,owner:a.full_name.split("/")[0]??"",url:a.html_url,private:a.private,description:a.description,updatedAt:a.updated_at}}function ye(a){const e=L.c(33),{status:n,error:o,retry:d}=a;if(n==="error"){let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(te,{className:"size-5 text-destructive"})}),e[0]=T):T=e[0];let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=j):j=e[1];const S=o??"Something went wrong while connecting to GitHub.";let E;e[2]!==S?(E=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[j,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S})]}),e[2]=S,e[3]=E):E=e[3];let w;e[4]!==d?(w=t.jsx("button",{type:"button",onClick:d,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=d,e[5]=w):w=e[5];let O;return e[6]!==E||e[7]!==w?(O=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[T,E,w]}),e[6]=E,e[7]=w,e[8]=O):O=e[8],O}const s=n==="authenticating";let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(te,{className:"size-5 text-foreground"})}),e[9]=m):m=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"relative size-10",children:[m,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(ge,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=u):u=e[10];const r=s?"Authenticating with GitHub":"Setting up GitHub";let c;e[11]!==r?(c=t.jsx("p",{className:"text-sm font-medium",children:r}),e[11]=r,e[12]=c):c=e[12];const f=s?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==f?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[13]=f,e[14]=h):h=e[14];let l;e[15]!==c||e[16]!==h?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[c,h]}),e[15]=c,e[16]=h,e[17]=l):l=e[17];const g=s?"bg-muted-foreground/30":"bg-foreground animate-pulse";let I;e[18]!==g?(I=me("size-1.5 rounded-full",g),e[18]=g,e[19]=I):I=e[19];let p;e[20]!==I?(p=t.jsx("span",{className:I}),e[20]=I,e[21]=p):p=e[21];const i=s?"bg-foreground animate-pulse":"bg-muted-foreground/30";let N;e[22]!==i?(N=me("size-1.5 rounded-full",i),e[22]=i,e[23]=N):N=e[23];let _;e[24]!==N?(_=t.jsx("span",{className:N}),e[24]=N,e[25]=_):_=e[25];let x;e[26]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=x):x=e[26];let y;e[27]!==p||e[28]!==_?(y=t.jsxs("div",{className:"flex items-center gap-1.5",children:[p,_,x]}),e[27]=p,e[28]=_,e[29]=y):y=e[29];let C;return e[30]!==y||e[31]!==l?(C=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[u,l,y]}),e[30]=y,e[31]=l,e[32]=C):C=e[32],C}const yt=`<role>
1
+ import{e as L,s as G,o as je,b as $e,r as v,K as Z,n as ze,a as He,j as t,c as me,B as ee,t as U,z as fe,a0 as We,a1 as Je,aA as be,C as Xe,l as ge,V as Ze,f as et}from"./index-D0eg_rFC.js";import{S as ne,u as P,d as ve,W as Be,j as Te}from"./constants-D4bpaQIy.js";import{u as pe}from"./use-navigate-to-agent-DC2aXNSM.js";import{c as se,d as ie,a as oe,D as ae,b as tt}from"./dialog-CrC-U752.js";import{i as Ee}from"./SearchMd-CuF0EE4i.js";import{C as Fe}from"./collection-search-9bv6LiW5.js";import{c as we,b as Se,D as Oe,a as Ae}from"./drawer-D164IDvt.js";import{u as Le}from"./use-mobile-D5xdghWW.js";import{I as Re}from"./integration-icon-yOwsHf6q.js";import{a as Me,u as nt}from"./use-connection-DS4JMmfK.js";import{u as st,d as qe}from"./use-mcp-tools-CpSp-YOn.js";import{b as Ue,u as it}from"./use-virtual-mcp-DmXmoSMd.js";import{i as ot}from"./Lock01-DC87zCkJ.js";import{I as at}from"./agent-icon-BCqNXHrJ.js";import{e as rt}from"./extract-connection-data-CIGH4JOA.js";function ct(a){return a.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function lt(){const a=await fetch("/api/deco-sites");if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${a.status})`)}return a.json()}function Qt(a){const e=L.c(65),{open:n,onOpenChange:o,onBack:d}=a,{org:s}=G(),m=pe(),u=je(),{data:r}=$e.useSession(),[c,f]=v.useState(null),[h,l]=v.useState("");let g;e[0]!==s.id?(g={connectionId:ne,orgId:s.id},e[0]=s.id,e[1]=g):g=e[1];const I=P(g);let p;e[2]!==r?.user?.email?(p=Z.decoSites(r?.user?.email),e[2]=r?.user?.email,e[3]=p):p=e[3];const i=n&&!!r?.user?.email;let N;e[4]!==p||e[5]!==i?(N={queryKey:p,queryFn:lt,enabled:i,staleTime:6e4,retry:!1},e[4]=p,e[5]=i,e[6]=N):N=e[6];const{data:_,isLoading:x,error:y}=ze(N),C=_?.sites??[];let T;e[7]!==o?(T=b=>{b||(f(null),l("")),o(b)},e[7]=o,e[8]=T):T=e[8];const j=T;let S;e[9]!==h?(S=b=>b.name.toLowerCase().includes(h.toLowerCase())||b.domains?.[0]?.domain.toLowerCase().includes(h.toLowerCase()),e[9]=h,e[10]=S):S=e[10];const E=C.filter(S),w=!c||E.some(b=>b.name===c);let O;e[11]!==I||e[12]!==s.id?(O=async b=>{U("deco_site_import_started",{site_name:b});const R=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:b,orgId:s.id})}),M=await R.json().catch(mt);if(!R.ok)throw new Error(M.error??`Failed to create connection (${R.status})`);const A=M.connId;if(!A)throw new Error("Server did not return a connection ID");const ue=M.icon??null,X=ct(b),ke=await I.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:b,description:"Imported from deco.cx",pinned:!0,icon:ue??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:ue,themeColor:"#22C55E",slug:X,pinnedViews:[{connectionId:A,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:A,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:A,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:A,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:A,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:A,toolName:"file_explorer"}}}},connections:[{connection_id:A}]}}}),Pe=ke.structuredContent??ke;return{slug:X,virtualMcpId:Pe.item.id,connId:A,item:Pe.item}},e[11]=I,e[12]=s.id,e[13]=O):O=e[13];let D;e[14]!==I||e[15]!==j||e[16]!==m||e[17]!==s.id||e[18]!==u?(D=b=>{const{slug:R,virtualMcpId:M,item:A}=b;U("deco_site_import_succeeded",{site_name:A.title,virtual_mcp_id:M,slug:R}),u.setQueryData(Z.collectionItem(I,s.id,"","VIRTUAL_MCP",M),{item:A}),u.invalidateQueries({predicate:ue=>{const X=ue.queryKey;return X[1]===s.id&&X[3]==="collection"&&X[4]==="VIRTUAL_MCP"}}),u.invalidateQueries({queryKey:Z.projects(s.id)}),fe.success(`Imported ${R} from deco.cx`),j(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),m(M)},e[14]=I,e[15]=j,e[16]=m,e[17]=s.id,e[18]=u,e[19]=D):D=e[19];let re;e[20]!==O||e[21]!==D?(re={mutationFn:O,onSuccess:D,onError:ut},e[20]=O,e[21]=D,e[22]=re):re=e[22];const k=He(re),he=ie,xe=se,Ke="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let V;e[23]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(oe,{className:"sr-only",children:t.jsx(ae,{children:"Import from deco.cx"})}),e[23]=V):V=e[23];let $;e[24]!==d?($=d&&t.jsx("button",{type:"button",onClick:d,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ee,{size:18})}),e[24]=d,e[25]=$):$=e[25];let ce;e[26]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[26]=ce):ce=e[26];let z;e[27]!==$?(z=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[$,ce]}),e[27]=$,e[28]=z):z=e[28];let le;e[29]===Symbol.for("react.memo_cache_sentinel")?(le=b=>{b.key==="Escape"&&l("")},e[29]=le):le=e[29];let H;e[30]!==h?(H=t.jsx("div",{children:t.jsx(Fe,{value:h,onChange:l,placeholder:"Search sites...",onKeyDown:le})}),e[30]=h,e[31]=H):H=e[31];const Ye="pb-0 min-h-[300px]";let B;e[32]!==x?(B=x&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[32]=x,e[33]=B):B=e[33];const Ne=!x&&!y&&C.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),_e=!x&&C.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[E.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",h,"”"]}),E.map(b=>{const R=b.domains?.find(dt)?.domain??b.domains?.[0]?.domain,M=c===b.name;return t.jsxs("button",{type:"button",onClick:()=>f(b.name),className:me("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",M?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:b.thumb_url?t.jsx("img",{src:b.thumb_url,alt:b.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:b.name}),R&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:R})]})]},b.name)})]});let F;e[34]!==B||e[35]!==Ne||e[36]!==_e?(F=t.jsxs("div",{className:Ye,children:[B,Ne,_e]}),e[34]=B,e[35]=Ne,e[36]=_e,e[37]=F):F=e[37];let q;e[38]!==j?(q=()=>j(!1),e[38]=j,e[39]=q):q=e[39];let Q;e[40]!==k.isPending||e[41]!==q?(Q=t.jsx(ee,{variant:"outline",onClick:q,disabled:k.isPending,children:"Cancel"}),e[40]=k.isPending,e[41]=q,e[42]=Q):Q=e[42];const Ce=!c||!w||k.isPending||x;let K;e[43]!==k||e[44]!==c?(K=()=>c&&k.mutate(c),e[43]=k,e[44]=c,e[45]=K):K=e[45];const Ie=k.isPending?"Importing...":"Import";let Y;e[46]!==Ce||e[47]!==K||e[48]!==Ie?(Y=t.jsx(ee,{disabled:Ce,onClick:K,children:Ie}),e[46]=Ce,e[47]=K,e[48]=Ie,e[49]=Y):Y=e[49];let W;e[50]!==Q||e[51]!==Y?(W=t.jsxs(tt,{className:"px-8 py-5 border-t border-border",children:[Q,Y]}),e[50]=Q,e[51]=Y,e[52]=W):W=e[52];let J;e[53]!==xe||e[54]!==V||e[55]!==z||e[56]!==H||e[57]!==F||e[58]!==W?(J=t.jsxs(xe,{className:Ke,children:[V,z,H,F,W]}),e[53]=xe,e[54]=V,e[55]=z,e[56]=H,e[57]=F,e[58]=W,e[59]=J):J=e[59];let de;return e[60]!==he||e[61]!==j||e[62]!==n||e[63]!==J?(de=t.jsx(he,{open:n,onOpenChange:j,children:J}),e[60]=he,e[61]=j,e[62]=n,e[63]=J,e[64]=de):de=e[64],de}function dt(a){return a.production}function ut(a){U("deco_site_import_failed",{error:a instanceof Error?a.message:"Unknown error"}),fe.error("Import failed: "+(a instanceof Error?a.message:"Unknown error"))}function mt(){return{}}function Qe(a,e){const n=L.c(11),{org:o}=G();let d;n[0]!==o.id?(d=ve.REGISTRY(o.id),n[0]=o.id,n[1]=d):d=n[1];const s=d;let m;n[2]!==o.id||n[3]!==s?(m={connectionId:s,orgId:o.id},n[2]=o.id,n[3]=s,n[4]=m):m=n[4];const u=P(m);let r;n[5]!==a?(r={name:a},n[5]=a,n[6]=r):r=n[6];const c=e?.enabled??!0;let f;return n[7]!==u||n[8]!==r||n[9]!==c?(f={client:u,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:r,enabled:c,staleTime:3e5,select:ft},n[7]=u,n[8]=r,n[9]=c,n[10]=f):f=n[10],st(f)}function ft(a){return a.structuredContent?.item??null}const gt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function Ge(a){const e=L.c(7),{onRecruit:n,isRecruiting:o,isLoading:d}=a;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=s):s=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=m):m=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"space-y-2",children:[m,t.jsx("ul",{className:"space-y-1.5",children:gt.map(pt)})]}),e[2]=u):u=e[2];const r=o||d,c=o?"Setting up...":"Add Site Diagnostics";let f;return e[3]!==n||e[4]!==r||e[5]!==c?(f=t.jsxs("div",{className:"flex flex-col gap-6",children:[s,u,t.jsx(ee,{onClick:n,disabled:r,className:"w-full cursor-pointer",children:c})]}),e[3]=n,e[4]=r,e[5]=c,e[6]=f):f=e[6],f}function pt(a){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),a]},a)}function Kt({open:a,onOpenChange:e,existingAgent:n}){const o=Le(),{org:d}=G(),s=pe(),m=Me(),u=Ue(),r=P({connectionId:ne,orgId:d.id}),c=qe({client:r}),[f,h]=v.useState(!1),l=Be.find(C=>C.id==="site-diagnostics"),{data:g,isLoading:I}=Qe(l.appId,{enabled:a}),p=g?.title||g?.server?.title||g?.server?.name||l.title,i=g?.server?.icons?.[0]?.src??l.icon,N=g?.server?.description??null,_=t.jsx(Re,{icon:i,name:p,size:"sm"}),x=async()=>{if(g){if(n){e(!1),s(n.id);return}h(!0);try{const C=await c.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:l.appId},limit:1,offset:0}});let T;const S=C?.structuredContent?.items?.find(w=>w.app_id===l.appId);if(S)T=S.id;else{const w=g.server?.remotes?.[0]?.url;if(!w)throw new Error("Registry item is missing a remote URL for site-diagnostics");T=(await m.create.mutateAsync({title:p,description:N,icon:g.server?.icons?.[0]?.src??l.icon,connection_type:"HTTP",connection_url:w,app_name:g.server?.name??"site-diagnostics",app_id:l.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:l.appId,verified:!0}})).id}const E=await u.create.mutateAsync({title:p,description:N,icon:i,status:"active",connections:[{connection_id:T,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:T,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:T,toolName:"diagnose"}}}}});U("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:E.id}),e(!1),s(E.id)}catch(C){U("agent_recruit_failed",{template_id:"site-diagnostics",error:C instanceof Error?C.message:String(C)}),console.error("Failed to create Site Diagnostics agent:",C)}finally{h(!1)}}},y=`Add ${p}`;return o?t.jsx(we,{open:a,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(Ae,{className:"text-xl font-semibold",children:y})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ge,{onRecruit:x,isRecruiting:f,isLoading:I})})]})}):t.jsx(ie,{open:a,onOpenChange:e,children:t.jsxs(se,{className:"sm:max-w-[500px] p-8",children:[t.jsx(oe,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(ae,{className:"text-xl font-semibold",children:y})]})}),t.jsx(Ge,{onRecruit:x,isRecruiting:f,isLoading:I})]})})}function te(a){const e=L.c(4),{size:n,className:o}=a;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=d):d=e[0];let s;return e[1]!==o||e[2]!==n?(s=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:o,children:d}),e[1]=o,e[2]=n,e[3]=s):s=e[3],s}const ht="deco/mcp-github";function xt(a){const{org:e}=G(),{data:n}=$e.useSession(),o=Me(),d=je(),[s,m]=v.useState("idle"),[u,r]=v.useState(null),[c,f]=v.useState(null),{data:h,isLoading:l}=Qe(ht,{enabled:a.enabled}),g=v.useRef(!1);a.enabled&&h&&!l&&!g.current&&n?.user?.id&&s==="idle"&&(g.current=!0,I());async function I(){if(!(!h||!n?.user?.id||!e))try{m("installing"),r(null);const i=rt(h,e.id,n.user.id,{remoteIndex:0});if(!i.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:_}=await o.create.mutateAsync(i);m("authenticating");const x=new URL(`/mcp/${_}`,window.location.origin),y=await We({url:x.href,token:null});if(y.supportsOAuth&&!y.isAuthenticated){const{token:C,tokenInfo:T,error:j}=await Je({connectionId:_,scope:"offline_access"});if(j||!C){try{await o.delete.mutateAsync(_)}catch{}throw new Error(j??"No token received from GitHub")}if(T)try{(await fetch(`/api/connections/${_}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:T.accessToken,refreshToken:T.refreshToken,expiresIn:T.expiresIn,scope:T.scope,clientId:T.clientId,clientSecret:T.clientSecret,tokenEndpoint:T.tokenEndpoint})})).ok||await o.update.mutateAsync({id:_,data:{connection_token:C}})}catch{await o.update.mutateAsync({id:_,data:{connection_token:C}})}}be(d,e.id),f(i),m("ready")}catch(i){r(i instanceof Error?i.message:String(i)),m("error")}}function p(){m("idle"),r(null),f(null),g.current=!1}return a.enabled&&l&&s==="idle"?{status:"installing",error:null,connection:null,retry:p}:{status:s,error:u,connection:c,retry:p}}function Yt(a){const e=L.c(16),{open:n,onOpenChange:o}=a,[d]=Xe(),[s,m]=v.useState(null);if(!d.experimental_vibecode)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(oe,{className:"sr-only",children:t.jsx(ae,{children:"Import from GitHub"})}),e[0]=u):u=e[0];let r;e[1]!==s?(r=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:s?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>m(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(Ee,{size:16})}),t.jsx("img",{src:s.avatarUrl,alt:s.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:s.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(te,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from GitHub"})]})}),e[1]=s,e[2]=r):r=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[3]=c):c=e[3];let f;e[4]!==o?(f=()=>o(!1),e[4]=o,e[5]=f):f=e[5];let h;e[6]!==s||e[7]!==f?(h=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(v.Suspense,{fallback:c,children:t.jsx(Nt,{onComplete:f,selectedInstallation:s,onSelectInstallation:m})})}),e[6]=s,e[7]=f,e[8]=h):h=e[8];let l;e[9]!==r||e[10]!==h?(l=t.jsxs(se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[u,r,h]}),e[9]=r,e[10]=h,e[11]=l):l=e[11];let g;return e[12]!==o||e[13]!==n||e[14]!==l?(g=t.jsx(ie,{open:n,onOpenChange:o,children:l}),e[12]=o,e[13]=n,e[14]=l,e[15]=g):g=e[15],g}function Nt({onComplete:a,selectedInstallation:e,onSelectInstallation:n}){const{org:o}=G(),d=je(),s=pe(),[m,u]=v.useState(null),r=nt({slug:"mcp-github"}),c=xt({enabled:r.length===0}),f=r.length===1?r[0]??null:m,h=P({connectionId:f?.id??"",orgId:o.id}),l=P({connectionId:ne,orgId:o.id}),g=async(i,N)=>{try{const x=await h.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:N}});if(x.isError)return null;const C=x.content?.find(T=>T.type==="resource")?.resource?.text;if(!C)return null;try{const T=JSON.parse(C);return typeof T=="string"?T:JSON.stringify(T)}catch{return C}}catch{return null}},I=(i,N)=>{Promise.all([g(N,"AGENTS.md"),g(N,"CLAUDE.md")]).then(async([_,x])=>{const y=_??x??null;y&&(await l.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:y}}}}),be(d,o.id))}).catch(_=>{console.error("GitHub instructions fetch failed:",_)})},p=He({mutationFn:async i=>{if(!f||!e)throw new Error("No GitHub connection or installation");const N=f.id,_=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!0,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:e.installationId,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"}}}},connections:[{connection_id:N}]}}}),x=_.structuredContent??_;return{virtualMcpId:x.item.id,repo:i,item:x.item}},onSuccess:({virtualMcpId:i,repo:N,item:_})=>{fe.success(`Imported ${N.name} from GitHub`),d.setQueryData(Z.collectionItem(l,o.id,"","VIRTUAL_MCP",i),{item:_}),be(d,o.id),a(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),s(i),I(i,N)},onError:i=>{fe.error("Failed to import repo: "+(i instanceof Error?i.message:"Unknown error"))}});return c.status==="installing"||c.status==="authenticating"?t.jsx(ye,{status:c.status,error:null,retry:c.retry}):c.status==="error"?t.jsx(ye,{status:"error",error:c.error,retry:c.retry}):r.length===0&&c.status==="idle"?t.jsx(ye,{status:"installing",error:null,retry:c.retry}):r.length>1&&!f?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),r.map(i=>t.jsxs("button",{type:"button",onClick:()=>u(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(te,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):f?e?t.jsx(Ct,{connectionId:f.id,orgId:o.id,installation:e,onSelectRepo:i=>p.mutate(i),isSaving:p.isPending}):t.jsx(_t,{connectionId:f.id,orgId:o.id,onSelect:n,showBackButton:r.length>1,onBack:()=>u(null)}):null}function _t(a){const e=L.c(30),{connectionId:n,orgId:o,onSelect:d,showBackButton:s,onBack:m}=a;let u;e[0]!==o?(u={connectionId:ne,orgId:o},e[0]=o,e[1]=u):u=e[1];const r=P(u);let c;e[2]!==n||e[3]!==o?(c=Z.githubUserOrgs(o,n),e[2]=n,e[3]=o,e[4]=c):c=e[4];let f;e[5]!==n||e[6]!==r?(f=async()=>{const T=(await r.callTool({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:n}})).content?.[0]?.text;if(!T)throw new Error("No response from GITHUB_LIST_USER_ORGS");return JSON.parse(T)},e[5]=n,e[6]=r,e[7]=f):f=e[7];let h;e[8]!==c||e[9]!==f?(h={queryKey:c,queryFn:f},e[8]=c,e[9]=f,e[10]=h):h=e[10];const l=ze(h);if(l.isLoading){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[11]=C):C=e[11],C}if(l.isError){let C;return e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[12]=C):C=e[12],C}const g=l.data;if(!g)return null;let I;e[13]!==m||e[14]!==s?(I=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(Ee,{size:12}),"Change connection"]})}),e[13]=m,e[14]=s,e[15]=I):I=e[15];let p;if(e[16]!==g.installations||e[17]!==d){let C;e[19]!==d?(C=T=>t.jsxs("button",{type:"button",onClick:()=>d(T),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:T.avatarUrl,alt:T.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:T.login}),T.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},T.installationId),e[19]=d,e[20]=C):C=e[20],p=g.installations.map(C),e[16]=g.installations,e[17]=d,e[18]=p}else p=e[18];let i;e[21]!==p?(i=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:p}),e[21]=p,e[22]=i):i=e[22];const N=g.appSlug?`https://github.com/apps/${g.appSlug}/installations/new`:"https://github.com/settings/installations";let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[23]=_):_=e[23];let x;e[24]!==N?(x=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:N,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",_]})}),e[24]=N,e[25]=x):x=e[25];let y;return e[26]!==x||e[27]!==I||e[28]!==i?(y=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[I,i,x]}),e[26]=x,e[27]=I,e[28]=i,e[29]=y):y=e[29],y}function Ct(a){const e=L.c(19),{connectionId:n,orgId:o,installation:d,onSelectRepo:s,isSaving:m}=a,[u,r]=v.useState(""),c=v.useDeferredValue(u),f=u!==c;let h;e[0]!==f||e[1]!==u?(h=t.jsx(Fe,{placeholder:"Search repositories...",value:u,onChange:r,isSearching:f}),e[0]=f,e[1]=u,e[2]=h):h=e[2];const l=f?"opacity-40":"opacity-100";let g;e[3]!==l?(g=me("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[3]=l,e[4]=g):g=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ge,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let p;e[6]!==n||e[7]!==c||e[8]!==d||e[9]!==m||e[10]!==s||e[11]!==o?(p=t.jsx(v.Suspense,{fallback:I,children:t.jsx(It,{connectionId:n,orgId:o,installation:d,query:c,onSelectRepo:s,isSaving:m})}),e[6]=n,e[7]=c,e[8]=d,e[9]=m,e[10]=s,e[11]=o,e[12]=p):p=e[12];let i;e[13]!==g||e[14]!==p?(i=t.jsx("div",{className:g,children:p}),e[13]=g,e[14]=p,e[15]=i):i=e[15];let N;return e[16]!==h||e[17]!==i?(N=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,i]}),e[16]=h,e[17]=i,e[18]=N):N=e[18],N}function It(a){const e=L.c(28),{connectionId:n,orgId:o,installation:d,query:s,onSelectRepo:m,isSaving:u}=a;let r;e[0]!==n||e[1]!==o?(r={connectionId:n,orgId:o},e[0]=n,e[1]=o,e[2]=r):r=e[2];const c=P(r),f=d.type==="User"?"user":"org",h=s?`${f}:${d.login} ${s} in:name`:`${f}:${d.login}`;let l;e[3]!==n||e[4]!==d.login||e[5]!==o||e[6]!==s?(l=Z.githubOrgRepos(o,n,d.login,s),e[3]=n,e[4]=d.login,e[5]=o,e[6]=s,e[7]=l):l=e[7];let g;e[8]!==c||e[9]!==h?(g=async()=>{const x=(await c.callTool({name:"search_repositories",arguments:{query:h,page:1,perPage:30}})).content?.[0]?.text;if(!x)throw new Error("No response from search_repositories");return(JSON.parse(x).items??[]).map(Tt)},e[8]=c,e[9]=h,e[10]=g):g=e[10];let I;e[11]!==l||e[12]!==g?(I={queryKey:l,queryFn:g},e[11]=l,e[12]=g,e[13]=I):I=e[13];const{data:p}=Ze(I);if(p.length===0){let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[14]=_):_=e[14];let x;e[15]!==s?(x=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[15]=s,e[16]=x):x=e[16];let y;return e[17]!==x?(y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[_,x]}),e[17]=x,e[18]=y):y=e[18],y}let i;if(e[19]!==u||e[20]!==m||e[21]!==p){let _;e[23]!==u||e[24]!==m?(_=x=>t.jsxs("button",{type:"button",onClick:()=>m(x),disabled:u,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(te,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:x.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[x.private?t.jsx(ot,{size:10}):t.jsx(at,{size:10}),x.private?"Private":"Public"]})]},x.fullName),e[23]=u,e[24]=m,e[25]=_):_=e[25],i=p.map(_),e[19]=u,e[20]=m,e[21]=p,e[22]=i}else i=e[22];let N;return e[26]!==i?(N=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:i}),e[26]=i,e[27]=N):N=e[27],N}function Tt(a){return{name:a.name,fullName:a.full_name,owner:a.full_name.split("/")[0]??"",url:a.html_url,private:a.private,description:a.description,updatedAt:a.updated_at}}function ye(a){const e=L.c(33),{status:n,error:o,retry:d}=a;if(n==="error"){let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(te,{className:"size-5 text-destructive"})}),e[0]=T):T=e[0];let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=j):j=e[1];const S=o??"Something went wrong while connecting to GitHub.";let E;e[2]!==S?(E=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[j,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S})]}),e[2]=S,e[3]=E):E=e[3];let w;e[4]!==d?(w=t.jsx("button",{type:"button",onClick:d,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=d,e[5]=w):w=e[5];let O;return e[6]!==E||e[7]!==w?(O=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[T,E,w]}),e[6]=E,e[7]=w,e[8]=O):O=e[8],O}const s=n==="authenticating";let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(te,{className:"size-5 text-foreground"})}),e[9]=m):m=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"relative size-10",children:[m,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(ge,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=u):u=e[10];const r=s?"Authenticating with GitHub":"Setting up GitHub";let c;e[11]!==r?(c=t.jsx("p",{className:"text-sm font-medium",children:r}),e[11]=r,e[12]=c):c=e[12];const f=s?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==f?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[13]=f,e[14]=h):h=e[14];let l;e[15]!==c||e[16]!==h?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[c,h]}),e[15]=c,e[16]=h,e[17]=l):l=e[17];const g=s?"bg-muted-foreground/30":"bg-foreground animate-pulse";let I;e[18]!==g?(I=me("size-1.5 rounded-full",g),e[18]=g,e[19]=I):I=e[19];let p;e[20]!==I?(p=t.jsx("span",{className:I}),e[20]=I,e[21]=p):p=e[21];const i=s?"bg-foreground animate-pulse":"bg-muted-foreground/30";let N;e[22]!==i?(N=me("size-1.5 rounded-full",i),e[22]=i,e[23]=N):N=e[23];let _;e[24]!==N?(_=t.jsx("span",{className:N}),e[24]=N,e[25]=_):_=e[25];let x;e[26]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=x):x=e[26];let y;e[27]!==p||e[28]!==_?(y=t.jsxs("div",{className:"flex items-center gap-1.5",children:[p,_,x]}),e[27]=p,e[28]=_,e[29]=y):y=e[29];let C;return e[30]!==y||e[31]!==l?(C=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[u,l,y]}),e[30]=y,e[31]=l,e[32]=C):C=e[32],C}const yt=`<role>
2
2
  You are the Agent Manager. You create, configure, and maintain agents (Virtual MCPs) in this workspace.
3
3
  </role>
4
4