decocms 4.585.0 → 4.586.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 (442) hide show
  1. package/dist/client/assets/{AlertCircle-rt5NTcOt.js → AlertCircle-CGZfuvxJ.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CX9a7r2e.js → AreaChart-DXqVsicd.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BtflI84P.js → ArrowLeft-XURGfwpG.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DckDNEPN.js → ArrowRight-ZoKxZa45.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BX9rle-Z.js → ArrowUp-DJZ55cl-.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-Cdt9znE-.js → BookOpen01-gO5hgFUK.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-BjWXwRV3.js → CartesianChart-B0LNjIyx.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-DAGT6hYP.js → CategoricalChart-CmAKQrAh.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DQ8gl2jA.js → CheckCircle-CmN8U1V5.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-88QbtNjw.js → ChevronDown-ClblfTVV.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-BfhN49CO.js → ChevronSelectorVertical-YxAp9GGa.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BwBBvXr-.js → ChevronUp-0ZCAxpBW.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CHpJYShR.js → CreditCard01-CcTQ1h3_.js} +1 -1
  14. package/dist/client/assets/{Eye-C8bzWtOv.js → Eye-D5j_svLn.js} +1 -1
  15. package/dist/client/assets/{File02-CpMe0sR1.js → File02-Cs751Kds.js} +1 -1
  16. package/dist/client/assets/{Globe04-BGaPJwRM.js → Globe04-DO1uUwfE.js} +1 -1
  17. package/dist/client/assets/{Image01-CyjafdfK.js → Image01-CJL4B_rR.js} +1 -1
  18. package/dist/client/assets/{Key01-NBdT0O9W.js → Key01-fuHivqLl.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-BI23EoSs.js → LayoutLeft-CCeum9wV.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-DWWxoD2s.js → LinkBroken01-cq4srxHs.js} +1 -1
  21. package/dist/client/assets/{MessageCircle01-pdZ3c0Ei.js → MessageCircle01-Bf6dD94_.js} +1 -1
  22. package/dist/client/assets/{Minus-ToHFKPwl.js → Minus-Cc21R1KY.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DQ2oaJ_f.js → Monitor01-DGdgEYxG.js} +1 -1
  24. package/dist/client/assets/{Play-Dgyu5PiH.js → Play-zYFs_vGL.js} +1 -1
  25. package/dist/client/assets/{Plus-NIlBePVH.js → Plus--DcN-eh1.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-SNMItkZP.js → ReferenceLine-D6M1JZR1.js} +1 -1
  27. package/dist/client/assets/{SearchMd-BZFf7uAm.js → SearchMd-BwYuN52e.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-CA3tpOzv.js → ShoppingBag01-D-gmqcz7.js} +1 -1
  29. package/dist/client/assets/{Sun-CGayzxv4.js → Sun-D9ql5ZlI.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-BCndh-XX.js → SwitchHorizontal01-BQF84Li3.js} +1 -1
  31. package/dist/client/assets/{Tool01-CRE8Zr1E.js → Tool01-BeDQSGiN.js} +1 -1
  32. package/dist/client/assets/{Tooltip-DB98MWaY.js → Tooltip-C_RHysFo.js} +1 -1
  33. package/dist/client/assets/{Trash01-C1sTtIQd.js → Trash01-BmQrADz0.js} +1 -1
  34. package/dist/client/assets/{TrendUp01-CkF2n8Hn.js → TrendUp01-_SFSHjzO.js} +1 -1
  35. package/dist/client/assets/{Upload01-DF54M6Ph.js → Upload01-DOfZqxci.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-D14kK5BQ.js → UserCheck01-BMoOFYIZ.js} +1 -1
  37. package/dist/client/assets/{UserSquare-DAFK733H.js → UserSquare-Dn1UPzSD.js} +1 -1
  38. package/dist/client/assets/{Users01-8BTVWXNl.js → Users01-B_yoWxPn.js} +1 -1
  39. package/dist/client/assets/{XClose-igHVZF4W.js → XClose-C4MsAn9v.js} +1 -1
  40. package/dist/client/assets/{Zap-CZUa6DWb.js → Zap-DoxB0q6B.js} +1 -1
  41. package/dist/client/assets/{access-gate-DT-H-Dma.js → access-gate-DQ55JjgP.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-CmjWx4NO.js → add-connection-dialog-D0PlxcOk.js} +1 -1
  43. package/dist/client/assets/agent-app-Ch0m8w-u.js +1 -0
  44. package/dist/client/assets/{agent-assets-CJbN5bjE.js → agent-assets-COp9WevM.js} +1 -1
  45. package/dist/client/assets/{agent-automation-DQLWalf1.js → agent-automation-DRfIHgf4.js} +3 -3
  46. package/dist/client/assets/{agent-automations-DyupYjyf.js → agent-automations-C02SU72h.js} +1 -1
  47. package/dist/client/assets/{agent-blog-post-DN9dxO82.js → agent-blog-post-BOz0k9l4.js} +2 -2
  48. package/dist/client/assets/agent-blog-yxvdX-jE.js +2 -0
  49. package/dist/client/assets/{agent-calendar-CbXz7NvX.js → agent-calendar-BrjcVSaH.js} +1 -1
  50. package/dist/client/assets/{agent-capabilities-B2Kb_ijp.js → agent-capabilities-Dh06TMfs.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-rfNCNIVh.js → agent-connect-sources-DhRc2-S_.js} +1 -1
  52. package/dist/client/assets/agent-deck-BEYLEOzY.js +1 -0
  53. package/dist/client/assets/{agent-e2e-DintiVYM.js → agent-e2e-w331hEXE.js} +1 -1
  54. package/dist/client/assets/agent-experiments-CIRveYjB.js +1 -0
  55. package/dist/client/assets/agent-file-CRD-Yf8v.js +1 -0
  56. package/dist/client/assets/{agent-hosting-BW8Utp_Y.js → agent-hosting-Cf_5DVCs.js} +1 -1
  57. package/dist/client/assets/{agent-icon-BJ2Wx2fE.js → agent-icon-DwJHakBB.js} +1 -1
  58. package/dist/client/assets/agent-library-BDbVLVqf.js +1 -0
  59. package/dist/client/assets/agent-library-file-FdEtCyvQ.js +1 -0
  60. package/dist/client/assets/agent-overview-90jCAnhT.js +1 -0
  61. package/dist/client/assets/agent-releases-CQDLHf-9.js +2 -0
  62. package/dist/client/assets/agent-settings-DazJIQdd.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-CRztMY23.js → agent-site-editor-Bn_zysVp.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-AxRnYsCW.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-Css28lBT.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-rUOwwi2z.js +1 -0
  67. package/dist/client/assets/agent-view-BwA2SWmb.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-X-bc2zlR.js → agent-view-guard-_UB25wdA.js} +1 -1
  69. package/dist/client/assets/{ai-providers-D8Mc6Vyc.js → ai-providers-BZmTFJ6J.js} +1 -1
  70. package/dist/client/assets/{alert-_oqAOD6X.js → alert-Dl9RecsO.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-DQPy3uP4.js → analytics-sections-ChR-yKgZ.js} +1 -1
  72. package/dist/client/assets/api-keys-7ijHuhZV.js +1 -0
  73. package/dist/client/assets/{api-keys-D9ZKdCDY.js → api-keys-BAKKjcCM.js} +1 -1
  74. package/dist/client/assets/{app-editor-CC7vXN9x.js → app-editor-aGjbireC.js} +1 -1
  75. package/dist/client/assets/{asset-utils-DDL7Zhst.js → asset-utils-C40qdOgS.js} +1 -1
  76. package/dist/client/assets/{auth-DdGqjHXO.js → auth-DuSLyK-k.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-CmxNn2GB.js → auth-catchall-CwzGmsez.js} +1 -1
  78. package/dist/client/assets/auth-entry-QpiCG8Kt.js +1 -0
  79. package/dist/client/assets/{auth-split-layout-BiPDNEOk.js → auth-split-layout-D0SngsR5.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-ZxRhWemt.js → authenticate-and-persist-oauth-BrPxKw11.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-mqAbrUKE.js → automation-list-row-C_0woHJW.js} +1 -1
  82. package/dist/client/assets/{automation-runs-D2e4MXIM.js → automation-runs-DwwK7nJ3.js} +1 -1
  83. package/dist/client/assets/{automations-B4kujL15.js → automations-Dc36NZHt.js} +1 -1
  84. package/dist/client/assets/{badge-C-0ziPev.js → badge-BvHOfdxU.js} +1 -1
  85. package/dist/client/assets/{block-document-DWg9Jn1G.js → block-document-CGK32I9G.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-DhEK2mBx.js → blocks-preview-workspace-context-CN-ldvuU.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-pUzFXPTK.js → blocks-tab-states-DxLq1BL5.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-BOmxSryn.js → blog-preview-url-cX5z_9aO.js} +1 -1
  89. package/dist/client/assets/{blog-schema-CE1tBnsD.js → blog-schema-CTE9utzf.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-V0t8xMYW.js → blog-source-gate-DWHD3Df5.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-BO7XupIe.js → blog-view-gate-DT-8hHxE.js} +1 -1
  92. package/dist/client/assets/{buckets-D_a3q7Rp.js → buckets-DMt9Xchk.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-BGzcibxZ.js → build-improve-prompt-doc-D0Nbi1s7.js} +1 -1
  94. package/dist/client/assets/{calendar-DXtndUQf.js → calendar-BUgmhSfk.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-BYOGvrqt.js → capability-load-error-DCoklIp8.js} +1 -1
  96. package/dist/client/assets/{category-editor-j7sSG9YT.js → category-editor-B7D8BVkO.js} +1 -1
  97. package/dist/client/assets/{category-tree-CqfxuXDr.js → category-tree-BeXLYa5S.js} +1 -1
  98. package/dist/client/assets/{chart-CzbHqflS.js → chart-DfTUTOGH.js} +1 -1
  99. package/dist/client/assets/{chat-context-CzmbAHe8.js → chat-context-DG5tQFfU.js} +1 -1
  100. package/dist/client/assets/{chat-draft-CMZymjc1.js → chat-draft-Bv2iw9Fr.js} +1 -1
  101. package/dist/client/assets/{checkbox-CnO5GKzb.js → checkbox-DAnVkT6Q.js} +1 -1
  102. package/dist/client/assets/{choose-editor-DSLflE6y.js → choose-editor-DX9vd71s.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-DW_MXZoK.js → cli-auth-success-CY4cK7Ok.js} +1 -1
  104. package/dist/client/assets/{cms-settings-editor-VV8k-MFF.js → cms-settings-editor-Cj7WfazE.js} +1 -1
  105. package/dist/client/assets/{cms-store-drafts-D_kzaiOk.js → cms-store-drafts-BDhAH5vV.js} +1 -1
  106. package/dist/client/assets/{collapsible-Czfx-LAp.js → collapsible-DifRD2Ww.js} +1 -1
  107. package/dist/client/assets/{collection-detail-2JRT-w_Q.js → collection-detail-Bq38QGfT.js} +1 -1
  108. package/dist/client/assets/{collection-display-button-DkpROg50.js → collection-display-button-nfEDIRuH.js} +1 -1
  109. package/dist/client/assets/{collection-search-fi8Jpdhv.js → collection-search-RWM-9f07.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-B8CD5YXs.js → collection-table-wrapper-DVjGjn7R.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-C_tkgeK_.js → collection-tabs-BkmY1xp_.js} +1 -1
  112. package/dist/client/assets/{combobox-Q8ZHlgvG.js → combobox-D7DiHBHL.js} +1 -1
  113. package/dist/client/assets/{command-Bq8LzPoY.js → command-DHGFzOhP.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-ATwmtkbj.js → companion-mcps-section-D7d32LFm.js} +1 -1
  115. package/dist/client/assets/{config-CpgY06XK.js → config-dB-x76iz.js} +1 -1
  116. package/dist/client/assets/{connect-BEtqH7dw.js → connect-D-G-5Mck.js} +3 -3
  117. package/dist/client/assets/{connect-key-BIkvDwd3.js → connect-key-DYxzA5cq.js} +1 -1
  118. package/dist/client/assets/{connect-layout-B_lgJ90N.js → connect-layout-vX9TenPs.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-GkRu49Gr.js → connect-source-dialog-hJXgVRU-.js} +1 -1
  120. package/dist/client/assets/{connection-BGRWc-KI.js → connection-CeuJqjaI.js} +1 -1
  121. package/dist/client/assets/{connection-card-BuyifKDO.js → connection-card-bC9jkQR3.js} +1 -1
  122. package/dist/client/assets/{connection-detail-DWfh1vBP.js → connection-detail-BZxu1Il4.js} +1 -1
  123. package/dist/client/assets/{connection-form-helpers-DVl_sDCj.js → connection-form-helpers-BVK3iXej.js} +1 -1
  124. package/dist/client/assets/{connection-slug-BU-gcFLx.js → connection-slug-BofuMVWL.js} +1 -1
  125. package/dist/client/assets/{connections-CYCgeS9i.js → connections-_2oGT26C.js} +1 -1
  126. package/dist/client/assets/{content-tab-anxUFFKF.js → content-tab-B2YwxmJz.js} +3 -3
  127. package/dist/client/assets/{context-DMfn82WA.js → context-RVZVsnak.js} +1 -1
  128. package/dist/client/assets/{context-menu-lKQYrmaS.js → context-menu-BgKzmvfA.js} +1 -1
  129. package/dist/client/assets/{context-shell-DxJ2zBIa.js → context-shell-Bnnp_FlP.js} +5 -5
  130. package/dist/client/assets/{create-organization-dialog-CovUQJjl.js → create-organization-dialog-BeGGdtfc.js} +1 -1
  131. package/dist/client/assets/{daily-pulse-eYYXeJUB.js → daily-pulse-D8S4f077.js} +1 -1
  132. package/dist/client/assets/{delete-copy-bwY-nICG.js → delete-copy-C7-0DCkQ.js} +1 -1
  133. package/dist/client/assets/{device-hint-Eqj86kPk.js → device-hint-B6fw2qhI.js} +1 -1
  134. package/dist/client/assets/{discover-fbAn9icf.js → discover-BhyJuEKB.js} +1 -1
  135. package/dist/client/assets/{domain-settings-BFmlLB0B.js → domain-settings-DWaq5CPi.js} +1 -1
  136. package/dist/client/assets/{drawer-cS0px3h4.js → drawer-BXd80xtd.js} +1 -1
  137. package/dist/client/assets/{editor-DOCwgCVw.js → editor-DNZ-WgCS.js} +1 -1
  138. package/dist/client/assets/{editor-classes-ByZrgCwF.js → editor-classes-CzejjvgI.js} +1 -1
  139. package/dist/client/assets/{empty-message-BnLHUiLW.js → empty-message-DVICFi26.js} +2 -2
  140. package/dist/client/assets/{empty-state-BNznQ4un.js → empty-state-BK8GboWz.js} +1 -1
  141. package/dist/client/assets/{empty-state-haYeO0--.js → empty-state-LbEOn0Mj.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-gTPA_Mh1.js → experiments-tab-choice-DYGF6IS1.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-DR98xre0.js → extract-connection-data-B1FMXoXK.js} +1 -1
  144. package/dist/client/assets/{feature-gate-v3Hw92O6.js → feature-gate-XyzkzO9l.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-_CmjErfx.js → feature-paywall-DQF2iJDP.js} +1 -1
  146. package/dist/client/assets/{file-explorer-Dg2yjMkc.js → file-explorer-DbKxpql5.js} +1 -1
  147. package/dist/client/assets/{file-preview-DQmRHFMz.js → file-preview-A0GfMNED.js} +1 -1
  148. package/dist/client/assets/{file-share-button-5oty69zd.js → file-share-button-pVEpOvSY.js} +2 -2
  149. package/dist/client/assets/{file-type-icon-5ukaLDeF.js → file-type-icon-CSrE_noX.js} +1 -1
  150. package/dist/client/assets/{folder-icon-CKc3CbqF.js → folder-icon-CA298KqN.js} +1 -1
  151. package/dist/client/assets/{form-vgZJ8ykR.js → form-Cxhh0mxt.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-uIOzC0fQ.js → frame-navigation--4kFXAAS.js} +1 -1
  153. package/dist/client/assets/{gateway-client-CEz2o7p6.js → gateway-client-PdaGLWBA.js} +1 -1
  154. package/dist/client/assets/{general-CcVyD7wz.js → general-CuKnI3HJ.js} +1 -1
  155. package/dist/client/assets/{github-icon-CNkm_QOq.js → github-icon-h_xg-qFR.js} +1 -1
  156. package/dist/client/assets/{held-block-view-DLTLVbz1.js → held-block-view-zi4CM-KX.js} +1 -1
  157. package/dist/client/assets/{home-overview-BJHC8k_H.js → home-overview-DrWyW-2I.js} +1 -1
  158. package/dist/client/assets/{home-DEyrMuE0.js → home-w1KhoL46.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-B7PmB0kg.js → hosted-reconcile-uX15ZUhb.js} +1 -1
  160. package/dist/client/assets/{icon-button-DAAwLc_Y.js → icon-button-DzpdeaSs.js} +1 -1
  161. package/dist/client/assets/{index-CKEvWalC.js → index-3e8V4Do_.js} +1 -1
  162. package/dist/client/assets/{index-G68rd1Q1.js → index-5KkkYmJi.js} +1 -1
  163. package/dist/client/assets/{index-BuFUNk86.js → index-BK93qS26.js} +1 -1
  164. package/dist/client/assets/index-BYaF8G7R.js +1 -0
  165. package/dist/client/assets/{index-DGJ99-Gb.js → index-Bld02Tnb.js} +1 -1
  166. package/dist/client/assets/{index-BMmbX0gD.js → index-BpNyzjaQ.js} +1 -1
  167. package/dist/client/assets/{index-BMPeWdJw.js → index-BuZqAz74.js} +10 -10
  168. package/dist/client/assets/{index-AJsDmYGI.js → index-BwBEUlXI.js} +1 -1
  169. package/dist/client/assets/{index-iNQuijBz.js → index-CZTrNcsP.js} +1 -1
  170. package/dist/client/assets/{index-Behj8iY8.js → index-C_n-5x2E.js} +1 -1
  171. package/dist/client/assets/{index-BDs-2B47.js → index-DNuvhcDO.js} +1 -1
  172. package/dist/client/assets/{index-uc8MAfE7.js → index-DUn-LHzT.js} +2 -2
  173. package/dist/client/assets/{index-CSLJLC25.js → index-DsWqYG3w.js} +1 -1
  174. package/dist/client/assets/{index-CCPTG3M6.js → index-SIZschZt.js} +1 -1
  175. package/dist/client/assets/{index-BXSfOUsr.js → index-SPj0mL-J.js} +1 -1
  176. package/dist/client/assets/index-_-faNWQZ.css +1 -0
  177. package/dist/client/assets/index-ba5Vf9vt.js +1 -0
  178. package/dist/client/assets/{index-redirect-CO9DsboT.js → index-redirect-DlIbuGOg.js} +1 -1
  179. package/dist/client/assets/{index-Cm1vOK0e.js → index-rt88hTRg.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-BmYMm5wr.js → infiniteQueryObserver-CHN_AvWa.js} +1 -1
  181. package/dist/client/assets/{infra-billing-BWqkgHts.js → infra-billing-DHY4EnRE.js} +1 -1
  182. package/dist/client/assets/{input-Bp705GAE.js → input--XeG2v6T.js} +1 -1
  183. package/dist/client/assets/{input-BmsdW_BQ.js → input-c6Cx2liY.js} +4 -4
  184. package/dist/client/assets/{integration-icon-xMpRZNbX.js → integration-icon-D7fga3kk.js} +1 -1
  185. package/dist/client/assets/{item-actions-Bf8HZ-5j.js → item-actions-Dld5lBtQ.js} +1 -1
  186. package/dist/client/assets/{jira-icon-BMvTcIMX.js → jira-icon-_W0tffOR.js} +1 -1
  187. package/dist/client/assets/{label-CRK3U7ZP.js → label-Dm_T3WyF.js} +1 -1
  188. package/dist/client/assets/{layout-CHGNZWxg.js → layout-DhN3YXX3.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-DpejN_Uy.js → legacy-admin-welcome-dialog-C0w-pw6s.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-D1euSyKS.js → legacy-agents-deep-ab_jOs-e.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-B3en36R6.js → legacy-main-redirect-ByIcJoSw.js} +1 -1
  192. package/dist/client/assets/library-LpeL-fNK.js +1 -0
  193. package/dist/client/assets/{library-tab-DC3m8XDz.js → library-tab-Cui4e0pM.js} +1 -1
  194. package/dist/client/assets/{login-SeftNnF0.js → login-COwI3GAk.js} +1 -1
  195. package/dist/client/assets/{markdown-BWT_4WJH.js → markdown-CwYBGb1B.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-YjPzFqL6.js → mcp-app-renderer-CLuYD3rD.js} +2 -2
  197. package/dist/client/assets/{mcp-oauth-DUQJVV6B.js → mcp-oauth-DZ8B5A_7.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-DIu8HkzC.js → mcp-oauth-i1ZYjV6U.js} +1 -1
  199. package/dist/client/assets/{members-CJTZpTtw.js → members-CvbIQPwh.js} +1 -1
  200. package/dist/client/assets/{memory-CLaxe2x0.js → memory-BhMXHewc.js} +2 -2
  201. package/dist/client/assets/{mock-board-BaGiiwoI.js → mock-board-DN7OLcTA.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-BxMnwfXM.js → monaco-editor-CTONBla7.js} +1 -1
  203. package/dist/client/assets/{monitoring-GRSBuzQc.js → monitoring-DPSQDGbL.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-BBOPc2qP.js → monitoring-stats-row-BUZplGDl.js} +1 -1
  205. package/dist/client/assets/{multi-select-DVZ3FnG7.js → multi-select-BSuPEET4.js} +1 -1
  206. package/dist/client/assets/{mustache-E-ICl6wm.js → mustache-C50JF2sQ.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-ip9CKl8c.js → named-rule-step-D8j_NuRK.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-BHX0uLb-.js → named-rule-view-D9U19iHq.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-IDVZ0s2M.js → new-project-dialog-Bq2YhVDS.js} +1 -1
  210. package/dist/client/assets/{new-project-store-DBh8m9Ki.js → new-project-store-C82itd6a.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ai-provider-C3RLK51c.js → oauth-callback-ai-provider-Dph1UX9E.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-DjYIh0u9.js → oauth-callback-xH1_0Q9p.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-CECFMIBt.js → oauth-consent-BJ9Jn7G7.js} +1 -1
  214. package/dist/client/assets/{onboarding-DRz0hsnB.js → onboarding-tM_LYdg0.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-Brbpa4hN.js → openai-conversation-DoQ_2Seq.js} +2 -2
  216. package/dist/client/assets/{optimistic-project-sidebar-views-Bc7ykqLS.js → optimistic-project-sidebar-views-TOzwQjCp.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-Bf9NXaQ2.js → order-monitor-day-BqegE0N0.js} +1 -1
  218. package/dist/client/assets/{organization-choice-a8tN-5b7.js → organization-choice-BzjQ0aL1.js} +1 -1
  219. package/dist/client/assets/{orgs-BH47tVjw.js → orgs-WruSV9A-.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-_AetYnrA.js → own-accounts-section-TMVLN8mQ.js} +1 -1
  221. package/dist/client/assets/{pair-Bonyggei.js → pair-BYbJa99U.js} +10 -10
  222. package/dist/client/assets/{parse-sections-B5CRYtt9.js → parse-sections-CVDx-uBN.js} +3 -3
  223. package/dist/client/assets/{plan-Cb1ij9Nx.js → plan-DDx2VxJ0.js} +1 -1
  224. package/dist/client/assets/{plan-ladder-B-wAiO1o.js → plan-ladder-Ce2vSjaL.js} +1 -1
  225. package/dist/client/assets/{plan-usage-card-BhaN2UzC.js → plan-usage-card-CvxOK5ad.js} +2 -2
  226. package/dist/client/assets/{popover-zwWAAqUd.js → popover-D6EIL5sL.js} +1 -1
  227. package/dist/client/assets/{post-calendar-B7jwyYDv.js → post-calendar-J6Cs6vQ8.js} +1 -1
  228. package/dist/client/assets/{post-editor-DaufIzXa.js → post-editor-v1jKXm9-.js} +2 -2
  229. package/dist/client/assets/{preview-content-AWMAtXmK.js → preview-content-9gQGJiFY.js} +1 -1
  230. package/dist/client/assets/{preview-dialog-BazGoe9K.js → preview-dialog-J4DJmy9P.js} +1 -1
  231. package/dist/client/assets/{preview-panel-BUZpP8s8.js → preview-panel-DLe0RaXg.js} +1 -1
  232. package/dist/client/assets/{preview-tab-BiDrtTyp.js → preview-tab-BxZksZBr.js} +5 -5
  233. package/dist/client/assets/{product-picker-dialog-Wj5snGI8.js → product-picker-dialog-DCC_2JmD.js} +1 -1
  234. package/dist/client/assets/{profile-D-82qdYz.js → profile-CU5pOHcx.js} +1 -1
  235. package/dist/client/assets/project-app-view-Chii7rIX.js +1 -0
  236. package/dist/client/assets/{project-apps-Ci9IlHkX.js → project-apps-Dezyz6_N.js} +1 -1
  237. package/dist/client/assets/{project-icon-DqFpEPg-.js → project-icon-BHn6Xq54.js} +1 -1
  238. package/dist/client/assets/{project-index-Dn3n52T-.js → project-index-5c8GGatg.js} +1 -1
  239. package/dist/client/assets/project-reports-BhJG82JT.js +1 -0
  240. package/dist/client/assets/project-tasks-AXDig_Zb.js +1 -0
  241. package/dist/client/assets/{projects-C-pel4ez.js → projects-C19Wu8MK.js} +1 -1
  242. package/dist/client/assets/{projects-empty-state-Bsnv3dFv.js → projects-empty-state-Dh0sHuPd.js} +1 -1
  243. package/dist/client/assets/{prompts-CWt1t3VZ.js → prompts-CYFmsiS6.js} +1 -1
  244. package/dist/client/assets/record-editor-D2NFDCNZ.js +1 -0
  245. package/dist/client/assets/{redirect-editor-B6HxpNko.js → redirect-editor-D9WJKRVv.js} +1 -1
  246. package/dist/client/assets/reports-C-kEainI.js +1 -0
  247. package/dist/client/assets/{reports-B66FRaYV.js → reports-Cj91Mylc.js} +2 -2
  248. package/dist/client/assets/reports-onboarding-gB4My80z.js +1 -0
  249. package/dist/client/assets/{reports-tab-C7wVFguJ.js → reports-tab-CsHbv07d.js} +2 -2
  250. package/dist/client/assets/{repositories-DvCEb4S4.js → repositories-C_7l-hzO.js} +1 -1
  251. package/dist/client/assets/repositories-L_Jm13il.js +1 -0
  252. package/dist/client/assets/{repository-binding-BCK2I6Mo.js → repository-binding-VVfcdUiy.js} +1 -1
  253. package/dist/client/assets/{repository-picker-DWJeQ4Uz.js → repository-picker-By75IHJa.js} +1 -1
  254. package/dist/client/assets/require-capability-DEShAaY8.js +1 -0
  255. package/dist/client/assets/{required-auth-layout-Bqqrer2s.js → required-auth-layout-GSSn-bTA.js} +1 -1
  256. package/dist/client/assets/{reset-password-DRVc-MEN.js → reset-password-eGGPXuZQ.js} +1 -1
  257. package/dist/client/assets/{resizable-D7hc5wCS.js → resizable-XeFzd9pk.js} +1 -1
  258. package/dist/client/assets/{resolve-tab-icon-B4dWqPe0.js → resolve-tab-icon-DQMxOocF.js} +1 -1
  259. package/dist/client/assets/{review-settings-B6B7lZ4t.js → review-settings-BOoUlwEx.js} +1 -1
  260. package/dist/client/assets/{role-color-kB6wk2oV.js → role-color-D-S7Ra1A.js} +1 -1
  261. package/dist/client/assets/{roles-zAYKO93B.js → roles-C8YQ1Aw2.js} +1 -1
  262. package/dist/client/assets/route-DjlZ9cbf.js +1 -0
  263. package/dist/client/assets/{route-DdMqAKeK.js → route-lr7i-nM3.js} +1 -1
  264. package/dist/client/assets/{route-B1_dDOSw.js → route-ojZJTNbW.js} +1 -1
  265. package/dist/client/assets/{route-page-header-DOKA0lPe.js → route-page-header-BqA32d57.js} +1 -1
  266. package/dist/client/assets/{sandbox-git-api-MxAem5iH.js → sandbox-git-api-CkSQDoxX.js} +1 -1
  267. package/dist/client/assets/{sandbox-lifecycle-context-DoYhWfFO.js → sandbox-lifecycle-context-BBz4IKVo.js} +1 -1
  268. package/dist/client/assets/{save-status-Bwv32UwA.js → save-status-CmYiPWXE.js} +1 -1
  269. package/dist/client/assets/{schema-CFHsTaYR.js → schema-B0biNpls.js} +1 -1
  270. package/dist/client/assets/{schema-Cg4pyiCI.js → schema-CCpL_LVZ.js} +1 -1
  271. package/dist/client/assets/{scroll-area-DAamBeOm.js → scroll-area-bkCFS0v8.js} +1 -1
  272. package/dist/client/assets/{search-input-_TDPMfaj.js → search-input-C4sd-kKh.js} +1 -1
  273. package/dist/client/assets/{search-toggle-BNJazxMF.js → search-toggle-rjC0c-Iy.js} +1 -1
  274. package/dist/client/assets/{secret-picker-45PWWThH.js → secret-picker-ujhqmuU6.js} +1 -1
  275. package/dist/client/assets/{secrets-BEHcZkxk.js → secrets-CUx_W408.js} +1 -1
  276. package/dist/client/assets/{section-array-field-DR10vlg7.js → section-array-field-DOngDm8U.js} +1 -1
  277. package/dist/client/assets/{sections-QNIIZ4TO.js → sections-DmtYqnPM.js} +1 -1
  278. package/dist/client/assets/{sections-editor-OhHN-8Oi.js → sections-editor-DsX6y72K.js} +1 -1
  279. package/dist/client/assets/{select-Cl-2whSq.js → select-BkYZ4NYA.js} +1 -1
  280. package/dist/client/assets/{select-model-D19LJE98.js → select-model-BNVZsPuq.js} +1 -1
  281. package/dist/client/assets/{seo-editor-C-sP3Z1-.js → seo-editor-D-DOTzeP.js} +1 -1
  282. package/dist/client/assets/{separator-DsDHvFvA.js → separator-DTKXzVmt.js} +1 -1
  283. package/dist/client/assets/{session-runtime-B3tpmEdV.js → session-runtime-HHtypsTM.js} +1 -1
  284. package/dist/client/assets/settings-tab-B50Sia1R.js +1 -0
  285. package/dist/client/assets/{sheet-3DsSjpPg.js → sheet-Lq2qXLx8.js} +1 -1
  286. package/dist/client/assets/{shell-layout-Cy4x2w2C.js → shell-layout-rYoN4RTk.js} +1 -1
  287. package/dist/client/assets/{site-draft-actions-ak2wuSnr.js → site-draft-actions-D72ZWrGI.js} +5 -5
  288. package/dist/client/assets/{site-draft-view-BQq0EpKh.js → site-draft-view-DdS4HrBp.js} +1 -1
  289. package/dist/client/assets/site-editor-B6Bvzk4_.js +1 -0
  290. package/dist/client/assets/{site-editor-toast-DyAj-yh9.js → site-editor-toast-aupfR4Aq.js} +1 -1
  291. package/dist/client/assets/{skills-CT_xGAxG.js → skills-Cyx-LBzb.js} +1 -1
  292. package/dist/client/assets/{slider-_egWZNfX.js → slider-B4bXP1H_.js} +1 -1
  293. package/dist/client/assets/{sortable.esm-DpTBwHPu.js → sortable.esm-n9zdQXyB.js} +1 -1
  294. package/dist/client/assets/{sso-B8Ml5ONn.js → sso-DIU8j1zk.js} +1 -1
  295. package/dist/client/assets/{suggestion-BUUDUW90.js → suggestion-Nntdxi5T.js} +2 -2
  296. package/dist/client/assets/{super-agent-icon-B_bgucC_.js → super-agent-icon-DHSnZQuw.js} +1 -1
  297. package/dist/client/assets/switch-COjzxQ39.js +1 -0
  298. package/dist/client/assets/synced-repos-s5ovH7Qr.js +1 -0
  299. package/dist/client/assets/{tab-icon-glyph-D-aUvxBU.js → tab-icon-glyph-CvvfUXQl.js} +1 -1
  300. package/dist/client/assets/{table-Dy0rd4qk.js → table-DQIAY6r-.js} +1 -1
  301. package/dist/client/assets/{tabs-LNTPmT4H.js → tabs-CbfCGlFS.js} +1 -1
  302. package/dist/client/assets/{task-board-CgkLyySX.js → task-board-DEUSGytR.js} +1 -1
  303. package/dist/client/assets/{task-key-PeB83qoV.js → task-key-DaPOId6s.js} +1 -1
  304. package/dist/client/assets/{task-route-D-8EO_RF.js → task-route-BJj40Yza.js} +1 -1
  305. package/dist/client/assets/{task-status-KvQJFF87.js → task-status-B6WfZxUN.js} +1 -1
  306. package/dist/client/assets/{taskboard-analytics-BcLhNaje.js → taskboard-analytics-UnAzvxoh.js} +1 -1
  307. package/dist/client/assets/tasks-BtIOVSMQ.js +1 -0
  308. package/dist/client/assets/{tasks-CeETZIFY.js → tasks-vny6IFm0.js} +3 -3
  309. package/dist/client/assets/{textarea-i65d3zD6.js → textarea-CcO-rfag.js} +1 -1
  310. package/dist/client/assets/{thread-analytics-Cdiuqyfy.js → thread-analytics-BUAtXNjP.js} +1 -1
  311. package/dist/client/assets/{thread-button-Cv7guHMn.js → thread-button-DbVaWztE.js} +1 -1
  312. package/dist/client/assets/{thread-intent-LmIsiguS.js → thread-intent-CyH0Z8_7.js} +4 -4
  313. package/dist/client/assets/{thread-route-98-Pj7EV.js → thread-route-BjDCYf6b.js} +1 -1
  314. package/dist/client/assets/{thread-route-CSj65J5K.js → thread-route-Dw1cQjON.js} +1 -1
  315. package/dist/client/assets/{thread-sheet-body-D3GUkLPi.js → thread-sheet-body-C6XCaB8H.js} +1 -1
  316. package/dist/client/assets/{time-range-picker-Css1Ovl_.js → time-range-picker-C45MZ0gR.js} +1 -1
  317. package/dist/client/assets/{toggle-group-B5Qv0TZp.js → toggle-group-DFyE84bx.js} +1 -1
  318. package/dist/client/assets/{tool-set-selector-DoHlrDig.js → tool-set-selector-BgHdncVU.js} +1 -1
  319. package/dist/client/assets/{toolbar-icon-button-vtvpzCZ_.js → toolbar-icon-button-BroRQfDx.js} +1 -1
  320. package/dist/client/assets/{tooltip-BBk4QO9B.js → tooltip-DnGqcvtu.js} +1 -1
  321. package/dist/client/assets/{tooltipContext-DuBQjN-C.js → tooltipContext-BVc6eTu_.js} +1 -1
  322. package/dist/client/assets/{track-ttGR8dxm.js → track-ENeykFhY.js} +1 -1
  323. package/dist/client/assets/{types-BRAj2PE2.js → types-B4ln4I1a.js} +6 -6
  324. package/dist/client/assets/{url-slug-DrOjUMxX.js → url-slug-BCxEu7m_.js} +1 -1
  325. package/dist/client/assets/{usage-stats-xir5IhsZ.js → usage-stats-C5Wj6kIy.js} +1 -1
  326. package/dist/client/assets/{use-ai-providers-B1MpfOF5.js → use-ai-providers-BG5EDM0R.js} +1 -1
  327. package/dist/client/assets/{use-api-keys-CiN7H9ts.js → use-api-keys-CjwRm6n8.js} +1 -1
  328. package/dist/client/assets/{use-apply-named-rule-Bzqut0Gd.js → use-apply-named-rule-BH9tV1RN.js} +1 -1
  329. package/dist/client/assets/use-ask-in-chat-C6eCNqgR.js +1 -0
  330. package/dist/client/assets/{use-automations-DSG-bEnt.js → use-automations-D4bJmUmE.js} +1 -1
  331. package/dist/client/assets/{use-autosave-Cm2WfCL_.js → use-autosave-Dq8gUNzN.js} +1 -1
  332. package/dist/client/assets/use-blocks-v8-project-Dh0QtV4J.js +1 -0
  333. package/dist/client/assets/use-blog-view-w4rEUATy.js +1 -0
  334. package/dist/client/assets/{use-chat-layout-state-Cobo43Bl.js → use-chat-layout-state-D38zRykR.js} +1 -1
  335. package/dist/client/assets/{use-cms-publish-actions-ChEzMzUL.js → use-cms-publish-actions-Bf5Y1rJL.js} +5 -5
  336. package/dist/client/assets/{use-connect-companion-CJdSUXna.js → use-connect-companion-leNqQRzW.js} +1 -1
  337. package/dist/client/assets/{use-connection-VTUSBGTe.js → use-connection-C4G0ZMoe.js} +1 -1
  338. package/dist/client/assets/{use-content-sync-BXrJzR11.js → use-content-sync-CeYI53r8.js} +1 -1
  339. package/dist/client/assets/{use-copy-Dc7Mx1fC.js → use-copy-BFeXylk9.js} +1 -1
  340. package/dist/client/assets/{use-current-view-AGi0k_-I.js → use-current-view-swKX6Bc6.js} +1 -1
  341. package/dist/client/assets/{use-date-fns-locale-Bxj0YL2L.js → use-date-fns-locale-DX45EO9I.js} +1 -1
  342. package/dist/client/assets/{use-debounced-autosave-BDRqjNGS.js → use-debounced-autosave-BVXsg1Of.js} +1 -1
  343. package/dist/client/assets/{use-debounced-value-CTxCZD5A.js → use-debounced-value-CPl0Wyl6.js} +1 -1
  344. package/dist/client/assets/{use-deco-credits-B34VYEQw.js → use-deco-credits-C4mVYU5r.js} +1 -1
  345. package/dist/client/assets/{use-decopilot-events-DFiNdpMv.js → use-decopilot-events-SRdggwTs.js} +1 -1
  346. package/dist/client/assets/{use-delete-block-CTKK2Eq4.js → use-delete-block-CRyG6Do-.js} +1 -1
  347. package/dist/client/assets/{use-delete-connection-C1dHTb1J.js → use-delete-connection-C-kXdkQA.js} +1 -1
  348. package/dist/client/assets/{use-deployment-admin-BA_JLmwW.js → use-deployment-admin-Dwt-RYsg.js} +1 -1
  349. package/dist/client/assets/{use-entitlements-RVjfgn4l.js → use-entitlements-DgXhk8I6.js} +1 -1
  350. package/dist/client/assets/{use-fast-preview-draft-url-kaqCW9_t.js → use-fast-preview-draft-url-DtikvUh-.js} +1 -1
  351. package/dist/client/assets/{use-file-configs-DJQqKxP9.js → use-file-configs-BlRaUlfc.js} +1 -1
  352. package/dist/client/assets/{use-id-selection-BzvH47dC.js → use-id-selection-CJdNm4ZY.js} +1 -1
  353. package/dist/client/assets/{use-in-settings-CavkWvLD.js → use-in-settings-cNZb_oio.js} +1 -1
  354. package/dist/client/assets/{use-inbox-feed-CJ80ZK7C.js → use-inbox-feed-BKl_0o2v.js} +1 -1
  355. package/dist/client/assets/{use-infinite-scroll-CBxCb09-.js → use-infinite-scroll-DgSz0aNh.js} +1 -1
  356. package/dist/client/assets/{use-join-requests-uMBvUkrQ.js → use-join-requests-pUhubFwu.js} +1 -1
  357. package/dist/client/assets/{use-main-panel-tabs-CAwxHjj4.js → use-main-panel-tabs-B0lMlgyK.js} +1 -1
  358. package/dist/client/assets/{use-mcp-auth-status-COkXOT5q.js → use-mcp-auth-status-BLLNsVrE.js} +1 -1
  359. package/dist/client/assets/{use-mcp-client-D6hvNNod.js → use-mcp-client-UWOU8UbZ.js} +2 -2
  360. package/dist/client/assets/{use-mcp-prompts-Dzcv5Qm_.js → use-mcp-prompts-CjwiiUTx.js} +1 -1
  361. package/dist/client/assets/{use-mcp-tools-CaA0WW-E.js → use-mcp-tools-C7Kg2Nto.js} +1 -1
  362. package/dist/client/assets/{use-mobile-DPeImGih.js → use-mobile-Cq1k3-Gk.js} +1 -1
  363. package/dist/client/assets/{use-move-blocks-B58hF-QF.js → use-move-blocks-DH3gSdil.js} +1 -1
  364. package/dist/client/assets/{use-navigate-to-agent-D-LXOG-h.js → use-navigate-to-agent-vJOwimSb.js} +1 -1
  365. package/dist/client/assets/{use-never-published-AUwhcJk8.js → use-never-published-BB5kYeS3.js} +1 -1
  366. package/dist/client/assets/{use-org-fs-DMG6vhv9.js → use-org-fs-CAHuTLc_.js} +1 -1
  367. package/dist/client/assets/{use-org-notice-l577omxO.js → use-org-notice-D_lLzWXp.js} +1 -1
  368. package/dist/client/assets/{use-org-repo-syncs-anMhrjcF.js → use-org-repo-syncs-BxGs1Gi_.js} +1 -1
  369. package/dist/client/assets/{use-org-sso-QDNvT__Q.js → use-org-sso-fZ2uDAIp.js} +1 -1
  370. package/dist/client/assets/{use-organization-settings-HyX5IrJ4.js → use-organization-settings-D8JbZGlQ.js} +1 -1
  371. package/dist/client/assets/{use-panel-navigate-yNzK1oeQ.js → use-panel-navigate-B3thngCs.js} +1 -1
  372. package/dist/client/assets/{use-project-native-view-presence-BkAnKN4Z.js → use-project-native-view-presence-BKZJ0lpX.js} +1 -1
  373. package/dist/client/assets/{use-project-scope-BYK0JAGP.js → use-project-scope-CD-cb4-V.js} +1 -1
  374. package/dist/client/assets/use-recent-apps-Co5DoIGT.js +1 -0
  375. package/dist/client/assets/{use-reports-diagnostic-BxX26Yaf.js → use-reports-diagnostic-lGxrsSfr.js} +1 -1
  376. package/dist/client/assets/{use-sandbox-events-DFE5xC3q.js → use-sandbox-events-BcrE-YTF.js} +2 -2
  377. package/dist/client/assets/{use-secrets-C-F6GU50.js → use-secrets-yIZbpwIn.js} +1 -1
  378. package/dist/client/assets/{use-section-preview-base-DcUNPfko.js → use-section-preview-base-C2vE3o4z.js} +1 -1
  379. package/dist/client/assets/{use-sidebar-collapsed-Ciu2x6KY.js → use-sidebar-collapsed-Bo3tE9bK.js} +1 -1
  380. package/dist/client/assets/{use-tags-CLlJFBlp.js → use-tags-BQcMuDty.js} +1 -1
  381. package/dist/client/assets/use-task-board-analytics-CIahrWuX.js +1 -0
  382. package/dist/client/assets/{use-task-board-item-prs-C_eZiXGh.js → use-task-board-item-prs-W9kboyPg.js} +1 -1
  383. package/dist/client/assets/{use-task-board-items--v3zNW-2.js → use-task-board-items-DP6ZFnrN.js} +1 -1
  384. package/dist/client/assets/{use-task-board-prompts-BCHk1uCf.js → use-task-board-prompts-qQB1KZ8p.js} +1 -1
  385. package/dist/client/assets/{use-task-metadata-puiqvF0z.js → use-task-metadata-C2UpEUk-.js} +1 -1
  386. package/dist/client/assets/{use-thread-outputs-vfKngax2.js → use-thread-outputs-A3ms5KEO.js} +1 -1
  387. package/dist/client/assets/{use-view-draft-kind-CK2Ws293.js → use-view-draft-kind-CXMOqIBD.js} +1 -1
  388. package/dist/client/assets/{use-voice-input-Bag2UQ5s.js → use-voice-input-poVZeRVs.js} +1 -1
  389. package/dist/client/assets/useInfiniteQuery-CNxlkxws.js +1 -0
  390. package/dist/client/assets/{useQueries-ClESU-gL.js → useQueries-DhONZGBj.js} +1 -1
  391. package/dist/client/assets/useSuspenseInfiniteQuery-FHN2hj19.js +1 -0
  392. package/dist/client/assets/{users--4MnD2Ni.js → users-B_cNHXhu.js} +1 -1
  393. package/dist/client/assets/{utils-GIRCtww_.js → utils-BdAsQahL.js} +1 -1
  394. package/dist/client/assets/{variant-calendar-DDAccAAH.js → variant-calendar-DkWaMyhm.js} +1 -1
  395. package/dist/client/assets/{variant-matcher-override-B4viDDF4.js → variant-matcher-override-CxSxAvsY.js} +1 -1
  396. package/dist/client/assets/{view-header-BMcVMjG5.js → view-header-CZchRX7c.js} +1 -1
  397. package/dist/client/assets/{virtual-mcp-D70Jm3Cf.js → virtual-mcp-4VHtoaO4.js} +1 -1
  398. package/dist/client/assets/{watch-sse-pool-C79C_cUh.js → watch-sse-pool-C7kLS2GY.js} +1 -1
  399. package/dist/client/index.html +2 -2
  400. package/dist/server/server.js +114 -114
  401. package/package.json +1 -1
  402. package/dist/client/assets/agent-app-mFu4qfV_.js +0 -1
  403. package/dist/client/assets/agent-blog-oFjylmup.js +0 -2
  404. package/dist/client/assets/agent-deck-Bw2cZE6R.js +0 -1
  405. package/dist/client/assets/agent-experiments-DxbZHSvE.js +0 -1
  406. package/dist/client/assets/agent-file-B4IdGvOa.js +0 -1
  407. package/dist/client/assets/agent-library-1XqTmW3J.js +0 -1
  408. package/dist/client/assets/agent-library-file-BQTvQaVH.js +0 -1
  409. package/dist/client/assets/agent-overview-nv0B1Vtn.js +0 -1
  410. package/dist/client/assets/agent-releases-D-COO9bm.js +0 -2
  411. package/dist/client/assets/agent-settings-DmrVI6B5.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-CNRH9GQU.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-BB_PWv5l.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-CN6P394O.js +0 -1
  415. package/dist/client/assets/agent-view-C_kbJ6jO.js +0 -1
  416. package/dist/client/assets/api-keys-D_uSLlKH.js +0 -1
  417. package/dist/client/assets/auth-entry-C_97myXT.js +0 -1
  418. package/dist/client/assets/index--QRH4qmO.css +0 -1
  419. package/dist/client/assets/index-Cl6eQZzh.js +0 -1
  420. package/dist/client/assets/index-DASViI_L.js +0 -1
  421. package/dist/client/assets/library-z4pMyMvK.js +0 -1
  422. package/dist/client/assets/project-app-view-BZ0asFCv.js +0 -1
  423. package/dist/client/assets/project-reports-CHFD_5_U.js +0 -1
  424. package/dist/client/assets/project-tasks-Dcp7unw7.js +0 -1
  425. package/dist/client/assets/record-editor-Ch7j2D2R.js +0 -1
  426. package/dist/client/assets/reports-XbkN5y4U.js +0 -1
  427. package/dist/client/assets/reports-onboarding-C_u0txdS.js +0 -1
  428. package/dist/client/assets/repositories-D6nxNt_H.js +0 -1
  429. package/dist/client/assets/require-capability-CeoHCJST.js +0 -1
  430. package/dist/client/assets/route-Kd6aOvVB.js +0 -1
  431. package/dist/client/assets/settings-tab-D2eW6VhQ.js +0 -1
  432. package/dist/client/assets/site-editor-BIurhts7.js +0 -1
  433. package/dist/client/assets/switch-pc6As7Lj.js +0 -1
  434. package/dist/client/assets/synced-repos-BCR2U4BU.js +0 -1
  435. package/dist/client/assets/tasks-BQIgrwi3.js +0 -1
  436. package/dist/client/assets/use-ask-in-chat-CKHbH0UO.js +0 -1
  437. package/dist/client/assets/use-blocks-v8-project-B8tSOiQV.js +0 -1
  438. package/dist/client/assets/use-blog-view-CLaoWWXx.js +0 -1
  439. package/dist/client/assets/use-recent-apps-DbC0yZx7.js +0 -1
  440. package/dist/client/assets/use-task-board-analytics-CaZfe94R.js +0 -1
  441. package/dist/client/assets/useInfiniteQuery-CkG5v2bH.js +0 -1
  442. package/dist/client/assets/useSuspenseInfiniteQuery-D4hQd0qx.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-BxMnwfXM.js","assets/index-BMPeWdJw.js","assets/index--QRH4qmO.css","assets/editor-DOCwgCVw.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
