decocms 4.576.5 → 4.577.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C4gtVV8B.js → AlertCircle-BdE1rZoJ.js} +1 -1
- package/dist/client/assets/{AreaChart-DoDuLI5t.js → AreaChart-D0m3b7qG.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DpMV6ZsI.js → ArrowLeft-DIrnwv8l.js} +1 -1
- package/dist/client/assets/{ArrowUp-BZtzDI6h.js → ArrowUp-km-Xmh__.js} +1 -1
- package/dist/client/assets/BookOpen01-BneB1q9z.js +1 -0
- package/dist/client/assets/{CartesianChart-T_ULwjNy.js → CartesianChart-BwsWHEdb.js} +1 -1
- package/dist/client/assets/{CategoricalChart-ysoAqy8Y.js → CategoricalChart-Dxo_7xLg.js} +1 -1
- package/dist/client/assets/{CheckCircle-DSJM5Ipe.js → CheckCircle-CiBUynzC.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Y1qRZSrs.js → ChevronSelectorVertical-CRWdnYCm.js} +1 -1
- package/dist/client/assets/{ChevronUp-DlMNWluH.js → ChevronUp-B7dgqvYM.js} +1 -1
- package/dist/client/assets/{CreditCard01-DDsAjKey.js → CreditCard01-CcIddg9s.js} +1 -1
- package/dist/client/assets/{Globe04-xh_ZOoQS.js → Globe04-DIBckqos.js} +1 -1
- package/dist/client/assets/{Key01-BnxP0_QL.js → Key01-BV5ckBOE.js} +1 -1
- package/dist/client/assets/{LinkBroken01-4XuFjBFS.js → LinkBroken01-Mv2kbzSM.js} +1 -1
- package/dist/client/assets/{Minus-D8UqNYy4.js → Minus-Bygm9L7w.js} +1 -1
- package/dist/client/assets/{Monitor01-CVDkBVET.js → Monitor01-HDGt-WwC.js} +1 -1
- package/dist/client/assets/{Play--aCtxlXx.js → Play-DROL2O51.js} +1 -1
- package/dist/client/assets/{Plus-DXpzgENj.js → Plus-C-Or0hIv.js} +1 -1
- package/dist/client/assets/ReferenceLine-BPmIH9b3.js +1 -0
- package/dist/client/assets/{SearchMd-CWmEKOOP.js → SearchMd-D88tiwag.js} +1 -1
- package/dist/client/assets/ShoppingBag01-Cdbqpanm.js +1 -0
- package/dist/client/assets/{Sun-wXzOhHYv.js → Sun-CgOyXDTW.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C42vJfgE.js → SwitchHorizontal01-Dkkqg27i.js} +1 -1
- package/dist/client/assets/{Tool01-DB3xqZeL.js → Tool01-D4tVVqAj.js} +1 -1
- package/dist/client/assets/{Tooltip-Dz7b9lTi.js → Tooltip-cgLuNyXo.js} +1 -1
- package/dist/client/assets/{Trash01-BAWUFhrC.js → Trash01-Cqkcp6ky.js} +1 -1
- package/dist/client/assets/{Upload01-CMkGIZuR.js → Upload01-CsOcxm5q.js} +1 -1
- package/dist/client/assets/{UserSquare-NNxs0RWc.js → UserSquare-CK-bjijW.js} +1 -1
- package/dist/client/assets/{Users01-DIshv_Ib.js → Users01-BpEuprvx.js} +1 -1
- package/dist/client/assets/{XClose-E_Sbr7JC.js → XClose-D9taHFI1.js} +1 -1
- package/dist/client/assets/{Zap-BFWL2aD-.js → Zap-BhxT34oC.js} +1 -1
- package/dist/client/assets/{access-gate-H6si3iA0.js → access-gate-Bbt03qvc.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BCsDq0oB.js → add-connection-dialog-EzR6kkmo.js} +1 -1
- package/dist/client/assets/agent-app-xUigIkK8.js +1 -0
- package/dist/client/assets/agent-assets-DUoWUOFt.js +1 -0
- package/dist/client/assets/agent-automation-Cyb5qsWY.js +20 -0
- package/dist/client/assets/agent-automations-HcbM2XMD.js +1 -0
- package/dist/client/assets/agent-blog-BLi3oKLw.js +2 -0
- package/dist/client/assets/agent-blog-post-DXyE25Wg.js +2 -0
- package/dist/client/assets/agent-calendar-D7ih9de1.js +1 -0
- package/dist/client/assets/{agent-capabilities-C7nwtlfn.js → agent-capabilities-CrqOfLmC.js} +1 -1
- package/dist/client/assets/agent-connect-sources-DtVo8JXM.js +1 -0
- package/dist/client/assets/agent-deck-Cs__MOn_.js +1 -0
- package/dist/client/assets/agent-e2e-CBM_w3qk.js +1 -0
- package/dist/client/assets/agent-experiments-CR3rcuNZ.js +1 -0
- package/dist/client/assets/agent-file-DjiNMKB3.js +1 -0
- package/dist/client/assets/agent-hosting-C70MC-PA.js +1 -0
- package/dist/client/assets/agent-icon-bK3wLPrb.js +1 -0
- package/dist/client/assets/agent-library-CeznhRs4.js +1 -0
- package/dist/client/assets/agent-library-file-B-Sx2y3P.js +1 -0
- package/dist/client/assets/agent-overview-CFue46Ll.js +1 -0
- package/dist/client/assets/agent-releases-BlbJtMk9.js +2 -0
- package/dist/client/assets/agent-settings-BljPRjiA.js +1 -0
- package/dist/client/assets/{agent-site-editor-D7f7n9V8.js → agent-site-editor-BeTpu1p8.js} +9 -9
- package/dist/client/assets/agent-site-editor-code-BAiYvGFH.js +2 -0
- package/dist/client/assets/agent-site-editor-content-Bl3XwQ5q.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Cys48HaE.js +1 -0
- package/dist/client/assets/agent-view-DlR04ups.js +1 -0
- package/dist/client/assets/agent-view-guard-CruOWgYs.js +1 -0
- package/dist/client/assets/ai-providers-C2yFfgyi.js +1 -0
- package/dist/client/assets/{alert-gT8z0xwu.js → alert-jF8tTR34.js} +1 -1
- package/dist/client/assets/{analytics-sections-eEEKYoEI.js → analytics-sections-Qo8FMsPn.js} +1 -1
- package/dist/client/assets/{api-keys-DQU6MrN9.js → api-keys-15uqAkvj.js} +1 -1
- package/dist/client/assets/api-keys-BYU6jhvq.js +1 -0
- package/dist/client/assets/app-editor-B4pmL5qY.js +1 -0
- package/dist/client/assets/{asset-utils-ClCcVH6C.js → asset-utils-CwQVXoYw.js} +1 -1
- package/dist/client/assets/{auth-DzshLgt0.js → auth-YGSVzhUG.js} +1 -1
- package/dist/client/assets/{auth-catchall-knKXQdld.js → auth-catchall-hWKWJU80.js} +1 -1
- package/dist/client/assets/{auth-entry-CjhDapLF.js → auth-entry-DpL4vu4t.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Cs3K7qF9.js → auth-split-layout-BFmr3RnK.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DyNu9KE-.js → authenticate-and-persist-oauth-DHgqzdUM.js} +1 -1
- package/dist/client/assets/{automation-list-row-BIIymyig.js → automation-list-row-BAeLE453.js} +1 -1
- package/dist/client/assets/{automation-runs-BJn2B7cC.js → automation-runs-C7o6atC8.js} +1 -1
- package/dist/client/assets/automations-BvOuQD58.js +1 -0
- package/dist/client/assets/{badge-FhnYiqmQ.js → badge-D9oJO89f.js} +1 -1
- package/dist/client/assets/block-document-Phc0b_hv.js +3 -0
- package/dist/client/assets/{blocks-preview-workspace-context-DPP_AgWW.js → blocks-preview-workspace-context-XztheX0p.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-DS5PjKyJ.js → blocks-tab-states-CPXZUbSV.js} +1 -1
- package/dist/client/assets/blog-preview-url-BlQDNdnl.js +1 -0
- package/dist/client/assets/blog-schema-BY4m7Viq.js +1 -0
- package/dist/client/assets/blog-source-gate-CiOBhTPt.js +1 -0
- package/dist/client/assets/blog-view-gate-CCZFjbaz.js +1 -0
- package/dist/client/assets/{buckets-Cm1lK-tx.js → buckets-BkOGaNvk.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CKmcH9eT.js → build-improve-prompt-doc-BvBG7PT7.js} +1 -1
- package/dist/client/assets/{calendar-Dj2F2D9c.js → calendar-CNAmcpRM.js} +1 -1
- package/dist/client/assets/{capability-load-error-YlZMyLIu.js → capability-load-error-BfsuWu82.js} +1 -1
- package/dist/client/assets/category-editor-DfKRUZ0M.js +1 -0
- package/dist/client/assets/category-tree-C0ZkCPxc.js +4 -0
- package/dist/client/assets/{chart-4euqV-4L.js → chart-CjhZfLhJ.js} +1 -1
- package/dist/client/assets/chat-context-BXBBnsXM.js +39 -0
- package/dist/client/assets/{chat-draft-B1Q_ptQ-.js → chat-draft-BiNhHFHP.js} +1 -1
- package/dist/client/assets/{checkbox-Bq5cgSkE.js → checkbox-BqeIWnOr.js} +1 -1
- package/dist/client/assets/choose-editor-C3lPTBrc.js +1 -0
- package/dist/client/assets/{cli-auth-success-C9VZDuEf.js → cli-auth-success-DXTy0zTr.js} +1 -1
- package/dist/client/assets/{client-icons-x0Kj4XXu.js → client-icons-bVQyh7Ui.js} +1 -1
- package/dist/client/assets/cms-settings-editor-BGhvXRA5.js +1 -0
- package/dist/client/assets/cms-store-drafts-C_2pJAHv.js +1 -0
- package/dist/client/assets/collapsible-M6EMuds1.js +1 -0
- package/dist/client/assets/collection-detail-DtpW8ulK.js +1 -0
- package/dist/client/assets/{collection-display-button-B9tDNz3Q.js → collection-display-button-CLT_iQ9K.js} +1 -1
- package/dist/client/assets/{collection-search-o_TUN55Q.js → collection-search-d8_we7KS.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CovrSOmj.js → collection-table-wrapper-jjhzHxOC.js} +1 -1
- package/dist/client/assets/{collection-tabs-C-HhSJ3V.js → collection-tabs-CDEZauaw.js} +1 -1
- package/dist/client/assets/{combobox-N56ErTGA.js → combobox-eXr44O4N.js} +1 -1
- package/dist/client/assets/{command-C4A_k1m6.js → command-CL5fBjco.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BIgg4-5f.js → companion-mcps-section-ZhumvGkq.js} +1 -1
- package/dist/client/assets/config-DTkH3DlA.js +1 -0
- package/dist/client/assets/{connect-CAWALh6X.js → connect-DTRBNGAJ.js} +3 -3
- package/dist/client/assets/{connect-layout-BGSvt_fK.js → connect-layout-C9YZDE5a.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-zXoRskIf.js → connect-source-dialog-CtNzRZNm.js} +1 -1
- package/dist/client/assets/{connection-DWztoPJi.js → connection-DQRUSri4.js} +1 -1
- package/dist/client/assets/{connection-card-CWeiT8GU.js → connection-card-DiXDtKCD.js} +1 -1
- package/dist/client/assets/connection-detail-A1N-eCPy.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DvFcvjHg.js → connection-form-helpers-DbQ-1SYg.js} +1 -1
- package/dist/client/assets/{connection-slug-7qrL1eY0.js → connection-slug-eNvNu5ns.js} +1 -1
- package/dist/client/assets/connections-F6Cb4hev.js +1 -0
- package/dist/client/assets/content-tab-zWTaVHTI.js +19 -0
- package/dist/client/assets/context-jjXucCze.js +1 -0
- package/dist/client/assets/{context-menu-CzVow7cK.js → context-menu-C8EhSOHZ.js} +1 -1
- package/dist/client/assets/{context-shell-A1z9qMT_.js → context-shell-DAsZEr3G.js} +3 -3
- package/dist/client/assets/{core.esm-DbuDfvWF.js → core.esm-q-GZRseF.js} +2 -2
- package/dist/client/assets/{create-organization-dialog-D6MpLXO5.js → create-organization-dialog-B0fwudcl.js} +1 -1
- package/dist/client/assets/delete-copy-DewsXC-x.js +4 -0
- package/dist/client/assets/{device-hint-DKfCoj9a.js → device-hint-DOHdIy74.js} +1 -1
- package/dist/client/assets/discover-Sgb2XR4X.js +1 -0
- package/dist/client/assets/{domain-settings-EcbckpYF.js → domain-settings-CzQKvon-.js} +1 -1
- package/dist/client/assets/{drawer-DO5xJQb9.js → drawer-CT21cqiT.js} +1 -1
- package/dist/client/assets/{editor-T1DFIh20.js → editor-DSTLBMSV.js} +2 -2
- package/dist/client/assets/{editor-classes-XhTpecj4.js → editor-classes-DNgU6VQ_.js} +1 -1
- package/dist/client/assets/empty-message-0iKzEZgc.js +15 -0
- package/dist/client/assets/{empty-state-DtO_Mv2g.js → empty-state-C7mAM8aV.js} +1 -1
- package/dist/client/assets/{empty-state-DPWCLNrd.js → empty-state-De0GyKdS.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-DwnKczQ0.js +1 -0
- package/dist/client/assets/{extract-connection-data-DBROTNmw.js → extract-connection-data-C9uUQyrf.js} +1 -1
- package/dist/client/assets/feature-gate-BekWNhM3.js +1 -0
- package/dist/client/assets/{feature-paywall-jPIGYZOc.js → feature-paywall-CzMsGR-v.js} +1 -1
- package/dist/client/assets/file-explorer-BA6AotC6.js +2 -0
- package/dist/client/assets/{file-preview-D0iM2K-b.js → file-preview-CK5Pkylz.js} +1 -1
- package/dist/client/assets/{file-share-button-BsYWO9Hm.js → file-share-button-qjRy5kh1.js} +1 -1
- package/dist/client/assets/{file-type-icon-HeI2BZTs.js → file-type-icon-DI74_rhH.js} +1 -1
- package/dist/client/assets/{folder-icon-DTWsvVbL.js → folder-icon-RhxrL37z.js} +1 -1
- package/dist/client/assets/{form-BTSAyeiz.js → form-czY_WZeB.js} +1 -1
- package/dist/client/assets/frame-navigation-D3lcT6PQ.js +1 -0
- package/dist/client/assets/general-DyfkLFv0.js +1 -0
- package/dist/client/assets/{github-icon-B_en9n_0.js → github-icon-DbvGzNXg.js} +1 -1
- package/dist/client/assets/held-block-view-616AHRnA.js +3 -0
- package/dist/client/assets/home-CvjGQ8iY.js +1 -0
- package/dist/client/assets/{home-overview-BRS8Q3rl.js → home-overview-BspPD0Qy.js} +1 -1
- package/dist/client/assets/hosted-reconcile-gX34y3hJ.js +1 -0
- package/dist/client/assets/{icon-button-BMTp1-QM.js → icon-button-Bek6uWU8.js} +1 -1
- package/dist/client/assets/{index-DVvmeJMJ.js → index-5IFWC0PS.js} +47 -47
- package/dist/client/assets/index-BASUN16S.js +4 -0
- package/dist/client/assets/{index-laonBzOU.js → index-BFLUunGm.js} +1 -1
- package/dist/client/assets/index-BVaQtZpO.js +1 -0
- package/dist/client/assets/index-B_hHGrWo.js +1 -0
- package/dist/client/assets/{index-DyEEK3cc.js → index-BgGa_gEX.js} +1 -1
- package/dist/client/assets/{index-qsOMiawp.js → index-CJqO_lXj.js} +1 -1
- package/dist/client/assets/{index-dCHDMdOx.js → index-CLog75-o.js} +1 -1
- package/dist/client/assets/{index-CWuPd_va.js → index-CYAg_mZ5.js} +6 -6
- package/dist/client/assets/{index-DGy42Noz.js → index-Cb-PI-oM.js} +1 -1
- package/dist/client/assets/{index-DFaIOW9N.js → index-Cn4blTB2.js} +2 -2
- package/dist/client/assets/{index-DTVEZmhV.js → index-Co1pEKoz.js} +1 -1
- package/dist/client/assets/{index-D1ksSwz3.js → index-Cq3k2rBV.js} +1 -1
- package/dist/client/assets/index-D6lWWdm-.js +1 -0
- package/dist/client/assets/{index-DlxA0Tmo.js → index-DI1WEe1Y.js} +1 -1
- package/dist/client/assets/index-DYPWHH-M.css +1 -0
- package/dist/client/assets/{index-DlkOiyYS.js → index-ZpYsIOky.js} +2 -2
- package/dist/client/assets/{index-DwNl1Km0.js → index-e47kvUTQ.js} +1 -1
- package/dist/client/assets/{index-redirect-BEZcO3ft.js → index-redirect-B5LCK4UZ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Depn9DGH.js → infiniteQueryObserver-CgeE9MzI.js} +1 -1
- package/dist/client/assets/{infra-billing-BGMskgUq.js → infra-billing-D_NOfbaI.js} +1 -1
- package/dist/client/assets/{input-aWrDx9Iy.js → input-1bbcsHzM.js} +3 -3
- package/dist/client/assets/{input-D4HN-yNN.js → input-Cof38_0i.js} +1 -1
- package/dist/client/assets/{integration-icon-C9OIwyFH.js → integration-icon-ClorKiq5.js} +1 -1
- package/dist/client/assets/item-actions-pz3LKYdP.js +1 -0
- package/dist/client/assets/{jira-icon-CnIpLe3l.js → jira-icon-CSE5FXRa.js} +1 -1
- package/dist/client/assets/{label-DxsI69Ti.js → label-C1myK8cj.js} +1 -1
- package/dist/client/assets/{layout-m_pr21sI.js → layout-B4vND3NH.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DIDvLt4b.js → legacy-admin-welcome-dialog-DtBTs-JZ.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CK9Gbzky.js → legacy-agents-deep-wdUtLgZd.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Cep_68fb.js → legacy-main-redirect-D0dw61Zg.js} +1 -1
- package/dist/client/assets/library-DmRa8bBp.js +1 -0
- package/dist/client/assets/{library-tab-Dy0wbynU.js → library-tab-3lHWVZnM.js} +4 -4
- package/dist/client/assets/{login-FVvIKUmZ.js → login-OeBuTK5R.js} +1 -1
- package/dist/client/assets/{markdown-DY1gkJzE.js → markdown-BhnPL5Bs.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CbbHrG36.js → mcp-app-renderer-DeImvVKz.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B4bma3Oc.js → mcp-oauth-D2St0yzi.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Dz6mx5UF.js → mcp-oauth-DAPLorIu.js} +1 -1
- package/dist/client/assets/{members-CoNUsoOs.js → members-CRV8r-1W.js} +1 -1
- package/dist/client/assets/{memory-CJmsq8GA.js → memory-C08OAgnC.js} +2 -2
- package/dist/client/assets/{mock-board-C-Bptu2a.js → mock-board-UupkdDTJ.js} +3 -3
- package/dist/client/assets/{monaco-editor-ChRuLOCA.js → monaco-editor-DgmLjwMj.js} +1 -1
- package/dist/client/assets/{monitoring-DOIwwqmT.js → monitoring-C2AkJ1E2.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-MlJzIKBz.js → monitoring-stats-row-BkupHr4w.js} +1 -1
- package/dist/client/assets/{multi-select-HzpZ3y0m.js → multi-select-D_-o3Z5k.js} +1 -1
- package/dist/client/assets/mustache-D-pZ4GVh.js +4 -0
- package/dist/client/assets/named-rule-step-BqRLfozU.js +1 -0
- package/dist/client/assets/named-rule-view-Cjao8aHC.js +1 -0
- package/dist/client/assets/{new-project-dialog-DNs6nXJU.js → new-project-dialog-ly3jlxrO.js} +1 -1
- package/dist/client/assets/{oauth-callback-DJ1LZft0.js → oauth-callback-DGsbFvpE.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DdjujeOM.js → oauth-callback-ai-provider-DH_kBA_S.js} +1 -1
- package/dist/client/assets/{oauth-consent-C7arrnjn.js → oauth-consent-DiV1G_a8.js} +1 -1
- package/dist/client/assets/{onboarding-DCEuM15Q.js → onboarding-wSysb6DG.js} +1 -1
- package/dist/client/assets/openai-conversation-BnmAjQv3.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-Bxu9JyYq.js → optimistic-project-sidebar-views-BddiZzQV.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BHRAsIfi.js → order-monitor-day-vJd_rbss.js} +1 -1
- package/dist/client/assets/{organization-choice-BLi_jfq-.js → organization-choice-B_C6gRzc.js} +1 -1
- package/dist/client/assets/{orgs-B0FFSMlY.js → orgs-Hd1POC7b.js} +1 -1
- package/dist/client/assets/{own-accounts-section-BPiQsCnH.js → own-accounts-section-DRAcUJQm.js} +1 -1
- package/dist/client/assets/{pair-BefVcuJk.js → pair-DsQEIDjk.js} +7 -7
- package/dist/client/assets/parse-sections-DAMeYP46.js +4 -0
- package/dist/client/assets/plan-9F8q1LmB.js +1 -0
- package/dist/client/assets/{plan-ladder-BIrfRC9w.js → plan-ladder-BVTNP5Xz.js} +1 -1
- package/dist/client/assets/{plan-usage-card-9-4sECew.js → plan-usage-card-Du0lOF_J.js} +2 -2
- package/dist/client/assets/{popover-DVbSl4_S.js → popover-DP7XfF8t.js} +1 -1
- package/dist/client/assets/post-calendar-DDpUGeeB.js +1 -0
- package/dist/client/assets/post-editor-DtDeATFH.js +2 -0
- package/dist/client/assets/{preview-content-4sXQQAYj.js → preview-content-C5OVyGLr.js} +1 -1
- package/dist/client/assets/{preview-dialog-DdT5D37e.js → preview-dialog-DuuWqEir.js} +1 -1
- package/dist/client/assets/{preview-panel-08gBYjqh.js → preview-panel-BZ5HJll2.js} +1 -1
- package/dist/client/assets/preview-tab-P_107JPX.js +551 -0
- package/dist/client/assets/{product-picker-dialog-CK0DishF.js → product-picker-dialog-Dt7DCQ6n.js} +1 -1
- package/dist/client/assets/{profile-D-F6LVIp.js → profile-GhJox0Lx.js} +1 -1
- package/dist/client/assets/project-app-view-qeUPQ38h.js +1 -0
- package/dist/client/assets/project-apps-DfPcY68g.js +1 -0
- package/dist/client/assets/{project-icon-BfdBakvS.js → project-icon-B90806PF.js} +1 -1
- package/dist/client/assets/{project-index-CIwgcHHa.js → project-index-Do6iewlo.js} +1 -1
- package/dist/client/assets/project-reports-CidF3Xyg.js +1 -0
- package/dist/client/assets/project-tasks-BYy46ISP.js +1 -0
- package/dist/client/assets/projects-CymMldT7.js +1 -0
- package/dist/client/assets/{projects-empty-state-CNEfVw65.js → projects-empty-state-BTGd2cv1.js} +1 -1
- package/dist/client/assets/{prompts-xdLcYGyB.js → prompts-Cd0qPZsx.js} +1 -1
- package/dist/client/assets/record-editor-BH3fKYC8.js +1 -0
- package/dist/client/assets/redirect-editor-xZO49sls.js +1 -0
- package/dist/client/assets/{reports-BoYTb5US.js → reports-B9pEcRxn.js} +1 -1
- package/dist/client/assets/reports-DtEFVn9D.js +1 -0
- package/dist/client/assets/reports-onboarding-DxeuhIZr.js +1 -0
- package/dist/client/assets/reports-tab-YeP0tPeK.js +2 -0
- package/dist/client/assets/repositories-B0Temlg5.js +1 -0
- package/dist/client/assets/repositories-YEhOcvb2.js +1 -0
- package/dist/client/assets/{repository-binding-DJpVzzIq.js → repository-binding-L4ChVpPs.js} +1 -1
- package/dist/client/assets/repository-picker-CCYsOJZQ.js +1 -0
- package/dist/client/assets/{require-capability-BpMqCrIS.js → require-capability-Cm5TFoc0.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BIQCwVTO.js → required-auth-layout-BUx3f5eg.js} +1 -1
- package/dist/client/assets/{reset-password-BKzfgMBU.js → reset-password-DWi7rqRm.js} +1 -1
- package/dist/client/assets/{resizable-C9_scy3R.js → resizable-Biivyzu2.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-C_X-fR95.js +1 -0
- package/dist/client/assets/review-settings-DhlyLgn0.js +1 -0
- package/dist/client/assets/role-color-_0YSG8Dj.js +1 -0
- package/dist/client/assets/roles-akRjx2S4.js +1 -0
- package/dist/client/assets/route-CKHdrn7R.js +1 -0
- package/dist/client/assets/route-D1Gpwe4D.js +1 -0
- package/dist/client/assets/route-tQ0sT4aI.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-_uINbsP3.js → sandbox-lifecycle-context-BJx1JU2-.js} +1 -1
- package/dist/client/assets/save-status-T9dswXr1.js +1 -0
- package/dist/client/assets/{schema-CzuWRpLl.js → schema-Dc_MkHkp.js} +1 -1
- package/dist/client/assets/{schema-ChSE97DN.js → schema-DjfjCUhq.js} +1 -1
- package/dist/client/assets/{scroll-area-D1j-ZNOk.js → scroll-area-cgfYHO2J.js} +1 -1
- package/dist/client/assets/search-input-CgAhBcAm.js +1 -0
- package/dist/client/assets/{search-toggle-BSwOQVMD.js → search-toggle-BvL2EnQl.js} +1 -1
- package/dist/client/assets/{secret-picker-zgl1t1WE.js → secret-picker-pXy37N0W.js} +1 -1
- package/dist/client/assets/{secrets-Dvs-hzm1.js → secrets-DY2kpTfw.js} +1 -1
- package/dist/client/assets/section-array-field-Dqv2uZIX.js +1 -0
- package/dist/client/assets/{sections-COYsDPZ3.js → sections-BYpfTFZT.js} +1 -1
- package/dist/client/assets/sections-editor-D7uS2U4v.js +1 -0
- package/dist/client/assets/{select-CBAbBtbp.js → select-Dj8hBfnd.js} +1 -1
- package/dist/client/assets/{select-model-CScqhZ6D.js → select-model-BCp0KUZW.js} +1 -1
- package/dist/client/assets/seo-editor-C6gHCSwh.js +1 -0
- package/dist/client/assets/{separator-B-2WnIuS.js → separator-CD_4C4Y0.js} +1 -1
- package/dist/client/assets/settings-tab-DPVLqmJT.js +1 -0
- package/dist/client/assets/{sheet-BSTYuLMa.js → sheet-w42F36Fm.js} +1 -1
- package/dist/client/assets/shell-layout-SnEo2Z8s.js +1 -0
- package/dist/client/assets/site-draft-actions-X8qdJpR6.js +3 -0
- package/dist/client/assets/site-draft-view-DieOLT9Q.js +1 -0
- package/dist/client/assets/site-editor-D71enwO7.js +1 -0
- package/dist/client/assets/{site-editor-toast-Bz5hIXUq.js → site-editor-toast-CAmfWZOg.js} +1 -1
- package/dist/client/assets/skills-BPDMMsh1.js +1 -0
- package/dist/client/assets/{slider-B-4p3Nob.js → slider-BUH8Dwgf.js} +1 -1
- package/dist/client/assets/{sortable.esm-BMq0DSBR.js → sortable.esm-BwyBVE7G.js} +1 -1
- package/dist/client/assets/{sso-D7rzaxll.js → sso-Cf_QJD0l.js} +1 -1
- package/dist/client/assets/suggestion-EZp_1C2Z.js +2 -0
- package/dist/client/assets/{super-agent-icon-CSXn8PV0.js → super-agent-icon-Cuh3vhpx.js} +1 -1
- package/dist/client/assets/{switch-BoeP0_DT.js → switch-CcIiziq_.js} +1 -1
- package/dist/client/assets/synced-repos-Cnb_uqs2.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-DWwnpbAG.js → tab-icon-glyph-DvOK9lLO.js} +1 -1
- package/dist/client/assets/{table-XIxdhyNo.js → table-CX_Xjv5_.js} +1 -1
- package/dist/client/assets/{tabs-B314G2il.js → tabs-BVFow_A3.js} +1 -1
- package/dist/client/assets/{task-board-D-pfBnAn.js → task-board-DVtARw_U.js} +1 -1
- package/dist/client/assets/{task-route-DrEh97G3.js → task-route-Ck3RXNt1.js} +1 -1
- package/dist/client/assets/{task-status-B5Pet88z.js → task-status-DFMg9mu2.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BUGnnj7V.js +1 -0
- package/dist/client/assets/{tasks-D1UDrE84.js → tasks-B3OOn3U2.js} +3 -3
- package/dist/client/assets/tasks-DHWz5CTo.js +1 -0
- package/dist/client/assets/{textarea-yEyl1P1k.js → textarea-BxqysnAf.js} +1 -1
- package/dist/client/assets/thread-analytics-dnNDwV70.js +1 -0
- package/dist/client/assets/{thread-intent-BNVTtSHt.js → thread-intent-BujELieJ.js} +6 -6
- package/dist/client/assets/thread-route-BAkMWoFr.js +1 -0
- package/dist/client/assets/{thread-route-C8VqFbkH.js → thread-route-CG4NoBnV.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BPfgeSL4.js → thread-sheet-body-iPIMT5tX.js} +1 -1
- package/dist/client/assets/{time-range-picker-BvmuiVyh.js → time-range-picker-DXMtxhmu.js} +1 -1
- package/dist/client/assets/{toggle-group-pyWm-TzL.js → toggle-group-CFCrTuTF.js} +1 -1
- package/dist/client/assets/{tool-namespace-CtWbol20.js → tool-namespace-C9gQSjv3.js} +1 -1
- package/dist/client/assets/{tool-set-selector-o7QGolVt.js → tool-set-selector-Dpj_1lJt.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DJE3OEfz.js → toolbar-icon-button-Bk7F5Fex.js} +1 -1
- package/dist/client/assets/{tooltip-BVrosRIK.js → tooltip-Bj0ggRLV.js} +1 -1
- package/dist/client/assets/{tooltipContext-qYwD6VMh.js → tooltipContext-BSiIa8-6.js} +1 -1
- package/dist/client/assets/{track-CeXWn-zt.js → track-uewKzN4A.js} +1 -1
- package/dist/client/assets/{types-DDm1cJJv.js → types-BuSDoCm5.js} +3 -3
- package/dist/client/assets/{url-slug-W6aFEmJF.js → url-slug-BFZflu8h.js} +1 -1
- package/dist/client/assets/{usage-stats-Dhf-DrML.js → usage-stats-FTjlrZsR.js} +2 -2
- package/dist/client/assets/{use-ai-providers-Cq3xA9Zt.js → use-ai-providers-hOyNnU7s.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-JRuS8Fqz.js +1 -0
- package/dist/client/assets/use-ask-in-chat-BkWoc5AG.js +1 -0
- package/dist/client/assets/{use-automations-BVThKMGQ.js → use-automations-BW9n1XZu.js} +1 -1
- package/dist/client/assets/use-autosave-CFQpxLa7.js +1 -0
- package/dist/client/assets/use-blocks-v8-project-B4vRqcEf.js +1 -0
- package/dist/client/assets/use-chat-layout-state-Bib3kRoh.js +1 -0
- package/dist/client/assets/{use-cms-publish-actions-C7zW1hZf.js → use-cms-publish-actions-BanOYWkB.js} +5 -5
- package/dist/client/assets/{use-connect-companion-B9VAml3x.js → use-connect-companion-hxxGTIoI.js} +1 -1
- package/dist/client/assets/use-connection-CKudd0UO.js +1 -0
- package/dist/client/assets/use-content-sync-DVFphaEf.js +1 -0
- package/dist/client/assets/{use-copy-DT5ZzrsX.js → use-copy-s7vshP5o.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Co74b8Ww.js → use-date-fns-locale-BcLGuFCX.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-4hpLvgm-.js → use-debounced-autosave-DF7xOcC9.js} +1 -1
- package/dist/client/assets/{use-debounced-value-jJnqowMI.js → use-debounced-value-B0C48w17.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BQqUH0BV.js → use-deco-credits-Cc7w_fUS.js} +1 -1
- package/dist/client/assets/use-decopilot-events-Ctfpdj_z.js +1 -0
- package/dist/client/assets/use-delete-block-CMQm89VB.js +1 -0
- package/dist/client/assets/use-delete-connection-BM0YKMsI.js +1 -0
- package/dist/client/assets/{use-deployment-admin-CDyLX01_.js → use-deployment-admin-CJOxofw6.js} +1 -1
- package/dist/client/assets/{use-entitlements-u-J4FrTi.js → use-entitlements-BPjzEs4p.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-BwHAw0OT.js +1 -0
- package/dist/client/assets/{use-file-configs-BbIIeRpu.js → use-file-configs-DA74H1hE.js} +1 -1
- package/dist/client/assets/{use-id-selection-CUD8oDcN.js → use-id-selection-CMNzhPoi.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CcPQJJTK.js → use-inbox-feed-C-HQ6EgP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CfhQVaOS.js → use-infinite-scroll-M12K1Dpn.js} +1 -1
- package/dist/client/assets/{use-join-requests-CkLvGQO2.js → use-join-requests-ntiStw2Q.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-DLlaHA4v.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-KGdhyspi.js → use-mcp-auth-status-B2OMY_Tu.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Bh7kEUBS.js → use-mcp-client-D_jTz-1i.js} +10 -10
- package/dist/client/assets/{use-mcp-prompts-BvdRcLVu.js → use-mcp-prompts-CFPSpaeI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BXarw5nj.js → use-mcp-tools-BMGCtRJK.js} +1 -1
- package/dist/client/assets/{use-mobile-Dc6kWu8K.js → use-mobile-M7B5YJR_.js} +1 -1
- package/dist/client/assets/use-move-blocks-B5DoaBOm.js +1 -0
- package/dist/client/assets/use-navigate-to-agent-BoWId4qC.js +1 -0
- package/dist/client/assets/use-never-published-8p9ySrBa.js +1 -0
- package/dist/client/assets/{use-org-fs-DrGQDt6z.js → use-org-fs-Dpr5-hHp.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CJN2n862.js → use-org-repo-syncs-DOKrzBXU.js} +1 -1
- package/dist/client/assets/{use-org-sso-3rJKFGHZ.js → use-org-sso-zsNytoCe.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Dw2wmQuO.js → use-organization-settings-CIEI8bNF.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-tu_PxC_K.js +1 -0
- package/dist/client/assets/use-project-scope-D1EeIJG0.js +1 -0
- package/dist/client/assets/use-recent-apps-DSYeKmJU.js +1 -0
- package/dist/client/assets/{use-reports-diagnostic-CnV_YMfp.js → use-reports-diagnostic-ChnnkK6V.js} +1 -1
- package/dist/client/assets/use-sandbox-events-bxyyBbR-.js +2 -0
- package/dist/client/assets/{use-secrets-CYyoVB7k.js → use-secrets-NY7H3OwI.js} +1 -1
- package/dist/client/assets/use-section-preview-base-Beu0iQz9.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-CGsrtxLO.js → use-sidebar-collapsed-D0GS7hdN.js} +1 -1
- package/dist/client/assets/{use-tags-D570CleN.js → use-tags-NAzrZ60o.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DCDiNKaK.js → use-task-board-analytics-DdzuizDS.js} +1 -1
- package/dist/client/assets/{use-task-board-events-DUIQmo3-.js → use-task-board-events-iA0mSg2Q.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CG0dFrGw.js → use-task-board-item-prs-Dw8_2urj.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BB9JhdmM.js → use-task-board-items-DQYVvsFC.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DTmkMV_c.js → use-task-board-prompts-DaZyR7M-.js} +1 -1
- package/dist/client/assets/{use-task-metadata-qW9LtgU4.js → use-task-metadata-c0FPnJ80.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CtFiUcL7.js → use-thread-outputs-nmtU5Zq-.js} +1 -1
- package/dist/client/assets/use-view-draft-kind-Cu0aFeKZ.js +1 -0
- package/dist/client/assets/{use-voice-input-DyZTYy5g.js → use-voice-input-DPQbRCzt.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CfdlXnOy.js +1 -0
- package/dist/client/assets/{useQueries-1XxIGeEN.js → useQueries-BncTnCJs.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-QQvh5ycV.js +1 -0
- package/dist/client/assets/{users-I0fvIaz3.js → users-DnLbGcVd.js} +1 -1
- package/dist/client/assets/{utils-Pt7-9-Ev.js → utils-yu1cqe5g.js} +2 -2
- package/dist/client/assets/variant-calendar-B9yPwKNQ.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BZrGhjnT.js → variant-matcher-override-DUz7pA6N.js} +1 -1
- package/dist/client/assets/{view-header-D7Xjp31c.js → view-header-DYVjdF9_.js} +1 -1
- package/dist/client/assets/virtual-mcp-B46xFMzN.js +1 -0
- package/dist/client/assets/{watch-sse-pool-B9yUO9oy.js → watch-sse-pool-Cgkbp7EA.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +584 -584
- package/package.json +1 -1
- package/dist/client/assets/ReferenceLine-CyROiAPM.js +0 -1
- package/dist/client/assets/ShoppingBag01-ClDrdJV2.js +0 -1
- package/dist/client/assets/agent-app-Bl_mPh_t.js +0 -1
- package/dist/client/assets/agent-assets-B5UWuXnl.js +0 -1
- package/dist/client/assets/agent-automation-C9PBjiVk.js +0 -20
- package/dist/client/assets/agent-automations-CMf5dE3K.js +0 -1
- package/dist/client/assets/agent-calendar-DfZ4ErN1.js +0 -1
- package/dist/client/assets/agent-connect-sources-DwgsD8vQ.js +0 -1
- package/dist/client/assets/agent-deck-DjXPR_Nl.js +0 -1
- package/dist/client/assets/agent-e2e-BRjoGfW2.js +0 -1
- package/dist/client/assets/agent-experiments-CA2mbR8k.js +0 -1
- package/dist/client/assets/agent-file-BQdiAqSO.js +0 -1
- package/dist/client/assets/agent-hosting-D5KChDQU.js +0 -1
- package/dist/client/assets/agent-icon-uDqFfzhf.js +0 -1
- package/dist/client/assets/agent-library-2kWug_zO.js +0 -1
- package/dist/client/assets/agent-library-file-DtPgl6Sc.js +0 -1
- package/dist/client/assets/agent-overview-CXQy1R3G.js +0 -1
- package/dist/client/assets/agent-releases-CaysxAFQ.js +0 -2
- package/dist/client/assets/agent-settings-Bt8gf0xs.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DfcTCTxX.js +0 -2
- package/dist/client/assets/agent-site-editor-content-B47YLbhf.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Ci1e5zpi.js +0 -1
- package/dist/client/assets/agent-view-FTi4q4vz.js +0 -1
- package/dist/client/assets/agent-view-guard-BP5FCFpQ.js +0 -1
- package/dist/client/assets/ai-providers-CQ29Z6f1.js +0 -1
- package/dist/client/assets/api-keys-h9YcYrMI.js +0 -1
- package/dist/client/assets/app-editor-BSqFGCuO.js +0 -1
- package/dist/client/assets/automations-Xmpwvi6F.js +0 -1
- package/dist/client/assets/autosend-D-UTWUhf.js +0 -1
- package/dist/client/assets/block-document-0w5M-3LO.js +0 -3
- package/dist/client/assets/blog-schema-CYWT4exY.js +0 -1
- package/dist/client/assets/category-editor-BRFXJMj8.js +0 -1
- package/dist/client/assets/chat-context-bTdV0PQS.js +0 -39
- package/dist/client/assets/choose-editor-CKJ9YUAD.js +0 -1
- package/dist/client/assets/cms-settings-editor-Bl0s5YWk.js +0 -1
- package/dist/client/assets/cms-store-drafts-B8sdeq2z.js +0 -1
- package/dist/client/assets/collapsible-B2pXVUPn.js +0 -1
- package/dist/client/assets/collection-detail-D-ELQuvL.js +0 -1
- package/dist/client/assets/config-CaohtXWJ.js +0 -1
- package/dist/client/assets/connection-detail-CyQt5Knq.js +0 -1
- package/dist/client/assets/connections-Dfx8FH4D.js +0 -1
- package/dist/client/assets/content-tab-Bd4lKzez.js +0 -25
- package/dist/client/assets/context-DkOsTTFI.js +0 -1
- package/dist/client/assets/discover-Blhzpr1h.js +0 -1
- package/dist/client/assets/experiments-tab-choice-BKIwz3b9.js +0 -1
- package/dist/client/assets/feature-gate-B_FyKX76.js +0 -1
- package/dist/client/assets/file-explorer-mKoJ95H9.js +0 -2
- package/dist/client/assets/general-DQnQVbWU.js +0 -1
- package/dist/client/assets/home-CLDIpUPQ.js +0 -1
- package/dist/client/assets/hosted-reconcile-C7zHteUc.js +0 -1
- package/dist/client/assets/index-CnFz3TOs.js +0 -4
- package/dist/client/assets/index-DO-A5xCQ.css +0 -1
- package/dist/client/assets/index-DPvgRnv7.js +0 -1
- package/dist/client/assets/index-DisDzI9Z.js +0 -1
- package/dist/client/assets/index-MBimNXd5.js +0 -1
- package/dist/client/assets/library-CYKhZ1Xb.js +0 -1
- package/dist/client/assets/mustache-CtUZw69D.js +0 -4
- package/dist/client/assets/named-rule-view-CkgbSbSg.js +0 -1
- package/dist/client/assets/openai-conversation-D4xjY3_1.js +0 -3
- package/dist/client/assets/parse-sections-D2w3wSuP.js +0 -20
- package/dist/client/assets/plan-Da6szJuR.js +0 -1
- package/dist/client/assets/post-calendar-DEqb8d3G.js +0 -1
- package/dist/client/assets/post-editor-B-zzeLVe.js +0 -2
- package/dist/client/assets/preview-tab-DBOLhpj4.js +0 -551
- package/dist/client/assets/project-app-view-etnu6fhD.js +0 -1
- package/dist/client/assets/project-apps-D4MFXbKC.js +0 -1
- package/dist/client/assets/project-reports-B9YT4T_3.js +0 -1
- package/dist/client/assets/project-tasks-DhwbKHKQ.js +0 -1
- package/dist/client/assets/projects-DN5f4v6V.js +0 -1
- package/dist/client/assets/record-editor-DtXYbHpV.js +0 -1
- package/dist/client/assets/redirect-editor-BGoLXzQs.js +0 -1
- package/dist/client/assets/reports-BVe3MPdv.js +0 -1
- package/dist/client/assets/reports-onboarding-hafGLqtC.js +0 -1
- package/dist/client/assets/reports-tab-BGeZEsTL.js +0 -2
- package/dist/client/assets/repositories-B9hLcljS.js +0 -1
- package/dist/client/assets/repositories-DMPvx5Vv.js +0 -1
- package/dist/client/assets/repository-picker-8FkfYDdf.js +0 -1
- package/dist/client/assets/resolve-tab-icon-DO940wY_.js +0 -1
- package/dist/client/assets/review-settings-Bj89Yxea.js +0 -1
- package/dist/client/assets/role-color-Dy-P6oaY.js +0 -1
- package/dist/client/assets/roles-CvbfU6et.js +0 -1
- package/dist/client/assets/route-93-1A9vt.js +0 -1
- package/dist/client/assets/route-BdH_uLpp.js +0 -1
- package/dist/client/assets/route-y8ZhYa0n.js +0 -1
- package/dist/client/assets/search-input-Cvdta6ZJ.js +0 -1
- package/dist/client/assets/section-array-field-AXi3Vg_u.js +0 -1
- package/dist/client/assets/sections-editor-CyIATot1.js +0 -1
- package/dist/client/assets/seo-editor-C0rSQsv3.js +0 -1
- package/dist/client/assets/settings-tab-DFF8W9c5.js +0 -1
- package/dist/client/assets/shell-layout-CU0v0Q3J.js +0 -1
- package/dist/client/assets/site-draft-actions-D4mgl3Il.js +0 -3
- package/dist/client/assets/site-draft-view-BlOBzJMo.js +0 -1
- package/dist/client/assets/site-editor-BoWcMF8-.js +0 -1
- package/dist/client/assets/skills-CPsP4uSN.js +0 -1
- package/dist/client/assets/suggestion-UmoyYDA6.js +0 -2
- package/dist/client/assets/synced-repos-MPQrTxDL.js +0 -1
- package/dist/client/assets/taskboard-analytics-BCgYqiKL.js +0 -1
- package/dist/client/assets/tasks-D2QsX8U7.js +0 -1
- package/dist/client/assets/thread-analytics-DEw5nqD5.js +0 -1
- package/dist/client/assets/thread-route-0xQXgTvr.js +0 -1
- package/dist/client/assets/use-apply-named-rule-V-RgXu1D.js +0 -1
- package/dist/client/assets/use-ask-in-chat-CIVcbye6.js +0 -1
- package/dist/client/assets/use-autosave-CCiDACSS.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-Cbqo1QTy.js +0 -1
- package/dist/client/assets/use-chat-layout-state-CGYfM8sf.js +0 -1
- package/dist/client/assets/use-connection-DnLlCwu6.js +0 -1
- package/dist/client/assets/use-content-sync-D9eluVVW.js +0 -1
- package/dist/client/assets/use-decopilot-events-B2tjImS_.js +0 -1
- package/dist/client/assets/use-delete-connection-DpEMQiOo.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-BxKgK3r2.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-DyYS88nS.js +0 -1
- package/dist/client/assets/use-move-blocks-D35xWi_f.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-BNznjjAZ.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-BNwJJKFa.js +0 -1
- package/dist/client/assets/use-project-scope-BbUTPXSS.js +0 -1
- package/dist/client/assets/use-recent-apps-BkGr3MbC.js +0 -1
- package/dist/client/assets/use-sandbox-events-C8uDi6Yt.js +0 -2
- package/dist/client/assets/use-section-preview-base-DqcwcHAy.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BuWYzJlw.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BofrdpH6.js +0 -1
- package/dist/client/assets/variant-calendar-WNfoLO6H.js +0 -1
- package/dist/client/assets/virtual-mcp-CSkG36xb.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as N,a4 as X,m as L,j as n,B as Pe,a5 as xs,b as E,a as Te,d as Re,a6 as hs,J as bt,r as ae,t as gt,o as Me,a7 as jt,a8 as bs,a9 as gs,C as vt,E as fe,aa as St,ab as js,ac as vs,L as Qe,ad as yt,$ as oe,ae as re,af as Ge,ag as Ss,ah as ys,ai as ks,q as Je,K as Ee,i as Ye,aj as Ze,ak as Ns,e as _s,_ as Xe,X as et,al as tt,Z as st,Y as pe,D as kt,v as Nt,x as _t,w as wt,am as ws,an as $s,ao as Cs,I as Is,y as Ps,ap as Ts,aq as zs,ar as $t,as as As,at as Fs,au as Os,av as Ds,aw as Ms,ax as Es,ay as Rs,f as Ls,l as qs,az as Bs,R as Us,u as Vs,O as Ks}from"./index-DVvmeJMJ.js";import{L as Be}from"./index-DPvgRnv7.js";import{u as Hs,L as ke,I as Ws,i as Ct}from"./shell-layout-CU0v0Q3J.js";import{S as Ie,a as te,b as we,u as nt,c as it,d as It,e as Pt,f as Qs,g as Gs,h as Tt}from"./use-sidebar-collapsed-CGsrtxLO.js";import{P as zt,a as At,b as Ft}from"./popover-DVbSl4_S.js";import{D as Js,a as Ys,b as Zs}from"./drawer-DO5xJQb9.js";import{T as Xs,a as en,b as tn,c as sn}from"./tooltip-BVrosRIK.js";import{u as nn}from"./use-mobile-Dc6kWu8K.js";import{t as on,i as Ke,a as ln,b as rn,c as an,d as cn,e as dn,f as mn,g as Ot,s as Dt,h as un,j as fn,n as Mt,k as pn,l as xn,m as Et,o as Rt,p as hn,q as bn,r as gn,u as jn,v as vn,w as Lt,x as Sn}from"./agent-icon-uDqFfzhf.js";import{i as qt}from"./Monitor01-CVDkBVET.js";import{n as yn,a as kn}from"./Sun-wXzOhHYv.js";import{a as Bt,b as Nn,i as _n}from"./Tool01-DB3xqZeL.js";import{u as wn}from"./use-deployment-admin-CDyLX01_.js";import{u as $n}from"./use-deco-credits-BQqUH0BV.js";import{u as Cn,a as Ut}from"./use-entitlements-u-J4FrTi.js";import{u as In,P as Pn}from"./plan-ladder-BIrfRC9w.js";import{u as Tn}from"./use-organization-settings-Dw2wmQuO.js";import{S as zn}from"./scroll-area-D1j-ZNOk.js";import{u as Vt}from"./use-inbox-feed-CcPQJJTK.js";import{t as Kt}from"./task-key-BCHdFiOO.js";import{S as An}from"./super-agent-icon-CSXn8PV0.js";import{B as Fn}from"./badge-FhnYiqmQ.js";import{i as Ht}from"./ArrowLeft-DpMV6ZsI.js";import{u as Wt,a as ze}from"./use-project-scope-BbUTPXSS.js";import{u as Qt}from"./optimistic-project-sidebar-views-Bxu9JyYq.js";import{s as On,u as Dn,p as Mn,r as En,a as Rn,o as Ln,P as qn}from"./use-project-native-view-presence-BNwJJKFa.js";import{P as Bn}from"./ai-providers-logos-DD3qZ33J.js";import{u as Un,O as Vn}from"./own-accounts-section-BPiQsCnH.js";import{T as Gt}from"./toolbar-icon-button-DJE3OEfz.js";import{u as Kn}from"./thread-route-C8VqFbkH.js";import{P as Hn}from"./project-apps-D4MFXbKC.js";import{u as Wn}from"./autosend-D-UTWUhf.js";import{a as Qn}from"./agent-capabilities-C7nwtlfn.js";import{k as Gn,p as Jn}from"./use-recent-apps-BkGr3MbC.js";import{u as Jt}from"./use-navigate-to-agent-BNznjjAZ.js";import{r as Yn}from"./resolve-tab-icon-DO940wY_.js";import{T as Zn}from"./tab-icon-glyph-DWwnpbAG.js";import{t as Yt}from"./ChevronUp-DlMNWluH.js";import{s as He}from"./Plus-DXpzgENj.js";import{C as ue,a as Xn,b as ei,c as ti,d as Ue,e as si,f as ni,g as ii}from"./context-menu-CzVow7cK.js";import{t as oi,a as li}from"./use-task-board-items-BB9JhdmM.js";import{o as Zt}from"./new-project-dialog-DNs6nXJU.js";import{P as Xt}from"./project-icon-BfdBakvS.js";import{E as ri,p as ai,P as ci}from"./watch-sse-pool-B9yUO9oy.js";import{b as di,p as mi}from"./project-index-CIwgcHHa.js";import{C as ui}from"./checkbox-Bq5cgSkE.js";import{I as We}from"./icon-button-BMTp1-QM.js";import{S as fi}from"./switch-BoeP0_DT.js";import{t as pi}from"./Globe04-xh_ZOoQS.js";import{i as xi}from"./CreditCard01-DDsAjKey.js";import{i as hi}from"./Key01-BnxP0_QL.js";import{i as bi}from"./Zap-BFWL2aD-.js";import{u as gi}from"./use-join-requests-CkLvGQO2.js";import{p as ji,q as vi}from"./question-004-sINsf4GQ.js";import{u as Si}from"./use-decopilot-events-B2tjImS_.js";import"./sheet-BSTYuLMa.js";import"./core.esm-DbuDfvWF.js";import"./sortable.esm-BMq0DSBR.js";import"./UserSquare-NNxs0RWc.js";import"./XClose-E_Sbr7JC.js";import"./create-organization-dialog-D6MpLXO5.js";import"./form-BTSAyeiz.js";import"./label-DxsI69Ti.js";import"./command-C4A_k1m6.js";import"./index-DyEEK3cc.js";import"./SearchMd-CWmEKOOP.js";import"./use-debounced-value-jJnqowMI.js";import"./ShoppingBag01-ClDrdJV2.js";import"./feedback-BqoIMOg7.js";import"./textarea-yEyl1P1k.js";import"./admin-fetch-BhTJlAsX.js";import"./CheckCircle-DSJM5Ipe.js";import"./integration-icon-C9OIwyFH.js";import"./LinkBroken01-4XuFjBFS.js";import"./use-mcp-client-Bh7kEUBS.js";import"./auth-DzshLgt0.js";import"./thread-intent-BNVTtSHt.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./legacy-admin-welcome-dialog-DIDvLt4b.js";import"./required-auth-layout-BIQCwVTO.js";import"./use-org-sso-3rJKFGHZ.js";import"./use-chat-layout-state-CGYfM8sf.js";import"./index-DwNl1Km0.js";import"./AlertCircle-C4gtVV8B.js";import"./ArrowUp-BZtzDI6h.js";import"./ChevronSelectorVertical-Y1qRZSrs.js";import"./SwitchHorizontal01-C42vJfgE.js";import"./Minus-D8UqNYy4.js";import"./Play--aCtxlXx.js";import"./Trash01-BAWUFhrC.js";import"./Upload01-CMkGIZuR.js";import"./Users01-DIshv_Ib.js";import"./use-ai-providers-Cq3xA9Zt.js";import"./schema-CzuWRpLl.js";import"./task-board-D-pfBnAn.js";import"./index-BdQq_4o_.js";import"./useInfiniteQuery-BuWYzJlw.js";import"./infiniteQueryObserver-Depn9DGH.js";import"./repository-binding-DJpVzzIq.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BbIIeRpu.js";import"./use-blocks-v8-project-Cbqo1QTy.js";import"./github-icon-B_en9n_0.js";import"./use-date-fns-locale-Co74b8Ww.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./config-CaohtXWJ.js";import"./use-task-board-events-DUIQmo3-.js";import"./repository-picker-8FkfYDdf.js";import"./collection-search-o_TUN55Q.js";function yi(){const t=N.c(19),{org:e}=X(),{data:i}=Hs(e.slug);if(!i)return null;const s=i.severity==="block",o=s?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let l;t[0]!==o?(l=L("flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2 text-sm",o),t[0]=o,t[1]=l):l=t[1];const r=s?void 0:"text-warning";let a;t[2]!==r?(a=L("size-4 shrink-0",r),t[2]=r,t[3]=a):a=t[3];let c;t[4]!==a?(c=n.jsx(xs,{className:a}),t[4]=a,t[5]=c):c=t[5];let f;t[6]!==i.title?(f=n.jsx("span",{className:"font-medium",children:i.title}),t[6]=i.title,t[7]=f):f=t[7];let m;t[8]!==i.message?(m=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:i.message}),t[8]=i.message,t[9]=m):m=t[9];let d;t[10]!==i.ctaLabel||t[11]!==i.ctaUrl?(d=i.ctaUrl&&i.ctaLabel?n.jsx(Pe,{size:"sm",variant:"outline",asChild:!0,children:n.jsx("a",{href:i.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:i.ctaLabel})}):null,t[10]=i.ctaLabel,t[11]=i.ctaUrl,t[12]=d):d=t[12];let p;return t[13]!==l||t[14]!==c||t[15]!==f||t[16]!==m||t[17]!==d?(p=n.jsxs("div",{role:"alert",className:l,children:[c,f,m,d]}),t[13]=l,t[14]=c,t[15]=f,t[16]=m,t[17]=d,t[18]=p):p=t[18],p}const ct="size-4 shrink-0";function ot(t){const e=N.c(5),{children:i,className:s}=t;let o;e[0]!==s?(o=L("flex w-4 shrink-0 items-center justify-center",s),e[0]=s,e[1]=o):o=e[1];let l;return e[2]!==i||e[3]!==o?(l=n.jsx("span",{className:o,children:i}),e[2]=i,e[3]=o,e[4]=l):l=e[4],l}function Ce(t){const e=N.c(26),{item:i,onClose:s}=t;let o;e[0]!==i.className?(o=L("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",i.className),e[0]=i.className,e[1]=o):o=e[1];const l=o;if(i.href){const m=i.external?"_blank":void 0,d=i.external?"noopener noreferrer":void 0;let p;e[2]!==i.icon?(p=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:i.icon}),e[2]=i.icon,e[3]=p):p=e[3];let u;e[4]!==i.label?(u=n.jsx("span",{className:"flex-1",children:i.label}),e[4]=i.label,e[5]=u):u=e[5];let x;return e[6]!==l||e[7]!==i.href||e[8]!==s||e[9]!==m||e[10]!==d||e[11]!==p||e[12]!==u?(x=n.jsxs("a",{href:i.href,target:m,rel:d,className:l,onClick:s,children:[p,u]}),e[6]=l,e[7]=i.href,e[8]=s,e[9]=m,e[10]=d,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let r;e[14]!==i||e[15]!==s?(r=()=>{i.onClick?.(),s()},e[14]=i,e[15]=s,e[16]=r):r=e[16];let a;e[17]!==i.icon?(a=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:i.icon}),e[17]=i.icon,e[18]=a):a=e[18];let c;e[19]!==i.label?(c=n.jsx("span",{className:"flex-1",children:i.label}),e[19]=i.label,e[20]=c):c=e[20];let f;return e[21]!==l||e[22]!==r||e[23]!==a||e[24]!==c?(f=n.jsxs("button",{type:"button",onClick:r,className:l,children:[a,c]}),e[21]=l,e[22]=r,e[23]=a,e[24]=c,e[25]=f):f=e[25],f}function ki(){const t=N.c(4),e=E();let i;t[0]!==e?(i=e("common.accountPopover.impersonating"),t[0]=e,t[1]=i):i=t[1];let s;return t[2]!==i?(s=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-2xs font-medium text-warning",children:i}),t[2]=i,t[3]=s):s=t[3],s}function dt(t){const e=N.c(38),{user:i,userImage:s,isImpersonating:o,isMobile:l}=t,r=E(),a=l?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==a?(c=L("flex items-center gap-3 px-4",a),e[0]=a,e[1]=c):c=e[1];const f=i?.name??"U";let m;e[2]!==f||e[3]!==s?(m=n.jsx(Me,{url:s,fallback:f,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=f,e[3]=s,e[4]=m):m=e[4];let d;e[5]!==r||e[6]!==i?.name?(d=i?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=i?.name,e[7]=d):d=e[7];let p;e[8]!==d?(p=n.jsx("p",{className:"text-sm font-medium truncate",children:d}),e[8]=d,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&n.jsx(ki,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=n.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const b=i?.email;let h;e[15]!==b?(h=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=h):h=e[16];let g;e[17]!==h||e[18]!==x?(g=n.jsxs("div",{className:"flex-1 min-w-0",children:[x,h]}),e[17]=h,e[18]=x,e[19]=g):g=e[19];let y;e[20]!==r||e[21]!==i?(y=()=>{i?.id&&navigator.clipboard.writeText(i.id).then(()=>{gt.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=i,e[22]=y):y=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(dn,{size:14}),e[23]=j):j=e[23];let v;e[24]!==y?(v=n.jsx(Xs,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:y,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:j})}),e[24]=y,e[25]=v):v=e[25];let S;e[26]!==r?(S=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=S):S=e[27];let k;e[28]!==S?(k=n.jsx(en,{side:"right",children:n.jsx("p",{className:"text-xs",children:S})}),e[28]=S,e[29]=k):k=e[29];let w;e[30]!==v||e[31]!==k?(w=n.jsx(tn,{delayDuration:300,children:n.jsxs(sn,{children:[v,k]})}),e[30]=v,e[31]=k,e[32]=w):w=e[32];let $;return e[33]!==g||e[34]!==w||e[35]!==c||e[36]!==m?($=n.jsxs("div",{className:c,children:[m,g,w]}),e[33]=g,e[34]=w,e[35]=c,e[36]=m,e[37]=$):$=e[37],$}function mt(t){const e=N.c(35),{themeOptions:i,preferences:s,setPreferences:o,isMobile:l}=t,r=E(),a=l?"size-8":"size-7",c=l?"px-3 py-3":"px-2 py-1.5";let f;e[0]!==c?(f=L("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=f):f=e[1];let m;if(e[2]!==a||e[3]!==s.theme||e[4]!==o||e[5]!==i){let S;e[7]!==a||e[8]!==s.theme||e[9]!==o?(S=k=>{const{value:w,icon:$,label:_}=k;return n.jsx("button",{type:"button","aria-label":_,onClick:()=>o(C=>({...C,theme:w})),className:L(a,"rounded-lg flex items-center justify-center transition-colors",s.theme===w?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent hover:text-foreground"),children:$},w)},e[7]=a,e[8]=s.theme,e[9]=o,e[10]=S):S=e[10],m=i.map(S),e[2]=a,e[3]=s.theme,e[4]=o,e[5]=i,e[6]=m}else m=e[6];let d;e[11]!==m?(d=n.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=d):d=e[12];let p;e[13]!==s.enableSounds||e[14]!==r?(p=s.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=s.enableSounds,e[14]=r,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(Ni),e[16]=o,e[17]=u):u=e[17];const x=s.enableSounds?"text-foreground hover:bg-sidebar-accent":"text-muted-foreground hover:bg-sidebar-accent hover:text-foreground";let b;e[18]!==a||e[19]!==x?(b=L(a,"rounded-lg flex items-center justify-center transition-colors",x),e[18]=a,e[19]=x,e[20]=b):b=e[20];let h;e[21]!==s.enableSounds?(h=s.enableSounds?n.jsx(an,{size:14}):n.jsx(cn,{size:14}),e[21]=s.enableSounds,e[22]=h):h=e[22];let g;e[23]!==p||e[24]!==u||e[25]!==b||e[26]!==h?(g=n.jsx("button",{type:"button","aria-label":p,onClick:u,className:b,children:h}),e[23]=p,e[24]=u,e[25]=b,e[26]=h,e[27]=g):g=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.576.5"]}),e[28]=y):y=e[28];let j;e[29]!==g?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[g,y]}),e[29]=g,e[30]=j):j=e[30];let v;return e[31]!==j||e[32]!==f||e[33]!==d?(v=n.jsxs("div",{className:f,children:[d,j]}),e[31]=j,e[32]=f,e[33]=d,e[34]=v):v=e[34],v}function Ni(t){return{...t,enableSounds:!t.enableSounds}}function ut(t){const e=N.c(54),{user:i,userImage:s,menuItems:o,signOutItem:l,stopImpersonatingItem:r,isImpersonating:a,themeOptions:c,preferences:f,setPreferences:m,close:d,isMobile:p}=t;if(p){let v;e[0]!==a||e[1]!==i||e[2]!==s?(v=n.jsx(dt,{user:i,userImage:s,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=i,e[2]=s,e[3]=v):v=e[3];let S;if(e[4]!==d||e[5]!==o){let I;e[7]!==d?(I=A=>n.jsx(Ce,{item:A,onClose:d},A.key),e[7]=d,e[8]=I):I=e[8],S=o.map(I),e[4]=d,e[5]=o,e[6]=S}else S=e[6];let k;e[9]!==d||e[10]!==r?(k=r&&n.jsx(Ce,{item:r,onClose:d}),e[9]=d,e[10]=r,e[11]=k):k=e[11];let w;e[12]!==d||e[13]!==l?(w=n.jsx(Ce,{item:l,onClose:d}),e[12]=d,e[13]=l,e[14]=w):w=e[14];let $;e[15]!==S||e[16]!==k||e[17]!==w?($=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,k,w]})}),e[15]=S,e[16]=k,e[17]=w,e[18]=$):$=e[18];let _;e[19]!==f||e[20]!==m||e[21]!==c?(_=n.jsx(mt,{themeOptions:c,preferences:f,setPreferences:m,isMobile:!0}),e[19]=f,e[20]=m,e[21]=c,e[22]=_):_=e[22];let C;return e[23]!==v||e[24]!==$||e[25]!==_?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,$,_]}),e[23]=v,e[24]=$,e[25]=_,e[26]=C):C=e[26],C}let u;e[27]!==a||e[28]!==i||e[29]!==s?(u=n.jsx(dt,{user:i,userImage:s,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=i,e[29]=s,e[30]=u):u=e[30];let x;if(e[31]!==d||e[32]!==o){let v;e[34]!==d?(v=S=>n.jsx(Ce,{item:S,onClose:d},S.key),e[34]=d,e[35]=v):v=e[35],x=o.map(v),e[31]=d,e[32]=o,e[33]=x}else x=e[33];let b;e[36]!==d||e[37]!==r?(b=r&&n.jsx(Ce,{item:r,onClose:d}),e[36]=d,e[37]=r,e[38]=b):b=e[38];let h;e[39]!==d||e[40]!==l?(h=n.jsx(Ce,{item:l,onClose:d}),e[39]=d,e[40]=l,e[41]=h):h=e[41];let g;e[42]!==x||e[43]!==b||e[44]!==h?(g=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,b,h]}),e[42]=x,e[43]=b,e[44]=h,e[45]=g):g=e[45];let y;e[46]!==f||e[47]!==m||e[48]!==c?(y=n.jsx(mt,{themeOptions:c,preferences:f,setPreferences:m,isMobile:!1}),e[46]=f,e[47]=m,e[48]=c,e[49]=y):y=e[49];let j;return e[50]!==u||e[51]!==g||e[52]!==y?(j=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[u,g,y]})}),e[50]=u,e[51]=g,e[52]=y,e[53]=j):j=e[53],j}function es(){const t=N.c(98),e=E(),{data:i}=Te.useSession(),{org:s}=X(),o=Re();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org",shouldThrow:!1},t[0]=l):l=t[0];const a=hs(l)?.params.org,[c,f]=bt(),m=nn(),{isAdmin:d}=wn(),[p,u]=ae.useState(!1),x=i?.user,b=x?.image,h=!!i?.session?.impersonatedBy;let g;t[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>u(!1),t[1]=g):g=t[1];const y=g;let j;t[2]!==e?(j=e("common.accountPopover.preferences"),t[2]=e,t[3]=j):j=t[3];let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Bt,{size:16}),t[4]=v):v=t[4];let S;t[5]!==o||t[6]!==a?(S=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=S):S=t[7];let k;t[8]!==j||t[9]!==S?(k={key:"preferences",label:j,icon:v,onClick:S},t[8]=j,t[9]=S,t[10]=k):k=t[10];let w;t[11]!==s||t[12]!==o?(w=s?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(jt,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:s.slug}})}}]:[],t[11]=s,t[12]=o,t[13]=w):w=t[13];let $;t[14]!==e?($=e("common.accountPopover.termsOfUse"),t[14]=e,t[15]=$):$=t[15];let _;t[16]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(ln,{size:16}),t[16]=_):_=t[16];let C;t[17]!==$?(C={key:"terms",label:$,icon:_,href:"https://www.decocms.com/terms-of-use",external:!0},t[17]=$,t[18]=C):C=t[18];let I;t[19]!==e?(I=e("common.accountPopover.privacyPolicy"),t[19]=e,t[20]=I):I=t[20];let A;t[21]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(bs,{size:16}),t[21]=A):A=t[21];let q;t[22]!==I?(q={key:"privacy",label:I,icon:A,href:"https://www.decocms.com/privacy-policy",external:!0},t[22]=I,t[23]=q):q=t[23];let B;t[24]!==e?(B=e("common.accountPopover.repository"),t[24]=e,t[25]=B):B=t[25];let J;t[26]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(gs,{className:"w-4 h-4"}),t[26]=J):J=t[26];let G;t[27]!==B?(G={key:"github",label:B,icon:J,href:"https://github.com/decocms/studio",external:!0},t[27]=B,t[28]=G):G=t[28];let V;t[29]!==e?(V=e("common.accountPopover.community"),t[29]=e,t[30]=V):V=t[30];let ee;t[31]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(vt,{size:16}),t[31]=ee):ee=t[31];let W;t[32]!==V?(W={key:"community",label:V,icon:ee,href:"https://decocms.com/discord",external:!0},t[32]=V,t[33]=W):W=t[33];let K;t[34]!==e?(K=e("common.accountPopover.homepage"),t[34]=e,t[35]=K):K=t[35];let Y;t[36]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(rn,{size:16}),t[36]=Y):Y=t[36];let U;t[37]!==K?(U={key:"homepage",label:K,icon:Y,href:"https://decocms.com",external:!0},t[37]=K,t[38]=U):U=t[38];let Q;t[39]!==d||t[40]!==o||t[41]!==e?(Q=d?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(on,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[39]=d,t[40]=o,t[41]=e,t[42]=Q):Q=t[42];let Z;t[43]!==q||t[44]!==G||t[45]!==W||t[46]!==U||t[47]!==Q||t[48]!==k||t[49]!==w||t[50]!==C?(Z=[k,...w,C,q,G,W,U,...Q],t[43]=q,t[44]=G,t[45]=W,t[46]=U,t[47]=Q,t[48]=k,t[49]=w,t[50]=C,t[51]=Z):Z=t[51];const z=Z;let R;t[52]!==e?(R=e("common.accountPopover.signOut"),t[52]=e,t[53]=R):R=t[53];let P;t[54]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(Ke,{size:16}),t[54]=P):P=t[54];let O;t[55]!==R?(O={key:"logout",label:R,icon:P,onClick:wi},t[55]=R,t[56]=O):O=t[56];const D=O;let H;t[57]!==h||t[58]!==e?(H=h?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Ke,{size:16}),onClick:async()=>{const{error:_e}=await Te.admin.stopImpersonating();if(_e){gt.error(_e.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[57]=h,t[58]=e,t[59]=H):H=t[59];const Se=H;let ce;t[60]===Symbol.for("react.memo_cache_sentinel")?(ce=n.jsx(yn,{size:14}),t[60]=ce):ce=t[60];let se;t[61]!==e?(se=e("common.accountPopover.lightTheme"),t[61]=e,t[62]=se):se=t[62];let ne;t[63]!==se?(ne={value:"light",icon:ce,label:se},t[63]=se,t[64]=ne):ne=t[64];let xe;t[65]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(kn,{size:14}),t[65]=xe):xe=t[65];let M;t[66]!==e?(M=e("common.accountPopover.darkTheme"),t[66]=e,t[67]=M):M=t[67];let ie;t[68]!==M?(ie={value:"dark",icon:xe,label:M},t[68]=M,t[69]=ie):ie=t[69];let he;t[70]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(qt,{size:14}),t[70]=he):he=t[70];let de;t[71]!==e?(de=e("common.accountPopover.systemTheme"),t[71]=e,t[72]=de):de=t[72];let me;t[73]!==de?(me={value:"system",icon:he,label:de},t[73]=de,t[74]=me):me=t[74];let be;t[75]!==ne||t[76]!==ie||t[77]!==me?(be=[ne,ie,me],t[75]=ne,t[76]=ie,t[77]=me,t[78]=be):be=t[78];const ye=be;let ge;t[79]!==h||t[80]!==m||t[81]!==z||t[82]!==c||t[83]!==f||t[84]!==D||t[85]!==Se||t[86]!==ye||t[87]!==x||t[88]!==b?(ge={user:x,userImage:b,menuItems:z,signOutItem:D,stopImpersonatingItem:Se,isImpersonating:h,themeOptions:ye,preferences:c,setPreferences:f,close:y,isMobile:m},t[79]=h,t[80]=m,t[81]=z,t[82]=c,t[83]=f,t[84]=D,t[85]=Se,t[86]=ye,t[87]=x,t[88]=b,t[89]=ge):ge=t[89];const je=ge;let ve;return t[90]!==h||t[91]!==m||t[92]!==p||t[93]!==je||t[94]!==e||t[95]!==x?.name||t[96]!==b?(ve=m?n.jsxs(Js,{open:p,onOpenChange:u,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>u(!0),className:L("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",h&&"border-2 border-dashed border-warning"),children:[n.jsx(Me,{url:b,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Ys,{className:"h-[80dvh] p-0",children:[n.jsx(Zs,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(ut,{...je})]})]}):n.jsxs(zt,{open:p,onOpenChange:u,children:[n.jsx(At,{asChild:!0,children:n.jsxs(Ie,{"data-tour":ke.account,tooltip:x?.name??e("common.accountPopover.defaultAccountLabel"),className:L(h&&"border-2 border-dashed border-warning"),children:[n.jsx(ot,{children:n.jsx(Me,{url:b,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(Ft,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:_i,children:n.jsx(ut,{...je})})]}),t[90]=h,t[91]=m,t[92]=p,t[93]=je,t[94]=e,t[95]=x?.name,t[96]=b,t[97]=ve):ve=t[97],ve}function _i(t){return t.preventDefault()}function wi(){fe("signed_out",{source:"account_popover"}),St(),Te.signOut()}class $i extends ae.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,i){}render(){return this.state.hasError?null:this.props.children}}function Ci(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Ii(){const t=N.c(17),e=Re(),{org:i}=X(),{hasDecoKey:s,balanceDollars:o}=$n();if(!s)return null;let l;t[0]!==o?(l=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=l):l=t[1];let r;t[2]!==o?(r=L(o!=null&&Ci(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==i.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:i.slug}}),t[4]=e,t[5]=i.slug,t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(mn,{}),t[7]=c):c=t[7];let f;t[8]!==o?(f=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=f):f=t[9];let m;t[10]!==f?(m=n.jsx("span",{children:f}),t[10]=f,t[11]=m):m=t[11];let d;return t[12]!==l||t[13]!==r||t[14]!==a||t[15]!==m?(d=n.jsx(te,{children:n.jsx(we,{children:n.jsxs(Ie,{tooltip:l,className:r,onClick:a,children:[c,m]})})}),t[12]=l,t[13]=r,t[14]=a,t[15]=m,t[16]=d):d=t[16],d}const Pi={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Ti(){const t=N.c(32),e=E(),i=Re(),{org:s}=X(),{data:o}=Ut();if(!o?.usage||!o.features.chat)return null;let l,r;if(t[0]!==o.usage.percent?(l=Math.round(o.usage.percent*100),r=Number.isFinite(l),t[0]=o.usage.percent,t[1]=l,t[2]=r):(l=t[1],r=t[2]),!r)return null;const a=Math.min(100,Math.max(0,l)),c=o.plan.name;let f;t[3]!==e?(f=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=f):f=t[4];const m=`${c} · ${f} ${a}%`;let d;t[5]!==i||t[6]!==s.slug?(d=()=>i({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[5]=i,t[6]=s.slug,t[7]=d):d=t[7];let p;t[8]!==o.plan.id?(p=n.jsx(ot,{className:"-ml-px",children:n.jsx(zi,{planId:o.plan.id})}),t[8]=o.plan.id,t[9]=p):p=t[9];let u;t[10]!==o.plan.name?(u=n.jsx("span",{className:"truncate font-medium",children:o.plan.name}),t[10]=o.plan.name,t[11]=u):u=t[11];let x;t[12]!==a?(x=n.jsxs("span",{className:"tabular-nums text-xs text-muted-foreground",children:[a,"%"]}),t[12]=a,t[13]=x):x=t[13];let b;t[14]!==u||t[15]!==x?(b=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[u,x]}),t[14]=u,t[15]=x,t[16]=b):b=t[16];const h=Pi[o.usage.state];let g;t[17]!==h?(g=L("block h-full rounded-full",h),t[17]=h,t[18]=g):g=t[18];const y=`${a}%`;let j;t[19]!==y?(j={width:y},t[19]=y,t[20]=j):j=t[20];let v;t[21]!==g||t[22]!==j?(v=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:g,style:j})}),t[21]=g,t[22]=j,t[23]=v):v=t[23];let S;t[24]!==v||t[25]!==b?(S=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[b,v]}),t[24]=v,t[25]=b,t[26]=S):S=t[26];let k;return t[27]!==S||t[28]!==m||t[29]!==d||t[30]!==p?(k=n.jsx(te,{children:n.jsx(we,{children:n.jsxs(Ie,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:d,children:[p,S]})})}),t[27]=S,t[28]=m,t[29]=d,t[30]=p,t[31]=k):k=t[31],k}function zi(t){const e=N.c(6),{planId:i}=t,{data:s}=In();let o;e[0]!==i||e[1]!==s?(o=s?.findIndex(a=>a.id===i)??-1,e[0]=i,e[1]=s,e[2]=o):o=e[2];const l=o;if(l<0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Ot,{className:ct}),e[3]=a):a=e[3],a}let r;return e[4]!==l?(r=n.jsx(Pn,{index:l,className:ct}),e[4]=l,e[5]=r):r=e[5],r}function Ai(){return Cn()?n.jsx(Ti,{}):n.jsx(Ii,{})}function Fi(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx($i,{children:n.jsx(ae.Suspense,{fallback:null,children:n.jsx(Ai,{})})}),t[0]=e):e=t[0],e}function Oi(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":case"order_incident":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function Di(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");case"order_incident":return e("sidebar.inbox.actionOrderIncident");default:{const i=t.action;return String(i)}}}function Mi(t){const e=N.c(36),{update:i,orgSlug:s,onSelect:o}=t,l=E();let r;e[0]!==s||e[1]!==i.taskKeySeq?(r=Kt(s,i.taskKeySeq),e[0]=s,e[1]=i.taskKeySeq,e[2]=r):r=e[2];const a=r,c=!i.actorName;let f;e[3]!==c||e[4]!==i.actorImage||e[5]!==i.actorName?(f=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(An,{size:24}):n.jsx(Me,{url:i.actorImage??void 0,fallback:i.actorName??"?",shape:"circle",size:"xs"})}),e[3]=c,e[4]=i.actorImage,e[5]=i.actorName,e[6]=f):f=e[6];let m;e[7]!==i.taskTitle?(m=n.jsx("p",{className:"min-w-0 flex-1 line-clamp-2 break-words text-sm font-medium text-foreground",children:i.taskTitle}),e[7]=i.taskTitle,e[8]=m):m=e[8];let d;e[9]!==i.occurredAt?(d=js(new Date(i.occurredAt)),e[9]=i.occurredAt,e[10]=d):d=e[10];let p;e[11]!==d?(p=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:d}),e[11]=d,e[12]=p):p=e[12];let u;e[13]!==m||e[14]!==p?(u=n.jsxs("div",{className:"flex items-baseline gap-2",children:[m,p]}),e[13]=m,e[14]=p,e[15]=u):u=e[15];let x;e[16]!==a?(x=a&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:a})," · "]}),e[16]=a,e[17]=x):x=e[17];let b;e[18]!==i.action?(b=L(Oi(i.action)),e[18]=i.action,e[19]=b):b=e[19];let h;e[20]!==l||e[21]!==i?(h=Di(i,l),e[20]=l,e[21]=i,e[22]=h):h=e[22];let g;e[23]!==b||e[24]!==h?(g=n.jsx("span",{className:b,children:h}),e[23]=b,e[24]=h,e[25]=g):g=e[25];let y;e[26]!==g||e[27]!==x?(y=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[x,g]}),e[26]=g,e[27]=x,e[28]=y):y=e[28];let j;e[29]!==y||e[30]!==u?(j=n.jsxs("div",{className:"min-w-0 flex-1",children:[u,y]}),e[29]=y,e[30]=u,e[31]=j):j=e[31];let v;return e[32]!==o||e[33]!==j||e[34]!==f?(v=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-accent",children:[f,j]}),e[32]=o,e[33]=j,e[34]=f,e[35]=v):v=e[35],v}function ts(){const t=ae.useContext(vs),{data:e,refetch:i}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>i?.()}}function Ei(t){const e=N.c(2),{onReach:i}=t;let s;return e[0]!==i?(s=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const l=new IntersectionObserver(r=>{r.some(Ri)&&i()});return l.observe(o),()=>l.disconnect()}}),e[0]=i,e[1]=s):s=e[1],s}function Ri(t){return t.isIntersecting}function Li(t){const e=N.c(28),{onClose:i}=t,s=E(),o=Re(),{org:l}=X(),{updates:r,markAllRead:a,markRead:c,hasMore:f,fetchMore:m}=Vt(),d=ts(),p=d.invitations,u=d.refetch;let x;e[0]!==s?(x=s("sidebar.inbox.title"),e[0]=s,e[1]=x):x=e[1];let b;e[2]!==x?(b=n.jsx("h3",{className:"text-sm font-medium",children:x}),e[2]=x,e[3]=b):b=e[3];let h;e[4]!==a||e[5]!==s||e[6]!==r.length?(h=r.length>0&&n.jsx(Pe,{size:"sm",variant:"ghost",className:"text-muted-foreground",onClick:a,children:s("sidebar.inbox.markAllRead")}),e[4]=a,e[5]=s,e[6]=r.length,e[7]=h):h=e[7];let g;e[8]!==b||e[9]!==h?(g=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[b,h]}),e[8]=b,e[9]=h,e[10]=g):g=e[10];let y;e[11]!==p||e[12]!==u?(y=p.length>0&&n.jsx("div",{className:"shrink-0 border-border border-b p-2",children:p.map(S=>n.jsx(Ws,{invitation:S,onChanged:u},S.id))}),e[11]=p,e[12]=u,e[13]=y):y=e[13];let j;e[14]!==m||e[15]!==f||e[16]!==p.length||e[17]!==c||e[18]!==o||e[19]!==i||e[20]!==l||e[21]!==s||e[22]!==r?(j=r.length===0&&p.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(Dt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:s("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:s("sidebar.inbox.emptyBody")})]}):n.jsxs(zn,{className:"min-h-0 flex-1",children:[r.map(S=>{const k=Kt(l.slug,S.taskKeySeq);return n.jsx(Mi,{update:S,orgSlug:l.slug,onSelect:()=>{c(S.id),i(),k&&o({to:"/$org/tasks/{-$taskKey}",params:{org:l.slug,taskKey:k}})}},S.id)}),f&&n.jsx(Ei,{onReach:m})]}),e[14]=m,e[15]=f,e[16]=p.length,e[17]=c,e[18]=o,e[19]=i,e[20]=l,e[21]=s,e[22]=r,e[23]=j):j=e[23];let v;return e[24]!==g||e[25]!==y||e[26]!==j?(v=n.jsxs(n.Fragment,{children:[g,y,j]}),e[24]=g,e[25]=y,e[26]=j,e[27]=v):v=e[27],v}function qi(){const t=N.c(1),{redDotCount:e}=Vt(),{invitations:i}=ts();if(e===0&&i.length===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function Bi(t){const e=N.c(10),{open:i,onOpenChange:s,children:o}=t;let l;e[0]!==s||e[1]!==i?(l=i&&n.jsx(Li,{onClose:()=>s(!1)}),e[0]=s,e[1]=i,e[2]=l):l=e[2];let r;e[3]!==l?(r=n.jsx(Ft,{side:"right",align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(460px,calc(100vw-2rem))] flex-col p-0",children:l}),e[3]=l,e[4]=r):r=e[4];let a;return e[5]!==o||e[6]!==s||e[7]!==i||e[8]!==r?(a=n.jsxs(zt,{open:i,onOpenChange:s,children:[o,r]}),e[5]=o,e[6]=s,e[7]=i,e[8]=r,e[9]=a):a=e[9],a}function ss(){const t=N.c(9),e=E(),[i,s]=ae.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let l,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Dt,{size:15}),r=n.jsx(qi,{}),t[2]=l,t[3]=r):(l=t[2],r=t[3]);let a;t[4]!==o?(a=n.jsx(At,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-lg text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[l,r]})}),t[4]=o,t[5]=a):a=t[5];let c;return t[6]!==i||t[7]!==a?(c=n.jsx(Bi,{open:i,onOpenChange:s,children:a}),t[6]=i,t[7]=a,t[8]=c):c=t[8],c}function Ne(t){const e=N.c(35),{icon:i,label:s,isActive:o,link:l,onSelect:r,ariaLabel:a,className:c,dataTour:f,children:m,trailing:d,contextId:p}=t,u=o===void 0?!1:o,x=nt(),b=a??s,h=x?b:void 0;let g;e[0]!==c||e[1]!==f||e[2]!==u||e[3]!==h?(g={isActive:u,tooltip:h,className:c,"data-tour":f},e[0]=c,e[1]=f,e[2]=u,e[3]=h,e[4]=g):g=e[4];const y=g;let j;e[5]!==d?(j=d&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:d}),e[5]=d,e[6]=j):j=e[6];let v;e[7]!==s?(v=n.jsx("span",{className:"truncate",children:s}),e[7]=s,e[8]=v):v=e[8];let S;e[9]!==i||e[10]!==j||e[11]!==v?(S=n.jsxs(n.Fragment,{children:[i,j,v]}),e[9]=i,e[10]=j,e[11]=v,e[12]=S):S=e[12];const k=S;if(l){const _=u?"page":void 0;let C;e[13]!==k||e[14]!==l||e[15]!==b||e[16]!==r||e[17]!==_?(C=n.jsx(Qe,{...l,"aria-label":b,"aria-current":_,onClick:r,children:k}),e[13]=k,e[14]=l,e[15]=b,e[16]=r,e[17]=_,e[18]=C):C=e[18];let I;e[19]!==y||e[20]!==C?(I=n.jsx(Ie,{asChild:!0,...y,children:C}),e[19]=y,e[20]=C,e[21]=I):I=e[21];let A;return e[22]!==m||e[23]!==p||e[24]!==I?(A=n.jsxs(we,{"data-context-id":p,children:[I,m]}),e[22]=m,e[23]=p,e[24]=I,e[25]=A):A=e[25],A}let w;e[26]!==k||e[27]!==b||e[28]!==r||e[29]!==y?(w=n.jsx(Ie,{...y,"aria-label":b,onClick:r,children:k}),e[26]=k,e[27]=b,e[28]=r,e[29]=y,e[30]=w):w=e[30];let $;return e[31]!==m||e[32]!==p||e[33]!==w?($=n.jsxs(we,{"data-context-id":p,children:[w,m]}),e[31]=m,e[32]=p,e[33]=w,e[34]=$):$=e[34],$}function Ui(t){const e=N.c(5),{label:i,link:s,onSelect:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ht,{size:16}),e[0]=l):l=e[0];let r;return e[1]!==i||e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:"contents",children:n.jsx(te,{className:"shrink-0",children:n.jsx(Ne,{icon:l,label:i,className:"text-sidebar-foreground/70",link:s,onSelect:o})})}),e[1]=i,e[2]=s,e[3]=o,e[4]=r):r=e[4],r}function Vi(t){return t==="board"?"kanban":Ct(t)?"cms":null}function ns(){const t=N.c(2),{data:e}=Ut();let i;return t[0]!==e?(i=s=>{const o=Vi(s);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=i):i=t[1],i}const Le="settings",ft=["overview","files","monitor","plan","tasks"];function Ki(t){return t?[...ft,Le]:ft}const Hi={overview:"overview",files:"context",monitor:"monitor",plan:"plan",tasks:"board"};function Wi(t,e){return Ki(t).filter(i=>!t||i===Le||e.has(Hi[i]))}function Qi(){const t=N.c(13),e=E(),{org:i}=X(),s=yt(),o=Wt(),{project:l}=ze(),r=Qt(l?.id);let a;if(t[0]!==s||t[1]!==i.slug||t[2]!==r||t[3]!==l?.metadata||t[4]!==o||t[5]!==e){const c=On(l?.metadata,r);let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(un,{size:16}),t[7]=f):f=t[7];let m;t[8]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(fn,{size:16}),t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Mt,{size:16}),t[9]=d):d=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(pn,{size:16}),t[10]=p):p=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(xn,{size:16}),t[11]=u):u=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Et,{size:16}),t[12]=x):x=t[12];const b={overview:{key:"overview",label:e("sidebar.navDestinations.overview"),icon:f,isActive:o?s===oe.root||s===`${oe.root}/`:s===re.home||s===re.orgIndex,trackAs:"overview",link:o?{to:oe.root,params:{org:i.slug,agentId:o}}:{to:re.home,params:{org:i.slug}}},plan:{key:"plan",label:e("sidebar.navDestinations.plan"),icon:m,isActive:s===re.plan||s===oe.plan,trackAs:"plan",soon:!0,link:o?{to:oe.plan,params:{org:i.slug,agentId:o}}:{to:re.plan,params:{org:i.slug}}},tasks:{key:"tasks",label:e("sidebar.navDestinations.spineTasks"),icon:d,isActive:s===re.tasks||s===oe.tasks,trackAs:"board",link:o?{to:oe.tasks,params:{org:i.slug,agentId:o,taskKey:void 0}}:{to:re.tasks,params:{org:i.slug,taskKey:void 0}}},monitor:{key:"monitor",label:e("sidebar.navDestinations.monitor"),icon:p,isActive:s===re.monitoring||s===oe.monitoring,trackAs:"monitor",link:o?{to:oe.monitoring,params:{org:i.slug,agentId:o}}:{to:re.monitoring,params:{org:i.slug}}},settings:{key:"settings",label:e("sidebar.navDestinations.settings"),icon:u,isActive:s===oe.settings,trackAs:Le,link:{to:oe.settings,params:{org:i.slug,agentId:o??""}}},files:{key:"files",label:e("sidebar.navDestinations.context"),icon:x,isActive:s===re.library||s===oe.library,trackAs:"files",link:o?{to:oe.library,params:{org:i.slug,agentId:o}}:{to:re.library,params:{org:i.slug}}}};a=Wi(!!o,c).map(h=>b[h]),t[0]=s,t[1]=i.slug,t[2]=r,t[3]=l?.metadata,t[4]=o,t[5]=e,t[6]=a}else a=t[6];return a}function Gi(t){const e=N.c(11),{onNavigate:i}=t,s=E(),o=Qi(),l=ns();let r;if(e[0]!==o||e[1]!==l||e[2]!==i||e[3]!==s){let c;e[5]!==l||e[6]!==i||e[7]!==s?(c=f=>n.jsx(Ne,{icon:f.icon,label:f.label,isActive:f.isActive,link:f.link,trailing:f.soon?n.jsx(Fn,{variant:"muted",children:s("common.soon")}):l(f.key)?n.jsx(Ge,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{fe("nav_destination_clicked",{destination:f.trackAs}),i?.()}},f.key),e[5]=l,e[6]=i,e[7]=s,e[8]=c):c=e[8],r=o.map(c),e[0]=o,e[1]=l,e[2]=i,e[3]=s,e[4]=r}else r=e[4];let a;return e[9]!==r?(a=n.jsx(te,{className:"gap-1",children:r}),e[9]=r,e[10]=a):a=e[10],a}function Ji(){const t=N.c(7),{org:e}=X(),{setOpenMobile:i}=it();let s;t[0]!==e.slug?(s={org:e.slug},t[0]=e.slug,t[1]=s):s=t[1];let o;t[2]!==i?(o=()=>{fe("nav_destination_clicked",{destination:Le,target:"org"}),i(!1)},t[2]=i,t[3]=o):o=t[3];let l;return t[4]!==s||t[5]!==o?(l={to:"/$org/settings",params:s,onClick:o},t[4]=s,t[5]=o,t[6]=l):l=t[6],l}function is(){const t=N.c(6),e=E(),i=Ji();let s;t[0]!==e?(s=e("sidebar.navDestinations.settings"),t[0]=e,t[1]=s):s=t[1];const o=s;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Bt,{size:15}),t[2]=l):l=t[2];let r;return t[3]!==o||t[4]!==i?(r=n.jsx(Qe,{...i,"aria-label":o,title:o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-lg text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground","data-tour":ke.settings,children:l}),t[3]=o,t[4]=i,t[5]=r):r=t[5],r}function Yi(){const t=N.c(14),e=E(),{org:i}=X(),{setOpenMobile:s}=it(),{status:o,connected:l,expired:r}=Un();if(!o.isSuccess||l)return null;let a;t[0]!==r||t[1]!==e?(a=e(r?"sidebar.linkClaude.relink":"sidebar.linkClaude.button"),t[0]=r,t[1]=e,t[2]=a):a=t[2];const c=a;let f;t[3]!==i.slug?(f={org:i.slug},t[3]=i.slug,t[4]=f):f=t[4];let m;t[5]!==s?(m=()=>s(!1),t[5]=s,t[6]=m):m=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(ot,{children:n.jsx("img",{src:Bn["claude-code"],alt:"",className:"size-4 object-contain"})}),t[7]=d):d=t[7];let p;t[8]!==c?(p=n.jsx("span",{children:c}),t[8]=c,t[9]=p):p=t[9];let u;return t[10]!==f||t[11]!==m||t[12]!==p?(u=n.jsx(we,{children:n.jsx(Ie,{asChild:!0,children:n.jsxs(Qe,{to:"/$org/settings/ai-providers",params:f,hash:Vn,onClick:m,children:[d,p]})})}),t[10]=f,t[11]=m,t[12]=p,t[13]=u):u=t[13],u}function Zi(t){const e=N.c(4),{showLinkClaude:i}=t;let s;e[0]!==i?(s=i&&n.jsx(Yi,{}),e[0]=i,e[1]=s):s=e[1];let o;return e[2]!==s?(o=n.jsx(te,{className:"gap-0.5",children:s}),e[2]=s,e[3]=o):o=e[3],o}function Xi(){const t=N.c(8),e=Tn(),i=!e;let s;t[0]!==i?(s=i&&n.jsx(Fi,{}),t[0]=i,t[1]=s):s=t[1];const o=!e;let l;t[2]!==o?(l=n.jsx(Zi,{showLinkClaude:o}),t[2]=o,t[3]=l):l=t[3];let r;t[4]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(te,{className:"gap-0.5",children:n.jsx(we,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(es,{})}),n.jsx(is,{}),n.jsx(ss,{})]})})}),t[4]=r):r=t[4];let a;return t[5]!==s||t[6]!==l?(a=n.jsxs(It,{className:"px-2 pb-3 gap-0.5",children:[s,l,r]}),t[5]=s,t[6]=l,t[7]=a):a=t[7],a}function eo(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(It,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(te,{children:n.jsx(we,{children:n.jsx(es,{})})})}),n.jsx(is,{}),n.jsx(ss,{})]})}),t[0]=e):e=t[0],e}function to(){const t=N.c(3),{setScope:e}=ze(),i=Kn();let s;return t[0]!==i||t[1]!==e?(s=()=>{const o=i!==void 0?"route_resolves_scope":null;fe("scope_cleared",{relocated:o!==null,reason:o}),e(null)},t[0]=i,t[1]=e,t[2]=s):s=t[2],s}function so(){const t=N.c(2),{org:e}=X();let i;return t[0]!==e.name?(i=n.jsx("div",{className:"flex min-w-0 flex-1 items-center py-1.5 pr-1.5 pl-2 md:h-[34px] md:py-0","data-tour":ke.switcher,children:n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground text-sm",children:e.name})}),t[0]=e.name,t[1]=i):i=t[1],i}function os(t){const e=N.c(14),{onNavigate:i}=t,s=E(),{org:o}=X(),{project:l}=ze(),r=to();if(!l){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(so,{}),e[0]=u):u=e[0],u}let a;e[1]!==o.name||e[2]!==s?(a=s("sidebar.scope.backTo",{name:o.name}),e[1]=o.name,e[2]=s,e[3]=a):a=e[3];const c=a;let f;e[4]!==r||e[5]!==i?(f=()=>{r(),i?.()},e[4]=r,e[5]=i,e[6]=f):f=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Ht,{size:16,className:"shrink-0 text-muted-foreground"}),e[7]=m):m=e[7];let d;e[8]!==l.title?(d=n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground text-sm",children:l.title}),e[8]=l.title,e[9]=d):d=e[9];let p;return e[10]!==c||e[11]!==f||e[12]!==d?(p=n.jsxs("button",{type:"button",title:c,"aria-label":c,onClick:f,className:"flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pr-1.5 pl-2 text-left transition-colors hover:bg-sidebar-accent md:h-[34px] md:py-0",children:[m,d]}),e[10]=c,e[11]=f,e[12]=d,e[13]=p):p=e[13],p}const ls=16;function no(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs(n.Fragment,{children:[n.jsx(os,{}),n.jsx(oo,{}),n.jsx(Pt,{})]}),t[0]=e):e=t[0],e}function io(t){const e=N.c(12),{onClose:i}=t,s=E();let o;e[0]!==i?(o=n.jsx(os,{onNavigate:i}),e[0]=i,e[1]=o):o=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Pt,{}),e[2]=l):l=e[2];let r;e[3]!==s?(r=s("sidebar.header.closeSidebar"),e[3]=s,e[4]=r):r=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Rt,{size:ls}),e[5]=a):a=e[5];let c;e[6]!==i||e[7]!==r?(c=n.jsx(Gt,{onClick:i,"aria-label":r,children:a}),e[6]=i,e[7]=r,e[8]=c):c=e[8];let f;return e[9]!==o||e[10]!==c?(f=n.jsxs(n.Fragment,{children:[o,l,c]}),e[9]=o,e[10]=c,e[11]=f):f=e[11],f}function oo(){const t=N.c(6),e=E(),{toggleSidebar:i}=it();let s;t[0]!==e?(s=e("page.collapseSidebar"),t[0]=e,t[1]=s):s=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Rt,{size:ls}),t[2]=o):o=t[2];let l;return t[3]!==s||t[4]!==i?(l=n.jsx(Gt,{"aria-label":s,onClick:i,className:"shrink-0 size-7",children:o}),t[3]=s,t[4]=i,t[5]=l):l=t[5],l}function lo(t){const e=N.c(27),{onNavigate:i}=t,s=E(),{project:o}=ze(),l=Jt(),r=yt(),a=Wn(),c=Dn(o),f=ns(),m=Qt(o?.id);if(!o)return null;let d;if(e[0]!==c.presence||e[1]!==m||e[2]!==o.metadata){const k=Qn(o.metadata),w=c.presence,$=Mn(k,w),_=m??En(o.metadata);d=new Set(Rn(_,$,m!==void 0?1:o.metadata.sidebarViewsVersion,m!==void 0?[]:Ln(o.metadata.sidebarViewsSeen,$))),e[0]=c.presence,e[1]=m,e[2]=o.metadata,e[3]=d}else d=e[3];const p=d;let u,x,b,h;if(e[4]!==a||e[5]!==f||e[6]!==r||e[7]!==l||e[8]!==i||e[9]!==o||e[10]!==p||e[11]!==s){h=[],p.has("site-editor")&&h.push({key:"site-editor",label:s("sidebar.projectNav.siteEditor"),icon:n.jsx(qt,{size:16}),panel:"site-editor",isActive:mo,dataTour:ke.siteEditor});const k={assets:{label:s("common.mainPanelTabs.assets"),icon:n.jsx(Nn,{size:16})},releases:{label:s("common.mainPanelTabs.releases"),icon:n.jsx(vn,{size:16})},hosting:{label:s("common.mainPanelTabs.hosting"),icon:n.jsx(ys,{size:16})},e2e:{label:s("common.mainPanelTabs.e2e"),icon:n.jsx(jn,{size:16})},calendar:{label:s("common.mainPanelTabs.calendar"),icon:n.jsx(gn,{size:16})},experiments:{label:s("common.mainPanelTabs.experiments"),icon:n.jsx(bn,{size:16})}};for(const _ of qn){if(!p.has(_))continue;const C=k[_];h.push({key:_,label:C.label,icon:C.icon,panel:_,isActive:I=>I===_})}for(const _ of Gn(Jn(o),(o.connections??[]).map(co))){if(_.toolName==="fetch_assets")continue;const C=Ss(_.connectionId,_.toolName),I=Yn({tabId:C,kind:"expanded",iconUrl:_.icon,connections:[]}),A=_.label||_.toolName,{IconComp:q}=hn(A);h.push({key:`pinned:${_.connectionId}:${_.toolName}`,label:A,icon:I.kind==="fallback"?n.jsx(q,{size:16}):n.jsx(Zn,{icon:I}),panel:C,isActive:B=>B===C})}p.has("automations")&&h.push({key:"automations",label:s("sidebar.projectNav.automations"),icon:n.jsx(Ot,{size:16}),panel:"automations",isActive:ao,dataTour:ke.automations});const w=r.startsWith(re.projects),$=ro;u=te,x="gap-1",b=h.map(_=>n.jsx(Ne,{icon:$(_),label:_.label,dataTour:_.dataTour,isActive:w&&_.isActive(a),trailing:f(_.panel)?n.jsx(Ge,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{fe("project_nav_clicked",{surface:_.key}),l(o.id,{panel:_.panel}),i?.()}},_.key)),e[4]=a,e[5]=f,e[6]=r,e[7]=l,e[8]=i,e[9]=o,e[10]=p,e[11]=s,e[12]=u,e[13]=x,e[14]=b,e[15]=h}else u=e[12],x=e[13],b=e[14],h=e[15];let g;e[16]!==u||e[17]!==x||e[18]!==b?(g=n.jsx(u,{className:x,children:b}),e[16]=u,e[17]=x,e[18]=b,e[19]=g):g=e[19];const y=g;if(h.length===0)return null;let j;e[20]!==s?(j=s("sidebar.projectNav.apps"),e[20]=s,e[21]=j):j=e[21];let v;e[22]!==j?(v=n.jsx("div",{className:"flex h-6 items-center px-2 group-data-[state=collapsed]/sidebar:hidden",children:n.jsx("span",{className:"truncate font-medium text-xs text-muted-foreground",children:j})}),e[22]=j,e[23]=v):v=e[23];let S;return e[24]!==y||e[25]!==v?(S=n.jsxs("div",{className:"flex flex-col gap-1",children:[v,y]}),e[24]=y,e[25]=v,e[26]=S):S=e[26],S}function ro(t){const e=Hn[t.panel];return n.jsx("span",{className:L("flex size-5 shrink-0 items-center justify-center rounded-md [&_svg]:size-3",e?e.tone:"bg-muted text-muted-foreground"),children:e?n.jsx(e.Icon,{size:12,className:"text-current"}):t.icon})}function ao(t){return t==="automations"||ks(t)!==null}function co(t){return t.connection_id}function mo(t){return!!t&&Ct(t)}const De={folders:[],preferences:ri,joinedAt:null};function uo(){const t=N.c(11),{org:e}=X(),i=Je();let s;t[0]!==e.id?(s=Ee.projectSidebar(e.id),t[0]=e.id,t[1]=s):s=t[1];const o=s;let l;t[2]!==e.slug||t[3]!==i||t[4]!==o?(l=f=>ai.subscribe(e.slug,()=>{i.invalidateQueries({queryKey:o}),f()},()=>i.invalidateQueries({queryKey:o})),t[2]=e.slug,t[3]=i,t[4]=o,t[5]=l):l=t[5],ae.useSyncExternalStore(l,po,fo);let r;t[6]!==e.slug?(r=async()=>await Ns(e.slug,"SIDEBAR_GET",{}),t[6]=e.slug,t[7]=r):r=t[7];let a;t[8]!==o||t[9]!==r?(a={queryKey:o,queryFn:r,staleTime:6e4},t[8]=o,t[9]=r,t[10]=a):a=t[10];const{data:c}=Ye(a);return c??De}function fo(){return 0}function po(){return 0}function rs(t,e,i){const s=N.c(25),{org:o}=X(),l=Je();let r,a,c,f;s[0]!==o.id||s[1]!==l?(r=Ee.projectSidebar(o.id),a=()=>l.getQueryData(r)??De,f=_s,c=[...r,"write"],s[0]=o.id,s[1]=l,s[2]=r,s[3]=a,s[4]=c,s[5]=f):(r=s[2],a=s[3],c=s[4],f=s[5]);let m;s[6]!==t||s[7]!==a||s[8]!==i?(m=async b=>i(t(a())),s[6]=t,s[7]=a,s[8]=i,s[9]=m):m=s[9];let d;s[10]!==r||s[11]!==t||s[12]!==e||s[13]!==l?(d=b=>{const h=l.getQueryData(r),g=h??De;return l.setQueryData(r,e(g,b(t(g)))),{prev:h}},s[10]=r,s[11]=t,s[12]=e,s[13]=l,s[14]=d):d=s[14];let p,u;s[15]!==r||s[16]!==l?(p=(b,h,g)=>{l.setQueryData(r,g?.prev??De)},u=()=>{l.isMutating({mutationKey:[...r,"write"]})===1&&l.invalidateQueries({queryKey:r})},s[15]=r,s[16]=l,s[17]=p,s[18]=u):(p=s[17],u=s[18]);let x;return s[19]!==c||s[20]!==m||s[21]!==d||s[22]!==p||s[23]!==u?(x={mutationKey:c,mutationFn:m,onMutate:d,onError:p,onSettled:u},s[19]=c,s[20]=m,s[21]=d,s[22]=p,s[23]=u,s[24]=x):x=s[24],f(x)}function xo(){const t=N.c(2),e=Ze();let i;return t[0]!==e?(i=async s=>await e.call("SIDEBAR_PREFERENCES_SET",s),t[0]=e,t[1]=i):i=t[1],rs(bo,ho,i)}function ho(t,e){return{...t,preferences:e}}function bo(t){return t.preferences}function go(){const t=N.c(2),e=Ze();let i;return t[0]!==e?(i=async s=>(await e.call("PROJECT_FOLDERS_SET",{folders:s})).folders,t[0]=e,t[1]=i):i=t[1],rs(vo,jo,i)}function jo(t,e){return{...t,folders:e}}function vo(t){return t.folders}function So({projects:t,folders:e,preferences:i}){const s=new Map(t.map(u=>[u.id,u])),o=new Set(i.pinned),l=new Set(i.hidden),r=new Set(i.hiddenFolders),a=new Map;for(const u of e)for(const x of u.projectIds)a.set(x,u.id);const c=u=>u.map(x=>s.get(x)).filter(x=>!!x),f=c(i.pinned),m=u=>!o.has(u.id)&&!l.has(u.id),d=[],p=[];for(const u of e){const x=c(u.projectIds).filter(m);(r.has(u.id)?p:d).push({folder:u,projects:x})}return{pinned:f,folders:d,loose:t.filter(u=>!a.has(u.id)&&m(u)),hiddenFolders:p,hidden:t.filter(u=>l.has(u.id)&&!o.has(u.id))}}function pt(t,e,i){const s=l=>l.filter(r=>r!==e),o={...t,pinned:s(t.pinned),hidden:s(t.hidden),dismissed:s(t.dismissed)};return i&&(o[i]=[...o[i],e]),o}function yo(t,e,i){const s=t.hiddenFolders.filter(o=>o!==e);return{...t,hiddenFolders:i?[...s,e]:s}}function ko(t,e,i){return[...t,{id:e,name:i,projectIds:[]}]}function No(t,e,i){return t.map(s=>s.id===e?{...s,name:i}:s)}function Ve(t,e){return t.filter(i=>i.id!==e)}function xt(t,e,i){return t.map(s=>{const o=s.projectIds.filter(l=>l!==e);return{...s,projectIds:s.id===i?[...o,e]:o}})}function _o(t){const e=N.c(97),{open:i,onOpenChange:s,projects:o,folders:l,preferences:r,canManage:a,onPin:c,onHide:f,onHideFolder:m,onMove:d,onRequestFolderName:p,onDeleteFolder:u}=t,x=E();let b,h,g,y,j,v,S,k,w,$;if(e[0]!==a||e[1]!==l||e[2]!==u||e[3]!==f||e[4]!==m||e[5]!==d||e[6]!==s||e[7]!==c||e[8]!==p||e[9]!==i||e[10]!==r.hidden||e[11]!==r.hiddenFolders||e[12]!==r.pinned||e[13]!==o||e[14]!==x){const A=new Map(o.map(Io));let q;e[25]!==l?(q=new Set(l.flatMap(Co)),e[25]=l,e[26]=q):q=e[26];const B=q;let J;e[27]!==r.pinned?(J=new Set(r.pinned),e[27]=r.pinned,e[28]=J):J=e[28];const G=J;let V;e[29]!==r.hidden?(V=new Set(r.hidden),e[29]=r.hidden,e[30]=V):V=e[30];const ee=V;let W;e[31]!==r.hiddenFolders?(W=new Set(r.hiddenFolders),e[31]=r.hiddenFolders,e[32]=W):W=e[32];const K=W;let Y;e[33]!==a||e[34]!==l||e[35]!==ee||e[36]!==K||e[37]!==f||e[38]!==d||e[39]!==c||e[40]!==p||e[41]!==G||e[42]!==x?(Y=(z,R)=>{const P=G.has(z.id),O=R!==null&&K.has(R.id)&&!P,D=!ee.has(z.id)&&!O;return n.jsxs("li",{className:"group/row flex h-11 items-center gap-3 px-3 transition-colors hover:bg-accent",children:[n.jsx("span",{className:L("flex size-4 shrink-0 items-center justify-center",!D&&"opacity-50"),children:n.jsx(Xt,{icon:z.icon,name:z.title})}),n.jsx("span",{className:L("min-w-0 flex-1 truncate text-sm",D?"text-foreground":"text-muted-foreground"),children:z.title}),a&&n.jsx("span",{className:"opacity-0 transition-opacity group-hover/row:opacity-100 has-[[data-state=open]]:opacity-100",children:n.jsx(Po,{project:z,folder:R,folders:l,onMove:d,onRequestFolderName:p})}),n.jsx("span",{className:L("transition-opacity",!P&&"opacity-0 group-hover/row:opacity-100"),children:n.jsx(We,{label:x(P?"sidebar.projects.unpin":"sidebar.projects.pin"),variant:P?"secondary":"ghost","aria-pressed":P,onClick:()=>c(z.id,!P),children:P?n.jsx(To,{}):n.jsx(Lt,{size:14})})}),n.jsx(ui,{checked:D,disabled:O,"aria-label":`${x("sidebar.customize.showInSidebar")}: ${z.title}`,title:O?x("sidebar.customize.stateWithFolder"):void 0,onCheckedChange:H=>f(z.id,H!==!0)})]},z.id)},e[33]=a,e[34]=l,e[35]=ee,e[36]=K,e[37]=f,e[38]=d,e[39]=c,e[40]=p,e[41]=G,e[42]=x,e[43]=Y):Y=e[43];const U=Y;let Q;e[44]!==a||e[45]!==K||e[46]!==u||e[47]!==m||e[48]!==p||e[49]!==U||e[50]!==x?(Q=(z,R,P,O)=>{const D=P!==null&&K.has(P.id);return n.jsxs("section",{className:"flex flex-col gap-2",children:[n.jsxs("div",{className:"flex h-7 items-center gap-2",children:[n.jsx("h3",{className:L("min-w-0 flex-1 truncate text-sm font-medium",D?"text-muted-foreground":"text-foreground"),children:R}),P&&n.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[x("sidebar.customize.showFolder"),n.jsx(fi,{checked:!D,onCheckedChange:H=>m(P.id,!H)})]}),P&&a&&n.jsxs(Xe,{children:[n.jsx(et,{asChild:!0,children:n.jsx(We,{label:x("sidebar.customize.folderOptions"),children:n.jsx(tt,{size:14})})}),n.jsxs(st,{align:"end",children:[n.jsx(pe,{onSelect:()=>p({kind:"rename",folderId:P.id,name:P.name}),children:x("sidebar.projects.renameFolder")}),n.jsx(pe,{variant:"destructive",onSelect:()=>u(P.id),children:x("sidebar.projects.deleteFolder")})]})]})]}),n.jsx("ul",{className:"flex flex-col divide-y divide-border overflow-hidden surface",children:O.length===0?n.jsx("li",{className:"flex h-11 items-center px-3 text-sm text-muted-foreground",children:x("sidebar.customize.empty")}):O.map(H=>U(H,P))})]},z)},e[44]=a,e[45]=K,e[46]=u,e[47]=m,e[48]=p,e[49]=U,e[50]=x,e[51]=Q):Q=e[51];const Z=Q;if(e[52]!==a||e[53]!==Z||e[54]!==s||e[55]!==p||e[56]!==i||e[57]!==B||e[58]!==o||e[59]!==x){let z;e[69]!==B?(z=H=>!B.has(H.id),e[69]=B,e[70]=z):z=e[70];const R=o.filter(z);h=kt,w=i,$=s,b=Nt,v="flex max-h-[85vh] flex-col gap-5 sm:max-w-2xl",S=$o;let P;e[71]!==x?(P=x("sidebar.projects.customize"),e[71]=x,e[72]=P):P=e[72];let O;e[73]!==P?(O=n.jsx(_t,{children:P}),e[73]=P,e[74]=O):O=e[74];let D;e[75]!==a||e[76]!==p||e[77]!==x?(D=a&&n.jsxs(Pe,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>p({kind:"create"}),children:[n.jsx(He,{size:14}),x("sidebar.projects.newFolder")]}),e[75]=a,e[76]=p,e[77]=x,e[78]=D):D=e[78],e[79]!==O||e[80]!==D?(k=n.jsxs(wt,{className:"flex-row items-center justify-between gap-4 pr-8",children:[O,D]}),e[79]=O,e[80]=D,e[81]=k):k=e[81],g="-mx-6 flex min-h-0 flex-col gap-6 overflow-y-auto px-6 pb-1",y=Z("loose",x("sidebar.projects.heading"),null,R),e[52]=a,e[53]=Z,e[54]=s,e[55]=p,e[56]=i,e[57]=B,e[58]=o,e[59]=x,e[60]=b,e[61]=h,e[62]=g,e[63]=y,e[64]=v,e[65]=S,e[66]=k,e[67]=w,e[68]=$}else b=e[60],h=e[61],g=e[62],y=e[63],v=e[64],S=e[65],k=e[66],w=e[67],$=e[68];j=l.map(z=>Z(z.id,z.name,z,z.projectIds.map(R=>A.get(R)).filter(wo))),e[0]=a,e[1]=l,e[2]=u,e[3]=f,e[4]=m,e[5]=d,e[6]=s,e[7]=c,e[8]=p,e[9]=i,e[10]=r.hidden,e[11]=r.hiddenFolders,e[12]=r.pinned,e[13]=o,e[14]=x,e[15]=b,e[16]=h,e[17]=g,e[18]=y,e[19]=j,e[20]=v,e[21]=S,e[22]=k,e[23]=w,e[24]=$}else b=e[15],h=e[16],g=e[17],y=e[18],j=e[19],v=e[20],S=e[21],k=e[22],w=e[23],$=e[24];let _;e[82]!==g||e[83]!==y||e[84]!==j?(_=n.jsxs("div",{className:g,children:[y,j]}),e[82]=g,e[83]=y,e[84]=j,e[85]=_):_=e[85];let C;e[86]!==b||e[87]!==v||e[88]!==S||e[89]!==k||e[90]!==_?(C=n.jsxs(b,{className:v,onOpenAutoFocus:S,children:[k,_]}),e[86]=b,e[87]=v,e[88]=S,e[89]=k,e[90]=_,e[91]=C):C=e[91];let I;return e[92]!==h||e[93]!==C||e[94]!==w||e[95]!==$?(I=n.jsx(h,{open:w,onOpenChange:$,children:C}),e[92]=h,e[93]=C,e[94]=w,e[95]=$,e[96]=I):I=e[96],I}function wo(t){return!!t}function $o(t){return t.preventDefault()}function Co(t){return t.projectIds}function Io(t){return[t.id,t]}function Po(t){const e=N.c(41),{project:i,folder:s,folders:o,onMove:l,onRequestFolderName:r}=t,a=E();let c;e[0]!==a?(c=a("sidebar.customize.projectOptions"),e[0]=a,e[1]=c):c=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(tt,{size:14}),e[2]=f):f=e[2];let m;e[3]!==c?(m=n.jsx(et,{asChild:!0,children:n.jsx(We,{label:c,children:f})}),e[3]=c,e[4]=m):m=e[4];let d;e[5]!==a?(d=a("sidebar.projects.moveTo"),e[5]=a,e[6]=d):d=e[6];let p;e[7]!==d?(p=n.jsx(ws,{children:d}),e[7]=d,e[8]=p):p=e[8];let u;if(e[9]!==s?.id||e[10]!==o||e[11]!==l||e[12]!==i.id){let S;e[14]!==s?.id||e[15]!==l||e[16]!==i.id?(S=k=>n.jsx(pe,{disabled:k.id===s?.id,onSelect:()=>l(i.id,k.id),children:k.name},k.id),e[14]=s?.id,e[15]=l,e[16]=i.id,e[17]=S):S=e[17],u=o.map(S),e[9]=s?.id,e[10]=o,e[11]=l,e[12]=i.id,e[13]=u}else u=e[13];let x;e[18]!==s||e[19]!==l||e[20]!==i.id||e[21]!==a?(x=s&&n.jsx(pe,{onSelect:()=>l(i.id,null),children:a("sidebar.projects.noFolder")}),e[18]=s,e[19]=l,e[20]=i.id,e[21]=a,e[22]=x):x=e[22];let b;e[23]!==r||e[24]!==i.id?(b=()=>r({kind:"create",projectId:i.id}),e[23]=r,e[24]=i.id,e[25]=b):b=e[25];let h;e[26]!==a?(h=a("sidebar.projects.newFolder"),e[26]=a,e[27]=h):h=e[27];let g;e[28]!==b||e[29]!==h?(g=n.jsx(pe,{onSelect:b,children:h}),e[28]=b,e[29]=h,e[30]=g):g=e[30];let y;e[31]!==g||e[32]!==u||e[33]!==x?(y=n.jsxs($s,{children:[u,x,g]}),e[31]=g,e[32]=u,e[33]=x,e[34]=y):y=e[34];let j;e[35]!==y||e[36]!==p?(j=n.jsx(st,{align:"end",children:n.jsxs(Cs,{children:[p,y]})}),e[35]=y,e[36]=p,e[37]=j):j=e[37];let v;return e[38]!==j||e[39]!==m?(v=n.jsxs(Xe,{children:[m,j]}),e[38]=j,e[39]=m,e[40]=v):v=e[40],v}function To(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Lt,{size:14}),t[0]=e):e=t[0];let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("span",{className:"relative flex size-3.5",children:[e,n.jsx("svg",{viewBox:"0 0 14 14",className:"absolute inset-0 size-3.5","aria-hidden":"true",children:n.jsx("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"12.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})]}),t[1]=i):i=t[1],i}function zo(t){const e=N.c(10),{request:i,onClose:s,onSave:o}=t,l=i!==null;let r;e[0]!==s?(r=f=>!f&&s(),e[0]=s,e[1]=r):r=e[1];let a;e[2]!==s||e[3]!==o||e[4]!==i?(a=i&&n.jsx(Ao,{request:i,onClose:s,onSave:o},i.kind==="rename"?i.folderId:"create"),e[2]=s,e[3]=o,e[4]=i,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==a?(c=n.jsx(kt,{open:l,onOpenChange:r,children:a}),e[6]=l,e[7]=r,e[8]=a,e[9]=c):c=e[9],c}function Ao(t){const e=N.c(39),{request:i,onClose:s,onSave:o}=t,l=E(),[r,a]=ae.useState(i.kind==="rename"?i.name:"");let c;e[0]!==r?(c=r.trim(),e[0]=r,e[1]=c):c=e[1];const f=c;let m;e[2]!==s||e[3]!==o||e[4]!==i||e[5]!==f?(m=_=>{_.preventDefault(),f&&(o(i,f),s())},e[2]=s,e[3]=o,e[4]=i,e[5]=f,e[6]=m):m=e[6];const d=i.kind==="rename"?"sidebar.projects.renameFolder":"sidebar.projects.newFolder";let p;e[7]!==l||e[8]!==d?(p=l(d),e[7]=l,e[8]=d,e[9]=p):p=e[9];let u;e[10]!==p?(u=n.jsx(wt,{children:n.jsx(_t,{children:p})}),e[10]=p,e[11]=u):u=e[11];let x;e[12]!==l?(x=l("sidebar.projects.folderName"),e[12]=l,e[13]=x):x=e[13];let b;e[14]!==l?(b=l("sidebar.projects.folderName"),e[14]=l,e[15]=b):b=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=_=>a(_.target.value),e[16]=h):h=e[16];let g;e[17]!==r||e[18]!==x||e[19]!==b?(g=n.jsx(Is,{autoFocus:!0,value:r,maxLength:ci,placeholder:x,"aria-label":b,onChange:h}),e[17]=r,e[18]=x,e[19]=b,e[20]=g):g=e[20];let y;e[21]!==l?(y=l("sidebar.projects.folderCancel"),e[21]=l,e[22]=y):y=e[22];let j;e[23]!==s||e[24]!==y?(j=n.jsx(Pe,{type:"button",variant:"ghost",onClick:s,children:y}),e[23]=s,e[24]=y,e[25]=j):j=e[25];const v=!f;let S;e[26]!==l?(S=l("sidebar.projects.folderSave"),e[26]=l,e[27]=S):S=e[27];let k;e[28]!==v||e[29]!==S?(k=n.jsx(Pe,{type:"submit",disabled:v,children:S}),e[28]=v,e[29]=S,e[30]=k):k=e[30];let w;e[31]!==j||e[32]!==k?(w=n.jsxs(Ps,{children:[j,k]}),e[31]=j,e[32]=k,e[33]=w):w=e[33];let $;return e[34]!==w||e[35]!==m||e[36]!==u||e[37]!==g?($=n.jsx(Nt,{className:"sm:max-w-sm",children:n.jsxs("form",{className:"flex flex-col gap-4",onSubmit:m,children:[u,g,w]})}),e[34]=w,e[35]=m,e[36]=u,e[37]=g,e[38]=$):$=e[38],$}function Fo(t){const e=t.target.closest("[data-context-id]")?.getAttribute("data-context-id");return e?.startsWith("project:")?{kind:"project",id:e.slice(8)}:e?.startsWith("folder:")?{kind:"folder",id:e.slice(7)}:{kind:"none"}}function Oo(t){const e=N.c(8),{locator:i}=X(),s=Ze(),{data:o}=Te.useSession();let l;e[0]!==i||e[1]!==s?(l=li(i,s),e[0]=i,e[1]=s,e[2]=l):l=e[2];const{data:r}=Ye(l);let a,c;if(e[3]!==r||e[4]!==t||e[5]!==o?.user?.id){c=Symbol.for("react.early_return_sentinel");e:{if(a=new Map,!r){c=a;break e}const f=di(t);for(const m of oi(r.items,o?.user?.id)){const d=mi(m,f);d&&a.set(d.id,(a.get(d.id)??0)+1)}}e[3]=r,e[4]=t,e[5]=o?.user?.id,e[6]=a,e[7]=c}else a=e[6],c=e[7];return c!==Symbol.for("react.early_return_sentinel")?c:a}function Do(t){const e=N.c(5),{label:i,action:s}=t;let o;e[0]!==i?(o=n.jsx("p",{className:"font-medium text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsxs("div",{className:"flex h-6 items-center justify-between gap-2 px-2",children:[o,s]}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function as(t){const e=N.c(24),{project:i,onNavigate:s,waiting:o,trailing:l,children:r}=t,a=o===void 0?0:o,c=E(),f=Jt();let m;e[0]!==c||e[1]!==a?(m=a>0?c("sidebar.projects.waiting",{count:a}):null,e[0]=c,e[1]=a,e[2]=m):m=e[2];const d=m;let p;e[3]!==i.icon||e[4]!==i.title?(p=n.jsx(Xt,{icon:i.icon,name:i.title}),e[3]=i.icon,e[4]=i.title,e[5]=p):p=e[5];const u=i.title,x=`project:${i.id}`;let b;e[6]!==l||e[7]!==d?(b=d?n.jsx("span",{title:d,className:"mr-1 size-2 rounded-full bg-warning group-hover/menu-item:invisible"}):l,e[6]=l,e[7]=d,e[8]=b):b=e[8];const h=d&&"font-semibold";let g;e[9]!==h?(g=L(h),e[9]=h,e[10]=g):g=e[10];const y=d?`${i.title}, ${d}`:void 0;let j;e[11]!==f||e[12]!==s||e[13]!==i.id?(j=()=>{fe("sidebar_project_clicked"),f(i.id),s?.()},e[11]=f,e[12]=s,e[13]=i.id,e[14]=j):j=e[14];let v;return e[15]!==r||e[16]!==i.title||e[17]!==j||e[18]!==p||e[19]!==x||e[20]!==b||e[21]!==g||e[22]!==y?(v=n.jsx(Ne,{icon:p,label:u,contextId:x,trailing:b,className:g,ariaLabel:y,onSelect:j,children:r}),e[15]=r,e[16]=i.title,e[17]=j,e[18]=p,e[19]=x,e[20]=b,e[21]=g,e[22]=y,e[23]=v):v=e[23],v}function ht(t){const e=N.c(26),{label:i,contextId:s,folderId:o,projects:l,onNavigate:r,actions:a,waitingByProject:c}=t,{locator:f}=X();let m;e[0]!==o||e[1]!==f?(m=As.sidebarSectionOpen(f,o??"loose"),e[0]=o,e[1]=f,e[2]=m):m=e[2];const[d,p]=zs(m,!0),u=d?Yt:$t;let x;e[3]!==p?(x=()=>p(Mo),e[3]=p,e[4]=x):x=e[4];let b;e[5]!==i?(b=n.jsx("span",{className:"truncate font-medium text-xs text-muted-foreground transition-colors group-hover/folder:text-sidebar-foreground",children:i}),e[5]=i,e[6]=b):b=e[6];let h;e[7]!==u?(h=n.jsx(u,{size:12,className:"shrink-0 text-muted-foreground"}),e[7]=u,e[8]=h):h=e[8];let g;e[9]!==d||e[10]!==x||e[11]!==b||e[12]!==h?(g=n.jsxs("button",{type:"button","aria-expanded":d,onClick:x,className:"group/folder flex min-w-0 items-center gap-1 rounded-md text-left",children:[b,h]}),e[9]=d,e[10]=x,e[11]=b,e[12]=h,e[13]=g):g=e[13];let y;e[14]!==a||e[15]!==g?(y=n.jsxs("div",{className:"flex h-6 items-center justify-between gap-2 px-2",children:[g,a]}),e[14]=a,e[15]=g,e[16]=y):y=e[16];let j;e[17]!==r||e[18]!==d||e[19]!==l||e[20]!==c?(j=d&&l.length>0&&n.jsx(te,{className:"gap-1",children:l.map(S=>n.jsx(as,{project:S,onNavigate:r,waiting:c.get(S.id)},S.id))}),e[17]=r,e[18]=d,e[19]=l,e[20]=c,e[21]=j):j=e[21];let v;return e[22]!==s||e[23]!==y||e[24]!==j?(v=n.jsxs("div",{className:"flex flex-col gap-1","data-context-id":s,children:[y,j]}),e[22]=s,e[23]=y,e[24]=j,e[25]=v):v=e[25],v}function Mo(t){return!t}function Eo(t){const e=N.c(141),{onNavigate:i}=t,s=E(),o=nt(),{granted:l}=Ts("agents:manage"),{projects:r}=ze(),a=Wt(),c=uo(),f=Oo(r),m=xo(),d=go();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={kind:"none"},e[0]=p):p=e[0];const[u,x]=ae.useState(p),[b,h]=ae.useState(null),[g,y]=ae.useState(!1);if(a||r.length===0&&!l)return null;let j,v,S,k,w,$,_,C,I,A,q,B,J,G,V,ee,W,K,Y,U;if(e[1]!==l||e[2]!==o||e[3]!==i||e[4]!==r||e[5]!==c.folders||e[6]!==c.preferences||e[7]!==s||e[8]!==u.id||e[9]!==u.kind||e[10]!==d||e[11]!==m||e[12]!==f){const M=So({projects:r,folders:c.folders,preferences:c.preferences});w=M.hidden.length+M.hiddenFolders.reduce(qo,0);let ie;e[33]!==m?(ie=(T,F)=>{fe(F?"sidebar_project_pinned":"sidebar_project_unpinned"),m.mutate(le=>pt(le,T,F?"pinned":null))},e[33]=m,e[34]=ie):ie=e[34],A=ie;let he;e[35]!==m?(he=(T,F)=>{fe(F?"sidebar_project_hidden":"sidebar_project_shown"),m.mutate(le=>pt(le,T,F?"hidden":null))},e[35]=m,e[36]=he):he=e[36],_=he;let de;e[37]!==m?(de=(T,F)=>m.mutate(le=>yo(le,T,F)),e[37]=m,e[38]=de):de=e[38],C=de;let me;e[39]!==d?(me=(T,F)=>d.mutate(le=>xt(le,T,F)),e[39]=d,e[40]=me):me=e[40],I=me;let be;e[41]!==d?(be=(T,F)=>{if(T.kind==="rename"){d.mutate(qe=>No(qe,T.folderId,F));return}const le=crypto.randomUUID();fe("sidebar_folder_created"),d.mutate(qe=>{const at=ko(qe,le,F);return T.projectId?xt(at,T.projectId,le):at})},e[41]=d,e[42]=be):be=e[42],B=be;let ye;e[43]!==c.preferences.pinned?(ye=new Set(c.preferences.pinned),e[43]=c.preferences.pinned,e[44]=ye):ye=e[44],q=ye;let ge;e[45]!==c.preferences.hidden?(ge=new Set(c.preferences.hidden),e[45]=c.preferences.hidden,e[46]=ge):ge=e[46],$=ge;let je;e[47]!==c.folders||e[48]!==u.id||e[49]!==u.kind?(je=u.kind==="project"?c.folders.find(T=>T.projectIds.includes(u.id))?.id:void 0,e[47]=c.folders,e[48]=u.id,e[49]=u.kind,e[50]=je):je=e[50],k=je;let ve;e[51]!==c.folders||e[52]!==u.id||e[53]!==u.kind?(ve=u.kind==="folder"?c.folders.find(T=>T.id===u.id):void 0,e[51]=c.folders,e[52]=u.id,e[53]=u.kind,e[54]=ve):ve=e[54],U=ve;let _e;e[55]===Symbol.for("react.memo_cache_sentinel")?(_e=()=>y(!0),e[55]=_e):_e=e[55];let $e;e[56]!==s?($e=s("sidebar.projects.customize"),e[56]=s,e[57]=$e):$e=e[57];let Ae;e[58]!==$e?(Ae=n.jsx(ue,{onSelect:_e,children:$e}),e[58]=$e,e[59]=Ae):Ae=e[59],S=Ae;let Fe;e[60]!==l||e[61]!==C||e[62]!==I||e[63]!==s||e[64]!==d?(Fe=T=>n.jsxs("span",{className:"-mr-1 flex shrink-0 items-center gap-0.5",children:[n.jsxs(Xe,{children:[n.jsx(et,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":s(T?"sidebar.customize.folderOptions":"sidebar.projects.more"),title:s(T?"sidebar.customize.folderOptions":"sidebar.projects.more"),className:"flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:n.jsx(tt,{size:14})})}),n.jsxs(st,{align:"start",children:[T&&n.jsx(pe,{onSelect:()=>C(T.id,!0),children:s("sidebar.projects.hideFolder")}),T&&l&&n.jsxs(n.Fragment,{children:[n.jsx(pe,{onSelect:()=>h({kind:"rename",folderId:T.id,name:T.name}),children:s("sidebar.projects.renameFolder")}),n.jsx(pe,{variant:"destructive",onSelect:()=>d.mutate(F=>Ve(F,T.id)),children:s("sidebar.projects.deleteFolder")})]}),T&&n.jsx(Fs,{}),l&&n.jsx(pe,{onSelect:()=>h({kind:"create"}),children:s("sidebar.projects.newFolder")}),n.jsx(pe,{onSelect:()=>y(!0),children:s("sidebar.projects.customize")})]})]}),l&&n.jsx("button",{type:"button","aria-label":s("projects.home.newProject"),title:s("projects.home.newProject"),onClick:()=>Zt("sidebar",T?{onCreated:F=>I(F,T.id)}:void 0),className:"flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:n.jsx(He,{size:14})})]}),e[60]=l,e[61]=C,e[62]=I,e[63]=s,e[64]=d,e[65]=Fe):Fe=e[65];const lt=Fe;let Oe;e[66]!==i||e[67]!==f?(Oe=T=>T.map(F=>n.jsx(as,{project:F,onNavigate:i,waiting:f.get(F.id)},F.id)),e[66]=i,e[67]=f,e[68]=Oe):Oe=e[68];const rt=Oe;v=si,j=ni,Y=!0,J="flex flex-col gap-4",G=ke.projects,e[69]===Symbol.for("react.memo_cache_sentinel")?(V=T=>x(Fo(T)),e[69]=V):V=e[69],ee=M.pinned.length>0&&n.jsxs("div",{className:"flex flex-col gap-1",children:[!o&&n.jsx(Do,{label:s("sidebar.projects.pinned")}),n.jsx(te,{className:"gap-1",children:rt(M.pinned)})]}),W=o?n.jsxs(te,{className:"gap-1",children:[rt([...M.folders.flatMap(Lo),...M.loose]),l&&n.jsx(Ne,{icon:n.jsx(He,{size:16}),label:s("projects.home.newProject"),onSelect:Ro})]}):n.jsx(ht,{label:s("sidebar.projects.heading"),projects:M.loose,onNavigate:i,waitingByProject:f,actions:lt(null)}),K=!o&&M.folders.map(T=>{const{folder:F,projects:le}=T;return n.jsx(ht,{label:F.name,contextId:`folder:${F.id}`,folderId:F.id,projects:le,onNavigate:i,waitingByProject:f,actions:lt(F)},F.id)}),e[1]=l,e[2]=o,e[3]=i,e[4]=r,e[5]=c.folders,e[6]=c.preferences,e[7]=s,e[8]=u.id,e[9]=u.kind,e[10]=d,e[11]=m,e[12]=f,e[13]=j,e[14]=v,e[15]=S,e[16]=k,e[17]=w,e[18]=$,e[19]=_,e[20]=C,e[21]=I,e[22]=A,e[23]=q,e[24]=B,e[25]=J,e[26]=G,e[27]=V,e[28]=ee,e[29]=W,e[30]=K,e[31]=Y,e[32]=U}else j=e[13],v=e[14],S=e[15],k=e[16],w=e[17],$=e[18],_=e[19],C=e[20],I=e[21],A=e[22],q=e[23],B=e[24],J=e[25],G=e[26],V=e[27],ee=e[28],W=e[29],K=e[30],Y=e[31],U=e[32];let Q;e[70]!==o||e[71]!==w||e[72]!==s?(Q=w>0&&!o&&n.jsx(te,{children:n.jsx(Ne,{icon:n.jsx(_n,{size:16}),label:s("sidebar.projects.hiddenCount",{count:w}),className:"text-muted-foreground",onSelect:()=>y(!0)})}),e[70]=o,e[71]=w,e[72]=s,e[73]=Q):Q=e[73];let Z;e[74]!==J||e[75]!==G||e[76]!==V||e[77]!==ee||e[78]!==W||e[79]!==K||e[80]!==Q?(Z=n.jsxs("div",{className:J,"data-tour":G,onContextMenu:V,children:[ee,W,K,Q]}),e[74]=J,e[75]=G,e[76]=V,e[77]=ee,e[78]=W,e[79]=K,e[80]=Q,e[81]=Z):Z=e[81];let z;e[82]!==j||e[83]!==Z||e[84]!==Y?(z=n.jsx(j,{asChild:Y,children:Z}),e[82]=j,e[83]=Z,e[84]=Y,e[85]=z):z=e[85];let R;e[86]!==l||e[87]!==S||e[88]!==k||e[89]!==$||e[90]!==_||e[91]!==I||e[92]!==A||e[93]!==q||e[94]!==c.folders||e[95]!==s||e[96]!==u.id||e[97]!==u.kind?(R=u.kind==="project"&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{onSelect:()=>A(u.id,!q.has(u.id)),children:s(q.has(u.id)?"sidebar.projects.unpin":"sidebar.projects.pin")}),n.jsx(ue,{onSelect:()=>_(u.id,!$.has(u.id)),children:s($.has(u.id)?"sidebar.projects.show":"sidebar.projects.hide")}),l&&n.jsxs(Xn,{children:[n.jsx(ei,{children:s("sidebar.projects.moveTo")}),n.jsxs(ti,{className:"w-48",children:[c.folders.map(M=>n.jsx(ue,{disabled:M.id===k,onSelect:()=>I(u.id,M.id),children:M.name},M.id)),k&&n.jsx(ue,{onSelect:()=>I(u.id,null),children:s("sidebar.projects.noFolder")}),c.folders.length>0&&n.jsx(Ue,{}),n.jsx(ue,{onSelect:()=>h({kind:"create",projectId:u.id}),children:s("sidebar.projects.newFolder")})]})]}),n.jsx(Ue,{}),S]}),e[86]=l,e[87]=S,e[88]=k,e[89]=$,e[90]=_,e[91]=I,e[92]=A,e[93]=q,e[94]=c.folders,e[95]=s,e[96]=u.id,e[97]=u.kind,e[98]=R):R=e[98];let P;e[99]!==l||e[100]!==S||e[101]!==C||e[102]!==s||e[103]!==u.kind||e[104]!==U||e[105]!==d?(P=u.kind==="folder"&&U&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{onSelect:()=>C(U.id,!0),children:s("sidebar.projects.hideFolder")}),l&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{onSelect:()=>h({kind:"rename",folderId:U.id,name:U.name}),children:s("sidebar.projects.renameFolder")}),n.jsx(ue,{variant:"destructive",onSelect:()=>d.mutate(M=>Ve(M,U.id)),children:s("sidebar.projects.deleteFolder")})]}),n.jsx(Ue,{}),l&&n.jsx(ue,{onSelect:()=>h({kind:"create"}),children:s("sidebar.projects.newFolder")}),S]}),e[99]=l,e[100]=S,e[101]=C,e[102]=s,e[103]=u.kind,e[104]=U,e[105]=d,e[106]=P):P=e[106];let O;e[107]!==l||e[108]!==S||e[109]!==s||e[110]!==u.kind?(O=u.kind==="none"&&n.jsxs(n.Fragment,{children:[l&&n.jsx(ue,{onSelect:()=>h({kind:"create"}),children:s("sidebar.projects.newFolder")}),S]}),e[107]=l,e[108]=S,e[109]=s,e[110]=u.kind,e[111]=O):O=e[111];let D;e[112]!==R||e[113]!==P||e[114]!==O?(D=n.jsxs(ii,{className:"w-52",children:[R,P,O]}),e[112]=R,e[113]=P,e[114]=O,e[115]=D):D=e[115];let H;e[116]!==v||e[117]!==z||e[118]!==D?(H=n.jsxs(v,{children:[z,D]}),e[116]=v,e[117]=z,e[118]=D,e[119]=H):H=e[119];let Se;e[120]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>h(null),e[120]=Se):Se=e[120];let ce;e[121]!==b||e[122]!==B?(ce=n.jsx(zo,{request:b,onClose:Se,onSave:B}),e[121]=b,e[122]=B,e[123]=ce):ce=e[123];let se;e[124]!==d?(se=M=>d.mutate(ie=>Ve(ie,M)),e[124]=d,e[125]=se):se=e[125];let ne;e[126]!==l||e[127]!==g||e[128]!==_||e[129]!==C||e[130]!==I||e[131]!==A||e[132]!==r||e[133]!==c.folders||e[134]!==c.preferences||e[135]!==se?(ne=n.jsx(_o,{open:g,onOpenChange:y,projects:r,folders:c.folders,preferences:c.preferences,canManage:l,onPin:A,onHide:_,onHideFolder:C,onMove:I,onRequestFolderName:h,onDeleteFolder:se}),e[126]=l,e[127]=g,e[128]=_,e[129]=C,e[130]=I,e[131]=A,e[132]=r,e[133]=c.folders,e[134]=c.preferences,e[135]=se,e[136]=ne):ne=e[136];let xe;return e[137]!==H||e[138]!==ce||e[139]!==ne?(xe=n.jsxs(n.Fragment,{children:[H,ce,ne]}),e[137]=H,e[138]=ce,e[139]=ne,e[140]=xe):xe=e[140],xe}function Ro(){return Zt("sidebar")}function Lo(t){return t.projects}function qo(t,e){return t+e.projects.length}function Bo(){const t=N.c(8),e=E(),{capabilities:i,isPrivileged:s,loading:o,error:l}=Os(),r=gi().length,a=Ds();let c;return t[0]!==i||t[1]!==l||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==e||t[6]!==a?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(Ms,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(pi,{size:14}),to:"/$org/settings/general"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(xi,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(jt,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Mt,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"projects",label:e("projects.settings.title"),icon:n.jsx(Et,{size:14}),to:"/$org/settings/projects"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(bi,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(Sn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(vt,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(hi,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(Es,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(Ge,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(m=>({...m,items:m.items.flatMap(d=>{if(d.group){const[p]=a[d.group];return p?[{...d,to:p.to}]:Rs(d.group)?[]:[d]}return o||l?[d]:d.privilegedOnly?s?[d]:[]:d.requires?s||i[d.requires]?[d]:[]:[d]})})).filter(Uo),t[0]=i,t[1]=l,t[2]=s,t[3]=r,t[4]=o,t[5]=e,t[6]=a,t[7]=c):c=t[7],c}function Uo(t){return t.items.length>0}function cs(){const t=N.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:i}=Ls(e);let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={select:Vo},t[1]=s):s=t[1];const o=qs(s);let l;if(t[2]!==i||t[3]!==o){const c=f=>{const m=f.replace("$org",i);return o===m||o.startsWith(`${m}/`)};l=f=>[f.to,...f.group?Bs(f.group):[]].some(c),t[2]=i,t[3]=o,t[4]=l}else l=t[4];const r=l;let a;return t[5]!==r||t[6]!==i?(a={org:i,isActive:r},t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Vo(t){return t.location.pathname}function Ko(){const t=N.c(9),{isActive:e}=cs();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={},t[0]=i):i=t[0];const[s,o]=ae.useState(i);let l;t[1]!==e||t[2]!==s?(l=m=>s[m.key]??(!m.collapsible||m.items.some(e)),t[1]=e,t[2]=s,t[3]=l):l=t[3];const r=l;let a;t[4]!==r?(a=m=>o(d=>({...d,[m.key]:!r(m)})),t[4]=r,t[5]=a):a=t[5];const c=a;let f;return t[6]!==r||t[7]!==c?(f={isOpen:r,toggle:c},t[6]=r,t[7]=c,t[8]=f):f=t[8],f}function Ho(t){const e=N.c(21),{group:i,open:s,onToggle:o,className:l}=t;let r,a,c,f,m;if(e[0]!==l||e[1]!==i.collapsible||e[2]!==i.label||e[3]!==o||e[4]!==s){m=Symbol.for("react.early_return_sentinel");e:{const x=L("text-xs font-medium text-muted-foreground/60 truncate",l);if(!i.collapsible){m=n.jsx("p",{className:x,children:i.label});break e}r="button",a=o,c=s,f=L("flex w-full items-center gap-1 rounded-lg hover:text-muted-foreground",x)}e[0]=l,e[1]=i.collapsible,e[2]=i.label,e[3]=o,e[4]=s,e[5]=r,e[6]=a,e[7]=c,e[8]=f,e[9]=m}else r=e[5],a=e[6],c=e[7],f=e[8],m=e[9];if(m!==Symbol.for("react.early_return_sentinel"))return m;let d;e[10]!==s?(d=s?n.jsx(Yt,{size:12}):n.jsx($t,{size:12}),e[10]=s,e[11]=d):d=e[11];let p;e[12]!==i.label?(p=n.jsx("span",{className:"truncate",children:i.label}),e[12]=i.label,e[13]=p):p=e[13];let u;return e[14]!==r||e[15]!==a||e[16]!==c||e[17]!==f||e[18]!==d||e[19]!==p?(u=n.jsxs("button",{type:r,onClick:a,"aria-expanded":c,className:f,children:[d,p]}),e[14]=r,e[15]=a,e[16]=c,e[17]=f,e[18]=d,e[19]=p,e[20]=u):u=e[20],u}function Wo(t){const e=N.c(5),{icon:i,badge:s}=t;let o;e[0]!==s?(o=s?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=s,e[1]=o):o=e[1];let l;return e[2]!==i||e[3]!==o?(l=n.jsxs("span",{className:"relative shrink-0",children:[i,o]}),e[2]=i,e[3]=o,e[4]=l):l=e[4],l}function ds(t){const e=N.c(24),{onNavigate:i}=t,s=nt(),o=E(),l=Bo(),{org:r,isActive:a}=cs(),{isOpen:c,toggle:f}=Ko();let m;if(e[0]!==s||e[1]!==l||e[2]!==a||e[3]!==c||e[4]!==i||e[5]!==r||e[6]!==f){let h;e[8]!==s||e[9]!==a||e[10]!==c||e[11]!==i||e[12]!==r||e[13]!==f?(h=(g,y)=>n.jsxs("div",{className:"flex flex-col",children:[g.label&&!s&&n.jsx(Ho,{group:g,open:c(g),onToggle:()=>f(g),className:L("px-2 pt-1.5 pb-0.5",y>0&&"mt-3")}),(s||c(g))&&n.jsx(te,{className:"gap-0.5",children:g.items.map(j=>n.jsx(Ne,{icon:n.jsx(Wo,{icon:j.icon,badge:j.badge}),label:j.label,isActive:a(j),link:{to:j.to,params:{org:r}},className:"gap-2.5",onSelect:()=>{fe("settings_nav_clicked",{section_key:j.key,group_key:g.key}),i?.()}},j.key))})]},g.key),e[8]=s,e[9]=a,e[10]=c,e[11]=i,e[12]=r,e[13]=f,e[14]=h):h=e[14],m=l.map(h),e[0]=s,e[1]=l,e[2]=a,e[3]=c,e[4]=i,e[5]=r,e[6]=f,e[7]=m}else m=e[7];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50 hidden"}),e[15]=d):d=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("span",{className:"shrink-0",children:n.jsx(Ke,{size:14})}),e[16]=p):p=e[16];let u;e[17]!==o?(u=o("settings.nav.signOut"),e[17]=o,e[18]=u):u=e[18];let x;e[19]!==u?(x=n.jsxs("div",{className:"mt-auto flex flex-col pt-4",children:[d,n.jsx(te,{className:"gap-0.5",children:n.jsx(Ne,{icon:p,label:u,className:"gap-2.5",onSelect:Qo})})]}),e[19]=u,e[20]=x):x=e[20];let b;return e[21]!==m||e[22]!==x?(b=n.jsxs(n.Fragment,{children:[m,x]}),e[21]=m,e[22]=x,e[23]=b):b=e[23],b}function Qo(){fe("signed_out",{source:"settings_sidebar"}),St(),Te.signOut()}function ms(t){const e=N.c(8),{onNavigate:i}=t,s=E(),{org:o}=X();let l;e[0]!==s?(l=s("settings.nav.backToHome"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==o.slug?(r={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=r):r=e[3];let a;return e[4]!==i||e[5]!==l||e[6]!==r?(a=n.jsx(Ui,{label:l,link:r,onSelect:i}),e[4]=i,e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function us(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1 group-data-[state=collapsed]/sidebar:hidden",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.576.5"]})}),t[0]=e):e=t[0],e}const Go="pt-1.5";function fs(t){const e=N.c(18),{header:i,back:s,body:o,footer:l,sheet:r}=t;let a;e[0]!==i?(a=i&&n.jsx("div",{"data-slot":"sidebar-picker-header",className:"flex h-12 shrink-0 flex-row items-center gap-1 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:gap-2 group-data-[state=collapsed]/sidebar:py-2",children:i}),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==i?(c=i&&n.jsx("div",{className:"hidden mt-1.5 h-px shrink-0 bg-sidebar-border"}),e[2]=i,e[3]=c):c=e[3];let f;e[4]!==s?(f=s&&n.jsx("div",{className:"sticky top-0 z-10 hidden shrink-0 bg-sidebar pb-2 not-empty:block",children:s}),e[4]=s,e[5]=f):f=e[5];let m;e[6]!==o||e[7]!==f?(m=n.jsxs(Qs,{className:"gap-0 overflow-y-auto px-2 pt-3 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:[f,o]}),e[6]=o,e[7]=f,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==a||e[11]!==c||e[12]!==m?(d=n.jsxs(n.Fragment,{children:[a,c,m,l]}),e[9]=l,e[10]=a,e[11]=c,e[12]=m,e[13]=d):d=e[13];const p=d;if(r){let x;return e[14]!==p?(x=n.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":ke.nav,children:p}),e[14]=p,e[15]=x):x=e[15],x}let u;return e[16]!==p?(u=n.jsx(Gs,{className:Go,"data-tour":ke.nav,children:p}),e[16]=p,e[17]=u):u=e[17],u}function ps(t){const e=N.c(2),{onNavigate:i}=t;let s;return e[0]!==i?(s=n.jsx(Us,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsx(Gi,{onNavigate:i}),n.jsx(lo,{onNavigate:i}),n.jsx(Eo,{onNavigate:i})]})}),e[0]=i,e[1]=s):s=e[1],s}function Jo(){const t=N.c(10),e=Tt();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(no,{}),t[0]=i):i=t[0];let s;t[1]!==e?(s=e&&n.jsx(ms,{}),t[1]=e,t[2]=s):s=t[2];let o,l;t[3]!==e?(o=e?n.jsx(ds,{}):n.jsx(ps,{}),l=e?n.jsx(us,{}):n.jsx(Xi,{}),t[3]=e,t[4]=o,t[5]=l):(o=t[4],l=t[5]);let r;return t[6]!==s||t[7]!==o||t[8]!==l?(r=n.jsx(fs,{header:i,back:s,body:o,footer:l}),t[6]=s,t[7]=o,t[8]=l,t[9]=r):r=t[9],r}function Yo(t){const e=N.c(15),{onClose:i}=t,s=Tt();let o;e[0]!==i?(o=n.jsx(io,{onClose:i}),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==s||e[3]!==i?(l=s&&n.jsx(ms,{onNavigate:i}),e[2]=s,e[3]=i,e[4]=l):l=e[4];let r;e[5]!==s||e[6]!==i?(r=s?n.jsx(ds,{onNavigate:i}):n.jsx(ps,{onNavigate:i}),e[5]=s,e[6]=i,e[7]=r):r=e[7];let a;e[8]!==s?(a=s?n.jsx(us,{}):n.jsx(eo,{}),e[8]=s,e[9]=a):a=e[9];let c;return e[10]!==o||e[11]!==l||e[12]!==r||e[13]!==a?(c=n.jsx(fs,{sheet:!0,header:o,back:l,body:r,footer:a}),e[10]=o,e[11]=l,e[12]=r,e[13]=a,e[14]=c):c=e[14],c}const Zo=new Set(["completed","failed","requires_action"]);function Xo(t){const e=N.c(5),[i]=bt();let s;e[0]!==i?(s=l=>{i.enableSounds&&Zo.has(l.data.status)&&ji(vi.dataUri).catch(el)},e[0]=i,e[1]=s):s=e[1];let o;e[2]!==t||e[3]!==s?(o={orgSlug:t,onTaskStatus:s},e[2]=t,e[3]=s,e[4]=o):o=e[4],Si(o)}function el(t){console.warn("[status-sounds] playback failed:",t)}const tl=2e3,sl=4e4;function nl(t){return t==="success"||t==="updated"}function il(t){const e=N.c(15);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const s=Vs(i),o=Je();let l;e[1]!==s.checkout?(l=nl(s.checkout),e[1]=s.checkout,e[2]=l):l=e[2];const r=l,[a]=ae.useState(ol);let c;e[3]!==t?(c=Ee.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let f;e[5]!==a?(f=()=>Date.now()<a?tl:!1,e[5]=a,e[6]=f):f=e[6];let m;e[7]!==t||e[8]!==o?(m=async()=>(await o.invalidateQueries({queryKey:Ee.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=m):m=e[9];let d;e[10]!==r||e[11]!==c||e[12]!==f||e[13]!==m?(d={queryKey:c,enabled:r,gcTime:0,staleTime:0,refetchInterval:f,queryFn:m},e[10]=r,e[11]=c,e[12]=f,e[13]=m,e[14]=d):d=e[14],Ye(d)}function ol(){return Date.now()+sl}function ca(){const t=N.c(3),{org:e}=X();Xo(e.slug),il(e.id);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(yi,{}),t[0]=i):i=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Be.Sidebar,{renderMobile:ll,children:n.jsx(Jo,{})}),t[1]=s):s=t[1];let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs(Be,{notice:i,children:[s,n.jsx(Be.Content,{children:n.jsx(Ks,{})})]}),t[2]=o):o=t[2],o}function ll(t){const{onClose:e}=t;return n.jsx(Yo,{onClose:e})}export{ca as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,j as a,cu as j,h as I,cv as S,cw as g}from"./index-DVvmeJMJ.js";import{i as v}from"./SearchMd-CWmEKOOP.js";function w(x){const e=f.c(14),{value:r,onChange:l,placeholder:h,onKeyDown:c,className:i,isSearching:p,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==p?(s=a.jsx(j,{className:"pr-0",children:p?a.jsx(I,{className:"size-4"}):a.jsx(v,{})}),e[0]=p,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==c||e[6]!==m||e[7]!==t||e[8]!==r?(n=a.jsx(S,{type:"text",value:r,onChange:t,onKeyDown:c,placeholder:m,disabled:u}),e[4]=u,e[5]=c,e[6]=m,e[7]=t,e[8]=r,e[9]=n):n=e[9];let o;return e[10]!==i||e[11]!==s||e[12]!==n?(o=a.jsxs(g,{size:"sm",className:i,children:[s,n]}),e[10]=i,e[11]=s,e[12]=n,e[13]=o):o=e[13],o}export{w as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bB as g,c7 as E,fz as w,fd as D,fA as A,bG as y,fB as L,bM as d,bZ as P,bF as T,bX as k,bD as j,bY as B,fC as R,b6 as x,bS as C,b_ as K}from"./index-DVvmeJMJ.js";import{D as I,r as F,A as U,Y as W,ad as Y}from"./blocks-tab-states-DS5PjKyJ.js";const l="https://docs.decocms.com/storefront/blocks",ne={quickstart:`${l}/next/quickstart`,siteEditor:`${l}/next/site-editor#edit-on-your-machine`,serve:`${l}/next/cli#deco-serve`,schema:`${l}/next/cli#deco-schema-and-deco-content`,troubleshooting:`${l}/next/troubleshooting#site-editor`},ae="https://github.com/decocms/blocks/tree/main/.agents/skills/deco-site-workflow";function $(e){return e.includes("matchers")||e.includes("Match")}function m(e,r){const t=e.__resolveType;return typeof t!="string"||!t||W(t,r)?!1:r?w(r,t):$(t)}function oe(e,r){const t=[];for(const[n,a]of Object.entries(r)){if(n.includes("/")||!g(n,e)||E(n)||!a||typeof a!="object"||Array.isArray(a))continue;const o=a;m(o,e)&&t.push({blockKey:n,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return t.sort((n,a)=>(n.name??n.blockKey).localeCompare(a.name??a.blockKey))}function p(e,r,t){if(!e)return!1;const n=e.__resolveType;if(typeof n!="string"||!g(n,t)||!Object.hasOwn(r,n))return!1;const a=r[n];return!a||typeof a!="object"||Array.isArray(a)?!1:m(a,t)}function se(e,r,t){return p(e,r,t)?e?.__resolveType??null:null}function S(e,r,t){if(!e)return null;const n=e.__resolveType??"";if(!n)return null;if(p(e,r,t)){const s=r[n]??{},i=s.__resolveType??n,{__resolveType:c,name:u,...v}=s;return{resolveType:i,data:v,blockKey:n}}const{__resolveType:a,...o}=e;return{resolveType:n,data:o}}function q(e,r,t){const n=S(e,r,t);return n?{__resolveType:n.resolveType,...n.data}:{__resolveType:""}}function ie(e,r,t){if(e)return p(e,r,t)?q(e,r,t):e}function z(e,r,t,n){if(!e)return"Default";if(p(e,r,n)){const a=e.__resolveType??"",o=r[a];return I(a,o)}return t(e,F(r))}function ce(e,r,t){return{__resolveType:e,...r,name:t}}function ue(e){return{__resolveType:e}}function le(e,r,t){const n=S(e,r,t);return n?{resolveType:n.resolveType,formValue:n.data}:{resolveType:"",formValue:{}}}function fe(e,r){const t={__resolveType:e};if(!e||!r)return t;const n=U(e,r),a=n?.type==="inline-union"?n.inlineUnionBranches?.[0]?.discriminators:void 0;return a?{...t,...a}:t}function V(e){const r=[];for(let t=e;t?.key!=null;t=t.parent)r.push(t.key);return r.reverse()}function G(e){return{blockKey:e.blockKey,path:V(e)}}function N(e,r,t){const n=[];for(const[o,s]of Object.entries(e))o!==r&&n.push({node:s,blockKey:o,parent:null,key:null});const a=new Set;for(;n.length>0;){const o=n.pop(),{node:s}=o;if(!(!s||typeof s!="object")&&!a.has(s)){if(a.add(s),Array.isArray(s)){s.forEach((i,c)=>{n.push({node:i,blockKey:o.blockKey,parent:o,key:c})});continue}t(s,o);for(const[i,c]of Object.entries(s))n.push({node:c,blockKey:o.blockKey,parent:o,key:i})}}}function H(e,r,t){if(!r)return[];const n=[];return N(e,r,(a,o)=>{if(a.__resolveType!==r||!p(a,e,t))return;const s=X(o);n.push({...G(o),...s?{variant:s}:{}})}),n}function X(e){for(let r=e;r;r=r.parent){const t=r.parent,n=t?.parent,a=n?.parent;if(!t||!n||!a)return;if(r.key==="rule"&&typeof t.key=="number"&&n.key==="variants"&&Y(a.node)&&D(a.node.__resolveType)){const o=a.node.experiment;return{containerPath:V(a),containerType:a.node.__resolveType,index:t.key,...typeof o=="string"?{experiment:o}:{}}}}}function Z(e){for(const r of e.anyOfRefs??[]){if(r.resolveType!==A&&r.resolveType!==y)continue;const t=r.schema?.properties?.variants?.items?.properties?.value,n=t?.lazy?t.properties?.value:t;if(n?.type==="array")return n}}function J(e){return Z(e)!==void 0}function ye(e,r){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return Array.isArray(t.variants)?t.__resolveType===R?!0:r&&t.__resolveType===y&&!M(t.variants):!1}function M(e){return e.some(r=>Array.isArray(d(r)))}function O(e,r){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return t.__resolveType===A?!0:r&&t.__resolveType===y&&Array.isArray(t.variants)&&M(t.variants)}function pe(e,r){if(!O(e,r))return null;const t=e.variants;if(!Array.isArray(t))return null;const n=x(t[0],r);return Array.isArray(n)?n:null}function ve(e,r,t,n){if(!O(e,n))return r;const a=structuredClone(e),o=[...a.variants??[]];return o.length===0?o.push({rule:k(t),value:T(a.__resolveType,r)}):o[0]=C(a.__resolveType,o[0],r),{...a,variants:o}}function de(e,r){const n=e[r]?.sections;if(!n||Array.isArray(n))return 1;const a=n;return Array.isArray(a.variants)?a.variants.length:1}function _e(e,r,t){const a=e[r]?.sections;if(Array.isArray(a))return t===0?a:[];if(a&&typeof a=="object"){const o=a.variants;if(Array.isArray(o)){const s=d(o[t]);return Array.isArray(s)?s:[]}}return[]}function be(e,r,t){if(Array.isArray(e))return[{label:"Default",sections:e}];if(e&&typeof e=="object"){const n=e;if(Array.isArray(n.variants)){const a=n.variants,o=L(a.map(s=>z(s.rule,r,t)));return a.map((s,i)=>{const c=o[i],u=d(s);return{label:c||`Variant ${i+1}`,sections:Array.isArray(u)?u:[],rule:s.rule}})}}return[]}function _(e,r,t){return{rule:k(r),value:T(t,e)}}function b(e,r){return e?e.__resolveType===y?y:A:j(r)}function f(e,r,t){return{...r,__resolveType:b(r,t),variants:e}}function he(e,r,t,n=!1){const a=structuredClone(r);if(e&&typeof e=="object"&&!Array.isArray(e)){const c=e;if(!Array.isArray(c.variants))return null;const u=[...c.variants],v=P(u,n);return u.splice(v,0,_(a,t,b(c))),{sections:f(u,c),newVariantIndex:v}}const o=b(void 0,t),s=_(Array.isArray(e)?e:[],t,o),i=_(a,t,o);return{sections:f(n?[i,s]:[s,i],void 0,t),newVariantIndex:n?0:1}}function Ae(e,r,t=!1){const n=e[r];if(!n)return null;const a=[...e];return a.splice(K(e,r,t),0,structuredClone(n)),a}function ge(e,r){if(r.length===0)return f([],e);if(r.length===1){const t=r[0],n=t?.rule;if(!B(n))return f(r,e);const a=d(t);if(Array.isArray(a))return a}return f(r,e)}function Q(e,r,t){return H(e,r,t).length}function Te(e,r,t,n){return n?!1:Q(e,r,t)===0}const ke={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};function h(e){return e.includes("/sections/")||e.includes("multivariate/section")||e===R}function ee(e){if(e.anyOfRefs?.length)return e.anyOfRefs.some(t=>h(t.resolveType));const r=e.properties?.__resolveType;return r?.type==="block-ref"&&r.anyOfRefs?.length?r.anyOfRefs.some(t=>h(t.resolveType)):!1}function Re(e){return e.type!=="block-ref"||!e.anyOfRefs?.length?!1:e.anyOfRefs.some(r=>h(r.resolveType))}function me(e,r){if(r==="global"||r==="sections"||J(e))return!0;const t=e.type==="array"?e.items:void 0;return t?ee(t):!1}export{Te as A,Ae as B,ke as C,ae as D,de as a,he as b,me as c,q as d,ue as e,Re as f,_e as g,z as h,J as i,se as j,le as k,oe as l,p as m,ce as n,ye as o,be as p,O as q,ie as r,fe as s,Z as t,pe as u,ne as v,ve as w,h as x,S as y,ge as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i0 as ei,bf as ti,c as wn,b as Rn,r as b,m as le,j as r,bR as ni,b7 as Cs,i1 as Da,B as It,Y as an,at as si,_ as ri,be as ai,Z as oi,q as ii,hy as li,i2 as ci,i3 as ui,h as di,bg as wt,i4 as Jr,i5 as bs,i6 as fi,i7 as pt,i8 as Yr,i9 as mi,bu as pi,ia as hi,ib as Qr,ic as gi,t as W,b$ as Xr,id as vi,ie as Bt,ig as yi,ih as Si,ii as bi,b_ as Zr,ij as xs,ik as xi,il as _i,im as ki,bY as wi,bv as Ri,io as ji,ip as Ei,bU as Vi,K as Ti,iq as ea,fc as Ai,bm as Wn,bs as ta,ir as na,is as Ni,it as Ci,iu as Pi,iv as _s,iw as Bi,ix as Di,iy as Ki,iz as sa,iA as Mi,iB as Fi,bS as ra,iC as Ii,iD as Li,bp as aa,iE as Oi,bX as zi}from"./index-DVvmeJMJ.js";import{u as $i}from"./chat-context-bTdV0PQS.js";import{ac as Hi,X as Zn,ad as Wi,ae as qi,af as Gi,ag as Ui,ah as Ji,ai as Yi,aj as oa,ak as Qi,al as Xi,G as Jn,A as Yn,d as Zi,u as el,am as ia,i as tl,an as nl,k as sl,h as rl,ao as Ka,p as kn,ap as al,aq as ol,y as la,ar as il,as as ll,at as qn,au as ca,av as ua,aw as da,ax as ks,ay as cl,K as ul,az as dl,D as fl,aA as fa,aB as ml,aC as ma,aD as pa,aE as ha,M as pl,aF as ga,a as hl,aG as on,aH as gl,aI as vl,x as Gn,ab as xn}from"./parse-sections-D2w3wSuP.js";import{b as yl}from"./repository-binding-DJpVzzIq.js";import{n as Sl,t as bl}from"./ChevronUp-DlMNWluH.js";import{a7 as Ma,b as Xn,an as xl,e as _l,F as kl,a1 as va,Y as ya}from"./agent-icon-uDqFfzhf.js";import{S as ln}from"./scroll-area-D1j-ZNOk.js";import{c as Rt,T as jt,a as Et}from"./tooltip-BVrosRIK.js";import{k as wl,u as Rl,m as jl,l as El,ak as Vl,S as Tl,t as Sa,b1 as ba,au as Dt,av as Kt,a5 as Al,b2 as Nl,b3 as Cl,aV as xa,a8 as Pl,ag as Bl}from"./site-editor-toast-Bz5hIXUq.js";import{u as Dl,ao as _a,e as ka,j as Kl,D as Ml,A as Un,a3 as Fl,ae as Il,aj as Ll}from"./blocks-tab-states-DS5PjKyJ.js";import{m as Ol,u as zl,P as $l}from"./mustache-CtUZw69D.js";import{a as Es,e as Fa}from"./UserSquare-NNxs0RWc.js";import{i as wa,s as Ra}from"./Tool01-DB3xqZeL.js";import{s as Hl}from"./Plus-DXpzgENj.js";import{s as Wl}from"./Trash01-BAWUFhrC.js";import{i as Vs}from"./Zap-BFWL2aD-.js";import{u as ql,a as ja,K as Gl,P as Ul,b as Jl,C as Yl,D as Ql,c as Xl}from"./core.esm-DbuDfvWF.js";import{u as Zl,s as ec,a as Qn,S as tc,v as nc}from"./sortable.esm-BMq0DSBR.js";import{s as sc,g as rc,u as ac,A as oc}from"./use-section-preview-base-DqcwcHAy.js";import{u as ic,a as lc,P as Ea,w as cc,b as uc}from"./seo-editor-C0rSQsv3.js";import{R as dc,y as ws,T as Va,x as fc,U as mc}from"./hosted-reconcile-C7zHteUc.js";import{u as pc}from"./use-apply-named-rule-V-RgXu1D.js";import{m as Jt,d as Ts,y as As,n as Ft,e as cn,q as hc,k as Ut,r as Rs,j as Mt,h as _n,b as gc,s as Ta,z as vc,A as yc,B as Sc}from"./section-array-field-AXi3Vg_u.js";import{b as Aa,a as bc}from"./variant-matcher-override-BZrGhjnT.js";import"./autosend-D-UTWUhf.js";import"./thread-route-C8VqFbkH.js";import"./use-project-scope-BbUTPXSS.js";import"./thread-intent-BNVTtSHt.js";import"./use-mcp-client-Bh7kEUBS.js";import"./auth-DzshLgt0.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B9yUO9oy.js";import"./task-board-D-pfBnAn.js";import"./schema-CzuWRpLl.js";import"./use-entitlements-u-J4FrTi.js";import"./use-ai-providers-Cq3xA9Zt.js";import"./use-decopilot-events-B2tjImS_.js";import"./use-organization-settings-Dw2wmQuO.js";import"./utils-Pt7-9-Ev.js";import"./Play--aCtxlXx.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BefVcuJk.js";import"./LinkBroken01-4XuFjBFS.js";import"./collapsible-B2pXVUPn.js";import"./use-copy-DT5ZzrsX.js";import"./usage-stats-Dhf-DrML.js";import"./tool-namespace-CtWbol20.js";import"./form-BTSAyeiz.js";import"./label-DxsI69Ti.js";import"./utils-CVEq3hMx.js";import"./markdown-DY1gkJzE.js";import"./use-mobile-Dc6kWu8K.js";import"./shell-layout-CU0v0Q3J.js";import"./Globe04-xh_ZOoQS.js";import"./use-deployment-admin-CDyLX01_.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-E_Sbr7JC.js";import"./CheckCircle-DSJM5Ipe.js";import"./Monitor01-CVDkBVET.js";import"./command-C4A_k1m6.js";import"./index-DyEEK3cc.js";import"./SearchMd-CWmEKOOP.js";import"./integration-icon-C9OIwyFH.js";import"./project-icon-BfdBakvS.js";import"./use-navigate-to-agent-BNznjjAZ.js";import"./use-debounced-value-jJnqowMI.js";import"./new-project-dialog-DNs6nXJU.js";import"./ArrowLeft-DpMV6ZsI.js";import"./repository-picker-8FkfYDdf.js";import"./github-icon-B_en9n_0.js";import"./useInfiniteQuery-BuWYzJlw.js";import"./infiniteQueryObserver-Depn9DGH.js";import"./collection-search-o_TUN55Q.js";import"./ShoppingBag01-ClDrdJV2.js";import"./legacy-admin-welcome-dialog-DIDvLt4b.js";import"./drawer-DO5xJQb9.js";import"./required-auth-layout-BIQCwVTO.js";import"./use-org-sso-3rJKFGHZ.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CbbHrG36.js";import"./types-DDm1cJJv.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./AlertCircle-C4gtVV8B.js";import"./sheet-BSTYuLMa.js";import"./use-connection-DnLlCwu6.js";import"./use-mcp-prompts-BvdRcLVu.js";import"./use-thread-outputs-CtFiUcL7.js";import"./file-type-icon-HeI2BZTs.js";import"./switch-BoeP0_DT.js";import"./textarea-yEyl1P1k.js";import"./ChevronSelectorVertical-Y1qRZSrs.js";import"./popover-DVbSl4_S.js";import"./monaco-editor-ChRuLOCA.js";import"./editor-T1DFIh20.js";import"./calendar-Dj2F2D9c.js";import"./SwitchHorizontal01-C42vJfgE.js";import"./Minus-D8UqNYy4.js";import"./select-CBAbBtbp.js";import"./index-BdQq_4o_.js";import"./index-DwNl1Km0.js";import"./editor-classes-XhTpecj4.js";import"./toggle-group-pyWm-TzL.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-N56ErTGA.js";import"./Upload01-CMkGIZuR.js";import"./search-input-Cvdta6ZJ.js";import"./tabs-B314G2il.js";import"./use-file-configs-BbIIeRpu.js";import"./asset-utils-ClCcVH6C.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-voice-input-DyZTYy5g.js";import"./index-DFaIOW9N.js";import"./checkbox-Bq5cgSkE.js";import"./Key01-BnxP0_QL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-DcqI6XE4.js";import"./sandbox-url-D3mC8qhT.js";import"./ArrowUp-BZtzDI6h.js";import"./CreditCard01-DDsAjKey.js";import"./Sun-wXzOhHYv.js";import"./Users01-DIshv_Ib.js";import"./use-sandbox-events-C8uDi6Yt.js";import"./use-blocks-v8-project-Cbqo1QTy.js";import"./empty-state-DPWCLNrd.js";import"./slider-B-4p3Nob.js";import"./index-DTVEZmhV.js";import"./tooltipContext-qYwD6VMh.js";import"./CategoricalChart-ysoAqy8Y.js";import"./index-D1ksSwz3.js";import"./use-move-blocks-D35xWi_f.js";const xc={escape:Hi};function _c(v,e){for(const p of sc(v,e)){const S=typeof p.title=="string"?p.title:void 0;if(S?.includes("{{"))return S}}function kc(v,e){if(!e)return;const p=ei(v,ti(e));if(p)try{const S=_c(p.resolveType,e);return S&&Ol.render(S,p.data,{},xc).trim()||void 0}catch{return}}function wc(v){const e=wn.c(13),{icon:p,label:S,className:x}=v;let V;e[0]!==x?(V=le("size-3.5",x),e[0]=x,e[1]=V):V=e[1];let C;e[2]!==p||e[3]!==V?(C=r.jsx(p,{className:V}),e[2]=p,e[3]=V,e[4]=C):C=e[4];let _;e[5]!==S||e[6]!==C?(_=r.jsx(jt,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":S,className:"shrink-0 cursor-help",children:C})}),e[5]=S,e[6]=C,e[7]=_):_=e[7];let P;e[8]!==S?(P=r.jsx(Et,{className:"max-w-56",children:S}),e[8]=S,e[9]=P):P=e[9];let k;return e[10]!==_||e[11]!==P?(k=r.jsxs(Rt,{children:[_,P]}),e[10]=_,e[11]=P,e[12]=k):k=e[12],k}const Rc="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 Na(v){return Array.from({length:v},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Ia(v){return v.map((e,p)=>({...e,index:p}))}function jc(v,e){if(e===v.length)return v;if(e<v.length)return Ia(v.slice(0,e));const p=Array.from({length:e-v.length},(S,x)=>({id:crypto.randomUUID(),index:v.length+x}));return[...v,...p]}function La(v){const e=wn.c(44),{section:p,raw:S,meta:x,decofile:V}=v,C=Rn(),_=Zn(),P=p.isSavedBlock===!0,k=p.isMultivariate===!0;let X;e[0]!==x||e[1]!==S?(X=S&&x?rc(S,x):void 0,e[0]=x,e[1]=S,e[2]=X):X=e[2];const ge=X;let Ue;e[3]!==x||e[4]!==k||e[5]!==S||e[6]!==P?(Ue=S&&x&&!P&&!k?kc(S,x):void 0,e[3]=x,e[4]=k,e[5]=S,e[6]=P,e[7]=Ue):Ue=e[7];const Le=Ue;let Ce;e[8]!==V||e[9]!==x||e[10]!==S||e[11]!==p?(Ce=Yi(S,p,V,x),e[8]=V,e[9]=x,e[10]=S,e[11]=p,e[12]=Ce):Ce=e[12];const Je=Ce;let w;e[13]!==k||e[14]!==S?.__resolveType?(w=!k&&Cs(S?.__resolveType??""),e[13]=k,e[14]=S?.__resolveType,e[15]=w):w=e[15];const c=w,xe=P?Xn:k?Ma:Fa;let G;e[16]!==k||e[17]!==P?(G=P?{color:ai}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=P,e[18]=G):G=e[18];const _e=G;let I;e[19]!==xe||e[20]!==_?(I=_?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(Xi,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):r.jsx(xl,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=_,e[21]=I):I=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let d;e[24]!==_||e[25]!==_e?(d=!_&&r.jsx(Es,{className:"h-4 w-4 shrink-0",style:_e}),e[24]=_,e[25]=_e,e[26]=d):d=e[26];const Oe=_?"shrink":"flex-1",u=p.isHidden&&"line-through opacity-50";let Ee;e[27]!==u||e[28]!==Oe?(Ee=le("min-w-0 truncate text-sm font-medium",Oe,u),e[27]=u,e[28]=Oe,e[29]=Ee):Ee=e[29];const Z=Le??p.label;let ze;e[30]!==Ee||e[31]!==Z?(ze=r.jsx("span",{className:Ee,children:Z}),e[30]=Ee,e[31]=Z,e[32]=ze):ze=e[32];let nt;e[33]!==c||e[34]!==_||e[35]!==Je||e[36]!==C?(nt=_?r.jsxs(r.Fragment,{children:[c&&r.jsx(wc,{icon:Vs,label:C("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),Je&&r.jsx(oa,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):Je&&r.jsx(oa,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=_,e[35]=Je,e[36]=C,e[37]=nt):nt=e[37];let Pe;return e[38]!==ze||e[39]!==nt||e[40]!==I||e[41]!==ke||e[42]!==d?(Pe=r.jsxs(r.Fragment,{children:[I,ke,d,ze,nt]}),e[38]=ze,e[39]=nt,e[40]=I,e[41]=ke,e[42]=d,e[43]=Pe):Pe=e[43],Pe}const Ec="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Vc="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 Oa(v,e,p){if(p)return Qi({selected:e});const S=v.isSavedBlock===!0,x=v.isMultivariate===!0;return le("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":S?Ec:x?Vc:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function js(v,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":v?"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 Tc(v){const e=wn.c(90),{section:p,raw:S,meta:x,decofile:V,sortableId:C,selected:_,onSelect:P,onDelete:k,onDuplicate:X,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Le,onAddVariant:Ce,onDetach:Je}=v,w=Rn(),c=Zn(),xe=S?Cs(S.__resolveType??""):!1,G=p.isHidden===!0,_e=xe||G;let I;e[0]!==p?(I=Da(p),e[0]=p,e[1]=I):I=e[1];const ke=I,d=!!Le&&!p.isMultivariate;let Oe;e[2]!==C?(Oe={id:C,animateLayoutChanges:Cc},e[2]=C,e[3]=Oe):Oe=e[3];const{attributes:u,listeners:Ee,setNodeRef:Z,transform:ze,isDragging:nt}=Zl(Oe);let Pe;e[4]!==ze?(Pe=Yl.Transform.toString(ze?{...ze,x:0}:null),e[4]=ze,e[5]=Pe):Pe=e[5];const st=nt?0:void 0;let ue;e[6]!==Pe||e[7]!==st?(ue={transform:Pe,opacity:st},e[6]=Pe,e[7]=st,e[8]=ue):ue=e[8];const g=ue;let we;e[9]!==p?(we=qi(p),e[9]=p,e[10]=we):we=e[10];const rt=we,at="button",m=0;let L;e[11]!==P?(L=F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),P())},e[11]=P,e[12]=L):L=e[12];const Ze=nt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==_||e[16]!==Ze?(A=le("touch-none transition-colors",Ze,Oa(p,_,c)),e[13]=c,e[14]=p,e[15]=_,e[16]=Ze,e[17]=A):A=e[17];let Ye;e[18]!==V||e[19]!==x||e[20]!==S||e[21]!==p?(Ye=r.jsx(La,{section:p,raw:S,meta:x,decofile:V}),e[18]=V,e[19]=x,e[20]=S,e[21]=p,e[22]=Ye):Ye=e[22];const H=!c&&d&&r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(js(_e,xe)),onClick:F=>{F.stopPropagation(),Le?.()},onPointerDown:Nc,children:r.jsx(Vs,{className:le("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Et,{side:"bottom",children:w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),ot=c?r.jsx(Gi,{label:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:G,onToggle:Ue,children:G?r.jsx(wa,{className:"h-3.5 w-3.5"}):r.jsx(Ra,{className:"h-3.5 w-3.5"})}):r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(js(_e,G)),onClick:F=>{F.stopPropagation(),Ue()},onPointerDown:Ac,children:G?r.jsx(wa,{className:"h-3.5 w-3.5"}):r.jsx(Ra,{className:"h-3.5 w-3.5"})})}),r.jsx(Et,{side:"bottom",children:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),de=ri,Qe=Ui;let ve;e[23]!==w?(ve=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ve):ve=e[24];const it=le(js(_e,!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 $e;e[25]!==Qe||e[26]!==ve||e[27]!==it?($e=r.jsx(Qe,{label:ve,classicClassName:it}),e[25]=Qe,e[26]=ve,e[27]=it,e[28]=$e):$e=e[28];let Be;e[29]!==c||e[30]!==d||e[31]!==xe||e[32]!==Le||e[33]!==w?(Be=c&&d&&r.jsxs(r.Fragment,{children:[r.jsxs(an,{onClick:F=>{F.stopPropagation(),Le?.()},children:[r.jsx(Vs,{className:"h-4 w-4"}),w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(si,{})]}),e[29]=c,e[30]=d,e[31]=xe,e[32]=Le,e[33]=w,e[34]=Be):Be=e[34];let De;e[35]!==X?(De=F=>{F.stopPropagation(),X()},e[35]=X,e[36]=De):De=e[36];let se;e[37]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsx(_l,{className:"h-4 w-4"}),e[37]=se):se=e[37];let Q;e[38]!==w?(Q=w("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=w,e[39]=Q):Q=e[39];let ee;e[40]!==De||e[41]!==Q?(ee=r.jsxs(an,{onClick:De,children:[se,Q]}),e[40]=De,e[41]=Q,e[42]=ee):ee=e[42];let K;e[43]!==c||e[44]!==ke||e[45]!==Ce||e[46]!==w?(K=ke&&r.jsxs(an,{className:le(!c&&Ji),onClick:F=>{F.stopPropagation(),Ce()},children:[r.jsx(Ma,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ce,e[46]=w,e[47]=K):K=e[47];let T;e[48]!==c||e[49]!==rt||e[50]!==ge||e[51]!==w?(T=rt&&r.jsxs(an,{className:le(!c&&Rc),onClick:F=>{F.stopPropagation(),ge()},children:[c?r.jsx(Xn,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=c,e[49]=rt,e[50]=ge,e[51]=w,e[52]=T):T=e[52];let fe;e[53]!==c||e[54]!==Je||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==w?(fe=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(an,{onClick:F=>{F.stopPropagation(),Je()},children:[c?r.jsx(Fa,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=c,e[54]=Je,e[55]=p.isMultivariate,e[56]=p.isSavedBlock,e[57]=w,e[58]=fe):fe=e[58];let He;e[59]!==k?(He=F=>{F.stopPropagation(),k()},e[59]=k,e[60]=He):He=e[60];let et;e[61]===Symbol.for("react.memo_cache_sentinel")?(et=r.jsx(Wl,{className:"h-4 w-4"}),e[61]=et):et=e[61];let Ke;e[62]!==w?(Ke=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=Ke):Ke=e[63];let $;e[64]!==He||e[65]!==Ke?($=r.jsxs(an,{variant:"destructive",onClick:He,children:[et,Ke]}),e[64]=He,e[65]=Ke,e[66]=$):$=e[66];let ie;e[67]!==Be||e[68]!==ee||e[69]!==K||e[70]!==T||e[71]!==fe||e[72]!==$?(ie=r.jsxs(oi,{align:"end",className:"w-44",children:[Be,ee,K,T,fe,$]}),e[67]=Be,e[68]=ee,e[69]=K,e[70]=T,e[71]=fe,e[72]=$,e[73]=ie):ie=e[73];let Ve;e[74]!==de||e[75]!==$e||e[76]!==ie?(Ve=r.jsxs(de,{children:[$e,ie]}),e[74]=de,e[75]=$e,e[76]=ie,e[77]=Ve):Ve=e[77];let Te;return e[78]!==u||e[79]!==Ee||e[80]!==P||e[81]!==Z||e[82]!==g||e[83]!==A||e[84]!==Ye||e[85]!==H||e[86]!==ot||e[87]!==Ve||e[88]!==L?(Te=r.jsxs("div",{ref:Z,style:g,...u,...Ee,role:at,tabIndex:m,onClick:P,onKeyDown:L,className:A,children:[Ye,H,ot,Ve]}),e[78]=u,e[79]=Ee,e[80]=P,e[81]=Z,e[82]=g,e[83]=A,e[84]=Ye,e[85]=H,e[86]=ot,e[87]=Ve,e[88]=L,e[89]=Te):Te=e[89],Te}function Ac(v){return v.stopPropagation()}function Nc(v){return v.stopPropagation()}function Cc(){return!1}function Ns(v){const e=wn.c(11),{canAddSection:p,onAddSection:S,className:x,size:V}=v,C=Rn();let _;e[0]!==x?(_=le("w-full",x),e[0]=x,e[1]=_):_=e[1];const P=!p;let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Hl,{size:14}),e[2]=k):k=e[2];let X;e[3]!==C?(X=C("sectionsEditor.sectionList.addSectionButton"),e[3]=C,e[4]=X):X=e[4];let ge;return e[5]!==S||e[6]!==V||e[7]!==_||e[8]!==P||e[9]!==X?(ge=r.jsxs(It,{type:"button",variant:"outline",size:V,className:_,disabled:P,onClick:S,children:[k,X]}),e[5]=S,e[6]=V,e[7]=_,e[8]=P,e[9]=X,e[10]=ge):ge=e[10],ge}function Pc(v){const e=wn.c(101),{listKey:p,rawSections:S,sections:x,meta:V,decofile:C,selectedIndex:_,onSelect:P,onReorder:k,onDelete:X,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Le,onToggleLazy:Ce,onAddVariant:Je,onDetach:w,onAddSection:c,canAddSection:xe}=v,G=xe===void 0?!0:xe,_e=Rn(),I=Zn();let ke;e[0]!==x.length?(ke=()=>Na(x.length),e[0]=x.length,e[1]=ke):ke=e[1];const[d,Oe]=b.useState(ke),[u,Ee]=b.useState(null),[Z,ze]=b.useState(p),[nt,Pe]=b.useState(x.length),st=b.useRef(!1);Z!==p?(ze(p),Pe(x.length),Oe(Na(x.length))):nt!==x.length&&(Pe(x.length),Oe(tt=>jc(tt,x.length)));let ue;e[2]===Symbol.for("react.memo_cache_sentinel")?(ue={activationConstraint:{distance:8}},e[2]=ue):ue=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g={coordinateGetter:ec},e[3]=g):g=e[3];const we=ql(ja(Ul,ue),ja(Gl,g));let rt;e[4]!==d?(rt=d.map(Bc),e[4]=d,e[5]=rt):rt=e[5];const at=rt;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=tt=>{Ee(String(tt.active.id))},e[6]=m):m=e[6];const L=m;let Ze;e[7]!==at||e[8]!==k?(Ze=tt=>{Ee(null);const{active:O,over:Ae}=tt;if(!Ae||O.id===Ae.id)return;const We=at.indexOf(String(O.id)),ht=at.indexOf(String(Ae.id));We===-1||ht===-1||(Oe(bt=>Ia(Qn([...bt],We,ht))),st.current=!0,requestAnimationFrame(()=>{st.current=!1}),k?.(We,ht))},e[7]=at,e[8]=k,e[9]=Ze):Ze=e[9];const A=Ze;let Ye;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ye=()=>{Ee(null)},e[10]=Ye):Ye=e[10];const H=Ye;let ot,de,Qe,ve,it,$e,Be,De,se,Q,ee,K,T,fe,He;if(e[11]!==u||e[12]!==G||e[13]!==I||e[14]!==C||e[15]!==d||e[16]!==at||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==Je||e[21]!==X||e[22]!==w||e[23]!==ge||e[24]!==Ue||e[25]!==P||e[26]!==Le||e[27]!==Ce||e[28]!==S||e[29]!==x||e[30]!==_||e[31]!==we||e[32]!==_e){fe=Symbol.for("react.early_return_sentinel");e:{const tt=O=>{st.current||P(O)};if(e[48]!==u||e[49]!==G||e[50]!==I||e[51]!==d||e[52]!==c||e[53]!==S||e[54]!==x||e[55]!==_e){const O=u?d.find(Ae=>Ae.id===u):null;if(ve=O!=null?x[O.index]:null,Qe=O!=null?S[O.index]:void 0,d.length===0){let Ae;e[59]!==_e?(Ae=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=Ae):Ae=e[60];let We;e[61]!==Ae?(We=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ae}),e[61]=Ae,e[62]=We):We=e[62];const ht=We;let bt;e[63]!==G||e[64]!==I||e[65]!==ht||e[66]!==c?(bt=I?ht:r.jsxs("div",{className:"space-y-2",children:[ht,r.jsx(Ns,{canAddSection:G,onAddSection:c,size:"sm"})]}),e[63]=G,e[64]=I,e[65]=ht,e[66]=c,e[67]=bt):bt=e[67],fe=bt;break e}T=le(O&&"cursor-grabbing"),e[48]=u,e[49]=G,e[50]=I,e[51]=d,e[52]=c,e[53]=S,e[54]=x,e[55]=_e,e[56]=Qe,e[57]=ve,e[58]=T}else Qe=e[56],ve=e[57],T=e[58];de=Ql,De=we,se=Xl,Q=L,ee=A,K=H,ot=tc,$e=at,Be=nc,He="space-y-1",it=d.map(O=>{const Ae=x[O.index];return Ae?r.jsx(Tc,{sortableId:O.id,section:Ae,raw:S[O.index],meta:V,decofile:C,selected:_===O.index,onSelect:()=>tt(O.index),onDelete:()=>X(O.index),onDuplicate:()=>ge(O.index),onMakeReusable:()=>Ue(O.index),onToggleHidden:()=>Le(O.index),onToggleLazy:Ce?()=>Ce(O.index):void 0,onAddVariant:()=>Je(O.index),onDetach:()=>w(O.index)},O.id):null})}e[11]=u,e[12]=G,e[13]=I,e[14]=C,e[15]=d,e[16]=at,e[17]=A,e[18]=V,e[19]=c,e[20]=Je,e[21]=X,e[22]=w,e[23]=ge,e[24]=Ue,e[25]=P,e[26]=Le,e[27]=Ce,e[28]=S,e[29]=x,e[30]=_,e[31]=we,e[32]=_e,e[33]=ot,e[34]=de,e[35]=Qe,e[36]=ve,e[37]=it,e[38]=$e,e[39]=Be,e[40]=De,e[41]=se,e[42]=Q,e[43]=ee,e[44]=K,e[45]=T,e[46]=fe,e[47]=He}else ot=e[33],de=e[34],Qe=e[35],ve=e[36],it=e[37],$e=e[38],Be=e[39],De=e[40],se=e[41],Q=e[42],ee=e[43],K=e[44],T=e[45],fe=e[46],He=e[47];if(fe!==Symbol.for("react.early_return_sentinel"))return fe;let et;e[68]!==it||e[69]!==He?(et=r.jsx("div",{className:He,children:it}),e[68]=it,e[69]=He,e[70]=et):et=e[70];let Ke;e[71]!==ot||e[72]!==$e||e[73]!==Be||e[74]!==et?(Ke=r.jsx(ot,{items:$e,strategy:Be,children:et}),e[71]=ot,e[72]=$e,e[73]=Be,e[74]=et,e[75]=Ke):Ke=e[75];let $;e[76]!==Qe||e[77]!==ve||e[78]!==I||e[79]!==C||e[80]!==V?($=ve?r.jsx("div",{className:le("cursor-grabbing shadow-lift",Oa(ve,!1,I)),children:r.jsx(La,{section:ve,raw:Qe,meta:V,decofile:C})}):null,e[76]=Qe,e[77]=ve,e[78]=I,e[79]=C,e[80]=V,e[81]=$):$=e[81];let ie;e[82]!==$?(ie=ni.createPortal(r.jsx(Jl,{dropAnimation:Wi,children:$}),document.body),e[82]=$,e[83]=ie):ie=e[83];let Ve;e[84]!==de||e[85]!==De||e[86]!==se||e[87]!==Q||e[88]!==ee||e[89]!==K||e[90]!==Ke||e[91]!==ie?(Ve=r.jsxs(de,{sensors:De,collisionDetection:se,onDragStart:Q,onDragEnd:ee,onDragCancel:K,children:[Ke,ie]}),e[84]=de,e[85]=De,e[86]=se,e[87]=Q,e[88]=ee,e[89]=K,e[90]=Ke,e[91]=ie,e[92]=Ve):Ve=e[92];let Te;e[93]!==G||e[94]!==I||e[95]!==c?(Te=!I&&r.jsx(Ns,{canAddSection:G,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=G,e[94]=I,e[95]=c,e[96]=Te):Te=e[96];let F;return e[97]!==T||e[98]!==Ve||e[99]!==Te?(F=r.jsxs("div",{className:T,children:[Ve,Te]}),e[97]=T,e[98]=Ve,e[99]=Te,e[100]=F):F=e[100],F}function Bc(v){return v.id}function Dc(v,e,p,S){if(!v||typeof v!="object")return{kind:"error",reason:"no-matcher-rule"};const x=e.trim();if(!x)return Jt(v,p,S)?{kind:"inline",blockKey:v.__resolveType??"",inlinedRule:Ts(v,p,S)}:{kind:"noop"};const V=As(v,p,S);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Ft(V.resolveType,V.data,x)};const C=Jn(x),_=Yn(C,p);return _?{kind:"error",reason:"invalid-block-id",message:_}:{kind:"createBlock",blockId:C,blockData:Ft(V.resolveType,V.data,x),reference:cn(C)}}const Ca="section-form-stale-save",Kc=3;function Pa(v,e,p){const S=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Ka(e.pageKey?v[e.pageKey]?.sections:void 0,v,p),x=Math.max(0,Math.min(e.pageVariantIndex,S.length-1)),V=S[x]?.sections??[];return{pageVariants:S,variantIndex:x,rawSections:V,parsedSections:kn(V,v,p)}}const Ba=new WeakMap;let Mc=0;function Fc(v){let e=Ba.get(v);return e===void 0&&(e=++Mc,Ba.set(v,e)),e}function mf({orgSlug:v,virtualMcpId:e,branch:p,previewReady:S=!0,previewUrl:x,currentPath:V,activePageBlockKey:C=null,activeGlobalBlockKey:_=null,externalSelection:P,onSaved:k,initialEditSeo:X=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Le,onFocusedBlockChange:Ce,onSectionPicked:Je,onVariantPreviewOverride:w}){const c=Rn(),xe=$i(),G=xe?.taskId??null,_e=S?{orgSlug:v,virtualMcpId:e,branch:p,threadId:G,previewUrl:x}:null,[I,ke]=b.useState([]),{data:d,isLoading:Oe}=wl(_e,{pollWhile:I.length>0}),{data:u,isLoading:Ee}=Dl(_e),Z=Zn(),ze=xe?.virtualMcpId,Pe=yl(ze===e?e:null)?.metadata?.siteSlug??null,st=ac({virtualMcpId:e,branch:p,sandboxUrl:x}),ue=Rl(e,p),g=jl(ue),we=Vi(g),rt=!g,at=!!st||g,[m,L]=b.useState(null),[Ze,A]=b.useState(null),[Ye,H]=b.useState(null),[ot,de]=b.useState(0),[Qe,ve]=b.useState(void 0),[it,$e]=b.useState(null),Be={index:it,remember:$e},[De,se]=b.useState(null),[Q,ee]=b.useState(null),[K,T]=b.useState([]),fe=b.useRef(null),[He,et]=b.useState(K.length);He!==K.length&&(et(K.length),requestAnimationFrame(()=>{fe.current&&(fe.current.scrollTop=0)}));const[Ke,$]=b.useState(0),[ie,Ve]=b.useState(null),[Te,F]=b.useState(null),[tt,O]=b.useState(null),[Ae,We]=b.useState(!1),[ht,bt]=b.useState(!1),jn=b.useRef(null),[En,za]=b.useState(!0),[Yt,Vn]=b.useState(!1),[Lt,Tn]=b.useState(!1),[Re,un]=b.useState(X),[Ps,Bs]=b.useState(X);X&&!Ps&&(Bs(!0),un(!0),L(null),A(null),H(null),T([])),!X&&Ps&&Bs(!1);const[$a,dn]=b.useState(null),[Ds,An]=b.useState(void 0),[Ks,Ot]=b.useState([]),[Ms,Qt]=b.useState(0),[Me,lt]=b.useState(0),[Ha,Fe]=b.useState(null),[Xt,qe]=b.useState(null),[Fs,Is]=b.useState(null),Nn=ii(),Cn=El({orgSlug:v,virtualMcpId:e,branch:p},{tunnel:!1}),fn=Zi({orgSlug:v,virtualMcpId:e,branch:p}),[Wa,qa]=b.useState(V),[Ga,Ua]=b.useState(C),[Ja,Ya]=b.useState(_);(Wa!==V||Ga!==C||Ja!==_)&&(queueMicrotask(()=>fn.flush()),qa(V),Ua(C),Ya(_),L(null),A(null),H(null),de(0),se(null),ee(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1),un(!1),dn(null),An(void 0),Ot([]),Qt(t=>t+1));const B=el({orgSlug:v,virtualMcpId:e,branch:p}),mn=hl(t=>{B.mutate(t,{onSuccess:()=>k?.(),onError:B.reportError})},d??{},B.v8),Pn=zl({orgSlug:v,virtualMcpId:e,branch:p}),Ls=pc({orgSlug:v,virtualMcpId:e,branch:p}),[Zt,en]=b.useState(!1),N=b.useRef(null),_t=b.useRef(null),gt=b.useRef(null),vt=b.useRef(null),Bn=b.useRef({}),zt=b.useRef(null),pn=b.useRef(!1),hn=b.useRef(!1),ye=b.useRef(new Map),tn=b.useRef(!1),ct=b.useRef([]),es=b.useRef(new WeakSet);Vl(v,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:a,selectedSectionIndex:o}=re.current,i=new Set;n&&i.add(n);for(const l of[_t.current?.sectionIndex,o]){const f=l==null?void 0:s[l],j=l==null?void 0:a[l],h=f&&j?.isSavedBlock?_s(f,j):null;h&&i.add(h)}if([...i].some(l=>t.has(l))){for(const l of[N,gt,vt])l.current&&clearTimeout(l.current),l.current=null;_t.current=null,ye.current.clear(),n&&t.has(n)&&(Bn.current={})}});const re=b.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Os,zs]=b.useState(0),[Qa,Xa]=b.useState(0),$s=li(ue,{orgSlug:v,virtualMcpId:e,branch:p}),Hs=ci($s,I[0]?.blockKey??null,ui(d,I[0]?.blockKey??null)),[Za,eo]=b.useState(null),ts=Tl(v,e).epoch,[to,no]=b.useState(ts);ic(Re?{orgSlug:v,virtualMcpId:e,branch:p}:null,d??void 0,u??void 0);const Ws=_??(d&&u?_a(ka(d,u),V,C)?.key??null:null),ns=Sa({orgSlug:v,virtualMcpId:e,branch:p},Ws?[Ws]:[],{withRefs:!0}),[qs,so]=b.useState(!1),ss=Sa({orgSlug:v,virtualMcpId:e,branch:p},qs?Kl:[]),Gs={ready:!(ue.kind==="protocol"&&ue.hosted)||qs&&ss.ready,failed:ss.failed,retry:ss.retry,request:()=>so(!0)};if(ns.failed)return r.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center text-sm text-muted-foreground",children:[r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailed")}),r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailedHint")}),r.jsx(It,{variant:"outline",size:"sm",onClick:ns.retry,children:c("sectionsEditor.namedRules.tryAgain")})]});if(!S||Oe||Ee||!ns.ready)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(di,{className:"size-5 text-muted-foreground"})});if(!d||!u)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const ro=ka(d,u),q=!!_,ae=q?null:_a(ro,V,C),y=q?_:ae?.key??null,rs=q&&_?d[_]:void 0,Us=q&&_&&rs?Ml(_,rs):q&&_?_:"",nn=!q&&y&&d[y]?d[y]:null,as=Re&&d&&u&&y&&ae?ia(d,{kind:"page",pageKey:y,pageName:String(ae.name??""),path:String(ae.path??"")},u):null,ao=Re?nn?.seo:void 0,Dn=Ds!==void 0?Ds:ao,oo=Re?tl(Dn):void 0,Js=as?.seoTypeOptions??[],Ys=Re&&u?nl(u):"",os=$a??oo??{},Kn=Re&&as?lc(os,as):null,Qs=Re&&Kn&&sl(Dn)?Un(Kn,u):null,Xs=Re?rl(d,u)?.seoData:void 0,me=q?[{label:"Default",sections:[{__resolveType:_}]}]:Ka(nn?.sections,d??{},g),yt=me.length>1,te=Math.min(ot,me.length-1),Se=me[te],M=Se?.sections??[],pe=kn(M,d,g),Mn=!q&&hc(nn?.sections,g);if(q&&_&&Fs!==_){Is(_);const t=M[0],n=pe[0];if(t&&n){L(0),lt(0),T([]);const s=wt(t,n,d,g);s&&(A(s.data),H(s.resolveType),qe(null),Fe(null))}}!q&&Fs!==null&&Is(null),re.current={rawSections:M,parsedSections:pe,decofile:d??{},activePageKey:y,pageVariants:me,variantIndex:te,sectionVariantIndex:Me,selectedSectionIndex:m};const io=()=>({multivariate:Mn,index:te,variants:me.map(t=>({rule:t.rule})),lazyValues:g&&Mn&&Ai(nn?.sections?.variants?.[te]?.value)}),is=(t,n)=>{if(!w)return;if(!y||!Mn||t.length<=1){w(null);return}const s={multivariate:!0,index:n,variants:t},a=g?ba(y,s):Aa(y,s,d,u);w(a.length>0?a:null)},ls=w&&y&&Mn&&yt&&!Oe&&!Ee?y:null;if(ls!==Za&&(eo(ls),ls)){const t=me.map(s=>({rule:s.rule})),n=te;queueMicrotask(()=>is(t,n))}const $t=(t,n,s)=>{if(!w)return;if(!y){w(null);return}const a=io(),o=g?ba(y,a):Aa(y,a,d,u);if(!t||n<0){w(o.length>0?o:null);return}const i={pageKey:y,page:a,sectionIndex:n,sectionLazy:pe[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=g?Nl(i):bc({...i,decofile:d,meta:u}),f=g?Cl(o,l):[...o,...l];w(f.length>0?f:null)},xt=(t,n,s,a=m??-1,o=!1)=>{const i=pt(t,n);if(!i){A(null),H(null),qe(null),Fe(null),o&&$t(null,a,s);return}const f=Yr(i,we)[s];if(!f){A(null),H(null),qe(null),Fe(null),o&&$t(null,a,s);return}const j=hi(f.value,d);A(j?.data??null),H(j?.resolveType??null);const{resolveType:h,formValue:R}=Ut(f.rule,d,u??void 0);qe(h),Fe(R),o&&$t(i,a,s)},cs=t=>{F(null),de(t),L(null),A(null),H(null),T([]);const n=me[t]?.rule,{resolveType:s,formValue:a}=Ut(n,d??{},u??void 0);ee(s),se(a),is(me.map(o=>({rule:o.rule})),t)},lo=(t,n)=>{const s=M[t],a=pe[t];if(!s||!a)return!1;const o=a.isMultivariate?pt(s,a)?.variants?.length??0:0,i=n<o?n:0;if(L(t),lt(i),T([]),$(l=>l+1),a.isMultivariate)xt(s,a,i,t);else{const l=wt(s,a,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),qe(null),Fe(null)}return!0},Zs=P?.index;if(P!==void 0&&(P?.seq??null)!==Qe&&(ve(P?.seq??null),typeof Zs=="number"&&lo(Zs,0)),ts!==to){no(ts);const t=N.current!==null||ye.current.size>0||vt.current!==null||gt.current!==null||B.isPending||fn.isPending||I.length>0,n=m!==null&&Jr(fe.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=M[m],a=pe[m];if(T([]),$(o=>o+1),!s||!a)L(null),A(null),H(null);else if(a.isMultivariate)xt(s,a,Me,m);else{const o=wt(s,a,d,g);A(o?.data??null),H(o?.resolveType??null)}}!t&&Re&&(dn(null),An(void 0),Qt(s=>s+1))}if(Os!==Qa){Xa(Os);const t=m!==null?M[m]:null,n=m!==null?pe[m]:null;if(t&&n&&m!==null)if(T([]),$(s=>s+1),n.isMultivariate)xt(t,n,Me,m);else{const s=wt(t,n,d,g);A(s?.data??null),H(s?.resolveType??null)}}const ut=I[0];if(ut){const{formBase:t,target:n}=ut,s=Pa(d,n,g),a=t.sectionIndex,o=s.rawSections.length===t.sectionCount?bs(s.rawSections[a],s.parsedSections[a],n.sectionVariantIndex,d,g):null,i=fi(ut,o,l=>Qr(t,l));if(i){const f=[{...ut,...i,changedAgain:!0},...I.slice(1)];ct.current=f,ke(f)}}const gn={orgSlug:v,virtualMcpId:e,branch:p,threadId:G,previewUrl:g?void 0:x??void 0,siteSlug:Pe},Fn=Ye&&u?Un(Ye,u):null,dt=(t,n)=>{if(!y)return;N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),vt.current&&(clearTimeout(vt.current),vt.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null);const s=on(d,y,t,te,me);B.mutate({blockKey:y,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:a=>{n?.onError?.(),B.reportError(a)}})},Ht=()=>{Ce?.(null),L(null),Tn(!1),A(null),H(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1)},er=()=>Jr(fe.current,document.activeElement),us=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),_t.current=null,W.error(t,{id:Ca}),er()){tn.current=!0;return}zs(n=>n+1)},tr=()=>{!tn.current||er()||ct.current.length>0||N.current!==null||pn.current||hn.current||ye.current.size>0||(tn.current=!1,zs(t=>t+1))},nr=()=>{tn.current&&setTimeout(tr,0)},sr=ue.kind==="protocol"&&ue.source==="github",rr=t=>Bl(Nn,Cn,t,ue.kind==="protocol"?ue:null),ar=t=>{ye.current.size!==0&&setTimeout(()=>{if(pn.current||hn.current)return;const n=[...ye.current.values()];ye.current.clear();for(const s of n)s()},t)},co=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:a}=re.current,o=zt.current;return{formBase:o?.sectionIndex===t&&o.variantIndex===a?o:null,pageKey:n,global:q,pageVariantIndex:s,sectionVariantIndex:a,schema:Fn}},vn=t=>{ct.current=t,ke(t)},uo=t=>{const n=ct.current,s=n.findIndex(i=>i.formBase===t.formBase),a=s>=0?n[s]:void 0,o=a?n.with(s,{...t,choices:na(a.plan,a.choices,t.plan),fresh:Ii(a.plan,t.plan,a.fresh),changedAgain:a.changedAgain||Wn(a.plan.theirs)!==Wn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(o)},or=(t,n)=>{const s=ct.current,a=s.findIndex(l=>l.formBase===t),o=s[a];if(!o)return!1;if(Wn(o.plan.mine)===Wn(n))return!0;const i=ta({...o.plan,mine:n});if(i.pointers.length===0){const l=s.filter(f=>f!==o);return vn(l),!1}return vn(s.with(a,{...o,plan:i,choices:na(o.plan,o.choices,i)})),!0},fo=t=>{const n=re.current;return n.selectedSectionIndex===t.formBase.sectionIndex&&n.activePageKey===t.target.pageKey&&n.variantIndex===t.target.pageVariantIndex&&n.sectionVariantIndex===t.target.sectionVariantIndex},mo=()=>{const t=ct.current[0];if(!t)return null;const{formBase:n,target:s}=t;N.current&&_t.current?.sectionIndex===n.sectionIndex&&_t.current.sectionVariantIndex===s.sectionVariantIndex&&(clearTimeout(N.current),N.current=null,_t.current=null),ye.current.delete(`${s.pageKey}:${n.sectionIndex}:${s.sectionVariantIndex}`);const a=n.emitted;return a&&typeof a=="object"&&!or(n,a)&&yn(a,n.sectionIndex,0,s),ct.current[0]??null},po=()=>{const t=ct.current[0],n=mo();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=Ri(n.plan,n.choices);ue.kind==="protocol"&&ue.source==="github"&&ji(n.plan,n.choices)&&Al(c,!1),vn(ct.current.slice(1));const{formBase:a,target:o}=n;a.base=n.plan.theirs,a.version=void 0,a.emitted=s,es.current.add(a),(zt.current===a||fo(n))&&(zt.current=a,A(s),$(i=>i+1)),yn(s,a.sectionIndex,0,o)},ho=t=>{const[n,...s]=ct.current;n&&vn([{...n,choices:t},...s])},yn=(t,n,s=0,a,o=!1)=>{const i=a??co(n),l=i.sectionVariantIndex,f=i.formBase,j=o||ea(ct.current,f,i,n,g).runNow,h=_t.current;N.current&&(clearTimeout(N.current),N.current=null,h&&(h.sectionIndex!==n||h.sectionVariantIndex!==l)&&h.write());const R=`${i.pageKey}:${n}:${l}`,E=()=>{if(pn.current||hn.current){ye.current.set(R,E);return}const D=typeof t=="function"?t():t,z=ea(ct.current,f,i,n,g).base;if(z&&or(z,D))return;const ne=re.current.decofile,{rawSections:J,parsedSections:Ne,pageVariants:Y,variantIndex:be}=Pa(ne,i,g),Ie=i.pageKey,he=J[n];if(!he)return;const ce=Ne[n];if(!ce)return;const Ge=f?.base,Xe=bs(he,ce,l,ne,g),Nt=!!Ge&&!!Xe&&Ni(Ge,Xe)&&!(f&&Qr(f,Xe));if(Nt&&Ge&&Xe){if(Ci(Ge,Xe)){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const U=ce.isSavedBlock?"here":Pi(Ge,J.map((oe,mt)=>bs(oe,Ne[mt],l,ne,g)),n,f?.sectionCount??J.length);if(U==="unknown"){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof U=="number"&&f){f.sectionCount=J.length,f.sectionIndex=U,zt.current===f&&L(U),yn(D,U,s,i);return}}const Ct=Nt&&Ge&&Xe?ta({ancestor:Ge,mine:D,theirs:Xe}):null;if(Ct&&Ct.pointers.length>0&&f){f.sectionCount=J.length,uo({plan:Ct,formBase:f,target:i,sectionIndex:n,choices:Bi(Ct),changedAgain:!1,blockKey:ce.isSavedBlock?_s(he,ce):Ie,fresh:{}});return}const Pt=Ct?Ct.merged:null,rn=Pt??D,qr=Di({merged:!!Pt,tracked:f,current:zt.current,saved:D});Pt&&W.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Ca}),qr&&f&&(f.emitted=Pt,A(Pt));const Ss=qr||!Pt?rn:D;f&&(f.base=Ss,f.sectionCount=J.length,Ki(f,Ss));const Gr={onSuccess:()=>{f&&es.current.delete(f),k?.()},onError:U=>{if(f?.base===Ss&&Ge&&(f.base=Ge),U instanceof Pl){if(f&&(f.version=void 0),s<Kc){ye.current.delete(R),hn.current=!0;const oe=Li(s,U.carriedStored);setTimeout(()=>{hn.current=!1,yn(()=>{const mt=f?.emitted;return mt&&typeof mt=="object"?mt:D},n,s+1,i,oe.immediate),ye.current.delete(R),ar(xn(g))},oe.delay)}else us();return}B.reportError(U)}},Ur=U=>{pn.current=!0;let oe=!1;B.mutateAsync(U).then(()=>Gr.onSuccess(),mt=>{oe=!0,Gr.onError(mt)}).finally(()=>{pn.current=!1,ar(oe?xn(g):0),tr()})};if(ce.isSavedBlock){const U=_s(he,ce);if(!U)return;Ur({blockKey:U,data:rn,...Ge?{base:{value:Mi({startedFrom:Ge,stored:Xe,rebased:!!Pt,refused:s>0})}}:{},rebaseOnConflict:!1,guard:sa({formBase:f,rebased:!!Pt,versionOf:rr,productionVersionOf:oe=>aa(Nn,Cn,oe),...sr?{copy:{value:ne[U]}}:{}})});return}if(!Ie)return;const Hn={...ne[Ie]},Gt=[...J];if(ce.isMultivariate){const U=pt(he,ce);if(!U||!Ie)return;const oe=Fi(U,l,rn);Gt[n]=Bt(he,ce,oe)}else if(ce.isHidden){const U=Cs(he.__resolveType),oe=U?{...he.section}:{...he},mt=Array.isArray(oe.variants)?[...oe.variants]:[];mt[0]&&(mt[0]=ra(oe.__resolveType,mt[0],rn)),oe.variants=mt,U?Gt[n]={...he,section:oe}:Gt[n]=oe}else ce.isLazy?Gt[n]={...he,section:rn}:Gt[n]=rn;if(Y.length>1){const U=Hn.sections,oe=[...U?.variants??[]];oe[be]&&(oe[be]=ra(U?.__resolveType,oe[be],Gt)),Hn.sections={...U,variants:oe}}else Hn.sections=Gt;Ur({blockKey:Ie,data:Hn,rebaseOnConflict:!1,guard:sa({formBase:null,rebased:!1,versionOf:rr,productionVersionOf:U=>aa(Nn,Cn,U),...sr?{copy:{value:ne[Ie]}}:{}})})};if(_t.current={sectionIndex:n,sectionVariantIndex:l,write:E},j){_t.current=null,E();return}N.current=setTimeout(()=>{N.current=null,E()},xn(g))},go=t=>{tn.current=!1,L(t),lt(0),T([]),$(o=>o+1);const n=M[t],s=pe[t];if(Ce?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){xt(n,s,0,t);return}const a=wt(n,s,d,g);if(!a){A(null),H(null),qe(null),Fe(null),$t(null,t,0);return}A(a.data),H(a.resolveType),qe(null),Fe(null),$t(null,t,0)},ir=t=>{const n=t;m!==null&&(zt.current=Ei(zt.current,{sectionIndex:m,variantIndex:re.current.sectionVariantIndex,shown:Ze,next:n,sectionCount:re.current.rawSections.length})),A(n),m!==null&&yn(n,m)},ds=t=>{if(!y||!d||!u||!ae)return;const n={kind:"page",pageKey:y,pageName:String(ae.name??""),path:String(ae.path??"")},s=ia(d,n,u);s&&fn.save(y,()=>{const a=Nn.getQueryData(Ti.decofile(Cn))?.[y];if(!a||typeof a!="object"||a===null||Array.isArray(a))return null;const o={...a,...Bn.current};return Bn.current={},t?.raw!==void 0?cc(o,t.raw,u):t?.inner!==void 0?uc(n,s,o,t.inner):o})},lr=(t,n)=>{y&&(Bn.current[t]=n,ds())},vo=(t,n)=>{if(!y)return;const s=Qn([...M],t,n);m!==null&&(m===t?L(n):t<m&&n>=m?L(m-1):t>m&&n<=m&&L(m+1)),dt(s)},yo=t=>{if(!y)return;const n=M.filter((s,a)=>a!==t);m===t?Ht():m!==null&&m>t&&L(m-1),dt(n)},So=t=>{if(!y)return;const n=M[t];if(!n)return;const s=[...M];s.splice(t+1,0,gl(n)),m!==null&&m>t&&L(m+1),dt(s)},bo=t=>{if(!y)return;const n=M[t],s=pe[t];if(!n||!s)return;const a=s.isHidden?_i(n,g):ki(n,u);if(!a)return;const o=[...M];o[t]=a,m===t&&Ht(),dt(o)},xo=t=>{if(!y)return;const n=M[t],s=pe[t];if(!n||!s||s.isMultivariate)return;const a=xi(n);if(!a)return;const o=[...M];o[t]=a,m===t&&Ht(),dt(o)},_o=t=>{if(!y)return;const n=M[t],s=pe[t];if(!n||!s?.isSavedBlock)return;const a=wt(n,s,d,g);if(!a?.data)return;const{name:o,...i}=a.data,l=[...M];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&Ht(),dt(l)},ko=t=>{if(!y)return;const n=[...M,{__resolveType:t.resolveType}],s=n.length-1;dt(n,{onError:()=>{re.current.selectedSectionIndex===s&&Ht()}}),We(!1),L(s),lt(0),T([]),$(l=>l+1);const a=n[s],o=kn(n,d,g)[s];if(!a||!o)return;if(o.isMultivariate){xt(a,o,0);return}const i=wt(a,o,d,g);if(!i){A(null),H(null),qe(null),Fe(null);return}A(i.data),H(i.resolveType),qe(null),Fe(null)},cr=t=>{jn.current=t.append,We(!0)},wo=t=>{const n=jn.current;if(!n){ko(t);return}n({__resolveType:t.resolveType}),We(!1),jn.current=null},ur=t=>{if(m===null)return;const n=M[m],s=pe[m];!n||!s?.isMultivariate||(lt(t),T([]),$(a=>a+1),xt(n,s,t,m,!0))},Ro=t=>{if(m===null||!y)return;const n=M[m],s=pe[m];if(!n||!s?.isMultivariate)return;const a=pt(n,s);if(!a)return;const o=Si(a,t);if(!o){W.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...M];i[m]=Bt(n,s,o);const l=o.variants;let f=Me;t===Me?f=Math.min(t,l.length-1):t<Me&&(f=Me-1),lt(f),T([]),$(j=>j+1),xt(i[m],s,f),dt(i)},jo=t=>{if(m===null||!y)return;const n=M[m],s=pe[m];if(!n||!s?.isMultivariate)return;const a=pt(n,s);if(!a)return;const o=bi(a,t,g),i=[...M];i[m]=Bt(n,s,o);const l=Zr(a.variants??[],t,g);lt(l),T([]),$(f=>f+1),xt(i[m],s,l,m,g),dt(i)},Eo=(t,n)=>{if(m===null||!y||t===n)return;const s=M[m],a=pe[m];if(!s||!a?.isMultivariate)return;const o=pt(s,a);if(!o)return;const i=vi(o,t,n),l=[...M];l[m]=Bt(s,a,i);let f=Me;Me===t?f=n:t<Me&&n>=Me?f=Me-1:t>Me&&n<=Me&&(f=Me+1),lt(f),xt(l[m],a,f,m,g),dt(l)},Sn=t=>{const n=t??m;if(n===null||!y)return;const s=M[n],a=pe[n];if(!s||!a)return;const o=gi(s,a,void 0,u,g);if(!o){W.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...M];i[n]=o.section;const l=kn(i,d,g)[n];if(!l?.isMultivariate){W.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}L(n),lt(o.newVariantIndex),T([]),$(f=>f+1),xt(o.section,l,o.newVariantIndex,n,g),dt(i)},dr=()=>{if(m===null||!y)return;const t=M[m],n=pe[m];if(!t||!n?.isMultivariate)return;const s=pt(t,n);if(!s)return;const a=yi(t,n,s);if(!a){W.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const o=[...M];o[m]=a;const i=kn(o,d,g)[m];if(!i)return;lt(0),qe(null),Fe(null),T([]),$(f=>f+1);const l=wt(a,i,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),$t(null,m,0),dt(o)},Vo=async t=>{if(ie===null||!y)return;const n=Yn(t,d,u);if(n){W.error(n);return}const s=M[ie],a=pe[ie];if(!s||!a)return;const o=wt(s,a,d,g);if(!o){W.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...o.data,name:t};try{const l=await B.mutateAsync({blockKey:t,data:i,create:!0}),f=[...M];f[ie]={__resolveType:t},await B.mutateAsync({blockKey:y,data:on(d,y,f,te,me)}),m===ie&&Ht(),Ve(null),Gn(l)||W.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){W.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Dt(c,Kt(l))})}},fr=Se?.rule;if(yt&&m===null&&Q===null&&fr){const{resolveType:t,formValue:n}=Ut(fr,d??{},u??void 0);ee(t),se(n)}const sn=u?al(u):[],fs=u&&d?ol(u,d):[],Wt=g&&u&&d?dc(u,d):[],ms=(t,n)=>{if(Wt.length===0)return;const s=Fl(t);return{kinds:Wt,selected:s,campaignPrefill:fc(t),onPick:n,load:Gs}},mr=!q&&!!(at&&u&&d),pr=Q&&u?Un(Q,u):null,St=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},qt=async(t,n)=>{if(yc(n,t,u,g))try{await Pn.mutateAsync({blockKey:t})}catch(s){W.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Dt(c,Kt(s))})}},hr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:a}=re.current;if(!n)return;const o={...s[n]},i={...o.sections},l=[...i.variants??[]],f=l[a],j=f?.rule;if(Jt(j,s,u)){const h=j?.__resolveType??"",R=s[h],E=typeof R?.name=="string"?R.name:h,{__resolveType:D,...z}=t;B.mutate({blockKey:h,data:Ft(D??"",z,E)},{onSuccess:()=>k?.(),onError:B.reportError});return}f&&(l[a]={...f,rule:t}),o.sections={...i,variants:l},B.mutate({blockKey:n,data:o},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g))},gr=t=>{ee(t);const n=t?Ta(t,u):{__resolveType:Xr(u)};se(t?n:{}),hr(n)},vr=t=>{const n=t;se(n);const s=Q?{__resolveType:Q,...n}:{...n};hr(s)},In=async(t,n,s)=>{const a=mc(n,t);if(!a.ok)return a.reason==="conflict"&&W.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),xa),null;const o={};if(s){const i=s(a.rule);if(!i)return null;o[i.blockKey]=i.data}return a.blockWrite&&(o[a.blockWrite.blockKey]=a.blockWrite.block),Object.keys(o).length>0&&!(await Ls.apply({writes:o})).ok?null:(a.blockWrite&&W.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...xa,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:a.rule,projected:{...n,...o}})},yr=Wt.length>0?{kinds:Wt,load:Gs,prepare:async t=>(await In(t,re.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Il(re.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Ls.apply({writes:{[Ll(t).blockKey]:n.block}})).ok}}:null,Sr=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:a}=re.current;if(!n)return;const o=await In(t,s,f=>{const j=s[n],h=j?.sections;if(!h||typeof h!="object"||Array.isArray(h))return null;const R=h;if(!Array.isArray(R.variants))return null;const E=[...R.variants],D=E[a];return D?(E[a]={...D,rule:f},{blockKey:n,data:{...j,sections:{...R,variants:E}}}):null});if(!o)return;const{resolveType:i,formValue:l}=Ut(o.rule,o.projected,u??void 0);ee(i),se(l),k?.()},br=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:a}=re.current;if(!n)return;const o=s[n],i=o?.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],j=f[a];if(!j)return;const h=Mt(j.rule,s,u),R=cn(t);f[a]={...j,rule:R};const E={...s,[n]:{...o,sections:{...l,variants:f}}},{resolveType:D,formValue:z}=Ut(R,E,u??void 0);ee(D),se(z);try{await B.mutateAsync({blockKey:n,data:E[n]}),h&&h!==t&&await qt(h,E),k?.()}catch(ne){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Dt(c,Kt(ne))})}},xr=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=re.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(!l)return;const h=a[n],R=o[n];if(!h||!R?.isMultivariate)return;const E=pt(h,R);if(!E)return;const z=(E.variants??[])[s]?.rule;if(Jt(z,i,u)){const Y=z?.__resolveType??"",be=i[Y],Ie=typeof be?.name=="string"?be.name:Y,{__resolveType:he,...ce}=t;B.mutate({blockKey:Y,data:Ft(he??"",ce,Ie)},{onSuccess:()=>k?.(),onError:B.reportError});return}const ne=xs(E,s,t),J=[...a];J[n]=Bt(h,R,ne);const Ne=on(i,l,J,j,f);B.mutate({blockKey:l,data:Ne},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g)))},To=t=>{qe(t);const n=t?Ta(t,u):{__resolveType:Xr(u)};Fe(t?n:{}),xr(n)},Ao=t=>{const n=t;Fe(n);const s=Xt?{__resolveType:Xt,...n}:{...n};xr(s)},No=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(n===null||!l)return;const h=await In(t,i,D=>{const z=a[n],ne=o[n];if(!z||!ne?.isMultivariate)return null;const J=pt(z,ne);if(!J)return null;const Ne=[...a];return Ne[n]=Bt(z,ne,xs(J,s,D)),{blockKey:l,data:on(i,l,Ne,j,f)}});if(!h)return;const{resolveType:R,formValue:E}=Ut(h.rule,h.projected,u??void 0);qe(R),Fe(E),k?.()},Co=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(n===null||!l)return;const h=a[n],R=o[n];if(!h||!R?.isMultivariate)return;const E=pt(h,R);if(!E)return;const D=E.variants??[],z=Mt(D[s]?.rule,i,u),ne=cn(t),J=xs(E,s,ne),Ne=[...a];Ne[n]=Bt(h,R,J);const Y=on(i,l,Ne,j,f),be={...i,[l]:Y},{resolveType:Ie,formValue:he}=Ut(ne,be,u??void 0);qe(Ie),Fe(he);try{await B.mutateAsync({blockKey:l,data:Y}),z&&z!==t&&await qt(z,be),k?.()}catch(ce){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Dt(c,Kt(ce))})}};if(!q&&!ae)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.noPageFound",{currentPath:V})});if(q&&!rs)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.globalBlockNotFound")});const je=m!==null?pe[m]??null:null,_r=m!==null?M[m]:null,kr=_r&&je?.isMultivariate?pt(_r,je):null,Vt=kr?Yr(kr,we,g):[],Ln=Math.min(Me,Math.max(Vt.length-1,0)),kt=Vt[Ln]??null,Tt=je?.isMultivariate===!0,ps=m!==null&&je!==null,At=ps&&(Tt||!!(Fn&&Ze)),Po=At&&!q&&je?.isSavedBlock===!0,ft=q||Po,wr=q?Us:je?.label??"",Bo=Xt&&u?Un(Xt,u):null,Rr=(t,n)=>n&&Z?`${t} · ${n}`:t,jr=je?je.variantOf??je.label:"",Do=(()=>{const t=Tt&&kt?kt.label:null;return t?Z?[Rr(jr,t)]:[je.label,t]:[je?.label??""]})(),hs=Rr(ae?.name??"",yt?Se?.label:null),On=At&&(!q||K.length>0)?q?[Us,...K]:[hs,...Do,...K]:[],Er=Re&&ae?[ae.name,"SEO",...Ks]:[],Vr=c("sectionsEditor.pageVariantTabs.variantsLabel"),Tr=Yt&&ae?[ae.name,Vr]:Lt&&ae&&je?[hs,jr,Vr]:[],zn=Tr.length>0?Tr:Er.length>0?Er:ft?On.length>0?On:[wr]:On.length>0?On:[hs],Ar=ps&&!Tt&&!je?.isHidden&&!!y,Ko=ft||!q&&yt&&!!Se||Ar,Mo=ps&&!Tt&&!q&&K.length===0&&!!je&&Da(je)&&!!y,Fo=Z&&At&&!Lt&&Tt&&K.length===0&&!!kt,Nr=Z&&K.length>0?la(K[K.length-1]):null,Io=K.length>1?la(K[K.length-2]):null,Cr=ft?wr:At?je?.label??"":ae?.name??"",Lo=Yt||Lt?c("sectionsEditor.pageVariantTabs.variantsLabel"):Re?c("sectionsEditor.panelSections.seo"):Nr??Cr,Pr=Lt?je?.variantOf??je?.label??"":Yt||Re?ae?.name??"":Nr?Io??Cr:ft?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):At?ae?.name??"":ae?.path??"",gs=!Yt&&!Lt&&!Re&&!At&&!ft,Oo=!Z&&!Re&&!q&&Tt&&K.length===0,bn=()=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const t=d[y],n=gc(t.sections,M,u,g);if(!n)return;const{sections:s,newVariantIndex:a}=n;B.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{de(a),L(null),A(null),H(null),T([]),se(null),ee(null)},onError:B.reportError})},$n=(t,n,s)=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const a=d[y],o=a.sections;if(!o||typeof o!="object"||Array.isArray(o))return;const i=o;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const f=vc(i,l),j={...d,[y]:{...a,sections:f}};B.mutate({blockKey:y,data:j[y]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const R of h)await qt(R,j)})()},onError:B.reportError})},Br=(t,n)=>{if(t===n)return;let s=te;te===t?s=n:t<te&&n>=te?s=te-1:t>te&&n<=te&&(s=te+1),de(s);const a=Qn(me.map(o=>({rule:o.rule})),t,n);is(a,s),$n(o=>Qn(o,t,n))},Dr=t=>{const n=me[t]?.rule,s=Mt(n,d??{},u??void 0);$n(a=>a.length<=1?null:(a.splice(t,1),a),()=>{me.length-1===1?de(0):t<te?de(te-1):t===te&&de(Math.max(0,t-1)),L(null),A(null),H(null),T([]),se(null),ee(null)},s)},zo=()=>{const t=me.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!wi(n.rule)).map(({variant:n})=>Mt(n.rule,d??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=Oi({variants:n}),a=n[s];return a?[{...a,rule:zi(u)}]:null},()=>{de(0),L(null),A(null),H(null),T([]),se(null),ee(null),Vn(!1)},t)},Kr=t=>{let n=t+1;$n(s=>(n=Zr(s,t,g),Sc(s,t,g)),()=>{de(n),L(null),A(null),H(null),T([]),se(null),ee(null)})},$o=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const s=re.current.activePageKey,a=re.current.decofile;if(!s)return;const o=a[s],i=o.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],j=f[t];if(!j?.rule||typeof j.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=j.rule,R=n.trim();en(!0);try{if(!R){if(!Jt(h,a,u)){F(null);return}const Y=h.__resolveType??"";f[t]={...j,rule:Ts(h,a,u)};const be={...a,[s]:{...o,sections:{...l,variants:f}}};await B.mutateAsync({blockKey:s,data:be[s]}),await qt(Y,be),F(null),k?.();return}const E=As(h,a,u);if(!E){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(E.blockKey){await B.mutateAsync({blockKey:E.blockKey,data:Ft(E.resolveType,E.data,R)}),F(null),k?.();return}const D=Jn(R),z=Yn(D,a,u);if(z){W.error(z);return}const ne=Ft(E.resolveType,E.data,R);let J=null,Ne=!1;try{const Y=await B.mutateAsync({blockKey:D,data:ne,create:!0});Ne=Gn(Y),J=Ne?null:D,f[t]={...j,rule:cn(D)},await B.mutateAsync({blockKey:s,data:{...o,sections:{...l,variants:f}}}),J=null}catch(Y){throw J&&await Pn.mutateAsync({blockKey:J}).catch(()=>{}),Y}F(null),Ne||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:R})),k?.()}catch(E){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Dt(c,Kt(E))})}finally{en(!1)}},Ho=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{selectedSectionIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(s===null||!l)return;const h=a[s],R=o[s];if(!h||!R?.isMultivariate)return;const E=pt(h,R);if(!E)return;const D=E.variants??[],z=D[t];if(!z?.rule||typeof z.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const ne=z.rule,J=n.trim();en(!0);const Ne=async Y=>{const be={...E,variants:Y},Ie=[...a];Ie[s]=Bt(h,R,be);const he=on(i,l,Ie,j,f);return await B.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!J){if(!Jt(ne,i,u)){O(null);return}const Xe=ne.__resolveType??"",Nt=[...D];Nt[t]={...z,rule:Ts(ne,i,u)};const Ct=await Ne(Nt);await qt(Xe,Ct),O(null),k?.();return}const Y=As(ne,i,u);if(!Y){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Y.blockKey){await B.mutateAsync({blockKey:Y.blockKey,data:Ft(Y.resolveType,Y.data,J)}),O(null),k?.();return}const be=Jn(J),Ie=Yn(be,i,u);if(Ie){W.error(Ie);return}const he=Ft(Y.resolveType,Y.data,J);let ce=null,Ge=!1;try{const Xe=await B.mutateAsync({blockKey:be,data:he,create:!0});Ge=Gn(Xe),ce=Ge?null:be;const Nt=[...D];Nt[t]={...z,rule:cn(be)},await Ne(Nt),ce=null}catch(Xe){throw ce&&await Pn.mutateAsync({blockKey:ce}).catch(()=>{}),Xe}O(null),Ge||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:J})),k?.()}catch(Y){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Dt(c,Kt(Y))})}finally{en(!1)}},Mr=async(t,n,s)=>{A(s);try{await B.mutateAsync({blockKey:t,data:s})}catch(a){throw A(o=>o===s?n:o),a}},Wo={rename:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:a,decofile:o}=re.current;if(!a)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n],f=l?.rule&&typeof l.rule=="object"?l.rule:void 0,j=async R=>{const E={...t,variants:R};return await Mr(a,t,E),{...o,[a]:E}},h=Dc(f,s,o,u);if(h.kind!=="noop"){if(h.kind==="error"){W.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const D=[...i];D[n]={...l,rule:h.inlinedRule};const z=await j(D);await qt(h.blockKey,z),k?.();return}if(h.kind==="updateBlock"){await B.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let R=null,E=!1;try{const D=await B.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});E=Gn(D),R=E?null:h.blockId;const z=[...i];z[n]={...l,rule:h.reference},await j(z),R=null}catch(D){throw R&&await Pn.mutateAsync({blockKey:R}).catch(()=>{}),D}E||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(R){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Dt(c,Kt(R))})}finally{en(!1)}}},selectGlobal:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:a,decofile:o}=re.current;if(!a)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const f=Mt(l.rule,o,u);i[n]={...l,rule:cn(s)};const j={...t,variants:i},h={...o,[a]:j};try{await Mr(a,t,j),f&&f!==s&&await qt(f,h),k?.()}catch(R){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Dt(c,Kt(R))})}},selectNamedRule:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:a,decofile:o}=re.current;if(!a)return;let i=null;!await In(s,o,f=>{const j=Array.isArray(t.variants)?[...t.variants]:[],h=j[n];return h?(j[n]={...h,rule:f},i={...t,variants:j},{blockKey:a,data:i}):null})||!i||(A(i),k?.())}},Fr=()=>{Ht(),g&&$t(null,-1,0)},Ir=t=>{dn(t),ds({inner:t})},Lr=t=>{An(t),ds({raw:t})},Or=()=>{dn(null),Ot([])},zr=()=>Qt(t=>t+1),$r=()=>{fn.flush(),un(!1),dn(null),An(void 0),Ot([]),Qt(t=>t+1),ge?.()},qo=()=>{Vn(!1),Tn(!1),L(null),un(!0)},Go=()=>{Re&&$r(),L(null),Vn(!0)},Uo=()=>Tn(!0),vs=t=>{if(Yt&&t===0){Vn(!1);return}if(Lt&&t<2){Tn(!1),t===0&&L(null);return}if(Re){if(t===0){$r();return}if(t===1){Ot([]),Qt(s=>s+1);return}Ot(Ks.slice(0,t-1)),Qt(s=>s+1);return}if(q){T(K.slice(0,t)),$(s=>s+1);return}if(t===0){Fr();return}if(t===1){T([]),$(s=>s+1);return}const n=!Z&&Tt&&kt?1:0;if(n===1&&t===2){T([]),$(s=>s+1);return}T(K.slice(0,t-1-n))},ys=zn.length>1?r.jsx("button",{type:"button",onClick:()=>vs(vl(zn.length,{isMultivariateSectionTop:Oo})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("sectionsEditor.sectionsEditor.back"),className:le("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ft?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:r.jsx(kl,{className:"size-4"})}):null,Jo=ft||At||Re?Ko&&r.jsxs("div",{className:le("border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!q&&yt&&Se&&r.jsxs("button",{type:"button",onClick:Fr,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:Se.label}),className:le("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",ll),children:[r.jsx(il,{rule:Rs(Se.rule,d??{},u??void 0),matchers:sn}),r.jsx("span",{className:"max-w-[160px] truncate",children:Se.label})]}),r.jsx("div",{className:"flex-1"}),ft&&r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Xn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Ar&&r.jsx(qn,{onClick:()=>Sn()})]}),ft&&r.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:c("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):r.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(ca,{pageKey:y,initialName:ae.name,initialPath:ae.path,onFieldChange:lr,variant:"header"})}),r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>un(!0),children:r.jsx(va,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Le&&y?Le():bt(!0),children:r.jsx(ya,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(qn,{onClick:bn})]}),Yo=r.jsxs(r.Fragment,{children:[yt&&y&&r.jsx(ua,{listKey:y,variants:me,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Kr,onDelete:Dr,onAdd:bn}),yt&&Q!==null&&r.jsx(da,{className:"mt-3",children:r.jsx("div",{className:le("space-y-3",Zt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Q,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:De,onChange:vr,formKey:`${te}:${Q??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})})]}),Hr=r.jsxs(r.Fragment,{children:[r.jsx(cl,{listKey:`${y??""}:${m??""}`,variants:Vt.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:ur,onRename:O,onDuplicate:jo,onDelete:Ro,onRemoveAll:dr,onReorder:Eo,onAdd:()=>Sn()}),r.jsx(da,{children:r.jsx(ks,{currentRt:Xt??"",currentLabel:_n(kt?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(kt?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:To,onSelectGlobal:Co,named:ms(kt?.rule,No),namedRow:ws(kt?.rule,Wt),rule:kt?.rule,schema:Bo,formValue:Ha,onChange:Ao,formKey:`${m??"none"}:${Ln}:${Xt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr=r.jsx("div",{className:le(Z?"px-2":"p-2 pt-3"),children:r.jsx(Pc,{listKey:`${y??""}-${te}`,rawSections:M,sections:pe,meta:u,decofile:d,selectedIndex:m,onSelect:t=>{go(t),Je?.(t)},onReorder:vo,onDelete:yo,onDuplicate:So,onMakeReusable:Ve,onToggleHidden:bo,onToggleLazy:rt?xo:void 0,onAddVariant:Sn,onDetach:_o,onAddSection:()=>We(!0),canAddSection:mr})}),Qo=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[y&&ae&&r.jsx(ca,{pageKey:y,initialName:ae.name,initialPath:ae.path,onFieldChange:lr}),nn&&y?r.jsx(Ea,{rawSeo:Dn,innerSeo:os,defaultResolveType:Ys,seoTypesLoading:g&&!u,seoSchema:Qs,activeResolveType:Kn,seoTypeOptions:Js,formResetKey:Ms,siteDefaultSeo:Xs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Xo=r.jsx(ln,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:r.jsx("div",{className:"mx-auto max-w-2xl",children:nn&&y?r.jsx(Ea,{rawSeo:Dn,innerSeo:os,defaultResolveType:Ys,seoTypesLoading:g&&!u,seoSchema:Qs,activeResolveType:Kn,seoTypeOptions:Js,formResetKey:Ms,siteDefaultSeo:Xs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),Zo=r.jsxs(ln,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&y&&r.jsx(ua,{listKey:y,variants:me,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Kr,onDelete:Dr,onAdd:bn}),yt&&Q!==null&&r.jsxs("div",{className:le("px-3 border-b",En?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>za(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":En,children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.sectionsEditor.variantRule")}),En?r.jsx(Sl,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(bl,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),En&&r.jsx("div",{className:le("space-y-3",Zt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Q,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:De,onChange:vr,formKey:`${te}:${Q??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr]},"editor-section-list");return r.jsx(ul,{value:g,children:r.jsx(dl,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!Z&&ys&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ys}),(Z||zn.length>1)&&r.jsx(fl,{crumbs:zn,onSelect:vs,onSelectRoot:()=>{fn.flush(),Ue?Ue():vs(0)}}),r.jsx("div",{className:"shrink-0",children:Z?r.jsxs("div",{className:le("flex items-center gap-2 border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[Z&&ys,ft&&r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Xn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r.jsx("span",{className:"truncate text-sm font-semibold",children:Lo}),Pr&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Pr})]}),gs&&yt&&Se&&r.jsx(fa,{variants:me,activeIndex:te,onSelect:cs,onManage:Go,onRemoveAll:zo}),Fo&&r.jsx(fa,{variants:Vt,activeIndex:Ln,onSelect:ur,onManage:Uo,onRemoveAll:dr}),gs&&!yt&&r.jsx(qn,{onClick:bn}),Mo&&r.jsx(qn,{onClick:()=>Sn()}),r.jsx(ml,{}),gs&&r.jsxs(r.Fragment,{children:[r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:qo,children:r.jsx(va,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Le&&r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>bt(!0),children:r.jsx(ya,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Jo}),ut&&r.jsx(mi,{open:!0,fields:pi(ut.plan,ut.target.schema),choices:ut.choices,changedAgain:ut.changedAgain,author:Hs??null,authorPending:Hs===void 0,fieldsAsLabeled:$s!==null,fresh:ut.fresh,keepTyping:g,onChoose:(t,n)=>ho({...ut.choices,[t]:n}),onApply:po},Fc(ut.formBase)),Lt?r.jsx(ma,{onAdd:()=>Sn(),children:Hr},"editor-section-variants"):At?r.jsxs(ln,{viewportRef:fe,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!Z&&Tt&&Vt.length>0&&K.length===0&&Hr,r.jsx(Va,{value:yr,children:r.jsx(pa,{value:q&&g?Be:null,children:r.jsx(ha,{activeSchema:Fn,formValue:Ze,formResetKey:Ke,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:K,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr,onVariantMatcherOp:q?Wo:void 0})})})]},"editor-section-form"):q?r.jsx(ln,{viewportRef:fe,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(Va,{value:yr,children:r.jsx(pa,{value:q&&g?Be:null,children:r.jsx(ha,{activeSchema:Fn,formValue:Ze,formResetKey:Ke,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:K,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr})})})},"editor-global-block"):Re?Z?r.jsx(ln,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Qo})},"editor-seo"):Xo:Yt?r.jsx(ma,{onAdd:bn,children:Yo},"editor-variants"):Z?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(ln,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:Wr})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Ns,{canAddSection:mr,onAddSection:()=>We(!0)})})]},"editor-section-list"):Zo,r.jsx(pl,{open:ie!==null,onOpenChange:t=>{t||Ve(null)},defaultBlockId:ie!==null?Jn(pe[ie]?.label??""):"",isPending:B.isPending,onSubmit:Vo}),at&&r.jsx(oc,{open:Ae,onOpenChange:t=>{We(t),t||(jn.current=null)},meta:u,decofile:d,previewBaseUrl:st,onSelect:wo}),ht&&y&&d&&r.jsx($l,{open:ht,onOpenChange:bt,pageKey:y,decofile:d}),Te!==null&&r.jsx(ga,{open:!0,initialName:Jt(me[Te]?.rule,d??{},u??void 0)?_n(me[Te]?.rule,d??{},we,u??void 0):"",autoLabel:we(Rs(me[Te]?.rule,d??{},u??void 0)),isPending:Zt,onSubmit:async t=>{await $o(Te,t)},onOpenChange:t=>{!t&&!Zt&&F(null)}}),tt!==null&&r.jsx(ga,{open:!0,initialName:Jt(Vt[tt]?.rule,d??{},u??void 0)?_n(Vt[tt]?.rule,d??{},we,u??void 0):"",autoLabel:we(Rs(Vt[tt]?.rule,d??{},u??void 0)),isPending:Zt,onSubmit:async t=>{await Ho(tt,t)},onOpenChange:t=>{!t&&!Zt&&O(null)}})]})})})}export{mf as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as C,b as ee,j as s,q as ze,K as Ne,r as X,ar as Ae,B as Oe,h as Pe}from"./index-DVvmeJMJ.js";import{a1 as we}from"./agent-icon-uDqFfzhf.js";import{S as Ee}from"./scroll-area-D1j-ZNOk.js";import{X as Ie,aJ as Ue,k as fe,aa as Be,aK as Me,aL as Re,aM as He,d as Qe,aN as Ve,V as _e,aO as qe,am as Ge,i as We,aP as Ye,an as Je,h as Xe}from"./parse-sections-D2w3wSuP.js";import{Z as Ze,A as et}from"./blocks-tab-states-DS5PjKyJ.js";import{L as Fe}from"./label-DxsI69Ti.js";import{S as Ce}from"./switch-BoeP0_DT.js";import{c as tt,b as st,a as lt,d as ot,S as it}from"./select-CBAbBtbp.js";import{l as nt,t as rt,u as at,m as ct}from"./site-editor-toast-Bz5hIXUq.js";import{c as dt,u as ft}from"./hosted-reconcile-C7zHteUc.js";import{b as Ke}from"./Tool01-DB3xqZeL.js";const mt="https://deco.cx/docs/en/performance/edge-async-render";function ut(a){const e=C.c(30),{rawSeo:t,onEnableChange:i,onAsyncRenderChange:d,enableUnavailable:r,enableUnavailableHint:l,children:o}=a,u=r===void 0?!1:r,c=ee(),m=Ie();let p;e[0]!==t?(p=fe(t),e[0]=t,e[1]=p):p=e[1];const n=p;let f;e[2]!==t?(f=Ue(t),e[2]=t,e[3]=f):f=e[3];const h=f,x=!n&&u;let y;e[4]!==c?(y=c("sectionsEditor.seoFormChrome.enableLabel"),e[4]=c,e[5]=y):y=e[5];let v;e[6]!==y?(v=s.jsx(Fe,{htmlFor:"seo-enable",className:"text-sm font-medium",children:y}),e[6]=y,e[7]=v):v=e[7];const k=x&&l?"seo-enable-hint":void 0;let b;e[8]!==x||e[9]!==n||e[10]!==i||e[11]!==k?(b=s.jsx(Ce,{id:"seo-enable",checked:n,disabled:x,"aria-describedby":k,onCheckedChange:i}),e[8]=x,e[9]=n,e[10]=i,e[11]=k,e[12]=b):b=e[12];let S;e[13]!==v||e[14]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v,b]}),e[13]=v,e[14]=b,e[15]=S):S=e[15];let j;e[16]!==x||e[17]!==l?(j=x&&l&&s.jsx("p",{id:"seo-enable-hint",className:"text-xs leading-normal text-muted-foreground",children:l}),e[16]=x,e[17]=l,e[18]=j):j=e[18];let g;e[19]!==h||e[20]!==o||e[21]!==m||e[22]!==n||e[23]!==d||e[24]!==c?(g=n&&(m||!d?o:s.jsxs(s.Fragment,{children:[o,s.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"text-sm font-medium",children:c("sectionsEditor.seoFormChrome.asyncRenderLabel")}),s.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",s.jsx("a",{href:mt,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:c("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),s.jsx(Ce,{id:"seo-async-render",checked:h,onCheckedChange:d,className:"shrink-0"})]})]})),e[19]=h,e[20]=o,e[21]=m,e[22]=n,e[23]=d,e[24]=c,e[25]=g):g=e[25];let N;return e[26]!==g||e[27]!==S||e[28]!==j?(N=s.jsxs("div",{className:"space-y-4",children:[S,j,g]}),e[26]=g,e[27]=S,e[28]=j,e[29]=N):N=e[29],N}function pt(a){const e=C.c(20),{options:t,value:i,onChange:d}=a,r=ee();if(t.length<=1)return null;let l;e[0]!==r?(l=r("sectionsEditor.seoTypeSelect.label"),e[0]=r,e[1]=l):l=e[1];let o;e[2]!==l?(o=s.jsx(Fe,{className:"text-xs text-muted-foreground",children:l}),e[2]=l,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("sectionsEditor.seoTypeSelect.placeholder"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==u?(c=s.jsx(st,{className:"w-full",children:s.jsx(lt,{placeholder:u})}),e[6]=u,e[7]=c):c=e[7];let m;e[8]!==t?(m=t.filter(xt).map(ht),e[8]=t,e[9]=m):m=e[9];let p;e[10]!==m?(p=s.jsx(ot,{children:m}),e[10]=m,e[11]=p):p=e[11];let n;e[12]!==d||e[13]!==c||e[14]!==p||e[15]!==i?(n=s.jsxs(it,{value:i,onValueChange:d,children:[c,p]}),e[12]=d,e[13]=c,e[14]=p,e[15]=i,e[16]=n):n=e[16];let f;return e[17]!==o||e[18]!==n?(f=s.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[o,n]}),e[17]=o,e[18]=n,e[19]=f):f=e[19],f}function ht(a){return s.jsx(tt,{value:a.resolveType,children:a.title},a.resolveType)}function xt(a){return a.resolveType.length>0}function yt(a){const e=C.c(40),{rawSeo:t,innerSeo:i,defaultResolveType:d,seoSchema:r,activeResolveType:l,seoTypeOptions:o,formResetKey:u,siteDefaultSeo:c,onBreadcrumbChange:m,onPersistRaw:p,onInnerChange:n,onClearForm:f,onBumpFormKey:h,beforeFields:x,asyncRenderAvailable:y,seoTypesLoading:v}=a,k=y===void 0?!0:y,b=v===void 0?!1:v,S=ee(),g=!Be()||!b&&d!=="";let N;e[0]!==d||e[1]!==h||e[2]!==f||e[3]!==p||e[4]!==g?(N=K=>{if(K){if(!g)return;const $=He(d);p($),f(),h();return}p(null),f(),h()},e[0]=d,e[1]=h,e[2]=f,e[3]=p,e[4]=g,e[5]=N):N=e[5];const w=N;let E;e[6]!==p||e[7]!==t?(E=K=>{const $=Me(K,t);p($)},e[6]=p,e[7]=t,e[8]=E):E=e[8];const T=E;let _;e[9]!==h||e[10]!==n?(_=K=>{n({__resolveType:K}),h()},e[9]=h,e[10]=n,e[11]=_):_=e[11];const L=_,z=!g;let R;e[12]!==g||e[13]!==b||e[14]!==S?(R=g||b?void 0:S("sectionsEditor.seoFormChrome.noSeoTypeHint"),e[12]=g,e[13]=b,e[14]=S,e[15]=R):R=e[15];const Y=k?T:void 0;let P;e[16]!==l||e[17]!==L||e[18]!==t||e[19]!==r||e[20]!==o?(P=fe(t)&&r&&l&&o&&o.length>0&&s.jsx(pt,{options:o,value:l,onChange:L}),e[16]=l,e[17]=L,e[18]=t,e[19]=r,e[20]=o,e[21]=P):P=e[21];let F;e[22]!==l||e[23]!==u||e[24]!==i||e[25]!==m||e[26]!==n||e[27]!==t||e[28]!==r||e[29]!==c?(F=fe(t)&&r&&l&&s.jsx(Re,{schema:r,resolveType:l,value:i,formResetKey:u,onChange:K=>n(K),onBreadcrumbChange:m,siteDefaultSeo:c}),e[22]=l,e[23]=u,e[24]=i,e[25]=m,e[26]=n,e[27]=t,e[28]=r,e[29]=c,e[30]=F):F=e[30];let U;return e[31]!==x||e[32]!==w||e[33]!==t||e[34]!==F||e[35]!==z||e[36]!==R||e[37]!==Y||e[38]!==P?(U=s.jsxs(ut,{rawSeo:t,onEnableChange:w,enableUnavailable:z,enableUnavailableHint:R,onAsyncRenderChange:Y,children:[x,P,F]}),e[31]=x,e[32]=w,e[33]=t,e[34]=F,e[35]=z,e[36]=R,e[37]=Y,e[38]=P,e[39]=U):U=e[39],U}function Se(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function vt(a,e,t,i){if(a.kind==="page"){if(!Se(t))return null;const d=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:i===null?null:Ve(i,d)}}return Se(t)?e.siteKind==="block"?i:{...t,seo:i}:null}function gt(a,e,t){if(e===null&&Ze(t??void 0)){const{seo:i,...d}=a;return d}return{...a,seo:e}}function bt(a,e){const t=a.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function St(a){const e=C.c(29),{orgSlug:t,virtualMcpId:i,branch:d,target:r,resolved:l,meta:o,onSaved:u}=a,c=ze();let m;e[0]!==d||e[1]!==t||e[2]!==i?(m={orgSlug:t,virtualMcpId:i,branch:d},e[0]=d,e[1]=t,e[2]=i,e[3]=m):m=e[3];const p=nt(m);let n;e[4]!==d||e[5]!==t||e[6]!==i?(n={orgSlug:t,virtualMcpId:i,branch:d},e[4]=d,e[5]=t,e[6]=i,e[7]=n):n=e[7];let f;e[8]!==u?(f={onSaved:u,holdsCopy:!0},e[8]=u,e[9]=f):f=e[9];const{save:h,flush:x,isPending:y,hold:v,v8:k}=Qe(n,f),b=k?p:`${t}/${i}/${d}`;let S;e[10]!==b||e[11]!==c||e[12]!==l||e[13]!==h||e[14]!==r?(S=E=>{l&&h(l.blockKey,()=>{const _=c.getQueryData(Ne.decofile(b))?.[l.blockKey];return vt(r,l,_,E)})},e[10]=b,e[11]=c,e[12]=l,e[13]=h,e[14]=r,e[15]=S):S=e[15];const j=S;let g;e[16]!==b||e[17]!==o||e[18]!==c||e[19]!==l||e[20]!==h||e[21]!==r?(g=E=>{!l||r.kind!=="page"||h(l.blockKey,()=>{const _=c.getQueryData(Ne.decofile(b))?.[l.blockKey];return Se(_)?gt(_,E,o):null})},e[16]=b,e[17]=o,e[18]=c,e[19]=l,e[20]=h,e[21]=r,e[22]=g):g=e[22];const N=g;let w;return e[23]!==x||e[24]!==v||e[25]!==y||e[26]!==N||e[27]!==j?(w={persistSeo:j,persistRawSeo:N,flush:x,isPending:y,hold:v},e[23]=x,e[24]=v,e[25]=y,e[26]=N,e[27]=j,e[28]=w):w=e[28],w}function Z(a){return typeof a=="string"&&a.trim()?a:void 0}function Te(a,e){if(a){if(e)try{const t=new URL(a,e).href;return _e(t)}catch{return}return _e(a)}}function jt(a){if(!a)return{};const e=Z(a.title),t=Z(a.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:Z(a.description),image:Z(a.image),favicon:Z(a.favicon)}}function kt(a){if(!a)return"example.com";try{return new URL(a).host}catch{return"example.com"}}const Nt=[{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 je(a){const e=C.c(10),{src:t,className:i,iconSize:d}=a,r=d===void 0?20:d;if(t){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={objectFit:"cover"},e[0]=c):c=e[0];let m;return e[1]!==i||e[2]!==t?(m=s.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:i,style:c}),e[1]=i,e[2]=t,e[3]=m):m=e[3],m}let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=l):l=e[4];let o;e[5]!==r?(o=s.jsx(Ke,{size:r}),e[5]=r,e[6]=o):o=e[6];let u;return e[7]!==i||e[8]!==o?(u=s.jsx("div",{className:i,style:l,children:o}),e[7]=i,e[8]=o,e[9]=u):u=e[9],u}function wt(a){const e=C.c(33),{seo:t,host:i,path:d,t:r}=a;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={background:"#fff",border:"1px solid #dadce0"},e[0]=l):l=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={background:"#f1f3f4"},e[1]=o):o=e[1];let u;e[2]!==t.favicon?(u=s.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:o,children:t.favicon?s.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):s.jsx(Ke,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#202124"},e[4]=c):c=e[4];let m;e[5]!==i?(m=s.jsx("div",{className:"truncate text-[13px] leading-tight",style:c,children:i}),e[5]=i,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let n;e[8]!==i||e[9]!==d?(n=s.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[i,d]}),e[8]=i,e[9]=d,e[10]=n):n=e[10];let f;e[11]!==m||e[12]!==n?(f=s.jsxs("div",{className:"min-w-0",children:[m,n]}),e[11]=m,e[12]=n,e[13]=f):f=e[13];let h;e[14]!==u||e[15]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,f]}),e[14]=u,e[15]=f,e[16]=h):h=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x={color:"#1a0dab"},e[17]=x):x=e[17];let y;e[18]!==t.title||e[19]!==r?(y=t.title??r("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=r,e[20]=y):y=e[20];let v;e[21]!==y?(v=s.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:x,children:y}),e[21]=y,e[22]=v):v=e[22];let k;e[23]===Symbol.for("react.memo_cache_sentinel")?(k={color:"#4d5156"},e[23]=k):k=e[23];let b;e[24]!==t.description||e[25]!==r?(b=t.description??r("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=r,e[26]=b):b=e[26];let S;e[27]!==b?(S=s.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:k,children:b}),e[27]=b,e[28]=S):S=e[28];let j;return e[29]!==v||e[30]!==S||e[31]!==h?(j=s.jsxs("div",{className:"rounded-lg p-3 text-left",style:l,children:[h,v,S]}),e[29]=v,e[30]=S,e[31]=h,e[32]=j):j=e[32],j}function Et(a){const e=C.c(26),{seo:t,host:i,t:d}=a;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"#fff",border:"1px solid #e2e8f0"},e[0]=r):r=e[0];let l;e[1]!==t.image?(l=s.jsx(je,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o={borderTop:"1px solid #e2e8f0"},e[3]=o):o=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[4]=u):u=e[4];let c;e[5]!==i?(c=s.jsx("div",{className:"truncate text-[11px]",style:u,children:i}),e[5]=i,e[6]=c):c=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];let p;e[8]!==t.title||e[9]!==d?(p=t.title??d("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=d,e[10]=p):p=e[10];let n;e[11]!==p?(n=s.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[11]=p,e[12]=n):n=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#60666c"},e[13]=f):f=e[13];let h;e[14]!==t.description||e[15]!==d?(h=t.description??d("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=d,e[16]=h):h=e[16];let x;e[17]!==h?(x=s.jsx("div",{className:"line-clamp-2 text-[12px]",style:f,children:h}),e[17]=h,e[18]=x):x=e[18];let y;e[19]!==x||e[20]!==c||e[21]!==n?(y=s.jsxs("div",{className:"px-3 py-2",style:o,children:[c,n,x]}),e[19]=x,e[20]=c,e[21]=n,e[22]=y):y=e[22];let v;return e[23]!==y||e[24]!==l?(v=s.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:r,children:[l,y]}),e[23]=y,e[24]=l,e[25]=v):v=e[25],v}function _t(a){const e=C.c(36),{seo:t,host:i,accent:d,t:r}=a;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={background:"#f0f2f5"},e[0]=l):l=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#3b4045"},e[1]=o):o=e[1];let u;e[2]!==r?(u=r("sectionsEditor.seoPreview.chatCardHint"),e[2]=r,e[3]=u):u=e[3];let c;e[4]!==u?(c=s.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:o,children:u}),e[4]=u,e[5]=c):c=e[5];const m=`3px solid ${d}`;let p;e[6]!==m?(p={background:"#fff",borderLeft:m},e[6]=m,e[7]=p):p=e[7];let n;e[8]!==t.image?(n=s.jsx(je,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=n):n=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1c2024"},e[10]=f):f=e[10];let h;e[11]!==t.title||e[12]!==r?(h=t.title??r("sectionsEditor.seoPreview.fallbackTitle"),e[11]=t.title,e[12]=r,e[13]=h):h=e[13];let x;e[14]!==h?(x=s.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:f,children:h}),e[14]=h,e[15]=x):x=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y={color:"#60666c"},e[16]=y):y=e[16];let v;e[17]!==t.description||e[18]!==r?(v=t.description??r("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=r,e[19]=v):v=e[19];let k;e[20]!==v?(k=s.jsx("div",{className:"line-clamp-2 text-[11px]",style:y,children:v}),e[20]=v,e[21]=k):k=e[21];let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b={color:"#8a9099"},e[22]=b):b=e[22];let S;e[23]!==i?(S=s.jsx("div",{className:"mt-0.5 text-[10px]",style:b,children:i}),e[23]=i,e[24]=S):S=e[24];let j;e[25]!==x||e[26]!==k||e[27]!==S?(j=s.jsxs("div",{className:"px-2.5 py-1.5",children:[x,k,S]}),e[25]=x,e[26]=k,e[27]=S,e[28]=j):j=e[28];let g;e[29]!==j||e[30]!==p||e[31]!==n?(g=s.jsxs("div",{className:"overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-md))]",style:p,children:[n,j]}),e[29]=j,e[30]=p,e[31]=n,e[32]=g):g=e[32];let N;return e[33]!==g||e[34]!==c?(N=s.jsxs("div",{className:"rounded-lg p-2 text-left",style:l,children:[c,g]}),e[33]=g,e[34]=c,e[35]=N):N=e[35],N}function Ct(a){const e=C.c(39),{seo:t,host:i,accent:d,dark:r,t:l}=a,o=r?"#2b2d31":"#fff",u=r?"#00a8fc":"#1264a3",c=r?"#dbdee1":"#3b4045",m=r?"#949ba4":"#8a9099",p=r?"none":"1px solid #e2e8f0";let n;e[0]!==o||e[1]!==p?(n={background:o,border:p},e[0]=o,e[1]=p,e[2]=n):n=e[2];const f=`3px solid ${d}`;let h;e[3]!==f?(h={borderLeft:f,borderRadius:2},e[3]=f,e[4]=h):h=e[4];let x;e[5]!==m?(x={color:m},e[5]=m,e[6]=x):x=e[6];let y;e[7]!==i||e[8]!==x?(y=s.jsx("div",{className:"text-[10px]",style:x,children:i}),e[7]=i,e[8]=x,e[9]=y):y=e[9];let v;e[10]!==u?(v={color:u},e[10]=u,e[11]=v):v=e[11];let k;e[12]!==t.title||e[13]!==l?(k=t.title??l("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=l,e[14]=k):k=e[14];let b;e[15]!==v||e[16]!==k?(b=s.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:v,children:k}),e[15]=v,e[16]=k,e[17]=b):b=e[17];let S;e[18]!==c?(S={color:c},e[18]=c,e[19]=S):S=e[19];let j;e[20]!==t.description||e[21]!==l?(j=t.description??l("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=l,e[22]=j):j=e[22];let g;e[23]!==S||e[24]!==j?(g=s.jsx("div",{className:"line-clamp-2 text-[12px]",style:S,children:j}),e[23]=S,e[24]=j,e[25]=g):g=e[25];let N;e[26]!==g||e[27]!==y||e[28]!==b?(N=s.jsxs("div",{className:"min-w-0 flex-1",children:[y,b,g]}),e[26]=g,e[27]=y,e[28]=b,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=s.jsx(je,{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;e[32]!==N||e[33]!==w||e[34]!==h?(E=s.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:h,children:[N,w]}),e[32]=N,e[33]=w,e[34]=h,e[35]=E):E=e[35];let T;return e[36]!==E||e[37]!==n?(T=s.jsx("div",{className:"rounded-lg p-2.5 text-left",style:n,children:E}),e[36]=E,e[37]=n,e[38]=T):T=e[38],T}function Tt(a){const e=C.c(21),{platform:t,seo:i,host:d,path:r,t:l}=a;let o;e[0]!==d||e[1]!==r||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==i||e[6]!==l?(o=t.layout==="search"?s.jsx(wt,{seo:i,host:d,path:r,t:l}):t.layout==="card"?s.jsx(Et,{seo:i,host:d,path:r,t:l}):t.layout==="chat"?s.jsx(_t,{seo:i,host:d,path:r,accent:t.color,t:l}):s.jsx(Ct,{seo:i,host:d,path:r,accent:t.color,dark:t.id==="discord",t:l}),e[0]=d,e[1]=r,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=i,e[6]=l,e[7]=o):o=e[7];const u=o;let c;e[8]!==t.color?(c=s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=c):c=e[9];let m;e[10]!==t.labelKey||e[11]!==l?(m=l(t.labelKey),e[10]=t.labelKey,e[11]=l,e[12]=m):m=e[12];let p;e[13]!==m?(p=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m}),e[13]=m,e[14]=p):p=e[14];let n;e[15]!==c||e[16]!==p?(n=s.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[c,p]}),e[15]=c,e[16]=p,e[17]=n):n=e[17];let f;return e[18]!==u||e[19]!==n?(f=s.jsxs("div",{children:[n,u]}),e[18]=u,e[19]=n,e[20]=f):f=e[20],f}function Pt(a){const e=C.c(18),{seo:t,url:i,path:d}=a,r=d===void 0?"/":d,l=ee();let o,u,c;if(e[0]!==t||e[1]!==i){const v=jt(t);o=v,u=Te(v.image,i),c=Te(v.favicon,i),e[0]=t,e[1]=i,e[2]=o,e[3]=u,e[4]=c}else o=e[2],u=e[3],c=e[4];let m;e[5]!==o||e[6]!==u||e[7]!==c?(m={...o,image:u,favicon:c},e[5]=o,e[6]=u,e[7]=c,e[8]=m):m=e[8];const p=m;let n;e[9]!==i?(n=kt(i),e[9]=i,e[10]=n):n=e[10];const f=n,h=r==="/"?"":r;let x;e[11]!==h||e[12]!==f||e[13]!==l||e[14]!==p?(x=Nt.map(v=>s.jsx(Tt,{platform:v,seo:p,host:f,path:h,t:l},v.id)),e[11]=h,e[12]=f,e[13]=l,e[14]=p,e[15]=x):x=e[15];let y;return e[16]!==x?(y=s.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:x}),e[16]=x,e[17]=y):y=e[17],y}function De(a,e,t){const i=C.c(3);let d;return i[0]!==e||i[1]!==t?(d=e?qe(e,t):[],i[0]=e,i[1]=t,i[2]=d):d=i[2],rt(a,d)}function Rt(a){const e=C.c(7),{orgSlug:t,virtualMcpId:i,branch:d,decofile:r,meta:l}=a;let o;if(e[0]!==d||e[1]!==t||e[2]!==i?(o={orgSlug:t,virtualMcpId:i,branch:d},e[0]=d,e[1]=t,e[2]=i,e[3]=o):o=e[3],!De(o,r,l).ready){let m;return e[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-full w-full flex items-center justify-center",children:s.jsx(Pe,{className:"size-5 text-muted-foreground"})}),e[4]=m):m=e[4],m}let c;return e[5]!==a?(c=s.jsx(Ft,{...a}),e[5]=a,e[6]=c):c=e[6],c}function Ft(a){const e=C.c(77),{orgSlug:t,virtualMcpId:i,branch:d,decofile:r,meta:l,target:o,previewBaseUrl:u,onSaved:c,onEditDefaultSeo:m,onBack:p}=a,n=ee(),f=Ge(r,o,l),h=at(i,d);let x;e[0]!==h?(x=ct(h),e[0]=h,e[1]=x):x=e[1];const y=!x,v=f?.seoData,k=o.kind==="site"?"site":o.pageKey,[b,S]=X.useState(k),[j,g]=X.useState(null),[N,w]=X.useState(0),[E,T]=X.useState(void 0),{persistSeo:_,persistRawSeo:L,flush:z,isPending:R,hold:Y}=St({orgSlug:t,virtualMcpId:i,branch:d,target:o,resolved:f,meta:l,onSaved:c});let P;e[2]!==d||e[3]!==t||e[4]!==i?(P=dt({orgSlug:t,virtualMcpId:i,branch:d}),e[2]=d,e[3]=t,e[4]=i,e[5]=P):P=e[5];const F=ft(P)(f?.blockKey??""),[U,K]=X.useState(F);(b!==k||U!==F)&&(f&&Y(f.blockKey),S(k),K(F),g(null),T(void 0),w(Dt));const $=o.kind==="page",$e=$?f?.rawSeoData:void 0,J=E!==void 0?E:$e,Le=$?We(J)??void 0:void 0,D=j??Le??v??{},A=f?Ye(bt(D,f),r,l):null,B=A&&(!$||fe(J))?et(A,l):null;let te;e[6]!==l?(te=Je(l),e[6]=l,e[7]=te):te=e[7];const me=te;let O,se;e[8]!==r||e[9]!==D||e[10]!==l||e[11]!==o.kind?(O=o.kind==="page"?Xe(r,l)?.seoData??{}:{},se=o.kind==="page"?Lt(O,D):D,e[8]=r,e[9]=D,e[10]=l,e[11]=o.kind,e[12]=O,e[13]=se):(O=e[12],se=e[13]);const ue=se;let le;e[14]!==_||e[15]!==f||e[16]!==g?(le=I=>{if(!f)return;const ke=I;g(ke),_(ke)},e[14]=_,e[15]=f,e[16]=g,e[17]=le):le=e[17];const pe=le;let oe;e[18]!==g?(oe=()=>g(null),e[18]=g,e[19]=oe):oe=e[19];const he=oe;let ie;e[20]!==w?(ie=()=>w(Kt),e[20]=w,e[21]=ie):ie=e[21];const xe=ie;let ne;e[22]!==z||e[23]!==p?(ne=()=>{z(),p?.()},e[22]=z,e[23]=p,e[24]=ne):ne=e[24];const ye=ne,M=o.kind==="page"?o.path:"/";let re;e[25]!==M||e[26]!==u||e[27]!==o.kind?(re=o.kind==="page"&&u?$t(M,u):u??null,e[25]=M,e[26]=u,e[27]=o.kind,e[28]=re):re=e[28];const ve=re;let ae;e[29]!==f||e[30]!==n||e[31]!==o.kind?(ae=o.kind==="site"?n("sectionsEditor.seoEditor.noSiteSeoBlock"):n(f?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[29]=f,e[30]=n,e[31]=o.kind,e[32]=ae):ae=e[32];const ge=ae,ce=$&&f,be=o.kind==="site"&&f&&B;let H;e[33]!==ye||e[34]!==n||e[35]!==o.kind||e[36]!==o.pageName?(H=o.kind==="page"?s.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[s.jsx("button",{type:"button",onClick:ye,title:o.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:o.pageName}),s.jsx(Ae,{className:"size-3 shrink-0 text-muted-foreground/60"}),s.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):s.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[s.jsx(we,{size:16,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:n("sectionsEditor.seoEditor.defaultSeoLabel")}),s.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",n("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[33]=ye,e[34]=n,e[35]=o.kind,e[36]=o.pageName,e[37]=H):H=e[37];let Q;e[38]!==R?(Q=R&&s.jsx(Pe,{className:"size-3.5 text-muted-foreground"}),e[38]=R,e[39]=Q):Q=e[39];let V;e[40]!==m||e[41]!==n||e[42]!==o.kind?(V=o.kind==="page"&&m&&s.jsxs(Oe,{type:"button",variant:"outline",size:"sm",onClick:m,children:[s.jsx(we,{size:14}),n("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[40]=m,e[41]=n,e[42]=o.kind,e[43]=V):V=e[43];let q;e[44]!==Q||e[45]!==V?(q=s.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[Q,V]}),e[44]=Q,e[45]=V,e[46]=q):q=e[46];let G;e[47]!==H||e[48]!==q?(G=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[H,q]}),e[47]=H,e[48]=q,e[49]=G):G=e[49];let W;e[50]!==A||e[51]!==y||e[52]!==xe||e[53]!==he||e[54]!==me||e[55]!==J||e[56]!==D||e[57]!==ge||e[58]!==N||e[59]!==pe||e[60]!==M||e[61]!==L||e[62]!==_||e[63]!==ue||e[64]!==ve||e[65]!==f||e[66]!==B||e[67]!==g||e[68]!==T||e[69]!==ce||e[70]!==be||e[71]!==O||e[72]!==n?(W=!f||!ce&&!be?s.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ge}):s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx(Ee,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"px-5 py-4",children:ce?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:n("sectionsEditor.seoEditor.emptyFieldsHint")}),s.jsx(yt,{rawSeo:J,innerSeo:D,defaultResolveType:me,seoSchema:B,activeResolveType:A,seoTypeOptions:f.seoTypeOptions,formResetKey:N,siteDefaultSeo:O,onPersistRaw:I=>{T(I),L(I)},onInnerChange:I=>{g(I),_(I)},onClearForm:he,onBumpFormKey:xe,asyncRenderAvailable:y})]}):B&&A&&s.jsx(Re,{schema:B,resolveType:A,value:D,formResetKey:N,onChange:pe})})}),s.jsx(Ee,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"@container px-5 py-4",children:s.jsx(Pt,{seo:ue,url:ve,path:M})})})]}),e[50]=A,e[51]=y,e[52]=xe,e[53]=he,e[54]=me,e[55]=J,e[56]=D,e[57]=ge,e[58]=N,e[59]=pe,e[60]=M,e[61]=L,e[62]=_,e[63]=ue,e[64]=ve,e[65]=f,e[66]=B,e[67]=g,e[68]=T,e[69]=ce,e[70]=be,e[71]=O,e[72]=n,e[73]=W):W=e[73];let de;return e[74]!==G||e[75]!==W?(de=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[G,W]}),e[74]=G,e[75]=W,e[76]=de):de=e[76],de}function Kt(a){return a+1}function Dt(a){return a+1}function $t(a,e){try{return new URL(a,e).href}catch{return e}}function Lt(a,e){const t=e.__resolveType,i=a.__resolveType;if(typeof t=="string"&&typeof i=="string"&&t!==i)return{...e};const d={...a};for(const[r,l]of Object.entries(e))r!=="__resolveType"&&l!=null&&(typeof l=="string"&&l.trim()===""||(d[r]=l));return d}const Gt=Object.freeze(Object.defineProperty({__proto__:null,SeoEditor:Rt,useEnsureSiteSeoBlocks:De},Symbol.toStringTag,{value:"Module"}));export{yt as P,bt as a,vt as b,Gt as s,De as u,gt as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,j as o}from"./index-DVvmeJMJ.js";import{V as a}from"./index-CnFz3TOs.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};
|