decocms 4.561.0 → 4.562.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/dist/client/assets/{AlertCircle-DlXniLTL.js → AlertCircle-Cwj2JDLb.js} +1 -1
  2. package/dist/client/assets/{AreaChart-9TAFJEQT.js → AreaChart-M71cxP0N.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DIqRNJY3.js → ArrowLeft-D6im8CSl.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-Cy-4CLBm.js → ArrowUp-zoWFBt83.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-pC5Ct2Py.js → CartesianChart-CkRq1ukN.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-ChT3v5_x.js → CategoricalChart-CJyVrm-b.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DdQJ6K1s.js → CheckCircle-Dycaqr3_.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-DJwn4vk3.js → ChevronSelectorVertical-Cq__IjWt.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-0ZUNuXoh.js → ChevronUp-B0uKxpVg.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-BzR1cQHR.js → CreditCard01-CMHPxKus.js} +1 -1
  11. package/dist/client/assets/{Globe04-DgADHmww.js → Globe04-BLpPYUUd.js} +1 -1
  12. package/dist/client/assets/{Key01-BnGTLStV.js → Key01-KS2Cdqso.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-DuElxfIa.js → LinkBroken01-CFo-1erV.js} +1 -1
  14. package/dist/client/assets/{Minus-DKEGggSd.js → Minus-CR14C6Ew.js} +1 -1
  15. package/dist/client/assets/{Monitor01-RPmPp9yV.js → Monitor01-PjSuNm4O.js} +1 -1
  16. package/dist/client/assets/{Play-CCrxvWEX.js → Play-DAD0wkps.js} +1 -1
  17. package/dist/client/assets/{Plus-Dwl0ymG8.js → Plus-Caq968Zm.js} +1 -1
  18. package/dist/client/assets/{ReferenceLine-DLcYrvmE.js → ReferenceLine-DEAQfOjW.js} +1 -1
  19. package/dist/client/assets/{SearchMd-Cf7uAP7Q.js → SearchMd-BionSqTl.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-lKolYH3w.js → ShoppingBag01-DUpALglE.js} +1 -1
  21. package/dist/client/assets/{Sun-CLH4DOsz.js → Sun-x19ShBxe.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-AyEyHl5j.js → SwitchHorizontal01-Dghq_Bvd.js} +1 -1
  23. package/dist/client/assets/{Tool01-D54u8MkG.js → Tool01-GdBdG6P_.js} +1 -1
  24. package/dist/client/assets/{Tooltip-CDBpzwgt.js → Tooltip-CDDThlKy.js} +1 -1
  25. package/dist/client/assets/{Trash01-CLcCE4W6.js → Trash01-DhMVlpac.js} +1 -1
  26. package/dist/client/assets/{Upload01-CQ4MgovG.js → Upload01-hsehoAUh.js} +1 -1
  27. package/dist/client/assets/{UserSquare-DorunsHP.js → UserSquare-T5uOviXx.js} +1 -1
  28. package/dist/client/assets/{Users01-mVHDEY41.js → Users01-DDaeVlhF.js} +1 -1
  29. package/dist/client/assets/{XClose-DJErxj2G.js → XClose-NmocES7U.js} +1 -1
  30. package/dist/client/assets/{Zap-C1zrSwKR.js → Zap-aTbgq59l.js} +1 -1
  31. package/dist/client/assets/{access-gate-C2fRlAo_.js → access-gate-CpAtBb_h.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-vc7esFXt.js → add-connection-dialog-BFqv_pWT.js} +1 -1
  33. package/dist/client/assets/agent-app-ZW_Vm-c7.js +1 -0
  34. package/dist/client/assets/{agent-assets-7ydz3P8Q.js → agent-assets-kQe7VufN.js} +1 -1
  35. package/dist/client/assets/{agent-automation-BU4egU3g.js → agent-automation-7-KjK-1c.js} +1 -1
  36. package/dist/client/assets/{agent-automations-LhCkKpX3.js → agent-automations-DnNwxwTt.js} +1 -1
  37. package/dist/client/assets/agent-calendar-CbAiDaBT.js +1 -0
  38. package/dist/client/assets/{agent-capabilities-C_fHyyST.js → agent-capabilities-DKq2l6j_.js} +1 -1
  39. package/dist/client/assets/{agent-connect-sources-B6vNvPYt.js → agent-connect-sources-SuTyB8Qe.js} +1 -1
  40. package/dist/client/assets/agent-deck-8VVMhl7J.js +1 -0
  41. package/dist/client/assets/{agent-e2e-Bqq8mI7x.js → agent-e2e-C9FJgu1a.js} +1 -1
  42. package/dist/client/assets/{agent-file-Bi75RtUP.js → agent-file-D5ZobkO7.js} +1 -1
  43. package/dist/client/assets/{agent-hosting-BoJ7XB5h.js → agent-hosting-Df5G-pNf.js} +1 -1
  44. package/dist/client/assets/{agent-icon-qder0a6G.js → agent-icon-DD6O0sln.js} +1 -1
  45. package/dist/client/assets/agent-library-C_HTRhOS.js +1 -0
  46. package/dist/client/assets/agent-library-file-8gKy0Im-.js +1 -0
  47. package/dist/client/assets/agent-overview-CSsPaJjm.js +1 -0
  48. package/dist/client/assets/{agent-releases-Bd2Tpw8T.js → agent-releases-6IDVzk1I.js} +1 -1
  49. package/dist/client/assets/agent-settings-uWS3yWiw.js +1 -0
  50. package/dist/client/assets/{agent-site-editor-CDMr8brx.js → agent-site-editor-YGSo4JHf.js} +1 -1
  51. package/dist/client/assets/agent-site-editor-code-wtgSW_Bw.js +2 -0
  52. package/dist/client/assets/agent-site-editor-content-BC5jgNMj.js +1 -0
  53. package/dist/client/assets/agent-site-editor-preview-Dd0H-yKP.js +1 -0
  54. package/dist/client/assets/agent-view-C4jCWfsN.js +1 -0
  55. package/dist/client/assets/{agent-view-guard-PjkyYQIO.js → agent-view-guard-Ud9RVhUT.js} +1 -1
  56. package/dist/client/assets/{ai-providers-dLqMBFxg.js → ai-providers-CdWvTe6E.js} +1 -1
  57. package/dist/client/assets/{alert-CngVua4h.js → alert-rSlkmSpl.js} +1 -1
  58. package/dist/client/assets/{analytics-sections-B89f2wMG.js → analytics-sections-CdJGMHGj.js} +1 -1
  59. package/dist/client/assets/{api-keys-Dw9LLspW.js → api-keys-CgV7T2W3.js} +1 -1
  60. package/dist/client/assets/api-keys-CmWPTVBS.js +1 -0
  61. package/dist/client/assets/{app-editor-DjCF4o53.js → app-editor-DQrUb2qq.js} +1 -1
  62. package/dist/client/assets/{asset-utils-uyXmTXD2.js → asset-utils-DJaTbmOK.js} +1 -1
  63. package/dist/client/assets/{auth-DXM0rgLv.js → auth-Dfx2bf9S.js} +1 -1
  64. package/dist/client/assets/{auth-catchall-D6YH9v93.js → auth-catchall-BzI646tE.js} +1 -1
  65. package/dist/client/assets/{auth-entry-n3NnpIVo.js → auth-entry-BA2dv7O1.js} +1 -1
  66. package/dist/client/assets/{auth-split-layout-CabbHOl5.js → auth-split-layout-3t1_TKos.js} +1 -1
  67. package/dist/client/assets/{authenticate-and-persist-oauth-C_fCYd84.js → authenticate-and-persist-oauth-EuyAX3Gy.js} +1 -1
  68. package/dist/client/assets/{automation-list-row-BE7Mtfuu.js → automation-list-row-BK5XD6ZY.js} +1 -1
  69. package/dist/client/assets/{automation-runs-C__qlbXc.js → automation-runs-BekfbsHI.js} +1 -1
  70. package/dist/client/assets/{automations-BAFxOc2Y.js → automations-ocOVuWpR.js} +1 -1
  71. package/dist/client/assets/{autosend-BuzWxJ_9.js → autosend-BLYIlkXq.js} +1 -1
  72. package/dist/client/assets/{badge-CM9VoPn3.js → badge-9UZ-oy57.js} +1 -1
  73. package/dist/client/assets/{block-document-BlNqArtF.js → block-document-B5Xpou_B.js} +1 -1
  74. package/dist/client/assets/{blocks-preview-workspace-context-cN8B_PL1.js → blocks-preview-workspace-context-CGoI0EUn.js} +1 -1
  75. package/dist/client/assets/{blocks-tab-states-DhWZqku3.js → blocks-tab-states-CNkB95lx.js} +1 -1
  76. package/dist/client/assets/{blog-schema-CWB6DzeS.js → blog-schema-DMB79fe6.js} +1 -1
  77. package/dist/client/assets/{buckets-CtjG5O0U.js → buckets-C5e8GKB5.js} +1 -1
  78. package/dist/client/assets/{build-improve-prompt-doc-BscLA4ml.js → build-improve-prompt-doc-aExDV9Mz.js} +1 -1
  79. package/dist/client/assets/{calendar-ng2FQ19x.js → calendar-CKcdkgh5.js} +1 -1
  80. package/dist/client/assets/{capability-load-error-BlktRdv_.js → capability-load-error-D8AT7eAw.js} +1 -1
  81. package/dist/client/assets/{category-editor-BaahwiYp.js → category-editor-DDFXYf_d.js} +1 -1
  82. package/dist/client/assets/{chart-BWR8wMN7.js → chart-Ch4wXn1G.js} +1 -1
  83. package/dist/client/assets/{chat-context-CbLWEfcx.js → chat-context-tsaqCp6v.js} +1 -1
  84. package/dist/client/assets/{chat-draft-CqQowXE0.js → chat-draft-DeOYn8wH.js} +1 -1
  85. package/dist/client/assets/{checkbox-CLe06xtZ.js → checkbox-bO8ZnM7n.js} +1 -1
  86. package/dist/client/assets/{choose-editor-CNAJrAnR.js → choose-editor-B-1DX2pl.js} +1 -1
  87. package/dist/client/assets/{cli-auth-success-D6HLf98p.js → cli-auth-success-WUcj8Laj.js} +1 -1
  88. package/dist/client/assets/{client-icons-DYF7aeKo.js → client-icons-CJKwmsS5.js} +1 -1
  89. package/dist/client/assets/{cms-settings-editor-CBbwxc0o.js → cms-settings-editor-CL1HXF3j.js} +1 -1
  90. package/dist/client/assets/cms-store-drafts-C_ZG08jQ.js +1 -0
  91. package/dist/client/assets/{collapsible-t9cEILA0.js → collapsible-CehJ-xlR.js} +1 -1
  92. package/dist/client/assets/{collection-detail-ByZqmhXB.js → collection-detail-w7NYTWNb.js} +1 -1
  93. package/dist/client/assets/{collection-display-button-B7jvkHFb.js → collection-display-button-CVOVdzmi.js} +1 -1
  94. package/dist/client/assets/{collection-search-DVuo1pjJ.js → collection-search-Lm88VC-w.js} +1 -1
  95. package/dist/client/assets/{collection-table-wrapper-Cy5iDhCR.js → collection-table-wrapper-LUTykEyP.js} +1 -1
  96. package/dist/client/assets/{collection-tabs-DJVITgIT.js → collection-tabs-BW9NTpao.js} +1 -1
  97. package/dist/client/assets/{combobox-MSjb-buw.js → combobox-C8IS_aP5.js} +1 -1
  98. package/dist/client/assets/{command-3SMlch0Q.js → command-B42vqDSm.js} +1 -1
  99. package/dist/client/assets/{companion-mcps-section-be246Qaj.js → companion-mcps-section-gN7svOR8.js} +1 -1
  100. package/dist/client/assets/{config-DtxU1wmQ.js → config--cZAprAj.js} +1 -1
  101. package/dist/client/assets/{connect-e7sohufh.js → connect-BAZtz6qy.js} +1 -1
  102. package/dist/client/assets/{connect-layout-CYf0yreo.js → connect-layout-FGHNVpHc.js} +1 -1
  103. package/dist/client/assets/{connect-source-dialog-BT6gBx-j.js → connect-source-dialog-BlacChCY.js} +1 -1
  104. package/dist/client/assets/{connection-Bu1PnSek.js → connection-Brtus8mh.js} +1 -1
  105. package/dist/client/assets/{connection-card-twsNz0iZ.js → connection-card-CSkWTxJN.js} +1 -1
  106. package/dist/client/assets/{connection-detail-DzTu69ud.js → connection-detail-Dz92Js40.js} +1 -1
  107. package/dist/client/assets/{connection-form-helpers-B0xDJFtW.js → connection-form-helpers-CQaJSXmJ.js} +1 -1
  108. package/dist/client/assets/{connection-slug-CfDtYvgF.js → connection-slug-DREkgXeA.js} +1 -1
  109. package/dist/client/assets/{connections-DLef9v48.js → connections-BZUJ_roU.js} +1 -1
  110. package/dist/client/assets/{content-tab-BBa6VyOA.js → content-tab-Bc_Tg1a4.js} +3 -3
  111. package/dist/client/assets/{context-CUfU0IjI.js → context-2NK4t-Lg.js} +1 -1
  112. package/dist/client/assets/{context-menu-BsNBSqQT.js → context-menu-D-JkcRvL.js} +1 -1
  113. package/dist/client/assets/{context-shell-D4IkyI4F.js → context-shell-Bwve3xDx.js} +3 -3
  114. package/dist/client/assets/{core.esm-BWCUlskR.js → core.esm-ByTukYOF.js} +1 -1
  115. package/dist/client/assets/{create-organization-dialog-C-miI-DE.js → create-organization-dialog-BIe1f-Sz.js} +1 -1
  116. package/dist/client/assets/{device-hint-BAl-Wimj.js → device-hint-Djy4F7LR.js} +1 -1
  117. package/dist/client/assets/{discover-BkKaKiee.js → discover-D050EtE3.js} +1 -1
  118. package/dist/client/assets/{domain-settings-m3KQ6IUr.js → domain-settings-DPbJEdjs.js} +1 -1
  119. package/dist/client/assets/{drawer-D47Dw-K5.js → drawer-Dijofbhl.js} +1 -1
  120. package/dist/client/assets/{editor-BWpbvGUJ.js → editor-BODVgWYK.js} +1 -1
  121. package/dist/client/assets/{editor-classes-J2Hl0Yqy.js → editor-classes-BdpfcKyR.js} +1 -1
  122. package/dist/client/assets/{empty-state-CibwE54W.js → empty-state-CwfRxt_B.js} +1 -1
  123. package/dist/client/assets/{empty-state-Z2OuiQOQ.js → empty-state-Drt9QRbX.js} +1 -1
  124. package/dist/client/assets/{extract-connection-data-CY3M43Pj.js → extract-connection-data-Pe-Tip3g.js} +1 -1
  125. package/dist/client/assets/{feature-gate-DIw-mvZ7.js → feature-gate-2Z3FyCIy.js} +1 -1
  126. package/dist/client/assets/{feature-paywall-CFzfdEnd.js → feature-paywall-CpM-erQe.js} +1 -1
  127. package/dist/client/assets/{feedback-ACIX3HAK.js → feedback-DcWPFhR_.js} +1 -1
  128. package/dist/client/assets/{file-explorer-imOCcEy6.js → file-explorer-xWdf34ip.js} +1 -1
  129. package/dist/client/assets/{file-preview-DrvqFq0i.js → file-preview-Ca_4k6rv.js} +1 -1
  130. package/dist/client/assets/{file-share-button-Ck8dYa4c.js → file-share-button-DgOCZ5mM.js} +1 -1
  131. package/dist/client/assets/{file-type-icon-CpyvcXG2.js → file-type-icon-DiS0iV28.js} +1 -1
  132. package/dist/client/assets/{folder-icon-D2Q0oygq.js → folder-icon-swAD3bQU.js} +1 -1
  133. package/dist/client/assets/{form-Di6X4re-.js → form-CRja9i9j.js} +1 -1
  134. package/dist/client/assets/{general-B7NplQZY.js → general-C7SfdAAF.js} +1 -1
  135. package/dist/client/assets/{github-icon-CgGTVNey.js → github-icon-tpEVyIwD.js} +1 -1
  136. package/dist/client/assets/{home-jKie_yX3.js → home-DsrjQvGT.js} +1 -1
  137. package/dist/client/assets/{home-overview-B95RCjGn.js → home-overview-CMI03yPH.js} +1 -1
  138. package/dist/client/assets/{hosted-reconcile-DTemoIcy.js → hosted-reconcile-BnVn2LVL.js} +1 -1
  139. package/dist/client/assets/{icon-button-DNR19rRF.js → icon-button-BZ9f2Pt9.js} +1 -1
  140. package/dist/client/assets/{index-DmZ8PTrQ.js → index-68Cr2r1N.js} +1 -1
  141. package/dist/client/assets/{index-CDR02Ldc.js → index-B8Pa92mK.js} +1 -1
  142. package/dist/client/assets/{index-CAJzXKA5.js → index-BGom2FnM.js} +1 -1
  143. package/dist/client/assets/{index-DjbHauib.js → index-BW7-bbk0.js} +1 -1
  144. package/dist/client/assets/{index-C1J7wkkB.js → index-C2wTYLQr.js} +1 -1
  145. package/dist/client/assets/{index-wHHWd0G4.js → index-CZXPJi4-.js} +1 -1
  146. package/dist/client/assets/{index-KR4p316Z.js → index-CbuCRTrW.js} +1 -1
  147. package/dist/client/assets/{index-B80PkxJB.js → index-CcZq_9Fb.js} +1 -1
  148. package/dist/client/assets/{index-CoIqGnkT.js → index-Cvc22Qvh.js} +6 -6
  149. package/dist/client/assets/{index-RA-jAYZL.js → index-D-DRzVEB.js} +1 -1
  150. package/dist/client/assets/{index-NrdVW9bX.js → index-D0G5dFqT.js} +1 -1
  151. package/dist/client/assets/{index-Czbh2wlZ.js → index-DQAtcq3Z.js} +1 -1
  152. package/dist/client/assets/{index-CDNgDa9K.js → index-Dt7ZIwRY.js} +1 -1
  153. package/dist/client/assets/{index-C3pJvzEE.js → index-Dw1u8oXT.js} +1 -1
  154. package/dist/client/assets/{index-DQFlQUCO.js → index-LnWr599j.js} +1 -1
  155. package/dist/client/assets/{index-Z0F9sezb.js → index-Z8XjhDCo.js} +1 -1
  156. package/dist/client/assets/{index-redirect-DB9ebXs9.js → index-redirect-PbFd_QHU.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-DAKXTyVS.js → infiniteQueryObserver-CmujZk55.js} +1 -1
  158. package/dist/client/assets/{infra-billing-Dn3vHYmi.js → infra-billing-BlZrBUYP.js} +1 -1
  159. package/dist/client/assets/{input-oiyfOdq_.js → input-C7_FCkgY.js} +3 -3
  160. package/dist/client/assets/{input-8jGMlXl7.js → input-D6ZRMHIB.js} +1 -1
  161. package/dist/client/assets/{integration-icon-DwBMZgrw.js → integration-icon-DMt85Vdd.js} +1 -1
  162. package/dist/client/assets/{jira-icon-IS61wuXe.js → jira-icon-C0C7R9Uf.js} +1 -1
  163. package/dist/client/assets/{label-Cz3ISXTG.js → label-RB5C5N6z.js} +1 -1
  164. package/dist/client/assets/{layout-CqB0N585.js → layout-CBfnb3CZ.js} +1 -1
  165. package/dist/client/assets/{legacy-agents-deep-CEAUs1Ab.js → legacy-agents-deep-zWqSTSjP.js} +1 -1
  166. package/dist/client/assets/{legacy-main-redirect-ByWdLVJx.js → legacy-main-redirect-BZlpoESe.js} +1 -1
  167. package/dist/client/assets/library-pMQg4GCR.js +1 -0
  168. package/dist/client/assets/{library-tab-BAPbFjTT.js → library-tab-C7gKe5iN.js} +1 -1
  169. package/dist/client/assets/{login-yJ2gJF93.js → login-D9zRzHBo.js} +1 -1
  170. package/dist/client/assets/{markdown-BzJtnofQ.js → markdown-HhU9_nSI.js} +1 -1
  171. package/dist/client/assets/{mcp-app-renderer-BrjPpO12.js → mcp-app-renderer-DeLjk14w.js} +1 -1
  172. package/dist/client/assets/{mcp-oauth-DseEuoup.js → mcp-oauth-C-i6IZ7F.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-O8kCHxpg.js → mcp-oauth-DLwsgkOm.js} +1 -1
  174. package/dist/client/assets/{members-3k5dxXet.js → members-DocomT72.js} +1 -1
  175. package/dist/client/assets/{memory-BamorpT0.js → memory-BP3-K3oo.js} +1 -1
  176. package/dist/client/assets/{mock-board-scAFzBl7.js → mock-board-CoWf0eSd.js} +3 -3
  177. package/dist/client/assets/{monaco-editor-DOFMDCyC.js → monaco-editor-oUmtqDLR.js} +1 -1
  178. package/dist/client/assets/{monitoring-DjJ3TtUM.js → monitoring-DKfNSCeR.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-BUfFJFpo.js → monitoring-stats-row-XSvwSWAi.js} +1 -1
  180. package/dist/client/assets/{multi-select-DfedcXqi.js → multi-select-CISJC82c.js} +1 -1
  181. package/dist/client/assets/{mustache-C2jWivSN.js → mustache-D4zVU9iA.js} +1 -1
  182. package/dist/client/assets/{named-rule-view-BKpXrbcs.js → named-rule-view-BTwHmZ5L.js} +1 -1
  183. package/dist/client/assets/{new-project-dialog-CYkZ_7Mu.js → new-project-dialog-BA0jmhgS.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-YciRSKJB.js → oauth-callback-C1NevZMJ.js} +1 -1
  185. package/dist/client/assets/{oauth-callback-ai-provider-C-QzMEVu.js → oauth-callback-ai-provider-BJwoy8qA.js} +1 -1
  186. package/dist/client/assets/{oauth-consent-X72D0Xq8.js → oauth-consent-BTT41r6l.js} +1 -1
  187. package/dist/client/assets/{onboarding-DLH1z-Ha.js → onboarding-C2uIwwWY.js} +1 -1
  188. package/dist/client/assets/{openai-conversation-DUFicgp3.js → openai-conversation-pUSF1vof.js} +1 -1
  189. package/dist/client/assets/{optimistic-project-sidebar-views-BGyFPmWx.js → optimistic-project-sidebar-views-BnUNFsLR.js} +1 -1
  190. package/dist/client/assets/{order-monitor-day-BEhzJJLC.js → order-monitor-day-BzMajB7Y.js} +1 -1
  191. package/dist/client/assets/{organization-choice-sGtkKPK1.js → organization-choice-5ra3ZqkQ.js} +1 -1
  192. package/dist/client/assets/{orgs-DzNGZq3U.js → orgs-ZeqGcjOU.js} +1 -1
  193. package/dist/client/assets/{own-accounts-section-BpXuuW62.js → own-accounts-section-Dd8ELrvu.js} +1 -1
  194. package/dist/client/assets/{pair-DRdkhABe.js → pair-Bx1LbJmC.js} +1 -1
  195. package/dist/client/assets/{parse-sections-DpGddWrT.js → parse-sections-BTDQNPKy.js} +3 -3
  196. package/dist/client/assets/{plan-Cs7MSJD8.js → plan-bz8_rmrJ.js} +1 -1
  197. package/dist/client/assets/{plan-ladder-D5AQfuNm.js → plan-ladder-CZUMQESY.js} +1 -1
  198. package/dist/client/assets/{plan-usage-card-dKMEumDo.js → plan-usage-card-SygAb3OS.js} +1 -1
  199. package/dist/client/assets/{popover-C20V6lAt.js → popover-D5YX99Kp.js} +1 -1
  200. package/dist/client/assets/{post-calendar-bcG8oRix.js → post-calendar-BIBU13NF.js} +1 -1
  201. package/dist/client/assets/{post-editor-DzpUG7aB.js → post-editor-BAf1z147.js} +1 -1
  202. package/dist/client/assets/{preview-content-RCgFW_sl.js → preview-content-TDEad-bh.js} +1 -1
  203. package/dist/client/assets/{preview-dialog-rActp1mK.js → preview-dialog-BkHpQdXG.js} +1 -1
  204. package/dist/client/assets/{preview-panel-CRI13pwa.js → preview-panel-DduOnxXk.js} +1 -1
  205. package/dist/client/assets/{preview-tab-Cos61Cco.js → preview-tab-Cgfndmyh.js} +3 -3
  206. package/dist/client/assets/{product-picker-dialog-C2osTe5y.js → product-picker-dialog-DDkB9ByB.js} +1 -1
  207. package/dist/client/assets/{profile-CfiCAfn9.js → profile-DHJVxDvo.js} +1 -1
  208. package/dist/client/assets/{project-app-view-8qcY_2-I.js → project-app-view-BfcPf6du.js} +1 -1
  209. package/dist/client/assets/{project-apps-DedVk-Nz.js → project-apps-Bny6_T2A.js} +1 -1
  210. package/dist/client/assets/{project-icon-Uszb7VXV.js → project-icon-eZOGIGwj.js} +1 -1
  211. package/dist/client/assets/{project-index-DxnUyMmA.js → project-index-BSMjLbxc.js} +1 -1
  212. package/dist/client/assets/project-reports-BzA8d8hO.js +1 -0
  213. package/dist/client/assets/{project-sidebar-views-Deemwf6B.js → project-sidebar-views-CrRbPbLq.js} +1 -1
  214. package/dist/client/assets/project-tasks-BCE2SgoF.js +1 -0
  215. package/dist/client/assets/{projects-DgaT7j1o.js → projects-D7HB1QKY.js} +1 -1
  216. package/dist/client/assets/{projects-empty-state-B9m6wSpL.js → projects-empty-state-DBWek16Y.js} +1 -1
  217. package/dist/client/assets/{prompts-DRqjf0OJ.js → prompts-MMmII7eb.js} +1 -1
  218. package/dist/client/assets/record-editor-DVouiUmR.js +1 -0
  219. package/dist/client/assets/{redirect-editor-BlBkzrUB.js → redirect-editor-cm3-huyu.js} +1 -1
  220. package/dist/client/assets/reports-BHAVwnBG.js +1 -0
  221. package/dist/client/assets/{reports-BxHeWjsA.js → reports-D0VzI1C_.js} +1 -1
  222. package/dist/client/assets/{reports-onboarding-BF03h6Lz.js → reports-onboarding-DonafHiF.js} +1 -1
  223. package/dist/client/assets/{reports-tab-C8lpsYgo.js → reports-tab-Wl9IyKm6.js} +2 -2
  224. package/dist/client/assets/{repositories-vjVPQ6I9.js → repositories-9kTJbSW8.js} +1 -1
  225. package/dist/client/assets/repositories-bPxFm30V.js +1 -0
  226. package/dist/client/assets/{repository-binding-CyaIIWjt.js → repository-binding-B7A7NBUB.js} +1 -1
  227. package/dist/client/assets/{repository-picker-ERyaEscX.js → repository-picker-CI7xSsin.js} +1 -1
  228. package/dist/client/assets/{require-capability-DrZOeXFb.js → require-capability-BTBUQsVM.js} +1 -1
  229. package/dist/client/assets/{required-auth-layout-OBk7IzAK.js → required-auth-layout-ClYF4eFR.js} +1 -1
  230. package/dist/client/assets/{reset-password-DDidguVk.js → reset-password-Ah3K7D-l.js} +1 -1
  231. package/dist/client/assets/{resizable-CHAafS5W.js → resizable-DzzgKGKP.js} +1 -1
  232. package/dist/client/assets/{resolve-tab-icon-DwPVAW_f.js → resolve-tab-icon-DMbVCUvi.js} +1 -1
  233. package/dist/client/assets/{review-settings-bYHupYo-.js → review-settings-Fxdols3J.js} +1 -1
  234. package/dist/client/assets/{role-color-BSeNtGi1.js → role-color-CEkb11P4.js} +1 -1
  235. package/dist/client/assets/{roles-BJ9XswSj.js → roles-CqJ0hOtT.js} +1 -1
  236. package/dist/client/assets/route-BA7jjOjA.js +1 -0
  237. package/dist/client/assets/{route-D1kSARK4.js → route-DGCMYgfH.js} +1 -1
  238. package/dist/client/assets/route-DJbiUXJl.js +1 -0
  239. package/dist/client/assets/{sandbox-lifecycle-context-DPyi5-UY.js → sandbox-lifecycle-context-WaQV2LhH.js} +1 -1
  240. package/dist/client/assets/{schema-BR70Vo5Y.js → schema-BH82js-o.js} +1 -1
  241. package/dist/client/assets/{schema-y4LFWED4.js → schema-DHahXPsT.js} +1 -1
  242. package/dist/client/assets/{scroll-area-DbCNV5xq.js → scroll-area-BN87AboJ.js} +1 -1
  243. package/dist/client/assets/{search-input-Bx2x3uO8.js → search-input-BBYghT-z.js} +1 -1
  244. package/dist/client/assets/{search-toggle-NGIVu4q_.js → search-toggle-pLnMgrhP.js} +1 -1
  245. package/dist/client/assets/{secret-picker-DUPig2Xn.js → secret-picker-DWWFQJzg.js} +1 -1
  246. package/dist/client/assets/{secrets-BZFZm3tO.js → secrets-CM4b3_qA.js} +1 -1
  247. package/dist/client/assets/{sections-DP49hK6v.js → sections-CgO1w_IT.js} +1 -1
  248. package/dist/client/assets/{sections-editor-C4o9LGck.js → sections-editor-Uk83RbMN.js} +1 -1
  249. package/dist/client/assets/{select-DR3RwfpI.js → select-GzsOSPza.js} +1 -1
  250. package/dist/client/assets/{select-model-BfVgSLS5.js → select-model-BU2ssn1V.js} +1 -1
  251. package/dist/client/assets/{seo-editor-B0kA-535.js → seo-editor-dMXY0ofk.js} +1 -1
  252. package/dist/client/assets/{separator-DZpsLNey.js → separator-CuwdHpjW.js} +1 -1
  253. package/dist/client/assets/settings-tab-FvtSSyQC.js +1 -0
  254. package/dist/client/assets/{sheet-C0gthVwC.js → sheet-BIQm-3An.js} +1 -1
  255. package/dist/client/assets/{shell-layout-BN9dcRYV.js → shell-layout-CH0j9rog.js} +1 -1
  256. package/dist/client/assets/site-draft-view-C74WkBDm.js +3 -0
  257. package/dist/client/assets/site-editor-CazX9Ijc.js +1 -0
  258. package/dist/client/assets/{site-editor-toast-VaN8V1I2.js → site-editor-toast-DrW9VMK5.js} +1 -1
  259. package/dist/client/assets/{skills-CrNoAgQg.js → skills-C71x-yhC.js} +1 -1
  260. package/dist/client/assets/{slider-C-TEQZK0.js → slider-BTgIuWj6.js} +1 -1
  261. package/dist/client/assets/{sortable.esm-BYS1QaMo.js → sortable.esm-Dd1EVaQb.js} +1 -1
  262. package/dist/client/assets/{sso-BK4lPlbr.js → sso-BfwIPTh8.js} +1 -1
  263. package/dist/client/assets/{suggestion-BGsc91Hz.js → suggestion-CsEyXKDY.js} +1 -1
  264. package/dist/client/assets/{switch-CzTsDB3z.js → switch-BRZA_xq0.js} +1 -1
  265. package/dist/client/assets/{synced-repos-DBjP4HMv.js → synced-repos-Do7bESqI.js} +1 -1
  266. package/dist/client/assets/{tab-icon-glyph-DE2TUhh7.js → tab-icon-glyph-BsVyyg_A.js} +1 -1
  267. package/dist/client/assets/{table-B-mHKzHC.js → table-DJd8n4EY.js} +1 -1
  268. package/dist/client/assets/{tabs-W2tygsn9.js → tabs-D5AMuciq.js} +1 -1
  269. package/dist/client/assets/{task-board-dajPV_XW.js → task-board-DN88kD7h.js} +1 -1
  270. package/dist/client/assets/{task-route-GeZcjNWN.js → task-route-4C0M-4XY.js} +1 -1
  271. package/dist/client/assets/{task-status-TTxT6L0h.js → task-status-B2JNuBbQ.js} +1 -1
  272. package/dist/client/assets/{taskboard-analytics-pPV1Wqb4.js → taskboard-analytics-D_AXxVNg.js} +1 -1
  273. package/dist/client/assets/tasks-BlrmxtrG.js +1 -0
  274. package/dist/client/assets/{tasks-eMCDmtbp.js → tasks-dMEgvkta.js} +1 -1
  275. package/dist/client/assets/{textarea-DH4lLGjS.js → textarea-D7HQlMVo.js} +1 -1
  276. package/dist/client/assets/{thread-analytics-CfsCF0qC.js → thread-analytics-BQjHh_yV.js} +1 -1
  277. package/dist/client/assets/{thread-intent-DsvstIYH.js → thread-intent-Bs-Q7fma.js} +1 -1
  278. package/dist/client/assets/{thread-route-SXxESRM6.js → thread-route-B44higRI.js} +1 -1
  279. package/dist/client/assets/{thread-route-D2x3lEXe.js → thread-route-C-uX4C4C.js} +1 -1
  280. package/dist/client/assets/{thread-sheet-body-DJsgTtYx.js → thread-sheet-body-BNo76_XD.js} +1 -1
  281. package/dist/client/assets/{time-range-picker-CFjr88ku.js → time-range-picker-D4sglVBw.js} +1 -1
  282. package/dist/client/assets/{toggle-group-CtP6sNQ9.js → toggle-group-BBgjmF6C.js} +1 -1
  283. package/dist/client/assets/{tool-namespace-CNnPmHfP.js → tool-namespace-l4eN7YZ5.js} +1 -1
  284. package/dist/client/assets/{tool-set-selector-CnipdprK.js → tool-set-selector-Bi-Sw2KD.js} +1 -1
  285. package/dist/client/assets/{toolbar-icon-button-1M1cEETB.js → toolbar-icon-button-nrUHQe-I.js} +1 -1
  286. package/dist/client/assets/{tooltip-DycNDw2G.js → tooltip-C0GWPsi8.js} +1 -1
  287. package/dist/client/assets/{tooltipContext-BIhnjJZf.js → tooltipContext-DdEokZtY.js} +1 -1
  288. package/dist/client/assets/{track-BCTe4eN0.js → track-29FVOdFL.js} +1 -1
  289. package/dist/client/assets/{types-CUZBmViJ.js → types-DKuFfsqr.js} +1 -1
  290. package/dist/client/assets/{url-slug-DOp56bVw.js → url-slug-5t39ocbn.js} +1 -1
  291. package/dist/client/assets/{usage-stats-DZlhabNT.js → usage-stats-CHeI7dPd.js} +1 -1
  292. package/dist/client/assets/{use-ai-providers-CT41YQMU.js → use-ai-providers-BbVlPdZd.js} +1 -1
  293. package/dist/client/assets/{use-apply-named-rule-BBYkq507.js → use-apply-named-rule-CnOcORn0.js} +1 -1
  294. package/dist/client/assets/use-ask-in-chat-Cp_wqFIx.js +1 -0
  295. package/dist/client/assets/{use-automations-DW8dHpTW.js → use-automations-BoyfX_H0.js} +1 -1
  296. package/dist/client/assets/{use-autosave-Ckpm_M6m.js → use-autosave-CZD-Fkyk.js} +1 -1
  297. package/dist/client/assets/{use-chat-layout-state-PWVkseE_.js → use-chat-layout-state-BC5WrKKn.js} +1 -1
  298. package/dist/client/assets/{use-cms-publish-actions-D2RPgS1y.js → use-cms-publish-actions-BbDVRUuf.js} +1 -1
  299. package/dist/client/assets/{use-connect-companion-AM_jLP9g.js → use-connect-companion-DEAJWvqA.js} +1 -1
  300. package/dist/client/assets/{use-connection-Bc88fzeR.js → use-connection-Dqyf1wn8.js} +1 -1
  301. package/dist/client/assets/{use-content-sync-xOHgSIER.js → use-content-sync-vr73v2b2.js} +1 -1
  302. package/dist/client/assets/{use-copy-BR702L1I.js → use-copy-BGfQrJIh.js} +1 -1
  303. package/dist/client/assets/{use-date-fns-locale-SZQhS1cr.js → use-date-fns-locale-C4jbLuwI.js} +1 -1
  304. package/dist/client/assets/{use-debounced-autosave-DhCDTrxW.js → use-debounced-autosave-BrjHHNNB.js} +1 -1
  305. package/dist/client/assets/{use-debounced-value-DlRWnR28.js → use-debounced-value-BF84eZeF.js} +1 -1
  306. package/dist/client/assets/{use-deco-credits-BmrhY51W.js → use-deco-credits-MCc3vHir.js} +1 -1
  307. package/dist/client/assets/{use-decopilot-events-BHP9on7q.js → use-decopilot-events-uSeDcfUe.js} +1 -1
  308. package/dist/client/assets/{use-delete-connection-a41JhfA0.js → use-delete-connection-CLe-XFxn.js} +1 -1
  309. package/dist/client/assets/{use-deployment-admin-BhTKxM6k.js → use-deployment-admin-ShnoFTNr.js} +1 -1
  310. package/dist/client/assets/{use-entitlements-DU-An4VI.js → use-entitlements-wE65MYfi.js} +1 -1
  311. package/dist/client/assets/{use-fast-preview-draft-url-Bq8X4SK6.js → use-fast-preview-draft-url-BmUgrEyk.js} +1 -1
  312. package/dist/client/assets/{use-file-configs-CGfkm6PJ.js → use-file-configs-D9BR1kJU.js} +1 -1
  313. package/dist/client/assets/{use-id-selection-CMyoYtHh.js → use-id-selection-BcfcmGZl.js} +1 -1
  314. package/dist/client/assets/{use-inbox-feed-B0e0cq4F.js → use-inbox-feed-EYADn16y.js} +1 -1
  315. package/dist/client/assets/{use-infinite-scroll-Camm6qqR.js → use-infinite-scroll-Ds1Wd1cw.js} +1 -1
  316. package/dist/client/assets/{use-join-requests-BIAFYC5s.js → use-join-requests-CkWiAH0i.js} +1 -1
  317. package/dist/client/assets/{use-main-panel-tabs-Be64FM8O.js → use-main-panel-tabs-DTMcBtUc.js} +1 -1
  318. package/dist/client/assets/{use-mcp-auth-status-DBPe1KW6.js → use-mcp-auth-status-DhFx8XVQ.js} +1 -1
  319. package/dist/client/assets/{use-mcp-client-DuvY0YQh.js → use-mcp-client-BfCmeMHR.js} +1 -1
  320. package/dist/client/assets/{use-mcp-prompts-DGMojcFt.js → use-mcp-prompts-DoojBZhS.js} +1 -1
  321. package/dist/client/assets/{use-mcp-tools-Dt1w2efB.js → use-mcp-tools-DwTtnjNb.js} +1 -1
  322. package/dist/client/assets/{use-mobile-CQqLe5Fj.js → use-mobile-C1stVK0E.js} +1 -1
  323. package/dist/client/assets/{use-move-blocks-DavDm8qw.js → use-move-blocks-Bclcq-Qe.js} +1 -1
  324. package/dist/client/assets/{use-navigate-to-agent-BP-fuYpJ.js → use-navigate-to-agent-D2d0cpFU.js} +1 -1
  325. package/dist/client/assets/{use-org-fs-DwzY3jVQ.js → use-org-fs-DHnEDbF9.js} +1 -1
  326. package/dist/client/assets/{use-org-repo-syncs-CtTPlokI.js → use-org-repo-syncs-CcoLGdUP.js} +1 -1
  327. package/dist/client/assets/{use-org-sso-B3MWcxrY.js → use-org-sso-d82WgyRM.js} +1 -1
  328. package/dist/client/assets/{use-organization-settings-CZAS8Fwc.js → use-organization-settings-a6mUKPHv.js} +1 -1
  329. package/dist/client/assets/{use-project-scope-C2qD7yC0.js → use-project-scope-C0EKXyqg.js} +1 -1
  330. package/dist/client/assets/{use-recent-apps-D7w2xW8F.js → use-recent-apps-DEMyNf2W.js} +1 -1
  331. package/dist/client/assets/{use-reports-diagnostic-BH1du4EA.js → use-reports-diagnostic-rjeHGSYu.js} +1 -1
  332. package/dist/client/assets/{use-secrets-Cw3WgXHF.js → use-secrets-CifnNbah.js} +1 -1
  333. package/dist/client/assets/{use-section-preview-base-BHjsGtU7.js → use-section-preview-base-SkN8HQaB.js} +1 -1
  334. package/dist/client/assets/{use-sidebar-collapsed-Cx7HQy1d.js → use-sidebar-collapsed-DwcGl0-e.js} +1 -1
  335. package/dist/client/assets/{use-tags-qkt7D6HU.js → use-tags-CgXVAtG9.js} +1 -1
  336. package/dist/client/assets/{use-task-board-analytics-CBMwXJ9I.js → use-task-board-analytics-BTZNDNnK.js} +1 -1
  337. package/dist/client/assets/{use-task-board-events-B5PJHCY3.js → use-task-board-events-DCguN7A5.js} +1 -1
  338. package/dist/client/assets/{use-task-board-item-prs-CvmHZRRv.js → use-task-board-item-prs-CnqmEndd.js} +1 -1
  339. package/dist/client/assets/{use-task-board-items-e9YgnV6R.js → use-task-board-items-BmpaMZkF.js} +1 -1
  340. package/dist/client/assets/{use-task-board-prompts-jxu88jn3.js → use-task-board-prompts-DdSO4gLi.js} +1 -1
  341. package/dist/client/assets/{use-task-metadata-DmUyAx53.js → use-task-metadata-D3xqf4sH.js} +1 -1
  342. package/dist/client/assets/{use-thread-outputs-DiVqGaU9.js → use-thread-outputs-D6sQTVJo.js} +1 -1
  343. package/dist/client/assets/useInfiniteQuery-P9--kf7E.js +1 -0
  344. package/dist/client/assets/{useQueries-CiCIRDU-.js → useQueries-BuMODvFG.js} +1 -1
  345. package/dist/client/assets/useSuspenseInfiniteQuery-C2ZhOGvp.js +1 -0
  346. package/dist/client/assets/{users-juR-Mf-x.js → users-Ct3PwBMT.js} +1 -1
  347. package/dist/client/assets/{utils-DsMBpUcw.js → utils-DA49HMaO.js} +1 -1
  348. package/dist/client/assets/{variant-calendar-D0VBOg4q.js → variant-calendar-CPtUMCAS.js} +1 -1
  349. package/dist/client/assets/{variant-matcher-override-TIETIQ4W.js → variant-matcher-override-DnlLYEoa.js} +1 -1
  350. package/dist/client/assets/{view-header-BupmkwFn.js → view-header-CAO18iqy.js} +1 -1
  351. package/dist/client/assets/{virtual-mcp-DqDEHqCs.js → virtual-mcp-C4mAz3N8.js} +1 -1
  352. package/dist/client/assets/{watch-sse-pool-DwGCR27q.js → watch-sse-pool-BI4P-Lkx.js} +1 -1
  353. package/dist/client/index.html +1 -1
  354. package/dist/server/server.js +1 -1
  355. package/package.json +1 -1
  356. package/dist/client/assets/agent-app-B3LTC-z6.js +0 -1
  357. package/dist/client/assets/agent-calendar-CUj5ygBN.js +0 -1
  358. package/dist/client/assets/agent-deck-B2XAonlC.js +0 -1
  359. package/dist/client/assets/agent-library-CnjQ4-dS.js +0 -1
  360. package/dist/client/assets/agent-library-file-DORygQ2_.js +0 -1
  361. package/dist/client/assets/agent-overview--DJQfkWj.js +0 -1
  362. package/dist/client/assets/agent-settings-LC6lUh-Z.js +0 -1
  363. package/dist/client/assets/agent-site-editor-code-CLPv9-CF.js +0 -2
  364. package/dist/client/assets/agent-site-editor-content-DnCCavW0.js +0 -1
  365. package/dist/client/assets/agent-site-editor-preview-B7zbGUx6.js +0 -1
  366. package/dist/client/assets/agent-view-CAp5PQrn.js +0 -1
  367. package/dist/client/assets/api-keys-gr-XS1eV.js +0 -1
  368. package/dist/client/assets/branch-name-D4VItpp3.js +0 -1
  369. package/dist/client/assets/library-DRjhGmVa.js +0 -1
  370. package/dist/client/assets/project-reports-BiRpC0Ut.js +0 -1
  371. package/dist/client/assets/project-tasks-DNAB3dSd.js +0 -1
  372. package/dist/client/assets/record-editor-Dyz0HnM9.js +0 -1
  373. package/dist/client/assets/reports-Df12mzuV.js +0 -1
  374. package/dist/client/assets/repositories-BRECfYRM.js +0 -1
  375. package/dist/client/assets/route-CDiHNgIq.js +0 -1
  376. package/dist/client/assets/route-CJdkN5-r.js +0 -1
  377. package/dist/client/assets/settings-tab-CbWALbd6.js +0 -1
  378. package/dist/client/assets/site-draft-view-DACL5z9x.js +0 -3
  379. package/dist/client/assets/site-editor-BI3RzfpH.js +0 -1
  380. package/dist/client/assets/tasks-CdHhNSUE.js +0 -1
  381. package/dist/client/assets/use-ask-in-chat-CuTdZYOa.js +0 -1
  382. package/dist/client/assets/useInfiniteQuery-FqvtVI1A.js +0 -1
  383. package/dist/client/assets/useSuspenseInfiniteQuery-Bp4UXIRf.js +0 -1
