decocms 4.76.48 → 4.76.50

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 (236) hide show
  1. package/dist/client/assets/{AlertCircle-DOQWM7yj.js → AlertCircle-PCCNCfTw.js} +1 -1
  2. package/dist/client/assets/{AreaChart-1ywm-l2b.js → AreaChart-mqFEummz.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-WifcuNli.js → ArrowUp-CS8R2WYD.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-JeluVocp.js → ArrowUpRight-NVYvv78M.js} +1 -1
  5. package/dist/client/assets/{Check-COLMJMUs.js → Check-C87Rb9lh.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-Bl41PcZH.js → CheckCircle-DhQ3C5TM.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-UqCuvv6I.js → ChevronDown-xVnxmq-H.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-d32DqyAn.js → ChevronRight-CCkCNd6T.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BNA1jD0m.js → ChevronUp-BhzKasA9.js} +1 -1
  10. package/dist/client/assets/{Circle-BnaPA3or.js → Circle-B_uVlJ_y.js} +1 -1
  11. package/dist/client/assets/{Copy01-CsI0mLRH.js → Copy01-BE_U0-He.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-iYdY7zYC.js → DotsVertical--DWuHHcQ.js} +1 -1
  13. package/dist/client/assets/{Eye-efXEe1EJ.js → Eye-tW7hDysZ.js} +1 -1
  14. package/dist/client/assets/{FilterLines-8ufs9yTV.js → FilterLines-Du8tiRBX.js} +1 -1
  15. package/dist/client/assets/{Flag01-lsxhm65v.js → Flag01-qPPAun0t.js} +1 -1
  16. package/dist/client/assets/{Globe01-BpPlcyCE.js → Globe01-PE-4IskF.js} +1 -1
  17. package/dist/client/assets/{Globe04-zhH5vlqE.js → Globe04-60FUtK0c.js} +1 -1
  18. package/dist/client/assets/{HardDrive-Ca8W7hZx.js → HardDrive-CCOIriSG.js} +1 -1
  19. package/dist/client/assets/{Key01-DIasRBRK.js → Key01-Ce4Mbr23.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-B1Z144hH.js → LayoutLeft-DvaVgIP6.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-BH16zivO.js → LinkExternal01-CR3PIo1Y.js} +1 -1
  22. package/dist/client/assets/{List-BcK62Ete.js → List-CMVBTrMD.js} +1 -1
  23. package/dist/client/assets/{Monitor01-vwbiFg7-.js → Monitor01-DgsOckSR.js} +1 -1
  24. package/dist/client/assets/{Package-QOjP8Z0p.js → Package-CFxytINf.js} +1 -1
  25. package/dist/client/assets/{Palette-CVU88SIy.js → Palette-eurTJXhl.js} +1 -1
  26. package/dist/client/assets/{Play-BKQHpU1v.js → Play-R2Gxkf2F.js} +1 -1
  27. package/dist/client/assets/{Plus-Cxs4hnDc.js → Plus-DjeR2Mqr.js} +1 -1
  28. package/dist/client/assets/{SearchLg-CODngl9Y.js → SearchLg-DkTd-lS5.js} +1 -1
  29. package/dist/client/assets/{SearchMd-AqN1Y-0P.js → SearchMd-D3fwdof7.js} +1 -1
  30. package/dist/client/assets/{Settings02-thOMLnyU.js → Settings02-xitnek4o.js} +1 -1
  31. package/dist/client/assets/{Shield01-CUY0ruff.js → Shield01-DX5nGTn3.js} +1 -1
  32. package/dist/client/assets/{Star01-D1CNqVH7.js → Star01-aJpG5lhH.js} +1 -1
  33. package/dist/client/assets/{Stars01-C6m2iaNT.js → Stars01-DMU9skD9.js} +1 -1
  34. package/dist/client/assets/{Stars02-BXTeUNf6.js → Stars02-CtsM4n3P.js} +1 -1
  35. package/dist/client/assets/{Sun-aBvHDIcJ.js → Sun-BsbEtzMX.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-CNf4ZPpA.js → SwitchHorizontal01-D5xtEo2S.js} +1 -1
  37. package/dist/client/assets/{Tool01-BXqlXLVI.js → Tool01-e9GhY4WL.js} +1 -1
  38. package/dist/client/assets/{Tool02-Uo_gZrwr.js → Tool02-CIhWpVQX.js} +1 -1
  39. package/dist/client/assets/{Trash01-BYIWRCHw.js → Trash01-DmUjrRCU.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-B8VmlnJF.js → TrendUp01-Bb1eYxRZ.js} +1 -1
  41. package/dist/client/assets/{Upload01-yS8q4CkE.js → Upload01-By14NcE2.js} +1 -1
  42. package/dist/client/assets/{User01-D8WZjBgD.js → User01-CLylDnv3.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-Rj2Ktpxi.js → UserPlus01-DehB4gau.js} +1 -1
  44. package/dist/client/assets/{Users01-yyBehRtX.js → Users01-DJgiFD8m.js} +1 -1
  45. package/dist/client/assets/{Users03-C0i17d43.js → Users03-B6O9Lu6S.js} +1 -1
  46. package/dist/client/assets/{X-7l7BVVB_.js → X-CGtWffpt.js} +1 -1
  47. package/dist/client/assets/{XCircle-BiXqTZVD.js → XCircle-CYHLD1Ax.js} +1 -1
  48. package/dist/client/assets/{XClose-DkPjPT4r.js → XClose-CWUyG_x1.js} +1 -1
  49. package/dist/client/assets/{Zap-CVZe2GzA.js → Zap-tgyS94Oz.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-jEW6LZa8.js → ZapSquare-6yv5WJfT.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-B6sgrlFH.js → ZoomOut-DamJ7rBa.js} +1 -1
  52. package/dist/client/assets/{access-gate-DBnUuUtq.js → access-gate-B8VeVqlS.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-BMr1VD7J.js → add-section-modal-QNCClzCm.js} +1 -1
  54. package/dist/client/assets/{agent-icon-BCinMFUd.js → agent-icon-_03bGvlN.js} +1 -1
  55. package/dist/client/assets/{agents-list-rE5WcPDm.js → agents-list-yBVBaVC-.js} +1 -1
  56. package/dist/client/assets/{ai-providers-BXcjpEv1.js → ai-providers-Di6pHpTU.js} +1 -1
  57. package/dist/client/assets/{alert-CKv3VdSr.js → alert-daddGn20.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-_zwmZR_i.js → alert-dialog-CUk-roR3.js} +1 -1
  59. package/dist/client/assets/{app-editor-BmGS9KeU.js → app-editor-CYqHcyvS.js} +1 -1
  60. package/dist/client/assets/{auth-BDfI4Ipl.js → auth-B8YK68Do.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-Co7yyNrj.js → auth-catchall-BkL4AVku.js} +1 -1
  62. package/dist/client/assets/{auth-entry-4psLUgyV.js → auth-entry-BRTuKKqG.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-DX9QVqYU.js → auth-split-layout-CcK3ryn2.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-nL5dtC3N.js → authenticate-and-persist-oauth-BmO851EF.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-BxuQmtaB.js → automation-list-row--e-2nV2m.js} +1 -1
  66. package/dist/client/assets/{automation-runs-CXeBUZZT.js → automation-runs-CbKNKXMY.js} +1 -1
  67. package/dist/client/assets/automations-Z84d0j7u.js +1 -0
  68. package/dist/client/assets/{autosend-BRgI5RcN.js → autosend-CG0M0kfa.js} +1 -1
  69. package/dist/client/assets/{avatar-D_cXePkr.js → avatar-pJ427hsL.js} +1 -1
  70. package/dist/client/assets/{badge-Bpfre86_.js → badge-D41iXc-L.js} +1 -1
  71. package/dist/client/assets/{block-document-BII-2_3E.js → block-document-C_seN2yd.js} +1 -1
  72. package/dist/client/assets/{brand-context-DAxOEG6F.js → brand-context-cPoKEEum.js} +1 -1
  73. package/dist/client/assets/{buckets-BPfnoLkp.js → buckets-pXsfU-A2.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-Do9cKtDx.js → bulk-category-panel-B__BqiVv.js} +1 -1
  75. package/dist/client/assets/{calendar-BacAPnx0.js → calendar-U4w1ceAV.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-BzjlSgKy.js → capability-load-error-SKOSI19U.js} +1 -1
  77. package/dist/client/assets/{card-DWFNe_ip.js → card-B2NdMcmb.js} +1 -1
  78. package/dist/client/assets/{category-editor-qKAYWFsm.js → category-editor-CQUKZoHf.js} +1 -1
  79. package/dist/client/assets/{chat-context-CfSMAPpU.js → chat-context-CjLXjwG2.js} +1 -1
  80. package/dist/client/assets/{checkbox-B7e0eG8m.js → checkbox-smzPd6ca.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-Dm53hXQ0.js → cli-auth-success-C2Hkg7iB.js} +1 -1
  82. package/dist/client/assets/{collection-detail-Dp3fXDqU.js → collection-detail-D6-vToqp.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-dVEHCxkH.js → collection-display-button-CEljQ7kL.js} +1 -1
  84. package/dist/client/assets/{collection-search-DveDUn2F.js → collection-search-4foNWUcD.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-DqRhK12-.js → collection-table-wrapper-CmZqGUK_.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-HYnroapF.js → collection-tabs-CU8WLL0Z.js} +1 -1
  87. package/dist/client/assets/{command-BCtGIdPc.js → command-CgVa2nfV.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-BRovOHuL.js → commerce-onboarding-DsE-W936.js} +1 -1
  89. package/dist/client/assets/{companions-core-C8dQXik0.js → companions-core-B9QVflyP.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-BcQaaaVX.js → connect-desktop-dialog-CMUBCnGB.js} +1 -1
  91. package/dist/client/assets/{connection-card-BVQgFmSN.js → connection-card-CW3ZWFTu.js} +1 -1
  92. package/dist/client/assets/{connection-detail-BybpG7NN.js → connection-detail-GN9OcqoA.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-BCD6xdaF.js → connection-form-helpers-C4GzHQ7f.js} +1 -1
  94. package/dist/client/assets/{connections-Df8UbwXG.js → connections-Bp2yqwHT.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-BgOjox9_.js → decopilot-sse-pool-C5INyXaE.js} +1 -1
  96. package/dist/client/assets/{dialog-DQH_8BAd.js → dialog-Cbyhwac8.js} +1 -1
  97. package/dist/client/assets/{domain-settings-DT2EAU3F.js → domain-settings-DzQr8x2Y.js} +1 -1
  98. package/dist/client/assets/{drawer-BNFKWcDe.js → drawer-TClQWyjC.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-Bj1wkrPx.js → dropdown-menu-BVDy82aL.js} +1 -1
  100. package/dist/client/assets/{empty-state-CdoNqdxU.js → empty-state-CUV232D1.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-CzDN7pev.js → extract-connection-data-DKoSZAS-.js} +1 -1
  102. package/dist/client/assets/file-explorer-ChCGvSmc.js +2 -0
  103. package/dist/client/assets/{file-type-icon-B5scAfJk.js → file-type-icon-B4XvI2TF.js} +1 -1
  104. package/dist/client/assets/{files-DlDWz5Y7.js → files-C8qZNyc8.js} +1 -1
  105. package/dist/client/assets/{form-ByTU0Cly.js → form-CIZlT9yj.js} +1 -1
  106. package/dist/client/assets/{general-BI_Yyymo.js → general-Dk6kF6o6.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-DSe0rOWS.js → github-repo-picker-Riz_3Hyd.js} +1 -1
  108. package/dist/client/assets/{hooks-P6IUphrX.js → hooks-CUQgq2Jo.js} +1 -1
  109. package/dist/client/assets/{index-BqgqTUP7.js → index-0EyEkepv.js} +5 -5
  110. package/dist/client/assets/{index-DtSnkZ17.js → index-8NY7D0wh.js} +1 -1
  111. package/dist/client/assets/{index-D7p3fNno.js → index-C6YJl30S.js} +1 -1
  112. package/dist/client/assets/{index-Bypw1Rxz.js → index-CMc-SDjd.js} +1 -1
  113. package/dist/client/assets/{index-DCtNYiNg.js → index-CMshMGmO.js} +1 -1
  114. package/dist/client/assets/{index-EIPGqWIS.js → index-CTw6C-Tn.js} +1 -1
  115. package/dist/client/assets/{index-BaTFSlF7.js → index-CXAYXe6b.js} +2 -2
  116. package/dist/client/assets/{index-CLSglgWu.js → index-CwO1nZ39.js} +1 -1
  117. package/dist/client/assets/{index-C9BrtmzN.js → index-DIjWTOJ_.js} +1 -1
  118. package/dist/client/assets/{index-BpOj46xg.js → index-DNjNPpv-.js} +1 -1
  119. package/dist/client/assets/{index-7JXY5Y9q.js → index-DxhDW1wa.js} +1 -1
  120. package/dist/client/assets/{index-BvWpZ0-L.js → index-Mkj3p_NP.js} +1 -1
  121. package/dist/client/assets/{index-B5StyM2a.js → index-VHTYdW1V.js} +1 -1
  122. package/dist/client/assets/{index-D6whkmo1.js → index-duDI7Ex1.js} +3 -3
  123. package/dist/client/assets/{index-redirect-CMjYewPC.js → index-redirect-BidnvLw0.js} +1 -1
  124. package/dist/client/assets/{input-IjHWHImM.js → input-BzluxV8b.js} +1 -1
  125. package/dist/client/assets/{integration-icon-nDeyr6mn.js → integration-icon-DAQlGJOz.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-CT7Kwe6g.js → invite-member-dialog-C1edrpX6.js} +1 -1
  127. package/dist/client/assets/{label-BxinNvBF.js → label-B5hHKwi4.js} +1 -1
  128. package/dist/client/assets/{layout-DA4M8ePi.js → layout-C1w7JoXd.js} +1 -1
  129. package/dist/client/assets/{login-BjYV1gH3.js → login-Civq0JBl.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-DFEfNs3t.js → mcp-oauth-NYsd0AhW.js} +1 -1
  131. package/dist/client/assets/{members-CMWohdPv.js → members-OfuUPEee.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-CVvDv3_E.js → monaco-editor-B_QrX-OA.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-DyEmchso.js → monitoring-stats-row-CjMbnSDD.js} +1 -1
  134. package/dist/client/assets/{multi-select-CMbq4n-B.js → multi-select-BA4SOq9o.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-Ck-BzTxO.js → oauth-callback-BnwZRYqE.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ai-provider-CzTXSORx.js → oauth-callback-ai-provider-CHrsVdNd.js} +1 -1
  137. package/dist/client/assets/{onboarding-CJCItoBt.js → onboarding-DQ7iI9Jm.js} +1 -1
  138. package/dist/client/assets/{org-install-UolFsmuz.js → org-install-DF5d_0VP.js} +1 -1
  139. package/dist/client/assets/{org-layout-CZDpOLm3.js → org-layout-CuhRpylg.js} +1 -1
  140. package/dist/client/assets/{organization-choice-CBQk8Ks4.js → organization-choice-SPyqx99e.js} +1 -1
  141. package/dist/client/assets/{orgs-DfTZud3P.js → orgs-DtqdjapQ.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-uWTU4DBx.js → page-seo-form-DTsbB0AL.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-BtINqpYO.js +1 -0
  144. package/dist/client/assets/{popover-DB7N8J-i.js → popover-ByzGiWwh.js} +1 -1
  145. package/dist/client/assets/{post-editor-CSKjUywP.js → post-editor-DaK_aYlU.js} +1 -1
  146. package/dist/client/assets/{primitives-DMbEInAr.js → primitives-zYTct119.js} +1 -1
  147. package/dist/client/assets/{profile-UpHs9rN_.js → profile-DyYI7Vug.js} +1 -1
  148. package/dist/client/assets/project-app-view-DYGHmlwr.js +1 -0
  149. package/dist/client/assets/record-editor-B5g9nMPv.js +1 -0
  150. package/dist/client/assets/redirect-editor-CIv7O8di.js +1 -0
  151. package/dist/client/assets/registry-658VY1E3.js +2 -0
  152. package/dist/client/assets/{registry-layout-C3ZVUHrq.js → registry-layout-BgU-fM8k.js} +1 -1
  153. package/dist/client/assets/{reports-IXvSBEaR.js → reports-CDPWV-2R.js} +1 -1
  154. package/dist/client/assets/{require-capability-B6dUkxJn.js → require-capability-GKNodiWF.js} +1 -1
  155. package/dist/client/assets/{required-auth-layout-C-NJlT8E.js → required-auth-layout-C06e5Y-E.js} +1 -1
  156. package/dist/client/assets/{reset-password-BzWrPTig.js → reset-password-8XqGeGB4.js} +1 -1
  157. package/dist/client/assets/{roles-yKRwzD7U.js → roles-Bk4cdy0T.js} +1 -1
  158. package/dist/client/assets/{search-input-95KvAv-S.js → search-input-hURNkSIt.js} +1 -1
  159. package/dist/client/assets/{secrets-Crr74tKi.js → secrets-DSyLGUQd.js} +1 -1
  160. package/dist/client/assets/{sections-editor-CxJcDcXu.js → sections-editor-BjEtlkxg.js} +1 -1
  161. package/dist/client/assets/{select-v3wCe2bG.js → select-CsddBvBY.js} +1 -1
  162. package/dist/client/assets/{select-model-CLgTKSyQ.js → select-model-DORmMJuo.js} +1 -1
  163. package/dist/client/assets/{self-tool-result-BX9N-oso.js → self-tool-result-Caqrlhkk.js} +1 -1
  164. package/dist/client/assets/{seo-editor-VNUaq1x9.js → seo-editor-DjloBatU.js} +1 -1
  165. package/dist/client/assets/{settings-layout-Q-m6jgWz.js → settings-layout-B8zRKVWj.js} +1 -1
  166. package/dist/client/assets/{settings-section-C1r845kr.js → settings-section-642cVa8D.js} +1 -1
  167. package/dist/client/assets/{shell-controls-soP8-96B.js → shell-controls-Dr8aKn4M.js} +1 -1
  168. package/dist/client/assets/{shell-layout-1GeogLLP.js → shell-layout-CkDJkzvZ.js} +1 -1
  169. package/dist/client/assets/{sidebar-BHJOnqPN.js → sidebar-2KcncShK.js} +1 -1
  170. package/dist/client/assets/{skeleton-BmY9-yN1.js → skeleton--wisTyiV.js} +1 -1
  171. package/dist/client/assets/{sso-7e03gGRc.js → sso-Brmukwa8.js} +1 -1
  172. package/dist/client/assets/{store-81zI3m1S.js → store-D1ujQa9g.js} +1 -1
  173. package/dist/client/assets/store-registry-DGIKo7LB.js +2 -0
  174. package/dist/client/assets/{studio-tools-DB-gLliX.js → studio-tools-B54SY6r8.js} +1 -1
  175. package/dist/client/assets/{switch-CTMzHyoH.js → switch-BzBjf32A.js} +1 -1
  176. package/dist/client/assets/{table-D5dnbyO4.js → table-AQ7piykA.js} +1 -1
  177. package/dist/client/assets/{tabs-BF4rPtmv.js → tabs-XKlWHp2x.js} +1 -1
  178. package/dist/client/assets/{textarea-BLB_Euaj.js → textarea-N9dopgui.js} +1 -1
  179. package/dist/client/assets/{toggle-group-BbM5845C.js → toggle-group-t9GF040I.js} +1 -1
  180. package/dist/client/assets/{toolbar-BWEF_KFg.js → toolbar-C9tq9EK3.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-OKrdUGuN.js → toolbar-icon-button-ChYkhHd5.js} +1 -1
  182. package/dist/client/assets/{tooltip-CpDhWfRr.js → tooltip-DGVVwJc9.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-BNTura7E.js → use-ai-providers-B7oFR8DU.js} +1 -1
  184. package/dist/client/assets/{use-automations-Bgu1Rzbj.js → use-automations-D0RYVnfZ.js} +1 -1
  185. package/dist/client/assets/{use-autosave-CR_KZQug.js → use-autosave-CGuLMBX2.js} +1 -1
  186. package/dist/client/assets/{use-capability-DLvM-ZfC.js → use-capability-2oc0w4Rd.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-CH_1W6Ci.js → use-clock-tick-BQXh5WsI.js} +1 -1
  188. package/dist/client/assets/{use-collections-BuOOKjak.js → use-collections-CfhbFwup.js} +1 -1
  189. package/dist/client/assets/{use-connection-BGDyHdoT.js → use-connection-B3ShNorS.js} +1 -1
  190. package/dist/client/assets/{use-copy-BB1fcpJC.js → use-copy-Ce1N2A84.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-CiVt-y0V.js → use-create-virtual-mcp-C8K812I1.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-t7SFS9vg.js → use-debounced-autosave-CLWP8jgJ.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-DC_bzuLQ.js → use-debounced-value-B3wzRElV.js} +1 -1
  194. package/dist/client/assets/use-deco-credits-Vrs-fOAY.js +1 -0
  195. package/dist/client/assets/{use-decopilot-events-CbFab9Rb.js → use-decopilot-events-DJAbY-3F.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-CQ6uSkUo.js → use-delete-connection-DEQ7nLgi.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-Bv9G_gZk.js → use-deployment-admin-92sVuJ67.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-Bve45UbB.js → use-file-configs-DyrKNV4Q.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-baSeSjpY.js → use-infinite-scroll-Dg5-RxdY.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-Detzg0V5.js → use-join-requests-B6Vg3Ogs.js} +1 -1
  201. package/dist/client/assets/{use-mcp-auth-status-DlSEdSrP.js → use-mcp-auth-status-C8B_hfr8.js} +1 -1
  202. package/dist/client/assets/{use-mcp-client-Ce-pPK0j.js → use-mcp-client-B6SIzdxA.js} +1 -1
  203. package/dist/client/assets/{use-mcp-tools-BJv-c3VV.js → use-mcp-tools-BjznoCSO.js} +1 -1
  204. package/dist/client/assets/{use-members-DRMdGYjk.js → use-members-Ov0s9QQ1.js} +1 -1
  205. package/dist/client/assets/{use-mobile-CPWXKFzD.js → use-mobile-lhFWKWqk.js} +1 -1
  206. package/dist/client/assets/{use-navigate-to-agent-D7fNzjPO.js → use-navigate-to-agent-DuYiuHo9.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-BZV1UC0y.js → use-org-auth-client-CEsOMmzS.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-D1QMEo58.js → use-org-sso-BgjYC-Do.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-OERecWvd.js → use-organization-roles-Q4--rNf7.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-BM1-Insr.js → use-organization-settings-D0dYwv5S.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-B-AEwYvy.js → use-registry-connections-CBmrUSSv.js} +1 -1
  212. package/dist/client/assets/{use-secrets-Bu_LLVN7.js → use-secrets-Deg83hC-.js} +1 -1
  213. package/dist/client/assets/{use-status-sounds-DtY7DQvn.js → use-status-sounds-BK7KWt7S.js} +1 -1
  214. package/dist/client/assets/{use-view-mode-D8bsIzC2.js → use-view-mode-D8RFg25-.js} +1 -1
  215. package/dist/client/assets/{use-virtual-mcp-DOgvxTfb.js → use-virtual-mcp-CakYatbh.js} +1 -1
  216. package/dist/client/assets/useInfiniteQuery-YhuAOJeQ.js +1 -0
  217. package/dist/client/assets/{useRouterState-DFyfbYJp.js → useRouterState-ByRKzupJ.js} +1 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-Bat8I7Xp.js +1 -0
  219. package/dist/client/assets/{users-BzLOtHzr.js → users-Bwzd9-3c.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-vDJq9CdX.js → variant-calendar-BkKTFvkw.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-D-FYsPjB.js → view-mode-toggle-DTZJ4x6T.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +1 -1
  224. package/dist/server/server.js +1 -1
  225. package/package.json +1 -1
  226. package/dist/client/assets/automations-DisG4MmD.js +0 -1
  227. package/dist/client/assets/file-explorer-CYFunVpX.js +0 -2
  228. package/dist/client/assets/page-seo-sheet-B1_5rHr5.js +0 -1
  229. package/dist/client/assets/project-app-view-CmvVmrBH.js +0 -1
  230. package/dist/client/assets/record-editor-DIcCjDCa.js +0 -1
  231. package/dist/client/assets/redirect-editor-Cem7WE95.js +0 -1
  232. package/dist/client/assets/registry-OqdNHP32.js +0 -2
  233. package/dist/client/assets/store-registry-C7a3lMdI.js +0 -2
  234. package/dist/client/assets/use-deco-credits-DMWaYlnJ.js +0 -1
  235. package/dist/client/assets/useInfiniteQuery-CCvvO116.js +0 -1
  236. package/dist/client/assets/useSuspenseInfiniteQuery-C6Z6zXH6.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "4.76.48",
3
+ "version": "4.76.50",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-D6whkmo1.js";import{s as q}from"./Plus-Cxs4hnDc.js";import{i as S}from"./Zap-CVZe2GzA.js";import{S as D}from"./search-input-95KvAv-S.js";import{P as l}from"./index-7JXY5Y9q.js";import{E as b}from"./empty-state-CdoNqdxU.js";import{c as O}from"./use-automations-Bgu1Rzbj.js";import{c as V}from"./use-navigate-to-agent-D7fNzjPO.js";import{A as F}from"./automation-list-row-BxuQmtaB.js";import{f as G}from"./constants-D_FQAPnt.js";import{u as H}from"./use-virtual-mcp-DOgvxTfb.js";import{R as J}from"./require-capability-B6dUkxJn.js";import"./SearchMd-AqN1Y-0P.js";import"./sidebar-BHJOnqPN.js";import"./LayoutLeft-B1Z144hH.js";import"./use-mobile-CPWXKFzD.js";import"./X-7l7BVVB_.js";import"./tooltip-CpDhWfRr.js";import"./use-mcp-client-Ce-pPK0j.js";import"./auth-BDfI4Ipl.js";import"./studio-tools-DB-gLliX.js";import"./hooks-P6IUphrX.js";import"./decopilot-sse-pool-BgOjox9_.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-_zwmZR_i.js";import"./dropdown-menu-Bj1wkrPx.js";import"./Check-COLMJMUs.js";import"./ChevronRight-d32DqyAn.js";import"./Circle-BnaPA3or.js";import"./Stars02-BXTeUNf6.js";import"./DotsVertical-iYdY7zYC.js";import"./Trash01-BYIWRCHw.js";import"./agent-icon-BCinMFUd.js";import"./AlertCircle-DOQWM7yj.js";import"./UserPlus01-Rj2Ktpxi.js";import"./Tool01-BXqlXLVI.js";import"./ArrowUp-WifcuNli.js";import"./Settings02-thOMLnyU.js";import"./Tool02-Uo_gZrwr.js";import"./XCircle-BiXqTZVD.js";import"./ArrowUpRight-JeluVocp.js";import"./TrendUp01-B8VmlnJF.js";import"./ZapSquare-jEW6LZa8.js";import"./Users03-C0i17d43.js";import"./CheckCircle-Bl41PcZH.js";import"./ChevronDown-UqCuvv6I.js";import"./ChevronUp-BNA1jD0m.js";import"./Copy01-CsI0mLRH.js";import"./ZoomOut-B6sgrlFH.js";import"./Globe01-BpPlcyCE.js";import"./Eye-efXEe1EJ.js";import"./FilterLines-8ufs9yTV.js";import"./Flag01-lsxhm65v.js";import"./Star01-D1CNqVH7.js";import"./Globe04-zhH5vlqE.js";import"./SwitchHorizontal01-CNf4ZPpA.js";import"./HardDrive-Ca8W7hZx.js";import"./Key01-DIasRBRK.js";import"./LinkExternal01-BH16zivO.js";import"./List-BcK62Ete.js";import"./Monitor01-vwbiFg7-.js";import"./Sun-aBvHDIcJ.js";import"./Package-QOjP8Z0p.js";import"./Palette-CVU88SIy.js";import"./Play-BKQHpU1v.js";import"./SearchLg-CODngl9Y.js";import"./Shield01-CUY0ruff.js";import"./Stars01-C6m2iaNT.js";import"./Upload01-yS8q4CkE.js";import"./User01-D8WZjBgD.js";import"./Users01-yyBehRtX.js";import"./XClose-DkPjPT4r.js";import"./use-collections-BuOOKjak.js";import"./use-capability-DLvM-ZfC.js";import"./access-gate-DBnUuUtq.js";import"./capability-load-error-BzjlSgKy.js";function K(){const t=B.c(16),{org:i}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,R=H(),k=V(),d=T(),[f,E]=$.useState(""),g=f.toLowerCase(),y=new Map(R.map(Q)),C=u.filter(e=>{if(!g||e.name.toLowerCase().includes(g))return!0;if(e.virtual_mcp_id){const a=y.get(e.virtual_mcp_id);if(a&&a.title.toLowerCase().includes(g))return!0}return!1}),P=(e,a)=>{const A=a&&y.has(a)?a:G(i.id);N("automations_list_row_clicked",{automation_id:e,agent_id:A,source:"settings_automations"}),k(A,{search:{main:"automation:"+e}})};let n;t[0]!==d||t[1]!==i.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:i.slug}})},t[0]=d,t[1]=i.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:o.jsxs(M,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(e=>o.jsx(F,{automation:e,showAgent:!0,onClick:()=>P(e.id,e.virtual_mcp_id)},e.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let m;t[10]!==h.Content||t[11]!==s?(m=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=m):m=t[12];let c;return t[13]!==x||t[14]!==m?(c=o.jsx(x,{children:m}),t[13]=x,t[14]=m,t[15]=c):c=t[15],c}function Q(t){return[t.id,t]}function _o(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(J,{capability:"automations:manage",area:"automations",children:o.jsx(K,{})}),t[0]=i):i=t[0],i}export{_o as default};
@@ -1,2 +0,0 @@
1
- import{c as Z,r as u,j as r,i as se,B as he,d$ as St,aO as Mt,aU as ie,e0 as Dt,e1 as Rt,e2 as Pt,e3 as Et,bO as kt,e4 as Tt,e5 as Ve,aQ as Ot,e6 as At,e7 as Lt,e8 as It,e9 as Ft,ea as $t,eb as _t,ec as zt,ed as Wt,ee as Gt,l as ae,n as Kt,t as W,K as Fe}from"./index-D6whkmo1.js";import{F as Bt,l as Ut}from"./index-BvWpZ0-L.js";import{d as Vt,ay as qt,az as Qt,aA as ue,aB as Ht,a7 as $e}from"./agent-icon-BCinMFUd.js";import{a as Xt}from"./Tool01-BXqlXLVI.js";import{s as Yt}from"./XClose-DkPjPT4r.js";import{A as Jt}from"./automation-runs-CXeBUZZT.js";import{b as _e,T as ze,a as We}from"./tooltip-CpDhWfRr.js";import{f as Zt,a as en,b as tn,c as nn,d as rn,e as on,A as sn,g as an}from"./alert-dialog-_zwmZR_i.js";import{b as ln}from"./chat-context-CfSMAPpU.js";import{u as cn}from"./shell-layout-1GeogLLP.js";import{s as fe,a as Ge,f as dn}from"./index-BqgqTUP7.js";import{a as un,h as fn,D as mn,c as pn,d as xn,e as hn}from"./dialog-DQH_8BAd.js";import{I as Ke}from"./input-IjHWHImM.js";import{t as gn}from"./ChevronDown-UqCuvv6I.js";import{i as vn}from"./ChevronRight-d32DqyAn.js";import{a as yn}from"./ZoomOut-B6sgrlFH.js";import{E as Cn,v as Be,w as Ce,x as wn,y as bn,z as jn,A as U,C as me,g as we,D as be,G as Nn,I as Sn,J as je,K as pe,M as Ne,N as Mn,O as Dn}from"./index-C9BrtmzN.js";import"./AlertCircle-DOQWM7yj.js";import"./UserPlus01-Rj2Ktpxi.js";import"./ArrowUp-WifcuNli.js";import"./Settings02-thOMLnyU.js";import"./Tool02-Uo_gZrwr.js";import"./XCircle-BiXqTZVD.js";import"./ArrowUpRight-JeluVocp.js";import"./TrendUp01-B8VmlnJF.js";import"./ZapSquare-jEW6LZa8.js";import"./Users03-C0i17d43.js";import"./CheckCircle-Bl41PcZH.js";import"./Check-COLMJMUs.js";import"./ChevronUp-BNA1jD0m.js";import"./Circle-BnaPA3or.js";import"./Stars02-BXTeUNf6.js";import"./Copy01-CsI0mLRH.js";import"./DotsVertical-iYdY7zYC.js";import"./Globe01-BpPlcyCE.js";import"./Eye-efXEe1EJ.js";import"./FilterLines-8ufs9yTV.js";import"./Flag01-lsxhm65v.js";import"./Star01-D1CNqVH7.js";import"./Globe04-zhH5vlqE.js";import"./SwitchHorizontal01-CNf4ZPpA.js";import"./HardDrive-Ca8W7hZx.js";import"./Key01-DIasRBRK.js";import"./LayoutLeft-B1Z144hH.js";import"./LinkExternal01-BH16zivO.js";import"./List-BcK62Ete.js";import"./Monitor01-vwbiFg7-.js";import"./Sun-aBvHDIcJ.js";import"./Package-QOjP8Z0p.js";import"./Palette-CVU88SIy.js";import"./Play-BKQHpU1v.js";import"./Plus-Cxs4hnDc.js";import"./SearchLg-CODngl9Y.js";import"./SearchMd-AqN1Y-0P.js";import"./Shield01-CUY0ruff.js";import"./Stars01-C6m2iaNT.js";import"./Trash01-BYIWRCHw.js";import"./Upload01-yS8q4CkE.js";import"./User01-D8WZjBgD.js";import"./Users01-yyBehRtX.js";import"./X-7l7BVVB_.js";import"./Zap-CVZe2GzA.js";import"./select-v3wCe2bG.js";import"./useInfiniteQuery-CCvvO116.js";import"./use-infinite-scroll-baSeSjpY.js";import"./use-connection-BGDyHdoT.js";import"./use-collections-BuOOKjak.js";import"./use-mcp-client-Ce-pPK0j.js";import"./constants-D_FQAPnt.js";import"./auth-BDfI4Ipl.js";import"./use-virtual-mcp-DOgvxTfb.js";import"./card-DWFNe_ip.js";import"./sidebar-BHJOnqPN.js";import"./use-mobile-CPWXKFzD.js";import"./table-D5dnbyO4.js";import"./empty-state-CdoNqdxU.js";import"./use-members-DRMdGYjk.js";import"./use-org-auth-client-BZV1UC0y.js";import"./use-clock-tick-CH_1W6Ci.js";import"./use-automations-Bgu1Rzbj.js";import"./studio-tools-DB-gLliX.js";import"./useSuspenseInfiniteQuery-C6Z6zXH6.js";import"./avatar-D_cXePkr.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BB1fcpJC.js";import"./file-type-icon-B5scAfJk.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-CVvDv3_E.js";import"./delay-CnY5UFtP.js";import"./index-B5StyM2a.js";import"./hooks-P6IUphrX.js";import"./decopilot-sse-pool-BgOjox9_.js";import"./backoff-CrEUbyZT.js";import"./integration-icon-nDeyr6mn.js";import"./use-navigate-to-agent-D7fNzjPO.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-1ywm-l2b.js";import"./form-ByTU0Cly.js";import"./label-BxinNvBF.js";import"./autosend-BRgI5RcN.js";import"./use-ai-providers-BNTura7E.js";import"./use-decopilot-events-CbFab9Rb.js";import"./use-organization-settings-BM1-Insr.js";import"./required-auth-layout-C-NJlT8E.js";import"./use-org-sso-D1QMEo58.js";import"./drawer-BNFKWcDe.js";import"./collection-search-DveDUn2F.js";import"./tabs-BF4rPtmv.js";import"./toggle-group-BbM5845C.js";import"./use-deco-credits-DMWaYlnJ.js";import"./extract-connection-data-CzDN7pev.js";import"./connection-card-BVQgFmSN.js";import"./use-registry-connections-B-AEwYvy.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BLB_Euaj.js";import"./connection-form-helpers-BCD6xdaF.js";import"./authenticate-and-persist-oauth-nL5dtC3N.js";import"./mcp-oauth-DFEfNs3t.js";import"./collection-tabs-HYnroapF.js";import"./badge-Bpfre86_.js";import"./connect-desktop-dialog-BcQaaaVX.js";import"./select-model-CLgTKSyQ.js";import"./checkbox-B7e0eG8m.js";import"./skeleton-BmY9-yN1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C1r845kr.js";import"./command-BCtGIdPc.js";import"./index-Bypw1Rxz.js";import"./popover-DB7N8J-i.js";import"./dropdown-menu-Bj1wkrPx.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DtY7DQvn.js";import"./toolbar-BWEF_KFg.js";import"./use-mcp-tools-BJv-c3VV.js";import"./use-capability-DLvM-ZfC.js";import"./switch-CTMzHyoH.js";import"./use-debounced-autosave-t7SFS9vg.js";import"./index-7JXY5Y9q.js";import"./search-input-95KvAv-S.js";import"./use-mcp-auth-status-DlSEdSrP.js";import"./github-repo-picker-DSe0rOWS.js";import"./use-debounced-value-DC_bzuLQ.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-Bu_LLVN7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-C8dQXik0.js";import"./index-BaTFSlF7.js";import"./get-initials-D-f_fDFw.js";import"./calendar-BacAPnx0.js";import"./toolbar-icon-button-OKrdUGuN.js";import"./use-file-configs-Bve45UbB.js";import"./automation-list-row-BxuQmtaB.js";const Rn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function Pn(s){const e=Z.c(51),{open:i,mode:a,initialName:c,parentLabel:m,isPending:x,onSubmit:p,onOpenChange:g}=s,M=c===void 0?"":c,d=x===void 0?!1:x,[h,v]=u.useState(M),[B,V]=u.useState(i),y=Rn[a];i!==B&&(V(i),i&&v(M));let F;e[0]!==d||e[1]!==g?(F=_=>{!_&&!d&&g(!1)},e[0]=d,e[1]=g,e[2]=F):F=e[2];const H=F;let q;e[3]!==d||e[4]!==h||e[5]!==p?(q=async _=>{_.preventDefault();const K=h.trim();!K||d||await p(K)},e[3]=d,e[4]=h,e[5]=p,e[6]=q):q=e[6];const Q=q;let $;e[7]!==y.title?($=r.jsx(un,{children:y.title}),e[7]=y.title,e[8]=$):$=e[8];let T;e[9]!==y.description?(T=r.jsx(fn,{children:y.description}),e[9]=y.description,e[10]=T):T=e[10];let G;e[11]!==$||e[12]!==T?(G=r.jsxs(mn,{children:[$,T]}),e[11]=$,e[12]=T,e[13]=G):G=e[13];let O;e[14]!==m?(O=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(Ke,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=O):O=e[15];let A;e[16]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=A):A=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=_=>v(_.target.value),e[17]=R):R=e[17];let P;e[18]!==y.placeholder||e[19]!==d||e[20]!==h?(P=r.jsxs("div",{className:"space-y-1.5",children:[A,r.jsx(Ke,{id:"file-explorer-name",value:h,onChange:R,placeholder:y.placeholder,autoFocus:!0,disabled:d})]}),e[18]=y.placeholder,e[19]=d,e[20]=h,e[21]=P):P=e[21];let j;e[22]!==P||e[23]!==O?(j=r.jsxs("div",{className:"space-y-4 py-4",children:[O,P]}),e[22]=P,e[23]=O,e[24]=j):j=e[24];let N;e[25]!==g?(N=()=>g(!1),e[25]=g,e[26]=N):N=e[26];let E;e[27]!==d||e[28]!==N?(E=r.jsx(he,{type:"button",variant:"outline",onClick:N,disabled:d,children:"Cancel"}),e[27]=d,e[28]=N,e[29]=E):E=e[29];let k;e[30]!==d||e[31]!==h?(k=!h.trim()||d,e[30]=d,e[31]=h,e[32]=k):k=e[32];let C;e[33]!==y.submit||e[34]!==d?(C=d?r.jsxs(r.Fragment,{children:[r.jsx(se,{size:14,className:"animate-spin"}),"Saving…"]}):y.submit,e[33]=y.submit,e[34]=d,e[35]=C):C=e[35];let L;e[36]!==k||e[37]!==C?(L=r.jsx(he,{type:"submit",disabled:k,children:C}),e[36]=k,e[37]=C,e[38]=L):L=e[38];let w;e[39]!==E||e[40]!==L?(w=r.jsxs(pn,{children:[E,L]}),e[39]=E,e[40]=L,e[41]=w):w=e[41];let S;e[42]!==Q||e[43]!==j||e[44]!==w||e[45]!==G?(S=r.jsx(xn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:Q,children:[G,j,w]})}),e[42]=Q,e[43]=j,e[44]=w,e[45]=G,e[46]=S):S=e[46];let z;return e[47]!==H||e[48]!==i||e[49]!==S?(z=r.jsx(hn,{open:i,onOpenChange:H,children:S}),e[47]=H,e[48]=i,e[49]=S,e[50]=z):z=e[50],z}var Se="ContextMenu",[En]=Ot(Se,[Ve]),I=Ve(),[kn,qe]=En(Se),Qe=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:m=!0}=s,[x,p]=u.useState(!1),g=I(e),M=kt(a),d=u.useCallback(h=>{p(h),M(h)},[M]);return r.jsx(kn,{scope:e,open:x,onOpenChange:d,modal:m,children:r.jsx(Tt,{...g,dir:c,open:x,onOpenChange:d,modal:m,children:i})})};Qe.displayName=Se;var He="ContextMenuTrigger",Xe=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,m=qe(He,i),x=I(i),p=u.useRef({x:0,y:0}),g=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),M=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(M.current),[]),h=v=>{p.current={x:v.clientX,y:v.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(St,{...x,virtualRef:g}),r.jsx(Mt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:ie(s.onContextMenu,v=>{d(),h(v),v.preventDefault()}),onPointerDown:a?s.onPointerDown:ie(s.onPointerDown,xe(v=>{d(),M.current=window.setTimeout(()=>h(v),700)})),onPointerMove:a?s.onPointerMove:ie(s.onPointerMove,xe(d)),onPointerCancel:a?s.onPointerCancel:ie(s.onPointerCancel,xe(d)),onPointerUp:a?s.onPointerUp:ie(s.onPointerUp,xe(d))})]})});Xe.displayName=He;var Tn="ContextMenuPortal",Ye=s=>{const{__scopeContextMenu:e,...i}=s,a=I(e);return r.jsx(Pt,{...a,...i})};Ye.displayName=Tn;var Je="ContextMenuContent",Ze=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=qe(Je,i),m=I(i),x=u.useRef(!1);return r.jsx(Et,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&x.current&&p.preventDefault(),x.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(x.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ze.displayName=Je;var On="ContextMenuGroup",An=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(At,{...c,...a,ref:e})});An.displayName=On;var Ln="ContextMenuLabel",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Lt,{...c,...a,ref:e})});In.displayName=Ln;var Fn="ContextMenuItem",et=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Dt,{...c,...a,ref:e})});et.displayName=Fn;var $n="ContextMenuCheckboxItem",_n=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(It,{...c,...a,ref:e})});_n.displayName=$n;var zn="ContextMenuRadioGroup",Wn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Ft,{...c,...a,ref:e})});Wn.displayName=zn;var Gn="ContextMenuRadioItem",Kn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx($t,{...c,...a,ref:e})});Kn.displayName=Gn;var Bn="ContextMenuItemIndicator",Un=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(_t,{...c,...a,ref:e})});Un.displayName=Bn;var Vn="ContextMenuSeparator",tt=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Rt,{...c,...a,ref:e})});tt.displayName=Vn;var qn="ContextMenuArrow",Qn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(zt,{...c,...a,ref:e})});Qn.displayName=qn;var Hn="ContextMenuSubTrigger",Xn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Wt,{...c,...a,ref:e})});Xn.displayName=Hn;var Yn="ContextMenuSubContent",Jn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=I(i);return r.jsx(Gt,{...c,...a,ref:e,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jn.displayName=Yn;function xe(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var Zn=Qe,er=Xe,tr=Ye,nr=Ze,rr=et,or=tt;function ir(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(Zn,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function sr(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(er,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(tr,{children:r.jsx(nr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function te(s){const e=Z.c(12);let i,a,c,m;e[0]!==s?({className:i,inset:a,variant:m,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=m):(i=e[1],a=e[2],c=e[3],m=e[4]);const x=m===void 0?"default":m;let p;e[5]!==i?(p=ae("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==x?(g=r.jsx(rr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":x,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=x,e[11]=g):g=e[11],g}function Ue(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(or,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const lr="#d9a441";function cr(s){const e=Z.c(45),{node:i,depth:a,isExpanded:c,isSelected:m,isLoading:x,fileVisual:p,onOpen:g,onSelect:M,onNewFile:d,onNewFolder:h,onCopyPath:v,onCopyRelativePath:B,onRename:V,onDelete:y}=s,F=x===void 0?!1:x,H=i.kind==="directory",{Icon:q,color:Q}=p,$=m&&"bg-accent";let T;e[0]!==$?(T=ae("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",$),e[0]=$,e[1]=T):T=e[1];const G=`${a*14+8}px`;let O;e[2]!==G?(O={paddingLeft:G},e[2]=G,e[3]=O):O=e[3];let A;e[4]!==g||e[5]!==M?(A=()=>{M(),g()},e[4]=g,e[5]=M,e[6]=A):A=e[6];let R;e[7]!==q||e[8]!==Q||e[9]!==H||e[10]!==c||e[11]!==F?(R=H?r.jsxs(r.Fragment,{children:[F?r.jsx(se,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(gn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(vn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(yn,{size:16,className:"shrink-0",style:{color:lr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(q,{size:16,className:"shrink-0",style:{color:Q}})]}),e[7]=q,e[8]=Q,e[9]=H,e[10]=c,e[11]=F,e[12]=R):R=e[12];let P;e[13]!==i.name?(P=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=P):P=e[14];let j;e[15]!==T||e[16]!==O||e[17]!==A||e[18]!==R||e[19]!==P?(j=r.jsx(sr,{asChild:!0,children:r.jsxs("button",{type:"button",className:T,style:O,onClick:A,children:[R,P]})}),e[15]=T,e[16]=O,e[17]=A,e[18]=R,e[19]=P,e[20]=j):j=e[20];let N;e[21]!==d?(N=r.jsx(te,{onSelect:d,children:"New File"}),e[21]=d,e[22]=N):N=e[22];let E;e[23]!==h?(E=r.jsx(te,{onSelect:h,children:"New Folder"}),e[23]=h,e[24]=E):E=e[24];let k;e[25]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Ue,{}),e[25]=k):k=e[25];let C;e[26]!==v?(C=r.jsx(te,{onSelect:v,children:"Copy Path"}),e[26]=v,e[27]=C):C=e[27];let L;e[28]!==B?(L=r.jsx(te,{onSelect:B,children:"Copy Relative Path"}),e[28]=B,e[29]=L):L=e[29];let w;e[30]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsx(Ue,{}),e[30]=w):w=e[30];let S;e[31]!==V?(S=r.jsx(te,{onSelect:V,children:"Rename"}),e[31]=V,e[32]=S):S=e[32];let z;e[33]!==y?(z=r.jsx(te,{variant:"destructive",onSelect:y,children:"Delete"}),e[33]=y,e[34]=z):z=e[34];let _;e[35]!==N||e[36]!==E||e[37]!==C||e[38]!==L||e[39]!==S||e[40]!==z?(_=r.jsxs(ar,{className:"w-52",children:[N,E,k,C,L,w,S,z]}),e[35]=N,e[36]=E,e[37]=C,e[38]=L,e[39]=S,e[40]=z,e[41]=_):_=e[41];let K;return e[42]!==_||e[43]!==j?(K=r.jsxs(ir,{children:[j,_]}),e[42]=_,e[43]=j,e[44]=K):K=e[44],K}Ut.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function dr(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function ur(s){const e=U(s);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const fr="#94a3b8";function mr(s){const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ue,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ue,color:"#d9a441"}:e.endsWith(".json")?{Icon:Ht,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ue,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ue,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:Xt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:fr}}function as({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:x,directories:p}=c,[g,M]=u.useState(new Set),[d,h]=u.useState(null),[v,B]=u.useState(null),[V,y]=u.useState([]),[F,H]=u.useState(""),[q,Q]=u.useState(!1),[$,T]=u.useState(!1),[,G]=u.useState(new Set),[O,A]=u.useState(new Set),R=u.useRef(0),P=u.useRef(null),j=u.useRef(new Set),N=u.useRef(new Map);function E(t){G(n=>{const o=typeof t=="function"?t(n):t;return j.current=o,o})}const[k,C]=u.useState(new Map),L=u.useRef(null),[w,S]=u.useState(null),{sendMessage:z}=ln(),{openSidePanel:_}=cn(),K=Kt(),[D,X]=u.useState(null),[Y,ge]=u.useState(null),[ne,le]=u.useState(!1);async function J(t,n){const o=await fetch(dr(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function ce(){K.invalidateQueries({queryKey:Ge(s,e,i)})}function Me(t,n){navigator.clipboard.writeText(n).then(()=>W.success(`${t} copied`),()=>W.error(`Failed to copy ${t.toLowerCase()}`))}function nt(t){const n=Mn(t);if(!n)return;const o=`${s}/${e}/${i}`;K.setQueryData(Fe.decofile(o),l=>{if(!l)return l;const{[n]:f,...b}=l;return b}),K.invalidateQueries({queryKey:Fe.liveMeta(s,e,i)})}function rt(t){const n=t.kind==="file"?[t.path]:x.filter(o=>o.startsWith(".deco/blocks/")).map(o=>me(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)nt(o)}function ot(t){const n=me(t);return V.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=k.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function De(t){y(n=>n.map(o=>t(o)).filter(o=>o!==null)),h(n=>n&&t(n)),C(n=>{const o=new Map;for(const[l,f]of n){const b=t(l);b&&o.set(b,f)}return o}),B(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function it(t){const n=me(t);B(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),De(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function st(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);await J("write",{path:U(n),content:""}),await re(),await ce(),X(null),ve(n)}async function at(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);const o=U(n);await J("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await re(),await ce(),X(null),M(l=>{const f=new Set(l);for(const b of Ce(n))f.add(b);return f.add(n),f}),B({name:t,path:n,kind:"directory",children:[]})}async function lt(t){if(!D)return;const n=D.node.path,o=je(n),l=pe(o,t);if(l===n){X(null);return}if(Ne(l,x,p))throw new Error(`"${t}" already exists`);await J("rename",{from:U(n),to:U(l)}),De(f=>f===n?l:f.startsWith(`${n}/`)?pe(l,f.slice(n.length+1)):f),await re(),await ce(),X(null)}async function ct(t){le(!0);try{await J("unlink",{path:U(t.path),recursive:t.kind==="directory"}),rt(t),it(t.path),await re(),await ce(),ge(null),W.success(`Deleted "${t.name}"`)}catch(n){W.error(n instanceof Error?n.message:"Delete failed")}finally{le(!1)}}async function dt(t){const n=Sn(t);if(n){W.error(n);return}le(!0);try{D?.mode==="new-file"?(await st(t),W.success(`Created "${t}"`)):D?.mode==="new-folder"?(await at(t),W.success(`Created folder "${t}"`)):D?.mode==="rename"&&(await lt(t),W.success(`Renamed to "${t}"`))}catch(o){W.error(o instanceof Error?o.message:"Operation failed")}finally{le(!1)}}const Re=u.useRef(!1);Re.current||(Re.current=!0,P.current=re());const[ut,ft]=u.useState(null);if(a&&a!==ut){ft(a);const t=a;queueMicrotask(()=>{ur(t)&&ve(t).catch(n=>{W.error(n instanceof Error?n.message:"Failed to open file")})})}async function Pe(t){const n=await J("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ee(t,n,o){if(o!==R.current)return!1;let l=!1;return m(f=>{const b=n?Dn(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!b.truncated,{files:b.files,directories:b.directories,truncated:l}}),l&&W.warning("File list truncated — some files may be hidden"),l}async function mt(t){const n=N.current.get(t);if(n)return n;const o=R.current,l=(async()=>{const f=await Pe({pattern:"**/*",path:U(t),limit:Be}),b=Ee(f,!0,o);return!b&&o===R.current&&E(oe=>{const de=new Set(oe);return de.add(t),de}),b})();N.current.set(t,l);try{return await l}finally{N.current.delete(t)}}async function ke(t){if(!be(t,j.current))return!1;A(n=>new Set(n).add(t));try{return await mt(t)}finally{A(n=>{const o=new Set(n);return o.delete(t),o})}}async function pt(t){const n=new Set(j.current);for(const o of Ce(t)){if(!be(o,n))continue;if(await ke(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function re(){const t=++R.current;N.current.clear(),Q(!0),E(new Set),M(new Set),A(new Set);try{const n=await Pe({pattern:"**/*",limit:Be,maxDepth:Cn});Ee(n,!1,t),T(!0)}catch{$&&W.error("Failed to refresh file tree")}finally{Q(!1)}}async function Te(t){if(!k.get(t)?.loaded){C(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await J("read",{path:U(t),full:!0}),l=Nn(o.content??"");C(f=>{const b=new Map(f);return b.set(t,{savedContent:l,editorValue:l,loaded:!0}),b})}catch{}}}async function xt(t,n){try{await J("write",{path:U(t),content:n}),fe("file saved via sandbox /write",{path:t}),K.invalidateQueries({queryKey:Ge(s,e,i)});try{const o=await dn(s,e,i);fe("git status after save",o)}catch(o){fe("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}C(o=>{const l=new Map(o),f=l.get(t);return f&&l.set(t,{...f,savedContent:n}),l})}catch(o){fe("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function ht(t){h(t),B({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),S(null),V.includes(t)||y(n=>[...n,t]),Te(t)}function gt(t){y(n=>{const o=n.filter(l=>l!==t);return d===t&&h(o[o.length-1]??null),o}),C(n=>{const o=new Map(n);return o.delete(t),o})}function Oe(t){M(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function vt(t){if(be(t,j.current))try{if(await ke(t))return}catch(n){W.error(n instanceof Error?n.message:"Failed to load folder");return}Oe(t)}async function yt(t,n){if(n){Oe(t);return}await vt(t)}async function ve(t){await P.current,await pt(t);const n=Ce(t);M(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),ht(t)}function Ct(){return v?.kind==="directory"?v.path:v?.kind==="file"?je(v.path):d?je(d):"/"}function Ae(t){const n=Ct();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const wt=wn(x,p),Le=bn(wt,g),Ie=F?Le.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Le,ee=d?k.get(d):null,bt=ee?.loaded&&ee.editorValue!==ee.savedContent,ye=Y?ot(Y.path):[],jt=(t,n)=>{L.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await xt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);S({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function Nt(t){if(!w)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${w.filePath}\``,`**Lines:** ${w.lineStart}–${w.lineEnd}`];if(w.selectedCode){const o=we(w.filePath),l=w.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),_("chat"),z({parts:[{type:"text",text:n.join(`
2
- `)}]}),S(null)}return q&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(Vt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:F,onChange:t=>H(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(_e,{children:[r.jsx(ze,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Ae("new-file"),children:r.jsx(qt,{size:14})})}),r.jsx(We,{side:"bottom",children:"New file"})]}),r.jsxs(_e,{children:[r.jsx(ze,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Ae("new-folder"),children:r.jsx(Qt,{size:14})})}),r.jsx(We,{side:"bottom",children:"New folder"})]})]}),r.jsx(Jt,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[Ie.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=g.has(n.path),b=v?.path===n.path,oe=jn(n.path,n.kind),de=l&&O.has(n.path);return r.jsx(cr,{node:n,depth:o,isExpanded:f,isSelected:b,isLoading:de,fileVisual:mr(n.name),onSelect:()=>B(n),onOpen:()=>{l?yt(n.path,f):ve(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:oe}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:oe}),onCopyPath:()=>Me("Path",me(n.path)),onCopyRelativePath:()=>Me("Relative path",U(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:oe}),onDelete:()=>ge(n)},n.path)}),$&&Ie.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:F?`No files match "${F}"`:"No files found"})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[V.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:V.map(t=>{const n=k.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ae("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{h(t),Te(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:b=>{b.stopPropagation(),gt(t)},children:r.jsx(Yt,{size:12})})]},t)})}),w&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Nt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&S(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&ee?.loaded?r.jsx(Bt,{language:we(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ee.editorValue,path:d,onChange:t=>{const n=d;n&&C(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:jt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!ee?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[bt?"Modified":"Saved"," ·"," ",we(d)]})]})]}),r.jsx(Pn,{open:D!==null,mode:D?.mode??"new-file",initialName:D?.mode==="rename"?D.node.name:"",parentLabel:D&&D.mode!=="rename"?D.parentDir==="/"?"/":U(D.parentDir):void 0,isPending:ne,onSubmit:dt,onOpenChange:t=>{!t&&!ne&&X(null)}}),r.jsx(Zt,{open:Y!==null,onOpenChange:t=>{!t&&!ne&&ge(null)},children:r.jsxs(en,{children:[r.jsxs(tn,{children:[r.jsxs(nn,{children:["Delete ",Y?.kind==="directory"?"folder":"file","?"]}),r.jsxs(rn,{children:["This will permanently delete"," ",r.jsx("span",{className:"font-mono",children:Y?.name}),Y?.kind==="directory"?" and everything inside it.":".",ye.length>0&&r.jsxs(r.Fragment,{children:[" ",ye.length===1?"One open file has unsaved changes that will be lost.":`${ye.length} open files have unsaved changes that will be lost.`]})]})]}),r.jsxs(on,{children:[r.jsx(sn,{disabled:ne,children:"Cancel"}),r.jsx(an,{disabled:ne||!Y,onClick:t=>{t.preventDefault(),Y&&ct(Y)},children:"Delete"})]})]})})]})}export{as as FileExplorer};
@@ -1 +0,0 @@
1
- import{c as it,r as E,j as e,i as rt}from"./index-D6whkmo1.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-BHJOnqPN.js";import{A as nt}from"./automation-runs-CXeBUZZT.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-uWTU4DBx.js";import{r as xt}from"./index-BqgqTUP7.js";import"./LayoutLeft-B1Z144hH.js";import"./use-mobile-CPWXKFzD.js";import"./X-7l7BVVB_.js";import"./tooltip-CpDhWfRr.js";import"./select-v3wCe2bG.js";import"./Check-COLMJMUs.js";import"./ChevronDown-UqCuvv6I.js";import"./ChevronUp-BNA1jD0m.js";import"./useInfiniteQuery-CCvvO116.js";import"./use-infinite-scroll-baSeSjpY.js";import"./use-connection-BGDyHdoT.js";import"./use-collections-BuOOKjak.js";import"./use-mcp-client-Ce-pPK0j.js";import"./constants-D_FQAPnt.js";import"./auth-BDfI4Ipl.js";import"./use-virtual-mcp-DOgvxTfb.js";import"./card-DWFNe_ip.js";import"./table-D5dnbyO4.js";import"./empty-state-CdoNqdxU.js";import"./use-members-DRMdGYjk.js";import"./use-org-auth-client-BZV1UC0y.js";import"./use-clock-tick-CH_1W6Ci.js";import"./AlertCircle-DOQWM7yj.js";import"./CheckCircle-Bl41PcZH.js";import"./Circle-BnaPA3or.js";import"./agent-icon-BCinMFUd.js";import"./UserPlus01-Rj2Ktpxi.js";import"./Tool01-BXqlXLVI.js";import"./ArrowUp-WifcuNli.js";import"./Settings02-thOMLnyU.js";import"./Tool02-Uo_gZrwr.js";import"./XCircle-BiXqTZVD.js";import"./ArrowUpRight-JeluVocp.js";import"./TrendUp01-B8VmlnJF.js";import"./ZapSquare-jEW6LZa8.js";import"./Users03-C0i17d43.js";import"./ChevronRight-d32DqyAn.js";import"./Stars02-BXTeUNf6.js";import"./Copy01-CsI0mLRH.js";import"./ZoomOut-B6sgrlFH.js";import"./DotsVertical-iYdY7zYC.js";import"./Globe01-BpPlcyCE.js";import"./Eye-efXEe1EJ.js";import"./FilterLines-8ufs9yTV.js";import"./Flag01-lsxhm65v.js";import"./Star01-D1CNqVH7.js";import"./Globe04-zhH5vlqE.js";import"./SwitchHorizontal01-CNf4ZPpA.js";import"./HardDrive-Ca8W7hZx.js";import"./Key01-DIasRBRK.js";import"./LinkExternal01-BH16zivO.js";import"./List-BcK62Ete.js";import"./Monitor01-vwbiFg7-.js";import"./Sun-aBvHDIcJ.js";import"./Package-QOjP8Z0p.js";import"./Palette-CVU88SIy.js";import"./Play-BKQHpU1v.js";import"./Plus-Cxs4hnDc.js";import"./SearchLg-CODngl9Y.js";import"./SearchMd-AqN1Y-0P.js";import"./Shield01-CUY0ruff.js";import"./Stars01-C6m2iaNT.js";import"./Trash01-BYIWRCHw.js";import"./Upload01-yS8q4CkE.js";import"./User01-D8WZjBgD.js";import"./Users01-yyBehRtX.js";import"./XClose-DkPjPT4r.js";import"./Zap-CVZe2GzA.js";import"./use-automations-Bgu1Rzbj.js";import"./studio-tools-DB-gLliX.js";import"./useSuspenseInfiniteQuery-C6Z6zXH6.js";import"./avatar-D_cXePkr.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BB1fcpJC.js";import"./file-type-icon-B5scAfJk.js";import"./dialog-DQH_8BAd.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-CVvDv3_E.js";import"./index-BvWpZ0-L.js";import"./chat-context-CfSMAPpU.js";import"./autosend-BRgI5RcN.js";import"./hooks-P6IUphrX.js";import"./decopilot-sse-pool-BgOjox9_.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BNTura7E.js";import"./use-decopilot-events-CbFab9Rb.js";import"./use-organization-settings-BM1-Insr.js";import"./index-B5StyM2a.js";import"./shell-layout-1GeogLLP.js";import"./alert-dialog-_zwmZR_i.js";import"./required-auth-layout-C-NJlT8E.js";import"./use-org-sso-D1QMEo58.js";import"./integration-icon-nDeyr6mn.js";import"./use-navigate-to-agent-D7fNzjPO.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-1ywm-l2b.js";import"./form-ByTU0Cly.js";import"./label-BxinNvBF.js";import"./input-IjHWHImM.js";import"./switch-CTMzHyoH.js";import"./drawer-BNFKWcDe.js";import"./collection-search-DveDUn2F.js";import"./tabs-BF4rPtmv.js";import"./toggle-group-BbM5845C.js";import"./use-deco-credits-DMWaYlnJ.js";import"./extract-connection-data-CzDN7pev.js";import"./connection-card-BVQgFmSN.js";import"./use-registry-connections-B-AEwYvy.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BLB_Euaj.js";import"./connection-form-helpers-BCD6xdaF.js";import"./authenticate-and-persist-oauth-nL5dtC3N.js";import"./mcp-oauth-DFEfNs3t.js";import"./collection-tabs-HYnroapF.js";import"./badge-Bpfre86_.js";import"./connect-desktop-dialog-BcQaaaVX.js";import"./select-model-CLgTKSyQ.js";import"./checkbox-B7e0eG8m.js";import"./skeleton-BmY9-yN1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C1r845kr.js";import"./command-BCtGIdPc.js";import"./index-Bypw1Rxz.js";import"./popover-DB7N8J-i.js";import"./dropdown-menu-Bj1wkrPx.js";import"./index-C9BrtmzN.js";import"./toolbar-BWEF_KFg.js";import"./use-debounced-value-DC_bzuLQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DtY7DQvn.js";import"./use-mcp-tools-BJv-c3VV.js";import"./use-capability-DLvM-ZfC.js";import"./use-debounced-autosave-t7SFS9vg.js";import"./index-7JXY5Y9q.js";import"./search-input-95KvAv-S.js";import"./use-mcp-auth-status-DlSEdSrP.js";import"./github-repo-picker-DSe0rOWS.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-Bu_LLVN7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-C8dQXik0.js";import"./index-BaTFSlF7.js";import"./get-initials-D-f_fDFw.js";import"./calendar-BacAPnx0.js";import"./toolbar-icon-button-OKrdUGuN.js";import"./use-file-configs-Bve45UbB.js";import"./automation-list-row-BxuQmtaB.js";function vi(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const A=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==V||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{vi as SeoSheet};
@@ -1 +0,0 @@
1
- import{c as L,C as H,j as U}from"./index-D6whkmo1.js";import{a as O,g as $,s as E}from"./automation-runs-CXeBUZZT.js";import{u as k}from"./use-mcp-client-Ce-pPK0j.js";import{p as B}from"./constants-D_FQAPnt.js";import{b as V,c as Y}from"./use-mcp-tools-BJv-c3VV.js";import{u as q}from"./index-BqgqTUP7.js";import{c as G}from"./monaco-editor-CVvDv3_E.js";import{g as K,M as W,a as D}from"./index-B5StyM2a.js";import{b as z,a as F}from"./chat-context-CfSMAPpU.js";import{u as J}from"./shell-layout-1GeogLLP.js";import{O as Q}from"./tab-id-BijBBRwE.js";import"./select-v3wCe2bG.js";import"./tooltip-CpDhWfRr.js";import"./Check-COLMJMUs.js";import"./ChevronDown-UqCuvv6I.js";import"./ChevronUp-BNA1jD0m.js";import"./useInfiniteQuery-CCvvO116.js";import"./use-infinite-scroll-baSeSjpY.js";import"./use-connection-BGDyHdoT.js";import"./use-collections-BuOOKjak.js";import"./use-virtual-mcp-DOgvxTfb.js";import"./card-DWFNe_ip.js";import"./sidebar-BHJOnqPN.js";import"./LayoutLeft-B1Z144hH.js";import"./use-mobile-CPWXKFzD.js";import"./X-7l7BVVB_.js";import"./table-D5dnbyO4.js";import"./empty-state-CdoNqdxU.js";import"./use-members-DRMdGYjk.js";import"./use-org-auth-client-BZV1UC0y.js";import"./use-clock-tick-CH_1W6Ci.js";import"./AlertCircle-DOQWM7yj.js";import"./CheckCircle-Bl41PcZH.js";import"./Circle-BnaPA3or.js";import"./agent-icon-BCinMFUd.js";import"./UserPlus01-Rj2Ktpxi.js";import"./Tool01-BXqlXLVI.js";import"./ArrowUp-WifcuNli.js";import"./Settings02-thOMLnyU.js";import"./Tool02-Uo_gZrwr.js";import"./XCircle-BiXqTZVD.js";import"./ArrowUpRight-JeluVocp.js";import"./TrendUp01-B8VmlnJF.js";import"./ZapSquare-jEW6LZa8.js";import"./Users03-C0i17d43.js";import"./ChevronRight-d32DqyAn.js";import"./Stars02-BXTeUNf6.js";import"./Copy01-CsI0mLRH.js";import"./ZoomOut-B6sgrlFH.js";import"./DotsVertical-iYdY7zYC.js";import"./Globe01-BpPlcyCE.js";import"./Eye-efXEe1EJ.js";import"./FilterLines-8ufs9yTV.js";import"./Flag01-lsxhm65v.js";import"./Star01-D1CNqVH7.js";import"./Globe04-zhH5vlqE.js";import"./SwitchHorizontal01-CNf4ZPpA.js";import"./HardDrive-Ca8W7hZx.js";import"./Key01-DIasRBRK.js";import"./LinkExternal01-BH16zivO.js";import"./List-BcK62Ete.js";import"./Monitor01-vwbiFg7-.js";import"./Sun-aBvHDIcJ.js";import"./Package-QOjP8Z0p.js";import"./Palette-CVU88SIy.js";import"./Play-BKQHpU1v.js";import"./Plus-Cxs4hnDc.js";import"./SearchLg-CODngl9Y.js";import"./SearchMd-AqN1Y-0P.js";import"./Shield01-CUY0ruff.js";import"./Stars01-C6m2iaNT.js";import"./Trash01-BYIWRCHw.js";import"./Upload01-yS8q4CkE.js";import"./User01-D8WZjBgD.js";import"./Users01-yyBehRtX.js";import"./XClose-DkPjPT4r.js";import"./Zap-CVZe2GzA.js";import"./use-automations-Bgu1Rzbj.js";import"./studio-tools-DB-gLliX.js";import"./useSuspenseInfiniteQuery-C6Z6zXH6.js";import"./avatar-D_cXePkr.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BB1fcpJC.js";import"./file-type-icon-B5scAfJk.js";import"./dialog-DQH_8BAd.js";import"./hooks-P6IUphrX.js";import"./decopilot-sse-pool-BgOjox9_.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-nDeyr6mn.js";import"./use-navigate-to-agent-D7fNzjPO.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-1ywm-l2b.js";import"./form-ByTU0Cly.js";import"./label-BxinNvBF.js";import"./input-IjHWHImM.js";import"./auth-BDfI4Ipl.js";import"./drawer-BNFKWcDe.js";import"./collection-search-DveDUn2F.js";import"./autosend-BRgI5RcN.js";import"./tabs-BF4rPtmv.js";import"./toggle-group-BbM5845C.js";import"./use-deco-credits-DMWaYlnJ.js";import"./extract-connection-data-CzDN7pev.js";import"./connection-card-BVQgFmSN.js";import"./use-registry-connections-B-AEwYvy.js";import"./use-organization-settings-BM1-Insr.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BLB_Euaj.js";import"./connection-form-helpers-BCD6xdaF.js";import"./authenticate-and-persist-oauth-nL5dtC3N.js";import"./mcp-oauth-DFEfNs3t.js";import"./collection-tabs-HYnroapF.js";import"./badge-Bpfre86_.js";import"./use-ai-providers-BNTura7E.js";import"./connect-desktop-dialog-BcQaaaVX.js";import"./select-model-CLgTKSyQ.js";import"./checkbox-B7e0eG8m.js";import"./skeleton-BmY9-yN1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C1r845kr.js";import"./command-BCtGIdPc.js";import"./index-Bypw1Rxz.js";import"./popover-DB7N8J-i.js";import"./dropdown-menu-Bj1wkrPx.js";import"./index-C9BrtmzN.js";import"./alert-dialog-_zwmZR_i.js";import"./toolbar-BWEF_KFg.js";import"./use-debounced-value-DC_bzuLQ.js";import"./index-BvWpZ0-L.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DtY7DQvn.js";import"./use-decopilot-events-CbFab9Rb.js";import"./use-capability-DLvM-ZfC.js";import"./switch-CTMzHyoH.js";import"./use-debounced-autosave-t7SFS9vg.js";import"./index-7JXY5Y9q.js";import"./search-input-95KvAv-S.js";import"./use-mcp-auth-status-DlSEdSrP.js";import"./github-repo-picker-DSe0rOWS.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-Bu_LLVN7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-C8dQXik0.js";import"./index-BaTFSlF7.js";import"./get-initials-D-f_fDFw.js";import"./calendar-BacAPnx0.js";import"./toolbar-icon-button-OKrdUGuN.js";import"./use-file-configs-Bve45UbB.js";import"./automation-list-row-BxuQmtaB.js";import"./required-auth-layout-C-NJlT8E.js";import"./use-org-sso-D1QMEo58.js";const X="studio://navigate";function Z(M){const[t]=M;if(M.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null;try{o=new URL(t.uri).searchParams.get("main")}catch{}return{isNavigate:!0,tab:o&&Q.has(o)?o:null}}const tt={};function ot(M){const t=L.c(38),{client:o,resourceURI:I,tool:i,connectionId:p,orgId:a,args:v}=M,{sendMessage:C}=z(),{setAppContext:d,clearAppContext:l}=F(),{openSidePanel:g,openTab:s}=J(),r=`${p}:${i.name}`;let c;t[0]!==s?(c=x=>x==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=c):c=t[1];const m=c,n=v??tt;let u;t[2]!==o||t[3]!==i.name||t[4]!==n?(u={client:o,toolName:i.name,toolArguments:n},t[2]=o,t[3]=i.name,t[4]=n,t[5]=u):u=t[5];const{data:e}=Y(u);let h;if(t[6]!==i._meta||t[7]!==i.name){const x=$(i._meta);h=E(i.name,x),t[6]=i._meta,t[7]=i.name,t[8]=h}else h=t[8];const A=h;let f;t[9]!==i.inputSchema?(f=i.inputSchema??{type:"object"},t[9]=i.inputSchema,t[10]=f):f=t[10];let R;t[11]!==A||t[12]!==f||t[13]!==i?(R={...i,name:A,inputSchema:f},t[11]=A,t[12]=f,t[13]=i,t[14]=R):R=t[14];const b=R;let _;t[15]!==g||t[16]!==s||t[17]!==C?(_=x=>{const j=Z(x.content);if(j.isNavigate){j.tab&&s(j.tab);return}const w=G(x.content);w.content.length>0&&(g("chat"),C({tiptapDoc:w}))},t[15]=g,t[16]=s,t[17]=C,t[18]=_):_=t[18];const y=_;let P;t[19]!==b?(P={tool:b},t[19]=b,t[20]=P):P=t[20];let N;t[21]!==d||t[22]!==r?(N=x=>d(r,x),t[21]=d,t[22]=r,t[23]=N):N=t[23];let T;t[24]!==l||t[25]!==r?(T=()=>l(r),t[24]=l,t[25]=r,t[26]=T):T=t[26];let S;return t[27]!==o||t[28]!==y||t[29]!==m||t[30]!==a||t[31]!==I||t[32]!==P||t[33]!==N||t[34]!==T||t[35]!==n||t[36]!==e?(S=U.jsx(W,{resourceURI:I,orgId:a,toolInfo:P,toolInput:n,toolResult:e,displayMode:"fullscreen",minHeight:D.fullscreen.minHeight,maxHeight:D.fullscreen.maxHeight,client:o,onMessage:y,onUpdateModelContext:N,onTeardown:T,onRequestDisplayMode:m,className:"h-full"}),t[27]=o,t[28]=y,t[29]=m,t[30]=a,t[31]=I,t[32]=P,t[33]=N,t[34]=T,t[35]=n,t[36]=e,t[37]=S):S=t[37],S}function Fi(M){const t=L.c(24),{connectionId:o,toolName:I,args:i}=M,{org:p}=H(),a=q();let v;t[0]!==o||t[1]!==a?(v=B(o)&&a.vmEntry?.sandboxProviderKind==="user-desktop"&&a.previewUrl?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=o,t[1]=a,t[2]=v):v=t[2];const C=v;let d;t[3]!==o||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(d={connectionId:o,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=o,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=d):d=t[7];const l=k(d);let g;t[8]!==l?(g={client:l},t[8]=l,t[9]=g):g=t[9];const{data:s}=V(g);let r,c,m;t[10]!==I||t[11]!==s.tools?(r=O(decodeURIComponent(I)),m=s.tools.find(e=>e.name===r)??s.tools.find(e=>{const h=$(e._meta);if(!h)return!1;if(E(e.name,h)===r)return!0;const f=E(r,h);return f!==r&&e.name===f}),c=m?._meta?K(m._meta):void 0,t[10]=I,t[11]=s.tools,t[12]=r,t[13]=c,t[14]=m):(r=t[12],c=t[13],m=t[14]);const n=c;if(!m||!n){let e;return t[15]!==r?(e=U.jsx("div",{className:"flex items-center justify-center h-full w-full",children:U.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=e):e=t[16],e}let u;return t[17]!==i||t[18]!==l||t[19]!==o||t[20]!==p.id||t[21]!==n||t[22]!==m?(u=U.jsx(ot,{client:l,resourceURI:n,tool:m,connectionId:o,orgId:p.id,args:i}),t[17]=i,t[18]=l,t[19]=o,t[20]=p.id,t[21]=n,t[22]=m,t[23]=u):u=t[23],u}export{Fi as AppViewContent};
@@ -1 +0,0 @@
1
- import{c as C,j as o}from"./index-D6whkmo1.js";import{I as B}from"./input-IjHWHImM.js";import{L as T}from"./label-BxinNvBF.js";import{S as L,a as A,b as R,c as z,d as O}from"./select-v3wCe2bG.js";import{T as V}from"./textarea-BLB_Euaj.js";import{v as D,w as J,o as K,x as M,I as _}from"./index-BqgqTUP7.js";import{s as F}from"./primitives-DMbEInAr.js";import{u as $}from"./use-autosave-CR_KZQug.js";import"./tooltip-CpDhWfRr.js";import"./Check-COLMJMUs.js";import"./ChevronDown-UqCuvv6I.js";import"./ChevronUp-BNA1jD0m.js";import"./ArrowUp-WifcuNli.js";import"./chat-context-CfSMAPpU.js";import"./autosend-BRgI5RcN.js";import"./hooks-P6IUphrX.js";import"./use-mcp-client-Ce-pPK0j.js";import"./constants-D_FQAPnt.js";import"./auth-BDfI4Ipl.js";import"./decopilot-sse-pool-BgOjox9_.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-DB-gLliX.js";import"./use-virtual-mcp-DOgvxTfb.js";import"./use-collections-BuOOKjak.js";import"./use-ai-providers-BNTura7E.js";import"./use-decopilot-events-CbFab9Rb.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-BM1-Insr.js";import"./automation-runs-CXeBUZZT.js";import"./useInfiniteQuery-CCvvO116.js";import"./use-infinite-scroll-baSeSjpY.js";import"./use-connection-BGDyHdoT.js";import"./card-DWFNe_ip.js";import"./sidebar-BHJOnqPN.js";import"./LayoutLeft-B1Z144hH.js";import"./use-mobile-CPWXKFzD.js";import"./X-7l7BVVB_.js";import"./table-D5dnbyO4.js";import"./empty-state-CdoNqdxU.js";import"./use-members-DRMdGYjk.js";import"./use-org-auth-client-BZV1UC0y.js";import"./use-clock-tick-CH_1W6Ci.js";import"./AlertCircle-DOQWM7yj.js";import"./CheckCircle-Bl41PcZH.js";import"./Circle-BnaPA3or.js";import"./agent-icon-BCinMFUd.js";import"./UserPlus01-Rj2Ktpxi.js";import"./Tool01-BXqlXLVI.js";import"./Settings02-thOMLnyU.js";import"./Tool02-Uo_gZrwr.js";import"./XCircle-BiXqTZVD.js";import"./ArrowUpRight-JeluVocp.js";import"./TrendUp01-B8VmlnJF.js";import"./ZapSquare-jEW6LZa8.js";import"./Users03-C0i17d43.js";import"./ChevronRight-d32DqyAn.js";import"./Stars02-BXTeUNf6.js";import"./Copy01-CsI0mLRH.js";import"./ZoomOut-B6sgrlFH.js";import"./DotsVertical-iYdY7zYC.js";import"./Globe01-BpPlcyCE.js";import"./Eye-efXEe1EJ.js";import"./FilterLines-8ufs9yTV.js";import"./Flag01-lsxhm65v.js";import"./Star01-D1CNqVH7.js";import"./Globe04-zhH5vlqE.js";import"./SwitchHorizontal01-CNf4ZPpA.js";import"./HardDrive-Ca8W7hZx.js";import"./Key01-DIasRBRK.js";import"./LinkExternal01-BH16zivO.js";import"./List-BcK62Ete.js";import"./Monitor01-vwbiFg7-.js";import"./Sun-aBvHDIcJ.js";import"./Package-QOjP8Z0p.js";import"./Palette-CVU88SIy.js";import"./Play-BKQHpU1v.js";import"./Plus-Cxs4hnDc.js";import"./SearchLg-CODngl9Y.js";import"./SearchMd-AqN1Y-0P.js";import"./Shield01-CUY0ruff.js";import"./Stars01-C6m2iaNT.js";import"./Trash01-BYIWRCHw.js";import"./Upload01-yS8q4CkE.js";import"./User01-D8WZjBgD.js";import"./Users01-yyBehRtX.js";import"./XClose-DkPjPT4r.js";import"./Zap-CVZe2GzA.js";import"./use-automations-Bgu1Rzbj.js";import"./useSuspenseInfiniteQuery-C6Z6zXH6.js";import"./avatar-D_cXePkr.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BB1fcpJC.js";import"./file-type-icon-B5scAfJk.js";import"./dialog-DQH_8BAd.js";import"./monaco-editor-CVvDv3_E.js";import"./index-BvWpZ0-L.js";import"./index-B5StyM2a.js";import"./shell-layout-1GeogLLP.js";import"./alert-dialog-_zwmZR_i.js";import"./required-auth-layout-C-NJlT8E.js";import"./use-org-sso-D1QMEo58.js";import"./integration-icon-nDeyr6mn.js";import"./use-navigate-to-agent-D7fNzjPO.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-1ywm-l2b.js";import"./form-ByTU0Cly.js";import"./drawer-BNFKWcDe.js";import"./collection-search-DveDUn2F.js";import"./tabs-BF4rPtmv.js";import"./toggle-group-BbM5845C.js";import"./use-deco-credits-DMWaYlnJ.js";import"./extract-connection-data-CzDN7pev.js";import"./connection-card-BVQgFmSN.js";import"./use-registry-connections-B-AEwYvy.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-BCD6xdaF.js";import"./authenticate-and-persist-oauth-nL5dtC3N.js";import"./mcp-oauth-DFEfNs3t.js";import"./collection-tabs-HYnroapF.js";import"./badge-Bpfre86_.js";import"./connect-desktop-dialog-BcQaaaVX.js";import"./select-model-CLgTKSyQ.js";import"./checkbox-B7e0eG8m.js";import"./skeleton-BmY9-yN1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C1r845kr.js";import"./command-BCtGIdPc.js";import"./index-Bypw1Rxz.js";import"./popover-DB7N8J-i.js";import"./dropdown-menu-Bj1wkrPx.js";import"./index-C9BrtmzN.js";import"./toolbar-BWEF_KFg.js";import"./use-debounced-value-DC_bzuLQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DtY7DQvn.js";import"./use-mcp-tools-BJv-c3VV.js";import"./use-capability-DLvM-ZfC.js";import"./switch-CTMzHyoH.js";import"./use-debounced-autosave-t7SFS9vg.js";import"./index-7JXY5Y9q.js";import"./search-input-95KvAv-S.js";import"./use-mcp-auth-status-DlSEdSrP.js";import"./github-repo-picker-DSe0rOWS.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-Bu_LLVN7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-C8dQXik0.js";import"./index-BaTFSlF7.js";import"./get-initials-D-f_fDFw.js";import"./calendar-BacAPnx0.js";import"./toolbar-icon-button-OKrdUGuN.js";import"./use-file-configs-Bve45UbB.js";import"./automation-list-row-BxuQmtaB.js";const q={authors:[{key:"name",label:"Name",widget:"text"},{key:"type",label:"Type",widget:"select",options:[{value:"Person",label:"Person"},{value:"Organization",label:"Organization"}]},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},G={authors:"Author"};function _o(g){const t=C.c(34),{orgSlug:j,virtualMcpId:w,branch:S,kind:e,blockKey:h,block:E}=g;let y;t[0]!==S||t[1]!==j||t[2]!==w?(y={orgSlug:j,virtualMcpId:w,branch:S},t[0]=S,t[1]=j,t[2]=w,t[3]=y):y=t[3];const m=D(y);let d;t[4]!==E||t[5]!==e?(d=J(E,e),t[4]=E,t[5]=e,t[6]=d):d=t[6];const f=d;let k;t[7]!==h||t[8]!==e||t[9]!==m?(k=a=>{m.mutate({blockKey:h,data:M(h,e,a)})},t[7]=h,t[8]=e,t[9]=m,t[10]=k):k=t[10];const[i,N]=$(f,k);let b;t[11]!==i||t[12]!==N?(b=(a,r)=>N({...i,[a]:r}),t[11]=i,t[12]=N,t[13]=b):b=t[13];const p=b,I=G[e];let l;t[14]!==I?(l=o.jsx("span",{className:"text-sm font-medium",children:I}),t[14]=I,t[15]=l):l=t[15];let n;t[16]!==m.isError||t[17]!==m.isPending?(n=o.jsx(K,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=n):n=t[18];let c;t[19]!==l||t[20]!==n?(c=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[l,n]}),t[19]=l,t[20]=n,t[21]=c):c=t[21];const P=q[e];let u;if(t[22]!==i||t[23]!==p||t[24]!==P){let a;t[26]!==i||t[27]!==p?(a=r=>o.jsx("div",{className:"space-y-2",children:r.widget==="image"?o.jsx(_,{schema:{type:"string",format:"image-uri",title:r.label},value:i[r.key],onChange:s=>p(r.key,s),path:r.key,label:r.label}):r.widget==="select"?o.jsxs(o.Fragment,{children:[o.jsx(T,{htmlFor:r.key,children:r.label}),o.jsxs(L,{value:F(i[r.key])||r.options?.[0]?.value,onValueChange:s=>p(r.key,s),children:[o.jsx(A,{id:r.key,className:"h-10 w-full",children:o.jsx(R,{placeholder:r.label})}),o.jsx(z,{children:(r.options??[]).map(H)})]})]}):o.jsxs(o.Fragment,{children:[o.jsx(T,{htmlFor:r.key,children:r.label}),r.widget==="textarea"?o.jsx(V,{id:r.key,value:F(i[r.key]),onChange:s=>p(r.key,s.target.value),rows:3}):o.jsx(B,{id:r.key,value:F(i[r.key]),placeholder:r.placeholder,onChange:s=>p(r.key,s.target.value),className:"h-10"})]})},r.key),t[26]=i,t[27]=p,t[28]=a):a=t[28],u=P.map(a),t[22]=i,t[23]=p,t[24]=P,t[25]=u}else u=t[25];let x;t[29]!==u?(x=o.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:u})}),t[29]=u,t[30]=x):x=t[30];let v;return t[31]!==x||t[32]!==c?(v=o.jsxs("div",{className:"flex h-full flex-col",children:[c,x]}),t[31]=x,t[32]=c,t[33]=v):v=t[33],v}function H(g){return o.jsx(O,{value:g.value,children:g.label},g.value)}export{_o as RecordEditor};
@@ -1 +0,0 @@
1
- import{c as X,j as t}from"./index-D6whkmo1.js";import{C as Y}from"./checkbox-B7e0eG8m.js";import{I as K}from"./input-IjHWHImM.js";import{L as q}from"./label-BxinNvBF.js";import{c as z,S as G,d as H,a as J,b as Z}from"./select-v3wCe2bG.js";import{k as ee,aV as te,o as re,aW as M,aX as ie}from"./index-BqgqTUP7.js";import{u as oe}from"./use-autosave-CR_KZQug.js";import"./Check-COLMJMUs.js";import"./tooltip-CpDhWfRr.js";import"./ChevronDown-UqCuvv6I.js";import"./ChevronUp-BNA1jD0m.js";import"./ArrowUp-WifcuNli.js";import"./chat-context-CfSMAPpU.js";import"./autosend-BRgI5RcN.js";import"./hooks-P6IUphrX.js";import"./use-mcp-client-Ce-pPK0j.js";import"./constants-D_FQAPnt.js";import"./auth-BDfI4Ipl.js";import"./decopilot-sse-pool-BgOjox9_.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-DB-gLliX.js";import"./use-virtual-mcp-DOgvxTfb.js";import"./use-collections-BuOOKjak.js";import"./use-ai-providers-BNTura7E.js";import"./use-decopilot-events-CbFab9Rb.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-BM1-Insr.js";import"./automation-runs-CXeBUZZT.js";import"./useInfiniteQuery-CCvvO116.js";import"./use-infinite-scroll-baSeSjpY.js";import"./use-connection-BGDyHdoT.js";import"./card-DWFNe_ip.js";import"./sidebar-BHJOnqPN.js";import"./LayoutLeft-B1Z144hH.js";import"./use-mobile-CPWXKFzD.js";import"./X-7l7BVVB_.js";import"./table-D5dnbyO4.js";import"./empty-state-CdoNqdxU.js";import"./use-members-DRMdGYjk.js";import"./use-org-auth-client-BZV1UC0y.js";import"./use-clock-tick-CH_1W6Ci.js";import"./AlertCircle-DOQWM7yj.js";import"./CheckCircle-Bl41PcZH.js";import"./Circle-BnaPA3or.js";import"./agent-icon-BCinMFUd.js";import"./UserPlus01-Rj2Ktpxi.js";import"./Tool01-BXqlXLVI.js";import"./Settings02-thOMLnyU.js";import"./Tool02-Uo_gZrwr.js";import"./XCircle-BiXqTZVD.js";import"./ArrowUpRight-JeluVocp.js";import"./TrendUp01-B8VmlnJF.js";import"./ZapSquare-jEW6LZa8.js";import"./Users03-C0i17d43.js";import"./ChevronRight-d32DqyAn.js";import"./Stars02-BXTeUNf6.js";import"./Copy01-CsI0mLRH.js";import"./ZoomOut-B6sgrlFH.js";import"./DotsVertical-iYdY7zYC.js";import"./Globe01-BpPlcyCE.js";import"./Eye-efXEe1EJ.js";import"./FilterLines-8ufs9yTV.js";import"./Flag01-lsxhm65v.js";import"./Star01-D1CNqVH7.js";import"./Globe04-zhH5vlqE.js";import"./SwitchHorizontal01-CNf4ZPpA.js";import"./HardDrive-Ca8W7hZx.js";import"./Key01-DIasRBRK.js";import"./LinkExternal01-BH16zivO.js";import"./List-BcK62Ete.js";import"./Monitor01-vwbiFg7-.js";import"./Sun-aBvHDIcJ.js";import"./Package-QOjP8Z0p.js";import"./Palette-CVU88SIy.js";import"./Play-BKQHpU1v.js";import"./Plus-Cxs4hnDc.js";import"./SearchLg-CODngl9Y.js";import"./SearchMd-AqN1Y-0P.js";import"./Shield01-CUY0ruff.js";import"./Stars01-C6m2iaNT.js";import"./Trash01-BYIWRCHw.js";import"./Upload01-yS8q4CkE.js";import"./User01-D8WZjBgD.js";import"./Users01-yyBehRtX.js";import"./XClose-DkPjPT4r.js";import"./Zap-CVZe2GzA.js";import"./use-automations-Bgu1Rzbj.js";import"./useSuspenseInfiniteQuery-C6Z6zXH6.js";import"./avatar-D_cXePkr.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BB1fcpJC.js";import"./file-type-icon-B5scAfJk.js";import"./dialog-DQH_8BAd.js";import"./monaco-editor-CVvDv3_E.js";import"./index-BvWpZ0-L.js";import"./index-B5StyM2a.js";import"./shell-layout-1GeogLLP.js";import"./alert-dialog-_zwmZR_i.js";import"./required-auth-layout-C-NJlT8E.js";import"./use-org-sso-D1QMEo58.js";import"./integration-icon-nDeyr6mn.js";import"./use-navigate-to-agent-D7fNzjPO.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-1ywm-l2b.js";import"./form-ByTU0Cly.js";import"./drawer-BNFKWcDe.js";import"./collection-search-DveDUn2F.js";import"./tabs-BF4rPtmv.js";import"./toggle-group-BbM5845C.js";import"./use-deco-credits-DMWaYlnJ.js";import"./extract-connection-data-CzDN7pev.js";import"./connection-card-BVQgFmSN.js";import"./use-registry-connections-B-AEwYvy.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BLB_Euaj.js";import"./connection-form-helpers-BCD6xdaF.js";import"./authenticate-and-persist-oauth-nL5dtC3N.js";import"./mcp-oauth-DFEfNs3t.js";import"./collection-tabs-HYnroapF.js";import"./badge-Bpfre86_.js";import"./connect-desktop-dialog-BcQaaaVX.js";import"./select-model-CLgTKSyQ.js";import"./skeleton-BmY9-yN1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C1r845kr.js";import"./command-BCtGIdPc.js";import"./index-Bypw1Rxz.js";import"./popover-DB7N8J-i.js";import"./dropdown-menu-Bj1wkrPx.js";import"./index-C9BrtmzN.js";import"./toolbar-BWEF_KFg.js";import"./use-debounced-value-DC_bzuLQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DtY7DQvn.js";import"./use-mcp-tools-BJv-c3VV.js";import"./use-capability-DLvM-ZfC.js";import"./switch-CTMzHyoH.js";import"./use-debounced-autosave-t7SFS9vg.js";import"./index-7JXY5Y9q.js";import"./search-input-95KvAv-S.js";import"./use-mcp-auth-status-DlSEdSrP.js";import"./github-repo-picker-DSe0rOWS.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-Bu_LLVN7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-C8dQXik0.js";import"./index-BaTFSlF7.js";import"./get-initials-D-f_fDFw.js";import"./calendar-BacAPnx0.js";import"./toolbar-icon-button-OKrdUGuN.js";import"./use-file-configs-Bve45UbB.js";import"./automation-list-row-BxuQmtaB.js";const me=[{value:"temporary",label:`Temporary (${M.temporary})`},{value:"permanent",label:`Permanent (${M.permanent})`}];function ei(S){const e=X.c(62),{orgSlug:V,virtualMcpId:$,branch:A,blockKey:B,block:D}=S;let _;e[0]!==A||e[1]!==V||e[2]!==$?(_={orgSlug:V,virtualMcpId:$,branch:A},e[0]=A,e[1]=V,e[2]=$,e[3]=_):_=e[3];const m=ee(_);let g;e[4]!==D?(g=te(D),e[4]=D,e[5]=g):g=e[5];const W=g;let v;e[6]!==B||e[7]!==m?(v=o=>{m.mutate({blockKey:B,data:ie(o)})},e[6]=B,e[7]=m,e[8]=v):v=e[8];const[r,O]=oe(W,v);let N;e[9]!==r||e[10]!==O?(N=o=>O({...r,...o}),e[9]=r,e[10]=O,e[11]=N):N=e[11];const i=N;let P;e[12]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("span",{className:"text-sm font-medium",children:"Redirect"}),e[12]=P):P=e[12];let p;e[13]!==m.isError||e[14]!==m.isPending?(p=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[P,t.jsx(re,{isPending:m.isPending,isError:m.isError})]}),e[13]=m.isError,e[14]=m.isPending,e[15]=p):p=e[15];let T;e[16]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(q,{htmlFor:"redirect-from",children:"From"}),e[16]=T):T=e[16];let s;e[17]!==i?(s=o=>i({from:o.target.value}),e[17]=i,e[18]=s):s=e[18];let l;e[19]!==r.from||e[20]!==s?(l=t.jsx(K,{id:"redirect-from",value:r.from,placeholder:"/old-path",onChange:s,className:"h-10"}),e[19]=r.from,e[20]=s,e[21]=l):l=e[21];let E;e[22]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsxs("p",{className:"text-xs text-muted-foreground",children:["The source path to match. Supports URLPattern syntax (e.g."," ",t.jsx("code",{children:"/product/:slug"}),")."]}),e[22]=E):E=e[22];let a;e[23]!==l?(a=t.jsxs("div",{className:"space-y-2",children:[T,l,E]}),e[23]=l,e[24]=a):a=e[24];let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(q,{htmlFor:"redirect-to",children:"To"}),e[25]=R):R=e[25];let c;e[26]!==i?(c=o=>i({to:o.target.value}),e[26]=i,e[27]=c):c=e[27];let n;e[28]!==r.to||e[29]!==c?(n=t.jsx(K,{id:"redirect-to",value:r.to,placeholder:"/new-path",onChange:c,className:"h-10"}),e[28]=r.to,e[29]=c,e[30]=n):n=e[30];let k;e[31]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-xs text-muted-foreground",children:"The destination — a relative path or an absolute URL."}),e[31]=k):k=e[31];let d;e[32]!==n?(d=t.jsxs("div",{className:"space-y-2",children:[R,n,k]}),e[32]=n,e[33]=d):d=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(q,{htmlFor:"redirect-type",children:"Type"}),e[34]=C):C=e[34];let f;e[35]!==i?(f=o=>i({type:o}),e[35]=i,e[36]=f):f=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(J,{id:"redirect-type",className:"h-10 w-full",children:t.jsx(Z,{placeholder:"Type"})}),e[37]=w):w=e[37];let I;e[38]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(z,{children:me.map(pe)}),e[38]=I):I=e[38];let h;e[39]!==r.type||e[40]!==f?(h=t.jsxs(G,{value:r.type,onValueChange:f,children:[w,I]}),e[39]=r.type,e[40]=f,e[41]=h):h=e[41];let F;e[42]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx("strong",{children:"Temporary"}),e[42]=F):F=e[42];let L;e[43]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Use ",F," when the redirect may change;"," ",t.jsx("strong",{children:"Permanent"})," lets browsers cache it."]}),e[43]=L):L=e[43];let x;e[44]!==h?(x=t.jsxs("div",{className:"space-y-2",children:[C,h,L]}),e[44]=h,e[45]=x):x=e[45];let u;e[46]!==i?(u=o=>i({discardQueryParameters:o===!0}),e[46]=i,e[47]=u):u=e[47];let y;e[48]!==r.discardQueryParameters||e[49]!==u?(y=t.jsx(Y,{checked:r.discardQueryParameters,onCheckedChange:u}),e[48]=r.discardQueryParameters,e[49]=u,e[50]=y):y=e[50];let Q;e[51]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx("span",{className:"text-sm",children:"Discard query parameters"}),e[51]=Q):Q=e[51];let j;e[52]!==y?(j=t.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5",children:[y,Q]}),e[52]=y,e[53]=j):j=e[53];let b;e[54]!==a||e[55]!==d||e[56]!==x||e[57]!==j?(b=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:t.jsxs("div",{className:"mx-auto max-w-xl space-y-6",children:[a,d,x,j]})}),e[54]=a,e[55]=d,e[56]=x,e[57]=j,e[58]=b):b=e[58];let U;return e[59]!==b||e[60]!==p?(U=t.jsxs("div",{className:"flex h-full flex-col",children:[p,b]}),e[59]=b,e[60]=p,e[61]=U):U=e[61],U}function pe(S){return t.jsx(H,{value:S.value,children:S.label},S.value)}export{ei as RedirectEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C3ZVUHrq.js","assets/index-D6whkmo1.js","assets/index-JKj_buiN.css","assets/Tool02-Uo_gZrwr.js","assets/CheckCircle-Bl41PcZH.js","assets/Settings02-thOMLnyU.js","assets/use-mcp-client-Ce-pPK0j.js","assets/constants-D_FQAPnt.js","assets/auth-BDfI4Ipl.js","assets/useInfiniteQuery-CCvvO116.js","assets/use-infinite-scroll-baSeSjpY.js","assets/studio-tools-DB-gLliX.js","assets/badge-Bpfre86_.js","assets/input-IjHWHImM.js","assets/dropdown-menu-Bj1wkrPx.js","assets/Check-COLMJMUs.js","assets/ChevronRight-d32DqyAn.js","assets/Circle-BnaPA3or.js","assets/table-D5dnbyO4.js","assets/toggle-group-BbM5845C.js","assets/use-view-mode-D8bsIzC2.js","assets/use-mobile-CPWXKFzD.js","assets/DotsVertical-iYdY7zYC.js","assets/FilterLines-8ufs9yTV.js","assets/Globe01-BpPlcyCE.js","assets/SearchMd-AqN1Y-0P.js","assets/dialog-DQH_8BAd.js","assets/X-7l7BVVB_.js","assets/AlertCircle-DOQWM7yj.js","assets/Upload01-yS8q4CkE.js","assets/alert-dialog-_zwmZR_i.js","assets/card-DWFNe_ip.js","assets/Trash01-BYIWRCHw.js","assets/label-BxinNvBF.js","assets/select-v3wCe2bG.js","assets/tooltip-CpDhWfRr.js","assets/ChevronDown-UqCuvv6I.js","assets/ChevronUp-BNA1jD0m.js","assets/switch-CTMzHyoH.js","assets/textarea-BLB_Euaj.js","assets/XCircle-BiXqTZVD.js","assets/checkbox-B7e0eG8m.js","assets/Eye-efXEe1EJ.js","assets/LinkExternal01-BH16zivO.js","assets/use-copy-BB1fcpJC.js","assets/Copy01-CsI0mLRH.js","assets/Key01-DIasRBRK.js","assets/Plus-Cxs4hnDc.js","assets/mcp-oauth-DFEfNs3t.js","assets/Play-BKQHpU1v.js"])))=>i.map(i=>d[i]);
2
- import{c as s,j as e,r as i,i as a,aX as o}from"./index-D6whkmo1.js";import{R as m}from"./require-capability-B6dUkxJn.js";import"./use-capability-DLvM-ZfC.js";import"./access-gate-DBnUuUtq.js";import"./capability-load-error-BzjlSgKy.js";const n=i.lazy(()=>o(()=>import("./registry-layout-C3ZVUHrq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C3ZVUHrq.js","assets/index-D6whkmo1.js","assets/index-JKj_buiN.css","assets/Tool02-Uo_gZrwr.js","assets/CheckCircle-Bl41PcZH.js","assets/Settings02-thOMLnyU.js","assets/use-mcp-client-Ce-pPK0j.js","assets/constants-D_FQAPnt.js","assets/auth-BDfI4Ipl.js","assets/useInfiniteQuery-CCvvO116.js","assets/use-infinite-scroll-baSeSjpY.js","assets/studio-tools-DB-gLliX.js","assets/badge-Bpfre86_.js","assets/input-IjHWHImM.js","assets/dropdown-menu-Bj1wkrPx.js","assets/Check-COLMJMUs.js","assets/ChevronRight-d32DqyAn.js","assets/Circle-BnaPA3or.js","assets/table-D5dnbyO4.js","assets/toggle-group-BbM5845C.js","assets/use-view-mode-D8bsIzC2.js","assets/use-mobile-CPWXKFzD.js","assets/DotsVertical-iYdY7zYC.js","assets/FilterLines-8ufs9yTV.js","assets/Globe01-BpPlcyCE.js","assets/SearchMd-AqN1Y-0P.js","assets/dialog-DQH_8BAd.js","assets/X-7l7BVVB_.js","assets/AlertCircle-DOQWM7yj.js","assets/Upload01-yS8q4CkE.js","assets/alert-dialog-_zwmZR_i.js","assets/card-DWFNe_ip.js","assets/Trash01-BYIWRCHw.js","assets/label-BxinNvBF.js","assets/select-v3wCe2bG.js","assets/tooltip-CpDhWfRr.js","assets/ChevronDown-UqCuvv6I.js","assets/ChevronUp-BNA1jD0m.js","assets/switch-CTMzHyoH.js","assets/textarea-BLB_Euaj.js","assets/XCircle-BiXqTZVD.js","assets/checkbox-B7e0eG8m.js","assets/Eye-efXEe1EJ.js","assets/LinkExternal01-BH16zivO.js","assets/use-copy-BB1fcpJC.js","assets/Copy01-CsI0mLRH.js","assets/Key01-DIasRBRK.js","assets/Plus-Cxs4hnDc.js","assets/mcp-oauth-DFEfNs3t.js","assets/Play-BKQHpU1v.js"])))=>i.map(i=>d[i]);
2
- import{c as m,b as n,e as c,j as t,i as p,r as l,aX as f}from"./index-D6whkmo1.js";import{R as u}from"./require-capability-B6dUkxJn.js";import"./use-capability-DLvM-ZfC.js";import"./access-gate-DBnUuUtq.js";import"./capability-load-error-BzjlSgKy.js";const g=l.lazy(()=>f(()=>import("./registry-layout-C3ZVUHrq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{C as ke,a as en,z as un,M as mn,J as pn,j as e,B as J,t as X,c as hn,r as le,G as fn,D as xn,K as pe,l as gn,i as Se,p as C,n as jn,b as vn,m as yn}from"./index-D6whkmo1.js";import{C as _n}from"./collection-search-DveDUn2F.js";import{g as Cn,a as bn,b as Nn,e as wn}from"./extract-connection-data-CzDN7pev.js";import{u as nn,a as tn,g as Sn,C as Le}from"./connection-card-BVQgFmSN.js";import{e as sn,d as on,D as an,a as rn,h as In,c as kn}from"./dialog-DQH_8BAd.js";import{D as An,a as Dn,c as Pn,b as Tn,d as Fn,e as Vn,f as Mn}from"./drawer-BNFKWcDe.js";import{u as Bn}from"./use-mobile-CPWXKFzD.js";import{F as O,b as L,c as $,d as E,f as R,a as Qe}from"./form-ByTU0Cly.js";import{I as Y}from"./input-IjHWHImM.js";import{S as On,a as Ln,b as $n,c as En,d as me}from"./select-v3wCe2bG.js";import{T as Rn}from"./textarea-BLB_Euaj.js";import{b as cn}from"./use-connection-BGDyHdoT.js";import{n as Ie,i as $e}from"./Tool02-Uo_gZrwr.js";import{s as Ee}from"./Star01-D1CNqVH7.js";import{ah as zn}from"./agent-icon-BCinMFUd.js";import{s as Kn}from"./XClose-DkPjPT4r.js";import{c as Hn,i as Ne,a as We,E as Un,p as Xn,b as qn,d as Gn}from"./connection-form-helpers-BCD6xdaF.js";import{a as Re}from"./authenticate-and-persist-oauth-nL5dtC3N.js";import{g as Qn}from"./connection-slug-eyAPH6o3.js";import{C as Wn}from"./collection-tabs-HYnroapF.js";import{u as Ye}from"./use-infinite-scroll-baSeSjpY.js";import{B as we}from"./badge-Bpfre86_.js";import{b as ze,T as Ke,a as He}from"./tooltip-CpDhWfRr.js";import{u as Yn}from"./useSuspenseInfiniteQuery-C6Z6zXH6.js";import{u as Jn}from"./use-mcp-client-Ce-pPK0j.js";import{S as Zn}from"./constants-D_FQAPnt.js";import{i as Je}from"./Check-COLMJMUs.js";import{s as et}from"./Plus-Cxs4hnDc.js";import{u as nt}from"./studio-tools-DB-gLliX.js";import{u as tt}from"./use-ai-providers-BNTura7E.js";function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const m=n.connectionId;return!!m&&!!s?.connections?.some(S=>S.connection_id===m)?{status:"attached",repo:n,connectionId:m}:!!m||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function Kt(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Ht(s){if(typeof s!="object"||s===null)return!1;const m=s.githubRepo?.url;return typeof m=="string"&&m.length>0}function Ut(s){return Ue(s).status==="attached"}function Xt(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function qt(s){const n=new Set;for(const m of s??[]){const g=m.metadata?.liveAgentId;typeof g=="string"&&g&&n.add(m.id)}return n}function Gt(s,n){if(!s)return null;const m=s.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const g=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return g?{mode:"live",targetId:g.id}:null}function st({open:s,onOpenChange:n,onCreated:m}){const{org:g}=ke(),{data:h}=en.useSession(),{stdioEnabled:S}=un(),D=Bn(),z=cn(),l=nn(),P=tn(l,"").items,o=mn({resolver:pn(Hn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),I=o.watch("connection_url"),F=o.watch("npx_package"),x=Ne({uiType:f,connectionUrl:I??"",npxPackage:F??""})??We({uiType:f,connectionUrl:I??"",registryItems:P}),r=t=>{const d=t.trim();if(!d)return;const a=!!o.formState.dirtyFields.title,c=!!o.formState.dirtyFields.description,j=!!o.formState.dirtyFields.env_vars,N=u=>{if(u&&(!a&&!o.getValues("title").trim()&&u.title&&o.setValue("title",u.title,{shouldDirty:!1}),!c&&!(o.getValues("description")??"").trim()&&u.description&&o.setValue("description",u.description,{shouldDirty:!1}),!j&&u.envVarKeys?.length)){const w=o.getValues("env_vars")??[],q=new Set(w.map(M=>M.key)),he=u.envVarKeys.filter(M=>!q.has(M));he.length>0&&o.setValue("env_vars",[...w,...he.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},v=Xn(d);if(v&&S){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",v.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),N(Ne({uiType:"NPX",npxPackage:v.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const u=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",u,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),N(Ne({uiType:u,connectionUrl:d})??We({uiType:u,connectionUrl:d,registryItems:P}));return}f==="NPX"&&N(Ne({uiType:"NPX",npxPackage:d}))},K=t=>{t||o.reset(),n(t)},b=async t=>{let d,a=null,c=null,j=null;t.ui_type==="NPX"?(d="STDIO",a="",j=qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",a="",j=Gn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,a=t.connection_url||"",c=t.connection_token||null);const N=Cn("conn");try{await z.create.mutateAsync({id:N,title:t.title,description:t.description||null,connection_type:d,connection_url:a,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:g.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:j,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),m?.(N)}catch{X.error("Failed to create connection")}},k="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",_=o.formState.isSubmitting?"Saving...":"Create Connection",V=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Type *"}),e.jsxs(On,{value:t.value,onValueChange:t.onChange,children:[e.jsx(E,{children:e.jsx(Ln,{children:e.jsx($n,{})})}),e.jsxs(En,{children:[e.jsx(me,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(me,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(me,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"Websocket"]})}),S&&e.jsxs(e.Fragment,{children:[e.jsx(me,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(me,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(zn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(R,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"NPM Package *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("npx_package",a.trim(),{shouldDirty:!0}),r(a))},onBlur:d=>{r(d.target.value),t.onBlur()}})}),e.jsx(R,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Command *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(R,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Arguments"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(R,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Working Directory"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(R,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Environment Variables"}),e.jsx(E,{children:e.jsx(Un,{value:t.value??[],onChange:t.onChange})}),e.jsx(R,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"URL *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("connection_url",a.trim(),{shouldDirty:!0}),r(a))},onBlur:d=>{r(d.target.value),t.onBlur()}})}),e.jsx(R,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:x?.token?.label??"Token (optional)"}),e.jsx(E,{children:e.jsx(Y,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),x?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(R,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Name *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(R,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(L,{children:[e.jsx($,{children:"Description"}),e.jsx(E,{children:e.jsx(Rn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(R,{})]})})]});return D?e.jsx(An,{open:s,onOpenChange:K,children:e.jsxs(Dn,{className:"max-h-[90vh]",children:[e.jsx(Pn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Tn,{children:k}),e.jsx(Fn,{className:"mt-1",children:H})]}),e.jsx(Vn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Kn,{size:16})})})]})}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:V}),e.jsx(Mn,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:_})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:K,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(rn,{children:k}),e.jsx(In,{children:H})]}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:V}),e.jsxs(kn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>K(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:_})]})]})})]})})}function ot(s){const n=hn.c(68),{mode:m,agentId:g,addedConnectionIds:h,onAdd:S,onCloneAndAdd:D,onConnectAndAdd:z,connectingItemId:l,search:y,onCreateConnection:P,onBrowseNavigate:o,defaultTab:f}=s,I=m===void 0?"add":m,F=f===void 0?"connected":f,{org:x}=ke(),r=le.useDeferredValue(y),K=y!==r;let b;n[0]!==r?(b=r.trim().toLowerCase(),n[0]=r,n[1]=b):b=n[1];const k=b;let H;n[2]!==F?(H=i=>i??F,n[2]=F,n[3]=H):H=n[3];const[_,V]=fn(xn.connectionsTab(x.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==_||n[5]!==V?(t=i=>{i!==_&&C("connections_dialog_tab_changed",{to_tab:i}),V(i)},n[4]=_,n[5]=V,n[6]=t):t=n[6];const d=t;let a;n[7]!==x.id||n[8]!==x.slug?(a={connectionId:Zn,orgId:x.id,orgSlug:x.slug},n[7]=x.id,n[8]=x.slug,n[9]=a):a=n[9];const c=Jn(a),j=r?.trim().split(/\s+/).filter(Boolean)??[],N=j.length>0?{operator:"or",conditions:j.flatMap(mt)}:void 0,v={...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},u=JSON.stringify(v),{data:w,fetchNextPage:q,hasNextPage:he,isFetchingNextPage:M}=Yn({queryKey:pe.collectionListInfinite(c,x.id,"","CONNECTIONS",u),queryFn:async i=>{const{pageParam:p}=i,U=p===void 0?0:p;return(await c.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:U}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=w?.pages.flatMap(lt)??[],fe=Sn(Xe),ln=new Set(Xe.filter(ct).map(rt)),xe=nn(),G=tn(xe,r),Ae=Ye(G.loadMore,G.hasMore,G.isLoadingMore),De=Ye(q,he??!1,M),T=_==="all"||!!k,qe=T?G.items.filter(i=>{const p=bn(i);if(p&&ln.has(p))return!1;if(!k)return!0;const U=i._meta?.["mcp.mesh"],Q=[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,U?.friendly_name,U?.friendlyName].filter(Boolean).join(" ").toLowerCase();return j.some(B=>Q.includes(B.toLowerCase()))}):[],de=qe.filter(it),ue=qe.filter(at);let ge;n[10]!==h?(ge=i=>i.some(p=>h.has(p.id)),n[10]=h,n[11]=ge):ge=n[11];const Pe=ge;let je;n[12]!==h||n[13]!==g||n[14]!==l||n[15]!==Pe||n[16]!==I||n[17]!==S||n[18]!==o||n[19]!==D?(je=(i,p,U,Q,B)=>{const be=Pe(B),ce=B.find(W=>!h.has(W.id)),A=B[0];if(I==="browse"){const W=Qn(A);return e.jsx(Le,{connection:{title:p,icon:U,description:B.length>1?`${B.length} instances`:Q??void 0},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:B.length}),o?.(W)}},i)}return e.jsx(Le,{connection:{title:p,icon:U,description:Q},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[be&&e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),ce?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:ce.id}),g&&C("agent_connection_attached",{agent_id:g,connection_id:ce.id,app_name:A.app_name??null,mode:"existing"}),S(ce.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},n[12]=h,n[13]=g,n[14]=l,n[15]=Pe,n[16]=I,n[17]=S,n[18]=o,n[19]=D,n[20]=je):je=n[20];const ve=je;let ye;n[21]!==l||n[22]!==I||n[23]!==z?(ye=i=>{const p=i._meta?.["mcp.mesh"],U=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",Q=i.server?.description||i.description||null,B=i.server?.icons?.[0]?.src||Nn(i.server?.repository)||null,be=p?.official===!0,ce=p?.verified===!0,A=p?.owner==="deco";return e.jsx(Le,{connection:{title:U,description:Q,icon:B},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!A&&be&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx($e,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!A&&!be&&ce&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx($e,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),z(i)},children:l===i.id?e.jsx(Se,{size:14,className:"animate-spin"}):I==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},n[21]=l,n[22]=I,n[23]=z,n[24]=ye):ye=n[24];const Ge=ye;let Z;n[25]!==_||n[26]!==d||n[27]!==P||n[28]!==k?(Z=!k&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Wn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:_,onTabChange:i=>d(i)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),P()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=_,n[26]=d,n[27]=P,n[28]=k,n[29]=Z):Z=n[29];const Te=K&&"opacity-50 pointer-events-none";let ee;n[30]!==Te?(ee=gn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ee):ee=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let _e;n[32]!==ve?(_e=i=>{if(i.type==="group")return ve(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return ve(p.id,p.title,p.icon,p.description??null,[p])},n[32]=ve,n[33]=_e):_e=n[33];const Fe=fe.map(_e);let ne;n[34]!==De?(ne=e.jsx("div",{ref:De,className:"col-span-full h-1"}),n[34]=De,n[35]=ne):ne=n[35];let te;n[36]!==M?(te=M&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=M,n[37]=te):te=n[37];const Ve=T&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx($e,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(Ge),Be=T&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=T&&ue.map(Ge);let se;n[38]!==Ae||n[39]!==xe||n[40]!==T?(se=T&&xe.length>0&&e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[38]=Ae,n[39]=xe,n[40]=T,n[41]=se):se=n[41];let oe;n[42]!==G.isLoadingMore||n[43]!==T?(oe=T&&G.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=G.isLoadingMore,n[43]=T,n[44]=oe):oe=n[44];let ae;n[45]!==Fe||n[46]!==ne||n[47]!==te||n[48]!==Ve||n[49]!==Me||n[50]!==Be||n[51]!==Oe||n[52]!==se||n[53]!==oe?(ae=e.jsxs("div",{className:dn,children:[Fe,ne,te,Ve,Me,Be,Oe,se,oe]}),n[45]=Fe,n[46]=ne,n[47]=te,n[48]=Ve,n[49]=Me,n[50]=Be,n[51]=Oe,n[52]=se,n[53]=oe,n[54]=ae):ae=n[54];let ie;n[55]!==_||n[56]!==fe.length||n[57]!==ue||n[58]!==y||n[59]!==de?(ie=fe.length===0&&de.length===0&&ue.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:y?`No connections match "${y}"`:_==="connected"?"No connections yet":"No connections available"}),n[55]=_,n[56]=fe.length,n[57]=ue,n[58]=y,n[59]=de,n[60]=ie):ie=n[60];let re;n[61]!==ee||n[62]!==ae||n[63]!==ie?(re=e.jsxs("div",{className:ee,children:[ae,ie]}),n[61]=ee,n[62]=ae,n[63]=ie,n[64]=re):re=n[64];let Ce;return n[65]!==Z||n[66]!==re?(Ce=e.jsxs(e.Fragment,{children:[Z,re]}),n[65]=Z,n[66]=re,n[67]=Ce):Ce=n[67],Ce}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function rt(s){return s.app_name}function ct(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function Qt({open:s,onOpenChange:n,defaultTab:m,initialSearch:g="",...h}){const S=h.mode??"add",D="agentId"in h?h.agentId:void 0,z="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:a=>{},y=(a,c,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:a,app_name:c,mode:j})},[P,o]=le.useState(null),[f,I]=le.useState(g),[F,x]=le.useState(!1),{org:r}=ke(),{data:K}=en.useSession(),b=cn(),k=jn(),H=vn(),_=a=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:a}})},V=()=>{k.invalidateQueries({predicate:a=>{const c=a.queryKey;return c[1]===r.id&&c[3]==="collection"&&c[4]==="CONNECTIONS"}})},t=async a=>{o(a.app_name??a.id);try{const j=`${a.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,v=(await b.create.mutateAsync({title:j,description:a.description??null,connection_type:a.connection_type,connection_url:a.connection_url??null,connection_token:null,icon:a.icon??null,app_name:a.app_name??null,app_id:a.app_id??null,connection_headers:a.connection_headers??null})).id,u=await Re({connectionId:v,orgId:r.id,orgSlug:r.slug,persistFallback:w=>b.update.mutateAsync({id:v,data:{connection_token:w}}).then(()=>{})});if(u.ran&&!u.ok){C("connection_oauth_failed",{connection_id:v,flow:"clone",error:u.error??"no_token"}),X.error(`Authentication failed: ${u.error??"no token received"}`),await b.delete.mutateAsync(v);return}if(u.ran){C("connection_oauth_succeeded",{connection_id:v,flow:"clone"});const w=new URL(`/api/${r.slug}/mcp/${v}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(w.href,null)}),V()}y(v,a.app_name??null,"clone"),l(v)}catch(c){console.error("Failed to add connection:",c),X.error("Failed to add connection")}finally{o(null)}},d=async a=>{if(!(!r||!K?.user?.id)){o(a.id);try{const c=wn(a,r.id,K.user.id,{remoteIndex:0}),j=c.connection_type==="STDIO",N=!!c.connection_url,v=j&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!N&&!v){X.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:u}=await b.create.mutateAsync(c),w=await Re({connectionId:u,orgId:r.id,orgSlug:r.slug,persistFallback:q=>b.update.mutateAsync({id:u,data:{connection_token:q}}).then(()=>{})});if(w.ran&&!w.ok){C("connection_oauth_failed",{connection_id:u,flow:"connect_new",error:w.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),y(u,c.app_name??null,"new"),l(u);return}if(w.ran){C("connection_oauth_succeeded",{connection_id:u,flow:"connect_new"});const q=new URL(`/api/${r.slug}/mcp/${u}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(q.href,null)}),V(),X.success("Connected and authenticated")}else X.success("Connected");y(u,c.app_name??null,"new"),l(u)}catch(c){console.error("Failed to connect:",c),X.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(rn,{className:"text-base font-semibold",children:S==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(_n,{value:f,onChange:I,placeholder:"Search connections..."})}),e.jsx(le.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:S,agentId:D,addedConnectionIds:z,onAdd:l,onCloneAndAdd:t,onConnectAndAdd:d,connectingItemId:P,search:f,onCreateConnection:()=>x(!0),onBrowseNavigate:_,defaultTab:m})})]}),e.jsx(st,{open:F,onOpenChange:x,onCreated:async a=>{x(!1);const c=await Re({connectionId:a,orgId:r.id,orgSlug:r.slug,persistFallback:j=>b.update.mutateAsync({id:a,data:{connection_token:j}}).then(()=>{})});if(c.ran&&!c.ok){C("connection_oauth_failed",{connection_id:a,flow:"custom_create",error:c.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${c.error??"no token received"})`}),y(a,null,"custom"),l(a),n(!1);return}if(c.ran){C("connection_oauth_succeeded",{connection_id:a,flow:"custom_create"});const j=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(j.href,null)}),V()}y(a,null,"custom"),l(a),n(!1)}})]})}const Ze=new Map;function Wt(){const{org:s}=ke(),n=nt(),m=tt(),g=m.find(r=>r.providerId==="deco"),{data:h,isLoading:S,refetch:D,isFetching:z}=yn({queryKey:pe.aiProviderCredits(s.id,"deco"),enabled:!!g,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,y=l!=null?l/100:null,P=le.useRef(new Map);if(l!=null){const r=Ze.get(s.id);P.current.get(s.id)&&r!=null&&l>r&&C("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-r,previous_balance_cents:r,new_balance_cents:l}),Ze.set(s.id,l),P.current.set(s.id,!0)}const o=!!g,f=l!=null&&l>0,I=l!=null&&l===0,F=l!=null&&l===200,x=m.length>0&&m.every(r=>r.providerId==="deco");return{hasDecoKey:o,decoKeyId:g?.id??null,balanceCents:l,balanceDollars:y,hasCredits:f,isZeroBalance:I,isInitialFreeCredit:F,hasOnlyDecoProvider:x,isLoading:S,isFetching:z,refetch:D}}export{Qt as A,Ht as a,Kt as b,Ut as c,Xt as d,Gt as f,qt as g,Ue as r,Wt as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-baSeSjpY.js";import{dK as i}from"./index-D6whkmo1.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-baSeSjpY.js";import{dK as u,ab as n}from"./index-D6whkmo1.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};