decocms 4.513.6 → 4.513.8
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/{ActiveShapeUtils-BD1rvm75.js → ActiveShapeUtils-uKFYSg4Y.js} +1 -1
- package/dist/client/assets/{AlertCircle-DGyqrcs1.js → AlertCircle-Q16nTVAa.js} +1 -1
- package/dist/client/assets/{AreaChart-DXZzRQIg.js → AreaChart-k5WqYBKX.js} +1 -1
- package/dist/client/assets/{ArrowLeft-eYPah7GY.js → ArrowLeft-C_dTX_8N.js} +1 -1
- package/dist/client/assets/{ArrowUp-D5AH9Pcx.js → ArrowUp--4P0C-xl.js} +1 -1
- package/dist/client/assets/{BarChart-CIrIL-8i.js → BarChart-VS3Ye-qY.js} +1 -1
- package/dist/client/assets/{Building02-DYC0suyK.js → Building02-Gub-pr-8.js} +1 -1
- package/dist/client/assets/{CartesianChart-DI2rF1vs.js → CartesianChart-BvH4QiKh.js} +1 -1
- package/dist/client/assets/{CategoricalChart-C37JtV-R.js → CategoricalChart-CTrV8dYV.js} +1 -1
- package/dist/client/assets/{CheckCircle-CqYnJPRs.js → CheckCircle-CQxu_pm9.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DdGE8kvW.js → ChevronSelectorVertical-GBLm8Zpl.js} +1 -1
- package/dist/client/assets/{ChevronUp-COqs90Hs.js → ChevronUp-DK-Gvyk8.js} +1 -1
- package/dist/client/assets/{Copy01-CgH6S_M4.js → Copy01-EWitDFCf.js} +1 -1
- package/dist/client/assets/{CreditCard01-D9MXYjlv.js → CreditCard01-wx_z4Iiz.js} +1 -1
- package/dist/client/assets/{DotsVertical-Cb3iOarq.js → DotsVertical-DIT5hu2b.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Bm6BBMsf.js → ErrorBarContext-C56oRnGq.js} +1 -1
- package/dist/client/assets/{Globe04-CzPjgHLa.js → Globe04-B45_cBRN.js} +1 -1
- package/dist/client/assets/{Image01-DRhv7dXw.js → Image01-BfGAREA7.js} +1 -1
- package/dist/client/assets/{Key01-BDIGM7UK.js → Key01-BV7tzZs6.js} +1 -1
- package/dist/client/assets/{Link01-D-kjAU9F.js → Link01-9civFIb9.js} +1 -1
- package/dist/client/assets/{LinkBroken01-XQhOMQAy.js → LinkBroken01-DmmKNgpp.js} +1 -1
- package/dist/client/assets/{Monitor01-BVPal7YC.js → Monitor01-BoSs_8gg.js} +1 -1
- package/dist/client/assets/{Play-d8pW2_Wo.js → Play-CleWZLOG.js} +1 -1
- package/dist/client/assets/{Plus-BqeqBPMZ.js → Plus-DQf-jm_3.js} +1 -1
- package/dist/client/assets/{ReferenceLine-BR8YoYbZ.js → ReferenceLine-DtJF7ODu.js} +1 -1
- package/dist/client/assets/{SearchMd-pSkC4ygW.js → SearchMd-D0zp0uee.js} +1 -1
- package/dist/client/assets/{Sector-Dq8AGG4_.js → Sector-CWBWrJZQ.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DZQO7QtG.js → ShoppingBag01-B7gta_qY.js} +1 -1
- package/dist/client/assets/{Sun-BCgybCT7.js → Sun-BfjJa3ru.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CeUNJpHb.js → SwitchHorizontal01-BJyDDPw9.js} +1 -1
- package/dist/client/assets/{Tool01-BgkFSAcX.js → Tool01-Bp-TbrXi.js} +1 -1
- package/dist/client/assets/{Trash01-DeYkLyg0.js → Trash01-Dlk_Sh-H.js} +1 -1
- package/dist/client/assets/{Upload01-zDvi7WnN.js → Upload01-DlF9Jqso.js} +1 -1
- package/dist/client/assets/{User01-DBX94Vod.js → User01-BcekHhAV.js} +1 -1
- package/dist/client/assets/{UserSquare-4I8cSrJU.js → UserSquare-cdWcOBLL.js} +1 -1
- package/dist/client/assets/{Users01-BNiwpGyg.js → Users01-BIP-PxGt.js} +1 -1
- package/dist/client/assets/{XClose-DFp85o1X.js → XClose-L_GNViCD.js} +1 -1
- package/dist/client/assets/{ZoomOut-Clz13c-y.js → ZoomOut-B3s5275g.js} +1 -1
- package/dist/client/assets/{access-gate-hn6vo27o.js → access-gate-CsHtyNGi.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B8d5rNLA.js → add-connection-dialog-DwDvS8Uw.js} +1 -1
- package/dist/client/assets/{agent-analytics-oR-UJrdu.js → agent-analytics-bhSR3DTp.js} +1 -1
- package/dist/client/assets/agent-app-D3AENVQT.js +1 -0
- package/dist/client/assets/{agent-assets-BAJSaOwb.js → agent-assets-BwCvdqkQ.js} +1 -1
- package/dist/client/assets/{agent-automation-BFa_aFcv.js → agent-automation-BB_6G_CX.js} +1 -1
- package/dist/client/assets/{agent-automations-BqpWj5js.js → agent-automations-1AEGAcHU.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DLbP8QgT.js → agent-connect-sources-Dh_ELrva.js} +1 -1
- package/dist/client/assets/agent-deck-Cd8T_xPW.js +1 -0
- package/dist/client/assets/{agent-e2e-CZm4tSr4.js → agent-e2e-Bz8yllNo.js} +1 -1
- package/dist/client/assets/{agent-experiments-B-6D2jQi.js → agent-experiments-BmvDtQNl.js} +1 -1
- package/dist/client/assets/agent-file-BoVEwoJD.js +1 -0
- package/dist/client/assets/{agent-hosting-CdENGPus.js → agent-hosting-DtDQtjNQ.js} +1 -1
- package/dist/client/assets/{agent-icon-DtUVrwO-.js → agent-icon-D6wS7rd0.js} +1 -1
- package/dist/client/assets/agent-library-BeoJetpR.js +1 -0
- package/dist/client/assets/agent-library-file-DCYJT22p.js +1 -0
- package/dist/client/assets/{agent-monitor-Bs7IFe5F.js → agent-monitor-DduGwwal.js} +1 -1
- package/dist/client/assets/{agent-overview-BM6-btAT.js → agent-overview-Bj_gDP1X.js} +1 -1
- package/dist/client/assets/{agent-releases-Cg_1lF6D.js → agent-releases-CAjd1_1N.js} +1 -1
- package/dist/client/assets/agent-settings-CnK9fsFs.js +1 -0
- package/dist/client/assets/{agent-site-editor-Duykn_pL.js → agent-site-editor-DMCFUFgp.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-C20F9ay-.js +2 -0
- package/dist/client/assets/agent-site-editor-content-ChnnFjhK.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-BxDD-Aar.js +1 -0
- package/dist/client/assets/agent-view-3YMZSj3x.js +1 -0
- package/dist/client/assets/{agent-view-guard-hqisp_aZ.js → agent-view-guard-AH_0N8JG.js} +1 -1
- package/dist/client/assets/{agents-list-Be9D6Efa.js → agents-list-ZmW8mXyl.js} +1 -1
- package/dist/client/assets/{ai-providers-Bcx4_XEI.js → ai-providers-CJqDCuAR.js} +1 -1
- package/dist/client/assets/{alert-DV4VVYX_.js → alert-PPdejvI2.js} +1 -1
- package/dist/client/assets/{alert-dialog-C884MJiU.js → alert-dialog-ygFmYcOa.js} +1 -1
- package/dist/client/assets/{analytics-sections-BRVAxDPl.js → analytics-sections-CveDF2n6.js} +1 -1
- package/dist/client/assets/api-keys-BRV_KE0D.js +1 -0
- package/dist/client/assets/{api-keys-77z_zTHe.js → api-keys-CbBz_rxa.js} +1 -1
- package/dist/client/assets/{app-editor-D1Yz0-KZ.js → app-editor-Cio5Pq66.js} +1 -1
- package/dist/client/assets/{asset-utils-Bgywf85e.js → asset-utils-Duz2qYol.js} +1 -1
- package/dist/client/assets/{auth-BWk8-zOv.js → auth-BVkTFTOt.js} +1 -1
- package/dist/client/assets/{auth-catchall-Ba5IqUJT.js → auth-catchall-lx3pSppE.js} +1 -1
- package/dist/client/assets/{auth-entry-DtA-KX4U.js → auth-entry-Dz_b1brR.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DlRuMXq_.js → auth-split-layout-CFlGWfV0.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-IsdfY2Pl.js → authenticate-and-persist-oauth-POYqGagt.js} +1 -1
- package/dist/client/assets/{automation-list-row-BLQDRByW.js → automation-list-row-C69hu-tr.js} +1 -1
- package/dist/client/assets/{automation-runs-CfNYuBTf.js → automation-runs-CefmsDTb.js} +1 -1
- package/dist/client/assets/{automations-ClBeWsXG.js → automations-C6R9dV-_.js} +1 -1
- package/dist/client/assets/{autosend-00EmkCtt.js → autosend-CL2OZPvg.js} +1 -1
- package/dist/client/assets/{avatar-DKDZgWFa.js → avatar-LfY3dprD.js} +1 -1
- package/dist/client/assets/{badge-Bmk8ti5E.js → badge-CyDHDRPg.js} +1 -1
- package/dist/client/assets/{block-document-DM_YLluw.js → block-document-Di6OpT4O.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DbDIw_fH.js → blocks-preview-workspace-context-DcqAhd0P.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CbP4bRnZ.js → blocks-tab-states-BjRnBrj4.js} +3 -3
- package/dist/client/assets/{blog-schema-CUk-sbP9.js → blog-schema-C2heOfy2.js} +1 -1
- package/dist/client/assets/{board-analytics-QLChF2Fg.js → board-analytics-fCGfPXJ7.js} +1 -1
- package/dist/client/assets/{buckets-CNsJAB6o.js → buckets-j1BXX0Sb.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DJN4jxYS.js → build-improve-prompt-doc-BJrt-jCW.js} +1 -1
- package/dist/client/assets/{calendar-GjUu2S3w.js → calendar-sxNtZ9wG.js} +1 -1
- package/dist/client/assets/{capability-load-error-BVmBezr5.js → capability-load-error-CB4I7CRT.js} +1 -1
- package/dist/client/assets/{category-editor-BbN07orU.js → category-editor-D_K2FWTB.js} +1 -1
- package/dist/client/assets/{chart-Batu-asC.js → chart-NRF3lK-V.js} +1 -1
- package/dist/client/assets/{chat-context-0V74JN43.js → chat-context-Dv2E4fnf.js} +1 -1
- package/dist/client/assets/{chat-draft-b20iPSzq.js → chat-draft-X1dGJc2x.js} +1 -1
- package/dist/client/assets/{checkbox-FJR9GBSz.js → checkbox-CaUezNgL.js} +1 -1
- package/dist/client/assets/{choose-editor-B4AQNoUW.js → choose-editor-CDMfdVL-.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B7oLHBHH.js → cli-auth-success-aITDjw-8.js} +1 -1
- package/dist/client/assets/{client-icons-Db2DsGLl.js → client-icons-DRk6JWY6.js} +1 -1
- package/dist/client/assets/cms-settings-editor-C_3APl39.js +1 -0
- package/dist/client/assets/{collapsible-BaAUa-uq.js → collapsible-DHXUZre4.js} +1 -1
- package/dist/client/assets/{collection-detail-BpTqwPQh.js → collection-detail-BXabjop0.js} +1 -1
- package/dist/client/assets/{collection-display-button-qOjw_9dn.js → collection-display-button-Cdfgosxf.js} +1 -1
- package/dist/client/assets/{collection-search-BvClByDx.js → collection-search-Dcze6ySb.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DRrT-L4P.js → collection-table-wrapper-CWGTaBjx.js} +1 -1
- package/dist/client/assets/{collection-tabs-yyL7thvn.js → collection-tabs-yg6VVFu9.js} +1 -1
- package/dist/client/assets/{column-rules-oi7XUNCk.js → column-rules-C_Hndp-C.js} +1 -1
- package/dist/client/assets/{combobox-DMjnN_aL.js → combobox-B5xPQiKP.js} +1 -1
- package/dist/client/assets/{coming-soon-page-B0mfPnqP.js → coming-soon-page-DsS1SnMg.js} +1 -1
- package/dist/client/assets/{command-HQXCvIc1.js → command-KXg0ZuU-.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BE_rdnSM.js → companion-mcps-section-Da_S5Z-R.js} +1 -1
- package/dist/client/assets/{config-BPYy0PCN.js → config-UdFHLZs6.js} +1 -1
- package/dist/client/assets/{connect-DOJcei6R.js → connect-CsG4Vqc-.js} +1 -1
- package/dist/client/assets/{connect-layout-Cf6GuLdj.js → connect-layout-DE_So4kH.js} +1 -1
- package/dist/client/assets/{connection-BpKydrrq.js → connection-CEK3iDim.js} +1 -1
- package/dist/client/assets/{connection-card-IwdFS34P.js → connection-card-Zhg6xn7V.js} +1 -1
- package/dist/client/assets/{connection-detail-C2DKmrpZ.js → connection-detail-lT3XwVgT.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BvKR417-.js → connection-form-helpers-DAFP702a.js} +1 -1
- package/dist/client/assets/{connections-BXBz-7gT.js → connections-Chwm450B.js} +1 -1
- package/dist/client/assets/{content-tab-D9fcn3Hp.js → content-tab-DYpKep2J.js} +3 -3
- package/dist/client/assets/{context-C-E2WXON.js → context-Bfj5rpO_.js} +1 -1
- package/dist/client/assets/{context-menu-TYrOMe5c.js → context-menu-BFA8rRfY.js} +1 -1
- package/dist/client/assets/{context-shell-On92TM5F.js → context-shell-CUCiFtf6.js} +3 -3
- package/dist/client/assets/{core.esm-CpQIzrUC.js → core.esm-BO316fgf.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DgF1IFc_.js → create-organization-dialog-Cb6YY9K7.js} +1 -1
- package/dist/client/assets/{daily-pulse-BOC5UzEe.js → daily-pulse-C0-1QTxZ.js} +1 -1
- package/dist/client/assets/{discover-BlLiIBf4.js → discover-BqgmKYIf.js} +1 -1
- package/dist/client/assets/{domain-settings-BDcWjcTo.js → domain-settings-B_QSN-on.js} +1 -1
- package/dist/client/assets/{drawer-DDevbGRy.js → drawer-DL0G-oy-.js} +1 -1
- package/dist/client/assets/{editor-DlDOOY_4.js → editor-B62-XQRE.js} +1 -1
- package/dist/client/assets/{editor-classes-BA-XOPn9.js → editor-classes-BAKuqcj0.js} +1 -1
- package/dist/client/assets/{empty-state-D0xYsV2u.js → empty-state-JTI0oLk7.js} +1 -1
- package/dist/client/assets/{empty-state-t0TjoYVp.js → empty-state-lzzC-d42.js} +1 -1
- package/dist/client/assets/{extract-connection-data-dh3iYmVg.js → extract-connection-data-BlmKelwb.js} +1 -1
- package/dist/client/assets/{feature-gate-BqkgE7TM.js → feature-gate-DQ2MNs-B.js} +1 -1
- package/dist/client/assets/{feature-paywall-BeChu0JL.js → feature-paywall-BSXK-EmV.js} +1 -1
- package/dist/client/assets/{file-explorer-DbsjbKj4.js → file-explorer-CcePNy3q.js} +1 -1
- package/dist/client/assets/{file-preview-BPilYeri.js → file-preview-DFkUyLsr.js} +1 -1
- package/dist/client/assets/{file-share-button-tFfE-sDm.js → file-share-button-CQ2Uf2PU.js} +1 -1
- package/dist/client/assets/{file-type-icon-CqiTsqkN.js → file-type-icon-HF5UcaS2.js} +1 -1
- package/dist/client/assets/flat-project-B3HLdqxT.js +1 -0
- package/dist/client/assets/{folder-icon-CqdHG3Ev.js → folder-icon-DaIPH_Nm.js} +1 -1
- package/dist/client/assets/{form-C2a6JNu4.js → form-DNjk4sZI.js} +1 -1
- package/dist/client/assets/{general-B_qz-x25.js → general-D2dbnN_J.js} +1 -1
- package/dist/client/assets/{home-Ctm57HqD.js → home-CvMudobI.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-CtVznVdZ.js → hosted-publish-feedback-DtU7FOId.js} +1 -1
- package/dist/client/assets/{icon-button-C9jD2Hx3.js → icon-button-WP5IJTs8.js} +1 -1
- package/dist/client/assets/{index-F1Fq1aIw.js → index-B9qNCJbx.js} +1 -1
- package/dist/client/assets/{index-CEuerbGa.js → index-BaQyqQF-.js} +1 -1
- package/dist/client/assets/{index-DH5YV3Rc.js → index-BdR6LNyh.js} +1 -1
- package/dist/client/assets/{index-B6SVRi7N.js → index-C13QaLdF.js} +1 -1
- package/dist/client/assets/{index-BjKnuEDd.js → index-CVLOGr5B.js} +1 -1
- package/dist/client/assets/{index-DKA5Ly4T.js → index-ChfkzyhC.js} +3 -3
- package/dist/client/assets/{index-C5H0Wt50.js → index-D6gxSs-5.js} +1 -1
- package/dist/client/assets/{index-6Ue7sPGM.js → index-DAYXa7zL.js} +1 -1
- package/dist/client/assets/{index-BDybMsIS.js → index-DCOsLpC6.js} +1 -1
- package/dist/client/assets/{index-8f_vFFVa.js → index-DEQvnIsm.js} +6 -6
- package/dist/client/assets/{index-CYl6IUJL.js → index-DZLfyA8t.js} +1 -1
- package/dist/client/assets/{index-DZi1rH7e.js → index-DtysKpnb.js} +1 -1
- package/dist/client/assets/{index-D4devard.js → index-JvhyBpMR.js} +1 -1
- package/dist/client/assets/{index-CZ5aoytF.js → index-a-46Uqqs.js} +1 -1
- package/dist/client/assets/{index-CvDeki2h.js → index-mh7U_AKI.js} +1 -1
- package/dist/client/assets/{index-redirect-DJJ4lwhG.js → index-redirect-dS_ROPu1.js} +1 -1
- package/dist/client/assets/{index-CaC0mBls.js → index-wkvFsHpn.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DUxIIdhP.js → infiniteQueryObserver-BnP8vr6V.js} +1 -1
- package/dist/client/assets/{infra-billing-kH_OZb0R.js → infra-billing-BeLfFWAD.js} +1 -1
- package/dist/client/assets/{input-BhCR1Dvt.js → input-Brhdhig1.js} +7 -7
- package/dist/client/assets/{input-CTTf6mSe.js → input-Bu2Qzwzh.js} +1 -1
- package/dist/client/assets/{integration-icon-CjUkpUFA.js → integration-icon-Bysyldtc.js} +1 -1
- package/dist/client/assets/{jira-icon-BV6Nhy1J.js → jira-icon-DJANnyLA.js} +1 -1
- package/dist/client/assets/{label-DTdw4ToM.js → label-Cf2Qy475.js} +1 -1
- package/dist/client/assets/{layout-CRHpNA-L.js → layout-CQ47j80U.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-WWlJLiCC.js → legacy-agents-deep-BdSVZFZL.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-xsE3RuJ6.js → legacy-main-redirect-BaYQkGoI.js} +1 -1
- package/dist/client/assets/library-DTps1LzJ.js +1 -0
- package/dist/client/assets/{library-tab-BHuSO7Qk.js → library-tab-C2aU1qmT.js} +1 -1
- package/dist/client/assets/{login-B1XLhTh8.js → login-BCT_8F_z.js} +1 -1
- package/dist/client/assets/{markdown-gIWrkm71.js → markdown-DgDY2QmE.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Cx5_Cgu7.js → mcp-app-renderer-pDbHkuXF.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DJLJ4jjk.js → mcp-oauth-C_-ZUSLH.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BCVDfjxS.js → mcp-oauth-aX1L4mRw.js} +1 -1
- package/dist/client/assets/{members-IeYYyp52.js → members-DNkbLBWU.js} +1 -1
- package/dist/client/assets/{memory-8PEu9ts-.js → memory-CWT1ZdIC.js} +1 -1
- package/dist/client/assets/{mini-report-page-zQ3aWwnQ.js → mini-report-page-aWQFmVFz.js} +1 -1
- package/dist/client/assets/{mock-board-BCunCtVN.js → mock-board-DWNU2n2-.js} +1 -1
- package/dist/client/assets/{monaco-editor-DKn4Wqed.js → monaco-editor-DDuHJmyY.js} +1 -1
- package/dist/client/assets/monitoring-Cvbt9Za_.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-3Jmtoo1S.js → monitoring-stats-row-DyiPtUKv.js} +1 -1
- package/dist/client/assets/{multi-select-CGJa6-FA.js → multi-select-CfDYfsZ-.js} +1 -1
- package/dist/client/assets/{mustache-4NqYiukY.js → mustache-DrIjKpei.js} +1 -1
- package/dist/client/assets/{new-project-dialog-7fKdzYQ0.js → new-project-dialog-DKeFr4C7.js} +1 -1
- package/dist/client/assets/{oauth-callback-Ux7KLfo6.js → oauth-callback-B1G7saOE.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BHpLfzCW.js → oauth-callback-ai-provider-mNgeHhki.js} +1 -1
- package/dist/client/assets/{onboarding-Bxi7_FIG.js → onboarding-kCa3Jkpy.js} +1 -1
- package/dist/client/assets/{openai-conversation-_BlnoTN9.js → openai-conversation-CLgg2Qod.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-Bq6xThGH.js → optimistic-project-sidebar-views-BaDUYmKF.js} +1 -1
- package/dist/client/assets/{order-monitor-day-B-gorx4b.js → order-monitor-day-C_yvKTz5.js} +1 -1
- package/dist/client/assets/{organization-choice-u2ufM7LR.js → organization-choice-BpI-_S8p.js} +1 -1
- package/dist/client/assets/{orgs-Q_88vgEa.js → orgs-BEJlYBbK.js} +1 -1
- package/dist/client/assets/{page-seo-form-CUUspMT0.js → page-seo-form-N1KKSZaU.js} +1 -1
- package/dist/client/assets/{pair-Da1JuUQW.js → pair-ByV0vAAs.js} +1 -1
- package/dist/client/assets/plan-BtuC_TCe.js +1 -0
- package/dist/client/assets/{plan-ladder--KlfKV0O.js → plan-ladder-CFysCUYy.js} +1 -1
- package/dist/client/assets/{popover-DkjgCDyk.js → popover-CjfUWaC0.js} +1 -1
- package/dist/client/assets/{post-calendar-CzWgDY6o.js → post-calendar-Bk6dx49G.js} +1 -1
- package/dist/client/assets/{post-editor-uOMVUWIp.js → post-editor-BUlsS3rc.js} +1 -1
- package/dist/client/assets/{preview-content-D6DnhkDr.js → preview-content-UW33EMCo.js} +1 -1
- package/dist/client/assets/{preview-dialog-Cz0QjPnU.js → preview-dialog-DWW9xaMT.js} +1 -1
- package/dist/client/assets/{preview-panel-D860QFoB.js → preview-panel-C2ZH3x01.js} +1 -1
- package/dist/client/assets/{preview-tab-BqXweaop.js → preview-tab-DsWFy6nY.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-BzRtZ0Xh.js → product-picker-dialog-ERcYwJUp.js} +1 -1
- package/dist/client/assets/{profile-CaSyUNvq.js → profile-BxA_I2_7.js} +1 -1
- package/dist/client/assets/{project-app-view-DSjmraQa.js → project-app-view-D-3K5nUJ.js} +1 -1
- package/dist/client/assets/{project-apps-BNzfntH4.js → project-apps-D50B5nYg.js} +1 -1
- package/dist/client/assets/{project-feed-sOra10wH.js → project-feed-zQus1O7R.js} +1 -1
- package/dist/client/assets/{project-icon-DDLQLFHN.js → project-icon-ChTT5o1a.js} +1 -1
- package/dist/client/assets/project-reports-B3JoeeH6.js +1 -0
- package/dist/client/assets/project-tasks-UglBCJxC.js +1 -0
- package/dist/client/assets/{projects-DSQkMTlh.js → projects-CKCvSpxg.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CgcVDMN1.js → projects-empty-state-SWDBQkN4.js} +1 -1
- package/dist/client/assets/{prompts-LsFvKrUX.js → prompts-oa8BoX1i.js} +1 -1
- package/dist/client/assets/record-editor-C4fMBCCz.js +1 -0
- package/dist/client/assets/{redirect-editor-js4vnIyF.js → redirect-editor-vQorNOA7.js} +1 -1
- package/dist/client/assets/reports-BTilnVW5.js +1 -0
- package/dist/client/assets/{reports-YZ_jyIpk.js → reports-BsyMPz_z.js} +1 -1
- package/dist/client/assets/{reports-onboarding-CD-oYnDP.js → reports-onboarding-PNNHl11L.js} +1 -1
- package/dist/client/assets/{reports-tab-BQ5w_NLe.js → reports-tab-DA_8UL9O.js} +2 -2
- package/dist/client/assets/repositories-BNK48Uq5.js +1 -0
- package/dist/client/assets/{repositories-AUaQi6Lg.js → repositories-BpTNBXai.js} +1 -1
- package/dist/client/assets/{repository-binding-DbCSIQ25.js → repository-binding-DpSh0bkT.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BNXAK2-d.js → repository-import-picker-CmGbASze.js} +1 -1
- package/dist/client/assets/{repository-picker-DdXZfSFi.js → repository-picker-C86kcY-U.js} +1 -1
- package/dist/client/assets/{require-capability-KC9Pz6jZ.js → require-capability-D4dR1lZc.js} +1 -1
- package/dist/client/assets/{required-auth-layout-yR_GLYbd.js → required-auth-layout-RW5dOh2c.js} +1 -1
- package/dist/client/assets/{reset-password-BdTHHMoh.js → reset-password-lP2OGZgV.js} +1 -1
- package/dist/client/assets/{resizable-CZG2RiqM.js → resizable-DueLEUEm.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CjkK_zYj.js → resolve-tab-icon-B66mDW53.js} +1 -1
- package/dist/client/assets/{review-settings-DqAJTW90.js → review-settings-JhWFefH3.js} +1 -1
- package/dist/client/assets/{roles-sjKQ_yFr.js → roles-CT2aKtzc.js} +1 -1
- package/dist/client/assets/{route-BFrqyY7M.js → route-C6Ybfjjx.js} +1 -1
- package/dist/client/assets/route-CQTsC5_0.js +1 -0
- package/dist/client/assets/{route-02oV_rQq.js → route-K-xr6t6Y.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DR_2NQXy.js → sandbox-lifecycle-context-BIf8-4ZY.js} +1 -1
- package/dist/client/assets/{schema-DqvEKlh8.js → schema-Bcb37BRV.js} +1 -1
- package/dist/client/assets/{schema-B0rKeG_L.js → schema-BzqS-kNt.js} +1 -1
- package/dist/client/assets/{scroll-area-CxMQI3lN.js → scroll-area-CIRLWlOA.js} +1 -1
- package/dist/client/assets/{search-input-CUDMkzW3.js → search-input-Br9i_Ft5.js} +1 -1
- package/dist/client/assets/{search-toggle-DQNLDkeN.js → search-toggle-Dj92h38-.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-Cwn7ogUH.js → secret-ciphertext-6VBjcV3b.js} +1 -1
- package/dist/client/assets/{secret-picker-DB8u6Egh.js → secret-picker-NhuvO0ke.js} +1 -1
- package/dist/client/assets/{secrets-5Kc02H3G.js → secrets-D4GRsD5W.js} +1 -1
- package/dist/client/assets/{sections-DrN4NbyG.js → sections-DzoS45qS.js} +1 -1
- package/dist/client/assets/{sections-editor-DNUBhdzI.js → sections-editor-C_iMM594.js} +1 -1
- package/dist/client/assets/{select-CD39mfCB.js → select-ChqJI0MI.js} +1 -1
- package/dist/client/assets/{select-model-nIvZx6mv.js → select-model-CzvrFpf6.js} +1 -1
- package/dist/client/assets/{seo-editor-DJq3zWnQ.js → seo-editor-DUiWy8Gm.js} +1 -1
- package/dist/client/assets/{separator-G8XO4ZVv.js → separator-5oK4b-Mi.js} +1 -1
- package/dist/client/assets/settings-tab-C1pr-l9r.js +1 -0
- package/dist/client/assets/{sheet-EnE9wqRk.js → sheet-CzJFx6b-.js} +1 -1
- package/dist/client/assets/{shell-layout-BPP608jE.js → shell-layout-DKGS0yWx.js} +1 -1
- package/dist/client/assets/site-editor-Bl1xnqtg.js +1 -0
- package/dist/client/assets/{site-editor-toast-D3wQqSbx.js → site-editor-toast-CmNIWnCw.js} +1 -1
- package/dist/client/assets/{skills-CiOFCiY2.js → skills-DEb_PUzK.js} +1 -1
- package/dist/client/assets/{slider-CUo-tkVk.js → slider-BBmtNfbs.js} +1 -1
- package/dist/client/assets/{sortable.esm-CVfxAykx.js → sortable.esm-BuCSUlOk.js} +1 -1
- package/dist/client/assets/{sso-D5Sp0hWe.js → sso-DX8PZk1N.js} +1 -1
- package/dist/client/assets/{suggestion-DoQ2WmJO.js → suggestion-DRP05M3-.js} +1 -1
- package/dist/client/assets/{switch-CnVsSUQF.js → switch-CJc_fIEE.js} +1 -1
- package/dist/client/assets/{symbol-DoarKbx_.js → symbol-C1zrmwNF.js} +1 -1
- package/dist/client/assets/{synced-repos-Cg3chrWr.js → synced-repos-GT8waIWj.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Bo6d63je.js → tab-icon-glyph-D6mZxF_9.js} +1 -1
- package/dist/client/assets/{table-BRoMxHYw.js → table-CltsOK_0.js} +1 -1
- package/dist/client/assets/{tabs-DRVG225q.js → tabs-D0oiuUhC.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-CQcT6saR.js → task-assignee-avatar-BfUNDI59.js} +1 -1
- package/dist/client/assets/{task-board-CYLfSrEW.js → task-board-DUTGhEiC.js} +1 -1
- package/dist/client/assets/{task-route-vO53W0Ko.js → task-route-BpmTIbg4.js} +1 -1
- package/dist/client/assets/{task-status-F4H3Ga9G.js → task-status-C72thlpO.js} +1 -1
- package/dist/client/assets/taskboard-analytics-DG4Zz1H_.js +1 -0
- package/dist/client/assets/{tasks-Bt9wXPlt.js → tasks-Cf4EZXG5.js} +1 -1
- package/dist/client/assets/tasks-D-91kNhg.js +1 -0
- package/dist/client/assets/{textarea-CKgIiSeB.js → textarea-CWgoXXnV.js} +1 -1
- package/dist/client/assets/{thread-analytics-or-g-yCI.js → thread-analytics-BjWUFe-q.js} +1 -1
- package/dist/client/assets/{thread-intent-pizqUsAw.js → thread-intent-8kpZLcDE.js} +1 -1
- package/dist/client/assets/{thread-route-RN7dQnhv.js → thread-route-B_SMytnm.js} +1 -1
- package/dist/client/assets/{thread-route-qt3bqNNd.js → thread-route-DTbE-Col.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CNNUBoOL.js → thread-sheet-body-OnJZloqZ.js} +1 -1
- package/dist/client/assets/{time-range-picker-Do6bf1fb.js → time-range-picker-BJ8aJbM7.js} +1 -1
- package/dist/client/assets/{toggle-group-BflgkGO4.js → toggle-group-BWQRN38D.js} +1 -1
- package/dist/client/assets/{tool-namespace-C8V5CWK9.js → tool-namespace-CTeV292R.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BKf8C7rk.js → toolbar-icon-button-BypH-a8F.js} +1 -1
- package/dist/client/assets/{tooltip-UP0IE2Tr.js → tooltip-B6NbTX5P.js} +1 -1
- package/dist/client/assets/{tooltipContext-Cp5fQVar.js → tooltipContext-DNlXAkZZ.js} +1 -1
- package/dist/client/assets/{track-B3_MOgCa.js → track-B0UUbkCz.js} +1 -1
- package/dist/client/assets/{types-ODqpEiLj.js → types-m1Dsi5sG.js} +1 -1
- package/dist/client/assets/{url-slug-D457Gzas.js → url-slug-CYvqbzge.js} +1 -1
- package/dist/client/assets/{usage-stats-BJ2G_LxU.js → usage-stats-BH4bqLoE.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CNozmlYS.js → use-ai-providers-W2Q5vYCk.js} +1 -1
- package/dist/client/assets/{use-automations-SYapFBvC.js → use-automations-Q-O37R-p.js} +1 -1
- package/dist/client/assets/{use-autosave-7cTC6S23.js → use-autosave-BWJWTtk0.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CS60364s.js → use-chat-layout-state-C-XHZ0Dd.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Bn5JCPrV.js → use-clock-tick-xpCK7CUB.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Bpzill-_.js → use-connect-companion-DJ8vj1p7.js} +1 -1
- package/dist/client/assets/{use-connection-Dbx4XQH4.js → use-connection-Cqf7M1G6.js} +1 -1
- package/dist/client/assets/{use-content-sync-CXWC9odL.js → use-content-sync-D6XyiV7H.js} +1 -1
- package/dist/client/assets/{use-copy-BcbcC4Wz.js → use-copy-Dkgb0DtI.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-XIxu-PVm.js → use-create-virtual-mcp-BZx-8s-I.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BPuP1KRV.js → use-date-fns-locale-B1aPt2Gv.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DJFJgv7S.js → use-debounced-autosave-Qji0VG0D.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BcnQYbv8.js → use-debounced-value-vhgvmVq4.js} +1 -1
- package/dist/client/assets/{use-deco-credits-sH8JcXii.js → use-deco-credits-k0aTLB-T.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DnweVhcO.js → use-decopilot-events-Czwn8ZVj.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DkV3GtTv.js → use-delete-connection-DbRA1FXb.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CeuCnmzX.js → use-deployment-admin-BrGfiqwj.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-DCSsD6mp.js → use-ensure-project-folder-BvOs3JKp.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Bm81iT9U.js → use-fast-preview-draft-url-oDwhtnfP.js} +1 -1
- package/dist/client/assets/{use-file-configs-DBaPVWpT.js → use-file-configs-BIHMmAjW.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BpXgn0oj.js → use-inbox-feed-SkFacTLx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C3Owd_r6.js → use-infinite-scroll-B9sczgXI.js} +1 -1
- package/dist/client/assets/{use-join-requests-mMEcdIqR.js → use-join-requests-DALj-BO-.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BPcXXbeG.js → use-main-panel-tabs-Cv3Ydqwx.js} +1 -1
- package/dist/client/assets/{use-main-schema-v8-DQ3Tp7hb.js → use-main-schema-v8-Jzc_7tOC.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-HN52RbO4.js → use-mcp-auth-status-BKawZyTw.js} +1 -1
- package/dist/client/assets/{use-mcp-client-GXi3d-TN.js → use-mcp-client-CAdgJ_QT.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DYr_PMFD.js → use-mcp-prompts-D1rnFTSb.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-1_L9lL6N.js → use-mcp-tools-CPGj7A6a.js} +1 -1
- package/dist/client/assets/{use-members-C4hziWH9.js → use-members-D-L919KG.js} +1 -1
- package/dist/client/assets/{use-mobile-7XbQJiX0.js → use-mobile-CSFJ-mhK.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bh1luKWv.js → use-navigate-to-agent-B-QlLf3R.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CbfiZ6nK.js → use-open-billing-url-DWsw6Alp.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CXEz66O9.js → use-org-auth-client-Co_fa5Pp.js} +1 -1
- package/dist/client/assets/{use-org-fs-BdAqd8Rv.js → use-org-fs-CAwgni1d.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-uQXeH0Jz.js → use-org-repo-syncs-Cxt6puu1.js} +1 -1
- package/dist/client/assets/{use-org-sso-CAhUTOPh.js → use-org-sso-BhMczCH6.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BuYemyb5.js → use-organization-roles-DZJHfOlV.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Toq_f_Mz.js → use-organization-settings-BtOReG0H.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CLNhl3ki.js → use-panel-navigate-BwwjvhNB.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-B7KEsCj_.js → use-project-native-view-presence-D4pR1T7b.js} +1 -1
- package/dist/client/assets/{use-project-scope-IOK1T5p5.js → use-project-scope-Dn4doId4.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DyohzVX8.js → use-recent-apps-B_BFFpi_.js} +1 -1
- package/dist/client/assets/{use-releases-yUP6RI_5.js → use-releases-DoIKvYCz.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Dx09lDp9.js → use-reports-diagnostic-COAemppC.js} +1 -1
- package/dist/client/assets/{use-secrets-CwVJb7xf.js → use-secrets-CA-kSu-4.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-C21P5QN6.js → use-section-preview-base-DAksxTnD.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CA2jDAa-.js → use-sidebar-collapsed-Dv10z2iu.js} +1 -1
- package/dist/client/assets/{use-tags-B6X9pJd5.js → use-tags-CUZ9CIka.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-RsYdGMIC.js → use-task-board-analytics-34pQYq8w.js} +1 -1
- package/dist/client/assets/{use-task-board-events-DphBWYih.js → use-task-board-events-CmYlpSMI.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-wBGqnWKt.js → use-task-board-item-prs-Cu4afbvW.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BKurahZz.js → use-task-metadata-C0A64pXU.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DCrr7FKS.js → use-thread-analytics-DXbq3gl0.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CIGWCWtQ.js → use-thread-outputs-BUN4R0HD.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bo5dbMM_.js +1 -0
- package/dist/client/assets/{useQueries-CSpn2OpV.js → useQueries-DNx9dZks.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CcFcpWuM.js +1 -0
- package/dist/client/assets/{users-CEoww2_1.js → users-DWxowv8y.js} +1 -1
- package/dist/client/assets/{utils-2rl9BEeu.js → utils-D-52h1Lf.js} +1 -1
- package/dist/client/assets/{variant-calendar-D-cEXz9T.js → variant-calendar-BQESjgmt.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-yGSVhJlH.js → variant-draft-pointer-BY7yWri4.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-UGzYIEFg.js → view-mode-toggle-Bgum-rnB.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DJrUra0R.js → virtual-mcp-CPoLjKOt.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BF6OquCU.js → watch-sse-pool-C7xRCtu5.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BpE-oLAW.js +0 -1
- package/dist/client/assets/agent-deck-BLI_AFXm.js +0 -1
- package/dist/client/assets/agent-file-Cdh_qco_.js +0 -1
- package/dist/client/assets/agent-library--bem7YGi.js +0 -1
- package/dist/client/assets/agent-library-file-CkXwnu9_.js +0 -1
- package/dist/client/assets/agent-settings-Dd_ntOEj.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CNBje50_.js +0 -2
- package/dist/client/assets/agent-site-editor-content-ClbNQtwa.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DwLqOSDR.js +0 -1
- package/dist/client/assets/agent-view-AVtmtnDB.js +0 -1
- package/dist/client/assets/api-keys-Bl6Bc96G.js +0 -1
- package/dist/client/assets/cms-settings-editor-bH28Cwco.js +0 -1
- package/dist/client/assets/flat-project-B8clA1X9.js +0 -1
- package/dist/client/assets/library-DKPNWFrQ.js +0 -1
- package/dist/client/assets/monitoring-COl6Otnm.js +0 -1
- package/dist/client/assets/plan-DTu4f1lM.js +0 -1
- package/dist/client/assets/project-reports-BRXQTs8U.js +0 -1
- package/dist/client/assets/project-tasks-C1jXBWPU.js +0 -1
- package/dist/client/assets/record-editor-DNnWgGZk.js +0 -1
- package/dist/client/assets/reports-BRc7lcn2.js +0 -1
- package/dist/client/assets/repositories-BeYoVJCK.js +0 -1
- package/dist/client/assets/route-BQjTTZG2.js +0 -1
- package/dist/client/assets/settings-tab-CjHjlnds.js +0 -1
- package/dist/client/assets/site-editor-CDy9Dqbl.js +0 -1
- package/dist/client/assets/taskboard-analytics-B2r791B3.js +0 -1
- package/dist/client/assets/tasks-DOI54OO2.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Z2Fpq8_2.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BK8FDRCQ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as it,b as Ft,r as R,l as ae,j as i,b4 as Li,B as _t,U as sn,ag as $i,X as zi,V as Hi,a as xo,F as Wi,K as yo,m as qi,o as Gi,h as Ui,t as oe}from"./index-8f_vFFVa.js";import{u as Yi}from"./chat-context-0V74JN43.js";import{a5 as Ji,T as Wn,a6 as Qi,a7 as Xi,a8 as Zi,a9 as ea,aa as ta,ab as na,ac as Br,ad as sa,ae as ra,G as jt,af as wt,ag as ze,ah as oa,H as Fn,E as On,b as ia,j as aa,u as la,ai as Kr,q as ca,aj as ua,s as da,o as fa,ak as So,p as _n,al as ma,am as pa,A as Fr,an as ha,ao as ga,ap as Bn,aq as Or,ar as Lr,as as $r,at as us,au as va,av as xa,F as ya,aw as zr,ax as Sa,ay as Hr,az as Wr,M as ba,aA as qr,a as ja,aB as Sn,aC as wa,aD as _a,aE as bn,aF as ds}from"./blocks-tab-states-CbP4bRnZ.js";import{c as ka}from"./repository-binding-DbCSIQ25.js";import{n as Ea,t as Ra}from"./ChevronUp-COqs90Hs.js";import{ac as bo,b as zn,ar as Aa,G as Ca,a5 as Gr,a1 as Ur}from"./agent-icon-DtUVrwO-.js";import{S as rn}from"./scroll-area-CxMQI3lN.js";import{c as kt,T as Et,a as Rt}from"./tooltip-UP0IE2Tr.js";import{am as Na,g as Yr,J as Ta,u as Va,K as Ma,w as Da,ab as Pa,x as Ia,d as Pt,f as It,a7 as Ba,ar as Ka}from"./site-editor-toast-D3wQqSbx.js";import{m as Fa,u as Oa,P as La}from"./mustache-4NqYiukY.js";import{az as $a,k as Rs,aB as jo,H as za,aC as xt,aD as vs,aE as wo,aj as Gt,a8 as xs,aF as ys,ak as Kt,a9 as on,q as Ha,t as Wa,g as qa,x as Kn,ar as Ga,ai as jn,aa as fs,ah as Bt,ag as wn,aG as Ua,P as Ya,aH as Ja,al as Jr,a1 as Qr,aI as Qa,aJ as qt,aK as Xa,aL as Za,aM as el,aN as Xr,aO as tl,aP as nl,aQ as sl,af as rl,aR as ol,aS as il,aT as al,aU as ll,ae as cl,aV as ul}from"./secret-ciphertext-Cwn7ogUH.js";import{a as dl}from"./Copy01-CgH6S_M4.js";import{a as Ss,f as _o}from"./UserSquare-4I8cSrJU.js";import{i as Zr}from"./Tool01-BgkFSAcX.js";import{s as eo}from"./Image01-DRhv7dXw.js";import{s as fl}from"./Plus-BqeqBPMZ.js";import{s as ml}from"./Trash01-DeYkLyg0.js";import{i as bs}from"./ZoomOut-Clz13c-y.js";import{u as pl,a as to,K as hl,P as gl,b as vl,C as xl,D as yl,c as Sl}from"./core.esm-CpQIzrUC.js";import{u as bl,s as jl,a as Ln,S as wl,v as _l}from"./sortable.esm-CVfxAykx.js";import{s as kl,g as El,u as Rl,A as Al}from"./use-section-preview-base-C21P5QN6.js";import{A as ms}from"./avatar-DKDZgWFa.js";import{e as Cl,d as no,b as Nl,A as Tl,a as Vl,f as Ml}from"./alert-dialog-C884MJiU.js";import{b as Dl}from"./format-time-Cq80KKvY.js";import{d as Pl}from"./shell-layout-BPP608jE.js";import{u as Il}from"./use-members-C4hziWH9.js";import{a as Bl,P as so,b as Kl}from"./page-seo-form-CUUspMT0.js";import{c as ro,d as oo,e as Fl,f as Ol}from"./variant-draft-pointer-yGSVhJlH.js";import"./use-panel-navigate-CLNhl3ki.js";import"./thread-route-qt3bqNNd.js";import"./use-project-scope-IOK1T5p5.js";import"./autosend-00EmkCtt.js";import"./thread-intent-pizqUsAw.js";import"./use-mcp-client-GXi3d-TN.js";import"./auth-BWk8-zOv.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BF6OquCU.js";import"./task-board-CYLfSrEW.js";import"./schema-B0rKeG_L.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-DnweVhcO.js";import"./use-ai-providers-CNozmlYS.js";import"./location-BjlyegC2.js";import"./use-organization-settings-Toq_f_Mz.js";import"./input-BhCR1Dvt.js";import"./usage-stats-BJ2G_LxU.js";import"./tool-namespace-C8V5CWK9.js";import"./form-C2a6JNu4.js";import"./label-DTdw4ToM.js";import"./utils-CVEq3hMx.js";import"./markdown-gIWrkm71.js";import"./use-copy-BcbcC4Wz.js";import"./use-mobile-7XbQJiX0.js";import"./XClose-DFp85o1X.js";import"./icon-button-C9jD2Hx3.js";import"./file-type-icon-CqiTsqkN.js";import"./chat-draft-b20iPSzq.js";import"./LinkBroken01-XQhOMQAy.js";import"./ArrowUp-D5AH9Pcx.js";import"./ShoppingBag01-DZQO7QtG.js";import"./Upload01-zDvi7WnN.js";import"./AlertCircle-DGyqrcs1.js";import"./select-CD39mfCB.js";import"./index-BdQq_4o_.js";import"./index-CEuerbGa.js";import"./ArrowLeft-eYPah7GY.js";import"./tabs-DRVG225q.js";import"./use-deco-credits-sH8JcXii.js";import"./toggle-group-BflgkGO4.js";import"./use-open-billing-url-CbfiZ6nK.js";import"./index-CYl6IUJL.js";import"./checkbox-FJR9GBSz.js";import"./ChevronSelectorVertical-DdGE8kvW.js";import"./Key01-BDIGM7UK.js";import"./SearchMd-pSkC4ygW.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-BVPal7YC.js";import"./popover-DkjgCDyk.js";import"./drawer-DDevbGRy.js";import"./input-CTTf6mSe.js";import"./suggestion-DoQ2WmJO.js";import"./use-mcp-prompts-DYr_PMFD.js";import"./use-org-fs-BdAqd8Rv.js";import"./useInfiniteQuery-Z2Fpq8_2.js";import"./infiniteQueryObserver-DUxIIdhP.js";import"./Link01-D-kjAU9F.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-BeChu0JL.js";import"./plan-ladder--KlfKV0O.js";import"./add-connection-dialog-B8d5rNLA.js";import"./collection-search-BvClByDx.js";import"./extract-connection-data-dh3iYmVg.js";import"./metadata-D72DunRR.js";import"./connection-BpKydrrq.js";import"./url-slug-D457Gzas.js";import"./connection-card-IwdFS34P.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-CjUkpUFA.js";import"./textarea-CKgIiSeB.js";import"./use-connection-Dbx4XQH4.js";import"./schema-DqvEKlh8.js";import"./connection-form-helpers-BvKR417-.js";import"./authenticate-and-persist-oauth-IsdfY2Pl.js";import"./mcp-oauth-DJLJ4jjk.js";import"./mcp-oauth-BCVDfjxS.js";import"./collection-tabs-yyL7thvn.js";import"./badge-Bmk8ti5E.js";import"./use-infinite-scroll-C3Owd_r6.js";import"./useSuspenseInfiniteQuery-BK8FDRCQ.js";import"./use-task-board-events-DphBWYih.js";import"./use-chat-layout-state-CS60364s.js";import"./utils-2rl9BEeu.js";import"./Play-d8pW2_Wo.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-Da1JuUQW.js";import"./collapsible-BaAUa-uq.js";import"./use-clock-tick-Bn5JCPrV.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Cx5_Cgu7.js";import"./types-ODqpEiLj.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-EnE9wqRk.js";import"./use-navigate-to-agent-Bh1luKWv.js";import"./use-thread-outputs-CIGWCWtQ.js";import"./switch-CnVsSUQF.js";import"./command-HQXCvIc1.js";import"./index-F1Fq1aIw.js";import"./monaco-editor-DKn4Wqed.js";import"./editor-DlDOOY_4.js";import"./calendar-GjUu2S3w.js";import"./SwitchHorizontal01-CeUNJpHb.js";import"./editor-classes-BA-XOPn9.js";import"./view-mode-toggle-UGzYIEFg.js";import"./combobox-DMjnN_aL.js";import"./DotsVertical-Cb3iOarq.js";import"./search-input-CUDMkzW3.js";import"./use-debounced-value-BcnQYbv8.js";import"./use-file-configs-DBaPVWpT.js";import"./asset-utils-Bgywf85e.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-git-api-CRxdlhrN.js";import"./sandbox-url-D3mC8qhT.js";import"./empty-state-D0xYsV2u.js";import"./Building02-DYC0suyK.js";import"./CheckCircle-CqYnJPRs.js";import"./CreditCard01-D9MXYjlv.js";import"./Globe04-CzPjgHLa.js";import"./Sun-BCgybCT7.js";import"./User01-DBX94Vod.js";import"./Users01-BNiwpGyg.js";import"./use-main-schema-v8-DQ3Tp7hb.js";import"./index-6Ue7sPGM.js";import"./alert-DV4VVYX_.js";import"./section-preview-url-7zfngvgW.js";import"./differenceInSeconds-C3x8sHUj.js";import"./project-icon-DDLQLFHN.js";import"./new-project-dialog-7fKdzYQ0.js";import"./repository-import-picker-BNXAK2-d.js";import"./repository-picker-DdXZfSFi.js";import"./required-auth-layout-yR_GLYbd.js";import"./use-org-sso-CAhUTOPh.js";import"./use-org-auth-client-CXEz66O9.js";const Ll={escape:Ji};function $l(n,e){for(const s of kl(n,e)){const o=typeof s.title=="string"?s.title:void 0;if(o?.includes("{{"))return o}}function zl(n,e){if(!e)return;const s=$a(n);if(s)try{const o=$l(s.resolveType,e);return o&&Fa.render(o,s.data,{},Ll).trim()||void 0}catch{return}}function Hl(n){const e=it.c(13),{icon:s,label:o,className:a}=n;let u;e[0]!==a?(u=ae("size-3.5",a),e[0]=a,e[1]=u):u=e[1];let h;e[2]!==s||e[3]!==u?(h=i.jsx(s,{className:u}),e[2]=s,e[3]=u,e[4]=h):h=e[4];let d;e[5]!==o||e[6]!==h?(d=i.jsx(Et,{asChild:!0,children:i.jsx("span",{role:"img","aria-label":o,className:"shrink-0 cursor-help",children:h})}),e[5]=o,e[6]=h,e[7]=d):d=e[7];let v;e[8]!==o?(v=i.jsx(Rt,{className:"max-w-56",children:o}),e[8]=o,e[9]=v):v=e[9];let m;return e[10]!==d||e[11]!==v?(m=i.jsxs(kt,{children:[d,v]}),e[10]=d,e[11]=v,e[12]=m):m=e[12],m}const Wl="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 io(n){return Array.from({length:n},(e,s)=>({id:crypto.randomUUID(),index:s}))}function ko(n){return n.map((e,s)=>({...e,index:s}))}function ql(n,e){if(e===n.length)return n;if(e<n.length)return ko(n.slice(0,e));const s=Array.from({length:e-n.length},(o,a)=>({id:crypto.randomUUID(),index:n.length+a}));return[...n,...s]}function Eo(n){const e=it.c(44),{section:s,raw:o,meta:a,decofile:u}=n,h=Ft(),d=Wn(),v=s.isSavedBlock===!0,m=s.isMultivariate===!0;let j;e[0]!==a||e[1]!==o?(j=o&&a?El(o,a):void 0,e[0]=a,e[1]=o,e[2]=j):j=e[2];const A=j;let $;e[3]!==a||e[4]!==m||e[5]!==o||e[6]!==v?($=o&&a&&!v&&!m?zl(o,a):void 0,e[3]=a,e[4]=m,e[5]=o,e[6]=v,e[7]=$):$=e[7];const z=$;let H;e[8]!==u||e[9]!==a||e[10]!==o||e[11]!==s?(H=na(o,s,u,a),e[8]=u,e[9]=a,e[10]=o,e[11]=s,e[12]=H):H=e[12];const F=H;let f;e[13]!==m||e[14]!==o?.__resolveType?(f=!m&&Rs(o?.__resolveType??""),e[13]=m,e[14]=o?.__resolveType,e[15]=f):f=e[15];const k=f,X=v?zn:m?bo:_o;let w;e[16]!==m||e[17]!==v?(w=v?{color:za}:m?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=m,e[17]=v,e[18]=w):w=e[18];const I=w;let V;e[19]!==X||e[20]!==d?(V=d?i.jsxs("span",{className:"relative size-4 shrink-0",children:[i.jsx(X,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),i.jsx(ra,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):i.jsx(Aa,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=X,e[20]=d,e[21]=V):V=e[21];let y;e[22]!==A?(y=A&&i.jsx("img",{src:A,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=A,e[23]=y):y=e[23];let C;e[24]!==d||e[25]!==I?(C=!d&&i.jsx(Ss,{className:"h-4 w-4 shrink-0",style:I}),e[24]=d,e[25]=I,e[26]=C):C=e[26];const x=d?"shrink":"flex-1",Y=s.isHidden&&"line-through opacity-50";let D;e[27]!==Y||e[28]!==x?(D=ae("min-w-0 truncate text-sm font-medium",x,Y),e[27]=Y,e[28]=x,e[29]=D):D=e[29];const ge=z??s.label;let me;e[30]!==D||e[31]!==ge?(me=i.jsx("span",{className:D,children:ge}),e[30]=D,e[31]=ge,e[32]=me):me=e[32];let le;e[33]!==k||e[34]!==d||e[35]!==F||e[36]!==h?(le=d?i.jsxs(i.Fragment,{children:[k&&i.jsx(Hl,{icon:bs,label:h("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),F&&i.jsx(Br,{}),i.jsx("span",{className:"min-w-0 flex-1"})]}):F&&i.jsx(Br,{className:"absolute -right-0.5 -top-0.5"}),e[33]=k,e[34]=d,e[35]=F,e[36]=h,e[37]=le):le=e[37];let ee;return e[38]!==me||e[39]!==le||e[40]!==V||e[41]!==y||e[42]!==C?(ee=i.jsxs(i.Fragment,{children:[V,y,C,me,le]}),e[38]=me,e[39]=le,e[40]=V,e[41]=y,e[42]=C,e[43]=ee):ee=e[43],ee}const Gl="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Ul="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 Ro(n,e,s){if(s)return sa({selected:e});const o=n.isSavedBlock===!0,a=n.isMultivariate===!0;return ae("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":o?Gl:a?Ul:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function ps(n,e){return ae("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"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 Yl(n){const e=it.c(90),{section:s,raw:o,meta:a,decofile:u,sortableId:h,selected:d,onSelect:v,onDelete:m,onDuplicate:j,onMakeReusable:A,onToggleHidden:$,onToggleLazy:z,onAddVariant:H,onDetach:F}=n,f=Ft(),k=Wn(),X=o?Rs(o.__resolveType??""):!1,w=s.isHidden===!0,I=X||w;let V;e[0]!==s?(V=jo(s),e[0]=s,e[1]=V):V=e[1];const y=V,C=!!z&&!s.isMultivariate;let x;e[2]!==h?(x={id:h,animateLayoutChanges:Xl},e[2]=h,e[3]=x):x=e[3];const{attributes:Y,listeners:D,setNodeRef:ge,transform:me,isDragging:le}=bl(x);let ee;e[4]!==me?(ee=xl.Transform.toString(me?{...me,x:0}:null),e[4]=me,e[5]=ee):ee=e[5];const pe=le?0:void 0;let ce;e[6]!==ee||e[7]!==pe?(ce={transform:ee,opacity:pe},e[6]=ee,e[7]=pe,e[8]=ce):ce=e[8];const he=ce;let ve;e[9]!==s?(ve=Xi(s),e[9]=s,e[10]=ve):ve=e[10];const b=ve,B="button",xe=0;let T;e[11]!==v?(T=re=>{(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),v())},e[11]=v,e[12]=T):T=e[12];const ye=le?"cursor-grabbing":"cursor-pointer";let K;e[13]!==k||e[14]!==s||e[15]!==d||e[16]!==ye?(K=ae("touch-none transition-colors",ye,Ro(s,d,k)),e[13]=k,e[14]=s,e[15]=d,e[16]=ye,e[17]=K):K=e[17];let Se;e[18]!==u||e[19]!==a||e[20]!==o||e[21]!==s?(Se=i.jsx(Eo,{section:s,raw:o,meta:a,decofile:u}),e[18]=u,e[19]=a,e[20]=o,e[21]=s,e[22]=Se):Se=e[22];const ue=!k&&C&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon","aria-label":f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:ae(ps(I,X)),onClick:re=>{re.stopPropagation(),z?.()},onPointerDown:Ql,children:i.jsx(bs,{className:ae("h-3.5 w-3.5",X&&"text-warning")})})}),i.jsx(Rt,{side:"bottom",children:f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),te=k?i.jsx(Zi,{label:f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:w,onToggle:$,children:w?i.jsx(Zr,{className:"h-3.5 w-3.5"}):i.jsx(eo,{className:"h-3.5 w-3.5"})}):i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon","aria-label":f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:ae(ps(I,w)),onClick:re=>{re.stopPropagation(),$()},onPointerDown:Jl,children:w?i.jsx(Zr,{className:"h-3.5 w-3.5"}):i.jsx(eo,{className:"h-3.5 w-3.5"})})}),i.jsx(Rt,{side:"bottom",children:f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),se=zi,Te=ea;let Z;e[23]!==f?(Z=f("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=f,e[24]=Z):Z=e[24];const _e=ae(ps(I,!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 be;e[25]!==Te||e[26]!==Z||e[27]!==_e?(be=i.jsx(Te,{label:Z,classicClassName:_e}),e[25]=Te,e[26]=Z,e[27]=_e,e[28]=be):be=e[28];let q;e[29]!==k||e[30]!==C||e[31]!==X||e[32]!==z||e[33]!==f?(q=k&&C&&i.jsxs(i.Fragment,{children:[i.jsxs(sn,{onClick:re=>{re.stopPropagation(),z?.()},children:[i.jsx(bs,{className:"h-4 w-4"}),f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),i.jsx($i,{})]}),e[29]=k,e[30]=C,e[31]=X,e[32]=z,e[33]=f,e[34]=q):q=e[34];let O;e[35]!==j?(O=re=>{re.stopPropagation(),j()},e[35]=j,e[36]=O):O=e[36];let Ke;e[37]===Symbol.for("react.memo_cache_sentinel")?(Ke=i.jsx(dl,{className:"h-4 w-4"}),e[37]=Ke):Ke=e[37];let Qe;e[38]!==f?(Qe=f("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=f,e[39]=Qe):Qe=e[39];let Xe;e[40]!==O||e[41]!==Qe?(Xe=i.jsxs(sn,{onClick:O,children:[Ke,Qe]}),e[40]=O,e[41]=Qe,e[42]=Xe):Xe=e[42];let Ye;e[43]!==k||e[44]!==y||e[45]!==H||e[46]!==f?(Ye=y&&i.jsxs(sn,{className:ae(!k&&ta),onClick:re=>{re.stopPropagation(),H()},children:[i.jsx(bo,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=k,e[44]=y,e[45]=H,e[46]=f,e[47]=Ye):Ye=e[47];let Q;e[48]!==k||e[49]!==b||e[50]!==A||e[51]!==f?(Q=b&&i.jsxs(sn,{className:ae(!k&&Wl),onClick:re=>{re.stopPropagation(),A()},children:[k?i.jsx(zn,{className:"h-4 w-4"}):i.jsx(Ss,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=k,e[49]=b,e[50]=A,e[51]=f,e[52]=Q):Q=e[52];let ke;e[53]!==k||e[54]!==F||e[55]!==s.isMultivariate||e[56]!==s.isSavedBlock||e[57]!==f?(ke=s.isSavedBlock===!0&&!s.isMultivariate&&i.jsxs(sn,{onClick:re=>{re.stopPropagation(),F()},children:[k?i.jsx(_o,{className:"h-4 w-4"}):i.jsx(Ss,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=k,e[54]=F,e[55]=s.isMultivariate,e[56]=s.isSavedBlock,e[57]=f,e[58]=ke):ke=e[58];let He;e[59]!==m?(He=re=>{re.stopPropagation(),m()},e[59]=m,e[60]=He):He=e[60];let We;e[61]===Symbol.for("react.memo_cache_sentinel")?(We=i.jsx(ml,{className:"h-4 w-4"}),e[61]=We):We=e[61];let Ee;e[62]!==f?(Ee=f("sectionsEditor.sectionList.deleteMenuItem"),e[62]=f,e[63]=Ee):Ee=e[63];let Ie;e[64]!==He||e[65]!==Ee?(Ie=i.jsxs(sn,{variant:"destructive",onClick:He,children:[We,Ee]}),e[64]=He,e[65]=Ee,e[66]=Ie):Ie=e[66];let Ve;e[67]!==q||e[68]!==Xe||e[69]!==Ye||e[70]!==Q||e[71]!==ke||e[72]!==Ie?(Ve=i.jsxs(Hi,{align:"end",className:"w-44",children:[q,Xe,Ye,Q,ke,Ie]}),e[67]=q,e[68]=Xe,e[69]=Ye,e[70]=Q,e[71]=ke,e[72]=Ie,e[73]=Ve):Ve=e[73];let Ze;e[74]!==se||e[75]!==be||e[76]!==Ve?(Ze=i.jsxs(se,{children:[be,Ve]}),e[74]=se,e[75]=be,e[76]=Ve,e[77]=Ze):Ze=e[77];let Fe;return e[78]!==Y||e[79]!==D||e[80]!==v||e[81]!==ge||e[82]!==he||e[83]!==K||e[84]!==Se||e[85]!==ue||e[86]!==te||e[87]!==Ze||e[88]!==T?(Fe=i.jsxs("div",{ref:ge,style:he,...Y,...D,role:B,tabIndex:xe,onClick:v,onKeyDown:T,className:K,children:[Se,ue,te,Ze]}),e[78]=Y,e[79]=D,e[80]=v,e[81]=ge,e[82]=he,e[83]=K,e[84]=Se,e[85]=ue,e[86]=te,e[87]=Ze,e[88]=T,e[89]=Fe):Fe=e[89],Fe}function Jl(n){return n.stopPropagation()}function Ql(n){return n.stopPropagation()}function Xl(){return!1}function js(n){const e=it.c(11),{canAddSection:s,onAddSection:o,className:a,size:u}=n,h=Ft();let d;e[0]!==a?(d=ae("w-full",a),e[0]=a,e[1]=d):d=e[1];const v=!s;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(fl,{size:14}),e[2]=m):m=e[2];let j;e[3]!==h?(j=h("sectionsEditor.sectionList.addSectionButton"),e[3]=h,e[4]=j):j=e[4];let A;return e[5]!==o||e[6]!==u||e[7]!==d||e[8]!==v||e[9]!==j?(A=i.jsxs(_t,{type:"button",variant:"outline",size:u,className:d,disabled:v,onClick:o,children:[m,j]}),e[5]=o,e[6]=u,e[7]=d,e[8]=v,e[9]=j,e[10]=A):A=e[10],A}function Zl(n){const e=it.c(101),{listKey:s,rawSections:o,sections:a,meta:u,decofile:h,selectedIndex:d,onSelect:v,onReorder:m,onDelete:j,onDuplicate:A,onMakeReusable:$,onToggleHidden:z,onToggleLazy:H,onAddVariant:F,onDetach:f,onAddSection:k,canAddSection:X}=n,w=X===void 0?!0:X,I=Ft(),V=Wn();let y;e[0]!==a.length?(y=()=>io(a.length),e[0]=a.length,e[1]=y):y=e[1];const[C,x]=R.useState(y),[Y,D]=R.useState(null),[ge,me]=R.useState(s),[le,ee]=R.useState(a.length),pe=R.useRef(!1);ge!==s?(me(s),ee(a.length),x(io(a.length))):le!==a.length&&(ee(a.length),x(dt=>ql(dt,a.length)));let ce;e[2]===Symbol.for("react.memo_cache_sentinel")?(ce={activationConstraint:{distance:8}},e[2]=ce):ce=e[2];let he;e[3]===Symbol.for("react.memo_cache_sentinel")?(he={coordinateGetter:jl},e[3]=he):he=e[3];const ve=pl(to(gl,ce),to(hl,he));let b;e[4]!==C?(b=C.map(ec),e[4]=C,e[5]=b):b=e[5];const B=b;let xe;e[6]===Symbol.for("react.memo_cache_sentinel")?(xe=dt=>{D(String(dt.active.id))},e[6]=xe):xe=e[6];const T=xe;let ye;e[7]!==B||e[8]!==m?(ye=dt=>{D(null);const{active:ne,over:Me}=dt;if(!Me||ne.id===Me.id)return;const yt=B.indexOf(String(ne.id)),et=B.indexOf(String(Me.id));yt===-1||et===-1||(x(ft=>ko(Ln([...ft],yt,et))),pe.current=!0,requestAnimationFrame(()=>{pe.current=!1}),m?.(yt,et))},e[7]=B,e[8]=m,e[9]=ye):ye=e[9];const K=ye;let Se;e[10]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{D(null)},e[10]=Se):Se=e[10];const ue=Se;let te,se,Te,Z,_e,be,q,O,Ke,Qe,Xe,Ye,Q,ke,He;if(e[11]!==Y||e[12]!==w||e[13]!==V||e[14]!==h||e[15]!==C||e[16]!==B||e[17]!==K||e[18]!==u||e[19]!==k||e[20]!==F||e[21]!==j||e[22]!==f||e[23]!==A||e[24]!==$||e[25]!==v||e[26]!==z||e[27]!==H||e[28]!==o||e[29]!==a||e[30]!==d||e[31]!==ve||e[32]!==I){ke=Symbol.for("react.early_return_sentinel");e:{const dt=ne=>{pe.current||v(ne)};if(e[48]!==Y||e[49]!==w||e[50]!==V||e[51]!==C||e[52]!==k||e[53]!==o||e[54]!==a||e[55]!==I){const ne=Y?C.find(Me=>Me.id===Y):null;if(Z=ne!=null?a[ne.index]:null,Te=ne!=null?o[ne.index]:void 0,C.length===0){let Me;e[59]!==I?(Me=I("sectionsEditor.sectionList.noSections"),e[59]=I,e[60]=Me):Me=e[60];let yt;e[61]!==Me?(yt=i.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Me}),e[61]=Me,e[62]=yt):yt=e[62];const et=yt;let ft;e[63]!==w||e[64]!==V||e[65]!==et||e[66]!==k?(ft=V?et:i.jsxs("div",{className:"space-y-2",children:[et,i.jsx(js,{canAddSection:w,onAddSection:k,size:"sm"})]}),e[63]=w,e[64]=V,e[65]=et,e[66]=k,e[67]=ft):ft=e[67],ke=ft;break e}Q=ae(ne&&"cursor-grabbing"),e[48]=Y,e[49]=w,e[50]=V,e[51]=C,e[52]=k,e[53]=o,e[54]=a,e[55]=I,e[56]=Te,e[57]=Z,e[58]=Q}else Te=e[56],Z=e[57],Q=e[58];se=yl,O=ve,Ke=Sl,Qe=T,Xe=K,Ye=ue,te=wl,be=B,q=_l,He="space-y-1",_e=C.map(ne=>{const Me=a[ne.index];return Me?i.jsx(Yl,{sortableId:ne.id,section:Me,raw:o[ne.index],meta:u,decofile:h,selected:d===ne.index,onSelect:()=>dt(ne.index),onDelete:()=>j(ne.index),onDuplicate:()=>A(ne.index),onMakeReusable:()=>$(ne.index),onToggleHidden:()=>z(ne.index),onToggleLazy:H?()=>H(ne.index):void 0,onAddVariant:()=>F(ne.index),onDetach:()=>f(ne.index)},ne.id):null})}e[11]=Y,e[12]=w,e[13]=V,e[14]=h,e[15]=C,e[16]=B,e[17]=K,e[18]=u,e[19]=k,e[20]=F,e[21]=j,e[22]=f,e[23]=A,e[24]=$,e[25]=v,e[26]=z,e[27]=H,e[28]=o,e[29]=a,e[30]=d,e[31]=ve,e[32]=I,e[33]=te,e[34]=se,e[35]=Te,e[36]=Z,e[37]=_e,e[38]=be,e[39]=q,e[40]=O,e[41]=Ke,e[42]=Qe,e[43]=Xe,e[44]=Ye,e[45]=Q,e[46]=ke,e[47]=He}else te=e[33],se=e[34],Te=e[35],Z=e[36],_e=e[37],be=e[38],q=e[39],O=e[40],Ke=e[41],Qe=e[42],Xe=e[43],Ye=e[44],Q=e[45],ke=e[46],He=e[47];if(ke!==Symbol.for("react.early_return_sentinel"))return ke;let We;e[68]!==_e||e[69]!==He?(We=i.jsx("div",{className:He,children:_e}),e[68]=_e,e[69]=He,e[70]=We):We=e[70];let Ee;e[71]!==te||e[72]!==be||e[73]!==q||e[74]!==We?(Ee=i.jsx(te,{items:be,strategy:q,children:We}),e[71]=te,e[72]=be,e[73]=q,e[74]=We,e[75]=Ee):Ee=e[75];let Ie;e[76]!==Te||e[77]!==Z||e[78]!==V||e[79]!==h||e[80]!==u?(Ie=Z?i.jsx("div",{className:ae("cursor-grabbing shadow-lg ring-1 ring-border/60",Ro(Z,!1,V)),children:i.jsx(Eo,{section:Z,raw:Te,meta:u,decofile:h})}):null,e[76]=Te,e[77]=Z,e[78]=V,e[79]=h,e[80]=u,e[81]=Ie):Ie=e[81];let Ve;e[82]!==Ie?(Ve=Li.createPortal(i.jsx(vl,{dropAnimation:Qi,children:Ie}),document.body),e[82]=Ie,e[83]=Ve):Ve=e[83];let Ze;e[84]!==se||e[85]!==O||e[86]!==Ke||e[87]!==Qe||e[88]!==Xe||e[89]!==Ye||e[90]!==Ee||e[91]!==Ve?(Ze=i.jsxs(se,{sensors:O,collisionDetection:Ke,onDragStart:Qe,onDragEnd:Xe,onDragCancel:Ye,children:[Ee,Ve]}),e[84]=se,e[85]=O,e[86]=Ke,e[87]=Qe,e[88]=Xe,e[89]=Ye,e[90]=Ee,e[91]=Ve,e[92]=Ze):Ze=e[92];let Fe;e[93]!==w||e[94]!==V||e[95]!==k?(Fe=!V&&i.jsx(js,{canAddSection:w,onAddSection:k,size:"sm",className:"mt-2"}),e[93]=w,e[94]=V,e[95]=k,e[96]=Fe):Fe=e[96];let re;return e[97]!==Q||e[98]!==Ze||e[99]!==Fe?(re=i.jsxs("div",{className:Q,children:[Ze,Fe]}),e[97]=Q,e[98]=Ze,e[99]=Fe,e[100]=re):re=e[100],re}function ec(n){return n.id}function hs(n,e,s,o){if(!n||!e)return null;if(!e.isMultivariate)return jt(n,e,o)?.data??null;const a=xt(n,e),u=a?vs(a,wt)[s]:void 0;return u?wo(u.value,o)?.data??null:null}const tc=50;function nc(n,e){n.own.push(ze(e)),n.own.length>tc&&n.own.shift()}function ao(n,e){return n.own.includes(ze(e))}function sc(n,e){const{sectionIndex:s,variantIndex:o,shown:a,next:u,sectionCount:h}=e;return n&&n.sectionIndex===s&&n.variantIndex===o&&n.emitted===a?(n.emitted=u,n):a?{sectionIndex:s,variantIndex:o,base:a,emitted:u,sectionCount:h,own:[ze(a)]}:null}function Ao(n,e){return e!==null&&ze(n)!==ze(e)}function Co(n,e){return n.__resolveType!==e.__resolveType}function rc(n,e,s,o){if(e.length===o)return"here";const a=ze(n),u=e.flatMap((h,d)=>d!==s&&h!==null&&ze(h)===a?[d]:[]);return u.length===1?u[0]:"unknown"}function lo({formBase:n,rebased:e,versionOf:s}){let o=null;return{ifMatch:a=>{o=a,n&&(n.version===void 0||e)&&(n.version=s(a));const u=n?n.version:s(a);return u===void 0?void 0:{[a]:u}},onApplied:a=>{n&&o!==null&&Object.hasOwn(a,o)&&(n.version=a[o])},reloadOnConflict:!0}}function oc({merged:n,tracked:e,current:s,saved:o}){return!!n&&!!e&&s===e&&e.emitted===o}function co(n,e){return!!n&&!!e&&n.contains(e)}function ws(n){const e=[],s=_s("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:s,pointers:e}}function _s(n,e,s,o,a){const u=(h,d)=>ze(h)===ze(d);if(u(s,o)||u(e,o))return s;if(u(e,s))return o;if(gs(s)&&gs(o)){const h=gs(e)?e:{},d={},v=[...Object.keys(s),...Object.keys(o).filter(m=>!(m in s))];for(const m of v){const j=_s(`${n}/${m.replaceAll("~","~0").replaceAll("/","~1")}`,h[m],s[m],o[m],a);j!==void 0&&(d[m]=j)}return d}return Array.isArray(e)&&Array.isArray(s)&&Array.isArray(o)&&s.length===e.length&&o.length===e.length?e.map((h,d)=>_s(`${n}/${d}`,h,s[d],o[d],a)):(a.push(n),o)}function gs(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function ic(n,e){let s=n.merged;for(const o of n.pointers)e[o]==="mine"&&(s=uc(s,o,Ut(n.mine,o)));return s}function ac(n,e){return Object.fromEntries(n.pointers.map(s=>[s,e]))}function No(n){return ac(n,"mine")}function ks(n,e,s){const o=No(s);for(const a of s.pointers){const u=e[a];if(!u||!n.pointers.includes(a))continue;["mine","theirs"].every(d=>ze(Ut(n[d],a))===ze(Ut(s[d],a)))&&(o[a]=u)}return o}function To(n,e,s={}){const o=e.pointers.filter(a=>!n.pointers.includes(a)||ze(Ut(n.theirs,a))!==ze(Ut(e.theirs,a)));return o.length===0?s:{...s,...Object.fromEntries(o.map(a=>[a,(s[a]??0)+1]))}}function lc(n,e,s){if(!e||Co(n.plan.ancestor,e)||!Ao(n.plan.theirs,e)||s(e))return null;const o=ws({...n.plan,theirs:e});return o.pointers.length===0?null:{plan:o,choices:ks(n.plan,n.choices,o),fresh:To(n.plan,o,n.fresh)}}function cc(n,e){return n.pointers.map(s=>({pointer:s,label:oa(s,e),mine:Ut(n.mine,s),theirs:Ut(n.theirs,s),schema:dc(e??null,s)}))}function As(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function Ut(n,e){let s=n;for(const o of As(e))if(Array.isArray(s))s=s[Number(o)];else if(s&&typeof s=="object")s=s[o];else return;return s}function uc(n,e,s){const o=As(e),a=(u,h)=>{if(h===o.length)return s;const d=o[h];if(Array.isArray(u)){const j=[...u];return j[Number(d)]=a(u[Number(d)],h+1),j}const v=u&&typeof u=="object"?{...u}:{},m=a(v[d],h+1);return m===void 0?delete v[d]:v[d]=m,v};return a(n,0)}function dc(n,e){let s=n;for(const o of As(e)){if(!s)return null;s=/^\d+$/.test(o)&&!s.properties?.[o]?s.items:s.properties?.[o]}return s??null}const fc=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,uo=60,mc=3;function Vo(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&fc.test(n)}function Es(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const o=n.replace(/<br\s*\/?>/gi,`
|
|
1
|
+
import{c as it,b as Ft,r as R,l as ae,j as i,b4 as Li,B as _t,U as sn,ag as $i,X as zi,V as Hi,a as xo,F as Wi,K as yo,m as qi,o as Gi,h as Ui,t as oe}from"./index-DEQvnIsm.js";import{u as Yi}from"./chat-context-Dv2E4fnf.js";import{a5 as Ji,T as Wn,a6 as Qi,a7 as Xi,a8 as Zi,a9 as ea,aa as ta,ab as na,ac as Br,ad as sa,ae as ra,G as jt,af as wt,ag as ze,ah as oa,H as Fn,E as On,b as ia,j as aa,u as la,ai as Kr,q as ca,aj as ua,s as da,o as fa,ak as So,p as _n,al as ma,am as pa,A as Fr,an as ha,ao as ga,ap as Bn,aq as Or,ar as Lr,as as $r,at as us,au as va,av as xa,F as ya,aw as zr,ax as Sa,ay as Hr,az as Wr,M as ba,aA as qr,a as ja,aB as Sn,aC as wa,aD as _a,aE as bn,aF as ds}from"./blocks-tab-states-BjRnBrj4.js";import{c as ka}from"./repository-binding-DpSh0bkT.js";import{n as Ea,t as Ra}from"./ChevronUp-DK-Gvyk8.js";import{ac as bo,b as zn,ar as Aa,G as Ca,a5 as Gr,a1 as Ur}from"./agent-icon-D6wS7rd0.js";import{S as rn}from"./scroll-area-CIRLWlOA.js";import{c as kt,T as Et,a as Rt}from"./tooltip-B6NbTX5P.js";import{am as Na,g as Yr,J as Ta,u as Va,K as Ma,w as Da,ab as Pa,x as Ia,d as Pt,f as It,a7 as Ba,ar as Ka}from"./site-editor-toast-CmNIWnCw.js";import{m as Fa,u as Oa,P as La}from"./mustache-DrIjKpei.js";import{az as $a,k as Rs,aB as jo,H as za,aC as xt,aD as vs,aE as wo,aj as Gt,a8 as xs,aF as ys,ak as Kt,a9 as on,q as Ha,t as Wa,g as qa,x as Kn,ar as Ga,ai as jn,aa as fs,ah as Bt,ag as wn,aG as Ua,P as Ya,aH as Ja,al as Jr,a1 as Qr,aI as Qa,aJ as qt,aK as Xa,aL as Za,aM as el,aN as Xr,aO as tl,aP as nl,aQ as sl,af as rl,aR as ol,aS as il,aT as al,aU as ll,ae as cl,aV as ul}from"./secret-ciphertext-6VBjcV3b.js";import{a as dl}from"./Copy01-EWitDFCf.js";import{a as Ss,f as _o}from"./UserSquare-cdWcOBLL.js";import{i as Zr}from"./Tool01-Bp-TbrXi.js";import{s as eo}from"./Image01-BfGAREA7.js";import{s as fl}from"./Plus-DQf-jm_3.js";import{s as ml}from"./Trash01-Dlk_Sh-H.js";import{i as bs}from"./ZoomOut-B3s5275g.js";import{u as pl,a as to,K as hl,P as gl,b as vl,C as xl,D as yl,c as Sl}from"./core.esm-BO316fgf.js";import{u as bl,s as jl,a as Ln,S as wl,v as _l}from"./sortable.esm-BuCSUlOk.js";import{s as kl,g as El,u as Rl,A as Al}from"./use-section-preview-base-DAksxTnD.js";import{A as ms}from"./avatar-LfY3dprD.js";import{e as Cl,d as no,b as Nl,A as Tl,a as Vl,f as Ml}from"./alert-dialog-ygFmYcOa.js";import{b as Dl}from"./format-time-Cq80KKvY.js";import{d as Pl}from"./shell-layout-DKGS0yWx.js";import{u as Il}from"./use-members-D-L919KG.js";import{a as Bl,P as so,b as Kl}from"./page-seo-form-N1KKSZaU.js";import{c as ro,d as oo,e as Fl,f as Ol}from"./variant-draft-pointer-BY7yWri4.js";import"./use-panel-navigate-BwwjvhNB.js";import"./thread-route-DTbE-Col.js";import"./use-project-scope-Dn4doId4.js";import"./autosend-CL2OZPvg.js";import"./thread-intent-8kpZLcDE.js";import"./use-mcp-client-CAdgJ_QT.js";import"./auth-BVkTFTOt.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C7xRCtu5.js";import"./task-board-DUTGhEiC.js";import"./schema-BzqS-kNt.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-Czwn8ZVj.js";import"./use-ai-providers-W2Q5vYCk.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BtOReG0H.js";import"./input-Brhdhig1.js";import"./usage-stats-BH4bqLoE.js";import"./tool-namespace-CTeV292R.js";import"./form-DNjk4sZI.js";import"./label-Cf2Qy475.js";import"./utils-CVEq3hMx.js";import"./markdown-DgDY2QmE.js";import"./use-copy-Dkgb0DtI.js";import"./use-mobile-CSFJ-mhK.js";import"./XClose-L_GNViCD.js";import"./icon-button-WP5IJTs8.js";import"./file-type-icon-HF5UcaS2.js";import"./chat-draft-X1dGJc2x.js";import"./LinkBroken01-DmmKNgpp.js";import"./ArrowUp--4P0C-xl.js";import"./ShoppingBag01-B7gta_qY.js";import"./Upload01-DlF9Jqso.js";import"./AlertCircle-Q16nTVAa.js";import"./select-ChqJI0MI.js";import"./index-BdQq_4o_.js";import"./index-BaQyqQF-.js";import"./ArrowLeft-C_dTX_8N.js";import"./tabs-D0oiuUhC.js";import"./use-deco-credits-k0aTLB-T.js";import"./toggle-group-BWQRN38D.js";import"./use-open-billing-url-DWsw6Alp.js";import"./index-DZLfyA8t.js";import"./checkbox-CaUezNgL.js";import"./ChevronSelectorVertical-GBLm8Zpl.js";import"./Key01-BV7tzZs6.js";import"./SearchMd-D0zp0uee.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-BoSs_8gg.js";import"./popover-CjfUWaC0.js";import"./drawer-DL0G-oy-.js";import"./input-Bu2Qzwzh.js";import"./suggestion-DRP05M3-.js";import"./use-mcp-prompts-D1rnFTSb.js";import"./use-org-fs-CAwgni1d.js";import"./useInfiniteQuery-Bo5dbMM_.js";import"./infiniteQueryObserver-BnP8vr6V.js";import"./Link01-9civFIb9.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-BSXK-EmV.js";import"./plan-ladder-CFysCUYy.js";import"./add-connection-dialog-DwDvS8Uw.js";import"./collection-search-Dcze6ySb.js";import"./extract-connection-data-BlmKelwb.js";import"./metadata-D72DunRR.js";import"./connection-CEK3iDim.js";import"./url-slug-CYvqbzge.js";import"./connection-card-Zhg6xn7V.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-Bysyldtc.js";import"./textarea-CWgoXXnV.js";import"./use-connection-Cqf7M1G6.js";import"./schema-Bcb37BRV.js";import"./connection-form-helpers-DAFP702a.js";import"./authenticate-and-persist-oauth-POYqGagt.js";import"./mcp-oauth-C_-ZUSLH.js";import"./mcp-oauth-aX1L4mRw.js";import"./collection-tabs-yg6VVFu9.js";import"./badge-CyDHDRPg.js";import"./use-infinite-scroll-B9sczgXI.js";import"./useSuspenseInfiniteQuery-CcFcpWuM.js";import"./use-task-board-events-CmYlpSMI.js";import"./use-chat-layout-state-C-XHZ0Dd.js";import"./utils-D-52h1Lf.js";import"./Play-CleWZLOG.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-ByV0vAAs.js";import"./collapsible-DHXUZre4.js";import"./use-clock-tick-xpCK7CUB.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-pDbHkuXF.js";import"./types-m1Dsi5sG.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CzJFx6b-.js";import"./use-navigate-to-agent-B-QlLf3R.js";import"./use-thread-outputs-BUN4R0HD.js";import"./switch-CJc_fIEE.js";import"./command-KXg0ZuU-.js";import"./index-B9qNCJbx.js";import"./monaco-editor-DDuHJmyY.js";import"./editor-B62-XQRE.js";import"./calendar-sxNtZ9wG.js";import"./SwitchHorizontal01-BJyDDPw9.js";import"./editor-classes-BAKuqcj0.js";import"./view-mode-toggle-Bgum-rnB.js";import"./combobox-B5xPQiKP.js";import"./DotsVertical-DIT5hu2b.js";import"./search-input-Br9i_Ft5.js";import"./use-debounced-value-vhgvmVq4.js";import"./use-file-configs-BIHMmAjW.js";import"./asset-utils-Duz2qYol.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-git-api-CRxdlhrN.js";import"./sandbox-url-D3mC8qhT.js";import"./empty-state-JTI0oLk7.js";import"./Building02-Gub-pr-8.js";import"./CheckCircle-CQxu_pm9.js";import"./CreditCard01-wx_z4Iiz.js";import"./Globe04-B45_cBRN.js";import"./Sun-BfjJa3ru.js";import"./User01-BcekHhAV.js";import"./Users01-BIP-PxGt.js";import"./use-main-schema-v8-Jzc_7tOC.js";import"./index-DAYXa7zL.js";import"./alert-PPdejvI2.js";import"./section-preview-url-7zfngvgW.js";import"./differenceInSeconds-C3x8sHUj.js";import"./project-icon-ChTT5o1a.js";import"./new-project-dialog-DKeFr4C7.js";import"./repository-import-picker-CmGbASze.js";import"./repository-picker-C86kcY-U.js";import"./required-auth-layout-RW5dOh2c.js";import"./use-org-sso-BhMczCH6.js";import"./use-org-auth-client-Co_fa5Pp.js";const Ll={escape:Ji};function $l(n,e){for(const s of kl(n,e)){const o=typeof s.title=="string"?s.title:void 0;if(o?.includes("{{"))return o}}function zl(n,e){if(!e)return;const s=$a(n);if(s)try{const o=$l(s.resolveType,e);return o&&Fa.render(o,s.data,{},Ll).trim()||void 0}catch{return}}function Hl(n){const e=it.c(13),{icon:s,label:o,className:a}=n;let u;e[0]!==a?(u=ae("size-3.5",a),e[0]=a,e[1]=u):u=e[1];let h;e[2]!==s||e[3]!==u?(h=i.jsx(s,{className:u}),e[2]=s,e[3]=u,e[4]=h):h=e[4];let d;e[5]!==o||e[6]!==h?(d=i.jsx(Et,{asChild:!0,children:i.jsx("span",{role:"img","aria-label":o,className:"shrink-0 cursor-help",children:h})}),e[5]=o,e[6]=h,e[7]=d):d=e[7];let v;e[8]!==o?(v=i.jsx(Rt,{className:"max-w-56",children:o}),e[8]=o,e[9]=v):v=e[9];let m;return e[10]!==d||e[11]!==v?(m=i.jsxs(kt,{children:[d,v]}),e[10]=d,e[11]=v,e[12]=m):m=e[12],m}const Wl="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 io(n){return Array.from({length:n},(e,s)=>({id:crypto.randomUUID(),index:s}))}function ko(n){return n.map((e,s)=>({...e,index:s}))}function ql(n,e){if(e===n.length)return n;if(e<n.length)return ko(n.slice(0,e));const s=Array.from({length:e-n.length},(o,a)=>({id:crypto.randomUUID(),index:n.length+a}));return[...n,...s]}function Eo(n){const e=it.c(44),{section:s,raw:o,meta:a,decofile:u}=n,h=Ft(),d=Wn(),v=s.isSavedBlock===!0,m=s.isMultivariate===!0;let j;e[0]!==a||e[1]!==o?(j=o&&a?El(o,a):void 0,e[0]=a,e[1]=o,e[2]=j):j=e[2];const A=j;let $;e[3]!==a||e[4]!==m||e[5]!==o||e[6]!==v?($=o&&a&&!v&&!m?zl(o,a):void 0,e[3]=a,e[4]=m,e[5]=o,e[6]=v,e[7]=$):$=e[7];const z=$;let H;e[8]!==u||e[9]!==a||e[10]!==o||e[11]!==s?(H=na(o,s,u,a),e[8]=u,e[9]=a,e[10]=o,e[11]=s,e[12]=H):H=e[12];const F=H;let f;e[13]!==m||e[14]!==o?.__resolveType?(f=!m&&Rs(o?.__resolveType??""),e[13]=m,e[14]=o?.__resolveType,e[15]=f):f=e[15];const k=f,X=v?zn:m?bo:_o;let w;e[16]!==m||e[17]!==v?(w=v?{color:za}:m?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=m,e[17]=v,e[18]=w):w=e[18];const I=w;let V;e[19]!==X||e[20]!==d?(V=d?i.jsxs("span",{className:"relative size-4 shrink-0",children:[i.jsx(X,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),i.jsx(ra,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):i.jsx(Aa,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=X,e[20]=d,e[21]=V):V=e[21];let y;e[22]!==A?(y=A&&i.jsx("img",{src:A,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=A,e[23]=y):y=e[23];let C;e[24]!==d||e[25]!==I?(C=!d&&i.jsx(Ss,{className:"h-4 w-4 shrink-0",style:I}),e[24]=d,e[25]=I,e[26]=C):C=e[26];const x=d?"shrink":"flex-1",Y=s.isHidden&&"line-through opacity-50";let D;e[27]!==Y||e[28]!==x?(D=ae("min-w-0 truncate text-sm font-medium",x,Y),e[27]=Y,e[28]=x,e[29]=D):D=e[29];const ge=z??s.label;let me;e[30]!==D||e[31]!==ge?(me=i.jsx("span",{className:D,children:ge}),e[30]=D,e[31]=ge,e[32]=me):me=e[32];let le;e[33]!==k||e[34]!==d||e[35]!==F||e[36]!==h?(le=d?i.jsxs(i.Fragment,{children:[k&&i.jsx(Hl,{icon:bs,label:h("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),F&&i.jsx(Br,{}),i.jsx("span",{className:"min-w-0 flex-1"})]}):F&&i.jsx(Br,{className:"absolute -right-0.5 -top-0.5"}),e[33]=k,e[34]=d,e[35]=F,e[36]=h,e[37]=le):le=e[37];let ee;return e[38]!==me||e[39]!==le||e[40]!==V||e[41]!==y||e[42]!==C?(ee=i.jsxs(i.Fragment,{children:[V,y,C,me,le]}),e[38]=me,e[39]=le,e[40]=V,e[41]=y,e[42]=C,e[43]=ee):ee=e[43],ee}const Gl="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Ul="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 Ro(n,e,s){if(s)return sa({selected:e});const o=n.isSavedBlock===!0,a=n.isMultivariate===!0;return ae("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":o?Gl:a?Ul:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function ps(n,e){return ae("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"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 Yl(n){const e=it.c(90),{section:s,raw:o,meta:a,decofile:u,sortableId:h,selected:d,onSelect:v,onDelete:m,onDuplicate:j,onMakeReusable:A,onToggleHidden:$,onToggleLazy:z,onAddVariant:H,onDetach:F}=n,f=Ft(),k=Wn(),X=o?Rs(o.__resolveType??""):!1,w=s.isHidden===!0,I=X||w;let V;e[0]!==s?(V=jo(s),e[0]=s,e[1]=V):V=e[1];const y=V,C=!!z&&!s.isMultivariate;let x;e[2]!==h?(x={id:h,animateLayoutChanges:Xl},e[2]=h,e[3]=x):x=e[3];const{attributes:Y,listeners:D,setNodeRef:ge,transform:me,isDragging:le}=bl(x);let ee;e[4]!==me?(ee=xl.Transform.toString(me?{...me,x:0}:null),e[4]=me,e[5]=ee):ee=e[5];const pe=le?0:void 0;let ce;e[6]!==ee||e[7]!==pe?(ce={transform:ee,opacity:pe},e[6]=ee,e[7]=pe,e[8]=ce):ce=e[8];const he=ce;let ve;e[9]!==s?(ve=Xi(s),e[9]=s,e[10]=ve):ve=e[10];const b=ve,B="button",xe=0;let T;e[11]!==v?(T=re=>{(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),v())},e[11]=v,e[12]=T):T=e[12];const ye=le?"cursor-grabbing":"cursor-pointer";let K;e[13]!==k||e[14]!==s||e[15]!==d||e[16]!==ye?(K=ae("touch-none transition-colors",ye,Ro(s,d,k)),e[13]=k,e[14]=s,e[15]=d,e[16]=ye,e[17]=K):K=e[17];let Se;e[18]!==u||e[19]!==a||e[20]!==o||e[21]!==s?(Se=i.jsx(Eo,{section:s,raw:o,meta:a,decofile:u}),e[18]=u,e[19]=a,e[20]=o,e[21]=s,e[22]=Se):Se=e[22];const ue=!k&&C&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon","aria-label":f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:ae(ps(I,X)),onClick:re=>{re.stopPropagation(),z?.()},onPointerDown:Ql,children:i.jsx(bs,{className:ae("h-3.5 w-3.5",X&&"text-warning")})})}),i.jsx(Rt,{side:"bottom",children:f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),te=k?i.jsx(Zi,{label:f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:w,onToggle:$,children:w?i.jsx(Zr,{className:"h-3.5 w-3.5"}):i.jsx(eo,{className:"h-3.5 w-3.5"})}):i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon","aria-label":f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:ae(ps(I,w)),onClick:re=>{re.stopPropagation(),$()},onPointerDown:Jl,children:w?i.jsx(Zr,{className:"h-3.5 w-3.5"}):i.jsx(eo,{className:"h-3.5 w-3.5"})})}),i.jsx(Rt,{side:"bottom",children:f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),se=zi,Te=ea;let Z;e[23]!==f?(Z=f("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=f,e[24]=Z):Z=e[24];const _e=ae(ps(I,!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 be;e[25]!==Te||e[26]!==Z||e[27]!==_e?(be=i.jsx(Te,{label:Z,classicClassName:_e}),e[25]=Te,e[26]=Z,e[27]=_e,e[28]=be):be=e[28];let q;e[29]!==k||e[30]!==C||e[31]!==X||e[32]!==z||e[33]!==f?(q=k&&C&&i.jsxs(i.Fragment,{children:[i.jsxs(sn,{onClick:re=>{re.stopPropagation(),z?.()},children:[i.jsx(bs,{className:"h-4 w-4"}),f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),i.jsx($i,{})]}),e[29]=k,e[30]=C,e[31]=X,e[32]=z,e[33]=f,e[34]=q):q=e[34];let O;e[35]!==j?(O=re=>{re.stopPropagation(),j()},e[35]=j,e[36]=O):O=e[36];let Ke;e[37]===Symbol.for("react.memo_cache_sentinel")?(Ke=i.jsx(dl,{className:"h-4 w-4"}),e[37]=Ke):Ke=e[37];let Qe;e[38]!==f?(Qe=f("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=f,e[39]=Qe):Qe=e[39];let Xe;e[40]!==O||e[41]!==Qe?(Xe=i.jsxs(sn,{onClick:O,children:[Ke,Qe]}),e[40]=O,e[41]=Qe,e[42]=Xe):Xe=e[42];let Ye;e[43]!==k||e[44]!==y||e[45]!==H||e[46]!==f?(Ye=y&&i.jsxs(sn,{className:ae(!k&&ta),onClick:re=>{re.stopPropagation(),H()},children:[i.jsx(bo,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=k,e[44]=y,e[45]=H,e[46]=f,e[47]=Ye):Ye=e[47];let Q;e[48]!==k||e[49]!==b||e[50]!==A||e[51]!==f?(Q=b&&i.jsxs(sn,{className:ae(!k&&Wl),onClick:re=>{re.stopPropagation(),A()},children:[k?i.jsx(zn,{className:"h-4 w-4"}):i.jsx(Ss,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=k,e[49]=b,e[50]=A,e[51]=f,e[52]=Q):Q=e[52];let ke;e[53]!==k||e[54]!==F||e[55]!==s.isMultivariate||e[56]!==s.isSavedBlock||e[57]!==f?(ke=s.isSavedBlock===!0&&!s.isMultivariate&&i.jsxs(sn,{onClick:re=>{re.stopPropagation(),F()},children:[k?i.jsx(_o,{className:"h-4 w-4"}):i.jsx(Ss,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=k,e[54]=F,e[55]=s.isMultivariate,e[56]=s.isSavedBlock,e[57]=f,e[58]=ke):ke=e[58];let He;e[59]!==m?(He=re=>{re.stopPropagation(),m()},e[59]=m,e[60]=He):He=e[60];let We;e[61]===Symbol.for("react.memo_cache_sentinel")?(We=i.jsx(ml,{className:"h-4 w-4"}),e[61]=We):We=e[61];let Ee;e[62]!==f?(Ee=f("sectionsEditor.sectionList.deleteMenuItem"),e[62]=f,e[63]=Ee):Ee=e[63];let Ie;e[64]!==He||e[65]!==Ee?(Ie=i.jsxs(sn,{variant:"destructive",onClick:He,children:[We,Ee]}),e[64]=He,e[65]=Ee,e[66]=Ie):Ie=e[66];let Ve;e[67]!==q||e[68]!==Xe||e[69]!==Ye||e[70]!==Q||e[71]!==ke||e[72]!==Ie?(Ve=i.jsxs(Hi,{align:"end",className:"w-44",children:[q,Xe,Ye,Q,ke,Ie]}),e[67]=q,e[68]=Xe,e[69]=Ye,e[70]=Q,e[71]=ke,e[72]=Ie,e[73]=Ve):Ve=e[73];let Ze;e[74]!==se||e[75]!==be||e[76]!==Ve?(Ze=i.jsxs(se,{children:[be,Ve]}),e[74]=se,e[75]=be,e[76]=Ve,e[77]=Ze):Ze=e[77];let Fe;return e[78]!==Y||e[79]!==D||e[80]!==v||e[81]!==ge||e[82]!==he||e[83]!==K||e[84]!==Se||e[85]!==ue||e[86]!==te||e[87]!==Ze||e[88]!==T?(Fe=i.jsxs("div",{ref:ge,style:he,...Y,...D,role:B,tabIndex:xe,onClick:v,onKeyDown:T,className:K,children:[Se,ue,te,Ze]}),e[78]=Y,e[79]=D,e[80]=v,e[81]=ge,e[82]=he,e[83]=K,e[84]=Se,e[85]=ue,e[86]=te,e[87]=Ze,e[88]=T,e[89]=Fe):Fe=e[89],Fe}function Jl(n){return n.stopPropagation()}function Ql(n){return n.stopPropagation()}function Xl(){return!1}function js(n){const e=it.c(11),{canAddSection:s,onAddSection:o,className:a,size:u}=n,h=Ft();let d;e[0]!==a?(d=ae("w-full",a),e[0]=a,e[1]=d):d=e[1];const v=!s;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(fl,{size:14}),e[2]=m):m=e[2];let j;e[3]!==h?(j=h("sectionsEditor.sectionList.addSectionButton"),e[3]=h,e[4]=j):j=e[4];let A;return e[5]!==o||e[6]!==u||e[7]!==d||e[8]!==v||e[9]!==j?(A=i.jsxs(_t,{type:"button",variant:"outline",size:u,className:d,disabled:v,onClick:o,children:[m,j]}),e[5]=o,e[6]=u,e[7]=d,e[8]=v,e[9]=j,e[10]=A):A=e[10],A}function Zl(n){const e=it.c(101),{listKey:s,rawSections:o,sections:a,meta:u,decofile:h,selectedIndex:d,onSelect:v,onReorder:m,onDelete:j,onDuplicate:A,onMakeReusable:$,onToggleHidden:z,onToggleLazy:H,onAddVariant:F,onDetach:f,onAddSection:k,canAddSection:X}=n,w=X===void 0?!0:X,I=Ft(),V=Wn();let y;e[0]!==a.length?(y=()=>io(a.length),e[0]=a.length,e[1]=y):y=e[1];const[C,x]=R.useState(y),[Y,D]=R.useState(null),[ge,me]=R.useState(s),[le,ee]=R.useState(a.length),pe=R.useRef(!1);ge!==s?(me(s),ee(a.length),x(io(a.length))):le!==a.length&&(ee(a.length),x(dt=>ql(dt,a.length)));let ce;e[2]===Symbol.for("react.memo_cache_sentinel")?(ce={activationConstraint:{distance:8}},e[2]=ce):ce=e[2];let he;e[3]===Symbol.for("react.memo_cache_sentinel")?(he={coordinateGetter:jl},e[3]=he):he=e[3];const ve=pl(to(gl,ce),to(hl,he));let b;e[4]!==C?(b=C.map(ec),e[4]=C,e[5]=b):b=e[5];const B=b;let xe;e[6]===Symbol.for("react.memo_cache_sentinel")?(xe=dt=>{D(String(dt.active.id))},e[6]=xe):xe=e[6];const T=xe;let ye;e[7]!==B||e[8]!==m?(ye=dt=>{D(null);const{active:ne,over:Me}=dt;if(!Me||ne.id===Me.id)return;const yt=B.indexOf(String(ne.id)),et=B.indexOf(String(Me.id));yt===-1||et===-1||(x(ft=>ko(Ln([...ft],yt,et))),pe.current=!0,requestAnimationFrame(()=>{pe.current=!1}),m?.(yt,et))},e[7]=B,e[8]=m,e[9]=ye):ye=e[9];const K=ye;let Se;e[10]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{D(null)},e[10]=Se):Se=e[10];const ue=Se;let te,se,Te,Z,_e,be,q,O,Ke,Qe,Xe,Ye,Q,ke,He;if(e[11]!==Y||e[12]!==w||e[13]!==V||e[14]!==h||e[15]!==C||e[16]!==B||e[17]!==K||e[18]!==u||e[19]!==k||e[20]!==F||e[21]!==j||e[22]!==f||e[23]!==A||e[24]!==$||e[25]!==v||e[26]!==z||e[27]!==H||e[28]!==o||e[29]!==a||e[30]!==d||e[31]!==ve||e[32]!==I){ke=Symbol.for("react.early_return_sentinel");e:{const dt=ne=>{pe.current||v(ne)};if(e[48]!==Y||e[49]!==w||e[50]!==V||e[51]!==C||e[52]!==k||e[53]!==o||e[54]!==a||e[55]!==I){const ne=Y?C.find(Me=>Me.id===Y):null;if(Z=ne!=null?a[ne.index]:null,Te=ne!=null?o[ne.index]:void 0,C.length===0){let Me;e[59]!==I?(Me=I("sectionsEditor.sectionList.noSections"),e[59]=I,e[60]=Me):Me=e[60];let yt;e[61]!==Me?(yt=i.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Me}),e[61]=Me,e[62]=yt):yt=e[62];const et=yt;let ft;e[63]!==w||e[64]!==V||e[65]!==et||e[66]!==k?(ft=V?et:i.jsxs("div",{className:"space-y-2",children:[et,i.jsx(js,{canAddSection:w,onAddSection:k,size:"sm"})]}),e[63]=w,e[64]=V,e[65]=et,e[66]=k,e[67]=ft):ft=e[67],ke=ft;break e}Q=ae(ne&&"cursor-grabbing"),e[48]=Y,e[49]=w,e[50]=V,e[51]=C,e[52]=k,e[53]=o,e[54]=a,e[55]=I,e[56]=Te,e[57]=Z,e[58]=Q}else Te=e[56],Z=e[57],Q=e[58];se=yl,O=ve,Ke=Sl,Qe=T,Xe=K,Ye=ue,te=wl,be=B,q=_l,He="space-y-1",_e=C.map(ne=>{const Me=a[ne.index];return Me?i.jsx(Yl,{sortableId:ne.id,section:Me,raw:o[ne.index],meta:u,decofile:h,selected:d===ne.index,onSelect:()=>dt(ne.index),onDelete:()=>j(ne.index),onDuplicate:()=>A(ne.index),onMakeReusable:()=>$(ne.index),onToggleHidden:()=>z(ne.index),onToggleLazy:H?()=>H(ne.index):void 0,onAddVariant:()=>F(ne.index),onDetach:()=>f(ne.index)},ne.id):null})}e[11]=Y,e[12]=w,e[13]=V,e[14]=h,e[15]=C,e[16]=B,e[17]=K,e[18]=u,e[19]=k,e[20]=F,e[21]=j,e[22]=f,e[23]=A,e[24]=$,e[25]=v,e[26]=z,e[27]=H,e[28]=o,e[29]=a,e[30]=d,e[31]=ve,e[32]=I,e[33]=te,e[34]=se,e[35]=Te,e[36]=Z,e[37]=_e,e[38]=be,e[39]=q,e[40]=O,e[41]=Ke,e[42]=Qe,e[43]=Xe,e[44]=Ye,e[45]=Q,e[46]=ke,e[47]=He}else te=e[33],se=e[34],Te=e[35],Z=e[36],_e=e[37],be=e[38],q=e[39],O=e[40],Ke=e[41],Qe=e[42],Xe=e[43],Ye=e[44],Q=e[45],ke=e[46],He=e[47];if(ke!==Symbol.for("react.early_return_sentinel"))return ke;let We;e[68]!==_e||e[69]!==He?(We=i.jsx("div",{className:He,children:_e}),e[68]=_e,e[69]=He,e[70]=We):We=e[70];let Ee;e[71]!==te||e[72]!==be||e[73]!==q||e[74]!==We?(Ee=i.jsx(te,{items:be,strategy:q,children:We}),e[71]=te,e[72]=be,e[73]=q,e[74]=We,e[75]=Ee):Ee=e[75];let Ie;e[76]!==Te||e[77]!==Z||e[78]!==V||e[79]!==h||e[80]!==u?(Ie=Z?i.jsx("div",{className:ae("cursor-grabbing shadow-lg ring-1 ring-border/60",Ro(Z,!1,V)),children:i.jsx(Eo,{section:Z,raw:Te,meta:u,decofile:h})}):null,e[76]=Te,e[77]=Z,e[78]=V,e[79]=h,e[80]=u,e[81]=Ie):Ie=e[81];let Ve;e[82]!==Ie?(Ve=Li.createPortal(i.jsx(vl,{dropAnimation:Qi,children:Ie}),document.body),e[82]=Ie,e[83]=Ve):Ve=e[83];let Ze;e[84]!==se||e[85]!==O||e[86]!==Ke||e[87]!==Qe||e[88]!==Xe||e[89]!==Ye||e[90]!==Ee||e[91]!==Ve?(Ze=i.jsxs(se,{sensors:O,collisionDetection:Ke,onDragStart:Qe,onDragEnd:Xe,onDragCancel:Ye,children:[Ee,Ve]}),e[84]=se,e[85]=O,e[86]=Ke,e[87]=Qe,e[88]=Xe,e[89]=Ye,e[90]=Ee,e[91]=Ve,e[92]=Ze):Ze=e[92];let Fe;e[93]!==w||e[94]!==V||e[95]!==k?(Fe=!V&&i.jsx(js,{canAddSection:w,onAddSection:k,size:"sm",className:"mt-2"}),e[93]=w,e[94]=V,e[95]=k,e[96]=Fe):Fe=e[96];let re;return e[97]!==Q||e[98]!==Ze||e[99]!==Fe?(re=i.jsxs("div",{className:Q,children:[Ze,Fe]}),e[97]=Q,e[98]=Ze,e[99]=Fe,e[100]=re):re=e[100],re}function ec(n){return n.id}function hs(n,e,s,o){if(!n||!e)return null;if(!e.isMultivariate)return jt(n,e,o)?.data??null;const a=xt(n,e),u=a?vs(a,wt)[s]:void 0;return u?wo(u.value,o)?.data??null:null}const tc=50;function nc(n,e){n.own.push(ze(e)),n.own.length>tc&&n.own.shift()}function ao(n,e){return n.own.includes(ze(e))}function sc(n,e){const{sectionIndex:s,variantIndex:o,shown:a,next:u,sectionCount:h}=e;return n&&n.sectionIndex===s&&n.variantIndex===o&&n.emitted===a?(n.emitted=u,n):a?{sectionIndex:s,variantIndex:o,base:a,emitted:u,sectionCount:h,own:[ze(a)]}:null}function Ao(n,e){return e!==null&&ze(n)!==ze(e)}function Co(n,e){return n.__resolveType!==e.__resolveType}function rc(n,e,s,o){if(e.length===o)return"here";const a=ze(n),u=e.flatMap((h,d)=>d!==s&&h!==null&&ze(h)===a?[d]:[]);return u.length===1?u[0]:"unknown"}function lo({formBase:n,rebased:e,versionOf:s}){let o=null;return{ifMatch:a=>{o=a,n&&(n.version===void 0||e)&&(n.version=s(a));const u=n?n.version:s(a);return u===void 0?void 0:{[a]:u}},onApplied:a=>{n&&o!==null&&Object.hasOwn(a,o)&&(n.version=a[o])},reloadOnConflict:!0}}function oc({merged:n,tracked:e,current:s,saved:o}){return!!n&&!!e&&s===e&&e.emitted===o}function co(n,e){return!!n&&!!e&&n.contains(e)}function ws(n){const e=[],s=_s("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:s,pointers:e}}function _s(n,e,s,o,a){const u=(h,d)=>ze(h)===ze(d);if(u(s,o)||u(e,o))return s;if(u(e,s))return o;if(gs(s)&&gs(o)){const h=gs(e)?e:{},d={},v=[...Object.keys(s),...Object.keys(o).filter(m=>!(m in s))];for(const m of v){const j=_s(`${n}/${m.replaceAll("~","~0").replaceAll("/","~1")}`,h[m],s[m],o[m],a);j!==void 0&&(d[m]=j)}return d}return Array.isArray(e)&&Array.isArray(s)&&Array.isArray(o)&&s.length===e.length&&o.length===e.length?e.map((h,d)=>_s(`${n}/${d}`,h,s[d],o[d],a)):(a.push(n),o)}function gs(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function ic(n,e){let s=n.merged;for(const o of n.pointers)e[o]==="mine"&&(s=uc(s,o,Ut(n.mine,o)));return s}function ac(n,e){return Object.fromEntries(n.pointers.map(s=>[s,e]))}function No(n){return ac(n,"mine")}function ks(n,e,s){const o=No(s);for(const a of s.pointers){const u=e[a];if(!u||!n.pointers.includes(a))continue;["mine","theirs"].every(d=>ze(Ut(n[d],a))===ze(Ut(s[d],a)))&&(o[a]=u)}return o}function To(n,e,s={}){const o=e.pointers.filter(a=>!n.pointers.includes(a)||ze(Ut(n.theirs,a))!==ze(Ut(e.theirs,a)));return o.length===0?s:{...s,...Object.fromEntries(o.map(a=>[a,(s[a]??0)+1]))}}function lc(n,e,s){if(!e||Co(n.plan.ancestor,e)||!Ao(n.plan.theirs,e)||s(e))return null;const o=ws({...n.plan,theirs:e});return o.pointers.length===0?null:{plan:o,choices:ks(n.plan,n.choices,o),fresh:To(n.plan,o,n.fresh)}}function cc(n,e){return n.pointers.map(s=>({pointer:s,label:oa(s,e),mine:Ut(n.mine,s),theirs:Ut(n.theirs,s),schema:dc(e??null,s)}))}function As(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function Ut(n,e){let s=n;for(const o of As(e))if(Array.isArray(s))s=s[Number(o)];else if(s&&typeof s=="object")s=s[o];else return;return s}function uc(n,e,s){const o=As(e),a=(u,h)=>{if(h===o.length)return s;const d=o[h];if(Array.isArray(u)){const j=[...u];return j[Number(d)]=a(u[Number(d)],h+1),j}const v=u&&typeof u=="object"?{...u}:{},m=a(v[d],h+1);return m===void 0?delete v[d]:v[d]=m,v};return a(n,0)}function dc(n,e){let s=n;for(const o of As(e)){if(!s)return null;s=/^\d+$/.test(o)&&!s.properties?.[o]?s.items:s.properties?.[o]}return s??null}const fc=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,uo=60,mc=3;function Vo(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&fc.test(n)}function Es(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const o=n.replace(/<br\s*\/?>/gi,`
|
|
2
2
|
`).replace(/<\/(p|div|li|h[1-6])>/gi,`
|
|
3
3
|
`);return hc(o).replace(/\u00a0/g," ").replace(/\n{2,}/g,`
|
|
4
4
|
`).trim()}const pc={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'"};function hc(n){if(typeof DOMParser<"u")return new DOMParser().parseFromString(n,"text/html").body.textContent??"";let e=n;for(let s="";s!==e;)s=e,e=e.replace(/<[^<>]*>/g,"");return e.replace(/<|>/g,"").replace(/&(nbsp|amp|lt|gt|quot|#39);/g,s=>pc[s]??s)}function $n(n){const e=n.replace(/\s+/g," ").trim();return e.length>uo?`${e.slice(0,uo-1)}…`:e}function gc(n){if(n.startsWith("data:"))return"image";const e=n.split(/[?#]/)[0]??n;return decodeURIComponent(e.split("/").pop()||n)}function Hn(n,e){if(n==null||n==="")return{kind:"empty"};if(typeof n=="string")return Vo(n,e)?{kind:"image",src:n}:{kind:"text",text:Es(n,e)};if(typeof n=="number"||typeof n=="bigint")return{kind:"text",text:String(n)};if(typeof n=="boolean")return{kind:"yesNo",value:n};if(Array.isArray(n)){const s=e?.items??null;return{kind:"list",count:n.length,items:n.slice(0,mc).map(o=>vc(o,s)??"")}}if(typeof n=="object"){const s=n;if("value"in s&&Object.keys(s).length<=2)return Hn(s.value,e?.properties?.value??e);const o=Object.entries(s).filter(([a,u])=>!a.startsWith("__")&&u!==void 0).flatMap(([a,u])=>{const h=e?.properties?.[a]??null,d=Hn(u,h);if(d.kind==="empty")return[];const v=d.kind==="text"?$n(d.text):d.kind==="image"?gc(d.src):d.kind==="yesNo"?d.value?"✓":"✗":d.kind==="list"?`${d.count}`:"…";return[{label:h?.title?.trim()||a,text:v}]}).slice(0,4);return o.length>0?{kind:"fields",entries:o}:{kind:"empty"}}return{kind:"text",text:String(n)}}function vc(n,e){if(typeof n=="string")return $n(Es(n,e));if(!n||typeof n!="object"||Array.isArray(n))return null;const s=n,o=e?.titleBy,a=o?s[o]:void 0;if(typeof a=="string"&&a.trim())return $n(a);for(const[u,h]of Object.entries(s))if(!(u.startsWith("__")||typeof h!="string"||!h.trim())&&!Vo(h,e?.properties?.[u]??null))return $n(Es(h,null));return null}const fo=1500;function xc(n,e){const s=n.split(/(\s+)/).filter(j=>j!==""),o=e.split(/(\s+)/).filter(j=>j!=="");if(s.length>fo||o.length>fo)return{mine:[{text:n,kind:"changed"}],theirs:[{text:e,kind:"changed"}]};const a=Array.from({length:s.length+1},()=>new Array(o.length+1).fill(0));for(let j=s.length-1;j>=0;j--)for(let A=o.length-1;A>=0;A--){const $=a[j];$[A]=s[j]===o[A]?a[j+1][A+1]+1:Math.max(a[j+1][A],$[A+1])}const u=[],h=[],d=(j,A,$)=>{const z=j.at(-1);z&&(z.kind===$||$==="same"&&!A.trim())?z.text+=A:j.push({text:A,kind:$})};let v=0,m=0;for(;v<s.length&&m<o.length;)s[v]===o[m]?(d(u,s[v],"same"),d(h,o[m],"same"),v++,m++):a[v+1][m]>=a[v][m+1]?(d(u,s[v],"changed"),v++):(d(h,o[m],"changed"),m++);for(;v<s.length;v++)d(u,s[v],"changed");for(;m<o.length;m++)d(h,o[m],"changed");return{mine:u,theirs:h}}function yc(n){const e=it.c(10);let s,o;e[0]!==n?({open:s,...o}=n,e[0]=n,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{data:a}=xo.useSession();let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=ae("max-h-[85vh] grid-rows-[auto_minmax(0,1fr)_auto] sm:max-w-lg"),e[3]=u):u=e[3];const h=a?.user??null;let d;e[4]!==o||e[5]!==h?(d=i.jsx(Cl,{className:u,"data-testid":"form-conflict-dialog",onEscapeKeyDown:jc,onOpenAutoFocus:bc,children:i.jsx(Ac,{...o,viewer:h,heading:Sc})}),e[4]=o,e[5]=h,e[6]=d):d=e[6];let v;return e[7]!==s||e[8]!==d?(v=i.jsx(Ml,{open:s,children:d}),e[7]=s,e[8]=d,e[9]=v):v=e[9],v}function Sc(n,e){return i.jsxs(Nl,{className:"text-left",children:[i.jsx(Tl,{children:n}),i.jsx(Vl,{children:e})]})}function bc(n){n.preventDefault(),n.currentTarget?.focus()}function jc(n){return n.preventDefault()}const wc={},_c=(n,e)=>i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("h2",{className:"text-lg font-semibold",children:n}),i.jsx("p",{className:"text-sm text-muted-foreground",children:e})]});function kc(n,e,s=0,o={},a=null){const u=e[Math.min(s,e.length-1)],h=a?.you?void 0:a?.name?.split(/\s+/)[0],d={field:u?Rc(u.label):"",label:u?.label??"",name:h??""},v=(m,j,A)=>n(a?.you?A:h?j:m,d);return e.length<=1?{title:v("sectionsEditor.formConflict.titleOne","sectionsEditor.formConflict.titleOneNamed","sectionsEditor.formConflict.titleOneYou"),description:n("sectionsEditor.formConflict.descriptionOne")}:{title:v("sectionsEditor.formConflict.titleStep","sectionsEditor.formConflict.titleStepNamed","sectionsEditor.formConflict.titleStepYou"),description:s>=e.length-1?i.jsx(Ec,{t:n,fields:e,choices:o,name:h}):n("sectionsEditor.formConflict.descriptionStep")}}function Ec(n){const e=it.c(11),{t:s,fields:o,choices:a,name:u}=n;let h;if(e[0]!==a||e[1]!==o||e[2]!==u||e[3]!==s){let v;e[5]!==a||e[6]!==u||e[7]!==s?(v=(m,j)=>i.jsxs(R.Fragment,{children:[j>0&&" · ",`${m.label}: `,i.jsx("span",{className:"font-medium text-foreground",children:s((a[m.pointer]??"mine")==="mine"?"sectionsEditor.formConflict.summaryYours":u?"sectionsEditor.formConflict.summaryTheirsNamed":"sectionsEditor.formConflict.summaryTheirs",{name:u??""})})]},m.pointer),e[5]=a,e[6]=u,e[7]=s,e[8]=v):v=e[8],h=o.map(v),e[0]=a,e[1]=o,e[2]=u,e[3]=s,e[4]=h}else h=e[4];let d;return e[9]!==h?(d=i.jsx("span",{"data-testid":"form-conflict-summary",children:h}),e[9]=h,e[10]=d):d=e[10],d}function Rc(n){return/^[A-Z][a-z]/.test(n)&&!n.includes("›")?n.charAt(0).toLowerCase()+n.slice(1):n}function Ac(n){const e=it.c(68),s=Ft(),{fields:o,choices:a,changedAgain:u,fresh:h,heading:d}=n,v=u===void 0?!1:u,m=h===void 0?wc:h,j=d===void 0?_c:d,A=o.length>1,[$,z]=R.useState(0),[H,F]=R.useState(Cc);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={},e[0]=f):f=e[0];const[k,X]=R.useState(f),w=Math.max(0,Math.min($,o.length-1)),I=o[w],V=w===o.length-1;let y;e[1]!==w||e[2]!==o||e[3]!==m?(y=Se=>{const ue=o[w],te=o[Se];!ue||!te||Se===w||(F(se=>new Set(se).add(ue.pointer)),X(se=>({...se,[ue.pointer]:m[ue.pointer]??0,[te.pointer]:m[te.pointer]??0})),z(Se))},e[1]=w,e[2]=o,e[3]=m,e[4]=y):y=e[4];const C=y;let x;e[5]!==w||e[6]!==C?(x=Se=>{if(!Se)return;const ue=te=>{const se={ArrowLeft:-1,ArrowRight:1}[te.key];!se||te.defaultPrevented||te.altKey||te.ctrlKey||te.metaKey||te.shiftKey||Pl(te.target)||(te.preventDefault(),C(w+se))};return Se.ownerDocument.addEventListener("keydown",ue),()=>Se.ownerDocument.removeEventListener("keydown",ue)},e[5]=w,e[6]=C,e[7]=x):x=e[7];const Y=x;if(!I)return null;let D,ge,me,le,ee;if(e[8]!==H||e[9]!==w||e[10]!==a||e[11]!==o||e[12]!==m||e[13]!==C||e[14]!==j||e[15]!==Y||e[16]!==A||e[17]!==n||e[18]!==k||e[19]!==s){const{title:Se,description:ue}=kc(s,o,w,a,n.author??null);let te;e[25]!==n?(te=se=>{se.detail>1||n.onApply()},e[25]=n,e[26]=te):te=e[26],D=te,ge=A?Y:void 0,me="flex min-w-0 flex-col gap-3",e[27]!==H||e[28]!==w||e[29]!==o||e[30]!==m||e[31]!==C||e[32]!==A||e[33]!==k||e[34]!==s?(le=A&&i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsx("div",{role:"group","aria-label":s("sectionsEditor.formConflict.steps"),className:"-m-1 flex flex-wrap items-center",children:o.map((se,Te)=>{const Z=Te!==w&&(m[se.pointer]??0)>(k[se.pointer]??0);return i.jsx("button",{type:"button","aria-label":Z?s("sectionsEditor.formConflict.stepChangedAgain",{label:se.label}):se.label,"aria-current":Te===w?"step":void 0,"data-answered":Te!==w&&H.has(se.pointer)?"":void 0,"data-changed-again":Z?"":void 0,onClick:()=>C(Te),className:"group cursor-pointer rounded-full p-1 outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:i.jsx("span",{className:ae("block h-2 w-2 rounded-full bg-border transition-[width,background-color,box-shadow] motion-reduce:transition-none","group-hover:bg-muted-foreground/60","group-data-[answered]:bg-foreground/45","group-aria-[current=step]:w-5 group-aria-[current=step]:bg-foreground","group-data-[changed-again]:ring-2 group-data-[changed-again]:ring-warning group-data-[changed-again]:ring-offset-1 group-data-[changed-again]:ring-offset-background")})},se.pointer)})}),i.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:s("sectionsEditor.formConflict.stepCount",{step:String(w+1),count:String(o.length)})})]}),e[27]=H,e[28]=w,e[29]=o,e[30]=m,e[31]=C,e[32]=A,e[33]=k,e[34]=s,e[35]=le):le=e[35],ee=j(Se,ue),e[8]=H,e[9]=w,e[10]=a,e[11]=o,e[12]=m,e[13]=C,e[14]=j,e[15]=Y,e[16]=A,e[17]=n,e[18]=k,e[19]=s,e[20]=D,e[21]=ge,e[22]=me,e[23]=le,e[24]=ee}else D=e[20],ge=e[21],me=e[22],le=e[23],ee=e[24];let pe;e[36]!==ge||e[37]!==me||e[38]!==le||e[39]!==ee?(pe=i.jsxs("div",{ref:ge,className:me,children:[le,ee]}),e[36]=ge,e[37]=me,e[38]=le,e[39]=ee,e[40]=pe):pe=e[40];const ce=!v&&"sr-only";let he;e[41]!==ce?(he=ae("text-sm text-muted-foreground",ce),e[41]=ce,e[42]=he):he=e[42];let ve;e[43]!==v||e[44]!==A||e[45]!==s?(ve=v?s(A?"sectionsEditor.formConflict.changedAgainSteps":"sectionsEditor.formConflict.changedAgain"):"",e[43]=v,e[44]=A,e[45]=s,e[46]=ve):ve=e[46];let b;e[47]!==he||e[48]!==ve?(b=i.jsx("p",{role:"status",className:he,children:ve}),e[47]=he,e[48]=ve,e[49]=b):b=e[49];const B=A?"vertical":"all";let xe;e[50]!==I||e[51]!==n||e[52]!==B?(xe=i.jsx(Mc,{field:I,...n,arrows:B}),e[50]=I,e[51]=n,e[52]=B,e[53]=xe):xe=e[53];let T;e[54]!==b||e[55]!==xe?(T=i.jsxs("div",{className:"-mx-2 flex min-h-0 flex-col gap-3 overflow-y-auto px-2 py-1",children:[b,xe]}),e[54]=b,e[55]=xe,e[56]=T):T=e[56];let ye;e[57]!==D||e[58]!==w||e[59]!==C||e[60]!==V||e[61]!==A||e[62]!==s?(ye=A?i.jsxs(no,{className:"flex-row flex-wrap items-center justify-between gap-2 sm:justify-between",children:[i.jsx(_t,{type:"button",variant:"outline","aria-disabled":w===0,onClick:()=>C(w-1),className:"aria-disabled:cursor-default aria-disabled:opacity-45",children:s("sectionsEditor.formConflict.back")}),i.jsx(_t,{type:"button","data-testid":"form-conflict-primary",onClick:V?D:()=>C(w+1),children:s(V?"sectionsEditor.formConflict.ok":"sectionsEditor.formConflict.next")})]}):i.jsx(no,{className:"items-center gap-2",children:i.jsx(_t,{type:"button","data-testid":"form-conflict-primary",onClick:D,children:s("sectionsEditor.formConflict.ok")})}),e[57]=D,e[58]=w,e[59]=C,e[60]=V,e[61]=A,e[62]=s,e[63]=ye):ye=e[63];let K;return e[64]!==pe||e[65]!==T||e[66]!==ye?(K=i.jsxs(i.Fragment,{children:[pe,T,ye]}),e[64]=pe,e[65]=T,e[66]=ye,e[67]=K):K=e[67],K}function Cc(){return new Set}function Nc(n){const e=Hn(n.mine,n.schema),s=Hn(n.theirs,n.schema),o=e.kind==="text"&&s.kind==="text"?xc(e.text,s.text):null;return a=>o?i.jsx(Pc,{parts:o[a]}):i.jsx(Bc,{preview:a==="mine"?e:s})}const Tc={all:{ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},vertical:{ArrowDown:1,ArrowUp:-1}};function Vc(n,e){const s=Tc[e][n.key];if(!s)return;const o=[...n.currentTarget.querySelectorAll('[role="radio"]')],a=o.indexOf(document.activeElement);if(a<0)return;n.preventDefault();const u=o[(a+s+o.length)%o.length];u?.focus(),u?.click()}function Mc(n){const e=it.c(65),{field:s,choices:o,viewer:a,author:u,onChoose:h,arrows:d}=n,v=u===void 0?null:u,m=Ft(),[j]=Wi(),{language:A}=j;let $,z,H,F,f,k,X,w,I,V,y,C,x,Y;if(e[0]!==d||e[1]!==v||e[2]!==o||e[3]!==s||e[4]!==A||e[5]!==h||e[6]!==m||e[7]!==a?.image||e[8]!==a?.name){const me=Nc(s),le=o[s.pointer]??"mine",ee=a?.image??void 0;let pe;e[23]!==m||e[24]!==a?.name?(pe=mo(a?.name)||m("sectionsEditor.formConflict.you"),e[23]=m,e[24]=a?.name,e[25]=pe):pe=e[25];let ce;e[26]!==ee||e[27]!==pe?(ce=i.jsx(ms,{url:ee,fallback:pe,shape:"circle",size:"sm",className:"text-xs"}),e[26]=ee,e[27]=pe,e[28]=ce):ce=e[28];const he=ce;let ve;e[29]!==v||e[30]!==he?(ve=v?.you?he:v?.name?i.jsx(ms,{url:v.avatarUrl,fallback:mo(v.name),shape:"circle",size:"sm",className:"text-xs"}):i.jsx(ms,{url:"icon://user",fallback:"",muted:!0,shape:"circle",size:"sm"}),e[29]=v,e[30]=he,e[31]=ve):ve=e[31];const b=ve,B=v?new Date(v.at):null;H="radiogroup",F=s.label,f="flex flex-col gap-2",e[32]!==d?(k=K=>Vc(K,d),e[32]=d,e[33]=k):k=e[33];let xe;e[34]!==s.pointer||e[35]!==h?(xe=()=>h(s.pointer,"mine"),e[34]=s.pointer,e[35]=h,e[36]=xe):xe=e[36];let T;e[37]!==m?(T=m("sectionsEditor.formConflict.you"),e[37]=m,e[38]=T):T=e[38];let ye;e[39]!==m?(ye=m("sectionsEditor.formConflict.yourVersionNotSaved"),e[39]=m,e[40]=ye):ye=e[40],X=i.jsx(po,{side:"mine",checked:le==="mine",onChoose:xe,avatar:he,who:T,meta:ye,children:me("mine")}),$=po,w="theirs",I=le==="theirs",e[41]!==s.pointer||e[42]!==h?(V=()=>h(s.pointer,"theirs"),e[41]=s.pointer,e[42]=h,e[43]=V):V=e[43],y=b,e[44]!==v?.name||e[45]!==v?.you||e[46]!==m?(C=v?.you?m("sectionsEditor.formConflict.youElsewhere"):v?.name||m("sectionsEditor.formConflict.someoneElse"),e[44]=v?.name,e[45]=v?.you,e[46]=m,e[47]=C):C=e[47],x=B?m("sectionsEditor.formConflict.savedAt",{when:Dl(B,A)}):m("sectionsEditor.formConflict.theirVersionSaved"),Y=B?Dc(B,A):void 0,z=me("theirs"),e[0]=d,e[1]=v,e[2]=o,e[3]=s,e[4]=A,e[5]=h,e[6]=m,e[7]=a?.image,e[8]=a?.name,e[9]=$,e[10]=z,e[11]=H,e[12]=F,e[13]=f,e[14]=k,e[15]=X,e[16]=w,e[17]=I,e[18]=V,e[19]=y,e[20]=C,e[21]=x,e[22]=Y}else $=e[9],z=e[10],H=e[11],F=e[12],f=e[13],k=e[14],X=e[15],w=e[16],I=e[17],V=e[18],y=e[19],C=e[20],x=e[21],Y=e[22];let D;e[48]!==$||e[49]!==z||e[50]!==w||e[51]!==I||e[52]!==V||e[53]!==y||e[54]!==C||e[55]!==x||e[56]!==Y?(D=i.jsx($,{side:w,checked:I,onChoose:V,avatar:y,who:C,meta:x,metaTitle:Y,children:z}),e[48]=$,e[49]=z,e[50]=w,e[51]=I,e[52]=V,e[53]=y,e[54]=C,e[55]=x,e[56]=Y,e[57]=D):D=e[57];let ge;return e[58]!==H||e[59]!==F||e[60]!==f||e[61]!==k||e[62]!==X||e[63]!==D?(ge=i.jsxs("div",{role:H,"aria-label":F,className:f,onKeyDown:k,children:[X,D]}),e[58]=H,e[59]=F,e[60]=f,e[61]=k,e[62]=X,e[63]=D,e[64]=ge):ge=e[64],ge}const Dc=(n,e)=>n.toLocaleString(e,{dateStyle:"medium",timeStyle:"short"});function mo(n){return(n??"").trim().split(/\s+/).filter(Boolean).slice(0,2).map(e=>e.charAt(0).toUpperCase()).join("")}function po(n){const e=it.c(28),{side:s,checked:o,onChoose:a,avatar:u,who:h,meta:d,metaTitle:v,children:m}=n,j=R.useId(),A=`${j}-who`,$=`${j}-meta ${j}-value`,z=o?0:-1,H=o?"border-primary bg-primary/5 ring-1 ring-primary":"hover:bg-muted/50";let F;e[0]!==H?(F=ae("grid w-full cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-3 rounded-xl border bg-background p-3 text-left transition-[border-color,box-shadow,background-color] outline-none","focus-visible:ring-2 focus-visible:ring-ring/50",H),e[0]=H,e[1]=F):F=e[1];const f=`${j}-who`;let k;e[2]!==f||e[3]!==h?(k=i.jsx("span",{id:f,className:"text-sm font-medium text-foreground",children:h}),e[2]=f,e[3]=h,e[4]=k):k=e[4];const X=`${j}-meta`;let w;e[5]!==d||e[6]!==v||e[7]!==X?(w=i.jsx("span",{id:X,title:v,children:d}),e[5]=d,e[6]=v,e[7]=X,e[8]=w):w=e[8];let I;e[9]!==k||e[10]!==w?(I=i.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-1.5 text-xs text-muted-foreground",children:[k,w]}),e[9]=k,e[10]=w,e[11]=I):I=e[11];const V=`${j}-value`,y=`conflict-${s}`;let C;e[12]!==m||e[13]!==V||e[14]!==y?(C=i.jsx("span",{id:V,"data-testid":y,className:"min-w-0 text-sm",children:m}),e[12]=m,e[13]=V,e[14]=y,e[15]=C):C=e[15];let x;e[16]!==I||e[17]!==C?(x=i.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[I,C]}),e[16]=I,e[17]=C,e[18]=x):x=e[18];let Y;return e[19]!==u||e[20]!==o||e[21]!==a||e[22]!==A||e[23]!==x||e[24]!==$||e[25]!==z||e[26]!==F?(Y=i.jsxs("button",{type:"button",role:"radio","aria-checked":o,"aria-labelledby":A,"aria-describedby":$,tabIndex:z,onClick:a,className:F,children:[u,x]}),e[19]=u,e[20]=o,e[21]=a,e[22]=A,e[23]=x,e[24]=$,e[25]=z,e[26]=F,e[27]=Y):Y=e[27],Y}function Pc(n){const e=it.c(4),{parts:s}=n;let o;e[0]!==s?(o=s.map(Ic),e[0]=s,e[1]=o):o=e[1];let a;return e[2]!==o?(a=i.jsx("span",{className:"whitespace-pre-wrap break-words",children:o}),e[2]=o,e[3]=a):a=e[3],a}function Ic(n,e){return n.kind==="changed"?i.jsx("mark",{className:"rounded-sm bg-warning/20 px-0.5 text-foreground",children:n.text},e):i.jsx("span",{children:n.text},e)}function Bc(n){const e=it.c(29),{preview:s}=n,o=Ft();switch(s.kind){case"empty":{let a;e[0]!==o?(a=o("sectionsEditor.formConflict.empty"),e[0]=o,e[1]=a):a=e[1];let u;return e[2]!==a?(u=i.jsx("span",{className:"italic text-muted-foreground",children:a}),e[2]=a,e[3]=u):u=e[3],u}case"text":{let a;return e[4]!==s.text?(a=i.jsx("span",{className:"whitespace-pre-wrap break-words",children:s.text}),e[4]=s.text,e[5]=a):a=e[5],a}case"image":{let a;return e[6]!==s.src?(a=i.jsx("img",{src:s.src,alt:"",className:"max-h-24 max-w-full rounded border object-contain"}),e[6]=s.src,e[7]=a):a=e[7],a}case"yesNo":{const a=s.value?"sectionsEditor.formConflict.yes":"sectionsEditor.formConflict.no";let u;e[8]!==o||e[9]!==a?(u=o(a),e[8]=o,e[9]=a,e[10]=u):u=e[10];let h;return e[11]!==u?(h=i.jsx("span",{children:u}),e[11]=u,e[12]=h):h=e[12],h}case"list":{const a=s.count===1?"sectionsEditor.formConflict.oneItem":"sectionsEditor.formConflict.items",u=String(s.count);let h;e[13]!==o||e[14]!==a||e[15]!==u?(h=o(a,{count:u}),e[13]=o,e[14]=a,e[15]=u,e[16]=h):h=e[16];let d;e[17]!==h?(d=i.jsx("span",{className:"text-muted-foreground",children:h}),e[17]=h,e[18]=d):d=e[18];let v;e[19]!==s.count||e[20]!==s.items?(v=s.items.some(Boolean)&&i.jsxs("span",{className:"flex flex-col",children:[s.items.map(Fc),s.count>s.items.length&&i.jsx("span",{children:"…"})]}),e[19]=s.count,e[20]=s.items,e[21]=v):v=e[21];let m;return e[22]!==d||e[23]!==v?(m=i.jsxs("span",{className:"flex flex-col gap-1",children:[d,v]}),e[22]=d,e[23]=v,e[24]=m):m=e[24],m}case"fields":{let a;e[25]!==s.entries?(a=s.entries.map(Kc),e[25]=s.entries,e[26]=a):a=e[26];let u;return e[27]!==a?(u=i.jsx("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-0.5",children:a}),e[27]=a,e[28]=u):u=e[28],u}}}function Kc(n){return i.jsxs("div",{className:"contents",children:[i.jsx("dt",{className:"text-muted-foreground",children:n.label}),i.jsx("dd",{className:"truncate",children:n.text})]},n.label)}function Fc(n,e){return i.jsx("span",{className:"truncate",children:`${e+1}. ${n||"…"}`},e)}function Oc(n,e){return n.kind==="protocol"&&n.source==="github"?e:null}function Lc(n,e){if(Object.hasOwn(n,e))return n[e]??null;const s=Yr(e),o=Object.keys(n).find(a=>Yr(a)===s);return o===void 0?null:n[o]??null}async function $c(n,e){try{const s=await fetch(`/api/${n.orgSlug}/decofile/${encodeURIComponent(n.virtualMcpId)}/${encodeURIComponent(n.branch)}`,{cache:"no-store",headers:Na("v8")});if(!s.ok)return null;const o=await s.json().catch(()=>({})),a=Lc(o.changedBy??{},e);return a&&typeof a.userId=="string"&&Number.isFinite(Date.parse(a.at))?a:null}catch{return null}}function zc(n,e,s){const o=e.find(h=>h.userId===n.userId),a=o?.user?.name?.trim(),u=o?.user?.image??void 0;return{...a?{name:a}:{},...u?{avatarUrl:u}:{},at:n.at,you:!!s&&n.userId===s}}function Hc(n){let e=2166136261,s=0;for(let o=0;o<n.length;o++){const a=n.charCodeAt(o);e=Math.imul(e^a,16777619),s=Math.imul(s,31)+a|0}return`${(e>>>0).toString(36)}${(s>>>0).toString(36)}:${n.length}`}function Wc(n,e,s){const o=it.c(19),a=!!n&&!!e&&s!==null;let u;o[0]!==e||o[1]!==n||o[2]!==s?(u=yo.conflictAuthor(n?`${n.orgSlug}/${n.virtualMcpId}/${n.branch}`:"",e??"",s??""),o[0]=e,o[1]=n,o[2]=s,o[3]=u):u=o[3];let h;o[4]!==e||o[5]!==n?(h=()=>$c(n,e),o[4]=e,o[5]=n,o[6]=h):h=o[6];let d;o[7]!==a||o[8]!==u||o[9]!==h?(d={queryKey:u,queryFn:h,enabled:a,staleTime:Number.POSITIVE_INFINITY,gcTime:6e5,retry:!1,refetchOnWindowFocus:!1},o[7]=a,o[8]=u,o[9]=h,o[10]=d):d=o[10];const{data:v}=qi(d),m=a?v??null:null,j=!!m;let A;o[11]!==j?(A={enabled:j},o[11]=j,o[12]=A):A=o[12];const{data:$}=Il(A);let z;o[13]!==$?(z=$?.data?.members??[],o[13]=$,o[14]=z):z=o[14];const H=z,{data:F}=xo.useSession();if(!m)return null;const f=F?.user?.id??null;let k;return o[15]!==m||o[16]!==H||o[17]!==f?(k=zc(m,H,f),o[15]=m,o[16]=H,o[17]=f,o[18]=k):k=o[18],k}function qc(n,e,s,o){if(!n||typeof n!="object")return{kind:"error",reason:"no-matcher-rule"};const a=e.trim();if(!a)return Gt(n,s,o)?{kind:"inline",blockKey:n.__resolveType??"",inlinedRule:xs(n,s,o)}:{kind:"noop"};const u=ys(n,s,o);if(!u)return{kind:"error",reason:"unreadable-rule"};if(u.blockKey)return{kind:"updateBlock",blockKey:u.blockKey,blockData:Kt(u.resolveType,u.data,a)};const h=Fn(a),d=On(h,s);return d?{kind:"error",reason:"invalid-block-id",message:d}:{kind:"createBlock",blockId:h,blockData:Kt(u.resolveType,u.data,a),reference:on(h)}}const ho="section-form-stale-save",Gc=3,Uc=1e3;function go(n,e){const s=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:So(e.pageKey?n[e.pageKey]?.sections:void 0,n),o=Math.max(0,Math.min(e.pageVariantIndex,s.length-1)),a=s[o]?.sections??[];return{pageVariants:s,variantIndex:o,rawSections:a,parsedSections:_n(a,n)}}const vo=new WeakMap;let Yc=0;function Jc(n){let e=vo.get(n);return e===void 0&&(e=++Yc,vo.set(n,e)),e}function tm({orgSlug:n,virtualMcpId:e,branch:s,previewReady:o=!0,previewUrl:a,currentPath:u,activePageBlockKey:h=null,activeGlobalBlockKey:d=null,externalSelection:v,onSaved:m,initialEditSeo:j=!1,onExitSeo:A,onSelectRoot:$,onViewJsonFile:z,onFocusedBlockChange:H,onVariantPreviewOverride:F}){const f=Ft(),k=Yi(),X=k?.taskId??null,w=o?{orgSlug:n,virtualMcpId:e,branch:s,threadId:X,previewUrl:a}:null,[I,V]=R.useState([]),{data:y,isLoading:C}=Ta(w,{pollWhile:I.length>0}),{data:x,isLoading:Y}=ia(w),D=Wn(),ge=k?.virtualMcpId,le=ka(ge===e?e:null)?.metadata?.siteSlug??null,ee=Rl({virtualMcpId:e,branch:s,sandboxUrl:a}),pe=Va(e,s),ce=Ma(pe),he=!ce,ve=!!ee||ce,[b,B]=R.useState(null),[xe,T]=R.useState(null),[ye,K]=R.useState(null),[Se,ue]=R.useState(0),[te,se]=R.useState(void 0),[Te,Z]=R.useState(null),[_e,be]=R.useState(null),[q,O]=R.useState([]),Ke=R.useRef(null),[Qe,Xe]=R.useState(q.length);Qe!==q.length&&(Xe(q.length),requestAnimationFrame(()=>{Ke.current&&(Ke.current.scrollTop=0)}));const[Ye,Q]=R.useState(0),[ke,He]=R.useState(null),[We,Ee]=R.useState(null),[Ie,Ve]=R.useState(null),[Ze,Fe]=R.useState(!1),[re,dt]=R.useState(!1),ne=R.useRef(null),[Me,yt]=R.useState(!0),[et,ft]=R.useState(!1),[Ot,kn]=R.useState(!1),[qe,an]=R.useState(j),[Cs,Ns]=R.useState(j);j&&!Cs&&(Ns(!0),an(!0),B(null),T(null),K(null),O([])),!j&&Cs&&Ns(!1);const[Mo,ln]=R.useState(null),[Ts,En]=R.useState(void 0),[Vs,Lt]=R.useState([]),[Ms,Yt]=R.useState(0),[Je,at]=R.useState(0),[Do,tt]=R.useState(null),[Jt,st]=R.useState(null),[Ds,Ps]=R.useState(null),Is=Gi(),Bs=Da({orgSlug:n,virtualMcpId:e,branch:s},{tunnel:!1}),cn=aa({orgSlug:n,virtualMcpId:e,branch:s}),[Po,Io]=R.useState(u),[Bo,Ko]=R.useState(h),[Fo,Oo]=R.useState(d);(Po!==u||Bo!==h||Fo!==d)&&(queueMicrotask(()=>cn.flush()),Io(u),Ko(h),Oo(d),B(null),T(null),K(null),ue(0),Z(null),be(null),at(0),tt(null),st(null),O([]),Q(t=>t+1),an(!1),ln(null),En(void 0),Lt([]),Yt(t=>t+1));const G=la({orgSlug:n,virtualMcpId:e,branch:s}),un=ja((t,r)=>{G.mutate({blockKey:t,data:r},{onSuccess:()=>m?.(),onError:G.reportError})}),Rn=Oa({orgSlug:n,virtualMcpId:e,branch:s}),[Qt,Xt]=R.useState(!1),W=R.useRef(null),At=R.useRef(null),mt=R.useRef(null),pt=R.useRef(null),An=R.useRef({}),$t=R.useRef(null),dn=R.useRef(!1),fn=R.useRef(!1),Oe=R.useRef(new Map),Zt=R.useRef(!1),St=R.useRef([]),qn=R.useRef(new WeakSet);Pa(n,e,t=>{const{activePageKey:r,rawSections:l,parsedSections:c,selectedSectionIndex:p}=Le.current,S=new Set;r&&S.add(r);for(const g of[At.current?.sectionIndex,p]){const _=g==null?void 0:l[g],L=g==null?void 0:c[g],N=_&&L?.isSavedBlock?ds(_,L):null;N&&S.add(N)}if([...S].some(g=>t.has(g))){for(const g of[W,mt,pt])g.current&&clearTimeout(g.current),g.current=null;At.current=null,Oe.current.clear(),r&&t.has(r)&&(An.current={})}});const Le=R.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Ks,Fs]=R.useState(0),[Lo,$o]=R.useState(0),zo=Wc(Oc(pe,{orgSlug:n,virtualMcpId:e,branch:s}),I[0]?.blockKey??null,I[0]?Hc(ze(I[0].plan.theirs)):null),[Ho,Wo]=R.useState(null),Gn=Ia(n,e).epoch,[qo,Go]=R.useState(Gn);if(!o||C||Y)return i.jsx("div",{className:"h-full w-full flex items-center justify-center",children:i.jsx(Ui,{className:"size-5 text-muted-foreground"})});if(!y||!x)return i.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Uo=Ha(y,x),ie=!!d,je=ie?null:Wa(Uo,u,h),E=ie?d:je?.key??null,Un=ie&&d?y[d]:void 0,Os=ie&&d&&Un?qa(d,Un):ie&&d?d:"",mn=!ie&&E&&y[E]?y[E]:null,Yn=qe&&y&&x&&E&&je?Kr(y,{kind:"page",pageKey:E,pageName:String(je.name??""),path:String(je.path??"")},x):null,Yo=qe?mn?.seo:void 0,Cn=Ts!==void 0?Ts:Yo,Jo=qe?ca(Cn):void 0,Ls=Yn?.seoTypeOptions??[],$s=qe&&x?ua(x):"",Jn=Mo??Jo??{},Nn=qe&&Yn?Bl(Jn,Yn):null,zs=qe&&Nn&&da(Cn)?Kn(Nn,x):null,Hs=qe?fa(y,x)?.seoData:void 0,De=ie?[{label:"Default",sections:[{__resolveType:d}]}]:So(mn?.sections,y??{}),ht=De.length>1,we=Math.min(Se,De.length-1),rt=De[we],U=rt?.sections??[],Pe=_n(U,y),Qn=!ie&&Ga(mn?.sections);if(ie&&d&&Ds!==d){Ps(d);const t=U[0],r=Pe[0];if(t&&r){B(0),at(0),O([]);const l=jt(t,r,y);l&&(T(l.data),K(l.resolveType),st(null),tt(null))}}!ie&&Ds!==null&&Ps(null),Le.current={rawSections:U,parsedSections:Pe,decofile:y??{},activePageKey:E,pageVariants:De,variantIndex:we,sectionVariantIndex:Je,selectedSectionIndex:b};const Qo=()=>({multivariate:Qn,index:we,variants:De.map(t=>({rule:t.rule}))}),Xn=(t,r)=>{if(!F)return;if(!E||!Qn||t.length<=1){F(null);return}const l={multivariate:!0,index:r,variants:t},c=ce?ro(E,l):oo(E,l,y,x);F(c.length>0?c:null)},Zn=F&&E&&Qn&&ht&&!C&&!Y?E:null;if(Zn!==Ho&&(Wo(Zn),Zn)){const t=De.map(l=>({rule:l.rule})),r=we;queueMicrotask(()=>Xn(t,r))}const en=(t,r,l)=>{if(!F)return;if(!E){F(null);return}const c=Qo(),p=ce?ro(E,c):oo(E,c,y,x);if(!t||r<0){F(p.length>0?p:null);return}const S={pageKey:E,page:c,sectionIndex:r,sectionLazy:Pe[r]?.isLazy??!1,mvObj:t,selectedVariantIndex:l},g=ce?Fl(S):Ol({...S,decofile:y,meta:x}),_=[...p,...g];F(_.length>0?_:null)},bt=(t,r,l,c=b??-1,p=!1)=>{const S=xt(t,r);if(!S){T(null),K(null),st(null),tt(null),p&&en(null,c,l);return}const _=vs(S,wt)[l];if(!_){T(null),K(null),st(null),tt(null),p&&en(null,c,l);return}const L=wo(_.value,y);T(L?.data??null),K(L?.resolveType??null);const{resolveType:N,formValue:M}=jn(_.rule,y,x??void 0);st(N),tt(M),p&&en(S,c,l)},pn=v?.index;if(v!==void 0&&(v?.seq??null)!==te&&(se(v?.seq??null),typeof pn=="number")){const t=U[pn],r=Pe[pn];if(t&&r)if(B(pn),at(0),O([]),Q(l=>l+1),r.isMultivariate)bt(t,r,0,pn);else{const l=jt(t,r,y);l?(T(l.data),K(l.resolveType)):(T(null),K(null)),st(null),tt(null)}}if(Gn!==qo){Go(Gn);const t=W.current!==null||Oe.current.size>0||pt.current!==null||mt.current!==null||G.isPending||cn.isPending||I.length>0,r=b!==null&&co(Ke.current,document.activeElement);if(!t&&r&&(Zt.current=!0),!t&&!r&&b!==null){const l=U[b],c=Pe[b];if(O([]),Q(p=>p+1),!l||!c)B(null),T(null),K(null);else if(c.isMultivariate)bt(l,c,Je,b);else{const p=jt(l,c,y);T(p?.data??null),K(p?.resolveType??null)}}!t&&qe&&(ln(null),En(void 0),Yt(l=>l+1))}if(Ks!==Lo){$o(Ks);const t=b!==null?U[b]:null,r=b!==null?Pe[b]:null;if(t&&r&&b!==null)if(O([]),Q(l=>l+1),r.isMultivariate)bt(t,r,Je,b);else{const l=jt(t,r,y);T(l?.data??null),K(l?.resolveType??null)}}const lt=I[0];if(lt){const{formBase:t,target:r}=lt,l=go(y,r),c=t.sectionIndex,p=l.rawSections.length===t.sectionCount?hs(l.rawSections[c],l.parsedSections[c],r.sectionVariantIndex,y):null,S=lc(lt,p,g=>ao(t,g));if(S){const _=[{...lt,...S,changedAgain:!0},...I.slice(1)];St.current=_,V(_)}}const hn={orgSlug:n,virtualMcpId:e,branch:s,threadId:X,previewUrl:ce?void 0:a??void 0,siteSlug:le},Tn=ye&&x?Kn(ye,x):null,ct=(t,r)=>{if(!E)return;W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear(),pt.current&&(clearTimeout(pt.current),pt.current=null),mt.current&&(clearTimeout(mt.current),mt.current=null);const l=Sn(y,E,t,we,De);G.mutate({blockKey:E,data:l},{onSuccess:()=>r?.onSuccess?.()??m?.(),onError:c=>{r?.onError?.(),G.reportError(c)}})},zt=()=>{H?.(null),B(null),kn(!1),T(null),K(null),at(0),tt(null),st(null),O([]),Q(t=>t+1)},Ws=()=>co(Ke.current,document.activeElement),es=(t=f("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear(),At.current=null,oe.error(t,{id:ho}),Ws()){Zt.current=!0;return}Fs(r=>r+1)},qs=()=>{!Zt.current||Ws()||St.current.length>0||W.current!==null||dn.current||fn.current||Oe.current.size>0||(Zt.current=!1,Fs(t=>t+1))},Gs=()=>{Zt.current&&setTimeout(qs,0)},Us=t=>Ka(Is,Bs,t),Ys=t=>{Oe.current.size!==0&&setTimeout(()=>{if(dn.current||fn.current)return;const r=[...Oe.current.values()];Oe.current.clear();for(const l of r)l()},t)},Xo=t=>{const{activePageKey:r,variantIndex:l,sectionVariantIndex:c}=Le.current,p=$t.current;return{formBase:p?.sectionIndex===t&&p.variantIndex===c?p:null,pageKey:r,global:ie,pageVariantIndex:l,sectionVariantIndex:c,schema:Tn}},gn=t=>{St.current=t,V(t)},Zo=t=>{const r=St.current,l=r.findIndex(S=>S.formBase===t.formBase),c=l>=0?r[l]:void 0,p=c?r.with(l,{...t,choices:ks(c.plan,c.choices,t.plan),fresh:To(c.plan,t.plan,c.fresh),changedAgain:c.changedAgain||ze(c.plan.theirs)!==ze(t.plan.theirs)}):[...r,{...t,changedAgain:qn.current.has(t.formBase)}];gn(p)},Js=(t,r)=>{const l=St.current,c=l.findIndex(g=>g.formBase===t),p=l[c];if(!p)return!1;if(ze(p.plan.mine)===ze(r))return!0;const S=ws({...p.plan,mine:r});if(S.pointers.length===0){const g=l.filter(_=>_!==p);return gn(g),!1}return gn(l.with(c,{...p,plan:S,choices:ks(p.plan,p.choices,S)})),!0},ei=t=>{const r=Le.current;return r.selectedSectionIndex===t.formBase.sectionIndex&&r.activePageKey===t.target.pageKey&&r.variantIndex===t.target.pageVariantIndex&&r.sectionVariantIndex===t.target.sectionVariantIndex},ti=()=>{const t=St.current[0];if(!t)return null;const{formBase:r,target:l}=t;W.current&&At.current?.sectionIndex===r.sectionIndex&&At.current.sectionVariantIndex===l.sectionVariantIndex&&(clearTimeout(W.current),W.current=null,At.current=null),Oe.current.delete(`${l.pageKey}:${r.sectionIndex}:${l.sectionVariantIndex}`);const c=r.emitted;return c&&typeof c=="object"&&!Js(r,c)&&vn(c,r.sectionIndex,0,l),St.current[0]??null},ni=()=>{const t=St.current[0],r=ti();if(!r||!t||r.formBase!==t.formBase||r.plan.pointers.some(S=>!t.plan.pointers.includes(S)))return;const l=ic(r.plan,r.choices);gn(St.current.slice(1));const{formBase:c,target:p}=r;c.base=r.plan.theirs,c.version=void 0,c.emitted=l,qn.current.add(c),($t.current===c||ei(r))&&($t.current=c,T(l),Q(S=>S+1)),vn(l,c.sectionIndex,0,p)},si=t=>{const[r,...l]=St.current;r&&gn([{...r,choices:t},...l])},vn=(t,r,l=0,c)=>{const p=c??Xo(r),S=p.sectionVariantIndex,g=p.formBase,_=At.current;W.current&&(clearTimeout(W.current),W.current=null,_&&(_.sectionIndex!==r||_.sectionVariantIndex!==S)&&_.write());const L=`${p.pageKey}:${r}:${S}`,N=()=>{if(dn.current||fn.current){Oe.current.set(L,N);return}const M=typeof t=="function"?t():t;if(g&&Js(g,M))return;const P=Le.current.decofile,{rawSections:de,parsedSections:Re,pageVariants:nt,variantIndex:Be}=go(P,p),Ge=p.pageKey,J=de[r];if(!J)return;const fe=Re[r];if(!fe)return;const Ce=g?.base,Ue=hs(J,fe,S,P),gt=!!Ce&&!!Ue&&Ao(Ce,Ue)&&!(g&&ao(g,Ue));if(gt&&Ce&&Ue){if(Co(Ce,Ue)){es(f("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const Ae=fe.isSavedBlock?"here":rc(Ce,de.map((Ne,Dt)=>hs(Ne,Re[Dt],S,P)),r,g?.sectionCount??de.length);if(Ae==="unknown"){es(f("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof Ae=="number"&&g){g.sectionCount=de.length,g.sectionIndex=Ae,$t.current===g&&B(Ae),vn(M,Ae,l,p);return}}const ot=gt&&Ce&&Ue?ws({ancestor:Ce,mine:M,theirs:Ue}):null;if(ot&&ot.pointers.length>0&&g){g.sectionCount=de.length,Zo({plan:ot,formBase:g,target:p,sectionIndex:r,choices:No(ot),changedAgain:!1,blockKey:fe.isSavedBlock?ds(J,fe):Ge,fresh:{}});return}const vt=ot?ot.merged:null,Mt=vt??M,Dr=oc({merged:!!vt,tracked:g,current:$t.current,saved:M});vt&&oe.info(f("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:ho}),Dr&&g&&(g.emitted=vt,T(vt));const cs=Dr||!vt?Mt:M;g&&(g.base=cs,g.sectionCount=de.length,nc(g,cs));const Pr={onSuccess:()=>{g&&qn.current.delete(g),m?.()},onError:Ae=>{if(g?.base===cs&&Ce&&(g.base=Ce),Ae instanceof Ba){g&&(g.version=void 0),l<Gc?(Oe.current.delete(L),fn.current=!0,setTimeout(()=>{fn.current=!1,vn(()=>{const Ne=g?.emitted;return Ne&&typeof Ne=="object"?Ne:M},r,l+1,p),Oe.current.delete(L),Ys(bn)},Uc*2**l)):es();return}G.reportError(Ae)}},Ir=Ae=>{dn.current=!0;let Ne=!1;G.mutateAsync(Ae).then(()=>Pr.onSuccess(),Dt=>{Ne=!0,Pr.onError(Dt)}).finally(()=>{dn.current=!1,Ys(Ne?bn:0),qs()})};if(fe.isSavedBlock){const Ae=ds(J,fe);if(!Ae)return;Ir({blockKey:Ae,data:Mt,...Ce?{base:{value:vt?Ue:Ce}}:{},rebaseOnConflict:!1,guard:lo({formBase:g,rebased:!!vt,versionOf:Us})});return}if(!Ge)return;const In={...P[Ge]},Wt=[...de];if(fe.isMultivariate){const Ae=xt(J,fe);if(!Ae||!Ge)return;const Ne=al(Ae,S,Mt);Wt[r]=qt(J,fe,Ne)}else if(fe.isHidden){const Ae=Rs(J.__resolveType),Ne=Ae?{...J.section}:{...J},Dt=Array.isArray(Ne.variants)?[...Ne.variants]:[];Dt[0]&&(Dt[0]={...Dt[0],value:Mt}),Ne.variants=Dt,Ae?Wt[r]={...J,section:Ne}:Wt[r]=Ne}else fe.isLazy?Wt[r]={...J,section:Mt}:Wt[r]=Mt;if(nt.length>1){const Ae=In.sections,Ne=[...Ae?.variants??[]];Ne[Be]&&(Ne[Be]={...Ne[Be],value:Wt}),In.sections={...Ae,variants:Ne}}else In.sections=Wt;Ir({blockKey:Ge,data:In,rebaseOnConflict:!1,guard:lo({formBase:null,rebased:!1,versionOf:Us})})};At.current={sectionIndex:r,sectionVariantIndex:S,write:N},W.current=setTimeout(()=>{W.current=null,N()},bn)},ri=t=>{Zt.current=!1,B(t),at(0),O([]),Q(p=>p+1);const r=U[t],l=Pe[t];if(H?.(l?.isSavedBlock?l.resolveType??null:null),!r||!l)return;if(l.isMultivariate){bt(r,l,0,t);return}const c=jt(r,l,y);if(!c){T(null),K(null),st(null),tt(null),en(null,t,0);return}T(c.data),K(c.resolveType),st(null),tt(null),en(null,t,0)},Qs=t=>{const r=t;b!==null&&($t.current=sc($t.current,{sectionIndex:b,variantIndex:Le.current.sectionVariantIndex,shown:xe,next:r,sectionCount:Le.current.rawSections.length})),T(r),b!==null&&vn(r,b)},ts=t=>{if(!E||!y||!x||!je)return;const r={kind:"page",pageKey:E,pageName:String(je.name??""),path:String(je.path??"")},l=Kr(y,r,x);l&&cn.save(E,()=>{const c=Is.getQueryData(yo.decofile(Bs))?.[E];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const p={...c,...An.current};return An.current={},t?.raw!==void 0?{...p,seo:t.raw}:t?.inner!==void 0?Kl(r,l,p,t.inner):p})},Xs=(t,r)=>{E&&(An.current[t]=r,ts())},oi=(t,r)=>{if(!E)return;const l=Ln([...U],t,r);b!==null&&(b===t?B(r):t<b&&r>=b?B(b-1):t>b&&r<=b&&B(b+1)),ct(l)},ii=t=>{if(!E)return;const r=U.filter((l,c)=>c!==t);b===t?zt():b!==null&&b>t&&B(b-1),ct(r)},ai=t=>{if(!E)return;const r=U[t];if(!r)return;const l=[...U];l.splice(t+1,0,wa(r)),b!==null&&b>t&&B(b+1),ct(l)},li=t=>{if(!E)return;const r=U[t],l=Pe[t];if(!r||!l)return;const c=l.isHidden?nl(r):sl(r);if(!c)return;const p=[...U];p[t]=c,b===t&&zt(),ct(p)},ci=t=>{if(!E)return;const r=U[t],l=Pe[t];if(!r||!l||l.isMultivariate)return;const c=tl(r);if(!c)return;const p=[...U];p[t]=c,b===t&&zt(),ct(p)},ui=t=>{if(!E)return;const r=U[t],l=Pe[t];if(!r||!l?.isSavedBlock)return;const c=jt(r,l,y);if(!c?.data)return;const{name:p,...S}=c.data,g=[...U];l.isLazy?g[t]={...r,section:S}:g[t]=S,b===t&&zt(),ct(g)},di=t=>{if(!E)return;const r=[...U,{__resolveType:t.resolveType}],l=r.length-1;ct(r,{onError:()=>{Le.current.selectedSectionIndex===l&&zt()}}),Fe(!1),B(l),at(0),O([]),Q(g=>g+1);const c=r[l],p=_n(r,y)[l];if(!c||!p)return;if(p.isMultivariate){bt(c,p,0);return}const S=jt(c,p,y);if(!S){T(null),K(null),st(null),tt(null);return}T(S.data),K(S.resolveType),st(null),tt(null)},Zs=t=>{ne.current=t.append,Fe(!0)},fi=t=>{const r=ne.current;if(!r){di(t);return}r({__resolveType:t.resolveType}),Fe(!1),ne.current=null},er=t=>{if(b===null)return;const r=U[b],l=Pe[b];!r||!l?.isMultivariate||(at(t),O([]),Q(c=>c+1),bt(r,l,t,b,!0))},mi=t=>{if(b===null||!E)return;const r=U[b],l=Pe[b];if(!r||!l?.isMultivariate)return;const c=xt(r,l);if(!c)return;const p=Za(c,t);if(!p){oe.error(f("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const S=[...U];S[b]=qt(r,l,p);const g=p.variants;let _=Je;t===Je?_=Math.min(t,g.length-1):t<Je&&(_=Je-1),at(_),O([]),Q(L=>L+1),bt(S[b],l,_),ct(S)},pi=t=>{if(b===null||!E)return;const r=U[b],l=Pe[b];if(!r||!l?.isMultivariate)return;const c=xt(r,l);if(!c)return;const p=el(c,t),S=[...U];S[b]=qt(r,l,p);const g=t+1;at(g),O([]),Q(_=>_+1),bt(S[b],l,g),ct(S)},hi=(t,r)=>{if(b===null||!E||t===r)return;const l=U[b],c=Pe[b];if(!l||!c?.isMultivariate)return;const p=xt(l,c);if(!p)return;const S=Qa(p,t,r),g=[...U];g[b]=qt(l,c,S);let _=Je;Je===t?_=r:t<Je&&r>=Je?_=Je-1:t>Je&&r<=Je&&(_=Je+1),at(_),bt(g[b],c,_),ct(g)},xn=t=>{const r=t??b;if(r===null||!E)return;const l=U[r],c=Pe[r];if(!l||!c)return;const p=Ua(l,c);if(!p){oe.error(f("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const S=[...U];S[r]=p.section;const g=_n(S,y)[r];if(!g?.isMultivariate){oe.error(f("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}B(r),at(p.newVariantIndex),O([]),Q(_=>_+1),bt(p.section,g,p.newVariantIndex,r),ct(S)},tr=()=>{if(b===null||!E)return;const t=U[b],r=Pe[b];if(!t||!r?.isMultivariate)return;const l=xt(t,r);if(!l)return;const c=Xa(t,r,l);if(!c){oe.error(f("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const p=[...U];p[b]=c;const S=_n(p,y)[b];if(!S)return;at(0),st(null),tt(null),O([]),Q(_=>_+1);const g=jt(c,S,y);g?(T(g.data),K(g.resolveType)):(T(null),K(null)),en(null,b,0),ct(p)},gi=async t=>{if(ke===null||!E)return;const r=On(t,y,x);if(r){oe.error(r);return}const l=U[ke],c=Pe[ke];if(!l||!c)return;const p=jt(l,c,y);if(!p){oe.error(f("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const S={...p.data,name:t};try{await G.mutateAsync({blockKey:t,data:S});const g=[...U];g[ke]={__resolveType:t},await G.mutateAsync({blockKey:E,data:Sn(y,E,g,we,De)}),b===ke&&zt(),He(null),oe.success(f("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),m?.()}catch(g){oe.error(f("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Pt(f,It(g))})}},nr=rt?.rule;if(ht&&b===null&&_e===null&&nr){const{resolveType:t,formValue:r}=jn(nr,y??{},x??void 0);be(t),Z(r)}const tn=x?ma(x):[],ns=x&&y?pa(x,y):[],sr=!ie&&!!(ve&&x&&y),rr=_e&&x?Kn(_e,x):null,Ct=()=>{mt.current&&(clearTimeout(mt.current),mt.current=null),pt.current&&(clearTimeout(pt.current),pt.current=null)},Ht=async(t,r)=>{if(!(il(r,t,x)>0))try{await Rn.mutateAsync({blockKey:t})}catch(l){oe.error(f("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Pt(f,It(l))})}},or=t=>{mt.current&&clearTimeout(mt.current),mt.current=setTimeout(()=>{const{activePageKey:r,decofile:l,variantIndex:c}=Le.current;if(!r)return;const p={...l[r]},S={...p.sections},g=[...S.variants??[]],_=g[c],L=_?.rule;if(Gt(L,l,x)){const N=L?.__resolveType??"",M=l[N],P=typeof M?.name=="string"?M.name:N,{__resolveType:de,...Re}=t;G.mutate({blockKey:N,data:Kt(de??"",Re,P)},{onSuccess:()=>m?.(),onError:G.reportError});return}_&&(g[c]={..._,rule:t}),p.sections={...S,variants:g},G.mutate({blockKey:r,data:p},{onSuccess:()=>m?.(),onError:G.reportError})},bn)},ir=t=>{be(t);const r=t?Jr(t,x):{__resolveType:Qr};Z(t?r:{}),or(r)},ar=t=>{const r=t;Z(r);const l=_e?{__resolveType:_e,...r}:{...r};or(l)},lr=async t=>{Ct();const{activePageKey:r,decofile:l,variantIndex:c}=Le.current;if(!r)return;const p=l[r],S=p?.sections;if(!S||typeof S!="object"||Array.isArray(S))return;const g=S;if(!Array.isArray(g.variants))return;const _=[...g.variants],L=_[c];if(!L)return;const N=Bt(L.rule,l,x),M=on(t);_[c]={...L,rule:M};const P={...l,[r]:{...p,sections:{...g,variants:_}}},{resolveType:de,formValue:Re}=jn(M,P,x??void 0);be(de),Z(Re);try{await G.mutateAsync({blockKey:r,data:P[r]}),N&&N!==t&&await Ht(N,P),m?.()}catch(nt){oe.error(f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Pt(f,It(nt))})}},cr=t=>{pt.current&&clearTimeout(pt.current);const{selectedSectionIndex:r,sectionVariantIndex:l}=Le.current;r!==null&&(pt.current=setTimeout(()=>{const{rawSections:c,parsedSections:p,decofile:S,activePageKey:g,pageVariants:_,variantIndex:L}=Le.current;if(!g)return;const N=c[r],M=p[r];if(!N||!M?.isMultivariate)return;const P=xt(N,M);if(!P)return;const Re=(P.variants??[])[l]?.rule;if(Gt(Re,S,x)){const J=Re?.__resolveType??"",fe=S[J],Ce=typeof fe?.name=="string"?fe.name:J,{__resolveType:Ue,...gt}=t;G.mutate({blockKey:J,data:Kt(Ue??"",gt,Ce)},{onSuccess:()=>m?.(),onError:G.reportError});return}const nt=Xr(P,l,t),Be=[...c];Be[r]=qt(N,M,nt);const Ge=Sn(S,g,Be,L,_);G.mutate({blockKey:g,data:Ge},{onSuccess:()=>m?.(),onError:G.reportError})},bn))},vi=t=>{st(t);const r=t?Jr(t,x):{__resolveType:Qr};tt(t?r:{}),cr(r)},xi=t=>{const r=t;tt(r);const l=Jt?{__resolveType:Jt,...r}:{...r};cr(l)},yi=async t=>{Ct();const{selectedSectionIndex:r,sectionVariantIndex:l,rawSections:c,parsedSections:p,decofile:S,activePageKey:g,pageVariants:_,variantIndex:L}=Le.current;if(r===null||!g)return;const N=c[r],M=p[r];if(!N||!M?.isMultivariate)return;const P=xt(N,M);if(!P)return;const de=P.variants??[],Re=Bt(de[l]?.rule,S,x),nt=on(t),Be=Xr(P,l,nt),Ge=[...c];Ge[r]=qt(N,M,Be);const J=Sn(S,g,Ge,L,_),fe={...S,[g]:J},{resolveType:Ce,formValue:Ue}=jn(nt,fe,x??void 0);st(Ce),tt(Ue);try{await G.mutateAsync({blockKey:g,data:J}),Re&&Re!==t&&await Ht(Re,fe),m?.()}catch(gt){oe.error(f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Pt(f,It(gt))})}};if(!ie&&!je)return i.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.noPageFound",{currentPath:u})});if(ie&&!Un)return i.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.globalBlockNotFound")});const $e=b!==null?Pe[b]??null:null,ur=b!==null?U[b]:null,dr=ur&&$e?.isMultivariate?xt(ur,$e):null,Nt=dr?vs(dr,wt):[],Vn=Math.min(Je,Math.max(Nt.length-1,0)),nn=Nt[Vn]??null,Tt=$e?.isMultivariate===!0,ss=b!==null&&$e!==null,Vt=ss&&(Tt||!!(Tn&&xe)),Si=Vt&&!ie&&$e?.isSavedBlock===!0,ut=ie||Si,fr=ie?Os:$e?.label??"",bi=Jt&&x?Kn(Jt,x):null,mr=(t,r)=>r&&D?`${t} · ${r}`:t,pr=$e?$e.variantOf??$e.label:"",ji=(()=>{const t=Tt&&nn?nn.label:null;return t?D?[mr(pr,t)]:[$e.label,t]:[$e?.label??""]})(),rs=mr(je?.name??"",ht?rt?.label:null),Mn=Vt&&(!ie||q.length>0)?ie?[Os,...q]:[rs,...ji,...q]:[],hr=qe&&je?[je.name,"SEO",...Vs]:[],gr=f("sectionsEditor.pageVariantTabs.variantsLabel"),vr=et&&je?[je.name,gr]:Ot&&je&&$e?[rs,pr,gr]:[],Dn=vr.length>0?vr:hr.length>0?hr:ut?Mn.length>0?Mn:[fr]:Mn.length>0?Mn:[rs],xr=ss&&!Tt&&!$e?.isHidden&&!!E,wi=ut||!ie&&ht&&!!rt||xr,_i=ss&&!Tt&&!ie&&q.length===0&&!!$e&&jo($e)&&!!E,ki=D&&Vt&&!Ot&&Tt&&q.length===0&&!!nn,yr=D&&q.length>0?Fr(q[q.length-1]):null,Ei=q.length>1?Fr(q[q.length-2]):null,Sr=ut?fr:Vt?$e?.label??"":je?.name??"",Ri=et||Ot?f("sectionsEditor.pageVariantTabs.variantsLabel"):qe?f("sectionsEditor.panelSections.seo"):yr??Sr,br=Ot?$e?.variantOf??$e?.label??"":et||qe?je?.name??"":yr?Ei??Sr:ut?f("sectionsEditor.sectionsEditor.globalSectionSubtitle"):Vt?je?.name??"":je?.path??"",os=!et&&!Ot&&!qe&&!Vt&&!ut,Ai=!D&&!qe&&!ie&&Tt&&q.length===0,yn=()=>{if(!E)return;Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const t=y[E],r=Ya(t.sections,U);if(!r)return;const l=Ja(r);G.mutate({blockKey:E,data:{...t,sections:r}},{onSuccess:()=>{ue(l),B(null),T(null),K(null),O([]),Z(null),be(null)},onError:G.reportError})},Pn=(t,r,l)=>{if(!E)return;Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const c=y[E],p=c.sections;if(!p||typeof p!="object"||Array.isArray(p))return;const S=p;if(!Array.isArray(S.variants))return;const g=t([...S.variants]);if(!g)return;const _=ol(S,g),L={...y,[E]:{...c,sections:_}};G.mutate({blockKey:E,data:L[E]},{onSuccess:()=>{r?.();const N=typeof l=="string"?[l]:l??[];(async()=>{for(const M of N)await Ht(M,L)})()},onError:G.reportError})},is=t=>{Ee(null),ue(t),B(null),T(null),K(null),O([]);const r=De[t]?.rule,{resolveType:l,formValue:c}=jn(r,y??{},x??void 0);be(l),Z(c),Xn(De.map(p=>({rule:p.rule})),t)},jr=(t,r)=>{if(t===r)return;let l=we;we===t?l=r:t<we&&r>=we?l=we-1:t>we&&r<=we&&(l=we+1),ue(l);const c=Ln(De.map(p=>({rule:p.rule})),t,r);Xn(c,l),Pn(p=>Ln(p,t,r))},wr=t=>{const r=De[t]?.rule,l=Bt(r,y??{},x??void 0);Pn(c=>c.length<=1?null:(c.splice(t,1),c),()=>{De.length-1===1?ue(0):t<we?ue(we-1):t===we&&ue(Math.max(0,t-1)),B(null),T(null),K(null),O([]),Z(null),be(null)},l)},Ci=()=>{const t=De.map((r,l)=>({variant:r,index:l})).filter(({variant:r})=>!rl(r.rule)).map(({variant:r})=>Bt(r.rule,y??{},x??void 0)).filter(r=>!!r);Pn(r=>{const l=ll({variants:r}),c=r[l];return c?[{...c,rule:cl()}]:null},()=>{ue(0),B(null),T(null),K(null),O([]),Z(null),be(null),ft(!1)},t)},_r=t=>{Pn(r=>ul(r,t),()=>{ue(t+1),B(null),T(null),K(null),O([]),Z(null),be(null)})},Ni=async(t,r)=>{Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const l=Le.current.activePageKey,c=Le.current.decofile;if(!l)return;const p=c[l],S=p.sections;if(!S||typeof S!="object"||Array.isArray(S))return;const g=S;if(!Array.isArray(g.variants))return;const _=[...g.variants],L=_[t];if(!L?.rule||typeof L.rule!="object"){oe.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const N=L.rule,M=r.trim();Xt(!0);try{if(!M){if(!Gt(N,c,x)){Ee(null);return}const Ge=N.__resolveType??"";_[t]={...L,rule:xs(N,c,x)};const J={...c,[l]:{...p,sections:{...g,variants:_}}};await G.mutateAsync({blockKey:l,data:J[l]}),await Ht(Ge,J),Ee(null),m?.();return}const P=ys(N,c,x);if(!P){oe.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(P.blockKey){await G.mutateAsync({blockKey:P.blockKey,data:Kt(P.resolveType,P.data,M)}),Ee(null),m?.();return}const de=Fn(M),Re=On(de,c,x);if(Re){oe.error(Re);return}const nt=Kt(P.resolveType,P.data,M);let Be=null;try{await G.mutateAsync({blockKey:de,data:nt}),Be=de,_[t]={...L,rule:on(de)},await G.mutateAsync({blockKey:l,data:{...p,sections:{...g,variants:_}}}),Be=null}catch(Ge){throw Be&&await Rn.mutateAsync({blockKey:Be}).catch(()=>{}),Ge}Ee(null),oe.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:M})),m?.()}catch(P){oe.error(f("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Pt(f,It(P))})}finally{Xt(!1)}},Ti=async(t,r)=>{Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const{selectedSectionIndex:l,rawSections:c,parsedSections:p,decofile:S,activePageKey:g,pageVariants:_,variantIndex:L}=Le.current;if(l===null||!g)return;const N=c[l],M=p[l];if(!N||!M?.isMultivariate)return;const P=xt(N,M);if(!P)return;const de=P.variants??[],Re=de[t];if(!Re?.rule||typeof Re.rule!="object"){oe.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const nt=Re.rule,Be=r.trim();Xt(!0);const Ge=async J=>{const fe={...P,variants:J},Ce=[...c];Ce[l]=qt(N,M,fe);const Ue=Sn(S,g,Ce,L,_);return await G.mutateAsync({blockKey:g,data:Ue}),{...S,[g]:Ue}};try{if(!Be){if(!Gt(nt,S,x)){Ve(null);return}const ot=nt.__resolveType??"",vt=[...de];vt[t]={...Re,rule:xs(nt,S,x)};const Mt=await Ge(vt);await Ht(ot,Mt),Ve(null),m?.();return}const J=ys(nt,S,x);if(!J){oe.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(J.blockKey){await G.mutateAsync({blockKey:J.blockKey,data:Kt(J.resolveType,J.data,Be)}),Ve(null),m?.();return}const fe=Fn(Be),Ce=On(fe,S,x);if(Ce){oe.error(Ce);return}const Ue=Kt(J.resolveType,J.data,Be);let gt=null;try{await G.mutateAsync({blockKey:fe,data:Ue}),gt=fe;const ot=[...de];ot[t]={...Re,rule:on(fe)},await Ge(ot),gt=null}catch(ot){throw gt&&await Rn.mutateAsync({blockKey:gt}).catch(()=>{}),ot}Ve(null),oe.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:Be})),m?.()}catch(J){oe.error(f("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Pt(f,It(J))})}finally{Xt(!1)}},kr=async(t,r,l)=>{T(l);try{await G.mutateAsync({blockKey:t,data:l})}catch(c){throw T(p=>p===l?r:p),c}},Vi={rename:async(t,r,l)=>{Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const{activePageKey:c,decofile:p}=Le.current;if(!c)return;const S=Array.isArray(t.variants)?[...t.variants]:[],g=S[r],_=g?.rule&&typeof g.rule=="object"?g.rule:void 0,L=async M=>{const P={...t,variants:M};return await kr(c,t,P),{...p,[c]:P}},N=qc(_,l,p,x);if(N.kind!=="noop"){if(N.kind==="error"){oe.error(N.reason==="no-matcher-rule"?f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):N.reason==="unreadable-rule"?f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):N.message??f("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}Xt(!0);try{if(N.kind==="inline"){const P=[...S];P[r]={...g,rule:N.inlinedRule};const de=await L(P);await Ht(N.blockKey,de),m?.();return}if(N.kind==="updateBlock"){await G.mutateAsync({blockKey:N.blockKey,data:N.blockData}),m?.();return}let M=null;try{await G.mutateAsync({blockKey:N.blockId,data:N.blockData}),M=N.blockId;const P=[...S];P[r]={...g,rule:N.reference},await L(P),M=null}catch(P){throw M&&await Rn.mutateAsync({blockKey:M}).catch(()=>{}),P}oe.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:l.trim()})),m?.()}catch(M){oe.error(f("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Pt(f,It(M))})}finally{Xt(!1)}}},selectGlobal:async(t,r,l)=>{Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const{activePageKey:c,decofile:p}=Le.current;if(!c)return;const S=Array.isArray(t.variants)?[...t.variants]:[],g=S[r];if(!g)return;const _=Bt(g.rule,p,x);S[r]={...g,rule:on(l)};const L={...t,variants:S},N={...p,[c]:L};try{await kr(c,t,L),_&&_!==l&&await Ht(_,N),m?.()}catch(M){oe.error(f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Pt(f,It(M))})}}},Er=()=>{zt()},Rr=t=>{ln(t),ts({inner:t})},Ar=t=>{En(t),ts({raw:t})},Cr=()=>{ln(null),Lt([])},Nr=()=>Yt(t=>t+1),Tr=()=>{cn.flush(),an(!1),ln(null),En(void 0),Lt([]),Yt(t=>t+1),A?.()},Mi=()=>{ft(!1),kn(!1),B(null),an(!0)},Di=()=>{qe&&Tr(),B(null),ft(!0)},Pi=()=>kn(!0),as=t=>{if(et&&t===0){ft(!1);return}if(Ot&&t<2){kn(!1),t===0&&B(null);return}if(qe){if(t===0){Tr();return}if(t===1){Lt([]),Yt(l=>l+1);return}Lt(Vs.slice(0,t-1)),Yt(l=>l+1);return}if(ie){O(q.slice(0,t)),Q(l=>l+1);return}if(t===0){Er();return}if(t===1){O([]),Q(l=>l+1);return}const r=!D&&Tt&&nn?1:0;if(r===1&&t===2){O([]),Q(l=>l+1);return}O(q.slice(0,t-1-r))},ls=Dn.length>1?i.jsx("button",{type:"button",onClick:()=>as(_a(Dn.length,{isMultivariateSectionTop:Ai})),title:f("sectionsEditor.sectionsEditor.back"),"aria-label":f("sectionsEditor.sectionsEditor.back"),className:ae("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ut?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:i.jsx(Ca,{className:"size-4"})}):null,Ii=ut||Vt||qe?wi&&i.jsxs("div",{className:ae("border-b px-3 py-2.5",ut&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[i.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ie&&ht&&rt&&i.jsxs("button",{type:"button",onClick:Er,title:f("sectionsEditor.sectionsEditor.editingInVariant",{variant:rt.label}),className:ae("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",ga),children:[i.jsx(ha,{rule:fs(rt.rule,y??{},x??void 0),matchers:tn}),i.jsx("span",{className:"max-w-[160px] truncate",children:rt.label})]}),i.jsx("div",{className:"flex-1"}),ut&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx("span",{className:"shrink-0 cursor-help",children:i.jsx(zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),i.jsx(Rt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),xr&&i.jsx(Bn,{onClick:()=>xn()})]}),ut&&i.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:f("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):i.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[i.jsx("div",{className:"flex-1 min-w-0",children:i.jsx(Or,{pageKey:E,initialName:je.name,initialPath:je.path,onFieldChange:Xs,variant:"header"})}),i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:()=>an(!0),children:i.jsx(Gr,{size:14})})}),i.jsx(Rt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>z&&E?z():dt(!0),children:i.jsx(Ur,{size:14})})}),i.jsx(Rt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]}),i.jsx(Bn,{onClick:yn})]}),Bi=i.jsxs(i.Fragment,{children:[ht&&E&&i.jsx(Lr,{listKey:E,variants:De,activeIndex:we,decofile:y??{},meta:x,matchers:tn,onSelect:is,onReorder:jr,onRename:Ee,onDuplicate:_r,onDelete:wr,onAdd:yn}),ht&&_e!==null&&i.jsx($r,{className:"mt-3",children:i.jsx("div",{className:ae("space-y-3",Qt&&"pointer-events-none opacity-50"),children:i.jsx(us,{currentRt:_e,currentLabel:wn(rt?.rule,y??{},wt,x??void 0),currentGlobalKey:Bt(rt?.rule,y??{},x??void 0)??void 0,matchers:tn,globals:ns,onSelect:ir,onSelectGlobal:lr,schema:rr,formValue:Te,onChange:ar,formKey:`${we}:${_e??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:y,onSaveReferencedBlock:un,sandbox:hn})})})]}),Vr=i.jsxs(i.Fragment,{children:[i.jsx(va,{listKey:`${E??""}:${b??""}`,variants:Nt.map((t,r)=>({index:r,label:t.label})),selectedIndex:Vn,onSelect:er,onRename:Ve,onDuplicate:pi,onDelete:mi,onRemoveAll:tr,onReorder:hi,onAdd:()=>xn()}),i.jsx($r,{children:i.jsx(us,{currentRt:Jt??"",currentLabel:wn(nn?.rule,y??{},wt,x??void 0),currentGlobalKey:Bt(nn?.rule,y??{},x??void 0)??void 0,matchers:tn,globals:ns,onSelect:vi,onSelectGlobal:yi,schema:bi,formValue:Do,onChange:xi,formKey:`${b??"none"}:${Vn}:${Jt??""}`,formWrapperClassName:"pt-1",meta:x??void 0,decofile:y,onSaveReferencedBlock:un,sandbox:hn})})]}),Mr=i.jsx("div",{className:ae(D?"px-2":"p-2 pt-3"),children:i.jsx(Zl,{listKey:`${E??""}-${we}`,rawSections:U,sections:Pe,meta:x,decofile:y,selectedIndex:b,onSelect:ri,onReorder:oi,onDelete:ii,onDuplicate:ai,onMakeReusable:He,onToggleHidden:li,onToggleLazy:he?ci:void 0,onAddVariant:xn,onDetach:ui,onAddSection:()=>Fe(!0),canAddSection:sr})}),Ki=i.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[E&&je&&i.jsx(Or,{pageKey:E,initialName:je.name,initialPath:je.path,onFieldChange:Xs}),mn&&E?i.jsx(so,{rawSeo:Cn,innerSeo:Jn,defaultResolveType:$s,seoSchema:zs,activeResolveType:Nn,seoTypeOptions:Ls,formResetKey:Ms,siteDefaultSeo:Hs,onBreadcrumbChange:Lt,onPersistRaw:Ar,onInnerChange:Rr,onClearForm:Cr,onBumpFormKey:Nr,asyncRenderAvailable:he}):i.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Fi=i.jsx(rn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:i.jsx("div",{className:"mx-auto max-w-2xl",children:mn&&E?i.jsx(so,{rawSeo:Cn,innerSeo:Jn,defaultResolveType:$s,seoSchema:zs,activeResolveType:Nn,seoTypeOptions:Ls,formResetKey:Ms,siteDefaultSeo:Hs,onBreadcrumbChange:Lt,onPersistRaw:Ar,onInnerChange:Rr,onClearForm:Cr,onBumpFormKey:Nr,asyncRenderAvailable:he}):i.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),Oi=i.jsxs(rn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[ht&&E&&i.jsx(Lr,{listKey:E,variants:De,activeIndex:we,decofile:y??{},meta:x,matchers:tn,onSelect:is,onReorder:jr,onRename:Ee,onDuplicate:_r,onDelete:wr,onAdd:yn}),ht&&_e!==null&&i.jsxs("div",{className:ae("px-3 border-b",Me?"pt-3 pb-5 space-y-3":"py-2"),children:[i.jsxs("button",{type:"button",onClick:()=>yt(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-muted/40","aria-expanded":Me,children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:f("sectionsEditor.sectionsEditor.variantRule")}),Me?i.jsx(Ea,{className:"size-3.5 shrink-0 text-muted-foreground"}):i.jsx(Ra,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),Me&&i.jsx("div",{className:ae("space-y-3",Qt&&"pointer-events-none opacity-50"),children:i.jsx(us,{currentRt:_e,currentLabel:wn(rt?.rule,y??{},wt,x??void 0),currentGlobalKey:Bt(rt?.rule,y??{},x??void 0)??void 0,matchers:tn,globals:ns,onSelect:ir,onSelectGlobal:lr,schema:rr,formValue:Te,onChange:ar,formKey:`${we}:${_e??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:y,onSaveReferencedBlock:un,sandbox:hn})})]}),Mr]},"editor-section-list");return i.jsx(xa,{children:i.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!D&&ls&&i.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ls}),(D||Dn.length>1)&&i.jsx(ya,{crumbs:Dn,onSelect:as,onSelectRoot:()=>{cn.flush(),$?$():as(0)}}),i.jsx("div",{className:"shrink-0",children:D?i.jsxs("div",{className:ae("flex items-center gap-2 border-b px-3 py-2.5",ut&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[D&&ls,ut&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx("span",{className:"shrink-0 cursor-help",children:i.jsx(zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),i.jsx(Rt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[i.jsx("span",{className:"truncate text-sm font-semibold",children:Ri}),br&&i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:br})]}),os&&ht&&rt&&i.jsx(zr,{variants:De,activeIndex:we,onSelect:is,onManage:Di,onRemoveAll:Ci}),ki&&i.jsx(zr,{variants:Nt,activeIndex:Vn,onSelect:er,onManage:Pi,onRemoveAll:tr}),os&&!ht&&i.jsx(Bn,{onClick:yn}),_i&&i.jsx(Bn,{onClick:()=>xn()}),i.jsx(Sa,{}),os&&i.jsxs(i.Fragment,{children:[i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"outline",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:Mi,children:i.jsx(Gr,{size:14})})}),i.jsx(Rt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),!z&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"outline",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>dt(!0),children:i.jsx(Ur,{size:14})})}),i.jsx(Rt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Ii}),lt&&i.jsx(yc,{open:!0,fields:cc(lt.plan,lt.target.schema),choices:lt.choices,changedAgain:lt.changedAgain,author:zo,fresh:lt.fresh,onChoose:(t,r)=>si({...lt.choices,[t]:r}),onApply:ni},Jc(lt.formBase)),Ot?i.jsx(Hr,{onAdd:()=>xn(),children:Vr},"editor-section-variants"):Vt?i.jsxs(rn,{viewportRef:Ke,onBlur:Gs,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!D&&Tt&&Nt.length>0&&q.length===0&&Vr,i.jsx(Wr,{activeSchema:Tn,formValue:xe,formResetKey:Ye,onFormChange:Qs,onBreadcrumbChange:O,breadcrumbPath:q,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:x,decofile:y,onSaveReferencedBlock:un,sandbox:hn,previewBaseUrl:ee,onRequestAddSection:Zs,onVariantMatcherOp:ie?Vi:void 0})]},"editor-section-form"):ie?i.jsx(rn,{viewportRef:Ke,onBlur:Gs,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx(Wr,{activeSchema:Tn,formValue:xe,formResetKey:Ye,onFormChange:Qs,onBreadcrumbChange:O,breadcrumbPath:q,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:x,decofile:y,onSaveReferencedBlock:un,sandbox:hn,previewBaseUrl:ee,onRequestAddSection:Zs})},"editor-global-block"):qe?D?i.jsx(rn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"p-3",children:Ki})},"editor-seo"):Fi:et?i.jsx(Hr,{onAdd:yn,children:Bi},"editor-variants"):D?i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[i.jsx(rn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"py-2",children:Mr})}),i.jsx("div",{className:"shrink-0 border-t p-2",children:i.jsx(js,{canAddSection:sr,onAddSection:()=>Fe(!0)})})]},"editor-section-list"):Oi,i.jsx(ba,{open:ke!==null,onOpenChange:t=>{t||He(null)},defaultBlockId:ke!==null?Fn(Pe[ke]?.label??""):"",isPending:G.isPending,onSubmit:gi}),ve&&i.jsx(Al,{open:Ze,onOpenChange:t=>{Fe(t),t||(ne.current=null)},meta:x,decofile:y,previewBaseUrl:ee,onSelect:fi}),re&&E&&y&&i.jsx(La,{open:re,onOpenChange:dt,pageKey:E,decofile:y}),We!==null&&i.jsx(qr,{open:!0,initialName:Gt(De[We]?.rule,y??{},x??void 0)?wn(De[We]?.rule,y??{},wt,x??void 0):"",autoLabel:wt(fs(De[We]?.rule,y??{},x??void 0)),isPending:Qt,onSubmit:async t=>{await Ni(We,t)},onOpenChange:t=>{!t&&!Qt&&Ee(null)}}),Ie!==null&&i.jsx(qr,{open:!0,initialName:Gt(Nt[Ie]?.rule,y??{},x??void 0)?wn(Nt[Ie]?.rule,y??{},wt,x??void 0):"",autoLabel:wt(fs(Nt[Ie]?.rule,y??{},x??void 0)),isPending:Qt,onSubmit:async t=>{await Ti(Ie,t)},onOpenChange:t=>{!t&&!Qt&&Ve(null)}})]})})}export{tm as SectionsEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,bw as st,bx as Ne,j as c,by as rt,bz as Ie,bA as L,bB as lt,bC as j,bD as P,bE as $,bF as at,b4 as Ee,bG as Re,bH as it,bI as ct,bJ as dt,bK as ut,bL as pt,bM as ft,bN as mt,bO as ht,bP as vt,bQ as gt,bR as xt,bS as St,c as ee,l as oe,af as wt}from"./index-8f_vFFVa.js";import{c as Pe}from"./index-BdQq_4o_.js";import{V as yt}from"./index-CEuerbGa.js";import{t as je,n as Ct}from"./ChevronUp-COqs90Hs.js";var bt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,Tt]=it(J),[ne]=vt(J,[Tt,Re]),pe=Re(),[Nt,G]=ne(J),[Pt,_t]=ne(J),Me=s=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:a,value:r,defaultValue:l,onValueChange:i,dir:u,name:m,autoComplete:g,disabled:w,required:y,form:S}=s,p=pe(e),[v,C]=d.useState(null),[h,x]=d.useState(null),[F,M]=d.useState(!1),se=st(u),[_,O]=Ne({prop:o,defaultProp:n??!1,onChange:a,caller:J}),[U,q]=Ne({prop:r,defaultProp:l,onChange:i,caller:J}),k=d.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(rt,{...p,children:c.jsxs(Nt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:h,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:se,triggerPointerDownPosRef:k,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Pt,{scope:s.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=J;var Ae="SelectTrigger",Oe=d.forwardRef((s,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=s,a=pe(t),r=G(Ae,t),l=r.disabled||o,i=L(e,r.onTriggerChange),u=ue(t),m=d.useRef("touch"),[g,w,y]=ot(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===r.value),h=nt(v,p,C);h!==void 0&&r.onValueChange(h.value)}),S=p=>{l||(r.onOpenChange(!0),y()),p&&(r.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...a,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":r.contentId,"aria-expanded":r.open,"aria-required":r.required,"aria-autocomplete":"none",dir:r.dir,"data-state":r.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":tt(r.value)?"":void 0,...n,ref:i,onClick:P(n.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&S(p)}),onPointerDown:P(n.onPointerDown,p=>{m.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&bt.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",Le=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,children:a,placeholder:r="",...l}=s,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,m=a!==void 0,g=L(e,i.onValueNodeChange);return $(()=>{u(m)},[u,m]),c.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:r}):a})});Le.displayName=De;var Et="SelectIcon",ke=d.forwardRef((s,e)=>{const{__scopeSelect:t,children:o,...n}=s;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Et;var Rt="SelectPortal",Be=s=>c.jsx(at,{asChild:!0,...s});Be.displayName=Rt;var Q="SelectContent",Ve=d.forwardRef((s,e)=>{const t=G(Q,s.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const a=o;return a?Ee.createPortal(c.jsx(He,{scope:s.__scopeSelect,children:c.jsx(de.Slot,{scope:s.__scopeSelect,children:c.jsx("div",{children:s.children})})}),a):null}return c.jsx(ze,{...s,ref:e})});Ve.displayName=Q;var A=10,[He,Y]=ne(Q),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((s,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:r,side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=s,h=G(Q,t),[x,F]=d.useState(null),[M,se]=d.useState(null),_=L(e,f=>F(f)),[O,U]=d.useState(null),[q,k]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===b&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==I))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=h;d.useEffect(()=>{if(x){let f={x:0,y:0};const T=b=>{f={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{f.x<=10&&f.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=ot(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=nt(T,f,R);b&&setTimeout(()=>b.ref.current.focus())}),me=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&(U(f),b&&(H.current=!0))},[h.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&k(f)},[h.value]),ie=o==="popper"?Se:Fe,re=ie===Se?{side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:se,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:h.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(n,f=>{h.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:f=>f.preventDefault(),...C,...re,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=b.indexOf(I);b=b.slice(N+1)}setTimeout(()=>E(b)),f.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=s,a=G(Q,t),r=Y(Q,t),[l,i]=d.useState(null),[u,m]=d.useState(null),g=L(e,_=>m(_)),w=ue(t),y=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:h}=r,x=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&v&&C){const _=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=a.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(a.dir!=="rtl"){const I=q.left-O.left,N=U.left-I,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-U.right-I,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const k=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,re=v.offsetHeight/2,f=v.offsetTop+re,T=H+E+f,R=K-T;if(T<=te){const I=k.length>0&&v===k[k.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,re+(I?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const I=k.length>0&&v===k[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+re)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,a.trigger,a.valueNode,l,u,p,v,C,a.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const se=d.useCallback(_=>{_&&S.current===!0&&(x(),h?.(),S.current=!1)},[x,h]);return c.jsx(Dt,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:se,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((s,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...a}=s,r=pe(t);return c.jsx(xt,{...r,...a,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(Q,{}),we="SelectViewport",Ue=d.forwardRef((s,e)=>{const{__scopeSelect:t,nonce:o,...n}=s,a=Y(we,t),r=Te(we,t),l=L(e,a.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:P(n.onScroll,u=>{const m=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=r;if(w?.current&&g){const y=Math.abs(i.current-m.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const h=C+y,x=Math.min(S,h),F=h-x;g.style.height=x+"px",g.style.bottom==="0px"&&(m.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}i.current=m.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[Lt,kt]=ne(We),Bt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=Ie();return c.jsx(Lt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=kt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((s,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:a,...r}=s,l=G(ce,t),i=Y(ce,t),u=l.value===o,[m,g]=d.useState(a??""),[w,y]=d.useState(!1),S=L(e,h=>i.itemRefCallback?.(h,o,n)),p=Ie(),v=d.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(h=>{g(x=>x||(h?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:m,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...r,ref:S,onFocus:P(r.onFocus,()=>y(!0)),onBlur:P(r.onBlur,()=>y(!1)),onClick:P(r.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(r.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(r.onPointerDown,h=>{v.current=h.pointerType}),onPointerMove:P(r.onPointerMove,h=>{v.current=h.pointerType,n?i.onItemLeave?.():v.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(r.onPointerLeave,h=>{h.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:P(r.onKeyDown,h=>{i.searchRef?.current!==""&&h.key===" "||(It.includes(h.key)&&C(),h.key===" "&&h.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,...a}=s,r=G(le,t),l=Y(le,t),i=$e(le,t),u=_t(le,t),[m,g]=d.useState(null),w=L(e,C=>g(C),i.onItemTextChange,C=>l.itemTextRefCallback?.(C,i.value,i.disabled)),y=m?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:y},i.value),[i.disabled,i.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...a,ref:w}),i.isSelected&&r.valueNode&&!r.valueNodeHasChildren?Ee.createPortal(a.children,r.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var ye="SelectScrollUpButton",Ze=d.forwardRef((s,e)=>{const t=Y(ye,s.__scopeSelect),o=Te(ye,s.__scopeSelect),[n,a]=d.useState(!1),r=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollTop>0;a(u)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop-i.offsetHeight)}}):null});Ze.displayName=ye;var Ce="SelectScrollDownButton",Je=d.forwardRef((s,e)=>{const t=Y(Ce,s.__scopeSelect),o=Te(Ce,s.__scopeSelect),[n,a]=d.useState(!1),r=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollHeight-i.clientHeight,m=Math.ceil(i.scrollTop)<u;a(m)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop+i.offsetHeight)}}):null});Je.displayName=Ce;var Qe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=s,a=Y("SelectScrollButton",t),r=d.useRef(null),l=ue(t),i=d.useCallback(()=>{r.current!==null&&(window.clearInterval(r.current),r.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{l().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:P(n.onPointerDown,()=>{r.current===null&&(r.current=window.setInterval(o,50))}),onPointerMove:P(n.onPointerMove,()=>{a.onItemLeave?.(),r.current===null&&(r.current=window.setInterval(o,50))}),onPointerLeave:P(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var be="SelectArrow",Ut=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=pe(t),a=G(be,t),r=Y(be,t);return a.open&&r.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=be;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:s,value:e,...t},o)=>{const n=d.useRef(null),a=L(o,n),r=ct(e);return d.useEffect(()=>{const l=n.current;if(!l)return;const i=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(i,"value").set;if(r!==e&&m){const g=new Event("change",{bubbles:!0});m.call(l,e),l.dispatchEvent(g)}},[r,e]),c.jsx(j.select,{...t,style:{...yt,...t.style},ref:a,defaultValue:e})});et.displayName=Wt;function tt(s){return s===""||s===void 0}function ot(s){const e=dt(s),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(r=>{const l=t.current+r;e(l),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(l)},[e]),a=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,a]}function nt(s,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,a=t?s.indexOf(t):-1;let r=Kt(s,Math.max(a,0));n.length===1&&(r=r.filter(u=>u!==t));const i=r.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(s,e){return s.map((t,o)=>s[(e+o)%s.length])}var $t=Me,Gt=Oe,Yt=Le,qt=ke,Xt=Be,Zt=Ve,Jt=Ue,Qt=Ge,_e=Ye,eo=Xe,to=Ze,oo=Je;function co(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(s){const e=ee.c(13);let t,o,n,a;e[0]!==s?({className:o,size:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a):(t=e[1],o=e[2],n=e[3],a=e[4]);const r=a===void 0?"default":a;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hover:bg-[var(--studio-outline-hover-background)] hover:text-accent-foreground flex w-fit items-center justify-between gap-2 rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-[var(--studio-control-height,2rem)] data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-[var(--studio-control-radius,var(--radius-lg))] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-4 opacity-50"})}),e[7]=i):i=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==r||e[11]!==l?(u=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":r,className:l,...n,children:[t,i]}),e[8]=t,e[9]=n,e[10]=r,e[11]=l,e[12]=u):u=e[12],u}function fo(s){const e=ee.c(25);let t,o,n,a,r;e[0]!==s?({className:o,children:t,position:a,hideScrollButtons:r,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=a===void 0?"popper":a,i=r===void 0?!1:r,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let m;e[6]!==o||e[7]!==u?(m=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=m):m=e[8];let g;e[9]!==i?(g=!i&&c.jsx(no,{}),e[9]=i,e[10]=g):g=e[10];const w=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let y;e[11]!==w?(y=oe("p-1",w),e[11]=w,e[12]=y):y=e[12];let S;e[13]!==t||e[14]!==y?(S=c.jsx(Jt,{className:y,children:t}),e[13]=t,e[14]=y,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(so,{}),e[16]=i,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==m||e[21]!==g||e[22]!==S||e[23]!==p?(v=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:m,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=m,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(s){const e=ee.c(19);let t,o,n,a,r;e[0]!==s?({className:o,children:t,description:n,hideCheck:r,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=r===void 0?!1:r,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let m;e[9]!==l?(m=!l&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=l,e[10]=m):m=e[10];let g;e[11]!==t||e[12]!==n?(g=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(_e,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(_e,{children:t}),e[11]=t,e[12]=n,e[13]=g):g=e[13];let w;return e[14]!==a||e[15]!==u||e[16]!==m||e[17]!==g?(w=c.jsxs(Qt,{"data-slot":"select-item",className:u,...a,children:[m,g]}),e[14]=a,e[15]=u,e[16]=m,e[17]=g,e[18]=w):w=e[18],w}function no(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(Ct,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}function so(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}export{co as S,uo as a,po as b,mo as c,fo as d};
|
|
1
|
+
import{r as d,bw as st,bx as Ne,j as c,by as rt,bz as Ie,bA as L,bB as lt,bC as j,bD as P,bE as $,bF as at,b4 as Ee,bG as Re,bH as it,bI as ct,bJ as dt,bK as ut,bL as pt,bM as ft,bN as mt,bO as ht,bP as vt,bQ as gt,bR as xt,bS as St,c as ee,l as oe,af as wt}from"./index-DEQvnIsm.js";import{c as Pe}from"./index-BdQq_4o_.js";import{V as yt}from"./index-BaQyqQF-.js";import{t as je,n as Ct}from"./ChevronUp-DK-Gvyk8.js";var bt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,Tt]=it(J),[ne]=vt(J,[Tt,Re]),pe=Re(),[Nt,G]=ne(J),[Pt,_t]=ne(J),Me=s=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:a,value:r,defaultValue:l,onValueChange:i,dir:u,name:m,autoComplete:g,disabled:w,required:y,form:S}=s,p=pe(e),[v,C]=d.useState(null),[h,x]=d.useState(null),[F,M]=d.useState(!1),se=st(u),[_,O]=Ne({prop:o,defaultProp:n??!1,onChange:a,caller:J}),[U,q]=Ne({prop:r,defaultProp:l,onChange:i,caller:J}),k=d.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(rt,{...p,children:c.jsxs(Nt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:h,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:se,triggerPointerDownPosRef:k,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Pt,{scope:s.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=J;var Ae="SelectTrigger",Oe=d.forwardRef((s,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=s,a=pe(t),r=G(Ae,t),l=r.disabled||o,i=L(e,r.onTriggerChange),u=ue(t),m=d.useRef("touch"),[g,w,y]=ot(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===r.value),h=nt(v,p,C);h!==void 0&&r.onValueChange(h.value)}),S=p=>{l||(r.onOpenChange(!0),y()),p&&(r.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...a,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":r.contentId,"aria-expanded":r.open,"aria-required":r.required,"aria-autocomplete":"none",dir:r.dir,"data-state":r.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":tt(r.value)?"":void 0,...n,ref:i,onClick:P(n.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&S(p)}),onPointerDown:P(n.onPointerDown,p=>{m.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&bt.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",Le=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,children:a,placeholder:r="",...l}=s,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,m=a!==void 0,g=L(e,i.onValueNodeChange);return $(()=>{u(m)},[u,m]),c.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:r}):a})});Le.displayName=De;var Et="SelectIcon",ke=d.forwardRef((s,e)=>{const{__scopeSelect:t,children:o,...n}=s;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Et;var Rt="SelectPortal",Be=s=>c.jsx(at,{asChild:!0,...s});Be.displayName=Rt;var Q="SelectContent",Ve=d.forwardRef((s,e)=>{const t=G(Q,s.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const a=o;return a?Ee.createPortal(c.jsx(He,{scope:s.__scopeSelect,children:c.jsx(de.Slot,{scope:s.__scopeSelect,children:c.jsx("div",{children:s.children})})}),a):null}return c.jsx(ze,{...s,ref:e})});Ve.displayName=Q;var A=10,[He,Y]=ne(Q),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((s,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:r,side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=s,h=G(Q,t),[x,F]=d.useState(null),[M,se]=d.useState(null),_=L(e,f=>F(f)),[O,U]=d.useState(null),[q,k]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===b&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==I))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=h;d.useEffect(()=>{if(x){let f={x:0,y:0};const T=b=>{f={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{f.x<=10&&f.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=ot(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=nt(T,f,R);b&&setTimeout(()=>b.ref.current.focus())}),me=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&(U(f),b&&(H.current=!0))},[h.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&k(f)},[h.value]),ie=o==="popper"?Se:Fe,re=ie===Se?{side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:se,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:h.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(n,f=>{h.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:f=>f.preventDefault(),...C,...re,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=b.indexOf(I);b=b.slice(N+1)}setTimeout(()=>E(b)),f.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=s,a=G(Q,t),r=Y(Q,t),[l,i]=d.useState(null),[u,m]=d.useState(null),g=L(e,_=>m(_)),w=ue(t),y=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:h}=r,x=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&v&&C){const _=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=a.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(a.dir!=="rtl"){const I=q.left-O.left,N=U.left-I,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-U.right-I,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const k=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,re=v.offsetHeight/2,f=v.offsetTop+re,T=H+E+f,R=K-T;if(T<=te){const I=k.length>0&&v===k[k.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,re+(I?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const I=k.length>0&&v===k[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+re)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,a.trigger,a.valueNode,l,u,p,v,C,a.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const se=d.useCallback(_=>{_&&S.current===!0&&(x(),h?.(),S.current=!1)},[x,h]);return c.jsx(Dt,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:se,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((s,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...a}=s,r=pe(t);return c.jsx(xt,{...r,...a,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(Q,{}),we="SelectViewport",Ue=d.forwardRef((s,e)=>{const{__scopeSelect:t,nonce:o,...n}=s,a=Y(we,t),r=Te(we,t),l=L(e,a.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:P(n.onScroll,u=>{const m=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=r;if(w?.current&&g){const y=Math.abs(i.current-m.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const h=C+y,x=Math.min(S,h),F=h-x;g.style.height=x+"px",g.style.bottom==="0px"&&(m.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}i.current=m.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[Lt,kt]=ne(We),Bt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=Ie();return c.jsx(Lt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=kt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((s,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:a,...r}=s,l=G(ce,t),i=Y(ce,t),u=l.value===o,[m,g]=d.useState(a??""),[w,y]=d.useState(!1),S=L(e,h=>i.itemRefCallback?.(h,o,n)),p=Ie(),v=d.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(h=>{g(x=>x||(h?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:m,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...r,ref:S,onFocus:P(r.onFocus,()=>y(!0)),onBlur:P(r.onBlur,()=>y(!1)),onClick:P(r.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(r.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(r.onPointerDown,h=>{v.current=h.pointerType}),onPointerMove:P(r.onPointerMove,h=>{v.current=h.pointerType,n?i.onItemLeave?.():v.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(r.onPointerLeave,h=>{h.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:P(r.onKeyDown,h=>{i.searchRef?.current!==""&&h.key===" "||(It.includes(h.key)&&C(),h.key===" "&&h.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,...a}=s,r=G(le,t),l=Y(le,t),i=$e(le,t),u=_t(le,t),[m,g]=d.useState(null),w=L(e,C=>g(C),i.onItemTextChange,C=>l.itemTextRefCallback?.(C,i.value,i.disabled)),y=m?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:y},i.value),[i.disabled,i.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...a,ref:w}),i.isSelected&&r.valueNode&&!r.valueNodeHasChildren?Ee.createPortal(a.children,r.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var ye="SelectScrollUpButton",Ze=d.forwardRef((s,e)=>{const t=Y(ye,s.__scopeSelect),o=Te(ye,s.__scopeSelect),[n,a]=d.useState(!1),r=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollTop>0;a(u)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop-i.offsetHeight)}}):null});Ze.displayName=ye;var Ce="SelectScrollDownButton",Je=d.forwardRef((s,e)=>{const t=Y(Ce,s.__scopeSelect),o=Te(Ce,s.__scopeSelect),[n,a]=d.useState(!1),r=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollHeight-i.clientHeight,m=Math.ceil(i.scrollTop)<u;a(m)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop+i.offsetHeight)}}):null});Je.displayName=Ce;var Qe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=s,a=Y("SelectScrollButton",t),r=d.useRef(null),l=ue(t),i=d.useCallback(()=>{r.current!==null&&(window.clearInterval(r.current),r.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{l().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:P(n.onPointerDown,()=>{r.current===null&&(r.current=window.setInterval(o,50))}),onPointerMove:P(n.onPointerMove,()=>{a.onItemLeave?.(),r.current===null&&(r.current=window.setInterval(o,50))}),onPointerLeave:P(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var be="SelectArrow",Ut=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=pe(t),a=G(be,t),r=Y(be,t);return a.open&&r.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=be;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:s,value:e,...t},o)=>{const n=d.useRef(null),a=L(o,n),r=ct(e);return d.useEffect(()=>{const l=n.current;if(!l)return;const i=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(i,"value").set;if(r!==e&&m){const g=new Event("change",{bubbles:!0});m.call(l,e),l.dispatchEvent(g)}},[r,e]),c.jsx(j.select,{...t,style:{...yt,...t.style},ref:a,defaultValue:e})});et.displayName=Wt;function tt(s){return s===""||s===void 0}function ot(s){const e=dt(s),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(r=>{const l=t.current+r;e(l),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(l)},[e]),a=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,a]}function nt(s,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,a=t?s.indexOf(t):-1;let r=Kt(s,Math.max(a,0));n.length===1&&(r=r.filter(u=>u!==t));const i=r.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(s,e){return s.map((t,o)=>s[(e+o)%s.length])}var $t=Me,Gt=Oe,Yt=Le,qt=ke,Xt=Be,Zt=Ve,Jt=Ue,Qt=Ge,_e=Ye,eo=Xe,to=Ze,oo=Je;function co(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(s){const e=ee.c(13);let t,o,n,a;e[0]!==s?({className:o,size:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a):(t=e[1],o=e[2],n=e[3],a=e[4]);const r=a===void 0?"default":a;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hover:bg-[var(--studio-outline-hover-background)] hover:text-accent-foreground flex w-fit items-center justify-between gap-2 rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-[var(--studio-control-height,2rem)] data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-[var(--studio-control-radius,var(--radius-lg))] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-4 opacity-50"})}),e[7]=i):i=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==r||e[11]!==l?(u=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":r,className:l,...n,children:[t,i]}),e[8]=t,e[9]=n,e[10]=r,e[11]=l,e[12]=u):u=e[12],u}function fo(s){const e=ee.c(25);let t,o,n,a,r;e[0]!==s?({className:o,children:t,position:a,hideScrollButtons:r,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=a===void 0?"popper":a,i=r===void 0?!1:r,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let m;e[6]!==o||e[7]!==u?(m=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=m):m=e[8];let g;e[9]!==i?(g=!i&&c.jsx(no,{}),e[9]=i,e[10]=g):g=e[10];const w=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let y;e[11]!==w?(y=oe("p-1",w),e[11]=w,e[12]=y):y=e[12];let S;e[13]!==t||e[14]!==y?(S=c.jsx(Jt,{className:y,children:t}),e[13]=t,e[14]=y,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(so,{}),e[16]=i,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==m||e[21]!==g||e[22]!==S||e[23]!==p?(v=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:m,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=m,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(s){const e=ee.c(19);let t,o,n,a,r;e[0]!==s?({className:o,children:t,description:n,hideCheck:r,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=r===void 0?!1:r,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let m;e[9]!==l?(m=!l&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=l,e[10]=m):m=e[10];let g;e[11]!==t||e[12]!==n?(g=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(_e,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(_e,{children:t}),e[11]=t,e[12]=n,e[13]=g):g=e[13];let w;return e[14]!==a||e[15]!==u||e[16]!==m||e[17]!==g?(w=c.jsxs(Qt,{"data-slot":"select-item",className:u,...a,children:[m,g]}),e[14]=a,e[15]=u,e[16]=m,e[17]=g,e[18]=w):w=e[18],w}function no(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(Ct,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}function so(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}export{co as S,uo as a,po as b,mo as c,fo as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as A,r as R,l as G,j as s,B as H,p as J,v as K,q as Q,D as U}from"./index-
|
|
1
|
+
import{c as $,b as A,r as R,l as G,j as s,B as H,p as J,v as K,q as Q,D as U}from"./index-DEQvnIsm.js";import{c as V,b as W,a as X,D as Y}from"./drawer-DL0G-oy-.js";import{u as Z}from"./use-mobile-CSFJ-mhK.js";import{d as ee}from"./chat-context-Dv2E4fnf.js";import{S as q,a as se,M as le,c as te}from"./index-DZLfyA8t.js";function fe(L){const e=$.c(48),{variant:o,className:t,placeholder:n,model:l,isLoading:I,credentialId:P,onCredentialChange:k,onModelChange:b,filterModels:E}=L,z=o===void 0?"borderless":o,w=n===void 0?"Select model":n,r=A(),[a,S]=R.useState(!1),i=b!==void 0,F=Z(),O=z==="borderless"?"ghost":"outline",_=z==="borderless"&&"md:border-none";let d;e[0]!==t||e[1]!==_?(d=G("text-sm hover:bg-accent py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",_,t),e[0]=t,e[1]=_,e[2]=d):d=e[2];let c;e[3]!==I||e[4]!==l||e[5]!==w||e[6]!==i?(c=i?s.jsx(q,{model:l??null,placeholder:w,isLoading:I}):s.jsx(ne,{placeholder:w}),e[3]=I,e[4]=l,e[5]=w,e[6]=i,e[7]=c):c=e[7];let D;e[8]!==O||e[9]!==d||e[10]!==c?(D=s.jsx(H,{variant:O,size:"sm",className:d,children:c}),e[8]=O,e[9]=d,e[10]=c,e[11]=D):D=e[11];const f=D;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(se,{}),e[12]=y):y=e[12];let N;e[13]!==P||e[14]!==E||e[15]!==l||e[16]!==k||e[17]!==b||e[18]!==i?(N=s.jsx(R.Suspense,{fallback:y,children:i?s.jsx(le,{onClose:()=>S(!1),credentialId:P??null,onCredentialChange:k??oe,selectedModel:l??null,onModelChange:b,filterModels:E}):s.jsx(te,{onClose:()=>S(!1)})}),e[13]=P,e[14]=E,e[15]=l,e[16]=k,e[17]=b,e[18]=i,e[19]=N):N=e[19];const m=N;if(F){let g;e[20]!==f?(g=s.jsx(V,{asChild:!0,children:f}),e[20]=f,e[21]=g):g=e[21];let j;e[22]!==r?(j=r("chat.selectModel.selectModel"),e[22]=r,e[23]=j):j=e[23];let M;e[24]!==j?(M=s.jsx(W,{className:"sr-only",children:j}),e[24]=j,e[25]=M):M=e[25];let v;e[26]!==m?(v=s.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:m}),e[26]=m,e[27]=v):v=e[27];let C;e[28]!==M||e[29]!==v?(C=s.jsxs(X,{className:"p-0 flex flex-col max-h-[95vh]",children:[M,v]}),e[28]=M,e[29]=v,e[30]=C):C=e[30];let T;return e[31]!==a||e[32]!==g||e[33]!==C?(T=s.jsxs(Y,{open:a,onOpenChange:S,children:[g,C]}),e[31]=a,e[32]=g,e[33]=C,e[34]=T):T=e[34],T}let h;e[35]!==f?(h=s.jsx(J,{asChild:!0,children:f}),e[35]=f,e[36]=h):h=e[36];let x;e[37]!==r?(x=r("chat.selectModel.selectModel"),e[37]=r,e[38]=x):x=e[38];let p;e[39]!==x?(p=s.jsx(K,{className:"sr-only",children:x}),e[39]=x,e[40]=p):p=e[40];let u;e[41]!==m||e[42]!==p?(u=s.jsxs(Q,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[p,m]}),e[41]=m,e[42]=p,e[43]=u):u=e[43];let B;return e[44]!==a||e[45]!==h||e[46]!==u?(B=s.jsxs(U,{open:a,onOpenChange:S,children:[h,u]}),e[44]=a,e[45]=h,e[46]=u,e[47]=B):B=e[47],B}function oe(){}function ne(L){const e=$.c(4),{placeholder:o}=L,{selectedModel:t,isModelsLoading:n}=ee();let l;return e[0]!==n||e[1]!==t||e[2]!==o?(l=s.jsx(q,{model:t,placeholder:o,isLoading:n}),e[0]=n,e[1]=t,e[2]=o,e[3]=l):l=e[3],l}export{fe as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as T,b as be,j as o,r as te,av as Ne,B as we,h as _e}from"./index-8f_vFFVa.js";import{a5 as he}from"./agent-icon-DtUVrwO-.js";import{S as ve}from"./scroll-area-CxMQI3lN.js";import{O as ye,ai as Ee,q as Pe,s as Te,aj as Re,o as Ce,aJ as Fe}from"./blocks-tab-states-CbP4bRnZ.js";import{x as Ke}from"./secret-ciphertext-Cwn7ogUH.js";import{u as ze,a as De,P as $e}from"./page-seo-form-CUUspMT0.js";import{a as je}from"./Image01-DRhv7dXw.js";import{u as Be,K as Ie}from"./site-editor-toast-D3wQqSbx.js";import"./AlertCircle-DGyqrcs1.js";import"./Tool01-BgkFSAcX.js";import"./ArrowUp-D5AH9Pcx.js";import"./ArrowLeft-eYPah7GY.js";import"./LinkBroken01-XQhOMQAy.js";import"./ShoppingBag01-DZQO7QtG.js";import"./ZoomOut-Clz13c-y.js";import"./Building02-DYC0suyK.js";import"./CheckCircle-CqYnJPRs.js";import"./ChevronUp-COqs90Hs.js";import"./ChevronSelectorVertical-DdGE8kvW.js";import"./UserSquare-4I8cSrJU.js";import"./Copy01-CgH6S_M4.js";import"./CreditCard01-D9MXYjlv.js";import"./DotsVertical-Cb3iOarq.js";import"./Globe04-CzPjgHLa.js";import"./SwitchHorizontal01-CeUNJpHb.js";import"./Key01-BDIGM7UK.js";import"./Link01-D-kjAU9F.js";import"./Monitor01-BVPal7YC.js";import"./Sun-BCgybCT7.js";import"./Play-d8pW2_Wo.js";import"./Plus-BqeqBPMZ.js";import"./SearchMd-pSkC4ygW.js";import"./Trash01-DeYkLyg0.js";import"./Upload01-zDvi7WnN.js";import"./User01-DBX94Vod.js";import"./Users01-BNiwpGyg.js";import"./XClose-DFp85o1X.js";import"./index-BdQq_4o_.js";import"./input-BhCR1Dvt.js";import"./usage-stats-BJ2G_LxU.js";import"./tool-namespace-C8V5CWK9.js";import"./form-C2a6JNu4.js";import"./label-DTdw4ToM.js";import"./utils-CVEq3hMx.js";import"./markdown-gIWrkm71.js";import"./use-copy-BcbcC4Wz.js";import"./location-BjlyegC2.js";import"./use-mobile-7XbQJiX0.js";import"./use-panel-navigate-CLNhl3ki.js";import"./thread-route-qt3bqNNd.js";import"./use-project-scope-IOK1T5p5.js";import"./repository-binding-DbCSIQ25.js";import"./use-mcp-client-GXi3d-TN.js";import"./auth-BWk8-zOv.js";import"./tooltip-UP0IE2Tr.js";import"./index-CEuerbGa.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-DnweVhcO.js";import"./thread-intent-pizqUsAw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BF6OquCU.js";import"./task-board-CYLfSrEW.js";import"./schema-B0rKeG_L.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-0V74JN43.js";import"./autosend-00EmkCtt.js";import"./use-ai-providers-CNozmlYS.js";import"./use-organization-settings-Toq_f_Mz.js";import"./icon-button-C9jD2Hx3.js";import"./file-type-icon-CqiTsqkN.js";import"./shell-layout-BPP608jE.js";import"./avatar-DKDZgWFa.js";import"./use-clock-tick-Bn5JCPrV.js";import"./command-HQXCvIc1.js";import"./index-F1Fq1aIw.js";import"./integration-icon-CjUkpUFA.js";import"./project-icon-DDLQLFHN.js";import"./new-project-dialog-7fKdzYQ0.js";import"./repository-import-picker-BNXAK2-d.js";import"./use-navigate-to-agent-Bh1luKWv.js";import"./repository-picker-DdXZfSFi.js";import"./useInfiniteQuery-Z2Fpq8_2.js";import"./infiniteQueryObserver-DUxIIdhP.js";import"./collection-search-BvClByDx.js";import"./use-debounced-value-BcnQYbv8.js";import"./required-auth-layout-yR_GLYbd.js";import"./use-org-sso-CAhUTOPh.js";import"./chat-draft-b20iPSzq.js";import"./select-CD39mfCB.js";import"./tabs-DRVG225q.js";import"./use-deco-credits-sH8JcXii.js";import"./toggle-group-BflgkGO4.js";import"./use-open-billing-url-CbfiZ6nK.js";import"./index-CYl6IUJL.js";import"./checkbox-FJR9GBSz.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-DkjgCDyk.js";import"./drawer-DDevbGRy.js";import"./input-CTTf6mSe.js";import"./suggestion-DoQ2WmJO.js";import"./use-mcp-prompts-DYr_PMFD.js";import"./use-org-fs-BdAqd8Rv.js";import"./question-004-sINsf4GQ.js";import"./use-members-C4hziWH9.js";import"./use-org-auth-client-CXEz66O9.js";import"./feature-paywall-BeChu0JL.js";import"./plan-ladder--KlfKV0O.js";import"./add-connection-dialog-B8d5rNLA.js";import"./extract-connection-data-dh3iYmVg.js";import"./metadata-D72DunRR.js";import"./connection-BpKydrrq.js";import"./url-slug-D457Gzas.js";import"./connection-card-IwdFS34P.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CKgIiSeB.js";import"./use-connection-Dbx4XQH4.js";import"./schema-DqvEKlh8.js";import"./connection-form-helpers-BvKR417-.js";import"./authenticate-and-persist-oauth-IsdfY2Pl.js";import"./mcp-oauth-DJLJ4jjk.js";import"./mcp-oauth-BCVDfjxS.js";import"./collection-tabs-yyL7thvn.js";import"./badge-Bmk8ti5E.js";import"./use-infinite-scroll-C3Owd_r6.js";import"./useSuspenseInfiniteQuery-BK8FDRCQ.js";import"./use-task-board-events-DphBWYih.js";import"./use-chat-layout-state-CS60364s.js";import"./utils-2rl9BEeu.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-Da1JuUQW.js";import"./collapsible-BaAUa-uq.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Cx5_Cgu7.js";import"./types-ODqpEiLj.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-EnE9wqRk.js";import"./use-thread-outputs-CIGWCWtQ.js";import"./switch-CnVsSUQF.js";import"./monaco-editor-DKn4Wqed.js";import"./editor-DlDOOY_4.js";import"./calendar-GjUu2S3w.js";import"./editor-classes-BA-XOPn9.js";import"./core.esm-CpQIzrUC.js";import"./sortable.esm-CVfxAykx.js";import"./view-mode-toggle-UGzYIEFg.js";import"./combobox-DMjnN_aL.js";import"./alert-dialog-C884MJiU.js";import"./search-input-CUDMkzW3.js";import"./use-file-configs-DBaPVWpT.js";import"./asset-utils-Bgywf85e.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-git-api-CRxdlhrN.js";import"./sandbox-url-D3mC8qhT.js";import"./empty-state-D0xYsV2u.js";import"./alert-DV4VVYX_.js";import"./use-main-schema-v8-DQ3Tp7hb.js";import"./index-6Ue7sPGM.js";function M(d){return typeof d=="string"&&d.trim()?d:void 0}function ge(d,e){if(d){if(e)try{const t=new URL(d,e).href;return ye(t)}catch{return}return ye(d)}}function Le(d){if(!d)return{};const e=M(d.title),t=M(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:M(d.description),image:M(d.image),favicon:M(d.favicon)}}function Oe(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const Ue=[{id:"google",labelKey:"sectionsEditor.seoPreview.platformGoogle",color:"#4285F4",layout:"search"},{id:"facebook",labelKey:"sectionsEditor.seoPreview.platformFacebook",color:"#1877F2",layout:"card"},{id:"twitter",labelKey:"sectionsEditor.seoPreview.platformTwitter",color:"#0f1419",layout:"card"},{id:"linkedin",labelKey:"sectionsEditor.seoPreview.platformLinkedin",color:"#0A66C2",layout:"card"},{id:"whatsapp",labelKey:"sectionsEditor.seoPreview.platformWhatsapp",color:"#25D366",layout:"chat"},{id:"telegram",labelKey:"sectionsEditor.seoPreview.platformTelegram",color:"#229ED9",layout:"chat"},{id:"slack",labelKey:"sectionsEditor.seoPreview.platformSlack",color:"#611f69",layout:"attachment"},{id:"discord",labelKey:"sectionsEditor.seoPreview.platformDiscord",color:"#5865F2",layout:"attachment"}];function ue(d){const e=T.c(10),{src:t,className:a,iconSize:y}=d,l=y===void 0?20:y;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==a||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:a,style:m}),e[1]=a,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==l?(i=o.jsx(je,{size:l}),e[5]=l,e[6]=i):i=e[6];let n;return e[7]!==a||e[8]!==i?(n=o.jsx("div",{className:a,style:s,children:i}),e[7]=a,e[8]=i,e[9]=n):n=e[9],n}function Ae(d){const e=T.c(33),{seo:t,host:a,path:y,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let n;e[2]!==t.favicon?(n=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(je,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=n):n=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==a?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:a}),e[5]=a,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let r;e[8]!==a||e[9]!==y?(r=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[a,y]}),e[8]=a,e[9]=y,e[10]=r):r=e[10];let c;e[11]!==p||e[12]!==r?(c=o.jsxs("div",{className:"min-w-0",children:[p,r]}),e[11]=p,e[12]=r,e[13]=c):c=e[13];let x;e[14]!==n||e[15]!==c?(x=o.jsxs("div",{className:"flex items-center gap-2",children:[n,c]}),e[14]=n,e[15]=c,e[16]=x):x=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#1a0dab"},e[17]=u):u=e[17];let h;e[18]!==t.title||e[19]!==l?(h=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=l,e[20]=h):h=e[20];let v;e[21]!==h?(v=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:u,children:h}),e[21]=h,e[22]=v):v=e[22];let b;e[23]===Symbol.for("react.memo_cache_sentinel")?(b={color:"#4d5156"},e[23]=b):b=e[23];let S;e[24]!==t.description||e[25]!==l?(S=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=l,e[26]=S):S=e[26];let j;e[27]!==S?(j=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:b,children:S}),e[27]=S,e[28]=j):j=e[28];let k;return e[29]!==v||e[30]!==j||e[31]!==x?(k=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[x,v,j]}),e[29]=v,e[30]=j,e[31]=x,e[32]=k):k=e[32],k}function Me(d){const e=T.c(26),{seo:t,host:a,t:y}=d;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={background:"#fff",border:"1px solid #e2e8f0"},e[0]=l):l=e[0];let s;e[1]!==t.image?(s=o.jsx(ue,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={color:"#8a9099"},e[4]=n):n=e[4];let m;e[5]!==a?(m=o.jsx("div",{className:"truncate text-[11px]",style:n,children:a}),e[5]=a,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==y?(f=t.title??y("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=y,e[10]=f):f=e[10];let r;e[11]!==f?(r=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=r):r=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[13]=c):c=e[13];let x;e[14]!==t.description||e[15]!==y?(x=t.description??y("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=y,e[16]=x):x=e[16];let u;e[17]!==x?(u=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:x}),e[17]=x,e[18]=u):u=e[18];let h;e[19]!==u||e[20]!==m||e[21]!==r?(h=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,r,u]}),e[19]=u,e[20]=m,e[21]=r,e[22]=h):h=e[22];let v;return e[23]!==h||e[24]!==s?(v=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:l,children:[s,h]}),e[23]=h,e[24]=s,e[25]=v):v=e[25],v}function Ge(d){const e=T.c(36),{seo:t,host:a,accent:y,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let n;e[2]!==l?(n=l("sectionsEditor.seoPreview.chatCardHint"),e[2]=l,e[3]=n):n=e[3];let m;e[4]!==n?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:n}),e[4]=n,e[5]=m):m=e[5];const p=`3px solid ${y}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let r;e[8]!==t.image?(r=o.jsx(ue,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=r):r=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#1c2024"},e[10]=c):c=e[10];let x;e[11]!==t.title||e[12]!==l?(x=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=l,e[13]=x):x=e[13];let u;e[14]!==x?(u=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:c,children:x}),e[14]=x,e[15]=u):u=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h={color:"#60666c"},e[16]=h):h=e[16];let v;e[17]!==t.description||e[18]!==l?(v=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=l,e[19]=v):v=e[19];let b;e[20]!==v?(b=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:h,children:v}),e[20]=v,e[21]=b):b=e[21];let S;e[22]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#8a9099"},e[22]=S):S=e[22];let j;e[23]!==a?(j=o.jsx("div",{className:"mt-0.5 text-[10px]",style:S,children:a}),e[23]=a,e[24]=j):j=e[24];let k;e[25]!==u||e[26]!==b||e[27]!==j?(k=o.jsxs("div",{className:"px-2.5 py-1.5",children:[u,b,j]}),e[25]=u,e[26]=b,e[27]=j,e[28]=k):k=e[28];let g;e[29]!==k||e[30]!==f||e[31]!==r?(g=o.jsxs("div",{className:"overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-md))]",style:f,children:[r,k]}),e[29]=k,e[30]=f,e[31]=r,e[32]=g):g=e[32];let N;return e[33]!==g||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,g]}),e[33]=g,e[34]=m,e[35]=N):N=e[35],N}function He(d){const e=T.c(39),{seo:t,host:a,accent:y,dark:l,t:s}=d,i=l?"#2b2d31":"#fff",n=l?"#00a8fc":"#1264a3",m=l?"#dbdee1":"#3b4045",p=l?"#949ba4":"#8a9099",f=l?"none":"1px solid #e2e8f0";let r;e[0]!==i||e[1]!==f?(r={background:i,border:f},e[0]=i,e[1]=f,e[2]=r):r=e[2];const c=`3px solid ${y}`;let x;e[3]!==c?(x={borderLeft:c,borderRadius:2},e[3]=c,e[4]=x):x=e[4];let u;e[5]!==p?(u={color:p},e[5]=p,e[6]=u):u=e[6];let h;e[7]!==a||e[8]!==u?(h=o.jsx("div",{className:"text-[10px]",style:u,children:a}),e[7]=a,e[8]=u,e[9]=h):h=e[9];let v;e[10]!==n?(v={color:n},e[10]=n,e[11]=v):v=e[11];let b;e[12]!==t.title||e[13]!==s?(b=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=b):b=e[14];let S;e[15]!==v||e[16]!==b?(S=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:v,children:b}),e[15]=v,e[16]=b,e[17]=S):S=e[17];let j;e[18]!==m?(j={color:m},e[18]=m,e[19]=j):j=e[19];let k;e[20]!==t.description||e[21]!==s?(k=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=k):k=e[22];let g;e[23]!==j||e[24]!==k?(g=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:j,children:k}),e[23]=j,e[24]=k,e[25]=g):g=e[25];let N;e[26]!==g||e[27]!==h||e[28]!==S?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[h,S,g]}),e[26]=g,e[27]=h,e[28]=S,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(ue,{src:t.image,className:"size-14 shrink-0 rounded-[var(--studio-control-radius,var(--radius))]",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let _;e[32]!==N||e[33]!==w||e[34]!==x?(_=o.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:x,children:[N,w]}),e[32]=N,e[33]=w,e[34]=x,e[35]=_):_=e[35];let E;return e[36]!==_||e[37]!==r?(E=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:r,children:_}),e[36]=_,e[37]=r,e[38]=E):E=e[38],E}function Ve(d){const e=T.c(21),{platform:t,seo:a,host:y,path:l,t:s}=d;let i;e[0]!==y||e[1]!==l||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==a||e[6]!==s?(i=t.layout==="search"?o.jsx(Ae,{seo:a,host:y,path:l,t:s}):t.layout==="card"?o.jsx(Me,{seo:a,host:y,path:l,t:s}):t.layout==="chat"?o.jsx(Ge,{seo:a,host:y,path:l,accent:t.color,t:s}):o.jsx(He,{seo:a,host:y,path:l,accent:t.color,dark:t.id==="discord",t:s}),e[0]=y,e[1]=l,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=a,e[6]=s,e[7]=i):i=e[7];const n=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let r;e[15]!==m||e[16]!==f?(r=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=r):r=e[17];let c;return e[18]!==n||e[19]!==r?(c=o.jsxs("div",{children:[r,n]}),e[18]=n,e[19]=r,e[20]=c):c=e[20],c}function qe(d){const e=T.c(18),{seo:t,url:a,path:y}=d,l=y===void 0?"/":y,s=be();let i,n,m;if(e[0]!==t||e[1]!==a){const v=Le(t);i=v,n=ge(v.image,a),m=ge(v.favicon,a),e[0]=t,e[1]=a,e[2]=i,e[3]=n,e[4]=m}else i=e[2],n=e[3],m=e[4];let p;e[5]!==i||e[6]!==n||e[7]!==m?(p={...i,image:n,favicon:m},e[5]=i,e[6]=n,e[7]=m,e[8]=p):p=e[8];const f=p;let r;e[9]!==a?(r=Oe(a),e[9]=a,e[10]=r):r=e[10];const c=r,x=l==="/"?"":l;let u;e[11]!==x||e[12]!==c||e[13]!==s||e[14]!==f?(u=Ue.map(v=>o.jsx(Ve,{platform:v,seo:f,host:c,path:x,t:s},v.id)),e[11]=x,e[12]=c,e[13]=s,e[14]=f,e[15]=u):u=e[15];let h;return e[16]!==u?(h=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:u}),e[16]=u,e[17]=h):h=e[17],h}function Qi(d){const e=T.c(73),{orgSlug:t,virtualMcpId:a,branch:y,decofile:l,meta:s,target:i,previewBaseUrl:n,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,r=be(),c=Ee(l,i,s),x=Be(a,y);let u;e[0]!==x?(u=Ie(x),e[0]=x,e[1]=u):u=e[1];const h=!u,v=c?.seoData,b=i.kind==="site"?"site":i.pageKey,[S,j]=te.useState(b),[k,g]=te.useState(null),[N,w]=te.useState(0),[_,E]=te.useState(void 0);S!==b&&(j(b),g(null),E(void 0),w(We));const{persistSeo:K,persistRawSeo:oe,flush:ie,isPending:se}=ze({orgSlug:t,virtualMcpId:a,branch:y,target:i,resolved:c,onSaved:m}),G=i.kind==="page",Se=G?c?.rawSeoData:void 0,A=_!==void 0?_:Se,ke=G?Pe(A)??void 0:void 0,P=k??ke??v??{},R=c?De(P,c):null,z=R&&(!G||Te(A))?Ke(R,s):null;let H;e[2]!==s?(H=Re(s),e[2]=s,e[3]=H):H=e[3];const re=H;let C,V;e[4]!==l||e[5]!==P||e[6]!==s||e[7]!==i.kind?(C=i.kind==="page"?Ce(l,s)?.seoData??{}:{},V=i.kind==="page"?Xe(C,P):P,e[4]=l,e[5]=P,e[6]=s,e[7]=i.kind,e[8]=C,e[9]=V):(C=e[8],V=e[9]);const le=V;let q;e[10]!==K||e[11]!==c||e[12]!==g?(q=F=>{if(!c)return;const xe=F;g(xe),K(xe)},e[10]=K,e[11]=c,e[12]=g,e[13]=q):q=e[13];const ae=q;let J;e[14]!==g?(J=()=>g(null),e[14]=g,e[15]=J):J=e[15];const ce=J;let W;e[16]!==w?(W=()=>w(Je),e[16]=w,e[17]=W):W=e[17];const ne=W;let Q;e[18]!==ie||e[19]!==f?(Q=()=>{ie(),f?.()},e[18]=ie,e[19]=f,e[20]=Q):Q=e[20];const me=Q,D=i.kind==="page"?i.path:"/";let X;e[21]!==D||e[22]!==n||e[23]!==i.kind?(X=i.kind==="page"&&n?Qe(D,n):n??null,e[21]=D,e[22]=n,e[23]=i.kind,e[24]=X):X=e[24];const de=X;let Y;e[25]!==c||e[26]!==r||e[27]!==i.kind?(Y=i.kind==="site"?r("sectionsEditor.seoEditor.noSiteSeoBlock"):r(c?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[25]=c,e[26]=r,e[27]=i.kind,e[28]=Y):Y=e[28];const pe=Y,Z=G&&c,fe=i.kind==="site"&&c&&z;let $;e[29]!==me||e[30]!==r||e[31]!==i.kind||e[32]!==i.pageName?($=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:me,title:i.pageName,className:"min-w-0 truncate rounded-[var(--studio-control-radius,var(--radius-md))] px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(Ne,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(he,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:r("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",r("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[29]=me,e[30]=r,e[31]=i.kind,e[32]=i.pageName,e[33]=$):$=e[33];let B;e[34]!==se?(B=se&&o.jsx(_e,{className:"size-3.5 text-muted-foreground"}),e[34]=se,e[35]=B):B=e[35];let I;e[36]!==p||e[37]!==r||e[38]!==i.kind?(I=i.kind==="page"&&p&&o.jsxs(we,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(he,{size:14}),r("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[36]=p,e[37]=r,e[38]=i.kind,e[39]=I):I=e[39];let L;e[40]!==B||e[41]!==I?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[B,I]}),e[40]=B,e[41]=I,e[42]=L):L=e[42];let O;e[43]!==$||e[44]!==L?(O=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[$,L]}),e[43]=$,e[44]=L,e[45]=O):O=e[45];let U;e[46]!==R||e[47]!==h||e[48]!==ne||e[49]!==ce||e[50]!==re||e[51]!==A||e[52]!==P||e[53]!==pe||e[54]!==N||e[55]!==ae||e[56]!==D||e[57]!==oe||e[58]!==K||e[59]!==le||e[60]!==de||e[61]!==c||e[62]!==z||e[63]!==g||e[64]!==E||e[65]!==Z||e[66]!==fe||e[67]!==C||e[68]!==r?(U=!c||!Z&&!fe?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:pe}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(ve,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:Z?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:r("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx($e,{rawSeo:A,innerSeo:P,defaultResolveType:re,seoSchema:z,activeResolveType:R,seoTypeOptions:c.seoTypeOptions,formResetKey:N,siteDefaultSeo:C,onPersistRaw:F=>{E(F),oe(F)},onInnerChange:F=>{g(F),K(F)},onClearForm:ce,onBumpFormKey:ne,asyncRenderAvailable:h})]}):z&&R&&o.jsx(Fe,{schema:z,resolveType:R,value:P,formResetKey:N,onChange:ae})})}),o.jsx(ve,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(qe,{seo:le,url:de,path:D})})})]}),e[46]=R,e[47]=h,e[48]=ne,e[49]=ce,e[50]=re,e[51]=A,e[52]=P,e[53]=pe,e[54]=N,e[55]=ae,e[56]=D,e[57]=oe,e[58]=K,e[59]=le,e[60]=de,e[61]=c,e[62]=z,e[63]=g,e[64]=E,e[65]=Z,e[66]=fe,e[67]=C,e[68]=r,e[69]=U):U=e[69];let ee;return e[70]!==O||e[71]!==U?(ee=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[O,U]}),e[70]=O,e[71]=U,e[72]=ee):ee=e[72],ee}function Je(d){return d+1}function We(d){return d+1}function Qe(d,e){try{return new URL(d,e).href}catch{return e}}function Xe(d,e){const t=e.__resolveType,a=d.__resolveType;if(typeof t=="string"&&typeof a=="string"&&t!==a)return{...e};const y={...d};for(const[l,s]of Object.entries(e))l!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(y[l]=s));return y}export{Qi as SeoEditor};
|
|
1
|
+
import{c as T,b as be,j as o,r as te,av as Ne,B as we,h as _e}from"./index-DEQvnIsm.js";import{a5 as he}from"./agent-icon-D6wS7rd0.js";import{S as ve}from"./scroll-area-CIRLWlOA.js";import{O as ye,ai as Ee,q as Pe,s as Te,aj as Re,o as Ce,aJ as Fe}from"./blocks-tab-states-BjRnBrj4.js";import{x as Ke}from"./secret-ciphertext-6VBjcV3b.js";import{u as ze,a as De,P as $e}from"./page-seo-form-N1KKSZaU.js";import{a as je}from"./Image01-BfGAREA7.js";import{u as Be,K as Ie}from"./site-editor-toast-CmNIWnCw.js";import"./AlertCircle-Q16nTVAa.js";import"./Tool01-Bp-TbrXi.js";import"./ArrowUp--4P0C-xl.js";import"./ArrowLeft-C_dTX_8N.js";import"./LinkBroken01-DmmKNgpp.js";import"./ShoppingBag01-B7gta_qY.js";import"./ZoomOut-B3s5275g.js";import"./Building02-Gub-pr-8.js";import"./CheckCircle-CQxu_pm9.js";import"./ChevronUp-DK-Gvyk8.js";import"./ChevronSelectorVertical-GBLm8Zpl.js";import"./UserSquare-cdWcOBLL.js";import"./Copy01-EWitDFCf.js";import"./CreditCard01-wx_z4Iiz.js";import"./DotsVertical-DIT5hu2b.js";import"./Globe04-B45_cBRN.js";import"./SwitchHorizontal01-BJyDDPw9.js";import"./Key01-BV7tzZs6.js";import"./Link01-9civFIb9.js";import"./Monitor01-BoSs_8gg.js";import"./Sun-BfjJa3ru.js";import"./Play-CleWZLOG.js";import"./Plus-DQf-jm_3.js";import"./SearchMd-D0zp0uee.js";import"./Trash01-Dlk_Sh-H.js";import"./Upload01-DlF9Jqso.js";import"./User01-BcekHhAV.js";import"./Users01-BIP-PxGt.js";import"./XClose-L_GNViCD.js";import"./index-BdQq_4o_.js";import"./input-Brhdhig1.js";import"./usage-stats-BH4bqLoE.js";import"./tool-namespace-CTeV292R.js";import"./form-DNjk4sZI.js";import"./label-Cf2Qy475.js";import"./utils-CVEq3hMx.js";import"./markdown-DgDY2QmE.js";import"./use-copy-Dkgb0DtI.js";import"./location-BjlyegC2.js";import"./use-mobile-CSFJ-mhK.js";import"./use-panel-navigate-BwwjvhNB.js";import"./thread-route-DTbE-Col.js";import"./use-project-scope-Dn4doId4.js";import"./repository-binding-DpSh0bkT.js";import"./use-mcp-client-CAdgJ_QT.js";import"./auth-BVkTFTOt.js";import"./tooltip-B6NbTX5P.js";import"./index-BaQyqQF-.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-Czwn8ZVj.js";import"./thread-intent-8kpZLcDE.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C7xRCtu5.js";import"./task-board-DUTGhEiC.js";import"./schema-BzqS-kNt.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-Dv2E4fnf.js";import"./autosend-CL2OZPvg.js";import"./use-ai-providers-W2Q5vYCk.js";import"./use-organization-settings-BtOReG0H.js";import"./icon-button-WP5IJTs8.js";import"./file-type-icon-HF5UcaS2.js";import"./shell-layout-DKGS0yWx.js";import"./avatar-LfY3dprD.js";import"./use-clock-tick-xpCK7CUB.js";import"./command-KXg0ZuU-.js";import"./index-B9qNCJbx.js";import"./integration-icon-Bysyldtc.js";import"./project-icon-ChTT5o1a.js";import"./new-project-dialog-DKeFr4C7.js";import"./repository-import-picker-CmGbASze.js";import"./use-navigate-to-agent-B-QlLf3R.js";import"./repository-picker-C86kcY-U.js";import"./useInfiniteQuery-Bo5dbMM_.js";import"./infiniteQueryObserver-BnP8vr6V.js";import"./collection-search-Dcze6ySb.js";import"./use-debounced-value-vhgvmVq4.js";import"./required-auth-layout-RW5dOh2c.js";import"./use-org-sso-BhMczCH6.js";import"./chat-draft-X1dGJc2x.js";import"./select-ChqJI0MI.js";import"./tabs-D0oiuUhC.js";import"./use-deco-credits-k0aTLB-T.js";import"./toggle-group-BWQRN38D.js";import"./use-open-billing-url-DWsw6Alp.js";import"./index-DZLfyA8t.js";import"./checkbox-CaUezNgL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CjfUWaC0.js";import"./drawer-DL0G-oy-.js";import"./input-Bu2Qzwzh.js";import"./suggestion-DRP05M3-.js";import"./use-mcp-prompts-D1rnFTSb.js";import"./use-org-fs-CAwgni1d.js";import"./question-004-sINsf4GQ.js";import"./use-members-D-L919KG.js";import"./use-org-auth-client-Co_fa5Pp.js";import"./feature-paywall-BSXK-EmV.js";import"./plan-ladder-CFysCUYy.js";import"./add-connection-dialog-DwDvS8Uw.js";import"./extract-connection-data-BlmKelwb.js";import"./metadata-D72DunRR.js";import"./connection-CEK3iDim.js";import"./url-slug-CYvqbzge.js";import"./connection-card-Zhg6xn7V.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CWgoXXnV.js";import"./use-connection-Cqf7M1G6.js";import"./schema-Bcb37BRV.js";import"./connection-form-helpers-DAFP702a.js";import"./authenticate-and-persist-oauth-POYqGagt.js";import"./mcp-oauth-C_-ZUSLH.js";import"./mcp-oauth-aX1L4mRw.js";import"./collection-tabs-yg6VVFu9.js";import"./badge-CyDHDRPg.js";import"./use-infinite-scroll-B9sczgXI.js";import"./useSuspenseInfiniteQuery-CcFcpWuM.js";import"./use-task-board-events-CmYlpSMI.js";import"./use-chat-layout-state-C-XHZ0Dd.js";import"./utils-D-52h1Lf.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-ByV0vAAs.js";import"./collapsible-DHXUZre4.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-pDbHkuXF.js";import"./types-m1Dsi5sG.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CzJFx6b-.js";import"./use-thread-outputs-BUN4R0HD.js";import"./switch-CJc_fIEE.js";import"./monaco-editor-DDuHJmyY.js";import"./editor-B62-XQRE.js";import"./calendar-sxNtZ9wG.js";import"./editor-classes-BAKuqcj0.js";import"./core.esm-BO316fgf.js";import"./sortable.esm-BuCSUlOk.js";import"./view-mode-toggle-Bgum-rnB.js";import"./combobox-B5xPQiKP.js";import"./alert-dialog-ygFmYcOa.js";import"./search-input-Br9i_Ft5.js";import"./use-file-configs-BIHMmAjW.js";import"./asset-utils-Duz2qYol.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-git-api-CRxdlhrN.js";import"./sandbox-url-D3mC8qhT.js";import"./empty-state-JTI0oLk7.js";import"./alert-PPdejvI2.js";import"./use-main-schema-v8-Jzc_7tOC.js";import"./index-DAYXa7zL.js";function M(d){return typeof d=="string"&&d.trim()?d:void 0}function ge(d,e){if(d){if(e)try{const t=new URL(d,e).href;return ye(t)}catch{return}return ye(d)}}function Le(d){if(!d)return{};const e=M(d.title),t=M(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:M(d.description),image:M(d.image),favicon:M(d.favicon)}}function Oe(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const Ue=[{id:"google",labelKey:"sectionsEditor.seoPreview.platformGoogle",color:"#4285F4",layout:"search"},{id:"facebook",labelKey:"sectionsEditor.seoPreview.platformFacebook",color:"#1877F2",layout:"card"},{id:"twitter",labelKey:"sectionsEditor.seoPreview.platformTwitter",color:"#0f1419",layout:"card"},{id:"linkedin",labelKey:"sectionsEditor.seoPreview.platformLinkedin",color:"#0A66C2",layout:"card"},{id:"whatsapp",labelKey:"sectionsEditor.seoPreview.platformWhatsapp",color:"#25D366",layout:"chat"},{id:"telegram",labelKey:"sectionsEditor.seoPreview.platformTelegram",color:"#229ED9",layout:"chat"},{id:"slack",labelKey:"sectionsEditor.seoPreview.platformSlack",color:"#611f69",layout:"attachment"},{id:"discord",labelKey:"sectionsEditor.seoPreview.platformDiscord",color:"#5865F2",layout:"attachment"}];function ue(d){const e=T.c(10),{src:t,className:a,iconSize:y}=d,l=y===void 0?20:y;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==a||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:a,style:m}),e[1]=a,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==l?(i=o.jsx(je,{size:l}),e[5]=l,e[6]=i):i=e[6];let n;return e[7]!==a||e[8]!==i?(n=o.jsx("div",{className:a,style:s,children:i}),e[7]=a,e[8]=i,e[9]=n):n=e[9],n}function Ae(d){const e=T.c(33),{seo:t,host:a,path:y,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let n;e[2]!==t.favicon?(n=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(je,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=n):n=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==a?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:a}),e[5]=a,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let r;e[8]!==a||e[9]!==y?(r=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[a,y]}),e[8]=a,e[9]=y,e[10]=r):r=e[10];let c;e[11]!==p||e[12]!==r?(c=o.jsxs("div",{className:"min-w-0",children:[p,r]}),e[11]=p,e[12]=r,e[13]=c):c=e[13];let x;e[14]!==n||e[15]!==c?(x=o.jsxs("div",{className:"flex items-center gap-2",children:[n,c]}),e[14]=n,e[15]=c,e[16]=x):x=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#1a0dab"},e[17]=u):u=e[17];let h;e[18]!==t.title||e[19]!==l?(h=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=l,e[20]=h):h=e[20];let v;e[21]!==h?(v=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:u,children:h}),e[21]=h,e[22]=v):v=e[22];let b;e[23]===Symbol.for("react.memo_cache_sentinel")?(b={color:"#4d5156"},e[23]=b):b=e[23];let S;e[24]!==t.description||e[25]!==l?(S=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=l,e[26]=S):S=e[26];let j;e[27]!==S?(j=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:b,children:S}),e[27]=S,e[28]=j):j=e[28];let k;return e[29]!==v||e[30]!==j||e[31]!==x?(k=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[x,v,j]}),e[29]=v,e[30]=j,e[31]=x,e[32]=k):k=e[32],k}function Me(d){const e=T.c(26),{seo:t,host:a,t:y}=d;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={background:"#fff",border:"1px solid #e2e8f0"},e[0]=l):l=e[0];let s;e[1]!==t.image?(s=o.jsx(ue,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={color:"#8a9099"},e[4]=n):n=e[4];let m;e[5]!==a?(m=o.jsx("div",{className:"truncate text-[11px]",style:n,children:a}),e[5]=a,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==y?(f=t.title??y("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=y,e[10]=f):f=e[10];let r;e[11]!==f?(r=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=r):r=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[13]=c):c=e[13];let x;e[14]!==t.description||e[15]!==y?(x=t.description??y("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=y,e[16]=x):x=e[16];let u;e[17]!==x?(u=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:x}),e[17]=x,e[18]=u):u=e[18];let h;e[19]!==u||e[20]!==m||e[21]!==r?(h=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,r,u]}),e[19]=u,e[20]=m,e[21]=r,e[22]=h):h=e[22];let v;return e[23]!==h||e[24]!==s?(v=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:l,children:[s,h]}),e[23]=h,e[24]=s,e[25]=v):v=e[25],v}function Ge(d){const e=T.c(36),{seo:t,host:a,accent:y,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let n;e[2]!==l?(n=l("sectionsEditor.seoPreview.chatCardHint"),e[2]=l,e[3]=n):n=e[3];let m;e[4]!==n?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:n}),e[4]=n,e[5]=m):m=e[5];const p=`3px solid ${y}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let r;e[8]!==t.image?(r=o.jsx(ue,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=r):r=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#1c2024"},e[10]=c):c=e[10];let x;e[11]!==t.title||e[12]!==l?(x=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=l,e[13]=x):x=e[13];let u;e[14]!==x?(u=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:c,children:x}),e[14]=x,e[15]=u):u=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h={color:"#60666c"},e[16]=h):h=e[16];let v;e[17]!==t.description||e[18]!==l?(v=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=l,e[19]=v):v=e[19];let b;e[20]!==v?(b=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:h,children:v}),e[20]=v,e[21]=b):b=e[21];let S;e[22]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#8a9099"},e[22]=S):S=e[22];let j;e[23]!==a?(j=o.jsx("div",{className:"mt-0.5 text-[10px]",style:S,children:a}),e[23]=a,e[24]=j):j=e[24];let k;e[25]!==u||e[26]!==b||e[27]!==j?(k=o.jsxs("div",{className:"px-2.5 py-1.5",children:[u,b,j]}),e[25]=u,e[26]=b,e[27]=j,e[28]=k):k=e[28];let g;e[29]!==k||e[30]!==f||e[31]!==r?(g=o.jsxs("div",{className:"overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-md))]",style:f,children:[r,k]}),e[29]=k,e[30]=f,e[31]=r,e[32]=g):g=e[32];let N;return e[33]!==g||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,g]}),e[33]=g,e[34]=m,e[35]=N):N=e[35],N}function He(d){const e=T.c(39),{seo:t,host:a,accent:y,dark:l,t:s}=d,i=l?"#2b2d31":"#fff",n=l?"#00a8fc":"#1264a3",m=l?"#dbdee1":"#3b4045",p=l?"#949ba4":"#8a9099",f=l?"none":"1px solid #e2e8f0";let r;e[0]!==i||e[1]!==f?(r={background:i,border:f},e[0]=i,e[1]=f,e[2]=r):r=e[2];const c=`3px solid ${y}`;let x;e[3]!==c?(x={borderLeft:c,borderRadius:2},e[3]=c,e[4]=x):x=e[4];let u;e[5]!==p?(u={color:p},e[5]=p,e[6]=u):u=e[6];let h;e[7]!==a||e[8]!==u?(h=o.jsx("div",{className:"text-[10px]",style:u,children:a}),e[7]=a,e[8]=u,e[9]=h):h=e[9];let v;e[10]!==n?(v={color:n},e[10]=n,e[11]=v):v=e[11];let b;e[12]!==t.title||e[13]!==s?(b=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=b):b=e[14];let S;e[15]!==v||e[16]!==b?(S=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:v,children:b}),e[15]=v,e[16]=b,e[17]=S):S=e[17];let j;e[18]!==m?(j={color:m},e[18]=m,e[19]=j):j=e[19];let k;e[20]!==t.description||e[21]!==s?(k=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=k):k=e[22];let g;e[23]!==j||e[24]!==k?(g=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:j,children:k}),e[23]=j,e[24]=k,e[25]=g):g=e[25];let N;e[26]!==g||e[27]!==h||e[28]!==S?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[h,S,g]}),e[26]=g,e[27]=h,e[28]=S,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(ue,{src:t.image,className:"size-14 shrink-0 rounded-[var(--studio-control-radius,var(--radius))]",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let _;e[32]!==N||e[33]!==w||e[34]!==x?(_=o.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:x,children:[N,w]}),e[32]=N,e[33]=w,e[34]=x,e[35]=_):_=e[35];let E;return e[36]!==_||e[37]!==r?(E=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:r,children:_}),e[36]=_,e[37]=r,e[38]=E):E=e[38],E}function Ve(d){const e=T.c(21),{platform:t,seo:a,host:y,path:l,t:s}=d;let i;e[0]!==y||e[1]!==l||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==a||e[6]!==s?(i=t.layout==="search"?o.jsx(Ae,{seo:a,host:y,path:l,t:s}):t.layout==="card"?o.jsx(Me,{seo:a,host:y,path:l,t:s}):t.layout==="chat"?o.jsx(Ge,{seo:a,host:y,path:l,accent:t.color,t:s}):o.jsx(He,{seo:a,host:y,path:l,accent:t.color,dark:t.id==="discord",t:s}),e[0]=y,e[1]=l,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=a,e[6]=s,e[7]=i):i=e[7];const n=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let r;e[15]!==m||e[16]!==f?(r=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=r):r=e[17];let c;return e[18]!==n||e[19]!==r?(c=o.jsxs("div",{children:[r,n]}),e[18]=n,e[19]=r,e[20]=c):c=e[20],c}function qe(d){const e=T.c(18),{seo:t,url:a,path:y}=d,l=y===void 0?"/":y,s=be();let i,n,m;if(e[0]!==t||e[1]!==a){const v=Le(t);i=v,n=ge(v.image,a),m=ge(v.favicon,a),e[0]=t,e[1]=a,e[2]=i,e[3]=n,e[4]=m}else i=e[2],n=e[3],m=e[4];let p;e[5]!==i||e[6]!==n||e[7]!==m?(p={...i,image:n,favicon:m},e[5]=i,e[6]=n,e[7]=m,e[8]=p):p=e[8];const f=p;let r;e[9]!==a?(r=Oe(a),e[9]=a,e[10]=r):r=e[10];const c=r,x=l==="/"?"":l;let u;e[11]!==x||e[12]!==c||e[13]!==s||e[14]!==f?(u=Ue.map(v=>o.jsx(Ve,{platform:v,seo:f,host:c,path:x,t:s},v.id)),e[11]=x,e[12]=c,e[13]=s,e[14]=f,e[15]=u):u=e[15];let h;return e[16]!==u?(h=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:u}),e[16]=u,e[17]=h):h=e[17],h}function Qi(d){const e=T.c(73),{orgSlug:t,virtualMcpId:a,branch:y,decofile:l,meta:s,target:i,previewBaseUrl:n,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,r=be(),c=Ee(l,i,s),x=Be(a,y);let u;e[0]!==x?(u=Ie(x),e[0]=x,e[1]=u):u=e[1];const h=!u,v=c?.seoData,b=i.kind==="site"?"site":i.pageKey,[S,j]=te.useState(b),[k,g]=te.useState(null),[N,w]=te.useState(0),[_,E]=te.useState(void 0);S!==b&&(j(b),g(null),E(void 0),w(We));const{persistSeo:K,persistRawSeo:oe,flush:ie,isPending:se}=ze({orgSlug:t,virtualMcpId:a,branch:y,target:i,resolved:c,onSaved:m}),G=i.kind==="page",Se=G?c?.rawSeoData:void 0,A=_!==void 0?_:Se,ke=G?Pe(A)??void 0:void 0,P=k??ke??v??{},R=c?De(P,c):null,z=R&&(!G||Te(A))?Ke(R,s):null;let H;e[2]!==s?(H=Re(s),e[2]=s,e[3]=H):H=e[3];const re=H;let C,V;e[4]!==l||e[5]!==P||e[6]!==s||e[7]!==i.kind?(C=i.kind==="page"?Ce(l,s)?.seoData??{}:{},V=i.kind==="page"?Xe(C,P):P,e[4]=l,e[5]=P,e[6]=s,e[7]=i.kind,e[8]=C,e[9]=V):(C=e[8],V=e[9]);const le=V;let q;e[10]!==K||e[11]!==c||e[12]!==g?(q=F=>{if(!c)return;const xe=F;g(xe),K(xe)},e[10]=K,e[11]=c,e[12]=g,e[13]=q):q=e[13];const ae=q;let J;e[14]!==g?(J=()=>g(null),e[14]=g,e[15]=J):J=e[15];const ce=J;let W;e[16]!==w?(W=()=>w(Je),e[16]=w,e[17]=W):W=e[17];const ne=W;let Q;e[18]!==ie||e[19]!==f?(Q=()=>{ie(),f?.()},e[18]=ie,e[19]=f,e[20]=Q):Q=e[20];const me=Q,D=i.kind==="page"?i.path:"/";let X;e[21]!==D||e[22]!==n||e[23]!==i.kind?(X=i.kind==="page"&&n?Qe(D,n):n??null,e[21]=D,e[22]=n,e[23]=i.kind,e[24]=X):X=e[24];const de=X;let Y;e[25]!==c||e[26]!==r||e[27]!==i.kind?(Y=i.kind==="site"?r("sectionsEditor.seoEditor.noSiteSeoBlock"):r(c?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[25]=c,e[26]=r,e[27]=i.kind,e[28]=Y):Y=e[28];const pe=Y,Z=G&&c,fe=i.kind==="site"&&c&&z;let $;e[29]!==me||e[30]!==r||e[31]!==i.kind||e[32]!==i.pageName?($=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:me,title:i.pageName,className:"min-w-0 truncate rounded-[var(--studio-control-radius,var(--radius-md))] px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(Ne,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(he,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:r("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",r("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[29]=me,e[30]=r,e[31]=i.kind,e[32]=i.pageName,e[33]=$):$=e[33];let B;e[34]!==se?(B=se&&o.jsx(_e,{className:"size-3.5 text-muted-foreground"}),e[34]=se,e[35]=B):B=e[35];let I;e[36]!==p||e[37]!==r||e[38]!==i.kind?(I=i.kind==="page"&&p&&o.jsxs(we,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(he,{size:14}),r("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[36]=p,e[37]=r,e[38]=i.kind,e[39]=I):I=e[39];let L;e[40]!==B||e[41]!==I?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[B,I]}),e[40]=B,e[41]=I,e[42]=L):L=e[42];let O;e[43]!==$||e[44]!==L?(O=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[$,L]}),e[43]=$,e[44]=L,e[45]=O):O=e[45];let U;e[46]!==R||e[47]!==h||e[48]!==ne||e[49]!==ce||e[50]!==re||e[51]!==A||e[52]!==P||e[53]!==pe||e[54]!==N||e[55]!==ae||e[56]!==D||e[57]!==oe||e[58]!==K||e[59]!==le||e[60]!==de||e[61]!==c||e[62]!==z||e[63]!==g||e[64]!==E||e[65]!==Z||e[66]!==fe||e[67]!==C||e[68]!==r?(U=!c||!Z&&!fe?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:pe}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(ve,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:Z?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:r("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx($e,{rawSeo:A,innerSeo:P,defaultResolveType:re,seoSchema:z,activeResolveType:R,seoTypeOptions:c.seoTypeOptions,formResetKey:N,siteDefaultSeo:C,onPersistRaw:F=>{E(F),oe(F)},onInnerChange:F=>{g(F),K(F)},onClearForm:ce,onBumpFormKey:ne,asyncRenderAvailable:h})]}):z&&R&&o.jsx(Fe,{schema:z,resolveType:R,value:P,formResetKey:N,onChange:ae})})}),o.jsx(ve,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(qe,{seo:le,url:de,path:D})})})]}),e[46]=R,e[47]=h,e[48]=ne,e[49]=ce,e[50]=re,e[51]=A,e[52]=P,e[53]=pe,e[54]=N,e[55]=ae,e[56]=D,e[57]=oe,e[58]=K,e[59]=le,e[60]=de,e[61]=c,e[62]=z,e[63]=g,e[64]=E,e[65]=Z,e[66]=fe,e[67]=C,e[68]=r,e[69]=U):U=e[69];let ee;return e[70]!==O||e[71]!==U?(ee=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[O,U]}),e[70]=O,e[71]=U,e[72]=ee):ee=e[72],ee}function Je(d){return d+1}function We(d){return d+1}function Qe(d,e){try{return new URL(d,e).href}catch{return e}}function Xe(d,e){const t=e.__resolveType,a=d.__resolveType;if(typeof t=="string"&&typeof a=="string"&&t!==a)return{...e};const y={...d};for(const[l,s]of Object.entries(e))l!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(y[l]=s));return y}export{Qi as SeoEditor};
|