decocms 4.388.4 → 4.389.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-Cat-Fy2i.js → AlertCircle-CVkVxygv.js} +1 -1
- package/dist/client/assets/{AreaChart-CSNer7sZ.js → AreaChart-lVePxdbV.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DuxVUo5_.js → ArrowLeft-CN6aZBvX.js} +1 -1
- package/dist/client/assets/{ArrowRight-CsoDgnUj.js → ArrowRight-FqJnNh3f.js} +1 -1
- package/dist/client/assets/{ArrowUp-CbPBDOpZ.js → ArrowUp-bOLRJZuX.js} +1 -1
- package/dist/client/assets/{CartesianChart-DgQehil3.js → CartesianChart-C3Zko_Et.js} +1 -1
- package/dist/client/assets/{Check-BZXRTDaX.js → Check-DL_AGZMy.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cj4PQGuv.js → CheckCircle-DtMp-qqq.js} +1 -1
- package/dist/client/assets/{ChevronUp-DGt31MPD.js → ChevronUp-B6mY-MC1.js} +1 -1
- package/dist/client/assets/{Copy01-B6hr4CBg.js → Copy01-6lOOhJcp.js} +1 -1
- package/dist/client/assets/{CreditCard01-CiYLi_pR.js → CreditCard01-DdYfDHIS.js} +1 -1
- package/dist/client/assets/{DotsVertical-BITRq5d-.js → DotsVertical-CAjUqtRp.js} +1 -1
- package/dist/client/assets/{Download01-CsYfHghd.js → Download01-Dq8Pn8XY.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-zVAOL4kJ.js → ErrorBarContext-B26KvZ3G.js} +1 -1
- package/dist/client/assets/{Eye-rQUtSbk6.js → Eye-B5e-ilzV.js} +1 -1
- package/dist/client/assets/{Globe04-C_9DD9oO.js → Globe04-_nV993le.js} +1 -1
- package/dist/client/assets/{Image01-BLIf6uY9.js → Image01-CkJtDP-I.js} +1 -1
- package/dist/client/assets/{Key01-SGIR_QrT.js → Key01-BCuGindq.js} +1 -1
- package/dist/client/assets/{LayoutLeft-GBQ0rQxQ.js → LayoutLeft-U0F-Da_p.js} +1 -1
- package/dist/client/assets/{Line-y7nkMb-C.js → Line-BA6i0Sln.js} +1 -1
- package/dist/client/assets/{Link01-BnVQGp2l.js → Link01-BjTxU_bP.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Dh0AABP8.js → LinkExternal01-DSUCZUJp.js} +1 -1
- package/dist/client/assets/{Monitor01-CxisI5ut.js → Monitor01-r707obGd.js} +1 -1
- package/dist/client/assets/{Package-DsU1cU6S.js → Package-D2jMN__x.js} +1 -1
- package/dist/client/assets/{Palette-CzoNEzRs.js → Palette-DebiHmrq.js} +1 -1
- package/dist/client/assets/{Plus-qASEo4cN.js → Plus-BbELO07z.js} +1 -1
- package/dist/client/assets/{SearchLg-qmi8uaeX.js → SearchLg-C9MObDBB.js} +1 -1
- package/dist/client/assets/{SearchMd-B6NDUgzQ.js → SearchMd-B1Foybfh.js} +1 -1
- package/dist/client/assets/{Sector-DK9KwpRN.js → Sector-OiAocllE.js} +1 -1
- package/dist/client/assets/{Share07-CMPYQYHk.js → Share07-B2WnpDWD.js} +1 -1
- package/dist/client/assets/{Stars01-cdnol_cb.js → Stars01-DUL2jKUJ.js} +1 -1
- package/dist/client/assets/{Sun-BSFyLDhg.js → Sun-BKxdX8hu.js} +1 -1
- package/dist/client/assets/{Tool01-H9OcfGdq.js → Tool01-BvNT4KDI.js} +1 -1
- package/dist/client/assets/{Trash01-mB4s-hrv.js → Trash01-BLoRPhD3.js} +1 -1
- package/dist/client/assets/{Upload01-Uv_jtHIk.js → Upload01-CNb1qfRO.js} +1 -1
- package/dist/client/assets/{User01-DHGCVvV3.js → User01-U5CIC-GP.js} +1 -1
- package/dist/client/assets/{UserSquare-BfT6tB5U.js → UserSquare-CZakdYWe.js} +1 -1
- package/dist/client/assets/{Users01-C_qUmfZB.js → Users01-C6BprSkC.js} +1 -1
- package/dist/client/assets/{X-vKTIsgL1.js → X-BNszojyh.js} +1 -1
- package/dist/client/assets/{XCircle-Cu2Sy8Aw.js → XCircle-BuDwhQqF.js} +1 -1
- package/dist/client/assets/{XClose-DFUqDOc8.js → XClose-D_JLFZFT.js} +1 -1
- package/dist/client/assets/{Zap-CSRFlEXK.js → Zap-BCwjglMw.js} +1 -1
- package/dist/client/assets/{ZoomOut-Burao8Eg.js → ZoomOut-q6Y0RhlM.js} +1 -1
- package/dist/client/assets/{access-gate-Bbnx_Qh-.js → access-gate-Clo8Jex8.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-DzNaYAxM.js → add-connection-dialog-C5SXdxkT.js} +1 -1
- package/dist/client/assets/{agent-analytics-C0sV-7Xb.js → agent-analytics-es8O9CL0.js} +2 -2
- package/dist/client/assets/agent-app-CGYFJjq5.js +1 -0
- package/dist/client/assets/{agent-assets-OnbttXnX.js → agent-assets-Dy169ySy.js} +1 -1
- package/dist/client/assets/{agent-automation-BSmqRx9Q.js → agent-automation-D1R1huVt.js} +6 -6
- package/dist/client/assets/{agent-automations-D7yiwZb3.js → agent-automations-BVBbNAeW.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CTElBaoM.js → agent-connect-sources-BYoUrpVF.js} +1 -1
- package/dist/client/assets/agent-deck-sqReTFoM.js +1 -0
- package/dist/client/assets/{agent-e2e-36-yunOr.js → agent-e2e-DxRXY84q.js} +1 -1
- package/dist/client/assets/{agent-experiments-B5DGYFrd.js → agent-experiments-_dQ2BC_Q.js} +1 -1
- package/dist/client/assets/agent-file-CGmxIBgM.js +1 -0
- package/dist/client/assets/{agent-git-BYVAaPsW.js → agent-git-B2s_zuHj.js} +2 -2
- package/dist/client/assets/{agent-hosting-BbmS530x.js → agent-hosting-BGGSrQLd.js} +1 -1
- package/dist/client/assets/{agent-icon-CzsnrYjD.js → agent-icon-CSebdE0g.js} +1 -1
- package/dist/client/assets/agent-library-file-CK_Y2Pye.js +1 -0
- package/dist/client/assets/{agent-monitor-C27DYrEB.js → agent-monitor-Dd5ty7vm.js} +1 -1
- package/dist/client/assets/{agent-overview-DsQze4i5.js → agent-overview-Cm3ny-qk.js} +1 -1
- package/dist/client/assets/agent-settings-B-c4VHd9.js +1 -0
- package/dist/client/assets/{agent-site-editor-BNuBiz19.js → agent-site-editor-CDYe7KMp.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-C2ptd6Is.js +2 -0
- package/dist/client/assets/agent-site-editor-content-B7A6sQQt.js +2 -0
- package/dist/client/assets/agent-site-editor-preview-sULLmso9.js +518 -0
- package/dist/client/assets/agent-view-C2yjGU43.js +1 -0
- package/dist/client/assets/{agent-view-guard-C4pdkmKc.js → agent-view-guard-a8AZfEO9.js} +1 -1
- package/dist/client/assets/{agents-list-B3F1REj8.js → agents-list-oZyF4Ii3.js} +1 -1
- package/dist/client/assets/{ai-providers-BYHAVCy5.js → ai-providers-BlScv4nl.js} +2 -2
- package/dist/client/assets/{alert-DsW1KUvt.js → alert-DsihHj7h.js} +1 -1
- package/dist/client/assets/{alert-dialog-Dg6YJ6PP.js → alert-dialog-DeRt3vSN.js} +1 -1
- package/dist/client/assets/{api-keys-DDd9VBHu.js → api-keys-C9NfUH35.js} +1 -1
- package/dist/client/assets/api-keys-D3tjigFv.js +1 -0
- package/dist/client/assets/app-editor-D_REDtDg.js +1 -0
- package/dist/client/assets/{asset-utils-DOWh4JzZ.js → asset-utils-BS06OXCA.js} +1 -1
- package/dist/client/assets/{auth-D3Q2r2cz.js → auth-B-OXMWGw.js} +1 -1
- package/dist/client/assets/{auth-catchall-M53zUwPP.js → auth-catchall-CLBv3q5z.js} +1 -1
- package/dist/client/assets/{auth-entry-CQhZUGUz.js → auth-entry-uRCGi0qy.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Cp7zhn_p.js → auth-split-layout-C9jB6J1h.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DG9xWGRs.js → authenticate-and-persist-oauth-B71_ZhsC.js} +1 -1
- package/dist/client/assets/{automation-list-row-DuetYP8A.js → automation-list-row-BX3OvbcZ.js} +1 -1
- package/dist/client/assets/{automation-runs-DrVjV_Uv.js → automation-runs-CUFGFLxs.js} +1 -1
- package/dist/client/assets/automations-DGcV2mJq.js +1 -0
- package/dist/client/assets/{autosend-C5knIVwo.js → autosend-pQ9pD2-2.js} +1 -1
- package/dist/client/assets/{avatar-CLf3yQhN.js → avatar-GIuLZx2C.js} +1 -1
- package/dist/client/assets/{badge-DuB4cqrw.js → badge-DS3KIYvS.js} +1 -1
- package/dist/client/assets/{block-document-DZ3zGn-U.js → block-document-WF9-dn_8.js} +3 -3
- package/dist/client/assets/blocks-preview-workspace-context-BlZqg5yu.js +1 -0
- package/dist/client/assets/{breadcrumb-SXbKtw7u.js → breadcrumb-D6xZIsj2.js} +1 -1
- package/dist/client/assets/{buckets-D7jxbA8X.js → buckets-CNixgGHU.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DKo7W0US.js → build-improve-prompt-doc-DeGFReow.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CS9EslBN.js → bulk-category-panel-BS5_T4uL.js} +1 -1
- package/dist/client/assets/{calendar-D41RMBsP.js → calendar-D4hMMrVq.js} +1 -1
- package/dist/client/assets/{capability-load-error-CYpF4fm6.js → capability-load-error-BjI2iK0-.js} +1 -1
- package/dist/client/assets/category-editor-BFX9U9Yh.js +1 -0
- package/dist/client/assets/{chart-CdmZzz30.js → chart-CdPsiu6K.js} +1 -1
- package/dist/client/assets/{chat-context-D1GbDSrr.js → chat-context-HOmU0YHH.js} +6 -6
- package/dist/client/assets/{chat-draft-VYqGGS3B.js → chat-draft-BdxqYU8-.js} +1 -1
- package/dist/client/assets/{checkbox-BKGUJJNh.js → checkbox-DBYfq56y.js} +1 -1
- package/dist/client/assets/{choose-editor-Dkb9gjmg.js → choose-editor-DSxVv7hu.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-0btUuJoC.js → claim-phase-copy-njXeDF0h.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BFRzX7yY.js → cli-auth-success-uK8yk1Sb.js} +1 -1
- package/dist/client/assets/{client-icons-CIit2qYG.js → client-icons-CaoDPAaa.js} +1 -1
- package/dist/client/assets/{collapsible-eiDLfZY7.js → collapsible-BpIxv8-d.js} +1 -1
- package/dist/client/assets/{collection-detail-D6aw3A-V.js → collection-detail-vK2X038F.js} +1 -1
- package/dist/client/assets/{collection-display-button-D9O76Rnp.js → collection-display-button-ChjN1roR.js} +1 -1
- package/dist/client/assets/{collection-search-BQXOJg8a.js → collection-search-DyuqjLWs.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-zKpdBBAO.js → collection-table-wrapper-CNNpAz5Y.js} +1 -1
- package/dist/client/assets/{collection-tabs-BWQrYrdS.js → collection-tabs-3_QvnkN-.js} +1 -1
- package/dist/client/assets/combobox-OP-CbRFf.js +1 -0
- package/dist/client/assets/command-ByUEKQB9.js +1 -0
- package/dist/client/assets/{companion-mcps-section-8c0rXQex.js → companion-mcps-section-6HKE7JJ2.js} +1 -1
- package/dist/client/assets/{connect-B9ZzFP7o.js → connect-CsNBKbv0.js} +2 -2
- package/dist/client/assets/{connect-layout-CSTvrhGM.js → connect-layout-DVtCwqcX.js} +1 -1
- package/dist/client/assets/{connection-DzM2SOZ6.js → connection-DR9gf0au.js} +1 -1
- package/dist/client/assets/{connection-card-DF11WhqU.js → connection-card-BOo8yulu.js} +1 -1
- package/dist/client/assets/{connection-detail-Dimacfl3.js → connection-detail-BqzECTqG.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CyBATU5Y.js → connection-form-helpers-D5P5OxyV.js} +1 -1
- package/dist/client/assets/{connections-C_1m4t4b.js → connections-DH9JM6iR.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Cy1fVEro.js → create-organization-dialog-S8LtKHhd.js} +1 -1
- package/dist/client/assets/{decofile-api-DkM3ZQFM.js → decofile-api-CWaaGMA2.js} +1 -1
- package/dist/client/assets/{decopilot-YckYKTsg.js → decopilot-B7-O9fZC.js} +2 -2
- package/dist/client/assets/{dialog-C36x61_J.js → dialog-BG6kEGFR.js} +1 -1
- package/dist/client/assets/{discover-CqgNMlsp.js → discover-OS0btTyd.js} +1 -1
- package/dist/client/assets/{domain-settings-D6TBWbch.js → domain-settings-BrbTzYfK.js} +1 -1
- package/dist/client/assets/{download-app-dialog-7J000m-o.js → download-app-dialog-NqW4PLAx.js} +1 -1
- package/dist/client/assets/{drawer-CsJzOKcM.js → drawer-Bl-PPIzX.js} +1 -1
- package/dist/client/assets/{editor-BQuCFEpz.js → editor-BiwQpn1s.js} +1 -1
- package/dist/client/assets/{empty-state-ClBiZqLf.js → empty-state-BpI78UAU.js} +1 -1
- package/dist/client/assets/{empty-state-gVTYQvW1.js → empty-state-DzReaOau.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BIqslos8.js → extract-connection-data-BimwPioU.js} +1 -1
- package/dist/client/assets/{feature-gate-DLeaUXYN.js → feature-gate-B63BZEdG.js} +1 -1
- package/dist/client/assets/{feature-paywall-lhh7GOr7.js → feature-paywall-DwNmZ-M9.js} +1 -1
- package/dist/client/assets/{file-explorer-BRRFAgbe.js → file-explorer-DLzYcbz9.js} +1 -1
- package/dist/client/assets/{file-preview-DobzjEc2.js → file-preview-DCBxvWAy.js} +1 -1
- package/dist/client/assets/{file-share-button-6XYGV6w8.js → file-share-button-Cz0mgdAm.js} +1 -1
- package/dist/client/assets/{file-type-icon-CFRsMAQ4.js → file-type-icon-Cbv1Det1.js} +1 -1
- package/dist/client/assets/{folder-icon-CxyYiSJb.js → folder-icon-DltflRpD.js} +1 -1
- package/dist/client/assets/{form-CXSt7_li.js → form-Bx8qGby0.js} +1 -1
- package/dist/client/assets/{gateway-client-BF14HPqj.js → gateway-client-DiyAsoDf.js} +1 -1
- package/dist/client/assets/{general-0kms2_Mb.js → general-DTp5FT8F.js} +1 -1
- package/dist/client/assets/{github-icon-CIx0jkrL.js → github-icon-Bx6tzbBb.js} +1 -1
- package/dist/client/assets/{home-CyQJcQvg.js → home-tpS1TH6x.js} +1 -1
- package/dist/client/assets/{hooks-enzgIMXj.js → hooks-ZOtfl4oi.js} +2 -2
- package/dist/client/assets/{hooks-C8t7cMQJ.js → hooks-lZSCdRwc.js} +1 -1
- package/dist/client/assets/{icon-button-Df-IeDHT.js → icon-button-BudvJWM8.js} +1 -1
- package/dist/client/assets/{index-Ci3v6d1n.js → index-B7pMCohP.js} +1 -1
- package/dist/client/assets/index-B88q0man.css +1 -0
- package/dist/client/assets/{index-B7z_63F4.js → index-B8ZawsDP.js} +1 -1
- package/dist/client/assets/{index-DC9_5qIh.js → index-B9lZAmmH.js} +1 -1
- package/dist/client/assets/{index-DowxFM-Z.js → index-Bzch_Lwn.js} +1 -1
- package/dist/client/assets/{index-ClQyNrgO.js → index-C-u7JO1Y.js} +1 -1
- package/dist/client/assets/{index-Doi07Y6T.js → index-C0e8Nw2i.js} +1 -1
- package/dist/client/assets/{index-Byz-UaqT.js → index-CR8U3UFH.js} +1 -1
- package/dist/client/assets/{index-doEaURqC.js → index-CyBVTyGa.js} +7 -7
- package/dist/client/assets/{index-DV9UJZA2.js → index-CzuzrcF3.js} +1 -1
- package/dist/client/assets/{index-BoSUEB27.js → index-DeVdNW-7.js} +1 -1
- package/dist/client/assets/{index-CDAG9yf3.js → index-DmF8NlWI.js} +1 -1
- package/dist/client/assets/{index-BODjkOG4.js → index-DmsjOEhK.js} +1 -1
- package/dist/client/assets/{index-C4LzZ3-O.js → index-DtBnPwzh.js} +1 -1
- package/dist/client/assets/{index-D9padtMD.js → index-nJTy1ykh.js} +1 -1
- package/dist/client/assets/{index-redirect-XY4L95T5.js → index-redirect-lSGpveHC.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CxJm0T6_.js → infiniteQueryObserver-COZ-9XSO.js} +1 -1
- package/dist/client/assets/{infra-billing-zdKJ_MUK.js → infra-billing-ZSvY9y-Y.js} +1 -1
- package/dist/client/assets/input-D5Zi_pUc.js +1 -0
- package/dist/client/assets/{input-BT236l5B.js → input-DMG-B3VZ.js} +2 -2
- package/dist/client/assets/{input-CLIoB1hh.js → input-DOIUaBAK.js} +1 -1
- package/dist/client/assets/{integration-icon-Crk6WRxP.js → integration-icon-mTqkOE6y.js} +1 -1
- package/dist/client/assets/{label-tAsQMZ2G.js → label-DVhvlWqs.js} +1 -1
- package/dist/client/assets/{last-preview-page-002026Ee.js → last-preview-page-Cc9l6ICr.js} +1 -1
- package/dist/client/assets/{layout-CCpqo3zm.js → layout-0DaHUY7Z.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Cj78AYzA.js → legacy-agents-deep-O9zXW4qh.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Dn96iLn4.js → legacy-main-redirect-MeePJHje.js} +1 -1
- package/dist/client/assets/{library-BuoDGyY9.js → library-DHdWNZX-.js} +1 -1
- package/dist/client/assets/{login-DqL9YZRz.js → login-CXyISdG5.js} +1 -1
- package/dist/client/assets/{markdown-D0jNOMCX.js → markdown-DCPDulUN.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BvLPqeD1.js → mcp-app-renderer-DBdofBbE.js} +2 -2
- package/dist/client/assets/{mcp-oauth-61IHYJoj.js → mcp-oauth-DdNMjTqu.js} +1 -1
- package/dist/client/assets/{members-BcXF5gIl.js → members-YBQ4CS4C.js} +1 -1
- package/dist/client/assets/{message-templates-CUQwBtaa.js → message-templates-B-vmK4Xp.js} +1 -1
- package/dist/client/assets/{mini-report-page-DbALNxiX.js → mini-report-page-DekMuoTa.js} +1 -1
- package/dist/client/assets/{mock-board-D9-PmaL9.js → mock-board-D9NUZPwb.js} +9 -9
- package/dist/client/assets/{monaco-editor-xB6SdWXy.js → monaco-editor-tpWF7AL5.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CTbrFT2U.js → monitoring-stats-row-D_bvL4CA.js} +1 -1
- package/dist/client/assets/{multi-select-BPlBOZll.js → multi-select-C3lQgqH3.js} +1 -1
- package/dist/client/assets/{mustache-Btjjkmrx.js → mustache-BU3hKYND.js} +1 -1
- package/dist/client/assets/{oauth-callback-D8-Vh_4C.js → oauth-callback-BiuyznT3.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Dpai0ql-.js → oauth-callback-ai-provider-DqtXAIB8.js} +1 -1
- package/dist/client/assets/{onboarding-uOVvp-Mg.js → onboarding-BS368ORS.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BQt56FI4.js → optimistic-project-sidebar-views-BfkTIuSj.js} +1 -1
- package/dist/client/assets/org-file-open-context-Bh_zBQ2O.js +1 -0
- package/dist/client/assets/{organization-choice-9DpczJ4c.js → organization-choice-GuO7qGDl.js} +1 -1
- package/dist/client/assets/{orgs-B6tWlX0C.js → orgs-DhHpNlvn.js} +1 -1
- package/dist/client/assets/page-seo-form-BML1eDhR.js +1 -0
- package/dist/client/assets/{pair-BIUMok9W.js → pair-CIltybgP.js} +1 -1
- package/dist/client/assets/{plan-ladder-DjuDG4EH.js → plan-ladder-BEYdYGx8.js} +1 -1
- package/dist/client/assets/{popover-GUR8piky.js → popover-CUdTfYte.js} +1 -1
- package/dist/client/assets/post-calendar-BVrfveN8.js +1 -0
- package/dist/client/assets/post-editor-LBOMfHyI.js +1 -0
- package/dist/client/assets/{preview-content-CkHbAlf-.js → preview-content-D7H_AlKU.js} +1 -1
- package/dist/client/assets/{preview-dialog-DUI33rZ8.js → preview-dialog-CUz95NoQ.js} +1 -1
- package/dist/client/assets/{primitives-CHkTFFF-.js → primitives-CyfO2GN8.js} +1 -1
- package/dist/client/assets/{profile-BIFbXoSW.js → profile-BNPVU14n.js} +1 -1
- package/dist/client/assets/{project-app-view-ZkgOByQo.js → project-app-view-Dm6c4g3t.js} +1 -1
- package/dist/client/assets/{project-feed-DGoAUO34.js → project-feed-orYCz9U3.js} +1 -1
- package/dist/client/assets/{project-icon-mjklzNJs.js → project-icon-DWnsLAeJ.js} +1 -1
- package/dist/client/assets/project-reports-DhaLYRaZ.js +1 -0
- package/dist/client/assets/project-tasks-Dzzzm0ET.js +1 -0
- package/dist/client/assets/{prompts-BwsVrHFI.js → prompts-Dpv9Ex1_.js} +1 -1
- package/dist/client/assets/record-editor-BQ-gbw4b.js +1 -0
- package/dist/client/assets/redirect-editor-eLzPdMVZ.js +1 -0
- package/dist/client/assets/reports-8U4sSr1z.js +1 -0
- package/dist/client/assets/{reports-ChF6GDQz.js → reports-CUfYm0DC.js} +1 -1
- package/dist/client/assets/{reports-onboarding-ukyewr1e.js → reports-onboarding-V3a9FHx8.js} +1 -1
- package/dist/client/assets/{reports-tab-Cxq1-mux.js → reports-tab-Bx7-g2HC.js} +2 -2
- package/dist/client/assets/{repositories-D7d8VzOE.js → repositories-Bbw6GL37.js} +1 -1
- package/dist/client/assets/{repository-import-picker-B6ijLkOL.js → repository-import-picker-74Y3ta69.js} +1 -1
- package/dist/client/assets/{repository-picker-Ca5oB9j5.js → repository-picker-dKTE5PS5.js} +1 -1
- package/dist/client/assets/{require-capability-vhXMBpff.js → require-capability-QoYjHav_.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DbGCmQgx.js → required-auth-layout-BgLvQHTP.js} +1 -1
- package/dist/client/assets/{reset-password-DrRaSkr-.js → reset-password-ateNgI6E.js} +1 -1
- package/dist/client/assets/{resizable-WgWAPECX.js → resizable-D6HLmII4.js} +1 -1
- package/dist/client/assets/{review-settings-BzcjRJO0.js → review-settings-jZZT0JG1.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-i_tw_Jd2.js → rich-text-link-control-0ZhNexVb.js} +2 -2
- package/dist/client/assets/{roles-DTbcvvsD.js → roles-ERYsouVf.js} +1 -1
- package/dist/client/assets/{route-BRh6VH3Q.js → route-D5DT7lzH.js} +1 -1
- package/dist/client/assets/{route-B8hLxHmX.js → route-DW_oVxtq.js} +1 -1
- package/dist/client/assets/{route-DsWfLZyf.js → route-HgZwHfFA.js} +1 -1
- package/dist/client/assets/{route-page-header-tbVW9ntg.js → route-page-header-BHdnDvfR.js} +1 -1
- package/dist/client/assets/runnable-block-editor-DrtKYS1k.js +17 -0
- package/dist/client/assets/{sandbox-lifecycle-context-CvyFr09R.js → sandbox-lifecycle-context-LNZL2c0K.js} +2 -2
- package/dist/client/assets/{schema-BVqtjcyJ.js → schema-DSsDEA1v.js} +1 -1
- package/dist/client/assets/{scroll-area-Cve7MqyA.js → scroll-area-CmvmQLS1.js} +1 -1
- package/dist/client/assets/{search-input-CCUlZDzf.js → search-input-0hd-PWUF.js} +1 -1
- package/dist/client/assets/{search-toggle-BtmGTpxl.js → search-toggle-Bp6o4xvm.js} +1 -1
- package/dist/client/assets/{secret-picker-DVWtSCXk.js → secret-picker--QwK1qR-.js} +1 -1
- package/dist/client/assets/{secrets-dQAYGJYM.js → secrets-ODT01eOm.js} +1 -1
- package/dist/client/assets/sections-editor-DwSDIcRs.js +1 -0
- package/dist/client/assets/select-CDhEibGy.js +1 -0
- package/dist/client/assets/{select-model-Bnz73VTx.js → select-model-Dd7JcBMF.js} +1 -1
- package/dist/client/assets/seo-editor-BMnaZ5KR.js +1 -0
- package/dist/client/assets/{separator-JATiwE_2.js → separator-D-_LXjFg.js} +1 -1
- package/dist/client/assets/{settings-tab-CE0tP2vq.js → settings-tab-CKxa2O9d.js} +4 -4
- package/dist/client/assets/{sheet-ZoEgH6s-.js → sheet-DH_REC9j.js} +1 -1
- package/dist/client/assets/shell-layout-B3x_9fo1.js +1 -0
- package/dist/client/assets/{sidebar-Cz1S2PSM.js → sidebar-CxoDmdm4.js} +1 -1
- package/dist/client/assets/{skill-preview-BP5xxsO4.js → skill-preview-D4GrMJU0.js} +1 -1
- package/dist/client/assets/{skills-D52kTkau.js → skills-BYtnT-vq.js} +1 -1
- package/dist/client/assets/{sso-DAgB-pSG.js → sso-C8v2EdhJ.js} +1 -1
- package/dist/client/assets/{switch-BNLiV_oA.js → switch-C7dIR4UF.js} +1 -1
- package/dist/client/assets/{synced-repos-BzaJ7fNm.js → synced-repos-BNAaKJnR.js} +1 -1
- package/dist/client/assets/{table-D7l9brRh.js → table-B9OXzOjU.js} +1 -1
- package/dist/client/assets/{tabs-Gq0qvZI4.js → tabs-D6s_HA-y.js} +1 -1
- package/dist/client/assets/{task-board-BXLBBo-B.js → task-board-Qj-6Ctqf.js} +1 -1
- package/dist/client/assets/{task-route-BpYPpL3v.js → task-route-9wqWimw6.js} +1 -1
- package/dist/client/assets/{task-status-C7fhyr8_.js → task-status-D5cWLC8O.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-Bhbjv4p8.js → taskboard-analytics-BtiQkIih.js} +1 -1
- package/dist/client/assets/{tasks-C2avg53f.js → tasks-BF0fu0p2.js} +2 -2
- package/dist/client/assets/tasks-D4PEOEIP.js +1 -0
- package/dist/client/assets/textarea-TE2JJa-B.js +1 -0
- package/dist/client/assets/{thread-button-CzoAkKWi.js → thread-button-DUOTtsFE.js} +1 -1
- package/dist/client/assets/{thread-intent-DuCE7MYG.js → thread-intent-jq9HKW3p.js} +1 -1
- package/dist/client/assets/{thread-route-C5QqTXOt.js → thread-route-C47YRRAe.js} +1 -1
- package/dist/client/assets/{thread-route-BBKn0p1b.js → thread-route-JcpQ-ikA.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-C52UGBXx.js → thread-sheet-body-DvAYJwTc.js} +1 -1
- package/dist/client/assets/{toggle-group-DHrftnUg.js → toggle-group-Dv_lnjT7.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-iy_uLVVB.js → toolbar-icon-button-Cq75cloK.js} +1 -1
- package/dist/client/assets/{tooltip-C91IS2ON.js → tooltip-BjUMPvkB.js} +1 -1
- package/dist/client/assets/{track-CpCOxAsM.js → track-CNE2_M0H.js} +1 -1
- package/dist/client/assets/{types-BCbJ4Eml.js → types-Bxr6Ak0g.js} +3 -3
- package/dist/client/assets/{usage-stats-P7Ebxq4V.js → usage-stats-Bug-9_EL.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CJ2ga4nx.js → use-ai-providers-ShRDl02e.js} +1 -1
- package/dist/client/assets/{use-automations-V0dkF89H.js → use-automations-qnBbEhgN.js} +1 -1
- package/dist/client/assets/{use-autosave-ClFMVO3A.js → use-autosave-exq2JPmQ.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CXK99yF4.js → use-connect-companion-DQoSkSuB.js} +1 -1
- package/dist/client/assets/{use-connection-PgTQPnAp.js → use-connection-WQuJ5yl_.js} +1 -1
- package/dist/client/assets/{use-copy-CGJ-16i-.js → use-copy-CPOYPvBF.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D4lB4pbk.js → use-create-virtual-mcp-Da7cL0aL.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-VjB0j61V.js → use-date-fns-locale-BcOQz_O6.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Du2G3qf3.js → use-debounced-autosave-BnbZSVdn.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CG2jgHBI.js → use-debounced-value-DHN-wkc6.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DU8sJrax.js → use-deco-credits-Fltfd2iB.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-x0K7Zb7m.js → use-decopilot-events-DF_mJ7FX.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Pe3fW9Dc.js → use-delete-connection-Di7K1zHS.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CWwZo7oV.js → use-deployment-admin-Ney-Hrk_.js} +1 -1
- package/dist/client/assets/{use-entitlements-pN-YIa6T.js → use-entitlements-D6f3xZaU.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CCQm80wV.js → use-fast-preview-draft-url-B6rIt3gA.js} +1 -1
- package/dist/client/assets/{use-file-configs-CzJCjBKX.js → use-file-configs-Cd7oj9Fw.js} +1 -1
- package/dist/client/assets/{use-in-settings-DplznXN9.js → use-in-settings-8fsBM1xN.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Bm905rys.js → use-infinite-scroll-BCiTqxTQ.js} +1 -1
- package/dist/client/assets/{use-join-requests-D4wrlTl5.js → use-join-requests-BFN9i-Es.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-Wh3mzXf2.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-BnAPI8Zf.js → use-mcp-auth-status-B1aTfNe_.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D2DgMGL-.js → use-mcp-client-CqKNXJW7.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-UNzUvECH.js → use-mcp-prompts-DpED8Vrg.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CtMvHJK9.js → use-mcp-tools-BgkfMsvS.js} +1 -1
- package/dist/client/assets/{use-members-C_tB-qI-.js → use-members-CeW4sAKm.js} +1 -1
- package/dist/client/assets/{use-mobile-DYpKQ1eP.js → use-mobile-CUQu4L8c.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-TwlhlbmB.js → use-navigate-to-agent-W6hb3mqs.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-BrlDdS6U.js → use-open-billing-url-KLMgEPxW.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BkVvw_9f.js → use-org-auth-client-zTkj17z7.js} +1 -1
- package/dist/client/assets/{use-org-fs-Bbl2QQqg.js → use-org-fs-B1IHOZ9S.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Ds4sFbSY.js → use-org-repo-syncs-CksqUgv6.js} +1 -1
- package/dist/client/assets/{use-org-sso-BnqcEd47.js → use-org-sso-CI1_4UQM.js} +1 -1
- package/dist/client/assets/{use-organization-roles-3K_wbMHo.js → use-organization-roles-DeV7SnLa.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Wh36EN0I.js → use-organization-settings-4gJ9Tp49.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-xYH0iX8e.js → use-panel-navigate-Bg-MVKv6.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-U59DT0hQ.js → use-project-native-view-presence-C3jxCCXQ.js} +1 -1
- package/dist/client/assets/{use-project-scope-CENQvfVc.js → use-project-scope-CRdwBUT7.js} +1 -1
- package/dist/client/assets/{use-releases-_xbQ8yPk.js → use-releases-nsAtxjuW.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Cz_g9Pum.js → use-reports-diagnostic-CtuJZ5jH.js} +1 -1
- package/dist/client/assets/{use-route-default-main-evb2BAGs.js → use-route-default-main-DA5X9xDG.js} +1 -1
- package/dist/client/assets/{use-secrets-44zj-3N9.js → use-secrets-BfDHS5Uq.js} +1 -1
- package/dist/client/assets/use-section-preview-base-DW4RpMx9.js +1 -0
- package/dist/client/assets/{use-session-runtime-COugfsOm.js → use-session-runtime-DiG_Qt8i.js} +1 -1
- package/dist/client/assets/{use-tags-BqebMAjW.js → use-tags-BloUFB1L.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CElip-Jh.js → use-task-board-analytics-C7hgblhm.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Dhub_XGT.js → use-task-metadata-ehugU85S.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DldRsY9l.js → use-thread-outputs-C9_GjCjS.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B-mdsJbn.js → use-virtual-mcp-Vg_Ogz61.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DebjMHv1.js +1 -0
- package/dist/client/assets/{useQueries-CrUxqve0.js → useQueries-CDvJYO-m.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CqRV1dKR.js +1 -0
- package/dist/client/assets/{users-XpLTDG6s.js → users-BC2i5HSG.js} +1 -1
- package/dist/client/assets/{utils-BcFrUaDf.js → utils-Bf0RpmgB.js} +1 -1
- package/dist/client/assets/variant-calendar-BWeWEpfR.js +1 -0
- package/dist/client/assets/{variant-matcher-override-DWffsqol.js → variant-matcher-override-fLxntWss.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Bsk0Q0dk.js → view-mode-toggle-DQkw8yuh.js} +1 -1
- package/dist/client/assets/{virtual-mcp-Bj7Y16hO.js → virtual-mcp-S8IoUqby.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-D8aCkILQ.js +0 -1
- package/dist/client/assets/agent-deck-JfSkYOo0.js +0 -1
- package/dist/client/assets/agent-file-BQkNRXR6.js +0 -1
- package/dist/client/assets/agent-library-file-B_9ZfsqS.js +0 -1
- package/dist/client/assets/agent-settings-Dlb-w-aW.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Cg74frt9.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BMF_TO-O.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-DfUEy_mW.js +0 -518
- package/dist/client/assets/agent-view-9ku1NYkG.js +0 -1
- package/dist/client/assets/api-keys-CB0BbOJK.js +0 -1
- package/dist/client/assets/app-editor-6ntO4YLY.js +0 -1
- package/dist/client/assets/automations-CflFKE1S.js +0 -1
- package/dist/client/assets/blocks-preview-workspace-context-CGrONP0s.js +0 -1
- package/dist/client/assets/category-editor-CMewSARd.js +0 -1
- package/dist/client/assets/combobox-B1IXE26_.js +0 -1
- package/dist/client/assets/command-CDaLB2Ox.js +0 -1
- package/dist/client/assets/index-xA_kfo6T.css +0 -1
- package/dist/client/assets/input-BK5Sp8hZ.js +0 -1
- package/dist/client/assets/org-file-open-context-DodrnIMR.js +0 -1
- package/dist/client/assets/page-seo-form-Dbz3eu1p.js +0 -1
- package/dist/client/assets/post-calendar-FfQIYQQi.js +0 -1
- package/dist/client/assets/post-editor-YU4-WfQ7.js +0 -1
- package/dist/client/assets/project-reports-DVMPWWFi.js +0 -1
- package/dist/client/assets/project-tasks-Jy5UvQy6.js +0 -1
- package/dist/client/assets/record-editor-CXOCBCZ1.js +0 -1
- package/dist/client/assets/redirect-editor-MDe3fibH.js +0 -1
- package/dist/client/assets/reports-DwYY1RWm.js +0 -1
- package/dist/client/assets/runnable-block-editor-CdEmnBad.js +0 -16
- package/dist/client/assets/sections-editor-C6cdGUNk.js +0 -2
- package/dist/client/assets/select-oEHCSTZi.js +0 -1
- package/dist/client/assets/seo-editor-BD39YQzP.js +0 -1
- package/dist/client/assets/shell-layout-BNVBlKMe.js +0 -1
- package/dist/client/assets/tasks-aGbeVyrS.js +0 -1
- package/dist/client/assets/textarea-B9cyNs7j.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-BcprnHpG.js +0 -1
- package/dist/client/assets/use-section-preview-base-BbxztEDH.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DCZL7BN4.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C0KSbZH8.js +0 -1
- package/dist/client/assets/variant-calendar-BPWkuyHy.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as St,b as Ht,r as k,l as Ke,j as s,aN as cs,Z as cn,B as ut,F as us,G as yt,I as ds,aM as ms,H as fs,aL as Ua,o as qa,h as Wa,t as L,K as Ya}from"./index-doEaURqC.js";import{u as Ja}from"./chat-context-D1GbDSrr.js";import{I as ps,J as Qa,K as Za,L as Xa,N as gs,O as eo,Q as to,V as no,T as so,U as hs,W as ao,X as oo,Y as zt,Z as vs,G as Rt,_ as Rn,$ as wn,a0 as vt,C as on,y as rn,a1 as Mt,e as ro,f as io,h as lo,u as co,a2 as Jn,a3 as uo,a4 as mo,a5 as fo,a6 as po,a7 as go,p as tn,a8 as ho,A as jt,a9 as Ft,aa as vo,ab as yo,ac as at,ad as Qn,z as So,ae as bo,af as Zn,ag as xo,ah as _o,ai as Xn,H as Pt,aj as nn,ak as es,M as Eo,al as ts,am as ht,an as jo,ao as ko,ap as Ro,F as wo,aq as To,ar as Vo,as as kt,at as No,au as Ao,av as Do,d as Po,aw as ns,ax as Ot,ay as ss,az as Mo,aA as Co,aB as Ko,aC as Bo,aD as jn,aE as Io,aF as Lo,aG as Fo,aH as Oo,aI as zo}from"./runnable-block-editor-CdEmnBad.js";import{d as $o}from"./use-virtual-mcp-B-mdsJbn.js";import{n as Ho,t as Go}from"./ChevronUp-DGt31MPD.js";import{z as Tn,bm as Uo,a2 as Vn,a5 as qo,m as Wo,P as Yo,x as Jo}from"./agent-icon-CzsnrYjD.js";import{i as ys}from"./Share07-CMPYQYHk.js";import{S as sn}from"./scroll-area-Cve7MqyA.js";import{c as Ct,T as Kt,a as Bt}from"./tooltip-C91IS2ON.js";import{m as Qo,u as Zo,P as Xo}from"./mustache-Btjjkmrx.js";import{b as Ss,G as er,e as tr,j as nr,g as sr,r as an,M as as}from"./claim-phase-copy-0btUuJoC.js";import{a as bs}from"./Copy01-B6hr4CBg.js";import{c as xs}from"./UserSquare-BfT6tB5U.js";import{e as ar,b as or}from"./Tool01-H9OcfGdq.js";import{s as rr}from"./Eye-rQUtSbk6.js";import{s as ir}from"./XCircle-Cu2Sy8Aw.js";import{s as Nn}from"./Plus-qASEo4cN.js";import{s as _s}from"./Trash01-mB4s-hrv.js";import{i as lr}from"./Zap-CSRFlEXK.js";import{a as Es,b as ln,d as js,K as ks,P as Rs,u as ws,C as Ts,s as Vs,e as $t,D as Ns,c as As,S as Ds,v as Ps}from"./rich-text-link-control-i_tw_Jd2.js";import{a as cr,P as ur,b as dr}from"./page-seo-form-Dbz3eu1p.js";import{u as mr,A as fr}from"./use-section-preview-base-BbxztEDH.js";import{b as os,a as pr}from"./variant-matcher-override-DWffsqol.js";import"./use-panel-navigate-xYH0iX8e.js";import"./thread-route-BBKn0p1b.js";import"./use-project-scope-CENQvfVc.js";import"./github-repo-BknN0SVI.js";import"./autosend-C5knIVwo.js";import"./thread-intent-DuCE7MYG.js";import"./slugify-CEUa2lfQ.js";import"./hooks-C8t7cMQJ.js";import"./use-mcp-client-D2DgMGL-.js";import"./auth-D3Q2r2cz.js";import"./backoff-8mStPHYB.js";import"./task-board-BXLBBo-B.js";import"./schema-BVqtjcyJ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-pN-YIa6T.js";import"./use-ai-providers-CJ2ga4nx.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-x0K7Zb7m.js";import"./use-organization-settings-Wh36EN0I.js";import"./use-session-runtime-COugfsOm.js";import"./decofile-api-DkM3ZQFM.js";import"./utils-BcFrUaDf.js";import"./ZoomOut-Burao8Eg.js";import"./Image01-BLIf6uY9.js";import"./sandbox-url-D3mC8qhT.js";import"./Sun-BSFyLDhg.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BIUMok9W.js";import"./Stars01-cdnol_cb.js";import"./ArrowRight-CsoDgnUj.js";import"./Check-BZXRTDaX.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-eiDLfZY7.js";import"./use-copy-CGJ-16i-.js";import"./usage-stats-P7Ebxq4V.js";import"./markdown-D0jNOMCX.js";import"./dialog-C36x61_J.js";import"./X-vKTIsgL1.js";import"./Download01-CsYfHghd.js";import"./org-file-open-context-DodrnIMR.js";import"./use-mobile-DYpKQ1eP.js";import"./shell-layout-BNVBlKMe.js";import"./avatar-CLf3yQhN.js";import"./User01-DHGCVvV3.js";import"./Globe04-C_9DD9oO.js";import"./SearchLg-qmi8uaeX.js";import"./XClose-DFUqDOc8.js";import"./download-app-dialog-7J000m-o.js";import"./CheckCircle-Cj4PQGuv.js";import"./Monitor01-CxisI5ut.js";import"./command-CDaLB2Ox.js";import"./index-Byz-UaqT.js";import"./SearchMd-B6NDUgzQ.js";import"./integration-icon-Crk6WRxP.js";import"./project-icon-mjklzNJs.js";import"./required-auth-layout-DbGCmQgx.js";import"./use-org-sso-BnqcEd47.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BvLPqeD1.js";import"./types-BCbJ4Eml.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BF14HPqj.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./AlertCircle-Cat-Fy2i.js";import"./LinkExternal01-Dh0AABP8.js";import"./sheet-ZoEgH6s-.js";import"./use-connection-PgTQPnAp.js";import"./Palette-CzoNEzRs.js";import"./use-navigate-to-agent-TwlhlbmB.js";import"./Link01-BnVQGp2l.js";import"./use-mcp-prompts-UNzUvECH.js";import"./index-CDAG9yf3.js";import"./form-CXSt7_li.js";import"./label-tAsQMZ2G.js";import"./input-BK5Sp8hZ.js";import"./use-thread-outputs-DldRsY9l.js";import"./file-type-icon-CFRsMAQ4.js";import"./popover-GUR8piky.js";import"./monaco-editor-xB6SdWXy.js";import"./editor-BQuCFEpz.js";import"./calendar-D41RMBsP.js";import"./textarea-B9cyNs7j.js";import"./select-oEHCSTZi.js";import"./index-C4LzZ3-O.js";import"./switch-BNLiV_oA.js";import"./Upload01-Uv_jtHIk.js";import"./DotsVertical-BITRq5d-.js";import"./search-input-CCUlZDzf.js";import"./tabs-Gq0qvZI4.js";import"./use-debounced-value-CG2jgHBI.js";import"./use-file-configs-CzJCjBKX.js";import"./asset-utils-DOWh4JzZ.js";import"./useInfiniteQuery-DCZL7BN4.js";import"./infiniteQueryObserver-CxJm0T6_.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-DHrftnUg.js";import"./alert-dialog-Dg6YJ6PP.js";import"./sandbox-git-api-B1R0585s.js";import"./ArrowUp-CbPBDOpZ.js";import"./ArrowLeft-DuxVUo5_.js";import"./CreditCard01-CiYLi_pR.js";import"./Key01-SGIR_QrT.js";import"./LayoutLeft-GBQ0rQxQ.js";import"./Package-DsU1cU6S.js";import"./Users01-C_qUmfZB.js";import"./section-preview-url-Csj0_ZDg.js";function gr(c){return c.schema?.definitions??c.schema?.$defs??{}}function Ms(c,e){const o=gr(e),l=o[btoa(c)];if(!l)return[];const p=[l];if(Array.isArray(l.allOf)){const x=l.allOf.find(b=>typeof b.$ref=="string")?.$ref;if(typeof x=="string"){const b=o[x.replace("#/definitions/","")];b&&p.push(b)}}return p}function hr(c,e){for(const o of Ms(c,e)){const l=typeof o.image=="string"?o.image:void 0;if(l?.includes("{{{"))return l}}function vr(c,e){if(!e)return;const o=ps(c);if(!o)return;const l=hr(o.resolveType,e);if(!l)return;const p=Qa(l,o.data);if(p)return Za(p)}const yr={escape:Xa};function Sr(c,e){for(const o of Ms(c,e)){const l=typeof o.title=="string"?o.title:void 0;if(l?.includes("{{"))return l}}function br(c,e){if(!e)return;const o=ps(c);if(o)try{const l=Sr(o.resolveType,e);return l&&Qo.render(l,o.data,{},yr).trim()||void 0}catch{return}}const xr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_r="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 rs(c){return Array.from({length:c},(e,o)=>({id:crypto.randomUUID(),index:o}))}function Cs(c){return c.map((e,o)=>({...e,index:o}))}function Er(c,e){if(e===c.length)return c;if(e<c.length)return Cs(c.slice(0,e));const o=Array.from({length:e-c.length},(l,p)=>({id:crypto.randomUUID(),index:c.length+p}));return[...c,...o]}function Ks(c){const e=St.c(38),{section:o,raw:l,meta:p,decofile:x}=c,b=cn(),y=o.isSavedBlock===!0,N=o.isMultivariate===!0;let E;e[0]!==p||e[1]!==l?(E=l&&p?vr(l,p):void 0,e[0]=p,e[1]=l,e[2]=E):E=e[2];const P=E;let ne;e[3]!==p||e[4]!==N||e[5]!==l||e[6]!==y?(ne=l&&p&&!y&&!N?br(l,p):void 0,e[3]=p,e[4]=N,e[5]=l,e[6]=y,e[7]=ne):ne=e[7];const Z=ne;let U;e[8]!==x||e[9]!==p||e[10]!==l||e[11]!==o?(U=so(l,o,x,p),e[8]=x,e[9]=p,e[10]=l,e[11]=o,e[12]=U):U=e[12];const V=U,m=N?Uo:xs;let v;e[13]!==N||e[14]!==y?(v=y?{color:er}:N?{color:"oklch(0.65 0.15 160)"}:void 0,e[13]=N,e[14]=y,e[15]=v):v=e[15];const F=v;let q;e[16]!==m||e[17]!==b||e[18]!==F?(q=b?s.jsxs("span",{className:"relative size-4 shrink-0",children:[s.jsx(m,{className:"absolute inset-0 size-4 transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0",style:F}),s.jsx(Vn,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):s.jsx(Vn,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[16]=m,e[17]=b,e[18]=F,e[19]=q):q=e[19];let i;e[20]!==P?(i=P&&s.jsx("img",{src:P,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[20]=P,e[21]=i):i=e[21];let O;e[22]!==b||e[23]!==F?(O=!b&&s.jsx(Tn,{className:"h-4 w-4 shrink-0",style:F}),e[22]=b,e[23]=F,e[24]=O):O=e[24];const d=o.isHidden&&"line-through opacity-50";let W;e[25]!==d?(W=Ke("min-w-0 flex-1 truncate text-sm font-medium",d),e[25]=d,e[26]=W):W=e[26];const X=Z??o.label;let se;e[27]!==X||e[28]!==W?(se=s.jsx("span",{className:W,children:X}),e[27]=X,e[28]=W,e[29]=se):se=e[29];let _e;e[30]!==V?(_e=V&&s.jsx(ao,{className:"absolute -right-0.5 -top-0.5"}),e[30]=V,e[31]=_e):_e=e[31];let Ie;return e[32]!==se||e[33]!==_e||e[34]!==q||e[35]!==i||e[36]!==O?(Ie=s.jsxs(s.Fragment,{children:[q,i,O,se,_e]}),e[32]=se,e[33]=_e,e[34]=q,e[35]=i,e[36]=O,e[37]=Ie):Ie=e[37],Ie}const jr="w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",kr="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]",Rr="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";function kn(c,e){return Ke("h-7 shrink-0 overflow-hidden",e?jr:c?Rr:kr)}function Bs(c,e){const o=c.isSavedBlock===!0,l=c.isMultivariate===!0;return Ke("group relative flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?xr:l?hs:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function wr(c){const e=St.c(85),{section:o,raw:l,meta:p,decofile:x,sortableId:b,selected:y,onSelect:N,onDelete:E,onDuplicate:P,onMakeReusable:ne,onToggleHidden:Z,onToggleLazy:U,onAddVariant:V,onDetach:m}=c,v=Ht(),F=cn(),q=l?Ss(l.__resolveType??""):!1,i=o.isHidden===!0,O=q||i;let d;e[0]!==o?(d=eo(o),e[0]=o,e[1]=d):d=e[1];const W=d;let X;e[2]!==b?(X={id:b,animateLayoutChanges:Dr},e[2]=b,e[3]=X):X=e[3];const{attributes:se,listeners:_e,setNodeRef:Ie,transform:Te,isDragging:g}=ws(X);let M;e[4]!==Te?(M=Ts.Transform.toString(Te?{...Te,x:0}:null),e[4]=Te,e[5]=M):M=e[5];const ke=g?0:void 0;let D;e[6]!==M||e[7]!==ke?(D={transform:M,opacity:ke},e[6]=M,e[7]=ke,e[8]=D):D=e[8];const He=D;let K;e[9]!==o?(K=to(o),e[9]=o,e[10]=K):K=e[10];const Ge=K;let ae;e[11]!==N?(ae=R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),N())},e[11]=N,e[12]=ae):ae=e[12];const Ue=g?"cursor-grabbing":"cursor-pointer";let Je;e[13]!==o||e[14]!==y||e[15]!==Ue?(Je=Ke("touch-none transition-colors",Ue,Bs(o,y)),e[13]=o,e[14]=y,e[15]=Ue,e[16]=Je):Je=e[16];let ze;e[17]!==x||e[18]!==p||e[19]!==l||e[20]!==o?(ze=s.jsx(Ks,{section:o,raw:l,meta:p,decofile:x}),e[17]=x,e[18]=p,e[19]=l,e[20]=o,e[21]=ze):ze=e[21];let ye;e[22]!==i||e[23]!==v?(ye=v(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[22]=i,e[23]=v,e[24]=ye):ye=e[24];let Ve;e[25]!==Z?(Ve=R=>{R.stopPropagation(),Z()},e[25]=Z,e[26]=Ve):Ve=e[26];let Ee;e[27]!==i?(Ee=i?s.jsx(ar,{className:"h-3.5 w-3.5"}):s.jsx(rr,{className:"h-3.5 w-3.5"}),e[27]=i,e[28]=Ee):Ee=e[28];let z;e[29]!==i||e[30]!==v?(z=v(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[29]=i,e[30]=v,e[31]=z):z=e[31];let A;e[32]!==z?(A=s.jsx(Bt,{side:"bottom",children:z}),e[32]=z,e[33]=A):A=e[33];const me=ds,Se=us,Le=!0,Ne=ut,J="button",fe="ghost",Ce="icon";let oe;e[34]!==v?(oe=v("sectionsEditor.sectionList.sectionActionsMenu"),e[34]=v,e[35]=oe):oe=e[35];const ee=Ke(kn(O,!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 pe;e[36]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(ms,{className:"h-3.5 w-3.5"}),e[36]=pe):pe=e[36];let Q;e[37]!==Ne||e[38]!==oe||e[39]!==ee?(Q=s.jsx(Ne,{type:J,variant:fe,size:Ce,"aria-label":oe,className:ee,onClick:Vr,onPointerDown:Tr,children:pe}),e[37]=Ne,e[38]=oe,e[39]=ee,e[40]=Q):Q=e[40];let ce;e[41]!==Se||e[42]!==Q?(ce=s.jsx(Se,{asChild:Le,children:Q}),e[41]=Se,e[42]=Q,e[43]=ce):ce=e[43];let je;e[44]!==P?(je=R=>{R.stopPropagation(),P()},e[44]=P,e[45]=je):je=e[45];let Ae;e[46]===Symbol.for("react.memo_cache_sentinel")?(Ae=s.jsx(bs,{className:"h-4 w-4"}),e[46]=Ae):Ae=e[46];let re;e[47]!==v?(re=v("sectionsEditor.sectionList.duplicateMenuItem"),e[47]=v,e[48]=re):re=e[48];let Re;e[49]!==je||e[50]!==re?(Re=s.jsxs(yt,{onClick:je,children:[Ae,re]}),e[49]=je,e[50]=re,e[51]=Re):Re=e[51];let ge;e[52]!==W||e[53]!==V||e[54]!==v?(ge=W&&s.jsxs(yt,{className:no,onClick:R=>{R.stopPropagation(),V()},children:[s.jsx(ir,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.addVariantMenuItem")]}),e[52]=W,e[53]=V,e[54]=v,e[55]=ge):ge=e[55];let Y;e[56]!==F||e[57]!==Ge||e[58]!==ne||e[59]!==v?(Y=Ge&&s.jsxs(yt,{className:_r,onClick:R=>{R.stopPropagation(),ne()},children:[F?s.jsx(ys,{className:"h-4 w-4"}):s.jsx(Tn,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[56]=F,e[57]=Ge,e[58]=ne,e[59]=v,e[60]=Y):Y=e[60];let B;e[61]!==F||e[62]!==m||e[63]!==o.isMultivariate||e[64]!==o.isSavedBlock||e[65]!==v?(B=o.isSavedBlock===!0&&!o.isMultivariate&&s.jsxs(yt,{onClick:R=>{R.stopPropagation(),m()},children:[F?s.jsx(xs,{className:"h-4 w-4"}):s.jsx(Tn,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.detachMenuItem")]}),e[61]=F,e[62]=m,e[63]=o.isMultivariate,e[64]=o.isSavedBlock,e[65]=v,e[66]=B):B=e[66];let te;e[67]!==E?(te=R=>{R.stopPropagation(),E()},e[67]=E,e[68]=te):te=e[68];let be;e[69]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(_s,{className:"h-4 w-4"}),e[69]=be):be=e[69];let ue;e[70]!==v?(ue=v("sectionsEditor.sectionList.deleteMenuItem"),e[70]=v,e[71]=ue):ue=e[71];let De;e[72]!==te||e[73]!==ue?(De=s.jsxs(yt,{className:"text-destructive focus:text-destructive",onClick:te,children:[be,ue]}),e[72]=te,e[73]=ue,e[74]=De):De=e[74];let ie;e[75]!==Re||e[76]!==ge||e[77]!==Y||e[78]!==B||e[79]!==De?(ie=s.jsxs(fs,{align:"end",className:"w-44",children:[Re,ge,Y,B,De]}),e[75]=Re,e[76]=ge,e[77]=Y,e[78]=B,e[79]=De,e[80]=ie):ie=e[80];let C;return e[81]!==me||e[82]!==ce||e[83]!==ie?(C=s.jsxs(me,{children:[ce,ie]}),e[81]=me,e[82]=ce,e[83]=ie,e[84]=C):C=e[84],s.jsxs("div",{ref:Ie,style:He,...se,..._e,role:"button",tabIndex:0,onClick:N,onKeyDown:ae,className:Je,children:[ze,!o.isMultivariate&&s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":v(q?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Ke(kn(O,q)),onClick:R=>{R.stopPropagation(),U()},onPointerDown:Ar,children:s.jsx(lr,{className:Ke("h-3.5 w-3.5",q&&"text-yellow-500")})})}),s.jsx(Bt,{side:"bottom",children:v(q?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":ye,className:Ke(kn(O,i)),onClick:Ve,onPointerDown:Nr,children:Ee})}),A]}),C]})}function Tr(c){return c.stopPropagation()}function Vr(c){return c.stopPropagation()}function Nr(c){return c.stopPropagation()}function Ar(c){return c.stopPropagation()}function Dr(){return!1}function Pr(c){const e=St.c(106),{listKey:o,rawSections:l,sections:p,meta:x,decofile:b,selectedIndex:y,onSelect:N,onReorder:E,onDelete:P,onDuplicate:ne,onMakeReusable:Z,onToggleHidden:U,onToggleLazy:V,onAddVariant:m,onDetach:v,onAddSection:F,canAddSection:q}=c,i=q===void 0?!0:q,O=Ht();let d;e[0]!==p.length?(d=()=>rs(p.length),e[0]=p.length,e[1]=d):d=e[1];const[W,X]=k.useState(d),[se,_e]=k.useState(null),[Ie,Te]=k.useState(o),[g,M]=k.useState(p.length),ke=k.useRef(!1);Ie!==o?(Te(o),M(p.length),X(rs(p.length))):g!==p.length&&(M(p.length),X(ie=>Er(ie,p.length)));let D;e[2]===Symbol.for("react.memo_cache_sentinel")?(D={activationConstraint:{distance:8}},e[2]=D):D=e[2];let He;e[3]===Symbol.for("react.memo_cache_sentinel")?(He={coordinateGetter:Vs},e[3]=He):He=e[3];const K=Es(ln(Rs,D),ln(ks,He));let Ge;e[4]!==W?(Ge=W.map(Mr),e[4]=W,e[5]=Ge):Ge=e[5];const ae=Ge;let Ue;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ue=ie=>{_e(String(ie.active.id))},e[6]=Ue):Ue=e[6];const Je=Ue;let ze;e[7]!==ae||e[8]!==E?(ze=ie=>{_e(null);const{active:C,over:R}=ie;if(!R||C.id===R.id)return;const Qe=ae.indexOf(String(C.id)),qe=ae.indexOf(String(R.id));Qe===-1||qe===-1||(X(dt=>Cs($t([...dt],Qe,qe))),ke.current=!0,requestAnimationFrame(()=>{ke.current=!1}),E?.(Qe,qe))},e[7]=ae,e[8]=E,e[9]=ze):ze=e[9];const ye=ze;let Ve;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>{_e(null)},e[10]=Ve):Ve=e[10];const Ee=Ve;let z,A,me,Se,Le,Ne,J,fe,Ce,oe,ee,pe,Q,ce,je;if(e[11]!==se||e[12]!==i||e[13]!==b||e[14]!==W||e[15]!==ae||e[16]!==ye||e[17]!==x||e[18]!==F||e[19]!==m||e[20]!==P||e[21]!==v||e[22]!==ne||e[23]!==Z||e[24]!==N||e[25]!==U||e[26]!==V||e[27]!==l||e[28]!==p||e[29]!==y||e[30]!==K||e[31]!==O){ce=Symbol.for("react.early_return_sentinel");e:{const ie=C=>{ke.current||N(C)};if(e[47]!==se||e[48]!==i||e[49]!==W||e[50]!==F||e[51]!==l||e[52]!==p||e[53]!==O){const C=se?W.find(R=>R.id===se):null;if(Se=C!=null?p[C.index]:null,me=C!=null?l[C.index]:void 0,W.length===0){let R;e[57]!==O?(R=O("sectionsEditor.sectionList.noSections"),e[57]=O,e[58]=R):R=e[58];let Qe;e[59]!==R?(Qe=s.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:R}),e[59]=R,e[60]=Qe):Qe=e[60];const qe=!i;let dt;e[61]===Symbol.for("react.memo_cache_sentinel")?(dt=s.jsx(Nn,{size:14}),e[61]=dt):dt=e[61];let Xe;e[62]!==O?(Xe=O("sectionsEditor.sectionList.addSectionButton"),e[62]=O,e[63]=Xe):Xe=e[63];let we;e[64]!==F||e[65]!==qe||e[66]!==Xe?(we=s.jsxs(ut,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:qe,onClick:F,children:[dt,Xe]}),e[64]=F,e[65]=qe,e[66]=Xe,e[67]=we):we=e[67];let Fe;e[68]!==Qe||e[69]!==we?(Fe=s.jsxs("div",{className:"space-y-2",children:[Qe,we]}),e[68]=Qe,e[69]=we,e[70]=Fe):Fe=e[70],ce=Fe;break e}Q=Ke(C&&"cursor-grabbing"),e[47]=se,e[48]=i,e[49]=W,e[50]=F,e[51]=l,e[52]=p,e[53]=O,e[54]=me,e[55]=Se,e[56]=Q}else me=e[54],Se=e[55],Q=e[56];A=Ns,fe=K,Ce=As,oe=Je,ee=ye,pe=Ee,z=Ds,Ne=ae,J=Ps,je="space-y-1",Le=W.map(C=>{const R=p[C.index];return R?s.jsx(wr,{sortableId:C.id,section:R,raw:l[C.index],meta:x,decofile:b,selected:y===C.index,onSelect:()=>ie(C.index),onDelete:()=>P(C.index),onDuplicate:()=>ne(C.index),onMakeReusable:()=>Z(C.index),onToggleHidden:()=>U(C.index),onToggleLazy:()=>V(C.index),onAddVariant:()=>m(C.index),onDetach:()=>v(C.index)},C.id):null})}e[11]=se,e[12]=i,e[13]=b,e[14]=W,e[15]=ae,e[16]=ye,e[17]=x,e[18]=F,e[19]=m,e[20]=P,e[21]=v,e[22]=ne,e[23]=Z,e[24]=N,e[25]=U,e[26]=V,e[27]=l,e[28]=p,e[29]=y,e[30]=K,e[31]=O,e[32]=z,e[33]=A,e[34]=me,e[35]=Se,e[36]=Le,e[37]=Ne,e[38]=J,e[39]=fe,e[40]=Ce,e[41]=oe,e[42]=ee,e[43]=pe,e[44]=Q,e[45]=ce,e[46]=je}else z=e[32],A=e[33],me=e[34],Se=e[35],Le=e[36],Ne=e[37],J=e[38],fe=e[39],Ce=e[40],oe=e[41],ee=e[42],pe=e[43],Q=e[44],ce=e[45],je=e[46];if(ce!==Symbol.for("react.early_return_sentinel"))return ce;let Ae;e[71]!==Le||e[72]!==je?(Ae=s.jsx("div",{className:je,children:Le}),e[71]=Le,e[72]=je,e[73]=Ae):Ae=e[73];let re;e[74]!==z||e[75]!==Ne||e[76]!==J||e[77]!==Ae?(re=s.jsx(z,{items:Ne,strategy:J,children:Ae}),e[74]=z,e[75]=Ne,e[76]=J,e[77]=Ae,e[78]=re):re=e[78];let Re;e[79]!==me||e[80]!==Se||e[81]!==b||e[82]!==x?(Re=Se?s.jsx("div",{className:Ke("cursor-grabbing shadow-lg ring-1 ring-border/60",Bs(Se,!1)),children:s.jsx(Ks,{section:Se,raw:me,meta:x,decofile:b})}):null,e[79]=me,e[80]=Se,e[81]=b,e[82]=x,e[83]=Re):Re=e[83];let ge;e[84]!==Re?(ge=cs.createPortal(s.jsx(js,{dropAnimation:gs,children:Re}),document.body),e[84]=Re,e[85]=ge):ge=e[85];let Y;e[86]!==A||e[87]!==fe||e[88]!==Ce||e[89]!==oe||e[90]!==ee||e[91]!==pe||e[92]!==re||e[93]!==ge?(Y=s.jsxs(A,{sensors:fe,collisionDetection:Ce,onDragStart:oe,onDragEnd:ee,onDragCancel:pe,children:[re,ge]}),e[86]=A,e[87]=fe,e[88]=Ce,e[89]=oe,e[90]=ee,e[91]=pe,e[92]=re,e[93]=ge,e[94]=Y):Y=e[94];const B=!i;let te;e[95]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Nn,{size:14}),e[95]=te):te=e[95];let be;e[96]!==O?(be=O("sectionsEditor.sectionList.addSectionButton"),e[96]=O,e[97]=be):be=e[97];let ue;e[98]!==F||e[99]!==B||e[100]!==be?(ue=s.jsxs(ut,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:B,onClick:F,children:[te,be]}),e[98]=F,e[99]=B,e[100]=be,e[101]=ue):ue=e[101];let De;return e[102]!==Q||e[103]!==Y||e[104]!==ue?(De=s.jsxs("div",{className:Q,children:[Y,ue]}),e[102]=Q,e[103]=Y,e[104]=ue,e[105]=De):De=e[105],De}function Mr(c){return c.id}function An(c){const e=St.c(5),{rule:o,matchers:l}=c,p=o?.__resolveType??"";let x;if(e[0]!==l||e[1]!==p){const E=l.find(P=>P.resolveType===p)?.iconName??oo(p);x=qo(E),e[0]=l,e[1]=p,e[2]=x}else x=e[2];const b=x;if(!b)return null;let y;return e[3]!==b?(y=s.jsx(b,{size:14,className:"shrink-0"}),e[3]=b,e[4]=y):y=e[4],y}function is(c){return c.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
2
|
-
`)}function ls(c){return c.map((e,o)=>({id:crypto.randomUUID(),index:o,variant:e}))}function Cr(c,e){const o=new Map;for(const l of c){const p=o.get(l.variant.label);p?p.push(l):o.set(l.variant.label,[l])}return e.map((l,p)=>({id:o.get(l.label)?.shift()?.id??crypto.randomUUID(),index:p,variant:l}))}function Kr(c){return c.map((e,o)=>({...e,index:o}))}function Is(c){const e=St.c(19),{label:o,effectiveRule:l,matchers:p,canDelete:x,dragging:b,onRename:y,onDuplicate:N,onDelete:E}=c,P=Ht(),ne=cn();let Z;e[0]!==ne||e[1]!==b||e[2]!==l||e[3]!==p?(Z=ne?s.jsxs("span",{className:"relative size-4 shrink-0",children:[s.jsx("span",{className:Ke("absolute inset-0 flex items-center justify-center transition-opacity",b?"opacity-0":"group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"),children:s.jsx(An,{rule:l,matchers:p})}),s.jsx(Vn,{"aria-hidden":!0,className:Ke("absolute inset-0 size-4 transition-opacity",b?"opacity-100":"opacity-0 group-hover:opacity-100 group-has-[:focus-visible]:opacity-100")})]}):s.jsx(An,{rule:l,matchers:p}),e[0]=ne,e[1]=b,e[2]=l,e[3]=p,e[4]=Z):Z=e[4];let U;e[5]!==o?(U=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:o}),e[5]=o,e[6]=U):U=e[6];let V;e[7]!==x||e[8]!==b||e[9]!==o||e[10]!==E||e[11]!==N||e[12]!==y||e[13]!==P?(V=!b&&s.jsxs(ds,{children:[s.jsx(us,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":P("sectionsEditor.pageVariantTabs.actionsAriaLabel",{label:o}),className:"size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",onClick:Ir,onPointerDown:Br,children:s.jsx(ms,{size:14})})}),s.jsxs(fs,{align:"end",className:"w-36",children:[s.jsxs(yt,{onClick:v=>{v.stopPropagation(),y?.()},children:[s.jsx(or,{size:14}),P("sectionsEditor.pageVariantTabs.renameAction")]}),s.jsxs(yt,{onClick:v=>{v.stopPropagation(),N?.()},children:[s.jsx(bs,{size:14}),P("sectionsEditor.pageVariantTabs.duplicateAction")]}),s.jsx(Ua,{}),s.jsxs(yt,{variant:"destructive",disabled:!x,onClick:v=>{v.stopPropagation(),E?.()},children:[s.jsx(_s,{size:14}),P("sectionsEditor.pageVariantTabs.deleteAction")]})]})]}),e[7]=x,e[8]=b,e[9]=o,e[10]=E,e[11]=N,e[12]=y,e[13]=P,e[14]=V):V=e[14];let m;return e[15]!==Z||e[16]!==U||e[17]!==V?(m=s.jsxs(s.Fragment,{children:[Z,U,V]}),e[15]=Z,e[16]=U,e[17]=V,e[18]=m):m=e[18],m}function Br(c){return c.stopPropagation()}function Ir(c){return c.stopPropagation()}function Lr(c){const e=St.c(33),{entry:o,isActive:l,canDelete:p,decofile:x,meta:b,matchers:y,onSelect:N,onRename:E,onDuplicate:P,onDelete:ne}=c;let Z;e[0]!==o.id?(Z={id:o.id,animateLayoutChanges:Fr},e[0]=o.id,e[1]=Z):Z=e[1];const{attributes:U,listeners:V,setNodeRef:m,transform:v,isDragging:F}=ws(Z);let q;e[2]!==v?(q=Ts.Transform.toString(v?{...v,x:0}:null),e[2]=v,e[3]=q):q=e[3];const i=F?0:void 0;let O;e[4]!==q||e[5]!==i?(O={transform:q,opacity:i},e[4]=q,e[5]=i,e[6]=O):O=e[6];const d=O,W=b??void 0;let X;e[7]!==x||e[8]!==o.variant.rule||e[9]!==W?(X=zt(o.variant.rule,x,W),e[7]=x,e[8]=o.variant.rule,e[9]=W,e[10]=X):X=e[10];const se=X;let _e;e[11]!==N?(_e=D=>{D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),N())},e[11]=N,e[12]=_e):_e=e[12];const Ie=F?"cursor-grabbing":"cursor-pointer active:cursor-grabbing",Te=l?vs:hs;let g;e[13]!==Ie||e[14]!==Te?(g=Ke("group flex select-none items-center gap-2 rounded-md px-2 py-2.5 transition-colors touch-none",Ie,Te),e[13]=Ie,e[14]=Te,e[15]=g):g=e[15];let M;e[16]!==p||e[17]!==se||e[18]!==o.variant.label||e[19]!==y||e[20]!==ne||e[21]!==P||e[22]!==E?(M=s.jsx(Is,{label:o.variant.label,effectiveRule:se,matchers:y,canDelete:p,onRename:E,onDuplicate:P,onDelete:ne}),e[16]=p,e[17]=se,e[18]=o.variant.label,e[19]=y,e[20]=ne,e[21]=P,e[22]=E,e[23]=M):M=e[23];let ke;return e[24]!==U||e[25]!==V||e[26]!==N||e[27]!==m||e[28]!==d||e[29]!==g||e[30]!==M||e[31]!==_e?(ke=s.jsx("div",{ref:m,style:d,...U,...V,onClick:N,onKeyDown:_e,className:g,children:M}),e[24]=U,e[25]=V,e[26]=N,e[27]=m,e[28]=d,e[29]=g,e[30]=M,e[31]=_e,e[32]=ke):ke=e[32],ke}function Fr(){return!1}function Or(c){const e=St.c(9),{variant:o,decofile:l,meta:p,matchers:x}=c,b=p??void 0;let y;e[0]!==l||e[1]!==b||e[2]!==o.rule?(y=zt(o.rule,l,b),e[0]=l,e[1]=b,e[2]=o.rule,e[3]=y):y=e[3];const N=y;let E;e[4]===Symbol.for("react.memo_cache_sentinel")?(E=Ke("flex items-center gap-2 rounded-md px-2 py-2.5 shadow-lg ring-1 ring-border/60 cursor-grabbing",vs),e[4]=E):E=e[4];let P;return e[5]!==N||e[6]!==x||e[7]!==o.label?(P=s.jsx("div",{className:E,children:s.jsx(Is,{label:o.label,effectiveRule:N,matchers:x,canDelete:!1,dragging:!0})}),e[5]=N,e[6]=x,e[7]=o.label,e[8]=P):P=e[8],P}function zr(c){const e=St.c(91),{listKey:o,variants:l,activeIndex:p,decofile:x,meta:b,matchers:y,onSelect:N,onReorder:E,onRename:P,onDuplicate:ne,onDelete:Z,onAdd:U}=c,V=Ht();let m;e[0]!==l?(m=()=>ls(l),e[0]=l,e[1]=m):m=e[1];const[v,F]=k.useState(m),[q,i]=k.useState(null),[O,d]=k.useState(o),[W,X]=k.useState(l.length);let se;e[2]!==l?(se=()=>is(l),e[2]=l,e[3]=se):se=e[3];const[_e,Ie]=k.useState(se),Te=k.useRef(!1),g=is(l);O!==o?(d(o),X(l.length),Ie(g),F(ls(l))):(W!==l.length||_e!==g)&&(X(l.length),Ie(g),F(ge=>Cr(ge,l)));let M;e[4]===Symbol.for("react.memo_cache_sentinel")?(M={activationConstraint:{distance:8}},e[4]=M):M=e[4];let ke;e[5]===Symbol.for("react.memo_cache_sentinel")?(ke={coordinateGetter:Vs},e[5]=ke):ke=e[5];const D=Es(ln(Rs,M),ln(ks,ke));let He;e[6]!==v?(He=v.map($r),e[6]=v,e[7]=He):He=e[7];const K=He,Ge=l.length>1;let ae;e[8]!==v?(ae=ge=>{const Y=String(ge.active.id);i(v.find(B=>B.id===Y)??null)},e[8]=v,e[9]=ae):ae=e[9];const Ue=ae;let Je;e[10]!==K||e[11]!==E?(Je=ge=>{i(null);const{active:Y,over:B}=ge;if(!B||Y.id===B.id)return;const te=K.indexOf(String(Y.id)),be=K.indexOf(String(B.id));te===-1||be===-1||(F(ue=>Kr($t([...ue],te,be))),Te.current=!0,requestAnimationFrame(()=>{Te.current=!1}),E(te,be))},e[10]=K,e[11]=E,e[12]=Je):Je=e[12];const ze=Je;let ye;e[13]===Symbol.for("react.memo_cache_sentinel")?(ye=()=>{i(null)},e[13]=ye):ye=e[13];const Ve=ye;let Ee,z,A,me,Se,Le,Ne,J,fe,Ce,oe,ee,pe;if(e[14]!==p||e[15]!==Ge||e[16]!==x||e[17]!==v||e[18]!==K||e[19]!==ze||e[20]!==Ue||e[21]!==y||e[22]!==b||e[23]!==U||e[24]!==Z||e[25]!==ne||e[26]!==P||e[27]!==N||e[28]!==D||e[29]!==V){const ge=R=>{Te.current||N(R)};oe="space-y-1 border-b p-2";let Y;e[43]!==V?(Y=V("sectionsEditor.pageVariantTabs.variantsLabel"),e[43]=V,e[44]=Y):Y=e[44];let B;e[45]!==Y?(B=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:Y}),e[45]=Y,e[46]=B):B=e[46];let te;e[47]!==V?(te=V("sectionsEditor.pageVariantTabs.addVariantAriaLabel"),e[47]=V,e[48]=te):te=e[48];let be;e[49]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Nn,{size:14}),e[49]=be):be=e[49];let ue;e[50]!==U||e[51]!==te?(ue=s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":te,className:"size-6",onClick:U,children:be})}),e[50]=U,e[51]=te,e[52]=ue):ue=e[52];let De;e[53]!==V?(De=V("sectionsEditor.pageVariantTabs.addVariantTooltip"),e[53]=V,e[54]=De):De=e[54];let ie;e[55]!==De?(ie=s.jsx(Bt,{children:De}),e[55]=De,e[56]=ie):ie=e[56];let C;e[57]!==ue||e[58]!==ie?(C=s.jsxs(Ct,{children:[ue,ie]}),e[57]=ue,e[58]=ie,e[59]=C):C=e[59],e[60]!==B||e[61]!==C?(ee=s.jsxs("div",{className:"flex items-center justify-between",children:[B,C]}),e[60]=B,e[61]=C,e[62]=ee):ee=e[62],z=Ns,Le=D,Ne=As,J=Ue,fe=ze,Ce=Ve,Ee=Ds,me=K,Se=Ps,pe="space-y-0.5",A=v.map(R=>s.jsx(Lr,{entry:R,isActive:R.index===p,canDelete:Ge,decofile:x,meta:b,matchers:y,onSelect:()=>ge(R.index),onRename:()=>P(R.index),onDuplicate:()=>ne(R.index),onDelete:()=>Z(R.index)},R.id)),e[14]=p,e[15]=Ge,e[16]=x,e[17]=v,e[18]=K,e[19]=ze,e[20]=Ue,e[21]=y,e[22]=b,e[23]=U,e[24]=Z,e[25]=ne,e[26]=P,e[27]=N,e[28]=D,e[29]=V,e[30]=Ee,e[31]=z,e[32]=A,e[33]=me,e[34]=Se,e[35]=Le,e[36]=Ne,e[37]=J,e[38]=fe,e[39]=Ce,e[40]=oe,e[41]=ee,e[42]=pe}else Ee=e[30],z=e[31],A=e[32],me=e[33],Se=e[34],Le=e[35],Ne=e[36],J=e[37],fe=e[38],Ce=e[39],oe=e[40],ee=e[41],pe=e[42];let Q;e[63]!==A||e[64]!==pe?(Q=s.jsx("div",{className:pe,children:A}),e[63]=A,e[64]=pe,e[65]=Q):Q=e[65];let ce;e[66]!==Ee||e[67]!==me||e[68]!==Se||e[69]!==Q?(ce=s.jsx(Ee,{items:me,strategy:Se,children:Q}),e[66]=Ee,e[67]=me,e[68]=Se,e[69]=Q,e[70]=ce):ce=e[70];let je;e[71]!==q||e[72]!==x||e[73]!==y||e[74]!==b?(je=q?s.jsx(Or,{variant:q.variant,decofile:x,meta:b,matchers:y}):null,e[71]=q,e[72]=x,e[73]=y,e[74]=b,e[75]=je):je=e[75];let Ae;e[76]!==je?(Ae=cs.createPortal(s.jsx(js,{dropAnimation:gs,children:je}),document.body),e[76]=je,e[77]=Ae):Ae=e[77];let re;e[78]!==z||e[79]!==Le||e[80]!==Ne||e[81]!==J||e[82]!==fe||e[83]!==Ce||e[84]!==ce||e[85]!==Ae?(re=s.jsxs(z,{sensors:Le,collisionDetection:Ne,onDragStart:J,onDragEnd:fe,onDragCancel:Ce,children:[ce,Ae]}),e[78]=z,e[79]=Le,e[80]=Ne,e[81]=J,e[82]=fe,e[83]=Ce,e[84]=ce,e[85]=Ae,e[86]=re):re=e[86];let Re;return e[87]!==oe||e[88]!==ee||e[89]!==re?(Re=s.jsxs("div",{className:oe,children:[ee,re]}),e[87]=oe,e[88]=ee,e[89]=re,e[90]=Re):Re=e[90],Re}function $r(c){return c.id}function Hr(c,e,o,l){if(!c||typeof c!="object")return{kind:"error",reason:"no-matcher-rule"};const p=e.trim();if(!p)return Rt(c,o,l)?{kind:"inline",blockKey:c.__resolveType??"",inlinedRule:Rn(c,o,l)}:{kind:"noop"};const x=wn(c,o,l);if(!x)return{kind:"error",reason:"unreadable-rule"};if(x.blockKey)return{kind:"updateBlock",blockKey:x.blockKey,blockData:vt(x.resolveType,x.data,p)};const b=on(p),y=rn(b,o);return y?{kind:"error",reason:"invalid-block-id",message:y}:{kind:"createBlock",blockId:b,blockData:vt(x.resolveType,x.data,p),reference:Mt(b)}}function hc({orgSlug:c,virtualMcpId:e,branch:o,previewReady:l=!0,previewUrl:p,currentPath:x,activePageBlockKey:b=null,activeGlobalBlockKey:y=null,externalSelection:N,onSaved:E,initialEditSeo:P=!1,onExitSeo:ne,onSelectRoot:Z,onViewJsonFile:U,onVariantPreviewOverride:V}){const m=Ht(),v=Ja(),F=v?.taskId??null,q=l?{orgSlug:c,virtualMcpId:e,branch:o,threadId:F,previewUrl:p}:null,{data:i,isLoading:O}=ro(q),{data:d,isLoading:W}=io(q),X=cn(),se=v?.virtualMcpId,Ie=$o(se===e?e:null)?.metadata?.siteSlug??null,Te=mr({virtualMcpId:e,sandboxUrl:p}),[g,M]=k.useState(null),[ke,D]=k.useState(null),[He,K]=k.useState(null),[Ge,ae]=k.useState(0),[Ue,Je]=k.useState(void 0),[ze,ye]=k.useState(null),[Ve,Ee]=k.useState(null),[z,A]=k.useState([]),me=k.useRef(null),[Se,Le]=k.useState(z.length);Se!==z.length&&(Le(z.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[Ne,J]=k.useState(0),[fe,Ce]=k.useState(null),[oe,ee]=k.useState(null),[pe,Q]=k.useState(null),[ce,je]=k.useState(!0),[Ae,re]=k.useState(!1),[Re,ge]=k.useState(!1),Y=k.useRef(null),[B,te]=k.useState(P),[be,ue]=k.useState(P);P&&!be&&(ue(!0),te(!0),M(null),D(null),K(null),A([])),!P&&be&&ue(!1);const[De,ie]=k.useState(null),[C,R]=k.useState(void 0),[Qe,qe]=k.useState([]),[dt,Xe]=k.useState(0),[we,Fe]=k.useState(0),[Ls,$e]=k.useState(null),[wt,We]=k.useState(null),[Dn,Pn]=k.useState(null),Fs=qa(),Os=`${c}/${e}/${o}`,Gt=lo({orgSlug:c,virtualMcpId:e,branch:o}),[zs,$s]=k.useState(x),[Hs,Gs]=k.useState(b),[Us,qs]=k.useState(y);(zs!==x||Hs!==b||Us!==y)&&(queueMicrotask(()=>Gt.flush()),$s(x),Gs(b),qs(y),M(null),D(null),K(null),ae(0),ye(null),Ee(null),Fe(0),$e(null),We(null),A([]),J(t=>t+1),te(!1),ie(null),R(void 0),qe([]),Xe(t=>t+1));const le=co({orgSlug:c,virtualMcpId:e,branch:o}),Ut=Po((t,n)=>{le.mutate({blockKey:t,data:n},{onSuccess:()=>E?.(),onError:a=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:a.message}))})}),qt=Zo({orgSlug:c,virtualMcpId:e,branch:o}),[It,Tt]=k.useState(!1),he=k.useRef(null),ot=k.useRef(null),rt=k.useRef(null),un=k.useRef({}),Ze=k.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Ws,Ys]=k.useState(null);if(!l||O||W)return s.jsx("div",{className:"h-full w-full flex items-center justify-center",children:s.jsx(Wa,{className:"size-5 text-muted-foreground"})});if(!i||!d)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:m("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Js=tr(i),xe=!!y,Ye=xe?null:nr(Js,x,b),_=xe?y:Ye?.key??null,dn=xe&&y?i[y]:void 0,Mn=xe&&y&&dn?sr(y,dn):xe&&y?y:"",Wt=!xe&&_&&i[_]?i[_]:null,mn=B&&i&&d&&_&&Ye?Jn(i,{kind:"page",pageKey:_,pageName:String(Ye.name??""),path:String(Ye.path??"")},d):null,Qs=B?Wt?.seo:void 0,fn=C!==void 0?C:Qs,Zs=B?uo(fn):void 0,Xs=mn?.seoTypeOptions??[],ea=B&&d?mo(d):"",Cn=De??Zs??{},pn=B&&mn?cr(Cn,mn):null,ta=B&&pn&&fo(fn)?an(pn,d):null,na=B?po(i,d)?.seoData:void 0,Oe=xe?[{label:"Default",sections:[{__resolveType:y}]}]:go(Wt?.sections,i??{}),Vt=Oe.length>1,Pe=Math.min(Ge,Oe.length-1),it=Oe[Pe],H=it?.sections??[],Be=tn(H,i),gn=!xe&&ho(Wt?.sections);if(xe&&y&&Dn!==y){Pn(y);const t=H[0],n=Be[0];if(t&&n){M(0),Fe(0),A([]);const a=jt(t,n,i);a&&(D(a.data),K(a.resolveType),We(null),$e(null))}}!xe&&Dn!==null&&Pn(null),Ze.current={rawSections:H,parsedSections:Be,decofile:i??{},activePageKey:_,pageVariants:Oe,variantIndex:Pe,sectionVariantIndex:we,selectedSectionIndex:g};const sa=()=>({multivariate:gn,index:Pe,variants:Oe.map(t=>({rule:t.rule}))}),hn=(t,n)=>{if(!V)return;if(!_||!gn||t.length<=1){V(null);return}const a=os(_,{multivariate:!0,index:n,variants:t},i,d);V(a.length>0?a:null)},vn=V&&_&&gn&&Vt&&!O&&!W?_:null;if(vn!==Ws&&(Ys(vn),vn)){const t=Oe.map(a=>({rule:a.rule})),n=Pe;queueMicrotask(()=>hn(t,n))}const Nt=(t,n,a)=>{if(!V)return;if(!_){V(null);return}const r=sa(),u=os(_,r,i,d);if(!t||n<0){V(u.length>0?u:null);return}const h=pr({pageKey:_,page:r,sectionIndex:n,sectionLazy:Be[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:i,meta:d}),f=[...u,...h];V(f.length>0?f:null)},mt=(t,n,a,r=g??-1,u=!1)=>{const h=at(t,n);if(!h){D(null),K(null),We(null),$e(null),u&&Nt(null,r,a);return}const j=Qn(h,ht)[a];if(!j){D(null),K(null),We(null),$e(null),u&&Nt(null,r,a);return}const I=jo(j.value,i);D(I?.data??null),K(I?.resolveType??null);const{resolveType:S,formValue:w}=Ft(j.rule,i,d??void 0);We(S),$e(w),u&&Nt(h,r,a)},Lt=N?.index;if(N!==void 0&&(N?.seq??null)!==Ue&&(Je(N?.seq??null),typeof Lt=="number")){const t=H[Lt],n=Be[Lt];if(t&&n)if(M(Lt),Fe(0),A([]),J(a=>a+1),n.isMultivariate)mt(t,n,0,Lt);else{const a=jt(t,n,i);a?(D(a.data),K(a.resolveType)):(D(null),K(null)),We(null),$e(null)}}const Yt={orgSlug:c,virtualMcpId:e,branch:o,threadId:F,previewUrl:p??void 0,siteSlug:Ie},yn=He&&d?an(He,d):null,et=(t,n)=>{if(!_)return;he.current&&(clearTimeout(he.current),he.current=null),rt.current&&(clearTimeout(rt.current),rt.current=null),ot.current&&(clearTimeout(ot.current),ot.current=null);const a=Ot(i,_,t,Pe,Oe);le.mutate({blockKey:_,data:a},{onSuccess:()=>n?.onSuccess?.()??E?.(),onError:r=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:r.message}))})},At=()=>{M(null),D(null),K(null),Fe(0),$e(null),We(null),A([]),J(t=>t+1)},aa=(t,n)=>{he.current&&clearTimeout(he.current);const a=Ze.current.sectionVariantIndex;he.current=setTimeout(()=>{const{rawSections:r,parsedSections:u,decofile:h,activePageKey:f,pageVariants:j,variantIndex:I}=Ze.current,S=r[n];if(!S)return;const w=u[n];if(!w)return;if(w.isSavedBlock){const $=Lo(S,w);if(!$)return;le.mutate({blockKey:$,data:t},{onSuccess:()=>E?.(),onError:G=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:G.message}))});return}if(!f)return;const T={...h[f]},de=[...r];if(w.isMultivariate){const $=at(S,w);if(!$||!f)return;const G=Fo($,a,t);de[n]=kt(S,w,G)}else if(w.isHidden){const $=Ss(S.__resolveType),G=$?{...S.section}:{...S},Me=Array.isArray(G.variants)?[...G.variants]:[];Me[0]&&(Me[0]={...Me[0],value:t}),G.variants=Me,$?de[n]={...S,section:G}:de[n]=G}else w.isLazy?de[n]={...S,section:t}:de[n]=t;if(j.length>1){const $=T.sections,G=[...$?.variants??[]];G[I]&&(G[I]={...G[I],value:de}),T.sections={...$,variants:G}}else T.sections=de;le.mutate({blockKey:f,data:T},{onSuccess:()=>E?.(),onError:$=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:$.message}))})},jn)},oa=t=>{M(t),Fe(0),A([]),J(u=>u+1);const n=H[t],a=Be[t];if(!n||!a)return;if(a.isMultivariate){mt(n,a,0,t);return}const r=jt(n,a,i);if(!r){D(null),K(null),We(null),$e(null),Nt(null,t,0);return}D(r.data),K(r.resolveType),We(null),$e(null),Nt(null,t,0)},Kn=t=>{const n=t;D(n),g!==null&&aa(n,g)},Sn=t=>{if(!_||!i||!d||!Ye)return;const n={kind:"page",pageKey:_,pageName:String(Ye.name??""),path:String(Ye.path??"")},a=Jn(i,n,d);a&&Gt.save(_,()=>{const r=Fs.getQueryData(Ya.decofile(Os))?.[_];if(!r||typeof r!="object"||r===null||Array.isArray(r))return null;const u={...r,...un.current};return un.current={},t?.raw!==void 0?{...u,seo:t.raw}:t?.inner!==void 0?dr(n,a,u,t.inner):u})},ra=(t,n)=>{_&&(un.current[t]=n,Sn())},ia=(t,n)=>{if(!_)return;const a=$t([...H],t,n);g!==null&&(g===t?M(n):t<g&&n>=g?M(g-1):t>g&&n<=g&&M(g+1)),et(a)},la=t=>{if(!_)return;const n=H.filter((a,r)=>r!==t);g===t?At():g!==null&&g>t&&M(g-1),et(n)},ca=t=>{if(!_)return;const n=H[t];if(!n)return;const a=[...H];a.splice(t+1,0,Bo(n)),g!==null&&g>t&&M(g+1),et(a)},ua=t=>{if(!_)return;const n=H[t],a=Be[t];if(!n||!a)return;const r=a.isHidden?Co(n):Ko(n);if(!r)return;const u=[...H];u[t]=r,g===t&&At(),et(u)},da=t=>{if(!_)return;const n=H[t],a=Be[t];if(!n||!a||a.isMultivariate)return;const r=Mo(n);if(!r)return;const u=[...H];u[t]=r,g===t&&At(),et(u)},ma=t=>{if(!_)return;const n=H[t],a=Be[t];if(!n||!a?.isSavedBlock)return;const r=jt(n,a,i);if(!r?.data)return;const{name:u,...h}=r.data,f=[...H];a.isLazy?f[t]={...n,section:h}:f[t]=h,g===t&&At(),et(f)},fa=t=>{if(!_)return;const n=[...H,{__resolveType:t.resolveType}],a=n.length-1;et(n,{onSuccess:()=>{re(!1),M(a),Fe(0),A([]),J(f=>f+1);const r=n[a],u=tn(n,i)[a];if(!r||!u)return;if(u.isMultivariate){mt(r,u,0);return}const h=jt(r,u,i);if(!h){D(null),K(null),We(null),$e(null);return}D(h.data),K(h.resolveType),We(null),$e(null)}})},Bn=t=>{Y.current=t.append,re(!0)},pa=t=>{const n=Y.current;if(!n){fa(t);return}n({__resolveType:t.resolveType}),re(!1),Y.current=null},ga=t=>{if(g===null)return;const n=H[g],a=Be[g];!n||!a?.isMultivariate||(Fe(t),A([]),J(r=>r+1),mt(n,a,t,g,!0))},ha=t=>{if(g===null||!_)return;const n=H[g],a=Be[g];if(!n||!a?.isMultivariate)return;const r=at(n,a);if(!r)return;const u=Ao(r,t);if(!u){L.error(m("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const h=[...H];h[g]=kt(n,a,u);const f=u.variants;let j=we;t===we?j=Math.min(t,f.length-1):t<we&&(j=we-1),Fe(j),A([]),J(I=>I+1),mt(h[g],a,j),et(h)},va=t=>{if(g===null||!_)return;const n=H[g],a=Be[g];if(!n||!a?.isMultivariate)return;const r=at(n,a);if(!r)return;const u=Do(r,t),h=[...H];h[g]=kt(n,a,u);const f=t+1;Fe(f),A([]),J(j=>j+1),mt(h[g],a,f),et(h)},ya=(t,n)=>{if(g===null||!_||t===n)return;const a=H[g],r=Be[g];if(!a||!r?.isMultivariate)return;const u=at(a,r);if(!u)return;const h=Vo(u,t,n),f=[...H];f[g]=kt(a,r,h);let j=we;we===t?j=n:t<we&&n>=we?j=we-1:t>we&&n<=we&&(j=we+1),Fe(j),mt(f[g],r,j),et(f)},bn=t=>{const n=t??g;if(n===null||!_)return;const a=H[n],r=Be[n];if(!a||!r)return;const u=Ro(a,r);if(!u){L.error(m("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const h=[...H];h[n]=u.section;const f=tn(h,i)[n];if(!f?.isMultivariate){L.error(m("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}M(n),Fe(u.newVariantIndex),A([]),J(j=>j+1),mt(u.section,f,u.newVariantIndex,n),et(h)},Sa=()=>{if(g===null||!_)return;const t=H[g],n=Be[g];if(!t||!n?.isMultivariate)return;const a=at(t,n);if(!a)return;const r=No(t,n,a);if(!r){L.error(m("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const u=[...H];u[g]=r;const h=tn(u,i)[g];if(!h)return;Fe(0),We(null),$e(null),A([]),J(j=>j+1);const f=jt(r,h,i);f?(D(f.data),K(f.resolveType)):(D(null),K(null)),Nt(null,g,0),et(u)},ba=async t=>{if(fe===null||!_)return;const n=rn(t,i);if(n){L.error(n);return}const a=H[fe],r=Be[fe];if(!a||!r)return;const u=jt(a,r,i);if(!u){L.error(m("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const h={...u.data,name:t};try{await le.mutateAsync({blockKey:t,data:h});const f=[...H];f[fe]={__resolveType:t},await le.mutateAsync({blockKey:_,data:Ot(i,_,f,Pe,Oe)}),g===fe&&At(),Ce(null),L.success(m("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),E?.()}catch(f){L.error(f instanceof Error?f.message:m("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"))}},In=it?.rule;if(Vt&&g===null&&Ve===null&&In){const{resolveType:t,formValue:n}=Ft(In,i??{},d??void 0);Ee(t),ye(n)}const Jt=d?vo(d):[],Ln=d&&i?yo(d,i):[],xa=!xe&&!!(Te&&d&&i),_a=Ve&&d?an(Ve,d):null,ft=()=>{ot.current&&(clearTimeout(ot.current),ot.current=null),rt.current&&(clearTimeout(rt.current),rt.current=null)},bt=async(t,n)=>{if(!(Io(n,t,d)>0))try{await qt.mutateAsync({blockKey:t})}catch(a){L.error(a instanceof Error?a.message:m("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"))}},Fn=t=>{ot.current&&clearTimeout(ot.current),ot.current=setTimeout(()=>{const{activePageKey:n,decofile:a,variantIndex:r}=Ze.current;if(!n)return;const u={...a[n]},h={...u.sections},f=[...h.variants??[]],j=f[r],I=j?.rule;if(Rt(I,a,d)){const S=I?.__resolveType??"",w=a[S],T=typeof w?.name=="string"?w.name:S,{__resolveType:de,...$}=t;le.mutate({blockKey:S,data:vt(de??"",$,T)},{onSuccess:()=>E?.(),onError:G=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:G.message}))});return}j&&(f[r]={...j,rule:t}),u.sections={...h,variants:f},le.mutate({blockKey:n,data:u},{onSuccess:()=>E?.(),onError:S=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:S.message}))})},jn)},Ea=t=>{Ee(t);const n=t?ss(t,d):{__resolveType:as};ye(t?n:{}),Fn(n)},ja=t=>{const n=t;ye(n);const a=Ve?{__resolveType:Ve,...n}:{...n};Fn(a)},ka=async t=>{ft();const{activePageKey:n,decofile:a,variantIndex:r}=Ze.current;if(!n)return;const u=a[n],h=u?.sections;if(!h||typeof h!="object"||Array.isArray(h))return;const f=h;if(!Array.isArray(f.variants))return;const j=[...f.variants],I=j[r];if(!I)return;const S=Pt(I.rule,a,d),w=Mt(t);j[r]={...I,rule:w};const T={...a,[n]:{...u,sections:{...f,variants:j}}},{resolveType:de,formValue:$}=Ft(w,T,d??void 0);Ee(de),ye($);try{await le.mutateAsync({blockKey:n,data:T[n]}),S&&S!==t&&await bt(S,T),E?.()}catch(G){L.error(G instanceof Error?G.message:m("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}},On=t=>{rt.current&&clearTimeout(rt.current);const{selectedSectionIndex:n,sectionVariantIndex:a}=Ze.current;n!==null&&(rt.current=setTimeout(()=>{const{rawSections:r,parsedSections:u,decofile:h,activePageKey:f,pageVariants:j,variantIndex:I}=Ze.current;if(!f)return;const S=r[n],w=u[n];if(!S||!w?.isMultivariate)return;const T=at(S,w);if(!T)return;const $=(T.variants??[])[a]?.rule;if(Rt($,h,d)){const ve=$?.__resolveType??"",tt=h[ve],lt=typeof tt?.name=="string"?tt.name:ve,{__resolveType:pt,...ct}=t;le.mutate({blockKey:ve,data:vt(pt??"",ct,lt)},{onSuccess:()=>E?.(),onError:gt=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:gt.message}))});return}const G=ns(T,a,t),Me=[...r];Me[n]=kt(S,w,G);const st=Ot(h,f,Me,I,j);le.mutate({blockKey:f,data:st},{onSuccess:()=>E?.(),onError:ve=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:ve.message}))})},jn))},Ra=t=>{We(t);const n=t?ss(t,d):{__resolveType:as};$e(t?n:{}),On(n)},wa=t=>{const n=t;$e(n);const a=wt?{__resolveType:wt,...n}:{...n};On(a)},Ta=async t=>{ft();const{selectedSectionIndex:n,sectionVariantIndex:a,rawSections:r,parsedSections:u,decofile:h,activePageKey:f,pageVariants:j,variantIndex:I}=Ze.current;if(n===null||!f)return;const S=r[n],w=u[n];if(!S||!w?.isMultivariate)return;const T=at(S,w);if(!T)return;const de=T.variants??[],$=Pt(de[a]?.rule,h,d),G=Mt(t),Me=ns(T,a,G),st=[...r];st[n]=kt(S,w,Me);const ve=Ot(h,f,st,I,j),tt={...h,[f]:ve},{resolveType:lt,formValue:pt}=Ft(G,tt,d??void 0);We(lt),$e(pt);try{await le.mutateAsync({blockKey:f,data:ve}),$&&$!==t&&await bt($,tt),E?.()}catch(ct){L.error(ct instanceof Error?ct.message:m("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}};if(!xe&&!Ye)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:m("sectionsEditor.sectionsEditor.noPageFound",{currentPath:x})});if(xe&&!dn)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:m("sectionsEditor.sectionsEditor.globalBlockNotFound")});const nt=g!==null?Be[g]??null:null,zn=g!==null?H[g]:null,$n=zn&&nt?.isMultivariate?at(zn,nt):null,xt=$n?Qn($n,ht):[],xn=Math.min(we,Math.max(xt.length-1,0)),Dt=xt[xn]??null,_t=nt?.isMultivariate===!0,Hn=g!==null&&nt!==null,Qt=Hn&&(_t||!!(yn&&ke)),Va=Qt&&!xe&&nt?.isSavedBlock===!0,Et=xe||Va,Na=xe?Mn:nt?.label??"",Aa=wt&&d?an(wt,d):null,Zt=Qt&&(!xe||z.length>0)?xe?[Mn,...z]:[Ye.name,..._t&&Dt?X?[`${nt.variantOf??nt.label} · ${Dt.label}`]:[nt.label,Dt.label]:[nt.label],...z]:[],Gn=B&&Ye?[Ye.name,"SEO",...Qe]:[],Xt=Gn.length>0?Gn:Et?Zt.length>0?Zt:[Na]:Zt.length>0?Zt:[Ye.name],Un=Hn&&!_t&&!nt?.isHidden&&!!_,Da=Et||!xe&&Vt&&!!it||Un,Pa=!X&&!B&&!xe&&_t&&z.length===0,qn=()=>{if(!_)return;ft(),he.current&&(clearTimeout(he.current),he.current=null);const t=i[_],n=wo(t.sections,H);if(!n)return;const a=To(n);le.mutate({blockKey:_,data:{...t,sections:n}},{onSuccess:()=>{ae(a),M(null),D(null),K(null),A([]),ye(null),Ee(null)},onError:r=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:r.message}))})},_n=(t,n,a)=>{if(!_)return;ft(),he.current&&(clearTimeout(he.current),he.current=null);const r=i[_],u=r.sections;if(!u||typeof u!="object"||Array.isArray(u))return;const h=u;if(!Array.isArray(h.variants))return;const f=t([...h.variants]);if(!f)return;const j=Oo(h,f),I={...i,[_]:{...r,sections:j}};le.mutate({blockKey:_,data:I[_]},{onSuccess:()=>{n?.(),a&&bt(a,I)},onError:S=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:S.message}))})},Ma=t=>{ee(null),ae(t),M(null),D(null),K(null),A([]);const n=Oe[t]?.rule,{resolveType:a,formValue:r}=Ft(n,i??{},d??void 0);Ee(a),ye(r),hn(Oe.map(u=>({rule:u.rule})),t)},Ca=(t,n)=>{if(t===n)return;let a=Pe;Pe===t?a=n:t<Pe&&n>=Pe?a=Pe-1:t>Pe&&n<=Pe&&(a=Pe+1),ae(a);const r=$t(Oe.map(u=>({rule:u.rule})),t,n);hn(r,a),_n(u=>$t(u,t,n))},Ka=t=>{const n=Oe[t]?.rule,a=Pt(n,i??{},d??void 0);_n(r=>r.length<=1?null:(r.splice(t,1),r),()=>{Oe.length-1===1?ae(0):t<Pe?ae(Pe-1):t===Pe&&ae(Math.max(0,t-1)),M(null),D(null),K(null),A([]),ye(null),Ee(null)},a)},Ba=t=>{_n(n=>zo(n,t),()=>{ae(t+1),M(null),D(null),K(null),A([]),ye(null),Ee(null)})},Ia=async(t,n)=>{ft(),he.current&&(clearTimeout(he.current),he.current=null);const a=Ze.current.activePageKey,r=Ze.current.decofile;if(!a)return;const u=r[a],h=u.sections;if(!h||typeof h!="object"||Array.isArray(h))return;const f=h;if(!Array.isArray(f.variants))return;const j=[...f.variants],I=j[t];if(!I?.rule||typeof I.rule!="object"){L.error(m("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const S=I.rule,w=n.trim();Tt(!0);try{if(!w){if(!Rt(S,r,d)){ee(null);return}const st=S.__resolveType??"";j[t]={...I,rule:Rn(S,r,d)};const ve={...r,[a]:{...u,sections:{...f,variants:j}}};await le.mutateAsync({blockKey:a,data:ve[a]}),await bt(st,ve),ee(null),E?.();return}const T=wn(S,r,d);if(!T){L.error(m("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(T.blockKey){await le.mutateAsync({blockKey:T.blockKey,data:vt(T.resolveType,T.data,w)}),ee(null),E?.();return}const de=on(w),$=rn(de,r);if($){L.error($);return}const G=vt(T.resolveType,T.data,w);let Me=null;try{await le.mutateAsync({blockKey:de,data:G}),Me=de,j[t]={...I,rule:Mt(de)},await le.mutateAsync({blockKey:a,data:{...u,sections:{...f,variants:j}}}),Me=null}catch(st){throw Me&&await qt.mutateAsync({blockKey:Me}).catch(()=>{}),st}ee(null),L.success(m("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:w})),E?.()}catch(T){L.error(T instanceof Error?T.message:m("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Tt(!1)}},La=async(t,n)=>{ft(),he.current&&(clearTimeout(he.current),he.current=null);const{selectedSectionIndex:a,rawSections:r,parsedSections:u,decofile:h,activePageKey:f,pageVariants:j,variantIndex:I}=Ze.current;if(a===null||!f)return;const S=r[a],w=u[a];if(!S||!w?.isMultivariate)return;const T=at(S,w);if(!T)return;const de=T.variants??[],$=de[t];if(!$?.rule||typeof $.rule!="object"){L.error(m("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const G=$.rule,Me=n.trim();Tt(!0);const st=async ve=>{const tt={...T,variants:ve},lt=[...r];lt[a]=kt(S,w,tt);const pt=Ot(h,f,lt,I,j);return await le.mutateAsync({blockKey:f,data:pt}),{...h,[f]:pt}};try{if(!Me){if(!Rt(G,h,d)){Q(null);return}const gt=G.__resolveType??"",Yn=[...de];Yn[t]={...$,rule:Rn(G,h,d)};const Ga=await st(Yn);await bt(gt,Ga),Q(null),E?.();return}const ve=wn(G,h,d);if(!ve){L.error(m("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(ve.blockKey){await le.mutateAsync({blockKey:ve.blockKey,data:vt(ve.resolveType,ve.data,Me)}),Q(null),E?.();return}const tt=on(Me),lt=rn(tt,h);if(lt){L.error(lt);return}const pt=vt(ve.resolveType,ve.data,Me);let ct=null;try{await le.mutateAsync({blockKey:tt,data:pt}),ct=tt;const gt=[...de];gt[t]={...$,rule:Mt(tt)},await st(gt),ct=null}catch(gt){throw ct&&await qt.mutateAsync({blockKey:ct}).catch(()=>{}),gt}Q(null),L.success(m("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:Me})),E?.()}catch(ve){L.error(ve instanceof Error?ve.message:m("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Tt(!1)}},Fa={rename:async(t,n,a)=>{ft(),he.current&&(clearTimeout(he.current),he.current=null);const{activePageKey:r,decofile:u}=Ze.current;if(!r)return;const h=Array.isArray(t.variants)?[...t.variants]:[],f=h[n],j=f?.rule&&typeof f.rule=="object"?f.rule:void 0,I=async w=>{const T={...t,variants:w};return await le.mutateAsync({blockKey:r,data:T}),{...u,[r]:T}},S=Hr(j,a,u,d);if(S.kind!=="noop"){if(S.kind==="error"){L.error(S.reason==="no-matcher-rule"?m("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):S.reason==="unreadable-rule"?m("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):S.message??m("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}Tt(!0);try{if(S.kind==="inline"){const T=[...h];T[n]={...f,rule:S.inlinedRule};const de=await I(T);await bt(S.blockKey,de),E?.();return}if(S.kind==="updateBlock"){await le.mutateAsync({blockKey:S.blockKey,data:S.blockData}),E?.();return}let w=null;try{await le.mutateAsync({blockKey:S.blockId,data:S.blockData}),w=S.blockId;const T=[...h];T[n]={...f,rule:S.reference},await I(T),w=null}catch(T){throw w&&await qt.mutateAsync({blockKey:w}).catch(()=>{}),T}L.success(m("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:a.trim()})),E?.()}catch(w){L.error(w instanceof Error?w.message:m("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Tt(!1)}}},selectGlobal:async(t,n,a)=>{ft(),he.current&&(clearTimeout(he.current),he.current=null);const{activePageKey:r,decofile:u}=Ze.current;if(!r)return;const h=Array.isArray(t.variants)?[...t.variants]:[],f=h[n];if(!f)return;const j=Pt(f.rule,u,d);h[n]={...f,rule:Mt(a)};const I={...t,variants:h},S={...u,[r]:I};try{await le.mutateAsync({blockKey:r,data:I}),j&&j!==a&&await bt(j,S),E?.()}catch(w){L.error(w instanceof Error?w.message:m("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}}},Wn=()=>{At()},Oa=t=>{ie(t),Sn({inner:t})},za=t=>{R(t),Sn({raw:t})},$a=()=>{ie(null),qe([])},Ha=()=>Xe(t=>t+1),En=t=>{if(B){if(t===0){Gt.flush(),te(!1),ie(null),R(void 0),qe([]),Xe(a=>a+1),ne?.();return}if(t===1){qe([]),Xe(a=>a+1);return}qe(Qe.slice(0,t-1)),Xe(a=>a+1);return}if(xe){A(z.slice(0,t)),J(a=>a+1);return}if(t===0){Wn();return}if(t===1){A([]),J(a=>a+1);return}const n=!X&&_t&&Dt?1:0;if(n===1&&t===2){A([]),J(a=>a+1);return}A(z.slice(0,t-1-n))},en=Xt.length>1?s.jsx("button",{type:"button",onClick:()=>En(ko(Xt.length,{isMultivariateSectionTop:Pa})),title:m("sectionsEditor.sectionsEditor.back"),"aria-label":m("sectionsEditor.sectionsEditor.back"),className:Ke("shrink-0 inline-flex size-6 items-center justify-center classic:rounded-md compact:rounded-lg transition-colors",Et?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:s.jsx(Wo,{className:"size-4"})}):null;return s.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&en&&s.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:en}),(X||Xt.length>1)&&s.jsx(So,{crumbs:Xt,onSelect:En,onSelectRoot:()=>{Gt.flush(),Z?Z():En(0)}}),s.jsx("div",{className:"shrink-0",children:Et||Qt||B?(Da||X&&en)&&s.jsxs("div",{className:Ke("border-b px-3 py-2.5",Et&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[X&&en,!xe&&Vt&&it&&s.jsxs("button",{type:"button",onClick:Wn,title:m("sectionsEditor.sectionsEditor.editingInVariant",{variant:it.label}),className:Ke("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",bo),children:[s.jsx(An,{rule:zt(it.rule,i??{},d??void 0),matchers:Jt}),s.jsx("span",{className:"max-w-[160px] truncate",children:it.label})]}),s.jsx("div",{className:"flex-1"}),Et&&s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx("span",{className:"shrink-0 cursor-help",children:s.jsx(ys,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),s.jsx(Bt,{side:"bottom",className:"max-w-[260px]",children:m("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Un&&s.jsx(Zn,{onClick:()=>bn()})]}),Et&&s.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:m("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):s.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(xo,{pageKey:_,initialName:Ye.name,initialPath:Ye.path,onFieldChange:ra})}),s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":m("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:()=>te(!0),children:s.jsx(Yo,{size:14})})}),s.jsx(Bt,{side:"bottom",children:m("sectionsEditor.sectionsEditor.editSeo")})]}),s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":m("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>U&&_?U():ge(!0),children:s.jsx(Jo,{size:14})})}),s.jsx(Bt,{side:"bottom",children:m("sectionsEditor.sectionsEditor.viewJson")})]}),s.jsx(Zn,{onClick:qn})]})}),B?s.jsx(sn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsx("div",{className:"mx-auto max-w-2xl",children:Wt&&_?s.jsx(ur,{rawSeo:fn,innerSeo:Cn,defaultResolveType:ea,seoSchema:ta,activeResolveType:pn,seoTypeOptions:Xs,formResetKey:dt,siteDefaultSeo:na,onBreadcrumbChange:qe,onPersistRaw:za,onInnerChange:Oa,onClearForm:$a,onBumpFormKey:Ha}):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:m("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"):Qt?s.jsxs(sn,{viewportRef:me,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[_t&&xt.length>0&&z.length===0&&s.jsxs(s.Fragment,{children:[s.jsx(_o,{listKey:`${_??""}:${g??""}`,variants:xt.map((t,n)=>({index:n,label:t.label})),selectedIndex:xn,onSelect:ga,onRename:Q,onDuplicate:va,onDelete:ha,onRemoveAll:Sa,onReorder:ya,onAdd:()=>bn()}),_t&&s.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m("sectionsEditor.sectionsEditor.variantRule")}),s.jsx(Xn,{currentRt:wt??"",currentLabel:nn(Dt?.rule,i??{},ht,d??void 0),currentGlobalKey:Pt(Dt?.rule,i??{},d??void 0)??void 0,matchers:Jt,globals:Ln,onSelect:Ra,onSelectGlobal:Ta,schema:Aa,formValue:Ls,onChange:wa,formKey:`${g??"none"}:${xn}:${wt??""}`,formWrapperClassName:"pt-1",meta:d??void 0,decofile:i,onSaveReferencedBlock:Ut,sandbox:Yt})]})]}),s.jsx(es,{activeSchema:yn,formValue:ke,formResetKey:Ne,onFormChange:Kn,onBreadcrumbChange:A,breadcrumbPath:z,emptyMessage:m("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:d,decofile:i,onSaveReferencedBlock:Ut,sandbox:Yt,previewBaseUrl:Te,onRequestAddSection:Bn})]},"editor-section-form"):xe?s.jsx(sn,{viewportRef:me,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx(es,{activeSchema:yn,formValue:ke,formResetKey:Ne,onFormChange:Kn,onBreadcrumbChange:A,breadcrumbPath:z,emptyMessage:m("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:d,decofile:i,onSaveReferencedBlock:Ut,sandbox:Yt,previewBaseUrl:Te,onRequestAddSection:Bn,onVariantMatcherOp:Fa})},"editor-global-block"):s.jsxs(sn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Vt&&_&&s.jsx(zr,{listKey:_,variants:Oe,activeIndex:Pe,decofile:i??{},meta:d,matchers:Jt,onSelect:Ma,onReorder:Ca,onRename:ee,onDuplicate:Ba,onDelete:Ka,onAdd:qn}),Vt&&Ve!==null&&s.jsxs("div",{className:Ke("px-3 border-b",ce?"pt-3 pb-5 space-y-3":"py-2"),children:[s.jsxs("button",{type:"button",onClick:()=>je(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer classic:rounded-sm compact:rounded-lg py-0.5 hover:bg-muted/40","aria-expanded":ce,children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m("sectionsEditor.sectionsEditor.variantRule")}),ce?s.jsx(Ho,{className:"size-3.5 shrink-0 text-muted-foreground"}):s.jsx(Go,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),ce&&s.jsx("div",{className:Ke("space-y-3",It&&"pointer-events-none opacity-50"),children:s.jsx(Xn,{currentRt:Ve,currentLabel:nn(it?.rule,i??{},ht,d??void 0),currentGlobalKey:Pt(it?.rule,i??{},d??void 0)??void 0,matchers:Jt,globals:Ln,onSelect:Ea,onSelectGlobal:ka,schema:_a,formValue:ze,onChange:ja,formKey:`${Pe}:${Ve??""}`,formWrapperClassName:"space-y-3",meta:d??void 0,decofile:i,onSaveReferencedBlock:Ut,sandbox:Yt})})]}),s.jsx("div",{className:"p-2 pt-3",children:s.jsx(Pr,{listKey:`${_??""}-${Pe}`,rawSections:H,sections:Be,meta:d,decofile:i,selectedIndex:g,onSelect:oa,onReorder:ia,onDelete:la,onDuplicate:ca,onMakeReusable:Ce,onToggleHidden:ua,onToggleLazy:da,onAddVariant:bn,onDetach:ma,onAddSection:()=>re(!0),canAddSection:xa})})]},"editor-section-list"),s.jsx(Eo,{open:fe!==null,onOpenChange:t=>{t||Ce(null)},defaultBlockId:fe!==null?on(Be[fe]?.label??""):"",isPending:le.isPending,onSubmit:ba}),Te&&s.jsx(fr,{open:Ae,onOpenChange:t=>{re(t),t||(Y.current=null)},meta:d,decofile:i,previewBaseUrl:Te,onSelect:pa}),Re&&_&&i&&s.jsx(Xo,{open:Re,onOpenChange:ge,pageKey:_,decofile:i}),oe!==null&&s.jsx(ts,{open:!0,initialName:Rt(Oe[oe]?.rule,i??{},d??void 0)?nn(Oe[oe]?.rule,i??{},ht,d??void 0):"",autoLabel:ht(zt(Oe[oe]?.rule,i??{},d??void 0)),isPending:It,onSubmit:async t=>{await Ia(oe,t)},onOpenChange:t=>{!t&&!It&&ee(null)}}),pe!==null&&s.jsx(ts,{open:!0,initialName:Rt(xt[pe]?.rule,i??{},d??void 0)?nn(xt[pe]?.rule,i??{},ht,d??void 0):"",autoLabel:ht(zt(xt[pe]?.rule,i??{},d??void 0)),isPending:It,onSubmit:async t=>{await La(pe,t)},onOpenChange:t=>{!t&&!It&&Q(null)}})]})}export{hc as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,bn as k,bo as Ie,j as c,bp as j,bq as P,br as st,bs as $,bt as rt,aN as Ee,bu as lt,bv as Ne,bw as at,bx as it,by as Re,bz as ct,bA as dt,bB as ut,bC as pt,bD as ft,bE as mt,bF as ht,bG as vt,bH as gt,bI as xt,bJ as St,c as ee,l as oe}from"./index-doEaURqC.js";import{V as wt}from"./index-C4LzZ3-O.js";import{i as yt}from"./Check-BZXRTDaX.js";import{t as je,n as Ct}from"./ChevronUp-DGt31MPD.js";function Pe(s,[e,t]){return Math.min(t,Math.max(e,s))}var bt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,Tt]=it(J),[ne]=vt(J,[Tt,Re]),pe=Re(),[Nt,G]=ne(J),[Pt,_t]=ne(J),Me=s=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:a,value:r,defaultValue:l,onValueChange:i,dir:u,name:m,autoComplete:g,disabled:w,required:y,form:S}=s,p=pe(e),[v,C]=d.useState(null),[h,x]=d.useState(null),[F,M]=d.useState(!1),se=lt(u),[_,O]=Ne({prop:o,defaultProp:n??!1,onChange:a,caller:J}),[U,q]=Ne({prop:r,defaultProp:l,onChange:i,caller:J}),L=d.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(at,{...p,children:c.jsxs(Nt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:h,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:se,triggerPointerDownPosRef:L,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Pt,{scope:s.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=J;var Ae="SelectTrigger",Oe=d.forwardRef((s,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=s,a=pe(t),r=G(Ae,t),l=r.disabled||o,i=k(e,r.onTriggerChange),u=ue(t),m=d.useRef("touch"),[g,w,y]=ot(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===r.value),h=nt(v,p,C);h!==void 0&&r.onValueChange(h.value)}),S=p=>{l||(r.onOpenChange(!0),y()),p&&(r.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(st,{asChild:!0,...a,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":r.contentId,"aria-expanded":r.open,"aria-required":r.required,"aria-autocomplete":"none",dir:r.dir,"data-state":r.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":tt(r.value)?"":void 0,...n,ref:i,onClick:P(n.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&S(p)}),onPointerDown:P(n.onPointerDown,p=>{m.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:P(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&bt.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",ke=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,children:a,placeholder:r="",...l}=s,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,m=a!==void 0,g=k(e,i.onValueNodeChange);return $(()=>{u(m)},[u,m]),c.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:r}):a})});ke.displayName=De;var Et="SelectIcon",Le=d.forwardRef((s,e)=>{const{__scopeSelect:t,children:o,...n}=s;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Et;var Rt="SelectPortal",Be=s=>c.jsx(rt,{asChild:!0,...s});Be.displayName=Rt;var Q="SelectContent",Ve=d.forwardRef((s,e)=>{const t=G(Q,s.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const a=o;return a?Ee.createPortal(c.jsx(He,{scope:s.__scopeSelect,children:c.jsx(de.Slot,{scope:s.__scopeSelect,children:c.jsx("div",{children:s.children})})}),a):null}return c.jsx(ze,{...s,ref:e})});Ve.displayName=Q;var A=10,[He,Y]=ne(Q),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((s,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:r,side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=s,h=G(Q,t),[x,F]=d.useState(null),[M,se]=d.useState(null),_=k(e,f=>F(f)),[O,U]=d.useState(null),[q,L]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=d.useCallback(f=>{const[T,...R]=B().map(N=>N.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const N of f)if(N===I||(N?.scrollIntoView({block:"nearest"}),N===T&&M&&(M.scrollTop=0),N===b&&M&&(M.scrollTop=M.scrollHeight),N?.focus(),document.activeElement!==I))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=h;d.useEffect(()=>{if(x){let f={x:0,y:0};const T=b=>{f={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{f.x<=10&&f.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=ot(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=nt(T,f,R);b&&setTimeout(()=>b.ref.current.focus())}),me=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&(U(f),b&&(H.current=!0))},[h.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((f,T,R)=>{const b=!H.current&&!R;(h.value!==void 0&&h.value===T||b)&&L(f)},[h.value]),ie=o==="popper"?Se:Fe,re=ie===Se?{side:l,sideOffset:i,align:u,alignOffset:m,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:se,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(pt,{as:Mt,allowPinchZoom:!0,children:c.jsx(ft,{asChild:!0,trapped:h.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:P(n,f=>{h.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:c.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:f=>f.preventDefault(),...C,...re,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:P(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,N=b.indexOf(I);b=b.slice(N+1)}setTimeout(()=>E(b)),f.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=s,a=G(Q,t),r=Y(Q,t),[l,i]=d.useState(null),[u,m]=d.useState(null),g=k(e,_=>m(_)),w=ue(t),y=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:h}=r,x=d.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&p&&v&&C){const _=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=a.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(a.dir!=="rtl"){const I=q.left-O.left,N=U.left-I,X=_.left-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,N=window.innerWidth-U.right-I,X=window.innerWidth-_.right-N,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Pe(N,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ie=B-te,re=v.offsetHeight/2,f=v.offsetTop+re,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const N=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,re+(I?he:0)+N+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+re)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,a.trigger,a.valueNode,l,u,p,v,C,a.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const se=d.useCallback(_=>{_&&S.current===!0&&(x(),h?.(),S.current=!1)},[x,h]);return c.jsx(Dt,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:se,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((s,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...a}=s,r=pe(t);return c.jsx(xt,{...r,...a,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(Q,{}),we="SelectViewport",Ue=d.forwardRef((s,e)=>{const{__scopeSelect:t,nonce:o,...n}=s,a=Y(we,t),r=Te(we,t),l=k(e,a.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:P(n.onScroll,u=>{const m=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=r;if(w?.current&&g){const y=Math.abs(i.current-m.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const h=C+y,x=Math.min(S,h),F=h-x;g.style.height=x+"px",g.style.bottom==="0px"&&(m.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}i.current=m.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[kt,Lt]=ne(We),Bt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=Ie();return c.jsx(kt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=Lt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((s,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:a,...r}=s,l=G(ce,t),i=Y(ce,t),u=l.value===o,[m,g]=d.useState(a??""),[w,y]=d.useState(!1),S=k(e,h=>i.itemRefCallback?.(h,o,n)),p=Ie(),v=d.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(h=>{g(x=>x||(h?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:m,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...r,ref:S,onFocus:P(r.onFocus,()=>y(!0)),onBlur:P(r.onBlur,()=>y(!1)),onClick:P(r.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:P(r.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:P(r.onPointerDown,h=>{v.current=h.pointerType}),onPointerMove:P(r.onPointerMove,h=>{v.current=h.pointerType,n?i.onItemLeave?.():v.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(r.onPointerLeave,h=>{h.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:P(r.onKeyDown,h=>{i.searchRef?.current!==""&&h.key===" "||(It.includes(h.key)&&C(),h.key===" "&&h.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((s,e)=>{const{__scopeSelect:t,className:o,style:n,...a}=s,r=G(le,t),l=Y(le,t),i=$e(le,t),u=_t(le,t),[m,g]=d.useState(null),w=k(e,C=>g(C),i.onItemTextChange,C=>l.itemTextRefCallback?.(C,i.value,i.disabled)),y=m?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:y},i.value),[i.disabled,i.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...a,ref:w}),i.isSelected&&r.valueNode&&!r.valueNodeHasChildren?Ee.createPortal(a.children,r.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var ye="SelectScrollUpButton",Ze=d.forwardRef((s,e)=>{const t=Y(ye,s.__scopeSelect),o=Te(ye,s.__scopeSelect),[n,a]=d.useState(!1),r=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollTop>0;a(u)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop-i.offsetHeight)}}):null});Ze.displayName=ye;var Ce="SelectScrollDownButton",Je=d.forwardRef((s,e)=>{const t=Y(Ce,s.__scopeSelect),o=Te(Ce,s.__scopeSelect),[n,a]=d.useState(!1),r=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=i.scrollHeight-i.clientHeight,m=Math.ceil(i.scrollTop)<u;a(m)};const i=t.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...s,ref:r,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=t;l&&i&&(l.scrollTop=l.scrollTop+i.offsetHeight)}}):null});Je.displayName=Ce;var Qe=d.forwardRef((s,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=s,a=Y("SelectScrollButton",t),r=d.useRef(null),l=ue(t),i=d.useCallback(()=>{r.current!==null&&(window.clearInterval(r.current),r.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{l().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:P(n.onPointerDown,()=>{r.current===null&&(r.current=window.setInterval(o,50))}),onPointerMove:P(n.onPointerMove,()=>{a.onItemLeave?.(),r.current===null&&(r.current=window.setInterval(o,50))}),onPointerLeave:P(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var be="SelectArrow",Ut=d.forwardRef((s,e)=>{const{__scopeSelect:t,...o}=s,n=pe(t),a=G(be,t),r=Y(be,t);return a.open&&r.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=be;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:s,value:e,...t},o)=>{const n=d.useRef(null),a=k(o,n),r=ht(e);return d.useEffect(()=>{const l=n.current;if(!l)return;const i=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(i,"value").set;if(r!==e&&m){const g=new Event("change",{bubbles:!0});m.call(l,e),l.dispatchEvent(g)}},[r,e]),c.jsx(j.select,{...t,style:{...wt,...t.style},ref:a,defaultValue:e})});et.displayName=Wt;function tt(s){return s===""||s===void 0}function ot(s){const e=ct(s),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(r=>{const l=t.current+r;e(l),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(l)},[e]),a=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,a]}function nt(s,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,a=t?s.indexOf(t):-1;let r=Kt(s,Math.max(a,0));n.length===1&&(r=r.filter(u=>u!==t));const i=r.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(s,e){return s.map((t,o)=>s[(e+o)%s.length])}var $t=Me,Gt=Oe,Yt=ke,qt=Le,Xt=Be,Zt=Ve,Jt=Ue,Qt=Ge,_e=Ye,eo=Xe,to=Ze,oo=Je;function co(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(s){const e=ee.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(s){const e=ee.c(13);let t,o,n,a;e[0]!==s?({className:o,size:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a):(t=e[1],o=e[2],n=e[3],a=e[4]);const r=a===void 0?"default":a;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive hover:bg-[var(--studio-outline-hover-background)] hover:text-accent-foreground flex w-fit items-center justify-between gap-2 rounded-lg bg-[var(--studio-input-background)] px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-4 opacity-50"})}),e[7]=i):i=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==r||e[11]!==l?(u=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":r,className:l,...n,children:[t,i]}),e[8]=t,e[9]=n,e[10]=r,e[11]=l,e[12]=u):u=e[12],u}function fo(s){const e=ee.c(25);let t,o,n,a,r;e[0]!==s?({className:o,children:t,position:a,hideScrollButtons:r,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=a===void 0?"popper":a,i=r===void 0?!1:r,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let m;e[6]!==o||e[7]!==u?(m=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=m):m=e[8];let g;e[9]!==i?(g=!i&&c.jsx(no,{}),e[9]=i,e[10]=g):g=e[10];const w=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let y;e[11]!==w?(y=oe("p-1",w),e[11]=w,e[12]=y):y=e[12];let S;e[13]!==t||e[14]!==y?(S=c.jsx(Jt,{className:y,children:t}),e[13]=t,e[14]=y,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(so,{}),e[16]=i,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==m||e[21]!==g||e[22]!==S||e[23]!==p?(v=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:m,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=m,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(s){const e=ee.c(19);let t,o,n,a,r;e[0]!==s?({className:o,children:t,description:n,hideCheck:r,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=n,e[4]=a,e[5]=r):(t=e[1],o=e[2],n=e[3],a=e[4],r=e[5]);const l=r===void 0?!1:r,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let m;e[9]!==l?(m=!l&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(yt,{className:"size-4"})})}),e[9]=l,e[10]=m):m=e[10];let g;e[11]!==t||e[12]!==n?(g=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(_e,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(_e,{children:t}),e[11]=t,e[12]=n,e[13]=g):g=e[13];let w;return e[14]!==a||e[15]!==u||e[16]!==m||e[17]!==g?(w=c.jsxs(Qt,{"data-slot":"select-item",className:u,...a,children:[m,g]}),e[14]=a,e[15]=u,e[16]=m,e[17]=g,e[18]=w):w=e[18],w}function no(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(Ct,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}function so(s){const e=ee.c(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"size-4"}),e[5]=a):a=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:a}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r}export{co as S,uo as a,po as b,mo as c,fo as d,Pe as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,b as ve,j as o,r as ee,am as je,B as Se,h as ke}from"./index-doEaURqC.js";import{P as fe}from"./agent-icon-CzsnrYjD.js";import{S as xe}from"./scroll-area-Cve7MqyA.js";import{K as ue,a2 as Ne,a3 as we,a5 as _e,a4 as Ee,a6 as Pe,aM as Te}from"./runnable-block-editor-CdEmnBad.js";import{r as Fe}from"./claim-phase-copy-0btUuJoC.js";import{u as Re,a as Ce,P as Ke}from"./page-seo-form-Dbz3eu1p.js";import{a as ge}from"./Image01-BLIf6uY9.js";import"./AlertCircle-Cat-Fy2i.js";import"./Tool01-H9OcfGdq.js";import"./ArrowUp-CbPBDOpZ.js";import"./ArrowLeft-DuxVUo5_.js";import"./ArrowRight-CsoDgnUj.js";import"./XCircle-Cu2Sy8Aw.js";import"./ZoomOut-Burao8Eg.js";import"./Globe04-C_9DD9oO.js";import"./CheckCircle-Cj4PQGuv.js";import"./Check-BZXRTDaX.js";import"./ChevronUp-DGt31MPD.js";import"./UserSquare-BfT6tB5U.js";import"./Copy01-B6hr4CBg.js";import"./CreditCard01-CiYLi_pR.js";import"./DotsVertical-BITRq5d-.js";import"./Download01-CsYfHghd.js";import"./Eye-rQUtSbk6.js";import"./Share07-CMPYQYHk.js";import"./XClose-DFUqDOc8.js";import"./Key01-SGIR_QrT.js";import"./LayoutLeft-GBQ0rQxQ.js";import"./Link01-BnVQGp2l.js";import"./LinkExternal01-Dh0AABP8.js";import"./Monitor01-CxisI5ut.js";import"./Sun-BSFyLDhg.js";import"./Package-DsU1cU6S.js";import"./Palette-CzoNEzRs.js";import"./Plus-qASEo4cN.js";import"./SearchLg-qmi8uaeX.js";import"./SearchMd-B6NDUgzQ.js";import"./Stars01-cdnol_cb.js";import"./Trash01-mB4s-hrv.js";import"./Upload01-Uv_jtHIk.js";import"./User01-DHGCVvV3.js";import"./Users01-C_qUmfZB.js";import"./X-vKTIsgL1.js";import"./Zap-CSRFlEXK.js";import"./select-oEHCSTZi.js";import"./index-C4LzZ3-O.js";import"./use-session-runtime-COugfsOm.js";import"./thread-intent-DuCE7MYG.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-D1GbDSrr.js";import"./use-panel-navigate-xYH0iX8e.js";import"./thread-route-BBKn0p1b.js";import"./use-project-scope-CENQvfVc.js";import"./use-virtual-mcp-B-mdsJbn.js";import"./use-mcp-client-D2DgMGL-.js";import"./auth-D3Q2r2cz.js";import"./github-repo-BknN0SVI.js";import"./autosend-C5knIVwo.js";import"./hooks-C8t7cMQJ.js";import"./backoff-8mStPHYB.js";import"./task-board-BXLBBo-B.js";import"./schema-BVqtjcyJ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-pN-YIa6T.js";import"./use-ai-providers-CJ2ga4nx.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-x0K7Zb7m.js";import"./use-organization-settings-Wh36EN0I.js";import"./decofile-api-DkM3ZQFM.js";import"./utils-BcFrUaDf.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BIUMok9W.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-eiDLfZY7.js";import"./use-copy-CGJ-16i-.js";import"./usage-stats-P7Ebxq4V.js";import"./markdown-D0jNOMCX.js";import"./dialog-C36x61_J.js";import"./org-file-open-context-DodrnIMR.js";import"./use-mobile-DYpKQ1eP.js";import"./tooltip-C91IS2ON.js";import"./shell-layout-BNVBlKMe.js";import"./avatar-CLf3yQhN.js";import"./download-app-dialog-7J000m-o.js";import"./command-CDaLB2Ox.js";import"./index-Byz-UaqT.js";import"./integration-icon-Crk6WRxP.js";import"./project-icon-mjklzNJs.js";import"./required-auth-layout-DbGCmQgx.js";import"./use-org-sso-BnqcEd47.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BvLPqeD1.js";import"./types-BCbJ4Eml.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BF14HPqj.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-ZoEgH6s-.js";import"./use-connection-PgTQPnAp.js";import"./use-navigate-to-agent-TwlhlbmB.js";import"./use-mcp-prompts-UNzUvECH.js";import"./index-CDAG9yf3.js";import"./form-CXSt7_li.js";import"./label-tAsQMZ2G.js";import"./input-BK5Sp8hZ.js";import"./use-thread-outputs-DldRsY9l.js";import"./file-type-icon-CFRsMAQ4.js";import"./popover-GUR8piky.js";import"./monaco-editor-xB6SdWXy.js";import"./editor-BQuCFEpz.js";import"./calendar-D41RMBsP.js";import"./textarea-B9cyNs7j.js";import"./rich-text-link-control-i_tw_Jd2.js";import"./switch-BNLiV_oA.js";import"./search-input-CCUlZDzf.js";import"./tabs-Gq0qvZI4.js";import"./use-debounced-value-CG2jgHBI.js";import"./use-file-configs-CzJCjBKX.js";import"./asset-utils-DOWh4JzZ.js";import"./useInfiniteQuery-DCZL7BN4.js";import"./infiniteQueryObserver-CxJm0T6_.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-DHrftnUg.js";import"./alert-dialog-Dg6YJ6PP.js";import"./sandbox-git-api-B1R0585s.js";function A(d){return typeof d=="string"&&d.trim()?d:void 0}function he(d,e){if(d){if(e)try{const t=new URL(d,e).href;return ue(t)}catch{return}return ue(d)}}function ze(d){if(!d)return{};const e=A(d.title),t=A(d.titleTemplate);return{title:e&&t?.includes("%s")?t.replace(/%s/g,e):e,description:A(d.description),image:A(d.image),favicon:A(d.favicon)}}function De(d){if(!d)return"example.com";try{return new URL(d).host}catch{return"example.com"}}const $e=[{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 de(d){const e=T.c(10),{src:t,className:a,iconSize:v}=d,r=v===void 0?20:v;if(t){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==a||e[2]!==t?(p=o.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:a,style:m}),e[1]=a,e[2]=t,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let i;e[5]!==r?(i=o.jsx(ge,{size:r}),e[5]=r,e[6]=i):i=e[6];let n;return e[7]!==a||e[8]!==i?(n=o.jsx("div",{className:a,style:s,children:i}),e[7]=a,e[8]=i,e[9]=n):n=e[9],n}function Ie(d){const e=T.c(33),{seo:t,host:a,path:v,t:r}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#fff",border:"1px solid #dadce0"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={background:"#f1f3f4"},e[1]=i):i=e[1];let n;e[2]!==t.favicon?(n=o.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:i,children:t.favicon?o.jsx("img",{src:t.favicon,alt:"",className:"size-full object-cover"}):o.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=t.favicon,e[3]=n):n=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#202124"},e[4]=m):m=e[4];let p;e[5]!==a?(p=o.jsx("div",{className:"truncate text-[13px] leading-tight",style:m,children:a}),e[5]=a,e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#4d5156"},e[7]=f):f=e[7];let l;e[8]!==a||e[9]!==v?(l=o.jsxs("div",{className:"truncate text-[12px] leading-tight",style:f,children:[a,v]}),e[8]=a,e[9]=v,e[10]=l):l=e[10];let c;e[11]!==p||e[12]!==l?(c=o.jsxs("div",{className:"min-w-0",children:[p,l]}),e[11]=p,e[12]=l,e[13]=c):c=e[13];let h;e[14]!==n||e[15]!==c?(h=o.jsxs("div",{className:"flex items-center gap-2",children:[n,c]}),e[14]=n,e[15]=c,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 g;e[18]!==t.title||e[19]!==r?(g=t.title??r("sectionsEditor.seoPreview.fallbackTitle"),e[18]=t.title,e[19]=r,e[20]=g):g=e[20];let u;e[21]!==g?(u=o.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:x,children:g}),e[21]=g,e[22]=u):u=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S={color:"#4d5156"},e[23]=S):S=e[23];let y;e[24]!==t.description||e[25]!==r?(y=t.description??r("sectionsEditor.seoPreview.fallbackDescription"),e[24]=t.description,e[25]=r,e[26]=y):y=e[26];let b;e[27]!==y?(b=o.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:S,children:y}),e[27]=y,e[28]=b):b=e[28];let j;return e[29]!==u||e[30]!==b||e[31]!==h?(j=o.jsxs("div",{className:"rounded-lg p-3 text-left",style:s,children:[h,u,b]}),e[29]=u,e[30]=b,e[31]=h,e[32]=j):j=e[32],j}function Le(d){const e=T.c(26),{seo:t,host:a,t:v}=d;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"#fff",border:"1px solid #e2e8f0"},e[0]=r):r=e[0];let s;e[1]!==t.image?(s=o.jsx(de,{src:t.image,className:"h-40 w-full"}),e[1]=t.image,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i={borderTop:"1px solid #e2e8f0"},e[3]=i):i=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={color:"#8a9099"},e[4]=n):n=e[4];let m;e[5]!==a?(m=o.jsx("div",{className:"truncate text-[11px]",style:n,children:a}),e[5]=a,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[7]=p):p=e[7];let f;e[8]!==t.title||e[9]!==v?(f=t.title??v("sectionsEditor.seoPreview.fallbackTitle"),e[8]=t.title,e[9]=v,e[10]=f):f=e[10];let l;e[11]!==f?(l=o.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:p,children:f}),e[11]=f,e[12]=l):l=e[12];let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[13]=c):c=e[13];let h;e[14]!==t.description||e[15]!==v?(h=t.description??v("sectionsEditor.seoPreview.fallbackDescription"),e[14]=t.description,e[15]=v,e[16]=h):h=e[16];let x;e[17]!==h?(x=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:h}),e[17]=h,e[18]=x):x=e[18];let g;e[19]!==x||e[20]!==m||e[21]!==l?(g=o.jsxs("div",{className:"px-3 py-2",style:i,children:[m,l,x]}),e[19]=x,e[20]=m,e[21]=l,e[22]=g):g=e[22];let u;return e[23]!==g||e[24]!==s?(u=o.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:r,children:[s,g]}),e[23]=g,e[24]=s,e[25]=u):u=e[25],u}function Be(d){const e=T.c(36),{seo:t,host:a,accent:v,t:r}=d;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f0f2f5"},e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={color:"#3b4045"},e[1]=i):i=e[1];let n;e[2]!==r?(n=r("sectionsEditor.seoPreview.chatCardHint"),e[2]=r,e[3]=n):n=e[3];let m;e[4]!==n?(m=o.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:i,children:n}),e[4]=n,e[5]=m):m=e[5];const p=`3px solid ${v}`;let f;e[6]!==p?(f={background:"#fff",borderLeft:p},e[6]=p,e[7]=f):f=e[7];let l;e[8]!==t.image?(l=o.jsx(de,{src:t.image,className:"h-28 w-full",iconSize:18}),e[8]=t.image,e[9]=l):l=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#1c2024"},e[10]=c):c=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=o.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:c,children:h}),e[14]=h,e[15]=x):x=e[15];let g;e[16]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[16]=g):g=e[16];let u;e[17]!==t.description||e[18]!==r?(u=t.description??r("sectionsEditor.seoPreview.fallbackDescription"),e[17]=t.description,e[18]=r,e[19]=u):u=e[19];let S;e[20]!==u?(S=o.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:u}),e[20]=u,e[21]=S):S=e[21];let y;e[22]===Symbol.for("react.memo_cache_sentinel")?(y={color:"#8a9099"},e[22]=y):y=e[22];let b;e[23]!==a?(b=o.jsx("div",{className:"mt-0.5 text-[10px]",style:y,children:a}),e[23]=a,e[24]=b):b=e[24];let j;e[25]!==x||e[26]!==S||e[27]!==b?(j=o.jsxs("div",{className:"px-2.5 py-1.5",children:[x,S,b]}),e[25]=x,e[26]=S,e[27]=b,e[28]=j):j=e[28];let k;e[29]!==j||e[30]!==f||e[31]!==l?(k=o.jsxs("div",{className:"overflow-hidden rounded-md",style:f,children:[l,j]}),e[29]=j,e[30]=f,e[31]=l,e[32]=k):k=e[32];let N;return e[33]!==k||e[34]!==m?(N=o.jsxs("div",{className:"rounded-lg p-2 text-left",style:s,children:[m,k]}),e[33]=k,e[34]=m,e[35]=N):N=e[35],N}function Oe(d){const e=T.c(39),{seo:t,host:a,accent:v,dark:r,t:s}=d,i=r?"#2b2d31":"#fff",n=r?"#00a8fc":"#1264a3",m=r?"#dbdee1":"#3b4045",p=r?"#949ba4":"#8a9099",f=r?"none":"1px solid #e2e8f0";let l;e[0]!==i||e[1]!==f?(l={background:i,border:f},e[0]=i,e[1]=f,e[2]=l):l=e[2];const c=`3px solid ${v}`;let h;e[3]!==c?(h={borderLeft:c,borderRadius:2},e[3]=c,e[4]=h):h=e[4];let x;e[5]!==p?(x={color:p},e[5]=p,e[6]=x):x=e[6];let g;e[7]!==a||e[8]!==x?(g=o.jsx("div",{className:"text-[10px]",style:x,children:a}),e[7]=a,e[8]=x,e[9]=g):g=e[9];let u;e[10]!==n?(u={color:n},e[10]=n,e[11]=u):u=e[11];let S;e[12]!==t.title||e[13]!==s?(S=t.title??s("sectionsEditor.seoPreview.fallbackTitle"),e[12]=t.title,e[13]=s,e[14]=S):S=e[14];let y;e[15]!==u||e[16]!==S?(y=o.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:S}),e[15]=u,e[16]=S,e[17]=y):y=e[17];let b;e[18]!==m?(b={color:m},e[18]=m,e[19]=b):b=e[19];let j;e[20]!==t.description||e[21]!==s?(j=t.description??s("sectionsEditor.seoPreview.fallbackDescription"),e[20]=t.description,e[21]=s,e[22]=j):j=e[22];let k;e[23]!==b||e[24]!==j?(k=o.jsx("div",{className:"line-clamp-2 text-[12px]",style:b,children:j}),e[23]=b,e[24]=j,e[25]=k):k=e[25];let N;e[26]!==k||e[27]!==g||e[28]!==y?(N=o.jsxs("div",{className:"min-w-0 flex-1",children:[g,y,k]}),e[26]=k,e[27]=g,e[28]=y,e[29]=N):N=e[29];let w;e[30]!==t.image?(w=o.jsx(de,{src:t.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[30]=t.image,e[31]=w):w=e[31];let _;e[32]!==N||e[33]!==w||e[34]!==h?(_=o.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[35];let P;return e[36]!==_||e[37]!==l?(P=o.jsx("div",{className:"rounded-lg p-2.5 text-left",style:l,children:_}),e[36]=_,e[37]=l,e[38]=P):P=e[38],P}function Ue(d){const e=T.c(21),{platform:t,seo:a,host:v,path:r,t:s}=d;let i;e[0]!==v||e[1]!==r||e[2]!==t.color||e[3]!==t.id||e[4]!==t.layout||e[5]!==a||e[6]!==s?(i=t.layout==="search"?o.jsx(Ie,{seo:a,host:v,path:r,t:s}):t.layout==="card"?o.jsx(Le,{seo:a,host:v,path:r,t:s}):t.layout==="chat"?o.jsx(Be,{seo:a,host:v,path:r,accent:t.color,t:s}):o.jsx(Oe,{seo:a,host:v,path:r,accent:t.color,dark:t.id==="discord",t:s}),e[0]=v,e[1]=r,e[2]=t.color,e[3]=t.id,e[4]=t.layout,e[5]=a,e[6]=s,e[7]=i):i=e[7];const n=i;let m;e[8]!==t.color?(m=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e[8]=t.color,e[9]=m):m=e[9];let p;e[10]!==t.labelKey||e[11]!==s?(p=s(t.labelKey),e[10]=t.labelKey,e[11]=s,e[12]=p):p=e[12];let f;e[13]!==p?(f=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p}),e[13]=p,e[14]=f):f=e[14];let l;e[15]!==m||e[16]!==f?(l=o.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[m,f]}),e[15]=m,e[16]=f,e[17]=l):l=e[17];let c;return e[18]!==n||e[19]!==l?(c=o.jsxs("div",{children:[l,n]}),e[18]=n,e[19]=l,e[20]=c):c=e[20],c}function Ae(d){const e=T.c(18),{seo:t,url:a,path:v}=d,r=v===void 0?"/":v,s=ve();let i,n,m;if(e[0]!==t||e[1]!==a){const u=ze(t);i=u,n=he(u.image,a),m=he(u.favicon,a),e[0]=t,e[1]=a,e[2]=i,e[3]=n,e[4]=m}else i=e[2],n=e[3],m=e[4];let p;e[5]!==i||e[6]!==n||e[7]!==m?(p={...i,image:n,favicon:m},e[5]=i,e[6]=n,e[7]=m,e[8]=p):p=e[8];const f=p;let l;e[9]!==a?(l=De(a),e[9]=a,e[10]=l):l=e[10];const c=l,h=r==="/"?"":r;let x;e[11]!==h||e[12]!==c||e[13]!==s||e[14]!==f?(x=$e.map(u=>o.jsx(Ue,{platform:u,seo:f,host:c,path:h,t:s},u.id)),e[11]=h,e[12]=c,e[13]=s,e[14]=f,e[15]=x):x=e[15];let g;return e[16]!==x?(g=o.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:x}),e[16]=x,e[17]=g):g=e[17],g}function fi(d){const e=T.c(70),{orgSlug:t,virtualMcpId:a,branch:v,decofile:r,meta:s,target:i,previewBaseUrl:n,onSaved:m,onEditDefaultSeo:p,onBack:f}=d,l=ve(),c=Ne(r,i,s),h=c?.seoData,x=i.kind==="site"?"site":i.pageKey,[g,u]=ee.useState(x),[S,y]=ee.useState(null),[b,j]=ee.useState(0),[k,N]=ee.useState(void 0);g!==x&&(u(x),y(null),N(void 0),j(Ge));const{persistSeo:w,persistRawSeo:_,flush:P,isPending:te}=Re({orgSlug:t,virtualMcpId:a,branch:v,target:i,resolved:c,onSaved:m}),M=i.kind==="page",ye=M?c?.rawSeoData:void 0,U=k!==void 0?k:ye,be=M?we(U)??void 0:void 0,E=S??be??h??{},F=c?Ce(E,c):null,K=F&&(!M||_e(U))?Fe(F,s):null;let G;e[0]!==s?(G=Ee(s),e[0]=s,e[1]=G):G=e[1];const oe=G;let R,H;e[2]!==r||e[3]!==E||e[4]!==s||e[5]!==i.kind?(R=i.kind==="page"?Pe(r,s)?.seoData??{}:{},H=i.kind==="page"?Ve(R,E):E,e[2]=r,e[3]=E,e[4]=s,e[5]=i.kind,e[6]=R,e[7]=H):(R=e[6],H=e[7]);const ie=H;let V;e[8]!==w||e[9]!==c||e[10]!==y?(V=C=>{if(!c)return;const pe=C;y(pe),w(pe)},e[8]=w,e[9]=c,e[10]=y,e[11]=V):V=e[11];const se=V;let W;e[12]!==y?(W=()=>y(null),e[12]=y,e[13]=W):W=e[13];const le=W;let q;e[14]!==j?(q=()=>j(Me),e[14]=j,e[15]=q):q=e[15];const re=q;let J;e[16]!==P||e[17]!==f?(J=()=>{P(),f?.()},e[16]=P,e[17]=f,e[18]=J):J=e[18];const ce=J,z=i.kind==="page"?i.path:"/";let Q;e[19]!==z||e[20]!==n||e[21]!==i.kind?(Q=i.kind==="page"&&n?He(z,n):n??null,e[19]=z,e[20]=n,e[21]=i.kind,e[22]=Q):Q=e[22];const ae=Q;let X;e[23]!==c||e[24]!==l||e[25]!==i.kind?(X=i.kind==="site"?l("sectionsEditor.seoEditor.noSiteSeoBlock"):l(c?"sectionsEditor.seoEditor.noSeoSchema":"sectionsEditor.seoEditor.couldNotLoadSeo"),e[23]=c,e[24]=l,e[25]=i.kind,e[26]=X):X=e[26];const ne=X,Y=M&&c,me=i.kind==="site"&&c&&K;let D;e[27]!==ce||e[28]!==l||e[29]!==i.kind||e[30]!==i.pageName?(D=i.kind==="page"?o.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[o.jsx("button",{type:"button",onClick:ce,title:i.pageName,className:"min-w-0 truncate classic:rounded-md compact:rounded-lg px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:i.pageName}),o.jsx(je,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):o.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-medium",children:l("sectionsEditor.seoEditor.defaultSeoLabel")}),o.jsxs("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:["· ",l("sectionsEditor.seoEditor.appliedToEveryPage")]})]}),e[27]=ce,e[28]=l,e[29]=i.kind,e[30]=i.pageName,e[31]=D):D=e[31];let $;e[32]!==te?($=te&&o.jsx(ke,{className:"size-3.5 text-muted-foreground"}),e[32]=te,e[33]=$):$=e[33];let I;e[34]!==p||e[35]!==l||e[36]!==i.kind?(I=i.kind==="page"&&p&&o.jsxs(Se,{type:"button",variant:"outline",size:"sm",onClick:p,children:[o.jsx(fe,{size:14}),l("sectionsEditor.seoEditor.editDefaultSeoButton")]}),e[34]=p,e[35]=l,e[36]=i.kind,e[37]=I):I=e[37];let L;e[38]!==$||e[39]!==I?(L=o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[$,I]}),e[38]=$,e[39]=I,e[40]=L):L=e[40];let B;e[41]!==L||e[42]!==D?(B=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[D,L]}),e[41]=L,e[42]=D,e[43]=B):B=e[43];let O;e[44]!==F||e[45]!==re||e[46]!==le||e[47]!==oe||e[48]!==U||e[49]!==E||e[50]!==ne||e[51]!==b||e[52]!==se||e[53]!==z||e[54]!==_||e[55]!==w||e[56]!==ie||e[57]!==ae||e[58]!==c||e[59]!==K||e[60]!==y||e[61]!==N||e[62]!==Y||e[63]!==me||e[64]!==R||e[65]!==l?(O=!c||!Y&&!me?o.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ne}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsx(xe,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-5 py-4",children:Y?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:l("sectionsEditor.seoEditor.emptyFieldsHint")}),o.jsx(Ke,{rawSeo:U,innerSeo:E,defaultResolveType:oe,seoSchema:K,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:b,siteDefaultSeo:R,onPersistRaw:C=>{N(C),_(C)},onInnerChange:C=>{y(C),w(C)},onClearForm:le,onBumpFormKey:re})]}):K&&F&&o.jsx(Te,{schema:K,resolveType:F,value:E,formResetKey:b,onChange:se})})}),o.jsx(xe,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"@container px-5 py-4",children:o.jsx(Ae,{seo:ie,url:ae,path:z})})})]}),e[44]=F,e[45]=re,e[46]=le,e[47]=oe,e[48]=U,e[49]=E,e[50]=ne,e[51]=b,e[52]=se,e[53]=z,e[54]=_,e[55]=w,e[56]=ie,e[57]=ae,e[58]=c,e[59]=K,e[60]=y,e[61]=N,e[62]=Y,e[63]=me,e[64]=R,e[65]=l,e[66]=O):O=e[66];let Z;return e[67]!==B||e[68]!==O?(Z=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[B,O]}),e[67]=B,e[68]=O,e[69]=Z):Z=e[69],Z}function Me(d){return d+1}function Ge(d){return d+1}function He(d,e){try{return new URL(d,e).href}catch{return e}}function Ve(d,e){const t=e.__resolveType,a=d.__resolveType;if(typeof t=="string"&&typeof a=="string"&&t!==a)return{...e};const v={...d};for(const[r,s]of Object.entries(e))r!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(v[r]=s));return v}export{fi as SeoEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as M,b as W,e as Ye,j as n,B as F,t as Ve,bQ as me,R as Nt,a as Be,y as Qt,D as _t,K as Ue,bR as Xt,bS as Zt,$ as Ke,l as dt,aI as en,p as pt,bT as tn,r as J,a1 as nn,x as At,a9 as ie,d as Pt,a0 as ht,z as Ct,m as He,q as ut,at as Et,bU as sn,aA as on,aG as yt,bV as an,bW as rn,bX as ln,bY as cn,bZ as dn,T as un,u as mn,a3 as fn,b_ as hn,b$ as gn,k as It,c0 as lt,c1 as pn,c2 as yn,O as bn,c3 as xn}from"./index-doEaURqC.js";import{A as at}from"./avatar-CLf3yQhN.js";import{t as Ot}from"./Globe04-C_9DD9oO.js";import{i as wn}from"./SearchLg-qmi8uaeX.js";import{ad as Sn,ac as vn,o as ct,ae as ee,r as jn,af as kn,n as bt,g as Tn,f as Nn,ag as _n,e as An}from"./agent-icon-CzsnrYjD.js";import{s as Pn}from"./XClose-DFUqDOc8.js";import{D as Cn}from"./download-app-dialog-7J000m-o.js";import{a as En,u as In}from"./use-project-scope-CENQvfVc.js";import{u as Lt,a as On}from"./use-panel-navigate-xYH0iX8e.js";import{i as ae}from"./CheckCircle-Cj4PQGuv.js";import{i as ot}from"./Monitor01-CxisI5ut.js";import{i as re}from"./Zap-CSRFlEXK.js";import{c as $t,d as Dt,b as Rt,D as Mt,h as Ln,e as $n}from"./dialog-C36x61_J.js";import{a as Dn}from"./Share07-CMPYQYHk.js";import{s as xt}from"./Plus-qASEo4cN.js";import{a as Rn}from"./Tool01-H9OcfGdq.js";import{b as le,a as Ge,f as Mn,e as zn,c as Fn,C as qn}from"./command-CDaLB2Ox.js";import{I as Kn}from"./integration-icon-Crk6WRxP.js";import{P as Bn}from"./project-icon-mjklzNJs.js";import{a as Hn,m as Un}from"./use-mcp-client-D2DgMGL-.js";import{S as Gn,u as Jn}from"./hooks-C8t7cMQJ.js";import{u as Vn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Wn}from"./required-auth-layout-DbGCmQgx.js";import{A as Yn}from"./autosend-C5knIVwo.js";import{u as Qn,a as Xn,b as Zn,c as es}from"./thread-route-BBKn0p1b.js";import{u as ts}from"./use-org-sso-BnqcEd47.js";function ns(t){const e=M.c(49),{orgName:s,orgSlug:a,orgLogo:o,domain:i}=t,r=W();let d;e[0]!==a||e[1]!==r?(d=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),A=await k.json();if(!k.ok||!A.success)throw new Error(A.error??r("common.autoDomainJoinScreen.joinError"));return A},e[0]=a,e[1]=r,e[2]=d):d=e[2];let u;e[3]!==a?(u=k=>{window.location.href=`/${k.slug??a}`},e[3]=a,e[4]=u):u=e[4];let f;e[5]!==r?(f=k=>{Ve.error(k instanceof Error?k.message:r("common.autoDomainJoinScreen.joinError"))},e[5]=r,e[6]=f):f=e[6];let S;e[7]!==d||e[8]!==u||e[9]!==f?(S={mutationFn:d,onSuccess:u,onError:f},e[7]=d,e[8]=u,e[9]=f,e[10]=S):S=e[10];const c=Ye(S),y=ss;let h;e[11]!==o||e[12]!==s?(h=o?n.jsx(at,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ot,{className:"h-6 w-6 text-primary"})}),e[11]=o,e[12]=s,e[13]=h):h=e[13];let w;e[14]!==s||e[15]!==r?(w=r("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=r,e[16]=w):w=e[16];let m;e[17]!==w?(m=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[17]=w,e[18]=m):m=e[18];let l;e[19]!==i||e[20]!==r?(l=r("common.autoDomainJoinScreen.joinDescription",{domain:i}),e[19]=i,e[20]=r,e[21]=l):l=e[21];let b;e[22]!==l?(b=n.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[22]=l,e[23]=b):b=e[23];let p;e[24]!==m||e[25]!==b?(p=n.jsxs("div",{className:"space-y-2",children:[m,b]}),e[24]=m,e[25]=b,e[26]=p):p=e[26];let x;e[27]!==c?(x=()=>c.mutate(),e[27]=c,e[28]=x):x=e[28];let v;e[29]!==c.isPending||e[30]!==s||e[31]!==r?(v=c.isPending?r("common.autoDomainJoinScreen.joining"):r("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=r,e[32]=v):v=e[32];let T;e[33]!==c.isPending||e[34]!==x||e[35]!==v?(T=n.jsx(F,{onClick:x,disabled:c.isPending,children:v}),e[33]=c.isPending,e[34]=x,e[35]=v,e[36]=T):T=e[36];const P=c.isPending;let N;e[37]!==r?(N=r("common.autoDomainJoinScreen.goHome"),e[37]=r,e[38]=N):N=e[38];let j;e[39]!==c.isPending||e[40]!==N?(j=n.jsx(F,{variant:"ghost",onClick:y,disabled:P,children:N}),e[39]=c.isPending,e[40]=N,e[41]=j):j=e[41];let g;e[42]!==T||e[43]!==j?(g=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[T,j]}),e[42]=T,e[43]=j,e[44]=g):g=e[44];let _;return e[45]!==p||e[46]!==g||e[47]!==h?(_=n.jsxs(me,{children:[h,p,g]}),e[45]=p,e[46]=g,e[47]=h,e[48]=_):_=e[48],_}function ss(){window.location.href="/"}function wt(t){const e=M.c(25),{orgSlug:s,orgName:a,reason:o}=t,i=W(),r=os,d=o==="not-found",u=d?wn:Nt;let f;e[0]!==d||e[1]!==i?(f=i(d?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=d,e[1]=i,e[2]=f):f=e[2];const S=f;let c;e[3]!==d||e[4]!==a||e[5]!==s||e[6]!==i?(c=d?n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??s}),".",n.jsx("br",{}),i("common.noAccessScreen.askAdminToInvite")]}),e[3]=d,e[4]=a,e[5]=s,e[6]=i,e[7]=c):c=e[7];const y=c;let h;e[8]!==u?(h=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(u,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=u,e[9]=h):h=e[9];let w;e[10]!==S?(w=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[10]=S,e[11]=w):w=e[11];let m;e[12]!==y?(m=n.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[12]=y,e[13]=m):m=e[13];let l;e[14]!==w||e[15]!==m?(l=n.jsxs("div",{className:"space-y-2",children:[w,m]}),e[14]=w,e[15]=m,e[16]=l):l=e[16];let b;e[17]!==i?(b=i("common.noAccessScreen.goToHome"),e[17]=i,e[18]=b):b=e[18];let p;e[19]!==b?(p=n.jsx(F,{onClick:r,children:b}),e[19]=b,e[20]=p):p=e[20];let x;return e[21]!==h||e[22]!==l||e[23]!==p?(x=n.jsxs(me,{children:[h,l,p]}),e[21]=h,e[22]=l,e[23]=p,e[24]=x):x=e[24],x}function os(){window.location.href="/"}function is(t){const e=M.c(59),{invitationId:s,orgName:a,orgSlug:o,orgLogo:i}=t,r=W();let d;e[0]!==s?(d=async()=>{const E=await Be.organization.acceptInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[0]=s,e[1]=d):d=e[1];let u;e[2]!==o?(u=()=>{Qt(),window.location.href=`/${o}`},e[2]=o,e[3]=u):u=e[3];let f;e[4]!==r?(f=E=>{Ve.error(E instanceof Error?E.message:r("common.pendingInviteScreen.failedToAccept"))},e[4]=r,e[5]=f):f=e[5];let S;e[6]!==d||e[7]!==u||e[8]!==f?(S={mutationFn:d,onSuccess:u,onError:f},e[6]=d,e[7]=u,e[8]=f,e[9]=S):S=e[9];const c=Ye(S);let y;e[10]!==s?(y=async()=>{const E=await Be.organization.rejectInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[10]=s,e[11]=y):y=e[11];let h,w;e[12]!==r?(h=()=>{Ve.success(r("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},w=E=>{Ve.error(E instanceof Error?E.message:r("common.pendingInviteScreen.failedToDecline"))},e[12]=r,e[13]=h,e[14]=w):(h=e[13],w=e[14]);let m;e[15]!==y||e[16]!==h||e[17]!==w?(m={mutationFn:y,onSuccess:h,onError:w},e[15]=y,e[16]=h,e[17]=w,e[18]=m):m=e[18];const l=Ye(m),b=c.isPending||l.isPending;let p;e[19]!==i||e[20]!==a?(p=i?n.jsx(at,{url:i,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Sn,{className:"h-6 w-6 text-primary"})}),e[19]=i,e[20]=a,e[21]=p):p=e[21];let x;e[22]!==a||e[23]!==r?(x=r("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=r,e[24]=x):x=e[24];let v;e[25]!==x?(v=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[25]=x,e[26]=v):v=e[26];let T;e[27]!==r?(T=r("common.pendingInviteScreen.acceptDescription"),e[27]=r,e[28]=T):T=e[28];let P;e[29]!==T?(P=n.jsx("p",{className:"text-sm text-muted-foreground",children:T}),e[29]=T,e[30]=P):P=e[30];let N;e[31]!==v||e[32]!==P?(N=n.jsxs("div",{className:"space-y-2",children:[v,P]}),e[31]=v,e[32]=P,e[33]=N):N=e[33];let j;e[34]!==c?(j=()=>c.mutate(),e[34]=c,e[35]=j):j=e[35];let g;e[36]!==c.isPending||e[37]!==r?(g=c.isPending?r("common.pendingInviteScreen.acceptingButton"):r("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=r,e[38]=g):g=e[38];let _;e[39]!==b||e[40]!==j||e[41]!==g?(_=n.jsx(F,{onClick:j,disabled:b,children:g}),e[39]=b,e[40]=j,e[41]=g,e[42]=_):_=e[42];let k;e[43]!==l?(k=()=>l.mutate(),e[43]=l,e[44]=k):k=e[44];let A;e[45]!==l.isPending||e[46]!==r?(A=l.isPending?r("common.pendingInviteScreen.decliningButton"):r("common.pendingInviteScreen.declineButton"),e[45]=l.isPending,e[46]=r,e[47]=A):A=e[47];let I;e[48]!==b||e[49]!==k||e[50]!==A?(I=n.jsx(F,{variant:"ghost",onClick:k,disabled:b,children:A}),e[48]=b,e[49]=k,e[50]=A,e[51]=I):I=e[51];let C;e[52]!==_||e[53]!==I?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,I]}),e[52]=_,e[53]=I,e[54]=C):C=e[54];let O;return e[55]!==N||e[56]!==C||e[57]!==p?(O=n.jsxs(me,{children:[p,N,C]}),e[55]=N,e[56]=C,e[57]=p,e[58]=O):O=e[58],O}function as(t){const e=M.c(23),{orgName:s,orgLogo:a}=t,o=W();let i;e[0]!==a||e[1]!==s?(i=a?n.jsx(at,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(vn,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=s,e[2]=i):i=e[2];let r;e[3]!==o?(r=o("common.requestPendingScreen.title"),e[3]=o,e[4]=r):r=e[4];let d;e[5]!==r?(d=n.jsx("h3",{className:"text-lg font-medium",children:r}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==s||e[8]!==o?(u=o("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=o,e[9]=u):u=e[9];let f;e[10]!==u?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[10]=u,e[11]=f):f=e[11];let S;e[12]!==d||e[13]!==f?(S=n.jsxs("div",{className:"space-y-2",children:[d,f]}),e[12]=d,e[13]=f,e[14]=S):S=e[14];let c;e[15]!==o?(c=o("common.requestPendingScreen.goHome"),e[15]=o,e[16]=c):c=e[16];let y;e[17]!==c?(y=n.jsx(F,{variant:"ghost",onClick:rs,children:c}),e[17]=c,e[18]=y):y=e[18];let h;return e[19]!==i||e[20]!==S||e[21]!==y?(h=n.jsxs(me,{children:[i,S,y]}),e[19]=i,e[20]=S,e[21]=y,e[22]=h):h=e[22],h}function rs(){window.location.href="/"}function ls(t){const e=M.c(45),{orgName:s,orgSlug:a,orgLogo:o,domain:i}=t,r=W();let d;e[0]!==a?(d=async()=>{const _=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),k=await _.json();if(!_.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=a,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=ds,e[2]=u):u=e[2];let f;e[3]!==r?(f=_=>{Ve.error(_ instanceof Error?_.message:r("common.requestToJoinScreen.failedToRequest"))},e[3]=r,e[4]=f):f=e[4];let S;e[5]!==d||e[6]!==f?(S={mutationFn:d,onSuccess:u,onError:f},e[5]=d,e[6]=f,e[7]=S):S=e[7];const c=Ye(S);let y;e[8]!==o||e[9]!==s?(y=o?n.jsx(at,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ot,{className:"h-6 w-6 text-primary"})}),e[8]=o,e[9]=s,e[10]=y):y=e[10];let h;e[11]!==s||e[12]!==r?(h=r("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=r,e[13]=h):h=e[13];let w;e[14]!==h?(w=n.jsx("h3",{className:"text-lg font-medium",children:h}),e[14]=h,e[15]=w):w=e[15];let m;e[16]!==i||e[17]!==r?(m=r("common.requestToJoinScreen.description",{domain:i}),e[16]=i,e[17]=r,e[18]=m):m=e[18];let l;e[19]!==m?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[19]=m,e[20]=l):l=e[20];let b;e[21]!==w||e[22]!==l?(b=n.jsxs("div",{className:"space-y-2",children:[w,l]}),e[21]=w,e[22]=l,e[23]=b):b=e[23];let p;e[24]!==c?(p=()=>c.mutate(),e[24]=c,e[25]=p):p=e[25];let x;e[26]!==c.isPending||e[27]!==r?(x=c.isPending?r("common.requestToJoinScreen.requesting"):r("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=r,e[28]=x):x=e[28];let v;e[29]!==c.isPending||e[30]!==p||e[31]!==x?(v=n.jsx(F,{onClick:p,disabled:c.isPending,children:x}),e[29]=c.isPending,e[30]=p,e[31]=x,e[32]=v):v=e[32];const T=c.isPending;let P;e[33]!==r?(P=r("common.requestToJoinScreen.goToHome"),e[33]=r,e[34]=P):P=e[34];let N;e[35]!==c.isPending||e[36]!==P?(N=n.jsx(F,{variant:"ghost",onClick:cs,disabled:T,children:P}),e[35]=c.isPending,e[36]=P,e[37]=N):N=e[37];let j;e[38]!==v||e[39]!==N?(j=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,N]}),e[38]=v,e[39]=N,e[40]=j):j=e[40];let g;return e[41]!==b||e[42]!==j||e[43]!==y?(g=n.jsxs(me,{children:[y,b,j]}),e[41]=b,e[42]=j,e[43]=y,e[44]=g):g=e[44],g}function cs(){window.location.href="/"}function ds(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function us(t){const e=M.c(7);let s;e[0]!==t?(s=Ue.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const i=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!i.ok)throw new Error(`org-access-status failed (${i.status})`);return await i.json()},e[2]=t,e[3]=a):a=e[3];let o;return e[4]!==s||e[5]!==a?(o={queryKey:s,queryFn:a,refetchOnWindowFocus:!1},e[4]=s,e[5]=a,e[6]=o):o=e[6],_t(o)}function ms({orgSlug:t}){const{data:e}=us(t);if(e.status!=="member"){Xt()?.org===t&&Zt();const s=localStorage.getItem(Ke.lastOrgSlug())===t;if(s&&localStorage.removeItem(Ke.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(wt,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(is,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ns,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(ls,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(as,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(wt,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function zt(t){const e=M.c(42),{ariaLabel:s,dismissLabel:a,eyebrow:o,title:i,description:r,icon:d,children:u,footerLeading:f,actions:S,onDismiss:c,tone:y}=t,h=y===void 0?"neutral":y,w=f||S;let m;e[0]!==h?(m=h==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=h,e[1]=m):m=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Pn,{size:14}),e[2]=l):l=e[2];let b;e[3]!==a||e[4]!==c?(b=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:l}),e[3]=a,e[4]=c,e[5]=b):b=e[5];const p=d&&"flex items-start gap-3",x=u&&"pb-3";let v;e[6]!==p||e[7]!==x?(v=dt("p-4 pr-11",p,x),e[6]=p,e[7]=x,e[8]=v):v=e[8];let T;e[9]!==d?(T=d&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:d}),e[9]=d,e[10]=T):T=e[10];let P;e[11]!==o?(P=o&&n.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[11]=o,e[12]=P):P=e[12];let N;e[13]!==i?(N=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:i}),e[13]=i,e[14]=N):N=e[14];let j;e[15]!==r?(j=r&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:r}),e[15]=r,e[16]=j):j=e[16];let g;e[17]!==N||e[18]!==j||e[19]!==P?(g=n.jsxs("div",{children:[P,N,j]}),e[17]=N,e[18]=j,e[19]=P,e[20]=g):g=e[20];let _;e[21]!==u?(_=u&&n.jsx("div",{className:"mt-3",children:u}),e[21]=u,e[22]=_):_=e[22];let k;e[23]!==g||e[24]!==_?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[g,_]}),e[23]=g,e[24]=_,e[25]=k):k=e[25];let A;e[26]!==k||e[27]!==v||e[28]!==T?(A=n.jsxs("div",{className:v,children:[T,k]}),e[26]=k,e[27]=v,e[28]=T,e[29]=A):A=e[29];let I;e[30]!==S||e[31]!==f||e[32]!==w||e[33]!==h?(I=w&&n.jsxs("div",{className:dt("flex items-center justify-between gap-3 px-4 py-2.5",h==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:f}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:S})]}),e[30]=S,e[31]=f,e[32]=w,e[33]=h,e[34]=I):I=e[34];let C;return e[35]!==s||e[36]!==A||e[37]!==I||e[38]!==m||e[39]!==b||e[40]!==h?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":h,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[m,b,A,I]}),e[35]=s,e[36]=A,e[37]=I,e[38]=m,e[39]=b,e[40]=h,e[41]=C):C=e[41],C}const fs={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function Ft(t){return`[data-tour="${fs[t]}"]`}const hs=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function gs(t){return hs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ps(t,e){return gs(e).map(s=>({element:Ft(s.anchor),popover:{title:t(s.titleKey),description:t(s.descKey),side:s.side,align:"center"}}))}const ys=Ft("switcher"),bs=30;function qt(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function xs(t,e){return ps(t,e).filter(s=>typeof s.element=="string"&&qt(s.element))}function ws(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(s,{driver:a})=>{if(s.footerButtons.querySelector(".layout-tour-skip"))return;const o=document.createElement("button");o.type="button",o.className="driver-popover-footer-btn layout-tour-skip",o.textContent=t("layoutTour.skip"),o.addEventListener("click",()=>a.destroy()),s.footerButtons.insertBefore(o,s.footerButtons.firstChild)},onDestroyed:()=>{Je=!1},steps:e}}let Je=!1;async function Ss(){return(await en(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function vs(t,e){if(Je)return;Je=!0;let s=0;const a=()=>{if(!qt(ys)&&s++<bs){requestAnimationFrame(a);return}const o=xs(t,e);if(o.length===0){Je=!1;return}Ss().then(i=>{i(ws(t,o)).drive()}).catch(()=>{Je=!1})};a()}function js(t){return t!=="off"}function li(t){if(!t.hasSource)return[];const e=["site-editor"];return js(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function Kt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function ci(t){return t.reportsOnly&&!t.onReportAgent&&Kt(t.tabId)}const ks=[{id:"new-layout",date:"2026-09-17",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:ot,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:ct,title:"Consistent sidebar navigation",body:"Settings and project pages now use a predictable sidebar for sections, instead of scattered tabs and buttons."},{icon:ee,title:"Refined controls & mobile",body:"Buttons and toolbars have been redesigned for clarity. The layout adapts gracefully to smaller screens with the same consistent structure."}],cta:{label:"Try it now",action:"enable-new-layout"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:pt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:ee,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:ot,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:ot,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:ae,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:re,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:re,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:ee,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:tn,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:ot,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:ee,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ae,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:re,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:ee,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:ae,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:re,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:ae,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:ee,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:re,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:ee,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:ae,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:re,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:ee,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:ae,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:re,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:ee,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ct,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:ae,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:pt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:re,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:ae,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:ee,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ct,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:ee,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:jn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Bt=ks,it="studio.release-feed.v1",mt=new Set;let de="",ue={},ft=!1;function Ts(){if(ft)return de||"{}";try{return localStorage.getItem(it)??"{}"}catch{return de||"{}"}}function Ht(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function St(){const t=Ts();return t!==de&&(de=t,ue=Ht(t)),ue}function Ns(t){mt.add(t);const e=s=>{if(!(s.key!==it&&s.key!==null)){try{const a=localStorage.getItem(it)??"{}",i={...Ht(a),...ue};ue=i,de=JSON.stringify(i)}catch{}t()}};return window.addEventListener("storage",e),()=>{mt.delete(t),window.removeEventListener("storage",e)}}function _s(t){ue=t,de=JSON.stringify(t);try{localStorage.setItem(it,de),ft=!1}catch{ft=!0}mt.forEach(e=>e())}function As(){const t=M.c(7),e=J.useSyncExternalStore(Ns,St,St);let s;t[0]!==e?(s=u=>!!e[u],t[0]=e,t[1]=s):s=t[1];const a=s,o=Ps;let i;t[2]!==e?(i=Bt.reduce((u,f)=>e[f.id]?u:u+1,0),t[2]=e,t[3]=i):i=t[3];const r=i;let d;return t[4]!==a||t[5]!==r?(d={isSeen:a,markSeen:o,unseenCount:r},t[4]=a,t[5]=r,t[6]=d):d=t[6],d}function Ps(t){ue[t]||_s({...ue,[t]:{seenAt:new Date().toISOString()}})}const vt=new Map;function Ut(t){let e=vt.get(t);return e||(e={now:Date.now(),subscribers:new Set,intervalId:null},vt.set(t,e)),e}function Cs(t,e){const s=Ut(t);return s.subscribers.add(e),s.intervalId===null&&(s.intervalId=setInterval(()=>{s.now=Date.now();for(const a of s.subscribers)a()},t)),()=>{s.subscribers.delete(e),s.subscribers.size===0&&s.intervalId!==null&&(clearInterval(s.intervalId),s.intervalId=null)}}function Es(t){const e=M.c(4),s=t===void 0?6e4:t;let a;e[0]!==s?(a=()=>Ut(s).now,e[0]=s,e[1]=a):a=e[1];const o=a;let i;return e[2]!==s?(i=r=>Cs(s,r),e[2]=s,e[3]=i):i=e[3],J.useSyncExternalStore(i,o,o)}const Is=720*60*60*1e3,Os=10080*60*1e3;function Ls(t){const[e,s,a]=t.split("-").map(Number);return!e||!s||!a?new Date(t).getTime():new Date(e,s-1,a).getTime()}function $s(t){const e=Bt[0];if(!e)return null;const s=Ls(e.date),a=t-s;return a<0||a>Is?null:e}function Ds(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Rs(t,e){const s=Ds(t);return s===null?!1:e-s>=Os}function Ms(){const t=M.c(58),e=W(),s=En(),a=nn(),o=Lt(),i=!!s,r=a===ie.home&&!s;let d;t[0]!==o||t[1]!==i?(d=i&&!!o&&Kt(o),t[0]=o,t[1]=i,t[2]=d):d=t[2];const u=d,{data:f}=Be.useSession(),{isSeen:S,markSeen:c}=As(),[,y]=At(),[h,w]=J.useState(!1),m=Es(6e4);let l,b,p;if(t[3]!==S||t[4]!==m||t[5]!==f?.user?.createdAt){p=Symbol.for("react.early_return_sentinel");e:{if(l=$s(m),!l){p=null;break e}if(!Rs(f?.user?.createdAt,m)){p=null;break e}b=S(l.id)}t[3]=S,t[4]=m,t[5]=f?.user?.createdAt,t[6]=l,t[7]=b,t[8]=p}else l=t[6],b=t[7],p=t[8];if(p!==Symbol.for("react.early_return_sentinel"))return p;if(b)return null;let x;t[9]!==l.id||t[10]!==i||t[11]!==c||t[12]!==r||t[13]!==u||t[14]!==e?(x=()=>{c(l.id),vs(e,{onOrgHome:r,inProject:i,onSiteEditor:u})},t[9]=l.id,t[10]=i,t[11]=c,t[12]=r,t[13]=u,t[14]=e,t[15]=x):x=t[15];const v=x;let T;t[16]!==l.id||t[17]!==c||t[18]!==y?(T=()=>{y(Fs),c(l.id)},t[16]=l.id,t[17]=c,t[18]=y,t[19]=T):T=t[19];const P=T;let N;t[20]!==e?(N=e("announcements.release.ariaLabel"),t[20]=e,t[21]=N):N=t[21];let j;t[22]!==e?(j=e("announcements.release.dismiss"),t[22]=e,t[23]=j):j=t[23];const g=l.eyebrow,_=l.title;let k;t[24]!==l.id||t[25]!==c?(k=()=>c(l.id),t[24]=l.id,t[25]=c,t[26]=k):k=t[26];let A;t[27]!==l.id||t[28]!==l.learnMoreHref||t[29]!==c||t[30]!==e?(A=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[27]=l.id,t[28]=l.learnMoreHref,t[29]=c,t[30]=e,t[31]=A):A=t[31];let I;t[32]!==l.cta||t[33]!==l.id||t[34]!==P||t[35]!==c||t[36]!==v?(I=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(F,{size:"sm",onClick:v,children:l.cta.label}):l.cta.action==="enable-new-layout"?n.jsx(F,{size:"sm",onClick:P,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>w(!0),children:l.cta.label}):null,t[32]=l.cta,t[33]=l.id,t[34]=P,t[35]=c,t[36]=v,t[37]=I):I=t[37];let C;t[38]!==l.bullets?(C=l.bullets.map(zs),t[38]=l.bullets,t[39]=C):C=t[39];let O;t[40]!==C?(O=n.jsx("ul",{className:"flex flex-col gap-3",children:C}),t[40]=C,t[41]=O):O=t[41];let E;t[42]!==l.id||t[43]!==c?(E=B=>{w(B),B||c(l.id)},t[42]=l.id,t[43]=c,t[44]=E):E=t[44];let D;t[45]!==h||t[46]!==E?(D=n.jsx(Cn,{open:h,onOpenChange:E}),t[45]=h,t[46]=E,t[47]=D):D=t[47];let z;return t[48]!==l.eyebrow||t[49]!==l.title||t[50]!==A||t[51]!==I||t[52]!==O||t[53]!==D||t[54]!==N||t[55]!==j||t[56]!==k?(z=n.jsxs(zt,{ariaLabel:N,dismissLabel:j,eyebrow:g,title:_,onDismiss:k,footerLeading:A,actions:I,children:[O,D]}),t[48]=l.eyebrow,t[49]=l.title,t[50]=A,t[51]=I,t[52]=O,t[53]=D,t[54]=N,t[55]=j,t[56]=k,t[57]=z):z=t[57],z}function zs(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}function Fs(t){return{...t,compactPageLayout:!0}}const Gt=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),ce=Gt?"⌘":"Ctrl",V={commandPalette:{keys:[ce,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[ce,"["],description:"Back to previous"},focusChatInput:{keys:[ce,"L"],description:"Focus chat input"},saveAndFormat:{keys:[ce,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[ce,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[ce,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",ce,"S"],description:"New task"},toggleDaemon:{keys:[ce,"D"],description:"Toggle daemon logs"}},qs=[{label:"General",shortcuts:[V.commandPalette,V.keyboardShortcuts,V.back,V.newTask,V.toggleDaemon]},{label:"Editor",shortcuts:[V.saveAndFormat]},{label:"Chat",shortcuts:[V.focusChatInput,V.togglePlanMode,V.sendMessage,V.newLine]},{label:"Questions",shortcuts:[V.selectOption]},{label:"Monitoring",shortcuts:[V.applyFilter]}];function jt(t){return Gt?t.metaKey:t.ctrlKey}function Ks(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Bs(t){const e=M.c(11),{open:s,onOpenChange:a}=t,o=W();let i;e[0]!==o?(i=o("common.keyboardShortcutsDialog.title"),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==i?(r=n.jsx($t,{children:n.jsx(Dt,{children:i})}),e[2]=i,e[3]=r):r=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex flex-col gap-4",children:qs.map(Hs)}),e[4]=d):d=e[4];let u;e[5]!==r?(u=n.jsxs(Rt,{className:"sm:max-w-md",children:[r,d]}),e[5]=r,e[6]=u):u=e[6];let f;return e[7]!==a||e[8]!==s||e[9]!==u?(f=n.jsx(Mt,{open:s,onOpenChange:a,children:u}),e[7]=a,e[8]=s,e[9]=u,e[10]=f):f=e[10],f}function Hs(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Us)})]},t.label)}function Us(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Gs)})]},t.description)}function Gs(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const kt=8;function Js(t){const{org:e}=ht(),s=Hn({connectionId:Ct,orgId:e.id,orgSlug:e.slug}),{data:a}=He({queryKey:Ue.globalSearch(e.id,t,kt),enabled:!!s&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!s)return[];try{return(await s.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:kt}})).structuredContent?.items??[]}catch{return[]}}});return a??[]}function Vs(t){const e=M.c(195),{open:s,onOpenChange:a}=t,o=W(),i=Pt(),{org:r}=ht(),{projects:d,hasProjects:u}=In(),[f,S]=J.useState(""),c=J.useDeferredValue(f),y=Js(c);let h;e[0]!==a?(h=()=>{a(!1),S("")},e[0]=a,e[1]=h):h=e[1];const w=h;let m;e[2]!==w?(m=(q,Y)=>{ut("command_palette_used",{kind:Y}),q(),w()},e[2]=w,e[3]=m):m=e[3];const l=m;let b;e[4]!==i||e[5]!==r.id||e[6]!==r.slug?(b=q=>{if(q.type==="connection"){if(!q.slug){i({to:"/$org/settings/connections",params:{org:r.slug},search:{tab:"all"}});return}i({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:q.slug}});return}if(q.type==="task"){i({to:ie.tasks,params:{org:r.slug,taskKey:q.key??void 0}});return}const Y=Et(r.id).id;sn(i,on({org:r.slug,agentId:q.virtual_mcp_id??Y,superAgentId:Y}),{search:()=>({thread:q.id}),replace:!1})},e[4]=i,e[5]=r.id,e[6]=r.slug,e[7]=b):b=e[7];const p=b;let x;e[8]!==f?(x=[f],e[8]=f,e[9]=x):x=e[9];const v=x;let T,P,N,j,g,_,k,A,I,C,O,E,D;if(e[10]!==w||e[11]!==l||e[12]!==u||e[13]!==y||e[14]!==i||e[15]!==a||e[16]!==s||e[17]!==p||e[18]!==r.slug||e[19]!==d||e[20]!==v||e[21]!==o||e[22]!==f){const q=y.filter(Ys),Y=y.filter(Ws);let ne;e[36]!==r.slug?(ne={org:r.slug},e[36]=r.slug,e[37]=ne):ne=e[37];const R=ne;let te;e[38]!==o?(te=o("sidebar.navDestinations.home"),e[38]=o,e[39]=te):te=e[39];let Q;e[40]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(Tn,{"aria-hidden":"true"}),e[40]=Q):Q=e[40];let H;e[41]!==R||e[42]!==te?(H={key:"home",label:te,icon:Q,to:ie.home,params:R},e[41]=R,e[42]=te,e[43]=H):H=e[43];let X;e[44]!==o?(X=o("sidebar.navDestinations.reports"),e[44]=o,e[45]=X):X=e[45];let se;e[46]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(Nn,{"aria-hidden":"true"}),e[46]=se):se=e[46];let U;e[47]!==R||e[48]!==X?(U={key:"reports",label:X,icon:se,to:ie.reports,params:R},e[47]=R,e[48]=X,e[49]=U):U=e[49];let G;e[50]!==o?(G=o("sidebar.navDestinations.tasks"),e[50]=o,e[51]=G):G=e[51];let oe;e[52]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(bt,{"aria-hidden":"true"}),e[52]=oe):oe=e[52];let Z;e[53]!==r.slug?(Z={org:r.slug,taskKey:void 0},e[53]=r.slug,e[54]=Z):Z=e[54];let L;e[55]!==G||e[56]!==Z?(L={key:"tasks",label:G,icon:oe,to:ie.tasks,params:Z},e[55]=G,e[56]=Z,e[57]=L):L=e[57];let K;e[58]!==o?(K=o("sidebar.navDestinations.library"),e[58]=o,e[59]=K):K=e[59];let Qe;e[60]===Symbol.for("react.memo_cache_sentinel")?(Qe=n.jsx(Dn,{"aria-hidden":"true"}),e[60]=Qe):Qe=e[60];let fe;e[61]!==R||e[62]!==K?(fe={key:"library",label:K,icon:Qe,to:ie.library,params:R},e[61]=R,e[62]=K,e[63]=fe):fe=e[63];let he;e[64]!==o?(he=o("sidebar.navDestinations.discover"),e[64]=o,e[65]=he):he=e[65];let Xe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Xe=n.jsx(_n,{"aria-hidden":"true"}),e[66]=Xe):Xe=e[66];let ge;e[67]!==R||e[68]!==he?(ge={key:"discover",label:he,icon:Xe,to:ie.discover,params:R},e[67]=R,e[68]=he,e[69]=ge):ge=e[69];let Ze;e[70]!==H||e[71]!==U||e[72]!==L||e[73]!==fe||e[74]!==ge?(Ze=[H,U,L,fe,ge],e[70]=H,e[71]=U,e[72]=L,e[73]=fe,e[74]=ge,e[75]=Ze):Ze=e[75];const rt=Ze;P=Mn,j=s,e[76]!==w||e[77]!==a?(g=$=>$?a(!0):w(),e[76]=w,e[77]=a,e[78]=g):g=e[78],e[79]!==o?(_=o("commandPalette.title"),e[79]=o,e[80]=_):_=e[80],e[81]!==o?(k=o("commandPalette.description"),e[81]=o,e[82]=k):k=e[82];let pe;e[83]!==o?(pe=o("commandPalette.placeholder"),e[83]=o,e[84]=pe):pe=e[84];let ye;e[85]!==o?(ye=o("commandPalette.placeholder"),e[85]=o,e[86]=ye):ye=e[86],e[87]!==pe||e[88]!==ye||e[89]!==f?(A=n.jsx(zn,{placeholder:pe,"aria-label":ye,value:f,onValueChange:S}),e[87]=pe,e[88]=ye,e[89]=f,e[90]=A):A=e[90],T=Fn;let be;e[91]!==o?(be=o("commandPalette.empty"),e[91]=o,e[92]=be):be=e[92],e[93]!==be?(I=n.jsx(qn,{children:be}),e[93]=be,e[94]=I):I=e[94];let xe;e[95]!==o?(xe=o("commandPalette.goTo"),e[95]=o,e[96]=xe):xe=e[96];let we;e[97]!==rt||e[98]!==l||e[99]!==i?(we=rt.map($=>n.jsxs(le,{onSelect:()=>l(()=>i({to:$.to,params:$.params}),"destination"),children:[$.icon,n.jsx("span",{children:$.label})]},$.key)),e[97]=rt,e[98]=l,e[99]=i,e[100]=we):we=e[100],e[101]!==xe||e[102]!==we?(C=n.jsx(Ge,{heading:xe,children:we}),e[101]=xe,e[102]=we,e[103]=C):C=e[103],e[104]!==l||e[105]!==u||e[106]!==i||e[107]!==r.slug||e[108]!==d||e[109]!==o?(O=u&&n.jsx(Ge,{heading:o("commandPalette.projects"),children:d.map($=>n.jsxs(le,{value:`project ${$.title}`,onSelect:()=>l(()=>i({to:ie.projects,params:{org:r.slug,agentId:$.id}}),"project"),children:[n.jsx(Bn,{icon:$.icon,name:$.title,"aria-hidden":"true"}),n.jsx("span",{children:$.title})]},$.id))}),e[104]=l,e[105]=u,e[106]=i,e[107]=r.slug,e[108]=d,e[109]=o,e[110]=O):O=e[110];let Se;e[111]!==o?(Se=o("commandPalette.actions"),e[111]=o,e[112]=Se):Se=e[112];let ve;e[113]!==o?(ve=o("commandPalette.newProject"),e[113]=o,e[114]=ve):ve=e[114];let je;e[115]!==l||e[116]!==i||e[117]!==R?(je=()=>l(()=>i({to:ie.home,params:R}),"new_project"),e[115]=l,e[116]=i,e[117]=R,e[118]=je):je=e[118];let et;e[119]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(xt,{"aria-hidden":"true"}),e[119]=et):et=e[119];let ke;e[120]!==o?(ke=o("commandPalette.newProject"),e[120]=o,e[121]=ke):ke=e[121];let Te;e[122]!==ke?(Te=n.jsx("span",{children:ke}),e[122]=ke,e[123]=Te):Te=e[123];let Ne;e[124]!==ve||e[125]!==je||e[126]!==Te?(Ne=n.jsxs(le,{value:ve,onSelect:je,children:[et,Te]}),e[124]=ve,e[125]=je,e[126]=Te,e[127]=Ne):Ne=e[127];let _e;e[128]!==o?(_e=o("commandPalette.inviteTeammate"),e[128]=o,e[129]=_e):_e=e[129];let Ae;e[130]!==l||e[131]!==i||e[132]!==R?(Ae=()=>l(()=>i({to:"/$org/settings/members",params:R}),"invite"),e[130]=l,e[131]=i,e[132]=R,e[133]=Ae):Ae=e[133];let tt;e[134]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(An,{"aria-hidden":"true"}),e[134]=tt):tt=e[134];let Pe;e[135]!==o?(Pe=o("commandPalette.inviteTeammate"),e[135]=o,e[136]=Pe):Pe=e[136];let Ce;e[137]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[137]=Pe,e[138]=Ce):Ce=e[138];let Ee;e[139]!==_e||e[140]!==Ae||e[141]!==Ce?(Ee=n.jsxs(le,{value:_e,onSelect:Ae,children:[tt,Ce]}),e[139]=_e,e[140]=Ae,e[141]=Ce,e[142]=Ee):Ee=e[142];let Ie;e[143]!==o?(Ie=o("commandPalette.addConnection"),e[143]=o,e[144]=Ie):Ie=e[144];let Oe;e[145]!==l||e[146]!==i||e[147]!==R?(Oe=()=>l(()=>i({to:"/$org/settings/connections",params:R,search:{tab:"all"}}),"add_connection"),e[145]=l,e[146]=i,e[147]=R,e[148]=Oe):Oe=e[148];let nt;e[149]===Symbol.for("react.memo_cache_sentinel")?(nt=n.jsx(xt,{"aria-hidden":"true"}),e[149]=nt):nt=e[149];let Le;e[150]!==o?(Le=o("commandPalette.addConnection"),e[150]=o,e[151]=Le):Le=e[151];let $e;e[152]!==Le?($e=n.jsx("span",{children:Le}),e[152]=Le,e[153]=$e):$e=e[153];let De;e[154]!==Ie||e[155]!==Oe||e[156]!==$e?(De=n.jsxs(le,{value:Ie,onSelect:Oe,children:[nt,$e]}),e[154]=Ie,e[155]=Oe,e[156]=$e,e[157]=De):De=e[157];let Re;e[158]!==o?(Re=o("commandPalette.settings"),e[158]=o,e[159]=Re):Re=e[159];let Me;e[160]!==l||e[161]!==i||e[162]!==R?(Me=()=>l(()=>i({to:"/$org/settings/general",params:R}),"settings"),e[160]=l,e[161]=i,e[162]=R,e[163]=Me):Me=e[163];let st;e[164]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx(Rn,{"aria-hidden":"true"}),e[164]=st):st=e[164];let ze;e[165]!==o?(ze=o("commandPalette.settings"),e[165]=o,e[166]=ze):ze=e[166];let Fe;e[167]!==ze?(Fe=n.jsx("span",{children:ze}),e[167]=ze,e[168]=Fe):Fe=e[168];let qe;e[169]!==Re||e[170]!==Me||e[171]!==Fe?(qe=n.jsxs(le,{value:Re,onSelect:Me,children:[st,Fe]}),e[169]=Re,e[170]=Me,e[171]=Fe,e[172]=qe):qe=e[172],e[173]!==Se||e[174]!==Ne||e[175]!==Ee||e[176]!==De||e[177]!==qe?(E=n.jsxs(Ge,{heading:Se,children:[Ne,Ee,De,qe]}),e[173]=Se,e[174]=Ne,e[175]=Ee,e[176]=De,e[177]=qe,e[178]=E):E=e[178],D=q.length>0&&n.jsx(Ge,{heading:o("commandPalette.connections"),children:q.map($=>n.jsxs(le,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>l(()=>p($),"connection"),children:[n.jsx(Kn,{icon:$.icon,name:$.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title})]},`connection:${$.id}`))}),N=Y.length>0&&n.jsx(Ge,{heading:o("commandPalette.results"),children:Y.map($=>n.jsxs(le,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>l(()=>p($),$.type),children:[$.type==="thread"?n.jsx(kn,{"aria-hidden":"true"}):n.jsx(bt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title}),$.type==="task"&&$.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:$.key})]},`${$.type}:${$.id}`))}),e[10]=w,e[11]=l,e[12]=u,e[13]=y,e[14]=i,e[15]=a,e[16]=s,e[17]=p,e[18]=r.slug,e[19]=d,e[20]=v,e[21]=o,e[22]=f,e[23]=T,e[24]=P,e[25]=N,e[26]=j,e[27]=g,e[28]=_,e[29]=k,e[30]=A,e[31]=I,e[32]=C,e[33]=O,e[34]=E,e[35]=D}else T=e[23],P=e[24],N=e[25],j=e[26],g=e[27],_=e[28],k=e[29],A=e[30],I=e[31],C=e[32],O=e[33],E=e[34],D=e[35];let z;e[179]!==T||e[180]!==N||e[181]!==I||e[182]!==C||e[183]!==O||e[184]!==E||e[185]!==D?(z=n.jsxs(T,{children:[I,C,O,E,D,N]}),e[179]=T,e[180]=N,e[181]=I,e[182]=C,e[183]=O,e[184]=E,e[185]=D,e[186]=z):z=e[186];let B;return e[187]!==P||e[188]!==j||e[189]!==g||e[190]!==_||e[191]!==k||e[192]!==A||e[193]!==z?(B=n.jsxs(P,{open:j,onOpenChange:g,title:_,description:k,children:[A,z]}),e[187]=P,e[188]=j,e[189]=g,e[190]=_,e[191]=k,e[192]=A,e[193]=z,e[194]=B):B=e[194],B}function Ws(t){return t.type!=="connection"}function Ys(t){return t.type==="connection"}const We=new Gn(!1);function Qs(){We.set(!0)}function Xs(){We.set(!1)}function Zs(){const t=M.c(2),e=J.useSyncExternalStore(We.subscribe,We.get);let s;return t[0]!==e?(s=[e,We.set],t[0]=e,t[1]=s):s=t[1],s}const eo=300*1e3,to=2;function no(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function so(t,e){return t.count>=to&&t.version!==null&&t.version!==e}function oo(){const t=M.c(43),e=W(),s=Vn();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:ao},t[0]=a):a=t[0];const o=Ye(a);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={queryKey:Ue.appVersionCheck(),queryFn:io,refetchInterval:eo,refetchIntervalInBackground:!0,staleTime:0},t[1]=i):i=t[1];const{data:r,dataUpdatedAt:d}=He(i),[u,f]=J.useState(0);let S;t[2]===Symbol.for("react.memo_cache_sentinel")?(S={version:null,count:0},t[2]=S):S=t[2];const[c,y]=J.useState(S);d!==u&&(f(d),y(z=>no(z,r,"4.388.4")));const[h,w]=J.useState(null),m=s;let l;t[3]!==s||t[4]!==o?(l=()=>window.location.reload(),t[3]=s,t[4]=o,t[5]=l):l=t[5];const b=l,p="announcements.version.refresh";if(!so(c,h))return null;let x;t[6]!==e?(x=e("announcements.version.ariaLabel"),t[6]=e,t[7]=x):x=t[7];let v;t[8]!==e?(v=e("announcements.version.dismiss"),t[8]=e,t[9]=v):v=t[9];let T;t[10]!==e?(T=e("announcements.version.eyebrow"),t[10]=e,t[11]=T):T=t[11];let P;t[12]!==e?(P=e("announcements.version.title"),t[12]=e,t[13]=P):P=t[13];const N="announcements.version.description";let j;t[14]!==e||t[15]!==N?(j=e(N),t[14]=e,t[15]=N,t[16]=j):j=t[16];let g;t[17]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(yt,{size:16}),t[17]=g):g=t[17];let _;t[18]!==c.version?(_=()=>w(c.version),t[18]=c.version,t[19]=_):_=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.388.4"}),t[20]=e,t[21]=k):k=t[21];let A;t[22]!==p||t[23]!==e?(A=e(p),t[22]=p,t[23]=e,t[24]=A):A=t[24];const I=m;let C;t[25]!==I?(C=dt(I),t[25]=I,t[26]=C):C=t[26];let O;t[27]!==C?(O=n.jsx(yt,{size:14,className:C}),t[27]=C,t[28]=O):O=t[28];let E;t[29]!==b||t[30]!==m||t[31]!==A||t[32]!==O?(E=n.jsxs(F,{size:"sm",disabled:m,onClick:b,children:[A,O]}),t[29]=b,t[30]=m,t[31]=A,t[32]=O,t[33]=E):E=t[33];let D;return t[34]!==_||t[35]!==k||t[36]!==E||t[37]!==x||t[38]!==v||t[39]!==T||t[40]!==P||t[41]!==j?(D=n.jsx(zt,{ariaLabel:x,dismissLabel:v,eyebrow:T,title:P,description:j,icon:g,tone:"system",onDismiss:_,footerLeading:k,actions:E}),t[34]=_,t[35]=k,t[36]=E,t[37]=x,t[38]=v,t[39]=T,t[40]=P,t[41]=j,t[42]=D):D=t[42],D}async function io(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function ao(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function ro(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const lo=Date.parse("2026-07-21T00:00:00Z"),Tt=t=>ro(Ke.ptBrAnnouncementSeen(t));function co(){const t=M.c(35),e=W(),[s,a]=At(),{data:o,isPending:i}=Be.useSession(),r=o?.user,d=r?.id,u=r?.createdAt,f=u!=null&&new Date(u).getTime()<lo,S=an()==="pt-BR",c=!i&&!!d&&f&&S&&s.language==="en"&&!Tt(d).has(),[y,h]=J.useState(!1),[w,m]=J.useState(!1);!y&&!i&&(h(!0),c&&d&&(Tt(d).mark(),a(mo),m(!0),ut("pt_br_auto_switch_shown")));let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=B=>{ut("pt_br_auto_switch_closed",{action:B}),m(!1)},t[0]=l):l=t[0];const b=l;let p;t[1]!==a?(p=()=>{a(uo),b("switch-back")},t[1]=a,t[2]=p):p=t[2];const x=p;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=B=>!B&&b("dismiss"),t[3]=v):v=t[3];let T;t[4]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=T):T=t[4];let P;t[5]!==e?(P=e("announcements.ptBr.title"),t[5]=e,t[6]=P):P=t[6];let N;t[7]!==P?(N=n.jsx(Dt,{children:P}),t[7]=P,t[8]=N):N=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let g;t[11]!==j?(g=n.jsx(Ln,{children:j}),t[11]=j,t[12]=g):g=t[12];let _;t[13]!==N||t[14]!==g?(_=n.jsxs($t,{children:[N,g]}),t[13]=N,t[14]=g,t[15]=_):_=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let A;t[18]!==x||t[19]!==k?(A=n.jsx(F,{variant:"outline",onClick:x,children:k}),t[18]=x,t[19]=k,t[20]=A):A=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>b("ok"),t[21]=I):I=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let O;t[24]!==C?(O=n.jsx(F,{onClick:I,children:C}),t[24]=C,t[25]=O):O=t[25];let E;t[26]!==A||t[27]!==O?(E=n.jsxs($n,{children:[A,O]}),t[26]=A,t[27]=O,t[28]=E):E=t[28];let D;t[29]!==E||t[30]!==_?(D=n.jsxs(Rt,{className:"sm:max-w-md",children:[T,_,E]}),t[29]=E,t[30]=_,t[31]=D):D=t[31];let z;return t[32]!==w||t[33]!==D?(z=n.jsx(Mt,{open:w,onOpenChange:v,children:D}),t[32]=w,t[33]=D,t[34]=z):z=t[34],z}function uo(t){return{...t,language:"en"}}function mo(t){return{...t,language:"pt-BR"}}function fo(t){const e=rn(t);return typeof e=="string"?e:void 0}function ho(){return fo("experiment-pipeline-check"),null}function go(t){const e=M.c(1),{activeOrg:s}=t;if(!s)return null;ln(s.id,{name:s.name??void 0,slug:s.slug??void 0}),cn();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ho,{}),e[0]=a):a=e[0],a}function po(t){const{prev:e,virtualMcpId:s,decopilotId:a,savedLayout:o,opts:i,autosendValue:r}=t,d={mainpanel:void 0};s?d.virtualmcpid=s:e.virtualmcpid&&(d.virtualmcpid=e.virtualmcpid);const u=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,S=(s??u)!==u;let c,y;return i?.panel?y=i.panel:o?(y=o.tab,o.sidepanel!==void 0&&(c=o.sidepanel),o.mainpanel!==void 0&&(d.mainpanel=o.mainpanel)):!S&&e.tabId&&!dn(e.tabId)&&(y=e.tabId),c!==void 0&&(d.sidepanel=c),i?.autosend&&(d.autosend=r),{tabId:y,search:d}}const Jt="studio:thread-layout:v4",yo=50;function Vt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function bo(t,e,s,a=yo){const o=t.filter(([i])=>i!==e);for(o.push([e,Vt(s)]);o.length>a;)o.shift();return o}function gt(){try{const t=sessionStorage.getItem(Jt);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Wt(t){try{sessionStorage.setItem(Jt,JSON.stringify(t))}catch{}}function xo(t,e){t&&Wt(bo(gt(),t,e))}function wo(t){if(!t)return null;const e=gt().find(([s])=>s===t);return e?Vt(e[1]):null}function di(t){if(!t)return;const e=gt(),s=e.filter(([a])=>a!==t);s.length!==e.length&&Wt(s)}function Yt(t){return{queryKey:Ue.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function ui(t){const e=M.c(10);let s;e[0]!==t?(s=Yt(t),e[0]=t,e[1]=s):s=e[1];const a=He(s);let o;e[2]!==a.data?.prompts?(o=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=o):o=e[3];let i;e[4]!==a.data?.tiles?(i=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=i):i=e[5];let r;return e[6]!==a.isLoading||e[7]!==o||e[8]!==i?(r={isLoading:a.isLoading,prompts:o,tiles:i},e[6]=a.isLoading,e[7]=o,e[8]=i,e[9]=r):r=e[9],r}function So(t){const e=M.c(31),{orgSlug:s,orgName:a,domain:o}=t,i=W();let r;e[0]!==s?(r=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=r):r=e[1];const d=r,u=vo;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Nt,{className:"h-6 w-6 text-primary"})}),e[2]=f):f=e[2];let S;e[3]!==i?(S=i("common.ssoRequiredScreen.title"),e[3]=i,e[4]=S):S=e[4];let c;e[5]!==S?(c=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[5]=S,e[6]=c):c=e[6];let y;e[7]!==o||e[8]!==a||e[9]!==i?(y=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",i("common.ssoRequiredScreen.requiresSsoAuth"),o?` ${i("common.ssoRequiredScreen.via",{domain:o})}`:"","."]}):i("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=o,e[8]=a,e[9]=i,e[10]=y):y=e[10];let h;e[11]!==y?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[11]=y,e[12]=h):h=e[12];let w;e[13]!==c||e[14]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[c,h]}),e[13]=c,e[14]=h,e[15]=w):w=e[15];let m;e[16]!==i?(m=i("common.ssoRequiredScreen.signInWithSso"),e[16]=i,e[17]=m):m=e[17];let l;e[18]!==d||e[19]!==m?(l=n.jsx(F,{onClick:d,children:m}),e[18]=d,e[19]=m,e[20]=l):l=e[20];let b;e[21]!==i?(b=i("common.ssoRequiredScreen.goBack"),e[21]=i,e[22]=b):b=e[22];let p;e[23]!==b?(p=n.jsx(F,{variant:"ghost",onClick:u,children:b}),e[23]=b,e[24]=p):p=e[24];let x;e[25]!==p||e[26]!==l?(x=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[l,p]}),e[25]=p,e[26]=l,e[27]=x):x=e[27];let v;return e[28]!==x||e[29]!==w?(v=n.jsxs(me,{children:[f,w,x]}),e[28]=x,e[29]=w,e[30]=v):v=e[30],v}function vo(){window.location.href="/"}function jo(t){const e=M.c(27),{notice:s,orgSlug:a}=t,o=W();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(un,{className:"h-6 w-6 text-destructive"})}),e[0]=i):i=e[0];let r;e[1]!==s.title?(r=n.jsx("h3",{className:"text-lg font-medium",children:s.title}),e[1]=s.title,e[2]=r):r=e[2];let d;e[3]!==s.message?(d=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s.message}),e[3]=s.message,e[4]=d):d=e[4];let u;e[5]!==r||e[6]!==d?(u=n.jsxs("div",{className:"space-y-2",children:[r,d]}),e[5]=r,e[6]=d,e[7]=u):u=e[7];let f;e[8]!==s.ctaLabel||e[9]!==s.ctaUrl?(f=s.ctaUrl&&s.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,e[8]=s.ctaLabel,e[9]=s.ctaUrl,e[10]=f):f=e[10];const S=`/${encodeURIComponent(a)}/settings/infra-billing`;let c;e[11]!==o?(c=o("common.blockedOrgScreen.goToBilling"),e[11]=o,e[12]=c):c=e[12];let y;e[13]!==S||e[14]!==c?(y=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:S,children:c})}),e[13]=S,e[14]=c,e[15]=y):y=e[15];let h;e[16]!==o?(h=o("common.blockedOrgScreen.switchOrg"),e[16]=o,e[17]=h):h=e[17];let w;e[18]!==h?(w=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:h})}),e[18]=h,e[19]=w):w=e[19];let m;e[20]!==w||e[21]!==f||e[22]!==y?(m=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y,w]}),e[20]=w,e[21]=f,e[22]=y,e[23]=m):m=e[23];let l;return e[24]!==m||e[25]!==u?(l=n.jsxs(me,{children:[i,u,m]}),e[24]=m,e[25]=u,e[26]=l):l=e[26],l}function ko(t){const e=M.c(8);let s;e[0]!==t?(s=Ue.orgNotice(t??""),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/${t}/notice`,{credentials:"include"});return r.ok?(await r.json()).notice??null:null},e[2]=t,e[3]=a):a=e[3];const o=!!t;let i;return e[4]!==s||e[5]!==a||e[6]!==o?(i={queryKey:s,queryFn:a,enabled:o,staleTime:6e4},e[4]=s,e[5]=a,e[6]=o,e[7]=i):i=e[7],He(i)}const To="/settings/infra-billing";function No(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(To)}function _o(t){const e=M.c(7),{org:s,children:a}=t;let o;e[0]!==s.id||e[1]!==s.name?(o={id:s.id,organizationId:s.id,slug:"_org",name:s.name,ui:null},e[0]=s.id,e[1]=s.name,e[2]=o):o=e[2];const i=o;let r;return e[3]!==a||e[4]!==s||e[5]!==i?(r=n.jsx(xn,{org:s,project:i,children:a}),e[3]=a,e[4]=s,e[5]=i,e[6]=r):r=e[6],r}function Ao(){const t=Pt(),e=Jn(),{org:s}=ht(),a=mn({strict:!1}),o=Lt(),{openPanel:i,closePanel:r}=On(),d=Qn(),u=Xn(),f=Zn(),S=es(),c=(m,l=!0)=>t({to:".",search:m,replace:l}),y=()=>c(m=>({...m,sidepanel:!0})),h=(m,l,b)=>{const p=!!u&&u===m;u&&!p&&xo(u,{tab:o,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const x=p?null:wo(m),v=Et(s.id).id,T=po({prev:{virtualmcpid:d,tabId:o},virtualMcpId:l,decopilotId:v,savedLayout:x,opts:b,autosendValue:Yn});return S(m,()=>T.search,{virtualMcpId:l,view:{tabId:T.tabId}})};return{openSidePanel:y,setTaskId:h,createNewTask:async(m,l,b)=>{const p=crypto.randomUUID(),x=m??f;try{await e?.create({id:p,virtual_mcp_id:x,...l?{branch:l}:{}})}catch{}h(p,x,b)},openTab:i,closeTab:r}}const Po=new Set(["/$org/","/$org/home"]);function Co(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:Eo},t[0]=e):e=t[0],It(e)}function Eo(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&Po.has(e)}function Io(){const t=M.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=fn(e)?.params.org,[o,i]=J.useState(!1),[r,d]=Zs(),u=hn(),f=Co(),S=a??"";let c;t[1]!==S?(c=Yt(S),t[1]=S,t[2]=c):c=t[2];const y=!!a&&f;let h;t[3]!==c||t[4]!==y?(h={...c,enabled:y},t[3]=c,t[4]=y,t[5]=h):h=t[5],He(h);const{data:w}=Be.useSession(),m=w?.user?.id;let l;t[6]!==a||t[7]!==m?(l=a&&m?gn(m,a):null,t[6]=a,t[7]=m,t[8]=l):l=t[8];const b=l;let p,x;t[9]!==u?(p=()=>{const L=K=>{if(jt(K)&&K.code==="KeyK"){K.preventDefault(),Qs();return}if(K.key==="?"&&!Ks(K.target)){K.preventDefault(),i(!0);return}jt(K)&&K.code==="BracketLeft"&&u.history.canGoBack()&&(K.preventDefault(),u.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},x=[u],t[9]=u,t[10]=p,t[11]=x):(p=t[10],x=t[11]),J.useEffect(p,x);let v;t[12]!==a?(v=Ue.activeOrganization(a),t[12]=a,t[13]=v):v=t[13];let T;t[14]!==a||t[15]!==m?(T=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Be.organization.getFullOrganization({query:{organizationSlug:a}}).finally(Lo),K=lt(L);return L&&!K&&localStorage.setItem(Ke.lastOrgSlug(),a),m&&L&&yn(m,a,L),L},t[14]=a,t[15]=m,t[16]=T):T=t[16];const P=b?b.data:void 0,N=b?.updatedAt;let j;t[17]!==P||t[18]!==N||t[19]!==v||t[20]!==T?(j={queryKey:v,queryFn:T,initialData:P,initialDataUpdatedAt:N,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=P,t[18]=N,t[19]=v,t[20]=T,t[21]=j):j=t[21];const{data:g}=_t(j),_=g?.id,k=g?.slug,{data:A}=ts(_,k),I=!!A?.ssoRequired&&!A.authenticated,{data:C}=ko(k);let O;t[22]===Symbol.for("react.memo_cache_sentinel")?(O={select:Oo},t[22]=O):O=t[22];const E=It(O),D=C?.severity==="block"&&!No(E),z=_??"",B=k??"";let q;t[23]!==z||t[24]!==B?(q=Un({connectionId:Ct,orgId:z,orgSlug:B}),t[23]=z,t[24]=B,t[25]=q):q=t[25];const Y=!!_&&!!k;let ne;if(t[26]!==q||t[27]!==Y?(ne={...q,enabled:Y},t[26]=q,t[27]=Y,t[28]=ne):ne=t[28],He(ne),(!g||lt(g)||I||D)&&Xs(),!g){let L;return t[29]!==a?(L=n.jsx(ms,{orgSlug:a}),t[29]=a,t[30]=L):L=t[30],L}if(lt(g)){localStorage.getItem(Ke.lastOrgSlug())===a&&localStorage.removeItem(Ke.lastOrgSlug());let L;return t[31]!==g.name?(L=n.jsx(pn,{orgName:g.name}),t[31]=g.name,t[32]=L):L=t[32],L}if(D&&C){let L;return t[33]!==g.slug||t[34]!==C?(L=n.jsx(jo,{notice:C,orgSlug:g.slug}),t[33]=g.slug,t[34]=C,t[35]=L):L=t[35],L}if(I){let L;return t[36]!==g.id||t[37]!==g.name||t[38]!==g.slug||t[39]!==A.domain?(L=n.jsx(So,{orgId:g.id,orgSlug:g.slug,orgName:g.name,domain:A.domain}),t[36]=g.id,t[37]=g.name,t[38]=g.slug,t[39]=A.domain,t[40]=L):L=t[40],L}const te=g.logo??null;let Q;t[41]!==g||t[42]!==te?(Q={...g,logo:te},t[41]=g,t[42]=te,t[43]=Q):Q=t[43];let H;t[44]!==g?(H=n.jsx(go,{activeOrg:g}),t[44]=g,t[45]=H):H=t[45];let X;t[46]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(bn,{}),t[46]=X):X=t[46];let se;t[47]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Ms,{}),n.jsx(oo,{})]}),t[47]=se):se=t[47];let U;t[48]!==r||t[49]!==d?(U=r&&n.jsx(Vs,{open:r,onOpenChange:d}),t[48]=r,t[49]=d,t[50]=U):U=t[50];let G;t[51]!==o?(G=n.jsx(Bs,{open:o,onOpenChange:i}),t[51]=o,t[52]=G):G=t[52];let oe;t[53]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(co,{}),t[53]=oe):oe=t[53];let Z;return t[54]!==Q||t[55]!==H||t[56]!==U||t[57]!==G?(Z=n.jsxs(_o,{org:Q,children:[H,X,se,U,G,oe]}),t[54]=Q,t[55]=H,t[56]=U,t[57]=G,t[58]=Z):Z=t[58],Z}function Oo(t){return t.location.pathname}function Lo(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function $o(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Wn,{children:n.jsx(Io,{})}),t[0]=e):e=t[0],e}const mi=Object.freeze(Object.defineProperty({__proto__:null,default:$o,usePanelActions:Ao},Symbol.toStringTag,{value:"Module"}));export{V as K,fs as L,Ao as a,Es as b,jt as c,js as d,ui as e,di as f,mi as g,Kt as i,Qs as o,li as r,ci as s,ko as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,a0 as n,j as r,K as f}from"./index-doEaURqC.js";import{C as d}from"./index-D9padtMD.js";import{m as u,P as x,T as h}from"./mock-board-D9-PmaL9.js";import{F as j}from"./feature-gate-DLeaUXYN.js";import"./use-mobile-DYpKQ1eP.js";import"./thread-button-CzoAkKWi.js";import"./sidebar-Cz1S2PSM.js";import"./LayoutLeft-GBQ0rQxQ.js";import"./sheet-ZoEgH6s-.js";import"./X-vKTIsgL1.js";import"./tooltip-C91IS2ON.js";import"./index-C4LzZ3-O.js";import"./thread-route-BBKn0p1b.js";import"./use-panel-navigate-xYH0iX8e.js";import"./use-project-scope-CENQvfVc.js";import"./use-virtual-mcp-B-mdsJbn.js";import"./use-mcp-client-D2DgMGL-.js";import"./auth-D3Q2r2cz.js";import"./github-repo-BknN0SVI.js";import"./use-route-default-main-evb2BAGs.js";import"./hooks-C8t7cMQJ.js";import"./backoff-8mStPHYB.js";import"./task-board-BXLBBo-B.js";import"./schema-BVqtjcyJ.js";import"./agent-icon-CzsnrYjD.js";import"./AlertCircle-Cat-Fy2i.js";import"./Tool01-H9OcfGdq.js";import"./ArrowUp-CbPBDOpZ.js";import"./ArrowLeft-DuxVUo5_.js";import"./ArrowRight-CsoDgnUj.js";import"./XCircle-Cu2Sy8Aw.js";import"./ZoomOut-Burao8Eg.js";import"./Globe04-C_9DD9oO.js";import"./CheckCircle-Cj4PQGuv.js";import"./Check-BZXRTDaX.js";import"./ChevronUp-DGt31MPD.js";import"./UserSquare-BfT6tB5U.js";import"./Copy01-B6hr4CBg.js";import"./CreditCard01-CiYLi_pR.js";import"./DotsVertical-BITRq5d-.js";import"./Download01-CsYfHghd.js";import"./Eye-rQUtSbk6.js";import"./Share07-CMPYQYHk.js";import"./XClose-DFUqDOc8.js";import"./Image01-BLIf6uY9.js";import"./Key01-SGIR_QrT.js";import"./Link01-BnVQGp2l.js";import"./LinkExternal01-Dh0AABP8.js";import"./Monitor01-CxisI5ut.js";import"./Sun-BSFyLDhg.js";import"./Package-DsU1cU6S.js";import"./Palette-CzoNEzRs.js";import"./Plus-qASEo4cN.js";import"./SearchLg-qmi8uaeX.js";import"./SearchMd-B6NDUgzQ.js";import"./Stars01-cdnol_cb.js";import"./Trash01-mB4s-hrv.js";import"./Upload01-Uv_jtHIk.js";import"./User01-DHGCVvV3.js";import"./Users01-C_qUmfZB.js";import"./Zap-CSRFlEXK.js";import"./toolbar-icon-button-iy_uLVVB.js";import"./use-in-settings-DplznXN9.js";import"./shell-layout-BNVBlKMe.js";import"./avatar-CLf3yQhN.js";import"./download-app-dialog-7J000m-o.js";import"./dialog-C36x61_J.js";import"./command-CDaLB2Ox.js";import"./index-Byz-UaqT.js";import"./integration-icon-Crk6WRxP.js";import"./project-icon-mjklzNJs.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-DbGCmQgx.js";import"./autosend-C5knIVwo.js";import"./use-org-sso-BnqcEd47.js";import"./resizable-WgWAPECX.js";import"./route-page-header-tbVW9ntg.js";import"./drawer-CsJzOKcM.js";import"./popover-GUR8piky.js";import"./task-route-BpYPpL3v.js";import"./use-decopilot-events-x0K7Zb7m.js";import"./github-icon-CIx0jkrL.js";import"./get-initials-D-f_fDFw.js";import"./rich-text-link-control-i_tw_Jd2.js";import"./use-task-board-analytics-CElip-Jh.js";import"./combobox-B1IXE26_.js";import"./search-toggle-BtmGTpxl.js";import"./icon-button-Df-IeDHT.js";import"./repository-import-picker-B6ijLkOL.js";import"./use-navigate-to-agent-TwlhlbmB.js";import"./thread-intent-DuCE7MYG.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-Ca5oB9j5.js";import"./input-BK5Sp8hZ.js";import"./label-tAsQMZ2G.js";import"./useInfiniteQuery-DCZL7BN4.js";import"./infiniteQueryObserver-CxJm0T6_.js";import"./collection-search-BQXOJg8a.js";import"./use-debounced-value-CG2jgHBI.js";import"./use-members-C_tB-qI-.js";import"./use-org-auth-client-BkVvw_9f.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-tags-BqebMAjW.js";import"./use-organization-settings-Wh36EN0I.js";import"./breadcrumb-SXbKtw7u.js";import"./calendar-D41RMBsP.js";import"./alert-DsW1KUvt.js";import"./collapsible-eiDLfZY7.js";import"./use-copy-CGJ-16i-.js";import"./markdown-D0jNOMCX.js";import"./org-file-open-context-DodrnIMR.js";import"./index-CDAG9yf3.js";import"./gateway-client-BF14HPqj.js";import"./form-CXSt7_li.js";import"./utils-CVEq3hMx.js";import"./index-Ci3v6d1n.js";import"./hooks-enzgIMXj.js";import"./use-org-fs-Bbl2QQqg.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-connection-PgTQPnAp.js";import"./github-repo-scope-C8GSbvaz.js";import"./thread-sheet-body-C52UGBXx.js";import"./useSuspenseInfiniteQuery-C0KSbZH8.js";import"./pair-BIUMok9W.js";import"./usage-stats-P7Ebxq4V.js";import"./use-entitlements-pN-YIa6T.js";import"./chat-context-D1GbDSrr.js";import"./use-ai-providers-CJ2ga4nx.js";import"./location-oTTXFrSF.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BvLPqeD1.js";import"./types-BCbJ4Eml.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./tool-namespace-DmnQIdtF.js";import"./use-mcp-prompts-UNzUvECH.js";import"./use-thread-outputs-DldRsY9l.js";import"./file-type-icon-CFRsMAQ4.js";import"./use-infinite-scroll-Bm905rys.js";import"./task-status-C7fhyr8_.js";import"./use-open-billing-url-BrlDdS6U.js";import"./chat-draft-VYqGGS3B.js";import"./badge-DuB4cqrw.js";import"./separator-JATiwE_2.js";import"./feature-paywall-lhh7GOr7.js";import"./plan-ladder-DjuDG4EH.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function ir(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{ir as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o,l,j as n}from"./index-doEaURqC.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-[var(--studio-input-background)] px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ai as ot,ac as st,c as it,b as rt,u as ct,a0 as lt,d_ as dt,d$ as pt,e0 as we,e1 as Ce,ad as mt,ab as Se,e2 as ut,e3 as ft,r as ce,dJ as bt,C as Me,e4 as Tt,e5 as It}from"./index-doEaURqC.js";import{u as vt}from"./use-route-default-main-evb2BAGs.js";import{a as gt,i as Ae}from"./Share07-CMPYQYHk.js";import{i as kt}from"./Monitor01-CxisI5ut.js";import{u as yt}from"./use-connection-PgTQPnAp.js";import{b as ht}from"./use-mcp-client-D2DgMGL-.js";import{u as Pt}from"./use-mcp-tools-CtMvHJK9.js";import{a as wt}from"./use-virtual-mcp-B-mdsJbn.js";import{g as Ct}from"./types-BCbJ4Eml.js";import{t as St}from"./utils-CVEq3hMx.js";import{d as Mt,u as Vt,b as B}from"./use-project-scope-CENQvfVc.js";import"./index-DC9_5qIh.js";import{g as Rt,a as At}from"./github-repo-BknN0SVI.js";import{d as Nt}from"./use-navigate-to-agent-TwlhlbmB.js";import{c as Dt,d as $t}from"./sandbox-lifecycle-context-CvyFr09R.js";import{F as Ve}from"./file-type-icon-CFRsMAQ4.js";import{a as jt,u as xt}from"./use-panel-navigate-xYH0iX8e.js";import{j as Ut,f as Et,aB as Ht,d as Ot,aI as Ft,g as Bt,aJ as Lt,a5 as Gt}from"./agent-icon-CzsnrYjD.js";import{f as Kt}from"./XCircle-Cu2Sy8Aw.js";import{i as Jt}from"./ZoomOut-Burao8Eg.js";import{a as Qt}from"./Package-DsU1cU6S.js";import{u as _t}from"./use-task-metadata-Dhub_XGT.js";import{i as Wt,r as Yt,s as qt}from"./shell-layout-BNVBlKMe.js";import{u as zt}from"./use-session-runtime-COugfsOm.js";import{u as Xt}from"./use-is-desktop-app-BNujXJc_.js";import{u as Zt}from"./use-organization-settings-Wh36EN0I.js";import{b as en,u as tn,c as nn,d as an,f as on}from"./use-project-native-view-presence-U59DT0hQ.js";import{b as sn}from"./chat-context-D1GbDSrr.js";import{r as rn}from"./virtual-mcp-Bj7Y16hO.js";const Ne={overview:Bt,settings:Ft,automations:Ot,"site-editor":Ae,code:Ht,content:Jt,assets:Qt,hosting:st,e2e:Kt,analytics:Et,cdn:Ut,git:ot,files:gt};function cn(n){return n in Ne}function Re(n){const e=Lt(n);if(e.type==="icon"){const s=Gt(e.name);return s?{kind:"component",Component:s}:null}return e.type==="url"?{kind:"url",src:e.url}:null}function L(n){if(n.kind==="system")return cn(n.tabId)?{kind:"component",Component:Ne[n.tabId]}:{kind:"fallback"};const e=Re(n.iconUrl);if(e)return e;if(!n.appId)return{kind:"fallback"};const s=n.connections.find(I=>I.id===n.appId);if(!s)return{kind:"fallback"};const c=Re(s.icon);return c||{kind:"fallback"}}function ln(n,e){return!!n&&!!e&&e===`thread:${n}`}function dn(n){return n.threadHasRepo?"repo":ln(n.threadId,n.sandboxBranch)?"none":n.agentHasRepo?"repo":"none"}function Kn(n){const e=it.c(52),s=rt(),{openPanel:c,closePanel:I}=jt();let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={strict:!1},e[0]=y):y=e[0];const De=ct(y),le=xt(),de=vt(),i=wt(n.virtualMcpId),h=_t(n.taskId),{org:o}=lt(),{currentBranch:pe,activeTask:P}=sn(),me=Xt();let l,p,m,u,w;e[1]!==i||e[2]!==o.id||e[3]!==o.slug?(l=Rt(i),w=Nt,p=o.id,m=o.slug,u=At(l),e[1]=i,e[2]=o.id,e[3]=o.slug,e[4]=l,e[5]=p,e[6]=m,e[7]=u,e[8]=w):(l=e[4],p=e[5],m=e[6],u=e[7],w=e[8]);const G=l?.owner??"",K=l?.name??"",J=l?pe:null;let C;e[9]!==p||e[10]!==m||e[11]!==u||e[12]!==G||e[13]!==K||e[14]!==J?(C={orgId:p,orgSlug:m,target:u,owner:G,repo:K,branch:J},e[9]=p,e[10]=m,e[11]=u,e[12]=G,e[13]=K,e[14]=J,e[15]=C):C=e[15];const S=w(C),$e=S.data?.state==="open",v=i?.metadata.ui?.layout??null,f=v?.tabs??[],g=i?.id?dt(i.id):null,M=h?.expanded_tools??[],je=Mt(i),V=Zt(),{scopeId:xe,project:Ue}=Vt(),Q=en(xe,Ue,i),_=tn(Q.project),ue=nn(Q.resolvedScopeId,B(Q.project?.metadata),_.presence);let R;e[16]===Symbol.for("react.memo_cache_sentinel")?(R={includeVirtual:!0},e[16]=R):R=e[16];const b=yt(R),Ee=Dt(),{vmEntry:fe,previewUrl:be}=$t(),W=P?.branch??pe;let A;e[17]!==P?.metadata||e[18]!==n.taskId||e[19]!==i?.metadata||e[20]!==h||e[21]!==W?(A=dn({threadId:n.taskId,sandboxBranch:W,agentHasRepo:B(i?.metadata),threadHasRepo:B(h)||B(P?.metadata)}),e[17]=P?.metadata,e[18]=n.taskId,e[19]=i?.metadata,e[20]=h,e[21]=W,e[22]=A):A=e[22];const He=A,Te=Ee.lifecycle.phase==="running",{runtime:Oe,resolved:Ie}=zt(n.virtualMcpId);let N;e[23]!==me||e[24]!==be||e[25]!==fe?(N=void 0,e[23]=me,e[24]=be,e[25]=fe,e[26]=N):N=e[26];const Fe=N,ve=ht({connectionId:g??void 0,orgId:o.id,orgSlug:o.slug,mcpUrl:Fe}),Y=ve,q=!!ve&&Te;let D;e[27]!==Y||e[28]!==q?(D={client:Y,enabled:q},e[27]=Y,e[28]=q,e[29]=D):D=e[29];const{data:Be}=Pt(D),ge=g&&Te?(Be?.tools??[]).filter(fn).map(t=>({connectionId:g,toolName:t.name,label:St(t.name),icon:null})):[],z=ge[0],Le=z?ge:[],k=z&&g?{type:"ext-apps",id:g,toolName:z.toolName}:v?.defaultMainView??null,Ge=rn(v),ke={assets:_.assetsPending,siteAccess:_.siteAccessPending},{activeTab:d,mainOpen:Ke}=pt({panelTabId:le,mainPanelParam:De.mainpanel,routeDefaultMain:de,metadata:k||v?{defaultMainView:k,tabs:f.map(un)}:null}),X=je&&($e||S.isPending&&d==="git"),Je=k||v?{defaultMainView:k,tabs:f.map(mn)}:null,$=Yt({hasSource:He==="repo"||V,runtime:Oe,cmsMode:Ge}),Qe=$.includes("content"),_e=we(Je),We=k?.type,ye=an(We,ue,ke,$,Ie),j=ye?we(null):_e,Ye=on(d,ue,ke),qe=!$.includes("code")&&Ie&&Ce(d)!==null,a=!le&&!de&&ye||d==="git"&&!X&&!S.isPending||d==="content"&&!Qe||qe||Ye?j:d,T=d==="git"&&!X&&!S.isPending?!1:Ke,Z=mt(a);let x;e[30]!==s?(x=t=>s(t==="site-editor"?"common.mainPanelTabs.preview":t==="content"?"common.mainPanelTabs.content":"common.mainPanelTabs.code"),e[30]=s,e[31]=x):x=e[31];const ze=x,he=[];X&&he.push({id:"git",title:s("common.mainPanelTabs.reviewChanges")});const ee=new Map;for(const t of M){const r=Se(t.appId,t.toolName);ee.set(r,{id:r,title:t.toolName,appId:t.appId,iconKey:t.toolName})}for(const t of Le){if(t.toolName==="fetch_assets")continue;const r=Se(t.connectionId,t.toolName);ee.set(r,{id:r,title:t.label||t.toolName,appId:t.connectionId,iconKey:t.toolName,iconUrl:t.icon??null})}const te=ut(a),ne=te?te.key.split("/").pop()??te.key:null,Xe=ne?[{id:a,title:ne,kind:"file",icon:{kind:"component",Component:t=>ce.createElement(Ve,{filename:ne,...t})}}]:[],U=ft(a),Ze=U?[{id:a,title:(U.path.split("/").pop()??U.path).replace(/\.html$/i,""),kind:"file",icon:{kind:"component",Component:t=>ce.createElement(U.path.startsWith("pages/")?Ae:kt,t)}}]:[],ae=bt(a),oe=ae?ae.path.split("/").pop()??ae.path:null,et=oe?[{id:a,title:oe,kind:"file",icon:{kind:"component",Component:t=>ce.createElement(Ve,{filename:oe,...t})}}]:[],tt=Wt(a)?$.map(t=>({id:t==="code"&&Ce(a)?a:t,title:ze(t),kind:"system",icon:L({tabId:t,kind:"system",connections:b})})):[];let E;e[32]!==b?(E=t=>({id:Tt(t.id),title:t.title,kind:"agent",icon:L({tabId:t.id,kind:"agent",appId:t.view.appId,connections:b})}),e[32]=b,e[33]=E):E=e[33];const nt=[...tt,...he.map(t=>({id:t.id,title:t.title,kind:"system",icon:L({tabId:t.id,kind:"system",connections:b})})),...Xe,...Ze,...et,...f.map(E),...Array.from(ee.values()).map(t=>({id:t.id,title:t.title,kind:"expanded",icon:L({tabId:t.iconKey,kind:"expanded",appId:t.appId,iconUrl:t.iconUrl,connections:b})}))],Pe=new Set,se=nt.filter(t=>Pe.has(t.id)?!1:(Pe.add(t.id),!0)),at=n.virtualMcpId;let H;e[34]!==o.id?(H=Me(o.id),e[34]=o.id,e[35]=H):H=e[35];const ie=at===H;let O;e[36]!==a||e[37]!==I||e[38]!==T||e[39]!==ie||e[40]!==c||e[41]!==o.id||e[42]!==V?(O=t=>{if(qt({reportsOnly:V,onReportAgent:ie,tabId:t})){c(t,{virtualmcpid:Me(o.id),search:pn});return}const r=It({clickedId:t,activeTab:a,mainOpen:T});"close"in r?I():c(r.tabId)},e[36]=a,e[37]=I,e[38]=T,e[39]=ie,e[40]=c,e[41]=o.id,e[42]=V,e[43]=O):O=e[43];const re=O;let F;return e[44]!==a||e[45]!==Z||e[46]!==M||e[47]!==f||e[48]!==T||e[49]!==re||e[50]!==se?(F={activeTab:a,mainOpen:T,setActiveTab:re,layoutTabs:f,expandedTools:M,automationTabParsed:Z,tabs:se},e[44]=a,e[45]=Z,e[46]=M,e[47]=f,e[48]=T,e[49]=re,e[50]=se,e[51]=F):F=e[51],F}function pn(n){return{...n,thread:void 0}}function mn(n){return{id:n.id}}function un(n){return{id:n.id}}function fn(n){return!!Ct(n._meta)}export{dn as r,Kn as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as D,b as Q,r as g,j as r,Z,l as Y}from"./index-doEaURqC.js";import{c as J}from"./UserSquare-BfT6tB5U.js";import{z as K}from"./agent-icon-CzsnrYjD.js";import{i as ee}from"./SearchMd-B6NDUgzQ.js";import{D as te,b as re,d as se,c as le}from"./dialog-C36x61_J.js";import{I as oe}from"./input-BK5Sp8hZ.js";import{V as ie,k as ne,W as ce,G as ae}from"./claim-phase-copy-0btUuJoC.js";import{d as H,r as fe}from"./section-preview-url-Csj0_ZDg.js";import{u as ue}from"./use-session-runtime-COugfsOm.js";const de=12,z=new Set,q=new Set;function me(){for(const s of q)s()}function ve(s){return z.has(s)?!0:z.size>=de?!1:(z.add(s),!0)}function X(s){z.delete(s)&&me()}function pe(s){return q.add(s),()=>{q.delete(s)}}function xe(s,e){const t=g.useRef(!1),[m,i]=g.useState(!1),o=g.useRef(null),u=g.useRef(null),d=g.useRef(null),l=g.useRef(s);l.current=s;const[f]=g.useState(()=>{const c=()=>{d.current?.(),d.current=null},a=()=>t.current?!0:ve(e)?(t.current=!0,i(!0),c(),!0):!1;return n=>{if(u.current=n,o.current&&(o.current.disconnect(),o.current=null),c(),!n){t.current&&(X(e),t.current=!1,i(!1));return}queueMicrotask(()=>{if(u.current!==n)return;const h=new IntersectionObserver(v=>{if(v[0]?.isIntersecting??!1){!a()&&!d.current&&(d.current=pe(()=>{u.current===n&&a()}));return}c(),t.current&&(X(e),t.current=!1,i(!1))},{root:l.current.current,rootMargin:"160px 0px"});h.observe(n),o.current=h})}});return{ref:f,iframeActive:m}}function he(s){const e=D.c(9),{previewUrl:t,title:m,scrollRootRef:i,slotId:o}=s,{ref:u,iframeActive:d}=xe(i,o),[l,f]=g.useState(!1),c=Z()?J:K;let a;e[0]!==c||e[1]!==d||e[2]!==l||e[3]!==t||e[4]!==m?(a=d?r.jsxs(r.Fragment,{children:[!l&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:r.jsx(c,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),r.jsx("iframe",{src:t,title:`Preview ${m}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>f(!0)})]}):r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(c,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=c,e[1]=d,e[2]=l,e[3]=t,e[4]=m,e[5]=a):a=e[5];let n;return e[6]!==u||e[7]!==a?(n=r.jsx("div",{ref:u,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:a}),e[6]=u,e[7]=a,e[8]=n):n=e[8],n}function we(s){const e=D.c(27),{entry:t,previewUrl:m,scrollRootRef:i,onSelect:o}=s,u=Z()?J:K,d=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let l;e[0]!==d?(l=Y("group flex flex-col overflow-hidden rounded-lg border bg-card text-left transition-colors","hover:border-primary/40 hover:bg-accent/30",d),e[0]=d,e[1]=l):l=e[1];let f;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==m||e[5]!==i?(f=r.jsx(he,{previewUrl:m,title:t.title,scrollRootRef:i,slotId:t.resolveType}),e[2]=t.resolveType,e[3]=t.title,e[4]=m,e[5]=i,e[6]=f):f=e[6];let c;e[7]!==t.isSavedBlock?(c=t.isSavedBlock?{color:ae}:void 0,e[7]=t.isSavedBlock,e[8]=c):c=e[8];let a;e[9]!==u||e[10]!==c?(a=r.jsx(u,{className:"h-4 w-4 shrink-0",style:c}),e[9]=u,e[10]=c,e[11]=a):a=e[11];let n;e[12]!==t.title?(n=r.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[12]=t.title,e[13]=n):n=e[13];let h;e[14]!==t.description?(h=t.description&&r.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[14]=t.description,e[15]=h):h=e[15];let v;e[16]!==n||e[17]!==h?(v=r.jsxs("div",{className:"min-w-0 flex-1",children:[n,h]}),e[16]=n,e[17]=h,e[18]=v):v=e[18];let p;e[19]!==a||e[20]!==v?(p=r.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[a,v]}),e[19]=a,e[20]=v,e[21]=p):p=e[21];let w;return e[22]!==o||e[23]!==l||e[24]!==f||e[25]!==p?(w=r.jsxs("button",{type:"button",onClick:o,className:l,children:[f,p]}),e[22]=o,e[23]=l,e[24]=f,e[25]=p,e[26]=w):w=e[26],w}function Ie(s){const e=D.c(51),{open:t,onOpenChange:m,meta:i,decofile:o,previewBaseUrl:u,onSelect:d}=s,l=Q(),[f,c]=g.useState(""),[a,n]=g.useState(t),h=g.useRef(null);t!==a&&(n(t),t&&c(""));let v,p,w,b,j,y,N,R,S,C,P;if(e[0]!==o||e[1]!==i||e[2]!==m||e[3]!==d||e[4]!==t||e[5]!==u||e[6]!==f||e[7]!==l){const W=t&&i&&o?ie(i,o):[],_=i?ne(i):"",F=o?ce(o):void 0,G=new Map;if(t&&_)for(const x of W)G.set(x.resolveType,H(u,_,x.previewBlock,F));const M=f.trim().toLowerCase(),V=M?W.filter(x=>x.title.toLowerCase().includes(M)||x.resolveType.toLowerCase().includes(M)||x.description?.toLowerCase().includes(M)):W;p=te,C=t,P=m,v=re,N="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let U;e[19]!==l?(U=l("sectionsEditor.addSectionModal.title"),e[19]=l,e[20]=U):U=e[20];let A;e[21]!==U?(A=r.jsx(se,{children:U}),e[21]=U,e[22]=A):A=e[22];let O;e[23]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(ee,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=O):O=e[23];let $;e[24]===Symbol.for("react.memo_cache_sentinel")?($=x=>c(x.target.value),e[24]=$):$=e[24];let B;e[25]!==l?(B=l("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=l,e[26]=B):B=e[26];let k;e[27]!==f||e[28]!==B?(k=r.jsxs("div",{className:"relative pt-2",children:[O,r.jsx(oe,{value:f,onChange:$,placeholder:B,className:"h-9 pl-8"})]}),e[27]=f,e[28]=B,e[29]=k):k=e[29],e[30]!==A||e[31]!==k?(S=r.jsxs(le,{className:"shrink-0 border-b px-4 py-3 text-left",children:[A,k]}),e[30]=A,e[31]=k,e[32]=S):S=e[32],j=h,y="min-h-0 flex-1 overflow-y-auto",w="p-4",b=V.length===0?r.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:l("sectionsEditor.addSectionModal.noSectionsFound")}):r.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:V.map(x=>r.jsx(we,{entry:x,scrollRootRef:h,previewUrl:G.get(x.resolveType)??H(u,_,x.previewBlock,F),onSelect:()=>d(x)},x.resolveType))}),e[0]=o,e[1]=i,e[2]=m,e[3]=d,e[4]=t,e[5]=u,e[6]=f,e[7]=l,e[8]=v,e[9]=p,e[10]=w,e[11]=b,e[12]=j,e[13]=y,e[14]=N,e[15]=R,e[16]=S,e[17]=C,e[18]=P}else v=e[8],p=e[9],w=e[10],b=e[11],j=e[12],y=e[13],N=e[14],R=e[15],S=e[16],C=e[17],P=e[18];let I;e[33]!==w||e[34]!==b?(I=r.jsx("div",{className:w,children:b}),e[33]=w,e[34]=b,e[35]=I):I=e[35];let T;e[36]!==I||e[37]!==j||e[38]!==y?(T=r.jsx("div",{ref:j,className:y,children:I}),e[36]=I,e[37]=j,e[38]=y,e[39]=T):T=e[39];let L;e[40]!==v||e[41]!==T||e[42]!==N||e[43]!==R||e[44]!==S?(L=r.jsxs(v,{closeButtonClassName:N,className:R,children:[S,T]}),e[40]=v,e[41]=T,e[42]=N,e[43]=R,e[44]=S,e[45]=L):L=e[45];let E;return e[46]!==p||e[47]!==L||e[48]!==C||e[49]!==P?(E=r.jsx(p,{open:C,onOpenChange:P,children:L}),e[46]=p,e[47]=L,e[48]=C,e[49]=P,e[50]=E):E=e[50],E}function Te(s){const e=D.c(4),{previewServerUrl:t,runtime:m}=ue(s.virtualMcpId),i=m==="cms";let o;return e[0]!==i||e[1]!==s.sandboxUrl||e[2]!==t?(o=fe({sandboxUrl:s.sandboxUrl,previewServerUrl:t,fastPreviewActive:i}),e[0]=i,e[1]=s.sandboxUrl,e[2]=t,e[3]=o):o=e[3],o}export{Ie as A,Te as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-CxJm0T6_.js";import{dG as i}from"./index-doEaURqC.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./infiniteQueryObserver-CxJm0T6_.js";import{dG as u,di as n}from"./index-doEaURqC.js";function i(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{i as u};
|