decocms 4.443.1 → 4.443.2

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 (357) hide show
  1. package/dist/README.md +7 -1
  2. package/dist/client/assets/{AlertCircle-nGDYftVI.js → AlertCircle-DXLs2YfX.js} +1 -1
  3. package/dist/client/assets/{AreaChart-ZSNWajPN.js → AreaChart-DLFvYTn8.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DYsLCA2v.js → ArrowLeft--pkS1YcK.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DWz6jCWP.js → ArrowUp-DQxu9lq3.js} +1 -1
  6. package/dist/client/assets/{Building02-dkZL73Aq.js → Building02-CKLKiQ3U.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-DhLgFSnL.js → CartesianChart-C6kBEFCy.js} +1 -1
  8. package/dist/client/assets/{Check-DdiNmh3G.js → Check-BbEloZu1.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DSYpSZ7G.js → CheckCircle-BDzQ_ECv.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-RZ9D15nf.js → ChevronUp-D3ChNhrQ.js} +1 -1
  11. package/dist/client/assets/{Copy01-gcdR5IZX.js → Copy01-a63gH2RE.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-Bl6sSiay.js → CreditCard01-BS5sPNh6.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-DhpXY6GD.js → DotsVertical-vt_3gkoG.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-DpIYs0cR.js → ErrorBarContext-CSPYPFXx.js} +1 -1
  15. package/dist/client/assets/{Image01-CR8VGKVo.js → Image01-BR5I_9pG.js} +1 -1
  16. package/dist/client/assets/{Key01-D0sQpTkE.js → Key01-C0k-gtwc.js} +1 -1
  17. package/dist/client/assets/{Line-u5ZQ6mA8.js → Line-C6bWuRZM.js} +1 -1
  18. package/dist/client/assets/{Link01-8ip-fr29.js → Link01-DM36157y.js} +1 -1
  19. package/dist/client/assets/{LinkBroken01-BkhUs9rq.js → LinkBroken01-DHksKx7R.js} +1 -1
  20. package/dist/client/assets/{LinkExternal01-DrJX7aC0.js → LinkExternal01-DZNYicBT.js} +1 -1
  21. package/dist/client/assets/{Monitor01-D7z7RGzV.js → Monitor01-BQxvNkHa.js} +1 -1
  22. package/dist/client/assets/{Palette-DnGo9yVI.js → Palette-D-JYBilo.js} +1 -1
  23. package/dist/client/assets/{Plus-DB4FI3R3.js → Plus-kevaXo9o.js} +1 -1
  24. package/dist/client/assets/{SearchMd-kP-wMwgH.js → SearchMd-CKY0v7Vy.js} +1 -1
  25. package/dist/client/assets/{Sector-LnIMaEQL.js → Sector-DTAQxGMo.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-_DEXID55.js → ShoppingBag01-Dfpwkcdn.js} +1 -1
  27. package/dist/client/assets/{Sun-FPWNj6PU.js → Sun-DxmQEZP4.js} +1 -1
  28. package/dist/client/assets/{Tool01-BLZm9DPk.js → Tool01-D4pGeBop.js} +1 -1
  29. package/dist/client/assets/{Trash01-BvHf5UWo.js → Trash01-DFbco4Cc.js} +1 -1
  30. package/dist/client/assets/{Upload01-DKe2IKKC.js → Upload01-BZbq-HqK.js} +1 -1
  31. package/dist/client/assets/{User01-jJA28_tq.js → User01-d9Z_uT9d.js} +1 -1
  32. package/dist/client/assets/{UserSquare-QnfD_CaR.js → UserSquare-DRII3oW9.js} +1 -1
  33. package/dist/client/assets/{Users01-eyKYd8Cn.js → Users01-CNmS3Xkr.js} +1 -1
  34. package/dist/client/assets/{X-BuNT_jX4.js → X-Cul5rSgm.js} +1 -1
  35. package/dist/client/assets/{XAxis-C-LxgUvH.js → XAxis-Dkkejosu.js} +1 -1
  36. package/dist/client/assets/{XClose-4hmzGRgA.js → XClose-Cs8QbZ4B.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-CAM_UTRK.js → ZoomOut-D59vA8XW.js} +1 -1
  38. package/dist/client/assets/{access-gate-BiuCzoWU.js → access-gate-Cxb2F7oE.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-iTzdOqFh.js → add-connection-dialog-DplB0y07.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-D9aMLNVy.js → agent-analytics-BS1b9iO0.js} +1 -1
  41. package/dist/client/assets/agent-app-CeqjVahj.js +1 -0
  42. package/dist/client/assets/{agent-assets-DoSUflp2.js → agent-assets-vaZlOnFb.js} +1 -1
  43. package/dist/client/assets/{agent-automation-uQB8fdi5.js → agent-automation-DjX3m9HB.js} +1 -1
  44. package/dist/client/assets/{agent-automations-F0sOGxBj.js → agent-automations-Bs5h0eCg.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-DVTBcRKn.js → agent-connect-sources-CKd-sxH0.js} +1 -1
  46. package/dist/client/assets/agent-deck-DNb1Gyse.js +1 -0
  47. package/dist/client/assets/{agent-e2e-9hHGAsd3.js → agent-e2e-CJ8T7gRz.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-Cj0u6Uac.js → agent-experiments-B8CMED50.js} +1 -1
  49. package/dist/client/assets/{agent-file-B3GYfKsE.js → agent-file-BwjSnTWU.js} +1 -1
  50. package/dist/client/assets/{agent-git-B_xWAjW4.js → agent-git-C5yb5yRL.js} +1 -1
  51. package/dist/client/assets/{agent-hosting-VZ4aUX1j.js → agent-hosting-pLomroMj.js} +1 -1
  52. package/dist/client/assets/{agent-icon-CJvQ4Zav.js → agent-icon-CR4t5Gu3.js} +1 -1
  53. package/dist/client/assets/agent-library-BfIYcZpQ.js +1 -0
  54. package/dist/client/assets/agent-library-file-p5s_MaTP.js +1 -0
  55. package/dist/client/assets/{agent-monitor-C-O9rh5l.js → agent-monitor-CSJ_ZPtI.js} +1 -1
  56. package/dist/client/assets/{agent-overview-Cui2wX4M.js → agent-overview-Cm-7P1_4.js} +1 -1
  57. package/dist/client/assets/agent-settings-Jhu1Dols.js +1 -0
  58. package/dist/client/assets/{agent-site-editor-DWYBh7yq.js → agent-site-editor-C8Vp2mSD.js} +1 -1
  59. package/dist/client/assets/agent-site-editor-code-CuDYYt6-.js +2 -0
  60. package/dist/client/assets/{agent-site-editor-content-55H-EEp_.js → agent-site-editor-content-DU89Xm1v.js} +3 -3
  61. package/dist/client/assets/{agent-site-editor-preview-BaYUgL0o.js → agent-site-editor-preview-DIGidFF-.js} +3 -3
  62. package/dist/client/assets/agent-view-DvDhKdxG.js +1 -0
  63. package/dist/client/assets/{agent-view-guard-DeQKdcs0.js → agent-view-guard-DI59nzL2.js} +1 -1
  64. package/dist/client/assets/{agents-list-WTk3WoPq.js → agents-list-h2QLMpr7.js} +1 -1
  65. package/dist/client/assets/{ai-providers-Dfnb3l7z.js → ai-providers-Cuo2aX4J.js} +1 -1
  66. package/dist/client/assets/{alert-5BSEJ36W.js → alert-DrqXlaB2.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-BFv9kLvz.js → alert-dialog-SIUpU6uq.js} +1 -1
  68. package/dist/client/assets/{analytics-sections-CkfTQyP4.js → analytics-sections-BN5-cQxB.js} +1 -1
  69. package/dist/client/assets/{api-keys-BlUFkZIa.js → api-keys-9O3tzLbV.js} +1 -1
  70. package/dist/client/assets/api-keys-yPb18LqK.js +1 -0
  71. package/dist/client/assets/app-editor-DXvmafQO.js +1 -0
  72. package/dist/client/assets/{asset-utils-DOn8JWcy.js → asset-utils-DXGjR1jG.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-BG6U1S1e.js → auth-catchall-Bba1CJfl.js} +1 -1
  74. package/dist/client/assets/{auth-entry-CFuD3npw.js → auth-entry-Ch8TvE5s.js} +1 -1
  75. package/dist/client/assets/{auth-_XhpWlCD.js → auth-gmg7d_GH.js} +1 -1
  76. package/dist/client/assets/{auth-split-layout-NaLq5k6q.js → auth-split-layout-DTU8WroU.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-CRtno7NA.js → authenticate-and-persist-oauth-jhfDVcJv.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-BNT7qQVd.js → automation-list-row-BUEOdqlU.js} +1 -1
  79. package/dist/client/assets/{automation-runs-B-g9tmZQ.js → automation-runs-puDKBIgS.js} +1 -1
  80. package/dist/client/assets/{automations-DZWy3G0S.js → automations-QUisz5WY.js} +1 -1
  81. package/dist/client/assets/{autosend-C3AW9-Kc.js → autosend-pVPWEmgH.js} +1 -1
  82. package/dist/client/assets/{avatar-DFe8T8wv.js → avatar-BqlNIDCE.js} +1 -1
  83. package/dist/client/assets/{badge-HCDrWNgI.js → badge-DtU2WkJu.js} +1 -1
  84. package/dist/client/assets/{block-document-BjCJT_hj.js → block-document-C277Lv3R.js} +1 -1
  85. package/dist/client/assets/{blocks-preview-workspace-context-ygQViva-.js → blocks-preview-workspace-context-C3gS27DC.js} +1 -1
  86. package/dist/client/assets/{buckets-QfMGnFIM.js → buckets-i93if4PX.js} +1 -1
  87. package/dist/client/assets/{build-improve-prompt-doc-BmxeF3A8.js → build-improve-prompt-doc-DJwI2xSl.js} +1 -1
  88. package/dist/client/assets/{calendar-DfnovksK.js → calendar-FovdVD0Q.js} +1 -1
  89. package/dist/client/assets/{capability-load-error-BXP4fPem.js → capability-load-error-Ss9c_27I.js} +1 -1
  90. package/dist/client/assets/{category-editor-D0pwqTY2.js → category-editor-bw3NaN_p.js} +1 -1
  91. package/dist/client/assets/{chart-CgCcwj9R.js → chart-CgCPJzFe.js} +1 -1
  92. package/dist/client/assets/{chat-context-57WZg7Dj.js → chat-context-CXmGJCh6.js} +1 -1
  93. package/dist/client/assets/{chat-draft-BfNI0JT9.js → chat-draft-Cf6M_rqU.js} +1 -1
  94. package/dist/client/assets/{checkbox-DYTYP-sp.js → checkbox-TXsgr3EH.js} +1 -1
  95. package/dist/client/assets/{choose-editor-ConbAn_j.js → choose-editor-CthxYzyJ.js} +1 -1
  96. package/dist/client/assets/{claim-phase-copy-CxQ6pqyC.js → claim-phase-copy-ZnN8pI8I.js} +1 -1
  97. package/dist/client/assets/{cli-auth-success-BMJArkja.js → cli-auth-success-C_mfySiY.js} +1 -1
  98. package/dist/client/assets/{client-icons-B2e9fI9Z.js → client-icons-cFdIknOt.js} +1 -1
  99. package/dist/client/assets/{collapsible-DsWNr7eG.js → collapsible-DvCkKWwe.js} +1 -1
  100. package/dist/client/assets/{collection-detail-R8OxmdGe.js → collection-detail-CytBSKx7.js} +1 -1
  101. package/dist/client/assets/{collection-display-button-Djjcjybw.js → collection-display-button-D_YQnWY2.js} +1 -1
  102. package/dist/client/assets/{collection-search-HMFzfPbk.js → collection-search-CBqaYcDh.js} +1 -1
  103. package/dist/client/assets/{collection-table-wrapper-BHZQdR59.js → collection-table-wrapper-DdmsDfw6.js} +1 -1
  104. package/dist/client/assets/{collection-tabs-BAecEYSD.js → collection-tabs-CqkPnR43.js} +1 -1
  105. package/dist/client/assets/{column-rules-Dn8Oiij3.js → column-rules-DmIVY5oh.js} +1 -1
  106. package/dist/client/assets/{combobox-CoP6GrDz.js → combobox-CEvYMvN3.js} +1 -1
  107. package/dist/client/assets/{command-CYO6wqHE.js → command-BfeIom6N.js} +1 -1
  108. package/dist/client/assets/{companion-mcps-section-BQmDsmLP.js → companion-mcps-section-Ck8UUBzj.js} +1 -1
  109. package/dist/client/assets/{config-B-T5G-Sm.js → config-2E3xR2_y.js} +1 -1
  110. package/dist/client/assets/{connect-C6mMzkpn.js → connect-BAMAJEoE.js} +1 -1
  111. package/dist/client/assets/{connect-layout-Bcsicf_i.js → connect-layout-h3BrSWqp.js} +1 -1
  112. package/dist/client/assets/{connection-XKeDufat.js → connection-VweOjV2O.js} +1 -1
  113. package/dist/client/assets/{connection-card-CyPdimh-.js → connection-card-64g-eY4r.js} +1 -1
  114. package/dist/client/assets/{connection-detail-BuBsAR66.js → connection-detail-CfoyWU2W.js} +1 -1
  115. package/dist/client/assets/{connection-form-helpers-D5a67gIJ.js → connection-form-helpers-Dyv9IKEP.js} +1 -1
  116. package/dist/client/assets/{connections-DaLdX42y.js → connections-2-CXQYIi.js} +1 -1
  117. package/dist/client/assets/{context-CKropqbM.js → context-DWFfHXBw.js} +1 -1
  118. package/dist/client/assets/{context-menu-B8KQvqPz.js → context-menu-De4tqQQE.js} +1 -1
  119. package/dist/client/assets/{create-organization-dialog-CC3bfG-a.js → create-organization-dialog-B1RRLsDf.js} +1 -1
  120. package/dist/client/assets/{daily-pulse--izT7vL3.js → daily-pulse-CCBkb-iX.js} +1 -1
  121. package/dist/client/assets/{decopilot-C0YgIJ6X.js → decopilot-lSZL3pEK.js} +1 -1
  122. package/dist/client/assets/{device-hint-BInEqiyb.js → device-hint-CYJEDP6x.js} +1 -1
  123. package/dist/client/assets/{dialog-DJN6MVgM.js → dialog-BSl2AX4W.js} +1 -1
  124. package/dist/client/assets/{discover-C9MDCBi0.js → discover-XwZddFEz.js} +1 -1
  125. package/dist/client/assets/{domain-settings-DE44PRLU.js → domain-settings-DUDo0z8q.js} +1 -1
  126. package/dist/client/assets/{download-app-dialog-CCGZxufS.js → download-app-dialog-C2P7W8iK.js} +1 -1
  127. package/dist/client/assets/{drawer-BltlXHm_.js → drawer-DqBseAyM.js} +1 -1
  128. package/dist/client/assets/{editor-CVrodmvC.js → editor-BRstAcuG.js} +1 -1
  129. package/dist/client/assets/{empty-state-d5T0jvmw.js → empty-state-B_1GXkEg.js} +1 -1
  130. package/dist/client/assets/{empty-state-CMomFSLr.js → empty-state-CZ4GlZ32.js} +1 -1
  131. package/dist/client/assets/{extract-connection-data-oeQMV1x5.js → extract-connection-data-Dv6mCSuT.js} +1 -1
  132. package/dist/client/assets/{feature-gate-txxC8V7V.js → feature-gate-Kap3Vwes.js} +1 -1
  133. package/dist/client/assets/{feature-paywall-CCAdf3Sa.js → feature-paywall-BMjJberI.js} +1 -1
  134. package/dist/client/assets/{file-explorer-DvHTYZ00.js → file-explorer-sxnHpGtO.js} +1 -1
  135. package/dist/client/assets/{file-preview-CrbKDhEs.js → file-preview-qKX0Hj06.js} +1 -1
  136. package/dist/client/assets/{file-share-button-wrCnaVy5.js → file-share-button-DsEdF9_e.js} +1 -1
  137. package/dist/client/assets/{file-type-icon-bXE_k5sz.js → file-type-icon-q3jT_2Y8.js} +1 -1
  138. package/dist/client/assets/flat-project-DaiL6_Yc.js +1 -0
  139. package/dist/client/assets/{folder-icon-cKcXEBJn.js → folder-icon-VggWvkeC.js} +1 -1
  140. package/dist/client/assets/{form-BjXXuh2_.js → form-CbtSzwk4.js} +1 -1
  141. package/dist/client/assets/{gateway-client-BaqReu6H.js → gateway-client-CswynSYR.js} +1 -1
  142. package/dist/client/assets/{general-P324czHx.js → general-D16HtoNP.js} +1 -1
  143. package/dist/client/assets/{home-DQqHEr_I.js → home-C1DBRJdH.js} +1 -1
  144. package/dist/client/assets/{icon-button-DSeFHn8f.js → icon-button-D7NextCX.js} +1 -1
  145. package/dist/client/assets/{index-YUcuY-u2.js → index-6HS_Fth-.js} +1 -1
  146. package/dist/client/assets/{index-D2XyhTnn.js → index-B-ajDQ7x.js} +3 -3
  147. package/dist/client/assets/{index-kJRaT2AO.js → index-B05BvO6S.js} +1 -1
  148. package/dist/client/assets/{index-BKE4AJl4.js → index-BPJC_Lsm.js} +1 -1
  149. package/dist/client/assets/{index-DGnFk0_c.js → index-C7eGj3Yr.js} +1 -1
  150. package/dist/client/assets/{index-CdxHQZta.js → index-D2dTzz5J.js} +2 -2
  151. package/dist/client/assets/{index-eQ3HZ0eK.js → index-DBRaqXh3.js} +1 -1
  152. package/dist/client/assets/{index-8LgexCXT.js → index-DJmJwzWv.js} +1 -1
  153. package/dist/client/assets/{index-D5aMdsbk.js → index-DYekkvsC.js} +1 -1
  154. package/dist/client/assets/{index-BtUSf8NF.js → index-DnL0WJSy.js} +1 -1
  155. package/dist/client/assets/{index-CnKrz3BN.js → index-Dyu-dh6U.js} +1 -1
  156. package/dist/client/assets/{index-SCvLZwwK.js → index-I7SWL7Bn.js} +1 -1
  157. package/dist/client/assets/{index-CvxuRZwT.js → index-Q0xGMFy6.js} +1 -1
  158. package/dist/client/assets/{index-BzngvahP.js → index-k3WFemWm.js} +1 -1
  159. package/dist/client/assets/{index-redirect-D1pX-yVM.js → index-redirect-BIG2i9sg.js} +1 -1
  160. package/dist/client/assets/{index-M9qIKTGe.js → index-xXBxH1Ml.js} +1 -1
  161. package/dist/client/assets/{infiniteQueryObserver-CDMBojy0.js → infiniteQueryObserver-d9AVE-54.js} +1 -1
  162. package/dist/client/assets/{infra-billing-BdY0GEto.js → infra-billing-DeQI7Gu0.js} +1 -1
  163. package/dist/client/assets/{input-BKVvaN4k.js → input-BPxTfIlR.js} +3 -3
  164. package/dist/client/assets/{input-DYp-O8Zf.js → input-CcOKxxNa.js} +1 -1
  165. package/dist/client/assets/{input-CEyC_PjH.js → input-QVDvJxJt.js} +1 -1
  166. package/dist/client/assets/{integration-icon-CW837guT.js → integration-icon-LuLuvYpS.js} +1 -1
  167. package/dist/client/assets/{label-CyxA9Tlc.js → label-Vx4RXl56.js} +1 -1
  168. package/dist/client/assets/{layout-88zBftER.js → layout-DsjTg2tO.js} +1 -1
  169. package/dist/client/assets/{legacy-agents-deep-CH-IrvKb.js → legacy-agents-deep-0qlgcFpR.js} +1 -1
  170. package/dist/client/assets/{legacy-main-redirect-BdCKFNea.js → legacy-main-redirect-DJSSnCFn.js} +1 -1
  171. package/dist/client/assets/library-BT8MDbGE.js +1 -0
  172. package/dist/client/assets/{library-tab-Bce9HVRy.js → library-tab-D9vHUslE.js} +1 -1
  173. package/dist/client/assets/{login-FL-FWaUd.js → login-CXb7XfpW.js} +1 -1
  174. package/dist/client/assets/{markdown-npeX6Dvn.js → markdown-CbS8bzQj.js} +1 -1
  175. package/dist/client/assets/{mcp-app-renderer-BEYyNxBF.js → mcp-app-renderer-BtTj1I1A.js} +1 -1
  176. package/dist/client/assets/{mcp-oauth-DNfjV_-l.js → mcp-oauth-ClbbuLRW.js} +1 -1
  177. package/dist/client/assets/{members-BrVLMdZe.js → members-CDgN8Dmx.js} +1 -1
  178. package/dist/client/assets/{memory-Cu-GI3KY.js → memory-z1AwNIL_.js} +1 -1
  179. package/dist/client/assets/{message-templates-C9Ae73D3.js → message-templates-BEgMVTC5.js} +1 -1
  180. package/dist/client/assets/{mini-report-page-CTSRrcPg.js → mini-report-page-BD35Q2tB.js} +1 -1
  181. package/dist/client/assets/{mock-board-DVx1bLDB.js → mock-board-n9VluIvN.js} +1 -1
  182. package/dist/client/assets/{monaco-editor-DTjt4Gvf.js → monaco-editor-CWEy2Wmz.js} +1 -1
  183. package/dist/client/assets/{monitoring-stats-row-IPvge-Ql.js → monitoring-stats-row-CgOhkmn3.js} +1 -1
  184. package/dist/client/assets/{multi-select-C0pIDv4l.js → multi-select-C7Irc4wP.js} +1 -1
  185. package/dist/client/assets/{mustache-B86FuZTo.js → mustache-CEPRFGIa.js} +1 -1
  186. package/dist/client/assets/{new-project-dialog-Cf4og9hp.js → new-project-dialog-Bmu4ROdM.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-DsxCT0Rg.js → oauth-callback-8Vm2F8OH.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-B0Qj3jqd.js → oauth-callback-ai-provider-CzLoL-4K.js} +1 -1
  189. package/dist/client/assets/{onboarding-CaL1NynW.js → onboarding-Cs5e4xpz.js} +1 -1
  190. package/dist/client/assets/{openai-conversation-8bTGXza9.js → openai-conversation-DTYW8Nmt.js} +1 -1
  191. package/dist/client/assets/{optimistic-project-sidebar-views-CdcnoHMx.js → optimistic-project-sidebar-views-BUiqS2uK.js} +1 -1
  192. package/dist/client/assets/{org-file-open-context-CbfDthkV.js → org-file-open-context-Crp_VOcp.js} +1 -1
  193. package/dist/client/assets/{organization-choice-Bpd56bKF.js → organization-choice-CVTsLYoj.js} +1 -1
  194. package/dist/client/assets/{orgs-CaUdOCVi.js → orgs-CMBD-Ecp.js} +1 -1
  195. package/dist/client/assets/{page-seo-form-BFvo8crB.js → page-seo-form-DZ-tFdem.js} +1 -1
  196. package/dist/client/assets/{pair-qTA6WdF2.js → pair-C5MP6tmI.js} +1 -1
  197. package/dist/client/assets/{plan-ladder-B5Jixr7W.js → plan-ladder-BS_j29A8.js} +1 -1
  198. package/dist/client/assets/{popover-BzkBJGwj.js → popover-DiGkaZQG.js} +1 -1
  199. package/dist/client/assets/{post-calendar-BHQVcnMM.js → post-calendar-Bh1a7pzf.js} +1 -1
  200. package/dist/client/assets/{post-editor-C3uCwQ-d.js → post-editor-BK7Sv69A.js} +1 -1
  201. package/dist/client/assets/{preview-content-bTvDgjfl.js → preview-content-D26Qem-Y.js} +1 -1
  202. package/dist/client/assets/{preview-dialog-CLFTRCuY.js → preview-dialog-BF1ke6DE.js} +1 -1
  203. package/dist/client/assets/{profile-Dw0WQchl.js → profile-CNd7A2Gx.js} +1 -1
  204. package/dist/client/assets/{project-app-view-CfVgbcC9.js → project-app-view-CVyo8em-.js} +1 -1
  205. package/dist/client/assets/{project-feed-D1BIbHU5.js → project-feed-RRFZCFHK.js} +1 -1
  206. package/dist/client/assets/{project-icon-CFM_cw8o.js → project-icon-CXi3E4T2.js} +1 -1
  207. package/dist/client/assets/project-reports-C3bvGgip.js +1 -0
  208. package/dist/client/assets/project-tasks-DQ-t9ZQ0.js +1 -0
  209. package/dist/client/assets/{projects-DGayh67M.js → projects-DhDrpc2w.js} +1 -1
  210. package/dist/client/assets/{projects-empty-state-DjN6gjQD.js → projects-empty-state-uTdhn7up.js} +1 -1
  211. package/dist/client/assets/{prompts-BnFQvE8i.js → prompts-DbghR4VL.js} +1 -1
  212. package/dist/client/assets/record-editor-fQo5Y3o_.js +1 -0
  213. package/dist/client/assets/{redirect-editor-Du01ASpa.js → redirect-editor-Cyu7m0VD.js} +1 -1
  214. package/dist/client/assets/{reports-DC_p6jvC.js → reports-BilzDLyr.js} +1 -1
  215. package/dist/client/assets/reports-DGyFA0YC.js +1 -0
  216. package/dist/client/assets/{reports-onboarding-C3KYMwju.js → reports-onboarding-x2N1hyxW.js} +1 -1
  217. package/dist/client/assets/{reports-tab-Ctc7ePZA.js → reports-tab-Y4dGdrCw.js} +2 -2
  218. package/dist/client/assets/{repositories-CbVwqqBr.js → repositories-Byiu79Lf.js} +1 -1
  219. package/dist/client/assets/{repository-binding-JChFqkvS.js → repository-binding-rygwFtUU.js} +1 -1
  220. package/dist/client/assets/{repository-import-picker-NG5IIZpH.js → repository-import-picker-CMch2yXk.js} +1 -1
  221. package/dist/client/assets/{repository-picker-DZKt8b9q.js → repository-picker-DmMyT9uL.js} +1 -1
  222. package/dist/client/assets/{require-capability-jw-5LosR.js → require-capability-BOLN4wlq.js} +1 -1
  223. package/dist/client/assets/{required-auth-layout-DNnKhVnU.js → required-auth-layout-BaGMTRsq.js} +1 -1
  224. package/dist/client/assets/{reset-password-ZXs-mNLl.js → reset-password-VpKsYnOO.js} +1 -1
  225. package/dist/client/assets/{resizable-DxIrekeJ.js → resizable-B8UplbG9.js} +1 -1
  226. package/dist/client/assets/{resolve-tab-icon-BVcp3jJe.js → resolve-tab-icon-BBNKRvUX.js} +1 -1
  227. package/dist/client/assets/{review-settings-BBodJBzm.js → review-settings-Bg3gl59w.js} +1 -1
  228. package/dist/client/assets/{rich-text-link-control-CXkIRZhg.js → rich-text-link-control-Dtfq7e19.js} +1 -1
  229. package/dist/client/assets/{roles-zeY4MMAw.js → roles-DUiIBEus.js} +1 -1
  230. package/dist/client/assets/{route-B0c_8Y-t.js → route-BT7O0_Ir.js} +1 -1
  231. package/dist/client/assets/{route-BuqKjWBF.js → route-DBoucnX-.js} +1 -1
  232. package/dist/client/assets/route-P9yHnvom.js +1 -0
  233. package/dist/client/assets/{runnable-block-editor-CtVc7nrS.js → runnable-block-editor-BoFLRoxE.js} +1 -1
  234. package/dist/client/assets/{sandbox-lifecycle-context-COX6jko8.js → sandbox-lifecycle-context-CwQvVUN0.js} +1 -1
  235. package/dist/client/assets/{schema-C5rDsgZa.js → schema-D38GSwTR.js} +1 -1
  236. package/dist/client/assets/{scroll-area-CD247Puy.js → scroll-area-CMu3xzBy.js} +1 -1
  237. package/dist/client/assets/{search-input-B0oqfDX0.js → search-input-nZG5K7zX.js} +1 -1
  238. package/dist/client/assets/{search-toggle-CUD4gUyI.js → search-toggle-C5lsyKed.js} +1 -1
  239. package/dist/client/assets/{secret-picker-CI5SFXlz.js → secret-picker-DcIMyJMq.js} +1 -1
  240. package/dist/client/assets/{secrets-DMHBZ5b-.js → secrets-k9ofAEIC.js} +1 -1
  241. package/dist/client/assets/{sections-editor-DX78q9L5.js → sections-editor-ClENwd-n.js} +1 -1
  242. package/dist/client/assets/{select-BgBtUQbR.js → select-DNyFjSYg.js} +1 -1
  243. package/dist/client/assets/{select-model-BuabH7uX.js → select-model-Ob1Ytd6l.js} +1 -1
  244. package/dist/client/assets/{seo-editor-Bi2Y_Hq4.js → seo-editor-M7JSsuZE.js} +1 -1
  245. package/dist/client/assets/{separator-CfAX-CZE.js → separator-BFCJgJ_0.js} +1 -1
  246. package/dist/client/assets/{settings-tab-LAvWxx2s.js → settings-tab-CIXZsK00.js} +1 -1
  247. package/dist/client/assets/{sheet-D6pV4Eay.js → sheet-DYd28Fb7.js} +1 -1
  248. package/dist/client/assets/{shell-layout-DZwsj6tm.js → shell-layout-Dix32M24.js} +1 -1
  249. package/dist/client/assets/{skills-Bu1-kQnU.js → skills-DlWHM8Lq.js} +1 -1
  250. package/dist/client/assets/{sso-D2qJfsnQ.js → sso-CND-Sq4S.js} +1 -1
  251. package/dist/client/assets/{suggestion-CxAnGtnm.js → suggestion-CPJmHCe_.js} +1 -1
  252. package/dist/client/assets/{switch-F41L6dpN.js → switch-ZiO5P7k4.js} +1 -1
  253. package/dist/client/assets/{synced-repos-BPSH3MWj.js → synced-repos-BCPBok84.js} +1 -1
  254. package/dist/client/assets/{tab-icon-glyph-DzWhA8K9.js → tab-icon-glyph-DLiZkLIB.js} +1 -1
  255. package/dist/client/assets/{table-9HMGEyIJ.js → table-e3ZyDjwe.js} +1 -1
  256. package/dist/client/assets/{tabs-28356LbY.js → tabs-D81IF5HZ.js} +1 -1
  257. package/dist/client/assets/{task-board-Bwhtxe11.js → task-board-CWJgeu7Z.js} +1 -1
  258. package/dist/client/assets/{task-route-CQZICp4O.js → task-route-Bv6rVEq1.js} +1 -1
  259. package/dist/client/assets/{task-status-BKUG0suF.js → task-status-q2zy99n1.js} +1 -1
  260. package/dist/client/assets/{taskboard-analytics-Cijn2VAb.js → taskboard-analytics-BJyL2NNQ.js} +1 -1
  261. package/dist/client/assets/{tasks-SVHYdAQ9.js → tasks-CCkNOU1r.js} +1 -1
  262. package/dist/client/assets/tasks-DfgJkdfJ.js +1 -0
  263. package/dist/client/assets/{textarea-BgjIoA0a.js → textarea-PVngK0Di.js} +1 -1
  264. package/dist/client/assets/{thread-analytics-CJAwkwEl.js → thread-analytics-B1EKfHoB.js} +1 -1
  265. package/dist/client/assets/{thread-button-BFNgAW02.js → thread-button-jRtWzslL.js} +1 -1
  266. package/dist/client/assets/{thread-intent-CfYVTTpH.js → thread-intent-DkMl3Clw.js} +1 -1
  267. package/dist/client/assets/{thread-route-w0ePUXK3.js → thread-route-BRzPZsPr.js} +1 -1
  268. package/dist/client/assets/{thread-route-CSYBLpD5.js → thread-route-C9fk2CbW.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-BzJujnLG.js → thread-sheet-body-Ceh-gQcv.js} +1 -1
  270. package/dist/client/assets/{toggle-group-f3cK2guz.js → toggle-group-Dc2uUHWD.js} +1 -1
  271. package/dist/client/assets/{toolbar-icon-button-VgyXKzQb.js → toolbar-icon-button-BVZ6tXmv.js} +1 -1
  272. package/dist/client/assets/{tooltip-DRbwF15X.js → tooltip-jK__fCo4.js} +1 -1
  273. package/dist/client/assets/{track-CpccMuBV.js → track-CbkWmrSD.js} +1 -1
  274. package/dist/client/assets/{types-xvRKIUh5.js → types-D3Y6TAqK.js} +1 -1
  275. package/dist/client/assets/{usage-stats-4-mJM_Ny.js → usage-stats-C7VDzGYl.js} +1 -1
  276. package/dist/client/assets/{use-ai-providers-C6jAJjpy.js → use-ai-providers-DfehKmIZ.js} +1 -1
  277. package/dist/client/assets/{use-automations-DW9RBnQP.js → use-automations-Dhxqirb4.js} +1 -1
  278. package/dist/client/assets/{use-autosave-CXmVaIbs.js → use-autosave-OyP0ttSE.js} +1 -1
  279. package/dist/client/assets/{use-chat-layout-state-YLz0zkkr.js → use-chat-layout-state-CqvKxYcd.js} +1 -1
  280. package/dist/client/assets/{use-clock-tick-wePDDvbf.js → use-clock-tick-bRYO-Rnq.js} +1 -1
  281. package/dist/client/assets/{use-connect-companion-CHb1DnmY.js → use-connect-companion-BWZLgFxk.js} +1 -1
  282. package/dist/client/assets/{use-connection-DPn99Ne3.js → use-connection-CNR2pmSM.js} +1 -1
  283. package/dist/client/assets/{use-copy-BQq90EWC.js → use-copy-DTgTF3rB.js} +1 -1
  284. package/dist/client/assets/{use-create-virtual-mcp-CMvC1FaJ.js → use-create-virtual-mcp-DE06yanc.js} +1 -1
  285. package/dist/client/assets/{use-date-fns-locale-Dw9npfv_.js → use-date-fns-locale-XYU3tVXv.js} +1 -1
  286. package/dist/client/assets/{use-debounced-autosave-Bp7ZbYT_.js → use-debounced-autosave-BZFchJN4.js} +1 -1
  287. package/dist/client/assets/{use-debounced-value-ABLDNwmN.js → use-debounced-value-CVxm5Do1.js} +1 -1
  288. package/dist/client/assets/{use-deco-credits-B7tO3-nF.js → use-deco-credits-DiEJ9aQR.js} +1 -1
  289. package/dist/client/assets/{use-decopilot-events-12vOrgcO.js → use-decopilot-events-0kg2dbb1.js} +1 -1
  290. package/dist/client/assets/{use-delete-connection-Qy8Crcvm.js → use-delete-connection-DkMNwEdI.js} +1 -1
  291. package/dist/client/assets/{use-deployment-admin-CeqkmFsj.js → use-deployment-admin-ywArJLll.js} +1 -1
  292. package/dist/client/assets/{use-fast-preview-draft-url-DzyQ0ge6.js → use-fast-preview-draft-url-qZiFROwq.js} +1 -1
  293. package/dist/client/assets/{use-file-configs-DOgSoqwq.js → use-file-configs-C194rQrE.js} +1 -1
  294. package/dist/client/assets/{use-infinite-scroll-BwyMk9UX.js → use-infinite-scroll-fz45Cy3c.js} +1 -1
  295. package/dist/client/assets/{use-join-requests-rPLnsPn6.js → use-join-requests-CroNt5uC.js} +1 -1
  296. package/dist/client/assets/{use-main-panel-tabs-D42qBZW9.js → use-main-panel-tabs-Crf-H9Ck.js} +1 -1
  297. package/dist/client/assets/{use-mcp-auth-status-BgZ-LE-_.js → use-mcp-auth-status-8ysc0TdM.js} +1 -1
  298. package/dist/client/assets/{use-mcp-client-CmW-CbmL.js → use-mcp-client-BGBcJfvU.js} +1 -1
  299. package/dist/client/assets/{use-mcp-prompts-DmPn5bN4.js → use-mcp-prompts-Bl7YpvT7.js} +1 -1
  300. package/dist/client/assets/{use-mcp-tools-JEz2u8-E.js → use-mcp-tools-fghoMnAo.js} +1 -1
  301. package/dist/client/assets/{use-members-zd75VUjT.js → use-members-BFzPg9DY.js} +1 -1
  302. package/dist/client/assets/{use-mobile-CdJjslx1.js → use-mobile-aquWF07B.js} +1 -1
  303. package/dist/client/assets/{use-navigate-to-agent-BoqkOdWC.js → use-navigate-to-agent-nkJg8O6N.js} +1 -1
  304. package/dist/client/assets/use-new-blocks-editor-D7CDsp29.js +1 -0
  305. package/dist/client/assets/{use-open-billing-url-B2MlLvJS.js → use-open-billing-url-CfSIGf8I.js} +1 -1
  306. package/dist/client/assets/{use-org-auth-client-DJFH34Mt.js → use-org-auth-client-BS1yNddv.js} +1 -1
  307. package/dist/client/assets/{use-org-fs-39Wz8rpU.js → use-org-fs-Xkb3iQn6.js} +1 -1
  308. package/dist/client/assets/{use-org-repo-syncs-Be91hjO3.js → use-org-repo-syncs-BuNTUtHD.js} +1 -1
  309. package/dist/client/assets/{use-org-sso-C-JMGiGS.js → use-org-sso-AI0KysNs.js} +1 -1
  310. package/dist/client/assets/{use-organization-roles-BKbuiSkF.js → use-organization-roles-D5TQuPKT.js} +1 -1
  311. package/dist/client/assets/{use-organization-settings-PXdLuNB9.js → use-organization-settings-BjL-KIcf.js} +1 -1
  312. package/dist/client/assets/{use-panel-navigate-D8_cxPJw.js → use-panel-navigate-vUjkTeRK.js} +1 -1
  313. package/dist/client/assets/{use-project-scope-Cv9ae9Ib.js → use-project-scope-EPuSPnhc.js} +1 -1
  314. package/dist/client/assets/{use-releases-C4vordN8.js → use-releases-CdRENGAZ.js} +1 -1
  315. package/dist/client/assets/{use-reports-diagnostic-B0fQh9dS.js → use-reports-diagnostic-DTL4fmvJ.js} +1 -1
  316. package/dist/client/assets/{use-secrets-Dh7U4HYj.js → use-secrets-CFvn68u4.js} +1 -1
  317. package/dist/client/assets/{use-section-preview-base-CR8mR1xB.js → use-section-preview-base-CjzKsAiD.js} +1 -1
  318. package/dist/client/assets/{use-session-runtime-D08Kep-m.js → use-session-runtime-CjMZc55F.js} +1 -1
  319. package/dist/client/assets/{use-tags-Dx_EaUo4.js → use-tags-nAtiuLhp.js} +1 -1
  320. package/dist/client/assets/{use-task-board-analytics-DfLR40s2.js → use-task-board-analytics-DGRYiUDJ.js} +1 -1
  321. package/dist/client/assets/{use-task-board-events-LvNi14dX.js → use-task-board-events-DYNk8AbJ.js} +1 -1
  322. package/dist/client/assets/{use-task-metadata-BEkBKOHv.js → use-task-metadata-SNGtaGxh.js} +1 -1
  323. package/dist/client/assets/{use-thread-analytics-CMsFZWvm.js → use-thread-analytics-BWj-iEGz.js} +1 -1
  324. package/dist/client/assets/{use-thread-outputs-BESubVM6.js → use-thread-outputs-BmJ_6OMW.js} +1 -1
  325. package/dist/client/assets/useInfiniteQuery-YfMLN54l.js +1 -0
  326. package/dist/client/assets/{useQueries-BVMdi_8j.js → useQueries-BP6syEbP.js} +1 -1
  327. package/dist/client/assets/useSuspenseInfiniteQuery-D12YW3Fz.js +1 -0
  328. package/dist/client/assets/{users-B5m9h87F.js → users-DNA_PGfC.js} +1 -1
  329. package/dist/client/assets/{utils-COR5sFjS.js → utils-BfD_oePk.js} +1 -1
  330. package/dist/client/assets/{variant-calendar-BsdnBVEZ.js → variant-calendar-DVUzd2f4.js} +1 -1
  331. package/dist/client/assets/{variant-matcher-override-b_ipBYkQ.js → variant-matcher-override-2G_9KQMP.js} +1 -1
  332. package/dist/client/assets/{view-mode-toggle-CQXn8Fs1.js → view-mode-toggle-ChV__WZh.js} +1 -1
  333. package/dist/client/assets/{virtual-mcp-LWC4V-2f.js → virtual-mcp-Dlg1yt61.js} +1 -1
  334. package/dist/client/index.html +1 -1
  335. package/dist/server/cli.js +2 -2
  336. package/dist/server/server.js +2 -2
  337. package/package.json +1 -1
  338. package/dist/client/assets/agent-app-Dyz8djHw.js +0 -1
  339. package/dist/client/assets/agent-deck-C5gRcDS2.js +0 -1
  340. package/dist/client/assets/agent-library-BhP6I_uS.js +0 -1
  341. package/dist/client/assets/agent-library-file-7ZIb4WIP.js +0 -1
  342. package/dist/client/assets/agent-settings-B5agphmp.js +0 -1
  343. package/dist/client/assets/agent-site-editor-code-BgLLWnwl.js +0 -2
  344. package/dist/client/assets/agent-view-B0bKIQvA.js +0 -1
  345. package/dist/client/assets/api-keys-CeG0QqxF.js +0 -1
  346. package/dist/client/assets/app-editor-R-Fk_pH9.js +0 -1
  347. package/dist/client/assets/flat-project-DRIXZZ_f.js +0 -1
  348. package/dist/client/assets/library-Cx7QZ5Pb.js +0 -1
  349. package/dist/client/assets/project-reports-G2lJWAZT.js +0 -1
  350. package/dist/client/assets/project-tasks-D4cxeI9B.js +0 -1
  351. package/dist/client/assets/record-editor-C9YZwrKG.js +0 -1
  352. package/dist/client/assets/reports-HUnDHvKz.js +0 -1
  353. package/dist/client/assets/route-CyP5dpSv.js +0 -1
  354. package/dist/client/assets/tasks-BdpOoIPv.js +0 -1
  355. package/dist/client/assets/use-new-blocks-editor-DAABxnGt.js +0 -1
  356. package/dist/client/assets/useInfiniteQuery-BlfFwct6.js +0 -1
  357. package/dist/client/assets/useSuspenseInfiniteQuery-C1pF6UJx.js +0 -1
