decocms 4.390.4 → 4.390.5
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-iVRTcaBg.js → AlertCircle-BXd3wmhE.js} +1 -1
- package/dist/client/assets/{AreaChart-vGEKzI4F.js → AreaChart-BurPFOEM.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DfZNe3Vl.js → ArrowLeft-CtG_Sz3T.js} +1 -1
- package/dist/client/assets/{ArrowRight-CswoMXm3.js → ArrowRight-DGQoBfX2.js} +1 -1
- package/dist/client/assets/{ArrowUp-ZHCqKDUA.js → ArrowUp-BAzKSoqz.js} +1 -1
- package/dist/client/assets/{CartesianChart-_SxUX3gE.js → CartesianChart-BHBzHrfv.js} +1 -1
- package/dist/client/assets/{Check-ocmT1xhM.js → Check-D3UEH1bb.js} +1 -1
- package/dist/client/assets/{CheckCircle-BmHBdTYn.js → CheckCircle-BmoxvNcp.js} +1 -1
- package/dist/client/assets/{ChevronUp-BEGO8LAp.js → ChevronUp-DkDOUc-8.js} +1 -1
- package/dist/client/assets/{Copy01-Djl84HjT.js → Copy01-1VyfDicU.js} +1 -1
- package/dist/client/assets/{CreditCard01-DA21YZ9t.js → CreditCard01-CrYxi8Yw.js} +1 -1
- package/dist/client/assets/{DotsVertical-GP-H6-nS.js → DotsVertical-BVvaV8Wy.js} +1 -1
- package/dist/client/assets/{Download01-CQZ78LGI.js → Download01-CRbdo8yP.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CU0G222G.js → ErrorBarContext-Cq12nkBo.js} +1 -1
- package/dist/client/assets/{Eye-CNk4ml55.js → Eye-DnZDEgOn.js} +1 -1
- package/dist/client/assets/{Globe04-B3-IlgJ4.js → Globe04-Cfnfjo6J.js} +1 -1
- package/dist/client/assets/{Image01-zHW5odO5.js → Image01-ZQL1hr5Q.js} +1 -1
- package/dist/client/assets/{Key01-BCjLeK7M.js → Key01-HEuAw7Uw.js} +1 -1
- package/dist/client/assets/{LayoutLeft-dzqHSKuH.js → LayoutLeft-Di6ed8JP.js} +1 -1
- package/dist/client/assets/{Line-BPNz1hy-.js → Line-D1DSosvE.js} +1 -1
- package/dist/client/assets/{Link01-CBc36KC8.js → Link01-CZiQuc44.js} +1 -1
- package/dist/client/assets/{LinkExternal01-JGUyp91x.js → LinkExternal01-BekDuv1R.js} +1 -1
- package/dist/client/assets/{Monitor01-DMBIX-hP.js → Monitor01-BLWTHtTp.js} +1 -1
- package/dist/client/assets/{Package-VT7-ZGoy.js → Package-tH33TvgC.js} +1 -1
- package/dist/client/assets/{Palette-CPW0a6wF.js → Palette-BagjpLZN.js} +1 -1
- package/dist/client/assets/{Plus-ojokEQ8x.js → Plus-Y-KvMcUC.js} +1 -1
- package/dist/client/assets/{SearchLg-C-i1c0zU.js → SearchLg-CL6esTtw.js} +1 -1
- package/dist/client/assets/{SearchMd-MG_xST09.js → SearchMd-CzE1IXtk.js} +1 -1
- package/dist/client/assets/{Sector-DLq_M76x.js → Sector-7uDV3O2e.js} +1 -1
- package/dist/client/assets/{Share07-uQomrLCR.js → Share07-DwVANqGN.js} +1 -1
- package/dist/client/assets/{Stars01-DxtRb5WZ.js → Stars01-BvtQBnED.js} +1 -1
- package/dist/client/assets/{Sun-BEdjuN6j.js → Sun-CPPd8cP7.js} +1 -1
- package/dist/client/assets/{Tool01-COB6rywP.js → Tool01-CeJWUTx4.js} +1 -1
- package/dist/client/assets/{Trash01-DTUu7NOU.js → Trash01-C6BZglNY.js} +1 -1
- package/dist/client/assets/{Upload01-Dty36l1w.js → Upload01-DBDdtdRw.js} +1 -1
- package/dist/client/assets/{User01-BSto60sn.js → User01-DhER-7M5.js} +1 -1
- package/dist/client/assets/{UserSquare-C8brDzYe.js → UserSquare-D9izLEMu.js} +1 -1
- package/dist/client/assets/{Users01-CxwIEg0g.js → Users01-CGh_okmA.js} +1 -1
- package/dist/client/assets/{X-B5gw2EHv.js → X-rZfX9y0d.js} +1 -1
- package/dist/client/assets/{XCircle-seVaST6e.js → XCircle-fYjVO-4e.js} +1 -1
- package/dist/client/assets/{XClose-B5O4OZct.js → XClose-Drgfi-MO.js} +1 -1
- package/dist/client/assets/{Zap-D7YN1rKW.js → Zap-DcWY_A2w.js} +1 -1
- package/dist/client/assets/{ZoomOut-qVaUZ9ca.js → ZoomOut-CmJNnQZa.js} +1 -1
- package/dist/client/assets/{access-gate-BIKeQRL_.js → access-gate-DrC617P9.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BCh8Kz04.js → add-connection-dialog-BrlUHuQ9.js} +1 -1
- package/dist/client/assets/{agent-analytics--KcDdN57.js → agent-analytics-Cw9tQISn.js} +1 -1
- package/dist/client/assets/agent-app-BE3kXNei.js +1 -0
- package/dist/client/assets/{agent-assets-CB6ZSzqA.js → agent-assets-NJjJRoAl.js} +1 -1
- package/dist/client/assets/{agent-automation-B57x68Um.js → agent-automation-C1ibaLXl.js} +1 -1
- package/dist/client/assets/{agent-automations-DsNAcyrP.js → agent-automations-DB1TbF54.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-D1XyNIWt.js → agent-connect-sources-Cvwx0aGv.js} +1 -1
- package/dist/client/assets/agent-deck-BjwXuCnI.js +1 -0
- package/dist/client/assets/{agent-e2e-DPPSPIQv.js → agent-e2e-Bm0ir2w1.js} +1 -1
- package/dist/client/assets/{agent-experiments-CMIDfL0o.js → agent-experiments-Bv3P9kPX.js} +1 -1
- package/dist/client/assets/agent-file-B5ULlTNv.js +1 -0
- package/dist/client/assets/{agent-git-BBWRyZCE.js → agent-git-B1sEUtW8.js} +1 -1
- package/dist/client/assets/{agent-hosting-BIMxJVDi.js → agent-hosting-DNw3gDr1.js} +1 -1
- package/dist/client/assets/{agent-icon-BsnTrJjJ.js → agent-icon-CUHwvCug.js} +1 -1
- package/dist/client/assets/agent-library-file-ys3FW6Ts.js +1 -0
- package/dist/client/assets/{agent-monitor-CbmXFCNk.js → agent-monitor-8Z9iofGU.js} +1 -1
- package/dist/client/assets/{agent-overview-BPW1OhWv.js → agent-overview-DV6D5mcW.js} +1 -1
- package/dist/client/assets/agent-settings-Do48sFtz.js +1 -0
- package/dist/client/assets/{agent-site-editor-m4t0aVDo.js → agent-site-editor-Bp9kex6E.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-D6OZaku7.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-Y18YyEWw.js → agent-site-editor-content-BnmxakX4.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-BOHOs4hS.js → agent-site-editor-preview-k6KOtKNv.js} +3 -3
- package/dist/client/assets/agent-view-BcTmq8aW.js +1 -0
- package/dist/client/assets/{agent-view-guard-DBlz_p2t.js → agent-view-guard-mWuQM6et.js} +1 -1
- package/dist/client/assets/{agents-list-7X7ucg0e.js → agents-list-CKVhVS_6.js} +1 -1
- package/dist/client/assets/{ai-providers-Bm2tLrMu.js → ai-providers-CZkq155K.js} +1 -1
- package/dist/client/assets/{alert-dialog-BhgAEu2i.js → alert-dialog-D0EwpcN4.js} +1 -1
- package/dist/client/assets/{alert-DslM1OpO.js → alert-tPvl5V7J.js} +1 -1
- package/dist/client/assets/{api-keys-Dq1Bnar4.js → api-keys-CiTZWPra.js} +1 -1
- package/dist/client/assets/api-keys-D0yLzADM.js +1 -0
- package/dist/client/assets/app-editor-CQk3gD21.js +1 -0
- package/dist/client/assets/{asset-utils-D3ZIfM_Z.js → asset-utils-tQ6o2CDF.js} +1 -1
- package/dist/client/assets/{auth-uih7AqvO.js → auth-6ek5T3GB.js} +1 -1
- package/dist/client/assets/{auth-catchall-pT36A0zr.js → auth-catchall-BTt0HN1L.js} +1 -1
- package/dist/client/assets/{auth-entry-2UXAVZ_y.js → auth-entry-Bq9TVm0P.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BjGbJo38.js → auth-split-layout-CNzOx79W.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B9I5UxEd.js → authenticate-and-persist-oauth-C0EgQu0P.js} +1 -1
- package/dist/client/assets/{automation-list-row-6I49gBmF.js → automation-list-row-BSZgMG8f.js} +1 -1
- package/dist/client/assets/{automation-runs-EAqUU_Ij.js → automation-runs-BMsBLMsg.js} +1 -1
- package/dist/client/assets/{automations-CQPehM0c.js → automations-Bdbn7Pu2.js} +1 -1
- package/dist/client/assets/{autosend-BJW1PfVQ.js → autosend-BNuK0erf.js} +1 -1
- package/dist/client/assets/{avatar-_8aGoMXJ.js → avatar-D0sKo5Ko.js} +1 -1
- package/dist/client/assets/{badge-DMewhq-R.js → badge-CFEM0raL.js} +1 -1
- package/dist/client/assets/{block-document-Dcc8Ersi.js → block-document-Chl-m90T.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BRSFaO-e.js → blocks-preview-workspace-context-DdPADfnI.js} +1 -1
- package/dist/client/assets/{breadcrumb-ClrBbM2y.js → breadcrumb-DGzJ2mi_.js} +1 -1
- package/dist/client/assets/{buckets-8W4ppyWH.js → buckets-W6OaopO-.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CX4X_Kjx.js → build-improve-prompt-doc-DeW5gQgu.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DRm2c8X2.js → bulk-category-panel-Rf660pBu.js} +1 -1
- package/dist/client/assets/{calendar-B83nuFOI.js → calendar-BDrJCpVb.js} +1 -1
- package/dist/client/assets/{capability-load-error-BUHyT4vC.js → capability-load-error-CkdeSGfJ.js} +1 -1
- package/dist/client/assets/{category-editor-DmtS6BHb.js → category-editor-BjOOP9zk.js} +1 -1
- package/dist/client/assets/{chart-O1DWzSgB.js → chart-r_c7F5B8.js} +1 -1
- package/dist/client/assets/{chat-context-H6Zpj-Vd.js → chat-context-DfIPg4kF.js} +1 -1
- package/dist/client/assets/{chat-draft-BXT8ntBy.js → chat-draft-BqHnkSRF.js} +1 -1
- package/dist/client/assets/{checkbox-JC6LoT32.js → checkbox-Dr1iEjvP.js} +1 -1
- package/dist/client/assets/{choose-editor-D-IXY8oL.js → choose-editor-Dp7QkLDv.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-CPiQ28RG.js → claim-phase-copy-CPp-hZ5n.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CQt2stGY.js → cli-auth-success-B3ECmgl-.js} +1 -1
- package/dist/client/assets/{client-icons-D5aE3fDf.js → client-icons-Ce5SmXFK.js} +1 -1
- package/dist/client/assets/{collapsible-B930Znij.js → collapsible-Ozwn48y1.js} +1 -1
- package/dist/client/assets/{collection-detail-DILC7xOI.js → collection-detail-DApKXcnj.js} +1 -1
- package/dist/client/assets/{collection-display-button-DKuiVs_e.js → collection-display-button-DM83AZTp.js} +1 -1
- package/dist/client/assets/{collection-search-DFVK1KQ8.js → collection-search-BRkIgroJ.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DvM7LDpZ.js → collection-table-wrapper-SNXCX7Mr.js} +1 -1
- package/dist/client/assets/{collection-tabs-DWdbo1Je.js → collection-tabs-BN1xWU9h.js} +1 -1
- package/dist/client/assets/{combobox-BoqrgDcx.js → combobox-Ct9LBV7p.js} +1 -1
- package/dist/client/assets/{command-C3KYPhtk.js → command-Das6UcyK.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DhDS_06A.js → companion-mcps-section-B4IqxVxa.js} +1 -1
- package/dist/client/assets/{connect-Dyr51oJk.js → connect-DKxaqp8T.js} +1 -1
- package/dist/client/assets/{connect-layout-BNbZXyRv.js → connect-layout-GIo2P6vy.js} +1 -1
- package/dist/client/assets/{connection-D9jQPSCJ.js → connection-Vq7712iH.js} +1 -1
- package/dist/client/assets/{connection-card-D-LytxKQ.js → connection-card-DmSG--jc.js} +1 -1
- package/dist/client/assets/{connection-detail-CNt-Uyzd.js → connection-detail-DCIP_zf4.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DSpcP1Dc.js → connection-form-helpers-B1Gfuz6v.js} +1 -1
- package/dist/client/assets/{connections-C7W7axzQ.js → connections-BE_Q0OgI.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DBxZ2XGo.js → create-organization-dialog-CNW2-tLc.js} +1 -1
- package/dist/client/assets/{decofile-api-CAHmkQlU.js → decofile-api-DvonsyVe.js} +1 -1
- package/dist/client/assets/{decopilot-BnOOn6v6.js → decopilot-_2aHa55x.js} +1 -1
- package/dist/client/assets/{dialog-BTnr_AVV.js → dialog-O_WsqGxK.js} +1 -1
- package/dist/client/assets/{discover-U5K5oM8Q.js → discover-DNKxCZwb.js} +1 -1
- package/dist/client/assets/{domain-settings-CzbkVMPe.js → domain-settings-9s0IWIG1.js} +1 -1
- package/dist/client/assets/{download-app-dialog-nvCUSnk2.js → download-app-dialog-DJrde0mx.js} +1 -1
- package/dist/client/assets/{drawer-D6LfOfIo.js → drawer-DmWpiePK.js} +1 -1
- package/dist/client/assets/{editor-BqmQJegj.js → editor-bajIdLtD.js} +1 -1
- package/dist/client/assets/{empty-state-DMmxHRTF.js → empty-state-Atjx1U2W.js} +1 -1
- package/dist/client/assets/{empty-state-DMiHCSxy.js → empty-state-DYH2UztF.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CZjdLMbg.js → extract-connection-data-C8tfLeRY.js} +1 -1
- package/dist/client/assets/{feature-gate-ByUUxxIv.js → feature-gate-C5gwa5Kb.js} +1 -1
- package/dist/client/assets/{feature-paywall-C9xFi1nx.js → feature-paywall-C7OuLsbm.js} +1 -1
- package/dist/client/assets/{file-explorer-DmorIYyd.js → file-explorer-6H1B3qt6.js} +1 -1
- package/dist/client/assets/{file-preview-DG6yyUI3.js → file-preview-BiHR6COU.js} +1 -1
- package/dist/client/assets/{file-share-button-B2dbicF1.js → file-share-button-C5XfrmpE.js} +1 -1
- package/dist/client/assets/{file-type-icon-BkowPfFv.js → file-type-icon-D6rUMGA4.js} +1 -1
- package/dist/client/assets/{folder-icon-D4_mI7nX.js → folder-icon-B_bfB1iq.js} +1 -1
- package/dist/client/assets/{form-Cs0YGgAz.js → form-Db0Tj8hF.js} +1 -1
- package/dist/client/assets/{gateway-client-D0N_12qS.js → gateway-client-pQEk_YWf.js} +1 -1
- package/dist/client/assets/{general-C7u2nzrT.js → general-BVSSoQ2s.js} +1 -1
- package/dist/client/assets/{github-icon-BuR6fL8l.js → github-icon-DO6paY-Y.js} +1 -1
- package/dist/client/assets/{home-DVyMZFQG.js → home-B5QgEHQi.js} +1 -1
- package/dist/client/assets/{hooks-CZw8Nj9H.js → hooks-D5xL0VD-.js} +1 -1
- package/dist/client/assets/{hooks-BIIUffrO.js → hooks-Dyt2S900.js} +1 -1
- package/dist/client/assets/{icon-button-ffXmg1OC.js → icon-button-bkQbZIJx.js} +1 -1
- package/dist/client/assets/{index-BYhU0OAw.js → index-3wu9QSuh.js} +1 -1
- package/dist/client/assets/{index-DbCXB6UC.js → index-B1H3xTcC.js} +1 -1
- package/dist/client/assets/{index-CJvGo7M-.js → index-B9KXIX84.js} +2 -2
- package/dist/client/assets/{index-IKyehAj0.js → index-BEBsD_Uj.js} +1 -1
- package/dist/client/assets/{index-CwPMc6DD.js → index-BFBOXOd5.js} +1 -1
- package/dist/client/assets/{index-DqJtHo4n.js → index-BMguGW4R.js} +1 -1
- package/dist/client/assets/{index-P6xk5T3b.js → index-CcCENa4K.js} +1 -1
- package/dist/client/assets/{index-cLR8hRUZ.js → index-CcStfLcS.js} +1 -1
- package/dist/client/assets/{index-R-0H4aXt.js → index-Cqfo3dLZ.js} +1 -1
- package/dist/client/assets/{index-CC4ky7Bt.js → index-D-HNn6NY.js} +1 -1
- package/dist/client/assets/{index-DnfITnHh.js → index-DTD6MU_-.js} +1 -1
- package/dist/client/assets/{index-BSqcExWu.js → index-DXPgJ5pN.js} +1 -1
- package/dist/client/assets/{index-Bo1CTi_x.js → index-TQAMEK3-.js} +1 -1
- package/dist/client/assets/{index-B0qiS0Xy.js → index-ew-hZs-T.js} +1 -1
- package/dist/client/assets/{index-redirect-UW05aF5k.js → index-redirect-DtXP9nXs.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Co_jht2h.js → infiniteQueryObserver-DrVVQrbK.js} +1 -1
- package/dist/client/assets/{infra-billing-BNNb1HUT.js → infra-billing-7wcYScSW.js} +1 -1
- package/dist/client/assets/{input-DmhYaSfN.js → input-ALPFLjGK.js} +1 -1
- package/dist/client/assets/{input-CW1e_IGW.js → input-BlBczlUj.js} +1 -1
- package/dist/client/assets/{input-ctnVSOTh.js → input-DLqUDU4v.js} +1 -1
- package/dist/client/assets/{integration-icon-DBmxvUTr.js → integration-icon-BDlRT6Oh.js} +1 -1
- package/dist/client/assets/{label-4VvccInH.js → label-CeYXCWIS.js} +1 -1
- package/dist/client/assets/{last-preview-page-CvHaNJZf.js → last-preview-page-Pa_m-NGp.js} +1 -1
- package/dist/client/assets/{layout-YtNzwgmw.js → layout-2OR9C3vu.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-D_WKz4Q4.js → legacy-agents-deep-BXlfHsnP.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Cuoc1Q6w.js → legacy-main-redirect-CXr4DIMg.js} +1 -1
- package/dist/client/assets/{library-C5hSt5jS.js → library-DC1sHBtK.js} +1 -1
- package/dist/client/assets/{login-BHMe1ZN5.js → login-ETcUXX8b.js} +1 -1
- package/dist/client/assets/{markdown-DgiLeH6x.js → markdown-BHnqyTep.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Dpmk1Vv4.js → mcp-app-renderer-CN7HJqgc.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C2J7M1Qy.js → mcp-oauth-DBcvf4Gv.js} +1 -1
- package/dist/client/assets/{members-DZUeyWSF.js → members-CKovzLZm.js} +1 -1
- package/dist/client/assets/{message-templates-DEiaR-4t.js → message-templates-CVWApNdw.js} +1 -1
- package/dist/client/assets/{mini-report-page-DZ2brjJR.js → mini-report-page-D75y78PO.js} +1 -1
- package/dist/client/assets/{mock-board-C3-S11yK.js → mock-board-CKKlMTR7.js} +3 -3
- package/dist/client/assets/{monaco-editor-CWYBB1Jc.js → monaco-editor-sTKHVHs7.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BIOo_dNd.js → monitoring-stats-row-CFvcs0FY.js} +1 -1
- package/dist/client/assets/{multi-select-CQmA6upg.js → multi-select-bTG-_3iX.js} +1 -1
- package/dist/client/assets/{mustache-CCIaSVE8.js → mustache-D5HgeK1D.js} +1 -1
- package/dist/client/assets/{oauth-callback-JKin_sKW.js → oauth-callback-BQGhxVdk.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CVBe8y5A.js → oauth-callback-ai-provider-9WlNwZ-4.js} +1 -1
- package/dist/client/assets/{onboarding-CiuzJ17Q.js → onboarding-TK-D_Eg-.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-B1t6VhD_.js → optimistic-project-sidebar-views-BuKbcQgt.js} +1 -1
- package/dist/client/assets/{org-file-open-context-BpKzz2X6.js → org-file-open-context-DNQMuR7f.js} +1 -1
- package/dist/client/assets/{organization-choice-DtGmLZl3.js → organization-choice-O0bt4mln.js} +1 -1
- package/dist/client/assets/{orgs-C7GJQT2F.js → orgs-Dv-imO9p.js} +1 -1
- package/dist/client/assets/{page-seo-form-CJEF56bx.js → page-seo-form-Biw0BL9j.js} +1 -1
- package/dist/client/assets/{pair-B42JzU0G.js → pair-B2IVuWLB.js} +1 -1
- package/dist/client/assets/{plan-ladder-DZj3EnLg.js → plan-ladder-CCULPA3j.js} +1 -1
- package/dist/client/assets/{popover-Dc6K6r1C.js → popover-Wvqr_2yR.js} +1 -1
- package/dist/client/assets/{post-calendar-CdMKYMS2.js → post-calendar-a5E2qOG-.js} +1 -1
- package/dist/client/assets/{post-editor-my4ezea6.js → post-editor-DFx-26e8.js} +1 -1
- package/dist/client/assets/{preview-content-CziYH8nP.js → preview-content-BCd4V54J.js} +1 -1
- package/dist/client/assets/{preview-dialog-DDwPGbj2.js → preview-dialog-ClD44N_y.js} +1 -1
- package/dist/client/assets/{primitives-BeUcpT_l.js → primitives-byxT-Ui7.js} +1 -1
- package/dist/client/assets/{profile-BOKysRT9.js → profile-9uJoAI6f.js} +1 -1
- package/dist/client/assets/{project-app-view-CRETWS5_.js → project-app-view-XjFGHkML.js} +1 -1
- package/dist/client/assets/{project-feed-DnXMTyTK.js → project-feed-B4oD-iPW.js} +1 -1
- package/dist/client/assets/{project-icon-CQHpgqjE.js → project-icon-BFHg-quI.js} +1 -1
- package/dist/client/assets/project-reports-zGc7Q3TI.js +1 -0
- package/dist/client/assets/project-tasks-DqoKheUq.js +1 -0
- package/dist/client/assets/{prompts-Buirx6sq.js → prompts-D6Qoh4zQ.js} +1 -1
- package/dist/client/assets/record-editor-jLe9lZIe.js +1 -0
- package/dist/client/assets/{redirect-editor-T_gO2ARt.js → redirect-editor-CnOUBdx5.js} +1 -1
- package/dist/client/assets/{reports-D29xfPX4.js → reports-D6i3xT-r.js} +1 -1
- package/dist/client/assets/{reports-onboarding-Cd6ZQZfG.js → reports-onboarding-BJ3gF8Jt.js} +1 -1
- package/dist/client/assets/reports-r1Z-LWUs.js +1 -0
- package/dist/client/assets/{reports-tab-C8QCg1Zh.js → reports-tab-DXNb57Ao.js} +2 -2
- package/dist/client/assets/{repositories-eEvxM93v.js → repositories-BXIZ-orB.js} +1 -1
- package/dist/client/assets/{repository-import-picker-CYhmnGT6.js → repository-import-picker-BomeZ4YD.js} +1 -1
- package/dist/client/assets/{repository-picker-CJrIw77i.js → repository-picker-Bpcr10QR.js} +1 -1
- package/dist/client/assets/{require-capability-CQeOwSD4.js → require-capability-B5vhBt9u.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CE8AnY1F.js → required-auth-layout-CyCpjrfs.js} +1 -1
- package/dist/client/assets/{reset-password-DFPIxqxe.js → reset-password-B2Z9lfbJ.js} +1 -1
- package/dist/client/assets/{resizable-C4Edp607.js → resizable-X9aB8eM5.js} +1 -1
- package/dist/client/assets/{review-settings-CbjseDbt.js → review-settings-c3E6ViNV.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-Do2n6JIO.js → rich-text-link-control-DLGtga8b.js} +1 -1
- package/dist/client/assets/{roles-CJoQe-iA.js → roles-DPfRfWCB.js} +1 -1
- package/dist/client/assets/{route-DFFPgrtv.js → route-Cvx3z9KR.js} +1 -1
- package/dist/client/assets/{route-euoZW6b2.js → route-DtNPEkNV.js} +1 -1
- package/dist/client/assets/{route-wRSR0-RQ.js → route-cbFwKoF4.js} +1 -1
- package/dist/client/assets/{route-page-header-CEYsqpu_.js → route-page-header-Dr10DLhY.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-Bm9IpSRw.js → runnable-block-editor-Luwb6lXF.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CFfKpmMd.js → sandbox-lifecycle-context-CHjp6hDX.js} +1 -1
- package/dist/client/assets/{schema--090tLTs.js → schema-CdJJOHN7.js} +1 -1
- package/dist/client/assets/{scroll-area-DaAnCQrg.js → scroll-area-DiE2RXUS.js} +1 -1
- package/dist/client/assets/{search-input-Cq2H58ks.js → search-input-MsiE4xnC.js} +1 -1
- package/dist/client/assets/{search-toggle-BzE09wAY.js → search-toggle-BujrzbmS.js} +1 -1
- package/dist/client/assets/{secret-picker-FNqMA4b3.js → secret-picker-BOvhv2JQ.js} +1 -1
- package/dist/client/assets/{secrets-B79xiOvr.js → secrets-CpJVBw79.js} +1 -1
- package/dist/client/assets/{sections-editor-Bch82FO0.js → sections-editor-DDnlJ9KQ.js} +1 -1
- package/dist/client/assets/{select-_7jCWmPs.js → select-BmpMhuXU.js} +1 -1
- package/dist/client/assets/{select-model-C991WVaS.js → select-model-Cqn2WNWa.js} +1 -1
- package/dist/client/assets/{seo-editor-COzsrOm2.js → seo-editor-1A35EHVT.js} +1 -1
- package/dist/client/assets/{separator-CTDFfWkU.js → separator-Dl5b3JZz.js} +1 -1
- package/dist/client/assets/{settings-tab-OQmnW7Ut.js → settings-tab-CJkqi9sH.js} +1 -1
- package/dist/client/assets/{sheet-fXc9nA9M.js → sheet-B0Sr1nwg.js} +1 -1
- package/dist/client/assets/{shell-layout-CFgBlrHw.js → shell-layout-BA4WahT2.js} +1 -1
- package/dist/client/assets/{sidebar-CD_qlBS1.js → sidebar-DGGwKufn.js} +1 -1
- package/dist/client/assets/{skill-preview-iGSQpWTN.js → skill-preview-D99Hmxpn.js} +1 -1
- package/dist/client/assets/{skills-Bo3AuN87.js → skills-DusNUug_.js} +1 -1
- package/dist/client/assets/{sso-bCqIdarJ.js → sso-Q5OGwWHg.js} +1 -1
- package/dist/client/assets/{switch-_-H0ZzQ0.js → switch-CGGsZGg2.js} +1 -1
- package/dist/client/assets/{synced-repos-CJ3PDs71.js → synced-repos-disT4WD-.js} +1 -1
- package/dist/client/assets/{table-B0ylfHsr.js → table-p5K_r58-.js} +1 -1
- package/dist/client/assets/{tabs-CbBMI_3w.js → tabs-B2X-mfaO.js} +1 -1
- package/dist/client/assets/{task-board-BOtwbMNd.js → task-board-mTs0BkYi.js} +1 -1
- package/dist/client/assets/{task-route-ClDUjCmA.js → task-route-CGQF_N5D.js} +1 -1
- package/dist/client/assets/{task-status-DCDgnDj7.js → task-status-BfecW6Jc.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CiRR6YhP.js → taskboard-analytics-CtICaEUy.js} +1 -1
- package/dist/client/assets/{tasks-MLHolUxt.js → tasks-BAEY4_dG.js} +1 -1
- package/dist/client/assets/tasks-WvRRvqRc.js +1 -0
- package/dist/client/assets/{textarea-Pm894Vb7.js → textarea-BGjs-_ya.js} +1 -1
- package/dist/client/assets/{thread-button-0yNolO5U.js → thread-button-B_TrQG9B.js} +1 -1
- package/dist/client/assets/{thread-intent-CZ1rMWWZ.js → thread-intent-BHNHSQWV.js} +1 -1
- package/dist/client/assets/{thread-route-Cz0k6s-0.js → thread-route-C_KFFLE6.js} +1 -1
- package/dist/client/assets/{thread-route-DDyPLFny.js → thread-route-DNtSLAiW.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CoOlYiyz.js → thread-sheet-body-C_nRrD8j.js} +1 -1
- package/dist/client/assets/{toggle-group-BCKZnr8W.js → toggle-group-C66gu9FY.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-SVo3Fo7H.js → toolbar-icon-button-ClGr1SmO.js} +1 -1
- package/dist/client/assets/{tooltip-ChaEDFwp.js → tooltip-C3KYJcjJ.js} +1 -1
- package/dist/client/assets/{track-CO4eg07r.js → track-D48SK3WP.js} +1 -1
- package/dist/client/assets/{types-DOMFbfVw.js → types-CsEtlQqb.js} +1 -1
- package/dist/client/assets/{usage-stats-rx7t_Nos.js → usage-stats-BWbFQ6nI.js} +1 -1
- package/dist/client/assets/{use-ai-providers-8tdExCCT.js → use-ai-providers-CBInTetj.js} +1 -1
- package/dist/client/assets/{use-automations-C3DIh181.js → use-automations-DhqE5Iln.js} +1 -1
- package/dist/client/assets/{use-autosave-Bra0uvzP.js → use-autosave-BZ31lz42.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Bull_Zxw.js → use-connect-companion-Cgkf5QHC.js} +1 -1
- package/dist/client/assets/{use-connection-_01X3r9K.js → use-connection-DNwnGnCC.js} +1 -1
- package/dist/client/assets/{use-copy-DYjRVCxp.js → use-copy-BaRXHXi4.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bj3aYXDp.js → use-create-virtual-mcp-CNiIu7cC.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-yvDr0D7T.js → use-date-fns-locale-CIJdwgov.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DbVxH1pQ.js → use-debounced-autosave-CvGfYHrZ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BAx8VCR0.js → use-debounced-value-CkL-oBw0.js} +1 -1
- package/dist/client/assets/{use-deco-credits-yiRW4WkY.js → use-deco-credits-raOHBi_A.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D9jYfL-F.js → use-decopilot-events-BBmla5vN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C_I3mgoO.js → use-delete-connection-BaUPu_7u.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-ByTSklJo.js → use-deployment-admin-ReJnLBFa.js} +1 -1
- package/dist/client/assets/{use-entitlements-C3RfsquV.js → use-entitlements-B9tTc-Ev.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-D8zl5mEv.js → use-fast-preview-draft-url-CDhB1Fq2.js} +1 -1
- package/dist/client/assets/{use-file-configs-DOTdJIrl.js → use-file-configs-y5ZRqVAK.js} +1 -1
- package/dist/client/assets/{use-in-settings-C7yJRVKh.js → use-in-settings-pVGM4OYb.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D7ecDjvR.js → use-infinite-scroll-DTMvlJNU.js} +1 -1
- package/dist/client/assets/{use-join-requests-Ilb6bw8C.js → use-join-requests-Kpry70bT.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CnSLB640.js → use-main-panel-tabs-4N3JxcLp.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BZ3hpP0X.js → use-mcp-auth-status-DKnE_dZf.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CNhRUvA5.js → use-mcp-client-DgXYHdq4.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-EbPPuTcd.js → use-mcp-prompts-BXGa38c2.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BPf00IDz.js → use-mcp-tools-CVoDfjIr.js} +1 -1
- package/dist/client/assets/{use-members-B3lGJD1d.js → use-members-BBMuBGx7.js} +1 -1
- package/dist/client/assets/{use-mobile-DX7VP8iK.js → use-mobile-BYkN2CBV.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-g6nQp_q-.js → use-navigate-to-agent-fAaFURKA.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-UFHRZeDE.js → use-open-billing-url-D9101_ww.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DbfrlNFJ.js → use-org-auth-client-gMmPeQrf.js} +1 -1
- package/dist/client/assets/{use-org-fs-BJVySa9m.js → use-org-fs-FICli5P0.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Bu37nqQ2.js → use-org-repo-syncs-Be5dKRHy.js} +1 -1
- package/dist/client/assets/{use-org-sso-BlWvz-NF.js → use-org-sso-Dbq_Rnc1.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DE7kCN9L.js → use-organization-roles-xXXb48cX.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BLQ6mu_F.js → use-organization-settings-C_ZfDEow.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BsGJc9V3.js → use-panel-navigate-Wiv5HcS5.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-KEUHlmpo.js → use-project-native-view-presence-DON0VaEF.js} +1 -1
- package/dist/client/assets/{use-project-scope-BGBC-ayH.js → use-project-scope-bzqn-AFR.js} +1 -1
- package/dist/client/assets/{use-releases-CQr6l3Pj.js → use-releases-BfrGp9Ns.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CofOdWW9.js → use-reports-diagnostic-LvWG_eGZ.js} +1 -1
- package/dist/client/assets/{use-route-default-main-B3Le2s3e.js → use-route-default-main-BxMIgjib.js} +1 -1
- package/dist/client/assets/{use-secrets-C61EqNPY.js → use-secrets-CQXQ7e5K.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-lO8EHufR.js → use-section-preview-base-DRPQTFm9.js} +1 -1
- package/dist/client/assets/{use-session-runtime-CJtUNfm9.js → use-session-runtime-QJbktQ89.js} +1 -1
- package/dist/client/assets/{use-tags-Cw8Tl4V2.js → use-tags-w04zmXlI.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-P3ACpavh.js → use-task-board-analytics-Da2cyRoo.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Bh8dwwJo.js → use-task-metadata-DiRAYc7A.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DWb5Ffwp.js → use-thread-outputs-BBHbLuqJ.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DYsZ_S7V.js → use-virtual-mcp-CijpHWeY.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-yhr2eVB6.js +1 -0
- package/dist/client/assets/{useQueries-BkAl2Nho.js → useQueries-0w4KxC3A.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D4wrf6ZX.js +1 -0
- package/dist/client/assets/{users-D9VRrUZq.js → users-6Ayldnit.js} +1 -1
- package/dist/client/assets/{utils-SncAWk77.js → utils-D_eBTbjc.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bc7nrgXK.js → variant-calendar-C5cziu6r.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-B6vu1CuI.js → variant-matcher-override-GL2lvgp-.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BaA42o_l.js → view-mode-toggle-C2y3stN0.js} +1 -1
- package/dist/client/assets/{virtual-mcp-C32FiGUT.js → virtual-mcp-BrketPQW.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Br6aux_w.js +0 -1
- package/dist/client/assets/agent-deck-Vhc8akKy.js +0 -1
- package/dist/client/assets/agent-file-BJobJMYY.js +0 -1
- package/dist/client/assets/agent-library-file-SIskwRA5.js +0 -1
- package/dist/client/assets/agent-settings-CzdAFelD.js +0 -1
- package/dist/client/assets/agent-site-editor-code-tjytfPRA.js +0 -2
- package/dist/client/assets/agent-view-B0TeCTGP.js +0 -1
- package/dist/client/assets/api-keys-BdpkM46E.js +0 -1
- package/dist/client/assets/app-editor-C3rD0azc.js +0 -1
- package/dist/client/assets/project-reports-D_REhIUx.js +0 -1
- package/dist/client/assets/project-tasks-CCtFBWbk.js +0 -1
- package/dist/client/assets/record-editor-CvRbpNqI.js +0 -1
- package/dist/client/assets/reports-CyGj47MI.js +0 -1
- package/dist/client/assets/tasks-pXX1X4bj.js +0 -1
- package/dist/client/assets/useInfiniteQuery-ChD58h72.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C9oYMcau.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-
|
|
2
|
-
import{r as x,ap as Bt,aH as it,aq as je,c as me,b as Ae,j as n,K as ur,e as mr,h as $t,B as Ze,aI as fr,a0 as gn,aJ as pr,Z as gs,l as Ue,aG as hr,P as en,q as gr,t as qn}from"./index-CJvGo7M-.js";import{A as vr}from"./agent-view-guard-DBlz_p2t.js";import{F as xr}from"./feature-gate-ByUUxxIv.js";import{a as br,b as Ft}from"./chat-context-H6Zpj-Vd.js";import{t as Gn}from"./ChevronUp-BEGO8LAp.js";import{v as vs,D as yr,E as wr,F as tn,G as Jn,H as Yn,I as Qn,z as Zn,J as nn,x as kr}from"./agent-icon-BsnTrJjJ.js";import{i as sn}from"./Share07-uQomrLCR.js";import{n as mn}from"./LinkExternal01-JGUyp91x.js";import{s as Xn}from"./Plus-ojokEQ8x.js";import{i as Pr}from"./SearchLg-C-i1c0zU.js";import{P as Sr,a as jr,b as Er}from"./popover-Dc6K6r1C.js";import{a as vt,b as xt,c as xs,d as bs,e as ys,C as ws}from"./command-C3KYPhtk.js";import{d as Nr,a as Cr}from"./use-virtual-mcp-DYsZ_S7V.js";import{c as ks,d as vn,f as Rr}from"./sandbox-lifecycle-context-CFfKpmMd.js";import{e as Tr,d as Lr}from"./backoff-8mStPHYB.js";import{a as Or}from"./thread-intent-CZ1rMWWZ.js";import{u as Ps}from"./use-session-runtime-CJtUNfm9.js";import{N as _r,b as Ar,s as ot,n as xn,c as Ss,f as He,v as js,h as Dr,u as Br,e as $r,d as Fr,j as Mr,k as es}from"./claim-phase-copy-CPiQ28RG.js";import{u as zr}from"./use-mobile-DX7VP8iK.js";import{c as Ge,T as Je,a as Ye}from"./tooltip-ChaEDFwp.js";import{T as Fe}from"./toolbar-icon-button-SVo3Fo7H.js";import{b as Ir,a as Kr,u as Es,g as Ur,c as Hr,B as rn,P as Wr,r as Vr,R as qr,d as Gr,e as bn,f as Ns,h as Jr,i as Yr,j as Qr,l as Zr,m as Xr,k as ea,p as ta,n as na,S as an}from"./runnable-block-editor-Bm9IpSRw.js";import{w as Ot}from"./variant-matcher-override-B6vu1CuI.js";import{r as sa,w as ra,D as aa,b as ts,a as ia}from"./section-preview-url-Csj0_ZDg.js";import{u as oa}from"./use-fast-preview-draft-url-D8zl5mEv.js";import{r as Cs,l as Rs,u as la,w as ca}from"./last-preview-page-CvHaNJZf.js";import{u as da}from"./use-is-desktop-app-BNujXJc_.js";import{a as ua,d as Ts}from"./shell-layout-CFgBlrHw.js";import{u as fn}from"./useQueries-BkAl2Nho.js";import{i as ma}from"./ArrowRight-CswoMXm3.js";import{b as Ls,D as Os,c as _s,d as As,e as fa}from"./dialog-BTnr_AVV.js";import{I as ns}from"./input-DmhYaSfN.js";import{u as Ds}from"./blocks-preview-workspace-context-BRSFaO-e.js";import{i as pa}from"./AlertCircle-iVRTcaBg.js";import{E as yn}from"./empty-state-DMmxHRTF.js";import{i as ha}from"./X-B5gw2EHv.js";import{M as ga}from"./monaco-editor-CWYBB1Jc.js";import{a as va}from"./utils-SncAWk77.js";import{R as ss,a as pt,b as on}from"./resizable-C4Edp607.js";import{r as xa}from"./virtual-mcp-C32FiGUT.js";import{b as ln}from"./use-project-scope-BGBC-ayH.js";import{G as rs}from"./github-icon-BuR6fL8l.js";import{R as ba}from"./repository-import-picker-CYhmnGT6.js";import{r as ya}from"./use-main-panel-tabs-CnSLB640.js";import{u as wa}from"./use-task-metadata-Bh8dwwJo.js";import{b as ka}from"./thread-route-Cz0k6s-0.js";import"./use-panel-navigate-BsGJc9V3.js";import"./feature-paywall-C9xFi1nx.js";import"./Check-ocmT1xhM.js";import"./plan-ladder-DZj3EnLg.js";import"./use-entitlements-C3RfsquV.js";import"./autosend-BJW1PfVQ.js";import"./hooks-CZw8Nj9H.js";import"./use-mcp-client-CNhRUvA5.js";import"./auth-uih7AqvO.js";import"./task-board-BOtwbMNd.js";import"./schema--090tLTs.js";import"./use-ai-providers-8tdExCCT.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-D9jYfL-F.js";import"./use-organization-settings-BLQ6mu_F.js";import"./Tool01-COB6rywP.js";import"./ArrowUp-ZHCqKDUA.js";import"./ArrowLeft-DfZNe3Vl.js";import"./XCircle-seVaST6e.js";import"./ZoomOut-qVaUZ9ca.js";import"./Globe04-B3-IlgJ4.js";import"./CheckCircle-BmHBdTYn.js";import"./UserSquare-C8brDzYe.js";import"./Copy01-Djl84HjT.js";import"./CreditCard01-DA21YZ9t.js";import"./DotsVertical-GP-H6-nS.js";import"./Download01-CQZ78LGI.js";import"./Eye-CNk4ml55.js";import"./XClose-B5O4OZct.js";import"./Image01-zHW5odO5.js";import"./Key01-BCjLeK7M.js";import"./LayoutLeft-dzqHSKuH.js";import"./Link01-CBc36KC8.js";import"./Monitor01-DMBIX-hP.js";import"./Sun-BEdjuN6j.js";import"./Package-VT7-ZGoy.js";import"./Palette-CPW0a6wF.js";import"./SearchMd-MG_xST09.js";import"./Stars01-DxtRb5WZ.js";import"./Trash01-DTUu7NOU.js";import"./Upload01-Dty36l1w.js";import"./User01-BSto60sn.js";import"./Users01-CxwIEg0g.js";import"./Zap-D7YN1rKW.js";import"./index-DqJtHo4n.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./index-P6xk5T3b.js";import"./pair-B42JzU0G.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-B930Znij.js";import"./use-copy-DYjRVCxp.js";import"./usage-stats-rx7t_Nos.js";import"./markdown-DgiLeH6x.js";import"./org-file-open-context-BpKzz2X6.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Dpmk1Vv4.js";import"./types-DOMFbfVw.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-D0N_12qS.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-fXc9nA9M.js";import"./integration-icon-DBmxvUTr.js";import"./use-connection-_01X3r9K.js";import"./use-navigate-to-agent-g6nQp_q-.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-EbPPuTcd.js";import"./index-BYhU0OAw.js";import"./form-Cs0YGgAz.js";import"./label-4VvccInH.js";import"./use-thread-outputs-DWb5Ffwp.js";import"./file-type-icon-BkowPfFv.js";import"./scroll-area-DaAnCQrg.js";import"./select-_7jCWmPs.js";import"./calendar-B83nuFOI.js";import"./textarea-Pm894Vb7.js";import"./rich-text-link-control-Do2n6JIO.js";import"./switch-_-H0ZzQ0.js";import"./combobox-BoqrgDcx.js";import"./alert-dialog-BhgAEu2i.js";import"./search-input-Cq2H58ks.js";import"./tabs-CbBMI_3w.js";import"./use-debounced-value-BAx8VCR0.js";import"./use-file-configs-DOTdJIrl.js";import"./asset-utils-D3ZIfM_Z.js";import"./useInfiniteQuery-ChD58h72.js";import"./infiniteQueryObserver-Co_jht2h.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-BCKZnr8W.js";import"./decofile-api-CAHmkQlU.js";import"./sandbox-git-api-B1R0585s.js";import"./avatar-_8aGoMXJ.js";import"./download-app-dialog-nvCUSnk2.js";import"./project-icon-CQHpgqjE.js";import"./required-auth-layout-CE8AnY1F.js";import"./use-org-sso-BlWvz-NF.js";import"./editor-BqmQJegj.js";import"./repository-picker-CJrIw77i.js";import"./collection-search-DFVK1KQ8.js";import"./use-route-default-main-B3Le2s3e.js";import"./use-mcp-tools-BPf00IDz.js";import"./index-cLR8hRUZ.js";import"./drawer-D6LfOfIo.js";import"./input-ctnVSOTh.js";import"./chat-draft-BXT8ntBy.js";import"./use-deco-credits-yiRW4WkY.js";import"./use-open-billing-url-UFHRZeDE.js";import"./decopilot-BnOOn6v6.js";import"./checkbox-JC6LoT32.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-CC4ky7Bt.js";import"./input-CW1e_IGW.js";import"./hooks-BIIUffrO.js";import"./use-org-fs-BJVySa9m.js";import"./question-004-sINsf4GQ.js";import"./use-members-B3lGJD1d.js";import"./use-org-auth-client-DbfrlNFJ.js";import"./add-connection-dialog-BCh8Kz04.js";import"./extract-connection-data-CZjdLMbg.js";import"./metadata-D72DunRR.js";import"./connection-D9jQPSCJ.js";import"./connection-card-D-LytxKQ.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-DSpcP1Dc.js";import"./authenticate-and-persist-oauth-B9I5UxEd.js";import"./mcp-oauth-C2J7M1Qy.js";import"./collection-tabs-DWdbo1Je.js";import"./badge-DMewhq-R.js";import"./use-infinite-scroll-D7ecDjvR.js";import"./useSuspenseInfiniteQuery-C9oYMcau.js";import"./use-project-native-view-presence-KEUHlmpo.js";import"./site-slug-uya6Wp4-.js";const Pa={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Sa(t){const{previewState:e,progressStatus:r,fastPreviewActive:s=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,c=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?Pa:s&&i&&c?{mode:"production",iframeBase:c,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&r!=="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 ja=1e4,Ea=1e3,Na=3e4;function Ca({iframeRef:t,src:e,active:r}){const s=x.useRef(0),i=x.useRef(null),u=x.useRef(null),c=x.useRef(e),d=x.useRef(r);c.current=e,d.current=r;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()},ja)},h=()=>{if(!d.current||!c.current)return;u.current&&clearTimeout(u.current);const P=Tr(Na,Ea,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,k=c.current;!g||!k||!d.current||(g.src=k,l())},P)},f=()=>{s.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return x.useEffect(()=>{if(o(),s.current=0,!(!r||!e))return l(),o},[e,r]),{handleLoad:f,handleError:p}}var as;(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"})(as||(as={}));const Ra=Bt({tag:je(),id:je(),classes:je(),text:je(),html:je(),manifestKey:je().nullable(),componentName:je().nullable(),parents:je(),url:je(),path:je(),viewport:Bt({width:it(),height:it()}),position:Bt({x:it(),y:it()})}),Ta=`(function() {
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-DDnlJ9KQ.js","assets/index-B9KXIX84.js","assets/index-B7WbW8e4.css","assets/chat-context-DfIPg4kF.js","assets/use-panel-navigate-Wiv5HcS5.js","assets/thread-route-C_KFFLE6.js","assets/use-project-scope-bzqn-AFR.js","assets/use-virtual-mcp-CijpHWeY.js","assets/use-mcp-client-DgXYHdq4.js","assets/auth-6ek5T3GB.js","assets/github-repo-BknN0SVI.js","assets/autosend-BNuK0erf.js","assets/thread-intent-BHNHSQWV.js","assets/slugify-CEUa2lfQ.js","assets/hooks-D5xL0VD-.js","assets/backoff-8mStPHYB.js","assets/task-board-mTs0BkYi.js","assets/schema-CdJJOHN7.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-B9tTc-Ev.js","assets/use-ai-providers-CBInTetj.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-BBmla5vN.js","assets/use-organization-settings-C_ZfDEow.js","assets/runnable-block-editor-Luwb6lXF.js","assets/use-session-runtime-QJbktQ89.js","assets/claim-phase-copy-CPp-hZ5n.js","assets/agent-icon-CUHwvCug.js","assets/AlertCircle-BXd3wmhE.js","assets/Tool01-CeJWUTx4.js","assets/ArrowUp-BAzKSoqz.js","assets/ArrowLeft-CtG_Sz3T.js","assets/ArrowRight-DGQoBfX2.js","assets/XCircle-fYjVO-4e.js","assets/ZoomOut-CmJNnQZa.js","assets/Globe04-Cfnfjo6J.js","assets/CheckCircle-BmoxvNcp.js","assets/Check-D3UEH1bb.js","assets/ChevronUp-DkDOUc-8.js","assets/UserSquare-D9izLEMu.js","assets/Copy01-1VyfDicU.js","assets/CreditCard01-CrYxi8Yw.js","assets/DotsVertical-BVvaV8Wy.js","assets/Download01-CRbdo8yP.js","assets/Eye-DnZDEgOn.js","assets/Share07-DwVANqGN.js","assets/XClose-Drgfi-MO.js","assets/Image01-ZQL1hr5Q.js","assets/Key01-HEuAw7Uw.js","assets/LayoutLeft-Di6ed8JP.js","assets/Link01-CZiQuc44.js","assets/LinkExternal01-BekDuv1R.js","assets/Monitor01-BLWTHtTp.js","assets/Sun-CPPd8cP7.js","assets/Package-tH33TvgC.js","assets/Palette-BagjpLZN.js","assets/Plus-Y-KvMcUC.js","assets/SearchLg-CL6esTtw.js","assets/SearchMd-CzE1IXtk.js","assets/Stars01-BvtQBnED.js","assets/Trash01-C6BZglNY.js","assets/Upload01-DBDdtdRw.js","assets/User01-DhER-7M5.js","assets/Users01-CGh_okmA.js","assets/X-rZfX9y0d.js","assets/Zap-DcWY_A2w.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-B2IVuWLB.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-Ozwn48y1.js","assets/use-copy-BaRXHXi4.js","assets/usage-stats-BWbFQ6nI.js","assets/markdown-BHnqyTep.js","assets/dialog-O_WsqGxK.js","assets/org-file-open-context-DNQMuR7f.js","assets/use-mobile-BYkN2CBV.js","assets/tooltip-C3KYJcjJ.js","assets/index-CcCENa4K.js","assets/shell-layout-BA4WahT2.js","assets/avatar-D0sKo5Ko.js","assets/download-app-dialog-DJrde0mx.js","assets/command-Das6UcyK.js","assets/index-BMguGW4R.js","assets/integration-icon-BDlRT6Oh.js","assets/project-icon-BFHg-quI.js","assets/required-auth-layout-CyCpjrfs.js","assets/use-org-sso-Dbq_Rnc1.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-CN7HJqgc.js","assets/types-CsEtlQqb.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/gateway-client-pQEk_YWf.js","assets/tool-namespace-DmnQIdtF.js","assets/utils-CVEq3hMx.js","assets/sheet-B0Sr1nwg.js","assets/use-connection-DNwnGnCC.js","assets/use-navigate-to-agent-fAaFURKA.js","assets/use-mcp-prompts-BXGa38c2.js","assets/index-3wu9QSuh.js","assets/form-Db0Tj8hF.js","assets/label-CeYXCWIS.js","assets/input-ALPFLjGK.js","assets/use-thread-outputs-BBHbLuqJ.js","assets/file-type-icon-D6rUMGA4.js","assets/popover-Wvqr_2yR.js","assets/utils-D_eBTbjc.js","assets/scroll-area-DiE2RXUS.js","assets/select-BmpMhuXU.js","assets/monaco-editor-sTKHVHs7.js","assets/editor-bajIdLtD.js","assets/calendar-BDrJCpVb.js","assets/textarea-BGjs-_ya.js","assets/rich-text-link-control-DLGtga8b.js","assets/switch-CGGsZGg2.js","assets/combobox-Ct9LBV7p.js","assets/alert-dialog-D0EwpcN4.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-MsiE4xnC.js","assets/tabs-B2X-mfaO.js","assets/use-debounced-value-CkL-oBw0.js","assets/use-file-configs-y5ZRqVAK.js","assets/asset-utils-tQ6o2CDF.js","assets/useInfiniteQuery-yhr2eVB6.js","assets/infiniteQueryObserver-DrVVQrbK.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/toggle-group-C66gu9FY.js","assets/decofile-api-DvonsyVe.js","assets/sandbox-git-api-B1R0585s.js","assets/mustache-D5HgeK1D.js","assets/page-seo-form-Biw0BL9j.js","assets/use-section-preview-base-DRPQTFm9.js","assets/section-preview-url-Csj0_ZDg.js","assets/variant-matcher-override-GL2lvgp-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as x,ap as Bt,aH as it,aq as je,c as me,b as Ae,j as n,K as ur,e as mr,h as $t,B as Ze,aI as fr,a0 as gn,aJ as pr,Z as gs,l as Ue,aG as hr,P as en,q as gr,t as qn}from"./index-B9KXIX84.js";import{A as vr}from"./agent-view-guard-mWuQM6et.js";import{F as xr}from"./feature-gate-C5gwa5Kb.js";import{a as br,b as Ft}from"./chat-context-DfIPg4kF.js";import{t as Gn}from"./ChevronUp-DkDOUc-8.js";import{v as vs,D as yr,E as wr,F as tn,G as Jn,H as Yn,I as Qn,z as Zn,J as nn,x as kr}from"./agent-icon-CUHwvCug.js";import{i as sn}from"./Share07-DwVANqGN.js";import{n as mn}from"./LinkExternal01-BekDuv1R.js";import{s as Xn}from"./Plus-Y-KvMcUC.js";import{i as Pr}from"./SearchLg-CL6esTtw.js";import{P as Sr,a as jr,b as Er}from"./popover-Wvqr_2yR.js";import{a as vt,b as xt,c as xs,d as bs,e as ys,C as ws}from"./command-Das6UcyK.js";import{d as Nr,a as Cr}from"./use-virtual-mcp-CijpHWeY.js";import{c as ks,d as vn,f as Rr}from"./sandbox-lifecycle-context-CHjp6hDX.js";import{e as Tr,d as Lr}from"./backoff-8mStPHYB.js";import{a as Or}from"./thread-intent-BHNHSQWV.js";import{u as Ps}from"./use-session-runtime-QJbktQ89.js";import{N as _r,b as Ar,s as ot,n as xn,c as Ss,f as He,v as js,h as Dr,u as Br,e as $r,d as Fr,j as Mr,k as es}from"./claim-phase-copy-CPp-hZ5n.js";import{u as zr}from"./use-mobile-BYkN2CBV.js";import{c as Ge,T as Je,a as Ye}from"./tooltip-C3KYJcjJ.js";import{T as Fe}from"./toolbar-icon-button-ClGr1SmO.js";import{b as Ir,a as Kr,u as Es,g as Ur,c as Hr,B as rn,P as Wr,r as Vr,R as qr,d as Gr,e as bn,f as Ns,h as Jr,i as Yr,j as Qr,l as Zr,m as Xr,k as ea,p as ta,n as na,S as an}from"./runnable-block-editor-Luwb6lXF.js";import{w as Ot}from"./variant-matcher-override-GL2lvgp-.js";import{r as sa,w as ra,D as aa,b as ts,a as ia}from"./section-preview-url-Csj0_ZDg.js";import{u as oa}from"./use-fast-preview-draft-url-CDhB1Fq2.js";import{r as Cs,l as Rs,u as la,w as ca}from"./last-preview-page-Pa_m-NGp.js";import{u as da}from"./use-is-desktop-app-BNujXJc_.js";import{a as ua,d as Ts}from"./shell-layout-BA4WahT2.js";import{u as fn}from"./useQueries-0w4KxC3A.js";import{i as ma}from"./ArrowRight-DGQoBfX2.js";import{b as Ls,D as Os,c as _s,d as As,e as fa}from"./dialog-O_WsqGxK.js";import{I as ns}from"./input-ALPFLjGK.js";import{u as Ds}from"./blocks-preview-workspace-context-DdPADfnI.js";import{i as pa}from"./AlertCircle-BXd3wmhE.js";import{E as yn}from"./empty-state-Atjx1U2W.js";import{i as ha}from"./X-rZfX9y0d.js";import{M as ga}from"./monaco-editor-sTKHVHs7.js";import{a as va}from"./utils-D_eBTbjc.js";import{R as ss,a as pt,b as on}from"./resizable-X9aB8eM5.js";import{r as xa}from"./virtual-mcp-BrketPQW.js";import{b as ln}from"./use-project-scope-bzqn-AFR.js";import{G as rs}from"./github-icon-DO6paY-Y.js";import{R as ba}from"./repository-import-picker-BomeZ4YD.js";import{r as ya}from"./use-main-panel-tabs-4N3JxcLp.js";import{u as wa}from"./use-task-metadata-DiRAYc7A.js";import{b as ka}from"./thread-route-C_KFFLE6.js";import"./use-panel-navigate-Wiv5HcS5.js";import"./feature-paywall-C7OuLsbm.js";import"./Check-D3UEH1bb.js";import"./plan-ladder-CCULPA3j.js";import"./use-entitlements-B9tTc-Ev.js";import"./autosend-BNuK0erf.js";import"./hooks-D5xL0VD-.js";import"./use-mcp-client-DgXYHdq4.js";import"./auth-6ek5T3GB.js";import"./task-board-mTs0BkYi.js";import"./schema-CdJJOHN7.js";import"./use-ai-providers-CBInTetj.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BBmla5vN.js";import"./use-organization-settings-C_ZfDEow.js";import"./Tool01-CeJWUTx4.js";import"./ArrowUp-BAzKSoqz.js";import"./ArrowLeft-CtG_Sz3T.js";import"./XCircle-fYjVO-4e.js";import"./ZoomOut-CmJNnQZa.js";import"./Globe04-Cfnfjo6J.js";import"./CheckCircle-BmoxvNcp.js";import"./UserSquare-D9izLEMu.js";import"./Copy01-1VyfDicU.js";import"./CreditCard01-CrYxi8Yw.js";import"./DotsVertical-BVvaV8Wy.js";import"./Download01-CRbdo8yP.js";import"./Eye-DnZDEgOn.js";import"./XClose-Drgfi-MO.js";import"./Image01-ZQL1hr5Q.js";import"./Key01-HEuAw7Uw.js";import"./LayoutLeft-Di6ed8JP.js";import"./Link01-CZiQuc44.js";import"./Monitor01-BLWTHtTp.js";import"./Sun-CPPd8cP7.js";import"./Package-tH33TvgC.js";import"./Palette-BagjpLZN.js";import"./SearchMd-CzE1IXtk.js";import"./Stars01-BvtQBnED.js";import"./Trash01-C6BZglNY.js";import"./Upload01-DBDdtdRw.js";import"./User01-DhER-7M5.js";import"./Users01-CGh_okmA.js";import"./Zap-DcWY_A2w.js";import"./index-BMguGW4R.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./index-CcCENa4K.js";import"./pair-B2IVuWLB.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-Ozwn48y1.js";import"./use-copy-BaRXHXi4.js";import"./usage-stats-BWbFQ6nI.js";import"./markdown-BHnqyTep.js";import"./org-file-open-context-DNQMuR7f.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CN7HJqgc.js";import"./types-CsEtlQqb.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-pQEk_YWf.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-B0Sr1nwg.js";import"./integration-icon-BDlRT6Oh.js";import"./use-connection-DNwnGnCC.js";import"./use-navigate-to-agent-fAaFURKA.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-BXGa38c2.js";import"./index-3wu9QSuh.js";import"./form-Db0Tj8hF.js";import"./label-CeYXCWIS.js";import"./use-thread-outputs-BBHbLuqJ.js";import"./file-type-icon-D6rUMGA4.js";import"./scroll-area-DiE2RXUS.js";import"./select-BmpMhuXU.js";import"./calendar-BDrJCpVb.js";import"./textarea-BGjs-_ya.js";import"./rich-text-link-control-DLGtga8b.js";import"./switch-CGGsZGg2.js";import"./combobox-Ct9LBV7p.js";import"./alert-dialog-D0EwpcN4.js";import"./search-input-MsiE4xnC.js";import"./tabs-B2X-mfaO.js";import"./use-debounced-value-CkL-oBw0.js";import"./use-file-configs-y5ZRqVAK.js";import"./asset-utils-tQ6o2CDF.js";import"./useInfiniteQuery-yhr2eVB6.js";import"./infiniteQueryObserver-DrVVQrbK.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-C66gu9FY.js";import"./decofile-api-DvonsyVe.js";import"./sandbox-git-api-B1R0585s.js";import"./avatar-D0sKo5Ko.js";import"./download-app-dialog-DJrde0mx.js";import"./project-icon-BFHg-quI.js";import"./required-auth-layout-CyCpjrfs.js";import"./use-org-sso-Dbq_Rnc1.js";import"./editor-bajIdLtD.js";import"./repository-picker-Bpcr10QR.js";import"./collection-search-BRkIgroJ.js";import"./use-route-default-main-BxMIgjib.js";import"./use-mcp-tools-CVoDfjIr.js";import"./index-CcStfLcS.js";import"./drawer-DmWpiePK.js";import"./input-DLqUDU4v.js";import"./chat-draft-BqHnkSRF.js";import"./use-deco-credits-raOHBi_A.js";import"./use-open-billing-url-D9101_ww.js";import"./decopilot-_2aHa55x.js";import"./checkbox-Dr1iEjvP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-D-HNn6NY.js";import"./input-BlBczlUj.js";import"./hooks-Dyt2S900.js";import"./use-org-fs-FICli5P0.js";import"./question-004-sINsf4GQ.js";import"./use-members-BBMuBGx7.js";import"./use-org-auth-client-gMmPeQrf.js";import"./add-connection-dialog-BrlUHuQ9.js";import"./extract-connection-data-C8tfLeRY.js";import"./metadata-D72DunRR.js";import"./connection-Vq7712iH.js";import"./connection-card-DmSG--jc.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-B1Gfuz6v.js";import"./authenticate-and-persist-oauth-C0EgQu0P.js";import"./mcp-oauth-DBcvf4Gv.js";import"./collection-tabs-BN1xWU9h.js";import"./badge-CFEM0raL.js";import"./use-infinite-scroll-DTMvlJNU.js";import"./useSuspenseInfiniteQuery-D4wrf6ZX.js";import"./use-project-native-view-presence-DON0VaEF.js";import"./site-slug-uya6Wp4-.js";const Pa={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Sa(t){const{previewState:e,progressStatus:r,fastPreviewActive:s=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,c=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?Pa:s&&i&&c?{mode:"production",iframeBase:c,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&r!=="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 ja=1e4,Ea=1e3,Na=3e4;function Ca({iframeRef:t,src:e,active:r}){const s=x.useRef(0),i=x.useRef(null),u=x.useRef(null),c=x.useRef(e),d=x.useRef(r);c.current=e,d.current=r;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()},ja)},h=()=>{if(!d.current||!c.current)return;u.current&&clearTimeout(u.current);const P=Tr(Na,Ea,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,k=c.current;!g||!k||!d.current||(g.src=k,l())},P)},f=()=>{s.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return x.useEffect(()=>{if(o(),s.current=0,!(!r||!e))return l(),o},[e,r]),{handleLoad:f,handleError:p}}var as;(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"})(as||(as={}));const Ra=Bt({tag:je(),id:je(),classes:je(),text:je(),html:je(),manifestKey:je().nullable(),componentName:je().nullable(),parents:je(),url:je(),path:je(),viewport:Bt({width:it(),height:it()}),position:Bt({x:it(),y:it()})}),Ta=`(function() {
|
|
3
3
|
if (window.__visualEditorActive) return;
|
|
4
4
|
window.__visualEditorActive = true;
|
|
5
5
|
|
|
@@ -515,4 +515,4 @@ import{r as x,ap as Bt,aH as it,aq as je,c as me,b as Ae,j as n,K as ur,e as mr,
|
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
517
|
})();`;function pn(t,e){let r=t,s=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let i=0;s&&i<5;i++){const u=e[s];if(u&&typeof u=="object"&&"__resolveType"in u){const c=u.__resolveType;if(typeof c=="string"&&c&&c!==s){r=u,s=c;continue}}break}if(!s)return[];if(s.includes("flags/multivariate")){const i=Array.isArray(r.variants)?r.variants:[];if(i.length===0||i.every(d=>d?.rule?.__resolveType===_r))return null;const c=[];for(const d of i){const o=d?.value;if(o&&typeof o=="object")for(const l of pn(o,e)??[])c.includes(l)||c.push(l)}return c}if(Ar(s)){const i=r.section&&typeof r.section=="object"?pn(r.section,e):[];return i===null?null:i.length?[s,...i]:[s]}return[s]}function rt(t){return t.replace(/[`*_]/g,"\\$&")}function _a(t,e){const r=[`The user selected an element on the live preview and asked: **"${rt(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&&r.push(`**Section resolveType:** \`${rt(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 s=`<${t.tag}${t.classes?` class="${rt(t.classes)}"`:""}>`;r.push(`**Clicked element:** \`${s}\``),t.parents&&r.push(`**DOM breadcrumb:** ${rt(t.parents)} > ${t.tag}`),t.text&&r.push(`**Text content:** "${rt(t.text)}"`),t.componentName&&r.push(`**Component name:** ${rt(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return r.push("","**HTML snippet:**","```html",i,"```"),r.push("","Please read the source file, locate the element, and apply the requested change."),r.join(`
|
|
518
|
-
`)}function Aa(t,e,r=320,s=44,i=12){const{x:u,y:c}=t,{width:d,height:o}=e,l=Math.max(i,Math.min(u-r/2,d-r-i)),f=c/o>.68?Math.max(i,c-s-18):Math.min(c+18,o-s-i);return{leftPct:l/d*100,topPct:f/o*100}}function Da(t){const e=me.c(45),{element:r,onDismiss:s}=t,[i,u]=x.useState(""),c=x.useRef(null),{sendMessage:d}=br(),{openSidePanel:o}=ua(),l=Ae();let h;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o||e[4]!==d?(h=()=>{if(!i.trim())return;const z=_a(r,i);o(),d({parts:[{type:"text",text:z}]}),s()},e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=d,e[5]=h):h=e[5];const f=h;let p;e[6]!==r.position||e[7]!==r.viewport?(p=Aa(r.position,r.viewport),e[6]=r.position,e[7]=r.viewport,e[8]=p):p=e[8];const P=p,g=`${P.leftPct}%`,k=`${P.topPct}%`;let b;e[9]!==g||e[10]!==k?(b={left:g,top:k,width:"320px"},e[9]=g,e[10]=k,e[11]=b):b=e[11];let v;e[12]!==f?(v=z=>{z.preventDefault(),f()},e[12]=f,e[13]=v):v=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=z=>u(z.target.value),e[14]=C):C=e[14];let y;e[15]!==s?(y=z=>{z.key==="Escape"&&s()},e[15]=s,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 S;e[19]!==i||e[20]!==y||e[21]!==w?(S=n.jsx("input",{ref:c,autoFocus:!0,type:"text",value:i,onChange:C,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]=S):S=e[22];let j;e[23]!==i?(j=i.trim(),e[23]=i,e[24]=j):j=e[24];const R=!j;let E;e[25]!==l?(E=l("sandbox.visualEditorPrompt.sendButton"),e[25]=l,e[26]=E):E=e[26];let $;e[27]!==l?($=l("sandbox.visualEditorPrompt.sendButton"),e[27]=l,e[28]=$):$=e[28];let W;e[29]!==$?(W=n.jsx("title",{children:$}),e[29]=$,e[30]=W):W=e[30];let F;e[31]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=F):F=e[31];let O;e[32]!==W?(O=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[W,F]}),e[32]=W,e[33]=O):O=e[33];let A;e[34]!==R||e[35]!==E||e[36]!==O?(A=n.jsx("button",{type:"submit",disabled:R,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:E,children:O}),e[34]=R,e[35]=E,e[36]=O,e[37]=A):A=e[37];let B;e[38]!==S||e[39]!==A||e[40]!==v?(B=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:[S,A]}),e[38]=S,e[39]=A,e[40]=v,e[41]=B):B=e[41];let V;return e[42]!==B||e[43]!==b?(V=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:B}),e[42]=B,e[43]=b,e[44]=V):V=e[44],V}const os="site-links",Ba=/details?page|\bpdp\b/i,$a=/listingpage|\bplp\b/i;function Fa(t,e,r){const s=new Set;for(const d of r)Ba.test(d)&&s.add("product"),$a.test(d)&&s.add("category");const i=ot(xn(t)),u=i[i.length-1],c=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&c?.type==="param"&&c.name===e&&s.add("product"),e==="*"&&i.some(d=>d.type==="param"&&d.name==="*")&&s.add("category"),s}const Ma=["rosa","preto","pink","black"];function _t(t,e){const r=e.trim();return r?t(r):Ma.flatMap(s=>t(s))}function za(t,e){const r=e.trim(),s=[];/^\d+$/.test(r)&&s.push({resolveType:t,props:{ids:[r]}});const u=r.includes("-")&&!/\s/.test(r)?r.replace(/-+/g," "):r;return s.push({resolveType:t,props:{query:u,count:10}}),s}const Bs=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function wn(t){return t.split("/")[0]??""}function Ia(t){const e=new Set;for(const r of t){const s=wn(r);Bs.has(s)&&e.add(s)}return e}function Ka(t,e){const r=wn(t);return!Bs.has(r)||e.size===0?!0:e.has(r)}const Ua=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>_t(r=>za(t,r),e),optionsFromPayload:At},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>_t(r=>[{resolveType:t,props:{props:{search:r,pageSize:10,currentPage:1}}}],e),optionsFromPayload:At},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>_t(r=>[{resolveType:t,props:{term:r,hitsPerPage:10}}],e),optionsFromPayload:At},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>_t(r=>[{resolveType:t,props:{query:r,term:r,count:10,hitsPerPage:10}}],e),optionsFromPayload:At},{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:Ya}];function Ha(t,e,r=new Set){const s=[...e],i=d=>{const o=[];for(const l of Ua){if(l.kind!==d)continue;const h=s.find(f=>l.test(f)&&Ka(f,r));h&&o.push({cand:l,resolveType:h})}return o.find(l=>r.has(wn(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(Wa(t.has("category")?"category":"product")),c}function Wa(t){return{kind:t,id:os,resolveType:os,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,r)=>ti(e,r)}}function Qe(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Va(t,e,r){const s=new Set,i=new Set,u=c=>{if(Array.isArray(c)){for(const l of c)u(l);return}const d=Qe(c);if(!d)return;const o=d.__resolveType;if(typeof o=="string"){if(r(o))s.add(o);else if(o in e&&!i.has(o)){i.add(o);const l=Qe(e[o])?.__resolveType;typeof l=="string"&&r(l)&&s.add(o),u(e[o])}}for(const l of Object.values(d))u(l)};return u(t),s}function $s(t){const e=new Set,r=[];for(const s of t)for(const i of s)e.has(i.value)||(e.add(i.value),r.push(i));return r}function Fs(t){try{return decodeURIComponent(t)}catch{return t}}function qa(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ga(t){const e=[];let r="^";for(const s of t)s.type==="text"?r+=qa(s.text):(e.push(s.name),r+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${r}$`),order:e}}function Ms(t,e,r){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const i=ot(xn(e)),{pattern:u,order:c}=Ga(i),d=c.indexOf(r);if(d===-1)return null;const o=s.match(u);if(!o)return null;const l=o[d+1]?.replace(/^\/+|\/+$/g,"");return l?Fs(l):null}function At(t,e){const r=Qe(t),s=Array.isArray(t)?t:Array.isArray(r?.products)?r.products:Array.isArray(r?.list)?r.list:[],i=[],u=new Set;for(const c of s){const d=Qe(c);if(!d)continue;const o=Ms(d.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const l=Qe(d.isVariantOf),h=typeof l?.name=="string"&&l.name||typeof d.name=="string"&&d.name||o,f=Array.isArray(d.image)?Qe(d.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:o,label:h,image:p})}return i}function Ja(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const r=e.replace(/^\/+|\/+$/g,"");return r?Fs(r):null}function Ya(t){const e=[],r=new Set,s=(i,u)=>{const c=Qe(i);if(!c)return;const d=typeof c.name=="string"&&c.name?c.name:"",o=d?[...u,d]:u,l=Ja(c.url);if(l&&!r.has(l)&&(r.add(l),e.push({value:l,label:o.join(" › ")||l})),Array.isArray(c.children))for(const h of c.children)s(h,o)};if(Array.isArray(t))for(const i of t)s(i,[]);return e}const Qa=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 Za(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function Xa(t){if(typeof t!="string"||!t)return[];const e=[],r=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let s,i=0;for(;(s=r.exec(t))!==null&&i++<5e3;){const u=s[1]??"",c=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:c})}return e}function ei(t){if(typeof t!="string"||!t)return[];const e=[],r=new Set,s=/"@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=s.exec(t))!==null&&c++<3e3;){const d=(u[1]??"").replace(/\\\//g,"/");if(!d||r.has(d))continue;r.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 ti(t,e){const r=[],s=new Set,i=(u,c,d,o)=>{if(r.length>=200)return;const l=Ms(u,e.template,e.paramName);!l||s.has(l)||e.paramName==="*"&&/(^|\/)p$/.test(l)||d==="category"&&Qa.has(l.split("/")[0]??"")||(s.add(l),r.push({value:l,label:c&&c.length<=80?c:Za(l),kind:d,image:o}))};for(const{url:u,name:c,image:d}of ei(t))i(u,c,"product",d);for(const{href:u,text:c}of Xa(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,c,"category");return r}function ht(t,e,r=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,r)}const zs=1e4;function ni(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 si(t,{resolveType:e,props:r}){const s=await fetch(Ir(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...r}),signal:AbortSignal.timeout(zs)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function ls(t,e){const r=await fetch(Kr(t,e),{signal:AbortSignal.timeout(zs)});if(!r.ok)throw new Error(`Failed to fetch page: ${r.status}`);return r.text()}async function ri(t,e,r){const s=e.optionsFromPayload(await ls(t,"/"),r),i=s.find(c=>c.kind==="category");if(!i)return s;const u=He(r.template,{[r.paramName]:i.value});if(u==="/")return s;try{const c=e.optionsFromPayload(await ls(t,u),r).filter(d=>d.kind==="product");return $s([s,c])}catch{return s}}function ai(t,e,r){return ur.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":r}`)}async function ii(t,e,r,s){if(e.homepageLinks)return ri(t,e,s);const i=e.buildRequests?.(r)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(d=>si(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 $s(c.map(d=>e.optionsFromPayload(d,s)))}function hn(t,e,r,s,i){return{queryKey:ai(t,e,r),queryFn:()=>ii(t,e,r,s),enabled:i,staleTime:6e4,retry:1}}function gt(t){const e=me.c(16),{heading:r,iconKind:s,options:i,template:u,paramName:c,keyPrefix:d,onSelect:o}=t;if(i.length===0)return null;let l;if(e[0]!==s||e[1]!==d||e[2]!==o||e[3]!==i||e[4]!==c||e[5]!==u){let f;e[7]!==s||e[8]!==d||e[9]!==o||e[10]!==c||e[11]!==u?(f=p=>n.jsxs(xt,{value:`${d}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[s==="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(vs,{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:He(u,{[c]:p.value})})]})]},`${d}:${p.value}`),e[7]=s,e[8]=d,e[9]=o,e[10]=c,e[11]=u,e[12]=f):f=e[12],l=i.map(f),e[0]=s,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]!==r||e[14]!==l?(h=n.jsx(vt,{heading:r,children:l}),e[13]=r,e[14]=l,e[15]=h):h=e[15],h}function cs(t){const e=me.c(2),{text:r}=t;let s;return e[0]!==r?(s=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r}),e[0]=r,e[1]=s):s=e[1],s}function ds(t){const e=me.c(52),{sources:r,template:s,paramName:i,value:u,sandboxRef:c,onCommit:d}=t,o=Ae(),[l,h]=x.useState(!1),[f,p]=x.useState(""),[P,g]=x.useState(""),k=x.useRef(null),b=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,v=ni(o),y=[...new Set(r.map(H=>v[H.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 S=w,j={template:s,paramName:i};let R;e[3]!==f?(R=(H,Z)=>({source:H,query:Z,options:H.clientFilter?ht(Z.data??[],f):Z.data??[]}),e[3]=f,e[4]=R):R=e[4];const E=R,$=r.filter(pi),W=r.filter(fi),F=fn({queries:$.map(H=>hn(c,H,P,j,l))});let O;e[5]!==F||e[6]!==E?(O=(H,Z)=>E(H,F[Z]),e[5]=F,e[6]=E,e[7]=O):O=e[7];const A=$.map(O),B=A.length===0||A.every(mi),V=fn({queries:W.map(H=>hn(c,H,P,j,l&&B))});let z;e[8]!==V||e[9]!==E?(z=(H,Z)=>E(H,V[Z]),e[8]=V,e[9]=E,e[10]=z):z=e[10];const X=W.map(z),q=B?X:A,D=q.length===1&&q[0]?.source.homepageLinks?q[0]:null,T=D&&!D.query.isLoading&&!D.query.isError?D?.query.data??[]:[],ie=ht(T.filter(ui),f),J=ht(T.filter(di),f),Ee=ie.length>0&&J.length>0,ee=H=>{h(H),k.current&&clearTimeout(k.current),p(H?u:""),g(H?u:"")};let M;e[11]===Symbol.for("react.memo_cache_sentinel")?(M=H=>{p(H),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{g(H)},300)},e[11]=M):M=e[11];const oe=M,G=H=>{d(H),ee(!1)},Q=Ss(f),ye=He(s,{[i]:Q}),te=Os,I=Ls,fe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",pe=ci;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 se;e[15]!==ne?(se=n.jsx(_s,{className:"sr-only",children:n.jsx(As,{children:ne})}),e[15]=ne,e[16]=se):se=e[16];let xe;e[17]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(vs,{size:16,className:"shrink-0 text-foreground"}),e[17]=xe):xe=e[17];let de;e[18]!==o?(de=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=de):de=e[19];let he;e[20]!==b?(he=n.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:b}),e[20]=b,e[21]=he):he=e[21];let le;e[22]!==de||e[23]!==he?(le=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:[de," ",he]})]}),e[22]=de,e[23]=he,e[24]=le):le=e[24];const ge=bs,lt=!1,De="min-h-0 flex-1";let be;e[25]!==S||e[26]!==f?(be=n.jsx(ys,{autoFocus:!0,placeholder:S,value:f,onValueChange:oe}),e[25]=S,e[26]=f,e[27]=be):be=e[27];const Ne=xs,Mt="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Be;e[28]!==o?(Be=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=Be):Be=e[29];let re;e[30]!==Be?(re=n.jsx(ws,{children:Be}),e[30]=Be,e[31]=re):re=e[31];const Ce=Q&&n.jsx(vt,{className:"shrink-0",children:n.jsxs(xt,{value:`__raw__:${Q}`,className:"gap-3 py-2",onSelect:()=>G(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(ma,{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:ye})]})]})}),We=Ee?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(gt,{heading:v.category.heading,iconKind:"category",options:ie,template:s,paramName:i,keyPrefix:`${D?.source.id}:cat`,onSelect:G})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(gt,{heading:v.product.heading,iconKind:"product",options:J,template:s,paramName:i,keyPrefix:`${D?.source.id}:prod`,onSelect:G})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:q.map(H=>{const{source:Z,query:Xe,options:Y}=H,{noun:ve}=v[Z.kind];if(Xe.isLoading)return n.jsx(cs,{text:o("sandbox.pathParamPickerChip.loading",{noun:ve})},Z.id);if(Xe.isError)return n.jsx(cs,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},Z.id);if(Z.homepageLinks){const Le=Xe.data??[];return n.jsxs(x.Fragment,{children:[n.jsx(gt,{heading:v.category.heading,iconKind:"category",options:ht(Le.filter(li),f),template:s,paramName:i,keyPrefix:`${Z.id}:cat`,onSelect:G}),n.jsx(gt,{heading:v.product.heading,iconKind:"product",options:ht(Le.filter(oi),f),template:s,paramName:i,keyPrefix:`${Z.id}:prod`,onSelect:G})]},Z.id)}return n.jsx(gt,{heading:q.length>1?v[Z.kind].heading:void 0,iconKind:Z.kind,options:Y,template:s,paramName:i,keyPrefix:Z.id,onSelect:G},Z.id)})});let Re;e[32]!==Ne||e[33]!==re||e[34]!==Ce||e[35]!==We?(Re=n.jsxs(Ne,{className:Mt,children:[re,Ce,We]}),e[32]=Ne,e[33]=re,e[34]=Ce,e[35]=We,e[36]=Re):Re=e[36];let we;e[37]!==ge||e[38]!==be||e[39]!==Re?(we=n.jsxs(ge,{shouldFilter:lt,className:De,children:[be,Re]}),e[37]=ge,e[38]=be,e[39]=Re,e[40]=we):we=e[40];let Me;e[41]!==I||e[42]!==se||e[43]!==le||e[44]!==we||e[45]!==pe?(Me=n.jsxs(I,{className:fe,onClick:pe,children:[se,le,we]}),e[41]=I,e[42]=se,e[43]=le,e[44]=we,e[45]=pe,e[46]=Me):Me=e[46];let Te;return e[47]!==te||e[48]!==ee||e[49]!==l||e[50]!==Me?(Te=n.jsx(te,{open:l,onOpenChange:ee,children:Me}),e[47]=te,e[48]=ee,e[49]=l,e[50]=Me,e[51]=Te):Te=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-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:H=>{H.stopPropagation(),ee(!0)},children:u||b}),Te]})}function oi(t){return t.kind==="product"}function li(t){return t.kind!=="product"}function ci(t){return t.stopPropagation()}function di(t){return t.kind==="product"}function ui(t){return t.kind!=="product"}function mi(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function fi(t){return t.isFallback}function pi(t){return!t.isFallback}function hi(t){const e=me.c(8),{sources:r,template:s,paramName:i,sandboxRef:u,onFill:c}=t;let d,o;if(e[0]!==i||e[1]!==u||e[2]!==r||e[3]!==s){const P={template:s,paramName:i},g=r.filter(gi);o=fn,d=g.map(k=>hn(u,k,"",P,!0)),e[0]=i,e[1]=u,e[2]=r,e[3]=s,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 P of h){if(P.isLoading)break;const g=P.data?.[0];if(g){p(!0),queueMicrotask(()=>c(g.value));break}}return null}function gi(t){return!t.isFallback}function us(t){const e=me.c(31),{name:r,value:s,onCommit:i}=t,u=Ae(),[c,d]=x.useState(s),[o,l]=x.useState(!1),h=x.useRef(!1);let f;e[0]!==r||e[1]!==u?(f=r==="*"?u("sandbox.preview.catchAllParamLabel"):`:${r}`,e[0]=r,e[1]=u,e[2]=f):f=e[2];const p=f,P=c||p;let g;e[3]!==P?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:P}),e[3]=P,e[4]=g):g=e[4];let k;e[5]!==p||e[6]!==u?(k=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=k):k=e[7];let b,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=E=>d(E.target.value),v=()=>l(!0),e[8]=b,e[9]=v):(b=e[8],v=e[9]);let C;e[10]!==s?(C=E=>{E.key==="Enter"&&E.currentTarget.blur(),E.key==="Escape"&&(h.current=!0,d(s),E.currentTarget.blur())},e[10]=s,e[11]=C):C=e[11];let y;e[12]!==c||e[13]!==i||e[14]!==s?(y=()=>{if(l(!1),h.current){h.current=!1;return}const E=Ss(c);d(E),E!==s&&i(E)},e[12]=c,e[13]=i,e[14]=s,e[15]=y):y=e[15];let w;e[16]!==c||e[17]!==p||e[18]!==k||e[19]!==C||e[20]!==y?(w=n.jsx("input",{type:"text",value:c,placeholder:p,title:k,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:vi,onChange:b,onFocus:v,onKeyDown:C,onBlur:y}),e[16]=c,e[17]=p,e[18]=k,e[19]=C,e[20]=y,e[21]=w):w=e[21];let S;e[22]!==g||e[23]!==w?(S=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]=S):S=e[24];let j;e[25]!==o||e[26]!==u?(j=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(yr,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=j):j=e[27];let R;return e[28]!==j||e[29]!==S?(R=n.jsxs(n.Fragment,{children:[S,j]}),e[28]=j,e[29]=S,e[30]=R):R=e[30],R}function vi(t){return t.stopPropagation()}function xi(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const r=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${r.host}${s}`}catch{return e}}function bi(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function yi(t){const e=me.c(5);let r;e[0]!==t?(r=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=r):r=e[1];const s=Es(r);let i;return e[2]!==t||e[3]!==s?(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=Ur(c),h=o?{...o,name:c,path:d}:Hr(c,d);return await s.mutateAsync({blockKey:l,data:h}),{key:l,name:c,path:d}}},e[2]=t,e[3]=s,e[4]=i):i=e[4],mr(i)}function wi(t){const e=me.c(89),{open:r,onOpenChange:s,isPending:i,error:u,templates:c,onSubmit:d}=t,o=i===void 0?!1:i,l=Ae();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 P;e[2]!==l?(P=l("sectionsEditor.createPageModal.defaultPagePath"),e[2]=l,e[3]=P):P=e[3];const[g,k]=x.useState(P),[b,v]=x.useState(rn),[C,y]=x.useState(null),[w,S]=x.useState(r);r!==w&&(S(r),r&&(p(l("sectionsEditor.createPageModal.defaultPageName")),k(l("sectionsEditor.createPageModal.defaultPagePath")),v(rn),y(null)));const j=!!c?.length;let R;e[4]!==o||e[5]!==s?(R=de=>{!de&&!o&&(y(null),s(!1))},e[4]=o,e[5]=s,e[6]=R):R=e[6];const E=R;let $;e[7]!==o||e[8]!==f||e[9]!==d||e[10]!==g||e[11]!==j||e[12]!==b?($=async de=>{de.preventDefault();const he=f.trim(),le=g.trim();if(!he||!le||o)return;const ge=js(le);if(ge){y(ge);return}y(null),await d({name:he,path:le,templateKey:j&&b!==rn?b:null})},e[7]=o,e[8]=f,e[9]=d,e[10]=g,e[11]=j,e[12]=b,e[13]=$):$=e[13];const W=$,F=C??u;let O;e[14]!==l?(O=l("sectionsEditor.createPageModal.title"),e[14]=l,e[15]=O):O=e[15];let A;e[16]!==O?(A=n.jsx(_s,{children:n.jsx(As,{children:O})}),e[16]=O,e[17]=A):A=e[17];let B;e[18]!==l?(B=l("sectionsEditor.createPageModal.nameLabel"),e[18]=l,e[19]=B):B=e[19];let V;e[20]!==B?(V=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:B}),e[20]=B,e[21]=V):V=e[21];let z;e[22]===Symbol.for("react.memo_cache_sentinel")?(z=de=>p(de.target.value),e[22]=z):z=e[22];let X;e[23]!==l?(X=l("sectionsEditor.createPageModal.namePlaceholder"),e[23]=l,e[24]=X):X=e[24];let q;e[25]!==o||e[26]!==f||e[27]!==X?(q=n.jsx(ns,{id:"new-page-name",value:f,onChange:z,placeholder:X,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=X,e[28]=q):q=e[28];let D;e[29]!==q||e[30]!==V?(D=n.jsxs("div",{className:"space-y-1.5",children:[V,q]}),e[29]=q,e[30]=V,e[31]=D):D=e[31];let U;e[32]!==l?(U=l("sectionsEditor.createPageModal.pathLabel"),e[32]=l,e[33]=U):U=e[33];let T;e[34]!==U?(T=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:U}),e[34]=U,e[35]=T):T=e[35];let ie;e[36]===Symbol.for("react.memo_cache_sentinel")?(ie=de=>k(de.target.value),e[36]=ie):ie=e[36];let J;e[37]!==l?(J=l("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=l,e[38]=J):J=e[38];let Ee;e[39]!==o||e[40]!==g||e[41]!==J?(Ee=n.jsx(ns,{id:"new-page-path",value:g,onChange:ie,placeholder:J,disabled:o}),e[39]=o,e[40]=g,e[41]=J,e[42]=Ee):Ee=e[42];let ee;e[43]!==T||e[44]!==Ee?(ee=n.jsxs("div",{className:"space-y-1.5",children:[T,Ee]}),e[43]=T,e[44]=Ee,e[45]=ee):ee=e[45];let M;e[46]!==o||e[47]!==j||e[48]!==l||e[49]!==b||e[50]!==c?(M=j&&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(Wr,{id:"new-page-template",value:b,onChange:v,templates:c??[],disabled:o})]}),e[46]=o,e[47]=j,e[48]=l,e[49]=b,e[50]=c,e[51]=M):M=e[51];let oe;e[52]!==F?(oe=F&&n.jsx("p",{className:"text-xs text-destructive",children:F}),e[52]=F,e[53]=oe):oe=e[53];let G;e[54]!==D||e[55]!==ee||e[56]!==M||e[57]!==oe?(G=n.jsxs("div",{className:"space-y-4 py-4",children:[D,ee,M,oe]}),e[54]=D,e[55]=ee,e[56]=M,e[57]=oe,e[58]=G):G=e[58];let Q;e[59]!==s?(Q=()=>s(!1),e[59]=s,e[60]=Q):Q=e[60];let ye;e[61]!==l?(ye=l("sectionsEditor.createPageModal.cancelButton"),e[61]=l,e[62]=ye):ye=e[62];let te;e[63]!==o||e[64]!==Q||e[65]!==ye?(te=n.jsx(Ze,{type:"button",variant:"outline",onClick:Q,disabled:o,children:ye}),e[63]=o,e[64]=Q,e[65]=ye,e[66]=te):te=e[66];let I;e[67]!==o||e[68]!==f||e[69]!==g?(I=!f.trim()||!g.trim()||o,e[67]=o,e[68]=f,e[69]=g,e[70]=I):I=e[70];let fe;e[71]!==o||e[72]!==l?(fe=o?n.jsxs(n.Fragment,{children:[n.jsx($t,{className:"size-3.5"}),l("sectionsEditor.createPageModal.creatingButton")]}):l("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=l,e[73]=fe):fe=e[73];let pe;e[74]!==I||e[75]!==fe?(pe=n.jsx(Ze,{type:"submit",disabled:I,children:fe}),e[74]=I,e[75]=fe,e[76]=pe):pe=e[76];let ne;e[77]!==te||e[78]!==pe?(ne=n.jsxs(fa,{children:[te,pe]}),e[77]=te,e[78]=pe,e[79]=ne):ne=e[79];let se;e[80]!==W||e[81]!==G||e[82]!==ne||e[83]!==A?(se=n.jsx(Ls,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:W,children:[A,G,ne]})}),e[80]=W,e[81]=G,e[82]=ne,e[83]=A,e[84]=se):se=e[84];let xe;return e[85]!==E||e[86]!==r||e[87]!==se?(xe=n.jsx(Os,{open:r,onOpenChange:E,children:se}),e[85]=E,e[86]=r,e[87]=se,e[88]=xe):xe=e[88],xe}function ki(t){const e=me.c(29),{orgSlug:r,virtualMcpId:s,branch:i,previewUrl:u,meta:c,decofile:d,blockKey:o}=t,l=Ae();let h;e[0]!==i||e[1]!==r||e[2]!==s?(h={orgSlug:r,virtualMcpId:s,branch:i},e[0]=i,e[1]=r,e[2]=s,e[3]=h):h=e[3];const f=Es(h);let p;e[4]!==f?(p=Gr((S,j)=>f.mutate({blockKey:S,data:j})),e[4]=f,e[5]=p):p=e[5];const P=p;let g;e[6]!==o||e[7]!==d?(g=Vr(d,o),e[6]=o,e[7]=d,e[8]=g):g=e[8];const{resolveType:k,props:b,title:v}=g;if(!k){let S;e[9]!==l?(S=l("sandbox.preview.loaderNoLongerExists"),e[9]=l,e[10]=S):S=e[10];let j;return e[11]!==S?(j=n.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:S}),e[11]=S,e[12]=j):j=e[12],j}const C=`loader:${o}`;let y;e[13]!==o||e[14]!==k||e[15]!==v?(y={mode:"saved",blockKey:o,resolveType:k,title:v},e[13]=o,e[14]=k,e[15]=v,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==d||e[19]!==c||e[20]!==r||e[21]!==u||e[22]!==b||e[23]!==f.isPending||e[24]!==P||e[25]!==C||e[26]!==y||e[27]!==s?(w=n.jsx(qr,{orgSlug:r,virtualMcpId:s,branch:i,previewUrl:u,meta:c,decofile:d,kind:"loaders",target:y,initialValue:b,isCreating:f.isPending,onCreate:Pi,onSaveReferencedBlock:P,showRun:!1},C),e[17]=i,e[18]=d,e[19]=c,e[20]=r,e[21]=u,e[22]=b,e[23]=f.isPending,e[24]=P,e[25]=C,e[26]=y,e[27]=s,e[28]=w):w=e[28],w}async function Pi(){}function Si(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function ms(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:Si(t.error)}}function ji(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 Ei(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=ji(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const r=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return r&&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"}:r?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 Ni="https://github.com/decocms/blocks";function Ci(){const t=me.c(14),e=Ae();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(wr,{size:48,className:"text-muted-foreground"}),t[0]=r):r=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=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(mn,{size:14}),t[7]=c):c=t[7];let d;t[8]!==u?(d=n.jsx(Ze,{size:"sm",asChild:!0,children:n.jsxs("a",{href:Ni,target:"_blank",rel:"noreferrer",children:[u,c]})}),t[8]=u,t[9]=d):d=t[9];let o;return t[10]!==s||t[11]!==i||t[12]!==d?(o=n.jsx(yn,{className:"h-full w-full",image:r,title:s,description:i,actions:d}),t[10]=s,t[11]=i,t[12]=d,t[13]=o):o=t[13],o}function Ri(t){const e=me.c(15),{source:r,onRetry:s}=t,i=Ae();let u;e[0]!==r||e[1]!==i?(u=i(r==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=r,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(pa,{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]!==s||e[9]!==l?(h=n.jsx(Ze,{variant:"outline",size:"sm",onClick:s,children:l}),e[8]=s,e[9]=l,e[10]=h):h=e[10];let f;return e[11]!==c||e[12]!==o||e[13]!==h?(f=n.jsx(yn,{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 Ti=x.lazy(()=>fr(()=>import("./sections-editor-Bch82FO0.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])).then(t=>({default:t.SectionsEditor})));function fs(t){const e=me.c(50),{virtualMcpId:r,externalSelection:s,onViewJsonFile:i}=t,u=s===void 0?null:s,{org:c}=gn(),{currentBranch:d,taskId:o}=Ft(),l=ks(),h=vn(),f=Ds(),p=l.lifecycle.phase==="running",P=h.previewUrl;let g;e[0]!==d||e[1]!==c||e[2]!==P||e[3]!==o||e[4]!==r?(g=d?{orgSlug:c.slug,virtualMcpId:r,branch:d,threadId:o??null,previewUrl:P}:null,e[0]=d,e[1]=c,e[2]=P,e[3]=o,e[4]=r,e[5]=g):g=e[5];const k=g;let b;e[6]!==p?(b={fetchEnabled:p},e[6]=p,e[7]=b):b=e[7];const v=bn(k,b);let C;e[8]!==p?(C={fetchEnabled:p},e[8]=p,e[9]=C):C=e[9];const y=Ns(k,C),w=Ei({lifecyclePhase:l.lifecycle.phase,decofile:ms(v),meta:ms(y),hasEditableContent:Dr(v.data,y.data),fastPreviewActive:Ps(r).runtime==="cms"}),S=Li;if(w.kind==="loading"){let T;return e[10]===Symbol.for("react.memo_cache_sentinel")?(T=S(n.jsx(pr,{})),e[10]=T):T=e[10],T}if(w.kind==="empty"){let T;return e[11]===Symbol.for("react.memo_cache_sentinel")?(T=S(n.jsx(Ci,{})),e[11]=T):T=e[11],T}if(w.kind==="error"){let T;e[12]!==v||e[13]!==h||e[14]!==y||e[15]!==w.source?(T=()=>{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]=T):T=e[16];const ie=T;let J;return e[17]!==ie||e[18]!==w.source?(J=S(n.jsx(Ri,{source:w.source,onRetry:ie})),e[17]=ie,e[18]=w.source,e[19]=J):J=e[19],J}let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=T=>S(n.jsx("div",{className:"h-full min-h-0",children:T})),e[20]=j):j=e[20];const R=j,E=f.state.target;if(E?.kind==="loader"&&v.data&&y.data){const T=d??"",ie=P??null;let J;return e[21]!==v.data||e[22]!==y.data||e[23]!==c.slug||e[24]!==T||e[25]!==ie||e[26]!==E.key||e[27]!==r?(J=R(n.jsx(ki,{orgSlug:c.slug,virtualMcpId:r,branch:T,previewUrl:ie,meta:y.data,decofile:v.data,blockKey:E.key})),e[21]=v.data,e[22]=y.data,e[23]=c.slug,e[24]=T,e[25]=ie,e[26]=E.key,e[27]=r,e[28]=J):J=e[28],J}let $;e[29]!==d||e[30]!==c.slug||e[31]!==E||e[32]!==r?($=E||!d?null:Cs(Rs(c.slug,r,d)),e[29]=d,e[30]=c.slug,e[31]=E,e[32]=r,e[33]=$):$=e[33];const W=$;let F="/",O=null,A=null;E?.kind==="page"?(F=E.path,O=E.key):E?.kind==="section"?A=E.key:W&&(F=W.path,O=W.pageKey);const B=O?`page:${O}`:A?`section:${A}`:`path:${F}`;let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx($t,{className:"size-5 text-muted-foreground"})}),e[34]=V):V=e[34];const z=d??"",X=P??void 0,q=A?null:u,D=!!O&&f.state.editSeoPageKey===O;let U;return e[35]!==A||e[36]!==O||e[37]!==F||e[38]!==B||e[39]!==i||e[40]!==c.slug||e[41]!==q||e[42]!==D||e[43]!==z||e[44]!==X||e[45]!==r||e[46]!==f.consumeEditSeo||e[47]!==f.setFocusedBlock||e[48]!==f.setVariantOverride?(U=R(n.jsx(x.Suspense,{fallback:V,children:n.jsx(Ti,{orgSlug:c.slug,virtualMcpId:r,branch:z,previewReady:!0,previewUrl:X,currentPath:F,activePageBlockKey:O,activeGlobalBlockKey:A,externalSelection:q,initialEditSeo:D,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onFocusedBlockChange:f.setFocusedBlock,onViewJsonFile:i},B)})),e[35]=A,e[36]=O,e[37]=F,e[38]=B,e[39]=i,e[40]=c.slug,e[41]=q,e[42]=D,e[43]=z,e[44]=X,e[45]=r,e[46]=f.consumeEditSeo,e[47]=f.setFocusedBlock,e[48]=f.setVariantOverride,e[49]=U):U=e[49],U}function Li(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function cn(t){const e=me.c(39),{virtualMcpId:r,pageKey:s,onClose:i,ref:u}=t,c=Ae(),d=gs(),o=Jr(r);let l;e[0]!==o||e[1]!==s?(l=Yr(o,va(s)),e[0]=o,e[1]=s,e[2]=l):l=e[2];const h=l,{org:f}=gn(),{currentBranch:p,taskId:P}=Ft(),k=vn().previewUrl;let b;e[3]!==p||e[4]!==f.slug||e[5]!==k||e[6]!==P||e[7]!==r?(b=p?{orgSlug:f.slug,virtualMcpId:r,branch:p,threadId:P??null,previewUrl:k}:null,e[3]=p,e[4]=f.slug,e[5]=k,e[6]=P,e[7]=r,e[8]=b):b=e[8];const C=bn(b),y=p??"";let w;e[9]!==f.slug||e[10]!==y||e[11]!==r?(w={orgSlug:f.slug,virtualMcpId:r,branch:y},e[9]=f.slug,e[10]=y,e[11]=r,e[12]=w):w=e[12];const{save:S,flush:j}=Qr(w),R=C.data?.[s],E=C.data===void 0&&C.isLoading,$=C.data!==void 0&&R===void 0,W=!p||$||E;let F;e[13]!==R?(F=R===void 0?"":JSON.stringify(R,null,2),e[13]=R,e[14]=F):F=e[14];const O=F;let A;e[15]!==s||e[16]!==W||e[17]!==S?(A=D=>{if(W)return;let U;try{U=JSON.parse(D)}catch{return}U===null||typeof U!="object"||Array.isArray(U)||S(s,U)},e[15]=s,e[16]=W,e[17]=S,e[18]=A):A=e[18];const B=A;let V;e[19]!==j?(V=()=>({flush:j}),e[19]=j,e[20]=V):V=e[20],x.useImperativeHandle(u,V);let z;e[21]!==h||e[22]!==d||e[23]!==i||e[24]!==c?(z=d?n.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:n.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:c("sectionsEditor.pageJsonDialog.titleShort")}),n.jsx(Ze,{variant:"ghost",size:"icon",onClick:i,"aria-label":c("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:n.jsx(ha,{size:14})})]}),e[21]=h,e[22]=d,e[23]=i,e[24]=c,e[25]=z):z=e[25];let X;e[26]!==C.data||e[27]!==j||e[28]!==O||e[29]!==E||e[30]!==$||e[31]!==s||e[32]!==W||e[33]!==B||e[34]!==c?(X=E?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx($t,{className:"size-5 text-muted-foreground"})}):$?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(ga,{code:O,language:"json",readOnly:W,height:"100%",onChange:D=>B(D??""),onSave:D=>{B(D),j()}},`${s}:${C.data===void 0?"loading":"ready"}`)}),e[26]=C.data,e[27]=j,e[28]=O,e[29]=E,e[30]=$,e[31]=s,e[32]=W,e[33]=B,e[34]=c,e[35]=X):X=e[35];let q;return e[36]!==z||e[37]!==X?(q=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[z,X]}),e[36]=z,e[37]=X,e[38]=q):q=e[38],q}function Is(t){return t.contentEditingEnabled&&!t.isMobile}function Oi(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function _i(t,e){return t==="blocks"?"preview":e?"blocks":t}function Ai(t){return Is({contentEditingEnabled:Ts(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Di(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const Bi=500,$i={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},ps=1,dn=["desktop","mobile","tablet"],Dt={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function hs(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}function Fi(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 at(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function un(t,e){try{return new URL(t,e).href}catch{return null}}function Mi(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 r={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:r,effective:r.url}}return{pin:t,effective:t?.url??null}}function zi(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Ii(t,e,r){const s=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),c=o=>{if(o===r)return 100;const l=o.indexOf(r);if(l===-1)return 0;let h=40;return l===0?h+=30:/[\s/-]/.test(o[l-1]??"")&&(h+=20),h+=Math.round(r.length/o.length*20),h};let d=Math.max(c(s),c(i));return u.at(-1)===r?d=Math.max(d,95):u.includes(r)&&(d=Math.max(d,90)),d}function Ki(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ui({virtualMcpId:t}){const e=gs(),r=x.useRef(null),s=Ae(),i=da(),u=zr(),{currentBranch:c,taskId:d,virtualMcpId:o}=Ft(),l=Ds(),h=Nr(o===t?t:null),f=Ps(t),p=xa(h?.metadata?.ui?.layout??null),P=Ts(p),g=Is({contentEditingEnabled:P,isMobile:u}),[k,b]=x.useState(()=>Ai({cmsMode:p,isMobile:u})),[v,C]=x.useState("desktop"),[y,w]=x.useState(null),[S,j]=x.useState(null),R=x.useRef(null),E=x.useRef(null),[$,W]=x.useState(!1),F=x.useRef(null),O=()=>{F.current?.flush(),W(!1)},A=()=>W(a=>(a&&F.current?.flush(),!a)),[B,V]=x.useState({width:0,height:0}),[z,X]=x.useState(null),[q,D]=x.useState(!1),[U,T]=x.useState(""),[ie,J]=x.useState(!1),[Ee,ee]=x.useState(),[M,oe]=x.useState(null),[G,Q]=x.useState(null),[ye,te]=x.useState(null),[I,fe]=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),[se,xe]=x.useState({}),[de,he]=x.useState(!1),le=x.useRef(null),ge=()=>{he(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>he(!1),15e3)},lt=()=>{le.current&&(clearTimeout(le.current),le.current=null),he(!1)},{org:De}=gn(),be=ks(),Ne=vn(),Mt=Ne.vmEntry,Be=be.lifecycle.phase,{url:re}=Br(t),Ce=re??Ne.previewUrl,We=!!re||Be==="running",Re=h?.id===t?Or(h.metadata):null,we=!re&&h?.id===t&&f.runtime==="cms",Me=f.projectDefault==="cms",Te=sa({sandboxUrl:Ce,previewServerUrl:Re,fastPreviewActive:we}),H=t&&c?{orgSlug:De.slug,virtualMcpId:t,branch:c,threadId:d??null,previewUrl:Ce}:null,Z=bn(H,{fetchEnabled:We}),Xe=Ns(H,{fetchEnabled:We}),Y=Z.data,ve=Xe.data,Le=Y?$r(Y).sort((a,m)=>a.name.localeCompare(m.name)):[],Ks=t&&c?{orgSlug:De.slug,virtualMcpId:t,branch:c}:null,kn=yi(Ks),bt=Y&&ve?Fr(Y,ve):[],Pn=Y&&ve?Zr(ve,Y,"loaders"):[],ze=U?(()=>{const a=U.toLowerCase();return Le.map(m=>({page:m,score:Ii(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)})():Le,et=bt.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)}),zt=g?Pn:[],ct=zt.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)}),tt=G?Pn.find(a=>a.key===G)??null:null,Oe=xn,yt=M||G?null:Mr(Le,I,pe),It=M?M.name:tt?.title??yt?.name,K=yt?.key??null,Ie=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??K,wt=yt?.path??null,Ke=(K?se[K]:void 0)??{},ke=He(I,Ke),kt={};if(We&&Ce&&ve&&Y){const a=Xr(ve,"loaders"),m=K?Y[K]:void 0,N=Va(m,Y,ce=>a.has(ce)),L=Ia(N);for(const ce of ot(I)){if(ce.type!=="param")continue;const $e=Fa(I,ce.name,N),Se=Ha($e,a,L);Se.length>0&&(kt[ce.name]=Se)}}const nt=t&&c?{orgSlug:De.slug,virtualMcpId:t,branch:c,threadId:d??null}:null,Sn=Y&&K?ea(Y,K,0):[],jn=Y?ta(Sn,Y):[],Kt=jn.map(a=>a.isSavedBlock?a.label:""),Ut=jn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Ht=Sn.map(a=>pn(a,Y??{})),En=x.useRef(null),_e=x.useRef(null),Us=be.status.state==="paused",Wt=be.phase,Nn=na({claimPhase:Wt,lifecycle:be.lifecycle}),Ve=Ne.previewState,Hs=Ne.userStopped,Ws=la(De.slug,t??"",c??""),{url:qe}=oa(we&&t&&c?{orgSlug:De.slug,virtualMcpId:t,branch:c,previewServerUrl:Re??null,path:ke}:null),Vs=Me&&f.runtime==="sandbox",_=Sa({previewState:Ve,progressStatus:Nn.status,previewServerUrl:Re,fastPreviewActive:we,fastPreviewReady:!!qe,codingSession:Vs,localPreviewUrl:re}),dt=_.mode!=="none",Cn=_.mode==="production"&&_.iframeBase?at(_.iframeBase):null,qs=Cn??(re&&_.mode==="sandbox"&&_.iframeBase?at(_.iframeBase):null),Rn=!i,st=_.mode==="production"?Cn:at(Ce),Gs=h?.id===t&&h.metadata?.fastPreviewInPlace===!0,ut=re?_.mode==="sandbox"&&g&&k==="blocks":_.mode==="production"&&we&&Gs&&g&&k==="blocks",Tn=x.useRef(null),{pin:Js,effective:Ys}=Mi(Tn.current,{inPlaceRenderActive:ut,draftPreviewUrl:qe,resolvedPath:ke});Tn.current=Js;const Pe=Fi(_.mode==="sandbox"&&Rn?Ot(hs(ye??un(ke,_.iframeBase)??_.iframeBase,v),l.state.variantOverride??[]):_.mode==="production"&&Rn?Ot(hs(ra(ye??Ys??un(ke,_.iframeBase)??_.iframeBase,_.showWakingPill?aa:null),v),l.state.variantOverride??[]):null);x.useEffect(()=>{},[i,qs,z]);const Vt="sandbox.preview.openInNewTab",Ln=qe??(_.iframeBase?un(ke,_.iframeBase):null),Qs=_.mode==="production"?Ln?Ot(Ln,l.state.variantOverride??[]):null:Pe??_.iframeBase,On=async()=>{const a=Qs;if(a){window.open(a,"_blank","noopener");return}},Pt=t&&c?Rs(De.slug,t,c):null,St=a=>{Pt&&ca(Pt,a)},ue=l.state.target;x.useEffect(()=>{if(!(!ue||!Te||!ve))if(ue.kind==="page"){const a=se[ue.key]??{};_e.current=He(ue.path,a),oe(null),Q(null),te(null),ne(ue.key),fe(ue.path),St({path:ue.path,pageKey:ue.key,params:a})}else if(ue.kind==="loader")_e.current=null,oe(null),Q(ue.key),te(null);else{const a=bt.find(m=>m.key===ue.key);if(a){_e.current=null;const m=es(ve);Q(null),oe(a),te(ts(Te,m,a.key))}}},[ue,Te,ve,se]),x.useEffect(()=>{!K||wt===null||ue?.kind==="page"&&ue.key===K&&ue.path===wt||l.selectTarget({kind:"page",key:K,path:wt})},[K,wt,ue]);const[_n,Zs]=x.useState(null);if(Ve.kind==="iframe"&&_n!==Ve.previewUrl){const a=_n!==null;Zs(Ve.previewUrl);const m=Pt?Cs(Pt):null;if(m){if(_e.current=He(m.path,m.params),fe(m.path),ne(m.pageKey),te(null),oe(null),Q(null),m.pageKey&&Object.keys(m.params).length>0){const N=m.pageKey;xe(L=>({...L,[N]:m.params}))}}else a&&(_e.current=null,fe("/"),te(null),ne(null),oe(null),Q(null))}En.current=Pe;const An=Ca({iframeRef:R,src:_.mode==="sandbox"?Pe:null,active:_.mode==="sandbox"}),Dn=x.useRef(null);x.useEffect(()=>{if(!qe||!Pe||Dn.current===qe)return;Dn.current=qe;const a=R.current;a&&a.getAttribute("src")!==Pe&&(ge(),a.src=Pe)},[qe,Pe]);const Bn=()=>{const a=R.current?.contentWindow,m=st;if(!a||!m||!Y||!K)return;const N=Y[K];if(!N||typeof N!="object")return;const L=ia({previewBaseUrl:m,pageBlock:N,decofile:Y,path:ke,pathTemplate:I});if(!L)return;const ce=Ot(L.src,l.state.variantOverride??[]);a.postMessage({type:"cms-editor::render",src:ce,body:L.body},m)},qt=x.useRef(null);x.useEffect(()=>{if(!ut||M||G||!K||!Y){qt.current=null;return}const a={nav:JSON.stringify({page:K,path:ke,pathTemplate:I}),content:JSON.stringify(Y)},m=zi(qt.current,a);qt.current=a,m&&Bn()},[Y,ut,M,G,K,ke,I]);const Gt=x.useRef(null);x.useEffect(()=>{if(!ut||M||G||!K||!Y){Gt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),m=Gt.current;Gt.current={page:K,sig:a},!(!m||m.page!==K||m.sig===a)&&Bn()},[l.state.variantOverride,ut,M,G,K]);const Xs=!!t&&!!c&&!be.notFound&&!Hs&&!Us&&(Wt?.kind==="ready"||Be!=="idle"),ae=Di({editingMode:k,sandboxDisplay:_.mode==="sandbox",blocksEditingEnabled:g});x.useEffect(()=>{const a=st;if(!a)return;const m=N=>{if(N.origin===a)if(N.data?.type==="visual-editor::element-clicked"){const L=Ra.safeParse(N.data.payload);L.success&&w(L.data)}else if(N.data?.type==="cms-editor::section-clicked"){const L=Oa.safeParse(N.data.payload);L.success&&j({index:L.data.sectionIndex,seq:L.data.clickSeq})}else N.data?.type==="cms-editor::render-start"?ge():N.data?.type==="cms-editor::render-end"?(lt(),R.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Kt,kinds:Ut,keys:Ht},a)):N.data?.type==="cms-editor::render-error"&<()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[st,Kt,Ut,Ht]);const $n=()=>{const a=R.current?.contentWindow,m=at(Ce);!a||!m||a.postMessage({type:"visual-editor::activate",script:Ta},m)},er=()=>{const a=R.current?.contentWindow,m=at(Ce);!a||!m||a.postMessage({type:"visual-editor::deactivate"},m)},Jt=()=>{const a=R.current?.contentWindow,m=st;!a||!m||(a.postMessage(_.mode==="production"||re?{type:"editor::inject",args:{script:is}}:{type:"visual-editor::activate",script:is},m),a.postMessage({type:"cms-editor::set-labels",labels:Kt,kinds:Ut,keys:Ht},m))},tr=()=>{const a=R.current?.contentWindow,m=st;!a||!m||a.postMessage({type:"cms-editor::deactivate"},m)},nr=()=>{const a=R.current?.contentWindow,m=st;!a||!m||(a.postMessage({type:"cms-editor::clear-hover"},m),a.postMessage({type:"visual-editor::clear-hover"},m))},jt=a=>{if(a==="blocks"&&!g)return;const m=k;!u&&a!==m&&(a==="blocks"?E.current?.resize("30%"):E.current?.collapse()),b(a),w(null),j(null),a!=="blocks"&&Q(null),m==="visual"&&er(),a==="visual"&&$n(),m==="blocks"&&a!=="blocks"&&tr(),a==="blocks"&&Jt()},Fn=()=>{jt(Oi(k,g))},sr=()=>{jt(_i(k,g))},rr=()=>{if(!R.current||!Pe)return;ge();const a=R.current;a.src=Pe};Rr(()=>{const a=R.current;if(!a)return;ge();const m=document.activeElement,N=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ki(a,En.current);let L;const ce=()=>{clearTimeout(L),a.tabIndex=N,a.style.pointerEvents="";const $e=document.activeElement;(!$e||$e===document.body||$e===a)&&m?.focus(),a.removeEventListener("load",ce)};a.addEventListener("load",ce),L=setTimeout(ce,3e3)});const Mn=()=>{const a=dn.indexOf(v);C(dn[(a+1)%dn.length])},mt=(a,m)=>{if(!K)return;const N=K,L={...Ke,[a]:m};_e.current=He(I,L),xe(ce=>({...ce,[N]:L})),St({path:I,pageKey:N,params:L})},Yt=xi({iframeBase:_.iframeBase,resolvedPath:ke,activeGlobalSectionName:M?.name??null,noServerLabel:s("sandbox.preview.noServerRunning")}),Et=a=>{const m=se[a.key]??{},N=He(a.path,m);(M||Oe(N)!==Oe(ke))&&ge(),_e.current=N,oe(null),Q(null),te(null),j(null),ne(a.key),fe(a.path),St({path:a.path,pageKey:a.key,params:m}),l.selectTarget({kind:"page",key:a.key,path:a.path})},zn=a=>{if(!Te||!ve){qn.error(s("sandbox.preview.previewMetadataNotReady"));return}ge(),_e.current=null;const m=es(ve),N=ts(Te,m,a.key);oe(a),Q(null),te(N),j(null),l.selectTarget({kind:"section",key:a.key})},In=a=>{g&&(oe(null),Q(a.key),te(null),jt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},ar=async({name:a,path:m,templateKey:N})=>{if(!t||!c)return;const L=js(m);if(L){ee(L);return}const ce=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Le.some(Se=>Oe(Se.path)===Oe(ce))){ee(s("sandbox.preview.pageAlreadyExists",{path:ce}));return}let $e;if(N&&($e=Y?.[N],!$e)){ee(s("sandbox.preview.templateNoLongerExists"));return}ee(void 0);try{const Se=await kn.mutateAsync({name:a,path:ce,template:$e});J(!1),qn.success(s("sandbox.preview.pageCreated",{name:a})),await Lr(Bi),Et({key:Se.key,name:Se.name,path:Se.path}),jt("blocks")}catch(Se){ee(Se instanceof Error?Se.message:s("sandbox.preview.failedToCreatePage"))}},ft=dt&&(Xs||_.mode==="production"),Kn=bi({showPreviewToolbar:ft,contentEditingEnabled:P}),Nt=()=>{D(!1),T("")},Qt=M?.name??tt?.title??yt?.name,Zt=Z.isPending||Xe.isPending,Xt=Zt?at(_.iframeBase):Qt,Ct=M?`section:${M.key}`:G?`loader:${G}`:K?`page:${K}`:void 0,ir=ft?Kn?n.jsxs(Sr,{open:q,onOpenChange:a=>{D(a),a||T("")},children:[n.jsx(jr,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":s("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:Zt?Xt??void 0:M||tt?Qt:[Qt,I].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children: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:[M&&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(sn,{size:11}),s("sandbox.preview.globalBadge")]}),tt&&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(tn,{size:11}),s("sandbox.preview.loaderBadge")]}),Xt&&n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Xt}),!Zt&&!M&&!tt&&n.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:I}),n.jsx(Gn,{size:12,className:Ue("shrink-0 transition-transform",q&&"rotate-180")})]})})}),n.jsxs(Er,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[n.jsxs(bs,{shouldFilter:!1,defaultValue:Ct,children:[n.jsx(ys,{value:U,onValueChange:T,placeholder:s("sandbox.preview.searchPagesAndComponents")}),n.jsxs(xs,{className:"max-h-80",children:[n.jsx(ws,{children:Le.length===0&&bt.length===0&&zt.length===0?s("sandbox.preview.noPagesFound"):s("sandbox.preview.noSearchResults")}),ze.length>0&&n.jsx(vt,{children:ze.map(a=>n.jsxs(xt,{value:`page:${a.key}`,"aria-current":Ct===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{Nt(),Et(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))}),et.length>0&&n.jsx(vt,{heading:s("sandbox.preview.globalComponents"),children:et.map(a=>n.jsx(xt,{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:()=>{Nt(),zn(a)},children:n.jsx("span",{className:"truncate",children:a.name})},a.key))}),ct.length>0&&n.jsx(vt,{heading:s("sandbox.preview.globalLoaders"),children:ct.map(a=>n.jsx(xt,{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:()=>{Nt(),In(a)},children:n.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!M&&!G&&ot(I).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:ot(I).map((a,m)=>{if(a.type==="text")return n.jsx("span",{children:a.text},`text-${m}`);const N=kt[a.name];return N&&nt?n.jsx(ds,{sources:N,template:I,paramName:a.name,value:Ke[a.name]??"",sandboxRef:nt,onCommit:L=>mt(a.name,L)},`${K}:${a.name}`):n.jsx(us,{name:a.name,value:Ke[a.name]??"",onCommit:L=>mt(a.name,L)},`${K}:${a.name}`)})}),n.jsx("div",{className:"border-t p-1.5",children:n.jsxs(Ze,{variant:"ghost",className:"w-full justify-start",onClick:()=>{Nt(),ee(void 0),J(!0)},children:[n.jsx(Xn,{size:16}),s("sandbox.preview.createNewPage")]})})]})]}):n.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Yt}):null,Un=ft||P?n.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:Mn,"aria-label":s(Dt[v]),children:v==="mobile"?n.jsx(Jn,{size:16}):v==="tablet"?n.jsx(Yn,{size:16}):n.jsx(Qn,{size:16})})}),n.jsx(Ye,{children:s(Dt[v])})]}),ir,n.jsx("div",{className:"flex shrink-0 items-center gap-1",children:n.jsx(Fe,{onClick:()=>{On()},"aria-label":s(Vt),children:n.jsx(mn,{size:16})})})]}):null,Rt=!e&&ft?n.jsxs(n.Fragment,{children:[n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:rr,"aria-label":s("sandbox.preview.refresh"),children:n.jsx(hr,{size:16})})}),n.jsx(Ye,{side:"bottom",children:s("sandbox.preview.refresh")})]}),Kn?n.jsxs("div",{ref:r,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:()=>D(a=>!a),children:[M&&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(sn,{size:11}),s("sandbox.preview.globalBadge")]}),tt&&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(tn,{size:11}),s("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:Ue("text-[13px] font-medium text-foreground",It==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:It??Yt}),!M&&!G&&It!=null&&I&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:ot(I).map((a,m)=>{if(a.type==="text")return n.jsx("span",{className:Ue(m===0?"min-w-0 truncate":"shrink-0"),children:a.text},`text-${m}`);const N=kt[a.name];return N&&nt?n.jsx(ds,{sources:N,template:I,paramName:a.name,value:Ke[a.name]??"",sandboxRef:nt,onCommit:L=>mt(a.name,L)},`${K}:${a.name}`):n.jsx(us,{name:a.name,value:Ke[a.name]??"",onCommit:L=>mt(a.name,L)},`${K}:${a.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>D(a=>!a),"aria-label":s("sandbox.preview.choosePage"),"aria-expanded":q,children:n.jsx(Gn,{size:12,className:Ue("shrink-0 text-muted-foreground transition-transform",q&&"rotate-180")})})]}),q&&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(Pr,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:U,onChange:a=>T(a.target.value),onKeyDown:a=>{if(a.key!=="Enter")return;const m=U.trim();if(!m)return;const N=ze.find(L=>Oe(L.path)===Oe(m));N&&(a.preventDefault(),D(!1),T(""),Et(N))},placeholder:s("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(),D(!1),T(""),ee(void 0),J(!0)},children:[n.jsx(Xn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:s("sandbox.preview.createNewPage")})]})}),ze.length===0&&et.length===0&&ct.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Le.length===0&&bt.length===0&&zt.length===0?s("sandbox.preview.noPagesFound"):s("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[ze.length>0&&n.jsx("div",{className:"p-1.5",children:ze.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(),D(!1),T(""),Et(a)},children:[n.jsx(Zn,{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))}),et.length>0&&n.jsxs("div",{className:Ue("p-1.5",ze.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:s("sandbox.preview.globalComponents")}),et.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(),D(!1),T(""),zn(a)},children:[n.jsx(sn,{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))]}),ct.length>0&&n.jsxs("div",{className:Ue("p-1.5",(ze.length>0||et.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:s("sandbox.preview.globalLoaders")}),ct.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(),D(!1),T(""),In(a)},children:[n.jsx(tn,{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:Yt}),n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{"aria-label":s(Vt),onClick:()=>{On()},children:n.jsx(mn,{size:16})})}),n.jsx(Ye,{side:"bottom",children:s(Vt)})]})]}):null,or=Rt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:Rt}):null,Hn=_.mode==="sandbox",Tt=$i[v],Lt=v==="desktop"&&(B.width===0||B.width>=Tt.width+2*ps),Wn=Lt?1:Math.min(B.width>0?B.width/(Tt.width+2*ps):1,1),lr=Lt?{width:"100%",height:"100%"}:{width:`${Tt.width}px`,height:B.height>0?`${B.height/Wn}px`:`${Tt.height}px`,transform:`scale(${Wn})`,transformOrigin:"top center"},Vn=n.jsxs(n.Fragment,{children:[Hn&&(ft||P)&&n.jsx(Fe,{onClick:Fn,"aria-pressed":ae==="visual","aria-label":s("sandbox.preview.visualEditor"),active:ae==="visual",children:n.jsx(nn,{size:16})}),g&&n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:sr,"aria-pressed":ae==="blocks","aria-label":s("sandbox.preview.blocksEditor"),active:ae==="blocks",children:n.jsx(Zn,{size:16})})}),n.jsx(Ye,{children:s("sandbox.preview.blocksEditor")})]}),Ie&&n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:A,"aria-pressed":$,"aria-label":s("sectionsEditor.sectionsEditor.viewJson"),active:$,children:n.jsx(kr,{size:16})})}),n.jsx(Ye,{children:s("sectionsEditor.sectionsEditor.viewJson")})]})]}),cr=!e&&dt?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:[Hn&&n.jsxs(n.Fragment,{children:[n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:Fn,"aria-pressed":ae==="visual","aria-label":s("sandbox.preview.visualEditor"),active:ae==="visual",className:"rounded-full",children:n.jsx(nn,{size:16})})}),n.jsx(Ye,{side:"top",children:s("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:Mn,"aria-label":s(Dt[v]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[v==="mobile"&&n.jsx(Jn,{size:16}),v==="tablet"&&n.jsx(Yn,{size:16}),v==="desktop"&&n.jsx(Qn,{size:16})]},v)})}),n.jsx(Ye,{side:"top",children:s(Dt[v])})]})]})}):null,dr=!!G&&ae==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[nt&&Object.entries(kt).map(([a,m])=>(Ke[a]??"")===""?n.jsx(hi,{sources:m,template:I,paramName:a,sandboxRef:nt,onFill:N=>mt(a,N)},`${K}:${a}`):null),e?n.jsxs(n.Fragment,{children:[n.jsx(en.Toolbar.Center.Portal,{fallback:n.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Un}),children:Un}),n.jsx(en.Toolbar.Right.Portal,{fallback:Vn,children:Vn})]}):n.jsx(n.Fragment,{children:n.jsx(en.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:or})}),n.jsx("div",{className:"flex-1 overflow-hidden compact:relative",children:dr?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(fs,{virtualMcpId:t,externalSelection:S,onViewJsonFile:A}),$&&Ie&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(cn,{ref:F,virtualMcpId:t,pageKey:Ie,onClose:O})})]}):n.jsxs(ss,{orientation:"horizontal",disabled:ae!=="blocks",className:"relative isolate",children:[n.jsx(pt,{ref:E,id:"preview-blocks-editor",defaultSize:ae==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ae==="blocks"&&n.jsx(fs,{virtualMcpId:t,externalSelection:S,onViewJsonFile:A})}),ae==="blocks"&&n.jsx(on,{withHandle:!0}),n.jsx(pt,{id:"preview-canvas",defaultSize:ae==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden compact:relative compact:z-0",children:n.jsxs(ss,{orientation:"horizontal",disabled:!($&&Ie),children:[!e&&$&&Ie&&n.jsxs(n.Fragment,{children:[n.jsx(pt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(cn,{ref:F,virtualMcpId:t,pageKey:Ie,onClose:O})}),n.jsx(on,{withHandle:!0})]}),n.jsx(pt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:a=>{if(!a)return;const m=()=>V(L=>L.width===a.clientWidth&&L.height===a.clientHeight?L:{width:a.clientWidth,height:a.clientHeight});m();const N=new ResizeObserver(m);return N.observe(a),()=>N.disconnect()},className:Ue("h-full relative overflow-clip flex justify-center",dt&&!Lt&&"bg-muted/30"),children:[(de||Ws)&&dt&&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"})}),_.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(an,{kind:"starting",progress:Nn,claimPhase:Wt})}),!re&&Ve.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(an,{kind:"suspended",onResume:Ne.resume})}),!re&&Ve.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(an,{kind:"errored",error:Ve.error,onRetry:Ne.retry,connectionsHref:`/${De.slug}/settings/connections`})}),_.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($t,{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:s("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:s("sandbox.preview.startingPreviewHint")})]})]}),ae==="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(nn,{size:12}),s("sandbox.preview.clickElementToAsk")]}),ae==="visual"&&y&&n.jsx(Da,{element:y,onDismiss:()=>w(null)}),cr,dt&&Pe&&n.jsx("div",{className:Ue("shrink-0",!Lt&&"border-x border-border bg-background shadow-sm"),style:lr,onMouseLeave:nr,children:n.jsx("iframe",{ref:R,src:Pe,className:"w-full h-full border-0",title:s("sandbox.preview.devServerPreviewTitle"),onError:An.handleError,onLoad:()=>{if(An.handleLoad(),lt(),_.mode!=="sandbox"||re){(_.mode==="production"&&!_.showWakingPill||re)&&ae==="blocks"&&Jt();return}if(gr("vm_preview_loaded",{view_mode:ae,vm_id:Mt?.sandboxHandle??null}),!M)try{const a=R.current?.contentWindow?.location?.pathname;if(!a)return;const m=_e.current;if(m!==null&&(_e.current=null,Oe(a)!==Oe(m))||Oe(a)===Oe(ke))return;fe(a),St({path:a,pageKey:pe,params:Ke})}catch{}ae==="visual"&&$n(),ae==="blocks"&&Jt()}},_.iframeBase)})]})}),e&&$&&Ie&&n.jsxs(n.Fragment,{children:[n.jsx(on,{withHandle:!0}),n.jsx(pt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(cn,{ref:F,virtualMcpId:t,pageKey:Ie,onClose:O})})]})]})})]})}),n.jsx(wi,{open:ie,onOpenChange:J,isPending:kn.isPending,error:Ee,templates:Le,onSubmit:ar})]})}function Hi(t){const e=me.c(22),{virtualMcpId:r}=t,s=Ae(),i=Cr(r),{activeTask:u,taskId:c,currentBranch:d}=Ft(),o=wa(c),[l,h]=x.useState(!1);if(ya({threadId:c,sandboxBranch:u?.branch??d,agentHasRepo:ln(i?.metadata),threadHasRepo:ln(o)||ln(u?.metadata)})==="none"){let P;e[0]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(rs,{className:"size-7 text-foreground"})}),e[0]=P):P=e[0];let g;e[1]!==s?(g=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=g):g=e[2];let k;e[3]!==s?(k=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=k):k=e[4];let b,v;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),v=n.jsx(rs,{className:"size-4"}),e[5]=b,e[6]=v):(b=e[5],v=e[6]);let C;e[7]!==s?(C=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=C):C=e[8];let y;e[9]!==C?(y=n.jsxs(Ze,{onClick:b,children:[v,C]}),e[9]=C,e[10]=y):y=e[10];let w;e[11]!==g||e[12]!==k||e[13]!==y?(w=n.jsx(yn,{className:"h-full",image:P,title:g,description:k,actions:y}),e[11]=g,e[12]=k,e[13]=y,e[14]=w):w=e[14];let S;e[15]!==l?(S=n.jsx(ba,{open:l,onOpenChange:h,mode:"agent"}),e[15]=l,e[16]=S):S=e[16];let j;return e[17]!==w||e[18]!==S?(j=n.jsxs(n.Fragment,{children:[w,S]}),e[17]=w,e[18]=S,e[19]=j):j=e[19],j}let p;return e[20]!==r?(p=n.jsx(Ui,{virtualMcpId:r}),e[20]=r,e[21]=p):p=e[21],p}function md(){const t=me.c(2),e=ka();let r;return t[0]!==e?(r=n.jsx(vr,{tabId:"site-editor",children:n.jsx(xr,{feature:"cms",children:n.jsx(Hi,{virtualMcpId:e})})}),t[0]=e,t[1]=r):r=t[1],r}export{md as default};
|
|
518
|
+
`)}function Aa(t,e,r=320,s=44,i=12){const{x:u,y:c}=t,{width:d,height:o}=e,l=Math.max(i,Math.min(u-r/2,d-r-i)),f=c/o>.68?Math.max(i,c-s-18):Math.min(c+18,o-s-i);return{leftPct:l/d*100,topPct:f/o*100}}function Da(t){const e=me.c(45),{element:r,onDismiss:s}=t,[i,u]=x.useState(""),c=x.useRef(null),{sendMessage:d}=br(),{openSidePanel:o}=ua(),l=Ae();let h;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o||e[4]!==d?(h=()=>{if(!i.trim())return;const z=_a(r,i);o(),d({parts:[{type:"text",text:z}]}),s()},e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=d,e[5]=h):h=e[5];const f=h;let p;e[6]!==r.position||e[7]!==r.viewport?(p=Aa(r.position,r.viewport),e[6]=r.position,e[7]=r.viewport,e[8]=p):p=e[8];const P=p,g=`${P.leftPct}%`,k=`${P.topPct}%`;let b;e[9]!==g||e[10]!==k?(b={left:g,top:k,width:"320px"},e[9]=g,e[10]=k,e[11]=b):b=e[11];let v;e[12]!==f?(v=z=>{z.preventDefault(),f()},e[12]=f,e[13]=v):v=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=z=>u(z.target.value),e[14]=C):C=e[14];let y;e[15]!==s?(y=z=>{z.key==="Escape"&&s()},e[15]=s,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 S;e[19]!==i||e[20]!==y||e[21]!==w?(S=n.jsx("input",{ref:c,autoFocus:!0,type:"text",value:i,onChange:C,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]=S):S=e[22];let j;e[23]!==i?(j=i.trim(),e[23]=i,e[24]=j):j=e[24];const R=!j;let E;e[25]!==l?(E=l("sandbox.visualEditorPrompt.sendButton"),e[25]=l,e[26]=E):E=e[26];let $;e[27]!==l?($=l("sandbox.visualEditorPrompt.sendButton"),e[27]=l,e[28]=$):$=e[28];let W;e[29]!==$?(W=n.jsx("title",{children:$}),e[29]=$,e[30]=W):W=e[30];let F;e[31]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=F):F=e[31];let O;e[32]!==W?(O=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[W,F]}),e[32]=W,e[33]=O):O=e[33];let A;e[34]!==R||e[35]!==E||e[36]!==O?(A=n.jsx("button",{type:"submit",disabled:R,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:E,children:O}),e[34]=R,e[35]=E,e[36]=O,e[37]=A):A=e[37];let B;e[38]!==S||e[39]!==A||e[40]!==v?(B=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:[S,A]}),e[38]=S,e[39]=A,e[40]=v,e[41]=B):B=e[41];let V;return e[42]!==B||e[43]!==b?(V=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:B}),e[42]=B,e[43]=b,e[44]=V):V=e[44],V}const os="site-links",Ba=/details?page|\bpdp\b/i,$a=/listingpage|\bplp\b/i;function Fa(t,e,r){const s=new Set;for(const d of r)Ba.test(d)&&s.add("product"),$a.test(d)&&s.add("category");const i=ot(xn(t)),u=i[i.length-1],c=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&c?.type==="param"&&c.name===e&&s.add("product"),e==="*"&&i.some(d=>d.type==="param"&&d.name==="*")&&s.add("category"),s}const Ma=["rosa","preto","pink","black"];function _t(t,e){const r=e.trim();return r?t(r):Ma.flatMap(s=>t(s))}function za(t,e){const r=e.trim(),s=[];/^\d+$/.test(r)&&s.push({resolveType:t,props:{ids:[r]}});const u=r.includes("-")&&!/\s/.test(r)?r.replace(/-+/g," "):r;return s.push({resolveType:t,props:{query:u,count:10}}),s}const Bs=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function wn(t){return t.split("/")[0]??""}function Ia(t){const e=new Set;for(const r of t){const s=wn(r);Bs.has(s)&&e.add(s)}return e}function Ka(t,e){const r=wn(t);return!Bs.has(r)||e.size===0?!0:e.has(r)}const Ua=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>_t(r=>za(t,r),e),optionsFromPayload:At},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>_t(r=>[{resolveType:t,props:{props:{search:r,pageSize:10,currentPage:1}}}],e),optionsFromPayload:At},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>_t(r=>[{resolveType:t,props:{term:r,hitsPerPage:10}}],e),optionsFromPayload:At},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>_t(r=>[{resolveType:t,props:{query:r,term:r,count:10,hitsPerPage:10}}],e),optionsFromPayload:At},{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:Ya}];function Ha(t,e,r=new Set){const s=[...e],i=d=>{const o=[];for(const l of Ua){if(l.kind!==d)continue;const h=s.find(f=>l.test(f)&&Ka(f,r));h&&o.push({cand:l,resolveType:h})}return o.find(l=>r.has(wn(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(Wa(t.has("category")?"category":"product")),c}function Wa(t){return{kind:t,id:os,resolveType:os,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,r)=>ti(e,r)}}function Qe(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Va(t,e,r){const s=new Set,i=new Set,u=c=>{if(Array.isArray(c)){for(const l of c)u(l);return}const d=Qe(c);if(!d)return;const o=d.__resolveType;if(typeof o=="string"){if(r(o))s.add(o);else if(o in e&&!i.has(o)){i.add(o);const l=Qe(e[o])?.__resolveType;typeof l=="string"&&r(l)&&s.add(o),u(e[o])}}for(const l of Object.values(d))u(l)};return u(t),s}function $s(t){const e=new Set,r=[];for(const s of t)for(const i of s)e.has(i.value)||(e.add(i.value),r.push(i));return r}function Fs(t){try{return decodeURIComponent(t)}catch{return t}}function qa(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ga(t){const e=[];let r="^";for(const s of t)s.type==="text"?r+=qa(s.text):(e.push(s.name),r+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${r}$`),order:e}}function Ms(t,e,r){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const i=ot(xn(e)),{pattern:u,order:c}=Ga(i),d=c.indexOf(r);if(d===-1)return null;const o=s.match(u);if(!o)return null;const l=o[d+1]?.replace(/^\/+|\/+$/g,"");return l?Fs(l):null}function At(t,e){const r=Qe(t),s=Array.isArray(t)?t:Array.isArray(r?.products)?r.products:Array.isArray(r?.list)?r.list:[],i=[],u=new Set;for(const c of s){const d=Qe(c);if(!d)continue;const o=Ms(d.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const l=Qe(d.isVariantOf),h=typeof l?.name=="string"&&l.name||typeof d.name=="string"&&d.name||o,f=Array.isArray(d.image)?Qe(d.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:o,label:h,image:p})}return i}function Ja(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const r=e.replace(/^\/+|\/+$/g,"");return r?Fs(r):null}function Ya(t){const e=[],r=new Set,s=(i,u)=>{const c=Qe(i);if(!c)return;const d=typeof c.name=="string"&&c.name?c.name:"",o=d?[...u,d]:u,l=Ja(c.url);if(l&&!r.has(l)&&(r.add(l),e.push({value:l,label:o.join(" › ")||l})),Array.isArray(c.children))for(const h of c.children)s(h,o)};if(Array.isArray(t))for(const i of t)s(i,[]);return e}const Qa=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 Za(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function Xa(t){if(typeof t!="string"||!t)return[];const e=[],r=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let s,i=0;for(;(s=r.exec(t))!==null&&i++<5e3;){const u=s[1]??"",c=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:c})}return e}function ei(t){if(typeof t!="string"||!t)return[];const e=[],r=new Set,s=/"@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=s.exec(t))!==null&&c++<3e3;){const d=(u[1]??"").replace(/\\\//g,"/");if(!d||r.has(d))continue;r.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 ti(t,e){const r=[],s=new Set,i=(u,c,d,o)=>{if(r.length>=200)return;const l=Ms(u,e.template,e.paramName);!l||s.has(l)||e.paramName==="*"&&/(^|\/)p$/.test(l)||d==="category"&&Qa.has(l.split("/")[0]??"")||(s.add(l),r.push({value:l,label:c&&c.length<=80?c:Za(l),kind:d,image:o}))};for(const{url:u,name:c,image:d}of ei(t))i(u,c,"product",d);for(const{href:u,text:c}of Xa(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,c,"category");return r}function ht(t,e,r=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,r)}const zs=1e4;function ni(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 si(t,{resolveType:e,props:r}){const s=await fetch(Ir(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...r}),signal:AbortSignal.timeout(zs)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function ls(t,e){const r=await fetch(Kr(t,e),{signal:AbortSignal.timeout(zs)});if(!r.ok)throw new Error(`Failed to fetch page: ${r.status}`);return r.text()}async function ri(t,e,r){const s=e.optionsFromPayload(await ls(t,"/"),r),i=s.find(c=>c.kind==="category");if(!i)return s;const u=He(r.template,{[r.paramName]:i.value});if(u==="/")return s;try{const c=e.optionsFromPayload(await ls(t,u),r).filter(d=>d.kind==="product");return $s([s,c])}catch{return s}}function ai(t,e,r){return ur.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":r}`)}async function ii(t,e,r,s){if(e.homepageLinks)return ri(t,e,s);const i=e.buildRequests?.(r)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(d=>si(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 $s(c.map(d=>e.optionsFromPayload(d,s)))}function hn(t,e,r,s,i){return{queryKey:ai(t,e,r),queryFn:()=>ii(t,e,r,s),enabled:i,staleTime:6e4,retry:1}}function gt(t){const e=me.c(16),{heading:r,iconKind:s,options:i,template:u,paramName:c,keyPrefix:d,onSelect:o}=t;if(i.length===0)return null;let l;if(e[0]!==s||e[1]!==d||e[2]!==o||e[3]!==i||e[4]!==c||e[5]!==u){let f;e[7]!==s||e[8]!==d||e[9]!==o||e[10]!==c||e[11]!==u?(f=p=>n.jsxs(xt,{value:`${d}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[s==="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(vs,{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:He(u,{[c]:p.value})})]})]},`${d}:${p.value}`),e[7]=s,e[8]=d,e[9]=o,e[10]=c,e[11]=u,e[12]=f):f=e[12],l=i.map(f),e[0]=s,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]!==r||e[14]!==l?(h=n.jsx(vt,{heading:r,children:l}),e[13]=r,e[14]=l,e[15]=h):h=e[15],h}function cs(t){const e=me.c(2),{text:r}=t;let s;return e[0]!==r?(s=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r}),e[0]=r,e[1]=s):s=e[1],s}function ds(t){const e=me.c(52),{sources:r,template:s,paramName:i,value:u,sandboxRef:c,onCommit:d}=t,o=Ae(),[l,h]=x.useState(!1),[f,p]=x.useState(""),[P,g]=x.useState(""),k=x.useRef(null),b=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,v=ni(o),y=[...new Set(r.map(H=>v[H.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 S=w,j={template:s,paramName:i};let R;e[3]!==f?(R=(H,Z)=>({source:H,query:Z,options:H.clientFilter?ht(Z.data??[],f):Z.data??[]}),e[3]=f,e[4]=R):R=e[4];const E=R,$=r.filter(pi),W=r.filter(fi),F=fn({queries:$.map(H=>hn(c,H,P,j,l))});let O;e[5]!==F||e[6]!==E?(O=(H,Z)=>E(H,F[Z]),e[5]=F,e[6]=E,e[7]=O):O=e[7];const A=$.map(O),B=A.length===0||A.every(mi),V=fn({queries:W.map(H=>hn(c,H,P,j,l&&B))});let z;e[8]!==V||e[9]!==E?(z=(H,Z)=>E(H,V[Z]),e[8]=V,e[9]=E,e[10]=z):z=e[10];const X=W.map(z),q=B?X:A,D=q.length===1&&q[0]?.source.homepageLinks?q[0]:null,T=D&&!D.query.isLoading&&!D.query.isError?D?.query.data??[]:[],ie=ht(T.filter(ui),f),J=ht(T.filter(di),f),Ee=ie.length>0&&J.length>0,ee=H=>{h(H),k.current&&clearTimeout(k.current),p(H?u:""),g(H?u:"")};let M;e[11]===Symbol.for("react.memo_cache_sentinel")?(M=H=>{p(H),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{g(H)},300)},e[11]=M):M=e[11];const oe=M,G=H=>{d(H),ee(!1)},Q=Ss(f),ye=He(s,{[i]:Q}),te=Os,I=Ls,fe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",pe=ci;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 se;e[15]!==ne?(se=n.jsx(_s,{className:"sr-only",children:n.jsx(As,{children:ne})}),e[15]=ne,e[16]=se):se=e[16];let xe;e[17]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(vs,{size:16,className:"shrink-0 text-foreground"}),e[17]=xe):xe=e[17];let de;e[18]!==o?(de=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=de):de=e[19];let he;e[20]!==b?(he=n.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:b}),e[20]=b,e[21]=he):he=e[21];let le;e[22]!==de||e[23]!==he?(le=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:[de," ",he]})]}),e[22]=de,e[23]=he,e[24]=le):le=e[24];const ge=bs,lt=!1,De="min-h-0 flex-1";let be;e[25]!==S||e[26]!==f?(be=n.jsx(ys,{autoFocus:!0,placeholder:S,value:f,onValueChange:oe}),e[25]=S,e[26]=f,e[27]=be):be=e[27];const Ne=xs,Mt="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Be;e[28]!==o?(Be=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=Be):Be=e[29];let re;e[30]!==Be?(re=n.jsx(ws,{children:Be}),e[30]=Be,e[31]=re):re=e[31];const Ce=Q&&n.jsx(vt,{className:"shrink-0",children:n.jsxs(xt,{value:`__raw__:${Q}`,className:"gap-3 py-2",onSelect:()=>G(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(ma,{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:ye})]})]})}),We=Ee?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(gt,{heading:v.category.heading,iconKind:"category",options:ie,template:s,paramName:i,keyPrefix:`${D?.source.id}:cat`,onSelect:G})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(gt,{heading:v.product.heading,iconKind:"product",options:J,template:s,paramName:i,keyPrefix:`${D?.source.id}:prod`,onSelect:G})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:q.map(H=>{const{source:Z,query:Xe,options:Y}=H,{noun:ve}=v[Z.kind];if(Xe.isLoading)return n.jsx(cs,{text:o("sandbox.pathParamPickerChip.loading",{noun:ve})},Z.id);if(Xe.isError)return n.jsx(cs,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},Z.id);if(Z.homepageLinks){const Le=Xe.data??[];return n.jsxs(x.Fragment,{children:[n.jsx(gt,{heading:v.category.heading,iconKind:"category",options:ht(Le.filter(li),f),template:s,paramName:i,keyPrefix:`${Z.id}:cat`,onSelect:G}),n.jsx(gt,{heading:v.product.heading,iconKind:"product",options:ht(Le.filter(oi),f),template:s,paramName:i,keyPrefix:`${Z.id}:prod`,onSelect:G})]},Z.id)}return n.jsx(gt,{heading:q.length>1?v[Z.kind].heading:void 0,iconKind:Z.kind,options:Y,template:s,paramName:i,keyPrefix:Z.id,onSelect:G},Z.id)})});let Re;e[32]!==Ne||e[33]!==re||e[34]!==Ce||e[35]!==We?(Re=n.jsxs(Ne,{className:Mt,children:[re,Ce,We]}),e[32]=Ne,e[33]=re,e[34]=Ce,e[35]=We,e[36]=Re):Re=e[36];let we;e[37]!==ge||e[38]!==be||e[39]!==Re?(we=n.jsxs(ge,{shouldFilter:lt,className:De,children:[be,Re]}),e[37]=ge,e[38]=be,e[39]=Re,e[40]=we):we=e[40];let Me;e[41]!==I||e[42]!==se||e[43]!==le||e[44]!==we||e[45]!==pe?(Me=n.jsxs(I,{className:fe,onClick:pe,children:[se,le,we]}),e[41]=I,e[42]=se,e[43]=le,e[44]=we,e[45]=pe,e[46]=Me):Me=e[46];let Te;return e[47]!==te||e[48]!==ee||e[49]!==l||e[50]!==Me?(Te=n.jsx(te,{open:l,onOpenChange:ee,children:Me}),e[47]=te,e[48]=ee,e[49]=l,e[50]=Me,e[51]=Te):Te=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-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:H=>{H.stopPropagation(),ee(!0)},children:u||b}),Te]})}function oi(t){return t.kind==="product"}function li(t){return t.kind!=="product"}function ci(t){return t.stopPropagation()}function di(t){return t.kind==="product"}function ui(t){return t.kind!=="product"}function mi(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function fi(t){return t.isFallback}function pi(t){return!t.isFallback}function hi(t){const e=me.c(8),{sources:r,template:s,paramName:i,sandboxRef:u,onFill:c}=t;let d,o;if(e[0]!==i||e[1]!==u||e[2]!==r||e[3]!==s){const P={template:s,paramName:i},g=r.filter(gi);o=fn,d=g.map(k=>hn(u,k,"",P,!0)),e[0]=i,e[1]=u,e[2]=r,e[3]=s,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 P of h){if(P.isLoading)break;const g=P.data?.[0];if(g){p(!0),queueMicrotask(()=>c(g.value));break}}return null}function gi(t){return!t.isFallback}function us(t){const e=me.c(31),{name:r,value:s,onCommit:i}=t,u=Ae(),[c,d]=x.useState(s),[o,l]=x.useState(!1),h=x.useRef(!1);let f;e[0]!==r||e[1]!==u?(f=r==="*"?u("sandbox.preview.catchAllParamLabel"):`:${r}`,e[0]=r,e[1]=u,e[2]=f):f=e[2];const p=f,P=c||p;let g;e[3]!==P?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:P}),e[3]=P,e[4]=g):g=e[4];let k;e[5]!==p||e[6]!==u?(k=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=k):k=e[7];let b,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=E=>d(E.target.value),v=()=>l(!0),e[8]=b,e[9]=v):(b=e[8],v=e[9]);let C;e[10]!==s?(C=E=>{E.key==="Enter"&&E.currentTarget.blur(),E.key==="Escape"&&(h.current=!0,d(s),E.currentTarget.blur())},e[10]=s,e[11]=C):C=e[11];let y;e[12]!==c||e[13]!==i||e[14]!==s?(y=()=>{if(l(!1),h.current){h.current=!1;return}const E=Ss(c);d(E),E!==s&&i(E)},e[12]=c,e[13]=i,e[14]=s,e[15]=y):y=e[15];let w;e[16]!==c||e[17]!==p||e[18]!==k||e[19]!==C||e[20]!==y?(w=n.jsx("input",{type:"text",value:c,placeholder:p,title:k,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:vi,onChange:b,onFocus:v,onKeyDown:C,onBlur:y}),e[16]=c,e[17]=p,e[18]=k,e[19]=C,e[20]=y,e[21]=w):w=e[21];let S;e[22]!==g||e[23]!==w?(S=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]=S):S=e[24];let j;e[25]!==o||e[26]!==u?(j=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(yr,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=j):j=e[27];let R;return e[28]!==j||e[29]!==S?(R=n.jsxs(n.Fragment,{children:[S,j]}),e[28]=j,e[29]=S,e[30]=R):R=e[30],R}function vi(t){return t.stopPropagation()}function xi(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const r=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${r.host}${s}`}catch{return e}}function bi(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function yi(t){const e=me.c(5);let r;e[0]!==t?(r=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=r):r=e[1];const s=Es(r);let i;return e[2]!==t||e[3]!==s?(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=Ur(c),h=o?{...o,name:c,path:d}:Hr(c,d);return await s.mutateAsync({blockKey:l,data:h}),{key:l,name:c,path:d}}},e[2]=t,e[3]=s,e[4]=i):i=e[4],mr(i)}function wi(t){const e=me.c(89),{open:r,onOpenChange:s,isPending:i,error:u,templates:c,onSubmit:d}=t,o=i===void 0?!1:i,l=Ae();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 P;e[2]!==l?(P=l("sectionsEditor.createPageModal.defaultPagePath"),e[2]=l,e[3]=P):P=e[3];const[g,k]=x.useState(P),[b,v]=x.useState(rn),[C,y]=x.useState(null),[w,S]=x.useState(r);r!==w&&(S(r),r&&(p(l("sectionsEditor.createPageModal.defaultPageName")),k(l("sectionsEditor.createPageModal.defaultPagePath")),v(rn),y(null)));const j=!!c?.length;let R;e[4]!==o||e[5]!==s?(R=de=>{!de&&!o&&(y(null),s(!1))},e[4]=o,e[5]=s,e[6]=R):R=e[6];const E=R;let $;e[7]!==o||e[8]!==f||e[9]!==d||e[10]!==g||e[11]!==j||e[12]!==b?($=async de=>{de.preventDefault();const he=f.trim(),le=g.trim();if(!he||!le||o)return;const ge=js(le);if(ge){y(ge);return}y(null),await d({name:he,path:le,templateKey:j&&b!==rn?b:null})},e[7]=o,e[8]=f,e[9]=d,e[10]=g,e[11]=j,e[12]=b,e[13]=$):$=e[13];const W=$,F=C??u;let O;e[14]!==l?(O=l("sectionsEditor.createPageModal.title"),e[14]=l,e[15]=O):O=e[15];let A;e[16]!==O?(A=n.jsx(_s,{children:n.jsx(As,{children:O})}),e[16]=O,e[17]=A):A=e[17];let B;e[18]!==l?(B=l("sectionsEditor.createPageModal.nameLabel"),e[18]=l,e[19]=B):B=e[19];let V;e[20]!==B?(V=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:B}),e[20]=B,e[21]=V):V=e[21];let z;e[22]===Symbol.for("react.memo_cache_sentinel")?(z=de=>p(de.target.value),e[22]=z):z=e[22];let X;e[23]!==l?(X=l("sectionsEditor.createPageModal.namePlaceholder"),e[23]=l,e[24]=X):X=e[24];let q;e[25]!==o||e[26]!==f||e[27]!==X?(q=n.jsx(ns,{id:"new-page-name",value:f,onChange:z,placeholder:X,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=X,e[28]=q):q=e[28];let D;e[29]!==q||e[30]!==V?(D=n.jsxs("div",{className:"space-y-1.5",children:[V,q]}),e[29]=q,e[30]=V,e[31]=D):D=e[31];let U;e[32]!==l?(U=l("sectionsEditor.createPageModal.pathLabel"),e[32]=l,e[33]=U):U=e[33];let T;e[34]!==U?(T=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:U}),e[34]=U,e[35]=T):T=e[35];let ie;e[36]===Symbol.for("react.memo_cache_sentinel")?(ie=de=>k(de.target.value),e[36]=ie):ie=e[36];let J;e[37]!==l?(J=l("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=l,e[38]=J):J=e[38];let Ee;e[39]!==o||e[40]!==g||e[41]!==J?(Ee=n.jsx(ns,{id:"new-page-path",value:g,onChange:ie,placeholder:J,disabled:o}),e[39]=o,e[40]=g,e[41]=J,e[42]=Ee):Ee=e[42];let ee;e[43]!==T||e[44]!==Ee?(ee=n.jsxs("div",{className:"space-y-1.5",children:[T,Ee]}),e[43]=T,e[44]=Ee,e[45]=ee):ee=e[45];let M;e[46]!==o||e[47]!==j||e[48]!==l||e[49]!==b||e[50]!==c?(M=j&&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(Wr,{id:"new-page-template",value:b,onChange:v,templates:c??[],disabled:o})]}),e[46]=o,e[47]=j,e[48]=l,e[49]=b,e[50]=c,e[51]=M):M=e[51];let oe;e[52]!==F?(oe=F&&n.jsx("p",{className:"text-xs text-destructive",children:F}),e[52]=F,e[53]=oe):oe=e[53];let G;e[54]!==D||e[55]!==ee||e[56]!==M||e[57]!==oe?(G=n.jsxs("div",{className:"space-y-4 py-4",children:[D,ee,M,oe]}),e[54]=D,e[55]=ee,e[56]=M,e[57]=oe,e[58]=G):G=e[58];let Q;e[59]!==s?(Q=()=>s(!1),e[59]=s,e[60]=Q):Q=e[60];let ye;e[61]!==l?(ye=l("sectionsEditor.createPageModal.cancelButton"),e[61]=l,e[62]=ye):ye=e[62];let te;e[63]!==o||e[64]!==Q||e[65]!==ye?(te=n.jsx(Ze,{type:"button",variant:"outline",onClick:Q,disabled:o,children:ye}),e[63]=o,e[64]=Q,e[65]=ye,e[66]=te):te=e[66];let I;e[67]!==o||e[68]!==f||e[69]!==g?(I=!f.trim()||!g.trim()||o,e[67]=o,e[68]=f,e[69]=g,e[70]=I):I=e[70];let fe;e[71]!==o||e[72]!==l?(fe=o?n.jsxs(n.Fragment,{children:[n.jsx($t,{className:"size-3.5"}),l("sectionsEditor.createPageModal.creatingButton")]}):l("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=l,e[73]=fe):fe=e[73];let pe;e[74]!==I||e[75]!==fe?(pe=n.jsx(Ze,{type:"submit",disabled:I,children:fe}),e[74]=I,e[75]=fe,e[76]=pe):pe=e[76];let ne;e[77]!==te||e[78]!==pe?(ne=n.jsxs(fa,{children:[te,pe]}),e[77]=te,e[78]=pe,e[79]=ne):ne=e[79];let se;e[80]!==W||e[81]!==G||e[82]!==ne||e[83]!==A?(se=n.jsx(Ls,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:W,children:[A,G,ne]})}),e[80]=W,e[81]=G,e[82]=ne,e[83]=A,e[84]=se):se=e[84];let xe;return e[85]!==E||e[86]!==r||e[87]!==se?(xe=n.jsx(Os,{open:r,onOpenChange:E,children:se}),e[85]=E,e[86]=r,e[87]=se,e[88]=xe):xe=e[88],xe}function ki(t){const e=me.c(29),{orgSlug:r,virtualMcpId:s,branch:i,previewUrl:u,meta:c,decofile:d,blockKey:o}=t,l=Ae();let h;e[0]!==i||e[1]!==r||e[2]!==s?(h={orgSlug:r,virtualMcpId:s,branch:i},e[0]=i,e[1]=r,e[2]=s,e[3]=h):h=e[3];const f=Es(h);let p;e[4]!==f?(p=Gr((S,j)=>f.mutate({blockKey:S,data:j})),e[4]=f,e[5]=p):p=e[5];const P=p;let g;e[6]!==o||e[7]!==d?(g=Vr(d,o),e[6]=o,e[7]=d,e[8]=g):g=e[8];const{resolveType:k,props:b,title:v}=g;if(!k){let S;e[9]!==l?(S=l("sandbox.preview.loaderNoLongerExists"),e[9]=l,e[10]=S):S=e[10];let j;return e[11]!==S?(j=n.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:S}),e[11]=S,e[12]=j):j=e[12],j}const C=`loader:${o}`;let y;e[13]!==o||e[14]!==k||e[15]!==v?(y={mode:"saved",blockKey:o,resolveType:k,title:v},e[13]=o,e[14]=k,e[15]=v,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==d||e[19]!==c||e[20]!==r||e[21]!==u||e[22]!==b||e[23]!==f.isPending||e[24]!==P||e[25]!==C||e[26]!==y||e[27]!==s?(w=n.jsx(qr,{orgSlug:r,virtualMcpId:s,branch:i,previewUrl:u,meta:c,decofile:d,kind:"loaders",target:y,initialValue:b,isCreating:f.isPending,onCreate:Pi,onSaveReferencedBlock:P,showRun:!1},C),e[17]=i,e[18]=d,e[19]=c,e[20]=r,e[21]=u,e[22]=b,e[23]=f.isPending,e[24]=P,e[25]=C,e[26]=y,e[27]=s,e[28]=w):w=e[28],w}async function Pi(){}function Si(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function ms(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:Si(t.error)}}function ji(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 Ei(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=ji(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const r=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return r&&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"}:r?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 Ni="https://github.com/decocms/blocks";function Ci(){const t=me.c(14),e=Ae();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(wr,{size:48,className:"text-muted-foreground"}),t[0]=r):r=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=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(mn,{size:14}),t[7]=c):c=t[7];let d;t[8]!==u?(d=n.jsx(Ze,{size:"sm",asChild:!0,children:n.jsxs("a",{href:Ni,target:"_blank",rel:"noreferrer",children:[u,c]})}),t[8]=u,t[9]=d):d=t[9];let o;return t[10]!==s||t[11]!==i||t[12]!==d?(o=n.jsx(yn,{className:"h-full w-full",image:r,title:s,description:i,actions:d}),t[10]=s,t[11]=i,t[12]=d,t[13]=o):o=t[13],o}function Ri(t){const e=me.c(15),{source:r,onRetry:s}=t,i=Ae();let u;e[0]!==r||e[1]!==i?(u=i(r==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=r,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(pa,{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]!==s||e[9]!==l?(h=n.jsx(Ze,{variant:"outline",size:"sm",onClick:s,children:l}),e[8]=s,e[9]=l,e[10]=h):h=e[10];let f;return e[11]!==c||e[12]!==o||e[13]!==h?(f=n.jsx(yn,{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 Ti=x.lazy(()=>fr(()=>import("./sections-editor-DDnlJ9KQ.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])).then(t=>({default:t.SectionsEditor})));function fs(t){const e=me.c(50),{virtualMcpId:r,externalSelection:s,onViewJsonFile:i}=t,u=s===void 0?null:s,{org:c}=gn(),{currentBranch:d,taskId:o}=Ft(),l=ks(),h=vn(),f=Ds(),p=l.lifecycle.phase==="running",P=h.previewUrl;let g;e[0]!==d||e[1]!==c||e[2]!==P||e[3]!==o||e[4]!==r?(g=d?{orgSlug:c.slug,virtualMcpId:r,branch:d,threadId:o??null,previewUrl:P}:null,e[0]=d,e[1]=c,e[2]=P,e[3]=o,e[4]=r,e[5]=g):g=e[5];const k=g;let b;e[6]!==p?(b={fetchEnabled:p},e[6]=p,e[7]=b):b=e[7];const v=bn(k,b);let C;e[8]!==p?(C={fetchEnabled:p},e[8]=p,e[9]=C):C=e[9];const y=Ns(k,C),w=Ei({lifecyclePhase:l.lifecycle.phase,decofile:ms(v),meta:ms(y),hasEditableContent:Dr(v.data,y.data),fastPreviewActive:Ps(r).runtime==="cms"}),S=Li;if(w.kind==="loading"){let T;return e[10]===Symbol.for("react.memo_cache_sentinel")?(T=S(n.jsx(pr,{})),e[10]=T):T=e[10],T}if(w.kind==="empty"){let T;return e[11]===Symbol.for("react.memo_cache_sentinel")?(T=S(n.jsx(Ci,{})),e[11]=T):T=e[11],T}if(w.kind==="error"){let T;e[12]!==v||e[13]!==h||e[14]!==y||e[15]!==w.source?(T=()=>{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]=T):T=e[16];const ie=T;let J;return e[17]!==ie||e[18]!==w.source?(J=S(n.jsx(Ri,{source:w.source,onRetry:ie})),e[17]=ie,e[18]=w.source,e[19]=J):J=e[19],J}let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=T=>S(n.jsx("div",{className:"h-full min-h-0",children:T})),e[20]=j):j=e[20];const R=j,E=f.state.target;if(E?.kind==="loader"&&v.data&&y.data){const T=d??"",ie=P??null;let J;return e[21]!==v.data||e[22]!==y.data||e[23]!==c.slug||e[24]!==T||e[25]!==ie||e[26]!==E.key||e[27]!==r?(J=R(n.jsx(ki,{orgSlug:c.slug,virtualMcpId:r,branch:T,previewUrl:ie,meta:y.data,decofile:v.data,blockKey:E.key})),e[21]=v.data,e[22]=y.data,e[23]=c.slug,e[24]=T,e[25]=ie,e[26]=E.key,e[27]=r,e[28]=J):J=e[28],J}let $;e[29]!==d||e[30]!==c.slug||e[31]!==E||e[32]!==r?($=E||!d?null:Cs(Rs(c.slug,r,d)),e[29]=d,e[30]=c.slug,e[31]=E,e[32]=r,e[33]=$):$=e[33];const W=$;let F="/",O=null,A=null;E?.kind==="page"?(F=E.path,O=E.key):E?.kind==="section"?A=E.key:W&&(F=W.path,O=W.pageKey);const B=O?`page:${O}`:A?`section:${A}`:`path:${F}`;let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx($t,{className:"size-5 text-muted-foreground"})}),e[34]=V):V=e[34];const z=d??"",X=P??void 0,q=A?null:u,D=!!O&&f.state.editSeoPageKey===O;let U;return e[35]!==A||e[36]!==O||e[37]!==F||e[38]!==B||e[39]!==i||e[40]!==c.slug||e[41]!==q||e[42]!==D||e[43]!==z||e[44]!==X||e[45]!==r||e[46]!==f.consumeEditSeo||e[47]!==f.setFocusedBlock||e[48]!==f.setVariantOverride?(U=R(n.jsx(x.Suspense,{fallback:V,children:n.jsx(Ti,{orgSlug:c.slug,virtualMcpId:r,branch:z,previewReady:!0,previewUrl:X,currentPath:F,activePageBlockKey:O,activeGlobalBlockKey:A,externalSelection:q,initialEditSeo:D,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onFocusedBlockChange:f.setFocusedBlock,onViewJsonFile:i},B)})),e[35]=A,e[36]=O,e[37]=F,e[38]=B,e[39]=i,e[40]=c.slug,e[41]=q,e[42]=D,e[43]=z,e[44]=X,e[45]=r,e[46]=f.consumeEditSeo,e[47]=f.setFocusedBlock,e[48]=f.setVariantOverride,e[49]=U):U=e[49],U}function Li(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function cn(t){const e=me.c(39),{virtualMcpId:r,pageKey:s,onClose:i,ref:u}=t,c=Ae(),d=gs(),o=Jr(r);let l;e[0]!==o||e[1]!==s?(l=Yr(o,va(s)),e[0]=o,e[1]=s,e[2]=l):l=e[2];const h=l,{org:f}=gn(),{currentBranch:p,taskId:P}=Ft(),k=vn().previewUrl;let b;e[3]!==p||e[4]!==f.slug||e[5]!==k||e[6]!==P||e[7]!==r?(b=p?{orgSlug:f.slug,virtualMcpId:r,branch:p,threadId:P??null,previewUrl:k}:null,e[3]=p,e[4]=f.slug,e[5]=k,e[6]=P,e[7]=r,e[8]=b):b=e[8];const C=bn(b),y=p??"";let w;e[9]!==f.slug||e[10]!==y||e[11]!==r?(w={orgSlug:f.slug,virtualMcpId:r,branch:y},e[9]=f.slug,e[10]=y,e[11]=r,e[12]=w):w=e[12];const{save:S,flush:j}=Qr(w),R=C.data?.[s],E=C.data===void 0&&C.isLoading,$=C.data!==void 0&&R===void 0,W=!p||$||E;let F;e[13]!==R?(F=R===void 0?"":JSON.stringify(R,null,2),e[13]=R,e[14]=F):F=e[14];const O=F;let A;e[15]!==s||e[16]!==W||e[17]!==S?(A=D=>{if(W)return;let U;try{U=JSON.parse(D)}catch{return}U===null||typeof U!="object"||Array.isArray(U)||S(s,U)},e[15]=s,e[16]=W,e[17]=S,e[18]=A):A=e[18];const B=A;let V;e[19]!==j?(V=()=>({flush:j}),e[19]=j,e[20]=V):V=e[20],x.useImperativeHandle(u,V);let z;e[21]!==h||e[22]!==d||e[23]!==i||e[24]!==c?(z=d?n.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:n.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:c("sectionsEditor.pageJsonDialog.titleShort")}),n.jsx(Ze,{variant:"ghost",size:"icon",onClick:i,"aria-label":c("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:n.jsx(ha,{size:14})})]}),e[21]=h,e[22]=d,e[23]=i,e[24]=c,e[25]=z):z=e[25];let X;e[26]!==C.data||e[27]!==j||e[28]!==O||e[29]!==E||e[30]!==$||e[31]!==s||e[32]!==W||e[33]!==B||e[34]!==c?(X=E?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx($t,{className:"size-5 text-muted-foreground"})}):$?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(ga,{code:O,language:"json",readOnly:W,height:"100%",onChange:D=>B(D??""),onSave:D=>{B(D),j()}},`${s}:${C.data===void 0?"loading":"ready"}`)}),e[26]=C.data,e[27]=j,e[28]=O,e[29]=E,e[30]=$,e[31]=s,e[32]=W,e[33]=B,e[34]=c,e[35]=X):X=e[35];let q;return e[36]!==z||e[37]!==X?(q=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[z,X]}),e[36]=z,e[37]=X,e[38]=q):q=e[38],q}function Is(t){return t.contentEditingEnabled&&!t.isMobile}function Oi(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function _i(t,e){return t==="blocks"?"preview":e?"blocks":t}function Ai(t){return Is({contentEditingEnabled:Ts(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Di(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const Bi=500,$i={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},ps=1,dn=["desktop","mobile","tablet"],Dt={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function hs(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}function Fi(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 at(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function un(t,e){try{return new URL(t,e).href}catch{return null}}function Mi(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 r={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:r,effective:r.url}}return{pin:t,effective:t?.url??null}}function zi(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Ii(t,e,r){const s=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),c=o=>{if(o===r)return 100;const l=o.indexOf(r);if(l===-1)return 0;let h=40;return l===0?h+=30:/[\s/-]/.test(o[l-1]??"")&&(h+=20),h+=Math.round(r.length/o.length*20),h};let d=Math.max(c(s),c(i));return u.at(-1)===r?d=Math.max(d,95):u.includes(r)&&(d=Math.max(d,90)),d}function Ki(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ui({virtualMcpId:t}){const e=gs(),r=x.useRef(null),s=Ae(),i=da(),u=zr(),{currentBranch:c,taskId:d,virtualMcpId:o}=Ft(),l=Ds(),h=Nr(o===t?t:null),f=Ps(t),p=xa(h?.metadata?.ui?.layout??null),P=Ts(p),g=Is({contentEditingEnabled:P,isMobile:u}),[k,b]=x.useState(()=>Ai({cmsMode:p,isMobile:u})),[v,C]=x.useState("desktop"),[y,w]=x.useState(null),[S,j]=x.useState(null),R=x.useRef(null),E=x.useRef(null),[$,W]=x.useState(!1),F=x.useRef(null),O=()=>{F.current?.flush(),W(!1)},A=()=>W(a=>(a&&F.current?.flush(),!a)),[B,V]=x.useState({width:0,height:0}),[z,X]=x.useState(null),[q,D]=x.useState(!1),[U,T]=x.useState(""),[ie,J]=x.useState(!1),[Ee,ee]=x.useState(),[M,oe]=x.useState(null),[G,Q]=x.useState(null),[ye,te]=x.useState(null),[I,fe]=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),[se,xe]=x.useState({}),[de,he]=x.useState(!1),le=x.useRef(null),ge=()=>{he(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>he(!1),15e3)},lt=()=>{le.current&&(clearTimeout(le.current),le.current=null),he(!1)},{org:De}=gn(),be=ks(),Ne=vn(),Mt=Ne.vmEntry,Be=be.lifecycle.phase,{url:re}=Br(t),Ce=re??Ne.previewUrl,We=!!re||Be==="running",Re=h?.id===t?Or(h.metadata):null,we=!re&&h?.id===t&&f.runtime==="cms",Me=f.projectDefault==="cms",Te=sa({sandboxUrl:Ce,previewServerUrl:Re,fastPreviewActive:we}),H=t&&c?{orgSlug:De.slug,virtualMcpId:t,branch:c,threadId:d??null,previewUrl:Ce}:null,Z=bn(H,{fetchEnabled:We}),Xe=Ns(H,{fetchEnabled:We}),Y=Z.data,ve=Xe.data,Le=Y?$r(Y).sort((a,m)=>a.name.localeCompare(m.name)):[],Ks=t&&c?{orgSlug:De.slug,virtualMcpId:t,branch:c}:null,kn=yi(Ks),bt=Y&&ve?Fr(Y,ve):[],Pn=Y&&ve?Zr(ve,Y,"loaders"):[],ze=U?(()=>{const a=U.toLowerCase();return Le.map(m=>({page:m,score:Ii(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)})():Le,et=bt.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)}),zt=g?Pn:[],ct=zt.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)}),tt=G?Pn.find(a=>a.key===G)??null:null,Oe=xn,yt=M||G?null:Mr(Le,I,pe),It=M?M.name:tt?.title??yt?.name,K=yt?.key??null,Ie=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??K,wt=yt?.path??null,Ke=(K?se[K]:void 0)??{},ke=He(I,Ke),kt={};if(We&&Ce&&ve&&Y){const a=Xr(ve,"loaders"),m=K?Y[K]:void 0,N=Va(m,Y,ce=>a.has(ce)),L=Ia(N);for(const ce of ot(I)){if(ce.type!=="param")continue;const $e=Fa(I,ce.name,N),Se=Ha($e,a,L);Se.length>0&&(kt[ce.name]=Se)}}const nt=t&&c?{orgSlug:De.slug,virtualMcpId:t,branch:c,threadId:d??null}:null,Sn=Y&&K?ea(Y,K,0):[],jn=Y?ta(Sn,Y):[],Kt=jn.map(a=>a.isSavedBlock?a.label:""),Ut=jn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Ht=Sn.map(a=>pn(a,Y??{})),En=x.useRef(null),_e=x.useRef(null),Us=be.status.state==="paused",Wt=be.phase,Nn=na({claimPhase:Wt,lifecycle:be.lifecycle}),Ve=Ne.previewState,Hs=Ne.userStopped,Ws=la(De.slug,t??"",c??""),{url:qe}=oa(we&&t&&c?{orgSlug:De.slug,virtualMcpId:t,branch:c,previewServerUrl:Re??null,path:ke}:null),Vs=Me&&f.runtime==="sandbox",_=Sa({previewState:Ve,progressStatus:Nn.status,previewServerUrl:Re,fastPreviewActive:we,fastPreviewReady:!!qe,codingSession:Vs,localPreviewUrl:re}),dt=_.mode!=="none",Cn=_.mode==="production"&&_.iframeBase?at(_.iframeBase):null,qs=Cn??(re&&_.mode==="sandbox"&&_.iframeBase?at(_.iframeBase):null),Rn=!i,st=_.mode==="production"?Cn:at(Ce),Gs=h?.id===t&&h.metadata?.fastPreviewInPlace===!0,ut=re?_.mode==="sandbox"&&g&&k==="blocks":_.mode==="production"&&we&&Gs&&g&&k==="blocks",Tn=x.useRef(null),{pin:Js,effective:Ys}=Mi(Tn.current,{inPlaceRenderActive:ut,draftPreviewUrl:qe,resolvedPath:ke});Tn.current=Js;const Pe=Fi(_.mode==="sandbox"&&Rn?Ot(hs(ye??un(ke,_.iframeBase)??_.iframeBase,v),l.state.variantOverride??[]):_.mode==="production"&&Rn?Ot(hs(ra(ye??Ys??un(ke,_.iframeBase)??_.iframeBase,_.showWakingPill?aa:null),v),l.state.variantOverride??[]):null);x.useEffect(()=>{},[i,qs,z]);const Vt="sandbox.preview.openInNewTab",Ln=qe??(_.iframeBase?un(ke,_.iframeBase):null),Qs=_.mode==="production"?Ln?Ot(Ln,l.state.variantOverride??[]):null:Pe??_.iframeBase,On=async()=>{const a=Qs;if(a){window.open(a,"_blank","noopener");return}},Pt=t&&c?Rs(De.slug,t,c):null,St=a=>{Pt&&ca(Pt,a)},ue=l.state.target;x.useEffect(()=>{if(!(!ue||!Te||!ve))if(ue.kind==="page"){const a=se[ue.key]??{};_e.current=He(ue.path,a),oe(null),Q(null),te(null),ne(ue.key),fe(ue.path),St({path:ue.path,pageKey:ue.key,params:a})}else if(ue.kind==="loader")_e.current=null,oe(null),Q(ue.key),te(null);else{const a=bt.find(m=>m.key===ue.key);if(a){_e.current=null;const m=es(ve);Q(null),oe(a),te(ts(Te,m,a.key))}}},[ue,Te,ve,se]),x.useEffect(()=>{!K||wt===null||ue?.kind==="page"&&ue.key===K&&ue.path===wt||l.selectTarget({kind:"page",key:K,path:wt})},[K,wt,ue]);const[_n,Zs]=x.useState(null);if(Ve.kind==="iframe"&&_n!==Ve.previewUrl){const a=_n!==null;Zs(Ve.previewUrl);const m=Pt?Cs(Pt):null;if(m){if(_e.current=He(m.path,m.params),fe(m.path),ne(m.pageKey),te(null),oe(null),Q(null),m.pageKey&&Object.keys(m.params).length>0){const N=m.pageKey;xe(L=>({...L,[N]:m.params}))}}else a&&(_e.current=null,fe("/"),te(null),ne(null),oe(null),Q(null))}En.current=Pe;const An=Ca({iframeRef:R,src:_.mode==="sandbox"?Pe:null,active:_.mode==="sandbox"}),Dn=x.useRef(null);x.useEffect(()=>{if(!qe||!Pe||Dn.current===qe)return;Dn.current=qe;const a=R.current;a&&a.getAttribute("src")!==Pe&&(ge(),a.src=Pe)},[qe,Pe]);const Bn=()=>{const a=R.current?.contentWindow,m=st;if(!a||!m||!Y||!K)return;const N=Y[K];if(!N||typeof N!="object")return;const L=ia({previewBaseUrl:m,pageBlock:N,decofile:Y,path:ke,pathTemplate:I});if(!L)return;const ce=Ot(L.src,l.state.variantOverride??[]);a.postMessage({type:"cms-editor::render",src:ce,body:L.body},m)},qt=x.useRef(null);x.useEffect(()=>{if(!ut||M||G||!K||!Y){qt.current=null;return}const a={nav:JSON.stringify({page:K,path:ke,pathTemplate:I}),content:JSON.stringify(Y)},m=zi(qt.current,a);qt.current=a,m&&Bn()},[Y,ut,M,G,K,ke,I]);const Gt=x.useRef(null);x.useEffect(()=>{if(!ut||M||G||!K||!Y){Gt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),m=Gt.current;Gt.current={page:K,sig:a},!(!m||m.page!==K||m.sig===a)&&Bn()},[l.state.variantOverride,ut,M,G,K]);const Xs=!!t&&!!c&&!be.notFound&&!Hs&&!Us&&(Wt?.kind==="ready"||Be!=="idle"),ae=Di({editingMode:k,sandboxDisplay:_.mode==="sandbox",blocksEditingEnabled:g});x.useEffect(()=>{const a=st;if(!a)return;const m=N=>{if(N.origin===a)if(N.data?.type==="visual-editor::element-clicked"){const L=Ra.safeParse(N.data.payload);L.success&&w(L.data)}else if(N.data?.type==="cms-editor::section-clicked"){const L=Oa.safeParse(N.data.payload);L.success&&j({index:L.data.sectionIndex,seq:L.data.clickSeq})}else N.data?.type==="cms-editor::render-start"?ge():N.data?.type==="cms-editor::render-end"?(lt(),R.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Kt,kinds:Ut,keys:Ht},a)):N.data?.type==="cms-editor::render-error"&<()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[st,Kt,Ut,Ht]);const $n=()=>{const a=R.current?.contentWindow,m=at(Ce);!a||!m||a.postMessage({type:"visual-editor::activate",script:Ta},m)},er=()=>{const a=R.current?.contentWindow,m=at(Ce);!a||!m||a.postMessage({type:"visual-editor::deactivate"},m)},Jt=()=>{const a=R.current?.contentWindow,m=st;!a||!m||(a.postMessage(_.mode==="production"||re?{type:"editor::inject",args:{script:is}}:{type:"visual-editor::activate",script:is},m),a.postMessage({type:"cms-editor::set-labels",labels:Kt,kinds:Ut,keys:Ht},m))},tr=()=>{const a=R.current?.contentWindow,m=st;!a||!m||a.postMessage({type:"cms-editor::deactivate"},m)},nr=()=>{const a=R.current?.contentWindow,m=st;!a||!m||(a.postMessage({type:"cms-editor::clear-hover"},m),a.postMessage({type:"visual-editor::clear-hover"},m))},jt=a=>{if(a==="blocks"&&!g)return;const m=k;!u&&a!==m&&(a==="blocks"?E.current?.resize("30%"):E.current?.collapse()),b(a),w(null),j(null),a!=="blocks"&&Q(null),m==="visual"&&er(),a==="visual"&&$n(),m==="blocks"&&a!=="blocks"&&tr(),a==="blocks"&&Jt()},Fn=()=>{jt(Oi(k,g))},sr=()=>{jt(_i(k,g))},rr=()=>{if(!R.current||!Pe)return;ge();const a=R.current;a.src=Pe};Rr(()=>{const a=R.current;if(!a)return;ge();const m=document.activeElement,N=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ki(a,En.current);let L;const ce=()=>{clearTimeout(L),a.tabIndex=N,a.style.pointerEvents="";const $e=document.activeElement;(!$e||$e===document.body||$e===a)&&m?.focus(),a.removeEventListener("load",ce)};a.addEventListener("load",ce),L=setTimeout(ce,3e3)});const Mn=()=>{const a=dn.indexOf(v);C(dn[(a+1)%dn.length])},mt=(a,m)=>{if(!K)return;const N=K,L={...Ke,[a]:m};_e.current=He(I,L),xe(ce=>({...ce,[N]:L})),St({path:I,pageKey:N,params:L})},Yt=xi({iframeBase:_.iframeBase,resolvedPath:ke,activeGlobalSectionName:M?.name??null,noServerLabel:s("sandbox.preview.noServerRunning")}),Et=a=>{const m=se[a.key]??{},N=He(a.path,m);(M||Oe(N)!==Oe(ke))&&ge(),_e.current=N,oe(null),Q(null),te(null),j(null),ne(a.key),fe(a.path),St({path:a.path,pageKey:a.key,params:m}),l.selectTarget({kind:"page",key:a.key,path:a.path})},zn=a=>{if(!Te||!ve){qn.error(s("sandbox.preview.previewMetadataNotReady"));return}ge(),_e.current=null;const m=es(ve),N=ts(Te,m,a.key);oe(a),Q(null),te(N),j(null),l.selectTarget({kind:"section",key:a.key})},In=a=>{g&&(oe(null),Q(a.key),te(null),jt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},ar=async({name:a,path:m,templateKey:N})=>{if(!t||!c)return;const L=js(m);if(L){ee(L);return}const ce=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Le.some(Se=>Oe(Se.path)===Oe(ce))){ee(s("sandbox.preview.pageAlreadyExists",{path:ce}));return}let $e;if(N&&($e=Y?.[N],!$e)){ee(s("sandbox.preview.templateNoLongerExists"));return}ee(void 0);try{const Se=await kn.mutateAsync({name:a,path:ce,template:$e});J(!1),qn.success(s("sandbox.preview.pageCreated",{name:a})),await Lr(Bi),Et({key:Se.key,name:Se.name,path:Se.path}),jt("blocks")}catch(Se){ee(Se instanceof Error?Se.message:s("sandbox.preview.failedToCreatePage"))}},ft=dt&&(Xs||_.mode==="production"),Kn=bi({showPreviewToolbar:ft,contentEditingEnabled:P}),Nt=()=>{D(!1),T("")},Qt=M?.name??tt?.title??yt?.name,Zt=Z.isPending||Xe.isPending,Xt=Zt?at(_.iframeBase):Qt,Ct=M?`section:${M.key}`:G?`loader:${G}`:K?`page:${K}`:void 0,ir=ft?Kn?n.jsxs(Sr,{open:q,onOpenChange:a=>{D(a),a||T("")},children:[n.jsx(jr,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":s("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:Zt?Xt??void 0:M||tt?Qt:[Qt,I].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children: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:[M&&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(sn,{size:11}),s("sandbox.preview.globalBadge")]}),tt&&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(tn,{size:11}),s("sandbox.preview.loaderBadge")]}),Xt&&n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Xt}),!Zt&&!M&&!tt&&n.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:I}),n.jsx(Gn,{size:12,className:Ue("shrink-0 transition-transform",q&&"rotate-180")})]})})}),n.jsxs(Er,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[n.jsxs(bs,{shouldFilter:!1,defaultValue:Ct,children:[n.jsx(ys,{value:U,onValueChange:T,placeholder:s("sandbox.preview.searchPagesAndComponents")}),n.jsxs(xs,{className:"max-h-80",children:[n.jsx(ws,{children:Le.length===0&&bt.length===0&&zt.length===0?s("sandbox.preview.noPagesFound"):s("sandbox.preview.noSearchResults")}),ze.length>0&&n.jsx(vt,{children:ze.map(a=>n.jsxs(xt,{value:`page:${a.key}`,"aria-current":Ct===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{Nt(),Et(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))}),et.length>0&&n.jsx(vt,{heading:s("sandbox.preview.globalComponents"),children:et.map(a=>n.jsx(xt,{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:()=>{Nt(),zn(a)},children:n.jsx("span",{className:"truncate",children:a.name})},a.key))}),ct.length>0&&n.jsx(vt,{heading:s("sandbox.preview.globalLoaders"),children:ct.map(a=>n.jsx(xt,{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:()=>{Nt(),In(a)},children:n.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!M&&!G&&ot(I).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:ot(I).map((a,m)=>{if(a.type==="text")return n.jsx("span",{children:a.text},`text-${m}`);const N=kt[a.name];return N&&nt?n.jsx(ds,{sources:N,template:I,paramName:a.name,value:Ke[a.name]??"",sandboxRef:nt,onCommit:L=>mt(a.name,L)},`${K}:${a.name}`):n.jsx(us,{name:a.name,value:Ke[a.name]??"",onCommit:L=>mt(a.name,L)},`${K}:${a.name}`)})}),n.jsx("div",{className:"border-t p-1.5",children:n.jsxs(Ze,{variant:"ghost",className:"w-full justify-start",onClick:()=>{Nt(),ee(void 0),J(!0)},children:[n.jsx(Xn,{size:16}),s("sandbox.preview.createNewPage")]})})]})]}):n.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Yt}):null,Un=ft||P?n.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:Mn,"aria-label":s(Dt[v]),children:v==="mobile"?n.jsx(Jn,{size:16}):v==="tablet"?n.jsx(Yn,{size:16}):n.jsx(Qn,{size:16})})}),n.jsx(Ye,{children:s(Dt[v])})]}),ir,n.jsx("div",{className:"flex shrink-0 items-center gap-1",children:n.jsx(Fe,{onClick:()=>{On()},"aria-label":s(Vt),children:n.jsx(mn,{size:16})})})]}):null,Rt=!e&&ft?n.jsxs(n.Fragment,{children:[n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:rr,"aria-label":s("sandbox.preview.refresh"),children:n.jsx(hr,{size:16})})}),n.jsx(Ye,{side:"bottom",children:s("sandbox.preview.refresh")})]}),Kn?n.jsxs("div",{ref:r,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:()=>D(a=>!a),children:[M&&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(sn,{size:11}),s("sandbox.preview.globalBadge")]}),tt&&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(tn,{size:11}),s("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:Ue("text-[13px] font-medium text-foreground",It==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:It??Yt}),!M&&!G&&It!=null&&I&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:ot(I).map((a,m)=>{if(a.type==="text")return n.jsx("span",{className:Ue(m===0?"min-w-0 truncate":"shrink-0"),children:a.text},`text-${m}`);const N=kt[a.name];return N&&nt?n.jsx(ds,{sources:N,template:I,paramName:a.name,value:Ke[a.name]??"",sandboxRef:nt,onCommit:L=>mt(a.name,L)},`${K}:${a.name}`):n.jsx(us,{name:a.name,value:Ke[a.name]??"",onCommit:L=>mt(a.name,L)},`${K}:${a.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>D(a=>!a),"aria-label":s("sandbox.preview.choosePage"),"aria-expanded":q,children:n.jsx(Gn,{size:12,className:Ue("shrink-0 text-muted-foreground transition-transform",q&&"rotate-180")})})]}),q&&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(Pr,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:U,onChange:a=>T(a.target.value),onKeyDown:a=>{if(a.key!=="Enter")return;const m=U.trim();if(!m)return;const N=ze.find(L=>Oe(L.path)===Oe(m));N&&(a.preventDefault(),D(!1),T(""),Et(N))},placeholder:s("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(),D(!1),T(""),ee(void 0),J(!0)},children:[n.jsx(Xn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:s("sandbox.preview.createNewPage")})]})}),ze.length===0&&et.length===0&&ct.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Le.length===0&&bt.length===0&&zt.length===0?s("sandbox.preview.noPagesFound"):s("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[ze.length>0&&n.jsx("div",{className:"p-1.5",children:ze.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(),D(!1),T(""),Et(a)},children:[n.jsx(Zn,{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))}),et.length>0&&n.jsxs("div",{className:Ue("p-1.5",ze.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:s("sandbox.preview.globalComponents")}),et.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(),D(!1),T(""),zn(a)},children:[n.jsx(sn,{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))]}),ct.length>0&&n.jsxs("div",{className:Ue("p-1.5",(ze.length>0||et.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:s("sandbox.preview.globalLoaders")}),ct.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(),D(!1),T(""),In(a)},children:[n.jsx(tn,{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:Yt}),n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{"aria-label":s(Vt),onClick:()=>{On()},children:n.jsx(mn,{size:16})})}),n.jsx(Ye,{side:"bottom",children:s(Vt)})]})]}):null,or=Rt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:Rt}):null,Hn=_.mode==="sandbox",Tt=$i[v],Lt=v==="desktop"&&(B.width===0||B.width>=Tt.width+2*ps),Wn=Lt?1:Math.min(B.width>0?B.width/(Tt.width+2*ps):1,1),lr=Lt?{width:"100%",height:"100%"}:{width:`${Tt.width}px`,height:B.height>0?`${B.height/Wn}px`:`${Tt.height}px`,transform:`scale(${Wn})`,transformOrigin:"top center"},Vn=n.jsxs(n.Fragment,{children:[Hn&&(ft||P)&&n.jsx(Fe,{onClick:Fn,"aria-pressed":ae==="visual","aria-label":s("sandbox.preview.visualEditor"),active:ae==="visual",children:n.jsx(nn,{size:16})}),g&&n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:sr,"aria-pressed":ae==="blocks","aria-label":s("sandbox.preview.blocksEditor"),active:ae==="blocks",children:n.jsx(Zn,{size:16})})}),n.jsx(Ye,{children:s("sandbox.preview.blocksEditor")})]}),Ie&&n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:A,"aria-pressed":$,"aria-label":s("sectionsEditor.sectionsEditor.viewJson"),active:$,children:n.jsx(kr,{size:16})})}),n.jsx(Ye,{children:s("sectionsEditor.sectionsEditor.viewJson")})]})]}),cr=!e&&dt?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:[Hn&&n.jsxs(n.Fragment,{children:[n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:Fn,"aria-pressed":ae==="visual","aria-label":s("sandbox.preview.visualEditor"),active:ae==="visual",className:"rounded-full",children:n.jsx(nn,{size:16})})}),n.jsx(Ye,{side:"top",children:s("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(Ge,{children:[n.jsx(Je,{asChild:!0,children:n.jsx(Fe,{onClick:Mn,"aria-label":s(Dt[v]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[v==="mobile"&&n.jsx(Jn,{size:16}),v==="tablet"&&n.jsx(Yn,{size:16}),v==="desktop"&&n.jsx(Qn,{size:16})]},v)})}),n.jsx(Ye,{side:"top",children:s(Dt[v])})]})]})}):null,dr=!!G&&ae==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[nt&&Object.entries(kt).map(([a,m])=>(Ke[a]??"")===""?n.jsx(hi,{sources:m,template:I,paramName:a,sandboxRef:nt,onFill:N=>mt(a,N)},`${K}:${a}`):null),e?n.jsxs(n.Fragment,{children:[n.jsx(en.Toolbar.Center.Portal,{fallback:n.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Un}),children:Un}),n.jsx(en.Toolbar.Right.Portal,{fallback:Vn,children:Vn})]}):n.jsx(n.Fragment,{children:n.jsx(en.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:or})}),n.jsx("div",{className:"flex-1 overflow-hidden compact:relative",children:dr?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(fs,{virtualMcpId:t,externalSelection:S,onViewJsonFile:A}),$&&Ie&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(cn,{ref:F,virtualMcpId:t,pageKey:Ie,onClose:O})})]}):n.jsxs(ss,{orientation:"horizontal",disabled:ae!=="blocks",className:"relative isolate",children:[n.jsx(pt,{ref:E,id:"preview-blocks-editor",defaultSize:ae==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ae==="blocks"&&n.jsx(fs,{virtualMcpId:t,externalSelection:S,onViewJsonFile:A})}),ae==="blocks"&&n.jsx(on,{withHandle:!0}),n.jsx(pt,{id:"preview-canvas",defaultSize:ae==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden compact:relative compact:z-0",children:n.jsxs(ss,{orientation:"horizontal",disabled:!($&&Ie),children:[!e&&$&&Ie&&n.jsxs(n.Fragment,{children:[n.jsx(pt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(cn,{ref:F,virtualMcpId:t,pageKey:Ie,onClose:O})}),n.jsx(on,{withHandle:!0})]}),n.jsx(pt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:a=>{if(!a)return;const m=()=>V(L=>L.width===a.clientWidth&&L.height===a.clientHeight?L:{width:a.clientWidth,height:a.clientHeight});m();const N=new ResizeObserver(m);return N.observe(a),()=>N.disconnect()},className:Ue("h-full relative overflow-clip flex justify-center",dt&&!Lt&&"bg-muted/30"),children:[(de||Ws)&&dt&&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"})}),_.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(an,{kind:"starting",progress:Nn,claimPhase:Wt})}),!re&&Ve.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(an,{kind:"suspended",onResume:Ne.resume})}),!re&&Ve.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(an,{kind:"errored",error:Ve.error,onRetry:Ne.retry,connectionsHref:`/${De.slug}/settings/connections`})}),_.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($t,{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:s("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:s("sandbox.preview.startingPreviewHint")})]})]}),ae==="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(nn,{size:12}),s("sandbox.preview.clickElementToAsk")]}),ae==="visual"&&y&&n.jsx(Da,{element:y,onDismiss:()=>w(null)}),cr,dt&&Pe&&n.jsx("div",{className:Ue("shrink-0",!Lt&&"border-x border-border bg-background shadow-sm"),style:lr,onMouseLeave:nr,children:n.jsx("iframe",{ref:R,src:Pe,className:"w-full h-full border-0",title:s("sandbox.preview.devServerPreviewTitle"),onError:An.handleError,onLoad:()=>{if(An.handleLoad(),lt(),_.mode!=="sandbox"||re){(_.mode==="production"&&!_.showWakingPill||re)&&ae==="blocks"&&Jt();return}if(gr("vm_preview_loaded",{view_mode:ae,vm_id:Mt?.sandboxHandle??null}),!M)try{const a=R.current?.contentWindow?.location?.pathname;if(!a)return;const m=_e.current;if(m!==null&&(_e.current=null,Oe(a)!==Oe(m))||Oe(a)===Oe(ke))return;fe(a),St({path:a,pageKey:pe,params:Ke})}catch{}ae==="visual"&&$n(),ae==="blocks"&&Jt()}},_.iframeBase)})]})}),e&&$&&Ie&&n.jsxs(n.Fragment,{children:[n.jsx(on,{withHandle:!0}),n.jsx(pt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(cn,{ref:F,virtualMcpId:t,pageKey:Ie,onClose:O})})]})]})})]})}),n.jsx(wi,{open:ie,onOpenChange:J,isPending:kn.isPending,error:Ee,templates:Le,onSubmit:ar})]})}function Hi(t){const e=me.c(22),{virtualMcpId:r}=t,s=Ae(),i=Cr(r),{activeTask:u,taskId:c,currentBranch:d}=Ft(),o=wa(c),[l,h]=x.useState(!1);if(ya({threadId:c,sandboxBranch:u?.branch??d,agentHasRepo:ln(i?.metadata),threadHasRepo:ln(o)||ln(u?.metadata)})==="none"){let P;e[0]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(rs,{className:"size-7 text-foreground"})}),e[0]=P):P=e[0];let g;e[1]!==s?(g=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=g):g=e[2];let k;e[3]!==s?(k=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=k):k=e[4];let b,v;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),v=n.jsx(rs,{className:"size-4"}),e[5]=b,e[6]=v):(b=e[5],v=e[6]);let C;e[7]!==s?(C=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=C):C=e[8];let y;e[9]!==C?(y=n.jsxs(Ze,{onClick:b,children:[v,C]}),e[9]=C,e[10]=y):y=e[10];let w;e[11]!==g||e[12]!==k||e[13]!==y?(w=n.jsx(yn,{className:"h-full",image:P,title:g,description:k,actions:y}),e[11]=g,e[12]=k,e[13]=y,e[14]=w):w=e[14];let S;e[15]!==l?(S=n.jsx(ba,{open:l,onOpenChange:h,mode:"agent"}),e[15]=l,e[16]=S):S=e[16];let j;return e[17]!==w||e[18]!==S?(j=n.jsxs(n.Fragment,{children:[w,S]}),e[17]=w,e[18]=S,e[19]=j):j=e[19],j}let p;return e[20]!==r?(p=n.jsx(Ui,{virtualMcpId:r}),e[20]=r,e[21]=p):p=e[21],p}function md(){const t=me.c(2),e=ka();let r;return t[0]!==e?(r=n.jsx(vr,{tabId:"site-editor",children:n.jsx(xr,{feature:"cms",children:n.jsx(Hi,{virtualMcpId:e})})}),t[0]=e,t[1]=r):r=t[1],r}export{md as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s,j as e,X as l}from"./index-B9KXIX84.js";import{C as u}from"./index-BEBsD_Uj.js";import{AppViewContent as c}from"./project-app-view-XjFGHkML.js";import{S as d}from"./settings-tab-CJkqi9sH.js";import{a as f}from"./use-virtual-mcp-CijpHWeY.js";import"./use-mobile-BYkN2CBV.js";import"./thread-button-B_TrQG9B.js";import"./sidebar-DGGwKufn.js";import"./LayoutLeft-Di6ed8JP.js";import"./sheet-B0Sr1nwg.js";import"./X-rZfX9y0d.js";import"./tooltip-C3KYJcjJ.js";import"./index-CcCENa4K.js";import"./thread-route-C_KFFLE6.js";import"./use-panel-navigate-Wiv5HcS5.js";import"./use-project-scope-bzqn-AFR.js";import"./github-repo-BknN0SVI.js";import"./use-route-default-main-BxMIgjib.js";import"./hooks-D5xL0VD-.js";import"./use-mcp-client-DgXYHdq4.js";import"./auth-6ek5T3GB.js";import"./backoff-8mStPHYB.js";import"./task-board-mTs0BkYi.js";import"./schema-CdJJOHN7.js";import"./agent-icon-CUHwvCug.js";import"./AlertCircle-BXd3wmhE.js";import"./Tool01-CeJWUTx4.js";import"./ArrowUp-BAzKSoqz.js";import"./ArrowLeft-CtG_Sz3T.js";import"./ArrowRight-DGQoBfX2.js";import"./XCircle-fYjVO-4e.js";import"./ZoomOut-CmJNnQZa.js";import"./Globe04-Cfnfjo6J.js";import"./CheckCircle-BmoxvNcp.js";import"./Check-D3UEH1bb.js";import"./ChevronUp-DkDOUc-8.js";import"./UserSquare-D9izLEMu.js";import"./Copy01-1VyfDicU.js";import"./CreditCard01-CrYxi8Yw.js";import"./DotsVertical-BVvaV8Wy.js";import"./Download01-CRbdo8yP.js";import"./Eye-DnZDEgOn.js";import"./Share07-DwVANqGN.js";import"./XClose-Drgfi-MO.js";import"./Image01-ZQL1hr5Q.js";import"./Key01-HEuAw7Uw.js";import"./Link01-CZiQuc44.js";import"./LinkExternal01-BekDuv1R.js";import"./Monitor01-BLWTHtTp.js";import"./Sun-CPPd8cP7.js";import"./Package-tH33TvgC.js";import"./Palette-BagjpLZN.js";import"./Plus-Y-KvMcUC.js";import"./SearchLg-CL6esTtw.js";import"./SearchMd-CzE1IXtk.js";import"./Stars01-BvtQBnED.js";import"./Trash01-C6BZglNY.js";import"./Upload01-DBDdtdRw.js";import"./User01-DhER-7M5.js";import"./Users01-CGh_okmA.js";import"./Zap-DcWY_A2w.js";import"./toolbar-icon-button-ClGr1SmO.js";import"./use-in-settings-pVGM4OYb.js";import"./shell-layout-BA4WahT2.js";import"./avatar-D0sKo5Ko.js";import"./download-app-dialog-DJrde0mx.js";import"./dialog-O_WsqGxK.js";import"./command-Das6UcyK.js";import"./index-BMguGW4R.js";import"./integration-icon-BDlRT6Oh.js";import"./project-icon-BFHg-quI.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-CyCpjrfs.js";import"./autosend-BNuK0erf.js";import"./use-org-sso-Dbq_Rnc1.js";import"./resizable-X9aB8eM5.js";import"./route-page-header-Dr10DLhY.js";import"./gateway-client-pQEk_YWf.js";import"./tool-namespace-DmnQIdtF.js";import"./use-mcp-tools-CVoDfjIr.js";import"./sandbox-lifecycle-context-CHjp6hDX.js";import"./use-session-runtime-QJbktQ89.js";import"./thread-intent-BHNHSQWV.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-DfIPg4kF.js";import"./use-entitlements-B9tTc-Ev.js";import"./use-ai-providers-CBInTetj.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BBmla5vN.js";import"./use-organization-settings-C_ZfDEow.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CN7HJqgc.js";import"./types-CsEtlQqb.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-Cgkf5QHC.js";import"./companions-core-BnuxEm_5.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C8GSbvaz.js";import"./form-Db0Tj8hF.js";import"./label-CeYXCWIS.js";import"./input-ALPFLjGK.js";import"./use-debounced-value-CkL-oBw0.js";import"./provision-repo-scoped-github-connection-B6zdkC6p.js";import"./useQueries-0w4KxC3A.js";import"./authenticate-and-persist-oauth-C0EgQu0P.js";import"./mcp-oauth-DBcvf4Gv.js";import"./track-D48SK3WP.js";import"./extract-connection-data-C8tfLeRY.js";import"./connection-Vq7712iH.js";import"./popover-Wvqr_2yR.js";import"./scroll-area-DiE2RXUS.js";import"./select-BmpMhuXU.js";import"./breadcrumb-DGzJ2mi_.js";import"./build-improve-prompt-doc-DeW5gQgu.js";import"./empty-state-Atjx1U2W.js";import"./use-date-fns-locale-CIJdwgov.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-connection-DNwnGnCC.js";import"./alert-dialog-D0EwpcN4.js";import"./textarea-BGjs-_ya.js";import"./use-debounced-autosave-CvGfYHrZ.js";import"./add-connection-dialog-BrlUHuQ9.js";import"./collection-search-BRkIgroJ.js";import"./connection-card-DmSG--jc.js";import"./useInfiniteQuery-yhr2eVB6.js";import"./infiniteQueryObserver-DrVVQrbK.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-DmWpiePK.js";import"./connection-form-helpers-B1Gfuz6v.js";import"./collection-tabs-BN1xWU9h.js";import"./badge-CFEM0raL.js";import"./use-infinite-scroll-DTMvlJNU.js";import"./useSuspenseInfiniteQuery-D4wrf6ZX.js";import"./file-type-icon-D6rUMGA4.js";import"./use-org-fs-FICli5P0.js";import"./checkbox-Dr1iEjvP.js";import"./search-input-MsiE4xnC.js";import"./use-mcp-auth-status-DKnE_dZf.js";import"./use-mcp-prompts-BXGa38c2.js";import"./utils-CVEq3hMx.js";import"./switch-CGGsZGg2.js";import"./use-project-native-view-presence-DON0VaEF.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-y5ZRqVAK.js";import"./site-slug-uya6Wp4-.js";import"./optimistic-project-sidebar-views-BuKbcQgt.js";import"./virtual-mcp-BrketPQW.js";import"./repository-import-picker-BomeZ4YD.js";import"./use-navigate-to-agent-fAaFURKA.js";import"./repository-picker-Bpcr10QR.js";import"./github-icon-DO6paY-Y.js";import"./secret-picker-BOvhv2JQ.js";import"./use-secrets-CQXQ7e5K.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const g=l("/shell/$org/org-shell/agent-shell/projects/$agentId/views/$viewId");function w(){const t=s.c(7),{agentId:o,viewId:i}=g.useParams(),a=f(o);let m;t[0]!==a?.metadata?.ui?.layout?.tabs||t[1]!==i?(m=a?.metadata?.ui?.layout?.tabs?.find(n=>n.id===i),t[0]=a?.metadata?.ui?.layout?.tabs,t[1]=i,t[2]=m):m=t[2];const r=m;let p;return t[3]!==o||t[4]!==r||t[5]!==i?(p=r?e.jsx(c,{connectionId:r.view.appId,toolName:r.id,args:r.view.args},i):e.jsx(d,{virtualMcpId:o}),t[3]=o,t[4]=r,t[5]=i,t[6]=p):p=t[6],p}function di(){const t=s.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(u.Content,{children:e.jsx(w,{})}),t[0]=o):o=t[0],o}export{di as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as l,N as d,J as p,X as m}from"./index-
|
|
1
|
+
import{c as g,j as l,N as d,J as p,X as m}from"./index-B9KXIX84.js";import{u as f}from"./use-main-panel-tabs-4N3JxcLp.js";import{a as I}from"./thread-route-C_KFFLE6.js";import{r as h}from"./use-panel-navigate-Wiv5HcS5.js";const v=m("/shell/$org/org-shell/agent-shell/projects/$agentId");function P(o){const e=g.c(6),{children:u,tabId:c}=o,s=v.useParams(),t=s.agentId,n=I();let a;e[0]!==t||e[1]!==n?(a={virtualMcpId:t,taskId:n},e[0]=t,e[1]=n,e[2]=a):a=e[2];const{activeTab:i}=f(a);if(c==="code"?i==="code"||i.startsWith("code:"):i===c)return u;let r;return e[3]!==t||e[4]!==s.org?(r=l.jsx(d,{to:p.settings,params:{org:s.org,agentId:t},search:R,replace:!0}),e[3]=t,e[4]=s.org,e[5]=r):r=e[5],r}function R(o){return h({previous:o,destination:"agent"})}export{P as A};
|