decocms 3.36.2 → 3.36.4

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-Bdl8L7il.js → AlertCircle-DU4Czymb.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-C4gNBzMY.js → ArrowUpRight-jvt9_jPs.js} +1 -1
  3. package/dist/client/assets/{Check-Cb8huOHH.js → Check-CFZ7jofS.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-CGJnw6dP.js → CheckCircle-B7_GaGqy.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-D_ybfzhh.js → ChevronDown-CMnvnfNH.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-CBi5hL_n.js → ChevronLeft-BLmY09V7.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-D0iMeTJ5.js → ChevronRight-DtVYtVbK.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-BXLaNqVW.js → ChevronUp-BYxSfj4f.js} +1 -1
  9. package/dist/client/assets/{Container-BGdfxKsK.js → Container-CQcCiGBy.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-BhoFPdMN.js → DotsVertical-7ebFkKLD.js} +1 -1
  11. package/dist/client/assets/{Eye-DcL-kKgm.js → Eye-CYtfD-C-.js} +1 -1
  12. package/dist/client/assets/{FilterLines-DSwseOu_.js → FilterLines-BtiGzXwl.js} +1 -1
  13. package/dist/client/assets/{Globe01-BX4SSb6A.js → Globe01-bYDzICLJ.js} +1 -1
  14. package/dist/client/assets/{HardDrive-DcbBi9w_.js → HardDrive-gxQ66xi3.js} +1 -1
  15. package/dist/client/assets/{Key01-R_z_EgAZ.js → Key01-CDcV65YU.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-hGFocSnW.js → LayoutLeft-Cy-bGbAH.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-DQiI5oxv.js → LinkExternal01-BDXPmxri.js} +1 -1
  18. package/dist/client/assets/{Monitor01-CRf7BSF8.js → Monitor01-6PVrucyX.js} +1 -1
  19. package/dist/client/assets/{Palette-EMfX7hNs.js → Palette-8PqtgYqw.js} +1 -1
  20. package/dist/client/assets/{Play-mcRrv0lp.js → Play-B0CTz7-g.js} +1 -1
  21. package/dist/client/assets/{Plus-_ThoLvvV.js → Plus-DW_pro4F.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-CyAHVf6q.js → RefreshCcw01-B9XxpyTk.js} +1 -1
  23. package/dist/client/assets/{SearchMd-D6F8AHrW.js → SearchMd-BnZZ5mEU.js} +1 -1
  24. package/dist/client/assets/{Settings02-B100KruV.js → Settings02-BzBPnOVl.js} +1 -1
  25. package/dist/client/assets/{Shield01-DxJYzxVh.js → Shield01-CUegYioy.js} +1 -1
  26. package/dist/client/assets/{Star01-DgOBkoy7.js → Star01-CjQzvxTy.js} +1 -1
  27. package/dist/client/assets/{Stars01-CF50N3iu.js → Stars01-BBldOY4r.js} +1 -1
  28. package/dist/client/assets/{Stars02-AWskXgtc.js → Stars02-COgJsT25.js} +1 -1
  29. package/dist/client/assets/{Sun-Ddl5HYpL.js → Sun-BFeAvEQf.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-DHHfKBMD.js → SwitchHorizontal01-BQBOH6Au.js} +1 -1
  31. package/dist/client/assets/{Tool01-BLdHAOru.js → Tool01-BKl-GVq3.js} +1 -1
  32. package/dist/client/assets/{Trash01-4Tg-x6Q1.js → Trash01-BfygLm6s.js} +1 -1
  33. package/dist/client/assets/{Upload01-CBpPl05N.js → Upload01-ClElEXYw.js} +1 -1
  34. package/dist/client/assets/{User01-CChZgMNn.js → User01-Bi6i4zOy.js} +1 -1
  35. package/dist/client/assets/{Users01-CxX1e6cq.js → Users01-BXIkeJej.js} +1 -1
  36. package/dist/client/assets/{Users03-DE6tDcyz.js → Users03-DH-6SNzV.js} +1 -1
  37. package/dist/client/assets/{X-BRH2Y8Wq.js → X-BUzk9ZuQ.js} +1 -1
  38. package/dist/client/assets/{XCircle-CShXLucc.js → XCircle-8_cOsjUY.js} +1 -1
  39. package/dist/client/assets/{XClose-BFJ573RS.js → XClose-CCKAliKU.js} +1 -1
  40. package/dist/client/assets/{Zap-ZgVQTmT-.js → Zap-DMSK7ZyR.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-Cz0n89qc.js → ZapSquare-Dj9sWt3u.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-CqeB-Ycx.js → ZoomOut-DfX9NmNO.js} +1 -1
  43. package/dist/client/assets/{access-gate-qCShaDhO.js → access-gate-DuwCoW9u.js} +1 -1
  44. package/dist/client/assets/{accordion-QuD2RrzW.js → accordion-x86xWE4B.js} +1 -1
  45. package/dist/client/assets/{add-section-modal-Xr54wDg5.js → add-section-modal-CtMZ_X5l.js} +1 -1
  46. package/dist/client/assets/{agent-capabilities-CFJ9p-mV.js → agent-capabilities-C3MTl0Im.js} +1 -1
  47. package/dist/client/assets/{agent-icon-rbRaklR8.js → agent-icon-CV7VKepg.js} +1 -1
  48. package/dist/client/assets/{agents-list-Dcl00RIN.js → agents-list-BT8i9CxI.js} +1 -1
  49. package/dist/client/assets/{ai-providers-B3fmOzya.js → ai-providers-CAzPDdFJ.js} +1 -1
  50. package/dist/client/assets/{alert-NPCB1uGq.js → alert-Bi903p4n.js} +1 -1
  51. package/dist/client/assets/{alert-dialog-DU_hTH_e.js → alert-dialog-CjyXYSQZ.js} +1 -1
  52. package/dist/client/assets/app-editor-CCjHHUIp.js +1 -0
  53. package/dist/client/assets/{auth-DOEa4Xg-.js → auth-StjmYjna.js} +1 -1
  54. package/dist/client/assets/{auth-catchall-C9GzLyRU.js → auth-catchall-D86Q5OiL.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-D-gXvj1z.js → auth-split-layout-BqxtOd31.js} +1 -1
  56. package/dist/client/assets/{automation-list-row-BmMbzVcz.js → automation-list-row-ZsMhYjFo.js} +1 -1
  57. package/dist/client/assets/{automation-runs-CHOhgiKg.js → automation-runs-CAE5s4jH.js} +1 -1
  58. package/dist/client/assets/{automations-vinGS7sH.js → automations-DzhdRc4f.js} +1 -1
  59. package/dist/client/assets/{avatar-BqZJEvBP.js → avatar-ItW7yKah.js} +1 -1
  60. package/dist/client/assets/{badge-B2khBz0-.js → badge-Bw9vN6fg.js} +1 -1
  61. package/dist/client/assets/{brand-context-B_nK7LrX.js → brand-context-BCx3pSLc.js} +1 -1
  62. package/dist/client/assets/{buckets-B0he9ykT.js → buckets-C-Dq8Vrb.js} +1 -1
  63. package/dist/client/assets/{calendar-DTQK53My.js → calendar-D0RqU72a.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-ErUeqyMr.js → capability-load-error-B4z1cdIN.js} +1 -1
  65. package/dist/client/assets/{card-C0ZJxFoq.js → card-B0-N4bpb.js} +1 -1
  66. package/dist/client/assets/{chat-context-D-8AD0J7.js → chat-context-BG_brbim.js} +1 -1
  67. package/dist/client/assets/{checkbox-DxApZ9yh.js → checkbox-BjUgAWJu.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-D_1gXhC0.js → cli-auth-success-Cb5-OjdP.js} +1 -1
  69. package/dist/client/assets/{collection-detail-7xb9CmFQ.js → collection-detail-DONQnGGW.js} +1 -1
  70. package/dist/client/assets/{collection-display-button-BAzLR9Of.js → collection-display-button-BpdgmXkn.js} +1 -1
  71. package/dist/client/assets/{collection-search-DTKnEcQS.js → collection-search-BEvxyUp1.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-injrdYM-.js → collection-table-wrapper-CeQ3Kj1L.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-BDWQ17XJ.js → collection-tabs-DM_bzUmO.js} +1 -1
  74. package/dist/client/assets/{collections-DFjqouMx.js → collections-DGui_rw4.js} +1 -1
  75. package/dist/client/assets/{command-DYklD3Up.js → command-CSF0stL5.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-C4HCeyrm.js → connect-desktop-dialog-BHttcPxA.js} +1 -1
  77. package/dist/client/assets/{connection-card-BjkWUX4T.js → connection-card-DNd6JwtE.js} +1 -1
  78. package/dist/client/assets/{connection-detail-S0rM47Fu.js → connection-detail-DBBp6dEO.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-DTy5Iwrw.js → connection-form-helpers-C-CDw2oQ.js} +1 -1
  80. package/dist/client/assets/{connections-C9XIC_5l.js → connections-BUntGfpQ.js} +1 -1
  81. package/dist/client/assets/{decopilot-D05Xyy-k.js → decopilot-kQEGsQqO.js} +1 -1
  82. package/dist/client/assets/decopilot-sse-pool-yovdq4PK.js +1 -0
  83. package/dist/client/assets/{dialog-B2mbqsst.js → dialog-FBdtBd0W.js} +1 -1
  84. package/dist/client/assets/{domain-settings-BGmkBDeq.js → domain-settings-DmSveh8r.js} +1 -1
  85. package/dist/client/assets/{drawer-iJV16qgy.js → drawer-CSp117Rg.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-D2SV-kWF.js → dropdown-menu-BUlN28jb.js} +1 -1
  87. package/dist/client/assets/{dynamic-plugin-layout-BI5KEXy_.js → dynamic-plugin-layout-BxmZPwUZ.js} +1 -1
  88. package/dist/client/assets/{empty-state-BvWByj-2.js → empty-state-ByuwXjRC.js} +1 -1
  89. package/dist/client/assets/{empty-state-C_DVBzcU.js → empty-state-DZZ4TCiB.js} +1 -1
  90. package/dist/client/assets/{extract-connection-data-bssph-WQ.js → extract-connection-data-D9Xe4stq.js} +1 -1
  91. package/dist/client/assets/{features-iKNVVztW.js → features-DV5J5-hq.js} +1 -1
  92. package/dist/client/assets/{file-explorer-jTZzWDYA.js → file-explorer-CkhSBrMW.js} +1 -1
  93. package/dist/client/assets/{file-type-icon-C6U2veNU.js → file-type-icon-BAmjNPBc.js} +1 -1
  94. package/dist/client/assets/{files-BMloqr5Z.js → files-6d_tX66b.js} +1 -1
  95. package/dist/client/assets/{form-CU3vQdRi.js → form-BKRU3_f0.js} +1 -1
  96. package/dist/client/assets/{general-BgdjTbWO.js → general-Co2ymhtz.js} +1 -1
  97. package/dist/client/assets/{generate-id-yj5Hc06j.js → generate-id-CKNg3Kb_.js} +1 -1
  98. package/dist/client/assets/{github-repo-picker-Bp_Rai-x.js → github-repo-picker-BXMy0hpf.js} +1 -1
  99. package/dist/client/assets/{header-tab-button-D3vC9cXp.js → header-tab-button-CRRaGYWH.js} +1 -1
  100. package/dist/client/assets/{hover-card-BUcaRmlM.js → hover-card-dEUH7y9z.js} +1 -1
  101. package/dist/client/assets/{image-field-FQeZHP_K.js → image-field-CgZHn_on.js} +1 -1
  102. package/dist/client/assets/{index-B3hxsYs6.js → index-B6pSigm3.js} +1 -1
  103. package/dist/client/assets/{index-RSpfYKVW.js → index-C8c4nZI1.js} +1 -1
  104. package/dist/client/assets/{index-xWbPmICt.js → index-CEk0yA7A.js} +26 -26
  105. package/dist/client/assets/{index-C1Lwsift.js → index-CTVMK9LC.js} +1 -1
  106. package/dist/client/assets/{index-TaHJgDzY.js → index-C_iXtMNn.js} +1 -1
  107. package/dist/client/assets/{index-B0th8sGF.js → index-CiklrCzm.js} +1 -1
  108. package/dist/client/assets/{index-CeYNxCgl.js → index-Ckn2ukzq.js} +1 -1
  109. package/dist/client/assets/{index-C7sErToY.js → index-CsGon0kW.js} +1 -1
  110. package/dist/client/assets/{index-BZhcIh0y.js → index-CwjMi0Lt.js} +1 -1
  111. package/dist/client/assets/{index-DusmqmHr.js → index-D5VHt2uj.js} +1 -1
  112. package/dist/client/assets/{index-3ttoiVWU.js → index-DEUVODq9.js} +3 -3
  113. package/dist/client/assets/{index-COSo4xcs.js → index-DGguhABr.js} +1 -1
  114. package/dist/client/assets/{index-DyEqkA0D.js → index-DpgH-puy.js} +1 -1
  115. package/dist/client/assets/{index-CZzfDV_a.js → index-DwVG2P9Q.js} +1 -1
  116. package/dist/client/assets/{index-redirect-B3cJS778.js → index-redirect-FjuWd7yb.js} +1 -1
  117. package/dist/client/assets/{index--7JSPThb.js → index-wos7zFLb.js} +1 -1
  118. package/dist/client/assets/{input-DVih3Sjm.js → input-CkGEzOB_.js} +1 -1
  119. package/dist/client/assets/{integration-icon-BRZNp1S0.js → integration-icon-D3LrOIav.js} +1 -1
  120. package/dist/client/assets/{label-C0uUNmvX.js → label-CxhkSBar.js} +1 -1
  121. package/dist/client/assets/{layout-BP4_ZWgl.js → layout-Bt0QDLtr.js} +1 -1
  122. package/dist/client/assets/{login-rd7n3mUN.js → login-IwWNwbY4.js} +1 -1
  123. package/dist/client/assets/{mcp-oauth-BQWbsE1s.js → mcp-oauth-ClRecFEf.js} +1 -1
  124. package/dist/client/assets/{members-D60AKUfH.js → members-s0QyCnyJ.js} +1 -1
  125. package/dist/client/assets/{monaco-editor-D-Xn_h_i.js → monaco-editor-CiwloXdm.js} +1 -1
  126. package/dist/client/assets/{monitoring-stats-row-DIUkTh7Z.js → monitoring-stats-row-TXNzfIxp.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-CN_Q3L8-.js → oauth-callback-DlXFbr-f.js} +1 -1
  128. package/dist/client/assets/{oauth-callback-ai-provider-CXBvt-3U.js → oauth-callback-ai-provider-p8gLjM7e.js} +1 -1
  129. package/dist/client/assets/{onboarding-4vgLSBnB.js → onboarding-8moQC7Cm.js} +1 -1
  130. package/dist/client/assets/{org-install-BAfI3ABO.js → org-install-C_oKg9PC.js} +1 -1
  131. package/dist/client/assets/{org-layout-BX9VaywI.js → org-layout-B8BfjaU4.js} +1 -1
  132. package/dist/client/assets/{org-plugin-layout-CPX7c1_z.js → org-plugin-layout-DdUf_5AW.js} +1 -1
  133. package/dist/client/assets/{page-seo-form-BQBXyb0O.js → page-seo-form-B-I81VJI.js} +1 -1
  134. package/dist/client/assets/page-seo-sheet-BTkQDLYa.js +1 -0
  135. package/dist/client/assets/{pair-vWhfM9EW.js → pair-BGqqCdXk.js} +1 -1
  136. package/dist/client/assets/{plugin-empty-state-e0Wbrqvl.js → plugin-empty-state-DoGTEgJq.js} +1 -1
  137. package/dist/client/assets/{plugin-header-wAvZu5-j.js → plugin-header-DkXNWjlz.js} +1 -1
  138. package/dist/client/assets/{plugin-layout-BYUyfvt2.js → plugin-layout-Dp7j6oj5.js} +1 -1
  139. package/dist/client/assets/{popover-CydIugVg.js → popover-D6gDvvex.js} +1 -1
  140. package/dist/client/assets/{post-editor--xRkfN-u.js → post-editor-HrWJufNf.js} +1 -1
  141. package/dist/client/assets/{primitives-D1vGUoIn.js → primitives-BSpEXmPv.js} +1 -1
  142. package/dist/client/assets/{profile-L6NxK-ky.js → profile-DOJoyq1_.js} +1 -1
  143. package/dist/client/assets/project-app-view-DfsCN7aU.js +1 -0
  144. package/dist/client/assets/record-editor-5_5cQlbY.js +1 -0
  145. package/dist/client/assets/registry-BjxgsC2E.js +2 -0
  146. package/dist/client/assets/{registry-layout-lkoxfdjb.js → registry-layout-_dcZP0XL.js} +1 -1
  147. package/dist/client/assets/{require-capability-ctj3w0Hy.js → require-capability-CqCUzyTW.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-1KnSml1h.js → required-auth-layout-9YYeY0t9.js} +1 -1
  149. package/dist/client/assets/{reset-password-Cncp0vG1.js → reset-password-BECGeSUl.js} +1 -1
  150. package/dist/client/assets/{resizable-DUax5XQL.js → resizable-DV0pCXfQ.js} +1 -1
  151. package/dist/client/assets/{roles-CX88Wo-B.js → roles-D14mg7KI.js} +1 -1
  152. package/dist/client/assets/save-referenced-block-0RMjuyn4.js +1 -0
  153. package/dist/client/assets/{save-status-CilJNEDS.js → save-status-DfBuYJH7.js} +1 -1
  154. package/dist/client/assets/schema-form-CKIpZkBj.js +1 -0
  155. package/dist/client/assets/{scroll-area-G2D-rhCe.js → scroll-area-CHs0jTz4.js} +1 -1
  156. package/dist/client/assets/{search-input-DZtcJZGI.js → search-input-DLDVTOcp.js} +1 -1
  157. package/dist/client/assets/{secrets-B-dXGiHw.js → secrets-B1ZULRnd.js} +1 -1
  158. package/dist/client/assets/{sections-editor-Bh4-voaV.js → sections-editor-0pqboVrH.js} +1 -1
  159. package/dist/client/assets/{select-C8qI9qzJ.js → select-Dyn5eJ76.js} +1 -1
  160. package/dist/client/assets/{select-model-CJrkcp8L.js → select-model-BNZKyxON.js} +1 -1
  161. package/dist/client/assets/{seo-editor-CTlhny9b.js → seo-editor-7yhk21tn.js} +1 -1
  162. package/dist/client/assets/{settings-layout-CpbacBmZ.js → settings-layout-CCjX3a3N.js} +1 -1
  163. package/dist/client/assets/{settings-section-7sN_1nHI.js → settings-section-BsU7NnTR.js} +1 -1
  164. package/dist/client/assets/{sheet-B6uVK7Gd.js → sheet-C2l8o7Li.js} +1 -1
  165. package/dist/client/assets/{shell-controls-BrMNTCJc.js → shell-controls-Da9F6Uwi.js} +1 -1
  166. package/dist/client/assets/{shell-layout-B0RfVT3C.js → shell-layout-D-knukkt.js} +1 -1
  167. package/dist/client/assets/{shell-route-loading-BdonEPNR.js → shell-route-loading-BQnWeFBU.js} +1 -1
  168. package/dist/client/assets/{sidebar-CeOOq5ye.js → sidebar-DMarnfZA.js} +1 -1
  169. package/dist/client/assets/{skeleton-vEwazeas.js → skeleton-CBG5UooE.js} +1 -1
  170. package/dist/client/assets/{sortable.esm-CH8RPvw-.js → sortable.esm-B6mcz4jC.js} +1 -1
  171. package/dist/client/assets/{spinner-2N-kj7x0.js → spinner-CZkJwfre.js} +1 -1
  172. package/dist/client/assets/{sso-Wq5ejlq_.js → sso-DlGhVe9T.js} +1 -1
  173. package/dist/client/assets/{store-CvprJD_R.js → store-3PV6elmz.js} +1 -1
  174. package/dist/client/assets/store-registry-JGeWcmph.js +2 -0
  175. package/dist/client/assets/{studio-tools-C7SlPTsZ.js → studio-tools-DnIG9YV2.js} +1 -1
  176. package/dist/client/assets/{switch-DDUT3a8C.js → switch-DZavAgGZ.js} +1 -1
  177. package/dist/client/assets/{tab-id-rjh-jKlB.js → tab-id-BxH9ETDC.js} +1 -1
  178. package/dist/client/assets/{table-CXgtsUd4.js → table-C6yf7crt.js} +1 -1
  179. package/dist/client/assets/{tabs-DkUWsc-a.js → tabs-Kstg5esT.js} +1 -1
  180. package/dist/client/assets/{task-status-DczQDaYF.js → task-status-Z_8flBXc.js} +1 -1
  181. package/dist/client/assets/{textarea-RmWXPTvx.js → textarea-D_FY-WF9.js} +1 -1
  182. package/dist/client/assets/{toggle-group-CBraKNJ7.js → toggle-group-TV66K5Bs.js} +1 -1
  183. package/dist/client/assets/{toolbar-CE9gJtYo.js → toolbar-CCbum7s0.js} +1 -1
  184. package/dist/client/assets/{tools-list-yuhbQkhw.js → tools-list-De2JTKaU.js} +1 -1
  185. package/dist/client/assets/{tooltip-FBNw4nVO.js → tooltip-CnO8IxhJ.js} +1 -1
  186. package/dist/client/assets/{types-n2YDSxA4.js → types-yqsHoQS8.js} +1 -1
  187. package/dist/client/assets/{use-ai-providers-suUCAMGx.js → use-ai-providers-D41Ncdap.js} +1 -1
  188. package/dist/client/assets/{use-automations-F8sxpovP.js → use-automations-Cjo8cUaV.js} +1 -1
  189. package/dist/client/assets/{use-capability-CVFP3WhT.js → use-capability-km64e2ng.js} +1 -1
  190. package/dist/client/assets/{use-clock-tick-DervAiLh.js → use-clock-tick-C5MmRZ_O.js} +1 -1
  191. package/dist/client/assets/{use-collections-BENY1kCP.js → use-collections-Boao6GlT.js} +1 -1
  192. package/dist/client/assets/{use-connection-DYg5H00C.js → use-connection-D0BF0adZ.js} +1 -1
  193. package/dist/client/assets/{use-copy-CeVxNpud.js → use-copy-94yZW0qP.js} +1 -1
  194. package/dist/client/assets/{use-create-virtual-mcp-izJw-zXR.js → use-create-virtual-mcp-qtUnoDxA.js} +1 -1
  195. package/dist/client/assets/{use-debounced-autosave-DSCKWvQF.js → use-debounced-autosave-Dj71wv9y.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-DP7dz4xf.js → use-delete-connection-C5suM6o1.js} +1 -1
  197. package/dist/client/assets/{use-file-configs-B9X5drJT.js → use-file-configs-CwuLM8jQ.js} +1 -1
  198. package/dist/client/assets/{use-infinite-scroll--_mmqYnT.js → use-infinite-scroll-WoD-e-vZ.js} +1 -1
  199. package/dist/client/assets/{use-list-state-DsyTKO23.js → use-list-state-D--hQu1j.js} +1 -1
  200. package/dist/client/assets/{use-mcp-client-CLwLq9Vl.js → use-mcp-client-DnHVNKKy.js} +1 -1
  201. package/dist/client/assets/{use-mcp-prompts-B267X-_C.js → use-mcp-prompts-B7lJiQ-b.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-D4ZIO9iv.js → use-mcp-tools-Dduxk9LO.js} +1 -1
  203. package/dist/client/assets/{use-members-CPWF2UIp.js → use-members-YdskzoCL.js} +1 -1
  204. package/dist/client/assets/{use-navigate-to-agent-B002vpC6.js → use-navigate-to-agent-VVlSVZf7.js} +1 -1
  205. package/dist/client/assets/{use-org-auth-client-bsfac5xt.js → use-org-auth-client-5GIyjJUc.js} +1 -1
  206. package/dist/client/assets/{use-org-sso-C1kwoIRD.js → use-org-sso-DQRRc4kX.js} +1 -1
  207. package/dist/client/assets/{use-organization-roles-_DPpq5Wg.js → use-organization-roles-BJhlkkyb.js} +1 -1
  208. package/dist/client/assets/{use-organization-settings-25l1s_BF.js → use-organization-settings-BRHmZDz1.js} +1 -1
  209. package/dist/client/assets/{use-registry-connections-CMrhWNW5.js → use-registry-connections-bQBnbYjF.js} +1 -1
  210. package/dist/client/assets/{use-secrets-B00xpt4M.js → use-secrets-BYUtrbRD.js} +1 -1
  211. package/dist/client/assets/{use-status-sounds-C7cE6rna.js → use-status-sounds-Biot_m4f.js} +1 -1
  212. package/dist/client/assets/{use-view-mode-BrzlZey1.js → use-view-mode-B-vBbI_P.js} +1 -1
  213. package/dist/client/assets/{use-virtual-mcp-BgfAZ5Jr.js → use-virtual-mcp-kNQ4Vk7l.js} +1 -1
  214. package/dist/client/assets/useInfiniteQuery-DG9NlZam.js +1 -0
  215. package/dist/client/assets/{useRouterState-CcHttnTA.js → useRouterState-Clwac4xr.js} +1 -1
  216. package/dist/client/assets/useSuspenseInfiniteQuery-D1V_0Wrc.js +1 -0
  217. package/dist/client/assets/{user-D2mv81pj.js → user-D2dH1j5H.js} +1 -1
  218. package/dist/client/assets/{view-mode-toggle-dEyORvRn.js → view-mode-toggle-BVJSd33i.js} +1 -1
  219. package/dist/client/assets/{watch-sse-pool-ymdzZonG.js → watch-sse-pool-D12zGFzz.js} +1 -1
  220. package/dist/client/assets/{workflow-BhoGGrwE.js → workflow-B3YzgEYC.js} +1 -1
  221. package/dist/client/assets/workflow-detail-CXTSi8aj.js +1 -0
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +1 -1
  224. package/package.json +1 -1
  225. package/dist/client/assets/app-editor-vPhjMJAN.js +0 -1
  226. package/dist/client/assets/decopilot-sse-pool-Bs8CtAgZ.js +0 -1
  227. package/dist/client/assets/page-seo-sheet-DoMYq7bJ.js +0 -1
  228. package/dist/client/assets/project-app-view-BZMnBtvK.js +0 -1
  229. package/dist/client/assets/record-editor-DV9l-O7a.js +0 -1
  230. package/dist/client/assets/registry-HfyP6hgN.js +0 -2
  231. package/dist/client/assets/save-referenced-block-BCkoUa1r.js +0 -1
  232. package/dist/client/assets/schema-form-36ITxJTs.js +0 -1
  233. package/dist/client/assets/store-registry-BzpUZbWs.js +0 -2
  234. package/dist/client/assets/useInfiniteQuery-mF7h7Kib.js +0 -1
  235. package/dist/client/assets/useSuspenseInfiniteQuery-D6t37oXN.js +0 -1
  236. package/dist/client/assets/workflow-detail-y0Js5k1o.js +0 -1
