decocms 4.584.6 → 4.584.8
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-CPiOwWun.js → AlertCircle-BFB3gUiV.js} +1 -1
- package/dist/client/assets/{AreaChart-DviRRHwS.js → AreaChart-CtLlhOXD.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BmNyLgKT.js → ArrowLeft-COkdcH40.js} +1 -1
- package/dist/client/assets/{ArrowRight-eaR9pEFa.js → ArrowRight-C8DC__KS.js} +1 -1
- package/dist/client/assets/{ArrowUp-jEyjY7ti.js → ArrowUp-DxQTcOKq.js} +1 -1
- package/dist/client/assets/{BookOpen01-anezSoTd.js → BookOpen01-CeeutiP7.js} +1 -1
- package/dist/client/assets/{CartesianChart-CCoStszf.js → CartesianChart-CiiHjD5L.js} +1 -1
- package/dist/client/assets/{CategoricalChart-D4s5JRnh.js → CategoricalChart-8F960gzG.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cyt1BwLE.js → CheckCircle-1_ngPRl0.js} +1 -1
- package/dist/client/assets/{ChevronDown-DHu3fSw0.js → ChevronDown-DtfpNfYi.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CADaAEiD.js → ChevronSelectorVertical-l40jkbdg.js} +1 -1
- package/dist/client/assets/{ChevronUp-XsNgN3o9.js → ChevronUp-CBIKlFGV.js} +1 -1
- package/dist/client/assets/{CreditCard01-Cu1-B7H4.js → CreditCard01-WHBJntMv.js} +1 -1
- package/dist/client/assets/{Eye-w_JiO-fJ.js → Eye-DWY2fSAh.js} +1 -1
- package/dist/client/assets/{File02-CG-VTATo.js → File02-BRT-Ew93.js} +1 -1
- package/dist/client/assets/{Globe04-OpdFYH01.js → Globe04-B3fhAFqq.js} +1 -1
- package/dist/client/assets/{Image01-Y2lD5lzL.js → Image01-DMG8Qkz6.js} +1 -1
- package/dist/client/assets/{Key01-BzZWEKIv.js → Key01-Ay1sjQwx.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BRKXPCjt.js → LayoutLeft-DcQL0isk.js} +1 -1
- package/dist/client/assets/{LinkBroken01-oT9QqlUI.js → LinkBroken01-DPGpUNPc.js} +1 -1
- package/dist/client/assets/{MessageCircle01-Ccsb6qrK.js → MessageCircle01-CSCCnWCH.js} +1 -1
- package/dist/client/assets/{Minus-CqZyDWGo.js → Minus-5A9Ep-MV.js} +1 -1
- package/dist/client/assets/{Monitor01-BwGctKTP.js → Monitor01-DfRrojp6.js} +1 -1
- package/dist/client/assets/{Play-CBJR-IvJ.js → Play-CdyPk_4c.js} +1 -1
- package/dist/client/assets/{Plus-INbg-jHc.js → Plus-CqQu5mgz.js} +1 -1
- package/dist/client/assets/{ReferenceLine-xYjCzhRl.js → ReferenceLine-B1WAFRZT.js} +1 -1
- package/dist/client/assets/{SearchMd-zyGFO7cc.js → SearchMd-C4Y8JUHD.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DM_RSubP.js → ShoppingBag01-gV23Gp7o.js} +1 -1
- package/dist/client/assets/{Sun-DjNmeFt2.js → Sun-DwP6zl8a.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Cfysn-sK.js → SwitchHorizontal01-BhqLp2b4.js} +1 -1
- package/dist/client/assets/{Tool01-BR1SF2OD.js → Tool01-CHVyNhSa.js} +1 -1
- package/dist/client/assets/{Tooltip-A8NJxZe2.js → Tooltip-BIpYDBqK.js} +1 -1
- package/dist/client/assets/{Trash01-thCRPjRX.js → Trash01-5lm3icl_.js} +1 -1
- package/dist/client/assets/{TrendUp01-PuhB09lM.js → TrendUp01-BMksza7F.js} +1 -1
- package/dist/client/assets/{Upload01-phZoBZ05.js → Upload01-CCxJ0UkL.js} +1 -1
- package/dist/client/assets/{UserCheck01-D6gLgI3l.js → UserCheck01-zn64v-Hm.js} +1 -1
- package/dist/client/assets/{UserSquare-BHfTOZb7.js → UserSquare-CS1IJ6qv.js} +1 -1
- package/dist/client/assets/{Users01-DVJrVMQW.js → Users01-Bh3HzgRt.js} +1 -1
- package/dist/client/assets/{XClose-_lsllZaX.js → XClose-BxDeuAmz.js} +1 -1
- package/dist/client/assets/{Zap-B4USkjaG.js → Zap-5QmdSYw7.js} +1 -1
- package/dist/client/assets/{access-gate-BNdHKm1_.js → access-gate-0Jmj2nnF.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-6UuPoub8.js → add-connection-dialog-BZuOUiYS.js} +1 -1
- package/dist/client/assets/agent-app-vTHDRIso.js +1 -0
- package/dist/client/assets/agent-assets-D326Iw76.js +1 -0
- package/dist/client/assets/{agent-automation-v65X1xNt.js → agent-automation-Zq1iQa6E.js} +1 -1
- package/dist/client/assets/{agent-automations-BeeN_BVh.js → agent-automations-h2xseLzk.js} +1 -1
- package/dist/client/assets/{agent-blog-BFEHxit4.js → agent-blog-CqbruziI.js} +2 -2
- package/dist/client/assets/{agent-blog-post-B1rvGpYz.js → agent-blog-post-Ddh1HYdV.js} +2 -2
- package/dist/client/assets/{agent-calendar-DBKIf8Hf.js → agent-calendar-BnRSyoH6.js} +1 -1
- package/dist/client/assets/{agent-capabilities-BTvAxwai.js → agent-capabilities-0q_PEaRd.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DaR7U6rn.js → agent-connect-sources-BdQWUfVh.js} +1 -1
- package/dist/client/assets/agent-deck-4o03U5dB.js +1 -0
- package/dist/client/assets/{agent-e2e-110pSWXT.js → agent-e2e-Cq5tFrN7.js} +1 -1
- package/dist/client/assets/agent-experiments-DaFnmI0P.js +1 -0
- package/dist/client/assets/agent-file-CFjzC_4I.js +1 -0
- package/dist/client/assets/{agent-hosting-De3hAgD0.js → agent-hosting-Bh96XN9S.js} +1 -1
- package/dist/client/assets/{agent-icon-BHVUedtV.js → agent-icon-1vUJELUc.js} +1 -1
- package/dist/client/assets/agent-library-file-BEfsQe5S.js +1 -0
- package/dist/client/assets/agent-library-rMP1wbu3.js +1 -0
- package/dist/client/assets/agent-overview-BTE3fexE.js +1 -0
- package/dist/client/assets/{agent-releases-DughmMr9.js → agent-releases-S4GqVssW.js} +1 -1
- package/dist/client/assets/agent-settings-zMaCCiSD.js +1 -0
- package/dist/client/assets/{agent-site-editor-CkKxXUCS.js → agent-site-editor-DlcsAgpa.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DyA6MjKp.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CCu238VK.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-BrhlNc4-.js +1 -0
- package/dist/client/assets/agent-view-DfmcDJUz.js +1 -0
- package/dist/client/assets/{agent-view-guard-_mDgSmkI.js → agent-view-guard-DyT-WkNT.js} +1 -1
- package/dist/client/assets/{ai-providers-Cxi9FSbe.js → ai-providers-Bw3br-ax.js} +1 -1
- package/dist/client/assets/{alert-DxQDfLz2.js → alert-DsgJtvps.js} +1 -1
- package/dist/client/assets/{analytics-sections-Dh2b8_pn.js → analytics-sections-DgS12h3K.js} +1 -1
- package/dist/client/assets/{api-keys-Be2yLPsn.js → api-keys-B85336pg.js} +1 -1
- package/dist/client/assets/api-keys-D0jpT3cR.js +1 -0
- package/dist/client/assets/{app-editor-QhVYHGub.js → app-editor-DEHAMUHX.js} +1 -1
- package/dist/client/assets/asset-utils-c61YtAGu.js +1 -0
- package/dist/client/assets/{auth-Bl-k7r97.js → auth-CUfTA8T0.js} +1 -1
- package/dist/client/assets/{auth-catchall-ByvekoyT.js → auth-catchall-BAxpUTXQ.js} +1 -1
- package/dist/client/assets/{auth-entry-BPxiAcBl.js → auth-entry-BoGMbivW.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DgG0w0d3.js → auth-split-layout-BWd0h7zG.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-C1fZAYJ2.js → authenticate-and-persist-oauth-COv8FkOt.js} +1 -1
- package/dist/client/assets/{automation-list-row-B3jZpRQS.js → automation-list-row-DGcCh8CU.js} +1 -1
- package/dist/client/assets/{automation-runs-TDsSFV6_.js → automation-runs-CIDR0-o_.js} +1 -1
- package/dist/client/assets/{automations-DFpmHeuU.js → automations-DNvrCNx5.js} +1 -1
- package/dist/client/assets/{badge-D21Nz4Kd.js → badge-Pf9QzxnK.js} +1 -1
- package/dist/client/assets/{block-document-DPaNpm7b.js → block-document-C1uCTvtU.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-C1jP5wlw.js → blocks-preview-workspace-context-BmruAU8L.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CRdiUDZv.js → blocks-tab-states-CiP5NKqR.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DuOaesBL.js → blog-preview-url-DrSNdo24.js} +1 -1
- package/dist/client/assets/{blog-schema-DejZvpsz.js → blog-schema-CkFIU4SR.js} +1 -1
- package/dist/client/assets/{blog-source-gate-BE11jy2O.js → blog-source-gate-XOwqt3qa.js} +1 -1
- package/dist/client/assets/{blog-view-gate-CbTFiiJR.js → blog-view-gate-7VsxrHvA.js} +1 -1
- package/dist/client/assets/{buckets-BoV3lkvR.js → buckets-BtmcJWhS.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-B4DjxnO3.js → build-improve-prompt-doc-c_dRj9p0.js} +1 -1
- package/dist/client/assets/{calendar-DBDouA4h.js → calendar-Ccf2VAnj.js} +1 -1
- package/dist/client/assets/{capability-load-error-Bn6ne_sq.js → capability-load-error-DnjuDOX-.js} +1 -1
- package/dist/client/assets/{category-editor-Ckuu4IrY.js → category-editor-DG8ZyyVc.js} +1 -1
- package/dist/client/assets/{category-tree-DA278Cug.js → category-tree-CiYjKN9r.js} +1 -1
- package/dist/client/assets/{chart-B0Dqhb4y.js → chart-vEWm-9uz.js} +1 -1
- package/dist/client/assets/{chat-context-CN0ge7G_.js → chat-context-DRgQoOPX.js} +1 -1
- package/dist/client/assets/{chat-draft-2YOnJD42.js → chat-draft-e-CMA-qe.js} +1 -1
- package/dist/client/assets/{checkbox-B1iPgrjx.js → checkbox-CydUHtJN.js} +1 -1
- package/dist/client/assets/{choose-editor-Di3gRusv.js → choose-editor-YR1zSpeG.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CgfmAJWB.js → cli-auth-success-Cq3254v5.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-D1TcT96z.js → cms-settings-editor-CF3ajtdS.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-u7ki7lCC.js → cms-store-drafts-DvTKntFL.js} +1 -1
- package/dist/client/assets/{collapsible-Cw6OK2nn.js → collapsible-jmkXcnQa.js} +1 -1
- package/dist/client/assets/{collection-detail-B-bIqzEz.js → collection-detail-Cq0EjLw2.js} +1 -1
- package/dist/client/assets/{collection-display-button-CuVi5neC.js → collection-display-button-BdAaSo2Z.js} +1 -1
- package/dist/client/assets/{collection-search-Z4PinuXc.js → collection-search-D8o4j-uq.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-8J2sfJZU.js → collection-table-wrapper-CRrPq-Hv.js} +1 -1
- package/dist/client/assets/{collection-tabs-attgS7fY.js → collection-tabs-B5l6em52.js} +1 -1
- package/dist/client/assets/{combobox-DEB0BlzS.js → combobox-DkjgY2xJ.js} +1 -1
- package/dist/client/assets/{command-_zJuKDCi.js → command-CQ-JRvpy.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DGVC3-Wp.js → companion-mcps-section-DoHAGrNA.js} +1 -1
- package/dist/client/assets/{config-BATJRdlj.js → config-XRcanAcE.js} +1 -1
- package/dist/client/assets/{connect-key-68KXBKIV.js → connect-key-B8JwdxY_.js} +1 -1
- package/dist/client/assets/{connect-layout-B8CasJUP.js → connect-layout-D1rW31jg.js} +1 -1
- package/dist/client/assets/{connect-Dmfr5UlW.js → connect-rxprssIL.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-Czz2ct9m.js → connect-source-dialog-Bd1uT1tp.js} +1 -1
- package/dist/client/assets/{connection-DbiyGcIj.js → connection-C6x0X_hB.js} +1 -1
- package/dist/client/assets/{connection-card-Cm_8ZjFM.js → connection-card-BdEf2ezM.js} +1 -1
- package/dist/client/assets/{connection-detail-B2CQl_iE.js → connection-detail-DbT9wYtT.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Bf8srwIN.js → connection-form-helpers-Lbv4VYrx.js} +1 -1
- package/dist/client/assets/{connection-slug-BFmtX8Pj.js → connection-slug-DPwoP1bG.js} +1 -1
- package/dist/client/assets/{connections-DVLBrRQx.js → connections-CJDQO2CH.js} +1 -1
- package/dist/client/assets/{content-tab-B2Ay_G8-.js → content-tab-C3FRo_ZL.js} +3 -3
- package/dist/client/assets/{context-a4VYLopJ.js → context-D6DmhOWq.js} +1 -1
- package/dist/client/assets/{context-menu-DkzmRTYN.js → context-menu-KBaVqVLo.js} +1 -1
- package/dist/client/assets/{context-shell-C0Osmy2y.js → context-shell-2585iNPl.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-sc0Ji-Lm.js → create-organization-dialog-CM_3UeQq.js} +1 -1
- package/dist/client/assets/{daily-pulse-Cug1zKXO.js → daily-pulse-pmTvSIcA.js} +1 -1
- package/dist/client/assets/{delete-copy-oEZ7hmoE.js → delete-copy-GRC3nQ3b.js} +1 -1
- package/dist/client/assets/{device-hint-0Up2oNr2.js → device-hint-CVKHXMaf.js} +1 -1
- package/dist/client/assets/{discover-BbnMDogo.js → discover-C4suMPso.js} +1 -1
- package/dist/client/assets/{domain-settings-A82VOj7n.js → domain-settings-BziyEdMC.js} +1 -1
- package/dist/client/assets/{drawer-GUKur5v4.js → drawer-DMjzv7kx.js} +1 -1
- package/dist/client/assets/{editor-DFpyUa_U.js → editor-DJoO1oTe.js} +1 -1
- package/dist/client/assets/{editor-classes-BrZH4rK_.js → editor-classes-DxbZdxNb.js} +1 -1
- package/dist/client/assets/{empty-message-pNIo6swu.js → empty-message-Hjqfctaj.js} +1 -1
- package/dist/client/assets/{empty-state-BlGH7QIy.js → empty-state-E3drTKwx.js} +1 -1
- package/dist/client/assets/{empty-state-BO8_YMfm.js → empty-state-fOAZ4i_4.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-N83ua-pV.js → experiments-tab-choice-qOWGWOFZ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CZ3WadBx.js → extract-connection-data-CjEe1MWg.js} +1 -1
- package/dist/client/assets/{feature-gate-CmVeJQy1.js → feature-gate-Cbex1En9.js} +1 -1
- package/dist/client/assets/{feature-paywall-CxB3q7CQ.js → feature-paywall-BknhXLyt.js} +1 -1
- package/dist/client/assets/{file-explorer-DEJ_qRIq.js → file-explorer-Ks63f54D.js} +1 -1
- package/dist/client/assets/{file-preview-D0PiXMMr.js → file-preview-CnBl6QdJ.js} +1 -1
- package/dist/client/assets/{file-share-button-CTn6vuhs.js → file-share-button-CDiroXKh.js} +1 -1
- package/dist/client/assets/{file-type-icon-BoZOJHAX.js → file-type-icon-K1SpBuav.js} +1 -1
- package/dist/client/assets/{folder-icon-Db4s-PbL.js → folder-icon-CGCVTlP4.js} +1 -1
- package/dist/client/assets/{form-CAsgx2CK.js → form-CWRcWXN_.js} +1 -1
- package/dist/client/assets/{frame-navigation-BzE9s8s7.js → frame-navigation-pEGrcqBB.js} +1 -1
- package/dist/client/assets/{gateway-client-zNeoWGKO.js → gateway-client-qrgHo9X7.js} +1 -1
- package/dist/client/assets/{general-DmuSgNby.js → general-CFKZC4Bm.js} +1 -1
- package/dist/client/assets/{github-icon-CIUXCHYd.js → github-icon-DSYm9NcE.js} +1 -1
- package/dist/client/assets/{held-block-view-Ce7FjzFo.js → held-block-view-CHpQrpR-.js} +1 -1
- package/dist/client/assets/{home-DfvWLWjX.js → home-B1BEcUL6.js} +1 -1
- package/dist/client/assets/{home-overview-DrTiQovk.js → home-overview-3PYqsmAT.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-OWVjsnRk.js → hosted-reconcile-7fs1X55C.js} +1 -1
- package/dist/client/assets/{icon-button-B2FYU_Bm.js → icon-button-gLVbB0jI.js} +1 -1
- package/dist/client/assets/{index-CexiDE6J.js → index-4HSuwhm_.js} +1 -1
- package/dist/client/assets/{index-8HE48uEz.js → index-B-ySqoTz.js} +1 -1
- package/dist/client/assets/{index-y09j8GJz.js → index-B2fClAY2.js} +1 -1
- package/dist/client/assets/{index-FR7-LkFs.js → index-C85tHLcN.js} +8 -8
- package/dist/client/assets/{index-D-GlxhqC.js → index-CJbDZUcV.js} +1 -1
- package/dist/client/assets/{index-Cz7ziqq8.js → index-CWlw9JP9.js} +1 -1
- package/dist/client/assets/{index-DFgV3_JA.js → index-CevVA9xN.js} +1 -1
- package/dist/client/assets/{index-BUiCUWOI.js → index-Cve__EcV.js} +1 -1
- package/dist/client/assets/{index-BYMPhxVC.js → index-D3QhpuIe.js} +1 -1
- package/dist/client/assets/{index-CDCs_KiA.js → index-DWkvJNqc.js} +1 -1
- package/dist/client/assets/{index-GXFk32Bw.js → index-Da85qowO.js} +1 -1
- package/dist/client/assets/{index-C8tbN8yc.js → index-DdTlbocB.js} +1 -1
- package/dist/client/assets/{index-DbzQIfNo.js → index-DjnCseXM.js} +1 -1
- package/dist/client/assets/{index-6N05u2FT.js → index-DuzDqcfd.js} +1 -1
- package/dist/client/assets/{index-DIG6wtlF.js → index-Dv0x1GOA.js} +1 -1
- package/dist/client/assets/{index-HW6xhQCR.js → index-bc5sqkPK.js} +1 -1
- package/dist/client/assets/{index-Cd1d2KVB.js → index-q9YhUnQe.js} +1 -1
- package/dist/client/assets/{index-redirect-CYieSEon.js → index-redirect-FZLKranc.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Bo9y-Vk0.js → infiniteQueryObserver-qZVuRw-O.js} +1 -1
- package/dist/client/assets/{infra-billing-D3tyPPPr.js → infra-billing-08HiMHaT.js} +1 -1
- package/dist/client/assets/{input-PMXl5ojy.js → input-CeHWzvLk.js} +3 -3
- package/dist/client/assets/{input-oqagqAas.js → input-eKvzyWzB.js} +1 -1
- package/dist/client/assets/{integration-icon-D_iw-M-g.js → integration-icon-0KFdndK9.js} +1 -1
- package/dist/client/assets/{item-actions-WlA-gUNT.js → item-actions-DUxc4HRQ.js} +1 -1
- package/dist/client/assets/{jira-icon-hVbN0Tf4.js → jira-icon-BhlvPaKY.js} +1 -1
- package/dist/client/assets/{label-BrDhuinX.js → label-BFTFjVIH.js} +1 -1
- package/dist/client/assets/{layout-CldmtRbE.js → layout-CWc5Dw37.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-CCTtGdld.js → legacy-admin-welcome-dialog-CjXnIz4O.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CS8Mx6L7.js → legacy-agents-deep-DN_kOAia.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DjyGSD7M.js → legacy-main-redirect-BtzGm7Me.js} +1 -1
- package/dist/client/assets/library-CEs7UWNI.js +1 -0
- package/dist/client/assets/{library-tab-B6NZkMbf.js → library-tab-CuRo6sQJ.js} +1 -1
- package/dist/client/assets/{login-YS1-2Nue.js → login-CrcWGbwY.js} +1 -1
- package/dist/client/assets/{markdown-CV0DScZs.js → markdown-Bn4GUSDy.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BD-0mBhr.js → mcp-app-renderer-BA9gzzWp.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DjAD5Pae.js → mcp-oauth-BAH1YTyp.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ByqxUWfx.js → mcp-oauth-CSXk2zEu.js} +1 -1
- package/dist/client/assets/{members-BzSWZ_o7.js → members-BBVb35y2.js} +1 -1
- package/dist/client/assets/{memory-D4hrI4rc.js → memory-DrdyYAMg.js} +1 -1
- package/dist/client/assets/{mock-board-BbC-KPvo.js → mock-board-BzPXjSGt.js} +3 -3
- package/dist/client/assets/{monaco-editor-BrHCIY9F.js → monaco-editor-DbDj727O.js} +1 -1
- package/dist/client/assets/{monitoring-BaOt4SvI.js → monitoring-Bp8NCGcy.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BoT5RyWa.js → monitoring-stats-row-Cn1MlO4T.js} +1 -1
- package/dist/client/assets/{multi-select-CkLH9zDR.js → multi-select-CgQoQWM4.js} +1 -1
- package/dist/client/assets/{mustache-DbskuLzt.js → mustache-Df1Duqj_.js} +1 -1
- package/dist/client/assets/{named-rule-step-CrkqnZE0.js → named-rule-step-e1NE1N94.js} +1 -1
- package/dist/client/assets/{named-rule-view-pW8NYIwe.js → named-rule-view-0d3pAypH.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BZf8-lvn.js → new-project-dialog-Co22b0Pz.js} +1 -1
- package/dist/client/assets/{new-project-store-D6y4lbf2.js → new-project-store-Bk2gL22H.js} +1 -1
- package/dist/client/assets/{oauth-callback-BAwQm-0A.js → oauth-callback-Dv5ActA7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DjnR_ws7.js → oauth-callback-ai-provider-Bqdg_jjB.js} +1 -1
- package/dist/client/assets/{oauth-consent-BgXPtZDW.js → oauth-consent-CcMxfq4q.js} +1 -1
- package/dist/client/assets/{onboarding-C7bUxdmN.js → onboarding-Cx6yBxRM.js} +1 -1
- package/dist/client/assets/{openai-conversation-CaTme7tS.js → openai-conversation-C-vUQsTW.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BiUQva9l.js → optimistic-project-sidebar-views-B0fym-vN.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BkApoxgW.js → order-monitor-day-CZGARbXe.js} +1 -1
- package/dist/client/assets/{organization-choice-D4iDv_H1.js → organization-choice-z4KGe3ti.js} +1 -1
- package/dist/client/assets/{orgs-DTRrUWgx.js → orgs-DCKipWZv.js} +1 -1
- package/dist/client/assets/{own-accounts-section-xDHmjKlb.js → own-accounts-section-BPAeSgQF.js} +1 -1
- package/dist/client/assets/{pair-UrNHmvwT.js → pair-D_lpTII5.js} +1 -1
- package/dist/client/assets/{parse-sections-l0PaukKn.js → parse-sections-CQLe_CsU.js} +2 -2
- package/dist/client/assets/{plan-Bj7w0fs-.js → plan-Cj0XFxCj.js} +1 -1
- package/dist/client/assets/{plan-ladder-CypWDEbr.js → plan-ladder-bbfSV1Pj.js} +1 -1
- package/dist/client/assets/{plan-usage-card-Cj8t_uV_.js → plan-usage-card-B8zRX2UQ.js} +1 -1
- package/dist/client/assets/{popover-7x26sV4l.js → popover-BjZp4C3X.js} +1 -1
- package/dist/client/assets/{post-calendar-DVbpAHSG.js → post-calendar-gShSdFI0.js} +1 -1
- package/dist/client/assets/{post-editor-BgQsbRBJ.js → post-editor-01HGKiT3.js} +1 -1
- package/dist/client/assets/{preview-content-5lf6CQ1G.js → preview-content-Bur_HQlw.js} +1 -1
- package/dist/client/assets/{preview-dialog-a9oPKORm.js → preview-dialog-DFhpYWDY.js} +1 -1
- package/dist/client/assets/{preview-panel-B-fYqCTc.js → preview-panel-JnlIfMko.js} +1 -1
- package/dist/client/assets/{preview-tab-CbOIy4cw.js → preview-tab-Blz8ji_b.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-BBOB74pM.js → product-picker-dialog-CBYXrBxN.js} +1 -1
- package/dist/client/assets/{profile-Dpdofwex.js → profile-CW1qZv4E.js} +1 -1
- package/dist/client/assets/{project-app-view-B-IV2rxA.js → project-app-view-lLGemxMj.js} +1 -1
- package/dist/client/assets/{project-apps-FcEysJSf.js → project-apps-Cp_UOz3C.js} +1 -1
- package/dist/client/assets/{project-icon-BakFKgaM.js → project-icon-Dp3mt0vF.js} +1 -1
- package/dist/client/assets/{project-index-CH5Eesm9.js → project-index-D0h6WvE8.js} +1 -1
- package/dist/client/assets/project-reports-BiXUt-Xq.js +1 -0
- package/dist/client/assets/project-tasks-DdrYgENo.js +1 -0
- package/dist/client/assets/{projects-DCEjx7vT.js → projects-D50oucbd.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BwEHnw3B.js → projects-empty-state-l1yjn612.js} +1 -1
- package/dist/client/assets/{prompts-BekDCd-q.js → prompts-Dm_XOAdj.js} +1 -1
- package/dist/client/assets/record-editor-CG3jrGrB.js +1 -0
- package/dist/client/assets/redirect-editor-BBT8tW2u.js +1 -0
- package/dist/client/assets/reports-C8kLYnyv.js +1 -0
- package/dist/client/assets/{reports-BbFa4xYC.js → reports-CCzLe_e7.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BDB7TzgU.js → reports-onboarding-qzYZ0U3H.js} +1 -1
- package/dist/client/assets/{reports-tab-Q20Na5hW.js → reports-tab-C0uzs6sx.js} +2 -2
- package/dist/client/assets/{repositories-BdnVmM98.js → repositories-98si2EgV.js} +1 -1
- package/dist/client/assets/repositories-Ci5g9BEG.js +1 -0
- package/dist/client/assets/{repository-binding-DdJXPhL-.js → repository-binding-DFWWxXUn.js} +1 -1
- package/dist/client/assets/{repository-picker-DcD51j3V.js → repository-picker-DN8jGk0B.js} +1 -1
- package/dist/client/assets/{require-capability-Bw_S94S7.js → require-capability-BpI-Q9ce.js} +1 -1
- package/dist/client/assets/{required-auth-layout-81VJBEp9.js → required-auth-layout-DVaUpJLt.js} +1 -1
- package/dist/client/assets/{reset-password-DHH7NYOb.js → reset-password-Dnaah8Bj.js} +1 -1
- package/dist/client/assets/{resizable-BrnNepSm.js → resizable-ZWRPFP99.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BAO1NHl-.js → resolve-tab-icon-D2fElWIs.js} +1 -1
- package/dist/client/assets/{review-settings-vBNXtecT.js → review-settings-BQvIDJom.js} +1 -1
- package/dist/client/assets/{role-color-BaWVUb4j.js → role-color-D7aQG9YG.js} +1 -1
- package/dist/client/assets/{roles-CSUXrIEf.js → roles-BtxXbl7C.js} +1 -1
- package/dist/client/assets/{route-DXSlTAFB.js → route-BWatzPs6.js} +1 -1
- package/dist/client/assets/{route-BuT3rimp.js → route-CklpWWje.js} +1 -1
- package/dist/client/assets/route-Cqx_ysK2.js +1 -0
- package/dist/client/assets/{route-page-header-Bjz66AQK.js → route-page-header-C89Dw-o7.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-B4kiB_OO.js → sandbox-git-api-VXUab4zs.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DIPvnGzU.js → sandbox-lifecycle-context-DRfycjkH.js} +1 -1
- package/dist/client/assets/{save-status-DUnwCvL6.js → save-status-CP8vXl09.js} +1 -1
- package/dist/client/assets/{schema-CpgLVA1f.js → schema-CakgGDYa.js} +1 -1
- package/dist/client/assets/{schema-Do1srOed.js → schema-uLUotu0l.js} +1 -1
- package/dist/client/assets/{scroll-area-Cg0VHNwx.js → scroll-area-C9LFiu5G.js} +1 -1
- package/dist/client/assets/{search-input-DLh0nlr5.js → search-input-B_qP8-Dp.js} +1 -1
- package/dist/client/assets/{search-toggle-n3MSbxdh.js → search-toggle-Dki5ryJE.js} +1 -1
- package/dist/client/assets/{secret-picker-CA4076-F.js → secret-picker-DLFB3680.js} +1 -1
- package/dist/client/assets/{secrets-Nc9lZJ4O.js → secrets-D7nqaHdJ.js} +1 -1
- package/dist/client/assets/{section-array-field-CVPQhOEL.js → section-array-field-maBthvLp.js} +1 -1
- package/dist/client/assets/{sections-Cq-1B8bG.js → sections-OkJT55N9.js} +1 -1
- package/dist/client/assets/{sections-editor-DC8FnTKc.js → sections-editor-BSd5yJzF.js} +1 -1
- package/dist/client/assets/{select-DO5UmbiK.js → select-0LL7vYGo.js} +1 -1
- package/dist/client/assets/{select-model-BxYeGUNe.js → select-model-CdXfLfQ0.js} +1 -1
- package/dist/client/assets/{seo-editor-Cb_-6pbC.js → seo-editor-07Upgn4u.js} +1 -1
- package/dist/client/assets/{separator-ClPt1qls.js → separator-Bo22S7sI.js} +1 -1
- package/dist/client/assets/{session-runtime-ByRl2V_-.js → session-runtime-45E__Spq.js} +1 -1
- package/dist/client/assets/settings-tab-CwOpxSEI.js +1 -0
- package/dist/client/assets/{sheet-Ba_kC1AK.js → sheet-D60vsWkT.js} +1 -1
- package/dist/client/assets/{shell-layout-hxOVAb6r.js → shell-layout-EsacDloA.js} +1 -1
- package/dist/client/assets/site-draft-actions-jgv5lneW.js +7 -0
- package/dist/client/assets/{site-draft-view-DoBMGNxF.js → site-draft-view-B34XeV1i.js} +1 -1
- package/dist/client/assets/site-editor-D-l5f0jx.js +1 -0
- package/dist/client/assets/{site-editor-toast-CksZ_DBd.js → site-editor-toast-BDulHEMF.js} +1 -1
- package/dist/client/assets/{skills-CgFC9u75.js → skills-DsXVIKup.js} +1 -1
- package/dist/client/assets/{slider-BNKhoqMv.js → slider-F0CZgjh6.js} +1 -1
- package/dist/client/assets/{sortable.esm-DW0wRpPm.js → sortable.esm-DAdaPQLI.js} +1 -1
- package/dist/client/assets/{sso-BrpFyhwL.js → sso-VScqybhv.js} +1 -1
- package/dist/client/assets/{suggestion-DNn_oFJd.js → suggestion-CD3Xe_6y.js} +1 -1
- package/dist/client/assets/{super-agent-icon-Cvg_K_iL.js → super-agent-icon-Bu6yeNMB.js} +1 -1
- package/dist/client/assets/{switch-BHmi6NG_.js → switch-B6bptBy8.js} +1 -1
- package/dist/client/assets/{synced-repos-DRSlgzhQ.js → synced-repos-BCfB6_fP.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-C0mr7ZyN.js → tab-icon-glyph-UKzu2ZND.js} +1 -1
- package/dist/client/assets/{table-Vs3bc_5a.js → table-CrAIuX7X.js} +1 -1
- package/dist/client/assets/{tabs-DD53shfE.js → tabs-CkLLvnO_.js} +1 -1
- package/dist/client/assets/{task-board-WdgeTNaU.js → task-board-D4Sl9KMo.js} +1 -1
- package/dist/client/assets/{task-key-BOhf6PeF.js → task-key-DdCGJUj1.js} +1 -1
- package/dist/client/assets/{task-route-CKQNtOSa.js → task-route-9l7x763b.js} +1 -1
- package/dist/client/assets/{task-status-DDLp4MtP.js → task-status-CVHHfIS_.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D59d7L_v.js → taskboard-analytics-XbLvf4gx.js} +1 -1
- package/dist/client/assets/tasks-DJzVVe14.js +1 -0
- package/dist/client/assets/{tasks-BJ9tMJk-.js → tasks-F-Gf7MfK.js} +1 -1
- package/dist/client/assets/{textarea-HB4U7ZGE.js → textarea-Jl12VF1V.js} +1 -1
- package/dist/client/assets/{thread-analytics-_YhjJKsQ.js → thread-analytics-CN6YxU84.js} +1 -1
- package/dist/client/assets/{thread-button-Qhfu18qZ.js → thread-button-DJoaq2w1.js} +1 -1
- package/dist/client/assets/{thread-intent-DDQe6PKd.js → thread-intent-_pxHME4U.js} +1 -1
- package/dist/client/assets/{thread-route-nxXeVQI9.js → thread-route-BfFOgfGr.js} +1 -1
- package/dist/client/assets/{thread-route-H2DC02zF.js → thread-route-CKA62JrL.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-B63iYWkR.js → thread-sheet-body-BpMYGTmC.js} +1 -1
- package/dist/client/assets/{time-range-picker-D62EphZs.js → time-range-picker-CirqLev7.js} +1 -1
- package/dist/client/assets/{toggle-group-DsHNAW_o.js → toggle-group-CdOqAyIy.js} +1 -1
- package/dist/client/assets/{tool-set-selector-q7g0t0TT.js → tool-set-selector-CauuJZcJ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D2GZy3ji.js → toolbar-icon-button-Bc6P-Pcn.js} +1 -1
- package/dist/client/assets/{tooltip-zEsMTxPP.js → tooltip-k85O2ViC.js} +1 -1
- package/dist/client/assets/{tooltipContext-DnSCkdE2.js → tooltipContext-BUwR0gbN.js} +1 -1
- package/dist/client/assets/{track-CUdkdM9q.js → track-BB8Uscnm.js} +1 -1
- package/dist/client/assets/{types-DMMPR8qW.js → types-DQ1tQWK0.js} +1 -1
- package/dist/client/assets/{url-slug-DDGhX66k.js → url-slug-CTDbeJac.js} +1 -1
- package/dist/client/assets/{usage-stats-DV0A8cEM.js → usage-stats-DKOEXU2h.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CTFkZoGo.js → use-ai-providers-CP-Hz8VY.js} +1 -1
- package/dist/client/assets/{use-api-keys-hOWMp9oQ.js → use-api-keys-601ky0KO.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-CTLfcvn0.js → use-apply-named-rule-DY3qdxpq.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-J8CgInrW.js +1 -0
- package/dist/client/assets/{use-automations-DCTTlEcO.js → use-automations-BBJSxLUA.js} +1 -1
- package/dist/client/assets/{use-autosave-Rfdg2I1F.js → use-autosave-C4herh_I.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-LPOFduCi.js +1 -0
- package/dist/client/assets/use-blog-view-DTDGh4BY.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-vbFKmjxB.js → use-chat-layout-state-C2qYACH8.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-BHXk9tUC.js → use-cms-publish-actions-D2j0_CbX.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BnUK_glG.js → use-connect-companion-BZj5DqzS.js} +1 -1
- package/dist/client/assets/{use-connection-BHM3BFUr.js → use-connection-PIh05Hyc.js} +1 -1
- package/dist/client/assets/{use-content-sync-BApKNkG6.js → use-content-sync-CLcT9zcO.js} +1 -1
- package/dist/client/assets/{use-copy-d7u6BVsA.js → use-copy-Bpi1xzoh.js} +1 -1
- package/dist/client/assets/{use-current-view-D_ifkjui.js → use-current-view-Cw9yOMDU.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BfEJ9DKB.js → use-date-fns-locale-ByGoiQ-F.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C8qW25SA.js → use-debounced-autosave-D3C08Kat.js} +1 -1
- package/dist/client/assets/{use-debounced-value-COFfhICA.js → use-debounced-value-dqdgSMec.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BcE9Lgca.js → use-deco-credits-DV3818XY.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DY8bcy2g.js → use-decopilot-events-DP_r1Kdt.js} +1 -1
- package/dist/client/assets/{use-delete-block-CGqlkyBO.js → use-delete-block-CBmUPIsz.js} +1 -1
- package/dist/client/assets/{use-delete-connection-D1aTQQJm.js → use-delete-connection-gEgd8eK5.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DgU-c4bG.js → use-deployment-admin-DXdiazmg.js} +1 -1
- package/dist/client/assets/{use-entitlements-b0vun-2_.js → use-entitlements-D5uPt1hf.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DncEMB04.js → use-fast-preview-draft-url-CIlx2V4C.js} +1 -1
- package/dist/client/assets/{use-file-configs-CwMKmvEP.js → use-file-configs-Ewn14i-x.js} +1 -1
- package/dist/client/assets/{use-id-selection-DCKB_8sF.js → use-id-selection-B6wRAhZh.js} +1 -1
- package/dist/client/assets/{use-in-settings-CK5SsWhS.js → use-in-settings-BghU4KTx.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CHFMf-DP.js → use-inbox-feed-4znK-CEA.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BhP62VAS.js → use-infinite-scroll-DI1uwk4k.js} +1 -1
- package/dist/client/assets/{use-join-requests-DeocFvqW.js → use-join-requests-SKf_bwd0.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Du7tjex6.js → use-main-panel-tabs-DCa4J6CK.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BQeDa9px.js → use-mcp-auth-status-VWBAwa4J.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B9e5PyU5.js → use-mcp-client-CUrluUi3.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DgapPQcC.js → use-mcp-prompts-D0u43aV4.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CxV8OmMI.js → use-mcp-tools-_QuEBcsk.js} +1 -1
- package/dist/client/assets/{use-mobile-Dcp3TiKi.js → use-mobile-BC_OOfWs.js} +1 -1
- package/dist/client/assets/{use-move-blocks-B_Oh4K4K.js → use-move-blocks-DGHmjLIO.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-8EROExiH.js → use-navigate-to-agent-WkE71T4J.js} +1 -1
- package/dist/client/assets/use-never-published-CnJJZaok.js +1 -0
- package/dist/client/assets/{use-org-fs-CaJ4jOuW.js → use-org-fs-Dyz1rpOE.js} +1 -1
- package/dist/client/assets/{use-org-notice-CsHPv0ZT.js → use-org-notice-BJ5lt1H7.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-ClD66yFB.js → use-org-repo-syncs-umqyAc6M.js} +1 -1
- package/dist/client/assets/{use-org-sso-ClZgaz67.js → use-org-sso-JmqS1Edt.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D9Z_MLl2.js → use-organization-settings-DA41rXk2.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-ajPZ-O4i.js → use-panel-navigate-yD6TZRr4.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DhvS9eeS.js → use-project-native-view-presence-CyFNIrxc.js} +1 -1
- package/dist/client/assets/{use-project-scope-DbG1jNVV.js → use-project-scope-BCJ_xKUP.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DaKCzULH.js → use-recent-apps-BUUyYoPc.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BiwUdSSa.js → use-reports-diagnostic-COwt7AvG.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DYuy4eXR.js → use-sandbox-events-D_waR8p2.js} +1 -1
- package/dist/client/assets/{use-secrets-BDnSckIs.js → use-secrets-BEOznyKR.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BA-kLqNd.js → use-section-preview-base-BxY_Ezy0.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-BnOq_oEM.js → use-sidebar-collapsed-cUSrMUJF.js} +1 -1
- package/dist/client/assets/{use-tags-C6EDrEBG.js → use-tags-C9NNvOw6.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DeDE1IEl.js → use-task-board-analytics-ogJ5EfIA.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-C9H7e6IC.js → use-task-board-item-prs-BAg_peyS.js} +1 -1
- package/dist/client/assets/{use-task-board-items-C2I9m2B-.js → use-task-board-items-CmBIGiCV.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-D6cb0B6a.js → use-task-board-prompts-QXjNkc47.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CQcB7BzK.js → use-task-metadata-Betu8ti-.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-KaWkhSGH.js → use-thread-outputs-ubVl5FkO.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-CBmzgnXH.js → use-view-draft-kind-BU8rQuMc.js} +1 -1
- package/dist/client/assets/{use-voice-input-CChbkXIH.js → use-voice-input-BCoTs98e.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DRaTrWng.js +1 -0
- package/dist/client/assets/{useQueries-DUm4FupI.js → useQueries-B0hlyY0W.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BexWmnfg.js +1 -0
- package/dist/client/assets/{users-B87pV5ii.js → users-Dhmi9cYi.js} +1 -1
- package/dist/client/assets/{utils-O_zWQ9Z7.js → utils-BCwKnB-w.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bh22mlda.js → variant-calendar-B5qUKPcz.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BLYg6qNr.js → variant-matcher-override-VPiqlMwA.js} +1 -1
- package/dist/client/assets/{view-header-CDvRMzUc.js → view-header-2DQ_V1au.js} +1 -1
- package/dist/client/assets/{virtual-mcp-9Ocfu-kl.js → virtual-mcp-BMeHnqnd.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DvEr2HwM.js → watch-sse-pool-Dr1opvol.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +130 -130
- package/package.json +1 -1
- package/dist/client/assets/agent-app-lmDlBMa5.js +0 -1
- package/dist/client/assets/agent-assets-BN7WhmKl.js +0 -1
- package/dist/client/assets/agent-deck-CIU6uWE2.js +0 -1
- package/dist/client/assets/agent-experiments-DJt8HpNL.js +0 -1
- package/dist/client/assets/agent-file-DhEq-PgR.js +0 -1
- package/dist/client/assets/agent-library-Br8v5MtW.js +0 -1
- package/dist/client/assets/agent-library-file-B0DaymPI.js +0 -1
- package/dist/client/assets/agent-overview-CSM2fYNF.js +0 -1
- package/dist/client/assets/agent-settings-B-H1WO5c.js +0 -1
- package/dist/client/assets/agent-site-editor-code-gGn1LR2B.js +0 -2
- package/dist/client/assets/agent-site-editor-content-N_B-mw4A.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DLVtRjzS.js +0 -1
- package/dist/client/assets/agent-view-CrGDO6Mp.js +0 -1
- package/dist/client/assets/api-keys-B2pOUk_Z.js +0 -1
- package/dist/client/assets/asset-utils-D9WZTXXH.js +0 -1
- package/dist/client/assets/library-BeqMbeTr.js +0 -1
- package/dist/client/assets/project-reports-BMkuATss.js +0 -1
- package/dist/client/assets/project-tasks-CgegKZFV.js +0 -1
- package/dist/client/assets/record-editor-BhOWKOqq.js +0 -1
- package/dist/client/assets/redirect-editor-DsJ26zj5.js +0 -1
- package/dist/client/assets/reports-ezYUNDvN.js +0 -1
- package/dist/client/assets/repositories-DRNmonrv.js +0 -1
- package/dist/client/assets/route-BUh0V4ZY.js +0 -1
- package/dist/client/assets/settings-tab-BB4vDZAN.js +0 -1
- package/dist/client/assets/site-draft-actions-DS6SP7w_.js +0 -5
- package/dist/client/assets/site-editor-BzkmccDr.js +0 -1
- package/dist/client/assets/tasks-Ch925UQU.js +0 -1
- package/dist/client/assets/use-ask-in-chat-BSMZ4qaC.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-ou9QCF6v.js +0 -1
- package/dist/client/assets/use-blog-view-Ba0QG6QU.js +0 -1
- package/dist/client/assets/use-never-published-Ct3dv44f.js +0 -1
- package/dist/client/assets/useInfiniteQuery-f2vaHavl.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CSNG6COy.js +0 -1
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{c as I,b as ge,r as U,j as r,B as be,m as G,K as gs,al as Ka,t as rt,eL as qa,as as Pr,dL as kr,Y as fs,dM as Ha,aH as Ss,aI as Ns,aJ as Cs,aK as Gs,b7 as Ws,aL as As,aM as Rs,aN as Ds,X as en,Z as tn,_ as sn,a as nn,a4 as Bs,bY as Va,h as ms,eM as Sr,eN as Pn,bx as Ga,bm as Wa,br as Xn,eO as Qa,eP as Ja,am as Ya,I as Xa,a7 as Za,eQ as el,V as Nr,i as bt,eI as kn,q as Cr,J as Ar,D as Rr,x as Dr,v as Tr,Q as Br,R as Ir,aV as tl,b8 as $r,a5 as Sn,b4 as Nn,e as Zn,E as sl,T as nl}from"./index-FR7-LkFs.js";import{S as rl}from"./separator-ClPt1qls.js";import{f as al,u as xs,r as Fr,l as Lr,c as Or,b as ll}from"./chat-context-CN0ge7G_.js";import{u as Ot,a8 as il,a9 as Mr,aa as Er,c as Cn,b as An,N as Rn,ab as ol,M as cl,ac as dl,v as Dn,U as _r,ad as ul,H as hl,ae as fl,af as ml,g as zr}from"./site-editor-toast-CksZ_DBd.js";import{L as pl}from"./use-org-notice-CsHPv0ZT.js";import{I as Ur}from"./toolbar-icon-button-D2GZy3ji.js";import{b as bl,P as gl,a as xl}from"./popover-7x26sV4l.js";import{c as at,T as lt,a as it,b as rn}from"./tooltip-zEsMTxPP.js";import{f as vl,a as yl,c as jl,C as er,e as tr,b as sr}from"./command-_zJuKDCi.js";import{T as Ft,a as Kr,b as qr}from"./tabs-DD53shfE.js";import{t as Hr}from"./ChevronDown-DHu3fSw0.js";import{b as wl}from"./UserCheck01-D6gLgI3l.js";import{K as Vr,ac as an,a as Gr,F as Pl,b as kl,ad as Wr}from"./agent-icon-BHVUedtV.js";import{a as Qr}from"./SwitchHorizontal01-Cfysn-sK.js";import{b as Jr}from"./Tool01-BR1SF2OD.js";import{s as Yr}from"./Plus-INbg-jHc.js";import{s as ln}from"./Trash01-thCRPjRX.js";import{d as qs,e as Sl,s as Ms,f as Xr,u as Zr,n as Nl,g as Cl}from"./use-view-draft-kind-CBmzgnXH.js";import{u as Tn}from"./use-blog-view-Ba0QG6QU.js";import{u as vs}from"./use-voice-input-CChbkXIH.js";import{b as Al,d as ea}from"./session-runtime-ByRl2V_-.js";import{h as ta,r as sa,b as Is,g as Rl,e as Ee,f as na}from"./repository-binding-DdJXPhL-.js";import{u as Dl}from"./use-debounced-value-COFfhICA.js";import{a as Tl,u as Bl}from"./shell-layout-hxOVAb6r.js";import{u as Il}from"./useInfiniteQuery-f2vaHavl.js";import{d as $l,b as Fl,p as Ll,e as ra,g as aa,h as la}from"./use-navigate-to-agent-8EROExiH.js";import{u as on,n as ks,b as ia,a as Ol,c as Ml,d as El,r as Ps,g as _l,s as zl,e as Es,f as Ul}from"./cms-store-drafts-u7ki7lCC.js";import{e as Kl,g as ql,f as Bn}from"./thread-intent-DDQe6PKd.js";import{a as Qs}from"./virtual-mcp-9Ocfu-kl.js";import{u as In}from"./use-blocks-v8-project-ou9QCF6v.js";import{G as oa}from"./github-icon-CIUXCHYd.js";import{k as Hl,r as Vl,c as ca,u as Gl}from"./use-sandbox-events-DYuy4eXR.js";import{a as Wl,b as Ql}from"./use-fast-preview-draft-url-DncEMB04.js";import{a3 as us,a4 as da,z as Js,o as $n,a5 as Jl,a6 as Yl,E as Xl,a7 as Zl,a8 as ei,p as ti,W as Ct,f as Fn,a9 as si}from"./blocks-tab-states-CRdiUDZv.js";import"./index-BYMPhxVC.js";import{T as ni}from"./textarea-HB4U7ZGE.js";import{i as Ln}from"./CheckCircle-Cyt1BwLE.js";import{s as Ys}from"./Eye-w_JiO-fJ.js";import{n as ri,s as ai,C as li,a as ii,b as oi,M as ci,c as di,d as ui,m as hi,u as fi}from"./use-cms-publish-actions-BHXk9tUC.js";import{a as mi,h as pi}from"./UserSquare-BHfTOZb7.js";import{i as On,b as Mn,m as bi,h as gi,c as ua,f as ha,d as xi,r as En,e as vi,n as yi,g as ji,j as wi,k as Pi,l as _n,o as ki,p as fa,q as Si,s as zn,B as Ni,t as hn}from"./sandbox-git-api-B4kiB_OO.js";import{a as Ci,g as Ai}from"./utils-O_zWQ9Z7.js";import{i as Ri}from"./Monitor01-BwGctKTP.js";import{w as Un,R as ma}from"./device-hint-0Up2oNr2.js";import{w as nr}from"./editor-DFpyUa_U.js";import{i as Di,C as Ti}from"./section-array-field-CVPQhOEL.js";import{T as Bi,a as rr}from"./toggle-group-DsHNAW_o.js";import{s as pa}from"./save-changes-debug-nBi-n9eV.js";import{u as Ii}from"./use-mcp-client-B9e5PyU5.js";import{t as $i}from"./MessageCircle01-Ccsb6qrK.js";import{b as Fi,a as Li}from"./sandbox-lifecycle-context-DIPvnGzU.js";import{b as Oi}from"./agent-capabilities-BTvAxwai.js";import{c as Mi}from"./thread-route-H2DC02zF.js";function Ei(t){const{value:e,baseBranch:s,releases:a,baseIsDraft:n=!1,storeDrafts:o=[]}=t,d=!n&&!!e&&e===s,l=a.find(c=>c.branch===e),i=d||l?void 0:o.find(c=>c.name===e),u=!d&&!l&&!i&&!!e;return i?{isBase:d,current:l,storeDraft:i,unlisted:u}:{isBase:d,current:l,unlisted:u}}const _i={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},ar=1114111;function lr(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const a=Number.parseInt(s.slice(2),16);return!Number.isFinite(a)||a>ar?e:String.fromCodePoint(a)}if(s.startsWith("#")){const a=Number.parseInt(s.slice(1),10);return!Number.isFinite(a)||a>ar?e:String.fromCodePoint(a)}return _i[s]??e}):""}function zi(t){const e=I.c(39),{url:s,onSave:a}=t,n=ge(),[o,d]=U.useState(s??"");let l;e[0]!==o?(l=o.trim(),e[0]=o,e[1]=l):l=e[1];const i=l;let u;e[2]!==a||e[3]!==i?(u=()=>a(i?Al(i):null),e[2]=a,e[3]=i,e[4]=u):u=e[4];const c=u;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let p;e[7]!==h?(p=r.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==n?(b=n("thread.branchPicker.localUrlLabel"),e[9]=n,e[10]=b):b=e[10];let f;e[11]!==n?(f=n("thread.branchPicker.localUrlPlaceholder"),e[11]=n,e[12]=f):f=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=C=>d(C.target.value),e[13]=m):m=e[13];let g;e[14]!==c||e[15]!==i?(g=C=>{C.key==="Enter"&&i&&c()},e[14]=c,e[15]=i,e[16]=g):g=e[16];let v;e[17]!==b||e[18]!==f||e[19]!==g||e[20]!==o?(v=r.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:o,onChange:m,onKeyDown:g,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=g,e[20]=o,e[21]=v):v=e[21];let j;e[22]!==a||e[23]!==n||e[24]!==s?(j=s?r.jsx(be,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>a(null),children:n("thread.branchPicker.localTurnOff")}):r.jsx("span",{}),e[22]=a,e[23]=n,e[24]=s,e[25]=j):j=e[25];const w=!i;let x;e[26]!==n?(x=n("thread.branchPicker.save"),e[26]=n,e[27]=x):x=e[27];let P;e[28]!==c||e[29]!==w||e[30]!==x?(P=r.jsx(be,{size:"sm",disabled:w,onClick:c,children:x}),e[28]=c,e[29]=w,e[30]=x,e[31]=P):P=e[31];let y;e[32]!==j||e[33]!==P?(y=r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[j,P]}),e[32]=j,e[33]=P,e[34]=y):y=e[34];let N;return e[35]!==y||e[36]!==p||e[37]!==v?(N=r.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[p,v,y]}),e[35]=y,e[36]=p,e[37]=v,e[38]=N):N=e[38],N}function Ui(t){const e=I.c(8),{virtualMcpId:s,branch:a,serve:n,rowRef:o,onPicked:d}=t,l=Ot(s,a),i=!!n.connection,u=i&&l.kind==="protocol"&&l.source==="local";let c;e[0]!==d||e[1]!==n?(c=()=>Ki(n,d),e[0]=d,e[1]=n,e[2]=c):c=e[2];let h;return e[3]!==o||e[4]!==i||e[5]!==u||e[6]!==c?(h=r.jsx(qi,{rowRef:o,selected:i,connected:u,onSelect:c}),e[3]=o,e[4]=i,e[5]=u,e[6]=c,e[7]=h):h=e[7],h}function Ki(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??il})}function qi(t){const e=I.c(19),{rowRef:s,selected:a,connected:n,onSelect:o}=t,d=ge(),l=a?"bg-accent":"hover:bg-accent";let i;e[0]!==l?(i=G("flex rounded-lg",l),e[0]=l,e[1]=i):i=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=u):u=e[2];let c;e[3]!==d?(c=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=c):c=e[4];let h;e[5]!==c?(h=r.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[5]=c,e[6]=h):h=e[6];let p;e[7]!==n||e[8]!==d?(p=n&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=p):p=e[9];let b;e[10]!==o||e[11]!==a||e[12]!==h||e[13]!==p?(b=r.jsxs("button",{type:"button","aria-pressed":a,onClick:o,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[u,h,p]}),e[10]=o,e[11]=a,e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==i||e[17]!==b?(f=r.jsx("div",{ref:s,className:i,children:b}),e[15]=s,e[16]=i,e[17]=b,e[18]=f):f=e[18],f}const Hi=10080*60*1e3;function Vi({sandboxMap:t,userId:e,rawBranches:s,now:a}){const n=new Map;for(const[h,p]of Object.entries(t??{}))for(const[b,f]of Object.entries(p??{})){let m=n.get(b);m||(m={userIds:new Set,lastActiveAt:0},n.set(b,m)),m.userIds.add(h);for(const g of Object.values(f??{})){const v=g?.createdAt??0;v>m.lastActiveAt&&(m.lastActiveAt=v)}}const o=a-Hi,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=o).sort((h,p)=>p[1].lastActiveAt-h[1].lastActiveAt).map(([h,p])=>({name:h,source:"recent",contributors:[...p.userIds],lastActiveAt:p.lastActiveAt})),l=new Set(d.map(h=>h.name)),i=new Set(Object.keys(t?.[e]??{})),u=[...i].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),c=s.filter(h=>!i.has(h.name)&&!l.has(h.name)).map(h=>({name:h.name,source:"other",author:h.author??null}));return{recent:d,yours:u,others:c}}const Gi=100,Wi=50,Qi=300;function xn(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Ji(t){const e=I.c(39),{orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:u,enabled:c}=t,h=u===void 0?"":u,p=c===void 0?!0:c;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,m=Dl(f,Qi);let g;e[2]!==o?(g=ta(o),e[2]=o,e[3]=g):g=e[3];const v=g,j=f.length>0;let w;e[4]!==m||e[5]!==s||e[6]!==a||e[7]!==l||e[8]!==i||e[9]!==o?(w=gs.githubBranchSearch(s,a,sa(o),l,i,m),e[4]=m,e[5]=s,e[6]=a,e[7]=l,e[8]=i,e[9]=o,e[10]=w):w=e[10];const x=p&&v;let P;e[11]!==m||e[12]!==a||e[13]!==o?(P=$=>{const{pageParam:ee}=$;return Ka(a,"REPOSITORY_SEARCH_BRANCHES",{...o,query:m,limit:m?Wi:Gi,cursor:ee})},e[11]=m,e[12]=a,e[13]=o,e[14]=P):P=e[14];let y;e[15]!==m?(y=$=>m?void 0:$.nextCursor??void 0,e[15]=m,e[16]=y):y=e[16];let N;e[17]!==w||e[18]!==x||e[19]!==P||e[20]!==y?(N={queryKey:w,enabled:x,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:P,getNextPageParam:y},e[17]=w,e[18]=x,e[19]=P,e[20]=y,e[21]=N):N=e[21];const{data:C,isLoading:A,isError:k,isFetching:D,hasNextPage:S,isFetchingNextPage:O,fetchNextPage:B}=Il(N),T=j&&(m!==f||D),F=(C?.pages??[]).flatMap(Yi),L=Tl(6e4),W=Vi({sandboxMap:d,userId:n,rawBranches:F,now:L});let q;e[22]!==f?(q=$=>xn($.name,f),e[22]=f,e[23]=q):q=e[23];const X=W.recent.filter(q);let M;e[24]!==f?(M=$=>xn($.name,f),e[24]=f,e[25]=M):M=e[25];const H=W.yours.filter(M),J=W.others,ne=C?.pages[0],Q=j&&ne&&!T?Math.max(0,ne.totalCount-ne.branches.length):0,he=!j&&S;let Z;e[26]!==B?(Z=()=>{B()},e[26]=B,e[27]=Z):Z=e[27];let re;return e[28]!==Q||e[29]!==k||e[30]!==O||e[31]!==A||e[32]!==T||e[33]!==J||e[34]!==X||e[35]!==he||e[36]!==Z||e[37]!==H?(re={recent:X,yours:H,others:J,isLoading:A,isError:k,isSearching:T,hiddenMatchCount:Q,hasMore:he,isFetchingMore:O,fetchMore:Z},e[28]=Q,e[29]=k,e[30]=O,e[31]=A,e[32]=T,e[33]=J,e[34]=X,e[35]=he,e[36]=Z,e[37]=H,e[38]=re):re=e[38],re}function Yi(t){return t.branches}function Xi(t){const e=I.c(8),s=ge(),{releases:a,createRelease:n}=on(t.virtualMcpId),o=Is(t.virtualMcpId);let d;return e[0]!==n||e[1]!==t.kind||e[2]!==t.userId||e[3]!==t.userLabel||e[4]!==o||e[5]!==a||e[6]!==s?(d=()=>{if(a.length>=Qs)return rt.error(s("thread.branchPicker.capReached",{max:Qs})),null;const l=t.kind==="blog"?Kl(t.userLabel):ql(t.userLabel);return n({branch:l,name:ia(a,s(qs(l))),color:ks(a.length),createdBy:t.userId,createdAt:new Date().toISOString(),...o?{runtime:ea(o.metadata)}:{}}).catch(i=>{rt.error(s("thread.branchPicker.saveError"),{description:Mr(s,Er(i))})}),l},e[0]=n,e[1]=t.kind,e[2]=t.userId,e[3]=t.userLabel,e[4]=o,e[5]=a,e[6]=s,e[7]=d):d=e[7],d}const Xs="-mx-[3px] h-3.5 w-3.5 shrink-0";function Zi(t){const e=I.c(120),{virtualMcpId:s,isV8:a,userLabel:n,value:o,baseBranch:d,baseIsDraft:l,orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,onChange:m,onCreateBranch:g,onAdoptBranch:v,disabled:j,spawnsNewChat:w,placement:x,draftKind:P}=t,y=a===void 0?!1:a,N=l===void 0?!1:l,C=j===void 0?!1:j,A=w===void 0?!1:w,k=x===void 0?"chat":x,D=P===void 0?"site":P,S=ge(),B=Tn()?D:null,T=k==="header",[F,L]=U.useState(!1),[W,q]=U.useState(!1),[X,M]=U.useState("branches"),[H,J]=U.useState(null),[ne,Q]=U.useState(""),[he,Z]=U.useState(null),[re,$]=U.useState(null),ee=U.useRef(null),{releases:K,createRelease:te,renameRelease:se,deleteRelease:Pe}=on(s),ae=B??void 0;let ie;e[0]!==ae||e[1]!==c||e[2]!==n||e[3]!==s?(ie={virtualMcpId:s,userLabel:n,userId:c,kind:ae},e[0]=ae,e[1]=c,e[2]=n,e[3]=s,e[4]=ie):ie=e[4];const de=Xi(ie),{projectDefault:oe}=vs(s);let z;e[5]!==oe?(z=R=>Ul(R,oe)==="sandbox",e[5]=oe,e[6]=z):z=e[6];const fe=z,ke=Ol(s,y),me=y?Ml(K,ke.data):[],Y=ke.refetch,E=El(s),{url:ce,setUrl:Ie,clear:Qe}=Cn(s),Se=An(s),gt=y&&!!Se.connection,Je=y?Se.connection?.endpoint??null:ce,ve=!!Je;let xe;e[7]!==Qe||e[8]!==y||e[9]!==Se?(xe=()=>{Qe(),y&&Se.clear()},e[7]=Qe,e[8]=y,e[9]=Se,e[10]=xe):xe=e[10];const Ae=xe;let Be;e[11]!==F?(Be={enabled:F},e[11]=F,e[12]=Be):Be=e[12];const{data:_e}=qa(Be);let Te;e[13]!==_e?.data?.members?(Te=R=>R?_e?.data?.members?.find(we=>we.userId===R)?.user?.name??void 0:void 0,e[13]=_e?.data?.members,e[14]=Te):Te=e[14];const Rt=Te,Me=K.length>=Qs;let $e;e[15]!==B||e[16]!==oe||e[17]!==K?($e=R=>!!Ms(K,R.branch,B,oe),e[15]=B,e[16]=oe,e[17]=K,e[18]=$e):$e=e[18];const pe=$e,ot=S("thread.branchPicker.capReached",{max:Qs}),{isBase:Ye,current:ct,storeDraft:Fe,unlisted:_}=Ei({value:o,baseBranch:d,releases:K,baseIsDraft:N,storeDrafts:me}),le=Sl(K,B,o);let ye;e[19]!==B||e[20]!==o?(ye=R=>B===null||Xr(R.name)===B||R.name===o,e[19]=B,e[20]=o,e[21]=ye):ye=e[21];const Re=me.filter(ye),Xe=Ye?S("thread.branchPicker.live"):ct?.name??Fe?.name??S(qs(o)),dt=gt?S("thread.branchPicker.localhost.label"):ve?S("thread.branchPicker.localLabel"):o?Xe:S("thread.branchPicker.selectVersion"),Et=gt?"bg-foreground":ve?"bg-special":Ye?"bg-success":Fe?Ps(void 0):Ps(ct?.color??"orange"),Ne=!gt&&!ve&&!Ye&&!!ct&&fe(ct),Ze=R=>{Ae();const we=me.some(Nt=>Nt.name===R)?{runtime:"cms"}:K.find(Nt=>Nt.branch===R);m(R,we&&{runtime:we.runtime}),L(!1)};let ut;e[22]!==S?(ut=R=>{rt.error(S("thread.branchPicker.saveError"),{description:Mr(S,Er(R))})},e[22]=S,e[23]=ut):ut=e[23];const et=ut;let _t;e[24]!==Ie?(_t=R=>{Ie(R),q(!1),L(!1)},e[24]=Ie,e[25]=_t):_t=e[25];const ys=_t,Dt=(R,we)=>{if(Ae(),v){v(R),q(!1),L(!1);return}if(!K.some(Nt=>Nt.branch===R)){if(Me){rt.error(ot);return}te({branch:R,name:we.trim()||R,color:ks(K.length),createdBy:c,createdAt:new Date().toISOString()}).catch(et)}m(R),q(!1),L(!1)};let xt;e[26]!==Ae||e[27]!==m||e[28]!==g||e[29]!==de?(xt=()=>{const R=de();R&&(Ae(),(g??m)(R),L(!1))},e[26]=Ae,e[27]=m,e[28]=g,e[29]=de,e[30]=xt):xt=e[30];const js=xt;let tt;e[31]===Symbol.for("react.memo_cache_sentinel")?(tt=()=>{J(null),Q(""),q(!1),M("branches")},e[31]=tt):tt=e[31];const Tt=tt;let vt;e[32]===Symbol.for("react.memo_cache_sentinel")?(vt=R=>{M(R),q(!0)},e[32]=vt):vt=e[32];const yt=vt;let jt;e[33]===Symbol.for("react.memo_cache_sentinel")?(jt=R=>{J(R.branch),Q(R.name)},e[33]=jt):jt=e[33];const zt=jt;let wt;e[34]!==ne||e[35]!==se||e[36]!==et?(wt=R=>{const we=ne.trim();we&&se(R,we).catch(et),J(null),Q("")},e[34]=ne,e[35]=se,e[36]=et,e[37]=wt):wt=e[37];const Ut=wt,Kt=R=>{const we=R===void 0?o:R,Nt=ne.trim();if(Nt&&we){if(Me){rt.error(ot),J(null),Q("");return}te({branch:we,name:Nt,color:ks(K.length),createdBy:c,createdAt:new Date().toISOString()}).catch(et)}J(null),Q("")};let Pt;e[38]===Symbol.for("react.memo_cache_sentinel")?(Pt=()=>{J(null),Q("")},e[38]=Pt):Pt=e[38];const ht=Pt,Bt=()=>{const R=he;if(Z(null),!(!R||!pe(R))){if(R.branch===o){const we=Ms(K,R.branch,B,oe);we?Ze(we.branch):L(!1)}else L(!1);Pe(R.branch).catch(et)}},ft=_l(le,oe),ws=(ft.content.length>0||Re.length>0)&&ft.code.length>0,It=R=>H===R.branch?r.jsx(fn,{value:ne,onChange:Q,onSave:()=>Ut(R.branch),onCancel:ht},R.branch):r.jsx(mn,{rowRef:!ve&&R.branch===o?ee:void 0,dot:Ps(R.color),codeIcon:fe(R)?Es(R.color):void 0,label:R.name,creator:Rt(R.createdBy),originTooltip:y?S("thread.branchPicker.viaStudioUi"):void 0,branch:!y||fe(R)?R.branch:void 0,selected:!ve&&R.branch===o,onSelect:()=>Ze(R.branch),onRename:()=>zt(R),onDelete:()=>Z(R),deleteBlocked:!pe(R)},R.branch),$t=()=>{const R=re;if($(null),!!R){if(R.name===o){const we=Ms(K,R.name,B,oe);if(!we)return;Ze(we.branch)}E.mutateAsync(R.name).catch(we=>{rt.error(S("thread.branchPicker.discardStoreDraftError"),{description:we instanceof Error?we.message:void 0})})}},mt=Re.map(R=>H===R.name?r.jsx(fn,{value:ne,onChange:Q,onSave:()=>Kt(R.name),onCancel:ht},`store:${R.name}`):r.jsx(mn,{rowRef:!ve&&R.name===o?ee:void 0,dot:Ps(void 0),label:R.name,creator:Rt(R.createdBy),agentIcon:Es(ks(me.indexOf(R))),originTooltip:S("thread.branchPicker.storeDraftVia",{via:zl(R.via)}),selected:!ve&&R.name===o,onSelect:()=>Ze(R.name),onRename:()=>{J(R.name),Q(R.name)},onDelete:()=>$(R),deleteBlocked:R.name===o&&!Ms(K,R.name,B,oe)},`store:${R.name}`));let ze;e[39]!==C||e[40]!==y||e[41]!==Y?(ze=C?void 0:R=>{R?y&&Y():Tt(),L(R)},e[39]=C,e[40]=y,e[41]=Y,e[42]=ze):ze=e[42];const st=T?"text-xs":"text-xs text-muted-foreground hover:text-foreground";let Ue;e[43]!==st?(Ue=G("shrink min-w-0 max-w-[220px] gap-2",st,Ur),e[43]=st,e[44]=Ue):Ue=e[44];let Ke;e[45]!==C?(Ke=!C&&r.jsx(Hr,{size:12,className:"opacity-60 shrink-0"}),e[45]=C,e[46]=Ke):Ke=e[46];let qe;e[47]!==dt?(qe=r.jsx(it,{children:dt}),e[47]=dt,e[48]=qe):qe=e[48];const nt=bl,kt="w-[min(300px,calc(100vw-2rem))] p-1.5",St="start";let Le;e[49]===Symbol.for("react.memo_cache_sentinel")?(Le=R=>{R.preventDefault(),ee.current?.scrollIntoView({block:"nearest"})},e[49]=Le):Le=e[49];let He;e[50]!==A||e[51]!==S?(He=A&&r.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:S("thread.branchPicker.newChatHint")}),e[50]=A,e[51]=S,e[52]=He):He=e[52];const V=W?r.jsx(to,{orgId:i,orgSlug:u,userId:c,target:h,owner:p,repo:b,sandboxMap:f,enabled:F,tab:X,onTabChange:M,isV8:y,localUrl:ce,onSaveLocal:ys,onBack:()=>q(!1),onAdopt:Dt,draftKind:B}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:G("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",y&&"gap-1"),children:[!y&&ve&&Je&&r.jsx(eo,{rowRef:ee,url:Je,onSelect:()=>yt("local"),onEdit:()=>yt("local"),onTurnOff:()=>Ae()}),_&&o&&(H===o?r.jsx(fn,{value:ne,onChange:Q,onSave:()=>Kt(),onCancel:ht}):r.jsx(mn,{rowRef:ve?void 0:ee,dot:Ps("orange"),label:S(qs(o)),branch:y?void 0:o,originTooltip:y?S("thread.branchPicker.viaStudioUi"):void 0,selected:!ve,onSelect:()=>Ze(o),onRename:()=>{J(o),Q(ia(K,S(qs(o))))}})),ws?r.jsxs(r.Fragment,{children:[r.jsx(ir,{children:S("thread.branchPicker.groupContent")}),ft.content.map(It),mt,r.jsx(ir,{divided:!0,children:S("thread.branchPicker.groupCode")}),ft.code.map(It)]}):r.jsxs(r.Fragment,{children:[le.map(It),mt]}),y&&r.jsx(Ui,{virtualMcpId:s,branch:o,serve:Se,rowRef:gt?ee:void 0,onPicked:()=>L(!1)})]}),(_||le.length>0||Re.length>0||y)&&r.jsx("div",{className:"my-1 border-t"}),r.jsxs("button",{type:"button",onClick:()=>{js()},disabled:Me,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[r.jsx(Yr,{className:"h-4 w-4 shrink-0"}),S("thread.branchPicker.newVersion")]}),Me&&r.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:ot}),r.jsxs("button",{type:"button",onClick:()=>yt("branches"),className:G("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",y&&"mt-1"),children:[S("thread.branchPicker.advanced"),r.jsx(Pr,{className:"h-4 w-4 shrink-0"})]})]});let ue;e[53]!==nt||e[54]!==Le||e[55]!==He||e[56]!==V?(ue=r.jsxs(nt,{className:kt,align:St,onOpenAutoFocus:Le,children:[He,V]}),e[53]=nt,e[54]=Le,e[55]=He,e[56]=V,e[57]=ue):ue=e[57];const je=r.jsxs(gl,{open:F,onOpenChange:ze,children:[r.jsxs(at,{children:[r.jsx(lt,{asChild:!0,children:r.jsx("span",{className:"inline-flex min-w-0 shrink",children:r.jsx(xl,{asChild:!0,children:r.jsxs(be,{"data-tour":pl.branchPicker,variant:T?"outline":"ghost",size:T?"sm":"default","aria-label":dt,disabled:C,className:Ue,children:[Ne?r.jsx(Vr,{className:G(Xs,Es(ct?.color))}):Fe&&!ve?r.jsx(kr,{className:G(Xs,Es(ks(me.indexOf(Fe))))}):r.jsx("span",{className:G("h-2 w-2 shrink-0 rounded-full",o||ve?Et:"bg-muted-foreground")}),r.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:dt}),Ke]})})})}),qe]}),ue]}),De=he!==null;let Oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(Oe=R=>{R||Z(null)},e[58]=Oe):Oe=e[58];let Ve;e[59]!==S?(Ve=S("thread.branchPicker.deleteTitle"),e[59]=S,e[60]=Ve):Ve=e[60];let qt;e[61]!==Ve?(qt=r.jsx(Ss,{children:Ve}),e[61]=Ve,e[62]=qt):qt=e[62];let Ht;e[63]!==he||e[64]!==S?(Ht=he&&S("thread.branchPicker.deleteConfirm",{name:he.name}),e[63]=he,e[64]=S,e[65]=Ht):Ht=e[65];let Vt;e[66]!==Ht?(Vt=r.jsx(Ns,{children:Ht}),e[66]=Ht,e[67]=Vt):Vt=e[67];let Gt;e[68]!==qt||e[69]!==Vt?(Gt=r.jsxs(Cs,{children:[qt,Vt]}),e[68]=qt,e[69]=Vt,e[70]=Gt):Gt=e[70];let Wt;e[71]!==S?(Wt=S("thread.branchPicker.cancel"),e[71]=S,e[72]=Wt):Wt=e[72];let Qt;e[73]!==Wt?(Qt=r.jsx(Gs,{children:Wt}),e[73]=Wt,e[74]=Qt):Qt=e[74];let Jt;e[75]!==S?(Jt=S("thread.branchPicker.delete"),e[75]=S,e[76]=Jt):Jt=e[76];let Yt;e[77]!==Bt||e[78]!==Jt?(Yt=r.jsx(Ws,{onClick:Bt,variant:"destructive",children:Jt}),e[77]=Bt,e[78]=Jt,e[79]=Yt):Yt=e[79];let Xt;e[80]!==Qt||e[81]!==Yt?(Xt=r.jsxs(As,{children:[Qt,Yt]}),e[80]=Qt,e[81]=Yt,e[82]=Xt):Xt=e[82];let Zt;e[83]!==Gt||e[84]!==Xt?(Zt=r.jsxs(Rs,{children:[Gt,Xt]}),e[83]=Gt,e[84]=Xt,e[85]=Zt):Zt=e[85];let Fs;e[86]!==De||e[87]!==Zt?(Fs=r.jsx(Ds,{open:De,onOpenChange:Oe,children:Zt}),e[86]=De,e[87]=Zt,e[88]=Fs):Fs=e[88];const un=re!==null;let Ls;e[89]===Symbol.for("react.memo_cache_sentinel")?(Ls=R=>{R||$(null)},e[89]=Ls):Ls=e[89];let es;e[90]!==S?(es=S("thread.branchPicker.deleteTitle"),e[90]=S,e[91]=es):es=e[91];let ts;e[92]!==es?(ts=r.jsx(Ss,{children:es}),e[92]=es,e[93]=ts):ts=e[93];let ss;e[94]!==re||e[95]!==S?(ss=re&&S("thread.branchPicker.discardStoreDraftConfirm",{name:re.name}),e[94]=re,e[95]=S,e[96]=ss):ss=e[96];let ns;e[97]!==ss?(ns=r.jsx(Ns,{children:ss}),e[97]=ss,e[98]=ns):ns=e[98];let rs;e[99]!==ts||e[100]!==ns?(rs=r.jsxs(Cs,{children:[ts,ns]}),e[99]=ts,e[100]=ns,e[101]=rs):rs=e[101];let as;e[102]!==S?(as=S("thread.branchPicker.cancel"),e[102]=S,e[103]=as):as=e[103];let ls;e[104]!==as?(ls=r.jsx(Gs,{children:as}),e[104]=as,e[105]=ls):ls=e[105];let is;e[106]!==S?(is=S("thread.branchPicker.delete"),e[106]=S,e[107]=is):is=e[107];let os;e[108]!==$t||e[109]!==is?(os=r.jsx(Ws,{onClick:$t,variant:"destructive",children:is}),e[108]=$t,e[109]=is,e[110]=os):os=e[110];let cs;e[111]!==ls||e[112]!==os?(cs=r.jsxs(As,{children:[ls,os]}),e[111]=ls,e[112]=os,e[113]=cs):cs=e[113];let ds;e[114]!==rs||e[115]!==cs?(ds=r.jsxs(Rs,{children:[rs,cs]}),e[114]=rs,e[115]=cs,e[116]=ds):ds=e[116];let Os;return e[117]!==un||e[118]!==ds?(Os=r.jsx(Ds,{open:un,onOpenChange:Ls,children:ds}),e[117]=un,e[118]=ds,e[119]=Os):Os=e[119],r.jsxs(r.Fragment,{children:[je,Fs,Os]})}function fn(t){const e=I.c(20),{value:s,onChange:a,onSave:n,onCancel:o}=t,d=ge();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==a?(i=f=>a(f.target.value),e[2]=a,e[3]=i):i=e[3];let u;e[4]!==o||e[5]!==n?(u=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=u):u=e[6];let c;e[7]!==l||e[8]!==i||e[9]!==u||e[10]!==s?(c=r.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:u,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=u,e[10]=s,e[11]=c):c=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let p;e[14]!==n||e[15]!==h?(p=r.jsx(be,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=p):p=e[16];let b;return e[17]!==c||e[18]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[c,p]}),e[17]=c,e[18]=p,e[19]=b):b=e[19],b}function ir(t){const e=I.c(5),{divided:s,children:a}=t,o=(s===void 0?!1:s)&&"mt-1 border-t";let d;e[0]!==o?(d=G("px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",o),e[0]=o,e[1]=d):d=e[1];let l;return e[2]!==a||e[3]!==d?(l=r.jsx("p",{className:d,children:a}),e[2]=a,e[3]=d,e[4]=l):l=e[4],l}function mn(t){const e=I.c(53),{rowRef:s,dot:a,codeIcon:n,agentIcon:o,originTooltip:d,label:l,creator:i,branch:u,selected:c,onSelect:h,onRename:p,onDelete:b,deleteBlocked:f}=t,m=f===void 0?!1:f,g=ge();let v;e[0]!==o||e[1]!==n||e[2]!==a?(v=n?r.jsx(Vr,{className:G(Xs,n)}):o?r.jsx(kr,{className:G(Xs,o)}):r.jsx("span",{className:G("h-2 w-2 shrink-0 rounded-full",a)}),e[0]=o,e[1]=n,e[2]=a,e[3]=v):v=e[3];let j;e[4]!==i?(j=i&&r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:i}),e[4]=i,e[5]=j):j=e[5];let w;e[6]!==l||e[7]!==j?(w=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[l,j]}),e[6]=l,e[7]=j,e[8]=w):w=e[8];let x;e[9]!==h||e[10]!==c||e[11]!==v||e[12]!==w?(x=r.jsxs("button",{type:"button","aria-pressed":c,onClick:h,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[v,w]}),e[9]=h,e[10]=c,e[11]=v,e[12]=w,e[13]=x):x=e[13];const P=x,y=c?"bg-accent":"hover:bg-accent";let N;e[14]!==y?(N=G("group flex items-center rounded-lg",y),e[14]=y,e[15]=N):N=e[15];let C;e[16]!==u||e[17]!==n||e[18]!==d||e[19]!==P||e[20]!==g?(C=u||d?r.jsxs(at,{children:[r.jsx(lt,{asChild:!0,children:P}),r.jsxs(it,{side:"bottom",className:"text-xs",children:[n&&r.jsx("p",{className:"font-medium",children:g("thread.branchPicker.codeDraftTooltip")}),d&&r.jsx("p",{children:d}),u&&r.jsx("p",{className:"font-mono",children:g("thread.branchPicker.branchTooltip",{branch:u})})]})]}):P,e[16]=u,e[17]=n,e[18]=d,e[19]=P,e[20]=g,e[21]=C):C=e[21];let A;e[22]!==g?(A=g("thread.branchPicker.moreActions"),e[22]=g,e[23]=A):A=e[23];let k;e[24]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Qr,{className:"h-4 w-4"}),e[24]=k):k=e[24];let D;e[25]!==A?(D=r.jsx(en,{asChild:!0,children:r.jsx(be,{variant:"ghost",size:"icon","aria-label":A,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:k})}),e[25]=A,e[26]=D):D=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=r.jsx(Jr,{className:"h-4 w-4"}),e[27]=S):S=e[27];let O;e[28]!==g?(O=g("thread.branchPicker.rename"),e[28]=g,e[29]=O):O=e[29];let B;e[30]!==p||e[31]!==O?(B=r.jsxs(fs,{onSelect:p,children:[S,O]}),e[30]=p,e[31]=O,e[32]=B):B=e[32];let T;e[33]!==m||e[34]!==b||e[35]!==g?(T=b&&r.jsxs(fs,{onSelect:b,disabled:m,className:"text-destructive focus:text-destructive",children:[r.jsx(ln,{className:"h-4 w-4"}),g("thread.branchPicker.delete")]}),e[33]=m,e[34]=b,e[35]=g,e[36]=T):T=e[36];let F;e[37]!==m||e[38]!==b||e[39]!==g?(F=b&&m&&r.jsx("p",{className:"max-w-48 px-2 pb-1.5 text-xs text-muted-foreground",children:g("thread.branchPicker.keepOneDraft")}),e[37]=m,e[38]=b,e[39]=g,e[40]=F):F=e[40];let L;e[41]!==B||e[42]!==T||e[43]!==F?(L=r.jsxs(tn,{align:"end",children:[B,T,F]}),e[41]=B,e[42]=T,e[43]=F,e[44]=L):L=e[44];let W;e[45]!==D||e[46]!==L?(W=r.jsxs(sn,{children:[D,L]}),e[45]=D,e[46]=L,e[47]=W):W=e[47];let q;return e[48]!==s||e[49]!==W||e[50]!==N||e[51]!==C?(q=r.jsxs("div",{ref:s,className:N,children:[C,W]}),e[48]=s,e[49]=W,e[50]=N,e[51]=C,e[52]=q):q=e[52],q}function eo(t){const e=I.c(40),{rowRef:s,url:a,onSelect:n,onEdit:o,onTurnOff:d}=t,l=ge();let i;try{let D;e[0]!==a?(D=new URL(a),e[0]=a,e[1]=D):D=e[1],i=D.host}catch{i=a}const u=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=c):c=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let p;e[5]!==u?(p=r.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:u}),e[5]=u,e[6]=p):p=e[6];let b;e[7]!==h||e[8]!==p?(b=r.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,p]}),e[7]=h,e[8]=p,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=r.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let m;e[13]!==l?(m=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(Qr,{className:"h-4 w-4"}),e[15]=g):g=e[15];let v;e[16]!==m?(v=r.jsx(en,{asChild:!0,children:r.jsx(be,{variant:"ghost",size:"icon","aria-label":m,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:g})}),e[16]=m,e[17]=v):v=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(Jr,{className:"h-4 w-4"}),e[18]=j):j=e[18];let w;e[19]!==l?(w=l("thread.branchPicker.rename"),e[19]=l,e[20]=w):w=e[20];let x;e[21]!==o||e[22]!==w?(x=r.jsxs(fs,{onSelect:o,children:[j,w]}),e[21]=o,e[22]=w,e[23]=x):x=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(ln,{className:"h-4 w-4"}),e[24]=P):P=e[24];let y;e[25]!==l?(y=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=y):y=e[26];let N;e[27]!==d||e[28]!==y?(N=r.jsxs(fs,{onSelect:d,className:"text-destructive focus:text-destructive",children:[P,y]}),e[27]=d,e[28]=y,e[29]=N):N=e[29];let C;e[30]!==x||e[31]!==N?(C=r.jsxs(tn,{align:"end",children:[x,N]}),e[30]=x,e[31]=N,e[32]=C):C=e[32];let A;e[33]!==C||e[34]!==v?(A=r.jsxs(sn,{children:[v,C]}),e[33]=C,e[34]=v,e[35]=A):A=e[35];let k;return e[36]!==s||e[37]!==A||e[38]!==f?(k=r.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,A]}),e[36]=s,e[37]=A,e[38]=f,e[39]=k):k=e[39],k}function to(t){const e=I.c(75),{orgId:s,orgSlug:a,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:u,tab:c,onTabChange:h,isV8:p,localUrl:b,onSaveLocal:f,onBack:m,onAdopt:g,draftKind:v}=t,j=ge(),[w,x]=U.useState(""),P=c==="branches"?w:"",y=u&&c==="branches";let N;e[0]!==s||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==P||e[6]!==y||e[7]!==o||e[8]!==n?(N={orgId:s,orgSlug:a,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:P,enabled:y},e[0]=s,e[1]=a,e[2]=d,e[3]=l,e[4]=i,e[5]=P,e[6]=y,e[7]=o,e[8]=n,e[9]=N):N=e[9];const{recent:C,yours:A,others:k,isLoading:D,hasMore:S,isFetchingMore:O,fetchMore:B}=Ji(N),T=u&&c==="prs";let F;e[10]!==s||e[11]!==a||e[12]!==d||e[13]!==l||e[14]!==T||e[15]!==o?(F={orgId:s,orgSlug:a,target:o,owner:d,repo:l,enabled:T},e[10]=s,e[11]=a,e[12]=d,e[13]=l,e[14]=T,e[15]=o,e[16]=F):F=e[16];const{data:L,isLoading:W}=$l(F);let q;if(e[17]!==v||e[18]!==B||e[19]!==S||e[20]!==O||e[21]!==D||e[22]!==p||e[23]!==b||e[24]!==g||e[25]!==m||e[26]!==f||e[27]!==h||e[28]!==k||e[29]!==d||e[30]!==W||e[31]!==C||e[32]!==l||e[33]!==w||e[34]!==j||e[35]!==L||e[36]!==c||e[37]!==A){const X=L===void 0?[]:L,M=`${d}/${l}`;let H;e[39]!==M?(H=M.toLowerCase(),e[39]=M,e[40]=H):H=e[40];const J=H;let ne;e[41]!==J?(ne=z=>z.headRepoFullName?.toLowerCase()===J,e[41]=J,e[42]=ne):ne=e[42];const Q=X.filter(ne);let he;if(e[43]!==v||e[44]!==k||e[45]!==C||e[46]!==A){const z=new Set;he=[...C,...A,...k].filter(fe=>z.has(fe.name)?!1:(z.add(fe.name),v!=="site"||Xr(fe.name)==="site")),e[43]=v,e[44]=k,e[45]=C,e[46]=A,e[47]=he}else he=e[47];const Z=he;let re;e[48]===Symbol.for("react.memo_cache_sentinel")?(re=r.jsx(wl,{className:"h-4 w-4 shrink-0"}),e[48]=re):re=e[48];let $;e[49]!==j?($=j("thread.branchPicker.advancedBack"),e[49]=j,e[50]=$):$=e[50];let ee;e[51]!==m||e[52]!==$?(ee=r.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[re,$]}),e[51]=m,e[52]=$,e[53]=ee):ee=e[53];let K;e[54]!==h?(K=z=>{h(z),x("")},e[54]=h,e[55]=K):K=e[55];let te;e[56]!==j?(te=j("thread.branchPicker.branchesTab"),e[56]=j,e[57]=te):te=e[57];let se;e[58]!==te?(se=r.jsx(Ft,{value:"branches",className:"h-6 px-2.5 text-xs",children:te}),e[58]=te,e[59]=se):se=e[59];let Pe;e[60]!==j?(Pe=j("thread.branchPicker.prsTab"),e[60]=j,e[61]=Pe):Pe=e[61];let ae;e[62]!==Pe?(ae=r.jsx(Ft,{value:"prs",className:"h-6 px-2.5 text-xs",children:Pe}),e[62]=Pe,e[63]=ae):ae=e[63];let ie;e[64]!==p||e[65]!==j?(ie=!p&&r.jsx(Ft,{value:"local",className:"h-6 px-2.5 text-xs",children:j("thread.branchPicker.localTab")}),e[64]=p,e[65]=j,e[66]=ie):ie=e[66];let de;e[67]!==se||e[68]!==ae||e[69]!==ie?(de=r.jsxs(Kr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[se,ae,ie]}),e[67]=se,e[68]=ae,e[69]=ie,e[70]=de):de=e[70];let oe;e[71]!==K||e[72]!==de||e[73]!==c?(oe=r.jsx(qr,{className:"px-2 pt-2 pb-1",value:c,onValueChange:K,children:de}),e[71]=K,e[72]=de,e[73]=c,e[74]=oe):oe=e[74],q=r.jsxs("div",{className:"flex flex-col",children:[ee,oe,c==="local"&&!p?r.jsx(zi,{url:b,onSave:f}):r.jsxs(vl,{filter:c==="branches"?so:void 0,children:[r.jsx(yl,{placeholder:j(c==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:w,onValueChange:x}),r.jsx(jl,{onScroll:z=>{const fe=z.currentTarget;c==="branches"&&fe.scrollHeight-fe.scrollTop-fe.clientHeight<48&&B()},children:c==="branches"?r.jsxs(r.Fragment,{children:[D&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingMore")}),!D&&Z.length===0&&r.jsx(er,{children:j("thread.branchPicker.noBranchesFound")}),Z.length>0&&r.jsx(tr,{children:Z.map(z=>r.jsxs(sr,{value:z.name,className:"cursor-pointer",onSelect:()=>g(z.name,z.name),children:[r.jsx(Ha,{className:"mr-2 h-4 w-4 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:z.name})]},z.name))}),S&&r.jsx("div",{className:"p-2",children:r.jsx(be,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:O,onClick:B,children:j(O?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):r.jsxs(r.Fragment,{children:[W&&r.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:j("thread.branchPicker.loadingPullRequests")}),!W&&Q.length===0&&r.jsx(er,{children:j("thread.branchPicker.noOpenPullRequests")}),Q.length>0&&r.jsx(tr,{children:Q.map(z=>r.jsxs(sr,{value:`#${z.number} ${z.title} ${z.head}`,className:"cursor-pointer",onSelect:()=>g(z.head,lr(z.title)),children:[r.jsx(an,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsx("span",{className:"truncate",children:lr(z.title)}),r.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",z.number," · ",z.head]})]})]},z.number))})]})})]})]}),e[17]=v,e[18]=B,e[19]=S,e[20]=O,e[21]=D,e[22]=p,e[23]=b,e[24]=g,e[25]=m,e[26]=f,e[27]=h,e[28]=k,e[29]=d,e[30]=W,e[31]=C,e[32]=l,e[33]=w,e[34]=j,e[35]=L,e[36]=c,e[37]=A,e[38]=q}else q=e[38];return q}function so(t,e){return xn(t,e)?1:0}function no(t){const e=I.c(20),{locked:s,placement:a,value:n,virtualMcpId:o,isV8:d,userLabel:l,baseBranch:i,baseIsDraft:u,onChange:c,onCreateBranch:h,onAdoptBranch:p,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,draftKind:x}=t;let P;return e[0]!==i||e[1]!==u||e[2]!==x||e[3]!==d||e[4]!==s||e[5]!==p||e[6]!==c||e[7]!==h||e[8]!==b||e[9]!==f||e[10]!==v||e[11]!==a||e[12]!==j||e[13]!==w||e[14]!==g||e[15]!==m||e[16]!==l||e[17]!==n||e[18]!==o?(P=r.jsx(Zi,{virtualMcpId:o,isV8:d,userLabel:l,value:n,baseBranch:i,baseIsDraft:u,orgId:b,orgSlug:f,userId:m,target:g,owner:v,repo:j,sandboxMap:w,onChange:c,onCreateBranch:h,onAdoptBranch:p,spawnsNewChat:s,placement:a,draftKind:x}),e[0]=i,e[1]=u,e[2]=x,e[3]=d,e[4]=s,e[5]=p,e[6]=c,e[7]=h,e[8]=b,e[9]=f,e[10]=v,e[11]=a,e[12]=j,e[13]=w,e[14]=g,e[15]=m,e[16]=l,e[17]=n,e[18]=o,e[19]=P):P=e[19],P}function ro(t){const e=I.c(2),{branchPill:s}=t;if(!s)return null;let a;return e[0]!==s?(a=r.jsx(r.Fragment,{children:s}),e[0]=s,e[1]=a):a=e[1],a}function ao(t){const{locked:e,sessionRuntime:s,projectRuntime:a,draftRuntime:n,current:o}=t;return t.contentOnly&&n==="cms"?s==="cms"&&!e?{kind:"switch"}:{kind:"new-chat",runtime:"cms"}:n==="sandbox"&&s!=="sandbox"?{kind:"new-chat",runtime:"sandbox"}:n==="cms"&&s==="sandbox"&&a==="cms"&&!o?{kind:"new-chat"}:e?s==="sandbox"?{kind:"new-chat",runtime:"sandbox"}:{kind:"new-chat"}:{kind:"switch"}}function lo(t){const e=I.c(25),{virtualMcp:s,currentBranch:a}=t,n=al(),o=xs();let d;e[0]!==n?.messages||e[1]!==o?.isThreadLocked?(d=(n?.messages??[]).length>0||(o?.isThreadLocked??!1),e[0]=n?.messages,e[1]=o?.isThreadLocked,e[2]=d):d=e[2];const l=d,i=o?.setCurrentTaskBranch,u=o?.createTask,c=Zr()==="blog"?"blog":"site",h=vs(s?.id),p=h.runtime,b=s?.metadata;let f;e[3]!==b?(f=ea(b),e[3]=b,e[4]=f):f=e[4];const m=f,g=m==="cms"&&p==="sandbox",v=Rl(s),j=Ee(v),{data:w}=nn.useSession(),x=w?.user;let P;e[5]!==x?(P=Bn(x),e[5]=x,e[6]=P):P=e[6];const y=P,N=w?.user?.id??"",{org:C}=Bs(),A=Fl(s,a),k=In(s?.id),D=k&&p==="cms";let S;e[7]!==u||e[8]!==a||e[9]!==l||e[10]!==m||e[11]!==p||e[12]!==h.resolved||e[13]!==i||e[14]!==k?(S=(X,M)=>{const H=ao({locked:l,sessionRuntime:h.resolved?p:null,projectRuntime:m,draftRuntime:M&&(M.runtime??m),current:X===a,contentOnly:k});H.kind==="new-chat"&&u?u({branch:X,...H.runtime?{runtime:H.runtime}:{}}):i&&i(X)},e[7]=u,e[8]=a,e[9]=l,e[10]=m,e[11]=p,e[12]=h.resolved,e[13]=i,e[14]=k,e[15]=S):S=e[15];const O=S;let B;e[16]!==g||e[17]!==u||e[18]!==l||e[19]!==i?(B=X=>{(l||g)&&u?u({branch:X}):i&&i(X)},e[16]=g,e[17]=u,e[18]=l,e[19]=i,e[20]=B):B=e[20];const T=B;let F;e[21]!==u?(F=u?X=>u({runtime:"sandbox",branch:X}):void 0,e[21]=u,e[22]=F):F=e[22];const L=F,W=v&&ta(j)?r.jsx(no,{userLabel:y,virtualMcpId:s?.id??"",isV8:k,value:a,baseBranch:A,baseIsDraft:D,orgId:C.id,orgSlug:C.slug,userId:N,target:j,owner:v.owner,repo:v.name,sandboxMap:s?.metadata?.sandboxMap,onChange:O,onCreateBranch:T,onAdoptBranch:L,locked:l,placement:"chat",draftKind:c},`${sa(j)}:${v.owner}/${v.name}`):null;let q;return e[23]!==W?(q=r.jsx(ro,{branchPill:W}),e[23]=W,e[24]=q):q=e[24],q}const io=Va("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function oo(t){const e=I.c(11);let s,a,n;e[0]!==t?({className:s,orientation:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==s||e[5]!==a?(o=G(io({orientation:a}),s),e[4]=s,e[5]=a,e[6]=o):o=e[6];let d;return e[7]!==a||e[8]!==n||e[9]!==o?(d=r.jsx("div",{role:"group","data-slot":"button-group","data-orientation":a,className:o,...n}),e[7]=a,e[8]=n,e[9]=o,e[10]=d):d=e[10],d}function co(t){const e=I.c(14),{item:s}=t;let a;e[0]!==s?(a=()=>{s.onSelect()},e[0]=s,e[1]=a):a=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==a?(n=r.jsxs(fs,{disabled:s.disabled,onSelect:a,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=a,e[6]=n):n=e[6];const o=n;if(!s.tooltip)return o;let d;e[7]!==o?(d=r.jsx(lt,{asChild:!0,children:o}),e[7]=o,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=r.jsx(it,{side:"right",children:s.tooltip}),e[9]=s.tooltip,e[10]=l):l=e[10];let i;return e[11]!==d||e[12]!==l?(i=r.jsxs(at,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=i):i=e[13],i}function ba(t){const e=I.c(20),{label:s,onClick:a,variant:n,size:o,disabled:d,loading:l,pulse:i,tooltip:u,icon:c,items:h,menuAriaLabel:p,className:b}=t,f=n===void 0?"default":n,m=o===void 0?"default":o,g=d===void 0?!1:d,v=l===void 0?!1:l,j=i===void 0?!1:i,w=(h?.length??0)>0;let x;if(e[0]!==b||e[1]!==g||e[2]!==w||e[3]!==c||e[4]!==h||e[5]!==s||e[6]!==v||e[7]!==p||e[8]!==a||e[9]!==j||e[10]!==m||e[11]!==u||e[12]!==f){const P=G(Ur,f==="default"&&"focus-visible:inset-ring-current");let y;e[14]!==c||e[15]!==v?(y=v?r.jsx(ms,{size:"xs"}):c,e[14]=c,e[15]=v,e[16]=y):y=e[16];const N=r.jsxs(be,{type:"button",variant:f,size:m,disabled:g,"aria-busy":v||void 0,onClick:v?void 0:a,className:G(P,w&&"rounded-r-none border-r border-current/20"),children:[y,s]}),C=j&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let A;e[17]!==b||e[18]!==C?(A=G(C,b),e[17]=b,e[18]=C,e[19]=A):A=e[19],x=r.jsxs(oo,{className:A,children:[u?r.jsxs(at,{children:[r.jsx(lt,{asChild:!0,children:r.jsx("span",{className:G("inline-flex rounded-lg outline-none",P,g&&"cursor-not-allowed"),tabIndex:g?0:void 0,role:g?"button":void 0,"aria-disabled":g||void 0,children:N})}),r.jsx(it,{children:u})]}):N,w?r.jsxs(sn,{children:[r.jsx(en,{asChild:!0,children:r.jsx(be,{type:"button",variant:f,size:m,"aria-label":p,className:G("has-[>svg]:px-2",P),children:r.jsx(Hr,{className:"size-3.5"})})}),r.jsx(tn,{align:"end",children:h?.map(uo)})]}):null]}),e[0]=b,e[1]=g,e[2]=w,e[3]=c,e[4]=h,e[5]=s,e[6]=v,e[7]=p,e[8]=a,e[9]=j,e[10]=m,e[11]=u,e[12]=f,e[13]=x}else x=e[13];return x}function uo(t){return r.jsx(co,{item:t},t.key)}async function ho(t){if(t.hosted)return;const e=t.branch;await t.setCurrentTaskBranch(t.nextBranch()),e&&e!==t.baseBranch&&await t.deleteRelease(e)}function fo(t,e,{hosted:s}){return s&&t!==null?t:e}function mo(t,e){const s=I.c(11),[a,n]=U.useState(null);let o;s[0]!==a||s[1]!==t||s[2]!==e?(o=fo(a,t,e),s[0]=a,s[1]=t,s[2]=e,s[3]=o):o=s[3];let d;s[4]!==t||s[5]!==e?(d=()=>n(e.hosted?t:null),s[4]=t,s[5]=e,s[6]=d):d=s[6];let l;s[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n(null),s[7]=l):l=s[7];let i;return s[8]!==o||s[9]!==d?(i={shown:o,hold:d,release:l},s[8]=o,s[9]=d,s[10]=i):i=s[10],i}function po({open:t,hosted:e}){return t||e}function ga(t){return ri({userName:t?.name,userEmail:t?.email})??void 0}function cn(t){const e=I.c(18),{state:s,header:a,body:n,note:o,gate:d,footer:l}=t,i=s!=="ready";let u;e[0]!==a?(u=r.jsx("div",{className:"space-y-0.5 px-4 py-3",children:a}),e[0]=a,e[1]=u):u=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("div",{className:"border-t"}),e[2]=c):c=e[2];let h;e[3]!==o?(h=o?r.jsx("div",{className:"space-y-1.5 border-t px-4 py-3",children:o}):null,e[3]=o,e[4]=h):h=e[4];let p;e[5]!==n||e[6]!==h?(p=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=p):p=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=r.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let m;return e[11]!==d||e[12]!==s||e[13]!==i||e[14]!==u||e[15]!==p||e[16]!==f?(m=r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":i,children:[u,c,p,d,b,f]}),e[11]=d,e[12]=s,e[13]=i,e[14]=u,e[15]=p,e[16]=f,e[17]=m):m=e[17],m}function Ts(t){const e=I.c(2),{children:s}=t;let a;return e[0]!==s?(a=r.jsx("div",{className:"scroll-fade min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 pt-3 pb-2 [scrollbar-width:thin]",children:s}),e[0]=s,e[1]=a):a=e[1],a}function xa(t){const e=I.c(10);let s,a,n;e[0]!==t?({className:a,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==a?(o=G("rounded-lg border bg-card px-3 py-2.5",a),e[4]=a,e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==o?(d=r.jsx("div",{className:o,...n,children:s}),e[6]=s,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function We(t){const e=I.c(4),{className:s}=t;let a;e[0]!==s?(a=G("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=a):a=e[1];let n;return e[2]!==a?(n=r.jsx("div",{className:a}),e[2]=a,e[3]=n):n=e[3],n}function Lt(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(xa,{children:r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(We,{className:"size-4 rounded-md"}),r.jsx(We,{className:"h-3 w-24"}),r.jsx(We,{className:"h-2.5 w-16"}),r.jsx(We,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}const bo="secret";function va(t){return t.kind!=="block"?null:t.namedRule??null}function go(t,e){const s=e.find(a=>a&&typeof a=="object");return s?Xl(s.__resolveType):Zl(t)}const xo=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function Kn(t){const e=xo.exec(t)?.[1];return e?Ci(e):null}function Zs(t){if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}return null}function vo(t,e){return t===null?"new":e===null?"removed":"edited"}function ya(t){const e=t.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return e?(e.charAt(0).toUpperCase()+e.slice(1)).replace(/\s+[A-Z](?=[a-z])/g,s=>s.toLowerCase()):t}function hs(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.__resolveType;if(typeof a=="string"&&a.trim()){if(s)return Ga(a);const o=(a.split("/").pop()??a).replace(/\.[jt]sx?$/,"");return ya(o)||o}}return`Section ${e+1}`}function qn(t){if(Sr(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&Wa(e)?t.section??null:null}const ja=6;function Hs(t,e=0){if(e>ja||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>Hs(n,e+1));const s=t;if(Pn(s.__resolveType))return vn(s).flatMap(n=>Hs(n?.value,e+1));const a=qn(s);return a!==null?Hs(a,e+1):[s]}function vn(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function or(t){let e=t;for(let s=0;s<ja;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const a=e;if(Pn(a.__resolveType))return a;const n=qn(a);if(n===null)return null;e=n}return null}function yo(t,e,s){const a=vn(or(t)),n=e?vn(or(e)):[],o=e?Array.from({length:Math.max(a.length,n.length)},(i,u)=>u).filter(i=>!dn(a[i],n[i])):[],l=[...o.map(i=>a[i]??n[i]),...a.filter((i,u)=>!o.includes(u))].flatMap(i=>Hs(i?.value)).map(i=>hs(i,s,!0));return[...new Set(l)]}function pn(t,e,s,a,n){let o=t,d=!1;for(let i=0;i<4;i++){if(!o||typeof o!="object"||Array.isArray(o)){d=!0;break}const u=o;if(Pn(u.__resolveType)){d=!0;break}const c=qn(u);if(c===null)break;o=c}const l=d?yo(t,n,e):[];return{name:hs(d?t:o,e,!0),kind:"section",status:s,fields:a,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function yn(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((a,n)=>a&&typeof a=="object"&&!Array.isArray(a)?[{section:a,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const a=s.variants;if(Array.isArray(a))return a.flatMap((n,o)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&Sr(d),i=l?d.value:d;if(!Array.isArray(i))return[];const u=l?["sections","variants",o,"value","value"]:["sections","variants",o,"value"];return i.flatMap((c,h)=>c&&typeof c=="object"&&!Array.isArray(c)?[{section:c,basePath:[...u,h]}]:[])})}return[]}function cr(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const a=s;return Object.keys(a).sort().reduce((n,o)=>(n[o]=a[o],n),{})}return s})}function dn(t,e){return t===void 0&&e===void 0?!0:cr(t)===cr(e)}function At(t,e,s,a=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),o=[];for(const d of n){if(d.startsWith("__")||a.has(d))continue;const l=t?t[d]:void 0,i=e?e[d]:void 0;dn(l,i)||o.push({label:ya(d),path:[...s,d],from:l,to:i})}return o}function jo(t,e){const s=e.find(a=>a&&typeof a=="object");return s?s.__resolveType===li:t===ii}function wo(t,e){const s=n=>n===void 0||!!n&&typeof n=="object"&&!Array.isArray(n)&&!("__resolveType"in n),a=[];for(const n of At(t,e,[])){const o=String(n.path[0]);s(n.from)&&s(n.to)?a.push(...At(n.from??{},n.to??{},[o])):a.push(n)}return a}const Po=new Set(["sections"]);function Hn(t,e,s=!1){const a=t?yn(t,s):[],n=e?yn(e,s):[],o=[],d=Math.max(a.length,n.length);for(let i=0;i<d;i++){const u=a[i],c=n[i];if(!s){const h=ko(u,c,i);h&&o.push(h);continue}if(u&&c){if(dn(u.section,c.section))continue;o.push(pn(c.section,i,"edited",At(u.section,c.section,c.basePath),u.section))}else c?o.push(pn(c.section,i,"new",[])):u&&o.push(pn(u.section,i,"removed",[]))}const l=At(t,e,[],Po);return l.length>0&&o.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),o}function ko(t,e,s){return t&&e?dn(t.section,e.section)?null:{name:hs(e.section,s),kind:"section",status:"edited",fields:At(t.section,e.section,e.basePath)}:e?{name:hs(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:hs(t.section,s),kind:"section",status:"removed",fields:[]}:null}function jn(t,e){return{kind:"other",blockKey:null,name:t.split("/").pop()??t,pagePath:null,isSiteApp:!1,status:e,filepaths:[t],sections:[],fromJson:null,toJson:null}}function So(t){const e=[],s=[],a=[],n=[];for(const[o,d]of Object.entries(t?.diffs??{})){if(On(o)){n.push(o);continue}const l=vo(d.from,d.to),i=Kn(o);if(!i){a.push(jn(o,l));continue}const u=Zs(d.from),c=Zs(d.to),h=c??u;if(!h){a.push(jn(o,l));continue}const p=us(i,h);if(p){e.push({kind:"page",blockKey:i,name:p.name,pagePath:p.path,isSiteApp:!1,status:l,filepaths:[o],sections:l==="edited"?Hn(u,c):[],fromJson:u,toJson:c});continue}const b=$n(i,h);s.push({kind:"block",blockKey:i,name:Js(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:Js(i,h),kind:"section",status:"edited",fields:At(u,c,[])}].filter(f=>f.fields.length>0):[],fromJson:u,toJson:c})}return wa({pages:e,blocks:s,other:a,generated:n})}function bn(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function wa(t){const{pages:e,blocks:s,other:a,generated:n}=t;return e.sort(bn),s.sort(bn),a.sort(bn),{pages:e,blocks:s,other:a,generated:n,count:e.length+s.length+a.length}}function No(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function Pa(t){return t.startsWith("pages-")}function ka(t){const{files:e,lookup:s,diff:a}=t,n=[],o=[],d=[],l=[];for(const i of e){const u=i.path;if(On(u)){l.push(u);continue}const c=No(i.status),h=Kn(u);if(!h){d.push(jn(u,c));continue}const p=a?.diffs[u],b=Zs(p?.from??null),f=Zs(p?.to??null),m=Sa(s,h),g=m??f??b;if((m?us(h,m):null)??(!m&&Pa(h))){const w=g?us(h,g):null;n.push({kind:"page",blockKey:h,name:w?.name??da(h),pagePath:w?.path??null,isSiteApp:!1,status:c,filepaths:[u],sections:c==="edited"?Hn(b,f):[],fromJson:b,toJson:f??(c==="new"?m:null)});continue}const j=Js(h,g??{});o.push({kind:"block",blockKey:h,name:j,pagePath:null,isSiteApp:$n(h,m??{}),status:c,filepaths:[u],sections:c==="edited"?[{name:j,kind:"section",status:"edited",fields:At(b,f,[])}].filter(w=>w.fields.length>0):[],fromJson:b,toJson:f})}return wa({pages:n,blocks:o,other:d,generated:l})}function Sa(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function Co(t,e){return t??e}function Na(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const gn=3;function _s(t){if(t.length<=gn)return Na(t);const e=t.length-gn;return`${t.slice(0,gn).join(", ")} and ${e} more`}function Ao(t,e){if(!e){const a=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return a.length>0?`${t.name} (${a.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(a=>a.kind==="section").flatMap(a=>a.wrapper?a.held??[]:[a.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function Ro(t){const e=va(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function Do(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),a=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${_s(s.map(l=>Ao(l,!!t.v8)))}`),a.length>0){const l=a.length===1?"page":"pages";e.push(`added the ${_s(a.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${_s(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(Ro);if(o.length>0&&e.push(`changed ${_s(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=Na(e);return ai(d.charAt(0).toUpperCase()+d.slice(1))}function To(t,e){return t?yn(t,e).length:0}function Bo(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?To(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const a of t.sections){if(a.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=a.fields.length}return s}const dr="••••••";function ps(t){if(Array.isArray(t))return t.map(ps);if(!t||typeof t!="object")return t;const e=t,s={};for(const[a,n]of Object.entries(e))s[a]=ps(n);return e.__resolveType===bo&&"ciphertext"in e&&(s.ciphertext=dr),Ja(e)&&"encrypted"in e&&(s.encrypted=dr),s}function ur(t){return t.map(e=>({...e,from:ps(e.from),to:ps(e.to)}))}function Io(t){const{changes:e,sides:s,lookup:a,meta:n,hosted:o}=t,d=[],l=[],i=c=>[...new Set((s?.diagnostics??[]).filter(h=>Xn(Qa(h.file))===Xn(c)).map(h=>h.side))],u=Object.keys(e).sort((c,h)=>c<h?-1:c>h?1:0);for(const c of u){const h=e[c],p=h.kind==="delete"?"removed":h.baseVersion===null?"new":"edited",b=s?.entries[c],f=b?.before??null,m=b?.after??null,g=Sa(a,c),v=g??m??f,j=i(c),w={blockKey:c,status:p,filepaths:[],entry:{name:c,version:h.version},...j.length>0?{unreadable:j}:{},fromJson:ps(f),toJson:ps(m??(p==="new"?g:null))},x=g?us(c,g,n):null,P=!g&&v?us(c,v,n):null;if(x??P??(!v&&Pa(c))){const k=v?us(c,v,n):null;d.push({...w,kind:"page",name:k?.name??da(c),pagePath:k?.path??null,isSiteApp:!1,sections:p==="edited"?Hn(f,m,!0).map(D=>({...D,fields:ur(D.fields)})):[]});continue}const y=o?Jl(c,v,g,m,f):null,N=y?Yl(y,[v,g,m,f]):Js(c,v??{}),C=go(c,[g,m,f]),A=jo(c,[g,m,f]);l.push({...w,kind:"block",name:A?"Settings":N,...A?{cmsSettings:!0}:{},...y?{blogKind:y}:{},...C?{namedRule:C}:{},pagePath:null,isSiteApp:$n(c,g??v??{}),sections:p==="edited"?[{name:A?"Settings":N,kind:"section",status:"edited",fields:ur(A?wo(f,m):At(f,m,[]))}].filter(k=>k.fields.length>0):[]})}return{pages:d,blocks:l,other:[],generated:[],count:d.length+l.length,v8:!0}}function Ce(t){return t.filepaths[0]??t.blockKey??t.name}function $o(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function Fo(t,e){const s=t.kind==="block"?mi:Gr;return r.jsx("span",{title:$o(t.status,e),className:"flex shrink-0",children:r.jsx(s,{className:G("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function Lo(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;if(t.blogKind)return ei(t.blogKind,e);if(t.cmsSettings)return e("thread.publishPopover.settingsDetail");const s=va(t);return s==="experiments"?e("thread.publishPopover.abTests"):s==="campaigns"?e("thread.publishPopover.campaignDates"):t.isSiteApp?e("thread.publishPopover.siteConfiguration"):e("thread.publishPopover.globalSection")}function Oo(t,e,s){const a=Bo(t,s);if(a.newPageSections!==null)return[a.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:a.newPageSections})];const n=[];return a.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):a.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:a.sections})),a.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):a.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:a.fields})),a.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function Ca(t){const e=I.c(46),{change:s,bodyPending:a,selected:n,onSelect:o,confirming:d,onConfirmingChange:l,onDiscard:i,isPublishing:u,isDiscarding:c,v8:h}=t,p=a===void 0?!1:a,b=h===void 0?!1:h,f=ge();let m;e[0]!==s||e[1]!==f?(m=Lo(s,f),e[0]=s,e[1]=f,e[2]=m):m=e[2];const g=m;let v;if(e[3]!==p||e[4]!==s||e[5]!==d||e[6]!==g||e[7]!==c||e[8]!==u||e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==n||e[13]!==f||e[14]!==b){const j=Oo(s,f,b),w=p&&j.length===0&&s.status==="edited",x=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let P;e[16]!==x?(P=G("cursor-pointer transition-colors hover:bg-accent",x),e[16]=x,e[17]=P):P=e[17];let y;e[18]!==s?(y=Ce(s),e[18]=s,e[19]=y):y=e[19];let N;e[20]!==s||e[21]!==f?(N=Fo(s,f),e[20]=s,e[21]=f,e[22]=N):N=e[22];let C;e[23]!==s.cmsSettings||e[24]!==s.name||e[25]!==f?(C=s.cmsSettings?f("thread.publishPopover.settings"):s.name,e[23]=s.cmsSettings,e[24]=s.name,e[25]=f,e[26]=C):C=e[26];let A;e[27]!==C?(A=r.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[27]=C,e[28]=A):A=e[28];let k;e[29]!==g?(k=g?r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:g}):null,e[29]=g,e[30]=k):k=e[30];let D;e[31]!==n||e[32]!==A||e[33]!==k?(D=r.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[A,k]}),e[31]=n,e[32]=A,e[33]=k,e[34]=D):D=e[34];let S;e[35]!==d||e[36]!==c||e[37]!==u||e[38]!==l||e[39]!==i||e[40]!==f?(S=d?r.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[r.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:B=>{B.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),r.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:B=>{B.stopPropagation(),l(!1),i?.()},disabled:c,children:f("thread.publishPopover.discard")})]}):i?r.jsx(rn,{children:r.jsxs(at,{children:[r.jsx(lt,{asChild:!0,children:r.jsx(be,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:B=>{B.stopPropagation(),l(!0)},disabled:u||c,children:r.jsx(ln,{className:"size-3.5"})})}),r.jsx(it,{children:f("thread.publishPopover.discard")})]})}):null,e[35]=d,e[36]=c,e[37]=u,e[38]=l,e[39]=i,e[40]=f,e[41]=S):S=e[41];let O;e[42]!==D||e[43]!==S||e[44]!==N?(O=r.jsxs("div",{className:"flex items-center gap-2.5",children:[N,D,S]}),e[42]=D,e[43]=S,e[44]=N,e[45]=O):O=e[45],v=r.jsxs(xa,{className:P,"data-change-id":y,onClick:o,children:[O,j.length>0?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:j.map(Mo)}):w?r.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:r.jsx(We,{className:"h-4 w-2/3"})}):null]}),e[3]=p,e[4]=s,e[5]=d,e[6]=g,e[7]=c,e[8]=u,e[9]=l,e[10]=i,e[11]=o,e[12]=n,e[13]=f,e[14]=b,e[15]=v}else v=e[15];return v}function Mo(t,e){return r.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function Aa(){const t=I.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:-1,height:-1},t[0]=e):e=t[0];const[s,a]=U.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const i=()=>a(c=>c.width===l.clientWidth&&c.height===l.clientHeight?c:{width:l.clientWidth,height:l.clientHeight});i();const u=new ResizeObserver(i);return u.observe(l),()=>u.disconnect()},t[1]=n):n=t[1];const o=n;let d;return t[2]!==s?(d=[s,o],t[2]=s,t[3]=d):d=t[3],d}function Eo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const _o=[{width:"w-3/4",tone:"ctx"},{width:"w-1/2",tone:"del"},{width:"w-3/5",tone:"add"},{width:"w-2/5",tone:"ctx"},{width:"w-4/5",tone:"add"},{width:"w-1/2",tone:"ctx"}];function hr(t){const e=I.c(10),{height:s}=t,a=ge();let n;e[0]!==s?(n={height:s},e[0]=s,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=_o.map(zo),e[2]=o):o=e[2];let d;e[3]!==a?(d=a("thread.publishDialog.openingComparison"),e[3]=a,e[4]=d):d=e[4];let l;e[5]!==d?(l=r.jsx("div",{className:"flex items-center justify-center pt-1 text-2xs text-muted-foreground",children:d}),e[5]=d,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=r.jsxs("div",{style:n,className:"flex w-full flex-col gap-1.5 overflow-hidden px-3 py-2",children:[o,l]}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function zo(t,e){return r.jsxs("div",{className:G("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[r.jsx("div",{className:G("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),r.jsx("div",{className:G("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const Ra={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},Uo={...Ra,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function Ko(t){const e=I.c(11),{diff:s,emptyMessage:a,rowClassName:n,onDiscardFile:o,hideFileRows:d,editorHeight:l}=t,i=a===void 0?"No file changes in the working tree":a,u=n===void 0?"px-6":n,c=d===void 0?!1:d,h=l===void 0?"380px":l,[p,b]=U.useState(null),[f,m]=U.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=Eo(),e[0]=g):g=e[0];const v=g;if(!s||Object.keys(s.diffs).length===0){let w;return e[1]!==i?(w=r.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:i}),e[1]=i,e[2]=w):w=e[2],w}let j;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==p||e[7]!==c||e[8]!==o||e[9]!==u?(j=r.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(w=>{const[x,P]=w,{from:y,to:N}=P,C=p===x,A=y===null,k=N===null,D=x.startsWith("/")?x.slice(1):x,S=D.lastIndexOf("/"),O=S>=0?D.slice(S+1):D,B=S>=0?D.slice(0,S):null,T=Ai(x),F=A?"bg-success":k?"bg-destructive":"bg-warning";return c?r.jsx("div",{children:r.jsx(nr,{original:y??"",modified:N??"",language:T,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Uo})},x):r.jsxs("div",{children:[r.jsxs("div",{className:G("flex items-center gap-3 py-3 hover:bg-accent",u),children:[r.jsx("button",{type:"button",className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground transition-transform hover:text-foreground",onClick:()=>b(C?null:x),children:r.jsx(Pr,{className:G("h-3.5 w-3.5 transition-transform",C&&"rotate-90")})}),r.jsx("div",{className:G("h-2.5 w-2.5 shrink-0 rounded-full",F)}),r.jsx(Gr,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:O}),B&&r.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:B}),o?r.jsxs(sn,{children:[r.jsx(en,{asChild:!0,children:r.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:r.jsx(Ya,{className:"h-3.5 w-3.5"})})}),r.jsx(tn,{align:"end",children:r.jsx(fs,{className:"text-destructive focus:text-destructive",onSelect:()=>m(x),children:"Discard changes"})})]}):null]}),f===x&&o?r.jsxs("div",{className:G("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",u),children:[r.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",r.jsx("span",{className:"font-medium",children:O}),"? This cannot be undone."]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r.jsx(be,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(null),children:"Cancel"}),r.jsx(be,{type:"button",variant:"destructive",size:"sm",onClick:()=>{m(null),o(x)},children:"Discard"})]})]}):null,C&&r.jsx("div",{className:"border-t",children:r.jsx(nr,{original:y??"",modified:N??"",language:T,theme:v,height:h,loading:r.jsx(hr,{height:h}),options:Ra})})]},x)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=p,e[7]=c,e[8]=o,e[9]=u,e[10]=j):j=e[10],j}function qo(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&Di(e)?t.blockKey:null}function Ho(t){return t.kind!=="page"?!0:!t.pagePath||Ct(t.pagePath).length>0}function Vo(t,e){try{return ol(t,si,e)}catch{return null}}function Go(t,e,s){if(!e)return;const a=ti(e,t);if(!a)return null;if(Ct(a.path).length===0||s?.path!==a.path)return a.path;const n=Fn(a.path,s.params);return Ct(n).length===0?n:a.path}function Wo(t){return t.sectionKey&&!t.v8?Vo(t.previewServerUrl,t.sectionKey):Jo(t.previewServerUrl,t.path)}function Qo(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(Ct(s).length===0)return s;if(e?.path!==s)return"";const a=Fn(s,e.params);return Ct(a).length===0?a:""}function Jo(t,e){const s=e.trim();if(!s||Ct(s).length>0)return null;try{const a=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,a);return n.origin===a.origin?n:null}catch{return null}}function Yo(t,e){return e?.kind==="pointer"&&e.link?Rn(t.toString(),e.link):Da(t,e)}function Da(t,e){if(!e)return null;if(e.kind==="pointer")return Rn(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Xo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function Zo(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const Ta=U.createContext(!0),ec=["split","before","after","code"];function tc(t){return ec.includes(t)}const Ba={desktop:1280,mobile:412};function sc(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
2
|
-
`:null,a=t.status==="new"?null:s(t.fromJson,"before"),n=t.status==="removed"?null:s(t.toJson,"after");return a===null&&n===null?{diffs:{}}:t.status==="edited"&&(a===null||n===null)?{diffs:{}}:{diffs:{[el(t.entry.name)]:{from:a,to:n}}}}function Ia(t){const e=I.c(76),{change:s,diff:a,bodyPending:n,previewServerUrl:o,draft:d,lastPage:l,v8:i,onReady:u}=t,c=ge(),h=U.use(Ta),p=qo(s),b=i?null:p,f=i?p:null,m=f?Go(f,i?.blocks,l):void 0,g=f!==null&&m===null,v=Xo(s.kind,o,d)&&(f===null||typeof m=="string"),[j,w]=U.useState(null),x=v?j??"split":"code",[P,y]=U.useState("desktop"),[N,C]=U.useState(null),A=N??(f?m??"":Qo(s,l));let k;e[0]!==s?(k=Ho(s),e[0]=s,e[1]=k):k=e[1];const D=k,S=o?Wo({previewServerUrl:o,sectionKey:p,path:A,v8:!!i}):null,O=S?Rn(S.toString(),cl):null,B=S?Da(S,d):null,T=S?Yo(S,d):null;let F;e[2]!==s||e[3]!==a?.diffs||e[4]!==c?(F=s.entry?sc(s,c("thread.publishCompare.sideUnreadable")):{diffs:Object.fromEntries(s.filepaths.flatMap(E=>{const ce=a?.diffs[E];return ce?[[E,ce]]:[]}))},e[2]=s,e[3]=a?.diffs,e[4]=c,e[5]=F):F=e[5];const L=F;let W;e[6]!==L.diffs?(W=Object.keys(L.diffs),e[6]=L.diffs,e[7]=W):W=e[7];const q=W.length>0;let X;e:{if(b!==null){X=null;break e}if(f!==null){const ce=A.trim();if(!ce){X=null;break e}X=Ct(ce).length>0?c("thread.publishCompare.dynamicHint",{template:ce}):c("thread.publishCompare.blockHint",{path:ce});break e}if(s.kind!=="page"){let ce;e[8]!==c?(ce=c("thread.publishCompare.globalHint"),e[8]=c,e[9]=ce):ce=e[9],X=ce;break e}let E;e[10]!==s.pagePath||e[11]!==c?(E=s.pagePath&&Ct(s.pagePath).length>0?c("thread.publishCompare.dynamicHint",{template:s.pagePath}):null,e[10]=s.pagePath,e[11]=c,e[12]=E):E=e[12],X=E}const M=X,H=Zo(s,!!i),[J,ne]=U.useState(nc);let Q;e[13]===Symbol.for("react.memo_cache_sentinel")?(Q=E=>ne(ce=>ce.has(E)?ce:new Set(ce).add(E)),e[13]=Q):Q=e[13];const he=Q;let Z;e[14]!==i?(Z=E=>i?r.jsx(lc,{...E,onLoaded:he}):r.jsx(ac,{...E}),e[14]=i,e[15]=Z):Z=e[15];const re=Z,ee=(v?[H.before==="new"?null:O,H.after==="removed"?null:B].flatMap(E=>E?[Un(E,P)]:[]):[]).every(E=>J.has(E));let K;e[16]!==u||e[17]!==ee?(K=ee&&u?E=>{E&&u()}:void 0,e[16]=u,e[17]=ee,e[18]=K):K=e[18];const te=K,se=H.before==="new"?r.jsx(zs,{icon:r.jsx(Yr,{className:"size-5 text-brand"}),title:c("thread.publishCompare.newTitle"),description:c("thread.publishCompare.newDescription")}):re({url:O,device:P,title:c("thread.publishCompare.before"),missing:c("thread.publishCompare.enterPath")}),Pe=H.after==="removed"?r.jsx(zs,{icon:r.jsx(ln,{className:"size-5 text-destructive"}),title:c("thread.publishCompare.removedTitle"),description:c("thread.publishCompare.removedDescription")}):re({url:B,device:P,title:c("thread.publishCompare.after"),missing:c(S?"thread.publishCompare.draftUnavailable":"thread.publishCompare.enterPath")});let ae;e[19]!==v||e[20]!==w||e[21]!==h||e[22]!==c||e[23]!==x?(ae=v||h?r.jsx(qr,{value:x,onValueChange:E=>{tc(E)&&w(E)},children:r.jsxs(Kr,{className:"h-8 w-auto",variant:"pill",children:[v?r.jsxs(r.Fragment,{children:[r.jsx(Ft,{value:"split",className:"px-3 text-xs",children:c("thread.publishCompare.sideBySide")}),r.jsx(Ft,{value:"before",className:"px-3 text-xs",children:c("thread.publishCompare.before")}),r.jsx(Ft,{value:"after",className:"px-3 text-xs",children:c("thread.publishCompare.after")})]}):null,h?r.jsx(Ft,{value:"code",className:"px-3 text-xs",children:c("thread.publishCompare.code")}):null]})}):null,e[19]=v,e[20]=w,e[21]=h,e[22]=c,e[23]=x,e[24]=ae):ae=e[24];let ie;e[25]!==T||e[26]!==v||e[27]!==s.pagePath||e[28]!==P||e[29]!==A||e[30]!==D||e[31]!==b||e[32]!==y||e[33]!==C||e[34]!==c||e[35]!==x?(ie=v&&x!=="code"?r.jsxs(r.Fragment,{children:[b?null:D?r.jsx(Xa,{value:A,onChange:E=>C(E.target.value),placeholder:s.pagePath??"/","aria-label":c("thread.publishCompare.pathLabel"),className:"h-8 w-56 font-mono text-xs"}):r.jsx("span",{className:"max-w-56 truncate px-1 font-mono text-xs text-muted-foreground",children:A}),r.jsxs("div",{className:"flex items-center rounded-lg border p-0.5",children:[r.jsx(fr,{active:P==="desktop",label:c("thread.publishCompare.desktop"),onClick:()=>y("desktop"),children:r.jsx(Ri,{className:"size-3.5"})}),r.jsx(fr,{active:P==="mobile",label:c("thread.publishCompare.mobile"),onClick:()=>y("mobile"),children:r.jsx(Pl,{className:"size-3.5"})})]}),T?r.jsxs("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[r.jsx(Za,{className:"size-3.5"}),c("thread.publishCompare.openDraft")]}):null]}):null,e[25]=T,e[26]=v,e[27]=s.pagePath,e[28]=P,e[29]=A,e[30]=D,e[31]=b,e[32]=y,e[33]=C,e[34]=c,e[35]=x,e[36]=ie):ie=e[36];let de;e[37]!==ae||e[38]!==ie?(de=r.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b bg-background px-4 py-2.5 max-md:pr-12",children:[ae,ie]}),e[37]=ae,e[38]=ie,e[39]=de):de=e[39];let oe;e[40]!==v||e[41]!==M||e[42]!==x?(oe=M&&v&&x!=="code"?r.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:M}):null,e[40]=v,e[41]=M,e[42]=x,e[43]=oe):oe=e[43];let z;e[44]!==g||e[45]!==h||e[46]!==c?(z=g&&h?r.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:c("thread.publishCompare.notOnAnyPage")}):null,e[44]=g,e[45]=h,e[46]=c,e[47]=z):z=e[47];let fe;e[48]!==o||e[49]!==h||e[50]!==c||e[51]!==f||e[52]!==m||e[53]!==x?(fe=x==="code"&&!h?f!==null&&m===void 0?r.jsx(We,{className:"m-4 h-64 rounded"}):o===null?r.jsx(zs,{icon:r.jsx(Ys,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.previewNotReadyTitle"),description:c("thread.publishCompare.draftUnavailable")}):r.jsx(zs,{icon:r.jsx(Ys,{className:"size-5 text-muted-foreground"}),title:c("thread.publishCompare.noPreviewTitle"),description:c("thread.publishCompare.noPreviewDescription")}):null,e[48]=o,e[49]=h,e[50]=c,e[51]=f,e[52]=m,e[53]=x,e[54]=fe):fe=e[54];let ke;e[55]!==n||e[56]!==q||e[57]!==L||e[58]!==h||e[59]!==c||e[60]!==x?(ke=x==="code"&&h?r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-background [scrollbar-width:thin]",children:q?r.jsx(Ko,{diff:L,hideFileRows:!0,editorHeight:"70vh"}):n?r.jsx(We,{className:"m-4 h-64 rounded"}):r.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:c("thread.publishPopover.detailsUnavailable")})}):null,e[55]=n,e[56]=q,e[57]=L,e[58]=h,e[59]=c,e[60]=x,e[61]=ke):ke=e[61];let me;e[62]!==Pe||e[63]!==se||e[64]!==v||e[65]!==c||e[66]!==x?(me=v?r.jsxs("div",{className:G("flex min-h-0 flex-1 gap-3 p-3",x==="code"&&"hidden"),children:[r.jsx(mr,{label:c("thread.publishCompare.before"),hidden:x==="after",children:se}),r.jsx(mr,{label:c("thread.publishCompare.after"),highlight:!0,hidden:x==="before",children:Pe})]}):null,e[62]=Pe,e[63]=se,e[64]=v,e[65]=c,e[66]=x,e[67]=me):me=e[67];let Y;return e[68]!==te||e[69]!==de||e[70]!==oe||e[71]!==z||e[72]!==fe||e[73]!==ke||e[74]!==me?(Y=r.jsxs("div",{ref:te,className:"flex min-h-0 min-w-0 flex-1 flex-col bg-muted/40",children:[de,oe,z,fe,ke,me]}),e[68]=te,e[69]=de,e[70]=oe,e[71]=z,e[72]=fe,e[73]=ke,e[74]=me,e[75]=Y):Y=e[75],Y}function nc(){return new Set}function fr(t){const e=I.c(8),{active:s,label:a,onClick:n,children:o}=t,d=s&&"bg-accent text-foreground";let l;e[0]!==d?(l=G("flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",d),e[0]=d,e[1]=l):l=e[1];let i;return e[2]!==s||e[3]!==o||e[4]!==a||e[5]!==n||e[6]!==l?(i=r.jsx("button",{type:"button","aria-label":a,"aria-pressed":s,title:a,onClick:n,className:l,children:o}),e[2]=s,e[3]=o,e[4]=a,e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function mr(t){const e=I.c(18),{label:s,highlight:a,hidden:n,children:o}=t,d=a===void 0?!1:a,i=(n===void 0?!1:n)&&"hidden";let u;e[0]!==i?(u=G("flex min-h-0 min-w-0 flex-1 flex-col gap-1.5",i),e[0]=i,e[1]=u):u=e[1];const c=d&&"bg-brand";let h;e[2]!==c?(h=G("size-1.5 rounded-full bg-muted-foreground/50",c),e[2]=c,e[3]=h):h=e[3];let p;e[4]!==h?(p=r.jsx("span",{className:h}),e[4]=h,e[5]=p):p=e[5];let b;e[6]!==s||e[7]!==p?(b=r.jsxs("div",{className:"flex items-center gap-1.5 px-0.5 text-2xs font-medium text-muted-foreground",children:[p,s]}),e[6]=s,e[7]=p,e[8]=b):b=e[8];const f=d&&"border-brand/60";let m;e[9]!==f?(m=G("relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-background",f),e[9]=f,e[10]=m):m=e[10];let g;e[11]!==o||e[12]!==m?(g=r.jsx("div",{className:m,children:o}),e[11]=o,e[12]=m,e[13]=g):g=e[13];let v;return e[14]!==g||e[15]!==u||e[16]!==b?(v=r.jsxs("div",{className:u,children:[b,g]}),e[14]=g,e[15]=u,e[16]=b,e[17]=v):v=e[17],v}function zs(t){const e=I.c(10),{icon:s,title:a,description:n}=t;let o;e[0]!==s?(o=r.jsx("div",{className:"mb-1",children:s}),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==a?(d=r.jsx("p",{className:"text-sm font-medium",children:a}),e[2]=a,e[3]=d):d=e[3];let l;e[4]!==n?(l=r.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==o||e[7]!==d||e[8]!==l?(i=r.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 px-6 text-center",children:[o,d,l]}),e[6]=o,e[7]=d,e[8]=l,e[9]=i):i=e[9],i}function rc(t,e){if(!t)return{visibility:"hidden",width:e};const s=Math.min(t.width/e,1);return{left:Math.max((t.width-e*s)/2,0),width:e,height:t.height/s,transform:`scale(${s})`,transformOrigin:"top left"}}function ac(t){const e=I.c(24),{url:s,device:a,title:n,missing:o}=t,[d,l]=Aa(),[i,u]=U.useState(null);if(!s){let y;return e[0]!==o?(y=r.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=y):y=e[1],y}let c;e[2]!==a||e[3]!==s?(c=Un(s,a),e[2]=a,e[3]=s,e[4]=c):c=e[4];const h=c,p=Ba[a],b=d.width>0?Math.min(d.width/p,1):1,f=d.width>0?Math.max((d.width-p*b)/2,0):0;let m;e[5]!==h?(m=()=>u(h),e[5]=h,e[6]=m):m=e[6];const g=d.height>0?d.height/b:"100%",v=`scale(${b})`;let j;e[7]!==p||e[8]!==f||e[9]!==g||e[10]!==v?(j={left:f,width:p,height:g,transform:v,transformOrigin:"top left"},e[7]=p,e[8]=f,e[9]=g,e[10]=v,e[11]=j):j=e[11];let w;e[12]!==h||e[13]!==m||e[14]!==j||e[15]!==n?(w=r.jsx("iframe",{src:h,title:n,sandbox:"allow-scripts allow-same-origin",onLoad:m,className:"absolute top-0 border-0 bg-white",style:j},h),e[12]=h,e[13]=m,e[14]=j,e[15]=n,e[16]=w):w=e[16];let x;e[17]!==i||e[18]!==h?(x=i!==h?r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:r.jsx(ms,{className:"size-5 motion-reduce:animate-none"})}):null,e[17]=i,e[18]=h,e[19]=x):x=e[19];let P;return e[20]!==l||e[21]!==w||e[22]!==x?(P=r.jsxs("div",{ref:l,className:"absolute inset-0",children:[w,x]}),e[20]=l,e[21]=w,e[22]=x,e[23]=P):P=e[23],P}function lc(t){const e=I.c(21),{url:s,device:a,title:n,missing:o,onLoaded:d}=t,[l,i]=Aa(),[u,c]=U.useState(null),[h,p]=U.useState(null),b=l.width>0&&l.height>0;b&&(u?.width!==l.width||u?.height!==l.height)&&c(l);const f=b?l:u;if(!s){let P;return e[0]!==o?(P=r.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=P):P=e[1],P}let m,g,v,j;if(e[2]!==f||e[3]!==a||e[4]!==d||e[5]!==i||e[6]!==h||e[7]!==n||e[8]!==s){const P=Un(s,a),y=Ba[a];m=h?.src!==P;const N=[...h&&m?[h]:[],{src:P,logicalWidth:y}];g=i,v="absolute inset-0",j=N.map(C=>{const A=C.src===P&&m;return r.jsx("iframe",{src:C.src,title:n,"aria-hidden":A&&h?!0:void 0,sandbox:"allow-scripts allow-same-origin",onLoad:()=>{C.src===P&&(p(C),d?.(C.src))},className:G("absolute top-0 border-0 bg-white",A&&"pointer-events-none opacity-0"),style:rc(f,C.logicalWidth)},C.src)}),e[2]=f,e[3]=a,e[4]=d,e[5]=i,e[6]=h,e[7]=n,e[8]=s,e[9]=m,e[10]=g,e[11]=v,e[12]=j}else m=e[9],g=e[10],v=e[11],j=e[12];let w;e[13]!==m||e[14]!==h?(w=m?h?r.jsx(ms,{className:"absolute right-2 top-2 size-4 text-muted-foreground motion-reduce:animate-none"}):r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:r.jsx(ms,{className:"size-5 motion-reduce:animate-none"})}):null,e[13]=m,e[14]=h,e[15]=w):w=e[15];let x;return e[16]!==g||e[17]!==v||e[18]!==j||e[19]!==w?(x=r.jsxs("div",{ref:g,className:v,children:[j,w]}),e[16]=g,e[17]=v,e[18]=j,e[19]=w,e[20]=x):x=e[20],x}const ic=/^Co-authored-by:\s*([^<\r\n]+?)(?:\s*<[^>\r\n]*>)?\s*$/im;function oc(t){if(!t)return null;const e=ic.exec(t)?.[1]?.trim();return e||null}function cc(t){return/\[bot\]$/i.test(t)||/-bot$/i.test(t)}function dc(t){const e=oc(t.body);if(e)return e;const s=t.author.trim();return!s||cc(s)?null:s}function uc(t,e,s,a,n,o){return["cms-publish-bodies",t,e,s,a,n,o]}const hc=6e4;function fc(t,e){return e?null:t.files.map(s=>`${s.index}${s.working_dir} ${s.path}`).sort().join(`
|
|
3
|
-
`)}function mc(t,e,s){const a=I.c(6);let n;a[0]!==s||a[1]!==t||a[2]!==e?(n=gs.decofile(`${t}/${e}/${s}`),a[0]=s,a[1]=t,a[2]=e,a[3]=n):n=a[3];let o;a[4]!==n?(o={queryKey:n,queryFn:kn},a[4]=n,a[5]=o):o=a[5];const{data:d}=bt(o);return d}function $a(t){const{orgSlug:e,virtualMcpId:s,branch:a,threadId:n,baseBranch:o,fastPreview:d,recoverSandbox:l}=t,i={orgSlug:e,virtualMcpId:s,branch:a,threadId:n},u=d?{fastPreview:!0}:void 0,c=U.useRef(null),h=async P=>{try{return await P()}catch(y){if(!l||!ua(y))throw y;return c.current??=l(),await c.current,P()}},p=Nr({...Mn(i),queryFn:()=>h(()=>ha(i))}),b=p.data,f=b.changedFiles??null,m=b.headSha??null,g=f?f.length>0:bi(b)||gi(b),v=bt({queryKey:uc(e,s,a,o,m,fc(b,d)),queryFn:()=>h(()=>xi(i,b,o,u)),enabled:g,staleTime:d?hc:0,gcTime:d?void 0:0,throwOnError:(P,y)=>!f&&y.state.data===void 0}),j=mc(e,s,a),w=v.data??null,x=f?ka({files:f,lookup:j,diff:w}):So(w);return{status:b,summary:x,allPaths:f?f.map(P=>P.path):Object.keys(w?.diffs??{}),discardablePaths:d?null:new Set(b.files.map(P=>P.path)),changedFilesTotal:b.changedFilesTotal??x.count,changedFilesTruncated:b.changedFilesTruncated??!1,headSha:m,diff:w,bodiesPending:g&&v.isPending,bodiesFailed:v.isError,cardsPending:!f&&g&&v.isPending,refresh:()=>Promise.all([p.refetch(),d?null:v.refetch()])}}function pc(t){const e=I.c(4);let s;e[0]!==t?(s=gs.decofile(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==s?(a={queryKey:s,queryFn:kn},e[2]=s,e[3]=a):a=e[3];const{data:n}=bt(a);return n}function bc(t,e){const s=I.c(5);let a;s[0]!==t||s[1]!==e?(a=e?dl(e,t):gs.liveMeta("","no-scope"),s[0]=t,s[1]=e,s[2]=a):a=s[2];let n;s[3]!==a?(n={queryKey:a,queryFn:kn},s[3]=a,s[4]=n):n=s[4];const{data:o}=bt(n);return o}function Vn(t){const e=I.c(27),{backend:s,cacheKey:a,scope:n}=t,o=Cr();let d;e[0]!==a?(d=gs.contentChanges(a),e[0]=a,e[1]=d):d=e[1];let l;e[2]!==s.client||e[3]!==a||e[4]!==o?(l=()=>Vl(o,s.client,a),e[2]=s.client,e[3]=a,e[4]=o,e[5]=l):l=e[5];let i;e[6]!==d||e[7]!==l?(i={queryKey:d,queryFn:l,staleTime:0},e[6]=d,e[7]=l,e[8]=i):i=e[8];const u=Nr(i),c=u.data,h=Hl(s,a,c),p=pc(a),b=bc(s,n),f=h.data??null,m=s.source==="github";let g;e[9]!==c.changes||e[10]!==p||e[11]!==b||e[12]!==f||e[13]!==m?(g=Io({changes:c.changes,sides:f,lookup:p,meta:b,hosted:m}),e[9]=c.changes,e[10]=p,e[11]=b,e[12]=f,e[13]=m,e[14]=g):g=e[14];const v=g;let j;e[15]!==c.changes?(j=Object.entries(c.changes).map(gc),e[15]=c.changes,e[16]=j):j=e[16];const w=v.count>0&&h.isPending,x=p??null;let P;e[17]!==u?(P=()=>u.refetch(),e[17]=u,e[18]=P):P=e[18];let y;return e[19]!==c||e[20]!==h.isError||e[21]!==v||e[22]!==j||e[23]!==w||e[24]!==x||e[25]!==P?(y={changes:c,summary:v,entries:j,sidesPending:w,sidesFailed:h.isError,blocks:x,refresh:P},e[19]=c,e[20]=h.isError,e[21]=v,e[22]=j,e[23]=w,e[24]=x,e[25]=P,e[26]=y):y=e[26],y}function gc(t){const[e,s]=t;return{name:e,version:s.version}}function xc(t){return["smart-review-verdict",t.orgSlug,t.virtualMcpId,t.branch,t.threadId,t.fastPreview?"fast-preview-upstream":"sandbox",t.signature,t.language]}function vc(t){const e=I.c(27),{orgSlug:s,virtualMcpId:a,branch:n,threadId:o,fastPreview:d,status:l,diff:i,enabled:u}=t,[c]=Ar(),{language:h}=c;let p,b,f;if(e[0]!==n||e[1]!==i||e[2]!==u||e[3]!==d||e[4]!==h||e[5]!==s||e[6]!==l||e[7]!==o||e[8]!==a){const P=i?En(i):"";p=u&&!!n&&!!l&&!!i&&P!=="",f=bt,b=xc({orgSlug:s,virtualMcpId:a,branch:n,threadId:o,fastPreview:d,signature:P,language:h}),e[0]=n,e[1]=i,e[2]=u,e[3]=d,e[4]=h,e[5]=s,e[6]=l,e[7]=o,e[8]=a,e[9]=p,e[10]=b,e[11]=f}else p=e[9],b=e[10],f=e[11];let m;e[12]!==n||e[13]!==i||e[14]!==h||e[15]!==s||e[16]!==l||e[17]!==o||e[18]!==a?(m=()=>vi({orgSlug:s,virtualMcpId:a,branch:n,threadId:o},{status:l,diff:i,language:h}),e[12]=n,e[13]=i,e[14]=h,e[15]=s,e[16]=l,e[17]=o,e[18]=a,e[19]=m):m=e[19];let g;e[20]!==p||e[21]!==b||e[22]!==m?(g={queryKey:b,queryFn:m,enabled:p,staleTime:1/0,gcTime:6e5,retry:yc},e[20]=p,e[21]=b,e[22]=m,e[23]=g):g=e[23];const v=f(g),j=v.data??null,w=p&&v.isFetching&&!v.data;let x;return e[24]!==j||e[25]!==w?(x={verdict:j,loading:w},e[24]=j,e[25]=w,e[26]=x):x=e[26],x}function yc(t,e){return!ua(e)&&t<1}function Fa(t){const e=I.c(30),{orgSlug:s,virtualMcpId:a,branch:n,threadId:o,fastPreview:d,status:l,diff:i,policy:u,judgeEnabled:c,paths:h}=t,p=c===void 0?!0:c,b=h===void 0?null:h;let f;e[0]!==i||e[1]!==p||e[2]!==u?(f=p&&yi(i,u),e[0]=i,e[1]=p,e[2]=u,e[3]=f):f=e[3];const m=f;let g;e[4]!==n||e[5]!==i||e[6]!==d||e[7]!==m||e[8]!==s||e[9]!==l||e[10]!==o||e[11]!==a?(g={orgSlug:s,virtualMcpId:a,branch:n,threadId:o,fastPreview:d,status:l,diff:i,enabled:m},e[4]=n,e[5]=i,e[6]=d,e[7]=m,e[8]=s,e[9]=l,e[10]=o,e[11]=a,e[12]=g):g=e[12];const{verdict:v,loading:j}=vc(g);if(!i&&b){let y;e[13]!==b||e[14]!==u?(y=ji(b,u),e[13]=b,e[14]=u,e[15]=y):y=e[15];let N;return e[16]!==y?(N={gate:y,ready:!1},e[16]=y,e[17]=N):N=e[17],N}if(!i){let y;return e[18]===Symbol.for("react.memo_cache_sentinel")?(y={gate:{allowed:!0,reason:null},ready:!1},e[18]=y):y=e[18],y}if(!m){let y;e[19]!==i||e[20]!==u?(y=wi(i,u),e[19]=i,e[20]=u,e[21]=y):y=e[21];let N;return e[22]!==y?(N={gate:y,ready:!0},e[22]=y,e[23]=N):N=e[23],N}let w;e[24]!==j||e[25]!==v?(w=Pi(v,j),e[24]=j,e[25]=v,e[26]=w):w=e[26];const x=!j;let P;return e[27]!==w||e[28]!==x?(P={gate:w,ready:x},e[27]=w,e[28]=x,e[29]=P):P=e[29],P}function jc(t){return["main","master"].includes(t.trim().toLowerCase())}function wc(t,e,s,a){return t===0?a("thread.publishPopover.publish"):s||!jc(e)?t===1?a("thread.publishPopover.publishOne"):a("thread.publishPopover.publishCount",{count:t}):t===1?a("thread.publishPopover.publishOneInProduction"):a("thread.publishPopover.publishCountInProduction",{count:t})}function La(t){const e=I.c(61),{blocks:s,base:a,pending:n,onCancel:o,onConfirm:d}=t,l=ge();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const[u,c]=U.useState(i);let h;if(e[1]!==s||e[2]!==u){let T;e[4]!==u?(T=F=>u[F.path]==="restore",e[4]=u,e[5]=T):T=e[5],h=new Set(s.filter(T).map(Pc)),e[1]=s,e[2]=u,e[3]=h}else h=e[3];const p=h;let b;if(e[6]!==s||e[7]!==u){let T;e[9]!==u?(T=F=>u[F.path],e[9]=u,e[10]=T):T=e[10],b=s.every(T),e[6]=s,e[7]=u,e[8]=b}else b=e[8];const f=b;let m;e[11]!==n?(m=T=>{n&&T.preventDefault()},e[11]=n,e[12]=m):m=e[12];let g;e[13]!==a||e[14]!==l?(g=l("thread.deletedBlocks.title",{base:a}),e[13]=a,e[14]=l,e[15]=g):g=e[15];let v;e[16]!==g?(v=r.jsx(Ss,{children:g}),e[16]=g,e[17]=v):v=e[17];let j;e[18]!==l?(j=l("thread.deletedBlocks.description"),e[18]=l,e[19]=j):j=e[19];let w;e[20]!==j?(w=r.jsx(Ns,{children:j}),e[20]=j,e[21]=w):w=e[21];let x;e[22]!==v||e[23]!==w?(x=r.jsxs(Cs,{className:"text-left",children:[v,w]}),e[22]=v,e[23]=w,e[24]=x):x=e[24];let P;if(e[25]!==s||e[26]!==u||e[27]!==n||e[28]!==p||e[29]!==l){let T;e[31]!==u||e[32]!==n||e[33]!==p||e[34]!==l?(T=F=>{const L=F.missingRefs.filter(W=>!p.has(W));return r.jsxs("li",{className:"flex flex-col gap-2",children:[r.jsxs("div",{className:"flex min-w-0 flex-col",children:[r.jsx("span",{className:"truncate text-sm font-medium",children:F.key}),F.renamedTo&&r.jsx("span",{className:"text-meta",children:l("thread.deletedBlocks.renamed",{name:F.renamedTo})}),u[F.path]==="restore"&&L.length>0&&r.jsx("span",{className:"text-meta text-warning",children:l("thread.deletedBlocks.missingRefs",{names:L.join(", ")})})]}),r.jsxs(Bi,{type:"single",variant:"segmented",size:"sm",value:u[F.path]??"",disabled:n,onValueChange:W=>{W!=="restore"&&W!=="drop"||c(q=>({...q,[F.path]:W}))},children:[r.jsx(rr,{value:"drop",children:l("thread.deletedBlocks.drop")}),r.jsx(rr,{value:"restore",children:l("thread.deletedBlocks.restore")})]})]},F.path)},e[31]=u,e[32]=n,e[33]=p,e[34]=l,e[35]=T):T=e[35],P=s.map(T),e[25]=s,e[26]=u,e[27]=n,e[28]=p,e[29]=l,e[30]=P}else P=e[30];let y;e[36]!==P?(y=r.jsx("ul",{className:"flex min-h-0 flex-col gap-4 overflow-y-auto",children:P}),e[36]=P,e[37]=y):y=e[37];let N;e[38]!==l?(N=l("thread.deletedBlocks.cancel"),e[38]=l,e[39]=N):N=e[39];let C;e[40]!==o||e[41]!==n||e[42]!==N?(C=r.jsx(be,{variant:"outline",onClick:o,disabled:n,children:N}),e[40]=o,e[41]=n,e[42]=N,e[43]=C):C=e[43];let A;e[44]!==u||e[45]!==d?(A=()=>d(u),e[44]=u,e[45]=d,e[46]=A):A=e[46];const k=!f||n;let D;e[47]!==l?(D=l("thread.deletedBlocks.continue"),e[47]=l,e[48]=D):D=e[48];let S;e[49]!==A||e[50]!==k||e[51]!==D?(S=r.jsx(be,{onClick:A,disabled:k,children:D}),e[49]=A,e[50]=k,e[51]=D,e[52]=S):S=e[52];let O;e[53]!==C||e[54]!==S?(O=r.jsxs(As,{children:[C,S]}),e[53]=C,e[54]=S,e[55]=O):O=e[55];let B;return e[56]!==y||e[57]!==O||e[58]!==m||e[59]!==x?(B=r.jsx(Ds,{open:!0,children:r.jsxs(Rs,{className:"max-h-[85vh] grid-rows-[auto_minmax(0,1fr)_auto] sm:max-w-lg",onEscapeKeyDown:m,children:[x,y,O]})}),e[56]=y,e[57]=O,e[58]=m,e[59]=x,e[60]=B):B=e[60],B}function Pc(t){return t.key}const kc=2500;function Sc(t){const{selectedId:e,readyIds:s,lastShownId:a,liveIds:n}=t;return e===null||s.has(e)?e:a!==null&&a!==e&&n.includes(a)?a:e}function Oa(t){const e=I.c(16),s=U.useRef(!1),a=ge();let n;e[0]!==t?(n=h=>{!h&&s.current||t.onOpenChange(h)},e[0]=t,e[1]=n):n=e[1];const o=n;let d;e[2]!==t.mode||e[3]!==a?(d=t.mode==="review"?a("thread.publishPopover.submitForReview"):a("thread.publishPopover.publish"),e[2]=t.mode,e[3]=a,e[4]=d):d=e[4];let l;e[5]!==d?(l=r.jsx(Dr,{className:"sr-only",children:d}),e[5]=d,e[6]=l):l=e[6];let i;e[7]!==t?(i=r.jsx(Nc,{...t,publishLockRef:s}),e[7]=t,e[8]=i):i=e[8];let u;e[9]!==l||e[10]!==i?(u=r.jsxs(Tr,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[l,i]}),e[9]=l,e[10]=i,e[11]=u):u=e[11];let c;return e[12]!==o||e[13]!==t.open||e[14]!==u?(c=r.jsx(Rr,{open:t.open,onOpenChange:o,children:u}),e[12]=o,e[13]=t.open,e[14]=u,e[15]=c):c=e[15],c}function Nc(t){const e=I.c(3),s=Ot(t.virtualMcpId,t.branch),a=s.kind==="protocol"&&s.source==="github";let n;return e[0]!==a||e[1]!==t?(n=po({open:t.open,hosted:a})?r.jsx(Rc,{...t}):null,e[0]=a,e[1]=t,e[2]=n):n=e[2],n}const Cc=4,bs="flex h-[45%] min-h-0 min-w-0 shrink-0 md:h-auto md:flex-1";function $s(t){const e=I.c(5),{list:s,pane:a}=t;let n;e[0]!==s?(n=r.jsx("div",{className:"flex min-h-0 w-full flex-1 flex-col max-md:border-t md:w-[380px] md:flex-none md:shrink-0 md:border-l md:[&>[data-publish-state]>:first-child]:pr-12",children:s}),e[0]=s,e[1]=n):n=e[1];let o;return e[2]!==a||e[3]!==n?(o=r.jsxs(r.Fragment,{children:[a,n]}),e[2]=a,e[3]=n,e[4]=o):o=e[4],o}function Gn(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:G(bs,"bg-muted/40 p-3"),children:r.jsx(We,{className:"h-full w-full rounded-lg"})}),t[0]=e):e=t[0],e}function Wn(t){const e=I.c(11),{mode:s,title:a,subLine:n,trailing:o}=t,d=s==="review"?an:kl;let l;e[0]!==d?(l=r.jsx(d,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==l||e[3]!==a||e[4]!==o?(i=r.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[l,a,o]}),e[2]=l,e[3]=a,e[4]=o,e[5]=i):i=e[5];let u;e[6]!==n?(u=n?r.jsx("div",{className:"pl-6 text-xs text-muted-foreground",children:n}):null,e[6]=n,e[7]=u):u=e[7];let c;return e[8]!==i||e[9]!==u?(c=r.jsxs(r.Fragment,{children:[i,u]}),e[8]=i,e[9]=u,e[10]=c):c=e[10],c}function Qn(t){const e=I.c(9),{draftPreviewUrl:s,t:a}=t;let n;e[0]!==s?(n=()=>{s&&window.open(s,"_blank","noopener,noreferrer")},e[0]=s,e[1]=n):n=e[1];const o=!s;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Ys,{className:"size-4"}),e[2]=d):d=e[2];let l;e[3]!==a?(l=a("thread.publishPopover.preview"),e[3]=a,e[4]=l):l=e[4];let i;return e[5]!==n||e[6]!==o||e[7]!==l?(i=r.jsxs(be,{type:"button",variant:"outline",onClick:n,disabled:o,children:[d,l]}),e[5]=n,e[6]=o,e[7]=l,e[8]=i):i=e[8],i}function Ma(t){const e=I.c(21),{mode:s,draftPreviewUrl:a}=t,n=ge();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(Gn,{}),e[0]=o):o=e[0];let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(We,{className:"h-3.5 w-48"}),e[1]=d):d=e[1];let l;e[2]!==s?(l=r.jsx(Wn,{mode:s,title:d}),e[2]=s,e[3]=l):l=e[3];let i,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(Ts,{children:r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(Lt,{}),r.jsx(Lt,{}),r.jsx(Lt,{})]})}),u=r.jsxs(r.Fragment,{children:[r.jsx(We,{className:"h-3 w-20"}),r.jsx(We,{className:"h-14 w-full rounded-lg"})]}),e[4]=i,e[5]=u):(i=e[4],u=e[5]);let c;e[6]!==a||e[7]!==n?(c=r.jsx(Qn,{draftPreviewUrl:a,t:n}),e[6]=a,e[7]=n,e[8]=c):c=e[8];const h=s==="review"?"default":"brand";let p;e[9]!==s||e[10]!==n?(p=n(s==="review"?"thread.publishPopover.submitForReview":"thread.publishPopover.publish"),e[9]=s,e[10]=n,e[11]=p):p=e[11];let b;e[12]!==h||e[13]!==p?(b=r.jsx(be,{type:"button",variant:h,className:"flex-1",disabled:!0,children:p}),e[12]=h,e[13]=p,e[14]=b):b=e[14];let f;e[15]!==c||e[16]!==b?(f=r.jsxs("div",{className:"flex gap-2",children:[c,b]}),e[15]=c,e[16]=b,e[17]=f):f=e[17];let m;return e[18]!==f||e[19]!==l?(m=r.jsx($s,{pane:o,list:r.jsx(cn,{state:"loading",header:l,body:i,note:u,footer:f})}),e[18]=f,e[19]=l,e[20]=m):m=e[20],m}function Ac(t){const e=I.c(26),{mode:s,draftPreviewUrl:a,message:n,onRetry:o}=t,d=ge();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("div",{className:G(bs,"bg-muted/40")}),e[0]=l):l=e[0];let i;e[1]!==d?(i=d("thread.publishPopover.loadFailed"),e[1]=d,e[2]=i):i=e[2];let u;e[3]!==i?(u=r.jsx("span",{className:"truncate",children:i}),e[3]=i,e[4]=u):u=e[4];let c;e[5]!==s||e[6]!==u?(c=r.jsx(Wn,{mode:s,title:u}),e[5]=s,e[6]=u,e[7]=c):c=e[7];let h;e[8]!==n?(h=r.jsx("p",{className:"px-4 py-6 text-xs text-destructive",children:n}),e[8]=n,e[9]=h):h=e[9];let p;e[10]!==a||e[11]!==d?(p=r.jsx(Qn,{draftPreviewUrl:a,t:d}),e[10]=a,e[11]=d,e[12]=p):p=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx(Nn,{className:"size-4"}),e[13]=b):b=e[13];let f;e[14]!==d?(f=d("thread.publishPopover.retry"),e[14]=d,e[15]=f):f=e[15];let m;e[16]!==o||e[17]!==f?(m=r.jsxs(be,{type:"button",variant:"outline",className:"flex-1",onClick:o,children:[b,f]}),e[16]=o,e[17]=f,e[18]=m):m=e[18];let g;e[19]!==p||e[20]!==m?(g=r.jsxs("div",{className:"flex gap-2",children:[p,m]}),e[19]=p,e[20]=m,e[21]=g):g=e[21];let v;return e[22]!==g||e[23]!==c||e[24]!==h?(v=r.jsx($s,{pane:l,list:r.jsx(cn,{state:"ready",header:c,body:h,footer:g})}),e[22]=g,e[23]=c,e[24]=h,e[25]=v):v=e[25],v}function Rc(t){const e=I.c(3),s=t.mode??"publish";let a;return e[0]!==s||e[1]!==t?(a=r.jsx(Br,{children:n=>{const{reset:o}=n;return r.jsx(Ir,{fallback:d=>{const{error:l,resetError:i}=d;return r.jsx(Ac,{mode:s,draftPreviewUrl:t.draftPreviewUrl,message:l?.message??"",onRetry:()=>{o(),i()}})},children:r.jsx(U.Suspense,{fallback:r.jsx(Ma,{mode:s,draftPreviewUrl:t.draftPreviewUrl}),children:r.jsx(Dc,{...t})})})}}),e[0]=s,e[1]=t,e[2]=a):a=e[2],a}function Dc(t){const e=I.c(13),s=Ot(t.virtualMcpId,t.branch);let a;e[0]!==t.branch||e[1]!==t.orgSlug||e[2]!==t.virtualMcpId?(a={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch},e[0]=t.branch,e[1]=t.orgSlug,e[2]=t.virtualMcpId,e[3]=a):a=e[3];const n=Dn(a);if(s.kind==="protocol"&&n){let d;return e[4]!==s||e[5]!==n||e[6]!==t?(d=s.source==="sandbox"?r.jsx(Ic,{...t,backend:s,cacheKey:n}):r.jsx(Bc,{...t,backend:s,cacheKey:n}),e[4]=s,e[5]=n,e[6]=t,e[7]=d):d=e[7],d}if(s.kind!=="legacy"){const d=t.mode??"publish";let l;return e[8]!==t.draftPreviewUrl||e[9]!==d?(l=r.jsx(Ma,{mode:d,draftPreviewUrl:t.draftPreviewUrl}),e[8]=t.draftPreviewUrl,e[9]=d,e[10]=l):l=e[10],l}let o;return e[11]!==t?(o=r.jsx(Tc,{...t}),e[11]=t,e[12]=o):o=e[12],o}function Tc(t){const e=I.c(52),s=xs()?.taskId??null;let a;e[0]!==t.baseBranch||e[1]!==t.branch||e[2]!==t.fastPreview||e[3]!==t.orgSlug||e[4]!==t.recoverSandbox||e[5]!==t.virtualMcpId||e[6]!==s?(a={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,baseBranch:t.baseBranch,fastPreview:t.fastPreview,recoverSandbox:t.recoverSandbox},e[0]=t.baseBranch,e[1]=t.branch,e[2]=t.fastPreview,e[3]=t.orgSlug,e[4]=t.recoverSandbox,e[5]=t.virtualMcpId,e[6]=s,e[7]=a):a=e[7];const n=$a(a),o=t.mode!=="review";let d;e[8]!==t.branch||e[9]!==t.fastPreview||e[10]!==t.orgSlug||e[11]!==t.publishPolicy||e[12]!==t.virtualMcpId||e[13]!==n.allPaths||e[14]!==n.diff||e[15]!==n.status||e[16]!==o||e[17]!==s?(d={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,fastPreview:t.fastPreview,status:n.status,diff:n.diff,paths:n.allPaths,policy:t.publishPolicy,judgeEnabled:o},e[8]=t.branch,e[9]=t.fastPreview,e[10]=t.orgSlug,e[11]=t.publishPolicy,e[12]=t.virtualMcpId,e[13]=n.allPaths,e[14]=n.diff,e[15]=n.status,e[16]=o,e[17]=s,e[18]=d):d=e[18];const{gate:l}=Fa(d),i=n.discardablePaths;let u;e[19]!==i?(u=j=>i===null||j.every(w=>i.has(w)),e[19]=i,e[20]=u):u=e[20];const c=u;let h;e[21]!==c?(h=j=>c(j.filepaths),e[21]=c,e[22]=h):h=e[22];let p;e[23]!==c||e[24]!==n.allPaths||e[25]!==n.changedFilesTruncated?(p=!n.changedFilesTruncated&&c(n.allPaths),e[23]=c,e[24]=n.allPaths,e[25]=n.changedFilesTruncated,e[26]=p):p=e[26];let b;e[27]!==t.branch||e[28]!==n.status?(b=_n(n.status)??t.branch,e[27]=t.branch,e[28]=n.status,e[29]=b):b=e[29];const f=n.headSha??void 0;let m;e[30]!==t.fastPreview||e[31]!==n.diff?(m=!t.fastPreview&&n.diff?{expectedDiffSignature:En(n.diff)}:{},e[30]=t.fastPreview,e[31]=n.diff,e[32]=m):m=e[32];let g;e[33]!==l||e[34]!==n.allPaths||e[35]!==n.bodiesFailed||e[36]!==n.bodiesPending||e[37]!==n.cardsPending||e[38]!==n.changedFilesTotal||e[39]!==n.changedFilesTruncated||e[40]!==n.diff||e[41]!==n.refresh||e[42]!==n.summary||e[43]!==h||e[44]!==p||e[45]!==b||e[46]!==f||e[47]!==m?(g={summary:n.summary,allPaths:n.allPaths,canDiscard:h,canDiscardAll:p,changedFilesTotal:n.changedFilesTotal,changedFilesTruncated:n.changedFilesTruncated,diff:n.diff,bodiesPending:n.bodiesPending,bodiesFailed:n.bodiesFailed,cardsPending:n.cardsPending,refresh:n.refresh,gate:l,headBranch:b,expectedHeadSha:f,...m,hosted:!1,otherWork:!1},e[33]=l,e[34]=n.allPaths,e[35]=n.bodiesFailed,e[36]=n.bodiesPending,e[37]=n.cardsPending,e[38]=n.changedFilesTotal,e[39]=n.changedFilesTruncated,e[40]=n.diff,e[41]=n.refresh,e[42]=n.summary,e[43]=h,e[44]=p,e[45]=b,e[46]=f,e[47]=m,e[48]=g):g=e[48];let v;return e[49]!==t||e[50]!==g?(v=r.jsx(Jn,{...t,source:g}),e[49]=t,e[50]=g,e[51]=v):v=e[51],v}function Ea(t,e){return{summary:t.summary,allPaths:[],canDiscard:()=>!0,canDiscardAll:!0,changedFilesTotal:t.summary.count,changedFilesTruncated:!1,diff:null,bodiesPending:t.sidesPending,bodiesFailed:t.sidesFailed,cardsPending:!1,refresh:t.refresh,protocol:{backend:e,entries:t.entries},v8:{blocks:t.blocks}}}function Bc(t){const e=I.c(23);let s,a,n;e[0]!==t?({backend:s,cacheKey:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);let o;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(o={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=o):o=e[7];let d;e[8]!==s||e[9]!==a||e[10]!==o?(d={backend:s,cacheKey:a,scope:o},e[8]=s,e[9]=a,e[10]=o,e[11]=d):d=e[11];const l=Vn(d),i=s.source==="github";let u;e[12]!==s||e[13]!==l?(u=Ea(l,s),e[12]=s,e[13]=l,e[14]=u):u=e[14];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c={allowed:!0,reason:null},e[15]=c):c=e[15];let h;e[16]!==i||e[17]!==n.branch||e[18]!==u?(h={...u,gate:c,headBranch:n.branch,hosted:i,otherWork:!1},e[16]=i,e[17]=n.branch,e[18]=u,e[19]=h):h=e[19];let p;return e[20]!==n||e[21]!==h?(p=r.jsx(Jn,{...n,source:h}),e[20]=n,e[21]=h,e[22]=p):p=e[22],p}function Ic(t){const e=I.c(58);let s,a,n;e[0]!==t?({backend:s,cacheKey:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);const o=xs()?.taskId??null;let d;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(d={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=d):d=e[7];let l;e[8]!==s||e[9]!==a||e[10]!==d?(l={backend:s,cacheKey:a,scope:d},e[8]=s,e[9]=a,e[10]=d,e[11]=l):l=e[11];const i=Vn(l);let u;e[12]!==n.baseBranch||e[13]!==n.branch||e[14]!==n.fastPreview||e[15]!==n.orgSlug||e[16]!==n.recoverSandbox||e[17]!==n.virtualMcpId||e[18]!==o?(u={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:o,baseBranch:n.baseBranch,fastPreview:n.fastPreview,recoverSandbox:n.recoverSandbox},e[12]=n.baseBranch,e[13]=n.branch,e[14]=n.fastPreview,e[15]=n.orgSlug,e[16]=n.recoverSandbox,e[17]=n.virtualMcpId,e[18]=o,e[19]=u):u=e[19];const c=$a(u),h=n.mode!=="review";let p;e[20]!==c.allPaths||e[21]!==c.diff||e[22]!==c.status||e[23]!==n.branch||e[24]!==n.fastPreview||e[25]!==n.orgSlug||e[26]!==n.publishPolicy||e[27]!==n.virtualMcpId||e[28]!==h||e[29]!==o?(p={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:o,fastPreview:n.fastPreview,status:c.status,diff:c.diff,paths:c.allPaths,policy:n.publishPolicy,judgeEnabled:h},e[20]=c.allPaths,e[21]=c.diff,e[22]=c.status,e[23]=n.branch,e[24]=n.fastPreview,e[25]=n.orgSlug,e[26]=n.publishPolicy,e[27]=n.virtualMcpId,e[28]=h,e[29]=o,e[30]=p):p=e[30];const{gate:b}=Fa(p);let f;if(e[31]!==c.allPaths||e[32]!==i){let N;e[34]!==i?(N=C=>{const A=Kn(C);return A===null?!On(C):!Object.hasOwn(i.changes.changes,A)},e[34]=i,e[35]=N):N=e[35],f=c.allPaths.some(N),e[31]=c.allPaths,e[32]=i,e[33]=f}else f=e[33];const m=f;let g;e[36]!==s||e[37]!==i?(g=Ea(i,s),e[36]=s,e[37]=i,e[38]=g):g=e[38];let v;e[39]!==c||e[40]!==i?(v=()=>Promise.all([i.refresh(),c.refresh()]),e[39]=c,e[40]=i,e[41]=v):v=e[41];let j;e[42]!==c.status||e[43]!==n.branch?(j=_n(c.status)??n.branch,e[42]=c.status,e[43]=n.branch,e[44]=j):j=e[44];const w=c.headSha??void 0;let x;e[45]!==c.diff?(x=c.diff?{expectedDiffSignature:En(c.diff)}:{},e[45]=c.diff,e[46]=x):x=e[46];let P;e[47]!==b||e[48]!==m||e[49]!==w||e[50]!==x||e[51]!==g||e[52]!==v||e[53]!==j?(P={...g,refresh:v,gate:b,headBranch:j,expectedHeadSha:w,...x,hosted:!1,otherWork:m},e[47]=b,e[48]=m,e[49]=w,e[50]=x,e[51]=g,e[52]=v,e[53]=j,e[54]=P):P=e[54];let y;return e[55]!==n||e[56]!==P?(y=r.jsx(Jn,{...n,source:P}),e[55]=n,e[56]=P,e[57]=y):y=e[57],y}function Jn(t){const e=I.c(137),{source:s,publishLockRef:a,onOpenChange:n,mode:o,fastPreview:d,orgSlug:l,virtualMcpId:i,branch:u,baseBranch:c,repoTarget:h,owner:p,repo:b,draftPreviewUrl:f,destinationHost:m,previewServerUrl:g,compareDraft:v,lastPublishedPr:j,onRequestApproval:w,openPullRequest:x,onPullRequestChanged:P,onPublished:y}=t,N=o===void 0?"publish":o,C=j===void 0?null:j,A=x===void 0?null:x,k=ge(),[D]=Ar(),{language:S}=D,O=xs()?.taskId??null,{data:B}=nn.useSession(),T=Fr(Lr(l,i,u)),{allPaths:F,changedFilesTotal:L,changedFilesTruncated:W,diff:q,bodiesFailed:X,refresh:M,gate:H,hosted:J,otherWork:ne}=s;let Q;e[0]!==v||e[1]!==s.bodiesPending||e[2]!==s.cardsPending||e[3]!==s.summary?(Q={summary:s.summary,cardsPending:s.cardsPending,bodiesPending:s.bodiesPending,compareDraft:v},e[0]=v,e[1]=s.bodiesPending,e[2]=s.cardsPending,e[3]=s.summary,e[4]=Q):Q=e[4];const he=Q;let Z;e[5]!==J?(Z={hosted:J},e[5]=J,e[6]=Z):Z=e[6];const re=mo(he,Z),{summary:$,cardsPending:ee,bodiesPending:K,compareDraft:te}=re.shown,[se,Pe]=U.useState(null),[ae,ie]=U.useState(!1),[de,oe]=U.useState(Fc);let z;e[7]===Symbol.for("react.memo_cache_sentinel")?(z=V=>oe(ue=>ue.has(V)?ue:new Set(ue).add(V)),e[7]=z):z=e[7];const fe=z,[ke,me]=U.useState(null);let Y;e[8]===Symbol.for("react.memo_cache_sentinel")?(Y=[],e[8]=Y):Y=e[8];const[E,ce]=U.useState(Y);let Ie;e[9]!==s.v8?(Ie=V=>{me(V),ce(ue=>[V,...ue.filter(je=>je!==V)]),s.v8&&setTimeout(()=>fe(V),kc)},e[9]=s.v8,e[10]=Ie):Ie=e[10];const Qe=Ie,[Se,gt]=U.useState(null);let Je;e[11]!==se||e[12]!==$?(Je=Co(se,Do($)),e[11]=se,e[12]=$,e[13]=Je):Je=e[13];const ve=Je,xe=[...$.pages,...$.blocks,...$.other],Ae=xe.find(V=>Ce(V)===ke)??xe[0]??null,Be=Ae?Ce(Ae):null,_e=[...new Set([...Be?[Be]:[],...E,...xe.map(Ce)])].filter(V=>xe.some(ue=>Ce(ue)===V)).slice(0,Cc),Te=!!s.v8,[Rt,Me]=U.useState(null),$e=Te?Sc({selectedId:Be,readyIds:de,lastShownId:Rt,liveIds:_e}):Be;Te&&$e===Be&&$e!==Rt&&Me($e);const pe=N==="review"&&!J,ot=ee?"loading":K?"manifest":"ready",Ye=A?.state==="open",ct=s.headBranch,Fe=B?.user;let _;e[14]!==Fe?(_=ga(Fe),e[14]=Fe,e[15]=_):_=e[15];let le;e[16]!==s.expectedDiffSignature?(le=s.expectedDiffSignature?{expectedDiffSignature:s.expectedDiffSignature}:{},e[16]=s.expectedDiffSignature,e[17]=le):le=e[17];let ye;e[18]!==c||e[19]!==u||e[20]!==d||e[21]!==l||e[22]!==p||e[23]!==b||e[24]!==h||e[25]!==s.expectedHeadSha||e[26]!==s.headBranch||e[27]!==_||e[28]!==le||e[29]!==O||e[30]!==i?(ye={orgSlug:l,virtualMcpId:i,branch:u,threadId:O,fastPreview:d,baseBranch:c,target:h,owner:p,repo:b,headBranch:ct,coAuthor:_,expectedHeadSha:s.expectedHeadSha,...le},e[18]=c,e[19]=u,e[20]=d,e[21]=l,e[22]=p,e[23]=b,e[24]=h,e[25]=s.expectedHeadSha,e[26]=s.headBranch,e[27]=_,e[28]=le,e[29]=O,e[30]=i,e[31]=ye):ye=e[31];const Re=ye,Xe=pe?"review":"publish",dt=B?.user?.name;let Et;e[32]!==F||e[33]!==m||e[34]!==J||e[35]!==ve||e[36]!==n||e[37]!==y||e[38]!==P||e[39]!==a||e[40]!==M||e[41]!==s.protocol||e[42]!==Xe||e[43]!==dt||e[44]!==Re?(Et={mode:Xe,target:Re,note:ve,allPaths:F,destinationHost:m,publishLockRef:a,onOpenChange:n,refresh:M,onPullRequestChanged:P,onPublished:y,hosted:J,authorName:dt,protocol:s.protocol},e[32]=F,e[33]=m,e[34]=J,e[35]=ve,e[36]=n,e[37]=y,e[38]=P,e[39]=a,e[40]=M,e[41]=s.protocol,e[42]=Xe,e[43]=dt,e[44]=Re,e[45]=Et):Et=e[45];const{isPublishing:Ne,publishError:Ze,publishErrorDetail:ut,submit:et,discardChange:_t,discardAll:ys,deletedBlocks:Dt,publishWithResolutions:xt,dismissDeletedBlocks:js}=oi(Et),tt=_r(l,i).phase==="saving",Tt=$.count>0||ne,vt=!Ne&&Tt&&(pe||H.allowed);let yt;e[46]!==c||e[47]!==pe||e[48]!==s.v8||e[49]!==$.count||e[50]!==k?(yt=pe?$.count===0?k("thread.publishPopover.submitForReview"):$.count===1?k("thread.publishPopover.submitOneForReview"):k("thread.publishPopover.submitCountForReview",{count:$.count}):wc($.count,c,!!s.v8,k),e[46]=c,e[47]=pe,e[48]=s.v8,e[49]=$.count,e[50]=k,e[51]=yt):yt=e[51];const jt=yt;let zt;e:{if(pe&&Ye){let je;e[52]!==A.number||e[53]!==k?(je=k("thread.publishPopover.updatesPullRequest",{number:A.number}),e[52]=A.number,e[53]=k,e[54]=je):je=e[54],zt=je;break e}const V=C;if(!V?.mergedAt){zt=null;break e}let ue;if(e[55]!==S||e[56]!==V||e[57]!==k){const je=tl(new Date(V.mergedAt),S),De=dc(V);ue=De?k("thread.publishPopover.lastPublishedBy",{when:je,name:De}):k("thread.publishPopover.lastPublished",{when:je}),e[55]=S,e[56]=V,e[57]=k,e[58]=ue}else ue=e[58];zt=ue}const wt=zt;let Ut;e[59]!==pe||e[60]!==$.count||e[61]!==k?(Ut=pe?k("thread.publishPopover.submitForReview"):$.count===1?k("thread.publishPopover.publishOne"):$.count>1?k("thread.publishPopover.publishCount",{count:$.count}):k("thread.publishPopover.publish"),e[59]=pe,e[60]=$.count,e[61]=k,e[62]=Ut):Ut=e[62];const Kt=Ut,Pt=(V,ue)=>ue.length===0?null:r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:V}),ue.map(je=>{const De=Ce(je);return r.jsx(Ca,{change:je,bodyPending:K,selected:Ae!==null&&Ce(Ae)===De,onSelect:()=>Qe(De),confirming:Se===De,onConfirmingChange:Oe=>gt(Oe?De:null),onDiscard:s.canDiscard(je)?()=>{_t(je)}:void 0,isPublishing:Ne,isDiscarding:tt,v8:!!s.v8},De)})]});let ht;e:{if(pe||!Tt){ht=null;break e}if(H.pending){let De;e[63]===Symbol.for("react.memo_cache_sentinel")?(De=r.jsx(ms,{className:"size-3.5 motion-reduce:animate-none"}),e[63]=De):De=e[63];let Oe;e[64]!==k?(Oe=k("thread.publishPopover.reviewing"),e[64]=k,e[65]=Oe):Oe=e[65];let Ve;e[66]!==Oe?(Ve=r.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-2.5 text-xs text-muted-foreground",children:[De,Oe]}),e[66]=Oe,e[67]=Ve):Ve=e[67],ht=Ve;break e}if(H.allowed){ht=null;break e}let V;e[68]===Symbol.for("react.memo_cache_sentinel")?(V=r.jsx(Sn,{className:"mt-0.5 size-3.5 shrink-0"}),e[68]=V):V=e[68];let ue;e[69]!==H.reason||e[70]!==k?(ue=H.reason??k("thread.publishPopover.needsReviewGeneric"),e[69]=H.reason,e[70]=k,e[71]=ue):ue=e[71];let je;e[72]!==ue?(je=r.jsxs("div",{className:"flex items-start gap-2 border-t px-4 py-2.5 text-xs text-warning",children:[V,r.jsx("span",{children:ue})]}),e[72]=ue,e[73]=je):je=e[73],ht=je}const Bt=ht;let ft;e[74]!==ys||e[75]!==ae||e[76]!==tt||e[77]!==Ne||e[78]!==s.canDiscardAll||e[79]!==$.count||e[80]!==k?(ft=$.count<=1||!s.canDiscardAll?null:r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>ie(!0),disabled:Ne||tt,children:k("thread.publishPopover.discardAll")}),r.jsx(Ds,{open:ae,onOpenChange:ie,children:r.jsxs(Rs,{children:[r.jsxs(Cs,{children:[r.jsx(Ss,{children:k("thread.publishPopover.discardAllTitle")}),r.jsx(Ns,{children:k("thread.publishPopover.discardAllConfirm")})]}),r.jsxs(As,{children:[r.jsx(Gs,{children:k("thread.publishDialog.cancel")}),r.jsx(Ws,{onClick:()=>{ys()},disabled:tt,className:G($r({variant:"destructive"})),children:k("thread.publishPopover.discardAll")})]})]})})]}),e[74]=ys,e[75]=ae,e[76]=tt,e[77]=Ne,e[78]=s.canDiscardAll,e[79]=$.count,e[80]=k,e[81]=ft):ft=e[81];const ws=ft,It=ee?r.jsx(Ts,{children:r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(Lt,{}),r.jsx(Lt,{})]})}):$.count===0&&ne?r.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:k("thread.publishPopover.onlyOtherWork")}):$.count===0?r.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[r.jsx(Ln,{className:"mb-1 size-5 text-success"}),r.jsx("p",{className:"text-sm font-medium",children:k(pe?"thread.publishPopover.nothingToSubmit":"thread.publishPopover.everythingLive")}),r.jsx("p",{className:"text-xs text-muted-foreground",children:k(pe?"thread.publishPopover.submitEmptyHint":"thread.publishPopover.emptyHint")})]}):r.jsxs(Ts,{children:[W?r.jsx("p",{className:"text-2xs text-muted-foreground",children:k("thread.publishPopover.showingFirst",{shown:$.count,total:L})}):null,Pt(k("thread.publishPopover.pagesGroup"),$.pages),Pt(k("thread.publishPopover.blocksGroup"),$.blocks),Pt(k("thread.publishPopover.otherGroup"),$.other),X?r.jsx("p",{className:"text-2xs text-muted-foreground",children:k("thread.publishPopover.detailsUnavailable")}):null,ne?r.jsx("p",{className:"text-2xs text-muted-foreground",children:k("thread.publishPopover.alsoOtherWork")}):null]}),$t=ee?r.jsx(Gn,{}):Ae?r.jsx("div",{className:G(bs,"relative"),children:xe.filter(V=>_e.includes(Ce(V))).map(V=>r.jsx("div",{className:G("absolute inset-0 flex",Te?Ce(V)===$e?"z-10":"pointer-events-none opacity-0":Ce(V)!==Be&&"hidden"),inert:Te&&Ce(V)!==$e,"aria-hidden":Te&&Ce(V)!==$e?!0:void 0,children:r.jsx(Ia,{change:V,diff:q,bodyPending:K,previewServerUrl:g,draft:te,lastPage:T,v8:s.v8,onReady:Te?()=>fe(Ce(V)):void 0})},Ce(V)))}):r.jsx("div",{className:G(bs,"bg-muted/40")});let mt;e[82]!==jt?(mt=r.jsx("span",{className:"truncate",children:jt}),e[82]=jt,e[83]=mt):mt=e[83];let ze;e[84]!==ws||e[85]!==N||e[86]!==wt||e[87]!==mt?(ze=r.jsx(Wn,{mode:N,title:mt,subLine:wt,trailing:ws}),e[84]=ws,e[85]=N,e[86]=wt,e[87]=mt,e[88]=ze):ze=e[88];let st;e[89]!==Ne||e[90]!==pe||e[91]!==ve||e[92]!==$.count||e[93]!==k?(st=$.count===0?null:r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"text-sm font-medium",children:k(pe?"thread.publishPopover.reviewNote":"thread.publishPopover.versionNote")}),r.jsx(ni,{value:ve,onChange:V=>Pe(V.target.value),placeholder:k(pe?"thread.publishPopover.reviewNotePlaceholder":"thread.publishPopover.versionNotePlaceholder"),rows:2,maxLength:ci,className:"resize-none text-sm",disabled:Ne})]}),e[89]=Ne,e[90]=pe,e[91]=ve,e[92]=$.count,e[93]=k,e[94]=st):st=e[94];let Ue;e[95]!==f||e[96]!==k?(Ue=r.jsx(Qn,{draftPreviewUrl:f,t:k}),e[95]=f,e[96]=k,e[97]=Ue):Ue=e[97];let Ke;e[98]!==vt||e[99]!==H||e[100]!==Tt||e[101]!==J||e[102]!==Ne||e[103]!==pe||e[104]!==w||e[105]!==Kt||e[106]!==re||e[107]!==et||e[108]!==k?(Ke=!pe&&!J&&Tt&&!H.allowed&&!H.pending?r.jsx(be,{type:"button",className:"flex-1",onClick:w,disabled:Ne,children:k("thread.publishPopover.requestApproval")}):r.jsxs(be,{type:"button",variant:pe?"default":"brand",className:"flex-1",onClick:()=>{re.hold(),et().then(V=>{V===!1&&re.release()})},disabled:!vt,children:[Ne?r.jsx(ms,{className:"size-4 motion-reduce:animate-none"}):null,Ne?k(pe?"thread.publishPopover.submitting":"thread.publishPopover.publishing"):Kt]}),e[98]=vt,e[99]=H,e[100]=Tt,e[101]=J,e[102]=Ne,e[103]=pe,e[104]=w,e[105]=Kt,e[106]=re,e[107]=et,e[108]=k,e[109]=Ke):Ke=e[109];let qe;e[110]!==Ue||e[111]!==Ke?(qe=r.jsxs("div",{className:"flex gap-2",children:[Ue,Ke]}),e[110]=Ue,e[111]=Ke,e[112]=qe):qe=e[112];let nt;e[113]!==Ze||e[114]!==ut||e[115]!==k?(nt=Ze?r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-destructive",children:Ze}),ut?r.jsx(ul,{label:k("siteEditor.details"),detail:ut}):null]}):null,e[113]=Ze,e[114]=ut,e[115]=k,e[116]=nt):nt=e[116];let kt;e[117]!==c||e[118]!==Dt||e[119]!==js||e[120]!==Ne||e[121]!==xt?(kt=Dt?r.jsx(La,{blocks:Dt,base:c,pending:Ne,onCancel:js,onConfirm:V=>{xt(V)}},Dt.map($c).join(`
|
|
4
|
-
`)):null,e[117]=c,e[118]=Dt,e[119]=js,e[120]=Ne,e[121]=xt,e[122]=kt):kt=e[122];let St;e[123]!==qe||e[124]!==nt||e[125]!==kt?(St=r.jsxs(r.Fragment,{children:[qe,nt,kt]}),e[123]=qe,e[124]=nt,e[125]=kt,e[126]=St):St=e[126];let Le;e[127]!==It||e[128]!==Bt||e[129]!==ot||e[130]!==ze||e[131]!==st||e[132]!==St?(Le=r.jsx(cn,{state:ot,header:ze,body:It,note:st,gate:Bt,footer:St}),e[127]=It,e[128]=Bt,e[129]=ot,e[130]=ze,e[131]=st,e[132]=St,e[133]=Le):Le=e[133];let He;return e[134]!==$t||e[135]!==Le?(He=r.jsx($s,{pane:$t,list:Le}),e[134]=$t,e[135]=Le,e[136]=He):He=e[136],He}function $c(t){return t.path}function Fc(){return new Set}function Lc(t){if(!(t==="claiming"||t==="ready"||t==="failed"))return Ti[t].short}const Oc=new Set(["failure","timed_out","cancelled","action_required"]);function _a(t){return t.status==="completed"&&Oc.has(t.conclusion)}function Yn(t){return t.status==="queued"||t.status==="in_progress"}function Vs(t){return t.isPending&&t.fetchStatus!=="idle"}function Mc(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr-page"}}function pt(t,e,s){return e?[...t,Mc(s)]:t}function Ge(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"sync",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function pr(t){return{key:"submit-for-review",label:t("thread.headerActions.submitForReview"),action:"create-pr"}}function Us(t,e,s){if(e.filter(Yn).length===0)return t;const n=e.filter(o=>o.status==="completed").length;return{...t,tooltip:s("thread.cmsActions.checksRunning",{done:n,total:e.length})}}function Ec(t){const{lifecycle:e,branch:s,pr:a,checks:n,reviews:o,loading:d,t:l}=t;if(d)return{label:l("thread.headerActions.loading"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.loadingBranchTooltip"),menu:[]};switch(e.phase){case"idle":return{label:t.claimPhase&&Lc(t.claimPhase.kind)||l("thread.headerActions.startingSandbox"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForDaemonTooltip"),menu:[]};case"cloning":return{label:l("thread.headerActions.cloningRepo"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.cloningRepoTooltip"),menu:[]};case"clone-failed":return{label:l("thread.headerActions.cloneFailed"),disabled:!0,variant:"outline",tooltip:e.error||l("thread.headerActions.cloneFailedDefaultTooltip"),menu:[]};case"checking-out":return{label:l("thread.headerActions.switchingTo",{branch:e.to}),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.checkingOutTooltip",{branch:e.to}),menu:[]};case"installing":return{label:l("thread.headerActions.installingPackages"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.installingPackagesTooltip"),menu:[]};case"starting":{if(!(s.kind==="ready"&&(s.workingTreeDirty||s.aheadOfBase>0||s.unpushed>0))&&!t.noReviewableDiff)return{label:l("thread.headerActions.startingApp"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.startingAppTooltip"),menu:[]};break}}if(s.kind!=="ready")return{label:l("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForBranchTooltip"),menu:[]};const i=s,u=i.unpushed>0&&!(a&&i.headSha&&a.headSha&&i.headSha===a.headSha);if(t.noReviewableDiff&&!a)return{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:i.base}),menu:Ge([],i,l)};if(i.workingTreeDirty||u)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:Ge(pt([pr(l)],a,l),i,l)};if(pa("no local work — checking PR/sync state",{workingTreeDirty:i.workingTreeDirty,unpushed:i.unpushed,aheadOfBase:i.aheadOfBase,behindBase:i.behindBase,branch:i.branch,base:i.base,prMerged:a?.merged??null,prState:a?.state??null}),a?.merged)return!!i.headSha&&!!a.headSha&&i.headSha!==a.headSha?{label:l("thread.headerActions.continue"),action:"create-pr",variant:"special",tooltip:l("thread.headerActions.openNewPrTooltip"),menu:Ge(pt([],a,l),i,l)}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.prMergedTooltip",{prNumber:String(a.number),base:a.base}),menu:Ge(pt([],a,l),i,l)};if(i.aheadOfBase>0){if(a&&a.state==="closed"&&!a.merged)return{label:l("thread.headerActions.reopenPr"),action:"reopen",variant:"default",tooltip:l("thread.headerActions.reopenPrTooltip",{prNumber:String(a.number)}),menu:Ge(pt([],a,l),i,l)};if(!a)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:Ge([pr(l)],i,l)};if((o?.mergeableState??"unknown")==="dirty")return{label:l("thread.cmsActions.getLatest"),action:"rebase",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:l("thread.cmsActions.resolveOnProvider"),action:"open-pr-page"}]};const h=n.filter(Yn).length,p=n.filter(_a).map(f=>f.name);if(h===0&&p.length>0)return{label:l("thread.headerActions.fixChecks"),action:"fix-checks",variant:"default",tooltip:l("thread.headerActions.failingChecksTooltip",{checks:p.join(", ")}),meta:{failingChecks:p},menu:Ge(pt([{key:"publish-anyway",label:l("thread.headerActions.publishAnyway"),action:"merge",tooltip:l("thread.headerActions.squashMergeTooltip",{prNumber:String(a.number),base:a.base})}],a,l),i,l)};if(o?.draft)return Us({label:l("thread.headerActions.markReady"),action:"mark-ready",variant:"default",tooltip:l("thread.headerActions.markDraftReadyTooltip"),menu:Ge(pt([],a,l),i,l)},n,l);const b=o?.unresolvedConversations??0;return b>0?Us({label:l("thread.headerActions.addressFeedback"),action:"resolve-comments",variant:"default",tooltip:l("thread.headerActions.unresolvedConversationsTooltip",{count:String(b)}),menu:Ge(pt([],a,l),i,l)},n,l):o?.missingRequiredApprovals?Us({label:l("thread.cmsActions.waitingForReview"),action:"open-pr-page",variant:"outline",tooltip:l("thread.headerActions.waitingForApprovalsTooltip"),menu:Ge(pt([],a,l),i,l)},n,l):Us({label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",meta:{publishPolicyOverride:"open"},menu:Ge(pt([{key:"review",label:l("thread.headerActions.review"),action:"review"}],a,l),i,l)},n,l)}return i.behindBase>0?{label:l("thread.cmsActions.getLatest"),action:"sync",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[]}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:i.base}),menu:[]}}function br(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr"}}function Ks(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"get-latest",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function gr(t,e,s,a){const n=e.length;if(n===0)return t;if(e.filter(Yn).length>0){const l=e.filter(u=>u.status==="completed").length,i=a("thread.cmsActions.checksRunning",{done:l,total:n});return s==="loading"?{...t,loading:!0,tooltip:i}:{...t,tooltip:i}}const d=e.filter(_a).length;return d>0?{...t,variant:"warning",tooltip:a("thread.cmsActions.checksFailing",{failed:d,total:n})}:t}function _c(t,e){return!!(t?.merged&&t.headSha&&e.kind==="ready"&&!e.workingTreeDirty&&e.headSha===t.headSha)}function zc(t){return Vs(t.prQuery)?!0:t.pr?.state!=="open"||t.pr.merged?!1:Vs(t.checksQuery)||Vs(t.reviewsQuery)}function Uc(t,e){return t.workingTreeDirty?!0:e!==null?e>0:t.aheadOfBase>0}function Kc(t,e){if(!t)return{branchMeta:{kind:"unknown"},publishableChangeCount:null};const s=Object.keys(t.changes).length;return{branchMeta:{kind:"ready",branch:e,base:t.base.resolvedRef??"main",workingTreeDirty:!1,unpushed:0,aheadOfBase:s,behindBase:0,headSha:t.revision},publishableChangeCount:s}}function qc(t){return{...t,menu:[]}}function Hc(t){const{branch:e,pr:s,checks:a,reviews:n,publishing:o,saving:d,loading:l,publishableChangeCount:i,t:u}=t;if(e.kind!=="ready"&&t.statusError)return{label:u("thread.cmsActions.retry"),action:"retry-status",variant:"outline",disabled:t.statusRetrying,loading:t.statusRetrying,tooltip:t.statusError,menu:[]};if(l||e.kind!=="ready")return{label:u("thread.headerActions.loading"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(o)return{label:u("thread.cmsActions.publishing"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(t.syncing)return{label:u("thread.cmsActions.gettingLatest"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(d)return{label:u("thread.headerActions.saving"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(s&&s.state==="open"&&!s.merged?s:null){const h=n?.mergeableState??"unknown";return h==="dirty"?{label:u("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:u("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:u("thread.cmsActions.resolveOnProvider"),action:"open-pr"}]}:h==="blocked"||n?.draft?gr({label:u("thread.cmsActions.waitingForReview"),action:"open-pr",variant:"outline",menu:Ks([br(u)],e,u)},a,"loading",u):gr({label:u("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:Ks([br(u)],e,u)},a,"none",u)}return _c(s,e)?{label:u("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:Ks([],e,u)}:Uc(e,i)?{label:u("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:Ks([{key:"request-approval",label:u("thread.headerActions.submitForReview"),action:"request-approval"}],e,u)}:e.behindBase>0?{label:u("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:u("thread.cmsActions.getLatestTooltip"),menu:[],autoRun:e.aheadOfBase===0}:{label:u("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:[]}}function Vc(t){return t.conflicting===!0?"dirty":t.conflicting===null?"unknown":t.reviewBlocked||t.unresolvedConversations>0?"blocked":"clean"}function za(t){const e=I.c(4);let s;e[0]!==t?(s=Ll(t),e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a={...s,select:Gc},e[2]=s,e[3]=a):a=e[3],bt(a)}function Gc(t){const e=t.changeRequest;return e?{draft:e.draft,mergeableState:Vc(e),unresolvedConversations:e.unresolvedConversations,missingRequiredApprovals:e.reviewBlocked}:null}function xr(t,e){return t==="open-pr"||e==="resolve-on-provider"?r.jsx(oa,{size:16}):t==="publish"?r.jsx(Wr,{className:"size-4"}):t==="get-latest"||t==="retry-status"?r.jsx(Nn,{className:"size-4"}):r.jsx(an,{className:"size-4"})}function Wc(t){const e=I.c(67),{virtualMcpId:s}=t,a=ge(),{org:n}=Bs(),o=Cr(),d=Is(s),{data:l}=nn.useSession(),i=Tn(),{deleteRelease:u}=on(s),{currentBranch:c,setCurrentTaskBranch:h,taskId:p,createTask:b}=Or();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={open:!1,mode:"publish"},e[0]=f):f=e[0];const[m,g]=U.useState(f);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=_=>g({open:!0,mode:_}),e[1]=v):v=e[1];const j=v,w=na(d),x=w.status==="attached"||w.status==="public-clone"?w.repo:null,{previewServerUrl:P}=vs(s),y=c?Fr(Lr(n.slug,s,c)):null,N=y?Fn(y.path,y.params):"/",C=Wl(c?{orgSlug:n.slug,virtualMcpId:s,branch:c,previewServerUrl:P,path:N}:null);let A;e[2]!==c||e[3]!==n.slug||e[4]!==s?(A=c?{orgSlug:n.slug,virtualMcpId:s,branch:c}:null,e[2]=c,e[3]=n.slug,e[4]=s,e[5]=A):A=e[5];const k=Ql(A),D=Ot(s,c),S=D.kind==="protocol"&&D.source==="github";let O;e[6]!==c||e[7]!==n.slug||e[8]!==s?(O=c?{orgSlug:n.slug,virtualMcpId:s,branch:c}:null,e[6]=c,e[7]=n.slug,e[8]=s,e[9]=O):O=e[9];const B=Dn(O),T=ca(S?D:null,B);let F;e[10]!==n.slug||e[11]!==s?(F=hl(n.slug,s),e[10]=n.slug,e[11]=s,e[12]=F):F=e[12];const L=fl(F,S?k:null),W=S?ml(P,N,L):C.url,q=c??"",X=p??null;let M;e[13]!==n.slug||e[14]!==q||e[15]!==X||e[16]!==s?(M=Mn({orgSlug:n.slug,virtualMcpId:s,branch:q,threadId:X}),e[13]=n.slug,e[14]=q,e[15]=X,e[16]=s,e[17]=M):M=e[17];const H=!!c&&D.kind!=="pending"&&!S;let J;e[18]!==M||e[19]!==H?(J={...M,enabled:H},e[18]=M,e[19]=H,e[20]=J):J=e[20];const ne=bt(J),Q=S?null:ne.data??null,he=S?Kc(T.data,c??""):null,Z=he?he.branchMeta:Q?{kind:"ready",branch:_n(Q)??c??"",base:Q.base??"main",workingTreeDirty:ki(Q),unpushed:Q.unpushed??0,aheadOfBase:Q.aheadOfBase??0,behindBase:Q.behindBase??0,headSha:Q.headSha??""}:{kind:"unknown"},re=he?he.publishableChangeCount:Q?.changedFiles?ka({files:Q.changedFiles}).count:null,$=S?T:ne,ee=(Z.kind==="ready"?Z.branch:null)??c??null,K=Z.kind==="ready"?Z.base:"main",te=ra({orgId:n.id,orgSlug:n.slug,target:Ee(x),owner:x?.owner??"",repo:x?.name??"",branch:ee}),se=te.data??null,Pe=aa({orgId:n.id,orgSlug:n.slug,target:Ee(x),owner:x?.owner??"",repo:x?.name??"",base:K}),ae=la({orgId:n.id,orgSlug:n.slug,target:Ee(x),owner:x?.owner??"",repo:x?.name??"",branch:ee}),ie=za({orgId:n.id,orgSlug:n.slug,target:Ee(x),owner:x?.owner??"",repo:x?.name??"",branch:ee});let de;e[21]!==ae||e[22]!==se||e[23]!==te||e[24]!==ie?(de=zc({pr:se,prQuery:te,checksQuery:ae,reviewsQuery:ie}),e[21]=ae,e[22]=se,e[23]=te,e[24]=ie,e[25]=de):de=e[25];const oe=de;let z;e[26]!==te?(z=async()=>{await te.refetch()},e[26]=te,e[27]=z):z=e[27];const fe=z,ke=Zn({mutationFn:()=>ho({hosted:S,branch:c,baseBranch:K,nextBranch:()=>Nl(c,Bn(l?.user),i),setCurrentTaskBranch:h,deleteRelease:u}),onError:Yc}),[me,Y]=U.useState(null);let E;e[28]!==n.slug||e[29]!==p||e[30]!==s?(E=async _=>(await Si({orgSlug:n.slug,virtualMcpId:s,branch:_.branch,threadId:p??null},_.base,_.resolutions),_),e[28]=n.slug,e[29]=p,e[30]=s,e[31]=E):E=e[31];let ce;e[32]!==c||e[33]!==n.slug||e[34]!==o||e[35]!==a||e[36]!==p||e[37]!==s?(ce=async _=>{Y(null),rt.success(a("thread.headerActions.syncedWithBase",{base:_.base}));const le=gs.decofile(`${n.slug}/${s}/${_.branch}`);await o.cancelQueries({queryKey:le}),await Promise.all([o.invalidateQueries({queryKey:zn({orgSlug:n.slug,virtualMcpId:s,branch:c??_.branch,threadId:p??null})}),o.invalidateQueries({queryKey:le})])},e[32]=c,e[33]=n.slug,e[34]=o,e[35]=a,e[36]=p,e[37]=s,e[38]=ce):ce=e[38];let Ie;e[39]===Symbol.for("react.memo_cache_sentinel")?(Ie=(_,le)=>{if(_ instanceof Ni){Y({...le,blocks:_.blocks});return}rt.error(_ instanceof Error?_.message:String(_))},e[39]=Ie):Ie=e[39];let Qe;e[40]!==E||e[41]!==ce?(Qe={mutationFn:E,onSuccess:ce,onError:Ie},e[40]=E,e[41]=ce,e[42]=Qe):Qe=e[42];const Se=Zn(Qe),gt=zr(n.slug,s),Je=ke.isPending,ve=Hc({branch:Z,pr:se,checks:ae.data??[],reviews:ie.data??null,publishing:Je,saving:gt,syncing:Se.isPending,statusRetrying:$.isFetching&&!!$.error,statusError:$.error instanceof Error?$.error.message:$.error?String($.error):null,loading:!!oe,publishableChangeCount:re,t:a}),xe=S?qc(ve):ve,Ae=xe.autoRun&&Z.kind==="ready"&&x&&P?`${ee}@${Z.headSha}`:null,Be=U.useRef(null);if(U.useEffect(()=>{!Ae||!ee||Be.current!==Ae&&(Be.current=Ae,Se.mutate({branch:ee,base:K}))},[Ae,ee,K,Se]),w.status==="detached"){let _;e[43]!==a?(_=a("thread.headerActions.reconnectGithub"),e[43]=a,e[44]=_):_=e[44];let le;e[45]!==_?(le=r.jsx(lt,{asChild:!0,children:r.jsx("span",{children:r.jsx(be,{size:"sm",variant:"outline",disabled:!0,children:_})})}),e[45]=_,e[46]=le):le=e[46];let ye;e[47]!==a?(ye=a("thread.headerActions.githubConnectionRemoved"),e[47]=a,e[48]=ye):ye=e[48];let Re;e[49]!==ye?(Re=r.jsx(it,{children:ye}),e[49]=ye,e[50]=Re):Re=e[50];let Xe;return e[51]!==le||e[52]!==Re?(Xe=r.jsx(rn,{children:r.jsxs(at,{children:[le,Re]})}),e[51]=le,e[52]=Re,e[53]=Xe):Xe=e[53],Xe}if(!d)return null;if(!x||!P){const _=x?"noPreviewServer":"noRepo";let le;e[54]!==c||e[55]!==b?(le=c?()=>{const Re=b?.({runtime:"sandbox",branch:c});Re&&sl("coding_session_started",{thread_id:Re})}:void 0,e[54]=c,e[55]=b,e[56]=le):le=e[56];let ye;return e[57]!==_||e[58]!==le?(ye=r.jsx(Xc,{reason:_,onStartCodingSession:le}),e[57]=_,e[58]=le,e[59]=ye):ye=e[59],ye}if(!c)return null;const _e=_=>{switch(_){case"publish":{j("publish");return}case"request-approval":{j("review");return}case"get-latest":{if(!ee||Se.isPending)return;Se.mutate({branch:ee,base:K});return}case"retry-status":{$.refetch();return}case"open-pr":{se?.htmlUrl&&window.open(se.htmlUrl,"_blank","noopener,noreferrer");return}}};let Te;e[60]!==_e?(Te=_=>({key:_.key,label:_.label,icon:xr(_.action,_.key),..._.tooltip?{tooltip:_.tooltip}:{},onSelect:()=>_e(_.action)}),e[60]=_e,e[61]=Te):Te=e[61];const Rt=xe.menu.map(Te),Me=xe.action,$e=xe.label,pe=xe.variant,ot=!!xe.loading;let Ye;e[62]!==a?(Ye=a("thread.cmsActions.moreActionsAriaLabel"),e[62]=a,e[63]=Ye):Ye=e[63];const ct=r.jsx(ba,{size:"sm",label:$e,variant:pe,disabled:!!xe.disabled||!Me,loading:ot,...Me&&!xe.loading?{icon:xr(Me)}:{},...xe.tooltip?{tooltip:xe.tooltip}:{},items:Rt,menuAriaLabel:Ye,onClick:Me?()=>_e(Me):void 0});let Fe;return e[64]!==me||e[65]!==Se?(Fe=me?r.jsx(La,{blocks:me.blocks,base:me.base,pending:Se.isPending,onCancel:()=>Y(null),onConfirm:_=>Se.mutate({branch:me.branch,base:me.base,resolutions:_})},me.blocks.map(Jc).join(`
|
|
5
|
-
`)):null,e[64]=me,e[65]=Se,e[66]=Fe):Fe=e[66],r.jsxs(r.Fragment,{children:[xe.status?r.jsx("span",{className:"mr-1 hidden shrink-0 text-xs text-muted-foreground sm:inline",children:xe.status}):null,ct,Fe,c?r.jsx(Oa,{open:m.open,mode:m.mode,fastPreview:!0,onOpenChange:_=>{_||g(Qc)},orgSlug:n.slug,virtualMcpId:s,branch:c,baseBranch:K,repoTarget:Ee(x),owner:x.owner,repo:x.name,publishPolicy:fa(d?.metadata?.publishPolicy),draftPreviewUrl:W,destinationHost:C.host,previewServerUrl:P,compareDraft:k?{kind:"pointer",pointer:k,...L?{link:L}:{}}:null,lastPublishedPr:Pe.data??null,onRequestApproval:()=>j("review"),openPullRequest:se?.state==="open"?se:null,onPullRequestChanged:fe,onPublished:()=>ke.mutateAsync()}):null]})}function Qc(t){return{...t,open:!1}}function Jc(t){return t.path}function Yc(t){console.error("site editor: settling after publish failed",t)}function Xc(t){const e=I.c(14),{reason:s,onStartCodingSession:a}=t,n=ge(),o=!a;let d;e[0]!==n?(d=n("sandbox.cmsUnavailable.startCodingSession"),e[0]=n,e[1]=d):d=e[1];let l;e[2]!==a||e[3]!==o||e[4]!==d?(l=r.jsx(lt,{asChild:!0,children:r.jsx("span",{children:r.jsx(be,{size:"sm",variant:"outline",disabled:o,onClick:a,children:d})})}),e[2]=a,e[3]=o,e[4]=d,e[5]=l):l=e[5];let i;e[6]!==s||e[7]!==n?(i=n(s==="noPreviewServer"?"sandbox.cmsUnavailable.noPreviewServer":"sandbox.cmsUnavailable.noRepo"),e[6]=s,e[7]=n,e[8]=i):i=e[8];let u;e[9]!==i?(u=r.jsx(it,{children:i}),e[9]=i,e[10]=u):u=e[10];let c;return e[11]!==l||e[12]!==u?(c=r.jsx(rn,{children:r.jsxs(at,{children:[l,u]})}),e[11]=l,e[12]=u,e[13]=c):c=e[13],c}const Mt="The user clicked this action deliberately — execute directly. Do not call user_ask unless you hit an actual problem outside the scope of this intent (missing auth, unresolvable conflict, a check with multiple plausible fixes).";function Zc(t){return`Reopen PR #${t.prNumber}. ${Mt}`}function ed(t){return`Rebase \`${t.branch}\` on the latest base and force-push with --force-with-lease. ${Mt}`}function td(t){return`Sync \`${t.branch}\` with everyone else's work: \`git add -A\`, commit any pending local changes with a concise conventional-commit message (skip if the working tree is clean), \`git pull --rebase\` to bring in anything pushed directly to \`origin/${t.branch}\`, then \`git rebase origin/${t.base}\` to catch up with the base branch. Resolve any conflicts that come up, then push the result (force-with-lease only if the rebase rewrote commits already on the remote). ${Mt}`}function sd(t){const e=(t.failingChecks??[]).map(s=>`\`${s}\``).join(", ");return`PR #${t.prNumber} has failing checks: ${e}. For each: read the logs, diagnose the root cause, apply the smallest fix that makes it pass, commit, and push. ${Mt}`}function nd(t){return`Mark PR #${t.prNumber} ready for review. ${Mt}`}function rd(t){return`Read the unresolved review threads on PR #${t.prNumber}. For each thread: understand the reviewer's ask, apply the needed changes, commit, push, reply explaining what changed, and resolve the thread. If a comment is a question that doesn't need a code change, reply with the answer and resolve. ${Mt}`}function ad(t){return`Review PR #${t.prNumber}. Read the full diff, analyze every changed file for correctness, security, code quality, and alignment with the repo's patterns. Post specific line-level review comments on concerns, then submit an overall review (approve / request changes / comment) with a concise summary. Do not modify the code — this is a read-and-comment pass. ${Mt}`}function vr(t){switch(t){case"publish":return r.jsx(Wr,{className:"size-4"});case"create-pr":case"reopen":return r.jsx(an,{className:"size-4"});case"rebase":case"sync":return r.jsx(Nn,{className:"size-4"});case"fix-checks":return r.jsx(Sn,{className:"size-4"});case"mark-ready":return r.jsx(Ln,{className:"size-4"});case"resolve-comments":return r.jsx($i,{className:"size-4"});case"merge":return r.jsx(pi,{className:"size-4"});case"review":return r.jsx(Ys,{className:"size-4"});case"open-pr-page":return r.jsx(oa,{size:16})}}const yr=new Set(["reopen","rebase","fix-checks","mark-ready","resolve-comments","review","sync"]),jr=new Set(["publish","create-pr"]);function ld(t){const e=I.c(44),{t:s,button:a,actionBusy:n,changeRequestPending:o,savePending:d,onAction:l}=t,i=a.action;let u;e[0]!==i||e[1]!==n?(u=n&&i!==void 0&&yr.has(i),e[0]=i,e[1]=n,e[2]=u):u=e[2];const c=u,h=o&&i==="merge";let p;e[3]!==i||e[4]!==d?(p=d&&i!==void 0&&jr.has(i),e[3]=i,e[4]=d,e[5]=p):p=e[5];const b=p,f=!!a.disabled||c||h||b||!i,m=!!a.loading||h;let g;e[6]!==a.tooltip||e[7]!==c||e[8]!==b||e[9]!==s?(g=c?s("thread.headerActions.chatIsRunning"):b?s("thread.headerActions.saving"):a.tooltip,e[6]=a.tooltip,e[7]=c,e[8]=b,e[9]=s,e[10]=g):g=e[10];const v=g;let j;if(e[11]!==n||e[12]!==a.menu||e[13]!==o||e[14]!==l||e[15]!==d||e[16]!==s){let D;e[18]!==n||e[19]!==o||e[20]!==l||e[21]!==d||e[22]!==s?(D=S=>{const O=n&&yr.has(S.action),B=d&&jr.has(S.action),T=S.action==="merge"&&o,F=B?s("thread.headerActions.saving"):O?s("thread.headerActions.chatIsRunning"):S.tooltip;return{key:S.key,label:S.label,icon:vr(S.action),disabled:!!(O||B||T),...F?{tooltip:F}:{},onSelect:()=>l(S.action)}},e[18]=n,e[19]=o,e[20]=l,e[21]=d,e[22]=s,e[23]=D):D=e[23],j=a.menu.map(D),e[11]=n,e[12]=a.menu,e[13]=o,e[14]=l,e[15]=d,e[16]=s,e[17]=j}else j=e[17];const w=j,x=a.label,P=a.variant;let y;e[24]!==i||e[25]!==m?(y=i&&!m?{icon:vr(i)}:{},e[24]=i,e[25]=m,e[26]=y):y=e[26];let N;e[27]!==v?(N=v?{tooltip:v}:{},e[27]=v,e[28]=N):N=e[28];let C;e[29]!==s?(C=s("thread.headerActions.moreActionsAriaLabel"),e[29]=s,e[30]=C):C=e[30];let A;e[31]!==i||e[32]!==l?(A=i?()=>l(i):void 0,e[31]=i,e[32]=l,e[33]=A):A=e[33];let k;return e[34]!==a.label||e[35]!==a.variant||e[36]!==f||e[37]!==w||e[38]!==m||e[39]!==y||e[40]!==N||e[41]!==C||e[42]!==A?(k=r.jsx(ba,{size:"sm",label:x,variant:P,disabled:f,loading:m,...y,...N,items:w,menuAriaLabel:C,onClick:A}),e[34]=a.label,e[35]=a.variant,e[36]=f,e[37]=w,e[38]=m,e[39]=y,e[40]=N,e[41]=C,e[42]=A,e[43]=k):k=e[43],k}function wr(t){const e=I.c(9),{label:s,children:a}=t;if(!s){let l;return e[0]!==a?(l=r.jsx(r.Fragment,{children:a}),e[0]=a,e[1]=l):l=e[1],l}let n;e[2]!==a?(n=r.jsx(lt,{asChild:!0,children:r.jsx("span",{children:a})}),e[2]=a,e[3]=n):n=e[3];let o;e[4]!==s?(o=r.jsx(it,{children:s}),e[4]=s,e[5]=o):o=e[5];let d;return e[6]!==n||e[7]!==o?(d=r.jsx(rn,{children:r.jsxs(at,{children:[n,o]})}),e[6]=n,e[7]=o,e[8]=d):d=e[8],d}function id(t){return{label:t("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:t("thread.headerActions.waitingForSandboxBranchTooltip"),menu:[]}}function od({virtualMcpId:t}){const e=ge(),{org:s}=Bs(),{data:a}=nn.useSession(),n=Is(t),{deleteRelease:o}=on(t),{currentBranch:d,setCurrentTaskBranch:l,createTask:i,taskId:u}=Or(),c=ll(),{openSidePanel:h}=Bl(),[p,b]=U.useState({open:!1,mode:"publish",policyOverride:null}),f=Ii({connectionId:nl,orgId:s.id,orgSlug:s.slug}),m=Fi(f),[g,v]=U.useState(!1),j=U.useRef(""),w=na(n),x=w.status==="attached"||w.status==="public-clone"?w.repo:null,{lifecycle:P,branch:y,phase:N}=Gl(),C={orgSlug:s.slug,virtualMcpId:t,branch:d??"",threadId:u??null},k=bt({queryKey:zn(C),queryFn:()=>ha(C),enabled:!!d,staleTime:15e3,refetchInterval:Y=>hn(Y.state.data)?5e3:!1}).data??null,D=y,S=P,O=D.kind==="ready"?D.branch:null,B=d??O??void 0,T=(D.kind==="ready"?D.branch:null)??B??null,F=ra({orgId:s.id,orgSlug:s.slug,target:Ee(x),owner:x?.owner??"",repo:x?.name??"",branch:T}),L=F.data??null,W=la({orgId:s.id,orgSlug:s.slug,target:Ee(x),owner:x?.owner??"",repo:x?.name??"",branch:T}),q=za({orgId:s.id,orgSlug:s.slug,target:Ee(x),owner:x?.owner??"",repo:x?.name??"",branch:T}),X=aa({orgId:s.id,orgSlug:s.slug,target:Ee(x),owner:x?.owner??"",repo:x?.name??"",base:D.kind==="ready"?D.base:null}),M=D,H=fa(n?.metadata?.publishPolicy),J=zr(s.slug,t),{previewUrl:ne}=Li(),{previewServerUrl:Q,projectDefault:he}=vs(t),Z=Zr(),re=Tn();if(w.status==="detached")return r.jsx(wr,{label:e("thread.headerActions.githubConnectionRemoved"),children:r.jsx(be,{size:"sm",variant:"outline",disabled:!0,children:e("thread.headerActions.reconnectGithub")})});if(!x)return null;const $=T?Ec({lifecycle:S,branch:M,claimPhase:N,pr:L,checks:W.data??[],reviews:q.data??null,noReviewableDiff:hn(k),loading:Vs(F),t:e}):id(e),ee=JSON.stringify({label:$.label,branchKind:M.kind,workingTreeDirty:M.kind==="ready"?M.workingTreeDirty:null,unpushed:M.kind==="ready"?M.unpushed:null,aheadOfBase:M.kind==="ready"?M.aheadOfBase:null,lifecycle:S.phase,headBranch:T,noReviewableDiff:hn(k)});j.current!==ee&&(j.current=ee,pa("header button",{label:$.label,tooltip:$.tooltip,action:$.action,chatBranch:d,sandboxBranch:O,sandboxRouteBranch:B,headBranch:T,branchMeta:D,effectiveBranchMeta:M,lifecyclePhase:S.phase,prNumber:L?.number??null,prState:L?.state??null}));const K=Y=>(h(),c.sendMessage({parts:[{type:"text",text:Y}]})),te=c.isStreaming,se=M.kind==="ready"?M.base:"main",Pe=async()=>{await F.refetch()},ae=async()=>{const Y=d,E=Cl({viewKind:Z,branch:d,projectDefault:he,userLabel:Bn(a?.user),blogView:re});E.kind==="new-thread"?i({runtime:E.runtime,branch:E.branch}):await l(E.branch),Y&&Y!==se&&await o(Y)},ie=async Y=>{if(!(!x||g)){v(!0);try{const E=ga(a?.user);await di(s.slug,Ee(x),{number:Y,coAuthor:E}),rt.success(e("thread.headerActions.publishedPr",{prNumber:String(Y)})),await Pe(),await ae()}catch(E){rt.error(E instanceof ui?E.detail??hi(E.reason,e):E instanceof Error?E.message:e("thread.headerActions.failedToMergePullRequest"))}finally{v(!1)}}},de=(Y,E)=>b({open:!0,mode:Y,policyOverride:E}),oe=Y=>{if(T)switch(Y){case"publish":de("publish",$.meta?.publishPolicyOverride??null);return;case"create-pr":de("review",null);return;case"merge":L&&ie(L.number);return;case"sync":if(te)return;K(td({branch:T,base:se}));return;case"open-pr-page":L?.htmlUrl&&window.open(L.htmlUrl,"_blank","noopener,noreferrer");return;case"review":if(te)return;L&&K(ad({prNumber:L.number}));return;case"reopen":if(te)return;L&&K(Zc({prNumber:L.number}));return;case"rebase":if(te)return;K(ed({branch:T}));return;case"fix-checks":if(te)return;L&&K(sd({prNumber:L.number,failingChecks:$.meta?.failingChecks??[]}));return;case"mark-ready":if(te)return;L&&K(nd({prNumber:L.number}));return;case"resolve-comments":if(te)return;L&&K(rd({prNumber:L.number}));return}},z=g||te,fe=r.jsx(ld,{t:e,button:$,actionBusy:z,changeRequestPending:g,savePending:J,onAction:oe}),ke=M.kind==="ready"&&M.pushError&&M.pushFailingSince?e("thread.headerActions.pushFailing",{since:new Date(M.pushFailingSince).toLocaleString(),error:M.pushError}):null,me=ke?r.jsx(wr,{label:ke,children:r.jsx(Sn,{role:"img","aria-label":ke,className:"size-4 text-warning"})}):null;return B?r.jsxs(r.Fragment,{children:[me,fe,r.jsx(Oa,{open:p.open,mode:p.mode,fastPreview:!1,recoverSandbox:()=>m.mutateAsync({virtualMcpId:t,branch:B,...u?{threadId:u}:{}}),onOpenChange:Y=>{Y||b(E=>({...E,open:!1}))},orgSlug:s.slug,virtualMcpId:t,branch:B,baseBranch:se,repoTarget:Ee(x),owner:x.owner,repo:x.name,publishPolicy:p.policyOverride??H,draftPreviewUrl:ne,destinationHost:null,previewServerUrl:Q,compareDraft:ne?{kind:"sandbox",previewUrl:ne}:null,lastPublishedPr:X.data??null,onRequestApproval:()=>b(Y=>({...Y,open:!0,mode:"review"})),openPullRequest:L?.state==="open"?L:null,onPullRequestChanged:Pe,onPublished:ae})]}):r.jsxs(r.Fragment,{children:[me,fe]})}function cd(t){const e=I.c(33),{orgSlug:s,virtualMcpId:a,branch:n}=t,o=ge(),[d,l]=U.useState(!1),i=Ot(a,n),u=i.kind==="protocol"&&i.source==="local"?i:null;let c;e[0]!==n||e[1]!==s||e[2]!==a?(c=n?{orgSlug:s,virtualMcpId:a,branch:n}:null,e[0]=n,e[1]=s,e[2]=a,e[3]=c):c=e[3];const h=Dn(c),{data:p}=ca(u,h);if(!u||!h||!n)return null;let b;e[4]!==p?(b=p?Object.keys(p.changes).length:0,e[4]=p,e[5]=b):b=e[5];const f=b;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>l(!0),e[6]=m):m=e[6];let g;e[7]!==f||e[8]!==o?(g=f>0?o("decoServe.changes.buttonCount",{count:f}):o("decoServe.changes.button"),e[7]=f,e[8]=o,e[9]=g):g=e[9];let v;e[10]!==g?(v=r.jsx(be,{size:"sm",variant:"outline","data-testid":"local-changes-button",onClick:m,children:g}),e[10]=g,e[11]=v):v=e[11];let j;e[12]!==o?(j=o("decoServe.changes.title"),e[12]=o,e[13]=j):j=e[13];let w;e[14]!==j?(w=r.jsx(Dr,{className:"sr-only",children:j}),e[14]=j,e[15]=w):w=e[15];let x;e[16]!==n||e[17]!==h||e[18]!==u||e[19]!==d||e[20]!==s||e[21]!==o||e[22]!==a?(x=d?r.jsx(Br,{children:C=>{const{reset:A}=C;return r.jsx(Ir,{fallback:k=>{const{resetError:D}=k;return r.jsx(wn,{title:o("decoServe.changes.title"),body:r.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:o("decoServe.changes.loadFailed")}),onClose:()=>{A(),D(),l(!1)}})},children:r.jsx(U.Suspense,{fallback:r.jsx($s,{pane:r.jsx(Gn,{}),list:r.jsx(wn,{title:o("decoServe.changes.title"),loading:!0,body:r.jsx(Ts,{children:r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(Lt,{}),r.jsx(Lt,{})]})}),onClose:()=>l(!1)})}),children:r.jsx(dd,{orgSlug:s,virtualMcpId:a,branch:n,backend:u,cacheKey:h,onClose:()=>l(!1)})})})}}):null,e[16]=n,e[17]=h,e[18]=u,e[19]=d,e[20]=s,e[21]=o,e[22]=a,e[23]=x):x=e[23];let P;e[24]!==w||e[25]!==x?(P=r.jsxs(Tr,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[w,x]}),e[24]=w,e[25]=x,e[26]=P):P=e[26];let y;e[27]!==d||e[28]!==P?(y=r.jsx(Rr,{open:d,onOpenChange:l,children:P}),e[27]=d,e[28]=P,e[29]=y):y=e[29];let N;return e[30]!==y||e[31]!==v?(N=r.jsxs(r.Fragment,{children:[v,y]}),e[30]=y,e[31]=v,e[32]=N):N=e[32],N}function wn(t){const e=I.c(22),{title:s,trailing:a,body:n,loading:o,onClose:d}=t,l=o===void 0?!1:o,i=ge(),u=l?"loading":"ready";let c;e[0]!==s?(c=r.jsx("span",{className:"truncate",children:s}),e[0]=s,e[1]=c):c=e[1];let h;e[2]!==c||e[3]!==a?(h=r.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[c,a]}),e[2]=c,e[3]=a,e[4]=h):h=e[4];let p;e[5]!==i?(p=i("decoServe.changes.hint"),e[5]=i,e[6]=p):p=e[6];let b;e[7]!==p?(b=r.jsx("p",{className:"text-2xs text-muted-foreground",children:r.jsx(ma,{text:p})}),e[7]=p,e[8]=b):b=e[8];let f;e[9]!==i?(f=i("decoServe.changes.close"),e[9]=i,e[10]=f):f=e[10];let m;e[11]!==d||e[12]!==f?(m=r.jsx(be,{type:"button",variant:"outline",className:"w-full",onClick:d,children:f}),e[11]=d,e[12]=f,e[13]=m):m=e[13];let g;e[14]!==b||e[15]!==m?(g=r.jsxs(r.Fragment,{children:[b,m]}),e[14]=b,e[15]=m,e[16]=g):g=e[16];let v;return e[17]!==n||e[18]!==u||e[19]!==h||e[20]!==g?(v=r.jsx(cn,{state:u,header:h,body:n,footer:g}),e[17]=n,e[18]=u,e[19]=h,e[20]=g,e[21]=v):v=e[21],v}function dd(t){const e=I.c(54),{orgSlug:s,virtualMcpId:a,branch:n,backend:o,cacheKey:d,onClose:l}=t,i=ge();let u;e[0]!==n||e[1]!==s||e[2]!==a?(u={orgSlug:s,virtualMcpId:a,branch:n},e[0]=n,e[1]=s,e[2]=a,e[3]=u):u=e[3];let c;e[4]!==o||e[5]!==d||e[6]!==u?(c={backend:o,cacheKey:d,scope:u},e[4]=o,e[5]=d,e[6]=u,e[7]=c):c=e[7];const h=Vn(c);let p;e[8]!==n||e[9]!==s||e[10]!==h.refresh||e[11]!==a?(p={orgSlug:s,virtualMcpId:a,branch:n,refresh:h.refresh},e[8]=n,e[9]=s,e[10]=h.refresh,e[11]=a,e[12]=p):p=e[12];const b=fi(p),f=_r(s,a).phase==="saving",m=o.describe.readOnly,[g,v]=U.useState(null),[j,w]=U.useState(null),[x,P]=U.useState(!1),{summary:y}=h;let N,C,A,k,D;if(e[13]!==g||e[14]!==o||e[15]!==j||e[16]!==b||e[17]!==x||e[18]!==f||e[19]!==m||e[20]!==h.blocks||e[21]!==h.entries||e[22]!==h.sidesFailed||e[23]!==h.sidesPending||e[24]!==y.blocks||e[25]!==y.count||e[26]!==y.pages||e[27]!==i){const B=[...y.pages,...y.blocks],T=B.find(q=>Ce(q)===g)??B[0]??null;let F;e[33]!==y.count||e[34]!==i?(F=y.count===0?i("decoServe.changes.title"):y.count===1?i("decoServe.changes.titleOne"):i("decoServe.changes.titleCount",{count:y.count}),e[33]=y.count,e[34]=i,e[35]=F):F=e[35],D=F;const L=(q,X)=>X.length===0?null:r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:q}),X.map(M=>{const H=Ce(M);return r.jsx(Ca,{change:M,bodyPending:h.sidesPending,v8:!0,selected:T!==null&&Ce(T)===H,onSelect:()=>v(H),confirming:j===H,onConfirmingChange:J=>w(J?H:null),onDiscard:m||!M.entry?void 0:()=>{b(o,[M.entry],i("thread.publishPopover.discarded",{name:M.name}))},isPublishing:!1,isDiscarding:f},H)})]});let W;e[36]!==o||e[37]!==b||e[38]!==x||e[39]!==f||e[40]!==m||e[41]!==h.entries||e[42]!==y.count||e[43]!==i?(W=m||y.count<=1?null:r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>P(!0),disabled:f,children:i("thread.publishPopover.discardAll")}),r.jsx(Ds,{open:x,onOpenChange:P,children:r.jsxs(Rs,{children:[r.jsxs(Cs,{children:[r.jsx(Ss,{children:i("thread.publishPopover.discardAllTitle")}),r.jsx(Ns,{children:i("thread.publishPopover.discardAllConfirm")})]}),r.jsxs(As,{children:[r.jsx(Gs,{children:i("thread.publishDialog.cancel")}),r.jsx(Ws,{onClick:()=>{b(o,h.entries,i("thread.publishDialog.allChangesDiscarded"))},disabled:f,className:G($r({variant:"destructive"})),children:i("thread.publishPopover.discardAll")})]})]})})]}),e[36]=o,e[37]=b,e[38]=x,e[39]=f,e[40]=m,e[41]=h.entries,e[42]=y.count,e[43]=i,e[44]=W):W=e[44],A=W,C=y.count===0?r.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[r.jsx(Ln,{className:"mb-1 size-5 text-success"}),r.jsx("p",{className:"text-sm font-medium",children:i("decoServe.changes.empty")})]}):r.jsxs(Ts,{children:[L(i("thread.publishPopover.pagesGroup"),y.pages),L(i("thread.publishPopover.blocksGroup"),y.blocks),h.sidesFailed?r.jsx("p",{className:"text-2xs text-muted-foreground",children:i("thread.publishPopover.detailsUnavailable")}):null]}),N=$s,k=T?r.jsx("div",{className:G(bs,"relative flex"),children:r.jsx(Ia,{change:T,diff:null,bodyPending:h.sidesPending,previewServerUrl:null,draft:null,lastPage:null,v8:{blocks:h.blocks}},Ce(T))}):r.jsx("div",{className:G(bs,"bg-muted/40")}),e[13]=g,e[14]=o,e[15]=j,e[16]=b,e[17]=x,e[18]=f,e[19]=m,e[20]=h.blocks,e[21]=h.entries,e[22]=h.sidesFailed,e[23]=h.sidesPending,e[24]=y.blocks,e[25]=y.count,e[26]=y.pages,e[27]=i,e[28]=N,e[29]=C,e[30]=A,e[31]=k,e[32]=D}else N=e[28],C=e[29],A=e[30],k=e[31],D=e[32];let S;e[45]!==C||e[46]!==A||e[47]!==l||e[48]!==D?(S=r.jsx(wn,{title:D,trailing:A,body:C,onClose:l}),e[45]=C,e[46]=A,e[47]=l,e[48]=D,e[49]=S):S=e[49];let O;return e[50]!==N||e[51]!==k||e[52]!==S?(O=r.jsx(N,{pane:k,list:S}),e[50]=N,e[51]=k,e[52]=S,e[53]=O):O=e[53],O}function ud(t){const e=I.c(5),{virtualMcpId:s,branch:a}=t,n=ge(),o=Ot(s,a);if(!hd(o))return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(lt,{asChild:!0,children:r.jsx("span",{"data-testid":"content-version-badge",className:"shrink-0 rounded border border-border px-1.5 py-px font-mono text-2xs leading-4 text-muted-foreground",children:"v8"})}),e[0]=d):d=e[0];let l;e[1]!==n?(l=n("decoServe.version.v8"),e[1]=n,e[2]=l):l=e[2];let i;return e[3]!==l?(i=r.jsxs(at,{children:[d,r.jsx(it,{side:"bottom",className:"max-w-xs",children:l})]}),e[3]=l,e[4]=i):i=e[4],i}function hd(t){return t.kind==="protocol"?t.hasSchema!==!1:t.kind==="unavailable"&&t.source!=="local"}function fd(t){const e=I.c(11),{virtualMcpId:s,branch:a}=t,n=ge(),o=Ot(s,a);if(!(o.kind==="protocol"&&o.source==="local"&&o.describe.readOnly))return null;let l;e[0]!==n?(l=n("decoServe.readOnly.label"),e[0]=n,e[1]=l):l=e[1];let i;e[2]!==l?(i=r.jsx(lt,{asChild:!0,children:r.jsx("span",{tabIndex:0,"data-testid":"deco-serve-read-only",className:"shrink-0 rounded-full bg-warning/10 px-2 py-0.5 text-xs font-medium text-foreground",children:l})}),e[2]=l,e[3]=i):i=e[3];let u;e[4]!==n?(u=n("decoServe.readOnly.tooltip"),e[4]=n,e[5]=u):u=e[5];let c;e[6]!==u?(c=r.jsx(it,{side:"bottom",className:"max-w-xs",children:r.jsx(ma,{text:u})}),e[6]=u,e[7]=c):c=e[7];let h;return e[8]!==i||e[9]!==c?(h=r.jsxs(at,{children:[i,c]}),e[8]=i,e[9]=c,e[10]=h):h=e[10],h}function md(t){return t.servingLocally||t.localPreview?"open":t.runtimeResolved?t.runtime!=="cms"?"open":t.branch?t.blocksV8?"open":t.defaultBranch?t.defaultBranch===t.branch?"blocked":"open":t.listedDraft||t.defaultBranch===null?"open":"pending":"pending":"pending"}function pd(){const t=I.c(27),e=xs(),{org:s}=Bs(),a=Is(e?.virtualMcpId),n=a?.id??e?.virtualMcpId??"",o=e?.currentBranch??null,{runtime:d,resolved:l}=vs(a?.id),i=In(a?.id),{url:u}=Cn(a?.id),{connection:c}=An(n||null),h=!!a&&!!o&&l&&d==="cms"&&!i&&!u,p=o??"",b=e?.taskId??null;let f,m,g,v;t[0]!==s.slug||t[1]!==p||t[2]!==b||t[3]!==n?(m={orgSlug:s.slug,virtualMcpId:n,branch:p,threadId:b},f=bd,v=bt,g=Mn(m),t[0]=s.slug,t[1]=p,t[2]=b,t[3]=n,t[4]=f,t[5]=m,t[6]=g,t[7]=v):(f=t[4],m=t[5],g=t[6],v=t[7]);let j;t[8]!==f||t[9]!==m?(j=(S,O)=>f(O?.queryKey)===f(zn(m))?S:void 0,t[8]=f,t[9]=m,t[10]=j):j=t[10];let w;t[11]!==h||t[12]!==g||t[13]!==j?(w={...g,enabled:h,placeholderData:j},t[11]=h,t[12]=g,t[13]=j,t[14]=w):w=t[14];const x=v(w),P=!!u,y=!!c;let N;if(t[15]!==i||t[16]!==o||t[17]!==a?.metadata?.releases||t[18]!==l||t[19]!==d||t[20]!==x.data||t[21]!==x.isError||t[22]!==P||t[23]!==y){let S;t[25]!==o?(S=O=>O.branch===o,t[25]=o,t[26]=S):S=t[26],N=md({runtime:d,runtimeResolved:l,blocksV8:i,localPreview:P,servingLocally:y,branch:o,listedDraft:(a?.metadata?.releases??[]).some(S),defaultBranch:x.data?x.data.base??null:x.isError?null:void 0}),t[15]=i,t[16]=o,t[17]=a?.metadata?.releases,t[18]=l,t[19]=d,t[20]=x.data,t[21]=x.isError,t[22]=P,t[23]=y,t[24]=N}else N=t[24];const C=N,A=`${n}:${o??""}`,[k,D]=U.useState(null);return C!=="pending"&&(k?.key!==A||k.gate!==C)&&D({key:A,gate:C}),C==="pending"&&k?.key===A?k.gate:C}function bd(t){return t?.[2]}function gd(t){const e=!t.hasEntity&&!t.servingLocally,s=t.hasEntity&&!t.localPreview&&!t.servingLocally&&!t.onProduction&&t.showsRepositoryActions;return{hidden:e,localFiles:!e&&t.servingLocally,draftSelect:!e&&t.hasEntity,publish:e||!s?null:t.runtime==="cms"?"cms":"code"}}function xu(t){const e=I.c(2),{blocksOnly:s}=t;let a;return e[0]!==s?(a=s?r.jsx(xd,{}):r.jsx(Ua,{}),e[0]=s,e[1]=a):a=e[1],a}function xd(){return In(Mi())?r.jsx(Ta,{value:!1,children:r.jsx(Ua,{})}):null}function Ua(){const t=I.c(32),e=xs(),{org:s}=Bs(),a=Is(e?.virtualMcpId),n=e?.currentBranch??null,o=vs(a?.id).runtime,{url:d}=Cn(a?.id),{connection:l}=An(a?.id??e?.virtualMcpId),i=a?.id??e?.virtualMcpId,u=pd()!=="open",c=!!a,h=!!l,p=!!d;let b;t[0]!==a||t[1]!==u||t[2]!==o||t[3]!==c||t[4]!==h||t[5]!==p?(b=gd({hasEntity:c,servingLocally:h,localPreview:p,showsRepositoryActions:!!a&&Oi(a),runtime:o,onProduction:u}),t[0]=a,t[1]=u,t[2]=o,t[3]=c,t[4]=h,t[5]=p,t[6]=b):b=t[6];const f=b;if(!i||f.hidden)return null;let m;t[7]!==n||t[8]!==i?(m=r.jsx(ud,{virtualMcpId:i,branch:n}),t[7]=n,t[8]=i,t[9]=m):m=t[9];let g;t[10]!==n||t[11]!==f.localFiles||t[12]!==i?(g=f.localFiles&&r.jsx(fd,{virtualMcpId:i,branch:n}),t[10]=n,t[11]=f.localFiles,t[12]=i,t[13]=g):g=t[13];let v;t[14]!==n||t[15]!==s||t[16]!==f.localFiles||t[17]!==i?(v=f.localFiles&&r.jsx(cd,{orgSlug:s.slug,virtualMcpId:i,branch:n}),t[14]=n,t[15]=s,t[16]=f.localFiles,t[17]=i,t[18]=v):v=t[18];let j;t[19]!==n||t[20]!==a||t[21]!==f.draftSelect?(j=a&&f.draftSelect&&r.jsx("div",{className:"flex min-w-0 shrink items-center justify-end",children:r.jsx(lo,{virtualMcp:a,currentBranch:n})}),t[19]=n,t[20]=a,t[21]=f.draftSelect,t[22]=j):j=t[22];let w;t[23]!==a||t[24]!==f.publish?(w=a&&f.publish&&r.jsxs(r.Fragment,{children:[r.jsx(rl,{orientation:"vertical",className:"mx-1 data-[orientation=vertical]:h-4"}),r.jsx("div",{className:"flex shrink-0 items-center justify-end gap-1",children:f.publish==="cms"?r.jsx(Wc,{virtualMcpId:a.id}):r.jsx(od,{virtualMcpId:a.id})})]}),t[23]=a,t[24]=f.publish,t[25]=w):w=t[25];let x;return t[26]!==m||t[27]!==g||t[28]!==v||t[29]!==j||t[30]!==w?(x=r.jsxs(r.Fragment,{children:[m,g,v,j,w]}),t[26]=m,t[27]=g,t[28]=v,t[29]=j,t[30]=w,t[31]=x):x=t[31],x}export{xu as S,pd as a,Aa as b,Xi as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u,r as g,j as n,J as G,a0 as F,a as E,l as O,b as P,n as y,L as H}from"./index-FR7-LkFs.js";import{C as M}from"./chat-context-CN0ge7G_.js";import{ChatLayout as x}from"./index-DbzQIfNo.js";import{L}from"./index-8HE48uEz.js";import{B as J}from"./blocks-preview-workspace-context-C1jP5wlw.js";import{e as T,p as K,s as V,a as W,r as U,T as $,u as R,b as z}from"./site-editor-toast-CksZ_DBd.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-CbOIy4cw.js";import{C as Y}from"./content-tab-B2Ay_G8-.js";import{T as Z}from"./tab-icon-glyph-C0mr7ZyN.js";import{r as tt}from"./resolve-tab-icon-BAO1NHl-.js";import ot from"./agent-site-editor-CkKxXUCS.js";import"./use-panel-navigate-ajPZ-O4i.js";import"./thread-route-H2DC02zF.js";import"./use-project-scope-DbG1jNVV.js";import"./repository-binding-DdJXPhL-.js";import"./use-mcp-client-B9e5PyU5.js";import"./auth-Bl-k7r97.js";import"./use-view-draft-kind-CBmzgnXH.js";import"./use-blog-view-Ba0QG6QU.js";import"./use-organization-settings-D9Z_MLl2.js";import"./schema-Do1srOed.js";import"./task-board-WdgeTNaU.js";import"./thread-intent-DDQe6PKd.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DvEr2HwM.js";import"./session-runtime-ByRl2V_-.js";import"./use-entitlements-b0vun-2_.js";import"./use-ai-providers-CTFkZoGo.js";import"./use-current-view-D_ifkjui.js";import"./use-in-settings-CK5SsWhS.js";import"./use-decopilot-events-DY8bcy2g.js";import"./use-mobile-Dcp3TiKi.js";import"./tooltip-zEsMTxPP.js";import"./index-CexiDE6J.js";import"./MessageCircle01-Ccsb6qrK.js";import"./XClose-_lsllZaX.js";import"./thread-button-Qhfu18qZ.js";import"./use-sidebar-collapsed-BnOq_oEM.js";import"./sheet-Ba_kC1AK.js";import"./use-chat-layout-state-vbFKmjxB.js";import"./toolbar-icon-button-D2GZy3ji.js";import"./resizable-BrnNepSm.js";import"./route-page-header-Bjz66AQK.js";import"./LayoutLeft-BRKXPCjt.js";import"./task-key-BOhf6PeF.js";import"./sortable.esm-DW0wRpPm.js";import"./Tool01-BR1SF2OD.js";import"./agent-icon-BHVUedtV.js";import"./AlertCircle-CPiOwWun.js";import"./UserCheck01-D6gLgI3l.js";import"./ArrowUp-jEyjY7ti.js";import"./ArrowLeft-BmNyLgKT.js";import"./ArrowRight-eaR9pEFa.js";import"./BookOpen01-anezSoTd.js";import"./Globe04-OpdFYH01.js";import"./CheckCircle-Cyt1BwLE.js";import"./TrendUp01-PuhB09lM.js";import"./ChevronDown-DHu3fSw0.js";import"./ChevronSelectorVertical-CADaAEiD.js";import"./ChevronUp-XsNgN3o9.js";import"./UserSquare-BHfTOZb7.js";import"./LinkBroken01-oT9QqlUI.js";import"./CreditCard01-Cu1-B7H4.js";import"./File02-CG-VTATo.js";import"./SwitchHorizontal01-Cfysn-sK.js";import"./Eye-w_JiO-fJ.js";import"./Image01-Y2lD5lzL.js";import"./Key01-BzZWEKIv.js";import"./Minus-CqZyDWGo.js";import"./Monitor01-BwGctKTP.js";import"./Sun-DjNmeFt2.js";import"./Play-CBJR-IvJ.js";import"./Plus-INbg-jHc.js";import"./SearchMd-zyGFO7cc.js";import"./ShoppingBag01-DM_RSubP.js";import"./Trash01-thCRPjRX.js";import"./Upload01-phZoBZ05.js";import"./Users01-DVJrVMQW.js";import"./Zap-B4USkjaG.js";import"./context-menu-DkzmRTYN.js";import"./use-org-notice-CsHPv0ZT.js";import"./create-organization-dialog-sc0Ji-Lm.js";import"./form-CAsgx2CK.js";import"./label-BrDhuinX.js";import"./project-apps-FcEysJSf.js";import"./use-recent-apps-DaKCzULH.js";import"./use-navigate-to-agent-8EROExiH.js";import"./command-_zJuKDCi.js";import"./index-GXFk32Bw.js";import"./use-debounced-value-COFfhICA.js";import"./feedback-BqoIMOg7.js";import"./textarea-HB4U7ZGE.js";import"./use-sandbox-events-DYuy4eXR.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-ou9QCF6v.js";import"./use-voice-input-CChbkXIH.js";import"./popover-7x26sV4l.js";import"./drawer-GUKur5v4.js";import"./index-HW6xhQCR.js";import"./checkbox-B1iPgrjx.js";import"./select-DO5UmbiK.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-O_zWQ9Z7.js";import"./sandbox-git-api-B4kiB_OO.js";import"./save-status-DUnwCvL6.js";import"./use-never-published-Ct3dv44f.js";import"./hosted-reconcile-OWVjsnRk.js";import"./blocks-tab-states-CRdiUDZv.js";import"./empty-state-BO8_YMfm.js";import"./search-input-DLh0nlr5.js";import"./tabs-DD53shfE.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-CwMKmvEP.js";import"./asset-utils-D9WZTXXH.js";import"./useInfiniteQuery-f2vaHavl.js";import"./infiniteQueryObserver-Bo9y-Vk0.js";import"./usage-stats-DV0A8cEM.js";import"./utils-CVEq3hMx.js";import"./markdown-CV0DScZs.js";import"./use-copy-d7u6BVsA.js";import"./gateway-client-zNeoWGKO.js";import"./switch-BHmi6NG_.js";import"./toggle-group-DsHNAW_o.js";import"./match-site-slug-config-B47_xZCi.js";import"./sandbox-lifecycle-context-DIPvnGzU.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./frame-navigation-BzE9s8s7.js";import"./variant-matcher-override-BLYg6qNr.js";import"./section-array-field-CVPQhOEL.js";import"./use-fast-preview-draft-url-DncEMB04.js";import"./parse-sections-l0PaukKn.js";import"./held-block-view-Ce7FjzFo.js";import"./calendar-DBDouA4h.js";import"./editor-classes-BrZH4rK_.js";import"./empty-message-pNIo6swu.js";import"./pair-UrNHmvwT.js";import"./collapsible-Cw6OK2nn.js";import"./use-task-board-items-C2I9m2B-.js";import"./config-BATJRdlj.js";import"./task-route-CKQNtOSa.js";import"./project-index-CH5Eesm9.js";import"./shell-layout-hxOVAb6r.js";import"./use-deployment-admin-DgU-c4bG.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-D_iw-M-g.js";import"./project-icon-BakFKgaM.js";import"./new-project-dialog-BZf8-lvn.js";import"./repository-picker-DcD51j3V.js";import"./github-icon-CIUXCHYd.js";import"./collection-search-Z4PinuXc.js";import"./new-project-store-D6y4lbf2.js";import"./legacy-admin-welcome-dialog-CCTtGdld.js";import"./required-auth-layout-81VJBEp9.js";import"./use-org-sso-ClZgaz67.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BD-0mBhr.js";import"./types-DMMPR8qW.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-BHM3BFUr.js";import"./use-mcp-prompts-DgapPQcC.js";import"./use-thread-outputs-KaWkhSGH.js";import"./file-type-icon-BoZOJHAX.js";import"./named-rule-step-CrkqnZE0.js";import"./slider-BNKhoqMv.js";import"./index-Cz7ziqq8.js";import"./tooltipContext-DnSCkdE2.js";import"./CategoricalChart-D4s5JRnh.js";import"./index-DFgV3_JA.js";import"./combobox-DEB0BlzS.js";import"./scroll-area-Cg0VHNwx.js";import"./monaco-editor-BrHCIY9F.js";import"./editor-DFpyUa_U.js";import"./useQueries-DUm4FupI.js";import"./device-hint-0Up2oNr2.js";import"./alert-DxQDfLz2.js";import"./virtual-mcp-9Ocfu-kl.js";import"./url-slug-DDGhX66k.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-BTvAxwai.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-CQcB7BzK.js";import"./delete-copy-oEZ7hmoE.js";import"./category-tree-DA278Cug.js";import"./use-move-blocks-B_Oh4K4K.js";import"./index-CDCs_KiA.js";import"./view-header-CDvRMzUc.js";import"./use-cms-publish-actions-BHXk9tUC.js";import"./use-content-sync-BApKNkG6.js";import"./use-delete-block-CGqlkyBO.js";import"./item-actions-WlA-gUNT.js";import"./date-utils-CrvIKg-s.js";import"./badge-D21Nz4Kd.js";import"./empty-state-BlGH7QIy.js";import"./mustache-DbskuLzt.js";import"./collection-table-wrapper-8J2sfJZU.js";import"./table-Vs3bc_5a.js";import"./site-draft-actions-DS6SP7w_.js";import"./separator-ClPt1qls.js";import"./cms-store-drafts-u7ki7lCC.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-BYMPhxVC.js";import"./input-PMXl5ojy.js";import"./icon-button-B2FYU_Bm.js";import"./chat-draft-2YOnJD42.js";import"./use-deco-credits-BcE9Lgca.js";import"./input-oqagqAas.js";import"./suggestion-DNn_oFJd.js";import"./use-org-fs-CaJ4jOuW.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-CxB3q7CQ.js";import"./plan-ladder-CypWDEbr.js";import"./add-connection-dialog-6UuPoub8.js";import"./extract-connection-data-CZ3WadBx.js";import"./metadata-D72DunRR.js";import"./connection-DbiyGcIj.js";import"./connection-card-Cm_8ZjFM.js";import"./connection-slug-BFmtX8Pj.js";import"./schema-CpgLVA1f.js";import"./connection-form-helpers-Bf8srwIN.js";import"./authenticate-and-persist-oauth-C1fZAYJ2.js";import"./mcp-oauth-DjAD5Pae.js";import"./mcp-oauth-ByqxUWfx.js";import"./collection-tabs-attgS7fY.js";import"./use-infinite-scroll-BhP62VAS.js";import"./useSuspenseInfiniteQuery-CSNG6COy.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-DoBMGNxF.js";import"./blog-view-gate-CbTFiiJR.js";function I(o){return o.kind==="unavailable"&&o.source==="local"&&(o.problem?.reason??"not-answering")==="not-answering"}const it=o=>o;function et(o){const t=u.c(10),{candidates:i,invalidLink:c,shell:s,editor:e}=o,r=c===void 0?!1:c,m=s===void 0?it:s,[p,a]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==e?(h=e(p,f),t[1]=p,t[2]=e,t[3]=h):h=t[3],h}let l;t[4]!==i||t[5]!==r?(l=n.jsx(rt,{candidates:i,invalidLink:r,onConnect:a}),t[4]=i,t[5]=r,t[6]=l):l=t[6];let d;return t[7]!==m||t[8]!==l?(d=m(l),t[7]=m,t[8]=l,t[9]=d):d=t[9],d}function rt(o){const t=u.c(17),{candidates:i,invalidLink:c,onConnect:s}=o,e=c===void 0?!1:c,[r]=G(),{language:m}=r;let p;t[0]!==s?(p=N=>s({endpoint:N}),t[0]=s,t[1]=p):p=t[1];let a;t[2]!==i||t[3]!==p?(a={candidates:i,onFound:p},t[2]=i,t[3]=p,t[4]=a):a=t[4];const l=q(a),{state:d,access:f,needsGesture:h}=l;let k;t[5]!==i||t[6]!==m?(k=new Intl.ListFormat(m,{style:"long",type:"conjunction"}).format(i.map(T)),t[5]=i,t[6]=m,t[7]=k):k=t[7];const C=k;let S;t[8]!==f||t[9]!==l.start||t[10]!==h||t[11]!==d?(S=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:l.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=l.start,t[10]=h,t[11]=d,t[12]=S):S=t[12];const _=S;let j;return t[13]!==C||t[14]!==e||t[15]!==_?(j=n.jsx(B,{wait:_,hosts:C,invalidLink:e}),t[13]=C,t[14]=e,t[15]=_,t[16]=j):j=t[16],j}const v="deco-serve",w="working-tree",nt={id:"",slug:"",name:"",logo:null},st={id:v,slug:v},mt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function pt(){const o=window.location.hash,t=new URLSearchParams(o.replace(/^#/,"")).has("endpoint"),i=t?K(o):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),i&&V(i),{candidates:W(i,U()),invalidLink:t&&!i}}const at=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function lt(){const o=u.c(6),t=P();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ct},o[0]=i):i=o[0];const c=O(i);let s;o[1]!==t||o[2]!==c?(s=at.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(H,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Z,{icon:tt({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),o[1]=t,o[2]=c,o[3]=s):s=o[3];let e;return o[4]!==s?(e=n.jsx(y.Tabs,{children:s}),o[4]=s,o[5]=e):e=o[5],e}function ct(o){return o.matches.at(-1)?.staticData.siteEditorView}function A(o){const t=u.c(14),{children:i}=o,c=P(),{connection:s}=z(v),e=R(v,w);let r,m;if(t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==c){m=Symbol.for("react.early_return_sentinel");t:{if(r=s?T(s.endpoint):"",e.kind==="protocol"){m=i;break t}if(e.kind!=="unavailable"||I(e)){m=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=e,t[1]=i,t[2]=s,t[3]=c,t[4]=r,t[5]=m}else r=t[4],m=t[5];if(m!==Symbol.for("react.early_return_sentinel"))return m;let p;t[6]!==e.problem?(p=e.problem??{reason:"not-answering"},t[6]=e.problem,t[7]=p):p=t[7];let a;t[8]!==r||t[9]!==p?(a={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=a):a=t[10];let l;return t[11]!==r||t[12]!==a?(l=n.jsx(B,{wait:a,hosts:r}),t[11]=r,t[12]=a,t[13]=l):l=t[13],l}function dt(o){const t=u.c(6),{onLost:i}=o,c=R(v,w);let s;t[0]!==c?(s=I(c),t[0]=c,t[1]=s):s=t[1];const e=s;let r,m;return t[2]!==e||t[3]!==i?(r=()=>{e&&i()},m=[e,i],t[2]=e,t[3]=i,t[4]=r,t[5]=m):(r=t[4],m=t[5]),g.useEffect(r,m),null}const D={threadOpen:!1,contentOpen:!0,toggleFullscreen:()=>{},toggleContent:()=>{}};function ut(){const o=u.c(11),{data:t}=E.useSession();let i;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={select:ft},o[0]=i):i=o[0];const c=O(i),s=!!t?.user;let e;o[1]!==s?(e={rail:s},o[1]=s,o[2]=e):e=o[2];const r=c??"preview";let m,p,a;o[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(lt,{}),p=n.jsx(ot,{}),a=n.jsx(x.Thread,{children:null}),o[3]=m,o[4]=p,o[5]=a):(m=o[3],p=o[4],a=o[5]);let l;o[6]!==r?(l=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:r,contentNavigation:m,children:[p,a]})}),o[6]=r,o[7]=l):l=o[7];let d;return o[8]!==e||o[9]!==l?(d=n.jsx(L,{outsideOrg:e,children:l}),o[8]=e,o[9]=l,o[10]=d):d=o[10],d}function ft(o){return o.matches.at(-1)?.staticData.siteEditorView}function ht(o){const t=u.c(10),{children:i}=o,{data:c}=E.useSession(),s=!!c?.user;let e;t[0]!==s?(e={rail:s},t[0]=s,t[1]=e):e=t[1];let r;t[2]!==i?(r=n.jsx(x.Content,{children:i}),t[2]=i,t[3]=r):r=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(x.Thread,{children:null}),t[4]=m):m=t[4];let p;t[5]!==r?(p=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:"guide",children:[r,m]})}),t[5]=r,t[6]=p):p=t[6];let a;return t[7]!==e||t[8]!==p?(a=n.jsx(L,{outsideOrg:e,children:p}),t[7]=e,t[8]=p,t[9]=a):a=t[9],a}const b=()=>{},vt={connection:null,set:b,clear:b};function Ir(){const o=u.c(3),[t]=g.useState(pt);let i;return o[0]!==t.candidates||o[1]!==t.invalidLink?(i=n.jsx(F,{org:nt,project:st,children:n.jsx(et,{candidates:t.candidates,invalidLink:t.invalidLink,shell:kt,editor:xt})}),o[0]=t.candidates,o[1]=t.invalidLink,o[2]=i):i=o[2],i}function xt(o,t){return n.jsxs($.Provider,{value:{connection:o,set:b,clear:b},children:[n.jsx(dt,{onLost:t}),n.jsx(M,{value:mt,children:n.jsx(J,{children:n.jsx(ut,{})})})]})}function kt(o){return n.jsx($.Provider,{value:vt,children:n.jsx(ht,{children:o})})}function Ar(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Q,{virtualMcpId:v})}),o[0]=t):t=o[0],t}function Dr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Y,{virtualMcpId:v})}),o[0]=t):t=o[0],t}export{Dr as SiteEditorContent,Ar as SiteEditorPreview,Ir as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,a4 as n,j as r,K as f}from"./index-FR7-LkFs.js";import{ChatLayout as d}from"./index-DbzQIfNo.js";import{m as u,P as x,T as h}from"./mock-board-BbC-KPvo.js";import{F as j}from"./feature-gate-CmVeJQy1.js";import"./use-mobile-Dcp3TiKi.js";import"./tooltip-zEsMTxPP.js";import"./index-CexiDE6J.js";import"./MessageCircle01-Ccsb6qrK.js";import"./XClose-_lsllZaX.js";import"./thread-button-Qhfu18qZ.js";import"./use-sidebar-collapsed-BnOq_oEM.js";import"./sheet-Ba_kC1AK.js";import"./use-chat-layout-state-vbFKmjxB.js";import"./use-panel-navigate-ajPZ-O4i.js";import"./thread-route-H2DC02zF.js";import"./use-project-scope-DbG1jNVV.js";import"./repository-binding-DdJXPhL-.js";import"./use-mcp-client-B9e5PyU5.js";import"./auth-Bl-k7r97.js";import"./toolbar-icon-button-D2GZy3ji.js";import"./use-in-settings-CK5SsWhS.js";import"./resizable-BrnNepSm.js";import"./route-page-header-Bjz66AQK.js";import"./LayoutLeft-BRKXPCjt.js";import"./use-current-view-D_ifkjui.js";import"./task-key-BOhf6PeF.js";import"./sortable.esm-DW0wRpPm.js";import"./use-task-board-analytics-DeDE1IEl.js";import"./combobox-DEB0BlzS.js";import"./ChevronSelectorVertical-CADaAEiD.js";import"./command-_zJuKDCi.js";import"./index-GXFk32Bw.js";import"./SearchMd-zyGFO7cc.js";import"./popover-7x26sV4l.js";import"./agent-icon-BHVUedtV.js";import"./AlertCircle-CPiOwWun.js";import"./UserCheck01-D6gLgI3l.js";import"./Tool01-BR1SF2OD.js";import"./ArrowUp-jEyjY7ti.js";import"./ArrowLeft-BmNyLgKT.js";import"./ArrowRight-eaR9pEFa.js";import"./BookOpen01-anezSoTd.js";import"./Globe04-OpdFYH01.js";import"./CheckCircle-Cyt1BwLE.js";import"./TrendUp01-PuhB09lM.js";import"./ChevronDown-DHu3fSw0.js";import"./ChevronUp-XsNgN3o9.js";import"./UserSquare-BHfTOZb7.js";import"./LinkBroken01-oT9QqlUI.js";import"./CreditCard01-Cu1-B7H4.js";import"./File02-CG-VTATo.js";import"./SwitchHorizontal01-Cfysn-sK.js";import"./Eye-w_JiO-fJ.js";import"./Image01-Y2lD5lzL.js";import"./Key01-BzZWEKIv.js";import"./Minus-CqZyDWGo.js";import"./Monitor01-BwGctKTP.js";import"./Sun-DjNmeFt2.js";import"./Play-CBJR-IvJ.js";import"./Plus-INbg-jHc.js";import"./ShoppingBag01-DM_RSubP.js";import"./Trash01-thCRPjRX.js";import"./Upload01-phZoBZ05.js";import"./Users01-DVJrVMQW.js";import"./Zap-B4USkjaG.js";import"./use-task-board-prompts-D6cb0B6a.js";import"./badge-D21Nz4Kd.js";import"./icon-button-B2FYU_Bm.js";import"./use-org-fs-CaJ4jOuW.js";import"./useInfiniteQuery-f2vaHavl.js";import"./infiniteQueryObserver-Bo9y-Vk0.js";import"./use-automations-DCTTlEcO.js";import"./task-board-WdgeTNaU.js";import"./schema-Do1srOed.js";import"./watch-sse-pool-DvEr2HwM.js";import"./backoff-CrEUbyZT.js";import"./search-toggle-n3MSbxdh.js";import"./context-menu-DkzmRTYN.js";import"./super-agent-icon-Cvg_K_iL.js";import"./daily-pulse-Cug1zKXO.js";import"./config-BATJRdlj.js";import"./new-project-dialog-BZf8-lvn.js";import"./label-BrDhuinX.js";import"./use-navigate-to-agent-8EROExiH.js";import"./thread-intent-DDQe6PKd.js";import"./delay-CnY5UFtP.js";import"./session-runtime-ByRl2V_-.js";import"./repository-picker-DcD51j3V.js";import"./github-icon-CIUXCHYd.js";import"./collection-search-Z4PinuXc.js";import"./use-debounced-value-COFfhICA.js";import"./use-organization-settings-D9Z_MLl2.js";import"./new-project-store-D6y4lbf2.js";import"./use-task-board-items-C2I9m2B-.js";import"./use-decopilot-events-DY8bcy2g.js";import"./sprints-C1z9xhcL.js";import"./select-DO5UmbiK.js";import"./index-BdQq_4o_.js";import"./use-tags-C6EDrEBG.js";import"./feedback-BqoIMOg7.js";import"./task-route-CKQNtOSa.js";import"./project-index-CH5Eesm9.js";import"./calendar-DBDouA4h.js";import"./alert-DxQDfLz2.js";import"./collapsible-Cw6OK2nn.js";import"./use-copy-d7u6BVsA.js";import"./markdown-CV0DScZs.js";import"./chat-context-CN0ge7G_.js";import"./use-view-draft-kind-CBmzgnXH.js";import"./use-blog-view-Ba0QG6QU.js";import"./use-entitlements-b0vun-2_.js";import"./use-ai-providers-CTFkZoGo.js";import"./index-D-GlxhqC.js";import"./usage-stats-DV0A8cEM.js";import"./utils-CVEq3hMx.js";import"./gateway-client-zNeoWGKO.js";import"./form-CAsgx2CK.js";import"./editor-classes-BrZH4rK_.js";import"./suggestion-DNn_oFJd.js";import"./index-6N05u2FT.js";import"./index-CDCs_KiA.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-C9H7e6IC.js";import"./use-connection-BHM3BFUr.js";import"./project-icon-BakFKgaM.js";import"./github-repo-scope-C58hYmYC.js";import"./thread-sheet-body-B63iYWkR.js";import"./useSuspenseInfiniteQuery-CSNG6COy.js";import"./pair-UrNHmvwT.js";import"./shell-layout-hxOVAb6r.js";import"./use-deployment-admin-DgU-c4bG.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-CsHPv0ZT.js";import"./integration-icon-D_iw-M-g.js";import"./legacy-admin-welcome-dialog-CCTtGdld.js";import"./drawer-GUKur5v4.js";import"./required-auth-layout-81VJBEp9.js";import"./use-org-sso-ClZgaz67.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BD-0mBhr.js";import"./types-DMMPR8qW.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-mcp-prompts-DgapPQcC.js";import"./use-thread-outputs-KaWkhSGH.js";import"./file-type-icon-BoZOJHAX.js";import"./use-infinite-scroll-BhP62VAS.js";import"./task-status-DDLp4MtP.js";import"./separator-ClPt1qls.js";import"./chat-draft-2YOnJD42.js";import"./feature-paywall-CxB3q7CQ.js";import"./plan-ladder-CypWDEbr.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 ar(){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{ar as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r}from"./index-FR7-LkFs.js";import{b as a}from"./chat-context-CN0ge7G_.js";import{u as i}from"./shell-layout-hxOVAb6r.js";function u(){const t=r.c(3),{sendMessage:s}=a(),{openSidePanel:o}=i();let e;return t[0]!==o||t[1]!==s?(e=n=>{o(),s({parts:[{type:"text",text:n}]})},t[0]=o,t[1]=s,t[2]=e):e=t[2],e}export{u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,dT as c}from"./index-FR7-LkFs.js";import{b as a}from"./repository-binding-DdJXPhL-.js";function i(r){return c(r?.metadata)}function l(r){const t=e.c(2),s=a(r);let o;return t[0]!==s?(o=i(s),t[0]=s,t[1]=o):o=t[1],o}export{i as b,l as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t,c as a}from"./use-organization-settings-D9Z_MLl2.js";import{dG as r}from"./index-FR7-LkFs.js";function g(){return t("blog_view_enabled")}function l(){const e=r()?.org.id,o=a("blog_view_enabled");return e?o:!1}export{l as a,g as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fJ as U,q as xe,b as Q,r as L,e as Ae,K as V,fK as oe,ec as Ee,fL as Me,fM as le,fN as ae,fO as Oe,fP as Fe,fQ as ze,fR as Le,fS as He,fT as Re,c as H,j as o,x as Ue,aS as $e,w as Be,d_ as Ie,R as Qe,v as Ve,D as qe,m as Ge,B as ve,h as _e,t as ke,X as Ye,aW as ce,Y as ee,a7 as We,Z as Je,_ as Ze}from"./index-FR7-LkFs.js";import{u as Xe}from"./use-voice-input-CChbkXIH.js";import{x as Ke,c as et,u as Se,v as tt,aq as it,ar as je,as as rt,at as _,au as X,aj as nt,av as st,aw as fe,ax as te,ay as ue,Z as ot,X as lt,Y as at,az as ct,aA as de,ac as ft,aB as ut,y as dt,$ as mt,aC as ht,aD as pt,aE as gt,a1 as yt}from"./site-editor-toast-CksZ_DBd.js";import{b as xt,h as vt,a as kt,d as me,e as he,f as St,c as jt,g as wt}from"./hosted-reconcile-OWVjsnRk.js";import{z as bt,y as Pt}from"./blocks-tab-states-CRdiUDZv.js";import{s as Ct}from"./sandbox-git-api-B4kiB_OO.js";import{u as Nt}from"./chat-context-CN0ge7G_.js";import{b as Dt}from"./sandbox-url-D3mC8qhT.js";import{d as Tt}from"./utils-O_zWQ9Z7.js";import{d as At}from"./delay-CnY5UFtP.js";import{i as Et}from"./AlertCircle-CPiOwWun.js";import{e as Mt}from"./agent-icon-BHVUedtV.js";import{a as Ot}from"./SwitchHorizontal01-Cfysn-sK.js";import{i as Ft}from"./File02-CG-VTATo.js";import{a as K}from"./Image01-Y2lD5lzL.js";import{i as we}from"./Upload01-phZoBZ05.js";import{S as zt}from"./search-input-DLh0nlr5.js";import{T as Lt,a as Ht,c as Rt,b as Ut}from"./tabs-DD53shfE.js";import{u as $t}from"./use-debounced-value-COFfhICA.js";import{a as Bt}from"./use-file-configs-CwMKmvEP.js";import{a as It,u as Qt,i as be,e as Vt,b as pe,f as qt}from"./asset-utils-D9WZTXXH.js";import{f as q,M as Gt,c as _t,g as Z}from"./usage-stats-DV0A8cEM.js";function Yt(t,e,i,n={}){return Pe("",t,e,i,n)}function Pe(t,e,i,n,r){if(Y(i,n)||Y(e,n))return i;if(Y(e,i))return n;if(ie(i)&&ie(n)){const s=ie(e)?e:{},c={},f=[...Object.keys(i),...Object.keys(n).filter(p=>!(p in i))];for(const p of f){const h=Pe(`${t}/${Wt(p)}`,s[p],i[p],n[p],r);h!==void 0&&(c[p]=h)}return c}if(Array.isArray(e)&&Array.isArray(i)&&Array.isArray(n)&&i.length===e.length&&n.length===e.length){const s=[];for(const[c,f]of e.entries()){const p=!Y(f,i[c]),h=!Y(f,n[c]);if(p&&h&&!Y(i[c],n[c]))return ge(t,i,n,r);s.push(p?i[c]:n[c])}return s}return ge(t,i,n,r)}function ge(t,e,i,n){return n.conflicts?.push(t),n.prefer==="theirs"?i:e}function Wt(t){return t.replaceAll("~","~0").replaceAll("/","~1")}function Y(t,e){return U(t)===U(e)}function ie(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Jt(t){return t?1e3:700}function re(t){return!!t&&typeof t=="object"&&t.keptTheirs===!0}const W=new Map,Zt=20,Xt=200,Kt=1500;function Ce(t){const e=W.get(t);W.delete(t);const i=e??[];if(W.set(t,i),W.size>Xt){const n=W.keys().next().value;n!==void 0&&W.delete(n)}return i}function ei(t,e){const i=Ce(t);i.push(U(e)),i.length>Zt&&i.shift()}function ti(t,e){return Ce(t).includes(U(e))}async function ii(t,e){if(e){if(e.value===void 0)return{[t]:null};try{return{[t]:await Re(e.value)}}catch{return}}}function ri({orgSlug:t,virtualMcpId:e,branch:i},n){const r=xe(),s=Nt()?.taskId??null,c=Ke(e),f=Xe(e).runtime==="cms",{url:p}=et(e),h=Se(e,i),v=h.kind==="protocol"?h:null,u=tt({orgSlug:t,virtualMcpId:e,branch:i}),k=Q(),j=v?.source==="github",[w]=L.useState(()=>n?.holdsCopy?new wt(()=>gt(r,u)):null);w?.settle();const m=j?w:null,g=async(l,a,d,S)=>{if(p)return{blockKey:l,data:a};if(f){const x=async($,O)=>{const B=await ii(l,O);return ht({orgSlug:t,virtualMcpId:e,branch:i},{set:{[l]:$},...B?{expect:B}:{}})},C=`${u}:${l}`,D=($,O=[])=>new _($,O.length>0?k("sectionsEditor.sectionsEditor.blockFieldsChangedElsewhere",{fields:He(O)}):k("sectionsEditor.sectionsEditor.blockChangedElsewhere"),O),A=async $=>{await r.invalidateQueries({queryKey:V.decofile(u)});const O=r.getQueryData(V.decofile(u))?.[l];if(d&&ti(C,O)&&U(O)!==U(d.value))return await At(Kt),{draft:await x(a,d),written:a};const B=[],G=S&&d?.fromCache?Yt(d.value,a,O,{prefer:"theirs",conflicts:B}):void 0;if(G===void 0||B.length>0)throw D($.blocks,B);const I=oe(G);return{draft:await x(I,{value:O}),written:I}};let R=a,z;try{z=await x(a,d)}catch($){if(!($ instanceof _))throw $;try{({draft:z,written:R}=await A($))}catch(O){throw!(O instanceof _)||O.fields.length>0?O:(await r.invalidateQueries({queryKey:V.decofile(u)}),D(O.blocks))}}return ei(C,R),ut(r,{orgSlug:t,virtualMcpId:e,branch:i},z),await r.invalidateQueries({queryKey:Ct({orgSlug:t,virtualMcpId:e,branch:i,threadId:s})}),{...z,written:R}}const y=dt(c,Tt(l)),T=JSON.stringify(a,null,2),E=await fetch(Dt({orgSlug:t,virtualMcpId:e,branch:i,threadId:s},"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:y,content:T})});return E.ok?E.json():mt(E,"Write")},b=async(l,a,d,S,y,T)=>{const E=v,x={queryClient:r,backend:E,params:l,cacheKey:u};let C=d,D=y?void 0:T?T.value:S?.value,A=y?{[a]:null}:T?{[a]:await vt(T,Me(r,u,a))}:await kt(x,[a],S?{[a]:S.value}:void 0);for(let R=0;;R++)try{return{...await te(r,E,l,u,{set:{[a]:C}},A),written:C}}catch(z){if(!X(z))throw z;const $=await ue(r,E,l,u,a,z),O=r.getQueryData(V.decofile(u))?.[a],B=de(r,u,a,E),G=C;if(R+1>=me||!le()||B===void 0||!J(G)||O!==void 0&&!J(O))throw new _([a],R+1>=me?k("siteEditor.save.keptChanging"):k("siteEditor.save.conflict"),[],$);if(A={[a]:B},!J(O)){if(!J(D))continue;if(await ae({kind:"theyDeleted",label:he(a,D,G)})==="theirs")return{keptTheirs:!0,deleted:!0};D=void 0;continue}const I=Oe({ancestor:J(D)?D:{},mine:G,theirs:O}),se=I.pointers.length===0?{}:await Fe(I,ze(I,P(l,O),!0),{block:bt(a,O),author:{draft:l,blockKey:a}});if(C=I.pointers.length===0?I.merged:Le(I,se),St(se)&&U(C)===U(O))return{keptTheirs:!0,deleted:!1};D=O}},P=(l,a)=>{const d=a.__resolveType,S=r.getQueryData(ft(l,v));if(typeof d!="string"||!S?.manifest)return null;try{return Pt(d,S)}catch{return null}},N=async(l,a,d,S,y)=>{const T=v,E=r.getQueryData(V.decofile(u));if(E&&Object.hasOwn(E,a)||!le()||!J(d))return;if(await ae({kind:"theyDeleted",label:he(a,y?.value,d)})==="theirs")return{keptTheirs:!0,deleted:!0};const C=de(r,u,a,T);if(C===void 0)return;const D=await te(r,T,l,u,{set:{[a]:d}},{[a]:C});return S.onApplied?.(D.versions),{...D,written:d}},M=Ae({mutationKey:at(t,e,i),scope:lt(t,e,i),mutationFn:async({blockKey:l,data:a,base:d,rebaseOnConflict:S=!0,guard:y,create:T=!1,edit:E})=>{if(h.kind==="pending"||h.kind==="unavailable")throw nt("CMS storage");if(v?.source!=="github"&&(a=oe(a)),v){const x={orgSlug:t,virtualMcpId:e,branch:i},C=A=>{!m||re(A)||U(A.written)===U(a)&&A.versions[l]&&m.saved(l,a)};if(j&&!y){const A=await b(x,l,a,d,T,T?void 0:m?.guardOf(l,E));return C(A),A}if(j&&y&&!y.reloadOnConflict){const A=await y.ifMatch(l),R=T||!!A&&A[l]===null;try{const z=await b(x,l,a,d,R,R?void 0:m?.guardOf(l,E));return C(z),y.onApplied?.(re(z)?{}:z.versions),z}catch(z){throw y.onRejected?.(z),z}}let D=await y?.ifMatch(l);if(y&&!D&&j&&(await st(r,v,x,u).catch(()=>{throw new fe}),D=await y.ifMatch(l),!D))throw new fe;try{const A=await te(r,v,x,u,{set:{[l]:a}},D);return D&&y?.onApplied?.(A.versions),A}catch(A){if(D&&y?.onRejected?.(A),D&&y?.reloadOnConflict&&X(A)){const R=await ue(r,v,x,u,l,A);if(j)try{const z=await N(x,l,a,y,d);if(z)return z}catch(z){if(!X(z))throw z}throw new _([l],k("sectionsEditor.sectionsEditor.blockChangedElsewhere"),[],R)}throw A}}return ot({queryClient:r,orgSlug:t,virtualMcpId:e,branch:i,backend:h,cacheKey:u},{kind:"edit",write:()=>g(l,a,d,S)})},onMutate:async({blockKey:l,data:a})=>{const d=V.decofile(u);await r.cancelQueries({queryKey:d});const S=r.getQueryData(d),y=!!S&&l in S,T=S?.[l];return r.setQueryData(d,E=>({...E??{},[l]:a})),{queryKey:d,blockKey:l,hadKey:y,previousValue:T}},onError:(l,a,d)=>{rt(k,l),!(!d||l instanceof _)&&(X(l)&&r.invalidateQueries({queryKey:d.queryKey}),r.setQueryData(d.queryKey,S=>{if(!S)return S;if(!d.hadKey){const{[d.blockKey]:y,...T}=S;return T}return{...S,[d.blockKey]:d.previousValue}}))},onSuccess:(l,{blockKey:a,data:d})=>{const S=()=>{if(!m)return;const T=jt({orgSlug:t,virtualMcpId:e,branch:i});Ee.schedule(()=>xt(T,a))};if(re(l)){it(k,l.deleted,l.deleted&&je(r,u,a)),S();return}const y=l&&typeof l=="object"&&"written"in l?l.written:d;r.setQueryData(V.decofile(u),T=>({...T??{},[a]:y})),U(y)!==U(d)&&S()}}),F=l=>{if(l.base)return l;const a=r.getQueryData(V.decofile(u));return a?{...l,base:{value:a[l.blockKey],fromCache:!0}}:l};return{...M,v8:h.kind!=="legacy",mutate:(l,a)=>M.mutate(F(l),a),mutateAsync:(l,a)=>M.mutateAsync(F(l),a),reportError:l=>ct(k,l,v?.source??null),hold:l=>w?.hold(l),holdsCopy:m!==null,autosaveDelay:Jt(v!==null),edited:l=>m?.edited(l),shown:l=>m?.get(l)}}function ir(t,e){const i=H.c(29),n=e?.holdsCopy;let r;i[0]!==n?(r={holdsCopy:n},i[0]=n,i[1]=r):r=i[1];const s=ri(t,r);let c;i[2]===Symbol.for("react.memo_cache_sentinel")?(c=new Map,i[2]=c):c=i[2];const f=L.useRef(c);let p;i[3]===Symbol.for("react.memo_cache_sentinel")?(p=new Map,i[3]=p):p=i[3];const h=L.useRef(p);let v;i[4]===Symbol.for("react.memo_cache_sentinel")?(v=new Map,i[4]=v):v=i[4];const u=L.useRef(v);let k;i[5]===Symbol.for("react.memo_cache_sentinel")?(k=new Set,i[5]=k):k=i[5];const j=L.useRef(k);let w;i[6]===Symbol.for("react.memo_cache_sentinel")?(w=new Set,i[6]=w):w=i[6];const m=L.useRef(w);let g,b;i[7]!==e||i[8]!==s?(g=x=>{if(j.current.has(x)){m.current.add(x);return}const C=f.current.get(x);if(!C)return;const D=typeof C=="function"?C():C;f.current.delete(x);const A=h.current.get(x);h.current.delete(x),D&&(j.current.add(x),s.mutateAsync({blockKey:x,data:D,guard:e?.guard,edit:A}).then(()=>e?.onSaved?.(),s.reportError).finally(()=>{j.current.delete(x),m.current.delete(x)&&g(x)}))},b=()=>{for(const x of u.current.values())clearTimeout(x);u.current.clear();for(const x of[...f.current.keys()])g(x)},i[7]=e,i[8]=s,i[9]=g,i[10]=b):(g=i[9],b=i[10]);const P=b;let N;i[11]===Symbol.for("react.memo_cache_sentinel")?(N=x=>{for(const C of x){const D=u.current.get(C);D&&clearTimeout(D),u.current.delete(C),f.current.delete(C),h.current.delete(C),m.current.delete(C)}},i[11]=N):N=i[11],pt(t.orgSlug,t.virtualMcpId,N);let M,F;i[12]===Symbol.for("react.memo_cache_sentinel")?(F=()=>{const x=C=>{(f.current.size>0||j.current.size>0)&&C.preventDefault()};return window.addEventListener("beforeunload",x),()=>window.removeEventListener("beforeunload",x)},M=[],i[12]=M,i[13]=F):(M=i[12],F=i[13]),L.useEffect(F,M);let l;i[14]!==P||i[15]!==s.holdsCopy?(l=()=>(s.holdsCopy&&P(),s.holdsCopy),i[14]=P,i[15]=s.holdsCopy,i[16]=l):l=i[16];const a=L.useEffectEvent(l);let d;i[17]!==a?(d=()=>{const x=u.current;return()=>{if(!a())for(const C of x.values())clearTimeout(C)}},i[17]=a,i[18]=d):d=i[18];let S;i[19]===Symbol.for("react.memo_cache_sentinel")?(S=[],i[19]=S):S=i[19],L.useEffect(d,S);let y;i[20]!==g||i[21]!==s?(y=(x,C)=>{if(!h.current.has(x)){const A=s.edited(x);A&&h.current.set(x,A)}f.current.set(x,C);const D=u.current.get(x);D&&clearTimeout(D),u.current.set(x,setTimeout(()=>{u.current.delete(x),g(x)},s.autosaveDelay))},i[20]=g,i[21]=s,i[22]=y):y=i[22];const T=y;let E;return i[23]!==P||i[24]!==T||i[25]!==s.hold||i[26]!==s.isPending||i[27]!==s.v8?(E={save:T,flush:P,isPending:s.isPending,hold:s.hold,v8:s.v8},i[23]=P,i[24]=T,i[25]=s.hold,i[26]=s.isPending,i[27]=s.v8,i[28]=E):E=i[28],E}function J(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}const Ne="file-picker:last-config-id";function rr(t){const e=H.c(31),i=Q(),n=t.open,r=t.onOpenChange;let s;e[0]!==t.mode||e[1]!==i?(s=t.mode==="image"?i("filePicker.filePickerDialog.pickAnImage"):i("filePicker.filePickerDialog.pickAFile"),e[0]=t.mode,e[1]=i,e[2]=s):s=e[2];let c;e[3]!==s?(c=o.jsx(Ue,{children:s}),e[3]=s,e[4]=c):c=e[4];let f;e[5]!==i?(f=i("filePicker.filePickerDialog.description"),e[5]=i,e[6]=f):f=e[6];let p;e[7]!==f?(p=o.jsx($e,{children:f}),e[7]=f,e[8]=p):p=e[8];let h;e[9]!==c||e[10]!==p?(h=o.jsxs(Be,{children:[c,p]}),e[9]=c,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==i?(v=b=>{const{error:P}=b;return o.jsx(ni,{error:P??new Error(i("filePicker.filePickerDialog.failedToLoadBuckets"))})},e[12]=i,e[13]=v):v=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Ie,{className:"h-64 w-full"}),e[14]=u):u=e[14];let k;e[15]!==t?(k=b=>{t.onSelect(b),t.onOpenChange(!1)},e[15]=t,e[16]=k):k=e[16];let j;e[17]!==t.lockedConfigId||e[18]!==t.mode||e[19]!==k?(j=o.jsx(L.Suspense,{fallback:u,children:o.jsx(si,{mode:t.mode,lockedConfigId:t.lockedConfigId,onSelect:k})}),e[17]=t.lockedConfigId,e[18]=t.mode,e[19]=k,e[20]=j):j=e[20];let w;e[21]!==j||e[22]!==v?(w=o.jsx(Qe,{fallback:v,children:j}),e[21]=j,e[22]=v,e[23]=w):w=e[23];let m;e[24]!==w||e[25]!==h?(m=o.jsxs(Ve,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[h,w]}),e[24]=w,e[25]=h,e[26]=m):m=e[26];let g;return e[27]!==t.onOpenChange||e[28]!==t.open||e[29]!==m?(g=o.jsx(qe,{open:n,onOpenChange:r,children:m}),e[27]=t.onOpenChange,e[28]=t.open,e[29]=m,e[30]=g):g=e[30],g}function ni(t){const e=H.c(3),{error:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(Et,{size:16}),e[0]=n):n=e[0];let r;return e[1]!==i.message?(r=o.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,o.jsx("span",{className:"text-sm font-medium",children:i.message})]}),e[1]=i.message,e[2]=r):r=e[2],r}function si(t){const e=H.c(36),{mode:i,lockedConfigId:n,onSelect:r}=t,s=Bt(),c=Q();if(s.length===0){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(ai,{}),e[0]=m):m=e[0],m}if(n){let m;if(e[1]!==s||e[2]!==n){let N;e[4]!==n?(N=M=>M.id===n,e[4]=n,e[5]=N):N=e[5],m=s.find(N),e[1]=s,e[2]=n,e[3]=m}else m=e[3];const g=m;if(g){let N;return e[6]!==g||e[7]!==i||e[8]!==r?(N=o.jsx(ne,{config:g,mode:i,onSelect:r}),e[6]=g,e[7]=i,e[8]=r,e[9]=N):N=e[9],N}let b;e[10]!==c?(b=c("virtualMcp.settings.assetStorage.missing"),e[10]=c,e[11]=b):b=e[11];let P;return e[12]!==b?(P=o.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:b}),e[12]=b,e[13]=P):P=e[13],P}if(s.length===1){const m=s[0];let g;return e[14]!==m||e[15]!==i||e[16]!==r?(g=o.jsx(ne,{config:m,mode:i,onSelect:r}),e[14]=m,e[15]=i,e[16]=r,e[17]=g):g=e[17],g}let f;e[18]===Symbol.for("react.memo_cache_sentinel")?(f=typeof window<"u"?window.localStorage.getItem(Ne):null,e[18]=f):f=e[18];const p=f;let h;e[19]!==s?(h=s.find(m=>m.id===p)?.id??s[0].id,e[19]=s,e[20]=h):h=e[20];const v=h;let u;e[21]!==s?(u=s.map(oi),e[21]=s,e[22]=u):u=e[22];let k;e[23]!==u?(k=o.jsx(Ht,{className:"self-start",children:u}),e[23]=u,e[24]=k):k=e[24];let j;if(e[25]!==s||e[26]!==i||e[27]!==r){let m;e[29]!==i||e[30]!==r?(m=g=>o.jsx(Rt,{value:g.id,className:"min-h-0 flex-1 overflow-hidden flex flex-col",children:o.jsx(ne,{config:g,mode:i,onSelect:r})},g.id),e[29]=i,e[30]=r,e[31]=m):m=e[31],j=s.map(m),e[25]=s,e[26]=i,e[27]=r,e[28]=j}else j=e[28];let w;return e[32]!==v||e[33]!==k||e[34]!==j?(w=o.jsxs(Ut,{defaultValue:v,onValueChange:li,className:"min-h-0 flex-1 flex flex-col",children:[k,j]}),e[32]=v,e[33]=k,e[34]=j,e[35]=w):w=e[35],w}function oi(t){return o.jsx(Lt,{value:t.id,children:t.name},t.id)}function li(t){typeof window<"u"&&window.localStorage.setItem(Ne,t)}function ai(){const t=H.c(12),e=Q();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:o.jsx(we,{size:20,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noBucketConfigured"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"font-medium text-sm",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noBucketDescription"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==r||t[10]!==c?(f=o.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[i,o.jsxs("div",{children:[r,c]})]}),t[9]=r,t[10]=c,t[11]=f):f=t[11],f}function ne({config:t,mode:e,onSelect:i}){const n=Q(),[r,s]=L.useState(""),c=$t(r,300),f=It({configId:t.id,search:c,imageOnly:e==="image"}),p=Qt(),[h,v]=L.useState(!1),u=L.useRef(null),k=e==="image"?"image/*":void 0;async function j(a){if(!a)return;const d=Array.from(a);if(d.length===0)return;let S=null;const y=[];for(const T of d)try{const E=await p.mutateAsync({configId:t.id,file:T});S??=E.publicUrl}catch(E){y.push(`${T.name} (${E instanceof Error?E.message:"upload failed"})`)}await f.refetch(),y.length>0&&ke.error(y.length===d.length?n("filePicker.filePickerDialog.uploadFailedAll",{errors:y.join("; ")}):n("filePicker.filePickerDialog.uploadFailedSome",{errors:y.join("; ")})),S&&i(S)}function w(a){a.preventDefault(),v(!0)}function m(){v(!1)}function g(a){a.preventDefault(),a.stopPropagation(),v(!1),j(a.dataTransfer.files)}const P=(f.data?.pages??[]).flatMap(a=>a.items),N=P.filter(a=>e==="image"?be(a.key):!0),M=c.trim(),F=P.length>0||r.trim().length>0,l=r!==c||f.isFetching&&!f.isFetchingNextPage;return o.jsxs("div",{className:"flex flex-col gap-3 min-h-0 flex-1",children:[o.jsxs("button",{type:"button",onClick:()=>u.current?.click(),onDragOver:w,onDragLeave:m,onDrop:g,className:Ge("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",h&&"border-primary bg-primary/5",p.isPending&&"opacity-60 pointer-events-none"),children:[o.jsx(we,{size:18,className:"text-muted-foreground"}),o.jsx("p",{className:"text-sm font-medium",children:p.isPending?n("filePicker.filePickerDialog.uploading"):n("filePicker.filePickerDialog.dropFilesOrClick")}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[n("filePicker.filePickerDialog.uploadSizeLimit")," ",n(e==="image"?"filePicker.filePickerDialog.imagesOnlyTypes":"filePicker.filePickerDialog.commonMediaTypes")]}),o.jsx("input",{ref:u,type:"file",accept:k,multiple:!0,className:"hidden",onChange:a=>{const d=Array.from(a.target.files??[]);a.target.value="",j(d)}})]}),F?o.jsx(zt,{value:r,onChange:s,isSearching:l,placeholder:n(e==="image"?"filePicker.filePickerDialog.searchImagesPlaceholder":"filePicker.filePickerDialog.searchFilesPlaceholder"),className:"shrink-0"}):null,o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[N.length===0?M?o.jsx(ui,{query:M}):e==="image"&&P.length>0?o.jsx(fi,{}):o.jsx(ci,{}):e==="image"?o.jsx(di,{items:N,onSelect:i}):o.jsx(mi,{items:N,onSelect:i}),f.hasNextPage&&o.jsx("div",{className:"flex justify-center py-4",children:o.jsx(ve,{type:"button",variant:"outline",size:"sm",disabled:f.isFetchingNextPage,onClick:()=>f.fetchNextPage(),children:f.isFetchingNextPage?o.jsxs(o.Fragment,{children:[o.jsx(_e,{className:"size-3.5"}),n("filePicker.filePickerDialog.loading")]}):n("filePicker.filePickerDialog.loadMore")})})]})]})}function ci(){const t=H.c(12),e=Q();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noFilesYet"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"text-sm font-medium",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.dropFileToGetStarted"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==r||t[10]!==c?(f=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,r,c]}),t[9]=r,t[10]=c,t[11]=f):f=t[11],f}function fi(){const t=H.c(12),e=Q();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noImagesYet"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"text-sm font-medium",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noImagesFormatDesc"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==r||t[10]!==c?(f=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,r,c]}),t[9]=r,t[10]=c,t[11]=f):f=t[11],f}function ui(t){const e=H.c(13),{query:i}=t,n=Q();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),e[0]=r):r=e[0];let s;e[1]!==i||e[2]!==n?(s=n("filePicker.filePickerDialog.noMatches",{query:i}),e[1]=i,e[2]=n,e[3]=s):s=e[3];let c;e[4]!==s?(c=o.jsx("p",{className:"text-sm font-medium",children:s}),e[4]=s,e[5]=c):c=e[5];let f;e[6]!==n?(f=n("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore"),e[6]=n,e[7]=f):f=e[7];let p;e[8]!==f?(p=o.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[8]=f,e[9]=p):p=e[9];let h;return e[10]!==c||e[11]!==p?(h=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[r,c,p]}),e[10]=c,e[11]=p,e[12]=h):h=e[12],h}function di(t){const e=H.c(7),{items:i,onSelect:n}=t;let r;if(e[0]!==i||e[1]!==n){let c;e[3]!==n?(c=f=>o.jsx(De,{item:f,variant:"image",onSelect:n},f.key),e[3]=n,e[4]=c):c=e[4],r=i.map(c),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let s;return e[5]!==r?(s=o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:r}),e[5]=r,e[6]=s):s=e[6],s}function mi(t){const e=H.c(7),{items:i,onSelect:n}=t;let r;if(e[0]!==i||e[1]!==n){let c;e[3]!==n?(c=f=>o.jsx("li",{children:o.jsx(De,{item:f,variant:"row",onSelect:n})},f.key),e[3]=n,e[4]=c):c=e[4],r=i.map(c),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let s;return e[5]!==r?(s=o.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:r}),e[5]=r,e[6]=s):s=e[6],s}function De(t){const e=H.c(58),{item:i,variant:n,onSelect:r}=t;let s;e[0]!==i.key?(s=Vt(i.key),e[0]=i.key,e[1]=s):s=e[1];const c=s;if(n==="image"){let N;e[2]!==i.publicUrl||e[3]!==r?(N=()=>r(i.publicUrl),e[2]=i.publicUrl,e[3]=r,e[4]=N):N=e[4];let M;e[5]!==i.key||e[6]!==i.publicUrl?(M=o.jsx("img",{src:i.publicUrl,alt:i.key,loading:"lazy",className:"h-full w-full object-cover",onError:hi}),e[5]=i.key,e[6]=i.publicUrl,e[7]=M):M=e[7];let F;e[8]!==i.key||e[9]!==N||e[10]!==M?(F=o.jsx("button",{type:"button",onClick:N,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:i.key,children:M}),e[8]=i.key,e[9]=N,e[10]=M,e[11]=F):F=e[11];let l;e[12]!==c?(l=o.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-2xs font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:c}),e[12]=c,e[13]=l):l=e[13];let a;e[14]!==i||e[15]!==r?(a=o.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx(ye,{item:i,onSelect:r})}),e[14]=i,e[15]=r,e[16]=a):a=e[16];let d;e[17]!==i.key?(d=pe(i.key),e[17]=i.key,e[18]=d):d=e[18];let S;e[19]!==d?(S=o.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx("p",{className:"truncate text-xs text-white",children:d})}),e[19]=d,e[20]=S):S=e[20];let y;return e[21]!==F||e[22]!==l||e[23]!==a||e[24]!==S?(y=o.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[F,l,a,S]}),e[21]=F,e[22]=l,e[23]=a,e[24]=S,e[25]=y):y=e[25],y}let f;e[26]!==i.publicUrl||e[27]!==r?(f=()=>r(i.publicUrl),e[26]=i.publicUrl,e[27]=r,e[28]=f):f=e[28];let p;e[29]!==i.key?(p=o.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:be(i.key)?o.jsx(K,{size:16,className:"text-muted-foreground"}):o.jsx(Ft,{size:16,className:"text-muted-foreground"})}),e[29]=i.key,e[30]=p):p=e[30];let h;e[31]!==i.key?(h=pe(i.key),e[31]=i.key,e[32]=h):h=e[32];let v;e[33]!==h?(v=o.jsx("p",{className:"truncate text-sm font-medium",children:h}),e[33]=h,e[34]=v):v=e[34];let u;e[35]!==i.key?(u=o.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:i.key}),e[35]=i.key,e[36]=u):u=e[36];let k;e[37]!==v||e[38]!==u?(k=o.jsxs("div",{className:"min-w-0 flex-1",children:[v,u]}),e[37]=v,e[38]=u,e[39]=k):k=e[39];let j;e[40]!==c?(j=o.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:c}),e[40]=c,e[41]=j):j=e[41];let w;e[42]!==i.size?(w=qt(i.size),e[42]=i.size,e[43]=w):w=e[43];let m;e[44]!==w?(m=o.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:w}),e[44]=w,e[45]=m):m=e[45];let g;e[46]!==m||e[47]!==f||e[48]!==p||e[49]!==k||e[50]!==j?(g=o.jsxs("button",{type:"button",onClick:f,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[p,k,j,m]}),e[46]=m,e[47]=f,e[48]=p,e[49]=k,e[50]=j,e[51]=g):g=e[51];let b;e[52]!==i||e[53]!==r?(b=o.jsx(ye,{item:i,onSelect:r}),e[52]=i,e[53]=r,e[54]=b):b=e[54];let P;return e[55]!==g||e[56]!==b?(P=o.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-accent",children:[g,b]}),e[55]=g,e[56]=b,e[57]=P):P=e[57],P}function hi(t){t.target.style.display="none"}function ye(t){const e=H.c(39),{item:i,onSelect:n}=t,r=Q(),[s,c]=L.useState(!1);let f;e[0]!==i.publicUrl||e[1]!==r?(f=async function(y){y.preventDefault(),y.stopPropagation();try{await navigator.clipboard.writeText(i.publicUrl),c(!0),window.setTimeout(()=>c(!1),1500)}catch{ke.error(r("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=i.publicUrl,e[1]=r,e[2]=f):f=e[2];const p=f;let h;e[3]!==r?(h=r("filePicker.filePickerDialog.assetActions"),e[3]=r,e[4]=h):h=e[4];let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(Ot,{size:14}),e[5]=v):v=e[5];let u;e[6]!==h?(u=o.jsx(Ye,{asChild:!0,children:o.jsx(ve,{type:"button",variant:"ghost",size:"icon-sm",className:"bg-background/80 backdrop-blur-sm",onClick:yi,"aria-label":h,children:v})}),e[6]=h,e[7]=u):u=e[7];let k;e[8]!==i.publicUrl||e[9]!==n?(k=()=>n(i.publicUrl),e[8]=i.publicUrl,e[9]=n,e[10]=k):k=e[10];let j;e[11]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(ce,{size:14}),e[11]=j):j=e[11];let w;e[12]!==r?(w=r("filePicker.filePickerDialog.useThis"),e[12]=r,e[13]=w):w=e[13];let m;e[14]!==k||e[15]!==w?(m=o.jsxs(ee,{onClick:k,children:[j,w]}),e[14]=k,e[15]=w,e[16]=m):m=e[16];let g;e[17]!==s?(g=s?o.jsx(ce,{size:14}):o.jsx(Mt,{size:14}),e[17]=s,e[18]=g):g=e[18];let b;e[19]!==s||e[20]!==r?(b=r(s?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[19]=s,e[20]=r,e[21]=b):b=e[21];let P;e[22]!==p||e[23]!==b||e[24]!==g?(P=o.jsxs(ee,{onClick:p,children:[g,b]}),e[22]=p,e[23]=b,e[24]=g,e[25]=P):P=e[25];const N=i.publicUrl;let M;e[26]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(We,{size:14}),e[26]=M):M=e[26];let F;e[27]!==r?(F=r("filePicker.filePickerDialog.openInNewTab"),e[27]=r,e[28]=F):F=e[28];let l;e[29]!==i.publicUrl||e[30]!==F?(l=o.jsx(ee,{asChild:!0,children:o.jsxs("a",{href:N,target:"_blank",rel:"noreferrer",onClick:pi,children:[M,F]})}),e[29]=i.publicUrl,e[30]=F,e[31]=l):l=e[31];let a;e[32]!==P||e[33]!==l||e[34]!==m?(a=o.jsxs(Je,{align:"end",onClick:gi,children:[m,P,l]}),e[32]=P,e[33]=l,e[34]=m,e[35]=a):a=e[35];let d;return e[36]!==a||e[37]!==u?(d=o.jsxs(Ze,{children:[u,a]}),e[36]=a,e[37]=u,e[38]=d):d=e[38],d}function pi(t){return t.stopPropagation()}function gi(t){return t.stopPropagation()}function yi(t){return t.stopPropagation()}function nr(t,e,i){return e||(t.length===1?t[0].id:t.length===0?null:t.some(n=>n.id===i)?i:null)}const xi=new Set(["http:","https:"]),vi=/[\u0000-\u001F\u007F]/g;function ki(t){return t.replace(vi,"").trim()}const Si=/^[a-zA-Z][a-zA-Z0-9+.-]*:/;function sr(t){return ji(t)!==""}function ji(t){const e=ki(t);if(!e)return"";if(!Si.test(e))try{return encodeURI(e)}catch{return""}try{const i=new URL(e);return xi.has(i.protocol)||i.protocol==="data:"&&/^data:image\//i.test(i.href)?i.href:""}catch{return""}}const wi=q.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(i=>e.updateAttributes(i,{textAlign:t})).some(i=>i):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:i})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?i.unsetTextAlign():i.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var or=wi;const bi=20,Te=(t,e=0)=>{const i=[];return!t.children.length||e>bi||Array.from(t.children).forEach(n=>{n.tagName==="SPAN"?i.push(n):n.children.length&&i.push(...Te(n,e+1))}),i},Pi=t=>{if(!t.children.length)return;const e=Te(t);e&&e.forEach(i=>{var n;const r=i.getAttribute("style"),s=(n=i.parentElement)===null||n===void 0||(n=n.closest("span"))===null||n===void 0?void 0:n.getAttribute("style");i.setAttribute("style",`${s};${r}`)})},Ci=Gt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Pi(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",_t(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(i,n)=>{if(!i.isInline)return!0;i.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(s=>!!s))||t.removeMark(n,n+i.nodeSize,this.type)}),!0}}}}),Ni=q.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const i=(e=Z(t,"background-color"))!==null&&e!==void 0?e:t.style.backgroundColor;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),Di=q.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const i=(e=Z(t,"color"))!==null&&e!==void 0?e:t.style.color;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),Ti=q.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{var e;return(e=Z(t,"font-family"))!==null&&e!==void 0?e:t.style.fontFamily},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Ai=q.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{var e;return(e=Z(t,"font-size"))!==null&&e!==void 0?e:t.style.fontSize},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),Ei=q.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>{var e;return(e=Z(t,"line-height"))!==null&&e!==void 0?e:t.style.lineHeight},renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});q.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(Ni.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(Di.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(Ti.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(Ai.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(Ei.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(Ci.configure(this.options.textStyle)),t}});function lr(t){const e=H.c(6),i=xe(),n=Se(t.virtualMcpId,t.branch);if(n.kind!=="protocol"||n.source!=="github")return Mi;let r;e[0]!==n||e[1]!==t?(r=yt(t,n),e[0]=n,e[1]=t,e[2]=r):r=e[2];const s=r;let c;return e[3]!==s||e[4]!==i?(c=f=>je(i,s,f),e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function Mi(){return!1}export{Di as C,rr as F,Ne as L,Ci as T,lr as a,ir as b,Ai as c,or as d,Jt as e,sr as i,re as k,nr as r,ji as s,ri as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-Bo9y-Vk0.js";import{e1 as i}from"./index-FR7-LkFs.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./infiniteQueryObserver-Bo9y-Vk0.js";import{e1 as u,e9 as n}from"./index-FR7-LkFs.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};
|