decocms 4.493.0 → 4.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-5xWWHSL1.js → ActiveShapeUtils-DCHlcSOh.js} +1 -1
- package/dist/client/assets/{AlertCircle-B5gBB9h_.js → AlertCircle-9YsZUjmj.js} +1 -1
- package/dist/client/assets/{AreaChart-BTyzss2a.js → AreaChart-CeW2QCC3.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B7455tPl.js → ArrowLeft-ZHARsvy9.js} +1 -1
- package/dist/client/assets/{ArrowUp-CP6XCJnB.js → ArrowUp-D1danNae.js} +1 -1
- package/dist/client/assets/{BarChart-Ch51NWPz.js → BarChart-DdrNiWaE.js} +1 -1
- package/dist/client/assets/{Building02-BZItaEYx.js → Building02-ssxWkdBl.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DqN5Jy74.js → CategoricalChart-ClYHeQF6.js} +1 -1
- package/dist/client/assets/{CheckCircle-C3CiaCW4.js → CheckCircle-DiKVJkkJ.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DIPs2sw-.js → ChevronSelectorVertical-Dkzqp5pp.js} +1 -1
- package/dist/client/assets/{ChevronUp-nynZHATg.js → ChevronUp-wLOc_NTT.js} +1 -1
- package/dist/client/assets/{Copy01-CdRMK9o7.js → Copy01-Cr5x9Tlu.js} +1 -1
- package/dist/client/assets/{CreditCard01-DVQTLvKO.js → CreditCard01-DCL7xzU2.js} +1 -1
- package/dist/client/assets/{DotsVertical-3XBYz4yU.js → DotsVertical-DZE2ktIm.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Csmpy3UX.js → ErrorBarContext-D4j8kFWO.js} +1 -1
- package/dist/client/assets/{Globe04-DoxNod_i.js → Globe04-DLL93yaf.js} +1 -1
- package/dist/client/assets/{Image01-DdBetDCI.js → Image01-Doh_epPd.js} +1 -1
- package/dist/client/assets/{Key01-DcSonP-G.js → Key01-rqwReuZQ.js} +1 -1
- package/dist/client/assets/{Link01-3BacRGrf.js → Link01-DiFWbMaR.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BZFZ6N-h.js → LinkBroken01-DGQh_3WZ.js} +1 -1
- package/dist/client/assets/{Monitor01-DU19-CHk.js → Monitor01-Cp7iEwN0.js} +1 -1
- package/dist/client/assets/{Play-B7i_-ibU.js → Play-C2hvYOyw.js} +1 -1
- package/dist/client/assets/{Plus-XYNDZJ4s.js → Plus-v0YpByfM.js} +1 -1
- package/dist/client/assets/{SearchMd-BFitEH5z.js → SearchMd-Bendi2p8.js} +1 -1
- package/dist/client/assets/{Sector-CYOl8Efm.js → Sector-Clpc9eH-.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Ci8H67G0.js → ShoppingBag01-BG-1Jwuh.js} +1 -1
- package/dist/client/assets/{Sun-D1Mdg8Cq.js → Sun-CJr96mBh.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BHr8jCjb.js → SwitchHorizontal01-Dv53_XOE.js} +1 -1
- package/dist/client/assets/{Tool01-DQnW-zjg.js → Tool01-B-kpMrMZ.js} +1 -1
- package/dist/client/assets/{Trash01-DZ8laRwu.js → Trash01-3M9m1iIs.js} +1 -1
- package/dist/client/assets/{Upload01-CrRTpeMX.js → Upload01-DBgIGKf8.js} +1 -1
- package/dist/client/assets/{User01-9bZ-cKa7.js → User01-CT2R-iHD.js} +1 -1
- package/dist/client/assets/{UserSquare-CuRnLJZ6.js → UserSquare-BuJqx7Ns.js} +1 -1
- package/dist/client/assets/{Users01-cUGZjxDe.js → Users01-gQNjKybb.js} +1 -1
- package/dist/client/assets/{XAxis-DDG3qYHW.js → XAxis-DBRxAeUY.js} +1 -1
- package/dist/client/assets/{XClose-DjFCAP5F.js → XClose-Bpws6cjk.js} +1 -1
- package/dist/client/assets/{ZoomOut-BggitXDv.js → ZoomOut-CVwCO-_8.js} +1 -1
- package/dist/client/assets/{access-gate-Cu8JZecz.js → access-gate-DlhD9I9N.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-DBnkMFp9.js → add-connection-dialog-CQiSl-Qe.js} +1 -1
- package/dist/client/assets/{agent-analytics-B1wni80p.js → agent-analytics-Dlpy_544.js} +1 -1
- package/dist/client/assets/agent-app-DtmEOrmX.js +1 -0
- package/dist/client/assets/{agent-assets-B18leh3z.js → agent-assets-Ba_4hhfI.js} +1 -1
- package/dist/client/assets/{agent-automation-CWXHzvtY.js → agent-automation-DuF9ZiWS.js} +1 -1
- package/dist/client/assets/{agent-automations-C0tbQ1R9.js → agent-automations-BV2eTHQr.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CKiU44XZ.js → agent-connect-sources-C_fgxaTV.js} +1 -1
- package/dist/client/assets/agent-deck--kR-tnhH.js +1 -0
- package/dist/client/assets/{agent-e2e-LdVq-drf.js → agent-e2e-CgGLFkHe.js} +1 -1
- package/dist/client/assets/{agent-experiments-ClDYYnWj.js → agent-experiments-CpXLJckI.js} +1 -1
- package/dist/client/assets/{agent-file-CjZFekiU.js → agent-file-Cak5KHUl.js} +1 -1
- package/dist/client/assets/{agent-hosting-zrg11_-A.js → agent-hosting-2pI_IIlr.js} +1 -1
- package/dist/client/assets/{agent-icon-BewGjsar.js → agent-icon-BTsTGfvr.js} +1 -1
- package/dist/client/assets/agent-library-CGtmUhYD.js +1 -0
- package/dist/client/assets/agent-library-file-CZlCJsi6.js +1 -0
- package/dist/client/assets/{agent-monitor-CKpvG_Lm.js → agent-monitor-BRq8qrkU.js} +1 -1
- package/dist/client/assets/{agent-overview-Di3y0uXp.js → agent-overview-UU6Y44eX.js} +1 -1
- package/dist/client/assets/agent-settings-_tzBjLDX.js +1 -0
- package/dist/client/assets/{agent-site-editor-16duoEZY.js → agent-site-editor-LLur_-_o.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DA20Pk7L.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-B64VGP55.js → agent-site-editor-content-DXvV_eiy.js} +3 -3
- package/dist/client/assets/agent-site-editor-preview-5ii-TR0s.js +518 -0
- package/dist/client/assets/agent-view-CgtvUhvS.js +1 -0
- package/dist/client/assets/{agent-view-guard-CoiTTfLB.js → agent-view-guard-CyNRuQw7.js} +1 -1
- package/dist/client/assets/{agents-list-CFQQdh1t.js → agents-list-BVqV3SYd.js} +1 -1
- package/dist/client/assets/{ai-providers-CTzk8MgQ.js → ai-providers-jNZBkRl5.js} +1 -1
- package/dist/client/assets/{alert-Dyx5I-Y3.js → alert-B2FW115A.js} +1 -1
- package/dist/client/assets/{alert-dialog-BXEG2ySJ.js → alert-dialog-Dr31Gqkz.js} +1 -1
- package/dist/client/assets/{analytics-sections-BeEYJnmv.js → analytics-sections-DOFncpfM.js} +1 -1
- package/dist/client/assets/{api-keys-JMxYvHms.js → api-keys-DPKcfTUa.js} +1 -1
- package/dist/client/assets/api-keys-DXlZlPNT.js +1 -0
- package/dist/client/assets/app-editor-BlHRP4Rp.js +1 -0
- package/dist/client/assets/{asset-utils-Euq8y8zU.js → asset-utils-CX1te1rQ.js} +1 -1
- package/dist/client/assets/{auth-Dwu4WH32.js → auth-CM-DdMTE.js} +1 -1
- package/dist/client/assets/{auth-catchall-D9Xe8fii.js → auth-catchall-D9Jl5rTX.js} +1 -1
- package/dist/client/assets/{auth-entry-CCIy-Mhs.js → auth-entry-Cn0jyyw6.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DXUbMgnq.js → auth-split-layout-DiVs6WJ3.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BEdNWkUl.js → authenticate-and-persist-oauth-DEaKhdcs.js} +1 -1
- package/dist/client/assets/{automation-list-row-Du4blVfm.js → automation-list-row-CG7kU51M.js} +1 -1
- package/dist/client/assets/{automation-runs-BsFnE3d4.js → automation-runs-CGQu-nIx.js} +1 -1
- package/dist/client/assets/{automations-Cpff9O08.js → automations-D9LXua4J.js} +1 -1
- package/dist/client/assets/{autosend-BaKgBZDQ.js → autosend-B7QA12Tw.js} +1 -1
- package/dist/client/assets/{avatar-BEl6nltF.js → avatar-ByGDtOvp.js} +1 -1
- package/dist/client/assets/{badge-DFdotQFQ.js → badge-XA4dRNYq.js} +1 -1
- package/dist/client/assets/{block-document-BlUE8Eks.js → block-document-B0n4B4IP.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DSOKao_H.js → blocks-preview-workspace-context-C7bCK2dG.js} +1 -1
- package/dist/client/assets/{blog-schema-B_yGbArL.js → blog-schema-D2K9lxFN.js} +1 -1
- package/dist/client/assets/{board-analytics-UmA2i-Sq.js → board-analytics-B5mmzmBe.js} +1 -1
- package/dist/client/assets/{buckets-CJ11qX_5.js → buckets-Qu8B15tT.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-QS7b7hRr.js → build-improve-prompt-doc-on-tpDMo.js} +1 -1
- package/dist/client/assets/{calendar-CT7cVD7N.js → calendar-CRpUCA4p.js} +1 -1
- package/dist/client/assets/{capability-load-error-yZzl8b80.js → capability-load-error-Cwp75ry8.js} +1 -1
- package/dist/client/assets/{category-editor-CTdWf8oW.js → category-editor-B9myg9lh.js} +1 -1
- package/dist/client/assets/{chart-C-785ZEj.js → chart-CvxQFl1V.js} +1 -1
- package/dist/client/assets/{chat-context-DJGYyGlB.js → chat-context-Cwuqjrlx.js} +1 -1
- package/dist/client/assets/{chat-draft-DbBgaLY_.js → chat-draft-D0btcSjz.js} +1 -1
- package/dist/client/assets/{checkbox-DmaIcPoL.js → checkbox-DSNt2gzr.js} +1 -1
- package/dist/client/assets/{choose-editor-CirVpDXw.js → choose-editor-BKZj3uPE.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-BnoHLlrM.js → claim-phase-copy-DWZtPw6h.js} +1 -1
- package/dist/client/assets/{cli-auth-success-XcMuETZQ.js → cli-auth-success-C6o7zJ2p.js} +1 -1
- package/dist/client/assets/{client-icons-DLhjrwzL.js → client-icons-BpKVWun3.js} +1 -1
- package/dist/client/assets/{collapsible-CgZ4-XuF.js → collapsible-DOY0YL_H.js} +1 -1
- package/dist/client/assets/{collection-detail-gYU6aRKx.js → collection-detail--7z4uSdQ.js} +1 -1
- package/dist/client/assets/{collection-display-button-YyNX5Efp.js → collection-display-button-Dtu1j77F.js} +1 -1
- package/dist/client/assets/{collection-search-BC0JMMNp.js → collection-search-DdqYzjim.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DFn43mg0.js → collection-table-wrapper-8VyRclLN.js} +1 -1
- package/dist/client/assets/{collection-tabs-DeQ7zbGh.js → collection-tabs-CWwn3uMq.js} +1 -1
- package/dist/client/assets/{column-rules-b8eo73o4.js → column-rules-_Ma8ZWf4.js} +1 -1
- package/dist/client/assets/{combobox-DeXU4vSR.js → combobox-D7N8SC25.js} +1 -1
- package/dist/client/assets/{command-D2QlwSrW.js → command-Crl7raeC.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DtzaYg0J.js → companion-mcps-section-DkjOETuc.js} +1 -1
- package/dist/client/assets/{config-DP6xvcYW.js → config-YLu1LJhW.js} +1 -1
- package/dist/client/assets/{connect-ClKIaF8K.js → connect-BbV6U_hr.js} +1 -1
- package/dist/client/assets/{connect-layout-CyyX0xPx.js → connect-layout-CQuvObDD.js} +1 -1
- package/dist/client/assets/{connection-BjzBHJVc.js → connection-BVvM5npe.js} +1 -1
- package/dist/client/assets/{connection-card-BVD8Ppl9.js → connection-card-sWgF9uUo.js} +1 -1
- package/dist/client/assets/{connection-detail-DfYF7TR9.js → connection-detail-AG67uG4I.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-5EXuPZ4G.js → connection-form-helpers-Je0bq7c_.js} +1 -1
- package/dist/client/assets/{connections-D1tC1_hB.js → connections-Dc6s7_rq.js} +1 -1
- package/dist/client/assets/{context-DzTTGbcd.js → context-DgLSgDvh.js} +1 -1
- package/dist/client/assets/{context-menu-Can7-rLt.js → context-menu-JVsCdcDt.js} +1 -1
- package/dist/client/assets/{core.esm-Cvui6jds.js → core.esm-CIWIcR9H.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CD66iA3E.js → create-organization-dialog-Ddjs5dmA.js} +1 -1
- package/dist/client/assets/{daily-pulse-Bz92WYIP.js → daily-pulse-Dpe4FA_b.js} +1 -1
- package/dist/client/assets/{device-hint-DZcinuip.js → device-hint-D9SLM9ag.js} +1 -1
- package/dist/client/assets/{discover-BRALl0mU.js → discover-DlwaiXCQ.js} +1 -1
- package/dist/client/assets/{domain-settings-DiitZO4z.js → domain-settings-CwEiepSy.js} +1 -1
- package/dist/client/assets/{drawer-BPz4t5dt.js → drawer-3zPC7EI9.js} +1 -1
- package/dist/client/assets/{editor-2jNHgdUN.js → editor-BMb1eAhF.js} +1 -1
- package/dist/client/assets/{empty-state-Zf0MeIMv.js → empty-state-DUChmUAz.js} +1 -1
- package/dist/client/assets/{empty-state-D8iC8fkc.js → empty-state-DuauqtRJ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BTBLhbEe.js → extract-connection-data-DQ0ThsQw.js} +1 -1
- package/dist/client/assets/{feature-gate-Dhf-LwS1.js → feature-gate-DGH8G4ta.js} +1 -1
- package/dist/client/assets/{feature-paywall-CHcwEHRJ.js → feature-paywall-Cdd2Shxl.js} +1 -1
- package/dist/client/assets/{file-explorer-BhYSdjXu.js → file-explorer-DPT-Gdf2.js} +1 -1
- package/dist/client/assets/{file-preview-DvxQuX3P.js → file-preview-wTY5J2MC.js} +1 -1
- package/dist/client/assets/{file-share-button-C1EB3dOc.js → file-share-button-D4Hp3Pwr.js} +1 -1
- package/dist/client/assets/{file-type-icon-DzYK4NqY.js → file-type-icon-7-3yF331.js} +1 -1
- package/dist/client/assets/flat-project-CNnQaq5E.js +1 -0
- package/dist/client/assets/{folder-icon-C_Jv4E7N.js → folder-icon-H82laJL_.js} +1 -1
- package/dist/client/assets/{form-BCYpCYIL.js → form-BUOiUceD.js} +1 -1
- package/dist/client/assets/{general-D8kDc8NB.js → general-BHuT0FSK.js} +1 -1
- package/dist/client/assets/{home-CiV29kW5.js → home-BZZrU9O7.js} +1 -1
- package/dist/client/assets/{icon-button-sHj7Q6Fp.js → icon-button-DMzM4KWP.js} +1 -1
- package/dist/client/assets/{index-s6P2p4h7.js → index-BVCIU8Mk.js} +1 -1
- package/dist/client/assets/{index-YEKHk89C.js → index-BmBVOCXW.js} +1 -1
- package/dist/client/assets/{index-wABYnbOM.js → index-CerQwuGf.js} +1 -1
- package/dist/client/assets/{index-D2iZ6syL.js → index-CvkEcM9-.js} +1 -1
- package/dist/client/assets/{index-GgiP6YIr.js → index-D5kx2mq6.js} +1 -1
- package/dist/client/assets/{index-DmfwrRER.js → index-DIbARVXx.js} +3 -3
- package/dist/client/assets/{index-BVmIdqXu.js → index-D_C9gk4l.js} +1 -1
- package/dist/client/assets/{index-CspW_Aw1.js → index-D_aXURjc.js} +1 -1
- package/dist/client/assets/{index-6UUldwCZ.js → index-PaA2bHVT.js} +1 -1
- package/dist/client/assets/{index-Bm9FTdjr.js → index-V8pRA7Xy.js} +5 -5
- package/dist/client/assets/{index-CuOTEpMz.js → index-eP3gZugt.js} +1 -1
- package/dist/client/assets/{index-KCu_K9eF.js → index-gHDeYn5U.js} +1 -1
- package/dist/client/assets/{index-redirect-C_FoZNOn.js → index-redirect-6gCqz6Y5.js} +1 -1
- package/dist/client/assets/{index-BhyQWjoM.js → index-x-BjYR-J.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-zxl9Rj5F.js → infiniteQueryObserver-Bni-1Rrc.js} +1 -1
- package/dist/client/assets/{infra-billing-heizZxEC.js → infra-billing-hHO33Bt1.js} +1 -1
- package/dist/client/assets/{input-Bvc3OT4I.js → input-C7fKNsaf.js} +1 -1
- package/dist/client/assets/{input-BkQDO0Ef.js → input-ynU6Ij5H.js} +3 -3
- package/dist/client/assets/{integration-icon-DoYtKqdf.js → integration-icon-D-qpZQt8.js} +1 -1
- package/dist/client/assets/{jira-icon-BeORJXLw.js → jira-icon-B4wDBFAC.js} +1 -1
- package/dist/client/assets/{label-BL2W0Pcn.js → label-3hwvsVXP.js} +1 -1
- package/dist/client/assets/{layout-vy24lHLj.js → layout-DHC2Bj1E.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-B5L4MOtR.js → legacy-agents-deep-BSzJqFgZ.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Pp-THt9D.js → legacy-main-redirect-R36lgGCg.js} +1 -1
- package/dist/client/assets/library-BfEEZWGX.js +1 -0
- package/dist/client/assets/{library-tab-2usQWRYi.js → library-tab-DiWbCdAf.js} +1 -1
- package/dist/client/assets/{login-CwsPhEpC.js → login-BPcnReJQ.js} +1 -1
- package/dist/client/assets/{markdown-B3PJYX-4.js → markdown-C_bpsjlQ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BLT3VM-G.js → mcp-app-renderer-DSXHJ5Wt.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BTa4N28L.js → mcp-oauth-7pqu8EiB.js} +1 -1
- package/dist/client/assets/{mcp-oauth-4gmyTyah.js → mcp-oauth-DLnUq2f9.js} +1 -1
- package/dist/client/assets/{members-Dba6HROK.js → members-Bunz7e6B.js} +1 -1
- package/dist/client/assets/{memory-DAV2Pmj2.js → memory-BLa9O78J.js} +1 -1
- package/dist/client/assets/{mini-report-page-B9WE5YW-.js → mini-report-page-BVO6pALW.js} +1 -1
- package/dist/client/assets/{mock-board-D9i0Vi9l.js → mock-board-B5k1LNJu.js} +1 -1
- package/dist/client/assets/{monaco-editor-DANiMmsL.js → monaco-editor-DMfRj7kt.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B1hQA0Lu.js → monitoring-stats-row-Bkq-86wh.js} +1 -1
- package/dist/client/assets/{multi-select-BJgtMlC2.js → multi-select-BwXBmTlI.js} +1 -1
- package/dist/client/assets/{mustache-GMlXm0yl.js → mustache-CEXj2Yiz.js} +1 -1
- package/dist/client/assets/{new-project-dialog-C-thpPQ-.js → new-project-dialog-BZdoOBOz.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B7d3QWP4.js → oauth-callback-ai-provider-CbuzeLlJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-DZwrYGu7.js → oauth-callback-z1ZK2Q1I.js} +1 -1
- package/dist/client/assets/{onboarding-DK0DTXli.js → onboarding-BGszMdtv.js} +1 -1
- package/dist/client/assets/{openai-conversation-BMdPtMrp.js → openai-conversation-B5OySV1i.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-B4v48qUS.js → optimistic-project-sidebar-views-C2x-Aaxu.js} +1 -1
- package/dist/client/assets/{organization-choice-BIWVNvRP.js → organization-choice-xhN7Yznf.js} +1 -1
- package/dist/client/assets/{orgs-D5AZUxP6.js → orgs-CEeF7hFm.js} +1 -1
- package/dist/client/assets/{page-seo-form-gaHyPBMV.js → page-seo-form-J-VUwESz.js} +1 -1
- package/dist/client/assets/{pair-DXTFiJNl.js → pair-Dha2uqa_.js} +1 -1
- package/dist/client/assets/{plan-ladder-BUDRjzbj.js → plan-ladder-BNRju_Rr.js} +1 -1
- package/dist/client/assets/{popover-jNB4XciF.js → popover-CZB8RxoJ.js} +1 -1
- package/dist/client/assets/{post-calendar-D8EAMZvz.js → post-calendar-CfLX9e_7.js} +1 -1
- package/dist/client/assets/{post-editor-BQa57f7n.js → post-editor-BBmmo40q.js} +1 -1
- package/dist/client/assets/{preview-content-B6K8Jkd_.js → preview-content-DCZG-NtD.js} +1 -1
- package/dist/client/assets/{preview-dialog-Dl22mWwN.js → preview-dialog-DZmQ4_OU.js} +1 -1
- package/dist/client/assets/{preview-panel-LWLVsrdx.js → preview-panel-BOJOfHU6.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-RglVwX1Q.js → product-picker-dialog-BRcRXNTc.js} +1 -1
- package/dist/client/assets/{profile-BWcfZQ7V.js → profile-CtDXcfuO.js} +1 -1
- package/dist/client/assets/{project-app-view-qeunpPC-.js → project-app-view-Cnchb-Ig.js} +1 -1
- package/dist/client/assets/{project-feed-Dm758F3_.js → project-feed-Ctubs6D8.js} +1 -1
- package/dist/client/assets/{project-icon-D2vCEWQy.js → project-icon-DXev8VIW.js} +1 -1
- package/dist/client/assets/project-reports-Ci_iYRrd.js +1 -0
- package/dist/client/assets/project-tasks-CzZdSRDI.js +1 -0
- package/dist/client/assets/{projects-DyGysCyv.js → projects-DfF5wpqY.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BuMMPopD.js → projects-empty-state-Bkvn9wBz.js} +1 -1
- package/dist/client/assets/{prompts-BrbpQc3X.js → prompts-JCRZXZfZ.js} +1 -1
- package/dist/client/assets/record-editor-BmUK9heP.js +1 -0
- package/dist/client/assets/{redirect-editor-Dc4HBQwl.js → redirect-editor-DARWO6oY.js} +1 -1
- package/dist/client/assets/{reports-D7gOlgZm.js → reports-BiB14-w5.js} +1 -1
- package/dist/client/assets/reports-CJkqLIIg.js +1 -0
- package/dist/client/assets/{reports-onboarding-DGmwN9iV.js → reports-onboarding-Ci2eFzgb.js} +1 -1
- package/dist/client/assets/{reports-tab-Bb7ApLUW.js → reports-tab-CfLfXENf.js} +2 -2
- package/dist/client/assets/{repositories-GlkzQQVy.js → repositories-Ddu7D_dm.js} +1 -1
- package/dist/client/assets/{repository-binding-D2wL-4Vr.js → repository-binding-CGM8Ow1W.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DtM7QfYh.js → repository-import-picker-DpjUG5YI.js} +1 -1
- package/dist/client/assets/{repository-picker-28zwGBgK.js → repository-picker-XHsJQrRg.js} +1 -1
- package/dist/client/assets/{require-capability-Dm4XTD9Y.js → require-capability-D5tJwX6A.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CbgA2xIU.js → required-auth-layout-BKYCK4WE.js} +1 -1
- package/dist/client/assets/{reset-password-15IQ61HR.js → reset-password-BDIEd0mg.js} +1 -1
- package/dist/client/assets/{resizable-CGWosOTw.js → resizable-DBUNvXp7.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BEIojUgL.js → resolve-tab-icon-C3-zJZHp.js} +1 -1
- package/dist/client/assets/{review-settings-BAqWAPVV.js → review-settings-iKeIZIxh.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CE4nCWAz.js → rich-text-link-control-B-mX9xD1.js} +1 -1
- package/dist/client/assets/roles-B4ZkD532.js +1 -0
- package/dist/client/assets/{route-DCLsEeq7.js → route-Dbrk4VYq.js} +1 -1
- package/dist/client/assets/route-DmXxzobK.js +1 -0
- package/dist/client/assets/{route-CdaJ86mX.js → route-lCR_XMKF.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-xVvcrNA2.js → runnable-block-editor-aENhZJE9.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BKjyczlw.js → sandbox-lifecycle-context-BrrAiqEe.js} +1 -1
- package/dist/client/assets/{schema-C_wSANSe.js → schema-DstuA0HH.js} +1 -1
- package/dist/client/assets/{scroll-area-BT00diUA.js → scroll-area-NCHj5pvE.js} +1 -1
- package/dist/client/assets/{search-input-D-uP0R3f.js → search-input-CdXxg7YI.js} +1 -1
- package/dist/client/assets/{search-toggle-Hgq_Klme.js → search-toggle-BepIBc_s.js} +1 -1
- package/dist/client/assets/{secret-picker-BitsdCaD.js → secret-picker-C6OYpb8W.js} +1 -1
- package/dist/client/assets/{secrets-C_yZKBHs.js → secrets-CZl02iRQ.js} +1 -1
- package/dist/client/assets/{sections-editor-DrNkE-5_.js → sections-editor-C91NghHX.js} +1 -1
- package/dist/client/assets/{select-BVEgIanS.js → select-XceA90ql.js} +1 -1
- package/dist/client/assets/{select-model-CTmCsZzT.js → select-model-Cn7hOiT6.js} +1 -1
- package/dist/client/assets/{seo-editor-Cr-VPdNi.js → seo-editor-BFWV0Cx1.js} +1 -1
- package/dist/client/assets/{separator-CJOPtNz-.js → separator-BTLDrzUc.js} +1 -1
- package/dist/client/assets/{settings-tab-zoRR23UC.js → settings-tab-BqJQ3uPx.js} +1 -1
- package/dist/client/assets/{sheet-D-h-caij.js → sheet-wemU-aZ9.js} +1 -1
- package/dist/client/assets/{shell-layout-Ckss0QqA.js → shell-layout-C7bQvu8M.js} +1 -1
- package/dist/client/assets/{skills-Dx8G-x-T.js → skills-BqpJ6duC.js} +1 -1
- package/dist/client/assets/{slider-DtTzb8JT.js → slider-INBQ4Ci_.js} +1 -1
- package/dist/client/assets/{sortable.esm-DCsYtWcb.js → sortable.esm-jUEYWtPl.js} +1 -1
- package/dist/client/assets/{sso-DDpjWaoO.js → sso-D804RM9B.js} +1 -1
- package/dist/client/assets/{suggestion-Bso4uBRF.js → suggestion-DIwPOBWx.js} +1 -1
- package/dist/client/assets/{switch-DZo6rAtc.js → switch-J8K3vNdb.js} +1 -1
- package/dist/client/assets/{symbol-Co3D-iSE.js → symbol-lUKWgdXD.js} +1 -1
- package/dist/client/assets/{synced-repos-B1f0culo.js → synced-repos-gT4FkxhN.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-ClCao4gx.js → tab-icon-glyph-DF33b7XO.js} +1 -1
- package/dist/client/assets/{table-Gm-jWCpy.js → table-Bgls4vq9.js} +1 -1
- package/dist/client/assets/{tabs-CXsAC8nO.js → tabs-Duy7ODee.js} +1 -1
- package/dist/client/assets/{task-board-Bgw_xVJW.js → task-board-DPQxW0jP.js} +1 -1
- package/dist/client/assets/{task-route-BxRkc6kt.js → task-route-BQDNl_5C.js} +1 -1
- package/dist/client/assets/{task-status-B92ESgef.js → task-status-BGLLtgDf.js} +1 -1
- package/dist/client/assets/taskboard-analytics-2fBMPAxC.js +1 -0
- package/dist/client/assets/tasks-CqyFd60l.js +1 -0
- package/dist/client/assets/{tasks-BS9sXVdl.js → tasks-IL-LS75-.js} +1 -1
- package/dist/client/assets/{textarea-bcNEcwC6.js → textarea-NyzjT40N.js} +1 -1
- package/dist/client/assets/{thread-analytics-BE8EaB4a.js → thread-analytics-CtoXhN32.js} +1 -1
- package/dist/client/assets/{thread-button-BdyWFdme.js → thread-button-BdG_noMn.js} +1 -1
- package/dist/client/assets/{thread-intent-DzHkd78g.js → thread-intent-k2Km9Dmr.js} +1 -1
- package/dist/client/assets/{thread-route-CIiqv6HG.js → thread-route-Cx-o2xCf.js} +1 -1
- package/dist/client/assets/{thread-route-mhniW_q8.js → thread-route-DbJLUn3d.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-C1CJm0mZ.js → thread-sheet-body-_3hMbQ_o.js} +1 -1
- package/dist/client/assets/{time-range-picker-BUGifbSV.js → time-range-picker-CH7-gioV.js} +1 -1
- package/dist/client/assets/{toggle-group-5iPAspL-.js → toggle-group-m6bc6yjp.js} +1 -1
- package/dist/client/assets/{tool-namespace-CYa7zzrf.js → tool-namespace-CPm912_s.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CZBCq2Ko.js → toolbar-icon-button-BxO5B0Sy.js} +1 -1
- package/dist/client/assets/{tooltip-XZmQWwgB.js → tooltip-C2m8ePE-.js} +1 -1
- package/dist/client/assets/{tooltipContext-BpyR0oly.js → tooltipContext-CxUJkkTI.js} +1 -1
- package/dist/client/assets/{track-Ba2I9E5t.js → track-C5Z44Ul6.js} +1 -1
- package/dist/client/assets/{types-2TlDAuAc.js → types-ZqGSA7tu.js} +1 -1
- package/dist/client/assets/{url-slug-B-L2Z8me.js → url-slug-DEN8nCcZ.js} +1 -1
- package/dist/client/assets/{usage-stats-BihPbkIg.js → usage-stats-Dn2OeFoS.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BP69qr77.js → use-ai-providers-jw2MMLa5.js} +1 -1
- package/dist/client/assets/{use-automations-Biu6cV7d.js → use-automations-D20-ruPj.js} +1 -1
- package/dist/client/assets/{use-autosave-9jHQ-y1f.js → use-autosave-BYt2BXBs.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-J-94EUwt.js → use-chat-layout-state-WRaaYm0y.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-BXZpM5MQ.js → use-chat-navigation-FGqN2bea.js} +1 -1
- package/dist/client/assets/{use-clock-tick-rPXqIJP8.js → use-clock-tick-DWBHoA2Q.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BupOmQ7x.js → use-connect-companion-m9MlzSIA.js} +1 -1
- package/dist/client/assets/{use-connection-DUF3XC9E.js → use-connection-B2P9vQF_.js} +1 -1
- package/dist/client/assets/{use-copy-B01v9eRq.js → use-copy-Cu3Byc8S.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BxoXyDoq.js → use-create-virtual-mcp-C8rAImjt.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CPtrEugx.js → use-date-fns-locale-Beq3354R.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C__Xzre-.js → use-debounced-autosave-DrUzoxBu.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D5_QO1dT.js → use-debounced-value-SDDhu8Id.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DkZSWK0d.js → use-deco-credits-sdJPRntH.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-1iPDcTcf.js → use-decopilot-events-CvdvLxq8.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DUG0172F.js → use-delete-connection-BOHbZqa4.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-COeWRtXj.js → use-deployment-admin-C-HUVf8B.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-A0But3O1.js → use-ensure-project-folder-BS99-Vhk.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BRdebqFC.js → use-fast-preview-draft-url-C5x2lifG.js} +1 -1
- package/dist/client/assets/{use-file-configs-B8mqylSR.js → use-file-configs-CfW92ECv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DewChEmc.js → use-infinite-scroll-lPN0NCUm.js} +1 -1
- package/dist/client/assets/{use-join-requests-CDGwHERc.js → use-join-requests-ChCzkc7_.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-D7q-AygO.js → use-main-panel-tabs-Dsv5nepq.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CUurQWMq.js → use-mcp-auth-status-DRKL-P8f.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dh_4AZgb.js → use-mcp-client-CqsBL7uD.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-LJf01t7x.js → use-mcp-prompts-1ZUYIWAu.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-p8MJKmfB.js → use-mcp-tools-D_yHtzDx.js} +1 -1
- package/dist/client/assets/{use-members-DQe3FYGy.js → use-members-BTcdjICA.js} +1 -1
- package/dist/client/assets/{use-mobile-UYmsi-dp.js → use-mobile-D2A_YY4A.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DDZo26Jw.js → use-navigate-to-agent-RUWGGNCj.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-APcQuu-Z.js +1 -0
- package/dist/client/assets/{use-open-billing-url-C0JU6CzN.js → use-open-billing-url-tDUbFoyb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CPbs0OVW.js → use-org-auth-client-qz-rdd-6.js} +1 -1
- package/dist/client/assets/{use-org-fs-gQ0RuIPK.js → use-org-fs-Bpw1hkjS.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-KkmagwRy.js → use-org-repo-syncs-Dgz3AX_E.js} +1 -1
- package/dist/client/assets/{use-org-sso-DWtbATGD.js → use-org-sso-FN6Hp6_O.js} +1 -1
- package/dist/client/assets/use-organization-roles-lOM-6Cks.js +1 -0
- package/dist/client/assets/{use-organization-settings-xcc5-6DS.js → use-organization-settings-CvwbmZME.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-A1obvdVI.js → use-panel-navigate-BcP-4Jk4.js} +1 -1
- package/dist/client/assets/{use-project-scope-BxCbtcTE.js → use-project-scope-Ds7ag806.js} +1 -1
- package/dist/client/assets/{use-releases-G79MSxhR.js → use-releases-DedSt3np.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-a7ERyr_7.js → use-reports-diagnostic-CO2atgBG.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CSN74_aC.js → use-sandbox-events-Cqb_Ym4F.js} +1 -1
- package/dist/client/assets/{use-secrets-CmTpPaF9.js → use-secrets-BjvGVY7t.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DbQlCGNR.js → use-section-preview-base-CoG0-wMI.js} +1 -1
- package/dist/client/assets/{use-tags-Ch6_1it4.js → use-tags-ja0CaL2g.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-v7nFgyEB.js → use-task-board-analytics-Dx24ixKr.js} +1 -1
- package/dist/client/assets/{use-task-board-events-DHjlo-9e.js → use-task-board-events-CZieAk2g.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CoXnP9ys.js → use-task-board-item-prs-C_5W7zcg.js} +1 -1
- package/dist/client/assets/{use-task-board-items-erbHwxMh.js → use-task-board-items-CkoW6-bn.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DmWCG43J.js → use-task-metadata-C-eJemLF.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DJfFmK1j.js → use-thread-analytics-B8zFfdhr.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-7J4Ek_Zs.js → use-thread-outputs-CHIrdXyI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Cyz1DFAa.js +1 -0
- package/dist/client/assets/{useQueries-DoURbZYb.js → useQueries-Dpxh6EqM.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B0qRbG8m.js +1 -0
- package/dist/client/assets/{users-BfQBxfCk.js → users-xDH1jmUT.js} +1 -1
- package/dist/client/assets/{utils-DAEMarMy.js → utils-BBHV2kqf.js} +1 -1
- package/dist/client/assets/{variant-calendar-DNADqO99.js → variant-calendar-BJGksOpn.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BDRgB-Pq.js → variant-matcher-override-3KgTJsm9.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DPJfZa3C.js → view-mode-toggle-5lUXeBq8.js} +1 -1
- package/dist/client/assets/{virtual-mcp-C54PVPPw.js → virtual-mcp-CKveTc8W.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DmOqvBBq.js → watch-sse-pool-SMEeDp6D.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +598 -598
- package/package.json +1 -1
- package/dist/client/assets/agent-app-DY95_zYY.js +0 -1
- package/dist/client/assets/agent-deck-C8T7Jj3o.js +0 -1
- package/dist/client/assets/agent-library-BAUPDsyD.js +0 -1
- package/dist/client/assets/agent-library-file-CHlnBg90.js +0 -1
- package/dist/client/assets/agent-settings-C-kNuurj.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BUJylH9_.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-DIihiuj0.js +0 -518
- package/dist/client/assets/agent-view-SjLiGW-o.js +0 -1
- package/dist/client/assets/api-keys-CH5G5_Qp.js +0 -1
- package/dist/client/assets/app-editor-DqEmpUhy.js +0 -1
- package/dist/client/assets/flat-project-D2zrr-4_.js +0 -1
- package/dist/client/assets/library-DZte0T9-.js +0 -1
- package/dist/client/assets/project-reports-6TMbK6-4.js +0 -1
- package/dist/client/assets/project-tasks-3mU9NrZf.js +0 -1
- package/dist/client/assets/record-editor-hwH5zZn-.js +0 -1
- package/dist/client/assets/reports-DPHZG4Rx.js +0 -1
- package/dist/client/assets/roles-etRZjRQM.js +0 -1
- package/dist/client/assets/route-BCQ2a7UE.js +0 -1
- package/dist/client/assets/taskboard-analytics-BEBBYmzN.js +0 -1
- package/dist/client/assets/tasks-DckB4c8m.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-nCMzaJ9Q.js +0 -1
- package/dist/client/assets/use-organization-roles-BKQWBZmO.js +0 -1
- package/dist/client/assets/useInfiniteQuery-vZqvTY4f.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DdGuWYX3.js +0 -1
|
@@ -1,518 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-DrNkE-5_.js","assets/index-Bm9FTdjr.js","assets/index-D7k-FSss.css","assets/chat-context-DJGYyGlB.js","assets/use-panel-navigate-A1obvdVI.js","assets/thread-route-mhniW_q8.js","assets/use-project-scope-BxCbtcTE.js","assets/repository-binding-D2wL-4Vr.js","assets/use-mcp-client-Dh_4AZgb.js","assets/auth-Dwu4WH32.js","assets/autosend-BaKgBZDQ.js","assets/thread-intent-DzHkd78g.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-DmOqvBBq.js","assets/task-board-Bgw_xVJW.js","assets/schema-C_wSANSe.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-1iPDcTcf.js","assets/use-ai-providers-BP69qr77.js","assets/use-chat-navigation-BXZpM5MQ.js","assets/location-BjlyegC2.js","assets/use-organization-settings-xcc5-6DS.js","assets/use-new-blocks-editor-nCMzaJ9Q.js","assets/runnable-block-editor-xVvcrNA2.js","assets/input-BkQDO0Ef.js","assets/usage-stats-BihPbkIg.js","assets/tool-namespace-CYa7zzrf.js","assets/form-BCYpCYIL.js","assets/label-BL2W0Pcn.js","assets/utils-CVEq3hMx.js","assets/markdown-B3PJYX-4.js","assets/use-copy-B01v9eRq.js","assets/Copy01-CdRMK9o7.js","assets/ZoomOut-BggitXDv.js","assets/use-mobile-UYmsi-dp.js","assets/tooltip-XZmQWwgB.js","assets/index-D2iZ6syL.js","assets/agent-icon-BewGjsar.js","assets/AlertCircle-B5gBB9h_.js","assets/Tool01-DQnW-zjg.js","assets/ArrowUp-CP6XCJnB.js","assets/ArrowLeft-B7455tPl.js","assets/LinkBroken01-BZFZ6N-h.js","assets/ShoppingBag01-Ci8H67G0.js","assets/Building02-BZItaEYx.js","assets/CheckCircle-C3CiaCW4.js","assets/ChevronUp-nynZHATg.js","assets/ChevronSelectorVertical-DIPs2sw-.js","assets/UserSquare-CuRnLJZ6.js","assets/CreditCard01-DVQTLvKO.js","assets/DotsVertical-3XBYz4yU.js","assets/Image01-DdBetDCI.js","assets/Globe04-DoxNod_i.js","assets/SwitchHorizontal01-BHr8jCjb.js","assets/Key01-DcSonP-G.js","assets/Link01-3BacRGrf.js","assets/Monitor01-DU19-CHk.js","assets/Sun-D1Mdg8Cq.js","assets/Play-B7i_-ibU.js","assets/Plus-XYNDZJ4s.js","assets/SearchMd-BFitEH5z.js","assets/Trash01-DZ8laRwu.js","assets/Upload01-CrRTpeMX.js","assets/User01-9bZ-cKa7.js","assets/Users01-cUGZjxDe.js","assets/XClose-DjFCAP5F.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-sHj7Q6Fp.js","assets/file-type-icon-DzYK4NqY.js","assets/shell-layout-Ckss0QqA.js","assets/avatar-BEl6nltF.js","assets/use-clock-tick-rPXqIJP8.js","assets/command-D2QlwSrW.js","assets/index-s6P2p4h7.js","assets/integration-icon-DoYtKqdf.js","assets/project-icon-D2vCEWQy.js","assets/new-project-dialog-C-thpPQ-.js","assets/repository-import-picker-DtM7QfYh.js","assets/use-navigate-to-agent-DDZo26Jw.js","assets/repository-picker-28zwGBgK.js","assets/useInfiniteQuery-vZqvTY4f.js","assets/infiniteQueryObserver-zxl9Rj5F.js","assets/collection-search-BC0JMMNp.js","assets/use-debounced-value-D5_QO1dT.js","assets/required-auth-layout-CbgA2xIU.js","assets/use-org-sso-DWtbATGD.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-DbBgaLY_.js","assets/select-BVEgIanS.js","assets/index-BdQq_4o_.js","assets/tabs-CXsAC8nO.js","assets/use-deco-credits-DkZSWK0d.js","assets/toggle-group-5iPAspL-.js","assets/use-open-billing-url-C0JU6CzN.js","assets/index-CuOTEpMz.js","assets/checkbox-DmaIcPoL.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-jNB4XciF.js","assets/drawer-BPz4t5dt.js","assets/input-Bvc3OT4I.js","assets/suggestion-Bso4uBRF.js","assets/use-chat-layout-state-J-94EUwt.js","assets/use-file-configs-B8mqylSR.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-LJf01t7x.js","assets/use-org-fs-gQ0RuIPK.js","assets/question-004-sINsf4GQ.js","assets/use-members-DQe3FYGy.js","assets/use-org-auth-client-CPbs0OVW.js","assets/feature-paywall-CHcwEHRJ.js","assets/plan-ladder-BUDRjzbj.js","assets/add-connection-dialog-DBnkMFp9.js","assets/extract-connection-data-BTBLhbEe.js","assets/metadata-D72DunRR.js","assets/connection-BjzBHJVc.js","assets/url-slug-B-L2Z8me.js","assets/connection-card-BVD8Ppl9.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-bcNEcwC6.js","assets/use-connection-DUF3XC9E.js","assets/connection-form-helpers-5EXuPZ4G.js","assets/authenticate-and-persist-oauth-BEdNWkUl.js","assets/mcp-oauth-4gmyTyah.js","assets/mcp-oauth-BTa4N28L.js","assets/collection-tabs-DeQ7zbGh.js","assets/badge-DFdotQFQ.js","assets/use-infinite-scroll-DewChEmc.js","assets/useSuspenseInfiniteQuery-DdGuWYX3.js","assets/use-task-board-events-DHjlo-9e.js","assets/input-Bwd_JSM8.css","assets/claim-phase-copy-BnoHLlrM.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-DXTFiJNl.js","assets/collapsible-CgZ4-XuF.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-BLT3VM-G.js","assets/types-2TlDAuAc.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-D-h-caij.js","assets/use-thread-outputs-7J4Ek_Zs.js","assets/utils-DAEMarMy.js","assets/scroll-area-BT00diUA.js","assets/monaco-editor-DANiMmsL.js","assets/editor-2jNHgdUN.js","assets/calendar-CT7cVD7N.js","assets/rich-text-link-control-CE4nCWAz.js","assets/switch-DZo6rAtc.js","assets/core.esm-Cvui6jds.js","assets/sortable.esm-DCsYtWcb.js","assets/combobox-DeXU4vSR.js","assets/alert-dialog-BXEG2ySJ.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-D-uP0R3f.js","assets/asset-utils-Euq8y8zU.js","assets/sandbox-git-api-C7JbVL7R.js","assets/mustache-GMlXm0yl.js","assets/page-seo-form-gaHyPBMV.js","assets/use-section-preview-base-DbQlCGNR.js","assets/section-preview-url-7zfngvgW.js","assets/variant-matcher-override-BDRgB-Pq.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as x,aD as kt,aW as He,aE as Se,c as pe,b as Te,j as s,q as In,D as Un,K as zs,s as Hn,v as Vn,e as Is,h as Pt,I as Pn,B as De,w as Us,a6 as qn,aX as Hs,a2 as Qt,aY as Vs,aV as qs,l as Dt,P as Sn,y as Ws,t as jn}from"./index-Bm9FTdjr.js";import{A as Gs}from"./agent-view-guard-CoiTTfLB.js";import{F as Js}from"./feature-gate-Dhf-LwS1.js";import{a as Ys,b as St,r as Wn,l as Gn,f as Qs,w as Xs}from"./chat-context-DJGYyGlB.js";import{t as Zs}from"./ChevronUp-nynZHATg.js";import{I as Jn,R as er,S as tr,d as nr,T as sr,U as rr,V as ar,W as ir,X as En,K as or}from"./agent-icon-BewGjsar.js";import{a as lr}from"./UserSquare-CuRnLJZ6.js";import{s as cr}from"./Plus-XYNDZJ4s.js";import{P as dr,a as ur,b as mr}from"./popover-jNB4XciF.js";import{e as st,b as rt,c as Yn,f as Qn,C as Xn,a as Zn}from"./command-D2QlwSrW.js";import{c as fr,a as pr}from"./repository-binding-D2wL-4Vr.js";import{b as Xt}from"./sandbox-lifecycle-context-BKjyczlw.js";import{e as hr}from"./backoff-CrEUbyZT.js";import{f as gr}from"./thread-intent-DzHkd78g.js";import{a as es}from"./input-BkQDO0Ef.js";import{N as vr,c as br,s as at,n as Zt,d as ts,f as Be,v as ns,h as xr,u as yr,j as wr,k as kr,l as Pr,m as Sr,o as Nn}from"./claim-phase-copy-BnoHLlrM.js";import{u as jr}from"./use-mobile-UYmsi-dp.js";import{b as Kt,T as zt,a as It}from"./tooltip-XZmQWwgB.js";import{T as Ze}from"./toolbar-icon-button-CZBCq2Ko.js";import{b as Er,a as Nr,u as ss,g as Tr,c as Cr,B as Ut,P as Rr,r as Lr,R as Or,d as _r,e as en,f as rs,h as Ar,i as Br,j as $r,l as Fr,m as Mr,p as Dr,k as Kr,S as Ht}from"./runnable-block-editor-xVvcrNA2.js";import{w as bt,i as zr}from"./variant-matcher-override-BDRgB-Pq.js";import{r as Ir,w as Ur,D as Hr,b as Tn,a as Vr}from"./section-preview-url-7zfngvgW.js";import{u as qr}from"./use-fast-preview-draft-url-BRdebqFC.js";import{u as Wr,w as Cn}from"./device-hint-DZcinuip.js";import{a as Gr,c as as}from"./shell-layout-Ckss0QqA.js";import{u as is,b as Jr}from"./use-sandbox-events-CSN74_aC.js";import{u as Gt}from"./useQueries-DoURbZYb.js";import{i as Yr}from"./LinkBroken01-BZFZ6N-h.js";import{u as os}from"./blocks-preview-workspace-context-DSOKao_H.js";import{i as Qr}from"./AlertCircle-B5gBB9h_.js";import{E as tn}from"./empty-state-Zf0MeIMv.js";import{M as Xr}from"./monaco-editor-DANiMmsL.js";import{u as Zr}from"./use-new-blocks-editor-nCMzaJ9Q.js";import{a as ea}from"./utils-DAEMarMy.js";import{R as Rn,a as xt,b as Ln}from"./resizable-CGWosOTw.js";import{r as ta}from"./virtual-mcp-C54PVPPw.js";import{d as na}from"./delay-CnY5UFtP.js";import{a as Vt}from"./use-chat-layout-state-J-94EUwt.js";import{G as On}from"./repository-picker-28zwGBgK.js";import{R as sa}from"./repository-import-picker-DtM7QfYh.js";import{r as ra}from"./use-main-panel-tabs-D7q-AygO.js";import{u as aa}from"./use-task-metadata-DmWCG43J.js";import{b as ia}from"./thread-route-mhniW_q8.js";import"./use-panel-navigate-A1obvdVI.js";import"./use-project-scope-BxCbtcTE.js";import"./feature-paywall-CHcwEHRJ.js";import"./plan-ladder-BUDRjzbj.js";import"./use-decopilot-events-1iPDcTcf.js";import"./watch-sse-pool-DmOqvBBq.js";import"./task-board-Bgw_xVJW.js";import"./schema-C_wSANSe.js";import"./autosend-BaKgBZDQ.js";import"./use-mcp-client-Dh_4AZgb.js";import"./auth-Dwu4WH32.js";import"./use-ai-providers-BP69qr77.js";import"./use-chat-navigation-BXZpM5MQ.js";import"./location-BjlyegC2.js";import"./use-organization-settings-xcc5-6DS.js";import"./Tool01-DQnW-zjg.js";import"./ArrowUp-CP6XCJnB.js";import"./ArrowLeft-B7455tPl.js";import"./ShoppingBag01-Ci8H67G0.js";import"./ZoomOut-BggitXDv.js";import"./Building02-BZItaEYx.js";import"./CheckCircle-C3CiaCW4.js";import"./ChevronSelectorVertical-DIPs2sw-.js";import"./Copy01-CdRMK9o7.js";import"./CreditCard01-DVQTLvKO.js";import"./DotsVertical-3XBYz4yU.js";import"./Image01-DdBetDCI.js";import"./Globe04-DoxNod_i.js";import"./SwitchHorizontal01-BHr8jCjb.js";import"./Key01-DcSonP-G.js";import"./Link01-3BacRGrf.js";import"./Monitor01-DU19-CHk.js";import"./Sun-D1Mdg8Cq.js";import"./Play-B7i_-ibU.js";import"./SearchMd-BFitEH5z.js";import"./Trash01-DZ8laRwu.js";import"./Upload01-CrRTpeMX.js";import"./User01-9bZ-cKa7.js";import"./Users01-cUGZjxDe.js";import"./XClose-DjFCAP5F.js";import"./index-s6P2p4h7.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./usage-stats-BihPbkIg.js";import"./tool-namespace-CYa7zzrf.js";import"./form-BCYpCYIL.js";import"./label-BL2W0Pcn.js";import"./utils-CVEq3hMx.js";import"./markdown-B3PJYX-4.js";import"./use-copy-B01v9eRq.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-sHj7Q6Fp.js";import"./file-type-icon-DzYK4NqY.js";import"./chat-draft-DbBgaLY_.js";import"./select-BVEgIanS.js";import"./index-BdQq_4o_.js";import"./index-D2iZ6syL.js";import"./tabs-CXsAC8nO.js";import"./use-deco-credits-DkZSWK0d.js";import"./toggle-group-5iPAspL-.js";import"./use-open-billing-url-C0JU6CzN.js";import"./index-CuOTEpMz.js";import"./checkbox-DmaIcPoL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BEl6nltF.js";import"./drawer-BPz4t5dt.js";import"./input-Bvc3OT4I.js";import"./suggestion-Bso4uBRF.js";import"./use-mcp-prompts-LJf01t7x.js";import"./use-org-fs-gQ0RuIPK.js";import"./useInfiniteQuery-vZqvTY4f.js";import"./infiniteQueryObserver-zxl9Rj5F.js";import"./question-004-sINsf4GQ.js";import"./use-members-DQe3FYGy.js";import"./use-org-auth-client-CPbs0OVW.js";import"./add-connection-dialog-DBnkMFp9.js";import"./collection-search-BC0JMMNp.js";import"./extract-connection-data-BTBLhbEe.js";import"./metadata-D72DunRR.js";import"./connection-BjzBHJVc.js";import"./url-slug-B-L2Z8me.js";import"./connection-card-BVD8Ppl9.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-DoYtKqdf.js";import"./textarea-bcNEcwC6.js";import"./use-connection-DUF3XC9E.js";import"./connection-form-helpers-5EXuPZ4G.js";import"./authenticate-and-persist-oauth-BEdNWkUl.js";import"./mcp-oauth-4gmyTyah.js";import"./mcp-oauth-BTa4N28L.js";import"./collection-tabs-DeQ7zbGh.js";import"./badge-DFdotQFQ.js";import"./use-infinite-scroll-DewChEmc.js";import"./useSuspenseInfiniteQuery-DdGuWYX3.js";import"./use-task-board-events-DHjlo-9e.js";import"./pair-DXTFiJNl.js";import"./collapsible-CgZ4-XuF.js";import"./use-clock-tick-rPXqIJP8.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BLT3VM-G.js";import"./types-2TlDAuAc.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-D-h-caij.js";import"./use-navigate-to-agent-DDZo26Jw.js";import"./use-thread-outputs-7J4Ek_Zs.js";import"./scroll-area-BT00diUA.js";import"./calendar-CT7cVD7N.js";import"./rich-text-link-control-CE4nCWAz.js";import"./switch-DZo6rAtc.js";import"./core.esm-Cvui6jds.js";import"./sortable.esm-DCsYtWcb.js";import"./combobox-DeXU4vSR.js";import"./alert-dialog-BXEG2ySJ.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-D-uP0R3f.js";import"./use-debounced-value-D5_QO1dT.js";import"./use-file-configs-B8mqylSR.js";import"./asset-utils-Euq8y8zU.js";import"./sandbox-git-api-C7JbVL7R.js";import"./project-icon-D2vCEWQy.js";import"./new-project-dialog-C-thpPQ-.js";import"./required-auth-layout-CbgA2xIU.js";import"./use-org-sso-DWtbATGD.js";import"./editor-2jNHgdUN.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-tools-p8MJKmfB.js";import"./resolve-tab-icon-BEIojUgL.js";const oa={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function la(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,l=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?oa:r&&i&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const ca=1e4,da=1e3,ua=3e4;function ma({iframeRef:t,src:e,active:n}){const r=x.useRef(0),i=x.useRef(null),u=x.useRef(null),l=x.useRef(e),c=x.useRef(n);l.current=e,c.current=n;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},ca)},h=()=>{if(!c.current||!l.current)return;u.current&&clearTimeout(u.current);const j=hr(ua,da,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,E=l.current;!g||!E||!c.current||(g.src=E,d())},j)},m=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return x.useEffect(()=>{if(o(),r.current=0,!(!n||!e))return d(),o},[e,n]),{handleLoad:m,handleError:p}}const fa=kt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:kt({width:He(),height:He()}),position:kt({x:He(),y:He()})}),pa=`(function() {
|
|
3
|
-
if (window.__visualEditorActive) return;
|
|
4
|
-
window.__visualEditorActive = true;
|
|
5
|
-
|
|
6
|
-
var cursorStyle = document.createElement("style");
|
|
7
|
-
cursorStyle.textContent = "* { cursor: default !important; }";
|
|
8
|
-
document.head.appendChild(cursorStyle);
|
|
9
|
-
|
|
10
|
-
var highlight = document.createElement("div");
|
|
11
|
-
highlight.style.cssText = "position:fixed;pointer-events:none;outline:2px solid #a855f7;background:rgba(168,85,247,0.08);border-radius:2px;z-index:2147483647;display:none;";
|
|
12
|
-
document.body.appendChild(highlight);
|
|
13
|
-
|
|
14
|
-
var badge = document.createElement("div");
|
|
15
|
-
badge.style.cssText = "position:fixed;pointer-events:none;background:#a855f7;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
16
|
-
document.body.appendChild(badge);
|
|
17
|
-
|
|
18
|
-
var lastTarget = null;
|
|
19
|
-
var rafPending = false;
|
|
20
|
-
var moveHandler = function(e) {
|
|
21
|
-
if (rafPending) return;
|
|
22
|
-
rafPending = true;
|
|
23
|
-
var target = e.target;
|
|
24
|
-
requestAnimationFrame(function() {
|
|
25
|
-
rafPending = false;
|
|
26
|
-
var el = target;
|
|
27
|
-
if (!el || el === highlight || el === badge) return;
|
|
28
|
-
if (el === lastTarget) return;
|
|
29
|
-
lastTarget = el;
|
|
30
|
-
var r = el.getBoundingClientRect();
|
|
31
|
-
highlight.style.display = "block";
|
|
32
|
-
highlight.style.top = r.top + "px";
|
|
33
|
-
highlight.style.left = r.left + "px";
|
|
34
|
-
highlight.style.width = r.width + "px";
|
|
35
|
-
highlight.style.height = r.height + "px";
|
|
36
|
-
var tag = el.tagName.toLowerCase();
|
|
37
|
-
var id = el.id ? "#" + el.id : "";
|
|
38
|
-
var cls = el.className && typeof el.className === "string"
|
|
39
|
-
? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
|
|
40
|
-
: "";
|
|
41
|
-
badge.textContent = tag + id + cls;
|
|
42
|
-
badge.style.display = "block";
|
|
43
|
-
badge.style.top = Math.max(0, r.top - 20) + "px";
|
|
44
|
-
badge.style.left = r.left + "px";
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
document.addEventListener("mousemove", moveHandler, true);
|
|
48
|
-
|
|
49
|
-
var outHandler = function(e) {
|
|
50
|
-
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
51
|
-
highlight.style.display = "none";
|
|
52
|
-
badge.style.display = "none";
|
|
53
|
-
lastTarget = null;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
document.addEventListener("mouseout", outHandler, true);
|
|
57
|
-
|
|
58
|
-
var clickHandler = function(e) {
|
|
59
|
-
e.preventDefault();
|
|
60
|
-
e.stopImmediatePropagation();
|
|
61
|
-
var el = e.target;
|
|
62
|
-
if (!el || el === highlight || el === badge) return;
|
|
63
|
-
|
|
64
|
-
highlight.style.outline = "2px solid #a855f7";
|
|
65
|
-
highlight.style.background = "rgba(168,85,247,0.15)";
|
|
66
|
-
setTimeout(function() {
|
|
67
|
-
highlight.style.outline = "2px solid #a855f7";
|
|
68
|
-
highlight.style.background = "rgba(168,85,247,0.08)";
|
|
69
|
-
}, 400);
|
|
70
|
-
|
|
71
|
-
var tag = el.tagName.toLowerCase();
|
|
72
|
-
var id = el.id || "";
|
|
73
|
-
var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
|
|
74
|
-
var text = (el.textContent || "").trim().slice(0, 200);
|
|
75
|
-
var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
|
|
76
|
-
|
|
77
|
-
var closestSection = el.closest("section[data-manifest-key]");
|
|
78
|
-
var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
|
|
79
|
-
|
|
80
|
-
var ancestor = el;
|
|
81
|
-
var componentName = null;
|
|
82
|
-
for (var i = 0; i < 10 && ancestor; i++) {
|
|
83
|
-
if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
|
|
84
|
-
ancestor = ancestor.parentElement;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
var parents = [];
|
|
88
|
-
var p = el.parentElement;
|
|
89
|
-
for (var j = 0; j < 4 && p && p !== document.body; j++) {
|
|
90
|
-
var pTag = p.tagName ? p.tagName.toLowerCase() : "";
|
|
91
|
-
var pId = p.id ? "#" + p.id : "";
|
|
92
|
-
var pCls = p.className && typeof p.className === "string"
|
|
93
|
-
? "." + p.className.trim().split(/\\s+/)[0]
|
|
94
|
-
: "";
|
|
95
|
-
parents.unshift(pTag + pId + pCls);
|
|
96
|
-
p = p.parentElement;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
window.parent.postMessage({
|
|
100
|
-
type: "visual-editor::element-clicked",
|
|
101
|
-
payload: {
|
|
102
|
-
tag: tag, id: id, classes: classes, text: text, html: html,
|
|
103
|
-
manifestKey: manifestKey, componentName: componentName,
|
|
104
|
-
parents: parents.join(" > "),
|
|
105
|
-
url: window.location.href, path: window.location.pathname,
|
|
106
|
-
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
107
|
-
position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
|
|
108
|
-
}
|
|
109
|
-
}, "*");
|
|
110
|
-
};
|
|
111
|
-
document.addEventListener("click", clickHandler, true);
|
|
112
|
-
|
|
113
|
-
window.addEventListener("message", function(e) {
|
|
114
|
-
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — a nested/downstream frame's forged message can't deactivate the editor.
|
|
115
|
-
if (e.source !== window.parent) return;
|
|
116
|
-
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
117
|
-
if (e.data && e.data.type === "visual-editor::clear-hover") {
|
|
118
|
-
highlight.style.display = "none";
|
|
119
|
-
badge.style.display = "none";
|
|
120
|
-
lastTarget = null;
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
if (e.data && e.data.type === "visual-editor::deactivate") {
|
|
124
|
-
highlight.remove();
|
|
125
|
-
badge.remove();
|
|
126
|
-
cursorStyle.remove();
|
|
127
|
-
document.removeEventListener("mousemove", moveHandler, true);
|
|
128
|
-
document.removeEventListener("mouseout", outHandler, true);
|
|
129
|
-
document.removeEventListener("click", clickHandler, true);
|
|
130
|
-
window.__visualEditorActive = false;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
})();`;function ha(t,e){const n=t.map(()=>null),r=[];for(let p=0;p<t.length;p++)t[p]!==null&&r.push(p);const i=r.length,u=e.length;if(!i||!u)return n;const l=(p,j)=>{const g=t[r[p]??0];return!g||!g.length?1:g.indexOf(e[j]??"")>=0?2:0},c=[],o=[];for(let p=0;p<=i;p++)c.push(new Array(u+1).fill(0)),o.push(new Array(u+1).fill(2));for(let p=1;p<=i;p++){const j=c[p-1]??[],g=c[p]??[],E=o[p]??[];for(let b=1;b<=u;b++){let w=j[b]??0,N=2;const y=g[b-1]??0;y>w&&(w=y,N=0);const v=l(p-1,b-1),k=(j[b-1]??0)+v;v>0&&k>w&&(w=k,N=1),g[b]=w,E[b]=N}}let d=0,h=i,m=u;for(;h>0&&m>0;){const p=o[h]?.[m]??2;p===1?(n[r[h-1]??0]=m-1,d++,h--,m--):p===0?m--:h--}if(d===0&&u===i)for(let p=0;p<i;p++)n[r[p]??0]=p;return n}const ga=kt({sectionIndex:He(),manifestKey:Se(),clickSeq:He()}),_n=`(function() {
|
|
134
|
-
if (window.__cmsEditorActive) return;
|
|
135
|
-
window.__cmsEditorActive = true;
|
|
136
|
-
|
|
137
|
-
// Preserve scroll across variant-override navigations and save-reloads.
|
|
138
|
-
// Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
|
|
139
|
-
// or reloads it, which would otherwise jump to the top. We persist the scroll
|
|
140
|
-
// offset to sessionStorage (survives reload, same-origin) keyed by pathname
|
|
141
|
-
// (the override only changes the query, so the key is stable), then restore it
|
|
142
|
-
// on the next load — retried for ~1s so it outlasts re-hydration and lazy
|
|
143
|
-
// sections that grow the page after load. The recency guard avoids restoring a
|
|
144
|
-
// stale offset on a genuinely fresh visit.
|
|
145
|
-
var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
|
|
146
|
-
var saveScroll = function() {
|
|
147
|
-
try {
|
|
148
|
-
sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
|
|
149
|
-
x: window.scrollX, y: window.scrollY, t: Date.now()
|
|
150
|
-
}));
|
|
151
|
-
} catch (_) {}
|
|
152
|
-
};
|
|
153
|
-
var saveScrollPending = false;
|
|
154
|
-
window.addEventListener("scroll", function() {
|
|
155
|
-
if (saveScrollPending) return;
|
|
156
|
-
saveScrollPending = true;
|
|
157
|
-
requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
|
|
158
|
-
}, { passive: true });
|
|
159
|
-
(function restoreScroll() {
|
|
160
|
-
var raw = null;
|
|
161
|
-
try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
|
|
162
|
-
if (!raw) return;
|
|
163
|
-
var saved = null;
|
|
164
|
-
try { saved = JSON.parse(raw); } catch (_) { return; }
|
|
165
|
-
if (!saved || (Date.now() - saved.t) > 10000) return;
|
|
166
|
-
if (!saved.x && !saved.y) return;
|
|
167
|
-
var attempts = 0;
|
|
168
|
-
var apply = function() {
|
|
169
|
-
attempts++;
|
|
170
|
-
window.scrollTo(saved.x || 0, saved.y || 0);
|
|
171
|
-
if (attempts < 8) setTimeout(apply, 120);
|
|
172
|
-
};
|
|
173
|
-
apply();
|
|
174
|
-
})();
|
|
175
|
-
|
|
176
|
-
var highlight = document.createElement("div");
|
|
177
|
-
highlight.style.cssText = "position:absolute;pointer-events:none;outline:2px solid #06b6d4;background:rgba(6,182,212,0.06);border-radius:2px;z-index:2147483647;display:none;";
|
|
178
|
-
document.body.appendChild(highlight);
|
|
179
|
-
|
|
180
|
-
var badge = document.createElement("div");
|
|
181
|
-
badge.style.cssText = "position:absolute;pointer-events:none;background:#06b6d4;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
182
|
-
document.body.appendChild(badge);
|
|
183
|
-
|
|
184
|
-
var isTopLevelSection = function(el) {
|
|
185
|
-
return el && el.parentElement
|
|
186
|
-
? !el.parentElement.closest("section[data-manifest-key]")
|
|
187
|
-
: true;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
// All top-level page sections in DOM order (deco renders page sections as
|
|
191
|
-
// <section data-manifest-key>; nested islands/sections carry the attribute
|
|
192
|
-
// too, hence the top-level filter). This is the full DOM run, framework
|
|
193
|
-
// sections included — getAllSections() narrows it to the editable window.
|
|
194
|
-
var topLevelSections = function() {
|
|
195
|
-
return Array.from(document.querySelectorAll("section[data-manifest-key]"))
|
|
196
|
-
.filter(isTopLevelSection);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
// Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
|
|
200
|
-
var sectionCandidates = [];
|
|
201
|
-
|
|
202
|
-
// Stringified from section-alignment.ts so both sides share one copy.
|
|
203
|
-
var alignSections = ${ha.toString()};
|
|
204
|
-
|
|
205
|
-
// Indexed like the decofile array; unmapped entries stay null (not clickable).
|
|
206
|
-
var computeAlignment = function(tops) {
|
|
207
|
-
var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
|
|
208
|
-
return alignSections(sectionCandidates, domKeys).map(function(idx) {
|
|
209
|
-
return idx === null ? null : tops[idx];
|
|
210
|
-
});
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
// Editable sections, indexed to match the decofile array the panel uses.
|
|
214
|
-
// Recomputed from the live DOM each call (cheap, rAF-throttled) so it
|
|
215
|
-
// self-heals as client-rendered/lazy sections mount. Until the editor sends
|
|
216
|
-
// candidates, fall back to the full top-level run.
|
|
217
|
-
var getAllSections = function() {
|
|
218
|
-
var tops = topLevelSections();
|
|
219
|
-
return sectionCandidates.length ? computeAlignment(tops) : tops;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// Resolve to the OUTERMOST page-level section (clicking nested content still
|
|
223
|
-
// maps to the top-level section the panel indexes); null if it isn't in the
|
|
224
|
-
// aligned editable set (a framework section deco injected).
|
|
225
|
-
var findSection = function(el, out) {
|
|
226
|
-
var node = el;
|
|
227
|
-
var found = null;
|
|
228
|
-
while (node && node !== document.body) {
|
|
229
|
-
if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
|
|
230
|
-
found = node;
|
|
231
|
-
}
|
|
232
|
-
node = node.parentElement;
|
|
233
|
-
}
|
|
234
|
-
if (!found) return null;
|
|
235
|
-
var sections = getAllSections();
|
|
236
|
-
if (out) out.sections = sections;
|
|
237
|
-
return sections.indexOf(found) >= 0 ? found : null;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
// A Lazy wrapper's key is just the loader — show the inner section's instead.
|
|
241
|
-
var LAZY_KEYS = [
|
|
242
|
-
"website/sections/Rendering/Lazy.tsx",
|
|
243
|
-
"website/sections/Rendering/SingleDeferred.tsx"
|
|
244
|
-
];
|
|
245
|
-
var isLazyKey = function(key) {
|
|
246
|
-
return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
|
|
247
|
-
};
|
|
248
|
-
var displayKey = function(section) {
|
|
249
|
-
var key = section.getAttribute("data-manifest-key") || "section";
|
|
250
|
-
if (isLazyKey(key)) {
|
|
251
|
-
var inner = section.querySelector("section[data-manifest-key]");
|
|
252
|
-
if (inner) return inner.getAttribute("data-manifest-key") || key;
|
|
253
|
-
}
|
|
254
|
-
return key;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
// Per-section metadata sent by the editor, aligned by index with
|
|
258
|
-
// getAllSections(). labels: names the DOM can't carry (a global section or a
|
|
259
|
-
// global inside async rendering); kinds: section type that drives the color.
|
|
260
|
-
var sectionLabels = [];
|
|
261
|
-
var sectionKinds = [];
|
|
262
|
-
var labelFor = function(section, sections) {
|
|
263
|
-
var idx = (sections || getAllSections()).indexOf(section);
|
|
264
|
-
if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
|
|
265
|
-
return displayKey(section);
|
|
266
|
-
};
|
|
267
|
-
var kindFor = function(section, sections) {
|
|
268
|
-
var idx = (sections || getAllSections()).indexOf(section);
|
|
269
|
-
return (idx >= 0 && sectionKinds[idx]) || "normal";
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
// Highlight palette by section kind: global = light purple, variant = green,
|
|
273
|
-
// normal = blue.
|
|
274
|
-
var COLORS = {
|
|
275
|
-
normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
|
|
276
|
-
global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
|
|
277
|
-
variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
|
|
278
|
-
};
|
|
279
|
-
var applyColor = function(kind) {
|
|
280
|
-
var c = COLORS[kind] || COLORS.normal;
|
|
281
|
-
highlight.style.outline = "2px solid " + c.solid;
|
|
282
|
-
highlight.style.background = c.bg;
|
|
283
|
-
badge.style.background = c.solid;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
var lastSection = null;
|
|
287
|
-
var lastLabel = "";
|
|
288
|
-
var lastKind = "normal";
|
|
289
|
-
var rafPending = false;
|
|
290
|
-
// True while an in-place render fetch/swap is in flight; suppresses hover so it can't re-show the overlay right before the swap snapshots it.
|
|
291
|
-
var renderPending = false;
|
|
292
|
-
|
|
293
|
-
// Document-relative coordinates (rect + scroll) on absolutely-positioned
|
|
294
|
-
// nodes, so the browser scrolls the highlight together with the page
|
|
295
|
-
// natively — no per-frame JS repositioning, no scroll lag.
|
|
296
|
-
var positionHighlight = function(section) {
|
|
297
|
-
var r = section.getBoundingClientRect();
|
|
298
|
-
var top = r.top + window.scrollY;
|
|
299
|
-
var left = r.left + window.scrollX;
|
|
300
|
-
highlight.style.display = "block";
|
|
301
|
-
highlight.style.top = top + "px";
|
|
302
|
-
highlight.style.left = left + "px";
|
|
303
|
-
highlight.style.width = r.width + "px";
|
|
304
|
-
highlight.style.height = r.height + "px";
|
|
305
|
-
badge.textContent = lastLabel || displayKey(section);
|
|
306
|
-
badge.style.display = "block";
|
|
307
|
-
badge.style.top = Math.max(0, top - 20) + "px";
|
|
308
|
-
badge.style.left = left + "px";
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
var moveHandler = function(e) {
|
|
312
|
-
if (renderPending || rafPending) return;
|
|
313
|
-
rafPending = true;
|
|
314
|
-
var target = e.target;
|
|
315
|
-
requestAnimationFrame(function() {
|
|
316
|
-
rafPending = false;
|
|
317
|
-
if (renderPending) return;
|
|
318
|
-
if (!target || target === highlight || target === badge) return;
|
|
319
|
-
var out = {};
|
|
320
|
-
var section = findSection(target, out);
|
|
321
|
-
if (section === lastSection) return;
|
|
322
|
-
lastSection = section;
|
|
323
|
-
if (!section) {
|
|
324
|
-
highlight.style.display = "none";
|
|
325
|
-
badge.style.display = "none";
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
lastLabel = labelFor(section, out.sections);
|
|
329
|
-
lastKind = kindFor(section, out.sections);
|
|
330
|
-
applyColor(lastKind);
|
|
331
|
-
positionHighlight(section);
|
|
332
|
-
});
|
|
333
|
-
};
|
|
334
|
-
document.addEventListener("mousemove", moveHandler, true);
|
|
335
|
-
|
|
336
|
-
// Window scroll is handled natively by the absolute positioning above; this
|
|
337
|
-
// only re-syncs on resize and on scrolls inside nested scroll containers
|
|
338
|
-
// (capture=true catches those), where document coordinates do shift.
|
|
339
|
-
var reposition = function() {
|
|
340
|
-
if (!lastSection || highlight.style.display === "none") return;
|
|
341
|
-
if (rafPending) return;
|
|
342
|
-
rafPending = true;
|
|
343
|
-
requestAnimationFrame(function() {
|
|
344
|
-
rafPending = false;
|
|
345
|
-
if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
|
|
346
|
-
});
|
|
347
|
-
};
|
|
348
|
-
window.addEventListener("scroll", reposition, { capture: true, passive: true });
|
|
349
|
-
window.addEventListener("resize", reposition, { passive: true });
|
|
350
|
-
|
|
351
|
-
var outHandler = function(e) {
|
|
352
|
-
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
353
|
-
highlight.style.display = "none";
|
|
354
|
-
badge.style.display = "none";
|
|
355
|
-
lastSection = null;
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
document.addEventListener("mouseout", outHandler, true);
|
|
359
|
-
|
|
360
|
-
var clickSeq = 0;
|
|
361
|
-
|
|
362
|
-
// Blocks observes clicks to select sections in the side panel; it must not
|
|
363
|
-
// cancel the iframe page's own handlers or native control behavior.
|
|
364
|
-
var clickHandler = function(e) {
|
|
365
|
-
var target = e.target;
|
|
366
|
-
if (!target || target === highlight || target === badge) return;
|
|
367
|
-
var out = {};
|
|
368
|
-
var section = findSection(target, out);
|
|
369
|
-
if (!section) return;
|
|
370
|
-
|
|
371
|
-
var sectionIndex = out.sections.indexOf(section);
|
|
372
|
-
var manifestKey = section.getAttribute("data-manifest-key") || "";
|
|
373
|
-
|
|
374
|
-
var c = COLORS[lastKind] || COLORS.normal;
|
|
375
|
-
highlight.style.outline = "2px solid " + c.solid;
|
|
376
|
-
highlight.style.background = c.active;
|
|
377
|
-
setTimeout(function() {
|
|
378
|
-
highlight.style.background = c.bg;
|
|
379
|
-
}, 400);
|
|
380
|
-
|
|
381
|
-
clickSeq++;
|
|
382
|
-
window.parent.postMessage({
|
|
383
|
-
type: "cms-editor::section-clicked",
|
|
384
|
-
payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
|
|
385
|
-
}, "*");
|
|
386
|
-
};
|
|
387
|
-
document.addEventListener("click", clickHandler, true);
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Navigation is disabled while editing: leaving the page would leave the
|
|
391
|
-
* panel editing the previous page's sections. Only the default action of a
|
|
392
|
-
* real navigation is cancelled, never propagation — in-page controls must
|
|
393
|
-
* keep working (#5567).
|
|
394
|
-
*/
|
|
395
|
-
var isNavigatingAnchor = function(a) {
|
|
396
|
-
if (!a) return false;
|
|
397
|
-
var href = a.getAttribute("href");
|
|
398
|
-
if (!href) return false;
|
|
399
|
-
var trimmed = href.trim();
|
|
400
|
-
if (!trimmed || trimmed.charAt(0) === "#") return false;
|
|
401
|
-
if (/^javascript:/i.test(trimmed)) return false;
|
|
402
|
-
// Same document + fragment only scrolls.
|
|
403
|
-
try {
|
|
404
|
-
var url = new URL(a.href, location.href);
|
|
405
|
-
if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
|
|
406
|
-
} catch (_) {}
|
|
407
|
-
return true;
|
|
408
|
-
};
|
|
409
|
-
var navBlocker = function(e) {
|
|
410
|
-
var el = e.target;
|
|
411
|
-
var a = el && el.closest ? el.closest("a") : null;
|
|
412
|
-
if (!isNavigatingAnchor(a)) return;
|
|
413
|
-
e.preventDefault();
|
|
414
|
-
};
|
|
415
|
-
document.addEventListener("click", navBlocker, true);
|
|
416
|
-
|
|
417
|
-
var submitBlocker = function(e) { e.preventDefault(); };
|
|
418
|
-
document.addEventListener("submit", submitBlocker, true);
|
|
419
|
-
|
|
420
|
-
// Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
|
|
421
|
-
var renderCtrl = null;
|
|
422
|
-
var renderQueue = Promise.resolve();
|
|
423
|
-
var TRANSITION_TAG =
|
|
424
|
-
"<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
|
|
425
|
-
var renderInPlace = function(src, body) {
|
|
426
|
-
if (renderCtrl) renderCtrl.abort();
|
|
427
|
-
var ctrl = new AbortController();
|
|
428
|
-
renderCtrl = ctrl;
|
|
429
|
-
renderPending = true;
|
|
430
|
-
highlight.style.display = "none";
|
|
431
|
-
badge.style.display = "none";
|
|
432
|
-
window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
|
|
433
|
-
renderQueue = renderQueue.then(function() {
|
|
434
|
-
return fetch(src, {
|
|
435
|
-
method: "POST",
|
|
436
|
-
body: body,
|
|
437
|
-
signal: ctrl.signal,
|
|
438
|
-
headers: { accept: "text/html", "content-type": "application/json" }
|
|
439
|
-
}).then(function(res) {
|
|
440
|
-
if (!res.ok) throw new Error("render " + res.status);
|
|
441
|
-
return res.text();
|
|
442
|
-
}).then(function(html) {
|
|
443
|
-
var swap = function() {
|
|
444
|
-
document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
|
|
445
|
-
document.body.appendChild(highlight);
|
|
446
|
-
document.body.appendChild(badge);
|
|
447
|
-
// Old section is gone; hide the overlay until the next hover repositions it.
|
|
448
|
-
highlight.style.display = "none";
|
|
449
|
-
badge.style.display = "none";
|
|
450
|
-
lastSection = null;
|
|
451
|
-
};
|
|
452
|
-
var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
|
|
453
|
-
var doc = new DOMParser().parseFromString(headHtml, "text/html");
|
|
454
|
-
var sheets = Array.prototype.map.call(
|
|
455
|
-
doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
|
|
456
|
-
function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
|
|
457
|
-
);
|
|
458
|
-
return Promise.all(sheets).then(function() {
|
|
459
|
-
if (typeof document.startViewTransition === "function") {
|
|
460
|
-
return document.startViewTransition(swap).finished;
|
|
461
|
-
}
|
|
462
|
-
swap();
|
|
463
|
-
});
|
|
464
|
-
}).then(function() {
|
|
465
|
-
var t = document.getElementById("deco-disable-transitions");
|
|
466
|
-
if (t) t.remove();
|
|
467
|
-
if (ctrl === renderCtrl) renderPending = false;
|
|
468
|
-
window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
|
|
469
|
-
}).catch(function(err) {
|
|
470
|
-
if (ctrl === renderCtrl) renderPending = false;
|
|
471
|
-
if (err && err.name === "AbortError") return;
|
|
472
|
-
window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
|
|
473
|
-
});
|
|
474
|
-
});
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
window.addEventListener("message", function(e) {
|
|
478
|
-
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
|
|
479
|
-
if (e.source !== window.parent) return;
|
|
480
|
-
if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
|
|
481
|
-
renderInPlace(e.data.src, e.data.body);
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
|
|
485
|
-
sectionLabels = e.data.labels;
|
|
486
|
-
if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
|
|
487
|
-
if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
|
|
488
|
-
if (lastSection) {
|
|
489
|
-
lastLabel = labelFor(lastSection);
|
|
490
|
-
lastKind = kindFor(lastSection);
|
|
491
|
-
applyColor(lastKind);
|
|
492
|
-
if (highlight.style.display !== "none") positionHighlight(lastSection);
|
|
493
|
-
}
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
497
|
-
if (e.data && e.data.type === "cms-editor::clear-hover") {
|
|
498
|
-
highlight.style.display = "none";
|
|
499
|
-
badge.style.display = "none";
|
|
500
|
-
lastSection = null;
|
|
501
|
-
return;
|
|
502
|
-
}
|
|
503
|
-
if (e.data && e.data.type === "cms-editor::deactivate") {
|
|
504
|
-
highlight.remove();
|
|
505
|
-
badge.remove();
|
|
506
|
-
document.removeEventListener("mousemove", moveHandler, true);
|
|
507
|
-
document.removeEventListener("mouseout", outHandler, true);
|
|
508
|
-
document.removeEventListener("click", clickHandler, true);
|
|
509
|
-
// Or the page stays unnavigable after leaving Blocks mode.
|
|
510
|
-
document.removeEventListener("click", navBlocker, true);
|
|
511
|
-
document.removeEventListener("submit", submitBlocker, true);
|
|
512
|
-
window.removeEventListener("scroll", reposition, { capture: true });
|
|
513
|
-
window.removeEventListener("resize", reposition);
|
|
514
|
-
window.__cmsEditorActive = false;
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
|
-
})();`;function Jt(t,e){let n=t,r=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const l=u.__resolveType;if(typeof l=="string"&&l&&l!==r){n=u,r=l;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(n.variants)?n.variants:[];if(i.length===0||i.every(c=>c?.rule?.__resolveType===vr))return null;const l=[];for(const c of i){const o=c?.value;if(o&&typeof o=="object")for(const d of Jt(o,e)??[])l.includes(d)||l.push(d)}return l}if(br(r)){const i=n.section&&typeof n.section=="object"?Jt(n.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Ue(t){return t.replace(/[`*_]/g,"\\$&")}function va(t,e){const n=[`The user selected an element on the live preview and asked: **"${Ue(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&n.push(`**Section resolveType:** \`${Ue(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${Ue(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Ue(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Ue(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Ue(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",i,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
|
|
518
|
-
`)}function ba(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),m=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:m/o*100}}function xa(t){const e=pe.c(45),{element:n,onDismiss:r}=t,[i,u]=x.useState(""),l=x.useRef(null),{sendMessage:c}=Ys(),{openSidePanel:o}=Gr(),d=Te();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const $=va(n,i);o(),c({parts:[{type:"text",text:$}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const m=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=ba(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const j=p,g=`${j.leftPct}%`,E=`${j.topPct}%`;let b;e[9]!==g||e[10]!==E?(b={left:g,top:E,width:"320px"},e[9]=g,e[10]=E,e[11]=b):b=e[11];let w;e[12]!==m?(w=$=>{$.preventDefault(),m()},e[12]=m,e[13]=w):w=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=$=>u($.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=$=>{$.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let v;e[17]!==d?(v=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=v):v=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==v?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:v,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=v,e[22]=k):k=e[22];let P;e[23]!==i?(P=i.trim(),e[23]=i,e[24]=P):P=e[24];const D=!P;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let V;e[27]!==d?(V=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=V):V=e[28];let I;e[29]!==V?(I=s.jsx("title",{children:V}),e[29]=V,e[30]=I):I=e[30];let B;e[31]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=B):B=e[31];let L;e[32]!==I?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[I,B]}),e[32]=I,e[33]=L):L=e[33];let O;e[34]!==D||e[35]!==S||e[36]!==L?(O=s.jsx("button",{type:"submit",disabled:D,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=D,e[35]=S,e[36]=L,e[37]=O):O=e[37];let U;e[38]!==k||e[39]!==O||e[40]!==w?(U=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:w,children:[k,O]}),e[38]=k,e[39]=O,e[40]=w,e[41]=U):U=e[41];let _;return e[42]!==U||e[43]!==b?(_=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:U}),e[42]=U,e[43]=b,e[44]=_):_=e[44],_}const An="site-links",ya=/details?page|\bpdp\b/i,wa=/listingpage|\bplp\b/i;function ka(t,e,n){const r=new Set;for(const c of n)ya.test(c)&&r.add("product"),wa.test(c)&&r.add("category");const i=at(Zt(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const Pa=["rosa","preto","pink","black"];function yt(t,e){const n=e.trim();return n?t(n):Pa.flatMap(r=>t(r))}function Sa(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const ls=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function nn(t){return t.split("/")[0]??""}function ja(t){const e=new Set;for(const n of t){const r=nn(n);ls.has(r)&&e.add(r)}return e}function Ea(t,e){const n=nn(t);return!ls.has(n)||e.size===0?!0:e.has(n)}const Na=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>yt(n=>Sa(t,n),e),optionsFromPayload:wt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:Aa}];function Ta(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of Na){if(d.kind!==c)continue;const h=r.find(m=>d.test(m)&&Ea(m,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(nn(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(Ca(t.has("category")?"category":"product")),l}function Ca(t){return{kind:t,id:An,resolveType:An,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Da(e,n)}}function Me(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Ra(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Me(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Me(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function cs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ds(t){try{return decodeURIComponent(t)}catch{return t}}function La(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oa(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=La(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function us(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=at(Zt(e)),{pattern:u,order:l}=Oa(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ds(d):null}function wt(t,e){const n=Me(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Me(l);if(!c)continue;const o=us(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Me(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,m=Array.isArray(c.image)?Me(c.image[0]):null,p=typeof m?.url=="string"?m.url:void 0;i.push({value:o,label:h,image:p})}return i}function _a(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?ds(n):null}function Aa(t){const e=[],n=new Set,r=(i,u)=>{const l=Me(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=_a(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const Ba=new Set(["login","logout","signin","sign-in","signup","sign-up","register","account","myaccount","my-account","minha-conta","conta","cart","carrinho","checkout","wishlist","favoritos","favorites","orders","pedidos","help","hc","sac","atendimento","contato","contact","institucional","newsletter","customer","sales","catalogsearch","search","busca","privacy-policy-cookie-restriction-mode"]);function $a(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function Fa(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Ma(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Da(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=us(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&Ba.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:$a(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Ma(t))i(u,l,"product",c);for(const{href:u,text:l}of Fa(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function et(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const ms=1e4;function Ka(t){return{product:{noun:t("sandbox.pathParamPickerChip.kindProductNoun"),heading:t("sandbox.pathParamPickerChip.kindProductHeading")},category:{noun:t("sandbox.pathParamPickerChip.kindCategoryNoun"),heading:t("sandbox.pathParamPickerChip.kindCategoryHeading")}}}async function za(t,{resolveType:e,props:n}){const r=await fetch(Er(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(ms)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Bn(t,e){const n=await fetch(Nr(t,e),{signal:AbortSignal.timeout(ms)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Ia(t,e,n){const r=e.optionsFromPayload(await Bn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=Be(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Bn(t,u),n).filter(c=>c.kind==="product");return cs([r,l])}catch{return r}}function Ua(t,e,n){return zs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Ha(t,e,n,r){if(e.homepageLinks)return Ia(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>za(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return cs(l.map(c=>e.optionsFromPayload(c,r)))}function Yt(t,e,n,r,i){return{queryKey:Ua(t,e,n),queryFn:()=>Ha(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function tt(t){const e=pe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let m;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(m=p=>s.jsxs(rt,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(Jn,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Be(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=m):m=e[12],d=i.map(m),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(st,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function $n(t){const e=pe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Va(t){const e=pe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Te(),[d,h]=x.useState(!1),[m,p]=x.useState(""),[j,g]=x.useState(""),E=x.useRef(null),b=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,w=Ka(o),y=[...new Set(n.map(R=>w[R.kind].noun))].join(" or ");let v;e[0]!==o||e[1]!==y?(v=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=v):v=e[2];const k=v,P={template:r,paramName:i};let D;e[3]!==m?(D=(R,G)=>({source:R,query:G,options:R.clientFilter?et(G.data??[],m):G.data??[]}),e[3]=m,e[4]=D):D=e[4];const S=D,V=n.filter(Za),I=n.filter(Xa),B=Gt({queries:V.map(R=>Yt(l,R,j,P,d))});let L;e[5]!==B||e[6]!==S?(L=(R,G)=>S(R,B[G]),e[5]=B,e[6]=S,e[7]=L):L=e[7];const O=V.map(L),U=O.length===0||O.every(Qa),_=Gt({queries:I.map(R=>Yt(l,R,j,P,d&&U))});let $;e[8]!==_||e[9]!==S?($=(R,G)=>S(R,_[G]),e[8]=_,e[9]=S,e[10]=$):$=e[10];const Q=I.map($),J=U?Q:O,q=J.length===1&&J[0]?.source.homepageLinks?J[0]:null,C=q&&!q.query.isLoading&&!q.query.isError?q?.query.data??[]:[],F=et(C.filter(Ya),m),K=et(C.filter(Ja),m),Z=F.length>0&&K.length>0,Y=R=>{h(R),E.current&&clearTimeout(E.current),p(R?u:""),g(R?u:"")};let he;e[11]===Symbol.for("react.memo_cache_sentinel")?(he=R=>{p(R),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{g(R)},300)},e[11]=he):he=e[11];const ne=he,z=R=>{c(R),Y(!1)},te=ts(m),xe=Be(r,{[i]:te}),le=Un,fe=In,ye="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ve=Ga;let re;e[12]!==b||e[13]!==o?(re=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=o,e[14]=re):re=e[14];let ee;e[15]!==re?(ee=s.jsx(Hn,{className:"sr-only",children:s.jsx(Vn,{children:re})}),e[15]=re,e[16]=ee):ee=e[16];let ce;e[17]===Symbol.for("react.memo_cache_sentinel")?(ce=s.jsx(Jn,{size:16,className:"shrink-0 text-foreground"}),e[17]=ce):ce=e[17];let se;e[18]!==o?(se=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=se):se=e[19];let ae;e[20]!==b?(ae=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:b}),e[20]=b,e[21]=ae):ae=e[21];let de;e[22]!==se||e[23]!==ae?(de=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[ce,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[se," ",ae]})]}),e[22]=se,e[23]=ae,e[24]=de):de=e[24];const ge=Qn,jt=!1,it="min-h-0 flex-1";let ie;e[25]!==k||e[26]!==m?(ie=s.jsx(Xn,{autoFocus:!0,placeholder:k,value:m,onValueChange:ne}),e[25]=k,e[26]=m,e[27]=ie):ie=e[27];const je=Yn,Ve="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Ee;e[28]!==o?(Ee=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=Ee):Ee=e[29];let we;e[30]!==Ee?(we=s.jsx(Zn,{children:Ee}),e[30]=Ee,e[31]=we):we=e[31];const qe=te&&s.jsx(st,{className:"shrink-0",children:s.jsxs(rt,{value:`__raw__:${te}`,className:"gap-3 py-2",onSelect:()=>z(te),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(Yr,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:te,paramLabel:b})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:xe})]})]})}),Ce=Z?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(tt,{heading:w.category.heading,iconKind:"category",options:F,template:r,paramName:i,keyPrefix:`${q?.source.id}:cat`,onSelect:z})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(tt,{heading:w.product.heading,iconKind:"product",options:K,template:r,paramName:i,keyPrefix:`${q?.source.id}:prod`,onSelect:z})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:J.map(R=>{const{source:G,query:We,options:ot}=R,{noun:Ge}=w[G.kind];if(We.isLoading)return s.jsx($n,{text:o("sandbox.pathParamPickerChip.loading",{noun:Ge})},G.id);if(We.isError)return s.jsx($n,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},G.id);if(G.homepageLinks){const Je=We.data??[];return s.jsxs(x.Fragment,{children:[s.jsx(tt,{heading:w.category.heading,iconKind:"category",options:et(Je.filter(Wa),m),template:r,paramName:i,keyPrefix:`${G.id}:cat`,onSelect:z}),s.jsx(tt,{heading:w.product.heading,iconKind:"product",options:et(Je.filter(qa),m),template:r,paramName:i,keyPrefix:`${G.id}:prod`,onSelect:z})]},G.id)}return s.jsx(tt,{heading:J.length>1?w[G.kind].heading:void 0,iconKind:G.kind,options:ot,template:r,paramName:i,keyPrefix:G.id,onSelect:z},G.id)})});let Re;e[32]!==je||e[33]!==we||e[34]!==qe||e[35]!==Ce?(Re=s.jsxs(je,{className:Ve,children:[we,qe,Ce]}),e[32]=je,e[33]=we,e[34]=qe,e[35]=Ce,e[36]=Re):Re=e[36];let Le;e[37]!==ge||e[38]!==ie||e[39]!==Re?(Le=s.jsxs(ge,{shouldFilter:jt,className:it,children:[ie,Re]}),e[37]=ge,e[38]=ie,e[39]=Re,e[40]=Le):Le=e[40];let Oe;e[41]!==fe||e[42]!==ee||e[43]!==de||e[44]!==Le||e[45]!==ve?(Oe=s.jsxs(fe,{className:ye,onClick:ve,children:[ee,de,Le]}),e[41]=fe,e[42]=ee,e[43]=de,e[44]=Le,e[45]=ve,e[46]=Oe):Oe=e[46];let W;return e[47]!==le||e[48]!==Y||e[49]!==d||e[50]!==Oe?(W=s.jsx(le,{open:d,onOpenChange:Y,children:Oe}),e[47]=le,e[48]=Y,e[49]=d,e[50]=Oe,e[51]=W):W=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:R=>{R.stopPropagation(),Y(!0)},children:u||b}),W]})}function qa(t){return t.kind==="product"}function Wa(t){return t.kind!=="product"}function Ga(t){return t.stopPropagation()}function Ja(t){return t.kind==="product"}function Ya(t){return t.kind!=="product"}function Qa(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Xa(t){return t.isFallback}function Za(t){return!t.isFallback}function ei(t){const e=pe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const j={template:r,paramName:i},g=n.filter(ti);o=Gt,c=g.map(E=>Yt(u,E,"",j,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[m,p]=x.useState(!1);if(!m)for(const j of h){if(j.isLoading)break;const g=j.data?.[0];if(g){p(!0),queueMicrotask(()=>l(g.value));break}}return null}function ti(t){return!t.isFallback}function ni(t){const e=pe.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[l,c]=x.useState(r),[o,d]=x.useState(!1),h=x.useRef(!1);let m;e[0]!==n||e[1]!==u?(m=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=m):m=e[2];const p=m,j=l||p;let g;e[3]!==j?(g=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:j}),e[3]=j,e[4]=g):g=e[4];let E;e[5]!==p||e[6]!==u?(E=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=E):E=e[7];let b,w;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=S=>c(S.target.value),w=()=>d(!0),e[8]=b,e[9]=w):(b=e[8],w=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=ts(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let v;e[16]!==l||e[17]!==p||e[18]!==E||e[19]!==N||e[20]!==y?(v=s.jsx("input",{type:"text",value:l,placeholder:p,title:E,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:si,onChange:b,onFocus:w,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=E,e[19]=N,e[20]=y,e[21]=v):v=e[21];let k;e[22]!==g||e[23]!==v?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,v]}),e[22]=g,e[23]=v,e[24]=k):k=e[24];let P;e[25]!==o||e[26]!==u?(P=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(er,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=P):P=e[27];let D;return e[28]!==P||e[29]!==k?(D=s.jsxs(s.Fragment,{children:[k,P]}),e[28]=P,e[29]=k,e[30]=D):D=e[30],D}function si(t){return t.stopPropagation()}function ri(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function ai(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function ii(t){const e=pe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=ss(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Tr(l),h=o?{...o,name:l,path:c}:Cr(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Is(i)}function oi(t){const e=pe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Te();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[m,p]=x.useState(h);let j;e[2]!==d?(j=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=j):j=e[3];const[g,E]=x.useState(j),[b,w]=x.useState(Ut),[N,y]=x.useState(null),[v,k]=x.useState(n);n!==v&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),E(d("sectionsEditor.createPageModal.defaultPagePath")),w(Ut),y(null)));const P=!!l?.length;let D;e[4]!==o||e[5]!==r?(D=se=>{!se&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=D):D=e[6];const S=D;let V;e[7]!==o||e[8]!==m||e[9]!==c||e[10]!==g||e[11]!==P||e[12]!==b?(V=async se=>{se.preventDefault();const ae=m.trim(),de=g.trim();if(!ae||!de||o)return;const ge=ns(de);if(ge){y(ge);return}y(null),await c({name:ae,path:de,templateKey:P&&b!==Ut?b:null})},e[7]=o,e[8]=m,e[9]=c,e[10]=g,e[11]=P,e[12]=b,e[13]=V):V=e[13];const I=V,B=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let O;e[16]!==L?(O=s.jsx(Hn,{children:s.jsx(Vn,{children:L})}),e[16]=L,e[17]=O):O=e[17];let U;e[18]!==d?(U=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=U):U=e[19];let _;e[20]!==U?(_=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:U}),e[20]=U,e[21]=_):_=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=se=>p(se.target.value),e[22]=$):$=e[22];let Q;e[23]!==d?(Q=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=Q):Q=e[24];let J;e[25]!==o||e[26]!==m||e[27]!==Q?(J=s.jsx(Pn,{id:"new-page-name",value:m,onChange:$,placeholder:Q,autoFocus:!0,disabled:o}),e[25]=o,e[26]=m,e[27]=Q,e[28]=J):J=e[28];let q;e[29]!==J||e[30]!==_?(q=s.jsxs("div",{className:"space-y-1.5",children:[_,J]}),e[29]=J,e[30]=_,e[31]=q):q=e[31];let X;e[32]!==d?(X=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=X):X=e[33];let C;e[34]!==X?(C=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:X}),e[34]=X,e[35]=C):C=e[35];let F;e[36]===Symbol.for("react.memo_cache_sentinel")?(F=se=>E(se.target.value),e[36]=F):F=e[36];let K;e[37]!==d?(K=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=K):K=e[38];let Z;e[39]!==o||e[40]!==g||e[41]!==K?(Z=s.jsx(Pn,{id:"new-page-path",value:g,onChange:F,placeholder:K,disabled:o}),e[39]=o,e[40]=g,e[41]=K,e[42]=Z):Z=e[42];let Y;e[43]!==C||e[44]!==Z?(Y=s.jsxs("div",{className:"space-y-1.5",children:[C,Z]}),e[43]=C,e[44]=Z,e[45]=Y):Y=e[45];let he;e[46]!==o||e[47]!==P||e[48]!==d||e[49]!==b||e[50]!==l?(he=P&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(Rr,{id:"new-page-template",value:b,onChange:w,templates:l??[],disabled:o})]}),e[46]=o,e[47]=P,e[48]=d,e[49]=b,e[50]=l,e[51]=he):he=e[51];let ne;e[52]!==B?(ne=B&&s.jsx("p",{className:"text-xs text-destructive",children:B}),e[52]=B,e[53]=ne):ne=e[53];let z;e[54]!==q||e[55]!==Y||e[56]!==he||e[57]!==ne?(z=s.jsxs("div",{className:"space-y-4 py-4",children:[q,Y,he,ne]}),e[54]=q,e[55]=Y,e[56]=he,e[57]=ne,e[58]=z):z=e[58];let te;e[59]!==r?(te=()=>r(!1),e[59]=r,e[60]=te):te=e[60];let xe;e[61]!==d?(xe=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=xe):xe=e[62];let le;e[63]!==o||e[64]!==te||e[65]!==xe?(le=s.jsx(De,{type:"button",variant:"outline",onClick:te,disabled:o,children:xe}),e[63]=o,e[64]=te,e[65]=xe,e[66]=le):le=e[66];let fe;e[67]!==o||e[68]!==m||e[69]!==g?(fe=!m.trim()||!g.trim()||o,e[67]=o,e[68]=m,e[69]=g,e[70]=fe):fe=e[70];let ye;e[71]!==o||e[72]!==d?(ye=o?s.jsxs(s.Fragment,{children:[s.jsx(Pt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=ye):ye=e[73];let ve;e[74]!==fe||e[75]!==ye?(ve=s.jsx(De,{type:"submit",disabled:fe,children:ye}),e[74]=fe,e[75]=ye,e[76]=ve):ve=e[76];let re;e[77]!==le||e[78]!==ve?(re=s.jsxs(Us,{children:[le,ve]}),e[77]=le,e[78]=ve,e[79]=re):re=e[79];let ee;e[80]!==I||e[81]!==z||e[82]!==re||e[83]!==O?(ee=s.jsx(In,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:I,children:[O,z,re]})}),e[80]=I,e[81]=z,e[82]=re,e[83]=O,e[84]=ee):ee=e[84];let ce;return e[85]!==S||e[86]!==n||e[87]!==ee?(ce=s.jsx(Un,{open:n,onOpenChange:S,children:ee}),e[85]=S,e[86]=n,e[87]=ee,e[88]=ce):ce=e[88],ce}function li(t){const e=pe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Te();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const m=ss(h);let p;e[4]!==m?(p=_r((k,P)=>m.mutate({blockKey:k,data:P})),e[4]=m,e[5]=p):p=e[5];const j=p;let g;e[6]!==o||e[7]!==c?(g=Lr(c,o),e[6]=o,e[7]=c,e[8]=g):g=e[8];const{resolveType:E,props:b,title:w}=g;if(!E){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let P;return e[11]!==k?(P=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=P):P=e[12],P}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==E||e[15]!==w?(y={mode:"saved",blockKey:o,resolveType:E,title:w},e[13]=o,e[14]=E,e[15]=w,e[16]=y):y=e[16];let v;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==b||e[23]!==m.isPending||e[24]!==j||e[25]!==N||e[26]!==y||e[27]!==r?(v=s.jsx(Or,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:b,isCreating:m.isPending,onCreate:ci,onSaveReferencedBlock:j,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=b,e[23]=m.isPending,e[24]=j,e[25]=N,e[26]=y,e[27]=r,e[28]=v):v=e[28],v}async function ci(){}function di(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Fn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:di(t.error)}}function ui(t){switch(t){case"clone-failed":case"install-failed":case"start-failed":return"terminal-error";case"idle":case"cloning":return"booting";case"checking-out":case"installing":case"starting":case"running":case"crashed":return"snapshot-readable"}}function mi(t){if(t.fastPreviewActive)return t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData?{kind:"error",source:"data"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"};const e=ui(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const fi="https://github.com/decocms/blocks";function pi(){const t=pe.c(14),e=Te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(tr,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(qn,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(De,{size:"sm",asChild:!0,children:s.jsxs("a",{href:fi,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(tn,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function hi(t){const e=pe.c(15),{source:n,onRetry:r}=t,i=Te();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qr,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(De,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let m;return e[11]!==l||e[12]!==o||e[13]!==h?(m=s.jsx(tn,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=m):m=e[14],m}const gi=x.lazy(()=>Hs(()=>import("./sections-editor-DrNkE-5_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=Qt(),{currentBranch:c,taskId:o}=St(),d=is(),h=Xt(),m=os(),p=d.lifecycle.phase==="running",j=h.previewUrl;let g;e[0]!==c||e[1]!==l||e[2]!==j||e[3]!==o||e[4]!==n?(g=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:j}:null,e[0]=c,e[1]=l,e[2]=j,e[3]=o,e[4]=n,e[5]=g):g=e[5];const E=g;let b;e[6]!==p?(b={fetchEnabled:p},e[6]=p,e[7]=b):b=e[7];const w=en(E,b);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=rs(E,N),v=mi({lifecyclePhase:d.lifecycle.phase,decofile:Fn(w),meta:Fn(y),hasEditableContent:xr(w.data,y.data),fastPreviewActive:es(n).runtime==="cms"}),k=vi;if(v.kind==="loading"){let C;return e[10]===Symbol.for("react.memo_cache_sentinel")?(C=k(s.jsx(Vs,{})),e[10]=C):C=e[10],C}if(v.kind==="empty"){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=k(s.jsx(pi,{})),e[11]=C):C=e[11],C}if(v.kind==="error"){let C;e[12]!==w||e[13]!==h||e[14]!==y||e[15]!==v.source?(C=()=>{if(v.source==="sandbox"){h.retry();return}Promise.all([w.refetch(),y.refetch()])},e[12]=w,e[13]=h,e[14]=y,e[15]=v.source,e[16]=C):C=e[16];const F=C;let K;return e[17]!==F||e[18]!==v.source?(K=k(s.jsx(hi,{source:v.source,onRetry:F})),e[17]=F,e[18]=v.source,e[19]=K):K=e[19],K}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=C=>k(s.jsx("div",{className:"h-full min-h-0",children:C})),e[20]=P):P=e[20];const D=P,S=m.state.target;if(S?.kind==="loader"&&w.data&&y.data){const C=c??"",F=j??null;let K;return e[21]!==w.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==C||e[25]!==F||e[26]!==S.key||e[27]!==n?(K=D(s.jsx(li,{orgSlug:l.slug,virtualMcpId:n,branch:C,previewUrl:F,meta:y.data,decofile:w.data,blockKey:S.key})),e[21]=w.data,e[22]=y.data,e[23]=l.slug,e[24]=C,e[25]=F,e[26]=S.key,e[27]=n,e[28]=K):K=e[28],K}let V;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(V=S||!c?null:Wn(Gn(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=V):V=e[33];const I=V;let B="/",L=null,O=null;S?.kind==="page"?(B=S.path,L=S.key):S?.kind==="section"?O=S.key:I&&(B=I.path,L=I.pageKey);const U=L?`page:${L}`:O?`section:${O}`:`path:${B}`;let _;e[34]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(Pt,{className:"size-5 text-muted-foreground"})}),e[34]=_):_=e[34];const $=c??"",Q=j??void 0,J=O?null:u,q=!!L&&m.state.editSeoPageKey===L;let X;return e[35]!==O||e[36]!==L||e[37]!==B||e[38]!==U||e[39]!==i||e[40]!==l.slug||e[41]!==J||e[42]!==q||e[43]!==$||e[44]!==Q||e[45]!==n||e[46]!==m.consumeEditSeo||e[47]!==m.setFocusedBlock||e[48]!==m.setVariantOverride?(X=D(s.jsx(x.Suspense,{fallback:_,children:s.jsx(gi,{orgSlug:l.slug,virtualMcpId:n,branch:$,previewReady:!0,previewUrl:Q,currentPath:B,activePageBlockKey:L,activeGlobalBlockKey:O,externalSelection:J,initialEditSeo:q,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:i},U)})),e[35]=O,e[36]=L,e[37]=B,e[38]=U,e[39]=i,e[40]=l.slug,e[41]=J,e[42]=q,e[43]=$,e[44]=Q,e[45]=n,e[46]=m.consumeEditSeo,e[47]=m.setFocusedBlock,e[48]=m.setVariantOverride,e[49]=X):X=e[49],X}function vi(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Dn(t){const e=pe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Te(),c=Zr(),o=Ar(n);let d;e[0]!==o||e[1]!==r?(d=Br(o,ea(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:m}=Qt(),{currentBranch:p,taskId:j}=St(),E=Xt().previewUrl;let b;e[3]!==p||e[4]!==m.slug||e[5]!==E||e[6]!==j||e[7]!==n?(b=p?{orgSlug:m.slug,virtualMcpId:n,branch:p,threadId:j??null,previewUrl:E}:null,e[3]=p,e[4]=m.slug,e[5]=E,e[6]=j,e[7]=n,e[8]=b):b=e[8];const N=en(b),y=p??"";let v;e[9]!==m.slug||e[10]!==y||e[11]!==n?(v={orgSlug:m.slug,virtualMcpId:n,branch:y},e[9]=m.slug,e[10]=y,e[11]=n,e[12]=v):v=e[12];const{save:k,flush:P}=$r(v),D=N.data?.[r],S=N.data===void 0&&N.isLoading,V=N.data!==void 0&&D===void 0,I=!p||V||S;let B;e[13]!==D?(B=D===void 0?"":JSON.stringify(D,null,2),e[13]=D,e[14]=B):B=e[14];const L=B;let O;e[15]!==r||e[16]!==I||e[17]!==k?(O=q=>{if(I)return;let X;try{X=JSON.parse(q)}catch{return}X===null||typeof X!="object"||Array.isArray(X)||k(r,X)},e[15]=r,e[16]=I,e[17]=k,e[18]=O):O=e[18];const U=O;let _;e[19]!==P?(_=()=>({flush:P}),e[19]=P,e[20]=_):_=e[20],x.useImperativeHandle(u,_);let $;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?($=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(De,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(qs,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=$):$=e[25];let Q;e[26]!==N.data||e[27]!==P||e[28]!==L||e[29]!==S||e[30]!==V||e[31]!==r||e[32]!==I||e[33]!==U||e[34]!==l?(Q=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(Pt,{className:"size-5 text-muted-foreground"})}):V?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Xr,{code:L,language:"json",readOnly:I,height:"100%",onChange:q=>U(q??""),onSave:q=>{U(q),P()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=P,e[28]=L,e[29]=S,e[30]=V,e[31]=r,e[32]=I,e[33]=U,e[34]=l,e[35]=Q):Q=e[35];let J;return e[36]!==$||e[37]!==Q?(J=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[$,Q]}),e[36]=$,e[37]=Q,e[38]=J):J=e[38],J}function fs(t){return t.contentEditingEnabled&&!t.isMobile}function bi(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function xi(t,e){return t==="blocks"?"preview":e?"blocks":t}function yi(t){return fs({contentEditingEnabled:as(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function wi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const ki=500,Pi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Kn=1,qt=["desktop","mobile","tablet"],zn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Si(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function nt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Wt(t,e){try{return new URL(t,e).href}catch{return null}}function ji(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function Ei(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Ni(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function Ti(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ci({virtualMcpId:t}){const e=Te(),n=jr(),{currentBranch:r,taskId:i,virtualMcpId:u}=St(),l=os(),c=fr(u===t?t:null),o=es(t),d=ta(c?.metadata?.ui?.layout??null),h=as(d),m=fs({contentEditingEnabled:h,isMobile:n}),[p,j]=x.useState(()=>yi({cmsMode:d,isMobile:n})),[g,E]=x.useState("desktop"),[b,w]=x.useState(null),[N,y]=x.useState(null),v=x.useRef(null),k=x.useRef(null),[P,D]=x.useState(!1),S=x.useRef(null),V=()=>{S.current?.flush(),D(!1)},I=()=>D(a=>(a&&S.current?.flush(),!a)),[B,L]=x.useState({width:0,height:0}),[O,U]=x.useState(!1),[_,$]=x.useState(""),Q=x.useRef(null),[J,q]=x.useState(!1),[X,C]=x.useState(),[F,K]=x.useState(null),[Z,Y]=x.useState(null),[he,ne]=x.useState(null),[z,te]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[xe,le]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[fe,ye]=x.useState({}),[ve,re]=x.useState(!1),ee=x.useRef(null),ce=()=>{re(!0),ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>re(!1),15e3)},se=()=>{ee.current&&(clearTimeout(ee.current),ee.current=null),re(!1)},{org:ae}=Qt(),de=is(),ge=Xt(),jt=ge.vmEntry,it=de.lifecycle.phase,{url:ie}=yr(t),je=ie??ge.previewUrl,Ve=!!ie||it==="running",Ee=c?.id===t?gr(c.metadata):null,we=!ie&&c?.id===t&&o.runtime==="cms",qe=o.projectDefault==="cms",Ce=Ir({sandboxUrl:je,previewServerUrl:Ee,fastPreviewActive:we}),Re=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:je}:null,Le=en(Re,{fetchEnabled:Ve}),Oe=rs(Re,{fetchEnabled:Ve}),W=Le.data,R=Oe.data,G=W?wr(W).sort((a,f)=>a.name.localeCompare(f.name)):[],We=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r}:null,ot=ii(We),Ge=W&&R?kr(W,R):[],Je=W&&R?Fr(R,W,"loaders"):[],sn=_?(()=>{const a=_.toLowerCase();return G.map(f=>({page:f,score:Ni(f.name,f.path,a)})).filter(({score:f})=>f>0).sort((f,T)=>T.score-f.score||f.page.path.length-T.page.path.length).map(({page:f})=>f)})():G,rn=Ge.filter(a=>{if(!_)return!0;const f=_.toLowerCase();return a.name.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),an=m?Je:[],on=an.filter(a=>{if(!_)return!0;const f=_.toLowerCase();return a.title.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),lt=Z?Je.find(a=>a.key===Z)??null:null,Ne=Zt,Et=F||Z?null:Pr(G,z,xe),H=Et?.key??null,Ke=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??H,ct=Et?.path??null,ze=(H?fe[H]:void 0)??{},be=Be(z,ze),Nt={};if(Ve&&je&&R&&W){const a=Mr(R,"loaders"),f=H?W[H]:void 0,T=Ra(f,W,oe=>a.has(oe)),A=ja(T);for(const oe of at(z)){if(oe.type!=="param")continue;const Ae=ka(z,oe.name,T),Pe=Ta(Ae,a,A);Pe.length>0&&(Nt[oe.name]=Pe)}}const dt=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,ln=W&&H?Sr(W,H,0):[],cn=W?Dr(ln,W):[],Tt=cn.map(a=>a.isSavedBlock?a.label:""),Ct=cn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Rt=ln.map(a=>Jt(a,W??{})),dn=x.useRef(null),ke=x.useRef(null),ps=de.status.state==="paused",Lt=de.phase,un=Kr({claimPhase:Lt,lifecycle:de.lifecycle}),$e=ge.previewState,hs=ge.userStopped,gs=Wr(ae.slug,t??"",r??""),{url:Fe}=qr(we&&t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,previewServerUrl:Ee??null,path:be}:null),vs=qe&&o.runtime==="sandbox",M=la({previewState:$e,progressStatus:un.status,previewServerUrl:Ee,fastPreviewActive:we,fastPreviewReady:!!Fe,codingSession:vs,localPreviewUrl:ie}),ut=M.mode!=="none",bs=M.mode==="production"&&M.iframeBase?nt(M.iframeBase):null,Ie=M.mode==="production"?bs:nt(je),xs=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Ye=ie?M.mode==="sandbox"&&m&&p==="blocks":M.mode==="production"&&we&&xs&&m&&p==="blocks",mn=x.useRef(null),{pin:ys,effective:ws}=ji(mn.current,{inPlaceRenderActive:Ye,draftPreviewUrl:Fe,resolvedPath:be});mn.current=ys;const _e=Si(M.mode==="sandbox"?bt(Cn(he??Wt(be,M.iframeBase)??M.iframeBase,g),l.state.variantOverride??[]):M.mode==="production"?bt(Cn(Ur(he??ws??Wt(be,M.iframeBase)??M.iframeBase,M.showWakingPill?Hr:null),g),l.state.variantOverride??[]):null),fn=Fe??(M.iframeBase?Wt(be,M.iframeBase):null),ks=M.mode==="production"?fn?bt(fn,l.state.variantOverride??[]):null:_e??M.iframeBase,Ps=()=>{const a=ks;a&&window.open(a,"_blank","noopener")},Qe=t&&r?Gn(ae.slug,t,r):null,Xe=a=>{Qe&&Xs(Qe,a)},ue=l.state.target;x.useEffect(()=>{if(!(!ue||!Ce||!R))if(ue.kind==="page"){const a=fe[ue.key]??{};ke.current=Be(ue.path,a),K(null),Y(null),ne(null),le(ue.key),te(ue.path),Xe({path:ue.path,pageKey:ue.key,params:a})}else if(ue.kind==="loader")ke.current=null,K(null),Y(ue.key),ne(null);else{const a=Ge.find(f=>f.key===ue.key);if(a){ke.current=null;const f=Nn(R);Y(null),K(a),ne(Tn(Ce,f,a.key))}}},[ue,Ce,R,fe]),x.useEffect(()=>{!H||ct===null||ue?.kind==="page"&&ue.key===H&&ue.path===ct||l.selectTarget({kind:"page",key:H,path:ct})},[H,ct,ue]);const[pn,Ss]=x.useState(null);if($e.kind==="iframe"&&pn!==$e.previewUrl){const a=pn!==null;Ss($e.previewUrl);const f=Qe?Wn(Qe):null;if(f){if(ke.current=Be(f.path,f.params),te(f.path),le(f.pageKey),ne(null),K(null),Y(null),f.pageKey&&Object.keys(f.params).length>0){const T=f.pageKey;ye(A=>({...A,[T]:f.params}))}}else a&&(ke.current=null,te("/"),ne(null),le(null),K(null),Y(null))}dn.current=_e;const hn=ma({iframeRef:v,src:M.mode==="sandbox"?_e:null,active:M.mode==="sandbox"}),gn=x.useRef(null);x.useEffect(()=>{if(!Fe||!_e||gn.current===Fe)return;gn.current=Fe;const a=v.current;a&&a.getAttribute("src")!==_e&&(ce(),a.src=_e)},[Fe,_e]);const vn=()=>{const a=v.current?.contentWindow,f=Ie;if(!a||!f||!W||!H)return;const T=W[H];if(!T||typeof T!="object")return;const A=Vr({previewBaseUrl:f,pageBlock:T,decofile:W,path:be,pathTemplate:z});if(!A)return;const oe=bt(A.src,zr(l.state.variantOverride??[],H));a.postMessage({type:"cms-editor::render",src:oe,body:A.body},f)},Ot=x.useRef(null);x.useEffect(()=>{if(!Ye||F||Z||!H||!W){Ot.current=null;return}const a={nav:JSON.stringify({page:H,path:be,pathTemplate:z}),content:JSON.stringify(W)},f=Ei(Ot.current,a);Ot.current=a,f&&vn()},[W,Ye,F,Z,H,be,z]);const _t=x.useRef(null);x.useEffect(()=>{if(!Ye||F||Z||!H||!W){_t.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),f=_t.current;_t.current={page:H,sig:a},!(!f||f.page!==H||f.sig===a)&&vn()},[l.state.variantOverride,Ye,F,Z,H]);const js=!!t&&!!r&&!de.notFound&&!hs&&!ps&&(Lt?.kind==="ready"||it!=="idle"),me=wi({editingMode:p,sandboxDisplay:M.mode==="sandbox",blocksEditingEnabled:m});x.useEffect(()=>{const a=Ie;if(!a)return;const f=T=>{if(T.origin===a)if(T.data?.type==="visual-editor::element-clicked"){const A=fa.safeParse(T.data.payload);A.success&&w(A.data)}else if(T.data?.type==="cms-editor::section-clicked"){const A=ga.safeParse(T.data.payload);A.success&&y({index:A.data.sectionIndex,seq:A.data.clickSeq})}else T.data?.type==="cms-editor::render-start"?ce():T.data?.type==="cms-editor::render-end"?(se(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Ct,keys:Rt},a)):T.data?.type==="cms-editor::render-error"&&se()};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[Ie,Tt,Ct,Rt]);const bn=()=>{const a=v.current?.contentWindow,f=nt(je);!a||!f||a.postMessage({type:"visual-editor::activate",script:pa},f)},Es=()=>{const a=v.current?.contentWindow,f=nt(je);!a||!f||a.postMessage({type:"visual-editor::deactivate"},f)},At=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||(a.postMessage(M.mode==="production"||ie?{type:"editor::inject",args:{script:_n}}:{type:"visual-editor::activate",script:_n},f),a.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Ct,keys:Rt},f))},Ns=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||a.postMessage({type:"cms-editor::deactivate"},f)},Ts=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||(a.postMessage({type:"cms-editor::clear-hover"},f),a.postMessage({type:"visual-editor::clear-hover"},f))},mt=a=>{if(a==="blocks"&&!m)return;const f=p;!n&&a!==f&&(a==="blocks"?k.current?.resize("30%"):k.current?.collapse()),j(a),w(null),y(null),a!=="blocks"&&Y(null),f==="visual"&&Es(),a==="visual"&&bn(),f==="blocks"&&a!=="blocks"&&Ns(),a==="blocks"&&At()},Cs=()=>{mt(bi(p,m))},Rs=()=>{mt(xi(p,m))};Jr(()=>{const a=v.current;if(!a)return;ce();const f=document.activeElement,T=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ti(a,dn.current);let A;const oe=()=>{clearTimeout(A),a.tabIndex=T,a.style.pointerEvents="";const Ae=document.activeElement;(!Ae||Ae===document.body||Ae===a)&&f?.focus(),a.removeEventListener("load",oe)};a.addEventListener("load",oe),A=setTimeout(oe,3e3)});const Ls=()=>{const a=qt.indexOf(g);E(qt[(a+1)%qt.length])},Bt=(a,f)=>{if(!H)return;const T=H,A={...ze,[a]:f};ke.current=Be(z,A),ye(oe=>({...oe,[T]:A})),Xe({path:z,pageKey:T,params:A})},Os=ri({iframeBase:M.iframeBase,resolvedPath:be,activeGlobalSectionName:F?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),xn=a=>{const f=fe[a.key]??{},T=Be(a.path,f);(F||Ne(T)!==Ne(be))&&ce(),ke.current=T,K(null),Y(null),ne(null),y(null),le(a.key),te(a.path),Xe({path:a.path,pageKey:a.key,params:f}),l.selectTarget({kind:"page",key:a.key,path:a.path})};Qs(Qe,a=>{(F||Ne(a)!==Ne(be))&&ce(),ke.current=a,K(null),Y(null),ne(null),y(null),le(null),te(a),Xe({path:a,pageKey:null,params:{}})});const _s=a=>{if(!Ce||!R){jn.error(e("sandbox.preview.previewMetadataNotReady"));return}ce(),ke.current=null;const f=Nn(R),T=Tn(Ce,f,a.key);K(a),Y(null),ne(T),y(null),l.selectTarget({kind:"section",key:a.key})},As=a=>{m&&(K(null),Y(a.key),ne(null),mt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},Bs=async({name:a,path:f,templateKey:T})=>{if(!t||!r)return;const A=ns(f);if(A){C(A);return}const oe=f.trim().startsWith("/")?f.trim():`/${f.trim()}`;if(G.some(Pe=>Ne(Pe.path)===Ne(oe))){C(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let Ae;if(T&&(Ae=W?.[T],!Ae)){C(e("sandbox.preview.templateNoLongerExists"));return}C(void 0);try{const Pe=await ot.mutateAsync({name:a,path:oe,template:Ae});q(!1),jn.success(e("sandbox.preview.pageCreated",{name:a})),await na(ki),xn({key:Pe.key,name:Pe.name,path:Pe.path}),mt("blocks")}catch(Pe){C(Pe instanceof Error?Pe.message:e("sandbox.preview.failedToCreatePage"))}},ft=ut&&(js||M.mode==="production"),$s=ai({showPreviewToolbar:ft,contentEditingEnabled:h}),pt=()=>{U(!1),$("")},$t=F?.name??lt?.title??Et?.name,Ft=Le.isPending||Oe.isPending,Mt=Ft?nt(M.iframeBase):$t,ht=F?`section:${F.key}`:Z?`loader:${Z}`:H?`page:${H}`:void 0,Fs=ft?$s?s.jsxs(dr,{open:O,onOpenChange:a=>{U(a),a||$("")},children:[s.jsx(ur,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:Ft?Mt??void 0:F||lt?$t:[$t,z].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[F&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(nr,{size:11}),e("sandbox.preview.globalBadge")]}),lt&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(sr,{size:11}),e("sandbox.preview.loaderBadge")]}),Mt&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Mt}),!Ft&&!F&&!lt&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:z}),s.jsx(Zs,{size:12,className:Dt("shrink-0 transition-transform",O&&"rotate-180")})]})})}),s.jsxs(mr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(Qn,{shouldFilter:!1,defaultValue:ht,children:[s.jsx(Xn,{value:_,onValueChange:a=>{$(a),Q.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(Yn,{ref:Q,className:"max-h-80",children:[s.jsx(Zn,{children:G.length===0&&Ge.length===0&&an.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),sn.length>0&&s.jsx(st,{children:sn.map(a=>s.jsxs(rt,{value:`page:${a.key}`,"aria-current":ht===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{pt(),xn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),rn.length>0&&s.jsx(st,{heading:e("sandbox.preview.globalComponents"),children:rn.map(a=>s.jsx(rt,{value:`section:${a.key}`,"aria-current":ht===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),_s(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),on.length>0&&s.jsx(st,{heading:e("sandbox.preview.globalLoaders"),children:on.map(a=>s.jsx(rt,{value:`loader:${a.key}`,"aria-current":ht===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),As(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!F&&!Z&&at(z).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:at(z).map((a,f)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${f}`);const T=Nt[a.name];return T&&dt?s.jsx(Va,{sources:T,template:z,paramName:a.name,value:ze[a.name]??"",sandboxRef:dt,onCommit:A=>Bt(a.name,A)},`${H}:${a.name}`):s.jsx(ni,{name:a.name,value:ze[a.name]??"",onCommit:A=>Bt(a.name,A)},`${H}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(De,{variant:"ghost",className:"w-full justify-start",onClick:()=>{pt(),C(void 0),q(!0)},children:[s.jsx(cr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Os}):null,yn=ft||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Ze,{onClick:Ls,"aria-label":e(zn[g]),children:g==="mobile"?s.jsx(rr,{size:16}):g==="tablet"?s.jsx(ar,{size:16}):s.jsx(ir,{size:16})})}),s.jsx(It,{children:e(zn[g])})]}),Fs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(Ze,{onClick:Ps,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(qn,{size:16})})})]}):null,Ms=M.mode==="sandbox",gt=Pi[g],vt=g==="desktop"&&(B.width===0||B.width>=gt.width+2*Kn),wn=vt?1:Math.min(B.width>0?B.width/(gt.width+2*Kn):1,1),Ds=vt?{width:"100%",height:"100%"}:{width:`${gt.width}px`,height:B.height>0?`${B.height/wn}px`:`${gt.height}px`,transform:`scale(${wn})`,transformOrigin:"top center"},kn=s.jsxs(s.Fragment,{children:[Ms&&(ft||h)&&s.jsx(Ze,{onClick:Cs,"aria-pressed":me==="visual","aria-label":e("sandbox.preview.visualEditor"),active:me==="visual",children:s.jsx(En,{size:16})}),m&&s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Ze,{onClick:Rs,"aria-pressed":me==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:me==="blocks",children:s.jsx(lr,{size:16})})}),s.jsx(It,{children:e("sandbox.preview.blocksEditor")})]}),Ke&&s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Ze,{onClick:I,"aria-pressed":P,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:P,children:s.jsx(or,{size:16})})}),s.jsx(It,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Ks=!!Z&&me==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[dt&&Object.entries(Nt).map(([a,f])=>(ze[a]??"")===""?s.jsx(ei,{sources:f,template:z,paramName:a,sandboxRef:dt,onFill:T=>Bt(a,T)},`${H}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(Sn.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:yn}),children:yn}),s.jsx(Sn.Toolbar.Right.Portal,{fallback:kn,children:kn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Ks?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Mn,{virtualMcpId:t,externalSelection:N,onViewJsonFile:I}),P&&Ke&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Dn,{ref:S,virtualMcpId:t,pageKey:Ke,onClose:V})})]}):s.jsxs(Rn,{orientation:"horizontal",disabled:me!=="blocks",className:"relative isolate",children:[s.jsx(xt,{ref:k,id:"preview-blocks-editor",defaultSize:me==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:me==="blocks"&&s.jsx(Mn,{virtualMcpId:t,externalSelection:N,onViewJsonFile:I})}),me==="blocks"&&s.jsx(Ln,{withHandle:!0}),s.jsx(xt,{id:"preview-canvas",defaultSize:me==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(Rn,{orientation:"horizontal",disabled:!(P&&Ke),children:[s.jsx(xt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const f=()=>L(A=>A.width===a.clientWidth&&A.height===a.clientHeight?A:{width:a.clientWidth,height:a.clientHeight});f();const T=new ResizeObserver(f);return T.observe(a),()=>T.disconnect()},className:Dt("h-full relative overflow-clip flex justify-center",ut&&!vt&&"bg-muted/30"),children:[(ve||gs)&&ut&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),M.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"starting",progress:un,claimPhase:Lt})}),!ie&&$e.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"suspended",onResume:ge.resume})}),!ie&&$e.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"errored",error:$e.error,onRetry:ge.retry,connectionsHref:`/${ae.slug}/settings/connections`})}),M.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(Pt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),me==="visual"&&!b&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(En,{size:12}),e("sandbox.preview.clickElementToAsk")]}),me==="visual"&&b&&s.jsx(xa,{element:b,onDismiss:()=>w(null)}),ut&&_e&&s.jsx("div",{className:Dt("shrink-0",!vt&&"border-x border-border bg-background shadow-sm"),style:Ds,onMouseLeave:Ts,children:s.jsx("iframe",{ref:v,src:_e,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:hn.handleError,onLoad:()=>{if(hn.handleLoad(),se(),M.mode!=="sandbox"||ie){(M.mode==="production"&&!M.showWakingPill||ie)&&me==="blocks"&&At();return}if(Ws("vm_preview_loaded",{view_mode:me,vm_id:jt?.sandboxHandle??null}),!F)try{const a=v.current?.contentWindow?.location?.pathname;if(!a)return;const f=ke.current;if(f!==null&&(ke.current=null,Ne(a)!==Ne(f))||Ne(a)===Ne(be))return;te(a),Xe({path:a,pageKey:xe,params:ze})}catch{}me==="visual"&&bn(),me==="blocks"&&At()}},M.iframeBase)})]})}),P&&Ke&&s.jsxs(s.Fragment,{children:[s.jsx(Ln,{withHandle:!0}),s.jsx(xt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Dn,{ref:S,virtualMcpId:t,pageKey:Ke,onClose:V})})]})]})})]})}),s.jsx(oi,{open:J,onOpenChange:q,isPending:ot.isPending,error:X,templates:G,onSubmit:Bs})]})}function Ri(t){const e=pe.c(22),{virtualMcpId:n}=t,r=Te(),i=pr(n),{activeTask:u,taskId:l,currentBranch:c}=St(),o=aa(l),[d,h]=x.useState(!1);if(ra({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Vt(i?.metadata),threadHasRepo:Vt(o)||Vt(u?.metadata)})==="none"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(On,{className:"size-7 text-foreground"})}),e[0]=j):j=e[0];let g;e[1]!==r?(g=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=g):g=e[2];let E;e[3]!==r?(E=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=E):E=e[4];let b,w;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),w=s.jsx(On,{className:"size-4"}),e[5]=b,e[6]=w):(b=e[5],w=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(De,{onClick:b,children:[w,N]}),e[9]=N,e[10]=y):y=e[10];let v;e[11]!==g||e[12]!==E||e[13]!==y?(v=s.jsx(tn,{className:"h-full",image:j,title:g,description:E,actions:y}),e[11]=g,e[12]=E,e[13]=y,e[14]=v):v=e[14];let k;e[15]!==d?(k=s.jsx(sa,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let P;return e[17]!==v||e[18]!==k?(P=s.jsxs(s.Fragment,{children:[v,k]}),e[17]=v,e[18]=k,e[19]=P):P=e[19],P}let p;return e[20]!==n?(p=s.jsx(Ci,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function Uc(){const t=pe.c(2),e=ia();let n;return t[0]!==e?(n=s.jsx(Gs,{tabId:"site-editor",children:s.jsx(Js,{feature:"cms",children:s.jsx(Ri,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{Uc as default};
|