decocms 4.597.1 → 4.598.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/dist/client/assets/{AlertCircle-CYAsQRdT.js → AlertCircle-jxvwS2PA.js} +1 -1
  2. package/dist/client/assets/{AreaChart-WJ2lLKy4.js → AreaChart-zoolaKB0.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-zHVY_XX0.js → ArrowLeft-Dlf39oKA.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-B6vgPWbg.js → ArrowRight-DCL3gp96.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CsFg9VL2.js → ArrowUp-BbUoh0-h.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-AamEOlRO.js → BookOpen01-C85UtDum.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-BxFiyXVM.js → CartesianChart-Bl1HZv9F.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-DfjY1woJ.js → CategoricalChart-jjkJNbxp.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-BB00e9u8.js → CheckCircle-KztuMvd5.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-CD0tZl8C.js → ChevronDown-c_BdXEOA.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-CmQsMnAL.js → ChevronSelectorVertical-DmpvIgAy.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-DGDvzrMe.js → ChevronUp-BSWVeXQq.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-W8t7hmzJ.js → CreditCard01-C4dCRCdu.js} +1 -1
  14. package/dist/client/assets/{Eye-nqlQ004P.js → Eye-BSRrcDT9.js} +1 -1
  15. package/dist/client/assets/{File02-o8s5093L.js → File02-KoBPCXEf.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-DY8McBak.js → Fingerprint04-B2N20uu4.js} +1 -1
  17. package/dist/client/assets/{Globe04-OZ9xS3Lx.js → Globe04-UMTQ82HG.js} +1 -1
  18. package/dist/client/assets/{Image01-DZmu7hyy.js → Image01-BGM1ArTz.js} +1 -1
  19. package/dist/client/assets/{Key01-CSQOqmIz.js → Key01-BMkzySkS.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-BSo5LCFE.js → LayoutLeft-DrOR8tOg.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-BxVMIk5A.js → LinkBroken01-hoBFLv94.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-D1dT92x6.js → MessageCircle01-CDpj4jpt.js} +1 -1
  23. package/dist/client/assets/{Minus-D2jrgo3d.js → Minus-DdEPrbsD.js} +1 -1
  24. package/dist/client/assets/{Monitor01-COmDHQ1j.js → Monitor01-B4iHbF93.js} +1 -1
  25. package/dist/client/assets/{Play-JVQd8C8L.js → Play-Clz2e0s4.js} +1 -1
  26. package/dist/client/assets/{Plus-CF8KlFVc.js → Plus-CO40HUhB.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-8082t01S.js → ReferenceLine-CeSeSzH6.js} +1 -1
  28. package/dist/client/assets/{SearchMd-Cw05gj7E.js → SearchMd-FI2fcykP.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-Cc2EJvA-.js → ShoppingBag01-BBDr_WSy.js} +1 -1
  30. package/dist/client/assets/{Sun-Bji8LMRX.js → Sun-D531tFmZ.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-BSGnkDXI.js → SwitchHorizontal01-B8iZqdiB.js} +1 -1
  32. package/dist/client/assets/{Tool01-BpBS8dw-.js → Tool01-CldemTEe.js} +1 -1
  33. package/dist/client/assets/{Tooltip-DvEW-S9l.js → Tooltip-B1dYEjVO.js} +1 -1
  34. package/dist/client/assets/{Trash01-DXQWI50A.js → Trash01-W_zwe5xo.js} +1 -1
  35. package/dist/client/assets/{Upload01-BXiTGuBV.js → Upload01-DDGkOE5t.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-DLUgjW3m.js → UserCheck01-VgBUlrC3.js} +1 -1
  37. package/dist/client/assets/{UserSquare-a_XazovD.js → UserSquare-YQkID8bv.js} +1 -1
  38. package/dist/client/assets/{Users01-BpOXj9ap.js → Users01-CJ_YMgJe.js} +1 -1
  39. package/dist/client/assets/{XClose-DxbjiApV.js → XClose-Dv4YALPV.js} +1 -1
  40. package/dist/client/assets/{Zap-QnlW2BG3.js → Zap-DFubAl8b.js} +1 -1
  41. package/dist/client/assets/{access-gate-BvopvGmx.js → access-gate-C-gJXueM.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-DaxWAHW0.js → add-connection-dialog-DyPd4ss_.js} +1 -1
  43. package/dist/client/assets/agent-app-BxXBXF3L.js +1 -0
  44. package/dist/client/assets/agent-assets-CFkP_Dfu.js +1 -0
  45. package/dist/client/assets/{agent-automation-D8HHkTDn.js → agent-automation-BaYqgCX1.js} +2 -2
  46. package/dist/client/assets/agent-automations-DBsSsUGW.js +1 -0
  47. package/dist/client/assets/agent-blog-lx6Ts7x1.js +2 -0
  48. package/dist/client/assets/agent-blog-post-BeOLBeeI.js +2 -0
  49. package/dist/client/assets/agent-calendar-BnmK4XQ1.js +1 -0
  50. package/dist/client/assets/{agent-capabilities-CPNkpGBe.js → agent-capabilities-CTj-iH2e.js} +1 -1
  51. package/dist/client/assets/agent-connect-sources-CH4TSb8y.js +1 -0
  52. package/dist/client/assets/agent-deck-DCB6fHd3.js +1 -0
  53. package/dist/client/assets/agent-e2e-BTYjDJlF.js +1 -0
  54. package/dist/client/assets/agent-experiments-Cw9pv6Dn.js +1 -0
  55. package/dist/client/assets/agent-file-CTx06rQr.js +1 -0
  56. package/dist/client/assets/agent-hosting-B5D0b6SX.js +1 -0
  57. package/dist/client/assets/agent-icon-CF35JltL.js +1 -0
  58. package/dist/client/assets/agent-library-BwDYP2WG.js +1 -0
  59. package/dist/client/assets/agent-library-file-C81bvh62.js +1 -0
  60. package/dist/client/assets/agent-overview-K-iHxR1q.js +1 -0
  61. package/dist/client/assets/{agent-releases-CctvTAm_.js → agent-releases-BwmxxOKG.js} +1 -1
  62. package/dist/client/assets/agent-settings-DSkSbN3M.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-jPhFhiaS.js → agent-site-editor-AlBg5D2V.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-DKlbc-rv.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-D8oVt80T.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-C7REepxK.js +1 -0
  67. package/dist/client/assets/agent-view-B_4cQTkH.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-DDiVN0Sq.js → agent-view-guard-ZsSVHdZf.js} +1 -1
  69. package/dist/client/assets/{ai-providers-OuekM_ro.js → ai-providers-hSqz3WwB.js} +1 -1
  70. package/dist/client/assets/{alert-PbrLNRQ0.js → alert-DvKjRxar.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-DWAL7IVe.js → analytics-sections-VB2fGveD.js} +1 -1
  72. package/dist/client/assets/api-keys-1OldN0tT.js +1 -0
  73. package/dist/client/assets/{api-keys-CKMEwhf6.js → api-keys-5hVWR6f4.js} +1 -1
  74. package/dist/client/assets/app-editor-CKOA7wEE.js +1 -0
  75. package/dist/client/assets/{asset-utils-CJa90ZGO.js → asset-utils-DRModSGS.js} +1 -1
  76. package/dist/client/assets/{auth-C---Zkvq.js → auth-Ry9WrZV8.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-DgTfFPJA.js → auth-catchall-DJ81nN52.js} +1 -1
  78. package/dist/client/assets/{auth-entry-Bdlo1esb.js → auth-entry-N3iwaDe6.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-C7aM0bmC.js → auth-split-layout-DRc17L6c.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-D1SCK9qV.js → authenticate-and-persist-oauth-ZYDIddXa.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-CmL2MF72.js → automation-list-row-DW-hLflG.js} +1 -1
  82. package/dist/client/assets/{automation-runs-BabYNmi9.js → automation-runs-Cn3-xcc-.js} +1 -1
  83. package/dist/client/assets/automations-CVx7XBRT.js +1 -0
  84. package/dist/client/assets/{badge-BcMIPtVj.js → badge-CWKaTosK.js} +1 -1
  85. package/dist/client/assets/{block-document-BBR-lAQh.js → block-document-DnIO3ig2.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-D-FzlGyh.js → blocks-preview-workspace-context-05h1qBm4.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-CmsgKSWv.js → blocks-tab-states-DDvkpFWf.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-DZyvHdU6.js → blog-preview-url-BeobaMnK.js} +1 -1
  89. package/dist/client/assets/{blog-schema-DbGoS5dM.js → blog-schema-BMIjJkjY.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-BYUxeuY-.js → blog-source-gate-CTlfDEgd.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-D1VDGt0q.js → blog-view-gate-BUKolpTm.js} +1 -1
  92. package/dist/client/assets/{buckets-CpBc4NBs.js → buckets-Cojjk4Rx.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-DsNhI5c0.js → build-improve-prompt-doc-cVHB56V7.js} +1 -1
  94. package/dist/client/assets/{calendar-oyktWjjy.js → calendar-D3_Is4BX.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-CZr_hpNK.js → capability-load-error-l7VKbDu4.js} +1 -1
  96. package/dist/client/assets/category-editor-3t0p_Aia.js +1 -0
  97. package/dist/client/assets/{category-tree-CUP3rQKK.js → category-tree-rhKblFsZ.js} +1 -1
  98. package/dist/client/assets/{chart-L_rdD8Fy.js → chart-D0JID1mb.js} +1 -1
  99. package/dist/client/assets/{chat-context-BXxmldjV.js → chat-context-D5EEwp_m.js} +1 -1
  100. package/dist/client/assets/{chat-draft-Bu5orWL5.js → chat-draft-CL1clhIN.js} +1 -1
  101. package/dist/client/assets/{checkbox-DcLJM3uK.js → checkbox-DHBAzm3e.js} +1 -1
  102. package/dist/client/assets/choose-editor-CluRV_6I.js +1 -0
  103. package/dist/client/assets/{cli-auth-success-CmXNeNAR.js → cli-auth-success-D9loznd0.js} +1 -1
  104. package/dist/client/assets/cms-settings-editor-DY7QQNQD.js +1 -0
  105. package/dist/client/assets/{cms-store-drafts-B3P79s_J.js → cms-store-drafts-BocSU3zl.js} +1 -1
  106. package/dist/client/assets/{collapsible-B8lX7LSm.js → collapsible-JCTHx5_U.js} +1 -1
  107. package/dist/client/assets/collection-detail-l7ntNzFm.js +1 -0
  108. package/dist/client/assets/{collection-display-button-CIMd2CCY.js → collection-display-button-C6AAIEpT.js} +1 -1
  109. package/dist/client/assets/{collection-search-ioGjJlri.js → collection-search-Cez2fKoW.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-d2v3Inn9.js → collection-table-wrapper-DkyJJZPl.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-CpA2E5BB.js → collection-tabs-D0yQpVJM.js} +1 -1
  112. package/dist/client/assets/{combobox-3XSCcZHm.js → combobox-Dm0ZumLc.js} +1 -1
  113. package/dist/client/assets/{command-CjjWneJ9.js → command-CALEDfdi.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-BfugnMSL.js → companion-mcps-section-DyyItakB.js} +1 -1
  115. package/dist/client/assets/{config-DMRaGUqI.js → config-DpuCRGPS.js} +1 -1
  116. package/dist/client/assets/{connect-DPlH2AuB.js → connect-DhDiKdM5.js} +3 -3
  117. package/dist/client/assets/{connect-key-DXsdNQDg.js → connect-key-BnZjV7h5.js} +1 -1
  118. package/dist/client/assets/{connect-layout-BOatW4CZ.js → connect-layout-DPjmEUCP.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-CXL8Ll8J.js → connect-source-dialog-CPF3zqCW.js} +1 -1
  120. package/dist/client/assets/{connection-DMyObHFk.js → connection-ByE21sI5.js} +1 -1
  121. package/dist/client/assets/{connection-card-CIdpI2wF.js → connection-card-v-6X4qws.js} +1 -1
  122. package/dist/client/assets/connection-detail-DOB5tzOq.js +1 -0
  123. package/dist/client/assets/{connection-form-helpers-CI-MD64a.js → connection-form-helpers-BZq0bQw7.js} +1 -1
  124. package/dist/client/assets/{connection-slug-CoQLu_eQ.js → connection-slug-Cu8poN2f.js} +1 -1
  125. package/dist/client/assets/connections-BshSiFUh.js +1 -0
  126. package/dist/client/assets/content-changes-Yn1NpHw-.js +1 -0
  127. package/dist/client/assets/{content-tab-D0dI2BbM.js → content-tab-BOS9R4w0.js} +3 -3
  128. package/dist/client/assets/context-CSNMIE52.js +1 -0
  129. package/dist/client/assets/{context-menu-B1dAG0Wr.js → context-menu-DjuEbDwW.js} +1 -1
  130. package/dist/client/assets/{context-shell-547AgBrw.js → context-shell-BtuEIN_r.js} +4 -4
  131. package/dist/client/assets/{create-organization-dialog-BKxedScB.js → create-organization-dialog-BFbwswlq.js} +1 -1
  132. package/dist/client/assets/{daily-pulse-aiJY3gnz.js → daily-pulse-Bg2uZfJ3.js} +1 -1
  133. package/dist/client/assets/{delete-copy-CGGKQ10f.js → delete-copy-CyOQI_UN.js} +1 -1
  134. package/dist/client/assets/{device-hint-QYtktsO0.js → device-hint-1SWvGp3v.js} +1 -1
  135. package/dist/client/assets/{discover-BZAuq37N.js → discover-DRvYEfga.js} +1 -1
  136. package/dist/client/assets/{domain-settings-BuaKW4Rw.js → domain-settings-kxDrXeNT.js} +1 -1
  137. package/dist/client/assets/{drawer-JbzUShND.js → drawer-CLdqPUpZ.js} +1 -1
  138. package/dist/client/assets/{editor-classes-D4G_DIGw.js → editor-classes-C7cnK7Wp.js} +1 -1
  139. package/dist/client/assets/{editor-BR1a7qGD.js → editor-fCTeAQ3h.js} +1 -1
  140. package/dist/client/assets/{empty-state-C0MDzZBx.js → empty-state-BM_yXYSI.js} +1 -1
  141. package/dist/client/assets/{empty-state-BnFVKQvv.js → empty-state-CHF2Jno9.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-DIRzwSia.js → experiments-tab-choice-Bo36uaUs.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-DtWfSA7r.js → extract-connection-data-jy3JaUYJ.js} +1 -1
  144. package/dist/client/assets/{feature-gate-BfrcuviK.js → feature-gate-CDxHWMHG.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-DNnv958-.js → feature-paywall-Cc43JNfz.js} +1 -1
  146. package/dist/client/assets/file-explorer-BmZFNSEt.js +2 -0
  147. package/dist/client/assets/{file-preview-CC2pttDX.js → file-preview-DSlXa64u.js} +1 -1
  148. package/dist/client/assets/{file-share-button-dJsfWtiJ.js → file-share-button-mLtJT0f8.js} +2 -2
  149. package/dist/client/assets/{file-type-icon-nU6c9OQr.js → file-type-icon-CNUBpmBv.js} +1 -1
  150. package/dist/client/assets/{folder-icon-Wp7wbxIQ.js → folder-icon-Db1WLgp9.js} +1 -1
  151. package/dist/client/assets/{form-Dx1EBvxh.js → form-CCzLKFB7.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-aPmo2U0P.js → frame-navigation-B4-_qfJ3.js} +1 -1
  153. package/dist/client/assets/{gateway-client-BQlD2psO.js → gateway-client-Dsg5xVl5.js} +1 -1
  154. package/dist/client/assets/general-DRn37bfZ.js +1 -0
  155. package/dist/client/assets/{github-icon-hFwcbgKP.js → github-icon-CizbgzyS.js} +1 -1
  156. package/dist/client/assets/{held-block-view-ByNmqPhe.js → held-block-view-CYXKzDkA.js} +1 -1
  157. package/dist/client/assets/home-BDEWRpho.js +1 -0
  158. package/dist/client/assets/{home-overview-BJLt3O6I.js → home-overview-Cc5zUwKU.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-CgC-Mb3M.js → hosted-reconcile-BT71cbCZ.js} +1 -1
  160. package/dist/client/assets/{icon-button-8qhGM4eg.js → icon-button-BY-Dtplw.js} +1 -1
  161. package/dist/client/assets/{index-CqirF9LN.js → index-BKZ2GYzY.js} +1 -1
  162. package/dist/client/assets/{index-BR0U8TgB.js → index-Bf_p4D_6.js} +1 -1
  163. package/dist/client/assets/index-C3JbUkAn.js +1 -0
  164. package/dist/client/assets/{index-bfIJKw2l.js → index-C6V-s7Mj.js} +1 -1
  165. package/dist/client/assets/index-C9ybKZad.css +1 -0
  166. package/dist/client/assets/{index-MxNSCTK9.js → index-D146A7MA.js} +1 -1
  167. package/dist/client/assets/{index-C6-0Ff1m.js → index-D19iAD4s.js} +51 -39
  168. package/dist/client/assets/{index-D-cQHZ9D.js → index-D6VuEonE.js} +1 -1
  169. package/dist/client/assets/{index-ByOLAuLS.js → index-DAZyLaeQ.js} +1 -1
  170. package/dist/client/assets/{index-ZdVMGNX_.js → index-DHiZoBJ3.js} +1 -1
  171. package/dist/client/assets/index-DP6ex8je.js +4 -0
  172. package/dist/client/assets/{index-BPvQqOSy.js → index-DS6kB3db.js} +1 -1
  173. package/dist/client/assets/{index-DHE6Gmv8.js → index-DWF5ASE_.js} +8 -8
  174. package/dist/client/assets/{index-B7i_xJl4.js → index-DX45d0VZ.js} +1 -1
  175. package/dist/client/assets/{index-DWqgNqna.js → index-DeWoNfZE.js} +1 -1
  176. package/dist/client/assets/{index-B_eoP-Gi.js → index-DqGbUVIr.js} +2 -2
  177. package/dist/client/assets/{index-l6F0wrxq.js → index-i1TGxsLb.js} +1 -1
  178. package/dist/client/assets/{index-redirect-D-0BmEsE.js → index-redirect-1X0s58OF.js} +1 -1
  179. package/dist/client/assets/{index-CMjqNIsi.js → index-tfWzV95z.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-CiZgrwb3.js → infiniteQueryObserver-B1MZYli5.js} +1 -1
  181. package/dist/client/assets/{infra-billing-DMYQXPE8.js → infra-billing-CEbGoBzj.js} +1 -1
  182. package/dist/client/assets/{input-_oxlM42n.js → input-DER1ofMN.js} +1 -1
  183. package/dist/client/assets/{input-BvykudC_.js → input-DUmEmIMD.js} +3 -3
  184. package/dist/client/assets/{integration-icon-BIQ_3p0x.js → integration-icon-LqaI_LSB.js} +1 -1
  185. package/dist/client/assets/{item-actions-BoAVVq18.js → item-actions-BQdANZXs.js} +1 -1
  186. package/dist/client/assets/{jira-icon-BYAb-E8q.js → jira-icon-DNsDxAZ7.js} +1 -1
  187. package/dist/client/assets/{label-Cq7ohFeR.js → label-B0UwCsXA.js} +1 -1
  188. package/dist/client/assets/{layout-DKgi2pWo.js → layout-CSIaEqJd.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-Cdla_zr3.js → legacy-admin-welcome-dialog-DgOZFBtI.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-C4yyRVHA.js → legacy-agents-deep-Cx1B7fLu.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-CUxGG29A.js → legacy-main-redirect-CuOUB_B1.js} +1 -1
  192. package/dist/client/assets/library-B8otmHwX.js +1 -0
  193. package/dist/client/assets/{library-tab-DnuxDKa_.js → library-tab-BwU2UnDE.js} +1 -1
  194. package/dist/client/assets/{login-21wHOzeO.js → login-D7cd9YYg.js} +1 -1
  195. package/dist/client/assets/{markdown-5RMcvWqV.js → markdown-BNFJrVwN.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-BV5sVhom.js → mcp-app-renderer-ChxjPYfG.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-BU0x_iDk.js → mcp-oauth-BHqzrP9l.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-CeIVSnSu.js → mcp-oauth-CIbadsEV.js} +1 -1
  199. package/dist/client/assets/{members-BNWyDABE.js → members-CRNf5jdg.js} +1 -1
  200. package/dist/client/assets/{memory-d-IFBAud.js → memory-BtUUGfBH.js} +2 -2
  201. package/dist/client/assets/{mock-board-Y-hiGSHf.js → mock-board-CX-WNxEi.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-d8C00Vbh.js → monaco-editor-oNRDmlFg.js} +1 -1
  203. package/dist/client/assets/{monitoring-3bxUWuJM.js → monitoring-DnzPiQ3F.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-BdeLiDjT.js → monitoring-stats-row-eut48zN3.js} +1 -1
  205. package/dist/client/assets/{multi-select-D6S763-B.js → multi-select-CADtUZ9A.js} +1 -1
  206. package/dist/client/assets/{mustache-CH8IdNgC.js → mustache-BM5hcjQo.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-ISshG07e.js → named-rule-step-jeqaAuBi.js} +1 -1
  208. package/dist/client/assets/named-rule-view-0M7nk7ZR.js +1 -0
  209. package/dist/client/assets/{new-project-dialog-Ch6wUMKc.js → new-project-dialog-TULM28H3.js} +1 -1
  210. package/dist/client/assets/{new-project-store-BJVEZe7t.js → new-project-store-Dkp4wOSi.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-DF-qannK.js → oauth-callback-D2m0oHFc.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-BPFWE8hJ.js → oauth-callback-ai-provider-Cg2K-hUv.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-DEVHlJrJ.js → oauth-consent-Cey84Qly.js} +1 -1
  214. package/dist/client/assets/{onboarding-BBiIM9eH.js → onboarding-C5tGxSm3.js} +1 -1
  215. package/dist/client/assets/openai-conversation-Cin6CRLj.js +3 -0
  216. package/dist/client/assets/{optimistic-project-sidebar-views-DoJ93lgL.js → optimistic-project-sidebar-views-BwI_h134.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-C4bwqh_Q.js → order-monitor-day-qB9QL9rR.js} +1 -1
  218. package/dist/client/assets/{organization-choice-CAc73DMC.js → organization-choice-UcNwkZgV.js} +1 -1
  219. package/dist/client/assets/{orgs-DlLRdIR1.js → orgs-BNCJkrfd.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-L5xwUYxF.js → own-accounts-section-B_G3r2Ak.js} +1 -1
  221. package/dist/client/assets/{pair-BKCcX4sy.js → pair-DaLtpCvg.js} +8 -8
  222. package/dist/client/assets/{parse-sections-CBJ8clfr.js → parse-sections-BRYcF5X4.js} +3 -3
  223. package/dist/client/assets/plan-BkTiTYLU.js +1 -0
  224. package/dist/client/assets/{plan-ladder-DDAcm-ji.js → plan-ladder-DZZeDiD-.js} +1 -1
  225. package/dist/client/assets/{plan-usage-card-BwiinbGT.js → plan-usage-card-CUEZgkUc.js} +1 -1
  226. package/dist/client/assets/{popover-DTBVeUtG.js → popover-Bm-_ILu8.js} +1 -1
  227. package/dist/client/assets/post-calendar-Dx1uahJO.js +1 -0
  228. package/dist/client/assets/{post-editor-CaTAhhxB.js → post-editor-DWqV-Y-J.js} +2 -2
  229. package/dist/client/assets/{preview-content-BGfL4iXO.js → preview-content-DiSiTI85.js} +1 -1
  230. package/dist/client/assets/{preview-dialog-BHh0s5Ms.js → preview-dialog-BP-VZ8b7.js} +1 -1
  231. package/dist/client/assets/{preview-panel-HHRrVU4R.js → preview-panel-DO2qxYoE.js} +1 -1
  232. package/dist/client/assets/{preview-tab-S2hZUwsX.js → preview-tab-lvMZ2nQh.js} +3 -3
  233. package/dist/client/assets/{primitives-K9ug68v7.js → primitives-DlHl12Ki.js} +1 -1
  234. package/dist/client/assets/{product-picker-dialog-ujfDfMoL.js → product-picker-dialog-2Sh66sGp.js} +1 -1
  235. package/dist/client/assets/{profile-Dc_w4Cyx.js → profile-C-34uFVs.js} +1 -1
  236. package/dist/client/assets/project-app-view-B1Na7Y2f.js +1 -0
  237. package/dist/client/assets/project-apps-4x8kh2Th.js +1 -0
  238. package/dist/client/assets/{project-icon-CGc9ojaV.js → project-icon-BpBMspxb.js} +1 -1
  239. package/dist/client/assets/{project-index-I2IwZ_L4.js → project-index-Dn8Lu82V.js} +1 -1
  240. package/dist/client/assets/project-reports-BKA5CwLs.js +1 -0
  241. package/dist/client/assets/project-tasks-DII3t9E-.js +1 -0
  242. package/dist/client/assets/projects-COEtC32s.js +1 -0
  243. package/dist/client/assets/{projects-empty-state-B5Z0ROP0.js → projects-empty-state-BaKUbZwF.js} +1 -1
  244. package/dist/client/assets/{prompts-DQItNyVW.js → prompts-BEx4mqMN.js} +1 -1
  245. package/dist/client/assets/record-editor-B5MUcK8d.js +1 -0
  246. package/dist/client/assets/redirect-editor-v_D7tsUa.js +1 -0
  247. package/dist/client/assets/{reports-B3-NqRd1.js → reports-CY9b4q7t.js} +1 -1
  248. package/dist/client/assets/reports-Dc_GbY37.js +1 -0
  249. package/dist/client/assets/reports-onboarding-B78MfFt5.js +1 -0
  250. package/dist/client/assets/reports-tab-DgzPfqIC.js +2 -0
  251. package/dist/client/assets/{repositories-Cf9nYfd0.js → repositories-BFzOuUP8.js} +1 -1
  252. package/dist/client/assets/repositories-DfE1c4ns.js +1 -0
  253. package/dist/client/assets/{repository-binding-Do6sAdct.js → repository-binding-CP_PNLcQ.js} +1 -1
  254. package/dist/client/assets/{repository-picker-B9qWS0uH.js → repository-picker-DCip0P__.js} +1 -1
  255. package/dist/client/assets/{require-capability-DdgYI50p.js → require-capability-uCkyxJfa.js} +1 -1
  256. package/dist/client/assets/{required-auth-layout-BwuuU3bJ.js → required-auth-layout-B7e3rkXx.js} +1 -1
  257. package/dist/client/assets/{reset-password-CFvEOHUE.js → reset-password-Bqbu7xzH.js} +1 -1
  258. package/dist/client/assets/{resizable-DbjoRAK-.js → resizable-D75nggzL.js} +1 -1
  259. package/dist/client/assets/resolve-tab-icon-BqdaZDC9.js +1 -0
  260. package/dist/client/assets/review-settings-BU42FIg-.js +1 -0
  261. package/dist/client/assets/{role-color-AmMn6ZIX.js → role-color-CUZgXceG.js} +1 -1
  262. package/dist/client/assets/roles-BhkeI1Tk.js +1 -0
  263. package/dist/client/assets/route-BdFxUFy-.js +1 -0
  264. package/dist/client/assets/route-C_hx8Usp.js +1 -0
  265. package/dist/client/assets/route-CvQ9iNjI.js +1 -0
  266. package/dist/client/assets/{route-page-header-D8CuFczr.js → route-page-header-B8C1ZRVD.js} +1 -1
  267. package/dist/client/assets/{sandbox-git-api-B3EnJ01P.js → sandbox-git-api-B73fIbEU.js} +1 -1
  268. package/dist/client/assets/{sandbox-lifecycle-context-BiHehEOC.js → sandbox-lifecycle-context-3zZM02yQ.js} +1 -1
  269. package/dist/client/assets/{save-status-DEylj8_h.js → save-status-5VKYddaB.js} +1 -1
  270. package/dist/client/assets/{schema-C9B5bAQC.js → schema-Bbiw44C-.js} +1 -1
  271. package/dist/client/assets/schema-BmYiAOGn.js +1 -0
  272. package/dist/client/assets/{scroll-area-BSx_oSJx.js → scroll-area-ZYmkOMr8.js} +1 -1
  273. package/dist/client/assets/{search-input-DE_voviB.js → search-input-Dfgi3Bm0.js} +1 -1
  274. package/dist/client/assets/{search-toggle-DeMaHCKK.js → search-toggle-Bt9uO9z1.js} +1 -1
  275. package/dist/client/assets/{secret-picker-Dslhp0Eb.js → secret-picker-35tY3ayS.js} +1 -1
  276. package/dist/client/assets/{secrets-BFU0jWBM.js → secrets-CTezjK3j.js} +1 -1
  277. package/dist/client/assets/{section-array-field-dPI_sYd7.js → section-array-field-D3J7UHmj.js} +1 -1
  278. package/dist/client/assets/{sections-BCyCfgtK.js → sections-CsKHN4VK.js} +1 -1
  279. package/dist/client/assets/sections-editor-bf1W6507.js +1 -0
  280. package/dist/client/assets/{select-Chdk1xe9.js → select-CKa1YoCw.js} +1 -1
  281. package/dist/client/assets/{select-model-DNsDO7Yn.js → select-model-BzdKMpAz.js} +1 -1
  282. package/dist/client/assets/{seo-editor-ByqHZOIr.js → seo-editor-RhNyCqwO.js} +1 -1
  283. package/dist/client/assets/{separator-CnEC83tf.js → separator-CmEbryS6.js} +1 -1
  284. package/dist/client/assets/{session-runtime-fXa5psFL.js → session-runtime-DZiu3uM2.js} +1 -1
  285. package/dist/client/assets/settings-tab-DgRCBiDm.js +1 -0
  286. package/dist/client/assets/{sheet-XJvcudCi.js → sheet-BDbcvRnu.js} +1 -1
  287. package/dist/client/assets/shell-layout-Lgn8VLZ9.js +1 -0
  288. package/dist/client/assets/{site-draft-actions-BJiaSwYy.js → site-draft-actions-LxERm8rz.js} +5 -5
  289. package/dist/client/assets/{site-draft-view-9aqy4RF0.js → site-draft-view-Dzyq1aKZ.js} +1 -1
  290. package/dist/client/assets/site-editor-DVvyNYht.js +1 -0
  291. package/dist/client/assets/site-editor-toast-QCYxwt4C.js +1 -0
  292. package/dist/client/assets/skills-D2pt05Zp.js +1 -0
  293. package/dist/client/assets/{slider-DaeRBQVD.js → slider-B257IOM8.js} +1 -1
  294. package/dist/client/assets/{sortable.esm-BulVoRsH.js → sortable.esm-6QfVcWZZ.js} +1 -1
  295. package/dist/client/assets/{sso-ptIJoXni.js → sso-QEHyu29Q.js} +1 -1
  296. package/dist/client/assets/{suggestion-DoHjrPPW.js → suggestion-DXAVxjkm.js} +1 -1
  297. package/dist/client/assets/{super-agent-icon-VandTz-0.js → super-agent-icon-Be9GDxp7.js} +1 -1
  298. package/dist/client/assets/{switch-6JKp3FKO.js → switch-DgvZdTyU.js} +1 -1
  299. package/dist/client/assets/{synced-repos-DJpcOxmB.js → synced-repos-CsgMx0Ny.js} +1 -1
  300. package/dist/client/assets/{tab-icon-glyph-BMUkOrax.js → tab-icon-glyph-UH4S7mUc.js} +1 -1
  301. package/dist/client/assets/{table-Dqj9d5ax.js → table-ChqekQnS.js} +1 -1
  302. package/dist/client/assets/{tabs-CT50lxBB.js → tabs-DV8AQUwT.js} +1 -1
  303. package/dist/client/assets/{task-board-DNboqZMy.js → task-board-DQX_apb8.js} +1 -1
  304. package/dist/client/assets/{task-key-DgbGUF2j.js → task-key-rSXWMPFP.js} +1 -1
  305. package/dist/client/assets/{task-route-DUKKS-kP.js → task-route-KYQNiD-8.js} +1 -1
  306. package/dist/client/assets/{task-status-BadjzsyY.js → task-status-CadzUBkc.js} +1 -1
  307. package/dist/client/assets/{taskboard-analytics-PY56GOP9.js → taskboard-analytics-B1Tn3vRG.js} +1 -1
  308. package/dist/client/assets/tasks-BBJAHV_M.js +1 -0
  309. package/dist/client/assets/{tasks-BXwt_hky.js → tasks-D0Ct-0ZT.js} +1 -1
  310. package/dist/client/assets/{textarea-C3LFFo0w.js → textarea-DCWhTUrR.js} +1 -1
  311. package/dist/client/assets/thread-analytics-BXz4d40L.js +1 -0
  312. package/dist/client/assets/{thread-button-CrjY15ns.js → thread-button-CkP3AL0P.js} +1 -1
  313. package/dist/client/assets/{thread-intent-j3i3V7mR.js → thread-intent-BsMPgCKi.js} +1 -1
  314. package/dist/client/assets/{thread-route-DY_UV0gu.js → thread-route-El3oNOnD.js} +1 -1
  315. package/dist/client/assets/thread-route-wZnmBpi8.js +1 -0
  316. package/dist/client/assets/{thread-sheet-body-DE05uWNv.js → thread-sheet-body-By8H92hw.js} +1 -1
  317. package/dist/client/assets/{time-range-picker-Bbk_8gb1.js → time-range-picker-svLFcXAw.js} +1 -1
  318. package/dist/client/assets/{toggle-group-CbJrGPYf.js → toggle-group-fJYx0W9h.js} +1 -1
  319. package/dist/client/assets/{tool-set-selector-z6gFzWDr.js → tool-set-selector-7nHtwp8O.js} +1 -1
  320. package/dist/client/assets/{toolbar-icon-button-CEZ74wIz.js → toolbar-icon-button-DIm3azB_.js} +1 -1
  321. package/dist/client/assets/{tooltip-BnL5r8Gv.js → tooltip-B3-v7v0W.js} +1 -1
  322. package/dist/client/assets/{tooltipContext-DvsqpzJf.js → tooltipContext-oNzr-fXK.js} +1 -1
  323. package/dist/client/assets/{track-PLvkvo8B.js → track-C9EcyFLh.js} +1 -1
  324. package/dist/client/assets/{types-9tZ4hN1z.js → types-6-Ps6AGR.js} +1 -1
  325. package/dist/client/assets/{url-slug-C2KUvR2X.js → url-slug-3v4BmBw0.js} +1 -1
  326. package/dist/client/assets/{usage-stats-DX8XXFQ9.js → usage-stats-njGMuDih.js} +1 -1
  327. package/dist/client/assets/{use-ai-providers-pXYGEzkI.js → use-ai-providers-DFv4_P6Z.js} +1 -1
  328. package/dist/client/assets/{use-api-keys-B03kdPI3.js → use-api-keys-PZMcZPlt.js} +1 -1
  329. package/dist/client/assets/use-apply-named-rule-B8KW11JW.js +1 -0
  330. package/dist/client/assets/use-ask-in-chat-Dxj79lpz.js +1 -0
  331. package/dist/client/assets/{use-automations-D6sS4b2K.js → use-automations-DD1lNWAq.js} +1 -1
  332. package/dist/client/assets/{use-autosave-ONtBLfOU.js → use-autosave-DBAueSyZ.js} +1 -1
  333. package/dist/client/assets/use-blocks-v8-project-DjyJGATt.js +1 -0
  334. package/dist/client/assets/use-blog-view-B9cmKJN3.js +1 -0
  335. package/dist/client/assets/{use-chat-layout-state-BNCeIaIM.js → use-chat-layout-state-CAIrZGnL.js} +1 -1
  336. package/dist/client/assets/{use-cms-publish-actions-DMDZLoe0.js → use-cms-publish-actions-Dq9NhEOB.js} +1 -1
  337. package/dist/client/assets/{use-connect-companion-Ez7z63oH.js → use-connect-companion-CLP35iDK.js} +1 -1
  338. package/dist/client/assets/{use-connection-D5_bE1jX.js → use-connection-CYsyXyy7.js} +1 -1
  339. package/dist/client/assets/{use-content-sync-D4PlAahX.js → use-content-sync-DWcjd7N0.js} +1 -1
  340. package/dist/client/assets/{use-copy-BRwsGSGM.js → use-copy-BStTcLWM.js} +1 -1
  341. package/dist/client/assets/{use-current-view-0HWp9lHl.js → use-current-view-Cn9H-KAc.js} +1 -1
  342. package/dist/client/assets/{use-date-fns-locale-DiJmvXQv.js → use-date-fns-locale-CSKjWaLe.js} +1 -1
  343. package/dist/client/assets/{use-debounced-autosave-BmZISibb.js → use-debounced-autosave-BudnGn2r.js} +1 -1
  344. package/dist/client/assets/{use-debounced-value-Dw3dFt4C.js → use-debounced-value-Dcq0NTAp.js} +1 -1
  345. package/dist/client/assets/{use-deco-credits-r1_nX8wr.js → use-deco-credits-D9t5Q-Ms.js} +1 -1
  346. package/dist/client/assets/{use-decopilot-events-B1JmbrrX.js → use-decopilot-events-DsEAOvda.js} +1 -1
  347. package/dist/client/assets/{use-delete-block-DDUTXhNF.js → use-delete-block-BZCQAK3P.js} +1 -1
  348. package/dist/client/assets/{use-delete-connection-C3dK-V2D.js → use-delete-connection-CBkpbZja.js} +1 -1
  349. package/dist/client/assets/{use-deployment-admin-KnQTKRss.js → use-deployment-admin-HoxFQgZ9.js} +1 -1
  350. package/dist/client/assets/{use-entitlements-DIoZnc_q.js → use-entitlements-BzKQLk_u.js} +1 -1
  351. package/dist/client/assets/{use-fast-preview-draft-url-D9LB_eIt.js → use-fast-preview-draft-url-tiq51pbg.js} +1 -1
  352. package/dist/client/assets/{use-file-configs-I6vvS9gB.js → use-file-configs-Caaj88sr.js} +1 -1
  353. package/dist/client/assets/{use-id-selection-BAv2DcG7.js → use-id-selection-D0jc_Dy0.js} +1 -1
  354. package/dist/client/assets/{use-in-settings-DxzX6GVb.js → use-in-settings-D-n4dJvM.js} +1 -1
  355. package/dist/client/assets/{use-inbox-feed-BwP3VnzE.js → use-inbox-feed-7Rm2Mjtr.js} +1 -1
  356. package/dist/client/assets/{use-infinite-scroll-DZHKJp2V.js → use-infinite-scroll-f5g_Vpk-.js} +1 -1
  357. package/dist/client/assets/{use-join-requests-DqFzxVX_.js → use-join-requests-Cu6LZvjE.js} +1 -1
  358. package/dist/client/assets/{use-main-panel-tabs-D2eQ46eC.js → use-main-panel-tabs-Ch-_m9wA.js} +1 -1
  359. package/dist/client/assets/{use-mcp-auth-status-C6_TAde2.js → use-mcp-auth-status-CrggBiFo.js} +1 -1
  360. package/dist/client/assets/{use-mcp-client-Bg8mQo9f.js → use-mcp-client-CCT6q-zj.js} +1 -1
  361. package/dist/client/assets/{use-mcp-prompts-DPiL3LQv.js → use-mcp-prompts-Bxssn6xT.js} +1 -1
  362. package/dist/client/assets/{use-mcp-tools-C5OR9KZ9.js → use-mcp-tools-CdypNtPV.js} +1 -1
  363. package/dist/client/assets/{use-mobile-IMVhNYT_.js → use-mobile-Dyvncftm.js} +1 -1
  364. package/dist/client/assets/{use-move-blocks-BVaiu02r.js → use-move-blocks-pw3TQRyc.js} +1 -1
  365. package/dist/client/assets/{use-navigate-to-agent-WJ7w-8ZZ.js → use-navigate-to-agent-0M4hsJnf.js} +1 -1
  366. package/dist/client/assets/{use-never-published-DpnSCkDS.js → use-never-published-BsVhVpS1.js} +1 -1
  367. package/dist/client/assets/{use-org-fs-C4V7-QNj.js → use-org-fs-CyfRrBTl.js} +1 -1
  368. package/dist/client/assets/{use-org-notice-DOVWyuaL.js → use-org-notice-BeUR_ZGA.js} +1 -1
  369. package/dist/client/assets/{use-org-repo-syncs-BukrXch8.js → use-org-repo-syncs-DvcdTgrS.js} +1 -1
  370. package/dist/client/assets/{use-org-sso-D7w6nhfD.js → use-org-sso-BOOKyOjL.js} +1 -1
  371. package/dist/client/assets/use-organization-settings-BEn5xJKT.js +1 -0
  372. package/dist/client/assets/{use-panel-navigate-CkYTugDF.js → use-panel-navigate-DzpMtCDM.js} +1 -1
  373. package/dist/client/assets/{use-project-native-view-presence-CkqC328s.js → use-project-native-view-presence-D4Mhq-72.js} +1 -1
  374. package/dist/client/assets/{use-project-scope-DwQViH2f.js → use-project-scope-DdM0t1xa.js} +1 -1
  375. package/dist/client/assets/{use-recent-apps-4wYjA0CX.js → use-recent-apps-BclKHbIs.js} +1 -1
  376. package/dist/client/assets/{use-reports-diagnostic-DKW88lIw.js → use-reports-diagnostic-BAbQPKnw.js} +1 -1
  377. package/dist/client/assets/use-sandbox-events-CdcsfdkO.js +2 -0
  378. package/dist/client/assets/{use-secrets-BW5HFrjP.js → use-secrets-LrCR8jto.js} +1 -1
  379. package/dist/client/assets/{use-section-preview-base-D61lHpgT.js → use-section-preview-base-CiQHlYOM.js} +1 -1
  380. package/dist/client/assets/{use-sidebar-collapsed-CvPku1YI.js → use-sidebar-collapsed-CiqzdmQp.js} +1 -1
  381. package/dist/client/assets/{use-tags-B-VIOJFl.js → use-tags-B6rjUKRX.js} +1 -1
  382. package/dist/client/assets/{use-task-board-analytics-pNXfpx7q.js → use-task-board-analytics-B5zThTLs.js} +1 -1
  383. package/dist/client/assets/{use-task-board-item-prs-CXo3bcGf.js → use-task-board-item-prs-QwsxzHpc.js} +1 -1
  384. package/dist/client/assets/{use-task-board-items-CygST8NV.js → use-task-board-items-B0KeELtH.js} +1 -1
  385. package/dist/client/assets/{use-task-board-prompts-DYeH1UKB.js → use-task-board-prompts-DjkyWndN.js} +1 -1
  386. package/dist/client/assets/{use-task-metadata-BKyg4fwU.js → use-task-metadata-DRyTcJBf.js} +1 -1
  387. package/dist/client/assets/{use-thread-outputs-U0o_TC58.js → use-thread-outputs-U5yvy3ti.js} +1 -1
  388. package/dist/client/assets/{use-view-draft-kind-DrDbO3-P.js → use-view-draft-kind-C2cwPb-d.js} +1 -1
  389. package/dist/client/assets/{use-voice-input-ChVzBkTC.js → use-voice-input-D_lO17n9.js} +1 -1
  390. package/dist/client/assets/useInfiniteQuery-BIIkqC2p.js +1 -0
  391. package/dist/client/assets/{useQueries-Cmvk9UMI.js → useQueries-C-94_zeU.js} +1 -1
  392. package/dist/client/assets/useSuspenseInfiniteQuery-B5PirUR6.js +1 -0
  393. package/dist/client/assets/{users-S8nniBNq.js → users-D4cUiO-M.js} +1 -1
  394. package/dist/client/assets/{utils-CalvUBc1.js → utils-CWN91Q0R.js} +1 -1
  395. package/dist/client/assets/variant-calendar-DHFpb0p3.js +1 -0
  396. package/dist/client/assets/{variant-matcher-override-DY5ZfO62.js → variant-matcher-override-GbUOkJxx.js} +1 -1
  397. package/dist/client/assets/{view-header-Dlc9W8Ql.js → view-header-BZNgPIdK.js} +1 -1
  398. package/dist/client/assets/{virtual-mcp-BYga37_3.js → virtual-mcp-jT57t8xN.js} +1 -1
  399. package/dist/client/assets/{watch-sse-pool-DdE7kwP2.js → watch-sse-pool-CrHa0Ln_.js} +1 -1
  400. package/dist/client/index.html +2 -2
  401. package/dist/server/migrate.js +210 -210
  402. package/dist/server/server.js +693 -693
  403. package/package.json +1 -1
  404. package/dist/client/assets/TrendUp01-CdeGaAD9.js +0 -1
  405. package/dist/client/assets/agent-app-zt9yWAWY.js +0 -1
  406. package/dist/client/assets/agent-assets-B4BoOCbn.js +0 -1
  407. package/dist/client/assets/agent-automations-CR47ElS_.js +0 -1
  408. package/dist/client/assets/agent-blog-kn7H8WW9.js +0 -2
  409. package/dist/client/assets/agent-blog-post-CWEMwEqA.js +0 -2
  410. package/dist/client/assets/agent-calendar-DER04lJC.js +0 -1
  411. package/dist/client/assets/agent-connect-sources-BBjozm2U.js +0 -1
  412. package/dist/client/assets/agent-deck-DD0U8VAD.js +0 -1
  413. package/dist/client/assets/agent-e2e-CQFRJ0Om.js +0 -1
  414. package/dist/client/assets/agent-experiments-Dz3AvJ4-.js +0 -1
  415. package/dist/client/assets/agent-file-CpVkBu0J.js +0 -1
  416. package/dist/client/assets/agent-hosting-BFGfgXWM.js +0 -1
  417. package/dist/client/assets/agent-icon-SasBmPrY.js +0 -1
  418. package/dist/client/assets/agent-library-Cn9MXoTF.js +0 -1
  419. package/dist/client/assets/agent-library-file-CafoXKvT.js +0 -1
  420. package/dist/client/assets/agent-overview-9j5_NkHV.js +0 -1
  421. package/dist/client/assets/agent-settings-e6iND6rW.js +0 -1
  422. package/dist/client/assets/agent-site-editor-code-Detw-R2f.js +0 -2
  423. package/dist/client/assets/agent-site-editor-content-BeFIR9Nd.js +0 -1
  424. package/dist/client/assets/agent-site-editor-preview-B4G1bvsT.js +0 -1
  425. package/dist/client/assets/agent-view-CHrkfSe7.js +0 -1
  426. package/dist/client/assets/api-keys-CtDwFEqi.js +0 -1
  427. package/dist/client/assets/app-editor-aGklcq_V.js +0 -1
  428. package/dist/client/assets/automations-CJM7s6OS.js +0 -1
  429. package/dist/client/assets/category-editor-Btv0sSPl.js +0 -1
  430. package/dist/client/assets/choose-editor-DQyXDHRD.js +0 -1
  431. package/dist/client/assets/cms-settings-editor-CHvYFO6g.js +0 -1
  432. package/dist/client/assets/collection-detail-GsM61XEt.js +0 -1
  433. package/dist/client/assets/connection-detail-CQX5UnUU.js +0 -1
  434. package/dist/client/assets/connections-CUnudfuh.js +0 -1
  435. package/dist/client/assets/context-BzsV0hxX.js +0 -1
  436. package/dist/client/assets/file-explorer-D_6SsDXA.js +0 -2
  437. package/dist/client/assets/general-CAva67lN.js +0 -1
  438. package/dist/client/assets/home-5ZWRmhLp.js +0 -1
  439. package/dist/client/assets/index-B5WGiIKx.js +0 -4
  440. package/dist/client/assets/index-BU3n1igW.js +0 -1
  441. package/dist/client/assets/index-C4wvi2v7.css +0 -1
  442. package/dist/client/assets/library-D6WcKfwU.js +0 -1
  443. package/dist/client/assets/named-rule-view-CXMDYxKO.js +0 -1
  444. package/dist/client/assets/openai-conversation-Cc0ggxu_.js +0 -3
  445. package/dist/client/assets/plan-Basau5px.js +0 -1
  446. package/dist/client/assets/post-calendar-CkZvvgA_.js +0 -1
  447. package/dist/client/assets/project-app-view-mLEnCg4s.js +0 -1
  448. package/dist/client/assets/project-apps-C4vT9LXH.js +0 -1
  449. package/dist/client/assets/project-reports-BlDDRtjQ.js +0 -1
  450. package/dist/client/assets/project-tasks-DpoEijNI.js +0 -1
  451. package/dist/client/assets/projects-BQZSr4gE.js +0 -1
  452. package/dist/client/assets/record-editor-BOQ2W0wP.js +0 -1
  453. package/dist/client/assets/redirect-editor-BrgJRHSk.js +0 -1
  454. package/dist/client/assets/reports-Bsc_XwTm.js +0 -1
  455. package/dist/client/assets/reports-onboarding-Beggk42B.js +0 -1
  456. package/dist/client/assets/reports-tab-CQP_rzUZ.js +0 -2
  457. package/dist/client/assets/repositories-CfgaBNdf.js +0 -1
  458. package/dist/client/assets/resolve-tab-icon-zc5Xnngt.js +0 -1
  459. package/dist/client/assets/review-settings-C_jx0NLX.js +0 -1
  460. package/dist/client/assets/roles-b_L0oOYd.js +0 -1
  461. package/dist/client/assets/route-Bahv9n22.js +0 -1
  462. package/dist/client/assets/route-D2bkX53_.js +0 -1
  463. package/dist/client/assets/route-Da-mMBjf.js +0 -1
  464. package/dist/client/assets/schema-DiSJ8SEc.js +0 -1
  465. package/dist/client/assets/sections-editor-CD9jVbGW.js +0 -1
  466. package/dist/client/assets/settings-tab-DG4z8CKo.js +0 -1
  467. package/dist/client/assets/shell-layout-CuBXiCpv.js +0 -1
  468. package/dist/client/assets/site-editor-BSb_9CNK.js +0 -1
  469. package/dist/client/assets/site-editor-toast-C2OaHizl.js +0 -1
  470. package/dist/client/assets/skills-DQnklyjk.js +0 -1
  471. package/dist/client/assets/tasks-74JzN4W9.js +0 -1
  472. package/dist/client/assets/thread-analytics-BmSAMduA.js +0 -1
  473. package/dist/client/assets/thread-route-DGrdxDp1.js +0 -1
  474. package/dist/client/assets/use-apply-named-rule-Cc4ACfQP.js +0 -1
  475. package/dist/client/assets/use-ask-in-chat-B6pTgaei.js +0 -1
  476. package/dist/client/assets/use-blocks-v8-project-z5uA6d0S.js +0 -1
  477. package/dist/client/assets/use-blog-view-BHifDign.js +0 -1
  478. package/dist/client/assets/use-organization-settings-BmAIEgEL.js +0 -1
  479. package/dist/client/assets/use-sandbox-events-DwjSc3R2.js +0 -2
  480. package/dist/client/assets/useInfiniteQuery-B5jgBAwp.js +0 -1
  481. package/dist/client/assets/useSuspenseInfiniteQuery-D3Nn_2Nf.js +0 -1
  482. package/dist/client/assets/variant-calendar-C-1HVzQo.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-d8C00Vbh.js","assets/index-C6-0Ff1m.js","assets/index-C4wvi2v7.css","assets/editor-BR1a7qGD.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
