decocms 4.514.5 → 4.515.0

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 (465) hide show
  1. package/dist/client/assets/ActiveShapeUtils-B2LFrfRE.js +1 -0
  2. package/dist/client/assets/{AlertCircle-xI8XX-bi.js → AlertCircle-BEMVsPah.js} +1 -1
  3. package/dist/client/assets/AreaChart-D7ncnKTv.js +1 -0
  4. package/dist/client/assets/{ArrowLeft-BKYzlDQY.js → ArrowLeft-BeJK1krP.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Cq3iZIwL.js → ArrowUp-CDPrL6Uz.js} +1 -1
  6. package/dist/client/assets/BarChart-D63RTQYz.js +1 -0
  7. package/dist/client/assets/{Building02-C9KWPxlH.js → Building02-BFpUButr.js} +1 -1
  8. package/dist/client/assets/CartesianChart-Cm278fbS.js +1 -0
  9. package/dist/client/assets/{CategoricalChart-DkwWvFDx.js → CategoricalChart-CNYNt0vK.js} +2 -2
  10. package/dist/client/assets/{CheckCircle-D30wPP6A.js → CheckCircle-Iq3Q6LLh.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-CknWVrzo.js → ChevronSelectorVertical-02lw_CbG.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CFN68hLk.js → ChevronUp-DeTPLyaf.js} +1 -1
  13. package/dist/client/assets/{Copy01-C73PJJxr.js → Copy01-DQtv3upd.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-C8DlQ7Ge.js → CreditCard01-4SHg1t_a.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-BvyfZIer.js → DotsVertical-Drns5Frs.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-Bhpq3Y0r.js → ErrorBarContext-BkdZvkoD.js} +1 -1
  17. package/dist/client/assets/{Globe04-CVLAzwjm.js → Globe04-BXpRk-hX.js} +1 -1
  18. package/dist/client/assets/{Image01-DowwsvYG.js → Image01-1LQuy0wG.js} +1 -1
  19. package/dist/client/assets/{Key01-rbnGMz2E.js → Key01-CoFqvDTW.js} +1 -1
  20. package/dist/client/assets/{Link01-DRsKyIm5.js → Link01-DU3-3Ipb.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-ZRquEJUl.js → LinkBroken01-h_HqMIlK.js} +1 -1
  22. package/dist/client/assets/{Minus-DPDq6KAA.js → Minus-DpXFgo6a.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DMME8GIo.js → Monitor01-BbCpGNqh.js} +1 -1
  24. package/dist/client/assets/{Play-c6bc1b3-.js → Play-C8EB0NeI.js} +1 -1
  25. package/dist/client/assets/{Plus-xabrshQG.js → Plus-DPS97GtY.js} +1 -1
  26. package/dist/client/assets/ReferenceLine-zJMNrbMl.js +1 -0
  27. package/dist/client/assets/{SearchMd-BODiv7c9.js → SearchMd-5E3M_LtW.js} +1 -1
  28. package/dist/client/assets/Sector-Chcdibol.js +28 -0
  29. package/dist/client/assets/{ShoppingBag01-DAjyOiiw.js → ShoppingBag01-BlUZ1Giu.js} +1 -1
  30. package/dist/client/assets/{Sun-BqmeoxcG.js → Sun-Bt6BixS7.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-CESO3nxl.js → SwitchHorizontal01-BLJAU7vB.js} +1 -1
  32. package/dist/client/assets/{Tool01-BGL2Qt57.js → Tool01-DhUw9Xii.js} +1 -1
  33. package/dist/client/assets/{Trash01-Cf6bGuCZ.js → Trash01-y0tx6OKR.js} +1 -1
  34. package/dist/client/assets/{Upload01-ZLE7vfB9.js → Upload01-BT7hKOY8.js} +1 -1
  35. package/dist/client/assets/{User01-Cfg0yVvz.js → User01-Dtm_f3tA.js} +1 -1
  36. package/dist/client/assets/{UserSquare-DJngEPjS.js → UserSquare-DWYhjY7l.js} +1 -1
  37. package/dist/client/assets/{Users01-vn3EOu8A.js → Users01-DE8h5H5p.js} +1 -1
  38. package/dist/client/assets/{XClose-CdzjyNb0.js → XClose-sbj0sr-y.js} +1 -1
  39. package/dist/client/assets/{ZoomOut-B55seUHX.js → ZoomOut-Ult5yHk2.js} +1 -1
  40. package/dist/client/assets/{access-gate-CgSSvGG3.js → access-gate-C5s_nhLu.js} +1 -1
  41. package/dist/client/assets/{add-connection-dialog-O4xCe9BP.js → add-connection-dialog-BbC6Awnv.js} +1 -1
  42. package/dist/client/assets/agent-analytics-DkajWLZM.js +2 -0
  43. package/dist/client/assets/agent-app-3J3u6Y8o.js +1 -0
  44. package/dist/client/assets/agent-assets-arexmZYy.js +1 -0
  45. package/dist/client/assets/{agent-automation-DBMflQw2.js → agent-automation-CJwaiyVY.js} +1 -1
  46. package/dist/client/assets/agent-automations-Cgl9-uX7.js +1 -0
  47. package/dist/client/assets/agent-calendar-CcJ-9tHm.js +1 -0
  48. package/dist/client/assets/{agent-connect-sources-CX6V3W-l.js → agent-connect-sources-BSWyCv4T.js} +1 -1
  49. package/dist/client/assets/agent-deck-D77BlzDi.js +1 -0
  50. package/dist/client/assets/agent-e2e-BZnv0041.js +1 -0
  51. package/dist/client/assets/agent-experiments-DU-xnevM.js +1 -0
  52. package/dist/client/assets/agent-file-CEbVOehe.js +1 -0
  53. package/dist/client/assets/agent-hosting-CLRf1egV.js +1 -0
  54. package/dist/client/assets/{agent-icon-c0hRUHIU.js → agent-icon-BLy2WH4s.js} +1 -1
  55. package/dist/client/assets/agent-library-CHysr2dn.js +1 -0
  56. package/dist/client/assets/agent-library-file-DCoIJ_Vl.js +1 -0
  57. package/dist/client/assets/agent-monitor-D4SI9Y1m.js +1 -0
  58. package/dist/client/assets/{agent-overview-C0WObUrB.js → agent-overview-DeQq_tHv.js} +1 -1
  59. package/dist/client/assets/agent-releases-Cp26QvMd.js +2 -0
  60. package/dist/client/assets/agent-settings-Bd8cfGLd.js +1 -0
  61. package/dist/client/assets/agent-site-editor-code-CGFxlenC.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-O4R-vecW.js +1 -0
  63. package/dist/client/assets/agent-site-editor-pMTgGoBo.js +16 -0
  64. package/dist/client/assets/agent-site-editor-preview-CCdH77a2.js +1 -0
  65. package/dist/client/assets/agent-view-COR3ZSfj.js +1 -0
  66. package/dist/client/assets/{agent-view-guard-CY0RZ3mz.js → agent-view-guard-26j3Evt5.js} +1 -1
  67. package/dist/client/assets/{agents-list-lrkIUH1p.js → agents-list-Dcd5sOX1.js} +1 -1
  68. package/dist/client/assets/{ai-providers-BJRpwnf3.js → ai-providers-C2RBL7tG.js} +2 -2
  69. package/dist/client/assets/alert-BV79ffMP.js +1 -0
  70. package/dist/client/assets/{alert-dialog-M8Y0zqSA.js → alert-dialog-BILupwtl.js} +3 -3
  71. package/dist/client/assets/analytics-sections-Wnoh3PYg.js +1 -0
  72. package/dist/client/assets/api-keys-BO3F5W2N.js +1 -0
  73. package/dist/client/assets/{api-keys-BuJhmHVr.js → api-keys-Drifqas3.js} +1 -1
  74. package/dist/client/assets/app-editor-DkKkzh3V.js +1 -0
  75. package/dist/client/assets/{asset-utils-D4ZYWTsd.js → asset-utils-CV_m_T7Z.js} +1 -1
  76. package/dist/client/assets/{auth-CJCUdDnK.js → auth-B7U7Hff4.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-PMDrOrh4.js → auth-catchall-BM3zBwm1.js} +1 -1
  78. package/dist/client/assets/{auth-entry-D45yK4lP.js → auth-entry-BdihVcdH.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-BeoAmW98.js → auth-split-layout-CPsRiXhM.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-D7W1mkzH.js → authenticate-and-persist-oauth-UvzpQNLL.js} +1 -1
  81. package/dist/client/assets/automation-list-row-CmreC44g.js +1 -0
  82. package/dist/client/assets/{automation-runs-7CDwsw1m.js → automation-runs-Ubm7wrw7.js} +1 -1
  83. package/dist/client/assets/{automations-DpOWGNx_.js → automations-ZAC4-o9b.js} +1 -1
  84. package/dist/client/assets/{autosend-BiXCzDoT.js → autosend-DEKkS89d.js} +1 -1
  85. package/dist/client/assets/{avatar-CVrfZDpI.js → avatar-BaUatl4r.js} +1 -1
  86. package/dist/client/assets/badge-BDrcnhS0.js +1 -0
  87. package/dist/client/assets/{block-document-EFEgqy7V.js → block-document-DWpcrKxc.js} +3 -3
  88. package/dist/client/assets/{blocks-preview-workspace-context-FfAtB7Mh.js → blocks-preview-workspace-context-CNobOsoP.js} +1 -1
  89. package/dist/client/assets/blocks-tab-states-5KLuOsbu.js +1 -0
  90. package/dist/client/assets/blog-schema-BKkPmh2I.js +1 -0
  91. package/dist/client/assets/{buckets-EuucCx-Z.js → buckets-CfPMmliP.js} +1 -1
  92. package/dist/client/assets/{build-improve-prompt-doc-0HVt3TgE.js → build-improve-prompt-doc-DJbnBElj.js} +1 -1
  93. package/dist/client/assets/{calendar-B3WUDV6V.js → calendar-CCVXvCMs.js} +1 -1
  94. package/dist/client/assets/campaigns-view-CacWid3q.js +1 -0
  95. package/dist/client/assets/{capability-load-error-CaA022rx.js → capability-load-error-C-qrhNhU.js} +1 -1
  96. package/dist/client/assets/category-editor-CcRf7L2l.js +1 -0
  97. package/dist/client/assets/{chart-B6d33H1D.js → chart-gMXBaCie.js} +1 -1
  98. package/dist/client/assets/{chat-context-BnuwMOfj.js → chat-context-NcP7iS0u.js} +6 -6
  99. package/dist/client/assets/{chat-draft-D3EwPWFD.js → chat-draft-MYleVoub.js} +1 -1
  100. package/dist/client/assets/{checkbox-Dla8kRWj.js → checkbox-TbFNti2k.js} +1 -1
  101. package/dist/client/assets/{choose-editor-CFsJlwqs.js → choose-editor-CDZ08K_i.js} +1 -1
  102. package/dist/client/assets/{cli-auth-success-DADJ0ld_.js → cli-auth-success-DMlxLLEu.js} +1 -1
  103. package/dist/client/assets/{client-icons-M2KssD4J.js → client-icons-DolqWn8Q.js} +1 -1
  104. package/dist/client/assets/cms-settings-editor-D03L9L4-.js +1 -0
  105. package/dist/client/assets/{collapsible-BWjY8cOG.js → collapsible-DvAZmEoh.js} +1 -1
  106. package/dist/client/assets/collection-detail-CQ4bhfmW.js +1 -0
  107. package/dist/client/assets/{collection-display-button-DcSGVqBT.js → collection-display-button-DTfH30As.js} +1 -1
  108. package/dist/client/assets/{collection-search-C0nHL4Zi.js → collection-search-C00LN-O5.js} +1 -1
  109. package/dist/client/assets/{collection-table-wrapper-BqLbzGMr.js → collection-table-wrapper-DOUS3XlF.js} +1 -1
  110. package/dist/client/assets/{collection-tabs-DJst1PBn.js → collection-tabs-BjFLrDhl.js} +1 -1
  111. package/dist/client/assets/{column-rules-C6rmmvcZ.js → column-rules-13kfrugr.js} +1 -1
  112. package/dist/client/assets/{combobox-DJtWtG8e.js → combobox-CaB-y5Ze.js} +1 -1
  113. package/dist/client/assets/{coming-soon-page-CycWyIEs.js → coming-soon-page-Cyxpb_RU.js} +1 -1
  114. package/dist/client/assets/{command-DQxPvzO0.js → command-DF9CyXTP.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-BaIOrb8k.js → companion-mcps-section-D4tO5Rpb.js} +1 -1
  116. package/dist/client/assets/{config-0dQr8OOs.js → config-BpbgNSKK.js} +1 -1
  117. package/dist/client/assets/{connect-AQ7wxQDD.js → connect-R8YgYoXN.js} +3 -3
  118. package/dist/client/assets/{connect-layout-CsBnyYo4.js → connect-layout-DCuq7jhf.js} +1 -1
  119. package/dist/client/assets/{connection-B5x-rxzp.js → connection-CynHS3Ve.js} +1 -1
  120. package/dist/client/assets/{connection-card-CFqu0_G8.js → connection-card-DWCHVdl-.js} +1 -1
  121. package/dist/client/assets/{connection-detail-B_xaSLIN.js → connection-detail-BvRd_OKE.js} +1 -1
  122. package/dist/client/assets/{connection-form-helpers-CouK82td.js → connection-form-helpers-Dta5jpsZ.js} +1 -1
  123. package/dist/client/assets/{connections-CrdtyJFL.js → connections-DhBzJz3R.js} +1 -1
  124. package/dist/client/assets/content-tab-COTFxvxm.js +22 -0
  125. package/dist/client/assets/context-DDY4mKfD.js +1 -0
  126. package/dist/client/assets/{context-menu-CI-AryjZ.js → context-menu-CUU-6Ui3.js} +1 -1
  127. package/dist/client/assets/{context-shell-BsFUt-ob.js → context-shell-CPsWfJ_3.js} +3 -3
  128. package/dist/client/assets/{core.esm-DOdwJCI5.js → core.esm-C0uaMHhK.js} +1 -1
  129. package/dist/client/assets/{create-organization-dialog-CDMsJ1wq.js → create-organization-dialog-DaLRO9Sp.js} +1 -1
  130. package/dist/client/assets/{daily-pulse-A6lEoniM.js → daily-pulse-DKIjgibs.js} +1 -1
  131. package/dist/client/assets/date-utils-CrvIKg-s.js +1 -0
  132. package/dist/client/assets/{discover-JQgSyvWz.js → discover-INKGTCGz.js} +1 -1
  133. package/dist/client/assets/{domain-settings-CNG0968P.js → domain-settings-DL4imbgg.js} +1 -1
  134. package/dist/client/assets/{drawer-CEiS53oX.js → drawer-CER6tItd.js} +1 -1
  135. package/dist/client/assets/{editor-DWhRi1_f.js → editor-DiFOLDbd.js} +1 -1
  136. package/dist/client/assets/{editor-classes-CZOMDDcn.js → editor-classes-BxczJlTk.js} +1 -1
  137. package/dist/client/assets/{empty-state-B1xpK558.js → empty-state-CEkcxXyE.js} +1 -1
  138. package/dist/client/assets/{empty-state-BoFIIv2e.js → empty-state-Cfwlgj7K.js} +1 -1
  139. package/dist/client/assets/experiments-tab-choice-CdB5dK1A.js +1 -0
  140. package/dist/client/assets/{extract-connection-data-CUvLfXNU.js → extract-connection-data-CnU07SX8.js} +1 -1
  141. package/dist/client/assets/{feature-gate-B9a4dBc0.js → feature-gate-Dnbny2HW.js} +1 -1
  142. package/dist/client/assets/{feature-paywall-DINMFUUx.js → feature-paywall-DruRkOvJ.js} +1 -1
  143. package/dist/client/assets/{file-explorer-2Z0Qhvp_.js → file-explorer-CsrTcKv1.js} +1 -1
  144. package/dist/client/assets/{file-preview-BFXgyqHl.js → file-preview-CUN1OHJ7.js} +1 -1
  145. package/dist/client/assets/{file-share-button-BIOHr9Xv.js → file-share-button-CEf0dwMj.js} +2 -2
  146. package/dist/client/assets/{file-type-icon-Ez8-DRHg.js → file-type-icon-etYEFstF.js} +1 -1
  147. package/dist/client/assets/{folder-icon-JgTmBbpC.js → folder-icon-8MGsFr-_.js} +2 -2
  148. package/dist/client/assets/{form-Bdh0vUeg.js → form-xTDgq-Tg.js} +1 -1
  149. package/dist/client/assets/{general-Dvy5SU0P.js → general-DKLM5WXB.js} +1 -1
  150. package/dist/client/assets/{home-UtAOwZ_a.js → home-iGYybPDR.js} +1 -1
  151. package/dist/client/assets/hosted-publish-api-BTYW-kmo.js +1 -0
  152. package/dist/client/assets/hosted-publish-feedback-DYVOaPsn.js +1 -0
  153. package/dist/client/assets/{icon-button-Dg2jSe-y.js → icon-button-Ht6P9npC.js} +1 -1
  154. package/dist/client/assets/{index-CrgWXxvo.js → index-1zZevs0I.js} +1 -1
  155. package/dist/client/assets/{index-1XeDvVO_.js → index-9equ5l6t.js} +1 -1
  156. package/dist/client/assets/{index-DxbCP5B6.js → index-B3yMIi0G.js} +1 -1
  157. package/dist/client/assets/index-BFqmRsAP.js +4 -0
  158. package/dist/client/assets/{index-DYLyKNcw.js → index-BbK9DXkK.js} +1 -1
  159. package/dist/client/assets/{index-DincrG3Y.js → index-Br0aaVqT.js} +3 -3
  160. package/dist/client/assets/{index-ILRCn1qM.js → index-CLvpgcGt.js} +6 -6
  161. package/dist/client/assets/{index-CXeJCI0G.js → index-CNohvsnC.js} +1 -1
  162. package/dist/client/assets/{index-_y92DzgS.js → index-D32uzOTA.js} +1 -1
  163. package/dist/client/assets/{index-7svLQYvL.js → index-DFJe-l7D.js} +1 -1
  164. package/dist/client/assets/{index-DKOhwHAG.js → index-DKwDh9fC.js} +1 -1
  165. package/dist/client/assets/{index-DcU2uHG-.js → index-DQaJBLJ-.js} +54 -54
  166. package/dist/client/assets/index-EoMx4WDO.css +1 -0
  167. package/dist/client/assets/{index-WjQsIrkp.js → index-IRwT0rOS.js} +1 -1
  168. package/dist/client/assets/{index-6B342dVL.js → index-TESbMzS4.js} +1 -1
  169. package/dist/client/assets/{index-De44zW_k.js → index-hUmTzopE.js} +1 -1
  170. package/dist/client/assets/{index-redirect-BHJ13xlS.js → index-redirect-WdHUcKlN.js} +1 -1
  171. package/dist/client/assets/{infiniteQueryObserver-P7ZNg4ZF.js → infiniteQueryObserver-Bia8aY1D.js} +1 -1
  172. package/dist/client/assets/infra-billing-CANL7vGd.js +1 -0
  173. package/dist/client/assets/{input-pg_Munw1.js → input-DQpuKkGH.js} +7 -7
  174. package/dist/client/assets/{input-HXHaYrka.js → input-rj9iyl8c.js} +1 -1
  175. package/dist/client/assets/{integration-icon-aeIvRSnw.js → integration-icon-BADY30E3.js} +1 -1
  176. package/dist/client/assets/{jira-icon-CZLCmGol.js → jira-icon-Bg6wm7Rh.js} +1 -1
  177. package/dist/client/assets/{label-DDPD5LQh.js → label-DwAqZKXh.js} +1 -1
  178. package/dist/client/assets/{layout-DGYUOV2D.js → layout-BS48rV-R.js} +1 -1
  179. package/dist/client/assets/{legacy-agents-deep-B3GKD6WQ.js → legacy-agents-deep-BsgIlRpK.js} +1 -1
  180. package/dist/client/assets/legacy-main-redirect-CpUMHeOI.js +1 -0
  181. package/dist/client/assets/library-D-XIUCN0.js +1 -0
  182. package/dist/client/assets/{login-syjpZA32.js → login-Bx_Dj1KX.js} +1 -1
  183. package/dist/client/assets/{markdown-1PeXOKNt.js → markdown-DCFmpcRh.js} +1 -1
  184. package/dist/client/assets/{mcp-app-renderer-DTPlWHGT.js → mcp-app-renderer-DlDykQO4.js} +1 -1
  185. package/dist/client/assets/{mcp-oauth-DP6VNnFQ.js → mcp-oauth-BV1FnXP9.js} +1 -1
  186. package/dist/client/assets/{mcp-oauth-xBzZujQ_.js → mcp-oauth-DHudAstl.js} +1 -1
  187. package/dist/client/assets/{members-uR8n9Rms.js → members-lS9QzMri.js} +1 -1
  188. package/dist/client/assets/{memory-BYqDBVHV.js → memory-Dt2VdoJi.js} +2 -2
  189. package/dist/client/assets/{mini-report-page-D7tpDtif.js → mini-report-page-SkCZ-B7b.js} +1 -1
  190. package/dist/client/assets/{mock-board-BOSDq94-.js → mock-board-b5JcXuBT.js} +3 -3
  191. package/dist/client/assets/{monaco-editor-e80GuCNv.js → monaco-editor-B77kgSL6.js} +2 -2
  192. package/dist/client/assets/monitoring-CN_CCaIK.js +1 -0
  193. package/dist/client/assets/{monitoring-stats-row-94Mta4Nq.js → monitoring-stats-row-DfhuiMFd.js} +1 -1
  194. package/dist/client/assets/{multi-select-CmbGOwtN.js → multi-select-BcTcaQtg.js} +1 -1
  195. package/dist/client/assets/mustache-B1PzKbLg.js +4 -0
  196. package/dist/client/assets/named-rule-uses-l2kNdc58.js +1 -0
  197. package/dist/client/assets/named-rule-view-VDvju2NZ.js +1 -0
  198. package/dist/client/assets/{new-project-dialog-ShudNZIG.js → new-project-dialog-C1yGAeBD.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-ai-provider-DQtTsT-Q.js → oauth-callback-ai-provider-CSn2MVuO.js} +1 -1
  200. package/dist/client/assets/{oauth-callback-CuZCWVkp.js → oauth-callback-d5bTE61x.js} +1 -1
  201. package/dist/client/assets/{onboarding-BYvWDC_s.js → onboarding-DMAd7boI.js} +1 -1
  202. package/dist/client/assets/{openai-conversation-DgaJVito.js → openai-conversation-DVrrnMH9.js} +2 -2
  203. package/dist/client/assets/{optimistic-project-sidebar-views-CKzSSiC-.js → optimistic-project-sidebar-views-NiW-ZsA6.js} +1 -1
  204. package/dist/client/assets/order-monitor-day-D1J-iu59.js +1 -0
  205. package/dist/client/assets/{organization-choice-D_5aYbIz.js → organization-choice-DtzDl4nE.js} +1 -1
  206. package/dist/client/assets/{orgs-CN3Yh6bp.js → orgs-CvRk7OxE.js} +1 -1
  207. package/dist/client/assets/page-seo-form-YDVeWiAp.js +1 -0
  208. package/dist/client/assets/{pair-Cn70Tm81.js → pair-u6RslQ29.js} +7 -7
  209. package/dist/client/assets/parse-sections-CBNQNauq.js +1 -0
  210. package/dist/client/assets/plan-Cs9I3MbI.js +1 -0
  211. package/dist/client/assets/{plan-ladder-D5aCNSRy.js → plan-ladder-DF2W1fWC.js} +1 -1
  212. package/dist/client/assets/{popover-CVCbWisj.js → popover-BOhP5vgB.js} +1 -1
  213. package/dist/client/assets/post-calendar-T4dPJKYM.js +1 -0
  214. package/dist/client/assets/post-editor-D7KyvZ7t.js +2 -0
  215. package/dist/client/assets/{preview-content-Bin2hNFJ.js → preview-content-DVXm4Z8s.js} +1 -1
  216. package/dist/client/assets/{preview-dialog-Fls4giAH.js → preview-dialog-WEx44iRd.js} +1 -1
  217. package/dist/client/assets/{preview-panel-BPPH_1cI.js → preview-panel-D0nsWsZH.js} +1 -1
  218. package/dist/client/assets/preview-tab-Dl6aDnQL.js +551 -0
  219. package/dist/client/assets/product-picker-dialog-BhbqLRJa.js +1 -0
  220. package/dist/client/assets/{profile-BZA6I0p4.js → profile-DlCjy7UA.js} +1 -1
  221. package/dist/client/assets/{project-app-view-B2uzp3zO.js → project-app-view-D5kv8H-C.js} +1 -1
  222. package/dist/client/assets/project-apps-BkYCf7yh.js +1 -0
  223. package/dist/client/assets/{project-feed-CxXgvjMu.js → project-feed-CnSoTeWf.js} +1 -1
  224. package/dist/client/assets/{project-icon-Dy5ndHVf.js → project-icon-DeQ6esGK.js} +1 -1
  225. package/dist/client/assets/project-reports-DQYEQVTh.js +1 -0
  226. package/dist/client/assets/project-tasks-CyVxacvN.js +1 -0
  227. package/dist/client/assets/{projects-6tFWscR3.js → projects-B8yQNAzt.js} +1 -1
  228. package/dist/client/assets/{projects-empty-state-B25sfM8y.js → projects-empty-state-BeIkadaG.js} +1 -1
  229. package/dist/client/assets/{prompts-C8y9cYvX.js → prompts-GMn4cz1Q.js} +1 -1
  230. package/dist/client/assets/record-editor-CI7K6OM1.js +1 -0
  231. package/dist/client/assets/redirect-editor-B5L_G5_H.js +1 -0
  232. package/dist/client/assets/releases-api-r2wwTMcb.js +1 -0
  233. package/dist/client/assets/{reports-DZf5GwgJ.js → reports-BSyJkGbx.js} +1 -1
  234. package/dist/client/assets/reports-DceQf3hD.js +1 -0
  235. package/dist/client/assets/{reports-onboarding-Ba6c9nYx.js → reports-onboarding-DTyYEPnh.js} +1 -1
  236. package/dist/client/assets/reports-tab-DhZyGBNJ.js +2 -0
  237. package/dist/client/assets/repositories-1ckAW2Cr.js +1 -0
  238. package/dist/client/assets/{repositories-D_HBag21.js → repositories-DTzcHO2P.js} +1 -1
  239. package/dist/client/assets/{repository-binding-B-JblZ3B.js → repository-binding-WIxmR2C2.js} +1 -1
  240. package/dist/client/assets/{repository-import-picker-Aq7ItYog.js → repository-import-picker-Bwaz_IkW.js} +1 -1
  241. package/dist/client/assets/{repository-picker-CigkRPj6.js → repository-picker-C_FPAS2a.js} +1 -1
  242. package/dist/client/assets/{require-capability-fF33BjRE.js → require-capability-zDRexzvJ.js} +1 -1
  243. package/dist/client/assets/{required-auth-layout-n4GqwjUS.js → required-auth-layout-C9RNRyLG.js} +1 -1
  244. package/dist/client/assets/{reset-password-FYcr_EOZ.js → reset-password-D5Z9Z_ZV.js} +1 -1
  245. package/dist/client/assets/{resizable-B1jyEV0m.js → resizable-rv6DYDSR.js} +1 -1
  246. package/dist/client/assets/resolve-tab-icon-CDRcFoik.js +1 -0
  247. package/dist/client/assets/{review-settings-w0gSi3zN.js → review-settings-BOEOAp5O.js} +1 -1
  248. package/dist/client/assets/{roles-CD7KBus5.js → roles-CvRMacB_.js} +1 -1
  249. package/dist/client/assets/route-BrdNU9FL.js +1 -0
  250. package/dist/client/assets/route-CYnJcvFb.js +1 -0
  251. package/dist/client/assets/route-HQBi1e9d.js +1 -0
  252. package/dist/client/assets/runnable-block-editor-B9jSPnPq.js +20 -0
  253. package/dist/client/assets/{sandbox-git-api-CRxdlhrN.js → sandbox-git-api-CH_-QFpD.js} +1 -1
  254. package/dist/client/assets/{sandbox-lifecycle-context-Cyz-VR-q.js → sandbox-lifecycle-context-aKdVFwPA.js} +1 -1
  255. package/dist/client/assets/{schema-DTqdooJM.js → schema-C0M6s76A.js} +1 -1
  256. package/dist/client/assets/{schema-Jt-SHSRj.js → schema-CtKRQiER.js} +1 -1
  257. package/dist/client/assets/{scroll-area-DowOzl5a.js → scroll-area-L8VlxVDv.js} +1 -1
  258. package/dist/client/assets/{search-input-C77c23a_.js → search-input-BCaqzpfC.js} +1 -1
  259. package/dist/client/assets/{search-toggle-BqUvwbnO.js → search-toggle-BAKgZCht.js} +1 -1
  260. package/dist/client/assets/{secret-picker-D6q2PbZG.js → secret-picker-Ciz2Oc6M.js} +1 -1
  261. package/dist/client/assets/{secrets-C6FiSzJz.js → secrets-DWM0UMVi.js} +1 -1
  262. package/dist/client/assets/{sections-uFSvOb1s.js → sections-DM2-ez5A.js} +1 -1
  263. package/dist/client/assets/sections-editor-Cs3VV_t6.js +4 -0
  264. package/dist/client/assets/{select-B47VUguS.js → select-3Bvf55R2.js} +1 -1
  265. package/dist/client/assets/{select-model-B0eE99E3.js → select-model-BrppT0xN.js} +1 -1
  266. package/dist/client/assets/seo-editor-qr_EWKDI.js +1 -0
  267. package/dist/client/assets/{separator-tMi_6w_o.js → separator-BARWlQZQ.js} +1 -1
  268. package/dist/client/assets/settings-tab-BX9Vfre3.js +1 -0
  269. package/dist/client/assets/{sheet-R9Pr50Sb.js → sheet-BKZqYlDG.js} +1 -1
  270. package/dist/client/assets/shell-layout-iu5E7VAW.js +1 -0
  271. package/dist/client/assets/site-draft-actions-01MQ6c7Q.js +12 -0
  272. package/dist/client/assets/site-draft-view-D-xycIA0.js +2 -0
  273. package/dist/client/assets/site-editor-CF4F4ijZ.js +1 -0
  274. package/dist/client/assets/{skills-DTPuV4HK.js → skills-B3sr04ZB.js} +1 -1
  275. package/dist/client/assets/slider-f1cHo-xI.js +1 -0
  276. package/dist/client/assets/{sortable.esm-7lfZBBX2.js → sortable.esm-B_g_IXou.js} +1 -1
  277. package/dist/client/assets/{sso-lvoln_ad.js → sso-8XgQMaoN.js} +1 -1
  278. package/dist/client/assets/{suggestion-D_Z3LuMt.js → suggestion-B-6wzPND.js} +2 -2
  279. package/dist/client/assets/{switch-BQFbXMA-.js → switch-CZd0EYW9.js} +1 -1
  280. package/dist/client/assets/{symbol-CIh5AfyD.js → symbol-BY53tx69.js} +1 -1
  281. package/dist/client/assets/{synced-repos-DQxi8k5O.js → synced-repos-CWNIOZxK.js} +1 -1
  282. package/dist/client/assets/{tab-icon-glyph-B2rDBqdy.js → tab-icon-glyph-40t6GZmc.js} +1 -1
  283. package/dist/client/assets/{table-DuCeyVXY.js → table-DDQzGcYG.js} +1 -1
  284. package/dist/client/assets/{tabs-CJ70csAp.js → tabs-BOwO3aPj.js} +1 -1
  285. package/dist/client/assets/{task-assignee-avatar-vyXzgPAK.js → task-assignee-avatar-mmHhkk0_.js} +1 -1
  286. package/dist/client/assets/{task-board-CSpxMIw7.js → task-board-S0qduW2n.js} +1 -1
  287. package/dist/client/assets/{task-route-CeJ19bNy.js → task-route-BCl-VxJy.js} +1 -1
  288. package/dist/client/assets/{task-status-CFz3dyVR.js → task-status-CNAd19KA.js} +1 -1
  289. package/dist/client/assets/{taskboard-analytics-CfseXo9_.js → taskboard-analytics-BNfa4eCu.js} +1 -1
  290. package/dist/client/assets/tasks-CtYqrb00.js +1 -0
  291. package/dist/client/assets/{tasks-C3liOhO2.js → tasks-Cz1AP9M-.js} +3 -3
  292. package/dist/client/assets/{textarea-BDWvYouR.js → textarea-CGkc_NoY.js} +1 -1
  293. package/dist/client/assets/{thread-analytics-Bp5Zz9ej.js → thread-analytics-CHcQ4J9G.js} +1 -1
  294. package/dist/client/assets/{thread-intent-DlbBEzNn.js → thread-intent-D02hOLlA.js} +4 -4
  295. package/dist/client/assets/{thread-route-DsRsjMOv.js → thread-route-BG5FYdPA.js} +1 -1
  296. package/dist/client/assets/{thread-route-glK7AgQo.js → thread-route-D5TPqP61.js} +1 -1
  297. package/dist/client/assets/{thread-sheet-body-BW8H1wdb.js → thread-sheet-body-B1Y2cEvJ.js} +1 -1
  298. package/dist/client/assets/time-range-picker-B8MLDnPR.js +1 -0
  299. package/dist/client/assets/toggle-group-5-dW1fE5.js +1 -0
  300. package/dist/client/assets/{tool-namespace-FeAXQzXg.js → tool-namespace-_uAlvwp8.js} +1 -1
  301. package/dist/client/assets/{toolbar-icon-button-CTGjpqPD.js → toolbar-icon-button-BQvi-WW6.js} +1 -1
  302. package/dist/client/assets/{tooltip-BqHx2R4U.js → tooltip-CT8p-4e_.js} +1 -1
  303. package/dist/client/assets/tooltipContext-BqyDyVHC.js +1 -0
  304. package/dist/client/assets/{track-vnmuUrPF.js → track-wHia_J2E.js} +1 -1
  305. package/dist/client/assets/{types-Cj3BjtjJ.js → types-CKfFy-n_.js} +6 -6
  306. package/dist/client/assets/{url-slug-DfovzTSP.js → url-slug-BMSyCRIK.js} +1 -1
  307. package/dist/client/assets/{usage-stats-DcyLnEOC.js → usage-stats-tSDvCF_c.js} +1 -1
  308. package/dist/client/assets/{use-ai-providers-DugUJNG4.js → use-ai-providers-D5-3qHgJ.js} +1 -1
  309. package/dist/client/assets/use-apply-named-rule-BuleRH2R.js +1 -0
  310. package/dist/client/assets/{use-automations-Dhy5bAQi.js → use-automations-DL7E2sXy.js} +1 -1
  311. package/dist/client/assets/{use-autosave-BKifxWxQ.js → use-autosave-Bga6Lczj.js} +1 -1
  312. package/dist/client/assets/{use-chat-layout-state-CqPKeLYn.js → use-chat-layout-state-CrK3t-li.js} +1 -1
  313. package/dist/client/assets/{use-clock-tick-CbuQEbGd.js → use-clock-tick-Dt0Rxdj9.js} +1 -1
  314. package/dist/client/assets/{use-connect-companion-BBUs22Yl.js → use-connect-companion-BQ6P9NqQ.js} +1 -1
  315. package/dist/client/assets/{use-connection-Dj54skEw.js → use-connection-DEU6cL_M.js} +1 -1
  316. package/dist/client/assets/use-content-sync-78T7URzs.js +1 -0
  317. package/dist/client/assets/{use-copy-K9rQ1PJH.js → use-copy-Lp25RdQW.js} +1 -1
  318. package/dist/client/assets/use-create-virtual-mcp-B5688LVi.js +1 -0
  319. package/dist/client/assets/{use-date-fns-locale-CEVf4Ifn.js → use-date-fns-locale-DzYqNQVc.js} +1 -1
  320. package/dist/client/assets/{use-debounced-autosave-D0TGgFvB.js → use-debounced-autosave-B-FheggT.js} +1 -1
  321. package/dist/client/assets/{use-debounced-value-CDunmz6Z.js → use-debounced-value-DnWAg7xS.js} +1 -1
  322. package/dist/client/assets/{use-deco-credits-orVqTX6I.js → use-deco-credits-Dcf7REFq.js} +1 -1
  323. package/dist/client/assets/{use-decopilot-events-TumByBkr.js → use-decopilot-events-HymesIOH.js} +1 -1
  324. package/dist/client/assets/{use-delete-connection-BllZSjRL.js → use-delete-connection-GE6V1LSr.js} +1 -1
  325. package/dist/client/assets/{use-deployment-admin-BBVz6SL_.js → use-deployment-admin-BMcEtHAq.js} +1 -1
  326. package/dist/client/assets/use-fast-preview-draft-url-CCAgHiPb.js +1 -0
  327. package/dist/client/assets/{use-file-configs-BFq_wpSt.js → use-file-configs-C3GELqZ9.js} +1 -1
  328. package/dist/client/assets/{use-inbox-feed--WBiu__i.js → use-inbox-feed-60_eEWEx.js} +1 -1
  329. package/dist/client/assets/{use-infinite-scroll-7dT9x3fg.js → use-infinite-scroll-CktyBb0n.js} +1 -1
  330. package/dist/client/assets/{use-join-requests-ilYuD6XT.js → use-join-requests-Daf7hgc3.js} +1 -1
  331. package/dist/client/assets/use-main-panel-tabs-zwxUbRsW.js +1 -0
  332. package/dist/client/assets/{use-mcp-auth-status-2A9iou5g.js → use-mcp-auth-status-Ckh_s_m-.js} +1 -1
  333. package/dist/client/assets/use-mcp-client-BjCYOtMv.js +10 -0
  334. package/dist/client/assets/{use-mcp-prompts-JJb6q8dH.js → use-mcp-prompts-D4ntfVw2.js} +1 -1
  335. package/dist/client/assets/{use-mcp-tools-BwuN38Gh.js → use-mcp-tools-BQ-vDoB-.js} +1 -1
  336. package/dist/client/assets/{use-members-CzSQTDAS.js → use-members-BKwSn6l-.js} +1 -1
  337. package/dist/client/assets/{use-mobile-BfmJV4wy.js → use-mobile-exvgjs5E.js} +1 -1
  338. package/dist/client/assets/use-move-blocks-jGxZ60KS.js +1 -0
  339. package/dist/client/assets/{use-navigate-to-agent-D05JNc-L.js → use-navigate-to-agent-CoDY7b67.js} +1 -1
  340. package/dist/client/assets/{use-open-billing-url-pmLoKOyH.js → use-open-billing-url-gwWm2_gZ.js} +1 -1
  341. package/dist/client/assets/{use-org-auth-client-fPRUht_a.js → use-org-auth-client-D2nGERnL.js} +1 -1
  342. package/dist/client/assets/{use-org-fs-D82Vx4hB.js → use-org-fs-DsXUzUGl.js} +1 -1
  343. package/dist/client/assets/{use-org-repo-syncs-CD8TZnkH.js → use-org-repo-syncs-DTcvfXwj.js} +1 -1
  344. package/dist/client/assets/{use-org-sso-ClJ8vn5f.js → use-org-sso-BmpgR8iH.js} +1 -1
  345. package/dist/client/assets/{use-organization-roles-iaQivkLI.js → use-organization-roles-C9fRnsAm.js} +1 -1
  346. package/dist/client/assets/{use-organization-settings-DFkNTsS0.js → use-organization-settings-B5bwnmIE.js} +1 -1
  347. package/dist/client/assets/use-panel-navigate-D1HcWbMf.js +1 -0
  348. package/dist/client/assets/use-project-native-view-presence-WBIVN5MA.js +1 -0
  349. package/dist/client/assets/{use-project-scope-CGMALc0e.js → use-project-scope-0viRZIAS.js} +1 -1
  350. package/dist/client/assets/{use-recent-apps-C1945uiL.js → use-recent-apps-letFJ0RI.js} +1 -1
  351. package/dist/client/assets/{use-releases-D15mHXXN.js → use-releases-BzfYz1da.js} +1 -1
  352. package/dist/client/assets/{use-reports-diagnostic-BdbGTuns.js → use-reports-diagnostic-D4yF4iuL.js} +1 -1
  353. package/dist/client/assets/{use-secrets-DbkATagb.js → use-secrets-DS9zWxiz.js} +1 -1
  354. package/dist/client/assets/use-section-preview-base-H9VNpzGF.js +1 -0
  355. package/dist/client/assets/{use-sidebar-collapsed-BqLmDXCH.js → use-sidebar-collapsed-hUfsznLr.js} +1 -1
  356. package/dist/client/assets/{use-tags-Cn5U7HDa.js → use-tags-CVvzIGGr.js} +1 -1
  357. package/dist/client/assets/{use-task-board-analytics-CftsNPjL.js → use-task-board-analytics-BgxWC82w.js} +1 -1
  358. package/dist/client/assets/{use-task-board-events-BDk-u9KA.js → use-task-board-events-DBz1fm-T.js} +1 -1
  359. package/dist/client/assets/{use-task-board-item-prs-CNMGpOwt.js → use-task-board-item-prs-D2PBN926.js} +1 -1
  360. package/dist/client/assets/{use-task-metadata-0ueqwOxI.js → use-task-metadata-1k4pU8z_.js} +1 -1
  361. package/dist/client/assets/{use-thread-analytics-CgQGRl3S.js → use-thread-analytics-D40j8ndA.js} +1 -1
  362. package/dist/client/assets/{use-thread-outputs-DLitie4Q.js → use-thread-outputs-2XKKA9Gw.js} +1 -1
  363. package/dist/client/assets/useInfiniteQuery-v90E8EIL.js +1 -0
  364. package/dist/client/assets/{useQueries-BfkCTicr.js → useQueries-DT3VE95i.js} +1 -1
  365. package/dist/client/assets/useSuspenseInfiniteQuery-BoCx0vyL.js +1 -0
  366. package/dist/client/assets/{users-BIkPJzOg.js → users-GpxLvhWl.js} +1 -1
  367. package/dist/client/assets/{utils-Bp3fKbm9.js → utils-CkO9KdKe.js} +2 -2
  368. package/dist/client/assets/variant-calendar-CrETYYc9.js +1 -0
  369. package/dist/client/assets/variant-draft-pointer-jrxTxtyS.js +1 -0
  370. package/dist/client/assets/virtual-mcp-DHPQGUgu.js +1 -0
  371. package/dist/client/assets/{watch-sse-pool-CrLAsZHh.js → watch-sse-pool-Dc_r60nv.js} +1 -1
  372. package/dist/client/index.html +2 -2
  373. package/dist/server/server.js +684 -684
  374. package/package.json +1 -1
  375. package/dist/client/assets/ActiveShapeUtils-CDpScllU.js +0 -1
  376. package/dist/client/assets/AreaChart-Du66qHXY.js +0 -1
  377. package/dist/client/assets/BarChart-BXz-bUtC.js +0 -1
  378. package/dist/client/assets/CartesianChart-BZmgsxge.js +0 -1
  379. package/dist/client/assets/ReferenceLine-BPq2MnBR.js +0 -1
  380. package/dist/client/assets/Sector-BraX9V6h.js +0 -28
  381. package/dist/client/assets/agent-analytics-Biob4Jvo.js +0 -2
  382. package/dist/client/assets/agent-app-DTwyyqho.js +0 -1
  383. package/dist/client/assets/agent-assets-DpuZ7qUq.js +0 -1
  384. package/dist/client/assets/agent-automations-CHJpber1.js +0 -1
  385. package/dist/client/assets/agent-deck-DRCJIHES.js +0 -1
  386. package/dist/client/assets/agent-e2e-rlzvrptO.js +0 -1
  387. package/dist/client/assets/agent-experiments-BzSUejrS.js +0 -1
  388. package/dist/client/assets/agent-file-pM3fkLSV.js +0 -1
  389. package/dist/client/assets/agent-hosting-CIblOaW0.js +0 -1
  390. package/dist/client/assets/agent-library-BF5T38g7.js +0 -1
  391. package/dist/client/assets/agent-library-file-BTDXrKvZ.js +0 -1
  392. package/dist/client/assets/agent-monitor-CMU4bHqc.js +0 -1
  393. package/dist/client/assets/agent-releases-CEAPMdCY.js +0 -2
  394. package/dist/client/assets/agent-settings-9voN143W.js +0 -1
  395. package/dist/client/assets/agent-site-editor-WHTbnkdB.js +0 -27
  396. package/dist/client/assets/agent-site-editor-code-DxTJ31bR.js +0 -2
  397. package/dist/client/assets/agent-site-editor-content-B8OXp1G1.js +0 -1
  398. package/dist/client/assets/agent-site-editor-preview-Bu7A4U4r.js +0 -1
  399. package/dist/client/assets/agent-view-DW3bjKRU.js +0 -1
  400. package/dist/client/assets/alert-J8Wo4iMe.js +0 -1
  401. package/dist/client/assets/analytics-sections-Crtm-SOa.js +0 -1
  402. package/dist/client/assets/api-keys-DPclIgvr.js +0 -1
  403. package/dist/client/assets/app-editor-CWO6RLKf.js +0 -1
  404. package/dist/client/assets/automation-list-row-CO-7cr0O.js +0 -1
  405. package/dist/client/assets/badge-ByzdbptS.js +0 -1
  406. package/dist/client/assets/blocks-tab-states-diUqUrAK.js +0 -20
  407. package/dist/client/assets/blog-schema-pXyj_uKN.js +0 -1
  408. package/dist/client/assets/category-editor-16fFMZmU.js +0 -1
  409. package/dist/client/assets/cms-settings-editor-Cowvog2q.js +0 -1
  410. package/dist/client/assets/collection-detail-BVMX_w00.js +0 -1
  411. package/dist/client/assets/content-tab-CTbbT9Kp.js +0 -22
  412. package/dist/client/assets/context-DwXA-O6V.js +0 -1
  413. package/dist/client/assets/hosted-publish-feedback-NabikYNC.js +0 -1
  414. package/dist/client/assets/index-BqS2UmN9.css +0 -1
  415. package/dist/client/assets/index-CxtzBp5_.js +0 -4
  416. package/dist/client/assets/infra-billing-kRHrP-RL.js +0 -1
  417. package/dist/client/assets/legacy-main-redirect-BdnJuiDi.js +0 -1
  418. package/dist/client/assets/library-DYD_N6_K.js +0 -1
  419. package/dist/client/assets/monitoring-CgqK6OeU.js +0 -1
  420. package/dist/client/assets/mustache-Aw4qvxEW.js +0 -4
  421. package/dist/client/assets/order-monitor-day-CIHUt3pK.js +0 -1
  422. package/dist/client/assets/page-seo-form-CnjlIIXj.js +0 -1
  423. package/dist/client/assets/plan-ByMMI8KU.js +0 -1
  424. package/dist/client/assets/post-calendar-Dq_uFQwi.js +0 -1
  425. package/dist/client/assets/post-editor-DPLEIDHY.js +0 -2
  426. package/dist/client/assets/preview-tab-BHT_7Qja.js +0 -551
  427. package/dist/client/assets/product-picker-dialog-p0Ic9l9I.js +0 -1
  428. package/dist/client/assets/project-apps-v-sauknl.js +0 -1
  429. package/dist/client/assets/project-reports-CZJuTnYB.js +0 -1
  430. package/dist/client/assets/project-tasks-CGicoIeY.js +0 -1
  431. package/dist/client/assets/record-editor-Bh04Pm0_.js +0 -1
  432. package/dist/client/assets/redirect-editor-DQhKbdsA.js +0 -1
  433. package/dist/client/assets/reports-BupQ5Xhd.js +0 -1
  434. package/dist/client/assets/reports-tab-aEhqa7te.js +0 -2
  435. package/dist/client/assets/repositories-CEC-SgTJ.js +0 -1
  436. package/dist/client/assets/resolve-tab-icon-DtNff2Yq.js +0 -1
  437. package/dist/client/assets/route-Co7AkL50.js +0 -1
  438. package/dist/client/assets/route-D9eWdPea.js +0 -1
  439. package/dist/client/assets/route-P4X0mipC.js +0 -1
  440. package/dist/client/assets/secret-ciphertext-CI3Fu2ro.js +0 -1
  441. package/dist/client/assets/sections-editor-BgMrH8fq.js +0 -4
  442. package/dist/client/assets/seo-editor-C-YMij5b.js +0 -1
  443. package/dist/client/assets/settings-tab-Cp5pryb2.js +0 -1
  444. package/dist/client/assets/shell-layout-DNfiem0_.js +0 -1
  445. package/dist/client/assets/site-editor-Dsm_SPF7.js +0 -1
  446. package/dist/client/assets/site-editor-toast-L4A-Cxh7.js +0 -1
  447. package/dist/client/assets/slider-B9iKqweT.js +0 -1
  448. package/dist/client/assets/tasks-DrfrXIxf.js +0 -1
  449. package/dist/client/assets/time-range-picker-Dm5YljWh.js +0 -1
  450. package/dist/client/assets/toggle-group-CtPF-F41.js +0 -1
  451. package/dist/client/assets/tooltipContext-DFq6ns9J.js +0 -1
  452. package/dist/client/assets/use-content-sync-D4PHTEJr.js +0 -1
  453. package/dist/client/assets/use-create-virtual-mcp-C4gtrY2f.js +0 -1
  454. package/dist/client/assets/use-fast-preview-draft-url-6p2QJIdt.js +0 -1
  455. package/dist/client/assets/use-main-panel-tabs-kHysLFoZ.js +0 -1
  456. package/dist/client/assets/use-main-schema-v8-Dcb6Yskn.js +0 -1
  457. package/dist/client/assets/use-mcp-client-ZokR8_74.js +0 -10
  458. package/dist/client/assets/use-panel-navigate-K8ACrPML.js +0 -1
  459. package/dist/client/assets/use-project-native-view-presence-DJiBua9F.js +0 -1
  460. package/dist/client/assets/use-section-preview-base-De54Y3vh.js +0 -1
  461. package/dist/client/assets/useInfiniteQuery-B7za82zu.js +0 -1
  462. package/dist/client/assets/useSuspenseInfiniteQuery-B0JY_wMj.js +0 -1
  463. package/dist/client/assets/variant-calendar-BIblXEHb.js +0 -1
  464. package/dist/client/assets/variant-draft-pointer-fs9iIwvq.js +0 -1
  465. package/dist/client/assets/virtual-mcp-CeCtCq_o.js +0 -1
