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 +0,0 @@
1
- import{c as R,b as Q,e as Xe,j as n,B as F,t as We,o as gt,cr as pe,ah as zt,a as fe,M as cn,V as Ft,K as ht,cs as Bt,ct as Mt,av as Ze,m as bt,b8 as dn,C as kt,r as X,af as un,ag as ie,cu as mn,w as Kt,x as qt,v as Ht,D as Ut,d as Jt,a6 as jt,H as fn,T as Vt,i as et,E as xt,aW as Gt,cv as gn,cw as hn,b6 as Tt,J as pn,cx as yn,bD as bn,aU as xn,y as wn,cy as Sn,cz as jn,cA as vn,cB as kn,cC as Tn,a7 as Nn,u as Pn,a8 as _n,cD as In,cE as On,l as Wt,cF as Nt,cG as An,O as Cn,b1 as Pt,cH as En,a0 as $n}from"./index-C6-0Ff1m.js";import{t as Yt}from"./Globe04-OZ9xS3Lx.js";import{i as Ln,s as se}from"./UserSquare-a_XazovD.js";import{u as Dn}from"./use-deployment-admin-KnQTKRss.js";import{a as Rn}from"./admin-fetch-BhTJlAsX.js";import{$ as zn,z as yt,x as Fn,a0 as Bn,a1 as Mn,n as _t,h as Kn,a2 as qn,k as Hn,a3 as Un}from"./agent-icon-SasBmPrY.js";import{s as Jn,d as Vn}from"./UserCheck01-DLUgjW3m.js";import{s as Gn}from"./XClose-DxbjiApV.js";import{l as Qt,i as Wn,c as Yn,b as Qn,a as Xn,w as Zn,O as es,j as ts,u as ns,k as ss,o as os}from"./use-org-notice-DOVWyuaL.js";import{u as is,a as as}from"./use-project-scope-DwQViH2f.js";import{u as Xt,a as rs}from"./use-panel-navigate-CkYTugDF.js";import{i as me}from"./CheckCircle-BB00e9u8.js";import{i as It}from"./Monitor01-COmDHQ1j.js";import{i as Ve}from"./Zap-QnlW2BG3.js";import{s as Ot}from"./Plus-CF8KlFVc.js";import{a as ls}from"./Tool01-BpBS8dw-.js";import{e as Ge,b as oe,d as cs,a as ds,c as us,C as ms}from"./command-CjjWneJ9.js";import{I as fs}from"./integration-icon-BIQ_3p0x.js";import{P as gs}from"./project-icon-CGc9ojaV.js";import{a as hs}from"./use-navigate-to-agent-WJ7w-8ZZ.js";import{u as ps}from"./use-debounced-value-Dw3dFt4C.js";import{a as ys,m as bs}from"./use-mcp-client-Bg8mQo9f.js";import{a as xs}from"./new-project-dialog-Ch6wUMKc.js";import{u as ws,n as Ss}from"./new-project-store-BJVEZe7t.js";import{L as js}from"./legacy-admin-welcome-dialog-Cdla_zr3.js";import{R as vs}from"./required-auth-layout-BwuuU3bJ.js";import{t as ks,u as Ts,b as Ns,A as At}from"./use-view-draft-kind-DrDbO3-P.js";import{u as Ps,a as _s,c as Is,b as Os}from"./thread-route-DY_UV0gu.js";import{c as As,f as Cs}from"./thread-intent-j3i3V7mR.js";import{u as Es}from"./use-blog-view-BHifDign.js";import{u as $s}from"./use-org-sso-D7w6nhfD.js";function Ls(t){const e=R.c(49),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Q();let c;e[0]!==a||e[1]!==i?(c=async()=>{const I=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),A=await I.json();if(!I.ok||!A.success)throw new Error(A.error??i("common.autoDomainJoinScreen.joinError"));return A},e[0]=a,e[1]=i,e[2]=c):c=e[2];let f;e[3]!==a?(f=I=>{window.location.href=`/${I.slug??a}`},e[3]=a,e[4]=f):f=e[4];let g;e[5]!==i?(g=I=>{We.error(I instanceof Error?I.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=g):g=e[6];let h;e[7]!==c||e[8]!==f||e[9]!==g?(h={mutationFn:c,onSuccess:f,onError:g},e[7]=c,e[8]=f,e[9]=g,e[10]=h):h=e[10];const d=Xe(h),u=Ds;let l;e[11]!==s||e[12]!==o?(l=s?n.jsx(gt,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Yt,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=l):l=e[13];let y;e[14]!==o||e[15]!==i?(y=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=y):y=e[16];let m;e[17]!==y?(m=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[17]=y,e[18]=m):m=e[18];let w;e[19]!==r||e[20]!==i?(w=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=w):w=e[21];let j;e[22]!==w?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[22]=w,e[23]=j):j=e[23];let p;e[24]!==m||e[25]!==j?(p=n.jsxs("div",{className:"space-y-2",children:[m,j]}),e[24]=m,e[25]=j,e[26]=p):p=e[26];let b;e[27]!==d?(b=()=>d.mutate(),e[27]=d,e[28]=b):b=e[28];let S;e[29]!==d.isPending||e[30]!==o||e[31]!==i?(S=d.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=d.isPending,e[30]=o,e[31]=i,e[32]=S):S=e[32];let x;e[33]!==d.isPending||e[34]!==b||e[35]!==S?(x=n.jsx(F,{onClick:b,disabled:d.isPending,children:S}),e[33]=d.isPending,e[34]=b,e[35]=S,e[36]=x):x=e[36];const k=d.isPending;let T;e[37]!==i?(T=i("common.goHome"),e[37]=i,e[38]=T):T=e[38];let v;e[39]!==d.isPending||e[40]!==T?(v=n.jsx(F,{variant:"ghost",onClick:u,disabled:k,children:T}),e[39]=d.isPending,e[40]=T,e[41]=v):v=e[41];let P;e[42]!==x||e[43]!==v?(P=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[x,v]}),e[42]=x,e[43]=v,e[44]=P):P=e[44];let _;return e[45]!==p||e[46]!==P||e[47]!==l?(_=n.jsxs(pe,{children:[l,p,P]}),e[45]=p,e[46]=P,e[47]=l,e[48]=_):_=e[48],_}function Ds(){window.location.href="/"}function Ct(t){const e=R.c(26),{orgSlug:o,orgId:a,orgName:s,reason:r}=t,i=Q(),{isAdmin:c}=Dn(),f=Rs,g=r==="not-found",h=g?Ln:zt;let d;e[0]!==g||e[1]!==i?(d=i(g?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=g,e[1]=i,e[2]=d):d=e[2];const u=d;let l;e[3]!==g||e[4]!==s||e[5]!==o||e[6]!==i?(l=g?n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:s??o}),".",n.jsx("br",{}),i("common.noAccessScreen.askAdminToInvite")]}),e[3]=g,e[4]=s,e[5]=o,e[6]=i,e[7]=l):l=e[7];const y=l;let m;e[8]!==h?(m=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(h,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=h,e[9]=m):m=e[9];let w;e[10]!==u?(w=n.jsx("h3",{className:"text-lg font-medium",children:u}),e[10]=u,e[11]=w):w=e[11];let j;e[12]!==y?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[12]=y,e[13]=j):j=e[13];let p;e[14]!==w||e[15]!==j?(p=n.jsxs("div",{className:"space-y-2",children:[w,j]}),e[14]=w,e[15]=j,e[16]=p):p=e[16];let b;e[17]!==c||e[18]!==a||e[19]!==o||e[20]!==i?(b=c&&a?n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n.jsx(zs,{orgId:a,orgSlug:o}),n.jsx(F,{variant:"ghost",onClick:f,children:i("common.goHome")})]}):n.jsx(F,{onClick:f,children:i("common.goHome")}),e[17]=c,e[18]=a,e[19]=o,e[20]=i,e[21]=b):b=e[21];let S;return e[22]!==m||e[23]!==p||e[24]!==b?(S=n.jsxs(pe,{children:[m,p,b]}),e[22]=m,e[23]=p,e[24]=b,e[25]=S):S=e[25],S}function Rs(){window.location.href="/"}function zs(t){const e=R.c(20),{orgId:o,orgSlug:a}=t,s=Q(),{data:r}=fe.useSession(),i=r?.user.email;let c;e[0]!==i||e[1]!==o?(c=()=>Rn(`/api/_admin/orgs/${o}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,role:"admin"})}),e[0]=i,e[1]=o,e[2]=c):c=e[2];let f;e[3]!==a?(f=()=>{window.location.href=`/${a}`},e[3]=a,e[4]=f):f=e[4];let g;e[5]!==s?(g=w=>{We.error(w instanceof Error?w.message:s("common.noAccessScreen.adminJoinFailed"))},e[5]=s,e[6]=g):g=e[6];let h;e[7]!==c||e[8]!==f||e[9]!==g?(h={mutationFn:c,onSuccess:f,onError:g},e[7]=c,e[8]=f,e[9]=g,e[10]=h):h=e[10];const d=Xe(h);let u;e[11]!==d?(u=()=>d.mutate(),e[11]=d,e[12]=u):u=e[12];const l=!i||d.isPending;let y;e[13]!==d.isPending||e[14]!==s?(y=d.isPending?s("common.noAccessScreen.adminJoining"):s("common.noAccessScreen.adminJoin"),e[13]=d.isPending,e[14]=s,e[15]=y):y=e[15];let m;return e[16]!==u||e[17]!==l||e[18]!==y?(m=n.jsx(F,{onClick:u,disabled:l,children:y}),e[16]=u,e[17]=l,e[18]=y,e[19]=m):m=e[19],m}function Fs(t){const e=R.c(59),{invitationId:o,orgName:a,orgSlug:s,orgLogo:r}=t,i=Q();let c;e[0]!==o?(c=async()=>{const O=await fe.organization.acceptInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[0]=o,e[1]=c):c=e[1];let f;e[2]!==s?(f=()=>{cn(),window.location.href=`/${s}`},e[2]=s,e[3]=f):f=e[3];let g;e[4]!==i?(g=O=>{We.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=g):g=e[5];let h;e[6]!==c||e[7]!==f||e[8]!==g?(h={mutationFn:c,onSuccess:f,onError:g},e[6]=c,e[7]=f,e[8]=g,e[9]=h):h=e[9];const d=Xe(h);let u;e[10]!==o?(u=async()=>{const O=await fe.organization.rejectInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[10]=o,e[11]=u):u=e[11];let l,y;e[12]!==i?(l=()=>{We.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},y=O=>{We.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=l,e[14]=y):(l=e[13],y=e[14]);let m;e[15]!==u||e[16]!==l||e[17]!==y?(m={mutationFn:u,onSuccess:l,onError:y},e[15]=u,e[16]=l,e[17]=y,e[18]=m):m=e[18];const w=Xe(m),j=d.isPending||w.isPending;let p;e[19]!==r||e[20]!==a?(p=r?n.jsx(gt,{url:r,fallback:a,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(zn,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=a,e[21]=p):p=e[21];let b;e[22]!==a||e[23]!==i?(b=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=b):b=e[24];let S;e[25]!==b?(S=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[25]=b,e[26]=S):S=e[26];let x;e[27]!==i?(x=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=x):x=e[28];let k;e[29]!==x?(k=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[29]=x,e[30]=k):k=e[30];let T;e[31]!==S||e[32]!==k?(T=n.jsxs("div",{className:"space-y-2",children:[S,k]}),e[31]=S,e[32]=k,e[33]=T):T=e[33];let v;e[34]!==d?(v=()=>d.mutate(),e[34]=d,e[35]=v):v=e[35];let P;e[36]!==d.isPending||e[37]!==i?(P=d.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=d.isPending,e[37]=i,e[38]=P):P=e[38];let _;e[39]!==j||e[40]!==v||e[41]!==P?(_=n.jsx(F,{onClick:v,disabled:j,children:P}),e[39]=j,e[40]=v,e[41]=P,e[42]=_):_=e[42];let I;e[43]!==w?(I=()=>w.mutate(),e[43]=w,e[44]=I):I=e[44];let A;e[45]!==w.isPending||e[46]!==i?(A=w.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=w.isPending,e[46]=i,e[47]=A):A=e[47];let E;e[48]!==j||e[49]!==I||e[50]!==A?(E=n.jsx(F,{variant:"ghost",onClick:I,disabled:j,children:A}),e[48]=j,e[49]=I,e[50]=A,e[51]=E):E=e[51];let $;e[52]!==_||e[53]!==E?($=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,E]}),e[52]=_,e[53]=E,e[54]=$):$=e[54];let L;return e[55]!==T||e[56]!==$||e[57]!==p?(L=n.jsxs(pe,{children:[p,T,$]}),e[55]=T,e[56]=$,e[57]=p,e[58]=L):L=e[58],L}function Bs(t){const e=R.c(23),{orgName:o,orgLogo:a}=t,s=Q();let r;e[0]!==a||e[1]!==o?(r=a?n.jsx(gt,{url:a,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(Jn,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let c;e[5]!==i?(c=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=c):c=e[6];let f;e[7]!==o||e[8]!==s?(f=s("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=s,e[9]=f):f=e[9];let g;e[10]!==f?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[10]=f,e[11]=g):g=e[11];let h;e[12]!==c||e[13]!==g?(h=n.jsxs("div",{className:"space-y-2",children:[c,g]}),e[12]=c,e[13]=g,e[14]=h):h=e[14];let d;e[15]!==s?(d=s("common.goHome"),e[15]=s,e[16]=d):d=e[16];let u;e[17]!==d?(u=n.jsx(F,{variant:"ghost",onClick:Ms,children:d}),e[17]=d,e[18]=u):u=e[18];let l;return e[19]!==r||e[20]!==h||e[21]!==u?(l=n.jsxs(pe,{children:[r,h,u]}),e[19]=r,e[20]=h,e[21]=u,e[22]=l):l=e[22],l}function Ms(){window.location.href="/"}function Ks(t){const e=R.c(45),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Q();let c;e[0]!==a?(c=async()=>{const _=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),I=await _.json();if(!_.ok||!I.success)throw new Error(I.error??"Failed to request access");return I},e[0]=a,e[1]=c):c=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=Hs,e[2]=f):f=e[2];let g;e[3]!==i?(g=_=>{We.error(_ instanceof Error?_.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=g):g=e[4];let h;e[5]!==c||e[6]!==g?(h={mutationFn:c,onSuccess:f,onError:g},e[5]=c,e[6]=g,e[7]=h):h=e[7];const d=Xe(h);let u;e[8]!==s||e[9]!==o?(u=s?n.jsx(gt,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Yt,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=u):u=e[10];let l;e[11]!==o||e[12]!==i?(l=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=l):l=e[13];let y;e[14]!==l?(y=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[14]=l,e[15]=y):y=e[15];let m;e[16]!==r||e[17]!==i?(m=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=m):m=e[18];let w;e[19]!==m?(w=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[19]=m,e[20]=w):w=e[20];let j;e[21]!==y||e[22]!==w?(j=n.jsxs("div",{className:"space-y-2",children:[y,w]}),e[21]=y,e[22]=w,e[23]=j):j=e[23];let p;e[24]!==d?(p=()=>d.mutate(),e[24]=d,e[25]=p):p=e[25];let b;e[26]!==d.isPending||e[27]!==i?(b=d.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=d.isPending,e[27]=i,e[28]=b):b=e[28];let S;e[29]!==d.isPending||e[30]!==p||e[31]!==b?(S=n.jsx(F,{onClick:p,disabled:d.isPending,children:b}),e[29]=d.isPending,e[30]=p,e[31]=b,e[32]=S):S=e[32];const x=d.isPending;let k;e[33]!==i?(k=i("common.goHome"),e[33]=i,e[34]=k):k=e[34];let T;e[35]!==d.isPending||e[36]!==k?(T=n.jsx(F,{variant:"ghost",onClick:qs,disabled:x,children:k}),e[35]=d.isPending,e[36]=k,e[37]=T):T=e[37];let v;e[38]!==S||e[39]!==T?(v=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[S,T]}),e[38]=S,e[39]=T,e[40]=v):v=e[40];let P;return e[41]!==j||e[42]!==v||e[43]!==u?(P=n.jsxs(pe,{children:[u,j,v]}),e[41]=j,e[42]=v,e[43]=u,e[44]=P):P=e[44],P}function qs(){window.location.href="/"}function Hs(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Us(t){const e=R.c(7);let o;e[0]!==t?(o=ht.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let s;return e[4]!==o||e[5]!==a?(s={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=s):s=e[6],Ft(s)}function Js({orgSlug:t}){const{data:e}=Us(t);if(e.status!=="member"){const o=Bt()?.org===t;o&&Mt();const a=localStorage.getItem(Ze.lastOrgSlug())===t;if(a&&localStorage.removeItem(Ze.lastOrgSlug()),(o||a)&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(Ct,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Fs,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Ls,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Ks,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Bs,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(Ct,{orgSlug:t,orgId:e.organization.id,orgName:e.organization.name,reason:"no-access"})}function Zt(t){const e=R.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:s,title:r,description:i,icon:c,children:f,footerLeading:g,actions:h,onDismiss:d,tone:u}=t,l=u===void 0?"neutral":u,y=g||h;let m;e[0]!==l?(m=l==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=l,e[1]=m):m=e[1];let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Gn,{size:14}),e[2]=w):w=e[2];let j;e[3]!==a||e[4]!==d?(j=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:d,children:w}),e[3]=a,e[4]=d,e[5]=j):j=e[5];const p=c&&"flex items-start gap-3",b=f&&"pb-3";let S;e[6]!==p||e[7]!==b?(S=bt("p-4 pr-11",p,b),e[6]=p,e[7]=b,e[8]=S):S=e[8];let x;e[9]!==c?(x=c&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:c}),e[9]=c,e[10]=x):x=e[10];let k;e[11]!==s?(k=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=k):k=e[12];let T;e[13]!==r?(T=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=T):T=e[14];let v;e[15]!==i?(v=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=v):v=e[16];let P;e[17]!==T||e[18]!==v||e[19]!==k?(P=n.jsxs("div",{children:[k,T,v]}),e[17]=T,e[18]=v,e[19]=k,e[20]=P):P=e[20];let _;e[21]!==f?(_=f&&n.jsx("div",{className:"mt-3",children:f}),e[21]=f,e[22]=_):_=e[22];let I;e[23]!==P||e[24]!==_?(I=n.jsxs("div",{className:"min-w-0 flex-1",children:[P,_]}),e[23]=P,e[24]=_,e[25]=I):I=e[25];let A;e[26]!==I||e[27]!==S||e[28]!==x?(A=n.jsxs("div",{className:S,children:[x,I]}),e[26]=I,e[27]=S,e[28]=x,e[29]=A):A=e[29];let E;e[30]!==h||e[31]!==g||e[32]!==y||e[33]!==l?(E=y&&n.jsxs("div",{className:bt("flex items-center justify-between gap-3 px-4 py-2.5",l==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:g}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:h})]}),e[30]=h,e[31]=g,e[32]=y,e[33]=l,e[34]=E):E=e[34];let $;return e[35]!==o||e[36]!==A||e[37]!==E||e[38]!==m||e[39]!==j||e[40]!==l?($=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":l,className:"relative w-full overflow-hidden rounded-lg bg-popover shadow-soft animate-in fade-in slide-in-from-bottom-2 duration-300",children:[m,j,A,E]}),e[35]=o,e[36]=A,e[37]=E,e[38]=m,e[39]=j,e[40]=l,e[41]=$):$=e[41],$}const Vs=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function Gs(t){return Vs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function Ws(t,e){return Gs(e).map(o=>({element:Qt(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const Ys=Qt("switcher"),Qs=30;function en(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function Xs(t,e){return Ws(t,e).filter(o=>typeof o.element=="string"&&en(o.element))}function Zs(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(o,{driver:a})=>{if(o.footerButtons.querySelector(".layout-tour-skip"))return;const s=document.createElement("button");s.type="button",s.className="driver-popover-footer-btn layout-tour-skip",s.textContent=t("layoutTour.skip"),s.addEventListener("click",()=>a.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{Qe=!1},steps:e}}let Qe=!1;async function eo(){return(await dn(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function to(t,e){if(Qe)return;Qe=!0;let o=0;const a=()=>{if(!en(Ys)&&o++<Qs){requestAnimationFrame(a);return}const s=Xs(t,e);if(s.length===0){Qe=!1;return}eo().then(r=>{r(Zs(t,s)).drive()}).catch(()=>{Qe=!1})};a()}const tn=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:It,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:yt,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:Vn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:kt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:se,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:It,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:se,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:me,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:Ve,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:se,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:me,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:Ve,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:me,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:se,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:Ve,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:se,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:me,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:Ve,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:se,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:me,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:Ve,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:se,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:yt,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:me,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:kt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:Ve,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:me,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:se,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:yt,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:se,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:Fn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ft="studio.release-feed.v1",wt=new Set;let ge="",he={},St=!1;function no(){if(St)return ge||"{}";try{return localStorage.getItem(ft)??"{}"}catch{return ge||"{}"}}function nn(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Et(){const t=no();return t!==ge&&(ge=t,he=nn(t)),he}function so(t){wt.add(t);const e=o=>{if(!(o.key!==ft&&o.key!==null)){try{const a=localStorage.getItem(ft)??"{}",r={...nn(a),...he};he=r,ge=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{wt.delete(t),window.removeEventListener("storage",e)}}function oo(t){he=t,ge=JSON.stringify(t);try{localStorage.setItem(ft,ge),St=!1}catch{St=!0}wt.forEach(e=>e())}function io(){const t=R.c(7),e=X.useSyncExternalStore(so,Et,Et);let o;t[0]!==e?(o=f=>!!e[f],t[0]=e,t[1]=o):o=t[1];const a=o,s=ao;let r;t[2]!==e?(r=tn.reduce((f,g)=>e[g.id]?f:f+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let c;return t[4]!==a||t[5]!==i?(c={isSeen:a,markSeen:s,unseenCount:i},t[4]=a,t[5]=i,t[6]=c):c=t[6],c}function ao(t){he[t]||oo({...he,[t]:{seenAt:new Date().toISOString()}})}const $t=new Map;function sn(t){let e=$t.get(t);return e||(e={now:Date.now(),subscribers:new Set,intervalId:null},$t.set(t,e)),e}function ro(t,e){const o=sn(t);return o.subscribers.add(e),o.intervalId===null&&(o.intervalId=setInterval(()=>{o.now=Date.now();for(const a of o.subscribers)a()},t)),()=>{o.subscribers.delete(e),o.subscribers.size===0&&o.intervalId!==null&&(clearInterval(o.intervalId),o.intervalId=null)}}function lo(t){const e=R.c(4),o=t===void 0?6e4:t;let a;e[0]!==o?(a=()=>sn(o).now,e[0]=o,e[1]=a):a=e[1];const s=a;let r;return e[2]!==o?(r=i=>ro(o,i),e[2]=o,e[3]=r):r=e[3],X.useSyncExternalStore(r,s,s)}const co=720*60*60*1e3,uo=10080*60*1e3;function mo(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function fo(t){const e=tn[0];if(!e)return null;const o=mo(e.date),a=t-o;return a<0||a>co?null:e}function go(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function ho(t,e){const o=go(t);return o===null?!1:e-o>=uo}function po(){const t=R.c(46),e=Q(),o=is(),a=un(),s=Xt(),r=!!o,i=a===ie.home&&!o;let c;t[0]!==s||t[1]!==r?(c=r&&!!s&&Wn(s),t[0]=s,t[1]=r,t[2]=c):c=t[2];const f=c,{data:g}=fe.useSession(),{isSeen:h,markSeen:d}=io(),u=lo(6e4);let l,y,m;if(t[3]!==h||t[4]!==u||t[5]!==g?.user?.createdAt){m=Symbol.for("react.early_return_sentinel");e:{if(l=fo(u),!l){m=null;break e}if(!ho(g?.user?.createdAt,u)){m=null;break e}y=h(l.id)}t[3]=h,t[4]=u,t[5]=g?.user?.createdAt,t[6]=l,t[7]=y,t[8]=m}else l=t[6],y=t[7],m=t[8];if(m!==Symbol.for("react.early_return_sentinel"))return m;if(y)return null;let w;t[9]!==l.id||t[10]!==r||t[11]!==d||t[12]!==i||t[13]!==f||t[14]!==e?(w=()=>{d(l.id),to(e,{onOrgHome:i,inProject:r,onSiteEditor:f})},t[9]=l.id,t[10]=r,t[11]=d,t[12]=i,t[13]=f,t[14]=e,t[15]=w):w=t[15];const j=w;let p;t[16]!==e?(p=e("announcements.release.ariaLabel"),t[16]=e,t[17]=p):p=t[17];let b;t[18]!==e?(b=e("announcements.release.dismiss"),t[18]=e,t[19]=b):b=t[19];const S=l.eyebrow,x=l.title;let k;t[20]!==l.id||t[21]!==d?(k=()=>d(l.id),t[20]=l.id,t[21]=d,t[22]=k):k=t[22];let T;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==d||t[26]!==e?(T=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>d(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[23]=l.id,t[24]=l.learnMoreHref,t[25]=d,t[26]=e,t[27]=T):T=t[27];let v;t[28]!==l.cta||t[29]!==l.id||t[30]!==d||t[31]!==j?(v=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>d(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):n.jsx(F,{size:"sm",onClick:j,children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=d,t[31]=j,t[32]=v):v=t[32];let P;t[33]!==l.bullets?(P=l.bullets.map(yo),t[33]=l.bullets,t[34]=P):P=t[34];let _;t[35]!==P?(_=n.jsx("ul",{className:"flex flex-col gap-3",children:P}),t[35]=P,t[36]=_):_=t[36];let I;return t[37]!==l.eyebrow||t[38]!==l.title||t[39]!==v||t[40]!==_||t[41]!==p||t[42]!==b||t[43]!==k||t[44]!==T?(I=n.jsx(Zt,{ariaLabel:p,dismissLabel:b,eyebrow:S,title:x,onDismiss:k,footerLeading:T,actions:v,children:_}),t[37]=l.eyebrow,t[38]=l.title,t[39]=v,t[40]=_,t[41]=p,t[42]=b,t[43]=k,t[44]=T,t[45]=I):I=t[45],I}function yo(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}function bo(t){const e=R.c(11),{open:o,onOpenChange:a}=t,s=Q();let r;e[0]!==s?(r=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=r):r=e[1];let i;e[2]!==r?(i=n.jsx(Kt,{children:n.jsx(qt,{children:r})}),e[2]=r,e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"flex flex-col gap-4",children:mn.map(xo)}),e[4]=c):c=e[4];let f;e[5]!==i?(f=n.jsxs(Ht,{className:"sm:max-w-md",children:[i,c]}),e[5]=i,e[6]=f):f=e[6];let g;return e[7]!==a||e[8]!==o||e[9]!==f?(g=n.jsx(Ut,{open:o,onOpenChange:a,children:f}),e[7]=a,e[8]=o,e[9]=f,e[10]=g):g=e[10],g}function xo(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(wo)})]},t.label)}function wo(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(So)})]},t.description)}function So(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Lt=8,Ye=["all","organizations","projects","chats","connections","actions"],jo=5;function Dt(t){switch(t){case"all":return"commandPalette.scope.all";case"organizations":return"commandPalette.organizations";case"projects":return"commandPalette.projects";case"chats":return"commandPalette.scope.chats";case"connections":return"commandPalette.connections";case"actions":return"commandPalette.actions";default:return t}}function vo(t,e){const o=a=>{const s=e.indexOf(a);return s===-1?Number.POSITIVE_INFINITY:s};return[...t].sort((a,s)=>o(a.slug)-o(s.slug)||a.name.localeCompare(s.name))}function ko(t,e){const{org:o}=jt(),a=ys({connectionId:Vt,orgId:o.id,orgSlug:o.slug}),{data:s}=et({queryKey:ht.globalSearch(o.id,t,Lt),enabled:e&&!!a&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!a)return[];try{return(await a.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:Lt}})).structuredContent?.items??[]}catch{return[]}}});return s??[]}function To(t){const e=R.c(213),{open:o,onOpenChange:a}=t,s=Q(),r=Jt(),{org:i}=jt(),{projects:c,hasProjects:f}=as(),{remember:g}=hs(i.slug),[h,d]=X.useState(""),[u,l]=X.useState("all");let y;e[0]!==u?(y=z=>u==="all"||u===z,e[0]=u,e[1]=y):y=e[1];const m=y,w=X.useDeferredValue(h),j=ko(w,m("chats")||m("connections")),p=Yn(),{data:b}=fn(),{recent:S}=Qn();let x;e[2]!==h?(x=h.trim(),e[2]=h,e[3]=x):x=e[3];const k=x,T=ps(k,150),{hits:v}=Xn(m("organizations")?T:"");let P,_;if(e[4]!==i||e[5]!==v||e[6]!==b||e[7]!==S){const z=vo(Zn(b??[],i),S);let U;e[10]!==v?(U=new Set(v.map(Io)),e[10]=v,e[11]=U):U=e[11],P=U,_=[...z,...v.filter(Ie=>!z.some(B=>B.id===Ie.id))],e[4]=i,e[5]=v,e[6]=b,e[7]=S,e[8]=P,e[9]=_}else P=e[8],_=e[9];const I=_;let A;e[12]!==I||e[13]!==i.slug||e[14]!==u||e[15]!==k?(A=u==="all"&&!k?I.filter(z=>z.slug!==i.slug).slice(0,jo):I,e[12]=I,e[13]=i.slug,e[14]=u,e[15]=k,e[16]=A):A=e[16];const E=A;let $;e[17]!==a?($=()=>{a(!1),d(""),l("all")},e[17]=a,e[18]=$):$=e[18];const L=$;let O;e[19]!==u?(O=z=>{const U=Ye.indexOf(u);l(Ye[(U+z+Ye.length)%Ye.length]??"all")},e[19]=u,e[20]=O):O=e[20];const M=O;let H;e[21]!==L?(H=(z,U)=>{xt("command_palette_used",{kind:U}),z(),L()},e[21]=L,e[22]=H):H=e[22];const D=H;let ae;e[23]!==r||e[24]!==i.id||e[25]!==i.slug?(ae=z=>{if(z.type==="connection"){if(!z.slug){r({to:"/$org/settings/connections",params:{org:i.slug},search:{tab:"all"}});return}r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:z.slug}});return}if(z.type==="task"){r({to:ie.tasks,params:{org:i.slug,taskKey:z.key??void 0}});return}const U=Gt(i.id).id;gn(r,hn({org:i.slug,agentId:z.virtual_mcp_id??U,superAgentId:U}),{search:()=>({thread:z.id}),replace:!1})},e[23]=r,e[24]=i.id,e[25]=i.slug,e[26]=ae):ae=e[26];const Z=ae;let ee;e[27]!==h?(ee=[h],e[27]=h,e[28]=ee):ee=e[28];const ne=ee;let te,J,V,q,G,W,Y,C,K,ye,be,re,le,ce,de,ue;if(e[29]!==L||e[30]!==M||e[31]!==D||e[32]!==f||e[33]!==j||e[34]!==r||e[35]!==a||e[36]!==o||e[37]!==Z||e[38]!==i.slug||e[39]!==E||e[40]!==c||e[41]!==g||e[42]!==ne||e[43]!==u||e[44]!==P||e[45]!==m||e[46]!==s||e[47]!==h||e[48]!==p){const z=j.filter(_o),U=j.filter(Po);let Ie;e[65]!==i.slug?(Ie={org:i.slug},e[65]=i.slug,e[66]=Ie):Ie=e[66];const B=Ie;let Oe;e[67]!==s?(Oe=s("sidebar.navDestinations.home"),e[67]=s,e[68]=Oe):Oe=e[68];let at;e[69]===Symbol.for("react.memo_cache_sentinel")?(at=n.jsx(Kn,{"aria-hidden":"true"}),e[69]=at):at=e[69];let Ae;e[70]!==B||e[71]!==Oe?(Ae={key:"home",label:Oe,icon:at,to:ie.home,params:B},e[70]=B,e[71]=Oe,e[72]=Ae):Ae=e[72];let Ce;e[73]!==s?(Ce=s("sidebar.navDestinations.reports"),e[73]=s,e[74]=Ce):Ce=e[74];let rt;e[75]===Symbol.for("react.memo_cache_sentinel")?(rt=n.jsx(qn,{"aria-hidden":"true"}),e[75]=rt):rt=e[75];let Ee;e[76]!==B||e[77]!==Ce?(Ee={key:"reports",label:Ce,icon:rt,to:ie.reports,params:B},e[76]=B,e[77]=Ce,e[78]=Ee):Ee=e[78];let $e;e[79]!==s?($e=s("sidebar.navDestinations.tasks"),e[79]=s,e[80]=$e):$e=e[80];let lt;e[81]===Symbol.for("react.memo_cache_sentinel")?(lt=n.jsx(_t,{"aria-hidden":"true"}),e[81]=lt):lt=e[81];let Le;e[82]!==i.slug?(Le={org:i.slug,taskKey:void 0},e[82]=i.slug,e[83]=Le):Le=e[83];let De;e[84]!==$e||e[85]!==Le?(De={key:"tasks",label:$e,icon:lt,to:ie.tasks,params:Le},e[84]=$e,e[85]=Le,e[86]=De):De=e[86];let Re;e[87]!==s?(Re=s("sidebar.navDestinations.library"),e[87]=s,e[88]=Re):Re=e[88];let ct;e[89]===Symbol.for("react.memo_cache_sentinel")?(ct=n.jsx(Hn,{"aria-hidden":"true"}),e[89]=ct):ct=e[89];let ze;e[90]!==B||e[91]!==Re?(ze={key:"library",label:Re,icon:ct,to:ie.library,params:B},e[90]=B,e[91]=Re,e[92]=ze):ze=e[92];let Fe;e[93]!==s?(Fe=s("sidebar.navDestinations.discover"),e[93]=s,e[94]=Fe):Fe=e[94];let dt;e[95]===Symbol.for("react.memo_cache_sentinel")?(dt=n.jsx(Un,{"aria-hidden":"true"}),e[95]=dt):dt=e[95];let Be;e[96]!==B||e[97]!==Fe?(Be={key:"discover",label:Fe,icon:dt,to:ie.discover,params:B},e[96]=B,e[97]=Fe,e[98]=Be):Be=e[98];let ut;e[99]!==Ae||e[100]!==Ee||e[101]!==De||e[102]!==ze||e[103]!==Be?(ut=[Ae,Ee,De,ze,Be],e[99]=Ae,e[100]=Ee,e[101]=De,e[102]=ze,e[103]=Be,e[104]=ut):ut=e[104];const pt=ut;J=cs,be=o,e[105]!==L||e[106]!==a?(re=N=>N?a(!0):L(),e[105]=L,e[106]=a,e[107]=re):re=e[107],e[108]!==s?(le=s("commandPalette.title"),e[108]=s,e[109]=le):le=e[109],e[110]!==s?(ce=s("commandPalette.description"),e[110]=s,e[111]=ce):ce=e[111];let Me;e[112]!==u||e[113]!==s?(Me=u==="all"?s("commandPalette.placeholder"):s("commandPalette.placeholderScoped",{scope:s(Dt(u)).toLowerCase()}),e[112]=u,e[113]=s,e[114]=Me):Me=e[114];let Ke;e[115]!==s?(Ke=s("commandPalette.placeholder"),e[115]=s,e[116]=Ke):Ke=e[116];let qe;e[117]!==M||e[118]!==u||e[119]!==h?(qe=N=>{if(N.key==="Tab"){N.preventDefault(),M(N.shiftKey?-1:1);return}N.key==="Backspace"&&!h&&u!=="all"&&(N.preventDefault(),l("all"))},e[117]=M,e[118]=u,e[119]=h,e[120]=qe):qe=e[120],e[121]!==Me||e[122]!==Ke||e[123]!==qe||e[124]!==h?(de=n.jsx(ds,{placeholder:Me,"aria-label":Ke,value:h,onValueChange:d,onKeyDown:qe}),e[121]=Me,e[122]=Ke,e[123]=qe,e[124]=h,e[125]=de):de=e[125];let He;e[126]!==s?(He=s("commandPalette.scope.label"),e[126]=s,e[127]=He):He=e[127];let Ue;e[128]!==u||e[129]!==s?(Ue=Ye.map(N=>n.jsx("button",{type:"button",role:"radio","aria-checked":u===N,tabIndex:-1,onMouseDown:No,onClick:()=>l(N),className:bt("h-7 shrink-0 cursor-pointer rounded-full px-3 text-xs font-medium transition-colors focus-ring",u===N?"bg-foreground text-background":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:s(Dt(N))},N)),e[128]=u,e[129]=s,e[130]=Ue):Ue=e[130],e[131]!==He||e[132]!==Ue?(ue=n.jsx("div",{role:"radiogroup","aria-label":He,className:"flex gap-1 overflow-x-auto border-b px-3 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:Ue}),e[131]=He,e[132]=Ue,e[133]=ue):ue=e[133],te=us,V="h-[min(420px,60vh)] max-h-none";let Je;e[134]!==s?(Je=s("commandPalette.empty"),e[134]=s,e[135]=Je):Je=e[135],e[136]!==Je?(q=n.jsx(ms,{children:Je}),e[136]=Je,e[137]=q):q=e[137],e[138]!==D||e[139]!==i.slug||e[140]!==E||e[141]!==P||e[142]!==m||e[143]!==s||e[144]!==h||e[145]!==p?(G=m("organizations")&&E.length>0&&n.jsx(Ge,{heading:s("commandPalette.organizations"),children:E.map(N=>n.jsxs(oe,{value:`org ${N.name} ${N.slug}`,keywords:P.has(N.id)?[h]:void 0,onSelect:()=>D(()=>p(N.slug),"organization"),children:[n.jsx(es,{org:N,size:"xs"}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:N.name}),N.slug===i.slug&&n.jsx("span",{className:"text-meta shrink-0",children:s("sidebar.rail.currentOrganization")})]},`org:${N.id}`))}),e[138]=D,e[139]=i.slug,e[140]=E,e[141]=P,e[142]=m,e[143]=s,e[144]=h,e[145]=p,e[146]=G):G=e[146],e[147]!==pt||e[148]!==D||e[149]!==r||e[150]!==m||e[151]!==s?(W=m("actions")&&n.jsx(Ge,{heading:s("commandPalette.goTo"),children:pt.map(N=>n.jsxs(oe,{onSelect:()=>D(()=>r({to:N.to,params:N.params}),"destination"),children:[N.icon,n.jsx("span",{children:N.label})]},N.key))}),e[147]=pt,e[148]=D,e[149]=r,e[150]=m,e[151]=s,e[152]=W):W=e[152],e[153]!==D||e[154]!==f||e[155]!==r||e[156]!==i.slug||e[157]!==c||e[158]!==g||e[159]!==m||e[160]!==s?(Y=m("projects")&&f&&n.jsx(Ge,{heading:s("commandPalette.projects"),children:c.map(N=>n.jsxs(oe,{value:`project ${N.title}`,onSelect:()=>D(()=>{g(N.id),r({to:ie.projects,params:{org:i.slug,agentId:N.id}})},"project"),children:[n.jsx(gs,{icon:N.icon,name:N.title,"aria-hidden":"true"}),n.jsx("span",{children:N.title})]},N.id))}),e[153]=D,e[154]=f,e[155]=r,e[156]=i.slug,e[157]=c,e[158]=g,e[159]=m,e[160]=s,e[161]=Y):Y=e[161],e[162]!==D||e[163]!==r||e[164]!==B||e[165]!==m||e[166]!==s?(C=m("actions")&&n.jsxs(Ge,{heading:s("commandPalette.actions"),children:[n.jsxs(oe,{value:s("commandPalette.newProject"),onSelect:()=>D(()=>r({to:ie.home,params:B}),"new_project"),children:[n.jsx(Ot,{"aria-hidden":"true"}),n.jsx("span",{children:s("commandPalette.newProject")})]}),n.jsxs(oe,{value:s("commandPalette.inviteTeammate"),onSelect:()=>D(()=>r({to:"/$org/settings/members",params:B}),"invite"),children:[n.jsx(Bn,{"aria-hidden":"true"}),n.jsx("span",{children:s("commandPalette.inviteTeammate")})]}),n.jsxs(oe,{value:s("commandPalette.addConnection"),onSelect:()=>D(()=>r({to:"/$org/settings/connections",params:B,search:{tab:"all"}}),"add_connection"),children:[n.jsx(Ot,{"aria-hidden":"true"}),n.jsx("span",{children:s("commandPalette.addConnection")})]}),n.jsxs(oe,{value:s("commandPalette.settings"),onSelect:()=>D(()=>r({to:"/$org/settings/general",params:B}),"settings"),children:[n.jsx(ls,{"aria-hidden":"true"}),n.jsx("span",{children:s("commandPalette.settings")})]})]}),e[162]=D,e[163]=r,e[164]=B,e[165]=m,e[166]=s,e[167]=C):C=e[167],K=m("connections")&&z.length>0&&n.jsx(Ge,{heading:s("commandPalette.connections"),children:z.map(N=>n.jsxs(oe,{value:`${N.title} ${N.id}`,keywords:ne,onSelect:()=>D(()=>Z(N),"connection"),children:[n.jsx(fs,{icon:N.icon,name:N.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:N.title})]},`connection:${N.id}`))}),ye=m("chats")&&U.length>0&&n.jsx(Ge,{heading:s("commandPalette.results"),children:U.map(N=>n.jsxs(oe,{value:`${N.title} ${N.id}`,keywords:ne,onSelect:()=>D(()=>Z(N),N.type),children:[N.type==="thread"?n.jsx(Mn,{"aria-hidden":"true"}):n.jsx(_t,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:N.title}),N.type==="task"&&N.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:N.key})]},`${N.type}:${N.id}`))}),e[29]=L,e[30]=M,e[31]=D,e[32]=f,e[33]=j,e[34]=r,e[35]=a,e[36]=o,e[37]=Z,e[38]=i.slug,e[39]=E,e[40]=c,e[41]=g,e[42]=ne,e[43]=u,e[44]=P,e[45]=m,e[46]=s,e[47]=h,e[48]=p,e[49]=te,e[50]=J,e[51]=V,e[52]=q,e[53]=G,e[54]=W,e[55]=Y,e[56]=C,e[57]=K,e[58]=ye,e[59]=be,e[60]=re,e[61]=le,e[62]=ce,e[63]=de,e[64]=ue}else te=e[49],J=e[50],V=e[51],q=e[52],G=e[53],W=e[54],Y=e[55],C=e[56],K=e[57],ye=e[58],be=e[59],re=e[60],le=e[61],ce=e[62],de=e[63],ue=e[64];let xe;e[168]!==te||e[169]!==V||e[170]!==q||e[171]!==G||e[172]!==W||e[173]!==Y||e[174]!==C||e[175]!==K||e[176]!==ye?(xe=n.jsxs(te,{className:V,children:[q,G,W,Y,C,K,ye]}),e[168]=te,e[169]=V,e[170]=q,e[171]=G,e[172]=W,e[173]=Y,e[174]=C,e[175]=K,e[176]=ye,e[177]=xe):xe=e[177];let tt;e[178]===Symbol.for("react.memo_cache_sentinel")?(tt=["↑","↓"],e[178]=tt):tt=e[178];let we;e[179]!==s?(we=s("commandPalette.hint.navigate"),e[179]=s,e[180]=we):we=e[180];let Se;e[181]!==we?(Se=n.jsx(mt,{keys:tt,label:we}),e[181]=we,e[182]=Se):Se=e[182];let nt;e[183]===Symbol.for("react.memo_cache_sentinel")?(nt=["↵"],e[183]=nt):nt=e[183];let je;e[184]!==s?(je=s("commandPalette.hint.open"),e[184]=s,e[185]=je):je=e[185];let ve;e[186]!==je?(ve=n.jsx(mt,{keys:nt,label:je}),e[186]=je,e[187]=ve):ve=e[187];let st;e[188]===Symbol.for("react.memo_cache_sentinel")?(st=["Tab"],e[188]=st):st=e[188];let ke;e[189]!==s?(ke=s("commandPalette.hint.filter"),e[189]=s,e[190]=ke):ke=e[190];let Te;e[191]!==ke?(Te=n.jsx(mt,{keys:st,label:ke}),e[191]=ke,e[192]=Te):Te=e[192];let ot;e[193]===Symbol.for("react.memo_cache_sentinel")?(ot=["Esc"],e[193]=ot):ot=e[193];let Ne;e[194]!==s?(Ne=s("commandPalette.hint.close"),e[194]=s,e[195]=Ne):Ne=e[195];let Pe;e[196]!==Ne?(Pe=n.jsx(mt,{keys:ot,label:Ne}),e[196]=Ne,e[197]=Pe):Pe=e[197];let _e;e[198]!==Se||e[199]!==ve||e[200]!==Te||e[201]!==Pe?(_e=n.jsxs("div",{className:"flex items-center gap-4 border-t px-3 py-2 text-xs text-muted-foreground",children:[Se,ve,Te,Pe]}),e[198]=Se,e[199]=ve,e[200]=Te,e[201]=Pe,e[202]=_e):_e=e[202];let it;return e[203]!==J||e[204]!==be||e[205]!==re||e[206]!==le||e[207]!==ce||e[208]!==de||e[209]!==ue||e[210]!==xe||e[211]!==_e?(it=n.jsxs(J,{open:be,onOpenChange:re,title:le,description:ce,children:[de,ue,xe,_e]}),e[203]=J,e[204]=be,e[205]=re,e[206]=le,e[207]=ce,e[208]=de,e[209]=ue,e[210]=xe,e[211]=_e,e[212]=it):it=e[212],it}function No(t){return t.preventDefault()}function Po(t){return t.type!=="connection"}function _o(t){return t.type==="connection"}function Io(t){return t.id}function mt(t){const e=R.c(7),{keys:o,label:a}=t;let s;e[0]!==o?(s=o.map(Oo),e[0]=o,e[1]=s):s=e[1];let r;e[2]!==s?(r=n.jsx("span",{className:"flex items-center gap-0.5",children:s}),e[2]=s,e[3]=r):r=e[3];let i;return e[4]!==a||e[5]!==r?(i=n.jsxs("span",{className:"flex items-center gap-1.5",children:[r,a]}),e[4]=a,e[5]=r,e[6]=i):i=e[6],i}function Oo(t){return n.jsx("kbd",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border bg-muted px-1 font-mono text-2xs",children:t},t)}const Ao=300*1e3,Co=2;function Eo(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function $o(t,e){return t.count>=Co&&t.version!==null&&t.version!==e}function Lo(){const t=R.c(31),e=Q();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:ht.appVersionCheck(),queryFn:Ro,refetchInterval:Ao,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:a,dataUpdatedAt:s}=et(o),[r,i]=X.useState(0);let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c={version:null,count:0},t[1]=c):c=t[1];const[f,g]=X.useState(c);s!==r&&(i(s),g(v=>Eo(v,a,"4.597.1")));const[h,d]=X.useState(null);if(!$o(f,h))return null;let u;t[2]!==e?(u=e("announcements.version.ariaLabel"),t[2]=e,t[3]=u):u=t[3];let l;t[4]!==e?(l=e("announcements.version.dismiss"),t[4]=e,t[5]=l):l=t[5];let y;t[6]!==e?(y=e("announcements.version.eyebrow"),t[6]=e,t[7]=y):y=t[7];let m;t[8]!==e?(m=e("announcements.version.title"),t[8]=e,t[9]=m):m=t[9];let w;t[10]!==e?(w=e("announcements.version.description"),t[10]=e,t[11]=w):w=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Tt,{size:16}),t[12]=j):j=t[12];let p;t[13]!==f.version?(p=()=>d(f.version),t[13]=f.version,t[14]=p):p=t[14];let b;t[15]!==e?(b=e("announcements.version.currentSession",{version:"4.597.1"}),t[15]=e,t[16]=b):b=t[16];let S;t[17]!==e?(S=e("announcements.version.refresh"),t[17]=e,t[18]=S):S=t[18];let x;t[19]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Tt,{size:14}),t[19]=x):x=t[19];let k;t[20]!==S?(k=n.jsxs(F,{size:"sm",onClick:Do,children:[S,x]}),t[20]=S,t[21]=k):k=t[21];let T;return t[22]!==k||t[23]!==u||t[24]!==l||t[25]!==y||t[26]!==m||t[27]!==w||t[28]!==p||t[29]!==b?(T=n.jsx(Zt,{ariaLabel:u,dismissLabel:l,eyebrow:y,title:m,description:w,icon:j,tone:"system",onDismiss:p,footerLeading:b,actions:k}),t[22]=k,t[23]=u,t[24]=l,t[25]=y,t[26]=m,t[27]=w,t[28]=p,t[29]=b,t[30]=T):T=t[30],T}function Do(){return window.location.reload()}async function Ro(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function zo(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const Fo=Date.parse("2026-07-21T00:00:00Z"),Rt=t=>zo(Ze.ptBrAnnouncementSeen(t));function Bo(){const t=R.c(35),e=Q(),[o,a]=pn(),{data:s,isPending:r}=fe.useSession(),i=s?.user,c=i?.id,f=i?.createdAt,g=f!=null&&new Date(f).getTime()<Fo,h=yn()==="pt-BR",d=!r&&!!c&&g&&h&&o.language==="en"&&!Rt(c).has()&&!bn(),[u,l]=X.useState(!1),[y,m]=X.useState(!1);!u&&!r&&(l(!0),d&&c&&(Rt(c).mark(),a(Ko),m(!0),xt("pt_br_auto_switch_shown")));let w;t[0]===Symbol.for("react.memo_cache_sentinel")?(w=D=>{xt("pt_br_auto_switch_closed",{action:D}),m(!1)},t[0]=w):w=t[0];const j=w;let p;t[1]!==a?(p=()=>{a(Mo),j("switch-back")},t[1]=a,t[2]=p):p=t[2];const b=p;let S;t[3]===Symbol.for("react.memo_cache_sentinel")?(S=D=>!D&&j("dismiss"),t[3]=S):S=t[3];let x;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=x):x=t[4];let k;t[5]!==e?(k=e("announcements.ptBr.title"),t[5]=e,t[6]=k):k=t[6];let T;t[7]!==k?(T=n.jsx(qt,{children:k}),t[7]=k,t[8]=T):T=t[8];let v;t[9]!==e?(v=e("announcements.ptBr.description"),t[9]=e,t[10]=v):v=t[10];let P;t[11]!==v?(P=n.jsx(xn,{children:v}),t[11]=v,t[12]=P):P=t[12];let _;t[13]!==T||t[14]!==P?(_=n.jsxs(Kt,{children:[T,P]}),t[13]=T,t[14]=P,t[15]=_):_=t[15];let I;t[16]!==e?(I=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=I):I=t[17];let A;t[18]!==b||t[19]!==I?(A=n.jsx(F,{variant:"outline",onClick:b,children:I}),t[18]=b,t[19]=I,t[20]=A):A=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>j("ok"),t[21]=E):E=t[21];let $;t[22]!==e?($=e("announcements.ptBr.ok"),t[22]=e,t[23]=$):$=t[23];let L;t[24]!==$?(L=n.jsx(F,{onClick:E,children:$}),t[24]=$,t[25]=L):L=t[25];let O;t[26]!==A||t[27]!==L?(O=n.jsxs(wn,{children:[A,L]}),t[26]=A,t[27]=L,t[28]=O):O=t[28];let M;t[29]!==O||t[30]!==_?(M=n.jsxs(Ht,{className:"sm:max-w-md",children:[x,_,O]}),t[29]=O,t[30]=_,t[31]=M):M=t[31];let H;return t[32]!==y||t[33]!==M?(H=n.jsx(Ut,{open:y,onOpenChange:S,children:M}),t[32]=y,t[33]=M,t[34]=H):H=t[34],H}function Mo(t){return{...t,language:"en"}}function Ko(t){return{...t,language:"pt-BR"}}function qo(t){const e=Sn(t);return typeof e=="string"?e:void 0}function Ho(){return qo("experiment-pipeline-check"),null}function Uo(t){const e=R.c(1),{activeOrg:o}=t;if(!o)return null;jn(o.id,{name:o.name??void 0,slug:o.slug??void 0}),vn();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Ho,{}),e[0]=a):a=e[0],a}function Jo(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:s,opts:r,autosendValue:i}=t,c={mainpanel:void 0};o?c.virtualmcpid=o:e.virtualmcpid&&(c.virtualmcpid=e.virtualmcpid);const f=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,h=(o??f)!==f;let d,u;return r?.panel?u=r.panel:r?.newThread&&!h&&kn(e.tabId)?(u=e.tabId,c.mainpanel=e.mainpanel,d=e.sidepanel):s?(u=s.tab,s.sidepanel!==void 0&&(d=s.sidepanel),s.mainpanel!==void 0&&(c.mainpanel=s.mainpanel)):!h&&e.tabId&&!Tn(e.tabId)&&(u=e.tabId),d!==void 0&&(c.sidepanel=d),r?.autosend&&(c.autosend=i),{tabId:ks(u,t.target,t.blogView),search:c}}const on="studio:thread-layout:v4",Vo=50;function an(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function Go(t,e,o,a=Vo){const s=t.filter(([r])=>r!==e);for(s.push([e,an(o)]);s.length>a;)s.shift();return s}function vt(){try{const t=sessionStorage.getItem(on);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function rn(t){try{sessionStorage.setItem(on,JSON.stringify(t))}catch{}}function Wo(t,e){t&&rn(Go(vt(),t,e))}function Yo(t){if(!t)return null;const e=vt().find(([o])=>o===t);return e?an(e[1]):null}function Mi(t){if(!t)return;const e=vt(),o=e.filter(([a])=>a!==t);o.length!==e.length&&rn(o)}function ln(t){return{queryKey:ht.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Ki(t){const e=R.c(10);let o;e[0]!==t?(o=ln(t),e[0]=t,e[1]=o):o=e[1];const a=et(o);let s;e[2]!==a.data?.prompts?(s=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=s):s=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==s||e[8]!==r?(i={isLoading:a.isLoading,prompts:s,tiles:r},e[6]=a.isLoading,e[7]=s,e[8]=r,e[9]=i):i=e[9],i}function Qo(t){const e=R.c(31),{orgSlug:o,orgName:a,domain:s}=t,r=Q();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const c=i,f=Xo;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(zt,{className:"h-6 w-6 text-primary"})}),e[2]=g):g=e[2];let h;e[3]!==r?(h=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=h):h=e[4];let d;e[5]!==h?(d=n.jsx("h3",{className:"text-lg font-medium",children:h}),e[5]=h,e[6]=d):d=e[6];let u;e[7]!==s||e[8]!==a||e[9]!==r?(u=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${r("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=a,e[9]=r,e[10]=u):u=e[10];let l;e[11]!==u?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[11]=u,e[12]=l):l=e[12];let y;e[13]!==d||e[14]!==l?(y=n.jsxs("div",{className:"space-y-2",children:[d,l]}),e[13]=d,e[14]=l,e[15]=y):y=e[15];let m;e[16]!==r?(m=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=m):m=e[17];let w;e[18]!==c||e[19]!==m?(w=n.jsx(F,{onClick:c,children:m}),e[18]=c,e[19]=m,e[20]=w):w=e[20];let j;e[21]!==r?(j=r("common.goBack"),e[21]=r,e[22]=j):j=e[22];let p;e[23]!==j?(p=n.jsx(F,{variant:"ghost",onClick:f,children:j}),e[23]=j,e[24]=p):p=e[24];let b;e[25]!==p||e[26]!==w?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[w,p]}),e[25]=p,e[26]=w,e[27]=b):b=e[27];let S;return e[28]!==b||e[29]!==y?(S=n.jsxs(pe,{children:[g,y,b]}),e[28]=b,e[29]=y,e[30]=S):S=e[30],S}function Xo(){window.location.href="/"}function Zo(t){const e=R.c(27),{notice:o,orgSlug:a}=t,s=Q();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(Nn,{className:"h-6 w-6 text-destructive"})}),e[0]=r):r=e[0];let i;e[1]!==o.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:o.title}),e[1]=o.title,e[2]=i):i=e[2];let c;e[3]!==o.message?(c=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:o.message}),e[3]=o.message,e[4]=c):c=e[4];let f;e[5]!==i||e[6]!==c?(f=n.jsxs("div",{className:"space-y-2",children:[i,c]}),e[5]=i,e[6]=c,e[7]=f):f=e[7];let g;e[8]!==o.ctaLabel||e[9]!==o.ctaUrl?(g=o.ctaUrl&&o.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:o.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:o.ctaLabel})}):null,e[8]=o.ctaLabel,e[9]=o.ctaUrl,e[10]=g):g=e[10];const h=`/${encodeURIComponent(a)}/settings/infra-billing`;let d;e[11]!==s?(d=s("common.blockedOrgScreen.goToBilling"),e[11]=s,e[12]=d):d=e[12];let u;e[13]!==h||e[14]!==d?(u=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:h,children:d})}),e[13]=h,e[14]=d,e[15]=u):u=e[15];let l;e[16]!==s?(l=s("common.blockedOrgScreen.switchOrg"),e[16]=s,e[17]=l):l=e[17];let y;e[18]!==l?(y=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:l})}),e[18]=l,e[19]=y):y=e[19];let m;e[20]!==y||e[21]!==g||e[22]!==u?(m=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,u,y]}),e[20]=y,e[21]=g,e[22]=u,e[23]=m):m=e[23];let w;return e[24]!==m||e[25]!==f?(w=n.jsxs(pe,{children:[r,f,m]}),e[24]=m,e[25]=f,e[26]=w):w=e[26],w}const ei="/settings/infra-billing";function ti(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(ei)}function ni(t){const e=R.c(7),{org:o,children:a}=t;let s;e[0]!==o.id||e[1]!==o.name?(s={id:o.id,organizationId:o.id,slug:"_org",name:o.name,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s):s=e[2];const r=s;let i;return e[3]!==a||e[4]!==o||e[5]!==r?(i=n.jsx($n,{org:o,project:r,children:a}),e[3]=a,e[4]=o,e[5]=r,e[6]=i):i=e[6],i}function si(){const t=Jt(),e=As(),{org:o}=jt(),a=Pn({strict:!1}),s=Xt(),{openPanel:r,closePanel:i}=rs(),c=Ps(),f=_s(),g=Is(),h=Os(),d=Ts(),u=Es(),{data:l}=fe.useSession(),y=(p,b=!0)=>t({to:".",search:p,replace:b}),m=()=>y(p=>({...p,sidepanel:!0})),w=(p,b,S)=>{const x=!!f&&f===p;f&&!x&&Wo(f,{tab:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const k=x?null:Yo(p),T=Gt(o.id).id;if(b===T&&!S?.panel)return h(p,()=>S?.autosend?{autosend:At}:{});const v=Jo({prev:{virtualmcpid:c,tabId:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel},virtualMcpId:b,decopilotId:T,savedLayout:k,opts:S,autosendValue:At,target:e?.threads.get().find(P=>P.id===p),blogView:u});return h(p,()=>v.search,{virtualMcpId:b,view:{tabId:v.tabId}})};return{openSidePanel:m,setTaskId:w,createNewTask:async(p,b,S)=>{const x=crypto.randomUUID(),k=p??g,T=d==="blog"&&k===g&&!S?.panel?Ns(b,Cs(l?.user)):null;try{await e?.create({id:x,virtual_mcp_id:k,...T??(b?{branch:b}:{})})}catch{}w(x,k,{...S,newThread:!0})},openTab:r,closeTab:i}}const oi=new Set(["/$org/","/$org/home"]);function ii(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:ai},t[0]=e):e=t[0],Wt(e)}function ai(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&oi.has(e)}function ri(){const t=R.c(54);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=_n(e)?.params.org,[s,r]=X.useState(!1),[i,c]=ts(),[f,g]=ws(),h=In(),d=ii(),u=a??"";let l;t[1]!==u?(l=ln(u),t[1]=u,t[2]=l):l=t[2];const y=!!a&&d;let m;t[3]!==l||t[4]!==y?(m={...l,enabled:y},t[3]=l,t[4]=y,t[5]=m):m=t[5],et(m);const{data:w}=fe.useSession(),j=w?.user?.id;let p,b;t[6]!==h?(p=()=>{const C=K=>{if(Pt(K)&&K.code==="KeyK"){K.preventDefault(),os();return}if(K.key==="?"&&!En(K.target)){K.preventDefault(),r(!0);return}Pt(K)&&K.code==="BracketLeft"&&h.history.canGoBack()&&(K.preventDefault(),h.history.back())};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},b=[h],t[6]=h,t[7]=p,t[8]=b):(p=t[7],b=t[8]),X.useEffect(p,b);let S;t[9]!==a||t[10]!==j?(S=On(a,j),t[9]=a,t[10]=j,t[11]=S):S=t[11];const{data:x}=Ft(S),k=x?.id,T=x?.slug,{data:v}=$s(k,T),P=!!v?.ssoRequired&&!v.authenticated,{data:_}=ns(T);let I;t[12]===Symbol.for("react.memo_cache_sentinel")?(I={select:li},t[12]=I):I=t[12];const A=Wt(I),E=_?.severity==="block"&&!ti(A),$=k??"",L=T??"";let O;t[13]!==L||t[14]!==$?(O=bs({connectionId:Vt,orgId:$,orgSlug:L}),t[13]=L,t[14]=$,t[15]=O):O=t[15];const M=!!k&&!!T;let H;if(t[16]!==O||t[17]!==M?(H={...O,enabled:M},t[16]=O,t[17]=M,t[18]=H):H=t[18],et(H),(!x||Nt(x)||P||E)&&ss(),!x){let C;return t[19]!==a?(C=n.jsx(Js,{orgSlug:a}),t[19]=a,t[20]=C):C=t[20],C}if(Nt(x)){localStorage.getItem(Ze.lastOrgSlug())===a&&localStorage.removeItem(Ze.lastOrgSlug()),Bt()?.org===a&&Mt();let C;return t[21]!==x.name?(C=n.jsx(An,{orgName:x.name}),t[21]=x.name,t[22]=C):C=t[22],C}if(E&&_){let C;return t[23]!==x.slug||t[24]!==_?(C=n.jsx(Zo,{notice:_,orgSlug:x.slug}),t[23]=x.slug,t[24]=_,t[25]=C):C=t[25],C}if(P){let C;return t[26]!==x.id||t[27]!==x.name||t[28]!==x.slug||t[29]!==v.domain?(C=n.jsx(Qo,{orgId:x.id,orgSlug:x.slug,orgName:x.name,domain:v.domain}),t[26]=x.id,t[27]=x.name,t[28]=x.slug,t[29]=v.domain,t[30]=C):C=t[30],C}const ae=x.logo??null;let Z;t[31]!==x||t[32]!==ae?(Z={...x,logo:ae},t[31]=x,t[32]=ae,t[33]=Z):Z=t[33];let ee;t[34]!==x?(ee=n.jsx(Uo,{activeOrg:x}),t[34]=x,t[35]=ee):ee=t[35];let ne;t[36]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Cn,{}),t[36]=ne):ne=t[36];let te;t[37]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(po,{}),n.jsx(Lo,{})]}),t[37]=te):te=t[37];let J;t[38]!==i||t[39]!==c?(J=i&&n.jsx(To,{open:i,onOpenChange:c}),t[38]=i,t[39]=c,t[40]=J):J=t[40];let V;t[41]!==f||t[42]!==g?(V=f&&n.jsx(xs,{open:!0,onOpenChange:g,source:Ss()}),t[41]=f,t[42]=g,t[43]=V):V=t[43];let q;t[44]!==s?(q=n.jsx(bo,{open:s,onOpenChange:r}),t[44]=s,t[45]=q):q=t[45];let G,W;t[46]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Bo,{}),W=n.jsx(js,{}),t[46]=G,t[47]=W):(G=t[46],W=t[47]);let Y;return t[48]!==Z||t[49]!==ee||t[50]!==J||t[51]!==V||t[52]!==q?(Y=n.jsxs(ni,{org:Z,children:[ee,ne,te,J,V,q,G,W]}),t[48]=Z,t[49]=ee,t[50]=J,t[51]=V,t[52]=q,t[53]=Y):Y=t[53],Y}function li(t){return t.location.pathname}function ci(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(vs,{children:n.jsx(ri,{})}),t[0]=e):e=t[0],e}const qi=Object.freeze(Object.defineProperty({__proto__:null,default:ci,usePanelActions:si},Symbol.toStringTag,{value:"Module"}));export{lo as a,Ki as b,Mi as f,qi as s,si as u};
@@ -1 +0,0 @@
1
- import{c as u,r as g,j as n,J as G,a0 as F,a as E,l as O,b as P,n as y,L as H}from"./index-C6-0Ff1m.js";import{C as M}from"./chat-context-BXxmldjV.js";import{ChatLayout as x}from"./index-bfIJKw2l.js";import{L}from"./index-B7i_xJl4.js";import{B as J}from"./blocks-preview-workspace-context-D-FzlGyh.js";import{e as T,p as K,s as V,a as W,r as U,T as $,u as R,b as z}from"./site-editor-toast-C2OaHizl.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-S2hZUwsX.js";import{C as Y}from"./content-tab-D0dI2BbM.js";import{T as Z}from"./tab-icon-glyph-BMUkOrax.js";import{r as tt}from"./resolve-tab-icon-zc5Xnngt.js";import ot from"./agent-site-editor-jPhFhiaS.js";import"./use-panel-navigate-CkYTugDF.js";import"./thread-route-DY_UV0gu.js";import"./use-project-scope-DwQViH2f.js";import"./repository-binding-Do6sAdct.js";import"./use-mcp-client-Bg8mQo9f.js";import"./auth-C---Zkvq.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"./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-ai-providers-pXYGEzkI.js";import"./use-current-view-0HWp9lHl.js";import"./use-in-settings-DxzX6GVb.js";import"./use-decopilot-events-B1JmbrrX.js";import"./use-mobile-IMVhNYT_.js";import"./tooltip-BnL5r8Gv.js";import"./index-ZdVMGNX_.js";import"./MessageCircle01-D1dT92x6.js";import"./XClose-DxbjiApV.js";import"./thread-button-CrjY15ns.js";import"./use-sidebar-collapsed-CvPku1YI.js";import"./sheet-XJvcudCi.js";import"./use-chat-layout-state-BNCeIaIM.js";import"./toolbar-icon-button-CEZ74wIz.js";import"./resizable-DbjoRAK-.js";import"./route-page-header-D8CuFczr.js";import"./LayoutLeft-BSo5LCFE.js";import"./task-key-DgbGUF2j.js";import"./sortable.esm-BulVoRsH.js";import"./Tool01-BpBS8dw-.js";import"./agent-icon-SasBmPrY.js";import"./AlertCircle-CYAsQRdT.js";import"./UserCheck01-DLUgjW3m.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"./UserSquare-a_XazovD.js";import"./LinkBroken01-BxVMIk5A.js";import"./CreditCard01-W8t7hmzJ.js";import"./File02-o8s5093L.js";import"./SwitchHorizontal01-BSGnkDXI.js";import"./Eye-nqlQ004P.js";import"./Fingerprint04-DY8McBak.js";import"./Image01-DZmu7hyy.js";import"./Key01-CSQOqmIz.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"./Trash01-DXQWI50A.js";import"./Upload01-BXiTGuBV.js";import"./Users01-BpOXj9ap.js";import"./Zap-QnlW2BG3.js";import"./context-menu-B1dAG0Wr.js";import"./use-org-notice-DOVWyuaL.js";import"./create-organization-dialog-BKxedScB.js";import"./form-Dx1EBvxh.js";import"./label-Cq7ohFeR.js";import"./project-apps-C4vT9LXH.js";import"./use-recent-apps-4wYjA0CX.js";import"./use-navigate-to-agent-WJ7w-8ZZ.js";import"./command-CjjWneJ9.js";import"./index-BPvQqOSy.js";import"./use-debounced-value-Dw3dFt4C.js";import"./feedback-BqoIMOg7.js";import"./textarea-C3LFFo0w.js";import"./use-sandbox-events-DwjSc3R2.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-z5uA6d0S.js";import"./use-voice-input-ChVzBkTC.js";import"./popover-DTBVeUtG.js";import"./drawer-JbzUShND.js";import"./index-CqirF9LN.js";import"./checkbox-DcLJM3uK.js";import"./select-Chdk1xe9.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-CalvUBc1.js";import"./sandbox-git-api-B3EnJ01P.js";import"./save-status-DEylj8_h.js";import"./use-never-published-DpnSCkDS.js";import"./hosted-reconcile-CgC-Mb3M.js";import"./blocks-tab-states-CmsgKSWv.js";import"./empty-state-BnFVKQvv.js";import"./search-input-DE_voviB.js";import"./tabs-CT50lxBB.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-I6vvS9gB.js";import"./asset-utils-CJa90ZGO.js";import"./useInfiniteQuery-B5jgBAwp.js";import"./infiniteQueryObserver-CiZgrwb3.js";import"./usage-stats-DX8XXFQ9.js";import"./utils-CVEq3hMx.js";import"./markdown-5RMcvWqV.js";import"./use-copy-BRwsGSGM.js";import"./gateway-client-BQlD2psO.js";import"./switch-6JKp3FKO.js";import"./toggle-group-CbJrGPYf.js";import"./match-site-slug-config-B47_xZCi.js";import"./sandbox-lifecycle-context-BiHehEOC.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./frame-navigation-aPmo2U0P.js";import"./variant-matcher-override-DY5ZfO62.js";import"./section-array-field-dPI_sYd7.js";import"./use-fast-preview-draft-url-D9LB_eIt.js";import"./parse-sections-CBJ8clfr.js";import"./held-block-view-ByNmqPhe.js";import"./calendar-oyktWjjy.js";import"./editor-classes-D4G_DIGw.js";import"./category-tree-CUP3rQKK.js";import"./pair-BKCcX4sy.js";import"./collapsible-B8lX7LSm.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"./shell-layout-CuBXiCpv.js";import"./use-deployment-admin-KnQTKRss.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-BIQ_3p0x.js";import"./project-icon-CGc9ojaV.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"./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"./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"./monaco-editor-d8C00Vbh.js";import"./editor-BR1a7qGD.js";import"./useQueries-Cmvk9UMI.js";import"./blog-preview-url-DZyvHdU6.js";import"./device-hint-QYtktsO0.js";import"./alert-PbrLNRQ0.js";import"./virtual-mcp-BYga37_3.js";import"./url-slug-C2KUvR2X.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-CPNkpGBe.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-BKyg4fwU.js";import"./delete-copy-CGGKQ10f.js";import"./index-MxNSCTK9.js";import"./view-header-Dlc9W8Ql.js";import"./use-cms-publish-actions-DMDZLoe0.js";import"./use-content-sync-D4PlAahX.js";import"./use-delete-block-DDUTXhNF.js";import"./item-actions-BoAVVq18.js";import"./date-utils-CrvIKg-s.js";import"./badge-BcMIPtVj.js";import"./empty-state-C0MDzZBx.js";import"./primitives-K9ug68v7.js";import"./use-move-blocks-BVaiu02r.js";import"./mustache-CH8IdNgC.js";import"./collection-table-wrapper-d2v3Inn9.js";import"./table-Dqj9d5ax.js";import"./site-draft-actions-BJiaSwYy.js";import"./separator-CnEC83tf.js";import"./cms-store-drafts-B3P79s_J.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-BU3n1igW.js";import"./input-BvykudC_.js";import"./icon-button-8qhGM4eg.js";import"./chat-draft-Bu5orWL5.js";import"./use-deco-credits-r1_nX8wr.js";import"./input-_oxlM42n.js";import"./suggestion-DoHjrPPW.js";import"./use-org-fs-C4V7-QNj.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DNnv958-.js";import"./plan-ladder-DDAcm-ji.js";import"./add-connection-dialog-DaxWAHW0.js";import"./extract-connection-data-DtWfSA7r.js";import"./metadata-D72DunRR.js";import"./connection-DMyObHFk.js";import"./connection-card-CIdpI2wF.js";import"./connection-slug-CoQLu_eQ.js";import"./schema-C9B5bAQC.js";import"./connection-form-helpers-CI-MD64a.js";import"./authenticate-and-persist-oauth-D1SCK9qV.js";import"./mcp-oauth-BU0x_iDk.js";import"./mcp-oauth-CeIVSnSu.js";import"./collection-tabs-CpA2E5BB.js";import"./use-infinite-scroll-DZHKJp2V.js";import"./useSuspenseInfiniteQuery-D3Nn_2Nf.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-9aqy4RF0.js";import"./blog-view-gate-D1VDGt0q.js";function I(o){return o.kind==="unavailable"&&o.source==="local"&&(o.problem?.reason??"not-answering")==="not-answering"}const it=o=>o;function et(o){const t=u.c(10),{candidates:i,invalidLink:c,shell:s,editor:e}=o,r=c===void 0?!1:c,m=s===void 0?it:s,[p,a]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==e?(h=e(p,f),t[1]=p,t[2]=e,t[3]=h):h=t[3],h}let l;t[4]!==i||t[5]!==r?(l=n.jsx(rt,{candidates:i,invalidLink:r,onConnect:a}),t[4]=i,t[5]=r,t[6]=l):l=t[6];let d;return t[7]!==m||t[8]!==l?(d=m(l),t[7]=m,t[8]=l,t[9]=d):d=t[9],d}function rt(o){const t=u.c(17),{candidates:i,invalidLink:c,onConnect:s}=o,e=c===void 0?!1:c,[r]=G(),{language:m}=r;let p;t[0]!==s?(p=N=>s({endpoint:N}),t[0]=s,t[1]=p):p=t[1];let a;t[2]!==i||t[3]!==p?(a={candidates:i,onFound:p},t[2]=i,t[3]=p,t[4]=a):a=t[4];const l=q(a),{state:d,access:f,needsGesture:h}=l;let k;t[5]!==i||t[6]!==m?(k=new Intl.ListFormat(m,{style:"long",type:"conjunction"}).format(i.map(T)),t[5]=i,t[6]=m,t[7]=k):k=t[7];const C=k;let S;t[8]!==f||t[9]!==l.start||t[10]!==h||t[11]!==d?(S=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:l.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=l.start,t[10]=h,t[11]=d,t[12]=S):S=t[12];const _=S;let j;return t[13]!==C||t[14]!==e||t[15]!==_?(j=n.jsx(B,{wait:_,hosts:C,invalidLink:e}),t[13]=C,t[14]=e,t[15]=_,t[16]=j):j=t[16],j}const v="deco-serve",w="working-tree",nt={id:"",slug:"",name:"",logo:null},st={id:v,slug:v},mt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function pt(){const o=window.location.hash,t=new URLSearchParams(o.replace(/^#/,"")).has("endpoint"),i=t?K(o):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),i&&V(i),{candidates:W(i,U()),invalidLink:t&&!i}}const at=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function lt(){const o=u.c(6),t=P();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ct},o[0]=i):i=o[0];const c=O(i);let s;o[1]!==t||o[2]!==c?(s=at.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(H,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Z,{icon:tt({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),o[1]=t,o[2]=c,o[3]=s):s=o[3];let e;return o[4]!==s?(e=n.jsx(y.Tabs,{children:s}),o[4]=s,o[5]=e):e=o[5],e}function ct(o){return o.matches.at(-1)?.staticData.siteEditorView}function A(o){const t=u.c(14),{children:i}=o,c=P(),{connection:s}=z(v),e=R(v,w);let r,m;if(t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==c){m=Symbol.for("react.early_return_sentinel");t:{if(r=s?T(s.endpoint):"",e.kind==="protocol"){m=i;break t}if(e.kind!=="unavailable"||I(e)){m=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=e,t[1]=i,t[2]=s,t[3]=c,t[4]=r,t[5]=m}else r=t[4],m=t[5];if(m!==Symbol.for("react.early_return_sentinel"))return m;let p;t[6]!==e.problem?(p=e.problem??{reason:"not-answering"},t[6]=e.problem,t[7]=p):p=t[7];let a;t[8]!==r||t[9]!==p?(a={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=a):a=t[10];let l;return t[11]!==r||t[12]!==a?(l=n.jsx(B,{wait:a,hosts:r}),t[11]=r,t[12]=a,t[13]=l):l=t[13],l}function dt(o){const t=u.c(6),{onLost:i}=o,c=R(v,w);let s;t[0]!==c?(s=I(c),t[0]=c,t[1]=s):s=t[1];const e=s;let r,m;return t[2]!==e||t[3]!==i?(r=()=>{e&&i()},m=[e,i],t[2]=e,t[3]=i,t[4]=r,t[5]=m):(r=t[4],m=t[5]),g.useEffect(r,m),null}const D={threadOpen:!1,contentOpen:!0,toggleFullscreen:()=>{},toggleContent:()=>{}};function ut(){const o=u.c(11),{data:t}=E.useSession();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ft},o[0]=i):i=o[0];const c=O(i),s=!!t?.user;let e;o[1]!==s?(e={rail:s},o[1]=s,o[2]=e):e=o[2];const r=c??"preview";let m,p,a;o[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(lt,{}),p=n.jsx(ot,{}),a=n.jsx(x.Thread,{children:null}),o[3]=m,o[4]=p,o[5]=a):(m=o[3],p=o[4],a=o[5]);let l;o[6]!==r?(l=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:r,contentNavigation:m,children:[p,a]})}),o[6]=r,o[7]=l):l=o[7];let d;return o[8]!==e||o[9]!==l?(d=n.jsx(L,{outsideOrg:e,children:l}),o[8]=e,o[9]=l,o[10]=d):d=o[10],d}function ft(o){return o.matches.at(-1)?.staticData.siteEditorView}function ht(o){const t=u.c(10),{children:i}=o,{data:c}=E.useSession(),s=!!c?.user;let e;t[0]!==s?(e={rail:s},t[0]=s,t[1]=e):e=t[1];let r;t[2]!==i?(r=n.jsx(x.Content,{children:i}),t[2]=i,t[3]=r):r=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(x.Thread,{children:null}),t[4]=m):m=t[4];let p;t[5]!==r?(p=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:"guide",children:[r,m]})}),t[5]=r,t[6]=p):p=t[6];let a;return t[7]!==e||t[8]!==p?(a=n.jsx(L,{outsideOrg:e,children:p}),t[7]=e,t[8]=p,t[9]=a):a=t[9],a}const b=()=>{},vt={connection:null,set:b,clear:b};function Dr(){const o=u.c(3),[t]=g.useState(pt);let i;return o[0]!==t.candidates||o[1]!==t.invalidLink?(i=n.jsx(F,{org:nt,project:st,children:n.jsx(et,{candidates:t.candidates,invalidLink:t.invalidLink,shell:kt,editor:xt})}),o[0]=t.candidates,o[1]=t.invalidLink,o[2]=i):i=o[2],i}function xt(o,t){return n.jsxs($.Provider,{value:{connection:o,set:b,clear:b},children:[n.jsx(dt,{onLost:t}),n.jsx(M,{value:mt,children:n.jsx(J,{children:n.jsx(ut,{})})})]})}function kt(o){return n.jsx($.Provider,{value:vt,children:n.jsx(ht,{children:o})})}function Nr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Q,{virtualMcpId:v})}),o[0]=t):t=o[0],t}function Gr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Y,{virtualMcpId:v})}),o[0]=t):t=o[0],t}export{Gr as SiteEditorContent,Nr as SiteEditorPreview,Dr as default};
@@ -1 +0,0 @@
1
- import{aH as Dt,aI as q,bp as je,bC as _n,dA as Oe,dy as xn,ev as we,c as A,i as F,ew as Rn,ex as Tn,q as Z,r as L,ey as Pn,K as g,ez as Y,eA as X,bB as $n,a as Nn,av as De,a6 as jn,bx as It,eB as An,eC as _t,at as Mn,bt as B,ee as xt,eD as Ln,eE as Qn,eF as Un,t as te,j as z}from"./index-C6-0Ff1m.js";import{C as j,E as T,i as Ae,e as Bn,u as Fn,P as Cn,f as Vn,g as Me,h as Rt,j as Tt}from"./use-sandbox-events-DwjSc3R2.js";import{b as Le}from"./repository-binding-Do6sAdct.js";import{e as Pt}from"./backoff-CrEUbyZT.js";import{b as pe}from"./sandbox-url-D3mC8qhT.js";import{u as Hn}from"./chat-context-BXxmldjV.js";import{u as Qe}from"./use-blocks-v8-project-z5uA6d0S.js";import{u as $t}from"./use-voice-input-ChVzBkTC.js";import{s as ot}from"./session-runtime-fXa5psFL.js";import{s as Jn}from"./utils-CalvUBc1.js";import{a as Wn}from"./sandbox-git-api-B3EnJ01P.js";function Nt(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const n=t.hostname.toLowerCase();return n==="127.0.0.1"||n==="[::1]"||n==="localhost"}catch{return!1}}function ue(e){try{const t=new URL(e);return(t.hostname==="127.0.0.1"||t.hostname==="[::1]")&&(t.hostname="localhost"),t.href}catch{return e}}const jt=Dt({endpoint:q().max(2048).refine(e=>Nt(e)&&new URL(e).pathname==="/rpc").transform(ue)});function gr(e){const t=new URLSearchParams(e.replace(/^#/,"")),n=jt.safeParse({endpoint:t.get("endpoint")??""});return n.success?n.data:null}function At(e){const t=jt.safeParse(e);return t.success?t.data:null}const Mt="studio:deco-serve-last";function vr(e){try{localStorage.setItem(Mt,JSON.stringify(e))}catch{}}function br(){try{const e=localStorage.getItem(Mt);return e?At(JSON.parse(e)):null}catch{return null}}function wr(e){try{return new URL(ue(e)).host}catch{return e}}function Yn(e,t=1e4){return Math.min(1e3*2**Math.max(0,e-1),t)}const Gn="http://localhost:4545/rpc";class Ue extends Error{constructor(t="the endpoint isn't deco serve"){super(t),this.name="NotDecoServeError"}}function zn(e){if(e instanceof Ue)return{reason:"not-deco-serve"};if(!(e instanceof j))return{reason:"not-answering"};switch(e.code){case T.Unauthorized:case T.MethodNotFound:return{reason:"outdated"};case T.Unsupported:return Ae(e)?{reason:"outdated"}:{reason:"version-mismatch"};case T.Unavailable:return/^the endpoint answered HTTP/.test(e.message)?{reason:"not-deco-serve"}:{reason:"error",detail:e.message};default:return{reason:"error",detail:e.message}}}function pr(e,t){if(e)return[ue(e.endpoint)];const n=[t?.endpoint,Gn].filter(o=>!!o).map(ue);return[...new Set(n)]}const Xn=Dt({blocks:Oe(q(),Oe(q(),xn()).refine(je)),versions:Oe(q(),q().min(1)),missing:_n(q())});function Zn(e,t){const n=Xn.parse(e),o=Object.keys(n.blocks),s=Object.keys(n.versions),r=[...o,...n.missing],i=new Set(t);if(s.length!==o.length||o.some(a=>!Object.hasOwn(n.versions,a))||r.length!==i.size||new Set(r).size!==r.length||r.some(a=>!i.has(a)))throw new Error("The CMS block response did not account for the requested names");return n}function ne(e,t){const n=e.index?.entries[t];return!!n&&je(e.blocks[t])&&e.versions[t]===n.version}function Kn(e,t,n){const o=new Map;let s=!1;for(const[r,i]of Object.entries(n.blocks)){const a=t.index?.entries[r];if(a){if(n.versions[r]!==a.version){s||=a.version===e.index?.entries[r]?.version;continue}t.blocks[r]!==e.blocks[r]||t.versions[r]!==e.versions[r]||o.set(r,i)}}return s||=n.missing.some(r=>!!t.index?.entries[r]),{blocks:o.size?{...t.blocks,...Object.fromEntries(o)}:t.blocks,versions:o.size?{...t.versions,...Object.fromEntries([...o.keys()].map(r=>[r,n.versions[r]]))}:t.versions,refreshIndex:s}}function qn(e,t,n){return!!e.index&&t.every(o=>e.index?.entries[o]?ne(e,o)&&(!n||n[o]===e.blocks[o]):!n||n[o]===void 0)}const st=50,rt=10;function eo(e,t=n=>fetch(n)){let n=1;return{async batch(o){const s=o.map(()=>n++),r=await t(new Request(e,{method:"POST",headers:{"content-type":"application/json"},credentials:"include",signal:we(),body:JSON.stringify(o.map((l,c)=>({jsonrpc:"2.0",id:s[c],method:l.method,params:l.params??{}})))}));if(!r.ok)throw new j(T.Unavailable,`the hosted CMS answered ${r.status}`);const i=await r.json(),a=new Map((Array.isArray(i)?i:[]).map(l=>[l.id,l]));return s.map(l=>{const c=a.get(l);return c?c.error?{ok:!1,error:j.from(c.error)}:{ok:!0,result:c.result}:{ok:!1,error:new j(T.InternalError,"no response for this call")}})}}}function to(e,t){if(!e)return t??{};const n={};for(const[o,s]of Object.entries(e.entries)){if(t&&Object.hasOwn(t,o)){n[o]=t[o];continue}n[o]={[Tn]:!0,...s.meta?.type?{__resolveType:s.meta.type}:{},...s.meta?.path!==void 0?{path:s.meta.path}:{},...s.meta?.refs?.length?{[Rn]:s.meta.refs}:{}}}for(const[o,s]of Object.entries(t??{}))Object.hasOwn(n,o)||(n[o]=s);return n}function no(e,t){return e?.entries[t]?.meta?.refs??[]}function oo(e,t){return Object.hasOwn(e.draft,t)?e.draft[t]?.version??null:null}function Be(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Ie(e,t){if(Array.isArray(e)){for(const n of e)Ie(n,t);return}if(Be(e))for(const[n,o]of Object.entries(e))n==="__resolveType"&&typeof o=="string"?t.add(o):Ie(o,t)}function Lt(e,t){if(!Be(e))return;const n={};typeof e.__resolveType=="string"&&(n.type=e.__resolveType),typeof e.path=="string"&&(n.path=e.path);const o=new Set;Ie(e,o);const s=[...o].filter(r=>t.has(r)).sort();return s.length>0&&(n.refs=s),Object.keys(n).length>0?n:void 0}function Qt(e,t,n,o){Y(e),e.setQueryData(g.contentIndex(t),s=>{if(!s)return s;const r={...s.entries},i={...s.draft},a=new Set([...Object.keys(r),...Object.keys(o)]);for(const[l,c]of Object.entries(n)){const f=i[l]?.editor??null;if(c===null||c===X){delete r[l],i[l]={operation:"delete",version:X,editor:f};continue}const h=Lt(o[l],a);r[l]={version:c,...h?{meta:h}:{}},i[l]={operation:"set",version:c,editor:f}}return{...s,entries:r,draft:i}})}function so(e,t,n,o){e.setQueryData(g.contentIndex(t),s=>{if(!s)return s;const r={...s.draft},i={...s.entries};if(o===null)delete r[n];else if(r[n]={operation:o.block===null?"delete":"set",version:o.version,editor:r[n]?.editor??null},o.block===null)delete i[n];else{const a=new Set([...Object.keys(i),n]),l=Lt(o.block,a);i[n]={version:o.version,...l?{meta:l}:{}}}return{...s,entries:i,draft:r}})}const it=new WeakMap;async function Fe(e,t,n,o,s=new Set){const r=e.getQueryData(g.contentIndex(n));if(!r)throw new j(T.Unavailable,"The CMS index is not loaded yet");let i=it.get(e);i||(i=new Map,it.set(e,i));const a=e.getQueryData(g.decofile(n))??{},l=e.getQueryData(g.contentVersions(n))??{},c=[],f=[];for(const u of new Set(o)){const d=r.entries[u];if(!d||s.has(u)||je(a[u])&&l[u]===d.version)continue;const v=i.get(`${n}\0${u}`);v?c.push(v):f.push(u)}if(f.length>0){const u=io(e,t,n,f);for(const d of f){const v=`${n}\0${d}`;i.set(v,u),u.catch(()=>{}).finally(()=>{i.get(v)===u&&i.delete(v)})}c.push(u)}await Promise.all(c);const h=fe(e,n);if(o.some(u=>h.index?.entries[u]&&!s.has(u)&&!ne(h,u)))throw new j(T.Unavailable,"A CMS block changed while loading; try again")}async function ro(e,t,n,o,s){if(!t){const i=o?.[s];return Be(i)&&!$n(i)?i:void 0}await Fe(e,t,n,[s]);const r=fe(e,n);return r.index?.entries[s]&&ne(r,s)?r.blocks[s]:void 0}function fe(e,t){return{index:e.getQueryData(g.contentIndex(t)),blocks:e.getQueryData(g.decofile(t))??{},versions:e.getQueryData(g.contentVersions(t))??{}}}async function io(e,t,n,o){const s=fe(e,n),r=[];for(let i=0;i<o.length;i+=st)r.push(o.slice(i,i+st));for(let i=0;i<r.length;i+=rt){const a=r.slice(i,i+rt),l=await t.batch(a.map(c=>({method:"cms.blocks",params:{names:c}})));if(l.length!==a.length)throw new j(T.InternalError,"Incomplete CMS batch response");for(const[c,f]of l.entries()){if(!f.ok)throw f.error;const h=Zn(f.result,a[c]),u=fe(e,n),d=Kn(s,u,h);if(Y(e),d.blocks!==u.blocks&&e.setQueryData(g.decofile(n),d.blocks),d.versions!==u.versions&&e.setQueryData(g.contentVersions(n),d.versions),d.refreshIndex)throw e.invalidateQueries({queryKey:g.decofile(n),exact:!0},{cancelRefetch:!1}),new j(T.Unavailable,"The CMS index changed while loading blocks; try again")}}}function Ce(e){const t=A.c(4);let n;t[0]!==e?(n=g.contentIndex(e),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:ao,staleTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:s}=F(o);return s}async function ao(){throw new Error("the content index is set by the poll")}function at(e,t){const n=A.c(8);let o;n[0]!==t?(o=Pn(t),n[0]=t,n[1]=o):o=n[1];const s=o;let r;n[2]!==e||n[3]!==s?(r=a=>e.getQueryCache().subscribe(l=>{l.query.queryHash===s&&a()}),n[2]=e,n[3]=s,n[4]=r):r=n[4];let i;return n[5]!==e||n[6]!==t?(i=()=>e.getQueryData(t),n[5]=e,n[6]=t,n[7]=i):i=n[7],L.useSyncExternalStore(r,i)}const ct=3e4;function co(e){if(!(e instanceof j))return;const t=e.data?.retryAfterMs;return typeof t=="number"&&t>0?t:void 0}function lo(e,t,n,o){const s=A.c(15),r=Z(),i=Ce(t);let a;s[0]!==t?(a=g.decofile(t),s[0]=t,s[1]=a):a=s[1];const l=at(r,a);let c;s[2]!==t?(c=g.contentVersions(t),s[2]=t,s[3]=c):c=s[3];const f=at(r,c),h=o?.withRefs??!1,u=new Set(n);if(h)for(const p of n)for(const k of no(i,p))u.add(k);const d=[...u].filter(p=>!!i?.entries[p]).sort(),v={index:i,blocks:l??{},versions:f??{}},b=d.some(p=>!ne(v,p)),w=JSON.stringify(d.map(p=>[p,i?.entries[p]?.version,ne(v,p)])),[_,S]=L.useState(null),[$,E]=L.useState(0),D=_?.key===w?_:null;L.useEffect(()=>{if(!e||!w)return;let p=!0;const k=JSON.parse(w).map(ho);return Fe(r,e,t,k).then(()=>{p&&S(P=>P?.key===w?null:P)},P=>{p&&S(Q=>({key:w,count:(Q?.key===w?Q.count:0)+1,retryAfterMs:co(P)}))}),()=>{p=!1}},[e,r,t,w,$]);let I;s[4]!==D||s[5]!==E?(I=()=>{if(!D)return;const p=Math.min(ct,D.retryAfterMs??Pt(ct,1e3,D.count-1,2,.5)),k=setTimeout(()=>E(fo),p);return()=>clearTimeout(k)},s[4]=D,s[5]=E,s[6]=I):I=s[6];let m;s[7]!==D?(m=[D],s[7]=D,s[8]=m):m=s[8],L.useEffect(I,m);const y=!e||qn(v,[...u],o?.listing),O=!!e&&b&&D!==null;let x;s[9]!==E?(x=()=>E(uo),s[9]=E,s[10]=x):x=s[10];let N;return s[11]!==y||s[12]!==O||s[13]!==x?(N={ready:y,failed:O,retry:x},s[11]=y,s[12]=O,s[13]=x,s[14]=N):N=s[14],N}function uo(e){return e+1}function fo(e){return e+1}function ho(e){const[t]=e;return t}const Ut=L.createContext(null);function go(e){const t=A.c(24),n=L.useContext(Ut),o=Qe(n?null:e),{data:s}=Nn.useSession(),r=s?.user?.id??"",i=!!e&&!!r;let a;t[0]!==i||t[1]!==r||t[2]!==e?(a=i?De.decoServeConnection(r,e):null,t[0]=i,t[1]=r,t[2]=e,t[3]=a):a=t[3];const[l,c]=ut(a);let f;t[4]!==i||t[5]!==r||t[6]!==e?(f=i?De.decoServeEndpoint(r,e):null,t[4]=i,t[5]=r,t[6]=e,t[7]=f):f=t[7];const[h,u]=ut(f);if(n)return n;let d;t[8]!==l||t[9]!==i||t[10]!==o?(d=i&&o?At(l):null,t[8]=l,t[9]=i,t[10]=o,t[11]=d):d=t[11];const v=d,b=i&&o&&typeof h=="string"?h:null;let w;t[12]!==u||t[13]!==c||t[14]!==i?(w=$=>{i&&(c($),u($.endpoint))},t[12]=u,t[13]=c,t[14]=i,t[15]=w):w=t[15];let _;t[16]!==c||t[17]!==i?(_=()=>{i&&c(null)},t[16]=c,t[17]=i,t[18]=_):_=t[18];let S;return t[19]!==v||t[20]!==b||t[21]!==w||t[22]!==_?(S={connection:v,lastEndpoint:b,set:w,clear:_},t[19]=v,t[20]=b,t[21]=w,t[22]=_,t[23]=S):S=t[23],S}function lt(e){try{const t=localStorage.getItem(e);return t===null?null:JSON.parse(t)}catch{return null}}function ut(e){const t=A.c(17),n=Z(),o=e??"";let s;t[0]!==o?(s=["localStorage",o],t[0]=o,t[1]=s):s=t[1];const r=s;let i,a;t[2]!==e?(i=()=>e?lt(e):null,a=()=>e?lt(e):null,t[2]=e,t[3]=i,t[4]=a):(i=t[3],a=t[4]);const l=!!e;let c;t[5]!==r||t[6]!==i||t[7]!==a||t[8]!==l?(c={queryKey:r,queryFn:i,initialData:a,enabled:l,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[5]=r,t[6]=i,t[7]=a,t[8]=l,t[9]=c):c=t[9];const{data:f}=F(c);let h;t[10]!==e||t[11]!==n||t[12]!==r?(h=b=>{if(e){try{b===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(b))}catch{}n.setQueryData(r,b)}},t[10]=e,t[11]=n,t[12]=r,t[13]=h):h=t[13];const u=h,d=e?f??null:null;let v;return t[14]!==u||t[15]!==d?(v=[d,u],t[14]=u,t[15]=d,t[16]=v):v=t[16],v}function Bt(e,t=""){return{source:e,cacheKeySuffix:e==="github"?"":e==="sandbox"?":sandbox":`:serve:${t}`}}function vo(e){return JSON.stringify([e.kind==="legacy"?"legacy":"protocol",e.source,e.cacheKeySuffix])}function mr(e){return e.kind==="protocol"||e.kind==="unavailable"}function Sr(e){const t=e.hasOrg?e.orgFlag:!1,{backend:n}=e;return n===null||n==="legacy"?t:!0}function yr(e,t,n){return t!=="github"||!n?!1:e.kind==="pending"?!0:e.kind==="unavailable"&&e.siteNotOwned?!1:(e.kind==="protocol"||e.kind==="unavailable")&&e.source==="github"}function kr(e){if(e.kind!=="protocol"||e.source!=="local")return null;const t=e.describe.preview?.url;return t&&Nt(t)?t:null}function Or(e,t){return e.kind!=="protocol"||e.source!=="local"||!e.describe.assets||!t?null:new URL(t.endpoint).origin}function Ft(e){return e.hasServeConnection?"local":e.runtime==="sandbox"?"sandbox":"github"}function bo(e){if(!e.hasProject)return"legacy";const t=Ft(e);if(t==="local")return"protocol-local";if(!e.v8)return"legacy";if(t==="sandbox"){const o=e.sandboxSite;return o==="ready"?"protocol-sandbox":o==="error"?"retrying-sandbox":"pending"}const n=e.githubSite;return n==="ready"?"protocol-github":n==="not-owned"?"site-not-owned-github":n==="error"?"unavailable-github":"pending"}function wo(e){return{github:e.v8&&e.mode==="github",sandbox:e.v8&&e.mode==="sandbox"&&e.workingTreeReady}}function ft(e){return e.isError||e.errorUpdateCount>0}function po(e,t,n){if(!t||n.size===0)return e;const o={...e};for(const s of n)Object.hasOwn(t,s)?o[s]=t[s]:delete o[s];return o}function mo(e){if(!e||typeof e!="object")return[];const t=e,n=[];return typeof t.blockKey=="string"&&n.push(t.blockKey),t.writes&&typeof t.writes=="object"&&n.push(...Object.keys(t.writes)),Array.isArray(t.deletes)&&n.push(...t.deletes.filter(o=>typeof o=="string")),n}const Ct="__noSchema";function Vt(){return{manifest:{blocks:{}},schema:{definitions:{},root:{}},[Ct]:!0}}function Er(e){return!!e&&e[Ct]===!0}function Ve(e){if(!e.ok)return e.error.code===T.NotFound;const t=e.result;return t.notModified===!1&&t.schema===null}function So(e,t){return(typeof t.name=="string"?t.name.trim():"")||e}const yo=(e,t)=>e.label.localeCompare(t.label)||e.key.localeCompare(t.key);function Dr(e){const t=new Map;for(const[n,o]of Object.entries(e)){const s=o&&typeof o=="object"&&!Array.isArray(o)?o:{},r=typeof s.__resolveType=="string"?s.__resolveType:null,i=t.get(r)??[];i.push({key:n,label:So(n,s)}),t.set(r,i)}return[...t.entries()].map(([n,o])=>({resolveType:n,blocks:o.sort(yo)})).sort((n,o)=>n.resolveType===null?1:o.resolveType===null?-1:dt(n.resolveType).localeCompare(dt(o.resolveType))||n.resolveType.localeCompare(o.resolveType))}function dt(e){return(e.split("/").filter(Boolean).at(-1)??e).replace(/\.(tsx?|jsx?)$/,"")||e}function ht(e,t,n){if(t.length===0)return n;const[o,...s]=t;if(Array.isArray(e)&&typeof o=="number"){const r=e.slice();return r[o]=ht(e[o],s,n),r}if(e&&typeof e=="object"&&typeof o=="string"){const r=e,i={};for(const a of Object.keys(r))i[a]=a===o?ht(r[a],s,n):r[a];return i}return e}function Ir(e){if(e.trim()==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}class gt extends Error{}const He="site-not-owned";async function ko(e){return e.status!==409?!1:(await e.clone().json().catch(()=>null))?.code==="site_not_owned"}async function Oo(e,t=n=>fetch(n)){const n=Me({endpoint:e,fetch:async o=>{const s=await t(new Request(o,{signal:we(o.signal)}));if(await ko(s))throw new gt;return s}});try{return await We(n)}catch(o){if(o instanceof gt)return He;throw o}}async function Eo(e,t,n){await t();const o=await Oo(e,n);return o===He?o:{...o,hosted:eo(e,n)}}const Je=5e3;function Do(e){if(!e.site)throw new Error("this project names no site");return An(e.site,e.branch)}function Io(e){return new URL(pe(e,"rpc"),window.location.origin).href}async function We(e){const[t,n]=await e.batch([{method:"describe"},{method:"schema.get"}]);if(!t?.ok)throw t?.error??new Error("no describe");if(t.result?.protocol!==Cn)throw new Ue;const s=Vn(t.result);if(!n)throw new Error("no schema.get");if(Ve(n))return{client:e,describe:s,hasSchema:!1};if(n.ok)return{client:e,describe:s,hasSchema:!0};throw n.error}function _o(e,t=n=>fetch(n)){return We(Me({endpoint:e,fetch:n=>t(new Request(n,{signal:we(n.signal)}))}))}function se(e,t){const n=A.c(40),{org:o}=jn(),{connection:s}=go(e),{runtime:r}=$t(e),i=L.useContext(Ut),a=Qe(e),l=It(Le(e)?.metadata),c=Ft({hasServeConnection:!!s,runtime:r}),f=Bt(c,s?.endpoint??""),h=Hn()?.taskId??null,u=Bn(Fn().lifecycle.phase),d=Z(),v=wo({mode:c,v8:a,workingTreeReady:u}),b=v.github&&!!o.slug&&!!e&&!!t,w=F({queryKey:g.contentBackend(o.slug,e??"",t??"","github"),queryFn:()=>Eo(Do({orgSlug:o.slug,site:l,branch:t}),()=>_t(l,t)),enabled:b,staleTime:Number.POSITIVE_INFINITY,...vt}),_=v.sandbox&&!!o.slug&&!!e&&!!t;let S;n[0]!==t||n[1]!==o.slug||n[2]!==h||n[3]!==e?(S=()=>_o(Io({orgSlug:o.slug,virtualMcpId:e,branch:t,threadId:h})),n[0]=t,n[1]=o.slug,n[2]=h,n[3]=e,n[4]=S):S=n[4];const $=F({queryKey:g.contentBackend(o.slug,e??"",t??"","sandbox",h??""),queryFn:S,enabled:_,staleTime:Number.POSITIVE_INFINITY,...vt}),E=!!s;let D;n[5]!==s?.endpoint||n[6]!==o.slug||n[7]!==e?(D=g.contentBackend(o.slug,e??"","local",s?.endpoint??""),n[5]=s?.endpoint,n[6]=o.slug,n[7]=e,n[8]=D):D=n[8];let I;n[9]!==s?(I=()=>jo(s.endpoint),n[9]=s,n[10]=I):I=n[10];let m;n[11]!==E||n[12]!==D||n[13]!==I?(m={queryKey:D,queryFn:I,enabled:E,staleTime:Number.POSITIVE_INFINITY,retry:To,retryDelay:Ro,refetchInterval:xo},n[11]=E,n[12]=D,n[13]=I,n[14]=m):m=n[14];const y=F(m);let O;n[15]!==s?.endpoint||n[16]!==o.slug||n[17]!==e?(O=g.contentBackend(o.slug,e??"","local",s?.endpoint??""),n[15]=s?.endpoint,n[16]=o.slug,n[17]=e,n[18]=O):O=n[18];const x=O;let N;n[19]!==s?.endpoint||n[20]!==o.slug||n[21]!==e?(N=g.contentBackend(o.slug,e??"","local-describe",s?.endpoint??""),n[19]=s?.endpoint,n[20]=o.slug,n[21]=e,n[22]=N):N=n[22];let p;n[23]!==y.data||n[24]!==x||n[25]!==d?(p=async()=>{try{return await y.data.client.describe()}catch(K){const In=K;throw d.invalidateQueries({queryKey:x,exact:!0},{cancelRefetch:!1}),In}},n[23]=y.data,n[24]=x,n[25]=d,n[26]=p):p=n[26];const k=!!y.data&&!i;let P;n[27]!==N||n[28]!==p||n[29]!==k?(P={queryKey:N,queryFn:p,enabled:k,refetchInterval:Je,retry:!1},n[27]=N,n[28]=p,n[29]=k,n[30]=P):P=n[30];const M=F(P).data??y.data?.describe,U=bo({hasProject:!!e,hasServeConnection:!!s,runtime:r,v8:a,githubSite:w.data===He?"not-owned":w.data?"ready":ft(w)?"error":"loading",sandboxSite:Po({data:$.data,isError:ft($),workingTreeReady:u})});if(U==="pending")return{kind:"pending",...f};if(U==="retrying-sandbox")return{kind:"pending",retrying:"sandbox",...f};if(U==="legacy")return{kind:"legacy"};if(U==="protocol-github")return{..._e(f,w.data),site:l};if(U==="site-not-owned-github")return{kind:"unavailable",...f,siteNotOwned:!0};if(U==="protocol-sandbox")return _e(f,$.data);if(U==="unavailable-github"){let K;return n[31]!==f?(K={kind:"unavailable",...f},n[31]=f,n[32]=K):K=n[32],K}const R=y.error??y.failureReason,H=s?.endpoint??"";let J;return n[33]!==M||n[34]!==y.data||n[35]!==y.failureCount||n[36]!==y.isError||n[37]!==H||n[38]!==R?(J=No({probed:y.data,isError:y.isError,failureCount:y.failureCount,failure:R,describe:M,endpoint:H}),n[33]=M,n[34]=y.data,n[35]=y.failureCount,n[36]=y.isError,n[37]=H,n[38]=R,n[39]=J):J=n[39],J}function xo(e){return e.state.status==="error"||e.state.data?.hasSchema===!1?Je:!1}function Ro(e){return Yn(e+1)}function To(e,t){return!(t instanceof j)&&!(t instanceof Ue)}function Po(e){return e.data!==void 0?"ready":e.workingTreeReady?e.isError?"error":"loading":"unavailable"}const $o=3;function No(e){const t=Bt("local",e.endpoint),n=e.probed?_e(t,{...e.probed,describe:e.describe??e.probed.describe}):null;return e.isError||e.failureCount>0?n?.kind==="protocol"&&!e.isError&&e.failureCount<$o?n:{kind:"unavailable",...t,problem:zn(e.failure)}:n??{kind:"pending",...t}}const vt={retry:2,refetchInterval:e=>e.state.status==="error"?Je:!1};function _e(e,t){return{kind:"protocol",...e,client:t.client,describe:t.describe,hasSchema:t.hasSchema,...t.hosted?{hosted:t.hosted}:{}}}function jo(e,t){return We(Me({endpoint:e,fetch:n=>fetch(n,{signal:we(t?AbortSignal.any([t,n.signal]):n.signal)})}))}function xe(e){const t=`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`;return e.protocolSuffix?`${t}${e.protocolSuffix}`:e.localPreviewUrl?`${t}:local:${e.localPreviewUrl}`:t}function Ao(e,t){return xe({...e,protocolSuffix:t.cacheKeySuffix})}function Mo(e,t,n){return e?t==="pending"?{ready:!1,failed:!1}:t==="unavailable"?{ready:!1,failed:!0}:n:{ready:!0,failed:!1}}function Lo(e,t){return JSON.stringify([e?.orgSlug,e?.virtualMcpId,e?.branch,vo(t)])}function Qo(e,t,n){const o=A.c(21),s=Z(),r=se(e?.virtualMcpId,e?.branch),i=e&&r.kind==="protocol"&&r.hosted?r:null;let a;o[0]!==i||o[1]!==e?(a=i&&e?Ao(e,i):"",o[0]=i,o[1]=e,o[2]=a):a=o[2];const l=lo(i?.hosted,a,t,n),c=e!==null;let f;o[3]!==r.kind||o[4]!==l||o[5]!==c?(f=Mo(c,r.kind,l),o[3]=r.kind,o[4]=l,o[5]=c,o[6]=f):f=o[6];const h=f,u=r.kind!=="legacy";let d;o[7]!==r||o[8]!==e?(d=Lo(e,r),o[7]=r,o[8]=e,o[9]=d):d=o[9];let v;o[10]!==r.kind||o[11]!==r.source||o[12]!==l||o[13]!==s||o[14]!==e?(v=()=>{if(l.retry(),!e||r.kind!=="unavailable")return;const w=r.source;s.resetQueries({queryKey:g.contentBackend(e.orgSlug,e.virtualMcpId,...w==="local"?["local"]:[e.branch,w])})},o[10]=r.kind,o[11]=r.source,o[12]=l,o[13]=s,o[14]=e,o[15]=v):v=o[15];let b;return o[16]!==h||o[17]!==u||o[18]!==d||o[19]!==v?(b={...h,v8:u,scopeKey:d,retry:v},o[16]=h,o[17]=u,o[18]=d,o[19]=v,o[20]=b):b=o[20],b}function Ht(e){const t=A.c(12);let n;t[0]!==e?(n=De.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const o=n,[s,r]=Mn(o,null),i=Qe(e);let a;t[2]!==s||t[3]!==e?(a=e?ot(s):null,t[2]=s,t[3]=e,t[4]=a):a=t[4];const c=i?null:a;let f,h;t[5]!==r?(f=d=>r(ot(d)),h=()=>r(null),t[5]=r,t[6]=f,t[7]=h):(f=t[6],h=t[7]);let u;return t[8]!==c||t[9]!==f||t[10]!==h?(u={url:c,setUrl:f,clear:h},t[8]=c,t[9]=f,t[10]=h,t[11]=u):u=t[11],u}const bt=6e4,Uo=2147483647;function Bo(e,t){if(e===null||e.trim()==="")return bt;const n=e.trim(),o=/^\d+(?:\.\d+)?$/.test(n)?Number(n)*1e3:/^[A-Za-z]{3}, /.test(n)?Math.max(0,Date.parse(n)-t):Number.NaN;return Number.isFinite(o)&&o>=0&&o<=Uo?o:bt}class Jt extends Error{constructor(t,n,o,s=Date.now()){super(t),this.status=n,this.name="ContentResponseError",this.retryAt=n===429?s+Bo(o,s):null}status;retryAt}function Fo(e,t,n=Date.now()){const o=Pt(5e3,1e3,e,2,0);return t instanceof Jt&&t.retryAt!==null?Math.max(o,t.retryAt-n):o}async function Ye(e,t){const n=await e.json().catch(()=>null),o=n!==null&&typeof n=="object"&&"error"in n&&typeof n.error=="string"?n.error:`${t} failed (${e.status})`;throw new Jt(o,e.status,e.headers.get("retry-after"))}function Co(e,t){const n=(e??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${t}`:t}function wt(e){let t;try{t=JSON.parse(e)}catch{return null}return typeof t!="object"||t===null||Array.isArray(t)?null:t}function me(e,t,n){return["decofile-write",e,t,n]}function Vo(e,t,n){return{id:me(e,t,n).join(":")}}class Ge extends Error{constructor(t,n,o=[],s=!1){super(n),this.blocks=t,this.fields=o,this.carriedStored=s,this.name="BlockConflictError"}blocks;fields;carriedStored}function ze(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Xe(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function Ho(e,t){return Ye(e,t)}function Jo(e,t,n){e.setQueryData(g.decofileDraft(ze(t)),n)}function Wo(e,t){return e.getQueryData(g.decofileDraft(ze(t)))??null}async function Yo(e,t){return(await fetch(Xe(e),{cache:"no-store",headers:{"if-none-match":`"${t}"`}}).catch(()=>null))?.status===200}function _r(e){const t=A.c(4);let n;t[0]!==e?(n=g.decofileDraft(e?ze(e):""),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:Go,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:s}=F(o);return s??null}async function Go(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function zo(e,t){const n=await fetch(Xe(t),{cache:"no-store"});if(!n.ok)return Ye(n,"Read decofile");const o=await n.json();return o.token&&Jo(e,t,{version:o.version,token:o.token,apiHost:o.apiHost??window.location.host}),o.decofile}async function xr(e,t){const n=await fetch(Xe(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(n.status===409){const s=await n.json().catch(()=>({}));throw s.code==="block-conflict"?new Ge(s.blocks??[],s.error??"Block changed"):new Error(s.error??`Save failed (${n.status})`)}if(!n.ok)return Ho(n,"Save");const o=await n.json();return{...o,apiHost:o.apiHost??window.location.host}}const Wt=3e3,Xo=15e3,Zo=2*6e4,Yt={now:()=>Date.now(),setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),hidden:()=>typeof document<"u"&&document.visibilityState==="hidden"};function Ko(e){return e<Zo?Wt:Xo}function qo(e,t=Yt){const n=t.now();let o=!1,s=!1,r=null;const i=()=>{o||(r=t.setTimeout(a,Ko(t.now()-n)))},a=()=>{if(r=null,o)return;const{read:l,skip:c}=e();if(s||t.hidden()||c?.()){i();return}s=!0;let f;try{f=l()}catch{f=void 0}Promise.resolve(f).catch(()=>{}).finally(()=>{s=!1}),i()};return i(),()=>{o=!0,r!==null&&t.clearTimeout(r)}}const pt=()=>0;function es(e,t,n=Yt){const o=L.useRef(t);o.current=t;const[s]=L.useState(()=>({polling:()=>qo(()=>o.current,n),idle:()=>()=>{}}));L.useSyncExternalStore(e?s.polling:s.idle,pt,pt)}function Gt(e,t){return pe(e,t)}function ts(e,t){return pe(e,"preview-fetch",{path:t})}function Rr(e){return Gt(e,"preview-invoke")}function Tr(e){return Gt(e,"catalog-invoke")}function zt(e){try{const{hostname:t}=new URL(e);return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}function ns(){if(typeof document>"u")return null;const e=Array.from(document.querySelectorAll("iframe"));for(const t of e){const n=t.getAttribute("src");if(n&&zt(n))return n}return null}function os(e,t){const n=e.previewUrl??e.getFallbackPreviewUrl?.()??ns();return n&&zt(n)?new URL(t,n).toString():ts(e,t)}function ss(e){return os(e,"/.decofile")}function rs(e){return e===400?"absent":e===404?"unavailable":e>=200&&e<300?"ok":"error"}function mt(e){return e.liveOk||e.committedAbsent?404:e.liveStatus??502}async function is(e,t){const n=pe(e,"read"),o=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:t,full:!0})}),s=rs(o.status);if(s==="absent")return{kind:"absent"};if(s==="unavailable")return{kind:"unavailable"};if(s==="error"){const i=new Error(`Failed to read ${t}: ${o.status}`);throw i.status=o.status,i}const r=await o.json();return typeof r.content!="string"?{kind:"unavailable"}:{kind:"data",data:Jn(r.content)}}async function as(e,t){const n=await is(e,t);if(n.kind!=="data")return n;try{return{kind:"data",data:JSON.parse(n.data)}}catch{return{kind:"unavailable"}}}async function Pr(e){const t=`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}/meta`,n=await fetch(t,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok)return Ye(n,"Read committed meta");try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function cs(e){return Le(e)?.metadata?.runtime?.path??null}function Re(e,t,n,o){const s=B(e),r=Object.keys(n?.changes??{}).find(a=>B(a)===s);if(r!==void 0&&n)return n.changes[r].baseVersion;const i=Object.keys(t?.draft??{}).some(a=>B(a)===s);if(t&&!i){const a=Object.keys(t.entries).find(l=>B(l)===s);return a===void 0?null:t.entries[a].version}return o?.[e]??null}class Xt extends Error{constructor(t){super(t instanceof Error?t.message:String(t),{cause:t}),this.name="ServeLostError"}}function $r(e){return e instanceof j&&e.code===T.Conflict}function Zt(e){const t=e.data?.violations;return!Array.isArray(t)||t.length===0?e.message:t.slice(0,3).map(n=>n.message).join("; ")}class Ze extends Error{constructor(){super("The draft's changes couldn't be read"),this.name="HostedDraftUnreadError"}}class Ke extends Error{constructor(){super("The blocks kept changing while the change was saved"),this.name="HostedKeptChangingError"}}function Nr(e,t){return(t instanceof Ze||t instanceof Ke)&&(t.message=Kt(e,t,"github")),t}function Kt(e,t,n){if(t instanceof Ze)return e("siteEditor.save.draftUnread");if(t instanceof Ke)return e("siteEditor.save.keptChanging");if(t instanceof Ge)return t.message;if(n==="local")return us(e,t);if(t instanceof j)switch(t.code){case T.Conflict:return e("siteEditor.save.conflict");case T.ReadOnly:return e("siteEditor.save.readOnly");case T.InvalidBlock:case T.InvalidParams:return e("siteEditor.save.invalid");case T.LimitExceeded:return e("siteEditor.save.tooLarge")}return e("siteEditor.save.failed")}function ls(e,t){if(t==="local"||e instanceof Ge||e instanceof Ze||e instanceof Ke)return null;if(e instanceof j){const n=e.code===T.InvalidBlock||e.code===T.InvalidParams?Zt(e):e.message;return n?`${e.code}: ${n}`:null}return e.message||null}function us(e,t){if(t instanceof Xt)return e("decoServe.save.serverGone");if(t instanceof j)switch(t.code){case T.Conflict:return e("decoServe.save.conflict");case T.ReadOnly:return e("decoServe.save.readOnly");case T.InvalidBlock:case T.InvalidParams:return e("decoServe.save.invalid",{detail:Zt(t)});case T.LimitExceeded:return e("decoServe.save.tooLarge")}return e("sectionsEditor.sectionsEditor.saveFailed",{error:t.message})}function fs(e,t,n){return e===null?0:Math.max(0,n-Math.max(0,t-e))}function ds(e,t){const[n,o]=L.useState(e),s=L.useRef(null);return e&&!n&&o(!0),L.useEffect(()=>{if(e){s.current??=Date.now();return}if(!n)return;const r=()=>{s.current=null,o(!1)},i=fs(s.current,Date.now(),t);if(i===0){r();return}const a=setTimeout(r,i);return()=>clearTimeout(a)},[e,n,t]),n}const hs="decocms:content-writes",Te=new Set;let G;function qt(){if(G!==void 0)return G;G=null;try{typeof BroadcastChannel=="function"&&(G=new BroadcastChannel(hs),G.addEventListener("message",e=>{const t=e.data?.cacheKey;if(typeof t=="string")for(const n of[...Te])n(t)}))}catch{G=null}return G}function gs(e){try{qt()?.postMessage({cacheKey:e})}catch{}}function vs(e){return qt(),Te.add(e),()=>{Te.delete(e)}}const en="__at=",tn="__test=",bs=/^[0-9a-f]{12}-[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;function ws(e){return e.at!==void 0||Object.keys(e.tests??{}).length>0}function ee(e){return typeof e=="string"&&bs.test(e)}function St(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function ps(e){const t=e.tests??{};return[...e.at!==void 0?[en+St(e.at)]:[],...Object.keys(t).map(n=>tn+St(`${n}=${t[n]?"on":"off"}`))]}function yt(e,t){const o=[...e.split("&").filter(s=>s&&!s.startsWith(en)&&!s.startsWith(tn)),...t];return o.length>0?`?${o.join("&")}`:""}function de(e,t){const n=ps(t),o=e.indexOf("?"),s=o===-1?e:e.slice(0,o);if(ee(s))return s+yt(o===-1?"":e.slice(o+1),n);const r=e.lastIndexOf("@");if(r<=0)return e;const i=e.slice(0,r),a=i.indexOf("?"),l=a===-1?i:i.slice(0,a),c=a===-1?"":i.slice(a+1);return`${l}${yt(c,n)}${e.slice(r)}`}function jr(e,t,n){if(!ws(t))return e;try{const o=new URL(e),s=o.searchParams.get("__draft");return s&&s!=="off"?(o.searchParams.set("__draft",de(s,t)),o.toString()):ee(n)?(o.searchParams.set("__draft",de(n,t)),o.toString()):e}catch{return e}}function Ar(e,t,n="/"){if(!e||!ee(t))return null;try{const o=new URL(n,e);return o.searchParams.set("__draft",t),o.toString()}catch{return null}}function nn(e){return btoa(encodeURIComponent(e))}function Mr(e,t,n){const o=ms(e,t,n);return o.searchParams.set("__cb",crypto.randomUUID()),o.toString()}function ms(e,t,n){const o=new URL(e).origin,s=new URL(`/live/previews/${encodeURIComponent(t)}`,o);return s.searchParams.set("path","/"),s.searchParams.set("pathTemplate","/"),s.searchParams.set("props",nn(JSON.stringify({path:"/",sections:[{__resolveType:n}]}))),s}const Ss="__draft";function Lr(e){return`${`${e.apiHost}/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}?token=${e.token}`}@${e.version}`}const ys="off";function ks(e,t){if(!t)return e;const n=new URL(e);return n.searchParams.set(Ss,t),n.toString()}function Qr(e){const t=e.pageBlock.__resolveType;if(typeof t!="string"||!t)return null;const n=new URL(e.previewBaseUrl).origin,o=new URL(`/live/previews/${encodeURIComponent(t)}`,n);o.searchParams.set("__decoFBT","0"),o.searchParams.set("__d",""),o.searchParams.set("path",e.path),o.searchParams.set("pathTemplate",e.pathTemplate);const{__resolveType:s,...r}=e.pageBlock,i=JSON.stringify({__props:r,__decofile:e.decofile});return{src:o.toString(),body:i}}function Ur(e,t,n,o){const s=new URL(e).origin,r=new URL(`/live/previews/${encodeURIComponent(t)}`,s);r.searchParams.set("__d","");const i=[{__resolveType:"preview",block:n}];return o&&i.push(o),r.searchParams.set("props",nn(JSON.stringify({sections:i}))),r.toString()}function Br(e){return e.fastPreviewActive&&e.previewServerUrl?e.previewServerUrl:e.sandboxUrl??null}const kt="__variant=";function on(e,t,n){return`${e}@${t}=${n}`}function Fr(e,t){return!e||!t.multivariate||t.variants.length<=1?[]:t.index<0||t.index>=t.variants.length?[]:[on(e,"sections",t.index)]}function Cr(e){const t=Array.isArray(e.mvObj.variants)?e.mvObj.variants:[];if(!e.pageKey||e.sectionIndex<0)return[];if(e.selectedVariantIndex<0||e.selectedVariantIndex>=t.length)return[];const o=`${e.page.multivariate?`sections.variants.${e.page.index}.value${e.page.lazyValues?".value":""}`:"sections"}.${e.sectionIndex}${e.sectionLazy?".section":""}`;return[on(e.pageKey,o,e.selectedVariantIndex)]}function Vr(e,t){return[...t,...e]}function Os(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function qe(e,t){const n=e.lastIndexOf("@");if(n<=0)return e;const o=e.slice(0,n),s=o.indexOf("?"),r=s===-1?o:o.slice(0,s),a=[...s===-1?[]:o.slice(s+1).split("&").filter(c=>c&&!c.startsWith(kt)),...t.map(c=>kt+Os(c))],l=a.length>0?`?${a.join("&")}`:"";return`${r}${l}${e.slice(n)}`}function Hr(e,t,n=!1){if(t.length===0&&!n)return null;try{const o=new URL(e),s=o.hostname==="[::1]"?`localhost${o.port?`:${o.port}`:""}`:o.host;return qe(`${s}${o.pathname}@local`,t)}catch{return null}}function Jr(e,t){if(t.length===0)return e;try{const n=new URL(e),o=n.searchParams.get("__draft");return!o||o==="off"?e:(n.searchParams.set("__draft",qe(o,t)),n.toString())}catch{return e}}function Es(e){const{pointer:t}=e;if(!t||t===ys)return null;const n=t.indexOf("?");return ee(n===-1?t:t.slice(0,n))||t.lastIndexOf("@")<=0?null:ee(e.heldRevision)&&e.forcedVariants.length===0?de(e.heldRevision,e.previewOptions):de(qe(t,e.forcedVariants),e.previewOptions)}function Ds(e,t){if(!e||!t)return null;try{return ks(e,t)}catch{return null}}function Wr(e,t,n){if(!e||!n)return null;try{return Ds(new URL(t,e).toString(),n)}catch{return null}}const he={forcedVariants:[],previewOptions:{}},ie=new Map,ae=new Map,Pe=new Map;function sn(e){for(const t of Pe.get(e)??[])t()}function rn(e,t){const n=ee(t)?t:null;(ae.get(e)??null)!==n&&(n?ae.set(e,n):ae.delete(e),sn(e))}function Is(e){return ae.get(e)??null}function _s(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Yr(e,t){const n=ie.get(e)??he,o=t??he;_s(n,o)||(t?ie.set(e,o):ie.delete(e),sn(e))}function xs(e){return ie.get(e)??he}function an(e,t){let n=Pe.get(e);return n||(n=new Set,Pe.set(e,n)),n.add(t),()=>{n.delete(t)}}function Rs(e){const t=A.c(3);let n,o;return t[0]!==e?(n=s=>an(e,s),o=()=>xs(e),t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),L.useSyncExternalStore(n,o,Ts)}function Ts(){return he}function Ps(e){const t=A.c(3);let n,o;return t[0]!==e?(n=s=>e?an(e,s):Ns,o=()=>e?Is(e):null,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),L.useSyncExternalStore(n,o,$s)}function $s(){return null}function Ns(){}function Gr(e,t){const n=A.c(4),o=Rs(e),s=Ps(e);let r;return n[0]!==o||n[1]!==s||n[2]!==t?(r=Es({pointer:t,heldRevision:s,...o}),n[0]=o,n[1]=s,n[2]=t,n[3]=r):r=n[3],r}const cn={phase:"idle",inFlight:0,reload:{seq:0,navigates:!1},epoch:0},js=15e3,ge=new Map;function W(e,t){return`${e}/${t}`}function V(e){let t=ge.get(e);return t||(t={state:cn,listeners:new Set,previews:0,timer:null,discardListeners:new Set},ge.set(e,t)),t}function C(e,t){const n=V(e);n.state={...n.state,...t};for(const o of n.listeners)o()}function Se(e){e.timer&&clearTimeout(e.timer),e.timer=null}function ve(e){return ge.get(e)?.state??cn}function As(e,t){const n=V(e);return n.listeners.add(t),()=>{n.listeners.delete(t)}}function zr(e){const t=V(e);return t.previews++,()=>{t.previews--,t.previews===0&&t.state.phase==="reloading"&&(Se(t),C(e,{phase:"idle"}))}}function Xr(e){const t=ge.get(e);!t||t.state.phase!=="reloading"||(Se(t),C(e,{phase:"idle"}))}function ln(e){const t=V(e);Se(t),C(e,{phase:"saving",inFlight:t.state.inFlight+1})}function ce(e,t){const n=V(e),o=Math.max(0,n.state.inFlight-1);if(o>0){C(e,{inFlight:o});return}if(!t.ok||n.previews===0){C(e,{phase:"idle",inFlight:o});return}un(e,t.navigates,o)}function un(e,t,n=0){const o=V(e);Se(o),o.timer=setTimeout(()=>{o.timer=null,o.state.phase==="reloading"&&C(e,{phase:"idle"})},js),C(e,{phase:"reloading",inFlight:n,reload:{seq:o.state.reload.seq+1,navigates:t}})}function Ms(e){return e?.kind==="protocol"&&e.source==="github"}async function le(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:s,branch:r,backend:i,cacheKey:a}=e,l=t.kind==="publish"||t.kind==="reapply"?n.invalidateQueries({queryKey:g.hostedReleases(o,s)}):null;if(i?.kind!=="protocol"){const v=a&&t.reread?n.invalidateQueries({queryKey:g.decofile(a)}):null;if(await Promise.all([l,v]),v&&t.kind!=="edit"){const b=W(o,s);C(b,{epoch:ve(b).epoch+1})}return{navigates:!1}}const c=r?g.protocolDraftRead(o,s,r):null,f=c?JSON.stringify(n.getQueryData(c)??null):null,h=l?[l]:[];if(a&&t.reread&&h.push(n.invalidateQueries({queryKey:g.decofile(a)})),a&&!t.adopted&&h.push(n.invalidateQueries({queryKey:g.contentChanges(a)})),r&&i.source==="sandbox"&&h.push(n.invalidateQueries({queryKey:Wn(o,s,r)})),Ms(i)&&c&&!t.adopted&&h.push(n.invalidateQueries({queryKey:c})),await Promise.all(h),t.kind!=="edit"){const v=W(o,s);C(v,{epoch:ve(v).epoch+1})}const u=c?JSON.stringify(n.getQueryData(c)??null):null,d=f!==u;return d&&await new Promise(v=>xt.schedule(v)),{navigates:d}}async function Ls(e,t){return ln(W(e.orgSlug,e.virtualMcpId)),fn(e,t)}function Ot(e){return e.branch?JSON.stringify(e.queryClient.getQueryData(g.protocolDraftRead(e.orgSlug,e.virtualMcpId,e.branch))??null):null}async function fn(e,t){const n=W(e.orgSlug,e.virtualMcpId),o=t.adopted?Ot(e):null;let s;try{s=await t.write()}catch(i){throw ce(n,{ok:!1,navigates:!1}),t.refreshOnError&&le(e,{kind:t.kind,reread:!0}).catch(()=>{}),i}if(e.backend?.kind==="protocol"&&e.cacheKey&&gs(e.cacheKey),rn(n,t.shownRevision?.(s)??null),t.adopted){const i=Ot(e)!==o;return i&&await new Promise(a=>xt.schedule(a)),ce(n,{ok:!0,navigates:i}),t.reread&&le(e,t).catch(()=>{}),s}let r=!1;try{({navigates:r}=await le(e,t))}catch{}finally{ce(n,{ok:!0,navigates:r})}return s}function Zr(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:s,branch:r}=e,i=W(o,s),a=new Set(t.blockKeys);for(const f of[...V(i).discardListeners])f(a);ln(i);let l=!1;const c=()=>(l=!0,fn(e,{kind:"discard",reread:!0,write:t.write}));return r?n.getMutationCache().build(n,{mutationKey:me(o,s,r),scope:Vo(o,s,r),mutationFn:c}).execute(void 0).catch(f=>{throw l||ce(i,{ok:!1,navigates:!1}),f}):c()}function Kr(e,t,n){const o=A.c(8);let s;o[0]!==e||o[1]!==t?(s=W(e,t),o[0]=e,o[1]=t,o[2]=s):s=o[2];const r=s;let i;o[3]!==n||o[4]!==r?(i=()=>{const l=V(r).discardListeners;return l.add(n),()=>{l.delete(n)}},o[3]=n,o[4]=r,o[5]=i):i=o[5];let a;o[6]!==r?(a=[r],o[6]=r,o[7]=a):a=o[7],L.useEffect(i,a)}function dn(e){const t=W(e.orgSlug,e.virtualMcpId);ve(t).inFlight>0||(rn(t,null),le(e,{kind:"external"}).then(({navigates:n})=>{const o=V(t);o.previews>0&&o.state.inFlight===0&&un(t,n)}).catch(()=>{}))}function Qs(e,t){const n=A.c(7);let o;n[0]!==e||n[1]!==t?(o=W(e,t),n[0]=e,n[1]=t,n[2]=o):o=n[2];const s=o;let r;n[3]!==s?(r=c=>As(s,c),n[3]=s,n[4]=r):r=n[4];const i=r;let a;n[5]!==s?(a=()=>ve(s),n[5]=s,n[6]=a):a=n[6];const l=a;return L.useSyncExternalStore(i,l,l)}const Us=500;function qr(e,t){const{phase:n}=Qs(e,t);return ds(n!=="idle",Us)}function Bs(e){const t=new Error(`${e} unavailable (content server unreachable)`);return t.status=502,t}function hn(e,t){return g.liveMeta(e.orgSlug,e.virtualMcpId,e.branch,`protocol${t.cacheKeySuffix}`,"")}function ei(e,t,n,o){if(o?.source==="github"){const i=e.getQueryData(g.contentIndex(t));return i?oo(i,n):Fs(e,t,n)}const s=e.getQueryData(g.contentVersions(t));if(!s)return;if(Object.hasOwn(s,n))return s[n];const r=e.getQueryData(g.decofile(t));return r&&Object.hasOwn(r,n)?void 0:null}function gn(e,t){if(Object.hasOwn(e.changes,t))return e.changes[t];const n=B(t),o=Object.keys(e.changes).find(s=>B(s)===n);return o===void 0?void 0:e.changes[o]}function Fs(e,t,n){const o=e.getQueryData(g.contentChanges(t));if(o)return vn(o,ye(e,t),n)}function vn(e,t,n){const o=gn(e,n);return o?.kind==="delete"?o.version??X:o?o.version:t.has(B(n))?X:null}function ti(e,t,n){const o=e.getQueryData(g.contentChanges(t));if(!o)return!1;const s=gn(o,n);return s?s.kind==="set"&&s.baseVersion===null:ye(e,t).has(B(n))}function ni(e,t){const n=e.getQueryData(g.decofile(t)),o=e.getQueryData(g.contentChanges(t));if(!n||!o)return null;const s=ye(e,t);return{blocks:n,versionOf:r=>vn(o,s,r)}}function ye(e,t){return new Set(e.getQueryData(g.contentDraftTombstones(t)))}function be(e,t,n,o){const s=B(n),r=ye(e,t);r.has(s)!==o&&(o?r.add(s):r.delete(s),Y(e),e.setQueryData(g.contentDraftTombstones(t),[...r]))}function bn(e,t,n,o){const s=o.revision,r=e.getQueryData(g.contentVersions(n)),i=Object.entries(o.versions??{}).map(([u,d])=>[u,d===X?null:d]),a=e.getQueryData(g.contentChanges(n)),l=e.getQueryData(g.contentIndex(n)),c=new Set(i.flatMap(([u])=>Re(u,l,a,r)===null?[u]:[])),f=new Set(i.flatMap(([u,d])=>d===null?[]:[B(u)]));e.setQueryData(g.contentChanges(n),u=>{if(!u)return u;const d={...u.changes};for(const[v,b]of i){const w=Re(v,l,u,r);b!==null?d[v]={kind:"set",version:b,baseVersion:w}:w!==null?d[v]={kind:"delete",version:null,baseVersion:w}:delete d[v]}return{...u,changes:d,edited:!0}});for(const[u,d]of i)d!==null?be(e,n,u,!1):!f.has(B(u))&&c.has(u)&&be(e,n,u,!0);const h=o.revision;return h&&h!=="none"&&e.setQueryData(g.protocolDraftRead(t.orgSlug,t.virtualMcpId,t.branch),u=>u&&{...u,version:h}),s}function ke(e,t,n){Y(e),e.setQueryData(g.contentVersions(t),o=>{const s={...o};for(const[r,i]of Object.entries(n))i===null?delete s[r]:s[r]=i;return s})}function wn(e,t){const n=e.getMutationCache().findAll({mutationKey:me(t.orgSlug,t.virtualMcpId,t.branch),status:"pending"});return new Set(n.flatMap(o=>mo(o.state.variables)))}function $e(e,t){e.resetQueries({queryKey:g.contentBackend(t.orgSlug,t.virtualMcpId,"local")})}async function oe(e,t,n,o){try{return await o()}catch(s){const r=!(s instanceof j);throw t.source==="local"&&r?($e(e,n),new Xt(s)):(t.source==="local"&&Ae(s)&&$e(e,n),s)}}const Et=new WeakMap;function et(e){let t=Et.get(e);return t||(t={inFlight:new Map,rereading:new Set},Et.set(e,t)),t}function pn(e,t,n,o){const{inFlight:s}=et(e),r=s.get(o);if(r)return r;const i=tt(e,t,n,o,!0);return s.set(o,i),i.finally(()=>{s.get(o)===i&&s.delete(o)})}function Cs(e,t,n){const o=A.c(8),s=Z(),r=t?.orgSlug,i=t?.virtualMcpId,a=t?.branch;let l,c;o[0]!==e||o[1]!==a||o[2]!==n||o[3]!==r||o[4]!==s||o[5]!==i?(l=()=>{if(!e||!r||!i||!a)return;const f={orgSlug:r,virtualMcpId:i,branch:a},{rereading:h}=et(s);return vs(u=>{u===n&&(h.has(n)||(h.add(n),Hs(s,e,f,n).catch(Vs).finally(()=>h.delete(n))))})},c=[s,e,r,i,a,n],o[0]=e,o[1]=a,o[2]=n,o[3]=r,o[4]=s,o[5]=i,o[6]=l,o[7]=c):(l=o[6],c=o[7]),L.useEffect(l,c)}function Vs(){}async function Hs(e,t,n,o){const s=et(e).inFlight.get(o);return s&&await s.catch(()=>{}),pn(e,t,n,o)}async function tt(e,t,n,o,s){Y(e);const r=g.decofile(o),i=hn(n,t),a=g.contentRevision(o),l=g.contentVersions(o),c=e.getQueryData(r),f=e.getQueryData(l),u=e.getQueryData(i),d=e.getQueryData(a)??void 0,v=s&&c&&f?d?.revision:void 0,b=s&&u?d?.schemaVersion:void 0,w=g.contentChanges(o),_=e.getQueryData(w);if(t.source==="github"&&t.hosted)return Js(e,t,t.hosted,n,o,{conditional:s,seen:d,currentMeta:u,schemaIfNoneMatch:b,seenChanges:_});const[S,$,E]=await oe(e,t,n,()=>t.client.batch([{method:"blocks.list",params:v?{ifNoneMatch:v}:{}},{method:"schema.get",params:b?{ifNoneMatch:b}:{}},{method:"changes.list",params:Rt(_)}])),D=e.getQueryData(a)?.revision,I=D!==void 0&&D!==d?.revision;if(E?.ok){const k=I?null:Tt(_,E.result);k&&e.setQueryData(w,k)}else E&&t.source==="local"&&Ae(E.error)&&$e(e,n);if(!S?.ok)throw S?.error??new Error("no blocks.list");if(!$)throw new Error("no schema.get");const m=S.result,y=Ve($),O=$.ok&&!y?$.result:null;if(m.notModified&&(!c||!f)||O?.notModified&&!u)return tt(e,t,n,o,!1);const x=m.notModified?new Set:wn(e,n),N=m.notModified?c:po(m.blocks,c,x),p=y?Vt():O?O.notModified?u:O.schema:$.error;if(e.setQueryData(a,{revision:I?D:m.notModified?d?.revision:m.revision,schemaVersion:O?O.notModified?d?.schemaVersion:O.version??void 0:void 0}),e.setQueryData(r,N),!m.notModified){const k=e.getQueryData(l),P={...m.versions};for(const Q of x){const M=k?.[Q];M!==void 0?P[Q]=M:delete P[Q]}e.setQueryData(l,P)}return p instanceof j||e.setQueryData(i,p),!I&&!m.notModified&&c&&d?.revision&&m.revision!==d.revision&&dn({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o}),{blocks:N,meta:p}}async function Js(e,t,n,o,s,r){const i=g.decofile(s),a=g.contentIndex(s),l=g.contentRevision(s),c=g.contentVersions(s),f=hn(o,t),h=g.contentChanges(s),u=e.getQueryData(a),d=r.conditional&&u?r.seen?.revision:void 0,[v,b,w]=await oe(e,t,o,()=>n.batch([{method:"cms.index",params:d?{ifNoneMatch:d}:{}},{method:"schema.get",params:r.schemaIfNoneMatch?{ifNoneMatch:r.schemaIfNoneMatch}:{}},{method:"changes.list",params:Rt(r.seenChanges)}])),_=e.getQueryData(a)??u,S=e.getQueryData(l)?.revision,$=S!==void 0&&S!==r.seen?.revision;if(w?.ok&&!$){const R=Tt(r.seenChanges,w.result);R&&e.setQueryData(h,R)}if(!v?.ok)throw v?.error??new Error("no cms.index");if(!b)throw new Error("no schema.get");const E=v.result,D=Ve(b),I=b.ok&&!D?b.result:null;if(E.notModified&&!u||I?.notModified&&!r.currentMeta)return tt(e,t,o,s,!1);const m=D?Vt():I?I.notModified?r.currentMeta:I.schema:b.error;m instanceof j||e.setQueryData(f,m);const y=I?I.notModified?r.seen?.schemaVersion:I.version??void 0:void 0,O=e.getQueryData(i)??{};if(E.notModified||$)return e.setQueryData(l,{revision:$?S:r.seen?.revision,schemaVersion:y}),e.setQueryData(i,O),{blocks:O,meta:m};const x={revision:E.revision,resolvedRef:E.resolvedRef,sequence:E.sequence,entries:E.entries,draft:E.draft};e.setQueryData(a,x);const N=!!r.seen?.revision&&x.revision!==r.seen.revision&&(!r.seen.revision.startsWith("s-")||!!u&&mn(u.draft,x.draft));N&&e.setQueryData(g.protocolDraftRead(o.orgSlug,o.virtualMcpId,o.branch),R=>R&&{...R,version:x.revision}),e.setQueryData(l,{revision:x.revision,schemaVersion:y});const p=wn(e,o),k=e.getQueryData(c)??{},P={},Q={},M=[];for(const[R,H]of Object.entries(O)){const J=x.entries[R];!J&&!p.has(R)||(P[R]=H,k[R]!==void 0&&(Q[R]=k[R]),J&&!p.has(R)&&k[R]!==J.version&&M.push(R))}return e.setQueryData(i,P),e.setQueryData(c,Q),M.length>0&&await Fe(e,n,s,M,p),_&&N&&Ws(_,x)&&dn({queryClient:e,orgSlug:o.orgSlug,virtualMcpId:o.virtualMcpId,branch:o.branch,backend:t,cacheKey:s}),{blocks:e.getQueryData(i)??P,meta:m}}function Ws(e,t){if(mn(e.draft,t.draft))return!0;const n=Object.keys(t.entries);return n.length!==Object.keys(e.entries).length?!0:n.some(o=>!Object.hasOwn(e.entries,o)||e.entries[o]?.version!==t.entries[o]?.version)}function mn(e,t){const n=Object.keys(t);return n.length!==Object.keys(e).length?!0:n.some(o=>!Object.hasOwn(e,o)||e[o]?.version!==t[o]?.version)}function Ys(e,t){const n=[...Object.keys(t.set??{}),...t.delete??[]];return Object.fromEntries(n.filter(o=>Object.hasOwn(e,o)).map(o=>[o,e[o]]))}function Ee(e){if(!(e instanceof j)||e.code!==T.Unavailable)return;const t=e.data?.landed;if(!(!t||typeof t!="object"||Array.isArray(t)))return Object.fromEntries(Object.entries(t).filter(n=>typeof n[1]=="string"))}async function Gs(e,t){if(!(e instanceof j)||e.code!==T.Conflict)return;const n=e.data?.entries;if(!n||typeof n!="object")return;const o=Object.entries(n);if(o.length===0)return;const s=t.set??{},r=new Set(t.delete??[]),i={};for(const[a,l]of o){const c=l?.actual;if(typeof c!="string"||(Object.hasOwn(s,a)?await Un(s[a]):r.has(a)?X:void 0)!==c)return;i[a]=c}return i}function zs(e,t){const n=Object.fromEntries(Object.entries(e.set??{}).filter(([s])=>!Object.hasOwn(t,s))),o=(e.delete??[]).filter(s=>!Object.hasOwn(t,s));return{...Object.keys(n).length>0?{set:n}:{},...o.length>0?{delete:o}:{}}}function re(e,t,n,o,s){Y(e),bn(e,t,n,{revision:e.getQueryData(g.contentRevision(n))?.revision??"",versions:s}),ke(e,n,Object.fromEntries(Object.entries(s).map(([r,i])=>[r,i===X?null:i]))),Qt(e,n,s,o.set??{})}async function oi(e,t,n,o,s,r){if(t.source==="github"){const a=[...Object.keys(s.set??{}),...s.delete??[]].filter(c=>!r||!Object.hasOwn(r,c));if(a.length>0)throw new Error(`A hosted save needs a precondition for every block it touches (missing: ${a.join(", ")})`);const l=Ln(s.set);if(l.length>0)throw new Error(`A hosted save can't write a block that isn't loaded (${l.join(", ")})`)}return Ls({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o},{kind:"edit",adopted:t.source==="github",write:async()=>{const i=(f,h=r)=>oe(e,t,n,()=>t.client.blocksApply({set:f.set,delete:f.delete,...h?{ifMatch:Ys(h,f)}:{}}));let a;try{a=await i(s)}catch(f){const h=t.source==="github"?Ee(f):void 0;if(!h)throw f;const u=zs(s,h);Object.keys(h).length>0&&re(e,n,o,s,h);let d;try{d=await i(u)}catch(v){const b=Ee(v);b&&Object.keys(b).length>0&&re(e,n,o,u,b);const w=await Gs(v,u);if(!w)throw v;re(e,n,o,u,w);try{d=await i(u,{...r,...w})}catch(_){const S=Ee(_);throw S&&Object.keys(S).length>0&&re(e,n,o,u,S),_}}a={...d,versions:{...h,...d.versions}}}Y(e);const l=t.source==="github"?bn(e,n,o,a):a.revision;t.source==="github"&&Qt(e,o,a.versions??{},s.set??{}),e.setQueryData(g.contentRevision(o),f=>({...f,revision:l}));const c=a.versions??{};return ke(e,o,c),{revision:l,versions:c}}})}function Sn(e,t){if(!(e instanceof j))return;const n=e.data?.draft;if(!n||typeof n!="object"||!Object.hasOwn(n,t))return;const o=n[t];return o&&typeof o.version=="string"?o:void 0}function yn(e,t,n){if(!(n instanceof j))return;const o=n.data?.draft;if(!(!o||typeof o!="object"))for(const[s,r]of Object.entries(o))r===null&&be(e,t,s,!1)}function kn(e,t,n,o){Y(e),Qn(e,n,o);const s=o.block===null,r=e.getQueryData(g.contentVersions(t)),i=e.getQueryData(g.contentChanges(t)),a=Re(n,e.getQueryData(g.contentIndex(t)),i,r);if(i){const l=B(n),c=Object.fromEntries(Object.entries(i.changes).filter(([f])=>B(f)!==l));s?a!==null&&(c[n]={kind:"delete",version:null,baseVersion:a}):c[n]={kind:"set",version:o.version,baseVersion:a},e.setQueryData(g.contentChanges(t),{...i,changes:c,edited:!0})}be(e,t,n,s&&a===null),e.setQueryData(g.decofile(t),l=>{const c={...l};return s?delete c[n]:c[n]=o.block,c}),ke(e,t,{[n]:s?null:o.version}),so(e,t,n,o)}function si(e,t,n,o){if(t.source!=="github"||!(o instanceof j))return!1;yn(e,n,o);const s=o.data?.draft;if(!s||typeof s!="object")return!1;const r=Object.keys(s),i=r.map(a=>Sn(o,a));return r.length===0||i.some(a=>a===void 0)?!1:(e.cancelQueries({queryKey:g.decofile(n)}),r.forEach((a,l)=>{kn(e,n,a,i[l])}),!0)}async function ri(e,t,n,o,s,r){t.source==="github"&&yn(e,o,r);const i=t.source==="github"?Sn(r,s):void 0;if(i)return e.cancelQueries({queryKey:g.decofile(o)}),kn(e,o,s,i),!0;await e.invalidateQueries({queryKey:g.decofile(o)});let a;try{const c=(await oe(e,t,n,()=>t.client.changesGet({names:[s]}))).entries[s];if(c&&c.after===null&&c.version!==null)return!1;a={value:c?.after??null,version:c?.version??null},t.source==="github"&&e.setQueryData(g.contentChanges(o),f=>{if(!f)return f;const h={...f.changes};return c?.kind?h[s]={kind:c.kind,version:c.version,baseVersion:c.baseVersion}:delete h[s],{...f,changes:h,edited:!0}})}catch{const l=await oe(e,t,n,()=>t.client.blocksList({}));if(l.notModified)return!1;a={value:l.blocks[s]??null,version:l.versions[s]??null}}return e.setQueryData(g.decofile(o),l=>{const c={...l};return a.value===null?delete c[s]:c[s]=a.value,c}),ke(e,o,{[s]:a.version}),!1}function Xs(e){const t=A.c(17),n=Le(e?.virtualMcpId)?.metadata;let o;t[0]!==n?(o=It(n),t[0]=n,t[1]=o):o=t[1];const s=o;let r;t[2]!==e?.branch||t[3]!==e?.orgSlug||t[4]!==e?.virtualMcpId?(r=g.protocolDraftRead(e?.orgSlug??"",e?.virtualMcpId??"",e?.branch??""),t[2]=e?.branch,t[3]=e?.orgSlug,t[4]=e?.virtualMcpId,t[5]=r):r=t[5];let i;t[6]!==e||t[7]!==s?(i=async()=>{const b=await _t(s,e.branch),w=b.pointer?.lastIndexOf("@")??-1;return{draft:b.pointer&&w>0?b.pointer.slice(0,w):null,version:b.pointer&&w>0?b.pointer.slice(w+1):b.etag}},t[6]=e,t[7]=s,t[8]=i):i=t[8];const a=!!e&&!!s;let l;t[9]!==r||t[10]!==i||t[11]!==a?(l={queryKey:r,queryFn:i,enabled:a,staleTime:Number.POSITIVE_INFINITY},t[9]=r,t[10]=i,t[11]=a,t[12]=l):l=t[12];const{data:c,isPending:f,isError:h}=F(l),u=!!e&&!!s&&f&&!h;if(!e||!c?.draft||!c.version){let b;return t[13]!==u?(b={pointer:null,pending:u},t[13]=u,t[14]=b):b=t[14],b}const d=`${c.draft}@${c.version}`;let v;return t[15]!==d?(v={pointer:d,pending:!1},t[15]=d,t[16]=v):v=t[16],v}function ii(e){return Xs(e).pointer}function ai(e){const t=A.c(4);let n;t[0]!==e?(n=g.contentRevision(e),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:Zs,staleTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:s}=F(o);return s?.revision}async function Zs(){throw new Error("content revisions are set by reads and writes")}function nt(e,t){const n=A.c(6),{url:o}=Ht(e?.virtualMcpId),s=se(e?.virtualMcpId,e?.branch);if(!e)return"";let r;return n[0]!==s.cacheKeySuffix||n[1]!==s.kind||n[2]!==o||n[3]!==t?.tunnel||n[4]!==e?(r=s.kind!=="legacy"&&s.cacheKeySuffix!==void 0?xe({...e,protocolSuffix:s.cacheKeySuffix}):xe({...e,localPreviewUrl:t?.tunnel===!1?null:o}),n[0]=s.cacheKeySuffix,n[1]=s.kind,n[2]=o,n[3]=t?.tunnel,n[4]=e,n[5]=r):r=n[5],r}function ci(e,t){const n=A.c(46),{url:o}=Ht(e?.virtualMcpId),s=!!o,r=se(e?.virtualMcpId,e?.branch),i=r.kind==="protocol"?r:null,a=nt(e),l=t?.fetchEnabled??!0,c=cs(e?.virtualMcpId),f=$t(e?.virtualMcpId).runtime==="cms",h=Z();let u;n[0]!==a?(u=g.decofile(a),n[0]=a,n[1]=u):u=n[1];const d=u;Cs(i,i&&e?e:null,a);let v;n[2]!==e||n[3]!==h||n[4]!==d?(v=()=>{if(!e||h.isMutating({mutationKey:me(e.orgSlug,e.virtualMcpId,e.branch)})>0)return!0;const k=h.getQueryState(d);return k?.fetchStatus==="fetching"||Date.now()-(k?.dataUpdatedAt??0)<Wt/2},n[2]=e,n[3]=h,n[4]=d,n[5]=v):v=n[5];let b;n[6]!==f||n[7]!==s||n[8]!==e||n[9]!==i||n[10]!==h||n[11]!==d?(b=async()=>{if(e){if(!i&&f&&!s){const k=Wo(h,e)?.version;if(k&&!await Yo(e,k))return}await h.refetchQueries({queryKey:d,exact:!0},{cancelRefetch:!1})}},n[6]=f,n[7]=s,n[8]=e,n[9]=i,n[10]=h,n[11]=d,n[12]=b):b=n[12];let w;n[13]!==v||n[14]!==b?(w={skip:v,read:b},n[13]=v,n[14]=b,n[15]=w):w=n[15],es(!!t?.pollWhile&&!!e,w);const _=Ce(i?.hosted?a:"");let S;n[16]!==r.kind||n[17]!==f||n[18]!==l||n[19]!==a||n[20]!==s||n[21]!==o||n[22]!==c||n[23]!==e||n[24]!==i||n[25]!==h?(S=async()=>{if(i)return(await pn(h,i,e,a)).blocks;if(r.kind==="unavailable")throw Bs("decofile");if(s){const M=await fetch(new URL("/.decofile",o).toString(),{cache:"no-store"}).catch(qs),U=M?.ok?wt(await M.text()):null;if(U)return U;const R=new Error("decofile unavailable (local tunnel unreachable)");throw R.status=502,R}if(f)return zo(h,e);const k=()=>as(e,Co(c,".deco/blocks.gen.json"));if(l){const M=await fetch(ss(e),{cache:"no-store"}).catch(Ks);if(M?.ok){const H=wt(await M.text());if(H)return H}const U=await k();if(U.kind==="data")return U.data;const R=new Error(`Failed to fetch decofile: ${M?.status??"network error"}`);throw R.status=mt({liveOk:!!M?.ok,liveStatus:M?.status,committedAbsent:U.kind==="absent"}),R}const P=await k();if(P.kind==="data")return P.data;const Q=new Error("decofile unavailable (preview down, no committed snapshot)");throw Q.status=mt({liveOk:!1,committedAbsent:P.kind==="absent"}),Q},n[16]=r.kind,n[17]=f,n[18]=l,n[19]=a,n[20]=s,n[21]=o,n[22]=c,n[23]=e,n[24]=i,n[25]=h,n[26]=S):S=n[26];const $=!!e&&r.kind!=="pending",E=i?0:3e4,D=i?.describe.pollIntervalMs,I=i?"always":void 0;let m;n[27]!==f||n[28]!==s||n[29]!==i?(m=(k,P)=>{if(i||f||s)return k<3;const Q=P.status;return Q!==502&&Q!==404&&k<2},n[27]=f,n[28]=s,n[29]=i,n[30]=m):m=n[30];let y;n[31]!==d||n[32]!==S||n[33]!==$||n[34]!==E||n[35]!==D||n[36]!==I||n[37]!==m?(y={queryKey:d,queryFn:S,enabled:$,staleTime:E,refetchInterval:D,refetchIntervalInBackground:!1,refetchOnWindowFocus:I,retry:m,retryDelay:Fo},n[31]=d,n[32]=S,n[33]=$,n[34]=E,n[35]=D,n[36]=I,n[37]=m,n[38]=y):y=n[38];const O=F(y);let x;n[39]!==_||n[40]!==O?(x=_&&O.data?to(_,O.data):void 0,n[39]=_,n[40]=O,n[41]=x):x=n[41];const N=x;let p;return n[42]!==N||n[43]!==i?.hosted||n[44]!==O?(p=i?.hosted&&N?{...O,data:N}:O,n[42]=N,n[43]=i?.hosted,n[44]=O,n[45]=p):p=n[45],p}function Ks(){return null}function qs(){return null}function li(e,t,n){return Qo(e,t,n)}function ui(e){const t=A.c(4),n=Z(),o=se(e?.virtualMcpId,e?.branch),s=nt(e),r=o.kind==="protocol"?o.hosted:void 0;let i;return t[0]!==s||t[1]!==n||t[2]!==r?(i=(a,l)=>ro(n,r,s,a,l),t[0]=s,t[1]=n,t[2]=r,t[3]=i):i=t[3],i}function fi(e,t){const n=A.c(3),o=se(e?.virtualMcpId,e?.branch),s=nt(e),r=Ce(o.kind==="protocol"&&o.hosted?s:"");let i;return n[0]!==r?.entries||n[1]!==t?(i=Object.entries(r?.entries??{}).filter(a=>{const[,l]=a;return t(l.meta?.type??"")}).map(er),n[0]=r?.entries,n[1]=t,n[2]=i):i=n[2],i}function er(e){const[t]=e;return t}const tr="site-editor-save",On={id:tr,description:void 0,action:void 0,cancel:void 0},di="site-editor-undo",Ne="site-editor-publish";function nr(e){const t=A.c(7),{label:n,detail:o}=e;let s;t[0]!==n?(s=z.jsx("summary",{className:"cursor-pointer select-none text-muted-foreground",children:n}),t[0]=n,t[1]=s):s=t[1];let r;t[2]!==o?(r=z.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-muted-foreground",children:o}),t[2]=o,t[3]=r):r=t[3];let i;return t[4]!==s||t[5]!==r?(i=z.jsxs("details",{className:"mt-1 text-xs",children:[s,r]}),t[4]=s,t[5]=r,t[6]=i):i=t[6],i}function En(e,t){return t?z.jsx(nr,{label:e("siteEditor.details"),detail:t}):void 0}function hi(e,t,n){te.error(Kt(e,t,n),{...On,description:En(e,ls(t,n))})}function gi(e,t,n=!1){te.info(e(t?"sectionsEditor.reconcile.leftDeleted":"sectionsEditor.reconcile.keptTheirs"),{...On,description:e(t?n?"sectionsEditor.reconcile.leftDeletedNeverPublishedHint":"sectionsEditor.reconcile.leftDeletedHint":"sectionsEditor.reconcile.keptTheirsHint")})}const Dn={action:void 0,duration:void 0};function vi(e,t){te.success(t?e("siteEditor.publish.publishedOn",{host:t}):e("siteEditor.publish.published"),{...Dn,id:Ne,description:void 0})}function bi(e,{headline:t,body:n,detail:o,retry:s,pending:r,tone:i="error"}){const a=En(e,o??null);te[i](t,{id:Ne,description:n&&a?z.jsxs(z.Fragment,{children:[z.jsx("p",{children:n}),a]}):n??a,action:s?{label:e("siteEditor.tryAgain"),onClick:l=>{l.preventDefault(),te.loading(r??e("thread.publishPopover.publishing"),{...Dn,id:Ne,description:void 0}),s()}}:void 0,duration:s?Number.POSITIVE_INFINITY:void 0})}function wi(e){return e instanceof Error?e.message||null:e==null?null:String(e)}export{Ho as $,Ds as A,ws as B,as as C,Ft as D,Br as E,yr as F,Xs as G,W as H,Ps as I,Yr as J,Hr as K,de as L,ys as M,ks as N,jr as O,Jr as P,Mr as Q,Xr as R,zr as S,Ut as T,Qs as U,ai as V,Qr as W,Vo as X,me as Y,Ls as Z,is as _,pr as a,vo as a0,Ao as a1,Dr as a2,dt as a3,ht as a4,Ir as a5,Sr as a6,Or as a7,Gn as a8,En as a9,ei as aA,Kr as aB,ni as aC,Jo as aD,xr as aE,Ke as aF,_r as aG,ii as aH,Lr as aI,si as aJ,ee as aK,Ar as aL,bi as aM,di as aN,On as aO,Fe as aP,wn as aQ,to as aR,Ur as aS,Tr as aT,Fr as aU,Cr as aV,Vr as aW,wi as aa,ms as ab,hn as ac,nr as ad,Gr as ae,Wr as af,Qo as ag,os as ah,pn as ai,Bs as aj,Fo as ak,Pr as al,Ne as am,Dn as an,vi as ao,Zr as ap,gi as aq,ti as ar,Nr as as,Ge as at,$r as au,Hs as av,Ze as aw,oi as ax,ri as ay,hi as az,go as b,Ht as c,ui as d,wr as e,fi as f,qr as g,kr as h,mr as i,ci as j,li as k,Yn as l,zn as m,Nt as n,jo as o,gr as p,Rr as q,br as r,vr as s,ts as t,se as u,nt as v,Er as w,cs as x,Co as y,Es as z};
@@ -1 +0,0 @@
1
- import{b as ee,a6 as te,q as ne,r as E,j as t,B as Q,n as F,e0 as ae,a7 as ce,aP as me,aO as pe,aL as de,aJ as ue,aK as ge,aN as fe,aM as he,b9 as xe,t as C,dO as je,c as se,m as ke,_ as ve,X as ye,Z as Se,Y as be,K as G,gG as Ce}from"./index-C6-0Ff1m.js";import{a as De}from"./SwitchHorizontal01-BSGnkDXI.js";import{D as we}from"./agent-icon-SasBmPrY.js";import{s as Ne}from"./Trash01-DXQWI50A.js";import{i as Pe}from"./Upload01-BXiTGuBV.js";import{i as ie}from"./Zap-QnlW2BG3.js";import{S as Ae}from"./search-toggle-DeMaHCKK.js";import{E as Y}from"./empty-state-BnFVKQvv.js";import{C as Ee}from"./collection-tabs-CpA2E5BB.js";import{S as Me,F as Oe}from"./folder-icon-Wp7wbxIQ.js";import{j as Te,k as Ie,n as Re}from"./use-org-fs-C4V7-QNj.js";import{a7 as ze,R as Z,Z as $e}from"./chat-context-BXxmldjV.js";import{c as _e}from"./context-shell-547AgBrw.js";import"./AlertCircle-CYAsQRdT.js";import"./UserCheck01-DLUgjW3m.js";import"./Tool01-BpBS8dw-.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"./UserSquare-a_XazovD.js";import"./LinkBroken01-BxVMIk5A.js";import"./CreditCard01-W8t7hmzJ.js";import"./File02-o8s5093L.js";import"./MessageCircle01-D1dT92x6.js";import"./Eye-nqlQ004P.js";import"./Fingerprint04-DY8McBak.js";import"./Image01-DZmu7hyy.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"./Users01-BpOXj9ap.js";import"./XClose-DxbjiApV.js";import"./icon-button-8qhGM4eg.js";import"./tooltip-BnL5r8Gv.js";import"./index-ZdVMGNX_.js";import"./badge-BcMIPtVj.js";import"./markdown-5RMcvWqV.js";import"./use-copy-BRwsGSGM.js";import"./use-mobile-IMVhNYT_.js";import"./use-panel-navigate-CkYTugDF.js";import"./thread-route-DY_UV0gu.js";import"./use-project-scope-DwQViH2f.js";import"./repository-binding-Do6sAdct.js";import"./use-mcp-client-Bg8mQo9f.js";import"./auth-C---Zkvq.js";import"./task-board-DNboqZMy.js";import"./schema-DiSJ8SEc.js";import"./file-preview-CC2pttDX.js";import"./utils-CalvUBc1.js";import"./editor-BR1a7qGD.js";import"./file-type-icon-nU6c9OQr.js";import"./useInfiniteQuery-B5jgBAwp.js";import"./infiniteQueryObserver-CiZgrwb3.js";import"./use-view-draft-kind-DrDbO3-P.js";import"./use-blog-view-BHifDign.js";import"./use-organization-settings-BmAIEgEL.js";import"./thread-intent-j3i3V7mR.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-ai-providers-pXYGEzkI.js";import"./use-current-view-0HWp9lHl.js";import"./use-in-settings-DxzX6GVb.js";import"./use-decopilot-events-B1JmbrrX.js";import"./require-capability-DdgYI50p.js";import"./access-gate-BvopvGmx.js";import"./capability-load-error-CZr_hpNK.js";import"./sections-BCyCfgtK.js";import"./textarea-C3LFFo0w.js";import"./use-ask-in-chat-B6pTgaei.js";import"./shell-layout-CuBXiCpv.js";import"./use-deployment-admin-KnQTKRss.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-DOVWyuaL.js";import"./command-CjjWneJ9.js";import"./index-BPvQqOSy.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"./label-Cq7ohFeR.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"./drawer-JbzUShND.js";import"./required-auth-layout-BwuuU3bJ.js";import"./use-org-sso-D7w6nhfD.js";const J=200,Fe=new Set(["node_modules","__pycache__"]);function H(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return H(s).split("/").every(e=>!e.startsWith(".")&&!Fe.has(e))}function Be(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ke(s,e){const i=new Map;for(const o of s){const c=H(o).split("/");c.pop();const a=["skills",e,...c].join("/");i.set(a,[...i.get(a)??[],o])}return i}async function qe(s,e){const o=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(o)throw o.reason}function Ge(s,e){const i=_e(e),o=`skills/${s}`;return{id:`home/${o}`,name:i.name??s,description:i.description,disableModelInvocation:i.disableModelInvocation,source:"home",volume:Z,path:o,sandboxPath:`${ze}/${Z}/${o}`}}const L="*";function B(s){return s.volume==="home"}function re(s,e){const i=s.indexOf(":");return i===-1?{label:e,glyph:ie}:{label:s.slice(i+1),glyph:s.startsWith("repo:")?je:we}}function Qe(s){const e=se.c(48),{entry:i,pending:o,onOpen:c,onDelete:a}=s,n=ee(),{org:g}=te();let M;e[0]!==i.source||e[1]!==g.name?(M=re(i.source,g.name),e[0]=i.source,e[1]=g.name,e[2]=M):M=e[2];const{label:O,glyph:I}=M;let D;e[3]!==i?(D=B(i),e[3]=i,e[4]=D):D=e[4];const R=D,w=o?"opacity-60":"hover:bg-accent";let f;e[5]!==w?(f=ke("relative transition-colors group overflow-hidden flex flex-col h-full",w),e[5]=w,e[6]=f):f=e[6];let m;e[7]!==i.name||e[8]!==c||e[9]!==o?(m=!o&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":i.name}),e[7]=i.name,e[8]=c,e[9]=o,e[10]=m):m=e[10];const N=R?"default":"system",z=!R;let h;e[11]!==I||e[12]!==N||e[13]!==z?(h=t.jsx(Oe,{glyph:I,tone:N,readOnly:z,className:"size-8 shrink-0"}),e[11]=I,e[12]=N,e[13]=z,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==n?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ve,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"icon",children:t.jsx(De,{size:16})})}),t.jsx(Se,{align:"end",children:t.jsxs(be,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(Ne,{size:16}),n("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=n,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==i.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.name}),e[21]=i.name,e[22]=b):b=e[22];let k;e[23]!==i.description||e[24]!==n?(k=i.description||n("settings.skills.noDescription"),e[23]=i.description,e[24]=n,e[25]=k):k=e[25];let p;e[26]!==k?(p=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=p):p=e[27];let v;e[28]!==b||e[29]!==p?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,p]}),e[28]=b,e[29]=p,e[30]=v):v=e[30];let d;e[31]!==j||e[32]!==v?(d=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=d):d=e[33];let y;e[34]!==O||e[35]!==o||e[36]!==n?(y=o?n("settings.skills.importing"):O,e[34]=O,e[35]=o,e[36]=n,e[37]=y):y=e[37];let u;e[38]!==y?(u=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=u):u=e[39];let S;e[40]!==d||e[41]!==u?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[d,u]}),e[40]=d,e[41]=u,e[42]=S):S=e[42];let T;return e[43]!==o||e[44]!==S||e[45]!==f||e[46]!==m?(T=t.jsxs(Ce,{size:"flush","aria-busy":o,className:f,children:[m,S]}),e[43]=o,e[44]=S,e[45]=f,e[46]=m,e[47]=T):T=e[47],T}function V(s){const e=se.c(2),{children:i}=s;let o;return e[0]!==i?(o=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:i}),e[0]=i,e[1]=o):o=e[1],o}function qs(){const s=ee(),{org:e}=te(),i=Te(),{remove:o,upload:c}=Ie("home"),a=ne(),n=E.useRef(null),[g,M]=E.useState(""),[O,I]=E.useState(L),[D,R]=E.useState(!1),[w,f]=E.useState(null),[m,N]=E.useState(null),[z,h]=E.useState(null),x=()=>{a.invalidateQueries({queryKey:G.slashSkills(e.id)}),a.invalidateQueries({queryKey:G.orgFsSkills(e.id)})},j=r=>a.setQueryData(G.slashSkills(e.id),l=>r(l??[]));async function b(r){const l=[...r??[]];if(n.current&&(n.current.value=""),l.length===0)return;const P=l[0]?.webkitRelativePath??"";if(!P){C.error(s("settings.skills.importNeedsFolder"));return}const q=P.split("/")[0]??"",_=l.filter(Le),U=_.find(A=>H(A)==="SKILL.md");if(!U){C.error(s("settings.skills.importMissingSkillMd"));return}if(_.length>J){C.error(s("settings.skills.importTooManyFiles",{count:String(_.length),max:String(J)}));return}const $=Be(q),X=`skills/${$}`;let W=!1;R(!0);try{if(await Re(e.slug,"home",X)){C.error(s("settings.skills.importSlugTaken",{slug:$}));return}W=!0;const A=Ge($,await U.text());j(le=>[A,...le]),h(A.id),await qe(Ke(_,$),c.mutateAsync),C.success(s("settings.skills.importSuccess",{name:$}))}catch(A){W&&await o.mutateAsync(X).catch(()=>{}),C.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),R(!1)}}const k=g.toLowerCase(),p=(i.data??[]).filter(r=>r.name.toLowerCase().includes(k)||(r.description??"").toLowerCase().includes(k)).sort((r,l)=>Number(B(l))-Number(B(r))||r.name.localeCompare(l.name)),v=new Set((i.data??[]).map(r=>r.source)),d=new Map;for(const r of p)d.set(r.source,(d.get(r.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:p.length},...[...v].map(r=>({id:r,label:re(r,e.name).label,count:d.get(r)??0}))],u=v.has(O)?O:L,S=u===L?p:p.filter(r=>r.source===u),T=r=>f($e(r.volume,r.path)),K=async()=>{if(!m)return;const{id:r,path:l}=m;N(null),j(P=>P.filter(q=>q.id!==r));try{await o.mutateAsync(l),C.success(s("settings.skills.deleteSuccess"))}catch(P){C.error(P instanceof Error?P.message:s("settings.skills.deleteError"))}finally{x()}},oe=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>n.current?.click(),children:[t.jsx(Pe,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(F,{children:[t.jsx(F.Content,{children:t.jsx(F.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(F.Actions,{secondary:t.jsx(Ae,{value:g,onChange:M,label:s("library.context.search"),placeholder:s("settings.skills.searchPlaceholder"),clearLabel:s("library.library.clearSearch")}),children:oe}),t.jsx("input",{ref:n,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:r=>{b(r.target.files)}}),y.length>2&&t.jsx(Ee,{placement:"page",tabs:y,activeTab:u,onTabChange:I}),i.isPending?t.jsx("div",{className:"@container",children:t.jsx(V,{children:Array.from({length:8},(r,l)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},l))})}):i.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:i.error instanceof Error?i.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{i.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(V,{children:S.map(r=>{const l=r.id===z;return t.jsx(Qe,{entry:r,pending:l,onOpen:()=>T(r),onDelete:B(r)&&!l?()=>N(r):void 0},r.id)})})})]})})}),w&&t.jsx(Me,{skillPath:w,onClose:()=>f(null)},w),t.jsx(me,{open:m!==null,onOpenChange:r=>!r&&N(null),children:t.jsxs(pe,{children:[t.jsxs(de,{children:[t.jsx(ue,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(ge,{children:s("settings.skills.deleteDialogDescription",{name:m?.name??""})})]}),t.jsxs(fe,{children:[t.jsx(he,{children:s("settings.skills.cancel")}),t.jsx(xe,{onClick:K,variant:"destructive",children:s("settings.skills.deleteButton")})]})]})})]})}export{qs as default};
@@ -1 +0,0 @@
1
- import{c as l,a6 as n,j as r,K as f}from"./index-C6-0Ff1m.js";import{ChatLayout as d}from"./index-bfIJKw2l.js";import{m as u,P as x,T as h}from"./mock-board-Y-hiGSHf.js";import{F as j}from"./feature-gate-BfrcuviK.js";import"./use-mobile-IMVhNYT_.js";import"./tooltip-BnL5r8Gv.js";import"./index-ZdVMGNX_.js";import"./MessageCircle01-D1dT92x6.js";import"./XClose-DxbjiApV.js";import"./thread-button-CrjY15ns.js";import"./use-sidebar-collapsed-CvPku1YI.js";import"./sheet-XJvcudCi.js";import"./use-chat-layout-state-BNCeIaIM.js";import"./use-panel-navigate-CkYTugDF.js";import"./thread-route-DY_UV0gu.js";import"./use-project-scope-DwQViH2f.js";import"./repository-binding-Do6sAdct.js";import"./use-mcp-client-Bg8mQo9f.js";import"./auth-C---Zkvq.js";import"./toolbar-icon-button-CEZ74wIz.js";import"./use-in-settings-DxzX6GVb.js";import"./resizable-DbjoRAK-.js";import"./route-page-header-D8CuFczr.js";import"./LayoutLeft-BSo5LCFE.js";import"./use-current-view-0HWp9lHl.js";import"./task-key-DgbGUF2j.js";import"./sortable.esm-BulVoRsH.js";import"./use-task-board-analytics-pNXfpx7q.js";import"./combobox-3XSCcZHm.js";import"./ChevronSelectorVertical-CmQsMnAL.js";import"./command-CjjWneJ9.js";import"./index-BPvQqOSy.js";import"./SearchMd-Cw05gj7E.js";import"./popover-DTBVeUtG.js";import"./agent-icon-SasBmPrY.js";import"./AlertCircle-CYAsQRdT.js";import"./UserCheck01-DLUgjW3m.js";import"./Tool01-BpBS8dw-.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"./ChevronUp-DGDvzrMe.js";import"./UserSquare-a_XazovD.js";import"./LinkBroken01-BxVMIk5A.js";import"./CreditCard01-W8t7hmzJ.js";import"./File02-o8s5093L.js";import"./SwitchHorizontal01-BSGnkDXI.js";import"./Eye-nqlQ004P.js";import"./Fingerprint04-DY8McBak.js";import"./Image01-DZmu7hyy.js";import"./Key01-CSQOqmIz.js";import"./Minus-D2jrgo3d.js";import"./Monitor01-COmDHQ1j.js";import"./Sun-Bji8LMRX.js";import"./Play-JVQd8C8L.js";import"./Plus-CF8KlFVc.js";import"./ShoppingBag01-Cc2EJvA-.js";import"./Trash01-DXQWI50A.js";import"./Upload01-BXiTGuBV.js";import"./Users01-BpOXj9ap.js";import"./Zap-QnlW2BG3.js";import"./use-task-board-prompts-DYeH1UKB.js";import"./badge-BcMIPtVj.js";import"./icon-button-8qhGM4eg.js";import"./use-org-fs-C4V7-QNj.js";import"./useInfiniteQuery-B5jgBAwp.js";import"./infiniteQueryObserver-CiZgrwb3.js";import"./use-automations-D6sS4b2K.js";import"./task-board-DNboqZMy.js";import"./schema-DiSJ8SEc.js";import"./watch-sse-pool-DdE7kwP2.js";import"./backoff-CrEUbyZT.js";import"./search-toggle-DeMaHCKK.js";import"./context-menu-B1dAG0Wr.js";import"./super-agent-icon-VandTz-0.js";import"./daily-pulse-aiJY3gnz.js";import"./config-DMRaGUqI.js";import"./new-project-dialog-Ch6wUMKc.js";import"./label-Cq7ohFeR.js";import"./use-navigate-to-agent-WJ7w-8ZZ.js";import"./thread-intent-j3i3V7mR.js";import"./delay-CnY5UFtP.js";import"./session-runtime-fXa5psFL.js";import"./repository-picker-B9qWS0uH.js";import"./github-icon-hFwcbgKP.js";import"./collection-search-ioGjJlri.js";import"./use-debounced-value-Dw3dFt4C.js";import"./use-organization-settings-BmAIEgEL.js";import"./new-project-store-BJVEZe7t.js";import"./use-task-board-items-CygST8NV.js";import"./use-decopilot-events-B1JmbrrX.js";import"./sprints-C1z9xhcL.js";import"./select-Chdk1xe9.js";import"./index-BdQq_4o_.js";import"./use-tags-B-VIOJFl.js";import"./feedback-BqoIMOg7.js";import"./task-route-DUKKS-kP.js";import"./project-index-I2IwZ_L4.js";import"./calendar-oyktWjjy.js";import"./alert-PbrLNRQ0.js";import"./collapsible-B8lX7LSm.js";import"./use-copy-BRwsGSGM.js";import"./markdown-5RMcvWqV.js";import"./chat-context-BXxmldjV.js";import"./use-view-draft-kind-DrDbO3-P.js";import"./use-blog-view-BHifDign.js";import"./use-entitlements-DIoZnc_q.js";import"./use-ai-providers-pXYGEzkI.js";import"./index-DHE6Gmv8.js";import"./usage-stats-DX8XXFQ9.js";import"./utils-CVEq3hMx.js";import"./gateway-client-BQlD2psO.js";import"./form-Dx1EBvxh.js";import"./editor-classes-D4G_DIGw.js";import"./suggestion-DoHjrPPW.js";import"./index-ByOLAuLS.js";import"./index-MxNSCTK9.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-CXo3bcGf.js";import"./use-connection-D5_bE1jX.js";import"./project-icon-CGc9ojaV.js";import"./github-repo-scope-C58hYmYC.js";import"./thread-sheet-body-DE05uWNv.js";import"./useSuspenseInfiniteQuery-D3Nn_2Nf.js";import"./pair-BKCcX4sy.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"./legacy-admin-welcome-dialog-Cdla_zr3.js";import"./drawer-JbzUShND.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"./use-mcp-prompts-DPiL3LQv.js";import"./use-thread-outputs-U0o_TC58.js";import"./file-type-icon-nU6c9OQr.js";import"./use-infinite-scroll-DZHKJp2V.js";import"./task-status-BadjzsyY.js";import"./separator-CnEC83tf.js";import"./chat-draft-Bu5orWL5.js";import"./feature-paywall-DNnv958-.js";import"./plan-ladder-DDAcm-ji.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function lr(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{lr as default};
@@ -1 +0,0 @@
1
- import{c as D,i as ue,f as ye,r as V,K as fe,an as pe,cJ as Ne,b as ee,j as l,h as Ae,a6 as be,a0 as _e,T as Ce}from"./index-C6-0Ff1m.js";import{ChatLayout as se}from"./index-bfIJKw2l.js";import{S as we}from"./analytics-sections-DWAL7IVe.js";import{e as ke}from"./watch-sse-pool-DdE7kwP2.js";import{B as Ee}from"./badge-BcMIPtVj.js";import{C as Le}from"./combobox-3XSCcZHm.js";import{S as ae,b as oe,a as ne,d as ce,c as Z}from"./select-Chdk1xe9.js";import{e as Re,a as Oe,b as Se,T as F,d as Ie,c as q}from"./table-Dqj9d5ax.js";import{T as le,a as $e,c as re,b as De}from"./tabs-CT50lxBB.js";import{c as Be,S as He,a as Ke,b as Pe}from"./sheet-XJvcudCi.js";import{T as Fe}from"./thread-sheet-body-DE05uWNv.js";import{b as qe}from"./use-connection-D5_bE1jX.js";import{u as Ve}from"./use-mcp-client-Bg8mQo9f.js";import{u as Ye}from"./repository-binding-Do6sAdct.js";import"./use-mobile-IMVhNYT_.js";import"./tooltip-BnL5r8Gv.js";import"./index-ZdVMGNX_.js";import"./MessageCircle01-D1dT92x6.js";import"./XClose-DxbjiApV.js";import"./thread-button-CrjY15ns.js";import"./use-sidebar-collapsed-CvPku1YI.js";import"./use-chat-layout-state-BNCeIaIM.js";import"./use-panel-navigate-CkYTugDF.js";import"./thread-route-DY_UV0gu.js";import"./use-project-scope-DwQViH2f.js";import"./toolbar-icon-button-CEZ74wIz.js";import"./use-in-settings-DxzX6GVb.js";import"./resizable-DbjoRAK-.js";import"./route-page-header-D8CuFczr.js";import"./LayoutLeft-BSo5LCFE.js";import"./use-current-view-0HWp9lHl.js";import"./auth-C---Zkvq.js";import"./chart-L_rdD8Fy.js";import"./CategoricalChart-DfjY1woJ.js";import"./index-CMjqNIsi.js";import"./tooltipContext-DvsqpzJf.js";import"./CartesianChart-BxFiyXVM.js";import"./AlertCircle-CYAsQRdT.js";import"./ArrowUp-CsFg9VL2.js";import"./UserCheck01-DLUgjW3m.js";import"./toggle-group-CbJrGPYf.js";import"./active-indicator-CCMhAsc_.js";import"./config-DMRaGUqI.js";import"./task-key-DgbGUF2j.js";import"./CheckCircle-BB00e9u8.js";import"./Eye-nqlQ004P.js";import"./task-board-DNboqZMy.js";import"./schema-DiSJ8SEc.js";import"./AreaChart-WJ2lLKy4.js";import"./backoff-CrEUbyZT.js";import"./ChevronSelectorVertical-CmQsMnAL.js";import"./command-CjjWneJ9.js";import"./index-BPvQqOSy.js";import"./SearchMd-Cw05gj7E.js";import"./popover-DTBVeUtG.js";import"./index-BdQq_4o_.js";import"./ChevronDown-CD0tZl8C.js";import"./ChevronUp-DGDvzrMe.js";import"./useSuspenseInfiniteQuery-D3Nn_2Nf.js";import"./infiniteQueryObserver-CiZgrwb3.js";import"./LinkBroken01-BxVMIk5A.js";import"./pair-BKCcX4sy.js";import"./agent-icon-SasBmPrY.js";import"./Tool01-BpBS8dw-.js";import"./ArrowLeft-zHVY_XX0.js";import"./ArrowRight-B6vgPWbg.js";import"./BookOpen01-AamEOlRO.js";import"./Globe04-OZ9xS3Lx.js";import"./TrendUp01-CdeGaAD9.js";import"./UserSquare-a_XazovD.js";import"./CreditCard01-W8t7hmzJ.js";import"./File02-o8s5093L.js";import"./SwitchHorizontal01-BSGnkDXI.js";import"./Fingerprint04-DY8McBak.js";import"./Image01-DZmu7hyy.js";import"./Key01-CSQOqmIz.js";import"./Minus-D2jrgo3d.js";import"./Monitor01-COmDHQ1j.js";import"./Sun-Bji8LMRX.js";import"./Play-JVQd8C8L.js";import"./Plus-CF8KlFVc.js";import"./ShoppingBag01-Cc2EJvA-.js";import"./Trash01-DXQWI50A.js";import"./Upload01-BXiTGuBV.js";import"./Users01-BpOXj9ap.js";import"./Zap-QnlW2BG3.js";import"./collapsible-B8lX7LSm.js";import"./use-copy-BRwsGSGM.js";import"./usage-stats-DX8XXFQ9.js";import"./utils-CVEq3hMx.js";import"./markdown-5RMcvWqV.js";import"./chat-context-BXxmldjV.js";import"./use-view-draft-kind-DrDbO3-P.js";import"./use-blog-view-BHifDign.js";import"./use-organization-settings-BmAIEgEL.js";import"./thread-intent-j3i3V7mR.js";import"./delay-CnY5UFtP.js";import"./session-runtime-fXa5psFL.js";import"./use-entitlements-DIoZnc_q.js";import"./use-ai-providers-pXYGEzkI.js";import"./use-decopilot-events-B1JmbrrX.js";import"./gateway-client-BQlD2psO.js";import"./form-Dx1EBvxh.js";import"./label-Cq7ohFeR.js";import"./use-task-board-items-CygST8NV.js";import"./task-route-DUKKS-kP.js";import"./project-index-I2IwZ_L4.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"./useInfiniteQuery-B5jgBAwp.js";import"./collection-search-ioGjJlri.js";import"./new-project-store-BJVEZe7t.js";import"./legacy-admin-welcome-dialog-Cdla_zr3.js";import"./drawer-JbzUShND.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"./use-mcp-prompts-DPiL3LQv.js";import"./use-thread-outputs-U0o_TC58.js";import"./file-type-icon-nU6c9OQr.js";import"./use-infinite-scroll-DZHKJp2V.js";import"./task-status-BadjzsyY.js";function xe(){return ye({strict:!1}).org??""}function Me(){const t=D.c(8),e=xe();let s;t[0]!==e?(s=fe.threadAnalyticsOrgs(e),t[0]=e,t[1]=s):s=t[1];const r=!!e;let i;t[2]!==e?(i=()=>pe(e,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=e,t[3]=i):i=t[3];let o;return t[4]!==s||t[5]!==r||t[6]!==i?(o={queryKey:s,enabled:r,queryFn:i,staleTime:3e5},t[4]=s,t[5]=r,t[6]=i,t[7]=o):o=t[7],ue(o)}const Ue=3e3,me=new Map,ge=new Map;function ze(t){let e=ge.get(t);return e||(e=s=>{let r=null;const i=()=>{r||(r=setTimeout(()=>{r=null,me.set(t,(me.get(t)??0)+1),s()},Ue))},o=ke.subscribe(t,i,i);return()=>{r&&clearTimeout(r),o()}},ge.set(t,e)),e}function Ge(t,e){const s=D.c(5);let r;s[0]!==e||s[1]!==t?(r=ze(t),s[0]=e,s[1]=t,s[2]=r):r=s[2];let i;return s[3]!==t?(i=()=>me.get(t)??0,s[3]=t,s[4]=i):i=s[4],V.useSyncExternalStore(r,i)}function We(t,e){const s=D.c(11),r=xe(),i=Ge(r,e);let o;s[0]!==t||s[1]!==r||s[2]!==i?(o=fe.threadAnalytics(r,"live",t,i),s[0]=t,s[1]=r,s[2]=i,s[3]=o):o=s[3];const a=!!r;let c;s[4]!==t||s[5]!==r?(c=()=>pe(r,"THREAD_ANALYTICS_LIVE",t),s[4]=t,s[5]=r,s[6]=c):c=s[6];let n;return s[7]!==o||s[8]!==a||s[9]!==c?(n={queryKey:o,enabled:a,queryFn:c,placeholderData:Ne},s[7]=o,s[8]=a,s[9]=c,s[10]=n):n=s[10],ue(n)}function Je(t,e){const s=D.c(12),r=xe();let i;s[0]!==e||s[1]!==r||s[2]!==t?(i=fe.threadAnalytics(r,t,e,0),s[0]=e,s[1]=r,s[2]=t,s[3]=i):i=s[3];const o=!!r;let a;s[4]!==e||s[5]!==r||s[6]!==t?(a=()=>pe(r,t,e),s[4]=e,s[5]=r,s[6]=t,s[7]=a):a=s[7];let c;return s[8]!==i||s[9]!==o||s[10]!==a?(c={queryKey:i,enabled:o,queryFn:a},s[8]=i,s[9]=o,s[10]=a,s[11]=c):c=s[11],ue(c)}const Qe=[1,7,30,90],Xe=["in_progress","requires_action","failed","completed"],Ze=["chat","automation","task"],X="any",de={in_progress:"thread.analytics.statusRunning",requires_action:"thread.analytics.statusWaiting",failed:"thread.analytics.statusFailed",completed:"thread.analytics.statusCompleted"},ve={chat:"thread.analytics.kindChat",automation:"thread.analytics.kindAutomation",task:"thread.analytics.kindTask"},et={in_progress:"default",requires_action:"warning",failed:"destructive",completed:"secondary"};function he(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx("div",{className:"flex justify-center py-12",children:l.jsx(Ae,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function Te(t){const e=D.c(2),{message:s}=t;let r;return e[0]!==s?(r=l.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-destructive",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ie(t){const e=D.c(9),{label:s,value:r}=t;let i;e[0]!==s?(i=l.jsx("div",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=i):i=e[1];let o;e[2]!==r?(o=r.toLocaleString(),e[2]=r,e[3]=o):o=e[3];let a;e[4]!==o?(a=l.jsx("div",{className:"mt-1 text-2xl font-medium text-foreground tabular-nums",children:o}),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==a?(c=l.jsxs("div",{className:"rounded-lg border border-border p-4",children:[i,a]}),e[6]=i,e[7]=a,e[8]=c):c=e[8],c}function tt(t){const e=D.c(56),{thread:s,onOpen:r}=t,i=ee(),o=s.status;let a;e[0]!==s.updatedAt?(a=new Date(s.updatedAt).toLocaleString(),e[0]=s.updatedAt,e[1]=a):a=e[1];let c;e[2]!==a?(c=l.jsx(q,{className:"whitespace-nowrap text-sm tabular-nums text-muted-foreground",children:a}),e[2]=a,e[3]=c):c=e[3];let n;e[4]!==s.orgSlug?(n=l.jsx(q,{className:"text-sm",children:s.orgSlug}),e[4]=s.orgSlug,e[5]=n):n=e[5];let u;e[6]!==r||e[7]!==s?(u=()=>r(s),e[6]=r,e[7]=s,e[8]=u):u=e[8];let m;e[9]!==i||e[10]!==s.title?(m=s.title||i("thread.analytics.untitled"),e[9]=i,e[10]=s.title,e[11]=m):m=e[11];let x;e[12]!==u||e[13]!==m?(x=l.jsx("button",{type:"button",onClick:u,className:"block max-w-full truncate text-left text-foreground underline-offset-2 hover:underline",children:m}),e[12]=u,e[13]=m,e[14]=x):x=e[14];let d;e[15]!==s.failureReason||e[16]!==s.lastError||e[17]!==s.status?(d=s.status==="failed"&&(s.lastError||s.failureReason)&&l.jsx("div",{className:"truncate text-xs text-destructive",children:s.lastError??s.failureReason}),e[15]=s.failureReason,e[16]=s.lastError,e[17]=s.status,e[18]=d):d=e[18];let h;e[19]!==x||e[20]!==d?(h=l.jsxs(q,{className:"max-w-sm text-sm",children:[x,d]}),e[19]=x,e[20]=d,e[21]=h):h=e[21];const g=ve[s.kind];let f;e[22]!==i||e[23]!==g?(f=i(g),e[22]=i,e[23]=g,e[24]=f):f=e[24];let w;e[25]!==f?(w=l.jsx(q,{className:"text-sm",children:f}),e[25]=f,e[26]=w):w=e[26];const k=et[o]??"outline";let j;e[27]!==o||e[28]!==i||e[29]!==s.status?(j=de[o]?i(de[o]):s.status,e[27]=o,e[28]=i,e[29]=s.status,e[30]=j):j=e[30];let N;e[31]!==k||e[32]!==j?(N=l.jsx(q,{children:l.jsx(Ee,{variant:k,children:j})}),e[31]=k,e[32]=j,e[33]=N):N=e[33];const E=s.userEmail??s.userName??"—";let y;e[34]!==E?(y=l.jsx(q,{className:"max-w-48 truncate text-sm",children:E}),e[34]=E,e[35]=y):y=e[35];let b;e[36]!==s.agent?(b=l.jsx(q,{className:"max-w-48 truncate text-sm",children:s.agent}),e[36]=s.agent,e[37]=b):b=e[37];let A;e[38]!==s.usd?(A=s.usd===null?"—":`$${s.usd.toFixed(2)}`,e[38]=s.usd,e[39]=A):A=e[39];let S;e[40]!==A?(S=l.jsx(q,{className:"text-sm tabular-nums",children:A}),e[40]=A,e[41]=S):S=e[41];let v;e[42]!==s.tokens?(v=s.tokens===null?"—":s.tokens.toLocaleString(),e[42]=s.tokens,e[43]=v):v=e[43];let T;e[44]!==v?(T=l.jsx(q,{className:"text-sm tabular-nums",children:v}),e[44]=v,e[45]=T):T=e[45];let _;return e[46]!==w||e[47]!==N||e[48]!==y||e[49]!==b||e[50]!==S||e[51]!==c||e[52]!==T||e[53]!==n||e[54]!==h?(_=l.jsxs(Se,{children:[c,n,h,w,N,y,b,S,T]}),e[46]=w,e[47]=N,e[48]=y,e[49]=b,e[50]=S,e[51]=c,e[52]=T,e[53]=n,e[54]=h,e[55]=_):_=e[55],_}function st(t){const e=D.c(51),{org:s}=t,r=ee(),[i,o]=V.useState(X),[a,c]=V.useState(X),n=i===X?void 0:i,u=a===X?void 0:a;let m;e[0]!==s||e[1]!==n||e[2]!==u?(m={org:s,status:n,kind:u,limit:150},e[0]=s,e[1]=n,e[2]=u,e[3]=m):m=e[3];const x=m,{data:d,isLoading:h,error:g}=We(x,!0),[f,w]=V.useState(null);let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(oe,{className:"w-[180px]",size:"sm",children:l.jsx(ne,{})}),e[4]=k):k=e[4];let j;e[5]!==r?(j=r("thread.analytics.anyStatus"),e[5]=r,e[6]=j):j=e[6];let N;e[7]!==j?(N=l.jsx(Z,{value:X,children:j}),e[7]=j,e[8]=N):N=e[8];let E;e[9]!==r?(E=Xe.map(C=>l.jsx(Z,{value:C,children:r(de[C])},C)),e[9]=r,e[10]=E):E=e[10];let y;e[11]!==N||e[12]!==E?(y=l.jsxs(ce,{children:[N,E]}),e[11]=N,e[12]=E,e[13]=y):y=e[13];let b;e[14]!==i||e[15]!==y?(b=l.jsxs(ae,{value:i,onValueChange:o,children:[k,y]}),e[14]=i,e[15]=y,e[16]=b):b=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(oe,{className:"w-[180px]",size:"sm",children:l.jsx(ne,{})}),e[17]=A):A=e[17];let S;e[18]!==r?(S=r("thread.analytics.anyKind"),e[18]=r,e[19]=S):S=e[19];let v;e[20]!==S?(v=l.jsx(Z,{value:X,children:S}),e[20]=S,e[21]=v):v=e[21];let T;e[22]!==r?(T=Ze.map(C=>l.jsx(Z,{value:C,children:r(ve[C])},C)),e[22]=r,e[23]=T):T=e[23];let _;e[24]!==v||e[25]!==T?(_=l.jsxs(ce,{children:[v,T]}),e[24]=v,e[25]=T,e[26]=_):_=e[26];let L;e[27]!==a||e[28]!==_?(L=l.jsxs(ae,{value:a,onValueChange:c,children:[A,_]}),e[27]=a,e[28]=_,e[29]=L):L=e[29];let B;e[30]===Symbol.for("react.memo_cache_sentinel")?(B=l.jsx("span",{className:"size-2 rounded-full bg-success"}),e[30]=B):B=e[30];let H;e[31]!==r?(H=r("thread.analytics.liveHint"),e[31]=r,e[32]=H):H=e[32];let R;e[33]!==H?(R=l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-xs text-muted-foreground",children:[B,H]}),e[33]=H,e[34]=R):R=e[34];let O;e[35]!==L||e[36]!==R||e[37]!==b?(O=l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b,L,R]}),e[35]=L,e[36]=R,e[37]=b,e[38]=O):O=e[38];let I;e[39]!==d||e[40]!==g||e[41]!==h||e[42]!==r?(I=h?l.jsx(he,{}):g?l.jsx(Te,{message:g.message}):d?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[l.jsx(ie,{label:r("thread.analytics.countRunning"),value:d.counts.running}),l.jsx(ie,{label:r("thread.analytics.countWaiting"),value:d.counts.waiting}),l.jsx(ie,{label:r("thread.analytics.countFailedHour"),value:d.counts.failedLastHour})]}),d.threads.length===0?l.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-muted-foreground",children:r("thread.analytics.empty")}):l.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:l.jsxs(Re,{children:[l.jsx(Oe,{children:l.jsxs(Se,{children:[l.jsx(F,{children:r("thread.analytics.colUpdated")}),l.jsx(F,{children:r("thread.analytics.colOrg")}),l.jsx(F,{children:r("thread.analytics.colChat")}),l.jsx(F,{children:r("thread.analytics.colKind")}),l.jsx(F,{children:r("thread.analytics.colStatus")}),l.jsx(F,{children:r("thread.analytics.colUser")}),l.jsx(F,{children:r("thread.analytics.colAgent")}),l.jsx(F,{children:r("thread.analytics.colCost")}),l.jsx(F,{children:r("thread.analytics.colTokens")})]})}),l.jsx(Ie,{children:d.threads.map(C=>l.jsx(tt,{thread:C,onOpen:w},C.id))})]})})]}):null,e[39]=d,e[40]=g,e[41]=h,e[42]=r,e[43]=I):I=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=()=>w(null),e[44]=K):K=e[44];let $;e[45]!==f?($=l.jsx(rt,{thread:f,onClose:K}),e[45]=f,e[46]=$):$=e[46];let P;return e[47]!==O||e[48]!==I||e[49]!==$?(P=l.jsxs("div",{className:"flex flex-col gap-6 py-6",children:[O,I,$]}),e[47]=O,e[48]=I,e[49]=$,e[50]=P):P=e[50],P}function lt(t){const e=D.c(14),{thread:s}=t,{org:r,locator:i}=be();let o;e[0]!==r.id||e[1]!==r.slug?(o={connectionId:Ce,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=o):o=e[2];const a=Ve(o),c=qe(),n=Ye();let u;e[3]!==s.createdAt||e[4]!==s.id||e[5]!==s.status||e[6]!==s.title?(u={id:s.id,title:s.title,status:s.status,created_at:s.createdAt},e[3]=s.createdAt,e[4]=s.id,e[5]=s.status,e[6]=s.title,e[7]=u):u=e[7];let m;return e[8]!==a||e[9]!==c||e[10]!==i||e[11]!==u||e[12]!==n?(m=l.jsx(Fe,{thread:u,client:a,locator:i,connections:c,virtualMcps:n,members:void 0,meta:!1}),e[8]=a,e[9]=c,e[10]=i,e[11]=u,e[12]=n,e[13]=m):m=e[13],m}function rt(t){const e=D.c(12),{thread:s,onClose:r}=t,i=ee(),{project:o}=be(),a=!!s;let c;e[0]!==r?(c=x=>!x&&r(),e[0]=r,e[1]=c):c=e[1];let n;e[2]!==o||e[3]!==i||e[4]!==s?(n=s&&l.jsx(_e,{org:{id:s.orgId,name:s.orgSlug,slug:s.orgSlug,logo:null},project:o,children:l.jsx(V.Suspense,{fallback:l.jsx(Be,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:l.jsx(He,{className:"truncate text-sm leading-snug",children:s.title||i("thread.analytics.untitled")})}),children:l.jsx(lt,{thread:s})})}),e[2]=o,e[3]=i,e[4]=s,e[5]=n):n=e[5];let u;e[6]!==n?(u=l.jsx(Ke,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:n}),e[6]=n,e[7]=u):u=e[7];let m;return e[8]!==a||e[9]!==c||e[10]!==u?(m=l.jsx(Pe,{open:a,onOpenChange:c,children:u}),e[8]=a,e[9]=c,e[10]=u,e[11]=m):m=e[11],m}function je(t){const e=D.c(16),{tool:s,org:r,from:i,to:o}=t,a=ee();let c;e[0]!==i||e[1]!==r||e[2]!==o?(c={org:r,from:i,to:o},e[0]=i,e[1]=r,e[2]=o,e[3]=c):c=e[3];const{data:n,isLoading:u,error:m}=Je(s,c);if(u){let f;return e[4]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(he,{}),e[4]=f):f=e[4],f}if(m){let f;return e[5]!==m.message?(f=l.jsx(Te,{message:m.message}),e[5]=m.message,e[6]=f):f=e[6],f}if(!n)return null;let x;e[7]!==n.sections?(x=n.sections.map(it),e[7]=n.sections,e[8]=x):x=e[8];let d;e[9]!==a?(d=a("thread.analytics.costFootnote"),e[9]=a,e[10]=d):d=e[10];let h;e[11]!==d?(h=l.jsx("p",{className:"text-xs text-muted-foreground",children:d}),e[11]=d,e[12]=h):h=e[12];let g;return e[13]!==x||e[14]!==h?(g=l.jsxs("div",{className:"flex flex-col gap-8 py-6",children:[x,h]}),e[13]=x,e[14]=h,e[15]=g):g=e[15],g}function it(t){return l.jsx(we,{section:t,threadLinks:!0},t.title)}function Il(){const t=D.c(99),e=ee(),s=ye({strict:!1}).org??"",r=Me(),[i,o]=V.useState("all"),[a,c]=V.useState(7),[n,u]=V.useState("live"),[m]=V.useState(ot);let x;t[0]!==m?(x=new Date(m).toISOString(),t[0]=m,t[1]=x):x=t[1];const d=x;let h;t[2]!==a||t[3]!==m?(h=new Date(m-a*864e5).toISOString(),t[2]=a,t[3]=m,t[4]=h):h=t[4];const g=h;if(r.isLoading){let p;return t[5]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(se.Content,{children:l.jsx(he,{})}),t[5]=p):p=t[5],p}if(!r.data?.isAdmin){let p;t[6]!==e?(p=e("thread.analytics.notAdmin"),t[6]=e,t[7]=p):p=t[7];let Q;return t[8]!==p?(Q=l.jsx(se.Content,{children:l.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:p})}),t[8]=p,t[9]=Q):Q=t[9],Q}let f;t[10]!==e?(f=e("taskBoard.analytics.orgAll"),t[10]=e,t[11]=f):f=t[11];let w;t[12]!==f?(w={value:"all",label:f},t[12]=f,t[13]=w):w=t[13];let k;t[14]!==e?(k=e("taskBoard.analytics.orgCurrent"),t[14]=e,t[15]=k):k=t[15];let j;t[16]!==s||t[17]!==k?(j={value:s,label:k},t[16]=s,t[17]=k,t[18]=j):j=t[18];let N;if(t[19]!==r.data.orgs||t[20]!==s||t[21]!==w||t[22]!==j){let p;t[24]!==s?(p=Q=>Q.slug!==s,t[24]=s,t[25]=p):p=t[25],N=[w,j,...r.data.orgs.filter(p).map(at)],t[19]=r.data.orgs,t[20]=s,t[21]=w,t[22]=j,t[23]=N}else N=t[23];const E=N;let y;t[26]!==e?(y=e("thread.analytics.title"),t[26]=e,t[27]=y):y=t[27];let b;t[28]!==y?(b=l.jsx("h1",{className:"text-xl font-medium text-foreground",children:y}),t[28]=y,t[29]=b):b=t[29];let A;t[30]!==e?(A=e("taskBoard.analytics.orgSearch"),t[30]=e,t[31]=A):A=t[31];let S;t[32]!==e?(S=e("taskBoard.analytics.orgEmpty"),t[32]=e,t[33]=S):S=t[33];let v;t[34]!==i||t[35]!==E||t[36]!==S||t[37]!==A?(v=l.jsx(Le,{options:E,value:i,onChange:o,width:"w-[240px]",searchPlaceholder:A,emptyMessage:S}),t[34]=i,t[35]=E,t[36]=S,t[37]=A,t[38]=v):v=t[38];let T;t[39]!==a||t[40]!==e||t[41]!==n?(T=n!=="live"&&l.jsxs(ae,{value:String(a),onValueChange:p=>c(Number(p)),children:[l.jsx(oe,{className:"w-[140px]",size:"sm",children:l.jsx(ne,{})}),l.jsx(ce,{children:Qe.map(p=>l.jsx(Z,{value:String(p),children:e("taskBoard.analytics.rangeDays",{days:String(p)})},p))})]}),t[39]=a,t[40]=e,t[41]=n,t[42]=T):T=t[42];let _;t[43]!==v||t[44]!==T?(_=l.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[v,T]}),t[43]=v,t[44]=T,t[45]=_):_=t[45];let L;t[46]!==_||t[47]!==b?(L=l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b,_]}),t[46]=_,t[47]=b,t[48]=L):L=t[48];let B;t[49]!==i||t[50]!==s||t[51]!==e?(B=i!==s&&l.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:i==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:i})}),t[49]=i,t[50]=s,t[51]=e,t[52]=B):B=t[52];let H;t[53]===Symbol.for("react.memo_cache_sentinel")?(H=p=>u(p),t[53]=H):H=t[53];let R;t[54]!==e?(R=e("thread.analytics.tabLive"),t[54]=e,t[55]=R):R=t[55];let O;t[56]!==R?(O=l.jsx(le,{value:"live",children:R}),t[56]=R,t[57]=O):O=t[57];let I;t[58]!==e?(I=e("thread.analytics.tabUsage"),t[58]=e,t[59]=I):I=t[59];let K;t[60]!==I?(K=l.jsx(le,{value:"usage",children:I}),t[60]=I,t[61]=K):K=t[61];let $;t[62]!==e?($=e("thread.analytics.tabErrors"),t[62]=e,t[63]=$):$=t[63];let P;t[64]!==$?(P=l.jsx(le,{value:"errors",children:$}),t[64]=$,t[65]=P):P=t[65];let C;t[66]!==O||t[67]!==K||t[68]!==P?(C=l.jsxs($e,{children:[O,K,P]}),t[66]=O,t[67]=K,t[68]=P,t[69]=C):C=t[69];let Y;t[70]!==i||t[71]!==n?(Y=n==="live"&&l.jsx(st,{org:i}),t[70]=i,t[71]=n,t[72]=Y):Y=t[72];let M;t[73]!==Y?(M=l.jsx(re,{value:"live",children:Y}),t[73]=Y,t[74]=M):M=t[74];let U;t[75]!==g||t[76]!==i||t[77]!==n||t[78]!==d?(U=n==="usage"&&l.jsx(je,{tool:"THREAD_ANALYTICS_USAGE",org:i,from:g,to:d}),t[75]=g,t[76]=i,t[77]=n,t[78]=d,t[79]=U):U=t[79];let z;t[80]!==U?(z=l.jsx(re,{value:"usage",children:U}),t[80]=U,t[81]=z):z=t[81];let G;t[82]!==g||t[83]!==i||t[84]!==n||t[85]!==d?(G=n==="errors"&&l.jsx(je,{tool:"THREAD_ANALYTICS_ERRORS",org:i,from:g,to:d}),t[82]=g,t[83]=i,t[84]=n,t[85]=d,t[86]=G):G=t[86];let W;t[87]!==G?(W=l.jsx(re,{value:"errors",children:G}),t[87]=G,t[88]=W):W=t[88];let J;t[89]!==C||t[90]!==M||t[91]!==z||t[92]!==W||t[93]!==n?(J=l.jsxs(De,{value:n,onValueChange:H,children:[C,M,z,W]}),t[89]=C,t[90]=M,t[91]=z,t[92]=W,t[93]=n,t[94]=J):J=t[94];let te;return t[95]!==L||t[96]!==B||t[97]!==J?(te=l.jsx(se.Content,{children:l.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:l.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 py-6 sm:px-8 sm:py-8",children:[L,B,J]})})}),t[95]=L,t[96]=B,t[97]=J,t[98]=te):te=t[98],te}function at(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function ot(){return Date.now()}export{Il as default};
@@ -1 +0,0 @@
1
- import{c as R,d as U,a6 as T,b as E,av as k,W as M,j as e,aQ as z,x as D,B as w,r as C,R as I,D as F,aR as A,aS as L,T as B,V as K,K as Q,e as O,E as S,u as W,aT as G,O as H}from"./index-C6-0Ff1m.js";import{a as q}from"./chat-context-BXxmldjV.js";import{T as Y}from"./thread-intent-j3i3V7mR.js";import{s as $,n as J}from"./site-url-en5df9c-.js";import{r as V}from"./use-reports-diagnostic-DKW88lIw.js";import{u as X}from"./use-mcp-client-Bg8mQo9f.js";import{i as N}from"./ArrowRight-B6vgPWbg.js";import{a as Z}from"./use-organization-settings-BmAIEgEL.js";import{C as tt,a as et}from"./companion-mcps-section-BfugnMSL.js";import{C as ot,a as rt}from"./connect-layout-BOatW4CZ.js";import{p as b}from"./self-tool-result-8OxPN9Nm.js";import"./use-panel-navigate-CkYTugDF.js";import"./thread-route-DY_UV0gu.js";import"./use-project-scope-DwQViH2f.js";import"./repository-binding-Do6sAdct.js";import"./use-view-draft-kind-DrDbO3-P.js";import"./use-blog-view-BHifDign.js";import"./session-runtime-fXa5psFL.js";import"./use-entitlements-DIoZnc_q.js";import"./use-ai-providers-pXYGEzkI.js";import"./use-current-view-0HWp9lHl.js";import"./use-in-settings-DxzX6GVb.js";import"./use-decopilot-events-B1JmbrrX.js";import"./watch-sse-pool-DdE7kwP2.js";import"./task-board-DNboqZMy.js";import"./schema-DiSJ8SEc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./companions-core-DhUD88pR.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C58hYmYC.js";import"./auth-C---Zkvq.js";import"./use-connect-companion-Ez7z63oH.js";import"./integration-icon-BIQ_3p0x.js";import"./LinkBroken01-BxVMIk5A.js";import"./agent-icon-SasBmPrY.js";import"./AlertCircle-CYAsQRdT.js";import"./UserCheck01-DLUgjW3m.js";import"./Tool01-BpBS8dw-.js";import"./ArrowUp-CsFg9VL2.js";import"./ArrowLeft-zHVY_XX0.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"./UserSquare-a_XazovD.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"./Image01-DZmu7hyy.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"./Trash01-DXQWI50A.js";import"./Upload01-BXiTGuBV.js";import"./Users01-BpOXj9ap.js";import"./XClose-DxbjiApV.js";import"./Zap-QnlW2BG3.js";import"./tooltip-BnL5r8Gv.js";import"./index-ZdVMGNX_.js";import"./form-Dx1EBvxh.js";import"./label-Cq7ohFeR.js";import"./icon-button-8qhGM4eg.js";import"./use-debounced-value-Dw3dFt4C.js";import"./useQueries-Cmvk9UMI.js";import"./authenticate-and-persist-oauth-D1SCK9qV.js";import"./mcp-oauth-BU0x_iDk.js";import"./mcp-oauth-CeIVSnSu.js";import"./track-PLvkvo8B.js";import"./extract-connection-data-DtWfSA7r.js";import"./connection-DMyObHFk.js";import"./url-slug-C2KUvR2X.js";function nt(o){const t=R.c(21),{siteUrl:i}=o,r=U(),{org:s}=T(),n=E();let l;t[0]!==r||t[1]!==s?(l=()=>{localStorage.setItem(k.sidebarOpen(),JSON.stringify(!1));const x=V(s,M.REPORTS(s.id));r({...x,search:{...x.search,sidepanel:!1}})},t[0]=r,t[1]=s,t[2]=l):l=t[2];const a=l;let h;t[3]===Symbol.for("react.memo_cache_sentinel")?(h=e.jsx(z,{className:"bg-black/15 backdrop-blur-sm"}),t[3]=h):h=t[3];let c;t[4]!==n?(c=n("routes.reportsOnboarding.connectModal.dialogTitle"),t[4]=n,t[5]=c):c=t[5];let m;t[6]!==c?(m=e.jsx(D,{className:"sr-only",children:c}),t[6]=c,t[7]=m):m=t[7];let f;t[8]!==a||t[9]!==n?(f=()=>e.jsxs("div",{className:"grid gap-4 p-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:n("routes.reportsOnboarding.connectModal.loadError")}),e.jsxs(w,{type:"button",size:"xl",className:"w-full",onClick:a,children:[n("routes.reportsOnboarding.connectModal.continueButton"),e.jsx(N,{size:18})]})]}),t[8]=a,t[9]=n,t[10]=f):f=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_=e.jsx(tt,{}),t[11]=_):_=t[11];let u;t[12]!==a||t[13]!==i?(u=e.jsx(C.Suspense,{fallback:_,children:e.jsx(lt,{siteUrlFromUrl:i,onComplete:a})}),t[12]=a,t[13]=i,t[14]=u):u=t[14];let d;t[15]!==f||t[16]!==u?(d=e.jsx(I,{fallback:f,children:u}),t[15]=f,t[16]=u,t[17]=d):d=t[17];let y;return t[18]!==m||t[19]!==d?(y=e.jsx(F,{open:!0,children:e.jsxs(A,{children:[h,e.jsxs(L,{"data-slot":"connect-modal",onEscapeKeyDown:st,onPointerDownOutside:at,onInteractOutside:it,className:"bg-background 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 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-soft duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[m,d]})]})}),t[18]=m,t[19]=d,t[20]=y):y=t[20],y}function it(o){return o.preventDefault()}function at(o){return o.preventDefault()}function st(o){return o.preventDefault()}function lt({siteUrlFromUrl:o,onComplete:t}){const i=E(),{org:r}=T(),s=M.REPORTS(r.id),n=X({connectionId:B,orgId:r.id,orgSlug:r.slug}),a=K({queryKey:Q.reportsConnection(r.id,s),queryFn:async()=>{const p=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return b(p)},retry:!1}).data.item,h=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=o||h,m=$(c),[f,_]=C.useState(!0),[u,d]=C.useState(null),y=O({mutationFn:async p=>b(await n.callTool({name:"REPORTS_SETUP",arguments:{siteUrl:p}})),retry:!1}),x=O({mutationFn:async p=>b(await n.callTool({name:"REPORTS_RUN",arguments:{siteUrl:p}})),retry:!1}),v=async()=>{d(null),S("commerce_onboarding_open_report_clicked",{domain:m??void 0,organization_id:r.id});const p=c?J(c):null;if(p?.ok)try{let g=await x.mutateAsync(p.value);if(g.triggered||(S("commerce_onboarding_run_reclaim",{domain:m??void 0,organization_id:r.id,reason:g.reason??"not_upgraded"}),await y.mutateAsync(p.value),g=await x.mutateAsync(p.value)),!g.triggered){S("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:r.id,error:g.reason??"not_triggered"}),d(i("routes.reportsOnboarding.connectModal.couldNotGenerateReport"));return}}catch(g){S("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:r.id,error:g instanceof Error?g.message:String(g)}),d(i("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}t()},P=Z("demo_mode"),j=f||P;return e.jsx(ot,{siteHost:m,footer:e.jsxs(e.Fragment,{children:[u?e.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(rt,{ready:j,pending:x.isPending,label:x.isPending?i("routes.reportsOnboarding.connectModal.openingReport"):i("routes.reportsOnboarding.connectModal.viewDiagnostic"),onClick:()=>{v()},children:e.jsx(N,{size:18})})}),j?null:e.jsx(w,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 py-3 text-base font-medium leading-tight",disabled:x.isPending,onClick:()=>{v()},children:i("routes.reportsOnboarding.connectModal.skip")})]})]}),children:e.jsx(et,{org:r,cdConnectionId:s,siteUrl:c,onReadinessChange:_})})}function Ae(){const o=R.c(7);let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},o[0]=t):t=o[0];const i=W(t),r="connect"in i&&i.connect==="1",s="siteUrl"in i&&typeof i.siteUrl=="string"?i.siteUrl:void 0;let n;o[1]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(G,{children:e.jsx(H,{})}),o[1]=n):n=o[1];let l;o[2]!==r||o[3]!==s?(l=r&&e.jsx(nt,{siteUrl:s}),o[2]=r,o[3]=s,o[4]=l):l=o[4];let a;return o[5]!==l?(a=e.jsx(Y,{children:e.jsxs(q,{children:[n,l]})}),o[5]=l,o[6]=a):a=o[6],a}export{Ae as default};
@@ -1 +0,0 @@
1
- import{b as F,q as L,e as q,fX as J,fN as W,K as B,t as R,fM as z,fL as v,ee as U,fO as X,hI as Y,fT as G,hJ as Z,fE as $}from"./index-C6-0Ff1m.js";import{C as I,E as ee}from"./use-sandbox-events-DwjSc3R2.js";import{u as te,v as ne,aA as D,ax as oe,X as se,Y as re,av as ae,aP as ce,aQ as S,aR as ie,aO as P,au as le,az as ue,aJ as fe,ay as de}from"./site-editor-toast-C2OaHizl.js";import{c as pe,b as ye,p as he,j as me,k as ke,l as be,f as Oe,m as we,d as Ce}from"./hosted-reconcile-CgC-Mb3M.js";import{k as Ee,a7 as je}from"./blocks-tab-states-CmsgKSWv.js";import{a as ve}from"./use-move-blocks-BVaiu02r.js";function ge(n,u){const d=(n.deletes??[]).filter(i=>!Object.hasOwn(n.writes,i)),p=[...Object.keys(n.writes),...d],o={},k=[];for(const i of p){const O=u(i);O===void 0?k.push(i):o[i]=O}return k.length>0?{kind:"unread",blockKeys:k}:{kind:"apply",patch:{set:n.writes,...d.length>0?{delete:d}:{}},ifMatch:o}}function Ke(n,u){const d=u.pointer.split("/").slice(1).map(k=>k.replaceAll("~1","/").replaceAll("~0","~")),p=je(d[0]),o=d[1];return!p||o===void 0?u:p==="experiments"?{...u,label:n("sectionsEditor.formConflict.ruleExperiment",{name:o}),phrase:n("sectionsEditor.formConflict.ruleExperimentPhrase",{name:o})}:{...u,label:n("sectionsEditor.formConflict.ruleCampaign",{name:o}),phrase:n("sectionsEditor.formConflict.ruleCampaignPhrase",{name:o}),mine:Q(u.mine,d.length),theirs:Q(u.theirs,d.length)}}function Q(n,u){return u===3?Z(n)??n:u===2&&n&&typeof n=="object"?$(n)??n:n}function Re(n){return{type:"object",properties:{experiments:{type:"object",title:n("thread.publishPopover.abTests")},campaigns:{type:"object",title:n("thread.publishPopover.campaignDates")}}}}function De(n){return new I(ee.Conflict,"not read yet",{entries:Object.fromEntries(n.map(u=>[u,{expected:null,actual:null}]))})}function Te({orgSlug:n,virtualMcpId:u,branch:d}){const p=F(),o=L(),k=te(u,d),i=k.kind==="protocol"?k:null,O=i?.source==="github",m=ne({orgSlug:n,virtualMcpId:u,branch:d}),w={orgSlug:n,virtualMcpId:u,branch:d},C=B.decofile(m),x=q({mutationKey:re(n,u,d),scope:se(n,u,d),mutationFn:async e=>{const r=[...Object.keys(e.writes),...e.deletes.filter(t=>!Object.hasOwn(e.writes,t))],a={};for(const t of r){const s=Object.hasOwn(e.pinned,t)?e.pinned[t]:D(o,m,t,i);a[t]=await _(s,t,e.copies)}const c=ge(e,t=>a[t]);if(c.kind==="unread")throw De(c.blockKeys);return oe(o,i,w,m,c.patch,c.ifMatch)}}),T=async(e,r)=>{for(const a of e)await de(o,i,w,m,a,r);return R.info(p("sectionsEditor.namedRules.changedMeanwhile"),{...P,description:p("sectionsEditor.namedRules.changedMeanwhileHint")}),{ok:!1,reason:"changed"}},g=async(e,r,a,c)=>{const t=await M(e,r,a,c);if(O&&!(!t.ok&&t.reason==="unavailable")){const s=pe(w),l=[...Object.keys(e.writes),...e.deletes];U.schedule(()=>{for(const y of l)ye(s,y)})}return t},M=async(e,r,a,c)=>{const t=[...Object.keys(e.writes),...e.deletes];if(a>=Ce||!X())return T(t,c);const s=i&&fe(o,i,m,c)?o.getQueryData(C)??{}:await K({blocks:t});if(!s)return R.info(p("sectionsEditor.namedRules.unavailable"),{...P,description:p("sectionsEditor.namedRules.unavailableHint")}),{ok:!1,reason:"unavailable"};const l=he(t,r,e,s),y=l.pointers.length===0?{}:await me(l,Re(p),{author:(()=>{const h=i?Y(i,w):null,E=ke(l.pointers[0]??"");return h&&E?{draft:h,blockKey:E}:null})()},h=>Ke(p,h)),b=l.pointers.length===0?l.merged:G(l,y),f=be(t,b,s);return Oe(y)&&we(f,s)?{ok:!0,keptTheirs:!0}:A(f,a+1)},H=e=>A(e,0),A=async(e,r)=>{if(!i)return R.info(p("sectionsEditor.namedRules.unavailable"),{...P,description:p("sectionsEditor.namedRules.unavailableHint")}),{ok:!1,reason:"unavailable"};const a=i.source==="github"?e.writes:z(e.writes),c=(e.deletes??[]).filter(f=>!Object.hasOwn(a,f)),t=[...Object.keys(a),...c];if(t.length===0)return{ok:!0};const s=o.getQueryData(C),l=O?N(e.basis,s):null;if(l)return g({writes:a,deletes:c},l,r);const y=await V(t,s);if(!y)return g({writes:a,deletes:c},s,r);const b=new Map;for(const f of t)s&&Object.hasOwn(s,f)&&b.set(f,s[f]);o.setQueryData(C,f=>ve(f,{writes:a,deletes:c})),o.cancelQueries({queryKey:C});try{const f={};for(const h of t)s&&Object.hasOwn(s,h)&&(f[h]=s[h]);return await x.mutateAsync({writes:a,deletes:c,pinned:y,copies:f}),{ok:!0}}catch(f){return o.setQueryData(C,h=>{if(!h)return h;const E={...h};for(const j of t)b.has(j)?E[j]=b.get(j):delete E[j];return E}),le(f)?g({writes:a,deletes:c},s,r,f):(ue(p,f instanceof Error?f:new Error(String(f)),i.source),{ok:!1,reason:"failed"})}},N=(e,r)=>{if(!e||!Object.keys(e).some(t=>v(e[t]??null)!==v(r?.[t]??null)))return null;const c={...r};for(const[t,s]of Object.entries(e))s===void 0?delete c[t]:c[t]=s;return c},_=async(e,r,a)=>!O||!Object.hasOwn(a,r)?e:J(e,a[r],W(o,m,r)),V=async(e,r)=>{const a=S(o,w),c={},t=[];for(const l of e){if(a.has(l))continue;const y=D(o,m,l,i);y===void 0?t.push(l):c[l]=y}if(t.length===0)return c;const s=await K({blocks:t});if(!s)return null;for(const l of t){const y=!!r&&Object.hasOwn(r,l);if(y!==Object.hasOwn(s,l)||y&&v(s[l])!==v(r[l]))return null;const b=D(o,m,l,i);if(b===void 0)return null;c[l]=b}return c},K=async(e={})=>{if(!i)return null;try{const r=await ae(o,i,w,m);if(!i.hosted)return r.blocks;const a=o.getQueryData(B.contentIndex(m));return await ce(o,i.hosted,m,[...Ee,...e.blocks??[]],S(o,w)),ie(a,o.getQueryData(C)??r.blocks)}catch{return null}};return{apply:H,reread:K,isPending:x.isPending,holdsCopy:O}}export{Te as u};
@@ -1 +0,0 @@
1
- import{c as r}from"./index-C6-0Ff1m.js";import{b as a}from"./chat-context-BXxmldjV.js";import{u as i}from"./shell-layout-CuBXiCpv.js";function u(){const t=r.c(3),{sendMessage:s}=a(),{openSidePanel:o}=i();let e;return t[0]!==o||t[1]!==s?(e=n=>{o(),s({parts:[{type:"text",text:n}]})},t[0]=o,t[1]=s,t[2]=e):e=t[2],e}export{u};
@@ -1 +0,0 @@
1
- import{c as e,dV as c}from"./index-C6-0Ff1m.js";import{b as a}from"./repository-binding-Do6sAdct.js";function i(r){return c(r?.metadata)}function l(r){const t=e.c(2),s=a(r);let o;return t[0]!==s?(o=i(s),t[0]=s,t[1]=o):o=t[1],o}export{i as b,l as u};
@@ -1 +0,0 @@
1
- import{a as t,c as a}from"./use-organization-settings-BmAIEgEL.js";import{dI as r}from"./index-C6-0Ff1m.js";function g(){return t("blog_view_enabled")}function l(){const e=r()?.org.id,o=a("blog_view_enabled");return e?o:!1}export{l as a,g as u};
@@ -1 +0,0 @@
1
- import{c as u,a as w,dW as b,a6 as E,i as F,an as M,K as y,am as T,q as A,e as O}from"./index-C6-0Ff1m.js";import{D as C,o as G,a as $}from"./schema-DiSJ8SEc.js";import{r as z}from"./task-board-DNboqZMy.js";const I={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},x={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function P(t,e){return{queryKey:y.organizationSettings(e),queryFn:async()=>{try{return await M(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...I,organizationId:e}}},staleTime:6e4}}function c(t){const e=u.c(7),{org:n}=E();let s;e[0]!==n.id||e[1]!==n.slug?(s=P(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t,a=!!n.id;let i;return e[3]!==s||e[4]!==o||e[5]!==a?(i={...s,select:o,enabled:a},e[3]=s,e[4]=o,e[5]=a,e[6]=i):i=e[6],F(i)}function _(){const t=u.c(9),{org:e}=E(),n=T(),s=A();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(y.organizationSettings(e.id),r=>({...r??I,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],O(i)}function R(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:x}function Y(){const{data:t}=c(D);return t??x}function D(t){return R(t.simple_mode)}function j(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function B(){return d("reports_only")}function d(t){const e=u.c(5);let n;e[0]!==t?(n=a=>G(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=c(n);let o;return e[2]!==s||e[3]!==t?(o=s??C.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function W(t){const e=u.c(6);let n;e[0]!==t?(n=i=>G(i.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s,isError:o}=c(n);let a;return e[2]!==s||e[3]!==t||e[4]!==o?(a=s??(o?C.has(t):void 0),e[2]=s,e[3]=t,e[4]=o,e[5]=a):a=e[5],a}function V(){const t=d("chat_harness_sandbox_only");return b().runtime.agentSandbox&&t}function H(){const t=u.c(8),{org:e}=E(),n=T(),s=A();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(y.organizationSettings(e.id),m=>m&&{...m,flags:{...m.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],O(i)}function k(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function J(){const t=u.c(8),{data:e}=w.useSession(),n=b();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||k(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=d("hosting_enabled"),r=d("e2e_enabled"),m=d("monitor_enabled"),N=d("experiments_enabled"),g=o||a||l,S=o||a||r,p=o||i||m,h=o||a||N;let f;return t[3]!==g||t[4]!==S||t[5]!==p||t[6]!==h?(f={hosting:g,e2e:S,monitor:p,experiments:h},t[3]=g,t[4]=S,t[5]=p,t[6]=h,t[7]=f):f=t[7],f}function X(){const{data:t}=c(L);return t??!1}function L(t){return $(t.flags)}function tt(){const{data:t}=c(q);return t??!0}function q(t){return z(t.flags)}function et(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function nt(){const t=u.c(2),{data:e}=c(Q);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Q(t){return t.coding_agent_mcp_excluded}function st(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function ot(){const t=u.c(2),{data:e}=c(U);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function U(t){return t.submodule_credentials}function at(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{d as a,V as b,W as c,Y as d,J as e,tt as f,H as g,X as h,et as i,nt as j,st as k,j as l,ot as m,at as n,B as u};