@@ -1,3 +0,0 @@
1
- import{c as T,b as fe,r as K,j as a,B as be,m as G,K as Qt,al as xa,t as xt,fd as va,as as tr,c6 as ya,Y as Kt,aH as qs,aI as Ks,aJ as Vs,aK as Gs,bj as Ws,aL as Qs,aM as Js,aN as Xs,X as bs,Z as gs,_ as xs,a as vs,a5 as Jt,ct as ja,h as Vt,ff as sr,fg as Ys,bJ as wa,b8 as Pa,bh as An,fh as Sa,c0 as ka,am as Na,I as Ca,a8 as Aa,fi as Ra,V as nr,i as vt,eR as Zs,q as rr,J as ar,D as lr,x as ir,v as or,Q as cr,R as dr,fj as Ta,bk as ur,a6 as en,b3 as tn,e as Rn,E as Da,T as Ba,n as Ds,bi as Ia}from"./index-CoIqGnkT.js";import{S as Fa}from"./separator-DZpsLNey.js";import{f as $a,u as It,r as hr,l as fr,c as mr,b as _a}from"./chat-context-CbLWEfcx.js";import{u as Tt,aq as La,ar as pr,as as br,c as sn,b as nn,L as rn,at as Ea,K as Ma,au as Oa,ae as za,av as Ua,S as an,R as gr,aw as Ha,a0 as xr,F as qa,ax as Ka,ay as Va,B as vr,l as Ga,E as Wa}from"./site-editor-toast-VaN8V1I2.js";import{b as Qa,L as Ja,a as Xa}from"./shell-layout-BN9dcRYV.js";import{I as yr}from"./toolbar-icon-button-1M1cEETB.js";import{a as Ya,P as Za,b as el}from"./popover-C20V6lAt.js";import{T as ht,a as ft,c as mt,b as ys}from"./tooltip-DycNDw2G.js";import{f as tl,a as sl,c as nl,C as Tn,e as Dn,b as Bn}from"./command-3SMlch0Q.js";import{T as Dt,a as jr,c as wr}from"./tabs-W2tygsn9.js";import{t as Pr}from"./ChevronUp-0ZUNuXoh.js";import{X as Sr,aL as js,D as rl,a as kr,aM as al,b as ll,aN as Nr,K as il}from"./agent-icon-qder0a6G.js";import{a as Cr}from"./SwitchHorizontal01-AyEyHl5j.js";import{c as Ar,s as hs}from"./Tool01-D54u8MkG.js";import{s as Rr}from"./Plus-Dwl0ymG8.js";import{s as ws}from"./Trash01-CLcCE4W6.js";import{m as ol,d as cl}from"./thread-intent-DsvstIYH.js";import{h as Tr,r as Dr,g as dl,e as qe,u as Ps,f as Br}from"./repository-binding-CyaIIWjt.js";import{u as ul}from"./use-debounced-value-DlRWnR28.js";import{u as hl}from"./useInfiniteQuery-FqvtVI1A.js";import{d as fl,b as ml,p as pl,e as Ir,g as Fr,h as $r}from"./use-navigate-to-agent-BP-fuYpJ.js";import{u as Ss,g as ln,n as Ls,a as _r,r as Bs,c as bl,d as In,b as on}from"./branch-name-D4VItpp3.js";import{a as fs}from"./virtual-mcp-DqDEHqCs.js";import{a as ns}from"./input-oiyfOdq_.js";import{u as cn,b as gl}from"./agent-capabilities-C_fHyyST.js";import{G as Lr}from"./github-icon-CgGTVNey.js";import{u as xl,a as vl}from"./use-fast-preview-draft-url-Bq8X4SK6.js";import{av as Ht,aw as Er,E as ms,q as dn,ax as yl,ay as jl,H as wl,az as Pl,aA as Sl,aB as kl,p as Nl,z as At,f as un,aC as Cl,$ as Al,i as Rl,u as Tl,k as Dl,S as Bl}from"./blocks-tab-states-DhWZqku3.js";import{u as Il}from"./index-RA-jAYZL.js";import{T as Fl}from"./textarea-DH4lLGjS.js";import{i as hn}from"./CheckCircle-DdQJ6K1s.js";import{n as $l,s as _l,C as Ll,a as El,b as Ml,M as Ol,c as zl,d as Ul,m as Hl,u as ql}from"./use-cms-publish-actions-D2RPgS1y.js";import{a as Kl,g as Vl}from"./UserSquare-DorunsHP.js";import{i as fn,b as mn,m as Gl,h as Wl,c as Mr,f as Or,d as Ql,r as pn,e as Jl,n as Xl,g as Yl,j as Zl,k as ei,l as bn,o as ti,p as zr,q as si,s as gn,t as Is}from"./sandbox-git-api-DcqI6XE4.js";import{b as ni,g as ri}from"./utils-DsMBpUcw.js";import{i as ai}from"./Monitor01-RPmPp9yV.js";import{w as xn,R as Ur}from"./device-hint-BAl-Wimj.js";import{w as Fn}from"./editor-BWpbvGUJ.js";import{s as Hr}from"./save-changes-debug-nBi-n9eV.js";import{u as li}from"./use-mcp-client-DuvY0YQh.js";import{b as ii,a as oi}from"./sandbox-lifecycle-context-DPyi5-UY.js";import{b as ci}from"./thread-route-SXxESRM6.js";import{E as di}from"./empty-state-CibwE54W.js";import{a as ui}from"./autosend-BuzWxJ_9.js";function hi(t){const{value:e,baseBranch:s,releases:r,baseIsDraft:n=!1}=t,i=!n&&!!e&&e===s,d=r.find(o=>o.branch===e);return{isBase:i,current:d,unlisted:!i&&!d&&!!e}}const fi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},$n=1114111;function _n(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const r=Number.parseInt(s.slice(2),16);return!Number.isFinite(r)||r>$n?e:String.fromCodePoint(r)}if(s.startsWith("#")){const r=Number.parseInt(s.slice(1),10);return!Number.isFinite(r)||r>$n?e:String.fromCodePoint(r)}return fi[s]??e}):""}function mi(t){const e=T.c(39),{url:s,onSave:r}=t,n=fe(),[i,d]=K.useState(s??"");let l;e[0]!==i?(l=i.trim(),e[0]=i,e[1]=l):l=e[1];const o=l;let u;e[2]!==r||e[3]!==o?(u=()=>r(o?ol(o):null),e[2]=r,e[3]=o,e[4]=u):u=e[4];const c=u;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let p;e[7]!==h?(p=a.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==n?(b=n("thread.branchPicker.localUrlLabel"),e[9]=n,e[10]=b):b=e[10];let f;e[11]!==n?(f=n("thread.branchPicker.localUrlPlaceholder"),e[11]=n,e[12]=f):f=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=N=>d(N.target.value),e[13]=m):m=e[13];let x;e[14]!==c||e[15]!==o?(x=N=>{N.key==="Enter"&&o&&c()},e[14]=c,e[15]=o,e[16]=x):x=e[16];let g;e[17]!==b||e[18]!==f||e[19]!==x||e[20]!==i?(g=a.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:i,onChange:m,onKeyDown:x,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=x,e[20]=i,e[21]=g):g=e[21];let w;e[22]!==r||e[23]!==n||e[24]!==s?(w=s?a.jsx(be,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>r(null),children:n("thread.branchPicker.localTurnOff")}):a.jsx("span",{}),e[22]=r,e[23]=n,e[24]=s,e[25]=w):w=e[25];const j=!o;let v;e[26]!==n?(v=n("thread.branchPicker.save"),e[26]=n,e[27]=v):v=e[27];let S;e[28]!==c||e[29]!==j||e[30]!==v?(S=a.jsx(be,{size:"sm",disabled:j,onClick:c,children:v}),e[28]=c,e[29]=j,e[30]=v,e[31]=S):S=e[31];let P;e[32]!==w||e[33]!==S?(P=a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[w,S]}),e[32]=w,e[33]=S,e[34]=P):P=e[34];let k;return e[35]!==P||e[36]!==p||e[37]!==g?(k=a.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p,g,P]}),e[35]=P,e[36]=p,e[37]=g,e[38]=k):k=e[38],k}function pi(t){const e=T.c(8),{virtualMcpId:s,branch:r,serve:n,rowRef:i,onPicked:d}=t,l=Tt(s,r),o=!!n.connection,u=o&&l.kind==="protocol"&&l.source==="local";let c;e[0]!==d||e[1]!==n?(c=()=>bi(n,d),e[0]=d,e[1]=n,e[2]=c):c=e[2];let h;return e[3]!==i||e[4]!==o||e[5]!==u||e[6]!==c?(h=a.jsx(gi,{rowRef:i,selected:o,connected:u,onSelect:c}),e[3]=i,e[4]=o,e[5]=u,e[6]=c,e[7]=h):h=e[7],h}function bi(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??La})}function gi(t){const e=T.c(19),{rowRef:s,selected:r,connected:n,onSelect:i}=t,d=fe(),l=r?"bg-accent":"hover:bg-accent";let o;e[0]!==l?(o=G("flex rounded-lg",l),e[0]=l,e[1]=o):o=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=u):u=e[2];let c;e[3]!==d?(c=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=c):c=e[4];let h;e[5]!==c?(h=a.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[5]=c,e[6]=h):h=e[6];let p;e[7]!==n||e[8]!==d?(p=n&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=p):p=e[9];let b;e[10]!==i||e[11]!==r||e[12]!==h||e[13]!==p?(b=a.jsxs("button",{type:"button","aria-pressed":r,onClick:i,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[u,h,p]}),e[10]=i,e[11]=r,e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==o||e[17]!==b?(f=a.jsx("div",{ref:s,className:o,children:b}),e[15]=s,e[16]=o,e[17]=b,e[18]=f):f=e[18],f}const xi=10080*60*1e3;function vi({sandboxMap:t,userId:e,rawBranches:s,now:r}){const n=new Map;for(const[h,p]of Object.entries(t??{}))for(const[b,f]of Object.entries(p??{})){let m=n.get(b);m||(m={userIds:new Set,lastActiveAt:0},n.set(b,m)),m.userIds.add(h);for(const x of Object.values(f??{})){const g=x?.createdAt??0;g>m.lastActiveAt&&(m.lastActiveAt=g)}}const i=r-xi,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=i).sort((h,p)=>p[1].lastActiveAt-h[1].lastActiveAt).map(([h,p])=>({name:h,source:"recent",contributors:[...p.userIds],lastActiveAt:p.lastActiveAt})),l=new Set(d.map(h=>h.name)),o=new Set(Object.keys(t?.[e]??{})),u=[...o].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),c=s.filter(h=>!o.has(h.name)&&!l.has(h.name)).map(h=>({name:h.name,source:"other",author:h.author??null}));return{recent:d,yours:u,others:c}}const yi=100,ji=50,wi=300;function Es(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Pi(t){const e=T.c(39),{orgId:s,orgSlug:r,userId:n,target:i,sandboxMap:d,owner:l,repo:o,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=ul(f,wi);let x;e[2]!==i?(x=Tr(i),e[2]=i,e[3]=x):x=e[3];const g=x,w=f.length>0;let j;e[4]!==m||e[5]!==s||e[6]!==r||e[7]!==l||e[8]!==o||e[9]!==i?(j=Qt.githubBranchSearch(s,r,Dr(i),l,o,m),e[4]=m,e[5]=s,e[6]=r,e[7]=l,e[8]=o,e[9]=i,e[10]=j):j=e[10];const v=p&&g;let S;e[11]!==m||e[12]!==r||e[13]!==i?(S=D=>{const{pageParam:J}=D;return xa(r,"REPOSITORY_SEARCH_BRANCHES",{...i,query:m,limit:m?ji:yi,cursor:J})},e[11]=m,e[12]=r,e[13]=i,e[14]=S):S=e[14];let P;e[15]!==m?(P=D=>m?void 0:D.nextCursor??void 0,e[15]=m,e[16]=P):P=e[16];let k;e[17]!==j||e[18]!==v||e[19]!==S||e[20]!==P?(k={queryKey:j,enabled:v,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:S,getNextPageParam:P},e[17]=j,e[18]=v,e[19]=S,e[20]=P,e[21]=k):k=e[21];const{data:N,isLoading:C,isError:y,isFetching:A,hasNextPage:R,isFetchingNextPage:B,fetchNextPage:E}=hl(k),I=w&&(m!==f||A),M=(N?.pages??[]).flatMap(Si),F=Qa(6e4),Q=vi({sandboxMap:d,userId:n,rawBranches:M,now:F});let W;e[22]!==f?(W=D=>Es(D.name,f),e[22]=f,e[23]=W):W=e[23];const H=Q.recent.filter(W);let _;e[24]!==f?(_=D=>Es(D.name,f),e[24]=f,e[25]=_):_=e[25];const z=Q.yours.filter(_),ne=Q.others,se=N?.pages[0],O=w&&se&&!I?Math.max(0,se.totalCount-se.branches.length):0,le=!w&&R;let Y;e[26]!==E?(Y=()=>{E()},e[26]=E,e[27]=Y):Y=e[27];let Z;return e[28]!==O||e[29]!==y||e[30]!==B||e[31]!==C||e[32]!==I||e[33]!==ne||e[34]!==H||e[35]!==le||e[36]!==Y||e[37]!==z?(Z={recent:H,yours:z,others:ne,isLoading:C,isError:y,isSearching:I,hiddenMatchCount:O,hasMore:le,isFetchingMore:B,fetchMore:Y},e[28]=O,e[29]=y,e[30]=B,e[31]=C,e[32]=I,e[33]=ne,e[34]=H,e[35]=le,e[36]=Y,e[37]=z,e[38]=Z):Z=e[38],Z}function Si(t){return t.branches}function ki(t){const e=T.c(6),s=fe(),{releases:r,createRelease:n}=Ss(t.virtualMcpId);let i;return e[0]!==n||e[1]!==t.userId||e[2]!==t.userLabel||e[3]!==r||e[4]!==s?(i=()=>{if(r.length>=fs)return xt.error(s("thread.branchPicker.capReached",{max:fs})),null;const d=ln(t.userLabel);return n({branch:d,name:_r(r,s("thread.branchPicker.defaultVersionName")),color:Ls(r.length),createdBy:t.userId,createdAt:new Date().toISOString()}).catch(l=>{xt.error(s("thread.branchPicker.saveError"),{description:pr(s,br(l))})}),d},e[0]=n,e[1]=t.userId,e[2]=t.userLabel,e[3]=r,e[4]=s,e[5]=i):i=e[5],i}const qr="-mx-[3px] h-3.5 w-3.5 shrink-0";function Ni(t){const e=T.c(187),{virtualMcpId:s,isV8:r,userLabel:n,value:i,baseBranch:d,baseIsDraft:l,orgId:o,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:x,onAdoptBranch:g,disabled:w,spawnsNewChat:j,placement:v}=t,S=r===void 0?!1:r,P=l===void 0?!1:l,k=w===void 0?!1:w,N=j===void 0?!1:j,C=v===void 0?"chat":v,y=fe(),A=C==="header",[R,B]=K.useState(!1),[E,I]=K.useState(!1),[M,F]=K.useState("branches"),[Q,W]=K.useState(null),[H,_]=K.useState(""),[z,ne]=K.useState(null),se=K.useRef(null),{releases:O,createRelease:le,renameRelease:Y,deleteRelease:Z}=Ss(s);let D;e[0]!==c||e[1]!==n||e[2]!==s?(D={virtualMcpId:s,userLabel:n,userId:c},e[0]=c,e[1]=n,e[2]=s,e[3]=D):D=e[3];const J=ki(D),{url:re,setUrl:ie,clear:pe}=sn(s),de=nn(s),ae=S&&!!de.connection,oe=S?de.connection?.endpoint??null:re,ce=!!oe;let U;e[4]!==pe||e[5]!==S||e[6]!==de?(U=()=>{pe(),S&&de.clear()},e[4]=pe,e[5]=S,e[6]=de,e[7]=U):U=e[7];const ee=U;let ye;e[8]!==R?(ye={enabled:R},e[8]=R,e[9]=ye):ye=e[9];const{data:X}=va(ye);let te;e[10]!==X?.data?.members?(te=Ue=>Ue?X?.data?.members?.find(He=>He.userId===Ue)?.user?.name??void 0:void 0,e[10]=X?.data?.members,e[11]=te):te=e[11];const we=te,q=O.length>=fs,ue=O.length>1;let Ke;e[12]!==y?(Ke=y("thread.branchPicker.capReached",{max:fs}),e[12]=y,e[13]=Ke):Ke=e[13];const $e=Ke;let ge,Ee,_e,Pe,Ne,Ae,xe,Ve,De,Me,Be;if(e[14]!==E||e[15]!==M||e[16]!==q||e[17]!==d||e[18]!==P||e[19]!==ue||e[20]!==$e||e[21]!==ee||e[22]!==le||e[23]!==we||e[24]!==Z||e[25]!==k||e[26]!==H||e[27]!==Q||e[28]!==A||e[29]!==S||e[30]!==ce||e[31]!==oe||e[32]!==ae||e[33]!==g||e[34]!==m||e[35]!==x||e[36]!==R||e[37]!==o||e[38]!==u||e[39]!==p||e[40]!==z||e[41]!==O||e[42]!==Y||e[43]!==b||e[44]!==f||e[45]!==de||e[46]!==ie||e[47]!==N||e[48]!==J||e[49]!==y||e[50]!==h||e[51]!==re||e[52]!==c||e[53]!==i||e[54]!==s){const{isBase:Ue,current:He,unlisted:yt}=hi({value:i,baseBranch:d,releases:O,baseIsDraft:P}),Xt=Ue?y("thread.branchPicker.live"):He?.name??y("thread.branchPicker.defaultVersionName"),Le=ae?y("thread.branchPicker.localhost.label"):ce?y("thread.branchPicker.localLabel"):i?Xt:y("thread.branchPicker.selectVersion"),Yt=ae?"bg-foreground":ce?"bg-special":Ue?"bg-success":Bs(He?.color??"orange"),_t=!ae&&!ce&&!Ue&&He?.runtime==="sandbox";let jt;e[66]!==ee||e[67]!==m||e[68]!==O?(jt=L=>{ee(),m(L,O.find(bt=>bt.branch===L)?.runtime),B(!1)},e[66]=ee,e[67]=m,e[68]=O,e[69]=jt):jt=e[69];const ot=jt;let wt;e[70]!==y?(wt=L=>{xt.error(y("thread.branchPicker.saveError"),{description:pr(y,br(L))})},e[70]=y,e[71]=wt):wt=e[71];const Te=wt;let ct;e[72]!==ie?(ct=L=>{ie(L),I(!1),B(!1)},e[72]=ie,e[73]=ct):ct=e[73];const Zt=ct;let pt;e[74]!==q||e[75]!==$e||e[76]!==ee||e[77]!==le||e[78]!==g||e[79]!==m||e[80]!==O||e[81]!==Te||e[82]!==c?(pt=(L,bt)=>{if(ee(),g){g(L),I(!1),B(!1);return}if(!O.some(as=>as.branch===L)){if(q){xt.error($e);return}le({branch:L,name:bt.trim()||L,color:Ls(O.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Te)}m(L),I(!1),B(!1)},e[74]=q,e[75]=$e,e[76]=ee,e[77]=le,e[78]=g,e[79]=m,e[80]=O,e[81]=Te,e[82]=c,e[83]=pt):pt=e[83];const es=pt;let Pt;e[84]!==ee||e[85]!==m||e[86]!==x||e[87]!==J?(Pt=()=>{const L=J();L&&(ee(),(x??m)(L),B(!1))},e[84]=ee,e[85]=m,e[86]=x,e[87]=J,e[88]=Pt):Pt=e[88];const ts=Pt;let Xe;e[89]===Symbol.for("react.memo_cache_sentinel")?(Xe=()=>{W(null),_(""),I(!1),F("branches")},e[89]=Xe):Xe=e[89];const St=Xe;let Ye;e[90]===Symbol.for("react.memo_cache_sentinel")?(Ye=L=>{F(L),I(!0)},e[90]=Ye):Ye=e[90];const dt=Ye;let Ze;e[91]===Symbol.for("react.memo_cache_sentinel")?(Ze=L=>{W(L.branch),_(L.name)},e[91]=Ze):Ze=e[91];const kt=Ze;let et;e[92]!==H||e[93]!==Y||e[94]!==Te?(et=L=>{const bt=H.trim();bt&&Y(L,bt).catch(Te),W(null),_("")},e[92]=H,e[93]=Y,e[94]=Te,e[95]=et):et=e[95];const Nt=et;let tt;e[96]!==q||e[97]!==$e||e[98]!==le||e[99]!==H||e[100]!==O.length||e[101]!==Te||e[102]!==c||e[103]!==i?(tt=()=>{const L=H.trim();if(L&&i){if(q){xt.error($e),W(null),_("");return}le({branch:i,name:L,color:Ls(O.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Te)}W(null),_("")},e[96]=q,e[97]=$e,e[98]=le,e[99]=H,e[100]=O.length,e[101]=Te,e[102]=c,e[103]=i,e[104]=tt):tt=e[104];const Lt=tt;let V;e[105]===Symbol.for("react.memo_cache_sentinel")?(V=()=>{W(null),_("")},e[105]=V):V=e[105];const he=V;let me;e[106]!==ue||e[107]!==Z||e[108]!==z||e[109]!==ot||e[110]!==O||e[111]!==Te||e[112]!==i?(me=()=>{const L=z;if(ne(null),!(!L||!ue)){if(L.branch===i){const bt=O.filter(ga=>ga.branch!==L.branch),as=bt.find(Ci)??bt[0];as?ot(as.branch):B(!1)}else B(!1);Z(L.branch).catch(Te)}},e[106]=ue,e[107]=Z,e[108]=z,e[109]=ot,e[110]=O,e[111]=Te,e[112]=i,e[113]=me):me=e[113],_e=me;const Se=bl(O),ut=Se.content.length>0&&Se.code.length>0,Ct=L=>Q===L.branch?a.jsx(Ln,{value:H,onChange:_,onSave:()=>Nt(L.branch),onCancel:he},L.branch):a.jsx(Mn,{rowRef:!ce&&L.branch===i?se:void 0,dot:Bs(L.color),codeIcon:L.runtime==="sandbox"?In(L.color):void 0,label:L.name,creator:we(L.createdBy),branch:L.branch,selected:!ce&&L.branch===i,onSelect:()=>ot(L.branch),onRename:()=>kt(L),onDelete:()=>ne(L),deleteBlocked:!ue},L.branch);Ee=Za,De=R,e[114]!==k?(Me=k?void 0:L=>{L||St(),B(L)},e[114]=k,e[115]=Me):Me=e[115];const Cs=A?"outline":"ghost",As=A?"sm":"default",Rs=A?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let Et;e[116]!==Rs?(Et=G("shrink min-w-0 max-w-[220px] gap-2",Rs,yr),e[116]=Rs,e[117]=Et):Et=e[117];const Ts=_t?a.jsx(Sr,{className:G(qr,In(He?.color))}):a.jsx("span",{className:G("h-2 w-2 shrink-0 rounded-full",i||ce?Yt:"bg-muted-foreground")});let Mt;e[118]!==Le?(Mt=a.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:Le}),e[118]=Le,e[119]=Mt):Mt=e[119];let Ot;e[120]!==k?(Ot=!k&&a.jsx(Pr,{size:12,className:"opacity-60 shrink-0"}),e[120]=k,e[121]=Ot):Ot=e[121];let zt;e[122]!==k||e[123]!==Le||e[124]!==Cs||e[125]!==As||e[126]!==Et||e[127]!==Ts||e[128]!==Mt||e[129]!==Ot?(zt=a.jsx(ht,{asChild:!0,children:a.jsx("span",{className:"inline-flex min-w-0 shrink",children:a.jsx(Ya,{asChild:!0,children:a.jsxs(be,{"data-tour":Ja.branchPicker,variant:Cs,size:As,"aria-label":Le,disabled:k,className:Et,children:[Ts,Mt,Ot]})})})}),e[122]=k,e[123]=Le,e[124]=Cs,e[125]=As,e[126]=Et,e[127]=Ts,e[128]=Mt,e[129]=Ot,e[130]=zt):zt=e[130];let Ut;e[131]!==Le?(Ut=a.jsx(ft,{children:Le}),e[131]=Le,e[132]=Ut):Ut=e[132],e[133]!==zt||e[134]!==Ut?(Be=a.jsxs(mt,{children:[zt,Ut]}),e[133]=zt,e[134]=Ut,e[135]=Be):Be=e[135],ge=el,Pe="w-[min(300px,calc(100vw-2rem))] p-1.5",Ne="start",e[136]===Symbol.for("react.memo_cache_sentinel")?(Ae=L=>{L.preventDefault(),se.current?.scrollIntoView({block:"nearest"})},e[136]=Ae):Ae=e[136],e[137]!==N||e[138]!==y?(xe=N&&a.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:y("thread.branchPicker.newChatHint")}),e[137]=N,e[138]=y,e[139]=xe):xe=e[139],Ve=E?a.jsx(Ri,{orgId:o,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:R,tab:M,onTabChange:F,isV8:S,localUrl:re,onSaveLocal:Zt,onBack:()=>I(!1),onAdopt:es}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:G("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",S&&"gap-1"),children:[!S&&ce&&oe&&a.jsx(Ai,{rowRef:se,url:oe,onSelect:()=>dt("local"),onEdit:()=>dt("local"),onTurnOff:()=>ee()}),yt&&i&&(Q===i?a.jsx(Ln,{value:H,onChange:_,onSave:Lt,onCancel:he}):a.jsx(Mn,{rowRef:ce?void 0:se,dot:Bs("orange"),label:y("thread.branchPicker.defaultVersionName"),branch:i,selected:!ce,onSelect:()=>ot(i),onRename:()=>{W(i),_(_r(O,y("thread.branchPicker.defaultVersionName")))}})),ut?a.jsxs(a.Fragment,{children:[a.jsx(En,{children:y("thread.branchPicker.groupContent")}),Se.content.map(Ct),a.jsx(En,{divided:!0,children:y("thread.branchPicker.groupCode")}),Se.code.map(Ct)]}):O.map(Ct),S&&a.jsx(pi,{virtualMcpId:s,branch:i,serve:de,rowRef:ae?se:void 0,onPicked:()=>B(!1)})]}),(yt||O.length>0||S)&&a.jsx("div",{className:"my-1 border-t"}),a.jsxs("button",{type:"button",onClick:()=>{ts()},disabled:q,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[a.jsx(Rr,{className:"h-4 w-4 shrink-0"}),y("thread.branchPicker.newVersion")]}),q&&a.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:$e}),a.jsxs("button",{type:"button",onClick:()=>dt("branches"),className:G("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",S&&"mt-1"),children:[y("thread.branchPicker.advanced"),a.jsx(tr,{className:"h-4 w-4 shrink-0"})]})]}),e[14]=E,e[15]=M,e[16]=q,e[17]=d,e[18]=P,e[19]=ue,e[20]=$e,e[21]=ee,e[22]=le,e[23]=we,e[24]=Z,e[25]=k,e[26]=H,e[27]=Q,e[28]=A,e[29]=S,e[30]=ce,e[31]=oe,e[32]=ae,e[33]=g,e[34]=m,e[35]=x,e[36]=R,e[37]=o,e[38]=u,e[39]=p,e[40]=z,e[41]=O,e[42]=Y,e[43]=b,e[44]=f,e[45]=de,e[46]=ie,e[47]=N,e[48]=J,e[49]=y,e[50]=h,e[51]=re,e[52]=c,e[53]=i,e[54]=s,e[55]=ge,e[56]=Ee,e[57]=_e,e[58]=Pe,e[59]=Ne,e[60]=Ae,e[61]=xe,e[62]=Ve,e[63]=De,e[64]=Me,e[65]=Be}else ge=e[55],Ee=e[56],_e=e[57],Pe=e[58],Ne=e[59],Ae=e[60],xe=e[61],Ve=e[62],De=e[63],Me=e[64],Be=e[65];let Ie;e[140]!==ge||e[141]!==Pe||e[142]!==Ne||e[143]!==Ae||e[144]!==xe||e[145]!==Ve?(Ie=a.jsxs(ge,{className:Pe,align:Ne,onOpenAutoFocus:Ae,children:[xe,Ve]}),e[140]=ge,e[141]=Pe,e[142]=Ne,e[143]=Ae,e[144]=xe,e[145]=Ve,e[146]=Ie):Ie=e[146];let $;e[147]!==Ee||e[148]!==De||e[149]!==Me||e[150]!==Be||e[151]!==Ie?($=a.jsxs(Ee,{open:De,onOpenChange:Me,children:[Be,Ie]}),e[147]=Ee,e[148]=De,e[149]=Me,e[150]=Be,e[151]=Ie,e[152]=$):$=e[152];const ve=$,Ce=z!==null;let Re;e[153]===Symbol.for("react.memo_cache_sentinel")?(Re=Ue=>{Ue||ne(null)},e[153]=Re):Re=e[153];let Fe;e[154]!==y?(Fe=y("thread.branchPicker.deleteTitle"),e[154]=y,e[155]=Fe):Fe=e[155];let Oe;e[156]!==Fe?(Oe=a.jsx(qs,{children:Fe}),e[156]=Fe,e[157]=Oe):Oe=e[157];let ze;e[158]!==z||e[159]!==y?(ze=z&&y("thread.branchPicker.deleteConfirm",{name:z.name}),e[158]=z,e[159]=y,e[160]=ze):ze=e[160];let Ge;e[161]!==ze?(Ge=a.jsx(Ks,{children:ze}),e[161]=ze,e[162]=Ge):Ge=e[162];let rt;e[163]!==Oe||e[164]!==Ge?(rt=a.jsxs(Vs,{children:[Oe,Ge]}),e[163]=Oe,e[164]=Ge,e[165]=rt):rt=e[165];let at;e[166]!==y?(at=y("thread.branchPicker.cancel"),e[166]=y,e[167]=at):at=e[167];let lt;e[168]!==at?(lt=a.jsx(Gs,{children:at}),e[168]=at,e[169]=lt):lt=e[169];let We;e[170]!==y?(We=y("thread.branchPicker.delete"),e[170]=y,e[171]=We):We=e[171];let je;e[172]!==_e||e[173]!==We?(je=a.jsx(Ws,{onClick:_e,variant:"destructive",children:We}),e[172]=_e,e[173]=We,e[174]=je):je=e[174];let Qe;e[175]!==lt||e[176]!==je?(Qe=a.jsxs(Qs,{children:[lt,je]}),e[175]=lt,e[176]=je,e[177]=Qe):Qe=e[177];let Je;e[178]!==rt||e[179]!==Qe?(Je=a.jsxs(Js,{children:[rt,Qe]}),e[178]=rt,e[179]=Qe,e[180]=Je):Je=e[180];let it;e[181]!==Ce||e[182]!==Je?(it=a.jsx(Xs,{open:Ce,onOpenChange:Re,children:Je}),e[181]=Ce,e[182]=Je,e[183]=it):it=e[183];let $t;return e[184]!==ve||e[185]!==it?($t=a.jsxs(a.Fragment,{children:[ve,it]}),e[184]=ve,e[185]=it,e[186]=$t):$t=e[186],$t}function Ci(t){return t.runtime!=="sandbox"}function Ln(t){const e=T.c(20),{value:s,onChange:r,onSave:n,onCancel:i}=t,d=fe();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let o;e[2]!==r?(o=f=>r(f.target.value),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==i||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),i())},e[4]=i,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==o||e[9]!==u||e[10]!==s?(c=a.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:o,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=o,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=a.jsx(be,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=a.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function En(t){const e=T.c(5),{divided:s,children:r}=t,i=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==i?(d=G("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",i),e[0]=i,e[1]=d):d=e[1];let l;return e[2]!==r||e[3]!==d?(l=a.jsx("p",{className:d,children:r}),e[2]=r,e[3]=d,e[4]=l):l=e[4],l}function Mn(t){const e=T.c(60),{rowRef:s,dot:r,codeIcon:n,label:i,creator:d,branch:l,selected:o,onSelect:u,onRename:c,onDelete:h,deleteBlocked:p}=t,b=p===void 0?!1:p,f=fe(),m=o?"bg-accent":"hover:bg-accent";let x;e[0]!==m?(x=G("group flex items-center rounded-lg",m),e[0]=m,e[1]=x):x=e[1];let g;e[2]!==n||e[3]!==r?(g=n?a.jsx(Sr,{className:G(qr,n)}):a.jsx("span",{className:G("h-2 w-2 shrink-0 rounded-full",r)}),e[2]=n,e[3]=r,e[4]=g):g=e[4];let w;e[5]!==d?(w=d&&a.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:d}),e[5]=d,e[6]=w):w=e[6];let j;e[7]!==i||e[8]!==w?(j=a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[i,w]}),e[7]=i,e[8]=w,e[9]=j):j=e[9];let v;e[10]!==u||e[11]!==o||e[12]!==g||e[13]!==j?(v=a.jsx(ht,{asChild:!0,children:a.jsxs("button",{type:"button","aria-pressed":o,onClick:u,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[g,j]})}),e[10]=u,e[11]=o,e[12]=g,e[13]=j,e[14]=v):v=e[14];let S;e[15]!==n||e[16]!==f?(S=n&&a.jsx("p",{className:"font-medium",children:f("thread.branchPicker.codeDraftTooltip")}),e[15]=n,e[16]=f,e[17]=S):S=e[17];let P;e[18]!==l||e[19]!==f?(P=f("thread.branchPicker.branchTooltip",{branch:l}),e[18]=l,e[19]=f,e[20]=P):P=e[20];let k;e[21]!==P?(k=a.jsx("p",{className:"font-mono",children:P}),e[21]=P,e[22]=k):k=e[22];let N;e[23]!==k||e[24]!==S?(N=a.jsxs(ft,{side:"bottom",className:"text-xs",children:[S,k]}),e[23]=k,e[24]=S,e[25]=N):N=e[25];let C;e[26]!==N||e[27]!==v?(C=a.jsxs(mt,{children:[v,N]}),e[26]=N,e[27]=v,e[28]=C):C=e[28];let y;e[29]!==f?(y=f("thread.branchPicker.moreActions"),e[29]=f,e[30]=y):y=e[30];let A;e[31]===Symbol.for("react.memo_cache_sentinel")?(A=a.jsx(Cr,{className:"h-4 w-4"}),e[31]=A):A=e[31];let R;e[32]!==y?(R=a.jsx(bs,{asChild:!0,children:a.jsx(be,{variant:"ghost",size:"icon","aria-label":y,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:A})}),e[32]=y,e[33]=R):R=e[33];let B;e[34]===Symbol.for("react.memo_cache_sentinel")?(B=a.jsx(Ar,{className:"h-4 w-4"}),e[34]=B):B=e[34];let E;e[35]!==f?(E=f("thread.branchPicker.rename"),e[35]=f,e[36]=E):E=e[36];let I;e[37]!==c||e[38]!==E?(I=a.jsxs(Kt,{onSelect:c,children:[B,E]}),e[37]=c,e[38]=E,e[39]=I):I=e[39];let M;e[40]!==b||e[41]!==h||e[42]!==f?(M=h&&a.jsxs(Kt,{onSelect:h,disabled:b,className:"text-destructive focus:text-destructive",children:[a.jsx(ws,{className:"h-4 w-4"}),f("thread.branchPicker.delete")]}),e[40]=b,e[41]=h,e[42]=f,e[43]=M):M=e[43];let F;e[44]!==b||e[45]!==h||e[46]!==f?(F=h&&b&&a.jsx("p",{className:"max-w-48 px-2 pb-1.5 text-xs text-muted-foreground",children:f("thread.branchPicker.keepOneDraft")}),e[44]=b,e[45]=h,e[46]=f,e[47]=F):F=e[47];let Q;e[48]!==I||e[49]!==M||e[50]!==F?(Q=a.jsxs(gs,{align:"end",children:[I,M,F]}),e[48]=I,e[49]=M,e[50]=F,e[51]=Q):Q=e[51];let W;e[52]!==R||e[53]!==Q?(W=a.jsxs(xs,{children:[R,Q]}),e[52]=R,e[53]=Q,e[54]=W):W=e[54];let H;return e[55]!==s||e[56]!==C||e[57]!==W||e[58]!==x?(H=a.jsxs("div",{ref:s,className:x,children:[C,W]}),e[55]=s,e[56]=C,e[57]=W,e[58]=x,e[59]=H):H=e[59],H}function Ai(t){const e=T.c(40),{rowRef:s,url:r,onSelect:n,onEdit:i,onTurnOff:d}=t,l=fe();let o;try{let A;e[0]!==r?(A=new URL(r),e[0]=r,e[1]=A):A=e[1],o=A.host}catch{o=r}const u=o;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=a.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=a.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(Cr,{className:"h-4 w-4"}),e[15]=x):x=e[15];let g;e[16]!==m?(g=a.jsx(bs,{asChild:!0,children:a.jsx(be,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:x})}),e[16]=m,e[17]=g):g=e[17];let w;e[18]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(Ar,{className:"h-4 w-4"}),e[18]=w):w=e[18];let j;e[19]!==l?(j=l("thread.branchPicker.rename"),e[19]=l,e[20]=j):j=e[20];let v;e[21]!==i||e[22]!==j?(v=a.jsxs(Kt,{onSelect:i,children:[w,j]}),e[21]=i,e[22]=j,e[23]=v):v=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx(ws,{className:"h-4 w-4"}),e[24]=S):S=e[24];let P;e[25]!==l?(P=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=P):P=e[26];let k;e[27]!==d||e[28]!==P?(k=a.jsxs(Kt,{onSelect:d,className:"text-destructive focus:text-destructive",children:[S,P]}),e[27]=d,e[28]=P,e[29]=k):k=e[29];let N;e[30]!==v||e[31]!==k?(N=a.jsxs(gs,{align:"end",children:[v,k]}),e[30]=v,e[31]=k,e[32]=N):N=e[32];let C;e[33]!==N||e[34]!==g?(C=a.jsxs(xs,{children:[g,N]}),e[33]=N,e[34]=g,e[35]=C):C=e[35];let y;return e[36]!==s||e[37]!==C||e[38]!==f?(y=a.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,C]}),e[36]=s,e[37]=C,e[38]=f,e[39]=y):y=e[39],y}function Ri(t){const e=T.c(73),{orgId:s,orgSlug:r,userId:n,target:i,owner:d,repo:l,sandboxMap:o,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:x}=t,g=fe(),[w,j]=K.useState(""),v=c==="branches"?w:"",S=u&&c==="branches";let P;e[0]!==s||e[1]!==r||e[2]!==d||e[3]!==l||e[4]!==o||e[5]!==v||e[6]!==S||e[7]!==i||e[8]!==n?(P={orgId:s,orgSlug:r,userId:n,target:i,sandboxMap:o,owner:d,repo:l,search:v,enabled:S},e[0]=s,e[1]=r,e[2]=d,e[3]=l,e[4]=o,e[5]=v,e[6]=S,e[7]=i,e[8]=n,e[9]=P):P=e[9];const{recent:k,yours:N,others:C,isLoading:y,hasMore:A,isFetchingMore:R,fetchMore:B}=Pi(P),E=u&&c==="prs";let I;e[10]!==s||e[11]!==r||e[12]!==d||e[13]!==l||e[14]!==E||e[15]!==i?(I={orgId:s,orgSlug:r,target:i,owner:d,repo:l,enabled:E},e[10]=s,e[11]=r,e[12]=d,e[13]=l,e[14]=E,e[15]=i,e[16]=I):I=e[16];const{data:M,isLoading:F}=fl(I);let Q;if(e[17]!==B||e[18]!==A||e[19]!==R||e[20]!==y||e[21]!==p||e[22]!==b||e[23]!==x||e[24]!==m||e[25]!==f||e[26]!==h||e[27]!==C||e[28]!==d||e[29]!==F||e[30]!==k||e[31]!==l||e[32]!==w||e[33]!==g||e[34]!==M||e[35]!==c||e[36]!==N){const W=M===void 0?[]:M,H=`${d}/${l}`;let _;e[38]!==H?(_=H.toLowerCase(),e[38]=H,e[39]=_):_=e[39];const z=_;let ne;e[40]!==z?(ne=U=>U.headRepoFullName?.toLowerCase()===z,e[40]=z,e[41]=ne):ne=e[41];const se=W.filter(ne);let O;if(e[42]!==C||e[43]!==k||e[44]!==N){const U=new Set;O=[...k,...N,...C].filter(ee=>U.has(ee.name)?!1:(U.add(ee.name),!0)),e[42]=C,e[43]=k,e[44]=N,e[45]=O}else O=e[45];const le=O;let Y;e[46]===Symbol.for("react.memo_cache_sentinel")?(Y=a.jsx(rl,{className:"h-4 w-4 shrink-0"}),e[46]=Y):Y=e[46];let Z;e[47]!==g?(Z=g("thread.branchPicker.advancedBack"),e[47]=g,e[48]=Z):Z=e[48];let D;e[49]!==m||e[50]!==Z?(D=a.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[Y,Z]}),e[49]=m,e[50]=Z,e[51]=D):D=e[51];let J;e[52]!==h?(J=U=>{h(U),j("")},e[52]=h,e[53]=J):J=e[53];let re;e[54]!==g?(re=g("thread.branchPicker.branchesTab"),e[54]=g,e[55]=re):re=e[55];let ie;e[56]!==re?(ie=a.jsx(Dt,{value:"branches",className:"h-6 px-2.5 text-xs",children:re}),e[56]=re,e[57]=ie):ie=e[57];let pe;e[58]!==g?(pe=g("thread.branchPicker.prsTab"),e[58]=g,e[59]=pe):pe=e[59];let de;e[60]!==pe?(de=a.jsx(Dt,{value:"prs",className:"h-6 px-2.5 text-xs",children:pe}),e[60]=pe,e[61]=de):de=e[61];let ae;e[62]!==p||e[63]!==g?(ae=!p&&a.jsx(Dt,{value:"local",className:"h-6 px-2.5 text-xs",children:g("thread.branchPicker.localTab")}),e[62]=p,e[63]=g,e[64]=ae):ae=e[64];let oe;e[65]!==ie||e[66]!==de||e[67]!==ae?(oe=a.jsxs(jr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[ie,de,ae]}),e[65]=ie,e[66]=de,e[67]=ae,e[68]=oe):oe=e[68];let ce;e[69]!==J||e[70]!==oe||e[71]!==c?(ce=a.jsx(wr,{className:"px-2 pt-2 pb-1",value:c,onValueChange:J,children:oe}),e[69]=J,e[70]=oe,e[71]=c,e[72]=ce):ce=e[72],Q=a.jsxs("div",{className:"flex flex-col",children:[D,ce,c==="local"&&!p?a.jsx(mi,{url:b,onSave:f}):a.jsxs(tl,{filter:c==="branches"?Ti:void 0,children:[a.jsx(sl,{placeholder:g(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:w,onValueChange:j}),a.jsx(nl,{onScroll:U=>{const ee=U.currentTarget;c==="branches"&&ee.scrollHeight-ee.scrollTop-ee.clientHeight<48&&B()},children:c==="branches"?a.jsxs(a.Fragment,{children:[y&&a.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:g("thread.branchPicker.loadingMore")}),!y&&le.length===0&&a.jsx(Tn,{children:g("thread.branchPicker.noBranchesFound")}),le.length>0&&a.jsx(Dn,{children:le.map(U=>a.jsxs(Bn,{value:U.name,className:"cursor-pointer",onSelect:()=>x(U.name,U.name),children:[a.jsx(ya,{className:"mr-2 h-4 w-4 shrink-0"}),a.jsx("span",{className:"flex-1 truncate",children:U.name})]},U.name))}),A&&a.jsx("div",{className:"p-2",children:a.jsx(be,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:R,onClick:B,children:g(R?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):a.jsxs(a.Fragment,{children:[F&&a.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:g("thread.branchPicker.loadingPullRequests")}),!F&&se.length===0&&a.jsx(Tn,{children:g("thread.branchPicker.noOpenPullRequests")}),se.length>0&&a.jsx(Dn,{children:se.map(U=>a.jsxs(Bn,{value:`#${U.number} ${U.title} ${U.head}`,className:"cursor-pointer",onSelect:()=>x(U.head,_n(U.title)),children:[a.jsx(js,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a.jsx("span",{className:"truncate",children:_n(U.title)}),a.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",U.number," · ",U.head]})]})]},U.number))})]})})]})]}),e[17]=B,e[18]=A,e[19]=R,e[20]=y,e[21]=p,e[22]=b,e[23]=x,e[24]=m,e[25]=f,e[26]=h,e[27]=C,e[28]=d,e[29]=F,e[30]=k,e[31]=l,e[32]=w,e[33]=g,e[34]=M,e[35]=c,e[36]=N,e[37]=Q}else Q=e[37];return Q}function Ti(t,e){return Es(t,e)?1:0}function Di(t){const e=T.c(19),{locked:s,placement:r,value:n,virtualMcpId:i,isV8:d,userLabel:l,baseBranch:o,baseIsDraft:u,onChange:c,onCreateBranch:h,onAdoptBranch:p,orgId:b,orgSlug:f,userId:m,target:x,owner:g,repo:w,sandboxMap:j}=t;let v;return e[0]!==o||e[1]!==u||e[2]!==d||e[3]!==s||e[4]!==p||e[5]!==c||e[6]!==h||e[7]!==b||e[8]!==f||e[9]!==g||e[10]!==r||e[11]!==w||e[12]!==j||e[13]!==x||e[14]!==m||e[15]!==l||e[16]!==n||e[17]!==i?(v=a.jsx(Ni,{virtualMcpId:i,isV8:d,userLabel:l,value:n,baseBranch:o,baseIsDraft:u,orgId:b,orgSlug:f,userId:m,target:x,owner:g,repo:w,sandboxMap:j,onChange:c,onCreateBranch:h,onAdoptBranch:p,spawnsNewChat:s,placement:r}),e[0]=o,e[1]=u,e[2]=d,e[3]=s,e[4]=p,e[5]=c,e[6]=h,e[7]=b,e[8]=f,e[9]=g,e[10]=r,e[11]=w,e[12]=j,e[13]=x,e[14]=m,e[15]=l,e[16]=n,e[17]=i,e[18]=v):v=e[18],v}function Bi(t){const e=T.c(2),{branchPill:s}=t;if(!s)return null;let r;return e[0]!==s?(r=a.jsx(a.Fragment,{children:s}),e[0]=s,e[1]=r):r=e[1],r}function Ii(t){const{locked:e,sessionRuntime:s,draftRuntime:r}=t;return!e&&!(r==="sandbox"&&s!=="sandbox")?{kind:"switch"}:r==="sandbox"||s==="sandbox"?{kind:"new-chat",runtime:"sandbox"}:{kind:"new-chat"}}function Fi(t){const e=T.c(23),{virtualMcp:s,currentBranch:r}=t,n=$a(),i=It();let d;e[0]!==n?.messages||e[1]!==i?.isThreadLocked?(d=(n?.messages??[]).length>0||(i?.isThreadLocked??!1),e[0]=n?.messages,e[1]=i?.isThreadLocked,e[2]=d):d=e[2];const l=d,o=i?.setCurrentTaskBranch,u=i?.createTask,c=ns(s?.id),h=c.runtime;let p;e[3]!==h||e[4]!==s?.metadata?(p=cl(s?.metadata)==="cms"&&h==="sandbox",e[3]=h,e[4]=s?.metadata,e[5]=p):p=e[5];const b=p,f=dl(s),m=qe(f),{data:x}=vs.useSession(),g=x?.user;let w;e[6]!==g?(w=on(g),e[6]=g,e[7]=w):w=e[7];const j=w,v=x?.user?.id??"",{org:S}=Jt(),P=ml(s,r),k=cn(s?.id),N=k&&h==="cms";let C;e[8]!==u||e[9]!==l||e[10]!==h||e[11]!==c.resolved||e[12]!==o?(C=(F,Q)=>{const W=Ii({locked:l,sessionRuntime:c.resolved?h:null,draftRuntime:Q});W.kind==="new-chat"&&u?u({branch:F,...W.runtime?{runtime:W.runtime}:{}}):o&&o(F)},e[8]=u,e[9]=l,e[10]=h,e[11]=c.resolved,e[12]=o,e[13]=C):C=e[13];const y=C;let A;e[14]!==b||e[15]!==u||e[16]!==l||e[17]!==o?(A=F=>{(l||b)&&u?u({branch:F}):o&&o(F)},e[14]=b,e[15]=u,e[16]=l,e[17]=o,e[18]=A):A=e[18];const R=A;let B;e[19]!==u?(B=u?F=>u({runtime:"sandbox",branch:F}):void 0,e[19]=u,e[20]=B):B=e[20];const E=B,I=f&&Tr(m)?a.jsx(Di,{userLabel:j,virtualMcpId:s?.id??"",isV8:k,value:r,baseBranch:P,baseIsDraft:N,orgId:S.id,orgSlug:S.slug,userId:v,target:m,owner:f.owner,repo:f.name,sandboxMap:s?.metadata?.sandboxMap,onChange:y,onCreateBranch:R,onAdoptBranch:E,locked:l,placement:"chat"},`${Dr(m)}:${f.owner}/${f.name}`):null;let M;return e[21]!==I?(M=a.jsx(Bi,{branchPill:I}),e[21]=I,e[22]=M):M=e[22],M}const $i=ja("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function _i(t){const e=T.c(11);let s,r,n;e[0]!==t?({className:s,orientation:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let i;e[4]!==s||e[5]!==r?(i=G($i({orientation:r}),s),e[4]=s,e[5]=r,e[6]=i):i=e[6];let d;return e[7]!==r||e[8]!==n||e[9]!==i?(d=a.jsx("div",{role:"group","data-slot":"button-group","data-orientation":r,className:i,...n}),e[7]=r,e[8]=n,e[9]=i,e[10]=d):d=e[10],d}function Li(t){const e=T.c(14),{item:s}=t;let r;e[0]!==s?(r=()=>{s.onSelect()},e[0]=s,e[1]=r):r=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==r?(n=a.jsxs(Kt,{disabled:s.disabled,onSelect:r,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=r,e[6]=n):n=e[6];const i=n;if(!s.tooltip)return i;let d;e[7]!==i?(d=a.jsx(ht,{asChild:!0,children:i}),e[7]=i,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=a.jsx(ft,{side:"right",children:s.tooltip}),e[9]=s.tooltip,e[10]=l):l=e[10];let o;return e[11]!==d||e[12]!==l?(o=a.jsxs(mt,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=o):o=e[13],o}function Kr(t){const e=T.c(20),{label:s,onClick:r,variant:n,size:i,disabled:d,loading:l,pulse:o,tooltip:u,icon:c,items:h,menuAriaLabel:p,className:b}=t,f=n===void 0?"default":n,m=i===void 0?"default":i,x=d===void 0?!1:d,g=l===void 0?!1:l,w=o===void 0?!1:o,j=(h?.length??0)>0;let v;if(e[0]!==b||e[1]!==x||e[2]!==j||e[3]!==c||e[4]!==h||e[5]!==s||e[6]!==g||e[7]!==p||e[8]!==r||e[9]!==w||e[10]!==m||e[11]!==u||e[12]!==f){const S=G(yr,f==="default"&&"focus-visible:inset-ring-current");let P;e[14]!==c||e[15]!==g?(P=g?a.jsx(Vt,{size:"xs"}):c,e[14]=c,e[15]=g,e[16]=P):P=e[16];const k=a.jsxs(be,{type:"button",variant:f,size:m,disabled:x,"aria-busy":g||void 0,onClick:g?void 0:r,className:G(S,j&&"rounded-r-none border-r border-current/20"),children:[P,s]}),N=w&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let C;e[17]!==b||e[18]!==N?(C=G(N,b),e[17]=b,e[18]=N,e[19]=C):C=e[19],v=a.jsxs(_i,{className:C,children:[u?a.jsxs(mt,{children:[a.jsx(ht,{asChild:!0,children:a.jsx("span",{className:G("inline-flex rounded-lg outline-none",S,x&&"cursor-not-allowed"),tabIndex:x?0:void 0,role:x?"button":void 0,"aria-disabled":x||void 0,children:k})}),a.jsx(ft,{children:u})]}):k,j?a.jsxs(xs,{children:[a.jsx(bs,{asChild:!0,children:a.jsx(be,{type:"button",variant:f,size:m,"aria-label":p,className:G("has-[>svg]:px-2",S),children:a.jsx(Pr,{className:"size-3.5"})})}),a.jsx(gs,{align:"end",children:h?.map(Ei)})]}):null]}),e[0]=b,e[1]=x,e[2]=j,e[3]=c,e[4]=h,e[5]=s,e[6]=g,e[7]=p,e[8]=r,e[9]=w,e[10]=m,e[11]=u,e[12]=f,e[13]=v}else v=e[13];return v}function Ei(t){return a.jsx(Li,{item:t},t.key)}async function Mi(t){if(t.hosted)return;const e=t.branch;await t.setCurrentTaskBranch(t.nextBranch()),e&&e!==t.baseBranch&&await t.deleteRelease(e)}function Oi(t,e,{hosted:s}){return s&&t!==null?t:e}function zi(t,e){const s=T.c(11),[r,n]=K.useState(null);let i;s[0]!==r||s[1]!==t||s[2]!==e?(i=Oi(r,t,e),s[0]=r,s[1]=t,s[2]=e,s[3]=i):i=s[3];let d;s[4]!==t||s[5]!==e?(d=()=>n(e.hosted?t:null),s[4]=t,s[5]=e,s[6]=d):d=s[6];let l;s[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(null),s[7]=l):l=s[7];let o;return s[8]!==i||s[9]!==d?(o={shown:i,hold:d,release:l},s[8]=i,s[9]=d,s[10]=o):o=s[10],o}function Ui({open:t,hosted:e}){return t||e}function Vr(t){return $l({userName:t?.name,userEmail:t?.email})??void 0}function ks(t){const e=T.c(18),{state:s,header:r,body:n,note:i,gate:d,footer:l}=t,o=s!=="ready";let u;e[0]!==r?(u=a.jsx("div",{className:"space-y-0.5 px-4 py-3",children:r}),e[0]=r,e[1]=u):u=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("div",{className:"border-t"}),e[2]=c):c=e[2];let h;e[3]!==i?(h=i?a.jsx("div",{className:"space-y-1.5 border-t px-4 py-3",children:i}):null,e[3]=i,e[4]=h):h=e[4];let p;e[5]!==n||e[6]!==h?(p=a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=p):p=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=a.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let m;return e[11]!==d||e[12]!==s||e[13]!==o||e[14]!==u||e[15]!==p||e[16]!==f?(m=a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":o,children:[u,c,p,d,b,f]}),e[11]=d,e[12]=s,e[13]=o,e[14]=u,e[15]=p,e[16]=f,e[17]=m):m=e[17],m}function ss(t){const e=T.c(2),{children:s}=t;let r;return e[0]!==s?(r=a.jsx("div",{className:"scroll-fade min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 pt-3 pb-2 [scrollbar-width:thin]",children:s}),e[0]=s,e[1]=r):r=e[1],r}function Gr(t){const e=T.c(10);let s,r,n;e[0]!==t?({className:r,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let i;e[4]!==r?(i=G("rounded-lg border bg-card px-3 py-2.5",r),e[4]=r,e[5]=i):i=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==i?(d=a.jsx("div",{className:i,...n,children:s}),e[6]=s,e[7]=n,e[8]=i,e[9]=d):d=e[9],d}function nt(t){const e=T.c(4),{className:s}=t;let r;e[0]!==s?(r=G("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=r):r=e[1];let n;return e[2]!==r?(n=a.jsx("div",{className:r}),e[2]=r,e[3]=n):n=e[3],n}function Bt(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(Gr,{children:a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx(nt,{className:"size-4 rounded-md"}),a.jsx(nt,{className:"h-3 w-24"}),a.jsx(nt,{className:"h-2.5 w-16"}),a.jsx(nt,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}const Hi="secret";function Wr(t){return t.kind!=="block"?null:t.namedRule??null}function qi(t,e){const s=e.find(r=>r&&typeof r=="object");return s?wl(s.__resolveType):Pl(t)}const Ki=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function vn(t){const e=Ki.exec(t)?.[1];return e?ni(e):null}function ps(t){if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}return null}function Vi(t,e){return t===null?"new":e===null?"removed":"edited"}function Qr(t){const e=t.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return e?(e.charAt(0).toUpperCase()+e.slice(1)).replace(/\s+[A-Z](?=[a-z])/g,s=>s.toLowerCase()):t}function qt(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const r=t.__resolveType;if(typeof r=="string"&&r.trim()){if(s)return wa(r);const i=(r.split("/").pop()??r).replace(/\.[jt]sx?$/,"");return Qr(i)||i}}return`Section ${e+1}`}function yn(t){if(sr(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&Pa(e)?t.section??null:null}const Jr=6;function ds(t,e=0){if(e>Jr||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>ds(n,e+1));const s=t;if(Ys(s.__resolveType))return Ms(s).flatMap(n=>ds(n?.value,e+1));const r=yn(s);return r!==null?ds(r,e+1):[s]}function Ms(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function On(t){let e=t;for(let s=0;s<Jr;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const r=e;if(Ys(r.__resolveType))return r;const n=yn(r);if(n===null)return null;e=n}return null}function Gi(t,e,s){const r=Ms(On(t)),n=e?Ms(On(e)):[],i=e?Array.from({length:Math.max(r.length,n.length)},(o,u)=>u).filter(o=>!Ns(r[o],n[o])):[],l=[...i.map(o=>r[o]??n[o]),...r.filter((o,u)=>!i.includes(u))].flatMap(o=>ds(o?.value)).map(o=>qt(o,s,!0));return[...new Set(l)]}function Fs(t,e,s,r,n){let i=t,d=!1;for(let o=0;o<4;o++){if(!i||typeof i!="object"||Array.isArray(i)){d=!0;break}const u=i;if(Ys(u.__resolveType)){d=!0;break}const c=yn(u);if(c===null)break;i=c}const l=d?Gi(t,n,e):[];return{name:qt(d?t:i,e,!0),kind:"section",status:s,fields:r,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function Os(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((r,n)=>r&&typeof r=="object"&&!Array.isArray(r)?[{section:r,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const r=s.variants;if(Array.isArray(r))return r.flatMap((n,i)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&sr(d),o=l?d.value:d;if(!Array.isArray(o))return[];const u=l?["sections","variants",i,"value","value"]:["sections","variants",i,"value"];return o.flatMap((c,h)=>c&&typeof c=="object"&&!Array.isArray(c)?[{section:c,basePath:[...u,h]}]:[])})}return[]}function zn(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const r=s;return Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{})}return s})}function Ns(t,e){return t===void 0&&e===void 0?!0:zn(t)===zn(e)}function Rt(t,e,s,r=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),i=[];for(const d of n){if(d.startsWith("__")||r.has(d))continue;const l=t?t[d]:void 0,o=e?e[d]:void 0;Ns(l,o)||i.push({label:Qr(d),path:[...s,d],from:l,to:o})}return i}function Wi(t,e){const s=e.find(r=>r&&typeof r=="object");return s?s.__resolveType===Ll:t===El}function Qi(t,e){const s=n=>n===void 0||!!n&&typeof n=="object"&&!Array.isArray(n)&&!("__resolveType"in n),r=[];for(const n of Rt(t,e,[])){const i=String(n.path[0]);s(n.from)&&s(n.to)?r.push(...Rt(n.from??{},n.to??{},[i])):r.push(n)}return r}const Ji=new Set(["sections"]);function jn(t,e,s=!1){const r=t?Os(t,s):[],n=e?Os(e,s):[],i=[],d=Math.max(r.length,n.length);for(let o=0;o<d;o++){const u=r[o],c=n[o];if(!s){const h=Xi(u,c,o);h&&i.push(h);continue}if(u&&c){if(Ns(u.section,c.section))continue;i.push(Fs(c.section,o,"edited",Rt(u.section,c.section,c.basePath),u.section))}else c?i.push(Fs(c.section,o,"new",[])):u&&i.push(Fs(u.section,o,"removed",[]))}const l=Rt(t,e,[],Ji);return l.length>0&&i.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),i}function Xi(t,e,s){return t&&e?Ns(t.section,e.section)?null:{name:qt(e.section,s),kind:"section",status:"edited",fields:Rt(t.section,e.section,e.basePath)}:e?{name:qt(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:qt(t.section,s),kind:"section",status:"removed",fields:[]}:null}function zs(t,e){return{kind:"other",blockKey:null,name:t.split("/").pop()??t,pagePath:null,isSiteApp:!1,status:e,filepaths:[t],sections:[],fromJson:null,toJson:null}}function Yi(t){const e=[],s=[],r=[],n=[];for(const[i,d]of Object.entries(t?.diffs??{})){if(fn(i)){n.push(i);continue}const l=Vi(d.from,d.to),o=vn(i);if(!o){r.push(zs(i,l));continue}const u=ps(d.from),c=ps(d.to),h=c??u;if(!h){r.push(zs(i,l));continue}const p=Ht(o,h);if(p){e.push({kind:"page",blockKey:o,name:p.name,pagePath:p.path,isSiteApp:!1,status:l,filepaths:[i],sections:l==="edited"?jn(u,c):[],fromJson:u,toJson:c});continue}const b=dn(o,h);s.push({kind:"block",blockKey:o,name:ms(o,h),pagePath:null,isSiteApp:b,status:l,filepaths:[i],sections:l==="edited"?[{name:ms(o,h),kind:"section",status:"edited",fields:Rt(u,c,[])}].filter(f=>f.fields.length>0):[],fromJson:u,toJson:c})}return Xr({pages:e,blocks:s,other:r,generated:n})}function $s(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function Xr(t){const{pages:e,blocks:s,other:r,generated:n}=t;return e.sort($s),s.sort($s),r.sort($s),{pages:e,blocks:s,other:r,generated:n,count:e.length+s.length+r.length}}function Zi(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function Yr(t){return t.startsWith("pages-")}function Zr(t){const{files:e,lookup:s,diff:r}=t,n=[],i=[],d=[],l=[];for(const o of e){const u=o.path;if(fn(u)){l.push(u);continue}const c=Zi(o.status),h=vn(u);if(!h){d.push(zs(u,c));continue}const p=r?.diffs[u],b=ps(p?.from??null),f=ps(p?.to??null),m=ea(s,h),x=m??f??b;if((m?Ht(h,m):null)??(!m&&Yr(h))){const j=x?Ht(h,x):null;n.push({kind:"page",blockKey:h,name:j?.name??Er(h),pagePath:j?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?jn(b,f):[],fromJson:b,toJson:f??(c==="new"?m:null)});continue}const w=ms(h,x??{});i.push({kind:"block",blockKey:h,name:w,pagePath:null,isSiteApp:dn(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:w,kind:"section",status:"edited",fields:Rt(b,f,[])}].filter(j=>j.fields.length>0):[],fromJson:b,toJson:f})}return Xr({pages:n,blocks:i,other:d,generated:l})}function ea(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function eo(t,e){return t??e}function ta(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const _s=3;function ls(t){if(t.length<=_s)return ta(t);const e=t.length-_s;return`${t.slice(0,_s).join(", ")} and ${e} more`}function to(t,e){if(!e){const r=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return r.length>0?`${t.name} (${r.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(r=>r.kind==="section").flatMap(r=>r.wrapper?r.held??[]:[r.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function so(t){const e=Wr(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function no(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),r=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${ls(s.map(l=>to(l,!!t.v8)))}`),r.length>0){const l=r.length===1?"page":"pages";e.push(`added the ${ls(r.map(o=>o.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${ls(n.map(o=>o.name))} ${l}`)}const i=t.blocks.map(so);if(i.length>0&&e.push(`changed ${ls(i)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=ta(e);return _l(d.charAt(0).toUpperCase()+d.slice(1))}function ro(t,e){return t?Os(t,e).length:0}function ao(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?ro(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const r of t.sections){if(r.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=r.fields.length}return s}const Un="••••••";function Gt(t){if(Array.isArray(t))return t.map(Gt);if(!t||typeof t!="object")return t;const e=t,s={};for(const[r,n]of Object.entries(e))s[r]=Gt(n);return e.__resolveType===Hi&&"ciphertext"in e&&(s.ciphertext=Un),ka(e)&&"encrypted"in e&&(s.encrypted=Un),s}function Hn(t){return t.map(e=>({...e,from:Gt(e.from),to:Gt(e.to)}))}function lo(t){const{changes:e,sides:s,lookup:r,meta:n,hosted:i}=t,d=[],l=[],o=c=>[...new Set((s?.diagnostics??[]).filter(h=>An(Sa(h.file))===An(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,x=ea(r,c),g=x??m??f,w=o(c),j={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...w.length>0?{unreadable:w}:{},fromJson:Gt(f),toJson:Gt(m??(p==="new"?x:null))},v=x?Ht(c,x,n):null,S=!x&&g?Ht(c,g,n):null;if(v??S??(!g&&Yr(c))){const y=g?Ht(c,g,n):null;d.push({...j,kind:"page",name:y?.name??Er(c),pagePath:y?.path??null,isSiteApp:!1,sections:p==="edited"?jn(f,m,!0).map(A=>({...A,fields:Hn(A.fields)})):[]});continue}const P=i?yl(c,g,x,m,f):null,k=P?jl(P,[g,x,m,f]):ms(c,g??{}),N=qi(c,[x,m,f]),C=Wi(c,[x,m,f]);l.push({...j,kind:"block",name:C?"Settings":k,...C?{cmsSettings:!0}:{},...P?{blogKind:P}:{},...N?{namedRule:N}:{},pagePath:null,isSiteApp:dn(c,x??g??{}),sections:p==="edited"?[{name:C?"Settings":k,kind:"section",status:"edited",fields:Hn(C?Qi(f,m):Rt(f,m,[]))}].filter(y=>y.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function ke(t){return t.filepaths[0]??t.blockKey??t.name}function io(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function oo(t,e){const s=t.kind==="block"?Kl:kr;return a.jsx("span",{title:io(t.status,e),className:"flex shrink-0",children:a.jsx(s,{className:G("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function co(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;if(t.blogKind)return Sl(t.blogKind,e);if(t.cmsSettings)return e("thread.publishPopover.settingsDetail");const s=Wr(t);return s==="experiments"?e("thread.publishPopover.abTests"):s==="campaigns"?e("thread.publishPopover.campaignDates"):t.isSiteApp?e("thread.publishPopover.siteConfiguration"):e("thread.publishPopover.globalSection")}function uo(t,e,s){const r=ao(t,s);if(r.newPageSections!==null)return[r.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:r.newPageSections})];const n=[];return r.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):r.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:r.sections})),r.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):r.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:r.fields})),r.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function sa(t){const e=T.c(46),{change:s,bodyPending:r,selected:n,onSelect:i,confirming:d,onConfirmingChange:l,onDiscard:o,isPublishing:u,isDiscarding:c,v8:h}=t,p=r===void 0?!1:r,b=h===void 0?!1:h,f=fe();let m;e[0]!==s||e[1]!==f?(m=co(s,f),e[0]=s,e[1]=f,e[2]=m):m=e[2];const x=m;let g;if(e[3]!==p||e[4]!==s||e[5]!==d||e[6]!==x||e[7]!==c||e[8]!==u||e[9]!==l||e[10]!==o||e[11]!==i||e[12]!==n||e[13]!==f||e[14]!==b){const w=uo(s,f,b),j=p&&w.length===0&&s.status==="edited",v=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let S;e[16]!==v?(S=G("cursor-pointer transition-colors hover:bg-accent",v),e[16]=v,e[17]=S):S=e[17];let P;e[18]!==s?(P=ke(s),e[18]=s,e[19]=P):P=e[19];let k;e[20]!==s||e[21]!==f?(k=oo(s,f),e[20]=s,e[21]=f,e[22]=k):k=e[22];let N;e[23]!==s.cmsSettings||e[24]!==s.name||e[25]!==f?(N=s.cmsSettings?f("thread.publishPopover.settings"):s.name,e[23]=s.cmsSettings,e[24]=s.name,e[25]=f,e[26]=N):N=e[26];let C;e[27]!==N?(C=a.jsx("span",{className:"truncate text-sm font-medium",children:N}),e[27]=N,e[28]=C):C=e[28];let y;e[29]!==x?(y=x?a.jsx("span",{className:"truncate text-xs text-muted-foreground",children:x}):null,e[29]=x,e[30]=y):y=e[30];let A;e[31]!==n||e[32]!==C||e[33]!==y?(A=a.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[C,y]}),e[31]=n,e[32]=C,e[33]=y,e[34]=A):A=e[34];let R;e[35]!==d||e[36]!==c||e[37]!==u||e[38]!==l||e[39]!==o||e[40]!==f?(R=d?a.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[a.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:E=>{E.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),a.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:E=>{E.stopPropagation(),l(!1),o?.()},disabled:c,children:f("thread.publishPopover.discard")})]}):o?a.jsx(ys,{children:a.jsxs(mt,{children:[a.jsx(ht,{asChild:!0,children:a.jsx(be,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:E=>{E.stopPropagation(),l(!0)},disabled:u||c,children:a.jsx(ws,{className:"size-3.5"})})}),a.jsx(ft,{children:f("thread.publishPopover.discard")})]})}):null,e[35]=d,e[36]=c,e[37]=u,e[38]=l,e[39]=o,e[40]=f,e[41]=R):R=e[41];let B;e[42]!==A||e[43]!==R||e[44]!==k?(B=a.jsxs("div",{className:"flex items-center gap-2.5",children:[k,A,R]}),e[42]=A,e[43]=R,e[44]=k,e[45]=B):B=e[45],g=a.jsxs(Gr,{className:S,"data-change-id":P,onClick:i,children:[B,w.length>0?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:w.map(ho)}):j?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:a.jsx(nt,{className:"h-4 w-2/3"})}):null]}),e[3]=p,e[4]=s,e[5]=d,e[6]=x,e[7]=c,e[8]=u,e[9]=l,e[10]=o,e[11]=i,e[12]=n,e[13]=f,e[14]=b,e[15]=g}else g=e[15];return g}function ho(t,e){return a.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function na(){const t=T.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:-1,height:-1},t[0]=e):e=t[0];const[s,r]=K.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const o=()=>r(c=>c.width===l.clientWidth&&c.height===l.clientHeight?c:{width:l.clientWidth,height:l.clientHeight});o();const u=new ResizeObserver(o);return u.observe(l),()=>u.disconnect()},t[1]=n):n=t[1];const i=n;let d;return t[2]!==s?(d=[s,i],t[2]=s,t[3]=d):d=t[3],d}function fo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const mo=[{width:"w-3/4",tone:"ctx"},{width:"w-1/2",tone:"del"},{width:"w-3/5",tone:"add"},{width:"w-2/5",tone:"ctx"},{width:"w-4/5",tone:"add"},{width:"w-1/2",tone:"ctx"}];function qn(t){const e=T.c(10),{height:s}=t,r=fe();let n;e[0]!==s?(n={height:s},e[0]=s,e[1]=n):n=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=mo.map(po),e[2]=i):i=e[2];let d;e[3]!==r?(d=r("thread.publishDialog.openingComparison"),e[3]=r,e[4]=d):d=e[4];let l;e[5]!==d?(l=a.jsx("div",{className:"flex items-center justify-center pt-1 text-2xs text-muted-foreground",children:d}),e[5]=d,e[6]=l):l=e[6];let o;return e[7]!==n||e[8]!==l?(o=a.jsxs("div",{style:n,className:"flex w-full flex-col gap-1.5 overflow-hidden px-3 py-2",children:[i,l]}),e[7]=n,e[8]=l,e[9]=o):o=e[9],o}function po(t,e){return a.jsxs("div",{className:G("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[a.jsx("div",{className:G("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),a.jsx("div",{className:G("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const ra={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},bo={...ra,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function go(t){const e=T.c(11),{diff:s,emptyMessage:r,rowClassName:n,onDiscardFile:i,hideFileRows:d,editorHeight:l}=t,o=r===void 0?"No file changes in the working tree":r,u=n===void 0?"px-6":n,c=d===void 0?!1:d,h=l===void 0?"380px":l,[p,b]=K.useState(null),[f,m]=K.useState(null);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=fo(),e[0]=x):x=e[0];const g=x;if(!s||Object.keys(s.diffs).length===0){let j;return e[1]!==o?(j=a.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:o}),e[1]=o,e[2]=j):j=e[2],j}let w;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==p||e[7]!==c||e[8]!==i||e[9]!==u?(w=a.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(j=>{const[v,S]=j,{from:P,to:k}=S,N=p===v,C=P===null,y=k===null,A=v.startsWith("/")?v.slice(1):v,R=A.lastIndexOf("/"),B=R>=0?A.slice(R+1):A,E=R>=0?A.slice(0,R):null,I=ri(v),M=C?"bg-success":y?"bg-destructive":"bg-warning";return c?a.jsx("div",{children:a.jsx(Fn,{original:P??"",modified:k??"",language:I,theme:g,height:h,loading:a.jsx(qn,{height:h}),options:bo})},v):a.jsxs("div",{children:[a.jsxs("div",{className:G("flex items-center gap-3 py-3 hover:bg-accent",u),children:[a.jsx("button",{type:"button",className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground transition-transform hover:text-foreground",onClick:()=>b(N?null:v),children:a.jsx(tr,{className:G("h-3.5 w-3.5 transition-transform",N&&"rotate-90")})}),a.jsx("div",{className:G("h-2.5 w-2.5 shrink-0 rounded-full",M)}),a.jsx(kr,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:B}),E&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:E}),i?a.jsxs(xs,{children:[a.jsx(bs,{asChild:!0,children:a.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:a.jsx(Na,{className:"h-3.5 w-3.5"})})}),a.jsx(gs,{align:"end",children:a.jsx(Kt,{className:"text-destructive focus:text-destructive",onSelect:()=>m(v),children:"Discard changes"})})]}):null]}),f===v&&i?a.jsxs("div",{className:G("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[a.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",a.jsx("span",{className:"font-medium",children:B}),"? This cannot be undone."]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[a.jsx(be,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(null),children:"Cancel"}),a.jsx(be,{type:"button",variant:"destructive",size:"sm",onClick:()=>{m(null),i(v)},children:"Discard"})]})]}):null,N&&a.jsx("div",{className:"border-t",children:a.jsx(Fn,{original:P??"",modified:k??"",language:I,theme:g,height:h,loading:a.jsx(qn,{height:h}),options:ra})})]},v)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=p,e[7]=c,e[8]=i,e[9]=u,e[10]=w):w=e[10],w}function xo(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&kl(e)?t.blockKey:null}function vo(t){return t.kind!=="page"?!0:!t.pagePath||At(t.pagePath).length>0}function yo(t,e){try{return Ea(t,Cl,e)}catch{return null}}function jo(t,e,s){if(!e)return;const r=Nl(e,t);if(!r)return null;if(At(r.path).length===0||s?.path!==r.path)return r.path;const n=un(r.path,s.params);return At(n).length===0?n:r.path}function wo(t){return t.sectionKey&&!t.v8?yo(t.previewServerUrl,t.sectionKey):So(t.previewServerUrl,t.path)}function Po(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(At(s).length===0)return s;if(e?.path!==s)return"";const r=un(s,e.params);return At(r).length===0?r:""}function So(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const r=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,r);return n.origin===r.origin?n:null}catch{return null}}function ko(t,e){return e?.kind==="pointer"&&e.link?rn(t.toString(),e.link):aa(t,e)}function aa(t,e){if(!e)return null;if(e.kind==="pointer")return rn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function No(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function Co(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const la=K.createContext(!0),Ao=["split","before","after","code"];function Ro(t){return Ao.includes(t)}const ia={desktop:1280,mobile:412};function To(t,e){const s=(i,d)=>t.unreadable?.includes(d)?e:i?`${JSON.stringify(i,null,2)}
2
- `:null,r=t.status==="new"?null:s(t.fromJson,"before"),n=t.status==="removed"?null:s(t.toJson,"after");return r===null&&n===null?{diffs:{}}:t.status==="edited"&&(r===null||n===null)?{diffs:{}}:{diffs:{[Ra(t.entry.name)]:{from:r,to:n}}}}function oa(t){const e=T.c(76),{change:s,diff:r,bodyPending:n,previewServerUrl:i,draft:d,lastPage:l,v8:o,onReady:u}=t,c=fe(),h=K.use(la),p=xo(s),b=o?null:p,f=o?p:null,m=f?jo(f,o?.blocks,l):void 0,x=f!==null&&m===null,g=No(s.kind,i,d)&&(f===null||typeof m=="string"),[w,j]=K.useState(null),v=g?w??"split":"code",[S,P]=K.useState("desktop"),[k,N]=K.useState(null),C=k??(f?m??"":Po(s,l));let y;e[0]!==s?(y=vo(s),e[0]=s,e[1]=y):y=e[1];const A=y,R=i?wo({previewServerUrl:i,sectionKey:p,path:C,v8:!!o}):null,B=R?rn(R.toString(),Ma):null,E=R?aa(R,d):null,I=R?ko(R,d):null;let M;e[2]!==s||e[3]!==r?.diffs||e[4]!==c?(M=s.entry?To(s,c("thread.publishCompare.sideUnreadable")):{diffs:Object.fromEntries(s.filepaths.flatMap(q=>{const ue=r?.diffs[q];return ue?[[q,ue]]:[]}))},e[2]=s,e[3]=r?.diffs,e[4]=c,e[5]=M):M=e[5];const F=M;let Q;e[6]!==F.diffs?(Q=Object.keys(F.diffs),e[6]=F.diffs,e[7]=Q):Q=e[7];const W=Q.length>0;let H;e:{if(b!==null){H=null;break e}if(f!==null){const ue=C.trim();if(!ue){H=null;break e}H=At(ue).length>0?c("thread.publishCompare.dynamicHint",{template:ue}):c("thread.publishCompare.blockHint",{path:ue});break e}if(s.kind!=="page"){let ue;e[8]!==c?(ue=c("thread.publishCompare.globalHint"),e[8]=c,e[9]=ue):ue=e[9],H=ue;break e}let q;e[10]!==s.pagePath||e[11]!==c?(q=s.pagePath&&At(s.pagePath).length>0?c("thread.publishCompare.dynamicHint",{template:s.pagePath}):null,e[10]=s.pagePath,e[11]=c,e[12]=q):q=e[12],H=q}const _=H,z=Co(s,!!o),[ne,se]=K.useState(Do);let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=q=>se(ue=>ue.has(q)?ue:new Set(ue).add(q)),e[13]=O):O=e[13];const le=O;let Y;e[14]!==o?(Y=q=>o?a.jsx(Fo,{...q,onLoaded:le}):a.jsx(Io,{...q}),e[14]=o,e[15]=Y):Y=e[15];const Z=Y,J=(g?[z.before==="new"?null:B,z.after==="removed"?null:E].flatMap(q=>q?[xn(q,S)]:[]):[]).every(q=>ne.has(q));let re;e[16]!==u||e[17]!==J?(re=J&&u?q=>{q&&u()}:void 0,e[16]=u,e[17]=J,e[18]=re):re=e[18];const ie=re,pe=z.before==="new"?a.jsx(is,{icon:a.jsx(Rr,{className:"size-5 text-brand"}),title:c("thread.publishCompare.newTitle"),description:c("thread.publishCompare.newDescription")}):Z({url:B,device:S,title:c("thread.publishCompare.before"),missing:c("thread.publishCompare.enterPath")}),de=z.after==="removed"?a.jsx(is,{icon:a.jsx(ws,{className:"size-5 text-destructive"}),title:c("thread.publishCompare.removedTitle"),description:c("thread.publishCompare.removedDescription")}):Z({url:E,device:S,title:c("thread.publishCompare.after"),missing:c(R?"thread.publishCompare.draftUnavailable":"thread.publishCompare.enterPath")});let ae;e[19]!==g||e[20]!==j||e[21]!==h||e[22]!==c||e[23]!==v?(ae=g||h?a.jsx(wr,{value:v,onValueChange:q=>{Ro(q)&&j(q)},children:a.jsxs(jr,{className:"h-8 w-auto",variant:"pill",children:[g?a.jsxs(a.Fragment,{children:[a.jsx(Dt,{value:"split",className:"px-3 text-xs",children:c("thread.publishCompare.sideBySide")}),a.jsx(Dt,{value:"before",className:"px-3 text-xs",children:c("thread.publishCompare.before")}),a.jsx(Dt,{value:"after",className:"px-3 text-xs",children:c("thread.publishCompare.after")})]}):null,h?a.jsx(Dt,{value:"code",className:"px-3 text-xs",children:c("thread.publishCompare.code")}):null]})}):null,e[19]=g,e[20]=j,e[21]=h,e[22]=c,e[23]=v,e[24]=ae):ae=e[24];let oe;e[25]!==I||e[26]!==g||e[27]!==s.pagePath||e[28]!==S||e[29]!==C||e[30]!==A||e[31]!==b||e[32]!==P||e[33]!==N||e[34]!==c||e[35]!==v?(oe=g&&v!=="code"?a.jsxs(a.Fragment,{children:[b?null:A?a.jsx(Ca,{value:C,onChange:q=>N(q.target.value),placeholder:s.pagePath??"/","aria-label":c("thread.publishCompare.pathLabel"),className:"h-8 w-56 font-mono text-xs"}):a.jsx("span",{className:"max-w-56 truncate px-1 font-mono text-xs text-muted-foreground",children:C}),a.jsxs("div",{className:"flex items-center rounded-lg border p-0.5",children:[a.jsx(Kn,{active:S==="desktop",label:c("thread.publishCompare.desktop"),onClick:()=>P("desktop"),children:a.jsx(ai,{className:"size-3.5"})}),a.jsx(Kn,{active:S==="mobile",label:c("thread.publishCompare.mobile"),onClick:()=>P("mobile"),children:a.jsx(al,{className:"size-3.5"})})]}),I?a.jsxs("a",{href:I,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[a.jsx(Aa,{className:"size-3.5"}),c("thread.publishCompare.openDraft")]}):null]}):null,e[25]=I,e[26]=g,e[27]=s.pagePath,e[28]=S,e[29]=C,e[30]=A,e[31]=b,e[32]=P,e[33]=N,e[34]=c,e[35]=v,e[36]=oe):oe=e[36];let ce;e[37]!==ae||e[38]!==oe?(ce=a.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b bg-background px-4 py-2.5 max-md:pr-12",children:[ae,oe]}),e[37]=ae,e[38]=oe,e[39]=ce):ce=e[39];let U;e[40]!==g||e[41]!==_||e[42]!==v?(U=_&&g&&v!=="code"?a.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:_}):null,e[40]=g,e[41]=_,e[42]=v,e[43]=U):U=e[43];let ee;e[44]!==x||e[45]!==h||e[46]!==c?(ee=x&&h?a.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:c("thread.publishCompare.notOnAnyPage")}):null,e[44]=x,e[45]=h,e[46]=c,e[47]=ee):ee=e[47];let ye;e[48]!==i||e[49]!==h||e[50]!==c||e[51]!==f||e[52]!==m||e[53]!==v?(ye=v==="code"&&!h?f!==null&&m===void 0?a.jsx(nt,{className:"m-4 h-64 rounded"}):i===null?a.jsx(is,{icon:a.jsx(hs,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.previewNotReadyTitle"),description:c("thread.publishCompare.draftUnavailable")}):a.jsx(is,{icon:a.jsx(hs,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.noPreviewTitle"),description:c("thread.publishCompare.noPreviewDescription")}):null,e[48]=i,e[49]=h,e[50]=c,e[51]=f,e[52]=m,e[53]=v,e[54]=ye):ye=e[54];let X;e[55]!==n||e[56]!==W||e[57]!==F||e[58]!==h||e[59]!==c||e[60]!==v?(X=v==="code"&&h?a.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-background [scrollbar-width:thin]",children:W?a.jsx(go,{diff:F,hideFileRows:!0,editorHeight:"70vh"}):n?a.jsx(nt,{className:"m-4 h-64 rounded"}):a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:c("thread.publishPopover.detailsUnavailable")})}):null,e[55]=n,e[56]=W,e[57]=F,e[58]=h,e[59]=c,e[60]=v,e[61]=X):X=e[61];let te;e[62]!==de||e[63]!==pe||e[64]!==g||e[65]!==c||e[66]!==v?(te=g?a.jsxs("div",{className:G("flex min-h-0 flex-1 gap-3 p-3",v==="code"&&"hidden"),children:[a.jsx(Vn,{label:c("thread.publishCompare.before"),hidden:v==="after",children:pe}),a.jsx(Vn,{label:c("thread.publishCompare.after"),highlight:!0,hidden:v==="before",children:de})]}):null,e[62]=de,e[63]=pe,e[64]=g,e[65]=c,e[66]=v,e[67]=te):te=e[67];let we;return e[68]!==ie||e[69]!==ce||e[70]!==U||e[71]!==ee||e[72]!==ye||e[73]!==X||e[74]!==te?(we=a.jsxs("div",{ref:ie,className:"flex min-h-0 min-w-0 flex-1 flex-col bg-muted/40",children:[ce,U,ee,ye,X,te]}),e[68]=ie,e[69]=ce,e[70]=U,e[71]=ee,e[72]=ye,e[73]=X,e[74]=te,e[75]=we):we=e[75],we}function Do(){return new Set}function Kn(t){const e=T.c(8),{active:s,label:r,onClick:n,children:i}=t,d=s&&"bg-accent text-foreground";let l;e[0]!==d?(l=G("flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",d),e[0]=d,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==i||e[4]!==r||e[5]!==n||e[6]!==l?(o=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":s,title:r,onClick:n,className:l,children:i}),e[2]=s,e[3]=i,e[4]=r,e[5]=n,e[6]=l,e[7]=o):o=e[7],o}function Vn(t){const e=T.c(18),{label:s,highlight:r,hidden:n,children:i}=t,d=r===void 0?!1:r,o=(n===void 0?!1:n)&&"hidden";let u;e[0]!==o?(u=G("flex min-h-0 min-w-0 flex-1 flex-col gap-1.5",o),e[0]=o,e[1]=u):u=e[1];const c=d&&"bg-brand";let h;e[2]!==c?(h=G("size-1.5 rounded-full bg-muted-foreground/50",c),e[2]=c,e[3]=h):h=e[3];let p;e[4]!==h?(p=a.jsx("span",{className:h}),e[4]=h,e[5]=p):p=e[5];let b;e[6]!==s||e[7]!==p?(b=a.jsxs("div",{className:"flex items-center gap-1.5 px-0.5 text-2xs font-medium text-muted-foreground",children:[p,s]}),e[6]=s,e[7]=p,e[8]=b):b=e[8];const f=d&&"border-brand/60";let m;e[9]!==f?(m=G("relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-background",f),e[9]=f,e[10]=m):m=e[10];let x;e[11]!==i||e[12]!==m?(x=a.jsx("div",{className:m,children:i}),e[11]=i,e[12]=m,e[13]=x):x=e[13];let g;return e[14]!==x||e[15]!==u||e[16]!==b?(g=a.jsxs("div",{className:u,children:[b,x]}),e[14]=x,e[15]=u,e[16]=b,e[17]=g):g=e[17],g}function is(t){const e=T.c(10),{icon:s,title:r,description:n}=t;let i;e[0]!==s?(i=a.jsx("div",{className:"mb-1",children:s}),e[0]=s,e[1]=i):i=e[1];let d;e[2]!==r?(d=a.jsx("p",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=d):d=e[3];let l;e[4]!==n?(l=a.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=l):l=e[5];let o;return e[6]!==i||e[7]!==d||e[8]!==l?(o=a.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 px-6 text-center",children:[i,d,l]}),e[6]=i,e[7]=d,e[8]=l,e[9]=o):o=e[9],o}function Bo(t,e){if(!t)return{visibility:"hidden",width:e};const s=Math.min(t.width/e,1);return{left:Math.max((t.width-e*s)/2,0),width:e,height:t.height/s,transform:`scale(${s})`,transformOrigin:"top left"}}function Io(t){const e=T.c(24),{url:s,device:r,title:n,missing:i}=t,[d,l]=na(),[o,u]=K.useState(null);if(!s){let P;return e[0]!==i?(P=a.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=P):P=e[1],P}let c;e[2]!==r||e[3]!==s?(c=xn(s,r),e[2]=r,e[3]=s,e[4]=c):c=e[4];const h=c,p=ia[r],b=d.width>0?Math.min(d.width/p,1):1,f=d.width>0?Math.max((d.width-p*b)/2,0):0;let m;e[5]!==h?(m=()=>u(h),e[5]=h,e[6]=m):m=e[6];const x=d.height>0?d.height/b:"100%",g=`scale(${b})`;let w;e[7]!==p||e[8]!==f||e[9]!==x||e[10]!==g?(w={left:f,width:p,height:x,transform:g,transformOrigin:"top left"},e[7]=p,e[8]=f,e[9]=x,e[10]=g,e[11]=w):w=e[11];let j;e[12]!==h||e[13]!==m||e[14]!==w||e[15]!==n?(j=a.jsx("iframe",{src:h,title:n,sandbox:"allow-scripts allow-same-origin",onLoad:m,className:"absolute top-0 border-0 bg-white",style:w},h),e[12]=h,e[13]=m,e[14]=w,e[15]=n,e[16]=j):j=e[16];let v;e[17]!==o||e[18]!==h?(v=o!==h?a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:a.jsx(Vt,{className:"size-5 motion-reduce:animate-none"})}):null,e[17]=o,e[18]=h,e[19]=v):v=e[19];let S;return e[20]!==l||e[21]!==j||e[22]!==v?(S=a.jsxs("div",{ref:l,className:"absolute inset-0",children:[j,v]}),e[20]=l,e[21]=j,e[22]=v,e[23]=S):S=e[23],S}function Fo(t){const e=T.c(21),{url:s,device:r,title:n,missing:i,onLoaded:d}=t,[l,o]=na(),[u,c]=K.useState(null),[h,p]=K.useState(null),b=l.width>0&&l.height>0;b&&(u?.width!==l.width||u?.height!==l.height)&&c(l);const f=b?l:u;if(!s){let S;return e[0]!==i?(S=a.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=S):S=e[1],S}let m,x,g,w;if(e[2]!==f||e[3]!==r||e[4]!==d||e[5]!==o||e[6]!==h||e[7]!==n||e[8]!==s){const S=xn(s,r),P=ia[r];m=h?.src!==S;const k=[...h&&m?[h]:[],{src:S,logicalWidth:P}];x=o,g="absolute inset-0",w=k.map(N=>{const C=N.src===S&&m;return a.jsx("iframe",{src:N.src,title:n,"aria-hidden":C&&h?!0:void 0,sandbox:"allow-scripts allow-same-origin",onLoad:()=>{N.src===S&&(p(N),d?.(N.src))},className:G("absolute top-0 border-0 bg-white",C&&"pointer-events-none opacity-0"),style:Bo(f,N.logicalWidth)},N.src)}),e[2]=f,e[3]=r,e[4]=d,e[5]=o,e[6]=h,e[7]=n,e[8]=s,e[9]=m,e[10]=x,e[11]=g,e[12]=w}else m=e[9],x=e[10],g=e[11],w=e[12];let j;e[13]!==m||e[14]!==h?(j=m?h?a.jsx(Vt,{className:"absolute right-2 top-2 size-4 text-muted-foreground motion-reduce:animate-none"}):a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:a.jsx(Vt,{className:"size-5 motion-reduce:animate-none"})}):null,e[13]=m,e[14]=h,e[15]=j):j=e[15];let v;return e[16]!==x||e[17]!==g||e[18]!==w||e[19]!==j?(v=a.jsxs("div",{ref:x,className:g,children:[w,j]}),e[16]=x,e[17]=g,e[18]=w,e[19]=j,e[20]=v):v=e[20],v}const $o=/^Co-authored-by:\s*([^<\r\n]+?)(?:\s*<[^>\r\n]*>)?\s*$/im;function _o(t){if(!t)return null;const e=$o.exec(t)?.[1]?.trim();return e||null}function Lo(t){return/\[bot\]$/i.test(t)||/-bot$/i.test(t)}function Eo(t){const e=_o(t.body);if(e)return e;const s=t.author.trim();return!s||Lo(s)?null:s}function Mo(t,e,s,r,n,i){return["cms-publish-bodies",t,e,s,r,n,i]}const Oo=6e4;function zo(t,e){return e?null:t.files.map(s=>`${s.index}${s.working_dir} ${s.path}`).sort().join(`
3
- `)}function Uo(t,e,s){const r=T.c(6);let n;r[0]!==s||r[1]!==t||r[2]!==e?(n=Qt.decofile(`${t}/${e}/${s}`),r[0]=s,r[1]=t,r[2]=e,r[3]=n):n=r[3];let i;r[4]!==n?(i={queryKey:n,queryFn:Zs},r[4]=n,r[5]=i):i=r[5];const{data:d}=vt(i);return d}function ca(t){const{orgSlug:e,virtualMcpId:s,branch:r,threadId:n,baseBranch:i,fastPreview:d,recoverSandbox:l}=t,o={orgSlug:e,virtualMcpId:s,branch:r,threadId:n},u=d?{fastPreview:!0}:void 0,c=K.useRef(null),h=async S=>{try{return await S()}catch(P){if(!l||!Mr(P))throw P;return c.current??=l(),await c.current,S()}},p=nr({...mn(o),queryFn:()=>h(()=>Or(o))}),b=p.data,f=b.changedFiles??null,m=b.headSha??null,x=f?f.length>0:Gl(b)||Wl(b),g=vt({queryKey:Mo(e,s,r,i,m,zo(b,d)),queryFn:()=>h(()=>Ql(o,b,i,u)),enabled:x,staleTime:d?Oo:0,gcTime:d?void 0:0,throwOnError:(S,P)=>!f&&P.state.data===void 0}),w=Uo(e,s,r),j=g.data??null,v=f?Zr({files:f,lookup:w,diff:j}):Yi(j);return{status:b,summary:v,allPaths:f?f.map(S=>S.path):Object.keys(j?.diffs??{}),discardablePaths:d?null:new Set(b.files.map(S=>S.path)),changedFilesTotal:b.changedFilesTotal??v.count,changedFilesTruncated:b.changedFilesTruncated??!1,headSha:m,diff:j,bodiesPending:x&&g.isPending,bodiesFailed:g.isError,cardsPending:!f&&x&&g.isPending,refresh:()=>Promise.all([p.refetch(),d?null:g.refetch()])}}function Ho(t){const e=T.c(4);let s;e[0]!==t?(s=Qt.decofile(t),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==s?(r={queryKey:s,queryFn:Zs},e[2]=s,e[3]=r):r=e[3];const{data:n}=vt(r);return n}function qo(t,e){const s=T.c(5);let r;s[0]!==t||s[1]!==e?(r=e?za(e,t):Qt.liveMeta("","no-scope"),s[0]=t,s[1]=e,s[2]=r):r=s[2];let n;s[3]!==r?(n={queryKey:r,queryFn:Zs},s[3]=r,s[4]=n):n=s[4];const{data:i}=vt(n);return i}function wn(t){const e=T.c(27),{backend:s,cacheKey:r,scope:n}=t,i=rr();let d;e[0]!==r?(d=Qt.contentChanges(r),e[0]=r,e[1]=d):d=e[1];let l;e[2]!==s.client||e[3]!==r||e[4]!==i?(l=()=>Ua(i,s.client,r),e[2]=s.client,e[3]=r,e[4]=i,e[5]=l):l=e[5];let o;e[6]!==d||e[7]!==l?(o={queryKey:d,queryFn:l,staleTime:0},e[6]=d,e[7]=l,e[8]=o):o=e[8];const u=nr(o),c=u.data,h=Oa(s,r,c),p=Ho(r),b=qo(s,n),f=h.data??null,m=s.source==="github";let x;e[9]!==c.changes||e[10]!==p||e[11]!==b||e[12]!==f||e[13]!==m?(x=lo({changes:c.changes,sides:f,lookup:p,meta:b,hosted:m}),e[9]=c.changes,e[10]=p,e[11]=b,e[12]=f,e[13]=m,e[14]=x):x=e[14];const g=x;let w;e[15]!==c.changes?(w=Object.entries(c.changes).map(Ko),e[15]=c.changes,e[16]=w):w=e[16];const j=g.count>0&&h.isPending,v=p??null;let S;e[17]!==u?(S=()=>u.refetch(),e[17]=u,e[18]=S):S=e[18];let P;return e[19]!==c||e[20]!==h.isError||e[21]!==g||e[22]!==w||e[23]!==j||e[24]!==v||e[25]!==S?(P={changes:c,summary:g,entries:w,sidesPending:j,sidesFailed:h.isError,blocks:v,refresh:S},e[19]=c,e[20]=h.isError,e[21]=g,e[22]=w,e[23]=j,e[24]=v,e[25]=S,e[26]=P):P=e[26],P}function Ko(t){const[e,s]=t;return{name:e,version:s.version}}function Vo(t){return["smart-review-verdict",t.orgSlug,t.virtualMcpId,t.branch,t.threadId,t.fastPreview?"fast-preview-upstream":"sandbox",t.signature,t.language]}function Go(t){const e=T.c(27),{orgSlug:s,virtualMcpId:r,branch:n,threadId:i,fastPreview:d,status:l,diff:o,enabled:u}=t,[c]=ar(),{language:h}=c;let p,b,f;if(e[0]!==n||e[1]!==o||e[2]!==u||e[3]!==d||e[4]!==h||e[5]!==s||e[6]!==l||e[7]!==i||e[8]!==r){const S=o?pn(o):"";p=u&&!!n&&!!l&&!!o&&S!=="",f=vt,b=Vo({orgSlug:s,virtualMcpId:r,branch:n,threadId:i,fastPreview:d,signature:S,language:h}),e[0]=n,e[1]=o,e[2]=u,e[3]=d,e[4]=h,e[5]=s,e[6]=l,e[7]=i,e[8]=r,e[9]=p,e[10]=b,e[11]=f}else p=e[9],b=e[10],f=e[11];let m;e[12]!==n||e[13]!==o||e[14]!==h||e[15]!==s||e[16]!==l||e[17]!==i||e[18]!==r?(m=()=>Jl({orgSlug:s,virtualMcpId:r,branch:n,threadId:i},{status:l,diff:o,language:h}),e[12]=n,e[13]=o,e[14]=h,e[15]=s,e[16]=l,e[17]=i,e[18]=r,e[19]=m):m=e[19];let x;e[20]!==p||e[21]!==b||e[22]!==m?(x={queryKey:b,queryFn:m,enabled:p,staleTime:1/0,gcTime:6e5,retry:Wo},e[20]=p,e[21]=b,e[22]=m,e[23]=x):x=e[23];const g=f(x),w=g.data??null,j=p&&g.isFetching&&!g.data;let v;return e[24]!==w||e[25]!==j?(v={verdict:w,loading:j},e[24]=w,e[25]=j,e[26]=v):v=e[26],v}function Wo(t,e){return!Mr(e)&&t<1}function da(t){const e=T.c(30),{orgSlug:s,virtualMcpId:r,branch:n,threadId:i,fastPreview:d,status:l,diff:o,policy:u,judgeEnabled:c,paths:h}=t,p=c===void 0?!0:c,b=h===void 0?null:h;let f;e[0]!==o||e[1]!==p||e[2]!==u?(f=p&&Xl(o,u),e[0]=o,e[1]=p,e[2]=u,e[3]=f):f=e[3];const m=f;let x;e[4]!==n||e[5]!==o||e[6]!==d||e[7]!==m||e[8]!==s||e[9]!==l||e[10]!==i||e[11]!==r?(x={orgSlug:s,virtualMcpId:r,branch:n,threadId:i,fastPreview:d,status:l,diff:o,enabled:m},e[4]=n,e[5]=o,e[6]=d,e[7]=m,e[8]=s,e[9]=l,e[10]=i,e[11]=r,e[12]=x):x=e[12];const{verdict:g,loading:w}=Go(x);if(!o&&b){let P;e[13]!==b||e[14]!==u?(P=Yl(b,u),e[13]=b,e[14]=u,e[15]=P):P=e[15];let k;return e[16]!==P?(k={gate:P,ready:!1},e[16]=P,e[17]=k):k=e[17],k}if(!o){let P;return e[18]===Symbol.for("react.memo_cache_sentinel")?(P={gate:{allowed:!0,reason:null},ready:!1},e[18]=P):P=e[18],P}if(!m){let P;e[19]!==o||e[20]!==u?(P=Zl(o,u),e[19]=o,e[20]=u,e[21]=P):P=e[21];let k;return e[22]!==P?(k={gate:P,ready:!0},e[22]=P,e[23]=k):k=e[23],k}let j;e[24]!==w||e[25]!==g?(j=ei(g,w),e[24]=w,e[25]=g,e[26]=j):j=e[26];const v=!w;let S;return e[27]!==j||e[28]!==v?(S={gate:j,ready:v},e[27]=j,e[28]=v,e[29]=S):S=e[29],S}function Qo(t){return["main","master"].includes(t.trim().toLowerCase())}function Jo(t,e,s,r){return t===0?r("thread.publishPopover.publish"):s||!Qo(e)?t===1?r("thread.publishPopover.publishOne"):r("thread.publishPopover.publishCount",{count:t}):t===1?r("thread.publishPopover.publishOneInProduction"):r("thread.publishPopover.publishCountInProduction",{count:t})}const Xo=2500;function Yo(t){const{selectedId:e,readyIds:s,lastShownId:r,liveIds:n}=t;return e===null||s.has(e)?e:r!==null&&r!==e&&n.includes(r)?r:e}function ua(t){const e=T.c(16),s=K.useRef(!1),r=fe();let n;e[0]!==t?(n=h=>{!h&&s.current||t.onOpenChange(h)},e[0]=t,e[1]=n):n=e[1];const i=n;let d;e[2]!==t.mode||e[3]!==r?(d=t.mode==="review"?r("thread.publishPopover.submitForReview"):r("thread.publishPopover.publish"),e[2]=t.mode,e[3]=r,e[4]=d):d=e[4];let l;e[5]!==d?(l=a.jsx(ir,{className:"sr-only",children:d}),e[5]=d,e[6]=l):l=e[6];let o;e[7]!==t?(o=a.jsx(Zo,{...t,publishLockRef:s}),e[7]=t,e[8]=o):o=e[8];let u;e[9]!==l||e[10]!==o?(u=a.jsxs(or,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[l,o]}),e[9]=l,e[10]=o,e[11]=u):u=e[11];let c;return e[12]!==i||e[13]!==t.open||e[14]!==u?(c=a.jsx(lr,{open:t.open,onOpenChange:i,children:u}),e[12]=i,e[13]=t.open,e[14]=u,e[15]=c):c=e[15],c}function Zo(t){const e=T.c(3),s=Tt(t.virtualMcpId,t.branch),r=s.kind==="protocol"&&s.source==="github";let n;return e[0]!==r||e[1]!==t?(n=Ui({open:t.open,hosted:r})?a.jsx(sc,{...t}):null,e[0]=r,e[1]=t,e[2]=n):n=e[2],n}const ec=4,Wt="flex h-[45%] min-h-0 min-w-0 shrink-0 md:h-auto md:flex-1";function rs(t){const e=T.c(5),{list:s,pane:r}=t;let n;e[0]!==s?(n=a.jsx("div",{className:"flex min-h-0 w-full flex-1 flex-col max-md:border-t md:w-[380px] md:flex-none md:shrink-0 md:border-l md:[&>[data-publish-state]>:first-child]:pr-12",children:s}),e[0]=s,e[1]=n):n=e[1];let i;return e[2]!==r||e[3]!==n?(i=a.jsxs(a.Fragment,{children:[r,n]}),e[2]=r,e[3]=n,e[4]=i):i=e[4],i}function Pn(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:G(Wt,"bg-muted/40 p-3"),children:a.jsx(nt,{className:"h-full w-full rounded-lg"})}),t[0]=e):e=t[0],e}function Sn(t){const e=T.c(11),{mode:s,title:r,subLine:n,trailing:i}=t,d=s==="review"?js:ll;let l;e[0]!==d?(l=a.jsx(d,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=d,e[1]=l):l=e[1];let o;e[2]!==l||e[3]!==r||e[4]!==i?(o=a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[l,r,i]}),e[2]=l,e[3]=r,e[4]=i,e[5]=o):o=e[5];let u;e[6]!==n?(u=n?a.jsx("div",{className:"pl-6 text-xs text-muted-foreground",children:n}):null,e[6]=n,e[7]=u):u=e[7];let c;return e[8]!==o||e[9]!==u?(c=a.jsxs(a.Fragment,{children:[o,u]}),e[8]=o,e[9]=u,e[10]=c):c=e[10],c}function kn(t){const e=T.c(9),{draftPreviewUrl:s,t:r}=t;let n;e[0]!==s?(n=()=>{s&&window.open(s,"_blank","noopener,noreferrer")},e[0]=s,e[1]=n):n=e[1];const i=!s;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(hs,{className:"size-4"}),e[2]=d):d=e[2];let l;e[3]!==r?(l=r("thread.publishPopover.preview"),e[3]=r,e[4]=l):l=e[4];let o;return e[5]!==n||e[6]!==i||e[7]!==l?(o=a.jsxs(be,{type:"button",variant:"outline",onClick:n,disabled:i,children:[d,l]}),e[5]=n,e[6]=i,e[7]=l,e[8]=o):o=e[8],o}function ha(t){const e=T.c(21),{mode:s,draftPreviewUrl:r}=t,n=fe();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(Pn,{}),e[0]=i):i=e[0];let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(nt,{className:"h-3.5 w-48"}),e[1]=d):d=e[1];let l;e[2]!==s?(l=a.jsx(Sn,{mode:s,title:d}),e[2]=s,e[3]=l):l=e[3];let o,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(ss,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Bt,{}),a.jsx(Bt,{}),a.jsx(Bt,{})]})}),u=a.jsxs(a.Fragment,{children:[a.jsx(nt,{className:"h-3 w-20"}),a.jsx(nt,{className:"h-14 w-full rounded-lg"})]}),e[4]=o,e[5]=u):(o=e[4],u=e[5]);let c;e[6]!==r||e[7]!==n?(c=a.jsx(kn,{draftPreviewUrl:r,t:n}),e[6]=r,e[7]=n,e[8]=c):c=e[8];const h=s==="review"?"default":"brand";let p;e[9]!==s||e[10]!==n?(p=n(s==="review"?"thread.publishPopover.submitForReview":"thread.publishPopover.publish"),e[9]=s,e[10]=n,e[11]=p):p=e[11];let b;e[12]!==h||e[13]!==p?(b=a.jsx(be,{type:"button",variant:h,className:"flex-1",disabled:!0,children:p}),e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;e[15]!==c||e[16]!==b?(f=a.jsxs("div",{className:"flex gap-2",children:[c,b]}),e[15]=c,e[16]=b,e[17]=f):f=e[17];let m;return e[18]!==f||e[19]!==l?(m=a.jsx(rs,{pane:i,list:a.jsx(ks,{state:"loading",header:l,body:o,note:u,footer:f})}),e[18]=f,e[19]=l,e[20]=m):m=e[20],m}function tc(t){const e=T.c(26),{mode:s,draftPreviewUrl:r,message:n,onRetry:i}=t,d=fe();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("div",{className:G(Wt,"bg-muted/40")}),e[0]=l):l=e[0];let o;e[1]!==d?(o=d("thread.publishPopover.loadFailed"),e[1]=d,e[2]=o):o=e[2];let u;e[3]!==o?(u=a.jsx("span",{className:"truncate",children:o}),e[3]=o,e[4]=u):u=e[4];let c;e[5]!==s||e[6]!==u?(c=a.jsx(Sn,{mode:s,title:u}),e[5]=s,e[6]=u,e[7]=c):c=e[7];let h;e[8]!==n?(h=a.jsx("p",{className:"px-4 py-6 text-xs text-destructive",children:n}),e[8]=n,e[9]=h):h=e[9];let p;e[10]!==r||e[11]!==d?(p=a.jsx(kn,{draftPreviewUrl:r,t:d}),e[10]=r,e[11]=d,e[12]=p):p=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(tn,{className:"size-4"}),e[13]=b):b=e[13];let f;e[14]!==d?(f=d("thread.publishPopover.retry"),e[14]=d,e[15]=f):f=e[15];let m;e[16]!==i||e[17]!==f?(m=a.jsxs(be,{type:"button",variant:"outline",className:"flex-1",onClick:i,children:[b,f]}),e[16]=i,e[17]=f,e[18]=m):m=e[18];let x;e[19]!==p||e[20]!==m?(x=a.jsxs("div",{className:"flex gap-2",children:[p,m]}),e[19]=p,e[20]=m,e[21]=x):x=e[21];let g;return e[22]!==x||e[23]!==c||e[24]!==h?(g=a.jsx(rs,{pane:l,list:a.jsx(ks,{state:"ready",header:c,body:h,footer:x})}),e[22]=x,e[23]=c,e[24]=h,e[25]=g):g=e[25],g}function sc(t){const e=T.c(3),s=t.mode??"publish";let r;return e[0]!==s||e[1]!==t?(r=a.jsx(cr,{children:n=>{const{reset:i}=n;return a.jsx(dr,{fallback:d=>{const{error:l,resetError:o}=d;return a.jsx(tc,{mode:s,draftPreviewUrl:t.draftPreviewUrl,message:l?.message??"",onRetry:()=>{i(),o()}})},children:a.jsx(K.Suspense,{fallback:a.jsx(ha,{mode:s,draftPreviewUrl:t.draftPreviewUrl}),children:a.jsx(nc,{...t})})})}}),e[0]=s,e[1]=t,e[2]=r):r=e[2],r}function nc(t){const e=T.c(13),s=Tt(t.virtualMcpId,t.branch);let r;e[0]!==t.branch||e[1]!==t.orgSlug||e[2]!==t.virtualMcpId?(r={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch},e[0]=t.branch,e[1]=t.orgSlug,e[2]=t.virtualMcpId,e[3]=r):r=e[3];const n=an(r);if(s.kind==="protocol"&&n){let d;return e[4]!==s||e[5]!==n||e[6]!==t?(d=s.source==="sandbox"?a.jsx(lc,{...t,backend:s,cacheKey:n}):a.jsx(ac,{...t,backend:s,cacheKey:n}),e[4]=s,e[5]=n,e[6]=t,e[7]=d):d=e[7],d}if(s.kind!=="legacy"){const d=t.mode??"publish";let l;return e[8]!==t.draftPreviewUrl||e[9]!==d?(l=a.jsx(ha,{mode:d,draftPreviewUrl:t.draftPreviewUrl}),e[8]=t.draftPreviewUrl,e[9]=d,e[10]=l):l=e[10],l}let i;return e[11]!==t?(i=a.jsx(rc,{...t}),e[11]=t,e[12]=i):i=e[12],i}function rc(t){const e=T.c(52),s=It()?.taskId??null;let r;e[0]!==t.baseBranch||e[1]!==t.branch||e[2]!==t.fastPreview||e[3]!==t.orgSlug||e[4]!==t.recoverSandbox||e[5]!==t.virtualMcpId||e[6]!==s?(r={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,baseBranch:t.baseBranch,fastPreview:t.fastPreview,recoverSandbox:t.recoverSandbox},e[0]=t.baseBranch,e[1]=t.branch,e[2]=t.fastPreview,e[3]=t.orgSlug,e[4]=t.recoverSandbox,e[5]=t.virtualMcpId,e[6]=s,e[7]=r):r=e[7];const n=ca(r),i=t.mode!=="review";let d;e[8]!==t.branch||e[9]!==t.fastPreview||e[10]!==t.orgSlug||e[11]!==t.publishPolicy||e[12]!==t.virtualMcpId||e[13]!==n.allPaths||e[14]!==n.diff||e[15]!==n.status||e[16]!==i||e[17]!==s?(d={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,fastPreview:t.fastPreview,status:n.status,diff:n.diff,paths:n.allPaths,policy:t.publishPolicy,judgeEnabled:i},e[8]=t.branch,e[9]=t.fastPreview,e[10]=t.orgSlug,e[11]=t.publishPolicy,e[12]=t.virtualMcpId,e[13]=n.allPaths,e[14]=n.diff,e[15]=n.status,e[16]=i,e[17]=s,e[18]=d):d=e[18];const{gate:l}=da(d),o=n.discardablePaths;let u;e[19]!==o?(u=w=>o===null||w.every(j=>o.has(j)),e[19]=o,e[20]=u):u=e[20];const c=u;let h;e[21]!==c?(h=w=>c(w.filepaths),e[21]=c,e[22]=h):h=e[22];let p;e[23]!==c||e[24]!==n.allPaths||e[25]!==n.changedFilesTruncated?(p=!n.changedFilesTruncated&&c(n.allPaths),e[23]=c,e[24]=n.allPaths,e[25]=n.changedFilesTruncated,e[26]=p):p=e[26];let b;e[27]!==t.branch||e[28]!==n.status?(b=bn(n.status)??t.branch,e[27]=t.branch,e[28]=n.status,e[29]=b):b=e[29];const f=n.headSha??void 0;let m;e[30]!==t.fastPreview||e[31]!==n.diff?(m=!t.fastPreview&&n.diff?{expectedDiffSignature:pn(n.diff)}:{},e[30]=t.fastPreview,e[31]=n.diff,e[32]=m):m=e[32];let x;e[33]!==l||e[34]!==n.allPaths||e[35]!==n.bodiesFailed||e[36]!==n.bodiesPending||e[37]!==n.cardsPending||e[38]!==n.changedFilesTotal||e[39]!==n.changedFilesTruncated||e[40]!==n.diff||e[41]!==n.refresh||e[42]!==n.summary||e[43]!==h||e[44]!==p||e[45]!==b||e[46]!==f||e[47]!==m?(x={summary:n.summary,allPaths:n.allPaths,canDiscard:h,canDiscardAll:p,changedFilesTotal:n.changedFilesTotal,changedFilesTruncated:n.changedFilesTruncated,diff:n.diff,bodiesPending:n.bodiesPending,bodiesFailed:n.bodiesFailed,cardsPending:n.cardsPending,refresh:n.refresh,gate:l,headBranch:b,expectedHeadSha:f,...m,hosted:!1,otherWork:!1},e[33]=l,e[34]=n.allPaths,e[35]=n.bodiesFailed,e[36]=n.bodiesPending,e[37]=n.cardsPending,e[38]=n.changedFilesTotal,e[39]=n.changedFilesTruncated,e[40]=n.diff,e[41]=n.refresh,e[42]=n.summary,e[43]=h,e[44]=p,e[45]=b,e[46]=f,e[47]=m,e[48]=x):x=e[48];let g;return e[49]!==t||e[50]!==x?(g=a.jsx(Nn,{...t,source:x}),e[49]=t,e[50]=x,e[51]=g):g=e[51],g}function fa(t,e){return{summary:t.summary,allPaths:[],canDiscard:()=>!0,canDiscardAll:!0,changedFilesTotal:t.summary.count,changedFilesTruncated:!1,diff:null,bodiesPending:t.sidesPending,bodiesFailed:t.sidesFailed,cardsPending:!1,refresh:t.refresh,protocol:{backend:e,entries:t.entries},v8:{blocks:t.blocks}}}function ac(t){const e=T.c(23);let s,r,n;e[0]!==t?({backend:s,cacheKey:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let i;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(i={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=i):i=e[7];let d;e[8]!==s||e[9]!==r||e[10]!==i?(d={backend:s,cacheKey:r,scope:i},e[8]=s,e[9]=r,e[10]=i,e[11]=d):d=e[11];const l=wn(d),o=s.source==="github";let u;e[12]!==s||e[13]!==l?(u=fa(l,s),e[12]=s,e[13]=l,e[14]=u):u=e[14];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c={allowed:!0,reason:null},e[15]=c):c=e[15];let h;e[16]!==o||e[17]!==n.branch||e[18]!==u?(h={...u,gate:c,headBranch:n.branch,hosted:o,otherWork:!1},e[16]=o,e[17]=n.branch,e[18]=u,e[19]=h):h=e[19];let p;return e[20]!==n||e[21]!==h?(p=a.jsx(Nn,{...n,source:h}),e[20]=n,e[21]=h,e[22]=p):p=e[22],p}function lc(t){const e=T.c(58);let s,r,n;e[0]!==t?({backend:s,cacheKey:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);const i=It()?.taskId??null;let d;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(d={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=d):d=e[7];let l;e[8]!==s||e[9]!==r||e[10]!==d?(l={backend:s,cacheKey:r,scope:d},e[8]=s,e[9]=r,e[10]=d,e[11]=l):l=e[11];const o=wn(l);let u;e[12]!==n.baseBranch||e[13]!==n.branch||e[14]!==n.fastPreview||e[15]!==n.orgSlug||e[16]!==n.recoverSandbox||e[17]!==n.virtualMcpId||e[18]!==i?(u={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:i,baseBranch:n.baseBranch,fastPreview:n.fastPreview,recoverSandbox:n.recoverSandbox},e[12]=n.baseBranch,e[13]=n.branch,e[14]=n.fastPreview,e[15]=n.orgSlug,e[16]=n.recoverSandbox,e[17]=n.virtualMcpId,e[18]=i,e[19]=u):u=e[19];const c=ca(u),h=n.mode!=="review";let p;e[20]!==c.allPaths||e[21]!==c.diff||e[22]!==c.status||e[23]!==n.branch||e[24]!==n.fastPreview||e[25]!==n.orgSlug||e[26]!==n.publishPolicy||e[27]!==n.virtualMcpId||e[28]!==h||e[29]!==i?(p={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:i,fastPreview:n.fastPreview,status:c.status,diff:c.diff,paths:c.allPaths,policy:n.publishPolicy,judgeEnabled:h},e[20]=c.allPaths,e[21]=c.diff,e[22]=c.status,e[23]=n.branch,e[24]=n.fastPreview,e[25]=n.orgSlug,e[26]=n.publishPolicy,e[27]=n.virtualMcpId,e[28]=h,e[29]=i,e[30]=p):p=e[30];const{gate:b}=da(p);let f;if(e[31]!==c.allPaths||e[32]!==o){let k;e[34]!==o?(k=N=>{const C=vn(N);return C===null?!fn(N):!Object.hasOwn(o.changes.changes,C)},e[34]=o,e[35]=k):k=e[35],f=c.allPaths.some(k),e[31]=c.allPaths,e[32]=o,e[33]=f}else f=e[33];const m=f;let x;e[36]!==s||e[37]!==o?(x=fa(o,s),e[36]=s,e[37]=o,e[38]=x):x=e[38];let g;e[39]!==c||e[40]!==o?(g=()=>Promise.all([o.refresh(),c.refresh()]),e[39]=c,e[40]=o,e[41]=g):g=e[41];let w;e[42]!==c.status||e[43]!==n.branch?(w=bn(c.status)??n.branch,e[42]=c.status,e[43]=n.branch,e[44]=w):w=e[44];const j=c.headSha??void 0;let v;e[45]!==c.diff?(v=c.diff?{expectedDiffSignature:pn(c.diff)}:{},e[45]=c.diff,e[46]=v):v=e[46];let S;e[47]!==b||e[48]!==m||e[49]!==j||e[50]!==v||e[51]!==x||e[52]!==g||e[53]!==w?(S={...x,refresh:g,gate:b,headBranch:w,expectedHeadSha:j,...v,hosted:!1,otherWork:m},e[47]=b,e[48]=m,e[49]=j,e[50]=v,e[51]=x,e[52]=g,e[53]=w,e[54]=S):S=e[54];let P;return e[55]!==n||e[56]!==S?(P=a.jsx(Nn,{...n,source:S}),e[55]=n,e[56]=S,e[57]=P):P=e[57],P}function Nn(t){const e=T.c(130),{source:s,publishLockRef:r,onOpenChange:n,mode:i,fastPreview:d,orgSlug:l,virtualMcpId:o,branch:u,baseBranch:c,repoTarget:h,owner:p,repo:b,draftPreviewUrl:f,destinationHost:m,previewServerUrl:x,compareDraft:g,lastPublishedPr:w,onRequestApproval:j,openPullRequest:v,onPullRequestChanged:S,onPublished:P}=t,k=i===void 0?"publish":i,N=w===void 0?null:w,C=v===void 0?null:v,y=fe(),[A]=ar(),{language:R}=A,B=It()?.taskId??null,{data:E}=vs.useSession(),I=hr(fr(l,o,u)),{allPaths:M,changedFilesTotal:F,changedFilesTruncated:Q,diff:W,bodiesFailed:H,refresh:_,gate:z,hosted:ne,otherWork:se}=s;let O;e[0]!==g||e[1]!==s.bodiesPending||e[2]!==s.cardsPending||e[3]!==s.summary?(O={summary:s.summary,cardsPending:s.cardsPending,bodiesPending:s.bodiesPending,compareDraft:g},e[0]=g,e[1]=s.bodiesPending,e[2]=s.cardsPending,e[3]=s.summary,e[4]=O):O=e[4];const le=O;let Y;e[5]!==ne?(Y={hosted:ne},e[5]=ne,e[6]=Y):Y=e[6];const Z=zi(le,Y),{summary:D,cardsPending:J,bodiesPending:re,compareDraft:ie}=Z.shown,[pe,de]=K.useState(null),[ae,oe]=K.useState(!1),[ce,U]=K.useState(ic);let ee;e[7]===Symbol.for("react.memo_cache_sentinel")?(ee=V=>U(he=>he.has(V)?he:new Set(he).add(V)),e[7]=ee):ee=e[7];const ye=ee,[X,te]=K.useState(null);let we;e[8]===Symbol.for("react.memo_cache_sentinel")?(we=[],e[8]=we):we=e[8];const[q,ue]=K.useState(we);let Ke;e[9]!==s.v8?(Ke=V=>{te(V),ue(he=>[V,...he.filter(me=>me!==V)]),s.v8&&setTimeout(()=>ye(V),Xo)},e[9]=s.v8,e[10]=Ke):Ke=e[10];const $e=Ke,[ge,Ee]=K.useState(null);let _e;e[11]!==pe||e[12]!==D?(_e=eo(pe,no(D)),e[11]=pe,e[12]=D,e[13]=_e):_e=e[13];const Pe=_e,Ne=[...D.pages,...D.blocks,...D.other],Ae=Ne.find(V=>ke(V)===X)??Ne[0]??null,xe=Ae?ke(Ae):null,Ve=[...new Set([...xe?[xe]:[],...q,...Ne.map(ke)])].filter(V=>Ne.some(he=>ke(he)===V)).slice(0,ec),De=!!s.v8,[Me,Be]=K.useState(null),Ie=De?Yo({selectedId:xe,readyIds:ce,lastShownId:Me,liveIds:Ve}):xe;De&&Ie===xe&&Ie!==Me&&Be(Ie);const $=k==="review"&&!ne,ve=J?"loading":re?"manifest":"ready",Ce=C?.state==="open",Re=s.headBranch,Fe=E?.user;let Oe;e[14]!==Fe?(Oe=Vr(Fe),e[14]=Fe,e[15]=Oe):Oe=e[15];let ze;e[16]!==s.expectedDiffSignature?(ze=s.expectedDiffSignature?{expectedDiffSignature:s.expectedDiffSignature}:{},e[16]=s.expectedDiffSignature,e[17]=ze):ze=e[17];let Ge;e[18]!==c||e[19]!==u||e[20]!==d||e[21]!==l||e[22]!==p||e[23]!==b||e[24]!==h||e[25]!==s.expectedHeadSha||e[26]!==s.headBranch||e[27]!==Oe||e[28]!==ze||e[29]!==B||e[30]!==o?(Ge={orgSlug:l,virtualMcpId:o,branch:u,threadId:B,fastPreview:d,baseBranch:c,target:h,owner:p,repo:b,headBranch:Re,coAuthor:Oe,expectedHeadSha:s.expectedHeadSha,...ze},e[18]=c,e[19]=u,e[20]=d,e[21]=l,e[22]=p,e[23]=b,e[24]=h,e[25]=s.expectedHeadSha,e[26]=s.headBranch,e[27]=Oe,e[28]=ze,e[29]=B,e[30]=o,e[31]=Ge):Ge=e[31];const rt=Ge,at=$?"review":"publish",lt=E?.user?.name;let We;e[32]!==M||e[33]!==m||e[34]!==ne||e[35]!==Pe||e[36]!==n||e[37]!==P||e[38]!==S||e[39]!==r||e[40]!==_||e[41]!==s.protocol||e[42]!==at||e[43]!==lt||e[44]!==rt?(We={mode:at,target:rt,note:Pe,allPaths:M,destinationHost:m,publishLockRef:r,onOpenChange:n,refresh:_,onPullRequestChanged:S,onPublished:P,hosted:ne,authorName:lt,protocol:s.protocol},e[32]=M,e[33]=m,e[34]=ne,e[35]=Pe,e[36]=n,e[37]=P,e[38]=S,e[39]=r,e[40]=_,e[41]=s.protocol,e[42]=at,e[43]=lt,e[44]=rt,e[45]=We):We=e[45];const{isPublishing:je,publishError:Qe,publishErrorDetail:Je,submit:it,discardChange:$t,discardAll:Ue}=Ml(We),He=gr(l,o).phase==="saving",yt=D.count>0||se,Xt=!je&&yt&&($||z.allowed);let Le;e[46]!==c||e[47]!==$||e[48]!==s.v8||e[49]!==D.count||e[50]!==y?(Le=$?D.count===0?y("thread.publishPopover.submitForReview"):D.count===1?y("thread.publishPopover.submitOneForReview"):y("thread.publishPopover.submitCountForReview",{count:D.count}):Jo(D.count,c,!!s.v8,y),e[46]=c,e[47]=$,e[48]=s.v8,e[49]=D.count,e[50]=y,e[51]=Le):Le=e[51];const Yt=Le;let _t;e:{if($&&Ce){let me;e[52]!==C.number||e[53]!==y?(me=y("thread.publishPopover.updatesPullRequest",{number:C.number}),e[52]=C.number,e[53]=y,e[54]=me):me=e[54],_t=me;break e}const V=N;if(!V?.mergedAt){_t=null;break e}let he;if(e[55]!==R||e[56]!==V||e[57]!==y){const me=Ta(new Date(V.mergedAt),R),Se=Eo(V);he=Se?y("thread.publishPopover.lastPublishedBy",{when:me,name:Se}):y("thread.publishPopover.lastPublished",{when:me}),e[55]=R,e[56]=V,e[57]=y,e[58]=he}else he=e[58];_t=he}const jt=_t;let ot;e[59]!==$||e[60]!==D.count||e[61]!==y?(ot=$?y("thread.publishPopover.submitForReview"):D.count===1?y("thread.publishPopover.publishOne"):D.count>1?y("thread.publishPopover.publishCount",{count:D.count}):y("thread.publishPopover.publish"),e[59]=$,e[60]=D.count,e[61]=y,e[62]=ot):ot=e[62];const wt=ot,Te=(V,he)=>he.length===0?null:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:V}),he.map(me=>{const Se=ke(me);return a.jsx(sa,{change:me,bodyPending:re,selected:Ae!==null&&ke(Ae)===Se,onSelect:()=>$e(Se),confirming:ge===Se,onConfirmingChange:ut=>Ee(ut?Se:null),onDiscard:s.canDiscard(me)?()=>{$t(me)}:void 0,isPublishing:je,isDiscarding:He,v8:!!s.v8},Se)})]});let ct;e:{if($||!yt){ct=null;break e}if(z.pending){let Se;e[63]===Symbol.for("react.memo_cache_sentinel")?(Se=a.jsx(Vt,{className:"size-3.5 motion-reduce:animate-none"}),e[63]=Se):Se=e[63];let ut;e[64]!==y?(ut=y("thread.publishPopover.reviewing"),e[64]=y,e[65]=ut):ut=e[65];let Ct;e[66]!==ut?(Ct=a.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-2.5 text-xs text-muted-foreground",children:[Se,ut]}),e[66]=ut,e[67]=Ct):Ct=e[67],ct=Ct;break e}if(z.allowed){ct=null;break e}let V;e[68]===Symbol.for("react.memo_cache_sentinel")?(V=a.jsx(en,{className:"mt-0.5 size-3.5 shrink-0"}),e[68]=V):V=e[68];let he;e[69]!==z.reason||e[70]!==y?(he=z.reason??y("thread.publishPopover.needsReviewGeneric"),e[69]=z.reason,e[70]=y,e[71]=he):he=e[71];let me;e[72]!==he?(me=a.jsxs("div",{className:"flex items-start gap-2 border-t px-4 py-2.5 text-xs text-warning",children:[V,a.jsx("span",{children:he})]}),e[72]=he,e[73]=me):me=e[73],ct=me}const Zt=ct;let pt;e[74]!==Ue||e[75]!==ae||e[76]!==He||e[77]!==je||e[78]!==s.canDiscardAll||e[79]!==D.count||e[80]!==y?(pt=D.count<=1||!s.canDiscardAll?null:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>oe(!0),disabled:je||He,children:y("thread.publishPopover.discardAll")}),a.jsx(Xs,{open:ae,onOpenChange:oe,children:a.jsxs(Js,{children:[a.jsxs(Vs,{children:[a.jsx(qs,{children:y("thread.publishPopover.discardAllTitle")}),a.jsx(Ks,{children:y("thread.publishPopover.discardAllConfirm")})]}),a.jsxs(Qs,{children:[a.jsx(Gs,{children:y("thread.publishDialog.cancel")}),a.jsx(Ws,{onClick:()=>{Ue()},disabled:He,className:G(ur({variant:"destructive"})),children:y("thread.publishPopover.discardAll")})]})]})})]}),e[74]=Ue,e[75]=ae,e[76]=He,e[77]=je,e[78]=s.canDiscardAll,e[79]=D.count,e[80]=y,e[81]=pt):pt=e[81];const es=pt,Pt=J?a.jsx(ss,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Bt,{}),a.jsx(Bt,{})]})}):D.count===0&&se?a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:y("thread.publishPopover.onlyOtherWork")}):D.count===0?a.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[a.jsx(hn,{className:"mb-1 size-5 text-success"}),a.jsx("p",{className:"text-sm font-medium",children:y($?"thread.publishPopover.nothingToSubmit":"thread.publishPopover.everythingLive")}),a.jsx("p",{className:"text-xs text-muted-foreground",children:y($?"thread.publishPopover.submitEmptyHint":"thread.publishPopover.emptyHint")})]}):a.jsxs(ss,{children:[Q?a.jsx("p",{className:"text-2xs text-muted-foreground",children:y("thread.publishPopover.showingFirst",{shown:D.count,total:F})}):null,Te(y("thread.publishPopover.pagesGroup"),D.pages),Te(y("thread.publishPopover.blocksGroup"),D.blocks),Te(y("thread.publishPopover.otherGroup"),D.other),H?a.jsx("p",{className:"text-2xs text-muted-foreground",children:y("thread.publishPopover.detailsUnavailable")}):null,se?a.jsx("p",{className:"text-2xs text-muted-foreground",children:y("thread.publishPopover.alsoOtherWork")}):null]}),ts=J?a.jsx(Pn,{}):Ae?a.jsx("div",{className:G(Wt,"relative"),children:Ne.filter(V=>Ve.includes(ke(V))).map(V=>a.jsx("div",{className:G("absolute inset-0 flex",De?ke(V)===Ie?"z-10":"pointer-events-none opacity-0":ke(V)!==xe&&"hidden"),inert:De&&ke(V)!==Ie,"aria-hidden":De&&ke(V)!==Ie?!0:void 0,children:a.jsx(oa,{change:V,diff:W,bodyPending:re,previewServerUrl:x,draft:ie,lastPage:I,v8:s.v8,onReady:De?()=>ye(ke(V)):void 0})},ke(V)))}):a.jsx("div",{className:G(Wt,"bg-muted/40")});let Xe;e[82]!==Yt?(Xe=a.jsx("span",{className:"truncate",children:Yt}),e[82]=Yt,e[83]=Xe):Xe=e[83];let St;e[84]!==es||e[85]!==k||e[86]!==jt||e[87]!==Xe?(St=a.jsx(Sn,{mode:k,title:Xe,subLine:jt,trailing:es}),e[84]=es,e[85]=k,e[86]=jt,e[87]=Xe,e[88]=St):St=e[88];let Ye;e[89]!==je||e[90]!==$||e[91]!==Pe||e[92]!==D.count||e[93]!==y?(Ye=D.count===0?null:a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-sm font-medium",children:y($?"thread.publishPopover.reviewNote":"thread.publishPopover.versionNote")}),a.jsx(Fl,{value:Pe,onChange:V=>de(V.target.value),placeholder:y($?"thread.publishPopover.reviewNotePlaceholder":"thread.publishPopover.versionNotePlaceholder"),rows:2,maxLength:Ol,className:"resize-none text-sm",disabled:je})]}),e[89]=je,e[90]=$,e[91]=Pe,e[92]=D.count,e[93]=y,e[94]=Ye):Ye=e[94];let dt;e[95]!==f||e[96]!==y?(dt=a.jsx(kn,{draftPreviewUrl:f,t:y}),e[95]=f,e[96]=y,e[97]=dt):dt=e[97];let Ze;e[98]!==Xt||e[99]!==z||e[100]!==yt||e[101]!==ne||e[102]!==je||e[103]!==$||e[104]!==j||e[105]!==wt||e[106]!==Z||e[107]!==it||e[108]!==y?(Ze=!$&&!ne&&yt&&!z.allowed&&!z.pending?a.jsx(be,{type:"button",className:"flex-1",onClick:j,disabled:je,children:y("thread.publishPopover.requestApproval")}):a.jsxs(be,{type:"button",variant:$?"default":"brand",className:"flex-1",onClick:()=>{Z.hold(),it().then(V=>{V===!1&&Z.release()})},disabled:!Xt,children:[je?a.jsx(Vt,{className:"size-4 motion-reduce:animate-none"}):null,je?y($?"thread.publishPopover.submitting":"thread.publishPopover.publishing"):wt]}),e[98]=Xt,e[99]=z,e[100]=yt,e[101]=ne,e[102]=je,e[103]=$,e[104]=j,e[105]=wt,e[106]=Z,e[107]=it,e[108]=y,e[109]=Ze):Ze=e[109];let kt;e[110]!==dt||e[111]!==Ze?(kt=a.jsxs("div",{className:"flex gap-2",children:[dt,Ze]}),e[110]=dt,e[111]=Ze,e[112]=kt):kt=e[112];let et;e[113]!==Qe||e[114]!==Je||e[115]!==y?(et=Qe?a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-destructive",children:Qe}),Je?a.jsx(Ha,{label:y("siteEditor.details"),detail:Je}):null]}):null,e[113]=Qe,e[114]=Je,e[115]=y,e[116]=et):et=e[116];let Nt;e[117]!==kt||e[118]!==et?(Nt=a.jsxs(a.Fragment,{children:[kt,et]}),e[117]=kt,e[118]=et,e[119]=Nt):Nt=e[119];let tt;e[120]!==Pt||e[121]!==Zt||e[122]!==ve||e[123]!==St||e[124]!==Ye||e[125]!==Nt?(tt=a.jsx(ks,{state:ve,header:St,body:Pt,note:Ye,gate:Zt,footer:Nt}),e[120]=Pt,e[121]=Zt,e[122]=ve,e[123]=St,e[124]=Ye,e[125]=Nt,e[126]=tt):tt=e[126];let Lt;return e[127]!==ts||e[128]!==tt?(Lt=a.jsx(rs,{pane:ts,list:tt}),e[127]=ts,e[128]=tt,e[129]=Lt):Lt=e[129],Lt}function ic(){return new Set}function oc(t){if(!(t==="claiming"||t==="ready"||t==="failed"))return Al[t].short}const cc=new Set(["failure","timed_out","cancelled","action_required"]);function ma(t){return t.status==="completed"&&cc.has(t.conclusion)}function Cn(t){return t.status==="queued"||t.status==="in_progress"}function us(t){return t.isPending&&t.fetchStatus!=="idle"}function dc(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr-page"}}function gt(t,e,s){return e?[...t,dc(s)]:t}function st(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"sync",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function Gn(t){return{key:"submit-for-review",label:t("thread.headerActions.submitForReview"),action:"create-pr"}}function os(t,e,s){if(e.filter(Cn).length===0)return t;const n=e.filter(i=>i.status==="completed").length;return{...t,tooltip:s("thread.cmsActions.checksRunning",{done:n,total:e.length})}}function uc(t){const{lifecycle:e,branch:s,pr:r,checks:n,reviews:i,loading:d,t:l}=t;if(d)return{label:l("thread.headerActions.loading"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.loadingBranchTooltip"),menu:[]};switch(e.phase){case"idle":return{label:t.claimPhase&&oc(t.claimPhase.kind)||l("thread.headerActions.startingSandbox"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForDaemonTooltip"),menu:[]};case"cloning":return{label:l("thread.headerActions.cloningRepo"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.cloningRepoTooltip"),menu:[]};case"clone-failed":return{label:l("thread.headerActions.cloneFailed"),disabled:!0,variant:"outline",tooltip:e.error||l("thread.headerActions.cloneFailedDefaultTooltip"),menu:[]};case"checking-out":return{label:l("thread.headerActions.switchingTo",{branch:e.to}),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.checkingOutTooltip",{branch:e.to}),menu:[]};case"installing":return{label:l("thread.headerActions.installingPackages"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.installingPackagesTooltip"),menu:[]};case"starting":{if(!(s.kind==="ready"&&(s.workingTreeDirty||s.aheadOfBase>0||s.unpushed>0))&&!t.noReviewableDiff)return{label:l("thread.headerActions.startingApp"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.startingAppTooltip"),menu:[]};break}}if(s.kind!=="ready")return{label:l("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForBranchTooltip"),menu:[]};const o=s,u=o.unpushed>0&&!(r&&o.headSha&&r.headSha&&o.headSha===r.headSha);if(t.noReviewableDiff&&!r)return{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:o.base}),menu:st([],o,l)};if(o.workingTreeDirty||u)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:st(gt([Gn(l)],r,l),o,l)};if(Hr("no local work — checking PR/sync state",{workingTreeDirty:o.workingTreeDirty,unpushed:o.unpushed,aheadOfBase:o.aheadOfBase,behindBase:o.behindBase,branch:o.branch,base:o.base,prMerged:r?.merged??null,prState:r?.state??null}),r?.merged)return!!o.headSha&&!!r.headSha&&o.headSha!==r.headSha?{label:l("thread.headerActions.continue"),action:"create-pr",variant:"special",tooltip:l("thread.headerActions.openNewPrTooltip"),menu:st(gt([],r,l),o,l)}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.prMergedTooltip",{prNumber:String(r.number),base:r.base}),menu:st(gt([],r,l),o,l)};if(o.aheadOfBase>0){if(r&&r.state==="closed"&&!r.merged)return{label:l("thread.headerActions.reopenPr"),action:"reopen",variant:"default",tooltip:l("thread.headerActions.reopenPrTooltip",{prNumber:String(r.number)}),menu:st(gt([],r,l),o,l)};if(!r)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:st([Gn(l)],o,l)};if((i?.mergeableState??"unknown")==="dirty")return{label:l("thread.cmsActions.getLatest"),action:"rebase",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:l("thread.cmsActions.resolveOnProvider"),action:"open-pr-page"}]};const h=n.filter(Cn).length,p=n.filter(ma).map(f=>f.name);if(h===0&&p.length>0)return{label:l("thread.headerActions.fixChecks"),action:"fix-checks",variant:"default",tooltip:l("thread.headerActions.failingChecksTooltip",{checks:p.join(", ")}),meta:{failingChecks:p},menu:st(gt([{key:"publish-anyway",label:l("thread.headerActions.publishAnyway"),action:"merge",tooltip:l("thread.headerActions.squashMergeTooltip",{prNumber:String(r.number),base:r.base})}],r,l),o,l)};if(i?.draft)return os({label:l("thread.headerActions.markReady"),action:"mark-ready",variant:"default",tooltip:l("thread.headerActions.markDraftReadyTooltip"),menu:st(gt([],r,l),o,l)},n,l);const b=i?.unresolvedConversations??0;return b>0?os({label:l("thread.headerActions.addressFeedback"),action:"resolve-comments",variant:"default",tooltip:l("thread.headerActions.unresolvedConversationsTooltip",{count:String(b)}),menu:st(gt([],r,l),o,l)},n,l):i?.missingRequiredApprovals?os({label:l("thread.cmsActions.waitingForReview"),action:"open-pr-page",variant:"outline",tooltip:l("thread.headerActions.waitingForApprovalsTooltip"),menu:st(gt([],r,l),o,l)},n,l):os({label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",meta:{publishPolicyOverride:"open"},menu:st(gt([{key:"review",label:l("thread.headerActions.review"),action:"review"}],r,l),o,l)},n,l)}return o.behindBase>0?{label:l("thread.cmsActions.getLatest"),action:"sync",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[]}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:o.base}),menu:[]}}function Wn(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr"}}function cs(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"get-latest",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function Qn(t,e,s,r){const n=e.length;if(n===0)return t;if(e.filter(Cn).length>0){const l=e.filter(u=>u.status==="completed").length,o=r("thread.cmsActions.checksRunning",{done:l,total:n});return s==="loading"?{...t,loading:!0,tooltip:o}:{...t,tooltip:o}}const d=e.filter(ma).length;return d>0?{...t,variant:"warning",tooltip:r("thread.cmsActions.checksFailing",{failed:d,total:n})}:t}function hc(t,e){return!!(t?.merged&&t.headSha&&e.kind==="ready"&&!e.workingTreeDirty&&e.headSha===t.headSha)}function fc(t){return us(t.prQuery)?!0:t.pr?.state!=="open"||t.pr.merged?!1:us(t.checksQuery)||us(t.reviewsQuery)}function mc(t,e){return t.workingTreeDirty?!0:e!==null?e>0:t.aheadOfBase>0}function pc(t,e){if(!t)return{branchMeta:{kind:"unknown"},publishableChangeCount:null};const s=Object.keys(t.changes).length;return{branchMeta:{kind:"ready",branch:e,base:t.base.resolvedRef??"main",workingTreeDirty:!1,unpushed:0,aheadOfBase:s,behindBase:0,headSha:t.revision},publishableChangeCount:s}}function bc(t){return{...t,menu:[]}}function gc(t){const{branch:e,pr:s,checks:r,reviews:n,publishing:i,saving:d,loading:l,publishableChangeCount:o,t:u}=t;if(e.kind!=="ready"&&t.statusError)return{label:u("thread.cmsActions.retry"),action:"retry-status",variant:"outline",disabled:t.statusRetrying,loading:t.statusRetrying,tooltip:t.statusError,menu:[]};if(l||e.kind!=="ready")return{label:u("thread.headerActions.loading"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(i)return{label:u("thread.cmsActions.publishing"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(t.syncing)return{label:u("thread.cmsActions.gettingLatest"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(d)return{label:u("thread.headerActions.saving"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(s&&s.state==="open"&&!s.merged?s:null){const h=n?.mergeableState??"unknown";return h==="dirty"?{label:u("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:u("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:u("thread.cmsActions.resolveOnProvider"),action:"open-pr"}]}:h==="blocked"||n?.draft?Qn({label:u("thread.cmsActions.waitingForReview"),action:"open-pr",variant:"outline",menu:cs([Wn(u)],e,u)},r,"loading",u):Qn({label:u("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:cs([Wn(u)],e,u)},r,"none",u)}return hc(s,e)?{label:u("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:cs([],e,u)}:mc(e,o)?{label:u("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:cs([{key:"request-approval",label:u("thread.headerActions.submitForReview"),action:"request-approval"}],e,u)}:e.behindBase>0?{label:u("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:u("thread.cmsActions.getLatestTooltip"),menu:[],autoRun:e.aheadOfBase===0}:{label:u("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:[]}}function xc(t){return t.conflicting===!0?"dirty":t.conflicting===null?"unknown":t.reviewBlocked||t.unresolvedConversations>0?"blocked":"clean"}function pa(t){const e=T.c(4);let s;e[0]!==t?(s=pl(t),e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r={...s,select:vc},e[2]=s,e[3]=r):r=e[3],vt(r)}function vc(t){const e=t.changeRequest;return e?{draft:e.draft,mergeableState:xc(e),unresolvedConversations:e.unresolvedConversations,missingRequiredApprovals:e.reviewBlocked}:null}function Jn(t,e){return t==="open-pr"||e==="resolve-on-provider"?a.jsx(Lr,{size:16}):t==="publish"?a.jsx(Nr,{className:"size-4"}):t==="get-latest"||t==="retry-status"?a.jsx(tn,{className:"size-4"}):a.jsx(js,{className:"size-4"})}function yc(t){const e=T.c(63),{virtualMcpId:s}=t,r=fe(),{org:n}=Jt(),i=rr(),d=Ps(s),{data:l}=vs.useSession(),{deleteRelease:o}=Ss(s),{currentBranch:u,setCurrentTaskBranch:c,taskId:h,createTask:p}=mr();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={open:!1,mode:"publish"},e[0]=b):b=e[0];const[f,m]=K.useState(b);let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x=$=>m({open:!0,mode:$}),e[1]=x):x=e[1];const g=x,w=Br(d),j=w.status==="attached"||w.status==="public-clone"?w.repo:null,{previewServerUrl:v}=ns(s),S=u?hr(fr(n.slug,s,u)):null,P=S?un(S.path,S.params):"/",k=xl(u?{orgSlug:n.slug,virtualMcpId:s,branch:u,previewServerUrl:v,path:P}:null);let N;e[2]!==u||e[3]!==n.slug||e[4]!==s?(N=u?{orgSlug:n.slug,virtualMcpId:s,branch:u}:null,e[2]=u,e[3]=n.slug,e[4]=s,e[5]=N):N=e[5];const C=vl(N),y=Tt(s,u),A=y.kind==="protocol"&&y.source==="github";let R;e[6]!==u||e[7]!==n.slug||e[8]!==s?(R=u?{orgSlug:n.slug,virtualMcpId:s,branch:u}:null,e[6]=u,e[7]=n.slug,e[8]=s,e[9]=R):R=e[9];const B=an(R),E=xr(A?y:null,B);let I;e[10]!==n.slug||e[11]!==s?(I=qa(n.slug,s),e[10]=n.slug,e[11]=s,e[12]=I):I=e[12];const M=Ka(I,A?C:null),F=A?Va(v,P,M):k.url,Q=u??"",W=h??null;let H;e[13]!==n.slug||e[14]!==Q||e[15]!==W||e[16]!==s?(H=mn({orgSlug:n.slug,virtualMcpId:s,branch:Q,threadId:W}),e[13]=n.slug,e[14]=Q,e[15]=W,e[16]=s,e[17]=H):H=e[17];const _=!!u&&y.kind!=="pending"&&!A;let z;e[18]!==H||e[19]!==_?(z={...H,enabled:_},e[18]=H,e[19]=_,e[20]=z):z=e[20];const ne=vt(z),se=A?null:ne.data??null,O=A?pc(E.data,u??""):null,le=O?O.branchMeta:se?{kind:"ready",branch:bn(se)??u??"",base:se.base??"main",workingTreeDirty:ti(se),unpushed:se.unpushed??0,aheadOfBase:se.aheadOfBase??0,behindBase:se.behindBase??0,headSha:se.headSha??""}:{kind:"unknown"},Y=O?O.publishableChangeCount:se?.changedFiles?Zr({files:se.changedFiles}).count:null,Z=A?E:ne,D=(le.kind==="ready"?le.branch:null)??u??null,J=le.kind==="ready"?le.base:"main",re=Ir({orgId:n.id,orgSlug:n.slug,target:qe(j),owner:j?.owner??"",repo:j?.name??"",branch:D}),ie=re.data??null,pe=Fr({orgId:n.id,orgSlug:n.slug,target:qe(j),owner:j?.owner??"",repo:j?.name??"",base:J}),de=$r({orgId:n.id,orgSlug:n.slug,target:qe(j),owner:j?.owner??"",repo:j?.name??"",branch:D}),ae=pa({orgId:n.id,orgSlug:n.slug,target:qe(j),owner:j?.owner??"",repo:j?.name??"",branch:D});let oe;e[21]!==de||e[22]!==ie||e[23]!==re||e[24]!==ae?(oe=fc({pr:ie,prQuery:re,checksQuery:de,reviewsQuery:ae}),e[21]=de,e[22]=ie,e[23]=re,e[24]=ae,e[25]=oe):oe=e[25];const ce=oe;let U;e[26]!==re?(U=async()=>{await re.refetch()},e[26]=re,e[27]=U):U=e[27];const ee=U,ye=Rn({mutationFn:()=>Mi({hosted:A,branch:u,baseBranch:J,nextBranch:()=>ln(on(l?.user)),setCurrentTaskBranch:c,deleteRelease:o}),onError:Pc});let X;e[28]!==n.slug||e[29]!==h||e[30]!==s?(X=async $=>(await si({orgSlug:n.slug,virtualMcpId:s,branch:$.branch,threadId:h??null},$.base),$),e[28]=n.slug,e[29]=h,e[30]=s,e[31]=X):X=e[31];let te;e[32]!==u||e[33]!==n.slug||e[34]!==i||e[35]!==r||e[36]!==h||e[37]!==s?(te=async $=>{xt.success(r("thread.headerActions.syncedWithBase",{base:$.base})),await Promise.all([i.invalidateQueries({queryKey:gn({orgSlug:n.slug,virtualMcpId:s,branch:u??$.branch,threadId:h??null})}),i.invalidateQueries({queryKey:Qt.decofile(`${n.slug}/${s}/${$.branch}`)})])},e[32]=u,e[33]=n.slug,e[34]=i,e[35]=r,e[36]=h,e[37]=s,e[38]=te):te=e[38];let we;e[39]!==X||e[40]!==te?(we={mutationFn:X,onSuccess:te,onError:wc},e[39]=X,e[40]=te,e[41]=we):we=e[41];const q=Rn(we),ue=vr(n.slug,s),Ke=ye.isPending,$e=gc({branch:le,pr:ie,checks:de.data??[],reviews:ae.data??null,publishing:Ke,saving:ue,syncing:q.isPending,statusRetrying:Z.isFetching&&!!Z.error,statusError:Z.error instanceof Error?Z.error.message:Z.error?String(Z.error):null,loading:!!ce,publishableChangeCount:Y,t:r}),ge=A?bc($e):$e,Ee=ge.autoRun&&le.kind==="ready"&&j&&v?`${D}@${le.headSha}`:null,_e=K.useRef(null);if(K.useEffect(()=>{!Ee||!D||_e.current!==Ee&&(_e.current=Ee,q.mutate({branch:D,base:J}))},[Ee,D,J,q]),w.status==="detached"){let $;e[42]!==r?($=r("thread.headerActions.reconnectGithub"),e[42]=r,e[43]=$):$=e[43];let ve;e[44]!==$?(ve=a.jsx(ht,{asChild:!0,children:a.jsx("span",{children:a.jsx(be,{size:"sm",variant:"outline",disabled:!0,children:$})})}),e[44]=$,e[45]=ve):ve=e[45];let Ce;e[46]!==r?(Ce=r("thread.headerActions.githubConnectionRemoved"),e[46]=r,e[47]=Ce):Ce=e[47];let Re;e[48]!==Ce?(Re=a.jsx(ft,{children:Ce}),e[48]=Ce,e[49]=Re):Re=e[49];let Fe;return e[50]!==ve||e[51]!==Re?(Fe=a.jsx(ys,{children:a.jsxs(mt,{children:[ve,Re]})}),e[50]=ve,e[51]=Re,e[52]=Fe):Fe=e[52],Fe}if(!d)return null;if(!j||!v){const $=j?"noPreviewServer":"noRepo";let ve;e[53]!==u||e[54]!==p?(ve=u?()=>{const Re=p?.({runtime:"sandbox",branch:u});Re&&Da("coding_session_started",{thread_id:Re})}:void 0,e[53]=u,e[54]=p,e[55]=ve):ve=e[55];let Ce;return e[56]!==$||e[57]!==ve?(Ce=a.jsx(Sc,{reason:$,onStartCodingSession:ve}),e[56]=$,e[57]=ve,e[58]=Ce):Ce=e[58],Ce}if(!u)return null;const Pe=$=>{switch($){case"publish":{g("publish");return}case"request-approval":{g("review");return}case"get-latest":{if(!D||q.isPending)return;q.mutate({branch:D,base:J});return}case"retry-status":{Z.refetch();return}case"open-pr":{ie?.htmlUrl&&window.open(ie.htmlUrl,"_blank","noopener,noreferrer");return}}};let Ne;e[59]!==Pe?(Ne=$=>({key:$.key,label:$.label,icon:Jn($.action,$.key),...$.tooltip?{tooltip:$.tooltip}:{},onSelect:()=>Pe($.action)}),e[59]=Pe,e[60]=Ne):Ne=e[60];const Ae=ge.menu.map(Ne),xe=ge.action,Ve=ge.label,De=ge.variant,Me=!!ge.loading;let Be;e[61]!==r?(Be=r("thread.cmsActions.moreActionsAriaLabel"),e[61]=r,e[62]=Be):Be=e[62];const Ie=a.jsx(Kr,{size:"sm",label:Ve,variant:De,disabled:!!ge.disabled||!xe,loading:Me,...xe&&!ge.loading?{icon:Jn(xe)}:{},...ge.tooltip?{tooltip:ge.tooltip}:{},items:Ae,menuAriaLabel:Be,onClick:xe?()=>Pe(xe):void 0});return a.jsxs(a.Fragment,{children:[ge.status?a.jsx("span",{className:"mr-1 hidden shrink-0 text-xs text-muted-foreground sm:inline",children:ge.status}):null,Ie,u?a.jsx(ua,{open:f.open,mode:f.mode,fastPreview:!0,onOpenChange:$=>{$||m(jc)},orgSlug:n.slug,virtualMcpId:s,branch:u,baseBranch:J,repoTarget:qe(j),owner:j.owner,repo:j.name,publishPolicy:zr(d?.metadata?.publishPolicy),draftPreviewUrl:F,destinationHost:k.host,previewServerUrl:v,compareDraft:C?{kind:"pointer",pointer:C,...M?{link:M}:{}}:null,lastPublishedPr:pe.data??null,onRequestApproval:()=>g("review"),openPullRequest:ie?.state==="open"?ie:null,onPullRequestChanged:ee,onPublished:()=>ye.mutateAsync()}):null]})}function jc(t){return{...t,open:!1}}function wc(t){xt.error(t instanceof Error?t.message:String(t))}function Pc(t){console.error("site editor: settling after publish failed",t)}function Sc(t){const e=T.c(14),{reason:s,onStartCodingSession:r}=t,n=fe(),i=!r;let d;e[0]!==n?(d=n("sandbox.cmsUnavailable.startCodingSession"),e[0]=n,e[1]=d):d=e[1];let l;e[2]!==r||e[3]!==i||e[4]!==d?(l=a.jsx(ht,{asChild:!0,children:a.jsx("span",{children:a.jsx(be,{size:"sm",variant:"outline",disabled:i,onClick:r,children:d})})}),e[2]=r,e[3]=i,e[4]=d,e[5]=l):l=e[5];let o;e[6]!==s||e[7]!==n?(o=n(s==="noPreviewServer"?"sandbox.cmsUnavailable.noPreviewServer":"sandbox.cmsUnavailable.noRepo"),e[6]=s,e[7]=n,e[8]=o):o=e[8];let u;e[9]!==o?(u=a.jsx(ft,{children:o}),e[9]=o,e[10]=u):u=e[10];let c;return e[11]!==l||e[12]!==u?(c=a.jsx(ys,{children:a.jsxs(mt,{children:[l,u]})}),e[11]=l,e[12]=u,e[13]=c):c=e[13],c}const Ft="The user clicked this action deliberately — execute directly. Do not call user_ask unless you hit an actual problem outside the scope of this intent (missing auth, unresolvable conflict, a check with multiple plausible fixes).";function kc(t){return`Reopen PR #${t.prNumber}. ${Ft}`}function Nc(t){return`Rebase \`${t.branch}\` on the latest base and force-push with --force-with-lease. ${Ft}`}function Cc(t){return`Sync \`${t.branch}\` with everyone else's work: \`git add -A\`, commit any pending local changes with a concise conventional-commit message (skip if the working tree is clean), \`git pull --rebase\` to bring in anything pushed directly to \`origin/${t.branch}\`, then \`git rebase origin/${t.base}\` to catch up with the base branch. Resolve any conflicts that come up, then push the result (force-with-lease only if the rebase rewrote commits already on the remote). ${Ft}`}function Ac(t){const e=(t.failingChecks??[]).map(s=>`\`${s}\``).join(", ");return`PR #${t.prNumber} has failing checks: ${e}. For each: read the logs, diagnose the root cause, apply the smallest fix that makes it pass, commit, and push. ${Ft}`}function Rc(t){return`Mark PR #${t.prNumber} ready for review. ${Ft}`}function Tc(t){return`Read the unresolved review threads on PR #${t.prNumber}. For each thread: understand the reviewer's ask, apply the needed changes, commit, push, reply explaining what changed, and resolve the thread. If a comment is a question that doesn't need a code change, reply with the answer and resolve. ${Ft}`}function Dc(t){return`Review PR #${t.prNumber}. Read the full diff, analyze every changed file for correctness, security, code quality, and alignment with the repo's patterns. Post specific line-level review comments on concerns, then submit an overall review (approve / request changes / comment) with a concise summary. Do not modify the code — this is a read-and-comment pass. ${Ft}`}function Xn(t){switch(t){case"publish":return a.jsx(Nr,{className:"size-4"});case"create-pr":case"reopen":return a.jsx(js,{className:"size-4"});case"rebase":case"sync":return a.jsx(tn,{className:"size-4"});case"fix-checks":return a.jsx(en,{className:"size-4"});case"mark-ready":return a.jsx(hn,{className:"size-4"});case"resolve-comments":return a.jsx(il,{className:"size-4"});case"merge":return a.jsx(Vl,{className:"size-4"});case"review":return a.jsx(hs,{className:"size-4"});case"open-pr-page":return a.jsx(Lr,{size:16})}}const Yn=new Set(["reopen","rebase","fix-checks","mark-ready","resolve-comments","review","sync"]),Zn=new Set(["publish","create-pr"]);function Bc(t){const e=T.c(44),{t:s,button:r,actionBusy:n,changeRequestPending:i,savePending:d,onAction:l}=t,o=r.action;let u;e[0]!==o||e[1]!==n?(u=n&&o!==void 0&&Yn.has(o),e[0]=o,e[1]=n,e[2]=u):u=e[2];const c=u,h=i&&o==="merge";let p;e[3]!==o||e[4]!==d?(p=d&&o!==void 0&&Zn.has(o),e[3]=o,e[4]=d,e[5]=p):p=e[5];const b=p,f=!!r.disabled||c||h||b||!o,m=!!r.loading||h;let x;e[6]!==r.tooltip||e[7]!==c||e[8]!==b||e[9]!==s?(x=c?s("thread.headerActions.chatIsRunning"):b?s("thread.headerActions.saving"):r.tooltip,e[6]=r.tooltip,e[7]=c,e[8]=b,e[9]=s,e[10]=x):x=e[10];const g=x;let w;if(e[11]!==n||e[12]!==r.menu||e[13]!==i||e[14]!==l||e[15]!==d||e[16]!==s){let A;e[18]!==n||e[19]!==i||e[20]!==l||e[21]!==d||e[22]!==s?(A=R=>{const B=n&&Yn.has(R.action),E=d&&Zn.has(R.action),I=R.action==="merge"&&i,M=E?s("thread.headerActions.saving"):B?s("thread.headerActions.chatIsRunning"):R.tooltip;return{key:R.key,label:R.label,icon:Xn(R.action),disabled:!!(B||E||I),...M?{tooltip:M}:{},onSelect:()=>l(R.action)}},e[18]=n,e[19]=i,e[20]=l,e[21]=d,e[22]=s,e[23]=A):A=e[23],w=r.menu.map(A),e[11]=n,e[12]=r.menu,e[13]=i,e[14]=l,e[15]=d,e[16]=s,e[17]=w}else w=e[17];const j=w,v=r.label,S=r.variant;let P;e[24]!==o||e[25]!==m?(P=o&&!m?{icon:Xn(o)}:{},e[24]=o,e[25]=m,e[26]=P):P=e[26];let k;e[27]!==g?(k=g?{tooltip:g}:{},e[27]=g,e[28]=k):k=e[28];let N;e[29]!==s?(N=s("thread.headerActions.moreActionsAriaLabel"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==o||e[32]!==l?(C=o?()=>l(o):void 0,e[31]=o,e[32]=l,e[33]=C):C=e[33];let y;return e[34]!==r.label||e[35]!==r.variant||e[36]!==f||e[37]!==j||e[38]!==m||e[39]!==P||e[40]!==k||e[41]!==N||e[42]!==C?(y=a.jsx(Kr,{size:"sm",label:v,variant:S,disabled:f,loading:m,...P,...k,items:j,menuAriaLabel:N,onClick:C}),e[34]=r.label,e[35]=r.variant,e[36]=f,e[37]=j,e[38]=m,e[39]=P,e[40]=k,e[41]=N,e[42]=C,e[43]=y):y=e[43],y}function er(t){const e=T.c(9),{label:s,children:r}=t;if(!s){let l;return e[0]!==r?(l=a.jsx(a.Fragment,{children:r}),e[0]=r,e[1]=l):l=e[1],l}let n;e[2]!==r?(n=a.jsx(ht,{asChild:!0,children:a.jsx("span",{children:r})}),e[2]=r,e[3]=n):n=e[3];let i;e[4]!==s?(i=a.jsx(ft,{children:s}),e[4]=s,e[5]=i):i=e[5];let d;return e[6]!==n||e[7]!==i?(d=a.jsx(ys,{children:a.jsxs(mt,{children:[n,i]})}),e[6]=n,e[7]=i,e[8]=d):d=e[8],d}function Ic(t){return{label:t("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:t("thread.headerActions.waitingForSandboxBranchTooltip"),menu:[]}}function Fc({virtualMcpId:t}){const e=fe(),{org:s}=Jt(),{data:r}=vs.useSession(),n=Ps(t),{deleteRelease:i}=Ss(t),{currentBranch:d,setCurrentTaskBranch:l,createTask:o,taskId:u}=mr(),c=_a(),{openSidePanel:h}=Xa(),[p,b]=K.useState({open:!1,mode:"publish",policyOverride:null}),f=li({connectionId:Ba,orgId:s.id,orgSlug:s.slug}),m=ii(f),[x,g]=K.useState(!1),w=K.useRef(""),j=Br(n),v=j.status==="attached"||j.status==="public-clone"?j.repo:null,{lifecycle:S,branch:P,phase:k}=Il(),N={orgSlug:s.slug,virtualMcpId:t,branch:d??"",threadId:u??null},y=vt({queryKey:gn(N),queryFn:()=>Or(N),enabled:!!d,staleTime:15e3,refetchInterval:X=>Is(X.state.data)?5e3:!1}).data??null,A=P,R=S,B=A.kind==="ready"?A.branch:null,E=d??B??void 0,I=(A.kind==="ready"?A.branch:null)??E??null,M=Ir({orgId:s.id,orgSlug:s.slug,target:qe(v),owner:v?.owner??"",repo:v?.name??"",branch:I}),F=M.data??null,Q=$r({orgId:s.id,orgSlug:s.slug,target:qe(v),owner:v?.owner??"",repo:v?.name??"",branch:I}),W=pa({orgId:s.id,orgSlug:s.slug,target:qe(v),owner:v?.owner??"",repo:v?.name??"",branch:I}),H=Fr({orgId:s.id,orgSlug:s.slug,target:qe(v),owner:v?.owner??"",repo:v?.name??"",base:A.kind==="ready"?A.base:null}),_=A,z=zr(n?.metadata?.publishPolicy),ne=vr(s.slug,t),{previewUrl:se}=oi(),{previewServerUrl:O,projectDefault:le}=ns(t);if(j.status==="detached")return a.jsx(er,{label:e("thread.headerActions.githubConnectionRemoved"),children:a.jsx(be,{size:"sm",variant:"outline",disabled:!0,children:e("thread.headerActions.reconnectGithub")})});if(!v)return null;const Y=I?uc({lifecycle:R,branch:_,claimPhase:k,pr:F,checks:Q.data??[],reviews:W.data??null,noReviewableDiff:Is(y),loading:us(M),t:e}):Ic(e),Z=JSON.stringify({label:Y.label,branchKind:_.kind,workingTreeDirty:_.kind==="ready"?_.workingTreeDirty:null,unpushed:_.kind==="ready"?_.unpushed:null,aheadOfBase:_.kind==="ready"?_.aheadOfBase:null,lifecycle:R.phase,headBranch:I,noReviewableDiff:Is(y)});w.current!==Z&&(w.current=Z,Hr("header button",{label:Y.label,tooltip:Y.tooltip,action:Y.action,chatBranch:d,sandboxBranch:B,sandboxRouteBranch:E,headBranch:I,branchMeta:A,effectiveBranchMeta:_,lifecyclePhase:R.phase,prNumber:F?.number??null,prState:F?.state??null}));const D=X=>(h(),c.sendMessage({parts:[{type:"text",text:X}]})),J=c.isStreaming,re=_.kind==="ready"?_.base:"main",ie=async()=>{await M.refetch()},pe=async()=>{const X=d,te=ln(on(r?.user));le==="cms"?o({runtime:"cms",branch:te}):await l(te),X&&X!==re&&await i(X)},de=async X=>{if(!(!v||x)){g(!0);try{const te=Vr(r?.user);await zl(s.slug,qe(v),{number:X,coAuthor:te}),xt.success(e("thread.headerActions.publishedPr",{prNumber:String(X)})),await ie(),await pe()}catch(te){xt.error(te instanceof Ul?te.detail??Hl(te.reason,e):te instanceof Error?te.message:e("thread.headerActions.failedToMergePullRequest"))}finally{g(!1)}}},ae=(X,te)=>b({open:!0,mode:X,policyOverride:te}),oe=X=>{if(I)switch(X){case"publish":ae("publish",Y.meta?.publishPolicyOverride??null);return;case"create-pr":ae("review",null);return;case"merge":F&&de(F.number);return;case"sync":if(J)return;D(Cc({branch:I,base:re}));return;case"open-pr-page":F?.htmlUrl&&window.open(F.htmlUrl,"_blank","noopener,noreferrer");return;case"review":if(J)return;F&&D(Dc({prNumber:F.number}));return;case"reopen":if(J)return;F&&D(kc({prNumber:F.number}));return;case"rebase":if(J)return;D(Nc({branch:I}));return;case"fix-checks":if(J)return;F&&D(Ac({prNumber:F.number,failingChecks:Y.meta?.failingChecks??[]}));return;case"mark-ready":if(J)return;F&&D(Rc({prNumber:F.number}));return;case"resolve-comments":if(J)return;F&&D(Tc({prNumber:F.number}));return}},ce=x||J,U=a.jsx(Bc,{t:e,button:Y,actionBusy:ce,changeRequestPending:x,savePending:ne,onAction:oe}),ee=_.kind==="ready"&&_.pushError&&_.pushFailingSince?e("thread.headerActions.pushFailing",{since:new Date(_.pushFailingSince).toLocaleString(),error:_.pushError}):null,ye=ee?a.jsx(er,{label:ee,children:a.jsx(en,{role:"img","aria-label":ee,className:"size-4 text-warning"})}):null;return E?a.jsxs(a.Fragment,{children:[ye,U,a.jsx(ua,{open:p.open,mode:p.mode,fastPreview:!1,recoverSandbox:()=>m.mutateAsync({virtualMcpId:t,branch:E,...u?{threadId:u}:{}}),onOpenChange:X=>{X||b(te=>({...te,open:!1}))},orgSlug:s.slug,virtualMcpId:t,branch:E,baseBranch:re,repoTarget:qe(v),owner:v.owner,repo:v.name,publishPolicy:p.policyOverride??z,draftPreviewUrl:se,destinationHost:null,previewServerUrl:O,compareDraft:se?{kind:"sandbox",previewUrl:se}:null,lastPublishedPr:H.data??null,onRequestApproval:()=>b(X=>({...X,open:!0,mode:"review"})),openPullRequest:F?.state==="open"?F:null,onPullRequestChanged:ie,onPublished:pe})]}):a.jsxs(a.Fragment,{children:[ye,U]})}function $c(t){const e=T.c(33),{orgSlug:s,virtualMcpId:r,branch:n}=t,i=fe(),[d,l]=K.useState(!1),o=Tt(r,n),u=o.kind==="protocol"&&o.source==="local"?o:null;let c;e[0]!==n||e[1]!==s||e[2]!==r?(c=n?{orgSlug:s,virtualMcpId:r,branch:n}:null,e[0]=n,e[1]=s,e[2]=r,e[3]=c):c=e[3];const h=an(c),{data:p}=xr(u,h);if(!u||!h||!n)return null;let b;e[4]!==p?(b=p?Object.keys(p.changes).length:0,e[4]=p,e[5]=b):b=e[5];const f=b;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>l(!0),e[6]=m):m=e[6];let x;e[7]!==f||e[8]!==i?(x=f>0?i("decoServe.changes.buttonCount",{count:f}):i("decoServe.changes.button"),e[7]=f,e[8]=i,e[9]=x):x=e[9];let g;e[10]!==x?(g=a.jsx(be,{size:"sm",variant:"outline","data-testid":"local-changes-button",onClick:m,children:x}),e[10]=x,e[11]=g):g=e[11];let w;e[12]!==i?(w=i("decoServe.changes.title"),e[12]=i,e[13]=w):w=e[13];let j;e[14]!==w?(j=a.jsx(ir,{className:"sr-only",children:w}),e[14]=w,e[15]=j):j=e[15];let v;e[16]!==n||e[17]!==h||e[18]!==u||e[19]!==d||e[20]!==s||e[21]!==i||e[22]!==r?(v=d?a.jsx(cr,{children:N=>{const{reset:C}=N;return a.jsx(dr,{fallback:y=>{const{resetError:A}=y;return a.jsx(Us,{title:i("decoServe.changes.title"),body:a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:i("decoServe.changes.loadFailed")}),onClose:()=>{C(),A(),l(!1)}})},children:a.jsx(K.Suspense,{fallback:a.jsx(rs,{pane:a.jsx(Pn,{}),list:a.jsx(Us,{title:i("decoServe.changes.title"),loading:!0,body:a.jsx(ss,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Bt,{}),a.jsx(Bt,{})]})}),onClose:()=>l(!1)})}),children:a.jsx(_c,{orgSlug:s,virtualMcpId:r,branch:n,backend:u,cacheKey:h,onClose:()=>l(!1)})})})}}):null,e[16]=n,e[17]=h,e[18]=u,e[19]=d,e[20]=s,e[21]=i,e[22]=r,e[23]=v):v=e[23];let S;e[24]!==j||e[25]!==v?(S=a.jsxs(or,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[j,v]}),e[24]=j,e[25]=v,e[26]=S):S=e[26];let P;e[27]!==d||e[28]!==S?(P=a.jsx(lr,{open:d,onOpenChange:l,children:S}),e[27]=d,e[28]=S,e[29]=P):P=e[29];let k;return e[30]!==P||e[31]!==g?(k=a.jsxs(a.Fragment,{children:[g,P]}),e[30]=P,e[31]=g,e[32]=k):k=e[32],k}function Us(t){const e=T.c(22),{title:s,trailing:r,body:n,loading:i,onClose:d}=t,l=i===void 0?!1:i,o=fe(),u=l?"loading":"ready";let c;e[0]!==s?(c=a.jsx("span",{className:"truncate",children:s}),e[0]=s,e[1]=c):c=e[1];let h;e[2]!==c||e[3]!==r?(h=a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[c,r]}),e[2]=c,e[3]=r,e[4]=h):h=e[4];let p;e[5]!==o?(p=o("decoServe.changes.hint"),e[5]=o,e[6]=p):p=e[6];let b;e[7]!==p?(b=a.jsx("p",{className:"text-2xs text-muted-foreground",children:a.jsx(Ur,{text:p})}),e[7]=p,e[8]=b):b=e[8];let f;e[9]!==o?(f=o("decoServe.changes.close"),e[9]=o,e[10]=f):f=e[10];let m;e[11]!==d||e[12]!==f?(m=a.jsx(be,{type:"button",variant:"outline",className:"w-full",onClick:d,children:f}),e[11]=d,e[12]=f,e[13]=m):m=e[13];let x;e[14]!==b||e[15]!==m?(x=a.jsxs(a.Fragment,{children:[b,m]}),e[14]=b,e[15]=m,e[16]=x):x=e[16];let g;return e[17]!==n||e[18]!==u||e[19]!==h||e[20]!==x?(g=a.jsx(ks,{state:u,header:h,body:n,footer:x}),e[17]=n,e[18]=u,e[19]=h,e[20]=x,e[21]=g):g=e[21],g}function _c(t){const e=T.c(54),{orgSlug:s,virtualMcpId:r,branch:n,backend:i,cacheKey:d,onClose:l}=t,o=fe();let u;e[0]!==n||e[1]!==s||e[2]!==r?(u={orgSlug:s,virtualMcpId:r,branch:n},e[0]=n,e[1]=s,e[2]=r,e[3]=u):u=e[3];let c;e[4]!==i||e[5]!==d||e[6]!==u?(c={backend:i,cacheKey:d,scope:u},e[4]=i,e[5]=d,e[6]=u,e[7]=c):c=e[7];const h=wn(c);let p;e[8]!==n||e[9]!==s||e[10]!==h.refresh||e[11]!==r?(p={orgSlug:s,virtualMcpId:r,branch:n,refresh:h.refresh},e[8]=n,e[9]=s,e[10]=h.refresh,e[11]=r,e[12]=p):p=e[12];const b=ql(p),f=gr(s,r).phase==="saving",m=i.describe.readOnly,[x,g]=K.useState(null),[w,j]=K.useState(null),[v,S]=K.useState(!1),{summary:P}=h;let k,N,C,y,A;if(e[13]!==x||e[14]!==i||e[15]!==w||e[16]!==b||e[17]!==v||e[18]!==f||e[19]!==m||e[20]!==h.blocks||e[21]!==h.entries||e[22]!==h.sidesFailed||e[23]!==h.sidesPending||e[24]!==P.blocks||e[25]!==P.count||e[26]!==P.pages||e[27]!==o){const E=[...P.pages,...P.blocks],I=E.find(W=>ke(W)===x)??E[0]??null;let M;e[33]!==P.count||e[34]!==o?(M=P.count===0?o("decoServe.changes.title"):P.count===1?o("decoServe.changes.titleOne"):o("decoServe.changes.titleCount",{count:P.count}),e[33]=P.count,e[34]=o,e[35]=M):M=e[35],A=M;const F=(W,H)=>H.length===0?null:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:W}),H.map(_=>{const z=ke(_);return a.jsx(sa,{change:_,bodyPending:h.sidesPending,v8:!0,selected:I!==null&&ke(I)===z,onSelect:()=>g(z),confirming:w===z,onConfirmingChange:ne=>j(ne?z:null),onDiscard:m||!_.entry?void 0:()=>{b(i,[_.entry],o("thread.publishPopover.discarded",{name:_.name}))},isPublishing:!1,isDiscarding:f},z)})]});let Q;e[36]!==i||e[37]!==b||e[38]!==v||e[39]!==f||e[40]!==m||e[41]!==h.entries||e[42]!==P.count||e[43]!==o?(Q=m||P.count<=1?null:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>S(!0),disabled:f,children:o("thread.publishPopover.discardAll")}),a.jsx(Xs,{open:v,onOpenChange:S,children:a.jsxs(Js,{children:[a.jsxs(Vs,{children:[a.jsx(qs,{children:o("thread.publishPopover.discardAllTitle")}),a.jsx(Ks,{children:o("thread.publishPopover.discardAllConfirm")})]}),a.jsxs(Qs,{children:[a.jsx(Gs,{children:o("thread.publishDialog.cancel")}),a.jsx(Ws,{onClick:()=>{b(i,h.entries,o("thread.publishDialog.allChangesDiscarded"))},disabled:f,className:G(ur({variant:"destructive"})),children:o("thread.publishPopover.discardAll")})]})]})})]}),e[36]=i,e[37]=b,e[38]=v,e[39]=f,e[40]=m,e[41]=h.entries,e[42]=P.count,e[43]=o,e[44]=Q):Q=e[44],C=Q,N=P.count===0?a.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[a.jsx(hn,{className:"mb-1 size-5 text-success"}),a.jsx("p",{className:"text-sm font-medium",children:o("decoServe.changes.empty")})]}):a.jsxs(ss,{children:[F(o("thread.publishPopover.pagesGroup"),P.pages),F(o("thread.publishPopover.blocksGroup"),P.blocks),h.sidesFailed?a.jsx("p",{className:"text-2xs text-muted-foreground",children:o("thread.publishPopover.detailsUnavailable")}):null]}),k=rs,y=I?a.jsx("div",{className:G(Wt,"relative flex"),children:a.jsx(oa,{change:I,diff:null,bodyPending:h.sidesPending,previewServerUrl:null,draft:null,lastPage:null,v8:{blocks:h.blocks}},ke(I))}):a.jsx("div",{className:G(Wt,"bg-muted/40")}),e[13]=x,e[14]=i,e[15]=w,e[16]=b,e[17]=v,e[18]=f,e[19]=m,e[20]=h.blocks,e[21]=h.entries,e[22]=h.sidesFailed,e[23]=h.sidesPending,e[24]=P.blocks,e[25]=P.count,e[26]=P.pages,e[27]=o,e[28]=k,e[29]=N,e[30]=C,e[31]=y,e[32]=A}else k=e[28],N=e[29],C=e[30],y=e[31],A=e[32];let R;e[45]!==N||e[46]!==C||e[47]!==l||e[48]!==A?(R=a.jsx(Us,{title:A,trailing:C,body:N,onClose:l}),e[45]=N,e[46]=C,e[47]=l,e[48]=A,e[49]=R):R=e[49];let B;return e[50]!==k||e[51]!==y||e[52]!==R?(B=a.jsx(k,{pane:y,list:R}),e[50]=k,e[51]=y,e[52]=R,e[53]=B):B=e[53],B}function Lc(t){const e=T.c(5),{virtualMcpId:s,branch:r}=t,n=fe(),i=Tt(s,r);if(!Ec(i))return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(ht,{asChild:!0,children:a.jsx("span",{"data-testid":"content-version-badge",className:"shrink-0 rounded border border-border px-1.5 py-px font-mono text-2xs leading-4 text-muted-foreground",children:"v8"})}),e[0]=d):d=e[0];let l;e[1]!==n?(l=n("decoServe.version.v8"),e[1]=n,e[2]=l):l=e[2];let o;return e[3]!==l?(o=a.jsxs(mt,{children:[d,a.jsx(ft,{side:"bottom",className:"max-w-xs",children:l})]}),e[3]=l,e[4]=o):o=e[4],o}function Ec(t){return t.kind==="protocol"?t.hasSchema!==!1:t.kind==="unavailable"&&t.source!=="local"}function Mc(t){const e=T.c(11),{virtualMcpId:s,branch:r}=t,n=fe(),i=Tt(s,r);if(!(i.kind==="protocol"&&i.source==="local"&&i.describe.readOnly))return null;let l;e[0]!==n?(l=n("decoServe.readOnly.label"),e[0]=n,e[1]=l):l=e[1];let o;e[2]!==l?(o=a.jsx(ht,{asChild:!0,children:a.jsx("span",{tabIndex:0,"data-testid":"deco-serve-read-only",className:"shrink-0 rounded-full bg-warning/10 px-2 py-0.5 text-xs font-medium text-foreground",children:l})}),e[2]=l,e[3]=o):o=e[3];let u;e[4]!==n?(u=n("decoServe.readOnly.tooltip"),e[4]=n,e[5]=u):u=e[5];let c;e[6]!==u?(c=a.jsx(ft,{side:"bottom",className:"max-w-xs",children:a.jsx(Ur,{text:u})}),e[6]=u,e[7]=c):c=e[7];let h;return e[8]!==o||e[9]!==c?(h=a.jsxs(mt,{children:[o,c]}),e[8]=o,e[9]=c,e[10]=h):h=e[10],h}function Oc(t){return t.servingLocally||t.localPreview?"open":t.runtimeResolved?t.runtime!=="cms"?"open":t.branch?t.blocksV8?"open":t.defaultBranch?t.defaultBranch===t.branch?"blocked":"open":t.listedDraft||t.defaultBranch===null?"open":"pending":"pending":"pending"}function zc(){const t=T.c(27),e=It(),{org:s}=Jt(),r=Ps(e?.virtualMcpId),n=r?.id??e?.virtualMcpId??"",i=e?.currentBranch??null,{runtime:d,resolved:l}=ns(r?.id),o=cn(r?.id),{url:u}=sn(r?.id),{connection:c}=nn(n||null),h=!!r&&!!i&&l&&d==="cms"&&!o&&!u,p=i??"",b=e?.taskId??null;let f,m,x,g;t[0]!==s.slug||t[1]!==p||t[2]!==b||t[3]!==n?(m={orgSlug:s.slug,virtualMcpId:n,branch:p,threadId:b},f=Uc,g=vt,x=mn(m),t[0]=s.slug,t[1]=p,t[2]=b,t[3]=n,t[4]=f,t[5]=m,t[6]=x,t[7]=g):(f=t[4],m=t[5],x=t[6],g=t[7]);let w;t[8]!==f||t[9]!==m?(w=(R,B)=>f(B?.queryKey)===f(gn(m))?R:void 0,t[8]=f,t[9]=m,t[10]=w):w=t[10];let j;t[11]!==h||t[12]!==x||t[13]!==w?(j={...x,enabled:h,placeholderData:w},t[11]=h,t[12]=x,t[13]=w,t[14]=j):j=t[14];const v=g(j),S=!!u,P=!!c;let k;if(t[15]!==o||t[16]!==i||t[17]!==r?.metadata?.releases||t[18]!==l||t[19]!==d||t[20]!==v.data||t[21]!==v.isError||t[22]!==S||t[23]!==P){let R;t[25]!==i?(R=B=>B.branch===i,t[25]=i,t[26]=R):R=t[26],k=Oc({runtime:d,runtimeResolved:l,blocksV8:o,localPreview:S,servingLocally:P,branch:i,listedDraft:(r?.metadata?.releases??[]).some(R),defaultBranch:v.data?v.data.base??null:v.isError?null:void 0}),t[15]=o,t[16]=i,t[17]=r?.metadata?.releases,t[18]=l,t[19]=d,t[20]=v.data,t[21]=v.isError,t[22]=S,t[23]=P,t[24]=k}else k=t[24];const N=k,C=`${n}:${i??""}`,[y,A]=K.useState(null);return N!=="pending"&&(y?.key!==C||y.gate!==N)&&A({key:C,gate:N}),N==="pending"&&y?.key===C?y.gate:N}function Uc(t){return t?.[2]}function Hc(t){const e=!t.hasEntity&&!t.servingLocally,s=t.hasEntity&&!t.localPreview&&!t.servingLocally&&!t.onProduction&&t.showsRepositoryActions;return{hidden:e,localFiles:!e&&t.servingLocally,draftSelect:!e&&t.hasEntity,publish:e||!s?null:t.runtime==="cms"?"cms":"code"}}function _d(t){const e=T.c(2),{blocksOnly:s}=t;let r;return e[0]!==s?(r=s?a.jsx(qc,{}):a.jsx(ba,{}),e[0]=s,e[1]=r):r=e[1],r}function qc(){return cn(ci())?a.jsx(la,{value:!1,children:a.jsx(ba,{})}):null}function ba(){const t=T.c(32),e=It(),{org:s}=Jt(),r=Ps(e?.virtualMcpId),n=e?.currentBranch??null,i=ns(r?.id).runtime,{url:d}=sn(r?.id),{connection:l}=nn(r?.id??e?.virtualMcpId),o=r?.id??e?.virtualMcpId,u=zc()!=="open",c=!!r,h=!!l,p=!!d;let b;t[0]!==r||t[1]!==u||t[2]!==i||t[3]!==c||t[4]!==h||t[5]!==p?(b=Hc({hasEntity:c,servingLocally:h,localPreview:p,showsRepositoryActions:!!r&&gl(r),runtime:i,onProduction:u}),t[0]=r,t[1]=u,t[2]=i,t[3]=c,t[4]=h,t[5]=p,t[6]=b):b=t[6];const f=b;if(!o||f.hidden)return null;let m;t[7]!==n||t[8]!==o?(m=a.jsx(Lc,{virtualMcpId:o,branch:n}),t[7]=n,t[8]=o,t[9]=m):m=t[9];let x;t[10]!==n||t[11]!==f.localFiles||t[12]!==o?(x=f.localFiles&&a.jsx(Mc,{virtualMcpId:o,branch:n}),t[10]=n,t[11]=f.localFiles,t[12]=o,t[13]=x):x=t[13];let g;t[14]!==n||t[15]!==s||t[16]!==f.localFiles||t[17]!==o?(g=f.localFiles&&a.jsx($c,{orgSlug:s.slug,virtualMcpId:o,branch:n}),t[14]=n,t[15]=s,t[16]=f.localFiles,t[17]=o,t[18]=g):g=t[18];let w;t[19]!==n||t[20]!==r||t[21]!==f.draftSelect?(w=r&&f.draftSelect&&a.jsx("div",{className:"flex min-w-0 shrink items-center justify-end",children:a.jsx(Fi,{virtualMcp:r,currentBranch:n})}),t[19]=n,t[20]=r,t[21]=f.draftSelect,t[22]=w):w=t[22];let j;t[23]!==r||t[24]!==f.publish?(j=r&&f.publish&&a.jsxs(a.Fragment,{children:[a.jsx(Fa,{orientation:"vertical",className:"mx-1 data-[orientation=vertical]:h-4"}),a.jsx("div",{className:"flex shrink-0 items-center justify-end gap-1",children:f.publish==="cms"?a.jsx(yc,{virtualMcpId:r.id}):a.jsx(Fc,{virtualMcpId:r.id})})]}),t[23]=r,t[24]=f.publish,t[25]=j):j=t[25];let v;return t[26]!==m||t[27]!==x||t[28]!==g||t[29]!==w||t[30]!==j?(v=a.jsxs(a.Fragment,{children:[m,x,g,w,j]}),t[26]=m,t[27]=x,t[28]=g,t[29]=w,t[30]=j,t[31]=v):v=t[31],v}function Hs(t){const e=T.c(7),{icon:s,title:r,description:n,action:i}=t;let d;e[0]!==i?(d=i?{children:i.label,onClick:i.onClick,disabled:i.disabled}:void 0,e[0]=i,e[1]=d):d=e[1];let l;return e[2]!==n||e[3]!==s||e[4]!==d||e[5]!==r?(l=a.jsx(Ds,{children:a.jsx(Ds.Content,{children:a.jsx(Ds.Container,{children:a.jsx(di,{icon:s,title:r,description:n,buttonProps:d})})})}),e[2]=n,e[3]=s,e[4]=d,e[5]=r,e[6]=l):l=e[6],l}function Ld(t){const e=T.c(28),{virtualMcpId:s,icon:r,copy:n,skeleton:i,children:d}=t,l=fe(),{org:o}=Jt(),u=It(),c=u?.currentBranch??null,h=Tt(s,c);Ia(h.kind==="protocol"&&h.source==="github");const{openPanel:p}=ui();if(!c){const m=n.noDraftTitle,x=n.noDraftDesc;let g;e[0]!==l?(g=l("sectionsEditor.namedRules.openEditor"),e[0]=l,e[1]=g):g=e[1];let w;e[2]!==p?(w=()=>p("content"),e[2]=p,e[3]=w):w=e[3];let j;e[4]!==g||e[5]!==w?(j={label:g,onClick:w},e[4]=g,e[5]=w,e[6]=j):j=e[6];let v;return e[7]!==n.noDraftDesc||e[8]!==n.noDraftTitle||e[9]!==r||e[10]!==j?(v=a.jsx(Hs,{icon:r,title:m,description:x,action:j}),e[7]=n.noDraftDesc,e[8]=n.noDraftTitle,e[9]=r,e[10]=j,e[11]=v):v=e[11],v}if(Rl(h)){let m;return e[12]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(Bl,{}),e[12]=m):m=e[12],m}if(h.kind==="pending"){let m;return e[13]!==i?(m=a.jsx(a.Fragment,{children:i}),e[13]=i,e[14]=m):m=e[14],m}if(h.kind!=="protocol"){let m;return e[15]!==n.loadFailed||e[16]!==n.loadFailedHint||e[17]!==r?(m=a.jsx(Hs,{icon:r,title:n.loadFailed,description:n.loadFailedHint}),e[15]=n.loadFailed,e[16]=n.loadFailedHint,e[17]=r,e[18]=m):m=e[18],m}const b=u?.taskId??null;let f;return e[19]!==c||e[20]!==d||e[21]!==n||e[22]!==r||e[23]!==o.slug||e[24]!==i||e[25]!==b||e[26]!==s?(f=a.jsx(Kc,{orgSlug:o.slug,virtualMcpId:s,branch:c,threadId:b,icon:r,copy:n,skeleton:i,children:d},c),e[19]=c,e[20]=d,e[21]=n,e[22]=r,e[23]=o.slug,e[24]=i,e[25]=b,e[26]=s,e[27]=f):f=e[27],f}function Kc(t){const e=T.c(35),{orgSlug:s,virtualMcpId:r,branch:n,threadId:i,icon:d,copy:l,skeleton:o,children:u}=t,c=fe();let h;e[0]!==n||e[1]!==s||e[2]!==i||e[3]!==r?(h={orgSlug:s,virtualMcpId:r,branch:n,threadId:i,previewUrl:null},e[0]=n,e[1]=s,e[2]=i,e[3]=r,e[4]=h):h=e[4];const p=h,b=Ga(p),f=Tl(p),m=b.data,x=f.data;let g;e[5]!==n||e[6]!==s||e[7]!==r?(g={orgSlug:s,virtualMcpId:r,branch:n},e[5]=n,e[6]=s,e[7]=r,e[8]=g):g=e[8];const w=Wa(g,Dl);if(!m||!x||!w.ready){if(b.isError||f.isError||w.failed){const P=l.loadFailed,k=l.loadFailedHint;let N;e[9]!==c?(N=c("sectionsEditor.namedRules.tryAgain"),e[9]=c,e[10]=N):N=e[10];let C;e[11]!==b||e[12]!==w||e[13]!==f?(C=()=>{b.isError&&b.refetch(),f.isError&&f.refetch(),w.failed&&w.retry()},e[11]=b,e[12]=w,e[13]=f,e[14]=C):C=e[14];let y;e[15]!==N||e[16]!==C?(y={label:N,onClick:C},e[15]=N,e[16]=C,e[17]=y):y=e[17];let A;return e[18]!==l.loadFailed||e[19]!==l.loadFailedHint||e[20]!==d||e[21]!==y?(A=a.jsx(Hs,{icon:d,title:P,description:k,action:y}),e[18]=l.loadFailed,e[19]=l.loadFailedHint,e[20]=d,e[21]=y,e[22]=A):A=e[22],A}let S;return e[23]!==o?(S=a.jsx(a.Fragment,{children:o}),e[23]=o,e[24]=S):S=e[24],S}let j;e[25]!==n||e[26]!==u||e[27]!==m||e[28]!==x||e[29]!==s||e[30]!==i||e[31]!==r?(j=u({orgSlug:s,virtualMcpId:r,branch:n,threadId:i,decofile:m,meta:x}),e[25]=n,e[26]=u,e[27]=m,e[28]=x,e[29]=s,e[30]=i,e[31]=r,e[32]=j):j=e[32];let v;return e[33]!==j?(v=a.jsx(a.Fragment,{children:j}),e[33]=j,e[34]=v):v=e[34],v}export{Hs as S,_d as a,zc as b,Ld as c,ki as u};
@@ -1 +0,0 @@
1
- import{c as u,r as g,j as n,J as G,a0 as F,a as E,l as O,b as P,n as y,L as H}from"./index-CoIqGnkT.js";import{C as M}from"./chat-context-CbLWEfcx.js";import{C as x}from"./index-CAJzXKA5.js";import{L}from"./index-DmZ8PTrQ.js";import{B as V}from"./blocks-preview-workspace-context-cN8B_PL1.js";import{e as T,p as J,s as K,a as W,r as U,T as $,u as R,b as z}from"./site-editor-toast-VaN8V1I2.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-Cos61Cco.js";import{C as Y}from"./content-tab-BBa6VyOA.js";import{T as Z}from"./tab-icon-glyph-DE2TUhh7.js";import{r as tt}from"./resolve-tab-icon-DwPVAW_f.js";import et from"./agent-site-editor-CDMr8brx.js";import"./autosend-BuzWxJ_9.js";import"./thread-route-SXxESRM6.js";import"./use-project-scope-C2qD7yC0.js";import"./repository-binding-CyaIIWjt.js";import"./use-mcp-client-DuvY0YQh.js";import"./auth-DXM0rgLv.js";import"./thread-intent-DsvstIYH.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DwGCR27q.js";import"./task-board-dajPV_XW.js";import"./schema-BR70Vo5Y.js";import"./use-entitlements-DU-An4VI.js";import"./use-ai-providers-CT41YQMU.js";import"./use-decopilot-events-BHP9on7q.js";import"./use-organization-settings-CZAS8Fwc.js";import"./use-mobile-CQqLe5Fj.js";import"./use-sidebar-collapsed-Cx7HQy1d.js";import"./use-chat-layout-state-PWVkseE_.js";import"./agent-icon-qder0a6G.js";import"./AlertCircle-DlXniLTL.js";import"./Tool01-D54u8MkG.js";import"./ArrowUp-Cy-4CLBm.js";import"./ArrowLeft-DIqRNJY3.js";import"./LinkBroken01-DuElxfIa.js";import"./ShoppingBag01-lKolYH3w.js";import"./Globe04-DgADHmww.js";import"./CheckCircle-DdQJ6K1s.js";import"./ChevronUp-0ZUNuXoh.js";import"./ChevronSelectorVertical-DJwn4vk3.js";import"./UserSquare-DorunsHP.js";import"./CreditCard01-BzR1cQHR.js";import"./SwitchHorizontal01-AyEyHl5j.js";import"./Key01-BnGTLStV.js";import"./Minus-DKEGggSd.js";import"./Monitor01-RPmPp9yV.js";import"./Sun-CLH4DOsz.js";import"./Play-CCrxvWEX.js";import"./Plus-Dwl0ymG8.js";import"./SearchMd-Cf7uAP7Q.js";import"./Trash01-CLcCE4W6.js";import"./Upload01-CQ4MgovG.js";import"./Users01-mVHDEY41.js";import"./XClose-DJErxj2G.js";import"./Zap-C1zrSwKR.js";import"./tooltip-DycNDw2G.js";import"./index-DQFlQUCO.js";import"./toolbar-icon-button-1M1cEETB.js";import"./shell-layout-BN9dcRYV.js";import"./use-deployment-admin-BhTKxM6k.js";import"./admin-fetch-BhTJlAsX.js";import"./command-3SMlch0Q.js";import"./index-Czbh2wlZ.js";import"./integration-icon-DwBMZgrw.js";import"./project-icon-Uszb7VXV.js";import"./use-navigate-to-agent-BP-fuYpJ.js";import"./new-project-dialog-CYkZ_7Mu.js";import"./label-Cz3ISXTG.js";import"./repository-picker-ERyaEscX.js";import"./github-icon-CgGTVNey.js";import"./useInfiniteQuery-FqvtVI1A.js";import"./infiniteQueryObserver-DAKXTyVS.js";import"./collection-search-DVuo1pjJ.js";import"./use-debounced-value-DlRWnR28.js";import"./required-auth-layout-OBk7IzAK.js";import"./use-org-sso-B3MWcxrY.js";import"./sheet-C0gthVwC.js";import"./resizable-CHAafS5W.js";import"./core.esm-BWCUlskR.js";import"./sortable.esm-BYS1QaMo.js";import"./context-menu-BsNBSqQT.js";import"./create-organization-dialog-C-miI-DE.js";import"./form-Di6X4re-.js";import"./project-apps-DedVk-Nz.js";import"./use-recent-apps-D7w2xW8F.js";import"./input-oiyfOdq_.js";import"./usage-stats-DZlhabNT.js";import"./tool-namespace-CNnPmHfP.js";import"./utils-CVEq3hMx.js";import"./markdown-BzJtnofQ.js";import"./use-copy-BR702L1I.js";import"./icon-button-DNR19rRF.js";import"./file-type-icon-CpyvcXG2.js";import"./chat-draft-CqQowXE0.js";import"./select-DR3RwfpI.js";import"./index-BdQq_4o_.js";import"./tabs-W2tygsn9.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-BmrhY51W.js";import"./toggle-group-CtP6sNQ9.js";import"./index-NrdVW9bX.js";import"./checkbox-CLe06xtZ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./popover-C20V6lAt.js";import"./drawer-D47Dw-K5.js";import"./input-8jGMlXl7.js";import"./suggestion-BGsc91Hz.js";import"./use-mcp-prompts-DGMojcFt.js";import"./use-org-fs-DwzY3jVQ.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-CFzfdEnd.js";import"./plan-ladder-D5AQfuNm.js";import"./add-connection-dialog-vc7esFXt.js";import"./extract-connection-data-CY3M43Pj.js";import"./metadata-D72DunRR.js";import"./connection-Bu1PnSek.js";import"./url-slug-DOp56bVw.js";import"./connection-card-twsNz0iZ.js";import"./connection-slug-CfDtYvgF.js";import"./textarea-DH4lLGjS.js";import"./use-connection-Bc88fzeR.js";import"./schema-y4LFWED4.js";import"./connection-form-helpers-B0xDJFtW.js";import"./authenticate-and-persist-oauth-C_fCYd84.js";import"./mcp-oauth-O8kCHxpg.js";import"./mcp-oauth-DseEuoup.js";import"./collection-tabs-DJVITgIT.js";import"./badge-CM9VoPn3.js";import"./use-infinite-scroll-Camm6qqR.js";import"./useSuspenseInfiniteQuery-Bp4UXIRf.js";import"./use-task-board-events-B5PJHCY3.js";import"./agent-capabilities-C_fHyyST.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-DsMBpUcw.js";import"./index-RA-jAYZL.js";import"./pair-DRdkhABe.js";import"./collapsible-t9cEILA0.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BrjPpO12.js";import"./types-CUZBmViJ.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-DiVqGaU9.js";import"./sandbox-git-api-DcqI6XE4.js";import"./parse-sections-DpGddWrT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./blocks-tab-states-DhWZqku3.js";import"./empty-state-Z2OuiQOQ.js";import"./hosted-reconcile-DTemoIcy.js";import"./slider-C-TEQZK0.js";import"./index-DjbHauib.js";import"./tooltipContext-BIhnjJZf.js";import"./CategoricalChart-ChT3v5_x.js";import"./index-C3pJvzEE.js";import"./switch-CzTsDB3z.js";import"./scroll-area-DbCNV5xq.js";import"./monaco-editor-DOFMDCyC.js";import"./editor-BWpbvGUJ.js";import"./calendar-ng2FQ19x.js";import"./editor-classes-J2Hl0Yqy.js";import"./combobox-MSjb-buw.js";import"./search-input-Bx2x3uO8.js";import"./use-file-configs-CGfkm6PJ.js";import"./asset-utils-uyXmTXD2.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-lifecycle-context-DPyi5-UY.js";import"./variant-matcher-override-TIETIQ4W.js";import"./use-fast-preview-draft-url-Bq8X4SK6.js";import"./useQueries-CiCIRDU-.js";import"./device-hint-BAl-Wimj.js";import"./alert-CngVua4h.js";import"./virtual-mcp-DqDEHqCs.js";import"./app-preview-url-9Od4s8Sz.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-DmUyAx53.js";import"./view-header-BupmkwFn.js";import"./use-cms-publish-actions-D2RPgS1y.js";import"./use-content-sync-xOHgSIER.js";import"./mustache-C2jWivSN.js";import"./date-utils-CrvIKg-s.js";import"./use-move-blocks-DavDm8qw.js";import"./empty-state-CibwE54W.js";import"./collection-table-wrapper-Cy5iDhCR.js";import"./table-B-mHKzHC.js";import"./site-draft-view-DACL5z9x.js";import"./separator-DZpsLNey.js";import"./branch-name-D4VItpp3.js";import"./serial-task-queue-CGOeQgpr.js";import"./save-changes-debug-nBi-n9eV.js";function I(e){return e.kind==="unavailable"&&e.source==="local"&&(e.problem?.reason??"not-answering")==="not-answering"}const ot=e=>e;function it(e){const t=u.c(10),{candidates:o,invalidLink:c,shell:m,editor:i}=e,r=c===void 0?!1:c,s=m===void 0?ot:m,[p,l]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==i?(h=i(p,f),t[1]=p,t[2]=i,t[3]=h):h=t[3],h}let a;t[4]!==o||t[5]!==r?(a=n.jsx(rt,{candidates:o,invalidLink:r,onConnect:l}),t[4]=o,t[5]=r,t[6]=a):a=t[6];let d;return t[7]!==s||t[8]!==a?(d=s(a),t[7]=s,t[8]=a,t[9]=d):d=t[9],d}function rt(e){const t=u.c(17),{candidates:o,invalidLink:c,onConnect:m}=e,i=c===void 0?!1:c,[r]=G(),{language:s}=r;let p;t[0]!==m?(p=N=>m({endpoint:N}),t[0]=m,t[1]=p):p=t[1];let l;t[2]!==o||t[3]!==p?(l={candidates:o,onFound:p},t[2]=o,t[3]=p,t[4]=l):l=t[4];const a=q(l),{state:d,access:f,needsGesture:h}=a;let k;t[5]!==o||t[6]!==s?(k=new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(o.map(T)),t[5]=o,t[6]=s,t[7]=k):k=t[7];const C=k;let S;t[8]!==f||t[9]!==a.start||t[10]!==h||t[11]!==d?(S=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:a.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=a.start,t[10]=h,t[11]=d,t[12]=S):S=t[12];const _=S;let j;return t[13]!==C||t[14]!==i||t[15]!==_?(j=n.jsx(B,{wait:_,hosts:C,invalidLink:i}),t[13]=C,t[14]=i,t[15]=_,t[16]=j):j=t[16],j}const v="deco-serve",w="working-tree",nt={id:"",slug:"",name:"",logo:null},st={id:v,slug:v},mt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function pt(){const e=window.location.hash,t=new URLSearchParams(e.replace(/^#/,"")).has("endpoint"),o=t?J(e):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),o&&K(o),{candidates:W(o,U()),invalidLink:t&&!o}}const at=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function ct(){const e=u.c(6),t=P();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:lt},e[0]=o):o=e[0];const c=O(o);let m;e[1]!==t||e[2]!==c?(m=at.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(H,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Z,{icon:tt({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),e[1]=t,e[2]=c,e[3]=m):m=e[3];let i;return e[4]!==m?(i=n.jsx(y.Tabs,{children:m}),e[4]=m,e[5]=i):i=e[5],i}function lt(e){return e.matches.at(-1)?.staticData.siteEditorView}function A(e){const t=u.c(14),{children:o}=e,c=P(),{connection:m}=z(v),i=R(v,w);let r,s;if(t[0]!==i||t[1]!==o||t[2]!==m||t[3]!==c){s=Symbol.for("react.early_return_sentinel");t:{if(r=m?T(m.endpoint):"",i.kind==="protocol"){s=o;break t}if(i.kind!=="unavailable"||I(i)){s=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=i,t[1]=o,t[2]=m,t[3]=c,t[4]=r,t[5]=s}else r=t[4],s=t[5];if(s!==Symbol.for("react.early_return_sentinel"))return s;let p;t[6]!==i.problem?(p=i.problem??{reason:"not-answering"},t[6]=i.problem,t[7]=p):p=t[7];let l;t[8]!==r||t[9]!==p?(l={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=l):l=t[10];let a;return t[11]!==r||t[12]!==l?(a=n.jsx(B,{wait:l,hosts:r}),t[11]=r,t[12]=l,t[13]=a):a=t[13],a}function dt(e){const t=u.c(6),{onLost:o}=e,c=R(v,w);let m;t[0]!==c?(m=I(c),t[0]=c,t[1]=m):m=t[1];const i=m;let r,s;return t[2]!==i||t[3]!==o?(r=()=>{i&&o()},s=[i,o],t[2]=i,t[3]=o,t[4]=r,t[5]=s):(r=t[4],s=t[5]),g.useEffect(r,s),null}const D={threadOpen:!1,contentOpen:!0,threadVisibilityExplicit:!1,toggleThread:()=>{},toggleContent:()=>{}};function ut(){const e=u.c(11),{data:t}=E.useSession();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:ft},e[0]=o):o=e[0];const c=O(o),m=!!t?.user;let i;e[1]!==m?(i={rail:m},e[1]=m,e[2]=i):i=e[2];const r=c??"preview";let s,p,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(ct,{}),p=n.jsx(x.Thread,{children:null}),l=n.jsx(et,{}),e[3]=s,e[4]=p,e[5]=l):(s=e[3],p=e[4],l=e[5]);let a;e[6]!==r?(a=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:r,contentNavigation:s,children:[p,l]})}),e[6]=r,e[7]=a):a=e[7];let d;return e[8]!==i||e[9]!==a?(d=n.jsx(L,{outsideOrg:i,children:a}),e[8]=i,e[9]=a,e[10]=d):d=e[10],d}function ft(e){return e.matches.at(-1)?.staticData.siteEditorView}function ht(e){const t=u.c(8),{children:o}=e,{data:c}=E.useSession(),m=!!c?.user;let i;t[0]!==m?(i={rail:m},t[0]=m,t[1]=i):i=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(x.Thread,{children:null}),t[2]=r):r=t[2];let s;t[3]!==o?(s=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:"guide",children:[r,n.jsx(x.Content,{children:o})]})}),t[3]=o,t[4]=s):s=t[4];let p;return t[5]!==i||t[6]!==s?(p=n.jsx(L,{outsideOrg:i,children:s}),t[5]=i,t[6]=s,t[7]=p):p=t[7],p}const b=()=>{},vt={connection:null,set:b,clear:b};function Ui(){const e=u.c(3),[t]=g.useState(pt);let o;return e[0]!==t.candidates||e[1]!==t.invalidLink?(o=n.jsx(F,{org:nt,project:st,children:n.jsx(it,{candidates:t.candidates,invalidLink:t.invalidLink,shell:kt,editor:xt})}),e[0]=t.candidates,e[1]=t.invalidLink,e[2]=o):o=e[2],o}function xt(e,t){return n.jsxs($.Provider,{value:{connection:e,set:b,clear:b},children:[n.jsx(dt,{onLost:t}),n.jsx(M,{value:mt,children:n.jsx(V,{children:n.jsx(ut,{})})})]})}function kt(e){return n.jsx($.Provider,{value:vt,children:n.jsx(ht,{children:e})})}function zi(){const e=u.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Q,{virtualMcpId:v})}),e[0]=t):t=e[0],t}function qi(){const e=u.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Y,{virtualMcpId:v})}),e[0]=t):t=e[0],t}export{qi as SiteEditorContent,zi as SiteEditorPreview,Ui as default};
@@ -1 +0,0 @@
1
- import{c as l,a5 as n,j as r,K as f}from"./index-CoIqGnkT.js";import{C as d}from"./index-CAJzXKA5.js";import{m as u,P as x,T as h}from"./mock-board-scAFzBl7.js";import{F as j}from"./feature-gate-DIw-mvZ7.js";import"./use-mobile-CQqLe5Fj.js";import"./use-sidebar-collapsed-Cx7HQy1d.js";import"./use-chat-layout-state-PWVkseE_.js";import"./thread-route-SXxESRM6.js";import"./autosend-BuzWxJ_9.js";import"./use-project-scope-C2qD7yC0.js";import"./repository-binding-CyaIIWjt.js";import"./use-mcp-client-DuvY0YQh.js";import"./auth-DXM0rgLv.js";import"./thread-intent-DsvstIYH.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DwGCR27q.js";import"./task-board-dajPV_XW.js";import"./schema-BR70Vo5Y.js";import"./agent-icon-qder0a6G.js";import"./AlertCircle-DlXniLTL.js";import"./Tool01-D54u8MkG.js";import"./ArrowUp-Cy-4CLBm.js";import"./ArrowLeft-DIqRNJY3.js";import"./LinkBroken01-DuElxfIa.js";import"./ShoppingBag01-lKolYH3w.js";import"./Globe04-DgADHmww.js";import"./CheckCircle-DdQJ6K1s.js";import"./ChevronUp-0ZUNuXoh.js";import"./ChevronSelectorVertical-DJwn4vk3.js";import"./UserSquare-DorunsHP.js";import"./CreditCard01-BzR1cQHR.js";import"./SwitchHorizontal01-AyEyHl5j.js";import"./Key01-BnGTLStV.js";import"./Minus-DKEGggSd.js";import"./Monitor01-RPmPp9yV.js";import"./Sun-CLH4DOsz.js";import"./Play-CCrxvWEX.js";import"./Plus-Dwl0ymG8.js";import"./SearchMd-Cf7uAP7Q.js";import"./Trash01-CLcCE4W6.js";import"./Upload01-CQ4MgovG.js";import"./Users01-mVHDEY41.js";import"./XClose-DJErxj2G.js";import"./Zap-C1zrSwKR.js";import"./tooltip-DycNDw2G.js";import"./index-DQFlQUCO.js";import"./toolbar-icon-button-1M1cEETB.js";import"./shell-layout-BN9dcRYV.js";import"./use-deployment-admin-BhTKxM6k.js";import"./admin-fetch-BhTJlAsX.js";import"./command-3SMlch0Q.js";import"./index-Czbh2wlZ.js";import"./integration-icon-DwBMZgrw.js";import"./project-icon-Uszb7VXV.js";import"./use-navigate-to-agent-BP-fuYpJ.js";import"./new-project-dialog-CYkZ_7Mu.js";import"./label-Cz3ISXTG.js";import"./repository-picker-ERyaEscX.js";import"./github-icon-CgGTVNey.js";import"./useInfiniteQuery-FqvtVI1A.js";import"./infiniteQueryObserver-DAKXTyVS.js";import"./collection-search-DVuo1pjJ.js";import"./use-debounced-value-DlRWnR28.js";import"./use-organization-settings-CZAS8Fwc.js";import"./required-auth-layout-OBk7IzAK.js";import"./use-org-sso-B3MWcxrY.js";import"./sheet-C0gthVwC.js";import"./resizable-CHAafS5W.js";import"./core.esm-BWCUlskR.js";import"./sortable.esm-BYS1QaMo.js";import"./use-task-board-analytics-CBMwXJ9I.js";import"./combobox-MSjb-buw.js";import"./popover-C20V6lAt.js";import"./use-task-board-prompts-jxu88jn3.js";import"./badge-CM9VoPn3.js";import"./icon-button-DNR19rRF.js";import"./use-org-fs-DwzY3jVQ.js";import"./use-automations-DW8dHpTW.js";import"./search-toggle-NGIVu4q_.js";import"./context-menu-BsNBSqQT.js";import"./feedback-ACIX3HAK.js";import"./use-task-board-items-e9YgnV6R.js";import"./config-DtxU1wmQ.js";import"./use-task-board-events-B5PJHCY3.js";import"./use-decopilot-events-BHP9on7q.js";import"./sprints-C1z9xhcL.js";import"./select-DR3RwfpI.js";import"./index-BdQq_4o_.js";import"./task-route-GeZcjNWN.js";import"./task-key-BCHdFiOO.js";import"./project-index-DxnUyMmA.js";import"./use-tags-qkt7D6HU.js";import"./calendar-ng2FQ19x.js";import"./alert-CngVua4h.js";import"./collapsible-t9cEILA0.js";import"./use-copy-BR702L1I.js";import"./markdown-BzJtnofQ.js";import"./chat-context-CbLWEfcx.js";import"./use-entitlements-DU-An4VI.js";import"./use-ai-providers-CT41YQMU.js";import"./index-C1J7wkkB.js";import"./usage-stats-DZlhabNT.js";import"./tool-namespace-CNnPmHfP.js";import"./form-Di6X4re-.js";import"./utils-CVEq3hMx.js";import"./editor-classes-J2Hl0Yqy.js";import"./suggestion-BGsc91Hz.js";import"./index-B80PkxJB.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-CvmHZRRv.js";import"./use-connection-Bc88fzeR.js";import"./github-repo-scope-C58hYmYC.js";import"./thread-sheet-body-DJsgTtYx.js";import"./useSuspenseInfiniteQuery-Bp4UXIRf.js";import"./pair-DRdkhABe.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BrjPpO12.js";import"./types-CUZBmViJ.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-mcp-prompts-DGMojcFt.js";import"./use-thread-outputs-DiVqGaU9.js";import"./file-type-icon-CpyvcXG2.js";import"./use-infinite-scroll-Camm6qqR.js";import"./task-status-TTxT6L0h.js";import"./separator-DZpsLNey.js";import"./chat-draft-CqQowXE0.js";import"./feature-paywall-CFzfdEnd.js";import"./plan-ladder-D5AQfuNm.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 Lo(){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{Lo as default};
@@ -1 +0,0 @@
1
- import{c as r}from"./index-CoIqGnkT.js";import{b as a}from"./chat-context-CbLWEfcx.js";import{a as i}from"./shell-layout-BN9dcRYV.js";function u(){const t=r.c(3),{sendMessage:s}=a(),{openSidePanel:o}=i();let e;return t[0]!==o||t[1]!==s?(e=n=>{o(),s({parts:[{type:"text",text:n}]})},t[0]=o,t[1]=s,t[2]=e):e=t[2],e}export{u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-DAKXTyVS.js";import{eq as i}from"./index-CoIqGnkT.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./infiniteQueryObserver-DAKXTyVS.js";import{eq as u,ex as n}from"./index-CoIqGnkT.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};