@@ -1 +0,0 @@
1
- import{c as P,o as q,m as F,K as m,aV as Ye,aF as Nt,aG as _t,r as U,a as Dt,aw as ce,a2 as xt,au as Rt,b8 as Pt,t as z,j as V}from"./index-DcU2uHG-.js";import{a as We}from"./input-pg_Munw1.js";import{k as $t,M as At,l as le,s as Re}from"./thread-intent-DlbBEzNn.js";import{u as pe,c as Lt}from"./use-main-schema-v8-Dcb6Yskn.js";import{b as te}from"./sandbox-url-D3mC8qhT.js";import{s as Ft}from"./utils-Bp3fKbm9.js";import{a as Ut}from"./repository-binding-B-JblZ3B.js";import{u as Mt}from"./chat-context-BnuwMOfj.js";import{i as jt,u as Bt}from"./index-_y92DzgS.js";import{v as Qt}from"./sandbox-git-api-CRxdlhrN.js";import{e as Vt}from"./backoff-CrEUbyZT.js";const p={MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,NotFound:-32001,Conflict:-32002,InvalidBlock:-32003,ReadOnly:-32005,Unsupported:-32006,LimitExceeded:-32007,Unavailable:-32008,Unauthorized:-32010};class T extends Error{code;data;constructor(t,n,o){super(n),this.name="ContentProtocolError",this.code=t,this.data=o}toJSON(){return this.data===void 0?{code:this.code,message:this.message}:{code:this.code,message:this.message,data:this.data}}static from(t){return new T(t.code,t.message,t.data)}}const K="deco-content",ue={major:1},ze=1;async function Ht(e){let t=new Uint8Array(await e.arrayBuffer());if(t[0]===31&&t[1]===139){const n=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));t=new Uint8Array(await new Response(n).arrayBuffer())}return JSON.parse(new TextDecoder().decode(t))}const de={major:ue.major,minor:ze},Xe=`the endpoint speaks an older ${K} than this client needs (${de.major}.${de.minor} or newer): update @decocms/blocks in the site (8.2.0 or newer) and start deco serve again`;function W(e,t,n){const o={reason:t,required:{...de}};if(n){o.actual={protocol:n.protocol,major:n.version?.major,minor:n.version?.minor};const r=n.server;typeof r?.name=="string"&&typeof r.version=="string"&&(o.server={name:r.name,version:r.version})}return new T(p.Unsupported,e,o)}function Ze(e){const t=e??{},{protocol:n,version:o}=t;if(n!==K)throw W(`the endpoint speaks ${JSON.stringify(n)}, not ${K}`,"protocol",t);if(o?.major!==ue.major)throw W(`the endpoint speaks ${K} ${String(o?.major)}.x; this client speaks ${ue.major}.x`,"major",t);if(typeof o.minor!="number"||o.minor<ze)throw W(Xe,"outdated",t);return e}function Pe(e,t){return t.code===p.MethodNotFound&&e.startsWith("changes.")?W(Xe,"outdated"):T.from(t)}function ye(e){const t=e.fetch??(s=>fetch(s));let n=1;async function o(s){const i={"content-type":"application/json",accept:"application/json",...e.headers},a=await t(new Request(e.endpoint,{method:"POST",headers:i,body:JSON.stringify(s)}));let c;try{c=await Ht(a)}catch{throw new T(p.Unavailable,`the endpoint answered HTTP ${a.status} without a JSON-RPC body`)}if(!a.ok||!Array.isArray(c)&&c?.id===null){const l=c?.error;throw l?T.from(l):new T(p.Unavailable,`the endpoint answered HTTP ${a.status}`)}return c}const r=async(s,i)=>{const a=n++,c=await o({jsonrpc:"2.0",id:a,method:s,params:i??{}});if(c.error)throw Pe(s,c.error);return c.result};return{call:r,describe:async()=>Ze(await r("describe")),schemaGet:s=>r("schema.get",s),blocksList:s=>r("blocks.list",s),blocksApply:s=>r("blocks.apply",s),changesList:s=>r("changes.list",s),changesGet:s=>r("changes.get",s),changesDiscard:s=>r("changes.discard",s),async batch(s){const i=s.map(()=>n++),a=await o(s.map((l,d)=>({jsonrpc:"2.0",id:i[d],method:l.method,params:l.params??{}}))),c=new Map(a.map(l=>[l.id,l]));return i.map((l,d)=>{const u=c.get(l);return u?u.error?{ok:!1,error:Pe(s[d].method,u.error)}:{ok:!0,result:u.result}:{ok:!1,error:new T(p.InternalError,"no response for this call")}})}}}const fe=".json";[...Array.from({length:9},(e,t)=>`COM${t+1}`),...Array.from({length:9},(e,t)=>`LPT${t+1}`)];new TextEncoder;function Gt(e){return`${encodeURIComponent(e)}${fe}`}function et(e){return e.endsWith(fe)?e.slice(0,-fe.length):e}function Eo(e){const t=et(e);try{return decodeURIComponent(t)}catch{return t}}function Kt(e){let t=et(e),n=0;for(;t.includes("%");){let o;try{o=decodeURIComponent(t)}catch{break}if(o===t)break;t=o,n++}return{name:t,passes:n}}function ko(e){return Kt(Gt(e)).name}const $e=20,Ae=5,Le=500;function Se(e){return e instanceof T?e.code===p.MethodNotFound?!0:e.code===p.Unsupported&&e.data?.reason==="outdated":!1}function he(e,t){return t.notModified?e?{...e,base:t.base}:null:{revision:t.revision,base:t.base,changes:t.changes}}async function qt(e,t,n){const o=m.contentChanges(n),r=e.getQueryData(o),s=await t.changesList(r?{ifNoneMatch:r.revision}:{}),i=he(r,s);if(i)return i;const a=await t.changesList({});return he(void 0,a)}async function Jt(e,t){const n=[];for(let s=0;s<t.length;s+=$e)n.push(t.slice(s,s+$e));const o=Object.create(null),r=[];for(let s=0;s<n.length;s+=Ae){const i=await e.batch(n.slice(s,s+Ae).map(a=>({method:"changes.get",params:{names:a}})));for(const a of i){if(!a.ok)throw a.error;const c=a.result;Object.assign(o,c.entries),r.push(...c.diagnostics)}}return{entries:o,diagnostics:r}}async function Co(e,t){let n={revision:"",versions:{}};for(let o=0;o<t.length;o+=Le){const r=t.slice(o,o+Le),s=await e.changesDiscard({names:r.map(i=>i.name),ifMatch:Object.fromEntries(r.map(i=>[i.name,i.version]))});n={revision:s.revision,versions:{...n.versions,...s.versions}}}return n}function Io(e){return e instanceof T&&e.code===p.Conflict}function tt(e){return e?.kind==="protocol"?e:null}function Oo(e,t,n){const o=P.c(14);let r;o[0]!==n?(r={},o[0]=n,o[1]=r):r=o[1];const s=r,i=q();let a;o[2]!==e?(a=tt(e),o[2]=e,o[3]=a):a=o[3];const c=a,l=!!c&&!!t&&s.enabled!==!1;let d;o[4]!==t?(d=m.contentChanges(t??""),o[4]=t,o[5]=d):d=o[5];let u;o[6]!==t||o[7]!==l||o[8]!==c||o[9]!==i?(u=l?()=>qt(i,c.client,t):Ye,o[6]=t,o[7]=l,o[8]=c,o[9]=i,o[10]=u):u=o[10];let h;return o[11]!==d||o[12]!==u?(h={queryKey:d,queryFn:u,staleTime:0},o[11]=d,o[12]=u,o[13]=h):h=o[13],F(h)}function To(e,t,n){const o=P.c(14);let r;o[0]!==e?(r=tt(e),o[0]=e,o[1]=r):r=o[1];const s=r;let i;o[2]!==n?(i=n?Object.keys(n.changes):[],o[2]=n,o[3]=i):i=o[3];const a=i,c=!!s&&!!t&&!!n&&a.length>0;let l;o[4]!==t||o[5]!==n?.revision?(l=m.contentChangeSides(t??"",n?.revision??""),o[4]=t,o[5]=n?.revision,o[6]=l):l=o[6];let d;o[7]!==c||o[8]!==a||o[9]!==s?(d=c?()=>Jt(s.client,a):Ye,o[7]=c,o[8]=a,o[9]=s,o[10]=d):d=o[10];let u;return o[11]!==l||o[12]!==d?(u={queryKey:l,queryFn:d,staleTime:Number.POSITIVE_INFINITY},o[11]=l,o[12]=d,o[13]=u):u=o[13],F(u)}function nt(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const n=t.hostname.toLowerCase();return n==="127.0.0.1"||n==="[::1]"||n==="localhost"}catch{return!1}}function X(e){try{const t=new URL(e);return(t.hostname==="127.0.0.1"||t.hostname==="[::1]")&&(t.hostname="localhost"),t.href}catch{return e}}const ot=Nt({endpoint:_t().max(2048).refine(e=>nt(e)&&new URL(e).pathname==="/rpc").transform(X)});function No(e){const t=new URLSearchParams(e.replace(/^#/,"")),n=ot.safeParse({endpoint:t.get("endpoint")??""});return n.success?n.data:null}function rt(e){const t=ot.safeParse(e);return t.success?t.data:null}const st="studio:deco-serve-last";function _o(e){try{localStorage.setItem(st,JSON.stringify(e))}catch{}}function Do(){try{const e=localStorage.getItem(st);return e?rt(JSON.parse(e)):null}catch{return null}}function xo(e){try{return new URL(X(e)).host}catch{return e}}function Yt(e,t=1e4){return Math.min(1e3*2**Math.max(0,e-1),t)}const Wt="http://localhost:4545/rpc",Ro="npx @decocms/blocks serve",Po="npx @decocms/blocks schema";class Ee extends Error{constructor(t="the endpoint isn't deco serve"){super(t),this.name="NotDecoServeError"}}function zt(e){if(e instanceof Ee)return{reason:"not-deco-serve"};if(!(e instanceof T))return{reason:"not-answering"};switch(e.code){case p.Unauthorized:case p.MethodNotFound:return{reason:"outdated"};case p.Unsupported:return Se(e)?{reason:"outdated"}:{reason:"version-mismatch"};case p.Unavailable:return/^the endpoint answered HTTP/.test(e.message)?{reason:"not-deco-serve"}:{reason:"error",detail:e.message};default:return{reason:"error",detail:e.message}}}function $o(e,t){if(e)return[X(e.endpoint)];const n=[t?.endpoint,Wt].filter(o=>!!o).map(X);return[...new Set(n)]}const it=U.createContext(null);function Xt(e){const t=P.c(27),n=U.useContext(it),o=pe(n?null:e),{data:r}=Dt.useSession(),s=r?.user?.id??"",i=!!e&&!!s;let a;t[0]!==i||t[1]!==s||t[2]!==e?(a=i?ce.decoServeConnection(s,e):null,t[0]=i,t[1]=s,t[2]=e,t[3]=a):a=t[3];const[c,l]=Ue(a);let d;t[4]!==i||t[5]!==s||t[6]!==e?(d=i?ce.decoServeEndpoint(s,e):null,t[4]=i,t[5]=s,t[6]=e,t[7]=d):d=t[7];const[u,h]=Ue(d);if(n)return n;let b;t[8]!==c||t[9]!==i?(b=i?rt(c):null,t[8]=c,t[9]=i,t[10]=b):b=t[10];const g=b,k=!!g;let C;t[11]!==o||t[12]!==k?(C=Zt(o,k),t[11]=o,t[12]=k,t[13]=C):C=t[13];const{applies:x,undecided:N}=C,_=x?g:null,I=i&&o==="v8"&&typeof u=="string"?u:null;let O;t[14]!==h||t[15]!==l||t[16]!==i?(O=S=>{i&&(l(S),h(S.endpoint))},t[14]=h,t[15]=l,t[16]=i,t[17]=O):O=t[17];let w;t[18]!==l||t[19]!==i?(w=()=>{i&&l(null)},t[18]=l,t[19]=i,t[20]=w):w=t[20];let y;return t[21]!==_||t[22]!==I||t[23]!==O||t[24]!==w||t[25]!==N?(y={connection:_,undecided:N,lastEndpoint:I,set:O,clear:w},t[21]=_,t[22]=I,t[23]=O,t[24]=w,t[25]=N,t[26]=y):y=t[26],y}function Zt(e,t){return t?e==="loading"?{applies:!1,undecided:!0}:{applies:e==="v8"||e==="error",undecided:!1}:{applies:!1,undecided:!1}}function Fe(e){try{const t=localStorage.getItem(e);return t===null?null:JSON.parse(t)}catch{return null}}function Ue(e){const t=P.c(17),n=q(),o=e??"";let r;t[0]!==o?(r=["localStorage",o],t[0]=o,t[1]=r):r=t[1];const s=r;let i,a;t[2]!==e?(i=()=>e?Fe(e):null,a=()=>e?Fe(e):null,t[2]=e,t[3]=i,t[4]=a):(i=t[3],a=t[4]);const c=!!e;let l;t[5]!==s||t[6]!==i||t[7]!==a||t[8]!==c?(l={queryKey:s,queryFn:i,initialData:a,enabled:c,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[5]=s,t[6]=i,t[7]=a,t[8]=c,t[9]=l):l=t[9];const{data:d}=F(l);let u;t[10]!==e||t[11]!==n||t[12]!==s?(u=k=>{if(e){try{k===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(k))}catch{}n.setQueryData(s,k)}},t[10]=e,t[11]=n,t[12]=s,t[13]=u):u=t[13];const h=u,b=e?d??null:null;let g;return t[14]!==h||t[15]!==b?(g=[b,h],t[14]=h,t[15]=b,t[16]=g):g=t[16],g}function Ao(e){return e.kind==="protocol"||e.kind==="unavailable"}function Lo(e){const t=e.hasOrg?e.orgFlag:!1,{backend:n}=e;return n==="protocol"||n==="unavailable"?!0:n==="pending"?t===!0?!0:void 0:t}function Fo(e,t,n){return t!=="github"||n!=="v8"?!1:e.kind==="pending"?!0:e.kind==="unavailable"&&e.siteNotOwned?!1:(e.kind==="protocol"||e.kind==="unavailable")&&e.source==="github"}function Uo(e){if(e.kind!=="protocol"||e.source!=="local")return null;const t=e.describe.preview?.url;return t&&nt(t)?t:null}function Mo(e,t){return e.kind!=="protocol"||e.source!=="local"||!e.describe.assets||!t?null:new URL(t.endpoint).origin}function at(e){return e.hasServeConnection?"local":e.runtime==="sandbox"?"sandbox":"github"}function en(e){if(!e.hasProject)return"legacy";const t=at(e);if(t==="local")return"protocol-local";if(e.serveConnectionUndecided)return"pending";if(t==="sandbox"){const o=e.sandboxSite;return o==="v8"?"protocol-sandbox":o==="v7"?"legacy":o==="error"?e.markedV8?"retrying-sandbox":"legacy":"pending"}if(e.mainSchema==="loading")return"pending";if(e.mainSchema==="error")return"retrying-github";if(e.mainSchema==="v7")return"legacy";const n=e.githubSite;return n==="v8"?"protocol-github":n==="not-owned"?"site-not-owned-github":n==="error"?"unavailable-github":n==="v7"?"legacy":"pending"}function tn(e){return{github:e.mode==="github"&&e.mainSchema==="v8",sandbox:e.mode==="sandbox"&&e.workingTreeReady}}function Me(e){return e.isError||e.errorUpdateCount>0}function nn(e,t,n){if(!t||n.size===0)return e;const o={...e};for(const r of n)Object.hasOwn(t,r)?o[r]=t[r]:delete o[r];return o}function on(e){if(!e||typeof e!="object")return[];const t=e,n=[];return typeof t.blockKey=="string"&&n.push(t.blockKey),t.writes&&typeof t.writes=="object"&&n.push(...Object.keys(t.writes)),Array.isArray(t.deletes)&&n.push(...t.deletes.filter(o=>typeof o=="string")),n}function ne(e){return{[$t]:e}}class ke extends Error{status=409;constructor(){super("main's schema changed")}}async function Ce(e){return e.status!==409?!1:(await e.clone().json().catch(()=>null))?.code===At}function Ie(e,t,n){e.resetQueries({predicate:o=>{const r=o.queryKey;return r[1]!==t||r[2]!==n?!1:r[0]===m.mainSchemaV8(t,n)[0]||r[0]===m.contentBackend()[0]&&r[4]==="github"}})}function ct(e,t,n){return e.getQueryData(m.mainSchemaV8(t,n))}const lt="__noSchema";function rn(){return{manifest:{blocks:{}},schema:{definitions:{},root:{}},[lt]:!0}}function jo(e){return!!e&&e[lt]===!0}function ut(e){if(!e.ok)return e.error.code===p.NotFound;const t=e.result;return t.notModified===!1&&t.schema===null}function sn(e,t){return(typeof t.name=="string"?t.name.trim():"")||e}const an=(e,t)=>e.label.localeCompare(t.label)||e.key.localeCompare(t.key);function Bo(e){const t=new Map;for(const[n,o]of Object.entries(e)){const r=o&&typeof o=="object"&&!Array.isArray(o)?o:{},s=typeof r.__resolveType=="string"?r.__resolveType:null,i=t.get(s)??[];i.push({key:n,label:sn(n,r)}),t.set(s,i)}return[...t.entries()].map(([n,o])=>({resolveType:n,blocks:o.sort(an)})).sort((n,o)=>n.resolveType===null?1:o.resolveType===null?-1:je(n.resolveType).localeCompare(je(o.resolveType))||n.resolveType.localeCompare(o.resolveType))}function je(e){return(e.split("/").filter(Boolean).at(-1)??e).replace(/\.(tsx?|jsx?)$/,"")||e}function Be(e,t,n){if(t.length===0)return n;const[o,...r]=t;if(Array.isArray(e)&&typeof o=="number"){const s=e.slice();return s[o]=Be(e[o],r,n),s}if(e&&typeof e=="object"&&typeof o=="string"){const s=e,i={};for(const a of Object.keys(s))i[a]=a===o?Be(s[a],r,n):s[a];return i}return e}function Qo(e){if(e.trim()==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}class Qe extends Error{}class Ve extends Error{}const dt="site-not-owned";async function cn(e){return e.status!==409?!1:(await e.clone().json().catch(()=>null))?.code==="site_not_owned"}async function ln(e,t=r=>fetch(r),n,o){const r=ye({endpoint:e,fetch:async s=>{const i=new Request(s);for(const[c,l]of Object.entries(ne("v8")))i.headers.set(c,l);const a=await t(i);if(await cn(a))throw new Ve;if(await Ce(a))throw n?.(),new ke;return a}});try{const s=await Te(r,le(o)?{schema:o}:void 0);return s.v8Schema?s:null}catch(s){if(s instanceof Ve)return dt;throw s}}const Oe=5e3;function un(e){return new URL(`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}/rpc`,window.location.origin).href}function dn(e){return new URL(te(e,"rpc"),window.location.origin).href}async function Te(e,t){const[n,o]=await e.batch(t?[{method:"describe"}]:[{method:"describe"},{method:"schema.get"}]);if(!n?.ok)throw n?.error??new Error("no describe");if(n.result?.protocol!==K)throw new Ee;const s=Ze(n.result);if(t)return{client:e,describe:s,hasSchema:t.schema!=null,v8Schema:le(t.schema)};if(!o)throw new Error("no schema.get");if(ut(o))return{client:e,describe:s,hasSchema:!1,v8Schema:!1};if(o.ok){const i=o.result;return{client:e,describe:s,hasSchema:!0,v8Schema:le(i?.schema)}}throw o.error}async function fn(e,t=n=>fetch(n)){const n=ye({endpoint:e,fetch:async o=>{const r=await t(o);if(r.status===404)throw new Qe;return r}});try{const o=await Te(n);return o.v8Schema?o:null}catch(o){if(o instanceof Qe)return null;throw o}}function ft(e,t){const n=P.c(53),{org:o}=xt(),{connection:r,undecided:s}=Xt(e),{runtime:i}=We(e),a=U.useContext(it),c=pe(a?null:e),l=Lt(e),d=at({hasServeConnection:!!r,runtime:i}),u=Mt()?.taskId??null,h=jt(Bt().lifecycle.phase),b=q(),g=tn({mode:d,mainSchema:c,workingTreeReady:h}),k=g.github&&!!o.slug&&!!e&&!!t;let C;n[0]!==t||n[1]!==o.slug||n[2]!==b||n[3]!==e?(C=()=>ln(un({orgSlug:o.slug,virtualMcpId:e,branch:t}),void 0,()=>Ie(b,o.slug,e),ct(b,o.slug,e)?.schema),n[0]=t,n[1]=o.slug,n[2]=b,n[3]=e,n[4]=C):C=n[4];const x=F({queryKey:m.contentBackend(o.slug,e??"",t??"","github"),queryFn:C,enabled:k,staleTime:Number.POSITIVE_INFINITY,...He}),N=g.sandbox&&!!o.slug&&!!e&&!!t;let _;n[5]!==t||n[6]!==o.slug||n[7]!==u||n[8]!==e?(_=async()=>fn(dn({orgSlug:o.slug,virtualMcpId:e,branch:t,threadId:u})),n[5]=t,n[6]=o.slug,n[7]=u,n[8]=e,n[9]=_):_=n[9];const I=F({queryKey:m.contentBackend(o.slug,e??"",t??"","sandbox",u??""),queryFn:_,enabled:N,staleTime:Number.POSITIVE_INFINITY,...He}),O=!!r;let w;n[10]!==r?.endpoint||n[11]!==o.slug||n[12]!==e?(w=m.contentBackend(o.slug,e??"","local",r?.endpoint??""),n[10]=r?.endpoint,n[11]=o.slug,n[12]=e,n[13]=w):w=n[13];let y;n[14]!==r?(y=()=>Te(ye({endpoint:r.endpoint})),n[14]=r,n[15]=y):y=n[15];let S;n[16]!==O||n[17]!==w||n[18]!==y?(S={queryKey:w,queryFn:y,enabled:O,staleTime:Number.POSITIVE_INFINITY,retry:mn,retryDelay:gn,refetchInterval:hn},n[16]=O,n[17]=w,n[18]=y,n[19]=S):S=n[19];const v=F(S);let $;n[20]!==r?.endpoint||n[21]!==o.slug||n[22]!==e?($=m.contentBackend(o.slug,e??"","local",r?.endpoint??""),n[20]=r?.endpoint,n[21]=o.slug,n[22]=e,n[23]=$):$=n[23];const A=$;let E;n[24]!==r?.endpoint||n[25]!==o.slug||n[26]!==e?(E=m.contentBackend(o.slug,e??"","local-describe",r?.endpoint??""),n[24]=r?.endpoint,n[25]=o.slug,n[26]=e,n[27]=E):E=n[27];let D;n[28]!==v.data||n[29]!==A||n[30]!==b?(D=async()=>{try{return await v.data.client.describe()}catch(f){const G=f;throw b.invalidateQueries({queryKey:A,exact:!0},{cancelRefetch:!1}),G}},n[28]=v.data,n[29]=A,n[30]=b,n[31]=D):D=n[31];const R=!!v.data&&!a;let M;n[32]!==E||n[33]!==D||n[34]!==R?(M={queryKey:E,queryFn:D,enabled:R,refetchInterval:Oe,retry:!1},n[32]=E,n[33]=D,n[34]=R,n[35]=M):M=n[35];const Q=F(M).data??v.data?.describe,L=en({hasProject:!!e,hasServeConnection:!!r,serveConnectionUndecided:s,runtime:i,mainSchema:c,githubSite:x.data===dt?"not-owned":x.data?"v8":x.data===null?"v7":Me(x)?"error":"loading",sandboxSite:vn({data:I.data,isError:Me(I),workingTreeReady:h}),markedV8:l});if(L==="pending"){let f;return n[36]===Symbol.for("react.memo_cache_sentinel")?(f={kind:"pending"},n[36]=f):f=n[36],f}if(L==="retrying-github"){let f;return n[37]===Symbol.for("react.memo_cache_sentinel")?(f={kind:"pending",retrying:"github"},n[37]=f):f=n[37],f}if(L==="retrying-sandbox"){let f;return n[38]===Symbol.for("react.memo_cache_sentinel")?(f={kind:"pending",retrying:"sandbox"},n[38]=f):f=n[38],f}if(L==="legacy"){let f;return n[39]===Symbol.for("react.memo_cache_sentinel")?(f={kind:"legacy"},n[39]=f):f=n[39],f}if(L==="protocol-github"){const f=x.data;let G;return n[40]!==f?(G=ge("github",f,""),n[40]=f,n[41]=G):G=n[41],G}if(L==="site-not-owned-github"){let f;return n[42]===Symbol.for("react.memo_cache_sentinel")?(f={kind:"unavailable",source:"github",siteNotOwned:!0},n[42]=f):f=n[42],f}if(L==="protocol-sandbox"){let f;return n[43]!==I.data?(f=ge("sandbox",I.data,":sandbox"),n[43]=I.data,n[44]=f):f=n[44],f}if(L==="unavailable-github"){let f;return n[45]===Symbol.for("react.memo_cache_sentinel")?(f={kind:"unavailable",source:"github"},n[45]=f):f=n[45],f}const se=v.error??v.failureReason,ie=r?.endpoint??"";let Y;return n[46]!==Q||n[47]!==v.data||n[48]!==v.failureCount||n[49]!==v.isError||n[50]!==se||n[51]!==ie?(Y=wn({probed:v.data,isError:v.isError,failureCount:v.failureCount,failure:se,describe:Q,endpoint:ie}),n[46]=Q,n[47]=v.data,n[48]=v.failureCount,n[49]=v.isError,n[50]=se,n[51]=ie,n[52]=Y):Y=n[52],Y}function hn(e){return e.state.status==="error"||e.state.data?.v8Schema===!1?Oe:!1}function gn(e){return Yt(e+1)}function mn(e,t){return!(t instanceof T)&&!(t instanceof Ee)}function vn(e){return e.data!==void 0?e.data?"v8":"v7":e.workingTreeReady?e.isError?"error":"loading":"unavailable"}const bn=3;function wn(e){if(e.probed?.hasSchema&&!e.probed.v8Schema)return{kind:"unavailable",source:"local",problem:{reason:"not-v8"}};const t=e.probed?ge("local",{...e.probed,describe:e.describe??e.probed.describe},`:serve:${e.endpoint}`):null;return e.isError||e.failureCount>0?t?.kind==="protocol"&&!e.isError&&e.failureCount<bn?t:{kind:"unavailable",source:"local",problem:zt(e.failure)}:t??{kind:"pending"}}const He={retry:2,refetchInterval:e=>e.state.status==="error"?Oe:!1};function ge(e,t,n){return{kind:"protocol",source:e,client:t.client,describe:t.describe,cacheKeySuffix:n,hasSchema:t.hasSchema}}function ht(e){const t=P.c(13);let n;t[0]!==e?(n=ce.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const o=n,[r,s]=Rt(o,null),i=pe(e);let a;if(t[2]!==i||t[3]!==r||t[4]!==e){const h=e?Re(r):null;a=pn({saved:h,main:i}),t[2]=i,t[3]=r,t[4]=e,t[5]=a}else a=t[5];const c=a;let l,d;t[6]!==s?(l=h=>s(Re(h)),d=()=>s(null),t[6]=s,t[7]=l,t[8]=d):(l=t[7],d=t[8]);let u;return t[9]!==c||t[10]!==l||t[11]!==d?(u={...c,setUrl:l,clear:d},t[9]=c,t[10]=l,t[11]=d,t[12]=u):u=t[12],u}function pn(e){return e.saved?e.main==="v7"?{url:e.saved,undecided:!1}:e.main==="v8"?{url:null,undecided:!1}:{url:null,undecided:!0}:{url:null,undecided:!1}}function yn(e,t){const n=(e??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${t}`:t}function Ge(e){let t;try{t=JSON.parse(e)}catch{return null}return typeof t!="object"||t===null||Array.isArray(t)?null:t}class Ne extends Error{constructor(t,n,o=[]){super(n),this.blocks=t,this.fields=o,this.name="BlockConflictError"}blocks;fields}function _e(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function oe(e,t,n){return["decofile-write",e,t,n]}function Sn(e,t,n){return{id:oe(e,t,n).join(":")}}function De(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function En(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function kn(e,t,n){e.setQueryData(m.decofileDraft(_e(t)),n)}function Cn(e,t){return e.getQueryData(m.decofileDraft(_e(t)))??null}async function In(e,t){const n=await fetch(De(e),{cache:"no-store",headers:{...ne("v7"),"if-none-match":`"${t}"`}}).catch(()=>null);return n?.status===200||n?.status===409}function Vo(e){const t=P.c(4);let n;t[0]!==e?(n=m.decofileDraft(e?_e(e):""),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:On,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:r}=F(o);return r??null}async function On(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function Tn(e,t){const n=await fetch(De(t),{cache:"no-store",headers:ne("v7")});if(await Ce(n))throw Ie(e,t.orgSlug,t.virtualMcpId),new ke;if(!n.ok){const r=new Error(`Failed to fetch decofile: ${n.status}`);throw r.status=n.status,r}const o=await n.json();return o.token&&kn(e,t,{version:o.version,token:o.token,apiHost:o.apiHost??window.location.host}),o.decofile}async function Ho(e,t){const n=await fetch(De(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(n.status===409){const r=await n.json().catch(()=>({}));throw r.code==="block-conflict"?new Ne(r.blocks??[],r.error??"Block changed"):new Error(r.error??`Save failed (${n.status})`)}if(!n.ok)return En(n,"Save");const o=await n.json();return{...o,apiHost:o.apiHost??window.location.host}}const gt=3e3,Nn=15e3,_n=2*6e4,mt={now:()=>Date.now(),setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),hidden:()=>typeof document<"u"&&document.visibilityState==="hidden"};function Dn(e){return e<_n?gt:Nn}function xn(e,t=mt){const n=t.now();let o=!1,r=!1,s=null;const i=()=>{o||(s=t.setTimeout(a,Dn(t.now()-n)))},a=()=>{if(s=null,o)return;const{read:c,skip:l}=e();if(r||t.hidden()||l?.()){i();return}r=!0;let d;try{d=c()}catch{d=void 0}Promise.resolve(d).catch(()=>{}).finally(()=>{r=!1}),i()};return i(),()=>{o=!0,s!==null&&t.clearTimeout(s)}}const Ke=()=>0;function Rn(e,t,n=mt){const o=U.useRef(t);o.current=t;const[r]=U.useState(()=>({polling:()=>xn(()=>o.current,n),idle:()=>()=>{}}));U.useSyncExternalStore(e?r.polling:r.idle,Ke,Ke)}function vt(e,t){return te(e,t)}function Pn(e,t){return te(e,"preview-fetch",{path:t})}function Go(e){return vt(e,"preview-invoke")}function Ko(e){return vt(e,"catalog-invoke")}function bt(e){try{const{hostname:t}=new URL(e);return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}function $n(){if(typeof document>"u")return null;const e=Array.from(document.querySelectorAll("iframe"));for(const t of e){const n=t.getAttribute("src");if(n&&bt(n))return n}return null}function An(e,t){const n=e.previewUrl??e.getFallbackPreviewUrl?.()??$n();return n&&bt(n)?new URL(t,n).toString():Pn(e,t)}function Ln(e){return An(e,"/.decofile")}function Fn(e){return e===400?"absent":e===404?"unavailable":e>=200&&e<300?"ok":"error"}function qe(e){return e.liveOk||e.committedAbsent?404:e.liveStatus??502}async function Un(e,t){const n=te(e,"read"),o=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:t,full:!0})}),r=Fn(o.status);if(r==="absent")return{kind:"absent"};if(r==="unavailable")return{kind:"unavailable"};if(r==="error"){const i=new Error(`Failed to read ${t}: ${o.status}`);throw i.status=o.status,i}const s=await o.json();return typeof s.content!="string"?{kind:"unavailable"}:{kind:"data",data:Ft(s.content)}}async function Mn(e,t){const n=await Un(e,t);if(n.kind!=="data")return n;try{return{kind:"data",data:JSON.parse(n.data)}}catch{return{kind:"unavailable"}}}async function qo(e){const t=`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}/meta`,n=await fetch(t,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const o=new Error(`Failed to read committed meta: ${n.status}`);throw o.status=n.status,o}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function jn(e){return Ut(e)?.metadata?.runtime?.path??null}class wt extends Error{constructor(t){super(t instanceof Error?t.message:String(t),{cause:t}),this.name="ServeLostError"}}function Jo(e){return e instanceof T&&e.code===p.Conflict}function pt(e){const t=e.data?.violations;return!Array.isArray(t)||t.length===0?e.message:t.slice(0,3).map(n=>n.message).join("; ")}function Bn(e,t,n){if(t instanceof Ne)return t.message;if(n==="local")return Vn(e,t);if(t instanceof T)switch(t.code){case p.Conflict:return e("siteEditor.save.conflict");case p.ReadOnly:return e("siteEditor.save.readOnly");case p.InvalidBlock:case p.InvalidParams:return e("siteEditor.save.invalid");case p.LimitExceeded:return e("siteEditor.save.tooLarge")}return e("siteEditor.save.failed")}function Qn(e,t){if(t==="local"||e instanceof Ne)return null;if(e instanceof T){const n=e.code===p.InvalidBlock||e.code===p.InvalidParams?pt(e):e.message;return n?`${e.code}: ${n}`:null}return e.message||null}function Vn(e,t){if(t instanceof wt)return e("decoServe.save.serverGone");if(t instanceof T)switch(t.code){case p.Conflict:return e("decoServe.save.conflict");case p.ReadOnly:return e("decoServe.save.readOnly");case p.InvalidBlock:case p.InvalidParams:return e("decoServe.save.invalid",{detail:pt(t)});case p.LimitExceeded:return e("decoServe.save.tooLarge")}return e("sectionsEditor.sectionsEditor.saveFailed",{error:t.message})}function Hn(e,t,n){return e===null?0:Math.max(0,n-Math.max(0,t-e))}function Gn(e,t){const[n,o]=U.useState(e),r=U.useRef(null);return e&&!n&&o(!0),U.useEffect(()=>{if(e){r.current??=Date.now();return}if(!n)return;const s=()=>{r.current=null,o(!1)},i=Hn(r.current,Date.now(),t);if(i===0){s();return}const a=setTimeout(s,i);return()=>clearTimeout(a)},[e,n,t]),n}const yt={phase:"idle",inFlight:0,reload:{seq:0,navigates:!1},epoch:0},Kn=15e3,Z=new Map;function H(e,t){return`${e}/${t}`}function j(e){let t=Z.get(e);return t||(t={state:yt,listeners:new Set,previews:0,timer:null,discardListeners:new Set},Z.set(e,t)),t}function B(e,t){const n=j(e);n.state={...n.state,...t};for(const o of n.listeners)o()}function re(e){e.timer&&clearTimeout(e.timer),e.timer=null}function xe(e){return Z.get(e)?.state??yt}function qn(e,t){const n=j(e);return n.listeners.add(t),()=>{n.listeners.delete(t)}}function Yo(e){const t=j(e);return t.previews++,()=>{t.previews--,t.previews===0&&t.state.phase==="reloading"&&(re(t),B(e,{phase:"idle"}))}}function Wo(e){const t=Z.get(e);!t||t.state.phase!=="reloading"||(re(t),B(e,{phase:"idle"}))}function St(e){const t=j(e);re(t),B(e,{phase:"saving",inFlight:t.state.inFlight+1})}function me(e,t){const n=j(e),o=Math.max(0,n.state.inFlight-1);if(o>0){B(e,{inFlight:o});return}if(!t.ok||n.previews===0){B(e,{phase:"idle",inFlight:o});return}Et(e,t.navigates,o)}function Et(e,t,n=0){const o=j(e);re(o),o.timer=setTimeout(()=>{o.timer=null,o.state.phase==="reloading"&&B(e,{phase:"idle"})},Kn),B(e,{phase:"reloading",inFlight:n,reload:{seq:o.state.reload.seq+1,navigates:t}})}function Jn(e){return e?.kind==="protocol"&&e.source==="github"}async function ve(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:r,branch:s,backend:i,cacheKey:a}=e,c=t.kind==="publish"||t.kind==="reapply"?n.invalidateQueries({queryKey:m.hostedReleases(o,r)}):null;if(i?.kind!=="protocol")return await c,{navigates:!1};const l=s?m.protocolDraftRead(o,r,s):null,d=l?JSON.stringify(n.getQueryData(l)??null):null,u=c?[c]:[];if(a&&t.reread&&u.push(n.invalidateQueries({queryKey:m.decofile(a)})),a&&u.push(n.invalidateQueries({queryKey:m.contentChanges(a)})),s&&i.source==="sandbox"&&u.push(n.invalidateQueries({queryKey:Qt(o,r,s)})),Jn(i)&&l&&u.push(n.invalidateQueries({queryKey:l})),await Promise.all(u),t.kind!=="edit"){const g=H(o,r);B(g,{epoch:xe(g).epoch+1})}const h=l?JSON.stringify(n.getQueryData(l)??null):null,b=d!==h;return b&&await new Promise(g=>Pt.schedule(g)),{navigates:b}}async function Yn(e,t){return St(H(e.orgSlug,e.virtualMcpId)),kt(e,t)}async function kt(e,t){const n=H(e.orgSlug,e.virtualMcpId);let o;try{o=await t.write()}catch(s){throw me(n,{ok:!1,navigates:!1}),t.refreshOnError&&ve(e,{kind:t.kind,reread:!0}).catch(()=>{}),s}let r=!1;try{({navigates:r}=await ve(e,t))}catch{}finally{me(n,{ok:!0,navigates:r})}return o}function zo(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:r,branch:s}=e,i=H(o,r),a=new Set(t.blockKeys);for(const d of[...j(i).discardListeners])d(a);St(i);let c=!1;const l=()=>(c=!0,kt(e,{kind:"discard",reread:!0,write:t.write}));return s?n.getMutationCache().build(n,{mutationKey:oe(o,r,s),scope:Sn(o,r,s),mutationFn:l}).execute(void 0).catch(d=>{throw c||me(i,{ok:!1,navigates:!1}),d}):l()}function Xo(e,t,n){const o=P.c(8);let r;o[0]!==e||o[1]!==t?(r=H(e,t),o[0]=e,o[1]=t,o[2]=r):r=o[2];const s=r;let i;o[3]!==n||o[4]!==s?(i=()=>{const c=j(s).discardListeners;return c.add(n),()=>{c.delete(n)}},o[3]=n,o[4]=s,o[5]=i):i=o[5];let a;o[6]!==s?(a=[s],o[6]=s,o[7]=a):a=o[7],U.useEffect(i,a)}function Wn(e){const t=H(e.orgSlug,e.virtualMcpId);xe(t).inFlight>0||ve(e,{kind:"external"}).then(({navigates:n})=>{const o=j(t);o.previews>0&&o.state.inFlight===0&&Et(t,n)}).catch(()=>{})}function zn(e,t){const n=P.c(7);let o;n[0]!==e||n[1]!==t?(o=H(e,t),n[0]=e,n[1]=t,n[2]=o):o=n[2];const r=o;let s;n[3]!==r?(s=l=>qn(r,l),n[3]=r,n[4]=s):s=n[4];const i=s;let a;n[5]!==r?(a=()=>xe(r),n[5]=r,n[6]=a):a=n[6];const c=a;return U.useSyncExternalStore(i,c,c)}const Xn=500;function Zo(e,t){const{phase:n}=zn(e,t);return Gn(n!=="idle",Xn)}function Zn(e){const t=new Error(`${e} unavailable (content server unreachable)`);return t.status=502,t}function eo(e,t){return m.liveMeta(e.orgSlug,e.virtualMcpId,e.branch,`protocol${t.cacheKeySuffix}`,"")}function er(e,t,n){const o=e.getQueryData(m.contentVersions(t));if(!o)return;if(Object.hasOwn(o,n))return o[n];const r=e.getQueryData(m.decofile(t));return r&&Object.hasOwn(r,n)?void 0:null}function Ct(e,t,n){e.setQueryData(m.contentVersions(t),o=>{const r={...o};for(const[s,i]of Object.entries(n))i===null?delete r[s]:r[s]=i;return r})}function to(e,t){const n=e.getMutationCache().findAll({mutationKey:oe(t.orgSlug,t.virtualMcpId,t.branch),status:"pending"});return new Set(n.flatMap(o=>on(o.state.variables)))}function be(e,t){e.resetQueries({queryKey:m.contentBackend(t.orgSlug,t.virtualMcpId,"local")})}async function ee(e,t,n,o){try{return await o()}catch(r){const s=!(r instanceof T);throw t.source==="local"&&s?(be(e,n),new wt(r)):(t.source==="local"&&Se(r)&&be(e,n),r)}}const ae=new Map;function no(e,t,n,o){const r=ae.get(o);if(r)return r;const s=It(e,t,n,o,!0);return ae.set(o,s),s.finally(()=>ae.delete(o))}async function It(e,t,n,o,r){const s=m.decofile(o),i=eo(n,t),a=m.contentRevision(o),c=e.getQueryData(s),l=e.getQueryData(i),d=e.getQueryData(a)??void 0,u=t.source==="github"&&!l?ct(e,n.orgSlug,n.virtualMcpId):void 0,h=u?.isV8&&u.schema&&u.version?u:void 0,b=l??h?.schema,g=h?{...d,schemaVersion:h.version}:d,k=r&&c?g?.revision:void 0,C=r&&b?g?.schemaVersion:void 0,x=m.contentChanges(o),N=e.getQueryData(x),[_,I,O]=await ee(e,t,n,()=>t.client.batch([{method:"blocks.list",params:k?{ifNoneMatch:k}:{}},{method:"schema.get",params:C?{ifNoneMatch:C}:{}},{method:"changes.list",params:N?{ifNoneMatch:N.revision}:{}}]));if(O?.ok){const R=he(N,O.result);R&&e.setQueryData(x,R)}else O&&t.source==="local"&&Se(O.error)&&be(e,n);if(!_?.ok)throw _?.error??new Error("no blocks.list");if(!I)throw new Error("no schema.get");const w=_.result,y=ut(I),S=I.ok&&!y?I.result:null;if(w.notModified&&!c||S?.notModified&&!b)return It(e,t,n,o,!1);const v=w.notModified?new Set:to(e,n),$=w.notModified?c:nn(w.blocks,c,v),A=y?rn():S?S.notModified?b:S.schema:I.error,E=e.getQueryData(a)?.revision,D=E!==void 0&&E!==g?.revision;if(e.setQueryData(a,{revision:D?E:w.notModified?g?.revision:w.revision,schemaVersion:S?S.notModified?g?.schemaVersion:S.version??void 0:void 0}),e.setQueryData(s,$),!w.notModified){const R=m.contentVersions(o),M=e.getQueryData(R),J={...w.versions};for(const Q of v){const L=M?.[Q];L!==void 0?J[Q]=L:delete J[Q]}e.setQueryData(R,J)}return A instanceof T||e.setQueryData(i,A),!D&&!w.notModified&&c&&g?.revision&&w.revision!==g.revision&&Wn({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o}),{blocks:$,meta:A}}async function tr(e,t,n,o,r,s){return Yn({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o},{kind:"edit",write:async()=>{const i=await ee(e,t,n,()=>t.client.blocksApply({set:r.set,delete:r.delete,...s?{ifMatch:s}:{}}));e.setQueryData(m.contentRevision(o),c=>({...c,revision:i.revision}));const a=i.versions??{};return Ct(e,o,a),{revision:i.revision,versions:a}}})}async function nr(e,t,n,o,r){await e.invalidateQueries({queryKey:m.decofile(o)});let s;try{const a=(await ee(e,t,n,()=>t.client.changesGet({names:[r]}))).entries[r];if(a&&a.after===null&&a.version!==null)return;s={value:a?.after??null,version:a?.version??null}}catch{const i=await ee(e,t,n,()=>t.client.blocksList({}));if(i.notModified)return;s={value:i.blocks[r]??null,version:i.versions[r]??null}}e.setQueryData(m.decofile(o),i=>{const a={...i};return s.value===null?delete a[r]:a[r]=s.value,a}),Ct(e,o,{[r]:s.version})}function or(e){const t=P.c(11),n=q();let o;t[0]!==e?.branch||t[1]!==e?.orgSlug||t[2]!==e?.virtualMcpId?(o=m.protocolDraftRead(e?.orgSlug??"",e?.virtualMcpId??"",e?.branch??""),t[0]=e?.branch,t[1]=e?.orgSlug,t[2]=e?.virtualMcpId,t[3]=o):o=t[3];let r;t[4]!==e||t[5]!==n?(r=async()=>{const c=await fetch(`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`,{cache:"no-store",headers:ne("v8")});if(await Ce(c))throw Ie(n,e.orgSlug,e.virtualMcpId),new ke;if(!c.ok)throw new Error(`draft pointer read failed: ${c.status}`);return await c.json()},t[4]=e,t[5]=n,t[6]=r):r=t[6];const s=!!e;let i;t[7]!==o||t[8]!==r||t[9]!==s?(i={queryKey:o,queryFn:r,enabled:s,staleTime:Number.POSITIVE_INFINITY},t[7]=o,t[8]=r,t[9]=s,t[10]=i):i=t[10];const{data:a}=F(i);return!e||!a?.draft||!a.version?null:`${a.draft}@${a.version}`}function rr(e){const t=P.c(4);let n;t[0]!==e?(n=m.contentRevision(e),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:oo,staleTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:r}=F(o);return r?.revision}async function oo(){throw new Error("content revisions are set by reads and writes")}function Je(e){const t=`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`;return e.protocolSuffix?`${t}${e.protocolSuffix}`:e.localPreviewUrl?`${t}:local:${e.localPreviewUrl}`:t}function ro(e,t){const n=P.c(6),{url:o}=ht(e?.virtualMcpId),r=ft(e?.virtualMcpId,e?.branch);if(!e)return"";let s;return n[0]!==r.cacheKeySuffix||n[1]!==r.kind||n[2]!==o||n[3]!==t?.tunnel||n[4]!==e?(s=r.kind==="protocol"?Je({...e,protocolSuffix:r.cacheKeySuffix}):Je({...e,localPreviewUrl:t?.tunnel===!1?null:o}),n[0]=r.cacheKeySuffix,n[1]=r.kind,n[2]=o,n[3]=t?.tunnel,n[4]=e,n[5]=s):s=n[5],s}function sr(e,t){const n=P.c(39),{url:o,undecided:r}=ht(e?.virtualMcpId),s=!!o,i=ft(e?.virtualMcpId,e?.branch),a=i.kind==="protocol"?i:null,c=ro(e),l=t?.fetchEnabled??!0,d=jn(e?.virtualMcpId),u=We(e?.virtualMcpId).runtime==="cms",h=q();let b;n[0]!==c?(b=m.decofile(c),n[0]=c,n[1]=b):b=n[1];const g=b;let k;n[2]!==e||n[3]!==h||n[4]!==g?(k=()=>{if(!e||h.isMutating({mutationKey:oe(e.orgSlug,e.virtualMcpId,e.branch)})>0)return!0;const v=h.getQueryState(g);return v?.fetchStatus==="fetching"||Date.now()-(v?.dataUpdatedAt??0)<gt/2},n[2]=e,n[3]=h,n[4]=g,n[5]=k):k=n[5];let C;n[6]!==u||n[7]!==s||n[8]!==e||n[9]!==a||n[10]!==h||n[11]!==g?(C=async()=>{if(e){if(!a&&u&&!s){const v=Cn(h,e)?.version;if(v&&!await In(e,v))return}await h.refetchQueries({queryKey:g,exact:!0},{cancelRefetch:!1})}},n[6]=u,n[7]=s,n[8]=e,n[9]=a,n[10]=h,n[11]=g,n[12]=C):C=n[12];let x;n[13]!==k||n[14]!==C?(x={skip:k,read:C},n[13]=k,n[14]=C,n[15]=x):x=n[15],Rn(!!t?.pollWhile&&!!e,x);let N;n[16]!==i.kind||n[17]!==u||n[18]!==l||n[19]!==c||n[20]!==s||n[21]!==o||n[22]!==d||n[23]!==e||n[24]!==a||n[25]!==h?(N=async()=>{if(a)return(await no(h,a,e,c)).blocks;if(i.kind==="unavailable")throw Zn("decofile");if(s){const E=await fetch(new URL("/.decofile",o).toString(),{cache:"no-store"}).catch(ao),D=E?.ok?Ge(await E.text()):null;if(D)return D;const R=new Error("decofile unavailable (local tunnel unreachable)");throw R.status=502,R}if(u)return Tn(h,e);const v=()=>Mn(e,yn(d,".deco/blocks.gen.json"));if(l){const E=await fetch(Ln(e),{cache:"no-store"}).catch(io);if(E?.ok){const M=Ge(await E.text());if(M)return M}const D=await v();if(D.kind==="data")return D.data;const R=new Error(`Failed to fetch decofile: ${E?.status??"network error"}`);throw R.status=qe({liveOk:!!E?.ok,liveStatus:E?.status,committedAbsent:D.kind==="absent"}),R}const $=await v();if($.kind==="data")return $.data;const A=new Error("decofile unavailable (preview down, no committed snapshot)");throw A.status=qe({liveOk:!1,committedAbsent:$.kind==="absent"}),A},n[16]=i.kind,n[17]=u,n[18]=l,n[19]=c,n[20]=s,n[21]=o,n[22]=d,n[23]=e,n[24]=a,n[25]=h,n[26]=N):N=n[26];const _=!!e&&i.kind!=="pending"&&!r,I=a?0:3e4,O=a?.describe.pollIntervalMs,w=a?"always":void 0;let y;n[27]!==u||n[28]!==s||n[29]!==a?(y=(v,$)=>{if(a||u||s)return v<3;const A=$.status;return A!==502&&A!==404&&v<2},n[27]=u,n[28]=s,n[29]=a,n[30]=y):y=n[30];let S;return n[31]!==g||n[32]!==N||n[33]!==_||n[34]!==I||n[35]!==O||n[36]!==w||n[37]!==y?(S={queryKey:g,queryFn:N,enabled:_,staleTime:I,refetchInterval:O,refetchIntervalInBackground:!1,refetchOnWindowFocus:w,retry:y,retryDelay:so},n[31]=g,n[32]=N,n[33]=_,n[34]=I,n[35]=O,n[36]=w,n[37]=y,n[38]=S):S=n[38],F(S)}function so(e){return Vt(5e3,1e3,e,2,0)}function io(){return null}function ao(){return null}const co="site-editor-save",we="site-editor-publish";function lo(e){const t=P.c(7),{label:n,detail:o}=e;let r;t[0]!==n?(r=V.jsx("summary",{className:"cursor-pointer select-none text-muted-foreground",children:n}),t[0]=n,t[1]=r):r=t[1];let s;t[2]!==o?(s=V.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-muted-foreground",children:o}),t[2]=o,t[3]=s):s=t[3];let i;return t[4]!==r||t[5]!==s?(i=V.jsxs("details",{className:"mt-1 text-xs",children:[r,s]}),t[4]=r,t[5]=s,t[6]=i):i=t[6],i}function Ot(e,t){return t?V.jsx(lo,{label:e("siteEditor.details"),detail:t}):void 0}function ir(e,t,n){z.error(Bn(e,t,n),{id:co,description:Ot(e,Qn(t,n))})}const Tt={action:void 0,duration:void 0};function ar(e,t){z.success(t?e("siteEditor.publish.publishedOn",{host:t}):e("siteEditor.publish.published"),{...Tt,id:we,description:void 0})}function cr(e,{headline:t,body:n,detail:o,retry:r,pending:s,tone:i="error"}){const a=Ot(e,o??null);z[i](t,{id:we,description:n&&a?V.jsxs(V.Fragment,{children:[V.jsx("p",{children:n}),a]}):n??a,action:r?{label:e("siteEditor.tryAgain"),onClick:c=>{c.preventDefault(),z.loading(s??e("thread.publishPopover.publishing"),{...Tt,id:we,description:void 0}),r()}}:void 0,duration:r?Number.POSITIVE_INFINITY:void 0})}function lr(e){return e instanceof Error?e.message||null:e==null?null:String(e)}export{Ho as $,Yt as A,zt as B,nt as C,Wt as D,lo as E,Te as F,ye as G,Go as H,Pn as I,sr as J,Ao as K,jo as L,jn as M,yn as N,at as O,Uo as P,Fo as Q,H as R,Ro as S,it as T,Yo as U,Wo as V,rr as W,Sn as X,oe as Y,Un as Z,En as _,$o as a,kn as a0,tr as a1,eo as a2,no as a3,Zn as a4,qo as a5,Mn as a6,Ne as a7,Jo as a8,nr as a9,ir as aa,Xo as ab,Lo as ac,Bo as ad,je as ae,Be as af,Qo as ag,Po as ah,An as ai,Mo as aj,Vo as ak,or as al,ne as am,we as an,Tt as ao,cr as ap,Ko as aq,er as ar,Xt as b,ht as c,Ot as d,xo as e,lr as f,ko as g,Eo as h,Gt as i,Yn as j,Ie as k,zo as l,Co as m,Io as n,Se as o,No as p,To as q,Do as r,_o as s,ar as t,ft as u,qt as v,ro as w,zn as x,Oo as y,Zo as z};
@@ -1 +0,0 @@
1
- import{c as A,l as _,j as y}from"./index-DcU2uHG-.js";import{T as N,R,a as T,b as k}from"./index-DKOhwHAG.js";function E(p){const e=A.c(34);let o,t,r,l,n,m,h,a;e[0]!==p?({className:o,defaultValue:t,value:a,min:m,max:h,onPointerDown:l,onKeyDown:r,...n}=p,e[0]=p,e[1]=o,e[2]=t,e[3]=r,e[4]=l,e[5]=n,e[6]=m,e[7]=h,e[8]=a):(o=e[1],t=e[2],r=e[3],l=e[4],n=e[5],m=e[6],h=e[7],a=e[8]);const i=m===void 0?0:m,s=h===void 0?100:h;let g;e[9]!==t||e[10]!==s||e[11]!==i||e[12]!==a?(g=Array.isArray(a)?a:Array.isArray(t)?t:[i,s],e[9]=t,e[10]=s,e[11]=i,e[12]=a,e[13]=g):g=e[13];const j=g;let c;e[14]!==o?(c=_("relative flex w-full touch-none items-center py-2 select-none data-[disabled]:opacity-50 data-[orientation=vertical]:px-2 data-[orientation=vertical]:py-0 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",o),e[14]=o,e[15]=c):c=e[15];let d;e[16]!==l?(d=v=>{v.currentTarget.dataset.pointer="",l?.(v)},e[16]=l,e[17]=d):d=e[17];let u;e[18]!==r?(u=v=>{delete v.currentTarget.dataset.pointer,r?.(v)},e[18]=r,e[19]=u):u=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=_("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1"),e[20]=b):b=e[20];let w;e[21]===Symbol.for("react.memo_cache_sentinel")?(w=y.jsx(N,{"data-slot":"slider-track",className:b,children:y.jsx(R,{"data-slot":"slider-range",className:_("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),e[21]=w):w=e[21];let f;e[22]!==j.length?(f=Array.from({length:j.length},z),e[22]=j.length,e[23]=f):f=e[23];let x;return e[24]!==t||e[25]!==s||e[26]!==i||e[27]!==n||e[28]!==c||e[29]!==d||e[30]!==u||e[31]!==f||e[32]!==a?(x=y.jsxs(T,{"data-slot":"slider",defaultValue:t,value:a,min:i,max:s,className:c,...n,onPointerDown:d,onKeyDown:u,children:[w,f]}),e[24]=t,e[25]=s,e[26]=i,e[27]=n,e[28]=c,e[29]=d,e[30]=u,e[31]=f,e[32]=a,e[33]=x):x=e[33],x}function z(p,e){return y.jsx(k,{"data-slot":"slider-thumb",className:"relative block size-4 shrink-0 cursor-grab rounded-full bg-white shadow-edge transition-transform duration-150 after:absolute after:-inset-3 after:rounded-full after:content-[''] hover:scale-110 focus-ring in-data-pointer:outline-none! active:scale-110 active:cursor-grabbing disabled:pointer-events-none motion-reduce:transition-none"},e)}export{E as S};
@@ -1 +0,0 @@
1
- import{c as l,a2 as n,j as r,K as f}from"./index-DcU2uHG-.js";import{C as d}from"./index-CXeJCI0G.js";import{m as u,P as x,T as h}from"./mock-board-BOSDq94-.js";import{F as j}from"./feature-gate-B9a4dBc0.js";import"./use-mobile-BfmJV4wy.js";import"./use-sidebar-collapsed-BqLmDXCH.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./thread-route-DsRsjMOv.js";import"./use-panel-navigate-K8ACrPML.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./thread-intent-DlbBEzNn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-c0hRUHIU.js";import"./AlertCircle-xI8XX-bi.js";import"./Tool01-BGL2Qt57.js";import"./ArrowUp-Cq3iZIwL.js";import"./ArrowLeft-BKYzlDQY.js";import"./LinkBroken01-ZRquEJUl.js";import"./ShoppingBag01-DAjyOiiw.js";import"./ZoomOut-B55seUHX.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./ChevronUp-CFN68hLk.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./UserSquare-DJngEPjS.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Plus-xabrshQG.js";import"./SearchMd-BODiv7c9.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./XClose-CdzjyNb0.js";import"./tooltip-BqHx2R4U.js";import"./index-WjQsIrkp.js";import"./toolbar-icon-button-CTGjpqPD.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./use-clock-tick-CbuQEbGd.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./integration-icon-aeIvRSnw.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./label-DDPD5LQh.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./use-debounced-value-CDunmz6Z.js";import"./use-organization-settings-DFkNTsS0.js";import"./required-auth-layout-n4GqwjUS.js";import"./autosend-BiXCzDoT.js";import"./use-org-sso-ClJ8vn5f.js";import"./sheet-R9Pr50Sb.js";import"./resizable-B1jyEV0m.js";import"./core.esm-DOdwJCI5.js";import"./sortable.esm-7lfZBBX2.js";import"./use-task-board-analytics-CftsNPjL.js";import"./combobox-DJtWtG8e.js";import"./popover-CVCbWisj.js";import"./usage-stats-DcyLnEOC.js";import"./tool-namespace-FeAXQzXg.js";import"./form-Bdh0vUeg.js";import"./utils-CVEq3hMx.js";import"./markdown-1PeXOKNt.js";import"./use-copy-K9rQ1PJH.js";import"./location-V0VwTJTt.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-TumByBkr.js";import"./chat-context-BnuwMOfj.js";import"./use-ai-providers-DugUJNG4.js";import"./suggestion-D_Z3LuMt.js";import"./column-rules-C6rmmvcZ.js";import"./badge-ByzdbptS.js";import"./icon-button-Dg2jSe-y.js";import"./switch-BQFbXMA-.js";import"./textarea-BDWvYouR.js";import"./use-org-fs-D82Vx4hB.js";import"./use-automations-Dhy5bAQi.js";import"./search-toggle-BqUvwbnO.js";import"./daily-pulse-A6lEoniM.js";import"./use-task-board-events-BDk-u9KA.js";import"./config-0dQr8OOs.js";import"./use-members-CzSQTDAS.js";import"./use-org-auth-client-fPRUht_a.js";import"./select-B47VUguS.js";import"./index-BdQq_4o_.js";import"./task-route-CeJ19bNy.js";import"./task-key-BCHdFiOO.js";import"./task-assignee-avatar-vyXzgPAK.js";import"./use-tags-Cn5U7HDa.js";import"./calendar-B3WUDV6V.js";import"./alert-J8Wo4iMe.js";import"./collapsible-BWjY8cOG.js";import"./index-ILRCn1qM.js";import"./editor-classes-CZOMDDcn.js";import"./index-6B342dVL.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-CNMGpOwt.js";import"./use-connection-Dj54skEw.js";import"./github-repo-scope-ByTYKy_L.js";import"./thread-sheet-body-BW8H1wdb.js";import"./useSuspenseInfiniteQuery-B0JY_wMj.js";import"./pair-Cn70Tm81.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DTPlWHGT.js";import"./types-Cj3BjtjJ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-mcp-prompts-JJb6q8dH.js";import"./use-thread-outputs-DLitie4Q.js";import"./file-type-icon-Ez8-DRHg.js";import"./use-infinite-scroll-7dT9x3fg.js";import"./task-status-CFz3dyVR.js";import"./use-open-billing-url-pmLoKOyH.js";import"./chat-draft-D3EwPWFD.js";import"./separator-tMi_6w_o.js";import"./feature-paywall-DINMFUUx.js";import"./plan-ladder-D5aCNSRy.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function Xo(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{Xo as default};
@@ -1 +0,0 @@
1
- import{r as u,j as t,I as O,l as E,B as C}from"./index-DcU2uHG-.js";import{P as H,a as P,b as _}from"./popover-CVCbWisj.js";import{S as G}from"./scroll-area-DowOzl5a.js";import{t as K}from"./ChevronUp-CFN68hLk.js";import{a6 as Y,aC as q}from"./agent-icon-c0hRUHIU.js";import{C as J}from"./calendar-B3WUDV6V.js";const B=/^now(?:-(\d+)([mhdwM]))?$/,W={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function z(e){const s=e.trim();if(s==="now")return{isNow:!0,offset:0,unit:null};const r=s.match(B);if(!r)return null;const l=r[1]?Number.parseInt(r[1],10):0,n=r[2]||null;return{isNow:!0,offset:l,unit:n}}function h(e,s=new Date){const r=e.trim(),l=new Date(r);if(!Number.isNaN(l.getTime())&&r.includes("-"))return{valid:!0,date:l};const n=z(r);if(!n)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const o=new Date(s);if(n.offset===0||!n.unit)return{valid:!0,date:o};switch(n.unit){case"m":o.setMinutes(o.getMinutes()-n.offset);break;case"h":o.setHours(o.getHours()-n.offset);break;case"d":o.setDate(o.getDate()-n.offset);break;case"w":o.setDate(o.getDate()-n.offset*7);break;case"M":o.setMonth(o.getMonth()-n.offset);break}return{valid:!0,date:o}}function Z(e){return e.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Q(e){const s=e.trim();return B.test(s)}function V(e){const s=e.trim();if(s==="now")return"Now";const r=z(s);if(!r||!r.unit){const o=h(s);return o.valid&&o.date?Z(o.date):s}const l=W[r.unit],n=r.offset!==1?"s":"";return`${r.offset} ${l}${n} ago`}const U=[{label:"Last 5 minutes",from:"now-5m",to:"now",value:"5m"},{label:"Last 15 minutes",from:"now-15m",to:"now",value:"15m"},{label:"Last 30 minutes",from:"now-30m",to:"now",value:"30m"},{label:"Last 1 hour",from:"now-1h",to:"now",value:"1h"},{label:"Last 3 hours",from:"now-3h",to:"now",value:"3h"},{label:"Last 6 hours",from:"now-6h",to:"now",value:"6h"},{label:"Last 12 hours",from:"now-12h",to:"now",value:"12h"},{label:"Last 24 hours",from:"now-24h",to:"now",value:"24h"},{label:"Last 2 days",from:"now-2d",to:"now",value:"2d"},{label:"Last 7 days",from:"now-7d",to:"now",value:"7d"},{label:"Last 30 days",from:"now-30d",to:"now",value:"30d"}];function ee(e,s,r=U){const l=r.find(n=>n.from===e&&n.to===s);return l?l.label:`${V(e)} to ${V(s)}`}function T(e){const s=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),l=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),p=String(e.getSeconds()).padStart(2,"0");return`${s}-${r}-${l} ${n}:${o}:${p}`}function te(e){const s=e.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!s)return null;const[,r,l,n,o,p,g]=s,x=new Date(Number(r),Number(l)-1,Number(n),Number(o),Number(p),Number(g));return Number.isNaN(x.getTime())?null:x}function $(e){if(Q(e))return e;const s=h(e);return s.valid&&s.date?T(s.date):e}function A({value:e,onChange:s,placeholder:r="now or now-2d",className:l,disabled:n,error:o}){const[p,g]=u.useState(!1),[x,m]=u.useState(()=>$(e)),[L,c]=u.useState(),[D,w]=u.useState(!1),b=u.useRef(e);b.current!==e&&(b.current=e,D||m($(e)));const y=i=>{const d=i.target.value;m(d),c(void 0)},R=()=>{w(!0)},N=()=>{w(!1);const i=x.trim();if(Q(i)){c(void 0),s(i);return}const d=te(i);if(d){c(void 0),s(d.toISOString()),m(T(d));return}const f=h(i);if(f.valid&&f.date){c(void 0),s(i),m(T(f.date));return}m($(e)),c(void 0)},v=i=>{if(i){const f=h(e).date||new Date;i.setHours(f.getHours()),i.setMinutes(f.getMinutes()),i.setSeconds(0),i.setMilliseconds(0);const F=i.toISOString();m(T(i)),s(F),c(void 0)}g(!1)},M=i=>{const[d,f]=i.target.value.split(":").map(Number),j=h(e).date||new Date;j.setHours(d||0),j.setMinutes(f||0),j.setSeconds(0),j.setMilliseconds(0);const X=j.toISOString();m(T(j)),s(X)},I=h(e),S=I.valid?I.date:new Date,k=S?`${String(S.getHours()).padStart(2,"0")}:${String(S.getMinutes()).padStart(2,"0")}`:"",a=o||L;return t.jsxs("div",{className:E("flex gap-1",l),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(O,{value:x,onChange:y,onFocus:R,onBlur:N,placeholder:r,disabled:n,className:E("text-sm h-8",a&&"border-destructive focus-visible:ring-destructive")}),a&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:a})]}),t.jsxs(H,{open:p,onOpenChange:g,children:[t.jsx(P,{asChild:!0,children:t.jsx(C,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:n,children:t.jsx(Y,{className:"h-4 w-4"})})}),t.jsxs(_,{className:"w-auto p-0",align:"end",children:[t.jsx(J,{mode:"single",selected:S||void 0,onSelect:v,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(O,{type:"time",value:k,onChange:M,className:"text-sm h-8"})]})]})]})]})}function le({value:e,onChange:s,className:r,disabled:l,quickRanges:n=U,labels:o}){const p=o?.absoluteTimeRange??"Absolute time range",g=o?.from??"From",x=o?.to??"To",m=o?.applyTimeRange??"Apply time range",[L,c]=u.useState(!1),[D,w]=u.useState(e.from),[b,y]=u.useState(e.to),[R,N]=u.useState(null),v=u.useRef({from:e.from,to:e.to});(v.current.from!==e.from||v.current.to!==e.to)&&(v.current={from:e.from,to:e.to},w(e.from),y(e.to));const M=a=>{v.current={from:a.from,to:a.to},w(a.from),y(a.to),c(!1),s({from:a.from,to:a.to})},I=()=>{const a=h(D),i=h(b);if(!a.valid||!a.date){N("Invalid 'From' date");return}if(!i.valid||!i.date){N("Invalid 'To' date");return}if(a.date>=i.date){N("'From' must be before 'To'");return}N(null),s({from:D,to:b}),c(!1)},S=a=>e.from===a.from&&e.to===a.to,k=ee(e.from,e.to,n);return t.jsxs(H,{open:L,onOpenChange:c,children:[t.jsx(P,{asChild:!0,children:t.jsxs(C,{variant:"outline",className:E("gap-1.5 min-w-[160px] justify-between",r),disabled:l,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(q,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:k})]}),t.jsx(K,{className:"size-4 text-muted-foreground"})]})}),t.jsx(_,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:a=>a.preventDefault(),style:L?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:g}),t.jsx(A,{value:D,onChange:w,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:x}),t.jsx(A,{value:b,onChange:y,placeholder:"now"})]}),R&&t.jsx("p",{className:"text-xs text-destructive",children:R}),t.jsx(C,{onClick:I,className:"w-full",size:"sm",children:m})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(G,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:n.map(a=>{const i=S(a);return t.jsx("button",{type:"button",onClick:()=>M(a),className:E("w-full text-left px-3 py-2 text-sm rounded-lg transition-colors","hover:bg-accent hover:text-accent-foreground",i&&"bg-accent text-accent-foreground font-medium"),children:a.label},a.value)})})})})]})})]})}export{le as T,h as e};
@@ -1 +0,0 @@
1
- import{r as C,bB as w,j as i,bG as P,bH as O,e2 as v,eu as B,bA as H,ev as U,ew as R,bT as q,aU as K,c as y,l as I}from"./index-DcU2uHG-.js";import{A as L,t as J}from"./active-indicator-CCMhAsc_.js";import{T as Q,a as W,c as X}from"./tooltip-BqHx2R4U.js";var A="Toggle",N=C.forwardRef((o,e)=>{const{pressed:t,defaultPressed:n,onPressedChange:s,...r}=o,[a,l]=w({prop:t,onChange:s,defaultProp:n??!1,caller:A});return i.jsx(P.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":o.disabled?"":void 0,...r,ref:e,onClick:O(o.onClick,()=>{o.disabled||l(!a)})})});N.displayName=A;var m="ToggleGroup",[E]=q(m,[R]),V=R(),z=v.forwardRef((o,e)=>{const{type:t,...n}=o;if(t==="single"){const s=n;return i.jsx(Y,{...s,ref:e})}if(t==="multiple"){const s=n;return i.jsx(Z,{...s,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${m}\``)});z.displayName=m;var[S,M]=E(m),Y=v.forwardRef((o,e)=>{const{value:t,defaultValue:n,onValueChange:s=()=>{},...r}=o,[a,l]=w({prop:t,defaultProp:n??"",onChange:s,caller:m});return i.jsx(S,{scope:o.__scopeToggleGroup,type:"single",value:v.useMemo(()=>a?[a]:[],[a]),onItemActivate:l,onItemDeactivate:v.useCallback(()=>l(""),[l]),children:i.jsx($,{...r,ref:e})})}),Z=v.forwardRef((o,e)=>{const{value:t,defaultValue:n,onValueChange:s=()=>{},...r}=o,[a,l]=w({prop:t,defaultProp:n??[],onChange:s,caller:m}),d=v.useCallback(g=>l((u=[])=>[...u,g]),[l]),c=v.useCallback(g=>l((u=[])=>u.filter(p=>p!==g)),[l]);return i.jsx(S,{scope:o.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:d,onItemDeactivate:c,children:i.jsx($,{...r,ref:e})})});z.displayName=m;var[ee,te]=E(m),$=v.forwardRef((o,e)=>{const{__scopeToggleGroup:t,disabled:n=!1,rovingFocus:s=!0,orientation:r,dir:a,loop:l=!0,...d}=o,c=V(t),g=H(a),u={role:"group",dir:g,...d};return i.jsx(ee,{scope:t,rovingFocus:s,disabled:n,children:s?i.jsx(U,{asChild:!0,...c,orientation:r,dir:g,loop:l,children:i.jsx(P.div,{...u,ref:e})}):i.jsx(P.div,{...u,ref:e})})}),j="ToggleGroupItem",D=v.forwardRef((o,e)=>{const t=M(j,o.__scopeToggleGroup),n=te(j,o.__scopeToggleGroup),s=V(o.__scopeToggleGroup),r=t.value.includes(o.value),a=n.disabled||o.disabled,l={...o,pressed:r,disabled:a},d=v.useRef(null);return n.rovingFocus?i.jsx(B,{asChild:!0,...s,focusable:!a,active:r,ref:d,children:i.jsx(k,{...l,ref:e})}):i.jsx(k,{...l,ref:e})});D.displayName=j;var k=v.forwardRef((o,e)=>{const{__scopeToggleGroup:t,value:n,...s}=o,r=M(j,t),a={role:"radio","aria-checked":o.pressed,"aria-pressed":void 0},l=r.type==="single"?a:void 0;return i.jsx(N,{...l,...s,ref:e,onPressedChange:d=>{d?r.onItemActivate(n):r.onItemDeactivate(n)}})}),ae=z,oe=D;const ne=K("inline-flex items-center justify-center gap-2 rounded-full text-sm font-medium hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-muted data-[state=on]:hover:bg-secondary-hover data-[state=on]:text-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-ring outline-none transition-[color,background-color,box-shadow] whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"bg-card shadow-edge hover:bg-accent hover:text-accent-foreground",segmented:"text-muted-foreground hover:bg-transparent hover:text-foreground data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-[0_1px_2px_0_#0000000d] dark:data-[state=on]:bg-accent"},size:{default:"h-8 px-3 min-w-8",sm:"h-7 px-2.5 min-w-7",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),F=C.createContext({size:"default",variant:"default"}),re=J(':scope > [data-slot="toggle-group-item"][data-state="on"]');function ue(o){const e=y.c(24);let t,n,s,r,a;e[0]!==o?({className:n,variant:a,size:r,children:t,...s}=o,e[0]=o,e[1]=t,e[2]=n,e[3]=s,e[4]=r,e[5]=a):(t=e[1],n=e[2],s=e[3],r=e[4],a=e[5]);const l=a==="segmented"&&s.type==="single",d=l||void 0;let c;e[6]!==n?(c=I("group/toggle-group relative flex w-fit items-center rounded-full data-[variant=segmented]:bg-muted data-[variant=segmented]:gap-0.5 data-[variant=segmented]:p-0.5 data-[variant=outline]:after:pointer-events-none data-[variant=outline]:after:absolute data-[variant=outline]:after:inset-0 data-[variant=outline]:after:rounded-full data-[variant=outline]:after:shadow-edge data-[variant=outline]:bg-card data-[variant=outline]:after:content-['']",n),e[6]=n,e[7]=c):c=e[7];let g;e[8]!==l?(g=l&&i.jsx("span",{"aria-hidden":!0,ref:re,"data-slot":"toggle-group-indicator",className:I(L,"bg-background dark:bg-accent top-0.5 bottom-0.5 rounded-full shadow-[0_1px_2px_0_#0000000d] opacity-0 in-data-has-active:opacity-100")}),e[8]=l,e[9]=g):g=e[9];let u;e[10]!==r||e[11]!==a?(u={variant:a,size:r},e[10]=r,e[11]=a,e[12]=u):u=e[12];let p;e[13]!==t||e[14]!==u?(p=i.jsx(F.Provider,{value:u,children:t}),e[13]=t,e[14]=u,e[15]=p):p=e[15];let f;return e[16]!==s||e[17]!==r||e[18]!==d||e[19]!==c||e[20]!==g||e[21]!==p||e[22]!==a?(f=i.jsxs(ae,{"data-slot":"toggle-group","data-variant":a,"data-size":r,"data-sliding":d,className:c,...s,children:[g,p]}),e[16]=s,e[17]=r,e[18]=d,e[19]=c,e[20]=g,e[21]=p,e[22]=a,e[23]=f):f=e[23],f}function se(o){const e=y.c(4);let t;if(e[0]!==o){const{"data-state":s,...r}=o;t=r,e[0]=o,e[1]=t}else t=e[1];let n;return e[2]!==t?(n=i.jsx(oe,{...t}),e[2]=t,e[3]=n):n=e[3],n}function ce(o){const e=y.c(30);let t,n,s,r,a,l;e[0]!==o?({className:n,children:t,variant:l,size:r,tooltip:a,...s}=o,e[0]=o,e[1]=t,e[2]=n,e[3]=s,e[4]=r,e[5]=a,e[6]=l):(t=e[1],n=e[2],s=e[3],r=e[4],a=e[5],l=e[6]);const d=C.useContext(F);let c;e[7]!==t?(c=C.isValidElement(t),e[7]=t,e[8]=c):c=e[8];const g=c,u=d.variant||l,p=d.size||r,f=g||void 0;let x;e[9]!==n||e[10]!==d.size||e[11]!==d.variant||e[12]!==r||e[13]!==l?(x=I(ne({variant:d.variant||l,size:d.size||r}),"relative z-10 min-w-0 flex-1 shrink-0 rounded-none first:rounded-l-full last:rounded-r-full focus:z-10 focus-visible:z-10 data-[icon-only]:aspect-square data-[icon-only]:px-0","data-[variant=segmented]:flex-none data-[variant=segmented]:rounded-full in-data-sliding:data-[state=on]:bg-transparent in-data-sliding:data-[state=on]:shadow-none","data-[variant=outline]:shadow-none data-[variant=outline]:border-hairline data-[variant=outline]:not-first:border-l",n),e[9]=n,e[10]=d.size,e[11]=d.variant,e[12]=r,e[13]=l,e[14]=x):x=e[14];let T;e[15]!==t||e[16]!==s||e[17]!==u||e[18]!==p||e[19]!==f||e[20]!==x||e[21]!==a?(T=i.jsx(se,{"data-slot":"toggle-group-item","data-variant":u,"data-size":p,"data-icon-only":f,"aria-label":a,className:x,...s,children:t}),e[15]=t,e[16]=s,e[17]=u,e[18]=p,e[19]=f,e[20]=x,e[21]=a,e[22]=T):T=e[22];const G=T;if(!a)return G;let h;e[23]!==G?(h=i.jsx(Q,{asChild:!0,children:G}),e[23]=G,e[24]=h):h=e[24];let b;e[25]!==a?(b=i.jsx(W,{children:a}),e[25]=a,e[26]=b):b=e[26];let _;return e[27]!==h||e[28]!==b?(_=i.jsxs(X,{children:[h,b]}),e[27]=h,e[28]=b,e[29]=_):_=e[29],_}export{ce as T,ue as a};
@@ -1 +0,0 @@
1
- import{u as l,aU as I,aV as p,aW as u}from"./CategoricalChart-DkwWvFDx.js";var d=a=>null;d.displayName="Cell";var h=(a,e,i)=>{var v=l();return(t,c)=>s=>{a?.(t,c,s),v(I({activeIndex:String(c),activeDataKey:e,activeCoordinate:t.tooltipPosition,activeGraphicalItemId:i}))}},n=a=>{var e=l();return(i,v)=>t=>{a?.(i,v,t),e(p())}},m=(a,e,i)=>{var v=l();return(t,c)=>s=>{a?.(t,c,s),v(u({activeIndex:String(c),activeDataKey:e,activeCoordinate:t.tooltipPosition,activeGraphicalItemId:i}))}};export{d as C,n as a,m as b,h as u};
@@ -1 +0,0 @@
1
- import{c as i,o as y}from"./index-DcU2uHG-.js";import{u as f,w as m}from"./site-editor-toast-L4A-Cxh7.js";function K(l){const e=i.c(11),r=y(),{orgSlug:n,virtualMcpId:c,branch:t}=l,u=f(c,t);let o;e[0]!==t||e[1]!==n||e[2]!==c?(o=t?{orgSlug:n,virtualMcpId:c,branch:t}:null,e[0]=t,e[1]=n,e[2]=c,e[3]=o):o=e[3];const a=m(o)||null;let s;return e[4]!==u||e[5]!==t||e[6]!==n||e[7]!==r||e[8]!==a||e[9]!==c?(s={queryClient:r,orgSlug:n,virtualMcpId:c,branch:t,backend:u,cacheKey:a},e[4]=u,e[5]=t,e[6]=n,e[7]=r,e[8]=a,e[9]=c,e[10]=s):s=e[10],s}export{K as u};
@@ -1 +0,0 @@
1
- import{c as g}from"./index-DcU2uHG-.js";import{f}from"./repository-binding-B-JblZ3B.js";import{u as p}from"./use-navigate-to-agent-D05JNc-L.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=f(),o=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==o?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&o(l.id,{panel:"settings"}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=s):s=e[5];const r=s;let a;return e[6]!==t.create.isPending||e[7]!==r?(a={createVirtualMCP:r,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=r,e[8]=a):a=e[8],a}export{A as u};
@@ -1 +0,0 @@
1
- import{c as s}from"./index-DcU2uHG-.js";import{w as v,c as d}from"./section-preview-url-7zfngvgW.js";import{u as h,ak as w,al as P}from"./site-editor-toast-L4A-Cxh7.js";import{a as b}from"./input-pg_Munw1.js";function g(e){const t=s.c(3),i=b(e?.virtualMcpId).runtime==="cms",r=h(e?.virtualMcpId,e?.branch),n=r.kind==="protocol"&&r.source==="github",o=w(e),u=P(n?e:null);if(!e||!i)return null;if(n)return u;let l;return t[0]!==o||t[1]!==e?(l=o?d({...e,...o}):null,t[0]=o,t[1]=e,t[2]=l):l=t[2],l}function I(e){const t=s.c(11);let i;t[0]!==e?(i=e?{orgSlug:e.orgSlug,virtualMcpId:e.virtualMcpId,branch:e.branch}:null,t[0]=e,t[1]=i):i=t[1];const r=g(i),n=e?.previewServerUrl??null;let o=null;if(n)try{let f;t[2]!==n?(f=new URL(n),t[2]=n,t[3]=f):f=t[3],o=f.host}catch{o=null}let u;t[4]!==r||t[5]!==e||t[6]!==n?(u=e&&n&&r?v(new URL(e.path,n).toString(),r):null,t[4]=r,t[5]=e,t[6]=n,t[7]=u):u=t[7];const l=u;let c;return t[8]!==o||t[9]!==l?(c={url:l,host:o},t[8]=o,t[9]=l,t[10]=c):c=t[10],c}export{g as a,I as u};
@@ -1 +0,0 @@
1
- import{c as Ue,b as He,u as Le,a2 as Oe,fi as Be,fj as Ke,fk as le,fl as de,al as $e,aj as me,fm as Qe,fn as We,r as Y,dV as _e,M as pe,fo as qe,fp as ze}from"./index-DcU2uHG-.js";import{a as Ge}from"./use-chat-layout-state-CqPKeLYn.js";import{b as Je}from"./agent-icon-c0hRUHIU.js";import{i as Xe}from"./Monitor01-DMME8GIo.js";import{u as Ye}from"./use-connection-Dj54skEw.js";import{a as Ze}from"./use-mcp-client-ZokR8_74.js";import{u as et}from"./use-mcp-tools-BwuN38Gh.js";import{a as tt}from"./repository-binding-B-JblZ3B.js";import{g as at}from"./types-Cj3BjtjJ.js";import{t as ot}from"./utils-CVEq3hMx.js";import{u as nt,a as F}from"./use-main-schema-v8-Dcb6Yskn.js";import{u as st}from"./index-_y92DzgS.js";import{F as ue}from"./file-type-icon-Ez8-DRHg.js";import{a as it,u as ct}from"./use-panel-navigate-K8ACrPML.js";import{r as Z}from"./resolve-tab-icon-DtNff2Yq.js";import{u as rt}from"./use-task-metadata-0ueqwOxI.js";import{r as lt}from"./preview-source-BsRLGWUP.js";import{i as dt,r as mt,s as pt}from"./shell-layout-DNfiem0_.js";import{a as ut}from"./input-pg_Munw1.js";import{u as ft}from"./use-organization-settings-DFkNTsS0.js";import{u as bt}from"./use-project-scope-CGMALc0e.js";import{b as Tt,u as It,c as vt,d as Pt,f as kt}from"./use-project-native-view-presence-DJiBua9F.js";import{c as yt}from"./chat-context-BnuwMOfj.js";import{r as wt}from"./virtual-mcp-CeCtCq_o.js";function Xt(o){const e=Ue.c(35),d=He(),{openPanel:f,closePanel:x}=it();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={strict:!1},e[0]=b):b=e[0];const fe=Le(b),ee=ct(),te=Ge(),i=tt(o.virtualMcpId),T=rt(o.taskId),{org:n}=Oe(),{currentBranch:be,activeTask:I}=yt(),m=i?.metadata.ui?.layout??null,c=m?.tabs??[],r=i?.id?Be(i.id):null,v=T?.expanded_tools??[],P=ft(),{scopeId:Te,project:Ie}=bt(),k=Tt(Te,Ie,i),y=It(k.project);nt(k.project?.id);const ae=vt(k.resolvedScopeId,F(k.project?.metadata),y.presence);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={includeVirtual:!0},e[1]=w):w=e[1];const p=Ye(w),ve=st(),E=I?.branch??be;let g;e[2]!==I?.metadata||e[3]!==o.taskId||e[4]!==i?.metadata||e[5]!==T||e[6]!==E?(g=lt({threadId:o.taskId,sandboxBranch:E,agentHasRepo:F(i?.metadata),threadHasRepo:F(T)||F(I?.metadata)}),e[2]=I?.metadata,e[3]=o.taskId,e[4]=i?.metadata,e[5]=T,e[6]=E,e[7]=g):g=e[7];const Pe=g,U=ve.lifecycle.phase==="running",{runtime:ke,resolved:oe}=ut(o.virtualMcpId),H=!!r&&U;let h;e[8]!==H?(h={enabled:H},e[8]=H,e[9]=h):h=e[9];const ne=Ze({connectionId:r,orgId:n.id,orgSlug:n.slug},h),L=ne,O=!!ne&&U;let V;e[10]!==L||e[11]!==O?(V={client:L,enabled:O},e[10]=L,e[11]=O,e[12]=V):V=e[12];const{data:ye}=et(V),se=r&&U?(ye?.tools??[]).filter(Mt).map(t=>({connectionId:r,toolName:t.name,label:ot(t.name),icon:null})):[],B=se[0],we=B?se:[],u=B&&r?{type:"ext-apps",id:r,toolName:B.toolName}:m?.defaultMainView??null,ge=wt(m),ie={assets:y.assetsPending,siteAccess:y.siteAccessPending,releases:y.releasesPending},{activeTab:M,mainOpen:l}=Ke({panelTabId:ee,mainPanelParam:fe.mainpanel,routeDefaultMain:te,metadata:u||m?{defaultMainView:u,tabs:c.map(Vt)}:null}),he=u||m?{defaultMainView:u,tabs:c.map(ht)}:null,C=mt({hasSource:Pe==="repo"||P,runtime:ke,cmsMode:ge}),Ve=C.includes("content"),Me=le(he),Ce=u?.type,ce=Pt(Ce,ae,ie,C,oe),K=ce?le(null):Me,Se=kt(M,ae,ie),je=!C.includes("code")&&oe&&de(M)!==null,a=!ee&&!te&&ce||M==="content"&&!Ve||je||Se?K:M,$=$e(a);let S;e[13]!==d?(S=t=>d(t==="site-editor"?"common.mainPanelTabs.preview":t==="content"?"common.mainPanelTabs.content":"common.mainPanelTabs.code"),e[13]=d,e[14]=S):S=e[14];const Ne=S,Q=new Map;for(const t of v){const s=me(t.appId,t.toolName);Q.set(s,{id:s,title:t.toolName,appId:t.appId,iconKey:t.toolName})}for(const t of we){if(t.toolName==="fetch_assets")continue;const s=me(t.connectionId,t.toolName);Q.set(s,{id:s,title:t.label||t.toolName,appId:t.connectionId,iconKey:t.toolName,iconUrl:t.icon??null})}const W=Qe(a),_=W?W.key.split("/").pop()??W.key:null,Ae=_?[{id:a,title:_,kind:"file",icon:{kind:"component",Component:t=>Y.createElement(ue,{filename:_,...t})}}]:[],j=We(a),De=j?[{id:a,title:(j.path.split("/").pop()??j.path).replace(/\.html$/i,""),kind:"file",icon:{kind:"component",Component:t=>Y.createElement(j.path.startsWith("pages/")?Je:Xe,t)}}]:[],q=_e(a),z=q?q.path.split("/").pop()??q.path:null,Re=z?[{id:a,title:z,kind:"file",icon:{kind:"component",Component:t=>Y.createElement(ue,{filename:z,...t})}}]:[],Fe=dt(a)?C.map(t=>({id:t==="code"&&de(a)?a:t,title:Ne(t),kind:"system",icon:Z({tabId:t,kind:"system",connections:p})})):[];let N;e[15]!==p?(N=t=>({id:qe(t.id),title:t.title,kind:"agent",icon:Z({tabId:t.id,kind:"agent",appId:t.view.appId,connections:p})}),e[15]=p,e[16]=N):N=e[16];const xe=[...Fe,...Ae,...De,...Re,...c.map(N),...Array.from(Q.values()).map(t=>({id:t.id,title:t.title,kind:"expanded",icon:Z({tabId:t.iconKey,kind:"expanded",appId:t.appId,iconUrl:t.iconUrl,connections:p})}))],re=new Set,G=xe.filter(t=>re.has(t.id)?!1:(re.add(t.id),!0)),Ee=o.virtualMcpId;let A;e[17]!==n.id?(A=pe(n.id),e[17]=n.id,e[18]=A):A=e[18];const J=Ee===A;let D;e[19]!==a||e[20]!==x||e[21]!==l||e[22]!==J||e[23]!==f||e[24]!==n.id||e[25]!==P?(D=t=>{if(pt({reportsOnly:P,onReportAgent:J,tabId:t})){f(t,{virtualmcpid:pe(n.id),search:gt});return}const s=ze({clickedId:t,activeTab:a,mainOpen:l});"close"in s?x():f(s.tabId)},e[19]=a,e[20]=x,e[21]=l,e[22]=J,e[23]=f,e[24]=n.id,e[25]=P,e[26]=D):D=e[26];const X=D;let R;return e[27]!==a||e[28]!==$||e[29]!==v||e[30]!==c||e[31]!==l||e[32]!==X||e[33]!==G?(R={activeTab:a,mainOpen:l,setActiveTab:X,layoutTabs:c,expandedTools:v,automationTabParsed:$,tabs:G},e[27]=a,e[28]=$,e[29]=v,e[30]=c,e[31]=l,e[32]=X,e[33]=G,e[34]=R):R=e[34],R}function gt(o){return{...o,thread:void 0}}function ht(o){return{id:o.id}}function Vt(o){return{id:o.id}}function Mt(o){return!!at(o._meta)}export{Xt as u};
@@ -1 +0,0 @@
1
- import{a2 as d,o as f,m as h,e0 as p,K as y,c as S}from"./index-DcU2uHG-.js";import{o as u,l as _,H as I}from"./thread-intent-DlbBEzNn.js";import{e as l,a as m}from"./repository-binding-B-JblZ3B.js";function E(e){if(typeof e!="object"||e===null)return!1;const r=e.repository?.url;return typeof r=="string"&&r.length>0}function j(e){return l(e).status==="attached"}function P(e){const t=l(e).status;return t==="attached"||t==="detached"}const V=5e3,g="main",C={"404 no_repository":!1,"403 feature_not_in_plan":!1,"409 site_not_owned":!0,[`503 ${I}`]:!0};async function T(e,t,r=(s,n)=>fetch(s,n)){const s=await r(`/api/${e}/decofile/${encodeURIComponent(t)}/${g}/rpc`,{method:"POST",cache:"no-store",headers:{"content-type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"schema.get"})}),n=await s.json().catch(()=>null);if(!s.ok){const o=C[`${s.status} ${n?.code}`];if(o!==void 0)return{isV8:o,schema:null,version:null};throw new Error(`main's schema: HTTP ${s.status}`)}if(!n?.result||!("schema"in n.result))throw new Error("main's schema: unexpected answer");const{schema:a,version:c}=n.result;return{isV8:_(a),schema:a??null,version:typeof c=="string"?c:null}}function N(e){return!e.hasProject||!e.asks?"v7":e.data!==void 0?e.data?"v8":"v7":e.isError?e.marked?"error":"v7":"loading"}function H(e){const{org:t}=d(),r=f(),s=m(e),n=s?.id??"",a=u(s?.metadata),c=!!t.id&&!!t.slug&&!!n&&E(s?.metadata),o=h({queryKey:y.mainSchemaV8(t.slug,n),queryFn:async()=>{const i=await T(t.slug,n);return i.isV8!==a&&p(r,t.id,"VIRTUAL_MCP"),i},enabled:c,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY,retry:2,refetchInterval:v});return N({asks:c,hasProject:!!s,data:o.data?.isV8,isError:o.isError||o.errorUpdateCount>0,marked:a})}function v(e){return e.state.status==="error"?V:!1}function M(e){const t=S.c(2),r=m(e)?.metadata;let s;return t[0]!==r?(s=u(r),t[0]=r,t[1]=s):s=t[1],s}export{E as a,P as b,M as c,j as d,H as u};
@@ -1,10 +0,0 @@
1
- import{ce,cf as le,cg as ue,ch as de,ci as he,cj as m,ck as g,cl as fe,cm as pe,cn as me,co as M,cp as _e,cq as F,cr as we,cs as q,ct as ge,cu as D,cv as Te,cw as ye,cx as ke,cy as z,cz as ve,cA as Se,cB as Ce,cC as ee,cD as be,cE as Re,cF as Ie,bl as Ee,cG as qe,cH as Pe,cI as A,cJ as $e,cK as Me,cL as Ae,cM as He,cN as Oe,cO as xe,cP as Ue,cQ as Ne,cR as je,cS as Fe,cT as De,cU as Le,cV as Ve,bc as V,cW as Qe,cX as U,K as te,J as ze,c as se,R as Je,m as We}from"./index-DcU2uHG-.js";import{U as P,b as H,c as J}from"./auth-CJCUdDnK.js";function x(a){return!!a._zod}function b(a,e){return x(a)?ce(a,e):a.safeParse(e)}function re(a){if(!a)return;let e;if(x(a)?e=a._zod?.def?.shape:e=a.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Ke(a){if(x(a)){const o=a._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}const t=a._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const s=a.value;if(s!==void 0)return s}function R(a){return a==="completed"||a==="failed"||a==="cancelled"}function W(a){const t=re(a)?.method;if(!t)throw new Error("Schema is missing a method literal");const s=Ke(t);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function K(a,e){const t=b(a,e);if(!t.success)throw t.error;return t.data}const Ge=6e4;class Be{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(le,t=>{this._oncancel(t)}),this.setNotificationHandler(ue,t=>{this._onprogress(t)}),this.setRequestHandler(de,t=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(he,async(t,s)=>{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new m(g.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(fe,async(t,s)=>{const r=async()=>{const o=t.params.taskId;if(this._taskMessageQueue){let i;for(;i=await this._taskMessageQueue.dequeue(o,s.sessionId);){if(i.type==="response"||i.type==="error"){const u=i.message,p=u.id,l=this._requestResolvers.get(p);if(l)if(this._requestResolvers.delete(p),i.type==="response")l(u);else{const h=u,f=new m(h.error.code,h.error.message,h.error.data);l(f)}else{const h=i.type==="response"?"Response":"Error";this._onerror(new Error(`${h} handler missing for request ${p}`))}continue}await this._transport?.send(i.message,{relatedRequestId:s.requestId})}}const n=await this._taskStore.getTask(o,s.sessionId);if(!n)throw new m(g.InvalidParams,`Task not found: ${o}`);if(!R(n.status))return await this._waitForTaskUpdate(o,s.signal),await r();if(R(n.status)){const i=await this._taskStore.getTaskResult(o,s.sessionId);return this._clearTaskQueue(o),{...i,_meta:{...i._meta,[q]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(pe,async(t,s)=>{try{const{tasks:r,nextCursor:o}=await this._taskStore.listTasks(t.params?.cursor,s.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new m(g.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(me,async(t,s)=>{try{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new m(g.InvalidParams,`Task not found: ${t.params.taskId}`);if(R(r.status))throw new m(g.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",s.sessionId),this._clearTaskQueue(t.params.taskId);const o=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!o)throw new m(g.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof m?r:new m(g.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,s,r,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:s,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const s=Date.now()-t.startTime;if(t.maxTotalTimeout&&s>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),m.fromError(g.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:s});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const s=this.transport?.onerror;this._transport.onerror=o=>{s?.(o),this._onerror(o)};const r=this._transport?.onmessage;this._transport.onmessage=(o,n)=>{r?.(o,n),M(o)||_e(o)?this._onresponse(o):F(o)?this._onrequest(o,n):we(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const s of this._timeoutInfo.values())clearTimeout(s.timeoutId);this._timeoutInfo.clear();for(const s of this._requestHandlerAbortControllers.values())s.abort();this._requestHandlerAbortControllers.clear();const t=m.fromError(g.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const s of e.values())s(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,t){const s=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,o=e.params?._meta?.[q]?.taskId;if(s===void 0){const l={jsonrpc:"2.0",id:e.id,error:{code:g.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:l,timestamp:Date.now()},r?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):r?.send(l).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const i=ge(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,p={signal:n.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(n.signal.aborted)return;const h={relatedRequestId:e.id};o&&(h.relatedTask={taskId:o}),await this.notification(l,h)},sendRequest:async(l,h,f)=>{if(n.signal.aborted)throw new m(g.ConnectionClosed,"Request was cancelled");const w={...f,relatedRequestId:e.id};o&&!w.relatedTask&&(w.relatedTask={taskId:o});const y=w.relatedTask?.taskId??o;return y&&u&&await u.updateTaskStatus(y,"input_required"),await this.request(l,h,w)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:o,taskStore:u,taskRequestedTtl:i?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{i&&this.assertTaskHandlerCapability(e.method)}).then(()=>s(e,p)).then(async l=>{if(n.signal.aborted)return;const h={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)},async l=>{if(n.signal.aborted)return;const h={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:g.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===n&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...s}=e.params,r=Number(t),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const n=this._responseHandlers.get(r),i=this._timeoutInfo.get(r);if(i&&n&&i.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(u){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),n(u);return}o(s)}_onresponse(e){const t=Number(e.id),s=this._requestResolvers.get(t);if(s){if(this._requestResolvers.delete(t),M(e))s(e);else{const n=new m(e.error.code,e.error.message,e.error.data);s(n)}return}const r=this._responseHandlers.get(t);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let o=!1;if(M(e)&&e.result&&typeof e.result=="object"){const n=e.result;if(n.task&&typeof n.task=="object"){const i=n.task;typeof i.taskId=="string"&&(o=!0,this._taskProgressTokens.set(i.taskId,t))}}if(o||this._progressHandlers.delete(t),M(e))r(e);else{const n=m.fromError(e.error.code,e.error.message,e.error.data);r(n)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,s){const{task:r}=s??{};if(!r){try{yield{type:"result",result:await this.request(e,t,s)}}catch(n){yield{type:"error",error:n instanceof m?n:new m(g.InternalError,String(n))}}return}let o;try{const n=await this.request(e,D,s);if(n.task)o=n.task.taskId,yield{type:"taskCreated",task:n.task};else throw new m(g.InternalError,"Task creation did not return a task");for(;;){const i=await this.getTask({taskId:o},s);if(yield{type:"taskStatus",task:i},R(i.status)){i.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)}:i.status==="failed"?yield{type:"error",error:new m(g.InternalError,`Task ${o} failed`)}:i.status==="cancelled"&&(yield{type:"error",error:new m(g.InternalError,`Task ${o} was cancelled`)});return}if(i.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)};return}const u=i.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(p=>setTimeout(p,u)),s?.signal?.throwIfAborted()}}catch(n){yield{type:"error",error:n instanceof m?n:new m(g.InternalError,String(n))}}}request(e,t,s){const{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n,task:i,relatedTask:u}=s??{};return new Promise((p,l)=>{const h=c=>{l(c)};if(!this._transport){h(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),i&&this.assertTaskCapability(e.method)}catch(c){h(c);return}s?.signal?.throwIfAborted();const f=this._requestMessageId++,w={...e,jsonrpc:"2.0",id:f};s?.onprogress&&(this._progressHandlers.set(f,s.onprogress),w.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),i&&(w.params={...w.params,task:i}),u&&(w.params={...w.params,_meta:{...w.params?._meta||{},[q]:u}});const y=c=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(c)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(v=>this._onerror(new Error(`Failed to send cancellation: ${v}`)));const _=c instanceof m?c:new m(g.RequestTimeout,String(c));l(_)};this._responseHandlers.set(f,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return l(c);try{const _=b(t,c.result);_.success?p(_.data):l(_.error)}catch(_){l(_)}}}),s?.signal?.addEventListener("abort",()=>{y(s?.signal?.reason)});const T=s?.timeout??Ge,k=()=>y(m.fromError(g.RequestTimeout,"Request timed out",{timeout:T}));this._setupTimeout(f,T,s?.maxTotalTimeout,k,s?.resetTimeoutOnProgress??!1);const d=u?.taskId;if(d){const c=_=>{const v=this._responseHandlers.get(f);v?v(_):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,c),this._enqueueTaskMessage(d,{type:"request",message:w,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(f),l(_)})}else this._transport.send(w,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(c=>{this._cleanupTimeout(f),l(c)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},Te,t)}async getTaskResult(e,t,s){return this.request({method:"tasks/result",params:e},t,s)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},ye,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},ke,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const s=t?.relatedTask?.taskId;if(s){const i={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[q]:t.relatedTask}}};await this._enqueueTaskMessage(s,{type:"notification",message:i,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let i={...e,jsonrpc:"2.0"};t?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[q]:t.relatedTask}}}),this._transport?.send(i,t).catch(u=>this._onerror(u))});return}let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[q]:t.relatedTask}}}),await this._transport.send(n,t)}setRequestHandler(e,t){const s=W(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(r,o)=>{const n=K(e,r);return Promise.resolve(t(n,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const s=W(e);this._notificationHandlers.set(s,r=>{const o=K(e,r);return Promise.resolve(t(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,s){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,s,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const s=await this._taskMessageQueue.dequeueAll(e,t);for(const r of s)if(r.type==="request"&&F(r.message)){const o=r.message.id,n=this._requestResolvers.get(o);n?(n(new m(g.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let s=this._options?.defaultTaskPollInterval??1e3;try{const r=await this._taskStore?.getTask(e);r?.pollInterval&&(s=r.pollInterval)}catch{}return new Promise((r,o)=>{if(t.aborted){o(new m(g.InvalidRequest,"Request cancelled"));return}const n=setTimeout(r,s);t.addEventListener("abort",()=>{clearTimeout(n),o(new m(g.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const s=this._taskStore;if(!s)throw new Error("No task store configured");return{createTask:async r=>{if(!e)throw new Error("No request provided");return await s.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async r=>{const o=await s.getTask(r,t);if(!o)throw new m(g.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,n)=>{await s.storeTaskResult(r,o,n,t);const i=await s.getTask(r,t);if(i){const u=z.parse({method:"notifications/tasks/status",params:i});await this.notification(u),R(i.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>s.getTaskResult(r,t),updateTaskStatus:async(r,o,n)=>{const i=await s.getTask(r,t);if(!i)throw new m(g.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(R(i.status))throw new m(g.InvalidParams,`Cannot update task "${r}" from terminal status "${i.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await s.updateTaskStatus(r,o,n,t);const u=await s.getTask(r,t);if(u){const p=z.parse({method:"notifications/tasks/status",params:u});await this.notification(p),R(u.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>s.listTasks(r,t)}}}function G(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function Ze(a,e){const t={...a};for(const s in e){const r=s,o=e[r];if(o===void 0)continue;const n=t[r];G(n)&&G(o)?t[r]={...n,...o}:t[r]=o}return t}var Ye=Se();const Xe=ve(Ye);function et(){const a=new Xe({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Ce(a),a}class tt{constructor(e){this._ajv=e??et()}getValidator(e){const t="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return s=>t(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}class st{constructor(e){this._client=e}async*callToolStream(e,t=ee,s){const r=this._client,o={...s,task:s?.task??(r.isToolTask(e.name)?{}:void 0)},n=r.requestStream({method:"tools/call",params:e},t,o),i=r.getToolOutputValidator(e.name);for await(const u of n){if(u.type==="result"&&i){const p=u.result;if(!p.structuredContent&&!p.isError){yield{type:"error",error:new m(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(p.structuredContent)try{const l=i(p.structuredContent);if(!l.valid){yield{type:"error",error:new m(g.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof m){yield{type:"error",error:l};return}yield{type:"error",error:new m(g.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield u}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,s){return this._client.getTaskResult({taskId:e},t,s)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,s){return this._client.requestStream(e,t,s)}}function rt(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!a.tools?.call)throw new Error(`${t} does not support task creation for tools/call (required for ${e})`);break}}function ot(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!a.sampling?.createMessage)throw new Error(`${t} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!a.elicitation?.create)throw new Error(`${t} does not support task creation for elicitation/create (required for ${e})`);break}}function O(a,e){if(!(!a||e===null||typeof e!="object")){if(a.type==="object"&&a.properties&&typeof a.properties=="object"){const t=e,s=a.properties;for(const r of Object.keys(s)){const o=s[r];t[r]===void 0&&Object.prototype.hasOwnProperty.call(o,"default")&&(t[r]=o.default),t[r]!==void 0&&O(o,t[r])}}if(Array.isArray(a.anyOf))for(const t of a.anyOf)typeof t!="boolean"&&O(t,e);if(Array.isArray(a.oneOf))for(const t of a.oneOf)typeof t!="boolean"&&O(t,e)}}function at(a){if(!a)return{supportsFormMode:!1,supportsUrlMode:!1};const e=a.form!==void 0,t=a.url!==void 0;return{supportsFormMode:e||!e&&!t,supportsUrlMode:t}}let nt=class extends Be{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new tt,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",be,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Re,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",Ie,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new st(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ze(this._capabilities,e)}setRequestHandler(e,t){const r=re(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o;if(x(r)){const i=r;o=i._zod?.def?.value??i.value}else{const i=r;o=i._def?.value??i.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");const n=o;if(n==="elicitation/create"){const i=async(u,p)=>{const l=b(je,u);if(!l.success){const c=l.error instanceof Error?l.error.message:String(l.error);throw new m(g.InvalidParams,`Invalid elicitation request: ${c}`)}const{params:h}=l.data;h.mode=h.mode??"form";const{supportsFormMode:f,supportsUrlMode:w}=at(this._capabilities.elicitation);if(h.mode==="form"&&!f)throw new m(g.InvalidParams,"Client does not support form-mode elicitation requests");if(h.mode==="url"&&!w)throw new m(g.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(t(u,p));if(h.task){const c=b(D,y);if(!c.success){const _=c.error instanceof Error?c.error.message:String(c.error);throw new m(g.InvalidParams,`Invalid task creation result: ${_}`)}return c.data}const T=b(Fe,y);if(!T.success){const c=T.error instanceof Error?T.error.message:String(T.error);throw new m(g.InvalidParams,`Invalid elicitation result: ${c}`)}const k=T.data,d=h.mode==="form"?h.requestedSchema:void 0;if(h.mode==="form"&&k.action==="accept"&&k.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{O(d,k.content)}catch{}return k};return super.setRequestHandler(e,i)}if(n==="sampling/createMessage"){const i=async(u,p)=>{const l=b(De,u);if(!l.success){const k=l.error instanceof Error?l.error.message:String(l.error);throw new m(g.InvalidParams,`Invalid sampling request: ${k}`)}const{params:h}=l.data,f=await Promise.resolve(t(u,p));if(h.task){const k=b(D,f);if(!k.success){const d=k.error instanceof Error?k.error.message:String(k.error);throw new m(g.InvalidParams,`Invalid task creation result: ${d}`)}return k.data}const y=h.tools||h.toolChoice?Le:Ve,T=b(y,f);if(!T.success){const k=T.error instanceof Error?T.error.message:String(T.error);throw new m(g.InvalidParams,`Invalid sampling result: ${k}`)}return T.data};return super.setRequestHandler(e,i)}return super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{const s=await this.request({method:"initialize",params:{protocolVersion:Ee,capabilities:this._capabilities,clientInfo:this._clientInfo}},qe,t);if(s===void 0)throw new Error(`Server sent invalid initialize result: ${s}`);if(!Pe.includes(s.protocolVersion))throw new Error(`Server's protocol version is not supported: ${s.protocolVersion}`);this._serverCapabilities=s.capabilities,this._serverVersion=s.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(s.protocolVersion),this._instructions=s.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(s){throw this.close(),s}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break}}assertTaskCapability(e){rt(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&ot(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},A,e)}async complete(e,t){return this.request({method:"completion/complete",params:e},$e,t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},A,t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},Me,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},Ae,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},He,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},Oe,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},xe,t)}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},A,t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},A,t)}async callTool(e,t=ee,s){if(this.isToolTaskRequired(e.name))throw new m(g.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const r=await this.request({method:"tools/call",params:e},t,s),o=this.getToolOutputValidator(e.name);if(o){if(!r.structuredContent&&!r.isError)throw new m(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{const n=o(r.structuredContent);if(!n.valid)throw new m(g.InvalidParams,`Structured content does not match the tool's output schema: ${n.errorMessage}`)}catch(n){throw n instanceof m?n:new m(g.InvalidParams,`Failed to validate structured content: ${n instanceof Error?n.message:String(n)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const t of e){if(t.outputSchema){const r=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,r)}const s=t.execution?.taskSupport;(s==="required"||s==="optional")&&this._cachedKnownTaskTools.add(t.name),s==="required"&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){const s=await this.request({method:"tools/list",params:e},Ue,t);return this.cacheToolMetadata(s.tools),s}_setupListChangedHandler(e,t,s,r){const o=Ne.safeParse(s);if(!o.success)throw new Error(`Invalid ${e} listChanged options: ${o.error.message}`);if(typeof s.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);const{autoRefresh:n,debounceMs:i}=o.data,{onChanged:u}=s,p=async()=>{if(!n){u(null,null);return}try{const h=await r();u(null,h)}catch(h){const f=h instanceof Error?h:new Error(String(h));u(f,null)}},l=()=>{if(i){const h=this._listChangedDebounceTimers.get(e);h&&clearTimeout(h);const f=setTimeout(p,i);this._listChangedDebounceTimers.set(e,f)}else p()};this.setNotificationHandler(t,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};const N=a=>[{type:"text",text:a}];function it(a){const e=V(a,typeof window<"u"?window.location.origin:void 0);if(!e)throw new Error("RestSelfClient requires either studioUrl or a browser environment.");const t={"Content-Type":"application/json",Accept:"application/json",...a.token?{Authorization:`Bearer ${a.token}`}:{}},s=u=>new URL(`/api/${encodeURIComponent(a.orgSlug)}${u}`,e).href,r=async u=>{let p;try{p=await fetch(s(`/tools/${encodeURIComponent(u.name)}`),{method:"POST",headers:t,credentials:"include",body:JSON.stringify(u.arguments??{})})}catch(h){const f=h instanceof Error?h.message:"Network error";return{content:N(f),isError:!0}}if(!p.ok){let h=`${u.name} failed (${p.status})`;try{const f=await p.json();f?.error&&(h=f.error)}catch{}return{content:N(h),isError:!0}}const l=await p.json().catch(()=>({}));return{content:N(typeof l=="string"?l:JSON.stringify(l)),structuredContent:l}},o=async()=>{const u=await fetch(s("/tools"),{method:"GET",headers:t,credentials:"include"});return u.ok?await u.json():{tools:[]}},n=u=>()=>Promise.reject(new Error(`RestSelfClient: ${u} is not supported over REST for the self connection`));return{callTool:r,listTools:o,listPrompts:n("listPrompts"),getPrompt:n("getPrompt"),listResources:n("listResources"),readResource:n("readResource"),listResourceTemplates:n("listResourceTemplates"),close:()=>Promise.resolve(),toJSON:()=>a.toJSONString}}function L(a){return a?a instanceof Headers?Object.fromEntries(a.entries()):Array.isArray(a)?Object.fromEntries(a):{...a}:{}}function ct(a=fetch,e){return e?async(t,s)=>{const r={...e,...s,headers:s?.headers?{...L(e.headers),...L(s.headers)}:e.headers};return a(t,r)}:a}class B extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}const Z=10,lt=13,I=32;function j(a){}function ut(a){if(typeof a=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=j,onError:t=j,onRetry:s=j,onComment:r}=a,o=[];let n=!0,i,u="",p=0,l;function h(d){if(n&&(n=!1,d.charCodeAt(0)===239&&d.charCodeAt(1)===187&&d.charCodeAt(2)===191&&(d=d.slice(3))),o.length===0){const v=f(d);v!==""&&o.push(v);return}if(d.indexOf(`
2
- `)===-1&&d.indexOf("\r")===-1){o.push(d);return}o.push(d);const c=o.join("");o.length=0;const _=f(c);_!==""&&o.push(_)}function f(d){let c=0;if(d.indexOf("\r")===-1){let _=d.indexOf(`
3
- `,c);for(;_!==-1;){if(c===_){p>0&&e({id:i,event:l,data:u}),i=void 0,u="",p=0,l=void 0,c=_+1,_=d.indexOf(`
4
- `,c);continue}const v=d.charCodeAt(c);if(Y(d,c,v)){const S=d.charCodeAt(c+5)===I?c+6:c+5,C=d.slice(S,_);if(p===0&&d.charCodeAt(_+1)===Z){e({id:i,event:l,data:C}),i=void 0,u="",l=void 0,c=_+2,_=d.indexOf(`
5
- `,c);continue}u=p===0?C:`${u}
6
- ${C}`,p++}else X(d,c,v)?l=d.slice(d.charCodeAt(c+6)===I?c+7:c+6,_)||void 0:w(d,c,_);c=_+1,_=d.indexOf(`
7
- `,c)}return d.slice(c)}for(;c<d.length;){const _=d.indexOf("\r",c),v=d.indexOf(`
8
- `,c);let S=-1;if(_!==-1&&v!==-1?S=_<v?_:v:_!==-1?_===d.length-1?S=-1:S=_:v!==-1&&(S=v),S===-1)break;w(d,c,S),c=S+1,d.charCodeAt(c-1)===lt&&d.charCodeAt(c)===Z&&c++}return d.slice(c)}function w(d,c,_){if(c===_){T();return}const v=d.charCodeAt(c);if(Y(d,c,v)){const E=d.charCodeAt(c+5)===I?c+6:c+5,Q=d.slice(E,_);u=p===0?Q:`${u}
9
- ${Q}`,p++;return}if(X(d,c,v)){l=d.slice(d.charCodeAt(c+6)===I?c+7:c+6,_)||void 0;return}if(v===105&&d.charCodeAt(c+1)===100&&d.charCodeAt(c+2)===58){const E=d.slice(d.charCodeAt(c+3)===I?c+4:c+3,_);i=E.includes("\0")?void 0:E;return}if(v===58){if(r){const E=d.slice(c,_);r(E.slice(d.charCodeAt(c+1)===I?2:1))}return}const S=d.slice(c,_),C=S.indexOf(":");if(C===-1){y(S,"",S);return}const ae=S.slice(0,C),ne=S.charCodeAt(C+1)===I?2:1,ie=S.slice(C+ne);y(ae,ie,S)}function y(d,c,_){switch(d){case"event":l=c||void 0;break;case"data":u=p===0?c:`${u}
10
- ${c}`,p++;break;case"id":i=c.includes("\0")?void 0:c;break;case"retry":/^\d+$/.test(c)?s(parseInt(c,10)):t(new B(`Invalid \`retry\` value: "${c}"`,{type:"invalid-retry",value:c,line:_}));break;default:t(new B(`Unknown field "${d.length>20?`${d.slice(0,20)}…`:d}"`,{type:"unknown-field",field:d,value:c,line:_}));break}}function T(){p>0&&e({id:i,event:l,data:u}),i=void 0,u="",p=0,l=void 0}function k(d={}){if(d.consume&&o.length>0){const c=o.join("");w(c,0,c.length)}n=!0,i=void 0,u="",p=0,l=void 0,o.length=0}return{feed:h,reset:k}}function Y(a,e,t){return t===100&&a.charCodeAt(e+1)===97&&a.charCodeAt(e+2)===116&&a.charCodeAt(e+3)===97&&a.charCodeAt(e+4)===58}function X(a,e,t){return t===101&&a.charCodeAt(e+1)===118&&a.charCodeAt(e+2)===101&&a.charCodeAt(e+3)===110&&a.charCodeAt(e+4)===116&&a.charCodeAt(e+5)===58}class dt extends TransformStream{constructor({onError:e,onRetry:t,onComment:s}={}){let r;super({start(o){r=ut({onEvent:n=>{o.enqueue(n)},onError(n){e==="terminate"?o.error(n):typeof e=="function"&&e(n)},onRetry:t,onComment:s})},transform(o){r.feed(o)}})}}const ht={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class $ extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}}let ft=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=ct(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??ht}async _authThenStart(){if(!this._authProvider)throw new P("No auth provider");let e;try{e=await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(t){throw this.onerror?.(t),t}if(e!=="AUTHORIZED")throw new P;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const e={};if(this._authProvider){const s=await this._authProvider.tokens();s&&(e.Authorization=`Bearer ${s.access_token}`)}this._sessionId&&(e["mcp-session-id"]=this._sessionId),this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const t=L(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){const{resumptionToken:t}=e;try{const s=await this._commonHeaders();s.set("Accept","text/event-stream"),t&&s.set("last-event-id",t);const r=await(this._fetch??fetch)(this._url,{method:"GET",headers:s,signal:this._abortController?.signal});if(!r.ok){if(await r.body?.cancel(),r.status===401&&this._authProvider)return await this._authThenStart();if(r.status===405)return;throw new $(r.status,`Failed to open SSE stream: ${r.statusText}`)}this._handleSseStream(r.body,e,!0)}catch(s){throw this.onerror?.(s),s}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const t=this._reconnectionOptions.initialReconnectionDelay,s=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*Math.pow(s,e),r)}_scheduleReconnection(e,t=0){const s=this._reconnectionOptions.maxRetries;if(t>=s){this.onerror?.(new Error(`Maximum reconnection attempts (${s}) exceeded.`));return}const r=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(o=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${o instanceof Error?o.message:String(o)}`)),this._scheduleReconnection(e,t+1)})},r)}_handleSseStream(e,t,s){if(!e)return;const{onresumptiontoken:r,replayMessageId:o}=t;let n,i=!1,u=!1;(async()=>{try{const l=e.pipeThrough(new TextDecoderStream).pipeThrough(new dt({onRetry:w=>{this._serverRetryMs=w}})).getReader();for(;;){const{value:w,done:y}=await l.read();if(y)break;if(w.id&&(n=w.id,i=!0,r?.(w.id)),!!w.data&&(!w.event||w.event==="message"))try{const T=U.parse(JSON.parse(w.data));M(T)&&(u=!0,o!==void 0&&(T.id=o)),this.onmessage?.(T)}catch(T){this.onerror?.(T)}}(s||i)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:n,onresumptiontoken:r,replayMessageId:o},0)}catch(l){if(this.onerror?.(new Error(`SSE stream disconnected: ${l}`)),(s||i)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:n,onresumptiontoken:r,replayMessageId:o},0)}catch(w){this.onerror?.(new Error(`Failed to reconnect: ${w instanceof Error?w.message:String(w)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new P("No auth provider");if(await H(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new P("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{const{resumptionToken:s,onresumptiontoken:r}=t||{};if(s){this._startOrAuthSse({resumptionToken:s,replayMessageId:F(e)?e.id:void 0}).catch(f=>this.onerror?.(f));return}const o=await this._commonHeaders();o.set("content-type","application/json"),o.set("accept","application/json, text/event-stream");const n={...this._requestInit,method:"POST",headers:o,body:JSON.stringify(e),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,n),u=i.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!i.ok){const f=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new $(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:w,scope:y}=J(i);if(this._resourceMetadataUrl=w,this._scope=y,await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new P;return this._hasCompletedAuthFlow=!0,this.send(e)}if(i.status===403&&this._authProvider){const{resourceMetadataUrl:w,scope:y,error:T}=J(i);if(T==="insufficient_scope"){const k=i.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===k)throw new $(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),w&&(this._resourceMetadataUrl=w),this._lastUpscopingHeader=k??void 0,await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new P;return this.send(e)}}throw new $(i.status,`Error POSTing to endpoint: ${f}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,i.status===202){await i.body?.cancel(),Qe(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(f=>this.onerror?.(f));return}const l=(Array.isArray(e)?e:[e]).filter(f=>"method"in f&&"id"in f&&f.id!==void 0).length>0,h=i.headers.get("content-type");if(l)if(h?.includes("text/event-stream"))this._handleSseStream(i.body,{onresumptiontoken:r},!1);else if(h?.includes("application/json")){const f=await i.json(),w=Array.isArray(f)?f.map(y=>U.parse(y)):[U.parse(f)];for(const y of w)this.onmessage?.(y)}else throw await i.body?.cancel(),new $(-1,`Unexpected content type: ${h}`);else await i.body?.cancel()}catch(s){throw this.onerror?.(s),s}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const e=await this._commonHeaders(),t={...this._requestInit,method:"DELETE",headers:e,signal:this._abortController?.signal},s=await(this._fetch??fetch)(this._url,t);if(await s.body?.cancel(),!s.ok&&s.status!==405)throw new $(s.status,`Failed to terminate session: ${s.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}};class pt extends ft{constructor(e,t){super(e,t)}send(e,t){const s=mt(e);return s?.type==="emit"?(this.onmessage?.(s.message),Promise.resolve()):s?.type==="suppress"?Promise.resolve():super.send(e,t)}}function mt(a){const e=a;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const t=e?.params?.protocolVersion;return t?{type:"emit",message:{result:{protocolVersion:t,capabilities:{tools:{},resources:{},prompts:{},tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}},serverInfo:{name:"studio-virtual-mcp",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}const _t={name:"studio-sdk",version:"1.0.0"};function wt(a,e,t){const s=t??(typeof window<"u"?window.location.origin:void 0);if(!s)throw new Error("MCP client requires either studioUrl or a browser environment.");const r=`/api/${encodeURIComponent(e)}`,o=a?`${r}/mcp/${a}`:`${r}/mcp`;return new URL(o,s).href}async function gt({connectionId:a,orgId:e,orgSlug:t,token:s,studioUrl:r,meshUrl:o}){const n=V({studioUrl:r,meshUrl:o}),i=te.mcpClient(e,a??"self",s??"",n??"");if(!a||a===ze)return it({orgSlug:t,token:s,studioUrl:n,toJSONString:`mcp-client:${i.join(":")}`});const u=wt(a,t,n),p=new nt(_t,{capabilities:{tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}}}),l=new pt(new URL(u),{requestInit:{headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream",...s?{Authorization:`Bearer ${s}`}:{}}}});return await p.connect(l),p.toJSON=()=>`mcp-client:${i.join(":")}`,p}function oe(a){const{connectionId:e,token:t,studioUrl:s,meshUrl:r,orgId:o}=a,n=V({studioUrl:s,meshUrl:r});return{queryKey:te.mcpClient(o,e??"self",t??"",n??""),queryFn:()=>gt(a),staleTime:1/0,gcTime:6e4}}function St(a){const e=se.c(2);let t;e[0]!==a?(t=oe(a),e[0]=a,e[1]=t):t=e[1];const{data:s}=Je(t);return s}function Ct(a,e){const t=se.c(7);let s;t[0]!==e?(s=e===void 0?{}:e,t[0]=e,t[1]=s):s=t[1];const{enabled:r}=s,o=r===void 0?!0:r;let n;t[2]!==a?(n=oe(a),t[2]=a,t[3]=n):n=t[3];let i;t[4]!==o||t[5]!==n?(i={...n,enabled:o},t[4]=o,t[5]=n,t[6]=i):i=t[6];const{data:u}=We(i);return u??null}export{Xe as A,nt as C,Be as P,ft as S,Ct as a,ut as b,gt as c,ct as d,oe as m,L as n,St as u};
@@ -1 +0,0 @@
1
- import{c as p,f as g,u as S,d9 as _,d as b,k,da as P,db as E}from"./index-DcU2uHG-.js";import{b as I}from"./thread-route-DsRsjMOv.js";import{a as R}from"./use-project-scope-CGMALc0e.js";function x(e){const t=e.destination==="agent",a={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(a):a,mainpanel:void 0}}function T(){const e=p.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:j},e[0]=t):t=e[0],k(t)}function j(e){for(let t=e.matches.length-1;t>=0;t--){const a=e.matches[t]?.staticData;if(a?.mainView||a?.siteEditorView)return{mainView:a.mainView,siteEditorView:a.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function A(){const e=p.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const a=g(t);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const i=S(o),s={file:"file"in i&&typeof i.file=="string"?i.file:void 0,key:"key"in i&&typeof i.key=="string"?i.key:void 0,path:"path"in i&&typeof i.path=="string"?i.path:void 0},{mainView:r,siteEditorView:n}=T();return _({mainView:r,siteEditorView:n,params:a,search:s})}function D(){const e=p.c(11),t=b();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const o=g(a),i=I(),s=R(),r=o.org??"";let n;e[1]!==t||e[2]!==r||e[3]!==i||e[4]!==s?(n=(u,c)=>{const h=P(u),v=c?.virtualmcpid!==void 0||s!==null?"project":"organization",y=h.kind==="org-destination"||h.kind==="project-destination"&&v==="organization",V=w=>x({previous:w,destination:y?"organization":"agent",update:c?.search});E(t,{org:r,agentId:c?.virtualmcpid??i,tabId:u,destinationScope:v,taskKey:c?.taskKey,search:V,replace:c?.replace??!0})},e[1]=t,e[2]=r,e[3]=i,e[4]=s,e[5]=n):n=e[5];const m=n;let l;e[6]!==t?(l=u=>t({to:".",search:z,replace:u?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const f=l;let d;return e[8]!==f||e[9]!==m?(d={openPanel:m,closePanel:f},e[8]=f,e[9]=m,e[10]=d):d=e[10],d}function z(e){return{...e,mainpanel:!1,sidepanel:!0}}export{D as a,x as r,A as u};
@@ -1 +0,0 @@
1
- import{c as T,a2 as N,b6 as U,m as $,K as B}from"./index-DcU2uHG-.js";import{m as F}from"./match-site-slug-config-D3fUJ6vX.js";import{u as K}from"./use-file-configs-BFq_wpSt.js";import{e as q}from"./use-organization-settings-DFkNTsS0.js";import{u as Q}from"./use-main-schema-v8-Dcb6Yskn.js";import{r as k,a as L}from"./site-slug-DebpOoQq.js";const d=["overview","reports","board","site-editor","assets","releases","hosting","e2e","analytics","cdn","automations","experiments"],Y=["overview","reports","board","site-editor"],z=1,G=["assets","releases","hosting","e2e","analytics","cdn","experiments"];function oe(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const s=e?.id===t?e:n?.id===t?n:null;return{project:s,resolvedScopeId:s?t:null}}function ce(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function W(t,e){const n=new Set(t??[]);if(e!==z)for(const s of Y)n.add(s);return d.filter(s=>n.has(s))}function H(t){return d.some(e=>e===t)}function X(t){return G.some(e=>e===t)}function Z(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,releases:t&&e.releases,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,experiments:t&&e.experiments,automations:!0}}function ae(t,e,n){const s=Z(e,n);return t?s:{...s,overview:!0,reports:!0,board:!0}}function le(t,e,n){const s=new Set(W(t,n));return d.filter(r=>e[r]&&s.has(r))}function ue(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function de(t){return d.filter(e=>t[e])}function M(t,e,n){return!H(t)||e[t]?!1:X(t)?t==="releases"?!n.releases:!(t==="assets"?n.assets:n.siteAccess):!0}function fe(t,e,n,s,r){return M(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!s.includes("content")||t==="code"&&r&&!s.includes("code")}function me(t,e,n,s){const r=new Set(W(t,s));return n?r.add(e):r.delete(e),d.filter(i=>r.has(i))}function Pe(t){const e=T.c(22),{org:n}=N(),s=U(),r=q(),i=K(),o=Q(t?.id),f=o==="v8";let m;e[0]!==t?(m=k(t),e[0]=t,e[1]=m):m=e[1];const c=m,P=s.hostingEnabled===!0,S=s.monitorEnabled===!0||s.auth.localMode===!0,j=(P||S)&&!!c,C=O(n.slug,c,j);let p;e[2]!==t?(p=L(t),e[2]=t,e[3]=p):p=e[3];const V=p,w=S&&!!V&&V!==c,D=O(n.slug,V,w),u=C.data?.owned===!0,J=w?D.data?.owned===!0:u;let a;e[4]!==i.data?.configs?(a=i.data?.configs??[],e[4]=i.data?.configs,e[5]=a):a=e[5];let g;e[6]!==c||e[7]!==a?(g=F(a,c),e[6]=c,e[7]=a,e[8]=g):g=e[8];const E=!!g,y=f&&!!t?.metadata?.siteSlug,A=P&&u&&r.hosting,h=P&&u&&r.e2e,x=P&&u&&r.analytics,_=S&&(o==="v8"||o==="error"?u:J)&&r.monitor;let l;e[9]!==r.experiments||e[10]!==E||e[11]!==y||e[12]!==A||e[13]!==h||e[14]!==x||e[15]!==_?(l={assets:E,releases:y,hosting:A,e2e:h,analytics:x,cdn:_,experiments:r.experiments},e[9]=r.experiments,e[10]=E,e[11]=y,e[12]=A,e[13]=h,e[14]=x,e[15]=_,e[16]=l):l=e[16];const I=!!c&&i.isPending,R=!!t?.metadata?.siteSlug&&(o==="loading"||o==="error"),v=j&&C.isPending||w&&D.isPending;let b;return e[17]!==l||e[18]!==I||e[19]!==R||e[20]!==v?(b={presence:l,assetsPending:I,releasesPending:R,siteAccessPending:v},e[17]=l,e[18]=I,e[19]=R,e[20]=v,e[21]=b):b=e[21],b}function O(t,e,n){const s=T.c(10);let r;s[0]!==t||s[1]!==e?(r=B.hostingAccess(t,e??""),s[0]=t,s[1]=e,s[2]=r):r=s[2];let i;s[3]!==t||s[4]!==e?(i=async()=>{const f=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return f.ok?await f.json():{owned:!1,canWrite:!1}},s[3]=t,s[4]=e,s[5]=i):i=s[5];let o;return s[6]!==n||s[7]!==r||s[8]!==i?(o={queryKey:r,queryFn:i,enabled:n,staleTime:6e4},s[6]=n,s[7]=r,s[8]=i,s[9]=o):o=s[9],$(o)}export{G as P,z as a,oe as b,ae as c,fe as d,W as e,M as f,de as g,ue as h,Z as p,ce as r,le as s,me as t,Pe as u};
@@ -1 +0,0 @@
1
- import{c as M,b as ee,r as b,j as i,l as te,D as re,q as se,v as oe,I as ie,s as le}from"./index-DcU2uHG-.js";import{a as G,f as H}from"./UserSquare-DJngEPjS.js";import{b as ne}from"./agent-icon-c0hRUHIU.js";import{i as ce}from"./SearchMd-BODiv7c9.js";import{O as Y,Q as ae,T as _}from"./blocks-tab-states-diUqUrAK.js";import{az as fe,ad as ue,w as de,aA as me,H as ve}from"./secret-ciphertext-CI3Fu2ro.js";import{d as X,r as pe}from"./section-preview-url-7zfngvgW.js";import{a as xe}from"./input-pg_Munw1.js";import{c as he,u as ge,K as we}from"./site-editor-toast-L4A-Cxh7.js";function Se(r){return r.schema?.definitions??r.schema?.$defs??{}}function Z(r,e){const t=Se(e),s=t[btoa(r)];if(!s)return[];const o=[s];if(Array.isArray(s.allOf)){const n=s.allOf.find(l=>typeof l.$ref=="string")?.$ref;if(typeof n=="string"){const l=t[n.replace("#/definitions/","")];l&&o.push(l)}}return o}function be(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s?.includes("{{{"))return s}}function ze(r,e){if(!e)return;const t=fe(r);if(!t)return;const s=be(t.resolveType,e);if(!s)return;const o=ae(s,t.data);if(o)return Y(o)}function je(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s&&!s.includes("{{"))return Y(s)}}const ye=12,z=new Set,F=new Set;function Ne(){for(const r of F)r()}function Re(r){return z.has(r)?!0:z.size>=ye?!1:(z.add(r),!0)}function J(r){z.delete(r)&&Ne()}function Pe(r){return F.add(r),()=>{F.delete(r)}}function Ie(r,e){const t=b.useRef(!1),[s,o]=b.useState(!1),n=b.useRef(null),l=b.useRef(null),f=b.useRef(null),c=b.useRef(r);c.current=r;const[p]=b.useState(()=>{const u=()=>{f.current?.(),f.current=null},d=()=>t.current?!0:Re(e)?(t.current=!0,o(!0),u(),!0):!1;return a=>{if(l.current=a,n.current&&(n.current.disconnect(),n.current=null),u(),!a){t.current&&(J(e),t.current=!1,o(!1));return}queueMicrotask(()=>{if(l.current!==a)return;const w=new IntersectionObserver(m=>{if(m[0]?.isIntersecting??!1){!d()&&!f.current&&(f.current=Pe(()=>{l.current===a&&d()}));return}u(),t.current&&(J(e),t.current=!1,o(!1))},{root:c.current.current,rootMargin:"160px 0px"});w.observe(a),n.current=w})}});return{ref:p,iframeActive:s}}function Te(r){const e=M.c(9),{previewUrl:t,title:s,scrollRootRef:o,slotId:n}=r,{ref:l,iframeActive:f}=Ie(o,n),[c,p]=b.useState(!1),u=_()?H:G;let d;e[0]!==u||e[1]!==f||e[2]!==c||e[3]!==t||e[4]!==s?(d=f?i.jsxs(i.Fragment,{children:[!c&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:i.jsx(u,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),i.jsx("iframe",{src:t,title:`Preview ${s}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>p(!0)})]}):i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(u,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=u,e[1]=f,e[2]=c,e[3]=t,e[4]=s,e[5]=d):d=e[5];let a;return e[6]!==l||e[7]!==d?(a=i.jsx("div",{ref:l,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:d}),e[6]=l,e[7]=d,e[8]=a):a=e[8],a}function Ce(r){const e=M.c(3),{image:t}=r,s=_()?H:G;let o;return e[0]!==s||e[1]!==t?(o=i.jsx("div",{className:"relative flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted/40",children:t?i.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):i.jsx(s,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=s,e[1]=t,e[2]=o):o=e[2],o}function Ue(r){const e=M.c(28),{entry:t,previewUrl:s,image:o,scrollRootRef:n,onSelect:l}=r,c=_()?t.isSavedBlock?ne:H:G,p=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let u;e[0]!==p?(u=te("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors shadow-edge","hover:border-primary/40 hover:bg-accent",p),e[0]=p,e[1]=u):u=e[1];let d;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==o||e[5]!==s||e[6]!==n?(d=s?i.jsx(Te,{previewUrl:s,title:t.title,scrollRootRef:n,slotId:t.resolveType}):i.jsx(Ce,{image:o}),e[2]=t.resolveType,e[3]=t.title,e[4]=o,e[5]=s,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==t.isSavedBlock?(a=t.isSavedBlock?{color:ve}:void 0,e[8]=t.isSavedBlock,e[9]=a):a=e[9];let w;e[10]!==c||e[11]!==a?(w=i.jsx(c,{className:"h-4 w-4 shrink-0",style:a}),e[10]=c,e[11]=a,e[12]=w):w=e[12];let m;e[13]!==t.title?(m=i.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[13]=t.title,e[14]=m):m=e[14];let x;e[15]!==t.description?(x=t.description&&i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[15]=t.description,e[16]=x):x=e[16];let h;e[17]!==m||e[18]!==x?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[m,x]}),e[17]=m,e[18]=x,e[19]=h):h=e[19];let g;e[20]!==w||e[21]!==h?(g=i.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[w,h]}),e[20]=w,e[21]=h,e[22]=g):g=e[22];let S;return e[23]!==l||e[24]!==u||e[25]!==d||e[26]!==g?(S=i.jsxs("button",{type:"button",onClick:l,className:u,children:[d,g]}),e[23]=l,e[24]=u,e[25]=d,e[26]=g,e[27]=S):S=e[27],S}function qe(r){const e=M.c(51),{open:t,onOpenChange:s,meta:o,decofile:n,previewBaseUrl:l,onSelect:f}=r,c=ee(),[p,u]=b.useState(""),[d,a]=b.useState(t),w=b.useRef(null);t!==d&&(a(t),t&&u(""));let m,x,h,g,S,y,N,R,j,P,I;if(e[0]!==n||e[1]!==o||e[2]!==s||e[3]!==f||e[4]!==t||e[5]!==l||e[6]!==p||e[7]!==c){const q=t&&o&&n?ue(o,n):[],W=o?de(o):"",V=n?me(n):void 0,K=new Map;if(t&&W&&l)for(const v of q)K.set(v.resolveType,X(l,W,v.previewBlock,V));const E=p.trim().toLowerCase(),Q=E?q.filter(v=>v.title.toLowerCase().includes(E)||v.resolveType.toLowerCase().includes(E)||v.description?.toLowerCase().includes(E)):q;x=re,P=t,I=s,m=se,N="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let A;e[19]!==c?(A=c("sectionsEditor.addSectionModal.title"),e[19]=c,e[20]=A):A=e[20];let B;e[21]!==A?(B=i.jsx(oe,{children:A}),e[21]=A,e[22]=B):B=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=i.jsx(ce,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=$):$=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=v=>u(v.target.value),e[24]=D):D=e[24];let k;e[25]!==c?(k=c("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=c,e[26]=k):k=e[26];let L;e[27]!==p||e[28]!==k?(L=i.jsxs("div",{className:"relative pt-2",children:[$,i.jsx(ie,{value:p,onChange:D,placeholder:k,className:"h-9 pl-8"})]}),e[27]=p,e[28]=k,e[29]=L):L=e[29],e[30]!==B||e[31]!==L?(j=i.jsxs(le,{className:"shrink-0 border-b px-4 py-3 text-left",children:[B,L]}),e[30]=B,e[31]=L,e[32]=j):j=e[32],S=w,y="min-h-0 flex-1 overflow-y-auto",h="p-4",g=Q.length===0?i.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c("sectionsEditor.addSectionModal.noSectionsFound")}):i.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Q.map(v=>i.jsx(Ue,{entry:v,scrollRootRef:w,previewUrl:l?K.get(v.resolveType)??X(l,W,v.previewBlock,V):null,image:l||!o?void 0:je(v.resolveType,o),onSelect:()=>f(v)},v.resolveType))}),e[0]=n,e[1]=o,e[2]=s,e[3]=f,e[4]=t,e[5]=l,e[6]=p,e[7]=c,e[8]=m,e[9]=x,e[10]=h,e[11]=g,e[12]=S,e[13]=y,e[14]=N,e[15]=R,e[16]=j,e[17]=P,e[18]=I}else m=e[8],x=e[9],h=e[10],g=e[11],S=e[12],y=e[13],N=e[14],R=e[15],j=e[16],P=e[17],I=e[18];let T;e[33]!==h||e[34]!==g?(T=i.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=T):T=e[35];let C;e[36]!==T||e[37]!==S||e[38]!==y?(C=i.jsx("div",{ref:S,className:y,children:T}),e[36]=T,e[37]=S,e[38]=y,e[39]=C):C=e[39];let U;e[40]!==m||e[41]!==C||e[42]!==N||e[43]!==R||e[44]!==j?(U=i.jsxs(m,{closeButtonClassName:N,className:R,children:[j,C]}),e[40]=m,e[41]=C,e[42]=N,e[43]=R,e[44]=j,e[45]=U):U=e[45];let O;return e[46]!==x||e[47]!==U||e[48]!==P||e[49]!==I?(O=i.jsx(x,{open:P,onOpenChange:I,children:U}),e[46]=x,e[47]=U,e[48]=P,e[49]=I,e[50]=O):O=e[50],O}function We(r){const e=M.c(4),{previewServerUrl:t,runtime:s}=xe(r.virtualMcpId),{url:o}=he(r.virtualMcpId),n=ge(r.virtualMcpId,r.branch),l=s==="cms";if(we(n))return null;if(o)return o;let f;return e[0]!==l||e[1]!==r.sandboxUrl||e[2]!==t?(f=pe({sandboxUrl:r.sandboxUrl,previewServerUrl:t,fastPreviewActive:l}),e[0]=l,e[1]=r.sandboxUrl,e[2]=t,e[3]=f):f=e[3],f}export{qe as A,ze as g,Z as s,We as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-P7ZNg4ZF.js";import{du as i}from"./index-DcU2uHG-.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-P7ZNg4ZF.js";import{du as s,dH as n}from"./index-DcU2uHG-.js";function a(r,e){return s({...r,enabled:!0,suspense:!0,throwOnError:n},u,e)}export{a as u};
@@ -1 +0,0 @@
1
- import{c as K,b as X,r as Z,j as n,l as rt,B as tt,av as ut}from"./index-DcU2uHG-.js";import{G as xt,a6 as lt,j as gt}from"./agent-icon-c0hRUHIU.js";import{L as bt}from"./label-DDPD5LQh.js";import{S as ct}from"./scroll-area-DowOzl5a.js";import{S as vt}from"./switch-BQFbXMA-.js";import{T as yt,c as jt,a as Tt}from"./tooltip-BqHx2R4U.js";import{T as ot,a as Nt}from"./toggle-group-CtPF-F41.js";import{aC as mt,aD as pt,aE as _t,aF as kt,aG as Et,aH as U,aI as St}from"./content-tab-CTbbT9Kp.js";import"./AlertCircle-xI8XX-bi.js";import"./Tool01-BGL2Qt57.js";import"./ArrowUp-Cq3iZIwL.js";import"./ArrowLeft-BKYzlDQY.js";import"./LinkBroken01-ZRquEJUl.js";import"./ShoppingBag01-DAjyOiiw.js";import"./ZoomOut-B55seUHX.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./ChevronUp-CFN68hLk.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./UserSquare-DJngEPjS.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Plus-xabrshQG.js";import"./SearchMd-BODiv7c9.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./XClose-CdzjyNb0.js";import"./index-BdQq_4o_.js";import"./index-WjQsIrkp.js";import"./active-indicator-CCMhAsc_.js";import"./use-organization-settings-DFkNTsS0.js";import"./schema-DTqdooJM.js";import"./task-board-CSpxMIw7.js";import"./chat-context-BnuwMOfj.js";import"./use-panel-navigate-K8ACrPML.js";import"./thread-route-DsRsjMOv.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./autosend-BiXCzDoT.js";import"./thread-intent-DlbBEzNn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-TumByBkr.js";import"./use-ai-providers-DugUJNG4.js";import"./location-V0VwTJTt.js";import"./alert-dialog-M8Y0zqSA.js";import"./site-editor-toast-L4A-Cxh7.js";import"./input-pg_Munw1.js";import"./usage-stats-DcyLnEOC.js";import"./tool-namespace-FeAXQzXg.js";import"./form-Bdh0vUeg.js";import"./utils-CVEq3hMx.js";import"./markdown-1PeXOKNt.js";import"./use-copy-K9rQ1PJH.js";import"./use-mobile-BfmJV4wy.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-Dg2jSe-y.js";import"./file-type-icon-Ez8-DRHg.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./use-clock-tick-CbuQEbGd.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./integration-icon-aeIvRSnw.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./use-debounced-value-CDunmz6Z.js";import"./required-auth-layout-n4GqwjUS.js";import"./use-org-sso-ClJ8vn5f.js";import"./chat-draft-D3EwPWFD.js";import"./select-B47VUguS.js";import"./tabs-CJ70csAp.js";import"./use-deco-credits-orVqTX6I.js";import"./use-open-billing-url-pmLoKOyH.js";import"./index-De44zW_k.js";import"./checkbox-Dla8kRWj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CVCbWisj.js";import"./drawer-CEiS53oX.js";import"./input-HXHaYrka.js";import"./suggestion-D_Z3LuMt.js";import"./use-mcp-prompts-JJb6q8dH.js";import"./use-org-fs-D82Vx4hB.js";import"./question-004-sINsf4GQ.js";import"./use-members-CzSQTDAS.js";import"./use-org-auth-client-fPRUht_a.js";import"./feature-paywall-DINMFUUx.js";import"./plan-ladder-D5aCNSRy.js";import"./add-connection-dialog-O4xCe9BP.js";import"./extract-connection-data-CUvLfXNU.js";import"./metadata-D72DunRR.js";import"./connection-B5x-rxzp.js";import"./url-slug-DfovzTSP.js";import"./connection-card-CFqu0_G8.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BDWvYouR.js";import"./use-connection-Dj54skEw.js";import"./schema-Jt-SHSRj.js";import"./connection-form-helpers-CouK82td.js";import"./authenticate-and-persist-oauth-D7W1mkzH.js";import"./mcp-oauth-xBzZujQ_.js";import"./mcp-oauth-DP6VNnFQ.js";import"./collection-tabs-DJst1PBn.js";import"./badge-ByzdbptS.js";import"./use-infinite-scroll-7dT9x3fg.js";import"./useSuspenseInfiniteQuery-B0JY_wMj.js";import"./use-task-board-events-BDk-u9KA.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./use-main-schema-v8-Dcb6Yskn.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-Bp3fKbm9.js";import"./index-_y92DzgS.js";import"./pair-Cn70Tm81.js";import"./collapsible-BWjY8cOG.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DTPlWHGT.js";import"./types-Cj3BjtjJ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-R9Pr50Sb.js";import"./use-thread-outputs-DLitie4Q.js";import"./sandbox-git-api-CRxdlhrN.js";import"./blocks-tab-states-diUqUrAK.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./secret-ciphertext-CI3Fu2ro.js";import"./alert-J8Wo4iMe.js";import"./monaco-editor-e80GuCNv.js";import"./editor-DWhRi1_f.js";import"./calendar-B3WUDV6V.js";import"./editor-classes-CZOMDDcn.js";import"./core.esm-DOdwJCI5.js";import"./sortable.esm-7lfZBBX2.js";import"./combobox-DJtWtG8e.js";import"./search-input-C77c23a_.js";import"./use-file-configs-BFq_wpSt.js";import"./asset-utils-D4ZYWTsd.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./empty-state-B1xpK558.js";import"./mustache-Aw4qvxEW.js";import"./use-content-sync-D4PHTEJr.js";import"./sandbox-lifecycle-context-Cyz-VR-q.js";import"./empty-state-BoFIIv2e.js";const wt=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),Ct=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Mt=new Date(-864e13),At=new Date(864e13),$t=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,Lt=/\/flags\/multivariate\.ts$/;function Rt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Dt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Mt,a=s?new Date(r):At;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function dt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(wt.has(r)){const o=Dt(e);o&&t.push(o);return}if(Ct.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)dt(s,t)}}}function It(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!$t.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(It(e)){const i=e.variants,a=e.__resolveType,c=Lt.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,u=[];if(dt(p.rule,u),u.length===0)return;const g=Ot(p.value)??(c||r);for(const h of u)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function Ht(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Rt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function ft(e,t){return e.get(t)??Bt}const nt=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ft(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):nt.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):nt.format(e.end);return`${r} → ${o}`}function Gt(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Ft(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(Tt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const it=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${it}px, #000 calc(100% - ${it}px), ${o})`}function ht(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const u=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let h;t[7]!==u?(h=u&&{maskImage:u,WebkitMaskImage:u},t[7]=u,t[8]=h):h=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==h?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...h,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=h,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let S;t[18]!==x||t[19]!==b?(S=n.jsx(yt,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-2xs font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=S):S=t[20];let T;t[21]!==r?(T=n.jsx(Gt,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==S?(d=n.jsxs(jt,{children:[S,T]}),t[23]=T,t[24]=S,t[25]=d):d=t[25],d}function cn(e){const t=K.c(71),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Yt),[l,m]=Z.useState(!1);let p,u,f;if(t[0]!==r||t[1]!==l){const M=Ht(r);p=M.filter(Kt).length,f=l?M:M.filter(Ut),u=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=u,t[4]=f}else p=t[2],u=t[3],f=t[4];const g=u;let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(pt(new Date)),t[5]=h):h=t[5];const x=h;let b;t[6]!==s?(b=()=>c(M=>s==="calendar"?U(M,-1):U(M,-3)),t[6]=s,t[7]=b):b=t[7];const S=b;let T;t[8]!==s?(T=()=>c(M=>s==="calendar"?U(M,1):U(M,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let $;t[16]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(xt,{size:16}),t[16]=$):$=t[16];let _;t[17]!==S||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",onClick:S,"aria-label":N,children:$}),t[17]=S,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ut,{size:16}),t[22]=C):C=t[22];let L;t[23]!==d||t[24]!==k?(L=n.jsx(tt,{variant:"ghost",size:"icon",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=L):L=t[25];const R=mt[a.getMonth()];let A;t[26]!==a?(A=a.getFullYear(),t[26]=a,t[27]=A):A=t[27];let E;t[28]!==R||t[29]!==A?(E=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[R," ",A]}),t[28]=R,t[29]=A,t[30]=E):E=t[30];let j;t[31]!==L||t[32]!==E||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,L,E]}),t[31]=L,t[32]=E,t[33]=y,t[34]=_,t[35]=j):j=t[35];let D;t[36]!==p||t[37]!==l||t[38]!==o?(D=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(bt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=D):D=t[39];let V;t[40]===Symbol.for("react.memo_cache_sentinel")?(V=M=>{(M==="calendar"||M==="timeline")&&i(M)},t[40]=V):V=t[40];let F;t[41]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(lt,{}),t[41]=F):F=t[41];let w;t[42]!==o?(w=o("sandbox.variantCalendar.calendarMode"),t[42]=o,t[43]=w):w=t[43];let P;t[44]!==w?(P=n.jsxs(ot,{value:"calendar",children:[F,w]}),t[44]=w,t[45]=P):P=t[45];let B;t[46]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(gt,{}),t[46]=B):B=t[46];let I;t[47]!==o?(I=o("sandbox.variantCalendar.timelineMode"),t[47]=o,t[48]=I):I=t[48];let O;t[49]!==I?(O=n.jsxs(ot,{value:"timeline",children:[B,I]}),t[49]=I,t[50]=O):O=t[50];let H;t[51]!==P||t[52]!==O||t[53]!==s?(H=n.jsxs(Nt,{type:"single",variant:"segmented",size:"sm",value:s,onValueChange:V,children:[P,O]}),t[51]=P,t[52]=O,t[53]=s,t[54]=H):H=t[54];let G;t[55]!==D||t[56]!==H?(G=n.jsxs("div",{className:"flex items-center gap-4",children:[D,H]}),t[55]=D,t[56]=H,t[57]=G):G=t[57];let z;t[58]!==j||t[59]!==G?(z=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,G]}),t[58]=j,t[59]=G,t[60]=z):z=t[60];let W;t[61]!==g||t[62]!==a||t[63]!==p||t[64]!==l||t[65]!==f||t[66]!==s?(W=f.length===0?n.jsx(qt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Qt,{monthStart:a,variants:f,colorMap:g}):n.jsx(ee,{monthStart:a,variants:f,colorMap:g}),t[61]=g,t[62]=a,t[63]=p,t[64]=l,t[65]=f,t[66]=s,t[67]=W):W=t[67];let q;return t[68]!==z||t[69]!==W?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[z,W]}),t[68]=z,t[69]=W,t[70]=q):q=t[70],q}function Wt(e){return e.blockKey}function Ut(e){return!e.openEnd}function Kt(e){return e.openEnd}function Yt(){return pt(new Date)}function qt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(lt,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,st=2,at=28,Jt=6;function Qt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=_t(r),g=kt(new Date);i=ct,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:St.map(Zt)}),t[8]=c):c=t[8],l=f.map((h,x)=>{const b=Et(h,o),S=b.reduce(Xt,0),T=at+S*(et+st)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[h.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=ft(s,d.variant.blockKey),N=at+d.lane*(et+st),$=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ht,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${$}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Jt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let u;return t[13]!==i||t[14]!==m||t[15]!==p?(u=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=u):u=t[16],u}function Xt(e,t){return Math.max(e,t.lane+1)}function Zt(e){return n.jsx("div",{className:"px-2 py-2 text-center",children:e},e)}const J=4,te=32,Y=240;function ee(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const E of o){const j=l.get(E.blockKey)??[];j.push(E),l.set(E.blockKey,j)}const m=Array.from(l.entries()).sort(ne),p=a.getTime()-i.getTime(),u=E=>(Math.max(i.getTime(),Math.min(a.getTime(),E.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(E,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),h=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?u(c):null,x=X(),b=ct,S="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const $=g.map(oe);let _;t[8]!==$?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:$}),t[8]=$,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==h?(C=h!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${h} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-2xs font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=h,t[15]=C):C=t[15];const L=m.map(E=>{const[j,D]=E,V=ft(s,j),F=D[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:F})}),D.map((w,P)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:te},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:V.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:w.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(re)}),(()=>{const B=Math.max(w.start.getTime(),i.getTime()),I=Math.min(w.end.getTime(),a.getTime());if(I<=B)return null;const O=u(new Date(B)),H=u(new Date(I))-O;return n.jsx(ht,{variant:w,color:V,fadeStart:w.openStart,fadeEnd:w.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,width:`calc(${H}% - 2px)`,height:22},children:w.label})})()]})]},P))]},j)});let R;t[16]!==k||t[17]!==C||t[18]!==L?(R=n.jsxs("div",{className:T,children:[k,C,L]}),t[16]=k,t[17]=C,t[18]=L,t[19]=R):R=t[19];let A;return t[20]!==b||t[21]!==R?(A=n.jsx(b,{className:S,children:R}),t[20]=b,t[21]=R,t[22]=A):A=t[22],A}function re(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function oe(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs text-muted-foreground border-r last:border-r-0",children:[mt[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function ne(e,t){return e[0].localeCompare(t[0])}export{cn as VariantCalendar};
@@ -1 +0,0 @@
1
- import{aj as x,ah as p}from"./secret-ciphertext-CI3Fu2ro.js";const d="x-deco-matchers-override";function f({pageKey:t,prefix:n,variants:e,selectedIndex:r,decofile:a,meta:c}){if(!t||r<0||r>=e.length)return[];const o=[];for(let i=0;i<=r;i++){const u=e[i];if(!u)continue;const s=u.rule,l=i===r?"1":"0",m=(x(s,a,c)?p(s,a,c):null)??`${t}@${n}.${i}.rule`;o.push(`${m}=${l}`)}return o}function R(t,n,e,r){return!n.multivariate||n.variants.length<=1?[]:f({pageKey:t,prefix:"sections.variants",variants:n.variants,selectedIndex:n.index,decofile:e,meta:r})}function b({pageKey:t,page:n,sectionIndex:e,sectionLazy:r,mvObj:a,selectedVariantIndex:c,decofile:o,meta:i}){if(e<0)return[];const s=`${n.multivariate?`sections.variants.${n.index}.value`:"sections"}.${e}${r?".section":""}.variants`,l=Array.isArray(a.variants)?a.variants:[];return f({pageKey:t,prefix:s,variants:l,selectedIndex:c,decofile:o,meta:i})}function A(t,n){const e=`${n}@`;return t.map(r=>r.startsWith(e)?`props.${r.slice(e.length)}`:r)}function _(t,n){if(n.length===0)return t;try{const e=new URL(t,"http://local");e.searchParams.delete(d);for(const r of n)e.searchParams.append(d,r);return t.startsWith("http")?e.toString():`${e.pathname}${e.search}${e.hash}`}catch{return t}}const h="__variant=";function v(t,n,e){return`${t}@${n}=${e}`}function O(t,n){return!t||!n.multivariate||n.variants.length<=1?[]:n.index<0||n.index>=n.variants.length?[]:[v(t,"sections",n.index)]}function S(t){const n=Array.isArray(t.mvObj.variants)?t.mvObj.variants:[];if(!t.pageKey||t.sectionIndex<0)return[];if(t.selectedVariantIndex<0||t.selectedVariantIndex>=n.length)return[];const r=`${t.page.multivariate?`sections.variants.${t.page.index}.value`:"sections"}.${t.sectionIndex}${t.sectionLazy?".section":""}`;return[v(t.pageKey,r,t.selectedVariantIndex)]}function V(t){return encodeURIComponent(t).replace(/[!'()*]/g,n=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`)}function $(t,n){const e=t.lastIndexOf("@");if(e<=0)return t;const r=t.slice(0,e),a=r.indexOf("?"),c=a===-1?r:r.slice(0,a),i=[...a===-1?[]:r.slice(a+1).split("&").filter(s=>s&&!s.startsWith(h)),...n.map(s=>h+V(s))],u=i.length>0?`?${i.join("&")}`:"";return`${c}${u}${t.slice(e)}`}function I(t,n){if(n.length===0)return null;try{const e=new URL(t),r=e.hostname==="[::1]"?`localhost${e.port?`:${e.port}`:""}`:e.host;return $(`${r}${e.pathname}@local`,n)}catch{return null}}function w(t,n){if(n.length===0)return t;try{const e=new URL(t),r=e.searchParams.get("__draft");return!r||r==="off"?t:(e.searchParams.set("__draft",$(r,n)),e.toString())}catch{return t}}export{w as a,I as b,O as c,R as d,S as e,b as f,A as i,_ as w};
@@ -1 +0,0 @@
1
- import{U as I}from"./url-slug-DfovzTSP.js";import{aF as t,aG as e,aZ as l,b_ as a,bY as s,bZ as o,d5 as c,d1 as d,ek as A,d7 as R,c$ as w}from"./index-DcU2uHG-.js";const g=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),b=500,v=200,k=200,_=20,U=50,E=100,P=20,T=100,C=300,N=100,V=8192,y=g.extend({selected_tools:a(e()).max(b).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(b).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(b).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),O=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),D=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),w()).optional()})}),S=o(["overview","reports","board","site-editor","assets","releases","hosting","e2e","analytics","cdn","automations","experiments"]),le=o(["on","off"]),L=new Map([["manual","on"],["auto","on"]]),X=o(["on","off","manual","auto"]);function F(n){if(!n)return null;const i=L.get(n);return i||(n==="on"||n==="off"?n:null)}const B=t({defaultMainView:t({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:s().nullable().optional(),cmsDefaultOpen:s().nullable().optional(),cms:X.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:a(S).max(10).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:a(D).max(P).optional()});function re(n){return F(n?.cms)??"on"}function ce(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const h=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),w()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),H=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(O).max(E).nullable().optional(),layout:B.nullable().optional(),homeTile:h.nullable().optional(),homeTiles:a(h).max(_).nullable().optional(),homePrompts:a(e()).max(U).nullable().optional()}),j=/^[A-Za-z_][A-Za-z0-9_]*$/,f=e().min(1).regex(j,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),z=R("kind",[t({key:f,kind:c("literal"),value:e().max(V)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),q=t({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:a(z).max(N).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),K=t({url:e().describe("Repository URL, including its provider host"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),G=o(["agent-sandbox","local-api"]),W={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:l().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:t({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},x=t(W);function de(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,u]of Object.entries(i))if(!(!u||typeof u!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=x.parse(u)}catch{}return r}const Z=d(e().describe("userId"),d(e().describe("branch"),A(G,x))),Y=t({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:o(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:l().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),$=a(Y).max(T).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),J=o(["smart","code-review","open"]),Q=J.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),ee=s().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),te=s().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),ae=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),ne=t({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp")}),ie=a(ne).max(C).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(k).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),ui:H.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),repository:K.nullable().optional().describe("Linked repository"),runtime:q.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:$,siteSlug:e().nullable().optional().describe("The project's site id (asset tenancy, CDN paths, site tokens). Set once when the site is created or imported; any write that would change it is refused."),publishPolicy:Q,previewServerUrl:ae,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:s().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:ee,releases:ie,fastPreviewInPlace:te},pe=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),url_slug:e().nullable().optional().describe("Name of the project in Studio URLs, unique in the organization"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:Z.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(g).describe("Connections with their selected tools, resources, and prompts")}),M=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(v).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(M).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),url_slug:I.nullish().describe("New URL slug. The old one keeps redirecting. Renaming does not change it. null keeps the current slug."),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(v).optional().describe("New connections (replaces existing)"),prompts:a(M).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{le as C,j as E,C as R,pe as V,de as p,re as r,ce as w};