- import{r as R,b8 as Ue,c as W,b as X,m as ne,j as s,B as K,b5 as ye,h as je,I as ge,t as Pe,aY as ve,a9 as Oe,bx as Ke,n as We,by as ce,bz as Ge,e as He,bo as Se,bA as pe,bl as Te,bm as Ye,bn as he}from"./index-C6-0Ff1m.js";import{C as qe,c as Xe,a as Ze,S as Qe,M as es,v as ss}from"./held-block-view-ByNmqPhe.js";import{b as Le}from"./use-never-published-DpnSCkDS.js";import{c as ts,u as ns}from"./hosted-reconcile-CgC-Mb3M.js";import{b as ls,a as as}from"./repository-binding-Do6sAdct.js";import{b as $e}from"./UserCheck01-DLUgjW3m.js";import{K as Ae,e as os,U as is,Z as rs}from"./agent-icon-SasBmPrY.js";import{c as cs}from"./Tool01-BpBS8dw-.js";import{i as ds}from"./SearchMd-Cw05gj7E.js";import{L as _e}from"./label-Cq7ohFeR.js";import{S as us}from"./switch-6JKp3FKO.js";import{T as fs}from"./textarea-C3LFFo0w.js";import{u as ms}from"./use-copy-BRwsGSGM.js";import{D as xs}from"./section-array-field-dPI_sYd7.js";import{a2 as ps,a3 as ke,a4 as hs,a5 as Ee,w as bs,q as vs}from"./site-editor-toast-C2OaHizl.js";import{X as ys,Y as js,O as ze,x as gs,Z as ks,_ as Ns}from"./blocks-tab-states-CmsgKSWv.js";import{X as Ss}from"./category-tree-CUP3rQKK.js";import{i as Ts}from"./ChevronSelectorVertical-CmQsMnAL.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-CjjWneJ9.js";import{a as Rs,b as Ps,P as Os}from"./popover-DTBVeUtG.js";import{u as Ls}from"./chat-context-BXxmldjV.js";import{a as $s}from"./MessageCircle01-D1dT92x6.js";import{i as As}from"./Play-JVQd8C8L.js";import{S as zs}from"./scroll-area-BSx_oSJx.js";import{c as ue,T as fe,a as me}from"./tooltip-BnL5r8Gv.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-d8C00Vbh.js";import{S as Is}from"./save-status-DEylj8_h.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-d8C00Vbh.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=X(),{handleCopy:a,copied:i}=ms();let r;e[0]!==n?(r=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(cs,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let x;e[3]!==t?(x=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=x):x=e[4];let b;e[5]!==x?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:x}),e[5]=x,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let p;e[9]!==h?(p=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=p):p=e[10];let y;e[11]!==b||e[12]!==p?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,p]})]}),e[11]=b,e[12]=p,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==i?(d=i?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=i,e[19]=d):d=e[19];let u;e[20]!==i||e[21]!==t?(u=t(i?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=i,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==i||e[28]!==t?(g=i?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=i,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let w;e[42]!==k||e[43]!==_?(w=s.jsxs("a",{href:xs,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=w):w=e[44];let T;e[45]!==v||e[46]!==w?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,w]}),e[45]=v,e[46]=w,e[47]=T):T=e[47];let C;e[48]!==c||e[49]!==j||e[50]!==T?(C=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=C):C=e[51];let B;return e[52]!==r||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:r,children:[y,C]}),e[52]=r,e[53]=C,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-oNRDmlFg.js","assets/index-D19iAD4s.js","assets/index-C9ybKZad.css","assets/editor-fCTeAQ3h.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
+ import{r as R,b8 as Ue,c as W,b as X,m as ne,j as s,B as K,b5 as ye,h as je,I as ge,t as Pe,aY as ve,a9 as Oe,bx as Ke,n as We,by as ce,bz as Ge,e as He,bo as Se,bA as pe,bl as Te,bm as Ye,bn as he}from"./index-D19iAD4s.js";import{C as qe,c as Xe,a as Qe,S as Ze,M as es,v as ss}from"./held-block-view-CYXKzDkA.js";import{b as Le}from"./use-never-published-BsVhVpS1.js";import{c as ts,u as ns}from"./hosted-reconcile-BT71cbCZ.js";import{b as ls,a as as}from"./repository-binding-CP_PNLcQ.js";import{b as $e}from"./UserCheck01-VgBUlrC3.js";import{L as Ae,e as os,V as is,_ as rs}from"./agent-icon-CF35JltL.js";import{c as cs}from"./Tool01-CldemTEe.js";import{i as ds}from"./SearchMd-FI2fcykP.js";import{L as _e}from"./label-B0UwCsXA.js";import{S as us}from"./switch-DgvZdTyU.js";import{T as fs}from"./textarea-DCWhTUrR.js";import{u as ms}from"./use-copy-BStTcLWM.js";import{D as xs}from"./section-array-field-D3J7UHmj.js";import{a2 as ps,a3 as ke,a4 as hs,a5 as Ee,w as bs,q as vs}from"./site-editor-toast-QCYxwt4C.js";import{X as ys,Y as js,O as ze,x as gs,Z as ks,_ as Ns}from"./blocks-tab-states-DDvkpFWf.js";import{X as Ss}from"./category-tree-rhKblFsZ.js";import{i as Ts}from"./ChevronSelectorVertical-DmpvIgAy.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-CALEDfdi.js";import{a as Rs,b as Ps,P as Os}from"./popover-Bm-_ILu8.js";import{u as Ls}from"./chat-context-D5EEwp_m.js";import{a as $s}from"./MessageCircle01-CDpj4jpt.js";import{i as As}from"./Play-Clz2e0s4.js";import{S as zs}from"./scroll-area-ZYmkOMr8.js";import{c as ue,T as fe,a as me}from"./tooltip-B3-v7v0W.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-oNRDmlFg.js";import{S as Is}from"./save-status-5VKYddaB.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-oNRDmlFg.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=X(),{handleCopy:a,copied:i}=ms();let r;e[0]!==n?(r=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(cs,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let x;e[3]!==t?(x=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=x):x=e[4];let b;e[5]!==x?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:x}),e[5]=x,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let p;e[9]!==h?(p=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=p):p=e[10];let y;e[11]!==b||e[12]!==p?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,p]})]}),e[11]=b,e[12]=p,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==i?(d=i?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=i,e[19]=d):d=e[19];let u;e[20]!==i||e[21]!==t?(u=t(i?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=i,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==i||e[28]!==t?(g=i?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=i,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let w;e[42]!==k||e[43]!==_?(w=s.jsxs("a",{href:xs,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=w):w=e[44];let T;e[45]!==v||e[46]!==w?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,w]}),e[45]=v,e[46]=w,e[47]=T):T=e[47];let C;e[48]!==c||e[49]!==j||e[50]!==T?(C=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=C):C=e[51];let B;return e[52]!==r||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:r,children:[y,C]}),e[52]=r,e[53]=C,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
3
3
  `)||n.length>80,e[0]=n,e[1]=a):a=e[1];const[i]=R.useState(a);let r;return e[2]!==l||e[3]!==i||e[4]!==t||e[5]!==n?(r=i?s.jsx(fs,{id:l,value:n,rows:Math.min(8,Math.max(3,n.split(`
