decocms 4.500.5 → 4.500.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-B7OXPrvi.js → ActiveShapeUtils-BHdUySfQ.js} +1 -1
- package/dist/client/assets/{AlertCircle-DWGeVbRZ.js → AlertCircle-BBiRNTdE.js} +1 -1
- package/dist/client/assets/{AreaChart-EU8uhxm4.js → AreaChart-DzGyoHJY.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DKZiHtC9.js → ArrowLeft-DwPfX3sc.js} +1 -1
- package/dist/client/assets/{ArrowUp-BmS2ipPe.js → ArrowUp-XUO4rGpO.js} +1 -1
- package/dist/client/assets/{BarChart-C5BexF1_.js → BarChart-DAturvGe.js} +1 -1
- package/dist/client/assets/{Building02-CmZEvaAI.js → Building02-CFG818HY.js} +1 -1
- package/dist/client/assets/{CategoricalChart-N0xPZGNf.js → CategoricalChart-DIdWIqvV.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cxvlb0-w.js → CheckCircle-BZiV5rFy.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Cz_mr8Ub.js → ChevronSelectorVertical-Dc4zDElk.js} +1 -1
- package/dist/client/assets/{ChevronUp-BXbTXhXZ.js → ChevronUp-ZSzJudc4.js} +1 -1
- package/dist/client/assets/{Copy01-Daz7AFYE.js → Copy01-CT9uxfj6.js} +1 -1
- package/dist/client/assets/{CreditCard01-BFLArPt1.js → CreditCard01-DCwoKma6.js} +1 -1
- package/dist/client/assets/{DotsVertical-B5WoSbKn.js → DotsVertical-CcRpaMtq.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-QrHgjTMs.js → ErrorBarContext-9Kz0FTp2.js} +1 -1
- package/dist/client/assets/{Globe04-CHujm8Rh.js → Globe04-D88PtZSB.js} +1 -1
- package/dist/client/assets/{Image01-6k6QI1dX.js → Image01-DUunwh52.js} +1 -1
- package/dist/client/assets/{Key01-BCUfWyre.js → Key01-Dy9XOW24.js} +1 -1
- package/dist/client/assets/{Link01-B2ZUVqeX.js → Link01-BDbdWLwx.js} +1 -1
- package/dist/client/assets/{LinkBroken01-Shxg1MDA.js → LinkBroken01-BFW8MxYc.js} +1 -1
- package/dist/client/assets/{Monitor01-C6hS1MDr.js → Monitor01-Cm6_ReiN.js} +1 -1
- package/dist/client/assets/{Play-C5HXiIgy.js → Play-DFfgxv2q.js} +1 -1
- package/dist/client/assets/{Plus-BGNNWymV.js → Plus-clvoB9-y.js} +1 -1
- package/dist/client/assets/{SearchMd-CMyj3n9E.js → SearchMd-Bg-9XsfQ.js} +1 -1
- package/dist/client/assets/{Sector-BIfxElqq.js → Sector-Byc95Y0H.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DhBZJiPR.js → ShoppingBag01-C_AR4ZKW.js} +1 -1
- package/dist/client/assets/{Sun-BZz5Ay79.js → Sun-Dzm8FpU3.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CDaKlB_n.js → SwitchHorizontal01-D8mpLNM6.js} +1 -1
- package/dist/client/assets/{Tool01-CIRW7kd4.js → Tool01-D8RNlK5k.js} +1 -1
- package/dist/client/assets/{Trash01-BJZRU-Yu.js → Trash01-ByfCfoe2.js} +1 -1
- package/dist/client/assets/{Upload01-CdF0U1Ox.js → Upload01-BOzWcBO4.js} +1 -1
- package/dist/client/assets/{User01-Swj6Wyaw.js → User01-VVR3ncLA.js} +1 -1
- package/dist/client/assets/{UserSquare--AVOLLKT.js → UserSquare-BG_D4lBt.js} +1 -1
- package/dist/client/assets/{Users01-BguvMR-H.js → Users01-BT5Jdc2I.js} +1 -1
- package/dist/client/assets/{XAxis-CVekAfnj.js → XAxis-BL1uz4Hu.js} +1 -1
- package/dist/client/assets/{XClose-CxTFVFLs.js → XClose-Ck0EFhGe.js} +1 -1
- package/dist/client/assets/{ZoomOut-C7vMH9KG.js → ZoomOut-DJOChAz1.js} +1 -1
- package/dist/client/assets/{access-gate-BifQwyWv.js → access-gate-DTjgjsQi.js} +1 -1
- package/dist/client/assets/add-connection-dialog-DhxH1mO6.js +1 -0
- package/dist/client/assets/agent-analytics-CRCDBvT9.js +2 -0
- package/dist/client/assets/agent-app-DuWlTve8.js +1 -0
- package/dist/client/assets/agent-assets-BupbbWua.js +1 -0
- package/dist/client/assets/{agent-automation-o2OSd9jI.js → agent-automation-BrF1bbQv.js} +1 -1
- package/dist/client/assets/{agent-automations-CSVjvgdr.js → agent-automations-Bf5oYp8h.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BZpypWKp.js → agent-connect-sources-CyYVygog.js} +1 -1
- package/dist/client/assets/agent-deck-DBdSSaIH.js +1 -0
- package/dist/client/assets/agent-e2e-Dc15KMWY.js +1 -0
- package/dist/client/assets/agent-experiments-Dn4D2o0f.js +1 -0
- package/dist/client/assets/agent-file-HtB1MCoL.js +1 -0
- package/dist/client/assets/agent-hosting-B16K2Ojh.js +1 -0
- package/dist/client/assets/{agent-icon-CvfPq7BK.js → agent-icon-CSrsRkkV.js} +1 -1
- package/dist/client/assets/agent-library-Dfzx9j-W.js +1 -0
- package/dist/client/assets/agent-library-file-B0MZUu0i.js +1 -0
- package/dist/client/assets/agent-monitor-BVZ6dj6l.js +1 -0
- package/dist/client/assets/{agent-overview-CsT5BzSM.js → agent-overview-Fv2Tlbaf.js} +1 -1
- package/dist/client/assets/agent-settings-E9aYbTuV.js +1 -0
- package/dist/client/assets/{agent-site-editor-DekWNKPY.js → agent-site-editor-CXtKOY2R.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-C7kSpllc.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-CKfeDMKr.js → agent-site-editor-content-C7FjEODf.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-Oi61j7xj.js → agent-site-editor-preview-BfKLwBCP.js} +3 -3
- package/dist/client/assets/agent-view-BqtBvPf5.js +1 -0
- package/dist/client/assets/{agent-view-guard-DF_nEERP.js → agent-view-guard-CbFaNTaO.js} +1 -1
- package/dist/client/assets/{agents-list-LRAFnay6.js → agents-list-rRAvXkxo.js} +1 -1
- package/dist/client/assets/{ai-providers-BgUnArjx.js → ai-providers-DxQSPA6H.js} +1 -1
- package/dist/client/assets/{alert-Ds8Pbd5J.js → alert-BB7UNECi.js} +1 -1
- package/dist/client/assets/{alert-dialog-BoGCVrZa.js → alert-dialog-Bq1vUmcb.js} +1 -1
- package/dist/client/assets/{analytics-sections-BOYksc63.js → analytics-sections-D4hmenz2.js} +1 -1
- package/dist/client/assets/api-keys-C9apOrj-.js +1 -0
- package/dist/client/assets/{api-keys-uNOKnF25.js → api-keys-CwCZzaXX.js} +1 -1
- package/dist/client/assets/app-editor-BNTMP2XY.js +1 -0
- package/dist/client/assets/{asset-utils-C0JplDix.js → asset-utils-D2JqsHLw.js} +1 -1
- package/dist/client/assets/{auth-CtdecWhn.js → auth-Cf8kTvK7.js} +1 -1
- package/dist/client/assets/{auth-catchall-CGU8Tb_2.js → auth-catchall-CMb2pPKe.js} +1 -1
- package/dist/client/assets/{auth-entry-DIyt51AK.js → auth-entry-DJDQHUOg.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CXs4JEXj.js → auth-split-layout-DL8EKWzu.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Cs8htcLH.js → authenticate-and-persist-oauth-CNIjDkAv.js} +1 -1
- package/dist/client/assets/{automation-list-row-BtyEuPas.js → automation-list-row-CmUakn9s.js} +1 -1
- package/dist/client/assets/{automation-runs-fZgz2Hqj.js → automation-runs-CBloXkSc.js} +1 -1
- package/dist/client/assets/{automations-n2079ZKl.js → automations-Bc2qeNY9.js} +1 -1
- package/dist/client/assets/{autosend-Bed_2rHW.js → autosend-Dbvfg9pv.js} +1 -1
- package/dist/client/assets/{avatar-BWSDv40I.js → avatar-CVhMMaTf.js} +1 -1
- package/dist/client/assets/{badge-BZ6ZWtlL.js → badge-GBNejOns.js} +1 -1
- package/dist/client/assets/{block-document-C_IW_573.js → block-document-L5yAxhd6.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CyLjsfnh.js → blocks-preview-workspace-context-BeUFeWIT.js} +1 -1
- package/dist/client/assets/{blog-schema-DTGd3Oxs.js → blog-schema-BIMlJLWj.js} +1 -1
- package/dist/client/assets/{board-analytics-BypUwbOK.js → board-analytics-CBArh6Zy.js} +1 -1
- package/dist/client/assets/{buckets-DBWKw8M4.js → buckets-DMjEyGOV.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-ClJ1Tfl6.js → build-improve-prompt-doc-DMgFOt46.js} +1 -1
- package/dist/client/assets/{calendar-CUQ5339S.js → calendar-D4OoX9Wr.js} +1 -1
- package/dist/client/assets/{capability-load-error-BglSkYA0.js → capability-load-error-C0o_DJDN.js} +1 -1
- package/dist/client/assets/category-editor-Bc1AHLqb.js +1 -0
- package/dist/client/assets/{chart-DmxPBeeD.js → chart-DcIK_AOG.js} +1 -1
- package/dist/client/assets/{chat-context-CQm-6egv.js → chat-context-NYUfgJBl.js} +1 -1
- package/dist/client/assets/{chat-draft-CLRrKKYW.js → chat-draft-BIT8lUsr.js} +1 -1
- package/dist/client/assets/{checkbox-cJ0fZWJo.js → checkbox-1mSDcatb.js} +1 -1
- package/dist/client/assets/{choose-editor-Cc1TcbHd.js → choose-editor-DSkLDSjl.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-DgYG3gXQ.js → claim-phase-copy-Clje3zqq.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DhKKsoxy.js → cli-auth-success-DK3FztVN.js} +1 -1
- package/dist/client/assets/{client-icons-BGVAhs-F.js → client-icons-C0HcvKpc.js} +1 -1
- package/dist/client/assets/{collapsible-Di8zO8dv.js → collapsible-CeMlXkLt.js} +1 -1
- package/dist/client/assets/collection-detail-CBbaNdto.js +1 -0
- package/dist/client/assets/{collection-display-button-Bxb7HpiP.js → collection-display-button-Cp21-jdI.js} +1 -1
- package/dist/client/assets/{collection-search-BqrF-OSq.js → collection-search-JcNHcOFg.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CkgGqLXV.js → collection-table-wrapper-DoyJbjYf.js} +1 -1
- package/dist/client/assets/{collection-tabs-B9w_j2Q-.js → collection-tabs-CSZlwXCA.js} +1 -1
- package/dist/client/assets/{column-rules-CDlfxJ7f.js → column-rules-CDXH6Bu0.js} +1 -1
- package/dist/client/assets/{combobox-C7W7K3yr.js → combobox-B0RpAw2t.js} +1 -1
- package/dist/client/assets/{command-psdI3Avp.js → command-CJiwms5W.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Cx2dp9En.js → companion-mcps-section--NmxcAor.js} +1 -1
- package/dist/client/assets/{config-BuMB0HyT.js → config-C1YCQZ8E.js} +1 -1
- package/dist/client/assets/{connect-vKaaPSQ-.js → connect-6HWvGxM0.js} +1 -1
- package/dist/client/assets/{connect-layout-BAsVrzyq.js → connect-layout-m9uvi79-.js} +1 -1
- package/dist/client/assets/{connection-card-KKabYrZM.js → connection-card-CWkexnWw.js} +1 -1
- package/dist/client/assets/connection-detail-CkRea4yr.js +1 -0
- package/dist/client/assets/connection-form-helpers-W4yLfkzt.js +1 -0
- package/dist/client/assets/{connection-DsYXyfMO.js → connection-pgjV95kc.js} +1 -1
- package/dist/client/assets/connections-BRM4t7Yz.js +1 -0
- package/dist/client/assets/context-BJ70LQt3.js +1 -0
- package/dist/client/assets/{context-menu-CcSwK895.js → context-menu-oPFsFXlL.js} +1 -1
- package/dist/client/assets/{core.esm-BBQ2k6X-.js → core.esm-BaMzqjA4.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-ryb_Yr7s.js → create-organization-dialog-TMOD9u6U.js} +1 -1
- package/dist/client/assets/{daily-pulse-R_HfqfjY.js → daily-pulse-BO10zQ_I.js} +1 -1
- package/dist/client/assets/{device-hint-yLpMwsWD.js → device-hint-DAX5UNJH.js} +1 -1
- package/dist/client/assets/{discover-DBy_h90B.js → discover-CTV9dsNW.js} +1 -1
- package/dist/client/assets/{domain-settings-DahhbaOZ.js → domain-settings-CYeaKhkK.js} +1 -1
- package/dist/client/assets/{drawer-Z6WGmFEd.js → drawer-DWjMBwyf.js} +1 -1
- package/dist/client/assets/{editor-ZVt04ZDu.js → editor-D6w2Bb1A.js} +1 -1
- package/dist/client/assets/{empty-state-C38COFK9.js → empty-state-BjrW4gr3.js} +1 -1
- package/dist/client/assets/{empty-state-BIpjMV0P.js → empty-state-DfOpTmwf.js} +1 -1
- package/dist/client/assets/{extract-connection-data-R_HCwhv9.js → extract-connection-data-BWH-Gguq.js} +1 -1
- package/dist/client/assets/{feature-gate-BBs-YK_1.js → feature-gate-CAHn_bYX.js} +1 -1
- package/dist/client/assets/{feature-paywall-K9l_m1PM.js → feature-paywall-D3P0r-v1.js} +1 -1
- package/dist/client/assets/{file-explorer-B4mkdePV.js → file-explorer-D8gxxm_3.js} +1 -1
- package/dist/client/assets/{file-preview-CbjoA-y-.js → file-preview-Dfh2A-J9.js} +1 -1
- package/dist/client/assets/{file-share-button-3fAFZqo4.js → file-share-button-BDicbalV.js} +1 -1
- package/dist/client/assets/{file-type-icon-DQJBqcjt.js → file-type-icon-hf5iGs8U.js} +1 -1
- package/dist/client/assets/flat-project-BZC_AY-t.js +1 -0
- package/dist/client/assets/{folder-icon-C0bBbW6a.js → folder-icon-BNfJeIOf.js} +1 -1
- package/dist/client/assets/{form-C0Gw14kB.js → form-Bn1uWhLp.js} +1 -1
- package/dist/client/assets/{general-CAvBksuG.js → general-CMoIUwrd.js} +1 -1
- package/dist/client/assets/home-C5N5Yasj.js +1 -0
- package/dist/client/assets/{icon-button-DJ3FH_vW.js → icon-button-D9OpoKyB.js} +1 -1
- package/dist/client/assets/{index-yN6Vji_x.js → index-2uENFhiF.js} +3 -3
- package/dist/client/assets/{index-zHK7QZ16.js → index-4oHb6320.js} +1 -1
- package/dist/client/assets/{index-aYlc7W7n.js → index-BW9tBS1_.js} +1 -1
- package/dist/client/assets/index-BYDys87w.js +26 -0
- package/dist/client/assets/{index-BYsz2IG8.js → index-C0M3jIYV.js} +1 -1
- package/dist/client/assets/{index-CL22V9cU.js → index-CRbDzsEl.js} +2 -2
- package/dist/client/assets/{index-Y3iKbmDC.js → index-Cei-7zh-.js} +1 -1
- package/dist/client/assets/{index-oBLJEYM1.js → index-CijieWPb.js} +1 -1
- package/dist/client/assets/{index-Csd6BEC_.js → index-D8JxMS8j.js} +1 -1
- package/dist/client/assets/{index-o_6CQvLG.js → index-DBXjCQdJ.js} +1 -1
- package/dist/client/assets/{index-CIf_Fy0-.js → index-DPPcuuZa.js} +1 -1
- package/dist/client/assets/{index-DLA0mZnP.js → index-aGwRFVIr.js} +1 -1
- package/dist/client/assets/{index-CpSJczgV.js → index-m-B-HtFl.js} +1 -1
- package/dist/client/assets/{index-redirect-D-avw8NV.js → index-redirect-oFouPYya.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CkQRrcdR.js → infiniteQueryObserver-Dhuk-wHX.js} +1 -1
- package/dist/client/assets/{infra-billing-DYbiV_uv.js → infra-billing-D-XVEkhR.js} +1 -1
- package/dist/client/assets/{input-CFfgp0Tw.js → input-C8SbKhCo.js} +1 -1
- package/dist/client/assets/{input-qyM35152.js → input-XQLahzDk.js} +3 -3
- package/dist/client/assets/{integration-icon-DO5tWS-C.js → integration-icon-BELz_pOH.js} +1 -1
- package/dist/client/assets/{jira-icon-CLirt27c.js → jira-icon-DtfD9SYH.js} +1 -1
- package/dist/client/assets/{label-CMx6o6z4.js → label-BUw2LYOJ.js} +1 -1
- package/dist/client/assets/{layout-BOmiV94e.js → layout-d6dVT2i7.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CNCjp9-J.js → legacy-agents-deep-pzQxt8GU.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-B7q15OBR.js → legacy-main-redirect-Dxx-LsCk.js} +1 -1
- package/dist/client/assets/library-C1bBtD2v.js +1 -0
- package/dist/client/assets/{library-tab-BNFZabUZ.js → library-tab-CSQBidcn.js} +1 -1
- package/dist/client/assets/{login-Emu6BYEQ.js → login-C9F3Ei8y.js} +1 -1
- package/dist/client/assets/{markdown-BpBIe-s5.js → markdown-CW257Zz5.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-ucNfuWrt.js → mcp-app-renderer-1q9SfIz-.js} +1 -1
- package/dist/client/assets/{mcp-oauth-tUb5Ku4P.js → mcp-oauth-DJzQquAH.js} +1 -1
- package/dist/client/assets/{mcp-oauth-HEDfQLbt.js → mcp-oauth-DcDGTHX8.js} +1 -1
- package/dist/client/assets/{members-5DGaxXGU.js → members-Cq2hjNgQ.js} +1 -1
- package/dist/client/assets/{memory-BU6JoH4_.js → memory-lQR7baEY.js} +1 -1
- package/dist/client/assets/{mini-report-page-BnvillTw.js → mini-report-page-BW6etI3e.js} +1 -1
- package/dist/client/assets/{mock-board-CL5PjuNr.js → mock-board-v0ispli3.js} +1 -1
- package/dist/client/assets/{monaco-editor-CQ53ujnX.js → monaco-editor-BuUSistE.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CeE5cdl8.js → monitoring-stats-row-oudHSLAL.js} +1 -1
- package/dist/client/assets/{multi-select-Bb_75Kq_.js → multi-select-C-uRGkhX.js} +1 -1
- package/dist/client/assets/{mustache-CQikKf57.js → mustache-BISt82Zb.js} +1 -1
- package/dist/client/assets/{new-project-dialog-CIdD-M5h.js → new-project-dialog-CU6GK7Hi.js} +1 -1
- package/dist/client/assets/{oauth-callback-D5OtWQot.js → oauth-callback-Bl3J_Goo.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-mYrYVnqt.js → oauth-callback-ai-provider-C2G5PQSS.js} +1 -1
- package/dist/client/assets/{onboarding-s-Aq6pC0.js → onboarding-CCQgINAK.js} +1 -1
- package/dist/client/assets/openai-conversation-Dd1mqt5t.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-DfaNoant.js → optimistic-project-sidebar-views-6bEngMBF.js} +1 -1
- package/dist/client/assets/{organization-choice-DUpINEOM.js → organization-choice-BsLbocoH.js} +1 -1
- package/dist/client/assets/{orgs-NyCttTtW.js → orgs-BviopEAn.js} +1 -1
- package/dist/client/assets/{page-seo-form-BcwaLsu1.js → page-seo-form-BI_Up050.js} +1 -1
- package/dist/client/assets/{pair-C-wmghxs.js → pair-gT7Vn8Gp.js} +1 -1
- package/dist/client/assets/{plan-ladder-Dz96Ryba.js → plan-ladder-eppTKAOz.js} +1 -1
- package/dist/client/assets/{popover-BJjSe4oX.js → popover-UZd_hI6l.js} +1 -1
- package/dist/client/assets/post-calendar-Cjve8Rxv.js +1 -0
- package/dist/client/assets/{post-editor-DUzLhnjz.js → post-editor-CZ0y9t6g.js} +2 -2
- package/dist/client/assets/{preview-content-DLzimxeU.js → preview-content-DDkyBqjA.js} +1 -1
- package/dist/client/assets/{preview-dialog-feNNzmyD.js → preview-dialog-ClQDORRP.js} +1 -1
- package/dist/client/assets/{preview-panel-CYRzCG9l.js → preview-panel-D6Cx93Va.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-DCoADulv.js → product-picker-dialog-BzADIVCT.js} +1 -1
- package/dist/client/assets/{profile-C4WMC8IX.js → profile-3pRJt6iK.js} +1 -1
- package/dist/client/assets/{project-app-view-CLP8CgRj.js → project-app-view-DOlvQRFJ.js} +1 -1
- package/dist/client/assets/{project-feed-o8j1clyL.js → project-feed-DwG8xB7e.js} +1 -1
- package/dist/client/assets/{project-icon-DyrKdiRe.js → project-icon-CgRPdhMz.js} +1 -1
- package/dist/client/assets/project-reports-D_goeZQT.js +1 -0
- package/dist/client/assets/project-tasks-DzgzriDY.js +1 -0
- package/dist/client/assets/{projects-DEh_o8C9.js → projects-DAlf21yV.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Cdl4kOQ1.js → projects-empty-state-NpSKf9NQ.js} +1 -1
- package/dist/client/assets/{prompts-Bc9FLvmN.js → prompts-BqXStpOV.js} +1 -1
- package/dist/client/assets/record-editor-CwaNJSND.js +1 -0
- package/dist/client/assets/redirect-editor-CfZclWU6.js +1 -0
- package/dist/client/assets/reports-FtFAx270.js +1 -0
- package/dist/client/assets/{reports-onboarding-DetN93z1.js → reports-onboarding-DNardEjj.js} +1 -1
- package/dist/client/assets/{reports-tab-ChGluXDr.js → reports-tab-B7A5GfAR.js} +2 -2
- package/dist/client/assets/{reports-oNZDdjI5.js → reports-zibGg05d.js} +1 -1
- package/dist/client/assets/{repositories-CiOfBaLB.js → repositories-DCzfX5wT.js} +1 -1
- package/dist/client/assets/{repository-binding-BGLfNZVf.js → repository-binding-GEAUbB-O.js} +1 -1
- package/dist/client/assets/{repository-import-picker-CglAAV-N.js → repository-import-picker-CGZicTtt.js} +1 -1
- package/dist/client/assets/{repository-picker-Cn86nava.js → repository-picker-ipWiqqIY.js} +1 -1
- package/dist/client/assets/{require-capability-DvSGwHTo.js → require-capability-DCY-qqzS.js} +1 -1
- package/dist/client/assets/{required-auth-layout-YTpcWMST.js → required-auth-layout-B0JL0M-z.js} +1 -1
- package/dist/client/assets/{reset-password-oN8mFGBD.js → reset-password-C0OP0JfY.js} +1 -1
- package/dist/client/assets/{resizable-BGEY0EFD.js → resizable-CNroF4sn.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-voZLivWv.js → resolve-tab-icon-Dxlq4MHo.js} +1 -1
- package/dist/client/assets/{review-settings-DetXY7FI.js → review-settings-DUuUJ0iP.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CI2Op3JZ.js → rich-text-link-control-Cyib9lpp.js} +1 -1
- package/dist/client/assets/{roles-DUajMmJL.js → roles-B3QPIjlh.js} +1 -1
- package/dist/client/assets/route--gK_s8W2.js +1 -0
- package/dist/client/assets/{route-DJLRE8ic.js → route-Dh4tgoWv.js} +1 -1
- package/dist/client/assets/route-K7GDvkOp.js +1 -0
- package/dist/client/assets/{runnable-block-editor-4vBz623-.js → runnable-block-editor-cJtvApNo.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-C_3fMqSf.js → sandbox-lifecycle-context-DtkY5KHH.js} +1 -1
- package/dist/client/assets/{schema-DAiRf49Q.js → schema-DCzFPjhQ.js} +1 -1
- package/dist/client/assets/schema-DxY623qB.js +1 -0
- package/dist/client/assets/{scroll-area-D8pwM87R.js → scroll-area-BOuDQrjF.js} +1 -1
- package/dist/client/assets/{search-input-BADdEzRB.js → search-input-DXojQXHS.js} +1 -1
- package/dist/client/assets/{search-toggle-BXsTAhJH.js → search-toggle-BHQUIlgP.js} +1 -1
- package/dist/client/assets/{secret-picker-DYQ3Y0hB.js → secret-picker-DghVxrjs.js} +1 -1
- package/dist/client/assets/{secrets-DkldztQE.js → secrets-Bw5YDwtb.js} +1 -1
- package/dist/client/assets/{sections-editor-C-qAs9t3.js → sections-editor-zfrx_XIM.js} +2 -2
- package/dist/client/assets/{select-model-Coln0RuO.js → select-model-B19lAAyT.js} +1 -1
- package/dist/client/assets/{select-DoctMyOC.js → select-nSDsr0Zi.js} +1 -1
- package/dist/client/assets/seo-editor-Do7Fekf0.js +1 -0
- package/dist/client/assets/{separator-B4WfBd40.js → separator-D9Lu8Cm9.js} +1 -1
- package/dist/client/assets/{settings-tab-DFn-ybRc.js → settings-tab-TpMIkIJy.js} +1 -1
- package/dist/client/assets/{sheet-B6SnxCii.js → sheet-Bg01hTvG.js} +1 -1
- package/dist/client/assets/{shell-layout-_gLI3g1W.js → shell-layout-BO31z5MQ.js} +1 -1
- package/dist/client/assets/{skills-gj8cVLsz.js → skills-Bf1PjaTY.js} +1 -1
- package/dist/client/assets/{slider-DN1_RJ5Y.js → slider-D1s4eRGk.js} +1 -1
- package/dist/client/assets/{sortable.esm-39sGMg0A.js → sortable.esm-DcO5R1X-.js} +1 -1
- package/dist/client/assets/{sso-CMGxfocU.js → sso-C7L4UDB8.js} +1 -1
- package/dist/client/assets/{suggestion-DPIiudVw.js → suggestion-D6_m0iRs.js} +1 -1
- package/dist/client/assets/{switch-CXuIYT9e.js → switch-C2mEXqfo.js} +1 -1
- package/dist/client/assets/{symbol-CTW82RbO.js → symbol-Cb89sKGf.js} +1 -1
- package/dist/client/assets/{synced-repos-DAtDW7FL.js → synced-repos-uukt7jKa.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BkQvbqzH.js → tab-icon-glyph-Cmkw2CVR.js} +1 -1
- package/dist/client/assets/{table-1p2TxQNp.js → table-CtPELWNl.js} +1 -1
- package/dist/client/assets/{tabs-CpwN-luG.js → tabs-D0ZapmHf.js} +1 -1
- package/dist/client/assets/{task-board-BR1DvBwF.js → task-board-Cq7KN9Yp.js} +1 -1
- package/dist/client/assets/{task-route-C_DvpiOV.js → task-route-Cj_KfcXd.js} +1 -1
- package/dist/client/assets/{task-status-edWeKF1d.js → task-status-Dl4YXdIS.js} +1 -1
- package/dist/client/assets/taskboard-analytics-DynaE5kc.js +1 -0
- package/dist/client/assets/tasks-YwCQME0_.js +1 -0
- package/dist/client/assets/{tasks-0Nq-zOga.js → tasks-ZUmpusO0.js} +1 -1
- package/dist/client/assets/{textarea-BfwTTa-d.js → textarea-DKdq_MAz.js} +1 -1
- package/dist/client/assets/{thread-analytics-CopoUn-p.js → thread-analytics-Dmg-wMap.js} +1 -1
- package/dist/client/assets/{thread-button-D0jo5h0y.js → thread-button-D0vpHKhc.js} +1 -1
- package/dist/client/assets/{thread-intent-CgK6_lx2.js → thread-intent-DTPz1weL.js} +1 -1
- package/dist/client/assets/{thread-route-B6Fc_RFE.js → thread-route-COCJBhr6.js} +1 -1
- package/dist/client/assets/{thread-route-CgdmmioO.js → thread-route-gGOzpjkp.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BK4lUe-W.js → thread-sheet-body-BuMvTCp6.js} +1 -1
- package/dist/client/assets/{time-range-picker-_BVYixos.js → time-range-picker-MFuLyt2k.js} +1 -1
- package/dist/client/assets/{toggle-group-DLHDaWVo.js → toggle-group-CZ2TAUmo.js} +1 -1
- package/dist/client/assets/{tool-namespace-BPLgX6r-.js → tool-namespace-BsBj6Gec.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-C_OqF99U.js → toolbar-icon-button-BbfFE6qt.js} +1 -1
- package/dist/client/assets/{tooltip-Dz-qpzYY.js → tooltip-3DBbiHrv.js} +1 -1
- package/dist/client/assets/{tooltipContext-C5rFwURT.js → tooltipContext-Bv4e3_jQ.js} +1 -1
- package/dist/client/assets/{track-D8_YlvuV.js → track-2QxiEKmh.js} +1 -1
- package/dist/client/assets/{types-C-bGWQ4N.js → types-DJQTaYxP.js} +1 -1
- package/dist/client/assets/{url-slug-DnJTGqgD.js → url-slug-CVpOSHeG.js} +1 -1
- package/dist/client/assets/{usage-stats-Dskh866S.js → usage-stats-x-NR7rQ4.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BAXvzpWI.js → use-ai-providers-scSugiQF.js} +1 -1
- package/dist/client/assets/{use-automations-jtpzDfwI.js → use-automations-DxHm0Snl.js} +1 -1
- package/dist/client/assets/{use-autosave-SKFoSjPt.js → use-autosave-6XZ1t5rl.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CA9xW2qA.js → use-chat-layout-state-n4Q3uYHD.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-BYokh2PZ.js → use-chat-navigation-CpL4JFZX.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D_sbvWIH.js → use-clock-tick-X8apRSs5.js} +1 -1
- package/dist/client/assets/{use-connect-companion-5bDO4jQu.js → use-connect-companion-DejR02Br.js} +1 -1
- package/dist/client/assets/{use-connection-BIx1BUIM.js → use-connection--fjYRP_g.js} +1 -1
- package/dist/client/assets/{use-copy-Da7eNVy9.js → use-copy-DWNF2ghn.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-ejJy1cdv.js → use-create-virtual-mcp-CSStLbyC.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CaWCAmJI.js → use-date-fns-locale-uYFiDToW.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DugSqk23.js → use-debounced-autosave-NE-5LrTu.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DpRvXYf_.js → use-debounced-value-Db_6wQub.js} +1 -1
- package/dist/client/assets/{use-deco-credits-rm4q7hjq.js → use-deco-credits-DiTvJIB8.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DzS1GTJA.js → use-decopilot-events-D14uF_Cy.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CveANzdS.js → use-delete-connection-CJW-ymsx.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dtf1f6in.js → use-deployment-admin-RiMk6_Ng.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-DnwLT6n2.js → use-ensure-project-folder-CJRjmHmY.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-gddbB98r.js → use-fast-preview-draft-url-CSEoIdMd.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cs5X6vH_.js → use-file-configs-BJG54sLn.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DzEoSjmb.js → use-infinite-scroll-BPxCDDTo.js} +1 -1
- package/dist/client/assets/{use-join-requests-BFtEcuZ5.js → use-join-requests-CPoLxTNh.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-D3i-CtUA.js → use-main-panel-tabs-Cal5VUTK.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DBZY5zBR.js → use-mcp-auth-status-CqBzsTJX.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dii6HKbn.js → use-mcp-client-BWo29jbN.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BrfI-bT0.js → use-mcp-prompts-BmY4-dHy.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DvCI3rin.js → use-mcp-tools-D9a3atY2.js} +1 -1
- package/dist/client/assets/{use-members-Clb4I0WG.js → use-members-BsPA0Ct2.js} +1 -1
- package/dist/client/assets/{use-mobile-H9hGbUdK.js → use-mobile-BcwC7VU3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C_Bk-WTy.js → use-navigate-to-agent-f1RDTOQU.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-Enk3EEXi.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CsVJpAR8.js → use-open-billing-url-B1MJm7M5.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CGnpmIwt.js → use-org-auth-client-sBWqKZAZ.js} +1 -1
- package/dist/client/assets/{use-org-fs-090kBeGb.js → use-org-fs-BruBSf1P.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CXYmF8vW.js → use-org-repo-syncs-CzMHVaws.js} +1 -1
- package/dist/client/assets/{use-org-sso-D0pRb0h2.js → use-org-sso-DQNJJVcp.js} +1 -1
- package/dist/client/assets/{use-organization-roles-2XHDK9nW.js → use-organization-roles-BLHGg1C0.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BCnCWSM4.js → use-organization-settings-C2COOtae.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CzmyA3PY.js → use-panel-navigate-sjPSBICL.js} +1 -1
- package/dist/client/assets/{use-project-scope-0DIp_prZ.js → use-project-scope-B_oLVbNv.js} +1 -1
- package/dist/client/assets/{use-releases-CA_rM0y-.js → use-releases-BDZh8PFH.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Nc7WKzHO.js → use-reports-diagnostic-bJK07n1G.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CUG13fIj.js → use-sandbox-events-BxpyP1-g.js} +1 -1
- package/dist/client/assets/{use-secrets-CAgjCyZi.js → use-secrets-Dut38iEG.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-nZ_rR067.js → use-section-preview-base-7N5lxhPB.js} +1 -1
- package/dist/client/assets/{use-tags-Cx_sTi85.js → use-tags-CjD7AOOq.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-HMQ395Ct.js → use-task-board-analytics-C-GLsHqS.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BIxyvwMu.js → use-task-board-events-B4nYkYUb.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-C-ZolRBO.js → use-task-board-item-prs-CdlxN-Va.js} +1 -1
- package/dist/client/assets/{use-task-board-items-fJTXcazL.js → use-task-board-items-Bx0LqpaH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BGRg9gqV.js → use-task-metadata-BULXjcEM.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CNHU0H7W.js → use-thread-analytics-BtDukIrk.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BdDJ85ic.js → use-thread-outputs-CaENK2ep.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BBVki4Du.js +1 -0
- package/dist/client/assets/{useQueries-SbEnc9zP.js → useQueries-Ij5noImS.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DP1_6mso.js +1 -0
- package/dist/client/assets/{users-DAar6oNb.js → users-Dd13UOxE.js} +1 -1
- package/dist/client/assets/{utils-B82E0qSP.js → utils-CoFqD39i.js} +1 -1
- package/dist/client/assets/variant-calendar-DLgW_8Bs.js +1 -0
- package/dist/client/assets/{variant-matcher-override-CUEPR4IO.js → variant-matcher-override-BLuZbjc2.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-0buE2kLD.js → view-mode-toggle-DGF1qVNP.js} +1 -1
- package/dist/client/assets/{virtual-mcp-IOrpgzuz.js → virtual-mcp-eMBT1Rwh.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BFh4zrHL.js → watch-sse-pool-Bb7_5bsI.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/add-connection-dialog-C99-KIxD.js +0 -1
- package/dist/client/assets/agent-analytics-DezOg4iq.js +0 -2
- package/dist/client/assets/agent-app-OwJ0X9iQ.js +0 -1
- package/dist/client/assets/agent-assets-DtBwQzpc.js +0 -1
- package/dist/client/assets/agent-deck-CVQI0IJ8.js +0 -1
- package/dist/client/assets/agent-e2e-Cf-7o5JH.js +0 -1
- package/dist/client/assets/agent-experiments-BjOexOgL.js +0 -1
- package/dist/client/assets/agent-file-CVJUPUB9.js +0 -1
- package/dist/client/assets/agent-hosting-DJ5loXp1.js +0 -1
- package/dist/client/assets/agent-library-DMvAbH9s.js +0 -1
- package/dist/client/assets/agent-library-file-B-EjZyU3.js +0 -1
- package/dist/client/assets/agent-monitor-CwvDQf-0.js +0 -1
- package/dist/client/assets/agent-settings-S4roascd.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DsF3btqi.js +0 -2
- package/dist/client/assets/agent-view-DNsQvn8c.js +0 -1
- package/dist/client/assets/api-keys-BFo2F8un.js +0 -1
- package/dist/client/assets/app-editor-CLedpfSA.js +0 -1
- package/dist/client/assets/category-editor-Dh4k-2za.js +0 -1
- package/dist/client/assets/collection-detail-BVfokcci.js +0 -1
- package/dist/client/assets/connection-detail-Cx1TsCEV.js +0 -1
- package/dist/client/assets/connection-form-helpers-D5AT-OBk.js +0 -1
- package/dist/client/assets/connections-DEMu2UYi.js +0 -1
- package/dist/client/assets/context-B4AjxGVI.js +0 -1
- package/dist/client/assets/flat-project-C0OkliLB.js +0 -1
- package/dist/client/assets/home-DNlj1vDz.js +0 -1
- package/dist/client/assets/index-DC6iJbGF.js +0 -26
- package/dist/client/assets/library-DUvGua8d.js +0 -1
- package/dist/client/assets/openai-conversation-D0sRUrnM.js +0 -3
- package/dist/client/assets/post-calendar-Dd7Rx0Y2.js +0 -1
- package/dist/client/assets/project-reports-5Kg7yDsr.js +0 -1
- package/dist/client/assets/project-tasks-C93fh75m.js +0 -1
- package/dist/client/assets/record-editor-B_D1bdnj.js +0 -1
- package/dist/client/assets/redirect-editor-CwqE3fJt.js +0 -1
- package/dist/client/assets/reports-Bmm0luQ2.js +0 -1
- package/dist/client/assets/route-Frsbu1bb.js +0 -1
- package/dist/client/assets/route-JSQmVwkK.js +0 -1
- package/dist/client/assets/seo-editor-AS6vQaHK.js +0 -1
- package/dist/client/assets/taskboard-analytics-BKAHiV-A.js +0 -1
- package/dist/client/assets/tasks-CbEmZqW6.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-ZHXdwaTL.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DhuK1n82.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DmpJFLm-.js +0 -1
- package/dist/client/assets/variant-calendar-C_pGmhST.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-
|
|
2
|
-
import{r as v,aD as Et,aW as Ye,aE as Ee,c as fe,b as Te,j as s,q as Xn,D as Zn,K as Xs,s as es,v as ts,e as Zs,h as jt,I as Rn,B as Ue,w as er,a6 as ns,aX as tr,a2 as tn,aY as nr,aV as sr,a0 as Ln,a1 as On,l as Ht,P as _n,y as rr,t as An}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-zfrx_XIM.js","assets/index-CRbDzsEl.js","assets/index-DQO0lnZr.css","assets/chat-context-NYUfgJBl.js","assets/use-panel-navigate-sjPSBICL.js","assets/thread-route-gGOzpjkp.js","assets/use-project-scope-B_oLVbNv.js","assets/repository-binding-GEAUbB-O.js","assets/use-mcp-client-BWo29jbN.js","assets/auth-Cf8kTvK7.js","assets/autosend-Dbvfg9pv.js","assets/thread-intent-DTPz1weL.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-Bb7_5bsI.js","assets/task-board-Cq7KN9Yp.js","assets/schema-DCzFPjhQ.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-D14uF_Cy.js","assets/use-ai-providers-scSugiQF.js","assets/use-chat-navigation-CpL4JFZX.js","assets/location-BjlyegC2.js","assets/use-organization-settings-C2COOtae.js","assets/use-new-blocks-editor-Enk3EEXi.js","assets/runnable-block-editor-cJtvApNo.js","assets/input-XQLahzDk.js","assets/usage-stats-x-NR7rQ4.js","assets/tool-namespace-BsBj6Gec.js","assets/form-Bn1uWhLp.js","assets/label-BUw2LYOJ.js","assets/utils-CVEq3hMx.js","assets/markdown-CW257Zz5.js","assets/use-copy-DWNF2ghn.js","assets/Copy01-CT9uxfj6.js","assets/ZoomOut-DJOChAz1.js","assets/use-mobile-BcwC7VU3.js","assets/tooltip-3DBbiHrv.js","assets/index-DPPcuuZa.js","assets/agent-icon-CSrsRkkV.js","assets/AlertCircle-BBiRNTdE.js","assets/Tool01-D8RNlK5k.js","assets/ArrowUp-XUO4rGpO.js","assets/ArrowLeft-DwPfX3sc.js","assets/LinkBroken01-BFW8MxYc.js","assets/ShoppingBag01-C_AR4ZKW.js","assets/Building02-CFG818HY.js","assets/CheckCircle-BZiV5rFy.js","assets/ChevronUp-ZSzJudc4.js","assets/ChevronSelectorVertical-Dc4zDElk.js","assets/UserSquare-BG_D4lBt.js","assets/CreditCard01-DCwoKma6.js","assets/DotsVertical-CcRpaMtq.js","assets/Image01-DUunwh52.js","assets/Globe04-D88PtZSB.js","assets/SwitchHorizontal01-D8mpLNM6.js","assets/Key01-Dy9XOW24.js","assets/Link01-BDbdWLwx.js","assets/Monitor01-Cm6_ReiN.js","assets/Sun-Dzm8FpU3.js","assets/Play-DFfgxv2q.js","assets/Plus-clvoB9-y.js","assets/SearchMd-Bg-9XsfQ.js","assets/Trash01-ByfCfoe2.js","assets/Upload01-BOzWcBO4.js","assets/User01-VVR3ncLA.js","assets/Users01-BT5Jdc2I.js","assets/XClose-Ck0EFhGe.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-D9OpoKyB.js","assets/file-type-icon-hf5iGs8U.js","assets/shell-layout-BO31z5MQ.js","assets/avatar-CVhMMaTf.js","assets/use-clock-tick-X8apRSs5.js","assets/command-CJiwms5W.js","assets/index-4oHb6320.js","assets/integration-icon-BELz_pOH.js","assets/project-icon-CgRPdhMz.js","assets/new-project-dialog-CU6GK7Hi.js","assets/repository-import-picker-CGZicTtt.js","assets/use-navigate-to-agent-f1RDTOQU.js","assets/repository-picker-ipWiqqIY.js","assets/useInfiniteQuery-BBVki4Du.js","assets/infiniteQueryObserver-Dhuk-wHX.js","assets/collection-search-JcNHcOFg.js","assets/use-debounced-value-Db_6wQub.js","assets/required-auth-layout-B0JL0M-z.js","assets/use-org-sso-DQNJJVcp.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-BIT8lUsr.js","assets/select-nSDsr0Zi.js","assets/index-BdQq_4o_.js","assets/tabs-D0ZapmHf.js","assets/use-deco-credits-DiTvJIB8.js","assets/toggle-group-CZ2TAUmo.js","assets/use-open-billing-url-B1MJm7M5.js","assets/index-m-B-HtFl.js","assets/checkbox-1mSDcatb.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-UZd_hI6l.js","assets/drawer-DWjMBwyf.js","assets/input-C8SbKhCo.js","assets/suggestion-D6_m0iRs.js","assets/use-chat-layout-state-n4Q3uYHD.js","assets/use-file-configs-BJG54sLn.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-BmY4-dHy.js","assets/use-org-fs-BruBSf1P.js","assets/question-004-sINsf4GQ.js","assets/use-members-BsPA0Ct2.js","assets/use-org-auth-client-sBWqKZAZ.js","assets/feature-paywall-D3P0r-v1.js","assets/plan-ladder-eppTKAOz.js","assets/add-connection-dialog-DhxH1mO6.js","assets/extract-connection-data-BWH-Gguq.js","assets/metadata-D72DunRR.js","assets/connection-pgjV95kc.js","assets/url-slug-CVpOSHeG.js","assets/connection-card-CWkexnWw.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-DKdq_MAz.js","assets/use-connection--fjYRP_g.js","assets/schema-DxY623qB.js","assets/connection-form-helpers-W4yLfkzt.js","assets/authenticate-and-persist-oauth-CNIjDkAv.js","assets/mcp-oauth-DJzQquAH.js","assets/mcp-oauth-DcDGTHX8.js","assets/collection-tabs-CSZlwXCA.js","assets/badge-GBNejOns.js","assets/use-infinite-scroll-BPxCDDTo.js","assets/useSuspenseInfiniteQuery-DP1_6mso.js","assets/use-task-board-events-B4nYkYUb.js","assets/input-Bwd_JSM8.css","assets/claim-phase-copy-Clje3zqq.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-gT7Vn8Gp.js","assets/collapsible-CeMlXkLt.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-1q9SfIz-.js","assets/types-DJQTaYxP.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-Bg01hTvG.js","assets/use-thread-outputs-CaENK2ep.js","assets/utils-CoFqD39i.js","assets/scroll-area-BOuDQrjF.js","assets/monaco-editor-BuUSistE.js","assets/editor-D6w2Bb1A.js","assets/calendar-D4OoX9Wr.js","assets/rich-text-link-control-Cyib9lpp.js","assets/switch-C2mEXqfo.js","assets/core.esm-BaMzqjA4.js","assets/sortable.esm-DcO5R1X-.js","assets/view-mode-toggle-DGF1qVNP.js","assets/combobox-B0RpAw2t.js","assets/alert-dialog-Bq1vUmcb.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-DXojQXHS.js","assets/asset-utils-D2JqsHLw.js","assets/sandbox-git-api-C7JbVL7R.js","assets/mustache-BISt82Zb.js","assets/page-seo-form-BI_Up050.js","assets/use-section-preview-base-7N5lxhPB.js","assets/section-preview-url-7zfngvgW.js","assets/variant-matcher-override-BLuZbjc2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as v,aD as Et,aW as Ye,aE as Ee,c as fe,b as Te,j as s,q as Xn,D as Zn,K as Xs,s as es,v as ts,e as Zs,h as jt,I as Rn,B as Ue,w as er,a6 as ns,aX as tr,a2 as tn,aY as nr,aV as sr,a0 as Ln,a1 as On,l as Ht,P as _n,y as rr,t as An}from"./index-CRbDzsEl.js";import{A as ar}from"./agent-view-guard-CbFaNTaO.js";import{F as ir}from"./feature-gate-CAHn_bYX.js";import{a as or,b as Nt,r as ss,l as rs,f as lr,w as cr}from"./chat-context-NYUfgJBl.js";import{t as dr}from"./ChevronUp-ZSzJudc4.js";import{I as as,R as ur,S as mr,d as fr,T as pr,U as hr,V as gr,W as vr,X as Bn,K as br}from"./agent-icon-CSrsRkkV.js";import{a as xr}from"./UserSquare-BG_D4lBt.js";import{s as yr}from"./Plus-clvoB9-y.js";import{P as wr,a as kr,b as Pr}from"./popover-UZd_hI6l.js";import{e as it,b as ot,c as is,f as os,C as ls,a as cs}from"./command-CJiwms5W.js";import{c as Sr,a as Er}from"./repository-binding-GEAUbB-O.js";import{b as nn}from"./sandbox-lifecycle-context-DtkY5KHH.js";import{e as jr}from"./backoff-CrEUbyZT.js";import{f as Nr}from"./thread-intent-DTPz1weL.js";import{a as ds}from"./input-XQLahzDk.js";import{N as Tr,c as Cr,s as lt,n as sn,d as us,f as $e,v as ms,h as Rr,u as Lr,j as Or,k as _r,l as Ar,m as Br,o as Fn}from"./claim-phase-copy-Clje3zqq.js";import{u as Fr}from"./use-mobile-BcwC7VU3.js";import{b as Vt,T as qt,a as Wt}from"./tooltip-3DBbiHrv.js";import{T as nt}from"./toolbar-icon-button-BbfFE6qt.js";import{b as $r,a as Mr,u as fs,g as Dr,c as Kr,B as Gt,P as zr,r as Ir,R as Ur,d as Hr,e as rn,f as ps,h as Vr,i as qr,j as Wr,l as Gr,m as Jr,p as Yr,k as Qr,S as Jt}from"./runnable-block-editor-cJtvApNo.js";import{w as yt,i as Xr}from"./variant-matcher-override-BLuZbjc2.js";import{r as Zr,w as ea,D as ta,b as $n,a as na}from"./section-preview-url-7zfngvgW.js";import{u as sa}from"./use-fast-preview-draft-url-CSEoIdMd.js";import{u as ra,w as Mn}from"./device-hint-DAX5UNJH.js";import{a as aa,c as hs}from"./shell-layout-BO31z5MQ.js";import{u as gs,b as ia}from"./use-sandbox-events-BxpyP1-g.js";import{u as Xt}from"./useQueries-Ij5noImS.js";import{i as oa}from"./LinkBroken01-BFW8MxYc.js";import{u as vs}from"./blocks-preview-workspace-context-BeUFeWIT.js";import{i as la}from"./AlertCircle-BBiRNTdE.js";import{E as an}from"./empty-state-DfOpTmwf.js";import{M as ca}from"./monaco-editor-BuUSistE.js";import{u as da}from"./use-new-blocks-editor-Enk3EEXi.js";import{a as ua}from"./utils-CoFqD39i.js";import{R as Dn,a as wt,b as Kn}from"./resizable-CNroF4sn.js";import{r as ma}from"./virtual-mcp-eMBT1Rwh.js";import{d as fa}from"./delay-CnY5UFtP.js";import{a as Yt}from"./use-chat-layout-state-n4Q3uYHD.js";import{G as zn}from"./repository-picker-ipWiqqIY.js";import{R as pa}from"./repository-import-picker-CGZicTtt.js";import{r as ha}from"./use-main-panel-tabs-Cal5VUTK.js";import{u as ga}from"./use-task-metadata-BULXjcEM.js";import{b as va}from"./thread-route-gGOzpjkp.js";import"./use-panel-navigate-sjPSBICL.js";import"./use-project-scope-B_oLVbNv.js";import"./feature-paywall-D3P0r-v1.js";import"./plan-ladder-eppTKAOz.js";import"./use-decopilot-events-D14uF_Cy.js";import"./watch-sse-pool-Bb7_5bsI.js";import"./task-board-Cq7KN9Yp.js";import"./schema-DCzFPjhQ.js";import"./autosend-Dbvfg9pv.js";import"./use-mcp-client-BWo29jbN.js";import"./auth-Cf8kTvK7.js";import"./use-ai-providers-scSugiQF.js";import"./use-chat-navigation-CpL4JFZX.js";import"./location-BjlyegC2.js";import"./use-organization-settings-C2COOtae.js";import"./Tool01-D8RNlK5k.js";import"./ArrowUp-XUO4rGpO.js";import"./ArrowLeft-DwPfX3sc.js";import"./ShoppingBag01-C_AR4ZKW.js";import"./ZoomOut-DJOChAz1.js";import"./Building02-CFG818HY.js";import"./CheckCircle-BZiV5rFy.js";import"./ChevronSelectorVertical-Dc4zDElk.js";import"./Copy01-CT9uxfj6.js";import"./CreditCard01-DCwoKma6.js";import"./DotsVertical-CcRpaMtq.js";import"./Image01-DUunwh52.js";import"./Globe04-D88PtZSB.js";import"./SwitchHorizontal01-D8mpLNM6.js";import"./Key01-Dy9XOW24.js";import"./Link01-BDbdWLwx.js";import"./Monitor01-Cm6_ReiN.js";import"./Sun-Dzm8FpU3.js";import"./Play-DFfgxv2q.js";import"./SearchMd-Bg-9XsfQ.js";import"./Trash01-ByfCfoe2.js";import"./Upload01-BOzWcBO4.js";import"./User01-VVR3ncLA.js";import"./Users01-BT5Jdc2I.js";import"./XClose-Ck0EFhGe.js";import"./index-4oHb6320.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./usage-stats-x-NR7rQ4.js";import"./tool-namespace-BsBj6Gec.js";import"./form-Bn1uWhLp.js";import"./label-BUw2LYOJ.js";import"./utils-CVEq3hMx.js";import"./markdown-CW257Zz5.js";import"./use-copy-DWNF2ghn.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-D9OpoKyB.js";import"./file-type-icon-hf5iGs8U.js";import"./chat-draft-BIT8lUsr.js";import"./select-nSDsr0Zi.js";import"./index-BdQq_4o_.js";import"./index-DPPcuuZa.js";import"./tabs-D0ZapmHf.js";import"./use-deco-credits-DiTvJIB8.js";import"./toggle-group-CZ2TAUmo.js";import"./use-open-billing-url-B1MJm7M5.js";import"./index-m-B-HtFl.js";import"./checkbox-1mSDcatb.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-CVhMMaTf.js";import"./drawer-DWjMBwyf.js";import"./input-C8SbKhCo.js";import"./suggestion-D6_m0iRs.js";import"./use-mcp-prompts-BmY4-dHy.js";import"./use-org-fs-BruBSf1P.js";import"./useInfiniteQuery-BBVki4Du.js";import"./infiniteQueryObserver-Dhuk-wHX.js";import"./question-004-sINsf4GQ.js";import"./use-members-BsPA0Ct2.js";import"./use-org-auth-client-sBWqKZAZ.js";import"./add-connection-dialog-DhxH1mO6.js";import"./collection-search-JcNHcOFg.js";import"./extract-connection-data-BWH-Gguq.js";import"./metadata-D72DunRR.js";import"./connection-pgjV95kc.js";import"./url-slug-CVpOSHeG.js";import"./connection-card-CWkexnWw.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-BELz_pOH.js";import"./textarea-DKdq_MAz.js";import"./use-connection--fjYRP_g.js";import"./schema-DxY623qB.js";import"./connection-form-helpers-W4yLfkzt.js";import"./authenticate-and-persist-oauth-CNIjDkAv.js";import"./mcp-oauth-DJzQquAH.js";import"./mcp-oauth-DcDGTHX8.js";import"./collection-tabs-CSZlwXCA.js";import"./badge-GBNejOns.js";import"./use-infinite-scroll-BPxCDDTo.js";import"./useSuspenseInfiniteQuery-DP1_6mso.js";import"./use-task-board-events-B4nYkYUb.js";import"./pair-gT7Vn8Gp.js";import"./collapsible-CeMlXkLt.js";import"./use-clock-tick-X8apRSs5.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-1q9SfIz-.js";import"./types-DJQTaYxP.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-Bg01hTvG.js";import"./use-navigate-to-agent-f1RDTOQU.js";import"./use-thread-outputs-CaENK2ep.js";import"./scroll-area-BOuDQrjF.js";import"./calendar-D4OoX9Wr.js";import"./rich-text-link-control-Cyib9lpp.js";import"./switch-C2mEXqfo.js";import"./core.esm-BaMzqjA4.js";import"./sortable.esm-DcO5R1X-.js";import"./view-mode-toggle-DGF1qVNP.js";import"./combobox-B0RpAw2t.js";import"./alert-dialog-Bq1vUmcb.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-DXojQXHS.js";import"./use-debounced-value-Db_6wQub.js";import"./use-file-configs-BJG54sLn.js";import"./asset-utils-D2JqsHLw.js";import"./sandbox-git-api-C7JbVL7R.js";import"./project-icon-CgRPdhMz.js";import"./new-project-dialog-CU6GK7Hi.js";import"./required-auth-layout-B0JL0M-z.js";import"./use-org-sso-DQNJJVcp.js";import"./editor-D6w2Bb1A.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-tools-D9a3atY2.js";import"./resolve-tab-icon-Dxlq4MHo.js";const ba={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function xa(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,l=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?ba:r&&i&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const ya=1e4,wa=1e3,ka=3e4;function Pa({iframeRef:t,src:e,active:n}){const r=v.useRef(0),i=v.useRef(null),u=v.useRef(null),l=v.useRef(e),c=v.useRef(n);l.current=e,c.current=n;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},ya)},h=()=>{if(!c.current||!l.current)return;u.current&&clearTimeout(u.current);const j=jr(ka,wa,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const b=t.current,P=l.current;!b||!P||!c.current||(b.src=P,d())},j)},f=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return v.useEffect(()=>{if(o(),r.current=0,!(!n||!e))return d(),o},[e,n]),{handleLoad:f,handleError:p}}const Sa=Et({tag:Ee(),id:Ee(),classes:Ee(),text:Ee(),html:Ee(),manifestKey:Ee().nullable(),componentName:Ee().nullable(),parents:Ee(),url:Ee(),path:Ee(),viewport:Et({width:Ye(),height:Ye()}),position:Et({x:Ye(),y:Ye()})}),Ea=`(function() {
|
|
3
3
|
if (window.__visualEditorActive) return;
|
|
4
4
|
window.__visualEditorActive = true;
|
|
5
5
|
|
|
@@ -548,4 +548,4 @@ import{r as v,aD as Et,aW as Ye,aE as Ee,c as fe,b as Te,j as s,q as Xn,D as Zn,
|
|
|
548
548
|
}
|
|
549
549
|
});
|
|
550
550
|
})();`;function Zt(t,e){let n=t,r=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const l=u.__resolveType;if(typeof l=="string"&&l&&l!==r){n=u,r=l;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(n.variants)?n.variants:[];if(i.length===0||i.every(c=>c?.rule?.__resolveType===Tr))return null;const l=[];for(const c of i){const o=c?.value;if(o&&typeof o=="object")for(const d of Zt(o,e)??[])l.includes(d)||l.push(d)}return l}if(Cr(r)){const i=n.section&&typeof n.section=="object"?Zt(n.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Je(t){return t.replace(/[`*_]/g,"\\$&")}function Ta(t,e){const n=[`The user selected an element on the live preview and asked: **"${Je(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&n.push(`**Section resolveType:** \`${Je(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${Je(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Je(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Je(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Je(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",i,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
|
|
551
|
-
`)}function Ca(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),f=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:f/o*100}}function Ra(t){const e=fe.c(45),{element:n,onDismiss:r}=t,[i,u]=v.useState(""),l=v.useRef(null),{sendMessage:c}=or(),{openSidePanel:o}=aa(),d=Te();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const F=Ta(n,i);o(),c({parts:[{type:"text",text:F}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const f=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=Ca(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const j=p,b=`${j.leftPct}%`,P=`${j.topPct}%`;let g;e[9]!==b||e[10]!==P?(g={left:b,top:P,width:"320px"},e[9]=b,e[10]=P,e[11]=g):g=e[11];let E;e[12]!==f?(E=F=>{F.preventDefault(),f()},e[12]=f,e[13]=E):E=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=F=>u(F.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=F=>{F.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let w;e[17]!==d?(w=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=w):w=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==w?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=w,e[22]=k):k=e[22];let x;e[23]!==i?(x=i.trim(),e[23]=i,e[24]=x):x=e[24];const B=!x;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let I;e[27]!==d?(I=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=I):I=e[28];let $;e[29]!==I?($=s.jsx("title",{children:I}),e[29]=I,e[30]=$):$=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=M):M=e[31];let L;e[32]!==$?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[$,M]}),e[32]=$,e[33]=L):L=e[33];let R;e[34]!==B||e[35]!==S||e[36]!==L?(R=s.jsx("button",{type:"submit",disabled:B,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=B,e[35]=S,e[36]=L,e[37]=R):R=e[37];let U;e[38]!==k||e[39]!==R||e[40]!==E?(U=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:E,children:[k,R]}),e[38]=k,e[39]=R,e[40]=E,e[41]=U):U=e[41];let D;return e[42]!==U||e[43]!==g?(D=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:U}),e[42]=U,e[43]=g,e[44]=D):D=e[44],D}const Un="site-links",La=/details?page|\bpdp\b/i,Oa=/listingpage|\bplp\b/i;function _a(t,e,n){const r=new Set;for(const c of n)La.test(c)&&r.add("product"),Oa.test(c)&&r.add("category");const i=lt(sn(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const Aa=["rosa","preto","pink","black"];function kt(t,e){const n=e.trim();return n?t(n):Aa.flatMap(r=>t(r))}function Ba(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const bs=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function on(t){return t.split("/")[0]??""}function Fa(t){const e=new Set;for(const n of t){const r=on(n);bs.has(r)&&e.add(r)}return e}function $a(t,e){const n=on(t);return!bs.has(n)||e.size===0?!0:e.has(n)}const Ma=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>kt(n=>Ba(t,n),e),optionsFromPayload:Pt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Pt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:Pt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:Pt},{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:Va}];function Da(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of Ma){if(d.kind!==c)continue;const h=r.find(f=>d.test(f)&&$a(f,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(on(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(Ka(t.has("category")?"category":"product")),l}function Ka(t){return{kind:t,id:Un,resolveType:Un,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ya(e,n)}}function Ie(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function za(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Ie(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Ie(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function xs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ys(t){try{return decodeURIComponent(t)}catch{return t}}function Ia(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ua(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Ia(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function ws(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=lt(sn(e)),{pattern:u,order:l}=Ua(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ys(d):null}function Pt(t,e){const n=Ie(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Ie(l);if(!c)continue;const o=ws(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Ie(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,f=Array.isArray(c.image)?Ie(c.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:o,label:h,image:p})}return i}function Ha(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?ys(n):null}function Va(t){const e=[],n=new Set,r=(i,u)=>{const l=Ie(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=Ha(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const qa=new Set(["login","logout","signin","sign-in","signup","sign-up","register","account","myaccount","my-account","minha-conta","conta","cart","carrinho","checkout","wishlist","favoritos","favorites","orders","pedidos","help","hc","sac","atendimento","contato","contact","institucional","newsletter","customer","sales","catalogsearch","search","busca","privacy-policy-cookie-restriction-mode"]);function Wa(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function Ga(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Ja(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Ya(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=ws(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&qa.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:Wa(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Ja(t))i(u,l,"product",c);for(const{href:u,text:l}of Ga(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function st(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const ks=1e4;function Qa(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 Xa(t,{resolveType:e,props:n}){const r=await fetch($r(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(ks)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Hn(t,e){const n=await fetch(Mr(t,e),{signal:AbortSignal.timeout(ks)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Za(t,e,n){const r=e.optionsFromPayload(await Hn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=$e(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Hn(t,u),n).filter(c=>c.kind==="product");return xs([r,l])}catch{return r}}function ei(t,e,n){return Xs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function ti(t,e,n,r){if(e.homepageLinks)return Za(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>Xa(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return xs(l.map(c=>e.optionsFromPayload(c,r)))}function en(t,e,n,r,i){return{queryKey:ei(t,e,n),queryFn:()=>ti(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function rt(t){const e=fe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let f;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(f=p=>s.jsxs(ot,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(as,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:$e(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=f):f=e[12],d=i.map(f),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(it,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function Vn(t){const e=fe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function ni(t){const e=fe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Te(),[d,h]=v.useState(!1),[f,p]=v.useState(""),[j,b]=v.useState(""),P=v.useRef(null),g=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,E=Qa(o),y=[...new Set(n.map(K=>E[K.kind].noun))].join(" or ");let w;e[0]!==o||e[1]!==y?(w=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=w):w=e[2];const k=w,x={template:r,paramName:i};let B;e[3]!==f?(B=(K,C)=>({source:K,query:C,options:K.clientFilter?st(C.data??[],f):C.data??[]}),e[3]=f,e[4]=B):B=e[4];const S=B,I=n.filter(di),$=n.filter(ci),M=Xt({queries:I.map(K=>en(l,K,j,x,d))});let L;e[5]!==M||e[6]!==S?(L=(K,C)=>S(K,M[C]),e[5]=M,e[6]=S,e[7]=L):L=e[7];const R=I.map(L),U=R.length===0||R.every(li),D=Xt({queries:$.map(K=>en(l,K,j,x,d&&U))});let F;e[8]!==D||e[9]!==S?(F=(K,C)=>S(K,D[C]),e[8]=D,e[9]=S,e[10]=F):F=e[10];const H=$.map(F),W=U?H:R,V=W.length===1&&W[0]?.source.homepageLinks?W[0]:null,O=V&&!V.query.isLoading&&!V.query.isError?V?.query.data??[]:[],ne=st(O.filter(oi),f),q=st(O.filter(ii),f),G=ne.length>0&&q.length>0,Q=K=>{h(K),P.current&&clearTimeout(P.current),p(K?u:""),b(K?u:"")};let Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=K=>{p(K),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{b(K)},300)},e[11]=Y):Y=e[11];const te=Y,ae=K=>{c(K),Q(!1)},X=us(f),J=$e(r,{[i]:X}),se=Zn,ve=Xn,pe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",de=ai;let ie;e[12]!==g||e[13]!==o?(ie=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=o,e[14]=ie):ie=e[14];let ue;e[15]!==ie?(ue=s.jsx(es,{className:"sr-only",children:s.jsx(ts,{children:ie})}),e[15]=ie,e[16]=ue):ue=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(as,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let Z;e[18]!==o?(Z=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=Z):Z=e[19];let oe;e[20]!==g?(oe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:g}),e[20]=g,e[21]=oe):oe=e[21];let he;e[22]!==Z||e[23]!==oe?(he=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[Z," ",oe]})]}),e[22]=Z,e[23]=oe,e[24]=he):he=e[24];const ge=os,Me=!1,Le="min-h-0 flex-1";let Oe;e[25]!==k||e[26]!==f?(Oe=s.jsx(ls,{autoFocus:!0,placeholder:k,value:f,onValueChange:te}),e[25]=k,e[26]=f,e[27]=Oe):Oe=e[27];const He=is,xe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let ye;e[28]!==o?(ye=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=ye):ye=e[29];let je;e[30]!==ye?(je=s.jsx(cs,{children:ye}),e[30]=ye,e[31]=je):je=e[31];const De=X&&s.jsx(it,{className:"shrink-0",children:s.jsxs(ot,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>ae(X),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(oa,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:J})]})]})}),_e=G?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(rt,{heading:E.category.heading,iconKind:"category",options:ne,template:r,paramName:i,keyPrefix:`${V?.source.id}:cat`,onSelect:ae})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(rt,{heading:E.product.heading,iconKind:"product",options:q,template:r,paramName:i,keyPrefix:`${V?.source.id}:prod`,onSelect:ae})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.map(K=>{const{source:C,query:me,options:Be}=K,{noun:Tt}=E[C.kind];if(me.isLoading)return s.jsx(Vn,{text:o("sandbox.pathParamPickerChip.loading",{noun:Tt})},C.id);if(me.isError)return s.jsx(Vn,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},C.id);if(C.homepageLinks){const Qe=me.data??[];return s.jsxs(v.Fragment,{children:[s.jsx(rt,{heading:E.category.heading,iconKind:"category",options:st(Qe.filter(ri),f),template:r,paramName:i,keyPrefix:`${C.id}:cat`,onSelect:ae}),s.jsx(rt,{heading:E.product.heading,iconKind:"product",options:st(Qe.filter(si),f),template:r,paramName:i,keyPrefix:`${C.id}:prod`,onSelect:ae})]},C.id)}return s.jsx(rt,{heading:W.length>1?E[C.kind].heading:void 0,iconKind:C.kind,options:Be,template:r,paramName:i,keyPrefix:C.id,onSelect:ae},C.id)})});let Ae;e[32]!==He||e[33]!==je||e[34]!==De||e[35]!==_e?(Ae=s.jsxs(He,{className:xe,children:[je,De,_e]}),e[32]=He,e[33]=je,e[34]=De,e[35]=_e,e[36]=Ae):Ae=e[36];let we;e[37]!==ge||e[38]!==Oe||e[39]!==Ae?(we=s.jsxs(ge,{shouldFilter:Me,className:Le,children:[Oe,Ae]}),e[37]=ge,e[38]=Oe,e[39]=Ae,e[40]=we):we=e[40];let Ce;e[41]!==ve||e[42]!==ue||e[43]!==he||e[44]!==we||e[45]!==de?(Ce=s.jsxs(ve,{className:pe,onClick:de,children:[ue,he,we]}),e[41]=ve,e[42]=ue,e[43]=he,e[44]=we,e[45]=de,e[46]=Ce):Ce=e[46];let Ke;return e[47]!==se||e[48]!==Q||e[49]!==d||e[50]!==Ce?(Ke=s.jsx(se,{open:d,onOpenChange:Q,children:Ce}),e[47]=se,e[48]=Q,e[49]=d,e[50]=Ce,e[51]=Ke):Ke=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:K=>{K.stopPropagation(),Q(!0)},children:u||g}),Ke]})}function si(t){return t.kind==="product"}function ri(t){return t.kind!=="product"}function ai(t){return t.stopPropagation()}function ii(t){return t.kind==="product"}function oi(t){return t.kind!=="product"}function li(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ci(t){return t.isFallback}function di(t){return!t.isFallback}function ui(t){const e=fe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const j={template:r,paramName:i},b=n.filter(mi);o=Xt,c=b.map(P=>en(u,P,"",j,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[f,p]=v.useState(!1);if(!f)for(const j of h){if(j.isLoading)break;const b=j.data?.[0];if(b){p(!0),queueMicrotask(()=>l(b.value));break}}return null}function mi(t){return!t.isFallback}function fi(t){const e=fe.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[l,c]=v.useState(r),[o,d]=v.useState(!1),h=v.useRef(!1);let f;e[0]!==n||e[1]!==u?(f=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=f):f=e[2];const p=f,j=l||p;let b;e[3]!==j?(b=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:j}),e[3]=j,e[4]=b):b=e[4];let P;e[5]!==p||e[6]!==u?(P=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=P):P=e[7];let g,E;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=S=>c(S.target.value),E=()=>d(!0),e[8]=g,e[9]=E):(g=e[8],E=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=us(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let w;e[16]!==l||e[17]!==p||e[18]!==P||e[19]!==N||e[20]!==y?(w=s.jsx("input",{type:"text",value:l,placeholder:p,title:P,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:pi,onChange:g,onFocus:E,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=P,e[19]=N,e[20]=y,e[21]=w):w=e[21];let k;e[22]!==b||e[23]!==w?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[b,w]}),e[22]=b,e[23]=w,e[24]=k):k=e[24];let x;e[25]!==o||e[26]!==u?(x=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(ur,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=x):x=e[27];let B;return e[28]!==x||e[29]!==k?(B=s.jsxs(s.Fragment,{children:[k,x]}),e[28]=x,e[29]=k,e[30]=B):B=e[30],B}function pi(t){return t.stopPropagation()}function hi(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function gi(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function vi(t){const e=fe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=fs(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Dr(l),h=o?{...o,name:l,path:c}:Kr(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Zs(i)}function bi(t){const e=fe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Te();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[f,p]=v.useState(h);let j;e[2]!==d?(j=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=j):j=e[3];const[b,P]=v.useState(j),[g,E]=v.useState(Gt),[N,y]=v.useState(null),[w,k]=v.useState(n);n!==w&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),P(d("sectionsEditor.createPageModal.defaultPagePath")),E(Gt),y(null)));const x=!!l?.length;let B;e[4]!==o||e[5]!==r?(B=Z=>{!Z&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=B):B=e[6];const S=B;let I;e[7]!==o||e[8]!==f||e[9]!==c||e[10]!==b||e[11]!==x||e[12]!==g?(I=async Z=>{Z.preventDefault();const oe=f.trim(),he=b.trim();if(!oe||!he||o)return;const ge=ms(he);if(ge){y(ge);return}y(null),await c({name:oe,path:he,templateKey:x&&g!==Gt?g:null})},e[7]=o,e[8]=f,e[9]=c,e[10]=b,e[11]=x,e[12]=g,e[13]=I):I=e[13];const $=I,M=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let R;e[16]!==L?(R=s.jsx(es,{children:s.jsx(ts,{children:L})}),e[16]=L,e[17]=R):R=e[17];let U;e[18]!==d?(U=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=U):U=e[19];let D;e[20]!==U?(D=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:U}),e[20]=U,e[21]=D):D=e[21];let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=Z=>p(Z.target.value),e[22]=F):F=e[22];let H;e[23]!==d?(H=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=H):H=e[24];let W;e[25]!==o||e[26]!==f||e[27]!==H?(W=s.jsx(Rn,{id:"new-page-name",value:f,onChange:F,placeholder:H,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=H,e[28]=W):W=e[28];let V;e[29]!==W||e[30]!==D?(V=s.jsxs("div",{className:"space-y-1.5",children:[D,W]}),e[29]=W,e[30]=D,e[31]=V):V=e[31];let ee;e[32]!==d?(ee=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=ee):ee=e[33];let O;e[34]!==ee?(O=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:ee}),e[34]=ee,e[35]=O):O=e[35];let ne;e[36]===Symbol.for("react.memo_cache_sentinel")?(ne=Z=>P(Z.target.value),e[36]=ne):ne=e[36];let q;e[37]!==d?(q=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=q):q=e[38];let G;e[39]!==o||e[40]!==b||e[41]!==q?(G=s.jsx(Rn,{id:"new-page-path",value:b,onChange:ne,placeholder:q,disabled:o}),e[39]=o,e[40]=b,e[41]=q,e[42]=G):G=e[42];let Q;e[43]!==O||e[44]!==G?(Q=s.jsxs("div",{className:"space-y-1.5",children:[O,G]}),e[43]=O,e[44]=G,e[45]=Q):Q=e[45];let Y;e[46]!==o||e[47]!==x||e[48]!==d||e[49]!==g||e[50]!==l?(Y=x&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(zr,{id:"new-page-template",value:g,onChange:E,templates:l??[],disabled:o})]}),e[46]=o,e[47]=x,e[48]=d,e[49]=g,e[50]=l,e[51]=Y):Y=e[51];let te;e[52]!==M?(te=M&&s.jsx("p",{className:"text-xs text-destructive",children:M}),e[52]=M,e[53]=te):te=e[53];let ae;e[54]!==V||e[55]!==Q||e[56]!==Y||e[57]!==te?(ae=s.jsxs("div",{className:"space-y-4 py-4",children:[V,Q,Y,te]}),e[54]=V,e[55]=Q,e[56]=Y,e[57]=te,e[58]=ae):ae=e[58];let X;e[59]!==r?(X=()=>r(!1),e[59]=r,e[60]=X):X=e[60];let J;e[61]!==d?(J=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=J):J=e[62];let se;e[63]!==o||e[64]!==X||e[65]!==J?(se=s.jsx(Ue,{type:"button",variant:"outline",onClick:X,disabled:o,children:J}),e[63]=o,e[64]=X,e[65]=J,e[66]=se):se=e[66];let ve;e[67]!==o||e[68]!==f||e[69]!==b?(ve=!f.trim()||!b.trim()||o,e[67]=o,e[68]=f,e[69]=b,e[70]=ve):ve=e[70];let pe;e[71]!==o||e[72]!==d?(pe=o?s.jsxs(s.Fragment,{children:[s.jsx(jt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=pe):pe=e[73];let de;e[74]!==ve||e[75]!==pe?(de=s.jsx(Ue,{type:"submit",disabled:ve,children:pe}),e[74]=ve,e[75]=pe,e[76]=de):de=e[76];let ie;e[77]!==se||e[78]!==de?(ie=s.jsxs(er,{children:[se,de]}),e[77]=se,e[78]=de,e[79]=ie):ie=e[79];let ue;e[80]!==$||e[81]!==ae||e[82]!==ie||e[83]!==R?(ue=s.jsx(Xn,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:$,children:[R,ae,ie]})}),e[80]=$,e[81]=ae,e[82]=ie,e[83]=R,e[84]=ue):ue=e[84];let be;return e[85]!==S||e[86]!==n||e[87]!==ue?(be=s.jsx(Zn,{open:n,onOpenChange:S,children:ue}),e[85]=S,e[86]=n,e[87]=ue,e[88]=be):be=e[88],be}function xi(t){const e=fe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Te();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const f=fs(h);let p;e[4]!==f?(p=Hr((k,x)=>f.mutate({blockKey:k,data:x})),e[4]=f,e[5]=p):p=e[5];const j=p;let b;e[6]!==o||e[7]!==c?(b=Ir(c,o),e[6]=o,e[7]=c,e[8]=b):b=e[8];const{resolveType:P,props:g,title:E}=b;if(!P){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let x;return e[11]!==k?(x=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=x):x=e[12],x}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==P||e[15]!==E?(y={mode:"saved",blockKey:o,resolveType:P,title:E},e[13]=o,e[14]=P,e[15]=E,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==g||e[23]!==f.isPending||e[24]!==j||e[25]!==N||e[26]!==y||e[27]!==r?(w=s.jsx(Ur,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:g,isCreating:f.isPending,onCreate:yi,onSaveReferencedBlock:j,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=g,e[23]=f.isPending,e[24]=j,e[25]=N,e[26]=y,e[27]=r,e[28]=w):w=e[28],w}async function yi(){}function wi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function qn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:wi(t.error)}}function ki(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 Pi(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=ki(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const Si="https://github.com/decocms/blocks";function Ei(){const t=fe.c(14),e=Te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(mr,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ns,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(Ue,{size:"sm",asChild:!0,children:s.jsxs("a",{href:Si,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(an,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function ji(t){const e=fe.c(15),{source:n,onRetry:r}=t,i=Te();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(la,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(Ue,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let f;return e[11]!==l||e[12]!==o||e[13]!==h?(f=s.jsx(an,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=f):f=e[14],f}const Ni=v.lazy(()=>tr(()=>import("./sections-editor-C-qAs9t3.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 Wn(t){const e=fe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=tn(),{currentBranch:c,taskId:o}=Nt(),d=gs(),h=nn(),f=vs(),p=d.lifecycle.phase==="running",j=h.previewUrl;let b;e[0]!==c||e[1]!==l||e[2]!==j||e[3]!==o||e[4]!==n?(b=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:j}:null,e[0]=c,e[1]=l,e[2]=j,e[3]=o,e[4]=n,e[5]=b):b=e[5];const P=b;let g;e[6]!==p?(g={fetchEnabled:p},e[6]=p,e[7]=g):g=e[7];const E=rn(P,g);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=ps(P,N),w=Pi({lifecyclePhase:d.lifecycle.phase,decofile:qn(E),meta:qn(y),hasEditableContent:Rr(E.data,y.data),fastPreviewActive:ds(n).runtime==="cms"}),k=Ti;if(w.kind==="loading"){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(nr,{})),e[10]=O):O=e[10],O}if(w.kind==="empty"){let O;return e[11]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(Ei,{})),e[11]=O):O=e[11],O}if(w.kind==="error"){let O;e[12]!==E||e[13]!==h||e[14]!==y||e[15]!==w.source?(O=()=>{if(w.source==="sandbox"){h.retry();return}Promise.all([E.refetch(),y.refetch()])},e[12]=E,e[13]=h,e[14]=y,e[15]=w.source,e[16]=O):O=e[16];const ne=O;let q;return e[17]!==ne||e[18]!==w.source?(q=k(s.jsx(ji,{source:w.source,onRetry:ne})),e[17]=ne,e[18]=w.source,e[19]=q):q=e[19],q}let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=O=>k(s.jsx("div",{className:"h-full min-h-0",children:O})),e[20]=x):x=e[20];const B=x,S=f.state.target;if(S?.kind==="loader"&&E.data&&y.data){const O=c??"",ne=j??null;let q;return e[21]!==E.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==O||e[25]!==ne||e[26]!==S.key||e[27]!==n?(q=B(s.jsx(xi,{orgSlug:l.slug,virtualMcpId:n,branch:O,previewUrl:ne,meta:y.data,decofile:E.data,blockKey:S.key})),e[21]=E.data,e[22]=y.data,e[23]=l.slug,e[24]=O,e[25]=ne,e[26]=S.key,e[27]=n,e[28]=q):q=e[28],q}let I;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(I=S||!c?null:ss(rs(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=I):I=e[33];const $=I;let M="/",L=null,R=null;S?.kind==="page"?(M=S.path,L=S.key):S?.kind==="section"?R=S.key:$&&(M=$.path,L=$.pageKey);const U=L?`page:${L}`:R?`section:${R}`:`path:${M}`;let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(jt,{className:"size-5 text-muted-foreground"})}),e[34]=D):D=e[34];const F=c??"",H=j??void 0,W=R?null:u,V=!!L&&f.state.editSeoPageKey===L;let ee;return e[35]!==R||e[36]!==L||e[37]!==M||e[38]!==U||e[39]!==i||e[40]!==l.slug||e[41]!==W||e[42]!==V||e[43]!==F||e[44]!==H||e[45]!==n||e[46]!==f.consumeEditSeo||e[47]!==f.setFocusedBlock||e[48]!==f.setVariantOverride?(ee=B(s.jsx(v.Suspense,{fallback:D,children:s.jsx(Ni,{orgSlug:l.slug,virtualMcpId:n,branch:F,previewReady:!0,previewUrl:H,currentPath:M,activePageBlockKey:L,activeGlobalBlockKey:R,externalSelection:W,initialEditSeo:V,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onFocusedBlockChange:f.setFocusedBlock,onViewJsonFile:i},U)})),e[35]=R,e[36]=L,e[37]=M,e[38]=U,e[39]=i,e[40]=l.slug,e[41]=W,e[42]=V,e[43]=F,e[44]=H,e[45]=n,e[46]=f.consumeEditSeo,e[47]=f.setFocusedBlock,e[48]=f.setVariantOverride,e[49]=ee):ee=e[49],ee}function Ti(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Gn(t){const e=fe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Te(),c=da(),o=Vr(n);let d;e[0]!==o||e[1]!==r?(d=qr(o,ua(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:f}=tn(),{currentBranch:p,taskId:j}=Nt(),P=nn().previewUrl;let g;e[3]!==p||e[4]!==f.slug||e[5]!==P||e[6]!==j||e[7]!==n?(g=p?{orgSlug:f.slug,virtualMcpId:n,branch:p,threadId:j??null,previewUrl:P}:null,e[3]=p,e[4]=f.slug,e[5]=P,e[6]=j,e[7]=n,e[8]=g):g=e[8];const N=rn(g),y=p??"";let w;e[9]!==f.slug||e[10]!==y||e[11]!==n?(w={orgSlug:f.slug,virtualMcpId:n,branch:y},e[9]=f.slug,e[10]=y,e[11]=n,e[12]=w):w=e[12];const{save:k,flush:x}=Wr(w),B=N.data?.[r],S=N.data===void 0&&N.isLoading,I=N.data!==void 0&&B===void 0,$=!p||I||S;let M;e[13]!==B?(M=B===void 0?"":JSON.stringify(B,null,2),e[13]=B,e[14]=M):M=e[14];const L=M;let R;e[15]!==r||e[16]!==$||e[17]!==k?(R=V=>{if($)return;let ee;try{ee=JSON.parse(V)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||k(r,ee)},e[15]=r,e[16]=$,e[17]=k,e[18]=R):R=e[18];const U=R;let D;e[19]!==x?(D=()=>({flush:x}),e[19]=x,e[20]=D):D=e[20],v.useImperativeHandle(u,D);let F;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?(F=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(Ue,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(sr,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=F):F=e[25];let H;e[26]!==N.data||e[27]!==x||e[28]!==L||e[29]!==S||e[30]!==I||e[31]!==r||e[32]!==$||e[33]!==U||e[34]!==l?(H=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(jt,{className:"size-5 text-muted-foreground"})}):I?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ca,{code:L,language:"json",readOnly:$,height:"100%",onChange:V=>U(V??""),onSave:V=>{U(V),x()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=x,e[28]=L,e[29]=S,e[30]=I,e[31]=r,e[32]=$,e[33]=U,e[34]=l,e[35]=H):H=e[35];let W;return e[36]!==F||e[37]!==H?(W=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[F,H]}),e[36]=F,e[37]=H,e[38]=W):W=e[38],W}function Ps(t){return t.contentEditingEnabled&&!t.isMobile}function Ci(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Ri(t,e){return t==="blocks"?"preview":e?"blocks":t}function Li(t){return Ps({contentEditingEnabled:hs(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Oi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const _i=15e3;function Ai(t,e,n){return n?t.src===e||t.loading?t:{src:e,loading:!0}:t.src===e&&!t.loading?t:{src:e,loading:!1}}function Jn(t){return t.loading?{...t,loading:!1}:t}const Bi=500,Fi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Yn=1,St=["desktop","mobile","tablet"],$i=["preview","visual","blocks"],Qn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Mi(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function at(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Qt(t,e){try{return new URL(t,e).href}catch{return null}}function Di(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function Ki(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function zi(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function Ii(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ui({virtualMcpId:t}){const e=Te(),n=Fr(),{currentBranch:r,taskId:i,virtualMcpId:u}=Nt(),l=vs(),c=Sr(u===t?t:null),o=ds(t),d=ma(c?.metadata?.ui?.layout??null),h=hs(d),f=Ps({contentEditingEnabled:h,isMobile:n}),[p]=v.useState(()=>Li({cmsMode:d,isMobile:n})),[j,b]=Ln(On.previewEditingMode(t),a=>a&&$i.includes(a)?a:null),P=j??p,[g,E]=Ln(On.previewDeviceSize(t),a=>a&&St.includes(a)?a:"desktop"),[N,y]=v.useState(null),[w,k]=v.useState(null),x=v.useRef(null),B=v.useRef(null),[S,I]=v.useState(!1),$=v.useRef(null),M=()=>{$.current?.flush(),I(!1)},L=()=>I(a=>(a&&$.current?.flush(),!a)),[R,U]=v.useState({width:0,height:0}),[D,F]=v.useState(!1),[H,W]=v.useState(""),V=v.useRef(null),[ee,O]=v.useState(!1),[ne,q]=v.useState(),[G,Q]=v.useState(null),[Y,te]=v.useState(null),[ae,X]=v.useState(null),[J,se]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[ve,pe]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[de,ie]=v.useState({}),[ue,be]=v.useState(!1),Z=v.useRef(null),oe=()=>{be(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>be(!1),15e3)},he=()=>{Z.current&&(clearTimeout(Z.current),Z.current=null),be(!1)},{org:ge}=tn(),Me=gs(),Le=nn(),Oe=Le.vmEntry,He=Me.lifecycle.phase,{url:xe}=Lr(t),ye=xe??Le.previewUrl,je=!!xe||He==="running",De=c?.id===t?Nr(c.metadata):null,_e=!xe&&c?.id===t&&o.runtime==="cms",Ae=o.projectDefault==="cms",we=Zr({sandboxUrl:ye,previewServerUrl:De,fastPreviewActive:_e}),Ce=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:ye}:null,Ke=rn(Ce,{fetchEnabled:je}),K=ps(Ce,{fetchEnabled:je}),C=Ke.data,me=K.data,Be=C?Or(C).sort((a,m)=>a.name.localeCompare(m.name)):[],Tt=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r}:null,Qe=vi(Tt),Ct=C&&me?_r(C,me):[],ln=C&&me?Gr(me,C,"loaders"):[],cn=H?(()=>{const a=H.toLowerCase();return Be.map(m=>({page:m,score:zi(m.name,m.path,a)})).filter(({score:m})=>m>0).sort((m,T)=>T.score-m.score||m.page.path.length-T.page.path.length).map(({page:m})=>m)})():Be,dn=Ct.filter(a=>{if(!H)return!0;const m=H.toLowerCase();return a.name.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),un=f?ln:[],mn=un.filter(a=>{if(!H)return!0;const m=H.toLowerCase();return a.title.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),ct=Y?ln.find(a=>a.key===Y)??null:null,Ne=sn,Rt=G||Y?null:Ar(Be,J,ve),z=Rt?.key??null,Ve=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??z,dt=Rt?.path??null,qe=(z?de[z]:void 0)??{},ke=$e(J,qe),Lt={};if(je&&ye&&me&&C){const a=Jr(me,"loaders"),m=z?C[z]:void 0,T=za(m,C,re=>a.has(re)),A=Fa(T);for(const re of lt(J)){if(re.type!=="param")continue;const Re=_a(J,re.name,T),Se=Da(Re,a,A);Se.length>0&&(Lt[re.name]=Se)}}const ut=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,fn=C&&z?Br(C,z,0):[],pn=C?Yr(fn,C):[],Ot=pn.map(a=>a.isSavedBlock?a.label:""),_t=pn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),At=fn.map(a=>Zt(a,C??{})),hn=v.useRef(null),Pe=v.useRef(null),Ss=Me.status.state==="paused",Bt=Me.phase,gn=Qr({claimPhase:Bt,lifecycle:Me.lifecycle}),ze=Le.previewState,Es=Le.userStopped,js=ra(ge.slug,t??"",r??""),{url:Fe}=sa(_e&&t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,previewServerUrl:De??null,path:ke}:null),Ns=Ae&&o.runtime==="sandbox",_=xa({previewState:ze,progressStatus:gn.status,previewServerUrl:De,fastPreviewActive:_e,fastPreviewReady:!!Fe,codingSession:Ns,localPreviewUrl:xe}),mt=_.mode!=="none",Ts=_.mode==="production"&&_.iframeBase?at(_.iframeBase):null,We=_.mode==="production"?Ts:at(ye),Cs=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Xe=xe?_.mode==="sandbox"&&f&&P==="blocks":_.mode==="production"&&_e&&Cs&&f&&P==="blocks",vn=v.useRef(null),{pin:Rs,effective:Ls}=Di(vn.current,{inPlaceRenderActive:Xe,draftPreviewUrl:Fe,resolvedPath:ke});vn.current=Rs;const Ge=Mi(_.mode==="sandbox"?yt(Mn(ae??Qt(ke,_.iframeBase)??_.iframeBase,g),l.state.variantOverride??[]):_.mode==="production"?yt(Mn(ea(ae??Ls??Qt(ke,_.iframeBase)??_.iframeBase,_.showWakingPill?ta:null),g),l.state.variantOverride??[]):null),bn=Fe??(_.iframeBase?Qt(ke,_.iframeBase):null),Os=_.mode==="production"?bn?yt(bn,l.state.variantOverride??[]):null:Ge??_.iframeBase,_s=()=>{const a=Os;a&&window.open(a,"_blank","noopener")},Ze=t&&r?rs(ge.slug,t,r):null,et=a=>{Ze&&cr(Ze,a)},le=l.state.target;v.useEffect(()=>{if(!(!le||!we||!me))if(le.kind==="page"){const a=de[le.key]??{};Pe.current=$e(le.path,a),Q(null),te(null),X(null),pe(le.key),se(le.path),et({path:le.path,pageKey:le.key,params:a})}else if(le.kind==="loader")Pe.current=null,Q(null),te(le.key),X(null);else{const a=Ct.find(m=>m.key===le.key);if(a){Pe.current=null;const m=Fn(me);te(null),Q(a),X($n(we,m,a.key))}}},[le,we,me,de]),v.useEffect(()=>{!z||dt===null||le?.kind==="page"&&le.key===z&&le.path===dt||l.selectTarget({kind:"page",key:z,path:dt})},[z,dt,le]);const[xn,As]=v.useState(null);if(ze.kind==="iframe"&&xn!==ze.previewUrl){const a=xn!==null;As(ze.previewUrl);const m=Ze?ss(Ze):null;if(m){if(Pe.current=$e(m.path,m.params),se(m.path),pe(m.pageKey),X(null),Q(null),te(null),m.pageKey&&Object.keys(m.params).length>0){const T=m.pageKey;ie(A=>({...A,[T]:m.params}))}}else a&&(Pe.current=null,se("/"),X(null),pe(null),Q(null),te(null))}hn.current=Ge;const Bs=_.mode==="production"&&!!Fe&&!xe,[yn,Ft]=v.useState({src:Ge??void 0,loading:!1}),ft=Ai(yn,Ge??void 0,Bs);ft!==yn&&Ft(ft);const tt=ft.src,wn=ft.loading,kn=Pa({iframeRef:x,src:_.mode==="sandbox"?Ge:null,active:_.mode==="sandbox"}),Pn=v.useRef(null);v.useEffect(()=>{const a=wn?setTimeout(()=>Ft(Jn),_i):null,m=()=>{a&&clearTimeout(a)};if(!Fe||!tt||Pn.current===Fe)return m;Pn.current=Fe;const T=x.current;return T&&T.getAttribute("src")!==tt&&(oe(),T.src=tt),m},[Fe,tt,wn]);const Sn=()=>{const a=x.current?.contentWindow,m=We;if(!a||!m||!C||!z)return;const T=C[z];if(!T||typeof T!="object")return;const A=na({previewBaseUrl:m,pageBlock:T,decofile:C,path:ke,pathTemplate:J});if(!A)return;const re=yt(A.src,Xr(l.state.variantOverride??[],z));a.postMessage({type:"cms-editor::render",src:re,body:A.body},m)},$t=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!C){$t.current=null;return}const a={nav:JSON.stringify({page:z,path:ke,pathTemplate:J}),content:JSON.stringify(C)},m=Ki($t.current,a);$t.current=a,m&&Sn()},[C,Xe,G,Y,z,ke,J]);const Mt=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!C){Mt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),m=Mt.current;Mt.current={page:z,sig:a},!(!m||m.page!==z||m.sig===a)&&Sn()},[l.state.variantOverride,Xe,G,Y,z]);const Fs=!!t&&!!r&&!Me.notFound&&!Es&&!Ss&&(Bt?.kind==="ready"||He!=="idle"),ce=Oi({editingMode:P,sandboxDisplay:_.mode==="sandbox",blocksEditingEnabled:f});v.useEffect(()=>{const a=We;if(!a)return;const m=T=>{if(T.origin===a)if(T.data?.type==="visual-editor::element-clicked"){const A=Sa.safeParse(T.data.payload);A.success&&y(A.data)}else if(T.data?.type==="cms-editor::section-clicked"){const A=Na.safeParse(T.data.payload);A.success&&k({index:A.data.sectionIndex,seq:A.data.clickSeq})}else T.data?.type==="cms-editor::render-start"?oe():T.data?.type==="cms-editor::render-end"?(he(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Ot,kinds:_t,keys:At},a)):T.data?.type==="cms-editor::render-error"&&he()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[We,Ot,_t,At]);const En=()=>{const a=x.current?.contentWindow,m=at(ye);!a||!m||a.postMessage({type:"visual-editor::activate",script:Ea},m)},$s=()=>{const a=x.current?.contentWindow,m=at(ye);!a||!m||a.postMessage({type:"visual-editor::deactivate"},m)},Dt=()=>{const a=x.current?.contentWindow,m=We;!a||!m||(a.postMessage(_.mode==="production"||xe?{type:"editor::inject",args:{script:In}}:{type:"visual-editor::activate",script:In},m),a.postMessage({type:"cms-editor::set-labels",labels:Ot,kinds:_t,keys:At},m))},Ms=()=>{const a=x.current?.contentWindow,m=We;!a||!m||a.postMessage({type:"cms-editor::deactivate"},m)},Ds=()=>{const a=x.current?.contentWindow,m=We;!a||!m||(a.postMessage({type:"cms-editor::clear-hover"},m),a.postMessage({type:"visual-editor::clear-hover"},m))},pt=a=>{if(a==="blocks"&&!f)return;const m=P;!n&&a!==m&&(a==="blocks"?B.current?.resize("30%"):B.current?.collapse()),b(a),y(null),k(null),a!=="blocks"&&te(null),m==="visual"&&$s(),a==="visual"&&En(),m==="blocks"&&a!=="blocks"&&Ms(),a==="blocks"&&Dt()},Ks=()=>{pt(Ci(P,f))},zs=()=>{pt(Ri(P,f))};ia(()=>{const a=x.current;if(!a)return;oe();const m=document.activeElement,T=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ii(a,hn.current);let A;const re=()=>{clearTimeout(A),a.tabIndex=T,a.style.pointerEvents="";const Re=document.activeElement;(!Re||Re===document.body||Re===a)&&m?.focus(),a.removeEventListener("load",re)};a.addEventListener("load",re),A=setTimeout(re,3e3)});const Is=()=>{const a=St.indexOf(g);E(St[(a+1)%St.length])},Kt=(a,m)=>{if(!z)return;const T=z,A={...qe,[a]:m};Pe.current=$e(J,A),ie(re=>({...re,[T]:A})),et({path:J,pageKey:T,params:A})},Us=hi({iframeBase:_.iframeBase,resolvedPath:ke,activeGlobalSectionName:G?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),jn=a=>{const m=de[a.key]??{},T=$e(a.path,m);(G||Ne(T)!==Ne(ke))&&oe(),Pe.current=T,Q(null),te(null),X(null),k(null),pe(a.key),se(a.path),et({path:a.path,pageKey:a.key,params:m}),l.selectTarget({kind:"page",key:a.key,path:a.path})};lr(Ze,a=>{(G||Ne(a)!==Ne(ke))&&oe(),Pe.current=a,Q(null),te(null),X(null),k(null),pe(null),se(a),et({path:a,pageKey:null,params:{}})});const Hs=a=>{if(!we||!me){An.error(e("sandbox.preview.previewMetadataNotReady"));return}oe(),Pe.current=null;const m=Fn(me),T=$n(we,m,a.key);Q(a),te(null),X(T),k(null),l.selectTarget({kind:"section",key:a.key})},Vs=a=>{f&&(Q(null),te(a.key),X(null),pt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},qs=async({name:a,path:m,templateKey:T})=>{if(!t||!r)return;const A=ms(m);if(A){q(A);return}const re=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Be.some(Se=>Ne(Se.path)===Ne(re))){q(e("sandbox.preview.pageAlreadyExists",{path:re}));return}let Re;if(T&&(Re=C?.[T],!Re)){q(e("sandbox.preview.templateNoLongerExists"));return}q(void 0);try{const Se=await Qe.mutateAsync({name:a,path:re,template:Re});O(!1),An.success(e("sandbox.preview.pageCreated",{name:a})),await fa(Bi),jn({key:Se.key,name:Se.name,path:Se.path}),pt("blocks")}catch(Se){q(Se instanceof Error?Se.message:e("sandbox.preview.failedToCreatePage"))}},ht=mt&&(Fs||_.mode==="production"),Ws=gi({showPreviewToolbar:ht,contentEditingEnabled:h}),gt=()=>{F(!1),W("")},zt=G?.name??ct?.title??Rt?.name,It=Ke.isPending||K.isPending,Ut=It?at(_.iframeBase):zt,vt=G?`section:${G.key}`:Y?`loader:${Y}`:z?`page:${z}`:void 0,Gs=ht?Ws?s.jsxs(wr,{open:D,onOpenChange:a=>{F(a),a||W("")},children:[s.jsx(kr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:It?Ut??void 0:G||ct?zt:[zt,J].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[G&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(fr,{size:11}),e("sandbox.preview.globalBadge")]}),ct&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(pr,{size:11}),e("sandbox.preview.loaderBadge")]}),Ut&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Ut}),!It&&!G&&!ct&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:J}),s.jsx(dr,{size:12,className:Ht("shrink-0 transition-transform",D&&"rotate-180")})]})})}),s.jsxs(Pr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(os,{shouldFilter:!1,defaultValue:vt,children:[s.jsx(ls,{value:H,onValueChange:a=>{W(a),V.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(is,{ref:V,className:"max-h-80",children:[s.jsx(cs,{children:Be.length===0&&Ct.length===0&&un.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),cn.length>0&&s.jsx(it,{children:cn.map(a=>s.jsxs(ot,{value:`page:${a.key}`,"aria-current":vt===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{gt(),jn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),dn.length>0&&s.jsx(it,{heading:e("sandbox.preview.globalComponents"),children:dn.map(a=>s.jsx(ot,{value:`section:${a.key}`,"aria-current":vt===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{gt(),Hs(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),mn.length>0&&s.jsx(it,{heading:e("sandbox.preview.globalLoaders"),children:mn.map(a=>s.jsx(ot,{value:`loader:${a.key}`,"aria-current":vt===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{gt(),Vs(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!G&&!Y&<(J).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:lt(J).map((a,m)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${m}`);const T=Lt[a.name];return T&&ut?s.jsx(ni,{sources:T,template:J,paramName:a.name,value:qe[a.name]??"",sandboxRef:ut,onCommit:A=>Kt(a.name,A)},`${z}:${a.name}`):s.jsx(fi,{name:a.name,value:qe[a.name]??"",onCommit:A=>Kt(a.name,A)},`${z}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(Ue,{variant:"ghost",className:"w-full justify-start",onClick:()=>{gt(),q(void 0),O(!0)},children:[s.jsx(yr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Us}):null,Nn=ht||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:Is,"aria-label":e(Qn[g]),children:g==="mobile"?s.jsx(hr,{size:16}):g==="tablet"?s.jsx(gr,{size:16}):s.jsx(vr,{size:16})})}),s.jsx(Wt,{children:e(Qn[g])})]}),Gs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(nt,{onClick:_s,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(ns,{size:16})})})]}):null,Js=_.mode==="sandbox",bt=Fi[g],xt=g==="desktop"&&(R.width===0||R.width>=bt.width+2*Yn),Tn=xt?1:Math.min(R.width>0?R.width/(bt.width+2*Yn):1,1),Ys=xt?{width:"100%",height:"100%"}:{width:`${bt.width}px`,height:R.height>0?`${R.height/Tn}px`:`${bt.height}px`,transform:`scale(${Tn})`,transformOrigin:"top center"},Cn=s.jsxs(s.Fragment,{children:[Js&&(ht||h)&&s.jsx(nt,{onClick:Ks,"aria-pressed":ce==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ce==="visual",children:s.jsx(Bn,{size:16})}),f&&s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:zs,"aria-pressed":ce==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ce==="blocks",children:s.jsx(xr,{size:16})})}),s.jsx(Wt,{children:e("sandbox.preview.blocksEditor")})]}),Ve&&s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:L,"aria-pressed":S,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:S,children:s.jsx(br,{size:16})})}),s.jsx(Wt,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Qs=!!Y&&ce==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[ut&&Object.entries(Lt).map(([a,m])=>(qe[a]??"")===""?s.jsx(ui,{sources:m,template:J,paramName:a,sandboxRef:ut,onFill:T=>Kt(a,T)},`${z}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(_n.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Nn}),children:Nn}),s.jsx(_n.Toolbar.Right.Portal,{fallback:Cn,children:Cn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Qs?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Wn,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L}),S&&Ve&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Gn,{ref:$,virtualMcpId:t,pageKey:Ve,onClose:M})})]}):s.jsxs(Dn,{orientation:"horizontal",disabled:ce!=="blocks",className:"relative isolate",children:[s.jsx(wt,{ref:B,id:"preview-blocks-editor",defaultSize:ce==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ce==="blocks"&&s.jsx(Wn,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L})}),ce==="blocks"&&s.jsx(Kn,{withHandle:!0}),s.jsx(wt,{id:"preview-canvas",defaultSize:ce==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(Dn,{orientation:"horizontal",disabled:!(S&&Ve),children:[s.jsx(wt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const m=()=>U(A=>A.width===a.clientWidth&&A.height===a.clientHeight?A:{width:a.clientWidth,height:a.clientHeight});m();const T=new ResizeObserver(m);return T.observe(a),()=>T.disconnect()},className:Ht("h-full relative overflow-clip flex justify-center",mt&&!xt&&"bg-muted/30"),children:[(ue||js)&&mt&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),_.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"starting",progress:gn,claimPhase:Bt})}),!xe&&ze.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"suspended",onResume:Le.resume})}),!xe&&ze.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"errored",error:ze.error,onRetry:Le.retry,connectionsHref:`/${ge.slug}/settings/connections`})}),_.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(jt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),ce==="visual"&&!N&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(Bn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ce==="visual"&&N&&s.jsx(Ra,{element:N,onDismiss:()=>y(null)}),mt&&Ge&&s.jsx("div",{className:Ht("shrink-0",!xt&&"border-x border-border bg-background shadow-sm"),style:Ys,onMouseLeave:Ds,children:s.jsx("iframe",{ref:x,src:tt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:kn.handleError,onLoad:()=>{if(Ft(Jn),kn.handleLoad(),he(),_.mode!=="sandbox"||xe){(_.mode==="production"&&!_.showWakingPill||xe)&&ce==="blocks"&&Dt();return}if(rr("vm_preview_loaded",{view_mode:ce,vm_id:Oe?.sandboxHandle??null}),!G)try{const a=x.current?.contentWindow?.location?.pathname;if(!a)return;const m=Pe.current;if(m!==null&&(Pe.current=null,Ne(a)!==Ne(m))||Ne(a)===Ne(ke))return;se(a),et({path:a,pageKey:ve,params:qe})}catch{}ce==="visual"&&En(),ce==="blocks"&&Dt()}},_.iframeBase)})]})}),S&&Ve&&s.jsxs(s.Fragment,{children:[s.jsx(Kn,{withHandle:!0}),s.jsx(wt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Gn,{ref:$,virtualMcpId:t,pageKey:Ve,onClose:M})})]})]})})]})}),s.jsx(bi,{open:ee,onOpenChange:O,isPending:Qe.isPending,error:ne,templates:Be,onSubmit:qs})]})}function Hi(t){const e=fe.c(22),{virtualMcpId:n}=t,r=Te(),i=Er(n),{activeTask:u,taskId:l,currentBranch:c}=Nt(),o=ga(l),[d,h]=v.useState(!1);if(ha({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Yt(i?.metadata),threadHasRepo:Yt(o)||Yt(u?.metadata)})==="none"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(zn,{className:"size-7 text-foreground"})}),e[0]=j):j=e[0];let b;e[1]!==r?(b=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=b):b=e[2];let P;e[3]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=P):P=e[4];let g,E;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=()=>h(!0),E=s.jsx(zn,{className:"size-4"}),e[5]=g,e[6]=E):(g=e[5],E=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(Ue,{onClick:g,children:[E,N]}),e[9]=N,e[10]=y):y=e[10];let w;e[11]!==b||e[12]!==P||e[13]!==y?(w=s.jsx(an,{className:"h-full",image:j,title:b,description:P,actions:y}),e[11]=b,e[12]=P,e[13]=y,e[14]=w):w=e[14];let k;e[15]!==d?(k=s.jsx(pa,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let x;return e[17]!==w||e[18]!==k?(x=s.jsxs(s.Fragment,{children:[w,k]}),e[17]=w,e[18]=k,e[19]=x):x=e[19],x}let p;return e[20]!==n?(p=s.jsx(Ui,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function rd(){const t=fe.c(2),e=va();let n;return t[0]!==e?(n=s.jsx(ar,{tabId:"site-editor",children:s.jsx(ir,{feature:"cms",children:s.jsx(Hi,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{rd as default};
|
|
551
|
+
`)}function Ca(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),f=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:f/o*100}}function Ra(t){const e=fe.c(45),{element:n,onDismiss:r}=t,[i,u]=v.useState(""),l=v.useRef(null),{sendMessage:c}=or(),{openSidePanel:o}=aa(),d=Te();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const F=Ta(n,i);o(),c({parts:[{type:"text",text:F}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const f=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=Ca(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const j=p,b=`${j.leftPct}%`,P=`${j.topPct}%`;let g;e[9]!==b||e[10]!==P?(g={left:b,top:P,width:"320px"},e[9]=b,e[10]=P,e[11]=g):g=e[11];let E;e[12]!==f?(E=F=>{F.preventDefault(),f()},e[12]=f,e[13]=E):E=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=F=>u(F.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=F=>{F.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let w;e[17]!==d?(w=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=w):w=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==w?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=w,e[22]=k):k=e[22];let x;e[23]!==i?(x=i.trim(),e[23]=i,e[24]=x):x=e[24];const B=!x;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let I;e[27]!==d?(I=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=I):I=e[28];let $;e[29]!==I?($=s.jsx("title",{children:I}),e[29]=I,e[30]=$):$=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=M):M=e[31];let L;e[32]!==$?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[$,M]}),e[32]=$,e[33]=L):L=e[33];let R;e[34]!==B||e[35]!==S||e[36]!==L?(R=s.jsx("button",{type:"submit",disabled:B,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=B,e[35]=S,e[36]=L,e[37]=R):R=e[37];let U;e[38]!==k||e[39]!==R||e[40]!==E?(U=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:E,children:[k,R]}),e[38]=k,e[39]=R,e[40]=E,e[41]=U):U=e[41];let D;return e[42]!==U||e[43]!==g?(D=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:U}),e[42]=U,e[43]=g,e[44]=D):D=e[44],D}const Un="site-links",La=/details?page|\bpdp\b/i,Oa=/listingpage|\bplp\b/i;function _a(t,e,n){const r=new Set;for(const c of n)La.test(c)&&r.add("product"),Oa.test(c)&&r.add("category");const i=lt(sn(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const Aa=["rosa","preto","pink","black"];function kt(t,e){const n=e.trim();return n?t(n):Aa.flatMap(r=>t(r))}function Ba(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const bs=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function on(t){return t.split("/")[0]??""}function Fa(t){const e=new Set;for(const n of t){const r=on(n);bs.has(r)&&e.add(r)}return e}function $a(t,e){const n=on(t);return!bs.has(n)||e.size===0?!0:e.has(n)}const Ma=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>kt(n=>Ba(t,n),e),optionsFromPayload:Pt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Pt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:Pt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:Pt},{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:Va}];function Da(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of Ma){if(d.kind!==c)continue;const h=r.find(f=>d.test(f)&&$a(f,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(on(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(Ka(t.has("category")?"category":"product")),l}function Ka(t){return{kind:t,id:Un,resolveType:Un,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ya(e,n)}}function Ie(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function za(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Ie(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Ie(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function xs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ys(t){try{return decodeURIComponent(t)}catch{return t}}function Ia(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ua(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Ia(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function ws(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=lt(sn(e)),{pattern:u,order:l}=Ua(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ys(d):null}function Pt(t,e){const n=Ie(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Ie(l);if(!c)continue;const o=ws(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Ie(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,f=Array.isArray(c.image)?Ie(c.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:o,label:h,image:p})}return i}function Ha(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?ys(n):null}function Va(t){const e=[],n=new Set,r=(i,u)=>{const l=Ie(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=Ha(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const qa=new Set(["login","logout","signin","sign-in","signup","sign-up","register","account","myaccount","my-account","minha-conta","conta","cart","carrinho","checkout","wishlist","favoritos","favorites","orders","pedidos","help","hc","sac","atendimento","contato","contact","institucional","newsletter","customer","sales","catalogsearch","search","busca","privacy-policy-cookie-restriction-mode"]);function Wa(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function Ga(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Ja(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Ya(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=ws(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&qa.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:Wa(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Ja(t))i(u,l,"product",c);for(const{href:u,text:l}of Ga(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function st(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const ks=1e4;function Qa(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 Xa(t,{resolveType:e,props:n}){const r=await fetch($r(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(ks)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Hn(t,e){const n=await fetch(Mr(t,e),{signal:AbortSignal.timeout(ks)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Za(t,e,n){const r=e.optionsFromPayload(await Hn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=$e(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Hn(t,u),n).filter(c=>c.kind==="product");return xs([r,l])}catch{return r}}function ei(t,e,n){return Xs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function ti(t,e,n,r){if(e.homepageLinks)return Za(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>Xa(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return xs(l.map(c=>e.optionsFromPayload(c,r)))}function en(t,e,n,r,i){return{queryKey:ei(t,e,n),queryFn:()=>ti(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function rt(t){const e=fe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let f;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(f=p=>s.jsxs(ot,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(as,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:$e(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=f):f=e[12],d=i.map(f),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(it,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function Vn(t){const e=fe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function ni(t){const e=fe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Te(),[d,h]=v.useState(!1),[f,p]=v.useState(""),[j,b]=v.useState(""),P=v.useRef(null),g=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,E=Qa(o),y=[...new Set(n.map(K=>E[K.kind].noun))].join(" or ");let w;e[0]!==o||e[1]!==y?(w=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=w):w=e[2];const k=w,x={template:r,paramName:i};let B;e[3]!==f?(B=(K,C)=>({source:K,query:C,options:K.clientFilter?st(C.data??[],f):C.data??[]}),e[3]=f,e[4]=B):B=e[4];const S=B,I=n.filter(di),$=n.filter(ci),M=Xt({queries:I.map(K=>en(l,K,j,x,d))});let L;e[5]!==M||e[6]!==S?(L=(K,C)=>S(K,M[C]),e[5]=M,e[6]=S,e[7]=L):L=e[7];const R=I.map(L),U=R.length===0||R.every(li),D=Xt({queries:$.map(K=>en(l,K,j,x,d&&U))});let F;e[8]!==D||e[9]!==S?(F=(K,C)=>S(K,D[C]),e[8]=D,e[9]=S,e[10]=F):F=e[10];const H=$.map(F),W=U?H:R,V=W.length===1&&W[0]?.source.homepageLinks?W[0]:null,O=V&&!V.query.isLoading&&!V.query.isError?V?.query.data??[]:[],ne=st(O.filter(oi),f),q=st(O.filter(ii),f),G=ne.length>0&&q.length>0,Q=K=>{h(K),P.current&&clearTimeout(P.current),p(K?u:""),b(K?u:"")};let Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=K=>{p(K),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{b(K)},300)},e[11]=Y):Y=e[11];const te=Y,ae=K=>{c(K),Q(!1)},X=us(f),J=$e(r,{[i]:X}),se=Zn,ve=Xn,pe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",de=ai;let ie;e[12]!==g||e[13]!==o?(ie=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=o,e[14]=ie):ie=e[14];let ue;e[15]!==ie?(ue=s.jsx(es,{className:"sr-only",children:s.jsx(ts,{children:ie})}),e[15]=ie,e[16]=ue):ue=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(as,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let Z;e[18]!==o?(Z=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=Z):Z=e[19];let oe;e[20]!==g?(oe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:g}),e[20]=g,e[21]=oe):oe=e[21];let he;e[22]!==Z||e[23]!==oe?(he=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[Z," ",oe]})]}),e[22]=Z,e[23]=oe,e[24]=he):he=e[24];const ge=os,Me=!1,Le="min-h-0 flex-1";let Oe;e[25]!==k||e[26]!==f?(Oe=s.jsx(ls,{autoFocus:!0,placeholder:k,value:f,onValueChange:te}),e[25]=k,e[26]=f,e[27]=Oe):Oe=e[27];const He=is,xe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let ye;e[28]!==o?(ye=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=ye):ye=e[29];let je;e[30]!==ye?(je=s.jsx(cs,{children:ye}),e[30]=ye,e[31]=je):je=e[31];const De=X&&s.jsx(it,{className:"shrink-0",children:s.jsxs(ot,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>ae(X),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(oa,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:J})]})]})}),_e=G?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(rt,{heading:E.category.heading,iconKind:"category",options:ne,template:r,paramName:i,keyPrefix:`${V?.source.id}:cat`,onSelect:ae})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(rt,{heading:E.product.heading,iconKind:"product",options:q,template:r,paramName:i,keyPrefix:`${V?.source.id}:prod`,onSelect:ae})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.map(K=>{const{source:C,query:me,options:Be}=K,{noun:Tt}=E[C.kind];if(me.isLoading)return s.jsx(Vn,{text:o("sandbox.pathParamPickerChip.loading",{noun:Tt})},C.id);if(me.isError)return s.jsx(Vn,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},C.id);if(C.homepageLinks){const Qe=me.data??[];return s.jsxs(v.Fragment,{children:[s.jsx(rt,{heading:E.category.heading,iconKind:"category",options:st(Qe.filter(ri),f),template:r,paramName:i,keyPrefix:`${C.id}:cat`,onSelect:ae}),s.jsx(rt,{heading:E.product.heading,iconKind:"product",options:st(Qe.filter(si),f),template:r,paramName:i,keyPrefix:`${C.id}:prod`,onSelect:ae})]},C.id)}return s.jsx(rt,{heading:W.length>1?E[C.kind].heading:void 0,iconKind:C.kind,options:Be,template:r,paramName:i,keyPrefix:C.id,onSelect:ae},C.id)})});let Ae;e[32]!==He||e[33]!==je||e[34]!==De||e[35]!==_e?(Ae=s.jsxs(He,{className:xe,children:[je,De,_e]}),e[32]=He,e[33]=je,e[34]=De,e[35]=_e,e[36]=Ae):Ae=e[36];let we;e[37]!==ge||e[38]!==Oe||e[39]!==Ae?(we=s.jsxs(ge,{shouldFilter:Me,className:Le,children:[Oe,Ae]}),e[37]=ge,e[38]=Oe,e[39]=Ae,e[40]=we):we=e[40];let Ce;e[41]!==ve||e[42]!==ue||e[43]!==he||e[44]!==we||e[45]!==de?(Ce=s.jsxs(ve,{className:pe,onClick:de,children:[ue,he,we]}),e[41]=ve,e[42]=ue,e[43]=he,e[44]=we,e[45]=de,e[46]=Ce):Ce=e[46];let Ke;return e[47]!==se||e[48]!==Q||e[49]!==d||e[50]!==Ce?(Ke=s.jsx(se,{open:d,onOpenChange:Q,children:Ce}),e[47]=se,e[48]=Q,e[49]=d,e[50]=Ce,e[51]=Ke):Ke=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:K=>{K.stopPropagation(),Q(!0)},children:u||g}),Ke]})}function si(t){return t.kind==="product"}function ri(t){return t.kind!=="product"}function ai(t){return t.stopPropagation()}function ii(t){return t.kind==="product"}function oi(t){return t.kind!=="product"}function li(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ci(t){return t.isFallback}function di(t){return!t.isFallback}function ui(t){const e=fe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const j={template:r,paramName:i},b=n.filter(mi);o=Xt,c=b.map(P=>en(u,P,"",j,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[f,p]=v.useState(!1);if(!f)for(const j of h){if(j.isLoading)break;const b=j.data?.[0];if(b){p(!0),queueMicrotask(()=>l(b.value));break}}return null}function mi(t){return!t.isFallback}function fi(t){const e=fe.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[l,c]=v.useState(r),[o,d]=v.useState(!1),h=v.useRef(!1);let f;e[0]!==n||e[1]!==u?(f=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=f):f=e[2];const p=f,j=l||p;let b;e[3]!==j?(b=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:j}),e[3]=j,e[4]=b):b=e[4];let P;e[5]!==p||e[6]!==u?(P=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=P):P=e[7];let g,E;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=S=>c(S.target.value),E=()=>d(!0),e[8]=g,e[9]=E):(g=e[8],E=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=us(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let w;e[16]!==l||e[17]!==p||e[18]!==P||e[19]!==N||e[20]!==y?(w=s.jsx("input",{type:"text",value:l,placeholder:p,title:P,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:pi,onChange:g,onFocus:E,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=P,e[19]=N,e[20]=y,e[21]=w):w=e[21];let k;e[22]!==b||e[23]!==w?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[b,w]}),e[22]=b,e[23]=w,e[24]=k):k=e[24];let x;e[25]!==o||e[26]!==u?(x=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(ur,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=x):x=e[27];let B;return e[28]!==x||e[29]!==k?(B=s.jsxs(s.Fragment,{children:[k,x]}),e[28]=x,e[29]=k,e[30]=B):B=e[30],B}function pi(t){return t.stopPropagation()}function hi(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function gi(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function vi(t){const e=fe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=fs(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Dr(l),h=o?{...o,name:l,path:c}:Kr(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Zs(i)}function bi(t){const e=fe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Te();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[f,p]=v.useState(h);let j;e[2]!==d?(j=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=j):j=e[3];const[b,P]=v.useState(j),[g,E]=v.useState(Gt),[N,y]=v.useState(null),[w,k]=v.useState(n);n!==w&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),P(d("sectionsEditor.createPageModal.defaultPagePath")),E(Gt),y(null)));const x=!!l?.length;let B;e[4]!==o||e[5]!==r?(B=Z=>{!Z&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=B):B=e[6];const S=B;let I;e[7]!==o||e[8]!==f||e[9]!==c||e[10]!==b||e[11]!==x||e[12]!==g?(I=async Z=>{Z.preventDefault();const oe=f.trim(),he=b.trim();if(!oe||!he||o)return;const ge=ms(he);if(ge){y(ge);return}y(null),await c({name:oe,path:he,templateKey:x&&g!==Gt?g:null})},e[7]=o,e[8]=f,e[9]=c,e[10]=b,e[11]=x,e[12]=g,e[13]=I):I=e[13];const $=I,M=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let R;e[16]!==L?(R=s.jsx(es,{children:s.jsx(ts,{children:L})}),e[16]=L,e[17]=R):R=e[17];let U;e[18]!==d?(U=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=U):U=e[19];let D;e[20]!==U?(D=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:U}),e[20]=U,e[21]=D):D=e[21];let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=Z=>p(Z.target.value),e[22]=F):F=e[22];let H;e[23]!==d?(H=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=H):H=e[24];let W;e[25]!==o||e[26]!==f||e[27]!==H?(W=s.jsx(Rn,{id:"new-page-name",value:f,onChange:F,placeholder:H,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=H,e[28]=W):W=e[28];let V;e[29]!==W||e[30]!==D?(V=s.jsxs("div",{className:"space-y-1.5",children:[D,W]}),e[29]=W,e[30]=D,e[31]=V):V=e[31];let ee;e[32]!==d?(ee=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=ee):ee=e[33];let O;e[34]!==ee?(O=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:ee}),e[34]=ee,e[35]=O):O=e[35];let ne;e[36]===Symbol.for("react.memo_cache_sentinel")?(ne=Z=>P(Z.target.value),e[36]=ne):ne=e[36];let q;e[37]!==d?(q=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=q):q=e[38];let G;e[39]!==o||e[40]!==b||e[41]!==q?(G=s.jsx(Rn,{id:"new-page-path",value:b,onChange:ne,placeholder:q,disabled:o}),e[39]=o,e[40]=b,e[41]=q,e[42]=G):G=e[42];let Q;e[43]!==O||e[44]!==G?(Q=s.jsxs("div",{className:"space-y-1.5",children:[O,G]}),e[43]=O,e[44]=G,e[45]=Q):Q=e[45];let Y;e[46]!==o||e[47]!==x||e[48]!==d||e[49]!==g||e[50]!==l?(Y=x&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(zr,{id:"new-page-template",value:g,onChange:E,templates:l??[],disabled:o})]}),e[46]=o,e[47]=x,e[48]=d,e[49]=g,e[50]=l,e[51]=Y):Y=e[51];let te;e[52]!==M?(te=M&&s.jsx("p",{className:"text-xs text-destructive",children:M}),e[52]=M,e[53]=te):te=e[53];let ae;e[54]!==V||e[55]!==Q||e[56]!==Y||e[57]!==te?(ae=s.jsxs("div",{className:"space-y-4 py-4",children:[V,Q,Y,te]}),e[54]=V,e[55]=Q,e[56]=Y,e[57]=te,e[58]=ae):ae=e[58];let X;e[59]!==r?(X=()=>r(!1),e[59]=r,e[60]=X):X=e[60];let J;e[61]!==d?(J=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=J):J=e[62];let se;e[63]!==o||e[64]!==X||e[65]!==J?(se=s.jsx(Ue,{type:"button",variant:"outline",onClick:X,disabled:o,children:J}),e[63]=o,e[64]=X,e[65]=J,e[66]=se):se=e[66];let ve;e[67]!==o||e[68]!==f||e[69]!==b?(ve=!f.trim()||!b.trim()||o,e[67]=o,e[68]=f,e[69]=b,e[70]=ve):ve=e[70];let pe;e[71]!==o||e[72]!==d?(pe=o?s.jsxs(s.Fragment,{children:[s.jsx(jt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=pe):pe=e[73];let de;e[74]!==ve||e[75]!==pe?(de=s.jsx(Ue,{type:"submit",disabled:ve,children:pe}),e[74]=ve,e[75]=pe,e[76]=de):de=e[76];let ie;e[77]!==se||e[78]!==de?(ie=s.jsxs(er,{children:[se,de]}),e[77]=se,e[78]=de,e[79]=ie):ie=e[79];let ue;e[80]!==$||e[81]!==ae||e[82]!==ie||e[83]!==R?(ue=s.jsx(Xn,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:$,children:[R,ae,ie]})}),e[80]=$,e[81]=ae,e[82]=ie,e[83]=R,e[84]=ue):ue=e[84];let be;return e[85]!==S||e[86]!==n||e[87]!==ue?(be=s.jsx(Zn,{open:n,onOpenChange:S,children:ue}),e[85]=S,e[86]=n,e[87]=ue,e[88]=be):be=e[88],be}function xi(t){const e=fe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Te();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const f=fs(h);let p;e[4]!==f?(p=Hr((k,x)=>f.mutate({blockKey:k,data:x})),e[4]=f,e[5]=p):p=e[5];const j=p;let b;e[6]!==o||e[7]!==c?(b=Ir(c,o),e[6]=o,e[7]=c,e[8]=b):b=e[8];const{resolveType:P,props:g,title:E}=b;if(!P){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let x;return e[11]!==k?(x=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=x):x=e[12],x}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==P||e[15]!==E?(y={mode:"saved",blockKey:o,resolveType:P,title:E},e[13]=o,e[14]=P,e[15]=E,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==g||e[23]!==f.isPending||e[24]!==j||e[25]!==N||e[26]!==y||e[27]!==r?(w=s.jsx(Ur,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:g,isCreating:f.isPending,onCreate:yi,onSaveReferencedBlock:j,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=g,e[23]=f.isPending,e[24]=j,e[25]=N,e[26]=y,e[27]=r,e[28]=w):w=e[28],w}async function yi(){}function wi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function qn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:wi(t.error)}}function ki(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 Pi(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=ki(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const Si="https://github.com/decocms/blocks";function Ei(){const t=fe.c(14),e=Te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(mr,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ns,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(Ue,{size:"sm",asChild:!0,children:s.jsxs("a",{href:Si,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(an,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function ji(t){const e=fe.c(15),{source:n,onRetry:r}=t,i=Te();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(la,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(Ue,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let f;return e[11]!==l||e[12]!==o||e[13]!==h?(f=s.jsx(an,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=f):f=e[14],f}const Ni=v.lazy(()=>tr(()=>import("./sections-editor-zfrx_XIM.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,163])).then(t=>({default:t.SectionsEditor})));function Wn(t){const e=fe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=tn(),{currentBranch:c,taskId:o}=Nt(),d=gs(),h=nn(),f=vs(),p=d.lifecycle.phase==="running",j=h.previewUrl;let b;e[0]!==c||e[1]!==l||e[2]!==j||e[3]!==o||e[4]!==n?(b=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:j}:null,e[0]=c,e[1]=l,e[2]=j,e[3]=o,e[4]=n,e[5]=b):b=e[5];const P=b;let g;e[6]!==p?(g={fetchEnabled:p},e[6]=p,e[7]=g):g=e[7];const E=rn(P,g);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=ps(P,N),w=Pi({lifecyclePhase:d.lifecycle.phase,decofile:qn(E),meta:qn(y),hasEditableContent:Rr(E.data,y.data),fastPreviewActive:ds(n).runtime==="cms"}),k=Ti;if(w.kind==="loading"){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(nr,{})),e[10]=O):O=e[10],O}if(w.kind==="empty"){let O;return e[11]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(Ei,{})),e[11]=O):O=e[11],O}if(w.kind==="error"){let O;e[12]!==E||e[13]!==h||e[14]!==y||e[15]!==w.source?(O=()=>{if(w.source==="sandbox"){h.retry();return}Promise.all([E.refetch(),y.refetch()])},e[12]=E,e[13]=h,e[14]=y,e[15]=w.source,e[16]=O):O=e[16];const ne=O;let q;return e[17]!==ne||e[18]!==w.source?(q=k(s.jsx(ji,{source:w.source,onRetry:ne})),e[17]=ne,e[18]=w.source,e[19]=q):q=e[19],q}let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=O=>k(s.jsx("div",{className:"h-full min-h-0",children:O})),e[20]=x):x=e[20];const B=x,S=f.state.target;if(S?.kind==="loader"&&E.data&&y.data){const O=c??"",ne=j??null;let q;return e[21]!==E.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==O||e[25]!==ne||e[26]!==S.key||e[27]!==n?(q=B(s.jsx(xi,{orgSlug:l.slug,virtualMcpId:n,branch:O,previewUrl:ne,meta:y.data,decofile:E.data,blockKey:S.key})),e[21]=E.data,e[22]=y.data,e[23]=l.slug,e[24]=O,e[25]=ne,e[26]=S.key,e[27]=n,e[28]=q):q=e[28],q}let I;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(I=S||!c?null:ss(rs(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=I):I=e[33];const $=I;let M="/",L=null,R=null;S?.kind==="page"?(M=S.path,L=S.key):S?.kind==="section"?R=S.key:$&&(M=$.path,L=$.pageKey);const U=L?`page:${L}`:R?`section:${R}`:`path:${M}`;let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(jt,{className:"size-5 text-muted-foreground"})}),e[34]=D):D=e[34];const F=c??"",H=j??void 0,W=R?null:u,V=!!L&&f.state.editSeoPageKey===L;let ee;return e[35]!==R||e[36]!==L||e[37]!==M||e[38]!==U||e[39]!==i||e[40]!==l.slug||e[41]!==W||e[42]!==V||e[43]!==F||e[44]!==H||e[45]!==n||e[46]!==f.consumeEditSeo||e[47]!==f.setFocusedBlock||e[48]!==f.setVariantOverride?(ee=B(s.jsx(v.Suspense,{fallback:D,children:s.jsx(Ni,{orgSlug:l.slug,virtualMcpId:n,branch:F,previewReady:!0,previewUrl:H,currentPath:M,activePageBlockKey:L,activeGlobalBlockKey:R,externalSelection:W,initialEditSeo:V,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onFocusedBlockChange:f.setFocusedBlock,onViewJsonFile:i},U)})),e[35]=R,e[36]=L,e[37]=M,e[38]=U,e[39]=i,e[40]=l.slug,e[41]=W,e[42]=V,e[43]=F,e[44]=H,e[45]=n,e[46]=f.consumeEditSeo,e[47]=f.setFocusedBlock,e[48]=f.setVariantOverride,e[49]=ee):ee=e[49],ee}function Ti(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Gn(t){const e=fe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Te(),c=da(),o=Vr(n);let d;e[0]!==o||e[1]!==r?(d=qr(o,ua(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:f}=tn(),{currentBranch:p,taskId:j}=Nt(),P=nn().previewUrl;let g;e[3]!==p||e[4]!==f.slug||e[5]!==P||e[6]!==j||e[7]!==n?(g=p?{orgSlug:f.slug,virtualMcpId:n,branch:p,threadId:j??null,previewUrl:P}:null,e[3]=p,e[4]=f.slug,e[5]=P,e[6]=j,e[7]=n,e[8]=g):g=e[8];const N=rn(g),y=p??"";let w;e[9]!==f.slug||e[10]!==y||e[11]!==n?(w={orgSlug:f.slug,virtualMcpId:n,branch:y},e[9]=f.slug,e[10]=y,e[11]=n,e[12]=w):w=e[12];const{save:k,flush:x}=Wr(w),B=N.data?.[r],S=N.data===void 0&&N.isLoading,I=N.data!==void 0&&B===void 0,$=!p||I||S;let M;e[13]!==B?(M=B===void 0?"":JSON.stringify(B,null,2),e[13]=B,e[14]=M):M=e[14];const L=M;let R;e[15]!==r||e[16]!==$||e[17]!==k?(R=V=>{if($)return;let ee;try{ee=JSON.parse(V)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||k(r,ee)},e[15]=r,e[16]=$,e[17]=k,e[18]=R):R=e[18];const U=R;let D;e[19]!==x?(D=()=>({flush:x}),e[19]=x,e[20]=D):D=e[20],v.useImperativeHandle(u,D);let F;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?(F=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(Ue,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(sr,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=F):F=e[25];let H;e[26]!==N.data||e[27]!==x||e[28]!==L||e[29]!==S||e[30]!==I||e[31]!==r||e[32]!==$||e[33]!==U||e[34]!==l?(H=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(jt,{className:"size-5 text-muted-foreground"})}):I?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ca,{code:L,language:"json",readOnly:$,height:"100%",onChange:V=>U(V??""),onSave:V=>{U(V),x()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=x,e[28]=L,e[29]=S,e[30]=I,e[31]=r,e[32]=$,e[33]=U,e[34]=l,e[35]=H):H=e[35];let W;return e[36]!==F||e[37]!==H?(W=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[F,H]}),e[36]=F,e[37]=H,e[38]=W):W=e[38],W}function Ps(t){return t.contentEditingEnabled&&!t.isMobile}function Ci(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Ri(t,e){return t==="blocks"?"preview":e?"blocks":t}function Li(t){return Ps({contentEditingEnabled:hs(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Oi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const _i=15e3;function Ai(t,e,n){return n?t.src===e||t.loading?t:{src:e,loading:!0}:t.src===e&&!t.loading?t:{src:e,loading:!1}}function Jn(t){return t.loading?{...t,loading:!1}:t}const Bi=500,Fi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Yn=1,St=["desktop","mobile","tablet"],$i=["preview","visual","blocks"],Qn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Mi(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function at(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Qt(t,e){try{return new URL(t,e).href}catch{return null}}function Di(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function Ki(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function zi(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function Ii(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ui({virtualMcpId:t}){const e=Te(),n=Fr(),{currentBranch:r,taskId:i,virtualMcpId:u}=Nt(),l=vs(),c=Sr(u===t?t:null),o=ds(t),d=ma(c?.metadata?.ui?.layout??null),h=hs(d),f=Ps({contentEditingEnabled:h,isMobile:n}),[p]=v.useState(()=>Li({cmsMode:d,isMobile:n})),[j,b]=Ln(On.previewEditingMode(t),a=>a&&$i.includes(a)?a:null),P=j??p,[g,E]=Ln(On.previewDeviceSize(t),a=>a&&St.includes(a)?a:"desktop"),[N,y]=v.useState(null),[w,k]=v.useState(null),x=v.useRef(null),B=v.useRef(null),[S,I]=v.useState(!1),$=v.useRef(null),M=()=>{$.current?.flush(),I(!1)},L=()=>I(a=>(a&&$.current?.flush(),!a)),[R,U]=v.useState({width:0,height:0}),[D,F]=v.useState(!1),[H,W]=v.useState(""),V=v.useRef(null),[ee,O]=v.useState(!1),[ne,q]=v.useState(),[G,Q]=v.useState(null),[Y,te]=v.useState(null),[ae,X]=v.useState(null),[J,se]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[ve,pe]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[de,ie]=v.useState({}),[ue,be]=v.useState(!1),Z=v.useRef(null),oe=()=>{be(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>be(!1),15e3)},he=()=>{Z.current&&(clearTimeout(Z.current),Z.current=null),be(!1)},{org:ge}=tn(),Me=gs(),Le=nn(),Oe=Le.vmEntry,He=Me.lifecycle.phase,{url:xe}=Lr(t),ye=xe??Le.previewUrl,je=!!xe||He==="running",De=c?.id===t?Nr(c.metadata):null,_e=!xe&&c?.id===t&&o.runtime==="cms",Ae=o.projectDefault==="cms",we=Zr({sandboxUrl:ye,previewServerUrl:De,fastPreviewActive:_e}),Ce=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:ye}:null,Ke=rn(Ce,{fetchEnabled:je}),K=ps(Ce,{fetchEnabled:je}),C=Ke.data,me=K.data,Be=C?Or(C).sort((a,m)=>a.name.localeCompare(m.name)):[],Tt=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r}:null,Qe=vi(Tt),Ct=C&&me?_r(C,me):[],ln=C&&me?Gr(me,C,"loaders"):[],cn=H?(()=>{const a=H.toLowerCase();return Be.map(m=>({page:m,score:zi(m.name,m.path,a)})).filter(({score:m})=>m>0).sort((m,T)=>T.score-m.score||m.page.path.length-T.page.path.length).map(({page:m})=>m)})():Be,dn=Ct.filter(a=>{if(!H)return!0;const m=H.toLowerCase();return a.name.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),un=f?ln:[],mn=un.filter(a=>{if(!H)return!0;const m=H.toLowerCase();return a.title.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),ct=Y?ln.find(a=>a.key===Y)??null:null,Ne=sn,Rt=G||Y?null:Ar(Be,J,ve),z=Rt?.key??null,Ve=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??z,dt=Rt?.path??null,qe=(z?de[z]:void 0)??{},ke=$e(J,qe),Lt={};if(je&&ye&&me&&C){const a=Jr(me,"loaders"),m=z?C[z]:void 0,T=za(m,C,re=>a.has(re)),A=Fa(T);for(const re of lt(J)){if(re.type!=="param")continue;const Re=_a(J,re.name,T),Se=Da(Re,a,A);Se.length>0&&(Lt[re.name]=Se)}}const ut=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,fn=C&&z?Br(C,z,0):[],pn=C?Yr(fn,C):[],Ot=pn.map(a=>a.isSavedBlock?a.label:""),_t=pn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),At=fn.map(a=>Zt(a,C??{})),hn=v.useRef(null),Pe=v.useRef(null),Ss=Me.status.state==="paused",Bt=Me.phase,gn=Qr({claimPhase:Bt,lifecycle:Me.lifecycle}),ze=Le.previewState,Es=Le.userStopped,js=ra(ge.slug,t??"",r??""),{url:Fe}=sa(_e&&t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,previewServerUrl:De??null,path:ke}:null),Ns=Ae&&o.runtime==="sandbox",_=xa({previewState:ze,progressStatus:gn.status,previewServerUrl:De,fastPreviewActive:_e,fastPreviewReady:!!Fe,codingSession:Ns,localPreviewUrl:xe}),mt=_.mode!=="none",Ts=_.mode==="production"&&_.iframeBase?at(_.iframeBase):null,We=_.mode==="production"?Ts:at(ye),Cs=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Xe=xe?_.mode==="sandbox"&&f&&P==="blocks":_.mode==="production"&&_e&&Cs&&f&&P==="blocks",vn=v.useRef(null),{pin:Rs,effective:Ls}=Di(vn.current,{inPlaceRenderActive:Xe,draftPreviewUrl:Fe,resolvedPath:ke});vn.current=Rs;const Ge=Mi(_.mode==="sandbox"?yt(Mn(ae??Qt(ke,_.iframeBase)??_.iframeBase,g),l.state.variantOverride??[]):_.mode==="production"?yt(Mn(ea(ae??Ls??Qt(ke,_.iframeBase)??_.iframeBase,_.showWakingPill?ta:null),g),l.state.variantOverride??[]):null),bn=Fe??(_.iframeBase?Qt(ke,_.iframeBase):null),Os=_.mode==="production"?bn?yt(bn,l.state.variantOverride??[]):null:Ge??_.iframeBase,_s=()=>{const a=Os;a&&window.open(a,"_blank","noopener")},Ze=t&&r?rs(ge.slug,t,r):null,et=a=>{Ze&&cr(Ze,a)},le=l.state.target;v.useEffect(()=>{if(!(!le||!we||!me))if(le.kind==="page"){const a=de[le.key]??{};Pe.current=$e(le.path,a),Q(null),te(null),X(null),pe(le.key),se(le.path),et({path:le.path,pageKey:le.key,params:a})}else if(le.kind==="loader")Pe.current=null,Q(null),te(le.key),X(null);else{const a=Ct.find(m=>m.key===le.key);if(a){Pe.current=null;const m=Fn(me);te(null),Q(a),X($n(we,m,a.key))}}},[le,we,me,de]),v.useEffect(()=>{!z||dt===null||le?.kind==="page"&&le.key===z&&le.path===dt||l.selectTarget({kind:"page",key:z,path:dt})},[z,dt,le]);const[xn,As]=v.useState(null);if(ze.kind==="iframe"&&xn!==ze.previewUrl){const a=xn!==null;As(ze.previewUrl);const m=Ze?ss(Ze):null;if(m){if(Pe.current=$e(m.path,m.params),se(m.path),pe(m.pageKey),X(null),Q(null),te(null),m.pageKey&&Object.keys(m.params).length>0){const T=m.pageKey;ie(A=>({...A,[T]:m.params}))}}else a&&(Pe.current=null,se("/"),X(null),pe(null),Q(null),te(null))}hn.current=Ge;const Bs=_.mode==="production"&&!!Fe&&!xe,[yn,Ft]=v.useState({src:Ge??void 0,loading:!1}),ft=Ai(yn,Ge??void 0,Bs);ft!==yn&&Ft(ft);const tt=ft.src,wn=ft.loading,kn=Pa({iframeRef:x,src:_.mode==="sandbox"?Ge:null,active:_.mode==="sandbox"}),Pn=v.useRef(null);v.useEffect(()=>{const a=wn?setTimeout(()=>Ft(Jn),_i):null,m=()=>{a&&clearTimeout(a)};if(!Fe||!tt||Pn.current===Fe)return m;Pn.current=Fe;const T=x.current;return T&&T.getAttribute("src")!==tt&&(oe(),T.src=tt),m},[Fe,tt,wn]);const Sn=()=>{const a=x.current?.contentWindow,m=We;if(!a||!m||!C||!z)return;const T=C[z];if(!T||typeof T!="object")return;const A=na({previewBaseUrl:m,pageBlock:T,decofile:C,path:ke,pathTemplate:J});if(!A)return;const re=yt(A.src,Xr(l.state.variantOverride??[],z));a.postMessage({type:"cms-editor::render",src:re,body:A.body},m)},$t=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!C){$t.current=null;return}const a={nav:JSON.stringify({page:z,path:ke,pathTemplate:J}),content:JSON.stringify(C)},m=Ki($t.current,a);$t.current=a,m&&Sn()},[C,Xe,G,Y,z,ke,J]);const Mt=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!C){Mt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),m=Mt.current;Mt.current={page:z,sig:a},!(!m||m.page!==z||m.sig===a)&&Sn()},[l.state.variantOverride,Xe,G,Y,z]);const Fs=!!t&&!!r&&!Me.notFound&&!Es&&!Ss&&(Bt?.kind==="ready"||He!=="idle"),ce=Oi({editingMode:P,sandboxDisplay:_.mode==="sandbox",blocksEditingEnabled:f});v.useEffect(()=>{const a=We;if(!a)return;const m=T=>{if(T.origin===a)if(T.data?.type==="visual-editor::element-clicked"){const A=Sa.safeParse(T.data.payload);A.success&&y(A.data)}else if(T.data?.type==="cms-editor::section-clicked"){const A=Na.safeParse(T.data.payload);A.success&&k({index:A.data.sectionIndex,seq:A.data.clickSeq})}else T.data?.type==="cms-editor::render-start"?oe():T.data?.type==="cms-editor::render-end"?(he(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Ot,kinds:_t,keys:At},a)):T.data?.type==="cms-editor::render-error"&&he()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[We,Ot,_t,At]);const En=()=>{const a=x.current?.contentWindow,m=at(ye);!a||!m||a.postMessage({type:"visual-editor::activate",script:Ea},m)},$s=()=>{const a=x.current?.contentWindow,m=at(ye);!a||!m||a.postMessage({type:"visual-editor::deactivate"},m)},Dt=()=>{const a=x.current?.contentWindow,m=We;!a||!m||(a.postMessage(_.mode==="production"||xe?{type:"editor::inject",args:{script:In}}:{type:"visual-editor::activate",script:In},m),a.postMessage({type:"cms-editor::set-labels",labels:Ot,kinds:_t,keys:At},m))},Ms=()=>{const a=x.current?.contentWindow,m=We;!a||!m||a.postMessage({type:"cms-editor::deactivate"},m)},Ds=()=>{const a=x.current?.contentWindow,m=We;!a||!m||(a.postMessage({type:"cms-editor::clear-hover"},m),a.postMessage({type:"visual-editor::clear-hover"},m))},pt=a=>{if(a==="blocks"&&!f)return;const m=P;!n&&a!==m&&(a==="blocks"?B.current?.resize("30%"):B.current?.collapse()),b(a),y(null),k(null),a!=="blocks"&&te(null),m==="visual"&&$s(),a==="visual"&&En(),m==="blocks"&&a!=="blocks"&&Ms(),a==="blocks"&&Dt()},Ks=()=>{pt(Ci(P,f))},zs=()=>{pt(Ri(P,f))};ia(()=>{const a=x.current;if(!a)return;oe();const m=document.activeElement,T=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ii(a,hn.current);let A;const re=()=>{clearTimeout(A),a.tabIndex=T,a.style.pointerEvents="";const Re=document.activeElement;(!Re||Re===document.body||Re===a)&&m?.focus(),a.removeEventListener("load",re)};a.addEventListener("load",re),A=setTimeout(re,3e3)});const Is=()=>{const a=St.indexOf(g);E(St[(a+1)%St.length])},Kt=(a,m)=>{if(!z)return;const T=z,A={...qe,[a]:m};Pe.current=$e(J,A),ie(re=>({...re,[T]:A})),et({path:J,pageKey:T,params:A})},Us=hi({iframeBase:_.iframeBase,resolvedPath:ke,activeGlobalSectionName:G?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),jn=a=>{const m=de[a.key]??{},T=$e(a.path,m);(G||Ne(T)!==Ne(ke))&&oe(),Pe.current=T,Q(null),te(null),X(null),k(null),pe(a.key),se(a.path),et({path:a.path,pageKey:a.key,params:m}),l.selectTarget({kind:"page",key:a.key,path:a.path})};lr(Ze,a=>{(G||Ne(a)!==Ne(ke))&&oe(),Pe.current=a,Q(null),te(null),X(null),k(null),pe(null),se(a),et({path:a,pageKey:null,params:{}})});const Hs=a=>{if(!we||!me){An.error(e("sandbox.preview.previewMetadataNotReady"));return}oe(),Pe.current=null;const m=Fn(me),T=$n(we,m,a.key);Q(a),te(null),X(T),k(null),l.selectTarget({kind:"section",key:a.key})},Vs=a=>{f&&(Q(null),te(a.key),X(null),pt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},qs=async({name:a,path:m,templateKey:T})=>{if(!t||!r)return;const A=ms(m);if(A){q(A);return}const re=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Be.some(Se=>Ne(Se.path)===Ne(re))){q(e("sandbox.preview.pageAlreadyExists",{path:re}));return}let Re;if(T&&(Re=C?.[T],!Re)){q(e("sandbox.preview.templateNoLongerExists"));return}q(void 0);try{const Se=await Qe.mutateAsync({name:a,path:re,template:Re});O(!1),An.success(e("sandbox.preview.pageCreated",{name:a})),await fa(Bi),jn({key:Se.key,name:Se.name,path:Se.path}),pt("blocks")}catch(Se){q(Se instanceof Error?Se.message:e("sandbox.preview.failedToCreatePage"))}},ht=mt&&(Fs||_.mode==="production"),Ws=gi({showPreviewToolbar:ht,contentEditingEnabled:h}),gt=()=>{F(!1),W("")},zt=G?.name??ct?.title??Rt?.name,It=Ke.isPending||K.isPending,Ut=It?at(_.iframeBase):zt,vt=G?`section:${G.key}`:Y?`loader:${Y}`:z?`page:${z}`:void 0,Gs=ht?Ws?s.jsxs(wr,{open:D,onOpenChange:a=>{F(a),a||W("")},children:[s.jsx(kr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:It?Ut??void 0:G||ct?zt:[zt,J].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[G&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(fr,{size:11}),e("sandbox.preview.globalBadge")]}),ct&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(pr,{size:11}),e("sandbox.preview.loaderBadge")]}),Ut&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Ut}),!It&&!G&&!ct&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:J}),s.jsx(dr,{size:12,className:Ht("shrink-0 transition-transform",D&&"rotate-180")})]})})}),s.jsxs(Pr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(os,{shouldFilter:!1,defaultValue:vt,children:[s.jsx(ls,{value:H,onValueChange:a=>{W(a),V.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(is,{ref:V,className:"max-h-80",children:[s.jsx(cs,{children:Be.length===0&&Ct.length===0&&un.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),cn.length>0&&s.jsx(it,{children:cn.map(a=>s.jsxs(ot,{value:`page:${a.key}`,"aria-current":vt===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{gt(),jn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),dn.length>0&&s.jsx(it,{heading:e("sandbox.preview.globalComponents"),children:dn.map(a=>s.jsx(ot,{value:`section:${a.key}`,"aria-current":vt===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{gt(),Hs(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),mn.length>0&&s.jsx(it,{heading:e("sandbox.preview.globalLoaders"),children:mn.map(a=>s.jsx(ot,{value:`loader:${a.key}`,"aria-current":vt===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{gt(),Vs(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!G&&!Y&<(J).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:lt(J).map((a,m)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${m}`);const T=Lt[a.name];return T&&ut?s.jsx(ni,{sources:T,template:J,paramName:a.name,value:qe[a.name]??"",sandboxRef:ut,onCommit:A=>Kt(a.name,A)},`${z}:${a.name}`):s.jsx(fi,{name:a.name,value:qe[a.name]??"",onCommit:A=>Kt(a.name,A)},`${z}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(Ue,{variant:"ghost",className:"w-full justify-start",onClick:()=>{gt(),q(void 0),O(!0)},children:[s.jsx(yr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Us}):null,Nn=ht||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:Is,"aria-label":e(Qn[g]),children:g==="mobile"?s.jsx(hr,{size:16}):g==="tablet"?s.jsx(gr,{size:16}):s.jsx(vr,{size:16})})}),s.jsx(Wt,{children:e(Qn[g])})]}),Gs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(nt,{onClick:_s,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(ns,{size:16})})})]}):null,Js=_.mode==="sandbox",bt=Fi[g],xt=g==="desktop"&&(R.width===0||R.width>=bt.width+2*Yn),Tn=xt?1:Math.min(R.width>0?R.width/(bt.width+2*Yn):1,1),Ys=xt?{width:"100%",height:"100%"}:{width:`${bt.width}px`,height:R.height>0?`${R.height/Tn}px`:`${bt.height}px`,transform:`scale(${Tn})`,transformOrigin:"top center"},Cn=s.jsxs(s.Fragment,{children:[Js&&(ht||h)&&s.jsx(nt,{onClick:Ks,"aria-pressed":ce==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ce==="visual",children:s.jsx(Bn,{size:16})}),f&&s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:zs,"aria-pressed":ce==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ce==="blocks",children:s.jsx(xr,{size:16})})}),s.jsx(Wt,{children:e("sandbox.preview.blocksEditor")})]}),Ve&&s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:L,"aria-pressed":S,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:S,children:s.jsx(br,{size:16})})}),s.jsx(Wt,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Qs=!!Y&&ce==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[ut&&Object.entries(Lt).map(([a,m])=>(qe[a]??"")===""?s.jsx(ui,{sources:m,template:J,paramName:a,sandboxRef:ut,onFill:T=>Kt(a,T)},`${z}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(_n.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Nn}),children:Nn}),s.jsx(_n.Toolbar.Right.Portal,{fallback:Cn,children:Cn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Qs?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Wn,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L}),S&&Ve&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Gn,{ref:$,virtualMcpId:t,pageKey:Ve,onClose:M})})]}):s.jsxs(Dn,{orientation:"horizontal",disabled:ce!=="blocks",className:"relative isolate",children:[s.jsx(wt,{ref:B,id:"preview-blocks-editor",defaultSize:ce==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ce==="blocks"&&s.jsx(Wn,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L})}),ce==="blocks"&&s.jsx(Kn,{withHandle:!0}),s.jsx(wt,{id:"preview-canvas",defaultSize:ce==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(Dn,{orientation:"horizontal",disabled:!(S&&Ve),children:[s.jsx(wt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const m=()=>U(A=>A.width===a.clientWidth&&A.height===a.clientHeight?A:{width:a.clientWidth,height:a.clientHeight});m();const T=new ResizeObserver(m);return T.observe(a),()=>T.disconnect()},className:Ht("h-full relative overflow-clip flex justify-center",mt&&!xt&&"bg-muted/30"),children:[(ue||js)&&mt&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),_.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"starting",progress:gn,claimPhase:Bt})}),!xe&&ze.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"suspended",onResume:Le.resume})}),!xe&&ze.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"errored",error:ze.error,onRetry:Le.retry,connectionsHref:`/${ge.slug}/settings/connections`})}),_.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(jt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),ce==="visual"&&!N&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(Bn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ce==="visual"&&N&&s.jsx(Ra,{element:N,onDismiss:()=>y(null)}),mt&&Ge&&s.jsx("div",{className:Ht("shrink-0",!xt&&"border-x border-border bg-background shadow-sm"),style:Ys,onMouseLeave:Ds,children:s.jsx("iframe",{ref:x,src:tt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:kn.handleError,onLoad:()=>{if(Ft(Jn),kn.handleLoad(),he(),_.mode!=="sandbox"||xe){(_.mode==="production"&&!_.showWakingPill||xe)&&ce==="blocks"&&Dt();return}if(rr("vm_preview_loaded",{view_mode:ce,vm_id:Oe?.sandboxHandle??null}),!G)try{const a=x.current?.contentWindow?.location?.pathname;if(!a)return;const m=Pe.current;if(m!==null&&(Pe.current=null,Ne(a)!==Ne(m))||Ne(a)===Ne(ke))return;se(a),et({path:a,pageKey:ve,params:qe})}catch{}ce==="visual"&&En(),ce==="blocks"&&Dt()}},_.iframeBase)})]})}),S&&Ve&&s.jsxs(s.Fragment,{children:[s.jsx(Kn,{withHandle:!0}),s.jsx(wt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Gn,{ref:$,virtualMcpId:t,pageKey:Ve,onClose:M})})]})]})})]})}),s.jsx(bi,{open:ee,onOpenChange:O,isPending:Qe.isPending,error:ne,templates:Be,onSubmit:qs})]})}function Hi(t){const e=fe.c(22),{virtualMcpId:n}=t,r=Te(),i=Er(n),{activeTask:u,taskId:l,currentBranch:c}=Nt(),o=ga(l),[d,h]=v.useState(!1);if(ha({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Yt(i?.metadata),threadHasRepo:Yt(o)||Yt(u?.metadata)})==="none"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(zn,{className:"size-7 text-foreground"})}),e[0]=j):j=e[0];let b;e[1]!==r?(b=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=b):b=e[2];let P;e[3]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=P):P=e[4];let g,E;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=()=>h(!0),E=s.jsx(zn,{className:"size-4"}),e[5]=g,e[6]=E):(g=e[5],E=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(Ue,{onClick:g,children:[E,N]}),e[9]=N,e[10]=y):y=e[10];let w;e[11]!==b||e[12]!==P||e[13]!==y?(w=s.jsx(an,{className:"h-full",image:j,title:b,description:P,actions:y}),e[11]=b,e[12]=P,e[13]=y,e[14]=w):w=e[14];let k;e[15]!==d?(k=s.jsx(pa,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let x;return e[17]!==w||e[18]!==k?(x=s.jsxs(s.Fragment,{children:[w,k]}),e[17]=w,e[18]=k,e[19]=x):x=e[19],x}let p;return e[20]!==n?(p=s.jsx(Ui,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function ad(){const t=fe.c(2),e=va();let n;return t[0]!==e?(n=s.jsx(ar,{tabId:"site-editor",children:s.jsx(ir,{feature:"cms",children:s.jsx(Hi,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{ad as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s,j as e,_ as l}from"./index-CRbDzsEl.js";import{C as u}from"./index-BW9tBS1_.js";import{AppViewContent as c}from"./project-app-view-DOlvQRFJ.js";import{S as d}from"./settings-tab-TpMIkIJy.js";import{a as f}from"./repository-binding-GEAUbB-O.js";import"./use-mobile-BcwC7VU3.js";import"./thread-button-D0vpHKhc.js";import"./agent-icon-CSrsRkkV.js";import"./AlertCircle-BBiRNTdE.js";import"./Tool01-D8RNlK5k.js";import"./ArrowUp-XUO4rGpO.js";import"./ArrowLeft-DwPfX3sc.js";import"./LinkBroken01-BFW8MxYc.js";import"./ShoppingBag01-C_AR4ZKW.js";import"./ZoomOut-DJOChAz1.js";import"./Building02-CFG818HY.js";import"./CheckCircle-BZiV5rFy.js";import"./ChevronUp-ZSzJudc4.js";import"./ChevronSelectorVertical-Dc4zDElk.js";import"./UserSquare-BG_D4lBt.js";import"./Copy01-CT9uxfj6.js";import"./CreditCard01-DCwoKma6.js";import"./DotsVertical-CcRpaMtq.js";import"./Image01-DUunwh52.js";import"./Globe04-D88PtZSB.js";import"./SwitchHorizontal01-D8mpLNM6.js";import"./Key01-Dy9XOW24.js";import"./Link01-BDbdWLwx.js";import"./Monitor01-Cm6_ReiN.js";import"./Sun-Dzm8FpU3.js";import"./Play-DFfgxv2q.js";import"./Plus-clvoB9-y.js";import"./SearchMd-Bg-9XsfQ.js";import"./Trash01-ByfCfoe2.js";import"./Upload01-BOzWcBO4.js";import"./User01-VVR3ncLA.js";import"./Users01-BT5Jdc2I.js";import"./XClose-Ck0EFhGe.js";import"./use-chat-layout-state-n4Q3uYHD.js";import"./use-file-configs-BJG54sLn.js";import"./use-organization-settings-C2COOtae.js";import"./schema-DCzFPjhQ.js";import"./task-board-Cq7KN9Yp.js";import"./site-slug-DebpOoQq.js";import"./thread-route-gGOzpjkp.js";import"./use-panel-navigate-sjPSBICL.js";import"./use-project-scope-B_oLVbNv.js";import"./thread-intent-DTPz1weL.js";import"./use-mcp-client-BWo29jbN.js";import"./auth-Cf8kTvK7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Bb7_5bsI.js";import"./slugify-CEUa2lfQ.js";import"./sheet-Bg01hTvG.js";import"./tooltip-3DBbiHrv.js";import"./index-DPPcuuZa.js";import"./toolbar-icon-button-BbfFE6qt.js";import"./shell-layout-BO31z5MQ.js";import"./avatar-CVhMMaTf.js";import"./use-clock-tick-X8apRSs5.js";import"./command-CJiwms5W.js";import"./index-4oHb6320.js";import"./integration-icon-BELz_pOH.js";import"./project-icon-CgRPdhMz.js";import"./new-project-dialog-CU6GK7Hi.js";import"./label-BUw2LYOJ.js";import"./repository-import-picker-CGZicTtt.js";import"./use-navigate-to-agent-f1RDTOQU.js";import"./repository-picker-ipWiqqIY.js";import"./useInfiniteQuery-BBVki4Du.js";import"./infiniteQueryObserver-Dhuk-wHX.js";import"./collection-search-JcNHcOFg.js";import"./use-debounced-value-Db_6wQub.js";import"./required-auth-layout-B0JL0M-z.js";import"./autosend-Dbvfg9pv.js";import"./use-org-sso-DQNJJVcp.js";import"./resizable-CNroF4sn.js";import"./icon-button-D9OpoKyB.js";import"./tool-namespace-BsBj6Gec.js";import"./use-mcp-tools-D9a3atY2.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-1q9SfIz-.js";import"./types-DJQTaYxP.js";import"./chat-context-NYUfgJBl.js";import"./use-decopilot-events-D14uF_Cy.js";import"./use-ai-providers-scSugiQF.js";import"./use-chat-navigation-CpL4JFZX.js";import"./location-BjlyegC2.js";import"./task-route-Cj_KfcXd.js";import"./core.esm-BaMzqjA4.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-DejR02Br.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-Bn1uWhLp.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-Ij5noImS.js";import"./authenticate-and-persist-oauth-CNIjDkAv.js";import"./mcp-oauth-DJzQquAH.js";import"./mcp-oauth-DcDGTHX8.js";import"./track-2QxiEKmh.js";import"./extract-connection-data-BWH-Gguq.js";import"./connection-pgjV95kc.js";import"./url-slug-CVpOSHeG.js";import"./build-improve-prompt-doc-DMgFOt46.js";import"./empty-state-DfOpTmwf.js";import"./use-date-fns-locale-uYFiDToW.js";import"./differenceInSeconds-C3x8sHUj.js";import"./alert-dialog-Bq1vUmcb.js";import"./textarea-DKdq_MAz.js";import"./use-connection--fjYRP_g.js";import"./use-debounced-autosave-NE-5LrTu.js";import"./add-connection-dialog-DhxH1mO6.js";import"./connection-card-CWkexnWw.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-DWjMBwyf.js";import"./select-nSDsr0Zi.js";import"./index-BdQq_4o_.js";import"./schema-DxY623qB.js";import"./connection-form-helpers-W4yLfkzt.js";import"./collection-tabs-CSZlwXCA.js";import"./badge-GBNejOns.js";import"./use-infinite-scroll-BPxCDDTo.js";import"./useSuspenseInfiniteQuery-DP1_6mso.js";import"./file-type-icon-hf5iGs8U.js";import"./use-org-fs-BruBSf1P.js";import"./checkbox-1mSDcatb.js";import"./search-input-DXojQXHS.js";import"./use-mcp-auth-status-CqBzsTJX.js";import"./use-mcp-prompts-BmY4-dHy.js";import"./utils-CVEq3hMx.js";import"./switch-C2mEXqfo.js";import"./popover-UZd_hI6l.js";import"./scroll-area-BOuDQrjF.js";import"./optimistic-project-sidebar-views-6bEngMBF.js";import"./virtual-mcp-eMBT1Rwh.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-DghVxrjs.js";import"./use-secrets-Dut38iEG.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const g=l("/shell/$org/org-shell/agent-shell/projects/$agentId/views/$viewId");function w(){const t=s.c(7),{agentId:o,viewId:i}=g.useParams(),a=f(o);let m;t[0]!==a?.metadata?.ui?.layout?.tabs||t[1]!==i?(m=a?.metadata?.ui?.layout?.tabs?.find(n=>n.id===i),t[0]=a?.metadata?.ui?.layout?.tabs,t[1]=i,t[2]=m):m=t[2];const r=m;let p;return t[3]!==o||t[4]!==r||t[5]!==i?(p=r?e.jsx(c,{connectionId:r.view.appId,toolName:r.id,args:r.view.args},i):e.jsx(d,{virtualMcpId:o}),t[3]=o,t[4]=r,t[5]=i,t[6]=p):p=t[6],p}function Zo(){const t=s.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(u.Content,{children:e.jsx(w,{})}),t[0]=o):o=t[0],o}export{Zo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as l,N as d,Y as p,_ as m}from"./index-
|
|
1
|
+
import{c as g,j as l,N as d,Y as p,_ as m}from"./index-CRbDzsEl.js";import{u as f}from"./use-main-panel-tabs-Cal5VUTK.js";import{a as I}from"./thread-route-gGOzpjkp.js";import{r as h}from"./use-panel-navigate-sjPSBICL.js";const v=m("/shell/$org/org-shell/agent-shell/projects/$agentId");function P(o){const e=g.c(6),{children:u,tabId:c}=o,s=v.useParams(),t=s.agentId,n=I();let a;e[0]!==t||e[1]!==n?(a={virtualMcpId:t,taskId:n},e[0]=t,e[1]=n,e[2]=a):a=e[2];const{activeTab:i}=f(a);if(c==="code"?i==="code"||i.startsWith("code:"):i===c)return u;let r;return e[3]!==t||e[4]!==s.org?(r=l.jsx(d,{to:p.settings,params:{org:s.org,agentId:t},search:R,replace:!0}),e[3]=t,e[4]=s.org,e[5]=r):r=e[5],r}function R(o){return h({previous:o,destination:"agent"})}export{P as A};
|