decocms 4.514.5 → 4.515.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/ActiveShapeUtils-B2LFrfRE.js +1 -0
- package/dist/client/assets/{AlertCircle-xI8XX-bi.js → AlertCircle-BEMVsPah.js} +1 -1
- package/dist/client/assets/AreaChart-D7ncnKTv.js +1 -0
- package/dist/client/assets/{ArrowLeft-BKYzlDQY.js → ArrowLeft-BeJK1krP.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cq3iZIwL.js → ArrowUp-CDPrL6Uz.js} +1 -1
- package/dist/client/assets/BarChart-D63RTQYz.js +1 -0
- package/dist/client/assets/{Building02-C9KWPxlH.js → Building02-BFpUButr.js} +1 -1
- package/dist/client/assets/CartesianChart-Cm278fbS.js +1 -0
- package/dist/client/assets/{CategoricalChart-DkwWvFDx.js → CategoricalChart-CNYNt0vK.js} +2 -2
- package/dist/client/assets/{CheckCircle-D30wPP6A.js → CheckCircle-Iq3Q6LLh.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CknWVrzo.js → ChevronSelectorVertical-02lw_CbG.js} +1 -1
- package/dist/client/assets/{ChevronUp-CFN68hLk.js → ChevronUp-DeTPLyaf.js} +1 -1
- package/dist/client/assets/{Copy01-C73PJJxr.js → Copy01-DQtv3upd.js} +1 -1
- package/dist/client/assets/{CreditCard01-C8DlQ7Ge.js → CreditCard01-4SHg1t_a.js} +1 -1
- package/dist/client/assets/{DotsVertical-BvyfZIer.js → DotsVertical-Drns5Frs.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Bhpq3Y0r.js → ErrorBarContext-BkdZvkoD.js} +1 -1
- package/dist/client/assets/{Globe04-CVLAzwjm.js → Globe04-BXpRk-hX.js} +1 -1
- package/dist/client/assets/{Image01-DowwsvYG.js → Image01-1LQuy0wG.js} +1 -1
- package/dist/client/assets/{Key01-rbnGMz2E.js → Key01-CoFqvDTW.js} +1 -1
- package/dist/client/assets/{Link01-DRsKyIm5.js → Link01-DU3-3Ipb.js} +1 -1
- package/dist/client/assets/{LinkBroken01-ZRquEJUl.js → LinkBroken01-h_HqMIlK.js} +1 -1
- package/dist/client/assets/{Minus-DPDq6KAA.js → Minus-DpXFgo6a.js} +1 -1
- package/dist/client/assets/{Monitor01-DMME8GIo.js → Monitor01-BbCpGNqh.js} +1 -1
- package/dist/client/assets/{Play-c6bc1b3-.js → Play-C8EB0NeI.js} +1 -1
- package/dist/client/assets/{Plus-xabrshQG.js → Plus-DPS97GtY.js} +1 -1
- package/dist/client/assets/ReferenceLine-zJMNrbMl.js +1 -0
- package/dist/client/assets/{SearchMd-BODiv7c9.js → SearchMd-5E3M_LtW.js} +1 -1
- package/dist/client/assets/Sector-Chcdibol.js +28 -0
- package/dist/client/assets/{ShoppingBag01-DAjyOiiw.js → ShoppingBag01-BlUZ1Giu.js} +1 -1
- package/dist/client/assets/{Sun-BqmeoxcG.js → Sun-Bt6BixS7.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CESO3nxl.js → SwitchHorizontal01-BLJAU7vB.js} +1 -1
- package/dist/client/assets/{Tool01-BGL2Qt57.js → Tool01-DhUw9Xii.js} +1 -1
- package/dist/client/assets/{Trash01-Cf6bGuCZ.js → Trash01-y0tx6OKR.js} +1 -1
- package/dist/client/assets/{Upload01-ZLE7vfB9.js → Upload01-BT7hKOY8.js} +1 -1
- package/dist/client/assets/{User01-Cfg0yVvz.js → User01-Dtm_f3tA.js} +1 -1
- package/dist/client/assets/{UserSquare-DJngEPjS.js → UserSquare-DWYhjY7l.js} +1 -1
- package/dist/client/assets/{Users01-vn3EOu8A.js → Users01-DE8h5H5p.js} +1 -1
- package/dist/client/assets/{XClose-CdzjyNb0.js → XClose-sbj0sr-y.js} +1 -1
- package/dist/client/assets/{ZoomOut-B55seUHX.js → ZoomOut-Ult5yHk2.js} +1 -1
- package/dist/client/assets/{access-gate-CgSSvGG3.js → access-gate-C5s_nhLu.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-O4xCe9BP.js → add-connection-dialog-BbC6Awnv.js} +1 -1
- package/dist/client/assets/agent-analytics-DkajWLZM.js +2 -0
- package/dist/client/assets/agent-app-3J3u6Y8o.js +1 -0
- package/dist/client/assets/agent-assets-arexmZYy.js +1 -0
- package/dist/client/assets/{agent-automation-DBMflQw2.js → agent-automation-CJwaiyVY.js} +1 -1
- package/dist/client/assets/agent-automations-Cgl9-uX7.js +1 -0
- package/dist/client/assets/agent-calendar-CcJ-9tHm.js +1 -0
- package/dist/client/assets/{agent-connect-sources-CX6V3W-l.js → agent-connect-sources-BSWyCv4T.js} +1 -1
- package/dist/client/assets/agent-deck-D77BlzDi.js +1 -0
- package/dist/client/assets/agent-e2e-BZnv0041.js +1 -0
- package/dist/client/assets/agent-experiments-DU-xnevM.js +1 -0
- package/dist/client/assets/agent-file-CEbVOehe.js +1 -0
- package/dist/client/assets/agent-hosting-CLRf1egV.js +1 -0
- package/dist/client/assets/{agent-icon-c0hRUHIU.js → agent-icon-BLy2WH4s.js} +1 -1
- package/dist/client/assets/agent-library-CHysr2dn.js +1 -0
- package/dist/client/assets/agent-library-file-DCoIJ_Vl.js +1 -0
- package/dist/client/assets/agent-monitor-D4SI9Y1m.js +1 -0
- package/dist/client/assets/{agent-overview-C0WObUrB.js → agent-overview-DeQq_tHv.js} +1 -1
- package/dist/client/assets/agent-releases-Cp26QvMd.js +2 -0
- package/dist/client/assets/agent-settings-Bd8cfGLd.js +1 -0
- package/dist/client/assets/agent-site-editor-code-CGFxlenC.js +2 -0
- package/dist/client/assets/agent-site-editor-content-O4R-vecW.js +1 -0
- package/dist/client/assets/agent-site-editor-pMTgGoBo.js +16 -0
- package/dist/client/assets/agent-site-editor-preview-CCdH77a2.js +1 -0
- package/dist/client/assets/agent-view-COR3ZSfj.js +1 -0
- package/dist/client/assets/{agent-view-guard-CY0RZ3mz.js → agent-view-guard-26j3Evt5.js} +1 -1
- package/dist/client/assets/{agents-list-lrkIUH1p.js → agents-list-Dcd5sOX1.js} +1 -1
- package/dist/client/assets/{ai-providers-BJRpwnf3.js → ai-providers-C2RBL7tG.js} +2 -2
- package/dist/client/assets/alert-BV79ffMP.js +1 -0
- package/dist/client/assets/{alert-dialog-M8Y0zqSA.js → alert-dialog-BILupwtl.js} +3 -3
- package/dist/client/assets/analytics-sections-Wnoh3PYg.js +1 -0
- package/dist/client/assets/api-keys-BO3F5W2N.js +1 -0
- package/dist/client/assets/{api-keys-BuJhmHVr.js → api-keys-Drifqas3.js} +1 -1
- package/dist/client/assets/app-editor-DkKkzh3V.js +1 -0
- package/dist/client/assets/{asset-utils-D4ZYWTsd.js → asset-utils-CV_m_T7Z.js} +1 -1
- package/dist/client/assets/{auth-CJCUdDnK.js → auth-B7U7Hff4.js} +1 -1
- package/dist/client/assets/{auth-catchall-PMDrOrh4.js → auth-catchall-BM3zBwm1.js} +1 -1
- package/dist/client/assets/{auth-entry-D45yK4lP.js → auth-entry-BdihVcdH.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BeoAmW98.js → auth-split-layout-CPsRiXhM.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D7W1mkzH.js → authenticate-and-persist-oauth-UvzpQNLL.js} +1 -1
- package/dist/client/assets/automation-list-row-CmreC44g.js +1 -0
- package/dist/client/assets/{automation-runs-7CDwsw1m.js → automation-runs-Ubm7wrw7.js} +1 -1
- package/dist/client/assets/{automations-DpOWGNx_.js → automations-ZAC4-o9b.js} +1 -1
- package/dist/client/assets/{autosend-BiXCzDoT.js → autosend-DEKkS89d.js} +1 -1
- package/dist/client/assets/{avatar-CVrfZDpI.js → avatar-BaUatl4r.js} +1 -1
- package/dist/client/assets/badge-BDrcnhS0.js +1 -0
- package/dist/client/assets/{block-document-EFEgqy7V.js → block-document-DWpcrKxc.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-FfAtB7Mh.js → blocks-preview-workspace-context-CNobOsoP.js} +1 -1
- package/dist/client/assets/blocks-tab-states-5KLuOsbu.js +1 -0
- package/dist/client/assets/blog-schema-BKkPmh2I.js +1 -0
- package/dist/client/assets/{buckets-EuucCx-Z.js → buckets-CfPMmliP.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-0HVt3TgE.js → build-improve-prompt-doc-DJbnBElj.js} +1 -1
- package/dist/client/assets/{calendar-B3WUDV6V.js → calendar-CCVXvCMs.js} +1 -1
- package/dist/client/assets/campaigns-view-CacWid3q.js +1 -0
- package/dist/client/assets/{capability-load-error-CaA022rx.js → capability-load-error-C-qrhNhU.js} +1 -1
- package/dist/client/assets/category-editor-CcRf7L2l.js +1 -0
- package/dist/client/assets/{chart-B6d33H1D.js → chart-gMXBaCie.js} +1 -1
- package/dist/client/assets/{chat-context-BnuwMOfj.js → chat-context-NcP7iS0u.js} +6 -6
- package/dist/client/assets/{chat-draft-D3EwPWFD.js → chat-draft-MYleVoub.js} +1 -1
- package/dist/client/assets/{checkbox-Dla8kRWj.js → checkbox-TbFNti2k.js} +1 -1
- package/dist/client/assets/{choose-editor-CFsJlwqs.js → choose-editor-CDZ08K_i.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DADJ0ld_.js → cli-auth-success-DMlxLLEu.js} +1 -1
- package/dist/client/assets/{client-icons-M2KssD4J.js → client-icons-DolqWn8Q.js} +1 -1
- package/dist/client/assets/cms-settings-editor-D03L9L4-.js +1 -0
- package/dist/client/assets/{collapsible-BWjY8cOG.js → collapsible-DvAZmEoh.js} +1 -1
- package/dist/client/assets/collection-detail-CQ4bhfmW.js +1 -0
- package/dist/client/assets/{collection-display-button-DcSGVqBT.js → collection-display-button-DTfH30As.js} +1 -1
- package/dist/client/assets/{collection-search-C0nHL4Zi.js → collection-search-C00LN-O5.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BqLbzGMr.js → collection-table-wrapper-DOUS3XlF.js} +1 -1
- package/dist/client/assets/{collection-tabs-DJst1PBn.js → collection-tabs-BjFLrDhl.js} +1 -1
- package/dist/client/assets/{column-rules-C6rmmvcZ.js → column-rules-13kfrugr.js} +1 -1
- package/dist/client/assets/{combobox-DJtWtG8e.js → combobox-CaB-y5Ze.js} +1 -1
- package/dist/client/assets/{coming-soon-page-CycWyIEs.js → coming-soon-page-Cyxpb_RU.js} +1 -1
- package/dist/client/assets/{command-DQxPvzO0.js → command-DF9CyXTP.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BaIOrb8k.js → companion-mcps-section-D4tO5Rpb.js} +1 -1
- package/dist/client/assets/{config-0dQr8OOs.js → config-BpbgNSKK.js} +1 -1
- package/dist/client/assets/{connect-AQ7wxQDD.js → connect-R8YgYoXN.js} +3 -3
- package/dist/client/assets/{connect-layout-CsBnyYo4.js → connect-layout-DCuq7jhf.js} +1 -1
- package/dist/client/assets/{connection-B5x-rxzp.js → connection-CynHS3Ve.js} +1 -1
- package/dist/client/assets/{connection-card-CFqu0_G8.js → connection-card-DWCHVdl-.js} +1 -1
- package/dist/client/assets/{connection-detail-B_xaSLIN.js → connection-detail-BvRd_OKE.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CouK82td.js → connection-form-helpers-Dta5jpsZ.js} +1 -1
- package/dist/client/assets/{connections-CrdtyJFL.js → connections-DhBzJz3R.js} +1 -1
- package/dist/client/assets/content-tab-COTFxvxm.js +22 -0
- package/dist/client/assets/context-DDY4mKfD.js +1 -0
- package/dist/client/assets/{context-menu-CI-AryjZ.js → context-menu-CUU-6Ui3.js} +1 -1
- package/dist/client/assets/{context-shell-BsFUt-ob.js → context-shell-CPsWfJ_3.js} +3 -3
- package/dist/client/assets/{core.esm-DOdwJCI5.js → core.esm-C0uaMHhK.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CDMsJ1wq.js → create-organization-dialog-DaLRO9Sp.js} +1 -1
- package/dist/client/assets/{daily-pulse-A6lEoniM.js → daily-pulse-DKIjgibs.js} +1 -1
- package/dist/client/assets/date-utils-CrvIKg-s.js +1 -0
- package/dist/client/assets/{discover-JQgSyvWz.js → discover-INKGTCGz.js} +1 -1
- package/dist/client/assets/{domain-settings-CNG0968P.js → domain-settings-DL4imbgg.js} +1 -1
- package/dist/client/assets/{drawer-CEiS53oX.js → drawer-CER6tItd.js} +1 -1
- package/dist/client/assets/{editor-DWhRi1_f.js → editor-DiFOLDbd.js} +1 -1
- package/dist/client/assets/{editor-classes-CZOMDDcn.js → editor-classes-BxczJlTk.js} +1 -1
- package/dist/client/assets/{empty-state-B1xpK558.js → empty-state-CEkcxXyE.js} +1 -1
- package/dist/client/assets/{empty-state-BoFIIv2e.js → empty-state-Cfwlgj7K.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-CdB5dK1A.js +1 -0
- package/dist/client/assets/{extract-connection-data-CUvLfXNU.js → extract-connection-data-CnU07SX8.js} +1 -1
- package/dist/client/assets/{feature-gate-B9a4dBc0.js → feature-gate-Dnbny2HW.js} +1 -1
- package/dist/client/assets/{feature-paywall-DINMFUUx.js → feature-paywall-DruRkOvJ.js} +1 -1
- package/dist/client/assets/{file-explorer-2Z0Qhvp_.js → file-explorer-CsrTcKv1.js} +1 -1
- package/dist/client/assets/{file-preview-BFXgyqHl.js → file-preview-CUN1OHJ7.js} +1 -1
- package/dist/client/assets/{file-share-button-BIOHr9Xv.js → file-share-button-CEf0dwMj.js} +2 -2
- package/dist/client/assets/{file-type-icon-Ez8-DRHg.js → file-type-icon-etYEFstF.js} +1 -1
- package/dist/client/assets/{folder-icon-JgTmBbpC.js → folder-icon-8MGsFr-_.js} +2 -2
- package/dist/client/assets/{form-Bdh0vUeg.js → form-xTDgq-Tg.js} +1 -1
- package/dist/client/assets/{general-Dvy5SU0P.js → general-DKLM5WXB.js} +1 -1
- package/dist/client/assets/{home-UtAOwZ_a.js → home-iGYybPDR.js} +1 -1
- package/dist/client/assets/hosted-publish-api-BTYW-kmo.js +1 -0
- package/dist/client/assets/hosted-publish-feedback-DYVOaPsn.js +1 -0
- package/dist/client/assets/{icon-button-Dg2jSe-y.js → icon-button-Ht6P9npC.js} +1 -1
- package/dist/client/assets/{index-CrgWXxvo.js → index-1zZevs0I.js} +1 -1
- package/dist/client/assets/{index-1XeDvVO_.js → index-9equ5l6t.js} +1 -1
- package/dist/client/assets/{index-DxbCP5B6.js → index-B3yMIi0G.js} +1 -1
- package/dist/client/assets/index-BFqmRsAP.js +4 -0
- package/dist/client/assets/{index-DYLyKNcw.js → index-BbK9DXkK.js} +1 -1
- package/dist/client/assets/{index-DincrG3Y.js → index-Br0aaVqT.js} +3 -3
- package/dist/client/assets/{index-ILRCn1qM.js → index-CLvpgcGt.js} +6 -6
- package/dist/client/assets/{index-CXeJCI0G.js → index-CNohvsnC.js} +1 -1
- package/dist/client/assets/{index-_y92DzgS.js → index-D32uzOTA.js} +1 -1
- package/dist/client/assets/{index-7svLQYvL.js → index-DFJe-l7D.js} +1 -1
- package/dist/client/assets/{index-DKOhwHAG.js → index-DKwDh9fC.js} +1 -1
- package/dist/client/assets/{index-DcU2uHG-.js → index-DQaJBLJ-.js} +54 -54
- package/dist/client/assets/index-EoMx4WDO.css +1 -0
- package/dist/client/assets/{index-WjQsIrkp.js → index-IRwT0rOS.js} +1 -1
- package/dist/client/assets/{index-6B342dVL.js → index-TESbMzS4.js} +1 -1
- package/dist/client/assets/{index-De44zW_k.js → index-hUmTzopE.js} +1 -1
- package/dist/client/assets/{index-redirect-BHJ13xlS.js → index-redirect-WdHUcKlN.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-P7ZNg4ZF.js → infiniteQueryObserver-Bia8aY1D.js} +1 -1
- package/dist/client/assets/infra-billing-CANL7vGd.js +1 -0
- package/dist/client/assets/{input-pg_Munw1.js → input-DQpuKkGH.js} +7 -7
- package/dist/client/assets/{input-HXHaYrka.js → input-rj9iyl8c.js} +1 -1
- package/dist/client/assets/{integration-icon-aeIvRSnw.js → integration-icon-BADY30E3.js} +1 -1
- package/dist/client/assets/{jira-icon-CZLCmGol.js → jira-icon-Bg6wm7Rh.js} +1 -1
- package/dist/client/assets/{label-DDPD5LQh.js → label-DwAqZKXh.js} +1 -1
- package/dist/client/assets/{layout-DGYUOV2D.js → layout-BS48rV-R.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-B3GKD6WQ.js → legacy-agents-deep-BsgIlRpK.js} +1 -1
- package/dist/client/assets/legacy-main-redirect-CpUMHeOI.js +1 -0
- package/dist/client/assets/library-D-XIUCN0.js +1 -0
- package/dist/client/assets/{login-syjpZA32.js → login-Bx_Dj1KX.js} +1 -1
- package/dist/client/assets/{markdown-1PeXOKNt.js → markdown-DCFmpcRh.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DTPlWHGT.js → mcp-app-renderer-DlDykQO4.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DP6VNnFQ.js → mcp-oauth-BV1FnXP9.js} +1 -1
- package/dist/client/assets/{mcp-oauth-xBzZujQ_.js → mcp-oauth-DHudAstl.js} +1 -1
- package/dist/client/assets/{members-uR8n9Rms.js → members-lS9QzMri.js} +1 -1
- package/dist/client/assets/{memory-BYqDBVHV.js → memory-Dt2VdoJi.js} +2 -2
- package/dist/client/assets/{mini-report-page-D7tpDtif.js → mini-report-page-SkCZ-B7b.js} +1 -1
- package/dist/client/assets/{mock-board-BOSDq94-.js → mock-board-b5JcXuBT.js} +3 -3
- package/dist/client/assets/{monaco-editor-e80GuCNv.js → monaco-editor-B77kgSL6.js} +2 -2
- package/dist/client/assets/monitoring-CN_CCaIK.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-94Mta4Nq.js → monitoring-stats-row-DfhuiMFd.js} +1 -1
- package/dist/client/assets/{multi-select-CmbGOwtN.js → multi-select-BcTcaQtg.js} +1 -1
- package/dist/client/assets/mustache-B1PzKbLg.js +4 -0
- package/dist/client/assets/named-rule-uses-l2kNdc58.js +1 -0
- package/dist/client/assets/named-rule-view-VDvju2NZ.js +1 -0
- package/dist/client/assets/{new-project-dialog-ShudNZIG.js → new-project-dialog-C1yGAeBD.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DQtTsT-Q.js → oauth-callback-ai-provider-CSn2MVuO.js} +1 -1
- package/dist/client/assets/{oauth-callback-CuZCWVkp.js → oauth-callback-d5bTE61x.js} +1 -1
- package/dist/client/assets/{onboarding-BYvWDC_s.js → onboarding-DMAd7boI.js} +1 -1
- package/dist/client/assets/{openai-conversation-DgaJVito.js → openai-conversation-DVrrnMH9.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-CKzSSiC-.js → optimistic-project-sidebar-views-NiW-ZsA6.js} +1 -1
- package/dist/client/assets/order-monitor-day-D1J-iu59.js +1 -0
- package/dist/client/assets/{organization-choice-D_5aYbIz.js → organization-choice-DtzDl4nE.js} +1 -1
- package/dist/client/assets/{orgs-CN3Yh6bp.js → orgs-CvRk7OxE.js} +1 -1
- package/dist/client/assets/page-seo-form-YDVeWiAp.js +1 -0
- package/dist/client/assets/{pair-Cn70Tm81.js → pair-u6RslQ29.js} +7 -7
- package/dist/client/assets/parse-sections-CBNQNauq.js +1 -0
- package/dist/client/assets/plan-Cs9I3MbI.js +1 -0
- package/dist/client/assets/{plan-ladder-D5aCNSRy.js → plan-ladder-DF2W1fWC.js} +1 -1
- package/dist/client/assets/{popover-CVCbWisj.js → popover-BOhP5vgB.js} +1 -1
- package/dist/client/assets/post-calendar-T4dPJKYM.js +1 -0
- package/dist/client/assets/post-editor-D7KyvZ7t.js +2 -0
- package/dist/client/assets/{preview-content-Bin2hNFJ.js → preview-content-DVXm4Z8s.js} +1 -1
- package/dist/client/assets/{preview-dialog-Fls4giAH.js → preview-dialog-WEx44iRd.js} +1 -1
- package/dist/client/assets/{preview-panel-BPPH_1cI.js → preview-panel-D0nsWsZH.js} +1 -1
- package/dist/client/assets/preview-tab-Dl6aDnQL.js +551 -0
- package/dist/client/assets/product-picker-dialog-BhbqLRJa.js +1 -0
- package/dist/client/assets/{profile-BZA6I0p4.js → profile-DlCjy7UA.js} +1 -1
- package/dist/client/assets/{project-app-view-B2uzp3zO.js → project-app-view-D5kv8H-C.js} +1 -1
- package/dist/client/assets/project-apps-BkYCf7yh.js +1 -0
- package/dist/client/assets/{project-feed-CxXgvjMu.js → project-feed-CnSoTeWf.js} +1 -1
- package/dist/client/assets/{project-icon-Dy5ndHVf.js → project-icon-DeQ6esGK.js} +1 -1
- package/dist/client/assets/project-reports-DQYEQVTh.js +1 -0
- package/dist/client/assets/project-tasks-CyVxacvN.js +1 -0
- package/dist/client/assets/{projects-6tFWscR3.js → projects-B8yQNAzt.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B25sfM8y.js → projects-empty-state-BeIkadaG.js} +1 -1
- package/dist/client/assets/{prompts-C8y9cYvX.js → prompts-GMn4cz1Q.js} +1 -1
- package/dist/client/assets/record-editor-CI7K6OM1.js +1 -0
- package/dist/client/assets/redirect-editor-B5L_G5_H.js +1 -0
- package/dist/client/assets/releases-api-r2wwTMcb.js +1 -0
- package/dist/client/assets/{reports-DZf5GwgJ.js → reports-BSyJkGbx.js} +1 -1
- package/dist/client/assets/reports-DceQf3hD.js +1 -0
- package/dist/client/assets/{reports-onboarding-Ba6c9nYx.js → reports-onboarding-DTyYEPnh.js} +1 -1
- package/dist/client/assets/reports-tab-DhZyGBNJ.js +2 -0
- package/dist/client/assets/repositories-1ckAW2Cr.js +1 -0
- package/dist/client/assets/{repositories-D_HBag21.js → repositories-DTzcHO2P.js} +1 -1
- package/dist/client/assets/{repository-binding-B-JblZ3B.js → repository-binding-WIxmR2C2.js} +1 -1
- package/dist/client/assets/{repository-import-picker-Aq7ItYog.js → repository-import-picker-Bwaz_IkW.js} +1 -1
- package/dist/client/assets/{repository-picker-CigkRPj6.js → repository-picker-C_FPAS2a.js} +1 -1
- package/dist/client/assets/{require-capability-fF33BjRE.js → require-capability-zDRexzvJ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-n4GqwjUS.js → required-auth-layout-C9RNRyLG.js} +1 -1
- package/dist/client/assets/{reset-password-FYcr_EOZ.js → reset-password-D5Z9Z_ZV.js} +1 -1
- package/dist/client/assets/{resizable-B1jyEV0m.js → resizable-rv6DYDSR.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-CDRcFoik.js +1 -0
- package/dist/client/assets/{review-settings-w0gSi3zN.js → review-settings-BOEOAp5O.js} +1 -1
- package/dist/client/assets/{roles-CD7KBus5.js → roles-CvRMacB_.js} +1 -1
- package/dist/client/assets/route-BrdNU9FL.js +1 -0
- package/dist/client/assets/route-CYnJcvFb.js +1 -0
- package/dist/client/assets/route-HQBi1e9d.js +1 -0
- package/dist/client/assets/runnable-block-editor-B9jSPnPq.js +20 -0
- package/dist/client/assets/{sandbox-git-api-CRxdlhrN.js → sandbox-git-api-CH_-QFpD.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Cyz-VR-q.js → sandbox-lifecycle-context-aKdVFwPA.js} +1 -1
- package/dist/client/assets/{schema-DTqdooJM.js → schema-C0M6s76A.js} +1 -1
- package/dist/client/assets/{schema-Jt-SHSRj.js → schema-CtKRQiER.js} +1 -1
- package/dist/client/assets/{scroll-area-DowOzl5a.js → scroll-area-L8VlxVDv.js} +1 -1
- package/dist/client/assets/{search-input-C77c23a_.js → search-input-BCaqzpfC.js} +1 -1
- package/dist/client/assets/{search-toggle-BqUvwbnO.js → search-toggle-BAKgZCht.js} +1 -1
- package/dist/client/assets/{secret-picker-D6q2PbZG.js → secret-picker-Ciz2Oc6M.js} +1 -1
- package/dist/client/assets/{secrets-C6FiSzJz.js → secrets-DWM0UMVi.js} +1 -1
- package/dist/client/assets/{sections-uFSvOb1s.js → sections-DM2-ez5A.js} +1 -1
- package/dist/client/assets/sections-editor-Cs3VV_t6.js +4 -0
- package/dist/client/assets/{select-B47VUguS.js → select-3Bvf55R2.js} +1 -1
- package/dist/client/assets/{select-model-B0eE99E3.js → select-model-BrppT0xN.js} +1 -1
- package/dist/client/assets/seo-editor-qr_EWKDI.js +1 -0
- package/dist/client/assets/{separator-tMi_6w_o.js → separator-BARWlQZQ.js} +1 -1
- package/dist/client/assets/settings-tab-BX9Vfre3.js +1 -0
- package/dist/client/assets/{sheet-R9Pr50Sb.js → sheet-BKZqYlDG.js} +1 -1
- package/dist/client/assets/shell-layout-iu5E7VAW.js +1 -0
- package/dist/client/assets/site-draft-actions-01MQ6c7Q.js +12 -0
- package/dist/client/assets/site-draft-view-D-xycIA0.js +2 -0
- package/dist/client/assets/site-editor-CF4F4ijZ.js +1 -0
- package/dist/client/assets/{skills-DTPuV4HK.js → skills-B3sr04ZB.js} +1 -1
- package/dist/client/assets/slider-f1cHo-xI.js +1 -0
- package/dist/client/assets/{sortable.esm-7lfZBBX2.js → sortable.esm-B_g_IXou.js} +1 -1
- package/dist/client/assets/{sso-lvoln_ad.js → sso-8XgQMaoN.js} +1 -1
- package/dist/client/assets/{suggestion-D_Z3LuMt.js → suggestion-B-6wzPND.js} +2 -2
- package/dist/client/assets/{switch-BQFbXMA-.js → switch-CZd0EYW9.js} +1 -1
- package/dist/client/assets/{symbol-CIh5AfyD.js → symbol-BY53tx69.js} +1 -1
- package/dist/client/assets/{synced-repos-DQxi8k5O.js → synced-repos-CWNIOZxK.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B2rDBqdy.js → tab-icon-glyph-40t6GZmc.js} +1 -1
- package/dist/client/assets/{table-DuCeyVXY.js → table-DDQzGcYG.js} +1 -1
- package/dist/client/assets/{tabs-CJ70csAp.js → tabs-BOwO3aPj.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-vyXzgPAK.js → task-assignee-avatar-mmHhkk0_.js} +1 -1
- package/dist/client/assets/{task-board-CSpxMIw7.js → task-board-S0qduW2n.js} +1 -1
- package/dist/client/assets/{task-route-CeJ19bNy.js → task-route-BCl-VxJy.js} +1 -1
- package/dist/client/assets/{task-status-CFz3dyVR.js → task-status-CNAd19KA.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CfseXo9_.js → taskboard-analytics-BNfa4eCu.js} +1 -1
- package/dist/client/assets/tasks-CtYqrb00.js +1 -0
- package/dist/client/assets/{tasks-C3liOhO2.js → tasks-Cz1AP9M-.js} +3 -3
- package/dist/client/assets/{textarea-BDWvYouR.js → textarea-CGkc_NoY.js} +1 -1
- package/dist/client/assets/{thread-analytics-Bp5Zz9ej.js → thread-analytics-CHcQ4J9G.js} +1 -1
- package/dist/client/assets/{thread-intent-DlbBEzNn.js → thread-intent-D02hOLlA.js} +4 -4
- package/dist/client/assets/{thread-route-DsRsjMOv.js → thread-route-BG5FYdPA.js} +1 -1
- package/dist/client/assets/{thread-route-glK7AgQo.js → thread-route-D5TPqP61.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BW8H1wdb.js → thread-sheet-body-B1Y2cEvJ.js} +1 -1
- package/dist/client/assets/time-range-picker-B8MLDnPR.js +1 -0
- package/dist/client/assets/toggle-group-5-dW1fE5.js +1 -0
- package/dist/client/assets/{tool-namespace-FeAXQzXg.js → tool-namespace-_uAlvwp8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CTGjpqPD.js → toolbar-icon-button-BQvi-WW6.js} +1 -1
- package/dist/client/assets/{tooltip-BqHx2R4U.js → tooltip-CT8p-4e_.js} +1 -1
- package/dist/client/assets/tooltipContext-BqyDyVHC.js +1 -0
- package/dist/client/assets/{track-vnmuUrPF.js → track-wHia_J2E.js} +1 -1
- package/dist/client/assets/{types-Cj3BjtjJ.js → types-CKfFy-n_.js} +6 -6
- package/dist/client/assets/{url-slug-DfovzTSP.js → url-slug-BMSyCRIK.js} +1 -1
- package/dist/client/assets/{usage-stats-DcyLnEOC.js → usage-stats-tSDvCF_c.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DugUJNG4.js → use-ai-providers-D5-3qHgJ.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-BuleRH2R.js +1 -0
- package/dist/client/assets/{use-automations-Dhy5bAQi.js → use-automations-DL7E2sXy.js} +1 -1
- package/dist/client/assets/{use-autosave-BKifxWxQ.js → use-autosave-Bga6Lczj.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CqPKeLYn.js → use-chat-layout-state-CrK3t-li.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CbuQEbGd.js → use-clock-tick-Dt0Rxdj9.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BBUs22Yl.js → use-connect-companion-BQ6P9NqQ.js} +1 -1
- package/dist/client/assets/{use-connection-Dj54skEw.js → use-connection-DEU6cL_M.js} +1 -1
- package/dist/client/assets/use-content-sync-78T7URzs.js +1 -0
- package/dist/client/assets/{use-copy-K9rQ1PJH.js → use-copy-Lp25RdQW.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-B5688LVi.js +1 -0
- package/dist/client/assets/{use-date-fns-locale-CEVf4Ifn.js → use-date-fns-locale-DzYqNQVc.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D0TGgFvB.js → use-debounced-autosave-B-FheggT.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CDunmz6Z.js → use-debounced-value-DnWAg7xS.js} +1 -1
- package/dist/client/assets/{use-deco-credits-orVqTX6I.js → use-deco-credits-Dcf7REFq.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-TumByBkr.js → use-decopilot-events-HymesIOH.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BllZSjRL.js → use-delete-connection-GE6V1LSr.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BBVz6SL_.js → use-deployment-admin-BMcEtHAq.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-CCAgHiPb.js +1 -0
- package/dist/client/assets/{use-file-configs-BFq_wpSt.js → use-file-configs-C3GELqZ9.js} +1 -1
- package/dist/client/assets/{use-inbox-feed--WBiu__i.js → use-inbox-feed-60_eEWEx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-7dT9x3fg.js → use-infinite-scroll-CktyBb0n.js} +1 -1
- package/dist/client/assets/{use-join-requests-ilYuD6XT.js → use-join-requests-Daf7hgc3.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-zwxUbRsW.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-2A9iou5g.js → use-mcp-auth-status-Ckh_s_m-.js} +1 -1
- package/dist/client/assets/use-mcp-client-BjCYOtMv.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-JJb6q8dH.js → use-mcp-prompts-D4ntfVw2.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BwuN38Gh.js → use-mcp-tools-BQ-vDoB-.js} +1 -1
- package/dist/client/assets/{use-members-CzSQTDAS.js → use-members-BKwSn6l-.js} +1 -1
- package/dist/client/assets/{use-mobile-BfmJV4wy.js → use-mobile-exvgjs5E.js} +1 -1
- package/dist/client/assets/use-move-blocks-jGxZ60KS.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-D05JNc-L.js → use-navigate-to-agent-CoDY7b67.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-pmLoKOyH.js → use-open-billing-url-gwWm2_gZ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-fPRUht_a.js → use-org-auth-client-D2nGERnL.js} +1 -1
- package/dist/client/assets/{use-org-fs-D82Vx4hB.js → use-org-fs-DsXUzUGl.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CD8TZnkH.js → use-org-repo-syncs-DTcvfXwj.js} +1 -1
- package/dist/client/assets/{use-org-sso-ClJ8vn5f.js → use-org-sso-BmpgR8iH.js} +1 -1
- package/dist/client/assets/{use-organization-roles-iaQivkLI.js → use-organization-roles-C9fRnsAm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DFkNTsS0.js → use-organization-settings-B5bwnmIE.js} +1 -1
- package/dist/client/assets/use-panel-navigate-D1HcWbMf.js +1 -0
- package/dist/client/assets/use-project-native-view-presence-WBIVN5MA.js +1 -0
- package/dist/client/assets/{use-project-scope-CGMALc0e.js → use-project-scope-0viRZIAS.js} +1 -1
- package/dist/client/assets/{use-recent-apps-C1945uiL.js → use-recent-apps-letFJ0RI.js} +1 -1
- package/dist/client/assets/{use-releases-D15mHXXN.js → use-releases-BzfYz1da.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BdbGTuns.js → use-reports-diagnostic-D4yF4iuL.js} +1 -1
- package/dist/client/assets/{use-secrets-DbkATagb.js → use-secrets-DS9zWxiz.js} +1 -1
- package/dist/client/assets/use-section-preview-base-H9VNpzGF.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-BqLmDXCH.js → use-sidebar-collapsed-hUfsznLr.js} +1 -1
- package/dist/client/assets/{use-tags-Cn5U7HDa.js → use-tags-CVvzIGGr.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CftsNPjL.js → use-task-board-analytics-BgxWC82w.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BDk-u9KA.js → use-task-board-events-DBz1fm-T.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CNMGpOwt.js → use-task-board-item-prs-D2PBN926.js} +1 -1
- package/dist/client/assets/{use-task-metadata-0ueqwOxI.js → use-task-metadata-1k4pU8z_.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CgQGRl3S.js → use-thread-analytics-D40j8ndA.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DLitie4Q.js → use-thread-outputs-2XKKA9Gw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-v90E8EIL.js +1 -0
- package/dist/client/assets/{useQueries-BfkCTicr.js → useQueries-DT3VE95i.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BoCx0vyL.js +1 -0
- package/dist/client/assets/{users-BIkPJzOg.js → users-GpxLvhWl.js} +1 -1
- package/dist/client/assets/{utils-Bp3fKbm9.js → utils-CkO9KdKe.js} +2 -2
- package/dist/client/assets/variant-calendar-CrETYYc9.js +1 -0
- package/dist/client/assets/variant-draft-pointer-jrxTxtyS.js +1 -0
- package/dist/client/assets/virtual-mcp-DHPQGUgu.js +1 -0
- package/dist/client/assets/{watch-sse-pool-CrLAsZHh.js → watch-sse-pool-Dc_r60nv.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +684 -684
- package/package.json +1 -1
- package/dist/client/assets/ActiveShapeUtils-CDpScllU.js +0 -1
- package/dist/client/assets/AreaChart-Du66qHXY.js +0 -1
- package/dist/client/assets/BarChart-BXz-bUtC.js +0 -1
- package/dist/client/assets/CartesianChart-BZmgsxge.js +0 -1
- package/dist/client/assets/ReferenceLine-BPq2MnBR.js +0 -1
- package/dist/client/assets/Sector-BraX9V6h.js +0 -28
- package/dist/client/assets/agent-analytics-Biob4Jvo.js +0 -2
- package/dist/client/assets/agent-app-DTwyyqho.js +0 -1
- package/dist/client/assets/agent-assets-DpuZ7qUq.js +0 -1
- package/dist/client/assets/agent-automations-CHJpber1.js +0 -1
- package/dist/client/assets/agent-deck-DRCJIHES.js +0 -1
- package/dist/client/assets/agent-e2e-rlzvrptO.js +0 -1
- package/dist/client/assets/agent-experiments-BzSUejrS.js +0 -1
- package/dist/client/assets/agent-file-pM3fkLSV.js +0 -1
- package/dist/client/assets/agent-hosting-CIblOaW0.js +0 -1
- package/dist/client/assets/agent-library-BF5T38g7.js +0 -1
- package/dist/client/assets/agent-library-file-BTDXrKvZ.js +0 -1
- package/dist/client/assets/agent-monitor-CMU4bHqc.js +0 -1
- package/dist/client/assets/agent-releases-CEAPMdCY.js +0 -2
- package/dist/client/assets/agent-settings-9voN143W.js +0 -1
- package/dist/client/assets/agent-site-editor-WHTbnkdB.js +0 -27
- package/dist/client/assets/agent-site-editor-code-DxTJ31bR.js +0 -2
- package/dist/client/assets/agent-site-editor-content-B8OXp1G1.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Bu7A4U4r.js +0 -1
- package/dist/client/assets/agent-view-DW3bjKRU.js +0 -1
- package/dist/client/assets/alert-J8Wo4iMe.js +0 -1
- package/dist/client/assets/analytics-sections-Crtm-SOa.js +0 -1
- package/dist/client/assets/api-keys-DPclIgvr.js +0 -1
- package/dist/client/assets/app-editor-CWO6RLKf.js +0 -1
- package/dist/client/assets/automation-list-row-CO-7cr0O.js +0 -1
- package/dist/client/assets/badge-ByzdbptS.js +0 -1
- package/dist/client/assets/blocks-tab-states-diUqUrAK.js +0 -20
- package/dist/client/assets/blog-schema-pXyj_uKN.js +0 -1
- package/dist/client/assets/category-editor-16fFMZmU.js +0 -1
- package/dist/client/assets/cms-settings-editor-Cowvog2q.js +0 -1
- package/dist/client/assets/collection-detail-BVMX_w00.js +0 -1
- package/dist/client/assets/content-tab-CTbbT9Kp.js +0 -22
- package/dist/client/assets/context-DwXA-O6V.js +0 -1
- package/dist/client/assets/hosted-publish-feedback-NabikYNC.js +0 -1
- package/dist/client/assets/index-BqS2UmN9.css +0 -1
- package/dist/client/assets/index-CxtzBp5_.js +0 -4
- package/dist/client/assets/infra-billing-kRHrP-RL.js +0 -1
- package/dist/client/assets/legacy-main-redirect-BdnJuiDi.js +0 -1
- package/dist/client/assets/library-DYD_N6_K.js +0 -1
- package/dist/client/assets/monitoring-CgqK6OeU.js +0 -1
- package/dist/client/assets/mustache-Aw4qvxEW.js +0 -4
- package/dist/client/assets/order-monitor-day-CIHUt3pK.js +0 -1
- package/dist/client/assets/page-seo-form-CnjlIIXj.js +0 -1
- package/dist/client/assets/plan-ByMMI8KU.js +0 -1
- package/dist/client/assets/post-calendar-Dq_uFQwi.js +0 -1
- package/dist/client/assets/post-editor-DPLEIDHY.js +0 -2
- package/dist/client/assets/preview-tab-BHT_7Qja.js +0 -551
- package/dist/client/assets/product-picker-dialog-p0Ic9l9I.js +0 -1
- package/dist/client/assets/project-apps-v-sauknl.js +0 -1
- package/dist/client/assets/project-reports-CZJuTnYB.js +0 -1
- package/dist/client/assets/project-tasks-CGicoIeY.js +0 -1
- package/dist/client/assets/record-editor-Bh04Pm0_.js +0 -1
- package/dist/client/assets/redirect-editor-DQhKbdsA.js +0 -1
- package/dist/client/assets/reports-BupQ5Xhd.js +0 -1
- package/dist/client/assets/reports-tab-aEhqa7te.js +0 -2
- package/dist/client/assets/repositories-CEC-SgTJ.js +0 -1
- package/dist/client/assets/resolve-tab-icon-DtNff2Yq.js +0 -1
- package/dist/client/assets/route-Co7AkL50.js +0 -1
- package/dist/client/assets/route-D9eWdPea.js +0 -1
- package/dist/client/assets/route-P4X0mipC.js +0 -1
- package/dist/client/assets/secret-ciphertext-CI3Fu2ro.js +0 -1
- package/dist/client/assets/sections-editor-BgMrH8fq.js +0 -4
- package/dist/client/assets/seo-editor-C-YMij5b.js +0 -1
- package/dist/client/assets/settings-tab-Cp5pryb2.js +0 -1
- package/dist/client/assets/shell-layout-DNfiem0_.js +0 -1
- package/dist/client/assets/site-editor-Dsm_SPF7.js +0 -1
- package/dist/client/assets/site-editor-toast-L4A-Cxh7.js +0 -1
- package/dist/client/assets/slider-B9iKqweT.js +0 -1
- package/dist/client/assets/tasks-DrfrXIxf.js +0 -1
- package/dist/client/assets/time-range-picker-Dm5YljWh.js +0 -1
- package/dist/client/assets/toggle-group-CtPF-F41.js +0 -1
- package/dist/client/assets/tooltipContext-DFq6ns9J.js +0 -1
- package/dist/client/assets/use-content-sync-D4PHTEJr.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-C4gtrY2f.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-6p2QJIdt.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-kHysLFoZ.js +0 -1
- package/dist/client/assets/use-main-schema-v8-Dcb6Yskn.js +0 -1
- package/dist/client/assets/use-mcp-client-ZokR8_74.js +0 -10
- package/dist/client/assets/use-panel-navigate-K8ACrPML.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DJiBua9F.js +0 -1
- package/dist/client/assets/use-section-preview-base-De54Y3vh.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B7za82zu.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B0JY_wMj.js +0 -1
- package/dist/client/assets/variant-calendar-BIblXEHb.js +0 -1
- package/dist/client/assets/variant-draft-pointer-fs9iIwvq.js +0 -1
- package/dist/client/assets/virtual-mcp-CeCtCq_o.js +0 -1
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{c as it,b as Ft,r as R,l as ae,j as i,b5 as Oi,B as _t,U as sn,ag as Li,X as $i,V as zi,a as vo,F as Hi,K as xo,m as Wi,o as qi,h as Gi,t as oe}from"./index-DcU2uHG-.js";import{u as Ui}from"./chat-context-BnuwMOfj.js";import{a5 as Yi,T as Wn,a6 as Ji,a7 as Qi,a8 as Xi,a9 as Zi,aa as ea,ab as ta,ac as Br,ad as na,ae as sa,G as jt,af as wt,ag as ze,ah as ra,H as Fn,E as On,b as oa,j as ia,u as aa,ai as Kr,q as la,aj as ca,s as ua,o as da,ak as yo,p as _n,al as fa,am as ma,A as Fr,an as pa,ao as ha,ap as Bn,aq as Or,ar as Lr,as as $r,at as us,au as ga,av as va,F as xa,aw as zr,ax as ya,ay as Hr,az as Wr,M as Sa,aA as qr,a as ba,aB as Sn,aC as ja,aD as wa,aE as bn,aF as ds}from"./blocks-tab-states-diUqUrAK.js";import{c as _a}from"./repository-binding-B-JblZ3B.js";import{n as ka,t as Ea}from"./ChevronUp-CFN68hLk.js";import{ac as So,b as zn,ar as Ra,G as Aa,a5 as Gr,a1 as Ur}from"./agent-icon-c0hRUHIU.js";import{S as rn}from"./scroll-area-DowOzl5a.js";import{c as kt,T as Et,a as Rt}from"./tooltip-BqHx2R4U.js";import{am as Ca,g as Yr,J as Na,u as Ta,K as Va,w as Ma,ab as Da,x as Pa,d as Pt,f as It,a7 as Ia,ar as Ba}from"./site-editor-toast-L4A-Cxh7.js";import{m as Ka,u as Fa,P as Oa}from"./mustache-Aw4qvxEW.js";import{az as La,k as Rs,aB as bo,H as $a,aC as xt,aD as vs,aE as jo,aj as Gt,a8 as xs,aF as ys,ak as Kt,a9 as on,q as za,t as Ha,g as Wa,x as Kn,ar as qa,ai as jn,aa as fs,ah as Bt,ag as wn,aG as Ga,P as Ua,aH as Ya,al as Jr,a1 as Qr,aI as Ja,aJ as qt,aK as Qa,aL as Xa,aM as Za,aN as Xr,aO as el,aP as tl,aQ as nl,af as sl,aR as rl,aS as ol,aT as il,aU as al,ae as ll,aV as cl}from"./secret-ciphertext-CI3Fu2ro.js";import{a as ul}from"./Copy01-C73PJJxr.js";import{a as Ss,f as wo}from"./UserSquare-DJngEPjS.js";import{i as Zr}from"./Tool01-BGL2Qt57.js";import{s as eo}from"./Image01-DowwsvYG.js";import{s as dl}from"./Plus-xabrshQG.js";import{s as fl}from"./Trash01-Cf6bGuCZ.js";import{i as bs}from"./ZoomOut-B55seUHX.js";import{u as ml,a as to,K as pl,P as hl,b as gl,C as vl,D as xl,c as yl}from"./core.esm-DOdwJCI5.js";import{u as Sl,s as bl,a as Ln,S as jl,v as wl}from"./sortable.esm-7lfZBBX2.js";import{s as _l,g as kl,u as El,A as Rl}from"./use-section-preview-base-De54Y3vh.js";import{A as ms}from"./avatar-CVrfZDpI.js";import{e as Al,d as no,b as Cl,A as Nl,a as Tl,f as Vl}from"./alert-dialog-M8Y0zqSA.js";import{b as Ml}from"./format-time-Cq80KKvY.js";import{d as Dl}from"./shell-layout-DNfiem0_.js";import{u as Pl}from"./use-members-CzSQTDAS.js";import{a as Il,P as so,b as Bl}from"./page-seo-form-CnjlIIXj.js";import{c as ro,d as oo,e as Kl,f as Fl}from"./variant-draft-pointer-fs9iIwvq.js";import"./use-panel-navigate-K8ACrPML.js";import"./thread-route-DsRsjMOv.js";import"./use-project-scope-CGMALc0e.js";import"./autosend-BiXCzDoT.js";import"./thread-intent-DlbBEzNn.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-TumByBkr.js";import"./use-ai-providers-DugUJNG4.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-DFkNTsS0.js";import"./input-pg_Munw1.js";import"./usage-stats-DcyLnEOC.js";import"./tool-namespace-FeAXQzXg.js";import"./form-Bdh0vUeg.js";import"./label-DDPD5LQh.js";import"./utils-CVEq3hMx.js";import"./markdown-1PeXOKNt.js";import"./use-copy-K9rQ1PJH.js";import"./use-mobile-BfmJV4wy.js";import"./XClose-CdzjyNb0.js";import"./icon-button-Dg2jSe-y.js";import"./file-type-icon-Ez8-DRHg.js";import"./chat-draft-D3EwPWFD.js";import"./LinkBroken01-ZRquEJUl.js";import"./ArrowUp-Cq3iZIwL.js";import"./ShoppingBag01-DAjyOiiw.js";import"./Upload01-ZLE7vfB9.js";import"./AlertCircle-xI8XX-bi.js";import"./select-B47VUguS.js";import"./index-BdQq_4o_.js";import"./index-WjQsIrkp.js";import"./ArrowLeft-BKYzlDQY.js";import"./tabs-CJ70csAp.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-orVqTX6I.js";import"./toggle-group-CtPF-F41.js";import"./use-open-billing-url-pmLoKOyH.js";import"./index-De44zW_k.js";import"./checkbox-Dla8kRWj.js";import"./Minus-DPDq6KAA.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./Key01-rbnGMz2E.js";import"./SearchMd-BODiv7c9.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-DMME8GIo.js";import"./popover-CVCbWisj.js";import"./drawer-CEiS53oX.js";import"./input-HXHaYrka.js";import"./suggestion-D_Z3LuMt.js";import"./use-mcp-prompts-JJb6q8dH.js";import"./use-org-fs-D82Vx4hB.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./Link01-DRsKyIm5.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DINMFUUx.js";import"./plan-ladder-D5aCNSRy.js";import"./add-connection-dialog-O4xCe9BP.js";import"./collection-search-C0nHL4Zi.js";import"./extract-connection-data-CUvLfXNU.js";import"./metadata-D72DunRR.js";import"./connection-B5x-rxzp.js";import"./url-slug-DfovzTSP.js";import"./connection-card-CFqu0_G8.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-aeIvRSnw.js";import"./textarea-BDWvYouR.js";import"./use-connection-Dj54skEw.js";import"./schema-Jt-SHSRj.js";import"./connection-form-helpers-CouK82td.js";import"./authenticate-and-persist-oauth-D7W1mkzH.js";import"./mcp-oauth-xBzZujQ_.js";import"./mcp-oauth-DP6VNnFQ.js";import"./collection-tabs-DJst1PBn.js";import"./badge-ByzdbptS.js";import"./use-infinite-scroll-7dT9x3fg.js";import"./useSuspenseInfiniteQuery-B0JY_wMj.js";import"./use-task-board-events-BDk-u9KA.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./utils-Bp3fKbm9.js";import"./Play-c6bc1b3-.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-Cn70Tm81.js";import"./collapsible-BWjY8cOG.js";import"./use-clock-tick-CbuQEbGd.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DTPlWHGT.js";import"./types-Cj3BjtjJ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-R9Pr50Sb.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./use-thread-outputs-DLitie4Q.js";import"./switch-BQFbXMA-.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./monaco-editor-e80GuCNv.js";import"./editor-DWhRi1_f.js";import"./calendar-B3WUDV6V.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./editor-classes-CZOMDDcn.js";import"./combobox-DJtWtG8e.js";import"./DotsVertical-BvyfZIer.js";import"./search-input-C77c23a_.js";import"./use-debounced-value-CDunmz6Z.js";import"./use-file-configs-BFq_wpSt.js";import"./asset-utils-D4ZYWTsd.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-git-api-CRxdlhrN.js";import"./sandbox-url-D3mC8qhT.js";import"./empty-state-B1xpK558.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./CreditCard01-C8DlQ7Ge.js";import"./Globe04-CVLAzwjm.js";import"./Sun-BqmeoxcG.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./use-main-schema-v8-Dcb6Yskn.js";import"./index-_y92DzgS.js";import"./alert-J8Wo4iMe.js";import"./section-preview-url-7zfngvgW.js";import"./differenceInSeconds-C3x8sHUj.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./repository-import-picker-Aq7ItYog.js";import"./repository-picker-CigkRPj6.js";import"./required-auth-layout-n4GqwjUS.js";import"./use-org-sso-ClJ8vn5f.js";import"./use-org-auth-client-fPRUht_a.js";const Ol={escape:Yi};function Ll(n,e){for(const s of _l(n,e)){const o=typeof s.title=="string"?s.title:void 0;if(o?.includes("{{"))return o}}function $l(n,e){if(!e)return;const s=La(n);if(s)try{const o=Ll(s.resolveType,e);return o&&Ka.render(o,s.data,{},Ol).trim()||void 0}catch{return}}function zl(n){const e=it.c(13),{icon:s,label:o,className:a}=n;let u;e[0]!==a?(u=ae("size-3.5",a),e[0]=a,e[1]=u):u=e[1];let h;e[2]!==s||e[3]!==u?(h=i.jsx(s,{className:u}),e[2]=s,e[3]=u,e[4]=h):h=e[4];let d;e[5]!==o||e[6]!==h?(d=i.jsx(Et,{asChild:!0,children:i.jsx("span",{role:"img","aria-label":o,className:"shrink-0 cursor-help",children:h})}),e[5]=o,e[6]=h,e[7]=d):d=e[7];let v;e[8]!==o?(v=i.jsx(Rt,{className:"max-w-56",children:o}),e[8]=o,e[9]=v):v=e[9];let m;return e[10]!==d||e[11]!==v?(m=i.jsxs(kt,{children:[d,v]}),e[10]=d,e[11]=v,e[12]=m):m=e[12],m}const Hl="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function io(n){return Array.from({length:n},(e,s)=>({id:crypto.randomUUID(),index:s}))}function _o(n){return n.map((e,s)=>({...e,index:s}))}function Wl(n,e){if(e===n.length)return n;if(e<n.length)return _o(n.slice(0,e));const s=Array.from({length:e-n.length},(o,a)=>({id:crypto.randomUUID(),index:n.length+a}));return[...n,...s]}function ko(n){const e=it.c(44),{section:s,raw:o,meta:a,decofile:u}=n,h=Ft(),d=Wn(),v=s.isSavedBlock===!0,m=s.isMultivariate===!0;let j;e[0]!==a||e[1]!==o?(j=o&&a?kl(o,a):void 0,e[0]=a,e[1]=o,e[2]=j):j=e[2];const A=j;let $;e[3]!==a||e[4]!==m||e[5]!==o||e[6]!==v?($=o&&a&&!v&&!m?$l(o,a):void 0,e[3]=a,e[4]=m,e[5]=o,e[6]=v,e[7]=$):$=e[7];const z=$;let H;e[8]!==u||e[9]!==a||e[10]!==o||e[11]!==s?(H=ta(o,s,u,a),e[8]=u,e[9]=a,e[10]=o,e[11]=s,e[12]=H):H=e[12];const F=H;let f;e[13]!==m||e[14]!==o?.__resolveType?(f=!m&&Rs(o?.__resolveType??""),e[13]=m,e[14]=o?.__resolveType,e[15]=f):f=e[15];const k=f,X=v?zn:m?So:wo;let w;e[16]!==m||e[17]!==v?(w=v?{color:$a}:m?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=m,e[17]=v,e[18]=w):w=e[18];const I=w;let V;e[19]!==X||e[20]!==d?(V=d?i.jsxs("span",{className:"relative size-4 shrink-0",children:[i.jsx(X,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),i.jsx(sa,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):i.jsx(Ra,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=X,e[20]=d,e[21]=V):V=e[21];let y;e[22]!==A?(y=A&&i.jsx("img",{src:A,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=A,e[23]=y):y=e[23];let C;e[24]!==d||e[25]!==I?(C=!d&&i.jsx(Ss,{className:"h-4 w-4 shrink-0",style:I}),e[24]=d,e[25]=I,e[26]=C):C=e[26];const x=d?"shrink":"flex-1",Y=s.isHidden&&"line-through opacity-50";let D;e[27]!==Y||e[28]!==x?(D=ae("min-w-0 truncate text-sm font-medium",x,Y),e[27]=Y,e[28]=x,e[29]=D):D=e[29];const ge=z??s.label;let me;e[30]!==D||e[31]!==ge?(me=i.jsx("span",{className:D,children:ge}),e[30]=D,e[31]=ge,e[32]=me):me=e[32];let le;e[33]!==k||e[34]!==d||e[35]!==F||e[36]!==h?(le=d?i.jsxs(i.Fragment,{children:[k&&i.jsx(zl,{icon:bs,label:h("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),F&&i.jsx(Br,{}),i.jsx("span",{className:"min-w-0 flex-1"})]}):F&&i.jsx(Br,{className:"absolute -right-0.5 -top-0.5"}),e[33]=k,e[34]=d,e[35]=F,e[36]=h,e[37]=le):le=e[37];let ee;return e[38]!==me||e[39]!==le||e[40]!==V||e[41]!==y||e[42]!==C?(ee=i.jsxs(i.Fragment,{children:[V,y,C,me,le]}),e[38]=me,e[39]=le,e[40]=V,e[41]=y,e[42]=C,e[43]=ee):ee=e[43],ee}const ql="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Gl="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function Eo(n,e,s){if(s)return na({selected:e});const o=n.isSavedBlock===!0,a=n.isMultivariate===!0;return ae("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":o?ql:a?Gl:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function ps(n,e){return ae("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Ul(n){const e=it.c(90),{section:s,raw:o,meta:a,decofile:u,sortableId:h,selected:d,onSelect:v,onDelete:m,onDuplicate:j,onMakeReusable:A,onToggleHidden:$,onToggleLazy:z,onAddVariant:H,onDetach:F}=n,f=Ft(),k=Wn(),X=o?Rs(o.__resolveType??""):!1,w=s.isHidden===!0,I=X||w;let V;e[0]!==s?(V=bo(s),e[0]=s,e[1]=V):V=e[1];const y=V,C=!!z&&!s.isMultivariate;let x;e[2]!==h?(x={id:h,animateLayoutChanges:Ql},e[2]=h,e[3]=x):x=e[3];const{attributes:Y,listeners:D,setNodeRef:ge,transform:me,isDragging:le}=Sl(x);let ee;e[4]!==me?(ee=vl.Transform.toString(me?{...me,x:0}:null),e[4]=me,e[5]=ee):ee=e[5];const pe=le?0:void 0;let ce;e[6]!==ee||e[7]!==pe?(ce={transform:ee,opacity:pe},e[6]=ee,e[7]=pe,e[8]=ce):ce=e[8];const he=ce;let ve;e[9]!==s?(ve=Qi(s),e[9]=s,e[10]=ve):ve=e[10];const b=ve,B="button",xe=0;let T;e[11]!==v?(T=re=>{(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),v())},e[11]=v,e[12]=T):T=e[12];const ye=le?"cursor-grabbing":"cursor-pointer";let K;e[13]!==k||e[14]!==s||e[15]!==d||e[16]!==ye?(K=ae("touch-none transition-colors",ye,Eo(s,d,k)),e[13]=k,e[14]=s,e[15]=d,e[16]=ye,e[17]=K):K=e[17];let Se;e[18]!==u||e[19]!==a||e[20]!==o||e[21]!==s?(Se=i.jsx(ko,{section:s,raw:o,meta:a,decofile:u}),e[18]=u,e[19]=a,e[20]=o,e[21]=s,e[22]=Se):Se=e[22];const ue=!k&&C&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon","aria-label":f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:ae(ps(I,X)),onClick:re=>{re.stopPropagation(),z?.()},onPointerDown:Jl,children:i.jsx(bs,{className:ae("h-3.5 w-3.5",X&&"text-warning")})})}),i.jsx(Rt,{side:"bottom",children:f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),te=k?i.jsx(Xi,{label:f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:w,onToggle:$,children:w?i.jsx(Zr,{className:"h-3.5 w-3.5"}):i.jsx(eo,{className:"h-3.5 w-3.5"})}):i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon","aria-label":f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:ae(ps(I,w)),onClick:re=>{re.stopPropagation(),$()},onPointerDown:Yl,children:w?i.jsx(Zr,{className:"h-3.5 w-3.5"}):i.jsx(eo,{className:"h-3.5 w-3.5"})})}),i.jsx(Rt,{side:"bottom",children:f(w?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),se=$i,Te=Zi;let Z;e[23]!==f?(Z=f("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=f,e[24]=Z):Z=e[24];const _e=ae(ps(I,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let be;e[25]!==Te||e[26]!==Z||e[27]!==_e?(be=i.jsx(Te,{label:Z,classicClassName:_e}),e[25]=Te,e[26]=Z,e[27]=_e,e[28]=be):be=e[28];let q;e[29]!==k||e[30]!==C||e[31]!==X||e[32]!==z||e[33]!==f?(q=k&&C&&i.jsxs(i.Fragment,{children:[i.jsxs(sn,{onClick:re=>{re.stopPropagation(),z?.()},children:[i.jsx(bs,{className:"h-4 w-4"}),f(X?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),i.jsx(Li,{})]}),e[29]=k,e[30]=C,e[31]=X,e[32]=z,e[33]=f,e[34]=q):q=e[34];let O;e[35]!==j?(O=re=>{re.stopPropagation(),j()},e[35]=j,e[36]=O):O=e[36];let Ke;e[37]===Symbol.for("react.memo_cache_sentinel")?(Ke=i.jsx(ul,{className:"h-4 w-4"}),e[37]=Ke):Ke=e[37];let Qe;e[38]!==f?(Qe=f("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=f,e[39]=Qe):Qe=e[39];let Xe;e[40]!==O||e[41]!==Qe?(Xe=i.jsxs(sn,{onClick:O,children:[Ke,Qe]}),e[40]=O,e[41]=Qe,e[42]=Xe):Xe=e[42];let Ye;e[43]!==k||e[44]!==y||e[45]!==H||e[46]!==f?(Ye=y&&i.jsxs(sn,{className:ae(!k&&ea),onClick:re=>{re.stopPropagation(),H()},children:[i.jsx(So,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=k,e[44]=y,e[45]=H,e[46]=f,e[47]=Ye):Ye=e[47];let Q;e[48]!==k||e[49]!==b||e[50]!==A||e[51]!==f?(Q=b&&i.jsxs(sn,{className:ae(!k&&Hl),onClick:re=>{re.stopPropagation(),A()},children:[k?i.jsx(zn,{className:"h-4 w-4"}):i.jsx(Ss,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=k,e[49]=b,e[50]=A,e[51]=f,e[52]=Q):Q=e[52];let ke;e[53]!==k||e[54]!==F||e[55]!==s.isMultivariate||e[56]!==s.isSavedBlock||e[57]!==f?(ke=s.isSavedBlock===!0&&!s.isMultivariate&&i.jsxs(sn,{onClick:re=>{re.stopPropagation(),F()},children:[k?i.jsx(wo,{className:"h-4 w-4"}):i.jsx(Ss,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=k,e[54]=F,e[55]=s.isMultivariate,e[56]=s.isSavedBlock,e[57]=f,e[58]=ke):ke=e[58];let He;e[59]!==m?(He=re=>{re.stopPropagation(),m()},e[59]=m,e[60]=He):He=e[60];let We;e[61]===Symbol.for("react.memo_cache_sentinel")?(We=i.jsx(fl,{className:"h-4 w-4"}),e[61]=We):We=e[61];let Ee;e[62]!==f?(Ee=f("sectionsEditor.sectionList.deleteMenuItem"),e[62]=f,e[63]=Ee):Ee=e[63];let Ie;e[64]!==He||e[65]!==Ee?(Ie=i.jsxs(sn,{variant:"destructive",onClick:He,children:[We,Ee]}),e[64]=He,e[65]=Ee,e[66]=Ie):Ie=e[66];let Ve;e[67]!==q||e[68]!==Xe||e[69]!==Ye||e[70]!==Q||e[71]!==ke||e[72]!==Ie?(Ve=i.jsxs(zi,{align:"end",className:"w-44",children:[q,Xe,Ye,Q,ke,Ie]}),e[67]=q,e[68]=Xe,e[69]=Ye,e[70]=Q,e[71]=ke,e[72]=Ie,e[73]=Ve):Ve=e[73];let Ze;e[74]!==se||e[75]!==be||e[76]!==Ve?(Ze=i.jsxs(se,{children:[be,Ve]}),e[74]=se,e[75]=be,e[76]=Ve,e[77]=Ze):Ze=e[77];let Fe;return e[78]!==Y||e[79]!==D||e[80]!==v||e[81]!==ge||e[82]!==he||e[83]!==K||e[84]!==Se||e[85]!==ue||e[86]!==te||e[87]!==Ze||e[88]!==T?(Fe=i.jsxs("div",{ref:ge,style:he,...Y,...D,role:B,tabIndex:xe,onClick:v,onKeyDown:T,className:K,children:[Se,ue,te,Ze]}),e[78]=Y,e[79]=D,e[80]=v,e[81]=ge,e[82]=he,e[83]=K,e[84]=Se,e[85]=ue,e[86]=te,e[87]=Ze,e[88]=T,e[89]=Fe):Fe=e[89],Fe}function Yl(n){return n.stopPropagation()}function Jl(n){return n.stopPropagation()}function Ql(){return!1}function js(n){const e=it.c(11),{canAddSection:s,onAddSection:o,className:a,size:u}=n,h=Ft();let d;e[0]!==a?(d=ae("w-full",a),e[0]=a,e[1]=d):d=e[1];const v=!s;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(dl,{size:14}),e[2]=m):m=e[2];let j;e[3]!==h?(j=h("sectionsEditor.sectionList.addSectionButton"),e[3]=h,e[4]=j):j=e[4];let A;return e[5]!==o||e[6]!==u||e[7]!==d||e[8]!==v||e[9]!==j?(A=i.jsxs(_t,{type:"button",variant:"outline",size:u,className:d,disabled:v,onClick:o,children:[m,j]}),e[5]=o,e[6]=u,e[7]=d,e[8]=v,e[9]=j,e[10]=A):A=e[10],A}function Xl(n){const e=it.c(101),{listKey:s,rawSections:o,sections:a,meta:u,decofile:h,selectedIndex:d,onSelect:v,onReorder:m,onDelete:j,onDuplicate:A,onMakeReusable:$,onToggleHidden:z,onToggleLazy:H,onAddVariant:F,onDetach:f,onAddSection:k,canAddSection:X}=n,w=X===void 0?!0:X,I=Ft(),V=Wn();let y;e[0]!==a.length?(y=()=>io(a.length),e[0]=a.length,e[1]=y):y=e[1];const[C,x]=R.useState(y),[Y,D]=R.useState(null),[ge,me]=R.useState(s),[le,ee]=R.useState(a.length),pe=R.useRef(!1);ge!==s?(me(s),ee(a.length),x(io(a.length))):le!==a.length&&(ee(a.length),x(dt=>Wl(dt,a.length)));let ce;e[2]===Symbol.for("react.memo_cache_sentinel")?(ce={activationConstraint:{distance:8}},e[2]=ce):ce=e[2];let he;e[3]===Symbol.for("react.memo_cache_sentinel")?(he={coordinateGetter:bl},e[3]=he):he=e[3];const ve=ml(to(hl,ce),to(pl,he));let b;e[4]!==C?(b=C.map(Zl),e[4]=C,e[5]=b):b=e[5];const B=b;let xe;e[6]===Symbol.for("react.memo_cache_sentinel")?(xe=dt=>{D(String(dt.active.id))},e[6]=xe):xe=e[6];const T=xe;let ye;e[7]!==B||e[8]!==m?(ye=dt=>{D(null);const{active:ne,over:Me}=dt;if(!Me||ne.id===Me.id)return;const yt=B.indexOf(String(ne.id)),et=B.indexOf(String(Me.id));yt===-1||et===-1||(x(ft=>_o(Ln([...ft],yt,et))),pe.current=!0,requestAnimationFrame(()=>{pe.current=!1}),m?.(yt,et))},e[7]=B,e[8]=m,e[9]=ye):ye=e[9];const K=ye;let Se;e[10]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{D(null)},e[10]=Se):Se=e[10];const ue=Se;let te,se,Te,Z,_e,be,q,O,Ke,Qe,Xe,Ye,Q,ke,He;if(e[11]!==Y||e[12]!==w||e[13]!==V||e[14]!==h||e[15]!==C||e[16]!==B||e[17]!==K||e[18]!==u||e[19]!==k||e[20]!==F||e[21]!==j||e[22]!==f||e[23]!==A||e[24]!==$||e[25]!==v||e[26]!==z||e[27]!==H||e[28]!==o||e[29]!==a||e[30]!==d||e[31]!==ve||e[32]!==I){ke=Symbol.for("react.early_return_sentinel");e:{const dt=ne=>{pe.current||v(ne)};if(e[48]!==Y||e[49]!==w||e[50]!==V||e[51]!==C||e[52]!==k||e[53]!==o||e[54]!==a||e[55]!==I){const ne=Y?C.find(Me=>Me.id===Y):null;if(Z=ne!=null?a[ne.index]:null,Te=ne!=null?o[ne.index]:void 0,C.length===0){let Me;e[59]!==I?(Me=I("sectionsEditor.sectionList.noSections"),e[59]=I,e[60]=Me):Me=e[60];let yt;e[61]!==Me?(yt=i.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Me}),e[61]=Me,e[62]=yt):yt=e[62];const et=yt;let ft;e[63]!==w||e[64]!==V||e[65]!==et||e[66]!==k?(ft=V?et:i.jsxs("div",{className:"space-y-2",children:[et,i.jsx(js,{canAddSection:w,onAddSection:k,size:"sm"})]}),e[63]=w,e[64]=V,e[65]=et,e[66]=k,e[67]=ft):ft=e[67],ke=ft;break e}Q=ae(ne&&"cursor-grabbing"),e[48]=Y,e[49]=w,e[50]=V,e[51]=C,e[52]=k,e[53]=o,e[54]=a,e[55]=I,e[56]=Te,e[57]=Z,e[58]=Q}else Te=e[56],Z=e[57],Q=e[58];se=xl,O=ve,Ke=yl,Qe=T,Xe=K,Ye=ue,te=jl,be=B,q=wl,He="space-y-1",_e=C.map(ne=>{const Me=a[ne.index];return Me?i.jsx(Ul,{sortableId:ne.id,section:Me,raw:o[ne.index],meta:u,decofile:h,selected:d===ne.index,onSelect:()=>dt(ne.index),onDelete:()=>j(ne.index),onDuplicate:()=>A(ne.index),onMakeReusable:()=>$(ne.index),onToggleHidden:()=>z(ne.index),onToggleLazy:H?()=>H(ne.index):void 0,onAddVariant:()=>F(ne.index),onDetach:()=>f(ne.index)},ne.id):null})}e[11]=Y,e[12]=w,e[13]=V,e[14]=h,e[15]=C,e[16]=B,e[17]=K,e[18]=u,e[19]=k,e[20]=F,e[21]=j,e[22]=f,e[23]=A,e[24]=$,e[25]=v,e[26]=z,e[27]=H,e[28]=o,e[29]=a,e[30]=d,e[31]=ve,e[32]=I,e[33]=te,e[34]=se,e[35]=Te,e[36]=Z,e[37]=_e,e[38]=be,e[39]=q,e[40]=O,e[41]=Ke,e[42]=Qe,e[43]=Xe,e[44]=Ye,e[45]=Q,e[46]=ke,e[47]=He}else te=e[33],se=e[34],Te=e[35],Z=e[36],_e=e[37],be=e[38],q=e[39],O=e[40],Ke=e[41],Qe=e[42],Xe=e[43],Ye=e[44],Q=e[45],ke=e[46],He=e[47];if(ke!==Symbol.for("react.early_return_sentinel"))return ke;let We;e[68]!==_e||e[69]!==He?(We=i.jsx("div",{className:He,children:_e}),e[68]=_e,e[69]=He,e[70]=We):We=e[70];let Ee;e[71]!==te||e[72]!==be||e[73]!==q||e[74]!==We?(Ee=i.jsx(te,{items:be,strategy:q,children:We}),e[71]=te,e[72]=be,e[73]=q,e[74]=We,e[75]=Ee):Ee=e[75];let Ie;e[76]!==Te||e[77]!==Z||e[78]!==V||e[79]!==h||e[80]!==u?(Ie=Z?i.jsx("div",{className:ae("cursor-grabbing shadow-lift",Eo(Z,!1,V)),children:i.jsx(ko,{section:Z,raw:Te,meta:u,decofile:h})}):null,e[76]=Te,e[77]=Z,e[78]=V,e[79]=h,e[80]=u,e[81]=Ie):Ie=e[81];let Ve;e[82]!==Ie?(Ve=Oi.createPortal(i.jsx(gl,{dropAnimation:Ji,children:Ie}),document.body),e[82]=Ie,e[83]=Ve):Ve=e[83];let Ze;e[84]!==se||e[85]!==O||e[86]!==Ke||e[87]!==Qe||e[88]!==Xe||e[89]!==Ye||e[90]!==Ee||e[91]!==Ve?(Ze=i.jsxs(se,{sensors:O,collisionDetection:Ke,onDragStart:Qe,onDragEnd:Xe,onDragCancel:Ye,children:[Ee,Ve]}),e[84]=se,e[85]=O,e[86]=Ke,e[87]=Qe,e[88]=Xe,e[89]=Ye,e[90]=Ee,e[91]=Ve,e[92]=Ze):Ze=e[92];let Fe;e[93]!==w||e[94]!==V||e[95]!==k?(Fe=!V&&i.jsx(js,{canAddSection:w,onAddSection:k,size:"sm",className:"mt-2"}),e[93]=w,e[94]=V,e[95]=k,e[96]=Fe):Fe=e[96];let re;return e[97]!==Q||e[98]!==Ze||e[99]!==Fe?(re=i.jsxs("div",{className:Q,children:[Ze,Fe]}),e[97]=Q,e[98]=Ze,e[99]=Fe,e[100]=re):re=e[100],re}function Zl(n){return n.id}function hs(n,e,s,o){if(!n||!e)return null;if(!e.isMultivariate)return jt(n,e,o)?.data??null;const a=xt(n,e),u=a?vs(a,wt)[s]:void 0;return u?jo(u.value,o)?.data??null:null}const ec=50;function tc(n,e){n.own.push(ze(e)),n.own.length>ec&&n.own.shift()}function ao(n,e){return n.own.includes(ze(e))}function nc(n,e){const{sectionIndex:s,variantIndex:o,shown:a,next:u,sectionCount:h}=e;return n&&n.sectionIndex===s&&n.variantIndex===o&&n.emitted===a?(n.emitted=u,n):a?{sectionIndex:s,variantIndex:o,base:a,emitted:u,sectionCount:h,own:[ze(a)]}:null}function Ro(n,e){return e!==null&&ze(n)!==ze(e)}function Ao(n,e){return n.__resolveType!==e.__resolveType}function sc(n,e,s,o){if(e.length===o)return"here";const a=ze(n),u=e.flatMap((h,d)=>d!==s&&h!==null&&ze(h)===a?[d]:[]);return u.length===1?u[0]:"unknown"}function lo({formBase:n,rebased:e,versionOf:s}){let o=null;return{ifMatch:a=>{o=a,n&&(n.version===void 0||e)&&(n.version=s(a));const u=n?n.version:s(a);return u===void 0?void 0:{[a]:u}},onApplied:a=>{n&&o!==null&&Object.hasOwn(a,o)&&(n.version=a[o])},reloadOnConflict:!0}}function rc({merged:n,tracked:e,current:s,saved:o}){return!!n&&!!e&&s===e&&e.emitted===o}function co(n,e){return!!n&&!!e&&n.contains(e)}function ws(n){const e=[],s=_s("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:s,pointers:e}}function _s(n,e,s,o,a){const u=(h,d)=>ze(h)===ze(d);if(u(s,o)||u(e,o))return s;if(u(e,s))return o;if(gs(s)&&gs(o)){const h=gs(e)?e:{},d={},v=[...Object.keys(s),...Object.keys(o).filter(m=>!(m in s))];for(const m of v){const j=_s(`${n}/${m.replaceAll("~","~0").replaceAll("/","~1")}`,h[m],s[m],o[m],a);j!==void 0&&(d[m]=j)}return d}return Array.isArray(e)&&Array.isArray(s)&&Array.isArray(o)&&s.length===e.length&&o.length===e.length?e.map((h,d)=>_s(`${n}/${d}`,h,s[d],o[d],a)):(a.push(n),o)}function gs(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function oc(n,e){let s=n.merged;for(const o of n.pointers)e[o]==="mine"&&(s=cc(s,o,Ut(n.mine,o)));return s}function ic(n,e){return Object.fromEntries(n.pointers.map(s=>[s,e]))}function Co(n){return ic(n,"mine")}function ks(n,e,s){const o=Co(s);for(const a of s.pointers){const u=e[a];if(!u||!n.pointers.includes(a))continue;["mine","theirs"].every(d=>ze(Ut(n[d],a))===ze(Ut(s[d],a)))&&(o[a]=u)}return o}function No(n,e,s={}){const o=e.pointers.filter(a=>!n.pointers.includes(a)||ze(Ut(n.theirs,a))!==ze(Ut(e.theirs,a)));return o.length===0?s:{...s,...Object.fromEntries(o.map(a=>[a,(s[a]??0)+1]))}}function ac(n,e,s){if(!e||Ao(n.plan.ancestor,e)||!Ro(n.plan.theirs,e)||s(e))return null;const o=ws({...n.plan,theirs:e});return o.pointers.length===0?null:{plan:o,choices:ks(n.plan,n.choices,o),fresh:No(n.plan,o,n.fresh)}}function lc(n,e){return n.pointers.map(s=>({pointer:s,label:ra(s,e),mine:Ut(n.mine,s),theirs:Ut(n.theirs,s),schema:uc(e??null,s)}))}function As(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function Ut(n,e){let s=n;for(const o of As(e))if(Array.isArray(s))s=s[Number(o)];else if(s&&typeof s=="object")s=s[o];else return;return s}function cc(n,e,s){const o=As(e),a=(u,h)=>{if(h===o.length)return s;const d=o[h];if(Array.isArray(u)){const j=[...u];return j[Number(d)]=a(u[Number(d)],h+1),j}const v=u&&typeof u=="object"?{...u}:{},m=a(v[d],h+1);return m===void 0?delete v[d]:v[d]=m,v};return a(n,0)}function uc(n,e){let s=n;for(const o of As(e)){if(!s)return null;s=/^\d+$/.test(o)&&!s.properties?.[o]?s.items:s.properties?.[o]}return s??null}const dc=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,uo=60,fc=3;function To(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&dc.test(n)}function Es(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const o=n.replace(/<br\s*\/?>/gi,`
|
|
2
|
-
`).replace(/<\/(p|div|li|h[1-6])>/gi,`
|
|
3
|
-
`);return pc(o).replace(/\u00a0/g," ").replace(/\n{2,}/g,`
|
|
4
|
-
`).trim()}const mc={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'"};function pc(n){if(typeof DOMParser<"u")return new DOMParser().parseFromString(n,"text/html").body.textContent??"";let e=n;for(let s="";s!==e;)s=e,e=e.replace(/<[^<>]*>/g,"");return e.replace(/<|>/g,"").replace(/&(nbsp|amp|lt|gt|quot|#39);/g,s=>mc[s]??s)}function $n(n){const e=n.replace(/\s+/g," ").trim();return e.length>uo?`${e.slice(0,uo-1)}…`:e}function hc(n){if(n.startsWith("data:"))return"image";const e=n.split(/[?#]/)[0]??n;return decodeURIComponent(e.split("/").pop()||n)}function Hn(n,e){if(n==null||n==="")return{kind:"empty"};if(typeof n=="string")return To(n,e)?{kind:"image",src:n}:{kind:"text",text:Es(n,e)};if(typeof n=="number"||typeof n=="bigint")return{kind:"text",text:String(n)};if(typeof n=="boolean")return{kind:"yesNo",value:n};if(Array.isArray(n)){const s=e?.items??null;return{kind:"list",count:n.length,items:n.slice(0,fc).map(o=>gc(o,s)??"")}}if(typeof n=="object"){const s=n;if("value"in s&&Object.keys(s).length<=2)return Hn(s.value,e?.properties?.value??e);const o=Object.entries(s).filter(([a,u])=>!a.startsWith("__")&&u!==void 0).flatMap(([a,u])=>{const h=e?.properties?.[a]??null,d=Hn(u,h);if(d.kind==="empty")return[];const v=d.kind==="text"?$n(d.text):d.kind==="image"?hc(d.src):d.kind==="yesNo"?d.value?"✓":"✗":d.kind==="list"?`${d.count}`:"…";return[{label:h?.title?.trim()||a,text:v}]}).slice(0,4);return o.length>0?{kind:"fields",entries:o}:{kind:"empty"}}return{kind:"text",text:String(n)}}function gc(n,e){if(typeof n=="string")return $n(Es(n,e));if(!n||typeof n!="object"||Array.isArray(n))return null;const s=n,o=e?.titleBy,a=o?s[o]:void 0;if(typeof a=="string"&&a.trim())return $n(a);for(const[u,h]of Object.entries(s))if(!(u.startsWith("__")||typeof h!="string"||!h.trim())&&!To(h,e?.properties?.[u]??null))return $n(Es(h,null));return null}const fo=1500;function vc(n,e){const s=n.split(/(\s+)/).filter(j=>j!==""),o=e.split(/(\s+)/).filter(j=>j!=="");if(s.length>fo||o.length>fo)return{mine:[{text:n,kind:"changed"}],theirs:[{text:e,kind:"changed"}]};const a=Array.from({length:s.length+1},()=>new Array(o.length+1).fill(0));for(let j=s.length-1;j>=0;j--)for(let A=o.length-1;A>=0;A--){const $=a[j];$[A]=s[j]===o[A]?a[j+1][A+1]+1:Math.max(a[j+1][A],$[A+1])}const u=[],h=[],d=(j,A,$)=>{const z=j.at(-1);z&&(z.kind===$||$==="same"&&!A.trim())?z.text+=A:j.push({text:A,kind:$})};let v=0,m=0;for(;v<s.length&&m<o.length;)s[v]===o[m]?(d(u,s[v],"same"),d(h,o[m],"same"),v++,m++):a[v+1][m]>=a[v][m+1]?(d(u,s[v],"changed"),v++):(d(h,o[m],"changed"),m++);for(;v<s.length;v++)d(u,s[v],"changed");for(;m<o.length;m++)d(h,o[m],"changed");return{mine:u,theirs:h}}function xc(n){const e=it.c(10);let s,o;e[0]!==n?({open:s,...o}=n,e[0]=n,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{data:a}=vo.useSession();let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=ae("max-h-[85vh] grid-rows-[auto_minmax(0,1fr)_auto] sm:max-w-lg"),e[3]=u):u=e[3];const h=a?.user??null;let d;e[4]!==o||e[5]!==h?(d=i.jsx(Al,{className:u,"data-testid":"form-conflict-dialog",onEscapeKeyDown:Sc,children:i.jsx(Ec,{...o,viewer:h,heading:yc})}),e[4]=o,e[5]=h,e[6]=d):d=e[6];let v;return e[7]!==s||e[8]!==d?(v=i.jsx(Vl,{open:s,children:d}),e[7]=s,e[8]=d,e[9]=v):v=e[9],v}function yc(n,e){return i.jsxs(Cl,{className:"text-left",children:[i.jsx(Nl,{children:n}),i.jsx(Tl,{children:e})]})}function Sc(n){return n.preventDefault()}const bc={},jc=(n,e)=>i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("h2",{className:"text-lg font-semibold",children:n}),i.jsx("p",{className:"text-sm text-muted-foreground",children:e})]});function wc(n,e,s=0,o={},a=null){const u=e[Math.min(s,e.length-1)],h=a?.you?void 0:a?.name?.split(/\s+/)[0],d={field:u?kc(u.label):"",label:u?.label??"",name:h??""},v=(m,j,A)=>n(a?.you?A:h?j:m,d);return e.length<=1?{title:v("sectionsEditor.formConflict.titleOne","sectionsEditor.formConflict.titleOneNamed","sectionsEditor.formConflict.titleOneYou"),description:n("sectionsEditor.formConflict.descriptionOne")}:{title:v("sectionsEditor.formConflict.titleStep","sectionsEditor.formConflict.titleStepNamed","sectionsEditor.formConflict.titleStepYou"),description:s>=e.length-1?i.jsx(_c,{t:n,fields:e,choices:o,name:h}):n("sectionsEditor.formConflict.descriptionStep")}}function _c(n){const e=it.c(11),{t:s,fields:o,choices:a,name:u}=n;let h;if(e[0]!==a||e[1]!==o||e[2]!==u||e[3]!==s){let v;e[5]!==a||e[6]!==u||e[7]!==s?(v=(m,j)=>i.jsxs(R.Fragment,{children:[j>0&&" · ",`${m.label}: `,i.jsx("span",{className:"font-medium text-foreground",children:s((a[m.pointer]??"mine")==="mine"?"sectionsEditor.formConflict.summaryYours":u?"sectionsEditor.formConflict.summaryTheirsNamed":"sectionsEditor.formConflict.summaryTheirs",{name:u??""})})]},m.pointer),e[5]=a,e[6]=u,e[7]=s,e[8]=v):v=e[8],h=o.map(v),e[0]=a,e[1]=o,e[2]=u,e[3]=s,e[4]=h}else h=e[4];let d;return e[9]!==h?(d=i.jsx("span",{"data-testid":"form-conflict-summary",children:h}),e[9]=h,e[10]=d):d=e[10],d}function kc(n){return/^[A-Z][a-z]/.test(n)&&!n.includes("›")?n.charAt(0).toLowerCase()+n.slice(1):n}function Ec(n){const e=it.c(68),s=Ft(),{fields:o,choices:a,changedAgain:u,fresh:h,heading:d}=n,v=u===void 0?!1:u,m=h===void 0?bc:h,j=d===void 0?jc:d,A=o.length>1,[$,z]=R.useState(0),[H,F]=R.useState(Rc);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={},e[0]=f):f=e[0];const[k,X]=R.useState(f),w=Math.max(0,Math.min($,o.length-1)),I=o[w],V=w===o.length-1;let y;e[1]!==w||e[2]!==o||e[3]!==m?(y=Se=>{const ue=o[w],te=o[Se];!ue||!te||Se===w||(F(se=>new Set(se).add(ue.pointer)),X(se=>({...se,[ue.pointer]:m[ue.pointer]??0,[te.pointer]:m[te.pointer]??0})),z(Se))},e[1]=w,e[2]=o,e[3]=m,e[4]=y):y=e[4];const C=y;let x;e[5]!==w||e[6]!==C?(x=Se=>{if(!Se)return;const ue=te=>{const se={ArrowLeft:-1,ArrowRight:1}[te.key];!se||te.defaultPrevented||te.altKey||te.ctrlKey||te.metaKey||te.shiftKey||Dl(te.target)||(te.preventDefault(),C(w+se))};return Se.ownerDocument.addEventListener("keydown",ue),()=>Se.ownerDocument.removeEventListener("keydown",ue)},e[5]=w,e[6]=C,e[7]=x):x=e[7];const Y=x;if(!I)return null;let D,ge,me,le,ee;if(e[8]!==H||e[9]!==w||e[10]!==a||e[11]!==o||e[12]!==m||e[13]!==C||e[14]!==j||e[15]!==Y||e[16]!==A||e[17]!==n||e[18]!==k||e[19]!==s){const{title:Se,description:ue}=wc(s,o,w,a,n.author??null);let te;e[25]!==n?(te=se=>{se.detail>1||n.onApply()},e[25]=n,e[26]=te):te=e[26],D=te,ge=A?Y:void 0,me="flex min-w-0 flex-col gap-3",e[27]!==H||e[28]!==w||e[29]!==o||e[30]!==m||e[31]!==C||e[32]!==A||e[33]!==k||e[34]!==s?(le=A&&i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i.jsx("div",{role:"group","aria-label":s("sectionsEditor.formConflict.steps"),className:"-m-1 flex flex-wrap items-center",children:o.map((se,Te)=>{const Z=Te!==w&&(m[se.pointer]??0)>(k[se.pointer]??0);return i.jsx("button",{type:"button","aria-label":Z?s("sectionsEditor.formConflict.stepChangedAgain",{label:se.label}):se.label,"aria-current":Te===w?"step":void 0,"data-answered":Te!==w&&H.has(se.pointer)?"":void 0,"data-changed-again":Z?"":void 0,onClick:()=>C(Te),className:"group cursor-pointer rounded-full p-1 focus-ring",children:i.jsx("span",{className:ae("block h-2 w-2 rounded-full bg-border transition-[width,background-color,box-shadow] motion-reduce:transition-none","group-hover:bg-muted-foreground/60","group-data-[answered]:bg-foreground/45","group-aria-[current=step]:w-5 group-aria-[current=step]:bg-foreground","group-data-[changed-again]:ring-2 group-data-[changed-again]:ring-warning group-data-[changed-again]:ring-offset-1 group-data-[changed-again]:ring-offset-background")})},se.pointer)})}),i.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:s("sectionsEditor.formConflict.stepCount",{step:String(w+1),count:String(o.length)})})]}),e[27]=H,e[28]=w,e[29]=o,e[30]=m,e[31]=C,e[32]=A,e[33]=k,e[34]=s,e[35]=le):le=e[35],ee=j(Se,ue),e[8]=H,e[9]=w,e[10]=a,e[11]=o,e[12]=m,e[13]=C,e[14]=j,e[15]=Y,e[16]=A,e[17]=n,e[18]=k,e[19]=s,e[20]=D,e[21]=ge,e[22]=me,e[23]=le,e[24]=ee}else D=e[20],ge=e[21],me=e[22],le=e[23],ee=e[24];let pe;e[36]!==ge||e[37]!==me||e[38]!==le||e[39]!==ee?(pe=i.jsxs("div",{ref:ge,className:me,children:[le,ee]}),e[36]=ge,e[37]=me,e[38]=le,e[39]=ee,e[40]=pe):pe=e[40];const ce=!v&&"sr-only";let he;e[41]!==ce?(he=ae("text-sm text-muted-foreground",ce),e[41]=ce,e[42]=he):he=e[42];let ve;e[43]!==v||e[44]!==A||e[45]!==s?(ve=v?s(A?"sectionsEditor.formConflict.changedAgainSteps":"sectionsEditor.formConflict.changedAgain"):"",e[43]=v,e[44]=A,e[45]=s,e[46]=ve):ve=e[46];let b;e[47]!==he||e[48]!==ve?(b=i.jsx("p",{role:"status",className:he,children:ve}),e[47]=he,e[48]=ve,e[49]=b):b=e[49];const B=A?"vertical":"all";let xe;e[50]!==I||e[51]!==n||e[52]!==B?(xe=i.jsx(Tc,{field:I,...n,arrows:B}),e[50]=I,e[51]=n,e[52]=B,e[53]=xe):xe=e[53];let T;e[54]!==b||e[55]!==xe?(T=i.jsxs("div",{className:"-mx-2 flex min-h-0 flex-col gap-3 overflow-y-auto px-2 py-1",children:[b,xe]}),e[54]=b,e[55]=xe,e[56]=T):T=e[56];let ye;e[57]!==D||e[58]!==w||e[59]!==C||e[60]!==V||e[61]!==A||e[62]!==s?(ye=A?i.jsxs(no,{className:"flex-row flex-wrap items-center justify-between gap-2 sm:justify-between",children:[i.jsx(_t,{type:"button",variant:"outline","aria-disabled":w===0,onClick:()=>C(w-1),className:"aria-disabled:cursor-default aria-disabled:opacity-45",children:s("sectionsEditor.formConflict.back")}),i.jsx(_t,{type:"button","data-testid":"form-conflict-primary",onClick:V?D:()=>C(w+1),children:s(V?"sectionsEditor.formConflict.ok":"sectionsEditor.formConflict.next")})]}):i.jsx(no,{className:"items-center gap-2",children:i.jsx(_t,{type:"button","data-testid":"form-conflict-primary",onClick:D,children:s("sectionsEditor.formConflict.ok")})}),e[57]=D,e[58]=w,e[59]=C,e[60]=V,e[61]=A,e[62]=s,e[63]=ye):ye=e[63];let K;return e[64]!==pe||e[65]!==T||e[66]!==ye?(K=i.jsxs(i.Fragment,{children:[pe,T,ye]}),e[64]=pe,e[65]=T,e[66]=ye,e[67]=K):K=e[67],K}function Rc(){return new Set}function Ac(n){const e=Hn(n.mine,n.schema),s=Hn(n.theirs,n.schema),o=e.kind==="text"&&s.kind==="text"?vc(e.text,s.text):null;return a=>o?i.jsx(Mc,{parts:o[a]}):i.jsx(Pc,{preview:a==="mine"?e:s})}const Cc={all:{ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},vertical:{ArrowDown:1,ArrowUp:-1}};function Nc(n,e){const s=Cc[e][n.key];if(!s)return;const o=[...n.currentTarget.querySelectorAll('[role="radio"]')],a=o.indexOf(document.activeElement);if(a<0)return;n.preventDefault();const u=o[(a+s+o.length)%o.length];u?.focus(),u?.click()}function Tc(n){const e=it.c(65),{field:s,choices:o,viewer:a,author:u,onChoose:h,arrows:d}=n,v=u===void 0?null:u,m=Ft(),[j]=Hi(),{language:A}=j;let $,z,H,F,f,k,X,w,I,V,y,C,x,Y;if(e[0]!==d||e[1]!==v||e[2]!==o||e[3]!==s||e[4]!==A||e[5]!==h||e[6]!==m||e[7]!==a?.image||e[8]!==a?.name){const me=Ac(s),le=o[s.pointer]??"mine",ee=a?.image??void 0;let pe;e[23]!==m||e[24]!==a?.name?(pe=a?.name?.trim()||m("sectionsEditor.formConflict.you"),e[23]=m,e[24]=a?.name,e[25]=pe):pe=e[25];let ce;e[26]!==ee||e[27]!==pe?(ce=i.jsx(ms,{url:ee,fallback:pe,shape:"circle",size:"sm",className:"text-xs"}),e[26]=ee,e[27]=pe,e[28]=ce):ce=e[28];const he=ce;let ve;e[29]!==v||e[30]!==he?(ve=v?.you?he:v?.name?i.jsx(ms,{url:v.avatarUrl,fallback:v.name,shape:"circle",size:"sm",className:"text-xs"}):i.jsx(ms,{url:"icon://user",fallback:"",muted:!0,shape:"circle",size:"sm"}),e[29]=v,e[30]=he,e[31]=ve):ve=e[31];const b=ve,B=v?new Date(v.at):null;H="radiogroup",F=s.label,f="flex flex-col gap-2",e[32]!==d?(k=K=>Nc(K,d),e[32]=d,e[33]=k):k=e[33];let xe;e[34]!==s.pointer||e[35]!==h?(xe=()=>h(s.pointer,"mine"),e[34]=s.pointer,e[35]=h,e[36]=xe):xe=e[36];let T;e[37]!==m?(T=m("sectionsEditor.formConflict.you"),e[37]=m,e[38]=T):T=e[38];let ye;e[39]!==m?(ye=m("sectionsEditor.formConflict.yourVersionNotSaved"),e[39]=m,e[40]=ye):ye=e[40],X=i.jsx(mo,{side:"mine",checked:le==="mine",onChoose:xe,avatar:he,who:T,meta:ye,children:me("mine")}),$=mo,w="theirs",I=le==="theirs",e[41]!==s.pointer||e[42]!==h?(V=()=>h(s.pointer,"theirs"),e[41]=s.pointer,e[42]=h,e[43]=V):V=e[43],y=b,e[44]!==v?.name||e[45]!==v?.you||e[46]!==m?(C=v?.you?m("sectionsEditor.formConflict.youElsewhere"):v?.name||m("sectionsEditor.formConflict.someoneElse"),e[44]=v?.name,e[45]=v?.you,e[46]=m,e[47]=C):C=e[47],x=B?m("sectionsEditor.formConflict.savedAt",{when:Ml(B,A)}):m("sectionsEditor.formConflict.theirVersionSaved"),Y=B?Vc(B,A):void 0,z=me("theirs"),e[0]=d,e[1]=v,e[2]=o,e[3]=s,e[4]=A,e[5]=h,e[6]=m,e[7]=a?.image,e[8]=a?.name,e[9]=$,e[10]=z,e[11]=H,e[12]=F,e[13]=f,e[14]=k,e[15]=X,e[16]=w,e[17]=I,e[18]=V,e[19]=y,e[20]=C,e[21]=x,e[22]=Y}else $=e[9],z=e[10],H=e[11],F=e[12],f=e[13],k=e[14],X=e[15],w=e[16],I=e[17],V=e[18],y=e[19],C=e[20],x=e[21],Y=e[22];let D;e[48]!==$||e[49]!==z||e[50]!==w||e[51]!==I||e[52]!==V||e[53]!==y||e[54]!==C||e[55]!==x||e[56]!==Y?(D=i.jsx($,{side:w,checked:I,onChoose:V,avatar:y,who:C,meta:x,metaTitle:Y,children:z}),e[48]=$,e[49]=z,e[50]=w,e[51]=I,e[52]=V,e[53]=y,e[54]=C,e[55]=x,e[56]=Y,e[57]=D):D=e[57];let ge;return e[58]!==H||e[59]!==F||e[60]!==f||e[61]!==k||e[62]!==X||e[63]!==D?(ge=i.jsxs("div",{role:H,"aria-label":F,className:f,onKeyDown:k,children:[X,D]}),e[58]=H,e[59]=F,e[60]=f,e[61]=k,e[62]=X,e[63]=D,e[64]=ge):ge=e[64],ge}const Vc=(n,e)=>n.toLocaleString(e,{dateStyle:"medium",timeStyle:"short"});function mo(n){const e=it.c(28),{side:s,checked:o,onChoose:a,avatar:u,who:h,meta:d,metaTitle:v,children:m}=n,j=R.useId(),A=`${j}-who`,$=`${j}-meta ${j}-value`,z=o?0:-1,H=o?"border-primary bg-primary/5 ring-1 ring-primary":"hover:bg-accent";let F;e[0]!==H?(F=ae("grid w-full cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-3 rounded-xl border bg-background p-3 text-left transition-[border-color,box-shadow,background-color] focus-ring",H),e[0]=H,e[1]=F):F=e[1];const f=`${j}-who`;let k;e[2]!==f||e[3]!==h?(k=i.jsx("span",{id:f,className:"text-sm font-medium text-foreground",children:h}),e[2]=f,e[3]=h,e[4]=k):k=e[4];const X=`${j}-meta`;let w;e[5]!==d||e[6]!==v||e[7]!==X?(w=i.jsx("span",{id:X,title:v,children:d}),e[5]=d,e[6]=v,e[7]=X,e[8]=w):w=e[8];let I;e[9]!==k||e[10]!==w?(I=i.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-1.5 text-xs text-muted-foreground",children:[k,w]}),e[9]=k,e[10]=w,e[11]=I):I=e[11];const V=`${j}-value`,y=`conflict-${s}`;let C;e[12]!==m||e[13]!==V||e[14]!==y?(C=i.jsx("span",{id:V,"data-testid":y,className:"min-w-0 text-sm",children:m}),e[12]=m,e[13]=V,e[14]=y,e[15]=C):C=e[15];let x;e[16]!==I||e[17]!==C?(x=i.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[I,C]}),e[16]=I,e[17]=C,e[18]=x):x=e[18];let Y;return e[19]!==u||e[20]!==o||e[21]!==a||e[22]!==A||e[23]!==x||e[24]!==$||e[25]!==z||e[26]!==F?(Y=i.jsxs("button",{type:"button",role:"radio","aria-checked":o,"aria-labelledby":A,"aria-describedby":$,tabIndex:z,onClick:a,className:F,children:[u,x]}),e[19]=u,e[20]=o,e[21]=a,e[22]=A,e[23]=x,e[24]=$,e[25]=z,e[26]=F,e[27]=Y):Y=e[27],Y}function Mc(n){const e=it.c(4),{parts:s}=n;let o;e[0]!==s?(o=s.map(Dc),e[0]=s,e[1]=o):o=e[1];let a;return e[2]!==o?(a=i.jsx("span",{className:"whitespace-pre-wrap break-words",children:o}),e[2]=o,e[3]=a):a=e[3],a}function Dc(n,e){return n.kind==="changed"?i.jsx("mark",{className:"rounded-sm bg-warning/20 px-0.5 text-foreground",children:n.text},e):i.jsx("span",{children:n.text},e)}function Pc(n){const e=it.c(29),{preview:s}=n,o=Ft();switch(s.kind){case"empty":{let a;e[0]!==o?(a=o("sectionsEditor.formConflict.empty"),e[0]=o,e[1]=a):a=e[1];let u;return e[2]!==a?(u=i.jsx("span",{className:"italic text-muted-foreground",children:a}),e[2]=a,e[3]=u):u=e[3],u}case"text":{let a;return e[4]!==s.text?(a=i.jsx("span",{className:"whitespace-pre-wrap break-words",children:s.text}),e[4]=s.text,e[5]=a):a=e[5],a}case"image":{let a;return e[6]!==s.src?(a=i.jsx("img",{src:s.src,alt:"",className:"max-h-24 max-w-full rounded border object-contain"}),e[6]=s.src,e[7]=a):a=e[7],a}case"yesNo":{const a=s.value?"sectionsEditor.formConflict.yes":"sectionsEditor.formConflict.no";let u;e[8]!==o||e[9]!==a?(u=o(a),e[8]=o,e[9]=a,e[10]=u):u=e[10];let h;return e[11]!==u?(h=i.jsx("span",{children:u}),e[11]=u,e[12]=h):h=e[12],h}case"list":{const a=s.count===1?"sectionsEditor.formConflict.oneItem":"sectionsEditor.formConflict.items",u=String(s.count);let h;e[13]!==o||e[14]!==a||e[15]!==u?(h=o(a,{count:u}),e[13]=o,e[14]=a,e[15]=u,e[16]=h):h=e[16];let d;e[17]!==h?(d=i.jsx("span",{className:"text-muted-foreground",children:h}),e[17]=h,e[18]=d):d=e[18];let v;e[19]!==s.count||e[20]!==s.items?(v=s.items.some(Boolean)&&i.jsxs("span",{className:"flex flex-col",children:[s.items.map(Bc),s.count>s.items.length&&i.jsx("span",{children:"…"})]}),e[19]=s.count,e[20]=s.items,e[21]=v):v=e[21];let m;return e[22]!==d||e[23]!==v?(m=i.jsxs("span",{className:"flex flex-col gap-1",children:[d,v]}),e[22]=d,e[23]=v,e[24]=m):m=e[24],m}case"fields":{let a;e[25]!==s.entries?(a=s.entries.map(Ic),e[25]=s.entries,e[26]=a):a=e[26];let u;return e[27]!==a?(u=i.jsx("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-0.5",children:a}),e[27]=a,e[28]=u):u=e[28],u}}}function Ic(n){return i.jsxs("div",{className:"contents",children:[i.jsx("dt",{className:"text-muted-foreground",children:n.label}),i.jsx("dd",{className:"truncate",children:n.text})]},n.label)}function Bc(n,e){return i.jsx("span",{className:"truncate",children:`${e+1}. ${n||"…"}`},e)}function Kc(n,e){return n.kind==="protocol"&&n.source==="github"?e:null}function Fc(n,e){if(Object.hasOwn(n,e))return n[e]??null;const s=Yr(e),o=Object.keys(n).find(a=>Yr(a)===s);return o===void 0?null:n[o]??null}async function Oc(n,e){try{const s=await fetch(`/api/${n.orgSlug}/decofile/${encodeURIComponent(n.virtualMcpId)}/${encodeURIComponent(n.branch)}`,{cache:"no-store",headers:Ca("v8")});if(!s.ok)return null;const o=await s.json().catch(()=>({})),a=Fc(o.changedBy??{},e);return a&&typeof a.userId=="string"&&Number.isFinite(Date.parse(a.at))?a:null}catch{return null}}function Lc(n,e,s){const o=e.find(h=>h.userId===n.userId),a=o?.user?.name?.trim(),u=o?.user?.image??void 0;return{...a?{name:a}:{},...u?{avatarUrl:u}:{},at:n.at,you:!!s&&n.userId===s}}function $c(n){let e=2166136261,s=0;for(let o=0;o<n.length;o++){const a=n.charCodeAt(o);e=Math.imul(e^a,16777619),s=Math.imul(s,31)+a|0}return`${(e>>>0).toString(36)}${(s>>>0).toString(36)}:${n.length}`}function zc(n,e,s){const o=it.c(19),a=!!n&&!!e&&s!==null;let u;o[0]!==e||o[1]!==n||o[2]!==s?(u=xo.conflictAuthor(n?`${n.orgSlug}/${n.virtualMcpId}/${n.branch}`:"",e??"",s??""),o[0]=e,o[1]=n,o[2]=s,o[3]=u):u=o[3];let h;o[4]!==e||o[5]!==n?(h=()=>Oc(n,e),o[4]=e,o[5]=n,o[6]=h):h=o[6];let d;o[7]!==a||o[8]!==u||o[9]!==h?(d={queryKey:u,queryFn:h,enabled:a,staleTime:Number.POSITIVE_INFINITY,gcTime:6e5,retry:!1,refetchOnWindowFocus:!1},o[7]=a,o[8]=u,o[9]=h,o[10]=d):d=o[10];const{data:v}=Wi(d),m=a?v??null:null,j=!!m;let A;o[11]!==j?(A={enabled:j},o[11]=j,o[12]=A):A=o[12];const{data:$}=Pl(A);let z;o[13]!==$?(z=$?.data?.members??[],o[13]=$,o[14]=z):z=o[14];const H=z,{data:F}=vo.useSession();if(!m)return null;const f=F?.user?.id??null;let k;return o[15]!==m||o[16]!==H||o[17]!==f?(k=Lc(m,H,f),o[15]=m,o[16]=H,o[17]=f,o[18]=k):k=o[18],k}function Hc(n,e,s,o){if(!n||typeof n!="object")return{kind:"error",reason:"no-matcher-rule"};const a=e.trim();if(!a)return Gt(n,s,o)?{kind:"inline",blockKey:n.__resolveType??"",inlinedRule:xs(n,s,o)}:{kind:"noop"};const u=ys(n,s,o);if(!u)return{kind:"error",reason:"unreadable-rule"};if(u.blockKey)return{kind:"updateBlock",blockKey:u.blockKey,blockData:Kt(u.resolveType,u.data,a)};const h=Fn(a),d=On(h,s);return d?{kind:"error",reason:"invalid-block-id",message:d}:{kind:"createBlock",blockId:h,blockData:Kt(u.resolveType,u.data,a),reference:on(h)}}const po="section-form-stale-save",Wc=3,qc=1e3;function ho(n,e){const s=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:yo(e.pageKey?n[e.pageKey]?.sections:void 0,n),o=Math.max(0,Math.min(e.pageVariantIndex,s.length-1)),a=s[o]?.sections??[];return{pageVariants:s,variantIndex:o,rawSections:a,parsedSections:_n(a,n)}}const go=new WeakMap;let Gc=0;function Uc(n){let e=go.get(n);return e===void 0&&(e=++Gc,go.set(n,e)),e}function em({orgSlug:n,virtualMcpId:e,branch:s,previewReady:o=!0,previewUrl:a,currentPath:u,activePageBlockKey:h=null,activeGlobalBlockKey:d=null,externalSelection:v,onSaved:m,initialEditSeo:j=!1,onExitSeo:A,onSelectRoot:$,onViewJsonFile:z,onFocusedBlockChange:H,onVariantPreviewOverride:F}){const f=Ft(),k=Ui(),X=k?.taskId??null,w=o?{orgSlug:n,virtualMcpId:e,branch:s,threadId:X,previewUrl:a}:null,[I,V]=R.useState([]),{data:y,isLoading:C}=Na(w,{pollWhile:I.length>0}),{data:x,isLoading:Y}=oa(w),D=Wn(),ge=k?.virtualMcpId,le=_a(ge===e?e:null)?.metadata?.siteSlug??null,ee=El({virtualMcpId:e,branch:s,sandboxUrl:a}),pe=Ta(e,s),ce=Va(pe),he=!ce,ve=!!ee||ce,[b,B]=R.useState(null),[xe,T]=R.useState(null),[ye,K]=R.useState(null),[Se,ue]=R.useState(0),[te,se]=R.useState(void 0),[Te,Z]=R.useState(null),[_e,be]=R.useState(null),[q,O]=R.useState([]),Ke=R.useRef(null),[Qe,Xe]=R.useState(q.length);Qe!==q.length&&(Xe(q.length),requestAnimationFrame(()=>{Ke.current&&(Ke.current.scrollTop=0)}));const[Ye,Q]=R.useState(0),[ke,He]=R.useState(null),[We,Ee]=R.useState(null),[Ie,Ve]=R.useState(null),[Ze,Fe]=R.useState(!1),[re,dt]=R.useState(!1),ne=R.useRef(null),[Me,yt]=R.useState(!0),[et,ft]=R.useState(!1),[Ot,kn]=R.useState(!1),[qe,an]=R.useState(j),[Cs,Ns]=R.useState(j);j&&!Cs&&(Ns(!0),an(!0),B(null),T(null),K(null),O([])),!j&&Cs&&Ns(!1);const[Vo,ln]=R.useState(null),[Ts,En]=R.useState(void 0),[Vs,Lt]=R.useState([]),[Ms,Yt]=R.useState(0),[Je,at]=R.useState(0),[Mo,tt]=R.useState(null),[Jt,st]=R.useState(null),[Ds,Ps]=R.useState(null),Is=qi(),Bs=Ma({orgSlug:n,virtualMcpId:e,branch:s},{tunnel:!1}),cn=ia({orgSlug:n,virtualMcpId:e,branch:s}),[Do,Po]=R.useState(u),[Io,Bo]=R.useState(h),[Ko,Fo]=R.useState(d);(Do!==u||Io!==h||Ko!==d)&&(queueMicrotask(()=>cn.flush()),Po(u),Bo(h),Fo(d),B(null),T(null),K(null),ue(0),Z(null),be(null),at(0),tt(null),st(null),O([]),Q(t=>t+1),an(!1),ln(null),En(void 0),Lt([]),Yt(t=>t+1));const G=aa({orgSlug:n,virtualMcpId:e,branch:s}),un=ba((t,r)=>{G.mutate({blockKey:t,data:r},{onSuccess:()=>m?.(),onError:G.reportError})}),Rn=Fa({orgSlug:n,virtualMcpId:e,branch:s}),[Qt,Xt]=R.useState(!1),W=R.useRef(null),At=R.useRef(null),mt=R.useRef(null),pt=R.useRef(null),An=R.useRef({}),$t=R.useRef(null),dn=R.useRef(!1),fn=R.useRef(!1),Oe=R.useRef(new Map),Zt=R.useRef(!1),St=R.useRef([]),qn=R.useRef(new WeakSet);Da(n,e,t=>{const{activePageKey:r,rawSections:l,parsedSections:c,selectedSectionIndex:p}=Le.current,S=new Set;r&&S.add(r);for(const g of[At.current?.sectionIndex,p]){const _=g==null?void 0:l[g],L=g==null?void 0:c[g],N=_&&L?.isSavedBlock?ds(_,L):null;N&&S.add(N)}if([...S].some(g=>t.has(g))){for(const g of[W,mt,pt])g.current&&clearTimeout(g.current),g.current=null;At.current=null,Oe.current.clear(),r&&t.has(r)&&(An.current={})}});const Le=R.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Ks,Fs]=R.useState(0),[Oo,Lo]=R.useState(0),$o=zc(Kc(pe,{orgSlug:n,virtualMcpId:e,branch:s}),I[0]?.blockKey??null,I[0]?$c(ze(I[0].plan.theirs)):null),[zo,Ho]=R.useState(null),Gn=Pa(n,e).epoch,[Wo,qo]=R.useState(Gn);if(!o||C||Y)return i.jsx("div",{className:"h-full w-full flex items-center justify-center",children:i.jsx(Gi,{className:"size-5 text-muted-foreground"})});if(!y||!x)return i.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Go=za(y,x),ie=!!d,je=ie?null:Ha(Go,u,h),E=ie?d:je?.key??null,Un=ie&&d?y[d]:void 0,Os=ie&&d&&Un?Wa(d,Un):ie&&d?d:"",mn=!ie&&E&&y[E]?y[E]:null,Yn=qe&&y&&x&&E&&je?Kr(y,{kind:"page",pageKey:E,pageName:String(je.name??""),path:String(je.path??"")},x):null,Uo=qe?mn?.seo:void 0,Cn=Ts!==void 0?Ts:Uo,Yo=qe?la(Cn):void 0,Ls=Yn?.seoTypeOptions??[],$s=qe&&x?ca(x):"",Jn=Vo??Yo??{},Nn=qe&&Yn?Il(Jn,Yn):null,zs=qe&&Nn&&ua(Cn)?Kn(Nn,x):null,Hs=qe?da(y,x)?.seoData:void 0,De=ie?[{label:"Default",sections:[{__resolveType:d}]}]:yo(mn?.sections,y??{}),ht=De.length>1,we=Math.min(Se,De.length-1),rt=De[we],U=rt?.sections??[],Pe=_n(U,y),Qn=!ie&&qa(mn?.sections);if(ie&&d&&Ds!==d){Ps(d);const t=U[0],r=Pe[0];if(t&&r){B(0),at(0),O([]);const l=jt(t,r,y);l&&(T(l.data),K(l.resolveType),st(null),tt(null))}}!ie&&Ds!==null&&Ps(null),Le.current={rawSections:U,parsedSections:Pe,decofile:y??{},activePageKey:E,pageVariants:De,variantIndex:we,sectionVariantIndex:Je,selectedSectionIndex:b};const Jo=()=>({multivariate:Qn,index:we,variants:De.map(t=>({rule:t.rule}))}),Xn=(t,r)=>{if(!F)return;if(!E||!Qn||t.length<=1){F(null);return}const l={multivariate:!0,index:r,variants:t},c=ce?ro(E,l):oo(E,l,y,x);F(c.length>0?c:null)},Zn=F&&E&&Qn&&ht&&!C&&!Y?E:null;if(Zn!==zo&&(Ho(Zn),Zn)){const t=De.map(l=>({rule:l.rule})),r=we;queueMicrotask(()=>Xn(t,r))}const en=(t,r,l)=>{if(!F)return;if(!E){F(null);return}const c=Jo(),p=ce?ro(E,c):oo(E,c,y,x);if(!t||r<0){F(p.length>0?p:null);return}const S={pageKey:E,page:c,sectionIndex:r,sectionLazy:Pe[r]?.isLazy??!1,mvObj:t,selectedVariantIndex:l},g=ce?Kl(S):Fl({...S,decofile:y,meta:x}),_=[...p,...g];F(_.length>0?_:null)},bt=(t,r,l,c=b??-1,p=!1)=>{const S=xt(t,r);if(!S){T(null),K(null),st(null),tt(null),p&&en(null,c,l);return}const _=vs(S,wt)[l];if(!_){T(null),K(null),st(null),tt(null),p&&en(null,c,l);return}const L=jo(_.value,y);T(L?.data??null),K(L?.resolveType??null);const{resolveType:N,formValue:M}=jn(_.rule,y,x??void 0);st(N),tt(M),p&&en(S,c,l)},pn=v?.index;if(v!==void 0&&(v?.seq??null)!==te&&(se(v?.seq??null),typeof pn=="number")){const t=U[pn],r=Pe[pn];if(t&&r)if(B(pn),at(0),O([]),Q(l=>l+1),r.isMultivariate)bt(t,r,0,pn);else{const l=jt(t,r,y);l?(T(l.data),K(l.resolveType)):(T(null),K(null)),st(null),tt(null)}}if(Gn!==Wo){qo(Gn);const t=W.current!==null||Oe.current.size>0||pt.current!==null||mt.current!==null||G.isPending||cn.isPending||I.length>0,r=b!==null&&co(Ke.current,document.activeElement);if(!t&&r&&(Zt.current=!0),!t&&!r&&b!==null){const l=U[b],c=Pe[b];if(O([]),Q(p=>p+1),!l||!c)B(null),T(null),K(null);else if(c.isMultivariate)bt(l,c,Je,b);else{const p=jt(l,c,y);T(p?.data??null),K(p?.resolveType??null)}}!t&&qe&&(ln(null),En(void 0),Yt(l=>l+1))}if(Ks!==Oo){Lo(Ks);const t=b!==null?U[b]:null,r=b!==null?Pe[b]:null;if(t&&r&&b!==null)if(O([]),Q(l=>l+1),r.isMultivariate)bt(t,r,Je,b);else{const l=jt(t,r,y);T(l?.data??null),K(l?.resolveType??null)}}const lt=I[0];if(lt){const{formBase:t,target:r}=lt,l=ho(y,r),c=t.sectionIndex,p=l.rawSections.length===t.sectionCount?hs(l.rawSections[c],l.parsedSections[c],r.sectionVariantIndex,y):null,S=ac(lt,p,g=>ao(t,g));if(S){const _=[{...lt,...S,changedAgain:!0},...I.slice(1)];St.current=_,V(_)}}const hn={orgSlug:n,virtualMcpId:e,branch:s,threadId:X,previewUrl:ce?void 0:a??void 0,siteSlug:le},Tn=ye&&x?Kn(ye,x):null,ct=(t,r)=>{if(!E)return;W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear(),pt.current&&(clearTimeout(pt.current),pt.current=null),mt.current&&(clearTimeout(mt.current),mt.current=null);const l=Sn(y,E,t,we,De);G.mutate({blockKey:E,data:l},{onSuccess:()=>r?.onSuccess?.()??m?.(),onError:c=>{r?.onError?.(),G.reportError(c)}})},zt=()=>{H?.(null),B(null),kn(!1),T(null),K(null),at(0),tt(null),st(null),O([]),Q(t=>t+1)},Ws=()=>co(Ke.current,document.activeElement),es=(t=f("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear(),At.current=null,oe.error(t,{id:po}),Ws()){Zt.current=!0;return}Fs(r=>r+1)},qs=()=>{!Zt.current||Ws()||St.current.length>0||W.current!==null||dn.current||fn.current||Oe.current.size>0||(Zt.current=!1,Fs(t=>t+1))},Gs=()=>{Zt.current&&setTimeout(qs,0)},Us=t=>Ba(Is,Bs,t),Ys=t=>{Oe.current.size!==0&&setTimeout(()=>{if(dn.current||fn.current)return;const r=[...Oe.current.values()];Oe.current.clear();for(const l of r)l()},t)},Qo=t=>{const{activePageKey:r,variantIndex:l,sectionVariantIndex:c}=Le.current,p=$t.current;return{formBase:p?.sectionIndex===t&&p.variantIndex===c?p:null,pageKey:r,global:ie,pageVariantIndex:l,sectionVariantIndex:c,schema:Tn}},gn=t=>{St.current=t,V(t)},Xo=t=>{const r=St.current,l=r.findIndex(S=>S.formBase===t.formBase),c=l>=0?r[l]:void 0,p=c?r.with(l,{...t,choices:ks(c.plan,c.choices,t.plan),fresh:No(c.plan,t.plan,c.fresh),changedAgain:c.changedAgain||ze(c.plan.theirs)!==ze(t.plan.theirs)}):[...r,{...t,changedAgain:qn.current.has(t.formBase)}];gn(p)},Js=(t,r)=>{const l=St.current,c=l.findIndex(g=>g.formBase===t),p=l[c];if(!p)return!1;if(ze(p.plan.mine)===ze(r))return!0;const S=ws({...p.plan,mine:r});if(S.pointers.length===0){const g=l.filter(_=>_!==p);return gn(g),!1}return gn(l.with(c,{...p,plan:S,choices:ks(p.plan,p.choices,S)})),!0},Zo=t=>{const r=Le.current;return r.selectedSectionIndex===t.formBase.sectionIndex&&r.activePageKey===t.target.pageKey&&r.variantIndex===t.target.pageVariantIndex&&r.sectionVariantIndex===t.target.sectionVariantIndex},ei=()=>{const t=St.current[0];if(!t)return null;const{formBase:r,target:l}=t;W.current&&At.current?.sectionIndex===r.sectionIndex&&At.current.sectionVariantIndex===l.sectionVariantIndex&&(clearTimeout(W.current),W.current=null,At.current=null),Oe.current.delete(`${l.pageKey}:${r.sectionIndex}:${l.sectionVariantIndex}`);const c=r.emitted;return c&&typeof c=="object"&&!Js(r,c)&&vn(c,r.sectionIndex,0,l),St.current[0]??null},ti=()=>{const t=St.current[0],r=ei();if(!r||!t||r.formBase!==t.formBase||r.plan.pointers.some(S=>!t.plan.pointers.includes(S)))return;const l=oc(r.plan,r.choices);gn(St.current.slice(1));const{formBase:c,target:p}=r;c.base=r.plan.theirs,c.version=void 0,c.emitted=l,qn.current.add(c),($t.current===c||Zo(r))&&($t.current=c,T(l),Q(S=>S+1)),vn(l,c.sectionIndex,0,p)},ni=t=>{const[r,...l]=St.current;r&&gn([{...r,choices:t},...l])},vn=(t,r,l=0,c)=>{const p=c??Qo(r),S=p.sectionVariantIndex,g=p.formBase,_=At.current;W.current&&(clearTimeout(W.current),W.current=null,_&&(_.sectionIndex!==r||_.sectionVariantIndex!==S)&&_.write());const L=`${p.pageKey}:${r}:${S}`,N=()=>{if(dn.current||fn.current){Oe.current.set(L,N);return}const M=typeof t=="function"?t():t;if(g&&Js(g,M))return;const P=Le.current.decofile,{rawSections:de,parsedSections:Re,pageVariants:nt,variantIndex:Be}=ho(P,p),Ge=p.pageKey,J=de[r];if(!J)return;const fe=Re[r];if(!fe)return;const Ce=g?.base,Ue=hs(J,fe,S,P),gt=!!Ce&&!!Ue&&Ro(Ce,Ue)&&!(g&&ao(g,Ue));if(gt&&Ce&&Ue){if(Ao(Ce,Ue)){es(f("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const Ae=fe.isSavedBlock?"here":sc(Ce,de.map((Ne,Dt)=>hs(Ne,Re[Dt],S,P)),r,g?.sectionCount??de.length);if(Ae==="unknown"){es(f("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof Ae=="number"&&g){g.sectionCount=de.length,g.sectionIndex=Ae,$t.current===g&&B(Ae),vn(M,Ae,l,p);return}}const ot=gt&&Ce&&Ue?ws({ancestor:Ce,mine:M,theirs:Ue}):null;if(ot&&ot.pointers.length>0&&g){g.sectionCount=de.length,Xo({plan:ot,formBase:g,target:p,sectionIndex:r,choices:Co(ot),changedAgain:!1,blockKey:fe.isSavedBlock?ds(J,fe):Ge,fresh:{}});return}const vt=ot?ot.merged:null,Mt=vt??M,Dr=rc({merged:!!vt,tracked:g,current:$t.current,saved:M});vt&&oe.info(f("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:po}),Dr&&g&&(g.emitted=vt,T(vt));const cs=Dr||!vt?Mt:M;g&&(g.base=cs,g.sectionCount=de.length,tc(g,cs));const Pr={onSuccess:()=>{g&&qn.current.delete(g),m?.()},onError:Ae=>{if(g?.base===cs&&Ce&&(g.base=Ce),Ae instanceof Ia){g&&(g.version=void 0),l<Wc?(Oe.current.delete(L),fn.current=!0,setTimeout(()=>{fn.current=!1,vn(()=>{const Ne=g?.emitted;return Ne&&typeof Ne=="object"?Ne:M},r,l+1,p),Oe.current.delete(L),Ys(bn)},qc*2**l)):es();return}G.reportError(Ae)}},Ir=Ae=>{dn.current=!0;let Ne=!1;G.mutateAsync(Ae).then(()=>Pr.onSuccess(),Dt=>{Ne=!0,Pr.onError(Dt)}).finally(()=>{dn.current=!1,Ys(Ne?bn:0),qs()})};if(fe.isSavedBlock){const Ae=ds(J,fe);if(!Ae)return;Ir({blockKey:Ae,data:Mt,...Ce?{base:{value:vt?Ue:Ce}}:{},rebaseOnConflict:!1,guard:lo({formBase:g,rebased:!!vt,versionOf:Us})});return}if(!Ge)return;const In={...P[Ge]},Wt=[...de];if(fe.isMultivariate){const Ae=xt(J,fe);if(!Ae||!Ge)return;const Ne=il(Ae,S,Mt);Wt[r]=qt(J,fe,Ne)}else if(fe.isHidden){const Ae=Rs(J.__resolveType),Ne=Ae?{...J.section}:{...J},Dt=Array.isArray(Ne.variants)?[...Ne.variants]:[];Dt[0]&&(Dt[0]={...Dt[0],value:Mt}),Ne.variants=Dt,Ae?Wt[r]={...J,section:Ne}:Wt[r]=Ne}else fe.isLazy?Wt[r]={...J,section:Mt}:Wt[r]=Mt;if(nt.length>1){const Ae=In.sections,Ne=[...Ae?.variants??[]];Ne[Be]&&(Ne[Be]={...Ne[Be],value:Wt}),In.sections={...Ae,variants:Ne}}else In.sections=Wt;Ir({blockKey:Ge,data:In,rebaseOnConflict:!1,guard:lo({formBase:null,rebased:!1,versionOf:Us})})};At.current={sectionIndex:r,sectionVariantIndex:S,write:N},W.current=setTimeout(()=>{W.current=null,N()},bn)},si=t=>{Zt.current=!1,B(t),at(0),O([]),Q(p=>p+1);const r=U[t],l=Pe[t];if(H?.(l?.isSavedBlock?l.resolveType??null:null),!r||!l)return;if(l.isMultivariate){bt(r,l,0,t);return}const c=jt(r,l,y);if(!c){T(null),K(null),st(null),tt(null),en(null,t,0);return}T(c.data),K(c.resolveType),st(null),tt(null),en(null,t,0)},Qs=t=>{const r=t;b!==null&&($t.current=nc($t.current,{sectionIndex:b,variantIndex:Le.current.sectionVariantIndex,shown:xe,next:r,sectionCount:Le.current.rawSections.length})),T(r),b!==null&&vn(r,b)},ts=t=>{if(!E||!y||!x||!je)return;const r={kind:"page",pageKey:E,pageName:String(je.name??""),path:String(je.path??"")},l=Kr(y,r,x);l&&cn.save(E,()=>{const c=Is.getQueryData(xo.decofile(Bs))?.[E];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const p={...c,...An.current};return An.current={},t?.raw!==void 0?{...p,seo:t.raw}:t?.inner!==void 0?Bl(r,l,p,t.inner):p})},Xs=(t,r)=>{E&&(An.current[t]=r,ts())},ri=(t,r)=>{if(!E)return;const l=Ln([...U],t,r);b!==null&&(b===t?B(r):t<b&&r>=b?B(b-1):t>b&&r<=b&&B(b+1)),ct(l)},oi=t=>{if(!E)return;const r=U.filter((l,c)=>c!==t);b===t?zt():b!==null&&b>t&&B(b-1),ct(r)},ii=t=>{if(!E)return;const r=U[t];if(!r)return;const l=[...U];l.splice(t+1,0,ja(r)),b!==null&&b>t&&B(b+1),ct(l)},ai=t=>{if(!E)return;const r=U[t],l=Pe[t];if(!r||!l)return;const c=l.isHidden?tl(r):nl(r);if(!c)return;const p=[...U];p[t]=c,b===t&&zt(),ct(p)},li=t=>{if(!E)return;const r=U[t],l=Pe[t];if(!r||!l||l.isMultivariate)return;const c=el(r);if(!c)return;const p=[...U];p[t]=c,b===t&&zt(),ct(p)},ci=t=>{if(!E)return;const r=U[t],l=Pe[t];if(!r||!l?.isSavedBlock)return;const c=jt(r,l,y);if(!c?.data)return;const{name:p,...S}=c.data,g=[...U];l.isLazy?g[t]={...r,section:S}:g[t]=S,b===t&&zt(),ct(g)},ui=t=>{if(!E)return;const r=[...U,{__resolveType:t.resolveType}],l=r.length-1;ct(r,{onError:()=>{Le.current.selectedSectionIndex===l&&zt()}}),Fe(!1),B(l),at(0),O([]),Q(g=>g+1);const c=r[l],p=_n(r,y)[l];if(!c||!p)return;if(p.isMultivariate){bt(c,p,0);return}const S=jt(c,p,y);if(!S){T(null),K(null),st(null),tt(null);return}T(S.data),K(S.resolveType),st(null),tt(null)},Zs=t=>{ne.current=t.append,Fe(!0)},di=t=>{const r=ne.current;if(!r){ui(t);return}r({__resolveType:t.resolveType}),Fe(!1),ne.current=null},er=t=>{if(b===null)return;const r=U[b],l=Pe[b];!r||!l?.isMultivariate||(at(t),O([]),Q(c=>c+1),bt(r,l,t,b,!0))},fi=t=>{if(b===null||!E)return;const r=U[b],l=Pe[b];if(!r||!l?.isMultivariate)return;const c=xt(r,l);if(!c)return;const p=Xa(c,t);if(!p){oe.error(f("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const S=[...U];S[b]=qt(r,l,p);const g=p.variants;let _=Je;t===Je?_=Math.min(t,g.length-1):t<Je&&(_=Je-1),at(_),O([]),Q(L=>L+1),bt(S[b],l,_),ct(S)},mi=t=>{if(b===null||!E)return;const r=U[b],l=Pe[b];if(!r||!l?.isMultivariate)return;const c=xt(r,l);if(!c)return;const p=Za(c,t),S=[...U];S[b]=qt(r,l,p);const g=t+1;at(g),O([]),Q(_=>_+1),bt(S[b],l,g),ct(S)},pi=(t,r)=>{if(b===null||!E||t===r)return;const l=U[b],c=Pe[b];if(!l||!c?.isMultivariate)return;const p=xt(l,c);if(!p)return;const S=Ja(p,t,r),g=[...U];g[b]=qt(l,c,S);let _=Je;Je===t?_=r:t<Je&&r>=Je?_=Je-1:t>Je&&r<=Je&&(_=Je+1),at(_),bt(g[b],c,_),ct(g)},xn=t=>{const r=t??b;if(r===null||!E)return;const l=U[r],c=Pe[r];if(!l||!c)return;const p=Ga(l,c);if(!p){oe.error(f("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const S=[...U];S[r]=p.section;const g=_n(S,y)[r];if(!g?.isMultivariate){oe.error(f("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}B(r),at(p.newVariantIndex),O([]),Q(_=>_+1),bt(p.section,g,p.newVariantIndex,r),ct(S)},tr=()=>{if(b===null||!E)return;const t=U[b],r=Pe[b];if(!t||!r?.isMultivariate)return;const l=xt(t,r);if(!l)return;const c=Qa(t,r,l);if(!c){oe.error(f("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const p=[...U];p[b]=c;const S=_n(p,y)[b];if(!S)return;at(0),st(null),tt(null),O([]),Q(_=>_+1);const g=jt(c,S,y);g?(T(g.data),K(g.resolveType)):(T(null),K(null)),en(null,b,0),ct(p)},hi=async t=>{if(ke===null||!E)return;const r=On(t,y,x);if(r){oe.error(r);return}const l=U[ke],c=Pe[ke];if(!l||!c)return;const p=jt(l,c,y);if(!p){oe.error(f("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const S={...p.data,name:t};try{await G.mutateAsync({blockKey:t,data:S});const g=[...U];g[ke]={__resolveType:t},await G.mutateAsync({blockKey:E,data:Sn(y,E,g,we,De)}),b===ke&&zt(),He(null),oe.success(f("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),m?.()}catch(g){oe.error(f("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Pt(f,It(g))})}},nr=rt?.rule;if(ht&&b===null&&_e===null&&nr){const{resolveType:t,formValue:r}=jn(nr,y??{},x??void 0);be(t),Z(r)}const tn=x?fa(x):[],ns=x&&y?ma(x,y):[],sr=!ie&&!!(ve&&x&&y),rr=_e&&x?Kn(_e,x):null,Ct=()=>{mt.current&&(clearTimeout(mt.current),mt.current=null),pt.current&&(clearTimeout(pt.current),pt.current=null)},Ht=async(t,r)=>{if(!(ol(r,t,x)>0))try{await Rn.mutateAsync({blockKey:t})}catch(l){oe.error(f("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Pt(f,It(l))})}},or=t=>{mt.current&&clearTimeout(mt.current),mt.current=setTimeout(()=>{const{activePageKey:r,decofile:l,variantIndex:c}=Le.current;if(!r)return;const p={...l[r]},S={...p.sections},g=[...S.variants??[]],_=g[c],L=_?.rule;if(Gt(L,l,x)){const N=L?.__resolveType??"",M=l[N],P=typeof M?.name=="string"?M.name:N,{__resolveType:de,...Re}=t;G.mutate({blockKey:N,data:Kt(de??"",Re,P)},{onSuccess:()=>m?.(),onError:G.reportError});return}_&&(g[c]={..._,rule:t}),p.sections={...S,variants:g},G.mutate({blockKey:r,data:p},{onSuccess:()=>m?.(),onError:G.reportError})},bn)},ir=t=>{be(t);const r=t?Jr(t,x):{__resolveType:Qr};Z(t?r:{}),or(r)},ar=t=>{const r=t;Z(r);const l=_e?{__resolveType:_e,...r}:{...r};or(l)},lr=async t=>{Ct();const{activePageKey:r,decofile:l,variantIndex:c}=Le.current;if(!r)return;const p=l[r],S=p?.sections;if(!S||typeof S!="object"||Array.isArray(S))return;const g=S;if(!Array.isArray(g.variants))return;const _=[...g.variants],L=_[c];if(!L)return;const N=Bt(L.rule,l,x),M=on(t);_[c]={...L,rule:M};const P={...l,[r]:{...p,sections:{...g,variants:_}}},{resolveType:de,formValue:Re}=jn(M,P,x??void 0);be(de),Z(Re);try{await G.mutateAsync({blockKey:r,data:P[r]}),N&&N!==t&&await Ht(N,P),m?.()}catch(nt){oe.error(f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Pt(f,It(nt))})}},cr=t=>{pt.current&&clearTimeout(pt.current);const{selectedSectionIndex:r,sectionVariantIndex:l}=Le.current;r!==null&&(pt.current=setTimeout(()=>{const{rawSections:c,parsedSections:p,decofile:S,activePageKey:g,pageVariants:_,variantIndex:L}=Le.current;if(!g)return;const N=c[r],M=p[r];if(!N||!M?.isMultivariate)return;const P=xt(N,M);if(!P)return;const Re=(P.variants??[])[l]?.rule;if(Gt(Re,S,x)){const J=Re?.__resolveType??"",fe=S[J],Ce=typeof fe?.name=="string"?fe.name:J,{__resolveType:Ue,...gt}=t;G.mutate({blockKey:J,data:Kt(Ue??"",gt,Ce)},{onSuccess:()=>m?.(),onError:G.reportError});return}const nt=Xr(P,l,t),Be=[...c];Be[r]=qt(N,M,nt);const Ge=Sn(S,g,Be,L,_);G.mutate({blockKey:g,data:Ge},{onSuccess:()=>m?.(),onError:G.reportError})},bn))},gi=t=>{st(t);const r=t?Jr(t,x):{__resolveType:Qr};tt(t?r:{}),cr(r)},vi=t=>{const r=t;tt(r);const l=Jt?{__resolveType:Jt,...r}:{...r};cr(l)},xi=async t=>{Ct();const{selectedSectionIndex:r,sectionVariantIndex:l,rawSections:c,parsedSections:p,decofile:S,activePageKey:g,pageVariants:_,variantIndex:L}=Le.current;if(r===null||!g)return;const N=c[r],M=p[r];if(!N||!M?.isMultivariate)return;const P=xt(N,M);if(!P)return;const de=P.variants??[],Re=Bt(de[l]?.rule,S,x),nt=on(t),Be=Xr(P,l,nt),Ge=[...c];Ge[r]=qt(N,M,Be);const J=Sn(S,g,Ge,L,_),fe={...S,[g]:J},{resolveType:Ce,formValue:Ue}=jn(nt,fe,x??void 0);st(Ce),tt(Ue);try{await G.mutateAsync({blockKey:g,data:J}),Re&&Re!==t&&await Ht(Re,fe),m?.()}catch(gt){oe.error(f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Pt(f,It(gt))})}};if(!ie&&!je)return i.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.noPageFound",{currentPath:u})});if(ie&&!Un)return i.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.globalBlockNotFound")});const $e=b!==null?Pe[b]??null:null,ur=b!==null?U[b]:null,dr=ur&&$e?.isMultivariate?xt(ur,$e):null,Nt=dr?vs(dr,wt):[],Vn=Math.min(Je,Math.max(Nt.length-1,0)),nn=Nt[Vn]??null,Tt=$e?.isMultivariate===!0,ss=b!==null&&$e!==null,Vt=ss&&(Tt||!!(Tn&&xe)),yi=Vt&&!ie&&$e?.isSavedBlock===!0,ut=ie||yi,fr=ie?Os:$e?.label??"",Si=Jt&&x?Kn(Jt,x):null,mr=(t,r)=>r&&D?`${t} · ${r}`:t,pr=$e?$e.variantOf??$e.label:"",bi=(()=>{const t=Tt&&nn?nn.label:null;return t?D?[mr(pr,t)]:[$e.label,t]:[$e?.label??""]})(),rs=mr(je?.name??"",ht?rt?.label:null),Mn=Vt&&(!ie||q.length>0)?ie?[Os,...q]:[rs,...bi,...q]:[],hr=qe&&je?[je.name,"SEO",...Vs]:[],gr=f("sectionsEditor.pageVariantTabs.variantsLabel"),vr=et&&je?[je.name,gr]:Ot&&je&&$e?[rs,pr,gr]:[],Dn=vr.length>0?vr:hr.length>0?hr:ut?Mn.length>0?Mn:[fr]:Mn.length>0?Mn:[rs],xr=ss&&!Tt&&!$e?.isHidden&&!!E,ji=ut||!ie&&ht&&!!rt||xr,wi=ss&&!Tt&&!ie&&q.length===0&&!!$e&&bo($e)&&!!E,_i=D&&Vt&&!Ot&&Tt&&q.length===0&&!!nn,yr=D&&q.length>0?Fr(q[q.length-1]):null,ki=q.length>1?Fr(q[q.length-2]):null,Sr=ut?fr:Vt?$e?.label??"":je?.name??"",Ei=et||Ot?f("sectionsEditor.pageVariantTabs.variantsLabel"):qe?f("sectionsEditor.panelSections.seo"):yr??Sr,br=Ot?$e?.variantOf??$e?.label??"":et||qe?je?.name??"":yr?ki??Sr:ut?f("sectionsEditor.sectionsEditor.globalSectionSubtitle"):Vt?je?.name??"":je?.path??"",os=!et&&!Ot&&!qe&&!Vt&&!ut,Ri=!D&&!qe&&!ie&&Tt&&q.length===0,yn=()=>{if(!E)return;Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const t=y[E],r=Ua(t.sections,U);if(!r)return;const l=Ya(r);G.mutate({blockKey:E,data:{...t,sections:r}},{onSuccess:()=>{ue(l),B(null),T(null),K(null),O([]),Z(null),be(null)},onError:G.reportError})},Pn=(t,r,l)=>{if(!E)return;Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const c=y[E],p=c.sections;if(!p||typeof p!="object"||Array.isArray(p))return;const S=p;if(!Array.isArray(S.variants))return;const g=t([...S.variants]);if(!g)return;const _=rl(S,g),L={...y,[E]:{...c,sections:_}};G.mutate({blockKey:E,data:L[E]},{onSuccess:()=>{r?.();const N=typeof l=="string"?[l]:l??[];(async()=>{for(const M of N)await Ht(M,L)})()},onError:G.reportError})},is=t=>{Ee(null),ue(t),B(null),T(null),K(null),O([]);const r=De[t]?.rule,{resolveType:l,formValue:c}=jn(r,y??{},x??void 0);be(l),Z(c),Xn(De.map(p=>({rule:p.rule})),t)},jr=(t,r)=>{if(t===r)return;let l=we;we===t?l=r:t<we&&r>=we?l=we-1:t>we&&r<=we&&(l=we+1),ue(l);const c=Ln(De.map(p=>({rule:p.rule})),t,r);Xn(c,l),Pn(p=>Ln(p,t,r))},wr=t=>{const r=De[t]?.rule,l=Bt(r,y??{},x??void 0);Pn(c=>c.length<=1?null:(c.splice(t,1),c),()=>{De.length-1===1?ue(0):t<we?ue(we-1):t===we&&ue(Math.max(0,t-1)),B(null),T(null),K(null),O([]),Z(null),be(null)},l)},Ai=()=>{const t=De.map((r,l)=>({variant:r,index:l})).filter(({variant:r})=>!sl(r.rule)).map(({variant:r})=>Bt(r.rule,y??{},x??void 0)).filter(r=>!!r);Pn(r=>{const l=al({variants:r}),c=r[l];return c?[{...c,rule:ll()}]:null},()=>{ue(0),B(null),T(null),K(null),O([]),Z(null),be(null),ft(!1)},t)},_r=t=>{Pn(r=>cl(r,t),()=>{ue(t+1),B(null),T(null),K(null),O([]),Z(null),be(null)})},Ci=async(t,r)=>{Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const l=Le.current.activePageKey,c=Le.current.decofile;if(!l)return;const p=c[l],S=p.sections;if(!S||typeof S!="object"||Array.isArray(S))return;const g=S;if(!Array.isArray(g.variants))return;const _=[...g.variants],L=_[t];if(!L?.rule||typeof L.rule!="object"){oe.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const N=L.rule,M=r.trim();Xt(!0);try{if(!M){if(!Gt(N,c,x)){Ee(null);return}const Ge=N.__resolveType??"";_[t]={...L,rule:xs(N,c,x)};const J={...c,[l]:{...p,sections:{...g,variants:_}}};await G.mutateAsync({blockKey:l,data:J[l]}),await Ht(Ge,J),Ee(null),m?.();return}const P=ys(N,c,x);if(!P){oe.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(P.blockKey){await G.mutateAsync({blockKey:P.blockKey,data:Kt(P.resolveType,P.data,M)}),Ee(null),m?.();return}const de=Fn(M),Re=On(de,c,x);if(Re){oe.error(Re);return}const nt=Kt(P.resolveType,P.data,M);let Be=null;try{await G.mutateAsync({blockKey:de,data:nt}),Be=de,_[t]={...L,rule:on(de)},await G.mutateAsync({blockKey:l,data:{...p,sections:{...g,variants:_}}}),Be=null}catch(Ge){throw Be&&await Rn.mutateAsync({blockKey:Be}).catch(()=>{}),Ge}Ee(null),oe.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:M})),m?.()}catch(P){oe.error(f("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Pt(f,It(P))})}finally{Xt(!1)}},Ni=async(t,r)=>{Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const{selectedSectionIndex:l,rawSections:c,parsedSections:p,decofile:S,activePageKey:g,pageVariants:_,variantIndex:L}=Le.current;if(l===null||!g)return;const N=c[l],M=p[l];if(!N||!M?.isMultivariate)return;const P=xt(N,M);if(!P)return;const de=P.variants??[],Re=de[t];if(!Re?.rule||typeof Re.rule!="object"){oe.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const nt=Re.rule,Be=r.trim();Xt(!0);const Ge=async J=>{const fe={...P,variants:J},Ce=[...c];Ce[l]=qt(N,M,fe);const Ue=Sn(S,g,Ce,L,_);return await G.mutateAsync({blockKey:g,data:Ue}),{...S,[g]:Ue}};try{if(!Be){if(!Gt(nt,S,x)){Ve(null);return}const ot=nt.__resolveType??"",vt=[...de];vt[t]={...Re,rule:xs(nt,S,x)};const Mt=await Ge(vt);await Ht(ot,Mt),Ve(null),m?.();return}const J=ys(nt,S,x);if(!J){oe.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(J.blockKey){await G.mutateAsync({blockKey:J.blockKey,data:Kt(J.resolveType,J.data,Be)}),Ve(null),m?.();return}const fe=Fn(Be),Ce=On(fe,S,x);if(Ce){oe.error(Ce);return}const Ue=Kt(J.resolveType,J.data,Be);let gt=null;try{await G.mutateAsync({blockKey:fe,data:Ue}),gt=fe;const ot=[...de];ot[t]={...Re,rule:on(fe)},await Ge(ot),gt=null}catch(ot){throw gt&&await Rn.mutateAsync({blockKey:gt}).catch(()=>{}),ot}Ve(null),oe.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:Be})),m?.()}catch(J){oe.error(f("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Pt(f,It(J))})}finally{Xt(!1)}},kr=async(t,r,l)=>{T(l);try{await G.mutateAsync({blockKey:t,data:l})}catch(c){throw T(p=>p===l?r:p),c}},Ti={rename:async(t,r,l)=>{Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const{activePageKey:c,decofile:p}=Le.current;if(!c)return;const S=Array.isArray(t.variants)?[...t.variants]:[],g=S[r],_=g?.rule&&typeof g.rule=="object"?g.rule:void 0,L=async M=>{const P={...t,variants:M};return await kr(c,t,P),{...p,[c]:P}},N=Hc(_,l,p,x);if(N.kind!=="noop"){if(N.kind==="error"){oe.error(N.reason==="no-matcher-rule"?f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):N.reason==="unreadable-rule"?f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):N.message??f("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}Xt(!0);try{if(N.kind==="inline"){const P=[...S];P[r]={...g,rule:N.inlinedRule};const de=await L(P);await Ht(N.blockKey,de),m?.();return}if(N.kind==="updateBlock"){await G.mutateAsync({blockKey:N.blockKey,data:N.blockData}),m?.();return}let M=null;try{await G.mutateAsync({blockKey:N.blockId,data:N.blockData}),M=N.blockId;const P=[...S];P[r]={...g,rule:N.reference},await L(P),M=null}catch(P){throw M&&await Rn.mutateAsync({blockKey:M}).catch(()=>{}),P}oe.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:l.trim()})),m?.()}catch(M){oe.error(f("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Pt(f,It(M))})}finally{Xt(!1)}}},selectGlobal:async(t,r,l)=>{Ct(),W.current&&(clearTimeout(W.current),W.current=null),Oe.current.clear();const{activePageKey:c,decofile:p}=Le.current;if(!c)return;const S=Array.isArray(t.variants)?[...t.variants]:[],g=S[r];if(!g)return;const _=Bt(g.rule,p,x);S[r]={...g,rule:on(l)};const L={...t,variants:S},N={...p,[c]:L};try{await kr(c,t,L),_&&_!==l&&await Ht(_,N),m?.()}catch(M){oe.error(f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Pt(f,It(M))})}}},Er=()=>{zt()},Rr=t=>{ln(t),ts({inner:t})},Ar=t=>{En(t),ts({raw:t})},Cr=()=>{ln(null),Lt([])},Nr=()=>Yt(t=>t+1),Tr=()=>{cn.flush(),an(!1),ln(null),En(void 0),Lt([]),Yt(t=>t+1),A?.()},Vi=()=>{ft(!1),kn(!1),B(null),an(!0)},Mi=()=>{qe&&Tr(),B(null),ft(!0)},Di=()=>kn(!0),as=t=>{if(et&&t===0){ft(!1);return}if(Ot&&t<2){kn(!1),t===0&&B(null);return}if(qe){if(t===0){Tr();return}if(t===1){Lt([]),Yt(l=>l+1);return}Lt(Vs.slice(0,t-1)),Yt(l=>l+1);return}if(ie){O(q.slice(0,t)),Q(l=>l+1);return}if(t===0){Er();return}if(t===1){O([]),Q(l=>l+1);return}const r=!D&&Tt&&nn?1:0;if(r===1&&t===2){O([]),Q(l=>l+1);return}O(q.slice(0,t-1-r))},ls=Dn.length>1?i.jsx("button",{type:"button",onClick:()=>as(wa(Dn.length,{isMultivariateSectionTop:Ri})),title:f("sectionsEditor.sectionsEditor.back"),"aria-label":f("sectionsEditor.sectionsEditor.back"),className:ae("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ut?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:i.jsx(Aa,{className:"size-4"})}):null,Pi=ut||Vt||qe?ji&&i.jsxs("div",{className:ae("border-b px-3 py-2.5",ut&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[i.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ie&&ht&&rt&&i.jsxs("button",{type:"button",onClick:Er,title:f("sectionsEditor.sectionsEditor.editingInVariant",{variant:rt.label}),className:ae("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",ha),children:[i.jsx(pa,{rule:fs(rt.rule,y??{},x??void 0),matchers:tn}),i.jsx("span",{className:"max-w-[160px] truncate",children:rt.label})]}),i.jsx("div",{className:"flex-1"}),ut&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx("span",{className:"shrink-0 cursor-help",children:i.jsx(zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),i.jsx(Rt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),xr&&i.jsx(Bn,{onClick:()=>xn()})]}),ut&&i.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:f("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):i.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[i.jsx("div",{className:"flex-1 min-w-0",children:i.jsx(Or,{pageKey:E,initialName:je.name,initialPath:je.path,onFieldChange:Xs,variant:"header"})}),i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon-sm","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>an(!0),children:i.jsx(Gr,{size:14})})}),i.jsx(Rt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"ghost",size:"icon-sm","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>z&&E?z():dt(!0),children:i.jsx(Ur,{size:14})})}),i.jsx(Rt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]}),i.jsx(Bn,{onClick:yn})]}),Ii=i.jsxs(i.Fragment,{children:[ht&&E&&i.jsx(Lr,{listKey:E,variants:De,activeIndex:we,decofile:y??{},meta:x,matchers:tn,onSelect:is,onReorder:jr,onRename:Ee,onDuplicate:_r,onDelete:wr,onAdd:yn}),ht&&_e!==null&&i.jsx($r,{className:"mt-3",children:i.jsx("div",{className:ae("space-y-3",Qt&&"pointer-events-none opacity-50"),children:i.jsx(us,{currentRt:_e,currentLabel:wn(rt?.rule,y??{},wt,x??void 0),currentGlobalKey:Bt(rt?.rule,y??{},x??void 0)??void 0,matchers:tn,globals:ns,onSelect:ir,onSelectGlobal:lr,schema:rr,formValue:Te,onChange:ar,formKey:`${we}:${_e??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:y,onSaveReferencedBlock:un,sandbox:hn})})})]}),Vr=i.jsxs(i.Fragment,{children:[i.jsx(ga,{listKey:`${E??""}:${b??""}`,variants:Nt.map((t,r)=>({index:r,label:t.label})),selectedIndex:Vn,onSelect:er,onRename:Ve,onDuplicate:mi,onDelete:fi,onRemoveAll:tr,onReorder:pi,onAdd:()=>xn()}),i.jsx($r,{children:i.jsx(us,{currentRt:Jt??"",currentLabel:wn(nn?.rule,y??{},wt,x??void 0),currentGlobalKey:Bt(nn?.rule,y??{},x??void 0)??void 0,matchers:tn,globals:ns,onSelect:gi,onSelectGlobal:xi,schema:Si,formValue:Mo,onChange:vi,formKey:`${b??"none"}:${Vn}:${Jt??""}`,formWrapperClassName:"pt-1",meta:x??void 0,decofile:y,onSaveReferencedBlock:un,sandbox:hn})})]}),Mr=i.jsx("div",{className:ae(D?"px-2":"p-2 pt-3"),children:i.jsx(Xl,{listKey:`${E??""}-${we}`,rawSections:U,sections:Pe,meta:x,decofile:y,selectedIndex:b,onSelect:si,onReorder:ri,onDelete:oi,onDuplicate:ii,onMakeReusable:He,onToggleHidden:ai,onToggleLazy:he?li:void 0,onAddVariant:xn,onDetach:ci,onAddSection:()=>Fe(!0),canAddSection:sr})}),Bi=i.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[E&&je&&i.jsx(Or,{pageKey:E,initialName:je.name,initialPath:je.path,onFieldChange:Xs}),mn&&E?i.jsx(so,{rawSeo:Cn,innerSeo:Jn,defaultResolveType:$s,seoSchema:zs,activeResolveType:Nn,seoTypeOptions:Ls,formResetKey:Ms,siteDefaultSeo:Hs,onBreadcrumbChange:Lt,onPersistRaw:Ar,onInnerChange:Rr,onClearForm:Cr,onBumpFormKey:Nr,asyncRenderAvailable:he}):i.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Ki=i.jsx(rn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:i.jsx("div",{className:"mx-auto max-w-2xl",children:mn&&E?i.jsx(so,{rawSeo:Cn,innerSeo:Jn,defaultResolveType:$s,seoSchema:zs,activeResolveType:Nn,seoTypeOptions:Ls,formResetKey:Ms,siteDefaultSeo:Hs,onBreadcrumbChange:Lt,onPersistRaw:Ar,onInnerChange:Rr,onClearForm:Cr,onBumpFormKey:Nr,asyncRenderAvailable:he}):i.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),Fi=i.jsxs(rn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[ht&&E&&i.jsx(Lr,{listKey:E,variants:De,activeIndex:we,decofile:y??{},meta:x,matchers:tn,onSelect:is,onReorder:jr,onRename:Ee,onDuplicate:_r,onDelete:wr,onAdd:yn}),ht&&_e!==null&&i.jsxs("div",{className:ae("px-3 border-b",Me?"pt-3 pb-5 space-y-3":"py-2"),children:[i.jsxs("button",{type:"button",onClick:()=>yt(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-accent","aria-expanded":Me,children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:f("sectionsEditor.sectionsEditor.variantRule")}),Me?i.jsx(ka,{className:"size-3.5 shrink-0 text-muted-foreground"}):i.jsx(Ea,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),Me&&i.jsx("div",{className:ae("space-y-3",Qt&&"pointer-events-none opacity-50"),children:i.jsx(us,{currentRt:_e,currentLabel:wn(rt?.rule,y??{},wt,x??void 0),currentGlobalKey:Bt(rt?.rule,y??{},x??void 0)??void 0,matchers:tn,globals:ns,onSelect:ir,onSelectGlobal:lr,schema:rr,formValue:Te,onChange:ar,formKey:`${we}:${_e??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:y,onSaveReferencedBlock:un,sandbox:hn})})]}),Mr]},"editor-section-list");return i.jsx(va,{children:i.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!D&&ls&&i.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ls}),(D||Dn.length>1)&&i.jsx(xa,{crumbs:Dn,onSelect:as,onSelectRoot:()=>{cn.flush(),$?$():as(0)}}),i.jsx("div",{className:"shrink-0",children:D?i.jsxs("div",{className:ae("flex items-center gap-2 border-b px-3 py-2.5",ut&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[D&&ls,ut&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx("span",{className:"shrink-0 cursor-help",children:i.jsx(zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),i.jsx(Rt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[i.jsx("span",{className:"truncate text-sm font-semibold",children:Ei}),br&&i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:br})]}),os&&ht&&rt&&i.jsx(zr,{variants:De,activeIndex:we,onSelect:is,onManage:Mi,onRemoveAll:Ai}),_i&&i.jsx(zr,{variants:Nt,activeIndex:Vn,onSelect:er,onManage:Di,onRemoveAll:tr}),os&&!ht&&i.jsx(Bn,{onClick:yn}),wi&&i.jsx(Bn,{onClick:()=>xn()}),i.jsx(ya,{}),os&&i.jsxs(i.Fragment,{children:[i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"outline",size:"icon-sm","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:Vi,children:i.jsx(Gr,{size:14})})}),i.jsx(Rt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),!z&&i.jsxs(kt,{children:[i.jsx(Et,{asChild:!0,children:i.jsx(_t,{type:"button",variant:"outline",size:"icon-sm","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>dt(!0),children:i.jsx(Ur,{size:14})})}),i.jsx(Rt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Pi}),lt&&i.jsx(xc,{open:!0,fields:lc(lt.plan,lt.target.schema),choices:lt.choices,changedAgain:lt.changedAgain,author:$o,fresh:lt.fresh,onChoose:(t,r)=>ni({...lt.choices,[t]:r}),onApply:ti},Uc(lt.formBase)),Ot?i.jsx(Hr,{onAdd:()=>xn(),children:Vr},"editor-section-variants"):Vt?i.jsxs(rn,{viewportRef:Ke,onBlur:Gs,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!D&&Tt&&Nt.length>0&&q.length===0&&Vr,i.jsx(Wr,{activeSchema:Tn,formValue:xe,formResetKey:Ye,onFormChange:Qs,onBreadcrumbChange:O,breadcrumbPath:q,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:x,decofile:y,onSaveReferencedBlock:un,sandbox:hn,previewBaseUrl:ee,onRequestAddSection:Zs,onVariantMatcherOp:ie?Ti:void 0})]},"editor-section-form"):ie?i.jsx(rn,{viewportRef:Ke,onBlur:Gs,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx(Wr,{activeSchema:Tn,formValue:xe,formResetKey:Ye,onFormChange:Qs,onBreadcrumbChange:O,breadcrumbPath:q,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:x,decofile:y,onSaveReferencedBlock:un,sandbox:hn,previewBaseUrl:ee,onRequestAddSection:Zs})},"editor-global-block"):qe?D?i.jsx(rn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"p-3",children:Bi})},"editor-seo"):Ki:et?i.jsx(Hr,{onAdd:yn,children:Ii},"editor-variants"):D?i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[i.jsx(rn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"py-2",children:Mr})}),i.jsx("div",{className:"shrink-0 border-t p-2",children:i.jsx(js,{canAddSection:sr,onAddSection:()=>Fe(!0)})})]},"editor-section-list"):Fi,i.jsx(Sa,{open:ke!==null,onOpenChange:t=>{t||He(null)},defaultBlockId:ke!==null?Fn(Pe[ke]?.label??""):"",isPending:G.isPending,onSubmit:hi}),ve&&i.jsx(Rl,{open:Ze,onOpenChange:t=>{Fe(t),t||(ne.current=null)},meta:x,decofile:y,previewBaseUrl:ee,onSelect:di}),re&&E&&y&&i.jsx(Oa,{open:re,onOpenChange:dt,pageKey:E,decofile:y}),We!==null&&i.jsx(qr,{open:!0,initialName:Gt(De[We]?.rule,y??{},x??void 0)?wn(De[We]?.rule,y??{},wt,x??void 0):"",autoLabel:wt(fs(De[We]?.rule,y??{},x??void 0)),isPending:Qt,onSubmit:async t=>{await Ci(We,t)},onOpenChange:t=>{!t&&!Qt&&Ee(null)}}),Ie!==null&&i.jsx(qr,{open:!0,initialName:Gt(Nt[Ie]?.rule,y??{},x??void 0)?wn(Nt[Ie]?.rule,y??{},wt,x??void 0):"",autoLabel:wt(fs(Nt[Ie]?.rule,y??{},x??void 0)),isPending:Qt,onSubmit:async t=>{await Ni(Ie,t)},onOpenChange:t=>{!t&&!Qt&&Ve(null)}})]})})}export{em as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,b as be,j as o,r as te,av as Ne,B as we,h as _e}from"./index-DcU2uHG-.js";import{a5 as he}from"./agent-icon-c0hRUHIU.js";import{S as ve}from"./scroll-area-DowOzl5a.js";import{O as ye,ai as Ee,q as Pe,s as Te,aj as Re,o as Ce,aJ as Fe}from"./blocks-tab-states-diUqUrAK.js";import{x as Ke}from"./secret-ciphertext-CI3Fu2ro.js";import{u as ze,a as De,P as $e}from"./page-seo-form-CnjlIIXj.js";import{a as je}from"./Image01-DowwsvYG.js";import{u as Be,K as Ie}from"./site-editor-toast-L4A-Cxh7.js";import"./AlertCircle-xI8XX-bi.js";import"./Tool01-BGL2Qt57.js";import"./ArrowUp-Cq3iZIwL.js";import"./ArrowLeft-BKYzlDQY.js";import"./LinkBroken01-ZRquEJUl.js";import"./ShoppingBag01-DAjyOiiw.js";import"./ZoomOut-B55seUHX.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./ChevronUp-CFN68hLk.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./UserSquare-DJngEPjS.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Plus-xabrshQG.js";import"./SearchMd-BODiv7c9.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./XClose-CdzjyNb0.js";import"./index-BdQq_4o_.js";import"./input-pg_Munw1.js";import"./usage-stats-DcyLnEOC.js";import"./tool-namespace-FeAXQzXg.js";import"./form-Bdh0vUeg.js";import"./label-DDPD5LQh.js";import"./utils-CVEq3hMx.js";import"./markdown-1PeXOKNt.js";import"./use-copy-K9rQ1PJH.js";import"./location-V0VwTJTt.js";import"./use-mobile-BfmJV4wy.js";import"./use-panel-navigate-K8ACrPML.js";import"./thread-route-DsRsjMOv.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./tooltip-BqHx2R4U.js";import"./index-WjQsIrkp.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-TumByBkr.js";import"./thread-intent-DlbBEzNn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-BnuwMOfj.js";import"./autosend-BiXCzDoT.js";import"./use-ai-providers-DugUJNG4.js";import"./use-organization-settings-DFkNTsS0.js";import"./icon-button-Dg2jSe-y.js";import"./file-type-icon-Ez8-DRHg.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./use-clock-tick-CbuQEbGd.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./integration-icon-aeIvRSnw.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./use-debounced-value-CDunmz6Z.js";import"./required-auth-layout-n4GqwjUS.js";import"./use-org-sso-ClJ8vn5f.js";import"./chat-draft-D3EwPWFD.js";import"./select-B47VUguS.js";import"./tabs-CJ70csAp.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-orVqTX6I.js";import"./toggle-group-CtPF-F41.js";import"./use-open-billing-url-pmLoKOyH.js";import"./index-De44zW_k.js";import"./checkbox-Dla8kRWj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CVCbWisj.js";import"./drawer-CEiS53oX.js";import"./input-HXHaYrka.js";import"./suggestion-D_Z3LuMt.js";import"./use-mcp-prompts-JJb6q8dH.js";import"./use-org-fs-D82Vx4hB.js";import"./question-004-sINsf4GQ.js";import"./use-members-CzSQTDAS.js";import"./use-org-auth-client-fPRUht_a.js";import"./feature-paywall-DINMFUUx.js";import"./plan-ladder-D5aCNSRy.js";import"./add-connection-dialog-O4xCe9BP.js";import"./extract-connection-data-CUvLfXNU.js";import"./metadata-D72DunRR.js";import"./connection-B5x-rxzp.js";import"./url-slug-DfovzTSP.js";import"./connection-card-CFqu0_G8.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BDWvYouR.js";import"./use-connection-Dj54skEw.js";import"./schema-Jt-SHSRj.js";import"./connection-form-helpers-CouK82td.js";import"./authenticate-and-persist-oauth-D7W1mkzH.js";import"./mcp-oauth-xBzZujQ_.js";import"./mcp-oauth-DP6VNnFQ.js";import"./collection-tabs-DJst1PBn.js";import"./badge-ByzdbptS.js";import"./use-infinite-scroll-7dT9x3fg.js";import"./useSuspenseInfiniteQuery-B0JY_wMj.js";import"./use-task-board-events-BDk-u9KA.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./utils-Bp3fKbm9.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-Cn70Tm81.js";import"./collapsible-BWjY8cOG.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DTPlWHGT.js";import"./types-Cj3BjtjJ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-R9Pr50Sb.js";import"./use-thread-outputs-DLitie4Q.js";import"./switch-BQFbXMA-.js";import"./monaco-editor-e80GuCNv.js";import"./editor-DWhRi1_f.js";import"./calendar-B3WUDV6V.js";import"./editor-classes-CZOMDDcn.js";import"./core.esm-DOdwJCI5.js";import"./sortable.esm-7lfZBBX2.js";import"./combobox-DJtWtG8e.js";import"./alert-dialog-M8Y0zqSA.js";import"./search-input-C77c23a_.js";import"./use-file-configs-BFq_wpSt.js";import"./asset-utils-D4ZYWTsd.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-git-api-CRxdlhrN.js";import"./sandbox-url-D3mC8qhT.js";import"./empty-state-B1xpK558.js";import"./alert-J8Wo4iMe.js";import"./use-main-schema-v8-Dcb6Yskn.js";import"./index-_y92DzgS.js";function M(d){return typeof d=="string"&&d.trim()?d:void 0}function ge(d,e){if(d){if(e)try{const t=new URL(d,e).href;return ye(t)}catch{return}return ye(d)}}function Le(d){if(!d)return{};const e=M(d.title),t=M(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:M(d.description),image:M(d.image),favicon:M(d.favicon)}}function Oe(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const Ue=[{id:"google",labelKey:"sectionsEditor.seoPreview.platformGoogle",color:"#4285F4",layout:"search"},{id:"facebook",labelKey:"sectionsEditor.seoPreview.platformFacebook",color:"#1877F2",layout:"card"},{id:"twitter",labelKey:"sectionsEditor.seoPreview.platformTwitter",color:"#0f1419",layout:"card"},{id:"linkedin",labelKey:"sectionsEditor.seoPreview.platformLinkedin",color:"#0A66C2",layout:"card"},{id:"whatsapp",labelKey:"sectionsEditor.seoPreview.platformWhatsapp",color:"#25D366",layout:"chat"},{id:"telegram",labelKey:"sectionsEditor.seoPreview.platformTelegram",color:"#229ED9",layout:"chat"},{id:"slack",labelKey:"sectionsEditor.seoPreview.platformSlack",color:"#611f69",layout:"attachment"},{id:"discord",labelKey:"sectionsEditor.seoPreview.platformDiscord",color:"#5865F2",layout:"attachment"}];function ue(d){const e=T.c(10),{src:t,className:a,iconSize:y}=d,l=y===void 0?20:y;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==a||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:a,style:m}),e[1]=a,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==l?(i=o.jsx(je,{size:l}),e[5]=l,e[6]=i):i=e[6];let n;return e[7]!==a||e[8]!==i?(n=o.jsx("div",{className:a,style:s,children:i}),e[7]=a,e[8]=i,e[9]=n):n=e[9],n}function Ae(d){const e=T.c(33),{seo:t,host:a,path:y,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let n;e[2]!==t.favicon?(n=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(je,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=n):n=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==a?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:a}),e[5]=a,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let r;e[8]!==a||e[9]!==y?(r=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[a,y]}),e[8]=a,e[9]=y,e[10]=r):r=e[10];let c;e[11]!==p||e[12]!==r?(c=o.jsxs("div",{className:"min-w-0",children:[p,r]}),e[11]=p,e[12]=r,e[13]=c):c=e[13];let x;e[14]!==n||e[15]!==c?(x=o.jsxs("div",{className:"flex items-center gap-2",children:[n,c]}),e[14]=n,e[15]=c,e[16]=x):x=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#1a0dab"},e[17]=u):u=e[17];let h;e[18]!==t.title||e[19]!==l?(h=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=l,e[20]=h):h=e[20];let v;e[21]!==h?(v=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:u,children:h}),e[21]=h,e[22]=v):v=e[22];let b;e[23]===Symbol.for("react.memo_cache_sentinel")?(b={color:"#4d5156"},e[23]=b):b=e[23];let S;e[24]!==t.description||e[25]!==l?(S=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=l,e[26]=S):S=e[26];let j;e[27]!==S?(j=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:b,children:S}),e[27]=S,e[28]=j):j=e[28];let k;return e[29]!==v||e[30]!==j||e[31]!==x?(k=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[x,v,j]}),e[29]=v,e[30]=j,e[31]=x,e[32]=k):k=e[32],k}function Me(d){const e=T.c(26),{seo:t,host:a,t:y}=d;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={background:"#fff",border:"1px solid #e2e8f0"},e[0]=l):l=e[0];let s;e[1]!==t.image?(s=o.jsx(ue,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={color:"#8a9099"},e[4]=n):n=e[4];let m;e[5]!==a?(m=o.jsx("div",{className:"truncate text-[11px]",style:n,children:a}),e[5]=a,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==y?(f=t.title??y("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=y,e[10]=f):f=e[10];let r;e[11]!==f?(r=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=r):r=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[13]=c):c=e[13];let x;e[14]!==t.description||e[15]!==y?(x=t.description??y("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=y,e[16]=x):x=e[16];let u;e[17]!==x?(u=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:x}),e[17]=x,e[18]=u):u=e[18];let h;e[19]!==u||e[20]!==m||e[21]!==r?(h=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,r,u]}),e[19]=u,e[20]=m,e[21]=r,e[22]=h):h=e[22];let v;return e[23]!==h||e[24]!==s?(v=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:l,children:[s,h]}),e[23]=h,e[24]=s,e[25]=v):v=e[25],v}function Ge(d){const e=T.c(36),{seo:t,host:a,accent:y,t:l}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let n;e[2]!==l?(n=l("sectionsEditor.seoPreview.chatCardHint"),e[2]=l,e[3]=n):n=e[3];let m;e[4]!==n?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:n}),e[4]=n,e[5]=m):m=e[5];const p=`3px solid ${y}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let r;e[8]!==t.image?(r=o.jsx(ue,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=r):r=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#1c2024"},e[10]=c):c=e[10];let x;e[11]!==t.title||e[12]!==l?(x=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=l,e[13]=x):x=e[13];let u;e[14]!==x?(u=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:c,children:x}),e[14]=x,e[15]=u):u=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h={color:"#60666c"},e[16]=h):h=e[16];let v;e[17]!==t.description||e[18]!==l?(v=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=l,e[19]=v):v=e[19];let b;e[20]!==v?(b=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:h,children:v}),e[20]=v,e[21]=b):b=e[21];let S;e[22]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#8a9099"},e[22]=S):S=e[22];let j;e[23]!==a?(j=o.jsx("div",{className:"mt-0.5 text-[10px]",style:S,children:a}),e[23]=a,e[24]=j):j=e[24];let k;e[25]!==u||e[26]!==b||e[27]!==j?(k=o.jsxs("div",{className:"px-2.5 py-1.5",children:[u,b,j]}),e[25]=u,e[26]=b,e[27]=j,e[28]=k):k=e[28];let g;e[29]!==k||e[30]!==f||e[31]!==r?(g=o.jsxs("div",{className:"overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-md))]",style:f,children:[r,k]}),e[29]=k,e[30]=f,e[31]=r,e[32]=g):g=e[32];let N;return e[33]!==g||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,g]}),e[33]=g,e[34]=m,e[35]=N):N=e[35],N}function He(d){const e=T.c(39),{seo:t,host:a,accent:y,dark:l,t:s}=d,i=l?"#2b2d31":"#fff",n=l?"#00a8fc":"#1264a3",m=l?"#dbdee1":"#3b4045",p=l?"#949ba4":"#8a9099",f=l?"none":"1px solid #e2e8f0";let r;e[0]!==i||e[1]!==f?(r={background:i,border:f},e[0]=i,e[1]=f,e[2]=r):r=e[2];const c=`3px solid ${y}`;let x;e[3]!==c?(x={borderLeft:c,borderRadius:2},e[3]=c,e[4]=x):x=e[4];let u;e[5]!==p?(u={color:p},e[5]=p,e[6]=u):u=e[6];let h;e[7]!==a||e[8]!==u?(h=o.jsx("div",{className:"text-[10px]",style:u,children:a}),e[7]=a,e[8]=u,e[9]=h):h=e[9];let v;e[10]!==n?(v={color:n},e[10]=n,e[11]=v):v=e[11];let b;e[12]!==t.title||e[13]!==s?(b=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=b):b=e[14];let S;e[15]!==v||e[16]!==b?(S=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:v,children:b}),e[15]=v,e[16]=b,e[17]=S):S=e[17];let j;e[18]!==m?(j={color:m},e[18]=m,e[19]=j):j=e[19];let k;e[20]!==t.description||e[21]!==s?(k=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=k):k=e[22];let g;e[23]!==j||e[24]!==k?(g=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:j,children:k}),e[23]=j,e[24]=k,e[25]=g):g=e[25];let N;e[26]!==g||e[27]!==h||e[28]!==S?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[h,S,g]}),e[26]=g,e[27]=h,e[28]=S,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(ue,{src:t.image,className:"size-14 shrink-0 rounded-[var(--studio-control-radius,var(--radius))]",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let _;e[32]!==N||e[33]!==w||e[34]!==x?(_=o.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:x,children:[N,w]}),e[32]=N,e[33]=w,e[34]=x,e[35]=_):_=e[35];let E;return e[36]!==_||e[37]!==r?(E=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:r,children:_}),e[36]=_,e[37]=r,e[38]=E):E=e[38],E}function Ve(d){const e=T.c(21),{platform:t,seo:a,host:y,path:l,t:s}=d;let i;e[0]!==y||e[1]!==l||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==a||e[6]!==s?(i=t.layout==="search"?o.jsx(Ae,{seo:a,host:y,path:l,t:s}):t.layout==="card"?o.jsx(Me,{seo:a,host:y,path:l,t:s}):t.layout==="chat"?o.jsx(Ge,{seo:a,host:y,path:l,accent:t.color,t:s}):o.jsx(He,{seo:a,host:y,path:l,accent:t.color,dark:t.id==="discord",t:s}),e[0]=y,e[1]=l,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=a,e[6]=s,e[7]=i):i=e[7];const n=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let r;e[15]!==m||e[16]!==f?(r=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=r):r=e[17];let c;return e[18]!==n||e[19]!==r?(c=o.jsxs("div",{children:[r,n]}),e[18]=n,e[19]=r,e[20]=c):c=e[20],c}function qe(d){const e=T.c(18),{seo:t,url:a,path:y}=d,l=y===void 0?"/":y,s=be();let i,n,m;if(e[0]!==t||e[1]!==a){const v=Le(t);i=v,n=ge(v.image,a),m=ge(v.favicon,a),e[0]=t,e[1]=a,e[2]=i,e[3]=n,e[4]=m}else i=e[2],n=e[3],m=e[4];let p;e[5]!==i||e[6]!==n||e[7]!==m?(p={...i,image:n,favicon:m},e[5]=i,e[6]=n,e[7]=m,e[8]=p):p=e[8];const f=p;let r;e[9]!==a?(r=Oe(a),e[9]=a,e[10]=r):r=e[10];const c=r,x=l==="/"?"":l;let u;e[11]!==x||e[12]!==c||e[13]!==s||e[14]!==f?(u=Ue.map(v=>o.jsx(Ve,{platform:v,seo:f,host:c,path:x,t:s},v.id)),e[11]=x,e[12]=c,e[13]=s,e[14]=f,e[15]=u):u=e[15];let h;return e[16]!==u?(h=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:u}),e[16]=u,e[17]=h):h=e[17],h}function Xi(d){const e=T.c(73),{orgSlug:t,virtualMcpId:a,branch:y,decofile:l,meta:s,target:i,previewBaseUrl:n,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,r=be(),c=Ee(l,i,s),x=Be(a,y);let u;e[0]!==x?(u=Ie(x),e[0]=x,e[1]=u):u=e[1];const h=!u,v=c?.seoData,b=i.kind==="site"?"site":i.pageKey,[S,j]=te.useState(b),[k,g]=te.useState(null),[N,w]=te.useState(0),[_,E]=te.useState(void 0);S!==b&&(j(b),g(null),E(void 0),w(We));const{persistSeo:K,persistRawSeo:oe,flush:ie,isPending:se}=ze({orgSlug:t,virtualMcpId:a,branch:y,target:i,resolved:c,onSaved:m}),G=i.kind==="page",Se=G?c?.rawSeoData:void 0,A=_!==void 0?_:Se,ke=G?Pe(A)??void 0:void 0,P=k??ke??v??{},R=c?De(P,c):null,z=R&&(!G||Te(A))?Ke(R,s):null;let H;e[2]!==s?(H=Re(s),e[2]=s,e[3]=H):H=e[3];const re=H;let C,V;e[4]!==l||e[5]!==P||e[6]!==s||e[7]!==i.kind?(C=i.kind==="page"?Ce(l,s)?.seoData??{}:{},V=i.kind==="page"?Xe(C,P):P,e[4]=l,e[5]=P,e[6]=s,e[7]=i.kind,e[8]=C,e[9]=V):(C=e[8],V=e[9]);const le=V;let q;e[10]!==K||e[11]!==c||e[12]!==g?(q=F=>{if(!c)return;const xe=F;g(xe),K(xe)},e[10]=K,e[11]=c,e[12]=g,e[13]=q):q=e[13];const ae=q;let J;e[14]!==g?(J=()=>g(null),e[14]=g,e[15]=J):J=e[15];const ce=J;let W;e[16]!==w?(W=()=>w(Je),e[16]=w,e[17]=W):W=e[17];const ne=W;let Q;e[18]!==ie||e[19]!==f?(Q=()=>{ie(),f?.()},e[18]=ie,e[19]=f,e[20]=Q):Q=e[20];const me=Q,D=i.kind==="page"?i.path:"/";let X;e[21]!==D||e[22]!==n||e[23]!==i.kind?(X=i.kind==="page"&&n?Qe(D,n):n??null,e[21]=D,e[22]=n,e[23]=i.kind,e[24]=X):X=e[24];const de=X;let Y;e[25]!==c||e[26]!==r||e[27]!==i.kind?(Y=i.kind==="site"?r("sectionsEditor.seoEditor.noSiteSeoBlock"):r(c?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[25]=c,e[26]=r,e[27]=i.kind,e[28]=Y):Y=e[28];const pe=Y,Z=G&&c,fe=i.kind==="site"&&c&&z;let $;e[29]!==me||e[30]!==r||e[31]!==i.kind||e[32]!==i.pageName?($=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:me,title:i.pageName,className:"min-w-0 truncate rounded-[var(--studio-control-radius,var(--radius-md))] px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(Ne,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(he,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:r("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",r("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[29]=me,e[30]=r,e[31]=i.kind,e[32]=i.pageName,e[33]=$):$=e[33];let B;e[34]!==se?(B=se&&o.jsx(_e,{className:"size-3.5 text-muted-foreground"}),e[34]=se,e[35]=B):B=e[35];let I;e[36]!==p||e[37]!==r||e[38]!==i.kind?(I=i.kind==="page"&&p&&o.jsxs(we,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(he,{size:14}),r("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[36]=p,e[37]=r,e[38]=i.kind,e[39]=I):I=e[39];let L;e[40]!==B||e[41]!==I?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[B,I]}),e[40]=B,e[41]=I,e[42]=L):L=e[42];let O;e[43]!==$||e[44]!==L?(O=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[$,L]}),e[43]=$,e[44]=L,e[45]=O):O=e[45];let U;e[46]!==R||e[47]!==h||e[48]!==ne||e[49]!==ce||e[50]!==re||e[51]!==A||e[52]!==P||e[53]!==pe||e[54]!==N||e[55]!==ae||e[56]!==D||e[57]!==oe||e[58]!==K||e[59]!==le||e[60]!==de||e[61]!==c||e[62]!==z||e[63]!==g||e[64]!==E||e[65]!==Z||e[66]!==fe||e[67]!==C||e[68]!==r?(U=!c||!Z&&!fe?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:pe}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(ve,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:Z?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:r("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx($e,{rawSeo:A,innerSeo:P,defaultResolveType:re,seoSchema:z,activeResolveType:R,seoTypeOptions:c.seoTypeOptions,formResetKey:N,siteDefaultSeo:C,onPersistRaw:F=>{E(F),oe(F)},onInnerChange:F=>{g(F),K(F)},onClearForm:ce,onBumpFormKey:ne,asyncRenderAvailable:h})]}):z&&R&&o.jsx(Fe,{schema:z,resolveType:R,value:P,formResetKey:N,onChange:ae})})}),o.jsx(ve,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(qe,{seo:le,url:de,path:D})})})]}),e[46]=R,e[47]=h,e[48]=ne,e[49]=ce,e[50]=re,e[51]=A,e[52]=P,e[53]=pe,e[54]=N,e[55]=ae,e[56]=D,e[57]=oe,e[58]=K,e[59]=le,e[60]=de,e[61]=c,e[62]=z,e[63]=g,e[64]=E,e[65]=Z,e[66]=fe,e[67]=C,e[68]=r,e[69]=U):U=e[69];let ee;return e[70]!==O||e[71]!==U?(ee=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[O,U]}),e[70]=O,e[71]=U,e[72]=ee):ee=e[72],ee}function Je(d){return d+1}function We(d){return d+1}function Qe(d,e){try{return new URL(d,e).href}catch{return e}}function Xe(d,e){const t=e.__resolveType,a=d.__resolveType;if(typeof t=="string"&&typeof a=="string"&&t!==a)return{...e};const y={...d};for(const[l,s]of Object.entries(e))l!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(y[l]=s));return y}export{Xi as SeoEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,j as o}from"./index-DcU2uHG-.js";import{V as a}from"./index-CxtzBp5_.js";function p(s){const t=e.c(2),{virtualMcpId:r}=s;let i;return t[0]!==r?(i=o.jsx(a,{virtualMcpId:r}),t[0]=r,t[1]=i):i=t[1],i}export{p as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,b as J,e as st,j as n,B as F,t as We,b$ as fe,ad as Tt,a as Be,G as Vt,R as Nt,K as Ue,c0 as Wt,c1 as Yt,aw as Ke,l as ht,a_ as Qt,x as gt,r as se,ab as Xt,ac as re,s as _t,v as Pt,q as At,D as Ct,d as Et,a2 as mt,J as Ot,m as He,y as ct,aL as It,c2 as Zt,aR as en,aX as pt,F as tn,c3 as nn,aM as sn,w as on,c4 as an,c5 as rn,c6 as ln,c7 as cn,c8 as dn,a3 as un,u as mn,a4 as fn,c9 as hn,ca as gn,k as $t,cb as rt,cc as pn,cd as yn,O as bn,_ as xn}from"./index-DcU2uHG-.js";import{A as it}from"./avatar-CVrfZDpI.js";import{t as Lt}from"./Building02-C9KWPxlH.js";import{i as Sn,s as ae}from"./UserSquare-DJngEPjS.js";import{aE as wn,aC as vn,H as lt,ac as jn,J as kn,aF as Tn,n as yt,g as Nn,p as _n,k as Pn,aG as An,l as Cn}from"./agent-icon-c0hRUHIU.js";import{s as En}from"./XClose-CdzjyNb0.js";import{a as On,u as In}from"./use-project-scope-CGMALc0e.js";import{u as Dt,a as $n}from"./use-panel-navigate-K8ACrPML.js";import{i as de}from"./CheckCircle-D30wPP6A.js";import{i as bt}from"./Monitor01-DMME8GIo.js";import{i as qe}from"./ZoomOut-B55seUHX.js";import{u as Ln}from"./use-clock-tick-CbuQEbGd.js";import{s as xt}from"./Plus-xabrshQG.js";import{a as Dn}from"./Tool01-BGL2Qt57.js";import{b as le,a as Je,f as Rn,e as Fn,c as Mn,C as zn}from"./command-DQxPvzO0.js";import{I as qn}from"./integration-icon-aeIvRSnw.js";import{P as Kn}from"./project-icon-Dy5ndHVf.js";import{a as Bn,m as Hn}from"./use-mcp-client-ZokR8_74.js";import{u as Un,a as Gn,n as Jn}from"./new-project-dialog-ShudNZIG.js";import{S as Vn,u as Wn}from"./thread-intent-DlbBEzNn.js";import{R as Yn}from"./required-auth-layout-n4GqwjUS.js";import{A as Qn}from"./autosend-BiXCzDoT.js";import{u as Xn,a as Zn,b as es,c as ts}from"./thread-route-DsRsjMOv.js";import{u as ns}from"./use-org-sso-ClJ8vn5f.js";function ss(t){const e=R.c(49),{orgName:o,orgSlug:r,orgLogo:s,domain:a}=t,i=J();let c;e[0]!==r||e[1]!==i?(c=async()=>{const p=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),A=await p.json();if(!p.ok||!A.success)throw new Error(A.error??i("common.autoDomainJoinScreen.joinError"));return A},e[0]=r,e[1]=i,e[2]=c):c=e[2];let m;e[3]!==r?(m=p=>{window.location.href=`/${p.slug??r}`},e[3]=r,e[4]=m):m=e[4];let h;e[5]!==i?(h=p=>{We.error(p instanceof Error?p.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=h):h=e[6];let w;e[7]!==c||e[8]!==m||e[9]!==h?(w={mutationFn:c,onSuccess:m,onError:h},e[7]=c,e[8]=m,e[9]=h,e[10]=w):w=e[10];const u=st(w),y=os;let l;e[11]!==s||e[12]!==o?(l=s?n.jsx(it,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Lt,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=l):l=e[13];let g;e[14]!==o||e[15]!==i?(g=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=g):g=e[16];let f;e[17]!==g?(f=n.jsx("h3",{className:"text-lg font-medium",children:g}),e[17]=g,e[18]=f):f=e[18];let d;e[19]!==a||e[20]!==i?(d=i("common.autoDomainJoinScreen.joinDescription",{domain:a}),e[19]=a,e[20]=i,e[21]=d):d=e[21];let x;e[22]!==d?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[22]=d,e[23]=x):x=e[23];let b;e[24]!==f||e[25]!==x?(b=n.jsxs("div",{className:"space-y-2",children:[f,x]}),e[24]=f,e[25]=x,e[26]=b):b=e[26];let S;e[27]!==u?(S=()=>u.mutate(),e[27]=u,e[28]=S):S=e[28];let j;e[29]!==u.isPending||e[30]!==o||e[31]!==i?(j=u.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=u.isPending,e[30]=o,e[31]=i,e[32]=j):j=e[32];let P;e[33]!==u.isPending||e[34]!==S||e[35]!==j?(P=n.jsx(F,{onClick:S,disabled:u.isPending,children:j}),e[33]=u.isPending,e[34]=S,e[35]=j,e[36]=P):P=e[36];const k=u.isPending;let v;e[37]!==i?(v=i("common.goHome"),e[37]=i,e[38]=v):v=e[38];let T;e[39]!==u.isPending||e[40]!==v?(T=n.jsx(F,{variant:"ghost",onClick:y,disabled:k,children:v}),e[39]=u.isPending,e[40]=v,e[41]=T):T=e[41];let N;e[42]!==P||e[43]!==T?(N=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[P,T]}),e[42]=P,e[43]=T,e[44]=N):N=e[44];let _;return e[45]!==b||e[46]!==N||e[47]!==l?(_=n.jsxs(fe,{children:[l,b,N]}),e[45]=b,e[46]=N,e[47]=l,e[48]=_):_=e[48],_}function os(){window.location.href="/"}function St(t){const e=R.c(25),{orgSlug:o,orgName:r,reason:s}=t,a=J(),i=is,c=s==="not-found",m=c?Sn:Tt;let h;e[0]!==c||e[1]!==a?(h=a(c?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=c,e[1]=a,e[2]=h):h=e[2];const w=h;let u;e[3]!==c||e[4]!==r||e[5]!==o||e[6]!==a?(u=c?n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:r??o}),".",n.jsx("br",{}),a("common.noAccessScreen.askAdminToInvite")]}),e[3]=c,e[4]=r,e[5]=o,e[6]=a,e[7]=u):u=e[7];const y=u;let l;e[8]!==m?(l=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(m,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=m,e[9]=l):l=e[9];let g;e[10]!==w?(g=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=g):g=e[11];let f;e[12]!==y?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[12]=y,e[13]=f):f=e[13];let d;e[14]!==g||e[15]!==f?(d=n.jsxs("div",{className:"space-y-2",children:[g,f]}),e[14]=g,e[15]=f,e[16]=d):d=e[16];let x;e[17]!==a?(x=a("common.goHome"),e[17]=a,e[18]=x):x=e[18];let b;e[19]!==x?(b=n.jsx(F,{onClick:i,children:x}),e[19]=x,e[20]=b):b=e[20];let S;return e[21]!==l||e[22]!==d||e[23]!==b?(S=n.jsxs(fe,{children:[l,d,b]}),e[21]=l,e[22]=d,e[23]=b,e[24]=S):S=e[24],S}function is(){window.location.href="/"}function as(t){const e=R.c(59),{invitationId:o,orgName:r,orgSlug:s,orgLogo:a}=t,i=J();let c;e[0]!==o?(c=async()=>{const C=await Be.organization.acceptInvitation({invitationId:o});if(C.error)throw new Error(C.error.message);return C.data},e[0]=o,e[1]=c):c=e[1];let m;e[2]!==s?(m=()=>{Vt(),window.location.href=`/${s}`},e[2]=s,e[3]=m):m=e[3];let h;e[4]!==i?(h=C=>{We.error(C instanceof Error?C.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=h):h=e[5];let w;e[6]!==c||e[7]!==m||e[8]!==h?(w={mutationFn:c,onSuccess:m,onError:h},e[6]=c,e[7]=m,e[8]=h,e[9]=w):w=e[9];const u=st(w);let y;e[10]!==o?(y=async()=>{const C=await Be.organization.rejectInvitation({invitationId:o});if(C.error)throw new Error(C.error.message);return C.data},e[10]=o,e[11]=y):y=e[11];let l,g;e[12]!==i?(l=()=>{We.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},g=C=>{We.error(C instanceof Error?C.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=l,e[14]=g):(l=e[13],g=e[14]);let f;e[15]!==y||e[16]!==l||e[17]!==g?(f={mutationFn:y,onSuccess:l,onError:g},e[15]=y,e[16]=l,e[17]=g,e[18]=f):f=e[18];const d=st(f),x=u.isPending||d.isPending;let b;e[19]!==a||e[20]!==r?(b=a?n.jsx(it,{url:a,fallback:r,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(wn,{className:"h-6 w-6 text-primary"})}),e[19]=a,e[20]=r,e[21]=b):b=e[21];let S;e[22]!==r||e[23]!==i?(S=i("common.pendingInviteScreen.invitedTo",{orgName:r}),e[22]=r,e[23]=i,e[24]=S):S=e[24];let j;e[25]!==S?(j=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[25]=S,e[26]=j):j=e[26];let P;e[27]!==i?(P=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=P):P=e[28];let k;e[29]!==P?(k=n.jsx("p",{className:"text-sm text-muted-foreground",children:P}),e[29]=P,e[30]=k):k=e[30];let v;e[31]!==j||e[32]!==k?(v=n.jsxs("div",{className:"space-y-2",children:[j,k]}),e[31]=j,e[32]=k,e[33]=v):v=e[33];let T;e[34]!==u?(T=()=>u.mutate(),e[34]=u,e[35]=T):T=e[35];let N;e[36]!==u.isPending||e[37]!==i?(N=u.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=u.isPending,e[37]=i,e[38]=N):N=e[38];let _;e[39]!==x||e[40]!==T||e[41]!==N?(_=n.jsx(F,{onClick:T,disabled:x,children:N}),e[39]=x,e[40]=T,e[41]=N,e[42]=_):_=e[42];let p;e[43]!==d?(p=()=>d.mutate(),e[43]=d,e[44]=p):p=e[44];let A;e[45]!==d.isPending||e[46]!==i?(A=d.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=d.isPending,e[46]=i,e[47]=A):A=e[47];let $;e[48]!==x||e[49]!==p||e[50]!==A?($=n.jsx(F,{variant:"ghost",onClick:p,disabled:x,children:A}),e[48]=x,e[49]=p,e[50]=A,e[51]=$):$=e[51];let I;e[52]!==_||e[53]!==$?(I=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,$]}),e[52]=_,e[53]=$,e[54]=I):I=e[54];let D;return e[55]!==v||e[56]!==I||e[57]!==b?(D=n.jsxs(fe,{children:[b,v,I]}),e[55]=v,e[56]=I,e[57]=b,e[58]=D):D=e[58],D}function rs(t){const e=R.c(23),{orgName:o,orgLogo:r}=t,s=J();let a;e[0]!==r||e[1]!==o?(a=r?n.jsx(it,{url:r,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(vn,{className:"h-6 w-6 text-primary"})}),e[0]=r,e[1]=o,e[2]=a):a=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let c;e[5]!==i?(c=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=c):c=e[6];let m;e[7]!==o||e[8]!==s?(m=s("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=s,e[9]=m):m=e[9];let h;e[10]!==m?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[10]=m,e[11]=h):h=e[11];let w;e[12]!==c||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[c,h]}),e[12]=c,e[13]=h,e[14]=w):w=e[14];let u;e[15]!==s?(u=s("common.goHome"),e[15]=s,e[16]=u):u=e[16];let y;e[17]!==u?(y=n.jsx(F,{variant:"ghost",onClick:ls,children:u}),e[17]=u,e[18]=y):y=e[18];let l;return e[19]!==a||e[20]!==w||e[21]!==y?(l=n.jsxs(fe,{children:[a,w,y]}),e[19]=a,e[20]=w,e[21]=y,e[22]=l):l=e[22],l}function ls(){window.location.href="/"}function cs(t){const e=R.c(45),{orgName:o,orgSlug:r,orgLogo:s,domain:a}=t,i=J();let c;e[0]!==r?(c=async()=>{const _=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),p=await _.json();if(!_.ok||!p.success)throw new Error(p.error??"Failed to request access");return p},e[0]=r,e[1]=c):c=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=us,e[2]=m):m=e[2];let h;e[3]!==i?(h=_=>{We.error(_ instanceof Error?_.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=h):h=e[4];let w;e[5]!==c||e[6]!==h?(w={mutationFn:c,onSuccess:m,onError:h},e[5]=c,e[6]=h,e[7]=w):w=e[7];const u=st(w);let y;e[8]!==s||e[9]!==o?(y=s?n.jsx(it,{url:s,fallback:o,shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Lt,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=y):y=e[10];let l;e[11]!==o||e[12]!==i?(l=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=l):l=e[13];let g;e[14]!==l?(g=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[14]=l,e[15]=g):g=e[15];let f;e[16]!==a||e[17]!==i?(f=i("common.requestToJoinScreen.description",{domain:a}),e[16]=a,e[17]=i,e[18]=f):f=e[18];let d;e[19]!==f?(d=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[19]=f,e[20]=d):d=e[20];let x;e[21]!==g||e[22]!==d?(x=n.jsxs("div",{className:"space-y-2",children:[g,d]}),e[21]=g,e[22]=d,e[23]=x):x=e[23];let b;e[24]!==u?(b=()=>u.mutate(),e[24]=u,e[25]=b):b=e[25];let S;e[26]!==u.isPending||e[27]!==i?(S=u.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=u.isPending,e[27]=i,e[28]=S):S=e[28];let j;e[29]!==u.isPending||e[30]!==b||e[31]!==S?(j=n.jsx(F,{onClick:b,disabled:u.isPending,children:S}),e[29]=u.isPending,e[30]=b,e[31]=S,e[32]=j):j=e[32];const P=u.isPending;let k;e[33]!==i?(k=i("common.goHome"),e[33]=i,e[34]=k):k=e[34];let v;e[35]!==u.isPending||e[36]!==k?(v=n.jsx(F,{variant:"ghost",onClick:ds,disabled:P,children:k}),e[35]=u.isPending,e[36]=k,e[37]=v):v=e[37];let T;e[38]!==j||e[39]!==v?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[j,v]}),e[38]=j,e[39]=v,e[40]=T):T=e[40];let N;return e[41]!==x||e[42]!==T||e[43]!==y?(N=n.jsxs(fe,{children:[y,x,T]}),e[41]=x,e[42]=T,e[43]=y,e[44]=N):N=e[44],N}function ds(){window.location.href="/"}function us(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function ms(t){const e=R.c(7);let o;e[0]!==t?(o=Ue.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let r;e[2]!==t?(r=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=r):r=e[3];let s;return e[4]!==o||e[5]!==r?(s={queryKey:o,queryFn:r,refetchOnWindowFocus:!1},e[4]=o,e[5]=r,e[6]=s):s=e[6],Nt(s)}function fs({orgSlug:t}){const{data:e}=ms(t);if(e.status!=="member"){Wt()?.org===t&&Yt();const o=localStorage.getItem(Ke.lastOrgSlug())===t;if(o&&localStorage.removeItem(Ke.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(St,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(as,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ss,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(cs,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(rs,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(St,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Rt(t){const e=R.c(42),{ariaLabel:o,dismissLabel:r,eyebrow:s,title:a,description:i,icon:c,children:m,footerLeading:h,actions:w,onDismiss:u,tone:y}=t,l=y===void 0?"neutral":y,g=h||w;let f;e[0]!==l?(f=l==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=l,e[1]=f):f=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(En,{size:14}),e[2]=d):d=e[2];let x;e[3]!==r||e[4]!==u?(x=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":r,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:u,children:d}),e[3]=r,e[4]=u,e[5]=x):x=e[5];const b=c&&"flex items-start gap-3",S=m&&"pb-3";let j;e[6]!==b||e[7]!==S?(j=ht("p-4 pr-11",b,S),e[6]=b,e[7]=S,e[8]=j):j=e[8];let P;e[9]!==c?(P=c&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:c}),e[9]=c,e[10]=P):P=e[10];let k;e[11]!==s?(k=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=k):k=e[12];let v;e[13]!==a?(v=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:a}),e[13]=a,e[14]=v):v=e[14];let T;e[15]!==i?(T=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=T):T=e[16];let N;e[17]!==v||e[18]!==T||e[19]!==k?(N=n.jsxs("div",{children:[k,v,T]}),e[17]=v,e[18]=T,e[19]=k,e[20]=N):N=e[20];let _;e[21]!==m?(_=m&&n.jsx("div",{className:"mt-3",children:m}),e[21]=m,e[22]=_):_=e[22];let p;e[23]!==N||e[24]!==_?(p=n.jsxs("div",{className:"min-w-0 flex-1",children:[N,_]}),e[23]=N,e[24]=_,e[25]=p):p=e[25];let A;e[26]!==p||e[27]!==j||e[28]!==P?(A=n.jsxs("div",{className:j,children:[P,p]}),e[26]=p,e[27]=j,e[28]=P,e[29]=A):A=e[29];let $;e[30]!==w||e[31]!==h||e[32]!==g||e[33]!==l?($=g&&n.jsxs("div",{className:ht("flex items-center justify-between gap-3 px-4 py-2.5",l==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:w})]}),e[30]=w,e[31]=h,e[32]=g,e[33]=l,e[34]=$):$=e[34];let I;return e[35]!==o||e[36]!==A||e[37]!==$||e[38]!==f||e[39]!==x||e[40]!==l?(I=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":l,className:"relative w-full overflow-hidden rounded-lg bg-popover shadow-soft animate-in fade-in slide-in-from-bottom-2 duration-300",children:[f,x,A,$]}),e[35]=o,e[36]=A,e[37]=$,e[38]=f,e[39]=x,e[40]=l,e[41]=I):I=e[41],I}const hs={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function Ft(t){return`[data-tour="${hs[t]}"]`}const gs=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function ps(t){return gs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ys(t,e){return ps(e).map(o=>({element:Ft(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const bs=Ft("switcher"),xs=30;function Mt(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function Ss(t,e){return ys(t,e).filter(o=>typeof o.element=="string"&&Mt(o.element))}function ws(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(o,{driver:r})=>{if(o.footerButtons.querySelector(".layout-tour-skip"))return;const s=document.createElement("button");s.type="button",s.className="driver-popover-footer-btn layout-tour-skip",s.textContent=t("layoutTour.skip"),s.addEventListener("click",()=>r.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{Ve=!1},steps:e}}let Ve=!1;async function vs(){return(await Qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function js(t,e){if(Ve)return;Ve=!0;let o=0;const r=()=>{if(!Mt(bs)&&o++<xs){requestAnimationFrame(r);return}const s=Ss(t,e);if(s.length===0){Ve=!1;return}vs().then(a=>{a(ws(t,s)).drive()}).catch(()=>{Ve=!1})};r()}function ks(t){return t!=="off"}function si(t){if(!t.hasSource)return[];const e=["site-editor"];return ks(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function zt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function oi(t){return t.reportsOnly&&!t.onReportAgent&&zt(t.tabId)}const qt=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:bt,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:lt,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:jn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:gt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:ae,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:bt,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:ae,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:de,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:qe,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:ae,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:de,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:qe,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:de,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:ae,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:qe,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:ae,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:de,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:qe,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:ae,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:de,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:qe,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:ae,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:lt,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:de,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:gt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:qe,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:de,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:ae,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:lt,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:ae,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:kn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ot="studio.release-feed.v1",dt=new Set;let ue="",me={},ut=!1;function Ts(){if(ut)return ue||"{}";try{return localStorage.getItem(ot)??"{}"}catch{return ue||"{}"}}function Kt(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function wt(){const t=Ts();return t!==ue&&(ue=t,me=Kt(t)),me}function Ns(t){dt.add(t);const e=o=>{if(!(o.key!==ot&&o.key!==null)){try{const r=localStorage.getItem(ot)??"{}",a={...Kt(r),...me};me=a,ue=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{dt.delete(t),window.removeEventListener("storage",e)}}function _s(t){me=t,ue=JSON.stringify(t);try{localStorage.setItem(ot,ue),ut=!1}catch{ut=!0}dt.forEach(e=>e())}function Ps(){const t=R.c(7),e=se.useSyncExternalStore(Ns,wt,wt);let o;t[0]!==e?(o=m=>!!e[m],t[0]=e,t[1]=o):o=t[1];const r=o,s=As;let a;t[2]!==e?(a=qt.reduce((m,h)=>e[h.id]?m:m+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let c;return t[4]!==r||t[5]!==i?(c={isSeen:r,markSeen:s,unseenCount:i},t[4]=r,t[5]=i,t[6]=c):c=t[6],c}function As(t){me[t]||_s({...me,[t]:{seenAt:new Date().toISOString()}})}const Cs=720*60*60*1e3,Es=10080*60*1e3;function Os(t){const[e,o,r]=t.split("-").map(Number);return!e||!o||!r?new Date(t).getTime():new Date(e,o-1,r).getTime()}function Is(t){const e=qt[0];if(!e)return null;const o=Os(e.date),r=t-o;return r<0||r>Cs?null:e}function $s(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ls(t,e){const o=$s(t);return o===null?!1:e-o>=Es}function Ds(){const t=R.c(46),e=J(),o=On(),r=Xt(),s=Dt(),a=!!o,i=r===re.home&&!o;let c;t[0]!==s||t[1]!==a?(c=a&&!!s&&zt(s),t[0]=s,t[1]=a,t[2]=c):c=t[2];const m=c,{data:h}=Be.useSession(),{isSeen:w,markSeen:u}=Ps(),y=Ln(6e4);let l,g,f;if(t[3]!==w||t[4]!==y||t[5]!==h?.user?.createdAt){f=Symbol.for("react.early_return_sentinel");e:{if(l=Is(y),!l){f=null;break e}if(!Ls(h?.user?.createdAt,y)){f=null;break e}g=w(l.id)}t[3]=w,t[4]=y,t[5]=h?.user?.createdAt,t[6]=l,t[7]=g,t[8]=f}else l=t[6],g=t[7],f=t[8];if(f!==Symbol.for("react.early_return_sentinel"))return f;if(g)return null;let d;t[9]!==l.id||t[10]!==a||t[11]!==u||t[12]!==i||t[13]!==m||t[14]!==e?(d=()=>{u(l.id),js(e,{onOrgHome:i,inProject:a,onSiteEditor:m})},t[9]=l.id,t[10]=a,t[11]=u,t[12]=i,t[13]=m,t[14]=e,t[15]=d):d=t[15];const x=d;let b;t[16]!==e?(b=e("announcements.release.ariaLabel"),t[16]=e,t[17]=b):b=t[17];let S;t[18]!==e?(S=e("announcements.release.dismiss"),t[18]=e,t[19]=S):S=t[19];const j=l.eyebrow,P=l.title;let k;t[20]!==l.id||t[21]!==u?(k=()=>u(l.id),t[20]=l.id,t[21]=u,t[22]=k):k=t[22];let v;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==u||t[26]!==e?(v=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>u(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[23]=l.id,t[24]=l.learnMoreHref,t[25]=u,t[26]=e,t[27]=v):v=t[27];let T;t[28]!==l.cta||t[29]!==l.id||t[30]!==u||t[31]!==x?(T=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>u(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):n.jsx(F,{size:"sm",onClick:x,children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=u,t[31]=x,t[32]=T):T=t[32];let N;t[33]!==l.bullets?(N=l.bullets.map(Rs),t[33]=l.bullets,t[34]=N):N=t[34];let _;t[35]!==N?(_=n.jsx("ul",{className:"flex flex-col gap-3",children:N}),t[35]=N,t[36]=_):_=t[36];let p;return t[37]!==l.eyebrow||t[38]!==l.title||t[39]!==T||t[40]!==_||t[41]!==b||t[42]!==S||t[43]!==k||t[44]!==v?(p=n.jsx(Rt,{ariaLabel:b,dismissLabel:S,eyebrow:j,title:P,onDismiss:k,footerLeading:v,actions:T,children:_}),t[37]=l.eyebrow,t[38]=l.title,t[39]=T,t[40]=_,t[41]=b,t[42]=S,t[43]=k,t[44]=v,t[45]=p):p=t[45],p}function Rs(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const Bt=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),ce=Bt?"⌘":"Ctrl",G={commandPalette:{keys:[ce,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[ce,"["],description:"Back to previous"},focusChatInput:{keys:[ce,"L"],description:"Focus chat input"},saveAndFormat:{keys:[ce,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[ce,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[ce,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",ce,"S"],description:"New task"},toggleDaemon:{keys:[ce,"D"],description:"Toggle daemon logs"}},Fs=[{label:"General",shortcuts:[G.commandPalette,G.keyboardShortcuts,G.back,G.newTask,G.toggleDaemon]},{label:"Editor",shortcuts:[G.saveAndFormat]},{label:"Chat",shortcuts:[G.focusChatInput,G.togglePlanMode,G.sendMessage,G.newLine]},{label:"Questions",shortcuts:[G.selectOption]},{label:"Monitoring",shortcuts:[G.applyFilter]}];function vt(t){return Bt?t.metaKey:t.ctrlKey}function Ms(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function zs(t){const e=R.c(11),{open:o,onOpenChange:r}=t,s=J();let a;e[0]!==s?(a=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==a?(i=n.jsx(_t,{children:n.jsx(Pt,{children:a})}),e[2]=a,e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"flex flex-col gap-4",children:Fs.map(qs)}),e[4]=c):c=e[4];let m;e[5]!==i?(m=n.jsxs(At,{className:"sm:max-w-md",children:[i,c]}),e[5]=i,e[6]=m):m=e[6];let h;return e[7]!==r||e[8]!==o||e[9]!==m?(h=n.jsx(Ct,{open:o,onOpenChange:r,children:m}),e[7]=r,e[8]=o,e[9]=m,e[10]=h):h=e[10],h}function qs(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ks)})]},t.label)}function Ks(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Bs)})]},t.description)}function Bs(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const jt=8;function Hs(t){const{org:e}=mt(),o=Bn({connectionId:Ot,orgId:e.id,orgSlug:e.slug}),{data:r}=He({queryKey:Ue.globalSearch(e.id,t,jt),enabled:!!o&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!o)return[];try{return(await o.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:jt}})).structuredContent?.items??[]}catch{return[]}}});return r??[]}function Us(t){const e=R.c(195),{open:o,onOpenChange:r}=t,s=J(),a=Et(),{org:i}=mt(),{projects:c,hasProjects:m}=In(),[h,w]=se.useState(""),u=se.useDeferredValue(h),y=Hs(u);let l;e[0]!==r?(l=()=>{r(!1),w("")},e[0]=r,e[1]=l):l=e[1];const g=l;let f;e[2]!==g?(f=(q,W)=>{ct("command_palette_used",{kind:W}),q(),g()},e[2]=g,e[3]=f):f=e[3];const d=f;let x;e[4]!==a||e[5]!==i.id||e[6]!==i.slug?(x=q=>{if(q.type==="connection"){if(!q.slug){a({to:"/$org/settings/connections",params:{org:i.slug},search:{tab:"all"}});return}a({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:q.slug}});return}if(q.type==="task"){a({to:re.tasks,params:{org:i.slug,taskKey:q.key??void 0}});return}const W=It(i.id).id;Zt(a,en({org:i.slug,agentId:q.virtual_mcp_id??W,superAgentId:W}),{search:()=>({thread:q.id}),replace:!1})},e[4]=a,e[5]=i.id,e[6]=i.slug,e[7]=x):x=e[7];const b=x;let S;e[8]!==h?(S=[h],e[8]=h,e[9]=S):S=e[9];const j=S;let P,k,v,T,N,_,p,A,$,I,D,C,M;if(e[10]!==g||e[11]!==d||e[12]!==m||e[13]!==y||e[14]!==a||e[15]!==r||e[16]!==o||e[17]!==b||e[18]!==i.slug||e[19]!==c||e[20]!==j||e[21]!==s||e[22]!==h){const q=y.filter(Js),W=y.filter(Gs);let Y;e[36]!==i.slug?(Y={org:i.slug},e[36]=i.slug,e[37]=Y):Y=e[37];const L=Y;let Q;e[38]!==s?(Q=s("sidebar.navDestinations.home"),e[38]=s,e[39]=Q):Q=e[39];let Ge;e[40]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(Nn,{"aria-hidden":"true"}),e[40]=Ge):Ge=e[40];let oe;e[41]!==L||e[42]!==Q?(oe={key:"home",label:Q,icon:Ge,to:re.home,params:L},e[41]=L,e[42]=Q,e[43]=oe):oe=e[43];let B;e[44]!==s?(B=s("sidebar.navDestinations.reports"),e[44]=s,e[45]=B):B=e[45];let X;e[46]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(_n,{"aria-hidden":"true"}),e[46]=X):X=e[46];let Z;e[47]!==L||e[48]!==B?(Z={key:"reports",label:B,icon:X,to:re.reports,params:L},e[47]=L,e[48]=B,e[49]=Z):Z=e[49];let ee;e[50]!==s?(ee=s("sidebar.navDestinations.tasks"),e[50]=s,e[51]=ee):ee=e[51];let te;e[52]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(yt,{"aria-hidden":"true"}),e[52]=te):te=e[52];let H;e[53]!==i.slug?(H={org:i.slug,taskKey:void 0},e[53]=i.slug,e[54]=H):H=e[54];let U;e[55]!==ee||e[56]!==H?(U={key:"tasks",label:ee,icon:te,to:re.tasks,params:H},e[55]=ee,e[56]=H,e[57]=U):U=e[57];let ne;e[58]!==s?(ne=s("sidebar.navDestinations.library"),e[58]=s,e[59]=ne):ne=e[59];let ie;e[60]===Symbol.for("react.memo_cache_sentinel")?(ie=n.jsx(Pn,{"aria-hidden":"true"}),e[60]=ie):ie=e[60];let E;e[61]!==L||e[62]!==ne?(E={key:"library",label:ne,icon:ie,to:re.library,params:L},e[61]=L,e[62]=ne,e[63]=E):E=e[63];let z;e[64]!==s?(z=s("sidebar.navDestinations.discover"),e[64]=s,e[65]=z):z=e[65];let Qe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Qe=n.jsx(An,{"aria-hidden":"true"}),e[66]=Qe):Qe=e[66];let he;e[67]!==L||e[68]!==z?(he={key:"discover",label:z,icon:Qe,to:re.discover,params:L},e[67]=L,e[68]=z,e[69]=he):he=e[69];let Xe;e[70]!==oe||e[71]!==Z||e[72]!==U||e[73]!==E||e[74]!==he?(Xe=[oe,Z,U,E,he],e[70]=oe,e[71]=Z,e[72]=U,e[73]=E,e[74]=he,e[75]=Xe):Xe=e[75];const at=Xe;k=Rn,T=o,e[76]!==g||e[77]!==r?(N=O=>O?r(!0):g(),e[76]=g,e[77]=r,e[78]=N):N=e[78],e[79]!==s?(_=s("commandPalette.title"),e[79]=s,e[80]=_):_=e[80],e[81]!==s?(p=s("commandPalette.description"),e[81]=s,e[82]=p):p=e[82];let ge;e[83]!==s?(ge=s("commandPalette.placeholder"),e[83]=s,e[84]=ge):ge=e[84];let pe;e[85]!==s?(pe=s("commandPalette.placeholder"),e[85]=s,e[86]=pe):pe=e[86],e[87]!==ge||e[88]!==pe||e[89]!==h?(A=n.jsx(Fn,{placeholder:ge,"aria-label":pe,value:h,onValueChange:w}),e[87]=ge,e[88]=pe,e[89]=h,e[90]=A):A=e[90],P=Mn;let ye;e[91]!==s?(ye=s("commandPalette.empty"),e[91]=s,e[92]=ye):ye=e[92],e[93]!==ye?($=n.jsx(zn,{children:ye}),e[93]=ye,e[94]=$):$=e[94];let be;e[95]!==s?(be=s("commandPalette.goTo"),e[95]=s,e[96]=be):be=e[96];let xe;e[97]!==at||e[98]!==d||e[99]!==a?(xe=at.map(O=>n.jsxs(le,{onSelect:()=>d(()=>a({to:O.to,params:O.params}),"destination"),children:[O.icon,n.jsx("span",{children:O.label})]},O.key)),e[97]=at,e[98]=d,e[99]=a,e[100]=xe):xe=e[100],e[101]!==be||e[102]!==xe?(I=n.jsx(Je,{heading:be,children:xe}),e[101]=be,e[102]=xe,e[103]=I):I=e[103],e[104]!==d||e[105]!==m||e[106]!==a||e[107]!==i.slug||e[108]!==c||e[109]!==s?(D=m&&n.jsx(Je,{heading:s("commandPalette.projects"),children:c.map(O=>n.jsxs(le,{value:`project ${O.title}`,onSelect:()=>d(()=>a({to:re.projects,params:{org:i.slug,agentId:O.id}}),"project"),children:[n.jsx(Kn,{icon:O.icon,name:O.title,"aria-hidden":"true"}),n.jsx("span",{children:O.title})]},O.id))}),e[104]=d,e[105]=m,e[106]=a,e[107]=i.slug,e[108]=c,e[109]=s,e[110]=D):D=e[110];let Se;e[111]!==s?(Se=s("commandPalette.actions"),e[111]=s,e[112]=Se):Se=e[112];let we;e[113]!==s?(we=s("commandPalette.newProject"),e[113]=s,e[114]=we):we=e[114];let ve;e[115]!==d||e[116]!==a||e[117]!==L?(ve=()=>d(()=>a({to:re.home,params:L}),"new_project"),e[115]=d,e[116]=a,e[117]=L,e[118]=ve):ve=e[118];let Ze;e[119]===Symbol.for("react.memo_cache_sentinel")?(Ze=n.jsx(xt,{"aria-hidden":"true"}),e[119]=Ze):Ze=e[119];let je;e[120]!==s?(je=s("commandPalette.newProject"),e[120]=s,e[121]=je):je=e[121];let ke;e[122]!==je?(ke=n.jsx("span",{children:je}),e[122]=je,e[123]=ke):ke=e[123];let Te;e[124]!==we||e[125]!==ve||e[126]!==ke?(Te=n.jsxs(le,{value:we,onSelect:ve,children:[Ze,ke]}),e[124]=we,e[125]=ve,e[126]=ke,e[127]=Te):Te=e[127];let Ne;e[128]!==s?(Ne=s("commandPalette.inviteTeammate"),e[128]=s,e[129]=Ne):Ne=e[129];let _e;e[130]!==d||e[131]!==a||e[132]!==L?(_e=()=>d(()=>a({to:"/$org/settings/members",params:L}),"invite"),e[130]=d,e[131]=a,e[132]=L,e[133]=_e):_e=e[133];let et;e[134]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(Cn,{"aria-hidden":"true"}),e[134]=et):et=e[134];let Pe;e[135]!==s?(Pe=s("commandPalette.inviteTeammate"),e[135]=s,e[136]=Pe):Pe=e[136];let Ae;e[137]!==Pe?(Ae=n.jsx("span",{children:Pe}),e[137]=Pe,e[138]=Ae):Ae=e[138];let Ce;e[139]!==Ne||e[140]!==_e||e[141]!==Ae?(Ce=n.jsxs(le,{value:Ne,onSelect:_e,children:[et,Ae]}),e[139]=Ne,e[140]=_e,e[141]=Ae,e[142]=Ce):Ce=e[142];let Ee;e[143]!==s?(Ee=s("commandPalette.addConnection"),e[143]=s,e[144]=Ee):Ee=e[144];let Oe;e[145]!==d||e[146]!==a||e[147]!==L?(Oe=()=>d(()=>a({to:"/$org/settings/connections",params:L,search:{tab:"all"}}),"add_connection"),e[145]=d,e[146]=a,e[147]=L,e[148]=Oe):Oe=e[148];let tt;e[149]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(xt,{"aria-hidden":"true"}),e[149]=tt):tt=e[149];let Ie;e[150]!==s?(Ie=s("commandPalette.addConnection"),e[150]=s,e[151]=Ie):Ie=e[151];let $e;e[152]!==Ie?($e=n.jsx("span",{children:Ie}),e[152]=Ie,e[153]=$e):$e=e[153];let Le;e[154]!==Ee||e[155]!==Oe||e[156]!==$e?(Le=n.jsxs(le,{value:Ee,onSelect:Oe,children:[tt,$e]}),e[154]=Ee,e[155]=Oe,e[156]=$e,e[157]=Le):Le=e[157];let De;e[158]!==s?(De=s("commandPalette.settings"),e[158]=s,e[159]=De):De=e[159];let Re;e[160]!==d||e[161]!==a||e[162]!==L?(Re=()=>d(()=>a({to:"/$org/settings/general",params:L}),"settings"),e[160]=d,e[161]=a,e[162]=L,e[163]=Re):Re=e[163];let nt;e[164]===Symbol.for("react.memo_cache_sentinel")?(nt=n.jsx(Dn,{"aria-hidden":"true"}),e[164]=nt):nt=e[164];let Fe;e[165]!==s?(Fe=s("commandPalette.settings"),e[165]=s,e[166]=Fe):Fe=e[166];let Me;e[167]!==Fe?(Me=n.jsx("span",{children:Fe}),e[167]=Fe,e[168]=Me):Me=e[168];let ze;e[169]!==De||e[170]!==Re||e[171]!==Me?(ze=n.jsxs(le,{value:De,onSelect:Re,children:[nt,Me]}),e[169]=De,e[170]=Re,e[171]=Me,e[172]=ze):ze=e[172],e[173]!==Se||e[174]!==Te||e[175]!==Ce||e[176]!==Le||e[177]!==ze?(C=n.jsxs(Je,{heading:Se,children:[Te,Ce,Le,ze]}),e[173]=Se,e[174]=Te,e[175]=Ce,e[176]=Le,e[177]=ze,e[178]=C):C=e[178],M=q.length>0&&n.jsx(Je,{heading:s("commandPalette.connections"),children:q.map(O=>n.jsxs(le,{value:`${O.title} ${O.id}`,keywords:j,onSelect:()=>d(()=>b(O),"connection"),children:[n.jsx(qn,{icon:O.icon,name:O.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:O.title})]},`connection:${O.id}`))}),v=W.length>0&&n.jsx(Je,{heading:s("commandPalette.results"),children:W.map(O=>n.jsxs(le,{value:`${O.title} ${O.id}`,keywords:j,onSelect:()=>d(()=>b(O),O.type),children:[O.type==="thread"?n.jsx(Tn,{"aria-hidden":"true"}):n.jsx(yt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:O.title}),O.type==="task"&&O.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:O.key})]},`${O.type}:${O.id}`))}),e[10]=g,e[11]=d,e[12]=m,e[13]=y,e[14]=a,e[15]=r,e[16]=o,e[17]=b,e[18]=i.slug,e[19]=c,e[20]=j,e[21]=s,e[22]=h,e[23]=P,e[24]=k,e[25]=v,e[26]=T,e[27]=N,e[28]=_,e[29]=p,e[30]=A,e[31]=$,e[32]=I,e[33]=D,e[34]=C,e[35]=M}else P=e[23],k=e[24],v=e[25],T=e[26],N=e[27],_=e[28],p=e[29],A=e[30],$=e[31],I=e[32],D=e[33],C=e[34],M=e[35];let K;e[179]!==P||e[180]!==v||e[181]!==$||e[182]!==I||e[183]!==D||e[184]!==C||e[185]!==M?(K=n.jsxs(P,{children:[$,I,D,C,M,v]}),e[179]=P,e[180]=v,e[181]=$,e[182]=I,e[183]=D,e[184]=C,e[185]=M,e[186]=K):K=e[186];let V;return e[187]!==k||e[188]!==T||e[189]!==N||e[190]!==_||e[191]!==p||e[192]!==A||e[193]!==K?(V=n.jsxs(k,{open:T,onOpenChange:N,title:_,description:p,children:[A,K]}),e[187]=k,e[188]=T,e[189]=N,e[190]=_,e[191]=p,e[192]=A,e[193]=K,e[194]=V):V=e[194],V}function Gs(t){return t.type!=="connection"}function Js(t){return t.type==="connection"}const Ye=new Vn(!1);function Vs(){Ye.set(!0)}function Ws(){Ye.set(!1)}function Ys(){const t=R.c(2),e=se.useSyncExternalStore(Ye.subscribe,Ye.get);let o;return t[0]!==e?(o=[e,Ye.set],t[0]=e,t[1]=o):o=t[1],o}const Qs=300*1e3,Xs=2;function Zs(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function eo(t,e){return t.count>=Xs&&t.version!==null&&t.version!==e}function to(){const t=R.c(31),e=J();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:Ue.appVersionCheck(),queryFn:so,refetchInterval:Qs,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:r,dataUpdatedAt:s}=He(o),[a,i]=se.useState(0);let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c={version:null,count:0},t[1]=c):c=t[1];const[m,h]=se.useState(c);s!==a&&(i(s),h(T=>Zs(T,r,"4.514.5")));const[w,u]=se.useState(null);if(!eo(m,w))return null;let y;t[2]!==e?(y=e("announcements.version.ariaLabel"),t[2]=e,t[3]=y):y=t[3];let l;t[4]!==e?(l=e("announcements.version.dismiss"),t[4]=e,t[5]=l):l=t[5];let g;t[6]!==e?(g=e("announcements.version.eyebrow"),t[6]=e,t[7]=g):g=t[7];let f;t[8]!==e?(f=e("announcements.version.title"),t[8]=e,t[9]=f):f=t[9];let d;t[10]!==e?(d=e("announcements.version.description"),t[10]=e,t[11]=d):d=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(pt,{size:16}),t[12]=x):x=t[12];let b;t[13]!==m.version?(b=()=>u(m.version),t[13]=m.version,t[14]=b):b=t[14];let S;t[15]!==e?(S=e("announcements.version.currentSession",{version:"4.514.5"}),t[15]=e,t[16]=S):S=t[16];let j;t[17]!==e?(j=e("announcements.version.refresh"),t[17]=e,t[18]=j):j=t[18];let P;t[19]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(pt,{size:14}),t[19]=P):P=t[19];let k;t[20]!==j?(k=n.jsxs(F,{size:"sm",onClick:no,children:[j,P]}),t[20]=j,t[21]=k):k=t[21];let v;return t[22]!==k||t[23]!==y||t[24]!==l||t[25]!==g||t[26]!==f||t[27]!==d||t[28]!==b||t[29]!==S?(v=n.jsx(Rt,{ariaLabel:y,dismissLabel:l,eyebrow:g,title:f,description:d,icon:x,tone:"system",onDismiss:b,footerLeading:S,actions:k}),t[22]=k,t[23]=y,t[24]=l,t[25]=g,t[26]=f,t[27]=d,t[28]=b,t[29]=S,t[30]=v):v=t[30],v}function no(){return window.location.reload()}async function so(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function oo(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const io=Date.parse("2026-07-21T00:00:00Z"),kt=t=>oo(Ke.ptBrAnnouncementSeen(t));function ao(){const t=R.c(35),e=J(),[o,r]=tn(),{data:s,isPending:a}=Be.useSession(),i=s?.user,c=i?.id,m=i?.createdAt,h=m!=null&&new Date(m).getTime()<io,w=nn()==="pt-BR",u=!a&&!!c&&h&&w&&o.language==="en"&&!kt(c).has(),[y,l]=se.useState(!1),[g,f]=se.useState(!1);!y&&!a&&(l(!0),u&&c&&(kt(c).mark(),r(lo),f(!0),ct("pt_br_auto_switch_shown")));let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=V=>{ct("pt_br_auto_switch_closed",{action:V}),f(!1)},t[0]=d):d=t[0];const x=d;let b;t[1]!==r?(b=()=>{r(ro),x("switch-back")},t[1]=r,t[2]=b):b=t[2];const S=b;let j;t[3]===Symbol.for("react.memo_cache_sentinel")?(j=V=>!V&&x("dismiss"),t[3]=j):j=t[3];let P;t[4]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=P):P=t[4];let k;t[5]!==e?(k=e("announcements.ptBr.title"),t[5]=e,t[6]=k):k=t[6];let v;t[7]!==k?(v=n.jsx(Pt,{children:k}),t[7]=k,t[8]=v):v=t[8];let T;t[9]!==e?(T=e("announcements.ptBr.description"),t[9]=e,t[10]=T):T=t[10];let N;t[11]!==T?(N=n.jsx(sn,{children:T}),t[11]=T,t[12]=N):N=t[12];let _;t[13]!==v||t[14]!==N?(_=n.jsxs(_t,{children:[v,N]}),t[13]=v,t[14]=N,t[15]=_):_=t[15];let p;t[16]!==e?(p=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=p):p=t[17];let A;t[18]!==S||t[19]!==p?(A=n.jsx(F,{variant:"outline",onClick:S,children:p}),t[18]=S,t[19]=p,t[20]=A):A=t[20];let $;t[21]===Symbol.for("react.memo_cache_sentinel")?($=()=>x("ok"),t[21]=$):$=t[21];let I;t[22]!==e?(I=e("announcements.ptBr.ok"),t[22]=e,t[23]=I):I=t[23];let D;t[24]!==I?(D=n.jsx(F,{onClick:$,children:I}),t[24]=I,t[25]=D):D=t[25];let C;t[26]!==A||t[27]!==D?(C=n.jsxs(on,{children:[A,D]}),t[26]=A,t[27]=D,t[28]=C):C=t[28];let M;t[29]!==C||t[30]!==_?(M=n.jsxs(At,{className:"sm:max-w-md",children:[P,_,C]}),t[29]=C,t[30]=_,t[31]=M):M=t[31];let K;return t[32]!==g||t[33]!==M?(K=n.jsx(Ct,{open:g,onOpenChange:j,children:M}),t[32]=g,t[33]=M,t[34]=K):K=t[34],K}function ro(t){return{...t,language:"en"}}function lo(t){return{...t,language:"pt-BR"}}function co(t){const e=an(t);return typeof e=="string"?e:void 0}function uo(){return co("experiment-pipeline-check"),null}function mo(t){const e=R.c(1),{activeOrg:o}=t;if(!o)return null;rn(o.id,{name:o.name??void 0,slug:o.slug??void 0}),ln();let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(uo,{}),e[0]=r):r=e[0],r}function fo(t){const{prev:e,virtualMcpId:o,decopilotId:r,savedLayout:s,opts:a,autosendValue:i}=t,c={mainpanel:void 0};o?c.virtualmcpid=o:e.virtualmcpid&&(c.virtualmcpid=e.virtualmcpid);const m=typeof e.virtualmcpid=="string"?e.virtualmcpid:r,w=(o??m)!==m;let u,y;return a?.panel?y=a.panel:a?.newThread&&!w&&cn(e.tabId)?(y=e.tabId,c.mainpanel=e.mainpanel,u=e.sidepanel):s?(y=s.tab,s.sidepanel!==void 0&&(u=s.sidepanel),s.mainpanel!==void 0&&(c.mainpanel=s.mainpanel)):!w&&e.tabId&&!dn(e.tabId)&&(y=e.tabId),u!==void 0&&(c.sidepanel=u),a?.autosend&&(c.autosend=i),{tabId:y,search:c}}const Ht="studio:thread-layout:v4",ho=50;function Ut(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function go(t,e,o,r=ho){const s=t.filter(([a])=>a!==e);for(s.push([e,Ut(o)]);s.length>r;)s.shift();return s}function ft(){try{const t=sessionStorage.getItem(Ht);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function Gt(t){try{sessionStorage.setItem(Ht,JSON.stringify(t))}catch{}}function po(t,e){t&&Gt(go(ft(),t,e))}function yo(t){if(!t)return null;const e=ft().find(([o])=>o===t);return e?Ut(e[1]):null}function ii(t){if(!t)return;const e=ft(),o=e.filter(([r])=>r!==t);o.length!==e.length&&Gt(o)}function Jt(t){return{queryKey:Ue.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function ai(t){const e=R.c(10);let o;e[0]!==t?(o=Jt(t),e[0]=t,e[1]=o):o=e[1];const r=He(o);let s;e[2]!==r.data?.prompts?(s=r.data?.prompts??[],e[2]=r.data?.prompts,e[3]=s):s=e[3];let a;e[4]!==r.data?.tiles?(a=r.data?.tiles??[],e[4]=r.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==r.isLoading||e[7]!==s||e[8]!==a?(i={isLoading:r.isLoading,prompts:s,tiles:a},e[6]=r.isLoading,e[7]=s,e[8]=a,e[9]=i):i=e[9],i}function bo(t){const e=R.c(31),{orgSlug:o,orgName:r,domain:s}=t,a=J();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const c=i,m=xo;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(Tt,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let w;e[3]!==a?(w=a("common.ssoRequiredScreen.title"),e[3]=a,e[4]=w):w=e[4];let u;e[5]!==w?(u=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=u):u=e[6];let y;e[7]!==s||e[8]!==r||e[9]!==a?(y=r?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:r})," ",a("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${a("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):a("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=r,e[9]=a,e[10]=y):y=e[10];let l;e[11]!==y?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[11]=y,e[12]=l):l=e[12];let g;e[13]!==u||e[14]!==l?(g=n.jsxs("div",{className:"space-y-2",children:[u,l]}),e[13]=u,e[14]=l,e[15]=g):g=e[15];let f;e[16]!==a?(f=a("common.ssoRequiredScreen.signInWithSso"),e[16]=a,e[17]=f):f=e[17];let d;e[18]!==c||e[19]!==f?(d=n.jsx(F,{onClick:c,children:f}),e[18]=c,e[19]=f,e[20]=d):d=e[20];let x;e[21]!==a?(x=a("common.goBack"),e[21]=a,e[22]=x):x=e[22];let b;e[23]!==x?(b=n.jsx(F,{variant:"ghost",onClick:m,children:x}),e[23]=x,e[24]=b):b=e[24];let S;e[25]!==b||e[26]!==d?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[d,b]}),e[25]=b,e[26]=d,e[27]=S):S=e[27];let j;return e[28]!==S||e[29]!==g?(j=n.jsxs(fe,{children:[h,g,S]}),e[28]=S,e[29]=g,e[30]=j):j=e[30],j}function xo(){window.location.href="/"}function So(t){const e=R.c(27),{notice:o,orgSlug:r}=t,s=J();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(un,{className:"h-6 w-6 text-destructive"})}),e[0]=a):a=e[0];let i;e[1]!==o.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:o.title}),e[1]=o.title,e[2]=i):i=e[2];let c;e[3]!==o.message?(c=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:o.message}),e[3]=o.message,e[4]=c):c=e[4];let m;e[5]!==i||e[6]!==c?(m=n.jsxs("div",{className:"space-y-2",children:[i,c]}),e[5]=i,e[6]=c,e[7]=m):m=e[7];let h;e[8]!==o.ctaLabel||e[9]!==o.ctaUrl?(h=o.ctaUrl&&o.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:o.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:o.ctaLabel})}):null,e[8]=o.ctaLabel,e[9]=o.ctaUrl,e[10]=h):h=e[10];const w=`/${encodeURIComponent(r)}/settings/infra-billing`;let u;e[11]!==s?(u=s("common.blockedOrgScreen.goToBilling"),e[11]=s,e[12]=u):u=e[12];let y;e[13]!==w||e[14]!==u?(y=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:w,children:u})}),e[13]=w,e[14]=u,e[15]=y):y=e[15];let l;e[16]!==s?(l=s("common.blockedOrgScreen.switchOrg"),e[16]=s,e[17]=l):l=e[17];let g;e[18]!==l?(g=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:l})}),e[18]=l,e[19]=g):g=e[19];let f;e[20]!==g||e[21]!==h||e[22]!==y?(f=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,y,g]}),e[20]=g,e[21]=h,e[22]=y,e[23]=f):f=e[23];let d;return e[24]!==f||e[25]!==m?(d=n.jsxs(fe,{children:[a,m,f]}),e[24]=f,e[25]=m,e[26]=d):d=e[26],d}function wo(t){const e=R.c(8);let o;e[0]!==t?(o=Ue.orgNotice(t??""),e[0]=t,e[1]=o):o=e[1];let r;e[2]!==t?(r=async()=>{const i=await fetch(`/api/${t}/notice`,{credentials:"include"});return i.ok?(await i.json()).notice??null:null},e[2]=t,e[3]=r):r=e[3];const s=!!t;let a;return e[4]!==o||e[5]!==r||e[6]!==s?(a={queryKey:o,queryFn:r,enabled:s,staleTime:6e4},e[4]=o,e[5]=r,e[6]=s,e[7]=a):a=e[7],He(a)}const vo="/settings/infra-billing";function jo(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(vo)}function ko(t){const e=R.c(7),{org:o,children:r}=t;let s;e[0]!==o.id||e[1]!==o.name?(s={id:o.id,organizationId:o.id,slug:"_org",name:o.name,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s):s=e[2];const a=s;let i;return e[3]!==r||e[4]!==o||e[5]!==a?(i=n.jsx(xn,{org:o,project:a,children:r}),e[3]=r,e[4]=o,e[5]=a,e[6]=i):i=e[6],i}function To(){const t=Et(),e=Wn(),{org:o}=mt(),r=mn({strict:!1}),s=Dt(),{openPanel:a,closePanel:i}=$n(),c=Xn(),m=Zn(),h=es(),w=ts(),u=(f,d=!0)=>t({to:".",search:f,replace:d}),y=()=>u(f=>({...f,sidepanel:!0})),l=(f,d,x)=>{const b=!!m&&m===f;m&&!b&&po(m,{tab:s,mainpanel:r.mainpanel,sidepanel:r.sidepanel});const S=b?null:yo(f),j=It(o.id).id,P=fo({prev:{virtualmcpid:c,tabId:s,mainpanel:r.mainpanel,sidepanel:r.sidepanel},virtualMcpId:d,decopilotId:j,savedLayout:S,opts:x,autosendValue:Qn});return w(f,()=>P.search,{virtualMcpId:d,view:{tabId:P.tabId}})};return{openSidePanel:y,setTaskId:l,createNewTask:async(f,d,x)=>{const b=crypto.randomUUID(),S=f??h;try{await e?.create({id:b,virtual_mcp_id:S,...d?{branch:d}:{}})}catch{}l(b,S,{...x,newThread:!0})},openTab:a,closeTab:i}}const No=new Set(["/$org/","/$org/home"]);function _o(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:Po},t[0]=e):e=t[0],$t(e)}function Po(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&No.has(e)}function Ao(){const t=R.c(63);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const r=fn(e)?.params.org,[s,a]=se.useState(!1),[i,c]=Ys(),[m,h]=Un(),w=hn(),u=_o(),y=r??"";let l;t[1]!==y?(l=Jt(y),t[1]=y,t[2]=l):l=t[2];const g=!!r&&u;let f;t[3]!==l||t[4]!==g?(f={...l,enabled:g},t[3]=l,t[4]=g,t[5]=f):f=t[5],He(f);const{data:d}=Be.useSession(),x=d?.user?.id;let b;t[6]!==r||t[7]!==x?(b=r&&x?gn(x,r):null,t[6]=r,t[7]=x,t[8]=b):b=t[8];const S=b;let j,P;t[9]!==w?(j=()=>{const E=z=>{if(vt(z)&&z.code==="KeyK"){z.preventDefault(),Vs();return}if(z.key==="?"&&!Ms(z.target)){z.preventDefault(),a(!0);return}vt(z)&&z.code==="BracketLeft"&&w.history.canGoBack()&&(z.preventDefault(),w.history.back())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},P=[w],t[9]=w,t[10]=j,t[11]=P):(j=t[10],P=t[11]),se.useEffect(j,P);let k;t[12]!==r?(k=Ue.activeOrganization(r),t[12]=r,t[13]=k):k=t[13];let v;t[14]!==r||t[15]!==x?(v=async()=>{if(!r)return null;performance.mark("mesh:active-org-fetch:start");const{data:E}=await Be.organization.getFullOrganization({query:{organizationSlug:r}}).finally(Eo),z=rt(E);return E&&!z&&localStorage.setItem(Ke.lastOrgSlug(),r),x&&E&&yn(x,r,E),E},t[14]=r,t[15]=x,t[16]=v):v=t[16];const T=S?S.data:void 0,N=S?.updatedAt;let _;t[17]!==T||t[18]!==N||t[19]!==k||t[20]!==v?(_={queryKey:k,queryFn:v,initialData:T,initialDataUpdatedAt:N,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=T,t[18]=N,t[19]=k,t[20]=v,t[21]=_):_=t[21];const{data:p}=Nt(_),A=p?.id,$=p?.slug,{data:I}=ns(A,$),D=!!I?.ssoRequired&&!I.authenticated,{data:C}=wo($);let M;t[22]===Symbol.for("react.memo_cache_sentinel")?(M={select:Co},t[22]=M):M=t[22];const K=$t(M),V=C?.severity==="block"&&!jo(K),q=A??"",W=$??"";let Y;t[23]!==q||t[24]!==W?(Y=Hn({connectionId:Ot,orgId:q,orgSlug:W}),t[23]=q,t[24]=W,t[25]=Y):Y=t[25];const L=!!A&&!!$;let Q;if(t[26]!==Y||t[27]!==L?(Q={...Y,enabled:L},t[26]=Y,t[27]=L,t[28]=Q):Q=t[28],He(Q),(!p||rt(p)||D||V)&&Ws(),!p){let E;return t[29]!==r?(E=n.jsx(fs,{orgSlug:r}),t[29]=r,t[30]=E):E=t[30],E}if(rt(p)){localStorage.getItem(Ke.lastOrgSlug())===r&&localStorage.removeItem(Ke.lastOrgSlug());let E;return t[31]!==p.name?(E=n.jsx(pn,{orgName:p.name}),t[31]=p.name,t[32]=E):E=t[32],E}if(V&&C){let E;return t[33]!==p.slug||t[34]!==C?(E=n.jsx(So,{notice:C,orgSlug:p.slug}),t[33]=p.slug,t[34]=C,t[35]=E):E=t[35],E}if(D){let E;return t[36]!==p.id||t[37]!==p.name||t[38]!==p.slug||t[39]!==I.domain?(E=n.jsx(bo,{orgId:p.id,orgSlug:p.slug,orgName:p.name,domain:I.domain}),t[36]=p.id,t[37]=p.name,t[38]=p.slug,t[39]=I.domain,t[40]=E):E=t[40],E}const oe=p.logo??null;let B;t[41]!==p||t[42]!==oe?(B={...p,logo:oe},t[41]=p,t[42]=oe,t[43]=B):B=t[43];let X;t[44]!==p?(X=n.jsx(mo,{activeOrg:p}),t[44]=p,t[45]=X):X=t[45];let Z;t[46]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(bn,{}),t[46]=Z):Z=t[46];let ee;t[47]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Ds,{}),n.jsx(to,{})]}),t[47]=ee):ee=t[47];let te;t[48]!==i||t[49]!==c?(te=i&&n.jsx(Us,{open:i,onOpenChange:c}),t[48]=i,t[49]=c,t[50]=te):te=t[50];let H;t[51]!==m||t[52]!==h?(H=m&&n.jsx(Gn,{open:!0,onOpenChange:h,source:Jn()}),t[51]=m,t[52]=h,t[53]=H):H=t[53];let U;t[54]!==s?(U=n.jsx(zs,{open:s,onOpenChange:a}),t[54]=s,t[55]=U):U=t[55];let ne;t[56]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(ao,{}),t[56]=ne):ne=t[56];let ie;return t[57]!==B||t[58]!==X||t[59]!==te||t[60]!==H||t[61]!==U?(ie=n.jsxs(ko,{org:B,children:[X,Z,ee,te,H,U,ne]}),t[57]=B,t[58]=X,t[59]=te,t[60]=H,t[61]=U,t[62]=ie):ie=t[62],ie}function Co(t){return t.location.pathname}function Eo(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Oo(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Yn,{children:n.jsx(Ao,{})}),t[0]=e):e=t[0],e}const ri=Object.freeze(Object.defineProperty({__proto__:null,default:Oo,usePanelActions:To},Symbol.toStringTag,{value:"Module"}));export{G as K,hs as L,To as a,vt as b,ks as c,Ms as d,ai as e,ii as f,ri as g,zt as i,Vs as o,si as r,oi as s,wo as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u,r as g,j as n,F,Z as G,_ as H,a as E,k as P,b as O,n as y,L as M}from"./index-DcU2uHG-.js";import{C as V}from"./chat-context-BnuwMOfj.js";import{C as x}from"./index-CXeJCI0G.js";import{L}from"./index-CrgWXxvo.js";import{B as K}from"./blocks-preview-workspace-context-FfAtB7Mh.js";import{e as T,p as W,s as J,a as U,r as z,T as $,u as R,b as Z}from"./site-editor-toast-L4A-Cxh7.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-BHT_7Qja.js";import{C as Y}from"./content-tab-CTbbT9Kp.js";import{T as tt}from"./tab-icon-glyph-B2rDBqdy.js";import{r as et}from"./resolve-tab-icon-DtNff2Yq.js";import ot from"./agent-site-editor-WHTbnkdB.js";import"./use-panel-navigate-K8ACrPML.js";import"./thread-route-DsRsjMOv.js";import"./use-project-scope-CGMALc0e.js";import"./repository-binding-B-JblZ3B.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./autosend-BiXCzDoT.js";import"./thread-intent-DlbBEzNn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CrLAsZHh.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-TumByBkr.js";import"./use-ai-providers-DugUJNG4.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-DFkNTsS0.js";import"./use-mobile-BfmJV4wy.js";import"./use-sidebar-collapsed-BqLmDXCH.js";import"./use-chat-layout-state-CqPKeLYn.js";import"./agent-icon-c0hRUHIU.js";import"./AlertCircle-xI8XX-bi.js";import"./Tool01-BGL2Qt57.js";import"./ArrowUp-Cq3iZIwL.js";import"./ArrowLeft-BKYzlDQY.js";import"./LinkBroken01-ZRquEJUl.js";import"./ShoppingBag01-DAjyOiiw.js";import"./ZoomOut-B55seUHX.js";import"./Building02-C9KWPxlH.js";import"./CheckCircle-D30wPP6A.js";import"./ChevronUp-CFN68hLk.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./UserSquare-DJngEPjS.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Plus-xabrshQG.js";import"./SearchMd-BODiv7c9.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./XClose-CdzjyNb0.js";import"./tooltip-BqHx2R4U.js";import"./index-WjQsIrkp.js";import"./toolbar-icon-button-CTGjpqPD.js";import"./shell-layout-DNfiem0_.js";import"./avatar-CVrfZDpI.js";import"./use-clock-tick-CbuQEbGd.js";import"./command-DQxPvzO0.js";import"./index-DxbCP5B6.js";import"./integration-icon-aeIvRSnw.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./label-DDPD5LQh.js";import"./repository-import-picker-Aq7ItYog.js";import"./use-navigate-to-agent-D05JNc-L.js";import"./repository-picker-CigkRPj6.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./collection-search-C0nHL4Zi.js";import"./use-debounced-value-CDunmz6Z.js";import"./required-auth-layout-n4GqwjUS.js";import"./use-org-sso-ClJ8vn5f.js";import"./sheet-R9Pr50Sb.js";import"./resizable-B1jyEV0m.js";import"./core.esm-DOdwJCI5.js";import"./sortable.esm-7lfZBBX2.js";import"./context-menu-CI-AryjZ.js";import"./create-organization-dialog-CDMsJ1wq.js";import"./alert-dialog-M8Y0zqSA.js";import"./form-Bdh0vUeg.js";import"./project-apps-v-sauknl.js";import"./use-recent-apps-C1945uiL.js";import"./input-pg_Munw1.js";import"./usage-stats-DcyLnEOC.js";import"./tool-namespace-FeAXQzXg.js";import"./utils-CVEq3hMx.js";import"./markdown-1PeXOKNt.js";import"./use-copy-K9rQ1PJH.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-Dg2jSe-y.js";import"./file-type-icon-Ez8-DRHg.js";import"./chat-draft-D3EwPWFD.js";import"./select-B47VUguS.js";import"./index-BdQq_4o_.js";import"./tabs-CJ70csAp.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-orVqTX6I.js";import"./toggle-group-CtPF-F41.js";import"./use-open-billing-url-pmLoKOyH.js";import"./index-De44zW_k.js";import"./checkbox-Dla8kRWj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CVCbWisj.js";import"./drawer-CEiS53oX.js";import"./input-HXHaYrka.js";import"./suggestion-D_Z3LuMt.js";import"./use-mcp-prompts-JJb6q8dH.js";import"./use-org-fs-D82Vx4hB.js";import"./question-004-sINsf4GQ.js";import"./use-members-CzSQTDAS.js";import"./use-org-auth-client-fPRUht_a.js";import"./feature-paywall-DINMFUUx.js";import"./plan-ladder-D5aCNSRy.js";import"./add-connection-dialog-O4xCe9BP.js";import"./extract-connection-data-CUvLfXNU.js";import"./metadata-D72DunRR.js";import"./connection-B5x-rxzp.js";import"./url-slug-DfovzTSP.js";import"./connection-card-CFqu0_G8.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BDWvYouR.js";import"./use-connection-Dj54skEw.js";import"./schema-Jt-SHSRj.js";import"./connection-form-helpers-CouK82td.js";import"./authenticate-and-persist-oauth-D7W1mkzH.js";import"./mcp-oauth-xBzZujQ_.js";import"./mcp-oauth-DP6VNnFQ.js";import"./collection-tabs-DJst1PBn.js";import"./badge-ByzdbptS.js";import"./use-infinite-scroll-7dT9x3fg.js";import"./useSuspenseInfiniteQuery-B0JY_wMj.js";import"./use-task-board-events-BDk-u9KA.js";import"./use-main-schema-v8-Dcb6Yskn.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-Bp3fKbm9.js";import"./index-_y92DzgS.js";import"./pair-Cn70Tm81.js";import"./collapsible-BWjY8cOG.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DTPlWHGT.js";import"./types-Cj3BjtjJ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-DLitie4Q.js";import"./sandbox-git-api-CRxdlhrN.js";import"./blocks-tab-states-diUqUrAK.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./secret-ciphertext-CI3Fu2ro.js";import"./alert-J8Wo4iMe.js";import"./switch-BQFbXMA-.js";import"./scroll-area-DowOzl5a.js";import"./monaco-editor-e80GuCNv.js";import"./editor-DWhRi1_f.js";import"./calendar-B3WUDV6V.js";import"./editor-classes-CZOMDDcn.js";import"./combobox-DJtWtG8e.js";import"./search-input-C77c23a_.js";import"./use-file-configs-BFq_wpSt.js";import"./asset-utils-D4ZYWTsd.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./empty-state-B1xpK558.js";import"./sandbox-lifecycle-context-Cyz-VR-q.js";import"./variant-draft-pointer-fs9iIwvq.js";import"./section-preview-url-7zfngvgW.js";import"./use-fast-preview-draft-url-6p2QJIdt.js";import"./useQueries-BfkCTicr.js";import"./device-hint-SeLRi17j.js";import"./virtual-mcp-CeCtCq_o.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-0ueqwOxI.js";import"./mustache-Aw4qvxEW.js";import"./use-content-sync-D4PHTEJr.js";import"./empty-state-BoFIIv2e.js";import"./separator-tMi_6w_o.js";import"./use-releases-D15mHXXN.js";import"./serial-task-queue-CGOeQgpr.js";import"./hosted-publish-feedback-NabikYNC.js";import"./save-changes-debug-nBi-n9eV.js";function I(e){return e.kind==="unavailable"&&e.source==="local"&&(e.problem?.reason??"not-answering")==="not-answering"}const it=e=>e;function rt(e){const t=u.c(10),{candidates:o,invalidLink:c,shell:m,editor:i}=e,r=c===void 0?!1:c,s=m===void 0?it:m,[p,l]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==i?(h=i(p,f),t[1]=p,t[2]=i,t[3]=h):h=t[3],h}let a;t[4]!==o||t[5]!==r?(a=n.jsx(nt,{candidates:o,invalidLink:r,onConnect:l}),t[4]=o,t[5]=r,t[6]=a):a=t[6];let d;return t[7]!==s||t[8]!==a?(d=s(a),t[7]=s,t[8]=a,t[9]=d):d=t[9],d}function nt(e){const t=u.c(17),{candidates:o,invalidLink:c,onConnect:m}=e,i=c===void 0?!1:c,[r]=F(),{language:s}=r;let p;t[0]!==m?(p=D=>m({endpoint:D}),t[0]=m,t[1]=p):p=t[1];let l;t[2]!==o||t[3]!==p?(l={candidates:o,onFound:p},t[2]=o,t[3]=p,t[4]=l):l=t[4];const a=q(l),{state:d,access:f,needsGesture:h}=a;let k;t[5]!==o||t[6]!==s?(k=new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(o.map(T)),t[5]=o,t[6]=s,t[7]=k):k=t[7];const C=k;let j;t[8]!==f||t[9]!==a.start||t[10]!==h||t[11]!==d?(j=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:a.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=a.start,t[10]=h,t[11]=d,t[12]=j):j=t[12];const _=j;let S;return t[13]!==C||t[14]!==i||t[15]!==_?(S=n.jsx(B,{wait:_,hosts:C,invalidLink:i}),t[13]=C,t[14]=i,t[15]=_,t[16]=S):S=t[16],S}const v="deco-serve",w="working-tree",st={id:"",slug:"",name:"",logo:null},mt={id:v,slug:v},pt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function at(){const e=window.location.hash,t=new URLSearchParams(e.replace(/^#/,"")).has("endpoint"),o=t?W(e):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),o&&J(o),{candidates:U(o,z()),invalidLink:t&&!o}}const ct=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function lt(){const e=u.c(6),t=O();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:dt},e[0]=o):o=e[0];const c=P(o);let m;e[1]!==t||e[2]!==c?(m=ct.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(M,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(tt,{icon:et({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),e[1]=t,e[2]=c,e[3]=m):m=e[3];let i;return e[4]!==m?(i=n.jsx(y.Tabs,{children:m}),e[4]=m,e[5]=i):i=e[5],i}function dt(e){return e.matches.at(-1)?.staticData.siteEditorView}function N(e){const t=u.c(14),{children:o}=e,c=O(),{connection:m}=Z(v),i=R(v,w);let r,s;if(t[0]!==i||t[1]!==o||t[2]!==m||t[3]!==c){s=Symbol.for("react.early_return_sentinel");t:{if(r=m?T(m.endpoint):"",i.kind==="protocol"){s=o;break t}if(i.kind!=="unavailable"||I(i)){s=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=i,t[1]=o,t[2]=m,t[3]=c,t[4]=r,t[5]=s}else r=t[4],s=t[5];if(s!==Symbol.for("react.early_return_sentinel"))return s;let p;t[6]!==i.problem?(p=i.problem??{reason:"not-answering"},t[6]=i.problem,t[7]=p):p=t[7];let l;t[8]!==r||t[9]!==p?(l={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=l):l=t[10];let a;return t[11]!==r||t[12]!==l?(a=n.jsx(B,{wait:l,hosts:r}),t[11]=r,t[12]=l,t[13]=a):a=t[13],a}function ut(e){const t=u.c(6),{onLost:o}=e,c=R(v,w);let m;t[0]!==c?(m=I(c),t[0]=c,t[1]=m):m=t[1];const i=m;let r,s;return t[2]!==i||t[3]!==o?(r=()=>{i&&o()},s=[i,o],t[2]=i,t[3]=o,t[4]=r,t[5]=s):(r=t[4],s=t[5]),g.useEffect(r,s),null}const A={threadOpen:!1,contentOpen:!0,threadVisibilityExplicit:!1,toggleThread:()=>{},toggleContent:()=>{}};function ft(){const e=u.c(11),{data:t}=E.useSession();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:ht},e[0]=o):o=e[0];const c=P(o),m=!!t?.user;let i;e[1]!==m?(i={rail:m},e[1]=m,e[2]=i):i=e[2];const r=c??"preview";let s,p,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(lt,{}),p=n.jsx(x.Thread,{children:null}),l=n.jsx(ot,{}),e[3]=s,e[4]=p,e[5]=l):(s=e[3],p=e[4],l=e[5]);let a;e[6]!==r?(a=n.jsx(L.Content,{children:n.jsxs(x,{...A,threadless:!0,contentKey:r,contentNavigation:s,children:[p,l]})}),e[6]=r,e[7]=a):a=e[7];let d;return e[8]!==i||e[9]!==a?(d=n.jsx(L,{outsideOrg:i,children:a}),e[8]=i,e[9]=a,e[10]=d):d=e[10],d}function ht(e){return e.matches.at(-1)?.staticData.siteEditorView}function vt(e){const t=u.c(8),{children:o}=e,{data:c}=E.useSession(),m=!!c?.user;let i;t[0]!==m?(i={rail:m},t[0]=m,t[1]=i):i=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(x.Thread,{children:null}),t[2]=r):r=t[2];let s;t[3]!==o?(s=n.jsx(L.Content,{children:n.jsxs(x,{...A,threadless:!0,contentKey:"guide",children:[r,n.jsx(x.Content,{children:o})]})}),t[3]=o,t[4]=s):s=t[4];let p;return t[5]!==i||t[6]!==s?(p=n.jsx(L,{outsideOrg:i,children:s}),t[5]=i,t[6]=s,t[7]=p):p=t[7],p}const b=()=>{},xt={connection:null,set:b,clear:b};function qi(){const e=u.c(3),[t]=g.useState(at);let o;return e[0]!==t.candidates||e[1]!==t.invalidLink?(o=n.jsx(G,{value:!0,children:n.jsx(H,{org:st,project:mt,children:n.jsx(rt,{candidates:t.candidates,invalidLink:t.invalidLink,shell:jt,editor:kt})})}),e[0]=t.candidates,e[1]=t.invalidLink,e[2]=o):o=e[2],o}function kt(e,t){return n.jsxs($.Provider,{value:{connection:e,set:b,clear:b},children:[n.jsx(ut,{onLost:t}),n.jsx(V,{value:pt,children:n.jsx(K,{children:n.jsx(ft,{})})})]})}function jt(e){return n.jsx($.Provider,{value:xt,children:n.jsx(vt,{children:e})})}function Qi(){const e=u.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(N,{children:n.jsx(Q,{virtualMcpId:v})}),e[0]=t):t=e[0],t}function Xi(){const e=u.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(N,{children:n.jsx(Y,{virtualMcpId:v})}),e[0]=t):t=e[0],t}export{Xi as SiteEditorContent,Qi as SiteEditorPreview,qi as default};
|