4
- `).length)),onChange:f=>t(f.target.value)}):s.jsx(ge,{id:l,value:n,onChange:f=>t(f.target.value)}),e[2]=l,e[3]=i,e[4]=t,e[5]=n,e[6]=r):r=e[6],r}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=X(),[i,r]=R.useState(String(n));let f;e[0]!==i?(f=Ee(i),e[0]=i,e[1]=f):f=e[1];const x=f===null;let b;e[2]!==t?(b=m=>{r(m.target.value);const d=Ee(m.target.value);d!==null&&t(d)},e[2]=t,e[3]=b):b=e[3];let h;e[4]!==l||e[5]!==x||e[6]!==b||e[7]!==i?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:i,"aria-invalid":x,onChange:b}),e[4]=l,e[5]=x,e[6]=b,e[7]=i,e[8]=h):h=e[8];let p;e[9]!==x||e[10]!==a?(p=x&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=x,e[10]=a,e[11]=p):p=e[11];let y;return e[12]!==h||e[13]!==p?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,p]}),e[12]=h,e[13]=p,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:i}=o,r=X();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const x=f;if(typeof n=="boolean"){let m;e[2]!==x||e[3]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[2]=x,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==i||e[6]!==t?(d=g=>i(t,g),e[5]=i,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==x||e[9]!==d||e[10]!==n?(u=s.jsx(us,{id:x,checked:n,onCheckedChange:d}),e[8]=x,e[9]=d,e[10]=n,e[11]=u):u=e[11];let c;return e[12]!==m||e[13]!==u?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,u]}),e[12]=m,e[13]=u,e[14]=c):c=e[14],c}if(typeof n=="string"||typeof n=="number"){let m;e[15]!==x||e[16]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[15]=x,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==x||e[19]!==i||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:x,value:n,onChange:c=>i(t,c)}):s.jsx(Ks,{id:x,value:n,onChange:c=>i(t,c)}),e[18]=x,e[19]=i,e[20]=t,e[21]=n,e[22]=d):d=e[22];let u;return e[23]!==m||e[24]!==d?(u=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,d]}),e[23]=m,e[24]=d,e[25]=u):u=e[25],u}if(Array.isArray(n)||te(n)){let m,d,u,c,g;if(e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==t||e[30]!==r||e[31]!==n){const E=Array.isArray(n)?n.map((T,C)=>[Ds(T,C,r),T,C]):Object.entries(n).filter(Gs).map(Ws),k=te(n)&&typeof n.__resolveType=="string"?n.__resolveType:null;u=a===0,c="group rounded-md border border-border";let S;e[37]!==l?(S=s.jsx("span",{className:"min-w-0 truncate",children:l}),e[37]=l,e[38]=S):S=e[38];let N;e[39]!==k?(N=k&&s.jsx("span",{className:"min-w-0 truncate font-mono text-xs font-normal text-muted-foreground",title:k,children:ke(k)}),e[39]=k,e[40]=N):N=e[40];let _;e[41]!==r||e[42]!==n?(_=Array.isArray(n)?r("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=r,e[42]=n,e[43]=_):_=e[43];let w;e[44]!==_?(w=s.jsx("span",{className:"ml-auto shrink-0 text-xs font-normal text-muted-foreground",children:_}),e[44]=_,e[45]=w):w=e[45],e[46]!==w||e[47]!==S||e[48]!==N?(g=s.jsxs("summary",{className:"flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-sm font-medium text-foreground",children:[S,N,w]}),e[46]=w,e[47]=S,e[48]=N,e[49]=g):g=e[49],m="flex flex-col gap-4 border-t border-border px-3 py-3",d=E.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.schemaless.empty")}):E.map(T=>{const[C,B,O]=T;return s.jsx(Me,{label:C,value:B,path:[...t,O],depth:a+1,onChange:i},O)}),e[26]=a,e[27]=l,e[28]=i,e[29]=t,e[30]=r,e[31]=n,e[32]=m,e[33]=d,e[34]=u,e[35]=c,e[36]=g}else m=e[32],d=e[33],u=e[34],c=e[35],g=e[36];let j;e[50]!==m||e[51]!==d?(j=s.jsx("div",{className:m,children:d}),e[50]=m,e[51]=d,e[52]=j):j=e[52];let v;return e[53]!==u||e[54]!==c||e[55]!==g||e[56]!==j?(v=s.jsxs("details",{open:u,className:c,children:[g,j]}),e[53]=u,e[54]=c,e[55]=g,e[56]=j,e[57]=v):v=e[57],v}let b;e[58]!==l?(b=s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:l}),e[58]=l,e[59]=b):b=e[59];let h;e[60]!==r?(h=r("sandbox.schemaless.notSet"),e[60]=r,e[61]=h):h=e[61];let p;e[62]!==h?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=p):p=e[63];let y;return e[64]!==b||e[65]!==p?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,p]}),e[64]=b,e[65]=p,e[66]=y):y=e[66],y}function Ws(o){const[e,l]=o;return[e,l,e]}function Gs(o){const[e]=o;return e!=="__resolveType"}function Hs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=X(),[i,r]=R.useState(()=>(t?.(o),e)),[f,x]=R.useState(0),[b,h]=R.useState(null),[p,y]=R.useState(!1),m=v=>{r(v),l(o,v)},d=typeof i.__resolveType=="string"?i.__resolveType:null,u=Object.entries(i).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),x(v=>v+1)):h(JSON.stringify(i,null,2))},g=v=>{try{const E=JSON.parse(v??"");if(te(E)){y(!1),m(E);return}}catch{}y(!0)},j=a(b!==null?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson");return s.jsxs("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[n&&s.jsxs(K,{variant:"ghost",size:"sm",className:"shrink-0",onClick:n,children:[s.jsx($e,{"aria-hidden":"true"}),a("sandbox.schemaless.back")]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("h3",{className:"truncate text-sm font-medium",title:o,children:o}),d&&s.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:d,children:d})]}),s.jsx(K,{variant:b!==null?"default":"ghost",size:"icon",className:"shrink-0",onClick:c,"aria-label":j,"aria-pressed":b!==null,title:j,children:b!==null?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})]}),s.jsxs("div",{className:"relative min-h-0 flex-1",children:[s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("form",{"aria-label":o,className:"mx-auto flex max-w-2xl flex-col gap-4 px-6 py-4",onSubmit:v=>v.preventDefault(),children:u.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.schemaless.empty")}):u.map(([v,E])=>s.jsx(Me,{label:v,value:E,path:[v],depth:0,onChange:(k,S)=>m(hs(i,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[p&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:a("sandbox.savedSectionEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),children:s.jsx(Ms,{language:"json",height:"100%",code:b,onChange:g})})})]})]})]})}function Ys(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:i,v8:r,copyEpochOf:f,site:x,initialKey:b,compact:h}=o,p=r===void 0?!1:r,y=x===void 0?null:x,m=b===void 0?null:b,d=h===void 0?!1:h,u=X(),[c,g]=R.useState(m&&te(l[m])?m:null),[j,v]=R.useState("");let E;e[0]!==t||e[1]!==a||e[2]!==c||e[3]!==p?(E=A=>{A!==c&&(t?.(),!p&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=p,e[4]=E):E=e[4];const k=E;let S;e[5]!==f||e[6]!==c?(S=c?f?.(c)??0:0,e[5]=f,e[6]=c,e[7]=S):S=e[7];const N=S,[_,w]=R.useState(N);_!==N&&(w(N),!p&&c!==null&&a?.(c));const T=c?l[c]:void 0;let C,B,O,J,P;if(e[8]!==d||e[9]!==l||e[10]!==j||e[11]!==k||e[12]!==c||e[13]!==u){const A=j.trim().toLowerCase(),F=ps(l).map(M=>({...M,blocks:A?M.blocks.filter(U=>U.label.toLowerCase().includes(A)||U.key.toLowerCase().includes(A)||(M.resolveType??"").toLowerCase().includes(A)):M.blocks})).filter(qs),xe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const re=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==re?(C=ne("flex min-h-0 flex-col",re),e[21]=re,e[22]=C):C=e[22];let se;e[23]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(ds,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),e[23]=se):se=e[23];let ae;e[24]===Symbol.for("react.memo_cache_sentinel")?(ae=M=>v(M.target.value),e[24]=ae):ae=e[24];let Y;e[25]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=Y):Y=e[26];let q;e[27]!==u?(q=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=q):q=e[28],e[29]!==j||e[30]!==Y||e[31]!==q?(B=s.jsx("div",{className:"shrink-0 border-b p-2",children:s.jsxs("div",{className:"relative",children:[se,s.jsx(ge,{type:"search",value:j,onChange:ae,placeholder:Y,"aria-label":q,className:"pl-8"})]})}),e[29]=j,e[30]=Y,e[31]=q,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=xe===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noBlocks")}):F.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noMatches")}):F.map(M=>s.jsxs("section",{"aria-label":M.resolveType??u("sandbox.schemaless.noType"),className:"py-1",children:[s.jsxs("h3",{className:"flex items-baseline gap-2 px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",title:M.resolveType??void 0,children:[s.jsx("span",{className:"truncate",children:M.resolveType?ke(M.resolveType):u("sandbox.schemaless.noType")}),s.jsx("span",{className:"ml-auto shrink-0 tabular-nums",children:M.blocks.length})]}),s.jsx("ul",{children:M.blocks.map(U=>s.jsx("li",{children:s.jsx("button",{type:"button",onClick:()=>k(U.key),"aria-current":U.key===c?"true":void 0,title:U.key,className:ne("block w-full truncate px-3 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",U.key===c&&"bg-accent font-medium"),children:U.label})},U.key))})]},M.resolveType??"")),e[8]=d,e[9]=l,e[10]=j,e[11]=k,e[12]=c,e[13]=u,e[14]=C,e[15]=B,e[16]=O,e[17]=J,e[18]=P}else C=e[14],B=e[15],O=e[16],J=e[17],P=e[18];let $;e[33]!==O||e[34]!==J?($=s.jsx("div",{className:O,children:J}),e[33]=O,e[34]=J,e[35]=$):$=e[35];let D;e[36]!==C||e[37]!==B||e[38]!==$||e[39]!==P?(D=s.jsxs("nav",{"aria-label":P,className:C,children:[B,$]}),e[36]=C,e[37]=B,e[38]=$,e[39]=P,e[40]=D):D=e[40];const I=D;let L;e[41]!==T||e[42]!==d||e[43]!==f||e[44]!==n||e[45]!==a||e[46]!==k||e[47]!==c||e[48]!==u||e[49]!==p?(L=c&&te(T)?s.jsx(Hs,{blockKey:c,block:T,onOpenBlock:p?a:void 0,onChange:n,onBack:d?()=>k(null):void 0},`${c}:${f?.(c)??0}`):s.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u("sandbox.schemaless.pickBlock")})}),e[41]=T,e[42]=d,e[43]=f,e[44]=n,e[45]=a,e[46]=k,e[47]=c,e[48]=u,e[49]=p,e[50]=L):L=e[50];const Z=L;let Q;e[51]!==Z||e[52]!==c||e[53]!==p||e[54]!==i?(Q=p&&c&&i?i(c,Z):Z,e[51]=Z,e[52]=c,e[53]=p,e[54]=i,e[55]=Q):Q=e[55];const ee=Q;let G;e[56]!==y?(G=s.jsx(Vs,{site:y}),e[56]=y,e[57]=G):G=e[57];let V;e[58]!==T||e[59]!==d||e[60]!==ee||e[61]!==I||e[62]!==c?(V=d&&c&&te(T)?ee:I,e[58]=T,e[59]=d,e[60]=ee,e[61]=I,e[62]=c,e[63]=V):V=e[63];const ie=!d&&ee;let H;e[64]!==V||e[65]!==ie?(H=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,ie]}),e[64]=V,e[65]=ie,e[66]=H):H=e[66];let le;return e[67]!==G||e[68]!==H?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,H]}),e[67]=G,e[68]=H,e[69]=le):le=e[69],le}function qs(o){return o.blocks.length>0}function At(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:i,compact:r}=o,f=ls(n)?.metadata;let x;e[0]!==f?(x=Ke(f),e[0]=f,e[1]=x):x=e[1];const b=x;let h;e[2]!==t||e[3]!==l||e[4]!==n?(h={orgSlug:l,virtualMcpId:n,branch:t},e[2]=t,e[3]=l,e[4]=n,e[5]=h):h=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={holdsCopy:!0},e[6]=p):p=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,p);let c;e[7]!==t||e[8]!==l||e[9]!==n?(c=ts({orgSlug:l,virtualMcpId:n,branch:t}),e[7]=t,e[8]=l,e[9]=n,e[10]=c):c=e[10];const g=ns(c);let j;e[11]!==m?(j=()=>m(),e[11]=m,e[12]=j):j=e[12];const v=R.useEffectEvent(j);let E;e[13]!==v?(E=()=>()=>v(),e[13]=v,e[14]=E):E=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[15]=k):k=e[15],R.useEffect(E,k);let S;e[16]!==y?(S=(w,T)=>y(w,T),e[16]=y,e[17]=S):S=e[17];let N;e[18]!==t||e[19]!==a||e[20]!==l||e[21]!==u||e[22]!==n?(N=u?(w,T)=>s.jsx(qe,{listing:a,scope:{orgSlug:l,virtualMcpId:n,branch:t},names:[w],children:T}):void 0,e[18]=t,e[19]=a,e[20]=l,e[21]=u,e[22]=n,e[23]=N):N=e[23];let _;return e[24]!==r||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==i||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(Ys,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:i,compact:r}),e[24]=r,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=i,e[30]=b,e[31]=N,e[32]=S,e[33]=u,e[34]=_):_=e[34],_}const we={resolveType:"website/pages/Page.tsx",seoResolveType:"website/sections/Seo/SeoV2.tsx"};function zt(o){return`pages-${encodeURIComponent(o)}-${crypto.randomUUID()}`}function It(o,e,l){if(bs(l))return{name:o,path:e,sections:[],__resolveType:"page"};const n=ys(l??void 0);if(!l||js(n))return{name:o,path:e,sections:[],seo:{__resolveType:we.seoResolveType},__resolveType:we.resolveType};const t=Ss(l);return{name:o,path:e,sections:[],...t?{seo:{__resolveType:t}}:{},__resolveType:n}}const Be="__blank__";function Mt(o){const e=W.c(65),{id:l,value:n,onChange:t,templates:a,disabled:i}=o,r=X(),[f,x]=R.useState(!1);let b;if(e[0]!==a||e[1]!==n){let I;e[3]!==n?(I=L=>L.key===n,e[3]=n,e[4]=I):I=e[4],b=a.find(I),e[0]=a,e[1]=n,e[2]=b}else b=e[2];const h=b;let p;e[5]!==h?.name||e[6]!==r?(p=h?.name??r("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=r,e[7]=p):p=e[7];let y;e[8]!==p?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:p}),e[8]=p,e[9]=y):y=e[9];let m;e[10]!==h?(m=h?.path?s.jsx("span",{className:"truncate text-muted-foreground",children:h.path}):null,e[10]=h,e[11]=m):m=e[11];let d;e[12]!==y||e[13]!==m?(d=s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[y,m]}),e[12]=y,e[13]=m,e[14]=d):d=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ts,{className:"shrink-0 opacity-50"}),e[15]=u):u=e[15];let c;e[16]!==i||e[17]!==l||e[18]!==f||e[19]!==d?(c=s.jsx(Rs,{asChild:!0,children:s.jsxs(K,{id:l,type:"button",variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=i,e[17]=l,e[18]=f,e[19]=d,e[20]=c):c=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[21]=g):g=e[21];let j;e[22]!==r?(j=r("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=r,e[23]=j):j=e[23];let v;e[24]!==j?(v=s.jsx(_s,{placeholder:j,className:"h-9"}),e[24]=j,e[25]=v):v=e[25];let E;e[26]!==r?(E=r("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=r,e[27]=E):E=e[27];let k;e[28]!==E?(k=s.jsx(Es,{children:E}),e[28]=E,e[29]=k):k=e[29];let S;e[30]!==r?(S=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=r,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),x(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==r?(_=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=r,e[35]=_):_=e[35];const w=n===Be?"opacity-100":"opacity-0";let T;e[36]!==w?(T=ne("ml-auto",w),e[36]=w,e[37]=T):T=e[37];let C;e[38]!==T?(C=s.jsx(ve,{className:T}),e[38]=T,e[39]=C):C=e[39];let B;e[40]!==S||e[41]!==N||e[42]!==_||e[43]!==C?(B=s.jsxs(Ce,{value:S,onSelect:N,children:[_,C]}),e[40]=S,e[41]=N,e[42]=_,e[43]=C,e[44]=B):B=e[44];let O;if(e[45]!==t||e[46]!==a||e[47]!==n){let I;e[49]!==t||e[50]!==n?(I=L=>s.jsxs(Ce,{value:`${L.name} ${L.path}`,onSelect:()=>{t(L.key),x(!1)},children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:L.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:L.path})]}),s.jsx(ve,{className:ne("ml-auto",n===L.key?"opacity-100":"opacity-0")})]},L.key),e[49]=t,e[50]=n,e[51]=I):I=e[51],O=a.map(I),e[45]=t,e[46]=a,e[47]=n,e[48]=O}else O=e[48];let J;e[52]!==B||e[53]!==O?(J=s.jsxs(Cs,{children:[B,O]}),e[52]=B,e[53]=O,e[54]=J):J=e[54];let P;e[55]!==k||e[56]!==J?(P=s.jsxs(ws,{onWheel:Xs,children:[k,J]}),e[55]=k,e[56]=J,e[57]=P):P=e[57];let $;e[58]!==v||e[59]!==P?($=s.jsx(Ps,{className:"p-0",style:g,children:s.jsxs(Bs,{children:[v,P]})}),e[58]=v,e[59]=P,e[60]=$):$=e[60];let D;return e[61]!==f||e[62]!==$||e[63]!==c?(D=s.jsxs(Os,{open:f,onOpenChange:x,children:[c,$]}),e[61]=f,e[62]=$,e[63]=c,e[64]=D):D=e[64],D}function Xs(o){const e=o.deltaMode===1?16:1;o.currentTarget.scrollTop=o.currentTarget.scrollTop+o.deltaY*e}function Zs(o){const e=W.c(13),{crumbs:l,onSelect:n,onSelectRoot:t}=o;let a;e[0]!==n||e[1]!==t?(a=t??(()=>n(0)),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==a?(i={onSelect:a},e[3]=a,e[4]=i):i=e[4];let r;if(e[5]!==l||e[6]!==n){let x;e[8]!==n?(x=(b,h)=>({key:`block-${h}`,label:Xe(b),onSelect:()=>n(h)}),e[8]=n,e[9]=x):x=e[9],r=l.map(x),e[5]=l,e[6]=n,e[7]=r}else r=e[7];let f;return e[10]!==i||e[11]!==r?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:i,items:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12],f}const Qs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Qs[o]}function Ve(o,e,l){const n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(l)&&e in a)return!0;return!1}function st(o,e,l){return/\.tsx?$/.test(e)?!0:Ve(o,e,l)}function Jt(o,e){const l=new Set,n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(e))for(const i of Object.keys(a))l.add(i);return l}function tt(o,e){return/\.tsx?$/.test(o)?!1:e.has(`${o}.ts`)||e.has(`${o}.tsx`)}function nt(o,e){const l=o.manifest?.blocks??{},n=[],t=new Set;for(const[a,i]of Object.entries(l))if(a.includes(e))for(const r of Object.keys(i))t.add(r);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const i=gs(a,o);if(i.hidden)continue;const r=i.title&&i.title!==a?i.title:ce(a);n.push({resolveType:a,title:r})}return n.sort((a,i)=>a.title.localeCompare(i.title))}function Vt(o,e){return nt(o,e).length}function Ne(o){return o.startsWith("deco-sites/")?o.split("/")[1]||"site":o.startsWith("$live")||o.startsWith("deco/")?"deco":o.split("/")[0]||"other"}const lt={deco:"Deco",std:"Deco Standard",website:"Website"};function Dt(o){return lt[o]??o}function Ft(o){const e=Ne(o);let n=o.split("/").filter(Boolean).slice(o.startsWith("deco-sites/")?2:1);return(n[0]==="loaders"||n[0]==="actions")&&(n=n.slice(1)),[e,...n.slice(0,-1)]}function Ut(o,e,l){const n=[];for(const[t,a]of Object.entries(e)){if(st(o,t,l)||Ge(t)||!a||typeof a!="object"||Array.isArray(a))continue;const i=a,r=i.__resolveType;typeof r=="string"&&(ze.has(r)||Je.has(Ne(r))||Ve(o,r,l)&&n.push({key:t,resolveType:r,title:typeof i.name=="string"&&i.name?i.name:t}))}return n.sort((t,a)=>t.title.localeCompare(a.title))}function Kt(o,e){const l=o[e],n=typeof l?.__resolveType=="string"?l.__resolveType:"",{__resolveType:t,...a}=l??{},i=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:i}}const Re=3e4;function at(o,e,l,n){const t=new URL(`/deco/invoke/${e}`,o);return t.searchParams.set("__cb",n.toString(36)),t.searchParams.set("__decoFBT","0"),t.searchParams.set("__d",`run-${n.toString(36)}`),t.searchParams.set("props",btoa(encodeURIComponent(JSON.stringify(l)))),t.href}async function ot(o,{resolveType:e,props:l}){let n;try{n=await fetch(vs(o),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...l}),signal:AbortSignal.timeout(Re)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):r}const t=await n.text();let a=null,i=!1;try{a=t?JSON.parse(t):null,i=!0}catch{}if(!n.ok){const r=i&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(r)}return i?a:t}function it(o){const e=W.c(2);let l;return e[0]!==o?(l={mutationFn:n=>ot(o,n)},e[0]=o,e[1]=l):l=e[1],He(l)}function Wt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:i,target:r,initialValue:f,isCreating:x,onCreate:b,onSaveReferencedBlock:h,onBack:p,backLabel:y,showRun:m=!0}){const d=Ls(),u=d?.taskId??null,c=X(),g=d?.virtualMcpId,v=as(g===e?e:null)?.metadata?.siteSlug??null,E=Ze(r.resolveType,t),k=!E&&ks(r.resolveType,t),S=k?Ns(f):null,N=E??S,[_,w]=R.useState(f),[T,C]=R.useState([]),[B,O]=R.useState(0),[J,P]=R.useState(!1),[$,D]=R.useState(null),[I,L]=R.useState(!1),[Z,Q]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:ie,flush:H,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:r.mode==="saved"}),A=it({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{H()},[]);const F=et(i),xe=r.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??r.resolveType,re={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{w(z),r.mode==="saved"&&ie(r.blockKey,{__resolveType:r.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},Y=z=>{const oe=z??"";try{const de=JSON.parse(oe);if(de&&typeof de=="object"&&!Array.isArray(de)){P(!1),se(de);return}P(!0)}catch{P(!0)}},q=async z=>{const oe=ss(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:r.resolveType,..._}),L(!1)},M=()=>{Q(!0),A.mutate({resolveType:r.resolveType,props:_})},U=()=>{n&&window.open(at(n,r.resolveType,_,Date.now()),"_blank","noopener")},De=[r.title,...T],Fe=z=>{C(T.slice(0,z)),O(oe=>oe+1)};return s.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[s.jsx(Zs,{crumbs:De,onSelect:Fe,onSelectRoot:p}),s.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[p&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:p,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),r.mode==="saved"&&s.jsx(Is,{isPending:le,isError:!1}),m&&s.jsxs(K,{size:"default",variant:"outline",className:"shrink-0 gap-1.5",onClick:M,disabled:A.isPending,"aria-label":c("sandbox.runnableBlockEditor.runAriaLabel",{singular:F}),children:[A.isPending?s.jsx(je,{className:"size-3.5"}):s.jsx(As,{size:14}),c("sandbox.runnableBlockEditor.run")]}),r.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:x,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(is,{size:14})})}),s.jsx(me,{side:"bottom",children:c("sandbox.runnableBlockEditor.saveAsGlobal",{singular:F})})]}),s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:V?"default":"ghost",size:"icon",className:"shrink-0",onClick:ae,"aria-label":c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson"),"aria-pressed":V,children:V?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})}),s.jsx(me,{side:"bottom",children:c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson")})]})]}),s.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:r.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:xe,singular:F})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:ne("relative min-h-0 flex-1",Z&&ee&&"hidden"),children:[s.jsx(zs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsxs("div",{className:"mx-auto max-w-2xl",children:[S&&N===S&&s.jsx("p",{className:"mb-3 rounded-md bg-muted px-3 py-2 text-xs leading-snug text-muted-foreground",children:c("sandbox.runnableBlockEditor.inferredSchemaNotice",{singular:F})}),N?s.jsx(Qe,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:C,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:re},B):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:k?c("sandbox.runnableBlockEditor.freeformPropsEmptyState",{singular:F}):c("sandbox.runnableBlockEditor.noInputEmptyState",{singular:F})})]})})}),$!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[J&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.runnableBlockEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ie,{language:"json",height:"100%",code:$,onChange:Y,onSave:z=>{Y(z),H()}})})]})]}),Z&&s.jsx(rt,{singular:F,result:{isPending:A.isPending,error:A.error,data:A.data,hasRun:A.status!=="idle"},expanded:ee,onToggleExpand:()=>G(z=>!z),onOpenInNewTab:n?U:void 0,onClose:()=>{Q(!1),G(!1)}})]}),s.jsx(es,{open:I,onOpenChange:L,defaultBlockId:"",isPending:x,onSubmit:q})]})}function rt(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:i,onClose:r}=o,f=X();let x;e[0]!==n.data?(x=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=x):x=e[1];const b=x,h=t?"flex-1":"h-[45%] shrink-0";let p;e[2]!==h?(p=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=p):p=e[3];let y;e[4]!==f?(y=f("sandbox.runnableBlockEditor.resultPanelTitle"),e[4]=f,e[5]=y):y=e[5];let m;e[6]!==y?(m=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:y}),e[6]=y,e[7]=m):m=e[7];let d;e[8]!==i||e[9]!==l||e[10]!==f?(d=i&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":f("sandbox.runnableBlockEditor.openResultInNewTabAriaLabel"),children:s.jsx(Oe,{size:14})})}),s.jsx(me,{side:"bottom",children:f("sandbox.runnableBlockEditor.openInNewTabTooltip",{singular:l})})]}),e[8]=i,e[9]=l,e[10]=f,e[11]=d):d=e[11];let u;e[12]!==t||e[13]!==f?(u=f(t?"sandbox.runnableBlockEditor.collapseResult":"sandbox.runnableBlockEditor.expandResult"),e[12]=t,e[13]=f,e[14]=u):u=e[14];let c;e[15]!==t?(c=t?s.jsx(rs,{size:14}):s.jsx($s,{size:14}),e[15]=t,e[16]=c):c=e[16];let g;e[17]!==t||e[18]!==a||e[19]!==u||e[20]!==c?(g=s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":u,"aria-pressed":t,children:c})}),e[17]=t,e[18]=a,e[19]=u,e[20]=c,e[21]=g):g=e[21];let j;e[22]!==t||e[23]!==f?(j=f(t?"sandbox.runnableBlockEditor.collapse":"sandbox.runnableBlockEditor.expand"),e[22]=t,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(me,{side:"bottom",children:j}),e[25]=j,e[26]=v):v=e[26];let E;e[27]!==v||e[28]!==g?(E=s.jsxs(ue,{children:[g,v]}),e[27]=v,e[28]=g,e[29]=E):E=e[29];let k;e[30]!==f?(k=f("sandbox.runnableBlockEditor.closeResult"),e[30]=f,e[31]=k):k=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ye,{size:14}),e[32]=S):S=e[32];let N;e[33]!==r||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":k,children:S}),e[33]=r,e[34]=k,e[35]=N):N=e[35];let _;e[36]!==E||e[37]!==N||e[38]!==d?(_=s.jsxs("div",{className:"flex items-center gap-0.5",children:[d,E,N]}),e[36]=E,e[37]=N,e[38]=d,e[39]=_):_=e[39];let w;e[40]!==_||e[41]!==m?(w=s.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between border-b px-3",children:[m,_]}),e[40]=_,e[41]=m,e[42]=w):w=e[42];let T;e[43]!==n.error||e[44]!==n.hasRun||e[45]!==n.isPending||e[46]!==b||e[47]!==l||e[48]!==f?(T=s.jsx("div",{className:"min-h-0 flex-1",children:n.isPending?s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),f("sandbox.runnableBlockEditor.running",{singular:l})]}):n.error?s.jsxs("div",{className:"h-full overflow-auto px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-destructive",children:f("sandbox.runnableBlockEditor.failedToRun",{singular:l})}),s.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-destructive/90",children:n.error.message})]}):n.hasRun?s.jsx(Ie,{language:"json",height:"100%",code:b,readOnly:!0}):s.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:f("sandbox.runnableBlockEditor.pressRunToInvoke",{singular:l})})}),e[43]=n.error,e[44]=n.hasRun,e[45]=n.isPending,e[46]=b,e[47]=l,e[48]=f,e[49]=T):T=e[49];let C;return e[50]!==w||e[51]!==T||e[52]!==p?(C=s.jsxs("div",{className:p,children:[w,T]}),e[50]=w,e[51]=T,e[52]=p,e[53]=C):C=e[53],C}function be(o,e,l){const n=l[o];return typeof n?.name=="string"&&n.name||o.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase())||`Section ${e+1}`}function Gt(o,e,l=!1){return o.map((n,t)=>{const a=n.__resolveType??"",i=Se(a);if(!i&&a!==""&&pe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const r=i?n.section:void 0,f=i?r?.__resolveType??"":a;if(Te(f,l)){const b=i?r:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&Ye(h[0]?.rule?.__resolveType,l)){const m=he(h[0],l)??{};let d=m.__resolveType??"";const u=Se(d);let c=m;if(u){const g=m.section;d=g?.__resolveType??d,g&&(c=g)}if(Te(d,l)){const g=Array.isArray(c.variants)?c.variants:[],j=he(g[0],l)?.__resolveType,v=j?ce(j):"Section";return{index:t,resolveType:a,label:`Variants of ${v}`,variantOf:v,isHidden:!0,isLazy:u}}return d!==""&&pe(d)&&d in e?{index:t,resolveType:a,label:be(d,t,e),isHidden:!0,isLazy:u,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(d)||`Section ${t+1}`,isHidden:!0,isLazy:u}}const p=he(h[0],l)?.__resolveType,y=p?ce(p):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:i}}const x=i?n.section?.__resolveType??a:a;return i&&x!==""&&pe(x)&&x in e?{index:t,resolveType:a,label:be(x,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(x)||`Section ${t+1}`,isLazy:i}})}function Ht(o){let e=o.length;for(;e>0&&o[e-1]?.isSavedBlock;)e--;return e>0?e:Math.max(o.length-1,0)}export{Be as B,Mt as P,Wt as R,At as S,nt as a,Ft as b,It as c,Dt as d,et as e,Zs as f,zt as g,Vt as h,Ut as l,Jt as m,Ht as n,Gt as p,Kt as r};
4
+ `).length)),onChange:f=>t(f.target.value)}):s.jsx(ge,{id:l,value:n,onChange:f=>t(f.target.value)}),e[2]=l,e[3]=i,e[4]=t,e[5]=n,e[6]=r):r=e[6],r}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=X(),[i,r]=R.useState(String(n));let f;e[0]!==i?(f=Ee(i),e[0]=i,e[1]=f):f=e[1];const x=f===null;let b;e[2]!==t?(b=m=>{r(m.target.value);const d=Ee(m.target.value);d!==null&&t(d)},e[2]=t,e[3]=b):b=e[3];let h;e[4]!==l||e[5]!==x||e[6]!==b||e[7]!==i?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:i,"aria-invalid":x,onChange:b}),e[4]=l,e[5]=x,e[6]=b,e[7]=i,e[8]=h):h=e[8];let p;e[9]!==x||e[10]!==a?(p=x&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=x,e[10]=a,e[11]=p):p=e[11];let y;return e[12]!==h||e[13]!==p?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,p]}),e[12]=h,e[13]=p,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:i}=o,r=X();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const x=f;if(typeof n=="boolean"){let m;e[2]!==x||e[3]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[2]=x,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==i||e[6]!==t?(d=g=>i(t,g),e[5]=i,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==x||e[9]!==d||e[10]!==n?(u=s.jsx(us,{id:x,checked:n,onCheckedChange:d}),e[8]=x,e[9]=d,e[10]=n,e[11]=u):u=e[11];let c;return e[12]!==m||e[13]!==u?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,u]}),e[12]=m,e[13]=u,e[14]=c):c=e[14],c}if(typeof n=="string"||typeof n=="number"){let m;e[15]!==x||e[16]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[15]=x,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==x||e[19]!==i||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:x,value:n,onChange:c=>i(t,c)}):s.jsx(Ks,{id:x,value:n,onChange:c=>i(t,c)}),e[18]=x,e[19]=i,e[20]=t,e[21]=n,e[22]=d):d=e[22];let u;return e[23]!==m||e[24]!==d?(u=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,d]}),e[23]=m,e[24]=d,e[25]=u):u=e[25],u}if(Array.isArray(n)||te(n)){let m,d,u,c,g;if(e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==t||e[30]!==r||e[31]!==n){const E=Array.isArray(n)?n.map((T,C)=>[Ds(T,C,r),T,C]):Object.entries(n).filter(Gs).map(Ws),k=te(n)&&typeof n.__resolveType=="string"?n.__resolveType:null;u=a===0,c="group rounded-md border border-border";let S;e[37]!==l?(S=s.jsx("span",{className:"min-w-0 truncate",children:l}),e[37]=l,e[38]=S):S=e[38];let N;e[39]!==k?(N=k&&s.jsx("span",{className:"min-w-0 truncate font-mono text-xs font-normal text-muted-foreground",title:k,children:ke(k)}),e[39]=k,e[40]=N):N=e[40];let _;e[41]!==r||e[42]!==n?(_=Array.isArray(n)?r("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=r,e[42]=n,e[43]=_):_=e[43];let w;e[44]!==_?(w=s.jsx("span",{className:"ml-auto shrink-0 text-xs font-normal text-muted-foreground",children:_}),e[44]=_,e[45]=w):w=e[45],e[46]!==w||e[47]!==S||e[48]!==N?(g=s.jsxs("summary",{className:"flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-sm font-medium text-foreground",children:[S,N,w]}),e[46]=w,e[47]=S,e[48]=N,e[49]=g):g=e[49],m="flex flex-col gap-4 border-t border-border px-3 py-3",d=E.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.schemaless.empty")}):E.map(T=>{const[C,B,O]=T;return s.jsx(Me,{label:C,value:B,path:[...t,O],depth:a+1,onChange:i},O)}),e[26]=a,e[27]=l,e[28]=i,e[29]=t,e[30]=r,e[31]=n,e[32]=m,e[33]=d,e[34]=u,e[35]=c,e[36]=g}else m=e[32],d=e[33],u=e[34],c=e[35],g=e[36];let j;e[50]!==m||e[51]!==d?(j=s.jsx("div",{className:m,children:d}),e[50]=m,e[51]=d,e[52]=j):j=e[52];let v;return e[53]!==u||e[54]!==c||e[55]!==g||e[56]!==j?(v=s.jsxs("details",{open:u,className:c,children:[g,j]}),e[53]=u,e[54]=c,e[55]=g,e[56]=j,e[57]=v):v=e[57],v}let b;e[58]!==l?(b=s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:l}),e[58]=l,e[59]=b):b=e[59];let h;e[60]!==r?(h=r("sandbox.schemaless.notSet"),e[60]=r,e[61]=h):h=e[61];let p;e[62]!==h?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=p):p=e[63];let y;return e[64]!==b||e[65]!==p?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,p]}),e[64]=b,e[65]=p,e[66]=y):y=e[66],y}function Ws(o){const[e,l]=o;return[e,l,e]}function Gs(o){const[e]=o;return e!=="__resolveType"}function Hs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=X(),[i,r]=R.useState(()=>(t?.(o),e)),[f,x]=R.useState(0),[b,h]=R.useState(null),[p,y]=R.useState(!1),m=v=>{r(v),l(o,v)},d=typeof i.__resolveType=="string"?i.__resolveType:null,u=Object.entries(i).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),x(v=>v+1)):h(JSON.stringify(i,null,2))},g=v=>{try{const E=JSON.parse(v??"");if(te(E)){y(!1),m(E);return}}catch{}y(!0)},j=a(b!==null?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson");return s.jsxs("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[n&&s.jsxs(K,{variant:"ghost",size:"sm",className:"shrink-0",onClick:n,children:[s.jsx($e,{"aria-hidden":"true"}),a("sandbox.schemaless.back")]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("h3",{className:"truncate text-sm font-medium",title:o,children:o}),d&&s.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:d,children:d})]}),s.jsx(K,{variant:b!==null?"default":"ghost",size:"icon",className:"shrink-0",onClick:c,"aria-label":j,"aria-pressed":b!==null,title:j,children:b!==null?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})]}),s.jsxs("div",{className:"relative min-h-0 flex-1",children:[s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("form",{"aria-label":o,className:"mx-auto flex max-w-2xl flex-col gap-4 px-6 py-4",onSubmit:v=>v.preventDefault(),children:u.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.schemaless.empty")}):u.map(([v,E])=>s.jsx(Me,{label:v,value:E,path:[v],depth:0,onChange:(k,S)=>m(hs(i,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[p&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:a("sandbox.savedSectionEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),children:s.jsx(Ms,{language:"json",height:"100%",code:b,onChange:g})})})]})]})]})}function Ys(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:i,v8:r,copyEpochOf:f,site:x,initialKey:b,compact:h}=o,p=r===void 0?!1:r,y=x===void 0?null:x,m=b===void 0?null:b,d=h===void 0?!1:h,u=X(),[c,g]=R.useState(m&&te(l[m])?m:null),[j,v]=R.useState("");let E;e[0]!==t||e[1]!==a||e[2]!==c||e[3]!==p?(E=A=>{A!==c&&(t?.(),!p&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=p,e[4]=E):E=e[4];const k=E;let S;e[5]!==f||e[6]!==c?(S=c?f?.(c)??0:0,e[5]=f,e[6]=c,e[7]=S):S=e[7];const N=S,[_,w]=R.useState(N);_!==N&&(w(N),!p&&c!==null&&a?.(c));const T=c?l[c]:void 0;let C,B,O,J,P;if(e[8]!==d||e[9]!==l||e[10]!==j||e[11]!==k||e[12]!==c||e[13]!==u){const A=j.trim().toLowerCase(),F=ps(l).map(M=>({...M,blocks:A?M.blocks.filter(U=>U.label.toLowerCase().includes(A)||U.key.toLowerCase().includes(A)||(M.resolveType??"").toLowerCase().includes(A)):M.blocks})).filter(qs),xe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const re=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==re?(C=ne("flex min-h-0 flex-col",re),e[21]=re,e[22]=C):C=e[22];let se;e[23]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(ds,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),e[23]=se):se=e[23];let ae;e[24]===Symbol.for("react.memo_cache_sentinel")?(ae=M=>v(M.target.value),e[24]=ae):ae=e[24];let Y;e[25]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=Y):Y=e[26];let q;e[27]!==u?(q=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=q):q=e[28],e[29]!==j||e[30]!==Y||e[31]!==q?(B=s.jsx("div",{className:"shrink-0 border-b p-2",children:s.jsxs("div",{className:"relative",children:[se,s.jsx(ge,{type:"search",value:j,onChange:ae,placeholder:Y,"aria-label":q,className:"pl-8"})]})}),e[29]=j,e[30]=Y,e[31]=q,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=xe===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noBlocks")}):F.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noMatches")}):F.map(M=>s.jsxs("section",{"aria-label":M.resolveType??u("sandbox.schemaless.noType"),className:"py-1",children:[s.jsxs("h3",{className:"flex items-baseline gap-2 px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",title:M.resolveType??void 0,children:[s.jsx("span",{className:"truncate",children:M.resolveType?ke(M.resolveType):u("sandbox.schemaless.noType")}),s.jsx("span",{className:"ml-auto shrink-0 tabular-nums",children:M.blocks.length})]}),s.jsx("ul",{children:M.blocks.map(U=>s.jsx("li",{children:s.jsx("button",{type:"button",onClick:()=>k(U.key),"aria-current":U.key===c?"true":void 0,title:U.key,className:ne("block w-full truncate px-3 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",U.key===c&&"bg-accent font-medium"),children:U.label})},U.key))})]},M.resolveType??"")),e[8]=d,e[9]=l,e[10]=j,e[11]=k,e[12]=c,e[13]=u,e[14]=C,e[15]=B,e[16]=O,e[17]=J,e[18]=P}else C=e[14],B=e[15],O=e[16],J=e[17],P=e[18];let $;e[33]!==O||e[34]!==J?($=s.jsx("div",{className:O,children:J}),e[33]=O,e[34]=J,e[35]=$):$=e[35];let D;e[36]!==C||e[37]!==B||e[38]!==$||e[39]!==P?(D=s.jsxs("nav",{"aria-label":P,className:C,children:[B,$]}),e[36]=C,e[37]=B,e[38]=$,e[39]=P,e[40]=D):D=e[40];const I=D;let L;e[41]!==T||e[42]!==d||e[43]!==f||e[44]!==n||e[45]!==a||e[46]!==k||e[47]!==c||e[48]!==u||e[49]!==p?(L=c&&te(T)?s.jsx(Hs,{blockKey:c,block:T,onOpenBlock:p?a:void 0,onChange:n,onBack:d?()=>k(null):void 0},`${c}:${f?.(c)??0}`):s.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u("sandbox.schemaless.pickBlock")})}),e[41]=T,e[42]=d,e[43]=f,e[44]=n,e[45]=a,e[46]=k,e[47]=c,e[48]=u,e[49]=p,e[50]=L):L=e[50];const Q=L;let Z;e[51]!==Q||e[52]!==c||e[53]!==p||e[54]!==i?(Z=p&&c&&i?i(c,Q):Q,e[51]=Q,e[52]=c,e[53]=p,e[54]=i,e[55]=Z):Z=e[55];const ee=Z;let G;e[56]!==y?(G=s.jsx(Vs,{site:y}),e[56]=y,e[57]=G):G=e[57];let V;e[58]!==T||e[59]!==d||e[60]!==ee||e[61]!==I||e[62]!==c?(V=d&&c&&te(T)?ee:I,e[58]=T,e[59]=d,e[60]=ee,e[61]=I,e[62]=c,e[63]=V):V=e[63];const ie=!d&&ee;let H;e[64]!==V||e[65]!==ie?(H=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,ie]}),e[64]=V,e[65]=ie,e[66]=H):H=e[66];let le;return e[67]!==G||e[68]!==H?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,H]}),e[67]=G,e[68]=H,e[69]=le):le=e[69],le}function qs(o){return o.blocks.length>0}function At(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:i,compact:r}=o,f=ls(n)?.metadata;let x;e[0]!==f?(x=Ke(f),e[0]=f,e[1]=x):x=e[1];const b=x;let h;e[2]!==t||e[3]!==l||e[4]!==n?(h={orgSlug:l,virtualMcpId:n,branch:t},e[2]=t,e[3]=l,e[4]=n,e[5]=h):h=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={holdsCopy:!0},e[6]=p):p=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,p);let c;e[7]!==t||e[8]!==l||e[9]!==n?(c=ts({orgSlug:l,virtualMcpId:n,branch:t}),e[7]=t,e[8]=l,e[9]=n,e[10]=c):c=e[10];const g=ns(c);let j;e[11]!==m?(j=()=>m(),e[11]=m,e[12]=j):j=e[12];const v=R.useEffectEvent(j);let E;e[13]!==v?(E=()=>()=>v(),e[13]=v,e[14]=E):E=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[15]=k):k=e[15],R.useEffect(E,k);let S;e[16]!==y?(S=(w,T)=>y(w,T),e[16]=y,e[17]=S):S=e[17];let N;e[18]!==t||e[19]!==a||e[20]!==l||e[21]!==u||e[22]!==n?(N=u?(w,T)=>s.jsx(qe,{listing:a,scope:{orgSlug:l,virtualMcpId:n,branch:t},names:[w],children:T}):void 0,e[18]=t,e[19]=a,e[20]=l,e[21]=u,e[22]=n,e[23]=N):N=e[23];let _;return e[24]!==r||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==i||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(Ys,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:i,compact:r}),e[24]=r,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=i,e[30]=b,e[31]=N,e[32]=S,e[33]=u,e[34]=_):_=e[34],_}const we={resolveType:"website/pages/Page.tsx",seoResolveType:"website/sections/Seo/SeoV2.tsx"};function zt(o){return`pages-${encodeURIComponent(o)}-${crypto.randomUUID()}`}function It(o,e,l){if(bs(l))return{name:o,path:e,sections:[],__resolveType:"page"};const n=ys(l??void 0);if(!l||js(n))return{name:o,path:e,sections:[],seo:{__resolveType:we.seoResolveType},__resolveType:we.resolveType};const t=Ss(l);return{name:o,path:e,sections:[],...t?{seo:{__resolveType:t}}:{},__resolveType:n}}const Be="__blank__";function Mt(o){const e=W.c(65),{id:l,value:n,onChange:t,templates:a,disabled:i}=o,r=X(),[f,x]=R.useState(!1);let b;if(e[0]!==a||e[1]!==n){let I;e[3]!==n?(I=L=>L.key===n,e[3]=n,e[4]=I):I=e[4],b=a.find(I),e[0]=a,e[1]=n,e[2]=b}else b=e[2];const h=b;let p;e[5]!==h?.name||e[6]!==r?(p=h?.name??r("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=r,e[7]=p):p=e[7];let y;e[8]!==p?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:p}),e[8]=p,e[9]=y):y=e[9];let m;e[10]!==h?(m=h?.path?s.jsx("span",{className:"truncate text-muted-foreground",children:h.path}):null,e[10]=h,e[11]=m):m=e[11];let d;e[12]!==y||e[13]!==m?(d=s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[y,m]}),e[12]=y,e[13]=m,e[14]=d):d=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ts,{className:"shrink-0 opacity-50"}),e[15]=u):u=e[15];let c;e[16]!==i||e[17]!==l||e[18]!==f||e[19]!==d?(c=s.jsx(Rs,{asChild:!0,children:s.jsxs(K,{id:l,type:"button",variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=i,e[17]=l,e[18]=f,e[19]=d,e[20]=c):c=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[21]=g):g=e[21];let j;e[22]!==r?(j=r("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=r,e[23]=j):j=e[23];let v;e[24]!==j?(v=s.jsx(_s,{placeholder:j,className:"h-9"}),e[24]=j,e[25]=v):v=e[25];let E;e[26]!==r?(E=r("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=r,e[27]=E):E=e[27];let k;e[28]!==E?(k=s.jsx(Es,{children:E}),e[28]=E,e[29]=k):k=e[29];let S;e[30]!==r?(S=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=r,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),x(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==r?(_=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=r,e[35]=_):_=e[35];const w=n===Be?"opacity-100":"opacity-0";let T;e[36]!==w?(T=ne("ml-auto",w),e[36]=w,e[37]=T):T=e[37];let C;e[38]!==T?(C=s.jsx(ve,{className:T}),e[38]=T,e[39]=C):C=e[39];let B;e[40]!==S||e[41]!==N||e[42]!==_||e[43]!==C?(B=s.jsxs(Ce,{value:S,onSelect:N,children:[_,C]}),e[40]=S,e[41]=N,e[42]=_,e[43]=C,e[44]=B):B=e[44];let O;if(e[45]!==t||e[46]!==a||e[47]!==n){let I;e[49]!==t||e[50]!==n?(I=L=>s.jsxs(Ce,{value:`${L.name} ${L.path}`,onSelect:()=>{t(L.key),x(!1)},children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:L.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:L.path})]}),s.jsx(ve,{className:ne("ml-auto",n===L.key?"opacity-100":"opacity-0")})]},L.key),e[49]=t,e[50]=n,e[51]=I):I=e[51],O=a.map(I),e[45]=t,e[46]=a,e[47]=n,e[48]=O}else O=e[48];let J;e[52]!==B||e[53]!==O?(J=s.jsxs(Cs,{children:[B,O]}),e[52]=B,e[53]=O,e[54]=J):J=e[54];let P;e[55]!==k||e[56]!==J?(P=s.jsxs(ws,{onWheel:Xs,children:[k,J]}),e[55]=k,e[56]=J,e[57]=P):P=e[57];let $;e[58]!==v||e[59]!==P?($=s.jsx(Ps,{className:"p-0",style:g,children:s.jsxs(Bs,{children:[v,P]})}),e[58]=v,e[59]=P,e[60]=$):$=e[60];let D;return e[61]!==f||e[62]!==$||e[63]!==c?(D=s.jsxs(Os,{open:f,onOpenChange:x,children:[c,$]}),e[61]=f,e[62]=$,e[63]=c,e[64]=D):D=e[64],D}function Xs(o){const e=o.deltaMode===1?16:1;o.currentTarget.scrollTop=o.currentTarget.scrollTop+o.deltaY*e}function Qs(o){const e=W.c(13),{crumbs:l,onSelect:n,onSelectRoot:t}=o;let a;e[0]!==n||e[1]!==t?(a=t??(()=>n(0)),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==a?(i={onSelect:a},e[3]=a,e[4]=i):i=e[4];let r;if(e[5]!==l||e[6]!==n){let x;e[8]!==n?(x=(b,h)=>({key:`block-${h}`,label:Xe(b),onSelect:()=>n(h)}),e[8]=n,e[9]=x):x=e[9],r=l.map(x),e[5]=l,e[6]=n,e[7]=r}else r=e[7];let f;return e[10]!==i||e[11]!==r?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:i,items:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12],f}const Zs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Zs[o]}function Ve(o,e,l){const n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(l)&&e in a)return!0;return!1}function st(o,e,l){return/\.tsx?$/.test(e)?!0:Ve(o,e,l)}function Jt(o,e){const l=new Set,n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(e))for(const i of Object.keys(a))l.add(i);return l}function tt(o,e){return/\.tsx?$/.test(o)?!1:e.has(`${o}.ts`)||e.has(`${o}.tsx`)}function nt(o,e){const l=o.manifest?.blocks??{},n=[],t=new Set;for(const[a,i]of Object.entries(l))if(a.includes(e))for(const r of Object.keys(i))t.add(r);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const i=gs(a,o);if(i.hidden)continue;const r=i.title&&i.title!==a?i.title:ce(a);n.push({resolveType:a,title:r})}return n.sort((a,i)=>a.title.localeCompare(i.title))}function Vt(o,e){return nt(o,e).length}function Ne(o){return o.startsWith("deco-sites/")?o.split("/")[1]||"site":o.startsWith("$live")||o.startsWith("deco/")?"deco":o.split("/")[0]||"other"}const lt={deco:"Deco",std:"Deco Standard",website:"Website"};function Dt(o){return lt[o]??o}function Ft(o){const e=Ne(o);let n=o.split("/").filter(Boolean).slice(o.startsWith("deco-sites/")?2:1);return(n[0]==="loaders"||n[0]==="actions")&&(n=n.slice(1)),[e,...n.slice(0,-1)]}function Ut(o,e,l){const n=[];for(const[t,a]of Object.entries(e)){if(st(o,t,l)||Ge(t)||!a||typeof a!="object"||Array.isArray(a))continue;const i=a,r=i.__resolveType;typeof r=="string"&&(ze.has(r)||Je.has(Ne(r))||Ve(o,r,l)&&n.push({key:t,resolveType:r,title:typeof i.name=="string"&&i.name?i.name:t}))}return n.sort((t,a)=>t.title.localeCompare(a.title))}function Kt(o,e){const l=o[e],n=typeof l?.__resolveType=="string"?l.__resolveType:"",{__resolveType:t,...a}=l??{},i=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:i}}const Re=3e4;function at(o,e,l,n){const t=new URL(`/deco/invoke/${e}`,o);return t.searchParams.set("__cb",n.toString(36)),t.searchParams.set("__decoFBT","0"),t.searchParams.set("__d",`run-${n.toString(36)}`),t.searchParams.set("props",btoa(encodeURIComponent(JSON.stringify(l)))),t.href}async function ot(o,{resolveType:e,props:l}){let n;try{n=await fetch(vs(o),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...l}),signal:AbortSignal.timeout(Re)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):r}const t=await n.text();let a=null,i=!1;try{a=t?JSON.parse(t):null,i=!0}catch{}if(!n.ok){const r=i&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(r)}return i?a:t}function it(o){const e=W.c(2);let l;return e[0]!==o?(l={mutationFn:n=>ot(o,n)},e[0]=o,e[1]=l):l=e[1],He(l)}function Wt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:i,target:r,initialValue:f,isCreating:x,onCreate:b,onSaveReferencedBlock:h,onBack:p,backLabel:y,showRun:m=!0}){const d=Ls(),u=d?.taskId??null,c=X(),g=d?.virtualMcpId,v=as(g===e?e:null)?.metadata?.siteSlug??null,E=Qe(r.resolveType,t),k=!E&&ks(r.resolveType,t),S=k?Ns(f):null,N=E??S,[_,w]=R.useState(f),[T,C]=R.useState([]),[B,O]=R.useState(0),[J,P]=R.useState(!1),[$,D]=R.useState(null),[I,L]=R.useState(!1),[Q,Z]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:ie,flush:H,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:r.mode==="saved"}),A=it({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{H()},[]);const F=et(i),xe=r.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??r.resolveType,re={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{w(z),r.mode==="saved"&&ie(r.blockKey,{__resolveType:r.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},Y=z=>{const oe=z??"";try{const de=JSON.parse(oe);if(de&&typeof de=="object"&&!Array.isArray(de)){P(!1),se(de);return}P(!0)}catch{P(!0)}},q=async z=>{const oe=ss(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:r.resolveType,..._}),L(!1)},M=()=>{Z(!0),A.mutate({resolveType:r.resolveType,props:_})},U=()=>{n&&window.open(at(n,r.resolveType,_,Date.now()),"_blank","noopener")},De=[r.title,...T],Fe=z=>{C(T.slice(0,z)),O(oe=>oe+1)};return s.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[s.jsx(Qs,{crumbs:De,onSelect:Fe,onSelectRoot:p}),s.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[p&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:p,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),r.mode==="saved"&&s.jsx(Is,{isPending:le,isError:!1}),m&&s.jsxs(K,{size:"default",variant:"outline",className:"shrink-0 gap-1.5",onClick:M,disabled:A.isPending,"aria-label":c("sandbox.runnableBlockEditor.runAriaLabel",{singular:F}),children:[A.isPending?s.jsx(je,{className:"size-3.5"}):s.jsx(As,{size:14}),c("sandbox.runnableBlockEditor.run")]}),r.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:x,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(is,{size:14})})}),s.jsx(me,{side:"bottom",children:c("sandbox.runnableBlockEditor.saveAsGlobal",{singular:F})})]}),s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:V?"default":"ghost",size:"icon",className:"shrink-0",onClick:ae,"aria-label":c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson"),"aria-pressed":V,children:V?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})}),s.jsx(me,{side:"bottom",children:c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson")})]})]}),s.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:r.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:xe,singular:F})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:ne("relative min-h-0 flex-1",Q&&ee&&"hidden"),children:[s.jsx(zs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsxs("div",{className:"mx-auto max-w-2xl",children:[S&&N===S&&s.jsx("p",{className:"mb-3 rounded-md bg-muted px-3 py-2 text-xs leading-snug text-muted-foreground",children:c("sandbox.runnableBlockEditor.inferredSchemaNotice",{singular:F})}),N?s.jsx(Ze,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:C,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:re},B):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:k?c("sandbox.runnableBlockEditor.freeformPropsEmptyState",{singular:F}):c("sandbox.runnableBlockEditor.noInputEmptyState",{singular:F})})]})})}),$!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[J&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.runnableBlockEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ie,{language:"json",height:"100%",code:$,onChange:Y,onSave:z=>{Y(z),H()}})})]})]}),Q&&s.jsx(rt,{singular:F,result:{isPending:A.isPending,error:A.error,data:A.data,hasRun:A.status!=="idle"},expanded:ee,onToggleExpand:()=>G(z=>!z),onOpenInNewTab:n?U:void 0,onClose:()=>{Z(!1),G(!1)}})]}),s.jsx(es,{open:I,onOpenChange:L,defaultBlockId:"",isPending:x,onSubmit:q})]})}function rt(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:i,onClose:r}=o,f=X();let x;e[0]!==n.data?(x=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=x):x=e[1];const b=x,h=t?"flex-1":"h-[45%] shrink-0";let p;e[2]!==h?(p=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=p):p=e[3];let y;e[4]!==f?(y=f("sandbox.runnableBlockEditor.resultPanelTitle"),e[4]=f,e[5]=y):y=e[5];let m;e[6]!==y?(m=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:y}),e[6]=y,e[7]=m):m=e[7];let d;e[8]!==i||e[9]!==l||e[10]!==f?(d=i&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":f("sandbox.runnableBlockEditor.openResultInNewTabAriaLabel"),children:s.jsx(Oe,{size:14})})}),s.jsx(me,{side:"bottom",children:f("sandbox.runnableBlockEditor.openInNewTabTooltip",{singular:l})})]}),e[8]=i,e[9]=l,e[10]=f,e[11]=d):d=e[11];let u;e[12]!==t||e[13]!==f?(u=f(t?"sandbox.runnableBlockEditor.collapseResult":"sandbox.runnableBlockEditor.expandResult"),e[12]=t,e[13]=f,e[14]=u):u=e[14];let c;e[15]!==t?(c=t?s.jsx(rs,{size:14}):s.jsx($s,{size:14}),e[15]=t,e[16]=c):c=e[16];let g;e[17]!==t||e[18]!==a||e[19]!==u||e[20]!==c?(g=s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":u,"aria-pressed":t,children:c})}),e[17]=t,e[18]=a,e[19]=u,e[20]=c,e[21]=g):g=e[21];let j;e[22]!==t||e[23]!==f?(j=f(t?"sandbox.runnableBlockEditor.collapse":"sandbox.runnableBlockEditor.expand"),e[22]=t,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(me,{side:"bottom",children:j}),e[25]=j,e[26]=v):v=e[26];let E;e[27]!==v||e[28]!==g?(E=s.jsxs(ue,{children:[g,v]}),e[27]=v,e[28]=g,e[29]=E):E=e[29];let k;e[30]!==f?(k=f("sandbox.runnableBlockEditor.closeResult"),e[30]=f,e[31]=k):k=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ye,{size:14}),e[32]=S):S=e[32];let N;e[33]!==r||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":k,children:S}),e[33]=r,e[34]=k,e[35]=N):N=e[35];let _;e[36]!==E||e[37]!==N||e[38]!==d?(_=s.jsxs("div",{className:"flex items-center gap-0.5",children:[d,E,N]}),e[36]=E,e[37]=N,e[38]=d,e[39]=_):_=e[39];let w;e[40]!==_||e[41]!==m?(w=s.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between border-b px-3",children:[m,_]}),e[40]=_,e[41]=m,e[42]=w):w=e[42];let T;e[43]!==n.error||e[44]!==n.hasRun||e[45]!==n.isPending||e[46]!==b||e[47]!==l||e[48]!==f?(T=s.jsx("div",{className:"min-h-0 flex-1",children:n.isPending?s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),f("sandbox.runnableBlockEditor.running",{singular:l})]}):n.error?s.jsxs("div",{className:"h-full overflow-auto px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-destructive",children:f("sandbox.runnableBlockEditor.failedToRun",{singular:l})}),s.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-destructive/90",children:n.error.message})]}):n.hasRun?s.jsx(Ie,{language:"json",height:"100%",code:b,readOnly:!0}):s.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:f("sandbox.runnableBlockEditor.pressRunToInvoke",{singular:l})})}),e[43]=n.error,e[44]=n.hasRun,e[45]=n.isPending,e[46]=b,e[47]=l,e[48]=f,e[49]=T):T=e[49];let C;return e[50]!==w||e[51]!==T||e[52]!==p?(C=s.jsxs("div",{className:p,children:[w,T]}),e[50]=w,e[51]=T,e[52]=p,e[53]=C):C=e[53],C}function be(o,e,l){const n=l[o];return typeof n?.name=="string"&&n.name||o.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase())||`Section ${e+1}`}function Gt(o,e,l=!1){return o.map((n,t)=>{const a=n.__resolveType??"",i=Se(a);if(!i&&a!==""&&pe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const r=i?n.section:void 0,f=i?r?.__resolveType??"":a;if(Te(f,l)){const b=i?r:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&Ye(h[0]?.rule?.__resolveType,l)){const m=he(h[0],l)??{};let d=m.__resolveType??"";const u=Se(d);let c=m;if(u){const g=m.section;d=g?.__resolveType??d,g&&(c=g)}if(Te(d,l)){const g=Array.isArray(c.variants)?c.variants:[],j=he(g[0],l)?.__resolveType,v=j?ce(j):"Section";return{index:t,resolveType:a,label:`Variants of ${v}`,variantOf:v,isHidden:!0,isLazy:u}}return d!==""&&pe(d)&&d in e?{index:t,resolveType:a,label:be(d,t,e),isHidden:!0,isLazy:u,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(d)||`Section ${t+1}`,isHidden:!0,isLazy:u}}const p=he(h[0],l)?.__resolveType,y=p?ce(p):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:i}}const x=i?n.section?.__resolveType??a:a;return i&&x!==""&&pe(x)&&x in e?{index:t,resolveType:a,label:be(x,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(x)||`Section ${t+1}`,isLazy:i}})}function Ht(o){let e=o.length;for(;e>0&&o[e-1]?.isSavedBlock;)e--;return e>0?e:Math.max(o.length-1,0)}export{Be as B,Mt as P,Wt as R,At as S,nt as a,Ft as b,It as c,Dt as d,et as e,Qs as f,zt as g,Vt as h,Ut as l,Jt as m,Ht as n,Gt as p,Kt as r};
@@ -0,0 +1 @@
1
+ import{c as $,b as D,j as i,n as I,m as K,r as L,B as T,E as G,t as R}from"./index-D19iAD4s.js";import{ChatLayout as H}from"./index-C6V-s7Mj.js";import{o as W,bp as q,aq as J}from"./agent-icon-CF35JltL.js";import{i as B}from"./UserSquare-YQkID8bv.js";import{B as V}from"./badge-CWKaTosK.js";import{i as X}from"./ArrowRight-DCL3gp96.js";import{T as M}from"./textarea-DCWhTUrR.js";import"./index-C3JbUkAn.js";import{g as A,h as Y,u as Q}from"./use-organization-settings-BEn5xJKT.js";import{c as U}from"./chat-context-D5EEwp_m.js";import{P as Z}from"./schema-BmYiAOGn.js";import"./use-mobile-Dyvncftm.js";import"./tooltip-B3-v7v0W.js";import"./index-DHiZoBJ3.js";import"./MessageCircle01-CDpj4jpt.js";import"./XClose-Dv4YALPV.js";import"./thread-button-CkP3AL0P.js";import"./use-sidebar-collapsed-CiqzdmQp.js";import"./sheet-BDbcvRnu.js";import"./use-chat-layout-state-CAIrZGnL.js";import"./use-panel-navigate-DzpMtCDM.js";import"./thread-route-El3oNOnD.js";import"./use-project-scope-DdM0t1xa.js";import"./repository-binding-CP_PNLcQ.js";import"./use-mcp-client-CCT6q-zj.js";import"./auth-Ry9WrZV8.js";import"./toolbar-icon-button-DIm3azB_.js";import"./use-in-settings-D-n4dJvM.js";import"./resizable-D75nggzL.js";import"./route-page-header-B8C1ZRVD.js";import"./LayoutLeft-DrOR8tOg.js";import"./use-current-view-Cn9H-KAc.js";import"./AlertCircle-jxvwS2PA.js";import"./UserCheck01-VgBUlrC3.js";import"./Tool01-CldemTEe.js";import"./ArrowUp-BbUoh0-h.js";import"./ArrowLeft-Dlf39oKA.js";import"./BookOpen01-C85UtDum.js";import"./Globe04-UMTQ82HG.js";import"./CheckCircle-KztuMvd5.js";import"./ChevronDown-c_BdXEOA.js";import"./ChevronSelectorVertical-DmpvIgAy.js";import"./ChevronUp-BSWVeXQq.js";import"./LinkBroken01-hoBFLv94.js";import"./CreditCard01-C4dCRCdu.js";import"./File02-KoBPCXEf.js";import"./SwitchHorizontal01-B8iZqdiB.js";import"./Eye-BSRrcDT9.js";import"./Fingerprint04-B2N20uu4.js";import"./Image01-BGM1ArTz.js";import"./Key01-BMkzySkS.js";import"./Minus-DdEPrbsD.js";import"./Monitor01-B4iHbF93.js";import"./Sun-D531tFmZ.js";import"./Play-Clz2e0s4.js";import"./Plus-CO40HUhB.js";import"./SearchMd-FI2fcykP.js";import"./ShoppingBag01-BBDr_WSy.js";import"./Trash01-W_zwe5xo.js";import"./Upload01-DDGkOE5t.js";import"./Users01-CJ_YMgJe.js";import"./Zap-DFubAl8b.js";import"./input-DUmEmIMD.js";import"./usage-stats-njGMuDih.js";import"./utils-CVEq3hMx.js";import"./markdown-BNFJrVwN.js";import"./use-copy-BStTcLWM.js";import"./task-board-DQX_apb8.js";import"./gateway-client-Dsg5xVl5.js";import"./form-CCzLKFB7.js";import"./label-B0UwCsXA.js";import"./use-entitlements-BzKQLk_u.js";import"./icon-button-BY-Dtplw.js";import"./file-type-icon-CNUBpmBv.js";import"./use-view-draft-kind-C2cwPb-d.js";import"./use-blog-view-B9cmKJN3.js";import"./thread-intent-BsMPgCKi.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrHa0Ln_.js";import"./session-runtime-DZiu3uM2.js";import"./chat-draft-CL1clhIN.js";import"./use-voice-input-D_lO17n9.js";import"./popover-Bm-_ILu8.js";import"./drawer-CLdqPUpZ.js";import"./use-ai-providers-DFv4_P6Z.js";import"./index-BKZ2GYzY.js";import"./checkbox-DHBAzm3e.js";import"./select-CKa1YoCw.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-DV8AQUwT.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-D9t5Q-Ms.js";import"./toggle-group-fJYx0W9h.js";import"./input-DER1ofMN.js";import"./suggestion-DXAVxjkm.js";import"./use-mcp-prompts-Bxssn6xT.js";import"./use-org-fs-CyfRrBTl.js";import"./useInfiniteQuery-BIIkqC2p.js";import"./infiniteQueryObserver-B1MZYli5.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-Cc43JNfz.js";import"./plan-ladder-DZZeDiD-.js";import"./add-connection-dialog-DyPd4ss_.js";import"./collection-search-Cez2fKoW.js";import"./extract-connection-data-jy3JaUYJ.js";import"./metadata-D72DunRR.js";import"./connection-ByE21sI5.js";import"./url-slug-3v4BmBw0.js";import"./connection-card-v-6X4qws.js";import"./connection-slug-Cu8poN2f.js";import"./integration-icon-LqaI_LSB.js";import"./use-connection-CYsyXyy7.js";import"./schema-Bbiw44C-.js";import"./connection-form-helpers-BZq0bQw7.js";import"./authenticate-and-persist-oauth-ZYDIddXa.js";import"./mcp-oauth-BHqzrP9l.js";import"./mcp-oauth-CIbadsEV.js";import"./collection-tabs-D0yQpVJM.js";import"./use-infinite-scroll-f5g_Vpk-.js";import"./useSuspenseInfiniteQuery-B5PirUR6.js";import"./use-task-board-items-B0KeELtH.js";import"./use-decopilot-events-DsEAOvda.js";import"./pair-DaLtpCvg.js";import"./collapsible-JCTHx5_U.js";import"./task-key-rSXWMPFP.js";import"./config-DpuCRGPS.js";import"./task-route-KYQNiD-8.js";import"./project-index-Dn8Lu82V.js";import"./shell-layout-Lgn8VLZ9.js";import"./use-deployment-admin-HoxFQgZ9.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-BeUR_ZGA.js";import"./command-CALEDfdi.js";import"./index-DS6kB3db.js";import"./project-icon-BpBMspxb.js";import"./use-navigate-to-agent-0M4hsJnf.js";import"./use-debounced-value-Dcq0NTAp.js";import"./new-project-dialog-TULM28H3.js";import"./repository-picker-DCip0P__.js";import"./github-icon-CizbgzyS.js";import"./new-project-store-Dkp4wOSi.js";import"./legacy-admin-welcome-dialog-DgOZFBtI.js";import"./required-auth-layout-B7e3rkXx.js";import"./use-org-sso-BOOKyOjL.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-ChxjPYfG.js";import"./types-6-Ps6AGR.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-U5yvy3ti.js";import"./content-changes-Yn1NpHw-.js";import"./agent-capabilities-CTj-iH2e.js";const ee={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:B,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:W,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:q,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function te(t){const e=$.c(4),{className:a}=t;let o;e[0]!==a?(o=K("block h-2 rounded-full bg-muted",a),e[0]=a,e[1]=o):o=e[1];let l;return e[2]!==o?(l=i.jsx("span",{className:o}),e[2]=o,e[3]=l):l=e[3],l}const ie=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function le(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex flex-col gap-5",children:ie.map(oe)}),t[0]=e):e=t[0],e}function oe(t){return i.jsxs("div",{className:"flex flex-col gap-2.5",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:i.jsx(B,{size:14})}),i.jsx(te,{className:t.title}),i.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:t.value})]}),i.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:i.jsx("div",{className:K("h-full rounded-full",t.fill,t.tone)})})]},t.value)}function se(t){const e=$.c(30),{kind:a}=t,o=D(),l=ee[a];let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=p):p=e[0];let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[p,i.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:i.jsx(le,{})})]}),e[1]=j):j=e[1];let s;e[2]!==o?(s=o("home.comingSoon.badge"),e[2]=o,e[3]=s):s=e[3];let n;e[4]!==s?(n=i.jsx(V,{variant:"muted",children:s}),e[4]=s,e[5]=n):n=e[5];let r;e[6]!==l.heading||e[7]!==o?(r=o(l.heading),e[6]=l.heading,e[7]=o,e[8]=r):r=e[8];let m;e[9]!==r?(m=i.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:r}),e[9]=r,e[10]=m):m=e[10];let c;e[11]!==l.description||e[12]!==o?(c=o(l.description),e[11]=l.description,e[12]=o,e[13]=c):c=e[13];let x;e[14]!==c?(x=i.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:c}),e[14]=c,e[15]=x):x=e[15];let h;e[16]!==n||e[17]!==m||e[18]!==x?(h=i.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[n,m,x]}),e[16]=n,e[17]=m,e[18]=x,e[19]=h):h=e[19];let d;if(e[20]!==l.points||e[21]!==o){let g;e[23]!==o?(g=v=>{const{Icon:N,labelKey:y,tone:z}=v;return i.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[i.jsx("span",{className:K("flex size-9 shrink-0 items-center justify-center rounded-lg",z),children:i.jsx(N,{size:18})}),i.jsx("span",{className:"text-sm text-foreground",children:o(y)})]},y)},e[23]=o,e[24]=g):g=e[24],d=l.points.map(g),e[20]=l.points,e[21]=o,e[22]=d}else d=e[22];let f;e[25]!==d?(f=i.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:d}),e[25]=d,e[26]=f):f=e[26];let b;return e[27]!==f||e[28]!==h?(b=i.jsx(I,{children:i.jsx(I.Content,{children:i.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[j,h,f]})})}),e[27]=f,e[28]=h,e[29]=b):b=e[29],b}function re(t,e){const a=e.idea.trim(),o=e.objective?.trim();return o?t("plan.prompt.withObjective",{idea:a,objective:o}):t("plan.prompt.withoutObjective",{idea:a})}const ae=[{label:"plan.idea.topic.shipping",prompt:"plan.idea.topic.shippingPrompt"},{label:"plan.idea.topic.pdp",prompt:"plan.idea.topic.pdpPrompt"},{label:"plan.idea.topic.checkout",prompt:"plan.idea.topic.checkoutPrompt"},{label:"plan.idea.topic.search",prompt:"plan.idea.topic.searchPrompt"},{label:"plan.idea.topic.performance",prompt:"plan.idea.topic.performancePrompt"},{label:"plan.idea.topic.paidMedia",prompt:"plan.idea.topic.paidMediaPrompt"}];function ne(){const t=$.c(54),e=D(),{createTaskWithMessage:a}=U(),o=A(),[l,p]=L.useState("");let j;t[0]!==l?(j=l.trim(),t[0]=l,t[1]=j):j=t[1];const s=j.length>0;let n;t[2]!==a||t[3]!==l||t[4]!==o||t[5]!==s||t[6]!==e?(n=u=>{u.preventDefault(),s&&(G("plan_idea_submitted",{has_objective:!!o}),a({message:{parts:[{type:"text",text:re(e,{idea:l,objective:o?.statement})}]}}),p(""))},t[2]=a,t[3]=l,t[4]=o,t[5]=s,t[6]=e,t[7]=n):n=t[7];const r=n;let m;t[8]!==e?(m=e("plan.idea.heading"),t[8]=e,t[9]=m):m=t[9];let c;t[10]!==m?(c=i.jsx("h2",{className:"text-xl font-medium text-foreground",children:m}),t[10]=m,t[11]=c):c=t[11];let x;t[12]!==e?(x=e("plan.idea.description"),t[12]=e,t[13]=x):x=t[13];let h;t[14]!==x?(h=i.jsx("p",{className:"text-sm text-pretty text-muted-foreground",children:x}),t[14]=x,t[15]=h):h=t[15];let d;t[16]!==c||t[17]!==h?(d=i.jsxs("div",{className:"flex flex-col gap-1",children:[c,h]}),t[16]=c,t[17]=h,t[18]=d):d=t[18];let f;t[19]!==e?(f=e("plan.idea.label"),t[19]=e,t[20]=f):f=t[20];let b;t[21]!==e?(b=e("plan.idea.placeholder"),t[21]=e,t[22]=b):b=t[22];let g;t[23]===Symbol.for("react.memo_cache_sentinel")?(g=u=>p(u.target.value),t[23]=g):g=t[23];let v;t[24]!==r?(v=u=>{u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&r(u)},t[24]=r,t[25]=v):v=t[25];let N;t[26]!==l||t[27]!==v||t[28]!==f||t[29]!==b?(N=i.jsx(M,{"aria-label":f,placeholder:b,value:l,onChange:g,onKeyDown:v,className:"min-h-32 text-[15px]"}),t[26]=l,t[27]=v,t[28]=f,t[29]=b,t[30]=N):N=t[30];const y=!s;let z;t[31]!==e?(z=e("plan.idea.submit"),t[31]=e,t[32]=z):z=t[32];let C;t[33]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(X,{}),t[33]=C):C=t[33];let P;t[34]!==y||t[35]!==z?(P=i.jsx("div",{className:"flex justify-end",children:i.jsxs(T,{type:"submit",disabled:y,children:[z,C]})}),t[34]=y,t[35]=z,t[36]=P):P=t[36];let E;t[37]!==r||t[38]!==N||t[39]!==P?(E=i.jsxs("form",{onSubmit:r,className:"flex flex-col gap-3",children:[N,P]}),t[37]=r,t[38]=N,t[39]=P,t[40]=E):E=t[40];let w;t[41]!==e?(w=e("plan.idea.startWith"),t[41]=e,t[42]=w):w=t[42];let S;t[43]!==w?(S=i.jsx("span",{className:"mr-1 text-meta",children:w}),t[43]=w,t[44]=S):S=t[44];let _;t[45]!==e?(_=ae.map(u=>i.jsx(T,{type:"button",variant:"outline",size:"sm",onClick:()=>p(F=>F||e(u.prompt)),children:e(u.label)},u.label)),t[45]=e,t[46]=_):_=t[46];let k;t[47]!==S||t[48]!==_?(k=i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[S,_]}),t[47]=S,t[48]=_,t[49]=k):k=t[49];let O;return t[50]!==E||t[51]!==k||t[52]!==d?(O=i.jsxs("section",{className:"flex flex-col gap-4",children:[d,E,k]}),t[50]=E,t[51]=k,t[52]=d,t[53]=O):O=t[53],O}function me(t){const e=$.c(49),{initial:a,onDone:o}=t,l=D(),[p,j]=L.useState(a),s=Y();let n;e[0]!==p?(n=p.trim(),e[0]=p,e[1]=n):n=e[1];const r=n;let m;e[2]!==o||e[3]!==s||e[4]!==l?(m=u=>s.mutate(u,{onSuccess:o,onError:()=>R.error(l("plan.objective.saveError"))}),e[2]=o,e[3]=s,e[4]=l,e[5]=m):m=e[5];const c=m;let x;e[6]!==r||e[7]!==c?(x=u=>{u.preventDefault(),r&&c(r)},e[6]=r,e[7]=c,e[8]=x):x=e[8];const h=x;let d;e[9]!==l?(d=l("plan.objective.label"),e[9]=l,e[10]=d):d=e[10];let f;e[11]!==l?(f=l("plan.objective.placeholder"),e[11]=l,e[12]=f):f=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=u=>j(u.target.value),e[13]=b):b=e[13];let g;e[14]!==p||e[15]!==d||e[16]!==f?(g=i.jsx(M,{"aria-label":d,placeholder:f,value:p,maxLength:Z,onChange:b,className:"min-h-20 text-base",autoFocus:!0}),e[14]=p,e[15]=d,e[16]=f,e[17]=g):g=e[17];let v;e[18]!==l?(v=l("plan.objective.hint"),e[18]=l,e[19]=v):v=e[19];let N;e[20]!==v?(N=i.jsx("span",{className:"text-meta",children:v}),e[20]=v,e[21]=N):N=e[21];let y;e[22]!==a||e[23]!==s.isPending||e[24]!==l||e[25]!==c?(y=a&&i.jsx(T,{type:"button",variant:"ghost",size:"sm",disabled:s.isPending,onClick:()=>c(null),children:l("plan.objective.clear")}),e[22]=a,e[23]=s.isPending,e[24]=l,e[25]=c,e[26]=y):y=e[26];const z=s.isPending;let C;e[27]!==l?(C=l("plan.objective.cancel"),e[27]=l,e[28]=C):C=e[28];let P;e[29]!==o||e[30]!==s.isPending||e[31]!==C?(P=i.jsx(T,{type:"button",variant:"outline",size:"sm",disabled:z,onClick:o,children:C}),e[29]=o,e[30]=s.isPending,e[31]=C,e[32]=P):P=e[32];const E=!r||s.isPending;let w;e[33]!==l?(w=l("plan.objective.save"),e[33]=l,e[34]=w):w=e[34];let S;e[35]!==E||e[36]!==w?(S=i.jsx(T,{type:"submit",size:"sm",disabled:E,children:w}),e[35]=E,e[36]=w,e[37]=S):S=e[37];let _;e[38]!==y||e[39]!==P||e[40]!==S?(_=i.jsxs("div",{className:"ml-auto flex gap-2",children:[y,P,S]}),e[38]=y,e[39]=P,e[40]=S,e[41]=_):_=e[41];let k;e[42]!==_||e[43]!==N?(k=i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[N,_]}),e[42]=_,e[43]=N,e[44]=k):k=e[44];let O;return e[45]!==h||e[46]!==k||e[47]!==g?(O=i.jsxs("form",{onSubmit:h,className:"flex flex-col gap-2",children:[g,k]}),e[45]=h,e[46]=k,e[47]=g,e[48]=O):O=e[48],O}function pe(){const t=$.c(12),e=D(),a=A(),[o,l]=L.useState(!1),p=a?.statement??"";let j;t[0]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx(B,{size:13}),t[0]=j):j=t[0];let s;t[1]!==e?(s=e("plan.objective.eyebrow"),t[1]=e,t[2]=s):s=t[2];let n;t[3]!==s?(n=i.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:[j,s]}),t[3]=s,t[4]=n):n=t[4];let r;t[5]!==o||t[6]!==p||t[7]!==e?(r=o?i.jsx(me,{initial:p,onDone:()=>l(!1)}):p?i.jsxs("div",{className:"flex flex-col items-start gap-3",children:[i.jsx("p",{className:"max-w-[720px] text-2xl leading-snug font-medium text-balance text-foreground",children:p}),i.jsxs(T,{variant:"outline",size:"sm",onClick:()=>l(!0),children:[i.jsx(J,{}),e("plan.objective.edit")]})]}):i.jsxs("div",{className:"flex flex-col items-start gap-3",children:[i.jsx("p",{className:"max-w-[560px] text-base text-pretty text-muted-foreground",children:e("plan.objective.empty")}),i.jsx(T,{variant:"outline",size:"sm",onClick:()=>l(!0),children:e("plan.objective.write")})]}),t[5]=o,t[6]=p,t[7]=e,t[8]=r):r=t[8];let m;return t[9]!==n||t[10]!==r?(m=i.jsxs("section",{className:"flex flex-col gap-3",children:[n,r]}),t[9]=n,t[10]=r,t[11]=m):m=t[11],m}function ce(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(I,{children:i.jsx(I.Content,{children:i.jsxs(I.Container,{width:"standard",className:"flex flex-col gap-12",children:[i.jsx(pe,{}),i.jsx(ne,{})]})})}),t[0]=e):e=t[0],e}function ol(){const t=$.c(2),e=Q("plan_page_enabled");let a;return t[0]!==e?(a=i.jsx(H.Content,{children:e?i.jsx(ce,{}):i.jsx(se,{kind:"plan"})}),t[0]=e,t[1]=a):a=t[1],a}export{ol as default};
@@ -1 +1 @@
1
- import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-C6-0Ff1m.js";import{u as A}from"./use-entitlements-DIoZnc_q.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
1
+ import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-D19iAD4s.js";import{u as A}from"./use-entitlements-BzKQLk_u.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
@@ -1,4 +1,4 @@
1
- import{r as Y,j as s,dX as me,hR as ye,c as G,m as X,b_ as Pe,b as q,a6 as se,am as Z,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aJ as we,aK as Ee,aL as Ae,aM as Ie,b9 as Ue,aN as De,aO as Te,aP as Re,gh as le,gV as ne,i as xe,e0 as pe,b6 as $e,as as Be,au as Le,L as ke,gG as He}from"./index-C6-0Ff1m.js";import{s as Oe}from"./Plus-CF8KlFVc.js";import{B as Fe}from"./badge-BcMIPtVj.js";import{a as Me,b as ze,P as Ve}from"./popover-DTBVeUtG.js";import{a as ce,T as Ge}from"./toggle-group-CbJrGPYf.js";import{g as Ke}from"./use-ai-providers-pXYGEzkI.js";import{u as ie,d as he,a as qe}from"./use-entitlements-DIoZnc_q.js";import{u as Qe,P as Ye}from"./plan-ladder-DDAcm-ji.js";var re="Progress",oe=100,[Xe]=ye(re),[Ze,Je]=Xe(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Ze,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
1
+ import{r as Y,j as s,dX as me,hR as ye,c as G,m as X,b_ as Pe,b as q,a6 as se,am as Z,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aJ as we,aK as Ee,aL as Ae,aM as Ie,b9 as Ue,aN as De,aO as Te,aP as Re,gh as le,gV as ne,i as xe,e0 as pe,b6 as $e,as as Be,au as Le,L as ke,gG as He}from"./index-D19iAD4s.js";import{s as Oe}from"./Plus-CO40HUhB.js";import{B as Fe}from"./badge-CWKaTosK.js";import{a as Me,b as ze,P as Ve}from"./popover-Bm-_ILu8.js";import{a as ce,T as Ge}from"./toggle-group-fJYx0W9h.js";import{g as Ke}from"./use-ai-providers-DFv4_P6Z.js";import{u as ie,d as he,a as qe}from"./use-entitlements-BzKQLk_u.js";import{u as Qe,P as Ye}from"./plan-ladder-DZZeDiD-.js";var re="Progress",oe=100,[Xe]=ye(re),[Ze,Je]=Xe(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Ze,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
2
  - a positive number
3
3
  - less than the value passed to \`max\` (or ${oe} if no \`max\` prop is set)
4
4
  - \`null\` or \`undefined\` if the progress is indeterminate.
@@ -1 +1 @@
1
- import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-C6-0Ff1m.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
1
+ import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-D19iAD4s.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
@@ -0,0 +1 @@
1
+ import{c as it,b as pt,r as at,J as jt,j as e,m as et,B as tt,au as Ct}from"./index-D19iAD4s.js";import{F as Nt}from"./agent-icon-CF35JltL.js";import{b as Dt}from"./UserCheck01-VgBUlrC3.js";import{s as kt}from"./Plus-CO40HUhB.js";import{S as St}from"./scroll-area-ZYmkOMr8.js";import{c as wt,s as Tt,b as ct,a as dt}from"./date-utils-CrvIKg-s.js";import{N as zt}from"./category-tree-rhKblFsZ.js";import{g as Et,d as Pt}from"./item-actions-BQdANZXs.js";import"./AlertCircle-jxvwS2PA.js";import"./Tool01-CldemTEe.js";import"./ArrowUp-BbUoh0-h.js";import"./ArrowLeft-Dlf39oKA.js";import"./ArrowRight-DCL3gp96.js";import"./BookOpen01-C85UtDum.js";import"./Globe04-UMTQ82HG.js";import"./CheckCircle-KztuMvd5.js";import"./ChevronDown-c_BdXEOA.js";import"./ChevronSelectorVertical-DmpvIgAy.js";import"./ChevronUp-BSWVeXQq.js";import"./UserSquare-YQkID8bv.js";import"./LinkBroken01-hoBFLv94.js";import"./CreditCard01-C4dCRCdu.js";import"./File02-KoBPCXEf.js";import"./MessageCircle01-CDpj4jpt.js";import"./SwitchHorizontal01-B8iZqdiB.js";import"./Eye-BSRrcDT9.js";import"./Fingerprint04-B2N20uu4.js";import"./Image01-BGM1ArTz.js";import"./Key01-BMkzySkS.js";import"./LayoutLeft-DrOR8tOg.js";import"./Minus-DdEPrbsD.js";import"./Monitor01-B4iHbF93.js";import"./Sun-D531tFmZ.js";import"./Play-Clz2e0s4.js";import"./SearchMd-FI2fcykP.js";import"./ShoppingBag01-BBDr_WSy.js";import"./Trash01-W_zwe5xo.js";import"./Upload01-DDGkOE5t.js";import"./Users01-CJ_YMgJe.js";import"./XClose-Dv4YALPV.js";import"./Zap-DFubAl8b.js";import"./index-BdQq_4o_.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DaLtpCvg.js";import"./collapsible-JCTHx5_U.js";import"./use-copy-BStTcLWM.js";import"./usage-stats-njGMuDih.js";import"./utils-CVEq3hMx.js";import"./markdown-BNFJrVwN.js";import"./chat-context-D5EEwp_m.js";import"./use-panel-navigate-DzpMtCDM.js";import"./thread-route-El3oNOnD.js";import"./use-project-scope-DdM0t1xa.js";import"./repository-binding-CP_PNLcQ.js";import"./use-mcp-client-CCT6q-zj.js";import"./auth-Ry9WrZV8.js";import"./use-view-draft-kind-C2cwPb-d.js";import"./use-blog-view-B9cmKJN3.js";import"./use-organization-settings-BEn5xJKT.js";import"./schema-BmYiAOGn.js";import"./task-board-DQX_apb8.js";import"./thread-intent-BsMPgCKi.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrHa0Ln_.js";import"./session-runtime-DZiu3uM2.js";import"./use-entitlements-BzKQLk_u.js";import"./use-ai-providers-DFv4_P6Z.js";import"./use-current-view-Cn9H-KAc.js";import"./use-in-settings-D-n4dJvM.js";import"./use-decopilot-events-DsEAOvda.js";import"./use-mobile-Dyvncftm.js";import"./tooltip-B3-v7v0W.js";import"./index-DHiZoBJ3.js";import"./gateway-client-Dsg5xVl5.js";import"./form-CCzLKFB7.js";import"./label-B0UwCsXA.js";import"./task-key-rSXWMPFP.js";import"./use-task-board-items-B0KeELtH.js";import"./config-DpuCRGPS.js";import"./task-route-KYQNiD-8.js";import"./project-index-Dn8Lu82V.js";import"./shell-layout-Lgn8VLZ9.js";import"./use-deployment-admin-HoxFQgZ9.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-BeUR_ZGA.js";import"./command-CALEDfdi.js";import"./index-DS6kB3db.js";import"./integration-icon-LqaI_LSB.js";import"./project-icon-BpBMspxb.js";import"./use-navigate-to-agent-0M4hsJnf.js";import"./use-debounced-value-Dcq0NTAp.js";import"./new-project-dialog-TULM28H3.js";import"./repository-picker-DCip0P__.js";import"./github-icon-CizbgzyS.js";import"./useInfiniteQuery-BIIkqC2p.js";import"./infiniteQueryObserver-B1MZYli5.js";import"./collection-search-Cez2fKoW.js";import"./new-project-store-Dkp4wOSi.js";import"./legacy-admin-welcome-dialog-DgOZFBtI.js";import"./drawer-CLdqPUpZ.js";import"./required-auth-layout-B7e3rkXx.js";import"./use-org-sso-BOOKyOjL.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-ChxjPYfG.js";import"./types-6-Ps6AGR.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-BDbcvRnu.js";import"./use-connection-CYsyXyy7.js";import"./use-mcp-prompts-Bxssn6xT.js";import"./use-thread-outputs-U5yvy3ti.js";import"./file-type-icon-CNUBpmBv.js";import"./section-array-field-D3J7UHmj.js";import"./blocks-tab-states-DDvkpFWf.js";import"./site-editor-toast-QCYxwt4C.js";import"./content-changes-Yn1NpHw-.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-CdcsfdkO.js";import"./use-blocks-v8-project-DjyJGATt.js";import"./use-voice-input-D_lO17n9.js";import"./popover-Bm-_ILu8.js";import"./index-BKZ2GYzY.js";import"./checkbox-DHBAzm3e.js";import"./select-CKa1YoCw.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-CWN91Q0R.js";import"./sandbox-git-api-B73fIbEU.js";import"./empty-state-CHF2Jno9.js";import"./badge-CWKaTosK.js";import"./empty-state-BM_yXYSI.js";import"./delete-copy-CyOQI_UN.js";import"./use-never-published-BsVhVpS1.js";import"./hosted-reconcile-BT71cbCZ.js";import"./search-input-Dfgi3Bm0.js";import"./tabs-DV8AQUwT.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-Caaj88sr.js";import"./asset-utils-DRModSGS.js";import"./index-D146A7MA.js";import"./match-site-slug-config-B47_xZCi.js";import"./textarea-DCWhTUrR.js";import"./primitives-DlHl12Ki.js";import"./use-move-blocks-pw3TQRyc.js";import"./monaco-editor-oNRDmlFg.js";import"./editor-fCTeAQ3h.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-secondary-hover hover:text-accent-foreground";function vo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:m,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[j,C]=at.useState(null),[rt]=jt(),[n,f]=at.useState(It),p=rt.language;let N;t[0]!==n||t[1]!==p?(N=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=N):N=t[2];const y=N;let x,u,l,c,v,k,S,w,T,z;if(t[3]!==n||t[4]!==b||t[5]!==j||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==m||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=Et(zt(b)),st=wt(n),bt=Tt(new Date);u="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let H;t[27]!==I?(H=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:I}),t[27]=I,t[28]=H):H=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Mt),t[29]=Q):Q=t[29];let U;t[30]!==r?(U=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=U):U=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let _;t[33]!==U?(_=e.jsx(tt,{variant:"ghost",size:"icon",onClick:Q,"aria-label":U,children:V}),t[33]=U,t[34]=_):_=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Lt),t[35]=X):X=t[35];let $;t[36]!==r?($=r("sandbox.postCalendar.next"),t[36]=r,t[37]=$):$=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Ct,{size:16}),t[38]=Y):Y=t[38];let F;t[39]!==$?(F=e.jsx(tt,{variant:"ghost",size:"icon",onClick:X,"aria-label":$,children:Y}),t[39]=$,t[40]=F):F=t[40];let O;t[41]!==y?(O=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=O):O=t[42];let B;t[43]!==r?(B=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=B):B=t[44];let R;t[45]!==B?(R=e.jsx(mt,{className:ft,label:B}),t[45]=B,t[46]=R):R=t[46];let A;t[47]!==r?(A=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=A):A=t[48];let K;t[49]!==A?(K=e.jsx(mt,{className:xt,label:A}),t[49]=A,t[50]=K):K=t[50];let W;t[51]!==R||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[R,K]}),t[51]=R,t[52]=K,t[53]=W):W=t[53],t[54]!==H||t[55]!==_||t[56]!==F||t[57]!==O||t[58]!==W?(l=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[H,_,F,O,W]}),t[54]=H,t[55]=_,t[56]=F,t[57]=O,t[58]=W,t[59]=l):l=t[59],z="relative flex-1 min-h-0",x=St,T="h-full",S="flex min-w-[880px] gap-4 p-4";let J;t[60]!==r?(J=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=J):J=t[61];let Z;t[62]!==J?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:J}),t[62]=J,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(a=>e.jsx("div",{className:"px-2 text-2xs text-muted-foreground",children:ut.format(a)},a.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(a=>{const yt=a.getMonth()===n.getMonth(),vt=ht.get(Pt(a))??[];return e.jsxs("div",{onDragOver:g=>{j&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const lt=g.dataTransfer.getData("text/plain");C(null),lt&&i(lt,a)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",j&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",a.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:a.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon-xs",className:"opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>m(a),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(a)}),children:e.jsx(kt,{size:14})})]}),vt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:C},g.post.key))]},a.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",v=e.jsx("p",{className:"px-1 text-2xs font-medium text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Nt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(a=>e.jsx(nt,{entry:a,active:a.post.key===d,draggable:!1,onSelect:o,onDragStateChange:C},a.post.key)),t[3]=n,t[4]=b,t[5]=j,t[6]=s,t[7]=p,t[8]=y,t[9]=m,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=l,t[17]=c,t[18]=v,t[19]=k,t[20]=S,t[21]=w,t[22]=T,t[23]=z}else x=t[14],u=t[15],l=t[16],c=t[17],v=t[18],k=t[19],S=t[20],w=t[21],T=t[22],z=t[23];let E;t[64]!==c||t[65]!==v||t[66]!==k?(E=e.jsxs("div",{className:c,children:[v,k]}),t[64]=c,t[65]=v,t[66]=k,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==x||t[73]!==P||t[74]!==T?(L=e.jsx(x,{className:T,children:P}),t[72]=x,t[73]=P,t[74]=T,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==z?(M=e.jsx("div",{className:z,children:L}),t[76]=L,t[77]=z,t[78]=M):M=t[78];let q;return t[79]!==u||t[80]!==l||t[81]!==M?(q=e.jsxs("div",{className:u,children:[l,M]}),t[79]=u,t[80]=l,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function It(){return ct(new Date)}function mt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let i;return t[4]!==d||t[5]!==m?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,d]}),t[4]=d,t[5]=m,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:m,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,j=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let C;t[0]!==D||t[1]!==j?(C=D(j),t[0]=D,t[1]=j,t[2]=C):C=t[2];const rt=C;let n;t[3]!==i||t[4]!==s.key?(n=v=>{v.dataTransfer.setData("text/plain",s.key),v.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==m||t[9]!==s.key?(p=()=>m(s.key),t[8]=m,t[9]=s.key,t[10]=p):p=t[10];const N=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let l;t[11]!==y||t[12]!==x||t[13]!==u?(l=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=l):l=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==l||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==N?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:N,className:l,children:s.title}),t[15]=o,t[16]=s.title,t[17]=l,t[18]=n,t[19]=f,t[20]=p,t[21]=N,t[22]=c):c=t[22],c}export{vo as PostCalendar};
@@ -1,2 +1,2 @@
1
- import{b as ee,am as it,r as K,j as t,B as Le,D as lt,v as at,w as nt,x as rt,aU as ct,aY as dt,m as Be,y as mt,t as we,c as se,bu as pt,a9 as ut,aP as ft,aO as xt,aL as ht,aJ as gt,aK as bt,aN as jt,aM as vt,b9 as yt,h as St,ba as Et,I as Ae}from"./index-C6-0Ff1m.js";import{u as kt}from"./chat-context-BXxmldjV.js";import{i as Oe}from"./AlertCircle-CYAsQRdT.js";import{aE as Ct,by as _t,Z as Pt,an as Nt}from"./agent-icon-SasBmPrY.js";import{d as Tt}from"./UserSquare-a_XazovD.js";import{i as Lt,a as wt}from"./UserCheck01-DLUgjW3m.js";import{s as Dt}from"./Trash01-DXQWI50A.js";import{s as Bt}from"./XClose-DxbjiApV.js";import{L as te}from"./label-Cq7ohFeR.js";import{M as At}from"./multi-select-D6S763-B.js";import{b as It,a as Ft,T as Ge,c as We}from"./tabs-CT50lxBB.js";import{S as Ot}from"./switch-6JKp3FKO.js";import{T as Ze}from"./textarea-C3LFFo0w.js";import{S as zt,I as Rt}from"./save-status-DEylj8_h.js";import{u as $t,I as qt,a as Fe,B as Mt,R as Ut}from"./block-document-BBR-lAQh.js";import{R as Ht,e as Vt,H as Gt,u as Wt,f as Re,N as Yt}from"./held-block-view-ByNmqPhe.js";import{b as Kt,C as Qt,K as Zt}from"./blog-schema-DbGoS5dM.js";import{a6 as Jt,N as Xt,a as es,d as ts,f as ss,a7 as os,a8 as is,a9 as ls,m as Ye,p as Je,aa as as,I as Xe,a3 as ns,a2 as rs,ab as cs,Q as ds}from"./category-tree-CUP3rQKK.js";import{s as B,E as ms,R as ps,A as us,a as fs}from"./primitives-K9ug68v7.js";import{c as $e,T as qe,a as Me}from"./tooltip-BnL5r8Gv.js";import{f as xs,d as hs,b as gs}from"./blog-preview-url-DZyvHdU6.js";import{e as bs,f as js,g as Ke,u as vs,a as ys,d as Ss}from"./delete-copy-CGGKQ10f.js";import{u as Es}from"./use-ai-providers-pXYGEzkI.js";import{u as ks}from"./use-delete-block-DDUTXhNF.js";import{F as Cs,u as _s,a as Ps,k as Ns}from"./use-never-published-DpnSCkDS.js";import{u as Ts}from"./use-fast-preview-draft-url-D9LB_eIt.js";import{u as Ls}from"./use-autosave-ONtBLfOU.js";import{b as ws}from"./repository-binding-Do6sAdct.js";import{u as Ds}from"./use-file-configs-I6vvS9gB.js";import{m as Bs}from"./match-site-slug-config-B47_xZCi.js";import{a as As}from"./Image01-DZmu7hyy.js";import{e as Is}from"./Tool01-BpBS8dw-.js";import{a as Fs,E as Os,u as zs}from"./usage-stats-DX8XXFQ9.js";import{s as Rs}from"./suggestion-DoHjrPPW.js";import{E as $s,T as Ue}from"./editor-classes-D4G_DIGw.js";import{u as qs}from"./site-editor-toast-C2OaHizl.js";import"./use-panel-navigate-CkYTugDF.js";import"./thread-route-DY_UV0gu.js";import"./use-project-scope-DwQViH2f.js";import"./use-view-draft-kind-DrDbO3-P.js";import"./use-blog-view-BHifDign.js";import"./use-organization-settings-BmAIEgEL.js";import"./schema-DiSJ8SEc.js";import"./task-board-DNboqZMy.js";import"./thread-intent-j3i3V7mR.js";import"./use-mcp-client-Bg8mQo9f.js";import"./auth-C---Zkvq.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DdE7kwP2.js";import"./session-runtime-fXa5psFL.js";import"./use-entitlements-DIoZnc_q.js";import"./use-current-view-0HWp9lHl.js";import"./use-in-settings-DxzX6GVb.js";import"./use-decopilot-events-B1JmbrrX.js";import"./ArrowUp-CsFg9VL2.js";import"./ArrowLeft-zHVY_XX0.js";import"./ArrowRight-B6vgPWbg.js";import"./BookOpen01-AamEOlRO.js";import"./Globe04-OZ9xS3Lx.js";import"./CheckCircle-BB00e9u8.js";import"./TrendUp01-CdeGaAD9.js";import"./ChevronDown-CD0tZl8C.js";import"./ChevronSelectorVertical-CmQsMnAL.js";import"./ChevronUp-DGDvzrMe.js";import"./LinkBroken01-BxVMIk5A.js";import"./CreditCard01-W8t7hmzJ.js";import"./File02-o8s5093L.js";import"./MessageCircle01-D1dT92x6.js";import"./SwitchHorizontal01-BSGnkDXI.js";import"./Eye-nqlQ004P.js";import"./Fingerprint04-DY8McBak.js";import"./Key01-CSQOqmIz.js";import"./LayoutLeft-BSo5LCFE.js";import"./Minus-D2jrgo3d.js";import"./Monitor01-COmDHQ1j.js";import"./Sun-Bji8LMRX.js";import"./Play-JVQd8C8L.js";import"./Plus-CF8KlFVc.js";import"./SearchMd-Cw05gj7E.js";import"./ShoppingBag01-Cc2EJvA-.js";import"./Upload01-BXiTGuBV.js";import"./Users01-BpOXj9ap.js";import"./Zap-QnlW2BG3.js";import"./badge-BcMIPtVj.js";import"./checkbox-DcLJM3uK.js";import"./command-CjjWneJ9.js";import"./index-BPvQqOSy.js";import"./popover-DTBVeUtG.js";import"./active-indicator-CCMhAsc_.js";import"./toggle-group-CbJrGPYf.js";import"./asset-utils-CJa90ZGO.js";import"./useInfiniteQuery-B5jgBAwp.js";import"./infiniteQueryObserver-CiZgrwb3.js";import"./task-key-DgbGUF2j.js";import"./sortable.esm-BulVoRsH.js";import"./product-picker-dialog-ujfDfMoL.js";import"./index-ByOLAuLS.js";import"./index-MxNSCTK9.js";import"./blocks-tab-states-CmsgKSWv.js";import"./sandbox-url-D3mC8qhT.js";import"./use-voice-input-ChVzBkTC.js";import"./drawer-JbzUShND.js";import"./use-mobile-IMVhNYT_.js";import"./index-CqirF9LN.js";import"./select-Chdk1xe9.js";import"./index-BdQq_4o_.js";import"./index-ZdVMGNX_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./empty-state-BnFVKQvv.js";import"./utils-CalvUBc1.js";import"./calendar-oyktWjjy.js";import"./section-array-field-dPI_sYd7.js";import"./named-rule-step-ISshG07e.js";import"./slider-DaeRBQVD.js";import"./index-DWqgNqna.js";import"./tooltipContext-DvsqpzJf.js";import"./CategoricalChart-DfjY1woJ.js";import"./index-CMjqNIsi.js";import"./combobox-3XSCcZHm.js";import"./scroll-area-BSx_oSJx.js";import"./hosted-reconcile-CgC-Mb3M.js";import"./collapsible-B8lX7LSm.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BKCcX4sy.js";import"./use-copy-BRwsGSGM.js";import"./use-task-board-items-CygST8NV.js";import"./config-DMRaGUqI.js";import"./task-route-DUKKS-kP.js";import"./project-index-I2IwZ_L4.js";import"./utils-CVEq3hMx.js";import"./shell-layout-CuBXiCpv.js";import"./use-deployment-admin-KnQTKRss.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-DOVWyuaL.js";import"./integration-icon-BIQ_3p0x.js";import"./project-icon-CGc9ojaV.js";import"./use-navigate-to-agent-WJ7w-8ZZ.js";import"./use-debounced-value-Dw3dFt4C.js";import"./new-project-dialog-Ch6wUMKc.js";import"./repository-picker-B9qWS0uH.js";import"./github-icon-hFwcbgKP.js";import"./collection-search-ioGjJlri.js";import"./new-project-store-BJVEZe7t.js";import"./legacy-admin-welcome-dialog-Cdla_zr3.js";import"./required-auth-layout-BwuuU3bJ.js";import"./use-org-sso-D7w6nhfD.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BV5sVhom.js";import"./types-9tZ4hN1z.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./gateway-client-BQlD2psO.js";import"./markdown-5RMcvWqV.js";import"./sheet-XJvcudCi.js";import"./use-connection-D5_bE1jX.js";import"./use-mcp-prompts-DPiL3LQv.js";import"./use-thread-outputs-U0o_TC58.js";import"./file-type-icon-nU6c9OQr.js";import"./use-move-blocks-BVaiu02r.js";import"./sandbox-git-api-B3EnJ01P.js";import"./search-input-DE_voviB.js";import"./form-Dx1EBvxh.js";import"./use-sandbox-events-DwjSc3R2.js";import"./use-blocks-v8-project-z5uA6d0S.js";const De=l=>typeof l=="string"?l:"",Ms={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'"};function et(l){const e=[];let s=0,a=!1;for(;s<l.length;){if(l[s]==="<"){const c=l.indexOf(">",s);s=c<0?l.length:c+1;continue}let o=l[s]??"",n=s+1;if(l[s]==="&"){const c=l.indexOf(";",s);if(c>=0&&c-s<=10){const i=Ms[l.slice(s,c+1).toLowerCase()];i!==void 0&&(o=i,n=c+1)}}const d=s;if(s=n,/\s/.test(o)){if(a){const c=e[e.length-1];c&&(c.end=n);continue}e.push({ch:" ",start:d,end:n}),a=!0}else e.push({ch:o,start:d,end:n}),a=!1}return{text:e.map(o=>o.ch).join(""),chars:e}}function Us(l){return et(l).text.trim()}function Hs(l){const e=[];for(const s of l)switch(Jt(De(s.__resolveType))){case"Paragraph":e.push(Us(De(s.html)));break;case"Heading":e.push(De(s.text));break;case"Quote":e.push(De(s.quote));break;case"List":e.push(De(s.items));break}return e.filter(Boolean).join(`
2
- `)}function Vs(l){return l.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function Gs(l,e){const s=l.slice(0,e);return s.lastIndexOf("<a")>s.lastIndexOf("</a")}function Ws(l,e,s){const a=e.trim();if(!a||!s)return{blocks:l,applied:!1};for(let o=0;o<l.length;o++){const n=l[o];if(!n||typeof n.html!="string")continue;const d=n.html,{text:c,chars:i}=et(d);let m=c.indexOf(a);for(;m>=0;){const g=i[m],x=i[m+a.length-1];if(g&&x){const h=g.start,r=x.end,u=d.slice(h,r);if(!u.includes("<")&&!Gs(d,h)){const p=d.slice(0,h)+`<a href="${Vs(s)}">${u}</a>`+d.slice(r),f=l.slice();return f[o]={...n,html:p},{blocks:f,applied:!0}}}m=c.indexOf(a,m+1)}}return{blocks:l,applied:!1}}function Ys(l,e){let s=l,a=0;for(const o of e){const n=Ws(s,o.quote,o.href);n.applied&&(s=n.blocks,a++)}return{blocks:s,applied:a}}function Ks({virtualMcpId:l,decofile:e,sections:s,currentKey:a,meta:o,hasAi:n,onApply:d}){const c=ee(),i=it(),[m,g]=K.useState(!1),[x,h]=K.useState(!1),[r,u]=K.useState([]),[p,f]=K.useState(new Set),S=xs(e,o),C=Xt(e).filter(j=>j.key!==a&&j.slug),w=async()=>{h(!0);try{const j=Hs(s),_=await i.call("BLOG_SITE_GROUND",{virtualMcpId:l,purpose:"link"}).catch(k=>{console.warn("[linkSuggest] grounding failed",k)}),E=await i.call("BLOG_LINK_SUGGEST",{virtualMcpId:l,body:j,posts:C.map(k=>({title:k.title,slug:k.slug})),grounding:_?{report:_.report,outcome:_.outcome}:void 0}),P=[],b=new Set;for(const k of E.suggestions){const T=C.find(z=>z.slug===k.slug);if(!T||!S)continue;const A=hs(S,{category:T.categorySlugs[0]??"",slug:T.slug});if(!A||!j.includes(k.quote))continue;const I=`${k.quote}→${T.slug}`;b.has(I)||(b.add(I),P.push({quote:k.quote,href:A,title:T.title}))}u(P),f(new Set(P.map((k,T)=>T))),g(!0),P.length===0&&we.info(c("sandbox.linkSuggest.none"))}catch(j){we.error(j instanceof Error?j.message:c("sandbox.linkSuggest.failed"))}finally{h(!1)}},N=j=>f(_=>{const E=new Set(_);return E.has(j)?E.delete(j):E.add(j),E}),q=()=>{const j=r.filter((P,b)=>p.has(b)).map(P=>({quote:P.quote,href:P.href})),{blocks:_,applied:E}=Ys(s,j);d(_),g(!1),we.success(c("sandbox.linkSuggest.applied",{count:String(E)}))};return t.jsxs(t.Fragment,{children:[t.jsxs(Le,{type:"button",variant:"outline",size:"sm",disabled:x||!n||C.length===0,title:n?C.length===0?c("sandbox.linkSuggest.noCandidates"):c("sandbox.linkSuggest.hint"):c("sandbox.autonomous.noAiProvider"),onClick:()=>{w()},children:[x?t.jsx(Lt,{size:14,className:"animate-spin"}):t.jsx(Ct,{size:14}),c("sandbox.linkSuggest.button")]}),t.jsx(lt,{open:m,onOpenChange:g,children:t.jsxs(at,{className:"max-h-[85vh] sm:max-w-lg",children:[t.jsxs(nt,{children:[t.jsx(rt,{children:c("sandbox.linkSuggest.title")}),t.jsx(ct,{children:c("sandbox.linkSuggest.description")})]}),r.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:c("sandbox.linkSuggest.none")}):t.jsx("ul",{className:"max-h-[50vh] space-y-1 overflow-y-auto",children:r.map((j,_)=>{const E=p.has(_);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>N(_),"aria-pressed":E,className:"flex w-full items-start gap-2.5 rounded-lg border p-2.5 text-left transition-colors hover:bg-accent",children:[t.jsx("span",{className:Be("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border",E?"border-primary bg-primary text-primary-foreground":"border-input"),children:E&&t.jsx(dt,{size:11})}),t.jsxs("span",{className:"min-w-0 flex-1 text-sm",children:[t.jsxs("span",{className:"font-medium",children:["“",j.quote,"”"]}),t.jsxs("span",{className:"text-muted-foreground",children:[" → ",j.title]})]})]})},`${j.quote}-${j.href}`)})}),t.jsx(mt,{children:t.jsx(Le,{type:"button",disabled:p.size===0,onClick:q,children:c("sandbox.linkSuggest.apply",{count:String(p.size)})})})]})})]})}const Qs={unit:"pt",initial:12,min:6,max:96},Zs=["outline-none min-h-80 px-4 py-3 text-[15px] leading-relaxed text-foreground","[&>*:first-child]:mt-0 [&_p]:my-3","[&_h1]:mb-3 [&_h1]:mt-6 [&_h1]:text-3xl [&_h1]:font-bold","[&_h2]:mb-3 [&_h2]:mt-6 [&_h2]:text-2xl [&_h2]:font-bold","[&_h3]:mb-2 [&_h3]:mt-5 [&_h3]:text-xl [&_h3]:font-bold","[&_h4]:mb-2 [&_h4]:mt-4 [&_h4]:text-lg [&_h4]:font-bold","[&_h5]:mb-2 [&_h5]:mt-4 [&_h5]:text-base [&_h5]:font-bold","[&_h6]:mb-2 [&_h6]:mt-4 [&_h6]:text-sm [&_h6]:font-bold","[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-6 [&_li>p]:my-1","[&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground","[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm","[&_img]:inline-block [&_img]:h-auto [&_img]:max-w-full","[&_img.ProseMirror-selectednode]:outline-2 [&_img.ProseMirror-selectednode]:outline-primary","[&_table]:my-3 [&_table]:w-full [&_table]:border-collapse [&_td>p]:my-0 [&_th>p]:my-0","[&_td]:border [&_td]:border-border [&_td]:p-2 [&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:p-2","[&_strong]:font-bold",$s],Js=["[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none"];function Xs({editor:l,virtualMcpId:e}){const s=ws(e),a=Ds(),o=Bs(a.data?.configs??[],pt(s),s?.metadata?.assetStorageConfigId)?.id,n=ee(),[d,c]=K.useState(!1),[i,m]=K.useState(null),[g,x]=K.useState(null),h=p=>{l.chain().setImage({src:p}).run()},r=()=>{m(null),x(null)},u=()=>{const p=(i??"").trim(),f=Ke(p);if(!f&&p){x(p.toLowerCase().startsWith("data:")?n("sandbox.postEditor.legacyImageDataUrl"):n("sectionsEditor.imageField.unsafeUrl"));return}f&&h(f),r()};return t.jsxs("div",{className:"flex items-center gap-0.5",children:[t.jsx(Ue,{active:d,label:n("sandbox.postEditor.legacyInsertImage"),onClick:()=>c(!0),children:t.jsx(Is,{size:14})}),t.jsx(Ue,{active:i!==null,label:n("sandbox.postEditor.legacyInsertImageUrl"),onClick:()=>i===null?m(""):u(),children:t.jsx(As,{size:14})}),i!==null&&t.jsx(qt,{draft:i,notice:g,label:n("sandbox.postEditor.legacyInsertImageUrl"),placeholder:n("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:p=>{x(null),m(p)},onCommit:u,onCancel:r}),t.jsx(Cs,{open:d,onOpenChange:c,mode:"image",lockedConfigId:o,onSelect:p=>{const f=Ke(p);f&&h(f)}})]})}function eo(l){const e=se.c(22),{editor:s,virtualMcpId:a}=l,o=ee(),[n,d]=K.useState(!1);let c;e[0]!==s?(c={editor:s,selector:to},e[0]=s,e[1]=c):c=e[1];const i=zs(c);let m;e[2]!==s||e[3]!==n||e[4]!==i.highlight?(m=t.jsx(Vt,{editor:s,mark:"highlight",currentColor:i.highlight,open:n,onOpenChange:d}),e[2]=s,e[3]=n,e[4]=i.highlight,e[5]=m):m=e[5];const g=i.codeBlock;let x;e[6]!==o?(x=o("sandbox.postEditor.legacyCodeBlock"),e[6]=o,e[7]=x):x=e[7];let h;e[8]!==s?(h=()=>s.chain().focus().toggleCodeBlock().run(),e[8]=s,e[9]=h):h=e[9];let r;e[10]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(_t,{size:14}),e[10]=r):r=e[10];let u;e[11]!==i.codeBlock||e[12]!==x||e[13]!==h?(u=t.jsx(Ue,{active:g,label:x,onClick:h,children:r}),e[11]=i.codeBlock,e[12]=x,e[13]=h,e[14]=u):u=e[14];let p;e[15]!==s||e[16]!==a?(p=t.jsx(Xs,{editor:s,virtualMcpId:a}),e[15]=s,e[16]=a,e[17]=p):p=e[17];let f;return e[18]!==m||e[19]!==u||e[20]!==p?(f=t.jsxs(t.Fragment,{children:[m,u,p]}),e[18]=m,e[19]=u,e[20]=p,e[21]=f):f=e[21],f}function to(l){const{editor:e}=l;return{highlight:e.isActive("highlight")?e.getAttributes("highlight").color??null:null,codeBlock:e.isActive("codeBlock")}}function so({value:l,onChange:e,decofile:s,sandboxRef:a}){const o=ee(),n=K.useRef(e);n.current=e;const d=Fs({extensions:[...js(),Rs.configure({placeholder:o("sandbox.postEditor.legacyContentPlaceholder")})],content:l,editorProps:{attributes:{class:Be(Zs)}},onUpdate:({editor:i})=>{n.current(bs(i.getHTML()))}}),c=$t({decofile:s,sandboxRef:a});return d?t.jsxs("div",{className:"rounded-[var(--studio-surface-radius,var(--radius-md))] border shadow-edge border-input",children:[t.jsx(Ht,{editor:d,fontSize:Qs,linkSources:c,extras:t.jsx(eo,{editor:d,virtualMcpId:a?.virtualMcpId})}),t.jsx(Os,{editor:d,className:Be("max-h-[70vh] overflow-y-auto",Js)})]}):null}function oo(l){return Array.isArray(l)?l.map(e=>({key:B(e?.key),value:B(e?.value)})):[]}function io({orgSlug:l,virtualMcpId:e,branch:s,blockKey:a,block:o,decofile:n,meta:d,previewBaseUrl:c,move:i,onClose:m,expanded:g,onToggleExpand:x,onDeleted:h}){const r=ee(),u=kt()?.taskId??null,p=_s({orgSlug:l,virtualMcpId:e,branch:s},{holdsCopy:!0}),f=ks({orgSlug:l,virtualMcpId:e,branch:s}),S=qs(e,s),C=S.kind==="protocol"&&S.source==="github",w=Ps({orgSlug:l,virtualMcpId:e,branch:s}),N=Es().length>0,q=vs(),j=ys(e),_=Ts({orgSlug:l,virtualMcpId:e,branch:s}),E=es(o,"posts"),P=v=>{const X=p.shown(v);return X?{[v]:X}:{}},[b,k,T,A]=Ls(E,v=>{p.mutate({blockKey:a,data:ts(a,ss(v))})},{isSaving:p.isPending,onSeed:()=>p.hold(a)}),[I,z]=K.useState(a);I!==a&&(z(a),T(E));const M=v=>{T(b),i.apply(a,v,b,()=>P(a))},D=(v,X)=>k({...b,[v]:X}),U=Kt("posts",d,Zt),R=Wt({orgSlug:l,virtualMcpId:e,branch:s},n),Q=R.save,[H,V]=K.useState(0),F=gs({decofile:n,post:b,previewBaseUrl:c,draftPointer:_,meta:d}),G=os(n,"posts",a,B(b.title)),Z=is(b),[W,$]=K.useState(!1),Y=async()=>{T(b);try{const v=await f.mutateAsync({blockKey:a,shown:()=>p.shown(a)});if($(!1),Ns(v))return;we.success(r("sandbox.postEditor.deletePostSuccess",{title:B(b.title)})),h?.(),m?.()}catch(v){we.error(v instanceof Error?v.message:r("sandbox.postEditor.deletePostFailed"))}},O=ls(b),L=O.length>0,J=O.length===1?r("sandbox.postEditor.missingFieldSingular",{fields:Ye(O,r)}):r("sandbox.postEditor.missingFieldPlural",{fields:Ye(O,r)});return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 z-10 bg-background/80 backdrop-blur-sm",children:t.jsxs("div",{className:"mx-auto flex max-w-4xl items-center justify-between gap-2 px-8 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(zt,{isPending:p.isPending||R.isPending||A,isError:p.isError||R.isError}),L&&t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Oe,{size:14}),O.length," ",O.length===1?r("sandbox.postEditor.issueSingular"):r("sandbox.postEditor.issuePlural")]})}),t.jsx(Me,{side:"bottom",children:J})]})]}),(x||m)&&t.jsxs("div",{className:"-mr-2 flex items-center gap-0.5",children:[x&&t.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:x,title:r(g?"sandbox.postBoard.collapse":"sandbox.postBoard.expand"),children:g?t.jsx(Pt,{size:16}):t.jsx(Nt,{size:16})}),m&&t.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:m,title:r("sandbox.postBoard.close"),children:t.jsx(Bt,{size:16})})]})]})}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 pb-6 pt-14",children:[t.jsx(ms,{value:B(b.title),onChange:v=>D("title",v),placeholder:r("sandbox.postEditor.postTitlePlaceholder"),className:"py-1 text-4xl font-bold text-foreground"}),G&&t.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),r("sandbox.postEditor.duplicateTitleWarning")]}),t.jsxs(It,{defaultValue:"content",className:"mt-6 gap-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs(Ft,{children:[t.jsxs(Ge,{value:"content",children:[t.jsx(Tt,{}),r("sandbox.postEditor.contentTab")]}),t.jsxs(Ge,{value:"settings",children:[t.jsx(wt,{}),r("sandbox.postEditor.settingsTab")]})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[Z&&t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsx(Le,{type:"button",variant:"ghost-destructive",size:"sm",className:"px-2","aria-label":r("sandbox.postEditor.deletePost"),onClick:()=>$(!0),children:t.jsx(Dt,{size:14})})}),t.jsx(Me,{side:"bottom",children:r("sandbox.postEditor.deletePost")})]}),q&&!j&&t.jsx(Ks,{decofile:n,virtualMcpId:e,sections:Fe(b.sections),currentKey:a,meta:d,hasAi:N,onApply:v=>{D("sections",v),V(X=>X+1)}}),m&&t.jsxs(Le,{type:"button",variant:"outline",size:"sm",disabled:!F,title:r(F?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),onClick:()=>{F&&window.open(F,"_blank","noopener,noreferrer")},children:[t.jsx(ut,{size:14}),r("sandbox.postEditor.seePreview")]})]})]}),t.jsx(We,{value:"content",children:j?t.jsxs("div",{className:"space-y-3",children:[Fe(b.sections).length>0&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),r("sandbox.postEditor.legacySectionsNotice",{count:Fe(b.sections).length})]}),t.jsx(so,{value:B(b.content),onChange:v=>D("content",v),decofile:n,sandboxRef:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u}})]}):t.jsx("div",{className:"surface p-8",children:t.jsx(Mt,{value:Fe(b.sections),onChange:v=>D("sections",v),meta:d,decofile:n,sandboxRef:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u},previewBaseUrl:c,onSaveReferencedBlock:Q,emptyMessage:r("sandbox.postEditor.noContentYet")},H)})}),t.jsx(We,{value:"settings",children:t.jsxs("div",{className:"surface p-6",children:[t.jsx(ao,{post:b,decofile:n,onChange:D,blockKey:a,move:i,onMoveStatus:M}),t.jsx(Qt,{schema:U,value:b,onChange:k,basePath:"post",meta:d,decofile:n,sandbox:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u},onSaveReferencedBlock:Q})]})})]})]})}),t.jsx(ft,{open:W,onOpenChange:v=>{!v&&!f.isPending&&$(!1)},children:t.jsxs(xt,{children:[t.jsxs(ht,{children:[t.jsx(gt,{children:r("sandbox.postEditor.deletePostConfirmTitle")}),t.jsx(bt,{children:r(Ss("post",C,{neverPublished:w(a)}),{title:B(b.title)||r("sandbox.postBoard.untitled")})})]}),t.jsxs(jt,{children:[t.jsx(vt,{disabled:f.isPending,children:r("sandbox.postEditor.deletePostCancel")}),t.jsx(yt,{onClick:v=>{v.preventDefault(),Y()},disabled:f.isPending,className:Be(Et({variant:"destructive"})),children:f.isPending?t.jsxs(t.Fragment,{children:[t.jsx(St,{className:"size-3.5"}),r("sandbox.postEditor.deletingPost")]}):r("sandbox.postEditor.deletePost")})]})]})})]})}function lo(l){const e=se.c(15),{blockKey:s,post:a,move:o,onMoveStatus:n}=l,d=ee();let c;e[0]!==a?(c=Je(a),e[0]=a,e[1]=c):c=e[1];const i=c;let m,g;if(e[2]!==s||e[3]!==i||e[4]!==o||e[5]!==n||e[6]!==a||e[7]!==d){let h;e[10]!==i?(h=u=>u!=="generating"||i==="generating",e[10]=i,e[11]=h):h=e[11];const r=ds.filter(h);m="flex flex-wrap gap-1.5",g=r.map(u=>{const p=u===i,f=p?null:o.refuse(s,u,a);return t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsx("span",{children:t.jsx("button",{type:"button",disabled:!!f,"aria-pressed":p,onClick:()=>n(u),className:Be("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",p?"border-primary bg-primary text-primary-foreground":"cursor-pointer bg-card hover:bg-accent",f&&"cursor-not-allowed opacity-50"),children:d(fs[u])})})}),f&&t.jsx(Me,{side:"bottom",children:o.reasonText(f)})]},u)}),e[2]=s,e[3]=i,e[4]=o,e[5]=n,e[6]=a,e[7]=d,e[8]=m,e[9]=g}else m=e[8],g=e[9];let x;return e[12]!==m||e[13]!==g?(x=t.jsx("div",{className:m,children:g}),e[12]=m,e[13]=g,e[14]=x):x=e[14],x}function ao(l){const e=se.c(166),{post:s,decofile:a,onChange:o,blockKey:n,move:d,onMoveStatus:c}=l,i=ee();let m;e[0]!==s?(m=Je(s),e[0]=s,e[1]=m):m=e[1];const x=m==="scheduled";let h;e[2]!==s.slug?(h=B(s.slug),e[2]=s.slug,e[3]=h):h=e[3];const r=h,[u,p]=K.useState(r),[f,S]=K.useState(null),[C,w]=K.useState(r);C!==r&&(w(r),p(r));let N;e[4]!==n||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==u||e[9]!==i?(N=()=>{const y=ns(u);if(p(y),y===r)return;if(!y){S(null),o("slug","");return}const He=Xe(a,"posts").filter(ot=>ot.key!==n).map(co).filter(Boolean);if(!He.includes(y)){S(null),o("slug",y);return}const ze=rs(y,He),Ve=i("sandbox.postEditor.slugDeduped",{slug:ze});p(ze),S(Ve),we.info(Ve),o("slug",ze)},e[4]=n,e[5]=r,e[6]=a,e[7]=o,e[8]=u,e[9]=i,e[10]=N):N=e[10];const q=N;let j;e[11]!==i?(j=i("sandbox.postEditor.statusLabel"),e[11]=i,e[12]=j):j=e[12];let _;e[13]!==j?(_=t.jsx(te,{children:j}),e[13]=j,e[14]=_):_=e[14];let E;e[15]!==n||e[16]!==d||e[17]!==c||e[18]!==s?(E=t.jsx(lo,{blockKey:n,post:s,move:d,onMoveStatus:c}),e[15]=n,e[16]=d,e[17]=c,e[18]=s,e[19]=E):E=e[19];let P;e[20]!==_||e[21]!==E?(P=t.jsxs("div",{className:"space-y-2",children:[_,E]}),e[20]=_,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==x||e[24]!==o||e[25]!==s.scheduledDatetime||e[26]!==i?(b=x&&t.jsx(Re,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:B(s.scheduledDatetime),onChange:y=>o("scheduledDatetime",y),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}),e[23]=x,e[24]=o,e[25]=s.scheduledDatetime,e[26]=i,e[27]=b):b=e[27];let k;e[28]!==P||e[29]!==b?(k=t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[P,b]}),e[28]=P,e[29]=b,e[30]=k):k=e[30];let T;e[31]!==i?(T=i("sandbox.postEditor.excerptLabel"),e[31]=i,e[32]=T):T=e[32];let A;e[33]!==T?(A=t.jsx(te,{htmlFor:"post-excerpt",children:T}),e[33]=T,e[34]=A):A=e[34];let I;e[35]!==s.excerpt?(I=B(s.excerpt),e[35]=s.excerpt,e[36]=I):I=e[36];let z;e[37]!==o?(z=y=>o("excerpt",y.target.value),e[37]=o,e[38]=z):z=e[38];let M;e[39]!==I||e[40]!==z?(M=t.jsx(Ze,{id:"post-excerpt",value:I,onChange:z,rows:2}),e[39]=I,e[40]=z,e[41]=M):M=e[41];let D;e[42]!==A||e[43]!==M?(D=t.jsxs("div",{className:"space-y-2",children:[A,M]}),e[42]=A,e[43]=M,e[44]=D):D=e[44];let U;e[45]!==i?(U=i("sandbox.postEditor.slugLabel"),e[45]=i,e[46]=U):U=e[46];let R;e[47]!==U?(R=t.jsx(te,{htmlFor:"post-slug",children:U}),e[47]=U,e[48]=R):R=e[48];let Q;e[49]===Symbol.for("react.memo_cache_sentinel")?(Q=y=>{S(null),p(cs(y.target.value))},e[49]=Q):Q=e[49];let H;e[50]!==i?(H=i("sandbox.postEditor.slugPlaceholder"),e[50]=i,e[51]=H):H=e[51];let V;e[52]!==q||e[53]!==u||e[54]!==H?(V=t.jsx(Ae,{id:"post-slug",value:u,onChange:Q,onBlur:q,placeholder:H,maxLength:80,className:"h-10"}),e[52]=q,e[53]=u,e[54]=H,e[55]=V):V=e[55];let F;e[56]!==f?(F=f&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),f]}),e[56]=f,e[57]=F):F=e[57];let G;e[58]!==R||e[59]!==V||e[60]!==F?(G=t.jsxs("div",{className:"space-y-2",children:[R,V,F]}),e[58]=R,e[59]=V,e[60]=F,e[61]=G):G=e[61];let Z;e[62]!==i?(Z=i("sandbox.postEditor.dateLabel"),e[62]=i,e[63]=Z):Z=e[63];let W;e[64]!==Z?(W={type:"string",format:"date",title:Z},e[64]=Z,e[65]=W):W=e[65];let $;e[66]!==s.date?($=B(s.date),e[66]=s.date,e[67]=$):$=e[67];let Y;e[68]!==o?(Y=y=>o("date",y),e[68]=o,e[69]=Y):Y=e[69];let O;e[70]!==i?(O=i("sandbox.postEditor.dateLabel"),e[70]=i,e[71]=O):O=e[71];let L;e[72]!==W||e[73]!==$||e[74]!==Y||e[75]!==O?(L=t.jsx(Re,{schema:W,value:$,onChange:Y,path:"post-date",label:O}),e[72]=W,e[73]=$,e[74]=Y,e[75]=O,e[76]=L):L=e[76];let J;e[77]!==i?(J=i("sandbox.postEditor.readTimeLabel"),e[77]=i,e[78]=J):J=e[78];let v;e[79]!==J?(v={type:"integer",title:J},e[79]=J,e[80]=v):v=e[80];const X=typeof s.readTime=="number"?s.readTime:void 0;let oe;e[81]!==o?(oe=y=>o("readTime",y),e[81]=o,e[82]=oe):oe=e[82];let ie;e[83]!==i?(ie=i("sandbox.postEditor.readTimeLabel"),e[83]=i,e[84]=ie):ie=e[84];let le;e[85]!==v||e[86]!==X||e[87]!==oe||e[88]!==ie?(le=t.jsx(Yt,{schema:v,value:X,onChange:oe,path:"post-read-time",label:ie}),e[85]=v,e[86]=X,e[87]=oe,e[88]=ie,e[89]=le):le=e[89];let ae;e[90]!==G||e[91]!==L||e[92]!==le?(ae=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[G,L,le]}),e[90]=G,e[91]=L,e[92]=le,e[93]=ae):ae=e[93];const tt=s.image,st=s.mobileImage;let ne,re;e[94]!==o?(ne=y=>o("image",y),re=y=>o("mobileImage",y),e[94]=o,e[95]=ne,e[96]=re):(ne=e[95],re=e[96]);let ce;e[97]!==s.alt?(ce=B(s.alt),e[97]=s.alt,e[98]=ce):ce=e[98];let de;e[99]!==i?(de=i("sandbox.postEditor.coverImageLabel"),e[99]=i,e[100]=de):de=e[100];let me;e[101]!==s.image||e[102]!==s.mobileImage||e[103]!==ne||e[104]!==re||e[105]!==ce||e[106]!==de?(me=t.jsx(Ut,{value:tt,mobileValue:st,onChange:ne,onMobileChange:re,alt:ce,label:de}),e[101]=s.image,e[102]=s.mobileImage,e[103]=ne,e[104]=re,e[105]=ce,e[106]=de,e[107]=me):me=e[107];let pe;e[108]!==i?(pe=i("sandbox.postEditor.coverAltLabel"),e[108]=i,e[109]=pe):pe=e[109];let ue;e[110]!==i?(ue=i("sandbox.postEditor.coverAltDescription"),e[110]=i,e[111]=ue):ue=e[111];let fe;e[112]!==pe||e[113]!==ue?(fe={type:"string",title:pe,description:ue},e[112]=pe,e[113]=ue,e[114]=fe):fe=e[114];let xe;e[115]!==s.alt?(xe=B(s.alt),e[115]=s.alt,e[116]=xe):xe=e[116];let he;e[117]!==o?(he=y=>o("alt",y),e[117]=o,e[118]=he):he=e[118];let ge;e[119]!==i?(ge=i("sandbox.postEditor.coverAltLabel"),e[119]=i,e[120]=ge):ge=e[120];let be;e[121]!==fe||e[122]!==xe||e[123]!==he||e[124]!==ge?(be=t.jsx(Re,{schema:fe,value:xe,onChange:he,path:"post-alt",label:ge}),e[121]=fe,e[122]=xe,e[123]=he,e[124]=ge,e[125]=be):be=e[125];let je;e[126]!==me||e[127]!==be?(je=t.jsxs("div",{className:"space-y-2",children:[me,be]}),e[126]=me,e[127]=be,e[128]=je):je=e[128];let ve;e[129]!==i?(ve=i("sandbox.postEditor.authorsLabel"),e[129]=i,e[130]=ve):ve=e[130];let ye;e[131]!==o?(ye=y=>o("authors",y),e[131]=o,e[132]=ye):ye=e[132];let Se;e[133]!==a||e[134]!==s.authors||e[135]!==ve||e[136]!==ye?(Se=t.jsx(Qe,{label:ve,decofile:a,kind:"authors",valueField:"email",toRef:ro,selected:s.authors,onChange:ye}),e[133]=a,e[134]=s.authors,e[135]=ve,e[136]=ye,e[137]=Se):Se=e[137];let Ee;e[138]!==i?(Ee=i("sandbox.postEditor.categoriesLabel"),e[138]=i,e[139]=Ee):Ee=e[139];let ke;e[140]!==o?(ke=y=>o("categories",y),e[140]=o,e[141]=ke):ke=e[141];let Ce;e[142]!==a||e[143]!==s.categories||e[144]!==Ee||e[145]!==ke?(Ce=t.jsx(Qe,{label:Ee,decofile:a,kind:"categories",valueField:"slug",toRef:no,selected:s.categories,onChange:ke}),e[142]=a,e[143]=s.categories,e[144]=Ee,e[145]=ke,e[146]=Ce):Ce=e[146];let _e;e[147]!==o?(_e=y=>o("extraProps",y),e[147]=o,e[148]=_e):_e=e[148];let Pe;e[149]!==s.extraProps||e[150]!==_e?(Pe=t.jsx(po,{value:s.extraProps,onChange:_e}),e[149]=s.extraProps,e[150]=_e,e[151]=Pe):Pe=e[151];let Ne;e[152]!==o?(Ne=y=>o("seo",y),e[152]=o,e[153]=Ne):Ne=e[153];let Te;e[154]!==s.seo||e[155]!==Ne?(Te=t.jsx(mo,{value:s.seo,onChange:Ne}),e[154]=s.seo,e[155]=Ne,e[156]=Te):Te=e[156];let Ie;return e[157]!==D||e[158]!==ae||e[159]!==je||e[160]!==Se||e[161]!==Ce||e[162]!==Pe||e[163]!==Te||e[164]!==k?(Ie=t.jsxs("div",{className:"space-y-5",children:[k,D,ae,je,Se,Ce,Pe,Te]}),e[157]=D,e[158]=ae,e[159]=je,e[160]=Se,e[161]=Ce,e[162]=Pe,e[163]=Te,e[164]=k,e[165]=Ie):Ie=e[165],Ie}function no(l){return{name:B(l.name),slug:B(l.slug)}}function ro(l){return{...l}}function co(l){return B(l.payload.slug)}function mo(l){const e=se.c(93),{value:s,onChange:a}=l,o=ee();let n;e[0]!==s?(n=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=n):n=e[1];const d=n;let c;e[2]!==a||e[3]!==d?(c=(L,J)=>a({...d,[L]:J}),e[2]=a,e[3]=d,e[4]=c):c=e[4];const i=c;let m;e[5]!==o?(m=o("sandbox.postEditor.seoSectionLabel"),e[5]=o,e[6]=m):m=e[6];let g;e[7]!==m?(g=t.jsx("p",{className:"text-sm font-medium",children:m}),e[7]=m,e[8]=g):g=e[8];let x;e[9]!==o?(x=o("sandbox.postEditor.seoSectionHint"),e[9]=o,e[10]=x):x=e[10];let h;e[11]!==x?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:x}),e[11]=x,e[12]=h):h=e[12];let r;e[13]!==g||e[14]!==h?(r=t.jsxs("div",{className:"space-y-1",children:[g,h]}),e[13]=g,e[14]=h,e[15]=r):r=e[15];let u;e[16]!==o?(u=o("sandbox.postEditor.seoTitleLabel"),e[16]=o,e[17]=u):u=e[17];let p;e[18]!==u?(p=t.jsx(te,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=p):p=e[19];let f;e[20]!==d.title?(f=B(d.title),e[20]=d.title,e[21]=f):f=e[21];let S;e[22]!==i?(S=L=>i("title",L.target.value),e[22]=i,e[23]=S):S=e[23];let C;e[24]!==f||e[25]!==S?(C=t.jsx(Ae,{id:"post-seo-title",value:f,onChange:S,className:"h-10"}),e[24]=f,e[25]=S,e[26]=C):C=e[26];let w;e[27]!==C||e[28]!==p?(w=t.jsxs("div",{className:"space-y-2",children:[p,C]}),e[27]=C,e[28]=p,e[29]=w):w=e[29];let N;e[30]!==o?(N=o("sandbox.postEditor.seoDescriptionLabel"),e[30]=o,e[31]=N):N=e[31];let q;e[32]!==N?(q=t.jsx(te,{htmlFor:"post-seo-description",children:N}),e[32]=N,e[33]=q):q=e[33];let j;e[34]!==d.description?(j=B(d.description),e[34]=d.description,e[35]=j):j=e[35];let _;e[36]!==i?(_=L=>i("description",L.target.value),e[36]=i,e[37]=_):_=e[37];let E;e[38]!==j||e[39]!==_?(E=t.jsx(Ze,{id:"post-seo-description",value:j,onChange:_,rows:2}),e[38]=j,e[39]=_,e[40]=E):E=e[40];let P;e[41]!==q||e[42]!==E?(P=t.jsxs("div",{className:"space-y-2",children:[q,E]}),e[41]=q,e[42]=E,e[43]=P):P=e[43];let b;e[44]!==o?(b=o("sandbox.postEditor.seoImageLabel"),e[44]=o,e[45]=b):b=e[45];let k;e[46]!==b?(k={type:"string",format:"image-uri",title:b},e[46]=b,e[47]=k):k=e[47];const T=d.image;let A;e[48]!==i?(A=L=>i("image",L),e[48]=i,e[49]=A):A=e[49];let I;e[50]!==o?(I=o("sandbox.postEditor.seoImageLabel"),e[50]=o,e[51]=I):I=e[51];let z;e[52]!==d.image||e[53]!==k||e[54]!==A||e[55]!==I?(z=t.jsx(Rt,{schema:k,value:T,onChange:A,path:"post-seo-image",label:I}),e[52]=d.image,e[53]=k,e[54]=A,e[55]=I,e[56]=z):z=e[56];let M;e[57]!==o?(M=o("sandbox.postEditor.seoCanonicalLabel"),e[57]=o,e[58]=M):M=e[58];let D;e[59]!==M?(D=t.jsx(te,{htmlFor:"post-seo-canonical",children:M}),e[59]=M,e[60]=D):D=e[60];let U;e[61]!==d.canonical?(U=B(d.canonical),e[61]=d.canonical,e[62]=U):U=e[62];let R;e[63]!==i?(R=L=>i("canonical",L.target.value),e[63]=i,e[64]=R):R=e[64];let Q;e[65]!==o?(Q=o("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=o,e[66]=Q):Q=e[66];let H;e[67]!==U||e[68]!==R||e[69]!==Q?(H=t.jsx(Ae,{id:"post-seo-canonical",value:U,onChange:R,placeholder:Q,className:"h-10"}),e[67]=U,e[68]=R,e[69]=Q,e[70]=H):H=e[70];let V;e[71]!==D||e[72]!==H?(V=t.jsxs("div",{className:"space-y-2",children:[D,H]}),e[71]=D,e[72]=H,e[73]=V):V=e[73];let F;e[74]!==o?(F=o("sandbox.postEditor.seoNoIndexingLabel"),e[74]=o,e[75]=F):F=e[75];let G;e[76]!==F?(G=t.jsx(te,{htmlFor:"post-seo-no-indexing",children:F}),e[76]=F,e[77]=G):G=e[77];const Z=d.noIndexing===!0;let W;e[78]!==i?(W=L=>i("noIndexing",L),e[78]=i,e[79]=W):W=e[79];let $;e[80]!==Z||e[81]!==W?($=t.jsx(Ot,{id:"post-seo-no-indexing",checked:Z,onCheckedChange:W}),e[80]=Z,e[81]=W,e[82]=$):$=e[82];let Y;e[83]!==G||e[84]!==$?(Y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[G,$]}),e[83]=G,e[84]=$,e[85]=Y):Y=e[85];let O;return e[86]!==w||e[87]!==P||e[88]!==z||e[89]!==V||e[90]!==Y||e[91]!==r?(O=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[r,w,P,z,V,Y]}),e[86]=w,e[87]=P,e[88]=z,e[89]=V,e[90]=Y,e[91]=r,e[92]=O):O=e[92],O}function po(l){const e=se.c(24),{value:s,onChange:a}=l,o=ee();let n,d,c,i;if(e[0]!==a||e[1]!==o||e[2]!==s){n=oo(s);const r=(p,f)=>a(n.map((S,C)=>C===p?{...S,...f}:S));d="space-y-2";let u;e[7]!==o?(u=o("sandbox.postEditor.extraPropsLabel"),e[7]=o,e[8]=u):u=e[8],e[9]!==u?(c=t.jsx(te,{children:u}),e[9]=u,e[10]=c):c=e[10],i=n.length>0&&t.jsx("ul",{className:"space-y-2",children:n.map((p,f)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(Ae,{value:p.key,onChange:S=>r(f,{key:S.target.value}),placeholder:o("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(Ae,{value:p.value,onChange:S=>r(f,{value:S.target.value}),placeholder:o("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(ps,{label:o("sandbox.postEditor.removePropLabel"),onClick:()=>a(n.filter((S,C)=>C!==f))})]},f))}),e[0]=a,e[1]=o,e[2]=s,e[3]=n,e[4]=d,e[5]=c,e[6]=i}else n=e[3],d=e[4],c=e[5],i=e[6];let m;e[11]!==o?(m=o("sandbox.postEditor.addPropLabel"),e[11]=o,e[12]=m):m=e[12];let g;e[13]!==n||e[14]!==a?(g=()=>a([...n,{key:"",value:""}]),e[13]=n,e[14]=a,e[15]=g):g=e[15];let x;e[16]!==m||e[17]!==g?(x=t.jsx(us,{label:m,onClick:g}),e[16]=m,e[17]=g,e[18]=x):x=e[18];let h;return e[19]!==d||e[20]!==c||e[21]!==i||e[22]!==x?(h=t.jsxs("div",{className:d,children:[c,i,x]}),e[19]=d,e[20]=c,e[21]=i,e[22]=x,e[23]=h):h=e[23],h}function Qe(l){const e=se.c(24),{label:s,decofile:a,kind:o,valueField:n,toRef:d,selected:c,onChange:i}=l,m=ee();let g;e[0]!==a||e[1]!==o||e[2]!==c||e[3]!==d||e[4]!==n?(g=as({records:Xe(a,o),selected:c,valueField:n,toRef:d}),e[0]=a,e[1]=o,e[2]=c,e[3]=d,e[4]=n,e[5]=g):g=e[5];const{options:x,selectedValues:h,refsForValues:r}=g;let u;e[6]!==o||e[7]!==m?(u=m(o==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=o,e[7]=m,e[8]=u):u=e[8];const p=u;let f;e[9]!==o||e[10]!==m?(f=m(o==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=o,e[10]=m,e[11]=f):f=e[11];const S=f;let C;e[12]!==s?(C=t.jsx(te,{children:s}),e[12]=s,e[13]=C):C=e[13];let w;e[14]!==p||e[15]!==i||e[16]!==x||e[17]!==r||e[18]!==S||e[19]!==h?(w=x.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:p}):t.jsx(At,{options:x,defaultValue:h,onValueChange:q=>i(r(q)),placeholder:S,maxCount:4}),e[14]=p,e[15]=i,e[16]=x,e[17]=r,e[18]=S,e[19]=h,e[20]=w):w=e[20];let N;return e[21]!==C||e[22]!==w?(N=t.jsxs("div",{className:"space-y-2",children:[C,w]}),e[21]=C,e[22]=w,e[23]=N):N=e[23],N}function ha(l){const e=se.c(10),s=l.block!==void 0;let a;e[0]!==l?(a=t.jsx(io,{...l}),e[0]=l,e[1]=a):a=e[1];let o;return e[2]!==l.blockKey||e[3]!==l.branch||e[4]!==l.decofile||e[5]!==l.orgSlug||e[6]!==l.virtualMcpId||e[7]!==s||e[8]!==a?(o=t.jsx(Gt,{listing:l.decofile,orgSlug:l.orgSlug,virtualMcpId:l.virtualMcpId,branch:l.branch,blockKey:l.blockKey,present:s,children:a}),e[2]=l.blockKey,e[3]=l.branch,e[4]=l.decofile,e[5]=l.orgSlug,e[6]=l.virtualMcpId,e[7]=s,e[8]=a,e[9]=o):o=e[9],o}export{ha as PostEditor};
1
+ import{b as ee,am as it,r as K,j as t,B as Le,D as lt,v as at,w as nt,x as rt,aU as ct,aY as dt,m as Be,y as mt,t as we,c as se,bu as pt,a9 as ut,aP as ft,aO as xt,aL as ht,aJ as gt,aK as bt,aN as jt,aM as vt,b9 as yt,h as St,ba as kt,I as Ae}from"./index-D19iAD4s.js";import{u as Et}from"./chat-context-D5EEwp_m.js";import{i as Oe}from"./AlertCircle-jxvwS2PA.js";import{aF as Ct,bA as _t,_ as Pt,ao as Nt}from"./agent-icon-CF35JltL.js";import{e as Tt}from"./UserSquare-YQkID8bv.js";import{i as Lt,a as wt}from"./UserCheck01-VgBUlrC3.js";import{s as Dt}from"./Trash01-W_zwe5xo.js";import{s as Bt}from"./XClose-Dv4YALPV.js";import{L as te}from"./label-B0UwCsXA.js";import{M as At}from"./multi-select-CADtUZ9A.js";import{b as Ft,a as It,T as Ge,c as We}from"./tabs-DV8AQUwT.js";import{S as Ot}from"./switch-DgvZdTyU.js";import{T as Je}from"./textarea-DCWhTUrR.js";import{S as zt,I as Rt}from"./save-status-5VKYddaB.js";import{u as $t,I as qt,a as Ie,B as Mt,R as Ut}from"./block-document-DnIO3ig2.js";import{R as Ht,e as Vt,H as Gt,u as Wt,f as Re,N as Yt}from"./held-block-view-CYXKzDkA.js";import{b as Kt,C as Qt,K as Jt}from"./blog-schema-BMIjJkjY.js";import{a6 as Zt,N as Xt,a as es,d as ts,f as ss,a7 as os,a8 as is,a9 as ls,m as Ye,p as Ze,aa as as,I as Xe,a3 as ns,a2 as rs,ab as cs,Q as ds}from"./category-tree-rhKblFsZ.js";import{s as B,E as ms,R as ps,A as us,a as fs}from"./primitives-DlHl12Ki.js";import{c as $e,T as qe,a as Me}from"./tooltip-B3-v7v0W.js";import{f as xs,d as hs,b as gs}from"./blog-preview-url-BeobaMnK.js";import{e as bs,f as js,g as Ke,u as vs,a as ys,d as Ss}from"./delete-copy-CyOQI_UN.js";import{u as ks}from"./use-ai-providers-DFv4_P6Z.js";import{u as Es}from"./use-delete-block-BZCQAK3P.js";import{F as Cs,u as _s,a as Ps,k as Ns}from"./use-never-published-BsVhVpS1.js";import{u as Ts}from"./use-fast-preview-draft-url-tiq51pbg.js";import{u as Ls}from"./use-autosave-DBAueSyZ.js";import{b as ws}from"./repository-binding-CP_PNLcQ.js";import{u as Ds}from"./use-file-configs-Caaj88sr.js";import{m as Bs}from"./match-site-slug-config-B47_xZCi.js";import{a as As}from"./Image01-BGM1ArTz.js";import{e as Fs}from"./Tool01-CldemTEe.js";import{a as Is,E as Os,u as zs}from"./usage-stats-njGMuDih.js";import{s as Rs}from"./suggestion-DXAVxjkm.js";import{E as $s,T as Ue}from"./editor-classes-C7cnK7Wp.js";import{u as qs}from"./site-editor-toast-QCYxwt4C.js";import"./use-panel-navigate-DzpMtCDM.js";import"./thread-route-El3oNOnD.js";import"./use-project-scope-DdM0t1xa.js";import"./use-view-draft-kind-C2cwPb-d.js";import"./use-blog-view-B9cmKJN3.js";import"./use-organization-settings-BEn5xJKT.js";import"./schema-BmYiAOGn.js";import"./task-board-DQX_apb8.js";import"./thread-intent-BsMPgCKi.js";import"./use-mcp-client-CCT6q-zj.js";import"./auth-Ry9WrZV8.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrHa0Ln_.js";import"./session-runtime-DZiu3uM2.js";import"./use-entitlements-BzKQLk_u.js";import"./use-current-view-Cn9H-KAc.js";import"./use-in-settings-D-n4dJvM.js";import"./use-decopilot-events-DsEAOvda.js";import"./ArrowUp-BbUoh0-h.js";import"./ArrowLeft-Dlf39oKA.js";import"./ArrowRight-DCL3gp96.js";import"./BookOpen01-C85UtDum.js";import"./Globe04-UMTQ82HG.js";import"./CheckCircle-KztuMvd5.js";import"./ChevronDown-c_BdXEOA.js";import"./ChevronSelectorVertical-DmpvIgAy.js";import"./ChevronUp-BSWVeXQq.js";import"./LinkBroken01-hoBFLv94.js";import"./CreditCard01-C4dCRCdu.js";import"./File02-KoBPCXEf.js";import"./MessageCircle01-CDpj4jpt.js";import"./SwitchHorizontal01-B8iZqdiB.js";import"./Eye-BSRrcDT9.js";import"./Fingerprint04-B2N20uu4.js";import"./Key01-BMkzySkS.js";import"./LayoutLeft-DrOR8tOg.js";import"./Minus-DdEPrbsD.js";import"./Monitor01-B4iHbF93.js";import"./Sun-D531tFmZ.js";import"./Play-Clz2e0s4.js";import"./Plus-CO40HUhB.js";import"./SearchMd-FI2fcykP.js";import"./ShoppingBag01-BBDr_WSy.js";import"./Upload01-DDGkOE5t.js";import"./Users01-CJ_YMgJe.js";import"./Zap-DFubAl8b.js";import"./badge-CWKaTosK.js";import"./checkbox-DHBAzm3e.js";import"./command-CALEDfdi.js";import"./index-DS6kB3db.js";import"./popover-Bm-_ILu8.js";import"./active-indicator-CCMhAsc_.js";import"./toggle-group-fJYx0W9h.js";import"./asset-utils-DRModSGS.js";import"./useInfiniteQuery-BIIkqC2p.js";import"./infiniteQueryObserver-B1MZYli5.js";import"./task-key-rSXWMPFP.js";import"./sortable.esm-6QfVcWZZ.js";import"./product-picker-dialog-2Sh66sGp.js";import"./index-DAZyLaeQ.js";import"./index-D146A7MA.js";import"./blocks-tab-states-DDvkpFWf.js";import"./sandbox-url-D3mC8qhT.js";import"./use-voice-input-D_lO17n9.js";import"./drawer-CLdqPUpZ.js";import"./use-mobile-Dyvncftm.js";import"./index-BKZ2GYzY.js";import"./select-CKa1YoCw.js";import"./index-BdQq_4o_.js";import"./index-DHiZoBJ3.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./empty-state-CHF2Jno9.js";import"./utils-CWN91Q0R.js";import"./calendar-D3_Is4BX.js";import"./section-array-field-D3J7UHmj.js";import"./named-rule-step-jeqaAuBi.js";import"./slider-B257IOM8.js";import"./index-DeWoNfZE.js";import"./tooltipContext-oNzr-fXK.js";import"./CategoricalChart-jjkJNbxp.js";import"./index-tfWzV95z.js";import"./combobox-Dm0ZumLc.js";import"./scroll-area-ZYmkOMr8.js";import"./hosted-reconcile-BT71cbCZ.js";import"./collapsible-JCTHx5_U.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DaLtpCvg.js";import"./use-copy-BStTcLWM.js";import"./use-task-board-items-B0KeELtH.js";import"./config-DpuCRGPS.js";import"./task-route-KYQNiD-8.js";import"./project-index-Dn8Lu82V.js";import"./utils-CVEq3hMx.js";import"./shell-layout-Lgn8VLZ9.js";import"./use-deployment-admin-HoxFQgZ9.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-BeUR_ZGA.js";import"./integration-icon-LqaI_LSB.js";import"./project-icon-BpBMspxb.js";import"./use-navigate-to-agent-0M4hsJnf.js";import"./use-debounced-value-Dcq0NTAp.js";import"./new-project-dialog-TULM28H3.js";import"./repository-picker-DCip0P__.js";import"./github-icon-CizbgzyS.js";import"./collection-search-Cez2fKoW.js";import"./new-project-store-Dkp4wOSi.js";import"./legacy-admin-welcome-dialog-DgOZFBtI.js";import"./required-auth-layout-B7e3rkXx.js";import"./use-org-sso-BOOKyOjL.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-ChxjPYfG.js";import"./types-6-Ps6AGR.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./gateway-client-Dsg5xVl5.js";import"./markdown-BNFJrVwN.js";import"./sheet-BDbcvRnu.js";import"./use-connection-CYsyXyy7.js";import"./use-mcp-prompts-Bxssn6xT.js";import"./use-thread-outputs-U5yvy3ti.js";import"./file-type-icon-CNUBpmBv.js";import"./use-move-blocks-pw3TQRyc.js";import"./sandbox-git-api-B73fIbEU.js";import"./search-input-Dfgi3Bm0.js";import"./form-CCzLKFB7.js";import"./content-changes-Yn1NpHw-.js";import"./use-sandbox-events-CdcsfdkO.js";import"./use-blocks-v8-project-DjyJGATt.js";const De=l=>typeof l=="string"?l:"",Ms={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'"};function et(l){const e=[];let s=0,a=!1;for(;s<l.length;){if(l[s]==="<"){const c=l.indexOf(">",s);s=c<0?l.length:c+1;continue}let o=l[s]??"",n=s+1;if(l[s]==="&"){const c=l.indexOf(";",s);if(c>=0&&c-s<=10){const i=Ms[l.slice(s,c+1).toLowerCase()];i!==void 0&&(o=i,n=c+1)}}const d=s;if(s=n,/\s/.test(o)){if(a){const c=e[e.length-1];c&&(c.end=n);continue}e.push({ch:" ",start:d,end:n}),a=!0}else e.push({ch:o,start:d,end:n}),a=!1}return{text:e.map(o=>o.ch).join(""),chars:e}}function Us(l){return et(l).text.trim()}function Hs(l){const e=[];for(const s of l)switch(Zt(De(s.__resolveType))){case"Paragraph":e.push(Us(De(s.html)));break;case"Heading":e.push(De(s.text));break;case"Quote":e.push(De(s.quote));break;case"List":e.push(De(s.items));break}return e.filter(Boolean).join(`
2
+ `)}function Vs(l){return l.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function Gs(l,e){const s=l.slice(0,e);return s.lastIndexOf("<a")>s.lastIndexOf("</a")}function Ws(l,e,s){const a=e.trim();if(!a||!s)return{blocks:l,applied:!1};for(let o=0;o<l.length;o++){const n=l[o];if(!n||typeof n.html!="string")continue;const d=n.html,{text:c,chars:i}=et(d);let m=c.indexOf(a);for(;m>=0;){const g=i[m],x=i[m+a.length-1];if(g&&x){const h=g.start,r=x.end,u=d.slice(h,r);if(!u.includes("<")&&!Gs(d,h)){const p=d.slice(0,h)+`<a href="${Vs(s)}">${u}</a>`+d.slice(r),f=l.slice();return f[o]={...n,html:p},{blocks:f,applied:!0}}}m=c.indexOf(a,m+1)}}return{blocks:l,applied:!1}}function Ys(l,e){let s=l,a=0;for(const o of e){const n=Ws(s,o.quote,o.href);n.applied&&(s=n.blocks,a++)}return{blocks:s,applied:a}}function Ks({virtualMcpId:l,decofile:e,sections:s,currentKey:a,meta:o,hasAi:n,onApply:d}){const c=ee(),i=it(),[m,g]=K.useState(!1),[x,h]=K.useState(!1),[r,u]=K.useState([]),[p,f]=K.useState(new Set),S=xs(e,o),C=Xt(e).filter(j=>j.key!==a&&j.slug),w=async()=>{h(!0);try{const j=Hs(s),_=await i.call("BLOG_SITE_GROUND",{virtualMcpId:l,purpose:"link"}).catch(E=>{console.warn("[linkSuggest] grounding failed",E)}),k=await i.call("BLOG_LINK_SUGGEST",{virtualMcpId:l,body:j,posts:C.map(E=>({title:E.title,slug:E.slug})),grounding:_?{report:_.report,outcome:_.outcome}:void 0}),P=[],b=new Set;for(const E of k.suggestions){const T=C.find(z=>z.slug===E.slug);if(!T||!S)continue;const A=hs(S,{category:T.categorySlugs[0]??"",slug:T.slug});if(!A||!j.includes(E.quote))continue;const F=`${E.quote}→${T.slug}`;b.has(F)||(b.add(F),P.push({quote:E.quote,href:A,title:T.title}))}u(P),f(new Set(P.map((E,T)=>T))),g(!0),P.length===0&&we.info(c("sandbox.linkSuggest.none"))}catch(j){we.error(j instanceof Error?j.message:c("sandbox.linkSuggest.failed"))}finally{h(!1)}},N=j=>f(_=>{const k=new Set(_);return k.has(j)?k.delete(j):k.add(j),k}),q=()=>{const j=r.filter((P,b)=>p.has(b)).map(P=>({quote:P.quote,href:P.href})),{blocks:_,applied:k}=Ys(s,j);d(_),g(!1),we.success(c("sandbox.linkSuggest.applied",{count:String(k)}))};return t.jsxs(t.Fragment,{children:[t.jsxs(Le,{type:"button",variant:"outline",size:"sm",disabled:x||!n||C.length===0,title:n?C.length===0?c("sandbox.linkSuggest.noCandidates"):c("sandbox.linkSuggest.hint"):c("sandbox.autonomous.noAiProvider"),onClick:()=>{w()},children:[x?t.jsx(Lt,{size:14,className:"animate-spin"}):t.jsx(Ct,{size:14}),c("sandbox.linkSuggest.button")]}),t.jsx(lt,{open:m,onOpenChange:g,children:t.jsxs(at,{className:"max-h-[85vh] sm:max-w-lg",children:[t.jsxs(nt,{children:[t.jsx(rt,{children:c("sandbox.linkSuggest.title")}),t.jsx(ct,{children:c("sandbox.linkSuggest.description")})]}),r.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:c("sandbox.linkSuggest.none")}):t.jsx("ul",{className:"max-h-[50vh] space-y-1 overflow-y-auto",children:r.map((j,_)=>{const k=p.has(_);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>N(_),"aria-pressed":k,className:"flex w-full items-start gap-2.5 rounded-lg border p-2.5 text-left transition-colors hover:bg-accent",children:[t.jsx("span",{className:Be("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border",k?"border-primary bg-primary text-primary-foreground":"border-input"),children:k&&t.jsx(dt,{size:11})}),t.jsxs("span",{className:"min-w-0 flex-1 text-sm",children:[t.jsxs("span",{className:"font-medium",children:["“",j.quote,"”"]}),t.jsxs("span",{className:"text-muted-foreground",children:[" → ",j.title]})]})]})},`${j.quote}-${j.href}`)})}),t.jsx(mt,{children:t.jsx(Le,{type:"button",disabled:p.size===0,onClick:q,children:c("sandbox.linkSuggest.apply",{count:String(p.size)})})})]})})]})}const Qs={unit:"pt",initial:12,min:6,max:96},Js=["outline-none min-h-80 px-4 py-3 text-[15px] leading-relaxed text-foreground","[&>*:first-child]:mt-0 [&_p]:my-3","[&_h1]:mb-3 [&_h1]:mt-6 [&_h1]:text-3xl [&_h1]:font-bold","[&_h2]:mb-3 [&_h2]:mt-6 [&_h2]:text-2xl [&_h2]:font-bold","[&_h3]:mb-2 [&_h3]:mt-5 [&_h3]:text-xl [&_h3]:font-bold","[&_h4]:mb-2 [&_h4]:mt-4 [&_h4]:text-lg [&_h4]:font-bold","[&_h5]:mb-2 [&_h5]:mt-4 [&_h5]:text-base [&_h5]:font-bold","[&_h6]:mb-2 [&_h6]:mt-4 [&_h6]:text-sm [&_h6]:font-bold","[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-6 [&_li>p]:my-1","[&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground","[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm","[&_img]:inline-block [&_img]:h-auto [&_img]:max-w-full","[&_img.ProseMirror-selectednode]:outline-2 [&_img.ProseMirror-selectednode]:outline-primary","[&_table]:my-3 [&_table]:w-full [&_table]:border-collapse [&_td>p]:my-0 [&_th>p]:my-0","[&_td]:border [&_td]:border-border [&_td]:p-2 [&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:p-2","[&_strong]:font-bold",$s],Zs=["[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none"];function Xs({editor:l,virtualMcpId:e}){const s=ws(e),a=Ds(),o=Bs(a.data?.configs??[],pt(s),s?.metadata?.assetStorageConfigId)?.id,n=ee(),[d,c]=K.useState(!1),[i,m]=K.useState(null),[g,x]=K.useState(null),h=p=>{l.chain().setImage({src:p}).run()},r=()=>{m(null),x(null)},u=()=>{const p=(i??"").trim(),f=Ke(p);if(!f&&p){x(p.toLowerCase().startsWith("data:")?n("sandbox.postEditor.legacyImageDataUrl"):n("sectionsEditor.imageField.unsafeUrl"));return}f&&h(f),r()};return t.jsxs("div",{className:"flex items-center gap-0.5",children:[t.jsx(Ue,{active:d,label:n("sandbox.postEditor.legacyInsertImage"),onClick:()=>c(!0),children:t.jsx(Fs,{size:14})}),t.jsx(Ue,{active:i!==null,label:n("sandbox.postEditor.legacyInsertImageUrl"),onClick:()=>i===null?m(""):u(),children:t.jsx(As,{size:14})}),i!==null&&t.jsx(qt,{draft:i,notice:g,label:n("sandbox.postEditor.legacyInsertImageUrl"),placeholder:n("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:p=>{x(null),m(p)},onCommit:u,onCancel:r}),t.jsx(Cs,{open:d,onOpenChange:c,mode:"image",lockedConfigId:o,onSelect:p=>{const f=Ke(p);f&&h(f)}})]})}function eo(l){const e=se.c(22),{editor:s,virtualMcpId:a}=l,o=ee(),[n,d]=K.useState(!1);let c;e[0]!==s?(c={editor:s,selector:to},e[0]=s,e[1]=c):c=e[1];const i=zs(c);let m;e[2]!==s||e[3]!==n||e[4]!==i.highlight?(m=t.jsx(Vt,{editor:s,mark:"highlight",currentColor:i.highlight,open:n,onOpenChange:d}),e[2]=s,e[3]=n,e[4]=i.highlight,e[5]=m):m=e[5];const g=i.codeBlock;let x;e[6]!==o?(x=o("sandbox.postEditor.legacyCodeBlock"),e[6]=o,e[7]=x):x=e[7];let h;e[8]!==s?(h=()=>s.chain().focus().toggleCodeBlock().run(),e[8]=s,e[9]=h):h=e[9];let r;e[10]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(_t,{size:14}),e[10]=r):r=e[10];let u;e[11]!==i.codeBlock||e[12]!==x||e[13]!==h?(u=t.jsx(Ue,{active:g,label:x,onClick:h,children:r}),e[11]=i.codeBlock,e[12]=x,e[13]=h,e[14]=u):u=e[14];let p;e[15]!==s||e[16]!==a?(p=t.jsx(Xs,{editor:s,virtualMcpId:a}),e[15]=s,e[16]=a,e[17]=p):p=e[17];let f;return e[18]!==m||e[19]!==u||e[20]!==p?(f=t.jsxs(t.Fragment,{children:[m,u,p]}),e[18]=m,e[19]=u,e[20]=p,e[21]=f):f=e[21],f}function to(l){const{editor:e}=l;return{highlight:e.isActive("highlight")?e.getAttributes("highlight").color??null:null,codeBlock:e.isActive("codeBlock")}}function so({value:l,onChange:e,decofile:s,sandboxRef:a}){const o=ee(),n=K.useRef(e);n.current=e;const d=Is({extensions:[...js(),Rs.configure({placeholder:o("sandbox.postEditor.legacyContentPlaceholder")})],content:l,editorProps:{attributes:{class:Be(Js)}},onUpdate:({editor:i})=>{n.current(bs(i.getHTML()))}}),c=$t({decofile:s,sandboxRef:a});return d?t.jsxs("div",{className:"rounded-[var(--studio-surface-radius,var(--radius-md))] border shadow-edge border-input",children:[t.jsx(Ht,{editor:d,fontSize:Qs,linkSources:c,extras:t.jsx(eo,{editor:d,virtualMcpId:a?.virtualMcpId})}),t.jsx(Os,{editor:d,className:Be("max-h-[70vh] overflow-y-auto",Zs)})]}):null}function oo(l){return Array.isArray(l)?l.map(e=>({key:B(e?.key),value:B(e?.value)})):[]}function io({orgSlug:l,virtualMcpId:e,branch:s,blockKey:a,block:o,decofile:n,meta:d,previewBaseUrl:c,move:i,onClose:m,expanded:g,onToggleExpand:x,onDeleted:h}){const r=ee(),u=Et()?.taskId??null,p=_s({orgSlug:l,virtualMcpId:e,branch:s},{holdsCopy:!0}),f=Es({orgSlug:l,virtualMcpId:e,branch:s}),S=qs(e,s),C=S.kind==="protocol"&&S.source==="github",w=Ps({orgSlug:l,virtualMcpId:e,branch:s}),N=ks().length>0,q=vs(),j=ys(e),_=Ts({orgSlug:l,virtualMcpId:e,branch:s}),k=es(o,"posts"),P=v=>{const X=p.shown(v);return X?{[v]:X}:{}},[b,E,T,A]=Ls(k,v=>{p.mutate({blockKey:a,data:ts(a,ss(v))})},{isSaving:p.isPending,onSeed:()=>p.hold(a)}),[F,z]=K.useState(a);F!==a&&(z(a),T(k));const M=v=>{T(b),i.apply(a,v,b,()=>P(a))},D=(v,X)=>E({...b,[v]:X}),U=Kt("posts",d,Jt),R=Wt({orgSlug:l,virtualMcpId:e,branch:s},n),Q=R.save,[H,V]=K.useState(0),I=gs({decofile:n,post:b,previewBaseUrl:c,draftPointer:_,meta:d}),G=os(n,"posts",a,B(b.title)),J=is(b),[W,$]=K.useState(!1),Y=async()=>{T(b);try{const v=await f.mutateAsync({blockKey:a,shown:()=>p.shown(a)});if($(!1),Ns(v))return;we.success(r("sandbox.postEditor.deletePostSuccess",{title:B(b.title)})),h?.(),m?.()}catch(v){we.error(v instanceof Error?v.message:r("sandbox.postEditor.deletePostFailed"))}},O=ls(b),L=O.length>0,Z=O.length===1?r("sandbox.postEditor.missingFieldSingular",{fields:Ye(O,r)}):r("sandbox.postEditor.missingFieldPlural",{fields:Ye(O,r)});return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 z-10 bg-background/80 backdrop-blur-sm",children:t.jsxs("div",{className:"mx-auto flex max-w-4xl items-center justify-between gap-2 px-8 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(zt,{isPending:p.isPending||R.isPending||A,isError:p.isError||R.isError}),L&&t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Oe,{size:14}),O.length," ",O.length===1?r("sandbox.postEditor.issueSingular"):r("sandbox.postEditor.issuePlural")]})}),t.jsx(Me,{side:"bottom",children:Z})]})]}),(x||m)&&t.jsxs("div",{className:"-mr-2 flex items-center gap-0.5",children:[x&&t.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:x,title:r(g?"sandbox.postBoard.collapse":"sandbox.postBoard.expand"),children:g?t.jsx(Pt,{size:16}):t.jsx(Nt,{size:16})}),m&&t.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:m,title:r("sandbox.postBoard.close"),children:t.jsx(Bt,{size:16})})]})]})}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 pb-6 pt-14",children:[t.jsx(ms,{value:B(b.title),onChange:v=>D("title",v),placeholder:r("sandbox.postEditor.postTitlePlaceholder"),className:"py-1 text-4xl font-bold text-foreground"}),G&&t.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),r("sandbox.postEditor.duplicateTitleWarning")]}),t.jsxs(Ft,{defaultValue:"content",className:"mt-6 gap-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs(It,{children:[t.jsxs(Ge,{value:"content",children:[t.jsx(Tt,{}),r("sandbox.postEditor.contentTab")]}),t.jsxs(Ge,{value:"settings",children:[t.jsx(wt,{}),r("sandbox.postEditor.settingsTab")]})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[J&&t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsx(Le,{type:"button",variant:"ghost-destructive",size:"sm",className:"px-2","aria-label":r("sandbox.postEditor.deletePost"),onClick:()=>$(!0),children:t.jsx(Dt,{size:14})})}),t.jsx(Me,{side:"bottom",children:r("sandbox.postEditor.deletePost")})]}),q&&!j&&t.jsx(Ks,{decofile:n,virtualMcpId:e,sections:Ie(b.sections),currentKey:a,meta:d,hasAi:N,onApply:v=>{D("sections",v),V(X=>X+1)}}),m&&t.jsxs(Le,{type:"button",variant:"outline",size:"sm",disabled:!I,title:r(I?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),onClick:()=>{I&&window.open(I,"_blank","noopener,noreferrer")},children:[t.jsx(ut,{size:14}),r("sandbox.postEditor.seePreview")]})]})]}),t.jsx(We,{value:"content",children:j?t.jsxs("div",{className:"space-y-3",children:[Ie(b.sections).length>0&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),r("sandbox.postEditor.legacySectionsNotice",{count:Ie(b.sections).length})]}),t.jsx(so,{value:B(b.content),onChange:v=>D("content",v),decofile:n,sandboxRef:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u}})]}):t.jsx("div",{className:"surface p-8",children:t.jsx(Mt,{value:Ie(b.sections),onChange:v=>D("sections",v),meta:d,decofile:n,sandboxRef:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u},previewBaseUrl:c,onSaveReferencedBlock:Q,emptyMessage:r("sandbox.postEditor.noContentYet")},H)})}),t.jsx(We,{value:"settings",children:t.jsxs("div",{className:"surface p-6",children:[t.jsx(ao,{post:b,decofile:n,onChange:D,blockKey:a,move:i,onMoveStatus:M}),t.jsx(Qt,{schema:U,value:b,onChange:E,basePath:"post",meta:d,decofile:n,sandbox:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u},onSaveReferencedBlock:Q})]})})]})]})}),t.jsx(ft,{open:W,onOpenChange:v=>{!v&&!f.isPending&&$(!1)},children:t.jsxs(xt,{children:[t.jsxs(ht,{children:[t.jsx(gt,{children:r("sandbox.postEditor.deletePostConfirmTitle")}),t.jsx(bt,{children:r(Ss("post",C,{neverPublished:w(a)}),{title:B(b.title)||r("sandbox.postBoard.untitled")})})]}),t.jsxs(jt,{children:[t.jsx(vt,{disabled:f.isPending,children:r("sandbox.postEditor.deletePostCancel")}),t.jsx(yt,{onClick:v=>{v.preventDefault(),Y()},disabled:f.isPending,className:Be(kt({variant:"destructive"})),children:f.isPending?t.jsxs(t.Fragment,{children:[t.jsx(St,{className:"size-3.5"}),r("sandbox.postEditor.deletingPost")]}):r("sandbox.postEditor.deletePost")})]})]})})]})}function lo(l){const e=se.c(15),{blockKey:s,post:a,move:o,onMoveStatus:n}=l,d=ee();let c;e[0]!==a?(c=Ze(a),e[0]=a,e[1]=c):c=e[1];const i=c;let m,g;if(e[2]!==s||e[3]!==i||e[4]!==o||e[5]!==n||e[6]!==a||e[7]!==d){let h;e[10]!==i?(h=u=>u!=="generating"||i==="generating",e[10]=i,e[11]=h):h=e[11];const r=ds.filter(h);m="flex flex-wrap gap-1.5",g=r.map(u=>{const p=u===i,f=p?null:o.refuse(s,u,a);return t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsx("span",{children:t.jsx("button",{type:"button",disabled:!!f,"aria-pressed":p,onClick:()=>n(u),className:Be("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",p?"border-primary bg-primary text-primary-foreground":"cursor-pointer bg-card hover:bg-accent",f&&"cursor-not-allowed opacity-50"),children:d(fs[u])})})}),f&&t.jsx(Me,{side:"bottom",children:o.reasonText(f)})]},u)}),e[2]=s,e[3]=i,e[4]=o,e[5]=n,e[6]=a,e[7]=d,e[8]=m,e[9]=g}else m=e[8],g=e[9];let x;return e[12]!==m||e[13]!==g?(x=t.jsx("div",{className:m,children:g}),e[12]=m,e[13]=g,e[14]=x):x=e[14],x}function ao(l){const e=se.c(166),{post:s,decofile:a,onChange:o,blockKey:n,move:d,onMoveStatus:c}=l,i=ee();let m;e[0]!==s?(m=Ze(s),e[0]=s,e[1]=m):m=e[1];const x=m==="scheduled";let h;e[2]!==s.slug?(h=B(s.slug),e[2]=s.slug,e[3]=h):h=e[3];const r=h,[u,p]=K.useState(r),[f,S]=K.useState(null),[C,w]=K.useState(r);C!==r&&(w(r),p(r));let N;e[4]!==n||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==u||e[9]!==i?(N=()=>{const y=ns(u);if(p(y),y===r)return;if(!y){S(null),o("slug","");return}const He=Xe(a,"posts").filter(ot=>ot.key!==n).map(co).filter(Boolean);if(!He.includes(y)){S(null),o("slug",y);return}const ze=rs(y,He),Ve=i("sandbox.postEditor.slugDeduped",{slug:ze});p(ze),S(Ve),we.info(Ve),o("slug",ze)},e[4]=n,e[5]=r,e[6]=a,e[7]=o,e[8]=u,e[9]=i,e[10]=N):N=e[10];const q=N;let j;e[11]!==i?(j=i("sandbox.postEditor.statusLabel"),e[11]=i,e[12]=j):j=e[12];let _;e[13]!==j?(_=t.jsx(te,{children:j}),e[13]=j,e[14]=_):_=e[14];let k;e[15]!==n||e[16]!==d||e[17]!==c||e[18]!==s?(k=t.jsx(lo,{blockKey:n,post:s,move:d,onMoveStatus:c}),e[15]=n,e[16]=d,e[17]=c,e[18]=s,e[19]=k):k=e[19];let P;e[20]!==_||e[21]!==k?(P=t.jsxs("div",{className:"space-y-2",children:[_,k]}),e[20]=_,e[21]=k,e[22]=P):P=e[22];let b;e[23]!==x||e[24]!==o||e[25]!==s.scheduledDatetime||e[26]!==i?(b=x&&t.jsx(Re,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:B(s.scheduledDatetime),onChange:y=>o("scheduledDatetime",y),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}),e[23]=x,e[24]=o,e[25]=s.scheduledDatetime,e[26]=i,e[27]=b):b=e[27];let E;e[28]!==P||e[29]!==b?(E=t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[P,b]}),e[28]=P,e[29]=b,e[30]=E):E=e[30];let T;e[31]!==i?(T=i("sandbox.postEditor.excerptLabel"),e[31]=i,e[32]=T):T=e[32];let A;e[33]!==T?(A=t.jsx(te,{htmlFor:"post-excerpt",children:T}),e[33]=T,e[34]=A):A=e[34];let F;e[35]!==s.excerpt?(F=B(s.excerpt),e[35]=s.excerpt,e[36]=F):F=e[36];let z;e[37]!==o?(z=y=>o("excerpt",y.target.value),e[37]=o,e[38]=z):z=e[38];let M;e[39]!==F||e[40]!==z?(M=t.jsx(Je,{id:"post-excerpt",value:F,onChange:z,rows:2}),e[39]=F,e[40]=z,e[41]=M):M=e[41];let D;e[42]!==A||e[43]!==M?(D=t.jsxs("div",{className:"space-y-2",children:[A,M]}),e[42]=A,e[43]=M,e[44]=D):D=e[44];let U;e[45]!==i?(U=i("sandbox.postEditor.slugLabel"),e[45]=i,e[46]=U):U=e[46];let R;e[47]!==U?(R=t.jsx(te,{htmlFor:"post-slug",children:U}),e[47]=U,e[48]=R):R=e[48];let Q;e[49]===Symbol.for("react.memo_cache_sentinel")?(Q=y=>{S(null),p(cs(y.target.value))},e[49]=Q):Q=e[49];let H;e[50]!==i?(H=i("sandbox.postEditor.slugPlaceholder"),e[50]=i,e[51]=H):H=e[51];let V;e[52]!==q||e[53]!==u||e[54]!==H?(V=t.jsx(Ae,{id:"post-slug",value:u,onChange:Q,onBlur:q,placeholder:H,maxLength:80,className:"h-10"}),e[52]=q,e[53]=u,e[54]=H,e[55]=V):V=e[55];let I;e[56]!==f?(I=f&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),f]}),e[56]=f,e[57]=I):I=e[57];let G;e[58]!==R||e[59]!==V||e[60]!==I?(G=t.jsxs("div",{className:"space-y-2",children:[R,V,I]}),e[58]=R,e[59]=V,e[60]=I,e[61]=G):G=e[61];let J;e[62]!==i?(J=i("sandbox.postEditor.dateLabel"),e[62]=i,e[63]=J):J=e[63];let W;e[64]!==J?(W={type:"string",format:"date",title:J},e[64]=J,e[65]=W):W=e[65];let $;e[66]!==s.date?($=B(s.date),e[66]=s.date,e[67]=$):$=e[67];let Y;e[68]!==o?(Y=y=>o("date",y),e[68]=o,e[69]=Y):Y=e[69];let O;e[70]!==i?(O=i("sandbox.postEditor.dateLabel"),e[70]=i,e[71]=O):O=e[71];let L;e[72]!==W||e[73]!==$||e[74]!==Y||e[75]!==O?(L=t.jsx(Re,{schema:W,value:$,onChange:Y,path:"post-date",label:O}),e[72]=W,e[73]=$,e[74]=Y,e[75]=O,e[76]=L):L=e[76];let Z;e[77]!==i?(Z=i("sandbox.postEditor.readTimeLabel"),e[77]=i,e[78]=Z):Z=e[78];let v;e[79]!==Z?(v={type:"integer",title:Z},e[79]=Z,e[80]=v):v=e[80];const X=typeof s.readTime=="number"?s.readTime:void 0;let oe;e[81]!==o?(oe=y=>o("readTime",y),e[81]=o,e[82]=oe):oe=e[82];let ie;e[83]!==i?(ie=i("sandbox.postEditor.readTimeLabel"),e[83]=i,e[84]=ie):ie=e[84];let le;e[85]!==v||e[86]!==X||e[87]!==oe||e[88]!==ie?(le=t.jsx(Yt,{schema:v,value:X,onChange:oe,path:"post-read-time",label:ie}),e[85]=v,e[86]=X,e[87]=oe,e[88]=ie,e[89]=le):le=e[89];let ae;e[90]!==G||e[91]!==L||e[92]!==le?(ae=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[G,L,le]}),e[90]=G,e[91]=L,e[92]=le,e[93]=ae):ae=e[93];const tt=s.image,st=s.mobileImage;let ne,re;e[94]!==o?(ne=y=>o("image",y),re=y=>o("mobileImage",y),e[94]=o,e[95]=ne,e[96]=re):(ne=e[95],re=e[96]);let ce;e[97]!==s.alt?(ce=B(s.alt),e[97]=s.alt,e[98]=ce):ce=e[98];let de;e[99]!==i?(de=i("sandbox.postEditor.coverImageLabel"),e[99]=i,e[100]=de):de=e[100];let me;e[101]!==s.image||e[102]!==s.mobileImage||e[103]!==ne||e[104]!==re||e[105]!==ce||e[106]!==de?(me=t.jsx(Ut,{value:tt,mobileValue:st,onChange:ne,onMobileChange:re,alt:ce,label:de}),e[101]=s.image,e[102]=s.mobileImage,e[103]=ne,e[104]=re,e[105]=ce,e[106]=de,e[107]=me):me=e[107];let pe;e[108]!==i?(pe=i("sandbox.postEditor.coverAltLabel"),e[108]=i,e[109]=pe):pe=e[109];let ue;e[110]!==i?(ue=i("sandbox.postEditor.coverAltDescription"),e[110]=i,e[111]=ue):ue=e[111];let fe;e[112]!==pe||e[113]!==ue?(fe={type:"string",title:pe,description:ue},e[112]=pe,e[113]=ue,e[114]=fe):fe=e[114];let xe;e[115]!==s.alt?(xe=B(s.alt),e[115]=s.alt,e[116]=xe):xe=e[116];let he;e[117]!==o?(he=y=>o("alt",y),e[117]=o,e[118]=he):he=e[118];let ge;e[119]!==i?(ge=i("sandbox.postEditor.coverAltLabel"),e[119]=i,e[120]=ge):ge=e[120];let be;e[121]!==fe||e[122]!==xe||e[123]!==he||e[124]!==ge?(be=t.jsx(Re,{schema:fe,value:xe,onChange:he,path:"post-alt",label:ge}),e[121]=fe,e[122]=xe,e[123]=he,e[124]=ge,e[125]=be):be=e[125];let je;e[126]!==me||e[127]!==be?(je=t.jsxs("div",{className:"space-y-2",children:[me,be]}),e[126]=me,e[127]=be,e[128]=je):je=e[128];let ve;e[129]!==i?(ve=i("sandbox.postEditor.authorsLabel"),e[129]=i,e[130]=ve):ve=e[130];let ye;e[131]!==o?(ye=y=>o("authors",y),e[131]=o,e[132]=ye):ye=e[132];let Se;e[133]!==a||e[134]!==s.authors||e[135]!==ve||e[136]!==ye?(Se=t.jsx(Qe,{label:ve,decofile:a,kind:"authors",valueField:"email",toRef:ro,selected:s.authors,onChange:ye}),e[133]=a,e[134]=s.authors,e[135]=ve,e[136]=ye,e[137]=Se):Se=e[137];let ke;e[138]!==i?(ke=i("sandbox.postEditor.categoriesLabel"),e[138]=i,e[139]=ke):ke=e[139];let Ee;e[140]!==o?(Ee=y=>o("categories",y),e[140]=o,e[141]=Ee):Ee=e[141];let Ce;e[142]!==a||e[143]!==s.categories||e[144]!==ke||e[145]!==Ee?(Ce=t.jsx(Qe,{label:ke,decofile:a,kind:"categories",valueField:"slug",toRef:no,selected:s.categories,onChange:Ee}),e[142]=a,e[143]=s.categories,e[144]=ke,e[145]=Ee,e[146]=Ce):Ce=e[146];let _e;e[147]!==o?(_e=y=>o("extraProps",y),e[147]=o,e[148]=_e):_e=e[148];let Pe;e[149]!==s.extraProps||e[150]!==_e?(Pe=t.jsx(po,{value:s.extraProps,onChange:_e}),e[149]=s.extraProps,e[150]=_e,e[151]=Pe):Pe=e[151];let Ne;e[152]!==o?(Ne=y=>o("seo",y),e[152]=o,e[153]=Ne):Ne=e[153];let Te;e[154]!==s.seo||e[155]!==Ne?(Te=t.jsx(mo,{value:s.seo,onChange:Ne}),e[154]=s.seo,e[155]=Ne,e[156]=Te):Te=e[156];let Fe;return e[157]!==D||e[158]!==ae||e[159]!==je||e[160]!==Se||e[161]!==Ce||e[162]!==Pe||e[163]!==Te||e[164]!==E?(Fe=t.jsxs("div",{className:"space-y-5",children:[E,D,ae,je,Se,Ce,Pe,Te]}),e[157]=D,e[158]=ae,e[159]=je,e[160]=Se,e[161]=Ce,e[162]=Pe,e[163]=Te,e[164]=E,e[165]=Fe):Fe=e[165],Fe}function no(l){return{name:B(l.name),slug:B(l.slug)}}function ro(l){return{...l}}function co(l){return B(l.payload.slug)}function mo(l){const e=se.c(93),{value:s,onChange:a}=l,o=ee();let n;e[0]!==s?(n=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=n):n=e[1];const d=n;let c;e[2]!==a||e[3]!==d?(c=(L,Z)=>a({...d,[L]:Z}),e[2]=a,e[3]=d,e[4]=c):c=e[4];const i=c;let m;e[5]!==o?(m=o("sandbox.postEditor.seoSectionLabel"),e[5]=o,e[6]=m):m=e[6];let g;e[7]!==m?(g=t.jsx("p",{className:"text-sm font-medium",children:m}),e[7]=m,e[8]=g):g=e[8];let x;e[9]!==o?(x=o("sandbox.postEditor.seoSectionHint"),e[9]=o,e[10]=x):x=e[10];let h;e[11]!==x?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:x}),e[11]=x,e[12]=h):h=e[12];let r;e[13]!==g||e[14]!==h?(r=t.jsxs("div",{className:"space-y-1",children:[g,h]}),e[13]=g,e[14]=h,e[15]=r):r=e[15];let u;e[16]!==o?(u=o("sandbox.postEditor.seoTitleLabel"),e[16]=o,e[17]=u):u=e[17];let p;e[18]!==u?(p=t.jsx(te,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=p):p=e[19];let f;e[20]!==d.title?(f=B(d.title),e[20]=d.title,e[21]=f):f=e[21];let S;e[22]!==i?(S=L=>i("title",L.target.value),e[22]=i,e[23]=S):S=e[23];let C;e[24]!==f||e[25]!==S?(C=t.jsx(Ae,{id:"post-seo-title",value:f,onChange:S,className:"h-10"}),e[24]=f,e[25]=S,e[26]=C):C=e[26];let w;e[27]!==C||e[28]!==p?(w=t.jsxs("div",{className:"space-y-2",children:[p,C]}),e[27]=C,e[28]=p,e[29]=w):w=e[29];let N;e[30]!==o?(N=o("sandbox.postEditor.seoDescriptionLabel"),e[30]=o,e[31]=N):N=e[31];let q;e[32]!==N?(q=t.jsx(te,{htmlFor:"post-seo-description",children:N}),e[32]=N,e[33]=q):q=e[33];let j;e[34]!==d.description?(j=B(d.description),e[34]=d.description,e[35]=j):j=e[35];let _;e[36]!==i?(_=L=>i("description",L.target.value),e[36]=i,e[37]=_):_=e[37];let k;e[38]!==j||e[39]!==_?(k=t.jsx(Je,{id:"post-seo-description",value:j,onChange:_,rows:2}),e[38]=j,e[39]=_,e[40]=k):k=e[40];let P;e[41]!==q||e[42]!==k?(P=t.jsxs("div",{className:"space-y-2",children:[q,k]}),e[41]=q,e[42]=k,e[43]=P):P=e[43];let b;e[44]!==o?(b=o("sandbox.postEditor.seoImageLabel"),e[44]=o,e[45]=b):b=e[45];let E;e[46]!==b?(E={type:"string",format:"image-uri",title:b},e[46]=b,e[47]=E):E=e[47];const T=d.image;let A;e[48]!==i?(A=L=>i("image",L),e[48]=i,e[49]=A):A=e[49];let F;e[50]!==o?(F=o("sandbox.postEditor.seoImageLabel"),e[50]=o,e[51]=F):F=e[51];let z;e[52]!==d.image||e[53]!==E||e[54]!==A||e[55]!==F?(z=t.jsx(Rt,{schema:E,value:T,onChange:A,path:"post-seo-image",label:F}),e[52]=d.image,e[53]=E,e[54]=A,e[55]=F,e[56]=z):z=e[56];let M;e[57]!==o?(M=o("sandbox.postEditor.seoCanonicalLabel"),e[57]=o,e[58]=M):M=e[58];let D;e[59]!==M?(D=t.jsx(te,{htmlFor:"post-seo-canonical",children:M}),e[59]=M,e[60]=D):D=e[60];let U;e[61]!==d.canonical?(U=B(d.canonical),e[61]=d.canonical,e[62]=U):U=e[62];let R;e[63]!==i?(R=L=>i("canonical",L.target.value),e[63]=i,e[64]=R):R=e[64];let Q;e[65]!==o?(Q=o("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=o,e[66]=Q):Q=e[66];let H;e[67]!==U||e[68]!==R||e[69]!==Q?(H=t.jsx(Ae,{id:"post-seo-canonical",value:U,onChange:R,placeholder:Q,className:"h-10"}),e[67]=U,e[68]=R,e[69]=Q,e[70]=H):H=e[70];let V;e[71]!==D||e[72]!==H?(V=t.jsxs("div",{className:"space-y-2",children:[D,H]}),e[71]=D,e[72]=H,e[73]=V):V=e[73];let I;e[74]!==o?(I=o("sandbox.postEditor.seoNoIndexingLabel"),e[74]=o,e[75]=I):I=e[75];let G;e[76]!==I?(G=t.jsx(te,{htmlFor:"post-seo-no-indexing",children:I}),e[76]=I,e[77]=G):G=e[77];const J=d.noIndexing===!0;let W;e[78]!==i?(W=L=>i("noIndexing",L),e[78]=i,e[79]=W):W=e[79];let $;e[80]!==J||e[81]!==W?($=t.jsx(Ot,{id:"post-seo-no-indexing",checked:J,onCheckedChange:W}),e[80]=J,e[81]=W,e[82]=$):$=e[82];let Y;e[83]!==G||e[84]!==$?(Y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[G,$]}),e[83]=G,e[84]=$,e[85]=Y):Y=e[85];let O;return e[86]!==w||e[87]!==P||e[88]!==z||e[89]!==V||e[90]!==Y||e[91]!==r?(O=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[r,w,P,z,V,Y]}),e[86]=w,e[87]=P,e[88]=z,e[89]=V,e[90]=Y,e[91]=r,e[92]=O):O=e[92],O}function po(l){const e=se.c(24),{value:s,onChange:a}=l,o=ee();let n,d,c,i;if(e[0]!==a||e[1]!==o||e[2]!==s){n=oo(s);const r=(p,f)=>a(n.map((S,C)=>C===p?{...S,...f}:S));d="space-y-2";let u;e[7]!==o?(u=o("sandbox.postEditor.extraPropsLabel"),e[7]=o,e[8]=u):u=e[8],e[9]!==u?(c=t.jsx(te,{children:u}),e[9]=u,e[10]=c):c=e[10],i=n.length>0&&t.jsx("ul",{className:"space-y-2",children:n.map((p,f)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(Ae,{value:p.key,onChange:S=>r(f,{key:S.target.value}),placeholder:o("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(Ae,{value:p.value,onChange:S=>r(f,{value:S.target.value}),placeholder:o("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(ps,{label:o("sandbox.postEditor.removePropLabel"),onClick:()=>a(n.filter((S,C)=>C!==f))})]},f))}),e[0]=a,e[1]=o,e[2]=s,e[3]=n,e[4]=d,e[5]=c,e[6]=i}else n=e[3],d=e[4],c=e[5],i=e[6];let m;e[11]!==o?(m=o("sandbox.postEditor.addPropLabel"),e[11]=o,e[12]=m):m=e[12];let g;e[13]!==n||e[14]!==a?(g=()=>a([...n,{key:"",value:""}]),e[13]=n,e[14]=a,e[15]=g):g=e[15];let x;e[16]!==m||e[17]!==g?(x=t.jsx(us,{label:m,onClick:g}),e[16]=m,e[17]=g,e[18]=x):x=e[18];let h;return e[19]!==d||e[20]!==c||e[21]!==i||e[22]!==x?(h=t.jsxs("div",{className:d,children:[c,i,x]}),e[19]=d,e[20]=c,e[21]=i,e[22]=x,e[23]=h):h=e[23],h}function Qe(l){const e=se.c(24),{label:s,decofile:a,kind:o,valueField:n,toRef:d,selected:c,onChange:i}=l,m=ee();let g;e[0]!==a||e[1]!==o||e[2]!==c||e[3]!==d||e[4]!==n?(g=as({records:Xe(a,o),selected:c,valueField:n,toRef:d}),e[0]=a,e[1]=o,e[2]=c,e[3]=d,e[4]=n,e[5]=g):g=e[5];const{options:x,selectedValues:h,refsForValues:r}=g;let u;e[6]!==o||e[7]!==m?(u=m(o==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=o,e[7]=m,e[8]=u):u=e[8];const p=u;let f;e[9]!==o||e[10]!==m?(f=m(o==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=o,e[10]=m,e[11]=f):f=e[11];const S=f;let C;e[12]!==s?(C=t.jsx(te,{children:s}),e[12]=s,e[13]=C):C=e[13];let w;e[14]!==p||e[15]!==i||e[16]!==x||e[17]!==r||e[18]!==S||e[19]!==h?(w=x.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:p}):t.jsx(At,{options:x,defaultValue:h,onValueChange:q=>i(r(q)),placeholder:S,maxCount:4}),e[14]=p,e[15]=i,e[16]=x,e[17]=r,e[18]=S,e[19]=h,e[20]=w):w=e[20];let N;return e[21]!==C||e[22]!==w?(N=t.jsxs("div",{className:"space-y-2",children:[C,w]}),e[21]=C,e[22]=w,e[23]=N):N=e[23],N}function ha(l){const e=se.c(10),s=l.block!==void 0;let a;e[0]!==l?(a=t.jsx(io,{...l}),e[0]=l,e[1]=a):a=e[1];let o;return e[2]!==l.blockKey||e[3]!==l.branch||e[4]!==l.decofile||e[5]!==l.orgSlug||e[6]!==l.virtualMcpId||e[7]!==s||e[8]!==a?(o=t.jsx(Gt,{listing:l.decofile,orgSlug:l.orgSlug,virtualMcpId:l.virtualMcpId,branch:l.branch,blockKey:l.blockKey,present:s,children:a}),e[2]=l.blockKey,e[3]=l.branch,e[4]=l.decofile,e[5]=l.orgSlug,e[6]=l.virtualMcpId,e[7]=s,e[8]=a,e[9]=o):o=e[9],o}export{ha as PostEditor};