decocms 4.372.3 → 4.373.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/{AlertCircle-CMjsP_Tk.js → AlertCircle-3PzOAmGf.js} +1 -1
- package/dist/client/assets/{AreaChart-Bh_grNQZ.js → AreaChart-7E6DaaEO.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CjYy5Nhj.js → ArrowLeft-JCMxLp8E.js} +1 -1
- package/dist/client/assets/{ArrowRight-CLncCNat.js → ArrowRight-Cl3bzAIC.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cii1LHW7.js → ArrowUp-Bmd2w7Fx.js} +1 -1
- package/dist/client/assets/{CartesianChart-CD-5y_pX.js → CartesianChart-D-MpJhL1.js} +1 -1
- package/dist/client/assets/{CheckCircle-DHXQFnpK.js → CheckCircle-Co3IBXeH.js} +1 -1
- package/dist/client/assets/{ChevronUp-DiYhGG4T.js → ChevronUp-Djmy8s04.js} +1 -1
- package/dist/client/assets/{Copy01-nMxlBfeT.js → Copy01-BYK2zIkj.js} +1 -1
- package/dist/client/assets/{CreditCard01-CWXVH3ZM.js → CreditCard01-C7PO4dVs.js} +1 -1
- package/dist/client/assets/DotsVertical-BozfeMf6.js +1 -0
- package/dist/client/assets/{Download01-BRrSA3Yx.js → Download01-Z6w2IrLj.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-fXvhmekg.js → ErrorBarContext-G3lO5Hsl.js} +1 -1
- package/dist/client/assets/{Eye-Dyg2WPG4.js → Eye-ChO6k3fk.js} +1 -1
- package/dist/client/assets/{Globe01-D6FaaFR2.js → Globe01-D3UtmZtY.js} +1 -1
- package/dist/client/assets/{Users03-Y0Jco4zL.js → Globe04-CCIm2Cf2.js} +1 -1
- package/dist/client/assets/{Image01-CxnjAzbb.js → Image01-Dx7ea-3O.js} +1 -1
- package/dist/client/assets/{Key01-CIXwHMRo.js → Key01-B8q0d-op.js} +1 -1
- package/dist/client/assets/LayoutLeft-DUo3bbMr.js +1 -0
- package/dist/client/assets/{Line-YO4Ozgbt.js → Line-DC3wc0Zn.js} +1 -1
- package/dist/client/assets/{Link01-C0FvgZZB.js → Link01-C-mBEv93.js} +1 -1
- package/dist/client/assets/{LinkExternal01-AWlhN5o7.js → LinkExternal01-uHE64k_w.js} +1 -1
- package/dist/client/assets/{Monitor01-Ccs1gh2Z.js → Monitor01-CevElukI.js} +1 -1
- package/dist/client/assets/{Package-nTbucmaQ.js → Package-C6yqPbb7.js} +1 -1
- package/dist/client/assets/{Palette-DSdn1Xis.js → Palette-B2v8R7_D.js} +1 -1
- package/dist/client/assets/{Play-lMuWOObF.js → Play-D26LBNWf.js} +1 -1
- package/dist/client/assets/{Plus-CVauOqLT.js → Plus-CoGTSnEd.js} +1 -1
- package/dist/client/assets/{SearchLg-BrrPVuXr.js → SearchLg-BvCfRAbg.js} +1 -1
- package/dist/client/assets/{SearchMd-C45D2PMI.js → SearchMd-C0e2gT30.js} +1 -1
- package/dist/client/assets/{Sector-9mXbxJ9i.js → Sector-Cztbz-wz.js} +5 -5
- package/dist/client/assets/{Settings02-Cyf85ea0.js → Settings02-azWHb0MO.js} +1 -1
- package/dist/client/assets/{Share07-wC47qn2E.js → Share07-CW1RSVqD.js} +1 -1
- package/dist/client/assets/{Stars01-oAh9h5b5.js → Stars01-Ch2E4B6o.js} +1 -1
- package/dist/client/assets/{Sun-0Ied-kyZ.js → Sun-Cx4zdBZx.js} +1 -1
- package/dist/client/assets/Tool01-DbFf2Je1.js +1 -0
- package/dist/client/assets/{Tool02-CATStXCy.js → Tool02-Hh7HLEzm.js} +1 -1
- package/dist/client/assets/{Trash01-nl-t4IoV.js → Trash01-D8ICnU7E.js} +1 -1
- package/dist/client/assets/{TrendUp01-BFAEMx9E.js → TrendUp01-ZTgT_kdi.js} +1 -1
- package/dist/client/assets/{Upload01-B4Fqdkae.js → Upload01-BoLmU8be.js} +1 -1
- package/dist/client/assets/{User01-ClMaVCaJ.js → User01-CQXsOD6P.js} +1 -1
- package/dist/client/assets/{UserSquare-B2lKdt4w.js → UserSquare-C4_QxRGQ.js} +1 -1
- package/dist/client/assets/{Users01-BFhxJVhO.js → Users01-mzXfNn0j.js} +1 -1
- package/dist/client/assets/{X-CFCE4a-Q.js → X-BmPcW1eb.js} +1 -1
- package/dist/client/assets/{XCircle-CleKT0Id.js → XCircle-jpeASVbU.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DpXsFGyJ.js → XClose-BhXJw65F.js} +1 -1
- package/dist/client/assets/{Zap-B6zkqKWB.js → Zap-Cc5rEM6R.js} +1 -1
- package/dist/client/assets/ZoomOut-DtzZmmbM.js +1 -0
- package/dist/client/assets/{access-gate-Ds4n25mC.js → access-gate-C720AIcS.js} +1 -1
- package/dist/client/assets/add-connection-dialog-DqhI8LLv.js +1 -0
- package/dist/client/assets/agent-analytics-CEaAXQWf.js +2 -0
- package/dist/client/assets/agent-app-DZehCYZl.js +1 -0
- package/dist/client/assets/agent-assets-QG4QLYi4.js +1 -0
- package/dist/client/assets/agent-automation-C9l9hEWB.js +20 -0
- package/dist/client/assets/agent-automations-7OvEQ1VY.js +1 -0
- package/dist/client/assets/agent-connect-sources-D4Eixo2_.js +1 -0
- package/dist/client/assets/agent-deck-BVRxo7rJ.js +1 -0
- package/dist/client/assets/agent-e2e-Dhn8AUR2.js +1 -0
- package/dist/client/assets/agent-experiments-DXXxqvO5.js +1 -0
- package/dist/client/assets/agent-file-CoPjYzW3.js +1 -0
- package/dist/client/assets/{agent-git-D4IYczGa.js → agent-git-Dz0OC5zZ.js} +2 -2
- package/dist/client/assets/agent-hosting-h_IXMzav.js +1 -0
- package/dist/client/assets/agent-icon-DbgbaBWC.js +1 -0
- package/dist/client/assets/agent-library-file-DLEwy6vn.js +1 -0
- package/dist/client/assets/agent-monitor-K9XcbQ8_.js +1 -0
- package/dist/client/assets/agent-overview-CHDp8hoe.js +1 -0
- package/dist/client/assets/agent-settings-Cw8w6Gap.js +1 -0
- package/dist/client/assets/{agent-site-editor-DJSdtoNU.js → agent-site-editor-DQY9pg4H.js} +13 -13
- package/dist/client/assets/agent-site-editor-code-B1APLc6I.js +2 -0
- package/dist/client/assets/agent-site-editor-content-N2XOogCr.js +2 -0
- package/dist/client/assets/agent-site-editor-preview-Dt5NU6JJ.js +518 -0
- package/dist/client/assets/agent-view-DVRDYkCo.js +1 -0
- package/dist/client/assets/{agent-view-guard-DHJpzCVR.js → agent-view-guard-DJyWI4yF.js} +1 -1
- package/dist/client/assets/agents-list-CLIUc54V.js +1 -0
- package/dist/client/assets/{ai-providers-jxGd6MbV.js → ai-providers-Dq0uWBim.js} +2 -2
- package/dist/client/assets/{alert-U2IStW1f.js → alert-D9Xs8r1J.js} +1 -1
- package/dist/client/assets/{alert-dialog-BI-B_8hq.js → alert-dialog-CMdGVc5y.js} +2 -2
- package/dist/client/assets/api-keys-BaELtPjJ.js +1 -0
- package/dist/client/assets/api-keys-DMJLQGyU.js +1 -0
- package/dist/client/assets/app-editor-CxVdHjkp.js +1 -0
- package/dist/client/assets/asset-utils-B2xrnUou.js +1 -0
- package/dist/client/assets/{auth-DhzAq_9m.js → auth-DvTDuEnH.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dar7OygY.js → auth-catchall-CE_y-mnY.js} +1 -1
- package/dist/client/assets/auth-entry-BWD0wZ2A.js +1 -0
- package/dist/client/assets/{auth-split-layout-DLFqjvPt.js → auth-split-layout-tneb1o26.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DkJ4g-X5.js → authenticate-and-persist-oauth-CyEJ3ZKP.js} +1 -1
- package/dist/client/assets/automation-list-row-CJ0AVjPL.js +1 -0
- package/dist/client/assets/automation-runs-CbMZ10A-.js +1 -0
- package/dist/client/assets/automations-kGGjILm8.js +1 -0
- package/dist/client/assets/{autosend-BberXmli.js → autosend-CESqNA2a.js} +1 -1
- package/dist/client/assets/{avatar-C9HiP4eS.js → avatar-CsDZ0T22.js} +1 -1
- package/dist/client/assets/badge-BMuU0t5h.js +1 -0
- package/dist/client/assets/block-document-BydU2jcx.js +3 -0
- package/dist/client/assets/{blocks-preview-workspace-context-Bwmvvd4S.js → blocks-preview-workspace-context-CuzoVyh9.js} +1 -1
- package/dist/client/assets/breadcrumb-CV5rO8sh.js +1 -0
- package/dist/client/assets/{buckets-BndbOAGO.js → buckets-Dm9YtrYe.js} +1 -1
- package/dist/client/assets/build-improve-prompt-doc-EvTa14jr.js +2 -0
- package/dist/client/assets/bulk-category-panel-CY3h3K-9.js +1 -0
- package/dist/client/assets/calendar-BhMl9dZ9.js +1 -0
- package/dist/client/assets/capability-load-error-HRK6520w.js +1 -0
- package/dist/client/assets/category-editor-z_l9WPAc.js +1 -0
- package/dist/client/assets/{chart-8nXuVw9P.js → chart-pALnZlqd.js} +5 -5
- package/dist/client/assets/{chat-context-tZCX_cqt.js → chat-context-CHZ5Yehn.js} +6 -6
- package/dist/client/assets/{chat-draft-BCeqPSxA.js → chat-draft-CZ4LRf6I.js} +1 -1
- package/dist/client/assets/checkbox-BoN76eap.js +1 -0
- package/dist/client/assets/choose-editor-DHr5QgoP.js +1 -0
- package/dist/client/assets/{cli-auth-success-D39z_FO3.js → cli-auth-success-BOpU9sA8.js} +1 -1
- package/dist/client/assets/{client-icons-DpcP1bht.js → client-icons-BPRdY54C.js} +1 -1
- package/dist/client/assets/collapsible-D3vKPIBT.js +1 -0
- package/dist/client/assets/collection-detail-B44G83q8.js +1 -0
- package/dist/client/assets/collection-display-button-BndwflUf.js +1 -0
- package/dist/client/assets/{collection-search-J9Bt25gS.js → collection-search-BmT0oV8g.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DBeauaNS.js → collection-table-wrapper-UMxhNoR0.js} +1 -1
- package/dist/client/assets/collection-tabs-D6Sk9riW.js +1 -0
- package/dist/client/assets/combobox-BXOISFpW.js +1 -0
- package/dist/client/assets/command-bqq51nHs.js +1 -0
- package/dist/client/assets/{companion-mcps-section-xmRpNJBK.js → companion-mcps-section-7NiZEsE1.js} +1 -1
- package/dist/client/assets/connect-gdFpiJzg.js +8 -0
- package/dist/client/assets/connect-layout-BNcHFw2B.js +1 -0
- package/dist/client/assets/{connection-DD0omVHZ.js → connection-DlOqhGn3.js} +1 -1
- package/dist/client/assets/connection-card-Dh4yj-V8.js +1 -0
- package/dist/client/assets/connection-detail-Cjp3fFqG.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CHlcdgAK.js → connection-form-helpers-DoXq4oCN.js} +1 -1
- package/dist/client/assets/connections-BTo7AfIR.js +1 -0
- package/dist/client/assets/{create-organization-dialog-1mI4Ad1B.js → create-organization-dialog-CjRZ3hmF.js} +1 -1
- package/dist/client/assets/{decofile-api-BNWbEMR6.js → decofile-api-DlO_JJTI.js} +1 -1
- package/dist/client/assets/{decopilot-BvepxP_-.js → decopilot-BbHxwoKU.js} +2 -2
- package/dist/client/assets/dialog-yUWKJPsU.js +1 -0
- package/dist/client/assets/discover-_mwx3kHk.js +1 -0
- package/dist/client/assets/domain-settings-DWfJmRnt.js +1 -0
- package/dist/client/assets/download-app-dialog-CnJNRM3l.js +1 -0
- package/dist/client/assets/{drawer-BIjkXMV3.js → drawer-CFueQivP.js} +1 -1
- package/dist/client/assets/{editor-D4Ls62vg.js → editor-9_pChBN4.js} +1 -1
- package/dist/client/assets/{empty-state-CyICQznD.js → empty-state-1TOptJ4i.js} +1 -1
- package/dist/client/assets/{empty-state-BdiOfgle.js → empty-state-DTENIvqH.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dbm_cKaX.js → extract-connection-data-B7yRd0El.js} +1 -1
- package/dist/client/assets/{feature-gate-Bp7Cydio.js → feature-gate-DmyzkRdC.js} +1 -1
- package/dist/client/assets/feature-paywall-CFcsZgv5.js +1 -0
- package/dist/client/assets/file-explorer-BPttIqTX.js +2 -0
- package/dist/client/assets/{file-preview-CARebwHJ.js → file-preview-h8_PuEm0.js} +1 -1
- package/dist/client/assets/file-share-button-CYWl5jll.js +3 -0
- package/dist/client/assets/{file-type-icon-C9Qn36v4.js → file-type-icon-C7b31Eu-.js} +1 -1
- package/dist/client/assets/{folder-icon-BLBZBD_a.js → folder-icon-Cp3UZ2f7.js} +1 -1
- package/dist/client/assets/{form-CSXgIHLz.js → form-D4fabgxt.js} +1 -1
- package/dist/client/assets/{gateway-client-BuiOykcN.js → gateway-client-BqcIzR1f.js} +1 -1
- package/dist/client/assets/general-BVFviafD.js +1 -0
- package/dist/client/assets/{github-icon-huXDOAgf.js → github-icon-BJ-JIGKg.js} +1 -1
- package/dist/client/assets/home-D_wLSsVp.js +1 -0
- package/dist/client/assets/{hooks-BoX5BC-f.js → hooks-CzhqOgxt.js} +2 -2
- package/dist/client/assets/{hooks-DZOMRp7D.js → hooks-GmRpr8h8.js} +1 -1
- package/dist/client/assets/icon-button-BtmumYDv.js +1 -0
- package/dist/client/assets/index-BIAbKV8r.js +1 -0
- package/dist/client/assets/index-BiU3YmQL.js +235 -0
- package/dist/client/assets/{index-BD213WLU.js → index-Bxbv_23l.js} +1 -1
- package/dist/client/assets/index-CFPoNDBi.js +1 -0
- package/dist/client/assets/{index-Bb-Re5q8.js → index-CLccaHLm.js} +1 -1
- package/dist/client/assets/{index-BWpNlf6e.js → index-CLlrN2I7.js} +1 -1
- package/dist/client/assets/{index-DiULBiX9.js → index-CuhH8P7u.js} +1 -1
- package/dist/client/assets/index-CxyF2W3e.js +1 -0
- package/dist/client/assets/{index-DWw5wi2G.js → index-DAWDSRE3.js} +1 -1
- package/dist/client/assets/index-DEoa7bfP.js +5 -0
- package/dist/client/assets/index-DaUTlKSt.css +1 -0
- package/dist/client/assets/{index-DqT4mG5l.js → index-DmozmqiR.js} +1 -1
- package/dist/client/assets/{index-2gtoysbs.js → index-DyLXwR4J.js} +1 -1
- package/dist/client/assets/index-PXtwpYFZ.js +26 -0
- package/dist/client/assets/{index-redirect-BQTLrDGT.js → index-redirect-C_mVUP1U.js} +1 -1
- package/dist/client/assets/{index-tj4CWdxr.js → index-ui6lA5FC.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CjWlcBHD.js → infiniteQueryObserver-QHtAxfIQ.js} +1 -1
- package/dist/client/assets/infra-billing-BUNh4stc.js +1 -0
- package/dist/client/assets/input-4CSpUSQl.js +1 -0
- package/dist/client/assets/input-BGhe0a85.js +8 -0
- package/dist/client/assets/input-CRD8MdDS.js +1 -0
- package/dist/client/assets/{integration-icon-BeEdjsn9.js → integration-icon-1ySWGOUX.js} +1 -1
- package/dist/client/assets/{label-BMxIRiEr.js → label-BNElcQf4.js} +1 -1
- package/dist/client/assets/{last-preview-page-B_H0ubHa.js → last-preview-page-CriZ3Ybr.js} +1 -1
- package/dist/client/assets/layout-JObct3sA.js +1 -0
- package/dist/client/assets/legacy-agents-deep-Be8TTzCS.js +1 -0
- package/dist/client/assets/legacy-main-redirect-B7vEff38.js +1 -0
- package/dist/client/assets/library-DiWyPd02.js +161 -0
- package/dist/client/assets/{login-C4Dx9xMO.js → login-Cp8tUb0B.js} +1 -1
- package/dist/client/assets/{markdown-DGWjAeXL.js → markdown-Cyp9lJ5l.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-BTjC7Gse.js → mcp-app-renderer-swczxBq4.js} +2 -2
- package/dist/client/assets/{mcp-oauth-C4khbNJJ.js → mcp-oauth-S1Th8e_4.js} +1 -1
- package/dist/client/assets/members--h5oznU6.js +1 -0
- package/dist/client/assets/message-templates-B7sm0uFT.js +1 -0
- package/dist/client/assets/{mini-report-page-Ci4cxCz8.js → mini-report-page-gIgc_0u6.js} +1 -1
- package/dist/client/assets/mock-board-BgLaLM9b.js +90 -0
- package/dist/client/assets/{monaco-editor-CMRYkmyb.js → monaco-editor-BTTiRg3C.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-PncjnNwy.js → monitoring-stats-row-SqX44qyF.js} +1 -1
- package/dist/client/assets/multi-select-DlCEHd3Z.js +1 -0
- package/dist/client/assets/{mustache-CPZS2ebG.js → mustache-CgVU0pmm.js} +1 -1
- package/dist/client/assets/{oauth-callback-CETK2WZB.js → oauth-callback-DVF3P0k_.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DqbbngEF.js → oauth-callback-ai-provider-DnZgYvOg.js} +1 -1
- package/dist/client/assets/{onboarding-B5zAGi2B.js → onboarding-KuoWylVw.js} +1 -1
- package/dist/client/assets/optimistic-project-sidebar-views-DbOixNPz.js +1 -0
- package/dist/client/assets/{org-file-open-context-BCUpiY_R.js → org-file-open-context-ZSKUsYTL.js} +1 -1
- package/dist/client/assets/{organization-choice-BNulT5zU.js → organization-choice-xHSL_jFs.js} +1 -1
- package/dist/client/assets/orgs-BZ30h814.js +1 -0
- package/dist/client/assets/{page-seo-form-BrHgBXF1.js → page-seo-form-uvAq8WeJ.js} +1 -1
- package/dist/client/assets/{pair-B46EBBjF.js → pair-TxCwxPu7.js} +8 -8
- package/dist/client/assets/plan-ladder-Jef48mB3.js +1 -0
- package/dist/client/assets/{popover-yk_ePqAA.js → popover-QnaOlHhb.js} +1 -1
- package/dist/client/assets/post-calendar-iJnYrJKe.js +1 -0
- package/dist/client/assets/post-editor-Bo6bvTrf.js +1 -0
- package/dist/client/assets/{preview-content-CfbsbElk.js → preview-content-BZw1CdZv.js} +1 -1
- package/dist/client/assets/{preview-dialog-CA2C3DS4.js → preview-dialog-CW8lM0wY.js} +1 -1
- package/dist/client/assets/primitives-K6663FBF.js +1 -0
- package/dist/client/assets/profile-SyCdTPAI.js +1 -0
- package/dist/client/assets/project-app-view-LEql7xV5.js +1 -0
- package/dist/client/assets/project-feed-B-N2eAAK.js +1 -0
- package/dist/client/assets/{project-icon-MWmzrrm8.js → project-icon-DeL96Npe.js} +1 -1
- package/dist/client/assets/project-reports-bArXCdyS.js +1 -0
- package/dist/client/assets/project-tasks-CK2bx81L.js +1 -0
- package/dist/client/assets/{prompts-4lILOzK9.js → prompts-xGBFLFgt.js} +1 -1
- package/dist/client/assets/record-editor-Bf769MFv.js +1 -0
- package/dist/client/assets/redirect-editor-DXB_8yBv.js +1 -0
- package/dist/client/assets/registry-lIOKlNUJ.js +2 -0
- package/dist/client/assets/registry-layout-hsve34X8.js +27 -0
- package/dist/client/assets/reports-CXzE7a39.js +1 -0
- package/dist/client/assets/{reports-BpxYdv2_.js → reports-cM3vPGFG.js} +2 -2
- package/dist/client/assets/reports-onboarding-VXLjX7pO.js +1 -0
- package/dist/client/assets/reports-tab-D8TZTv9m.js +2 -0
- package/dist/client/assets/repositories-CPa6SZ5V.js +1 -0
- package/dist/client/assets/repository-import-picker-IY5VTzNS.js +1 -0
- package/dist/client/assets/repository-picker-BZKrcN4Y.js +1 -0
- package/dist/client/assets/{require-capability-CmtOZnXt.js → require-capability-CimSbmsz.js} +1 -1
- package/dist/client/assets/{required-auth-layout-RoMNnMPO.js → required-auth-layout-C1pT7wzX.js} +1 -1
- package/dist/client/assets/{reset-password-BeUL8IgX.js → reset-password-BjWIunWT.js} +1 -1
- package/dist/client/assets/resizable-YNqh8MUH.js +1 -0
- package/dist/client/assets/review-settings-Be2fdXif.js +1 -0
- package/dist/client/assets/{rich-text-link-control-CHsxXHIo.js → rich-text-link-control-BExHOMAv.js} +2 -2
- package/dist/client/assets/roles-0e4U7If5.js +1 -0
- package/dist/client/assets/route-B5ZmPhcw.js +1 -0
- package/dist/client/assets/route-FGDifUW3.js +1 -0
- package/dist/client/assets/route-ajAF3k6E.js +1 -0
- package/dist/client/assets/route-page-header-DEpOaETW.js +1 -0
- package/dist/client/assets/runnable-block-editor-MngLlGqF.js +16 -0
- package/dist/client/assets/{sandbox-lifecycle-context-C7VKOJoV.js → sandbox-lifecycle-context-BfUCaKZp.js} +2 -2
- package/dist/client/assets/{schema-1zAO-l7e.js → schema-C2CxTC2d.js} +1 -1
- package/dist/client/assets/{scroll-area-C-wtbVS1.js → scroll-area-IfiqBxp0.js} +1 -1
- package/dist/client/assets/search-input-_eiEHUe0.js +1 -0
- package/dist/client/assets/search-toggle-Stpj_aWt.js +1 -0
- package/dist/client/assets/secrets-CDqpILuq.js +1 -0
- package/dist/client/assets/sections-editor-BBGWhCb9.js +2 -0
- package/dist/client/assets/select-47N7H1PV.js +1 -0
- package/dist/client/assets/select-model-BCgtIi3z.js +1 -0
- package/dist/client/assets/seo-editor-BrPfy2aB.js +1 -0
- package/dist/client/assets/separator-BlNapRt2.js +1 -0
- package/dist/client/assets/settings-tab-Dx5o1dO5.js +5 -0
- package/dist/client/assets/{sheet-i72Qx7sL.js → sheet-CvV2x5yz.js} +1 -1
- package/dist/client/assets/shell-layout-BMyUKhgs.js +1 -0
- package/dist/client/assets/{shell-layout-CuFt8bor.css → shell-layout-CE2Eihra.css} +1 -1
- package/dist/client/assets/sidebar-BMWTk3Ss.js +1 -0
- package/dist/client/assets/{skill-preview-gfYVdSdM.js → skill-preview-CqDKvwdL.js} +1 -1
- package/dist/client/assets/skills-CXSauL5l.js +1 -0
- package/dist/client/assets/sso-yxBZIEQo.js +1 -0
- package/dist/client/assets/store-registry-BsImLhdC.js +2 -0
- package/dist/client/assets/store-t7yAo4iS.js +1 -0
- package/dist/client/assets/{switch-BQFtt3BH.js → switch-DUPW32_G.js} +1 -1
- package/dist/client/assets/synced-repos-DWXwM86N.js +1 -0
- package/dist/client/assets/{table-6I6YKvFY.js → table-D1-dnD05.js} +1 -1
- package/dist/client/assets/{tabs-CLziM0Ww.js → tabs-uJDG1LT-.js} +1 -1
- package/dist/client/assets/{task-board-DrUf5p-Z.js → task-board-iF-5OywY.js} +1 -1
- package/dist/client/assets/task-route-D4VqZZFU.js +1 -0
- package/dist/client/assets/task-status-CUfsYmVV.js +1 -0
- package/dist/client/assets/taskboard-analytics-C0r-zgde.js +1 -0
- package/dist/client/assets/tasks-C5Yiiaae.js +1 -0
- package/dist/client/assets/{tasks-Drgd6az8.js → tasks-Dig9WuPL.js} +4 -4
- package/dist/client/assets/textarea-DbE6fIU0.js +1 -0
- package/dist/client/assets/thread-button-DcS2EMEc.js +1 -0
- package/dist/client/assets/{thread-intent-F-sZEflj.js → thread-intent-CnRICyzb.js} +1 -1
- package/dist/client/assets/thread-route-CTwlz0m2.js +1 -0
- package/dist/client/assets/thread-route-D_e3Th_q.js +1 -0
- package/dist/client/assets/thread-sheet-body-BPOqWNL-.js +1 -0
- package/dist/client/assets/toggle-group-ofCffann.js +1 -0
- package/dist/client/assets/toolbar-icon-button-DPZ8v-BD.js +1 -0
- package/dist/client/assets/{tooltip-DV2xHesQ.js → tooltip-BGb6Kdym.js} +1 -1
- package/dist/client/assets/{track-ZuOMvhd2.js → track-BtbUodA4.js} +1 -1
- package/dist/client/assets/{types-27TVsPN_.js → types-CyZPxJ7C.js} +3 -3
- package/dist/client/assets/usage-stats-UqDPk1rl.js +1 -0
- package/dist/client/assets/use-ai-providers-Cxi0vxkS.js +1 -0
- package/dist/client/assets/use-automations-CbK79XsB.js +1 -0
- package/dist/client/assets/{use-autosave-DOzyZumC.js → use-autosave-BEIVrcUg.js} +1 -1
- package/dist/client/assets/use-connect-companion-B3ql1eAJ.js +1 -0
- package/dist/client/assets/use-connection-C2XMAF5j.js +1 -0
- package/dist/client/assets/{use-copy-C_ctOeuP.js → use-copy-BhRM5JUh.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D1w9d4ex.js → use-create-virtual-mcp-CZM9_2b6.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-onM9TTf8.js → use-date-fns-locale-bOp1dUM9.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DqyNKPJM.js → use-debounced-autosave-DwFjgR25.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B9nG3bW5.js → use-debounced-value-CoGGtS8x.js} +1 -1
- package/dist/client/assets/use-deco-credits-CKQJlHZi.js +1 -0
- package/dist/client/assets/{use-decopilot-events-BpuQrfKN.js → use-decopilot-events-CuJ7CkFw.js} +1 -1
- package/dist/client/assets/use-delete-connection-BF9eR-10.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BVfgEagI.js → use-deployment-admin-5L_GV7bf.js} +1 -1
- package/dist/client/assets/{use-entitlements-Dl7pAsQ5.js → use-entitlements-BGdUcutE.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-mcfOeAAq.js → use-fast-preview-draft-url-JPVt7oTt.js} +1 -1
- package/dist/client/assets/use-file-configs-CrAdkDbm.js +1 -0
- package/dist/client/assets/use-in-settings-CaGFgkXe.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-PhBGPm8H.js → use-infinite-scroll-LXktD04_.js} +1 -1
- package/dist/client/assets/use-join-requests-Cju9AeLh.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-C86PuGT_.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-g0Tk-Phb.js +1 -0
- package/dist/client/assets/{use-mcp-client-e_hCatGm.js → use-mcp-client-Br7XFHza.js} +6 -6
- package/dist/client/assets/{use-mcp-prompts-DJRXjL4_.js → use-mcp-prompts-C6590AFl.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-g86k4oib.js → use-mcp-tools-DpaWZTAA.js} +1 -1
- package/dist/client/assets/use-members-buh6Kqlm.js +1 -0
- package/dist/client/assets/{use-mobile-hIijCK0k.js → use-mobile-DVkjqQzh.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-LXQlcEnV.js +1 -0
- package/dist/client/assets/use-open-billing-url-Bage8zng.js +1 -0
- package/dist/client/assets/use-org-auth-client-cknSmCL5.js +1 -0
- package/dist/client/assets/use-org-fs-CJMhF9AL.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-D2u9tZI_.js +8 -0
- package/dist/client/assets/{use-org-sso-BvfIL0yq.js → use-org-sso-zl0gtui9.js} +1 -1
- package/dist/client/assets/use-organization-roles-DUhOIBRz.js +1 -0
- package/dist/client/assets/use-organization-settings-DalrVcZ1.js +1 -0
- package/dist/client/assets/{use-panel-navigate-WrD0KEYx.js → use-panel-navigate-DMG8fP2m.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-DB5jQXqg.js +1 -0
- package/dist/client/assets/use-project-scope-_WcnrAA6.js +1 -0
- package/dist/client/assets/use-registry-connections-BQknTkkv.js +1 -0
- package/dist/client/assets/use-releases-CKVB62Nw.js +1 -0
- package/dist/client/assets/use-reports-diagnostic-BezpL0wm.js +1 -0
- package/dist/client/assets/{use-route-default-main-Djaj_cL9.js → use-route-default-main-fIaACxCL.js} +1 -1
- package/dist/client/assets/use-secrets-BN4lI9QI.js +1 -0
- package/dist/client/assets/{use-section-preview-base-BOFovHh4.js → use-section-preview-base-UXUDJdZU.js} +1 -1
- package/dist/client/assets/{use-session-runtime-BR1aW1y5.js → use-session-runtime-CGqfWswP.js} +1 -1
- package/dist/client/assets/use-tags-DUoR_C2Q.js +1 -0
- package/dist/client/assets/use-task-board-analytics-C5PpaVy-.js +1 -0
- package/dist/client/assets/use-task-metadata-Cd-4aUjL.js +1 -0
- package/dist/client/assets/use-thread-outputs-B1ptcJGL.js +1 -0
- package/dist/client/assets/{use-view-mode-B0LeaJg7.js → use-view-mode-IY2Xk-sG.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-CmFx7CJY.js +1 -0
- package/dist/client/assets/useInfiniteQuery-KPKjfQBF.js +1 -0
- package/dist/client/assets/{useQueries-C-SV8tD7.js → useQueries-D09LYNgo.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-97L-Gf2j.js +1 -0
- package/dist/client/assets/{users-BiOPZ43X.js → users-Cd0bupzj.js} +1 -1
- package/dist/client/assets/utils-Bn3HByb8.js +4 -0
- package/dist/client/assets/variant-calendar-BKkugrKM.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BFQoXu82.js → variant-matcher-override-dOY9vOi0.js} +1 -1
- package/dist/client/assets/view-mode-toggle-HCiL8YHS.js +1 -0
- package/dist/client/assets/{virtual-mcp-ldxphi5G.js → virtual-mcp-BaEt1QHH.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/Check-B3RSsr_D.js +0 -1
- package/dist/client/assets/ChevronRight-USKkhEpL.js +0 -1
- package/dist/client/assets/ChevronSelectorVertical-DpRb2z1l.js +0 -1
- package/dist/client/assets/Database01-C0YJpjc3.js +0 -1
- package/dist/client/assets/DotsVertical-CsjwfYzf.js +0 -1
- package/dist/client/assets/File02-BvR-HYxK.js +0 -1
- package/dist/client/assets/GitBranch01-rWb2SJK9.js +0 -1
- package/dist/client/assets/HardDrive-DNTPLPT4.js +0 -1
- package/dist/client/assets/MessageCircle01-DBcg2aiD.js +0 -1
- package/dist/client/assets/Printer-CvyxF9Jo.js +0 -1
- package/dist/client/assets/Shield01-CqB4I7qm.js +0 -1
- package/dist/client/assets/Tool01-DouqPjim.js +0 -1
- package/dist/client/assets/XClose-BgzK-Dwz.js +0 -1
- package/dist/client/assets/ZoomOut-BPxprY2s.js +0 -1
- package/dist/client/assets/add-connection-dialog-DZjTm9W3.js +0 -1
- package/dist/client/assets/agent-analytics-DmvdLg8B.js +0 -2
- package/dist/client/assets/agent-app-BvmFdS4C.js +0 -1
- package/dist/client/assets/agent-assets-czUGY90q.js +0 -1
- package/dist/client/assets/agent-automation-C5Kr5Oj3.js +0 -20
- package/dist/client/assets/agent-automations-D-3-Opoc.js +0 -1
- package/dist/client/assets/agent-connect-sources-CjhmYssY.js +0 -1
- package/dist/client/assets/agent-deck-BC5MWVm-.js +0 -1
- package/dist/client/assets/agent-e2e-DkL4Ltr6.js +0 -1
- package/dist/client/assets/agent-experiments--rXT-2aB.js +0 -1
- package/dist/client/assets/agent-file-C3XkHLMm.js +0 -1
- package/dist/client/assets/agent-hosting-DaIfm8Hu.js +0 -1
- package/dist/client/assets/agent-icon-CczrFEe7.js +0 -1
- package/dist/client/assets/agent-library-file-Dji653pU.js +0 -1
- package/dist/client/assets/agent-monitor-C-HIyaF_.js +0 -1
- package/dist/client/assets/agent-overview-cm15sxNU.js +0 -1
- package/dist/client/assets/agent-settings-XmhY1FOi.js +0 -1
- package/dist/client/assets/agent-site-editor-code-_Tz57RqE.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DOAcxz0t.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-mg5Q6hoW.js +0 -518
- package/dist/client/assets/agent-view-ClMILC98.js +0 -1
- package/dist/client/assets/agents-list-rKFF5b3o.js +0 -1
- package/dist/client/assets/anchors-yqDzZN4K.js +0 -1
- package/dist/client/assets/api-keys-AIfL76r6.js +0 -1
- package/dist/client/assets/api-keys-B6ry5Bc6.js +0 -1
- package/dist/client/assets/app-editor-BZKFeBmU.js +0 -1
- package/dist/client/assets/asset-utils-DhbLEVKo.js +0 -1
- package/dist/client/assets/auth-entry-CwWjlqGu.js +0 -1
- package/dist/client/assets/automation-list-row-Btr-Kty6.js +0 -1
- package/dist/client/assets/automation-runs-CnOOOwZJ.js +0 -1
- package/dist/client/assets/automations-CtLmB1Eo.js +0 -1
- package/dist/client/assets/badge-Bu51Hlti.js +0 -1
- package/dist/client/assets/block-document-BLCekKXO.js +0 -3
- package/dist/client/assets/breadcrumb-Dhdru7Jh.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-Cedp3vV1.js +0 -2
- package/dist/client/assets/bulk-category-panel-D3c_qJDk.js +0 -1
- package/dist/client/assets/calendar-DIQx67oO.js +0 -1
- package/dist/client/assets/capability-load-error-CJMvYDf4.js +0 -1
- package/dist/client/assets/cards-BVw8sRdW.js +0 -8
- package/dist/client/assets/category-editor-C7sRrVfl.js +0 -1
- package/dist/client/assets/checkbox-jLf7fBuW.js +0 -1
- package/dist/client/assets/choose-editor-Cbu3-nVC.js +0 -1
- package/dist/client/assets/collapsible-CTgXdVQa.js +0 -1
- package/dist/client/assets/collection-detail-BF7WM7Gn.js +0 -1
- package/dist/client/assets/collection-display-button-C-4xB6xx.js +0 -1
- package/dist/client/assets/collection-tabs-CrXIJeNf.js +0 -1
- package/dist/client/assets/combobox-BHrqHmge.js +0 -1
- package/dist/client/assets/command-B-XD29Nx.js +0 -1
- package/dist/client/assets/command-palette-store-DK-56E2K.js +0 -1
- package/dist/client/assets/connect-D4qCE3TM.js +0 -8
- package/dist/client/assets/connect-layout-DGO84ImO.js +0 -1
- package/dist/client/assets/connection-card-fcMCwbTh.js +0 -1
- package/dist/client/assets/connection-detail-DS015J4e.js +0 -1
- package/dist/client/assets/connections-C98FMYyY.js +0 -1
- package/dist/client/assets/dialog-llvhXw2o.js +0 -1
- package/dist/client/assets/discover-DNPHmIfF.js +0 -1
- package/dist/client/assets/domain-settings-CXxEmIjB.js +0 -1
- package/dist/client/assets/download-app-dialog-D_4eQbbs.js +0 -1
- package/dist/client/assets/dropdown-menu-C5iafa8S.js +0 -1
- package/dist/client/assets/feature-paywall-DEy2mpV2.js +0 -1
- package/dist/client/assets/file-explorer-Bs7B2-rr.js +0 -2
- package/dist/client/assets/file-share-button-Dk1ugrdV.js +0 -3
- package/dist/client/assets/general-BYFfG0fF.js +0 -1
- package/dist/client/assets/home-DTaaCW3K.js +0 -1
- package/dist/client/assets/index-2eKztu7k.js +0 -5
- package/dist/client/assets/index-BH7uCYoT.js +0 -1
- package/dist/client/assets/index-CSd_k8Np.js +0 -1
- package/dist/client/assets/index-CiMUXLco.js +0 -26
- package/dist/client/assets/index-CpNTsElB.css +0 -1
- package/dist/client/assets/index-D4RUT3q0.js +0 -1
- package/dist/client/assets/index-D_X-LIyA.js +0 -1
- package/dist/client/assets/index-Dc7hzqoi.js +0 -235
- package/dist/client/assets/infra-billing-D6jrbNxA.js +0 -1
- package/dist/client/assets/input-DXlaTX4w.js +0 -1
- package/dist/client/assets/input-D_FfvHr0.js +0 -8
- package/dist/client/assets/input-uIV5S_EX.js +0 -1
- package/dist/client/assets/layout-Dli4i2a0.js +0 -1
- package/dist/client/assets/legacy-agents-deep-CoiLV3QJ.js +0 -1
- package/dist/client/assets/legacy-main-redirect-BZ4nzqkQ.js +0 -1
- package/dist/client/assets/library-Dste3SFA.js +0 -161
- package/dist/client/assets/members-CRtKrUle.js +0 -1
- package/dist/client/assets/message-templates-B8kOo0Kk.js +0 -1
- package/dist/client/assets/mock-board-DRa60E6i.js +0 -90
- package/dist/client/assets/multi-select-DzAZ8Rb8.js +0 -1
- package/dist/client/assets/optimistic-project-sidebar-views-CrZ9OeIk.js +0 -1
- package/dist/client/assets/orgs-B1TBklWZ.js +0 -1
- package/dist/client/assets/plan-ladder-B2pv9Y73.js +0 -1
- package/dist/client/assets/post-calendar-Bx8YiCbs.js +0 -1
- package/dist/client/assets/post-editor-B1fD7o8C.js +0 -1
- package/dist/client/assets/primitives-JiGRyPkw.js +0 -1
- package/dist/client/assets/profile-CDR0JVtv.js +0 -1
- package/dist/client/assets/project-app-view-8VWdrWMf.js +0 -1
- package/dist/client/assets/project-feed-ChJRKxhk.js +0 -1
- package/dist/client/assets/project-reports-D31utlHg.js +0 -1
- package/dist/client/assets/project-tasks-D2AAgqxo.js +0 -1
- package/dist/client/assets/record-editor-DPAL8Tq5.js +0 -1
- package/dist/client/assets/redirect-editor-EPs_GX-_.js +0 -1
- package/dist/client/assets/registry-Dw8UrRRZ.js +0 -2
- package/dist/client/assets/registry-layout-CC2lewiS.js +0 -27
- package/dist/client/assets/reports-Ch9UvBcS.js +0 -1
- package/dist/client/assets/reports-onboarding-Dhm8IBuD.js +0 -1
- package/dist/client/assets/reports-tab-BJWrZp37.js +0 -2
- package/dist/client/assets/repositories-CMIGVJwC.js +0 -1
- package/dist/client/assets/repository-import-picker-DhVniDI2.js +0 -1
- package/dist/client/assets/repository-picker-BkoSI-jm.js +0 -1
- package/dist/client/assets/resizable-Bt7dvMCc.js +0 -1
- package/dist/client/assets/review-settings-Cx_Yzx40.js +0 -1
- package/dist/client/assets/roles-BNleKwt9.js +0 -1
- package/dist/client/assets/route-CHqG9ihd.js +0 -1
- package/dist/client/assets/route-DqJoK5dW.js +0 -1
- package/dist/client/assets/route-x8jgkj5T.js +0 -1
- package/dist/client/assets/runnable-block-editor-xmOnaiFL.js +0 -16
- package/dist/client/assets/search-input-Pobww52G.js +0 -1
- package/dist/client/assets/secrets-BF5nuoR4.js +0 -1
- package/dist/client/assets/sections-editor-B1LpXw4X.js +0 -2
- package/dist/client/assets/select-BkKPcZFe.js +0 -1
- package/dist/client/assets/select-model-DPv-zVVj.js +0 -1
- package/dist/client/assets/seo-editor-9G7mQFJ5.js +0 -1
- package/dist/client/assets/settings-tab-D1V5Uszb.js +0 -5
- package/dist/client/assets/shell-layout-Ce0aCJuX.js +0 -1
- package/dist/client/assets/sidebar-C5KRz1Pj.js +0 -1
- package/dist/client/assets/skills-CgTiBPyO.js +0 -1
- package/dist/client/assets/sso-BK-aRT5P.js +0 -1
- package/dist/client/assets/store-Nm6KtwbD.js +0 -1
- package/dist/client/assets/store-registry-Cs6bPPkP.js +0 -2
- package/dist/client/assets/synced-repos-B1z4DDCt.js +0 -1
- package/dist/client/assets/task-route-BCTCy27Q.js +0 -1
- package/dist/client/assets/task-status-DhCT2ly_.js +0 -1
- package/dist/client/assets/taskboard-analytics-Cf1r1f7I.js +0 -1
- package/dist/client/assets/tasks-BNvHI7hJ.js +0 -1
- package/dist/client/assets/textarea-BU6xemAP.js +0 -1
- package/dist/client/assets/thread-route-BBf64Mwk.js +0 -1
- package/dist/client/assets/thread-route-BSYRqZDg.js +0 -1
- package/dist/client/assets/thread-sheet-body-B4OUWlMn.js +0 -1
- package/dist/client/assets/toggle-group-BiU_UDOq.js +0 -1
- package/dist/client/assets/toolbar-icon-button-PuQFE8Y9.js +0 -1
- package/dist/client/assets/usage-stats-vMRDbAUM.js +0 -1
- package/dist/client/assets/use-ai-providers-BnF5Rw_n.js +0 -1
- package/dist/client/assets/use-automations-Bo0S3g8m.js +0 -1
- package/dist/client/assets/use-connect-companion-CClQCUMS.js +0 -1
- package/dist/client/assets/use-connection-Ba04fHwa.js +0 -1
- package/dist/client/assets/use-deco-credits-BGBshlLi.js +0 -1
- package/dist/client/assets/use-delete-connection-Cns6x8UC.js +0 -1
- package/dist/client/assets/use-file-configs-DYGSdjth.js +0 -1
- package/dist/client/assets/use-join-requests-DjeVFQr9.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-sSRGo66A.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-I377R0Kg.js +0 -1
- package/dist/client/assets/use-members-DPYHJDe2.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-C8pu0B4z.js +0 -1
- package/dist/client/assets/use-open-billing-url-Df7K1DCF.js +0 -1
- package/dist/client/assets/use-org-auth-client-DbPU3bA-.js +0 -1
- package/dist/client/assets/use-org-fs-Du-ErRPs.js +0 -1
- package/dist/client/assets/use-org-notice-CyiiFkRG.js +0 -1
- package/dist/client/assets/use-organization-roles-FAEtbpE5.js +0 -1
- package/dist/client/assets/use-organization-settings-CKbX2SdA.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DWzPH-Sc.js +0 -1
- package/dist/client/assets/use-project-scope-DU0-JxYr.js +0 -1
- package/dist/client/assets/use-registry-connections-SLFMHpqj.js +0 -1
- package/dist/client/assets/use-releases-CFNTwgY3.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-8BvW2in8.js +0 -1
- package/dist/client/assets/use-secrets-DVry--sz.js +0 -1
- package/dist/client/assets/use-tags-CZXCbbwL.js +0 -1
- package/dist/client/assets/use-task-board-analytics-Ci1AhxvH.js +0 -1
- package/dist/client/assets/use-task-metadata-Dt9l5S_a.js +0 -1
- package/dist/client/assets/use-thread-outputs-Dq-RN0P_.js +0 -1
- package/dist/client/assets/use-virtual-mcp-DkK7ErtB.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CspLjV7h.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BiQYAhJn.js +0 -1
- package/dist/client/assets/utils-DsvmRe8M.js +0 -4
- package/dist/client/assets/variant-calendar-DImnsJnP.js +0 -1
- package/dist/client/assets/view-mode-toggle-DvGhnpsV.js +0 -1
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-BBGWhCb9.js","assets/index-BiU3YmQL.js","assets/index-DaUTlKSt.css","assets/chat-context-CHZ5Yehn.js","assets/use-panel-navigate-DMG8fP2m.js","assets/thread-route-CTwlz0m2.js","assets/use-project-scope-_WcnrAA6.js","assets/use-virtual-mcp-CmFx7CJY.js","assets/use-mcp-client-Br7XFHza.js","assets/auth-DvTDuEnH.js","assets/github-repo-BknN0SVI.js","assets/autosend-CESqNA2a.js","assets/thread-intent-CnRICyzb.js","assets/slugify-CEUa2lfQ.js","assets/hooks-GmRpr8h8.js","assets/backoff-8mStPHYB.js","assets/task-board-iF-5OywY.js","assets/schema-C2CxTC2d.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-BGdUcutE.js","assets/use-ai-providers-Cxi0vxkS.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-CuJ7CkFw.js","assets/use-organization-settings-DalrVcZ1.js","assets/ChevronUp-Djmy8s04.js","assets/agent-icon-DbgbaBWC.js","assets/AlertCircle-3PzOAmGf.js","assets/Tool01-DbFf2Je1.js","assets/ArrowUp-Bmd2w7Fx.js","assets/ArrowLeft-JCMxLp8E.js","assets/Tool02-Hh7HLEzm.js","assets/ArrowRight-Cl3bzAIC.js","assets/TrendUp01-ZTgT_kdi.js","assets/ZoomOut-DtzZmmbM.js","assets/Globe04-CCIm2Cf2.js","assets/CheckCircle-Co3IBXeH.js","assets/UserSquare-C4_QxRGQ.js","assets/Copy01-BYK2zIkj.js","assets/CreditCard01-C7PO4dVs.js","assets/DotsVertical-BozfeMf6.js","assets/Download01-Z6w2IrLj.js","assets/Settings02-azWHb0MO.js","assets/Eye-ChO6k3fk.js","assets/Share07-CW1RSVqD.js","assets/Globe01-D3UtmZtY.js","assets/XClose-BhXJw65F.js","assets/Image01-Dx7ea-3O.js","assets/Key01-B8q0d-op.js","assets/LayoutLeft-DUo3bbMr.js","assets/Link01-C-mBEv93.js","assets/LinkExternal01-uHE64k_w.js","assets/Monitor01-CevElukI.js","assets/Sun-Cx4zdBZx.js","assets/Package-C6yqPbb7.js","assets/Palette-B2v8R7_D.js","assets/Play-D26LBNWf.js","assets/Plus-CoGTSnEd.js","assets/SearchLg-BvCfRAbg.js","assets/SearchMd-C0e2gT30.js","assets/Stars01-Ch2E4B6o.js","assets/Trash01-D8ICnU7E.js","assets/Upload01-BoLmU8be.js","assets/User01-CQXsOD6P.js","assets/Users01-mzXfNn0j.js","assets/XCircle-jpeASVbU.js","assets/X-BmPcW1eb.js","assets/Zap-Cc5rEM6R.js","assets/scroll-area-IfiqBxp0.js","assets/select-47N7H1PV.js","assets/index-DAWDSRE3.js","assets/tooltip-BGb6Kdym.js","assets/dialog-yUWKJPsU.js","assets/input-4CSpUSQl.js","assets/runnable-block-editor-MngLlGqF.js","assets/use-session-runtime-CGqfWswP.js","assets/decofile-api-DlO_JJTI.js","assets/utils-Bn3HByb8.js","assets/sandbox-url-D3mC8qhT.js","assets/claim-phase-copy-0btUuJoC.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-TxCwxPu7.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-D3vKPIBT.js","assets/use-copy-BhRM5JUh.js","assets/usage-stats-UqDPk1rl.js","assets/markdown-Cyp9lJ5l.js","assets/org-file-open-context-ZSKUsYTL.js","assets/use-mobile-DVkjqQzh.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-swczxBq4.js","assets/types-CyZPxJ7C.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/gateway-client-BqcIzR1f.js","assets/tool-namespace-DmnQIdtF.js","assets/utils-CVEq3hMx.js","assets/shell-layout-BMyUKhgs.js","assets/avatar-CsDZ0T22.js","assets/download-app-dialog-CnJNRM3l.js","assets/command-bqq51nHs.js","assets/index-Bxbv_23l.js","assets/integration-icon-1ySWGOUX.js","assets/project-icon-DeL96Npe.js","assets/required-auth-layout-C1pT7wzX.js","assets/use-org-sso-zl0gtui9.js","assets/shell-layout-CE2Eihra.css","assets/sheet-CvV2x5yz.js","assets/use-connection-C2XMAF5j.js","assets/use-navigate-to-agent-LXQlcEnV.js","assets/use-mcp-prompts-C6590AFl.js","assets/index-CuhH8P7u.js","assets/form-D4fabgxt.js","assets/label-BNElcQf4.js","assets/use-thread-outputs-B1ptcJGL.js","assets/file-type-icon-C7b31Eu-.js","assets/popover-QnaOlHhb.js","assets/monaco-editor-BTTiRg3C.js","assets/editor-9_pChBN4.js","assets/calendar-BhMl9dZ9.js","assets/textarea-DbE6fIU0.js","assets/rich-text-link-control-BExHOMAv.js","assets/switch-DUPW32_G.js","assets/safe-image-url-D5z803Ot.js","assets/search-input-_eiEHUe0.js","assets/tabs-uJDG1LT-.js","assets/use-debounced-value-CoGGtS8x.js","assets/use-file-configs-CrAdkDbm.js","assets/asset-utils-B2xrnUou.js","assets/useInfiniteQuery-KPKjfQBF.js","assets/infiniteQueryObserver-QHtAxfIQ.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/toggle-group-ofCffann.js","assets/alert-dialog-CMdGVc5y.js","assets/sandbox-git-api-CMdpE2TE.js","assets/mustache-CgVU0pmm.js","assets/page-seo-form-uvAq8WeJ.js","assets/use-section-preview-base-UXUDJdZU.js","assets/section-preview-url-Csj0_ZDg.js","assets/variant-matcher-override-dOY9vOi0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as x,ao as Ft,aI as et,ap as Ee,c as ue,b as Le,j as n,K as as,e as is,h as Mt,B as Je,aJ as os,a0 as mn,aK as ls,Z as cs,l as ze,aH as Hn,P as Zt,q as ds,t as Un}from"./index-BiU3YmQL.js";import{A as us}from"./agent-view-guard-DJyWI4yF.js";import{F as ms}from"./feature-gate-DmyzkRdC.js";import{a as fs,b as Bt}from"./chat-context-CHZ5Yehn.js";import{t as Wn}from"./ChevronUp-Djmy8s04.js";import{v as pr,D as ps,E as hs,j as Xt,F as en,G as Vn,H as qn,I as Gn,z as gs,J as tn}from"./agent-icon-DbgbaBWC.js";import{n as ln}from"./LinkExternal01-uHE64k_w.js";import{s as Jn}from"./Plus-CoGTSnEd.js";import{i as vs}from"./SearchLg-BvCfRAbg.js";import{P as xs,a as bs,b as ys}from"./popover-QnaOlHhb.js";import{a as pt,b as ht,c as hr,d as gr,e as vr,C as xr}from"./command-bqq51nHs.js";import{d as ws,a as ks}from"./use-virtual-mcp-CmFx7CJY.js";import{c as br,d as fn,f as Ps}from"./sandbox-lifecycle-context-BfUCaKZp.js";import{e as Ss,d as js}from"./backoff-8mStPHYB.js";import{a as Es}from"./thread-intent-CnRICyzb.js";import{u as yr}from"./use-session-runtime-CGqfWswP.js";import{u as Ns}from"./use-mobile-DVkjqQzh.js";import{c as lt,T as ct,a as dt}from"./tooltip-BGb6Kdym.js";import{T as Ie}from"./toolbar-icon-button-DPZ8v-BD.js";import{b as Cs,a as Rs,u as wr,g as Ts,c as Ls,B as nn,P as Os,r as _s,R as As,d as Ds,e as pn,f as kr,h as $s,l as Fs,m as Ms,i as Bs,p as zs,j as Is,S as rn}from"./runnable-block-editor-MngLlGqF.js";import{w as Ot}from"./variant-matcher-override-dOY9vOi0.js";import{N as Ks,b as Hs,s as tt,n as hn,c as Pr,f as Ke,v as Sr,h as Us,e as Ws,d as Vs,j as qs,k as Yn}from"./claim-phase-copy-0btUuJoC.js";import{r as Gs,w as Js,D as Ys,b as Qn,a as Qs}from"./section-preview-url-Csj0_ZDg.js";import{u as Zs}from"./use-fast-preview-draft-url-JPVt7oTt.js";import{r as jr,l as Er,u as Xs,w as ea}from"./last-preview-page-CriZ3Ybr.js";import{u as ta}from"./use-is-desktop-app-BNujXJc_.js";import{a as na,c as Nr}from"./shell-layout-BMyUKhgs.js";import{u as cn}from"./useQueries-D09LYNgo.js";import{i as ra}from"./ArrowRight-Cl3bzAIC.js";import{b as Cr,D as Rr,c as Tr,d as Lr,e as sa}from"./dialog-yUWKJPsU.js";import{I as Zn}from"./input-4CSpUSQl.js";import{u as Or}from"./blocks-preview-workspace-context-CuzoVyh9.js";import{i as aa}from"./AlertCircle-3PzOAmGf.js";import{E as gn}from"./empty-state-1TOptJ4i.js";import{i as ia}from"./X-BmPcW1eb.js";import{M as oa}from"./monaco-editor-BTTiRg3C.js";import{R as Xn,a as _t,b as er}from"./resizable-YNqh8MUH.js";import{r as la}from"./virtual-mcp-BaEt1QHH.js";import{b as sn}from"./use-project-scope-_WcnrAA6.js";import{G as tr}from"./github-icon-BJ-JIGKg.js";import{R as ca}from"./repository-import-picker-IY5VTzNS.js";import{r as da}from"./use-main-panel-tabs-C86PuGT_.js";import{u as ua}from"./use-task-metadata-Cd-4aUjL.js";import{b as ma}from"./thread-route-CTwlz0m2.js";import"./use-panel-navigate-DMG8fP2m.js";import"./feature-paywall-CFcsZgv5.js";import"./plan-ladder-Jef48mB3.js";import"./use-entitlements-BGdUcutE.js";import"./autosend-CESqNA2a.js";import"./hooks-GmRpr8h8.js";import"./use-mcp-client-Br7XFHza.js";import"./auth-DvTDuEnH.js";import"./task-board-iF-5OywY.js";import"./schema-C2CxTC2d.js";import"./use-ai-providers-Cxi0vxkS.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CuJ7CkFw.js";import"./use-organization-settings-DalrVcZ1.js";import"./Tool01-DbFf2Je1.js";import"./ArrowUp-Bmd2w7Fx.js";import"./ArrowLeft-JCMxLp8E.js";import"./Tool02-Hh7HLEzm.js";import"./TrendUp01-ZTgT_kdi.js";import"./ZoomOut-DtzZmmbM.js";import"./Globe04-CCIm2Cf2.js";import"./CheckCircle-Co3IBXeH.js";import"./UserSquare-C4_QxRGQ.js";import"./Copy01-BYK2zIkj.js";import"./CreditCard01-C7PO4dVs.js";import"./DotsVertical-BozfeMf6.js";import"./Download01-Z6w2IrLj.js";import"./Settings02-azWHb0MO.js";import"./Eye-ChO6k3fk.js";import"./Share07-CW1RSVqD.js";import"./Globe01-D3UtmZtY.js";import"./XClose-BhXJw65F.js";import"./Image01-Dx7ea-3O.js";import"./Key01-B8q0d-op.js";import"./LayoutLeft-DUo3bbMr.js";import"./Link01-C-mBEv93.js";import"./Monitor01-CevElukI.js";import"./Sun-Cx4zdBZx.js";import"./Package-C6yqPbb7.js";import"./Palette-B2v8R7_D.js";import"./Play-D26LBNWf.js";import"./SearchMd-C0e2gT30.js";import"./Stars01-Ch2E4B6o.js";import"./Trash01-D8ICnU7E.js";import"./Upload01-BoLmU8be.js";import"./User01-CQXsOD6P.js";import"./Users01-mzXfNn0j.js";import"./XCircle-jpeASVbU.js";import"./Zap-Cc5rEM6R.js";import"./index-Bxbv_23l.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./index-DAWDSRE3.js";import"./decofile-api-DlO_JJTI.js";import"./utils-Bn3HByb8.js";import"./pair-TxCwxPu7.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-D3vKPIBT.js";import"./use-copy-BhRM5JUh.js";import"./usage-stats-UqDPk1rl.js";import"./markdown-Cyp9lJ5l.js";import"./org-file-open-context-ZSKUsYTL.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-swczxBq4.js";import"./types-CyZPxJ7C.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BqcIzR1f.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-CvV2x5yz.js";import"./integration-icon-1ySWGOUX.js";import"./use-connection-C2XMAF5j.js";import"./use-navigate-to-agent-LXQlcEnV.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-C6590AFl.js";import"./index-CuhH8P7u.js";import"./form-D4fabgxt.js";import"./label-BNElcQf4.js";import"./use-thread-outputs-B1ptcJGL.js";import"./file-type-icon-C7b31Eu-.js";import"./scroll-area-IfiqBxp0.js";import"./select-47N7H1PV.js";import"./calendar-BhMl9dZ9.js";import"./textarea-DbE6fIU0.js";import"./rich-text-link-control-BExHOMAv.js";import"./switch-DUPW32_G.js";import"./safe-image-url-D5z803Ot.js";import"./search-input-_eiEHUe0.js";import"./tabs-uJDG1LT-.js";import"./use-debounced-value-CoGGtS8x.js";import"./use-file-configs-CrAdkDbm.js";import"./asset-utils-B2xrnUou.js";import"./useInfiniteQuery-KPKjfQBF.js";import"./infiniteQueryObserver-QHtAxfIQ.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-ofCffann.js";import"./alert-dialog-CMdGVc5y.js";import"./sandbox-git-api-CMdpE2TE.js";import"./avatar-CsDZ0T22.js";import"./download-app-dialog-CnJNRM3l.js";import"./project-icon-DeL96Npe.js";import"./required-auth-layout-C1pT7wzX.js";import"./use-org-sso-zl0gtui9.js";import"./editor-9_pChBN4.js";import"./repository-picker-BZKrcN4Y.js";import"./collection-search-BmT0oV8g.js";import"./use-route-default-main-fIaACxCL.js";import"./use-mcp-tools-DpaWZTAA.js";import"./index-BIAbKV8r.js";import"./drawer-CFueQivP.js";import"./input-BGhe0a85.js";import"./chat-draft-CZ4LRf6I.js";import"./use-deco-credits-CKQJlHZi.js";import"./use-open-billing-url-Bage8zng.js";import"./decopilot-BbHxwoKU.js";import"./checkbox-BoN76eap.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-CLccaHLm.js";import"./input-CRD8MdDS.js";import"./hooks-CzhqOgxt.js";import"./use-org-fs-CJMhF9AL.js";import"./question-004-sINsf4GQ.js";import"./use-members-buh6Kqlm.js";import"./use-org-auth-client-cknSmCL5.js";import"./add-connection-dialog-DqhI8LLv.js";import"./extract-connection-data-B7yRd0El.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DlOqhGn3.js";import"./connection-card-Dh4yj-V8.js";import"./use-registry-connections-BQknTkkv.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-DoXq4oCN.js";import"./authenticate-and-persist-oauth-CyEJ3ZKP.js";import"./mcp-oauth-S1Th8e_4.js";import"./collection-tabs-D6Sk9riW.js";import"./badge-BMuU0t5h.js";import"./use-infinite-scroll-LXktD04_.js";import"./useSuspenseInfiniteQuery-97L-Gf2j.js";import"./use-project-native-view-presence-DB5jQXqg.js";import"./site-slug-uya6Wp4-.js";const fa={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function pa(t){const{previewState:e,progressStatus:s,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,c=u?null:t.previewServerUrl;return e.kind==="suspended"||e.kind==="errored"?fa:r&&i&&c?{mode:"production",iframeBase:c,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&s!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:c?{mode:"production",iframeBase:c,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const ha=1e4,ga=1e3,va=3e4;function xa({iframeRef:t,src:e,active:s}){const r=x.useRef(0),i=x.useRef(null),u=x.useRef(null),c=x.useRef(e),d=x.useRef(s);c.current=e,d.current=s;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},l=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},ha)},h=()=>{if(!d.current||!c.current)return;u.current&&clearTimeout(u.current);const E=Ss(va,ga,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,P=c.current;!g||!P||!d.current||(g.src=P,l())},E)},f=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return x.useEffect(()=>{if(o(),r.current=0,!(!s||!e))return l(),o},[e,s]),{handleLoad:f,handleError:p}}var nr;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(nr||(nr={}));const ba=Ft({tag:Ee(),id:Ee(),classes:Ee(),text:Ee(),html:Ee(),manifestKey:Ee().nullable(),componentName:Ee().nullable(),parents:Ee(),url:Ee(),path:Ee(),viewport:Ft({width:et(),height:et()}),position:Ft({x:et(),y:et()})}),ya=`(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 wa(t,e){const s=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 s;const c=(p,E)=>{const g=t[r[p]??0];return!g||!g.length?1:g.indexOf(e[E]??"")>=0?2:0},d=[],o=[];for(let p=0;p<=i;p++)d.push(new Array(u+1).fill(0)),o.push(new Array(u+1).fill(2));for(let p=1;p<=i;p++){const E=d[p-1]??[],g=d[p]??[],P=o[p]??[];for(let b=1;b<=u;b++){let v=E[b]??0,R=2;const y=g[b-1]??0;y>v&&(v=y,R=0);const w=c(p-1,b-1),k=(E[b-1]??0)+w;w>0&&k>v&&(v=k,R=1),g[b]=v,P[b]=R}}let l=0,h=i,f=u;for(;h>0&&f>0;){const p=o[h]?.[f]??2;p===1?(s[r[h-1]??0]=f-1,l++,h--,f--):p===0?f--:h--}if(l===0&&u===i)for(let p=0;p<i;p++)s[r[p]??0]=p;return s}const ka=Ft({sectionIndex:et(),manifestKey:Ee(),clickSeq:et()}),rr=`(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 = ${wa.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 dn(t,e){let s=t,r=typeof s?.__resolveType=="string"?s.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const c=u.__resolveType;if(typeof c=="string"&&c&&c!==r){s=u,r=c;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(s.variants)?s.variants:[];if(i.length===0||i.every(d=>d?.rule?.__resolveType===Ks))return null;const c=[];for(const d of i){const o=d?.value;if(o&&typeof o=="object")for(const l of dn(o,e)??[])c.includes(l)||c.push(l)}return c}if(Hs(r)){const i=s.section&&typeof s.section=="object"?dn(s.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Xe(t){return t.replace(/[`*_]/g,"\\$&")}function Pa(t,e){const s=[`The user selected an element on the live preview and asked: **"${Xe(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&&s.push(`**Section resolveType:** \`${Xe(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="${Xe(t.classes)}"`:""}>`;s.push(`**Clicked element:** \`${r}\``),t.parents&&s.push(`**DOM breadcrumb:** ${Xe(t.parents)} > ${t.tag}`),t.text&&s.push(`**Text content:** "${Xe(t.text)}"`),t.componentName&&s.push(`**Component name:** ${Xe(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return s.push("","**HTML snippet:**","```html",i,"```"),s.push("","Please read the source file, locate the element, and apply the requested change."),s.join(`
|
|
518
|
+
`)}function Sa(t,e,s=320,r=44,i=12){const{x:u,y:c}=t,{width:d,height:o}=e,l=Math.max(i,Math.min(u-s/2,d-s-i)),f=c/o>.68?Math.max(i,c-r-18):Math.min(c+18,o-r-i);return{leftPct:l/d*100,topPct:f/o*100}}function ja(t){const e=ue.c(45),{element:s,onDismiss:r}=t,[i,u]=x.useState(""),c=x.useRef(null),{sendMessage:d}=fs(),{openSidePanel:o}=na(),l=Le();let h;e[0]!==s||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==d?(h=()=>{if(!i.trim())return;const B=Pa(s,i);o(),d({parts:[{type:"text",text:B}]}),r()},e[0]=s,e[1]=i,e[2]=r,e[3]=o,e[4]=d,e[5]=h):h=e[5];const f=h;let p;e[6]!==s.position||e[7]!==s.viewport?(p=Sa(s.position,s.viewport),e[6]=s.position,e[7]=s.viewport,e[8]=p):p=e[8];const E=p,g=`${E.leftPct}%`,P=`${E.topPct}%`;let b;e[9]!==g||e[10]!==P?(b={left:g,top:P,width:"320px"},e[9]=g,e[10]=P,e[11]=b):b=e[11];let v;e[12]!==f?(v=B=>{B.preventDefault(),f()},e[12]=f,e[13]=v):v=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=B=>u(B.target.value),e[14]=R):R=e[14];let y;e[15]!==r?(y=B=>{B.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let w;e[17]!==l?(w=l("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=l,e[18]=w):w=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==w?(k=n.jsx("input",{ref:c,autoFocus:!0,type:"text",value:i,onChange:R,onKeyDown:y,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=w,e[22]=k):k=e[22];let S;e[23]!==i?(S=i.trim(),e[23]=i,e[24]=S):S=e[24];const T=!S;let j;e[25]!==l?(j=l("sandbox.visualEditorPrompt.sendButton"),e[25]=l,e[26]=j):j=e[26];let H;e[27]!==l?(H=l("sandbox.visualEditorPrompt.sendButton"),e[27]=l,e[28]=H):H=e[28];let J;e[29]!==H?(J=n.jsx("title",{children:H}),e[29]=H,e[30]=J):J=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=M):M=e[31];let L;e[32]!==J?(L=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[J,M]}),e[32]=J,e[33]=L):L=e[33];let _;e[34]!==T||e[35]!==j||e[36]!==L?(_=n.jsx("button",{type:"submit",disabled:T,className:"flex h-6 w-6 shrink-0 items-center justify-center classic:rounded-full compact:rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:L}),e[34]=T,e[35]=j,e[36]=L,e[37]=_):_=e[37];let A;e[38]!==k||e[39]!==_||e[40]!==v?(A=n.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:v,children:[k,_]}),e[38]=k,e[39]=_,e[40]=v,e[41]=A):A=e[41];let W;return e[42]!==A||e[43]!==b?(W=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:A}),e[42]=A,e[43]=b,e[44]=W):W=e[44],W}const sr="site-links",Ea=/details?page|\bpdp\b/i,Na=/listingpage|\bplp\b/i;function Ca(t,e,s){const r=new Set;for(const d of s)Ea.test(d)&&r.add("product"),Na.test(d)&&r.add("category");const i=tt(hn(t)),u=i[i.length-1],c=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&c?.type==="param"&&c.name===e&&r.add("product"),e==="*"&&i.some(d=>d.type==="param"&&d.name==="*")&&r.add("category"),r}const Ra=["rosa","preto","pink","black"];function At(t,e){const s=e.trim();return s?t(s):Ra.flatMap(r=>t(r))}function Ta(t,e){const s=e.trim(),r=[];/^\d+$/.test(s)&&r.push({resolveType:t,props:{ids:[s]}});const u=s.includes("-")&&!/\s/.test(s)?s.replace(/-+/g," "):s;return r.push({resolveType:t,props:{query:u,count:10}}),r}const _r=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function vn(t){return t.split("/")[0]??""}function La(t){const e=new Set;for(const s of t){const r=vn(s);_r.has(r)&&e.add(r)}return e}function Oa(t,e){const s=vn(t);return!_r.has(s)||e.size===0?!0:e.has(s)}const _a=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>At(s=>Ta(t,s),e),optionsFromPayload:Dt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>At(s=>[{resolveType:t,props:{props:{search:s,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Dt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>At(s=>[{resolveType:t,props:{term:s,hitsPerPage:10}}],e),optionsFromPayload:Dt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>At(s=>[{resolveType:t,props:{query:s,term:s,count:10,hitsPerPage:10}}],e),optionsFromPayload:Dt},{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:za}];function Aa(t,e,s=new Set){const r=[...e],i=d=>{const o=[];for(const l of _a){if(l.kind!==d)continue;const h=r.find(f=>l.test(f)&&Oa(f,s));h&&o.push({cand:l,resolveType:h})}return o.find(l=>s.has(vn(l.resolveType)))??o[0]},u=(d,o,l)=>({kind:d.kind,id:`${d.kind}:${o}`,resolveType:o,clientFilter:d.clientFilter,isFallback:l,buildRequests:h=>d.buildRequests(o,h),optionsFromPayload:d.optionsFromPayload}),c=[];for(const d of["product","category"]){if(!t.has(d))continue;const o=i(d);o&&c.push(u(o.cand,o.resolveType,!1))}return t.size>0&&c.push(Da(t.has("category")?"category":"product")),c}function Da(t){return{kind:t,id:sr,resolveType:sr,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,s)=>Wa(e,s)}}function Ge(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function $a(t,e,s){const r=new Set,i=new Set,u=c=>{if(Array.isArray(c)){for(const l of c)u(l);return}const d=Ge(c);if(!d)return;const o=d.__resolveType;if(typeof o=="string"){if(s(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const l=Ge(e[o])?.__resolveType;typeof l=="string"&&s(l)&&r.add(o),u(e[o])}}for(const l of Object.values(d))u(l)};return u(t),r}function Ar(t){const e=new Set,s=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),s.push(i));return s}function Dr(t){try{return decodeURIComponent(t)}catch{return t}}function Fa(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ma(t){const e=[];let s="^";for(const r of t)r.type==="text"?s+=Fa(r.text):(e.push(r.name),s+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${s}$`),order:e}}function $r(t,e,s){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=tt(hn(e)),{pattern:u,order:c}=Ma(i),d=c.indexOf(s);if(d===-1)return null;const o=r.match(u);if(!o)return null;const l=o[d+1]?.replace(/^\/+|\/+$/g,"");return l?Dr(l):null}function Dt(t,e){const s=Ge(t),r=Array.isArray(t)?t:Array.isArray(s?.products)?s.products:Array.isArray(s?.list)?s.list:[],i=[],u=new Set;for(const c of r){const d=Ge(c);if(!d)continue;const o=$r(d.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const l=Ge(d.isVariantOf),h=typeof l?.name=="string"&&l.name||typeof d.name=="string"&&d.name||o,f=Array.isArray(d.image)?Ge(d.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:o,label:h,image:p})}return i}function Ba(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const s=e.replace(/^\/+|\/+$/g,"");return s?Dr(s):null}function za(t){const e=[],s=new Set,r=(i,u)=>{const c=Ge(i);if(!c)return;const d=typeof c.name=="string"&&c.name?c.name:"",o=d?[...u,d]:u,l=Ba(c.url);if(l&&!s.has(l)&&(s.add(l),e.push({value:l,label:o.join(" › ")||l})),Array.isArray(c.children))for(const h of c.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const Ia=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 Ka(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,s=>s.toUpperCase())}function Ha(t){if(typeof t!="string"||!t)return[];const e=[],s=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=s.exec(t))!==null&&i++<5e3;){const u=r[1]??"",c=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:c})}return e}function Ua(t){if(typeof t!="string"||!t)return[];const e=[],s=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,c=0;for(;(u=r.exec(t))!==null&&c++<3e3;){const d=(u[1]??"").replace(/\\\//g,"/");if(!d||s.has(d))continue;s.add(d);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:d,name:u[2]??"",image:o||void 0})}return e}function Wa(t,e){const s=[],r=new Set,i=(u,c,d,o)=>{if(s.length>=200)return;const l=$r(u,e.template,e.paramName);!l||r.has(l)||e.paramName==="*"&&/(^|\/)p$/.test(l)||d==="category"&&Ia.has(l.split("/")[0]??"")||(r.add(l),s.push({value:l,label:c&&c.length<=80?c:Ka(l),kind:d,image:o}))};for(const{url:u,name:c,image:d}of Ua(t))i(u,c,"product",d);for(const{href:u,text:c}of Ha(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,c,"category");return s}function ut(t,e,s=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,s)}const Fr=1e4;function Va(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 qa(t,{resolveType:e,props:s}){const r=await fetch(Cs(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...s}),signal:AbortSignal.timeout(Fr)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function ar(t,e){const s=await fetch(Rs(t,e),{signal:AbortSignal.timeout(Fr)});if(!s.ok)throw new Error(`Failed to fetch page: ${s.status}`);return s.text()}async function Ga(t,e,s){const r=e.optionsFromPayload(await ar(t,"/"),s),i=r.find(c=>c.kind==="category");if(!i)return r;const u=Ke(s.template,{[s.paramName]:i.value});if(u==="/")return r;try{const c=e.optionsFromPayload(await ar(t,u),s).filter(d=>d.kind==="product");return Ar([r,c])}catch{return r}}function Ja(t,e,s){return as.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":s}`)}async function Ya(t,e,s,r){if(e.homepageLinks)return Ga(t,e,r);const i=e.buildRequests?.(s)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(d=>qa(t,d))),c=u.filter(d=>d.status==="fulfilled").map(d=>d.value);if(c.length===0){const d=u.find(o=>o.status==="rejected");throw d?d.reason:new Error("Failed to fetch options")}return Ar(c.map(d=>e.optionsFromPayload(d,r)))}function un(t,e,s,r,i){return{queryKey:Ja(t,e,s),queryFn:()=>Ya(t,e,s,r),enabled:i,staleTime:6e4,retry:1}}function mt(t){const e=ue.c(16),{heading:s,iconKind:r,options:i,template:u,paramName:c,keyPrefix:d,onSelect:o}=t;if(i.length===0)return null;let l;if(e[0]!==r||e[1]!==d||e[2]!==o||e[3]!==i||e[4]!==c||e[5]!==u){let f;e[7]!==r||e[8]!==d||e[9]!==o||e[10]!==c||e[11]!==u?(f=p=>n.jsxs(ht,{value:`${d}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&n.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?n.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(pr,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:p.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Ke(u,{[c]:p.value})})]})]},`${d}:${p.value}`),e[7]=r,e[8]=d,e[9]=o,e[10]=c,e[11]=u,e[12]=f):f=e[12],l=i.map(f),e[0]=r,e[1]=d,e[2]=o,e[3]=i,e[4]=c,e[5]=u,e[6]=l}else l=e[6];let h;return e[13]!==s||e[14]!==l?(h=n.jsx(pt,{heading:s,children:l}),e[13]=s,e[14]=l,e[15]=h):h=e[15],h}function ir(t){const e=ue.c(2),{text:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function or(t){const e=ue.c(52),{sources:s,template:r,paramName:i,value:u,sandboxRef:c,onCommit:d}=t,o=Le(),[l,h]=x.useState(!1),[f,p]=x.useState(""),[E,g]=x.useState(""),P=x.useRef(null),b=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,v=Va(o),y=[...new Set(s.map(V=>v[V.kind].noun))].join(" or ");let w;e[0]!==o||e[1]!==y?(w=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=w):w=e[2];const k=w,S={template:r,paramName:i};let T;e[3]!==f?(T=(V,Z)=>({source:V,query:Z,options:V.clientFilter?ut(Z.data??[],f):Z.data??[]}),e[3]=f,e[4]=T):T=e[4];const j=T,H=s.filter(si),J=s.filter(ri),M=cn({queries:H.map(V=>un(c,V,E,S,l))});let L;e[5]!==M||e[6]!==j?(L=(V,Z)=>j(V,M[Z]),e[5]=M,e[6]=j,e[7]=L):L=e[7];const _=H.map(L),A=_.length===0||_.every(ni),W=cn({queries:J.map(V=>un(c,V,E,S,l&&A))});let B;e[8]!==W||e[9]!==j?(B=(V,Z)=>j(V,W[Z]),e[8]=W,e[9]=j,e[10]=B):B=e[10];const X=J.map(B),I=A?X:_,$=I.length===1&&I[0]?.source.homepageLinks?I[0]:null,C=$&&!$.query.isLoading&&!$.query.isError?$?.query.data??[]:[],se=ut(C.filter(ti),f),Y=ut(C.filter(ei),f),Ne=se.length>0&&Y.length>0,ee=V=>{h(V),P.current&&clearTimeout(P.current),p(V?u:""),g(V?u:"")};let F;e[11]===Symbol.for("react.memo_cache_sentinel")?(F=V=>{p(V),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{g(V)},300)},e[11]=F):F=e[11];const ae=F,q=V=>{d(V),ee(!1)},Q=Pr(f),we=Ke(r,{[i]:Q}),te=Rr,K=Cr,me="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",pe=Xa;let ne;e[12]!==b||e[13]!==o?(ne=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=o,e[14]=ne):ne=e[14];let re;e[15]!==ne?(re=n.jsx(Tr,{className:"sr-only",children:n.jsx(Lr,{children:ne})}),e[15]=ne,e[16]=re):re=e[16];let xe;e[17]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(pr,{size:16,className:"shrink-0 text-foreground"}),e[17]=xe):xe=e[17];let le;e[18]!==o?(le=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=le):le=e[19];let he;e[20]!==b?(he=n.jsx("span",{className:"rounded-sm bg-violet-500/15 px-1 py-0.5 font-mono text-[12px] text-violet-600 dark:text-violet-400",children:b}),e[20]=b,e[21]=he):he=e[21];let ie;e[22]!==le||e[23]!==he?(ie=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[xe,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[le," ",he]})]}),e[22]=le,e[23]=he,e[24]=ie):ie=e[24];const ge=gr,nt=!1,Oe="min-h-0 flex-1";let be;e[25]!==k||e[26]!==f?(be=n.jsx(vr,{autoFocus:!0,placeholder:k,value:f,onValueChange:ae}),e[25]=k,e[26]=f,e[27]=be):be=e[27];const Ce=hr,zt="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let fe;e[28]!==o?(fe=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=fe):fe=e[29];let _e;e[30]!==fe?(_e=n.jsx(xr,{children:fe}),e[30]=fe,e[31]=_e):_e=e[31];const He=Q&&n.jsx(pt,{className:"shrink-0",children:n.jsxs(ht,{value:`__raw__:${Q}`,className:"gap-3 py-2",onSelect:()=>q(Q),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(ra,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:Q,paramLabel:b})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:we})]})]})}),$e=Ne?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(mt,{heading:v.category.heading,iconKind:"category",options:se,template:r,paramName:i,keyPrefix:`${$?.source.id}:cat`,onSelect:q})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(mt,{heading:v.product.heading,iconKind:"product",options:Y,template:r,paramName:i,keyPrefix:`${$?.source.id}:prod`,onSelect:q})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:I.map(V=>{const{source:Z,query:G,options:ve}=V,{noun:Ae}=v[Z.kind];if(G.isLoading)return n.jsx(ir,{text:o("sandbox.pathParamPickerChip.loading",{noun:Ae})},Z.id);if(G.isError)return n.jsx(ir,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},Z.id);if(Z.homepageLinks){const gt=G.data??[];return n.jsxs(x.Fragment,{children:[n.jsx(mt,{heading:v.category.heading,iconKind:"category",options:ut(gt.filter(Za),f),template:r,paramName:i,keyPrefix:`${Z.id}:cat`,onSelect:q}),n.jsx(mt,{heading:v.product.heading,iconKind:"product",options:ut(gt.filter(Qa),f),template:r,paramName:i,keyPrefix:`${Z.id}:prod`,onSelect:q})]},Z.id)}return n.jsx(mt,{heading:I.length>1?v[Z.kind].heading:void 0,iconKind:Z.kind,options:ve,template:r,paramName:i,keyPrefix:Z.id,onSelect:q},Z.id)})});let ke;e[32]!==Ce||e[33]!==_e||e[34]!==He||e[35]!==$e?(ke=n.jsxs(Ce,{className:zt,children:[_e,He,$e]}),e[32]=Ce,e[33]=_e,e[34]=He,e[35]=$e,e[36]=ke):ke=e[36];let Fe;e[37]!==ge||e[38]!==be||e[39]!==ke?(Fe=n.jsxs(ge,{shouldFilter:nt,className:Oe,children:[be,ke]}),e[37]=ge,e[38]=be,e[39]=ke,e[40]=Fe):Fe=e[40];let ye;e[41]!==K||e[42]!==re||e[43]!==ie||e[44]!==Fe||e[45]!==pe?(ye=n.jsxs(K,{className:me,onClick:pe,children:[re,ie,Fe]}),e[41]=K,e[42]=re,e[43]=ie,e[44]=Fe,e[45]=pe,e[46]=ye):ye=e[46];let Ue;return e[47]!==te||e[48]!==ee||e[49]!==l||e[50]!==ye?(Ue=n.jsx(te,{open:l,onOpenChange:ee,children:ye}),e[47]=te,e[48]=ee,e[49]=l,e[50]=ye,e[51]=Ue):Ue=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate classic:rounded-sm compact:rounded-lg bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400",onClick:V=>{V.stopPropagation(),ee(!0)},children:u||b}),Ue]})}function Qa(t){return t.kind==="product"}function Za(t){return t.kind!=="product"}function Xa(t){return t.stopPropagation()}function ei(t){return t.kind==="product"}function ti(t){return t.kind!=="product"}function ni(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ri(t){return t.isFallback}function si(t){return!t.isFallback}function ai(t){const e=ue.c(8),{sources:s,template:r,paramName:i,sandboxRef:u,onFill:c}=t;let d,o;if(e[0]!==i||e[1]!==u||e[2]!==s||e[3]!==r){const E={template:r,paramName:i},g=s.filter(ii);o=cn,d=g.map(P=>un(u,P,"",E,!0)),e[0]=i,e[1]=u,e[2]=s,e[3]=r,e[4]=d,e[5]=o}else d=e[4],o=e[5];let l;e[6]!==d?(l={queries:d},e[6]=d,e[7]=l):l=e[7];const h=o(l),[f,p]=x.useState(!1);if(!f)for(const E of h){if(E.isLoading)break;const g=E.data?.[0];if(g){p(!0),queueMicrotask(()=>c(g.value));break}}return null}function ii(t){return!t.isFallback}function lr(t){const e=ue.c(31),{name:s,value:r,onCommit:i}=t,u=Le(),[c,d]=x.useState(r),[o,l]=x.useState(!1),h=x.useRef(!1);let f;e[0]!==s||e[1]!==u?(f=s==="*"?u("sandbox.preview.catchAllParamLabel"):`:${s}`,e[0]=s,e[1]=u,e[2]=f):f=e[2];const p=f,E=c||p;let g;e[3]!==E?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=g):g=e[4];let P;e[5]!==p||e[6]!==u?(P=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=P):P=e[7];let b,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>d(j.target.value),v=()=>l(!0),e[8]=b,e[9]=v):(b=e[8],v=e[9]);let R;e[10]!==r?(R=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,d(r),j.currentTarget.blur())},e[10]=r,e[11]=R):R=e[11];let y;e[12]!==c||e[13]!==i||e[14]!==r?(y=()=>{if(l(!1),h.current){h.current=!1;return}const j=Pr(c);d(j),j!==r&&i(j)},e[12]=c,e[13]=i,e[14]=r,e[15]=y):y=e[15];let w;e[16]!==c||e[17]!==p||e[18]!==P||e[19]!==R||e[20]!==y?(w=n.jsx("input",{type:"text",value:c,placeholder:p,title:P,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-violet-500/15 px-1 text-[12px] text-violet-600 outline-none placeholder:text-violet-500/60 focus:bg-violet-500/25 dark:text-violet-400",onClick:oi,onChange:b,onFocus:v,onKeyDown:R,onBlur:y}),e[16]=c,e[17]=p,e[18]=P,e[19]=R,e[20]=y,e[21]=w):w=e[21];let k;e[22]!==g||e[23]!==w?(k=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,w]}),e[22]=g,e[23]=w,e[24]=k):k=e[24];let S;e[25]!==o||e[26]!==u?(S=o&&n.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:[n.jsx(ps,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=S):S=e[27];let T;return e[28]!==S||e[29]!==k?(T=n.jsxs(n.Fragment,{children:[k,S]}),e[28]=S,e[29]=k,e[30]=T):T=e[30],T}function oi(t){return t.stopPropagation()}function li(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const s=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${s.host}${r}`}catch{return e}}function ci(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function di(t){const e=ue.c(5);let s;e[0]!==t?(s=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=s):s=e[1];const r=wr(s);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:c,path:d,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const l=Ts(c),h=o?{...o,name:c,path:d}:Ls(c,d);return await r.mutateAsync({blockKey:l,data:h}),{key:l,name:c,path:d}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],is(i)}function ui(t){const e=ue.c(89),{open:s,onOpenChange:r,isPending:i,error:u,templates:c,onSubmit:d}=t,o=i===void 0?!1:i,l=Le();let h;e[0]!==l?(h=l("sectionsEditor.createPageModal.defaultPageName"),e[0]=l,e[1]=h):h=e[1];const[f,p]=x.useState(h);let E;e[2]!==l?(E=l("sectionsEditor.createPageModal.defaultPagePath"),e[2]=l,e[3]=E):E=e[3];const[g,P]=x.useState(E),[b,v]=x.useState(nn),[R,y]=x.useState(null),[w,k]=x.useState(s);s!==w&&(k(s),s&&(p(l("sectionsEditor.createPageModal.defaultPageName")),P(l("sectionsEditor.createPageModal.defaultPagePath")),v(nn),y(null)));const S=!!c?.length;let T;e[4]!==o||e[5]!==r?(T=le=>{!le&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=T):T=e[6];const j=T;let H;e[7]!==o||e[8]!==f||e[9]!==d||e[10]!==g||e[11]!==S||e[12]!==b?(H=async le=>{le.preventDefault();const he=f.trim(),ie=g.trim();if(!he||!ie||o)return;const ge=Sr(ie);if(ge){y(ge);return}y(null),await d({name:he,path:ie,templateKey:S&&b!==nn?b:null})},e[7]=o,e[8]=f,e[9]=d,e[10]=g,e[11]=S,e[12]=b,e[13]=H):H=e[13];const J=H,M=R??u;let L;e[14]!==l?(L=l("sectionsEditor.createPageModal.title"),e[14]=l,e[15]=L):L=e[15];let _;e[16]!==L?(_=n.jsx(Tr,{children:n.jsx(Lr,{children:L})}),e[16]=L,e[17]=_):_=e[17];let A;e[18]!==l?(A=l("sectionsEditor.createPageModal.nameLabel"),e[18]=l,e[19]=A):A=e[19];let W;e[20]!==A?(W=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:A}),e[20]=A,e[21]=W):W=e[21];let B;e[22]===Symbol.for("react.memo_cache_sentinel")?(B=le=>p(le.target.value),e[22]=B):B=e[22];let X;e[23]!==l?(X=l("sectionsEditor.createPageModal.namePlaceholder"),e[23]=l,e[24]=X):X=e[24];let I;e[25]!==o||e[26]!==f||e[27]!==X?(I=n.jsx(Zn,{id:"new-page-name",value:f,onChange:B,placeholder:X,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=X,e[28]=I):I=e[28];let $;e[29]!==I||e[30]!==W?($=n.jsxs("div",{className:"space-y-1.5",children:[W,I]}),e[29]=I,e[30]=W,e[31]=$):$=e[31];let U;e[32]!==l?(U=l("sectionsEditor.createPageModal.pathLabel"),e[32]=l,e[33]=U):U=e[33];let C;e[34]!==U?(C=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:U}),e[34]=U,e[35]=C):C=e[35];let se;e[36]===Symbol.for("react.memo_cache_sentinel")?(se=le=>P(le.target.value),e[36]=se):se=e[36];let Y;e[37]!==l?(Y=l("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=l,e[38]=Y):Y=e[38];let Ne;e[39]!==o||e[40]!==g||e[41]!==Y?(Ne=n.jsx(Zn,{id:"new-page-path",value:g,onChange:se,placeholder:Y,disabled:o}),e[39]=o,e[40]=g,e[41]=Y,e[42]=Ne):Ne=e[42];let ee;e[43]!==C||e[44]!==Ne?(ee=n.jsxs("div",{className:"space-y-1.5",children:[C,Ne]}),e[43]=C,e[44]=Ne,e[45]=ee):ee=e[45];let F;e[46]!==o||e[47]!==S||e[48]!==l||e[49]!==b||e[50]!==c?(F=S&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:l("sectionsEditor.createPageModal.templateLabel")}),n.jsx(Os,{id:"new-page-template",value:b,onChange:v,templates:c??[],disabled:o})]}),e[46]=o,e[47]=S,e[48]=l,e[49]=b,e[50]=c,e[51]=F):F=e[51];let ae;e[52]!==M?(ae=M&&n.jsx("p",{className:"text-xs text-destructive",children:M}),e[52]=M,e[53]=ae):ae=e[53];let q;e[54]!==$||e[55]!==ee||e[56]!==F||e[57]!==ae?(q=n.jsxs("div",{className:"space-y-4 py-4",children:[$,ee,F,ae]}),e[54]=$,e[55]=ee,e[56]=F,e[57]=ae,e[58]=q):q=e[58];let Q;e[59]!==r?(Q=()=>r(!1),e[59]=r,e[60]=Q):Q=e[60];let we;e[61]!==l?(we=l("sectionsEditor.createPageModal.cancelButton"),e[61]=l,e[62]=we):we=e[62];let te;e[63]!==o||e[64]!==Q||e[65]!==we?(te=n.jsx(Je,{type:"button",variant:"outline",onClick:Q,disabled:o,children:we}),e[63]=o,e[64]=Q,e[65]=we,e[66]=te):te=e[66];let K;e[67]!==o||e[68]!==f||e[69]!==g?(K=!f.trim()||!g.trim()||o,e[67]=o,e[68]=f,e[69]=g,e[70]=K):K=e[70];let me;e[71]!==o||e[72]!==l?(me=o?n.jsxs(n.Fragment,{children:[n.jsx(Mt,{className:"size-3.5"}),l("sectionsEditor.createPageModal.creatingButton")]}):l("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=l,e[73]=me):me=e[73];let pe;e[74]!==K||e[75]!==me?(pe=n.jsx(Je,{type:"submit",disabled:K,children:me}),e[74]=K,e[75]=me,e[76]=pe):pe=e[76];let ne;e[77]!==te||e[78]!==pe?(ne=n.jsxs(sa,{children:[te,pe]}),e[77]=te,e[78]=pe,e[79]=ne):ne=e[79];let re;e[80]!==J||e[81]!==q||e[82]!==ne||e[83]!==_?(re=n.jsx(Cr,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:J,children:[_,q,ne]})}),e[80]=J,e[81]=q,e[82]=ne,e[83]=_,e[84]=re):re=e[84];let xe;return e[85]!==j||e[86]!==s||e[87]!==re?(xe=n.jsx(Rr,{open:s,onOpenChange:j,children:re}),e[85]=j,e[86]=s,e[87]=re,e[88]=xe):xe=e[88],xe}function mi(t){const e=ue.c(29),{orgSlug:s,virtualMcpId:r,branch:i,previewUrl:u,meta:c,decofile:d,blockKey:o}=t,l=Le();let h;e[0]!==i||e[1]!==s||e[2]!==r?(h={orgSlug:s,virtualMcpId:r,branch:i},e[0]=i,e[1]=s,e[2]=r,e[3]=h):h=e[3];const f=wr(h);let p;e[4]!==f?(p=Ds((k,S)=>f.mutate({blockKey:k,data:S})),e[4]=f,e[5]=p):p=e[5];const E=p;let g;e[6]!==o||e[7]!==d?(g=_s(d,o),e[6]=o,e[7]=d,e[8]=g):g=e[8];const{resolveType:P,props:b,title:v}=g;if(!P){let k;e[9]!==l?(k=l("sandbox.preview.loaderNoLongerExists"),e[9]=l,e[10]=k):k=e[10];let S;return e[11]!==k?(S=n.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]=S):S=e[12],S}const R=`loader:${o}`;let y;e[13]!==o||e[14]!==P||e[15]!==v?(y={mode:"saved",blockKey:o,resolveType:P,title:v},e[13]=o,e[14]=P,e[15]=v,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==d||e[19]!==c||e[20]!==s||e[21]!==u||e[22]!==b||e[23]!==f.isPending||e[24]!==E||e[25]!==R||e[26]!==y||e[27]!==r?(w=n.jsx(As,{orgSlug:s,virtualMcpId:r,branch:i,previewUrl:u,meta:c,decofile:d,kind:"loaders",target:y,initialValue:b,isCreating:f.isPending,onCreate:fi,onSaveReferencedBlock:E,showRun:!1},R),e[17]=i,e[18]=d,e[19]=c,e[20]=s,e[21]=u,e[22]=b,e[23]=f.isPending,e[24]=E,e[25]=R,e[26]=y,e[27]=r,e[28]=w):w=e[28],w}async function fi(){}function pi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function cr(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:pi(t.error)}}function hi(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 gi(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=hi(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const s=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return s&&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"}:s?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 vi="https://github.com/decocms/blocks";function xi(){const t=ue.c(14),e=Le();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(hs,{size:48,className:"text-muted-foreground"}),t[0]=s):s=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 c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ln,{size:14}),t[7]=c):c=t[7];let d;t[8]!==u?(d=n.jsx(Je,{size:"sm",asChild:!0,children:n.jsxs("a",{href:vi,target:"_blank",rel:"noreferrer",children:[u,c]})}),t[8]=u,t[9]=d):d=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==d?(o=n.jsx(gn,{className:"h-full w-full",image:s,title:r,description:i,actions:d}),t[10]=r,t[11]=i,t[12]=d,t[13]=o):o=t[13],o}function bi(t){const e=ue.c(15),{source:s,onRetry:r}=t,i=Le();let u;e[0]!==s||e[1]!==i?(u=i(s==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=s,e[1]=i,e[2]=u):u=e[2];const c=u;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(aa,{size:48,className:"text-muted-foreground"}),e[3]=d):d=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let l;e[6]!==i?(l=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=l):l=e[7];let h;e[8]!==r||e[9]!==l?(h=n.jsx(Je,{variant:"outline",size:"sm",onClick:r,children:l}),e[8]=r,e[9]=l,e[10]=h):h=e[10];let f;return e[11]!==c||e[12]!==o||e[13]!==h?(f=n.jsx(gn,{image:d,title:o,description:c,actions:h}),e[11]=c,e[12]=o,e[13]=h,e[14]=f):f=e[14],f}const yi=x.lazy(()=>os(()=>import("./sections-editor-BBGWhCb9.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])).then(t=>({default:t.SectionsEditor})));function dr(t){const e=ue.c(49),{virtualMcpId:s,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:c}=mn(),{currentBranch:d,taskId:o}=Bt(),l=br(),h=fn(),f=Or(),p=l.lifecycle.phase==="running",E=h.previewUrl;let g;e[0]!==d||e[1]!==c||e[2]!==E||e[3]!==o||e[4]!==s?(g=d?{orgSlug:c.slug,virtualMcpId:s,branch:d,threadId:o??null,previewUrl:E}:null,e[0]=d,e[1]=c,e[2]=E,e[3]=o,e[4]=s,e[5]=g):g=e[5];const P=g;let b;e[6]!==p?(b={fetchEnabled:p},e[6]=p,e[7]=b):b=e[7];const v=pn(P,b);let R;e[8]!==p?(R={fetchEnabled:p},e[8]=p,e[9]=R):R=e[9];const y=kr(P,R),w=gi({lifecyclePhase:l.lifecycle.phase,decofile:cr(v),meta:cr(y),hasEditableContent:Us(v.data,y.data),fastPreviewActive:yr(s).runtime==="cms"}),k=wi;if(w.kind==="loading"){let C;return e[10]===Symbol.for("react.memo_cache_sentinel")?(C=k(n.jsx(ls,{})),e[10]=C):C=e[10],C}if(w.kind==="empty"){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=k(n.jsx(xi,{})),e[11]=C):C=e[11],C}if(w.kind==="error"){let C;e[12]!==v||e[13]!==h||e[14]!==y||e[15]!==w.source?(C=()=>{if(w.source==="sandbox"){h.retry();return}Promise.all([v.refetch(),y.refetch()])},e[12]=v,e[13]=h,e[14]=y,e[15]=w.source,e[16]=C):C=e[16];const se=C;let Y;return e[17]!==se||e[18]!==w.source?(Y=k(n.jsx(bi,{source:w.source,onRetry:se})),e[17]=se,e[18]=w.source,e[19]=Y):Y=e[19],Y}let S;e[20]===Symbol.for("react.memo_cache_sentinel")?(S=C=>k(n.jsx("div",{className:"h-full min-h-0",children:C})),e[20]=S):S=e[20];const T=S,j=f.state.target;if(j?.kind==="loader"&&v.data&&y.data){const C=d??"",se=E??null;let Y;return e[21]!==v.data||e[22]!==y.data||e[23]!==c.slug||e[24]!==C||e[25]!==se||e[26]!==j.key||e[27]!==s?(Y=T(n.jsx(mi,{orgSlug:c.slug,virtualMcpId:s,branch:C,previewUrl:se,meta:y.data,decofile:v.data,blockKey:j.key})),e[21]=v.data,e[22]=y.data,e[23]=c.slug,e[24]=C,e[25]=se,e[26]=j.key,e[27]=s,e[28]=Y):Y=e[28],Y}let H;e[29]!==d||e[30]!==c.slug||e[31]!==j||e[32]!==s?(H=j||!d?null:jr(Er(c.slug,s,d)),e[29]=d,e[30]=c.slug,e[31]=j,e[32]=s,e[33]=H):H=e[33];const J=H;let M="/",L=null,_=null;j?.kind==="page"?(M=j.path,L=j.key):j?.kind==="section"?_=j.key:J&&(M=J.path,L=J.pageKey);const A=L?`page:${L}`:_?`section:${_}`:`path:${M}`;let W;e[34]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(Mt,{className:"size-5 text-muted-foreground"})}),e[34]=W):W=e[34];const B=d??"",X=E??void 0,I=_?null:u,$=!!L&&f.state.editSeoPageKey===L;let U;return e[35]!==_||e[36]!==L||e[37]!==M||e[38]!==A||e[39]!==i||e[40]!==c.slug||e[41]!==I||e[42]!==$||e[43]!==B||e[44]!==X||e[45]!==s||e[46]!==f.consumeEditSeo||e[47]!==f.setVariantOverride?(U=T(n.jsx(x.Suspense,{fallback:W,children:n.jsx(yi,{orgSlug:c.slug,virtualMcpId:s,branch:B,previewReady:!0,previewUrl:X,currentPath:M,activePageBlockKey:L,activeGlobalBlockKey:_,externalSelection:I,initialEditSeo:$,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onViewJsonFile:i},A)})),e[35]=_,e[36]=L,e[37]=M,e[38]=A,e[39]=i,e[40]=c.slug,e[41]=I,e[42]=$,e[43]=B,e[44]=X,e[45]=s,e[46]=f.consumeEditSeo,e[47]=f.setVariantOverride,e[48]=U):U=e[48],U}function wi(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function ur(t){const e=ue.c(44),{virtualMcpId:s,pageKey:r,onClose:i,ref:u}=t,c=Le(),{org:d}=mn(),{currentBranch:o,taskId:l}=Bt(),f=fn().previewUrl;let p;e[0]!==o||e[1]!==d.slug||e[2]!==f||e[3]!==l||e[4]!==s?(p=o?{orgSlug:d.slug,virtualMcpId:s,branch:o,threadId:l??null,previewUrl:f}:null,e[0]=o,e[1]=d.slug,e[2]=f,e[3]=l,e[4]=s,e[5]=p):p=e[5];const g=pn(p),P=o??"";let b;e[6]!==d.slug||e[7]!==P||e[8]!==s?(b={orgSlug:d.slug,virtualMcpId:s,branch:P},e[6]=d.slug,e[7]=P,e[8]=s,e[9]=b):b=e[9];const{save:v,flush:R}=$s(b),y=g.data?.[r],w=g.data===void 0&&g.isLoading,k=g.data!==void 0&&y===void 0,S=!o||k||w;let T;e[10]!==y?(T=y===void 0?"":JSON.stringify(y,null,2),e[10]=y,e[11]=T):T=e[11];const j=T;let H;e[12]!==r||e[13]!==S||e[14]!==v?(H=U=>{if(S)return;let C;try{C=JSON.parse(U)}catch{return}C===null||typeof C!="object"||Array.isArray(C)||v(r,C)},e[12]=r,e[13]=S,e[14]=v,e[15]=H):H=e[15];const J=H;let M;e[16]!==R?(M=()=>({flush:R}),e[16]=R,e[17]=M):M=e[17],x.useImperativeHandle(u,M);let L;e[18]!==c?(L=c("sectionsEditor.pageJsonDialog.titleShort"),e[18]=c,e[19]=L):L=e[19];let _;e[20]!==L?(_=n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:L}),e[20]=L,e[21]=_):_=e[21];let A;e[22]!==c?(A=c("sectionsEditor.pageJsonDialog.close"),e[22]=c,e[23]=A):A=e[23];let W;e[24]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(ia,{size:14}),e[24]=W):W=e[24];let B;e[25]!==i||e[26]!==A?(B=n.jsx(Je,{variant:"ghost",size:"icon",onClick:i,"aria-label":A,className:"size-7 shrink-0",children:W}),e[25]=i,e[26]=A,e[27]=B):B=e[27];let X;e[28]!==B||e[29]!==_?(X=n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[_,B]}),e[28]=B,e[29]=_,e[30]=X):X=e[30];let I;e[31]!==g.data||e[32]!==R||e[33]!==j||e[34]!==w||e[35]!==k||e[36]!==r||e[37]!==S||e[38]!==J||e[39]!==c?(I=w?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(Mt,{className:"size-5 text-muted-foreground"})}):k?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",c("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(oa,{code:j,language:"json",readOnly:S,height:"100%",onChange:U=>J(U??""),onSave:U=>{J(U),R()}},`${r}:${g.data===void 0?"loading":"ready"}`)}),e[31]=g.data,e[32]=R,e[33]=j,e[34]=w,e[35]=k,e[36]=r,e[37]=S,e[38]=J,e[39]=c,e[40]=I):I=e[40];let $;return e[41]!==X||e[42]!==I?($=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[X,I]}),e[41]=X,e[42]=I,e[43]=$):$=e[43],$}function Mr(t){return t.contentEditingEnabled&&!t.isMobile}function ki(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Pi(t){return Mr({contentEditingEnabled:Nr(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Si(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const ji=500,Ei={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},mr=1,an=["desktop","mobile","tablet"],$t={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function fr(t,e){try{const s=new URL(t,window.location.href);return s.searchParams.set("deviceHint",e),s.href}catch{return t}}function Ni(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 ft(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function on(t,e){try{return new URL(t,e).href}catch{return null}}function Ci(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 s={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:s,effective:s.url}}return{pin:t,effective:t?.url??null}}function Ri(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Ti(t,e,s){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),c=o=>{if(o===s)return 100;const l=o.indexOf(s);if(l===-1)return 0;let h=40;return l===0?h+=30:/[\s/-]/.test(o[l-1]??"")&&(h+=20),h+=Math.round(s.length/o.length*20),h};let d=Math.max(c(r),c(i));return u.at(-1)===s?d=Math.max(d,95):u.includes(s)&&(d=Math.max(d,90)),d}function Li(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Oi({virtualMcpId:t}){const e=cs(),s=x.useRef(null),r=Le(),i=ta(),u=Ns(),{currentBranch:c,taskId:d,virtualMcpId:o}=Bt(),l=Or(),h=ws(o===t?t:null),f=yr(t),p=la(h?.metadata?.ui?.layout??null),E=Nr(p),g=Mr({contentEditingEnabled:E,isMobile:u}),[P,b]=x.useState(()=>Pi({cmsMode:p,isMobile:u})),[v,R]=x.useState("desktop"),[y,w]=x.useState(null),[k,S]=x.useState(null),T=x.useRef(null),j=x.useRef(null),[H,J]=x.useState(!1),M=x.useRef(null),L=()=>{M.current?.flush(),J(!1)},_=()=>J(a=>(a&&M.current?.flush(),!a)),[A,W]=x.useState({width:0,height:0}),[B,X]=x.useState(null),[I,$]=x.useState(!1),[U,C]=x.useState(""),[se,Y]=x.useState(!1),[Ne,ee]=x.useState(),[F,ae]=x.useState(null),[q,Q]=x.useState(null),[we,te]=x.useState(null),[K,me]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[pe,ne]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[re,xe]=x.useState({}),[le,he]=x.useState(!1),ie=x.useRef(null),ge=()=>{he(!0),ie.current&&clearTimeout(ie.current),ie.current=setTimeout(()=>he(!1),15e3)},nt=()=>{ie.current&&(clearTimeout(ie.current),ie.current=null),he(!1)},{org:Oe}=mn(),be=br(),Ce=fn(),zt=Ce.vmEntry,fe=Ce.previewUrl,_e=be.lifecycle.phase,He=_e==="running",$e=h?.id===t?Es(h.metadata):null,ke=h?.id===t&&f.runtime==="cms",Fe=f.projectDefault==="cms",ye=Gs({sandboxUrl:fe,previewServerUrl:$e,fastPreviewActive:ke}),Ue=t&&c?{orgSlug:Oe.slug,virtualMcpId:t,branch:c,threadId:d??null,previewUrl:fe}:null,V=pn(Ue,{fetchEnabled:He}),Z=kr(Ue,{fetchEnabled:He}),G=V.data,ve=Z.data,Ae=G?Ws(G).sort((a,m)=>a.name.localeCompare(m.name)):[],gt=t&&c?{orgSlug:Oe.slug,virtualMcpId:t,branch:c}:null,xn=di(gt),vt=G&&ve?Vs(G,ve):[],bn=G&&ve?Fs(ve,G,"loaders"):[],Me=U?(()=>{const a=U.toLowerCase();return Ae.map(m=>({page:m,score:Ti(m.name,m.path,a)})).filter(({score:m})=>m>0).sort((m,N)=>N.score-m.score||m.page.path.length-N.page.path.length).map(({page:m})=>m)})():Ae,Ye=vt.filter(a=>{if(!U)return!0;const m=U.toLowerCase();return a.name.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),It=g?bn:[],rt=It.filter(a=>{if(!U)return!0;const m=U.toLowerCase();return a.title.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),We=q?bn.find(a=>a.key===q)??null:null,Re=hn,xt=F||q?null:qs(Ae,K,pe),Kt=F?F.name:We?.title??xt?.name,D=xt?.key??null,bt=xt?.path??null,Be=(D?re[D]:void 0)??{},Pe=Ke(K,Be),yt={};if(He&&fe&&ve&&G){const a=Ms(ve,"loaders"),m=D?G[D]:void 0,N=$a(m,G,oe=>a.has(oe)),O=La(N);for(const oe of tt(K)){if(oe.type!=="param")continue;const De=Ca(K,oe.name,N),je=Aa(De,a,O);je.length>0&&(yt[oe.name]=je)}}const Qe=t&&c?{orgSlug:Oe.slug,virtualMcpId:t,branch:c,threadId:d??null}:null,yn=G&&D?Bs(G,D,0):[],wn=G?zs(yn,G):[],Ht=wn.map(a=>a.isSavedBlock?a.label:""),Ut=wn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Wt=yn.map(a=>dn(a,G??{})),kn=x.useRef(null),Te=x.useRef(null),Br=be.status.state==="paused",Vt=be.phase,Pn=Is({claimPhase:Vt,lifecycle:be.lifecycle}),Ve=Ce.previewState,zr=Ce.userStopped,Ir=Xs(Oe.slug,t??"",c??""),{url:qe}=Zs(ke&&t&&c?{orgSlug:Oe.slug,virtualMcpId:t,branch:c,previewServerUrl:$e??null,path:Pe}:null),Kr=Fe&&f.runtime==="sandbox",z=pa({previewState:Ve,progressStatus:Pn.status,previewServerUrl:$e,fastPreviewActive:ke,fastPreviewReady:!!qe,codingSession:Kr}),st=z.mode!=="none",Sn=z.mode==="production"&&z.iframeBase?ft(z.iframeBase):null,Hr=!i,Ze=z.mode==="production"?Sn:ft(fe),Ur=h?.id===t&&h.metadata?.fastPreviewInPlace===!0,at=z.mode==="production"&&ke&&Ur&&g&&P==="blocks",jn=x.useRef(null),{pin:Wr,effective:Vr}=Ci(jn.current,{inPlaceRenderActive:at,draftPreviewUrl:qe,resolvedPath:Pe});jn.current=Wr;const Se=Ni(z.mode==="sandbox"?Ot(fr(we??on(Pe,z.iframeBase)??z.iframeBase,v),l.state.variantOverride??[]):z.mode==="production"&&Hr?Ot(fr(Js(we??Vr??on(Pe,z.iframeBase)??z.iframeBase,z.showWakingPill?Ys:null),v),l.state.variantOverride??[]):null);x.useEffect(()=>{},[i,Sn,B]);const qt="sandbox.preview.openInNewTab",En=qe??(z.iframeBase?on(Pe,z.iframeBase):null),qr=z.mode==="production"?En?Ot(En,l.state.variantOverride??[]):null:Se??z.iframeBase,Nn=async()=>{const a=qr;if(a){window.open(a,"_blank","noopener");return}},wt=t&&c?Er(Oe.slug,t,c):null,kt=a=>{wt&&ea(wt,a)},ce=l.state.target;x.useEffect(()=>{if(!(!ce||!ye||!ve))if(ce.kind==="page"){const a=re[ce.key]??{};Te.current=Ke(ce.path,a),ae(null),Q(null),te(null),ne(ce.key),me(ce.path),kt({path:ce.path,pageKey:ce.key,params:a})}else if(ce.kind==="loader")Te.current=null,ae(null),Q(ce.key),te(null);else{const a=vt.find(m=>m.key===ce.key);if(a){Te.current=null;const m=Yn(ve);Q(null),ae(a),te(Qn(ye,m,a.key))}}},[ce,ye,ve,re]),x.useEffect(()=>{!D||bt===null||ce?.kind==="page"&&ce.key===D&&ce.path===bt||l.selectTarget({kind:"page",key:D,path:bt})},[D,bt,ce]);const[Cn,Gr]=x.useState(null);if(Ve.kind==="iframe"&&Cn!==Ve.previewUrl){const a=Cn!==null;Gr(Ve.previewUrl);const m=wt?jr(wt):null;if(m){if(Te.current=Ke(m.path,m.params),me(m.path),ne(m.pageKey),te(null),ae(null),Q(null),m.pageKey&&Object.keys(m.params).length>0){const N=m.pageKey;xe(O=>({...O,[N]:m.params}))}}else a&&(Te.current=null,me("/"),te(null),ne(null),ae(null),Q(null))}kn.current=Se;const Rn=xa({iframeRef:T,src:z.mode==="sandbox"?Se:null,active:z.mode==="sandbox"}),Tn=x.useRef(null);x.useEffect(()=>{if(!qe||!Se||Tn.current===qe)return;Tn.current=qe;const a=T.current;a&&a.getAttribute("src")!==Se&&(ge(),a.src=Se)},[qe,Se]);const Ln=()=>{const a=T.current?.contentWindow,m=Ze;if(!a||!m||!G||!D)return;const N=G[D];if(!N||typeof N!="object")return;const O=Qs({previewBaseUrl:m,pageBlock:N,decofile:G,path:Pe,pathTemplate:K});if(!O)return;const oe=Ot(O.src,l.state.variantOverride??[]);a.postMessage({type:"cms-editor::render",src:oe,body:O.body},m)},Gt=x.useRef(null);x.useEffect(()=>{if(!at||F||q||!D||!G){Gt.current=null;return}const a={nav:JSON.stringify({page:D,path:Pe,pathTemplate:K}),content:JSON.stringify(G)},m=Ri(Gt.current,a);Gt.current=a,m&&Ln()},[G,at,F,q,D,Pe,K]);const Jt=x.useRef(null);x.useEffect(()=>{if(!at||F||q||!D||!G){Jt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),m=Jt.current;Jt.current={page:D,sig:a},!(!m||m.page!==D||m.sig===a)&&Ln()},[l.state.variantOverride,at,F,q,D]);const Jr=!!t&&!!c&&!be.notFound&&!zr&&!Br&&(Vt?.kind==="ready"||_e!=="idle"),de=Si({editingMode:P,sandboxDisplay:z.mode==="sandbox",blocksEditingEnabled:g});x.useEffect(()=>{const a=Ze;if(!a)return;const m=N=>{if(N.origin===a)if(N.data?.type==="visual-editor::element-clicked"){const O=ba.safeParse(N.data.payload);O.success&&w(O.data)}else if(N.data?.type==="cms-editor::section-clicked"){const O=ka.safeParse(N.data.payload);O.success&&S({index:O.data.sectionIndex,seq:O.data.clickSeq})}else N.data?.type==="cms-editor::render-start"?ge():N.data?.type==="cms-editor::render-end"?(nt(),T.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Ht,kinds:Ut,keys:Wt},a)):N.data?.type==="cms-editor::render-error"&&nt()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[Ze,Ht,Ut,Wt]);const On=()=>{const a=T.current?.contentWindow,m=ft(fe);!a||!m||a.postMessage({type:"visual-editor::activate",script:ya},m)},Yr=()=>{const a=T.current?.contentWindow,m=ft(fe);!a||!m||a.postMessage({type:"visual-editor::deactivate"},m)},Yt=()=>{const a=T.current?.contentWindow,m=Ze;!a||!m||(a.postMessage(z.mode==="production"?{type:"editor::inject",args:{script:rr}}:{type:"visual-editor::activate",script:rr},m),a.postMessage({type:"cms-editor::set-labels",labels:Ht,kinds:Ut,keys:Wt},m))},Qr=()=>{const a=T.current?.contentWindow,m=Ze;!a||!m||a.postMessage({type:"cms-editor::deactivate"},m)},Zr=()=>{const a=T.current?.contentWindow,m=Ze;!a||!m||(a.postMessage({type:"cms-editor::clear-hover"},m),a.postMessage({type:"visual-editor::clear-hover"},m))},Qt=a=>{if(a==="blocks"&&!g)return;const m=P;!u&&a!==m&&(a==="blocks"?j.current?.resize("30%"):j.current?.collapse()),a!=="blocks"&&L(),b(a),w(null),S(null),a!=="blocks"&&Q(null),m==="visual"&&Yr(),a==="visual"&&On(),m==="blocks"&&a!=="blocks"&&Qr(),a==="blocks"&&Yt()},_n=()=>{Qt(ki(P,g))},An=()=>{if(!T.current||!Se)return;ge();const a=T.current;a.src=Se};Ps(()=>{const a=T.current;if(!a)return;ge();const m=document.activeElement,N=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Li(a,kn.current);let O;const oe=()=>{clearTimeout(O),a.tabIndex=N,a.style.pointerEvents="";const De=document.activeElement;(!De||De===document.body||De===a)&&m?.focus(),a.removeEventListener("load",oe)};a.addEventListener("load",oe),O=setTimeout(oe,3e3)});const Dn=()=>{const a=an.indexOf(v);R(an[(a+1)%an.length])},it=(a,m)=>{if(!D)return;const N=D,O={...Be,[a]:m};Te.current=Ke(K,O),xe(oe=>({...oe,[N]:O})),kt({path:K,pageKey:N,params:O})},Pt=li({iframeBase:z.iframeBase,resolvedPath:Pe,activeGlobalSectionName:F?.name??null,noServerLabel:r("sandbox.preview.noServerRunning")}),St=a=>{const m=re[a.key]??{},N=Ke(a.path,m);(F||Re(N)!==Re(Pe))&&ge(),Te.current=N,ae(null),Q(null),te(null),S(null),ne(a.key),me(a.path),kt({path:a.path,pageKey:a.key,params:m}),l.selectTarget({kind:"page",key:a.key,path:a.path})},$n=a=>{if(!ye||!ve){Un.error(r("sandbox.preview.previewMetadataNotReady"));return}ge(),Te.current=null;const m=Yn(ve),N=Qn(ye,m,a.key);ae(a),Q(null),te(N),S(null),l.selectTarget({kind:"section",key:a.key})},Fn=a=>{g&&(ae(null),Q(a.key),te(null),Qt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},Xr=async({name:a,path:m,templateKey:N})=>{if(!t||!c)return;const O=Sr(m);if(O){ee(O);return}const oe=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Ae.some(je=>Re(je.path)===Re(oe))){ee(r("sandbox.preview.pageAlreadyExists",{path:oe}));return}let De;if(N&&(De=G?.[N],!De)){ee(r("sandbox.preview.templateNoLongerExists"));return}ee(void 0);try{const je=await xn.mutateAsync({name:a,path:oe,template:De});Y(!1),Un.success(r("sandbox.preview.pageCreated",{name:a})),await js(ji),St({key:je.key,name:je.name,path:je.path}),Qt("blocks")}catch(je){ee(je instanceof Error?je.message:r("sandbox.preview.failedToCreatePage"))}},ot=st&&(Jr||z.mode==="production"),Mn=ci({showPreviewToolbar:ot,contentEditingEnabled:E}),jt=()=>{$(!1),C("")},Et=ft($e??fe),Nt=F?.name??We?.title??xt?.name,Ct=F?`section:${F.key}`:q?`loader:${q}`:D?`page:${D}`:void 0,es=ot?Mn?n.jsxs(xs,{open:I,onOpenChange:a=>{$(a),a||C("")},children:[n.jsx(bs,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":r("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:F||We?Nt:[Et,Nt,K].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-0 items-stretch overflow-hidden whitespace-nowrap rounded-lg 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:[!F&&!We&&Et&&n.jsx("span",{"data-testid":"preview-page-origin",className:"flex min-w-0 max-w-56 items-center border-r border-border/60 bg-muted/60 px-2 font-mono text-muted-foreground @max-xl/panel-toolbar:max-w-1/4",children:n.jsx("span",{className:"truncate",children:Et})}),n.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&&n.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:[n.jsx(Xt,{size:11}),r("sandbox.preview.globalBadge")]}),We&&n.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:[n.jsx(en,{size:11}),r("sandbox.preview.loaderBadge")]}),(Nt||!Et)&&n.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:Nt??Pt}),!F&&!We&&n.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:K}),n.jsx(Wn,{size:12,className:ze("shrink-0 transition-transform",I&&"rotate-180")})]})]})}),n.jsxs(ys,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[n.jsxs(gr,{shouldFilter:!1,defaultValue:Ct,children:[n.jsx(vr,{value:U,onValueChange:C,placeholder:r("sandbox.preview.searchPagesAndComponents")}),n.jsxs(hr,{className:"max-h-80",children:[n.jsx(xr,{children:Ae.length===0&&vt.length===0&&It.length===0?r("sandbox.preview.noPagesFound"):r("sandbox.preview.noSearchResults")}),Me.length>0&&n.jsx(pt,{children:Me.map(a=>n.jsxs(ht,{value:`page:${a.key}`,"aria-current":Ct===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{jt(),St(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),n.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))}),Ye.length>0&&n.jsx(pt,{heading:r("sandbox.preview.globalComponents"),children:Ye.map(a=>n.jsx(ht,{value:`section:${a.key}`,"aria-current":Ct===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{jt(),$n(a)},children:n.jsx("span",{className:"truncate",children:a.name})},a.key))}),rt.length>0&&n.jsx(pt,{heading:r("sandbox.preview.globalLoaders"),children:rt.map(a=>n.jsx(ht,{value:`loader:${a.key}`,"aria-current":Ct===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{jt(),Fn(a)},children:n.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!F&&!q&&tt(K).some(a=>a.type!=="text")&&n.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:tt(K).map((a,m)=>{if(a.type==="text")return n.jsx("span",{children:a.text},`text-${m}`);const N=yt[a.name];return N&&Qe?n.jsx(or,{sources:N,template:K,paramName:a.name,value:Be[a.name]??"",sandboxRef:Qe,onCommit:O=>it(a.name,O)},`${D}:${a.name}`):n.jsx(lr,{name:a.name,value:Be[a.name]??"",onCommit:O=>it(a.name,O)},`${D}:${a.name}`)})}),n.jsx("div",{className:"border-t p-1.5",children:n.jsxs(Je,{variant:"ghost",className:"w-full justify-start",onClick:()=>{jt(),ee(void 0),Y(!0)},children:[n.jsx(Jn,{size:16}),r("sandbox.preview.createNewPage")]})})]})]}):n.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Pt}):null,Bn=ot||E?n.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{onClick:Dn,"aria-label":r($t[v]),children:v==="mobile"?n.jsx(Vn,{size:16}):v==="tablet"?n.jsx(qn,{size:16}):n.jsx(Gn,{size:16})})}),n.jsx(dt,{children:r($t[v])})]}),es,n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsx(Ie,{onClick:()=>{Nn()},"aria-label":r(qt),children:n.jsx(ln,{size:16})}),n.jsx(Ie,{onClick:An,"aria-label":r("sandbox.preview.refresh"),children:n.jsx(Hn,{size:16})})]})]}):null,Rt=!e&&ot?n.jsxs(n.Fragment,{children:[n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{onClick:An,"aria-label":r("sandbox.preview.refresh"),children:n.jsx(Hn,{size:16})})}),n.jsx(dt,{side:"bottom",children:r("sandbox.preview.refresh")})]}),Mn?n.jsxs("div",{ref:s,className:"relative min-w-0 w-64 shrink",children:[n.jsxs("div",{className:"flex h-7 w-full min-w-0 items-center rounded-md border border-border bg-background transition-colors duration-200 hover:bg-accent",children:[n.jsxs("div",{className:"flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 pl-2 pr-1",onClick:()=>$(a=>!a),children:[F&&n.jsxs("span",{className:"shrink-0 inline-flex 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:[n.jsx(Xt,{size:11}),r("sandbox.preview.globalBadge")]}),We&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[n.jsx(en,{size:11}),r("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:ze("text-[13px] font-medium text-foreground",Kt==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:Kt??Pt}),!F&&!q&&Kt!=null&&K&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:tt(K).map((a,m)=>{if(a.type==="text")return n.jsx("span",{className:ze(m===0?"min-w-0 truncate":"shrink-0"),children:a.text},`text-${m}`);const N=yt[a.name];return N&&Qe?n.jsx(or,{sources:N,template:K,paramName:a.name,value:Be[a.name]??"",sandboxRef:Qe,onCommit:O=>it(a.name,O)},`${D}:${a.name}`):n.jsx(lr,{name:a.name,value:Be[a.name]??"",onCommit:O=>it(a.name,O)},`${D}:${a.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>$(a=>!a),"aria-label":r("sandbox.preview.choosePage"),"aria-expanded":I,children:n.jsx(Wn,{size:12,className:ze("shrink-0 text-muted-foreground transition-transform",I&&"rotate-180")})})]}),I&&n.jsxs("div",{className:"absolute left-1/2 top-full z-50 mt-1.5 w-[500px] max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-lg border bg-popover shadow-lg",children:[n.jsxs("div",{className:"px-2 h-10 flex items-center gap-2 border-b",children:[n.jsx(vs,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:U,onChange:a=>C(a.target.value),onKeyDown:a=>{if(a.key!=="Enter")return;const m=U.trim();if(!m)return;const N=Me.find(O=>Re(O.path)===Re(m));N&&(a.preventDefault(),$(!1),C(""),St(N))},placeholder:r("sandbox.preview.searchPagesAndComponents"),className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoFocus:!0})]}),n.jsx("div",{className:"p-1.5 border-b",children:n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:a=>{a.preventDefault(),$(!1),C(""),ee(void 0),Y(!0)},children:[n.jsx(Jn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:r("sandbox.preview.createNewPage")})]})}),Me.length===0&&Ye.length===0&&rt.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Ae.length===0&&vt.length===0&&It.length===0?r("sandbox.preview.noPagesFound"):r("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[Me.length>0&&n.jsx("div",{className:"p-1.5",children:Me.map(a=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),$(!1),C(""),St(a)},children:[n.jsx(gs,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:a.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a.path})]},a.key))}),Ye.length>0&&n.jsxs("div",{className:ze("p-1.5",Me.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:r("sandbox.preview.globalComponents")}),Ye.map(a=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),$(!1),C(""),$n(a)},children:[n.jsx(Xt,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:a.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},a.key))]}),rt.length>0&&n.jsxs("div",{className:ze("p-1.5",(Me.length>0||Ye.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:r("sandbox.preview.globalLoaders")}),rt.map(a=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),$(!1),C(""),Fn(a)},children:[n.jsx(en,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:a.title}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},a.key))]})]})]})]}):n.jsx("span",{className:"min-w-0 truncate px-2 text-[13px] text-muted-foreground",children:Pt}),n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{"aria-label":r(qt),onClick:()=>{Nn()},children:n.jsx(ln,{size:16})})}),n.jsx(dt,{side:"bottom",children:r(qt)})]})]}):null,ts=Rt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:Rt}):null,zn=z.mode==="sandbox",Tt=Ei[v],Lt=v==="desktop"&&(A.width===0||A.width>=Tt.width+2*mr),In=Lt?1:Math.min(A.width>0?A.width/(Tt.width+2*mr):1,1),ns=Lt?{width:"100%",height:"100%"}:{width:`${Tt.width}px`,height:A.height>0?`${A.height/In}px`:`${Tt.height}px`,transform:`scale(${In})`,transformOrigin:"top center"},Kn=zn&&(ot||E)?n.jsx(Ie,{onClick:_n,"aria-pressed":de==="visual","aria-label":r("sandbox.preview.visualEditor"),active:de==="visual",children:n.jsx(tn,{size:16})}):null,rs=!e&&st?n.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 -translate-x-1/2 scale-125",children:n.jsxs("div",{className:"flex items-center gap-0.5 rounded-full border bg-background/60 p-1 shadow-lg backdrop-blur-md",children:[zn&&n.jsxs(n.Fragment,{children:[n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{onClick:_n,"aria-pressed":de==="visual","aria-label":r("sandbox.preview.visualEditor"),active:de==="visual",className:"rounded-full",children:n.jsx(tn,{size:16})})}),n.jsx(dt,{side:"top",children:r("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(lt,{children:[n.jsx(ct,{asChild:!0,children:n.jsx(Ie,{onClick:Dn,"aria-label":r($t[v]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[v==="mobile"&&n.jsx(Vn,{size:16}),v==="tablet"&&n.jsx(qn,{size:16}),v==="desktop"&&n.jsx(Gn,{size:16})]},v)})}),n.jsx(dt,{side:"top",children:r($t[v])})]})]})}):null,ss=!!q&&de==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[Qe&&Object.entries(yt).map(([a,m])=>(Be[a]??"")===""?n.jsx(ai,{sources:m,template:K,paramName:a,sandboxRef:Qe,onFill:N=>it(a,N)},`${D}:${a}`):null),e?n.jsxs(n.Fragment,{children:[n.jsx(Zt.Toolbar.Center.Portal,{fallback:n.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Bn}),children:Bn}),n.jsx(Zt.Toolbar.Right.Portal,{fallback:Kn,children:Kn})]}):n.jsx(n.Fragment,{children:n.jsx(Zt.Topbar.Center.Portal,{fallback:Rt&&n.jsxs("div",{className:"@container/panel-header relative flex h-12 shrink-0 items-center gap-2 border-b border-border/60 px-3 md:px-4",children:[n.jsx("div",{className:"flex-1"}),n.jsx("div",{className:"flex min-w-0 shrink items-center justify-center gap-0.5",children:Rt}),n.jsx("div",{className:"flex-1"})]}),children:ts})}),n.jsx("div",{className:"flex-1 overflow-hidden compact:relative",children:ss?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(dr,{virtualMcpId:t,externalSelection:k,onViewJsonFile:_}),H&&D&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(ur,{ref:M,virtualMcpId:t,pageKey:D,onClose:L})})]}):n.jsxs(Xn,{orientation:"horizontal",disabled:de!=="blocks",className:"relative isolate",children:[n.jsx(_t,{ref:j,id:"preview-blocks-editor",defaultSize:de==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:de==="blocks"&&n.jsx(dr,{virtualMcpId:t,externalSelection:k,onViewJsonFile:_})}),de==="blocks"&&n.jsx(er,{withHandle:!0}),n.jsx(_t,{id:"preview-canvas",defaultSize:de==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden compact:relative compact:z-0",children:n.jsxs(Xn,{orientation:"horizontal",disabled:!(H&&D),children:[H&&D&&n.jsxs(n.Fragment,{children:[n.jsx(_t,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(ur,{ref:M,virtualMcpId:t,pageKey:D,onClose:L})}),n.jsx(er,{withHandle:!0})]}),n.jsx(_t,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:a=>{if(!a)return;const m=()=>W(O=>O.width===a.clientWidth&&O.height===a.clientHeight?O:{width:a.clientWidth,height:a.clientHeight});m();const N=new ResizeObserver(m);return N.observe(a),()=>N.disconnect()},className:ze("h-full relative overflow-clip flex justify-center",st&&!Lt&&"bg-muted/30"),children:[(le||Ir)&&st&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),z.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(rn,{kind:"starting",progress:Pn,claimPhase:Vt})}),Ve.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(rn,{kind:"suspended",onResume:Ce.resume})}),Ve.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(rn,{kind:"errored",error:Ve.error,onRetry:Ce.retry,connectionsHref:`/${Oe.slug}/settings/connections`})}),z.showWakingPill&&n.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:[n.jsx(Mt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:r("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:r("sandbox.preview.startingPreviewHint")})]})]}),de==="visual"&&!y&&n.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:[n.jsx(tn,{size:12}),r("sandbox.preview.clickElementToAsk")]}),de==="visual"&&y&&n.jsx(ja,{element:y,onDismiss:()=>w(null)}),rs,st&&Se&&n.jsx("div",{className:ze("shrink-0",!Lt&&"border-x border-border bg-background shadow-sm"),style:ns,onMouseLeave:Zr,children:n.jsx("iframe",{ref:T,src:Se,className:"w-full h-full border-0",title:r("sandbox.preview.devServerPreviewTitle"),onError:Rn.handleError,onLoad:()=>{if(Rn.handleLoad(),nt(),z.mode!=="sandbox"){z.mode==="production"&&!z.showWakingPill&&de==="blocks"&&Yt();return}if(ds("vm_preview_loaded",{view_mode:de,vm_id:zt?.sandboxHandle??null}),!F)try{const a=T.current?.contentWindow?.location?.pathname;if(!a)return;const m=Te.current;if(m!==null&&(Te.current=null,Re(a)!==Re(m))||Re(a)===Re(Pe))return;me(a),kt({path:a,pageKey:pe,params:Be})}catch{}de==="visual"&&On(),de==="blocks"&&Yt()}},z.iframeBase)})]})})]})})]})}),n.jsx(ui,{open:se,onOpenChange:Y,isPending:xn.isPending,error:Ne,templates:Ae,onSubmit:Xr})]})}function _i(t){const e=ue.c(22),{virtualMcpId:s}=t,r=Le(),i=ks(s),{activeTask:u,taskId:c,currentBranch:d}=Bt(),o=ua(c),[l,h]=x.useState(!1);if(da({threadId:c,sandboxBranch:u?.branch??d,agentHasRepo:sn(i?.metadata),threadHasRepo:sn(o)||sn(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(tr,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let g;e[1]!==r?(g=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=g):g=e[2];let P;e[3]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=P):P=e[4];let b,v;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),v=n.jsx(tr,{className:"size-4"}),e[5]=b,e[6]=v):(b=e[5],v=e[6]);let R;e[7]!==r?(R=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=R):R=e[8];let y;e[9]!==R?(y=n.jsxs(Je,{onClick:b,children:[v,R]}),e[9]=R,e[10]=y):y=e[10];let w;e[11]!==g||e[12]!==P||e[13]!==y?(w=n.jsx(gn,{className:"h-full",image:E,title:g,description:P,actions:y}),e[11]=g,e[12]=P,e[13]=y,e[14]=w):w=e[14];let k;e[15]!==l?(k=n.jsx(ca,{open:l,onOpenChange:h,mode:"agent"}),e[15]=l,e[16]=k):k=e[16];let S;return e[17]!==w||e[18]!==k?(S=n.jsxs(n.Fragment,{children:[w,k]}),e[17]=w,e[18]=k,e[19]=S):S=e[19],S}let p;return e[20]!==s?(p=n.jsx(Oi,{virtualMcpId:s}),e[20]=s,e[21]=p):p=e[21],p}function ld(){const t=ue.c(2),e=ma();let s;return t[0]!==e?(s=n.jsx(us,{tabId:"site-editor",children:n.jsx(ms,{feature:"cms",children:n.jsx(_i,{virtualMcpId:e})})}),t[0]=e,t[1]=s):s=t[1],s}export{ld as default};
|