decocms 4.594.0 → 4.594.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-kHXzu73r.js → AlertCircle-CngNmW3n.js} +1 -1
- package/dist/client/assets/{AreaChart-CJxx8aiG.js → AreaChart-w2QCUzTm.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DcKid1bz.js → ArrowLeft-7wIIyF4Y.js} +1 -1
- package/dist/client/assets/{ArrowRight-ajc9j6D-.js → ArrowRight-Dyuh-rXZ.js} +1 -1
- package/dist/client/assets/{ArrowUp-CjAvmMLL.js → ArrowUp-C9hRfWJJ.js} +1 -1
- package/dist/client/assets/{BookOpen01-CdH9hkvz.js → BookOpen01-Bov9QL4X.js} +1 -1
- package/dist/client/assets/{CartesianChart-BRKqG5iH.js → CartesianChart-DZFTbe0Q.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DW_7VziR.js → CategoricalChart-BJA3WMzp.js} +1 -1
- package/dist/client/assets/{CheckCircle-DG9pUM8a.js → CheckCircle-C0mDI2jO.js} +1 -1
- package/dist/client/assets/{ChevronDown-CWnE_Wmz.js → ChevronDown-Cz82ih9S.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-ByCpNum0.js → ChevronSelectorVertical-B_wf9OPd.js} +1 -1
- package/dist/client/assets/{ChevronUp-C_rAiuf1.js → ChevronUp-CLsy4_cr.js} +1 -1
- package/dist/client/assets/{CreditCard01-C6eDo3p0.js → CreditCard01-C7XdJQOf.js} +1 -1
- package/dist/client/assets/{Eye-DFeDq2Hx.js → Eye-BoMcImel.js} +1 -1
- package/dist/client/assets/{File02-R0RW2VCN.js → File02-BmbcQ1JX.js} +1 -1
- package/dist/client/assets/{Fingerprint04-D-EFj_6a.js → Fingerprint04-CeWGcIpe.js} +1 -1
- package/dist/client/assets/{Globe04-DudUQgTy.js → Globe04-_51WnfFJ.js} +1 -1
- package/dist/client/assets/{Image01-Dfaw0Ysf.js → Image01-nL5rafgN.js} +1 -1
- package/dist/client/assets/{Key01-9JQCF719.js → Key01-DPEcpDw6.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B-cVGLzN.js → LayoutLeft-DFrTynS3.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CpDM6pG5.js → LinkBroken01-BPaKcMJ1.js} +1 -1
- package/dist/client/assets/{MessageCircle01-44De_8cO.js → MessageCircle01-DEwhGd-N.js} +1 -1
- package/dist/client/assets/{Minus-09UkIbMe.js → Minus-CZtTY14n.js} +1 -1
- package/dist/client/assets/{Monitor01-BPQw3JGv.js → Monitor01-Dzk9r8YI.js} +1 -1
- package/dist/client/assets/{Play-BRDYCYl7.js → Play-BNkIfSsq.js} +1 -1
- package/dist/client/assets/{Plus-BJfG2DpW.js → Plus-WQeLSh07.js} +1 -1
- package/dist/client/assets/{ReferenceLine-KUFosDOj.js → ReferenceLine-Kl_nxn9t.js} +1 -1
- package/dist/client/assets/{SearchMd-DioGBYbO.js → SearchMd-CrM5HGUz.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CdQhBv_H.js → ShoppingBag01-Dvi8noNw.js} +1 -1
- package/dist/client/assets/{Sun-U7FHkItb.js → Sun-BUSaNVU-.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-sPBj-OL8.js → SwitchHorizontal01-HaaMuIs0.js} +1 -1
- package/dist/client/assets/{Tool01-BEo5XKkS.js → Tool01-9Nk8XcOI.js} +1 -1
- package/dist/client/assets/{Tooltip-2A3BALIx.js → Tooltip--i_yceGL.js} +1 -1
- package/dist/client/assets/{Trash01-l4iOtEBN.js → Trash01-By8obgKt.js} +1 -1
- package/dist/client/assets/{TrendUp01-aviiZW6M.js → TrendUp01-D-BYwryf.js} +1 -1
- package/dist/client/assets/{Upload01-BhvyPM8u.js → Upload01-BPnZnmHF.js} +1 -1
- package/dist/client/assets/{UserCheck01-B1rJ65So.js → UserCheck01-CuByTN5F.js} +1 -1
- package/dist/client/assets/{UserSquare-D44lppb_.js → UserSquare-T90Jaoc-.js} +1 -1
- package/dist/client/assets/{Users01-CxQycal6.js → Users01-D1-vaLa3.js} +1 -1
- package/dist/client/assets/{XClose-BwokcWjs.js → XClose-Bomoew3H.js} +1 -1
- package/dist/client/assets/{Zap-DoXbwvKP.js → Zap-lo-lOcPp.js} +1 -1
- package/dist/client/assets/{access-gate-Cb6wrWbo.js → access-gate-D9gT0mCZ.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-AJ93ohYz.js → add-connection-dialog-Bn6L9Ywx.js} +1 -1
- package/dist/client/assets/agent-app-BBl0rE0n.js +1 -0
- package/dist/client/assets/{agent-assets-BjERacII.js → agent-assets-BLuZ1J0l.js} +1 -1
- package/dist/client/assets/{agent-automation-lPIiQ1-S.js → agent-automation-C0jF6GoO.js} +1 -1
- package/dist/client/assets/{agent-automations-DChAwthU.js → agent-automations-CIknlYgn.js} +1 -1
- package/dist/client/assets/agent-blog-Dz0ZGfFq.js +2 -0
- package/dist/client/assets/agent-blog-post-r0FRVJ6G.js +2 -0
- package/dist/client/assets/{agent-calendar-DVTbFVx4.js → agent-calendar-eiAtEeXX.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CJLhsDjp.js → agent-capabilities-DWZ6HVp_.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BUkRDeee.js → agent-connect-sources-tGjfqQgF.js} +1 -1
- package/dist/client/assets/agent-deck-Bhm8TGFo.js +1 -0
- package/dist/client/assets/{agent-e2e-DBAmX-ay.js → agent-e2e-ba5rV3St.js} +1 -1
- package/dist/client/assets/agent-experiments-D8dPEPBA.js +1 -0
- package/dist/client/assets/agent-file-n_x6LXzO.js +1 -0
- package/dist/client/assets/{agent-hosting-KJs4AVma.js → agent-hosting-D6vOkjJV.js} +1 -1
- package/dist/client/assets/{agent-icon-BS6RPQ_A.js → agent-icon-zvo6Zsex.js} +1 -1
- package/dist/client/assets/agent-library-BM2Fah9h.js +1 -0
- package/dist/client/assets/agent-library-file-BO40iakQ.js +1 -0
- package/dist/client/assets/agent-overview-CJRKK7hh.js +1 -0
- package/dist/client/assets/{agent-releases-BwIrRp2G.js → agent-releases-CjP_903O.js} +1 -1
- package/dist/client/assets/agent-settings-CE2XV9z9.js +1 -0
- package/dist/client/assets/{agent-site-editor-CyUzqfPD.js → agent-site-editor-CRCOwi7y.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-1w7lcxGQ.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BU4N-bBf.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-D9XYlGea.js +1 -0
- package/dist/client/assets/agent-view-B4jYgL5h.js +1 -0
- package/dist/client/assets/{agent-view-guard-dXJW4cSq.js → agent-view-guard-DupPwYUR.js} +1 -1
- package/dist/client/assets/{ai-providers-CoJXv_AA.js → ai-providers-P9lSOFin.js} +1 -1
- package/dist/client/assets/{alert-hKxZXEZZ.js → alert-QfzOpdUg.js} +1 -1
- package/dist/client/assets/{analytics-sections-D8qsQ7bM.js → analytics-sections-at8BigEj.js} +1 -1
- package/dist/client/assets/api-keys-BoLbPekZ.js +1 -0
- package/dist/client/assets/{api-keys-BpcBSUmB.js → api-keys-yj-YvHdL.js} +1 -1
- package/dist/client/assets/app-editor-CALR-Eh0.js +1 -0
- package/dist/client/assets/{asset-utils-CdU3Ttfs.js → asset-utils-BDYUvtkF.js} +1 -1
- package/dist/client/assets/{auth-C3yWOKhG.js → auth--2gxCib9.js} +1 -1
- package/dist/client/assets/{auth-catchall-DheSxLuf.js → auth-catchall-BwHg1hCN.js} +1 -1
- package/dist/client/assets/{auth-entry-C5exDM0H.js → auth-entry-8MjIvWkA.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Hg6hlPX8.js → auth-split-layout-DP2m0wm-.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CIyQIb0N.js → authenticate-and-persist-oauth-GGQFCWKI.js} +1 -1
- package/dist/client/assets/{automation-list-row-BYtaYJm7.js → automation-list-row-BJoBOS8m.js} +1 -1
- package/dist/client/assets/{automation-runs-DvuKFaor.js → automation-runs-ComF4nUM.js} +1 -1
- package/dist/client/assets/{automations-D70iF6cO.js → automations-C5fxNUIr.js} +1 -1
- package/dist/client/assets/{badge-wWozseh3.js → badge-Di6qp_17.js} +1 -1
- package/dist/client/assets/{block-document-CQOXOWIP.js → block-document-D7KablrH.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-BmhSK0mg.js → blocks-preview-workspace-context-JYcUL0TS.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CDYT4Ypi.js → blocks-tab-states-D8VyxdkW.js} +1 -1
- package/dist/client/assets/blog-preview-url-DwcMPB8a.js +1 -0
- package/dist/client/assets/blog-schema-Dhm1FJA9.js +1 -0
- package/dist/client/assets/blog-source-gate-B93Jk1n3.js +1 -0
- package/dist/client/assets/{blog-view-gate-WETs9z4-.js → blog-view-gate-BDjHkxlS.js} +1 -1
- package/dist/client/assets/{buckets-BcxYNwzK.js → buckets-DAeP-NAt.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BpGLSKmi.js → build-improve-prompt-doc-WLZ-Q0Fx.js} +1 -1
- package/dist/client/assets/{calendar-Sr3cNZGh.js → calendar-CqkLsAo9.js} +1 -1
- package/dist/client/assets/{capability-load-error-Cwe4uK-x.js → capability-load-error-j4JpxktV.js} +1 -1
- package/dist/client/assets/category-editor-BblvA1zP.js +1 -0
- package/dist/client/assets/category-tree-DSsAlLjn.js +18 -0
- package/dist/client/assets/{chart-D0It11Pz.js → chart-BZy9kWyI.js} +1 -1
- package/dist/client/assets/{chat-context-B6UvvRRf.js → chat-context-CxkYg5uT.js} +1 -1
- package/dist/client/assets/{chat-draft-D0WJnhz_.js → chat-draft-DzaoNZT_.js} +1 -1
- package/dist/client/assets/{checkbox-Cs2Li62P.js → checkbox-C-dWRGEo.js} +1 -1
- package/dist/client/assets/{choose-editor-Cwvr5cPX.js → choose-editor-DS4c61th.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DjQMGZUD.js → cli-auth-success-DV77yJjs.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DaqJeGro.js +1 -0
- package/dist/client/assets/{cms-store-drafts-DDk2L1_s.js → cms-store-drafts-5dkWWhlw.js} +1 -1
- package/dist/client/assets/{collapsible-D4n-ssmc.js → collapsible-BSD-rIyq.js} +1 -1
- package/dist/client/assets/{collection-detail-CWZme-FJ.js → collection-detail-wkxjhC55.js} +1 -1
- package/dist/client/assets/{collection-display-button--oxelZ8R.js → collection-display-button-JBmYQ-27.js} +1 -1
- package/dist/client/assets/{collection-search-CDDauqCr.js → collection-search-BpNjeFlC.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B8osPBIm.js → collection-table-wrapper-BmrrNnjL.js} +1 -1
- package/dist/client/assets/{collection-tabs-B1EmRyNS.js → collection-tabs-CmuugrOY.js} +1 -1
- package/dist/client/assets/{combobox-LL4GsRoi.js → combobox-D_fSr7_C.js} +1 -1
- package/dist/client/assets/{command-DQwD4jPt.js → command-CwP4XJhp.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-aZ0yAV9m.js → companion-mcps-section-CG0lncr5.js} +1 -1
- package/dist/client/assets/{config-zmlExYow.js → config-4NBdyaeh.js} +1 -1
- package/dist/client/assets/{connect-C2FkNxOj.js → connect-ChCcHtpb.js} +1 -1
- package/dist/client/assets/{connect-key-MUQgzDUZ.js → connect-key-CJ6TvBP8.js} +1 -1
- package/dist/client/assets/{connect-layout-C10vBM31.js → connect-layout-DTpwfpPI.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DZFw66w3.js → connect-source-dialog-_ChBZ2Vd.js} +1 -1
- package/dist/client/assets/{connection-B7vXPxEB.js → connection-DezKWiQc.js} +1 -1
- package/dist/client/assets/{connection-card-DqrVYaVF.js → connection-card-CxiJ1Nzx.js} +1 -1
- package/dist/client/assets/{connection-detail-BhmikSW0.js → connection-detail-CYCmhAUL.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CipIPASt.js → connection-form-helpers-UXeTmEmu.js} +1 -1
- package/dist/client/assets/{connection-slug-DgGnB6qk.js → connection-slug-DWaKdRBx.js} +1 -1
- package/dist/client/assets/{connections-BH6dclGQ.js → connections-Bc9bEkOC.js} +1 -1
- package/dist/client/assets/{content-tab-CMouaD3S.js → content-tab-ChWZ09d_.js} +4 -4
- package/dist/client/assets/{context-BXIwVeKt.js → context-1XEBvNOV.js} +1 -1
- package/dist/client/assets/{context-menu-BTcjoIYF.js → context-menu-haKBWhFK.js} +1 -1
- package/dist/client/assets/{context-shell-Bh2U1zxs.js → context-shell-DApzBqkB.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-Dbp2Y7NH.js → create-organization-dialog-BXvqxw2I.js} +1 -1
- package/dist/client/assets/{daily-pulse-BiRUE30R.js → daily-pulse-Dpm7YKyw.js} +1 -1
- package/dist/client/assets/{delete-copy-BH5xrx9H.js → delete-copy-L_pixdww.js} +2 -2
- package/dist/client/assets/{device-hint-CMC1mr9e.js → device-hint-DfNddHqx.js} +1 -1
- package/dist/client/assets/{discover-DN_s50Be.js → discover-CDF3_FOL.js} +1 -1
- package/dist/client/assets/{domain-settings-DBexbsXu.js → domain-settings-SR0-GydA.js} +1 -1
- package/dist/client/assets/{drawer-BMY0wk6r.js → drawer-CmJXwXhP.js} +1 -1
- package/dist/client/assets/{editor-classes-BygI_Lvg.js → editor-classes-C_k7lpha.js} +1 -1
- package/dist/client/assets/{editor-C6mSxTrt.js → editor-stZYyxdg.js} +1 -1
- package/dist/client/assets/{empty-state-C4vGG4yC.js → empty-state-BP4JRDLR.js} +1 -1
- package/dist/client/assets/{empty-state-hp9a4BQn.js → empty-state-DlNabApi.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-a808JseX.js → experiments-tab-choice-DZp7Pnbi.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B_eUCQ7e.js → extract-connection-data-CzqnFJl9.js} +1 -1
- package/dist/client/assets/{feature-gate-DtqeHOu4.js → feature-gate-C_eiJnqB.js} +1 -1
- package/dist/client/assets/{feature-paywall-BGOy9Z00.js → feature-paywall-CBOn7yV2.js} +1 -1
- package/dist/client/assets/{file-explorer-q1C_0Dfl.js → file-explorer-BrZ-CG01.js} +1 -1
- package/dist/client/assets/{file-preview-Cid_-Y34.js → file-preview-PTP8hmPn.js} +1 -1
- package/dist/client/assets/{file-share-button-eK3lxbyf.js → file-share-button-BegoNidK.js} +1 -1
- package/dist/client/assets/{file-type-icon-DOJ02s9h.js → file-type-icon-M87xyG0K.js} +1 -1
- package/dist/client/assets/{folder-icon-4Pb3O8qn.js → folder-icon-Dcx7O7hC.js} +1 -1
- package/dist/client/assets/{form-BZ2nSi_9.js → form-CJTkS9yd.js} +1 -1
- package/dist/client/assets/{frame-navigation-C3j5rPCM.js → frame-navigation-BZ8W_2dq.js} +1 -1
- package/dist/client/assets/{gateway-client-8UpI_Rdq.js → gateway-client-zPU6BhGI.js} +1 -1
- package/dist/client/assets/{general-bkCbo1TA.js → general-CvWpV1rC.js} +1 -1
- package/dist/client/assets/{github-icon-C-V2EETw.js → github-icon-D3IlXxDN.js} +1 -1
- package/dist/client/assets/{held-block-view-xCVzC3Lr.js → held-block-view-CEue5DyE.js} +1 -1
- package/dist/client/assets/{home-Dgh1Wb3u.js → home-CBhOYnUz.js} +1 -1
- package/dist/client/assets/{home-overview-CzbNLHJq.js → home-overview-nMDmkNSh.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DS6ZmO5s.js → hosted-reconcile-CC64pDxA.js} +1 -1
- package/dist/client/assets/{icon-button-CFamiizZ.js → icon-button-C9InOUgM.js} +1 -1
- package/dist/client/assets/{index-B4YS6GMo.js → index-B6vsr4i3.js} +1 -1
- package/dist/client/assets/{index-BFjuxezw.js → index-B8ZkvDME.js} +1 -1
- package/dist/client/assets/{index-GMDFirHC.js → index-BIBRRoOW.js} +1 -1
- package/dist/client/assets/{index-CqlRRF6p.js → index-BPvzZzln.js} +1 -1
- package/dist/client/assets/{index-6V91lP75.js → index-C-bUN66r.js} +1 -1
- package/dist/client/assets/{index-CJQHYkKb.js → index-CY-w4kYr.js} +1 -1
- package/dist/client/assets/{index-B9tCllzH.js → index-Cdf0nHrK.js} +1 -1
- package/dist/client/assets/{index-DwIomefI.js → index-CiG92g6c.js} +1 -1
- package/dist/client/assets/{index-D_u7RJfU.js → index-CnFOA69K.js} +1 -1
- package/dist/client/assets/{index-BesTmknq.js → index-CyK1A-PV.js} +1 -1
- package/dist/client/assets/{index-D9WtqDmJ.js → index-D2FJssDQ.js} +1 -1
- package/dist/client/assets/{index-B-PIhH8l.js → index-Dy0Aphio.js} +1 -1
- package/dist/client/assets/{index-BYQu9U5P.js → index-OaQ5Wven.js} +1 -1
- package/dist/client/assets/{index-cjnTxfp5.js → index-g0fJQ3Ik.js} +1 -1
- package/dist/client/assets/{index-BeSn1lKu.js → index-hl8iFWLs.js} +1 -1
- package/dist/client/assets/{index--r4E_gW7.js → index-kPKwu4SB.js} +1 -1
- package/dist/client/assets/{index-BVZH8mqe.js → index-mb-jxjEy.js} +6 -6
- package/dist/client/assets/{index-redirect-BMGe_utm.js → index-redirect-Cc2j63PQ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-f5kG4cIT.js → infiniteQueryObserver-Dfcni9SV.js} +1 -1
- package/dist/client/assets/{infra-billing-DaAfhBWg.js → infra-billing-BYZXmRJD.js} +1 -1
- package/dist/client/assets/{input-o0eNZBV4.js → input-BUC-cGry.js} +3 -3
- package/dist/client/assets/{input-A20A_mwu.js → input-DjfzIqsk.js} +1 -1
- package/dist/client/assets/{integration-icon-CcV5frEs.js → integration-icon-DRbGJhQo.js} +1 -1
- package/dist/client/assets/item-actions-CDU7n7Cr.js +1 -0
- package/dist/client/assets/{jira-icon-DlgPbK3F.js → jira-icon-DdgjDC_T.js} +1 -1
- package/dist/client/assets/{label-Dc_tSb6f.js → label-DFYaZzfV.js} +1 -1
- package/dist/client/assets/{layout-514nGx9I.js → layout-C1ShA0A2.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DtYrilLw.js → legacy-admin-welcome-dialog-C0rLwEhl.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DS7wnjib.js → legacy-agents-deep-0KD5AZ-a.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BQ-dfJNU.js → legacy-main-redirect-DsJJQAHz.js} +1 -1
- package/dist/client/assets/library-DKYFm9Uv.js +1 -0
- package/dist/client/assets/{library-tab-CZB0EHNl.js → library-tab-BttdbOwT.js} +1 -1
- package/dist/client/assets/{login-BVGV6SaO.js → login-DkrQRBM-.js} +1 -1
- package/dist/client/assets/{markdown-DvUyMKlV.js → markdown-B-EQMrBl.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CRu4PbUr.js → mcp-app-renderer-B8_THT37.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CIY9YLWi.js → mcp-oauth-Cya-fh0P.js} +1 -1
- package/dist/client/assets/{mcp-oauth-NdGb5Zj9.js → mcp-oauth-_iPR8QjI.js} +1 -1
- package/dist/client/assets/{members-CgoGmOSR.js → members-BVOPoO_W.js} +1 -1
- package/dist/client/assets/{memory-BfzundeZ.js → memory-C23hLBrZ.js} +1 -1
- package/dist/client/assets/{mock-board-D8DOoo_p.js → mock-board-BcZu24PK.js} +3 -3
- package/dist/client/assets/{monaco-editor-C3D0iT4a.js → monaco-editor-DttATUsj.js} +1 -1
- package/dist/client/assets/{monitoring-BvN0RJq0.js → monitoring-CLDBgSzo.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-By2SXcyl.js → monitoring-stats-row-CRxmylqh.js} +1 -1
- package/dist/client/assets/{multi-select-Dak9eW6K.js → multi-select-CSOG3KaA.js} +1 -1
- package/dist/client/assets/{mustache-CMgVEDUc.js → mustache-clchl4ci.js} +1 -1
- package/dist/client/assets/{named-rule-step-BnN-hlGb.js → named-rule-step-C-_N0SXT.js} +1 -1
- package/dist/client/assets/{named-rule-view-hUwolemN.js → named-rule-view-DrUf_Aau.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BeD2i_Hm.js → new-project-dialog-KtG8l1yi.js} +1 -1
- package/dist/client/assets/{new-project-store-BfrY24D-.js → new-project-store-DDZH8miu.js} +1 -1
- package/dist/client/assets/{oauth-callback-CNqxDLu3.js → oauth-callback-B-J4rjBS.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-0KF_xg3k.js → oauth-callback-ai-provider-DCheihxt.js} +1 -1
- package/dist/client/assets/{oauth-consent-li4JOhlZ.js → oauth-consent-P6jhSz87.js} +1 -1
- package/dist/client/assets/{onboarding-CzP4oXTn.js → onboarding-BoQQb_DJ.js} +1 -1
- package/dist/client/assets/{openai-conversation-BMsTp1zg.js → openai-conversation-BRIcN7ns.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-C29BxST1.js → optimistic-project-sidebar-views-BhBXjk9R.js} +1 -1
- package/dist/client/assets/{order-monitor-day-D910WxJ3.js → order-monitor-day-DEr2FQ1w.js} +1 -1
- package/dist/client/assets/{organization-choice-BhMXPFKX.js → organization-choice-NHrCNKHD.js} +1 -1
- package/dist/client/assets/{orgs-ZZqk-o74.js → orgs-oDKfi1NH.js} +1 -1
- package/dist/client/assets/{own-accounts-section-4_Hp7fJv.js → own-accounts-section-DfQklfiL.js} +1 -1
- package/dist/client/assets/{pair-C4tumP78.js → pair-CI1Rts6X.js} +1 -1
- package/dist/client/assets/{parse-sections-B5REiM5j.js → parse-sections-Cv7KSMgB.js} +3 -3
- package/dist/client/assets/{plan-vUNQzJtH.js → plan-DhBEXV7d.js} +1 -1
- package/dist/client/assets/{plan-ladder-BlcJL4hV.js → plan-ladder-Dn1mCpkd.js} +1 -1
- package/dist/client/assets/{plan-usage-card-DW3wLLQF.js → plan-usage-card-CoidaM8B.js} +1 -1
- package/dist/client/assets/{popover-9q-VKuQx.js → popover-D73VbCM5.js} +1 -1
- package/dist/client/assets/post-calendar-bB_dTysf.js +1 -0
- package/dist/client/assets/{post-editor-BUxXB6Uz.js → post-editor-DJgKYRYW.js} +2 -2
- package/dist/client/assets/{preview-content-aN9ghsH_.js → preview-content-g2WEpueQ.js} +1 -1
- package/dist/client/assets/{preview-dialog-DqNYRBay.js → preview-dialog-DEGn7q2O.js} +1 -1
- package/dist/client/assets/{preview-panel-DV1FaRUZ.js → preview-panel-BWh6T2ND.js} +1 -1
- package/dist/client/assets/preview-tab-BFrQickY.js +557 -0
- package/dist/client/assets/primitives-BHTaKbue.js +1 -0
- package/dist/client/assets/{product-picker-dialog-DVs_Kuee.js → product-picker-dialog-B1FnNY41.js} +1 -1
- package/dist/client/assets/{profile-DbdvfkDI.js → profile-KHrko28l.js} +1 -1
- package/dist/client/assets/{project-app-view-Cfrp6muY.js → project-app-view-CEsZ7pyQ.js} +1 -1
- package/dist/client/assets/{project-apps-z0dBtbP_.js → project-apps-BFfwYw5p.js} +1 -1
- package/dist/client/assets/{project-icon-C8Sq9Uyo.js → project-icon-Bl4IAncl.js} +1 -1
- package/dist/client/assets/{project-index-BOyydKXT.js → project-index-DyqPLhTf.js} +1 -1
- package/dist/client/assets/project-reports-Bo9Tf1zF.js +1 -0
- package/dist/client/assets/project-tasks-t-YvuQ_q.js +1 -0
- package/dist/client/assets/{projects-B5BvS56N.js → projects-D4oIfDMZ.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CDTj5tcd.js → projects-empty-state-PFeDurZg.js} +1 -1
- package/dist/client/assets/{prompts-DfS9pOYH.js → prompts-TmqmoJme.js} +1 -1
- package/dist/client/assets/record-editor-WmiU2d6T.js +1 -0
- package/dist/client/assets/redirect-editor-BlBcxP_z.js +1 -0
- package/dist/client/assets/reports-Cb0Mwz-u.js +1 -0
- package/dist/client/assets/{reports-C624VFLj.js → reports-DxGhEr3Y.js} +1 -1
- package/dist/client/assets/{reports-onboarding-_pxt1WkF.js → reports-onboarding-CM7YPxA7.js} +1 -1
- package/dist/client/assets/{reports-tab-BBmHq9vJ.js → reports-tab-DLrLzkx3.js} +2 -2
- package/dist/client/assets/{repositories-B7d9yCxo.js → repositories-67wiZj2r.js} +1 -1
- package/dist/client/assets/repositories-CDNeFlHK.js +1 -0
- package/dist/client/assets/{repository-binding-BIfwJXBl.js → repository-binding-w-FCDYuS.js} +1 -1
- package/dist/client/assets/{repository-picker-vN0XhyKR.js → repository-picker-DF0-TGsg.js} +1 -1
- package/dist/client/assets/{require-capability-B6_v4BKo.js → require-capability-7Xn2Fb3C.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BXbkUsYd.js → required-auth-layout-B1owCwtw.js} +1 -1
- package/dist/client/assets/{reset-password-DPvgQ5Qd.js → reset-password-BvZRYC01.js} +1 -1
- package/dist/client/assets/{resizable-AytQ6SyX.js → resizable-CJbr1Nyi.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BzV0wsYq.js → resolve-tab-icon-3aZJM1BR.js} +1 -1
- package/dist/client/assets/{review-settings-BTg5QElS.js → review-settings-CISstknV.js} +1 -1
- package/dist/client/assets/{role-color-CNGxunw8.js → role-color-CW1lGNZj.js} +1 -1
- package/dist/client/assets/{roles-DrWSfOhb.js → roles-D7rYnEMh.js} +1 -1
- package/dist/client/assets/route-CFBPrBcw.js +1 -0
- package/dist/client/assets/{route-BX1VK4D8.js → route-CPaIZZ88.js} +1 -1
- package/dist/client/assets/{route-IYkPM4iL.js → route-CT0-z-8-.js} +1 -1
- package/dist/client/assets/{route-page-header-DnxbH76I.js → route-page-header-CRzmHOKm.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-CvJPOlyv.js → sandbox-git-api-1xYJwdHB.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CO9pd80k.js → sandbox-lifecycle-context-CxRkhFod.js} +1 -1
- package/dist/client/assets/{save-status-eUv6TQpr.js → save-status-Csuo4rYY.js} +1 -1
- package/dist/client/assets/{schema-C2ft4i4u.js → schema-BluyjH2z.js} +1 -1
- package/dist/client/assets/{schema-CATZG76m.js → schema-DU3GC-Ez.js} +1 -1
- package/dist/client/assets/{scroll-area-w9_Bvwmf.js → scroll-area-D9mVov2B.js} +1 -1
- package/dist/client/assets/{search-input-D3b0Dc5Y.js → search-input-D-gp-h4P.js} +1 -1
- package/dist/client/assets/{search-toggle-DBEAkZhz.js → search-toggle-C1j-Ki1u.js} +1 -1
- package/dist/client/assets/{secret-picker-CVfi84wZ.js → secret-picker-BoQX39kK.js} +1 -1
- package/dist/client/assets/{secrets-Bxh8ZQN1.js → secrets-BZwPjTxC.js} +1 -1
- package/dist/client/assets/section-array-field-4siTAXTX.js +1 -0
- package/dist/client/assets/{sections-BS4WKjIk.js → sections-Cwqt7k6K.js} +1 -1
- package/dist/client/assets/sections-editor-B2wYNbjz.js +1 -0
- package/dist/client/assets/{select-BJ7g3jt1.js → select-DnlDCB9E.js} +1 -1
- package/dist/client/assets/{select-model-CIoiyBbQ.js → select-model-Cm1Kbu8h.js} +1 -1
- package/dist/client/assets/seo-editor-DbLTH9Vw.js +1 -0
- package/dist/client/assets/{separator-DUnD5wBI.js → separator-DsSANYB0.js} +1 -1
- package/dist/client/assets/{session-runtime-CRv5j4jh.js → session-runtime-D2GKulko.js} +1 -1
- package/dist/client/assets/settings-tab-CSzHYez6.js +1 -0
- package/dist/client/assets/{sheet-B1zTFenO.js → sheet-Ctckoytn.js} +1 -1
- package/dist/client/assets/{shell-layout-BT6RZJ9X.js → shell-layout-BS_Y65pV.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BhvNLFOt.js → site-draft-actions-BZf0yVqo.js} +1 -1
- package/dist/client/assets/{site-draft-view-D89p35uK.js → site-draft-view-NypTEK1x.js} +1 -1
- package/dist/client/assets/site-editor-BbPLQWC_.js +1 -0
- package/dist/client/assets/{site-editor-toast-vvVLBG6s.js → site-editor-toast-DfzFv4iY.js} +1 -1
- package/dist/client/assets/{skills-C22XOkU8.js → skills-2_Ugx28k.js} +1 -1
- package/dist/client/assets/{slider-46E0vJw8.js → slider-Bqy5W8RM.js} +1 -1
- package/dist/client/assets/{sortable.esm-BzU9NXcP.js → sortable.esm-Cl-YQgc8.js} +1 -1
- package/dist/client/assets/{sso-zNrVMXEh.js → sso-CdbJh-Eu.js} +1 -1
- package/dist/client/assets/{suggestion-B9N6oqkG.js → suggestion-BoV2NIg6.js} +1 -1
- package/dist/client/assets/{super-agent-icon-AyK0wzxQ.js → super-agent-icon-CDA5EiNS.js} +1 -1
- package/dist/client/assets/{switch-BX8b8tB6.js → switch--3C-A5oU.js} +1 -1
- package/dist/client/assets/{synced-repos-DS_Rsdst.js → synced-repos-BpiKoBMD.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DpR7ri7q.js → tab-icon-glyph-CEoTzCNL.js} +1 -1
- package/dist/client/assets/{table-DNvSx4nT.js → table-Cy5fo0ER.js} +1 -1
- package/dist/client/assets/{tabs-ClkuSww4.js → tabs-DJ6SkMve.js} +1 -1
- package/dist/client/assets/{task-board-DLNmAHmR.js → task-board-CShHcm1L.js} +1 -1
- package/dist/client/assets/{task-key-BjUMQvHV.js → task-key-BP2--GY6.js} +1 -1
- package/dist/client/assets/{task-route-B6gZ9LxC.js → task-route-BDNP9yC7.js} +1 -1
- package/dist/client/assets/{task-status-CvKutQFi.js → task-status-GPS8HLw1.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BgegxTfw.js → taskboard-analytics-DPlKE9oq.js} +1 -1
- package/dist/client/assets/tasks-Coh8-0jv.js +1 -0
- package/dist/client/assets/{tasks-VtqJyf5J.js → tasks-DQ5zrDt3.js} +1 -1
- package/dist/client/assets/{textarea-BnYcD_gb.js → textarea-BCGFjA5F.js} +1 -1
- package/dist/client/assets/{thread-analytics-CHgBpfHv.js → thread-analytics-B5IqH-5A.js} +1 -1
- package/dist/client/assets/{thread-button-Cra7mRSW.js → thread-button-Dw70OEJl.js} +1 -1
- package/dist/client/assets/{thread-intent-CYNXEfHP.js → thread-intent-BQWCtBA_.js} +1 -1
- package/dist/client/assets/{thread-route-muzc431X.js → thread-route-DRsKlO-E.js} +1 -1
- package/dist/client/assets/{thread-route-D00Shirq.js → thread-route-Dix8r-rB.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-B4d3KSH7.js → thread-sheet-body-iwOtv26B.js} +1 -1
- package/dist/client/assets/{time-range-picker-BzLGuV9Q.js → time-range-picker-CUAzqD4s.js} +1 -1
- package/dist/client/assets/{toggle-group-Cu3LE1oL.js → toggle-group-jkikwCcL.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DpIP2fev.js → tool-set-selector-Clh56c6v.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bo8OSaqx.js → toolbar-icon-button-DcIFSTOI.js} +1 -1
- package/dist/client/assets/{tooltip-CfeBMv8z.js → tooltip-DCzbfwd7.js} +1 -1
- package/dist/client/assets/{tooltipContext-BMU8k-Rs.js → tooltipContext-2wUW4UR-.js} +1 -1
- package/dist/client/assets/{track-DWmwuKVj.js → track-D4IkVAbh.js} +1 -1
- package/dist/client/assets/{types-D_vNw-3-.js → types-BQYXFpO6.js} +1 -1
- package/dist/client/assets/{url-slug-BOPVIawN.js → url-slug-E3otz4_J.js} +1 -1
- package/dist/client/assets/{usage-stats-Dzci2XGy.js → usage-stats-CiB8uQLm.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C30oeluP.js → use-ai-providers-CTbi7eSd.js} +1 -1
- package/dist/client/assets/{use-api-keys-CK1ZH-th.js → use-api-keys-CuxnpyDB.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DGYGOn-1.js → use-apply-named-rule-BroFciug.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-vlpFfAp7.js +1 -0
- package/dist/client/assets/{use-automations-CtbjaE6m.js → use-automations-BdniAcmH.js} +1 -1
- package/dist/client/assets/{use-autosave-Bpr4B2YO.js → use-autosave-C9MsBAi1.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BloQ91Xb.js +1 -0
- package/dist/client/assets/use-blog-view-Bi3aoju6.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DBVzfsNg.js → use-chat-layout-state-77HNlix_.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CWkUAckV.js → use-cms-publish-actions-DGO40mZ2.js} +1 -1
- package/dist/client/assets/{use-connect-companion-iGJRty2G.js → use-connect-companion-BkEQhdBC.js} +1 -1
- package/dist/client/assets/{use-connection-C-m8b2Fk.js → use-connection-DxwzNo03.js} +1 -1
- package/dist/client/assets/{use-content-sync-BJ7PE3PC.js → use-content-sync-C9H2kDwl.js} +1 -1
- package/dist/client/assets/{use-copy-BHPkBnZF.js → use-copy-DSNmvH9L.js} +1 -1
- package/dist/client/assets/{use-current-view-CHhVzMwk.js → use-current-view-DvszbK0Z.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Cn791fqZ.js → use-date-fns-locale-BSsydU_s.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C6OCZte6.js → use-debounced-autosave-D6iRm-Vv.js} +1 -1
- package/dist/client/assets/{use-debounced-value-By7KggQt.js → use-debounced-value-CAOKwJaL.js} +1 -1
- package/dist/client/assets/{use-deco-credits-19cW8oHb.js → use-deco-credits-DnZKzVHP.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BxfGa0_j.js → use-decopilot-events-BhcT5RAV.js} +1 -1
- package/dist/client/assets/{use-delete-block-3AD9rKWc.js → use-delete-block-Bd0Db3-p.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Cma0d5Z7.js → use-delete-connection-BMDl_PP-.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-COmgwPUq.js → use-deployment-admin-DCWHLNad.js} +1 -1
- package/dist/client/assets/{use-entitlements-B8D7pawV.js → use-entitlements-CzwT7L5B.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BQhDGlp9.js → use-fast-preview-draft-url-DbEjmD3f.js} +1 -1
- package/dist/client/assets/{use-file-configs-CCo70YSN.js → use-file-configs-yKe4yLHn.js} +1 -1
- package/dist/client/assets/{use-id-selection-BOT74h8X.js → use-id-selection-DmcvY3GI.js} +1 -1
- package/dist/client/assets/{use-in-settings-qQ2sbeu5.js → use-in-settings-BTBVzmbg.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CIBoyRh8.js → use-inbox-feed-BOy7gIMv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Ct_PbHT3.js → use-infinite-scroll-DnhPBPks.js} +1 -1
- package/dist/client/assets/{use-join-requests-CbaI0xCz.js → use-join-requests-C0zVtdAh.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CPcNwsEn.js → use-main-panel-tabs-BCg6GLFm.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BfHI4tpd.js → use-mcp-auth-status-BZRJODR4.js} +1 -1
- package/dist/client/assets/{use-mcp-client-7NPwItGN.js → use-mcp-client-4k5JKqzF.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C7QHdaI_.js → use-mcp-prompts-pJuJ9yii.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DqnFukoV.js → use-mcp-tools-Dh4scI4V.js} +1 -1
- package/dist/client/assets/{use-mobile-5e0sSd3X.js → use-mobile-CBwmaBFU.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Cqt9Q8CZ.js → use-move-blocks-D8MFSTf7.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CtsEyeFb.js → use-navigate-to-agent-H87rWFYJ.js} +1 -1
- package/dist/client/assets/{use-never-published-BK3TeRer.js → use-never-published-Db-SviVk.js} +1 -1
- package/dist/client/assets/{use-org-fs-Cq9dcDh3.js → use-org-fs-CbXrwKDd.js} +1 -1
- package/dist/client/assets/{use-org-notice-Dvph2j3S.js → use-org-notice-BLDWm2ef.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CCuZhNZU.js → use-org-repo-syncs-BLfbsB0Y.js} +1 -1
- package/dist/client/assets/{use-org-sso-BKXSOEb_.js → use-org-sso-Cfy5SkJ5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BoOQOwrg.js → use-organization-settings-UrGbnM2k.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DPGDB1T1.js → use-panel-navigate-B5u6ws6M.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-SSp2DD_u.js → use-project-native-view-presence-Cww1Huve.js} +1 -1
- package/dist/client/assets/{use-project-scope-BIucgFKc.js → use-project-scope-Dydp2D08.js} +1 -1
- package/dist/client/assets/{use-recent-apps-4zSmjU-Q.js → use-recent-apps-B6ojF6fA.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DWL8tyP6.js → use-reports-diagnostic-EfyKTU1j.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-TxpzU2Iw.js → use-sandbox-events-DEHux0gs.js} +1 -1
- package/dist/client/assets/{use-secrets-CsCKmxLc.js → use-secrets-G3Yo5eAI.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BxFRvYUl.js → use-section-preview-base-C2ASOAPw.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DHFFs76T.js → use-sidebar-collapsed-DgMGLJyh.js} +1 -1
- package/dist/client/assets/{use-tags-aDaEeB96.js → use-tags-laGjgQqt.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-XXuDuH8s.js → use-task-board-analytics-Ct6FAXeB.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CLDgREI3.js → use-task-board-item-prs-BbVn1nYd.js} +1 -1
- package/dist/client/assets/{use-task-board-items-D4fdH47R.js → use-task-board-items-B_EMxvU9.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DRYQb2DR.js → use-task-board-prompts-CE2PVOHH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CSvrbSt0.js → use-task-metadata-L0GKyc-x.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CrNLjxTt.js → use-thread-outputs-B9502nWa.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BG3Ihm6n.js → use-view-draft-kind-CZT4hOaN.js} +1 -1
- package/dist/client/assets/{use-voice-input-BspgCDOI.js → use-voice-input-Nzha8Za1.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-FxnnBp9W.js +1 -0
- package/dist/client/assets/{useQueries-DGhxO9Ry.js → useQueries-CQ0xJF7W.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CtWAJlQZ.js +1 -0
- package/dist/client/assets/{users-CC1uXfIH.js → users-C_-sgV42.js} +1 -1
- package/dist/client/assets/{utils-JVZxV40b.js → utils-pe9cqItP.js} +1 -1
- package/dist/client/assets/{variant-calendar-COAsXla8.js → variant-calendar-d5m67-k3.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-Dm9kjKRy.js → variant-matcher-override-DoPQRIHU.js} +1 -1
- package/dist/client/assets/{view-header-d4Obd__T.js → view-header-B0xV_oWh.js} +1 -1
- package/dist/client/assets/{virtual-mcp-TQWeP4ry.js → virtual-mcp-DN6fu9Nf.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CWcYbOm5.js → watch-sse-pool-7J-tc7Ge.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BwabK-EN.js +0 -1
- package/dist/client/assets/agent-blog-BAFEHC3F.js +0 -2
- package/dist/client/assets/agent-blog-post-BfZLJHCc.js +0 -2
- package/dist/client/assets/agent-deck-FkIcljPu.js +0 -1
- package/dist/client/assets/agent-experiments-DDePdz1s.js +0 -1
- package/dist/client/assets/agent-file-Dq7RwOoN.js +0 -1
- package/dist/client/assets/agent-library-C06De_Om.js +0 -1
- package/dist/client/assets/agent-library-file-DZtwB2bP.js +0 -1
- package/dist/client/assets/agent-overview-3kq8I1YX.js +0 -1
- package/dist/client/assets/agent-settings-CQxH-SU4.js +0 -1
- package/dist/client/assets/agent-site-editor-code-lMnnKFV4.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BQ-pFVV_.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Dipnwf9A.js +0 -1
- package/dist/client/assets/agent-view-D74Nsx4n.js +0 -1
- package/dist/client/assets/api-keys-B9w3P2co.js +0 -1
- package/dist/client/assets/app-editor-DLwnlaqE.js +0 -1
- package/dist/client/assets/blog-preview-url-D1Gi50Jy.js +0 -1
- package/dist/client/assets/blog-schema-G_pvuSAo.js +0 -1
- package/dist/client/assets/blog-source-gate-Z08IMogx.js +0 -1
- package/dist/client/assets/category-editor-DZLdQENU.js +0 -1
- package/dist/client/assets/category-tree-oBVfCVRR.js +0 -4
- package/dist/client/assets/cms-settings-editor-h4wDmiSv.js +0 -1
- package/dist/client/assets/empty-message-B3ykEghT.js +0 -15
- package/dist/client/assets/item-actions-CZD9JeRy.js +0 -1
- package/dist/client/assets/library-Cy3CmAZa.js +0 -1
- package/dist/client/assets/post-calendar-Cw6GB31X.js +0 -1
- package/dist/client/assets/preview-tab-CNYeoSqY.js +0 -557
- package/dist/client/assets/project-reports-CN1JvK97.js +0 -1
- package/dist/client/assets/project-tasks-Cimkg6Js.js +0 -1
- package/dist/client/assets/record-editor-BC_pgxjj.js +0 -1
- package/dist/client/assets/redirect-editor-CJJivlqw.js +0 -1
- package/dist/client/assets/reports-BU9i6BvT.js +0 -1
- package/dist/client/assets/repositories-D-ngJeYU.js +0 -1
- package/dist/client/assets/route-DxNP7FKc.js +0 -1
- package/dist/client/assets/section-array-field-CkDPdYBe.js +0 -1
- package/dist/client/assets/sections-editor-CLaZ0j6X.js +0 -1
- package/dist/client/assets/seo-editor-C5CvtZIp.js +0 -1
- package/dist/client/assets/settings-tab-k_yzR7TC.js +0 -1
- package/dist/client/assets/site-editor-DO2-FIjd.js +0 -1
- package/dist/client/assets/tasks-BZlAEaTY.js +0 -1
- package/dist/client/assets/use-ask-in-chat-Cp6wJI2T.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-DUe21BCo.js +0 -1
- package/dist/client/assets/use-blog-view-D_--u8j_.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BJoJv4VQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BFQG7J82.js +0 -1
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-B2wYNbjz.js","assets/index-mb-jxjEy.js","assets/index-CFbcObvG.css","assets/chat-context-CxkYg5uT.js","assets/use-panel-navigate-B5u6ws6M.js","assets/thread-route-DRsKlO-E.js","assets/use-project-scope-Dydp2D08.js","assets/repository-binding-w-FCDYuS.js","assets/use-mcp-client-4k5JKqzF.js","assets/auth--2gxCib9.js","assets/use-view-draft-kind-CZT4hOaN.js","assets/use-blog-view-Bi3aoju6.js","assets/use-organization-settings-UrGbnM2k.js","assets/schema-BluyjH2z.js","assets/task-board-CShHcm1L.js","assets/thread-intent-BQWCtBA_.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-7J-tc7Ge.js","assets/session-runtime-D2GKulko.js","assets/use-entitlements-CzwT7L5B.js","assets/use-ai-providers-CTbi7eSd.js","assets/use-current-view-DvszbK0Z.js","assets/use-in-settings-BTBVzmbg.js","assets/use-decopilot-events-BhcT5RAV.js","assets/save-status-Csuo4rYY.js","assets/Image01-nL5rafgN.js","assets/Trash01-By8obgKt.js","assets/Upload01-BPnZnmHF.js","assets/use-never-published-Db-SviVk.js","assets/use-voice-input-Nzha8Za1.js","assets/popover-D73VbCM5.js","assets/drawer-CmJXwXhP.js","assets/tooltip-DCzbfwd7.js","assets/index-B8ZkvDME.js","assets/use-mobile-CBwmaBFU.js","assets/agent-icon-zvo6Zsex.js","assets/AlertCircle-CngNmW3n.js","assets/UserCheck01-CuByTN5F.js","assets/Tool01-9Nk8XcOI.js","assets/ArrowUp-C9hRfWJJ.js","assets/ArrowLeft-7wIIyF4Y.js","assets/ArrowRight-Dyuh-rXZ.js","assets/BookOpen01-Bov9QL4X.js","assets/Globe04-_51WnfFJ.js","assets/CheckCircle-C0mDI2jO.js","assets/TrendUp01-D-BYwryf.js","assets/ChevronDown-Cz82ih9S.js","assets/ChevronSelectorVertical-B_wf9OPd.js","assets/ChevronUp-CLsy4_cr.js","assets/UserSquare-T90Jaoc-.js","assets/LinkBroken01-BPaKcMJ1.js","assets/CreditCard01-C7XdJQOf.js","assets/File02-BmbcQ1JX.js","assets/MessageCircle01-DEwhGd-N.js","assets/SwitchHorizontal01-HaaMuIs0.js","assets/Eye-BoMcImel.js","assets/Fingerprint04-CeWGcIpe.js","assets/Key01-DPEcpDw6.js","assets/LayoutLeft-DFrTynS3.js","assets/Minus-CZtTY14n.js","assets/Monitor01-Dzk9r8YI.js","assets/Sun-BUSaNVU-.js","assets/Play-BNkIfSsq.js","assets/Plus-WQeLSh07.js","assets/SearchMd-CrM5HGUz.js","assets/ShoppingBag01-Dvi8noNw.js","assets/Users01-D1-vaLa3.js","assets/XClose-Bomoew3H.js","assets/Zap-lo-lOcPp.js","assets/index-BIBRRoOW.js","assets/checkbox-C-dWRGEo.js","assets/select-DnlDCB9E.js","assets/index-BdQq_4o_.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/site-editor-toast-DfzFv4iY.js","assets/use-sandbox-events-DEHux0gs.js","assets/sandbox-url-D3mC8qhT.js","assets/use-blocks-v8-project-BloQ91Xb.js","assets/utils-pe9cqItP.js","assets/sandbox-git-api-1xYJwdHB.js","assets/hosted-reconcile-CC64pDxA.js","assets/blocks-tab-states-D8VyxdkW.js","assets/empty-state-DlNabApi.js","assets/search-input-D-gp-h4P.js","assets/tabs-DJ6SkMve.js","assets/active-indicator-CCMhAsc_.js","assets/use-debounced-value-CAOKwJaL.js","assets/use-file-configs-yKe4yLHn.js","assets/asset-utils-BDYUvtkF.js","assets/useInfiniteQuery-FxnnBp9W.js","assets/infiniteQueryObserver-Dfcni9SV.js","assets/usage-stats-CiB8uQLm.js","assets/utils-CVEq3hMx.js","assets/markdown-B-EQMrBl.js","assets/use-copy-DSNmvH9L.js","assets/gateway-client-zPU6BhGI.js","assets/form-CJTkS9yd.js","assets/label-DFYaZzfV.js","assets/switch--3C-A5oU.js","assets/toggle-group-jkikwCcL.js","assets/match-site-slug-config-B47_xZCi.js","assets/parse-sections-Cv7KSMgB.js","assets/held-block-view-CEue5DyE.js","assets/calendar-CqkLsAo9.js","assets/textarea-BCGFjA5F.js","assets/editor-classes-C_k7lpha.js","assets/task-key-BP2--GY6.js","assets/sortable.esm-Cl-YQgc8.js","assets/category-tree-DSsAlLjn.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-CI1Rts6X.js","assets/collapsible-BSD-rIyq.js","assets/use-task-board-items-B_EMxvU9.js","assets/config-4NBdyaeh.js","assets/task-route-BDNP9yC7.js","assets/project-index-DyqPLhTf.js","assets/shell-layout-BS_Y65pV.js","assets/use-deployment-admin-DCWHLNad.js","assets/admin-fetch-BhTJlAsX.js","assets/use-org-notice-BLDWm2ef.js","assets/command-CwP4XJhp.js","assets/index-Dy0Aphio.js","assets/integration-icon-DRbGJhQo.js","assets/project-icon-Bl4IAncl.js","assets/use-navigate-to-agent-H87rWFYJ.js","assets/new-project-dialog-KtG8l1yi.js","assets/repository-picker-DF0-TGsg.js","assets/github-icon-D3IlXxDN.js","assets/collection-search-BpNjeFlC.js","assets/new-project-store-DDZH8miu.js","assets/legacy-admin-welcome-dialog-C0rLwEhl.js","assets/required-auth-layout-B1owCwtw.js","assets/use-org-sso-Cfy5SkJ5.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-B8_THT37.js","assets/types-BQYXFpO6.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/sheet-Ctckoytn.js","assets/use-connection-DxwzNo03.js","assets/use-mcp-prompts-pJuJ9yii.js","assets/use-thread-outputs-B9502nWa.js","assets/file-type-icon-M87xyG0K.js","assets/section-array-field-4siTAXTX.js","assets/named-rule-step-C-_N0SXT.js","assets/slider-Bqy5W8RM.js","assets/index-kPKwu4SB.js","assets/tooltipContext-2wUW4UR-.js","assets/CategoricalChart-BJA3WMzp.js","assets/index-OaQ5Wven.js","assets/combobox-D_fSr7_C.js","assets/scroll-area-D9mVov2B.js","assets/monaco-editor-DttATUsj.js","assets/editor-stZYyxdg.js","assets/use-delete-block-Bd0Db3-p.js","assets/use-section-preview-base-C2ASOAPw.js","assets/mustache-clchl4ci.js","assets/seo-editor-DbLTH9Vw.js","assets/use-apply-named-rule-BroFciug.js","assets/use-move-blocks-D8MFSTf7.js","assets/variant-matcher-override-DoPQRIHU.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as le,j as r,r as R,m as Re,b as Se,B as _e,aH as ps,bk as gt,aI as De,bl as ko,bm as So,bn as Po,bo as jo,v as Zs,D as en,K as tn,w as sn,x as nn,e as Eo,h as it,I as Hs,y as No,b8 as Co,a6 as gs,b7 as To,b5 as Gr,bp as gr,i as Jr,at as Vs,av as Ws,a9 as Yr,P as qs,E as Ro,t as ms,b6 as Lo,q as Ao}from"./index-mb-jxjEy.js";import{u as rn,N as Oo}from"./save-status-Csuo4rYY.js";import{b as _o,c as lt,r as Qr,l as Xr,f as $o,g as Fo,w as Do}from"./chat-context-CxkYg5uT.js";import{t as Bo}from"./ChevronDown-Cz82ih9S.js";import{G as Mo,H as zo,B as an,I as Io,b as Uo,J as vr,K as Ko,L as Zr,M as Ho,N as ea}from"./agent-icon-zvo6Zsex.js";import{s as Vo}from"./File02-BmbcQ1JX.js";import{a as Wo,n as qo}from"./UserSquare-T90Jaoc-.js";import{s as ta}from"./Plus-WQeLSh07.js";import{a as sa,b as na,P as ra}from"./popover-D73VbCM5.js";import{e as We,b as qe,c as on,f as ln,a as cn,C as dn}from"./command-CwP4XJhp.js";import{a as Go,c as Jo,b as Yo}from"./repository-binding-w-FCDYuS.js";import{a as bt}from"./sandbox-lifecycle-context-CxRkhFod.js";import{a as Qo,n as Xo,u as Zo,f as xr,H as ei,P as ti}from"./frame-navigation-BZ8W_2dq.js";import{r as si}from"./session-runtime-D2GKulko.js";import{u as aa}from"./use-voice-input-Nzha8Za1.js";import{l as ni,m as ri,n as ai,o as oi,q as ii,t as li,u as Kt,j as vs,v as oa,i as tt,w as ci,x as un,y as ia,k as la,z as di,A as ui,B as ca,C as fi,c as da,b as ua,D as pi,h as Ve,E as mi,d as hi,g as gi,F as vi,G as xi,H as br,I as bi,J as yr,K as yi,L as wi,M as wr,N as kr,O as Sr,P as Pr,Q as jr,R as $s,S as ki,U as Si,V as Pi,W as ji,e as Ei}from"./site-editor-toast-DfzFv4iY.js";import{u as fa}from"./use-mobile-CBwmaBFU.js";import{T as st,I as Er}from"./toolbar-icon-button-DcIFSTOI.js";import{T as nt,a as rt,c as at}from"./tooltip-DCzbfwd7.js";import{w as os,i as Ni}from"./variant-matcher-override-DoPQRIHU.js";import{s as xt,n as fn,a as pn,f as Be,e as Ci,v as pa,u as ma,h as Ti,i as Ri,B as Li,S as Ai,C as Oi,b as _i,c as $i,d as Fi,g as Di,N as Bi,j as Mi,r as zi,k as Ii,l as Nr,p as Ui}from"./blocks-tab-states-D8VyxdkW.js";import{a as Ki}from"./use-fast-preview-draft-url-DbEjmD3f.js";import{g as Hi,c as Cr,B as Fs,P as Vi,r as Wi,R as qi,S as Gi,l as Ji,m as Yi,p as Qi}from"./parse-sections-Cv7KSMgB.js";import{g as Xi}from"./section-array-field-4siTAXTX.js";import{u as Zi}from"./shell-layout-BS_Y65pV.js";import{u as mn,b as el}from"./use-sandbox-events-DEHux0gs.js";import{s as tl,p as sl,W as nl,n as rl,S as Ds}from"./category-tree-DSsAlLjn.js";import{u as Gs}from"./useQueries-CQ0xJF7W.js";import{i as ha}from"./ArrowRight-Dyuh-rXZ.js";import{a as al,c as ol}from"./blog-preview-url-DwcMPB8a.js";import{u as il,b as ga}from"./use-never-published-Db-SviVk.js";import{u as va}from"./blocks-preview-workspace-context-JYcUL0TS.js";import{u as ll,H as cl}from"./held-block-view-CEue5DyE.js";import{MonacoCodeEditor as xa}from"./monaco-editor-DttATUsj.js";import{c as ba,u as ya}from"./hosted-reconcile-CC64pDxA.js";import{d as wa}from"./utils-pe9cqItP.js";import{R as Tr,a as is,b as Rr}from"./resizable-CJbr1Nyi.js";import{g as ka}from"./use-org-notice-BLDWm2ef.js";import{u as dl}from"./use-blocks-v8-project-BloQ91Xb.js";import{s as ul,L as fl,R as Sa,D as Lr,w as Js}from"./device-hint-DfNddHqx.js";import{s as pl}from"./UserCheck01-CuByTN5F.js";import{L as ml}from"./label-DFYaZzfV.js";import{T as hl,a as Ar}from"./toggle-group-jkikwCcL.js";import{i as gl,l as vl,D as xl}from"./named-rule-step-C-_N0SXT.js";import{b as bl}from"./sandbox-url-D3mC8qhT.js";import{r as yl,R as wl}from"./virtual-mcp-DN6fu9Nf.js";import{d as kl}from"./delay-CnY5UFtP.js";import{s as Pa}from"./XClose-Bomoew3H.js";import{o as Sl}from"./omit-server-managed-metadata-L5IhjRZB.js";import{a as Bs,b as Pl,w as jl,n as Or}from"./app-preview-url-9Od4s8Sz.js";import{a as El}from"./use-organization-settings-UrGbnM2k.js";import{a as Ms}from"./agent-capabilities-DWZ6HVp_.js";import{E as Nl}from"./empty-state-DlNabApi.js";import{G as _r}from"./github-icon-D3IlXxDN.js";import{R as Cl}from"./new-project-dialog-KtG8l1yi.js";import{r as Tl}from"./preview-source-BsRLGWUP.js";import{A as Rl,a as Ll,b as Al}from"./alert-QfzOpdUg.js";import{u as Ol}from"./use-task-metadata-L0GKyc-x.js";function _l(t){const e=le.c(10),{waiting:s}=t,n=s?"true":"false";let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:r.jsx(Mo,{className:"size-5 sm:size-6"})}),e[0]=o):o=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-px w-full border-t border-dashed border-muted-foreground/40"}),e[1]=c):c=e[1];let u;e[2]!==s?(u=s&&r.jsx("span",{"data-testid":"connection-dot",className:"absolute top-0 size-2 animate-[connection-shuttle_1.8s_var(--ease-in-out-cubic)_infinite_alternate] rounded-full bg-foreground"}),e[2]=s,e[3]=u):u=e[3];let i;e[4]!==u?(i=r.jsxs("span",{className:"relative flex h-2 w-16 items-center sm:w-20",children:[c,u]}),e[4]=u,e[5]=i):i=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:r.jsx(zo,{className:"size-5 sm:size-6"})}),e[6]=a):a=e[6];let l;return e[7]!==n||e[8]!==i?(l=r.jsxs("div",{"aria-hidden":"true","data-testid":"connection-wire","data-waiting":n,className:"flex items-center gap-2",children:[o,i,a]}),e[7]=n,e[8]=i,e[9]=l):l=e[9],l}function $l(t){const e=le.c(22),{index:s,numbered:n,step:o,heading:c}=t,u=R.useId();let i;e[0]!==s||e[1]!==n?(i=n&&r.jsx("span",{"aria-hidden":"true",className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium tabular-nums text-foreground",children:s}),e[0]=s,e[1]=n,e[2]=i):i=e[2];let a;e[3]!==c||e[4]!==u||e[5]!==o.title?(a=r.jsx(c,{id:u,className:"text-sm font-medium text-foreground",children:o.title}),e[3]=c,e[4]=u,e[5]=o.title,e[6]=a):a=e[6];let l;e[7]!==i||e[8]!==a?(l=r.jsxs("div",{className:"flex items-center gap-3",children:[i,a]}),e[7]=i,e[8]=a,e[9]=l):l=e[9];const g=n&&"sm:pl-9";let f;e[10]!==g?(f=Re("flex min-w-0 flex-col gap-3",g),e[10]=g,e[11]=f):f=e[11];let p;e[12]!==o.body?(p=o.body&&r.jsx("p",{className:"text-sm text-muted-foreground",children:o.body}),e[12]=o.body,e[13]=p):p=e[13];let m;e[14]!==o.after||e[15]!==f||e[16]!==p?(m=r.jsxs("div",{className:f,children:[p,o.after]}),e[14]=o.after,e[15]=f,e[16]=p,e[17]=m):m=e[17];let v;return e[18]!==u||e[19]!==l||e[20]!==m?(v=r.jsxs("li",{"aria-labelledby":u,className:"surface flex flex-col gap-3 p-4 sm:p-5",children:[l,m]}),e[18]=u,e[19]=l,e[20]=m,e[21]=v):v=e[21],v}const Fl=[];function hs(t){const e=le.c(20),{title:s,lead:n,waiting:o,alerts:c,steps:u,footer:i,headingLevel:a}=t,l=u===void 0?Fl:u,g=a===void 0?1:a,f=g===1?"h1":"h2",p=o&&l.length===0?"status":void 0;let m;e[0]!==o?(m=r.jsx(_l,{waiting:o}),e[0]=o,e[1]=m):m=e[1];let v;e[2]!==f||e[3]!==s?(v=r.jsx(f,{tabIndex:-1,className:"text-balance text-lg font-medium text-foreground outline-none sm:text-xl",children:s}),e[2]=f,e[3]=s,e[4]=v):v=e[4];let y;e[5]!==n?(y=n&&r.jsx("p",{className:"text-pretty text-sm text-muted-foreground",children:n}),e[5]=n,e[6]=y):y=e[6];let h;e[7]!==p||e[8]!==m||e[9]!==v||e[10]!==y?(h=r.jsxs("header",{role:p,className:"flex flex-col items-center gap-3 text-center",children:[m,v,y]}),e[7]=p,e[8]=m,e[9]=v,e[10]=y,e[11]=h):h=e[11];let x;e[12]!==g||e[13]!==l?(x=l.length>0&&r.jsx("ol",{className:"flex flex-col gap-3",children:l.map((b,w)=>r.jsx($l,{index:w+1,numbered:l.length>1,step:b,heading:g===1?"h2":"h3"},b.title))}),e[12]=g,e[13]=l,e[14]=x):x=e[14];let C;return e[15]!==c||e[16]!==i||e[17]!==h||e[18]!==x?(C=r.jsx("div",{className:"h-full w-full overflow-y-auto",children:r.jsxs("div",{className:"mx-auto flex min-h-full w-full max-w-xl flex-col justify-center gap-6 px-4 py-8 sm:py-12",children:[h,c,x,i]})}),e[15]=c,e[16]=i,e[17]=h,e[18]=x,e[19]=C):C=e[19],C}function Dl(t){const e=le.c(43),{wait:s,hosts:n,invalidLink:o}=t,c=o===void 0?!1:o,u=Se();let i;e[0]!==c||e[1]!==u?(i=c&&r.jsx(Rl,{variant:"warning",children:r.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[r.jsx(Ll,{className:"line-clamp-none text-foreground",children:u("decoServe.link.invalidTitle")}),r.jsx(Al,{children:u("decoServe.link.invalidBody")})]})}),e[0]=c,e[1]=u,e[2]=i):i=e[2];const a=i;if(s.kind==="problem"){let w;e[3]!==u||e[4]!==s.host||e[5]!==s.problem?(w=ul(u,s.problem,s.host),e[3]=u,e[4]=s.host,e[5]=s.problem,e[6]=w):w=e[6];const{title:N,body:k}=w;let S;e[7]!==k?(S=r.jsx(Sa,{text:k}),e[7]=k,e[8]=S):S=e[8];let E;e[9]===Symbol.for("react.memo_cache_sentinel")?(E=r.jsx(Lr,{className:"border-t border-border pt-4",links:["troubleshooting","serve"]}),e[9]=E):E=e[9];let T;return e[10]!==a||e[11]!==S||e[12]!==N?(T=r.jsx(hs,{headingLevel:2,waiting:!1,title:N,lead:S,alerts:a,footer:E}),e[10]=a,e[11]=S,e[12]=N,e[13]=T):T=e[13],T}const l=s.kind==="looking",g=l&&!s.paused;let f;e[14]!==u?(f=u("decoServe.waiting.title"),e[14]=u,e[15]=f):f=e[15];let p;e[16]!==u?(p=u("decoServe.waiting.lead"),e[16]=u,e[17]=p):p=e[17];let m;e[18]!==a||e[19]!==s.kind?(m=(a||s.kind==="denied")&&r.jsxs(r.Fragment,{children:[a,s.kind==="denied"&&r.jsx(fl,{})]}),e[18]=a,e[19]=s.kind,e[20]=m):m=e[20];let v;e[21]!==u?(v=u("decoServe.waiting.connect.title"),e[21]=u,e[22]=v):v=e[22];let y;e[23]!==u?(y=u("decoServe.waiting.connect.body"),e[23]=u,e[24]=y):y=e[24];let h;e[25]!==n||e[26]!==l||e[27]!==u||e[28]!==s.kind||e[29]!==s.onStart||e[30]!==s.paused?(h=s.kind==="needs-gesture"?r.jsx(_e,{variant:"outline",className:"self-start",onClick:s.onStart,children:u("decoServe.guide.start")}):l&&r.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:s.paused?u("decoServe.guide.paused"):u("decoServe.guide.looking",{hosts:n})}),e[25]=n,e[26]=l,e[27]=u,e[28]=s.kind,e[29]=s.onStart,e[30]=s.paused,e[31]=h):h=e[31];let x;e[32]!==v||e[33]!==y||e[34]!==h?(x=[{title:v,body:y,after:h}],e[32]=v,e[33]=y,e[34]=h,e[35]=x):x=e[35];let C;e[36]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(Lr,{className:"border-t border-border pt-4",links:["siteEditor","serve","troubleshooting"]}),e[36]=C):C=e[36];let b;return e[37]!==x||e[38]!==g||e[39]!==f||e[40]!==p||e[41]!==m?(b=r.jsx(hs,{headingLevel:2,waiting:g,title:f,lead:p,alerts:m,steps:x,footer:C}),e[37]=x,e[38]=g,e[39]=f,e[40]=p,e[41]=m,e[42]=b):b=e[42],b}function Bl(t,e){switch(t.kind){case"needs-permission":return{kind:"denied"};case"problem":return{kind:"problem",problem:t.problem,host:e};default:return{kind:"looking"}}}const Ml=15e3,zl=3e3;function Il(t){const{candidates:e,probe:s,onFound:n,onChange:o,doc:c=document,setTimer:u=(w,N)=>setTimeout(w,N),clearTimer:i=w=>clearTimeout(w),timeoutMs:a=zl}=t;let l={status:"searching",firstRoundDone:!1,problem:null},g=!1,f=!1,p=0,m=null,v=null;const y=()=>c.visibilityState==="hidden",h=w=>{l={...l,...w},o(l)},x=async w=>{v=new AbortController;const N=v,k=u(()=>N.abort(),a);try{return await s(w,N.signal),!0}catch(S){if(g)return!1;const E=ri(S);return E.reason!=="not-answering"?h({problem:{...E,endpoint:w}}):l.problem?.endpoint===w&&h({problem:null}),!1}finally{i(k),v=null}},C=async()=>{if(m=null,!(g||f)){if(e.length===0){h({status:"stopped",firstRoundDone:!0});return}if(y()){h({status:"paused"});return}f=!0,l.status!=="searching"&&h({status:"searching"});for(const w of e){if(g)break;if(await x(w)){if(f=!1,g)return;g=!0,c.removeEventListener("visibilitychange",b),h({status:"found",firstRoundDone:!0}),n(w);return}}if(f=!1,!g){if(p+=1,l.firstRoundDone||h({firstRoundDone:!0}),y()){h({status:"paused"});return}m=u(()=>{C()},ni(p,Ml))}}};function b(){if(!g){if(y()){m!==null&&(i(m),m=null),f||h({status:"paused"});return}m!==null&&i(m),p=0,C()}}return c.addEventListener("visibilitychange",b),o(l),C(),()=>{g=!0,m!==null&&i(m),v?.abort(),c.removeEventListener("visibilitychange",b)}}function Ul(t,e){return oi(t,e)}const Kl=["loopback-network","local-network-access"];async function Hl(){if(ai(window.location.origin))return null;for(const t of Kl)try{return await navigator.permissions.query({name:t})}catch{}return null}let ja=null,$r=!1;const zs=new Set;function Vl(t){if(zs.add(t),!$r){$r=!0;const e=s=>{ja=s;for(const n of zs)n()};Hl().then(s=>{if(!s)return e("unsupported");e(s.state),s.addEventListener("change",()=>e(s.state))})}return()=>zs.delete(t)}const Wl={status:"stopped",firstRoundDone:!1,problem:null},Is=new Map;function ql(t){const e=Is.get(t);if(e)return e;let s={status:"searching",firstRoundDone:!1,problem:null};const n=new Set;let o=null;const c={onFound:()=>{},getSnapshot:()=>s,subscribe:u=>(n.add(u),o??=Il({candidates:t.split(" "),probe:Ul,onFound:i=>c.onFound(i),onChange:i=>{s=i;for(const a of n)a()}}),()=>{n.delete(u),!(n.size>0)&&(o?.(),o=null,Is.delete(t))})};return Is.set(t,c),c}function Ea(){return R.useSyncExternalStore(Vl,Dr,Dr)}const Gl=()=>()=>{},Fr=()=>Wl,Dr=()=>ja;function Sf(t){const e=le.c(9),{candidates:s,onFound:n}=t,[o,c]=R.useState(!1),u=Ea(),a=(u==="granted"||u==="unsupported"||u==="prompt"&&o)&&s.length>0;let l;e[0]!==a||e[1]!==s||e[2]!==n?(l=a?ql(s.join(" ")):null,l&&(l.onFound=n),e[0]=a,e[1]=s,e[2]=n,e[3]=l):l=e[3];const g=R.useSyncExternalStore(l?.subscribe??Gl,l?.getSnapshot??Fr,l?.getSnapshot??Fr),f=u==="prompt"&&!o;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>c(!0),e[4]=p):p=e[4];let m;return e[5]!==u||e[6]!==g||e[7]!==f?(m={state:g,access:u,needsGesture:f,start:p},e[5]=u,e[6]=g,e[7]=f,e[8]=m):m=e[8],m}const Br={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Jl(t){const{previewState:e,progressStatus:s,fastPreviewActive:n=!1,fastPreviewReady:o=!1,codingSession:c=!1,hostedDraft:u=!1}=t,i=c?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?Br:u&&t.hostedPointerPending&&!o?{...Br,showDecidingLoader:!0}:n&&o&&i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!1}:n&&u&&i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!1}:!n&&e.kind==="iframe"&&s!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const Yl=1500,Ql=500;function Xl({iframe:t,reload:e,waitMs:s=Yl,confirmMs:n=Ql}){let o;const c=()=>{clearTimeout(u),o=setTimeout(e,n)};t.addEventListener("load",c,{once:!0});const u=setTimeout(()=>{t.removeEventListener("load",c),e()},s);return()=>{clearTimeout(u),clearTimeout(o),t.removeEventListener("load",c)}}const Zl=ps({tag:De(),id:De(),classes:De(),text:De(),html:De(),manifestKey:De().nullable(),componentName:De().nullable(),parents:De(),url:De(),path:De(),viewport:ps({width:gt(),height:gt()}),position:ps({x:gt(),y:gt()})}),ec=`(function() {
|
|
3
|
+
if (window.__visualEditorActive) return;
|
|
4
|
+
window.__visualEditorActive = true;
|
|
5
|
+
|
|
6
|
+
var cursorStyle = document.createElement("style");
|
|
7
|
+
cursorStyle.textContent = "* { cursor: default !important; }";
|
|
8
|
+
document.head.appendChild(cursorStyle);
|
|
9
|
+
|
|
10
|
+
var highlight = document.createElement("div");
|
|
11
|
+
highlight.style.cssText = "position:fixed;pointer-events:none;outline:2px solid #a855f7;background:rgba(168,85,247,0.08);border-radius:2px;z-index:2147483647;display:none;";
|
|
12
|
+
document.body.appendChild(highlight);
|
|
13
|
+
|
|
14
|
+
var badge = document.createElement("div");
|
|
15
|
+
badge.style.cssText = "position:fixed;pointer-events:none;background:#a855f7;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
16
|
+
document.body.appendChild(badge);
|
|
17
|
+
|
|
18
|
+
var lastTarget = null;
|
|
19
|
+
var rafPending = false;
|
|
20
|
+
var moveHandler = function(e) {
|
|
21
|
+
if (rafPending) return;
|
|
22
|
+
rafPending = true;
|
|
23
|
+
var target = e.target;
|
|
24
|
+
requestAnimationFrame(function() {
|
|
25
|
+
rafPending = false;
|
|
26
|
+
var el = target;
|
|
27
|
+
if (!el || el === highlight || el === badge) return;
|
|
28
|
+
if (el === lastTarget) return;
|
|
29
|
+
lastTarget = el;
|
|
30
|
+
var r = el.getBoundingClientRect();
|
|
31
|
+
// A CSS zoom on <body> scales the overlay's lengths again; the rect is already zoomed.
|
|
32
|
+
var z = document.body.currentCSSZoom || 1;
|
|
33
|
+
var top = r.top / z;
|
|
34
|
+
var left = r.left / z;
|
|
35
|
+
highlight.style.display = "block";
|
|
36
|
+
highlight.style.top = top + "px";
|
|
37
|
+
highlight.style.left = left + "px";
|
|
38
|
+
highlight.style.width = r.width / z + "px";
|
|
39
|
+
highlight.style.height = r.height / z + "px";
|
|
40
|
+
var tag = el.tagName.toLowerCase();
|
|
41
|
+
var id = el.id ? "#" + el.id : "";
|
|
42
|
+
var cls = el.className && typeof el.className === "string"
|
|
43
|
+
? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
|
|
44
|
+
: "";
|
|
45
|
+
badge.textContent = tag + id + cls;
|
|
46
|
+
badge.style.display = "block";
|
|
47
|
+
badge.style.top = Math.max(0, top - 20) + "px";
|
|
48
|
+
badge.style.left = left + "px";
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
52
|
+
|
|
53
|
+
var outHandler = function(e) {
|
|
54
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
55
|
+
highlight.style.display = "none";
|
|
56
|
+
badge.style.display = "none";
|
|
57
|
+
lastTarget = null;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
61
|
+
|
|
62
|
+
var clickHandler = function(e) {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
e.stopImmediatePropagation();
|
|
65
|
+
var el = e.target;
|
|
66
|
+
if (!el || el === highlight || el === badge) return;
|
|
67
|
+
|
|
68
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
69
|
+
highlight.style.background = "rgba(168,85,247,0.15)";
|
|
70
|
+
setTimeout(function() {
|
|
71
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
72
|
+
highlight.style.background = "rgba(168,85,247,0.08)";
|
|
73
|
+
}, 400);
|
|
74
|
+
|
|
75
|
+
var tag = el.tagName.toLowerCase();
|
|
76
|
+
var id = el.id || "";
|
|
77
|
+
var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
|
|
78
|
+
var text = (el.textContent || "").trim().slice(0, 200);
|
|
79
|
+
var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
|
|
80
|
+
|
|
81
|
+
var closestSection = el.closest("section[data-manifest-key]");
|
|
82
|
+
var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
|
|
83
|
+
|
|
84
|
+
var ancestor = el;
|
|
85
|
+
var componentName = null;
|
|
86
|
+
for (var i = 0; i < 10 && ancestor; i++) {
|
|
87
|
+
if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
|
|
88
|
+
ancestor = ancestor.parentElement;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
var parents = [];
|
|
92
|
+
var p = el.parentElement;
|
|
93
|
+
for (var j = 0; j < 4 && p && p !== document.body; j++) {
|
|
94
|
+
var pTag = p.tagName ? p.tagName.toLowerCase() : "";
|
|
95
|
+
var pId = p.id ? "#" + p.id : "";
|
|
96
|
+
var pCls = p.className && typeof p.className === "string"
|
|
97
|
+
? "." + p.className.trim().split(/\\s+/)[0]
|
|
98
|
+
: "";
|
|
99
|
+
parents.unshift(pTag + pId + pCls);
|
|
100
|
+
p = p.parentElement;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
window.parent.postMessage({
|
|
104
|
+
type: "visual-editor::element-clicked",
|
|
105
|
+
payload: {
|
|
106
|
+
tag: tag, id: id, classes: classes, text: text, html: html,
|
|
107
|
+
manifestKey: manifestKey, componentName: componentName,
|
|
108
|
+
parents: parents.join(" > "),
|
|
109
|
+
url: window.location.href, path: window.location.pathname,
|
|
110
|
+
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
111
|
+
position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
|
|
112
|
+
}
|
|
113
|
+
}, "*");
|
|
114
|
+
};
|
|
115
|
+
document.addEventListener("click", clickHandler, true);
|
|
116
|
+
|
|
117
|
+
window.addEventListener("message", function(e) {
|
|
118
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — a nested/downstream frame's forged message can't deactivate the editor.
|
|
119
|
+
if (e.source !== window.parent) return;
|
|
120
|
+
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
121
|
+
if (e.data && e.data.type === "visual-editor::clear-hover") {
|
|
122
|
+
highlight.style.display = "none";
|
|
123
|
+
badge.style.display = "none";
|
|
124
|
+
lastTarget = null;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (e.data && e.data.type === "visual-editor::deactivate") {
|
|
128
|
+
highlight.remove();
|
|
129
|
+
badge.remove();
|
|
130
|
+
cursorStyle.remove();
|
|
131
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
132
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
133
|
+
document.removeEventListener("click", clickHandler, true);
|
|
134
|
+
window.__visualEditorActive = false;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
})();`;function tc(t,e){const s=t.map(()=>null),n=[];for(let y=0;y<t.length;y++)t[y]!==null&&n.push(y);const o=n.length,c=e.length;if(!o||!c)return s;const u=(y,h)=>{const x=t[n[y]??0];return!x||!x.length?1:x.indexOf(e[h]??"")>=0?2:0},i=[],a=[];for(let y=0;y<=o;y++)i.push(new Array(c+1).fill(0)),a.push(new Array(c+1).fill(2));for(let y=1;y<=o;y++){const h=i[y-1]??[],x=i[y]??[],C=a[y]??[];for(let b=1;b<=c;b++){let w=h[b]??0,N=2;const k=x[b-1]??0;k>w&&(w=k,N=0);const S=u(y-1,b-1),E=(h[b-1]??0)+S;S>0&&E>w&&(w=E,N=1),x[b]=w,C[b]=N}}let l=0,g=o,f=c;for(;g>0&&f>0;){const y=a[g]?.[f]??2;y===1?(s[n[g-1]??0]=f-1,l++,g--,f--):y===0?f--:g--}const p=new Array(c).fill(!1);for(const y of n){const h=s[y];h!=null&&(p[h]=!0)}const m=(y,h)=>{const x=t[y];return!!x&&x.length>0&&x.indexOf(e[h]??"")>=0},v=(y,h)=>{for(const x of n){const C=s[x];if(!(C==null||e[C]!==e[h])&&x<y!=C<h)return!1}return!0};for(const y of n)if(s[y]===null){for(let h=0;h<c;h++)if(!p[h]&&m(y,h)&&v(y,h)){s[y]=h,p[h]=!0,l++;break}}if(l===0&&c===o)for(let y=0;y<o;y++)s[n[y]??0]=y;return s}const sc=ps({sectionIndex:gt(),manifestKey:De(),clickSeq:gt()}),nc=`(function() {
|
|
138
|
+
if (window.__cmsEditorActive) return;
|
|
139
|
+
window.__cmsEditorActive = true;
|
|
140
|
+
|
|
141
|
+
// Preserve scroll across variant-override navigations and save-reloads.
|
|
142
|
+
// Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
|
|
143
|
+
// or reloads it, which would otherwise jump to the top. We persist the scroll
|
|
144
|
+
// offset to sessionStorage (survives reload, same-origin) keyed by pathname
|
|
145
|
+
// (the override only changes the query, so the key is stable), then restore it
|
|
146
|
+
// on the next load — retried for ~1s so it outlasts re-hydration and lazy
|
|
147
|
+
// sections that grow the page after load. The recency guard avoids restoring a
|
|
148
|
+
// stale offset on a genuinely fresh visit.
|
|
149
|
+
var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
|
|
150
|
+
var saveScroll = function() {
|
|
151
|
+
try {
|
|
152
|
+
sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
|
|
153
|
+
x: window.scrollX, y: window.scrollY, t: Date.now()
|
|
154
|
+
}));
|
|
155
|
+
} catch (_) {}
|
|
156
|
+
};
|
|
157
|
+
var saveScrollPending = false;
|
|
158
|
+
window.addEventListener("scroll", function() {
|
|
159
|
+
if (saveScrollPending) return;
|
|
160
|
+
saveScrollPending = true;
|
|
161
|
+
requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
|
|
162
|
+
}, { passive: true });
|
|
163
|
+
(function restoreScroll() {
|
|
164
|
+
var raw = null;
|
|
165
|
+
try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
|
|
166
|
+
if (!raw) return;
|
|
167
|
+
var saved = null;
|
|
168
|
+
try { saved = JSON.parse(raw); } catch (_) { return; }
|
|
169
|
+
if (!saved || (Date.now() - saved.t) > 10000) return;
|
|
170
|
+
if (!saved.x && !saved.y) return;
|
|
171
|
+
var attempts = 0;
|
|
172
|
+
var apply = function() {
|
|
173
|
+
attempts++;
|
|
174
|
+
window.scrollTo(saved.x || 0, saved.y || 0);
|
|
175
|
+
if (attempts < 8) setTimeout(apply, 120);
|
|
176
|
+
};
|
|
177
|
+
apply();
|
|
178
|
+
})();
|
|
179
|
+
|
|
180
|
+
var highlight = document.createElement("div");
|
|
181
|
+
highlight.style.cssText = "position:absolute;pointer-events:none;outline:2px solid #06b6d4;background:rgba(6,182,212,0.06);border-radius:2px;z-index:2147483647;display:none;";
|
|
182
|
+
document.body.appendChild(highlight);
|
|
183
|
+
|
|
184
|
+
var badge = document.createElement("div");
|
|
185
|
+
badge.style.cssText = "position:absolute;pointer-events:none;background:#06b6d4;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
186
|
+
document.body.appendChild(badge);
|
|
187
|
+
|
|
188
|
+
var isTopLevelSection = function(el) {
|
|
189
|
+
return el && el.parentElement
|
|
190
|
+
? !el.parentElement.closest("section[data-manifest-key]")
|
|
191
|
+
: true;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// All top-level page sections in DOM order (deco renders page sections as
|
|
195
|
+
// <section data-manifest-key>; nested islands/sections carry the attribute
|
|
196
|
+
// too, hence the top-level filter). This is the full DOM run, framework
|
|
197
|
+
// sections included — getAllSections() narrows it to the editable window.
|
|
198
|
+
var topLevelSections = function() {
|
|
199
|
+
return Array.from(document.querySelectorAll("section[data-manifest-key]"))
|
|
200
|
+
.filter(isTopLevelSection);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
|
|
204
|
+
var sectionCandidates = [];
|
|
205
|
+
|
|
206
|
+
// Stringified from section-alignment.ts so both sides share one copy.
|
|
207
|
+
var alignSections = ${tc.toString()};
|
|
208
|
+
|
|
209
|
+
// Indexed like the decofile array; unmapped entries stay null (not clickable).
|
|
210
|
+
var computeAlignment = function(tops) {
|
|
211
|
+
var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
|
|
212
|
+
return alignSections(sectionCandidates, domKeys).map(function(idx) {
|
|
213
|
+
return idx === null ? null : tops[idx];
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
// Editable sections, indexed to match the decofile array the panel uses.
|
|
218
|
+
// Recomputed from the live DOM each call (cheap, rAF-throttled) so it
|
|
219
|
+
// self-heals as client-rendered/lazy sections mount. Until the editor sends
|
|
220
|
+
// candidates, fall back to the full top-level run.
|
|
221
|
+
var getAllSections = function() {
|
|
222
|
+
var tops = topLevelSections();
|
|
223
|
+
return sectionCandidates.length ? computeAlignment(tops) : tops;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// Resolve to the OUTERMOST page-level section (clicking nested content still
|
|
227
|
+
// maps to the top-level section the panel indexes); null if it isn't in the
|
|
228
|
+
// aligned editable set (a framework section deco injected).
|
|
229
|
+
var findSection = function(el, out) {
|
|
230
|
+
var node = el;
|
|
231
|
+
var found = null;
|
|
232
|
+
while (node && node !== document.body) {
|
|
233
|
+
if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
|
|
234
|
+
found = node;
|
|
235
|
+
}
|
|
236
|
+
node = node.parentElement;
|
|
237
|
+
}
|
|
238
|
+
if (!found) return null;
|
|
239
|
+
var sections = getAllSections();
|
|
240
|
+
if (out) out.sections = sections;
|
|
241
|
+
return sections.indexOf(found) >= 0 ? found : null;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
// A Lazy wrapper's key is just the loader — show the inner section's instead.
|
|
245
|
+
var LAZY_KEYS = [
|
|
246
|
+
"website/sections/Rendering/Lazy.tsx",
|
|
247
|
+
"website/sections/Rendering/SingleDeferred.tsx"
|
|
248
|
+
];
|
|
249
|
+
var isLazyKey = function(key) {
|
|
250
|
+
return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
|
|
251
|
+
};
|
|
252
|
+
var displayKey = function(section) {
|
|
253
|
+
var key = section.getAttribute("data-manifest-key") || "section";
|
|
254
|
+
if (isLazyKey(key)) {
|
|
255
|
+
var inner = section.querySelector("section[data-manifest-key]");
|
|
256
|
+
if (inner) return inner.getAttribute("data-manifest-key") || key;
|
|
257
|
+
}
|
|
258
|
+
return key;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// Per-section metadata sent by the editor, aligned by index with
|
|
262
|
+
// getAllSections(). labels: names the DOM can't carry (a global section or a
|
|
263
|
+
// global inside async rendering); kinds: section type that drives the color.
|
|
264
|
+
var sectionLabels = [];
|
|
265
|
+
var sectionKinds = [];
|
|
266
|
+
var labelFor = function(section, sections) {
|
|
267
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
268
|
+
if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
|
|
269
|
+
return displayKey(section);
|
|
270
|
+
};
|
|
271
|
+
var kindFor = function(section, sections) {
|
|
272
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
273
|
+
return (idx >= 0 && sectionKinds[idx]) || "normal";
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
// Highlight palette by section kind: global = light purple, variant = green,
|
|
277
|
+
// normal = blue.
|
|
278
|
+
var COLORS = {
|
|
279
|
+
normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
|
|
280
|
+
global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
|
|
281
|
+
variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
|
|
282
|
+
};
|
|
283
|
+
var applyColor = function(kind) {
|
|
284
|
+
var c = COLORS[kind] || COLORS.normal;
|
|
285
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
286
|
+
highlight.style.background = c.bg;
|
|
287
|
+
badge.style.background = c.solid;
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
var lastSection = null;
|
|
291
|
+
var lastLabel = "";
|
|
292
|
+
var lastKind = "normal";
|
|
293
|
+
var rafPending = false;
|
|
294
|
+
// True while an in-place render fetch/swap is in flight; suppresses hover so it can't re-show the overlay right before the swap snapshots it.
|
|
295
|
+
var renderPending = false;
|
|
296
|
+
|
|
297
|
+
// Document-relative coordinates (rect + scroll) on absolutely-positioned
|
|
298
|
+
// nodes, so the browser scrolls the highlight together with the page
|
|
299
|
+
// natively — no per-frame JS repositioning, no scroll lag.
|
|
300
|
+
var positionHighlight = function(section) {
|
|
301
|
+
var r = section.getBoundingClientRect();
|
|
302
|
+
// A CSS zoom on <body> scales the overlay's lengths again; the rect is already zoomed.
|
|
303
|
+
var z = document.body.currentCSSZoom || 1;
|
|
304
|
+
var top = (r.top + window.scrollY) / z;
|
|
305
|
+
var left = (r.left + window.scrollX) / z;
|
|
306
|
+
highlight.style.display = "block";
|
|
307
|
+
highlight.style.top = top + "px";
|
|
308
|
+
highlight.style.left = left + "px";
|
|
309
|
+
highlight.style.width = r.width / z + "px";
|
|
310
|
+
highlight.style.height = r.height / z + "px";
|
|
311
|
+
badge.textContent = lastLabel || displayKey(section);
|
|
312
|
+
badge.style.display = "block";
|
|
313
|
+
badge.style.top = Math.max(0, top - 20) + "px";
|
|
314
|
+
badge.style.left = left + "px";
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
var moveHandler = function(e) {
|
|
318
|
+
if (renderPending || rafPending) return;
|
|
319
|
+
rafPending = true;
|
|
320
|
+
var target = e.target;
|
|
321
|
+
requestAnimationFrame(function() {
|
|
322
|
+
rafPending = false;
|
|
323
|
+
if (renderPending) return;
|
|
324
|
+
if (!target || target === highlight || target === badge) return;
|
|
325
|
+
var out = {};
|
|
326
|
+
var section = findSection(target, out);
|
|
327
|
+
if (section === lastSection) return;
|
|
328
|
+
lastSection = section;
|
|
329
|
+
if (!section) {
|
|
330
|
+
highlight.style.display = "none";
|
|
331
|
+
badge.style.display = "none";
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
lastLabel = labelFor(section, out.sections);
|
|
335
|
+
lastKind = kindFor(section, out.sections);
|
|
336
|
+
applyColor(lastKind);
|
|
337
|
+
positionHighlight(section);
|
|
338
|
+
});
|
|
339
|
+
};
|
|
340
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
341
|
+
|
|
342
|
+
// Window scroll is handled natively by the absolute positioning above; this
|
|
343
|
+
// only re-syncs on resize and on scrolls inside nested scroll containers
|
|
344
|
+
// (capture=true catches those), where document coordinates do shift.
|
|
345
|
+
var reposition = function() {
|
|
346
|
+
if (!lastSection || highlight.style.display === "none") return;
|
|
347
|
+
if (rafPending) return;
|
|
348
|
+
rafPending = true;
|
|
349
|
+
requestAnimationFrame(function() {
|
|
350
|
+
rafPending = false;
|
|
351
|
+
if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
window.addEventListener("scroll", reposition, { capture: true, passive: true });
|
|
355
|
+
window.addEventListener("resize", reposition, { passive: true });
|
|
356
|
+
|
|
357
|
+
var outHandler = function(e) {
|
|
358
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
359
|
+
highlight.style.display = "none";
|
|
360
|
+
badge.style.display = "none";
|
|
361
|
+
lastSection = null;
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
365
|
+
|
|
366
|
+
var clickSeq = 0;
|
|
367
|
+
|
|
368
|
+
// Blocks observes clicks to select sections in the side panel; it must not
|
|
369
|
+
// cancel the iframe page's own handlers or native control behavior.
|
|
370
|
+
var clickHandler = function(e) {
|
|
371
|
+
var target = e.target;
|
|
372
|
+
if (!target || target === highlight || target === badge) return;
|
|
373
|
+
var out = {};
|
|
374
|
+
var section = findSection(target, out);
|
|
375
|
+
if (!section) return;
|
|
376
|
+
|
|
377
|
+
var sectionIndex = out.sections.indexOf(section);
|
|
378
|
+
var manifestKey = section.getAttribute("data-manifest-key") || "";
|
|
379
|
+
|
|
380
|
+
var c = COLORS[lastKind] || COLORS.normal;
|
|
381
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
382
|
+
highlight.style.background = c.active;
|
|
383
|
+
setTimeout(function() {
|
|
384
|
+
highlight.style.background = c.bg;
|
|
385
|
+
}, 400);
|
|
386
|
+
|
|
387
|
+
clickSeq++;
|
|
388
|
+
window.parent.postMessage({
|
|
389
|
+
type: "cms-editor::section-clicked",
|
|
390
|
+
payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
|
|
391
|
+
}, "*");
|
|
392
|
+
};
|
|
393
|
+
document.addEventListener("click", clickHandler, true);
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Navigation is disabled while editing: leaving the page would leave the
|
|
397
|
+
* panel editing the previous page's sections. Only the default action of a
|
|
398
|
+
* real navigation is cancelled, never propagation — in-page controls must
|
|
399
|
+
* keep working (#5567).
|
|
400
|
+
*/
|
|
401
|
+
var isNavigatingAnchor = function(a) {
|
|
402
|
+
if (!a) return false;
|
|
403
|
+
var href = a.getAttribute("href");
|
|
404
|
+
if (!href) return false;
|
|
405
|
+
var trimmed = href.trim();
|
|
406
|
+
if (!trimmed || trimmed.charAt(0) === "#") return false;
|
|
407
|
+
if (/^javascript:/i.test(trimmed)) return false;
|
|
408
|
+
// Same document + fragment only scrolls.
|
|
409
|
+
try {
|
|
410
|
+
var url = new URL(a.href, location.href);
|
|
411
|
+
if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
|
|
412
|
+
} catch (_) {}
|
|
413
|
+
return true;
|
|
414
|
+
};
|
|
415
|
+
var navBlocker = function(e) {
|
|
416
|
+
var el = e.target;
|
|
417
|
+
var a = el && el.closest ? el.closest("a") : null;
|
|
418
|
+
if (!isNavigatingAnchor(a)) return;
|
|
419
|
+
e.preventDefault();
|
|
420
|
+
};
|
|
421
|
+
document.addEventListener("click", navBlocker, true);
|
|
422
|
+
|
|
423
|
+
var submitBlocker = function(e) { e.preventDefault(); };
|
|
424
|
+
document.addEventListener("submit", submitBlocker, true);
|
|
425
|
+
|
|
426
|
+
// Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
|
|
427
|
+
var renderCtrl = null;
|
|
428
|
+
var renderQueue = Promise.resolve();
|
|
429
|
+
var TRANSITION_TAG =
|
|
430
|
+
"<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
|
|
431
|
+
|
|
432
|
+
// A skipped view transition rejects its promises with "AbortError:
|
|
433
|
+
// Transition was skipped"; nobody else waits on them, so they are settled
|
|
434
|
+
// here rather than left as uncaught errors in the page's console.
|
|
435
|
+
var settleTransition = function(vt) {
|
|
436
|
+
if (!vt) return;
|
|
437
|
+
var ignore = function() {};
|
|
438
|
+
if (vt.ready) vt.ready.catch(ignore);
|
|
439
|
+
if (vt.updateCallbackDone) vt.updateCallbackDone.catch(ignore);
|
|
440
|
+
if (vt.finished) vt.finished.catch(ignore);
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
// A site that opts into cross-document view transitions
|
|
444
|
+
// (@view-transition { navigation: auto }) gets one on every reload a save
|
|
445
|
+
// makes. When the next save navigates the frame before that transition
|
|
446
|
+
// starts, the browser skips it and rejects the outgoing page's ready
|
|
447
|
+
// promise, which only a pageswap listener can reach. Kept after deactivate:
|
|
448
|
+
// settling changes nothing else, and the frame may still navigate.
|
|
449
|
+
if (!window.__cmsEditorPageSwap) {
|
|
450
|
+
window.__cmsEditorPageSwap = true;
|
|
451
|
+
window.addEventListener("pageswap", function(e) {
|
|
452
|
+
settleTransition(e.viewTransition);
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// A quick second save skips the running transition. Only finished says
|
|
457
|
+
// when the swap is over, so the chain waits on it; the rest is settled.
|
|
458
|
+
var runSwapTransition = function(swap) {
|
|
459
|
+
if (typeof document.startViewTransition !== "function") {
|
|
460
|
+
swap();
|
|
461
|
+
return Promise.resolve();
|
|
462
|
+
}
|
|
463
|
+
var vt = document.startViewTransition(swap);
|
|
464
|
+
settleTransition(vt);
|
|
465
|
+
return vt.finished;
|
|
466
|
+
};
|
|
467
|
+
var renderInPlace = function(src, body) {
|
|
468
|
+
if (renderCtrl) renderCtrl.abort();
|
|
469
|
+
var ctrl = new AbortController();
|
|
470
|
+
renderCtrl = ctrl;
|
|
471
|
+
renderPending = true;
|
|
472
|
+
highlight.style.display = "none";
|
|
473
|
+
badge.style.display = "none";
|
|
474
|
+
window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
|
|
475
|
+
renderQueue = renderQueue.then(function() {
|
|
476
|
+
return fetch(src, {
|
|
477
|
+
method: "POST",
|
|
478
|
+
body: body,
|
|
479
|
+
signal: ctrl.signal,
|
|
480
|
+
headers: { accept: "text/html", "content-type": "application/json" }
|
|
481
|
+
}).then(function(res) {
|
|
482
|
+
if (!res.ok) throw new Error("render " + res.status);
|
|
483
|
+
return res.text();
|
|
484
|
+
}).then(function(html) {
|
|
485
|
+
var swap = function() {
|
|
486
|
+
document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
|
|
487
|
+
document.body.appendChild(highlight);
|
|
488
|
+
document.body.appendChild(badge);
|
|
489
|
+
// Old section is gone; hide the overlay until the next hover repositions it.
|
|
490
|
+
highlight.style.display = "none";
|
|
491
|
+
badge.style.display = "none";
|
|
492
|
+
lastSection = null;
|
|
493
|
+
};
|
|
494
|
+
var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
|
|
495
|
+
var doc = new DOMParser().parseFromString(headHtml, "text/html");
|
|
496
|
+
var sheets = Array.prototype.map.call(
|
|
497
|
+
doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
|
|
498
|
+
function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
|
|
499
|
+
);
|
|
500
|
+
return Promise.all(sheets).then(function() {
|
|
501
|
+
return runSwapTransition(swap);
|
|
502
|
+
});
|
|
503
|
+
}).then(function() {
|
|
504
|
+
var t = document.getElementById("deco-disable-transitions");
|
|
505
|
+
if (t) t.remove();
|
|
506
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
507
|
+
window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
|
|
508
|
+
}).catch(function(err) {
|
|
509
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
510
|
+
if (err && err.name === "AbortError") return;
|
|
511
|
+
window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
|
|
512
|
+
});
|
|
513
|
+
});
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
window.addEventListener("message", function(e) {
|
|
517
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
|
|
518
|
+
if (e.source !== window.parent) return;
|
|
519
|
+
if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
|
|
520
|
+
renderInPlace(e.data.src, e.data.body);
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
|
|
524
|
+
sectionLabels = e.data.labels;
|
|
525
|
+
if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
|
|
526
|
+
if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
|
|
527
|
+
if (lastSection) {
|
|
528
|
+
lastLabel = labelFor(lastSection);
|
|
529
|
+
lastKind = kindFor(lastSection);
|
|
530
|
+
applyColor(lastKind);
|
|
531
|
+
if (highlight.style.display !== "none") positionHighlight(lastSection);
|
|
532
|
+
}
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
536
|
+
if (e.data && e.data.type === "cms-editor::clear-hover") {
|
|
537
|
+
highlight.style.display = "none";
|
|
538
|
+
badge.style.display = "none";
|
|
539
|
+
lastSection = null;
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
if (e.data && e.data.type === "cms-editor::deactivate") {
|
|
543
|
+
highlight.remove();
|
|
544
|
+
badge.remove();
|
|
545
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
546
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
547
|
+
document.removeEventListener("click", clickHandler, true);
|
|
548
|
+
// Or the page stays unnavigable after leaving Blocks mode.
|
|
549
|
+
document.removeEventListener("click", navBlocker, true);
|
|
550
|
+
document.removeEventListener("submit", submitBlocker, true);
|
|
551
|
+
window.removeEventListener("scroll", reposition, { capture: true });
|
|
552
|
+
window.removeEventListener("resize", reposition);
|
|
553
|
+
window.__cmsEditorActive = false;
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
})();`,ls=Object.freeze({ready:"deco:ready",load:"deco:load",loaded:"deco:loaded",loadError:"deco:load-error"}),rc="v1",ac="/studio-modules",Us=["wireframe","html-swap"];function oc(t,e,s){const n=new URL(`${ac}/${rc}/${e}.js`,t);return s&&n.searchParams.set("build",s),n.href}const ic=2e3;class lc{constructor(e){this.options=e,this.urls=Object.fromEntries(Us.map(s=>[s,oc(e.studioOrigin,s,e.build)]))}options;origin=null;urls;loaded=new Set;swapId=0;pendingSwap=null;startTimer=null;has(e){return this.loaded.has(e)}handle(e){const s=this.options.frame();if(!s||e.source!==s)return!1;const n=e.data;if(!n||typeof n.type!="string")return!1;if(n.type===ls.ready)return cc(e.origin)?(this.ready(e.origin),!0):!1;if(e.origin!==this.origin)return!1;const o=n;switch(o.type){case ls.loaded:{const c=this.nameOf(o.url);return c&&(this.loaded.add(c),this.options.onModulesChange?.(),c==="wireframe"&&this.options.onWireframeReady?.()),!0}case ls.loadError:{const c=this.nameOf(o.url);return c&&this.loaded.delete(c)&&this.options.onModulesChange?.(),c==="html-swap"&&this.failSwap(),!0}case"wireframe:hover":case"wireframe:select":return this.options.onWireframe?.(o),!0;case"html-swap:start":return this.pendingSwap?.id===o.id&&(this.pendingSwap.started=!0,this.clearStartTimer()),!0;case"html-swap:end":return this.pendingSwap?.id!==o.id||(this.pendingSwap=null,this.clearStartTimer(),this.options.onSwapEnd?.()),!0;case"html-swap:error":return this.pendingSwap?.id===o.id&&this.failSwap(),!0;default:return!1}}wireframe(e){return this.post("wireframe",e)}refresh(e){if(e!==void 0&&!this.isFrameOrigin(e))return!1;const s=++this.swapId,n=e?{type:"html-swap:refresh",id:s,url:e}:{type:"html-swap:refresh",id:s};return this.post("html-swap",n)?(this.pendingSwap={id:s,started:!1},this.clearStartTimer(),this.startTimer=setTimeout(()=>{this.startTimer=null,this.pendingSwap?.id===s&&!this.pendingSwap.started&&this.failSwap()},ic),!0):!1}dispose(){this.clearStartTimer(),this.pendingSwap=null,this.loaded.clear(),this.origin=null}ready(e){this.origin=e,this.loaded.size&&(this.loaded.clear(),this.options.onModulesChange?.()),this.pendingSwap&&(this.pendingSwap=null,this.clearStartTimer(),this.options.onSwapEnd?.());const s=this.options.frame();for(const n of Us)s?.postMessage({type:ls.load,url:this.urls[n]},e)}post(e,s){const n=this.options.frame();return!n||!this.origin||!this.loaded.has(e)?!1:(n.postMessage(s,this.origin),!0)}isFrameOrigin(e){try{return new URL(e).origin===this.origin}catch{return!1}}nameOf(e){return Us.find(s=>this.urls[s]===e)??null}failSwap(){this.clearStartTimer(),this.pendingSwap&&(this.pendingSwap=null,this.options.onSwapFailed?.())}clearStartTimer(){this.startTimer&&clearTimeout(this.startTimer),this.startTimer=null}}function cc(t){if(typeof t!="string"||t==="null")return!1;try{const e=new URL(t).origin;return e!=="null"&&e===t}catch{return!1}}function Ys(t,e,s=!1){let n=t,o=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let c=0;o&&c<5;c++){const u=e[o];if(u&&typeof u=="object"&&"__resolveType"in u){const i=u.__resolveType;if(typeof i=="string"&&i&&i!==o){n=u,o=i;continue}}break}if(!o)return[];if(o.includes("flags/multivariate")||s&&ko(o,s)){const c=Array.isArray(n.variants)?n.variants:[];if(c.length===0||c.every(a=>{const l=a?.rule;return So(l?.__resolveType,s)}))return null;const i=[];for(const a of c){const l=Po(a,s);if(l&&typeof l=="object")for(const g of Ys(l,e,s)??[])i.includes(g)||i.push(g)}return i}if(jo(o)){const c=n.section&&typeof n.section=="object"?Ys(n.section,e,s):[];return c===null?null:c.length?[o,...c]:[o]}return[o]}function ht(t){return t.replace(/[`*_]/g,"\\$&")}function dc(t,e){const s=[`The user selected an element on the live preview and asked: **"${ht(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&s.push(`**Section resolveType:** \`${ht(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 n=`<${t.tag}${t.classes?` class="${ht(t.classes)}"`:""}>`;s.push(`**Clicked element:** \`${n}\``),t.parents&&s.push(`**DOM breadcrumb:** ${ht(t.parents)} > ${t.tag}`),t.text&&s.push(`**Text content:** "${ht(t.text)}"`),t.componentName&&s.push(`**Component name:** ${ht(t.componentName)}`);const o=t.html.replace(/```/g,"`` `");return s.push("","**HTML snippet:**","```html",o,"```"),s.push("","Please read the source file, locate the element, and apply the requested change."),s.join(`
|
|
557
|
+
`)}function uc(t,e,s=320,n=44,o=12){const{x:c,y:u}=t,{width:i,height:a}=e,l=Math.max(o,Math.min(c-s/2,i-s-o)),f=u/a>.68?Math.max(o,u-n-18):Math.min(u+18,a-n-o);return{leftPct:l/i*100,topPct:f/a*100}}function fc(t){const e=le.c(45),{element:s,onDismiss:n}=t,[o,c]=R.useState(""),u=R.useRef(null),{sendMessage:i}=_o(),{openSidePanel:a}=Zi(),l=Se();let g;e[0]!==s||e[1]!==o||e[2]!==n||e[3]!==a||e[4]!==i?(g=()=>{if(!o.trim())return;const I=dc(s,o);a(),i({parts:[{type:"text",text:I}]}),n()},e[0]=s,e[1]=o,e[2]=n,e[3]=a,e[4]=i,e[5]=g):g=e[5];const f=g;let p;e[6]!==s.position||e[7]!==s.viewport?(p=uc(s.position,s.viewport),e[6]=s.position,e[7]=s.viewport,e[8]=p):p=e[8];const m=p,v=`${m.leftPct}%`,y=`${m.topPct}%`;let h;e[9]!==v||e[10]!==y?(h={left:v,top:y,width:"320px"},e[9]=v,e[10]=y,e[11]=h):h=e[11];let x;e[12]!==f?(x=I=>{I.preventDefault(),f()},e[12]=f,e[13]=x):x=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=I=>c(I.target.value),e[14]=C):C=e[14];let b;e[15]!==n?(b=I=>{I.key==="Escape"&&n()},e[15]=n,e[16]=b):b=e[16];let w;e[17]!==l?(w=l("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=l,e[18]=w):w=e[18];let N;e[19]!==o||e[20]!==b||e[21]!==w?(N=r.jsx("input",{ref:u,autoFocus:!0,type:"text",value:o,onChange:C,onKeyDown:b,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=o,e[20]=b,e[21]=w,e[22]=N):N=e[22];let k;e[23]!==o?(k=o.trim(),e[23]=o,e[24]=k):k=e[24];const S=!k;let E;e[25]!==l?(E=l("sandbox.visualEditorPrompt.sendButton"),e[25]=l,e[26]=E):E=e[26];let T;e[27]!==l?(T=l("sandbox.visualEditorPrompt.sendButton"),e[27]=l,e[28]=T):T=e[28];let B;e[29]!==T?(B=r.jsx("title",{children:T}),e[29]=T,e[30]=B):B=e[30];let A;e[31]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=A):A=e[31];let L;e[32]!==B?(L=r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[B,A]}),e[32]=B,e[33]=L):L=e[33];let $;e[34]!==S||e[35]!==E||e[36]!==L?($=r.jsx("button",{type:"submit",disabled:S,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:E,children:L}),e[34]=S,e[35]=E,e[36]=L,e[37]=$):$=e[37];let _;e[38]!==N||e[39]!==$||e[40]!==x?(_=r.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:x,children:[N,$]}),e[38]=N,e[39]=$,e[40]=x,e[41]=_):_=e[41];let F;return e[42]!==_||e[43]!==h?(F=r.jsx("div",{className:"absolute z-30 pointer-events-none",style:h,children:_}),e[42]=_,e[43]=h,e[44]=F):F=e[44],F}const Mr="site-links",pc=/details?page|\bpdp\b/i,mc=/listingpage|\bplp\b/i;function hc(t,e,s){const n=new Set;for(const i of s)pc.test(i)&&n.add("product"),mc.test(i)&&n.add("category");const o=xt(fn(t)),c=o[o.length-1],u=o[o.length-2];return c?.type==="text"&&c.text==="/p"&&u?.type==="param"&&u.name===e&&n.add("product"),e==="*"&&o.some(i=>i.type==="param"&&i.name==="*")&&n.add("category"),n}const gc=["rosa","preto","pink","black"];function cs(t,e){const s=e.trim();return s?t(s):gc.flatMap(n=>t(n))}function vc(t,e){const s=e.trim(),n=[];/^\d+$/.test(s)&&n.push({resolveType:t,props:{ids:[s]}});const c=s.includes("-")&&!/\s/.test(s)?s.replace(/-+/g," "):s;return n.push({resolveType:t,props:{query:c,count:10}}),n}const Na=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function hn(t){return t.split("/")[0]??""}function xc(t){const e=new Set;for(const s of t){const n=hn(s);Na.has(n)&&e.add(n)}return e}function bc(t,e){const s=hn(t);return!Na.has(s)||e.size===0?!0:e.has(s)}const yc=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>cs(s=>vc(t,s),e),optionsFromPayload:ds},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>cs(s=>[{resolveType:t,props:{props:{search:s,pageSize:10,currentPage:1}}}],e),optionsFromPayload:ds},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>cs(s=>[{resolveType:t,props:{term:s,hitsPerPage:10}}],e),optionsFromPayload:ds},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>cs(s=>[{resolveType:t,props:{query:s,term:s,count:10,hitsPerPage:10}}],e),optionsFromPayload:ds},{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:Nc}];function wc(t,e,s=new Set){const n=[...e],o=i=>{const a=[];for(const l of yc){if(l.kind!==i)continue;const g=n.find(f=>l.test(f)&&bc(f,s));g&&a.push({cand:l,resolveType:g})}return a.find(l=>s.has(hn(l.resolveType)))??a[0]},c=(i,a,l)=>({kind:i.kind,id:`${i.kind}:${a}`,resolveType:a,clientFilter:i.clientFilter,isFallback:l,buildRequests:g=>i.buildRequests(a,g),optionsFromPayload:i.optionsFromPayload}),u=[];for(const i of["product","category"]){if(!t.has(i))continue;const a=o(i);a&&u.push(c(a.cand,a.resolveType,!1))}return t.size>0&&u.push(kc(t.has("category")?"category":"product")),u}function kc(t){return{kind:t,id:Mr,resolveType:Mr,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,s)=>Ac(e,s)}}function ot(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Sc(t,e,s){const n=new Set,o=new Set,c=u=>{if(Array.isArray(u)){for(const l of u)c(l);return}const i=ot(u);if(!i)return;const a=i.__resolveType;if(typeof a=="string"){if(s(a))n.add(a);else if(a in e&&!o.has(a)){o.add(a);const l=ot(e[a])?.__resolveType;typeof l=="string"&&s(l)&&n.add(a),c(e[a])}}for(const l of Object.values(i))c(l)};return c(t),n}function Ca(t){const e=new Set,s=[];for(const n of t)for(const o of n)e.has(o.value)||(e.add(o.value),s.push(o));return s}function Ta(t){try{return decodeURIComponent(t)}catch{return t}}function Pc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jc(t){const e=[];let s="^";for(const n of t)n.type==="text"?s+=Pc(n.text):(e.push(n.name),s+=n.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${s}$`),order:e}}function gn(t,e,s){if(typeof t!="string"||!t)return null;let n;try{n=new URL(t,"https://placeholder.invalid").pathname}catch{return null}n=n.replace(/\/+$/,"");const o=xt(fn(e)),{pattern:c,order:u}=jc(o),i=u.indexOf(s);if(i===-1)return null;const a=n.match(c);if(!a)return null;const l=a[i+1]?.replace(/^\/+|\/+$/g,"");return l?Ta(l):null}function ds(t,e){const s=ot(t),n=Array.isArray(t)?t:Array.isArray(s?.products)?s.products:Array.isArray(s?.list)?s.list:[],o=[],c=new Set;for(const u of n){const i=ot(u);if(!i)continue;const a=gn(i.url,e.template,e.paramName);if(!a||c.has(a))continue;c.add(a);const l=ot(i.isVariantOf),g=typeof l?.name=="string"&&l.name||typeof i.name=="string"&&i.name||a,f=Array.isArray(i.image)?ot(i.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;o.push({value:a,label:g,image:p})}return o}function Ec(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const s=e.replace(/^\/+|\/+$/g,"");return s?Ta(s):null}function Nc(t){const e=[],s=new Set,n=(o,c)=>{const u=ot(o);if(!u)return;const i=typeof u.name=="string"&&u.name?u.name:"",a=i?[...c,i]:c,l=Ec(u.url);if(l&&!s.has(l)&&(s.add(l),e.push({value:l,label:a.join(" › ")||l})),Array.isArray(u.children))for(const g of u.children)n(g,a)};if(Array.isArray(t))for(const o of t)n(o,[]);return e}const Cc=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 Tc(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,s=>s.toUpperCase())}function Rc(t){if(typeof t!="string"||!t)return[];const e=[],s=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let n,o=0;for(;(n=s.exec(t))!==null&&o++<5e3;){const c=n[1]??"",u=(n[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:c,text:u})}return e}function Lc(t){if(typeof t!="string"||!t)return[];const e=[],s=new Set,n=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,o=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let c,u=0;for(;(c=n.exec(t))!==null&&u++<3e3;){const i=(c[1]??"").replace(/\\\//g,"/");if(!i||s.has(i))continue;s.add(i);const a=t.slice(c.index,c.index+900).match(o)?.[1]?.replace(/\\\//g,"/");e.push({url:i,name:c[2]??"",image:a||void 0})}return e}function Ac(t,e){const s=[],n=new Set,o=(c,u,i,a)=>{if(s.length>=200)return;const l=gn(c,e.template,e.paramName);!l||n.has(l)||e.paramName==="*"&&/(^|\/)p$/.test(l)||i==="category"&&Cc.has(l.split("/")[0]??"")||(n.add(l),s.push({value:l,label:u&&u.length<=80?u:Tc(l),kind:i,image:a}))};for(const{url:c,name:u,image:i}of Lc(t))o(c,u,"product",i);for(const{href:c,text:u}of Rc(t))c.startsWith("/")&&!c.startsWith("//")&&o(c,u,"category");return s}function zt(t,e,s=50){const n=e.trim().toLowerCase();return(n?t.filter(c=>c.label.toLowerCase().includes(n)||c.value.toLowerCase().includes(n)):t).slice(0,s)}const Ra=1e4;function Oc(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 _c(t,{resolveType:e,props:s}){const n=await fetch(ii(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...s}),signal:AbortSignal.timeout(Ra)});if(!n.ok)throw new Error(`Failed to fetch options: ${n.status}`);return n.json()}async function zr(t,e){const s=await fetch(li(t,e),{signal:AbortSignal.timeout(Ra)});if(!s.ok)throw new Error(`Failed to fetch page: ${s.status}`);return s.text()}async function $c(t,e,s){const n=e.optionsFromPayload(await zr(t,"/"),s),o=n.find(u=>u.kind==="category");if(!o)return n;const c=Be(s.template,{[s.paramName]:o.value});if(c==="/")return n;try{const u=e.optionsFromPayload(await zr(t,c),s).filter(i=>i.kind==="product");return Ca([n,u])}catch{return n}}function Fc(t,e,s){return tn.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":s}`)}async function Dc(t,e,s,n){if(e.homepageLinks)return $c(t,e,n);const o=e.buildRequests?.(s)??[];if(o.length===0)return[];const c=await Promise.allSettled(o.map(i=>_c(t,i))),u=c.filter(i=>i.status==="fulfilled").map(i=>i.value);if(u.length===0){const i=c.find(a=>a.status==="rejected");throw i?i.reason:new Error("Failed to fetch options")}return Ca(u.map(i=>e.optionsFromPayload(i,n)))}function Qs(t,e,s,n,o){return{queryKey:Fc(t,e,s),queryFn:()=>Dc(t,e,s,n),enabled:o,staleTime:6e4,retry:1}}function It(t){const e=le.c(16),{heading:s,iconKind:n,options:o,template:c,paramName:u,keyPrefix:i,onSelect:a}=t;if(o.length===0)return null;let l;if(e[0]!==n||e[1]!==i||e[2]!==a||e[3]!==o||e[4]!==u||e[5]!==c){let f;e[7]!==n||e[8]!==i||e[9]!==a||e[10]!==u||e[11]!==c?(f=p=>r.jsxs(qe,{value:`${i}:${p.value}`,className:"gap-3 py-2",onSelect:()=>a(p.value),children:[n==="product"&&r.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?r.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):r.jsx(an,{size:14,className:"text-muted-foreground"})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:p.label}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Be(c,{[u]:p.value})})]})]},`${i}:${p.value}`),e[7]=n,e[8]=i,e[9]=a,e[10]=u,e[11]=c,e[12]=f):f=e[12],l=o.map(f),e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=u,e[5]=c,e[6]=l}else l=e[6];let g;return e[13]!==s||e[14]!==l?(g=r.jsx(We,{heading:s,children:l}),e[13]=s,e[14]=l,e[15]=g):g=e[15],g}function Ir(t){const e=le.c(2),{text:s}=t;let n;return e[0]!==s?(n=r.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=n):n=e[1],n}function Bc(t){const e=le.c(52),{sources:s,template:n,paramName:o,value:c,sandboxRef:u,onCommit:i}=t,a=Se(),[l,g]=R.useState(!1),[f,p]=R.useState(""),[m,v]=R.useState(""),y=R.useRef(null),h=o==="*"?a("sandbox.preview.catchAllParamLabel"):`:${o}`,x=Oc(a),b=[...new Set(s.map(re=>x[re.kind].noun))].join(" or ");let w;e[0]!==a||e[1]!==b?(w=a("sandbox.pathParamPickerChip.searchPlaceholder",{options:b}),e[0]=a,e[1]=b,e[2]=w):w=e[2];const N=w,k={template:n,paramName:o};let S;e[3]!==f?(S=(re,ue)=>({source:re,query:ue,options:re.clientFilter?zt(ue.data??[],f):ue.data??[]}),e[3]=f,e[4]=S):S=e[4];const E=S,T=s.filter(Wc),B=s.filter(Vc),A=Gs({queries:T.map(re=>Qs(u,re,m,k,l))});let L;e[5]!==A||e[6]!==E?(L=(re,ue)=>E(re,A[ue]),e[5]=A,e[6]=E,e[7]=L):L=e[7];const $=T.map(L),_=$.length===0||$.every(Hc),F=Gs({queries:B.map(re=>Qs(u,re,m,k,l&&_))});let I;e[8]!==F||e[9]!==E?(I=(re,ue)=>E(re,F[ue]),e[8]=F,e[9]=E,e[10]=I):I=e[10];const J=B.map(I),W=_?J:$,Y=W.length===1&&W[0]?.source.homepageLinks?W[0]:null,Q=Y&&!Y.query.isLoading&&!Y.query.isError?Y?.query.data??[]:[],H=zt(Q.filter(Kc),f),ee=zt(Q.filter(Uc),f),q=H.length>0&&ee.length>0,U=re=>{g(re),y.current&&clearTimeout(y.current),p(re?c:""),v(re?c:"")};let z;e[11]===Symbol.for("react.memo_cache_sentinel")?(z=re=>{p(re),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{v(re)},300)},e[11]=z):z=e[11];const j=z,O=re=>{i(re),U(!1)},D=pn(f),K=Be(n,{[o]:D}),Z=en,te=Zs,M="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",X=Ic;let se;e[12]!==h||e[13]!==a?(se=a("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:h}),e[12]=h,e[13]=a,e[14]=se):se=e[14];let ae;e[15]!==se?(ae=r.jsx(sn,{className:"sr-only",children:r.jsx(nn,{children:se})}),e[15]=se,e[16]=ae):ae=e[16];let me;e[17]===Symbol.for("react.memo_cache_sentinel")?(me=r.jsx(an,{size:16,className:"shrink-0 text-foreground"}),e[17]=me):me=e[17];let pe;e[18]!==a?(pe=a("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=a,e[19]=pe):pe=e[19];let be;e[20]!==h?(be=r.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-xs text-special",children:h}),e[20]=h,e[21]=be):be=e[21];let ge;e[22]!==pe||e[23]!==be?(ge=r.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[me,r.jsxs("span",{className:"text-sm font-medium text-foreground",children:[pe," ",be]})]}),e[22]=pe,e[23]=be,e[24]=ge):ge=e[24];const ve=ln,Pe=!1,fe="min-h-0 flex-1";let de;e[25]!==N||e[26]!==f?(de=r.jsx(cn,{autoFocus:!0,placeholder:N,value:f,onValueChange:j}),e[25]=N,e[26]=f,e[27]=de):de=e[27];const Le=on,Ie="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Ue;e[28]!==a?(Ue=a("sandbox.pathParamPickerChip.noResults"),e[28]=a,e[29]=Ue):Ue=e[29];let Me;e[30]!==Ue?(Me=r.jsx(dn,{children:Ue}),e[30]=Ue,e[31]=Me):Me=e[31];const yt=D&&r.jsx(We,{className:"shrink-0",children:r.jsxs(qe,{value:`__raw__:${D}`,className:"gap-3 py-2",onSelect:()=>O(D),children:[r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:r.jsx(ha,{size:14,className:"text-muted-foreground"})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:a("sandbox.pathParamPickerChip.useRawValue",{rawTerm:D,paramLabel:h})}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:K})]})]})}),he=q?r.jsxs("div",{className:"flex min-h-0 flex-1",children:[r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:r.jsx(It,{heading:x.category.heading,iconKind:"category",options:H,template:n,paramName:o,keyPrefix:`${Y?.source.id}:cat`,onSelect:O})}),r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r.jsx(It,{heading:x.product.heading,iconKind:"product",options:ee,template:n,paramName:o,keyPrefix:`${Y?.source.id}:prod`,onSelect:O})})]}):r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.map(re=>{const{source:ue,query:Ge,options:wt}=re,{noun:Je}=x[ue.kind];if(Ge.isLoading)return r.jsx(Ir,{text:a("sandbox.pathParamPickerChip.loading",{noun:Je})},ue.id);if(Ge.isError)return r.jsx(Ir,{text:a("sandbox.pathParamPickerChip.couldNotLoad")},ue.id);if(ue.homepageLinks){const Ht=Ge.data??[];return r.jsxs(R.Fragment,{children:[r.jsx(It,{heading:x.category.heading,iconKind:"category",options:zt(Ht.filter(zc),f),template:n,paramName:o,keyPrefix:`${ue.id}:cat`,onSelect:O}),r.jsx(It,{heading:x.product.heading,iconKind:"product",options:zt(Ht.filter(Mc),f),template:n,paramName:o,keyPrefix:`${ue.id}:prod`,onSelect:O})]},ue.id)}return r.jsx(It,{heading:W.length>1?x[ue.kind].heading:void 0,iconKind:ue.kind,options:wt,template:n,paramName:o,keyPrefix:ue.id,onSelect:O},ue.id)})});let $e;e[32]!==Le||e[33]!==Me||e[34]!==yt||e[35]!==he?($e=r.jsxs(Le,{className:Ie,children:[Me,yt,he]}),e[32]=Le,e[33]=Me,e[34]=yt,e[35]=he,e[36]=$e):$e=e[36];let xe;e[37]!==ve||e[38]!==de||e[39]!==$e?(xe=r.jsxs(ve,{shouldFilter:Pe,className:fe,children:[de,$e]}),e[37]=ve,e[38]=de,e[39]=$e,e[40]=xe):xe=e[40];let Ke;e[41]!==te||e[42]!==ae||e[43]!==ge||e[44]!==xe||e[45]!==X?(Ke=r.jsxs(te,{className:M,onClick:X,children:[ae,ge,xe]}),e[41]=te,e[42]=ae,e[43]=ge,e[44]=xe,e[45]=X,e[46]=Ke):Ke=e[46];let Ae;return e[47]!==Z||e[48]!==U||e[49]!==l||e[50]!==Ke?(Ae=r.jsx(Z,{open:l,onOpenChange:U,children:Ke}),e[47]=Z,e[48]=U,e[49]=l,e[50]=Ke,e[51]=Ae):Ae=e[51],r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",title:a("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:h}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-xs text-special hover:bg-special/25",onClick:re=>{re.stopPropagation(),U(!0)},children:c||h}),Ae]})}function Mc(t){return t.kind==="product"}function zc(t){return t.kind!=="product"}function Ic(t){return t.stopPropagation()}function Uc(t){return t.kind==="product"}function Kc(t){return t.kind!=="product"}function Hc(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Vc(t){return t.isFallback}function Wc(t){return!t.isFallback}function qc(t){const e=le.c(8),{sources:s,template:n,paramName:o,sandboxRef:c,onFill:u}=t;let i,a;if(e[0]!==o||e[1]!==c||e[2]!==s||e[3]!==n){const m={template:n,paramName:o},v=s.filter(Gc);a=Gs,i=v.map(y=>Qs(c,y,"",m,!0)),e[0]=o,e[1]=c,e[2]=s,e[3]=n,e[4]=i,e[5]=a}else i=e[4],a=e[5];let l;e[6]!==i?(l={queries:i},e[6]=i,e[7]=l):l=e[7];const g=a(l),[f,p]=R.useState(!1);if(!f)for(const m of g){if(m.isLoading)break;const v=m.data?.[0];if(v){p(!0),queueMicrotask(()=>u(v.value));break}}return null}function Gc(t){return!t.isFallback}function Jc(t){const e=le.c(31),{name:s,value:n,onCommit:o}=t,c=Se(),[u,i]=R.useState(n),[a,l]=R.useState(!1),g=R.useRef(!1);let f;e[0]!==s||e[1]!==c?(f=s==="*"?c("sandbox.preview.catchAllParamLabel"):`:${s}`,e[0]=s,e[1]=c,e[2]=f):f=e[2];const p=f,m=u||p;let v;e[3]!==m?(v=r.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-xs",children:m}),e[3]=m,e[4]=v):v=e[4];let y;e[5]!==p||e[6]!==c?(y=c("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=c,e[7]=y):y=e[7];let h,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=E=>i(E.target.value),x=()=>l(!0),e[8]=h,e[9]=x):(h=e[8],x=e[9]);let C;e[10]!==n?(C=E=>{E.key==="Enter"&&E.currentTarget.blur(),E.key==="Escape"&&(g.current=!0,i(n),E.currentTarget.blur())},e[10]=n,e[11]=C):C=e[11];let b;e[12]!==u||e[13]!==o||e[14]!==n?(b=()=>{if(l(!1),g.current){g.current=!1;return}const E=pn(u);i(E),E!==n&&o(E)},e[12]=u,e[13]=o,e[14]=n,e[15]=b):b=e[15];let w;e[16]!==u||e[17]!==p||e[18]!==y||e[19]!==C||e[20]!==b?(w=r.jsx("input",{type:"text",value:u,placeholder:p,title:y,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-xs text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:Yc,onChange:h,onFocus:x,onKeyDown:C,onBlur:b}),e[16]=u,e[17]=p,e[18]=y,e[19]=C,e[20]=b,e[21]=w):w=e[21];let N;e[22]!==v||e[23]!==w?(N=r.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[v,w]}),e[22]=v,e[23]=w,e[24]=N):N=e[24];let k;e[25]!==a||e[26]!==c?(k=a&&r.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-2xs text-muted-foreground",children:[r.jsx(Io,{size:10}),c("sandbox.preview.enterToGo")]}),e[25]=a,e[26]=c,e[27]=k):k=e[27];let S;return e[28]!==k||e[29]!==N?(S=r.jsxs(r.Fragment,{children:[N,k]}),e[28]=k,e[29]=N,e[30]=S):S=e[30],S}function Yc(t){return t.stopPropagation()}const Qc=/^(?:autor|author|authorSlug)$/;function Ur(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}const us=t=>typeof t=="string"?t:"";function Xc(t,e,s,n=new Date().toISOString().slice(0,10)){const o=Ci(e),[c]=xt(e);if(o.length===0||o.includes("*")||c?.type!=="text"||c.text==="/")return[];const u=tl(t),i=m=>u[m].map(v=>({label:v.label,data:Ur(Ur(t[v.key])[nl[m]])})),a=[],l=i("posts").filter(({data:m})=>sl(m)==="published"&&us(m.date).slice(0,10)<=n).sort((m,v)=>us(v.data.date).localeCompare(us(m.data.date)));for(const{label:m,data:v}of l)a.push({label:m,path:al(t,v,s)});for(const{label:m,data:v}of i("categories"))a.push({label:m,path:ol(t,v,s)});const g=o.find(m=>Qc.test(m));if(g)for(const{label:m,data:v}of i("authors")){const y=us(v.slug);a.push({label:m,path:y?Be(e,{[g]:y}):null})}const f=[],p=new Set;for(const{label:m,path:v}of a){if(!v)continue;const y={};for(const x of o){const C=gn(v,e,x);if(!C)break;y[x]=C}if(Object.keys(y).length!==o.length)continue;const h=Be(e,y);p.has(h)||(p.add(h),f.push({label:m,values:y}))}return f}function Zc(t){const e=le.c(96),{paramName:s,template:n,value:o,options:c,onPick:u,onCommit:i}=t,a=Se(),[l,g]=R.useState(!1),[f,p]=R.useState(""),m=`:${s}`;let v;if(e[0]!==c||e[1]!==f){const U=f.trim().toLowerCase();v=U?c.filter(z=>z.label.toLowerCase().includes(U)||Object.values(z.values).some(j=>j.toLowerCase().includes(U))):c,e[0]=c,e[1]=f,e[2]=v}else v=e[2];const y=v;let h,x,C,b,w,N,k,S,E,T,B,A,L,$,_,F,I,J;if(e[3]!==i||e[4]!==l||e[5]!==m||e[6]!==f||e[7]!==a||e[8]!==o){const U=pn(f);let z;e[27]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{g(!1),p("")},e[27]=z):z=e[27],w=z;let j;e[28]!==m||e[29]!==a?(j=a("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:m}),e[28]=m,e[29]=a,e[30]=j):j=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=ae=>{ae.stopPropagation(),g(!0)},e[31]=O):O=e[31];const D=o||m;e[32]!==j||e[33]!==D?(T=r.jsx("button",{type:"button",title:j,className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-xs text-special hover:bg-special/25",onClick:O,children:D}),e[32]=j,e[33]=D,e[34]=T):T=e[34],b=en,S=l,e[35]===Symbol.for("react.memo_cache_sentinel")?(E=ae=>ae?g(!0):w(),e[35]=E):E=e[35],C=Zs,I="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",J=ed;let K;e[36]!==m||e[37]!==a?(K=a("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:m}),e[36]=m,e[37]=a,e[38]=K):K=e[38],e[39]!==K?(N=r.jsx(sn,{className:"sr-only",children:r.jsx(nn,{children:K})}),e[39]=K,e[40]=N):N=e[40];let Z;e[41]===Symbol.for("react.memo_cache_sentinel")?(Z=r.jsx(an,{size:16,className:"shrink-0 text-foreground"}),e[41]=Z):Z=e[41];let te;e[42]!==a?(te=a("sandbox.pathParamPickerChip.pickValueHeading"),e[42]=a,e[43]=te):te=e[43];let M;e[44]!==m?(M=r.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-xs text-special",children:m}),e[44]=m,e[45]=M):M=e[45],e[46]!==te||e[47]!==M?(k=r.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[Z,r.jsxs("span",{className:"text-sm font-medium text-foreground",children:[te," ",M]})]}),e[46]=te,e[47]=M,e[48]=k):k=e[48],x=ln,$=!1,_="min-h-0 flex-1";let X;e[49]!==a?(X=a("sandbox.pathParamPickerChip.searchBlogPlaceholder"),e[49]=a,e[50]=X):X=e[50],e[51]!==f||e[52]!==X?(F=r.jsx(cn,{autoFocus:!0,placeholder:X,value:f,onValueChange:p}),e[51]=f,e[52]=X,e[53]=F):F=e[53],h=on,B="max-h-none min-h-0 flex-1 overflow-y-auto";let se;e[54]!==a?(se=a("sandbox.pathParamPickerChip.noResults"),e[54]=a,e[55]=se):se=e[55],e[56]!==se?(A=r.jsx(dn,{children:se}),e[56]=se,e[57]=A):A=e[57],L=U&&r.jsx(We,{children:r.jsxs(qe,{value:`__raw__:${U}`,className:"gap-3 py-2",onSelect:()=>{i(U),w()},children:[r.jsx(ha,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a("sandbox.pathParamPickerChip.useRawValue",{rawTerm:U,paramLabel:m})})]})}),e[3]=i,e[4]=l,e[5]=m,e[6]=f,e[7]=a,e[8]=o,e[9]=h,e[10]=x,e[11]=C,e[12]=b,e[13]=w,e[14]=N,e[15]=k,e[16]=S,e[17]=E,e[18]=T,e[19]=B,e[20]=A,e[21]=L,e[22]=$,e[23]=_,e[24]=F,e[25]=I,e[26]=J}else h=e[9],x=e[10],C=e[11],b=e[12],w=e[13],N=e[14],k=e[15],S=e[16],E=e[17],T=e[18],B=e[19],A=e[20],L=e[21],$=e[22],_=e[23],F=e[24],I=e[25],J=e[26];let W;if(e[58]!==w||e[59]!==u||e[60]!==n||e[61]!==y){let U;e[63]!==w||e[64]!==u||e[65]!==n?(U=z=>{const j=Be(n,z.values);return r.jsx(qe,{value:j,className:"py-2",onSelect:()=>{u(z.values),w()},children:r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:z.label}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:j})]})},j)},e[63]=w,e[64]=u,e[65]=n,e[66]=U):U=e[66],W=y.map(U),e[58]=w,e[59]=u,e[60]=n,e[61]=y,e[62]=W}else W=e[62];let Y;e[67]!==W?(Y=r.jsx(We,{children:W}),e[67]=W,e[68]=Y):Y=e[68];let G;e[69]!==h||e[70]!==Y||e[71]!==B||e[72]!==A||e[73]!==L?(G=r.jsxs(h,{className:B,children:[A,L,Y]}),e[69]=h,e[70]=Y,e[71]=B,e[72]=A,e[73]=L,e[74]=G):G=e[74];let Q;e[75]!==x||e[76]!==G||e[77]!==$||e[78]!==_||e[79]!==F?(Q=r.jsxs(x,{shouldFilter:$,className:_,children:[F,G]}),e[75]=x,e[76]=G,e[77]=$,e[78]=_,e[79]=F,e[80]=Q):Q=e[80];let H;e[81]!==C||e[82]!==N||e[83]!==k||e[84]!==Q||e[85]!==I||e[86]!==J?(H=r.jsxs(C,{className:I,onClick:J,children:[N,k,Q]}),e[81]=C,e[82]=N,e[83]=k,e[84]=Q,e[85]=I,e[86]=J,e[87]=H):H=e[87];let ee;e[88]!==b||e[89]!==S||e[90]!==E||e[91]!==H?(ee=r.jsx(b,{open:S,onOpenChange:E,children:H}),e[88]=b,e[89]=S,e[90]=E,e[91]=H,e[92]=ee):ee=e[92];let q;return e[93]!==T||e[94]!==ee?(q=r.jsxs(r.Fragment,{children:[T,ee]}),e[93]=T,e[94]=ee,e[95]=q):q=e[95],q}function ed(t){return t.stopPropagation()}function td(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const s=new URL(e),n=t.resolvedPath==="/"?"":t.resolvedPath;return`${s.host}${n}`}catch{return e}}function sd(t){return t.previewSurfaceActive&&(t.daemonReady||t.production||!!t.servePreviewUrl)}function nd(t){return t.showPreviewToolbar&&(t.contentEditingEnabled||t.hasFrameworkRoutes)}function rd(t){return t.v8?null:t.production||t.localPreview?{type:"editor::inject",args:{script:t.script}}:{type:"visual-editor::activate",script:t.script}}function ad(t){return t.v8?null:{type:"visual-editor::activate",script:t.script}}class La extends Error{constructor(){super("The site's schema isn't loaded yet"),this.name="PageSchemaNotReadyError"}}async function od(t,e){if(t)return t;const s=await e?.().catch(()=>null);if(!s)throw new La;return s}async function id(t,e,s){return s?Cr(t,e,await od(s.meta,s.loadMeta)):Cr(t,e)}function ld(t){const e=le.c(5);let s;e[0]!==t?(s=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=s):s=e[1];const n=il(s);let o;return e[2]!==t||e[3]!==n?(o={mutationFn:async c=>{const{name:u,path:i,template:a,schema:l}=c;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const g=Hi(u),f=a?{...a,name:u,path:i}:await id(u,i,l);return await n.mutateAsync({blockKey:g,data:f}),{key:g,name:u,path:i}}},e[2]=t,e[3]=n,e[4]=o):o=e[4],Eo(o)}function cd(t){const e=le.c(89),{open:s,onOpenChange:n,isPending:o,error:c,templates:u,onSubmit:i}=t,a=o===void 0?!1:o,l=Se();let g;e[0]!==l?(g=l("sectionsEditor.createPageModal.defaultPageName"),e[0]=l,e[1]=g):g=e[1];const[f,p]=R.useState(g);let m;e[2]!==l?(m=l("sectionsEditor.createPageModal.defaultPagePath"),e[2]=l,e[3]=m):m=e[3];const[v,y]=R.useState(m),[h,x]=R.useState(Fs),[C,b]=R.useState(null),[w,N]=R.useState(s);s!==w&&(N(s),s&&(p(l("sectionsEditor.createPageModal.defaultPageName")),y(l("sectionsEditor.createPageModal.defaultPagePath")),x(Fs),b(null)));const k=!!u?.length;let S;e[4]!==a||e[5]!==n?(S=pe=>{!pe&&!a&&(b(null),n(!1))},e[4]=a,e[5]=n,e[6]=S):S=e[6];const E=S;let T;e[7]!==a||e[8]!==f||e[9]!==i||e[10]!==v||e[11]!==k||e[12]!==h?(T=async pe=>{pe.preventDefault();const be=f.trim(),ge=v.trim();if(!be||!ge||a)return;const ve=pa(ge);if(ve){b(ve);return}b(null),await i({name:be,path:ge,templateKey:k&&h!==Fs?h:null})},e[7]=a,e[8]=f,e[9]=i,e[10]=v,e[11]=k,e[12]=h,e[13]=T):T=e[13];const B=T,A=C??c;let L;e[14]!==l?(L=l("sectionsEditor.createPageModal.title"),e[14]=l,e[15]=L):L=e[15];let $;e[16]!==L?($=r.jsx(sn,{children:r.jsx(nn,{children:L})}),e[16]=L,e[17]=$):$=e[17];let _;e[18]!==l?(_=l("sectionsEditor.createPageModal.nameLabel"),e[18]=l,e[19]=_):_=e[19];let F;e[20]!==_?(F=r.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:_}),e[20]=_,e[21]=F):F=e[21];let I;e[22]===Symbol.for("react.memo_cache_sentinel")?(I=pe=>p(pe.target.value),e[22]=I):I=e[22];let J;e[23]!==l?(J=l("sectionsEditor.createPageModal.namePlaceholder"),e[23]=l,e[24]=J):J=e[24];let W;e[25]!==a||e[26]!==f||e[27]!==J?(W=r.jsx(Hs,{id:"new-page-name",value:f,onChange:I,placeholder:J,autoFocus:!0,disabled:a}),e[25]=a,e[26]=f,e[27]=J,e[28]=W):W=e[28];let Y;e[29]!==W||e[30]!==F?(Y=r.jsxs("div",{className:"space-y-1.5",children:[F,W]}),e[29]=W,e[30]=F,e[31]=Y):Y=e[31];let G;e[32]!==l?(G=l("sectionsEditor.createPageModal.pathLabel"),e[32]=l,e[33]=G):G=e[33];let Q;e[34]!==G?(Q=r.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:G}),e[34]=G,e[35]=Q):Q=e[35];let H;e[36]===Symbol.for("react.memo_cache_sentinel")?(H=pe=>y(pe.target.value),e[36]=H):H=e[36];let ee;e[37]!==l?(ee=l("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=l,e[38]=ee):ee=e[38];let q;e[39]!==a||e[40]!==v||e[41]!==ee?(q=r.jsx(Hs,{id:"new-page-path",value:v,onChange:H,placeholder:ee,disabled:a}),e[39]=a,e[40]=v,e[41]=ee,e[42]=q):q=e[42];let U;e[43]!==Q||e[44]!==q?(U=r.jsxs("div",{className:"space-y-1.5",children:[Q,q]}),e[43]=Q,e[44]=q,e[45]=U):U=e[45];let z;e[46]!==a||e[47]!==k||e[48]!==l||e[49]!==h||e[50]!==u?(z=k&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:l("sectionsEditor.createPageModal.templateLabel")}),r.jsx(Vi,{id:"new-page-template",value:h,onChange:x,templates:u??[],disabled:a})]}),e[46]=a,e[47]=k,e[48]=l,e[49]=h,e[50]=u,e[51]=z):z=e[51];let j;e[52]!==A?(j=A&&r.jsx("p",{className:"text-xs text-destructive",children:A}),e[52]=A,e[53]=j):j=e[53];let O;e[54]!==Y||e[55]!==U||e[56]!==z||e[57]!==j?(O=r.jsxs("div",{className:"space-y-4 py-4",children:[Y,U,z,j]}),e[54]=Y,e[55]=U,e[56]=z,e[57]=j,e[58]=O):O=e[58];let D;e[59]!==n?(D=()=>n(!1),e[59]=n,e[60]=D):D=e[60];let K;e[61]!==l?(K=l("sectionsEditor.createPageModal.cancelButton"),e[61]=l,e[62]=K):K=e[62];let Z;e[63]!==a||e[64]!==D||e[65]!==K?(Z=r.jsx(_e,{type:"button",variant:"outline",onClick:D,disabled:a,children:K}),e[63]=a,e[64]=D,e[65]=K,e[66]=Z):Z=e[66];let te;e[67]!==a||e[68]!==f||e[69]!==v?(te=!f.trim()||!v.trim()||a,e[67]=a,e[68]=f,e[69]=v,e[70]=te):te=e[70];let M;e[71]!==a||e[72]!==l?(M=a?r.jsxs(r.Fragment,{children:[r.jsx(it,{className:"size-3.5"}),l("sectionsEditor.createPageModal.creatingButton")]}):l("sectionsEditor.createPageModal.createButton"),e[71]=a,e[72]=l,e[73]=M):M=e[73];let X;e[74]!==te||e[75]!==M?(X=r.jsx(_e,{type:"submit",disabled:te,children:M}),e[74]=te,e[75]=M,e[76]=X):X=e[76];let se;e[77]!==Z||e[78]!==X?(se=r.jsxs(No,{children:[Z,X]}),e[77]=Z,e[78]=X,e[79]=se):se=e[79];let ae;e[80]!==B||e[81]!==O||e[82]!==se||e[83]!==$?(ae=r.jsx(Zs,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:B,children:[$,O,se]})}),e[80]=B,e[81]=O,e[82]=se,e[83]=$,e[84]=ae):ae=e[84];let me;return e[85]!==E||e[86]!==s||e[87]!==ae?(me=r.jsx(en,{open:s,onOpenChange:E,children:ae}),e[85]=E,e[86]=s,e[87]=ae,e[88]=me):me=e[88],me}function dd(t){const e=le.c(35),{orgSlug:s,virtualMcpId:n,branch:o,previewUrl:c,meta:u,decofile:i,blockKey:a}=t,l=Se();let g;e[0]!==o||e[1]!==s||e[2]!==n?(g={orgSlug:s,virtualMcpId:n,branch:o},e[0]=o,e[1]=s,e[2]=n,e[3]=g):g=e[3];const f=ll(g,i);let p;e[4]!==a||e[5]!==i?(p=Wi(i,a),e[4]=a,e[5]=i,e[6]=p):p=e[6];const{resolveType:m,props:v,title:y}=p;if(!m){let N;e[7]!==l?(N=l("sandbox.preview.loaderNoLongerExists"),e[7]=l,e[8]=N):N=e[8];let k;return e[9]!==N?(k=r.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:N}),e[9]=N,e[10]=k):k=e[10],k}const h=`loader:${a}`,x=`loader:${a}`;let C;e[11]!==a||e[12]!==m||e[13]!==y?(C={mode:"saved",blockKey:a,resolveType:m,title:y},e[11]=a,e[12]=m,e[13]=y,e[14]=C):C=e[14];let b;e[15]!==o||e[16]!==i||e[17]!==u||e[18]!==s||e[19]!==c||e[20]!==v||e[21]!==f.isPending||e[22]!==f.save||e[23]!==x||e[24]!==C||e[25]!==n?(b=r.jsx(qi,{orgSlug:s,virtualMcpId:n,branch:o,previewUrl:c,meta:u,decofile:i,kind:"loaders",target:C,initialValue:v,isCreating:f.isPending,onCreate:ud,onSaveReferencedBlock:f.save,showRun:!1},x),e[15]=o,e[16]=i,e[17]=u,e[18]=s,e[19]=c,e[20]=v,e[21]=f.isPending,e[22]=f.save,e[23]=x,e[24]=C,e[25]=n,e[26]=b):b=e[26];let w;return e[27]!==a||e[28]!==o||e[29]!==i||e[30]!==s||e[31]!==h||e[32]!==b||e[33]!==n?(w=r.jsx(cl,{listing:i,orgSlug:s,virtualMcpId:n,branch:o,blockKey:a,present:void 0,children:b},h),e[27]=a,e[28]=o,e[29]=i,e[30]=s,e[31]=h,e[32]=b,e[33]=n,e[34]=w):w=e[34],w}async function ud(){}function fd(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Kr(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:fd(t.error)}}function pd(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 md(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=pd(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const s=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return s&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(o=>o.status==="error"&&!o.hasData&&o.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:s?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const hd=R.lazy(()=>Co(()=>import("./sections-editor-B2wYNbjz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162])).then(t=>({default:t.SectionsEditor})));function Hr(t){const e=le.c(62),{virtualMcpId:s,externalSelection:n,onSectionPicked:o,onViewJsonFile:c}=t,u=n===void 0?null:n,{org:i}=gs(),{currentBranch:a,taskId:l}=lt(),g=mn(),f=bt(),p=va(),m=g.lifecycle.phase==="running",v=f.previewUrl;let y;e[0]!==a||e[1]!==i||e[2]!==v||e[3]!==l||e[4]!==s?(y=a?{orgSlug:i.slug,virtualMcpId:s,branch:a,threadId:l??null,previewUrl:v}:null,e[0]=a,e[1]=i,e[2]=v,e[3]=l,e[4]=s,e[5]=y):y=e[5];const h=y,x=Kt(s,a);let C;e[6]!==m?(C={fetchEnabled:m},e[6]=m,e[7]=C):C=e[7];const b=vs(h,C),w=oa(h);let N;e[8]!==m?(N={fetchEnabled:m},e[8]=m,e[9]=N):N=e[9];const k=ma(h,N),S=md({lifecyclePhase:g.lifecycle.phase,decofile:Kr(b),meta:Kr(k),hasEditableContent:Ti(b.data,k.data),fastPreviewActive:aa(s).runtime==="cms"||tt(x)}),E=rn()===void 0,T=gd;if(Ri(x)){let j;return e[10]===Symbol.for("react.memo_cache_sentinel")?(j=T(r.jsx(Ai,{})),e[10]=j):j=e[10],j}if(x.kind==="pending"&&x.retrying){let j;return e[11]!==x?(j=T(r.jsx(Oi,{backend:x})),e[11]=x,e[12]=j):j=e[12],j}if(S.kind==="loading"||E){let j;return e[13]===Symbol.for("react.memo_cache_sentinel")?(j=T(r.jsx(To,{})),e[13]=j):j=e[13],j}if(b.data&&ci(k.data)){const j=p.state.target,O=j?.kind==="page"||j?.kind==="section"?j.key:null,D=x.kind==="legacy"?O??"":`${w}:${O??""}`,K=a??"";let Z;return e[14]!==b.data||e[15]!==O||e[16]!==i.slug||e[17]!==D||e[18]!==K||e[19]!==s?(Z=T(r.jsx(Gi,{orgSlug:i.slug,virtualMcpId:s,branch:K,decofile:b.data,initialKey:O,compact:!0},D)),e[14]=b.data,e[15]=O,e[16]=i.slug,e[17]=D,e[18]=K,e[19]=s,e[20]=Z):Z=e[20],Z}if(S.kind==="empty"){let j;return e[21]===Symbol.for("react.memo_cache_sentinel")?(j=T(r.jsx(_i,{})),e[21]=j):j=e[21],j}if(S.kind==="error"){let j;e[22]!==b||e[23]!==f||e[24]!==k||e[25]!==S.source?(j=()=>{if(S.source==="sandbox"){f.retry();return}Promise.all([b.refetch(),k.refetch()])},e[22]=b,e[23]=f,e[24]=k,e[25]=S.source,e[26]=j):j=e[26];const O=j;let D;return e[27]!==O||e[28]!==S.source?(D=T(r.jsx(Li,{source:S.source,onRetry:O})),e[27]=O,e[28]=S.source,e[29]=D):D=e[29],D}let B;e[30]===Symbol.for("react.memo_cache_sentinel")?(B=j=>T(r.jsx("div",{className:"h-full min-h-0",children:j})),e[30]=B):B=e[30];const A=B,L=p.state.target;if(L?.kind==="loader"&&b.data&&k.data){const j=x.kind==="legacy"?void 0:w,O=a??"",D=v??null;let K;return e[31]!==b.data||e[32]!==k.data||e[33]!==i.slug||e[34]!==j||e[35]!==O||e[36]!==D||e[37]!==L.key||e[38]!==s?(K=A(r.jsx(dd,{orgSlug:i.slug,virtualMcpId:s,branch:O,previewUrl:D,meta:k.data,decofile:b.data,blockKey:L.key},j)),e[31]=b.data,e[32]=k.data,e[33]=i.slug,e[34]=j,e[35]=O,e[36]=D,e[37]=L.key,e[38]=s,e[39]=K):K=e[39],K}let $;e[40]!==a||e[41]!==i.slug||e[42]!==L||e[43]!==s?($=L||!a?null:Qr(Xr(i.slug,s,a)),e[40]=a,e[41]=i.slug,e[42]=L,e[43]=s,e[44]=$):$=e[44];const _=$;let F="/",I=null,J=null;L?.kind==="page"?(F=L.path,I=L.key):L?.kind==="section"?J=L.key:_&&(F=_.path,I=_.pageKey);const W=I?`page:${I}`:J?`section:${J}`:`path:${F}`;let Y;e[45]===Symbol.for("react.memo_cache_sentinel")?(Y=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(it,{className:"size-5 text-muted-foreground"})}),e[45]=Y):Y=e[45];const G=x.kind==="legacy"?W:`${w}:${W}`,Q=a??"",H=v??void 0,ee=J?null:u,q=J?void 0:o,U=!!I&&p.state.editSeoPageKey===I;let z;return e[46]!==J||e[47]!==I||e[48]!==F||e[49]!==c||e[50]!==i.slug||e[51]!==H||e[52]!==ee||e[53]!==q||e[54]!==U||e[55]!==G||e[56]!==Q||e[57]!==s||e[58]!==p.consumeEditSeo||e[59]!==p.setFocusedBlock||e[60]!==p.setVariantOverride?(z=A(r.jsx(R.Suspense,{fallback:Y,children:r.jsx(hd,{orgSlug:i.slug,virtualMcpId:s,branch:Q,previewReady:!0,previewUrl:H,currentPath:F,activePageBlockKey:I,activeGlobalBlockKey:J,externalSelection:ee,onSectionPicked:q,initialEditSeo:U,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onFocusedBlockChange:p.setFocusedBlock,onViewJsonFile:c},G)})),e[46]=J,e[47]=I,e[48]=F,e[49]=c,e[50]=i.slug,e[51]=H,e[52]=ee,e[53]=q,e[54]=U,e[55]=G,e[56]=Q,e[57]=s,e[58]=p.consumeEditSeo,e[59]=p.setFocusedBlock,e[60]=p.setVariantOverride,e[61]=z):z=e[61],z}function gd(t){return r.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function vd(t){const e=le.c(51),{virtualMcpId:s,pageKey:n,onClose:o,ref:c}=t,u=Se(),i=rn(),a=i===!0,l=un(s);let g;e[0]!==l||e[1]!==n?(g=ia(l,wa(n)),e[0]=l,e[1]=n,e[2]=g):g=e[2];const f=g,{org:p}=gs(),{currentBranch:m,taskId:v}=lt(),h=bt().previewUrl;let x;e[3]!==m||e[4]!==p.slug||e[5]!==h||e[6]!==v||e[7]!==s?(x=m?{orgSlug:p.slug,virtualMcpId:s,branch:m,threadId:v??null,previewUrl:h}:null,e[3]=m,e[4]=p.slug,e[5]=h,e[6]=v,e[7]=s,e[8]=x):x=e[8];const b=vs(x),w=m??"";let N;e[9]!==p.slug||e[10]!==w||e[11]!==s?(N={orgSlug:p.slug,virtualMcpId:s,branch:w},e[9]=p.slug,e[10]=w,e[11]=s,e[12]=N):N=e[12];let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={holdsCopy:!0},e[13]=k):k=e[13];const{save:S,flush:E,hold:T}=ga(N,k),B=m??"";let A;e[14]!==p.slug||e[15]!==B||e[16]!==s?(A=ba({orgSlug:p.slug,virtualMcpId:s,branch:B}),e[14]=p.slug,e[15]=B,e[16]=s,e[17]=A):A=e[17];const L=ya(A);let $;e[18]!==n||e[19]!==L?($=L(n),e[18]=n,e[19]=L,e[20]=$):$=e[20];const _=$;let F;e[21]!==_||e[22]!==n?(F={pageKey:n,copyEpoch:_},e[21]=_,e[22]=n,e[23]=F):F=e[23];const[I,J]=R.useState(F);(I.pageKey!==n||I.copyEpoch!==_)&&(J({pageKey:n,copyEpoch:_}),T(n));const W=b.data?.[n],Y=b.data===void 0&&b.isLoading||i===void 0,G=b.data!==void 0&&W===void 0,Q=!m||G||Y;let H;e[24]!==W?(H=W===void 0?"":JSON.stringify(W,null,2),e[24]=W,e[25]=H):H=e[25];const ee=H;let q;e[26]!==n||e[27]!==Q||e[28]!==S?(q=K=>{if(Q)return;let Z;try{Z=JSON.parse(K)}catch{return}Z===null||typeof Z!="object"||Array.isArray(Z)||S(n,Z)},e[26]=n,e[27]=Q,e[28]=S,e[29]=q):q=e[29];const U=q;let z;e[30]!==E?(z=()=>({flush:E}),e[30]=E,e[31]=z):z=e[31],R.useImperativeHandle(c,z);let j;e[32]!==f||e[33]!==a||e[34]!==o||e[35]!==u?(j=a?r.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:r.jsx("span",{title:f,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f})}):r.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:u("sectionsEditor.pageJsonDialog.titleShort")}),r.jsx(_e,{variant:"ghost",size:"icon-sm",onClick:o,"aria-label":u("sectionsEditor.pageJsonDialog.close"),className:"shrink-0",children:r.jsx(Gr,{size:14})})]}),e[32]=f,e[33]=a,e[34]=o,e[35]=u,e[36]=j):j=e[36];let O;e[37]!==_||e[38]!==b.data||e[39]!==E||e[40]!==ee||e[41]!==Y||e[42]!==G||e[43]!==n||e[44]!==Q||e[45]!==U||e[46]!==u?(O=Y?r.jsx("div",{className:"flex flex-1 items-center justify-center",children:r.jsx(it,{className:"size-5 text-muted-foreground"})}):G?r.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",u("sectionsEditor.pageJsonDialog.pageNotFound")]}):r.jsx("div",{className:"min-h-0 flex-1",children:r.jsx(xa,{code:ee,language:"json",readOnly:Q,height:"100%",onChange:K=>U(K??""),onSave:K=>{U(K),E()}},`${n}:${b.data===void 0?"loading":"ready"}:${_}`)}),e[37]=_,e[38]=b.data,e[39]=E,e[40]=ee,e[41]=Y,e[42]=G,e[43]=n,e[44]=Q,e[45]=U,e[46]=u,e[47]=O):O=e[47];let D;return e[48]!==j||e[49]!==O?(D=r.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[j,O]}),e[48]=j,e[49]=O,e[50]=D):D=e[50],D}function Vr(t){const e=le.c(3),{currentBranch:s}=lt(),n=Kt(t.virtualMcpId,s);let o;return e[0]!==n.kind||e[1]!==t?(o=n.kind==="legacy"?r.jsx(vd,{...t}):r.jsx(xd,{...t}),e[0]=n.kind,e[1]=t,e[2]=o):o=e[2],o}function xd(t){const e=le.c(61),{virtualMcpId:s,pageKey:n,onClose:o,ref:c}=t,u=Se(),i=rn(),a=i===!0,l=un(s);let g;e[0]!==l||e[1]!==n?(g=ia(l,wa(n)),e[0]=l,e[1]=n,e[2]=g):g=e[2];const f=g,{org:p}=gs(),{currentBranch:m,taskId:v}=lt(),h=bt().previewUrl;let x;e[3]!==m||e[4]!==p.slug||e[5]!==h||e[6]!==v||e[7]!==s?(x=m?{orgSlug:p.slug,virtualMcpId:s,branch:m,threadId:v??null,previewUrl:h}:null,e[3]=m,e[4]=p.slug,e[5]=h,e[6]=v,e[7]=s,e[8]=x):x=e[8];const C=x,b=vs(C);let w;e[9]!==n?(w=[n],e[9]=n,e[10]=w):w=e[10];let N;e[11]!==b.data?(N={listing:b.data},e[11]=b.data,e[12]=N):N=e[12];const k=la(C,w,N),S=m??"";let E;e[13]!==p.slug||e[14]!==S||e[15]!==s?(E={orgSlug:p.slug,virtualMcpId:s,branch:S},e[13]=p.slug,e[14]=S,e[15]=s,e[16]=E):E=e[16];let T;e[17]===Symbol.for("react.memo_cache_sentinel")?(T={holdsCopy:!0},e[17]=T):T=e[17];const{save:B,flush:A,hold:L}=ga(E,T),$=m??"";let _;e[18]!==p.slug||e[19]!==$||e[20]!==s?(_=ba({orgSlug:p.slug,virtualMcpId:s,branch:$}),e[18]=p.slug,e[19]=$,e[20]=s,e[21]=_):_=e[21];const F=ya(_);let I;e[22]!==n||e[23]!==F?(I=F(n),e[22]=n,e[23]=F,e[24]=I):I=e[24];const J=I,W=b.data?.[n];let Y;e[25]!==k.ready||e[26]!==b.data||e[27]!==W?(Y=k.ready&&b.data!==void 0&&(W===void 0||gr(W)),e[25]=k.ready,e[26]=b.data,e[27]=W,e[28]=Y):Y=e[28];const G=Y;let Q;e[29]!==J||e[30]!==n?(Q={pageKey:n,copyEpoch:J,opened:!1,code:""},e[29]=J,e[30]=n,e[31]=Q):Q=e[31];const[H,ee]=R.useState(Q);if(G&&(H.pageKey!==n||H.copyEpoch!==J||!H.opened)){let X;e[32]!==W?(X=W===void 0?"":JSON.stringify(W,null,2),e[32]=W,e[33]=X):X=e[33],ee({pageKey:n,copyEpoch:J,opened:!0,code:X}),gr(W)&&L(n)}const q=H.pageKey===n&&H.opened,U=i===void 0||!q&&!G,z=G&&W===void 0,j=!m||z||U;let O;e[34]!==n||e[35]!==j||e[36]!==B?(O=X=>{if(j)return;ee(ae=>({...ae,code:X}));let se;try{se=JSON.parse(X)}catch{return}se===null||typeof se!="object"||Array.isArray(se)||B(n,se)},e[34]=n,e[35]=j,e[36]=B,e[37]=O):O=e[37];const D=O;let K;e[38]!==A?(K=()=>({flush:A}),e[38]=A,e[39]=K):K=e[39],R.useImperativeHandle(c,K);let Z;e[40]!==f||e[41]!==a||e[42]!==o||e[43]!==u?(Z=a?r.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:r.jsx("span",{title:f,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f})}):r.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:u("sectionsEditor.pageJsonDialog.titleShort")}),r.jsx(_e,{variant:"ghost",size:"icon-sm",onClick:o,"aria-label":u("sectionsEditor.pageJsonDialog.close"),className:"shrink-0",children:r.jsx(Gr,{size:14})})]}),e[40]=f,e[41]=a,e[42]=o,e[43]=u,e[44]=Z):Z=e[44];let te;e[45]!==k.failed||e[46]!==k.retry||e[47]!==A||e[48]!==H.code||e[49]!==H.copyEpoch||e[50]!==H.pageKey||e[51]!==U||e[52]!==z||e[53]!==j||e[54]!==D||e[55]!==q||e[56]!==u?(te=!q&&k.failed?r.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-4",children:[r.jsx("p",{className:"text-sm",children:u("sectionsEditor.hosted.blockLoadFailed")}),r.jsx(_e,{variant:"outline",size:"sm",onClick:k.retry,children:u("sectionsEditor.namedRules.tryAgain")})]}):U?r.jsx("div",{className:"flex flex-1 items-center justify-center",children:r.jsx(it,{className:"size-5 text-muted-foreground"})}):z?r.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",u("sectionsEditor.pageJsonDialog.pageNotFound")]}):r.jsx("div",{className:"min-h-0 flex-1",children:r.jsx(xa,{code:H.code,language:"json",readOnly:j,height:"100%",onChange:X=>D(X??""),onSave:X=>{D(X),A()}},`${H.pageKey}:${H.copyEpoch}`)}),e[45]=k.failed,e[46]=k.retry,e[47]=A,e[48]=H.code,e[49]=H.copyEpoch,e[50]=H.pageKey,e[51]=U,e[52]=z,e[53]=j,e[54]=D,e[55]=q,e[56]=u,e[57]=te):te=e[57];let M;return e[58]!==Z||e[59]!==te?(M=r.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[Z,te]}),e[58]=Z,e[59]=te,e[60]=M):M=e[60],M}function Aa(t){return t.contentEditingEnabled&&!t.isMobile}function bd(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function yd(t,e){return t==="blocks"?"preview":e?"blocks":t}function wd(t){return Aa({contentEditingEnabled:ka(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function kd(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}function Sd(t){const e=di(t),{display:s}=t;let n=null;if(s.mode==="production"&&s.iframeBase)try{n=new URL(t.path,s.iframeBase).href}catch{n=null}const o=ui(n,e);return{value:e,frame:o?Js(o,t.device):null,newTab:o}}function Pd(t){const e=le.c(94),{tests:s,load:n,onOpen:o,options:c,onChange:u,available:i}=t,a=Se();let l;e[0]!==c?(l=ca(c),e[0]=c,e[1]=l):l=e[1];const g=l;let f;e[2]!==c.tests?(f=c.tests??{},e[2]=c.tests,e[3]=f):f=e[3];const p=f;let m;e[4]!==u||e[5]!==c?(m=M=>{const X=M?vl(M):null,{at:se,...ae}=c;u(X?{...ae,at:X}:ae)},e[4]=u,e[5]=c,e[6]=m):m=e[6];const v=m;let y;e[7]!==p||e[8]!==u||e[9]!==c?(y=(M,X)=>{const se={...p};X==="on"?se[M]=!0:X==="off"?se[M]=!1:delete se[M];const{tests:ae,...me}=c;u(Object.keys(se).length>0?{...me,tests:se}:me)},e[7]=p,e[8]=u,e[9]=c,e[10]=y):y=e[10];const h=y;let x;e[11]!==o?(x=M=>{M&&o?.()},e[11]=o,e[12]=x):x=e[12];let C;e[13]!==a?(C=a("sandbox.previewAs.label"),e[13]=a,e[14]=C):C=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx(pl,{size:16}),e[15]=b):b=e[15];let w;e[16]!==g||e[17]!==C?(w=r.jsx(nt,{asChild:!0,children:r.jsx(sa,{asChild:!0,children:r.jsx(st,{"aria-label":C,active:g,"data-testid":"preview-as-trigger",children:b})})}),e[16]=g,e[17]=C,e[18]=w):w=e[18];let N;e[19]!==a?(N=a("sandbox.previewAs.label"),e[19]=a,e[20]=N):N=e[20];let k;e[21]!==N?(k=r.jsx(rt,{children:N}),e[21]=N,e[22]=k):k=e[22];let S;e[23]!==k||e[24]!==w?(S=r.jsxs(at,{children:[w,k]}),e[23]=k,e[24]=w,e[25]=S):S=e[25];let E;e[26]!==a?(E=a("sandbox.previewAs.label"),e[26]=a,e[27]=E):E=e[27];let T;e[28]!==E?(T=r.jsx("h3",{className:"text-sm font-medium",children:E}),e[28]=E,e[29]=T):T=e[29];let B;e[30]!==i||e[31]!==a?(B=a(i?"sandbox.previewAs.intro":"sandbox.previewAs.unavailable"),e[30]=i,e[31]=a,e[32]=B):B=e[32];let A;e[33]!==B?(A=r.jsx("p",{className:"text-xs text-muted-foreground",children:B}),e[33]=B,e[34]=A):A=e[34];let L;e[35]!==T||e[36]!==A?(L=r.jsxs("div",{className:"flex flex-col gap-1",children:[T,A]}),e[35]=T,e[36]=A,e[37]=L):L=e[37];let $;e[38]!==a?($=a("sandbox.previewAs.momentLabel"),e[38]=a,e[39]=$):$=e[39];let _;e[40]!==$?(_=r.jsx(ml,{htmlFor:"preview-as-moment",children:$}),e[40]=$,e[41]=_):_=e[41];let F;e[42]!==c.at?(F=gl(c.at),e[42]=c.at,e[43]=F):F=e[43];let I;e[44]!==v?(I=M=>v(M.target.value),e[44]=v,e[45]=I):I=e[45];let J;e[46]!==F||e[47]!==I?(J=r.jsx(Hs,{id:"preview-as-moment",type:"datetime-local",className:xl,value:F,onChange:I}),e[46]=F,e[47]=I,e[48]=J):J=e[48];const W=c.at===void 0;let Y;e[49]!==v?(Y=()=>v(""),e[49]=v,e[50]=Y):Y=e[50];let G;e[51]!==a?(G=a("sandbox.previewAs.now"),e[51]=a,e[52]=G):G=e[52];let Q;e[53]!==W||e[54]!==Y||e[55]!==G?(Q=r.jsx(_e,{type:"button",variant:"ghost",size:"sm",disabled:W,onClick:Y,children:G}),e[53]=W,e[54]=Y,e[55]=G,e[56]=Q):Q=e[56];let H;e[57]!==J||e[58]!==Q?(H=r.jsxs("div",{className:"flex items-center gap-2",children:[J,Q]}),e[57]=J,e[58]=Q,e[59]=H):H=e[59];let ee;e[60]!==a?(ee=a("sandbox.previewAs.momentHint"),e[60]=a,e[61]=ee):ee=e[61];let q;e[62]!==ee?(q=r.jsx("p",{className:"text-xs text-muted-foreground",children:ee}),e[62]=ee,e[63]=q):q=e[63];let U;e[64]!==_||e[65]!==H||e[66]!==q?(U=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[_,H,q]}),e[64]=_,e[65]=H,e[66]=q,e[67]=U):U=e[67];let z;e[68]!==a?(z=a("sandbox.previewAs.testsLabel"),e[68]=a,e[69]=z):z=e[69];let j;e[70]!==z?(j=r.jsx("span",{className:"text-sm font-medium",children:z}),e[70]=z,e[71]=j):j=e[71];let O;e[72]!==p||e[73]!==n||e[74]!==h||e[75]!==a||e[76]!==s?(O=n&&!n.ready?n.failed?r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.previewAs.testsLoadFailed")}),r.jsx(_e,{type:"button",variant:"outline",size:"sm",onClick:n.retry,children:a("sandbox.previewAs.tryAgain")})]}):r.jsx("div",{className:"flex justify-center py-2","data-testid":"preview-as-tests-loading",children:r.jsx(it,{className:"size-4 text-muted-foreground"})}):s.length===0?r.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.previewAs.noTests")}):r.jsxs(r.Fragment,{children:[r.jsx("ul",{className:"flex flex-col gap-1.5",children:s.map(M=>r.jsxs("li",{className:"flex items-center justify-between gap-2","data-testid":"preview-as-test",children:[r.jsx("span",{className:"min-w-0 truncate text-sm",children:M}),r.jsxs(hl,{type:"single",variant:"outline",size:"sm",value:p[M]===void 0?"":p[M]?"on":"off",onValueChange:X=>h(M,X),"aria-label":M,children:[r.jsx(Ar,{value:"off",children:a("sandbox.previewAs.off")}),r.jsx(Ar,{value:"on",children:a("sandbox.previewAs.on")})]})]},M))}),r.jsx("p",{className:"text-xs text-muted-foreground",children:a("sandbox.previewAs.testsHint")})]}),e[72]=p,e[73]=n,e[74]=h,e[75]=a,e[76]=s,e[77]=O):O=e[77];let D;e[78]!==j||e[79]!==O?(D=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[j,O]}),e[78]=j,e[79]=O,e[80]=D):D=e[80];let K;e[81]!==g||e[82]!==u||e[83]!==a?(K=g&&r.jsx(_e,{type:"button",variant:"outline",size:"sm",onClick:()=>u({}),children:a("sandbox.previewAs.reset")}),e[81]=g,e[82]=u,e[83]=a,e[84]=K):K=e[84];let Z;e[85]!==L||e[86]!==U||e[87]!==D||e[88]!==K?(Z=r.jsxs(na,{className:"flex w-80 flex-col gap-4 p-4",align:"center",sideOffset:8,"data-testid":"preview-as",children:[L,U,D,K]}),e[85]=L,e[86]=U,e[87]=D,e[88]=K,e[89]=Z):Z=e[89];let te;return e[90]!==S||e[91]!==Z||e[92]!==x?(te=r.jsxs(ra,{onOpenChange:x,children:[S,Z]}),e[90]=S,e[91]=Z,e[92]=x,e[93]=te):te=e[93],te}const jd=["next"],Ed=["@tanstack/react-router","@tanstack/react-start","@tanstack/solid-router","@tanstack/solid-start"],Oa=new Set(["tsx","ts","jsx","js","mdx"]),Nd=new Set(["tsx","jsx"]),Cd=new Set(["404","500"]);function Td(t){const e=new Set;if(!t||typeof t!="object")return e;const s=t;for(const n of["dependencies","devDependencies"]){const o=s[n];if(o&&typeof o=="object"&&!Array.isArray(o))for(const c of Object.keys(o))e.add(c)}return e}function Rd(t){const e=Td(t);return jd.some(s=>e.has(s))?"next":Ed.some(s=>e.has(s))?"tanstack":null}function _a(t,e){const s=(t??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return s?`${s}/${e}`:e}function Ld(t,e){const s=n=>_a(e,n);switch(t){case"next":return[{router:"next-pages",dir:s("pages"),pattern:"**/*"},{router:"next-pages",dir:s("src/pages"),pattern:"**/*"},{router:"next-app",dir:s("app"),pattern:"**/page.*"},{router:"next-app",dir:s("src/app"),pattern:"**/page.*"}];case"tanstack":return[{router:"tanstack",dir:s("src/routes"),pattern:"**/*"}];default:{const n=t;throw new Error(`Unknown framework: ${String(n)}`)}}}function vn(t){const e=t.lastIndexOf(".");return e<=0?null:[t.slice(0,e),t.slice(e+1)]}function Ad(t){const e=vn(t.at(-1)??"");if(!e||!Oa.has(e[1]))return null;const[s]=e;if(s.includes("."))return null;const n=[...t.slice(0,-1),s];return n[0]==="api"||n.length===1&&Cd.has(s)||n.some(o=>o.startsWith("_")||o.includes("["))?null:(n.at(-1)==="index"&&n.pop(),`/${n.join("/")}`)}function Od(t){const e=vn(t.at(-1)??"");if(!e||e[0]!=="page"||!Oa.has(e[1]))return null;const s=[];for(const n of t.slice(0,-1)){if(n.startsWith("_")||n.startsWith("@")||/^\(\.{1,3}\)/.test(n)||n.includes("["))return null;n.startsWith("(")&&n.endsWith(")")||s.push(n)}return`/${s.join("/")}`}function _d(t){const e=[];let s="",n=!1;for(const o of t)o==="["?n=!0:o==="]"&&(n=!1),o==="."&&!n?(e.push(s),s=""):s+=o;return e.push(s),e}function $d(t){const e=vn(t.at(-1)??"");if(!e||!Nd.has(e[1]))return null;const s=[...t.slice(0,-1),..._d(e[0])].filter(Boolean);s.at(-1)==="lazy"&&s.pop();const n=s.at(-1);if(!n||n==="__root"||s.some(c=>c.startsWith("-"))||n.startsWith("_"))return null;(n==="index"||n==="route")&&s.pop();const o=[];for(const c of s){if(c.includes("$"))return null;if(c.startsWith("_")||c.startsWith("(")&&c.endsWith(")"))continue;const u=c.replace(/_$/,"").replace(/[[\]]/g,"");u&&o.push(u)}return`/${o.join("/")}`}function Fd(t,e){const s=e.split("/").filter(Boolean);if(s.length===0)return null;switch(t){case"next-pages":return Ad(s);case"next-app":return Od(s);case"tanstack":return $d(s);default:{const n=t;throw new Error(`Unknown router: ${String(n)}`)}}}function Dd(t){const e=new Set;for(const{root:s,files:n}of t){const o=`${s.dir}/`;for(const c of n){if(!c.startsWith(o))continue;const u=Fd(s.router,c.slice(o.length));u&&e.add(u)}}return[...e].sort((s,n)=>s==="/"?-1:n==="/"?1:s.localeCompare(n))}const Bd=5e3,Md=6e4;async function zd(t,e){const s=await fetch(bl(t,"glob"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pattern:e.pattern,path:e.dir,limit:Bd})});if(!s.ok)throw new Error(`Failed to list ${e.dir}: ${s.status}`);const n=await s.json();return Array.isArray(n.files)?n.files.filter(o=>typeof o=="string"):[]}async function Id(t,e){const s=await fi(t,_a(e,"package.json"));if(s.kind==="unavailable")throw new Error("package.json unavailable: sandbox not ready");const n=s.kind==="data"?Rd(s.data):null;if(!n)return[];const o=Ld(n,e),c=await Promise.all(o.map(async u=>({root:u,files:await zd(t,u)})));return Dd(c)}function Ud(t,e,s){const n=le.c(12);let o;n[0]!==e||n[1]!==t?(o=t?tn.frameworkRoutes(t.orgSlug,t.virtualMcpId,t.branch,t.threadId,e):["framework-routes","none"],n[0]=e,n[1]=t,n[2]=o):o=n[2];let c;n[3]!==e||n[4]!==t?(c=()=>t?Id(t,e):[],n[3]=e,n[4]=t,n[5]=c):c=n[5];const u=s&&!!t;let i;n[6]!==o||n[7]!==c||n[8]!==u?(i={queryKey:o,queryFn:c,enabled:u,staleTime:Md},n[6]=o,n[7]=c,n[8]=u,n[9]=i):i=n[9];const a=Jr(i);let l;return n[10]!==a.data?(l=a.data??[],n[10]=a.data,n[11]=l):l=n[11],l}const Kd=500,Hd={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Wr=1,fs=["desktop","mobile","tablet"],Vd=["preview","visual","blocks"],Wd={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function qd(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 Ut(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ks(t,e){try{return new URL(t,e).href}catch{return null}}function Gd(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const s={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:s,effective:s.url}}return{pin:t,effective:t?.url??null}}function Jd(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Yd(t,e,s){const n=t.toLowerCase(),o=e.toLowerCase(),c=o.split("/").filter(Boolean),u=a=>{if(a===s)return 100;const l=a.indexOf(s);if(l===-1)return 0;let g=40;return l===0?g+=30:/[\s/-]/.test(a[l-1]??"")&&(g+=20),g+=Math.round(s.length/a.length*20),g};let i=Math.max(u(n),u(o));return c.at(-1)===s?i=Math.max(i,95):c.includes(s)&&(i=Math.max(i,90)),i}function Qd(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Xd({virtualMcpId:t}){const e=Se(),s=fa(),{currentBranch:n,taskId:o,virtualMcpId:c}=lt(),u=!!$o(),i=va(),a=Go(c===t?t:null),l=aa(t),g=yl(a?.metadata?.ui?.layout??null),f=ka(g),p=Aa({contentEditingEnabled:f,isMobile:s}),[m]=R.useState(()=>wd({cmsMode:g,isMobile:s})),[v,y]=Vs(Ws.previewEditingMode(t),d=>d&&Vd.includes(d)?d:null),h=v??m,[x,C]=Vs(Ws.previewDeviceSize(t),d=>d&&fs.includes(d)?d:"desktop"),[b,w]=R.useState(null),[N,k]=R.useState(null),S=R.useRef(null),E=R.useRef(null),[T,B]=R.useState(!1),A=R.useRef(null),L=()=>{A.current?.flush(),B(!1)},$=()=>B(d=>(d&&A.current?.flush(),!d)),[_,F]=R.useState({width:0,height:0}),[I,J]=R.useState(!1),[W,Y]=R.useState({}),[G,Q]=R.useState(""),H=R.useRef(null),[ee,q]=R.useState(!1),[U,z]=R.useState(),[j,O]=R.useState(null),[D,K]=R.useState(null),[Z,te]=R.useState(null),[M,X]=R.useState(()=>i.state.target?.kind==="page"?i.state.target.path:"/"),[se,ae]=R.useState(()=>i.state.target?.kind==="page"?i.state.target.key:null),[me,pe]=R.useState({}),[be,ge]=R.useState(!1),ve=R.useRef(null),Pe=()=>{ge(!0),ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>ge(!1),15e3)},fe=()=>{ve.current&&(clearTimeout(ve.current),ve.current=null),ge(!1)},{org:de}=gs(),Le=mn(),Ie=bt(),Ue=Ie.vmEntry,Me=Le.lifecycle.phase,{url:yt}=da(t),he=Kt(t,n),{connection:$e}=ua(t),xe=dl(t),Ke=pi({hasServeConnection:!!$e,runtime:l.runtime}),Ae=!tt(he)&&he.kind!=="pending",re=Ve(he)??yt,ue=re??Ie.previewUrl,Ge=!!re||Me==="running",wt=a?.id===t?si(a.metadata):null,Je=!re&&a?.id===t&&l.runtime==="cms",Ht=l.projectDefault==="cms",kt=Ae?mi({sandboxUrl:ue,previewServerUrl:wt,fastPreviewActive:Je}):null,xn=t&&n?{orgSlug:de.slug,virtualMcpId:t,branch:n,threadId:o??null,previewUrl:ue}:null,bn=vs(xn,{fetchEnabled:Ge}),xs=ma(xn,{fetchEnabled:Ge}),ce=bn.data,we=xs.data,Ye=ce?$i(ce,we).sort((d,P)=>d.name.localeCompare(P.name)):[],Vt=t&&n?{orgSlug:de.slug,virtualMcpId:t,branch:n}:null,yn=ld(Vt),$a=hi(Vt),bs=ce&&we?Fi(ce,we):[],wn=Ae&&ce&&we?Ji(we,ce,"loaders"):[],Fa=G?(()=>{const d=G.toLowerCase();return Ye.map(P=>({page:P,score:Yd(P.name,P.path,d)})).filter(({score:P})=>P>0).sort((P,V)=>V.score-P.score||P.page.path.length-V.page.path.length).map(({page:P})=>P)})():Ye,Da=bs.filter(d=>{if(!G)return!0;const P=G.toLowerCase();return d.name.toLowerCase().includes(P)||d.key.toLowerCase().includes(P)||d.resolveType.toLowerCase().includes(P)}),kn=p?wn:[],Sn=kn.filter(d=>{if(!G)return!0;const P=G.toLowerCase();return d.title.toLowerCase().includes(P)||d.key.toLowerCase().includes(P)||d.resolveType.toLowerCase().includes(P)}),Wt=D?wn.find(d=>d.key===D)??null:null,Ne=fn,ys=j||D?null:Di(Ye,M,se),ie=ys?.key??null,ct=i.state.target?.kind==="section"?i.state.target.key:i.state.focusedBlockKey??ie,qt=ys?.path??null,ws={};if(Ae&&Ge&&ue&&we&&ce){const d=Yi(we,"loaders"),P=ie?ce[ie]:void 0,V=Sc(P,ce,Ee=>d.has(Ee)),oe=xc(V);for(const Ee of xt(M)){if(Ee.type!=="param")continue;const Ce=hc(M,Ee.name,V),mt=wc(Ce,d,oe);mt.length>0&&(ws[Ee.name]=mt)}}const Pn=d=>ce?Xc(ce,d,we):[],ks=ie?Pn(M):[],Qe=(ie?me[ie]:void 0)??ks[0]?.values??{},Te=Be(M,Qe),St=t&&n?{orgSlug:de.slug,virtualMcpId:t,branch:n,threadId:o??null}:null,jn=ce&&ie?Xi(ce,ie,0):[],En=tt(he),Nn=ce?Qi(jn,ce,En):[],Pt=Nn.map(d=>d.isSavedBlock?d.label:""),jt=Nn.map(d=>d.isSavedBlock?"global":d.isMultivariate?"variant":"normal"),Et=jn.map(d=>Ys(d,ce??{},En)),dt=R.useRef(null),Fe=R.useRef(null),Ba=Le.status.state==="paused",Ss=Le.phase,Cn=rl({claimPhase:Ss,lifecycle:Le.lifecycle}),Xe=Ie.previewState,Ma=Ie.userStopped,za=gi(de.slug,t??""),{url:He}=Ki(Je&&t&&n?{orgSlug:de.slug,virtualMcpId:t,branch:n,previewServerUrl:wt??null,path:Te}:null),Ia=Ht&&l.runtime==="sandbox",Oe=vi(he,Ke,xe),Tn=xi(Oe&&Je&&he.kind==="protocol"&&t&&n?{orgSlug:de.slug,virtualMcpId:t,branch:n}:null),Rn=Oe?Tn.pointer:null,ne=Jl({previewState:Xe,progressStatus:Cn.status,previewServerUrl:wt,fastPreviewActive:Je,fastPreviewReady:!!He,codingSession:Ia,localPreviewUrl:re,hostedDraft:Oe,hostedPointerPending:Oe&&(he.kind==="pending"||Tn.pending)}),Ln=ne.showWakingPill||Oe&&ne.mode==="production"&&!Rn,Nt=ne.mode!=="none",Ua=ne.mode==="production"&&ne.iframeBase?Ut(ne.iframeBase):null,ut=ne.mode==="production"?Ua:Ut(ue),Ka=a?.id===t&&a.metadata?.fastPreviewInPlace===!0,Ct=Ae?re?ne.mode==="sandbox"&&p&&h==="blocks":ne.mode==="production"&&Je&&Ka&&p&&h==="blocks":!1,An=R.useRef(null),{pin:Ha,effective:Va}=Gd(An.current,{inPlaceRenderActive:Ct,draftPreviewUrl:He,resolvedPath:Te});An.current=Ha;const On=i.state.variantOverride??[],Gt=Ae?On:[],Tt=Ae?[]:On,Jt=tt(he)&&Bi.some(d=>Mi(we,d)==="available"),ft=Jt?W:{},_n=ca(ft),Wa=Jt&&ce?Object.keys(zi(ce).experiments):[],[$n,qa]=R.useState(!1),Fn=la(Vt,Jt&&$n?Ii:[]),Ga={...Fn,ready:!(he.kind==="protocol"&&he.hosted)||$n&&Fn.ready},Ze=t?br(de.slug,t):null,Ja=bi(Ze),Yt=Oe?Sd({display:ne,path:Te,pointer:Rn,heldRevision:Ja,device:x,forcedVariants:Tt,previewOptions:ft}):null,Dn=JSON.stringify([Tt,ft]);R.useEffect(()=>{if(!Oe||!Ze)return;const[d,P]=JSON.parse(Dn);yr(Ze,{forcedVariants:d,previewOptions:P})},[Oe,Ze,Dn]),R.useEffect(()=>{if(!(!Oe||!Ze))return()=>yr(Ze,null)},[Oe,Ze]);const Ps=$e&&Ve(he)?yi($e.endpoint,Tt,_n):null,Ya=$e&&Ve(he)?Ps?wi(Ps,ft):wr:null,et=qd(ne.mode==="sandbox"?os(Js(kr(Z??Ks(Te,ne.iframeBase)??ne.iframeBase,Ya),x),Gt):ne.mode==="production"&&Yt?.frame?Yt.frame:ne.mode==="production"?os(Js(Sr(Pr(kr(Z??Va??Ks(Te,ne.iframeBase)??ne.iframeBase,Ln?wr:null),Tt),ft),x),Gt):null),Bn=He??(ne.iframeBase?Ks(Te,ne.iframeBase):null),Mn=ne.mode==="production"&&Yt?Yt.newTab:ne.mode==="production"?Bn?os(Sr(Pr(Bn,Tt),ft),Gt):null:et??ne.iframeBase,Qa=()=>{const d=Mn;d&&window.open(d,"_blank","noopener")},Rt=t&&n?Xr(de.slug,t,n):null,Lt=d=>{Rt&&Do(Rt,d)},ke=i.state.target;R.useEffect(()=>{if(!(!ke||!kt||!we))if(ke.kind==="page"){const d=me[ke.key]??{};Fe.current=Be(ke.path,d),O(null),K(null),te(null),ae(ke.key),X(ke.path),Lt({path:ke.path,pageKey:ke.key,params:d})}else if(ke.kind==="loader")Fe.current=null,O(null),K(ke.key),te(null);else{const d=bs.find(P=>P.key===ke.key);if(d){Fe.current=null;const P=Nr(we);K(null),O(d),te(jr(kt,P,d.key))}}},[ke,kt,we,me]),R.useEffect(()=>{!ie||qt===null||ke?.kind==="page"&&ke.key===ie&&ke.path===qt||i.selectTarget({kind:"page",key:ie,path:qt})},[ie,qt,ke]);const[zn,Xa]=R.useState(null);if(Xe.kind==="iframe"&&zn!==Xe.previewUrl){const d=zn!==null;Xa(Xe.previewUrl);const P=Rt?Qr(Rt):null;if(P){if(Fe.current=Be(P.path,P.params),X(P.path),ae(P.pageKey),te(null),O(null),K(null),P.pageKey&&Object.keys(P.params).length>0){const V=P.pageKey;pe(oe=>({...oe,[V]:P.params}))}}else d&&(Fe.current=null,X("/"),te(null),ae(null),O(null),K(null))}dt.current=et;const Za=ne.mode==="production"&&!!He&&!re,[Qt,js]=R.useState({src:et??void 0,loading:!1}),[eo,Es]=R.useState(!1),[to,so]=R.useState(),[In,Un]=R.useState(null),je=Qo(In,{base:ne.iframeBase??"",frameSrc:Qt.src,loadedSrc:to,wanted:et??void 0,canSwap:xe&&eo&&!Qt.loading});je!==In&&Un(je);const Xt=Xo(Qt,je?je.src:et??void 0,Za);Xt!==Qt&&js(Xt);const pt=Xt.src,Kn=Xt.loading,Hn=Zo({iframeRef:S,src:ne.mode==="sandbox"?et:null,active:ne.mode==="sandbox"}),Vn=R.useRef(null);R.useEffect(()=>{const d=Kn?setTimeout(()=>js(xr),ei):null,P=()=>{d&&clearTimeout(d)};if(!He||!pt||Vn.current===He)return P;Vn.current=He;const V=S.current;return V&&V.getAttribute("src")!==pt&&(Pe(),V.src=pt),P},[He,pt,Kn]);const Wn=()=>{const d=S.current?.contentWindow,P=ut;if(!d||!P||!ce||!ie)return;const V=ce[ie];if(!V||typeof V!="object")return;const oe=ji({previewBaseUrl:P,pageBlock:V,decofile:ce,path:Te,pathTemplate:M});if(!oe)return;const Ee=os(oe.src,Ni(Gt,ie));d.postMessage({type:"cms-editor::render",src:Ee,body:oe.body},P)},Ns=R.useRef(null);R.useEffect(()=>{if(!Ct||j||D||!ie||!ce){Ns.current=null;return}const d={nav:JSON.stringify({page:ie,path:Te,pathTemplate:M}),content:JSON.stringify(ce)},P=Jd(Ns.current,d);Ns.current=d,P&&Wn()},[ce,Ct,j,D,ie,Te,M]);const Cs=R.useRef(null);R.useEffect(()=>{if(!Ct||j||D||!ie||!ce){Cs.current=null;return}const d=JSON.stringify(i.state.variantOverride??null),P=Cs.current;Cs.current={page:ie,sig:d},!(!P||P.page!==ie||P.sig===d)&&Wn()},[i.state.variantOverride,Ct,j,D,ie]);const qn=!!t&&!!n&&!Le.notFound&&!Ma&&!Ba&&(Ss?.kind==="ready"||Me!=="idle"),Gn=!tt(he),no=un(t??void 0),ro=Ud(St,no,Gn&&qn),ao=new Set(f?Ye.map(d=>Ne(d.path)):[]),At=Gn?ro.filter(d=>!ao.has(Ne(d))):[],Jn=G?At.filter(d=>d.toLowerCase().includes(G.toLowerCase())):At,ye=kd({editingMode:h,sandboxDisplay:ne.mode==="sandbox",blocksEditingEnabled:p});R.useEffect(()=>{const d=ut;if(!d)return;const P=V=>{if(V.origin===d)if(V.data?.type==="visual-editor::element-clicked"){const oe=Zl.safeParse(V.data.payload);oe.success&&w(oe.data)}else if(V.data?.type==="cms-editor::section-clicked"){const oe=sc.safeParse(V.data.payload);oe.success&&k({index:oe.data.sectionIndex,seq:oe.data.clickSeq})}else V.data?.type==="cms-editor::render-start"?Pe():V.data?.type==="cms-editor::render-end"?(fe(),S.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Pt,kinds:jt,keys:Et},d)):V.data?.type==="cms-editor::render-error"&&fe()};return window.addEventListener("message",P),()=>window.removeEventListener("message",P)},[ut,Pt,jt,Et]);const Yn=()=>{const d=S.current?.contentWindow,P=Ut(ue),V=ad({v8:xe,script:ec});!d||!P||!V||d.postMessage(V,P)},oo=()=>{if(xe)return;const d=S.current?.contentWindow,P=Ut(ue);!d||!P||d.postMessage({type:"visual-editor::deactivate"},P)},Qn=()=>{const d=ze.current;d?.has("wireframe")&&(d.wireframe({type:"wireframe:sections",labels:Pt,kinds:jt,keys:Et}),d.wireframe({type:ye==="blocks"?"wireframe:activate":"wireframe:deactivate"}))},Ts=()=>{if(xe){Qn();return}const d=S.current?.contentWindow,P=ut,V=rd({v8:xe,production:ne.mode==="production",localPreview:!!re,script:nc});!d||!P||!V||(d.postMessage(V,P),d.postMessage({type:"cms-editor::set-labels",labels:Pt,kinds:jt,keys:Et},P))},io=()=>{if(xe){ze.current?.wireframe({type:"wireframe:deactivate"});return}const d=S.current?.contentWindow,P=ut;!d||!P||d.postMessage({type:"cms-editor::deactivate"},P)},Xn=d=>{ze.current?.wireframe({type:"wireframe:scroll-to",sectionIndex:d})},lo=()=>{if(ze.current?.wireframe({type:"wireframe:clear-hover"}),xe)return;const d=S.current?.contentWindow,P=ut;!d||!P||(d.postMessage({type:"cms-editor::clear-hover"},P),d.postMessage({type:"visual-editor::clear-hover"},P))},Zt=d=>{if(d==="blocks"&&!p)return;const P=h;!s&&d!==P&&(d==="blocks"?E.current?.resize("30%"):E.current?.collapse()),y(d),w(null),k(null),d!=="blocks"&&K(null),P==="visual"&&oo(),d==="visual"&&Yn(),P==="blocks"&&d!=="blocks"&&io(),d==="blocks"&&Ts()},co=()=>{Zt(bd(h,p))},uo=()=>{Zt(yd(h,p))},es=()=>{const d=S.current;if(!d)return;Pe();const P=document.activeElement,V=d.tabIndex;d.tabIndex=-1,d.style.pointerEvents="none",d.blur(),Qd(d,dt.current);let oe;const Ee=()=>{clearTimeout(oe),d.tabIndex=V,d.style.pointerEvents="";const Ce=document.activeElement;(!Ce||Ce===document.body||Ce===d)&&P?.focus(),d.removeEventListener("load",Ee)};d.addEventListener("load",Ee),oe=setTimeout(Ee,3e3)};el(es);const ze=R.useRef(null),Zn=R.useEffectEvent(Qn),fo=R.useEffectEvent((d,P)=>{k({index:d,seq:P})}),po=R.useEffectEvent(()=>{fe(),je&&(Rs.current=je.shown),_t&&$s(Ot)}),er=R.useEffectEvent(()=>{if(Es(!1),je&&Un(null),je&&je.src!==dt.current){Pe();return}es()});R.useEffect(()=>{if(!xe)return;const d=new lc({studioOrigin:window.location.origin,build:"4.594.1",frame:()=>S.current?.contentWindow??null,onWireframeReady:()=>Zn(),onWireframe:V=>{V.type==="wireframe:select"&&fo(V.sectionIndex,V.clickSeq)},onModulesChange:()=>Es(d.has("html-swap")),onSwapEnd:()=>po(),onSwapFailed:()=>er()});ze.current=d;const P=V=>{d.handle(V)};return window.addEventListener("message",P),()=>{window.removeEventListener("message",P),d.dispose(),Es(!1),ze.current===d&&(ze.current=null)}},[xe,ne.iframeBase]);const tr=xe?JSON.stringify([Pt,jt,Et,ye]):"";R.useEffect(()=>{tr&&Zn()},[tr]);const sr=R.useRef(null);R.useEffect(()=>{const d=sr.current;if(sr.current=je,je&&je!==d){ze.current?.refresh(je.shown)?Pe():er();return}!je&&d&&d.shown!==d.src&&d.src===dt.current&&es()},[je]);const nr=()=>{ze.current?.refresh()||es()},Ot=br(de.slug,t??""),_t=Oe&&Nt&&!!t,Rs=R.useRef(null);R.useEffect(()=>{if(_t)return ki(Ot)},[_t,Ot]);const{reload:$t}=Si(de.slug,t??""),rr=R.useRef($t.seq);R.useEffect(()=>{if(rr.current!==$t.seq&&(rr.current=$t.seq,!!_t&&Rs.current===dt.current)){if($t.navigates){$s(Ot);return}nr()}},[$t.seq]);const Ls=oa(Vt),Ft=Pi(Ve(he)?Ls:""),ar=R.useRef(Ft);R.useEffect(()=>{const d=ar.current;if(ar.current=Ft,!d||!Ft||d===Ft)return;const P=S.current;if(P)return Xl({iframe:P,reload:nr})},[Ft]);const or=()=>{const d=fs.indexOf(x);C(fs[(d+1)%fs.length])},ts=(d,P)=>ir({...Qe,[d]:P}),ir=d=>{if(!ie)return;const P=ie;Fe.current=Be(M,d),pe(V=>({...V,[P]:d})),Lt({path:M,pageKey:P,params:d})},mo=td({iframeBase:ne.iframeBase,resolvedPath:Te,activeGlobalSectionName:j?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),As=d=>{const P=me[d.key]??{},V=Be(d.path,me[d.key]??Pn(d.path)[0]?.values??{});(j||Ne(V)!==Ne(Te))&&Pe(),Fe.current=V,O(null),K(null),te(null),k(null),ae(d.key),X(d.path),Lt({path:d.path,pageKey:d.key,params:P}),i.selectTarget({kind:"page",key:d.key,path:d.path})},lr=d=>{(j||Ne(d)!==Ne(Te))&&Pe(),Fe.current=d,O(null),K(null),te(null),k(null),ae(null),X(d),Lt({path:d,pageKey:null,params:{}})};Fo(Rt,lr);const ho=d=>{if(tt(he)){const oe=ce?Ui(ce,d.key,we):null;oe?As(oe):ms.info(e("sandbox.preview.blockOnNoPage"));return}if(!kt||!we){ms.error(e("sandbox.preview.previewMetadataNotReady"));return}Pe(),Fe.current=null;const P=Nr(we),V=jr(kt,P,d.key);O(d),K(null),te(V),k(null),i.selectTarget({kind:"section",key:d.key})},go=d=>{p&&(O(null),K(d.key),te(null),Zt("blocks"),i.selectTarget({kind:"loader",key:d.key}))},vo=async({name:d,path:P,templateKey:V})=>{if(!t||!n)return;const oe=pa(P);if(oe){z(oe);return}const Ee=P.trim().startsWith("/")?P.trim():`/${P.trim()}`;if(Ye.some(Ce=>Ne(Ce.path)===Ne(Ee))){z(e("sandbox.preview.pageAlreadyExists",{path:Ee}));return}z(void 0);try{const Ce=V?await $a(ce,V):void 0;if(V&&!Ce){z(e("sandbox.preview.templateNoLongerExists"));return}const mt=await yn.mutateAsync({name:d,path:Ee,template:Ce,schema:tt(he)?{meta:we,loadMeta:async()=>(await xs.refetch()).data}:void 0});q(!1),ms.success(e("sandbox.preview.pageCreated",{name:d})),await kl(Kd),As({key:mt.key,name:mt.name,path:mt.path}),Zt("blocks")}catch(Ce){z(Ce instanceof La?e("sandbox.preview.pageSchemaNotReady"):Ce instanceof Error?Ce.message:e("sandbox.preview.failedToCreatePage"))}},Dt=sd({previewSurfaceActive:Nt,daemonReady:qn,production:ne.mode==="production",servePreviewUrl:Ve(he)}),cr=nd({showPreviewToolbar:Dt,contentEditingEnabled:f,hasFrameworkRoutes:At.length>0}),dr=f?Fa:[],ur=f?Da:[],Bt=()=>{J(!1),Q("")},Os=f?j?.name??Wt?.title??ys?.name:void 0,_s=f&&(bn.isPending||xs.isPending),ss=_s?Ut(ne.iframeBase):Os,Mt=j?`section:${j.key}`:D?`loader:${D}`:f&&ie?`page:${ie}`:At.includes(Ne(M))?`route:${Ne(M)}`:void 0,ns=e(Wd[x]),fr=x==="mobile"?r.jsx(Zr,{size:16}):x==="tablet"?r.jsx(Ho,{size:16}):r.jsx(ea,{size:16}),xo=Dt?cr?r.jsxs("div",{className:"flex h-7 min-w-36 flex-1 items-stretch overflow-hidden rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background transition-colors hover:border-border",children:[r.jsxs(at,{children:[r.jsx(nt,{asChild:!0,children:r.jsx("button",{type:"button",onClick:or,"aria-label":ns,className:Re("flex w-7 shrink-0 items-center justify-center border-r border-border/60 text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",Er),children:fr})}),r.jsx(rt,{children:ns})]}),r.jsxs(ra,{open:I,onOpenChange:d=>{J(d),d||Q("")},children:[r.jsx(sa,{asChild:!0,children:r.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:_s?ss??void 0:j||Wt?Os:[Os,M].filter(Boolean).join(" · "),className:Re("group/page-picker flex min-w-0 flex-1 items-stretch whitespace-nowrap text-left text-xs text-muted-foreground",Er),children:r.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:[j&&r.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-2xs font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[r.jsx(Uo,{size:11}),e("sandbox.preview.globalBadge")]}),Wt&&r.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:[r.jsx(Vo,{size:11}),e("sandbox.preview.loaderBadge")]}),ss&&r.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:ss}),!_s&&!j&&!Wt&&r.jsx("span",{"data-testid":"preview-page-path",className:Re("min-w-0 truncate font-mono [direction:rtl]",ss?"ml-auto shrink-[2] text-right text-muted-foreground md:@max-[40rem]/panel-toolbar:hidden":"flex-1 text-left text-foreground"),children:r.jsx("bdi",{dir:"ltr",children:M})}),r.jsx(Bo,{size:12,className:Re("shrink-0 transition-transform",I&&"rotate-180")})]})})}),r.jsxs(na,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[r.jsxs(ln,{shouldFilter:!1,defaultValue:Mt,children:[r.jsx(cn,{value:G,onValueChange:d=>{Q(d),H.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),r.jsxs(on,{ref:H,className:"max-h-80",children:[r.jsx(dn,{children:(!f||Ye.length===0)&&At.length===0&&(!f||bs.length===0)&&kn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),dr.length>0&&r.jsx(We,{children:dr.map(d=>r.jsxs(qe,{value:`page:${d.key}`,"aria-current":Mt===`page:${d.key}`||void 0,title:`${d.name} · ${d.path}`,onSelect:()=>{Bt(),As(d)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:d.name}),r.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:d.path})]},d.key))}),Jn.length>0&&r.jsx(We,{heading:e("sandbox.preview.siteRoutes"),children:Jn.map(d=>r.jsx(qe,{value:`route:${d}`,"aria-current":Mt===`route:${d}`||void 0,title:d,onSelect:()=>{Bt(),lr(d)},className:"px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:r.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:d})},d))}),ur.length>0&&r.jsx(We,{heading:e("sandbox.preview.globalComponents"),children:ur.map(d=>r.jsx(qe,{value:`section:${d.key}`,"aria-current":Mt===`section:${d.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{Bt(),ho(d)},children:r.jsx("span",{className:"truncate",children:d.name})},d.key))}),Sn.length>0&&r.jsx(We,{heading:e("sandbox.preview.globalLoaders"),children:Sn.map(d=>r.jsx(qe,{value:`loader:${d.key}`,"aria-current":Mt===`loader:${d.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{Bt(),go(d)},children:r.jsx("span",{className:"truncate",children:d.title})},d.key))})]})]}),f&&!j&&!D&&xt(M).some(d=>d.type!=="text")&&r.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:xt(M).map((d,P)=>{if(d.type==="text")return r.jsx("span",{children:d.text},`text-${P}`);const V=ws[d.name];return!V&&ks.length>0?r.jsx(Zc,{paramName:d.name,template:M,value:Qe[d.name]??"",options:ks,onPick:ir,onCommit:oe=>ts(d.name,oe)},`${ie}:${d.name}`):V&&St?r.jsx(Bc,{sources:V,template:M,paramName:d.name,value:Qe[d.name]??"",sandboxRef:St,onCommit:oe=>ts(d.name,oe)},`${ie}:${d.name}`):r.jsx(Jc,{name:d.name,value:Qe[d.name]??"",onCommit:oe=>ts(d.name,oe)},`${ie}:${d.name}`)})}),f&&r.jsx("div",{className:"border-t p-1.5",children:r.jsxs(_e,{variant:"ghost",className:"w-full justify-start",onClick:()=>{Bt(),z(void 0),q(!0)},children:[r.jsx(ta,{size:16}),e("sandbox.preview.createNewPage")]})})]})]})]}):r.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:mo}):null,pr=Dt||f?r.jsxs("div",{className:"flex min-w-0 max-w-[24rem] flex-1 items-center justify-center gap-1",children:[!(Dt&&cr)&&r.jsxs(at,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(st,{onClick:or,"aria-label":ns,children:fr})}),r.jsx(rt,{children:ns})]}),xo,r.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[Jt&&r.jsx(Pd,{tests:Wa,load:Ga,onOpen:()=>qa(!0),options:W,onChange:d=>{Y(d),i.previewAsChanged()},available:!!Ps||!Ln||!_n}),r.jsx(st,{onClick:Qa,disabled:Oe&&!Mn,"aria-label":e("sandbox.preview.openInNewTab"),children:r.jsx(Yr,{size:16})})]})]}):null,bo=(Ae||u)&&ne.mode==="sandbox",rs=Hd[x],as=x==="desktop"&&(_.width===0||_.width>=rs.width+2*Wr),mr=as?1:Math.min(_.width>0?_.width/(rs.width+2*Wr):1,1),yo=as?{width:"100%",height:"100%"}:{width:`${rs.width}px`,height:_.height>0?`${_.height/mr}px`:`${rs.height}px`,transform:`scale(${mr})`,transformOrigin:"top center"},hr=r.jsxs(r.Fragment,{children:[bo&&(Dt||f)&&r.jsx(st,{onClick:co,"aria-pressed":ye==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ye==="visual",children:r.jsx(vr,{size:16})}),p&&r.jsxs(at,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(st,{onClick:uo,"aria-pressed":ye==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ye==="blocks",children:r.jsx(Wo,{size:16})})}),r.jsx(rt,{children:e("sandbox.preview.blocksEditor")})]}),ct&&r.jsxs(at,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(st,{onClick:$,"aria-pressed":T,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:T,children:r.jsx(Ko,{size:16})})}),r.jsx(rt,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),wo=!!D&&ye==="blocks";return r.jsxs("div",{className:"flex flex-col w-full h-full",children:[St&&Object.entries(ws).map(([d,P])=>(Qe[d]??"")===""?r.jsx(qc,{sources:P,template:M,paramName:d,sandboxRef:St,onFill:V=>ts(d,V)},`${ie}:${d}`):null),r.jsxs(r.Fragment,{children:[r.jsx(qs.Toolbar.Center.Portal,{fallback:r.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:pr}),children:pr}),r.jsx(qs.Toolbar.Right.Portal,{fallback:hr,children:hr})]}),r.jsx("div",{className:"flex-1 overflow-hidden relative",children:wo?r.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[r.jsx(Hr,{virtualMcpId:t,externalSelection:N,onSectionPicked:Xn,onViewJsonFile:$}),T&&ct&&r.jsx("div",{className:"absolute inset-0 z-10",children:r.jsx(Vr,{ref:A,virtualMcpId:t,pageKey:ct,onClose:L},he.kind==="legacy"?void 0:JSON.stringify([Ls,xe]))})]}):r.jsxs(Tr,{orientation:"horizontal",disabled:ye!=="blocks",className:"relative isolate",children:[r.jsx(is,{ref:E,id:"preview-blocks-editor",defaultSize:ye==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ye==="blocks"&&r.jsx(Hr,{virtualMcpId:t,externalSelection:N,onSectionPicked:Xn,onViewJsonFile:$})}),ye==="blocks"&&r.jsx(Rr,{withHandle:!0}),r.jsx(is,{id:"preview-canvas",defaultSize:ye==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:r.jsxs(Tr,{orientation:"horizontal",disabled:!(T&&ct),children:[r.jsx(is,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:r.jsxs("div",{ref:d=>{if(!d)return;const P=()=>F(oe=>oe.width===d.clientWidth&&oe.height===d.clientHeight?oe:{width:d.clientWidth,height:d.clientHeight});P();const V=new ResizeObserver(P);return V.observe(d),()=>V.disconnect()},className:Re("h-full relative overflow-clip flex justify-center",Nt&&!as&&"bg-muted/30"),children:[(be||za)&&Nt&&r.jsx(ti,{}),ne.showDecidingLoader&&r.jsx("div",{"data-testid":"preview-deciding",className:"absolute inset-0 z-30 flex items-center justify-center",children:r.jsx(it,{className:"size-5 text-muted-foreground"})}),ne.showBlockingOverlay&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Ds,{kind:"starting",progress:Cn,claimPhase:Ss})}),!re&&Xe.kind==="suspended"&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Ds,{kind:"suspended",onResume:Ie.resume})}),!re&&Xe.kind==="errored"&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Ds,{kind:"errored",error:Xe.error,onRetry:Ie.retry,connectionsHref:`/${de.slug}/settings/connections`})}),ne.showWakingPill&&r.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 bg-muted px-4 py-3 shadow-soft pointer-events-none select-none",children:[r.jsx(it,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),r.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),ye==="visual"&&!b&&r.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-special/40 bg-special/90 px-3 py-1 text-xs font-medium text-special-foreground shadow-soft backdrop-blur-sm pointer-events-none select-none",children:[r.jsx(vr,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ye==="visual"&&b&&r.jsx(fc,{element:b,onDismiss:()=>w(null)}),Nt&&et&&r.jsx("div",{className:Re("shrink-0",!as&&"bg-background shadow-edge"),style:yo,onMouseLeave:lo,children:r.jsx("iframe",{ref:S,src:pt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:Hn.handleError,onLoad:()=>{if(js(xr),so(pt),Hn.handleLoad(),fe(),Rs.current=dt.current,_t&&$s(Ot),ne.mode!=="sandbox"||re){(ne.mode==="production"&&!ne.showWakingPill||re)&&ye==="blocks"&&Ts();return}if(Ro("vm_preview_loaded",{view_mode:ye,vm_id:Ue?.sandboxHandle??null}),!j)try{const d=S.current?.contentWindow?.location?.pathname;if(!d)return;const P=Fe.current;if(P!==null&&(Fe.current=null,Ne(d)!==Ne(P))||Ne(d)===Ne(Te))return;X(d),Lt({path:d,pageKey:se,params:Qe})}catch{}ye==="visual"&&Yn(),ye==="blocks"&&Ts()}},ne.iframeBase)})]})}),T&&ct&&r.jsxs(r.Fragment,{children:[r.jsx(Rr,{withHandle:!0}),r.jsx(is,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:r.jsx(Vr,{ref:A,virtualMcpId:t,pageKey:ct,onClose:L},he.kind==="legacy"?void 0:JSON.stringify([Ls,xe]))})]})]})})]})}),r.jsx(cd,{open:ee,onOpenChange:q,isPending:yn.isPending,error:U,templates:Ye,onSubmit:vo})]})}const Xs={app:null,split:!1};function Zd(t){const e=le.c(24),{project:s,maxApps:n,children:o}=t,c=Se();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={silent:!0},e[0]=u):u=e[0];const i=Jo(u),a=bt();let l;e[1]!==s.metadata.runtime?(l=s.metadata.runtime??{},e[1]=s.metadata.runtime,e[2]=l):l=e[2];const g=l;let f;e[3]!==g.apps?(f=g.apps??[],e[3]=g.apps,e[4]=f):f=e[4];const p=f;let m;e[5]!==i.update||e[6]!==a||e[7]!==s.id||e[8]!==s.metadata||e[9]!==g||e[10]!==c?(m=b=>i.update.mutate({id:s.id,data:{metadata:{...Sl(s.metadata),runtime:{...g,apps:b.length?b:null}}}},{onSuccess:()=>a.start(),onError:()=>ms.error(c("sandbox.appTabs.saveError"))}),e[5]=i.update,e[6]=a,e[7]=s.id,e[8]=s.metadata,e[9]=g,e[10]=c,e[11]=m):m=e[11];const v=m,y=g.path??null;let h,x;e[12]!==p||e[13]!==v?(h=b=>v([...p,{path:b}]),x=b=>v(p.filter(w=>w.path!==b)),e[12]=p,e[13]=v,e[14]=h,e[15]=x):(h=e[14],x=e[15]);let C;return e[16]!==p||e[17]!==o||e[18]!==n||e[19]!==s.id||e[20]!==y||e[21]!==h||e[22]!==x?(C=r.jsx(eu,{virtualMcpId:s.id,mainPath:y,apps:p,maxApps:n,onAddApp:h,onRemoveApp:x,children:o}),e[16]=p,e[17]=o,e[18]=n,e[19]=s.id,e[20]=y,e[21]=h,e[22]=x,e[23]=C):C=e[23],C}function eu(t){const e=le.c(102),{virtualMcpId:s,mainPath:n,apps:o,maxApps:c,onAddApp:u,onRemoveApp:i,children:a}=t,l=Se(),g=fa(),{currentBranch:f}=lt(),p=bt(),m=mn().lifecycle.phase,v=Kt(s,f),{url:y}=da(s);let h;e[0]!==v||e[1]!==y?(h=Ve(v)??y,e[0]=v,e[1]=y,e[2]=h):h=e[2];const x=h,C=x??p.previewUrl,b=!!x||m==="running",w=!b&&p.status==="errored";let N;e[3]!==p.vmEntry?.startedWith?.apps?(N=p.vmEntry?.startedWith?.apps??[],e[3]=p.vmEntry?.startedWith?.apps,e[4]=N):N=e[4];const k=N;let S;e[5]!==s?(S=Ws.previewAppLayout(s),e[5]=s,e[6]=S):S=e[6];const[E,T]=Vs(S,tu);let B;e[7]!==o||e[8]!==E?(B=o.some(fe=>fe.path===E.app)?E.app:null,e[7]=o,e[8]=E,e[9]=B):B=e[9];const A=B,L=A!==null&&E.split&&!g,$=A===null||L,_=A??o[0]?.path??null,[F,I]=R.useState(null),[J,W]=R.useState(!1);let Y;e[10]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>{I(null),W(!1)},e[10]=Y):Y=e[10];const G=Y;let Q;e[11]!==o||e[12]!==F||e[13]!==g||e[14]!==n||e[15]!==u||e[16]!==T?(Q=()=>{if(F===null)return;const fe=Or(F);if(!fe){G();return}if(fe===Or(n??"")||o.some(de=>de.path===fe)){W(!0);return}u(fe),T({app:fe,split:!g}),G()},e[11]=o,e[12]=F,e[13]=g,e[14]=n,e[15]=u,e[16]=T,e[17]=Q):Q=e[17];const H=Q;let ee;e[18]!==n||e[19]!==l?(ee=n?Bs(n):l("sandbox.appTabs.root"),e[18]=n,e[19]=l,e[20]=ee):ee=e[20];const q=ee;let U;e[21]!==L||e[22]!==l?(U=l(L?"sandbox.appTabs.single":"sandbox.appTabs.split"),e[21]=L,e[22]=l,e[23]=U):U=e[23];const z=U;let j;e[24]!==l?(j=l("sandbox.appTabs.label"),e[24]=l,e[25]=j):j=e[25];let O;e[26]!==l?(O=l("sandbox.appTabs.main"),e[26]=l,e[27]=O):O=e[27];let D;e[28]!==l?(D=l("sandbox.appTabs.mainHint"),e[28]=l,e[29]=D):D=e[29];let K;e[30]!==T?(K=()=>T(Xs),e[30]=T,e[31]=K):K=e[31];let Z;e[32]!==w||e[33]!==q||e[34]!==b||e[35]!==$||e[36]!==O||e[37]!==D||e[38]!==K?(Z=r.jsx(qr,{label:q,badge:O,hint:D,ready:b,failed:w,onScreen:$,onSelect:K}),e[32]=w,e[33]=q,e[34]=b,e[35]=$,e[36]=O,e[37]=D,e[38]=K,e[39]=Z):Z=e[39];let te;if(e[40]!==o||e[41]!==A||e[42]!==w||e[43]!==q||e[44]!==i||e[45]!==b||e[46]!==T||e[47]!==L||e[48]!==l){let fe;e[50]!==A||e[51]!==w||e[52]!==q||e[53]!==i||e[54]!==b||e[55]!==T||e[56]!==L||e[57]!==l?(fe=de=>{const Le=Bs(de.path);return r.jsx(qr,{label:Le,hint:l("sandbox.appTabs.extraHint",{app:q}),ready:b,failed:w,onScreen:de.path===A,onSelect:()=>T({app:de.path,split:L}),onRemove:()=>i(de.path),removeLabel:l("sandbox.appTabs.remove",{app:Le})},de.path)},e[50]=A,e[51]=w,e[52]=q,e[53]=i,e[54]=b,e[55]=T,e[56]=L,e[57]=l,e[58]=fe):fe=e[58],te=o.map(fe),e[40]=o,e[41]=A,e[42]=w,e[43]=q,e[44]=i,e[45]=b,e[46]=T,e[47]=L,e[48]=l,e[49]=te}else te=e[49];let M;e[59]!==Z||e[60]!==te||e[61]!==j?(M=r.jsxs("div",{role:"tablist","aria-label":j,className:"flex min-w-0 items-center gap-1 overflow-x-auto",children:[Z,te]}),e[59]=Z,e[60]=te,e[61]=j,e[62]=M):M=e[62];let X;e[63]!==o.length||e[64]!==H||e[65]!==F||e[66]!==J||e[67]!==c||e[68]!==l?(X=F!==null?r.jsx("form",{className:"w-40 shrink-0",onSubmit:fe=>{fe.preventDefault(),H()},children:r.jsx("input",{autoFocus:!0,value:F,placeholder:"apps/checkout","aria-label":l("sandbox.appTabs.pathLabel"),"aria-invalid":J,onChange:fe=>{I(fe.target.value),W(!1)},onBlur:G,onKeyDown:fe=>{fe.key==="Escape"&&G()},className:Re("h-7 w-full rounded-md border bg-background px-2 font-mono text-xs outline-none",J?"border-destructive":"border-border")})}):o.length<c&&r.jsx(vt,{label:l("sandbox.appTabs.add"),onClick:()=>I(""),children:r.jsx(ta,{})}),e[63]=o.length,e[64]=H,e[65]=F,e[66]=J,e[67]=c,e[68]=l,e[69]=X):X=e[69];let se;e[70]!==g||e[71]!==T||e[72]!==L||e[73]!==z||e[74]!==_?(se=!g&&_&&r.jsx(vt,{label:z,active:L,onClick:()=>T(L?Xs:{app:_,split:!0}),children:r.jsx(qo,{})}),e[70]=g,e[71]=T,e[72]=L,e[73]=z,e[74]=_,e[75]=se):se=e[75];let ae;e[76]!==M||e[77]!==X||e[78]!==se?(ae=r.jsxs(r.Fragment,{children:[M,X,se]}),e[76]=M,e[77]=X,e[78]=se,e[79]=ae):ae=e[79];const me=ae;let pe;e[80]!==me?(pe=r.jsx(qs.Topbar.Left.Portal,{fallback:r.jsx("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:me}),children:r.jsx("div",{className:"ml-1 flex min-w-0 items-center gap-1 border-l border-border/60 pl-2",children:me})}),e[80]=me,e[81]=pe):pe=e[81];let be;e[82]!==a||e[83]!==$?(be=$&&r.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:a}),e[82]=a,e[83]=$,e[84]=be):be=e[84];let ge;e[85]!==A||e[86]!==w||e[87]!==p.start||e[88]!==x||e[89]!==q||e[90]!==C||e[91]!==b||e[92]!==T||e[93]!==L||e[94]!==k?(ge=A!==null&&r.jsx(su,{name:Bs(A),mainName:q,appUrl:C?Pl(C,A):null,ready:b,failed:w,notStarted:!x&&!k.includes(A),onStart:p.start,className:Re(L&&"border-l border-border"),onClose:L?()=>T({app:A,split:!1}):void 0},A),e[85]=A,e[86]=w,e[87]=p.start,e[88]=x,e[89]=q,e[90]=C,e[91]=b,e[92]=T,e[93]=L,e[94]=k,e[95]=ge):ge=e[95];let ve;e[96]!==be||e[97]!==ge?(ve=r.jsxs("div",{className:"flex min-h-0 flex-1",children:[be,ge]}),e[96]=be,e[97]=ge,e[98]=ve):ve=e[98];let Pe;return e[99]!==pe||e[100]!==ve?(Pe=r.jsxs("div",{className:"flex h-full w-full min-h-0 flex-col",children:[pe,ve]}),e[99]=pe,e[100]=ve,e[101]=Pe):Pe=e[101],Pe}function tu(t){return t??Xs}function qr(t){const e=le.c(28),{label:s,badge:n,hint:o,ready:c,failed:u,onScreen:i,onSelect:a,onRemove:l,removeLabel:g}=t,f=i?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/60 hover:text-foreground";let p;e[0]!==f?(p=Re("group/app-tab flex h-7 shrink-0 items-center rounded-md text-xs transition-colors",f),e[0]=f,e[1]=p):p=e[1];const m=c?"bg-success":u?"bg-destructive":"animate-pulse bg-warning";let v;e[2]!==m?(v=Re("size-1.5 rounded-full",m),e[2]=m,e[3]=v):v=e[3];let y;e[4]!==v?(y=r.jsx("span",{"aria-hidden":!0,className:v}),e[4]=v,e[5]=y):y=e[5];let h;e[6]!==s?(h=r.jsx("span",{className:"max-w-40 truncate",children:s}),e[6]=s,e[7]=h):h=e[7];let x;e[8]!==n?(x=n&&r.jsx("span",{className:"text-[10px] text-muted-foreground",children:n}),e[8]=n,e[9]=x):x=e[9];let C;e[10]!==i||e[11]!==a||e[12]!==y||e[13]!==h||e[14]!==x?(C=r.jsx(nt,{asChild:!0,children:r.jsxs("button",{type:"button",role:"tab","aria-selected":i,onClick:a,className:"flex h-full items-center gap-1.5 rounded-md px-2.5 focus-ring",children:[y,h,x]})}),e[10]=i,e[11]=a,e[12]=y,e[13]=h,e[14]=x,e[15]=C):C=e[15];let b;e[16]!==o?(b=r.jsx(rt,{className:"max-w-64",children:o}),e[16]=o,e[17]=b):b=e[17];let w;e[18]!==C||e[19]!==b?(w=r.jsxs(at,{children:[C,b]}),e[18]=C,e[19]=b,e[20]=w):w=e[20];let N;e[21]!==l||e[22]!==g?(N=l&&r.jsx("button",{type:"button","aria-label":g,onClick:l,className:"-ml-1 mr-1 flex size-5 items-center justify-center rounded opacity-0 hover:bg-sidebar-accent focus-ring focus-visible:opacity-100 group-hover/app-tab:opacity-100",children:r.jsx(Pa,{className:"size-3"})}),e[21]=l,e[22]=g,e[23]=N):N=e[23];let k;return e[24]!==w||e[25]!==N||e[26]!==p?(k=r.jsxs("div",{className:p,children:[w,N]}),e[24]=w,e[25]=N,e[26]=p,e[27]=k):k=e[27],k}function su(t){const e=le.c(71),{name:s,mainName:n,appUrl:o,ready:c,failed:u,notStarted:i,onStart:a,className:l,onClose:g}=t,f=Se(),[p,m]=R.useState("/"),[v,y]=R.useState("desktop"),[h,x]=R.useState(0),C=R.useRef(null);let b;e[0]!==o||e[1]!==p?(b=o?jl(o,p):null,e[0]=o,e[1]=p,e[2]=b):b=e[2];const w=b;let N;e[3]!==l?(N=Re("flex min-h-0 min-w-0 flex-1 flex-col",l),e[3]=l,e[4]=N):N=e[4];let k;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=D=>{D.preventDefault(),m(C.current?.value||"/")},e[5]=k):k=e[5];let S;e[6]!==s||e[7]!==f?(S=f("sandbox.appPane.path",{app:s}),e[6]=s,e[7]=f,e[8]=S):S=e[8];let E;e[9]!==p||e[10]!==S?(E=r.jsx("form",{className:"min-w-0 flex-1",onSubmit:k,children:r.jsx("input",{ref:C,defaultValue:p,"aria-label":S,className:"h-7 w-full rounded-md border border-border/60 bg-background px-2 font-mono text-xs text-muted-foreground outline-none hover:border-border focus:border-border focus:text-foreground"})}),e[9]=p,e[10]=S,e[11]=E):E=e[11];let T;e[12]!==v||e[13]!==f?(T=f(v==="desktop"?"sandbox.preview.deviceMobile":"sandbox.preview.deviceDesktop"),e[12]=v,e[13]=f,e[14]=T):T=e[14];let B;e[15]===Symbol.for("react.memo_cache_sentinel")?(B=()=>y(ru),e[15]=B):B=e[15];let A;e[16]!==v?(A=v==="desktop"?r.jsx(ea,{}):r.jsx(Zr,{}),e[16]=v,e[17]=A):A=e[17];let L;e[18]!==T||e[19]!==A?(L=r.jsx(vt,{label:T,onClick:B,children:A}),e[18]=T,e[19]=A,e[20]=L):L=e[20];let $;e[21]!==s||e[22]!==f?($=f("sandbox.appPane.reload",{app:s}),e[21]=s,e[22]=f,e[23]=$):$=e[23];const _=!w||!c;let F,I;e[24]===Symbol.for("react.memo_cache_sentinel")?(F=()=>x(nu),I=r.jsx(Lo,{}),e[24]=F,e[25]=I):(F=e[24],I=e[25]);let J;e[26]!==$||e[27]!==_?(J=r.jsx(vt,{label:$,disabled:_,onClick:F,children:I}),e[26]=$,e[27]=_,e[28]=J):J=e[28];let W;e[29]!==s||e[30]!==f?(W=f("sandbox.appPane.openInNewTab",{app:s}),e[29]=s,e[30]=f,e[31]=W):W=e[31];const Y=!w||!c;let G;e[32]!==w?(G=()=>w&&window.open(w,"_blank","noopener"),e[32]=w,e[33]=G):G=e[33];let Q;e[34]===Symbol.for("react.memo_cache_sentinel")?(Q=r.jsx(Yr,{}),e[34]=Q):Q=e[34];let H;e[35]!==W||e[36]!==Y||e[37]!==G?(H=r.jsx(vt,{label:W,disabled:Y,onClick:G,children:Q}),e[35]=W,e[36]=Y,e[37]=G,e[38]=H):H=e[38];let ee;e[39]!==s||e[40]!==g||e[41]!==f?(ee=g&&r.jsx(vt,{label:f("sandbox.appPane.close",{app:s}),onClick:g,children:r.jsx(Pa,{})}),e[39]=s,e[40]=g,e[41]=f,e[42]=ee):ee=e[42];let q;e[43]!==J||e[44]!==H||e[45]!==ee||e[46]!==E||e[47]!==L?(q=r.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:[E,L,J,H,ee]}),e[43]=J,e[44]=H,e[45]=ee,e[46]=E,e[47]=L,e[48]=q):q=e[48];let U;e[49]!==n||e[50]!==f?(U=f("sandbox.appPane.previewOnly",{app:n}),e[49]=n,e[50]=f,e[51]=U):U=e[51];let z;e[52]!==U?(z=r.jsx("p",{className:"shrink-0 truncate border-b border-border bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground",children:U}),e[52]=U,e[53]=z):z=e[53];let j;e[54]!==v||e[55]!==u||e[56]!==n||e[57]!==s||e[58]!==i||e[59]!==a||e[60]!==c||e[61]!==h||e[62]!==w||e[63]!==f?(j=r.jsx("div",{className:"flex min-h-0 flex-1 justify-center overflow-auto bg-muted/40",children:c&&i?r.jsxs("div",{className:"flex flex-col items-center gap-3 self-center px-6 text-center",children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:f("sandbox.appPane.notStarted",{app:s})}),r.jsx(_e,{size:"sm",variant:"outline",onClick:a,children:f("sandbox.appPane.start",{app:s})})]}):!c||!w?r.jsx("p",{className:"self-center px-6 text-center text-sm text-muted-foreground",children:c?f("sandbox.appPane.noUrl"):u?f("sandbox.appPane.failed",{app:n}):f("sandbox.appPane.waiting")}):r.jsx("iframe",{src:w,title:s,className:Re("h-full bg-background",v==="mobile"?"w-[412px] max-w-full border-x border-border":"w-full")},`${w}#${h}`)}),e[54]=v,e[55]=u,e[56]=n,e[57]=s,e[58]=i,e[59]=a,e[60]=c,e[61]=h,e[62]=w,e[63]=f,e[64]=j):j=e[64];let O;return e[65]!==s||e[66]!==N||e[67]!==q||e[68]!==z||e[69]!==j?(O=r.jsxs("section",{"aria-label":s,className:N,children:[q,z,j]}),e[65]=s,e[66]=N,e[67]=q,e[68]=z,e[69]=j,e[70]=O):O=e[70],O}function nu(t){return t+1}function ru(t){return t==="desktop"?"mobile":"desktop"}function vt(t){const e=le.c(11),{label:s,children:n,active:o,disabled:c,onClick:u}=t;let i;e[0]!==o||e[1]!==n||e[2]!==c||e[3]!==s||e[4]!==u?(i=r.jsx(nt,{asChild:!0,children:r.jsx(st,{"aria-label":s,"aria-pressed":o,active:o,disabled:c,onClick:u,children:n})}),e[0]=o,e[1]=n,e[2]=c,e[3]=s,e[4]=u,e[5]=i):i=e[5];let a;e[6]!==s?(a=r.jsx(rt,{children:s}),e[6]=s,e[7]=a):a=e[7];let l;return e[8]!==i||e[9]!==a?(l=r.jsxs(at,{children:[i,a]}),e[8]=i,e[9]=a,e[10]=l):l=e[10],l}const au=async(t,e)=>{try{return await fetch(t,{method:"HEAD",mode:"no-cors",cache:"no-store",credentials:"omit",signal:e}),!0}catch{return!1}},ou=1e4,iu=1e4,lu=5e3,cu=2;function du(t,e){return t&&e===0?iu:Math.min(1e3*2**Math.max(0,e-1),lu)}function uu(t,e,s){return e?!0:t===!0&&s<cu}function fu(t,e){const s=le.c(11),n=au,o=Ao();let c;s[0]!==t?(c=tn.localAppReachable(t??""),s[0]=t,s[1]=c):c=s[1];const u=c;let i;s[2]!==n||s[3]!==o||s[4]!==u||s[5]!==t?(i=async f=>{const{signal:p}=f,m=new AbortController,v=()=>m.abort();p.addEventListener("abort",v);const y=setTimeout(v,ou),h=await n(t,m.signal).catch(mu);clearTimeout(y),p.removeEventListener("abort",v);const x=o.getQueryData(u),C=h?0:(x?.failures??0)+1;return{up:uu(x?.up??null,h,C),failures:C}},s[2]=n,s[3]=o,s[4]=u,s[5]=t,s[6]=i):i=s[6];const a=!!t;let l;s[7]!==u||s[8]!==i||s[9]!==a?(l={queryKey:u,queryFn:i,enabled:a,retry:!1,staleTime:0,gcTime:0,refetchInterval:pu},s[7]=u,s[8]=i,s[9]=a,s[10]=l):l=s[10];const{data:g}=Jr(l);return t?g?.up??null:null}function pu(t){return t.state.data?du(t.state.data.up,t.state.data.failures):!1}function mu(){return!1}function hu(t){const{backend:e}=t;if(e.kind==="protocol"&&e.source==="local")return{kind:"connected"};if(e.kind==="unavailable"&&e.source==="local"){const s=e.problem;return!s||s.reason==="not-answering"?t.access==="denied"?{kind:"needs-permission"}:{kind:"not-running"}:{kind:"problem",problem:s}}return{kind:"connecting"}}function Pf(t){const e=le.c(53),{virtualMcpId:s}=t,n=Se(),o=Yo(s),{connection:c}=ua(s),{activeTask:u,taskId:i,currentBranch:a}=lt(),l=Ol(i),[g,f]=R.useState(!1),p=Kt(s,a);let m;e[0]!==p||e[1]!==c?(m=c?Ve(p):null,e[0]=p,e[1]=c,e[2]=m):m=e[2];const v=m,y=fu(v),h=Ea(),x=El("multi_app_preview");if(Tl({threadId:i,sandboxBranch:u?.branch??a,agentHasRepo:Ms(o?.metadata),threadHasRepo:Ms(l)||Ms(u?.metadata)})==="none"&&!c){let k;e[3]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:r.jsx(_r,{className:"size-7 text-foreground"})}),e[3]=k):k=e[3];let S;e[4]!==n?(S=n("mainPanelTabs.previewTab.noSourceToPreview"),e[4]=n,e[5]=S):S=e[5];let E;e[6]!==n?(E=n("mainPanelTabs.previewTab.connectGithubDescription"),e[6]=n,e[7]=E):E=e[7];let T,B;e[8]===Symbol.for("react.memo_cache_sentinel")?(T=()=>f(!0),B=r.jsx(_r,{className:"size-4"}),e[8]=T,e[9]=B):(T=e[8],B=e[9]);let A;e[10]!==n?(A=n("mainPanelTabs.previewTab.connectGithub"),e[10]=n,e[11]=A):A=e[11];let L;e[12]!==A?(L=r.jsxs(_e,{onClick:T,children:[B,A]}),e[12]=A,e[13]=L):L=e[13];let $;e[14]!==S||e[15]!==E||e[16]!==L?($=r.jsx(Nl,{className:"h-full",image:k,title:S,description:E,actions:L}),e[14]=S,e[15]=E,e[16]=L,e[17]=$):$=e[17];let _;e[18]!==g?(_=r.jsx(Cl,{open:g,onOpenChange:f,mode:"agent"}),e[18]=g,e[19]=_):_=e[19];let F;return e[20]!==_||e[21]!==$?(F=r.jsxs(r.Fragment,{children:[$,_]}),e[20]=_,e[21]=$,e[22]=F):F=e[22],F}if(c&&o&&!Ve(p)){let k;e[23]!==h||e[24]!==p?(k=hu({backend:p,access:h}),e[23]=h,e[24]=p,e[25]=k):k=e[25];let S;e[26]!==c.endpoint?(S=Ei(c.endpoint),e[26]=c.endpoint,e[27]=S):S=e[27];let E;return e[28]!==k||e[29]!==S?(E=r.jsx(vu,{status:k,host:S}),e[28]=k,e[29]=S,e[30]=E):E=e[30],E}if(v&&y!==!0){let k;e[31]!==n?(k=n("mainPanelTabs.previewTab.localAppWaiting.title"),e[31]=n,e[32]=k):k=e[32];let S;e[33]!==v||e[34]!==n?(S=n("mainPanelTabs.previewTab.localAppWaiting.body",{host:gu(v)}),e[33]=v,e[34]=n,e[35]=S):S=e[35];let E;e[36]!==S?(E=r.jsx(Sa,{text:S}),e[36]=S,e[37]=E):E=e[37];let T;e[38]!==n?(T=n("mainPanelTabs.previewTab.localAppWaiting.hint"),e[38]=n,e[39]=T):T=e[39];let B;e[40]!==T?(B=r.jsx("p",{role:"status",className:"text-center text-sm text-muted-foreground",children:T}),e[40]=T,e[41]=B):B=e[41];let A;return e[42]!==k||e[43]!==E||e[44]!==B?(A=r.jsx(hs,{headingLevel:2,waiting:!0,title:k,lead:E,footer:B}),e[42]=k,e[43]=E,e[44]=B,e[45]=A):A=e[45],A}let b;e[46]!==s?(b=r.jsx(Xd,{virtualMcpId:s}),e[46]=s,e[47]=b):b=e[47];const w=b;let N;return e[48]!==o||e[49]!==x||e[50]!==w||e[51]!==c?(N=r.jsx(Oo,{children:x&&o&&!c?r.jsx(Zd,{project:o,maxApps:wl,children:w}):w}),e[48]=o,e[49]=x,e[50]=w,e[51]=c,e[52]=N):N=e[52],N}function gu(t){try{return new URL(t).host}catch{return t}}function vu(t){const e=le.c(13),{status:s,host:n}=t,o=Se();if(s.kind==="connected"){let i;e[0]!==o?(i=o("mainPanelTabs.previewTab.localhostNoPreview.title"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==o?(a=o("mainPanelTabs.previewTab.localhostNoPreview.body"),e[2]=o,e[3]=a):a=e[3];let l;return e[4]!==i||e[5]!==a?(l=r.jsx(hs,{headingLevel:2,waiting:!1,title:i,lead:a}),e[4]=i,e[5]=a,e[6]=l):l=e[6],l}let c;e[7]!==n||e[8]!==s?(c=Bl(s,n),e[7]=n,e[8]=s,e[9]=c):c=e[9];let u;return e[10]!==n||e[11]!==c?(u=r.jsx(Dl,{wait:c,hosts:n}),e[10]=n,e[11]=c,e[12]=u):u=e[12],u}export{Dl as L,Pf as P,hs as S,Sf as u};
|