decocms 4.587.0 → 4.587.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-D_6mZhd3.js → AlertCircle-gyZP8TIO.js} +1 -1
- package/dist/client/assets/{AreaChart-DQSuG1yE.js → AreaChart-BmP0ImmP.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DjgSByoQ.js → ArrowLeft-BSzt3fBA.js} +1 -1
- package/dist/client/assets/{ArrowRight-Du-vqw_x.js → ArrowRight-BF8V67fk.js} +1 -1
- package/dist/client/assets/{ArrowUp-Hd6A0uf9.js → ArrowUp-DYnF34lU.js} +1 -1
- package/dist/client/assets/{BookOpen01-gL1m_4-g.js → BookOpen01-CpYcxx0H.js} +1 -1
- package/dist/client/assets/{CartesianChart-ghS8jWki.js → CartesianChart-Cflx4Yj4.js} +1 -1
- package/dist/client/assets/{CategoricalChart-FLgBKuSu.js → CategoricalChart-CIY6jBUR.js} +1 -1
- package/dist/client/assets/{CheckCircle-12UwMq4H.js → CheckCircle-CyybvOiK.js} +1 -1
- package/dist/client/assets/{ChevronDown-DeUpalBN.js → ChevronDown-DldgAfZA.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DO-HHLr6.js → ChevronSelectorVertical-BbGwltuJ.js} +1 -1
- package/dist/client/assets/{ChevronUp-BzeZGyJH.js → ChevronUp-Bt9-G08q.js} +1 -1
- package/dist/client/assets/{CreditCard01-C7IRKQGq.js → CreditCard01-vIJuQM5M.js} +1 -1
- package/dist/client/assets/{Eye-C1-H4NKN.js → Eye-BLpLvSpN.js} +1 -1
- package/dist/client/assets/{File02-CFyU1pAb.js → File02-EV4Uhu5z.js} +1 -1
- package/dist/client/assets/{Globe04-DEUqOfwK.js → Globe04-DzGa73Hy.js} +1 -1
- package/dist/client/assets/{Image01-D1EDWKnx.js → Image01-BqCHFUEp.js} +1 -1
- package/dist/client/assets/{Key01-tELScC1h.js → Key01-KTk95wIy.js} +1 -1
- package/dist/client/assets/{LayoutLeft-551J-MO9.js → LayoutLeft-_2SG51dD.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BdgK-qQO.js → LinkBroken01-Br9NMWkB.js} +1 -1
- package/dist/client/assets/{MessageCircle01-DVvYPWC-.js → MessageCircle01-D170V1-p.js} +1 -1
- package/dist/client/assets/{Minus-CwITAxnt.js → Minus-D88-u0DO.js} +1 -1
- package/dist/client/assets/{Monitor01-Cj8V3TAw.js → Monitor01-Df3mZyNU.js} +1 -1
- package/dist/client/assets/{Play-R1uGwJ-1.js → Play-PdUxpWZE.js} +1 -1
- package/dist/client/assets/{Plus-B-S-SZ1j.js → Plus-BYodv7tE.js} +1 -1
- package/dist/client/assets/{ReferenceLine-DFNcBn1Q.js → ReferenceLine-DrwOzdWE.js} +1 -1
- package/dist/client/assets/{SearchMd-BIZLsFUb.js → SearchMd-Cuy8VOOG.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-bCe9ug4u.js → ShoppingBag01-pCIsQ-Jb.js} +1 -1
- package/dist/client/assets/{Sun-DJ9HokSi.js → Sun-BABGQWS8.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DFAhxuil.js → SwitchHorizontal01-Daz2EgW0.js} +1 -1
- package/dist/client/assets/{Tool01-DSm8VUO0.js → Tool01-D6InpKaj.js} +1 -1
- package/dist/client/assets/{Tooltip-DKAhw1l_.js → Tooltip-CP1IpP66.js} +1 -1
- package/dist/client/assets/{Trash01-DmArjRF_.js → Trash01-LecfbxTv.js} +1 -1
- package/dist/client/assets/{TrendUp01-Cb0Ss3qG.js → TrendUp01-C_SySyBC.js} +1 -1
- package/dist/client/assets/{Upload01-C0hxLVoS.js → Upload01-CABY93nl.js} +1 -1
- package/dist/client/assets/{UserCheck01-DoVM7Q3H.js → UserCheck01-Dqn7toBe.js} +1 -1
- package/dist/client/assets/{UserSquare-CeU_BqyG.js → UserSquare-e0qIxN1Q.js} +1 -1
- package/dist/client/assets/{Users01-CxZDOmOJ.js → Users01-UF7lWU9g.js} +1 -1
- package/dist/client/assets/{XClose-lVRJTaql.js → XClose-C9ONGfkv.js} +1 -1
- package/dist/client/assets/{Zap-Cnh7YlUV.js → Zap-D-fE_V4E.js} +1 -1
- package/dist/client/assets/{access-gate-wCyQtv5A.js → access-gate-EJXICSzm.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-sOS8LW6V.js → add-connection-dialog-CEukHWSz.js} +1 -1
- package/dist/client/assets/agent-app-CPNngTIj.js +1 -0
- package/dist/client/assets/agent-assets-IEsYbqYf.js +1 -0
- package/dist/client/assets/{agent-automation-DxylbM6B.js → agent-automation-iOzcLbza.js} +2 -2
- package/dist/client/assets/agent-automations-COHiMRwL.js +1 -0
- package/dist/client/assets/agent-blog-ClTYnrpA.js +2 -0
- package/dist/client/assets/agent-blog-post-BieKo5sU.js +2 -0
- package/dist/client/assets/agent-calendar-DrN9hKs4.js +1 -0
- package/dist/client/assets/{agent-capabilities-DFVJwxaH.js → agent-capabilities-g1Ym1ZNZ.js} +1 -1
- package/dist/client/assets/agent-connect-sources-CZgCtVaH.js +1 -0
- package/dist/client/assets/agent-deck-C63CWfE0.js +1 -0
- package/dist/client/assets/agent-e2e-OCkFxgz-.js +1 -0
- package/dist/client/assets/agent-experiments-BZeZuSr2.js +1 -0
- package/dist/client/assets/agent-file-BS83qFDk.js +1 -0
- package/dist/client/assets/agent-hosting-DnFnd1YM.js +1 -0
- package/dist/client/assets/agent-icon-CfdcYUE7.js +1 -0
- package/dist/client/assets/agent-library-B6Vv6L3Y.js +1 -0
- package/dist/client/assets/agent-library-file-CVP6ClM5.js +1 -0
- package/dist/client/assets/agent-overview-C3EtX-Ab.js +1 -0
- package/dist/client/assets/{agent-releases-JJOjPP8D.js → agent-releases-AtVL__p1.js} +2 -2
- package/dist/client/assets/agent-settings-CEIvC9PJ.js +1 -0
- package/dist/client/assets/agent-site-editor-code-CP-GqZR-.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BmdLBDYW.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-_kq8Kx6K.js +1 -0
- package/dist/client/assets/{agent-site-editor-B1-p5Hbd.js → agent-site-editor-x-mpZE5Q.js} +2 -2
- package/dist/client/assets/agent-view-Ch4mKCK3.js +1 -0
- package/dist/client/assets/{agent-view-guard-Dp1jnrh9.js → agent-view-guard-DLjVinhc.js} +1 -1
- package/dist/client/assets/{ai-providers-DhIAtcli.js → ai-providers-DVYif0Pc.js} +1 -1
- package/dist/client/assets/{alert-D8-tLSOF.js → alert-CvRyYnph.js} +1 -1
- package/dist/client/assets/{analytics-sections-CMaRh5vg.js → analytics-sections-DLx5rbIc.js} +1 -1
- package/dist/client/assets/{api-keys-BYyk36lL.js → api-keys-CC3fBiOG.js} +1 -1
- package/dist/client/assets/api-keys-DW5FUpRL.js +1 -0
- package/dist/client/assets/app-editor-D_fd99pv.js +1 -0
- package/dist/client/assets/{asset-utils-DZv-FEec.js → asset-utils-CTFQl8QO.js} +1 -1
- package/dist/client/assets/{auth-catchall-kXXiTe4J.js → auth-catchall-n3aaYtq8.js} +1 -1
- package/dist/client/assets/auth-entry-DIN9lopt.js +1 -0
- package/dist/client/assets/{auth-split-layout-CHsrc83a.js → auth-split-layout-C3JVxF8x.js} +1 -1
- package/dist/client/assets/{auth-CTQZGBnP.js → auth-vqpzzu5D.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D44eIeUD.js → authenticate-and-persist-oauth-Bblph2Da.js} +1 -1
- package/dist/client/assets/{automation-list-row-PeCAvjmp.js → automation-list-row-Bz8m8BYO.js} +1 -1
- package/dist/client/assets/{automation-runs-BUHEghGv.js → automation-runs-osLD86WP.js} +1 -1
- package/dist/client/assets/automations-BVdNqAsv.js +1 -0
- package/dist/client/assets/{badge-CXWhQd3j.js → badge-DCIHIkLr.js} +1 -1
- package/dist/client/assets/{block-document-CGeTYWv-.js → block-document-Dbx69UMn.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Dpk4HnW-.js → blocks-preview-workspace-context-CK2OXCcd.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CFYo4clt.js → blocks-tab-states-DeaA94XX.js} +1 -1
- package/dist/client/assets/{blog-preview-url-Dnn3CdoH.js → blog-preview-url-58BZuQLd.js} +1 -1
- package/dist/client/assets/{blog-schema-DciG3sv2.js → blog-schema-DfhHwBev.js} +1 -1
- package/dist/client/assets/{blog-source-gate-DxXfL9t9.js → blog-source-gate-CCV8MP-i.js} +1 -1
- package/dist/client/assets/{blog-view-gate-DwmbI_7t.js → blog-view-gate-o9mn9sNx.js} +1 -1
- package/dist/client/assets/{buckets-Dn5vUsy9.js → buckets-RrYuA5vR.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CCMSIskc.js → build-improve-prompt-doc-fsuyBe8R.js} +1 -1
- package/dist/client/assets/{calendar-C8iDoCnd.js → calendar-BbIAhjX6.js} +1 -1
- package/dist/client/assets/{capability-load-error-DGMDILUu.js → capability-load-error-C937GiKP.js} +1 -1
- package/dist/client/assets/category-editor-BgCEgg9r.js +1 -0
- package/dist/client/assets/{category-tree-CoKnKzyW.js → category-tree-yoWo8LKT.js} +1 -1
- package/dist/client/assets/{chart-CxNNAoSv.js → chart-R5Gu29E6.js} +1 -1
- package/dist/client/assets/{chat-context-Bo7uj7QO.js → chat-context-DSu9o-d-.js} +1 -1
- package/dist/client/assets/{chat-draft-1n081f6C.js → chat-draft-BHCxr31Y.js} +1 -1
- package/dist/client/assets/{checkbox-CouJku1L.js → checkbox-D4P_L8j1.js} +1 -1
- package/dist/client/assets/choose-editor-DFX28kMs.js +1 -0
- package/dist/client/assets/{cli-auth-success-XgEBlx4y.js → cli-auth-success-DGIBfDO7.js} +1 -1
- package/dist/client/assets/cms-settings-editor-1icUX_7B.js +1 -0
- package/dist/client/assets/{cms-store-drafts-aK3C7NIN.js → cms-store-drafts-pPAksstG.js} +1 -1
- package/dist/client/assets/{collapsible-BQXIF7yl.js → collapsible-BJX4Hk9k.js} +1 -1
- package/dist/client/assets/collection-detail-Cnr4TuBK.js +1 -0
- package/dist/client/assets/{collection-display-button-rcoJHzLM.js → collection-display-button-C2JNt8jM.js} +1 -1
- package/dist/client/assets/{collection-search-DHGaqJoX.js → collection-search-DIaYviRG.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-nEvFtZNu.js → collection-table-wrapper-DisSN_Gv.js} +1 -1
- package/dist/client/assets/{collection-tabs-DyPYpvut.js → collection-tabs-CxgBigfA.js} +1 -1
- package/dist/client/assets/{combobox-5tUoYNvN.js → combobox-BCPDPSll.js} +1 -1
- package/dist/client/assets/{command-XtwrY353.js → command-DsEpQe7b.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BIxpu0CV.js → companion-mcps-section-CVk0MHqs.js} +1 -1
- package/dist/client/assets/{config-B-dLgcud.js → config-iR6MS3mx.js} +1 -1
- package/dist/client/assets/{connect-IzhjVKIX.js → connect-BJ6zbvIe.js} +3 -3
- package/dist/client/assets/{connect-key-Djf6OdTt.js → connect-key-R6CnqQKc.js} +1 -1
- package/dist/client/assets/{connect-layout-BLFE1r8J.js → connect-layout-CWTX0XxP.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-K-oLzdRz.js → connect-source-dialog-DS1_5d5l.js} +1 -1
- package/dist/client/assets/{connection-CVYLa59l.js → connection-Daz_MJgN.js} +1 -1
- package/dist/client/assets/{connection-card-DrE2nEQK.js → connection-card-BEkW2Rzt.js} +1 -1
- package/dist/client/assets/connection-detail-WE10lVgN.js +1 -0
- package/dist/client/assets/{connection-form-helpers-ws_4888d.js → connection-form-helpers-BZyz8LC0.js} +1 -1
- package/dist/client/assets/{connection-slug-BnP-Wula.js → connection-slug-CvvLfpvw.js} +1 -1
- package/dist/client/assets/connections-8XSaqT9l.js +1 -0
- package/dist/client/assets/{content-tab-DLB2Uvie.js → content-tab-C66XjEbc.js} +3 -3
- package/dist/client/assets/context-DW5quhGR.js +1 -0
- package/dist/client/assets/{context-menu-OGQDG2f-.js → context-menu-Dc1eMRQk.js} +1 -1
- package/dist/client/assets/{context-shell-B2TiiX4o.js → context-shell-CnWm8Iac.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-C58t7dGd.js → create-organization-dialog-BditzGYJ.js} +1 -1
- package/dist/client/assets/{daily-pulse-C-8Ge7Gb.js → daily-pulse-CCUis9lD.js} +1 -1
- package/dist/client/assets/{delete-copy-DsDE5E3R.js → delete-copy-B8O2OJ6R.js} +1 -1
- package/dist/client/assets/{device-hint-Cw9A4RTs.js → device-hint-C-aumrOZ.js} +1 -1
- package/dist/client/assets/{discover-Dt0njfXu.js → discover-Dbo6G7J-.js} +1 -1
- package/dist/client/assets/{domain-settings-DcqOrcxN.js → domain-settings-D_KZc6yt.js} +1 -1
- package/dist/client/assets/{drawer-DDCMGagW.js → drawer-Ckz_nyBH.js} +1 -1
- package/dist/client/assets/{editor-CIB3F1gV.js → editor-Dv1qkRGx.js} +1 -1
- package/dist/client/assets/{editor-classes-CLvZguOr.js → editor-classes-Bm1swfOR.js} +1 -1
- package/dist/client/assets/{empty-message-C5kN-FsM.js → empty-message-Cs32P_FY.js} +1 -1
- package/dist/client/assets/{empty-state-BwwrJHKq.js → empty-state-DGaA5_7F.js} +1 -1
- package/dist/client/assets/{empty-state-CiMt55-l.js → empty-state-DvK349M1.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-HOP6qrjW.js → experiments-tab-choice-pZXd8Qq7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BB3HY3pL.js → extract-connection-data-DyZVXRSl.js} +1 -1
- package/dist/client/assets/{feature-gate-DzJ2Wgrv.js → feature-gate-Q3XqEiLe.js} +1 -1
- package/dist/client/assets/{feature-paywall-D3CjJHet.js → feature-paywall-DLrDt0zj.js} +1 -1
- package/dist/client/assets/file-explorer-DTnrhmiM.js +2 -0
- package/dist/client/assets/{file-preview-DrQhYw7q.js → file-preview-C3aAzbl2.js} +1 -1
- package/dist/client/assets/{file-share-button-2PZ7snDO.js → file-share-button-DchUqnxv.js} +1 -1
- package/dist/client/assets/{file-type-icon-CfPI0k5H.js → file-type-icon-C1PmpIi5.js} +1 -1
- package/dist/client/assets/{folder-icon-Cc4PI_dN.js → folder-icon-GDlGVc-z.js} +1 -1
- package/dist/client/assets/{form-DTFwvxGa.js → form-B3cubXs5.js} +1 -1
- package/dist/client/assets/{frame-navigation-C2MkzXfc.js → frame-navigation-CZuPAR0A.js} +1 -1
- package/dist/client/assets/{gateway-client-BWWNWG13.js → gateway-client-DDICMs0d.js} +1 -1
- package/dist/client/assets/{general-B4k9oqH9.js → general-Dm23uhl2.js} +1 -1
- package/dist/client/assets/{github-icon-CAEaNNXe.js → github-icon-lV5tv6c5.js} +1 -1
- package/dist/client/assets/{held-block-view-BoX35XB_.js → held-block-view-KOyRMpy4.js} +1 -1
- package/dist/client/assets/home-Bdn-v4eM.js +1 -0
- package/dist/client/assets/{home-overview-4hB9-fzq.js → home-overview-_jWE4zXs.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DD1fLsOV.js → hosted-reconcile-CxvdumkL.js} +1 -1
- package/dist/client/assets/{icon-button-C7j9rC9Y.js → icon-button-trmtAOaJ.js} +1 -1
- package/dist/client/assets/{index-6wJ9auoQ.js → index-2abaLvjI.js} +1 -1
- package/dist/client/assets/{index-D6K919s-.js → index-3YHObF9S.js} +1 -1
- package/dist/client/assets/{index-BOuugOzr.js → index-BBeGVRdq.js} +1 -1
- package/dist/client/assets/{index-BBzaKaTx.js → index-BBpZPks2.js} +1 -1
- package/dist/client/assets/{index-Cg9MjN_F.js → index-C7CSN06D.js} +1 -1
- package/dist/client/assets/{index-SNBsd1n5.js → index-D7q4YJXJ.js} +1 -1
- package/dist/client/assets/{index-C1rZOaeR.js → index-DAKnsBwp.js} +1 -1
- package/dist/client/assets/{index-Bnvwu25R.js → index-DaFEqiTp.js} +1 -1
- package/dist/client/assets/{index-C3qV_QcY.js → index-DuvX09S7.js} +1 -1
- package/dist/client/assets/{index-x-5-P0v0.js → index-NWJ7p_1D.js} +1 -1
- package/dist/client/assets/{index-BesTIQjb.js → index-PcrdQb7V.js} +1 -1
- package/dist/client/assets/{index-DdVVtGb-.js → index-QCTvcBUO.js} +1 -1
- package/dist/client/assets/{index-DokE5sNF.js → index-_VeebRNE.js} +56 -57
- package/dist/client/assets/{index-DFLWf492.js → index-_m0OQ-gU.js} +2 -2
- package/dist/client/assets/{index-C3kpYdOE.js → index-j-nHo57s.js} +1 -1
- package/dist/client/assets/{index-redirect-B0kETsWy.js → index-redirect-qshgZoiU.js} +1 -1
- package/dist/client/assets/{index-BuF029H4.js → index-wdSinBQm.js} +1 -1
- package/dist/client/assets/{index-96oa6z-q.js → index-ykH_xCiZ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BXbGEZ4N.js → infiniteQueryObserver-D7rUvD7y.js} +1 -1
- package/dist/client/assets/{infra-billing-DV-AbPt9.js → infra-billing-2jNYgPJB.js} +1 -1
- package/dist/client/assets/{input-CfItTA2l.js → input-CdG_yBtw.js} +1 -1
- package/dist/client/assets/{input-BVDv3LEp.js → input-DAVLPdNO.js} +3 -3
- package/dist/client/assets/{integration-icon-CimWL0HB.js → integration-icon-D8pA0JHG.js} +1 -1
- package/dist/client/assets/{item-actions-Be-0vSN9.js → item-actions-0UZvaX_W.js} +1 -1
- package/dist/client/assets/{jira-icon-zbkTgTO3.js → jira-icon-B6n8YNiL.js} +1 -1
- package/dist/client/assets/{label-CELn1y0I.js → label-DZkEI5Ke.js} +1 -1
- package/dist/client/assets/{layout-D8GnCK_t.js → layout-B_eV9tIt.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-Xn47ClHz.js → legacy-admin-welcome-dialog-ZZ1Gngd8.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CfDZP79N.js → legacy-agents-deep-DIO9RwdG.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CXEG-wJ7.js → legacy-main-redirect-MYDZoBC6.js} +1 -1
- package/dist/client/assets/library-BGNgyVkv.js +1 -0
- package/dist/client/assets/{library-tab-B9UPnHBX.js → library-tab-1VGCJxXK.js} +1 -1
- package/dist/client/assets/login-D1CbtJGZ.js +1 -0
- package/dist/client/assets/{markdown-CDaD-85D.js → markdown-CBoNEgkf.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BS-4Ud35.js → mcp-app-renderer-DtOO8I9w.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Celefz8j.js → mcp-oauth-BHOMUKtj.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Cfk6BMjf.js → mcp-oauth-DGxlh_95.js} +1 -1
- package/dist/client/assets/{members-CO93VCFa.js → members-DHWvHq5T.js} +1 -1
- package/dist/client/assets/{memory-BsFUXROk.js → memory-C6q4guqS.js} +2 -2
- package/dist/client/assets/{mock-board-BhdBHUpK.js → mock-board-ltUmj9_y.js} +3 -3
- package/dist/client/assets/{monaco-editor-CnKR4oUp.js → monaco-editor-D-AA2j7y.js} +1 -1
- package/dist/client/assets/{monitoring-CQmjoD8Y.js → monitoring-DaONVMuI.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-D45dscQU.js → monitoring-stats-row-DeZi5P6B.js} +1 -1
- package/dist/client/assets/{multi-select-D0i-_SFY.js → multi-select-DUQRYjic.js} +1 -1
- package/dist/client/assets/{mustache-9EZH88YQ.js → mustache-uZ8plADR.js} +1 -1
- package/dist/client/assets/{named-rule-step-yZefk1L5.js → named-rule-step-DreL1Pcr.js} +1 -1
- package/dist/client/assets/{named-rule-view-BhK3WMdx.js → named-rule-view-DfnvZmuY.js} +1 -1
- package/dist/client/assets/{new-project-dialog-B-GOkKGZ.js → new-project-dialog-B9UZLlxE.js} +1 -1
- package/dist/client/assets/{new-project-store-BPGzwGDe.js → new-project-store-BzLAZn_u.js} +1 -1
- package/dist/client/assets/{oauth-callback-CPdQzJA-.js → oauth-callback-DeF7HKPm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BYHZVJQa.js → oauth-callback-ai-provider-B-Qmx59a.js} +1 -1
- package/dist/client/assets/oauth-consent-CwjN9gES.js +1 -0
- package/dist/client/assets/{onboarding-BQ661qWy.js → onboarding-vgMy4F5g.js} +1 -1
- package/dist/client/assets/openai-conversation-NvZqYcCK.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-D5Qm8FhS.js → optimistic-project-sidebar-views-CBHDKL26.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DqX4nMyS.js → order-monitor-day-Txb2sZ3L.js} +1 -1
- package/dist/client/assets/{organization-choice-DJgWzk8W.js → organization-choice-CP3Mtgeb.js} +1 -1
- package/dist/client/assets/{orgs-CEuotPd0.js → orgs-QZqcYIh_.js} +1 -1
- package/dist/client/assets/{own-accounts-section-BUJ0fKWR.js → own-accounts-section-B-xTQ1qC.js} +1 -1
- package/dist/client/assets/{pair-COq-ZPQq.js → pair-CHh11R95.js} +1 -1
- package/dist/client/assets/{parse-sections-x0Kx4hiT.js → parse-sections-BX1x8Bjk.js} +2 -2
- package/dist/client/assets/{plan-ladder-pqZJNBpW.js → plan-ladder-Boo36Lf_.js} +1 -1
- package/dist/client/assets/{plan-DKc8rH1K.js → plan-qEpUYs_C.js} +1 -1
- package/dist/client/assets/{plan-usage-card-BWKv5Sja.js → plan-usage-card-XvorW2R2.js} +1 -1
- package/dist/client/assets/{popover-BNjsYhzT.js → popover-CsisCWO2.js} +1 -1
- package/dist/client/assets/post-calendar-halP83kx.js +1 -0
- package/dist/client/assets/{post-editor-CCfke5Rf.js → post-editor-S0aVTLKj.js} +2 -2
- package/dist/client/assets/{preview-content-DvWQfE3X.js → preview-content-5ttXljO9.js} +1 -1
- package/dist/client/assets/{preview-dialog-07cwMrWN.js → preview-dialog-BclA8lM_.js} +1 -1
- package/dist/client/assets/{preview-panel-C9bhKF_2.js → preview-panel-DwKqGg2b.js} +1 -1
- package/dist/client/assets/preview-tab-DY0X1Y__.js +557 -0
- package/dist/client/assets/{product-picker-dialog-ChT9yEE7.js → product-picker-dialog-BYy8uc5-.js} +1 -1
- package/dist/client/assets/profile-Bd_H-bJ-.js +1 -0
- package/dist/client/assets/project-app-view-C5QreDU8.js +1 -0
- package/dist/client/assets/{project-apps-BilxhqpE.js → project-apps-Qpq3Yqgk.js} +1 -1
- package/dist/client/assets/{project-icon-DzSzNLot.js → project-icon-CoHnihPF.js} +1 -1
- package/dist/client/assets/{project-index-CR5OwtEu.js → project-index-QHWJWseM.js} +1 -1
- package/dist/client/assets/project-reports-WCcwA84Y.js +1 -0
- package/dist/client/assets/project-tasks-DKIcBGE8.js +1 -0
- package/dist/client/assets/projects-BH3mZwKm.js +1 -0
- package/dist/client/assets/{projects-empty-state-BfmuFuvO.js → projects-empty-state-DUNpLlKl.js} +1 -1
- package/dist/client/assets/{prompts-NPG6oRsv.js → prompts-DYNo1NOe.js} +1 -1
- package/dist/client/assets/record-editor-ruw8hHLO.js +1 -0
- package/dist/client/assets/redirect-editor-9KKRUJjb.js +1 -0
- package/dist/client/assets/reports-C98Nopj0.js +1 -0
- package/dist/client/assets/{reports-CYPX_k6p.js → reports-CIVLWAKU.js} +2 -2
- package/dist/client/assets/reports-onboarding-BvleSDU0.js +1 -0
- package/dist/client/assets/reports-tab-Cpactxak.js +2 -0
- package/dist/client/assets/repositories-BUVT6KWE.js +1 -0
- package/dist/client/assets/{repositories-uWeQw1G7.js → repositories-D3sB2pcK.js} +1 -1
- package/dist/client/assets/{repository-binding-CBLNaLcn.js → repository-binding-Ct6tvS6k.js} +1 -1
- package/dist/client/assets/{repository-picker-CXy0gwnT.js → repository-picker-D7wgGSh_.js} +1 -1
- package/dist/client/assets/{require-capability-_6vPPsFH.js → require-capability-psnJqvDd.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Da-vkWUX.js → required-auth-layout-5KQLVPyY.js} +1 -1
- package/dist/client/assets/{reset-password-BMooX7J1.js → reset-password-CMUJSwol.js} +1 -1
- package/dist/client/assets/{resizable-CFBuzfqY.js → resizable-TldGXL10.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DYcddXtb.js → resolve-tab-icon-Dx984IYY.js} +1 -1
- package/dist/client/assets/{review-settings-lJuLTN9Z.js → review-settings-EAZgwqP6.js} +1 -1
- package/dist/client/assets/{role-color-C2OQmHte.js → role-color-Az77j5-3.js} +1 -1
- package/dist/client/assets/roles-KaJOIApg.js +1 -0
- package/dist/client/assets/route-CLOMEKRN.js +1 -0
- package/dist/client/assets/route-CsFahJR-.js +1 -0
- package/dist/client/assets/route-DwgCQsMA.js +1 -0
- package/dist/client/assets/{route-page-header-9cHtL5F_.js → route-page-header-B8Mmh-Yn.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-C63hYsFx.js → sandbox-git-api-DN6h_KqP.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BBxxjkfA.js → sandbox-lifecycle-context-Ptllc8xw.js} +1 -1
- package/dist/client/assets/{save-status-DSROJg37.js → save-status-DI5XwwX3.js} +1 -1
- package/dist/client/assets/{schema-BsNip7cg.js → schema-Bawh3LAf.js} +1 -1
- package/dist/client/assets/{schema-DFozZ1Hz.js → schema-Cp9WUmjR.js} +1 -1
- package/dist/client/assets/{scroll-area-pLrQCixi.js → scroll-area-EnKfGRfx.js} +1 -1
- package/dist/client/assets/{search-input-C2u6aF8T.js → search-input-JNlnu1vU.js} +1 -1
- package/dist/client/assets/{search-toggle-CrQFK2VP.js → search-toggle-Gczjy-6q.js} +1 -1
- package/dist/client/assets/{secret-picker-Dv9xQHYk.js → secret-picker-DpLLS_i2.js} +1 -1
- package/dist/client/assets/{secrets-DB4lMKjl.js → secrets-BkICoFYK.js} +1 -1
- package/dist/client/assets/{section-array-field-DeyNfEV2.js → section-array-field-DeIFn5hU.js} +1 -1
- package/dist/client/assets/{sections-DOqOQtJh.js → sections-DsIUB3iD.js} +1 -1
- package/dist/client/assets/sections-editor-DQjh_kFR.js +1 -0
- package/dist/client/assets/{select-CKROachj.js → select-QgdI1Rfc.js} +1 -1
- package/dist/client/assets/{select-model-BWtBiL3W.js → select-model-CRyWxfNm.js} +1 -1
- package/dist/client/assets/{seo-editor-DIdnRSzC.js → seo-editor-bIUZHc8M.js} +1 -1
- package/dist/client/assets/{separator-DfXZNxTX.js → separator-BEzt-XQG.js} +1 -1
- package/dist/client/assets/{session-runtime-gzzgn7Pj.js → session-runtime-DLIbUSWD.js} +1 -1
- package/dist/client/assets/settings-tab-DdQCVDpj.js +1 -0
- package/dist/client/assets/{sheet-DUgkYIwI.js → sheet-8iInbf9D.js} +1 -1
- package/dist/client/assets/{shell-layout-4H95PNNw.js → shell-layout-D8UbY9n5.js} +1 -1
- package/dist/client/assets/{site-draft-actions-k_cj-bS_.js → site-draft-actions-BVBEL1BN.js} +1 -1
- package/dist/client/assets/{site-draft-view-LE30E0qM.js → site-draft-view-CU45gg4m.js} +1 -1
- package/dist/client/assets/site-editor-CyPykGup.js +1 -0
- package/dist/client/assets/{site-editor-toast-Ynfp7Kjt.js → site-editor-toast-Cjans_Z7.js} +1 -1
- package/dist/client/assets/skills-CznUJdJq.js +1 -0
- package/dist/client/assets/{slider-Bw577vCx.js → slider-CnikFjRE.js} +1 -1
- package/dist/client/assets/{sortable.esm-CykrOV-3.js → sortable.esm-CW9y-Z65.js} +1 -1
- package/dist/client/assets/{sso-Cj24TaPV.js → sso-BUdWqS9w.js} +1 -1
- package/dist/client/assets/{suggestion-B9R_Jc1V.js → suggestion-gEn2gqrr.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DPyVQnGV.js → super-agent-icon-Dx5Acgbw.js} +1 -1
- package/dist/client/assets/{switch-B_2aZNJw.js → switch-7uXAaerp.js} +1 -1
- package/dist/client/assets/{synced-repos-CXSZMJ0F.js → synced-repos-C29_oiY7.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B4eeZpT6.js → tab-icon-glyph-CgM03OpD.js} +1 -1
- package/dist/client/assets/{table-DsirtjTQ.js → table-drGady29.js} +1 -1
- package/dist/client/assets/{tabs-YBRFhTvN.js → tabs-C9s0KY6N.js} +1 -1
- package/dist/client/assets/{task-board-DK1K-Mbd.js → task-board-CHctJwrW.js} +1 -1
- package/dist/client/assets/{task-key-DZxJr9g6.js → task-key-B6H-3XJr.js} +1 -1
- package/dist/client/assets/{task-route-Cqr8SKPq.js → task-route-CBxVmSL7.js} +1 -1
- package/dist/client/assets/{task-status-bozQW5wT.js → task-status-CRPxL8gs.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CBkUVAdj.js → taskboard-analytics-DMGsXigW.js} +1 -1
- package/dist/client/assets/tasks-Cey8OfRa.js +1 -0
- package/dist/client/assets/{tasks-ALHYjofA.js → tasks-Dmvi9b_Y.js} +1 -1
- package/dist/client/assets/{textarea-BJdJh9he.js → textarea-Cimn1xhl.js} +1 -1
- package/dist/client/assets/thread-analytics-BhURcKi_.js +1 -0
- package/dist/client/assets/{thread-button-DZPQxeV0.js → thread-button-DCHp9tO9.js} +1 -1
- package/dist/client/assets/{thread-intent-GDKuN4r8.js → thread-intent-pC76uPwU.js} +1 -1
- package/dist/client/assets/thread-route-BrFKkVcF.js +1 -0
- package/dist/client/assets/{thread-route-9-m2-1gn.js → thread-route-D_C8d7xK.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-j2UKM_n_.js → thread-sheet-body-DAosbhoz.js} +1 -1
- package/dist/client/assets/{time-range-picker-BUjru-02.js → time-range-picker-9BtbKkzB.js} +1 -1
- package/dist/client/assets/{toggle-group-C134tdMJ.js → toggle-group-n8suP90I.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CxmO1N2o.js → tool-set-selector-DP0UayXg.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-dQBEwFVn.js → toolbar-icon-button-BAHC2wln.js} +1 -1
- package/dist/client/assets/{tooltip-CqEoC-F2.js → tooltip-BYnWhoO-.js} +1 -1
- package/dist/client/assets/{tooltipContext-BdzlPUCu.js → tooltipContext-DqZT6jLi.js} +1 -1
- package/dist/client/assets/{track-Drgb4ZQ6.js → track-BXFPt0jP.js} +1 -1
- package/dist/client/assets/{types-DF2iMJoX.js → types-CdP485rd.js} +1 -1
- package/dist/client/assets/{url-slug-pPnhQQlO.js → url-slug-BkKOqwJh.js} +1 -1
- package/dist/client/assets/{usage-stats-BHc1sfxR.js → usage-stats-CCyq9Zgo.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Khsm6etv.js → use-ai-providers-D6peTC8u.js} +1 -1
- package/dist/client/assets/{use-api-keys-CktIN6Ip.js → use-api-keys-DUVyFEfc.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-BH_mAqzD.js → use-apply-named-rule-D9dIZN02.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DINxvsUX.js +1 -0
- package/dist/client/assets/{use-automations-it-dxpVL.js → use-automations-qL4OMGNt.js} +1 -1
- package/dist/client/assets/{use-autosave-DFZMnBbI.js → use-autosave-DGPPxEGb.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-JOmELUJ6.js +1 -0
- package/dist/client/assets/use-blog-view-DQBrFMuV.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-CyAMAqyg.js → use-chat-layout-state-DMWJLUZv.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-DGbVdkLh.js → use-cms-publish-actions-DuI-swrZ.js} +1 -1
- package/dist/client/assets/{use-connect-companion-C-Jq7bdY.js → use-connect-companion-C9LfjXNg.js} +1 -1
- package/dist/client/assets/{use-connection-BJP9eCiw.js → use-connection-cSaq7_i7.js} +1 -1
- package/dist/client/assets/{use-content-sync-hirvqHbx.js → use-content-sync-DElceZSb.js} +1 -1
- package/dist/client/assets/{use-copy-Bh0jH9rH.js → use-copy-DKfw8n-3.js} +1 -1
- package/dist/client/assets/{use-current-view-xnQlJLn5.js → use-current-view-a6HKOM5X.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D_OgIl71.js → use-date-fns-locale-B_xn4WWe.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BCqW4nkA.js → use-debounced-autosave-Dtb8gA2L.js} +1 -1
- package/dist/client/assets/{use-debounced-value-q_QhUSeI.js → use-debounced-value-BAma3ogA.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DrzaNgs_.js → use-deco-credits-BeQtkXPR.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-TX8jybTQ.js → use-decopilot-events-B0JW1Gtz.js} +1 -1
- package/dist/client/assets/{use-delete-block-BINjsTY1.js → use-delete-block-CUXsAbin.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Ch7Fpvpo.js → use-delete-connection-DNw4luEn.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-h6uBbZPp.js → use-deployment-admin-BENsmKZ2.js} +1 -1
- package/dist/client/assets/{use-entitlements-B_976V5P.js → use-entitlements-B6kax2f9.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CQuFD5Lq.js → use-fast-preview-draft-url-fo8VZAME.js} +1 -1
- package/dist/client/assets/{use-file-configs-iPUyCrpd.js → use-file-configs-aENtp_va.js} +1 -1
- package/dist/client/assets/{use-id-selection-DnYJXQwW.js → use-id-selection-DZH3hNJe.js} +1 -1
- package/dist/client/assets/{use-in-settings-DvVa8LTW.js → use-in-settings-jNNDWh86.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-C2oj6HbE.js → use-inbox-feed-Axr6Wlqz.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BcBSkfyb.js → use-infinite-scroll-DjPaD0kN.js} +1 -1
- package/dist/client/assets/{use-join-requests-D2xu_Ec9.js → use-join-requests-WKQMf9yH.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-PrqkAqrJ.js → use-main-panel-tabs-DFx6VsI6.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CVLoS2DG.js → use-mcp-auth-status-CCXu_Vmb.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DVaNUeKZ.js → use-mcp-client-UP8_tZ9p.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-mR07NyXv.js → use-mcp-prompts-BM9uSers.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DAzNJiwR.js → use-mcp-tools-mA41mojn.js} +1 -1
- package/dist/client/assets/{use-mobile-YQVdSq9V.js → use-mobile-FS1bh43h.js} +1 -1
- package/dist/client/assets/{use-move-blocks-B5nRM-da.js → use-move-blocks-DAGy4lk4.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-O2aekGtL.js → use-navigate-to-agent-Dg2qYHJi.js} +1 -1
- package/dist/client/assets/{use-never-published-WdNVjWmr.js → use-never-published-DDbQ0Vt8.js} +1 -1
- package/dist/client/assets/{use-org-fs-DcqFgCaV.js → use-org-fs-DbTl86_J.js} +1 -1
- package/dist/client/assets/{use-org-notice-D_lzrT1v.js → use-org-notice-D5zuQ4m5.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CXR8xOyz.js → use-org-repo-syncs-C8jG5KSy.js} +1 -1
- package/dist/client/assets/{use-org-sso-Fbk8Wwq4.js → use-org-sso-QMFtipA-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DYnwG033.js → use-organization-settings-ByKdFGhE.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DYNTPDzL.js → use-panel-navigate-D4GuHOu1.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BWo3tL86.js → use-project-native-view-presence-BEytngua.js} +1 -1
- package/dist/client/assets/{use-project-scope-Zk4IP7B6.js → use-project-scope-CpfOkL8I.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CGvNAmsp.js → use-recent-apps-Dt_ZPA-N.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DYiqS51Q.js → use-reports-diagnostic-MEHXC7RY.js} +1 -1
- package/dist/client/assets/{use-sandbox-events--EgmreWQ.js → use-sandbox-events-CPKES4Ee.js} +1 -1
- package/dist/client/assets/{use-secrets-BcD5BTqH.js → use-secrets-BGup3PHO.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-QYSyjVux.js → use-section-preview-base-CErD4C9a.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DIdfXbOr.js → use-sidebar-collapsed-9Vi_PrVo.js} +1 -1
- package/dist/client/assets/{use-tags-a6kkz9Aj.js → use-tags-CL2wnmn0.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CXDDOLeW.js → use-task-board-analytics-CGiNWJEU.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CmeNcFe2.js → use-task-board-item-prs-Mcp2690_.js} +1 -1
- package/dist/client/assets/{use-task-board-items-TENQt5cS.js → use-task-board-items-DxcJSuMX.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-Dq_lA2pC.js → use-task-board-prompts-CeUQeuL1.js} +1 -1
- package/dist/client/assets/{use-task-metadata-C75UjZAF.js → use-task-metadata-CG-mCqhD.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-he6CbGJb.js → use-thread-outputs-BRvk_pZG.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-DfBSo4Ua.js → use-view-draft-kind-BLkqtU-Q.js} +1 -1
- package/dist/client/assets/{use-voice-input-B9tq3K2A.js → use-voice-input-Dv1QYOod.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CuAeAzcr.js +1 -0
- package/dist/client/assets/{useQueries-UpDYaK89.js → useQueries-X3Wj3mkG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-QLEux5C_.js +1 -0
- package/dist/client/assets/{users-D5ojYrnY.js → users-SsaEf6Es.js} +1 -1
- package/dist/client/assets/{utils-Bsr3pAeq.js → utils-Dovv0grx.js} +1 -1
- package/dist/client/assets/variant-calendar-CtOZf_f5.js +1 -0
- package/dist/client/assets/{variant-matcher-override-CylJ7vNA.js → variant-matcher-override-CdFxQaGp.js} +1 -1
- package/dist/client/assets/{view-header-BwRsIWg-.js → view-header-ByNTN-so.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BULA9FxB.js → virtual-mcp-BjSK3sGG.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BlWzBx5R.js → watch-sse-pool-_tvuBMId.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/migrate.js +389 -694
- package/dist/server/server.js +905 -1210
- package/package.json +1 -2
- package/dist/client/assets/Fingerprint04-BmN62_tt.js +0 -1
- package/dist/client/assets/agent-app-Ddt_i3hs.js +0 -1
- package/dist/client/assets/agent-assets-4Dn6_LPJ.js +0 -1
- package/dist/client/assets/agent-automations-DTCsvg04.js +0 -1
- package/dist/client/assets/agent-blog-YN3-KN-3.js +0 -2
- package/dist/client/assets/agent-blog-post-CM6piUKk.js +0 -2
- package/dist/client/assets/agent-calendar-BJOF6wGS.js +0 -1
- package/dist/client/assets/agent-connect-sources-DyiJgP9L.js +0 -1
- package/dist/client/assets/agent-deck-BJbp-kJP.js +0 -1
- package/dist/client/assets/agent-e2e-BPbuZrSW.js +0 -1
- package/dist/client/assets/agent-experiments-CdtDrGBl.js +0 -1
- package/dist/client/assets/agent-file-TtINmaDO.js +0 -1
- package/dist/client/assets/agent-hosting-C1oXMGvH.js +0 -1
- package/dist/client/assets/agent-icon-DA-Fg7pF.js +0 -1
- package/dist/client/assets/agent-library-DiFYtmp3.js +0 -1
- package/dist/client/assets/agent-library-file-B8tZpffC.js +0 -1
- package/dist/client/assets/agent-overview-BItm6Vlt.js +0 -1
- package/dist/client/assets/agent-settings-BMZl-puv.js +0 -1
- package/dist/client/assets/agent-site-editor-code-GUBPAYOc.js +0 -2
- package/dist/client/assets/agent-site-editor-content-C0ANuka1.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BSvKajfu.js +0 -1
- package/dist/client/assets/agent-view-CuMB-zdu.js +0 -1
- package/dist/client/assets/api-keys-CZghJUH5.js +0 -1
- package/dist/client/assets/app-editor-D0csBY-b.js +0 -1
- package/dist/client/assets/auth-entry-CmrAwa9A.js +0 -1
- package/dist/client/assets/automations-DWMaGnJ_.js +0 -1
- package/dist/client/assets/category-editor-CvyZlhDa.js +0 -1
- package/dist/client/assets/choose-editor-BudS68fU.js +0 -1
- package/dist/client/assets/cms-settings-editor-BihAt8mo.js +0 -1
- package/dist/client/assets/collection-detail-kNjKSTlB.js +0 -1
- package/dist/client/assets/connection-detail-BzNp4KYO.js +0 -1
- package/dist/client/assets/connections-DYD0GVv1.js +0 -1
- package/dist/client/assets/context-E7CmO04l.js +0 -1
- package/dist/client/assets/file-explorer-BUDGmFj3.js +0 -2
- package/dist/client/assets/home-CS3KzMJa.js +0 -1
- package/dist/client/assets/library-OZMSR-Ss.js +0 -1
- package/dist/client/assets/login-lSvN3N4Q.js +0 -1
- package/dist/client/assets/oauth-consent-R7d-lFg9.js +0 -1
- package/dist/client/assets/openai-conversation-N65nOtwY.js +0 -3
- package/dist/client/assets/post-calendar-D2IwNEqN.js +0 -1
- package/dist/client/assets/preview-tab-COGaRa7u.js +0 -557
- package/dist/client/assets/profile-CAs6IhMO.js +0 -1
- package/dist/client/assets/project-app-view-DviUlYP5.js +0 -1
- package/dist/client/assets/project-reports-BbMJz4mc.js +0 -1
- package/dist/client/assets/project-tasks-BrJzU4LM.js +0 -1
- package/dist/client/assets/projects-CEBGkLTr.js +0 -1
- package/dist/client/assets/record-editor-BwlyH5jZ.js +0 -1
- package/dist/client/assets/redirect-editor-DtY_MKxf.js +0 -1
- package/dist/client/assets/reports-DAi0HbOS.js +0 -1
- package/dist/client/assets/reports-onboarding-DKaCbtdm.js +0 -1
- package/dist/client/assets/reports-tab-_GtIHZiT.js +0 -2
- package/dist/client/assets/repositories-DsojF3_X.js +0 -1
- package/dist/client/assets/roles-KUKC8vim.js +0 -1
- package/dist/client/assets/route-BLThcLzr.js +0 -1
- package/dist/client/assets/route-C9UFcNus.js +0 -1
- package/dist/client/assets/route-CC0eCWn4.js +0 -1
- package/dist/client/assets/sections-editor-Cw3wqkPx.js +0 -1
- package/dist/client/assets/settings-tab-BHrFLzvD.js +0 -1
- package/dist/client/assets/site-editor-e8Hx_Aj4.js +0 -1
- package/dist/client/assets/skills-CDREZcnF.js +0 -1
- package/dist/client/assets/tasks-DtEwdEBz.js +0 -1
- package/dist/client/assets/thread-analytics-D1D-pLk-.js +0 -1
- package/dist/client/assets/thread-route-pIQL1n8l.js +0 -1
- package/dist/client/assets/use-ask-in-chat-SQXk6mVC.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-GUlVOp3p.js +0 -1
- package/dist/client/assets/use-blog-view-Bm6F2c8c.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BVFlK8XX.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CGXfA9jP.js +0 -1
- package/dist/client/assets/variant-calendar-CiQ54mcG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as U,r as I,a6 as Ve,eL as Ue,b as ee,m as O,j as r,a7 as Qe,ev as Ge,B as Ne,t as se,I as Ye,h as We,aY as Ke}from"./index-DokE5sNF.js";import{a as Pe}from"./Image01-D1EDWKnx.js";import{s as He}from"./Trash01-DmArjRF_.js";import{i as Re}from"./Upload01-C0hxLVoS.js";import{r as Je,L as Xe,s as Ze,F as et,i as $e}from"./use-never-published-WdNVjWmr.js";import{L as Ce}from"./label-CELn1y0I.js";import{T as Se,a as ke,c as Ee}from"./tooltip-CqEoC-F2.js";import{b as Ie}from"./repository-binding-CBLNaLcn.js";import{u as tt}from"./chat-context-Bo7uj7QO.js";import{u as Fe,a6 as st,h as it,b as rt,a7 as nt}from"./site-editor-toast-Ynfp7Kjt.js";import{c as ot}from"./use-organization-settings-DYnwG033.js";import{a as at}from"./SwitchHorizontal01-DFAhxuil.js";import{a as lt,b as ct,P as dt}from"./popover-BNjsYhzT.js";import{S as ft}from"./switch-B_2aZNJw.js";import{T as ut,a as mt}from"./toggle-group-C134tdMJ.js";import{m as pt}from"./match-site-slug-config-B47_xZCi.js";import{u as gt}from"./use-file-configs-iPUyCrpd.js";import{u as xt}from"./asset-utils-DZv-FEec.js";import{i as ht}from"./AlertCircle-D_6mZhd3.js";const Oe=I.createContext(null);function cs(t){const e=U.c(3),{children:s}=t,n=tt(),a=Fe(n?.virtualMcpId,n?.currentBranch);let o;return e[0]!==a.kind||e[1]!==s?(o=I.createElement(Oe.Provider,{value:a.kind},s),e[0]=a.kind,e[1]=s,e[2]=o):o=e[2],o}function vt(){const t=U.c(4),e=I.useContext(Oe),{org:s}=Ve(),n=ot("new_blocks_editor"),a=!!s.id;let o;return t[0]!==e||t[1]!==n||t[2]!==a?(o=st({backend:e,hasOrg:a,orgFlag:n}),t[0]=e,t[1]=n,t[2]=a,t[3]=o):o=t[3],o}function yt(){return vt()??!1}function bt(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";const e=t;if(Array.isArray(e.variants)){const s=e.variants,n=s.find(i=>i.rule?.__resolveType?.includes("always")),a=Ue(n);if(typeof a=="string")return a;const o=s.map(i=>Ue(i)).find(i=>typeof i=="string");if(typeof o=="string")return o}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function jt(t){const e=U.c(29),{className:s}=t,n=ee();if(yt()){let c;e[0]!==n?(c=n("sectionsEditor.field.missingRequired"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==s?(m=O("shrink-0 cursor-help text-destructive",s),e[2]=s,e[3]=m):m=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Qe,{className:"size-3.5"}),e[4]=x):x=e[4];let p;e[5]!==c||e[6]!==m?(p=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":c,className:m,children:x})}),e[5]=c,e[6]=m,e[7]=p):p=e[7];let h;e[8]!==n?(h=n("sectionsEditor.field.missingRequiredTooltip"),e[8]=n,e[9]=h):h=e[9];let g;e[10]!==h?(g=r.jsx(ke,{className:"max-w-56",children:h}),e[10]=h,e[11]=g):g=e[11];let w;return e[12]!==p||e[13]!==g?(w=r.jsxs(Ee,{children:[p,g]}),e[12]=p,e[13]=g,e[14]=w):w=e[14],w}let o;e[15]!==n?(o=n("sectionsEditor.field.missingRequired"),e[15]=n,e[16]=o):o=e[16];let i;e[17]!==s?(i=O("size-2 shrink-0 cursor-help rounded-full bg-destructive",s),e[17]=s,e[18]=i):i=e[18];let f;e[19]!==o||e[20]!==i?(f=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":o,className:i})}),e[19]=o,e[20]=i,e[21]=f):f=e[21];let d;e[22]!==n?(d=n("sectionsEditor.field.missingRequiredTooltip"),e[22]=n,e[23]=d):d=e[23];let l;e[24]!==d?(l=r.jsx(ke,{className:"max-w-56",children:d}),e[24]=d,e[25]=l):l=e[25];let u;return e[26]!==f||e[27]!==l?(u=r.jsxs(Ee,{children:[f,l]}),e[26]=f,e[27]=l,e[28]=u):u=e[28],u}const Me=I.createContext({required:!1,invalid:!1});function wt(){return I.useContext(Me)}function ds(t){const e=U.c(6),{required:s,invalid:n,children:a}=t;let o;e[0]!==n||e[1]!==s?(o={required:s,invalid:n},e[0]=n,e[1]=s,e[2]=o):o=e[2];let i;return e[3]!==a||e[4]!==o?(i=r.jsx(Me.Provider,{value:o,children:a}),e[3]=a,e[4]=o,e[5]=i):i=e[5],i}function fs(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const Nt="cursor-help underline decoration-dotted decoration-muted-foreground/50 underline-offset-4";function De(t){return Ie(t)?.metadata?.fieldDescriptionTooltips??!1}function Ct(t){const e=U.c(9),{description:s,virtualMcpId:n,children:a}=t,o=De(n);if(!s||!o)return a;let i;e[0]!==a?(i=I.cloneElement(a,{className:O(a.props.className,Nt)}),e[0]=a,e[1]=i):i=e[1];let f;e[2]!==i?(f=r.jsx(Se,{asChild:!0,children:i}),e[2]=i,e[3]=f):f=e[3];let d;e[4]!==s?(d=r.jsx(ke,{className:"max-w-64",children:s}),e[4]=s,e[5]=d):d=e[5];let l;return e[6]!==f||e[7]!==d?(l=r.jsxs(Ee,{delayDuration:300,children:[f,d]}),e[6]=f,e[7]=d,e[8]=l):l=e[8],l}function St(t){const e=U.c(17),{htmlFor:s,label:n,description:a,labelClassName:o,virtualMcpId:i}=t,f=De(i),{required:d,invalid:l}=wt();let u;e[0]!==l||e[1]!==d?(u=d&&l&&r.jsx(jt,{className:"mt-0.5 self-start"}),e[0]=l,e[1]=d,e[2]=u):u=e[2];let c;e[3]!==s||e[4]!==n||e[5]!==o||e[6]!==u?(c=r.jsxs(Ce,{htmlFor:s,className:o,children:[n,u]}),e[3]=s,e[4]=n,e[5]=o,e[6]=u,e[7]=c):c=e[7];const m=c;if(!f){let p;e[8]!==a?(p=a&&r.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:a}),e[8]=a,e[9]=p):p=e[9];let h;return e[10]!==m||e[11]!==p?(h=r.jsxs("div",{className:"space-y-0.5",children:[m,p]}),e[10]=m,e[11]=p,e[12]=h):h=e[12],h}let x;return e[13]!==a||e[14]!==m||e[15]!==i?(x=r.jsx(Ct,{description:a,virtualMcpId:i,children:m}),e[13]=a,e[14]=m,e[15]=i,e[16]=x):x=e[16],x}function kt(t){const e=ee(),s=Ie(t?.virtualMcpId),n=Fe(t?.virtualMcpId,t?.branch),{connection:a}=rt(t?.virtualMcpId),o=nt(n,a);if(s?.metadata?.assetStorageConfigId||!o||!t||n.kind!=="protocol"||!n.describe.assets)return null;const{maxBytes:i}=n.describe.assets,f=d=>`${o}/assets/${encodeURIComponent(d)}`;return async d=>{if(d.size>i)throw new Error(e("sectionsEditor.fileField.tooLarge",{max:`${Math.floor(i/(1024*1024))} MB`}));if(n.describe.readOnly)throw new Error(e("decoServe.upload.readOnly",{name:d.name}));let l;try{l=await fetch(f(d.name),{method:"PUT",signal:Ge(),headers:{"content-type":d.type||"application/octet-stream"},body:d})}catch{throw new Error(e("decoServe.upload.serverGone",{name:d.name}))}const u=await l.json().catch(()=>null);if(!l.ok||typeof u?.path!="string"){const c=u?.error?.message;throw new Error(e("decoServe.upload.failed",{name:d.name,detail:typeof c=="string"?c:`HTTP ${l.status}`}))}return u.path}}function Et(t,e){const s=U.c(6),n=Fe(t?.virtualMcpId,t?.branch);let a;s[0]!==n||s[1]!==t?.previewUrl?(a=n.kind==="protocol"&&n.source==="sandbox"?t?.previewUrl??null:it(n),s[0]=n,s[1]=t?.previewUrl,s[2]=a):a=s[2];const o=a;let i;return s[3]!==e||s[4]!==o?(i=o&&e.startsWith("/")&&!e.startsWith("//")?new URL(e,o).href:e,s[3]=e,s[4]=o,s[5]=i):i=s[5],i}function It(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",children:r.jsxs("span",{className:"flex items-center gap-1.5 rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:[r.jsx(Re,{size:14}),"Click to replace"]})}),t[0]=e):e=t[0],e}function Ft(t){try{const e=new URL(t).pathname;return decodeURIComponent(e.split("/").pop()??t)}catch{return t.split("/").pop()??t}}function Tt(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"":t.slice(e+1).toLowerCase()}const _t=["low","medium","high","original"];function Le(t){return t==="low"||t==="medium"||t==="high"||t==="original"}function qe(t,e){try{return new URL(t).searchParams.get(e)}catch{const s=Ut(t);for(const n of s){const a=n.indexOf("=");if((a>=0?n.slice(0,a):n)===e)return a>=0?n.slice(a+1):""}return null}}function ze(t,e,s){const n=t.indexOf("#"),a=n>=0?t.slice(n):"",o=n>=0?t.slice(0,n):t,i=o.indexOf("?"),f=i>=0?o.slice(0,i):o,d=(i>=0?o.slice(i+1).split("&"):[]).filter(Boolean).filter(l=>{const u=l.indexOf("=");return(u>=0?l.slice(0,u):l)!==e});return s!==void 0&&d.push(`${e}=${s}`),`${f}${d.length?`?${d.join("&")}`:""}${a}`}function Ut(t){const e=t.indexOf("#"),s=e>=0?t.slice(0,e):t,n=s.indexOf("?");return n<0?[]:s.slice(n+1).split("&").filter(Boolean)}function Pt(t){if(!t)return;const e=qe(t,"quality");return Le(e)?e:void 0}function $t(t,e){return ze(t,"quality",e)}function Rt(t){return t?qe(t,"muted")!=="false":!0}function Ot(t,e){return ze(t,"muted",e?void 0:"false")}function Mt(t){const e=U.c(36),{value:s,onChange:n,showMuted:a}=t,o=a===void 0?!1:a,i=ee(),f=I.useId();let d;e[0]!==s?(d=Pt(s),e[0]=s,e[1]=d):d=e[1];const l=d;let u;e[2]!==s?(u=Rt(s),e[2]=s,e[3]=u):u=e[3];const c=u;let m;e[4]!==i?(m=i("sectionsEditor.mediaTransformControls.mediaOptionsLabel"),e[4]=i,e[5]=m):m=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(at,{size:14}),e[6]=x):x=e[6];let p;e[7]!==m?(p=r.jsx(lt,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"outline",size:"sm",className:"h-9 shrink-0","aria-label":m,children:x})}),e[7]=m,e[8]=p):p=e[8];let h;e[9]!==i?(h=i("sectionsEditor.mediaTransformControls.qualityLabel"),e[9]=i,e[10]=h):h=e[10];let g;e[11]!==h?(g=r.jsx(Ce,{className:"text-xs text-muted-foreground",children:h}),e[11]=h,e[12]=g):g=e[12];const w=l??"";let N;e[13]!==n||e[14]!==s?(N=b=>n($t(s,Le(b)?b:void 0)),e[13]=n,e[14]=s,e[15]=N):N=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=_t.map(Dt),e[16]=y):y=e[16];let F;e[17]!==N||e[18]!==w?(F=r.jsx(ut,{type:"single",variant:"outline",size:"sm",value:w,onValueChange:N,children:y}),e[17]=N,e[18]=w,e[19]=F):F=e[19];let v;e[20]!==F||e[21]!==g?(v=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,F]}),e[20]=F,e[21]=g,e[22]=v):v=e[22];let C;e[23]!==c||e[24]!==f||e[25]!==n||e[26]!==o||e[27]!==i||e[28]!==s?(C=o&&r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(Ce,{htmlFor:f,className:"text-xs text-muted-foreground",children:i("sectionsEditor.mediaTransformControls.mutedLabel")}),r.jsx(ft,{id:f,checked:c,onCheckedChange:b=>n(Ot(s,b))})]}),e[23]=c,e[24]=f,e[25]=n,e[26]=o,e[27]=i,e[28]=s,e[29]=C):C=e[29];let S;e[30]!==v||e[31]!==C?(S=r.jsx(ct,{align:"end",className:"w-auto min-w-52 p-3",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[v,C]})}),e[30]=v,e[31]=C,e[32]=S):S=e[32];let j;return e[33]!==S||e[34]!==p?(j=r.jsxs(dt,{children:[p,S]}),e[33]=S,e[34]=p,e[35]=j):j=e[35],j}function Dt(t){return r.jsx(mt,{value:t,className:"h-8 px-3 text-xs capitalize",children:t},t)}function Lt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"?e.href:""}catch{return""}}const Ae=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function qt(t){const e=U.c(26),{siteSlug:s,virtualMcpId:n,onUploaded:a,onNeedsPicker:o,serveUpload:i}=t,f=ee(),l=Ie(n)?.metadata?.assetStorageConfigId,u=!i;let c;e[0]!==u?(c={enabled:u},e[0]=u,e[1]=c):c=e[1];const m=gt(c),x=xt(),[p,h]=I.useState(!1);let g;e[2]!==m.data?.configs?(g=m.data?.configs??[],e[2]=m.data?.configs,e[3]=g):g=e[3];let w;e[4]!==l||e[5]!==s||e[6]!==g?(w=pt(g,s,l),e[4]=l,e[5]=s,e[6]=g,e[7]=w):w=e[7];const y=w?.id??null;let F;e[8]!==m.data?.configs||e[9]!==y||e[10]!==o||e[11]!==a||e[12]!==i||e[13]!==f||e[14]!==x?(F=async function(M){if(!M)return;const $=Array.from(M).filter(zt);if($.length===0){se.error(f("sectionsEditor.imageField.onlyImageFilesAccepted"));return}if(i){try{a(await i($[0]))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}return}const k=Je(m.data?.configs??[],y,typeof window<"u"?window.localStorage.getItem(Xe):null);if(!k){o();return}try{const T=await x.mutateAsync({configId:k,file:$[0]}),_=Lt(T.publicUrl);if(!_){se.error(f("sectionsEditor.imageField.uploadFailed"));return}a(_),$.length>1&&se.info(f("sectionsEditor.imageField.uploadedWithExtraFilesIgnored",{fileName:$[0].name}))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}},e[8]=m.data?.configs,e[9]=y,e[10]=o,e[11]=a,e[12]=i,e[13]=f,e[14]=x,e[15]=F):F=e[15];const v=F;let C,S;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=E=>{E.preventDefault(),E.dataTransfer.types.includes("Files")&&h(!0)},S=E=>{E.currentTarget===E.target&&h(!1)},e[16]=C,e[17]=S):(C=e[16],S=e[17]);let j;e[18]!==v?(j={onDragOver:C,onDragLeave:S,onDrop:E=>{E.preventDefault(),E.stopPropagation(),h(!1),v(E.dataTransfer.files)}},e[18]=v,e[19]=j):j=e[19];let b;return e[20]!==v||e[21]!==p||e[22]!==y||e[23]!==j||e[24]!==x.isPending?(b={isDragging:p,isPending:x.isPending,lockedConfigId:y,handleFiles:v,dropProps:j},e[20]=v,e[21]=p,e[22]=y,e[23]=j,e[24]=x.isPending,e[25]=b):b=e[25],b}function zt(t){return Ae.has(t.type||"")}const At=3;function us(t){const e=U.c(98),{schema:s,value:n,onChange:a,path:o,label:i,sandbox:f,compact:d}=t,l=ee();let u;e[0]!==n?(u=bt(n),e[0]=n,e[1]=u):u=e[1];const c=u,[m,x]=I.useState(!1),[p,h]=I.useState(!1),[g,w]=I.useState(!1),N=Et(f,c),[y,F]=I.useState(0);let v;e[2]!==y||e[3]!==N?(v=y>0?`${N}${N.includes("?")?"&":"?"}retry=${y}`:N,e[2]=y,e[3]=N,e[4]=v):v=e[4];let C;e[5]!==v?(C=Ze(v),e[5]=v,e[6]=C):C=e[6];const S=C,j=!!c&&!S;let b,E;e[7]!==c?(b=c?Ft(c):"",E=b?Tt(b):"",e[7]=c,e[8]=b,e[9]=E):(b=e[8],E=e[9]);const M=E;let $;e[10]!==a?($=function(fe){h(!1),w(!1),F(0),a(fe)},e[10]=a,e[11]=$):$=e[11];const k=$,[T,_]=I.useState(c),[Be,Te]=I.useState(c);Be!==c&&(Te(c),_(c));let ie;e[12]!==k||e[13]!==c?(ie=function(fe){_(fe);const te=fe.trim();te&&!$e(te)||te!==c&&(Te(te),k(te))},e[12]=k,e[13]=c,e[14]=ie):ie=e[14];const ue=ie;let re;e[15]!==c||e[16]!==T?(re=function(){T.trim()&&!$e(T)&&_(c)},e[15]=c,e[16]=T,e[17]=re):re=e[17];const me=re,R=kt(f),_e=I.useRef(null);let ne;e[18]!==R?(ne=()=>R?_e.current?.click():x(!0),e[18]=R,e[19]=ne):ne=e[19];const D=ne,pe=f?.siteSlug,ge=f?.virtualMcpId;let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>x(!0),e[20]=oe):oe=e[20];let ae;e[21]!==R||e[22]!==k||e[23]!==ge||e[24]!==pe?(ae={siteSlug:pe,virtualMcpId:ge,onUploaded:k,onNeedsPicker:oe,serveUpload:R},e[21]=R,e[22]=k,e[23]=ge,e[24]=pe,e[25]=ae):ae=e[25];const{isDragging:le,isPending:ce,lockedConfigId:xe,dropProps:he,handleFiles:ve}=qt(ae),ye=!i&&"hidden";let L;e[26]!==ye?(L=O("min-w-0",ye),e[26]=ye,e[27]=L):L=e[27];const be=f?.virtualMcpId;let q;e[28]!==i||e[29]!==o||e[30]!==s.description||e[31]!==be?(q=r.jsx(St,{htmlFor:o,label:i,description:s.description,labelClassName:"text-muted-foreground",virtualMcpId:be}),e[28]=i,e[29]=o,e[30]=s.description,e[31]=be,e[32]=q):q=e[32];let z;e[33]!==L||e[34]!==q?(z=r.jsx("div",{className:L,children:q}),e[33]=L,e[34]=q,e[35]=z):z=e[35];const je=le&&"border-primary ring-2 ring-primary/30",we=ce&&"pointer-events-none opacity-60";let A;e[36]!==je||e[37]!==we?(A=O("group relative w-full overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] border shadow-edge border-border/60 bg-muted/30 transition",je,we),e[36]=je,e[37]=we,e[38]=A):A=e[38];let B;e[39]!==D||e[40]!==d||e[41]!==M||e[42]!==b||e[43]!==g||e[44]!==p||e[45]!==ce||e[46]!==i||e[47]!==y||e[48]!==N||e[49]!==S||e[50]!==c||e[51]!==l||e[52]!==j?(B=c?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:D,"aria-label":l("sectionsEditor.imageField.replaceImage"),className:O("relative block w-full cursor-pointer bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",d?"h-28":"h-40"),children:[!g&&!j&&r.jsx("img",{src:S,alt:i,className:O("h-full w-full object-contain transition-opacity",!p&&"opacity-0"),onLoad:()=>h(!0),onError:()=>{N!==c&&y<At?setTimeout(()=>F(Bt),600):w(!0)}},c),(g||j)&&r.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[r.jsx(Pe,{size:20}),r.jsx("p",{className:"text-xs",children:l("sectionsEditor.imageField.previewUnavailable")})]}),!p&&!g&&!j&&r.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"}),r.jsx(It,{})]}),!d&&r.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:b}),M&&r.jsx("span",{className:"shrink-0 rounded-[var(--studio-control-radius,var(--radius))] bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:M})]})]}):r.jsxs("button",{type:"button",onClick:D,className:O("flex w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",d?"h-28":"h-40"),children:[r.jsx(Pe,{size:20}),r.jsx("span",{className:"text-sm font-medium",children:l(ce?"sectionsEditor.imageField.uploading":"sectionsEditor.imageField.dropImageOrClickToBrowse")}),!d&&r.jsx("span",{className:"text-xs text-muted-foreground",children:l("sectionsEditor.imageField.supportedFormatsAndSize")})]}),e[39]=D,e[40]=d,e[41]=M,e[42]=b,e[43]=g,e[44]=p,e[45]=ce,e[46]=i,e[47]=y,e[48]=N,e[49]=S,e[50]=c,e[51]=l,e[52]=j,e[53]=B):B=e[53];let V;e[54]!==le||e[55]!==l?(V=le&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:r.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:l("sectionsEditor.imageField.dropToUpload")})}),e[54]=le,e[55]=l,e[56]=V):V=e[56];let Q;e[57]!==he||e[58]!==A||e[59]!==B||e[60]!==V?(Q=r.jsxs("div",{...he,className:A,children:[B,V]}),e[57]=he,e[58]=A,e[59]=B,e[60]=V,e[61]=Q):Q=e[61];let G;e[62]!==ue?(G=P=>ue(P.target.value),e[62]=ue,e[63]=G):G=e[63];let Y;e[64]!==c?(Y=P=>{P.key==="Escape"&&_(c)},e[64]=c,e[65]=Y):Y=e[65];let W;e[66]!==l?(W=l("sectionsEditor.imageField.urlPlaceholder"),e[66]=l,e[67]=W):W=e[67];let K;e[68]!==o||e[69]!==me||e[70]!==G||e[71]!==Y||e[72]!==W||e[73]!==T?(K=r.jsx(Ye,{id:o,type:"url",value:T,onChange:G,onBlur:me,onKeyDown:Y,placeholder:W,className:"h-9 min-w-0 flex-1"}),e[68]=o,e[69]=me,e[70]=G,e[71]=Y,e[72]=W,e[73]=T,e[74]=K):K=e[74];let H;e[75]!==D||e[76]!==c||e[77]!==l?(H=!c&&r.jsxs(Ne,{type:"button",variant:"outline",size:"sm",onClick:D,className:"h-9 shrink-0",children:[r.jsx(Re,{size:14}),l("sectionsEditor.imageField.browse")]}),e[75]=D,e[76]=c,e[77]=l,e[78]=H):H=e[78];let J;e[79]!==k||e[80]!==c||e[81]!==l?(J=c&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{value:c,onChange:k}),r.jsx(Ne,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(""),className:"h-9 shrink-0","aria-label":l("sectionsEditor.imageField.removeImage"),children:r.jsx(He,{size:14})})]}),e[79]=k,e[80]=c,e[81]=l,e[82]=J):J=e[82];let X;e[83]!==K||e[84]!==H||e[85]!==J?(X=r.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[K,H,J]}),e[83]=K,e[84]=H,e[85]=J,e[86]=X):X=e[86];let Z;e[87]!==ve||e[88]!==xe||e[89]!==m||e[90]!==R||e[91]!==k?(Z=R?r.jsx("input",{ref:_e,type:"file",accept:[...Ae].join(","),className:"hidden",onChange:P=>{ve(P.target.files),P.target.value=""}}):r.jsx(et,{open:m,onOpenChange:x,mode:"image",onSelect:P=>k(P),lockedConfigId:xe}),e[87]=ve,e[88]=xe,e[89]=m,e[90]=R,e[91]=k,e[92]=Z):Z=e[92];let de;return e[93]!==z||e[94]!==Q||e[95]!==X||e[96]!==Z?(de=r.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[z,Q,X,Z]}),e[93]=z,e[94]=Q,e[95]=X,e[96]=Z,e[97]=de):de=e[97],de}function Bt(t){return t+1}function ms(t){const e=U.c(15),{isPending:s,isError:n}=t,a=ee();if(n){let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(ht,{size:13}),e[0]=d):d=e[0];let l;e[1]!==a?(l=a("sandbox.saveStatus.failed"),e[1]=a,e[2]=l):l=e[2];let u;return e[3]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[d,l]}),e[3]=l,e[4]=u):u=e[4],u}if(s){let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(We,{className:"size-[13px]"}),e[5]=d):d=e[5];let l;e[6]!==a?(l=a("sandbox.saveStatus.saving"),e[6]=a,e[7]=l):l=e[7];let u;return e[8]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[d,l]}),e[8]=l,e[9]=u):u=e[9],u}let o;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(Ke,{size:13}),e[10]=o):o=e[10];let i;e[11]!==a?(i=a("sandbox.saveStatus.saved"),e[11]=a,e[12]=i):i=e[12];let f;return e[13]!==i?(f=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[o,i]}),e[13]=i,e[14]=f):f=e[14],f}export{It as C,St as F,us as I,jt as M,cs as N,_t as Q,ds as R,ms as S,yt as a,De as b,wt as c,Ct as d,bt as e,Ft as f,Tt as g,kt as h,fs as i,Et as j,Mt as k,Pt as l,qt as m,$t as s,vt as u};
|
|
1
|
+
import{c as U,r as I,a6 as Ve,eL as Ue,b as ee,m as O,j as r,a7 as Qe,ev as Ge,B as Ne,t as se,I as Ye,h as We,aY as Ke}from"./index-_VeebRNE.js";import{a as Pe}from"./Image01-BqCHFUEp.js";import{s as He}from"./Trash01-LecfbxTv.js";import{i as Re}from"./Upload01-CABY93nl.js";import{r as Je,L as Xe,s as Ze,F as et,i as $e}from"./use-never-published-DDbQ0Vt8.js";import{L as Ce}from"./label-DZkEI5Ke.js";import{T as Se,a as ke,c as Ee}from"./tooltip-BYnWhoO-.js";import{b as Ie}from"./repository-binding-Ct6tvS6k.js";import{u as tt}from"./chat-context-DSu9o-d-.js";import{u as Fe,a6 as st,h as it,b as rt,a7 as nt}from"./site-editor-toast-Cjans_Z7.js";import{c as ot}from"./use-organization-settings-ByKdFGhE.js";import{a as at}from"./SwitchHorizontal01-Daz2EgW0.js";import{a as lt,b as ct,P as dt}from"./popover-CsisCWO2.js";import{S as ft}from"./switch-7uXAaerp.js";import{T as ut,a as mt}from"./toggle-group-n8suP90I.js";import{m as pt}from"./match-site-slug-config-B47_xZCi.js";import{u as gt}from"./use-file-configs-aENtp_va.js";import{u as xt}from"./asset-utils-CTFQl8QO.js";import{i as ht}from"./AlertCircle-gyZP8TIO.js";const Oe=I.createContext(null);function cs(t){const e=U.c(3),{children:s}=t,n=tt(),a=Fe(n?.virtualMcpId,n?.currentBranch);let o;return e[0]!==a.kind||e[1]!==s?(o=I.createElement(Oe.Provider,{value:a.kind},s),e[0]=a.kind,e[1]=s,e[2]=o):o=e[2],o}function vt(){const t=U.c(4),e=I.useContext(Oe),{org:s}=Ve(),n=ot("new_blocks_editor"),a=!!s.id;let o;return t[0]!==e||t[1]!==n||t[2]!==a?(o=st({backend:e,hasOrg:a,orgFlag:n}),t[0]=e,t[1]=n,t[2]=a,t[3]=o):o=t[3],o}function yt(){return vt()??!1}function bt(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";const e=t;if(Array.isArray(e.variants)){const s=e.variants,n=s.find(i=>i.rule?.__resolveType?.includes("always")),a=Ue(n);if(typeof a=="string")return a;const o=s.map(i=>Ue(i)).find(i=>typeof i=="string");if(typeof o=="string")return o}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function jt(t){const e=U.c(29),{className:s}=t,n=ee();if(yt()){let c;e[0]!==n?(c=n("sectionsEditor.field.missingRequired"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==s?(m=O("shrink-0 cursor-help text-destructive",s),e[2]=s,e[3]=m):m=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Qe,{className:"size-3.5"}),e[4]=x):x=e[4];let p;e[5]!==c||e[6]!==m?(p=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":c,className:m,children:x})}),e[5]=c,e[6]=m,e[7]=p):p=e[7];let h;e[8]!==n?(h=n("sectionsEditor.field.missingRequiredTooltip"),e[8]=n,e[9]=h):h=e[9];let g;e[10]!==h?(g=r.jsx(ke,{className:"max-w-56",children:h}),e[10]=h,e[11]=g):g=e[11];let w;return e[12]!==p||e[13]!==g?(w=r.jsxs(Ee,{children:[p,g]}),e[12]=p,e[13]=g,e[14]=w):w=e[14],w}let o;e[15]!==n?(o=n("sectionsEditor.field.missingRequired"),e[15]=n,e[16]=o):o=e[16];let i;e[17]!==s?(i=O("size-2 shrink-0 cursor-help rounded-full bg-destructive",s),e[17]=s,e[18]=i):i=e[18];let f;e[19]!==o||e[20]!==i?(f=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":o,className:i})}),e[19]=o,e[20]=i,e[21]=f):f=e[21];let d;e[22]!==n?(d=n("sectionsEditor.field.missingRequiredTooltip"),e[22]=n,e[23]=d):d=e[23];let l;e[24]!==d?(l=r.jsx(ke,{className:"max-w-56",children:d}),e[24]=d,e[25]=l):l=e[25];let u;return e[26]!==f||e[27]!==l?(u=r.jsxs(Ee,{children:[f,l]}),e[26]=f,e[27]=l,e[28]=u):u=e[28],u}const Me=I.createContext({required:!1,invalid:!1});function wt(){return I.useContext(Me)}function ds(t){const e=U.c(6),{required:s,invalid:n,children:a}=t;let o;e[0]!==n||e[1]!==s?(o={required:s,invalid:n},e[0]=n,e[1]=s,e[2]=o):o=e[2];let i;return e[3]!==a||e[4]!==o?(i=r.jsx(Me.Provider,{value:o,children:a}),e[3]=a,e[4]=o,e[5]=i):i=e[5],i}function fs(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const Nt="cursor-help underline decoration-dotted decoration-muted-foreground/50 underline-offset-4";function De(t){return Ie(t)?.metadata?.fieldDescriptionTooltips??!1}function Ct(t){const e=U.c(9),{description:s,virtualMcpId:n,children:a}=t,o=De(n);if(!s||!o)return a;let i;e[0]!==a?(i=I.cloneElement(a,{className:O(a.props.className,Nt)}),e[0]=a,e[1]=i):i=e[1];let f;e[2]!==i?(f=r.jsx(Se,{asChild:!0,children:i}),e[2]=i,e[3]=f):f=e[3];let d;e[4]!==s?(d=r.jsx(ke,{className:"max-w-64",children:s}),e[4]=s,e[5]=d):d=e[5];let l;return e[6]!==f||e[7]!==d?(l=r.jsxs(Ee,{delayDuration:300,children:[f,d]}),e[6]=f,e[7]=d,e[8]=l):l=e[8],l}function St(t){const e=U.c(17),{htmlFor:s,label:n,description:a,labelClassName:o,virtualMcpId:i}=t,f=De(i),{required:d,invalid:l}=wt();let u;e[0]!==l||e[1]!==d?(u=d&&l&&r.jsx(jt,{className:"mt-0.5 self-start"}),e[0]=l,e[1]=d,e[2]=u):u=e[2];let c;e[3]!==s||e[4]!==n||e[5]!==o||e[6]!==u?(c=r.jsxs(Ce,{htmlFor:s,className:o,children:[n,u]}),e[3]=s,e[4]=n,e[5]=o,e[6]=u,e[7]=c):c=e[7];const m=c;if(!f){let p;e[8]!==a?(p=a&&r.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:a}),e[8]=a,e[9]=p):p=e[9];let h;return e[10]!==m||e[11]!==p?(h=r.jsxs("div",{className:"space-y-0.5",children:[m,p]}),e[10]=m,e[11]=p,e[12]=h):h=e[12],h}let x;return e[13]!==a||e[14]!==m||e[15]!==i?(x=r.jsx(Ct,{description:a,virtualMcpId:i,children:m}),e[13]=a,e[14]=m,e[15]=i,e[16]=x):x=e[16],x}function kt(t){const e=ee(),s=Ie(t?.virtualMcpId),n=Fe(t?.virtualMcpId,t?.branch),{connection:a}=rt(t?.virtualMcpId),o=nt(n,a);if(s?.metadata?.assetStorageConfigId||!o||!t||n.kind!=="protocol"||!n.describe.assets)return null;const{maxBytes:i}=n.describe.assets,f=d=>`${o}/assets/${encodeURIComponent(d)}`;return async d=>{if(d.size>i)throw new Error(e("sectionsEditor.fileField.tooLarge",{max:`${Math.floor(i/(1024*1024))} MB`}));if(n.describe.readOnly)throw new Error(e("decoServe.upload.readOnly",{name:d.name}));let l;try{l=await fetch(f(d.name),{method:"PUT",signal:Ge(),headers:{"content-type":d.type||"application/octet-stream"},body:d})}catch{throw new Error(e("decoServe.upload.serverGone",{name:d.name}))}const u=await l.json().catch(()=>null);if(!l.ok||typeof u?.path!="string"){const c=u?.error?.message;throw new Error(e("decoServe.upload.failed",{name:d.name,detail:typeof c=="string"?c:`HTTP ${l.status}`}))}return u.path}}function Et(t,e){const s=U.c(6),n=Fe(t?.virtualMcpId,t?.branch);let a;s[0]!==n||s[1]!==t?.previewUrl?(a=n.kind==="protocol"&&n.source==="sandbox"?t?.previewUrl??null:it(n),s[0]=n,s[1]=t?.previewUrl,s[2]=a):a=s[2];const o=a;let i;return s[3]!==e||s[4]!==o?(i=o&&e.startsWith("/")&&!e.startsWith("//")?new URL(e,o).href:e,s[3]=e,s[4]=o,s[5]=i):i=s[5],i}function It(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",children:r.jsxs("span",{className:"flex items-center gap-1.5 rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:[r.jsx(Re,{size:14}),"Click to replace"]})}),t[0]=e):e=t[0],e}function Ft(t){try{const e=new URL(t).pathname;return decodeURIComponent(e.split("/").pop()??t)}catch{return t.split("/").pop()??t}}function Tt(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"":t.slice(e+1).toLowerCase()}const _t=["low","medium","high","original"];function Le(t){return t==="low"||t==="medium"||t==="high"||t==="original"}function qe(t,e){try{return new URL(t).searchParams.get(e)}catch{const s=Ut(t);for(const n of s){const a=n.indexOf("=");if((a>=0?n.slice(0,a):n)===e)return a>=0?n.slice(a+1):""}return null}}function ze(t,e,s){const n=t.indexOf("#"),a=n>=0?t.slice(n):"",o=n>=0?t.slice(0,n):t,i=o.indexOf("?"),f=i>=0?o.slice(0,i):o,d=(i>=0?o.slice(i+1).split("&"):[]).filter(Boolean).filter(l=>{const u=l.indexOf("=");return(u>=0?l.slice(0,u):l)!==e});return s!==void 0&&d.push(`${e}=${s}`),`${f}${d.length?`?${d.join("&")}`:""}${a}`}function Ut(t){const e=t.indexOf("#"),s=e>=0?t.slice(0,e):t,n=s.indexOf("?");return n<0?[]:s.slice(n+1).split("&").filter(Boolean)}function Pt(t){if(!t)return;const e=qe(t,"quality");return Le(e)?e:void 0}function $t(t,e){return ze(t,"quality",e)}function Rt(t){return t?qe(t,"muted")!=="false":!0}function Ot(t,e){return ze(t,"muted",e?void 0:"false")}function Mt(t){const e=U.c(36),{value:s,onChange:n,showMuted:a}=t,o=a===void 0?!1:a,i=ee(),f=I.useId();let d;e[0]!==s?(d=Pt(s),e[0]=s,e[1]=d):d=e[1];const l=d;let u;e[2]!==s?(u=Rt(s),e[2]=s,e[3]=u):u=e[3];const c=u;let m;e[4]!==i?(m=i("sectionsEditor.mediaTransformControls.mediaOptionsLabel"),e[4]=i,e[5]=m):m=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(at,{size:14}),e[6]=x):x=e[6];let p;e[7]!==m?(p=r.jsx(lt,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"outline",size:"sm",className:"h-9 shrink-0","aria-label":m,children:x})}),e[7]=m,e[8]=p):p=e[8];let h;e[9]!==i?(h=i("sectionsEditor.mediaTransformControls.qualityLabel"),e[9]=i,e[10]=h):h=e[10];let g;e[11]!==h?(g=r.jsx(Ce,{className:"text-xs text-muted-foreground",children:h}),e[11]=h,e[12]=g):g=e[12];const w=l??"";let N;e[13]!==n||e[14]!==s?(N=b=>n($t(s,Le(b)?b:void 0)),e[13]=n,e[14]=s,e[15]=N):N=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=_t.map(Dt),e[16]=y):y=e[16];let F;e[17]!==N||e[18]!==w?(F=r.jsx(ut,{type:"single",variant:"outline",size:"sm",value:w,onValueChange:N,children:y}),e[17]=N,e[18]=w,e[19]=F):F=e[19];let v;e[20]!==F||e[21]!==g?(v=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,F]}),e[20]=F,e[21]=g,e[22]=v):v=e[22];let C;e[23]!==c||e[24]!==f||e[25]!==n||e[26]!==o||e[27]!==i||e[28]!==s?(C=o&&r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(Ce,{htmlFor:f,className:"text-xs text-muted-foreground",children:i("sectionsEditor.mediaTransformControls.mutedLabel")}),r.jsx(ft,{id:f,checked:c,onCheckedChange:b=>n(Ot(s,b))})]}),e[23]=c,e[24]=f,e[25]=n,e[26]=o,e[27]=i,e[28]=s,e[29]=C):C=e[29];let S;e[30]!==v||e[31]!==C?(S=r.jsx(ct,{align:"end",className:"w-auto min-w-52 p-3",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[v,C]})}),e[30]=v,e[31]=C,e[32]=S):S=e[32];let j;return e[33]!==S||e[34]!==p?(j=r.jsxs(dt,{children:[p,S]}),e[33]=S,e[34]=p,e[35]=j):j=e[35],j}function Dt(t){return r.jsx(mt,{value:t,className:"h-8 px-3 text-xs capitalize",children:t},t)}function Lt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"?e.href:""}catch{return""}}const Ae=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function qt(t){const e=U.c(26),{siteSlug:s,virtualMcpId:n,onUploaded:a,onNeedsPicker:o,serveUpload:i}=t,f=ee(),l=Ie(n)?.metadata?.assetStorageConfigId,u=!i;let c;e[0]!==u?(c={enabled:u},e[0]=u,e[1]=c):c=e[1];const m=gt(c),x=xt(),[p,h]=I.useState(!1);let g;e[2]!==m.data?.configs?(g=m.data?.configs??[],e[2]=m.data?.configs,e[3]=g):g=e[3];let w;e[4]!==l||e[5]!==s||e[6]!==g?(w=pt(g,s,l),e[4]=l,e[5]=s,e[6]=g,e[7]=w):w=e[7];const y=w?.id??null;let F;e[8]!==m.data?.configs||e[9]!==y||e[10]!==o||e[11]!==a||e[12]!==i||e[13]!==f||e[14]!==x?(F=async function(M){if(!M)return;const $=Array.from(M).filter(zt);if($.length===0){se.error(f("sectionsEditor.imageField.onlyImageFilesAccepted"));return}if(i){try{a(await i($[0]))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}return}const k=Je(m.data?.configs??[],y,typeof window<"u"?window.localStorage.getItem(Xe):null);if(!k){o();return}try{const T=await x.mutateAsync({configId:k,file:$[0]}),_=Lt(T.publicUrl);if(!_){se.error(f("sectionsEditor.imageField.uploadFailed"));return}a(_),$.length>1&&se.info(f("sectionsEditor.imageField.uploadedWithExtraFilesIgnored",{fileName:$[0].name}))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}},e[8]=m.data?.configs,e[9]=y,e[10]=o,e[11]=a,e[12]=i,e[13]=f,e[14]=x,e[15]=F):F=e[15];const v=F;let C,S;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=E=>{E.preventDefault(),E.dataTransfer.types.includes("Files")&&h(!0)},S=E=>{E.currentTarget===E.target&&h(!1)},e[16]=C,e[17]=S):(C=e[16],S=e[17]);let j;e[18]!==v?(j={onDragOver:C,onDragLeave:S,onDrop:E=>{E.preventDefault(),E.stopPropagation(),h(!1),v(E.dataTransfer.files)}},e[18]=v,e[19]=j):j=e[19];let b;return e[20]!==v||e[21]!==p||e[22]!==y||e[23]!==j||e[24]!==x.isPending?(b={isDragging:p,isPending:x.isPending,lockedConfigId:y,handleFiles:v,dropProps:j},e[20]=v,e[21]=p,e[22]=y,e[23]=j,e[24]=x.isPending,e[25]=b):b=e[25],b}function zt(t){return Ae.has(t.type||"")}const At=3;function us(t){const e=U.c(98),{schema:s,value:n,onChange:a,path:o,label:i,sandbox:f,compact:d}=t,l=ee();let u;e[0]!==n?(u=bt(n),e[0]=n,e[1]=u):u=e[1];const c=u,[m,x]=I.useState(!1),[p,h]=I.useState(!1),[g,w]=I.useState(!1),N=Et(f,c),[y,F]=I.useState(0);let v;e[2]!==y||e[3]!==N?(v=y>0?`${N}${N.includes("?")?"&":"?"}retry=${y}`:N,e[2]=y,e[3]=N,e[4]=v):v=e[4];let C;e[5]!==v?(C=Ze(v),e[5]=v,e[6]=C):C=e[6];const S=C,j=!!c&&!S;let b,E;e[7]!==c?(b=c?Ft(c):"",E=b?Tt(b):"",e[7]=c,e[8]=b,e[9]=E):(b=e[8],E=e[9]);const M=E;let $;e[10]!==a?($=function(fe){h(!1),w(!1),F(0),a(fe)},e[10]=a,e[11]=$):$=e[11];const k=$,[T,_]=I.useState(c),[Be,Te]=I.useState(c);Be!==c&&(Te(c),_(c));let ie;e[12]!==k||e[13]!==c?(ie=function(fe){_(fe);const te=fe.trim();te&&!$e(te)||te!==c&&(Te(te),k(te))},e[12]=k,e[13]=c,e[14]=ie):ie=e[14];const ue=ie;let re;e[15]!==c||e[16]!==T?(re=function(){T.trim()&&!$e(T)&&_(c)},e[15]=c,e[16]=T,e[17]=re):re=e[17];const me=re,R=kt(f),_e=I.useRef(null);let ne;e[18]!==R?(ne=()=>R?_e.current?.click():x(!0),e[18]=R,e[19]=ne):ne=e[19];const D=ne,pe=f?.siteSlug,ge=f?.virtualMcpId;let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>x(!0),e[20]=oe):oe=e[20];let ae;e[21]!==R||e[22]!==k||e[23]!==ge||e[24]!==pe?(ae={siteSlug:pe,virtualMcpId:ge,onUploaded:k,onNeedsPicker:oe,serveUpload:R},e[21]=R,e[22]=k,e[23]=ge,e[24]=pe,e[25]=ae):ae=e[25];const{isDragging:le,isPending:ce,lockedConfigId:xe,dropProps:he,handleFiles:ve}=qt(ae),ye=!i&&"hidden";let L;e[26]!==ye?(L=O("min-w-0",ye),e[26]=ye,e[27]=L):L=e[27];const be=f?.virtualMcpId;let q;e[28]!==i||e[29]!==o||e[30]!==s.description||e[31]!==be?(q=r.jsx(St,{htmlFor:o,label:i,description:s.description,labelClassName:"text-muted-foreground",virtualMcpId:be}),e[28]=i,e[29]=o,e[30]=s.description,e[31]=be,e[32]=q):q=e[32];let z;e[33]!==L||e[34]!==q?(z=r.jsx("div",{className:L,children:q}),e[33]=L,e[34]=q,e[35]=z):z=e[35];const je=le&&"border-primary ring-2 ring-primary/30",we=ce&&"pointer-events-none opacity-60";let A;e[36]!==je||e[37]!==we?(A=O("group relative w-full overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] border shadow-edge border-border/60 bg-muted/30 transition",je,we),e[36]=je,e[37]=we,e[38]=A):A=e[38];let B;e[39]!==D||e[40]!==d||e[41]!==M||e[42]!==b||e[43]!==g||e[44]!==p||e[45]!==ce||e[46]!==i||e[47]!==y||e[48]!==N||e[49]!==S||e[50]!==c||e[51]!==l||e[52]!==j?(B=c?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:D,"aria-label":l("sectionsEditor.imageField.replaceImage"),className:O("relative block w-full cursor-pointer bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",d?"h-28":"h-40"),children:[!g&&!j&&r.jsx("img",{src:S,alt:i,className:O("h-full w-full object-contain transition-opacity",!p&&"opacity-0"),onLoad:()=>h(!0),onError:()=>{N!==c&&y<At?setTimeout(()=>F(Bt),600):w(!0)}},c),(g||j)&&r.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[r.jsx(Pe,{size:20}),r.jsx("p",{className:"text-xs",children:l("sectionsEditor.imageField.previewUnavailable")})]}),!p&&!g&&!j&&r.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"}),r.jsx(It,{})]}),!d&&r.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:b}),M&&r.jsx("span",{className:"shrink-0 rounded-[var(--studio-control-radius,var(--radius))] bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:M})]})]}):r.jsxs("button",{type:"button",onClick:D,className:O("flex w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",d?"h-28":"h-40"),children:[r.jsx(Pe,{size:20}),r.jsx("span",{className:"text-sm font-medium",children:l(ce?"sectionsEditor.imageField.uploading":"sectionsEditor.imageField.dropImageOrClickToBrowse")}),!d&&r.jsx("span",{className:"text-xs text-muted-foreground",children:l("sectionsEditor.imageField.supportedFormatsAndSize")})]}),e[39]=D,e[40]=d,e[41]=M,e[42]=b,e[43]=g,e[44]=p,e[45]=ce,e[46]=i,e[47]=y,e[48]=N,e[49]=S,e[50]=c,e[51]=l,e[52]=j,e[53]=B):B=e[53];let V;e[54]!==le||e[55]!==l?(V=le&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:r.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:l("sectionsEditor.imageField.dropToUpload")})}),e[54]=le,e[55]=l,e[56]=V):V=e[56];let Q;e[57]!==he||e[58]!==A||e[59]!==B||e[60]!==V?(Q=r.jsxs("div",{...he,className:A,children:[B,V]}),e[57]=he,e[58]=A,e[59]=B,e[60]=V,e[61]=Q):Q=e[61];let G;e[62]!==ue?(G=P=>ue(P.target.value),e[62]=ue,e[63]=G):G=e[63];let Y;e[64]!==c?(Y=P=>{P.key==="Escape"&&_(c)},e[64]=c,e[65]=Y):Y=e[65];let W;e[66]!==l?(W=l("sectionsEditor.imageField.urlPlaceholder"),e[66]=l,e[67]=W):W=e[67];let K;e[68]!==o||e[69]!==me||e[70]!==G||e[71]!==Y||e[72]!==W||e[73]!==T?(K=r.jsx(Ye,{id:o,type:"url",value:T,onChange:G,onBlur:me,onKeyDown:Y,placeholder:W,className:"h-9 min-w-0 flex-1"}),e[68]=o,e[69]=me,e[70]=G,e[71]=Y,e[72]=W,e[73]=T,e[74]=K):K=e[74];let H;e[75]!==D||e[76]!==c||e[77]!==l?(H=!c&&r.jsxs(Ne,{type:"button",variant:"outline",size:"sm",onClick:D,className:"h-9 shrink-0",children:[r.jsx(Re,{size:14}),l("sectionsEditor.imageField.browse")]}),e[75]=D,e[76]=c,e[77]=l,e[78]=H):H=e[78];let J;e[79]!==k||e[80]!==c||e[81]!==l?(J=c&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{value:c,onChange:k}),r.jsx(Ne,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(""),className:"h-9 shrink-0","aria-label":l("sectionsEditor.imageField.removeImage"),children:r.jsx(He,{size:14})})]}),e[79]=k,e[80]=c,e[81]=l,e[82]=J):J=e[82];let X;e[83]!==K||e[84]!==H||e[85]!==J?(X=r.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[K,H,J]}),e[83]=K,e[84]=H,e[85]=J,e[86]=X):X=e[86];let Z;e[87]!==ve||e[88]!==xe||e[89]!==m||e[90]!==R||e[91]!==k?(Z=R?r.jsx("input",{ref:_e,type:"file",accept:[...Ae].join(","),className:"hidden",onChange:P=>{ve(P.target.files),P.target.value=""}}):r.jsx(et,{open:m,onOpenChange:x,mode:"image",onSelect:P=>k(P),lockedConfigId:xe}),e[87]=ve,e[88]=xe,e[89]=m,e[90]=R,e[91]=k,e[92]=Z):Z=e[92];let de;return e[93]!==z||e[94]!==Q||e[95]!==X||e[96]!==Z?(de=r.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[z,Q,X,Z]}),e[93]=z,e[94]=Q,e[95]=X,e[96]=Z,e[97]=de):de=e[97],de}function Bt(t){return t+1}function ms(t){const e=U.c(15),{isPending:s,isError:n}=t,a=ee();if(n){let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(ht,{size:13}),e[0]=d):d=e[0];let l;e[1]!==a?(l=a("sandbox.saveStatus.failed"),e[1]=a,e[2]=l):l=e[2];let u;return e[3]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[d,l]}),e[3]=l,e[4]=u):u=e[4],u}if(s){let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(We,{className:"size-[13px]"}),e[5]=d):d=e[5];let l;e[6]!==a?(l=a("sandbox.saveStatus.saving"),e[6]=a,e[7]=l):l=e[7];let u;return e[8]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[d,l]}),e[8]=l,e[9]=u):u=e[9],u}let o;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(Ke,{size:13}),e[10]=o):o=e[10];let i;e[11]!==a?(i=a("sandbox.saveStatus.saved"),e[11]=a,e[12]=i):i=e[12];let f;return e[13]!==i?(f=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[o,i]}),e[13]=i,e[14]=f):f=e[14],f}export{It as C,St as F,us as I,jt as M,cs as N,_t as Q,ds as R,ms as S,yt as a,De as b,wt as c,Ct as d,bt as e,Ft as f,Tt as g,kt as h,fs as i,Et as j,Mt as k,Pt as l,qt as m,$t as s,vt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aH as s,cp as e,aI as a,cq as d,bx as l}from"./index-
|
|
1
|
+
import{aH as s,cp as e,aI as a,cq as d,bx as l}from"./index-_VeebRNE.js";const o=500;s({title:a().max(o),url:a().max(o),icon:a().max(o)});const t=s({keyId:a().max(o),modelId:a().max(o),title:a().max(o).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:a().trim().toLowerCase().min(1).max(o).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:a().min(1).max(o).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(a().max(o)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),demo_board_reset:e().optional().describe("Curated demo org: every morning the task board returns to its captured snapshot, and admins can reset or recapture it on demand."),reports_only:e().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:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches 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:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment 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:e().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:e().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 Studio 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:e().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."),task_board_codex:e().optional().describe("Allow tasks to select the Codex harness. Off by default; existing tasks keep Claude Code. Reviewers keep their own runtime."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_run_metadata:e().optional().describe("Forward a sandbox run's metadata (such as a webhook trigger's run_metadata) to the MCP tools it calls, as hosted Decopilot runs do. Off by default."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().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:e().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:e().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:e().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:e().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."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().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:e().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.'),new_blocks_editor:e().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."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),site_apps_install_enabled:e().optional().describe("Installing a site app from the Apps tab: writes the app module, registers it (the manifest on Deno, APP_REGISTRY on TanStack), adds the npm dependency, then reinstalls dependencies and restarts the dev script on the running sandbox. Off by default — it writes code and restarts the dev server on install, and the restart only works on a daemon new enough to honour a forced step, so an org opts in once its pods are running one. With it off the catalogue stays browsable and nothing is installable, which is also the lever for an org that does not want the CMS writing code."),multi_app_preview:e().optional().describe("Previewing more than one app of a monorepo: an Apps list in project settings, app tabs with a split view in the preview, and a dev server per extra app in the sandbox, served at its own preview host. Off by default."),cms_auto_commit:e().optional().describe("Fast Preview: commit each CMS save to the editing branch. On by default (see DEFAULT_ON_FLAGS). Off, saves are kept in Studio and shown in the editor and the preview, and reach the branch in one commit when someone publishes or submits for review."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` app's own blocks (`blog/*`) everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible, plus, in the inserter, the sections under the blog app's `customSectionPaths`. Off by default. Blocks already present in a post keep rendering; this only governs what can be added."),blog_view_enabled:e().optional().describe("Blog as a project view of its own (a sidebar row, an app tile and `/blog`), edited on Blog drafts with each post beside the site's render of it. Off by default: the blog stays in the Site Editor's Content tab, and `blog-draft-` branches are ordinary drafts.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only","cms_auto_commit"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aH as r,dA as p,dy as _,aI as n,bx as o,cq as m}from"./index-
|
|
1
|
+
import{aH as r,dA as p,dy as _,aI as n,bx as o,cq as m}from"./index-_VeebRNE.js";const f=r({key:n().min(1,"Key is required"),value:n()}),g=r({title:n().min(1,"Name is required"),description:n().nullable().optional(),icon:n().nullable().optional(),ui_type:m(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:n().optional(),connection_token:n().nullable().optional(),npx_package:n().optional(),stdio_command:n().optional(),stdio_args:n().optional(),stdio_cwd:n().optional(),env_vars:o(f).optional(),configuration_scopes:o(n()).nullable().optional(),configuration_state:p(n(),_()).nullable().optional()}).refine(e=>e.ui_type==="NPX"?!!e.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(e=>e.ui_type==="STDIO"?!!e.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(e=>e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket"?!!e.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(e=>(e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket")&&e.connection_url?.trim()?n().url().safeParse(e.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function S(e,u,s){const a=i=>{if(i==="*")return!0;const c=i.split("::")[0]??"";let t=s;for(const l of c.split(".")){if(t===null||typeof t!="object")return!1;t=t[l]}return t!=null};return[...new Set([...e,...u.filter(a)])]}export{S as a,g as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,c4 as T,c0 as ce,j as b,c6 as _,ck as ae,e1 as O,c7 as C,ce as P,c8 as ie,c as F,m as $}from"./index-DokE5sNF.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,v]=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),m=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:m,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=v(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=v(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=v(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=v(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=v(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=v(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=B(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(me,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=B(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=v(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)}})}})}),me=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(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)}})}})}),[ve,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=v(g,o),[w,A]=d.useState(null),Y=T(e,m=>A(m)),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(m){if(x.current){const p=m.clientX-x.current.left,R=m.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const m=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(ve,{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,m=>{m.button===0&&(m.target.setPointerCapture(m.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(m))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.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=v(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 k="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=v(k,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=k;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=v(k,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 B(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] transition-[color,box-shadow] focus-ring",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,c4 as T,c0 as ce,j as b,c6 as _,ck as ae,e1 as O,c7 as C,ce as P,c8 as ie,c as F,m as $}from"./index-_VeebRNE.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,v]=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),m=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:m,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=v(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=v(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=v(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=v(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=v(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=v(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=B(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(me,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=B(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=v(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)}})}})}),me=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(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)}})}})}),[ve,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=v(g,o),[w,A]=d.useState(null),Y=T(e,m=>A(m)),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(m){if(x.current){const p=m.clientX-x.current.left,R=m.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const m=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(ve,{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,m=>{m.button===0&&(m.target.setPointerCapture(m.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(m))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.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=v(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 k="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=v(k,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=k;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=v(k,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 B(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] transition-[color,box-shadow] focus-ring",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 f,j as a,bW as j,h as I,bX as S,bY as b}from"./index-
|
|
1
|
+
import{c as f,j as a,bW as j,h as I,bX as S,bY as b}from"./index-_VeebRNE.js";import{i as g}from"./SearchMd-Cuy8VOOG.js";function N(x){const e=f.c(14),{value:r,onChange:l,placeholder:h,onKeyDown:i,className:p,isSearching:c,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==c?(s=a.jsx(j,{className:"pr-0",children:c?a.jsx(I,{className:"size-4"}):a.jsx(g,{})}),e[0]=c,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==i||e[6]!==m||e[7]!==t||e[8]!==r?(n=a.jsx(S,{type:"text",value:r,onChange:t,onKeyDown:i,placeholder:m,disabled:u}),e[4]=u,e[5]=i,e[6]=m,e[7]=t,e[8]=r,e[9]=n):n=e[9];let o;return e[10]!==p||e[11]!==s||e[12]!==n?(o=a.jsxs(b,{size:"sm",className:p,children:[s,n]}),e[10]=p,e[11]=s,e[12]=n,e[13]=o):o=e[13],o}export{N as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,r as C,m as B,j as a,b5 as M}from"./index-
|
|
1
|
+
import{c as K,r as C,m as B,j as a,b5 as M}from"./index-_VeebRNE.js";import{i as I}from"./SearchMd-Cuy8VOOG.js";import{I as O}from"./icon-button-trmtAOaJ.js";function G(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,_=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:"outline",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const k=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]!==k?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground shadow-edge",k,j),e[4]=j,e[5]=k,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 y=!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]!==y||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:y,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]=y,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==_||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":_,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]=_,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{G as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,az as d,b as j,j as i}from"./index-
|
|
1
|
+
import{c as x,az as d,b as j,j as i}from"./index-_VeebRNE.js";import{t as E}from"./Users01-UF7lWU9g.js";const R=/^[A-Za-z0-9_.-]+$/;function b(f){const e=x.c(15),{field:p,secretById:t}=f,s=j(),n=p.value||"";if(!n)return null;let l;e[0]!==n||e[1]!==t?(l=t.get(n),e[0]=n,e[1]=t,e[2]=l):l=e[2];const c=l;if(!c){let a;e[3]!==n||e[4]!==s?(a=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=a):a=e[5];let u;return e[6]!==a?(u=i.jsx("span",{className:"text-destructive",children:a}),e[6]=a,e[7]=u):u=e[7],u}let o;e[8]!==c.scope?(o=i.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=i.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=i.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(f){const e=x.c(2),{scope:p}=f,t=p==="user"?d:E;let s;return e[0]!==t?(s=i.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{b as S,R as a,N as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,b as N,j as s,n as C,hs as F,R as k,r as y,e0 as L,B as D,az as O,ah as T,D as B,v as R,w as A,x as I,aU as q,I as _,y as V,t as z,gh as H}from"./index-
|
|
1
|
+
import{c as j,b as N,j as s,n as C,hs as F,R as k,r as y,e0 as L,B as D,az as O,ah as T,D as B,v as R,w as A,x as I,aU as q,I as _,y as V,t as z,gh as H}from"./index-_VeebRNE.js";import{i as U}from"./AlertCircle-gyZP8TIO.js";import{s as G}from"./Plus-BYodv7tE.js";import{t as J}from"./Users01-UF7lWU9g.js";import{E as K}from"./empty-state-DvK349M1.js";import{L as w}from"./label-DZkEI5Ke.js";import{S as M,b as Q,a as W,d as X,c as P}from"./select-QgdI1Rfc.js";import{T as Y}from"./textarea-Cimn1xhl.js";import{u as Z,a as ee}from"./use-secrets-BGup3PHO.js";import{R as te}from"./require-capability-psnJqvDd.js";import"./index-BdQq_4o_.js";import"./index-PcrdQb7V.js";import"./ChevronDown-DldgAfZA.js";import"./ChevronUp-Bt9-G08q.js";import"./access-gate-EJXICSzm.js";import"./capability-load-error-C937GiKP.js";function se(t){const e=j.c(6),{error:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(U,{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 l;return e[4]!==n?(l=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]=l):l=e[5],l}function re(t){const e=j.c(8),{scope:r}=t,i=N(),c=r==="user"?O:J;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 l=n;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let m;return e[5]!==l||e[6]!==a?(m=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:[a,l]}),e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function $(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(T,{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(re,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let l;e[5]!==c||e[6]!==n?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=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]=a):a=e[9];let m;e[10]!==l||e[11]!==a?(m=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=m):m=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 u;e[15]!==d?(u=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=u):u=e[16];let x;return e[17]!==m||e[18]!==u?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[m,u]}),e[17]=m,e[18]=u,e[19]=x):x=e[19],x}function ne(t){const e=j.c(9),{action:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(T,{}),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 l;e[3]!==i?(l=i("settings.secrets.emptyDescription"),e[3]=i,e[4]=l):l=e[4];let a;return e[5]!==r||e[6]!==n||e[7]!==l?(a=s.jsx(H,{children:s.jsx(K,{size:"inline",icon:c,title:n,description:l,children:r})}),e[5]=r,e[6]=n,e[7]=l,e[8]=a):a=e[8],a}function E({open:t,onOpenChange:e}){const r=N(),[i,c]=y.useState("organization"),[n,l]=y.useState(""),[a,m]=y.useState(""),[d,u]=y.useState(""),x=ee();function g(){c("organization"),l(""),m(""),u("")}function p(){g(),e(!1)}async function S(o){if(o.preventDefault(),!(!n.trim()||!a))try{await x.mutateAsync({scope:i,name:n.trim(),value:a,description:d.trim()||void 0}),z.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){z.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(B,{open:t,onOpenChange:o=>{o?e(o):p()},children:s.jsxs(R,{className:"sm:max-w-lg",children:[s.jsxs(A,{children:[s.jsx(I,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,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(M,{value:i,onValueChange:o=>c(o),children:[s.jsx(Q,{id:"secret-scope",children:s.jsx(W,{})}),s.jsxs(X,{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(_,{id:"secret-name",value:n,onChange:o=>l(o.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(_,{id:"secret-value",type:"password",value:a,onChange:o=>m(o.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(Y,{id:"secret-description",value:d,onChange:o=>u(o.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(V,{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()||!a,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=j.c(34),e=N(),r=Z(),[i,c]=y.useState(!1);let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),l=s.jsx(G,{size:14}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let a;t[2]!==e?(a=e("settings.secrets.newSecret"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==a?(m=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[l,a]})}),t[4]=a,t[5]=m):m=t[5];const d=m;if(r.length===0){let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ne,{action:!1}),t[6]=o):o=t[6];let f;t[7]!==i?(f=s.jsx(E,{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,o,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let u,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const o=r.filter(oe),f=r.filter(ae),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let b;t[18]!==r.length||t[19]!==e||t[20]!==h?(b=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=b):b=t[21];let v;t[22]!==b?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:b}),t[22]=b,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=u):u=t[26],x=o.length>0?s.jsxs("section",{className:"surface 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:o.map(le)})]}):null,g=f.length>0?s.jsxs("section",{className:"surface 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(ce)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=u,t[16]=x,t[17]=g}else u=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(E,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let S;return t[29]!==u||t[30]!==x||t[31]!==g||t[32]!==p?(S=s.jsxs(s.Fragment,{children:[u,x,g,p]}),t[29]=u,t[30]=x,t[31]=g,t[32]=p,t[33]=S):S=t[33],S}function ce(t){return s.jsx($,{secret:t},t.id)}function le(t){return s.jsx($,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function me(){const t=j.c(7),e=N();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(k,{fallback:de,children:s.jsx(y.Suspense,{fallback:s.jsx(L,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),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(F,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function de(t){const{error:e}=t;return s.jsx(se,{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(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(me,{})}),t[0]=e):e=t[0],e}export{ze as default};
|
package/dist/client/assets/{section-array-field-DeyNfEV2.js → section-array-field-DeIFn5hU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bB as g,bA as E,f9 as w,eQ as L,fa as A,fb as y,fc as j,eL as d,fd as P,fe as T,ff as k,fg as D,fh as B,fi as R,bn as x,fj as C,fk as K}from"./index-
|
|
1
|
+
import{bB as g,bA as E,f9 as w,eQ as L,fa as A,fb as y,fc as j,eL as d,fd as P,fe as T,ff as k,fg as D,fh as B,fi as R,bn as x,fj as C,fk as K}from"./index-_VeebRNE.js";import{z as I,r as F,y as U,a0 as W,aa as $}from"./blocks-tab-states-DeaA94XX.js";const l="https://docs.decocms.com/storefront/blocks",ne={quickstart:`${l}/next/quickstart`,siteEditor:`${l}/next/site-editor#edit-on-your-machine`,serve:`${l}/next/cli#deco-serve`,schema:`${l}/next/cli#deco-schema-and-deco-content`,troubleshooting:`${l}/next/troubleshooting#site-editor`},ae="https://github.com/decocms/blocks/tree/main/.agents/skills/deco-site-workflow";function Y(e){return e.includes("matchers")||e.includes("Match")}function m(e,r){const t=e.__resolveType;return typeof t!="string"||!t||W(t,r)?!1:r?w(r,t):Y(t)}function oe(e,r){const t=[];for(const[n,a]of Object.entries(r)){if(n.includes("/")||!g(n,e)||E(n)||!a||typeof a!="object"||Array.isArray(a))continue;const o=a;m(o,e)&&t.push({blockKey:n,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return t.sort((n,a)=>(n.name??n.blockKey).localeCompare(a.name??a.blockKey))}function p(e,r,t){if(!e)return!1;const n=e.__resolveType;if(typeof n!="string"||!g(n,t)||!Object.hasOwn(r,n))return!1;const a=r[n];return!a||typeof a!="object"||Array.isArray(a)?!1:m(a,t)}function se(e,r,t){return p(e,r,t)?e?.__resolveType??null:null}function S(e,r,t){if(!e)return null;const n=e.__resolveType??"";if(!n)return null;if(p(e,r,t)){const s=r[n]??{},i=s.__resolveType??n,{__resolveType:c,name:u,...v}=s;return{resolveType:i,data:v,blockKey:n}}const{__resolveType:a,...o}=e;return{resolveType:n,data:o}}function q(e,r,t){const n=S(e,r,t);return n?{__resolveType:n.resolveType,...n.data}:{__resolveType:""}}function ie(e,r,t){if(e)return p(e,r,t)?q(e,r,t):e}function z(e,r,t,n){if(!e)return"Default";if(p(e,r,n)){const a=e.__resolveType??"",o=r[a];return I(a,o)}return t(e,F(r))}function ce(e,r,t){return{__resolveType:e,...r,name:t}}function ue(e){return{__resolveType:e}}function le(e,r,t){const n=S(e,r,t);return n?{resolveType:n.resolveType,formValue:n.data}:{resolveType:"",formValue:{}}}function fe(e,r){const t={__resolveType:e};if(!e||!r)return t;const n=U(e,r),a=n?.type==="inline-union"?n.inlineUnionBranches?.[0]?.discriminators:void 0;return a?{...t,...a}:t}function V(e){const r=[];for(let t=e;t?.key!=null;t=t.parent)r.push(t.key);return r.reverse()}function G(e){return{blockKey:e.blockKey,path:V(e)}}function N(e,r,t){const n=[];for(const[o,s]of Object.entries(e))o!==r&&n.push({node:s,blockKey:o,parent:null,key:null});const a=new Set;for(;n.length>0;){const o=n.pop(),{node:s}=o;if(!(!s||typeof s!="object")&&!a.has(s)){if(a.add(s),Array.isArray(s)){s.forEach((i,c)=>{n.push({node:i,blockKey:o.blockKey,parent:o,key:c})});continue}t(s,o);for(const[i,c]of Object.entries(s))n.push({node:c,blockKey:o.blockKey,parent:o,key:i})}}}function H(e,r,t){if(!r)return[];const n=[];return N(e,r,(a,o)=>{if(a.__resolveType!==r||!p(a,e,t))return;const s=Q(o);n.push({...G(o),...s?{variant:s}:{}})}),n}function Q(e){for(let r=e;r;r=r.parent){const t=r.parent,n=t?.parent,a=n?.parent;if(!t||!n||!a)return;if(r.key==="rule"&&typeof t.key=="number"&&n.key==="variants"&&$(a.node)&&L(a.node.__resolveType)){const o=a.node.experiment;return{containerPath:V(a),containerType:a.node.__resolveType,index:t.key,...typeof o=="string"?{experiment:o}:{}}}}}function J(e){for(const r of e.anyOfRefs??[]){if(r.resolveType!==A&&r.resolveType!==y)continue;const t=r.schema?.properties?.variants?.items?.properties?.value,n=t?.lazy?t.properties?.value:t;if(n?.type==="array")return n}}function X(e){return J(e)!==void 0}function ye(e,r){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return Array.isArray(t.variants)?t.__resolveType===R?!0:r&&t.__resolveType===y&&!M(t.variants):!1}function M(e){return e.some(r=>Array.isArray(d(r)))}function O(e,r){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return t.__resolveType===A?!0:r&&t.__resolveType===y&&Array.isArray(t.variants)&&M(t.variants)}function pe(e,r){if(!O(e,r))return null;const t=e.variants;if(!Array.isArray(t))return null;const n=x(t[0],r);return Array.isArray(n)?n:null}function ve(e,r,t,n){if(!O(e,n))return r;const a=structuredClone(e),o=[...a.variants??[]];return o.length===0?o.push({rule:k(t),value:T(a.__resolveType,r)}):o[0]=C(a.__resolveType,o[0],r),{...a,variants:o}}function de(e,r){const n=e[r]?.sections;if(!n||Array.isArray(n))return 1;const a=n;return Array.isArray(a.variants)?a.variants.length:1}function _e(e,r,t){const a=e[r]?.sections;if(Array.isArray(a))return t===0?a:[];if(a&&typeof a=="object"){const o=a.variants;if(Array.isArray(o)){const s=d(o[t]);return Array.isArray(s)?s:[]}}return[]}function he(e,r,t){if(Array.isArray(e))return[{label:"Default",sections:e}];if(e&&typeof e=="object"){const n=e;if(Array.isArray(n.variants)){const a=n.variants,o=j(a.map(s=>z(s.rule,r,t)));return a.map((s,i)=>{const c=o[i],u=d(s);return{label:c||`Variant ${i+1}`,sections:Array.isArray(u)?u:[],rule:s.rule}})}}return[]}function _(e,r,t){return{rule:k(r),value:T(t,e)}}function h(e,r){return e?e.__resolveType===y?y:A:D(r)}function f(e,r,t){return{...r,__resolveType:h(r,t),variants:e}}function be(e,r,t,n=!1){const a=structuredClone(r);if(e&&typeof e=="object"&&!Array.isArray(e)){const c=e;if(!Array.isArray(c.variants))return null;const u=[...c.variants],v=P(u,n);return u.splice(v,0,_(a,t,h(c))),{sections:f(u,c),newVariantIndex:v}}const o=h(void 0,t),s=_(Array.isArray(e)?e:[],t,o),i=_(a,t,o);return{sections:f(n?[i,s]:[s,i],void 0,t),newVariantIndex:n?0:1}}function Ae(e,r,t=!1){const n=e[r];if(!n)return null;const a=[...e];return a.splice(K(e,r,t),0,structuredClone(n)),a}function ge(e,r){if(r.length===0)return f([],e);if(r.length===1){const t=r[0],n=t?.rule;if(!B(n))return f(r,e);const a=d(t);if(Array.isArray(a))return a}return f(r,e)}function Z(e,r,t){return H(e,r,t).length}function Te(e,r,t,n){return n?!1:Z(e,r,t)===0}const ke={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};function b(e){return e.includes("/sections/")||e.includes("multivariate/section")||e===R}function ee(e){if(e.anyOfRefs?.length)return e.anyOfRefs.some(t=>b(t.resolveType));const r=e.properties?.__resolveType;return r?.type==="block-ref"&&r.anyOfRefs?.length?r.anyOfRefs.some(t=>b(t.resolveType)):!1}function Re(e){return e.type!=="block-ref"||!e.anyOfRefs?.length?!1:e.anyOfRefs.some(r=>b(r.resolveType))}function me(e,r){if(r==="global"||r==="sections"||X(e))return!0;const t=e.type==="array"?e.items:void 0;return t?ee(t):!1}export{Te as A,Ae as B,ke as C,ae as D,de as a,be as b,ne as c,X as d,me as e,q as f,_e as g,ue as h,b as i,Re as j,z as k,oe as l,se as m,le as n,p as o,he as p,ce as q,ie as r,fe as s,ye as t,O as u,pe as v,ve as w,J as x,S as y,ge as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as i}from"./File02-
|
|
1
|
+
import{s as i}from"./File02-EV4Uhu5z.js";import{dO as e}from"./index-_VeebRNE.js";import{a as s}from"./UserSquare-e0qIxN1Q.js";import{aF as n}from"./agent-icon-CfdcYUE7.js";import{a as o}from"./UserCheck01-Dqn7toBe.js";const r=["general","views","connections","repository","site"],y={general:{icon:o,titleKey:"virtualMcp.settings.general.title",descriptionKey:"virtualMcp.settings.general.description"},views:{icon:s,titleKey:"virtualMcp.settings.views.title",descriptionKey:"virtualMcp.settings.views.description"},connections:{icon:n,titleKey:"virtualMcp.settings.connections.title",descriptionKey:"virtualMcp.settings.connections.description"},repository:{icon:e,titleKey:"virtualMcp.settings.repository.title",descriptionKey:"virtualMcp.settings.repository.description"},site:{icon:i,titleKey:"virtualMcp.settings.site.title",descriptionKey:"virtualMcp.settings.site.description"}};function v(t){return!!t&&r.includes(t)}export{y as P,r as a,v as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ia as ti,br as ni,c as wn,b as jn,r as b,m as le,j as r,ca as si,bo as Cs,ib as Mo,B as It,Y as on,aw as ri,_ as oi,bq as ai,Z as ii,q as li,ic as bs,hI as ci,id as ui,ie as di,h as fi,bs as wt,ig as Qr,ih as xs,ii as mi,ij as pt,ik as Yr,il as pi,fS as hi,im as gi,io as Zr,ip as vi,t as H,fw as Xr,iq as yi,ir as Bt,is as Si,it as bi,iu as xi,fk as eo,iv as _s,iw as _i,ix as ki,iy as wi,fh as ji,fT as Ri,iz as Ei,iA as Vi,fv as Ti,K as Ai,iB as to,eP as Ni,fL as Hn,fQ as no,iC as so,iD as Ci,iE as Pi,iF as Bi,iG as Ki,iH as Di,iI as Mi,iJ as ro,iK as Fi,iL as Ii,fj as oo,iM as Li,iN as Oi,fN as ao,iO as zi,ff as $i}from"./index-_VeebRNE.js";import{u as Wi}from"./chat-context-DSu9o-d-.js";import{a as Xn,M as io}from"./save-status-DI5XwwX3.js";import{p as kn,f as Hi,n as qi}from"./parse-sections-BX1x8Bjk.js";import{a as Gi}from"./repository-binding-Ct6tvS6k.js";import{t as Ui}from"./ChevronDown-DldgAfZA.js";import{d as Fo,b as Ji}from"./UserCheck01-Dqn7toBe.js";import{n as Qi}from"./ChevronUp-Bt9-G08q.js";import{b as Zn,e as Yi,P as lo,K as co}from"./agent-icon-CfdcYUE7.js";import{S as an}from"./scroll-area-EnKfGRfx.js";import{c as jt,T as Rt,a as Et}from"./tooltip-BYnWhoO-.js";import{g as Zi,h as Xi,i as el,E as tl,j as nl,V as sl,k as rl,l as ol,G as al,s as Jn,v as Qn,u as il,p as Io,m as ll,n as cl,c as uo,o as ul,q as dl,A as qn,P as fo,w as mo,x as po,y as ks,z as fl,B as ml,D as ho,F as pl,J as go,K as vo,L as yo,M as hl,Q as So,T as ln,U as gl,W as vl}from"./held-block-view-KOyRMpy4.js";import{j as yl,u as Sl,i as bl,v as xl,aB as _l,U as kl,k as bo,aU as xo,a9 as Kt,aa as Dt,aq as wl,aV as jl,aW as Rl,aO as _o,at as El,aA as Vl}from"./site-editor-toast-Cjans_Z7.js";import{u as Tl,ao as ko,e as wo,j as Al,z as Nl,y as Gn,ad as Cl,ae as Pl,aj as Bl}from"./blocks-tab-states-DeaA94XX.js";import{u as Kl}from"./use-delete-block-CUXsAbin.js";import{b as Dl,u as Ml,k as Un,e as xn}from"./use-never-published-DDbQ0Vt8.js";import{a as Es,e as Lo}from"./UserSquare-e0qIxN1Q.js";import{b as Fl}from"./MessageCircle01-D170V1-p.js";import{i as jo}from"./Tool01-D6InpKaj.js";import{s as Ro}from"./Eye-BLpLvSpN.js";import{s as Il}from"./Plus-BYodv7tE.js";import{s as Ll}from"./Trash01-LecfbxTv.js";import{i as Vs}from"./Zap-D-fE_V4E.js";import{u as Ol,a as Eo,n as zl,P as $l,o as Wl,C as Hl,D as ql,c as Gl}from"./task-key-B6H-3XJr.js";import{u as Ul,s as Jl,a as Yn,S as Ql,v as Yl}from"./sortable.esm-CW9y-Z65.js";import{s as Zl,g as Xl,u as ec,A as tc}from"./use-section-preview-base-CErD4C9a.js";import{m as nc,P as sc}from"./mustache-uZ8plADR.js";import{r as Vo,u as rc,a as oc,i as ac,f as ic,B as lc}from"./empty-message-Cs32P_FY.js";import{u as cc,a as uc,P as To,w as dc,b as fc}from"./seo-editor-bIUZHc8M.js";import{v as mc,k as ws,x as Ao,j as pc,y as hc}from"./named-rule-step-DreL1Pcr.js";import{u as gc}from"./use-apply-named-rule-D9dIZN02.js";import{o as Jt,f as Ts,y as As,q as Ft,h as cn,u as vc,n as Ut,r as js,m as Mt,k as _n,b as yc,s as No,z as Sc,A as bc,B as xc}from"./section-array-field-DeIFn5hU.js";import{b as Co,a as _c}from"./variant-matcher-override-CdFxQaGp.js";import"./use-panel-navigate-D4GuHOu1.js";import"./thread-route-D_C8d7xK.js";import"./use-project-scope-CpfOkL8I.js";import"./use-view-draft-kind-BLkqtU-Q.js";import"./use-blog-view-DQBrFMuV.js";import"./use-organization-settings-ByKdFGhE.js";import"./schema-Bawh3LAf.js";import"./task-board-CHctJwrW.js";import"./thread-intent-pC76uPwU.js";import"./use-mcp-client-UP8_tZ9p.js";import"./auth-vqpzzu5D.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-_tvuBMId.js";import"./session-runtime-DLIbUSWD.js";import"./use-entitlements-B6kax2f9.js";import"./use-ai-providers-D6peTC8u.js";import"./use-current-view-a6HKOM5X.js";import"./use-in-settings-jNNDWh86.js";import"./use-decopilot-events-B0JW1Gtz.js";import"./Image01-BqCHFUEp.js";import"./Upload01-CABY93nl.js";import"./label-DZkEI5Ke.js";import"./SwitchHorizontal01-Daz2EgW0.js";import"./popover-CsisCWO2.js";import"./switch-7uXAaerp.js";import"./toggle-group-n8suP90I.js";import"./active-indicator-CCMhAsc_.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-aENtp_va.js";import"./asset-utils-CTFQl8QO.js";import"./useInfiniteQuery-CuAeAzcr.js";import"./infiniteQueryObserver-D7rUvD7y.js";import"./AlertCircle-gyZP8TIO.js";import"./hosted-reconcile-CxvdumkL.js";import"./SearchMd-Cuy8VOOG.js";import"./textarea-Cimn1xhl.js";import"./use-copy-DKfw8n-3.js";import"./ChevronSelectorVertical-BbGwltuJ.js";import"./command-DsEpQe7b.js";import"./index-ykH_xCiZ.js";import"./Play-PdUxpWZE.js";import"./monaco-editor-D-AA2j7y.js";import"./editor-Dv1qkRGx.js";import"./ArrowUp-DYnF34lU.js";import"./ArrowLeft-BSzt3fBA.js";import"./ArrowRight-BF8V67fk.js";import"./BookOpen01-CpYcxx0H.js";import"./Globe04-DzGa73Hy.js";import"./CheckCircle-CyybvOiK.js";import"./TrendUp01-C_SySyBC.js";import"./LinkBroken01-Br9NMWkB.js";import"./CreditCard01-vIJuQM5M.js";import"./File02-EV4Uhu5z.js";import"./Key01-KTk95wIy.js";import"./LayoutLeft-_2SG51dD.js";import"./Minus-D88-u0DO.js";import"./Monitor01-Df3mZyNU.js";import"./Sun-BABGQWS8.js";import"./ShoppingBag01-pCIsQ-Jb.js";import"./Users01-UF7lWU9g.js";import"./XClose-C9ONGfkv.js";import"./index-BdQq_4o_.js";import"./index-PcrdQb7V.js";import"./utils-Dovv0grx.js";import"./calendar-BbIAhjX6.js";import"./usage-stats-CCyq9Zgo.js";import"./utils-CVEq3hMx.js";import"./markdown-CBoNEgkf.js";import"./use-mobile-FS1bh43h.js";import"./gateway-client-DDICMs0d.js";import"./form-B3cubXs5.js";import"./select-QgdI1Rfc.js";import"./editor-classes-Bm1swfOR.js";import"./combobox-BCPDPSll.js";import"./use-sandbox-events-CPKES4Ee.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-JOmELUJ6.js";import"./use-voice-input-Dv1QYOod.js";import"./drawer-Ckz_nyBH.js";import"./index-QCTvcBUO.js";import"./checkbox-D4P_L8j1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-DN6h_KqP.js";import"./empty-state-DGaA5_7F.js";import"./search-input-JNlnu1vU.js";import"./tabs-C9s0KY6N.js";import"./use-debounced-value-BAma3ogA.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-CHh11R95.js";import"./collapsible-BJX4Hk9k.js";import"./use-task-board-items-DxcJSuMX.js";import"./config-iR6MS3mx.js";import"./task-route-CBxVmSL7.js";import"./project-index-QHWJWseM.js";import"./shell-layout-D8UbY9n5.js";import"./use-deployment-admin-BENsmKZ2.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-D5zuQ4m5.js";import"./integration-icon-D8pA0JHG.js";import"./project-icon-CoHnihPF.js";import"./use-navigate-to-agent-Dg2qYHJi.js";import"./new-project-dialog-B9UZLlxE.js";import"./repository-picker-D7wgGSh_.js";import"./github-icon-lV5tv6c5.js";import"./collection-search-DIaYviRG.js";import"./new-project-store-BzLAZn_u.js";import"./legacy-admin-welcome-dialog-ZZ1Gngd8.js";import"./required-auth-layout-5KQLVPyY.js";import"./use-org-sso-QMFtipA-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DtOO8I9w.js";import"./types-CdP485rd.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-8iInbf9D.js";import"./use-connection-cSaq7_i7.js";import"./use-mcp-prompts-BM9uSers.js";import"./use-thread-outputs-BRvk_pZG.js";import"./file-type-icon-C1PmpIi5.js";import"./slider-CnikFjRE.js";import"./index-NWJ7p_1D.js";import"./tooltipContext-DqZT6jLi.js";import"./CategoricalChart-CIY6jBUR.js";import"./index-j-nHo57s.js";import"./use-move-blocks-DAGy4lk4.js";const kc={escape:Zi};function wc(g,e){for(const p of Zl(g,e)){const S=typeof p.title=="string"?p.title:void 0;if(S?.includes("{{"))return S}}function jc(g,e){if(!e)return;const p=ti(g,ni(e));if(p)try{const S=wc(p.resolveType,e);return S&&nc.render(S,p.data,{},kc).trim()||void 0}catch{return}}function Rc(g){const e=wn.c(13),{icon:p,label:S,className:x}=g;let V;e[0]!==x?(V=le("size-3.5",x),e[0]=x,e[1]=V):V=e[1];let C;e[2]!==p||e[3]!==V?(C=r.jsx(p,{className:V}),e[2]=p,e[3]=V,e[4]=C):C=e[4];let _;e[5]!==S||e[6]!==C?(_=r.jsx(Rt,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":S,className:"shrink-0 cursor-help",children:C})}),e[5]=S,e[6]=C,e[7]=_):_=e[7];let P;e[8]!==S?(P=r.jsx(Et,{className:"max-w-56",children:S}),e[8]=S,e[9]=P):P=e[9];let k;return e[10]!==_||e[11]!==P?(k=r.jsxs(jt,{children:[_,P]}),e[10]=_,e[11]=P,e[12]=k):k=e[12],k}const Ec="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function Po(g){return Array.from({length:g},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Oo(g){return g.map((e,p)=>({...e,index:p}))}function Vc(g,e){if(e===g.length)return g;if(e<g.length)return Oo(g.slice(0,e));const p=Array.from({length:e-g.length},(S,x)=>({id:crypto.randomUUID(),index:g.length+x}));return[...g,...p]}function zo(g){const e=wn.c(44),{section:p,raw:S,meta:x,decofile:V}=g,C=jn(),_=Xn(),P=p.isSavedBlock===!0,k=p.isMultivariate===!0;let Z;e[0]!==x||e[1]!==S?(Z=S&&x?Xl(S,x):void 0,e[0]=x,e[1]=S,e[2]=Z):Z=e[2];const ge=Z;let Ue;e[3]!==x||e[4]!==k||e[5]!==S||e[6]!==P?(Ue=S&&x&&!P&&!k?jc(S,x):void 0,e[3]=x,e[4]=k,e[5]=S,e[6]=P,e[7]=Ue):Ue=e[7];const Le=Ue;let Ce;e[8]!==V||e[9]!==x||e[10]!==S||e[11]!==p?(Ce=rl(S,p,V,x),e[8]=V,e[9]=x,e[10]=S,e[11]=p,e[12]=Ce):Ce=e[12];const Je=Ce;let w;e[13]!==k||e[14]!==S?.__resolveType?(w=!k&&Cs(S?.__resolveType??""),e[13]=k,e[14]=S?.__resolveType,e[15]=w):w=e[15];const c=w,xe=P?Zn:k?Fo:Lo;let G;e[16]!==k||e[17]!==P?(G=P?{color:ai}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=P,e[18]=G):G=e[18];const _e=G;let F;e[19]!==xe||e[20]!==_?(F=_?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(al,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):r.jsx(Fl,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=_,e[21]=F):F=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let d;e[24]!==_||e[25]!==_e?(d=!_&&r.jsx(Es,{className:"h-4 w-4 shrink-0",style:_e}),e[24]=_,e[25]=_e,e[26]=d):d=e[26];const Oe=_?"shrink":"flex-1",u=p.isHidden&&"line-through opacity-50";let Ee;e[27]!==u||e[28]!==Oe?(Ee=le("min-w-0 truncate text-sm font-medium",Oe,u),e[27]=u,e[28]=Oe,e[29]=Ee):Ee=e[29];const X=Le??p.label;let ze;e[30]!==Ee||e[31]!==X?(ze=r.jsx("span",{className:Ee,children:X}),e[30]=Ee,e[31]=X,e[32]=ze):ze=e[32];let nt;e[33]!==c||e[34]!==_||e[35]!==Je||e[36]!==C?(nt=_?r.jsxs(r.Fragment,{children:[c&&r.jsx(Rc,{icon:Vs,label:C("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),Je&&r.jsx(io,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):Je&&r.jsx(io,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=_,e[35]=Je,e[36]=C,e[37]=nt):nt=e[37];let Pe;return e[38]!==ze||e[39]!==nt||e[40]!==F||e[41]!==ke||e[42]!==d?(Pe=r.jsxs(r.Fragment,{children:[F,ke,d,ze,nt]}),e[38]=ze,e[39]=nt,e[40]=F,e[41]=ke,e[42]=d,e[43]=Pe):Pe=e[43],Pe}const Tc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Ac="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function $o(g,e,p){if(p)return ol({selected:e});const S=g.isSavedBlock===!0,x=g.isMultivariate===!0;return le("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":S?Tc:x?Ac:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Rs(g,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":g?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Nc(g){const e=wn.c(90),{section:p,raw:S,meta:x,decofile:V,sortableId:C,selected:_,onSelect:P,onDelete:k,onDuplicate:Z,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Le,onAddVariant:Ce,onDetach:Je}=g,w=jn(),c=Xn(),xe=S?Cs(S.__resolveType??""):!1,G=p.isHidden===!0,_e=xe||G;let F;e[0]!==p?(F=Mo(p),e[0]=p,e[1]=F):F=e[1];const ke=F,d=!!Le&&!p.isMultivariate;let Oe;e[2]!==C?(Oe={id:C,animateLayoutChanges:Bc},e[2]=C,e[3]=Oe):Oe=e[3];const{attributes:u,listeners:Ee,setNodeRef:X,transform:ze,isDragging:nt}=Ul(Oe);let Pe;e[4]!==ze?(Pe=Hl.Transform.toString(ze?{...ze,x:0}:null),e[4]=ze,e[5]=Pe):Pe=e[5];const st=nt?0:void 0;let de;e[6]!==Pe||e[7]!==st?(de={transform:Pe,opacity:st},e[6]=Pe,e[7]=st,e[8]=de):de=e[8];const v=de;let we;e[9]!==p?(we=el(p),e[9]=p,e[10]=we):we=e[10];const rt=we,ot="button",m=0;let I;e[11]!==P?(I=M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),P())},e[11]=P,e[12]=I):I=e[12];const Xe=nt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==_||e[16]!==Xe?(A=le("touch-none transition-colors",Xe,$o(p,_,c)),e[13]=c,e[14]=p,e[15]=_,e[16]=Xe,e[17]=A):A=e[17];let Qe;e[18]!==V||e[19]!==x||e[20]!==S||e[21]!==p?(Qe=r.jsx(zo,{section:p,raw:S,meta:x,decofile:V}),e[18]=V,e[19]=x,e[20]=S,e[21]=p,e[22]=Qe):Qe=e[22];const W=!c&&d&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(Rs(_e,xe)),onClick:M=>{M.stopPropagation(),Le?.()},onPointerDown:Pc,children:r.jsx(Vs,{className:le("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Et,{side:"bottom",children:w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),at=c?r.jsx(tl,{label:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:G,onToggle:Ue,children:G?r.jsx(jo,{className:"h-3.5 w-3.5"}):r.jsx(Ro,{className:"h-3.5 w-3.5"})}):r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(Rs(_e,G)),onClick:M=>{M.stopPropagation(),Ue()},onPointerDown:Cc,children:G?r.jsx(jo,{className:"h-3.5 w-3.5"}):r.jsx(Ro,{className:"h-3.5 w-3.5"})})}),r.jsx(Et,{side:"bottom",children:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),fe=oi,Ye=nl;let ve;e[23]!==w?(ve=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ve):ve=e[24];const it=le(Rs(_e,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let $e;e[25]!==Ye||e[26]!==ve||e[27]!==it?($e=r.jsx(Ye,{label:ve,classicClassName:it}),e[25]=Ye,e[26]=ve,e[27]=it,e[28]=$e):$e=e[28];let Be;e[29]!==c||e[30]!==d||e[31]!==xe||e[32]!==Le||e[33]!==w?(Be=c&&d&&r.jsxs(r.Fragment,{children:[r.jsxs(on,{onClick:M=>{M.stopPropagation(),Le?.()},children:[r.jsx(Vs,{className:"h-4 w-4"}),w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(ri,{})]}),e[29]=c,e[30]=d,e[31]=xe,e[32]=Le,e[33]=w,e[34]=Be):Be=e[34];let Ke;e[35]!==Z?(Ke=M=>{M.stopPropagation(),Z()},e[35]=Z,e[36]=Ke):Ke=e[36];let se;e[37]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsx(Yi,{className:"h-4 w-4"}),e[37]=se):se=e[37];let Y;e[38]!==w?(Y=w("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=w,e[39]=Y):Y=e[39];let ee;e[40]!==Ke||e[41]!==Y?(ee=r.jsxs(on,{onClick:Ke,children:[se,Y]}),e[40]=Ke,e[41]=Y,e[42]=ee):ee=e[42];let D;e[43]!==c||e[44]!==ke||e[45]!==Ce||e[46]!==w?(D=ke&&r.jsxs(on,{className:le(!c&&sl),onClick:M=>{M.stopPropagation(),Ce()},children:[r.jsx(Fo,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ce,e[46]=w,e[47]=D):D=e[47];let T;e[48]!==c||e[49]!==rt||e[50]!==ge||e[51]!==w?(T=rt&&r.jsxs(on,{className:le(!c&&Ec),onClick:M=>{M.stopPropagation(),ge()},children:[c?r.jsx(Zn,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=c,e[49]=rt,e[50]=ge,e[51]=w,e[52]=T):T=e[52];let me;e[53]!==c||e[54]!==Je||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==w?(me=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(on,{onClick:M=>{M.stopPropagation(),Je()},children:[c?r.jsx(Lo,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=c,e[54]=Je,e[55]=p.isMultivariate,e[56]=p.isSavedBlock,e[57]=w,e[58]=me):me=e[58];let We;e[59]!==k?(We=M=>{M.stopPropagation(),k()},e[59]=k,e[60]=We):We=e[60];let et;e[61]===Symbol.for("react.memo_cache_sentinel")?(et=r.jsx(Ll,{className:"h-4 w-4"}),e[61]=et):et=e[61];let De;e[62]!==w?(De=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=De):De=e[63];let $;e[64]!==We||e[65]!==De?($=r.jsxs(on,{variant:"destructive",onClick:We,children:[et,De]}),e[64]=We,e[65]=De,e[66]=$):$=e[66];let ie;e[67]!==Be||e[68]!==ee||e[69]!==D||e[70]!==T||e[71]!==me||e[72]!==$?(ie=r.jsxs(ii,{align:"end",className:"w-44",children:[Be,ee,D,T,me,$]}),e[67]=Be,e[68]=ee,e[69]=D,e[70]=T,e[71]=me,e[72]=$,e[73]=ie):ie=e[73];let Ve;e[74]!==fe||e[75]!==$e||e[76]!==ie?(Ve=r.jsxs(fe,{children:[$e,ie]}),e[74]=fe,e[75]=$e,e[76]=ie,e[77]=Ve):Ve=e[77];let Te;return e[78]!==u||e[79]!==Ee||e[80]!==P||e[81]!==X||e[82]!==v||e[83]!==A||e[84]!==Qe||e[85]!==W||e[86]!==at||e[87]!==Ve||e[88]!==I?(Te=r.jsxs("div",{ref:X,style:v,...u,...Ee,role:ot,tabIndex:m,onClick:P,onKeyDown:I,className:A,children:[Qe,W,at,Ve]}),e[78]=u,e[79]=Ee,e[80]=P,e[81]=X,e[82]=v,e[83]=A,e[84]=Qe,e[85]=W,e[86]=at,e[87]=Ve,e[88]=I,e[89]=Te):Te=e[89],Te}function Cc(g){return g.stopPropagation()}function Pc(g){return g.stopPropagation()}function Bc(){return!1}function Ns(g){const e=wn.c(11),{canAddSection:p,onAddSection:S,className:x,size:V}=g,C=jn();let _;e[0]!==x?(_=le("w-full",x),e[0]=x,e[1]=_):_=e[1];const P=!p;let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Il,{size:14}),e[2]=k):k=e[2];let Z;e[3]!==C?(Z=C("sectionsEditor.sectionList.addSectionButton"),e[3]=C,e[4]=Z):Z=e[4];let ge;return e[5]!==S||e[6]!==V||e[7]!==_||e[8]!==P||e[9]!==Z?(ge=r.jsxs(It,{type:"button",variant:"outline",size:V,className:_,disabled:P,onClick:S,children:[k,Z]}),e[5]=S,e[6]=V,e[7]=_,e[8]=P,e[9]=Z,e[10]=ge):ge=e[10],ge}function Kc(g){const e=wn.c(101),{listKey:p,rawSections:S,sections:x,meta:V,decofile:C,selectedIndex:_,onSelect:P,onReorder:k,onDelete:Z,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Le,onToggleLazy:Ce,onAddVariant:Je,onDetach:w,onAddSection:c,canAddSection:xe}=g,G=xe===void 0?!0:xe,_e=jn(),F=Xn();let ke;e[0]!==x.length?(ke=()=>Po(x.length),e[0]=x.length,e[1]=ke):ke=e[1];const[d,Oe]=b.useState(ke),[u,Ee]=b.useState(null),[X,ze]=b.useState(p),[nt,Pe]=b.useState(x.length),st=b.useRef(!1);X!==p?(ze(p),Pe(x.length),Oe(Po(x.length))):nt!==x.length&&(Pe(x.length),Oe(tt=>Vc(tt,x.length)));let de;e[2]===Symbol.for("react.memo_cache_sentinel")?(de={activationConstraint:{distance:8}},e[2]=de):de=e[2];let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v={coordinateGetter:Jl},e[3]=v):v=e[3];const we=Ol(Eo($l,de),Eo(zl,v));let rt;e[4]!==d?(rt=d.map(Dc),e[4]=d,e[5]=rt):rt=e[5];const ot=rt;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=tt=>{Ee(String(tt.active.id))},e[6]=m):m=e[6];const I=m;let Xe;e[7]!==ot||e[8]!==k?(Xe=tt=>{Ee(null);const{active:O,over:Ae}=tt;if(!Ae||O.id===Ae.id)return;const He=ot.indexOf(String(O.id)),ht=ot.indexOf(String(Ae.id));He===-1||ht===-1||(Oe(bt=>Oo(Yn([...bt],He,ht))),st.current=!0,requestAnimationFrame(()=>{st.current=!1}),k?.(He,ht))},e[7]=ot,e[8]=k,e[9]=Xe):Xe=e[9];const A=Xe;let Qe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Qe=()=>{Ee(null)},e[10]=Qe):Qe=e[10];const W=Qe;let at,fe,Ye,ve,it,$e,Be,Ke,se,Y,ee,D,T,me,We;if(e[11]!==u||e[12]!==G||e[13]!==F||e[14]!==C||e[15]!==d||e[16]!==ot||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==Je||e[21]!==Z||e[22]!==w||e[23]!==ge||e[24]!==Ue||e[25]!==P||e[26]!==Le||e[27]!==Ce||e[28]!==S||e[29]!==x||e[30]!==_||e[31]!==we||e[32]!==_e){me=Symbol.for("react.early_return_sentinel");e:{const tt=O=>{st.current||P(O)};if(e[48]!==u||e[49]!==G||e[50]!==F||e[51]!==d||e[52]!==c||e[53]!==S||e[54]!==x||e[55]!==_e){const O=u?d.find(Ae=>Ae.id===u):null;if(ve=O!=null?x[O.index]:null,Ye=O!=null?S[O.index]:void 0,d.length===0){let Ae;e[59]!==_e?(Ae=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=Ae):Ae=e[60];let He;e[61]!==Ae?(He=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ae}),e[61]=Ae,e[62]=He):He=e[62];const ht=He;let bt;e[63]!==G||e[64]!==F||e[65]!==ht||e[66]!==c?(bt=F?ht:r.jsxs("div",{className:"space-y-2",children:[ht,r.jsx(Ns,{canAddSection:G,onAddSection:c,size:"sm"})]}),e[63]=G,e[64]=F,e[65]=ht,e[66]=c,e[67]=bt):bt=e[67],me=bt;break e}T=le(O&&"cursor-grabbing"),e[48]=u,e[49]=G,e[50]=F,e[51]=d,e[52]=c,e[53]=S,e[54]=x,e[55]=_e,e[56]=Ye,e[57]=ve,e[58]=T}else Ye=e[56],ve=e[57],T=e[58];fe=ql,Ke=we,se=Gl,Y=I,ee=A,D=W,at=Ql,$e=ot,Be=Yl,We="space-y-1",it=d.map(O=>{const Ae=x[O.index];return Ae?r.jsx(Nc,{sortableId:O.id,section:Ae,raw:S[O.index],meta:V,decofile:C,selected:_===O.index,onSelect:()=>tt(O.index),onDelete:()=>Z(O.index),onDuplicate:()=>ge(O.index),onMakeReusable:()=>Ue(O.index),onToggleHidden:()=>Le(O.index),onToggleLazy:Ce?()=>Ce(O.index):void 0,onAddVariant:()=>Je(O.index),onDetach:()=>w(O.index)},O.id):null})}e[11]=u,e[12]=G,e[13]=F,e[14]=C,e[15]=d,e[16]=ot,e[17]=A,e[18]=V,e[19]=c,e[20]=Je,e[21]=Z,e[22]=w,e[23]=ge,e[24]=Ue,e[25]=P,e[26]=Le,e[27]=Ce,e[28]=S,e[29]=x,e[30]=_,e[31]=we,e[32]=_e,e[33]=at,e[34]=fe,e[35]=Ye,e[36]=ve,e[37]=it,e[38]=$e,e[39]=Be,e[40]=Ke,e[41]=se,e[42]=Y,e[43]=ee,e[44]=D,e[45]=T,e[46]=me,e[47]=We}else at=e[33],fe=e[34],Ye=e[35],ve=e[36],it=e[37],$e=e[38],Be=e[39],Ke=e[40],se=e[41],Y=e[42],ee=e[43],D=e[44],T=e[45],me=e[46],We=e[47];if(me!==Symbol.for("react.early_return_sentinel"))return me;let et;e[68]!==it||e[69]!==We?(et=r.jsx("div",{className:We,children:it}),e[68]=it,e[69]=We,e[70]=et):et=e[70];let De;e[71]!==at||e[72]!==$e||e[73]!==Be||e[74]!==et?(De=r.jsx(at,{items:$e,strategy:Be,children:et}),e[71]=at,e[72]=$e,e[73]=Be,e[74]=et,e[75]=De):De=e[75];let $;e[76]!==Ye||e[77]!==ve||e[78]!==F||e[79]!==C||e[80]!==V?($=ve?r.jsx("div",{className:le("cursor-grabbing shadow-lift",$o(ve,!1,F)),children:r.jsx(zo,{section:ve,raw:Ye,meta:V,decofile:C})}):null,e[76]=Ye,e[77]=ve,e[78]=F,e[79]=C,e[80]=V,e[81]=$):$=e[81];let ie;e[82]!==$?(ie=si.createPortal(r.jsx(Wl,{dropAnimation:Xi,children:$}),document.body),e[82]=$,e[83]=ie):ie=e[83];let Ve;e[84]!==fe||e[85]!==Ke||e[86]!==se||e[87]!==Y||e[88]!==ee||e[89]!==D||e[90]!==De||e[91]!==ie?(Ve=r.jsxs(fe,{sensors:Ke,collisionDetection:se,onDragStart:Y,onDragEnd:ee,onDragCancel:D,children:[De,ie]}),e[84]=fe,e[85]=Ke,e[86]=se,e[87]=Y,e[88]=ee,e[89]=D,e[90]=De,e[91]=ie,e[92]=Ve):Ve=e[92];let Te;e[93]!==G||e[94]!==F||e[95]!==c?(Te=!F&&r.jsx(Ns,{canAddSection:G,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=G,e[94]=F,e[95]=c,e[96]=Te):Te=e[96];let M;return e[97]!==T||e[98]!==Ve||e[99]!==Te?(M=r.jsxs("div",{className:T,children:[Ve,Te]}),e[97]=T,e[98]=Ve,e[99]=Te,e[100]=M):M=e[100],M}function Dc(g){return g.id}function Mc(g,e,p,S){if(!g||typeof g!="object")return{kind:"error",reason:"no-matcher-rule"};const x=e.trim();if(!x)return Jt(g,p,S)?{kind:"inline",blockKey:g.__resolveType??"",inlinedRule:Ts(g,p,S)}:{kind:"noop"};const V=As(g,p,S);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Ft(V.resolveType,V.data,x)};const C=Jn(x),_=Qn(C,p);return _?{kind:"error",reason:"invalid-block-id",message:_}:{kind:"createBlock",blockId:C,blockData:Ft(V.resolveType,V.data,x),reference:cn(C)}}const Bo="section-form-stale-save",Fc=3;function Ko(g,e,p){const S=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Io(e.pageKey?g[e.pageKey]?.sections:void 0,g,p),x=Math.max(0,Math.min(e.pageVariantIndex,S.length-1)),V=S[x]?.sections??[];return{pageVariants:S,variantIndex:x,rawSections:V,parsedSections:kn(V,g,p)}}const Do=new WeakMap;let Ic=0;function Lc(g){let e=Do.get(g);return e===void 0&&(e=++Ic,Do.set(g,e)),e}function zf({orgSlug:g,virtualMcpId:e,branch:p,previewReady:S=!0,previewUrl:x,currentPath:V,activePageBlockKey:C=null,activeGlobalBlockKey:_=null,externalSelection:P,onSaved:k,initialEditSeo:Z=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Le,onFocusedBlockChange:Ce,onSectionPicked:Je,onVariantPreviewOverride:w}){const c=jn(),xe=Wi(),G=xe?.taskId??null,_e=S?{orgSlug:g,virtualMcpId:e,branch:p,threadId:G,previewUrl:x}:null,[F,ke]=b.useState([]),{data:d,isLoading:Oe}=yl(_e,{pollWhile:F.length>0}),{data:u,isLoading:Ee}=Tl(_e),X=Xn(),ze=xe?.virtualMcpId,Pe=Gi(ze===e?e:null)?.metadata?.siteSlug??null,st=ec({virtualMcpId:e,branch:p,sandboxUrl:x}),de=Sl(e,p),v=bl(de),we=Ti(v),rt=!v,ot=!!st||v,[m,I]=b.useState(null),[Xe,A]=b.useState(null),[Qe,W]=b.useState(null),[at,fe]=b.useState(0),[Ye,ve]=b.useState(void 0),[it,$e]=b.useState(null),Be={index:it,remember:$e},[Ke,se]=b.useState(null),[Y,ee]=b.useState(null),[D,T]=b.useState([]),me=b.useRef(null),[We,et]=b.useState(D.length);We!==D.length&&(et(D.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[De,$]=b.useState(0),[ie,Ve]=b.useState(null),[Te,M]=b.useState(null),[tt,O]=b.useState(null),[Ae,He]=b.useState(!1),[ht,bt]=b.useState(!1),Rn=b.useRef(null),[En,Wo]=b.useState(!0),[Qt,Vn]=b.useState(!1),[Lt,Tn]=b.useState(!1),[je,un]=b.useState(Z),[Ps,Bs]=b.useState(Z);Z&&!Ps&&(Bs(!0),un(!0),I(null),A(null),W(null),T([])),!Z&&Ps&&Bs(!1);const[Ho,dn]=b.useState(null),[Ks,An]=b.useState(void 0),[Ds,Ot]=b.useState([]),[Ms,Yt]=b.useState(0),[Me,lt]=b.useState(0),[qo,Fe]=b.useState(null),[Zt,qe]=b.useState(null),[Fs,Is]=b.useState(null),Nn=li(),Cn=xl({orgSlug:g,virtualMcpId:e,branch:p},{tunnel:!1}),fn=Dl({orgSlug:g,virtualMcpId:e,branch:p}),[Go,Uo]=b.useState(V),[Jo,Qo]=b.useState(C),[Yo,Zo]=b.useState(_);(Go!==V||Jo!==C||Yo!==_)&&(queueMicrotask(()=>fn.flush()),Uo(V),Qo(C),Zo(_),I(null),A(null),W(null),fe(0),se(null),ee(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1));const L=Ml({orgSlug:g,virtualMcpId:e,branch:p}),Ls=il({orgSlug:g,virtualMcpId:e,branch:p},d??{},{onSaved:k}),mn=Ls.save,Pn=Kl({orgSlug:g,virtualMcpId:e,branch:p}),Os=gc({orgSlug:g,virtualMcpId:e,branch:p}),[Xt,en]=b.useState(!1),N=b.useRef(null),_t=b.useRef(null),gt=b.useRef(null),vt=b.useRef(null),Bn=b.useRef({}),zt=b.useRef(null),pn=b.useRef(!1),hn=b.useRef(!1),ye=b.useRef(new Map),tn=b.useRef(!1),ct=b.useRef([]),es=b.useRef(new WeakSet);_l(g,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:o,selectedSectionIndex:a}=re.current,i=new Set;n&&i.add(n);for(const l of[_t.current?.sectionIndex,a]){const f=l==null?void 0:s[l],R=l==null?void 0:o[l],h=f&&R?.isSavedBlock?bs(f,R):null;h&&i.add(h)}if([...i].some(l=>t.has(l))){for(const l of[N,gt,vt])l.current&&clearTimeout(l.current),l.current=null;_t.current=null,ye.current.clear(),n&&t.has(n)&&(Bn.current={})}});const re=b.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[zs,$s]=b.useState(0),[Xo,ea]=b.useState(0),Ws=ci(de,{orgSlug:g,virtualMcpId:e,branch:p}),Hs=ui(Ws,F[0]?.blockKey??null,di(d,F[0]?.blockKey??null)),[ta,na]=b.useState(null),ts=kl(g,e).epoch,[sa,ra]=b.useState(ts);cc(je?{orgSlug:g,virtualMcpId:e,branch:p}:null,d??void 0,u??void 0);const qs=_??(d&&u?ko(wo(d,u),V,C)?.key??null:null),ns=bo({orgSlug:g,virtualMcpId:e,branch:p},qs?[qs]:[],{withRefs:!0}),[Gs,oa]=b.useState(!1),ss=bo({orgSlug:g,virtualMcpId:e,branch:p},Gs?Al:[]),Us={ready:!(de.kind==="protocol"&&de.hosted)||Gs&&ss.ready,failed:ss.failed,retry:ss.retry,request:()=>oa(!0)};if(ns.failed)return r.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center text-sm text-muted-foreground",children:[r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailed")}),r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailedHint")}),r.jsx(It,{variant:"outline",size:"sm",onClick:ns.retry,children:c("sectionsEditor.namedRules.tryAgain")})]});if(!S||Oe||Ee||!ns.ready)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(fi,{className:"size-5 text-muted-foreground"})});if(!d||!u)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const aa=wo(d,u),q=!!_,oe=q?null:ko(aa,V,C),y=q?_:oe?.key??null,rs=q&&_?d[_]:void 0,Js=q&&_&&rs?Nl(_,rs):q&&_?_:"",nn=!q&&y&&d[y]?d[y]:null,os=je&&d&&u&&y&&oe?Vo(d,{kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},u):null,ia=je?nn?.seo:void 0,Kn=Ks!==void 0?Ks:ia,la=je?rc(Kn):void 0,Qs=os?.seoTypeOptions??[],Ys=je&&u?oc(u):"",as=Ho??la??{},Dn=je&&os?uc(as,os):null,Zs=je&&Dn&&ac(Kn)?Gn(Dn,u):null,Xs=je?ic(d,u)?.seoData:void 0,pe=q?[{label:"Default",sections:[{__resolveType:_}]}]:Io(nn?.sections,d??{},v),yt=pe.length>1,te=Math.min(at,pe.length-1),Se=pe[te],B=Se?.sections??[],ce=kn(B,d,v),Mn=!q&&vc(nn?.sections,v);if(q&&_&&Fs!==_){Is(_);const t=B[0],n=ce[0];if(t&&n){I(0),lt(0),T([]);const s=wt(t,n,d,v);s&&(A(s.data),W(s.resolveType),qe(null),Fe(null))}}!q&&Fs!==null&&Is(null),re.current={rawSections:B,parsedSections:ce,decofile:d??{},activePageKey:y,pageVariants:pe,variantIndex:te,sectionVariantIndex:Me,selectedSectionIndex:m};const ca=()=>({multivariate:Mn,index:te,variants:pe.map(t=>({rule:t.rule})),lazyValues:v&&Mn&&Ni(nn?.sections?.variants?.[te]?.value)}),is=(t,n)=>{if(!w)return;if(!y||!Mn||t.length<=1){w(null);return}const s={multivariate:!0,index:n,variants:t},o=v?xo(y,s):Co(y,s,d,u);w(o.length>0?o:null)},ls=w&&y&&Mn&&yt&&!Oe&&!Ee?y:null;if(ls!==ta&&(na(ls),ls)){const t=pe.map(s=>({rule:s.rule})),n=te;queueMicrotask(()=>is(t,n))}const $t=(t,n,s)=>{if(!w)return;if(!y){w(null);return}const o=ca(),a=v?xo(y,o):Co(y,o,d,u);if(!t||n<0){w(a.length>0?a:null);return}const i={pageKey:y,page:o,sectionIndex:n,sectionLazy:ce[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=v?jl(i):_c({...i,decofile:d,meta:u}),f=v?Rl(a,l):[...a,...l];w(f.length>0?f:null)},xt=(t,n,s,o=m??-1,a=!1)=>{const i=pt(t,n);if(!i){A(null),W(null),qe(null),Fe(null),a&&$t(null,o,s);return}const f=Yr(i,we)[s];if(!f){A(null),W(null),qe(null),Fe(null),a&&$t(null,o,s);return}const R=gi(f.value,d);A(R?.data??null),W(R?.resolveType??null);const{resolveType:h,formValue:j}=Ut(f.rule,d,u??void 0);qe(h),Fe(j),a&&$t(i,o,s)},cs=t=>{M(null),fe(t),I(null),A(null),W(null),T([]);const n=pe[t]?.rule,{resolveType:s,formValue:o}=Ut(n,d??{},u??void 0);ee(s),se(o),is(pe.map(a=>({rule:a.rule})),t)},ua=(t,n)=>{const s=B[t],o=ce[t];if(!s||!o)return!1;const a=o.isMultivariate?pt(s,o)?.variants?.length??0:0,i=n<a?n:0;if(I(t),lt(i),T([]),$(l=>l+1),o.isMultivariate)xt(s,o,i,t);else{const l=wt(s,o,d,v);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),qe(null),Fe(null)}return!0},er=P?.index;if(P!==void 0&&(P?.seq??null)!==Ye&&(ve(P?.seq??null),typeof er=="number"&&ua(er,0)),ts!==sa){ra(ts);const t=N.current!==null||ye.current.size>0||vt.current!==null||gt.current!==null||L.isPending||Ls.isPending||fn.isPending||F.length>0,n=m!==null&&Qr(me.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=B[m],o=ce[m];if(T([]),$(a=>a+1),!s||!o)I(null),A(null),W(null);else if(o.isMultivariate)xt(s,o,Me,m);else{const a=wt(s,o,d,v);A(a?.data??null),W(a?.resolveType??null)}}!t&&je&&(dn(null),An(void 0),Yt(s=>s+1))}if(zs!==Xo){ea(zs);const t=m!==null?B[m]:null,n=m!==null?ce[m]:null;if(t&&n&&m!==null)if(T([]),$(s=>s+1),n.isMultivariate)xt(t,n,Me,m);else{const s=wt(t,n,d,v);A(s?.data??null),W(s?.resolveType??null)}}const ut=F[0];if(ut){const{formBase:t,target:n}=ut,s=Ko(d,n,v),o=t.sectionIndex,a=s.rawSections.length===t.sectionCount?xs(s.rawSections[o],s.parsedSections[o],n.sectionVariantIndex,d,v):null,i=mi(ut,a,l=>Zr(t,l));if(i){const f=[{...ut,...i,changedAgain:!0},...F.slice(1)];ct.current=f,ke(f)}}const gn={orgSlug:g,virtualMcpId:e,branch:p,threadId:G,previewUrl:v?void 0:x??void 0,siteSlug:Pe},Fn=Qe&&u?Gn(Qe,u):null,dt=(t,n)=>{if(!y)return;N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),vt.current&&(clearTimeout(vt.current),vt.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null);const s=ln(d,y,t,te,pe);L.mutate({blockKey:y,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:o=>{n?.onError?.(),L.reportError(o)}})},Wt=()=>{Ce?.(null),I(null),Tn(!1),A(null),W(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1)},tr=()=>Qr(me.current,document.activeElement),us=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),_t.current=null,H.error(t,{id:Bo}),tr()){tn.current=!0;return}$s(n=>n+1)},nr=()=>{!tn.current||tr()||ct.current.length>0||N.current!==null||pn.current||hn.current||ye.current.size>0||(tn.current=!1,$s(t=>t+1))},sr=()=>{tn.current&&setTimeout(nr,0)},rr=de.kind==="protocol"&&de.source==="github",or=t=>Vl(Nn,Cn,t,de.kind==="protocol"?de:null),ar=t=>{ye.current.size!==0&&setTimeout(()=>{if(pn.current||hn.current)return;const n=[...ye.current.values()];ye.current.clear();for(const s of n)s()},t)},da=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:o}=re.current,a=zt.current;return{formBase:a?.sectionIndex===t&&a.variantIndex===o?a:null,pageKey:n,global:q,pageVariantIndex:s,sectionVariantIndex:o,schema:Fn}},vn=t=>{ct.current=t,ke(t)},fa=t=>{const n=ct.current,s=n.findIndex(i=>i.formBase===t.formBase),o=s>=0?n[s]:void 0,a=o?n.with(s,{...t,choices:so(o.plan,o.choices,t.plan),fresh:Li(o.plan,t.plan,o.fresh),changedAgain:o.changedAgain||Hn(o.plan.theirs)!==Hn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(a)},ir=(t,n)=>{const s=ct.current,o=s.findIndex(l=>l.formBase===t),a=s[o];if(!a)return!1;if(Hn(a.plan.mine)===Hn(n))return!0;const i=no({...a.plan,mine:n});if(i.pointers.length===0){const l=s.filter(f=>f!==a);return vn(l),!1}return vn(s.with(o,{...a,plan:i,choices:so(a.plan,a.choices,i)})),!0},ma=t=>{const n=re.current;return n.selectedSectionIndex===t.formBase.sectionIndex&&n.activePageKey===t.target.pageKey&&n.variantIndex===t.target.pageVariantIndex&&n.sectionVariantIndex===t.target.sectionVariantIndex},pa=()=>{const t=ct.current[0];if(!t)return null;const{formBase:n,target:s}=t;N.current&&_t.current?.sectionIndex===n.sectionIndex&&_t.current.sectionVariantIndex===s.sectionVariantIndex&&(clearTimeout(N.current),N.current=null,_t.current=null),ye.current.delete(`${s.pageKey}:${n.sectionIndex}:${s.sectionVariantIndex}`);const o=n.emitted;return o&&typeof o=="object"&&!ir(n,o)&&yn(o,n.sectionIndex,0,s),ct.current[0]??null},ha=()=>{const t=ct.current[0],n=pa();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=Ri(n.plan,n.choices);de.kind==="protocol"&&de.source==="github"&&Ei(n.plan,n.choices)&&wl(c,!1),vn(ct.current.slice(1));const{formBase:o,target:a}=n;o.base=n.plan.theirs,o.version=void 0,o.emitted=s,es.current.add(o),(zt.current===o||ma(n))&&(zt.current=o,A(s),$(i=>i+1)),yn(s,o.sectionIndex,0,a)},ga=t=>{const[n,...s]=ct.current;n&&vn([{...n,choices:t},...s])},yn=(t,n,s=0,o,a=!1)=>{const i=o??da(n),l=i.sectionVariantIndex,f=i.formBase,R=a||to(ct.current,f,i,n,v).runNow,h=_t.current;N.current&&(clearTimeout(N.current),N.current=null,h&&(h.sectionIndex!==n||h.sectionVariantIndex!==l)&&h.write());const j=`${i.pageKey}:${n}:${l}`,E=()=>{if(pn.current||hn.current){ye.current.set(j,E);return}const K=typeof t=="function"?t():t,z=to(ct.current,f,i,n,v).base;if(z&&ir(z,K))return;const ne=re.current.decofile,{rawSections:J,parsedSections:Ne,pageVariants:Q,variantIndex:be}=Ko(ne,i,v),Ie=i.pageKey,he=J[n];if(!he)return;const ue=Ne[n];if(!ue)return;const Ge=f?.base,Ze=xs(he,ue,l,ne,v),Nt=!!Ge&&!!Ze&&Ci(Ge,Ze)&&!(f&&Zr(f,Ze));if(Nt&&Ge&&Ze){if(Pi(Ge,Ze)){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const U=ue.isSavedBlock?"here":Bi(Ge,J.map((ae,mt)=>xs(ae,Ne[mt],l,ne,v)),n,f?.sectionCount??J.length);if(U==="unknown"){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof U=="number"&&f){f.sectionCount=J.length,f.sectionIndex=U,zt.current===f&&I(U),yn(K,U,s,i);return}}const Ct=Nt&&Ge&&Ze?no({ancestor:Ge,mine:K,theirs:Ze}):null;if(Ct&&Ct.pointers.length>0&&f){f.sectionCount=J.length,fa({plan:Ct,formBase:f,target:i,sectionIndex:n,choices:Ki(Ct),changedAgain:!1,blockKey:ue.isSavedBlock?bs(he,ue):Ie,fresh:{}});return}const Pt=Ct?Ct.merged:null,rn=Pt??K,Gr=Di({merged:!!Pt,tracked:f,current:zt.current,saved:K});Pt&&H.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Bo}),Gr&&f&&(f.emitted=Pt,A(Pt));const Ss=Gr||!Pt?rn:K;f&&(f.base=Ss,f.sectionCount=J.length,Mi(f,Ss));const Ur={onSuccess:()=>{f&&es.current.delete(f),k?.()},onError:U=>{if(f?.base===Ss&&Ge&&(f.base=Ge),U instanceof El){if(f&&(f.version=void 0),s<Fc){ye.current.delete(j),hn.current=!0;const ae=Oi(s,U.carriedStored);setTimeout(()=>{hn.current=!1,yn(()=>{const mt=f?.emitted;return mt&&typeof mt=="object"?mt:K},n,s+1,i,ae.immediate),ye.current.delete(j),ar(xn(v))},ae.delay)}else us();return}L.reportError(U)}},Jr=U=>{pn.current=!0;let ae=!1;L.mutateAsync(U).then(()=>Ur.onSuccess(),mt=>{ae=!0,Ur.onError(mt)}).finally(()=>{pn.current=!1,ar(ae?xn(v):0),nr()})};if(ue.isSavedBlock){const U=bs(he,ue);if(!U)return;Jr({blockKey:U,data:rn,...Ge?{base:{value:Fi({startedFrom:Ge,stored:Ze,rebased:!!Pt,refused:s>0})}}:{},rebaseOnConflict:!1,guard:ro({formBase:f,rebased:!!Pt,versionOf:or,productionVersionOf:ae=>ao(Nn,Cn,ae),...rr?{copy:{value:ne[U]}}:{}})});return}if(!Ie)return;const Wn={...ne[Ie]},Gt=[...J];if(ue.isMultivariate){const U=pt(he,ue);if(!U||!Ie)return;const ae=Ii(U,l,rn);Gt[n]=Bt(he,ue,ae)}else if(ue.isHidden){const U=Cs(he.__resolveType),ae=U?{...he.section}:{...he},mt=Array.isArray(ae.variants)?[...ae.variants]:[];mt[0]&&(mt[0]=oo(ae.__resolveType,mt[0],rn)),ae.variants=mt,U?Gt[n]={...he,section:ae}:Gt[n]=ae}else ue.isLazy?Gt[n]={...he,section:rn}:Gt[n]=rn;if(Q.length>1){const U=Wn.sections,ae=[...U?.variants??[]];ae[be]&&(ae[be]=oo(U?.__resolveType,ae[be],Gt)),Wn.sections={...U,variants:ae}}else Wn.sections=Gt;Jr({blockKey:Ie,data:Wn,rebaseOnConflict:!1,guard:ro({formBase:null,rebased:!1,versionOf:or,productionVersionOf:U=>ao(Nn,Cn,U),...rr?{copy:{value:ne[Ie]}}:{}})})};if(_t.current={sectionIndex:n,sectionVariantIndex:l,write:E},R){_t.current=null,E();return}N.current=setTimeout(()=>{N.current=null,E()},xn(v))},va=t=>{tn.current=!1,I(t),lt(0),T([]),$(a=>a+1);const n=B[t],s=ce[t];if(Ce?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){xt(n,s,0,t);return}const o=wt(n,s,d,v);if(!o){A(null),W(null),qe(null),Fe(null),$t(null,t,0);return}A(o.data),W(o.resolveType),qe(null),Fe(null),$t(null,t,0)},lr=t=>{const n=t;m!==null&&(zt.current=Vi(zt.current,{sectionIndex:m,variantIndex:re.current.sectionVariantIndex,shown:Xe,next:n,sectionCount:re.current.rawSections.length})),A(n),m!==null&&yn(n,m)},ds=t=>{if(!y||!d||!u||!oe)return;const n={kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},s=Vo(d,n,u);s&&fn.save(y,()=>{const o=Nn.getQueryData(Ai.decofile(Cn))?.[y];if(!o||typeof o!="object"||o===null||Array.isArray(o))return null;const a={...o,...Bn.current};return Bn.current={},t?.raw!==void 0?dc(a,t.raw,u):t?.inner!==void 0?fc(n,s,a,t.inner):a})},cr=(t,n)=>{y&&(Bn.current[t]=n,ds())},ya=(t,n)=>{if(!y)return;const s=Yn([...B],t,n);m!==null&&(m===t?I(n):t<m&&n>=m?I(m-1):t>m&&n<=m&&I(m+1)),dt(s)},Sa=t=>{if(!y)return;const n=B.filter((s,o)=>o!==t);m===t?Wt():m!==null&&m>t&&I(m-1),dt(n)},ba=t=>{if(!y)return;const n=B[t];if(!n)return;const s=[...B];s.splice(t+1,0,gl(n)),m!==null&&m>t&&I(m+1),dt(s)},xa=t=>{if(!y)return;const n=B[t],s=ce[t];if(!n||!s)return;const o=s.isHidden?ki(n,v):wi(n,u);if(!o)return;const a=[...B];a[t]=o,m===t&&Wt(),dt(a)},_a=t=>{if(!y)return;const n=B[t],s=ce[t];if(!n||!s||s.isMultivariate)return;const o=_i(n);if(!o)return;const a=[...B];a[t]=o,m===t&&Wt(),dt(a)},ka=t=>{if(!y)return;const n=B[t],s=ce[t];if(!n||!s?.isSavedBlock)return;const o=wt(n,s,d,v);if(!o?.data)return;const{name:a,...i}=o.data,l=[...B];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&Wt(),dt(l)},wa=t=>{if(!y)return;const n=qi(ce),s=[...B.slice(0,n),{__resolveType:t.resolveType},...B.slice(n)];dt(s,{onError:()=>{re.current.selectedSectionIndex===n&&Wt()}}),He(!1),I(n),lt(0),T([]),$(l=>l+1);const o=s[n],a=kn(s,d,v)[n];if(!o||!a)return;if(a.isMultivariate){xt(o,a,0);return}const i=wt(o,a,d,v);if(!i){A(null),W(null),qe(null),Fe(null);return}A(i.data),W(i.resolveType),qe(null),Fe(null)},ur=t=>{Rn.current=t.append,He(!0)},ja=t=>{const n=Rn.current;if(!n){wa(t);return}n({__resolveType:t.resolveType}),He(!1),Rn.current=null},dr=t=>{if(m===null)return;const n=B[m],s=ce[m];!n||!s?.isMultivariate||(lt(t),T([]),$(o=>o+1),xt(n,s,t,m,!0))},Ra=t=>{if(m===null||!y)return;const n=B[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=bi(o,t);if(!a){H.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...B];i[m]=Bt(n,s,a);const l=a.variants;let f=Me;t===Me?f=Math.min(t,l.length-1):t<Me&&(f=Me-1),lt(f),T([]),$(R=>R+1),xt(i[m],s,f),dt(i)},Ea=t=>{if(m===null||!y)return;const n=B[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=xi(o,t,v),i=[...B];i[m]=Bt(n,s,a);const l=eo(o.variants??[],t,v);lt(l),T([]),$(f=>f+1),xt(i[m],s,l,m,v),dt(i)},Va=(t,n)=>{if(m===null||!y||t===n)return;const s=B[m],o=ce[m];if(!s||!o?.isMultivariate)return;const a=pt(s,o);if(!a)return;const i=yi(a,t,n),l=[...B];l[m]=Bt(s,o,i);let f=Me;Me===t?f=n:t<Me&&n>=Me?f=Me-1:t>Me&&n<=Me&&(f=Me+1),lt(f),xt(l[m],o,f,m,v),dt(l)},Sn=t=>{const n=t??m;if(n===null||!y)return;const s=B[n],o=ce[n];if(!s||!o)return;const a=vi(s,o,void 0,u,v);if(!a){H.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...B];i[n]=a.section;const l=kn(i,d,v)[n];if(!l?.isMultivariate){H.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}I(n),lt(a.newVariantIndex),T([]),$(f=>f+1),xt(a.section,l,a.newVariantIndex,n,v),dt(i)},fr=()=>{if(m===null||!y)return;const t=B[m],n=ce[m];if(!t||!n?.isMultivariate)return;const s=pt(t,n);if(!s)return;const o=Si(t,n,s);if(!o){H.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const a=[...B];a[m]=o;const i=kn(a,d,v)[m];if(!i)return;lt(0),qe(null),Fe(null),T([]),$(f=>f+1);const l=wt(o,i,d,v);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),$t(null,m,0),dt(a)},Ta=async t=>{if(ie===null||!y)return;const n=Qn(t,d,u);if(n){H.error(n);return}const s=B[ie],o=ce[ie];if(!s||!o)return;const a=wt(s,o,d,v);if(!a){H.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...a.data,name:t};try{const l=await L.mutateAsync({blockKey:t,data:i,create:!0}),f=[...B];f[ie]={__resolveType:t},await L.mutateAsync({blockKey:y,data:ln(d,y,f,te,pe)}),m===ie&&Wt(),Ve(null),Un(l)||H.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){H.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Kt(c,Dt(l))})}},mr=Se?.rule;if(yt&&m===null&&Y===null&&mr){const{resolveType:t,formValue:n}=Ut(mr,d??{},u??void 0);ee(t),se(n)}const sn=u?ll(u):[],fs=u&&d?cl(u,d):[],Ht=v&&u&&d?mc(u,d):[],ms=(t,n)=>{if(Ht.length===0)return;const s=Cl(t);return{kinds:Ht,selected:s,campaignPrefill:pc(t),onPick:n,load:Us}},pr=!q&&!!(ot&&u&&d),hr=Y&&u?Gn(Y,u):null,St=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},qt=async(t,n)=>{if(bc(n,t,u,v))try{await Pn.mutateAsync({blockKey:t})}catch(s){H.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Kt(c,Dt(s))})}},gr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a={...s[n]},i={...a.sections},l=[...i.variants??[]],f=l[o],R=f?.rule;if(Jt(R,s,u)){const h=R?.__resolveType??"",j=s[h],E=typeof j?.name=="string"?j.name:h,{__resolveType:K,...z}=t;L.mutate({blockKey:h,data:Ft(K??"",z,E)},{onSuccess:()=>k?.(),onError:L.reportError});return}f&&(l[o]={...f,rule:t}),a.sections={...i,variants:l},L.mutate({blockKey:n,data:a},{onSuccess:()=>k?.(),onError:L.reportError})},xn(v))},vr=t=>{ee(t);const n=t?No(t,u):{__resolveType:Xr(u)};se(t?n:{}),gr(n)},yr=t=>{const n=t;se(n);const s=Y?{__resolveType:Y,...n}:{...n};gr(s)},In=async(t,n,s)=>{const o=hc(n,t);if(!o.ok)return o.reason==="conflict"&&H.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),_o),null;const a={};if(s){const i=s(o.rule);if(!i)return null;a[i.blockKey]=i.data}return o.blockWrite&&(a[o.blockWrite.blockKey]=o.blockWrite.block),Object.keys(a).length>0&&!(await Os.apply({writes:a})).ok?null:(o.blockWrite&&H.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{..._o,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:o.rule,projected:{...n,...a}})},Sr=Ht.length>0?{kinds:Ht,load:Us,prepare:async t=>(await In(t,re.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Pl(re.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Os.apply({writes:{[Bl(t).blockKey]:n.block}})).ok}}:null,br=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=await In(t,s,f=>{const R=s[n],h=R?.sections;if(!h||typeof h!="object"||Array.isArray(h))return null;const j=h;if(!Array.isArray(j.variants))return null;const E=[...j.variants],K=E[o];return K?(E[o]={...K,rule:f},{blockKey:n,data:{...R,sections:{...j,variants:E}}}):null});if(!a)return;const{resolveType:i,formValue:l}=Ut(a.rule,a.projected,u??void 0);ee(i),se(l),k?.()},xr=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=s[n],i=a?.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[o];if(!R)return;const h=Mt(R.rule,s,u),j=cn(t);f[o]={...R,rule:j};const E={...s,[n]:{...a,sections:{...l,variants:f}}},{resolveType:K,formValue:z}=Ut(j,E,u??void 0);ee(K),se(z);try{await L.mutateAsync({blockKey:n,data:E[n]}),h&&h!==t&&await qt(h,E),k?.()}catch(ne){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Dt(ne))})}},_r=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=re.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const z=(E.variants??[])[s]?.rule;if(Jt(z,i,u)){const Q=z?.__resolveType??"",be=i[Q],Ie=typeof be?.name=="string"?be.name:Q,{__resolveType:he,...ue}=t;L.mutate({blockKey:Q,data:Ft(he??"",ue,Ie)},{onSuccess:()=>k?.(),onError:L.reportError});return}const ne=_s(E,s,t),J=[...o];J[n]=Bt(h,j,ne);const Ne=ln(i,l,J,R,f);L.mutate({blockKey:l,data:Ne},{onSuccess:()=>k?.(),onError:L.reportError})},xn(v)))},Aa=t=>{qe(t);const n=t?No(t,u):{__resolveType:Xr(u)};Fe(t?n:{}),_r(n)},Na=t=>{const n=t;Fe(n);const s=Zt?{__resolveType:Zt,...n}:{...n};_r(s)},Ca=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=await In(t,i,K=>{const z=o[n],ne=a[n];if(!z||!ne?.isMultivariate)return null;const J=pt(z,ne);if(!J)return null;const Ne=[...o];return Ne[n]=Bt(z,ne,_s(J,s,K)),{blockKey:l,data:ln(i,l,Ne,R,f)}});if(!h)return;const{resolveType:j,formValue:E}=Ut(h.rule,h.projected,u??void 0);qe(j),Fe(E),k?.()},Pa=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const K=E.variants??[],z=Mt(K[s]?.rule,i,u),ne=cn(t),J=_s(E,s,ne),Ne=[...o];Ne[n]=Bt(h,j,J);const Q=ln(i,l,Ne,R,f),be={...i,[l]:Q},{resolveType:Ie,formValue:he}=Ut(ne,be,u??void 0);qe(Ie),Fe(he);try{await L.mutateAsync({blockKey:l,data:Q}),z&&z!==t&&await qt(z,be),k?.()}catch(ue){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Dt(ue))})}};if(!q&&!oe)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.noPageFound",{currentPath:V})});if(q&&!rs)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Re=m!==null?ce[m]??null:null,kr=m!==null?B[m]:null,wr=kr&&Re?.isMultivariate?pt(kr,Re):null,Vt=wr?Yr(wr,we,v):[],Ln=Math.min(Me,Math.max(Vt.length-1,0)),kt=Vt[Ln]??null,Tt=Re?.isMultivariate===!0,ps=m!==null&&Re!==null,At=ps&&(Tt||!!(Fn&&Xe)),Ba=At&&!q&&Re?.isSavedBlock===!0,ft=q||Ba,jr=q?Js:Re?.label??"",Ka=Zt&&u?Gn(Zt,u):null,Rr=(t,n)=>n&&X?`${t} · ${n}`:t,Er=Re?Re.variantOf??Re.label:"",Da=(()=>{const t=Tt&&kt?kt.label:null;return t?X?[Rr(Er,t)]:[Re.label,t]:[Re?.label??""]})(),hs=Rr(oe?.name??"",yt?Se?.label:null),On=At&&(!q||D.length>0)?q?[Js,...D]:[hs,...Da,...D]:[],Vr=je&&oe?[oe.name,"SEO",...Ds]:[],Tr=c("sectionsEditor.pageVariantTabs.variantsLabel"),Ar=Qt&&oe?[oe.name,Tr]:Lt&&oe&&Re?[hs,Er,Tr]:[],zn=Ar.length>0?Ar:Vr.length>0?Vr:ft?On.length>0?On:[jr]:On.length>0?On:[hs],Nr=ps&&!Tt&&!Re?.isHidden&&!!y,Ma=ft||!q&&yt&&!!Se||Nr,Fa=ps&&!Tt&&!q&&D.length===0&&!!Re&&Mo(Re)&&!!y,Ia=X&&At&&!Lt&&Tt&&D.length===0&&!!kt,Cr=X&&D.length>0?uo(D[D.length-1]):null,La=D.length>1?uo(D[D.length-2]):null,Pr=ft?jr:At?Re?.label??"":oe?.name??"",Oa=Qt||Lt?c("sectionsEditor.pageVariantTabs.variantsLabel"):je?c("sectionsEditor.panelSections.seo"):Cr??Pr,Br=Lt?Re?.variantOf??Re?.label??"":Qt||je?oe?.name??"":Cr?La??Pr:ft?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):At?oe?.name??"":oe?.path??"",gs=!Qt&&!Lt&&!je&&!At&&!ft,za=!X&&!je&&!q&&Tt&&D.length===0,bn=()=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const t=d[y],n=yc(t.sections,B,u,v);if(!n)return;const{sections:s,newVariantIndex:o}=n;L.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{fe(o),I(null),A(null),W(null),T([]),se(null),ee(null)},onError:L.reportError})},$n=(t,n,s)=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const o=d[y],a=o.sections;if(!a||typeof a!="object"||Array.isArray(a))return;const i=a;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const f=Sc(i,l),R={...d,[y]:{...o,sections:f}};L.mutate({blockKey:y,data:R[y]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const j of h)await qt(j,R)})()},onError:L.reportError})},Kr=(t,n)=>{if(t===n)return;let s=te;te===t?s=n:t<te&&n>=te?s=te-1:t>te&&n<=te&&(s=te+1),fe(s);const o=Yn(pe.map(a=>({rule:a.rule})),t,n);is(o,s),$n(a=>Yn(a,t,n))},Dr=t=>{const n=pe[t]?.rule,s=Mt(n,d??{},u??void 0);$n(o=>o.length<=1?null:(o.splice(t,1),o),()=>{pe.length-1===1?fe(0):t<te?fe(te-1):t===te&&fe(Math.max(0,t-1)),I(null),A(null),W(null),T([]),se(null),ee(null)},s)},$a=()=>{const t=pe.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!ji(n.rule)).map(({variant:n})=>Mt(n.rule,d??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=zi({variants:n}),o=n[s];return o?[{...o,rule:$i(u)}]:null},()=>{fe(0),I(null),A(null),W(null),T([]),se(null),ee(null),Vn(!1)},t)},Mr=t=>{let n=t+1;$n(s=>(n=eo(s,t,v),xc(s,t,v)),()=>{fe(n),I(null),A(null),W(null),T([]),se(null),ee(null)})},Wa=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const s=re.current.activePageKey,o=re.current.decofile;if(!s)return;const a=o[s],i=a.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[t];if(!R?.rule||typeof R.rule!="object"){H.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=R.rule,j=n.trim();en(!0);try{if(!j){if(!Jt(h,o,u)){M(null);return}const Q=h.__resolveType??"";f[t]={...R,rule:Ts(h,o,u)};const be={...o,[s]:{...a,sections:{...l,variants:f}}};await L.mutateAsync({blockKey:s,data:be[s]}),await qt(Q,be),M(null),k?.();return}const E=As(h,o,u);if(!E){H.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(E.blockKey){await L.mutateAsync({blockKey:E.blockKey,data:Ft(E.resolveType,E.data,j)}),M(null),k?.();return}const K=Jn(j),z=Qn(K,o,u);if(z){H.error(z);return}const ne=Ft(E.resolveType,E.data,j);let J=null,Ne=!1;try{const Q=await L.mutateAsync({blockKey:K,data:ne,create:!0});Ne=Un(Q),J=Ne?null:K,f[t]={...R,rule:cn(K)},await L.mutateAsync({blockKey:s,data:{...a,sections:{...l,variants:f}}}),J=null}catch(Q){throw J&&await Pn.mutateAsync({blockKey:J}).catch(()=>{}),Q}M(null),Ne||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:j})),k?.()}catch(E){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Dt(E))})}finally{en(!1)}},Ha=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{selectedSectionIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(s===null||!l)return;const h=o[s],j=a[s];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const K=E.variants??[],z=K[t];if(!z?.rule||typeof z.rule!="object"){H.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const ne=z.rule,J=n.trim();en(!0);const Ne=async Q=>{const be={...E,variants:Q},Ie=[...o];Ie[s]=Bt(h,j,be);const he=ln(i,l,Ie,R,f);return await L.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!J){if(!Jt(ne,i,u)){O(null);return}const Ze=ne.__resolveType??"",Nt=[...K];Nt[t]={...z,rule:Ts(ne,i,u)};const Ct=await Ne(Nt);await qt(Ze,Ct),O(null),k?.();return}const Q=As(ne,i,u);if(!Q){H.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Q.blockKey){await L.mutateAsync({blockKey:Q.blockKey,data:Ft(Q.resolveType,Q.data,J)}),O(null),k?.();return}const be=Jn(J),Ie=Qn(be,i,u);if(Ie){H.error(Ie);return}const he=Ft(Q.resolveType,Q.data,J);let ue=null,Ge=!1;try{const Ze=await L.mutateAsync({blockKey:be,data:he,create:!0});Ge=Un(Ze),ue=Ge?null:be;const Nt=[...K];Nt[t]={...z,rule:cn(be)},await Ne(Nt),ue=null}catch(Ze){throw ue&&await Pn.mutateAsync({blockKey:ue}).catch(()=>{}),Ze}O(null),Ge||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:J})),k?.()}catch(Q){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Dt(Q))})}finally{en(!1)}},Fr=async(t,n,s)=>{A(s);try{await L.mutateAsync({blockKey:t,data:s})}catch(o){throw A(a=>a===s?n:a),o}},qa={rename:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n],f=l?.rule&&typeof l.rule=="object"?l.rule:void 0,R=async j=>{const E={...t,variants:j};return await Fr(o,t,E),{...a,[o]:E}},h=Mc(f,s,a,u);if(h.kind!=="noop"){if(h.kind==="error"){H.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const K=[...i];K[n]={...l,rule:h.inlinedRule};const z=await R(K);await qt(h.blockKey,z),k?.();return}if(h.kind==="updateBlock"){await L.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let j=null,E=!1;try{const K=await L.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});E=Un(K),j=E?null:h.blockId;const z=[...i];z[n]={...l,rule:h.reference},await R(z),j=null}catch(K){throw j&&await Pn.mutateAsync({blockKey:j}).catch(()=>{}),K}E||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(j){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Dt(j))})}finally{en(!1)}}},selectGlobal:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const f=Mt(l.rule,a,u);i[n]={...l,rule:cn(s)};const R={...t,variants:i},h={...a,[o]:R};try{await Fr(o,t,R),f&&f!==s&&await qt(f,h),k?.()}catch(j){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Dt(j))})}},selectNamedRule:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;let i=null;!await In(s,a,f=>{const R=Array.isArray(t.variants)?[...t.variants]:[],h=R[n];return h?(R[n]={...h,rule:f},i={...t,variants:R},{blockKey:o,data:i}):null})||!i||(A(i),k?.())}},Ir=()=>{Wt(),v&&$t(null,-1,0)},Lr=t=>{dn(t),ds({inner:t})},Or=t=>{An(t),ds({raw:t})},zr=()=>{dn(null),Ot([])},$r=()=>Yt(t=>t+1),Wr=()=>{fn.flush(),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1),ge?.()},Ga=()=>{Vn(!1),Tn(!1),I(null),un(!0)},Ua=()=>{je&&Wr(),I(null),Vn(!0)},Ja=()=>Tn(!0),vs=t=>{if(Qt&&t===0){Vn(!1);return}if(Lt&&t<2){Tn(!1),t===0&&I(null);return}if(je){if(t===0){Wr();return}if(t===1){Ot([]),Yt(s=>s+1);return}Ot(Ds.slice(0,t-1)),Yt(s=>s+1);return}if(q){T(D.slice(0,t)),$(s=>s+1);return}if(t===0){Ir();return}if(t===1){T([]),$(s=>s+1);return}const n=!X&&Tt&&kt?1:0;if(n===1&&t===2){T([]),$(s=>s+1);return}T(D.slice(0,t-1-n))},ys=zn.length>1?r.jsx("button",{type:"button",onClick:()=>vs(vl(zn.length,{isMultivariateSectionTop:za})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("sectionsEditor.sectionsEditor.back"),className:le("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ft?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:r.jsx(Ji,{className:"size-4"})}):null,Qa=ft||At||je?Ma&&r.jsxs("div",{className:le("border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!q&&yt&&Se&&r.jsxs("button",{type:"button",onClick:Ir,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:Se.label}),className:le("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",dl),children:[r.jsx(ul,{rule:js(Se.rule,d??{},u??void 0),matchers:sn}),r.jsx("span",{className:"max-w-[160px] truncate",children:Se.label})]}),r.jsx("div",{className:"flex-1"}),ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Nr&&r.jsx(qn,{onClick:()=>Sn()})]}),ft&&r.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:c("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):r.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(fo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:cr,variant:"header"})}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>un(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Le&&y?Le():bt(!0),children:r.jsx(co,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(qn,{onClick:bn})]}),Ya=r.jsxs(r.Fragment,{children:[yt&&y&&r.jsx(mo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Kr,onRename:M,onDuplicate:Mr,onDelete:Dr,onAdd:bn}),yt&&Y!==null&&r.jsx(po,{className:"mt-3",children:r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:vr,onSelectGlobal:xr,named:ms(Se?.rule,br),namedRow:ws(Se?.rule,Ht),rule:Se?.rule,schema:hr,formValue:Ke,onChange:yr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})})]}),Hr=r.jsxs(r.Fragment,{children:[r.jsx(fl,{listKey:`${y??""}:${m??""}`,variants:Vt.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:dr,onRename:O,onDuplicate:Ea,onDelete:Ra,onRemoveAll:fr,onReorder:Va,onAdd:()=>Sn()}),r.jsx(po,{children:r.jsx(ks,{currentRt:Zt??"",currentLabel:_n(kt?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(kt?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:Aa,onSelectGlobal:Pa,named:ms(kt?.rule,Ca),namedRow:ws(kt?.rule,Ht),rule:kt?.rule,schema:Ka,formValue:qo,onChange:Na,formKey:`${m??"none"}:${Ln}:${Zt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),qr=r.jsx("div",{className:le(X?"px-2":"p-2 pt-3"),children:r.jsx(Kc,{listKey:`${y??""}-${te}`,rawSections:B,sections:ce,meta:u,decofile:d,selectedIndex:m,onSelect:t=>{va(t),Je?.(t)},onReorder:ya,onDelete:Sa,onDuplicate:ba,onMakeReusable:Ve,onToggleHidden:xa,onToggleLazy:rt?_a:void 0,onAddVariant:Sn,onDetach:ka,onAddSection:()=>He(!0),canAddSection:pr})}),Za=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[y&&oe&&r.jsx(fo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:cr}),nn&&y?r.jsx(To,{rawSeo:Kn,innerSeo:as,defaultResolveType:Ys,seoTypesLoading:v&&!u,seoSchema:Zs,activeResolveType:Dn,seoTypeOptions:Qs,formResetKey:Ms,siteDefaultSeo:Xs,onBreadcrumbChange:Ot,onPersistRaw:Or,onInnerChange:Lr,onClearForm:zr,onBumpFormKey:$r,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Xa=r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:r.jsx("div",{className:"mx-auto max-w-2xl",children:nn&&y?r.jsx(To,{rawSeo:Kn,innerSeo:as,defaultResolveType:Ys,seoTypesLoading:v&&!u,seoSchema:Zs,activeResolveType:Dn,seoTypeOptions:Qs,formResetKey:Ms,siteDefaultSeo:Xs,onBreadcrumbChange:Ot,onPersistRaw:Or,onInnerChange:Lr,onClearForm:zr,onBumpFormKey:$r,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),ei=r.jsxs(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&y&&r.jsx(mo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Kr,onRename:M,onDuplicate:Mr,onDelete:Dr,onAdd:bn}),yt&&Y!==null&&r.jsxs("div",{className:le("px-3 border-b",En?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>Wo(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-accent","aria-expanded":En,children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.sectionsEditor.variantRule")}),En?r.jsx(Qi,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(Ui,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),En&&r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:vr,onSelectGlobal:xr,named:ms(Se?.rule,br),namedRow:ws(Se?.rule,Ht),rule:Se?.rule,schema:hr,formValue:Ke,onChange:yr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),qr]},"editor-section-list");return r.jsx(lc,{value:v,children:r.jsx(ml,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&ys&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ys}),(X||zn.length>1)&&r.jsx(Hi,{crumbs:zn,onSelect:vs,onSelectRoot:()=>{fn.flush(),Ue?Ue():vs(0)}}),r.jsx("div",{className:"shrink-0",children:X?r.jsxs("div",{className:le("flex items-center gap-2 border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[X&&ys,ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r.jsx("span",{className:"truncate text-sm font-semibold",children:Oa}),Br&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Br})]}),gs&&yt&&Se&&r.jsx(ho,{variants:pe,activeIndex:te,onSelect:cs,onManage:Ua,onRemoveAll:$a}),Ia&&r.jsx(ho,{variants:Vt,activeIndex:Ln,onSelect:dr,onManage:Ja,onRemoveAll:fr}),gs&&!yt&&r.jsx(qn,{onClick:bn}),Fa&&r.jsx(qn,{onClick:()=>Sn()}),r.jsx(pl,{}),gs&&r.jsxs(r.Fragment,{children:[r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:Ga,children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Le&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>bt(!0),children:r.jsx(co,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Qa}),ut&&r.jsx(pi,{open:!0,fields:hi(ut.plan,ut.target.schema),choices:ut.choices,changedAgain:ut.changedAgain,author:Hs??null,authorPending:Hs===void 0,fieldsAsLabeled:Ws!==null,fresh:ut.fresh,keepTyping:v,onChoose:(t,n)=>ga({...ut.choices,[t]:n}),onApply:ha},Lc(ut.formBase)),Lt?r.jsx(go,{onAdd:()=>Sn(),children:Hr},"editor-section-variants"):At?r.jsxs(an,{viewportRef:me,onBlur:sr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!X&&Tt&&Vt.length>0&&D.length===0&&Hr,r.jsx(Ao,{value:Sr,children:r.jsx(vo,{value:q&&v?Be:null,children:r.jsx(yo,{activeSchema:Fn,formValue:Xe,formResetKey:De,onFormChange:lr,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:ur,onVariantMatcherOp:q?qa:void 0})})})]},"editor-section-form"):q?r.jsx(an,{viewportRef:me,onBlur:sr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(Ao,{value:Sr,children:r.jsx(vo,{value:q&&v?Be:null,children:r.jsx(yo,{activeSchema:Fn,formValue:Xe,formResetKey:De,onFormChange:lr,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:ur})})})},"editor-global-block"):je?X?r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Za})},"editor-seo"):Xa:Qt?r.jsx(go,{onAdd:bn,children:Ya},"editor-variants"):X?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:qr})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Ns,{canAddSection:pr,onAddSection:()=>He(!0)})})]},"editor-section-list"):ei,r.jsx(hl,{open:ie!==null,onOpenChange:t=>{t||Ve(null)},defaultBlockId:ie!==null?Jn(ce[ie]?.label??""):"",isPending:L.isPending,onSubmit:Ta}),ot&&r.jsx(tc,{open:Ae,onOpenChange:t=>{He(t),t||(Rn.current=null)},meta:u,decofile:d,previewBaseUrl:st,onSelect:ja}),ht&&y&&d&&r.jsx(sc,{open:ht,onOpenChange:bt,pageKey:y,decofile:d}),Te!==null&&r.jsx(So,{open:!0,initialName:Jt(pe[Te]?.rule,d??{},u??void 0)?_n(pe[Te]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(pe[Te]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Wa(Te,t)},onOpenChange:t=>{!t&&!Xt&&M(null)}}),tt!==null&&r.jsx(So,{open:!0,initialName:Jt(Vt[tt]?.rule,d??{},u??void 0)?_n(Vt[tt]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(Vt[tt]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Ha(tt,t)},onOpenChange:t=>{!t&&!Xt&&O(null)}})]})})})}export{zf as SectionsEditor};
|