@@ -1 +1 @@
1
- import{e as se,j as s,B as Z,p as me,r as Y,t as v,n as de}from"./index-3ttoiVWU.js";import{c as k,b as ne,a as ee,D as te}from"./dropdown-menu-D2SV-kWF.js";import{s as pe}from"./Star01-DgOBkoy7.js";import{a as fe}from"./Users03-DE6tDcyz.js";import{S as ge,G as ue,u as he,H as ie,W as oe,a as xe,I as je}from"./github-repo-picker-Bp_Rai-x.js";import{a as _e,b as Ce,c as be}from"./use-virtual-mcp-BgfAZ5Jr.js";import{P as q}from"./index-B0th8sGF.js";import{i as ye}from"./DotsVertical-BhoFPdMN.js";import{a as Ne}from"./Settings02-B100KruV.js";import{s as Se}from"./Trash01-4Tg-x6Q1.js";import{A as De,aq as ve}from"./agent-icon-rbRaklR8.js";import{l as Ae}from"./use-navigate-to-agent-B002vpC6.js";import{C as ke}from"./card-C0ZJxFoq.js";import{f as re}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as we}from"./use-capability-CVFP3WhT.js";import{E as Te}from"./empty-state-C_DVBzcU.js";import{u as ze}from"./use-create-virtual-mcp-izJw-zXR.js";import{c as Ie,b as Pe,d as He,f as Ee,e as Me,g as Oe,a as Be,A as Ge}from"./alert-dialog-DU_hTH_e.js";import{S as $e}from"./search-input-DZtcJZGI.js";import{s as le}from"./Plus-_ThoLvvV.js";import"./Check-Cb8huOHH.js";import"./ChevronRight-D0iMeTJ5.js";import"./use-connection-DYg5H00C.js";import"./use-collections-BENY1kCP.js";import"./use-mcp-client-CLwLq9Vl.js";import"./auth-DOEa4Xg-.js";import"./dialog-B2mbqsst.js";import"./X-BRH2Y8Wq.js";import"./RefreshCcw01-CyAHVf6q.js";import"./collection-search-DTKnEcQS.js";import"./SearchMd-D6F8AHrW.js";import"./checkbox-DxApZ9yh.js";import"./mcp-oauth-BQWbsE1s.js";import"./use-mcp-tools-D4ZIO9iv.js";import"./extract-connection-data-bssph-WQ.js";import"./generate-id-yj5Hc06j.js";import"./collections-DFjqouMx.js";import"./sidebar-CeOOq5ye.js";import"./LayoutLeft-hGFocSnW.js";import"./tooltip-FBNw4nVO.js";import"./sheet-B6uVK7Gd.js";import"./AlertCircle-Bdl8L7il.js";import"./Tool01-BLdHAOru.js";import"./SwitchHorizontal01-DHHfKBMD.js";import"./XCircle-CShXLucc.js";import"./ArrowUpRight-C4gNBzMY.js";import"./ZapSquare-Cz0n89qc.js";import"./CheckCircle-CGJnw6dP.js";import"./ChevronDown-D_ybfzhh.js";import"./ChevronLeft-CBi5hL_n.js";import"./ChevronUp-BXLaNqVW.js";import"./Container-BGdfxKsK.js";import"./Eye-DcL-kKgm.js";import"./ZoomOut-CqeB-Ycx.js";import"./Globe01-BX4SSb6A.js";import"./FilterLines-DSwseOu_.js";import"./Palette-EMfX7hNs.js";import"./HardDrive-DcbBi9w_.js";import"./Stars02-AWskXgtc.js";import"./Key01-R_z_EgAZ.js";import"./LinkExternal01-DQiI5oxv.js";import"./Monitor01-CRf7BSF8.js";import"./Sun-Ddl5HYpL.js";import"./Play-mcRrv0lp.js";import"./Shield01-DxJYzxVh.js";import"./Stars01-CF50N3iu.js";import"./Upload01-CBpPl05N.js";import"./User01-CChZgMNn.js";import"./Users01-CxX1e6cq.js";import"./XClose-BFJ573RS.js";import"./Zap-ZgVQTmT-.js";import"./differenceInSeconds-NQ4PDo0z.js";function ae(t){const e=se.c(29),{onCreateFromScratch:i,onCreateWebsite:D,onCreateHydrogenStore:l,onImportGitHub:S,onImportDeco:f,isCreating:o,align:y,side:g,showBetaBadge:u}=t,h=y===void 0?"end":y;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(fe,{size:14}),e[0]=x):x=e[0];let a;e[1]!==o||e[2]!==i?(a=s.jsxs(k,{disabled:o,onClick:i,children:[x,"Create from scratch"]}),e[1]=o,e[2]=i,e[3]=a):a=e[3];let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(pe,{size:14}),e[4]=j):j=e[4];let n;e[5]!==o||e[6]!==D?(n=s.jsxs(k,{disabled:o,onClick:D,children:[j,"Start Website"]}),e[5]=o,e[6]=D,e[7]=n):n=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("img",{src:ge,alt:"",className:"size-3.5 object-contain"}),e[8]=_):_=e[8];let c;e[9]!==o||e[10]!==l?(c=s.jsxs(k,{disabled:o,onClick:l,children:[_,"Create Shopify Headless Store"]}),e[9]=o,e[10]=l,e[11]=c):c=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ue,{className:"size-3.5"}),e[12]=N):N=e[12];let r;e[13]!==u?(r=u&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[13]=u,e[14]=r):r=e[14];let C;e[15]!==S||e[16]!==r?(C=s.jsxs(k,{onClick:S,children:[N,"Import from GitHub",r]}),e[15]=S,e[16]=r,e[17]=C):C=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[18]=p):p=e[18];let m;e[19]!==f?(m=s.jsxs(k,{onClick:f,children:[p,"Import from deco.cx"]}),e[19]=f,e[20]=m):m=e[20];let b;return e[21]!==h||e[22]!==g||e[23]!==C||e[24]!==m||e[25]!==a||e[26]!==n||e[27]!==c?(b=s.jsxs(ne,{side:g,align:h,className:"w-48",children:[a,n,c,C,m]}),e[21]=h,e[22]=g,e[23]=C,e[24]=m,e[25]=a,e[26]=n,e[27]=c,e[28]=b):b=e[28],b}function Fe(t){const e=se.c(45),{project:i,lastUsedAt:D,onDeleteClick:l}=t,S=Ae();let f;e[0]!==S||e[1]!==i.id?(f=()=>S(i.id),e[0]=S,e[1]=i.id,e[2]=f):f=e[2];let o;e[3]!==i.title||e[4]!==f?(o=s.jsx("button",{type:"button",onClick:f,className:"absolute inset-0 z-0","aria-label":i.title}),e[3]=i.title,e[4]=f,e[5]=o):o=e[5];let y;e[6]!==i.icon||e[7]!==i.title?(y=s.jsx(De,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=i.icon,e[7]=i.title,e[8]=y):y=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ee,{asChild:!0,children:s.jsx(Z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(ye,{size:20})})}),e[9]=g):g=e[9];let u;e[10]!==S||e[11]!==i.id?(u=()=>S(i.id,{search:{main:"settings"}}),e[10]=S,e[11]=i.id,e[12]=u):u=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ne,{size:16}),e[13]=h):h=e[13];let x;e[14]!==u?(x=s.jsxs(k,{onClick:u,children:[h,"Settings"]}),e[14]=u,e[15]=x):x=e[15];let a;e[16]!==l?(a=l&&s.jsxs(k,{variant:"destructive",onClick:w=>{w.stopPropagation(),l(w)},children:[s.jsx(Se,{size:16}),"Delete"]}),e[16]=l,e[17]=a):a=e[17];let j;e[18]!==x||e[19]!==a?(j=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(te,{children:[g,s.jsxs(ne,{align:"end",children:[x,a]})]})}),e[18]=x,e[19]=a,e[20]=j):j=e[20];let n;e[21]!==y||e[22]!==j?(n=s.jsxs("div",{className:"flex items-start justify-between",children:[y,j]}),e[21]=y,e[22]=j,e[23]=n):n=e[23];let _;e[24]!==i.title?(_=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[24]=i.title,e[25]=_):_=e[25];const c=i.description||"No description";let N;e[26]!==c?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:c}),e[26]=c,e[27]=N):N=e[27];let r;e[28]!==_||e[29]!==N?(r=s.jsxs("div",{className:"flex flex-col gap-1",children:[_,N]}),e[28]=_,e[29]=N,e[30]=r):r=e[30];let C;e[31]!==n||e[32]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[n,r]}),e[31]=n,e[32]=r,e[33]=C):C=e[33];let p;e[34]!==D||e[35]!==i.updated_at?(p=D?`Last used ${re(new Date(D),{addSuffix:!0})}`:`Updated ${re(new Date(i.updated_at),{addSuffix:!0})}`,e[34]=D,e[35]=i.updated_at,e[36]=p):p=e[36];let m;e[37]!==p?(m=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:p})})}),e[37]=p,e[38]=m):m=e[38];let b;e[39]!==C||e[40]!==m?(b=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[C,m]}),e[39]=C,e[40]=m,e[41]=b):b=e[41];let A;return e[42]!==b||e[43]!==o?(A=s.jsxs(ke,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[o,b]}),e[42]=b,e[43]=o,e[44]=A):A=e[44],A}function as(){const t=se.c(48),{org:e}=me(),i=_e(),D=Ce(),[l,S]=Y.useState("");let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},t[0]=f):f=t[0];const{createVirtualMCP:o,isCreating:y}=ze(f),{createFromTemplate:g,isCreating:u}=he(),[h,x]=Y.useState(null),[a,j]=Y.useState(!1),[n,_]=Y.useState(!1),{granted:c}=we("agents:manage"),N=l.toLowerCase(),r=i.filter(d=>d.id!==e.id&&(d.title.toLowerCase().includes(N)||d.description?.toLowerCase().includes(N))),{data:C}=be(r.map(Le));let p;t[1]!==D||t[2]!==h?(p=async()=>{if(!h)return;const{id:d,title:ce}=h;x(null);try{await D.delete.mutateAsync(d),v("agent_deleted",{agent_id:d,source:"agents_list"}),de.success(`Deleted "${ce}"`)}catch{}},t[1]=D,t[2]=h,t[3]=p):p=t[3];const m=p,b=q,A=q,w=q;let F;t[4]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(q.Title,{children:"Agents"}),t[4]=F):F=t[4];let L;t[5]===Symbol.for("react.memo_cache_sentinel")?(L=d=>{d.key==="Escape"&&(S(""),d.target.blur())},t[5]=L):L=t[5];let T;t[6]!==l?(T=s.jsx($e,{value:l,onChange:S,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:L}),t[6]=l,t[7]=T):T=t[7];let z;t[8]!==c||t[9]!==g||t[10]!==o||t[11]!==y||t[12]!==u?(z=c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list",method:"deco"}),j(!0)},isCreating:y||u,align:"end"})]}),t[8]=c,t[9]=g,t[10]=o,t[11]=y,t[12]=u,t[13]=z):z=t[13];let I;t[14]!==T||t[15]!==z?(I=s.jsxs("div",{className:"flex flex-col gap-6",children:[F,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[T,z]})]}),t[14]=T,t[15]=z,t[16]=I):I=t[16];const K=r.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Te,{image:s.jsx(ve,{size:48,className:"text-muted-foreground"}),title:l?"No agents found":"No agents yet",description:l?`No agents match "${l}"`:c?"Create an agent to get started.":"Ask an organization admin to create one.",actions:!l&&c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),j(!0)},isCreating:y||u,align:"center",showBetaBadge:!0})]})})}),J=r.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:r.map(d=>s.jsx(Fe,{project:d,lastUsedAt:C?.get(d.id)?.last_used_at,onDeleteClick:c?()=>x({id:d.id,title:d.title}):void 0},d.id))})]});let P;t[17]!==J||t[18]!==w.Body||t[19]!==I||t[20]!==K?(P=s.jsxs(w.Body,{children:[I,K,J]}),t[17]=J,t[18]=w.Body,t[19]=I,t[20]=K,t[21]=P):P=t[21];let H;t[22]!==P||t[23]!==A.Content?(H=s.jsx(A.Content,{children:P}),t[22]=P,t[23]=A.Content,t[24]=H):H=t[24];let E;t[25]!==n?(E=s.jsx(xe,{open:n,onOpenChange:_}),t[25]=n,t[26]=E):E=t[26];let M;t[27]!==a?(M=s.jsx(je,{open:a,onOpenChange:j}),t[27]=a,t[28]=M):M=t[28];const Q=!!h;let W;t[29]===Symbol.for("react.memo_cache_sentinel")?(W=d=>!d&&x(null),t[29]=W):W=t[29];let R;t[30]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ie,{children:"Delete Agent?"}),t[30]=R):R=t[30];const X=h?.title;let O;t[31]!==X?(O=s.jsxs(Pe,{children:[R,s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:X}),"."]})]}),t[31]=X,t[32]=O):O=t[32];let U;t[33]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Ee,{children:"Cancel"}),t[33]=U):U=t[33];let B;t[34]!==m?(B=s.jsxs(Me,{children:[U,s.jsx(Oe,{onClick:m,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[34]=m,t[35]=B):B=t[35];let G;t[36]!==O||t[37]!==B?(G=s.jsxs(Be,{children:[O,B]}),t[36]=O,t[37]=B,t[38]=G):G=t[38];let $;t[39]!==Q||t[40]!==G?($=s.jsx(Ge,{open:Q,onOpenChange:W,children:G}),t[39]=Q,t[40]=G,t[41]=$):$=t[41];let V;return t[42]!==b||t[43]!==H||t[44]!==E||t[45]!==M||t[46]!==$?(V=s.jsxs(b,{children:[H,E,M,$]}),t[42]=b,t[43]=H,t[44]=E,t[45]=M,t[46]=$,t[47]=V):V=t[47],V}function Le(t){return t.id}export{as as default};
1
+ import{e as se,j as s,B as Z,p as me,r as Y,t as v,n as de}from"./index-DEUVODq9.js";import{c as k,b as ne,a as ee,D as te}from"./dropdown-menu-BUlN28jb.js";import{s as pe}from"./Star01-CjQzvxTy.js";import{a as fe}from"./Users03-DH-6SNzV.js";import{S as ge,G as ue,u as he,H as ie,W as oe,a as xe,I as je}from"./github-repo-picker-BXMy0hpf.js";import{a as _e,b as Ce,c as be}from"./use-virtual-mcp-kNQ4Vk7l.js";import{P as q}from"./index-CiklrCzm.js";import{i as ye}from"./DotsVertical-7ebFkKLD.js";import{a as Ne}from"./Settings02-BzBPnOVl.js";import{s as Se}from"./Trash01-BfygLm6s.js";import{A as De,aq as ve}from"./agent-icon-CV7VKepg.js";import{l as Ae}from"./use-navigate-to-agent-VVlSVZf7.js";import{C as ke}from"./card-B0-N4bpb.js";import{f as re}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as we}from"./use-capability-km64e2ng.js";import{E as Te}from"./empty-state-DZZ4TCiB.js";import{u as ze}from"./use-create-virtual-mcp-qtUnoDxA.js";import{c as Ie,b as Pe,d as He,f as Ee,e as Me,g as Oe,a as Be,A as Ge}from"./alert-dialog-CjyXYSQZ.js";import{S as $e}from"./search-input-DLDVTOcp.js";import{s as le}from"./Plus-DW_pro4F.js";import"./Check-CFZ7jofS.js";import"./ChevronRight-DtVYtVbK.js";import"./use-connection-D0BF0adZ.js";import"./use-collections-Boao6GlT.js";import"./use-mcp-client-DnHVNKKy.js";import"./auth-StjmYjna.js";import"./dialog-FBdtBd0W.js";import"./X-BUzk9ZuQ.js";import"./RefreshCcw01-B9XxpyTk.js";import"./collection-search-BEvxyUp1.js";import"./SearchMd-BnZZ5mEU.js";import"./checkbox-BjUgAWJu.js";import"./mcp-oauth-ClRecFEf.js";import"./use-mcp-tools-Dduxk9LO.js";import"./extract-connection-data-D9Xe4stq.js";import"./generate-id-CKNg3Kb_.js";import"./collections-DGui_rw4.js";import"./sidebar-DMarnfZA.js";import"./LayoutLeft-Cy-bGbAH.js";import"./tooltip-CnO8IxhJ.js";import"./sheet-C2l8o7Li.js";import"./AlertCircle-DU4Czymb.js";import"./Tool01-BKl-GVq3.js";import"./SwitchHorizontal01-BQBOH6Au.js";import"./XCircle-8_cOsjUY.js";import"./ArrowUpRight-jvt9_jPs.js";import"./ZapSquare-Dj9sWt3u.js";import"./CheckCircle-B7_GaGqy.js";import"./ChevronDown-CMnvnfNH.js";import"./ChevronLeft-BLmY09V7.js";import"./ChevronUp-BYxSfj4f.js";import"./Container-CQcCiGBy.js";import"./Eye-CYtfD-C-.js";import"./ZoomOut-DfX9NmNO.js";import"./Globe01-bYDzICLJ.js";import"./FilterLines-BtiGzXwl.js";import"./Palette-8PqtgYqw.js";import"./HardDrive-gxQ66xi3.js";import"./Stars02-COgJsT25.js";import"./Key01-CDcV65YU.js";import"./LinkExternal01-BDXPmxri.js";import"./Monitor01-6PVrucyX.js";import"./Sun-BFeAvEQf.js";import"./Play-B0CTz7-g.js";import"./Shield01-CUegYioy.js";import"./Stars01-BBldOY4r.js";import"./Upload01-ClElEXYw.js";import"./User01-Bi6i4zOy.js";import"./Users01-BXIkeJej.js";import"./XClose-CCKAliKU.js";import"./Zap-DMSK7ZyR.js";import"./differenceInSeconds-NQ4PDo0z.js";function ae(t){const e=se.c(29),{onCreateFromScratch:i,onCreateWebsite:D,onCreateHydrogenStore:l,onImportGitHub:S,onImportDeco:f,isCreating:o,align:y,side:g,showBetaBadge:u}=t,h=y===void 0?"end":y;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(fe,{size:14}),e[0]=x):x=e[0];let a;e[1]!==o||e[2]!==i?(a=s.jsxs(k,{disabled:o,onClick:i,children:[x,"Create from scratch"]}),e[1]=o,e[2]=i,e[3]=a):a=e[3];let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(pe,{size:14}),e[4]=j):j=e[4];let n;e[5]!==o||e[6]!==D?(n=s.jsxs(k,{disabled:o,onClick:D,children:[j,"Start Website"]}),e[5]=o,e[6]=D,e[7]=n):n=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("img",{src:ge,alt:"",className:"size-3.5 object-contain"}),e[8]=_):_=e[8];let c;e[9]!==o||e[10]!==l?(c=s.jsxs(k,{disabled:o,onClick:l,children:[_,"Create Shopify Headless Store"]}),e[9]=o,e[10]=l,e[11]=c):c=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ue,{className:"size-3.5"}),e[12]=N):N=e[12];let r;e[13]!==u?(r=u&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[13]=u,e[14]=r):r=e[14];let C;e[15]!==S||e[16]!==r?(C=s.jsxs(k,{onClick:S,children:[N,"Import from GitHub",r]}),e[15]=S,e[16]=r,e[17]=C):C=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[18]=p):p=e[18];let m;e[19]!==f?(m=s.jsxs(k,{onClick:f,children:[p,"Import from deco.cx"]}),e[19]=f,e[20]=m):m=e[20];let b;return e[21]!==h||e[22]!==g||e[23]!==C||e[24]!==m||e[25]!==a||e[26]!==n||e[27]!==c?(b=s.jsxs(ne,{side:g,align:h,className:"w-48",children:[a,n,c,C,m]}),e[21]=h,e[22]=g,e[23]=C,e[24]=m,e[25]=a,e[26]=n,e[27]=c,e[28]=b):b=e[28],b}function Fe(t){const e=se.c(45),{project:i,lastUsedAt:D,onDeleteClick:l}=t,S=Ae();let f;e[0]!==S||e[1]!==i.id?(f=()=>S(i.id),e[0]=S,e[1]=i.id,e[2]=f):f=e[2];let o;e[3]!==i.title||e[4]!==f?(o=s.jsx("button",{type:"button",onClick:f,className:"absolute inset-0 z-0","aria-label":i.title}),e[3]=i.title,e[4]=f,e[5]=o):o=e[5];let y;e[6]!==i.icon||e[7]!==i.title?(y=s.jsx(De,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=i.icon,e[7]=i.title,e[8]=y):y=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ee,{asChild:!0,children:s.jsx(Z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(ye,{size:20})})}),e[9]=g):g=e[9];let u;e[10]!==S||e[11]!==i.id?(u=()=>S(i.id,{search:{main:"settings"}}),e[10]=S,e[11]=i.id,e[12]=u):u=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ne,{size:16}),e[13]=h):h=e[13];let x;e[14]!==u?(x=s.jsxs(k,{onClick:u,children:[h,"Settings"]}),e[14]=u,e[15]=x):x=e[15];let a;e[16]!==l?(a=l&&s.jsxs(k,{variant:"destructive",onClick:w=>{w.stopPropagation(),l(w)},children:[s.jsx(Se,{size:16}),"Delete"]}),e[16]=l,e[17]=a):a=e[17];let j;e[18]!==x||e[19]!==a?(j=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(te,{children:[g,s.jsxs(ne,{align:"end",children:[x,a]})]})}),e[18]=x,e[19]=a,e[20]=j):j=e[20];let n;e[21]!==y||e[22]!==j?(n=s.jsxs("div",{className:"flex items-start justify-between",children:[y,j]}),e[21]=y,e[22]=j,e[23]=n):n=e[23];let _;e[24]!==i.title?(_=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[24]=i.title,e[25]=_):_=e[25];const c=i.description||"No description";let N;e[26]!==c?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:c}),e[26]=c,e[27]=N):N=e[27];let r;e[28]!==_||e[29]!==N?(r=s.jsxs("div",{className:"flex flex-col gap-1",children:[_,N]}),e[28]=_,e[29]=N,e[30]=r):r=e[30];let C;e[31]!==n||e[32]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[n,r]}),e[31]=n,e[32]=r,e[33]=C):C=e[33];let p;e[34]!==D||e[35]!==i.updated_at?(p=D?`Last used ${re(new Date(D),{addSuffix:!0})}`:`Updated ${re(new Date(i.updated_at),{addSuffix:!0})}`,e[34]=D,e[35]=i.updated_at,e[36]=p):p=e[36];let m;e[37]!==p?(m=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:p})})}),e[37]=p,e[38]=m):m=e[38];let b;e[39]!==C||e[40]!==m?(b=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[C,m]}),e[39]=C,e[40]=m,e[41]=b):b=e[41];let A;return e[42]!==b||e[43]!==o?(A=s.jsxs(ke,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[o,b]}),e[42]=b,e[43]=o,e[44]=A):A=e[44],A}function as(){const t=se.c(48),{org:e}=me(),i=_e(),D=Ce(),[l,S]=Y.useState("");let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},t[0]=f):f=t[0];const{createVirtualMCP:o,isCreating:y}=ze(f),{createFromTemplate:g,isCreating:u}=he(),[h,x]=Y.useState(null),[a,j]=Y.useState(!1),[n,_]=Y.useState(!1),{granted:c}=we("agents:manage"),N=l.toLowerCase(),r=i.filter(d=>d.id!==e.id&&(d.title.toLowerCase().includes(N)||d.description?.toLowerCase().includes(N))),{data:C}=be(r.map(Le));let p;t[1]!==D||t[2]!==h?(p=async()=>{if(!h)return;const{id:d,title:ce}=h;x(null);try{await D.delete.mutateAsync(d),v("agent_deleted",{agent_id:d,source:"agents_list"}),de.success(`Deleted "${ce}"`)}catch{}},t[1]=D,t[2]=h,t[3]=p):p=t[3];const m=p,b=q,A=q,w=q;let F;t[4]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(q.Title,{children:"Agents"}),t[4]=F):F=t[4];let L;t[5]===Symbol.for("react.memo_cache_sentinel")?(L=d=>{d.key==="Escape"&&(S(""),d.target.blur())},t[5]=L):L=t[5];let T;t[6]!==l?(T=s.jsx($e,{value:l,onChange:S,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:L}),t[6]=l,t[7]=T):T=t[7];let z;t[8]!==c||t[9]!==g||t[10]!==o||t[11]!==y||t[12]!==u?(z=c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list",method:"deco"}),j(!0)},isCreating:y||u,align:"end"})]}),t[8]=c,t[9]=g,t[10]=o,t[11]=y,t[12]=u,t[13]=z):z=t[13];let I;t[14]!==T||t[15]!==z?(I=s.jsxs("div",{className:"flex flex-col gap-6",children:[F,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[T,z]})]}),t[14]=T,t[15]=z,t[16]=I):I=t[16];const K=r.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Te,{image:s.jsx(ve,{size:48,className:"text-muted-foreground"}),title:l?"No agents found":"No agents yet",description:l?`No agents match "${l}"`:c?"Create an agent to get started.":"Ask an organization admin to create one.",actions:!l&&c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),j(!0)},isCreating:y||u,align:"center",showBetaBadge:!0})]})})}),J=r.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:r.map(d=>s.jsx(Fe,{project:d,lastUsedAt:C?.get(d.id)?.last_used_at,onDeleteClick:c?()=>x({id:d.id,title:d.title}):void 0},d.id))})]});let P;t[17]!==J||t[18]!==w.Body||t[19]!==I||t[20]!==K?(P=s.jsxs(w.Body,{children:[I,K,J]}),t[17]=J,t[18]=w.Body,t[19]=I,t[20]=K,t[21]=P):P=t[21];let H;t[22]!==P||t[23]!==A.Content?(H=s.jsx(A.Content,{children:P}),t[22]=P,t[23]=A.Content,t[24]=H):H=t[24];let E;t[25]!==n?(E=s.jsx(xe,{open:n,onOpenChange:_}),t[25]=n,t[26]=E):E=t[26];let M;t[27]!==a?(M=s.jsx(je,{open:a,onOpenChange:j}),t[27]=a,t[28]=M):M=t[28];const Q=!!h;let W;t[29]===Symbol.for("react.memo_cache_sentinel")?(W=d=>!d&&x(null),t[29]=W):W=t[29];let R;t[30]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ie,{children:"Delete Agent?"}),t[30]=R):R=t[30];const X=h?.title;let O;t[31]!==X?(O=s.jsxs(Pe,{children:[R,s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:X}),"."]})]}),t[31]=X,t[32]=O):O=t[32];let U;t[33]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Ee,{children:"Cancel"}),t[33]=U):U=t[33];let B;t[34]!==m?(B=s.jsxs(Me,{children:[U,s.jsx(Oe,{onClick:m,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[34]=m,t[35]=B):B=t[35];let G;t[36]!==O||t[37]!==B?(G=s.jsxs(Be,{children:[O,B]}),t[36]=O,t[37]=B,t[38]=G):G=t[38];let $;t[39]!==Q||t[40]!==G?($=s.jsx(Ge,{open:Q,onOpenChange:W,children:G}),t[39]=Q,t[40]=G,t[41]=$):$=t[41];let V;return t[42]!==b||t[43]!==H||t[44]!==E||t[45]!==M||t[46]!==$?(V=s.jsxs(b,{children:[H,E,M,$]}),t[42]=b,t[43]=H,t[44]=E,t[45]=M,t[46]=$,t[47]=V):V=t[47],V}function Le(t){return t.id}export{as as default};
@@ -1 +1 @@
1
- import{P as V,R as C,aE as ne,aG as le,aH as he,aF as xe,b7 as me,e as z,H as ge,G as be,r as O,j as s,C as Ee,n as Q,z as ye,p as oe,F as re,a as J,K as G,m as ve,c as ue,B as L,t as je,E as Fe}from"./index-3ttoiVWU.js";import{i as Re}from"./AlertCircle-Bdl8L7il.js";import{P as te}from"./index-B0th8sGF.js";import{S as ae}from"./skeleton-vEwazeas.js";import{b as _e,a as ce,S as de,c as $e}from"./settings-section-7sN_1nHI.js";import{u as X,b as se,c as Se}from"./use-ai-providers-suUCAMGx.js";import{i as Oe}from"./CheckCircle-CGJnw6dP.js";import{p as Me}from"./chat-context-D-8AD0J7.js";import{e as Te,f as ze}from"./use-organization-settings-25l1s_BF.js";import{M as Ue}from"./select-model-CJrkcp8L.js";import{u as qe}from"./use-debounced-autosave-DSCKWvQF.js";import{I as ie}from"./input-DVih3Sjm.js";import{a as fe,T as Le}from"./toggle-group-CBraKNJ7.js";import{b as ke,c as Ie,d as Ce,f as Ne,a as Pe,e as we,g as Ae,A as De}from"./alert-dialog-DU_hTH_e.js";import{u as W}from"./studio-tools-C7SlPTsZ.js";import{s as Ve}from"./Plus-_ThoLvvV.js";import{i as Ge}from"./Tool01-BLdHAOru.js";import{s as Be}from"./Trash01-4Tg-x6Q1.js";import{A as Qe}from"./avatar-BqZJEvBP.js";import{O as Ke,P as Ye,C as pe}from"./decopilot-D05Xyy-k.js";import{a as We}from"./RefreshCcw01-CyAHVf6q.js";import{s as He}from"./Eye-DcL-kKgm.js";import{d as Je,b as Xe,c as Ze,a as et,D as tt}from"./dialog-B2mbqsst.js";import{S as st}from"./spinner-2N-kj7x0.js";import{f as it}from"./formatDistanceToNow-Cb2QZZJn.js";import{R as ot}from"./require-capability-ctj3w0Hy.js";import"./sidebar-CeOOq5ye.js";import"./LayoutLeft-hGFocSnW.js";import"./tooltip-FBNw4nVO.js";import"./sheet-B6uVK7Gd.js";import"./X-BRH2Y8Wq.js";import"./card-C0ZJxFoq.js";import"./ArrowUpRight-C4gNBzMY.js";import"./use-mcp-client-CLwLq9Vl.js";import"./auth-DOEa4Xg-.js";import"./tab-id-rjh-jKlB.js";import"./watch-sse-pool-ymdzZonG.js";import"./decopilot-sse-pool-Bs8CtAgZ.js";import"./use-virtual-mcp-BgfAZ5Jr.js";import"./use-collections-BENY1kCP.js";import"./drawer-iJV16qgy.js";import"./connect-desktop-dialog-C4HCeyrm.js";import"./Check-Cb8huOHH.js";import"./User01-CChZgMNn.js";import"./checkbox-DxApZ9yh.js";import"./select-C8qI9qzJ.js";import"./ChevronDown-D_ybfzhh.js";import"./ChevronUp-BXLaNqVW.js";import"./Key01-R_z_EgAZ.js";import"./SearchMd-D6F8AHrW.js";import"./Settings02-B100KruV.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-CRf7BSF8.js";import"./ChevronRight-D0iMeTJ5.js";import"./Stars01-CF50N3iu.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-capability-CVFP3WhT.js";import"./access-gate-qCShaDhO.js";import"./capability-load-error-ErUeqyMr.js";V({title:C(),url:C(),icon:C()});V({registries:le(C(),V({enabled:he()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:ne(C()).describe("List of MCP app_name or app_id values to hide from the store.")});const H=V({keyId:C(),modelId:C(),title:C().optional()}).nullable();xe(["fast","smart","thinking","image","web_research"]);xe(["fast","smart","thinking"]);const rt=V({tiers:V({fast:H,smart:H,thinking:H,image:H,web_research:H})});V({ids:ne(C()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});V({id:C().describe("Brand context ID"),name:C().describe("Company name"),domain:C().describe("Company domain (e.g. example.com)"),overview:C().describe("Company overview / description"),logo:C().nullable().optional().describe("Logo URL"),favicon:C().nullable().optional().describe("Favicon URL"),ogImage:C().nullable().optional().describe("OG image URL"),fonts:V({heading:C().optional().describe("Font family for headings"),body:C().optional().describe("Font family for body text"),code:C().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:V({primary:C().optional().describe("Primary brand color (hex)"),secondary:C().optional().describe("Secondary brand color (hex)"),accent:C().optional().describe("Accent / highlight color (hex)"),background:C().optional().describe("Background color (hex)"),foreground:C().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:ne(le(C(),me())).nullable().optional().describe("Brand images"),metadata:le(C(),me()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:C().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:he().optional().describe("Whether this is the default brand for the organization")});const lt=e=>e.capabilities?.includes("image")===!0,nt=e=>{if(e.asyncResearch===!0)return!0;const t=e.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return t.includes("sonar")||t.includes("deepresearch")},at=[{key:"fast",label:"Fast",description:"Fastest responses, best for quick tasks",filter:void 0},{key:"smart",label:"Smart",description:"Balanced speed and capability",filter:void 0},{key:"thinking",label:"Thinking",description:"Most capable, best for complex tasks",filter:void 0},{key:"image",label:"Image",description:"Image generation",filter:lt},{key:"web_research",label:"Web research",description:"Web search and deep research",filter:nt}];function ct(e){const t=z.c(20),{slot:i,onSlotChange:n,filterModels:o,defaultKeyId:l}=e,r=X(),[x,_]=O.useState(i?.keyId??l);let b;t[0]!==i?(b=()=>{i?.keyId&&_(i.keyId)},t[0]=i,t[1]=b):b=t[1];const d=i?.keyId;let a;t[2]!==d?(a=[d],t[2]=d,t[3]=a):a=t[3],O.useEffect(b,a);const m=x??l;let c;t[4]!==m||t[5]!==r?(c=m?r.find(y=>y.id===m):null,t[4]=m,t[5]=r,t[6]=c):c=t[6];const u=c,{models:g,isLoading:v}=se(o?m??void 0:void 0),j=o?v||g.some(o):!0;let f;t[7]!==i||t[8]!==u?.providerId?(f=i?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:u?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[7]=i,t[8]=u?.providerId,t[9]=f):f=t[9];const k=f;if(o&&!j){let y;return t[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Not available with current provider"}),t[10]=y):y=t[10],y}let I;t[11]===Symbol.for("react.memo_cache_sentinel")?(I=y=>_(y),t[11]=I):I=t[11];let h;t[12]!==m||t[13]!==n?(h=y=>{const R=y.keyId??m??"";_(R),n({keyId:R,modelId:y.modelId,title:y.title})},t[12]=m,t[13]=n,t[14]=h):h=t[14];let p;return t[15]!==m||t[16]!==o||t[17]!==k||t[18]!==h?(p=s.jsx(Ue,{variant:"bordered",placeholder:"Pick model",model:k,credentialId:m,filterModels:o,onCredentialChange:I,onModelChange:h}),t[15]=m,t[16]=o,t[17]=k,t[18]=h,t[19]=p):p=t[19],p}function dt(e){const t=z.c(2),{isPending:i,showSaved:n}=e;if(i){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(ye,{size:12,className:"animate-spin"}),"Saving…"]}),t[0]=o):o=t[0],o}if(n){let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Oe,{size:12}),"Saved"]}),t[1]=o):o=t[1],o}return null}function mt(){const e=z.c(42),t=X(),i=Te(),n=t.length>0;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=ge(rt),e[0]=o):o=e[0];let l;e[1]!==i?(l={resolver:o,values:i,mode:"onChange"},e[1]=i,e[2]=l):l=e[2];const r=be(l),{mutate:x,isPending:_,isSuccess:b}=ze(),d=r.formState.isDirty;let a;e[3]!==r||e[4]!==i||e[5]!==x?(a={delayMs:250,save:async()=>{const S=r.getValues();x(S,{onSuccess:()=>r.reset(S,{keepValues:!0}),onError:w=>{r.reset(i),Q.error(`Failed to save: ${w.message}`)}})}},e[3]=r,e[4]=i,e[5]=x,e[6]=a):a=e[6];const{schedule:m}=qe(a),c=t[0],u=t[1],g=t[2],{models:v}=se(c?.id),{models:j}=se(u?.id),{models:f}=se(g?.id);let k,I;e[7]!==r||e[8]!==n?(k=()=>{n||r.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_research:null}})},I=[n,r],e[7]=r,e[8]=n,e[9]=k,e[10]=I):(k=e[9],I=e[10]),O.useEffect(k,I);let h;e[11]!==t||e[12]!==r||e[13]!==c||e[14]!==u||e[15]!==g||e[16]!==v||e[17]!==j||e[18]!==f?(h=()=>{const S=r.getValues(),w=new Set(t.map(ut)),F={};c?.id&&(F[c.id]=v),u?.id&&(F[u.id]=j),g?.id&&(F[g.id]=f);const P=Y=>Y!=null&&!w.has(Y.keyId),N={fast:P(S.tiers.fast)?null:S.tiers.fast,smart:P(S.tiers.smart)?null:S.tiers.smart,thinking:P(S.tiers.thinking)?null:S.tiers.thinking,image:P(S.tiers.image)?null:S.tiers.image,web_research:P(S.tiers.web_research)?null:S.tiers.web_research},q=!N.fast||!N.smart||!N.thinking||!N.image||!N.web_research,U=N.fast===S.tiers.fast&&N.smart===S.tiers.smart&&N.thinking===S.tiers.thinking&&N.image===S.tiers.image&&N.web_research===S.tiers.web_research;if(!q&&U)return;const B=Me(t,F);r.reset({tiers:{fast:N.fast??B.chat.fast,smart:N.smart??B.chat.smart,thinking:N.thinking??B.chat.thinking,image:N.image??B.image,web_research:N.web_research??B.webResearch}},{keepDirty:!0})},e[11]=t,e[12]=r,e[13]=c,e[14]=u,e[15]=g,e[16]=v,e[17]=j,e[18]=f,e[19]=h):h=e[19];const p=c?.id,y=u?.id,R=g?.id;let M;e[20]!==t||e[21]!==r||e[22]!==v||e[23]!==j||e[24]!==f||e[25]!==p||e[26]!==y||e[27]!==R?(M=[r,t,v,j,f,p,y,R],e[20]=t,e[21]=r,e[22]=v,e[23]=j,e[24]=f,e[25]=p,e[26]=y,e[27]=R,e[28]=M):M=e[28],O.useEffect(h,M);let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("p",{className:"text-sm text-muted-foreground",children:"These models power chat, automations, and tools across your organization."}),e[29]=T):T=e[29];const $=b&&!d;let A;e[30]!==_||e[31]!==$?(A=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[T,s.jsx(dt,{isPending:_,showSaved:$})]}),e[30]=_,e[31]=$,e[32]=A):A=e[32];let D;e[33]!==t[0]?.id||e[34]!==r.control||e[35]!==m?(D=at.map(S=>s.jsx(Ee,{control:r.control,name:`tiers.${S.key}`,render:w=>{const{field:F}=w;return s.jsx(_e,{title:S.label,description:S.description,action:s.jsx(ct,{slot:F.value,defaultKeyId:t[0]?.id??null,filterModels:S.filter,onSlotChange:P=>{F.onChange(P),m()}})})}},S.key)),e[33]=t[0]?.id,e[34]=r.control,e[35]=m,e[36]=D):D=e[36];let K;e[37]!==D?(K=s.jsx(ce,{children:D}),e[37]=D,e[38]=K):K=e[38];let E;return e[39]!==A||e[40]!==K?(E=s.jsxs(de,{title:"Default models",headerClassName:"pl-0",children:[A,K]}),e[39]=A,e[40]=K,e[41]=E):E=e[41],E}function ut(e){return e.id}const ft={usd:[10,20,100],brl:[50,100,500]};function pt(){const e=z.c(26),t=W(),[i,n]=O.useState(!1),{mutate:o,isPending:l}=J({mutationFn:async h=>{const{url:p}=await t.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:h,currency:d});return p},onSuccess:xt,onError:ht}),[r,x]=O.useState(""),[_,b]=O.useState("usd"),d=_,a=parseFloat(r),m=!isNaN(a)&&a>=1,c=d==="brl"?"R$":"$";let u;e[0]!==b?(u=h=>{h&&b(h)},e[0]=b,e[1]=u):u=e[1];let g,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(fe,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),v=s.jsx(fe,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),e[2]=g,e[3]=v):(g=e[2],v=e[3]);let j;e[4]!==d||e[5]!==u?(j=s.jsxs(Le,{type:"single",variant:"outline",size:"default",value:d,onValueChange:u,children:[g,v]}),e[4]=d,e[5]=u,e[6]=j):j=e[6];let f;e[7]!==d||e[8]!==c||e[9]!==i||e[10]!==l||e[11]!==o?(f=!i&&s.jsxs(s.Fragment,{children:[ft[d].map(h=>s.jsxs(L,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:l,onClick:()=>o(h*100),children:[c,h]},h)),s.jsx(L,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>n(!0),disabled:l,children:"Custom"})]}),e[7]=d,e[8]=c,e[9]=i,e[10]=l,e[11]=o,e[12]=f):f=e[12];let k;e[13]!==c||e[14]!==r||e[15]!==a||e[16]!==i||e[17]!==m||e[18]!==l||e[19]!==x||e[20]!==o?(k=i&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:c}),s.jsx(ie,{type:"number",min:"1",step:"1",placeholder:"50",value:r,onChange:h=>x(h.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),s.jsx(L,{className:"h-10",disabled:!m||l,onClick:()=>o(Math.round(a*100)),children:l?"...":"Add"}),s.jsx(L,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{n(!1),x("")},children:"Cancel"})]}),e[13]=c,e[14]=r,e[15]=a,e[16]=i,e[17]=m,e[18]=l,e[19]=x,e[20]=o,e[21]=k):k=e[21];let I;return e[22]!==j||e[23]!==f||e[24]!==k?(I=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,f,k]})}),e[22]=j,e[23]=f,e[24]=k,e[25]=I):I=e[25],I}function ht(e){Q.error(`Top-up failed: ${e.message}`)}function xt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function gt(e){return e<=0?"text-destructive":e<=1?"text-amber-500 dark:text-amber-400":"text-foreground"}function bt(){const e=z.c(58),{org:t}=oe(),i=W(),n=re(),o=X();let l;e[0]!==o?(l=o.find(vt),e[0]=o,e[1]=l):l=e[1];const r=l,[x,_]=O.useState(!1);let b;e[2]!==r||e[3]!==i?(b=async()=>{r&&await i.call("AI_PROVIDER_KEY_DELETE",{keyId:r.id})},e[2]=r,e[3]=i,e[4]=b):b=e[4];let d;e[5]!==t.id||e[6]!==n?(d=()=>{n.invalidateQueries({queryKey:G.aiProviderKeys(t.id)}),n.invalidateQueries({queryKey:G.aiProviders(t.id)}),Q.success("Deco AI Gateway disconnected"),_(!1)},e[5]=t.id,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==b||e[9]!==d?(a={mutationFn:b,onSuccess:d,onError:yt},e[8]=b,e[9]=d,e[10]=a):a=e[10];const{mutate:m,isPending:c}=J(a);let u;e[11]!==t.id?(u=G.aiProviderCredits(t.id,"deco"),e[11]=t.id,e[12]=u):u=e[12];const g=!!r;let v;e[13]!==i?(v=async()=>{try{return await i.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},e[13]=i,e[14]=v):v=e[14];let j;e[15]!==u||e[16]!==g||e[17]!==v?(j={queryKey:u,enabled:g,staleTime:6e4,queryFn:v},e[15]=u,e[16]=g,e[17]=v,e[18]=j):j=e[18];const{data:f,isLoading:k,refetch:I,isFetching:h}=ve(j);if(!r)return null;const p=f?.balanceCents!=null?f.balanceCents/100:null;let y;e[19]!==p?(y=p!=null?`$${p.toFixed(2)}`:"—",e[19]=p,e[20]=y):y=e[20];const R=y;let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),s.jsx("div",{children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Access to 100+ models"})})]}),e[21]=M):M=e[21];let T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=()=>_(!0),e[22]=T):T=e[22];let $;e[23]!==c?($=s.jsxs("div",{className:"flex items-center justify-between",children:[M,s.jsx(L,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:T,disabled:c,children:"Disconnect"})]}),e[23]=c,e[24]=$):$=e[24];let A;e[25]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsxs(ke,{children:[s.jsx(Ie,{children:"Disconnect Deco AI Gateway"}),s.jsx(Ce,{children:"This will remove the Deco AI Gateway from this workspace. Your credit balance is preserved and will be available if you reconnect."})]}),e[25]=A):A=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ne,{children:"Cancel"}),e[26]=D):D=e[26];let K;e[27]!==m?(K=s.jsxs(Pe,{children:[A,s.jsxs(we,{children:[D,s.jsx(Ae,{onClick:()=>m(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Disconnect"})]})]}),e[27]=m,e[28]=K):K=e[28];let E;e[29]!==x||e[30]!==K?(E=s.jsx(De,{open:x,onOpenChange:_,children:K}),e[29]=x,e[30]=K,e[31]=E):E=e[31];let S;e[32]!==p||e[33]!==R||e[34]!==h||e[35]!==k?(S=k||h?s.jsx(ae,{className:"h-9 w-24"}):s.jsx("span",{className:ue("text-3xl font-semibold tabular-nums tracking-tight",p!=null&&gt(p)),children:R}),e[32]=p,e[33]=R,e[34]=h,e[35]=k,e[36]=S):S=e[36];let w;e[37]!==I?(w=()=>I(),e[37]=I,e[38]=w):w=e[38];const F=h&&"animate-spin";let P;e[39]!==F?(P=ue(F),e[39]=F,e[40]=P):P=e[40];let N;e[41]!==P?(N=s.jsx(ye,{size:14,className:P}),e[41]=P,e[42]=N):N=e[42];let q;e[43]!==h||e[44]!==w||e[45]!==N?(q=s.jsx("button",{type:"button",onClick:w,disabled:h,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":"Refresh balance",children:N}),e[43]=h,e[44]=w,e[45]=N,e[46]=q):q=e[46];let U;e[47]!==S||e[48]!==q?(U=s.jsxs("div",{className:"flex items-baseline gap-2",children:[S,q]}),e[47]=S,e[48]=q,e[49]=U):U=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Available credit balance"}),e[50]=B):B=e[50];let Y;e[51]!==U?(Y=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[U,B]}),e[51]=U,e[52]=Y):Y=e[52];let Z;e[53]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:"Add credits"}),s.jsx(pt,{})]}),e[53]=Z):Z=e[53];let ee;return e[54]!==$||e[55]!==E||e[56]!==Y?(ee=s.jsx(de,{title:"Deco AI Gateway",children:s.jsx(ce,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[$,E,Y,Z]})})}),e[54]=$,e[55]=E,e[56]=Y,e[57]=ee):ee=e[57],ee}function yt(e){Q.error(`Failed to disconnect: ${e.message}`)}function vt(e){return e.providerId==="deco"}function jt(){const e=z.c(8),{org:t}=oe(),i=W(),n=re();let o;e[0]!==i?(o=async()=>{await i.call("AI_PROVIDER_PROVISION_KEY",{providerId:"deco"})},e[0]=i,e[1]=o):o=e[1];let l;e[2]!==t||e[3]!==n?(l=()=>{je("ai_provider_provision_succeeded",{provider_id:"deco"}),n.invalidateQueries({queryKey:G.aiProviderKeys(t.id)}),n.invalidateQueries({queryKey:G.aiProviders(t.id)}),Q.success("Deco AI Gateway connected successfully")},e[2]=t,e[3]=n,e[4]=l):l=e[4];let r;return e[5]!==o||e[6]!==l?(r={mutationFn:o,onSuccess:l,onError:_t},e[5]=o,e[6]=l,e[7]=r):r=e[7],J(r)}function _t(e){je("ai_provider_provision_failed",{provider_id:"deco",error:e.message}),Q.error(`Failed to connect Deco AI Gateway: ${e.message}`)}function St(){const e=z.c(10),{mutate:t,isPending:i}=jt();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=["radial-gradient(ellipse 50% 150% at -15% 50%, rgba(165,149,255,0.14) 0%, transparent 60%)","radial-gradient(ellipse 50% 150% at 115% 50%, rgba(208,236,26,0.11) 0%, transparent 60%)"],e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:n.join(", ")}}),e[1]=o):o=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-12 shrink-0 rounded-xl object-contain dark:bg-white dark:p-1"}),e[2]=l):l=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("p",{className:"text-base font-semibold",children:"Deco AI Gateway"}),s.jsx("span",{className:"rounded-full border border-border/60 bg-background/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Recommended"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"100+ models, one connection — pay as you go, no API keys to juggle."})]}),e[3]=r):r=e[3];let x;e[4]!==t?(x=()=>t(),e[4]=t,e[5]=x):x=e[5];const _=i?"Connecting…":"Connect Deco";let b;return e[6]!==i||e[7]!==x||e[8]!==_?(b=s.jsxs("div",{className:"relative rounded-xl border border-border overflow-hidden",children:[o,s.jsxs("div",{className:"relative flex items-center gap-5 px-6 py-5",children:[l,r,s.jsx(L,{variant:"outline",disabled:i,onClick:x,children:_})]})]}),e[6]=i,e[7]=x,e[8]=_,e[9]=b):b=e[9],b}const kt=V({label:C().min(1,"Label is required").max(100),apiKey:C().optional(),baseUrl:C().optional()});function It({providerKey:e,provider:t,preset:i,maskedKey:n,currentLabel:o,currentBaseUrl:l,onCancel:r,onSuccess:x}){const{org:_}=oe(),b=W(),d=re(),[a,m]=O.useState(!1),c=t.id==="openai-compatible",u=t.supportedMethods.includes("api-key"),{register:g,handleSubmit:v,watch:j,formState:{errors:f}}=be({resolver:ge(kt),defaultValues:{label:o,apiKey:"",baseUrl:l??""}}),k=j("apiKey")??"",{mutate:I,isPending:h}=J({mutationFn:async p=>{let y;p.apiKey?c?y=JSON.stringify({baseUrl:p.baseUrl||l||"",apiKey:p.apiKey}):y=p.apiKey:c&&p.baseUrl&&p.baseUrl!==l&&(y=JSON.stringify({baseUrl:p.baseUrl,apiKey:""})),await b.call("AI_PROVIDER_KEY_UPDATE",{keyId:e.id,label:p.label,...y!==void 0?{apiKey:y}:{}})},onSuccess:()=>{d.invalidateQueries({queryKey:G.aiProviderKeys(_.id)}),d.invalidateQueries({queryKey:G.aiProviders(_.id)}),Q.success("Provider updated"),x()},onError:p=>Q.error(`Failed to update: ${p.message}`)});return s.jsxs("form",{onSubmit:v(p=>I(p)),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),s.jsx(ie,{placeholder:"e.g. Personal key",...g("label"),className:"h-8 text-sm"}),f.label&&s.jsx("p",{className:"text-xs text-destructive",children:f.label.message})]}),c&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Base URL"}),s.jsx(ie,{type:"url",placeholder:i?.baseUrlPlaceholder??"http://localhost:4000/v1",...g("baseUrl"),className:"h-8 text-sm"})]}),u&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["API key"," ",s.jsx("span",{className:"text-muted-foreground/60",children:"(leave blank to keep current)"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ie,{type:a&&k?"text":"password",placeholder:n,...g("apiKey"),className:"ph-no-capture h-8 text-sm pr-8"}),k&&s.jsx("button",{type:"button",onClick:()=>m(!a),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?s.jsx(We,{size:14}):s.jsx(He,{size:14})})]})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Je,{children:[s.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:r,disabled:h,children:"Cancel"}),s.jsx(L,{type:"submit",size:"sm",disabled:h,children:h?"Saving...":"Save"})]})]})}function Ct(e){const t=z.c(28),{providerKey:i,provider:n,open:o,onOpenChange:l}=e,r=W();let x;t[0]!==n.id||t[1]!==i.presetId?(x=n.id==="openai-compatible"&&i.presetId?Ke.find(k=>k.id===i.presetId):void 0,t[0]=n.id,t[1]=i.presetId,t[2]=x):x=t[2];const _=x,b=_?.name??n.name;let d;t[3]!==i.id?(d=G.aiProviderKeyPreview(i.id),t[3]=i.id,t[4]=d):d=t[4];let a;t[5]!==i.id||t[6]!==r?(a=()=>r.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),t[5]=i.id,t[6]=r,t[7]=a):a=t[7];let m;t[8]!==o||t[9]!==d||t[10]!==a?(m={queryKey:d,queryFn:a,enabled:o,staleTime:0},t[8]=o,t[9]=d,t[10]=a,t[11]=m):m=t[11];const{data:c,isLoading:u}=ve(m);let g;t[12]!==b?(g=s.jsx(Xe,{children:s.jsxs(Ze,{children:["Edit ",b]})}),t[12]=b,t[13]=g):g=t[13];let v;t[14]!==u||t[15]!==l||t[16]!==_||t[17]!==c||t[18]!==n||t[19]!==i?(v=u||!c?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(st,{})}):s.jsx(It,{providerKey:i,provider:n,preset:_,maskedKey:c.maskedKey,currentLabel:c.label,currentBaseUrl:c.baseUrl,onCancel:()=>l(!1),onSuccess:()=>l(!1)}),t[14]=u,t[15]=l,t[16]=_,t[17]=c,t[18]=n,t[19]=i,t[20]=v):v=t[20];let j;t[21]!==g||t[22]!==v?(j=s.jsxs(et,{className:"sm:max-w-md",children:[g,v]}),t[21]=g,t[22]=v,t[23]=j):j=t[23];let f;return t[24]!==l||t[25]!==o||t[26]!==j?(f=s.jsx(tt,{open:o,onOpenChange:l,children:j}),t[24]=l,t[25]=o,t[26]=j,t[27]=f):f=t[27],f}function Nt(e){const t=z.c(48),{providerKey:i,provider:n}=e,{org:o}=oe(),l=W(),r=re(),[x,_]=O.useState(!1),[b,d]=O.useState(!1),a=n.id==="openai-compatible";let m;t[0]!==a||t[1]!==i.presetId?(m=a&&i.presetId?Ke.find(q=>q.id===i.presetId):void 0,t[0]=a,t[1]=i.presetId,t[2]=m):m=t[2];const c=m,u=c?c.name:a?"Custom OpenAI-compatible":n.name,g=c?.logo??n.logo;let v;e:{if(a){v=i.label;break e}const q=i.label;let U;t[3]!==i.createdAt?(U=it(new Date(i.createdAt)),t[3]=i.createdAt,t[4]=U):U=t[4],v=`${q} · added ${U} ago`}const j=v;let f;t[5]!==i.id||t[6]!==l?(f=async()=>{await l.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},t[5]=i.id,t[6]=l,t[7]=f):f=t[7];let k;t[8]!==o||t[9]!==i.id||t[10]!==r?(k=()=>{r.invalidateQueries({queryKey:G.aiProviderKeys(o.id)}),r.invalidateQueries({queryKey:G.aiProviders(o.id)}),r.invalidateQueries({queryKey:G.aiProviderModels(o.id,i.id)}),Q.success("Key deleted"),_(!1)},t[8]=o,t[9]=i.id,t[10]=r,t[11]=k):k=t[11];let I;t[12]!==f||t[13]!==k?(I={mutationFn:f,onSuccess:k,onError:Pt},t[12]=f,t[13]=k,t[14]=I):I=t[14];const{mutate:h,isPending:p}=J(I);let y;t[15]!==u||t[16]!==g?(y=g?s.jsx("img",{src:g,alt:u,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(Qe,{fallback:u.charAt(0),className:"size-8 bg-primary/10 text-primary"}),t[15]=u,t[16]=g,t[17]=y):y=t[17];let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:()=>d(!0),children:s.jsx(Ge,{size:14})}),t[18]=R):R=t[18];let M,T;t[19]===Symbol.for("react.memo_cache_sentinel")?(M=()=>_(!0),T=s.jsx(Be,{size:14}),t[19]=M,t[20]=T):(M=t[19],T=t[20]);let $;t[21]!==p?($=s.jsxs("div",{className:"flex items-center gap-0.5",children:[R,s.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",disabled:p,onClick:M,children:T})]}),t[21]=p,t[22]=$):$=t[22];let A;t[23]!==j||t[24]!==u||t[25]!==$||t[26]!==y?(A=s.jsx(_e,{icon:y,title:u,description:j,action:$}),t[23]=j,t[24]=u,t[25]=$,t[26]=y,t[27]=A):A=t[27];let D;t[28]!==b||t[29]!==n||t[30]!==i?(D=s.jsx(Ct,{providerKey:i,provider:n,open:b,onOpenChange:d}),t[28]=b,t[29]=n,t[30]=i,t[31]=D):D=t[31];let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Ie,{children:"Delete API key"}),t[32]=K):K=t[32];let E;t[33]!==i.label?(E=s.jsxs(ke,{children:[K,s.jsxs(Ce,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]})]}),t[33]=i.label,t[34]=E):E=t[34];let S;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ne,{children:"Cancel"}),t[35]=S):S=t[35];let w;t[36]!==h?(w=s.jsxs(we,{children:[S,s.jsx(Ae,{onClick:()=>h(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[36]=h,t[37]=w):w=t[37];let F;t[38]!==E||t[39]!==w?(F=s.jsxs(Pe,{children:[E,w]}),t[38]=E,t[39]=w,t[40]=F):F=t[40];let P;t[41]!==x||t[42]!==F?(P=s.jsx(De,{open:x,onOpenChange:_,children:F}),t[41]=x,t[42]=F,t[43]=P):P=t[43];let N;return t[44]!==A||t[45]!==D||t[46]!==P?(N=s.jsxs(s.Fragment,{children:[A,D,P]}),t[44]=A,t[45]=D,t[46]=P,t[47]=N):N=t[47],N}function Pt(e){return Q.error(`Failed to delete key: ${e.message}`)}function wt(e){const t=z.c(11),{onConnectClick:i}=e,n=X(),o=Se();let l;t[0]!==o?.providers?(l=o?.providers??[],t[0]=o?.providers,t[1]=l):l=t[1];const r=l;let x;if(t[2]!==n||t[3]!==i||t[4]!==r){let _;t[6]!==r?(_=m=>({key:m,provider:r.find(c=>c.id===m.providerId)}),t[6]=r,t[7]=_):_=t[7];const b=n.filter(Kt).map(_).filter(Dt);let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ve,{size:14}),t[8]=d):d=t[8];let a;t[9]!==i?(a=s.jsxs(L,{size:"sm",onClick:i,children:[d,"Connect provider"]}),t[9]=i,t[10]=a):a=t[10],x=s.jsx(de,{title:"Connected providers",headerClassName:"px-0",actions:a,children:b.length===0?s.jsx("p",{className:"text-sm text-muted-foreground px-1",children:"Bring your own keys to use specific models alongside Deco's gateway."}):s.jsx(ce,{children:b.map(At)})}),t[2]=n,t[3]=i,t[4]=r,t[5]=x}else x=t[5];return x}function At(e){const{key:t,provider:i}=e;return s.jsx(Nt,{providerKey:t,provider:i},t.id)}function Dt(e){return e.provider!==void 0}function Kt(e){return e.providerId!=="deco"}function Et(e){const t=z.c(3),{error:i}=e;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[0]=n):n=t[0];let o;return t[1]!==i.message?(o=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),t[1]=i.message,t[2]=o):o=t[2],o}function Ft(){const e=z.c(23),t=X();let i;e[0]!==t?(i=t.some(Rt),e[0]=t,e[1]=i):i=e[1];const n=i,o=t.length>0,[l,r]=O.useState(!1),[x,_]=O.useState(null),b=Se();let d;e[2]!==b?.providers?(d=b?.providers??[],e[2]=b?.providers,e[3]=d):d=e[3];const a=d;if(!o){let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=()=>r(!0),e[4]=j):j=e[4];let f;e[5]!==a?(f=s.jsx(Ye,{providers:a,onSelect:_,onShowAll:j}),e[5]=a,e[6]=f):f=e[6];const k=x!==null||l;let I;e[7]===Symbol.for("react.memo_cache_sentinel")?(I=R=>{R||(_(null),r(!1))},e[7]=I):I=e[7];const h=x??void 0;let p;e[8]!==k||e[9]!==h?(p=s.jsx(pe,{open:k,onOpenChange:I,initialProvider:h}),e[8]=k,e[9]=h,e[10]=p):p=e[10];let y;return e[11]!==f||e[12]!==p?(y=s.jsxs(s.Fragment,{children:[f,p]}),e[11]=f,e[12]=p,e[13]=y):y=e[13],y}let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(O.Suspense,{fallback:s.jsx(ae,{className:"h-16 w-full"}),children:s.jsx(mt,{})}),e[14]=m):m=e[14];let c;e[15]!==n?(c=n?s.jsx(bt,{}):s.jsx(St,{}),e[15]=n,e[16]=c):c=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(wt,{onConnectClick:()=>r(!0)}),e[17]=u):u=e[17];let g;e[18]!==l?(g=s.jsx(pe,{open:l,onOpenChange:r}),e[18]=l,e[19]=g):g=e[19];let v;return e[20]!==c||e[21]!==g?(v=s.jsxs(s.Fragment,{children:[m,c,u,g]}),e[20]=c,e[21]=g,e[22]=v):v=e[22],v}function Rt(e){return e.providerId==="deco"}function $t(){const e=z.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(te.Title,{children:"AI Providers"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(te,{children:s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs($e,{children:[t,s.jsx(Fe,{fallback:Ot,children:s.jsx(O.Suspense,{fallback:s.jsx(ae,{className:"h-64 w-full"}),children:s.jsx(Ft,{})})})]})})})}),e[1]=i):i=e[1],i}function Ot(e){const{error:t}=e;return s.jsx(Et,{error:t??new Error("Failed to load AI providers")})}function Ls(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ot,{capability:"ai-providers:manage",area:"AI providers",children:s.jsx($t,{})}),e[0]=t):t=e[0],t}export{Ls as default};
1
+ import{P as V,R as C,aE as ne,aG as le,aH as he,aF as xe,b7 as me,e as z,H as ge,G as be,r as O,j as s,C as Ee,n as Q,z as ye,p as oe,F as re,a as J,K as G,m as ve,c as ue,B as L,t as je,E as Fe}from"./index-DEUVODq9.js";import{i as Re}from"./AlertCircle-DU4Czymb.js";import{P as te}from"./index-CiklrCzm.js";import{S as ae}from"./skeleton-CBG5UooE.js";import{b as _e,a as ce,S as de,c as $e}from"./settings-section-BsU7NnTR.js";import{u as X,b as se,c as Se}from"./use-ai-providers-D41Ncdap.js";import{i as Oe}from"./CheckCircle-B7_GaGqy.js";import{p as Me}from"./chat-context-BG_brbim.js";import{e as Te,f as ze}from"./use-organization-settings-BRHmZDz1.js";import{M as Ue}from"./select-model-BNZKyxON.js";import{u as qe}from"./use-debounced-autosave-Dj71wv9y.js";import{I as ie}from"./input-CkGEzOB_.js";import{a as fe,T as Le}from"./toggle-group-TV66K5Bs.js";import{b as ke,c as Ie,d as Ce,f as Ne,a as Pe,e as we,g as Ae,A as De}from"./alert-dialog-CjyXYSQZ.js";import{u as W}from"./studio-tools-DnIG9YV2.js";import{s as Ve}from"./Plus-DW_pro4F.js";import{i as Ge}from"./Tool01-BKl-GVq3.js";import{s as Be}from"./Trash01-BfygLm6s.js";import{A as Qe}from"./avatar-ItW7yKah.js";import{O as Ke,P as Ye,C as pe}from"./decopilot-kQEGsQqO.js";import{a as We}from"./RefreshCcw01-B9XxpyTk.js";import{s as He}from"./Eye-CYtfD-C-.js";import{d as Je,b as Xe,c as Ze,a as et,D as tt}from"./dialog-FBdtBd0W.js";import{S as st}from"./spinner-CZkJwfre.js";import{f as it}from"./formatDistanceToNow-Cb2QZZJn.js";import{R as ot}from"./require-capability-CqCUzyTW.js";import"./sidebar-DMarnfZA.js";import"./LayoutLeft-Cy-bGbAH.js";import"./tooltip-CnO8IxhJ.js";import"./sheet-C2l8o7Li.js";import"./X-BUzk9ZuQ.js";import"./card-B0-N4bpb.js";import"./ArrowUpRight-jvt9_jPs.js";import"./use-mcp-client-DnHVNKKy.js";import"./auth-StjmYjna.js";import"./tab-id-BxH9ETDC.js";import"./watch-sse-pool-D12zGFzz.js";import"./decopilot-sse-pool-yovdq4PK.js";import"./use-virtual-mcp-kNQ4Vk7l.js";import"./use-collections-Boao6GlT.js";import"./drawer-CSp117Rg.js";import"./connect-desktop-dialog-BHttcPxA.js";import"./Check-CFZ7jofS.js";import"./User01-Bi6i4zOy.js";import"./checkbox-BjUgAWJu.js";import"./select-Dyn5eJ76.js";import"./ChevronDown-CMnvnfNH.js";import"./ChevronUp-BYxSfj4f.js";import"./Key01-CDcV65YU.js";import"./SearchMd-BnZZ5mEU.js";import"./Settings02-BzBPnOVl.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-6PVrucyX.js";import"./ChevronRight-DtVYtVbK.js";import"./Stars01-BBldOY4r.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-capability-km64e2ng.js";import"./access-gate-DuwCoW9u.js";import"./capability-load-error-B4z1cdIN.js";V({title:C(),url:C(),icon:C()});V({registries:le(C(),V({enabled:he()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:ne(C()).describe("List of MCP app_name or app_id values to hide from the store.")});const H=V({keyId:C(),modelId:C(),title:C().optional()}).nullable();xe(["fast","smart","thinking","image","web_research"]);xe(["fast","smart","thinking"]);const rt=V({tiers:V({fast:H,smart:H,thinking:H,image:H,web_research:H})});V({ids:ne(C()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});V({id:C().describe("Brand context ID"),name:C().describe("Company name"),domain:C().describe("Company domain (e.g. example.com)"),overview:C().describe("Company overview / description"),logo:C().nullable().optional().describe("Logo URL"),favicon:C().nullable().optional().describe("Favicon URL"),ogImage:C().nullable().optional().describe("OG image URL"),fonts:V({heading:C().optional().describe("Font family for headings"),body:C().optional().describe("Font family for body text"),code:C().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:V({primary:C().optional().describe("Primary brand color (hex)"),secondary:C().optional().describe("Secondary brand color (hex)"),accent:C().optional().describe("Accent / highlight color (hex)"),background:C().optional().describe("Background color (hex)"),foreground:C().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:ne(le(C(),me())).nullable().optional().describe("Brand images"),metadata:le(C(),me()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:C().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:he().optional().describe("Whether this is the default brand for the organization")});const lt=e=>e.capabilities?.includes("image")===!0,nt=e=>{if(e.asyncResearch===!0)return!0;const t=e.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return t.includes("sonar")||t.includes("deepresearch")},at=[{key:"fast",label:"Fast",description:"Fastest responses, best for quick tasks",filter:void 0},{key:"smart",label:"Smart",description:"Balanced speed and capability",filter:void 0},{key:"thinking",label:"Thinking",description:"Most capable, best for complex tasks",filter:void 0},{key:"image",label:"Image",description:"Image generation",filter:lt},{key:"web_research",label:"Web research",description:"Web search and deep research",filter:nt}];function ct(e){const t=z.c(20),{slot:i,onSlotChange:n,filterModels:o,defaultKeyId:l}=e,r=X(),[x,_]=O.useState(i?.keyId??l);let b;t[0]!==i?(b=()=>{i?.keyId&&_(i.keyId)},t[0]=i,t[1]=b):b=t[1];const d=i?.keyId;let a;t[2]!==d?(a=[d],t[2]=d,t[3]=a):a=t[3],O.useEffect(b,a);const m=x??l;let c;t[4]!==m||t[5]!==r?(c=m?r.find(y=>y.id===m):null,t[4]=m,t[5]=r,t[6]=c):c=t[6];const u=c,{models:g,isLoading:v}=se(o?m??void 0:void 0),j=o?v||g.some(o):!0;let f;t[7]!==i||t[8]!==u?.providerId?(f=i?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:u?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[7]=i,t[8]=u?.providerId,t[9]=f):f=t[9];const k=f;if(o&&!j){let y;return t[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Not available with current provider"}),t[10]=y):y=t[10],y}let I;t[11]===Symbol.for("react.memo_cache_sentinel")?(I=y=>_(y),t[11]=I):I=t[11];let h;t[12]!==m||t[13]!==n?(h=y=>{const R=y.keyId??m??"";_(R),n({keyId:R,modelId:y.modelId,title:y.title})},t[12]=m,t[13]=n,t[14]=h):h=t[14];let p;return t[15]!==m||t[16]!==o||t[17]!==k||t[18]!==h?(p=s.jsx(Ue,{variant:"bordered",placeholder:"Pick model",model:k,credentialId:m,filterModels:o,onCredentialChange:I,onModelChange:h}),t[15]=m,t[16]=o,t[17]=k,t[18]=h,t[19]=p):p=t[19],p}function dt(e){const t=z.c(2),{isPending:i,showSaved:n}=e;if(i){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(ye,{size:12,className:"animate-spin"}),"Saving…"]}),t[0]=o):o=t[0],o}if(n){let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Oe,{size:12}),"Saved"]}),t[1]=o):o=t[1],o}return null}function mt(){const e=z.c(42),t=X(),i=Te(),n=t.length>0;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=ge(rt),e[0]=o):o=e[0];let l;e[1]!==i?(l={resolver:o,values:i,mode:"onChange"},e[1]=i,e[2]=l):l=e[2];const r=be(l),{mutate:x,isPending:_,isSuccess:b}=ze(),d=r.formState.isDirty;let a;e[3]!==r||e[4]!==i||e[5]!==x?(a={delayMs:250,save:async()=>{const S=r.getValues();x(S,{onSuccess:()=>r.reset(S,{keepValues:!0}),onError:w=>{r.reset(i),Q.error(`Failed to save: ${w.message}`)}})}},e[3]=r,e[4]=i,e[5]=x,e[6]=a):a=e[6];const{schedule:m}=qe(a),c=t[0],u=t[1],g=t[2],{models:v}=se(c?.id),{models:j}=se(u?.id),{models:f}=se(g?.id);let k,I;e[7]!==r||e[8]!==n?(k=()=>{n||r.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_research:null}})},I=[n,r],e[7]=r,e[8]=n,e[9]=k,e[10]=I):(k=e[9],I=e[10]),O.useEffect(k,I);let h;e[11]!==t||e[12]!==r||e[13]!==c||e[14]!==u||e[15]!==g||e[16]!==v||e[17]!==j||e[18]!==f?(h=()=>{const S=r.getValues(),w=new Set(t.map(ut)),F={};c?.id&&(F[c.id]=v),u?.id&&(F[u.id]=j),g?.id&&(F[g.id]=f);const P=Y=>Y!=null&&!w.has(Y.keyId),N={fast:P(S.tiers.fast)?null:S.tiers.fast,smart:P(S.tiers.smart)?null:S.tiers.smart,thinking:P(S.tiers.thinking)?null:S.tiers.thinking,image:P(S.tiers.image)?null:S.tiers.image,web_research:P(S.tiers.web_research)?null:S.tiers.web_research},q=!N.fast||!N.smart||!N.thinking||!N.image||!N.web_research,U=N.fast===S.tiers.fast&&N.smart===S.tiers.smart&&N.thinking===S.tiers.thinking&&N.image===S.tiers.image&&N.web_research===S.tiers.web_research;if(!q&&U)return;const B=Me(t,F);r.reset({tiers:{fast:N.fast??B.chat.fast,smart:N.smart??B.chat.smart,thinking:N.thinking??B.chat.thinking,image:N.image??B.image,web_research:N.web_research??B.webResearch}},{keepDirty:!0})},e[11]=t,e[12]=r,e[13]=c,e[14]=u,e[15]=g,e[16]=v,e[17]=j,e[18]=f,e[19]=h):h=e[19];const p=c?.id,y=u?.id,R=g?.id;let M;e[20]!==t||e[21]!==r||e[22]!==v||e[23]!==j||e[24]!==f||e[25]!==p||e[26]!==y||e[27]!==R?(M=[r,t,v,j,f,p,y,R],e[20]=t,e[21]=r,e[22]=v,e[23]=j,e[24]=f,e[25]=p,e[26]=y,e[27]=R,e[28]=M):M=e[28],O.useEffect(h,M);let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("p",{className:"text-sm text-muted-foreground",children:"These models power chat, automations, and tools across your organization."}),e[29]=T):T=e[29];const $=b&&!d;let A;e[30]!==_||e[31]!==$?(A=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[T,s.jsx(dt,{isPending:_,showSaved:$})]}),e[30]=_,e[31]=$,e[32]=A):A=e[32];let D;e[33]!==t[0]?.id||e[34]!==r.control||e[35]!==m?(D=at.map(S=>s.jsx(Ee,{control:r.control,name:`tiers.${S.key}`,render:w=>{const{field:F}=w;return s.jsx(_e,{title:S.label,description:S.description,action:s.jsx(ct,{slot:F.value,defaultKeyId:t[0]?.id??null,filterModels:S.filter,onSlotChange:P=>{F.onChange(P),m()}})})}},S.key)),e[33]=t[0]?.id,e[34]=r.control,e[35]=m,e[36]=D):D=e[36];let K;e[37]!==D?(K=s.jsx(ce,{children:D}),e[37]=D,e[38]=K):K=e[38];let E;return e[39]!==A||e[40]!==K?(E=s.jsxs(de,{title:"Default models",headerClassName:"pl-0",children:[A,K]}),e[39]=A,e[40]=K,e[41]=E):E=e[41],E}function ut(e){return e.id}const ft={usd:[10,20,100],brl:[50,100,500]};function pt(){const e=z.c(26),t=W(),[i,n]=O.useState(!1),{mutate:o,isPending:l}=J({mutationFn:async h=>{const{url:p}=await t.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:h,currency:d});return p},onSuccess:xt,onError:ht}),[r,x]=O.useState(""),[_,b]=O.useState("usd"),d=_,a=parseFloat(r),m=!isNaN(a)&&a>=1,c=d==="brl"?"R$":"$";let u;e[0]!==b?(u=h=>{h&&b(h)},e[0]=b,e[1]=u):u=e[1];let g,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(fe,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),v=s.jsx(fe,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),e[2]=g,e[3]=v):(g=e[2],v=e[3]);let j;e[4]!==d||e[5]!==u?(j=s.jsxs(Le,{type:"single",variant:"outline",size:"default",value:d,onValueChange:u,children:[g,v]}),e[4]=d,e[5]=u,e[6]=j):j=e[6];let f;e[7]!==d||e[8]!==c||e[9]!==i||e[10]!==l||e[11]!==o?(f=!i&&s.jsxs(s.Fragment,{children:[ft[d].map(h=>s.jsxs(L,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:l,onClick:()=>o(h*100),children:[c,h]},h)),s.jsx(L,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>n(!0),disabled:l,children:"Custom"})]}),e[7]=d,e[8]=c,e[9]=i,e[10]=l,e[11]=o,e[12]=f):f=e[12];let k;e[13]!==c||e[14]!==r||e[15]!==a||e[16]!==i||e[17]!==m||e[18]!==l||e[19]!==x||e[20]!==o?(k=i&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:c}),s.jsx(ie,{type:"number",min:"1",step:"1",placeholder:"50",value:r,onChange:h=>x(h.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),s.jsx(L,{className:"h-10",disabled:!m||l,onClick:()=>o(Math.round(a*100)),children:l?"...":"Add"}),s.jsx(L,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{n(!1),x("")},children:"Cancel"})]}),e[13]=c,e[14]=r,e[15]=a,e[16]=i,e[17]=m,e[18]=l,e[19]=x,e[20]=o,e[21]=k):k=e[21];let I;return e[22]!==j||e[23]!==f||e[24]!==k?(I=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,f,k]})}),e[22]=j,e[23]=f,e[24]=k,e[25]=I):I=e[25],I}function ht(e){Q.error(`Top-up failed: ${e.message}`)}function xt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function gt(e){return e<=0?"text-destructive":e<=1?"text-amber-500 dark:text-amber-400":"text-foreground"}function bt(){const e=z.c(58),{org:t}=oe(),i=W(),n=re(),o=X();let l;e[0]!==o?(l=o.find(vt),e[0]=o,e[1]=l):l=e[1];const r=l,[x,_]=O.useState(!1);let b;e[2]!==r||e[3]!==i?(b=async()=>{r&&await i.call("AI_PROVIDER_KEY_DELETE",{keyId:r.id})},e[2]=r,e[3]=i,e[4]=b):b=e[4];let d;e[5]!==t.id||e[6]!==n?(d=()=>{n.invalidateQueries({queryKey:G.aiProviderKeys(t.id)}),n.invalidateQueries({queryKey:G.aiProviders(t.id)}),Q.success("Deco AI Gateway disconnected"),_(!1)},e[5]=t.id,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==b||e[9]!==d?(a={mutationFn:b,onSuccess:d,onError:yt},e[8]=b,e[9]=d,e[10]=a):a=e[10];const{mutate:m,isPending:c}=J(a);let u;e[11]!==t.id?(u=G.aiProviderCredits(t.id,"deco"),e[11]=t.id,e[12]=u):u=e[12];const g=!!r;let v;e[13]!==i?(v=async()=>{try{return await i.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},e[13]=i,e[14]=v):v=e[14];let j;e[15]!==u||e[16]!==g||e[17]!==v?(j={queryKey:u,enabled:g,staleTime:6e4,queryFn:v},e[15]=u,e[16]=g,e[17]=v,e[18]=j):j=e[18];const{data:f,isLoading:k,refetch:I,isFetching:h}=ve(j);if(!r)return null;const p=f?.balanceCents!=null?f.balanceCents/100:null;let y;e[19]!==p?(y=p!=null?`$${p.toFixed(2)}`:"—",e[19]=p,e[20]=y):y=e[20];const R=y;let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),s.jsx("div",{children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Access to 100+ models"})})]}),e[21]=M):M=e[21];let T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=()=>_(!0),e[22]=T):T=e[22];let $;e[23]!==c?($=s.jsxs("div",{className:"flex items-center justify-between",children:[M,s.jsx(L,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:T,disabled:c,children:"Disconnect"})]}),e[23]=c,e[24]=$):$=e[24];let A;e[25]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsxs(ke,{children:[s.jsx(Ie,{children:"Disconnect Deco AI Gateway"}),s.jsx(Ce,{children:"This will remove the Deco AI Gateway from this workspace. Your credit balance is preserved and will be available if you reconnect."})]}),e[25]=A):A=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ne,{children:"Cancel"}),e[26]=D):D=e[26];let K;e[27]!==m?(K=s.jsxs(Pe,{children:[A,s.jsxs(we,{children:[D,s.jsx(Ae,{onClick:()=>m(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Disconnect"})]})]}),e[27]=m,e[28]=K):K=e[28];let E;e[29]!==x||e[30]!==K?(E=s.jsx(De,{open:x,onOpenChange:_,children:K}),e[29]=x,e[30]=K,e[31]=E):E=e[31];let S;e[32]!==p||e[33]!==R||e[34]!==h||e[35]!==k?(S=k||h?s.jsx(ae,{className:"h-9 w-24"}):s.jsx("span",{className:ue("text-3xl font-semibold tabular-nums tracking-tight",p!=null&&gt(p)),children:R}),e[32]=p,e[33]=R,e[34]=h,e[35]=k,e[36]=S):S=e[36];let w;e[37]!==I?(w=()=>I(),e[37]=I,e[38]=w):w=e[38];const F=h&&"animate-spin";let P;e[39]!==F?(P=ue(F),e[39]=F,e[40]=P):P=e[40];let N;e[41]!==P?(N=s.jsx(ye,{size:14,className:P}),e[41]=P,e[42]=N):N=e[42];let q;e[43]!==h||e[44]!==w||e[45]!==N?(q=s.jsx("button",{type:"button",onClick:w,disabled:h,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":"Refresh balance",children:N}),e[43]=h,e[44]=w,e[45]=N,e[46]=q):q=e[46];let U;e[47]!==S||e[48]!==q?(U=s.jsxs("div",{className:"flex items-baseline gap-2",children:[S,q]}),e[47]=S,e[48]=q,e[49]=U):U=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Available credit balance"}),e[50]=B):B=e[50];let Y;e[51]!==U?(Y=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[U,B]}),e[51]=U,e[52]=Y):Y=e[52];let Z;e[53]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:"Add credits"}),s.jsx(pt,{})]}),e[53]=Z):Z=e[53];let ee;return e[54]!==$||e[55]!==E||e[56]!==Y?(ee=s.jsx(de,{title:"Deco AI Gateway",children:s.jsx(ce,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[$,E,Y,Z]})})}),e[54]=$,e[55]=E,e[56]=Y,e[57]=ee):ee=e[57],ee}function yt(e){Q.error(`Failed to disconnect: ${e.message}`)}function vt(e){return e.providerId==="deco"}function jt(){const e=z.c(8),{org:t}=oe(),i=W(),n=re();let o;e[0]!==i?(o=async()=>{await i.call("AI_PROVIDER_PROVISION_KEY",{providerId:"deco"})},e[0]=i,e[1]=o):o=e[1];let l;e[2]!==t||e[3]!==n?(l=()=>{je("ai_provider_provision_succeeded",{provider_id:"deco"}),n.invalidateQueries({queryKey:G.aiProviderKeys(t.id)}),n.invalidateQueries({queryKey:G.aiProviders(t.id)}),Q.success("Deco AI Gateway connected successfully")},e[2]=t,e[3]=n,e[4]=l):l=e[4];let r;return e[5]!==o||e[6]!==l?(r={mutationFn:o,onSuccess:l,onError:_t},e[5]=o,e[6]=l,e[7]=r):r=e[7],J(r)}function _t(e){je("ai_provider_provision_failed",{provider_id:"deco",error:e.message}),Q.error(`Failed to connect Deco AI Gateway: ${e.message}`)}function St(){const e=z.c(10),{mutate:t,isPending:i}=jt();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=["radial-gradient(ellipse 50% 150% at -15% 50%, rgba(165,149,255,0.14) 0%, transparent 60%)","radial-gradient(ellipse 50% 150% at 115% 50%, rgba(208,236,26,0.11) 0%, transparent 60%)"],e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:n.join(", ")}}),e[1]=o):o=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-12 shrink-0 rounded-xl object-contain dark:bg-white dark:p-1"}),e[2]=l):l=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("p",{className:"text-base font-semibold",children:"Deco AI Gateway"}),s.jsx("span",{className:"rounded-full border border-border/60 bg-background/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Recommended"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"100+ models, one connection — pay as you go, no API keys to juggle."})]}),e[3]=r):r=e[3];let x;e[4]!==t?(x=()=>t(),e[4]=t,e[5]=x):x=e[5];const _=i?"Connecting…":"Connect Deco";let b;return e[6]!==i||e[7]!==x||e[8]!==_?(b=s.jsxs("div",{className:"relative rounded-xl border border-border overflow-hidden",children:[o,s.jsxs("div",{className:"relative flex items-center gap-5 px-6 py-5",children:[l,r,s.jsx(L,{variant:"outline",disabled:i,onClick:x,children:_})]})]}),e[6]=i,e[7]=x,e[8]=_,e[9]=b):b=e[9],b}const kt=V({label:C().min(1,"Label is required").max(100),apiKey:C().optional(),baseUrl:C().optional()});function It({providerKey:e,provider:t,preset:i,maskedKey:n,currentLabel:o,currentBaseUrl:l,onCancel:r,onSuccess:x}){const{org:_}=oe(),b=W(),d=re(),[a,m]=O.useState(!1),c=t.id==="openai-compatible",u=t.supportedMethods.includes("api-key"),{register:g,handleSubmit:v,watch:j,formState:{errors:f}}=be({resolver:ge(kt),defaultValues:{label:o,apiKey:"",baseUrl:l??""}}),k=j("apiKey")??"",{mutate:I,isPending:h}=J({mutationFn:async p=>{let y;p.apiKey?c?y=JSON.stringify({baseUrl:p.baseUrl||l||"",apiKey:p.apiKey}):y=p.apiKey:c&&p.baseUrl&&p.baseUrl!==l&&(y=JSON.stringify({baseUrl:p.baseUrl,apiKey:""})),await b.call("AI_PROVIDER_KEY_UPDATE",{keyId:e.id,label:p.label,...y!==void 0?{apiKey:y}:{}})},onSuccess:()=>{d.invalidateQueries({queryKey:G.aiProviderKeys(_.id)}),d.invalidateQueries({queryKey:G.aiProviders(_.id)}),Q.success("Provider updated"),x()},onError:p=>Q.error(`Failed to update: ${p.message}`)});return s.jsxs("form",{onSubmit:v(p=>I(p)),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),s.jsx(ie,{placeholder:"e.g. Personal key",...g("label"),className:"h-8 text-sm"}),f.label&&s.jsx("p",{className:"text-xs text-destructive",children:f.label.message})]}),c&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Base URL"}),s.jsx(ie,{type:"url",placeholder:i?.baseUrlPlaceholder??"http://localhost:4000/v1",...g("baseUrl"),className:"h-8 text-sm"})]}),u&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["API key"," ",s.jsx("span",{className:"text-muted-foreground/60",children:"(leave blank to keep current)"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ie,{type:a&&k?"text":"password",placeholder:n,...g("apiKey"),className:"ph-no-capture h-8 text-sm pr-8"}),k&&s.jsx("button",{type:"button",onClick:()=>m(!a),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?s.jsx(We,{size:14}):s.jsx(He,{size:14})})]})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Je,{children:[s.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:r,disabled:h,children:"Cancel"}),s.jsx(L,{type:"submit",size:"sm",disabled:h,children:h?"Saving...":"Save"})]})]})}function Ct(e){const t=z.c(28),{providerKey:i,provider:n,open:o,onOpenChange:l}=e,r=W();let x;t[0]!==n.id||t[1]!==i.presetId?(x=n.id==="openai-compatible"&&i.presetId?Ke.find(k=>k.id===i.presetId):void 0,t[0]=n.id,t[1]=i.presetId,t[2]=x):x=t[2];const _=x,b=_?.name??n.name;let d;t[3]!==i.id?(d=G.aiProviderKeyPreview(i.id),t[3]=i.id,t[4]=d):d=t[4];let a;t[5]!==i.id||t[6]!==r?(a=()=>r.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),t[5]=i.id,t[6]=r,t[7]=a):a=t[7];let m;t[8]!==o||t[9]!==d||t[10]!==a?(m={queryKey:d,queryFn:a,enabled:o,staleTime:0},t[8]=o,t[9]=d,t[10]=a,t[11]=m):m=t[11];const{data:c,isLoading:u}=ve(m);let g;t[12]!==b?(g=s.jsx(Xe,{children:s.jsxs(Ze,{children:["Edit ",b]})}),t[12]=b,t[13]=g):g=t[13];let v;t[14]!==u||t[15]!==l||t[16]!==_||t[17]!==c||t[18]!==n||t[19]!==i?(v=u||!c?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(st,{})}):s.jsx(It,{providerKey:i,provider:n,preset:_,maskedKey:c.maskedKey,currentLabel:c.label,currentBaseUrl:c.baseUrl,onCancel:()=>l(!1),onSuccess:()=>l(!1)}),t[14]=u,t[15]=l,t[16]=_,t[17]=c,t[18]=n,t[19]=i,t[20]=v):v=t[20];let j;t[21]!==g||t[22]!==v?(j=s.jsxs(et,{className:"sm:max-w-md",children:[g,v]}),t[21]=g,t[22]=v,t[23]=j):j=t[23];let f;return t[24]!==l||t[25]!==o||t[26]!==j?(f=s.jsx(tt,{open:o,onOpenChange:l,children:j}),t[24]=l,t[25]=o,t[26]=j,t[27]=f):f=t[27],f}function Nt(e){const t=z.c(48),{providerKey:i,provider:n}=e,{org:o}=oe(),l=W(),r=re(),[x,_]=O.useState(!1),[b,d]=O.useState(!1),a=n.id==="openai-compatible";let m;t[0]!==a||t[1]!==i.presetId?(m=a&&i.presetId?Ke.find(q=>q.id===i.presetId):void 0,t[0]=a,t[1]=i.presetId,t[2]=m):m=t[2];const c=m,u=c?c.name:a?"Custom OpenAI-compatible":n.name,g=c?.logo??n.logo;let v;e:{if(a){v=i.label;break e}const q=i.label;let U;t[3]!==i.createdAt?(U=it(new Date(i.createdAt)),t[3]=i.createdAt,t[4]=U):U=t[4],v=`${q} · added ${U} ago`}const j=v;let f;t[5]!==i.id||t[6]!==l?(f=async()=>{await l.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},t[5]=i.id,t[6]=l,t[7]=f):f=t[7];let k;t[8]!==o||t[9]!==i.id||t[10]!==r?(k=()=>{r.invalidateQueries({queryKey:G.aiProviderKeys(o.id)}),r.invalidateQueries({queryKey:G.aiProviders(o.id)}),r.invalidateQueries({queryKey:G.aiProviderModels(o.id,i.id)}),Q.success("Key deleted"),_(!1)},t[8]=o,t[9]=i.id,t[10]=r,t[11]=k):k=t[11];let I;t[12]!==f||t[13]!==k?(I={mutationFn:f,onSuccess:k,onError:Pt},t[12]=f,t[13]=k,t[14]=I):I=t[14];const{mutate:h,isPending:p}=J(I);let y;t[15]!==u||t[16]!==g?(y=g?s.jsx("img",{src:g,alt:u,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(Qe,{fallback:u.charAt(0),className:"size-8 bg-primary/10 text-primary"}),t[15]=u,t[16]=g,t[17]=y):y=t[17];let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:()=>d(!0),children:s.jsx(Ge,{size:14})}),t[18]=R):R=t[18];let M,T;t[19]===Symbol.for("react.memo_cache_sentinel")?(M=()=>_(!0),T=s.jsx(Be,{size:14}),t[19]=M,t[20]=T):(M=t[19],T=t[20]);let $;t[21]!==p?($=s.jsxs("div",{className:"flex items-center gap-0.5",children:[R,s.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",disabled:p,onClick:M,children:T})]}),t[21]=p,t[22]=$):$=t[22];let A;t[23]!==j||t[24]!==u||t[25]!==$||t[26]!==y?(A=s.jsx(_e,{icon:y,title:u,description:j,action:$}),t[23]=j,t[24]=u,t[25]=$,t[26]=y,t[27]=A):A=t[27];let D;t[28]!==b||t[29]!==n||t[30]!==i?(D=s.jsx(Ct,{providerKey:i,provider:n,open:b,onOpenChange:d}),t[28]=b,t[29]=n,t[30]=i,t[31]=D):D=t[31];let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Ie,{children:"Delete API key"}),t[32]=K):K=t[32];let E;t[33]!==i.label?(E=s.jsxs(ke,{children:[K,s.jsxs(Ce,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]})]}),t[33]=i.label,t[34]=E):E=t[34];let S;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ne,{children:"Cancel"}),t[35]=S):S=t[35];let w;t[36]!==h?(w=s.jsxs(we,{children:[S,s.jsx(Ae,{onClick:()=>h(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[36]=h,t[37]=w):w=t[37];let F;t[38]!==E||t[39]!==w?(F=s.jsxs(Pe,{children:[E,w]}),t[38]=E,t[39]=w,t[40]=F):F=t[40];let P;t[41]!==x||t[42]!==F?(P=s.jsx(De,{open:x,onOpenChange:_,children:F}),t[41]=x,t[42]=F,t[43]=P):P=t[43];let N;return t[44]!==A||t[45]!==D||t[46]!==P?(N=s.jsxs(s.Fragment,{children:[A,D,P]}),t[44]=A,t[45]=D,t[46]=P,t[47]=N):N=t[47],N}function Pt(e){return Q.error(`Failed to delete key: ${e.message}`)}function wt(e){const t=z.c(11),{onConnectClick:i}=e,n=X(),o=Se();let l;t[0]!==o?.providers?(l=o?.providers??[],t[0]=o?.providers,t[1]=l):l=t[1];const r=l;let x;if(t[2]!==n||t[3]!==i||t[4]!==r){let _;t[6]!==r?(_=m=>({key:m,provider:r.find(c=>c.id===m.providerId)}),t[6]=r,t[7]=_):_=t[7];const b=n.filter(Kt).map(_).filter(Dt);let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ve,{size:14}),t[8]=d):d=t[8];let a;t[9]!==i?(a=s.jsxs(L,{size:"sm",onClick:i,children:[d,"Connect provider"]}),t[9]=i,t[10]=a):a=t[10],x=s.jsx(de,{title:"Connected providers",headerClassName:"px-0",actions:a,children:b.length===0?s.jsx("p",{className:"text-sm text-muted-foreground px-1",children:"Bring your own keys to use specific models alongside Deco's gateway."}):s.jsx(ce,{children:b.map(At)})}),t[2]=n,t[3]=i,t[4]=r,t[5]=x}else x=t[5];return x}function At(e){const{key:t,provider:i}=e;return s.jsx(Nt,{providerKey:t,provider:i},t.id)}function Dt(e){return e.provider!==void 0}function Kt(e){return e.providerId!=="deco"}function Et(e){const t=z.c(3),{error:i}=e;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[0]=n):n=t[0];let o;return t[1]!==i.message?(o=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),t[1]=i.message,t[2]=o):o=t[2],o}function Ft(){const e=z.c(23),t=X();let i;e[0]!==t?(i=t.some(Rt),e[0]=t,e[1]=i):i=e[1];const n=i,o=t.length>0,[l,r]=O.useState(!1),[x,_]=O.useState(null),b=Se();let d;e[2]!==b?.providers?(d=b?.providers??[],e[2]=b?.providers,e[3]=d):d=e[3];const a=d;if(!o){let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=()=>r(!0),e[4]=j):j=e[4];let f;e[5]!==a?(f=s.jsx(Ye,{providers:a,onSelect:_,onShowAll:j}),e[5]=a,e[6]=f):f=e[6];const k=x!==null||l;let I;e[7]===Symbol.for("react.memo_cache_sentinel")?(I=R=>{R||(_(null),r(!1))},e[7]=I):I=e[7];const h=x??void 0;let p;e[8]!==k||e[9]!==h?(p=s.jsx(pe,{open:k,onOpenChange:I,initialProvider:h}),e[8]=k,e[9]=h,e[10]=p):p=e[10];let y;return e[11]!==f||e[12]!==p?(y=s.jsxs(s.Fragment,{children:[f,p]}),e[11]=f,e[12]=p,e[13]=y):y=e[13],y}let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(O.Suspense,{fallback:s.jsx(ae,{className:"h-16 w-full"}),children:s.jsx(mt,{})}),e[14]=m):m=e[14];let c;e[15]!==n?(c=n?s.jsx(bt,{}):s.jsx(St,{}),e[15]=n,e[16]=c):c=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(wt,{onConnectClick:()=>r(!0)}),e[17]=u):u=e[17];let g;e[18]!==l?(g=s.jsx(pe,{open:l,onOpenChange:r}),e[18]=l,e[19]=g):g=e[19];let v;return e[20]!==c||e[21]!==g?(v=s.jsxs(s.Fragment,{children:[m,c,u,g]}),e[20]=c,e[21]=g,e[22]=v):v=e[22],v}function Rt(e){return e.providerId==="deco"}function $t(){const e=z.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(te.Title,{children:"AI Providers"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(te,{children:s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs($e,{children:[t,s.jsx(Fe,{fallback:Ot,children:s.jsx(O.Suspense,{fallback:s.jsx(ae,{className:"h-64 w-full"}),children:s.jsx(Ft,{})})})]})})})}),e[1]=i):i=e[1],i}function Ot(e){const{error:t}=e;return s.jsx(Et,{error:t??new Error("Failed to load AI providers")})}function Ls(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ot,{capability:"ai-providers:manage",area:"AI providers",children:s.jsx($t,{})}),e[0]=t):t=e[0],t}export{Ls as default};
@@ -1 +1 @@
1
- import{e as n,c as o,j as c,bq as d}from"./index-3ttoiVWU.js";const u=d("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function f(l){const e=n.c(10);let t,r,s;e[0]!==l?({className:t,variant:s,...r}=l,e[0]=l,e[1]=t,e[2]=r,e[3]=s):(t=e[1],r=e[2],s=e[3]);let a;e[4]!==t||e[5]!==s?(a=o(u({variant:s}),t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let i;return e[7]!==r||e[8]!==a?(i=c.jsx("div",{"data-slot":"alert",role:"alert",className:a,...r}),e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function x(l){const e=n.c(8);let t,r;e[0]!==l?({className:t,...r}=l,e[0]=l,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=o("line-clamp-1 min-h-4 font-medium tracking-tight",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==r||e[6]!==s?(a=c.jsx("div",{"data-slot":"alert-title",className:s,...r}),e[5]=r,e[6]=s,e[7]=a):a=e[7],a}function v(l){const e=n.c(8);let t,r;e[0]!==l?({className:t,...r}=l,e[0]=l,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=o("text-muted-foreground leading-relaxed",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==r||e[6]!==s?(a=c.jsx("div",{"data-slot":"alert-description",className:s,...r}),e[5]=r,e[6]=s,e[7]=a):a=e[7],a}export{f as A,x as a,v as b};
1
+ import{e as n,c as o,j as c,bq as d}from"./index-DEUVODq9.js";const u=d("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function f(l){const e=n.c(10);let t,r,s;e[0]!==l?({className:t,variant:s,...r}=l,e[0]=l,e[1]=t,e[2]=r,e[3]=s):(t=e[1],r=e[2],s=e[3]);let a;e[4]!==t||e[5]!==s?(a=o(u({variant:s}),t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let i;return e[7]!==r||e[8]!==a?(i=c.jsx("div",{"data-slot":"alert",role:"alert",className:a,...r}),e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function x(l){const e=n.c(8);let t,r;e[0]!==l?({className:t,...r}=l,e[0]=l,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=o("line-clamp-1 min-h-4 font-medium tracking-tight",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==r||e[6]!==s?(a=c.jsx("div",{"data-slot":"alert-title",className:s,...r}),e[5]=r,e[6]=s,e[7]=a):a=e[7],a}function v(l){const e=n.c(8);let t,r;e[0]!==l?({className:t,...r}=l,e[0]=l,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=o("text-muted-foreground leading-relaxed",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==r||e[6]!==s?(a=c.jsx("div",{"data-slot":"alert-description",className:s,...r}),e[5]=r,e[6]=s,e[7]=a):a=e[7],a}export{f as A,x as a,v as b};
@@ -1,4 +1,4 @@
1
- import{r as i,bu as m,j as r,dp as A,dm as w,dn as T,dL as O,bB as M,a5 as I,cw as L,dM as D,cx as z,dA as F,ad as G,dq as k,cy as q,e as n,c as p,dN as v}from"./index-3ttoiVWU.js";var x="AlertDialog",[B]=G(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var H="AlertDialogTrigger",V=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});V.displayName=H;var W="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=W;var Y="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(q,{...o,...a,ref:e})});_.displayName=Y;var f="AlertDialogContent",[J,K]=B(f),Q=F("AlertDialogContent"),j=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});j.displayName=f;var b="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=b;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",C=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=U;var $="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K($,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=$;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
1
+ import{r as i,bu as m,j as r,dp as A,dm as w,dn as T,dL as O,bB as M,a5 as I,cw as L,dM as D,cx as z,dA as F,ad as G,dq as k,cy as q,e as n,c as p,dN as v}from"./index-DEUVODq9.js";var x="AlertDialog",[B]=G(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var H="AlertDialogTrigger",V=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});V.displayName=H;var W="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=W;var Y="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(q,{...o,...a,ref:e})});_.displayName=Y;var f="AlertDialogContent",[J,K]=B(f),Q=F("AlertDialogContent"),j=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});j.displayName=f;var b="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=b;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",C=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=U;var $="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K($,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=$;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -0,0 +1 @@
1
+ import{e as gt,r as w,j as o,c as St,n as ut,l as yt}from"./index-DEUVODq9.js";import{i as jt}from"./ChevronRight-DtVYtVbK.js";import{S as kt}from"./scroll-area-CHs0jTz4.js";import{AddSectionModal as _t}from"./add-section-modal-CtMZ_X5l.js";import{aa as wt,ab as Bt,f as Nt,g as Rt,ac as At}from"./index-CEk0yA7A.js";import{c as Ct}from"./save-referenced-block-0RMjuyn4.js";import{b as Et,S as Kt}from"./schema-form-CKIpZkBj.js";import{S as Ft}from"./save-status-DfBuYJH7.js";import"./select-Dyn5eJ76.js";import"./tooltip-CnO8IxhJ.js";import"./Check-CFZ7jofS.js";import"./ChevronDown-CMnvnfNH.js";import"./ChevronUp-BYxSfj4f.js";import"./agent-icon-CV7VKepg.js";import"./AlertCircle-DU4Czymb.js";import"./Tool01-BKl-GVq3.js";import"./SwitchHorizontal01-BQBOH6Au.js";import"./RefreshCcw01-B9XxpyTk.js";import"./XCircle-8_cOsjUY.js";import"./ArrowUpRight-jvt9_jPs.js";import"./ZapSquare-Dj9sWt3u.js";import"./Users03-DH-6SNzV.js";import"./CheckCircle-B7_GaGqy.js";import"./ChevronLeft-BLmY09V7.js";import"./DotsVertical-7ebFkKLD.js";import"./Container-CQcCiGBy.js";import"./Eye-CYtfD-C-.js";import"./ZoomOut-DfX9NmNO.js";import"./Globe01-bYDzICLJ.js";import"./FilterLines-BtiGzXwl.js";import"./Star01-CjQzvxTy.js";import"./Palette-8PqtgYqw.js";import"./HardDrive-gxQ66xi3.js";import"./Stars02-COgJsT25.js";import"./Key01-CDcV65YU.js";import"./LayoutLeft-Cy-bGbAH.js";import"./LinkExternal01-BDXPmxri.js";import"./Monitor01-6PVrucyX.js";import"./Sun-BFeAvEQf.js";import"./Play-B0CTz7-g.js";import"./Plus-DW_pro4F.js";import"./SearchMd-BnZZ5mEU.js";import"./Settings02-BzBPnOVl.js";import"./Shield01-CUegYioy.js";import"./Stars01-BBldOY4r.js";import"./Trash01-BfygLm6s.js";import"./Upload01-ClElEXYw.js";import"./User01-Bi6i4zOy.js";import"./Users01-BXIkeJej.js";import"./XClose-CCKAliKU.js";import"./X-BUzk9ZuQ.js";import"./Zap-DMSK7ZyR.js";import"./dialog-FBdtBd0W.js";import"./input-CkGEzOB_.js";import"./agent-capabilities-C3MTl0Im.js";import"./chat-context-BG_brbim.js";import"./tab-id-BxH9ETDC.js";import"./use-mcp-client-DnHVNKKy.js";import"./auth-StjmYjna.js";import"./watch-sse-pool-D12zGFzz.js";import"./decopilot-sse-pool-yovdq4PK.js";import"./use-virtual-mcp-kNQ4Vk7l.js";import"./use-collections-Boao6GlT.js";import"./use-ai-providers-D41Ncdap.js";import"./use-organization-settings-BRHmZDz1.js";import"./pair-BGqqCdXk.js";import"./use-clock-tick-C5MmRZ_O.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-94yZW0qP.js";import"./file-type-icon-BAmjNPBc.js";import"./content-blocks-o63cs2vh.js";import"./types-yqsHoQS8.js";import"./studio-tools-DnIG9YV2.js";import"./shell-layout-D-knukkt.js";import"./avatar-ItW7yKah.js";import"./required-auth-layout-9YYeY0t9.js";import"./useRouterState-Clwac4xr.js";import"./use-org-sso-DQRRc4kX.js";import"./integration-icon-D3LrOIav.js";import"./use-navigate-to-agent-VVlSVZf7.js";import"./use-connection-D0BF0adZ.js";import"./use-mcp-prompts-B7lJiQ-b.js";import"./form-BKRU3_f0.js";import"./label-CxhkSBar.js";import"./spinner-CZkJwfre.js";import"./drawer-CSp117Rg.js";import"./collection-search-BEvxyUp1.js";import"./tabs-Kstg5esT.js";import"./toggle-group-TV66K5Bs.js";import"./sortable.esm-B6mcz4jC.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DNd6JwtE.js";import"./use-registry-connections-bQBnbYjF.js";import"./useInfiniteQuery-DG9NlZam.js";import"./use-infinite-scroll-WoD-e-vZ.js";import"./extract-connection-data-D9Xe4stq.js";import"./generate-id-CKNg3Kb_.js";import"./collections-DGui_rw4.js";import"./card-B0-N4bpb.js";import"./collection-tabs-DM_bzUmO.js";import"./badge-Bw9vN6fg.js";import"./textarea-D_FY-WF9.js";import"./connection-form-helpers-C-CDw2oQ.js";import"./useSuspenseInfiniteQuery-D1V_0Wrc.js";import"./mcp-oauth-ClRecFEf.js";import"./connect-desktop-dialog-BHttcPxA.js";import"./decopilot-kQEGsQqO.js";import"./checkbox-BjUgAWJu.js";import"./skeleton-CBG5UooE.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BsU7NnTR.js";import"./popover-D6gDvvex.js";import"./command-CSF0stL5.js";import"./index-wos7zFLb.js";import"./index-B6pSigm3.js";import"./dropdown-menu-BUlN28jb.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-BQnWeFBU.js";import"./sidebar-DMarnfZA.js";import"./sheet-C2l8o7Li.js";import"./toolbar-CCbum7s0.js";import"./use-create-virtual-mcp-qtUnoDxA.js";import"./github-repo-picker-BXMy0hpf.js";import"./use-mcp-tools-Dduxk9LO.js";import"./alert-dialog-CjyXYSQZ.js";import"./index-DGguhABr.js";import"./use-org-auth-client-5GIyjJUc.js";import"./hover-card-dEUH7y9z.js";import"./task-status-Z_8flBXc.js";import"./use-status-sounds-Biot_m4f.js";import"./empty-state-DZZ4TCiB.js";import"./resizable-DV0pCXfQ.js";import"./use-capability-km64e2ng.js";import"./header-tab-button-CRRaGYWH.js";import"./index-CwjMi0Lt.js";import"./user-D2dH1j5H.js";import"./tools-list-De2JTKaU.js";import"./switch-DZavAgGZ.js";import"./use-debounced-autosave-Dj71wv9y.js";import"./index-CiklrCzm.js";import"./search-input-DLDVTOcp.js";import"./use-secrets-BYUtrbRD.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-x86xWE4B.js";import"./view-mode-toggle-BVJSd33i.js";import"./select-model-BNZKyxON.js";import"./use-automations-Cjo8cUaV.js";import"./monaco-editor-CiwloXdm.js";import"./automation-runs-CAE5s4jH.js";import"./table-C6yf7crt.js";import"./use-members-YdskzoCL.js";import"./automation-list-row-ZsMhYjFo.js";import"./calendar-D0RqU72a.js";import"./image-field-CgZHn_on.js";import"./use-file-configs-CwuLM8jQ.js";function Cr(B){const t=gt.c(77),{orgSlug:d,virtualMcpId:f,branch:u,blockKey:i,block:p,meta:m,decofile:l,title:H,excludeFields:G,schemaPending:at,previewBaseUrl:nt}=B,J=at===void 0?!1:at,n=nt===void 0?null:nt,h=typeof p?.__resolveType=="string"?p.__resolveType:"";let A;t[0]!==G||t[1]!==m||t[2]!==h?(A=wt(h,m,G),t[0]=G,t[1]=m,t[2]=h,t[3]=A):A=t[3];const c=A;let C;t[4]!==c?(C=!!c&&Object.keys(c.properties??{}).length>0,t[4]=c,t[5]=C):C=t[5];const Q=C;let E;t[6]!==p||t[7]!==i||t[8]!==m||t[9]!==H?(E=H??(p?Bt(i,p,m):i),t[6]=p,t[7]=i,t[8]=m,t[9]=H,t[10]=E):E=t[10];const x=E;let K;t[11]!==u||t[12]!==d||t[13]!==f?(K={orgSlug:d,virtualMcpId:f,branch:u},t[11]=u,t[12]=d,t[13]=f,t[14]=K):K=t[14];const{save:v,flush:W,isPending:X}=Nt(K);let F;t[15]!==u||t[16]!==d||t[17]!==f?(F={orgSlug:d,virtualMcpId:f,branch:u},t[15]=u,t[16]=d,t[17]=f,t[18]=F):F=t[18];const Y=Rt(F);let $;t[19]!==v?($=Ct((e,r)=>v(e,r)),t[19]=v,t[20]=$):$=t[20];const Z=$,[ht,xt]=w.useState(i),[tt,ct]=w.useState(null),[et,dt]=w.useState(0);let P;t[21]===Symbol.for("react.memo_cache_sentinel")?(P=[],t[21]=P):P=t[21];const[s,ft]=w.useState(P),[ot,rt]=w.useState(!1),O=w.useRef(null);ht!==i&&(xt(i),ct(null),dt(Pt),ft([]));let T;t[22]!==p?(T=p??{},t[22]=p,t[23]=T):T=t[23];const it=T;let b;t[24]!==tt?(b=tt??{},t[24]=tt,t[25]=b):b=t[25];let V;t[26]!==it||t[27]!==b?(V={...it,...b},t[26]=it,t[27]=b,t[28]=V):V=t[28];const mt=V;let I;t[29]!==i||t[30]!==h||t[31]!==v?(I=e=>{const r=e;ct(r),v(i,{...r,__resolveType:h})},t[29]=i,t[30]=h,t[31]=v,t[32]=I):I=t[32];const st=I;let L;t[33]===Symbol.for("react.memo_cache_sentinel")?(L=e=>{ft(e)},t[33]=L):L=t[33];const pt=L;let q;t[34]!==l||t[35]!==W||t[36]!==Y?(q=async(e,r)=>{try{const{blockKey:a,data:R}=At(e,l);await Y.mutateAsync({blockKey:a,data:R}),ut.success(`Created section "${a}"`),r({__resolveType:a}),W()}catch(a){const R=a,bt=R instanceof Error?R.message:"Could not add section";throw ut.error(bt),R}},t[34]=l,t[35]=W,t[36]=Y,t[37]=q):q=t[37];const g=q;let z;t[38]===Symbol.for("react.memo_cache_sentinel")?(z=e=>{O.current=e.append,rt(!0)},t[38]=z):z=t[38];const vt=z;let M;t[39]!==g?(M=async e=>{const r=O.current;if(r)try{await g(e,a=>{r(a),rt(!1),O.current=null})}catch{}},t[39]=g,t[40]=M):M=t[40];const lt=M;let U;t[41]!==s||t[42]!==x?(U=s.length>0?[x,...s]:[],t[41]=s,t[42]=x,t[43]=U):U=t[43];const N=U;let S;t[44]!==s||t[45]!==N||t[46]!==x?(S=N.length>0?o.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:N.map((e,r)=>{const a=r===N.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(jt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{pt(r===0?[]:Et(s,r)),dt($t)},title:e,className:St("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",a?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:e})]},`${e}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:x}),t[44]=s,t[45]=N,t[46]=x,t[47]=S):S=t[47];let y;t[48]!==X?(y=o.jsx(Ft,{isPending:X,isError:!1}),t[48]=X,t[49]=y):y=t[49];let j;t[50]!==S||t[51]!==y?(j=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[S,y]}),t[50]=S,t[51]=y,t[52]=j):j=t[52];let k;t[53]!==i||t[54]!==s||t[55]!==l||t[56]!==mt||t[57]!==et||t[58]!==g||t[59]!==st||t[60]!==Q||t[61]!==m||t[62]!==n||t[63]!==Z||t[64]!==c||t[65]!==J?(k=o.jsx(kt,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:Q?o.jsx(Kt,{schema:c,value:mt,onChange:st,basePath:"",breadcrumbPath:s,onBreadcrumbChange:pt,decofile:l,meta:m,onSaveReferencedBlock:Z,previewBaseUrl:n,onAddSectionItem:g,onRequestAddSection:vt},`${i}:${et}`):J?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(yt,{size:16,className:"animate-spin"}),"Loading app schema…"]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[53]=i,t[54]=s,t[55]=l,t[56]=mt,t[57]=et,t[58]=g,t[59]=st,t[60]=Q,t[61]=m,t[62]=n,t[63]=Z,t[64]=c,t[65]=J,t[66]=k):k=t[66];let _;t[67]!==ot||t[68]!==l||t[69]!==lt||t[70]!==m||t[71]!==n?(_=n&&o.jsx(_t,{open:ot,onOpenChange:e=>{rt(e),e||(O.current=null)},meta:m,decofile:l,previewBaseUrl:n,onSelect:e=>{lt(e)}}),t[67]=ot,t[68]=l,t[69]=lt,t[70]=m,t[71]=n,t[72]=_):_=t[72];let D;return t[73]!==j||t[74]!==k||t[75]!==_?(D=o.jsxs("div",{className:"flex h-full flex-col",children:[j,k,_]}),t[73]=j,t[74]=k,t[75]=_,t[76]=D):D=t[76],D}function $t(B){return B+1}function Pt(B){return B+1}export{Cr as AppEditor};
@@ -1 +1 @@
1
- import{cE as v,cF as $,cG as W,cH as L,cI as H,cJ as D,cK as V,cL as x,cM as q,cN as j,cO as y,cP as N,cQ as B,cR as F,cS as Z}from"./index-3ttoiVWU.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=N.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=B[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof H||n instanceof D)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof V)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await P(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new q(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(k),d=k}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const S=await e.tokens();if(S?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:S.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof j)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:I,codeVerifier:b}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(b),await e.redirectToAuthorization(I),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function P(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return v.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?$.parse(await o.json()):W.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await P(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await Z(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return x.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return F.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,P as d,me as e};
1
+ import{cE as v,cF as $,cG as W,cH as L,cI as H,cJ as D,cK as V,cL as x,cM as q,cN as j,cO as y,cP as N,cQ as B,cR as F,cS as Z}from"./index-DEUVODq9.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=N.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=B[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof H||n instanceof D)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof V)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await P(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new q(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(k),d=k}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const S=await e.tokens();if(S?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:S.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof j)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:I,codeVerifier:b}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(b),await e.redirectToAuthorization(I),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function P(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return v.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?$.parse(await o.json()):W.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await P(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await Z(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return x.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return F.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,P as d,me as e};
@@ -1 +1 @@
1
- import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-3ttoiVWU.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
1
+ import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-DEUVODq9.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
@@ -1 +1 @@
1
- import{e as o,j as i}from"./index-3ttoiVWU.js";function f(r){const e=o.c(9),{children:n,visual:c}=r;let l;e[0]!==n?(l=i.jsx("section",{className:"flex flex-1 items-center justify-center bg-sidebar p-6 md:p-10",children:i.jsx("div",{className:"w-full max-w-[440px]",children:n})}),e[0]=n,e[1]=l):l=e[1];let s;e[2]!==c?(s=c??i.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[2]=c,e[3]=s):s=e[3];let t;e[4]!==s?(t=i.jsx("aside",{className:"relative hidden md:flex flex-1 overflow-hidden bg-muted",children:s}),e[4]=s,e[5]=t):t=e[5];let a;return e[6]!==l||e[7]!==t?(a=i.jsxs("main",{className:"flex min-h-screen w-full",children:[l,t]}),e[6]=l,e[7]=t,e[8]=a):a=e[8],a}export{f as A};
1
+ import{e as o,j as i}from"./index-DEUVODq9.js";function f(r){const e=o.c(9),{children:n,visual:c}=r;let l;e[0]!==n?(l=i.jsx("section",{className:"flex flex-1 items-center justify-center bg-sidebar p-6 md:p-10",children:i.jsx("div",{className:"w-full max-w-[440px]",children:n})}),e[0]=n,e[1]=l):l=e[1];let s;e[2]!==c?(s=c??i.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[2]=c,e[3]=s):s=e[3];let t;e[4]!==s?(t=i.jsx("aside",{className:"relative hidden md:flex flex-1 overflow-hidden bg-muted",children:s}),e[4]=s,e[5]=t):t=e[5];let a;return e[6]!==l||e[7]!==t?(a=i.jsxs("main",{className:"flex min-h-screen w-full",children:[l,t]}),e[6]=l,e[7]=t,e[8]=a):a=e[8],a}export{f as A};
@@ -1 +1 @@
1
- import{e as E,r as F,c as $,j as t,B as K}from"./index-3ttoiVWU.js";import{b as O,d as B,e as I,g as L,c as H,f as V,a as q,A as G}from"./alert-dialog-DU_hTH_e.js";import{a as J,D as Q,b as U,c as W}from"./dropdown-menu-D2SV-kWF.js";import{A as X,R as Y}from"./agent-icon-rbRaklR8.js";import{i as Z}from"./DotsVertical-BhoFPdMN.js";import{s as ee}from"./Trash01-4Tg-x6Q1.js";import{i as te}from"./Zap-ZgVQTmT-.js";import{u as se}from"./use-virtual-mcp-BgfAZ5Jr.js";import{u as ne}from"./use-automations-F8sxpovP.js";function pe(a){const e=E.c(53),{automation:s,showAgent:n,onClick:r}=a,{remove:i}=ne(),[P,S]=F.useState(!1),o=se(n?s.virtual_mcp_id:void 0);let D;e[0]!==s.id||e[1]!==i?(D=()=>{i.mutate(s.id),S(!1)},e[0]=s.id,e[1]=i,e[2]=D):D=e[2];const z=D;let A;e[3]!==r?(A=l=>{l.target===l.currentTarget&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),r())},e[3]=r,e[4]=A):A=e[4];const R=A,T=s.active&&s.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let c;e[5]!==T?(c=$("inline-block size-2 rounded-full shrink-0",T),e[5]=T,e[6]=c):c=e[6];const M=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let m;e[7]!==c||e[8]!==M?(m=t.jsx("span",{className:c,"aria-label":M}),e[7]=c,e[8]=M,e[9]=m):m=e[9];let u;e[10]!==o?.icon||e[11]!==o?.title||e[12]!==s.name||e[13]!==n?(u=n&&t.jsx(X,{icon:o?.icon??null,name:o?.title??s.name,size:"xs",className:"shrink-0"}),e[10]=o?.icon,e[11]=o?.title,e[12]=s.name,e[13]=n,e[14]=u):u=e[14];let d;e[15]!==s.name?(d=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[15]=s.name,e[16]=d):d=e[16];let g;e[17]!==o||e[18]!==n?(g=n&&o&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",o.title]}),e[17]=o,e[18]=n,e[19]=g):g=e[19];let f;e[20]!==d||e[21]!==g?(f=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,g]}),e[20]=d,e[21]=g,e[22]=f):f=e[22];let x;e[23]!==s.nearest_next_run_at||e[24]!==s.trigger_count?(x=t.jsx(oe,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[23]=s.nearest_next_run_at,e[24]=s.trigger_count,e[25]=x):x=e[25];let p;e[26]!==f||e[27]!==x?(p=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[f,x]}),e[26]=f,e[27]=x,e[28]=p):p=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(J,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(Z,{size:16})})}),e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{onClick:ie,onKeyDown:re,role:"presentation",className:"shrink-0",children:t.jsxs(Q,{children:[N,t.jsx(U,{align:"end",children:t.jsxs(W,{variant:"destructive",onClick:l=>{l.stopPropagation(),S(!0)},children:[t.jsx(ee,{size:16}),"Delete"]})})]})}),e[30]=y):y=e[30];let h;e[31]!==R||e[32]!==r||e[33]!==p||e[34]!==m||e[35]!==u?(h=t.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:R,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[m,u,p,y]}),e[31]=R,e[32]=r,e[33]=p,e[34]=m,e[35]=u,e[36]=h):h=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(H,{children:"Delete automation?"}),e[37]=w):w=e[37];let j;e[38]!==s.name?(j=t.jsxs(O,{children:[w,t.jsxs(B,{children:["This removes"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[38]=s.name,e[39]=j):j=e[39];let C;e[40]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(V,{children:"Cancel"}),e[40]=C):C=e[40];let _;e[41]!==z||e[42]!==i.isPending?(_=t.jsxs(I,{children:[C,t.jsx(L,{onClick:z,disabled:i.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[41]=z,e[42]=i.isPending,e[43]=_):_=e[43];let v;e[44]!==j||e[45]!==_?(v=t.jsxs(q,{children:[j,_]}),e[44]=j,e[45]=_,e[46]=v):v=e[46];let b;e[47]!==P||e[48]!==v?(b=t.jsx(G,{open:P,onOpenChange:S,children:v}),e[47]=P,e[48]=v,e[49]=b):b=e[49];let k;return e[50]!==h||e[51]!==b?(k=t.jsxs(t.Fragment,{children:[h,b]}),e[50]=h,e[51]=b,e[52]=k):k=e[52],k}function re(a){return a.stopPropagation()}function ie(a){return a.stopPropagation()}function oe(a){const e=E.c(4),{triggerCount:s,nextRunAt:n}=a;if(s===0){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=i):i=e[0],i}let r;return e[1]!==n||e[2]!==s?(r=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):t.jsxs(t.Fragment,{children:[t.jsx(te,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=r):r=e[3],r}export{pe as A};
1
+ import{e as E,r as F,c as $,j as t,B as K}from"./index-DEUVODq9.js";import{b as O,d as B,e as I,g as L,c as H,f as V,a as q,A as G}from"./alert-dialog-CjyXYSQZ.js";import{a as J,D as Q,b as U,c as W}from"./dropdown-menu-BUlN28jb.js";import{A as X,R as Y}from"./agent-icon-CV7VKepg.js";import{i as Z}from"./DotsVertical-7ebFkKLD.js";import{s as ee}from"./Trash01-BfygLm6s.js";import{i as te}from"./Zap-DMSK7ZyR.js";import{u as se}from"./use-virtual-mcp-kNQ4Vk7l.js";import{u as ne}from"./use-automations-Cjo8cUaV.js";function pe(a){const e=E.c(53),{automation:s,showAgent:n,onClick:r}=a,{remove:i}=ne(),[P,S]=F.useState(!1),o=se(n?s.virtual_mcp_id:void 0);let D;e[0]!==s.id||e[1]!==i?(D=()=>{i.mutate(s.id),S(!1)},e[0]=s.id,e[1]=i,e[2]=D):D=e[2];const z=D;let A;e[3]!==r?(A=l=>{l.target===l.currentTarget&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),r())},e[3]=r,e[4]=A):A=e[4];const R=A,T=s.active&&s.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let c;e[5]!==T?(c=$("inline-block size-2 rounded-full shrink-0",T),e[5]=T,e[6]=c):c=e[6];const M=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let m;e[7]!==c||e[8]!==M?(m=t.jsx("span",{className:c,"aria-label":M}),e[7]=c,e[8]=M,e[9]=m):m=e[9];let u;e[10]!==o?.icon||e[11]!==o?.title||e[12]!==s.name||e[13]!==n?(u=n&&t.jsx(X,{icon:o?.icon??null,name:o?.title??s.name,size:"xs",className:"shrink-0"}),e[10]=o?.icon,e[11]=o?.title,e[12]=s.name,e[13]=n,e[14]=u):u=e[14];let d;e[15]!==s.name?(d=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[15]=s.name,e[16]=d):d=e[16];let g;e[17]!==o||e[18]!==n?(g=n&&o&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",o.title]}),e[17]=o,e[18]=n,e[19]=g):g=e[19];let f;e[20]!==d||e[21]!==g?(f=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,g]}),e[20]=d,e[21]=g,e[22]=f):f=e[22];let x;e[23]!==s.nearest_next_run_at||e[24]!==s.trigger_count?(x=t.jsx(oe,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[23]=s.nearest_next_run_at,e[24]=s.trigger_count,e[25]=x):x=e[25];let p;e[26]!==f||e[27]!==x?(p=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[f,x]}),e[26]=f,e[27]=x,e[28]=p):p=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(J,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(Z,{size:16})})}),e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{onClick:ie,onKeyDown:re,role:"presentation",className:"shrink-0",children:t.jsxs(Q,{children:[N,t.jsx(U,{align:"end",children:t.jsxs(W,{variant:"destructive",onClick:l=>{l.stopPropagation(),S(!0)},children:[t.jsx(ee,{size:16}),"Delete"]})})]})}),e[30]=y):y=e[30];let h;e[31]!==R||e[32]!==r||e[33]!==p||e[34]!==m||e[35]!==u?(h=t.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:R,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[m,u,p,y]}),e[31]=R,e[32]=r,e[33]=p,e[34]=m,e[35]=u,e[36]=h):h=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(H,{children:"Delete automation?"}),e[37]=w):w=e[37];let j;e[38]!==s.name?(j=t.jsxs(O,{children:[w,t.jsxs(B,{children:["This removes"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[38]=s.name,e[39]=j):j=e[39];let C;e[40]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(V,{children:"Cancel"}),e[40]=C):C=e[40];let _;e[41]!==z||e[42]!==i.isPending?(_=t.jsxs(I,{children:[C,t.jsx(L,{onClick:z,disabled:i.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[41]=z,e[42]=i.isPending,e[43]=_):_=e[43];let v;e[44]!==j||e[45]!==_?(v=t.jsxs(q,{children:[j,_]}),e[44]=j,e[45]=_,e[46]=v):v=e[46];let b;e[47]!==P||e[48]!==v?(b=t.jsx(G,{open:P,onOpenChange:S,children:v}),e[47]=P,e[48]=v,e[49]=b):b=e[49];let k;return e[50]!==h||e[51]!==b?(k=t.jsxs(t.Fragment,{children:[h,b]}),e[50]=h,e[51]=b,e[52]=k):k=e[52],k}function re(a){return a.stopPropagation()}function ie(a){return a.stopPropagation()}function oe(a){const e=E.c(4),{triggerCount:s,nextRunAt:n}=a;if(s===0){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=i):i=e[0],i}let r;return e[1]!==n||e[2]!==s?(r=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):t.jsxs(t.Fragment,{children:[t.jsx(te,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=r):r=e[3],r}export{pe as A};