@@ -0,0 +1 @@
1
+ import{c,l as d,j as i,n as f,P as l,ax as x,O as u}from"./index-D2dTzz5J.js";import{u as j}from"./use-mobile-aquWF07B.js";import{R as h}from"./index-C7eGj3Yr.js";import"./thread-button-jRtWzslL.js";import"./agent-icon-CR4t5Gu3.js";import"./AlertCircle-DXLs2YfX.js";import"./Tool01-D4pGeBop.js";import"./ArrowUp-DQxu9lq3.js";import"./ArrowLeft--pkS1YcK.js";import"./LinkBroken01-DHksKx7R.js";import"./ShoppingBag01-Dfpwkcdn.js";import"./ZoomOut-D59vA8XW.js";import"./Building02-CKLKiQ3U.js";import"./CheckCircle-BDzQ_ECv.js";import"./Check-BbEloZu1.js";import"./ChevronUp-D3ChNhrQ.js";import"./UserSquare-DRII3oW9.js";import"./Copy01-a63gH2RE.js";import"./CreditCard01-BS5sPNh6.js";import"./DotsVertical-vt_3gkoG.js";import"./Image01-BR5I_9pG.js";import"./Palette-D-JYBilo.js";import"./XClose-Cs8QbZ4B.js";import"./Key01-C0k-gtwc.js";import"./Link01-DM36157y.js";import"./LinkExternal01-DZNYicBT.js";import"./Monitor01-BQxvNkHa.js";import"./Sun-DxmQEZP4.js";import"./Plus-kevaXo9o.js";import"./SearchMd-CKY0v7Vy.js";import"./Trash01-DFbco4Cc.js";import"./Upload01-BZbq-HqK.js";import"./User01-d9Z_uT9d.js";import"./Users01-CNmS3Xkr.js";import"./X-Cul5rSgm.js";import"./use-chat-layout-state-CqvKxYcd.js";import"./use-file-configs-C194rQrE.js";import"./use-organization-settings-BjL-KIcf.js";import"./schema-D38GSwTR.js";import"./task-board-CWJgeu7Z.js";import"./site-slug-DebpOoQq.js";import"./thread-route-C9fk2CbW.js";import"./use-panel-navigate-vUjkTeRK.js";import"./use-project-scope-EPuSPnhc.js";import"./repository-binding-rygwFtUU.js";import"./use-mcp-client-BGBcJfvU.js";import"./auth-gmg7d_GH.js";import"./thread-intent-DkMl3Clw.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./sheet-DYd28Fb7.js";import"./tooltip-jK__fCo4.js";import"./index-BPJC_Lsm.js";import"./toolbar-icon-button-BVZ6tXmv.js";import"./shell-layout-Dix32M24.js";import"./avatar-BqlNIDCE.js";import"./download-app-dialog-C2P7W8iK.js";import"./dialog-BSl2AX4W.js";import"./use-clock-tick-bRYO-Rnq.js";import"./command-BfeIom6N.js";import"./index-6HS_Fth-.js";import"./integration-icon-LuLuvYpS.js";import"./project-icon-CXi3E4T2.js";import"./new-project-dialog-Bmu4ROdM.js";import"./input-CcOKxxNa.js";import"./label-Vx4RXl56.js";import"./repository-import-picker-CMch2yXk.js";import"./use-navigate-to-agent-nkJg8O6N.js";import"./repository-picker-DmMyT9uL.js";import"./useInfiniteQuery-YfMLN54l.js";import"./infiniteQueryObserver-d9AVE-54.js";import"./collection-search-CBqaYcDh.js";import"./use-debounced-value-CVxm5Do1.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-BaGMTRsq.js";import"./autosend-pVPWEmgH.js";import"./use-org-sso-AI0KysNs.js";import"./resizable-B8UplbG9.js";import"./icon-button-D7NextCX.js";function Jt(){const t=c.c(9),n=j(),s=!n&&"p-1.5";let r;t[0]!==s?(r=d("flex-1 min-h-0",s),t[0]=s,t[1]=r):r=t[1];const a=n?"plain":"card";let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(h,{}),t[2]=m):m=t[2];let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsxs(f.Breadcrumbs.Provider,{children:[m,i.jsx(l.Content,{children:i.jsx(x,{children:i.jsx(u,{})})})]}),t[3]=p):p=t[3];let o;t[4]!==a?(o=i.jsx(l,{"data-testid":"settings-panel",variant:a,children:p}),t[4]=a,t[5]=o):o=t[5];let e;return t[6]!==r||t[7]!==o?(e=i.jsx("div",{className:r,children:o}),t[6]=r,t[7]=o,t[8]=e):e=t[8],e}export{Jt as default};
@@ -1,4 +1,4 @@
1
- import{aO as m1,c as B,o as Tn,m as U0,K as Q9,b as f9,j as s,l as U,B as h9,Z as Cn,aJ as p1,e as En,r as I,t as T9,aP as h1,aQ as J9,n as x1,ag as wn,F as X0,ak as ee,G as N9,H as G9,I as H9,aR as te,al as Te,aN as g1,h as m0,aS as y1,E as v1,aT as b1,au as j1,av as S1}from"./index-CdxHQZta.js";import{u as De}from"./use-session-runtime-D08Kep-m.js";import{u as $e,O as N1,c as I9,P as U9,Q as K0,T as Ce,N as ze,U as j9,C as k1,z as T1,A as C1,B as E1,y as w1,q as _1,V as _n,t as An,W as A1,X as At,Y as R1,Z as P1,r as D9,_ as Rn,$ as Be,a0 as M1,a1 as I1,a2 as v0,a3 as F1,a4 as O1,a5 as Pn,g as D1,a6 as Ve,o as $1,a7 as z1,a8 as B1,v as V1,a9 as U1,aa as K1,ab as Ee,ac as G1,ad as O0,ae as H1,af as q1,ag as Y1,ah as W1,ai as J1,aj as Z1,ak as Rt,al as Q1,am as X1,an as er,ao as tr}from"./claim-phase-copy-CxQ6pqyC.js";import{e as Mn}from"./backoff-8mStPHYB.js";import{ab as nr,ac as sr,ad as rr,ae as ir,af as or,ag as lr,ah as ar,ai as cr,$ as Lr,aj as In,ak as ne,z as dr,al as Fn,a6 as N0,Z as ur,y as fr,b as o0,am as mr,an as Pt,ao as pr,aa as hr,H as xr,ap as gr,aq as yr}from"./agent-icon-CJvQ4Zav.js";import{i as On}from"./Sun-FPWNj6PU.js";import{S as Mt}from"./sandbox-start-errors-BK_aDCyt.js";import{G as vr}from"./pair-qTA6WdF2.js";import{i as q9}from"./Check-DdiNmh3G.js";import{i as Ue,d as br,e as jr,b as Sr,c as Nr}from"./Tool01-BLZm9DPk.js";import{C as se,a as re,b as K9,e as c0,c as ie,f as Ke,d as kr}from"./command-CYO6wqHE.js";import{a as E0,b as w0,P as _0}from"./popover-BzkBJGwj.js";import{s as Tr,a as Cr,b as Er}from"./utils-COR5sFjS.js";import{u as Dn}from"./chat-context-57WZg7Dj.js";import{n as $n}from"./LinkExternal01-DrJX7aC0.js";import{i as zn}from"./X-BuNT_jX4.js";import{S as Bn}from"./scroll-area-CD247Puy.js";import{T as C9,a as E9,b as w9}from"./tooltip-DRbwF15X.js";import{a as Ge,f as wr}from"./repository-binding-JChFqkvS.js";import{M as Vn}from"./monaco-editor-DTjt4Gvf.js";import{C as _r}from"./calendar-DfnovksK.js";import{I as A9}from"./input-DYp-O8Zf.js";import{T as Ar}from"./textarea-BgjIoA0a.js";import{L as O9}from"./label-CyxA9Tlc.js";import{u as k9}from"./use-new-blocks-editor-DAABxnGt.js";import{i as Rr}from"./XClose-4hmzGRgA.js";import{s as p0}from"./Plus-DB4FI3R3.js";import{E as t0,M as Pr,m as Mr,g as A0,u as Ir,s as Fr,a as Or,b as Dr}from"./index-eQ3HZ0eK.js";import{S as oe,b as le,a as ae,d as ce,c as L0}from"./select-BgBtUQbR.js";import{a as $r}from"./Palette-DnGo9yVI.js";import{T as R9,E as zr,R as Br,u as He,C as qe,a as Ye,b as d0,s as We,K as Je,P as Ze,D as Qe,c as Xe,S as et,v as tt,d as nt,e as G0}from"./rich-text-link-control-CXkIRZhg.js";import{S as st}from"./switch-F41L6dpN.js";import{a as Le}from"./Copy01-gcdR5IZX.js";import{s as Vr,a as u0}from"./Image01-CR8VGKVo.js";import{s as n0}from"./Trash01-BvHf5UWo.js";import{t as R0}from"./ChevronUp-RZ9D15nf.js";import{d as y0,a as Un}from"./UserSquare-QnfD_CaR.js";import{C as Ur}from"./combobox-CoP6GrDz.js";import{A as Kr,a as Gr,b as Hr,c as qr,g as Yr,d as Wr,e as Jr,f as Zr}from"./alert-dialog-BFv9kLvz.js";import{d as rt,h as it,c as ot,e as Kn,b as lt,D as at}from"./dialog-DJN6MVgM.js";import{b as de}from"./sandbox-url-D3mC8qhT.js";import{b as we}from"./ZoomOut-CAM_UTRK.js";import{i as P0}from"./Upload01-DKe2IKKC.js";import{i as Gn}from"./AlertCircle-nGDYftVI.js";import{i as Hn}from"./DotsVertical-DhpXY6GD.js";import{S as Qr}from"./search-input-B0oqfDX0.js";import{T as Xr,a as ei,c as ti,b as ni}from"./tabs-28356LbY.js";import{u as si}from"./use-debounced-value-ABLDNwmN.js";import{u as ri,a as qn}from"./use-file-configs-DOgSoqwq.js";import{u as ii,a as ct,i as Yn,e as oi,b as It,f as li}from"./asset-utils-DOn8JWcy.js";import{b as Wn}from"./use-chat-layout-state-YLz0zkkr.js";import{a as ai,T as ci}from"./toggle-group-f3cK2guz.js";import{h as Li,g as di}from"./thread-intent-CfYVTTpH.js";import{o as ui}from"./sandbox-git-api-B1R0585s.js";const Lt=m1("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),fi="website/loaders/secret.ts",mi=["website/actions/secrets/encrypt.ts","$live/actions/secrets/encrypt.ts"],pi=/^(?:[0-9a-f]{2})*$/i;function k0(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t.__resolveType;return typeof e=="string"&&(e.endsWith("/secret.ts")||e.includes("loaders/secret"))}function dt(t){return typeof t=="string"&&pi.test(t)}class hi extends Error{constructor(e){super(`Secret at "${e}" is not encrypted. Re-enter it in the Secret field so it is encrypted before saving.`),this.path=e,this.name="PlaintextSecretError"}path}function _e(t,e=""){if(Array.isArray(t))return t.map((r,i)=>_e(r,`${e}/${i}`));if(!t||typeof t!="object")return t;const n=Object.entries(t);if(k0(t)){const r=t.encrypted;if(r!==void 0&&!dt(r))throw new hi(e||"/");return Object.fromEntries(n.filter(([i])=>i!=="value"))}return Object.fromEntries(n.map(([r,i])=>[r,_e(i,`${e}/${r}`)]))}function ut(t,e){const n=(t??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${e}`:e}function Ft(t){let e;try{e=JSON.parse(t)}catch{return null}return typeof e!="object"||e===null||Array.isArray(e)?null:e}function Jn(t,e){return de(t,e)}function xi(t,e){return de(t,"preview-fetch",{path:e})}function gi(t){return Jn(t,"preview-invoke")}function F4(t){return Jn(t,"catalog-invoke")}function Zn(t){try{const{hostname:e}=new URL(t);return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}function yi(){if(typeof document>"u")return null;const t=Array.from(document.querySelectorAll("iframe"));for(const e of t){const n=e.getAttribute("src");if(n&&Zn(n))return n}return null}function Qn(t,e){const n=t.previewUrl??t.getFallbackPreviewUrl?.()??yi();return n&&Zn(n)?new URL(e,n).toString():xi(t,e)}function vi(t){return Qn(t,"/.decofile")}function bi(t){return t===400?"absent":t===404?"unavailable":t>=200&&t<300?"ok":"error"}function Ot(t){return t.liveOk||t.committedAbsent?404:t.liveStatus??502}async function Xn(t,e){const n=de(t,"read"),r=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,full:!0})}),i=bi(r.status);if(i==="absent")return{kind:"absent"};if(i==="unavailable")return{kind:"unavailable"};if(i==="error"){const l=new Error(`Failed to read ${e}: ${r.status}`);throw l.status=r.status,l}const o=await r.json();if(typeof o.content!="string")return{kind:"unavailable"};try{return{kind:"data",data:JSON.parse(Tr(o.content))}}catch{return{kind:"unavailable"}}}async function ji(t){const e=`/api/${t.orgSlug}/decofile/${encodeURIComponent(t.virtualMcpId)}/${encodeURIComponent(t.branch)}/meta`,n=await fetch(e,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const r=new Error(`Failed to read committed meta: ${n.status}`);throw r.status=n.status,r}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function ft(t){return Ge(t)?.metadata?.runtime?.path??null}function es(t){const e=`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`;return t.localPreviewUrl?`${e}:local:${t.localPreviewUrl}`:e}function O4(t,e){const n=B.c(16),{url:r}=$e(t?.virtualMcpId),i=!!r,o=t?es({...t,localPreviewUrl:r}):"",l=e?.fetchEnabled??!0,a=ft(t?.virtualMcpId),c=De(t?.virtualMcpId).runtime==="cms",L=Tn(),d=Q9.decofile(o);let u;n[0]!==c||n[1]!==l||n[2]!==i||n[3]!==r||n[4]!==a||n[5]!==t||n[6]!==L?(u=async()=>{if(i){const y=await fetch(new URL("/.decofile",r).toString(),{cache:"no-store"}).catch(ki),j=y?.ok?Ft(await y.text()):null;if(j)return j;const S=new Error("decofile unavailable (local tunnel unreachable)");throw S.status=502,S}if(c)return N1(L,t);const p=()=>Xn(t,ut(a,".deco/blocks.gen.json"));if(l){const y=await fetch(vi(t),{cache:"no-store"}).catch(Ni);if(y?.ok){const g=Ft(await y.text());if(g)return g}const j=await p();if(j.kind==="data")return j.data;const S=new Error(`Failed to fetch decofile: ${y?.status??"network error"}`);throw S.status=Ot({liveOk:!!y?.ok,liveStatus:y?.status,committedAbsent:j.kind==="absent"}),S}const x=await p();if(x.kind==="data")return x.data;const h=new Error("decofile unavailable (preview down, no committed snapshot)");throw h.status=Ot({liveOk:!1,committedAbsent:x.kind==="absent"}),h},n[0]=c,n[1]=l,n[2]=i,n[3]=r,n[4]=a,n[5]=t,n[6]=L,n[7]=u):u=n[7];const f=!!t;let v;n[8]!==c||n[9]!==i?(v=(p,x)=>{if(c||i)return p<3;const h=x.status;return h!==502&&h!==404&&p<2},n[8]=c,n[9]=i,n[10]=v):v=n[10];let m;return n[11]!==d||n[12]!==u||n[13]!==f||n[14]!==v?(m={queryKey:d,queryFn:u,enabled:f,staleTime:3e4,retry:v,retryDelay:Si},n[11]=d,n[12]=u,n[13]=f,n[14]=v,n[15]=m):m=n[15],U0(m)}function Si(t){return Mn(5e3,1e3,t,2,0)}function Ni(){return null}function ki(){return null}function Ti(t){const e=[];return t.fastPreviewActive?e.push({kind:"committed"}):(t.fetchEnabled&&t.previewUrl&&e.push({kind:"live",baseUrl:t.previewUrl}),e.push({kind:"committed"})),t.productionUrl&&e.push({kind:"production",baseUrl:t.productionUrl}),e}function Ci(t){return Q9.liveMeta(t.orgSlug,t.virtualMcpId,t.branch,t.previewUrl??"",t.productionUrl??"")}function D4(t,e){const n=B.c(21),{url:r}=$e(t?.virtualMcpId),i=!!r,o=i||(e?.fetchEnabled??!0),l=r??t?.previewUrl,a=ft(t?.virtualMcpId),{previewServerUrl:c,runtime:L}=De(t?.virtualMcpId),d=!i&&L==="cms";let u;n[0]!==t||n[1]!==l||n[2]!==c?(u=t?Ci({...t,previewUrl:l,productionUrl:c}):Q9.liveMeta(""),n[0]=t,n[1]=l,n[2]=c,n[3]=u):u=n[3];let f;n[4]!==d||n[5]!==o||n[6]!==i||n[7]!==a||n[8]!==t||n[9]!==l||n[10]!==c?(f=async()=>{const h=wi,y=()=>d?ji(t):Xn(t,ut(a,".deco/meta.gen.json")),j=i&&l?[{kind:"live",baseUrl:l}]:Ti({fetchEnabled:o,previewUrl:l,productionUrl:c,fastPreviewActive:d});for(const g of j){if(g.kind==="committed"){const N=await y();if(N.kind==="data")return N.data;continue}const b=await h(g.baseUrl);if(b)return b}const S=new Error("live meta unavailable (dev server down, no committed snapshot, no production fallback)");throw S.status=502,S},n[4]=d,n[5]=o,n[6]=i,n[7]=a,n[8]=t,n[9]=l,n[10]=c,n[11]=f):f=n[11];const v=!!t,m=e?.refetchInterval;let p;n[12]!==d||n[13]!==i?(p=(h,y)=>(d||i||y.status!==502)&&h<3,n[12]=d,n[13]=i,n[14]=p):p=n[14];let x;return n[15]!==u||n[16]!==f||n[17]!==v||n[18]!==m||n[19]!==p?(x={queryKey:u,queryFn:f,enabled:v,refetchInterval:m,refetchIntervalInBackground:!1,staleTime:3e5,retry:p,retryDelay:Ei},n[15]=u,n[16]=f,n[17]=v,n[18]=m,n[19]=p,n[20]=x):x=n[20],U0(x)}function Ei(t){return Mn(5e3,1e3,t,2,0)}async function wi(t){const e=new URL("/live/_meta",t).href,n=await fetch(e,{cache:"no-store"}).catch(_i);if(!n?.ok)return null;try{return await n.json()}catch{return null}}function _i(){return null}function ye(t,e,n){const r=n[t];return typeof r?.name=="string"&&r.name||t.replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase())||`Section ${e+1}`}function $4(t,e){return t.map((n,r)=>{const i=n.__resolveType??"",o=I9(i);if(!o&&i!==""&&U9(i)&&i in e)return{index:r,resolveType:i,label:ye(i,r,e),isLazy:!1,isSavedBlock:!0};const l=o?n.section:void 0,a=o?l?.__resolveType??"":i;if(a===K0||a===Ce){const L=o?l:n,d=Array.isArray(L?.variants)?L.variants:[];if(d.length===1&&(d[0]?.rule?.__resolveType??"")===ze){const v=d[0]?.value??{};let m=v.__resolveType??"";const p=I9(m);let x=v;if(p){const h=v.section;m=h?.__resolveType??m,h&&(x=h)}if(m===K0||m===Ce){const y=(Array.isArray(x.variants)?x.variants:[])[0]?.value?.__resolveType,j=y?j9(y):"Section";return{index:r,resolveType:i,label:`Variants of ${j}`,variantOf:j,isHidden:!0,isLazy:p}}return m!==""&&U9(m)&&m in e?{index:r,resolveType:i,label:ye(m,r,e),isHidden:!0,isLazy:p,isSavedBlock:!0}:{index:r,resolveType:i,label:j9(m)||`Section ${r+1}`,isHidden:!0,isLazy:p}}const u=d[0]?.value?.__resolveType,f=u?j9(u):"Section";return{index:r,resolveType:i,label:`Variants of ${f}`,variantOf:f,isMultivariate:!0,isLazy:o}}const c=o?n.section?.__resolveType??i:i;return o&&c!==""&&U9(c)&&c in e?{index:r,resolveType:i,label:ye(c,r,e),isLazy:!0,isSavedBlock:!0}:{index:r,resolveType:i,label:j9(c)||`Section ${r+1}`,isLazy:o}})}const Ai={provision:0,cloning:1,install:2,dev:3};function Ri(t){return Ai[t.step]}const Dt=48,ts=28,ns=3,Pi=(()=>{const t=[];let e=0;for(let n=0;n<Dt;n++)n===ts?t.push(null):(t.push(e/(Dt-1)*ns),e++);return t})();function Mi(t){return{provision:t("sandbox.bootingVisual.phaseProvision"),cloning:t("sandbox.bootingVisual.phaseCloning"),install:t("sandbox.bootingVisual.phaseInstall"),dev:t("sandbox.bootingVisual.phaseDev")}}function Ii(t,e,n){return t.step==="provision"&&e!=null&&e.kind!=="ready"&&e.kind!=="failed"?k1[e.kind].long:n[t.step]}const F9="bg-foreground/[0.05]",P9="bg-foreground/[0.09]",Fi=Array.from({length:35},()=>Math.random()*1.8),Oi=Array.from({length:35},()=>Math.random()<.4);function Di(t){const e=B.c(31),{progress:n,claimPhase:r}=t,i=f9();let o;e[0]!==n?(o=Ri(n),e[0]=n,e[1]=o):o=e[1];const l=o;let a;e[2]!==r||e[3]!==n||e[4]!==i?(a=Ii(n,r,Mi(i)),e[2]=r,e[3]=n,e[4]=i,e[5]=a):a=e[5];const c=a;let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(vr,{}),e[6]=L):L=e[6];const d=`${n.step}-${c}`;let u;e[7]!==c||e[8]!==d?(u=s.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-foreground/10 bg-background px-3.5 py-1.5 shadow-[0_4px_20px_-4px_rgb(0_0_0_/_0.12)]",children:[L,s.jsxs("span",{className:"animate-in fade-in text-[13px] font-medium text-foreground/85 duration-500",children:[c,"…"]},d)]}),e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx($i,{}),e[10]=f):f=e[10];let v;e[11]!==l?(v=s.jsx(D0,{phase:0,current:l,children:f}),e[11]=l,e[12]=v):v=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Bi,{}),e[13]=m):m=e[13];let p;e[14]!==l?(p=s.jsx(D0,{phase:1,current:l,children:m}),e[14]=l,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Vi,{}),e[16]=x):x=e[16];let h;e[17]!==l?(h=s.jsx(D0,{phase:2,current:l,children:x}),e[17]=l,e[18]=h):h=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ki,{}),e[19]=y):y=e[19];let j;e[20]!==l?(j=s.jsx(D0,{phase:3,current:l,children:y}),e[20]=l,e[21]=j):j=e[21];let S;e[22]!==h||e[23]!==j||e[24]!==v||e[25]!==p?(S=s.jsxs("div",{className:"relative aspect-[4/3] w-[min(78%,560px)]",children:[v,p,h,j]}),e[22]=h,e[23]=j,e[24]=v,e[25]=p,e[26]=S):S=e[26];let g;e[27]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("style",{children:`
1
+ import{aO as m1,c as B,o as Tn,m as U0,K as Q9,b as f9,j as s,l as U,B as h9,Z as Cn,aJ as p1,e as En,r as I,t as T9,aP as h1,aQ as J9,n as x1,ag as wn,F as X0,ak as ee,G as N9,H as G9,I as H9,aR as te,al as Te,aN as g1,h as m0,aS as y1,E as v1,aT as b1,au as j1,av as S1}from"./index-D2dTzz5J.js";import{u as De}from"./use-session-runtime-CjMZc55F.js";import{u as $e,O as N1,c as I9,P as U9,Q as K0,T as Ce,N as ze,U as j9,C as k1,z as T1,A as C1,B as E1,y as w1,q as _1,V as _n,t as An,W as A1,X as At,Y as R1,Z as P1,r as D9,_ as Rn,$ as Be,a0 as M1,a1 as I1,a2 as v0,a3 as F1,a4 as O1,a5 as Pn,g as D1,a6 as Ve,o as $1,a7 as z1,a8 as B1,v as V1,a9 as U1,aa as K1,ab as Ee,ac as G1,ad as O0,ae as H1,af as q1,ag as Y1,ah as W1,ai as J1,aj as Z1,ak as Rt,al as Q1,am as X1,an as er,ao as tr}from"./claim-phase-copy-ZnN8pI8I.js";import{e as Mn}from"./backoff-8mStPHYB.js";import{ab as nr,ac as sr,ad as rr,ae as ir,af as or,ag as lr,ah as ar,ai as cr,$ as Lr,aj as In,ak as ne,z as dr,al as Fn,a6 as N0,Z as ur,y as fr,b as o0,am as mr,an as Pt,ao as pr,aa as hr,H as xr,ap as gr,aq as yr}from"./agent-icon-CR4t5Gu3.js";import{i as On}from"./Sun-DxmQEZP4.js";import{S as Mt}from"./sandbox-start-errors-BK_aDCyt.js";import{G as vr}from"./pair-C5MP6tmI.js";import{i as q9}from"./Check-BbEloZu1.js";import{i as Ue,d as br,e as jr,b as Sr,c as Nr}from"./Tool01-D4pGeBop.js";import{C as se,a as re,b as K9,e as c0,c as ie,f as Ke,d as kr}from"./command-BfeIom6N.js";import{a as E0,b as w0,P as _0}from"./popover-DiGkaZQG.js";import{s as Tr,a as Cr,b as Er}from"./utils-BfD_oePk.js";import{u as Dn}from"./chat-context-CXmGJCh6.js";import{n as $n}from"./LinkExternal01-DZNYicBT.js";import{i as zn}from"./X-Cul5rSgm.js";import{S as Bn}from"./scroll-area-CMu3xzBy.js";import{T as C9,a as E9,b as w9}from"./tooltip-jK__fCo4.js";import{a as Ge,f as wr}from"./repository-binding-rygwFtUU.js";import{M as Vn}from"./monaco-editor-CWEy2Wmz.js";import{C as _r}from"./calendar-FovdVD0Q.js";import{I as A9}from"./input-CcOKxxNa.js";import{T as Ar}from"./textarea-PVngK0Di.js";import{L as O9}from"./label-Vx4RXl56.js";import{u as k9}from"./use-new-blocks-editor-D7CDsp29.js";import{i as Rr}from"./XClose-Cs8QbZ4B.js";import{s as p0}from"./Plus-kevaXo9o.js";import{E as t0,M as Pr,m as Mr,g as A0,u as Ir,s as Fr,a as Or,b as Dr}from"./index-DBRaqXh3.js";import{S as oe,b as le,a as ae,d as ce,c as L0}from"./select-DNyFjSYg.js";import{a as $r}from"./Palette-D-JYBilo.js";import{T as R9,E as zr,R as Br,u as He,C as qe,a as Ye,b as d0,s as We,K as Je,P as Ze,D as Qe,c as Xe,S as et,v as tt,d as nt,e as G0}from"./rich-text-link-control-Dtfq7e19.js";import{S as st}from"./switch-ZiO5P7k4.js";import{a as Le}from"./Copy01-a63gH2RE.js";import{s as Vr,a as u0}from"./Image01-BR5I_9pG.js";import{s as n0}from"./Trash01-DFbco4Cc.js";import{t as R0}from"./ChevronUp-D3ChNhrQ.js";import{d as y0,a as Un}from"./UserSquare-DRII3oW9.js";import{C as Ur}from"./combobox-CEvYMvN3.js";import{A as Kr,a as Gr,b as Hr,c as qr,g as Yr,d as Wr,e as Jr,f as Zr}from"./alert-dialog-SIUpU6uq.js";import{d as rt,h as it,c as ot,e as Kn,b as lt,D as at}from"./dialog-BSl2AX4W.js";import{b as de}from"./sandbox-url-D3mC8qhT.js";import{b as we}from"./ZoomOut-D59vA8XW.js";import{i as P0}from"./Upload01-BZbq-HqK.js";import{i as Gn}from"./AlertCircle-DXLs2YfX.js";import{i as Hn}from"./DotsVertical-vt_3gkoG.js";import{S as Qr}from"./search-input-nZG5K7zX.js";import{T as Xr,a as ei,c as ti,b as ni}from"./tabs-D81IF5HZ.js";import{u as si}from"./use-debounced-value-CVxm5Do1.js";import{u as ri,a as qn}from"./use-file-configs-C194rQrE.js";import{u as ii,a as ct,i as Yn,e as oi,b as It,f as li}from"./asset-utils-DXGjR1jG.js";import{b as Wn}from"./use-chat-layout-state-CqvKxYcd.js";import{a as ai,T as ci}from"./toggle-group-Dc2uUHWD.js";import{h as Li,g as di}from"./thread-intent-DkMl3Clw.js";import{o as ui}from"./sandbox-git-api-B1R0585s.js";const Lt=m1("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),fi="website/loaders/secret.ts",mi=["website/actions/secrets/encrypt.ts","$live/actions/secrets/encrypt.ts"],pi=/^(?:[0-9a-f]{2})*$/i;function k0(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t.__resolveType;return typeof e=="string"&&(e.endsWith("/secret.ts")||e.includes("loaders/secret"))}function dt(t){return typeof t=="string"&&pi.test(t)}class hi extends Error{constructor(e){super(`Secret at "${e}" is not encrypted. Re-enter it in the Secret field so it is encrypted before saving.`),this.path=e,this.name="PlaintextSecretError"}path}function _e(t,e=""){if(Array.isArray(t))return t.map((r,i)=>_e(r,`${e}/${i}`));if(!t||typeof t!="object")return t;const n=Object.entries(t);if(k0(t)){const r=t.encrypted;if(r!==void 0&&!dt(r))throw new hi(e||"/");return Object.fromEntries(n.filter(([i])=>i!=="value"))}return Object.fromEntries(n.map(([r,i])=>[r,_e(i,`${e}/${r}`)]))}function ut(t,e){const n=(t??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${e}`:e}function Ft(t){let e;try{e=JSON.parse(t)}catch{return null}return typeof e!="object"||e===null||Array.isArray(e)?null:e}function Jn(t,e){return de(t,e)}function xi(t,e){return de(t,"preview-fetch",{path:e})}function gi(t){return Jn(t,"preview-invoke")}function F4(t){return Jn(t,"catalog-invoke")}function Zn(t){try{const{hostname:e}=new URL(t);return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}function yi(){if(typeof document>"u")return null;const t=Array.from(document.querySelectorAll("iframe"));for(const e of t){const n=e.getAttribute("src");if(n&&Zn(n))return n}return null}function Qn(t,e){const n=t.previewUrl??t.getFallbackPreviewUrl?.()??yi();return n&&Zn(n)?new URL(e,n).toString():xi(t,e)}function vi(t){return Qn(t,"/.decofile")}function bi(t){return t===400?"absent":t===404?"unavailable":t>=200&&t<300?"ok":"error"}function Ot(t){return t.liveOk||t.committedAbsent?404:t.liveStatus??502}async function Xn(t,e){const n=de(t,"read"),r=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,full:!0})}),i=bi(r.status);if(i==="absent")return{kind:"absent"};if(i==="unavailable")return{kind:"unavailable"};if(i==="error"){const l=new Error(`Failed to read ${e}: ${r.status}`);throw l.status=r.status,l}const o=await r.json();if(typeof o.content!="string")return{kind:"unavailable"};try{return{kind:"data",data:JSON.parse(Tr(o.content))}}catch{return{kind:"unavailable"}}}async function ji(t){const e=`/api/${t.orgSlug}/decofile/${encodeURIComponent(t.virtualMcpId)}/${encodeURIComponent(t.branch)}/meta`,n=await fetch(e,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const r=new Error(`Failed to read committed meta: ${n.status}`);throw r.status=n.status,r}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function ft(t){return Ge(t)?.metadata?.runtime?.path??null}function es(t){const e=`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`;return t.localPreviewUrl?`${e}:local:${t.localPreviewUrl}`:e}function O4(t,e){const n=B.c(16),{url:r}=$e(t?.virtualMcpId),i=!!r,o=t?es({...t,localPreviewUrl:r}):"",l=e?.fetchEnabled??!0,a=ft(t?.virtualMcpId),c=De(t?.virtualMcpId).runtime==="cms",L=Tn(),d=Q9.decofile(o);let u;n[0]!==c||n[1]!==l||n[2]!==i||n[3]!==r||n[4]!==a||n[5]!==t||n[6]!==L?(u=async()=>{if(i){const y=await fetch(new URL("/.decofile",r).toString(),{cache:"no-store"}).catch(ki),j=y?.ok?Ft(await y.text()):null;if(j)return j;const S=new Error("decofile unavailable (local tunnel unreachable)");throw S.status=502,S}if(c)return N1(L,t);const p=()=>Xn(t,ut(a,".deco/blocks.gen.json"));if(l){const y=await fetch(vi(t),{cache:"no-store"}).catch(Ni);if(y?.ok){const g=Ft(await y.text());if(g)return g}const j=await p();if(j.kind==="data")return j.data;const S=new Error(`Failed to fetch decofile: ${y?.status??"network error"}`);throw S.status=Ot({liveOk:!!y?.ok,liveStatus:y?.status,committedAbsent:j.kind==="absent"}),S}const x=await p();if(x.kind==="data")return x.data;const h=new Error("decofile unavailable (preview down, no committed snapshot)");throw h.status=Ot({liveOk:!1,committedAbsent:x.kind==="absent"}),h},n[0]=c,n[1]=l,n[2]=i,n[3]=r,n[4]=a,n[5]=t,n[6]=L,n[7]=u):u=n[7];const f=!!t;let v;n[8]!==c||n[9]!==i?(v=(p,x)=>{if(c||i)return p<3;const h=x.status;return h!==502&&h!==404&&p<2},n[8]=c,n[9]=i,n[10]=v):v=n[10];let m;return n[11]!==d||n[12]!==u||n[13]!==f||n[14]!==v?(m={queryKey:d,queryFn:u,enabled:f,staleTime:3e4,retry:v,retryDelay:Si},n[11]=d,n[12]=u,n[13]=f,n[14]=v,n[15]=m):m=n[15],U0(m)}function Si(t){return Mn(5e3,1e3,t,2,0)}function Ni(){return null}function ki(){return null}function Ti(t){const e=[];return t.fastPreviewActive?e.push({kind:"committed"}):(t.fetchEnabled&&t.previewUrl&&e.push({kind:"live",baseUrl:t.previewUrl}),e.push({kind:"committed"})),t.productionUrl&&e.push({kind:"production",baseUrl:t.productionUrl}),e}function Ci(t){return Q9.liveMeta(t.orgSlug,t.virtualMcpId,t.branch,t.previewUrl??"",t.productionUrl??"")}function D4(t,e){const n=B.c(21),{url:r}=$e(t?.virtualMcpId),i=!!r,o=i||(e?.fetchEnabled??!0),l=r??t?.previewUrl,a=ft(t?.virtualMcpId),{previewServerUrl:c,runtime:L}=De(t?.virtualMcpId),d=!i&&L==="cms";let u;n[0]!==t||n[1]!==l||n[2]!==c?(u=t?Ci({...t,previewUrl:l,productionUrl:c}):Q9.liveMeta(""),n[0]=t,n[1]=l,n[2]=c,n[3]=u):u=n[3];let f;n[4]!==d||n[5]!==o||n[6]!==i||n[7]!==a||n[8]!==t||n[9]!==l||n[10]!==c?(f=async()=>{const h=wi,y=()=>d?ji(t):Xn(t,ut(a,".deco/meta.gen.json")),j=i&&l?[{kind:"live",baseUrl:l}]:Ti({fetchEnabled:o,previewUrl:l,productionUrl:c,fastPreviewActive:d});for(const g of j){if(g.kind==="committed"){const N=await y();if(N.kind==="data")return N.data;continue}const b=await h(g.baseUrl);if(b)return b}const S=new Error("live meta unavailable (dev server down, no committed snapshot, no production fallback)");throw S.status=502,S},n[4]=d,n[5]=o,n[6]=i,n[7]=a,n[8]=t,n[9]=l,n[10]=c,n[11]=f):f=n[11];const v=!!t,m=e?.refetchInterval;let p;n[12]!==d||n[13]!==i?(p=(h,y)=>(d||i||y.status!==502)&&h<3,n[12]=d,n[13]=i,n[14]=p):p=n[14];let x;return n[15]!==u||n[16]!==f||n[17]!==v||n[18]!==m||n[19]!==p?(x={queryKey:u,queryFn:f,enabled:v,refetchInterval:m,refetchIntervalInBackground:!1,staleTime:3e5,retry:p,retryDelay:Ei},n[15]=u,n[16]=f,n[17]=v,n[18]=m,n[19]=p,n[20]=x):x=n[20],U0(x)}function Ei(t){return Mn(5e3,1e3,t,2,0)}async function wi(t){const e=new URL("/live/_meta",t).href,n=await fetch(e,{cache:"no-store"}).catch(_i);if(!n?.ok)return null;try{return await n.json()}catch{return null}}function _i(){return null}function ye(t,e,n){const r=n[t];return typeof r?.name=="string"&&r.name||t.replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase())||`Section ${e+1}`}function $4(t,e){return t.map((n,r)=>{const i=n.__resolveType??"",o=I9(i);if(!o&&i!==""&&U9(i)&&i in e)return{index:r,resolveType:i,label:ye(i,r,e),isLazy:!1,isSavedBlock:!0};const l=o?n.section:void 0,a=o?l?.__resolveType??"":i;if(a===K0||a===Ce){const L=o?l:n,d=Array.isArray(L?.variants)?L.variants:[];if(d.length===1&&(d[0]?.rule?.__resolveType??"")===ze){const v=d[0]?.value??{};let m=v.__resolveType??"";const p=I9(m);let x=v;if(p){const h=v.section;m=h?.__resolveType??m,h&&(x=h)}if(m===K0||m===Ce){const y=(Array.isArray(x.variants)?x.variants:[])[0]?.value?.__resolveType,j=y?j9(y):"Section";return{index:r,resolveType:i,label:`Variants of ${j}`,variantOf:j,isHidden:!0,isLazy:p}}return m!==""&&U9(m)&&m in e?{index:r,resolveType:i,label:ye(m,r,e),isHidden:!0,isLazy:p,isSavedBlock:!0}:{index:r,resolveType:i,label:j9(m)||`Section ${r+1}`,isHidden:!0,isLazy:p}}const u=d[0]?.value?.__resolveType,f=u?j9(u):"Section";return{index:r,resolveType:i,label:`Variants of ${f}`,variantOf:f,isMultivariate:!0,isLazy:o}}const c=o?n.section?.__resolveType??i:i;return o&&c!==""&&U9(c)&&c in e?{index:r,resolveType:i,label:ye(c,r,e),isLazy:!0,isSavedBlock:!0}:{index:r,resolveType:i,label:j9(c)||`Section ${r+1}`,isLazy:o}})}const Ai={provision:0,cloning:1,install:2,dev:3};function Ri(t){return Ai[t.step]}const Dt=48,ts=28,ns=3,Pi=(()=>{const t=[];let e=0;for(let n=0;n<Dt;n++)n===ts?t.push(null):(t.push(e/(Dt-1)*ns),e++);return t})();function Mi(t){return{provision:t("sandbox.bootingVisual.phaseProvision"),cloning:t("sandbox.bootingVisual.phaseCloning"),install:t("sandbox.bootingVisual.phaseInstall"),dev:t("sandbox.bootingVisual.phaseDev")}}function Ii(t,e,n){return t.step==="provision"&&e!=null&&e.kind!=="ready"&&e.kind!=="failed"?k1[e.kind].long:n[t.step]}const F9="bg-foreground/[0.05]",P9="bg-foreground/[0.09]",Fi=Array.from({length:35},()=>Math.random()*1.8),Oi=Array.from({length:35},()=>Math.random()<.4);function Di(t){const e=B.c(31),{progress:n,claimPhase:r}=t,i=f9();let o;e[0]!==n?(o=Ri(n),e[0]=n,e[1]=o):o=e[1];const l=o;let a;e[2]!==r||e[3]!==n||e[4]!==i?(a=Ii(n,r,Mi(i)),e[2]=r,e[3]=n,e[4]=i,e[5]=a):a=e[5];const c=a;let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(vr,{}),e[6]=L):L=e[6];const d=`${n.step}-${c}`;let u;e[7]!==c||e[8]!==d?(u=s.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-foreground/10 bg-background px-3.5 py-1.5 shadow-[0_4px_20px_-4px_rgb(0_0_0_/_0.12)]",children:[L,s.jsxs("span",{className:"animate-in fade-in text-[13px] font-medium text-foreground/85 duration-500",children:[c,"…"]},d)]}),e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx($i,{}),e[10]=f):f=e[10];let v;e[11]!==l?(v=s.jsx(D0,{phase:0,current:l,children:f}),e[11]=l,e[12]=v):v=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Bi,{}),e[13]=m):m=e[13];let p;e[14]!==l?(p=s.jsx(D0,{phase:1,current:l,children:m}),e[14]=l,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Vi,{}),e[16]=x):x=e[16];let h;e[17]!==l?(h=s.jsx(D0,{phase:2,current:l,children:x}),e[17]=l,e[18]=h):h=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ki,{}),e[19]=y):y=e[19];let j;e[20]!==l?(j=s.jsx(D0,{phase:3,current:l,children:y}),e[20]=l,e[21]=j):j=e[21];let S;e[22]!==h||e[23]!==j||e[24]!==v||e[25]!==p?(S=s.jsxs("div",{className:"relative aspect-[4/3] w-[min(78%,560px)]",children:[v,p,h,j]}),e[22]=h,e[23]=j,e[24]=v,e[25]=p,e[26]=S):S=e[26];let g;e[27]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("style",{children:`
2
2
  @keyframes vm-pulse-soft {
3
3
  0%, 100% { opacity: 0.25; }
4
4
  50% { opacity: 1; }
@@ -1,2 +1,2 @@
1
- import{o as X,r as o,ds as Ce,dq as De,c as Pe,e as Ae,d3 as ee,X as ye,j as Ee,K as M,z as _e}from"./index-CdxHQZta.js";import{u as Le}from"./use-mcp-client-CmW-CbmL.js";import{u as Ue}from"./use-session-runtime-D08Kep-m.js";import{u as Re,b as Oe}from"./chat-context-57WZg7Dj.js";import{u as Be}from"./thread-intent-CfYVTTpH.js";import{e as ge}from"./backoff-8mStPHYB.js";import{b as Ne}from"./sandbox-url-D3mC8qhT.js";import{a as Fe}from"./repository-binding-JChFqkvS.js";import{d as $e}from"./sandbox-start-errors-BK_aDCyt.js";function Ke(e,t){const n=X(t);return Ve({filters:{...e,status:"pending"}},n).length}function fe(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Ve(e={},t){const n=X(t).getMutationCache(),s=o.useRef(e),u=o.useRef(null);return u.current===null&&(u.current=fe(n,e)),o.useEffect(()=>{s.current=e}),o.useSyncExternalStore(o.useCallback(c=>n.subscribe(()=>{const a=Ce(u.current,fe(n,s.current));u.current!==a&&(u.current=a,De.schedule(c))}),[n]),()=>u.current,()=>u.current)}async function qe(e,t,n){const s=await e.callTool({name:t,arguments:n});if(s.isError){const u=s.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(u)}return s}const be=["SANDBOX_START"],W=new Map,He=e=>`${e.virtualMcpId}::${e.branch??""}`,Qe=e=>e.message.includes("retry shortly"),ie=new Set,le={mark:(e,t)=>ie.add(`${e}::${t}`),clear:(e,t)=>ie.delete(`${e}::${t}`),isStopped:(e,t)=>ie.has(`${e}::${t}`)};function Ye(e,t){const n=X();return Ae({mutationKey:be,retry:(s,u)=>Qe(u)&&s<6,retryDelay:s=>ge(5e3,500,s,2,0),mutationFn:async s=>{s.branch&&le.clear(s.virtualMcpId,s.branch);const u=He(s),c=W.get(u);if(c)return c;const a=(async()=>(await qe(e,"SANDBOX_START",s)).structuredContent)();W.set(u,a);try{return await a}finally{W.get(u)===a&&W.delete(u)}},onSuccess:()=>{ee(n),t?.onStarted?.()}})}function Rt(e,t){const n=Pe.c(3);let s;return n[0]!==t||n[1]!==e?(s={mutationKey:be,predicate:c=>{if(!e)return!1;const a=c.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=s):s=n[2],Ke(s)>0}function Se(e){return e==="installing"||e==="install-failed"||e==="starting"||e==="start-failed"||e==="running"||e==="crashed"}const Me={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ve=o.createContext(Me),me=16384;class Xe{data="";append(t){this.data+=t,this.data.length>me&&(this.data=this.data.slice(this.data.length-me))}get(){return this.data}clear(){this.data=""}}const je=1e3,Ge=3e4,Ie=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],pe="log";function Je(e){if(!e)return null;try{return new URL("/_sandbox/events",e).href}catch{return null}}function We(e){return e===404}async function ze(e){try{const t=await fetch(e,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Ie)});return await t.body?.cancel().catch(()=>{}),We(t.status)}catch{return!1}}function gt({virtualMcpId:e,branch:t,previewUrl:n=null,enabled:s=!0,children:u}){const{org:c}=ye(),a=X(),V=Re()?.taskId??null,[j,y]=o.useState(null),[te,b]=o.useState({phase:"idle"}),[ne,U]=o.useState({state:"running"}),[re,E]=o.useState({kind:"unknown"}),[G,h]=o.useState(!1),[k,q]=o.useState([]),[se,R]=o.useState([]),[,H]=o.useState(0),v=o.useRef(new Map),O=o.useRef(new Set),w=o.useRef(new Set),C=o.useRef(null),p=Je(n),Q=Fe(e)?.metadata?.runtime?.selected==="deno",_=d=>{let S=v.current.get(d);return S||(S=new Xe,v.current.set(d,S)),S};o.useEffect(()=>{if(y(null),b({phase:"idle"}),U({state:"running"}),E({kind:"unknown"}),C.current=null,h(!1),q([]),R([]),v.current.clear(),!e||!t||!s)return;const d=Ne({orgSlug:c.slug,virtualMcpId:e,branch:t,threadId:V??null},"events");let S=!1,D=0,L=null,T=null,P=null,g=null,m=null,A=null;const I=r=>{try{const i=JSON.parse(r.data);y(i),i.kind!=="failed"&&(h(!1),D=0),i.kind==="ready"&&ae()}catch(i){console.warn("[vm-events] bad phase payload",i)}},B=()=>{h(!0),y(null),b({phase:"idle"}),U({state:"running"}),E({kind:"unknown"}),q([]),R([]),v.current.clear()},Y=r=>{try{const i=JSON.parse(r.data);if(typeof i.data!="string")return;D=0;const f=i.data.replace(/\r?\n/g,`\r
1
+ import{o as X,r as o,ds as Ce,dq as De,c as Pe,e as Ae,d3 as ee,X as ye,j as Ee,K as M,z as _e}from"./index-D2dTzz5J.js";import{u as Le}from"./use-mcp-client-BGBcJfvU.js";import{u as Ue}from"./use-session-runtime-CjMZc55F.js";import{u as Re,b as Oe}from"./chat-context-CXmGJCh6.js";import{u as Be}from"./thread-intent-DkMl3Clw.js";import{e as ge}from"./backoff-8mStPHYB.js";import{b as Ne}from"./sandbox-url-D3mC8qhT.js";import{a as Fe}from"./repository-binding-rygwFtUU.js";import{d as $e}from"./sandbox-start-errors-BK_aDCyt.js";function Ke(e,t){const n=X(t);return Ve({filters:{...e,status:"pending"}},n).length}function fe(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Ve(e={},t){const n=X(t).getMutationCache(),s=o.useRef(e),u=o.useRef(null);return u.current===null&&(u.current=fe(n,e)),o.useEffect(()=>{s.current=e}),o.useSyncExternalStore(o.useCallback(c=>n.subscribe(()=>{const a=Ce(u.current,fe(n,s.current));u.current!==a&&(u.current=a,De.schedule(c))}),[n]),()=>u.current,()=>u.current)}async function qe(e,t,n){const s=await e.callTool({name:t,arguments:n});if(s.isError){const u=s.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(u)}return s}const be=["SANDBOX_START"],W=new Map,He=e=>`${e.virtualMcpId}::${e.branch??""}`,Qe=e=>e.message.includes("retry shortly"),ie=new Set,le={mark:(e,t)=>ie.add(`${e}::${t}`),clear:(e,t)=>ie.delete(`${e}::${t}`),isStopped:(e,t)=>ie.has(`${e}::${t}`)};function Ye(e,t){const n=X();return Ae({mutationKey:be,retry:(s,u)=>Qe(u)&&s<6,retryDelay:s=>ge(5e3,500,s,2,0),mutationFn:async s=>{s.branch&&le.clear(s.virtualMcpId,s.branch);const u=He(s),c=W.get(u);if(c)return c;const a=(async()=>(await qe(e,"SANDBOX_START",s)).structuredContent)();W.set(u,a);try{return await a}finally{W.get(u)===a&&W.delete(u)}},onSuccess:()=>{ee(n),t?.onStarted?.()}})}function Rt(e,t){const n=Pe.c(3);let s;return n[0]!==t||n[1]!==e?(s={mutationKey:be,predicate:c=>{if(!e)return!1;const a=c.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=s):s=n[2],Ke(s)>0}function Se(e){return e==="installing"||e==="install-failed"||e==="starting"||e==="start-failed"||e==="running"||e==="crashed"}const Me={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ve=o.createContext(Me),me=16384;class Xe{data="";append(t){this.data+=t,this.data.length>me&&(this.data=this.data.slice(this.data.length-me))}get(){return this.data}clear(){this.data=""}}const je=1e3,Ge=3e4,Ie=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],pe="log";function Je(e){if(!e)return null;try{return new URL("/_sandbox/events",e).href}catch{return null}}function We(e){return e===404}async function ze(e){try{const t=await fetch(e,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Ie)});return await t.body?.cancel().catch(()=>{}),We(t.status)}catch{return!1}}function gt({virtualMcpId:e,branch:t,previewUrl:n=null,enabled:s=!0,children:u}){const{org:c}=ye(),a=X(),V=Re()?.taskId??null,[j,y]=o.useState(null),[te,b]=o.useState({phase:"idle"}),[ne,U]=o.useState({state:"running"}),[re,E]=o.useState({kind:"unknown"}),[G,h]=o.useState(!1),[k,q]=o.useState([]),[se,R]=o.useState([]),[,H]=o.useState(0),v=o.useRef(new Map),O=o.useRef(new Set),w=o.useRef(new Set),C=o.useRef(null),p=Je(n),Q=Fe(e)?.metadata?.runtime?.selected==="deno",_=d=>{let S=v.current.get(d);return S||(S=new Xe,v.current.set(d,S)),S};o.useEffect(()=>{if(y(null),b({phase:"idle"}),U({state:"running"}),E({kind:"unknown"}),C.current=null,h(!1),q([]),R([]),v.current.clear(),!e||!t||!s)return;const d=Ne({orgSlug:c.slug,virtualMcpId:e,branch:t,threadId:V??null},"events");let S=!1,D=0,L=null,T=null,P=null,g=null,m=null,A=null;const I=r=>{try{const i=JSON.parse(r.data);y(i),i.kind!=="failed"&&(h(!1),D=0),i.kind==="ready"&&ae()}catch(i){console.warn("[vm-events] bad phase payload",i)}},B=()=>{h(!0),y(null),b({phase:"idle"}),U({state:"running"}),E({kind:"unknown"}),q([]),R([]),v.current.clear()},Y=r=>{try{const i=JSON.parse(r.data);if(typeof i.data!="string")return;D=0;const f=i.data.replace(/\r?\n/g,`\r
2
2
  `);_(i.source).append(f);for(const l of O.current)try{l(i.source,f)}catch{}H(l=>l+1)}catch{}},J=r=>{const i=r.type;try{const f=JSON.parse(r.data);switch(D=0,i){case"lifecycle":{const l=f;b(l.state);const F=`${c.slug}/${e}/${t}`;if(Se(l.state.phase)&&!(A&&Se(A))){ee(a,c.id);const K=M.decofile(F);a.getQueryData(K)===void 0&&a.invalidateQueries({queryKey:K})}l.state.phase==="running"&&A!=="running"&&(ee(a,c.id),a.invalidateQueries({queryKey:M.decofile(F)}),a.invalidateQueries({queryKey:M.liveMeta(c.slug,e,t)})),A=l.state.phase;const $=l.state.phase==="running"?l.state.port:null,ce=C.current;if(C.current=$,ce!==null&&$!==null&&ce!==$)for(const K of w.current)try{K()}catch{}return}case"status":U(f);return;case"tasks":{const F=f.active.map($=>$.logName??"").filter(Boolean);R(F);return}case"scripts":q(f.scripts);return;case"branch":{const l=f.meta;E(l);return}case"reload":for(const l of w.current)try{l()}catch{}return;case"file-changed":{const{path:l}=f,F=`${c.slug}/${e}/${t}`;if(l.startsWith(".deco/")||l.includes("/.deco/")){if(!(A==="running"))return;P&&clearTimeout(P),P=setTimeout(()=>{if(P=null,a.invalidateQueries({queryKey:M.decofile(F)}),Q)for(const K of w.current)try{K()}catch{}},500)}else T&&clearTimeout(T),T=setTimeout(()=>{T=null,a.invalidateQueries({queryKey:M.liveMeta(c.slug,e,t)})},1e3);return}}}catch{}};function N(){if(S)return;const r=new EventSource(d);g=r,r.onopen=()=>{},r.onerror=()=>{g===r&&r.readyState===EventSource.CLOSED&&x("studio")},r.addEventListener("phase",I),r.addEventListener("gone",B),r.addEventListener(pe,Y);for(const i of he)r.addEventListener(i,J)}function ae(){if(S||!p||m)return;const r=new EventSource(p);m=r;let i=!1;r.onopen=()=>{if(S||m!==r)return;i=!0,D=0;const f=g;g=null,f?.close()},r.onerror=()=>{m===r&&r.readyState===EventSource.CLOSED&&ue(r,i)},r.addEventListener(pe,Y);for(const f of he)r.addEventListener(f,J)}async function ue(r,i){const f=p?await ze(p):!1;if(!(S||m!==r)){if(r.close(),m=null,f){B(),g||N();return}i&&x("direct")}}function x(r){if(S||L)return;const i=ge(Ge,je,D,2,0);D++,L=setTimeout(()=>{if(L=null,!S){if(r==="direct"){m?.close(),m=null,ae();return}g?.close(),g=null,N()}},i)}return N(),()=>{S=!0,g?.close(),m?.close(),L&&clearTimeout(L),T&&clearTimeout(T),P&&clearTimeout(P)}},[e,t,c.slug,c.id,s,V,p,a,Q]);const oe={phase:j,lifecycle:te,status:ne,branch:re,notFound:G,scripts:k,activeProcesses:se,getBuffer:d=>v.current.get(d)?.get()??"",hasData:d=>(v.current.get(d)?.get().length??0)>0,subscribeChunks:d=>(O.current.add(d),()=>{O.current.delete(d)}),subscribeReload:d=>(w.current.add(d),()=>{w.current.delete(d)})};return Ee.jsx(ve,{value:oe,children:u})}function de(){return o.use(ve)}function bt(e){const{subscribeChunks:t}=de(),n=o.useRef(e);n.current=e,o.useEffect(()=>t((c,a)=>{n.current?.(c,a)}),[t])}function vt(e){const{subscribeReload:t}=de(),n=o.useRef(e);n.current=e,o.useEffect(()=>t(()=>{n.current?.()}),[t])}function Ze(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function et(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveRepository&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function wt(e){return e.threadLoaded&&e.isOwner&&e.hasActiveRepository&&!e.branch&&!e.attempted}function tt(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function Tt(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:s,branch:u}=e,c=e.ownerId??s;if(!s||!c||!u)return t;const a=n?.[c]?.[u];return a?{...t??{},[s]:{...t?.[s]??{},[u]:a}}:t}function z(e,t,n){const s={virtualMcpId:e};return t&&(s.branch=t),n&&(s.threadId=n),s}const we=2,nt=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function Te(e){return nt.has(e)}function rt(e){return e.executionEnabled&&e.failedReason!==null&&Te(e.failedReason)&&e.attempts<we&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const st={branch:null,count:0,handled:!1};function ot(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function at(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function ut(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function xe(e,t){return`${e??""}::${t??""}`}function ct(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function Z(e){const{data:t,virtualMcpId:n,branch:s}=e;t?.branch&&!s&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:xe(n,t.branch??s),url:t.previewUrl})}const it={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},ke=o.createContext(it);function xt(){return o.use(ke)}function kt({executionEnabled:e,virtualMcpId:t,branch:n,userId:s,hasActiveRepository:u,vmEntry:c,threadId:a,children:V}){const{org:j}=ye(),{setCurrentTaskBranch:y}=Oe(),te=Be(),b=de(),ne=X(),U=Ue(t),re=U.resolved?U.runtime:null,E=Re()?.taskId??null,G=Le({connectionId:_e,orgId:j.id,orgSlug:j.slug}),h=Ye(G,{onStarted:()=>{a&&te?.refreshThreadMetadata(a)}}),{mutate:k,reset:q}=h,[se,R]=o.useState(null),H=o.useRef(new Set),v=o.useRef(null),[O,w]=o.useState(st),C=ot(O,n);C!==O&&w(C);const p=b.phase?.kind==="failed"?b.phase:null,Q=ct({vmEntry:c,seeded:p?null:se,key:xe(t,n)}),_=!!t&&!!n&&le.isStopped(t,n),oe=b.status.state==="paused",d=!p||!Te(p.reason)||C.count>=we,S=at({mutationError:h.isError&&h.error?$e(h.error.message):null,phase:b.phase,startPending:h.isPending,claimRetryExhausted:d}),D=Ze({previewUrl:Q,appPaused:oe,userStopped:_,startError:S}),L=ut(D),T=n??"",P=H.current.has(T),g=et({executionEnabled:e,hasActiveRepository:u,userId:s,branch:n,vmEntry:c,userStopped:_,isPending:h.isPending,attempted:P,sessionRuntime:re});o.useEffect(()=>{if(!g||!t)return;H.current.add(T);const x=z(t,n,E);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:y,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] auto-start failed:",r)}})},[g,T,n,t,E,k,y,R]);const m=b.notFound?c?.sandboxHandle??null:null,A=tt({executionEnabled:e,notFound:b.notFound,deadVmId:m,lastDeadVmId:v.current,isPending:h.isPending,userStopped:_});o.useEffect(()=>{if(!A||!m||!t)return;v.current=m;const x=z(t,n,E);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:y,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] self-heal failed:",r)}})},[A,m,t,n,E,k,y,R]);const I=rt({executionEnabled:e,failedReason:p?.reason??null,attempts:C.count,isPending:h.isPending,userStopped:_,alreadyHandled:C.handled});o.useEffect(()=>{if(!p){w(r=>r.handled?{...r,handled:!1}:r);return}if(!I||!t)return;w(r=>({...r,handled:!0,count:r.count+1}));const x=z(t,n,E);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:y,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",r)}})},[p,I,t,n,E,k,y,R]);const B=()=>{if(!e||!t)return;const x=z(t,n,E);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:y,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] user start failed:",r)}})},Y=async()=>{if(!(!e||!t||!n)&&c){le.mark(t,n);try{await G.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}ee(ne)}},J=async()=>{await Y(),B()},N=()=>{H.current=new Set,v.current=null,w({branch:n,count:0,handled:!1}),q(),B()},ue={branch:n,previewState:D,status:L,vmEntry:c,previewUrl:Q,userStopped:_,start:B,stop:Y,restart:J,retry:N,resume:N};return Ee.jsx(ke,{value:ue,children:V})}export{gt as S,kt as a,Ye as b,de as c,xt as d,bt as e,vt as f,Ke as g,Tt as o,wt as s,Rt as u};
@@ -1 +1 @@
1
- import{au as n,bK as t,av as e,bL as m,bM as p,bN as d,bO as h}from"./index-CdxHQZta.js";const s=500;n({title:e().max(s),url:e().max(s),icon:e().max(s)});const i=n({keyId:e().max(s),modelId:e().max(s),title:e().max(s).optional()}).nullable();m(["fast","smart","thinking","image","web_search","deep_research"]);m(["fast","smart","thinking"]);const y=n({tiers:n({fast:i,smart:i,thinking:i,image:i,web_search:i,deep_research:i})});n({tiers:n({fast:i.optional(),smart:i.optional(),thinking:i.optional()})});const v=50,b=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;n({host:e().min(1).max(s).regex(b).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:e().min(1).max(s).describe("Vault secret id holding the PAT used to authenticate this host.")});n({ids:p(e().max(s)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const x=n({voice_mode:t().optional(),home_task_intake_enabled:t().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:t().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:t().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:t().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:t().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:t().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:t().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:t().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:t().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:t().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:t().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:t().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:t().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:t().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),monitor_enabled:t().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:t().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),delivery_lanes_enabled:t().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),new_blocks_editor:t().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in.")}),u=new Set(["reviewer_enabled","cheap_reviewer_model"]);function w(a,r){const c=a?.[r];return u.has(r)?c!==!1:c===!0}function A(a){const r=a?.auto_resolve_conflicts;return typeof r=="boolean"?r:a?.auto_merge===!0}const l=256*1024,f=50,o=500,g=5e3;n({id:e().describe("Brand context ID"),name:e().max(o).describe("Company name"),domain:e().max(o).describe("Company domain (e.g. example.com)"),overview:e().max(g).describe("Company overview / description"),logo:e().max(o).nullable().optional().describe("Logo URL"),favicon:e().max(o).nullable().optional().describe("Favicon URL"),ogImage:e().max(o).nullable().optional().describe("OG image URL"),fonts:n({heading:e().max(o).optional().describe("Font family for headings"),body:e().max(o).optional().describe("Font family for body text"),code:e().max(o).optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:n({primary:e().max(o).optional().describe("Primary brand color (hex)"),secondary:e().max(o).optional().describe("Secondary brand color (hex)"),accent:e().max(o).optional().describe("Accent / highlight color (hex)"),background:e().max(o).optional().describe("Background color (hex)"),foreground:e().max(o).optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:p(d(e(),h())).max(f).nullable().optional().refine(a=>a==null||JSON.stringify(a).length<=l,{message:`images must serialize to at most ${l} bytes`}).describe("Brand images"),metadata:d(e(),h()).nullable().optional().refine(a=>a==null||JSON.stringify(a).length<=l,{message:`metadata must serialize to at most ${l} bytes`}).describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:t().optional().describe("Whether this is the default brand for the organization")});export{u as D,v as G,x as O,y as S,A as a,b,w as o};
1
+ import{au as n,bK as t,av as e,bL as m,bM as p,bN as d,bO as h}from"./index-D2dTzz5J.js";const s=500;n({title:e().max(s),url:e().max(s),icon:e().max(s)});const i=n({keyId:e().max(s),modelId:e().max(s),title:e().max(s).optional()}).nullable();m(["fast","smart","thinking","image","web_search","deep_research"]);m(["fast","smart","thinking"]);const y=n({tiers:n({fast:i,smart:i,thinking:i,image:i,web_search:i,deep_research:i})});n({tiers:n({fast:i.optional(),smart:i.optional(),thinking:i.optional()})});const v=50,b=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;n({host:e().min(1).max(s).regex(b).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:e().min(1).max(s).describe("Vault secret id holding the PAT used to authenticate this host.")});n({ids:p(e().max(s)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const x=n({voice_mode:t().optional(),home_task_intake_enabled:t().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:t().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:t().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:t().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:t().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:t().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:t().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:t().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:t().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:t().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:t().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:t().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:t().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:t().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),monitor_enabled:t().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:t().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),delivery_lanes_enabled:t().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),new_blocks_editor:t().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in.")}),u=new Set(["reviewer_enabled","cheap_reviewer_model"]);function w(a,r){const c=a?.[r];return u.has(r)?c!==!1:c===!0}function A(a){const r=a?.auto_resolve_conflicts;return typeof r=="boolean"?r:a?.auto_merge===!0}const l=256*1024,f=50,o=500,g=5e3;n({id:e().describe("Brand context ID"),name:e().max(o).describe("Company name"),domain:e().max(o).describe("Company domain (e.g. example.com)"),overview:e().max(g).describe("Company overview / description"),logo:e().max(o).nullable().optional().describe("Logo URL"),favicon:e().max(o).nullable().optional().describe("Favicon URL"),ogImage:e().max(o).nullable().optional().describe("OG image URL"),fonts:n({heading:e().max(o).optional().describe("Font family for headings"),body:e().max(o).optional().describe("Font family for body text"),code:e().max(o).optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:n({primary:e().max(o).optional().describe("Primary brand color (hex)"),secondary:e().max(o).optional().describe("Secondary brand color (hex)"),accent:e().max(o).optional().describe("Accent / highlight color (hex)"),background:e().max(o).optional().describe("Background color (hex)"),foreground:e().max(o).optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:p(d(e(),h())).max(f).nullable().optional().refine(a=>a==null||JSON.stringify(a).length<=l,{message:`images must serialize to at most ${l} bytes`}).describe("Brand images"),metadata:d(e(),h()).nullable().optional().refine(a=>a==null||JSON.stringify(a).length<=l,{message:`metadata must serialize to at most ${l} bytes`}).describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:t().optional().describe("Whether this is the default brand for the organization")});export{u as D,v as G,x as O,y as S,A as a,b,w as o};
@@ -1 +1 @@
1
- import{r as d,bm as T,bq as ce,j as b,bo as _,bF as ae,dc as O,bp as C,bz as P,bu as ie,c as F,l as $}from"./index-CdxHQZta.js";import{e as de}from"./select-BgBtUQbR.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[A,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),v=T(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=T(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,A]=d.useState(null),Y=T(e,v=>A(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function W(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(v))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=T(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(B,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
1
+ import{r as d,bm as T,bq as ce,j as b,bo as _,bF as ae,dc as O,bp as C,bz as P,bu as ie,c as F,l as $}from"./index-D2dTzz5J.js";import{e as de}from"./select-DNyFjSYg.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[A,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),v=T(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=T(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,A]=d.useState(null),Y=T(e,v=>A(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function W(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(v))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=T(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(B,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
@@ -1 +1 @@
1
- import{c as b,l as w,j as a,h as j}from"./index-CdxHQZta.js";import{i as v}from"./SearchMd-kP-wMwgH.js";function k(f){const e=b.c(17),{value:l,onChange:c,placeholder:m,onKeyDown:u,className:d,isSearching:p,disabled:r}=f,x=m===void 0?"Search...":m,h=r&&"pointer-events-none opacity-50";let t;e[0]!==d||e[1]!==h?(t=w("flex items-center gap-4 rounded-lg bg-[var(--studio-input-background)] px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",h,d),e[0]=d,e[1]=h,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{className:"size-4 text-muted-foreground/75 shrink-0"}):a.jsx(v,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=g=>c(g.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==r||e[8]!==u||e[9]!==x||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:u,placeholder:x,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=r,e[8]=u,e[9]=x,e[10]=s,e[11]=l,e[12]=o):o=e[12];let i;return e[13]!==t||e[14]!==n||e[15]!==o?(i=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=i):i=e[16],i}export{k as S};
1
+ import{c as b,l as w,j as a,h as j}from"./index-D2dTzz5J.js";import{i as v}from"./SearchMd-CKY0v7Vy.js";function k(f){const e=b.c(17),{value:l,onChange:c,placeholder:m,onKeyDown:u,className:d,isSearching:p,disabled:r}=f,x=m===void 0?"Search...":m,h=r&&"pointer-events-none opacity-50";let t;e[0]!==d||e[1]!==h?(t=w("flex items-center gap-4 rounded-lg bg-[var(--studio-input-background)] px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",h,d),e[0]=d,e[1]=h,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{className:"size-4 text-muted-foreground/75 shrink-0"}):a.jsx(v,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=g=>c(g.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==r||e[8]!==u||e[9]!==x||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:u,placeholder:x,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=r,e[8]=u,e[9]=x,e[10]=s,e[11]=l,e[12]=o):o=e[12];let i;return e[13]!==t||e[14]!==n||e[15]!==o?(i=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=i):i=e[16],i}export{k as S};
@@ -1 +1 @@
1
- import{c as K,r as C,l as B,j as a}from"./index-CdxHQZta.js";import{i as I}from"./SearchMd-kP-wMwgH.js";import{i as M}from"./X-BuNT_jX4.js";import{I as O}from"./icon-button-DSeFHn8f.js";function H(S){const e=K.c(34),{value:t,onChange:s,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,y=F===void 0?"Clear search":F,[L,p]=C.useState(t!==""),[R,z]=C.useState(!1),[V,$]=C.useState(t);if(t!==V&&($(t),t===""&&!R&&p(!1)),!L&&!o){let l,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>p(!0),g=a.jsx(I,{}),e[0]=l,e[1]=g):(l=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"secondary",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const _=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==_?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground card-shadow",_,j),e[4]=j,e[5]=_,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(I,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const k=!o;let r;e[8]!==s?(r=l=>s(l.target.value),e[8]=s,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>z(!0),e[10]=h):h=e[10];let i;e[11]!==t?(i=()=>{z(!1),t===""&&p(!1)},e[11]=t,e[12]=i):i=e[12];let c;e[13]!==s?(c=l=>{l.key==="Escape"&&s("")},e[13]=s,e[14]=c):c=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=B("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==i||e[19]!==c||e[20]!==f||e[21]!==k||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:k,value:t,onChange:r,onFocus:h,onBlur:i,onKeyDown:c,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=i,e[19]=c,e[20]=f,e[21]=k,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==y||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":y,onMouseDown:P,onClick:()=>{s(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=y,e[26]=o,e[27]=s,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{H as S};
1
+ import{c as K,r as C,l as B,j as a}from"./index-D2dTzz5J.js";import{i as I}from"./SearchMd-CKY0v7Vy.js";import{i as M}from"./X-Cul5rSgm.js";import{I as O}from"./icon-button-D7NextCX.js";function H(S){const e=K.c(34),{value:t,onChange:s,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,y=F===void 0?"Clear search":F,[L,p]=C.useState(t!==""),[R,z]=C.useState(!1),[V,$]=C.useState(t);if(t!==V&&($(t),t===""&&!R&&p(!1)),!L&&!o){let l,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>p(!0),g=a.jsx(I,{}),e[0]=l,e[1]=g):(l=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"secondary",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const _=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==_?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground card-shadow",_,j),e[4]=j,e[5]=_,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(I,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const k=!o;let r;e[8]!==s?(r=l=>s(l.target.value),e[8]=s,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>z(!0),e[10]=h):h=e[10];let i;e[11]!==t?(i=()=>{z(!1),t===""&&p(!1)},e[11]=t,e[12]=i):i=e[12];let c;e[13]!==s?(c=l=>{l.key==="Escape"&&s("")},e[13]=s,e[14]=c):c=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=B("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==i||e[19]!==c||e[20]!==f||e[21]!==k||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:k,value:t,onChange:r,onFocus:h,onBlur:i,onKeyDown:c,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=i,e[19]=c,e[20]=f,e[21]=k,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==y||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":y,onMouseDown:P,onClick:()=>{s(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=y,e[26]=o,e[27]=s,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{H as S};
@@ -1 +1 @@
1
- import{c as x,b as d,j as l}from"./index-CdxHQZta.js";import{s as j}from"./User01-jJA28_tq.js";import{t as E}from"./Users01-eyKYd8Cn.js";const b=/^[A-Za-z0-9_.-]+$/;function h(u){const e=x.c(15),{field:p,secretById:t}=u,s=d(),n=p.value||"";if(!n)return null;let a;e[0]!==n||e[1]!==t?(a=t.get(n),e[0]=n,e[1]=t,e[2]=a):a=e[2];const c=a;if(!c){let i;e[3]!==n||e[4]!==s?(i=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=i):i=e[5];let f;return e[6]!==i?(f=l.jsx("span",{className:"text-destructive",children:i}),e[6]=i,e[7]=f):f=e[7],f}let o;e[8]!==c.scope?(o=l.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=l.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=l.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(u){const e=x.c(2),{scope:p}=u,t=p==="user"?j:E;let s;return e[0]!==t?(s=l.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{h as S,b as a,N as b};
1
+ import{c as x,b as d,j as l}from"./index-D2dTzz5J.js";import{s as j}from"./User01-d9Z_uT9d.js";import{t as E}from"./Users01-CNmS3Xkr.js";const b=/^[A-Za-z0-9_.-]+$/;function h(u){const e=x.c(15),{field:p,secretById:t}=u,s=d(),n=p.value||"";if(!n)return null;let a;e[0]!==n||e[1]!==t?(a=t.get(n),e[0]=n,e[1]=t,e[2]=a):a=e[2];const c=a;if(!c){let i;e[3]!==n||e[4]!==s?(i=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=i):i=e[5];let f;return e[6]!==i?(f=l.jsx("span",{className:"text-destructive",children:i}),e[6]=i,e[7]=f):f=e[7],f}let o;e[8]!==c.scope?(o=l.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=l.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=l.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(u){const e=x.c(2),{scope:p}=u,t=p==="user"?j:E;let s;return e[0]!==t?(s=l.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{h as S,b as a,N as b};
@@ -1 +1 @@
1
- import{c as j,b as y,j as s,n as C,fn as $,E as F,r as N,aS as L,B as D,a6 as E,t as _}from"./index-CdxHQZta.js";import{i as O}from"./AlertCircle-nGDYftVI.js";import{s as B}from"./Plus-DB4FI3R3.js";import{s as A}from"./User01-jJA28_tq.js";import{t as R}from"./Users01-eyKYd8Cn.js";import{D as I,b as q,c as V,d as H,h as G,e as J}from"./dialog-DJN6MVgM.js";import{I as z}from"./input-DYp-O8Zf.js";import{L as w}from"./label-CyxA9Tlc.js";import{S as K,b as M,a as Q,d as U,c as P}from"./select-BgBtUQbR.js";import{T as W}from"./textarea-BgjIoA0a.js";import{u as X,a as Y}from"./use-secrets-Dh7U4HYj.js";import{R as Z}from"./require-capability-jw-5LosR.js";import"./X-BuNT_jX4.js";import"./index-BKE4AJl4.js";import"./Check-DdiNmh3G.js";import"./ChevronUp-RZ9D15nf.js";import"./access-gate-BiuCzoWU.js";import"./capability-load-error-BXP4fPem.js";function ee(t){const e=j.c(6),{error:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(O,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let a;return e[4]!==n?(a=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=a):a=e[5],a}function te(t){const e=j.c(8),{scope:r}=t,i=y(),c=r==="user"?A:R;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const a=n;let l;e[3]!==c?(l=s.jsx(c,{size:12}),e[3]=c,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[l,a]}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function T(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(E,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(te,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let a;e[5]!==c||e[6]!==n?(a=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=a):a=e[7];let l;e[8]!==r.description?(l=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=l):l=e[9];let o;e[10]!==a||e[11]!==l?(o=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[a,l]})]}),e[10]=a,e[11]=l,e[12]=o):o=e[12];let d;e[13]!==r.createdAt?(d=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=d):d=e[14];let m;e[15]!==d?(m=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=m):m=e[16];let x;return e[17]!==o||e[18]!==m?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[o,m]}),e[17]=o,e[18]=m,e[19]=x):x=e[19],x}function se(t){const e=j.c(15),{action:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(E,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let a;e[3]!==n?(a=s.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=a):a=e[4];let l;e[5]!==i?(l=i("settings.secrets.emptyDescription"),e[5]=i,e[6]=l):l=e[6];let o;e[7]!==l?(o=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:l}),e[7]=l,e[8]=o):o=e[8];let d;e[9]!==a||e[10]!==o?(d=s.jsxs("div",{children:[a,o]}),e[9]=a,e[10]=o,e[11]=d):d=e[11];let m;return e[12]!==r||e[13]!==d?(m=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,d,r]}),e[12]=r,e[13]=d,e[14]=m):m=e[14],m}function k({open:t,onOpenChange:e}){const r=y(),[i,c]=N.useState("organization"),[n,a]=N.useState(""),[l,o]=N.useState(""),[d,m]=N.useState(""),x=Y();function g(){c("organization"),a(""),o(""),m("")}function p(){g(),e(!1)}async function b(u){if(u.preventDefault(),!(!n.trim()||!l))try{await x.mutateAsync({scope:i,name:n.trim(),value:l,description:d.trim()||void 0}),_.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){_.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(I,{open:t,onOpenChange:u=>{u?e(u):p()},children:s.jsxs(q,{className:"sm:max-w-lg",children:[s.jsxs(V,{children:[s.jsx(H,{children:r("settings.secrets.newSecretTitle")}),s.jsx(G,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:b,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(K,{value:i,onValueChange:u=>c(u),children:[s.jsx(M,{id:"secret-scope",children:s.jsx(Q,{})}),s.jsxs(U,{children:[s.jsx(P,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(P,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(z,{id:"secret-name",value:n,onChange:u=>a(u.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(z,{id:"secret-value",type:"password",value:l,onChange:u=>o(u.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(W,{id:"secret-description",value:d,onChange:u=>m(u.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(J,{children:[s.jsx(D,{type:"button",variant:"outline",onClick:p,disabled:x.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(D,{type:"submit",disabled:x.isPending||!n.trim()||!l,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function re(){const t=j.c(34),e=y(),r=X(),[i,c]=N.useState(!1);let n,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),a=s.jsx(B,{size:14}),t[0]=n,t[1]=a):(n=t[0],a=t[1]);let l;t[2]!==e?(l=e("settings.secrets.newSecret"),t[2]=e,t[3]=l):l=t[3];let o;t[4]!==l?(o=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[a,l]})}),t[4]=l,t[5]=o):o=t[5];const d=o;if(r.length===0){let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(se,{action:!1}),t[6]=u):u=t[6];let f;t[7]!==i?(f=s.jsx(k,{open:i,onOpenChange:c}),t[7]=i,t[8]=f):f=t[8];let h;return t[9]!==d||t[10]!==f?(h=s.jsxs(s.Fragment,{children:[d,u,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let m,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const u=r.filter(le),f=r.filter(ce),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let S;t[18]!==r.length||t[19]!==e||t[20]!==h?(S=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=S):S=t[21];let v;t[22]!==S?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),t[22]=S,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(m=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=m):m=t[26],x=u.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:u.map(ie)})]}):null,g=f.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:f.map(ne)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=m,t[16]=x,t[17]=g}else m=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(k,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let b;return t[29]!==m||t[30]!==x||t[31]!==g||t[32]!==p?(b=s.jsxs(s.Fragment,{children:[m,x,g,p]}),t[29]=m,t[30]=x,t[31]=g,t[32]=p,t[33]=b):b=t[33],b}function ne(t){return s.jsx(T,{secret:t},t.id)}function ie(t){return s.jsx(T,{secret:t},t.id)}function ce(t){return t.scope==="user"}function le(t){return t.scope==="organization"}function ae(){const t=j.c(7),e=y();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(F,{fallback:oe,children:s.jsx(N.Suspense,{fallback:s.jsx(L,{className:"h-32 w-full"}),children:s.jsx(re,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Container,{children:s.jsxs($,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function oe(t){const{error:e}=t;return s.jsx(ee,{error:e??new Error("Failed to load secrets")})}function ze(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Z,{capability:"secrets:manage",area:"secrets",children:s.jsx(ae,{})}),t[0]=e):e=t[0],e}export{ze as default};
1
+ import{c as j,b as y,j as s,n as C,fn as $,E as F,r as N,aS as L,B as D,a6 as E,t as _}from"./index-D2dTzz5J.js";import{i as O}from"./AlertCircle-DXLs2YfX.js";import{s as B}from"./Plus-kevaXo9o.js";import{s as A}from"./User01-d9Z_uT9d.js";import{t as R}from"./Users01-CNmS3Xkr.js";import{D as I,b as q,c as V,d as H,h as G,e as J}from"./dialog-BSl2AX4W.js";import{I as z}from"./input-CcOKxxNa.js";import{L as w}from"./label-Vx4RXl56.js";import{S as K,b as M,a as Q,d as U,c as P}from"./select-DNyFjSYg.js";import{T as W}from"./textarea-PVngK0Di.js";import{u as X,a as Y}from"./use-secrets-CFvn68u4.js";import{R as Z}from"./require-capability-BOLN4wlq.js";import"./X-Cul5rSgm.js";import"./index-BPJC_Lsm.js";import"./Check-BbEloZu1.js";import"./ChevronUp-D3ChNhrQ.js";import"./access-gate-Cxb2F7oE.js";import"./capability-load-error-Ss9c_27I.js";function ee(t){const e=j.c(6),{error:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(O,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let a;return e[4]!==n?(a=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=a):a=e[5],a}function te(t){const e=j.c(8),{scope:r}=t,i=y(),c=r==="user"?A:R;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const a=n;let l;e[3]!==c?(l=s.jsx(c,{size:12}),e[3]=c,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[l,a]}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function T(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(E,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(te,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let a;e[5]!==c||e[6]!==n?(a=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=a):a=e[7];let l;e[8]!==r.description?(l=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=l):l=e[9];let o;e[10]!==a||e[11]!==l?(o=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[a,l]})]}),e[10]=a,e[11]=l,e[12]=o):o=e[12];let d;e[13]!==r.createdAt?(d=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=d):d=e[14];let m;e[15]!==d?(m=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=m):m=e[16];let x;return e[17]!==o||e[18]!==m?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[o,m]}),e[17]=o,e[18]=m,e[19]=x):x=e[19],x}function se(t){const e=j.c(15),{action:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(E,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let a;e[3]!==n?(a=s.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=a):a=e[4];let l;e[5]!==i?(l=i("settings.secrets.emptyDescription"),e[5]=i,e[6]=l):l=e[6];let o;e[7]!==l?(o=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:l}),e[7]=l,e[8]=o):o=e[8];let d;e[9]!==a||e[10]!==o?(d=s.jsxs("div",{children:[a,o]}),e[9]=a,e[10]=o,e[11]=d):d=e[11];let m;return e[12]!==r||e[13]!==d?(m=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,d,r]}),e[12]=r,e[13]=d,e[14]=m):m=e[14],m}function k({open:t,onOpenChange:e}){const r=y(),[i,c]=N.useState("organization"),[n,a]=N.useState(""),[l,o]=N.useState(""),[d,m]=N.useState(""),x=Y();function g(){c("organization"),a(""),o(""),m("")}function p(){g(),e(!1)}async function b(u){if(u.preventDefault(),!(!n.trim()||!l))try{await x.mutateAsync({scope:i,name:n.trim(),value:l,description:d.trim()||void 0}),_.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){_.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(I,{open:t,onOpenChange:u=>{u?e(u):p()},children:s.jsxs(q,{className:"sm:max-w-lg",children:[s.jsxs(V,{children:[s.jsx(H,{children:r("settings.secrets.newSecretTitle")}),s.jsx(G,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:b,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(K,{value:i,onValueChange:u=>c(u),children:[s.jsx(M,{id:"secret-scope",children:s.jsx(Q,{})}),s.jsxs(U,{children:[s.jsx(P,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(P,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(z,{id:"secret-name",value:n,onChange:u=>a(u.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(z,{id:"secret-value",type:"password",value:l,onChange:u=>o(u.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(W,{id:"secret-description",value:d,onChange:u=>m(u.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(J,{children:[s.jsx(D,{type:"button",variant:"outline",onClick:p,disabled:x.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(D,{type:"submit",disabled:x.isPending||!n.trim()||!l,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function re(){const t=j.c(34),e=y(),r=X(),[i,c]=N.useState(!1);let n,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),a=s.jsx(B,{size:14}),t[0]=n,t[1]=a):(n=t[0],a=t[1]);let l;t[2]!==e?(l=e("settings.secrets.newSecret"),t[2]=e,t[3]=l):l=t[3];let o;t[4]!==l?(o=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[a,l]})}),t[4]=l,t[5]=o):o=t[5];const d=o;if(r.length===0){let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(se,{action:!1}),t[6]=u):u=t[6];let f;t[7]!==i?(f=s.jsx(k,{open:i,onOpenChange:c}),t[7]=i,t[8]=f):f=t[8];let h;return t[9]!==d||t[10]!==f?(h=s.jsxs(s.Fragment,{children:[d,u,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let m,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const u=r.filter(le),f=r.filter(ce),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let S;t[18]!==r.length||t[19]!==e||t[20]!==h?(S=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=S):S=t[21];let v;t[22]!==S?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),t[22]=S,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(m=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=m):m=t[26],x=u.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:u.map(ie)})]}):null,g=f.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:f.map(ne)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=m,t[16]=x,t[17]=g}else m=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(k,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let b;return t[29]!==m||t[30]!==x||t[31]!==g||t[32]!==p?(b=s.jsxs(s.Fragment,{children:[m,x,g,p]}),t[29]=m,t[30]=x,t[31]=g,t[32]=p,t[33]=b):b=t[33],b}function ne(t){return s.jsx(T,{secret:t},t.id)}function ie(t){return s.jsx(T,{secret:t},t.id)}function ce(t){return t.scope==="user"}function le(t){return t.scope==="organization"}function ae(){const t=j.c(7),e=y();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(F,{fallback:oe,children:s.jsx(N.Suspense,{fallback:s.jsx(L,{className:"h-32 w-full"}),children:s.jsx(re,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Container,{children:s.jsxs($,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function oe(t){const{error:e}=t;return s.jsx(ee,{error:e??new Error("Failed to load secrets")})}function ze(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Z,{capability:"secrets:manage",area:"secrets",children:s.jsx(ae,{})}),t[0]=e):e=t[0],e}export{ze as default};