- import{r as R,b6 as Ue,c as W,b as Z,m as ne,j as s,B as K,b3 as ye,h as je,I as ge,t as Pe,aW as ve,a7 as Oe,bw as Ke,n as We,bx as ce,by as Ge,e as He,bm as Se,bz as pe,bj as Te,bk as qe,bl as he}from"./index-BMPeWdJw.js";import{C as Ye,c as Ze,S as Qe,M as Xe,v as es}from"./held-block-view-DLTLVbz1.js";import{b as Le}from"./use-never-published-AUwhcJk8.js";import{c as ss,u as ts}from"./hosted-reconcile-B7PmB0kg.js";import{b as ns,a as ls}from"./repository-binding-BCK2I6Mo.js";import{b as $e}from"./UserCheck01-D14kK5BQ.js";import{K as Ae,Z as as,e as os,U as is,_ as rs}from"./agent-icon-BJ2Wx2fE.js";import{i as cs}from"./SearchMd-BZFf7uAm.js";import{L as _e}from"./label-CRK3U7ZP.js";import{S as ds}from"./switch-pc6As7Lj.js";import{T as us}from"./textarea-i65d3zD6.js";import{u as fs}from"./use-copy-Dc7Mx1fC.js";import{D as ms}from"./section-array-field-DR10vlg7.js";import{a2 as xs,a3 as ke,a4 as ps,a5 as Ee,w as hs,q as bs}from"./site-editor-toast-DyAj-yh9.js";import{Y as vs,Z as ys,M as ze,w as js,y as gs,_ as ks,$ as Ns}from"./blocks-tab-states-pUzFXPTK.js";import{a as Ss}from"./empty-message-BnLHUiLW.js";import{i as Ts}from"./ChevronSelectorVertical-BfhN49CO.js";import{a as _s,C as Es,b as we,e as ws,c as Cs,f as Bs}from"./command-Bq8LzPoY.js";import{a as Rs,b as Ps,P as Os}from"./popover-zwWAAqUd.js";import{u as Ls}from"./chat-context-CzmbAHe8.js";import{a as $s}from"./MessageCircle01-pdZ3c0Ei.js";import{i as As}from"./Play-Dgyu5PiH.js";import{S as zs}from"./scroll-area-DAamBeOm.js";import{c as ue,T as fe,a as me}from"./tooltip-BBk4QO9B.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-BxMnwfXM.js";import{S as Is}from"./save-status-Bwv32UwA.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-BxMnwfXM.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=Z(),{handleCopy:a,copied:i}=fs();let r;e[0]!==n?(r=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(as,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let x;e[3]!==t?(x=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=x):x=e[4];let b;e[5]!==x?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:x}),e[5]=x,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let p;e[9]!==h?(p=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=p):p=e[10];let y;e[11]!==b||e[12]!==p?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,p]})]}),e[11]=b,e[12]=p,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==i?(d=i?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=i,e[19]=d):d=e[19];let u;e[20]!==i||e[21]!==t?(u=t(i?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=i,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==i||e[28]!==t?(g=i?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=i,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let C;e[42]!==k||e[43]!==_?(C=s.jsxs("a",{href:ms,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=C):C=e[44];let T;e[45]!==v||e[46]!==C?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,C]}),e[45]=v,e[46]=C,e[47]=T):T=e[47];let w;e[48]!==c||e[49]!==j||e[50]!==T?(w=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=w):w=e[51];let B;return e[52]!==r||e[53]!==w||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:r,children:[y,w]}),e[52]=r,e[53]=w,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-editor-CTONBla7.js","assets/index-BuZqAz74.js","assets/index-_-faNWQZ.css","assets/editor-DNZ-WgCS.js","assets/delay-CnY5UFtP.js"])))=>i.map(i=>d[i]);
2
+ import{r as R,b8 as Ue,c as W,b as Z,m as ne,j as s,B as K,b5 as ye,h as je,I as ge,t as Pe,aY as ve,a9 as Oe,by as Ke,n as We,bz as ce,bA as Ge,e as He,bo as Se,bB as pe,bl as Te,bm as Ye,bn as he}from"./index-BuZqAz74.js";import{C as qe,c as Ze,S as Qe,M as Xe,v as es}from"./held-block-view-zi4CM-KX.js";import{b as Le}from"./use-never-published-BB5kYeS3.js";import{c as ss,u as ts}from"./hosted-reconcile-uX15ZUhb.js";import{b as ns,a as ls}from"./repository-binding-VVfcdUiy.js";import{b as $e}from"./UserCheck01-BMoOFYIZ.js";import{K as Ae,Z as as,e as os,U as is,_ as rs}from"./agent-icon-DwJHakBB.js";import{i as cs}from"./SearchMd-BwYuN52e.js";import{L as _e}from"./label-Dm_T3WyF.js";import{S as ds}from"./switch-COjzxQ39.js";import{T as us}from"./textarea-CcO-rfag.js";import{u as fs}from"./use-copy-BFeXylk9.js";import{D as ms}from"./section-array-field-DOngDm8U.js";import{a2 as xs,a3 as ke,a4 as ps,a5 as Ee,w as hs,q as bs}from"./site-editor-toast-aupfR4Aq.js";import{Y as vs,Z as ys,M as ze,w as js,y as gs,_ as ks,$ as Ns}from"./blocks-tab-states-DxLq1BL5.js";import{a as Ss}from"./empty-message-DVICFi26.js";import{i as Ts}from"./ChevronSelectorVertical-YxAp9GGa.js";import{a as _s,C as Es,b as Ce,e as Cs,c as ws,f as Bs}from"./command-DHGFzOhP.js";import{a as Rs,b as Ps,P as Os}from"./popover-D6EIL5sL.js";import{u as Ls}from"./chat-context-DG5tQFfU.js";import{a as $s}from"./MessageCircle01-Bf6dD94_.js";import{i as As}from"./Play-zYFs_vGL.js";import{S as zs}from"./scroll-area-bkCFS0v8.js";import{c as ue,T as fe,a as me}from"./tooltip-DnGqcvtu.js";import{MonacoCodeEditor as Ie}from"./monaco-editor-CTONBla7.js";import{S as Is}from"./save-status-CmYiPWXE.js";const Ms=R.lazy(()=>Ue(()=>import("./monaco-editor-CTONBla7.js"),__vite__mapDeps([0,1,2,3,4])).then(o=>({default:o.MonacoCodeEditor}))),te=o=>!!o&&typeof o=="object"&&!Array.isArray(o);function Js(o,e){return o("sandbox.schemaless.agentPrompt",{site:e?`"${e}"`:o("sandbox.schemaless.agentPromptSiteUnknown")})}function Vs(o){const e=W.c(56),{site:l,className:n}=o,t=Z(),{handleCopy:a,copied:i}=fs();let r;e[0]!==n?(r=ne("flex shrink-0 flex-col gap-2.5 border-b bg-muted/40 px-4 py-3",n),e[0]=n,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(as,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),e[2]=f):f=e[2];let x;e[3]!==t?(x=t("sandbox.schemaless.bannerTitle"),e[3]=t,e[4]=x):x=e[4];let b;e[5]!==x?(b=s.jsx("h2",{id:"schema-pending-title",className:"text-sm font-medium text-foreground",children:x}),e[5]=x,e[6]=b):b=e[6];let h;e[7]!==t?(h=t("sandbox.schemaless.bannerBody"),e[7]=t,e[8]=h):h=e[8];let p;e[9]!==h?(p=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:h}),e[9]=h,e[10]=p):p=e[10];let y;e[11]!==b||e[12]!==p?(y=s.jsxs("div",{className:"flex items-start gap-2",children:[f,s.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[b,p]})]}),e[11]=b,e[12]=p,e[13]=y):y=e[13];let m;e[14]!==a||e[15]!==l||e[16]!==t?(m=()=>{a(Js(t,l)).catch(()=>Pe.error(t("sandbox.schemaless.copyPromptFailed")))},e[14]=a,e[15]=l,e[16]=t,e[17]=m):m=e[17];let d;e[18]!==i?(d=i?s.jsx(ve,{className:"text-success"}):s.jsx(os,{}),e[18]=i,e[19]=d):d=e[19];let u;e[20]!==i||e[21]!==t?(u=t(i?"sandbox.schemaless.promptCopied":"sandbox.schemaless.copyPrompt"),e[20]=i,e[21]=t,e[22]=u):u=e[22];let c;e[23]!==u||e[24]!==m||e[25]!==d?(c=s.jsxs(K,{type:"button",variant:"outline",size:"sm",onClick:m,children:[d,u]}),e[23]=u,e[24]=m,e[25]=d,e[26]=c):c=e[26];let g;e[27]!==i||e[28]!==t?(g=i?t("sandbox.schemaless.promptCopiedAnnouncement"):"",e[27]=i,e[28]=t,e[29]=g):g=e[29];let j;e[30]!==g?(j=s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g}),e[30]=g,e[31]=j):j=e[31];let v;e[32]!==t?(v=t("sandbox.schemaless.usesSkill"),e[32]=t,e[33]=v):v=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("span",{"aria-hidden":"true",children:" · "}),e[34]=E):E=e[34];let k;e[35]!==t?(k=t("sandbox.schemaless.installSkill"),e[35]=t,e[36]=k):k=e[36];let S;e[37]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Oe,{"aria-hidden":"true",className:"size-3.5"}),e[37]=S):S=e[37];let N;e[38]!==t?(N=t("decoServe.docs.newTab"),e[38]=t,e[39]=N):N=e[39];let _;e[40]!==N?(_=s.jsx("span",{className:"sr-only",children:N}),e[40]=N,e[41]=_):_=e[41];let w;e[42]!==k||e[43]!==_?(w=s.jsxs("a",{href:ms,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[k,S,_]}),e[42]=k,e[43]=_,e[44]=w):w=e[44];let T;e[45]!==v||e[46]!==w?(T=s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v,E,w]}),e[45]=v,e[46]=w,e[47]=T):T=e[47];let C;e[48]!==c||e[49]!==j||e[50]!==T?(C=s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 pl-6",children:[c,j,T]}),e[48]=c,e[49]=j,e[50]=T,e[51]=C):C=e[51];let B;return e[52]!==r||e[53]!==C||e[54]!==y?(B=s.jsxs("section",{"aria-labelledby":"schema-pending-title","data-testid":"schema-pending-banner",className:r,children:[y,C]}),e[52]=r,e[53]=C,e[54]=y,e[55]=B):B=e[55],B}function Ds(o,e,l){if(te(o)){for(const n of["name","title","label"]){const t=o[n];if(typeof t=="string"&&t.trim())return t.trim()}if(typeof o.__resolveType=="string")return ke(o.__resolveType);for(const[n,t]of Object.entries(o)){if(n.startsWith("__")||typeof t!="string")continue;const a=t.trim();if(a&&a.length<=80&&!a.startsWith("<"))return a}}return l("sandbox.schemaless.item",{n:e+1})}const Fs=o=>`schemaless-${o.join(".")}`;function Us(o){const e=W.c(7),{id:l,value:n,onChange:t}=o;let a;e[0]!==n?(a=()=>n.includes(`
3
3
  `)||n.length>80,e[0]=n,e[1]=a):a=e[1];const[i]=R.useState(a);let r;return e[2]!==l||e[3]!==i||e[4]!==t||e[5]!==n?(r=i?s.jsx(us,{id:l,value:n,rows:Math.min(8,Math.max(3,n.split(`
4
- `).length)),onChange:f=>t(f.target.value)}):s.jsx(ge,{id:l,value:n,onChange:f=>t(f.target.value)}),e[2]=l,e[3]=i,e[4]=t,e[5]=n,e[6]=r):r=e[6],r}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=Z(),[i,r]=R.useState(String(n));let f;e[0]!==i?(f=Ee(i),e[0]=i,e[1]=f):f=e[1];const x=f===null;let b;e[2]!==t?(b=m=>{r(m.target.value);const d=Ee(m.target.value);d!==null&&t(d)},e[2]=t,e[3]=b):b=e[3];let h;e[4]!==l||e[5]!==x||e[6]!==b||e[7]!==i?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:i,"aria-invalid":x,onChange:b}),e[4]=l,e[5]=x,e[6]=b,e[7]=i,e[8]=h):h=e[8];let p;e[9]!==x||e[10]!==a?(p=x&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=x,e[10]=a,e[11]=p):p=e[11];let y;return e[12]!==h||e[13]!==p?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,p]}),e[12]=h,e[13]=p,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:i}=o,r=Z();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const x=f;if(typeof n=="boolean"){let m;e[2]!==x||e[3]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[2]=x,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==i||e[6]!==t?(d=g=>i(t,g),e[5]=i,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==x||e[9]!==d||e[10]!==n?(u=s.jsx(ds,{id:x,checked:n,onCheckedChange:d}),e[8]=x,e[9]=d,e[10]=n,e[11]=u):u=e[11];let c;return e[12]!==m||e[13]!==u?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,u]}),e[12]=m,e[13]=u,e[14]=c):c=e[14],c}if(typeof n=="string"||typeof n=="number"){let m;e[15]!==x||e[16]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[15]=x,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==x||e[19]!==i||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:x,value:n,onChange:c=>i(t,c)}):s.jsx(Ks,{id:x,value:n,onChange:c=>i(t,c)}),e[18]=x,e[19]=i,e[20]=t,e[21]=n,e[22]=d):d=e[22];let u;return e[23]!==m||e[24]!==d?(u=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,d]}),e[23]=m,e[24]=d,e[25]=u):u=e[25],u}if(Array.isArray(n)||te(n)){let m,d,u,c,g;if(e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==t||e[30]!==r||e[31]!==n){const E=Array.isArray(n)?n.map((T,w)=>[Ds(T,w,r),T,w]):Object.entries(n).filter(Gs).map(Ws),k=te(n)&&typeof n.__resolveType=="string"?n.__resolveType:null;u=a===0,c="group rounded-md border border-border";let S;e[37]!==l?(S=s.jsx("span",{className:"min-w-0 truncate",children:l}),e[37]=l,e[38]=S):S=e[38];let N;e[39]!==k?(N=k&&s.jsx("span",{className:"min-w-0 truncate font-mono text-xs font-normal text-muted-foreground",title:k,children:ke(k)}),e[39]=k,e[40]=N):N=e[40];let _;e[41]!==r||e[42]!==n?(_=Array.isArray(n)?r("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=r,e[42]=n,e[43]=_):_=e[43];let C;e[44]!==_?(C=s.jsx("span",{className:"ml-auto shrink-0 text-xs font-normal text-muted-foreground",children:_}),e[44]=_,e[45]=C):C=e[45],e[46]!==C||e[47]!==S||e[48]!==N?(g=s.jsxs("summary",{className:"flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-sm font-medium text-foreground",children:[S,N,C]}),e[46]=C,e[47]=S,e[48]=N,e[49]=g):g=e[49],m="flex flex-col gap-4 border-t border-border px-3 py-3",d=E.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.schemaless.empty")}):E.map(T=>{const[w,B,O]=T;return s.jsx(Me,{label:w,value:B,path:[...t,O],depth:a+1,onChange:i},O)}),e[26]=a,e[27]=l,e[28]=i,e[29]=t,e[30]=r,e[31]=n,e[32]=m,e[33]=d,e[34]=u,e[35]=c,e[36]=g}else m=e[32],d=e[33],u=e[34],c=e[35],g=e[36];let j;e[50]!==m||e[51]!==d?(j=s.jsx("div",{className:m,children:d}),e[50]=m,e[51]=d,e[52]=j):j=e[52];let v;return e[53]!==u||e[54]!==c||e[55]!==g||e[56]!==j?(v=s.jsxs("details",{open:u,className:c,children:[g,j]}),e[53]=u,e[54]=c,e[55]=g,e[56]=j,e[57]=v):v=e[57],v}let b;e[58]!==l?(b=s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:l}),e[58]=l,e[59]=b):b=e[59];let h;e[60]!==r?(h=r("sandbox.schemaless.notSet"),e[60]=r,e[61]=h):h=e[61];let p;e[62]!==h?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=p):p=e[63];let y;return e[64]!==b||e[65]!==p?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,p]}),e[64]=b,e[65]=p,e[66]=y):y=e[66],y}function Ws(o){const[e,l]=o;return[e,l,e]}function Gs(o){const[e]=o;return e!=="__resolveType"}function Hs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=Z(),[i,r]=R.useState(()=>(t?.(o),e)),[f,x]=R.useState(0),[b,h]=R.useState(null),[p,y]=R.useState(!1),m=v=>{r(v),l(o,v)},d=typeof i.__resolveType=="string"?i.__resolveType:null,u=Object.entries(i).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),x(v=>v+1)):h(JSON.stringify(i,null,2))},g=v=>{try{const E=JSON.parse(v??"");if(te(E)){y(!1),m(E);return}}catch{}y(!0)},j=a(b!==null?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson");return s.jsxs("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[n&&s.jsxs(K,{variant:"ghost",size:"sm",className:"shrink-0",onClick:n,children:[s.jsx($e,{"aria-hidden":"true"}),a("sandbox.schemaless.back")]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("h3",{className:"truncate text-sm font-medium",title:o,children:o}),d&&s.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:d,children:d})]}),s.jsx(K,{variant:b!==null?"default":"ghost",size:"icon",className:"shrink-0",onClick:c,"aria-label":j,"aria-pressed":b!==null,title:j,children:b!==null?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})]}),s.jsxs("div",{className:"relative min-h-0 flex-1",children:[s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("form",{"aria-label":o,className:"mx-auto flex max-w-2xl flex-col gap-4 px-6 py-4",onSubmit:v=>v.preventDefault(),children:u.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.schemaless.empty")}):u.map(([v,E])=>s.jsx(Me,{label:v,value:E,path:[v],depth:0,onChange:(k,S)=>m(ps(i,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[p&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:a("sandbox.savedSectionEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),children:s.jsx(Ms,{language:"json",height:"100%",code:b,onChange:g})})})]})]})]})}function qs(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:i,v8:r,copyEpochOf:f,site:x,initialKey:b,compact:h}=o,p=r===void 0?!1:r,y=x===void 0?null:x,m=b===void 0?null:b,d=h===void 0?!1:h,u=Z(),[c,g]=R.useState(m&&te(l[m])?m:null),[j,v]=R.useState("");let E;e[0]!==t||e[1]!==a||e[2]!==c||e[3]!==p?(E=A=>{A!==c&&(t?.(),!p&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=p,e[4]=E):E=e[4];const k=E;let S;e[5]!==f||e[6]!==c?(S=c?f?.(c)??0:0,e[5]=f,e[6]=c,e[7]=S):S=e[7];const N=S,[_,C]=R.useState(N);_!==N&&(C(N),!p&&c!==null&&a?.(c));const T=c?l[c]:void 0;let w,B,O,J,P;if(e[8]!==d||e[9]!==l||e[10]!==j||e[11]!==k||e[12]!==c||e[13]!==u){const A=j.trim().toLowerCase(),F=xs(l).map(M=>({...M,blocks:A?M.blocks.filter(U=>U.label.toLowerCase().includes(A)||U.key.toLowerCase().includes(A)||(M.resolveType??"").toLowerCase().includes(A)):M.blocks})).filter(Ys),xe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const re=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==re?(w=ne("flex min-h-0 flex-col",re),e[21]=re,e[22]=w):w=e[22];let se;e[23]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(cs,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),e[23]=se):se=e[23];let ae;e[24]===Symbol.for("react.memo_cache_sentinel")?(ae=M=>v(M.target.value),e[24]=ae):ae=e[24];let q;e[25]!==u?(q=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=q):q=e[26];let Y;e[27]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=Y):Y=e[28],e[29]!==j||e[30]!==q||e[31]!==Y?(B=s.jsx("div",{className:"shrink-0 border-b p-2",children:s.jsxs("div",{className:"relative",children:[se,s.jsx(ge,{type:"search",value:j,onChange:ae,placeholder:q,"aria-label":Y,className:"pl-8"})]})}),e[29]=j,e[30]=q,e[31]=Y,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=xe===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noBlocks")}):F.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noMatches")}):F.map(M=>s.jsxs("section",{"aria-label":M.resolveType??u("sandbox.schemaless.noType"),className:"py-1",children:[s.jsxs("h3",{className:"flex items-baseline gap-2 px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",title:M.resolveType??void 0,children:[s.jsx("span",{className:"truncate",children:M.resolveType?ke(M.resolveType):u("sandbox.schemaless.noType")}),s.jsx("span",{className:"ml-auto shrink-0 tabular-nums",children:M.blocks.length})]}),s.jsx("ul",{children:M.blocks.map(U=>s.jsx("li",{children:s.jsx("button",{type:"button",onClick:()=>k(U.key),"aria-current":U.key===c?"true":void 0,title:U.key,className:ne("block w-full truncate px-3 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",U.key===c&&"bg-accent font-medium"),children:U.label})},U.key))})]},M.resolveType??"")),e[8]=d,e[9]=l,e[10]=j,e[11]=k,e[12]=c,e[13]=u,e[14]=w,e[15]=B,e[16]=O,e[17]=J,e[18]=P}else w=e[14],B=e[15],O=e[16],J=e[17],P=e[18];let $;e[33]!==O||e[34]!==J?($=s.jsx("div",{className:O,children:J}),e[33]=O,e[34]=J,e[35]=$):$=e[35];let D;e[36]!==w||e[37]!==B||e[38]!==$||e[39]!==P?(D=s.jsxs("nav",{"aria-label":P,className:w,children:[B,$]}),e[36]=w,e[37]=B,e[38]=$,e[39]=P,e[40]=D):D=e[40];const I=D;let L;e[41]!==T||e[42]!==d||e[43]!==f||e[44]!==n||e[45]!==a||e[46]!==k||e[47]!==c||e[48]!==u||e[49]!==p?(L=c&&te(T)?s.jsx(Hs,{blockKey:c,block:T,onOpenBlock:p?a:void 0,onChange:n,onBack:d?()=>k(null):void 0},`${c}:${f?.(c)??0}`):s.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u("sandbox.schemaless.pickBlock")})}),e[41]=T,e[42]=d,e[43]=f,e[44]=n,e[45]=a,e[46]=k,e[47]=c,e[48]=u,e[49]=p,e[50]=L):L=e[50];const Q=L;let X;e[51]!==Q||e[52]!==c||e[53]!==p||e[54]!==i?(X=p&&c&&i?i(c,Q):Q,e[51]=Q,e[52]=c,e[53]=p,e[54]=i,e[55]=X):X=e[55];const ee=X;let G;e[56]!==y?(G=s.jsx(Vs,{site:y}),e[56]=y,e[57]=G):G=e[57];let V;e[58]!==T||e[59]!==d||e[60]!==ee||e[61]!==I||e[62]!==c?(V=d&&c&&te(T)?ee:I,e[58]=T,e[59]=d,e[60]=ee,e[61]=I,e[62]=c,e[63]=V):V=e[63];const ie=!d&&ee;let H;e[64]!==V||e[65]!==ie?(H=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,ie]}),e[64]=V,e[65]=ie,e[66]=H):H=e[66];let le;return e[67]!==G||e[68]!==H?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,H]}),e[67]=G,e[68]=H,e[69]=le):le=e[69],le}function Ys(o){return o.blocks.length>0}function $t(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:i,compact:r}=o,f=ns(n)?.metadata;let x;e[0]!==f?(x=Ke(f),e[0]=f,e[1]=x):x=e[1];const b=x;let h;e[2]!==t||e[3]!==l||e[4]!==n?(h={orgSlug:l,virtualMcpId:n,branch:t},e[2]=t,e[3]=l,e[4]=n,e[5]=h):h=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={holdsCopy:!0},e[6]=p):p=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,p);let c;e[7]!==t||e[8]!==l||e[9]!==n?(c=ss({orgSlug:l,virtualMcpId:n,branch:t}),e[7]=t,e[8]=l,e[9]=n,e[10]=c):c=e[10];const g=ts(c);let j;e[11]!==m?(j=()=>m(),e[11]=m,e[12]=j):j=e[12];const v=R.useEffectEvent(j);let E;e[13]!==v?(E=()=>()=>v(),e[13]=v,e[14]=E):E=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[15]=k):k=e[15],R.useEffect(E,k);let S;e[16]!==y?(S=(C,T)=>y(C,T),e[16]=y,e[17]=S):S=e[17];let N;e[18]!==t||e[19]!==a||e[20]!==l||e[21]!==u||e[22]!==n?(N=u?(C,T)=>s.jsx(Ye,{listing:a,scope:{orgSlug:l,virtualMcpId:n,branch:t},names:[C],children:T}):void 0,e[18]=t,e[19]=a,e[20]=l,e[21]=u,e[22]=n,e[23]=N):N=e[23];let _;return e[24]!==r||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==i||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(qs,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:i,compact:r}),e[24]=r,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=i,e[30]=b,e[31]=N,e[32]=S,e[33]=u,e[34]=_):_=e[34],_}const Ce={resolveType:"website/pages/Page.tsx",seoResolveType:"website/sections/Seo/SeoV2.tsx"};function At(o){return`pages-${encodeURIComponent(o)}-${crypto.randomUUID()}`}function zt(o,e,l){if(hs(l))return{name:o,path:e,sections:[],__resolveType:"page"};const n=vs(l??void 0);if(!l||ys(n))return{name:o,path:e,sections:[],seo:{__resolveType:Ce.seoResolveType},__resolveType:Ce.resolveType};const t=Ss(l);return{name:o,path:e,sections:[],...t?{seo:{__resolveType:t}}:{},__resolveType:n}}const Be="__blank__";function It(o){const e=W.c(65),{id:l,value:n,onChange:t,templates:a,disabled:i}=o,r=Z(),[f,x]=R.useState(!1);let b;if(e[0]!==a||e[1]!==n){let I;e[3]!==n?(I=L=>L.key===n,e[3]=n,e[4]=I):I=e[4],b=a.find(I),e[0]=a,e[1]=n,e[2]=b}else b=e[2];const h=b;let p;e[5]!==h?.name||e[6]!==r?(p=h?.name??r("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=r,e[7]=p):p=e[7];let y;e[8]!==p?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:p}),e[8]=p,e[9]=y):y=e[9];let m;e[10]!==h?(m=h?.path?s.jsx("span",{className:"truncate text-muted-foreground",children:h.path}):null,e[10]=h,e[11]=m):m=e[11];let d;e[12]!==y||e[13]!==m?(d=s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[y,m]}),e[12]=y,e[13]=m,e[14]=d):d=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ts,{className:"shrink-0 opacity-50"}),e[15]=u):u=e[15];let c;e[16]!==i||e[17]!==l||e[18]!==f||e[19]!==d?(c=s.jsx(Rs,{asChild:!0,children:s.jsxs(K,{id:l,type:"button",variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=i,e[17]=l,e[18]=f,e[19]=d,e[20]=c):c=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[21]=g):g=e[21];let j;e[22]!==r?(j=r("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=r,e[23]=j):j=e[23];let v;e[24]!==j?(v=s.jsx(_s,{placeholder:j,className:"h-9"}),e[24]=j,e[25]=v):v=e[25];let E;e[26]!==r?(E=r("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=r,e[27]=E):E=e[27];let k;e[28]!==E?(k=s.jsx(Es,{children:E}),e[28]=E,e[29]=k):k=e[29];let S;e[30]!==r?(S=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=r,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),x(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==r?(_=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=r,e[35]=_):_=e[35];const C=n===Be?"opacity-100":"opacity-0";let T;e[36]!==C?(T=ne("ml-auto",C),e[36]=C,e[37]=T):T=e[37];let w;e[38]!==T?(w=s.jsx(ve,{className:T}),e[38]=T,e[39]=w):w=e[39];let B;e[40]!==S||e[41]!==N||e[42]!==_||e[43]!==w?(B=s.jsxs(we,{value:S,onSelect:N,children:[_,w]}),e[40]=S,e[41]=N,e[42]=_,e[43]=w,e[44]=B):B=e[44];let O;if(e[45]!==t||e[46]!==a||e[47]!==n){let I;e[49]!==t||e[50]!==n?(I=L=>s.jsxs(we,{value:`${L.name} ${L.path}`,onSelect:()=>{t(L.key),x(!1)},children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:L.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:L.path})]}),s.jsx(ve,{className:ne("ml-auto",n===L.key?"opacity-100":"opacity-0")})]},L.key),e[49]=t,e[50]=n,e[51]=I):I=e[51],O=a.map(I),e[45]=t,e[46]=a,e[47]=n,e[48]=O}else O=e[48];let J;e[52]!==B||e[53]!==O?(J=s.jsxs(ws,{children:[B,O]}),e[52]=B,e[53]=O,e[54]=J):J=e[54];let P;e[55]!==k||e[56]!==J?(P=s.jsxs(Cs,{onWheel:Zs,children:[k,J]}),e[55]=k,e[56]=J,e[57]=P):P=e[57];let $;e[58]!==v||e[59]!==P?($=s.jsx(Ps,{className:"p-0",style:g,children:s.jsxs(Bs,{children:[v,P]})}),e[58]=v,e[59]=P,e[60]=$):$=e[60];let D;return e[61]!==f||e[62]!==$||e[63]!==c?(D=s.jsxs(Os,{open:f,onOpenChange:x,children:[c,$]}),e[61]=f,e[62]=$,e[63]=c,e[64]=D):D=e[64],D}function Zs(o){const e=o.deltaMode===1?16:1;o.currentTarget.scrollTop=o.currentTarget.scrollTop+o.deltaY*e}function Qs(o){const e=W.c(13),{crumbs:l,onSelect:n,onSelectRoot:t}=o;let a;e[0]!==n||e[1]!==t?(a=t??(()=>n(0)),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==a?(i={onSelect:a},e[3]=a,e[4]=i):i=e[4];let r;if(e[5]!==l||e[6]!==n){let x;e[8]!==n?(x=(b,h)=>({key:`block-${h}`,label:Ze(b),onSelect:()=>n(h)}),e[8]=n,e[9]=x):x=e[9],r=l.map(x),e[5]=l,e[6]=n,e[7]=r}else r=e[7];let f;return e[10]!==i||e[11]!==r?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:i,items:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12],f}const Xs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Xs[o]}function Ve(o,e,l){const n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(l)&&e in a)return!0;return!1}function st(o,e,l){return/\.tsx?$/.test(e)?!0:Ve(o,e,l)}function Mt(o,e){const l=new Set,n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(e))for(const i of Object.keys(a))l.add(i);return l}function tt(o,e){return/\.tsx?$/.test(o)?!1:e.has(`${o}.ts`)||e.has(`${o}.tsx`)}function nt(o,e){const l=o.manifest?.blocks??{},n=[],t=new Set;for(const[a,i]of Object.entries(l))if(a.includes(e))for(const r of Object.keys(i))t.add(r);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const i=js(a,o);if(i.hidden)continue;const r=i.title&&i.title!==a?i.title:ce(a);n.push({resolveType:a,title:r})}return n.sort((a,i)=>a.title.localeCompare(i.title))}function Jt(o,e){return nt(o,e).length}function Ne(o){return o.startsWith("deco-sites/")?o.split("/")[1]||"site":o.startsWith("$live")||o.startsWith("deco/")?"deco":o.split("/")[0]||"other"}const lt={deco:"Deco",std:"Deco Standard",website:"Website"};function Vt(o){return lt[o]??o}function Dt(o){const e=Ne(o);let n=o.split("/").filter(Boolean).slice(o.startsWith("deco-sites/")?2:1);return(n[0]==="loaders"||n[0]==="actions")&&(n=n.slice(1)),[e,...n.slice(0,-1)]}function Ft(o,e,l){const n=[];for(const[t,a]of Object.entries(e)){if(st(o,t,l)||Ge(t)||!a||typeof a!="object"||Array.isArray(a))continue;const i=a,r=i.__resolveType;typeof r=="string"&&(ze.has(r)||Je.has(Ne(r))||Ve(o,r,l)&&n.push({key:t,resolveType:r,title:typeof i.name=="string"&&i.name?i.name:t}))}return n.sort((t,a)=>t.title.localeCompare(a.title))}function Ut(o,e){const l=o[e],n=typeof l?.__resolveType=="string"?l.__resolveType:"",{__resolveType:t,...a}=l??{},i=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:i}}const Re=3e4;function at(o,e,l,n){const t=new URL(`/deco/invoke/${e}`,o);return t.searchParams.set("__cb",n.toString(36)),t.searchParams.set("__decoFBT","0"),t.searchParams.set("__d",`run-${n.toString(36)}`),t.searchParams.set("props",btoa(encodeURIComponent(JSON.stringify(l)))),t.href}async function ot(o,{resolveType:e,props:l}){let n;try{n=await fetch(bs(o),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...l}),signal:AbortSignal.timeout(Re)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):r}const t=await n.text();let a=null,i=!1;try{a=t?JSON.parse(t):null,i=!0}catch{}if(!n.ok){const r=i&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(r)}return i?a:t}function it(o){const e=W.c(2);let l;return e[0]!==o?(l={mutationFn:n=>ot(o,n)},e[0]=o,e[1]=l):l=e[1],He(l)}function Kt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:i,target:r,initialValue:f,isCreating:x,onCreate:b,onSaveReferencedBlock:h,onBack:p,backLabel:y,showRun:m=!0}){const d=Ls(),u=d?.taskId??null,c=Z(),g=d?.virtualMcpId,v=ls(g===e?e:null)?.metadata?.siteSlug??null,E=gs(r.resolveType,t),k=!E&&ks(r.resolveType,t),S=k?Ns(f):null,N=E??S,[_,C]=R.useState(f),[T,w]=R.useState([]),[B,O]=R.useState(0),[J,P]=R.useState(!1),[$,D]=R.useState(null),[I,L]=R.useState(!1),[Q,X]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:ie,flush:H,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:r.mode==="saved"}),A=it({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{H()},[]);const F=et(i),xe=r.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??r.resolveType,re={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{C(z),r.mode==="saved"&&ie(r.blockKey,{__resolveType:r.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},q=z=>{const oe=z??"";try{const de=JSON.parse(oe);if(de&&typeof de=="object"&&!Array.isArray(de)){P(!1),se(de);return}P(!0)}catch{P(!0)}},Y=async z=>{const oe=es(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:r.resolveType,..._}),L(!1)},M=()=>{X(!0),A.mutate({resolveType:r.resolveType,props:_})},U=()=>{n&&window.open(at(n,r.resolveType,_,Date.now()),"_blank","noopener")},De=[r.title,...T],Fe=z=>{w(T.slice(0,z)),O(oe=>oe+1)};return s.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[s.jsx(Qs,{crumbs:De,onSelect:Fe,onSelectRoot:p}),s.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[p&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:p,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),r.mode==="saved"&&s.jsx(Is,{isPending:le,isError:!1}),m&&s.jsxs(K,{size:"default",variant:"outline",className:"shrink-0 gap-1.5",onClick:M,disabled:A.isPending,"aria-label":c("sandbox.runnableBlockEditor.runAriaLabel",{singular:F}),children:[A.isPending?s.jsx(je,{className:"size-3.5"}):s.jsx(As,{size:14}),c("sandbox.runnableBlockEditor.run")]}),r.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:x,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(is,{size:14})})}),s.jsx(me,{side:"bottom",children:c("sandbox.runnableBlockEditor.saveAsGlobal",{singular:F})})]}),s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:V?"default":"ghost",size:"icon",className:"shrink-0",onClick:ae,"aria-label":c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson"),"aria-pressed":V,children:V?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})}),s.jsx(me,{side:"bottom",children:c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson")})]})]}),s.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:r.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:xe,singular:F})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:ne("relative min-h-0 flex-1",Q&&ee&&"hidden"),children:[s.jsx(zs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsxs("div",{className:"mx-auto max-w-2xl",children:[S&&N===S&&s.jsx("p",{className:"mb-3 rounded-md bg-muted px-3 py-2 text-xs leading-snug text-muted-foreground",children:c("sandbox.runnableBlockEditor.inferredSchemaNotice",{singular:F})}),N?s.jsx(Qe,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:w,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:re},B):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:k?c("sandbox.runnableBlockEditor.freeformPropsEmptyState",{singular:F}):c("sandbox.runnableBlockEditor.noInputEmptyState",{singular:F})})]})})}),$!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[J&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.runnableBlockEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ie,{language:"json",height:"100%",code:$,onChange:q,onSave:z=>{q(z),H()}})})]})]}),Q&&s.jsx(rt,{singular:F,result:{isPending:A.isPending,error:A.error,data:A.data,hasRun:A.status!=="idle"},expanded:ee,onToggleExpand:()=>G(z=>!z),onOpenInNewTab:n?U:void 0,onClose:()=>{X(!1),G(!1)}})]}),s.jsx(Xe,{open:I,onOpenChange:L,defaultBlockId:"",isPending:x,onSubmit:Y})]})}function rt(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:i,onClose:r}=o,f=Z();let x;e[0]!==n.data?(x=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=x):x=e[1];const b=x,h=t?"flex-1":"h-[45%] shrink-0";let p;e[2]!==h?(p=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=p):p=e[3];let y;e[4]!==f?(y=f("sandbox.runnableBlockEditor.resultPanelTitle"),e[4]=f,e[5]=y):y=e[5];let m;e[6]!==y?(m=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:y}),e[6]=y,e[7]=m):m=e[7];let d;e[8]!==i||e[9]!==l||e[10]!==f?(d=i&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":f("sandbox.runnableBlockEditor.openResultInNewTabAriaLabel"),children:s.jsx(Oe,{size:14})})}),s.jsx(me,{side:"bottom",children:f("sandbox.runnableBlockEditor.openInNewTabTooltip",{singular:l})})]}),e[8]=i,e[9]=l,e[10]=f,e[11]=d):d=e[11];let u;e[12]!==t||e[13]!==f?(u=f(t?"sandbox.runnableBlockEditor.collapseResult":"sandbox.runnableBlockEditor.expandResult"),e[12]=t,e[13]=f,e[14]=u):u=e[14];let c;e[15]!==t?(c=t?s.jsx(rs,{size:14}):s.jsx($s,{size:14}),e[15]=t,e[16]=c):c=e[16];let g;e[17]!==t||e[18]!==a||e[19]!==u||e[20]!==c?(g=s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":u,"aria-pressed":t,children:c})}),e[17]=t,e[18]=a,e[19]=u,e[20]=c,e[21]=g):g=e[21];let j;e[22]!==t||e[23]!==f?(j=f(t?"sandbox.runnableBlockEditor.collapse":"sandbox.runnableBlockEditor.expand"),e[22]=t,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(me,{side:"bottom",children:j}),e[25]=j,e[26]=v):v=e[26];let E;e[27]!==v||e[28]!==g?(E=s.jsxs(ue,{children:[g,v]}),e[27]=v,e[28]=g,e[29]=E):E=e[29];let k;e[30]!==f?(k=f("sandbox.runnableBlockEditor.closeResult"),e[30]=f,e[31]=k):k=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ye,{size:14}),e[32]=S):S=e[32];let N;e[33]!==r||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":k,children:S}),e[33]=r,e[34]=k,e[35]=N):N=e[35];let _;e[36]!==E||e[37]!==N||e[38]!==d?(_=s.jsxs("div",{className:"flex items-center gap-0.5",children:[d,E,N]}),e[36]=E,e[37]=N,e[38]=d,e[39]=_):_=e[39];let C;e[40]!==_||e[41]!==m?(C=s.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between border-b px-3",children:[m,_]}),e[40]=_,e[41]=m,e[42]=C):C=e[42];let T;e[43]!==n.error||e[44]!==n.hasRun||e[45]!==n.isPending||e[46]!==b||e[47]!==l||e[48]!==f?(T=s.jsx("div",{className:"min-h-0 flex-1",children:n.isPending?s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),f("sandbox.runnableBlockEditor.running",{singular:l})]}):n.error?s.jsxs("div",{className:"h-full overflow-auto px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-destructive",children:f("sandbox.runnableBlockEditor.failedToRun",{singular:l})}),s.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-destructive/90",children:n.error.message})]}):n.hasRun?s.jsx(Ie,{language:"json",height:"100%",code:b,readOnly:!0}):s.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:f("sandbox.runnableBlockEditor.pressRunToInvoke",{singular:l})})}),e[43]=n.error,e[44]=n.hasRun,e[45]=n.isPending,e[46]=b,e[47]=l,e[48]=f,e[49]=T):T=e[49];let w;return e[50]!==C||e[51]!==T||e[52]!==p?(w=s.jsxs("div",{className:p,children:[C,T]}),e[50]=C,e[51]=T,e[52]=p,e[53]=w):w=e[53],w}function be(o,e,l){const n=l[o];return typeof n?.name=="string"&&n.name||o.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase())||`Section ${e+1}`}function Wt(o,e,l=!1){return o.map((n,t)=>{const a=n.__resolveType??"",i=Se(a);if(!i&&a!==""&&pe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const r=i?n.section:void 0,f=i?r?.__resolveType??"":a;if(Te(f,l)){const b=i?r:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&qe(h[0]?.rule?.__resolveType,l)){const m=he(h[0],l)??{};let d=m.__resolveType??"";const u=Se(d);let c=m;if(u){const g=m.section;d=g?.__resolveType??d,g&&(c=g)}if(Te(d,l)){const g=Array.isArray(c.variants)?c.variants:[],j=he(g[0],l)?.__resolveType,v=j?ce(j):"Section";return{index:t,resolveType:a,label:`Variants of ${v}`,variantOf:v,isHidden:!0,isLazy:u}}return d!==""&&pe(d)&&d in e?{index:t,resolveType:a,label:be(d,t,e),isHidden:!0,isLazy:u,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(d)||`Section ${t+1}`,isHidden:!0,isLazy:u}}const p=he(h[0],l)?.__resolveType,y=p?ce(p):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:i}}const x=i?n.section?.__resolveType??a:a;return i&&x!==""&&pe(x)&&x in e?{index:t,resolveType:a,label:be(x,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(x)||`Section ${t+1}`,isLazy:i}})}function Gt(o){let e=o.length;for(;e>0&&o[e-1]?.isSavedBlock;)e--;return e>0?e:Math.max(o.length-1,0)}export{Be as B,It as P,Kt as R,$t as S,nt as a,Dt as b,zt as c,Vt as d,et as e,Qs as f,At as g,Jt as h,Ft as l,Mt as m,Gt as n,Wt as p,Ut as r};
4
+ `).length)),onChange:f=>t(f.target.value)}):s.jsx(ge,{id:l,value:n,onChange:f=>t(f.target.value)}),e[2]=l,e[3]=i,e[4]=t,e[5]=n,e[6]=r):r=e[6],r}function Ks(o){const e=W.c(15),{id:l,value:n,onChange:t}=o,a=Z(),[i,r]=R.useState(String(n));let f;e[0]!==i?(f=Ee(i),e[0]=i,e[1]=f):f=e[1];const x=f===null;let b;e[2]!==t?(b=m=>{r(m.target.value);const d=Ee(m.target.value);d!==null&&t(d)},e[2]=t,e[3]=b):b=e[3];let h;e[4]!==l||e[5]!==x||e[6]!==b||e[7]!==i?(h=s.jsx(ge,{id:l,inputMode:"decimal",value:i,"aria-invalid":x,onChange:b}),e[4]=l,e[5]=x,e[6]=b,e[7]=i,e[8]=h):h=e[8];let p;e[9]!==x||e[10]!==a?(p=x&&s.jsx("p",{className:"text-xs text-destructive",children:a("sandbox.schemaless.notANumber")}),e[9]=x,e[10]=a,e[11]=p):p=e[11];let y;return e[12]!==h||e[13]!==p?(y=s.jsxs("div",{className:"flex flex-col gap-1",children:[h,p]}),e[12]=h,e[13]=p,e[14]=y):y=e[14],y}function Me(o){const e=W.c(67),{label:l,value:n,path:t,depth:a,onChange:i}=o,r=Z();let f;e[0]!==t?(f=Fs(t),e[0]=t,e[1]=f):f=e[1];const x=f;if(typeof n=="boolean"){let m;e[2]!==x||e[3]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[2]=x,e[3]=l,e[4]=m):m=e[4];let d;e[5]!==i||e[6]!==t?(d=g=>i(t,g),e[5]=i,e[6]=t,e[7]=d):d=e[7];let u;e[8]!==x||e[9]!==d||e[10]!==n?(u=s.jsx(ds,{id:x,checked:n,onCheckedChange:d}),e[8]=x,e[9]=d,e[10]=n,e[11]=u):u=e[11];let c;return e[12]!==m||e[13]!==u?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m,u]}),e[12]=m,e[13]=u,e[14]=c):c=e[14],c}if(typeof n=="string"||typeof n=="number"){let m;e[15]!==x||e[16]!==l?(m=s.jsx(_e,{htmlFor:x,className:"min-w-0 truncate",children:l}),e[15]=x,e[16]=l,e[17]=m):m=e[17];let d;e[18]!==x||e[19]!==i||e[20]!==t||e[21]!==n?(d=typeof n=="string"?s.jsx(Us,{id:x,value:n,onChange:c=>i(t,c)}):s.jsx(Ks,{id:x,value:n,onChange:c=>i(t,c)}),e[18]=x,e[19]=i,e[20]=t,e[21]=n,e[22]=d):d=e[22];let u;return e[23]!==m||e[24]!==d?(u=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,d]}),e[23]=m,e[24]=d,e[25]=u):u=e[25],u}if(Array.isArray(n)||te(n)){let m,d,u,c,g;if(e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==t||e[30]!==r||e[31]!==n){const E=Array.isArray(n)?n.map((T,C)=>[Ds(T,C,r),T,C]):Object.entries(n).filter(Gs).map(Ws),k=te(n)&&typeof n.__resolveType=="string"?n.__resolveType:null;u=a===0,c="group rounded-md border border-border";let S;e[37]!==l?(S=s.jsx("span",{className:"min-w-0 truncate",children:l}),e[37]=l,e[38]=S):S=e[38];let N;e[39]!==k?(N=k&&s.jsx("span",{className:"min-w-0 truncate font-mono text-xs font-normal text-muted-foreground",title:k,children:ke(k)}),e[39]=k,e[40]=N):N=e[40];let _;e[41]!==r||e[42]!==n?(_=Array.isArray(n)?r("sandbox.schemaless.itemCount",{count:n.length}):null,e[41]=r,e[42]=n,e[43]=_):_=e[43];let w;e[44]!==_?(w=s.jsx("span",{className:"ml-auto shrink-0 text-xs font-normal text-muted-foreground",children:_}),e[44]=_,e[45]=w):w=e[45],e[46]!==w||e[47]!==S||e[48]!==N?(g=s.jsxs("summary",{className:"flex cursor-pointer select-none items-center gap-2 px-3 py-2 text-sm font-medium text-foreground",children:[S,N,w]}),e[46]=w,e[47]=S,e[48]=N,e[49]=g):g=e[49],m="flex flex-col gap-4 border-t border-border px-3 py-3",d=E.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.schemaless.empty")}):E.map(T=>{const[C,B,O]=T;return s.jsx(Me,{label:C,value:B,path:[...t,O],depth:a+1,onChange:i},O)}),e[26]=a,e[27]=l,e[28]=i,e[29]=t,e[30]=r,e[31]=n,e[32]=m,e[33]=d,e[34]=u,e[35]=c,e[36]=g}else m=e[32],d=e[33],u=e[34],c=e[35],g=e[36];let j;e[50]!==m||e[51]!==d?(j=s.jsx("div",{className:m,children:d}),e[50]=m,e[51]=d,e[52]=j):j=e[52];let v;return e[53]!==u||e[54]!==c||e[55]!==g||e[56]!==j?(v=s.jsxs("details",{open:u,className:c,children:[g,j]}),e[53]=u,e[54]=c,e[55]=g,e[56]=j,e[57]=v):v=e[57],v}let b;e[58]!==l?(b=s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:l}),e[58]=l,e[59]=b):b=e[59];let h;e[60]!==r?(h=r("sandbox.schemaless.notSet"),e[60]=r,e[61]=h):h=e[61];let p;e[62]!==h?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:h}),e[62]=h,e[63]=p):p=e[63];let y;return e[64]!==b||e[65]!==p?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b,p]}),e[64]=b,e[65]=p,e[66]=y):y=e[66],y}function Ws(o){const[e,l]=o;return[e,l,e]}function Gs(o){const[e]=o;return e!=="__resolveType"}function Hs({blockKey:o,block:e,onChange:l,onBack:n,onOpenBlock:t}){const a=Z(),[i,r]=R.useState(()=>(t?.(o),e)),[f,x]=R.useState(0),[b,h]=R.useState(null),[p,y]=R.useState(!1),m=v=>{r(v),l(o,v)},d=typeof i.__resolveType=="string"?i.__resolveType:null,u=Object.entries(i).filter(([v])=>v!=="__resolveType"),c=()=>{b!==null?(h(null),y(!1),x(v=>v+1)):h(JSON.stringify(i,null,2))},g=v=>{try{const E=JSON.parse(v??"");if(te(E)){y(!1),m(E);return}}catch{}y(!0)},j=a(b!==null?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson");return s.jsxs("div",{className:"flex h-full min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[n&&s.jsxs(K,{variant:"ghost",size:"sm",className:"shrink-0",onClick:n,children:[s.jsx($e,{"aria-hidden":"true"}),a("sandbox.schemaless.back")]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("h3",{className:"truncate text-sm font-medium",title:o,children:o}),d&&s.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:d,children:d})]}),s.jsx(K,{variant:b!==null?"default":"ghost",size:"icon",className:"shrink-0",onClick:c,"aria-label":j,"aria-pressed":b!==null,title:j,children:b!==null?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})]}),s.jsxs("div",{className:"relative min-h-0 flex-1",children:[s.jsx("div",{className:"h-full overflow-y-auto",children:s.jsx("form",{"aria-label":o,className:"mx-auto flex max-w-2xl flex-col gap-4 px-6 py-4",onSubmit:v=>v.preventDefault(),children:u.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.schemaless.empty")}):u.map(([v,E])=>s.jsx(Me,{label:v,value:E,path:[v],depth:0,onChange:(k,S)=>m(ps(i,k,S))},v))},f)}),b!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[p&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:a("sandbox.savedSectionEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),children:s.jsx(Ms,{language:"json",height:"100%",code:b,onChange:g})})})]})]})]})}function Ys(o){const e=W.c(70),{decofile:l,onChange:n,onLeaveBlock:t,onOpenBlock:a,wrapEditor:i,v8:r,copyEpochOf:f,site:x,initialKey:b,compact:h}=o,p=r===void 0?!1:r,y=x===void 0?null:x,m=b===void 0?null:b,d=h===void 0?!1:h,u=Z(),[c,g]=R.useState(m&&te(l[m])?m:null),[j,v]=R.useState("");let E;e[0]!==t||e[1]!==a||e[2]!==c||e[3]!==p?(E=A=>{A!==c&&(t?.(),!p&&A!==null&&a?.(A),g(A))},e[0]=t,e[1]=a,e[2]=c,e[3]=p,e[4]=E):E=e[4];const k=E;let S;e[5]!==f||e[6]!==c?(S=c?f?.(c)??0:0,e[5]=f,e[6]=c,e[7]=S):S=e[7];const N=S,[_,w]=R.useState(N);_!==N&&(w(N),!p&&c!==null&&a?.(c));const T=c?l[c]:void 0;let C,B,O,J,P;if(e[8]!==d||e[9]!==l||e[10]!==j||e[11]!==k||e[12]!==c||e[13]!==u){const A=j.trim().toLowerCase(),F=xs(l).map(M=>({...M,blocks:A?M.blocks.filter(U=>U.label.toLowerCase().includes(A)||U.key.toLowerCase().includes(A)||(M.resolveType??"").toLowerCase().includes(A)):M.blocks})).filter(qs),xe=Object.keys(l).length;e[19]!==u?(P=u("sandbox.schemaless.listLabel"),e[19]=u,e[20]=P):P=e[20];const re=d?"flex-1":"w-72 shrink-0 border-r";e[21]!==re?(C=ne("flex min-h-0 flex-col",re),e[21]=re,e[22]=C):C=e[22];let se;e[23]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(cs,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"}),e[23]=se):se=e[23];let ae;e[24]===Symbol.for("react.memo_cache_sentinel")?(ae=M=>v(M.target.value),e[24]=ae):ae=e[24];let Y;e[25]!==u?(Y=u("sandbox.schemaless.searchPlaceholder"),e[25]=u,e[26]=Y):Y=e[26];let q;e[27]!==u?(q=u("sandbox.schemaless.searchPlaceholder"),e[27]=u,e[28]=q):q=e[28],e[29]!==j||e[30]!==Y||e[31]!==q?(B=s.jsx("div",{className:"shrink-0 border-b p-2",children:s.jsxs("div",{className:"relative",children:[se,s.jsx(ge,{type:"search",value:j,onChange:ae,placeholder:Y,"aria-label":q,className:"pl-8"})]})}),e[29]=j,e[30]=Y,e[31]=q,e[32]=B):B=e[32],O="min-h-0 flex-1 overflow-y-auto py-1",J=xe===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noBlocks")}):F.length===0?s.jsx("p",{className:"px-4 py-6 text-center text-xs text-muted-foreground",children:u("sandbox.schemaless.noMatches")}):F.map(M=>s.jsxs("section",{"aria-label":M.resolveType??u("sandbox.schemaless.noType"),className:"py-1",children:[s.jsxs("h3",{className:"flex items-baseline gap-2 px-3 pt-2 pb-1 text-xs font-medium text-muted-foreground",title:M.resolveType??void 0,children:[s.jsx("span",{className:"truncate",children:M.resolveType?ke(M.resolveType):u("sandbox.schemaless.noType")}),s.jsx("span",{className:"ml-auto shrink-0 tabular-nums",children:M.blocks.length})]}),s.jsx("ul",{children:M.blocks.map(U=>s.jsx("li",{children:s.jsx("button",{type:"button",onClick:()=>k(U.key),"aria-current":U.key===c?"true":void 0,title:U.key,className:ne("block w-full truncate px-3 py-1.5 text-left text-sm hover:bg-accent focus-visible:bg-accent focus-visible:outline-none",U.key===c&&"bg-accent font-medium"),children:U.label})},U.key))})]},M.resolveType??"")),e[8]=d,e[9]=l,e[10]=j,e[11]=k,e[12]=c,e[13]=u,e[14]=C,e[15]=B,e[16]=O,e[17]=J,e[18]=P}else C=e[14],B=e[15],O=e[16],J=e[17],P=e[18];let $;e[33]!==O||e[34]!==J?($=s.jsx("div",{className:O,children:J}),e[33]=O,e[34]=J,e[35]=$):$=e[35];let D;e[36]!==C||e[37]!==B||e[38]!==$||e[39]!==P?(D=s.jsxs("nav",{"aria-label":P,className:C,children:[B,$]}),e[36]=C,e[37]=B,e[38]=$,e[39]=P,e[40]=D):D=e[40];const I=D;let L;e[41]!==T||e[42]!==d||e[43]!==f||e[44]!==n||e[45]!==a||e[46]!==k||e[47]!==c||e[48]!==u||e[49]!==p?(L=c&&te(T)?s.jsx(Hs,{blockKey:c,block:T,onOpenBlock:p?a:void 0,onChange:n,onBack:d?()=>k(null):void 0},`${c}:${f?.(c)??0}`):s.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u("sandbox.schemaless.pickBlock")})}),e[41]=T,e[42]=d,e[43]=f,e[44]=n,e[45]=a,e[46]=k,e[47]=c,e[48]=u,e[49]=p,e[50]=L):L=e[50];const Q=L;let X;e[51]!==Q||e[52]!==c||e[53]!==p||e[54]!==i?(X=p&&c&&i?i(c,Q):Q,e[51]=Q,e[52]=c,e[53]=p,e[54]=i,e[55]=X):X=e[55];const ee=X;let G;e[56]!==y?(G=s.jsx(Vs,{site:y}),e[56]=y,e[57]=G):G=e[57];let V;e[58]!==T||e[59]!==d||e[60]!==ee||e[61]!==I||e[62]!==c?(V=d&&c&&te(T)?ee:I,e[58]=T,e[59]=d,e[60]=ee,e[61]=I,e[62]=c,e[63]=V):V=e[63];const ie=!d&&ee;let H;e[64]!==V||e[65]!==ie?(H=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[V,ie]}),e[64]=V,e[65]=ie,e[66]=H):H=e[66];let le;return e[67]!==G||e[68]!==H?(le=s.jsxs("div",{"data-testid":"schemaless-content",className:"flex h-full min-h-0 w-full flex-col",children:[G,H]}),e[67]=G,e[68]=H,e[69]=le):le=e[69],le}function qs(o){return o.blocks.length>0}function $t(o){const e=W.c(35),{orgSlug:l,virtualMcpId:n,branch:t,decofile:a,initialKey:i,compact:r}=o,f=ns(n)?.metadata;let x;e[0]!==f?(x=Ke(f),e[0]=f,e[1]=x):x=e[1];const b=x;let h;e[2]!==t||e[3]!==l||e[4]!==n?(h={orgSlug:l,virtualMcpId:n,branch:t},e[2]=t,e[3]=l,e[4]=n,e[5]=h):h=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={holdsCopy:!0},e[6]=p):p=e[6];const{save:y,flush:m,hold:d,v8:u}=Le(h,p);let c;e[7]!==t||e[8]!==l||e[9]!==n?(c=ss({orgSlug:l,virtualMcpId:n,branch:t}),e[7]=t,e[8]=l,e[9]=n,e[10]=c):c=e[10];const g=ts(c);let j;e[11]!==m?(j=()=>m(),e[11]=m,e[12]=j):j=e[12];const v=R.useEffectEvent(j);let E;e[13]!==v?(E=()=>()=>v(),e[13]=v,e[14]=E):E=e[14];let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[15]=k):k=e[15],R.useEffect(E,k);let S;e[16]!==y?(S=(w,T)=>y(w,T),e[16]=y,e[17]=S):S=e[17];let N;e[18]!==t||e[19]!==a||e[20]!==l||e[21]!==u||e[22]!==n?(N=u?(w,T)=>s.jsx(qe,{listing:a,scope:{orgSlug:l,virtualMcpId:n,branch:t},names:[w],children:T}):void 0,e[18]=t,e[19]=a,e[20]=l,e[21]=u,e[22]=n,e[23]=N):N=e[23];let _;return e[24]!==r||e[25]!==g||e[26]!==a||e[27]!==m||e[28]!==d||e[29]!==i||e[30]!==b||e[31]!==N||e[32]!==S||e[33]!==u?(_=s.jsx(Ys,{decofile:a,site:b,onChange:S,onLeaveBlock:m,onOpenBlock:d,v8:u,wrapEditor:N,copyEpochOf:g,initialKey:i,compact:r}),e[24]=r,e[25]=g,e[26]=a,e[27]=m,e[28]=d,e[29]=i,e[30]=b,e[31]=N,e[32]=S,e[33]=u,e[34]=_):_=e[34],_}const we={resolveType:"website/pages/Page.tsx",seoResolveType:"website/sections/Seo/SeoV2.tsx"};function At(o){return`pages-${encodeURIComponent(o)}-${crypto.randomUUID()}`}function zt(o,e,l){if(hs(l))return{name:o,path:e,sections:[],__resolveType:"page"};const n=vs(l??void 0);if(!l||ys(n))return{name:o,path:e,sections:[],seo:{__resolveType:we.seoResolveType},__resolveType:we.resolveType};const t=Ss(l);return{name:o,path:e,sections:[],...t?{seo:{__resolveType:t}}:{},__resolveType:n}}const Be="__blank__";function It(o){const e=W.c(65),{id:l,value:n,onChange:t,templates:a,disabled:i}=o,r=Z(),[f,x]=R.useState(!1);let b;if(e[0]!==a||e[1]!==n){let I;e[3]!==n?(I=L=>L.key===n,e[3]=n,e[4]=I):I=e[4],b=a.find(I),e[0]=a,e[1]=n,e[2]=b}else b=e[2];const h=b;let p;e[5]!==h?.name||e[6]!==r?(p=h?.name??r("sectionsEditor.pageTemplateSelect.blankPageDefaultLabel"),e[5]=h?.name,e[6]=r,e[7]=p):p=e[7];let y;e[8]!==p?(y=s.jsx("span",{className:"max-w-full shrink-0 truncate",children:p}),e[8]=p,e[9]=y):y=e[9];let m;e[10]!==h?(m=h?.path?s.jsx("span",{className:"truncate text-muted-foreground",children:h.path}):null,e[10]=h,e[11]=m):m=e[11];let d;e[12]!==y||e[13]!==m?(d=s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[y,m]}),e[12]=y,e[13]=m,e[14]=d):d=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ts,{className:"shrink-0 opacity-50"}),e[15]=u):u=e[15];let c;e[16]!==i||e[17]!==l||e[18]!==f||e[19]!==d?(c=s.jsx(Rs,{asChild:!0,children:s.jsxs(K,{id:l,type:"button",variant:"outline",role:"combobox","aria-expanded":f,disabled:i,className:"w-full justify-between font-normal contain-inline-size",children:[d,u]})}),e[16]=i,e[17]=l,e[18]=f,e[19]=d,e[20]=c):c=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g={width:"var(--radix-popover-trigger-width)"},e[21]=g):g=e[21];let j;e[22]!==r?(j=r("sectionsEditor.pageTemplateSelect.searchPlaceholder"),e[22]=r,e[23]=j):j=e[23];let v;e[24]!==j?(v=s.jsx(_s,{placeholder:j,className:"h-9"}),e[24]=j,e[25]=v):v=e[25];let E;e[26]!==r?(E=r("sectionsEditor.pageTemplateSelect.noPagesFoundMessage"),e[26]=r,e[27]=E):E=e[27];let k;e[28]!==E?(k=s.jsx(Es,{children:E}),e[28]=E,e[29]=k):k=e[29];let S;e[30]!==r?(S=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[30]=r,e[31]=S):S=e[31];let N;e[32]!==t?(N=()=>{t(Be),x(!1)},e[32]=t,e[33]=N):N=e[33];let _;e[34]!==r?(_=r("sectionsEditor.pageTemplateSelect.blankPageLabel"),e[34]=r,e[35]=_):_=e[35];const w=n===Be?"opacity-100":"opacity-0";let T;e[36]!==w?(T=ne("ml-auto",w),e[36]=w,e[37]=T):T=e[37];let C;e[38]!==T?(C=s.jsx(ve,{className:T}),e[38]=T,e[39]=C):C=e[39];let B;e[40]!==S||e[41]!==N||e[42]!==_||e[43]!==C?(B=s.jsxs(Ce,{value:S,onSelect:N,children:[_,C]}),e[40]=S,e[41]=N,e[42]=_,e[43]=C,e[44]=B):B=e[44];let O;if(e[45]!==t||e[46]!==a||e[47]!==n){let I;e[49]!==t||e[50]!==n?(I=L=>s.jsxs(Ce,{value:`${L.name} ${L.path}`,onSelect:()=>{t(L.key),x(!1)},children:[s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate",children:L.name}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:L.path})]}),s.jsx(ve,{className:ne("ml-auto",n===L.key?"opacity-100":"opacity-0")})]},L.key),e[49]=t,e[50]=n,e[51]=I):I=e[51],O=a.map(I),e[45]=t,e[46]=a,e[47]=n,e[48]=O}else O=e[48];let J;e[52]!==B||e[53]!==O?(J=s.jsxs(Cs,{children:[B,O]}),e[52]=B,e[53]=O,e[54]=J):J=e[54];let P;e[55]!==k||e[56]!==J?(P=s.jsxs(ws,{onWheel:Zs,children:[k,J]}),e[55]=k,e[56]=J,e[57]=P):P=e[57];let $;e[58]!==v||e[59]!==P?($=s.jsx(Ps,{className:"p-0",style:g,children:s.jsxs(Bs,{children:[v,P]})}),e[58]=v,e[59]=P,e[60]=$):$=e[60];let D;return e[61]!==f||e[62]!==$||e[63]!==c?(D=s.jsxs(Os,{open:f,onOpenChange:x,children:[c,$]}),e[61]=f,e[62]=$,e[63]=c,e[64]=D):D=e[64],D}function Zs(o){const e=o.deltaMode===1?16:1;o.currentTarget.scrollTop=o.currentTarget.scrollTop+o.deltaY*e}function Qs(o){const e=W.c(13),{crumbs:l,onSelect:n,onSelectRoot:t}=o;let a;e[0]!==n||e[1]!==t?(a=t??(()=>n(0)),e[0]=n,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==a?(i={onSelect:a},e[3]=a,e[4]=i):i=e[4];let r;if(e[5]!==l||e[6]!==n){let x;e[8]!==n?(x=(b,h)=>({key:`block-${h}`,label:Ze(b),onSelect:()=>n(h)}),e[8]=n,e[9]=x):x=e[9],r=l.map(x),e[5]=l,e[6]=n,e[7]=r}else r=e[7];let f;return e[10]!==i||e[11]!==r?(f=s.jsx(We.Breadcrumbs,{after:"page",parent:i,items:r}),e[10]=i,e[11]=r,e[12]=f):f=e[12],f}const Xs={loaders:"loader",actions:"action"},Je=new Set(["workflows"]);function et(o){return Xs[o]}function Ve(o,e,l){const n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(l)&&e in a)return!0;return!1}function st(o,e,l){return/\.tsx?$/.test(e)?!0:Ve(o,e,l)}function Mt(o,e){const l=new Set,n=o.manifest?.blocks??{};for(const[t,a]of Object.entries(n))if(t.includes(e))for(const i of Object.keys(a))l.add(i);return l}function tt(o,e){return/\.tsx?$/.test(o)?!1:e.has(`${o}.ts`)||e.has(`${o}.tsx`)}function nt(o,e){const l=o.manifest?.blocks??{},n=[],t=new Set;for(const[a,i]of Object.entries(l))if(a.includes(e))for(const r of Object.keys(i))t.add(r);for(const a of t){if(a.toLowerCase().includes("preview")||ze.has(a)||Je.has(Ne(a))||tt(a,t))continue;const i=js(a,o);if(i.hidden)continue;const r=i.title&&i.title!==a?i.title:ce(a);n.push({resolveType:a,title:r})}return n.sort((a,i)=>a.title.localeCompare(i.title))}function Jt(o,e){return nt(o,e).length}function Ne(o){return o.startsWith("deco-sites/")?o.split("/")[1]||"site":o.startsWith("$live")||o.startsWith("deco/")?"deco":o.split("/")[0]||"other"}const lt={deco:"Deco",std:"Deco Standard",website:"Website"};function Vt(o){return lt[o]??o}function Dt(o){const e=Ne(o);let n=o.split("/").filter(Boolean).slice(o.startsWith("deco-sites/")?2:1);return(n[0]==="loaders"||n[0]==="actions")&&(n=n.slice(1)),[e,...n.slice(0,-1)]}function Ft(o,e,l){const n=[];for(const[t,a]of Object.entries(e)){if(st(o,t,l)||Ge(t)||!a||typeof a!="object"||Array.isArray(a))continue;const i=a,r=i.__resolveType;typeof r=="string"&&(ze.has(r)||Je.has(Ne(r))||Ve(o,r,l)&&n.push({key:t,resolveType:r,title:typeof i.name=="string"&&i.name?i.name:t}))}return n.sort((t,a)=>t.title.localeCompare(a.title))}function Ut(o,e){const l=o[e],n=typeof l?.__resolveType=="string"?l.__resolveType:"",{__resolveType:t,...a}=l??{},i=typeof l?.name=="string"&&l.name?l.name:e;return{resolveType:n,props:a,title:i}}const Re=3e4;function at(o,e,l,n){const t=new URL(`/deco/invoke/${e}`,o);return t.searchParams.set("__cb",n.toString(36)),t.searchParams.set("__decoFBT","0"),t.searchParams.set("__d",`run-${n.toString(36)}`),t.searchParams.set("props",btoa(encodeURIComponent(JSON.stringify(l)))),t.href}async function ot(o,{resolveType:e,props:l}){let n;try{n=await fetch(bs(o),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...l}),signal:AbortSignal.timeout(Re)})}catch(r){throw r instanceof DOMException&&r.name==="TimeoutError"?new Error(`Run timed out after ${Re/1e3}s — the block may be slow or the preview unresponsive.`):r}const t=await n.text();let a=null,i=!1;try{a=t?JSON.parse(t):null,i=!0}catch{}if(!n.ok){const r=i&&a&&typeof a=="object"&&"error"in a&&typeof a.error=="string"?a.error:t||`Run failed (${n.status})`;throw new Error(r)}return i?a:t}function it(o){const e=W.c(2);let l;return e[0]!==o?(l={mutationFn:n=>ot(o,n)},e[0]=o,e[1]=l):l=e[1],He(l)}function Kt({orgSlug:o,virtualMcpId:e,branch:l,previewUrl:n,meta:t,decofile:a,kind:i,target:r,initialValue:f,isCreating:x,onCreate:b,onSaveReferencedBlock:h,onBack:p,backLabel:y,showRun:m=!0}){const d=Ls(),u=d?.taskId??null,c=Z(),g=d?.virtualMcpId,v=ls(g===e?e:null)?.metadata?.siteSlug??null,E=gs(r.resolveType,t),k=!E&&ks(r.resolveType,t),S=k?Ns(f):null,N=E??S,[_,w]=R.useState(f),[T,C]=R.useState([]),[B,O]=R.useState(0),[J,P]=R.useState(!1),[$,D]=R.useState(null),[I,L]=R.useState(!1),[Q,X]=R.useState(!1),[ee,G]=R.useState(!1),V=$!==null,{save:ie,flush:H,isPending:le}=Le({orgSlug:o,virtualMcpId:e,branch:l},{holdsCopy:r.mode==="saved"}),A=it({orgSlug:o,virtualMcpId:e,branch:l,threadId:u});R.useEffect(()=>()=>{H()},[]);const F=et(i),xe=r.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")??r.resolveType,re={orgSlug:o,virtualMcpId:e,branch:l,threadId:u,previewUrl:n??void 0,siteSlug:v},se=z=>{w(z),r.mode==="saved"&&ie(r.blockKey,{__resolveType:r.resolveType,...z})},ae=()=>{V?(D(null),P(!1),O(z=>z+1)):D(JSON.stringify(_,null,2))},Y=z=>{const oe=z??"";try{const de=JSON.parse(oe);if(de&&typeof de=="object"&&!Array.isArray(de)){P(!1),se(de);return}P(!0)}catch{P(!0)}},q=async z=>{const oe=es(z,a);if(oe){Pe.error(oe);return}await b(z,{__resolveType:r.resolveType,..._}),L(!1)},M=()=>{X(!0),A.mutate({resolveType:r.resolveType,props:_})},U=()=>{n&&window.open(at(n,r.resolveType,_,Date.now()),"_blank","noopener")},De=[r.title,...T],Fe=z=>{C(T.slice(0,z)),O(oe=>oe+1)};return s.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[s.jsx(Qs,{crumbs:De,onSelect:Fe,onSelectRoot:p}),s.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[p&&y&&s.jsxs(K,{variant:"ghost",size:"sm",className:"-ml-1 min-w-0 shrink gap-1",onClick:p,children:[s.jsx($e,{size:14,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:y})]}),s.jsx("div",{className:"flex-1"}),r.mode==="saved"&&s.jsx(Is,{isPending:le,isError:!1}),m&&s.jsxs(K,{size:"default",variant:"outline",className:"shrink-0 gap-1.5",onClick:M,disabled:A.isPending,"aria-label":c("sandbox.runnableBlockEditor.runAriaLabel",{singular:F}),children:[A.isPending?s.jsx(je,{className:"size-3.5"}):s.jsx(As,{size:14}),c("sandbox.runnableBlockEditor.run")]}),r.mode==="available"&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{size:"icon",className:"shrink-0",disabled:x,onClick:()=>L(!0),"aria-label":c("sandbox.runnableBlockEditor.saveAsGlobalAriaLabel",{singular:F}),children:s.jsx(is,{size:14})})}),s.jsx(me,{side:"bottom",children:c("sandbox.runnableBlockEditor.saveAsGlobal",{singular:F})})]}),s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:V?"default":"ghost",size:"icon",className:"shrink-0",onClick:ae,"aria-label":c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson"),"aria-pressed":V,children:V?s.jsx(ye,{size:14}):s.jsx(Ae,{size:14})})}),s.jsx(me,{side:"bottom",children:c(V?"sandbox.runnableBlockEditor.closeJsonEditor":"sandbox.runnableBlockEditor.editAsJson")})]})]}),s.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:r.mode==="saved"?c("sandbox.runnableBlockEditor.savedModeDescription",{singular:F}):c("sandbox.runnableBlockEditor.availableModeDescription",{typeLabel:xe,singular:F})})]}),s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:ne("relative min-h-0 flex-1",Q&&ee&&"hidden"),children:[s.jsx(zs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsxs("div",{className:"mx-auto max-w-2xl",children:[S&&N===S&&s.jsx("p",{className:"mb-3 rounded-md bg-muted px-3 py-2 text-xs leading-snug text-muted-foreground",children:c("sandbox.runnableBlockEditor.inferredSchemaNotice",{singular:F})}),N?s.jsx(Qe,{schema:N,value:_,onChange:z=>se(z),basePath:"",breadcrumbPath:T,onBreadcrumbChange:C,meta:t,decofile:a,onSaveReferencedBlock:h,sandbox:re},B):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:k?c("sandbox.runnableBlockEditor.freeformPropsEmptyState",{singular:F}):c("sandbox.runnableBlockEditor.noInputEmptyState",{singular:F})})]})})}),$!==null&&s.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[J&&s.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.runnableBlockEditor.invalidJsonError")}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Ie,{language:"json",height:"100%",code:$,onChange:Y,onSave:z=>{Y(z),H()}})})]})]}),Q&&s.jsx(rt,{singular:F,result:{isPending:A.isPending,error:A.error,data:A.data,hasRun:A.status!=="idle"},expanded:ee,onToggleExpand:()=>G(z=>!z),onOpenInNewTab:n?U:void 0,onClose:()=>{X(!1),G(!1)}})]}),s.jsx(Xe,{open:I,onOpenChange:L,defaultBlockId:"",isPending:x,onSubmit:q})]})}function rt(o){const e=W.c(54),{singular:l,result:n,expanded:t,onToggleExpand:a,onOpenInNewTab:i,onClose:r}=o,f=Z();let x;e[0]!==n.data?(x=typeof n.data=="string"?n.data:JSON.stringify(n.data??null,null,2),e[0]=n.data,e[1]=x):x=e[1];const b=x,h=t?"flex-1":"h-[45%] shrink-0";let p;e[2]!==h?(p=ne("flex min-h-0 flex-col border-t",h),e[2]=h,e[3]=p):p=e[3];let y;e[4]!==f?(y=f("sandbox.runnableBlockEditor.resultPanelTitle"),e[4]=f,e[5]=y):y=e[5];let m;e[6]!==y?(m=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:y}),e[6]=y,e[7]=m):m=e[7];let d;e[8]!==i||e[9]!==l||e[10]!==f?(d=i&&s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":f("sandbox.runnableBlockEditor.openResultInNewTabAriaLabel"),children:s.jsx(Oe,{size:14})})}),s.jsx(me,{side:"bottom",children:f("sandbox.runnableBlockEditor.openInNewTabTooltip",{singular:l})})]}),e[8]=i,e[9]=l,e[10]=f,e[11]=d):d=e[11];let u;e[12]!==t||e[13]!==f?(u=f(t?"sandbox.runnableBlockEditor.collapseResult":"sandbox.runnableBlockEditor.expandResult"),e[12]=t,e[13]=f,e[14]=u):u=e[14];let c;e[15]!==t?(c=t?s.jsx(rs,{size:14}):s.jsx($s,{size:14}),e[15]=t,e[16]=c):c=e[16];let g;e[17]!==t||e[18]!==a||e[19]!==u||e[20]!==c?(g=s.jsx(fe,{asChild:!0,children:s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":u,"aria-pressed":t,children:c})}),e[17]=t,e[18]=a,e[19]=u,e[20]=c,e[21]=g):g=e[21];let j;e[22]!==t||e[23]!==f?(j=f(t?"sandbox.runnableBlockEditor.collapse":"sandbox.runnableBlockEditor.expand"),e[22]=t,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(me,{side:"bottom",children:j}),e[25]=j,e[26]=v):v=e[26];let E;e[27]!==v||e[28]!==g?(E=s.jsxs(ue,{children:[g,v]}),e[27]=v,e[28]=g,e[29]=E):E=e[29];let k;e[30]!==f?(k=f("sandbox.runnableBlockEditor.closeResult"),e[30]=f,e[31]=k):k=e[31];let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ye,{size:14}),e[32]=S):S=e[32];let N;e[33]!==r||e[34]!==k?(N=s.jsx(K,{variant:"ghost",size:"icon-sm",onClick:r,"aria-label":k,children:S}),e[33]=r,e[34]=k,e[35]=N):N=e[35];let _;e[36]!==E||e[37]!==N||e[38]!==d?(_=s.jsxs("div",{className:"flex items-center gap-0.5",children:[d,E,N]}),e[36]=E,e[37]=N,e[38]=d,e[39]=_):_=e[39];let w;e[40]!==_||e[41]!==m?(w=s.jsxs("div",{className:"flex h-9 shrink-0 items-center justify-between border-b px-3",children:[m,_]}),e[40]=_,e[41]=m,e[42]=w):w=e[42];let T;e[43]!==n.error||e[44]!==n.hasRun||e[45]!==n.isPending||e[46]!==b||e[47]!==l||e[48]!==f?(T=s.jsx("div",{className:"min-h-0 flex-1",children:n.isPending?s.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-xs text-muted-foreground",children:[s.jsx(je,{className:"size-4"}),f("sandbox.runnableBlockEditor.running",{singular:l})]}):n.error?s.jsxs("div",{className:"h-full overflow-auto px-4 py-3",children:[s.jsx("p",{className:"text-xs font-medium text-destructive",children:f("sandbox.runnableBlockEditor.failedToRun",{singular:l})}),s.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-destructive/90",children:n.error.message})]}):n.hasRun?s.jsx(Ie,{language:"json",height:"100%",code:b,readOnly:!0}):s.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:f("sandbox.runnableBlockEditor.pressRunToInvoke",{singular:l})})}),e[43]=n.error,e[44]=n.hasRun,e[45]=n.isPending,e[46]=b,e[47]=l,e[48]=f,e[49]=T):T=e[49];let C;return e[50]!==w||e[51]!==T||e[52]!==p?(C=s.jsxs("div",{className:p,children:[w,T]}),e[50]=w,e[51]=T,e[52]=p,e[53]=C):C=e[53],C}function be(o,e,l){const n=l[o];return typeof n?.name=="string"&&n.name||o.replace(/[-_]/g," ").replace(/\b\w/g,t=>t.toUpperCase())||`Section ${e+1}`}function Wt(o,e,l=!1){return o.map((n,t)=>{const a=n.__resolveType??"",i=Se(a);if(!i&&a!==""&&pe(a)&&a in e)return{index:t,resolveType:a,label:be(a,t,e),isLazy:!1,isSavedBlock:!0};const r=i?n.section:void 0,f=i?r?.__resolveType??"":a;if(Te(f,l)){const b=i?r:n,h=Array.isArray(b?.variants)?b.variants:[];if(h.length===1&&Ye(h[0]?.rule?.__resolveType,l)){const m=he(h[0],l)??{};let d=m.__resolveType??"";const u=Se(d);let c=m;if(u){const g=m.section;d=g?.__resolveType??d,g&&(c=g)}if(Te(d,l)){const g=Array.isArray(c.variants)?c.variants:[],j=he(g[0],l)?.__resolveType,v=j?ce(j):"Section";return{index:t,resolveType:a,label:`Variants of ${v}`,variantOf:v,isHidden:!0,isLazy:u}}return d!==""&&pe(d)&&d in e?{index:t,resolveType:a,label:be(d,t,e),isHidden:!0,isLazy:u,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(d)||`Section ${t+1}`,isHidden:!0,isLazy:u}}const p=he(h[0],l)?.__resolveType,y=p?ce(p):"Section";return{index:t,resolveType:a,label:`Variants of ${y}`,variantOf:y,isMultivariate:!0,isLazy:i}}const x=i?n.section?.__resolveType??a:a;return i&&x!==""&&pe(x)&&x in e?{index:t,resolveType:a,label:be(x,t,e),isLazy:!0,isSavedBlock:!0}:{index:t,resolveType:a,label:ce(x)||`Section ${t+1}`,isLazy:i}})}function Gt(o){let e=o.length;for(;e>0&&o[e-1]?.isSavedBlock;)e--;return e>0?e:Math.max(o.length-1,0)}export{Be as B,It as P,Kt as R,$t as S,nt as a,Dt as b,zt as c,Vt as d,et as e,Qs as f,At as g,Jt as h,Ft as l,Mt as m,Gt as n,Wt as p,Ut as r};
@@ -1 +1 @@
1
- import{c as b,b as P,j as t,n as w,m as N}from"./index-BMPeWdJw.js";import{ChatLayout as C}from"./index-G68rd1Q1.js";import{i as y,n as $,a as z}from"./TrendUp01-CkF2n8Hn.js";import{B as I}from"./badge-C-0ziPev.js";import"./use-mobile-DPeImGih.js";import"./tooltip-BBk4QO9B.js";import"./index-BDs-2B47.js";import"./MessageCircle01-pdZ3c0Ei.js";import"./XClose-igHVZF4W.js";import"./thread-button-Cv7guHMn.js";import"./use-sidebar-collapsed-Ciu2x6KY.js";import"./sheet-3DsSjpPg.js";import"./use-chat-layout-state-Cobo43Bl.js";import"./use-panel-navigate-yNzK1oeQ.js";import"./thread-route-CSj65J5K.js";import"./use-project-scope-BYK0JAGP.js";import"./repository-binding-BCK2I6Mo.js";import"./use-mcp-client-D6hvNNod.js";import"./auth-DdGqjHXO.js";import"./toolbar-icon-button-vtvpzCZ_.js";import"./use-in-settings-CavkWvLD.js";import"./resizable-D7hc5wCS.js";import"./route-page-header-DOKA0lPe.js";import"./LayoutLeft-BI23EoSs.js";import"./use-current-view-AGi0k_-I.js";const K={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:y,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:$,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:z,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function L(s){const e=b.c(4),{className:f}=s;let l;e[0]!==f?(l=N("block h-2 rounded-full bg-muted",f),e[0]=f,e[1]=l):l=e[1];let n;return e[2]!==l?(n=t.jsx("span",{className:l}),e[2]=l,e[3]=n):n=e[3],n}const R=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function B(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex flex-col gap-5",children:R.map(E)}),s[0]=e):e=s[0],e}function E(s){return t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:t.jsx(y,{size:14})}),t.jsx(L,{className:s.title}),t.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:s.value})]}),t.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:t.jsx("div",{className:N("h-full rounded-full",s.fill,s.tone)})})]},s.value)}function G(s){const e=b.c(30),{kind:f}=s,l=P(),n=K[f];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=u):u=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[u,t.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:t.jsx(B,{})})]}),e[1]=h):h=e[1];let i;e[2]!==l?(i=l("home.comingSoon.badge"),e[2]=l,e[3]=i):i=e[3];let o;e[4]!==i?(o=t.jsx(I,{variant:"muted",children:i}),e[4]=i,e[5]=o):o=e[5];let a;e[6]!==n.heading||e[7]!==l?(a=l(n.heading),e[6]=n.heading,e[7]=l,e[8]=a):a=e[8];let r;e[9]!==a?(r=t.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:a}),e[9]=a,e[10]=r):r=e[10];let c;e[11]!==n.description||e[12]!==l?(c=l(n.description),e[11]=n.description,e[12]=l,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:c}),e[14]=c,e[15]=m):m=e[15];let d;e[16]!==o||e[17]!==r||e[18]!==m?(d=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,r,m]}),e[16]=o,e[17]=r,e[18]=m,e[19]=d):d=e[19];let p;if(e[20]!==n.points||e[21]!==l){let j;e[23]!==l?(j=S=>{const{Icon:_,labelKey:v,tone:k}=S;return t.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[t.jsx("span",{className:N("flex size-9 shrink-0 items-center justify-center rounded-lg",k),children:t.jsx(_,{size:18})}),t.jsx("span",{className:"text-sm text-foreground",children:l(v)})]},v)},e[23]=l,e[24]=j):j=e[24],p=n.points.map(j),e[20]=n.points,e[21]=l,e[22]=p}else p=e[22];let x;e[25]!==p?(x=t.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:p}),e[25]=p,e[26]=x):x=e[26];let g;return e[27]!==x||e[28]!==d?(g=t.jsx(w,{children:t.jsx(w.Content,{children:t.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[h,d,x]})})}),e[27]=x,e[28]=d,e[29]=g):g=e[29],g}function ce(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(C.Content,{children:t.jsx(G,{kind:"plan"})}),s[0]=e):e=s[0],e}export{ce as default};
1
+ import{c as b,b as P,j as t,n as w,m as N}from"./index-BuZqAz74.js";import{ChatLayout as C}from"./index-5KkkYmJi.js";import{i as y,n as $,a as z}from"./TrendUp01-_SFSHjzO.js";import{B as I}from"./badge-BvHOfdxU.js";import"./use-mobile-Cq1k3-Gk.js";import"./tooltip-DnGqcvtu.js";import"./index-DNuvhcDO.js";import"./MessageCircle01-Bf6dD94_.js";import"./XClose-C4MsAn9v.js";import"./thread-button-DbVaWztE.js";import"./use-sidebar-collapsed-Bo3tE9bK.js";import"./sheet-Lq2qXLx8.js";import"./use-chat-layout-state-D38zRykR.js";import"./use-panel-navigate-B3thngCs.js";import"./thread-route-Dw1cQjON.js";import"./use-project-scope-CD-cb4-V.js";import"./repository-binding-VVfcdUiy.js";import"./use-mcp-client-UWOU8UbZ.js";import"./auth-DuSLyK-k.js";import"./toolbar-icon-button-BroRQfDx.js";import"./use-in-settings-cNZb_oio.js";import"./resizable-XeFzd9pk.js";import"./route-page-header-BqA32d57.js";import"./LayoutLeft-CCeum9wV.js";import"./use-current-view-swKX6Bc6.js";const K={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:y,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:$,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:z,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function L(s){const e=b.c(4),{className:f}=s;let l;e[0]!==f?(l=N("block h-2 rounded-full bg-muted",f),e[0]=f,e[1]=l):l=e[1];let n;return e[2]!==l?(n=t.jsx("span",{className:l}),e[2]=l,e[3]=n):n=e[3],n}const R=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function B(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex flex-col gap-5",children:R.map(E)}),s[0]=e):e=s[0],e}function E(s){return t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:t.jsx(y,{size:14})}),t.jsx(L,{className:s.title}),t.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:s.value})]}),t.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:t.jsx("div",{className:N("h-full rounded-full",s.fill,s.tone)})})]},s.value)}function G(s){const e=b.c(30),{kind:f}=s,l=P(),n=K[f];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=u):u=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[u,t.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:t.jsx(B,{})})]}),e[1]=h):h=e[1];let i;e[2]!==l?(i=l("home.comingSoon.badge"),e[2]=l,e[3]=i):i=e[3];let o;e[4]!==i?(o=t.jsx(I,{variant:"muted",children:i}),e[4]=i,e[5]=o):o=e[5];let a;e[6]!==n.heading||e[7]!==l?(a=l(n.heading),e[6]=n.heading,e[7]=l,e[8]=a):a=e[8];let r;e[9]!==a?(r=t.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:a}),e[9]=a,e[10]=r):r=e[10];let c;e[11]!==n.description||e[12]!==l?(c=l(n.description),e[11]=n.description,e[12]=l,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:c}),e[14]=c,e[15]=m):m=e[15];let d;e[16]!==o||e[17]!==r||e[18]!==m?(d=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,r,m]}),e[16]=o,e[17]=r,e[18]=m,e[19]=d):d=e[19];let p;if(e[20]!==n.points||e[21]!==l){let j;e[23]!==l?(j=S=>{const{Icon:_,labelKey:v,tone:k}=S;return t.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[t.jsx("span",{className:N("flex size-9 shrink-0 items-center justify-center rounded-lg",k),children:t.jsx(_,{size:18})}),t.jsx("span",{className:"text-sm text-foreground",children:l(v)})]},v)},e[23]=l,e[24]=j):j=e[24],p=n.points.map(j),e[20]=n.points,e[21]=l,e[22]=p}else p=e[22];let x;e[25]!==p?(x=t.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:p}),e[25]=p,e[26]=x):x=e[26];let g;return e[27]!==x||e[28]!==d?(g=t.jsx(w,{children:t.jsx(w.Content,{children:t.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[h,d,x]})})}),e[27]=x,e[28]=d,e[29]=g):g=e[29],g}function ce(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(C.Content,{children:t.jsx(G,{kind:"plan"})}),s[0]=e):e=s[0],e}export{ce as default};
@@ -1 +1 @@
1
- import{c as f,a4 as g,ak as P,K as _,i as y,m as h,j as d}from"./index-BMPeWdJw.js";import{u as A}from"./use-entitlements-RVjfgn4l.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function k(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function q(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function D(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,D as P,w as S,I as a,q as b,v as f,O as i,R as p,k as u};
1
+ import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-BuZqAz74.js";import{u as A}from"./use-entitlements-DgXhk8I6.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
@@ -1,6 +1,6 @@
1
- import{r as Y,j as s,dV as me,hP as ye,c as G,m as Z,bY as Pe,b as q,a4 as se,ak as J,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aH as Ee,aI as we,aJ as Ie,aK as Ae,b7 as Ue,aL as Te,aM as De,aN as $e,gf as le,gT as ne,i as xe,d_ as pe,b4 as Re,aq as Be,as as Le,L as ke,gE as He}from"./index-BMPeWdJw.js";import{s as Oe}from"./Plus-NIlBePVH.js";import{B as Fe}from"./badge-C-0ziPev.js";import{a as Me,b as ze,P as Ve}from"./popover-zwWAAqUd.js";import{a as ce,T as Ge}from"./toggle-group-B5Qv0TZp.js";import{g as Ke}from"./use-ai-providers-B1MpfOF5.js";import{u as ie,d as he,a as qe}from"./use-entitlements-RVjfgn4l.js";import{u as Qe,P as Ye}from"./plan-ladder-B-wAiO1o.js";var re="Progress",oe=100,[Ze]=ye(re),[Je,Xe]=Ze(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Je,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Xe(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
1
+ import{r as Y,j as s,dX as me,hR as ye,c as G,m as X,b_ as Pe,b as q,a6 as se,am as Z,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aJ as we,aK as Ee,aL as Ae,aM as Ie,b9 as Ue,aN as De,aO as Te,aP as Re,gh as le,gV as ne,i as xe,e0 as pe,b6 as $e,as as Be,au as Le,L as ke,gG as He}from"./index-BuZqAz74.js";import{s as Oe}from"./Plus--DcN-eh1.js";import{B as Fe}from"./badge-BvHOfdxU.js";import{a as Me,b as ze,P as Ve}from"./popover-D6EIL5sL.js";import{a as ce,T as Ge}from"./toggle-group-DFyE84bx.js";import{g as Ke}from"./use-ai-providers-BG5EDM0R.js";import{u as ie,d as he,a as qe}from"./use-entitlements-DgXhk8I6.js";import{u as Qe,P as Ye}from"./plan-ladder-Ce2vSjaL.js";var re="Progress",oe=100,[Xe]=ye(re),[Ze,Je]=Xe(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Ze,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
2
  - a positive number
3
3
  - less than the value passed to \`max\` (or ${oe} if no \`max\` prop is set)
4
4
  - \`null\` or \`undefined\` if the progress is indeterminate.
5
5
 
6
- Defaulting to \`null\`.`}var st=ve,lt=je;const nt=Pe("h-full w-full flex-1 rounded-full transition-transform duration-200 ease-[var(--ease-out-cubic)]",{variants:{tone:{default:"bg-brand-purple",warning:"bg-warning",dark:"bg-primary"}},defaultVariants:{tone:"default"}});function at(e){const t=G.c(18);let n,o,a,l;t[0]!==e?({className:n,value:l,tone:a,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=a,t[4]=l):(n=t[1],o=t[2],a=t[3],l=t[4]);const c=Math.min(100,Math.max(0,l??0));let i;t[5]!==n?(i=Z("bg-muted relative h-1 w-full overflow-hidden rounded-full",n),t[5]=n,t[6]=i):i=t[6];let r;t[7]!==a?(r=nt({tone:a}),t[7]=a,t[8]=r):r=t[8];const u=`translateX(-${100-c}%)`;let m;t[9]!==u?(m={transform:u},t[9]=u,t[10]=m):m=t[10];let g;t[11]!==r||t[12]!==m?(g=s.jsx(lt,{"data-slot":"progress-indicator",className:r,style:m}),t[11]=r,t[12]=m,t[13]=g):g=t[13];let d;return t[14]!==o||t[15]!==i||t[16]!==g?(d=s.jsx(st,{"data-slot":"progress",className:i,...o,children:g}),t[14]=o,t[15]=i,t[16]=g,t[17]=d):d=t[17],d}const it={usd:[10,20,100],brl:[50,100,500]};function Ce(){const e=G.c(30),t=q(),n=J(),[o]=ge(),[a,l]=Y.useState(!1);let c;e[0]!==t?(c=x=>{W.error(t("settings.decoCreditsHero.topUpFailed",{message:x.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:i,isPending:r}=ae({mutationFn:async x=>{const{url:w}=await n.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:x,currency:f});return w},onSuccess:rt,onError:c}),[u,m]=Y.useState(""),[g,d]=Y.useState(o.language==="pt-BR"?"brl":"usd"),f=g,h=parseFloat(u),C=!isNaN(h)&&h>=1,p=f==="brl"?"R$":"$";let _;e[2]!==d?(_=x=>{x&&d(x)},e[2]=d,e[3]=_):_=e[3];let b,E;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ce,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),E=s.jsx(ce,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=b,e[5]=E):(b=e[4],E=e[5]);let j;e[6]!==f||e[7]!==_?(j=s.jsxs(Ge,{type:"single",variant:"outline",size:"sm",value:f,onValueChange:_,children:[b,E]}),e[6]=f,e[7]=_,e[8]=j):j=e[8];let y;e[9]!==f||e[10]!==p||e[11]!==a||e[12]!==r||e[13]!==t||e[14]!==i?(y=!a&&s.jsxs(s.Fragment,{children:[it[f].map(x=>s.jsxs(V,{variant:"outline",className:"tabular-nums",disabled:r,onClick:()=>i(x*100),children:[p,x]},x)),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>l(!0),disabled:r,children:t("settings.decoCreditsHero.custom")})]}),e[9]=f,e[10]=p,e[11]=a,e[12]=r,e[13]=t,e[14]=i,e[15]=y):y=e[15];let N;e[16]!==p||e[17]!==u||e[18]!==h||e[19]!==a||e[20]!==C||e[21]!==r||e[22]!==m||e[23]!==t||e[24]!==i?(N=a&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:p}),s.jsx(Se,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:u,onChange:x=>m(x.target.value),size:"sm",className:"pl-7",autoFocus:!0})]}),s.jsx(V,{disabled:!C||r,onClick:()=>i(Math.round(h*100)),children:r?"...":t("settings.decoCreditsHero.add")}),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{l(!1),m("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=p,e[17]=u,e[18]=h,e[19]=a,e[20]=C,e[21]=r,e[22]=m,e[23]=t,e[24]=i,e[25]=N):N=e[25];let P;return e[26]!==j||e[27]!==y||e[28]!==N?(P=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,y,N]})}),e[26]=j,e[27]=y,e[28]=N,e[29]=P):P=e[29],P}function rt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function ot(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function ct(e){const t=G.c(38),{enabled:n}=e,o=q(),{org:a}=se(),l=J();let c;t[0]!==a.id?(c=ee.aiProviderCredits(a.id,"deco"),t[0]=a.id,t[1]=c):c=t[1];let i;t[2]!==l?(i=async()=>{try{return await l.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=l,t[3]=i):i=t[3];let r;t[4]!==n||t[5]!==c||t[6]!==i?(r={queryKey:c,enabled:n,staleTime:6e4,queryFn:i},t[4]=n,t[5]=c,t[6]=i,t[7]=r):r=t[7];const{data:u,isLoading:m,refetch:g,isFetching:d}=xe(r);if(!n)return null;const f=u?.balanceCents!=null?u.balanceCents/100:null;let h;t[8]!==f?(h=f!=null?`$${f.toFixed(2)}`:"—",t[8]=f,t[9]=h):h=t[9];const C=h;let p;t[10]!==f||t[11]!==C||t[12]!==d||t[13]!==m?(p=m||d?s.jsx(pe,{className:"h-9 w-24"}):s.jsx("span",{className:Z("text-3xl font-semibold tabular-nums tracking-tight",f!=null&&ot(f)),children:C}),t[10]=f,t[11]=C,t[12]=d,t[13]=m,t[14]=p):p=t[14];let _;t[15]!==g?(_=()=>g(),t[15]=g,t[16]=_):_=t[16];let b;t[17]!==o?(b=o("settings.decoCreditsHero.refreshBalance"),t[17]=o,t[18]=b):b=t[18];const E=d&&"animate-spin";let j;t[19]!==E?(j=Z("size-3.5",E),t[19]=E,t[20]=j):j=t[20];let y;t[21]!==j?(y=s.jsx(Re,{className:j}),t[21]=j,t[22]=y):y=t[22];let N;t[23]!==d||t[24]!==y||t[25]!==_||t[26]!==b?(N=s.jsx(V,{type:"button",variant:"ghost",size:"icon-xs",onClick:_,disabled:d,className:"text-muted-foreground hover:text-foreground","aria-label":b,children:y}),t[23]=d,t[24]=y,t[25]=_,t[26]=b,t[27]=N):N=t[27];let P;t[28]!==N||t[29]!==p?(P=s.jsxs("div",{className:"flex items-baseline gap-2",children:[p,N]}),t[28]=N,t[29]=p,t[30]=P):P=t[30];let x;t[31]!==o?(x=o("settings.decoCreditsHero.availableBalance"),t[31]=o,t[32]=x):x=t[32];let w;t[33]!==x?(w=s.jsx("p",{className:"text-xs text-muted-foreground",children:x}),t[33]=x,t[34]=w):w=t[34];let A;return t[35]!==P||t[36]!==w?(A=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[P,w]}),t[35]=P,t[36]=w,t[37]=A):A=t[37],A}function _t(){const e=G.c(74),t=q(),{org:n}=se(),o=J(),a=_e(),l=Ke();let c;e[0]!==l?(c=l.find(dt),e[0]=l,e[1]=c):c=e[1];const i=c,r=ie(),u=he("credits"),[m,g]=Y.useState(!1);let d;e[2]!==i||e[3]!==o?(d=async()=>{i&&await o.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[2]=i,e[3]=o,e[4]=d):d=e[4];let f;e[5]!==n||e[6]!==a||e[7]!==t?(f=()=>{a.invalidateQueries({queryKey:ee.aiProviderKeys(n.id)}),a.invalidateQueries({queryKey:ee.aiProviders(n.id)}),W.success(t("settings.decoCreditsHero.disconnectSuccess")),g(!1)},e[5]=n,e[6]=a,e[7]=t,e[8]=f):f=e[8];let h;e[9]!==t?(h=K=>{W.error(t("settings.decoCreditsHero.disconnectError",{message:K.message}))},e[9]=t,e[10]=h):h=e[10];let C;e[11]!==d||e[12]!==f||e[13]!==h?(C={mutationFn:d,onSuccess:f,onError:h},e[11]=d,e[12]=f,e[13]=h,e[14]=C):C=e[14];const{mutate:p,isPending:_}=ae(C);if(!i)return null;let b;e[15]!==t?(b=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=b):b=e[16];let E;e[17]!==t?(E=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=E):E=e[18];let j;e[19]!==E?(j=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:E,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=E,e[20]=j):j=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=()=>g(!0),e[21]=y):y=e[21];let N;e[22]!==t?(N=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=N):N=e[23];let P;e[24]!==_||e[25]!==N?(P=s.jsx(V,{variant:"ghost-destructive",size:"sm",onClick:y,disabled:_,children:N}),e[24]=_,e[25]=N,e[26]=P):P=e[26];let x;e[27]!==P||e[28]!==j?(x=s.jsxs("div",{className:"flex items-center justify-between",children:[j,P]}),e[27]=P,e[28]=j,e[29]=x):x=e[29];let w;e[30]!==t?(w=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=w):w=e[31];let A;e[32]!==w?(A=s.jsx(Ee,{children:w}),e[32]=w,e[33]=A):A=e[33];let U;e[34]!==t?(U=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=U):U=e[35];let T;e[36]!==U?(T=s.jsx(we,{children:U}),e[36]=U,e[37]=T):T=e[37];let D;e[38]!==A||e[39]!==T?(D=s.jsxs(Ie,{children:[A,T]}),e[38]=A,e[39]=T,e[40]=D):D=e[40];let O;e[41]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=O):O=e[42];let $;e[43]!==O?($=s.jsx(Ae,{children:O}),e[43]=O,e[44]=$):$=e[44];let z;e[45]!==p?(z=()=>p(),e[45]=p,e[46]=z):z=e[46];let R;e[47]!==t?(R=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=R):R=e[48];let B;e[49]!==z||e[50]!==R?(B=s.jsx(Ue,{onClick:z,variant:"destructive",children:R}),e[49]=z,e[50]=R,e[51]=B):B=e[51];let L;e[52]!==$||e[53]!==B?(L=s.jsxs(Te,{children:[$,B]}),e[52]=$,e[53]=B,e[54]=L):L=e[54];let k;e[55]!==D||e[56]!==L?(k=s.jsxs(De,{children:[D,L]}),e[55]=D,e[56]=L,e[57]=k):k=e[57];let F;e[58]!==m||e[59]!==k?(F=s.jsx($e,{open:m,onOpenChange:g,children:k}),e[58]=m,e[59]=k,e[60]=F):F=e[60];const v=!r;let S;e[61]!==v?(S=s.jsx(ct,{enabled:v}),e[61]=v,e[62]=S):S=e[62];let I;e[63]!==u||e[64]!==t?(I=u?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(Ce,{})]}):null,e[63]=u,e[64]=t,e[65]=I):I=e[65];let H;e[66]!==x||e[67]!==F||e[68]!==S||e[69]!==I?(H=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[x,F,S,I]})}),e[66]=x,e[67]=F,e[68]=S,e[69]=I,e[70]=H):H=e[70];let M;return e[71]!==H||e[72]!==b?(M=s.jsx(ne,{title:b,children:H}),e[71]=H,e[72]=b,e[73]=M):M=e[73],M}function dt(e){return e.providerId==="deco"}function ut(e,t){const n=G.c(9),o=J(),a=q();let l;n[0]!==o||n[1]!==e?(l=async r=>{const{url:u}=await o.call(e,e==="ORGANIZATION_BILLING_CHECKOUT_START"&&r?{planId:r}:{});return u},n[0]=o,n[1]=e,n[2]=l):l=n[2];let c;n[3]!==t||n[4]!==a?(c=r=>W.error(a(t,{message:r.message})),n[3]=t,n[4]=a,n[5]=c):c=n[5];let i;return n[6]!==l||n[7]!==c?(i={mutationFn:l,onSuccess:ft,onError:c},n[6]=l,n[7]=c,n[8]=i):i=n[8],ae(i)}function ft(e){return window.open(e,"_blank","noopener,noreferrer")}const mt={ok:"text-foreground",warn:"text-warning",exhausted:"text-destructive",spent:"text-muted-foreground"},gt={ok:"[&>[data-slot=progress-indicator]]:bg-brand-purple",warn:"[&>[data-slot=progress-indicator]]:bg-warning",exhausted:"[&>[data-slot=progress-indicator]]:bg-destructive",spent:"[&>[data-slot=progress-indicator]]:bg-muted-foreground/40"};function fe(e){const t=G.c(22),{label:n,badge:o,value:a,unit:l,valueClassName:c,bar:i,footer:r}=e;let u;t[0]!==n?(u=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),t[0]=n,t[1]=u):u=t[1];let m;t[2]!==o||t[3]!==u?(m=s.jsxs("div",{className:"flex h-5 items-center gap-2",children:[u,o]}),t[2]=o,t[3]=u,t[4]=m):m=t[4];let g;t[5]!==c?(g=Z("text-4xl font-semibold leading-none tracking-tight tabular-nums",c),t[5]=c,t[6]=g):g=t[6];let d;t[7]!==g||t[8]!==a?(d=s.jsx("span",{className:g,children:a}),t[7]=g,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==l?(f=l&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),t[10]=l,t[11]=f):f=t[11];let h;t[12]!==d||t[13]!==f?(h=s.jsxs("div",{className:"flex items-baseline gap-2",children:[d,f]}),t[12]=d,t[13]=f,t[14]=h):h=t[14];let C;t[15]!==i||t[16]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-2",children:[i,r]}),t[15]=i,t[16]=r,t[17]=C):C=t[17];let p;return t[18]!==m||t[19]!==h||t[20]!==C?(p=s.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[m,h,C]}),t[18]=m,t[19]=h,t[20]=C,t[21]=p):p=t[21],p}function xt(){const e=G.c(8),t=q();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{size:14}),e[0]=n):n=e[0];let o;e[1]!==t?(o=t("settings.decoCreditsHero.addCredits"),e[1]=t,e[2]=o):o=e[2];let a;e[3]!==o?(a=s.jsx(Me,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"sm",className:"w-fit",children:[n,o]})}),e[3]=o,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ze,{align:"start",className:"w-auto",children:s.jsx(Ce,{})}),e[5]=l):l=e[5];let c;return e[6]!==a?(c=s.jsxs(Ve,{children:[a,l]}),e[6]=a,e[7]=c):c=e[7],c}function pt(){const e=G.c(15),t=q(),{org:n}=se(),o=J();let a;e[0]!==n.id?(a=ee.orgBillingAccount(n.id),e[0]=n.id,e[1]=a):a=e[1];let l;e[2]!==o?(l=()=>o.call("ORGANIZATION_BILLING_GET",{}),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={queryKey:a,staleTime:6e4,queryFn:l},e[4]=a,e[5]=l,e[6]=c):c=e[6];const{data:i}=xe(c),{mutate:r,isPending:u}=ut("ORGANIZATION_BILLING_PORTAL","settings.planUsage.portalFailed");if(!i?.hasBillingAccount)return null;let m;e[7]!==r?(m=()=>r(),e[7]=r,e[8]=m):m=e[8];let g;e[9]!==t?(g=t("settings.planUsage.manageBilling"),e[9]=t,e[10]=g):g=e[10];let d;return e[11]!==u||e[12]!==m||e[13]!==g?(d=s.jsx(V,{variant:"outline",size:"sm",disabled:u,onClick:m,children:g}),e[11]=u,e[12]=m,e[13]=g,e[14]=d):d=e[14],d}function St(){const e=G.c(9),t=q(),{org:n}=se(),o=ie(),{granted:a}=Be("monitoring:view");if(!o||!a)return null;let l;e[0]!==n.slug?(l={org:n.slug},e[0]=n.slug,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={tab:"overview"},e[2]=c):c=e[2];let i;e[3]!==t?(i=t("settings.planUsage.aiUsage"),e[3]=t,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{size:14}),e[5]=r):r=e[5];let u;return e[6]!==l||e[7]!==i?(u=s.jsx(V,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(ke,{to:"/$org/settings/monitor",params:l,search:c,children:[i,r]})}),e[6]=l,e[7]=i,e[8]=u):u=e[8],u}function Et(){const e=G.c(71),t=q(),[n]=ge(),o=ie(),a=he("credits"),{data:l,isLoading:c,isError:i,refetch:r}=qe(),{data:u}=Qe();let m;e[0]!==l?.plan||e[1]!==u?(m=u?.findIndex(v=>v.id===l?.plan.id)??-1,e[0]=l?.plan,e[1]=u,e[2]=m):m=e[2];const g=m;if(!o)return null;if(c){let v;e[3]!==t?(v=t("settings.planUsage.title"),e[3]=t,e[4]=v):v=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(le,{children:s.jsx("div",{className:"px-5 py-5",children:s.jsx(pe,{className:"h-24 w-full"})})}),e[5]=S):S=e[5];let I;return e[6]!==v?(I=s.jsx(ne,{title:v,children:S}),e[6]=v,e[7]=I):I=e[7],I}if(i||!l){let v;e[8]!==t?(v=t("settings.planUsage.title"),e[8]=t,e[9]=v):v=e[9];let S;e[10]!==t?(S=t("settings.planUsage.loadFailed"),e[10]=t,e[11]=S):S=e[11];let I;e[12]!==S?(I=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[12]=S,e[13]=I):I=e[13];let H;e[14]!==r?(H=()=>r(),e[14]=r,e[15]=H):H=e[15];let M;e[16]!==t?(M=t("settings.planUsage.retry"),e[16]=t,e[17]=M):M=e[17];let K;e[18]!==H||e[19]!==M?(K=s.jsx(V,{variant:"outline",size:"sm",onClick:H,children:M}),e[18]=H,e[19]=M,e[20]=K):K=e[20];let Q;e[21]!==I||e[22]!==K?(Q=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex items-center justify-between gap-3",children:[I,K]})}),e[21]=I,e[22]=K,e[23]=Q):Q=e[23];let X;return e[24]!==v||e[25]!==Q?(X=s.jsx(ne,{title:v,children:Q}),e[24]=v,e[25]=Q,e[26]=X):X=e[26],X}if(l.plan.id==="free")return null;let d;if(e[27]!==l.usage){const v=l.usage?Math.round(l.usage.percent*100):null;d=v!==null&&Number.isFinite(v)?Math.min(100,Math.max(0,v)):null,e[27]=l.usage,e[28]=d}else d=e[28];const f=d,h=l.usage?.state??"ok",C=l.features.chat,p=l.credits?.remainingUsd??null;let _;e[29]!==n?(_=v=>{if(!v)return null;const S=new Date(v);return Number.isNaN(S.getTime())?null:S.toLocaleDateString(n.language,{day:"numeric",month:"short"})},e[29]=n,e[30]=_):_=e[30];const b=_;let E;e[31]!==l.periodStart||e[32]!==b?(E=b(l.periodStart),e[31]=l.periodStart,e[32]=b,e[33]=E):E=e[33];const j=E;let y;e[34]!==l.periodEnd||e[35]!==b?(y=b(l.periodEnd),e[34]=l.periodEnd,e[35]=b,e[36]=y):y=e[36];const N=y;let P;e[37]!==N||e[38]!==j?(P=j&&N?{start:j,end:N}:null,e[37]=N,e[38]=j,e[39]=P):P=e[39];const x=P,w=h==="exhausted"&&p!==null&&p>0,A=w?"spent":h;let U;e[40]!==g?(U=g>=0&&s.jsx(Ye,{index:g,className:"size-6"}),e[40]=g,e[41]=U):U=e[41];let T;e[42]!==l.plan.name?(T=s.jsx("span",{className:"text-sm font-medium",children:l.plan.name}),e[42]=l.plan.name,e[43]=T):T=e[43];let D;e[44]!==U||e[45]!==T?(D=s.jsxs("div",{className:"flex items-center gap-2",children:[U,T]}),e[44]=U,e[45]=T,e[46]=D):D=e[46];let O;e[47]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pt,{}),e[47]=O):O=e[47];let $;e[48]!==D?($=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[D,O]}),e[48]=D,e[49]=$):$=e[49];const z=a&&"sm:grid-cols-[minmax(0,1fr)_minmax(0,15rem)]";let R;e[50]!==z?(R=Z("grid gap-x-8 gap-y-6",z),e[50]=z,e[51]=R):R=e[51];let B;e[52]!==A||e[53]!==C||e[54]!==f||e[55]!==x||e[56]!==t?(B=C?s.jsx(fe,{label:t("settings.planUsage.included"),value:f===null?t("settings.planUsage.usageUnavailable"):`${f}%`,unit:f!==null?t("settings.planUsage.used"):void 0,valueClassName:mt[A],bar:f===null?s.jsx("div",{className:"h-3 w-full rounded-full bg-muted/60","aria-hidden":"true"}):s.jsx(at,{value:f,"aria-label":t("settings.planUsage.included"),className:Z("h-3 bg-muted [&>[data-slot=progress-indicator]]:rounded-full",gt[A])}),footer:x?s.jsxs("div",{className:"flex items-baseline justify-between gap-4 text-meta",children:[s.jsx("span",{children:x.start}),s.jsx("span",{children:x.end})]}):s.jsx("span",{className:"text-meta",children:t("settings.planUsage.periodHint")})}):s.jsx("p",{className:"text-sm text-muted-foreground self-center",children:t("settings.planUsage.noAiIncluded")}),e[52]=A,e[53]=C,e[54]=f,e[55]=x,e[56]=t,e[57]=B):B=e[57];let L;e[58]!==a||e[59]!==p||e[60]!==w||e[61]!==n||e[62]!==t?(L=a&&s.jsx(fe,{label:t("settings.planUsage.credits"),badge:w?s.jsx(Fe,{variant:"success",size:"sm",children:t("settings.planUsage.creditsInUse")}):null,value:p===null?"—":p.toLocaleString(n.language,{style:"currency",currency:"USD"}),valueClassName:p!==null&&p>0?"text-foreground":"text-muted-foreground",footer:s.jsx(xt,{})}),e[58]=a,e[59]=p,e[60]=w,e[61]=n,e[62]=t,e[63]=L):L=e[63];let k;e[64]!==R||e[65]!==B||e[66]!==L?(k=s.jsxs("div",{className:R,children:[B,L]}),e[64]=R,e[65]=B,e[66]=L,e[67]=k):k=e[67];let F;return e[68]!==$||e[69]!==k?(F=s.jsxs(He,{className:"p-6 gap-6",children:[$,k]}),e[68]=$,e[69]=k,e[70]=F):F=e[70],F}export{St as A,_t as D,Et as P,ut as u};
6
+ Defaulting to \`null\`.`}var st=ve,lt=je;const nt=Pe("h-full w-full flex-1 rounded-full transition-transform duration-200 ease-[var(--ease-out-cubic)]",{variants:{tone:{default:"bg-brand-purple",warning:"bg-warning",dark:"bg-primary"}},defaultVariants:{tone:"default"}});function at(e){const t=G.c(18);let n,o,a,l;t[0]!==e?({className:n,value:l,tone:a,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=a,t[4]=l):(n=t[1],o=t[2],a=t[3],l=t[4]);const c=Math.min(100,Math.max(0,l??0));let i;t[5]!==n?(i=X("bg-muted relative h-1 w-full overflow-hidden rounded-full",n),t[5]=n,t[6]=i):i=t[6];let r;t[7]!==a?(r=nt({tone:a}),t[7]=a,t[8]=r):r=t[8];const u=`translateX(-${100-c}%)`;let m;t[9]!==u?(m={transform:u},t[9]=u,t[10]=m):m=t[10];let g;t[11]!==r||t[12]!==m?(g=s.jsx(lt,{"data-slot":"progress-indicator",className:r,style:m}),t[11]=r,t[12]=m,t[13]=g):g=t[13];let d;return t[14]!==o||t[15]!==i||t[16]!==g?(d=s.jsx(st,{"data-slot":"progress",className:i,...o,children:g}),t[14]=o,t[15]=i,t[16]=g,t[17]=d):d=t[17],d}const it={usd:[10,20,100],brl:[50,100,500]};function Ce(){const e=G.c(30),t=q(),n=Z(),[o]=ge(),[a,l]=Y.useState(!1);let c;e[0]!==t?(c=x=>{W.error(t("settings.decoCreditsHero.topUpFailed",{message:x.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:i,isPending:r}=ae({mutationFn:async x=>{const{url:E}=await n.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:x,currency:f});return E},onSuccess:rt,onError:c}),[u,m]=Y.useState(""),[g,d]=Y.useState(o.language==="pt-BR"?"brl":"usd"),f=g,h=parseFloat(u),C=!isNaN(h)&&h>=1,p=f==="brl"?"R$":"$";let _;e[2]!==d?(_=x=>{x&&d(x)},e[2]=d,e[3]=_):_=e[3];let b,w;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ce,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),w=s.jsx(ce,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=b,e[5]=w):(b=e[4],w=e[5]);let j;e[6]!==f||e[7]!==_?(j=s.jsxs(Ge,{type:"single",variant:"outline",size:"sm",value:f,onValueChange:_,children:[b,w]}),e[6]=f,e[7]=_,e[8]=j):j=e[8];let y;e[9]!==f||e[10]!==p||e[11]!==a||e[12]!==r||e[13]!==t||e[14]!==i?(y=!a&&s.jsxs(s.Fragment,{children:[it[f].map(x=>s.jsxs(V,{variant:"outline",className:"tabular-nums",disabled:r,onClick:()=>i(x*100),children:[p,x]},x)),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>l(!0),disabled:r,children:t("settings.decoCreditsHero.custom")})]}),e[9]=f,e[10]=p,e[11]=a,e[12]=r,e[13]=t,e[14]=i,e[15]=y):y=e[15];let N;e[16]!==p||e[17]!==u||e[18]!==h||e[19]!==a||e[20]!==C||e[21]!==r||e[22]!==m||e[23]!==t||e[24]!==i?(N=a&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:p}),s.jsx(Se,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:u,onChange:x=>m(x.target.value),size:"sm",className:"pl-7",autoFocus:!0})]}),s.jsx(V,{disabled:!C||r,onClick:()=>i(Math.round(h*100)),children:r?"...":t("settings.decoCreditsHero.add")}),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{l(!1),m("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=p,e[17]=u,e[18]=h,e[19]=a,e[20]=C,e[21]=r,e[22]=m,e[23]=t,e[24]=i,e[25]=N):N=e[25];let P;return e[26]!==j||e[27]!==y||e[28]!==N?(P=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,y,N]})}),e[26]=j,e[27]=y,e[28]=N,e[29]=P):P=e[29],P}function rt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function ot(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function ct(e){const t=G.c(38),{enabled:n}=e,o=q(),{org:a}=se(),l=Z();let c;t[0]!==a.id?(c=ee.aiProviderCredits(a.id,"deco"),t[0]=a.id,t[1]=c):c=t[1];let i;t[2]!==l?(i=async()=>{try{return await l.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=l,t[3]=i):i=t[3];let r;t[4]!==n||t[5]!==c||t[6]!==i?(r={queryKey:c,enabled:n,staleTime:6e4,queryFn:i},t[4]=n,t[5]=c,t[6]=i,t[7]=r):r=t[7];const{data:u,isLoading:m,refetch:g,isFetching:d}=xe(r);if(!n)return null;const f=u?.balanceCents!=null?u.balanceCents/100:null;let h;t[8]!==f?(h=f!=null?`$${f.toFixed(2)}`:"—",t[8]=f,t[9]=h):h=t[9];const C=h;let p;t[10]!==f||t[11]!==C||t[12]!==d||t[13]!==m?(p=m||d?s.jsx(pe,{className:"h-9 w-24"}):s.jsx("span",{className:X("text-3xl font-semibold tabular-nums tracking-tight",f!=null&&ot(f)),children:C}),t[10]=f,t[11]=C,t[12]=d,t[13]=m,t[14]=p):p=t[14];let _;t[15]!==g?(_=()=>g(),t[15]=g,t[16]=_):_=t[16];let b;t[17]!==o?(b=o("settings.decoCreditsHero.refreshBalance"),t[17]=o,t[18]=b):b=t[18];const w=d&&"animate-spin";let j;t[19]!==w?(j=X("size-3.5",w),t[19]=w,t[20]=j):j=t[20];let y;t[21]!==j?(y=s.jsx($e,{className:j}),t[21]=j,t[22]=y):y=t[22];let N;t[23]!==d||t[24]!==y||t[25]!==_||t[26]!==b?(N=s.jsx(V,{type:"button",variant:"ghost",size:"icon-xs",onClick:_,disabled:d,className:"text-muted-foreground hover:text-foreground","aria-label":b,children:y}),t[23]=d,t[24]=y,t[25]=_,t[26]=b,t[27]=N):N=t[27];let P;t[28]!==N||t[29]!==p?(P=s.jsxs("div",{className:"flex items-baseline gap-2",children:[p,N]}),t[28]=N,t[29]=p,t[30]=P):P=t[30];let x;t[31]!==o?(x=o("settings.decoCreditsHero.availableBalance"),t[31]=o,t[32]=x):x=t[32];let E;t[33]!==x?(E=s.jsx("p",{className:"text-xs text-muted-foreground",children:x}),t[33]=x,t[34]=E):E=t[34];let I;return t[35]!==P||t[36]!==E?(I=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[P,E]}),t[35]=P,t[36]=E,t[37]=I):I=t[37],I}function _t(){const e=G.c(74),t=q(),{org:n}=se(),o=Z(),a=_e(),l=Ke();let c;e[0]!==l?(c=l.find(dt),e[0]=l,e[1]=c):c=e[1];const i=c,r=ie(),u=he("credits"),[m,g]=Y.useState(!1);let d;e[2]!==i||e[3]!==o?(d=async()=>{i&&await o.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[2]=i,e[3]=o,e[4]=d):d=e[4];let f;e[5]!==n||e[6]!==a||e[7]!==t?(f=()=>{a.invalidateQueries({queryKey:ee.aiProviderKeys(n.id)}),a.invalidateQueries({queryKey:ee.aiProviders(n.id)}),W.success(t("settings.decoCreditsHero.disconnectSuccess")),g(!1)},e[5]=n,e[6]=a,e[7]=t,e[8]=f):f=e[8];let h;e[9]!==t?(h=K=>{W.error(t("settings.decoCreditsHero.disconnectError",{message:K.message}))},e[9]=t,e[10]=h):h=e[10];let C;e[11]!==d||e[12]!==f||e[13]!==h?(C={mutationFn:d,onSuccess:f,onError:h},e[11]=d,e[12]=f,e[13]=h,e[14]=C):C=e[14];const{mutate:p,isPending:_}=ae(C);if(!i)return null;let b;e[15]!==t?(b=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=b):b=e[16];let w;e[17]!==t?(w=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=w):w=e[18];let j;e[19]!==w?(j=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:w,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=w,e[20]=j):j=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=()=>g(!0),e[21]=y):y=e[21];let N;e[22]!==t?(N=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=N):N=e[23];let P;e[24]!==_||e[25]!==N?(P=s.jsx(V,{variant:"ghost-destructive",size:"sm",onClick:y,disabled:_,children:N}),e[24]=_,e[25]=N,e[26]=P):P=e[26];let x;e[27]!==P||e[28]!==j?(x=s.jsxs("div",{className:"flex items-center justify-between",children:[j,P]}),e[27]=P,e[28]=j,e[29]=x):x=e[29];let E;e[30]!==t?(E=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=E):E=e[31];let I;e[32]!==E?(I=s.jsx(we,{children:E}),e[32]=E,e[33]=I):I=e[33];let U;e[34]!==t?(U=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=U):U=e[35];let D;e[36]!==U?(D=s.jsx(Ee,{children:U}),e[36]=U,e[37]=D):D=e[37];let T;e[38]!==I||e[39]!==D?(T=s.jsxs(Ae,{children:[I,D]}),e[38]=I,e[39]=D,e[40]=T):T=e[40];let O;e[41]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=O):O=e[42];let R;e[43]!==O?(R=s.jsx(Ie,{children:O}),e[43]=O,e[44]=R):R=e[44];let z;e[45]!==p?(z=()=>p(),e[45]=p,e[46]=z):z=e[46];let $;e[47]!==t?($=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=$):$=e[48];let B;e[49]!==z||e[50]!==$?(B=s.jsx(Ue,{onClick:z,variant:"destructive",children:$}),e[49]=z,e[50]=$,e[51]=B):B=e[51];let L;e[52]!==R||e[53]!==B?(L=s.jsxs(De,{children:[R,B]}),e[52]=R,e[53]=B,e[54]=L):L=e[54];let k;e[55]!==T||e[56]!==L?(k=s.jsxs(Te,{children:[T,L]}),e[55]=T,e[56]=L,e[57]=k):k=e[57];let F;e[58]!==m||e[59]!==k?(F=s.jsx(Re,{open:m,onOpenChange:g,children:k}),e[58]=m,e[59]=k,e[60]=F):F=e[60];const v=!r;let S;e[61]!==v?(S=s.jsx(ct,{enabled:v}),e[61]=v,e[62]=S):S=e[62];let A;e[63]!==u||e[64]!==t?(A=u?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(Ce,{})]}):null,e[63]=u,e[64]=t,e[65]=A):A=e[65];let H;e[66]!==x||e[67]!==F||e[68]!==S||e[69]!==A?(H=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[x,F,S,A]})}),e[66]=x,e[67]=F,e[68]=S,e[69]=A,e[70]=H):H=e[70];let M;return e[71]!==H||e[72]!==b?(M=s.jsx(ne,{title:b,children:H}),e[71]=H,e[72]=b,e[73]=M):M=e[73],M}function dt(e){return e.providerId==="deco"}function ut(e,t){const n=G.c(9),o=Z(),a=q();let l;n[0]!==o||n[1]!==e?(l=async r=>{const{url:u}=await o.call(e,e==="ORGANIZATION_BILLING_CHECKOUT_START"&&r?{planId:r}:{});return u},n[0]=o,n[1]=e,n[2]=l):l=n[2];let c;n[3]!==t||n[4]!==a?(c=r=>W.error(a(t,{message:r.message})),n[3]=t,n[4]=a,n[5]=c):c=n[5];let i;return n[6]!==l||n[7]!==c?(i={mutationFn:l,onSuccess:ft,onError:c},n[6]=l,n[7]=c,n[8]=i):i=n[8],ae(i)}function ft(e){return window.open(e,"_blank","noopener,noreferrer")}const mt={ok:"text-foreground",warn:"text-warning",exhausted:"text-destructive",spent:"text-muted-foreground"},gt={ok:"[&>[data-slot=progress-indicator]]:bg-brand-purple",warn:"[&>[data-slot=progress-indicator]]:bg-warning",exhausted:"[&>[data-slot=progress-indicator]]:bg-destructive",spent:"[&>[data-slot=progress-indicator]]:bg-muted-foreground/40"};function fe(e){const t=G.c(22),{label:n,badge:o,value:a,unit:l,valueClassName:c,bar:i,footer:r}=e;let u;t[0]!==n?(u=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),t[0]=n,t[1]=u):u=t[1];let m;t[2]!==o||t[3]!==u?(m=s.jsxs("div",{className:"flex h-5 items-center gap-2",children:[u,o]}),t[2]=o,t[3]=u,t[4]=m):m=t[4];let g;t[5]!==c?(g=X("text-4xl font-semibold leading-none tracking-tight tabular-nums",c),t[5]=c,t[6]=g):g=t[6];let d;t[7]!==g||t[8]!==a?(d=s.jsx("span",{className:g,children:a}),t[7]=g,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==l?(f=l&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),t[10]=l,t[11]=f):f=t[11];let h;t[12]!==d||t[13]!==f?(h=s.jsxs("div",{className:"flex items-baseline gap-2",children:[d,f]}),t[12]=d,t[13]=f,t[14]=h):h=t[14];let C;t[15]!==i||t[16]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-2",children:[i,r]}),t[15]=i,t[16]=r,t[17]=C):C=t[17];let p;return t[18]!==m||t[19]!==h||t[20]!==C?(p=s.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[m,h,C]}),t[18]=m,t[19]=h,t[20]=C,t[21]=p):p=t[21],p}function xt(){const e=G.c(8),t=q();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{size:14}),e[0]=n):n=e[0];let o;e[1]!==t?(o=t("settings.decoCreditsHero.addCredits"),e[1]=t,e[2]=o):o=e[2];let a;e[3]!==o?(a=s.jsx(Me,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"sm",className:"w-fit",children:[n,o]})}),e[3]=o,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ze,{align:"start",className:"w-auto",children:s.jsx(Ce,{})}),e[5]=l):l=e[5];let c;return e[6]!==a?(c=s.jsxs(Ve,{children:[a,l]}),e[6]=a,e[7]=c):c=e[7],c}function pt(){const e=G.c(15),t=q(),{org:n}=se(),o=Z();let a;e[0]!==n.id?(a=ee.orgBillingAccount(n.id),e[0]=n.id,e[1]=a):a=e[1];let l;e[2]!==o?(l=()=>o.call("ORGANIZATION_BILLING_GET",{}),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={queryKey:a,staleTime:6e4,queryFn:l},e[4]=a,e[5]=l,e[6]=c):c=e[6];const{data:i}=xe(c),{mutate:r,isPending:u}=ut("ORGANIZATION_BILLING_PORTAL","settings.planUsage.portalFailed");if(!i?.hasBillingAccount)return null;let m;e[7]!==r?(m=()=>r(),e[7]=r,e[8]=m):m=e[8];let g;e[9]!==t?(g=t("settings.planUsage.manageBilling"),e[9]=t,e[10]=g):g=e[10];let d;return e[11]!==u||e[12]!==m||e[13]!==g?(d=s.jsx(V,{variant:"outline",size:"sm",disabled:u,onClick:m,children:g}),e[11]=u,e[12]=m,e[13]=g,e[14]=d):d=e[14],d}function St(){const e=G.c(9),t=q(),{org:n}=se(),o=ie(),{granted:a}=Be("monitoring:view");if(!o||!a)return null;let l;e[0]!==n.slug?(l={org:n.slug},e[0]=n.slug,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={tab:"overview"},e[2]=c):c=e[2];let i;e[3]!==t?(i=t("settings.planUsage.aiUsage"),e[3]=t,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{size:14}),e[5]=r):r=e[5];let u;return e[6]!==l||e[7]!==i?(u=s.jsx(V,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(ke,{to:"/$org/settings/monitor",params:l,search:c,children:[i,r]})}),e[6]=l,e[7]=i,e[8]=u):u=e[8],u}function wt(){const e=G.c(71),t=q(),[n]=ge(),o=ie(),a=he("credits"),{data:l,isLoading:c,isError:i,refetch:r}=qe(),{data:u}=Qe();let m;e[0]!==l?.plan||e[1]!==u?(m=u?.findIndex(v=>v.id===l?.plan.id)??-1,e[0]=l?.plan,e[1]=u,e[2]=m):m=e[2];const g=m;if(!o)return null;if(c){let v;e[3]!==t?(v=t("settings.planUsage.title"),e[3]=t,e[4]=v):v=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(le,{children:s.jsx("div",{className:"px-5 py-5",children:s.jsx(pe,{className:"h-24 w-full"})})}),e[5]=S):S=e[5];let A;return e[6]!==v?(A=s.jsx(ne,{title:v,children:S}),e[6]=v,e[7]=A):A=e[7],A}if(i||!l){let v;e[8]!==t?(v=t("settings.planUsage.title"),e[8]=t,e[9]=v):v=e[9];let S;e[10]!==t?(S=t("settings.planUsage.loadFailed"),e[10]=t,e[11]=S):S=e[11];let A;e[12]!==S?(A=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[12]=S,e[13]=A):A=e[13];let H;e[14]!==r?(H=()=>r(),e[14]=r,e[15]=H):H=e[15];let M;e[16]!==t?(M=t("settings.planUsage.retry"),e[16]=t,e[17]=M):M=e[17];let K;e[18]!==H||e[19]!==M?(K=s.jsx(V,{variant:"outline",size:"sm",onClick:H,children:M}),e[18]=H,e[19]=M,e[20]=K):K=e[20];let Q;e[21]!==A||e[22]!==K?(Q=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex items-center justify-between gap-3",children:[A,K]})}),e[21]=A,e[22]=K,e[23]=Q):Q=e[23];let J;return e[24]!==v||e[25]!==Q?(J=s.jsx(ne,{title:v,children:Q}),e[24]=v,e[25]=Q,e[26]=J):J=e[26],J}if(l.plan.id==="free")return null;let d;if(e[27]!==l.usage){const v=l.usage?Math.round(l.usage.percent*100):null;d=v!==null&&Number.isFinite(v)?Math.min(100,Math.max(0,v)):null,e[27]=l.usage,e[28]=d}else d=e[28];const f=d,h=l.usage?.state??"ok",C=l.features.chat,p=l.credits?.remainingUsd??null;let _;e[29]!==n?(_=v=>{if(!v)return null;const S=new Date(v);return Number.isNaN(S.getTime())?null:S.toLocaleDateString(n.language,{day:"numeric",month:"short"})},e[29]=n,e[30]=_):_=e[30];const b=_;let w;e[31]!==l.periodStart||e[32]!==b?(w=b(l.periodStart),e[31]=l.periodStart,e[32]=b,e[33]=w):w=e[33];const j=w;let y;e[34]!==l.periodEnd||e[35]!==b?(y=b(l.periodEnd),e[34]=l.periodEnd,e[35]=b,e[36]=y):y=e[36];const N=y;let P;e[37]!==N||e[38]!==j?(P=j&&N?{start:j,end:N}:null,e[37]=N,e[38]=j,e[39]=P):P=e[39];const x=P,E=h==="exhausted"&&p!==null&&p>0,I=E?"spent":h;let U;e[40]!==g?(U=g>=0&&s.jsx(Ye,{index:g,className:"size-6"}),e[40]=g,e[41]=U):U=e[41];let D;e[42]!==l.plan.name?(D=s.jsx("span",{className:"text-sm font-medium",children:l.plan.name}),e[42]=l.plan.name,e[43]=D):D=e[43];let T;e[44]!==U||e[45]!==D?(T=s.jsxs("div",{className:"flex items-center gap-2",children:[U,D]}),e[44]=U,e[45]=D,e[46]=T):T=e[46];let O;e[47]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pt,{}),e[47]=O):O=e[47];let R;e[48]!==T?(R=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[T,O]}),e[48]=T,e[49]=R):R=e[49];const z=a&&"sm:grid-cols-[minmax(0,1fr)_minmax(0,15rem)]";let $;e[50]!==z?($=X("grid gap-x-8 gap-y-6",z),e[50]=z,e[51]=$):$=e[51];let B;e[52]!==I||e[53]!==C||e[54]!==f||e[55]!==x||e[56]!==t?(B=C?s.jsx(fe,{label:t("settings.planUsage.included"),value:f===null?t("settings.planUsage.usageUnavailable"):`${f}%`,unit:f!==null?t("settings.planUsage.used"):void 0,valueClassName:mt[I],bar:f===null?s.jsx("div",{className:"h-3 w-full rounded-full bg-muted/60","aria-hidden":"true"}):s.jsx(at,{value:f,"aria-label":t("settings.planUsage.included"),className:X("h-3 bg-muted [&>[data-slot=progress-indicator]]:rounded-full",gt[I])}),footer:x?s.jsxs("div",{className:"flex items-baseline justify-between gap-4 text-meta",children:[s.jsx("span",{children:x.start}),s.jsx("span",{children:x.end})]}):s.jsx("span",{className:"text-meta",children:t("settings.planUsage.periodHint")})}):s.jsx("p",{className:"text-sm text-muted-foreground self-center",children:t("settings.planUsage.noAiIncluded")}),e[52]=I,e[53]=C,e[54]=f,e[55]=x,e[56]=t,e[57]=B):B=e[57];let L;e[58]!==a||e[59]!==p||e[60]!==E||e[61]!==n||e[62]!==t?(L=a&&s.jsx(fe,{label:t("settings.planUsage.credits"),badge:E?s.jsx(Fe,{variant:"success",size:"sm",children:t("settings.planUsage.creditsInUse")}):null,value:p===null?"—":p.toLocaleString(n.language,{style:"currency",currency:"USD"}),valueClassName:p!==null&&p>0?"text-foreground":"text-muted-foreground",footer:s.jsx(xt,{})}),e[58]=a,e[59]=p,e[60]=E,e[61]=n,e[62]=t,e[63]=L):L=e[63];let k;e[64]!==$||e[65]!==B||e[66]!==L?(k=s.jsxs("div",{className:$,children:[B,L]}),e[64]=$,e[65]=B,e[66]=L,e[67]=k):k=e[67];let F;return e[68]!==R||e[69]!==k?(F=s.jsxs(He,{className:"p-6 gap-6",children:[R,k]}),e[68]=R,e[69]=k,e[70]=F):F=e[70],F}export{St as A,_t as D,wt as P,ut as u};
@@ -1 +1 @@
1
- import{r as l,c2 as _,j as c,c4 as j,c5 as x,c3 as w,b$ as z,c0 as G,c1 as H,c9 as E,ci as K,d$ as b,cd as U,cf as V,cj as W,ce as Z,cg as q,ch as B,ck as J,cl as Q,c7 as X,c as R,m as Y}from"./index-BMPeWdJw.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
1
+ import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-BuZqAz74.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
@@ -1 +1 @@
1
- import{c as it,b as pt,r as at,J as jt,j as e,m as et,B as tt,as as Ct}from"./index-BMPeWdJw.js";import{E as Nt}from"./agent-icon-BJ2Wx2fE.js";import{b as Dt}from"./UserCheck01-D14kK5BQ.js";import{s as kt}from"./Plus-NIlBePVH.js";import{S as St}from"./scroll-area-DAamBeOm.js";import{c as wt,s as Tt,b as ct,a as dt}from"./date-utils-CrvIKg-s.js";import{M as zt}from"./category-tree-CqfxuXDr.js";import{g as Et,d as Mt}from"./item-actions-Bf8HZ-5j.js";import"./AlertCircle-rt5NTcOt.js";import"./Tool01-CRE8Zr1E.js";import"./ArrowUp-BX9rle-Z.js";import"./ArrowLeft-BtflI84P.js";import"./ArrowRight-DckDNEPN.js";import"./BookOpen01-Cdt9znE-.js";import"./Globe04-BGaPJwRM.js";import"./CheckCircle-DQ8gl2jA.js";import"./TrendUp01-CkF2n8Hn.js";import"./ChevronDown-88QbtNjw.js";import"./ChevronSelectorVertical-BfhN49CO.js";import"./ChevronUp-BwBBvXr-.js";import"./UserSquare-DAFK733H.js";import"./LinkBroken01-DWWxoD2s.js";import"./CreditCard01-CHpJYShR.js";import"./File02-CpMe0sR1.js";import"./MessageCircle01-pdZ3c0Ei.js";import"./SwitchHorizontal01-BCndh-XX.js";import"./Eye-C8bzWtOv.js";import"./Image01-CyjafdfK.js";import"./Key01-NBdT0O9W.js";import"./LayoutLeft-BI23EoSs.js";import"./Minus-ToHFKPwl.js";import"./Monitor01-DQ2oaJ_f.js";import"./Sun-CGayzxv4.js";import"./Play-Dgyu5PiH.js";import"./SearchMd-BZFf7uAm.js";import"./ShoppingBag01-CA3tpOzv.js";import"./Trash01-C1sTtIQd.js";import"./Upload01-DF54M6Ph.js";import"./Users01-8BTVWXNl.js";import"./XClose-igHVZF4W.js";import"./Zap-CZUa6DWb.js";import"./index-BdQq_4o_.js";import"./empty-message-BnLHUiLW.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-Bonyggei.js";import"./collapsible-Czfx-LAp.js";import"./use-copy-Dc7Mx1fC.js";import"./usage-stats-xir5IhsZ.js";import"./utils-CVEq3hMx.js";import"./markdown-BWT_4WJH.js";import"./chat-context-CzmbAHe8.js";import"./use-panel-navigate-yNzK1oeQ.js";import"./thread-route-CSj65J5K.js";import"./use-project-scope-BYK0JAGP.js";import"./repository-binding-BCK2I6Mo.js";import"./use-mcp-client-D6hvNNod.js";import"./auth-DdGqjHXO.js";import"./use-view-draft-kind-CK2Ws293.js";import"./use-blog-view-CLaoWWXx.js";import"./use-organization-settings-HyX5IrJ4.js";import"./schema-Cg4pyiCI.js";import"./task-board-CgkLyySX.js";import"./thread-intent-LmIsiguS.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C79C_cUh.js";import"./session-runtime-B3tpmEdV.js";import"./use-entitlements-RVjfgn4l.js";import"./use-ai-providers-B1MpfOF5.js";import"./use-current-view-AGi0k_-I.js";import"./use-in-settings-CavkWvLD.js";import"./use-decopilot-events-DFiNdpMv.js";import"./use-mobile-DPeImGih.js";import"./tooltip-BBk4QO9B.js";import"./index-BDs-2B47.js";import"./gateway-client-CEz2o7p6.js";import"./form-vgZJ8ykR.js";import"./label-CRK3U7ZP.js";import"./task-key-PeB83qoV.js";import"./use-task-board-items--v3zNW-2.js";import"./config-CpgY06XK.js";import"./task-route-D-8EO_RF.js";import"./project-index-Dn3n52T-.js";import"./shell-layout-Cy4x2w2C.js";import"./use-deployment-admin-BA_JLmwW.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-l577omxO.js";import"./command-Bq8LzPoY.js";import"./index-CSLJLC25.js";import"./integration-icon-xMpRZNbX.js";import"./project-icon-DqFpEPg-.js";import"./use-navigate-to-agent-D-LXOG-h.js";import"./use-debounced-value-CTxCZD5A.js";import"./new-project-dialog-IDVZ0s2M.js";import"./repository-picker-DWJeQ4Uz.js";import"./github-icon-CNkm_QOq.js";import"./useInfiniteQuery-CkG5v2bH.js";import"./infiniteQueryObserver-BmYMm5wr.js";import"./collection-search-fi8Jpdhv.js";import"./new-project-store-DBh8m9Ki.js";import"./legacy-admin-welcome-dialog-DpejN_Uy.js";import"./drawer-cS0px3h4.js";import"./required-auth-layout-Bqqrer2s.js";import"./use-org-sso-QDNvT__Q.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-YjPzFqL6.js";import"./types-BRAj2PE2.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-3DsSjpPg.js";import"./use-connection-VTUSBGTe.js";import"./use-mcp-prompts-Dzcv5Qm_.js";import"./use-thread-outputs-vfKngax2.js";import"./file-type-icon-5ukaLDeF.js";import"./section-array-field-DR10vlg7.js";import"./blocks-tab-states-pUzFXPTK.js";import"./site-editor-toast-DyAj-yh9.js";import"./use-sandbox-events-DFE5xC3q.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-B8tSOiQV.js";import"./use-voice-input-Bag2UQ5s.js";import"./popover-zwWAAqUd.js";import"./index-DGJ99-Gb.js";import"./checkbox-CnO5GKzb.js";import"./select-Cl-2whSq.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-GIRCtww_.js";import"./sandbox-git-api-MxAem5iH.js";import"./empty-state-BNznQ4un.js";import"./use-move-blocks-B58hF-QF.js";import"./hosted-reconcile-B7PmB0kg.js";import"./badge-C-0ziPev.js";import"./empty-state-haYeO0--.js";import"./delete-copy-bwY-nICG.js";import"./use-never-published-AUwhcJk8.js";import"./search-input-_TDPMfaj.js";import"./tabs-LNTPmT4H.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-DJQqKxP9.js";import"./asset-utils-DDL7Zhst.js";import"./index-iNQuijBz.js";import"./match-site-slug-config-B47_xZCi.js";import"./textarea-i65d3zD6.js";import"./monaco-editor-BxMnwfXM.js";import"./editor-DOCwgCVw.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-secondary-hover hover:text-accent-foreground";function yo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:m,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[j,C]=at.useState(null),[rt]=jt(),[n,f]=at.useState(It),p=rt.language;let N;t[0]!==n||t[1]!==p?(N=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=N):N=t[2];const y=N;let x,u,l,c,v,k,S,w,T,z;if(t[3]!==n||t[4]!==b||t[5]!==j||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==m||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=Et(zt(b)),st=wt(n),bt=Tt(new Date);u="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let H;t[27]!==I?(H=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:I}),t[27]=I,t[28]=H):H=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Lt),t[29]=Q):Q=t[29];let U;t[30]!==r?(U=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=U):U=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let _;t[33]!==U?(_=e.jsx(tt,{variant:"ghost",size:"icon",onClick:Q,"aria-label":U,children:V}),t[33]=U,t[34]=_):_=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Pt),t[35]=X):X=t[35];let $;t[36]!==r?($=r("sandbox.postCalendar.next"),t[36]=r,t[37]=$):$=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Ct,{size:16}),t[38]=Y):Y=t[38];let O;t[39]!==$?(O=e.jsx(tt,{variant:"ghost",size:"icon",onClick:X,"aria-label":$,children:Y}),t[39]=$,t[40]=O):O=t[40];let B;t[41]!==y?(B=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=B):B=t[42];let F;t[43]!==r?(F=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=F):F=t[44];let R;t[45]!==F?(R=e.jsx(mt,{className:ft,label:F}),t[45]=F,t[46]=R):R=t[46];let A;t[47]!==r?(A=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=A):A=t[48];let K;t[49]!==A?(K=e.jsx(mt,{className:xt,label:A}),t[49]=A,t[50]=K):K=t[50];let W;t[51]!==R||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[R,K]}),t[51]=R,t[52]=K,t[53]=W):W=t[53],t[54]!==H||t[55]!==_||t[56]!==O||t[57]!==B||t[58]!==W?(l=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[H,_,O,B,W]}),t[54]=H,t[55]=_,t[56]=O,t[57]=B,t[58]=W,t[59]=l):l=t[59],z="relative flex-1 min-h-0",x=St,T="h-full",S="flex min-w-[880px] gap-4 p-4";let J;t[60]!==r?(J=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=J):J=t[61];let Z;t[62]!==J?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:J}),t[62]=J,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(a=>e.jsx("div",{className:"px-2 text-2xs text-muted-foreground",children:ut.format(a)},a.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(a=>{const yt=a.getMonth()===n.getMonth(),vt=ht.get(Mt(a))??[];return e.jsxs("div",{onDragOver:g=>{j&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const lt=g.dataTransfer.getData("text/plain");C(null),lt&&i(lt,a)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",j&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",a.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:a.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon-xs",className:"opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>m(a),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(a)}),children:e.jsx(kt,{size:14})})]}),vt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:C},g.post.key))]},a.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",v=e.jsx("p",{className:"px-1 text-2xs font-medium text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Nt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(a=>e.jsx(nt,{entry:a,active:a.post.key===d,draggable:!1,onSelect:o,onDragStateChange:C},a.post.key)),t[3]=n,t[4]=b,t[5]=j,t[6]=s,t[7]=p,t[8]=y,t[9]=m,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=l,t[17]=c,t[18]=v,t[19]=k,t[20]=S,t[21]=w,t[22]=T,t[23]=z}else x=t[14],u=t[15],l=t[16],c=t[17],v=t[18],k=t[19],S=t[20],w=t[21],T=t[22],z=t[23];let E;t[64]!==c||t[65]!==v||t[66]!==k?(E=e.jsxs("div",{className:c,children:[v,k]}),t[64]=c,t[65]=v,t[66]=k,t[67]=E):E=t[67];let M;t[68]!==E||t[69]!==S||t[70]!==w?(M=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=M):M=t[71];let P;t[72]!==x||t[73]!==M||t[74]!==T?(P=e.jsx(x,{className:T,children:M}),t[72]=x,t[73]=M,t[74]=T,t[75]=P):P=t[75];let L;t[76]!==P||t[77]!==z?(L=e.jsx("div",{className:z,children:P}),t[76]=P,t[77]=z,t[78]=L):L=t[78];let q;return t[79]!==u||t[80]!==l||t[81]!==L?(q=e.jsxs("div",{className:u,children:[l,L]}),t[79]=u,t[80]=l,t[81]=L,t[82]=q):q=t[82],q}function Pt(h){return dt(h,1)}function Lt(h){return dt(h,-1)}function It(){return ct(new Date)}function mt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let i;return t[4]!==d||t[5]!==m?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,d]}),t[4]=d,t[5]=m,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:m,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,j=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let C;t[0]!==D||t[1]!==j?(C=D(j),t[0]=D,t[1]=j,t[2]=C):C=t[2];const rt=C;let n;t[3]!==i||t[4]!==s.key?(n=v=>{v.dataTransfer.setData("text/plain",s.key),v.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==m||t[9]!==s.key?(p=()=>m(s.key),t[8]=m,t[9]=s.key,t[10]=p):p=t[10];const N=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let l;t[11]!==y||t[12]!==x||t[13]!==u?(l=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=l):l=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==l||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==N?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:N,className:l,children:s.title}),t[15]=o,t[16]=s.title,t[17]=l,t[18]=n,t[19]=f,t[20]=p,t[21]=N,t[22]=c):c=t[22],c}export{yo as PostCalendar};
1
+ import{c as it,b as pt,r as at,J as jt,j as e,m as et,B as tt,au as Ct}from"./index-BuZqAz74.js";import{E as Nt}from"./agent-icon-DwJHakBB.js";import{b as Dt}from"./UserCheck01-BMoOFYIZ.js";import{s as kt}from"./Plus--DcN-eh1.js";import{S as St}from"./scroll-area-bkCFS0v8.js";import{c as wt,s as Tt,b as ct,a as dt}from"./date-utils-CrvIKg-s.js";import{M as zt}from"./category-tree-BeXLYa5S.js";import{g as Et,d as Mt}from"./item-actions-Dld5lBtQ.js";import"./AlertCircle-CGZfuvxJ.js";import"./Tool01-BeDQSGiN.js";import"./ArrowUp-DJZ55cl-.js";import"./ArrowLeft-XURGfwpG.js";import"./ArrowRight-ZoKxZa45.js";import"./BookOpen01-gO5hgFUK.js";import"./Globe04-DO1uUwfE.js";import"./CheckCircle-CmN8U1V5.js";import"./TrendUp01-_SFSHjzO.js";import"./ChevronDown-ClblfTVV.js";import"./ChevronSelectorVertical-YxAp9GGa.js";import"./ChevronUp-0ZCAxpBW.js";import"./UserSquare-Dn1UPzSD.js";import"./LinkBroken01-cq4srxHs.js";import"./CreditCard01-CcTQ1h3_.js";import"./File02-Cs751Kds.js";import"./MessageCircle01-Bf6dD94_.js";import"./SwitchHorizontal01-BQF84Li3.js";import"./Eye-D5j_svLn.js";import"./Image01-CJL4B_rR.js";import"./Key01-fuHivqLl.js";import"./LayoutLeft-CCeum9wV.js";import"./Minus-Cc21R1KY.js";import"./Monitor01-DGdgEYxG.js";import"./Sun-D9ql5ZlI.js";import"./Play-zYFs_vGL.js";import"./SearchMd-BwYuN52e.js";import"./ShoppingBag01-D-gmqcz7.js";import"./Trash01-BmQrADz0.js";import"./Upload01-DOfZqxci.js";import"./Users01-B_yoWxPn.js";import"./XClose-C4MsAn9v.js";import"./Zap-DoxB0q6B.js";import"./index-BdQq_4o_.js";import"./empty-message-DVICFi26.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BYbJa99U.js";import"./collapsible-DifRD2Ww.js";import"./use-copy-BFeXylk9.js";import"./usage-stats-C5Wj6kIy.js";import"./utils-CVEq3hMx.js";import"./markdown-CwYBGb1B.js";import"./chat-context-DG5tQFfU.js";import"./use-panel-navigate-B3thngCs.js";import"./thread-route-Dw1cQjON.js";import"./use-project-scope-CD-cb4-V.js";import"./repository-binding-VVfcdUiy.js";import"./use-mcp-client-UWOU8UbZ.js";import"./auth-DuSLyK-k.js";import"./use-view-draft-kind-CXMOqIBD.js";import"./use-blog-view-w4rEUATy.js";import"./use-organization-settings-D8JbZGlQ.js";import"./schema-CCpL_LVZ.js";import"./task-board-DEUSGytR.js";import"./thread-intent-CyH0Z8_7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C7kLS2GY.js";import"./session-runtime-HHtypsTM.js";import"./use-entitlements-DgXhk8I6.js";import"./use-ai-providers-BG5EDM0R.js";import"./use-current-view-swKX6Bc6.js";import"./use-in-settings-cNZb_oio.js";import"./use-decopilot-events-SRdggwTs.js";import"./use-mobile-Cq1k3-Gk.js";import"./tooltip-DnGqcvtu.js";import"./index-DNuvhcDO.js";import"./gateway-client-PdaGLWBA.js";import"./form-Cxhh0mxt.js";import"./label-Dm_T3WyF.js";import"./task-key-DaPOId6s.js";import"./use-task-board-items-DP6ZFnrN.js";import"./config-dB-x76iz.js";import"./task-route-BJj40Yza.js";import"./project-index-5c8GGatg.js";import"./shell-layout-rYoN4RTk.js";import"./use-deployment-admin-Dwt-RYsg.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-D_lLzWXp.js";import"./command-DHGFzOhP.js";import"./index-DsWqYG3w.js";import"./integration-icon-D7fga3kk.js";import"./project-icon-BHn6Xq54.js";import"./use-navigate-to-agent-vJOwimSb.js";import"./use-debounced-value-CPl0Wyl6.js";import"./new-project-dialog-Bq2YhVDS.js";import"./repository-picker-By75IHJa.js";import"./github-icon-h_xg-qFR.js";import"./useInfiniteQuery-CNxlkxws.js";import"./infiniteQueryObserver-CHN_AvWa.js";import"./collection-search-RWM-9f07.js";import"./new-project-store-C82itd6a.js";import"./legacy-admin-welcome-dialog-C0w-pw6s.js";import"./drawer-BXd80xtd.js";import"./required-auth-layout-GSSn-bTA.js";import"./use-org-sso-fZ2uDAIp.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CLuYD3rD.js";import"./types-B4ln4I1a.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-Lq2qXLx8.js";import"./use-connection-C4G0ZMoe.js";import"./use-mcp-prompts-CjwiiUTx.js";import"./use-thread-outputs-A3ms5KEO.js";import"./file-type-icon-CSrE_noX.js";import"./section-array-field-DOngDm8U.js";import"./blocks-tab-states-DxLq1BL5.js";import"./site-editor-toast-aupfR4Aq.js";import"./use-sandbox-events-BcrE-YTF.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-Dh0QtV4J.js";import"./use-voice-input-poVZeRVs.js";import"./popover-D6EIL5sL.js";import"./index-Bld02Tnb.js";import"./checkbox-DAnVkT6Q.js";import"./select-BkYZ4NYA.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-BdAsQahL.js";import"./sandbox-git-api-CkSQDoxX.js";import"./empty-state-BK8GboWz.js";import"./use-move-blocks-DH3gSdil.js";import"./hosted-reconcile-uX15ZUhb.js";import"./badge-BvHOfdxU.js";import"./empty-state-LbEOn0Mj.js";import"./delete-copy-C7-0DCkQ.js";import"./use-never-published-BB5kYeS3.js";import"./search-input-C4sd-kKh.js";import"./tabs-CbfCGlFS.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-BlRaUlfc.js";import"./asset-utils-C40qdOgS.js";import"./index-CZTrNcsP.js";import"./match-site-slug-config-B47_xZCi.js";import"./textarea-CcO-rfag.js";import"./monaco-editor-CTONBla7.js";import"./editor-DNZ-WgCS.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-secondary-hover hover:text-accent-foreground";function yo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:m,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[j,C]=at.useState(null),[rt]=jt(),[n,f]=at.useState(It),p=rt.language;let N;t[0]!==n||t[1]!==p?(N=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=N):N=t[2];const y=N;let x,u,l,c,v,k,S,w,T,z;if(t[3]!==n||t[4]!==b||t[5]!==j||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==m||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=Et(zt(b)),st=wt(n),bt=Tt(new Date);u="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let H;t[27]!==I?(H=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:I}),t[27]=I,t[28]=H):H=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Lt),t[29]=Q):Q=t[29];let U;t[30]!==r?(U=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=U):U=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let _;t[33]!==U?(_=e.jsx(tt,{variant:"ghost",size:"icon",onClick:Q,"aria-label":U,children:V}),t[33]=U,t[34]=_):_=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Pt),t[35]=X):X=t[35];let $;t[36]!==r?($=r("sandbox.postCalendar.next"),t[36]=r,t[37]=$):$=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Ct,{size:16}),t[38]=Y):Y=t[38];let O;t[39]!==$?(O=e.jsx(tt,{variant:"ghost",size:"icon",onClick:X,"aria-label":$,children:Y}),t[39]=$,t[40]=O):O=t[40];let B;t[41]!==y?(B=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=B):B=t[42];let F;t[43]!==r?(F=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=F):F=t[44];let R;t[45]!==F?(R=e.jsx(mt,{className:ft,label:F}),t[45]=F,t[46]=R):R=t[46];let A;t[47]!==r?(A=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=A):A=t[48];let K;t[49]!==A?(K=e.jsx(mt,{className:xt,label:A}),t[49]=A,t[50]=K):K=t[50];let W;t[51]!==R||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[R,K]}),t[51]=R,t[52]=K,t[53]=W):W=t[53],t[54]!==H||t[55]!==_||t[56]!==O||t[57]!==B||t[58]!==W?(l=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[H,_,O,B,W]}),t[54]=H,t[55]=_,t[56]=O,t[57]=B,t[58]=W,t[59]=l):l=t[59],z="relative flex-1 min-h-0",x=St,T="h-full",S="flex min-w-[880px] gap-4 p-4";let J;t[60]!==r?(J=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=J):J=t[61];let Z;t[62]!==J?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:J}),t[62]=J,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(a=>e.jsx("div",{className:"px-2 text-2xs text-muted-foreground",children:ut.format(a)},a.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(a=>{const yt=a.getMonth()===n.getMonth(),vt=ht.get(Mt(a))??[];return e.jsxs("div",{onDragOver:g=>{j&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const lt=g.dataTransfer.getData("text/plain");C(null),lt&&i(lt,a)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",j&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",a.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:a.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon-xs",className:"opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>m(a),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(a)}),children:e.jsx(kt,{size:14})})]}),vt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:C},g.post.key))]},a.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",v=e.jsx("p",{className:"px-1 text-2xs font-medium text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Nt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(a=>e.jsx(nt,{entry:a,active:a.post.key===d,draggable:!1,onSelect:o,onDragStateChange:C},a.post.key)),t[3]=n,t[4]=b,t[5]=j,t[6]=s,t[7]=p,t[8]=y,t[9]=m,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=l,t[17]=c,t[18]=v,t[19]=k,t[20]=S,t[21]=w,t[22]=T,t[23]=z}else x=t[14],u=t[15],l=t[16],c=t[17],v=t[18],k=t[19],S=t[20],w=t[21],T=t[22],z=t[23];let E;t[64]!==c||t[65]!==v||t[66]!==k?(E=e.jsxs("div",{className:c,children:[v,k]}),t[64]=c,t[65]=v,t[66]=k,t[67]=E):E=t[67];let M;t[68]!==E||t[69]!==S||t[70]!==w?(M=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=M):M=t[71];let P;t[72]!==x||t[73]!==M||t[74]!==T?(P=e.jsx(x,{className:T,children:M}),t[72]=x,t[73]=M,t[74]=T,t[75]=P):P=t[75];let L;t[76]!==P||t[77]!==z?(L=e.jsx("div",{className:z,children:P}),t[76]=P,t[77]=z,t[78]=L):L=t[78];let q;return t[79]!==u||t[80]!==l||t[81]!==L?(q=e.jsxs("div",{className:u,children:[l,L]}),t[79]=u,t[80]=l,t[81]=L,t[82]=q):q=t[82],q}function Pt(h){return dt(h,1)}function Lt(h){return dt(h,-1)}function It(){return ct(new Date)}function mt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let i;return t[4]!==d||t[5]!==m?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,d]}),t[4]=d,t[5]=m,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:m,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,j=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let C;t[0]!==D||t[1]!==j?(C=D(j),t[0]=D,t[1]=j,t[2]=C):C=t[2];const rt=C;let n;t[3]!==i||t[4]!==s.key?(n=v=>{v.dataTransfer.setData("text/plain",s.key),v.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==m||t[9]!==s.key?(p=()=>m(s.key),t[8]=m,t[9]=s.key,t[10]=p):p=t[10];const N=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let l;t[11]!==y||t[12]!==x||t[13]!==u?(l=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=l):l=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==l||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==N?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:N,className:l,children:s.title}),t[15]=o,t[16]=s.title,t[17]=l,t[18]=n,t[19]=f,t[20]=p,t[21]=N,t[22]=c):c=t[22],c}export{yo as PostCalendar};