decocms 4.562.0 → 4.562.2
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-BMgOinVw.js → AlertCircle-BPGyk76P.js} +1 -1
- package/dist/client/assets/{AreaChart-BcZi16Vr.js → AreaChart-Dwi8bZZ1.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BJMjlG4g.js → ArrowLeft-DRdw9Nza.js} +1 -1
- package/dist/client/assets/{ArrowUp-DcJMRdNb.js → ArrowUp-BJTv4ddc.js} +1 -1
- package/dist/client/assets/{CartesianChart-C8LrSJIS.js → CartesianChart-DHyrpR7F.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CUR_9ZiJ.js → CategoricalChart-CVu6TY4_.js} +1 -1
- package/dist/client/assets/{CheckCircle-By2z0uOx.js → CheckCircle-y3P873c6.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BTg7xsL3.js → ChevronSelectorVertical-TIONA5Zl.js} +1 -1
- package/dist/client/assets/{ChevronUp-BCfBdjs4.js → ChevronUp-CDe5Gfov.js} +1 -1
- package/dist/client/assets/{CreditCard01-kxqKIkVq.js → CreditCard01-abk_vBBR.js} +1 -1
- package/dist/client/assets/{Globe04-ri2PR4JW.js → Globe04-Dr1jk8eS.js} +1 -1
- package/dist/client/assets/{Key01-By4BziN_.js → Key01-DzZgIVqE.js} +1 -1
- package/dist/client/assets/{LinkBroken01-znJYLaVP.js → LinkBroken01-4j6Z2AOF.js} +1 -1
- package/dist/client/assets/{Minus-Biy1YWEX.js → Minus-B2u_zm0f.js} +1 -1
- package/dist/client/assets/{Monitor01-DcAryzmn.js → Monitor01-DWylBoOJ.js} +1 -1
- package/dist/client/assets/{Play-BkYxzt1r.js → Play-CV8_Sy8a.js} +1 -1
- package/dist/client/assets/{Plus-BhRQRaas.js → Plus-BtfY7EHX.js} +1 -1
- package/dist/client/assets/{ReferenceLine-DfxOOnGv.js → ReferenceLine-DN9gAkkU.js} +1 -1
- package/dist/client/assets/{SearchMd-DqnvtcaB.js → SearchMd-DD6kw-fs.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DYcJDT4V.js → ShoppingBag01-CY137tVP.js} +1 -1
- package/dist/client/assets/{Sun-tnCpymBL.js → Sun-CyYLfv8E.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-D2vRhNhF.js → SwitchHorizontal01-C3qdjyVX.js} +1 -1
- package/dist/client/assets/{Tool01-B8q2F7hW.js → Tool01-CyX9Nllj.js} +1 -1
- package/dist/client/assets/{Tooltip-B6aZIxiB.js → Tooltip-DVBICxdG.js} +1 -1
- package/dist/client/assets/{Trash01-Ccl1EX2p.js → Trash01-DSJ1LUhI.js} +1 -1
- package/dist/client/assets/{Upload01-DOAyGyLP.js → Upload01-DC0joCKG.js} +1 -1
- package/dist/client/assets/{UserSquare-Cbfe91aH.js → UserSquare-DmeGszKa.js} +1 -1
- package/dist/client/assets/{Users01-C1OYrFY1.js → Users01-B-OacssU.js} +1 -1
- package/dist/client/assets/{XClose-p8-Q8v8l.js → XClose-avSrIpAi.js} +1 -1
- package/dist/client/assets/{Zap-DyRXLCnm.js → Zap--C2rij07.js} +1 -1
- package/dist/client/assets/{access-gate-BAXdhF61.js → access-gate-Bd3vMxaX.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-I3R6bOX6.js → add-connection-dialog-uIVnUFji.js} +1 -1
- package/dist/client/assets/agent-app-BkJxaBM5.js +1 -0
- package/dist/client/assets/{agent-assets-BytEk-0l.js → agent-assets-CWN2kTtA.js} +1 -1
- package/dist/client/assets/{agent-automation-TykMN0zp.js → agent-automation-BgD0bRSV.js} +1 -1
- package/dist/client/assets/{agent-automations-axy_S6Px.js → agent-automations-DfordlM0.js} +1 -1
- package/dist/client/assets/{agent-calendar-BaUCHDte.js → agent-calendar-z2j3yA6d.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DUEnZmC-.js → agent-capabilities-4Kae1N0E.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-YnQ0oiMQ.js → agent-connect-sources-C33PwxBc.js} +1 -1
- package/dist/client/assets/agent-deck-Lf3f7IO8.js +1 -0
- package/dist/client/assets/{agent-e2e-CN8oCbtP.js → agent-e2e-C44IfVz9.js} +1 -1
- package/dist/client/assets/{agent-file-C58LYJBC.js → agent-file-D8S6ohDB.js} +1 -1
- package/dist/client/assets/{agent-hosting-C-Xgv5CR.js → agent-hosting-D6CnE5uR.js} +1 -1
- package/dist/client/assets/{agent-icon-FkFyvRCX.js → agent-icon-Nkid6y9z.js} +1 -1
- package/dist/client/assets/agent-library-Co5WQMIF.js +1 -0
- package/dist/client/assets/agent-library-file-BPJi6RfX.js +1 -0
- package/dist/client/assets/agent-overview-D73rnnSU.js +1 -0
- package/dist/client/assets/{agent-releases-DXvHySgn.js → agent-releases-WO1DzowK.js} +1 -1
- package/dist/client/assets/agent-settings-DK2xDr1_.js +1 -0
- package/dist/client/assets/{agent-site-editor-iOr_R9Ca.js → agent-site-editor-CVSVIfgT.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-21UDx-VP.js +2 -0
- package/dist/client/assets/agent-site-editor-content-ycS9Pz-a.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CM8uT3ZM.js +1 -0
- package/dist/client/assets/agent-view-CnIONLQC.js +1 -0
- package/dist/client/assets/{agent-view-guard-CTg_3K6Q.js → agent-view-guard-BkTiwrL7.js} +1 -1
- package/dist/client/assets/{ai-providers-SquUsRRR.js → ai-providers-C77po6hX.js} +1 -1
- package/dist/client/assets/{alert-BcGEYE9G.js → alert-8ZKgnOi9.js} +1 -1
- package/dist/client/assets/{analytics-sections-C3xfRdmO.js → analytics-sections-D2pjEazH.js} +1 -1
- package/dist/client/assets/api-keys-CJdXbN4c.js +1 -0
- package/dist/client/assets/{api-keys-6xNcEC8t.js → api-keys-CalFVYGL.js} +1 -1
- package/dist/client/assets/{app-editor-CoHcQkjL.js → app-editor--cZ0paPb.js} +1 -1
- package/dist/client/assets/{asset-utils-Bq_dJbYP.js → asset-utils-CwwYcMA6.js} +1 -1
- package/dist/client/assets/{auth-catchall-BwwwkN3O.js → auth-catchall--6gbNuLd.js} +1 -1
- package/dist/client/assets/{auth-entry-D3WJl0FC.js → auth-entry-CsdiTapN.js} +1 -1
- package/dist/client/assets/{auth-split-layout-J4KMjvhP.js → auth-split-layout-BqtGBv-Q.js} +1 -1
- package/dist/client/assets/{auth-BsX6ur7b.js → auth-xvjttF9D.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Cu0VrSF5.js → authenticate-and-persist-oauth-DdntocF2.js} +1 -1
- package/dist/client/assets/{automation-list-row-QpXtin0Q.js → automation-list-row-DtkMgEsK.js} +1 -1
- package/dist/client/assets/{automation-runs-aImufYAH.js → automation-runs-DxsRwY7z.js} +1 -1
- package/dist/client/assets/{automations-DLgpPcdB.js → automations-DXGl5rDB.js} +1 -1
- package/dist/client/assets/{autosend-ce5-FRC2.js → autosend-DbfDzqlB.js} +1 -1
- package/dist/client/assets/{badge-2xhZ-r-l.js → badge-BLk85LCv.js} +1 -1
- package/dist/client/assets/{block-document-DI7cHMPV.js → block-document-CSsqtozZ.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DbUsPnrw.js → blocks-preview-workspace-context-C59bKt9w.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-Oy4QesXy.js → blocks-tab-states-DP3rjaHt.js} +1 -1
- package/dist/client/assets/{blog-schema-CHW5Pxv_.js → blog-schema-B65cUy5G.js} +1 -1
- package/dist/client/assets/{buckets-BDCTPQpG.js → buckets-CNCQh0A_.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-5IZRp812.js → build-improve-prompt-doc-DUmEW7kR.js} +1 -1
- package/dist/client/assets/{calendar-D-rfd7JY.js → calendar-CDcnOKeY.js} +1 -1
- package/dist/client/assets/{capability-load-error-BKCZfLTa.js → capability-load-error-BZMPli2s.js} +1 -1
- package/dist/client/assets/{category-editor-BuIyetQS.js → category-editor-BFW4v6Zt.js} +1 -1
- package/dist/client/assets/{chart-wyCy3WJz.js → chart-W6WUctG8.js} +1 -1
- package/dist/client/assets/{chat-context-GsXpI-Rk.js → chat-context-yHOaM07v.js} +1 -1
- package/dist/client/assets/{chat-draft-CnA31cek.js → chat-draft-BKLG-IxC.js} +1 -1
- package/dist/client/assets/{checkbox-LWvsDQWZ.js → checkbox-Dv6iFznu.js} +1 -1
- package/dist/client/assets/{choose-editor-oX8cTiL9.js → choose-editor-BbaXuEWm.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Dal5M4-w.js → cli-auth-success-CINmtrn-.js} +1 -1
- package/dist/client/assets/{client-icons-BUnl0ZXy.js → client-icons-CRCSqe4B.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-T8KTji6O.js → cms-settings-editor-BKSzHFaJ.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-49wrBNXT.js → cms-store-drafts-BRph2qKQ.js} +1 -1
- package/dist/client/assets/{collapsible-DwneXnWl.js → collapsible-WPiOb2df.js} +1 -1
- package/dist/client/assets/{collection-detail-DWuKEvHr.js → collection-detail-DeLh0iGu.js} +1 -1
- package/dist/client/assets/{collection-display-button-BcvxnzA7.js → collection-display-button-X03nm1ka.js} +1 -1
- package/dist/client/assets/{collection-search-BXhJDy4i.js → collection-search-CPadQqKp.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CsjezWAk.js → collection-table-wrapper-DbE8PRZm.js} +1 -1
- package/dist/client/assets/{collection-tabs-R5zZyWuQ.js → collection-tabs-B05-I-04.js} +1 -1
- package/dist/client/assets/{combobox-M_E9pRSg.js → combobox-AFeNX90_.js} +1 -1
- package/dist/client/assets/{command-D1ggU7uN.js → command-CSFENWMV.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-5tiqlnPW.js → companion-mcps-section-DByl9EP4.js} +1 -1
- package/dist/client/assets/{config-BwOe4khb.js → config-BuNaSsQb.js} +1 -1
- package/dist/client/assets/{connect-CZDT3prT.js → connect-B5ODvCMk.js} +1 -1
- package/dist/client/assets/{connect-layout-BlfzEMXx.js → connect-layout-CrQKfs54.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-Bu2QM8b1.js → connect-source-dialog-dT9CEaaL.js} +1 -1
- package/dist/client/assets/{connection-BWg4pBgr.js → connection-9Wtillpb.js} +1 -1
- package/dist/client/assets/{connection-card-D8rA98h7.js → connection-card-B7mEOoWU.js} +1 -1
- package/dist/client/assets/{connection-detail-DSD-1Pdd.js → connection-detail-CVkLDsqd.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CTdld_FZ.js → connection-form-helpers-ZOfZ5xVa.js} +1 -1
- package/dist/client/assets/{connection-slug-xnxqKZgT.js → connection-slug-BCjSI_lE.js} +1 -1
- package/dist/client/assets/{connections-CZPMCaga.js → connections-B2Pjgwb4.js} +1 -1
- package/dist/client/assets/{content-tab-B2fyj6Jh.js → content-tab-D6POg5eV.js} +3 -3
- package/dist/client/assets/{context-CUmhz6yH.js → context-D9Jnu7vN.js} +1 -1
- package/dist/client/assets/{context-menu-DPGth7tq.js → context-menu-Cgl4PGwR.js} +1 -1
- package/dist/client/assets/{context-shell-tkTYv2bR.js → context-shell-xJwj29nG.js} +3 -3
- package/dist/client/assets/{core.esm-DnEwZVMw.js → core.esm-C3kzKmQL.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-UgMN3Pp1.js → create-organization-dialog-C6jgiT68.js} +1 -1
- package/dist/client/assets/{device-hint-DHQmntIa.js → device-hint-B0gKGTHi.js} +1 -1
- package/dist/client/assets/{discover-Cpqi_nZO.js → discover-hzv5-quf.js} +1 -1
- package/dist/client/assets/{domain-settings-DJSixqz2.js → domain-settings-CUR5XLBa.js} +1 -1
- package/dist/client/assets/{drawer-BnPszJPZ.js → drawer-1kqkgpFK.js} +1 -1
- package/dist/client/assets/{editor-zE4VnGLI.js → editor-CrG4V3zO.js} +1 -1
- package/dist/client/assets/{editor-classes-BnzpZOY5.js → editor-classes-LBX4QjrW.js} +1 -1
- package/dist/client/assets/{empty-state-DLrHPsXZ.js → empty-state-CVOGmYU9.js} +1 -1
- package/dist/client/assets/{empty-state-BFLQtSFV.js → empty-state-CbRq3C3n.js} +1 -1
- package/dist/client/assets/{extract-connection-data-KiTWYSx4.js → extract-connection-data-C6MDLhDM.js} +1 -1
- package/dist/client/assets/{feature-gate-C27q-aIj.js → feature-gate-Uh4gtHbP.js} +1 -1
- package/dist/client/assets/{feature-paywall-CJwXTzME.js → feature-paywall-BVXAF3Vl.js} +1 -1
- package/dist/client/assets/{feedback-zQMybfa1.js → feedback-Bx6uae5t.js} +1 -1
- package/dist/client/assets/{file-explorer-C_MMeMcX.js → file-explorer-B33pnQXI.js} +1 -1
- package/dist/client/assets/{file-preview-F9XVmctL.js → file-preview-DifPTXD4.js} +1 -1
- package/dist/client/assets/{file-share-button-A6RgU4RK.js → file-share-button-OD6j_Xmo.js} +1 -1
- package/dist/client/assets/{file-type-icon-DoyEf2kQ.js → file-type-icon-jLU7FJUL.js} +1 -1
- package/dist/client/assets/{folder-icon-CsH9NIDq.js → folder-icon-Bk-fEOJa.js} +1 -1
- package/dist/client/assets/{form-cx1UDyF2.js → form-DE5X7SPR.js} +1 -1
- package/dist/client/assets/{general-YmXk3hPt.js → general-DxPCrqDE.js} +1 -1
- package/dist/client/assets/{github-icon-DNe7j1PY.js → github-icon-Bvc_Uep-.js} +1 -1
- package/dist/client/assets/{home-overview-CFwm7iMO.js → home-overview-3LLMJPVW.js} +1 -1
- package/dist/client/assets/{home-DgapTseA.js → home-z2EXALAZ.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-BJXH2g7a.js → hosted-reconcile-gHkwH1BF.js} +1 -1
- package/dist/client/assets/{icon-button-CmFwjZ_m.js → icon-button-1xC_JQLB.js} +1 -1
- package/dist/client/assets/{index-qMWmRmW0.js → index-BHtZ5LOo.js} +1 -1
- package/dist/client/assets/{index-CmGLs6T5.js → index-BJKjGJrF.js} +1 -1
- package/dist/client/assets/{index-CxEOaGFH.js → index-BtlZo3IV.js} +1 -1
- package/dist/client/assets/{index-BCXxtUlh.js → index-C1iaIX-s.js} +1 -1
- package/dist/client/assets/{index-D5uF1VH5.js → index-Chg--78J.js} +1 -1
- package/dist/client/assets/{index-DuD6FLZ3.js → index-Czm9RrRY.js} +1 -1
- package/dist/client/assets/{index-DM3inxPC.js → index-DOaDUx72.js} +1 -1
- package/dist/client/assets/{index-DGn-FPge.js → index-DWvRfTwV.js} +3 -3
- package/dist/client/assets/{index-DisXhcWe.js → index-DyoVCnKR.js} +1 -1
- package/dist/client/assets/{index-C9A_N0M0.js → index-J6dVRDZu.js} +1 -1
- package/dist/client/assets/{index-WwIqmvy-.js → index-KGPpyCdi.js} +1 -1
- package/dist/client/assets/{index-B5lnCLuB.js → index-L3rSytXD.js} +1 -1
- package/dist/client/assets/{index-ffdfMTh-.js → index-Wodin-tK.js} +1 -1
- package/dist/client/assets/{index-BmYeIRlv.js → index-eKAZ8rFQ.js} +1 -1
- package/dist/client/assets/{index-CN8uFy5p.js → index-pqEXXiDC.js} +1 -1
- package/dist/client/assets/{index-redirect-eX7nEWSl.js → index-redirect-D52J_8O4.js} +1 -1
- package/dist/client/assets/{index-hZylT09v.js → index-xAQMjVHe.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-B_P9W4Zx.js → infiniteQueryObserver-O1nZgTsK.js} +1 -1
- package/dist/client/assets/{infra-billing-BatrrG1f.js → infra-billing-CsrcHH3z.js} +1 -1
- package/dist/client/assets/{input-Di6BJ4Zo.js → input-Lv9puCyJ.js} +3 -3
- package/dist/client/assets/{input-BEManHLB.js → input-Z4x7UYYS.js} +1 -1
- package/dist/client/assets/{integration-icon-BHx1ytyX.js → integration-icon-BCp7DD7C.js} +1 -1
- package/dist/client/assets/{jira-icon-DQhFl4az.js → jira-icon-Cgp_nHIG.js} +1 -1
- package/dist/client/assets/{label-CHRzCbuP.js → label-BkzEUDUr.js} +1 -1
- package/dist/client/assets/{layout-CvFeIpHB.js → layout-pqxzJsxG.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-B-RkQsR1.js → legacy-agents-deep-C88GLYmw.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-f_YEwDUU.js → legacy-main-redirect-DcmC8SjE.js} +1 -1
- package/dist/client/assets/library-D4o0AtWq.js +1 -0
- package/dist/client/assets/{library-tab-DrpEkybg.js → library-tab-DI44ELWs.js} +1 -1
- package/dist/client/assets/{login-DtH52R3F.js → login-DQICOGIE.js} +1 -1
- package/dist/client/assets/{markdown-C7Kie5ev.js → markdown-DkmjrNqn.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CO8LOFxq.js → mcp-app-renderer-CIky1nBi.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C-mc4e6m.js → mcp-oauth-CNMWqwMp.js} +1 -1
- package/dist/client/assets/{mcp-oauth-iB4K_uoY.js → mcp-oauth-SAUpfbwO.js} +1 -1
- package/dist/client/assets/{members-yfLvIIIT.js → members-BT1BIG15.js} +1 -1
- package/dist/client/assets/{memory-aeBofHaH.js → memory-BDRH6Og0.js} +1 -1
- package/dist/client/assets/{mock-board-B5SFWfb2.js → mock-board-BF-mAr4y.js} +3 -3
- package/dist/client/assets/{monaco-editor-BRY87vsh.js → monaco-editor-Dff4ZjU3.js} +1 -1
- package/dist/client/assets/{monitoring-WRX4s2Md.js → monitoring-BPV_CuUX.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DZcqSbnv.js → monitoring-stats-row-ZCTbL6bH.js} +1 -1
- package/dist/client/assets/{multi-select-C-iHSsuJ.js → multi-select-B4WkKxx8.js} +1 -1
- package/dist/client/assets/{mustache-WHgo2S29.js → mustache-DCgM4RQC.js} +1 -1
- package/dist/client/assets/{named-rule-view-ChTlMWf5.js → named-rule-view-D8WSLrw8.js} +1 -1
- package/dist/client/assets/{new-project-dialog-UvI58my0.js → new-project-dialog-Kvs8XyHN.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bg-Twulk.js → oauth-callback-CIFexUJN.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CuXrUeR4.js → oauth-callback-ai-provider-3-_RChJi.js} +1 -1
- package/dist/client/assets/{oauth-consent-BdD4CLIL.js → oauth-consent-vlJReqsl.js} +1 -1
- package/dist/client/assets/{onboarding-DAlZ_ijb.js → onboarding-CC0xFJ-5.js} +1 -1
- package/dist/client/assets/{openai-conversation-DChbcEJV.js → openai-conversation-D9tyQTXT.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-uJohOkF6.js → optimistic-project-sidebar-views-BmsZ-Me-.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BIbj8jXM.js → order-monitor-day-Cxsz6w2q.js} +1 -1
- package/dist/client/assets/{organization-choice-9Sf7qdAX.js → organization-choice-4fOAxXZj.js} +1 -1
- package/dist/client/assets/{orgs-DuQRavym.js → orgs-nKU8niHO.js} +1 -1
- package/dist/client/assets/{own-accounts-section-n50adHNX.js → own-accounts-section-B2chKMQ0.js} +1 -1
- package/dist/client/assets/{pair-1hov1KDD.js → pair-BwCxrq_f.js} +1 -1
- package/dist/client/assets/{parse-sections-BNf6_EjY.js → parse-sections-CK6AHU3E.js} +3 -3
- package/dist/client/assets/{plan-Dq5q5bsx.js → plan-C4kJq3a0.js} +1 -1
- package/dist/client/assets/{plan-ladder-DJg9yABt.js → plan-ladder-wSfhs4No.js} +1 -1
- package/dist/client/assets/{plan-usage-card-D4SynKK4.js → plan-usage-card-CBlBUX6I.js} +1 -1
- package/dist/client/assets/{popover-CE0A3Qit.js → popover-CpDRMXBS.js} +1 -1
- package/dist/client/assets/{post-calendar-EtCAYSiT.js → post-calendar-C4WCdLXl.js} +1 -1
- package/dist/client/assets/{post-editor-CeOdXCzo.js → post-editor-BHEvn_Zz.js} +1 -1
- package/dist/client/assets/{preview-content-CyH9JuG-.js → preview-content-C4WlFzcj.js} +1 -1
- package/dist/client/assets/{preview-dialog-FVFjchHr.js → preview-dialog-CSGQDL5A.js} +1 -1
- package/dist/client/assets/{preview-panel-eL-KdUlb.js → preview-panel-BMN_Ysm9.js} +1 -1
- package/dist/client/assets/{preview-tab-Cuhy4gb6.js → preview-tab-sRIuk4Ej.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-oaL2Geio.js → product-picker-dialog-DzFQlf9n.js} +1 -1
- package/dist/client/assets/{profile-DhXoBixo.js → profile-DGzRd8vX.js} +1 -1
- package/dist/client/assets/{project-app-view-CFDNRbPF.js → project-app-view-ByacUDvM.js} +1 -1
- package/dist/client/assets/{project-apps-B-5TAX2o.js → project-apps-DzbYoXyd.js} +1 -1
- package/dist/client/assets/{project-icon-reyc_nNY.js → project-icon-DTA6ZXhl.js} +1 -1
- package/dist/client/assets/{project-index-CeS8PQv7.js → project-index-BmalKoU9.js} +1 -1
- package/dist/client/assets/project-reports-DPgVezio.js +1 -0
- package/dist/client/assets/{project-sidebar-views-DYKp64W4.js → project-sidebar-views-BxNR4pgO.js} +1 -1
- package/dist/client/assets/project-tasks-C8oeh0BH.js +1 -0
- package/dist/client/assets/{projects-QRnnQxmB.js → projects-BIj_kuAC.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B2R3HC7E.js → projects-empty-state-DVir8yX9.js} +1 -1
- package/dist/client/assets/{prompts-Cp6YboL1.js → prompts-BmgauEg8.js} +1 -1
- package/dist/client/assets/record-editor-BZSwvkut.js +1 -0
- package/dist/client/assets/{redirect-editor-Bf8VmZQx.js → redirect-editor-BxlqORGw.js} +1 -1
- package/dist/client/assets/{reports-BtW4mY0K.js → reports-7rmI992n.js} +1 -1
- package/dist/client/assets/reports-Be7TvXFw.js +1 -0
- package/dist/client/assets/{reports-onboarding-CtEi6opy.js → reports-onboarding-DPzdd7qa.js} +1 -1
- package/dist/client/assets/{reports-tab-DhrTVeTc.js → reports-tab-C_NZHfzv.js} +2 -2
- package/dist/client/assets/{repositories-CGGnfQiR.js → repositories-D3yxw4y-.js} +1 -1
- package/dist/client/assets/repositories-DFHveJlo.js +1 -0
- package/dist/client/assets/{repository-binding-DHN5ihZA.js → repository-binding-CeErFm4l.js} +1 -1
- package/dist/client/assets/{repository-picker-BVa6TfGc.js → repository-picker-C3C3_E5g.js} +1 -1
- package/dist/client/assets/{require-capability-CVoJcu7H.js → require-capability-BOrIzed0.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BQmhUScr.js → required-auth-layout-nGThcCwM.js} +1 -1
- package/dist/client/assets/{reset-password-BLOlZYb5.js → reset-password-xu4Q0lXY.js} +1 -1
- package/dist/client/assets/{resizable-CdFCM71r.js → resizable-gNSqe3KZ.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DJ5Ncrbw.js → resolve-tab-icon-D4I4sh6v.js} +1 -1
- package/dist/client/assets/{review-settings-Deyxg2o8.js → review-settings-CjrtYBLa.js} +1 -1
- package/dist/client/assets/{role-color-DfmSCdD1.js → role-color-DQHx1mqZ.js} +1 -1
- package/dist/client/assets/{roles-DGxZsr14.js → roles-C_hPZ63M.js} +1 -1
- package/dist/client/assets/route-04y-cUhL.js +1 -0
- package/dist/client/assets/route-CijJVC7q.js +1 -0
- package/dist/client/assets/{route-Dq3q8mSL.js → route-D7Ke7Nww.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Dp2Dt1TA.js → sandbox-lifecycle-context-CuiD9fGV.js} +1 -1
- package/dist/client/assets/{schema-77LyfVRl.js → schema-DiUKA_SL.js} +1 -1
- package/dist/client/assets/{schema-C2e4bOOh.js → schema-DvxWNZKz.js} +1 -1
- package/dist/client/assets/{scroll-area-DOPuQKg_.js → scroll-area-CUevVS4T.js} +1 -1
- package/dist/client/assets/{search-input-Bo9D0b2l.js → search-input-DWWqDlal.js} +1 -1
- package/dist/client/assets/{search-toggle-D227Ek9d.js → search-toggle-Z6tLdJtz.js} +1 -1
- package/dist/client/assets/{secret-picker-ChOT2LaB.js → secret-picker-BK4dq3ip.js} +1 -1
- package/dist/client/assets/{secrets-TvEnuoeS.js → secrets-DrGLagdz.js} +1 -1
- package/dist/client/assets/{sections-tdmo3LjO.js → sections-CC9QneUq.js} +1 -1
- package/dist/client/assets/{sections-editor-C7sTzFTf.js → sections-editor-CEHFL2VN.js} +1 -1
- package/dist/client/assets/{select-Di2sLm_-.js → select-gJgQvQZg.js} +1 -1
- package/dist/client/assets/{select-model-Do4joh93.js → select-model-ivosxEc9.js} +1 -1
- package/dist/client/assets/{seo-editor-BK7SzGFy.js → seo-editor-CaLY6KkG.js} +1 -1
- package/dist/client/assets/{separator-Bu1wQRuA.js → separator-PY5RFBB-.js} +1 -1
- package/dist/client/assets/settings-tab-DeCOk8kh.js +1 -0
- package/dist/client/assets/{sheet-pl7zdRHn.js → sheet-BKUVqko3.js} +1 -1
- package/dist/client/assets/{shell-layout-DzQA4K-b.js → shell-layout-Bx4AZ_YV.js} +1 -1
- package/dist/client/assets/site-draft-view-B8TmuovZ.js +3 -0
- package/dist/client/assets/site-editor-BeO4XfO2.js +1 -0
- package/dist/client/assets/{site-editor-toast-BUVxT4JG.js → site-editor-toast-B-FxlfJP.js} +1 -1
- package/dist/client/assets/{skills-Bh5rPXC6.js → skills-CZlPyCDI.js} +1 -1
- package/dist/client/assets/{slider-CwE675ao.js → slider-CnnTZZH8.js} +1 -1
- package/dist/client/assets/{sortable.esm-CIP-w8Te.js → sortable.esm-YReNzob1.js} +1 -1
- package/dist/client/assets/{sso-DpryG3cU.js → sso-B0Izx2rk.js} +1 -1
- package/dist/client/assets/{suggestion-Dr321Cmr.js → suggestion-D-YZpsQl.js} +1 -1
- package/dist/client/assets/{switch-D-6AqAnT.js → switch-UpbwlQtZ.js} +1 -1
- package/dist/client/assets/{synced-repos-CwCJZfKG.js → synced-repos-DJZhlM-5.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CMWJQvgX.js → tab-icon-glyph-BA8eumIA.js} +1 -1
- package/dist/client/assets/{table-DpJo1vAx.js → table-D9nZzqmf.js} +1 -1
- package/dist/client/assets/{tabs-DNziA2dZ.js → tabs-BFXzZPNk.js} +1 -1
- package/dist/client/assets/{task-board-BuKyXp11.js → task-board-CzrPT-OZ.js} +1 -1
- package/dist/client/assets/{task-route-DlvmNWcQ.js → task-route-DrqrKj8M.js} +1 -1
- package/dist/client/assets/{task-status-B4eBo5Md.js → task-status-B5fYlW4s.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-C-zvSFMs.js → taskboard-analytics-Bo8Bxm9q.js} +1 -1
- package/dist/client/assets/{tasks-BHN9oqEC.js → tasks-BFPPo49C.js} +1 -1
- package/dist/client/assets/tasks-CI7wGKXW.js +1 -0
- package/dist/client/assets/{textarea-HAezEU3R.js → textarea-BVq0fBVJ.js} +1 -1
- package/dist/client/assets/{thread-analytics-DWnZrs9k.js → thread-analytics-j4C-4XbM.js} +1 -1
- package/dist/client/assets/{thread-intent-C084ju5m.js → thread-intent-BONVdhUb.js} +1 -1
- package/dist/client/assets/{thread-route-C-GRt_yL.js → thread-route-CDlnAMQ3.js} +1 -1
- package/dist/client/assets/{thread-route-Dt42HUQv.js → thread-route-DMWye38f.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Ck1Bv0_3.js → thread-sheet-body-C1Yi4Tsp.js} +1 -1
- package/dist/client/assets/{time-range-picker-CS9tika7.js → time-range-picker-DuQ-XfqJ.js} +1 -1
- package/dist/client/assets/{toggle-group-CFojpTQB.js → toggle-group-Bw4R79dp.js} +1 -1
- package/dist/client/assets/{tool-namespace-Fc2c0QC4.js → tool-namespace-CmEhPnkj.js} +1 -1
- package/dist/client/assets/{tool-set-selector-B8ePlhyl.js → tool-set-selector-DAvZ69Ky.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-GjI5vOKF.js → toolbar-icon-button-CRZySHtx.js} +1 -1
- package/dist/client/assets/{tooltip-BojzNY2M.js → tooltip-BVv5wAeF.js} +1 -1
- package/dist/client/assets/{tooltipContext-m-9QMOrS.js → tooltipContext-DwFHeBjZ.js} +1 -1
- package/dist/client/assets/{track-Bclp3q8c.js → track-CHjUqURA.js} +1 -1
- package/dist/client/assets/{types-CdXMwNZg.js → types-7R44AYrk.js} +1 -1
- package/dist/client/assets/{url-slug-BkV5QJiU.js → url-slug-CoT8zovb.js} +1 -1
- package/dist/client/assets/{usage-stats-B39QZ3Cn.js → usage-stats-qZh3WQDj.js} +1 -1
- package/dist/client/assets/{use-ai-providers-hjEpjXQ2.js → use-ai-providers-CCcuLCZt.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-vuCkiknA.js → use-apply-named-rule-BRjLBznN.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DQs0YHUB.js +1 -0
- package/dist/client/assets/{use-automations-DJWCjg8T.js → use-automations-jhigzQzP.js} +1 -1
- package/dist/client/assets/{use-autosave-DzjuxKy7.js → use-autosave--xoi8yhU.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-DGf4-J1Z.js → use-chat-layout-state-Dnl_7DMo.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-JZTNoXFa.js → use-cms-publish-actions-CgLBJwXN.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DZPybU6m.js → use-connect-companion-BVtzi_36.js} +1 -1
- package/dist/client/assets/{use-connection-BonBiP4H.js → use-connection-BQpfU6u4.js} +1 -1
- package/dist/client/assets/{use-content-sync-C-LYfyy7.js → use-content-sync-DjDHeqFk.js} +1 -1
- package/dist/client/assets/{use-copy-1IxNCkh9.js → use-copy-CMfnyhoo.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-KQxxLRHa.js → use-date-fns-locale-CRoKnCN9.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Eo1C-w5U.js → use-debounced-autosave-D1fE_-TK.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CzxhSP8l.js → use-debounced-value-DiJ2aJN8.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CEMj3JGY.js → use-deco-credits-D1bpdE32.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CTD6ZdaA.js → use-decopilot-events-CZSx1Itd.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CKqCkN-k.js → use-delete-connection-BFOvb9ed.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BCIDPeyj.js → use-deployment-admin-DQ5wNSYp.js} +1 -1
- package/dist/client/assets/{use-entitlements-DxVD_uCH.js → use-entitlements-BChYmsyZ.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-o_WDZuY-.js → use-fast-preview-draft-url-CO3Nwa6o.js} +1 -1
- package/dist/client/assets/{use-file-configs-D87qhE2e.js → use-file-configs-DRzFKzj4.js} +1 -1
- package/dist/client/assets/{use-id-selection-FN7gA0OQ.js → use-id-selection-DexUoI58.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-DglRSmH4.js → use-inbox-feed-BvqULLI3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-4LyFv3hi.js → use-infinite-scroll-C7IQ9e5j.js} +1 -1
- package/dist/client/assets/{use-join-requests-czJryNA9.js → use-join-requests-Dr_qAJ4N.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BeQ-NkWh.js → use-main-panel-tabs-DZKpYMQg.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-_QM-6kc-.js → use-mcp-auth-status-D0-JLgq9.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BeYM-3mp.js → use-mcp-client-Z8a6jg-w.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-IjFHP0w8.js → use-mcp-prompts-KWx0e75o.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Bi0gClZp.js → use-mcp-tools-C4Fqpw4S.js} +1 -1
- package/dist/client/assets/{use-mobile-D6y1UaCv.js → use-mobile-B7UqukPG.js} +1 -1
- package/dist/client/assets/{use-move-blocks-DItjAQsv.js → use-move-blocks-DqXCo5PB.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DP0a6y9z.js → use-navigate-to-agent-9BOtBFjV.js} +1 -1
- package/dist/client/assets/{use-org-fs-CfPaWD_N.js → use-org-fs-DU8c86TB.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-TOw0XlBk.js → use-org-repo-syncs-DGuZeud_.js} +1 -1
- package/dist/client/assets/{use-org-sso-BK0CtdSD.js → use-org-sso-nKgxHjqa.js} +1 -1
- package/dist/client/assets/{use-organization-settings--v2ov5jL.js → use-organization-settings-DqaBVcmT.js} +1 -1
- package/dist/client/assets/{use-project-scope-BJA0ds2S.js → use-project-scope-B4B7p1mj.js} +1 -1
- package/dist/client/assets/{use-recent-apps--67lnzqC.js → use-recent-apps-CQ2MLxK5.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-81WxcUY9.js → use-reports-diagnostic-MABLwKiU.js} +1 -1
- package/dist/client/assets/{use-secrets-DEeK7thW.js → use-secrets-DP80TxaK.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BO-qsUKf.js → use-section-preview-base-C7kw5vsr.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DuLHdlSz.js → use-sidebar-collapsed-Dz5RfxtZ.js} +1 -1
- package/dist/client/assets/{use-tags-DEr2TlgW.js → use-tags-BMj-zonr.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DxH9-ih7.js → use-task-board-analytics-Bxag-9wC.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BZToXVGj.js → use-task-board-events-B8bEY6A0.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-B2japofE.js → use-task-board-item-prs-JXA8OC5C.js} +1 -1
- package/dist/client/assets/{use-task-board-items-Puwxrpek.js → use-task-board-items-DFDnaPnO.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-C5iC-R_g.js → use-task-board-prompts-CeCaGQl-.js} +1 -1
- package/dist/client/assets/{use-task-metadata-jDPe6d5C.js → use-task-metadata-D6_-qyJw.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DnX9RgWT.js → use-thread-outputs-DIlmUcwz.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DAm-dYuC.js +1 -0
- package/dist/client/assets/{useQueries-BbqzFtkh.js → useQueries-DlmzJSx8.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BTqieOpO.js +1 -0
- package/dist/client/assets/{users-DFMP_wOE.js → users-BIMbDMRH.js} +1 -1
- package/dist/client/assets/{utils-BU-nucb-.js → utils-B-ZZ1C4f.js} +1 -1
- package/dist/client/assets/{variant-calendar-DKhL8Mk2.js → variant-calendar-CPbvwCiJ.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CgElSjwL.js → variant-matcher-override-BDeSqmx4.js} +1 -1
- package/dist/client/assets/{view-header-i70JKW9C.js → view-header-BTUnAkrc.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CsY6ukOa.js → virtual-mcp-D-xL-K_P.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-D3b7K3Uo.js → watch-sse-pool-B6ObjuCT.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +464 -464
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Djt3nisA.js +0 -1
- package/dist/client/assets/agent-deck-BZptRfb2.js +0 -1
- package/dist/client/assets/agent-library-CxsAEqgy.js +0 -1
- package/dist/client/assets/agent-library-file-BfEsr2cm.js +0 -1
- package/dist/client/assets/agent-overview-yBV3P4Kd.js +0 -1
- package/dist/client/assets/agent-settings-C7JVa4hp.js +0 -1
- package/dist/client/assets/agent-site-editor-code-0Rkb_Rlf.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CKdTDsIv.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DY2uCsMf.js +0 -1
- package/dist/client/assets/agent-view-CMZiQIOU.js +0 -1
- package/dist/client/assets/api-keys-DzWt-NPK.js +0 -1
- package/dist/client/assets/library-DQMyWPTm.js +0 -1
- package/dist/client/assets/project-reports-DxSY0pyo.js +0 -1
- package/dist/client/assets/project-tasks-joh7axEQ.js +0 -1
- package/dist/client/assets/record-editor-DzEJNlA8.js +0 -1
- package/dist/client/assets/reports-5kgLKYGo.js +0 -1
- package/dist/client/assets/repositories-D0xZPdow.js +0 -1
- package/dist/client/assets/route-C6jiJ2GR.js +0 -1
- package/dist/client/assets/route-Cf6qLb88.js +0 -1
- package/dist/client/assets/settings-tab-B2_rrm2f.js +0 -1
- package/dist/client/assets/site-draft-view-Ca1ao55E.js +0 -3
- package/dist/client/assets/site-editor-DR8x2KPW.js +0 -1
- package/dist/client/assets/tasks-DqD-0E5O.js +0 -1
- package/dist/client/assets/use-ask-in-chat-oQGHyTZE.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CCkoNUSG.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CDBL11js.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,cw as ce,j as p,cC as _,cB as B,cz as C,cG as le,cv as de,cS as ue,cO as fe,cH as me}from"./index-
|
|
1
|
+
import{r as l,cw as ce,j as p,cC as _,cB as B,cz as C,cG as le,cv as de,cS as ue,cO as fe,cH as me}from"./index-DWvRfTwV.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],G=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],X={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,T]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),V=l.useRef(S);function j(b){const y=ye(S,b);I(b,y)}function se(b){I(b,f.current)}function ae(){const b=V.current[f.current];S[f.current]!==b&&d(S)}function I(b,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((b-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=be(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(V.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:j,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&G.includes(b.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],j=L(K,f?[o,n]:[n,o]);return R.current=S,j(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=X[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=L(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=X[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=T(M,o);return p.jsx(B.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(G).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=T(ee,o);return p.jsx(B.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=T(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(B.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var O="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=T(O,o),a=Q(O,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(B.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=O;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(B.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=L([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function L(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,Be=ne,Te=oe;export{Be as R,Ae as T,Ie as a,Te as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as $,j as a,r as k,a5 as J,q as Oe,K as W,d9 as ie,a3 as Ae,aS as Ie,m as H,R as $e,b as X,t as ce,h as ue,w as be,x as ye,v as ve,D as Se,d as je,E as de,aT as Fe,B as Ee}from"./index-
|
|
1
|
+
import{c as $,j as a,r as k,a5 as J,q as Oe,K as W,d9 as ie,a3 as Ae,aS as Ie,m as H,R as $e,b as X,t as ce,h as ue,w as be,x as ye,v as ve,D as Se,d as je,E as de,aT as Fe,B as Ee}from"./index-DWvRfTwV.js";import{i as He,u as we,d as ze,b as Ne,f as Ke,T as qe,A as Ge,j as Ue,k as Ve,c as Qe,m as Ye,n as We,p as Je,L as Xe}from"./chat-context-yHOaM07v.js";import{b as Ze}from"./sandbox-url-D3mC8qhT.js";import{u as et}from"./repository-binding-CeErFm4l.js";import{n as tt}from"./ArrowUp-BJTv4ddc.js";import{s as st,g as Ce,d as nt}from"./tool-namespace-CmEhPnkj.js";import{b as te,T as rt,a as at,c as ot}from"./tooltip-BVv5wAeF.js";import{c as lt,b as it,a as ct,D as ut}from"./drawer-1kqkgpFK.js";import{C as dt}from"./collection-search-CPadQqKp.js";import{u as ft}from"./use-mobile-B7UqukPG.js";import{u as mt}from"./use-mcp-client-Z8a6jg-w.js";import{u as pt,g as ht}from"./use-mcp-prompts-KWx0e75o.js";import{c as gt,P as xt}from"./usage-stats-qZh3WQDj.js";import{T as bt,d as yt,c as vt,e as St,H as jt}from"./input-Lv9puCyJ.js";import{u as Et,a as wt,S as Nt,M as fe}from"./pair-BwCxrq_f.js";import{a as Ct}from"./autosend-DbfDzqlB.js";import{u as Tt}from"./thread-intent-BONVdhUb.js";import{N as kt}from"./index-KGPpyCdi.js";import{i as Pt}from"./LinkBroken01-4j6Z2AOF.js";import{f as Te}from"./agent-icon-Nkid6y9z.js";import{d as Dt}from"./use-entitlements-BChYmsyZ.js";import{u as Rt}from"./use-deco-credits-D1bpdE32.js";import{F as _t}from"./feature-paywall-BVXAF3Vl.js";import{i as Lt}from"./AlertCircle-BPGyk76P.js";function me(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const Mt={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ke=k.createContext(Mt),pe=16384;class Bt{data="";append(e){this.data+=e,this.data.length>pe&&(this.data=this.data.slice(this.data.length-pe))}get(){return this.data}clear(){this.data=""}}const Ot=1e3,At=3e4,It=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],ge="log";function $t(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function Ft(t){return t===404}async function Ht(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(It)});return await e.body?.cancel().catch(()=>{}),Ft(e.status)}catch{return!1}}const Pe=He(ke);function Ms(t){const e=$.c(10);let n,o,s;e[0]!==t?({resetKey:s,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=s):(n=e[1],o=e[2],s=e[3]);let r;e[4]!==o||e[5]!==s?(r=a.jsx(zt,{...o},s),e[4]=o,e[5]=s,e[6]=r):r=e[6];let c;return e[7]!==n||e[8]!==r?(c=a.jsx(Pe.Host,{source:r,children:n}),e[7]=n,e[8]=r,e[9]=c):c=e[9],c}function zt(t){return Pe.usePublish(Kt(t)),null}function Kt({virtualMcpId:t,branch:e,previewUrl:n=null,enabled:o=!0}){const{org:s}=J(),r=Oe(),c=we()?.taskId??null,[l,i]=k.useState(null),[f,u]=k.useState({phase:"idle"}),[p,m]=k.useState({state:"running"}),[E,x]=k.useState({kind:"unknown"}),[T,h]=k.useState(!1),[y,w]=k.useState([]),[v,N]=k.useState([]),[,b]=k.useState(0),S=k.useRef(new Map),R=k.useRef(new Set),_=k.useRef(new Set),B=k.useRef(null),D=$t(n),M=et(t)?.metadata?.runtime?.selected==="deno",g=d=>{let j=S.current.get(d);return j||(j=new Bt,S.current.set(d,j)),j};return k.useEffect(()=>{if(i(null),u({phase:"idle"}),m({state:"running"}),x({kind:"unknown"}),B.current=null,h(!1),w([]),N([]),S.current.clear(),!t||!e||!o)return;const d=Ze({orgSlug:s.slug,virtualMcpId:t,branch:e,threadId:c??null},"events");let j=!1,L=0,F=null,q=null,G=null,K=null,z=null,Y=null;const se=()=>{q&&clearTimeout(q),q=setTimeout(()=>{q=null,r.invalidateQueries({queryKey:W.liveMeta(s.slug,t,e)})},1e3)},Me=P=>{try{const O=JSON.parse(P.data);i(O),O.kind!=="failed"&&(h(!1),L=0),O.kind==="ready"&&oe()}catch(O){console.warn("[vm-events] bad phase payload",O)}},ne=()=>{h(!0),i(null),u({phase:"idle"}),m({state:"running"}),x({kind:"unknown"}),w([]),N([]),S.current.clear()},re=P=>{try{const O=JSON.parse(P.data);if(typeof O.data!="string")return;L=0;const I=O.data.replace(/\r?\n/g,`\r
|
|
2
2
|
`);g(O.source).append(I);for(const A of R.current)try{A(O.source,I)}catch{}b(A=>A+1)}catch{}},ae=P=>{const O=P.type;try{const I=JSON.parse(P.data);switch(L=0,O){case"lifecycle":{const A=I;u(A.state);const U=`${s.slug}/${t}/${e}`;if(me(A.state.phase)&&!(Y&&me(Y))){ie(r,s.id);const Q=W.decofile(U);r.getQueryData(Q)===void 0&&r.invalidateQueries({queryKey:Q})}A.state.phase==="running"&&Y!=="running"&&(ie(r,s.id),r.invalidateQueries({queryKey:W.decofile(U)}),r.invalidateQueries({queryKey:W.liveMeta(s.slug,t,e)})),Y=A.state.phase;const V=A.state.phase==="running"?A.state.port:null,ee=B.current;if(B.current=V,ee!==null&&V!==null&&ee!==V)for(const Q of _.current)try{Q()}catch{}return}case"status":m(I);return;case"tasks":{const U=I.active.map(V=>V.logName??"").filter(Boolean);N(U);return}case"scripts":w(I.scripts);return;case"branch":{const A=I.meta;x(A);return}case"reload":for(const A of _.current)try{A()}catch{}return;case"file-changed":{const{path:A}=I,U=`${s.slug}/${t}/${e}`;if(A.startsWith(".deco/")||A.includes("/.deco/")){if(!(Y==="running"))return;A.endsWith(".deco/meta.gen.json")&&se(),G&&clearTimeout(G),G=setTimeout(()=>{if(G=null,r.invalidateQueries({queryKey:W.decofile(U)}),M)for(const Q of _.current)try{Q()}catch{}},500)}else se();return}}}catch{}};function Z(){if(j)return;const P=new EventSource(d);K=P,P.onopen=()=>{},P.onerror=()=>{K===P&&P.readyState===EventSource.CLOSED&&le("studio")},P.addEventListener("phase",Me),P.addEventListener("gone",ne),P.addEventListener(ge,re);for(const O of he)P.addEventListener(O,ae)}function oe(){if(j||!D||z)return;const P=new EventSource(D);z=P;let O=!1;P.onopen=()=>{if(j||z!==P)return;O=!0,L=0;const I=K;K=null,I?.close()},P.onerror=()=>{z===P&&P.readyState===EventSource.CLOSED&&Be(P,O)},P.addEventListener(ge,re);for(const I of he)P.addEventListener(I,ae)}async function Be(P,O){const I=D?await Ht(D):!1;if(!(j||z!==P)){if(P.close(),z=null,I){ne(),K||Z();return}O&&le("direct")}}function le(P){if(j||F)return;const O=Ae(At,Ot,L,2,0);L++,F=setTimeout(()=>{if(F=null,!j){if(P==="direct"){z?.close(),z=null,oe();return}K?.close(),K=null,Z()}},O)}return Z(),()=>{j=!0,K?.close(),z?.close(),F&&clearTimeout(F),q&&clearTimeout(q),G&&clearTimeout(G)}},[t,e,s.slug,s.id,o,c,D,r,M]),{phase:l,lifecycle:f,status:p,branch:E,notFound:T,scripts:y,activeProcesses:v,getBuffer:d=>S.current.get(d)?.get()??"",hasData:d=>(S.current.get(d)?.get().length??0)>0,subscribeChunks:d=>(R.current.add(d),()=>{R.current.delete(d)}),subscribeReload:d=>(_.current.add(d),()=>{_.current.delete(d)})}}function De(){return k.use(ke)}function Bs(t){const{subscribeChunks:e}=De(),n=k.useRef(t);n.current=t,k.useEffect(()=>e((r,c)=>{n.current?.(r,c)}),[e])}function Os(t){const{subscribeReload:e}=De(),n=k.useRef(t);n.current=t,k.useEffect(()=>e(()=>{n.current?.()}),[e])}const xe=3,Re="inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-muted text-muted-foreground text-sm font-medium transition-colors cursor-pointer",qt="flex flex-col gap-1.5 p-4 rounded-xl bg-accent/40 text-sm leading-snug transition-colors cursor-pointer text-left";function _e(t){const e=$.c(46),{item:n,onSelect:o,isLoading:s,isDisabled:r,variant:c}=t,l=c===void 0?"pill":c,{prompt:i}=n;let f;if(e[0]!==i._meta||e[1]!==i.name||e[2]!==i.title){const R=Ce(i._meta);f=i.title??nt(i.name,R),e[0]=i._meta,e[1]=i.name,e[2]=i.title,e[3]=f}else f=e[3];const u=f,p=i.description||null;if(l==="card"){let R;e[4]!==o||e[5]!==i?(R=()=>o(i),e[4]=o,e[5]=i,e[6]=R):R=e[6];const _=r||s,B=s&&"bg-accent/40",D=(r||s)&&"cursor-not-allowed opacity-50";let M;e[7]!==B||e[8]!==D?(M=H(qt,"hover:bg-accent text-foreground",B,D),e[7]=B,e[8]=D,e[9]=M):M=e[9];let g;e[10]!==u?(g=a.jsx("span",{className:"font-medium truncate capitalize",children:u}),e[10]=u,e[11]=g):g=e[11];let C;e[12]!==s?(C=s&&a.jsx(ue,{size:"xs"}),e[12]=s,e[13]=C):C=e[13];let d;e[14]!==g||e[15]!==C?(d=a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g,C]}),e[14]=g,e[15]=C,e[16]=d):d=e[16];let j;e[17]!==p?(j=p&&a.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:p}),e[17]=p,e[18]=j):j=e[18];let L;return e[19]!==d||e[20]!==j||e[21]!==R||e[22]!==_||e[23]!==M?(L=a.jsxs("button",{type:"button",onClick:R,disabled:_,className:M,children:[d,j]}),e[19]=d,e[20]=j,e[21]=R,e[22]=_,e[23]=M,e[24]=L):L=e[24],L}let m;e[25]!==o||e[26]!==i?(m=()=>o(i),e[25]=o,e[26]=i,e[27]=m):m=e[27];const E=r||s,x=s&&"bg-muted/50",T=(r||s)&&"cursor-not-allowed opacity-50";let h;e[28]!==x||e[29]!==T?(h=H(Re,"hover:bg-accent hover:text-foreground",x,T),e[28]=x,e[29]=T,e[30]=h):h=e[30];let y;e[31]!==u?(y=a.jsx("span",{className:"capitalize",children:u}),e[31]=u,e[32]=y):y=e[32];let w;e[33]!==s?(w=s&&a.jsx(ue,{size:"xs"}),e[33]=s,e[34]=w):w=e[34];let v;e[35]!==m||e[36]!==E||e[37]!==h||e[38]!==y||e[39]!==w?(v=a.jsx(rt,{asChild:!0,children:a.jsxs("button",{type:"button",onClick:m,disabled:E,className:h,children:[y,w]})}),e[35]=m,e[36]=E,e[37]=h,e[38]=y,e[39]=w,e[40]=v):v=e[40];const N=p??u;let b;e[41]!==N?(b=a.jsx(at,{side:"top",className:"max-w-xs",children:a.jsx("p",{className:"text-xs",children:N})}),e[41]=N,e[42]=b):b=e[42];let S;return e[43]!==v||e[44]!==b?(S=a.jsxs(ot,{delayDuration:400,children:[v,b]}),e[43]=v,e[44]=b,e[45]=S):S=e[45],S}function Gt(t){const e=$.c(61),{items:n,open:o,onOpenChange:s,onSelect:r,loadingPrompt:c}=t,l=X(),[i,f]=k.useState(""),u=!!c;let p;e[0]!==n||e[1]!==i?(p=i.trim()?n.filter(g=>{const C=i.toLowerCase();return g.prompt.name.toLowerCase().includes(C)||(g.prompt.title??"").toLowerCase().includes(C)||(g.prompt.description??"").toLowerCase().includes(C)}):n,e[0]=n,e[1]=i,e[2]=p):p=e[2];const m=p,E=ft();let x;e[3]!==m.length||e[4]!==i||e[5]!==l?(x=m.length===0&&a.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:l("chat.iceBreakers.noPromptsMatch",{search:i})}),e[3]=m.length,e[4]=i,e[5]=l,e[6]=x):x=e[6];let T;if(e[7]!==m||e[8]!==u||e[9]!==c?.name||e[10]!==s||e[11]!==r){let g;e[13]!==u||e[14]!==c?.name||e[15]!==s||e[16]!==r?(g=C=>a.jsx(_e,{item:C,variant:"card",onSelect:d=>{s(!1),r(d)},isLoading:c?.name===C.prompt.name,isDisabled:u&&c?.name!==C.prompt.name},C.prompt.name),e[13]=u,e[14]=c?.name,e[15]=s,e[16]=r,e[17]=g):g=e[17],T=m.map(g),e[7]=m,e[8]=u,e[9]=c?.name,e[10]=s,e[11]=r,e[12]=T}else T=e[12];let h;e[18]!==x||e[19]!==T?(h=a.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:a.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[x,T]})}),e[18]=x,e[19]=T,e[20]=h):h=e[20];const y=h;let w;e[21]!==l?(w=l("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=l,e[22]=w):w=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=g=>{g.key==="Escape"&&f("")},e[23]=v):v=e[23];let N;e[24]!==i||e[25]!==w?(N=a.jsx(dt,{value:i,onChange:f,placeholder:w,onKeyDown:v}),e[24]=i,e[25]=w,e[26]=N):N=e[26];const b=N;if(E){let g;e[27]!==l?(g=l("chat.iceBreakers.allPromptsTitle"),e[27]=l,e[28]=g):g=e[28];let C;e[29]!==g?(C=a.jsx(lt,{className:"sr-only",children:a.jsx(it,{children:g})}),e[29]=g,e[30]=C):C=e[30];let d;e[31]!==l?(d=l("chat.iceBreakers.promptsLabel"),e[31]=l,e[32]=d):d=e[32];let j;e[33]!==d?(j=a.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:a.jsx("span",{className:"text-sm font-medium text-foreground",children:d})}),e[33]=d,e[34]=j):j=e[34];let L;e[35]!==y||e[36]!==b||e[37]!==j||e[38]!==C?(L=a.jsxs(ct,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[C,j,b,y]}),e[35]=y,e[36]=b,e[37]=j,e[38]=C,e[39]=L):L=e[39];let F;return e[40]!==s||e[41]!==o||e[42]!==L?(F=a.jsx(te,{delayDuration:400,children:a.jsx(ut,{open:o,onOpenChange:s,children:L})}),e[40]=s,e[41]=o,e[42]=L,e[43]=F):F=e[43],F}let S;e[44]!==l?(S=l("chat.iceBreakers.allPromptsTitle"),e[44]=l,e[45]=S):S=e[45];let R;e[46]!==S?(R=a.jsx(be,{className:"sr-only",children:a.jsx(ye,{children:S})}),e[46]=S,e[47]=R):R=e[47];let _;e[48]!==l?(_=l("chat.iceBreakers.promptsLabel"),e[48]=l,e[49]=_):_=e[49];let B;e[50]!==_?(B=a.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:a.jsx("span",{className:"text-sm font-medium text-foreground",children:_})}),e[50]=_,e[51]=B):B=e[51];let D;e[52]!==y||e[53]!==b||e[54]!==B||e[55]!==R?(D=a.jsxs(ve,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[R,B,b,y]}),e[52]=y,e[53]=b,e[54]=B,e[55]=R,e[56]=D):D=e[56];let M;return e[57]!==s||e[58]!==o||e[59]!==D?(M=a.jsx(te,{delayDuration:400,children:a.jsx(Se,{open:o,onOpenChange:s,children:D})}),e[57]=s,e[58]=o,e[59]=D,e[60]=M):M=e[60],M}function Ut(t){const e=$.c(30),{items:n,onSelect:o,loadingPrompt:s,className:r}=t,c=X(),[l,i]=k.useState(!1);if(n.length===0)return null;let f,u,p,m,E;if(e[0]!==r||e[1]!==n||e[2]!==s||e[3]!==o||e[4]!==c){const y=n.slice(0,xe),w=n.slice(xe),v=!!s;let N;e[10]!==v||e[11]!==s?.name||e[12]!==o?(N=S=>a.jsx(_e,{item:S,onSelect:o,isLoading:s?.name===S.prompt.name,isDisabled:v&&s?.name!==S.prompt.name},S.prompt.name),e[10]=v,e[11]=s?.name,e[12]=o,e[13]=N):N=e[13];const b=y.map(N);f=te,E=400,e[14]!==r?(u=H("w-full flex flex-wrap gap-2 justify-center",r),e[14]=r,e[15]=u):u=e[15],p=b,m=w.length>0&&a.jsx("button",{type:"button",disabled:v,onClick:()=>i(!0),className:H(Re,"hover:bg-accent hover:text-foreground",v&&"opacity-50 cursor-not-allowed"),children:c("chat.iceBreakers.moreButton",{count:w.length})}),e[0]=r,e[1]=n,e[2]=s,e[3]=o,e[4]=c,e[5]=f,e[6]=u,e[7]=p,e[8]=m,e[9]=E}else f=e[5],u=e[6],p=e[7],m=e[8],E=e[9];let x;e[16]!==u||e[17]!==p||e[18]!==m?(x=a.jsxs("div",{className:u,children:[p,m]}),e[16]=u,e[17]=p,e[18]=m,e[19]=x):x=e[19];let T;e[20]!==n||e[21]!==s||e[22]!==l||e[23]!==o?(T=a.jsx(Gt,{items:n,open:l,onOpenChange:i,onSelect:o,loadingPrompt:s}),e[20]=n,e[21]=s,e[22]=l,e[23]=o,e[24]=T):T=e[24];let h;return e[25]!==f||e[26]!==E||e[27]!==x||e[28]!==T?(h=a.jsxs(f,{delayDuration:E,children:[x,T]}),e[25]=f,e[26]=E,e[27]=x,e[28]=T,e[29]=h):h=e[29],h}function Vt(){return null}function Qt(t,e){switch(e.type){case"SELECT_PROMPT":return!e.prompt.arguments||e.prompt.arguments.length===0?{stage:"loading",prompt:e.prompt}:{stage:"idle"};case"START_LOADING":return{stage:"loading",prompt:e.prompt,arguments:e.arguments};case"RESET":return{stage:"idle"};default:return t}}function Yt(t){const e=$.c(31),{connectionId:n}=t,o=X(),{sendMessage:s}=Ne(),{org:r}=J();let c;e[0]!==n||e[1]!==r.id||e[2]!==r.slug?(c={connectionId:n,orgId:r.id,orgSlug:r.slug},e[0]=n,e[1]=r.id,e[2]=r.slug,e[3]=c):c=e[3];const l=mt(c);let i;e[4]!==l?(i={client:l,staleTime:6e4},e[4]=l,e[5]=i):i=e[5];const{data:f}=pt(i);let u;e[6]!==f?.prompts?(u=f?.prompts??[],e[6]=f?.prompts,e[7]=u):u=e[7];const p=u;let m;e[8]!==p?(m=p.map(Wt),e[8]=p,e[9]=m):m=e[9];const E=m;let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x={stage:"idle"},e[10]=x):x=e[10];const[T,h]=k.useReducer(Qt,x),[y,w]=k.useState(null);let v;e[11]!==l||e[12]!==s||e[13]!==o?(v=async(d,j)=>{if(!l){ce.error(o("chat.iceBreakers.mcpClientNotAvailable")),h({type:"RESET"});return}try{const L=await ht(l,d.name,j);h({type:"RESET"});const F={type:"doc",content:[{type:"paragraph",content:[gt({id:d.name,name:st(d.name,Ce(d._meta)),metadata:L.messages,char:"/",kind:"prompt",args:j}),{type:"text",text:" "}]}]};await s(F)}catch(L){console.error("[ice-breakers] Failed to fetch prompt:",L),ce.error(o("chat.iceBreakers.failedToLoadPrompt")),h({type:"RESET"})}},e[11]=l,e[12]=s,e[13]=o,e[14]=v):v=e[14];const N=v;let b;e[15]!==N?(b=async d=>{if(d.arguments&&d.arguments.length>0){h({type:"SELECT_PROMPT",prompt:d}),w(d);return}h({type:"START_LOADING",prompt:d}),await N(d)},e[15]=N,e[16]=b):b=e[16];const S=b;let R;e[17]!==y||e[18]!==N?(R=async d=>{y&&(h({type:"START_LOADING",prompt:y,arguments:d}),w(null),await N(y,d))},e[17]=y,e[18]=N,e[19]=R):R=e[19];const _=R;if(E.length===0)return null;const B=T.stage==="loading"?T.prompt:null;let D;e[20]!==S||e[21]!==E||e[22]!==B?(D=a.jsx(Ut,{items:E,onSelect:S,loadingPrompt:B}),e[20]=S,e[21]=E,e[22]=B,e[23]=D):D=e[23];let M;e[24]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{w(null),h({type:"RESET"})},e[24]=M):M=e[24];let g;e[25]!==y||e[26]!==_?(g=a.jsx(xt,{prompt:y,setPrompt:M,onSubmit:_}),e[25]=y,e[26]=_,e[27]=g):g=e[27];let C;return e[28]!==D||e[29]!==g?(C=a.jsxs(a.Fragment,{children:[D,g]}),e[28]=D,e[29]=g,e[30]=C):C=e[30],C}function Wt(t){return{prompt:t}}function Jt(t){const e=$.c(13),{className:n}=t,{selectedVirtualMcp:o}=ze(),{org:s}=J();let r;e[0]!==s.id?(r=Ie(s.id),e[0]=s.id,e[1]=r):r=e[1];const c=r.id,l=o?.id??c;let i;e[2]!==n?(i=H("w-full @container",n),e[2]=n,e[3]=i):i=e[3];const f=l??"default";let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx(Vt,{}),e[4]=u):u=e[4];let p;e[5]!==l?(p=a.jsx(Yt,{connectionId:l}),e[5]=l,e[6]=p):p=e[6];let m;e[7]!==f||e[8]!==p?(m=a.jsx($e,{fallback:null,children:a.jsx(k.Suspense,{fallback:u,children:p},f)}),e[7]=f,e[8]=p,e[9]=m):m=e[9];let E;return e[10]!==i||e[11]!==m?(E=a.jsx("div",{className:i,children:m}),e[10]=i,e[11]=m,e[12]=E):E=e[12],E}function Xt(t){let e=0;for(const n of t)for(const o of n.parts??[]){const s=o;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function Zt(){const t=$.c(8),{openPanel:e}=Ct(),n=Tt(),o=Ke()?.messages??[],s=we()?.taskId??null;let r;t[0]!==o?(r=Xt(o),t[0]=o,t[1]=r):r=t[1];const c=r,l=k.useRef(null),i=k.useRef(null);let f,u;t[2]!==c||t[3]!==n||t[4]!==e||t[5]!==s?(f=()=>{if(!c||!s)return;const p=`${s}:${c}`;i.current!==p&&(i.current=p,n?.refreshThreadMetadata(s)),l.current!==s&&(l.current=s,e("site-editor"))},u=[c,s,e,n],t[2]=c,t[3]=n,t[4]=e,t[5]=s,t[6]=f,t[7]=u):(f=t[6],u=t[7]),k.useEffect(f,u)}function Le(t){return`deco-credits-empty-dismissed:${t}`}function As(t){try{return localStorage.getItem(Le(t))==="1"}catch{return!1}}function es(){const t=$.c(56),e=X(),{org:n}=J(),o=Dt("credits"),s=je(),{decoKeyId:r}=Rt(),[c,l]=k.useState(!0);let i;t[0]!==n.id?(i=()=>{de("credits_empty_state_dismissed",{organization_id:n.id}),l(!1);try{localStorage.setItem(Le(n.id),"1")}catch{}},t[0]=n.id,t[1]=i):i=t[1];const f=i;let u,p;if(t[2]!==c||t[3]!==n.id?(u=()=>{c&&de("credits_empty_state_shown",{organization_id:n.id})},p=[c,n.id],t[2]=c,t[3]=n.id,t[4]=u,t[5]=p):(u=t[4],p=t[5]),k.useEffect(u,p),!c)return null;if(!o){let d;t[6]!==e?(d=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=d):d=t[7];let j;t[8]!==d?(j={title:d},t[8]=d,t[9]=j):j=t[9];let L;return t[10]!==f||t[11]!==j?(L=a.jsx(_t,{feature:"chat",copy:j,onDismiss:f}),t[10]=f,t[11]=j,t[12]=L):L=t[12],L}let m;t[13]!==f?(m=d=>!d&&f(),t[13]=f,t[14]=m):m=t[14];let E;t[15]===Symbol.for("react.memo_cache_sentinel")?(E=a.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),t[15]=E):E=t[15];let x;t[16]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:a.jsx(Te,{size:20,className:"text-warning"})}),t[16]=x):x=t[16];let T;t[17]!==e?(T=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=T):T=t[18];let h;t[19]!==T?(h=a.jsx(ye,{className:"text-lg font-semibold",children:T}),t[19]=T,t[20]=h):h=t[20];let y;t[21]!==e?(y=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=y):y=t[22];let w;t[23]!==y?(w=a.jsx(Fe,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:y}),t[23]=y,t[24]=w):w=t[24];let v;t[25]!==h||t[26]!==w?(v=a.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[E,a.jsxs(be,{className:"relative gap-3",children:[x,a.jsxs("div",{className:"text-center",children:[h,w]})]})]}),t[25]=h,t[26]=w,t[27]=v):v=t[27];let N;t[28]!==r||t[29]!==f?(N=r&&a.jsx("div",{className:"px-6 pb-5",children:a.jsx(bt,{source:"empty_state",onDone:f})}),t[28]=r,t[29]=f,t[30]=N):N=t[30];let b;t[31]!==f||t[32]!==s||t[33]!==n.slug?(b=()=>{s({to:"/$org/settings/ai-providers",params:{org:n.slug}}),f()},t[31]=f,t[32]=s,t[33]=n.slug,t[34]=b):b=t[34];let S;t[35]!==e?(S=e("chat.creditsEmptyState.useYourOwnProvider"),t[35]=e,t[36]=S):S=t[36];let R;t[37]===Symbol.for("react.memo_cache_sentinel")?(R=a.jsx(Pt,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=R):R=t[37];let _;t[38]!==b||t[39]!==S?(_=a.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:b,children:[S,R]}),t[38]=b,t[39]=S,t[40]=_):_=t[40];let B;t[41]!==e?(B=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=B):B=t[42];let D;t[43]!==f||t[44]!==B?(D=a.jsx(Ee,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:f,children:B}),t[43]=f,t[44]=B,t[45]=D):D=t[45];let M;t[46]!==_||t[47]!==D?(M=a.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[_,D]}),t[46]=_,t[47]=D,t[48]=M):M=t[48];let g;t[49]!==v||t[50]!==N||t[51]!==M?(g=a.jsxs(ve,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ts,children:[v,N,M]}),t[49]=v,t[50]=N,t[51]=M,t[52]=g):g=t[52];let C;return t[53]!==g||t[54]!==m?(C=a.jsx(Se,{open:!0,onOpenChange:m,children:g}),t[53]=g,t[54]=m,t[55]=C):C=t[55],C}function ts(t){return t.preventDefault()}function ss(t){const e=$.c(6),{balanceDollars:n}=t;let o;e[0]!==n?(o=n.toFixed(2),e[0]=n,e[1]=o):o=e[1];const s=o;let r,c;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=H("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),c=a.jsx(Te,{size:13,className:"text-success"}),e[2]=r,e[3]=c):(r=e[2],c=e[3]);let l;return e[4]!==s?(l=a.jsxs("div",{className:r,children:[c,a.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",s," in credits to get started"]})]}),e[4]=s,e[5]=l):l=e[5],l}function ns(){const t=$.c(8),{org:e}=J(),n=je();let o;t[0]!==n||t[1]!==e.slug?(o=()=>n({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=n,t[1]=e.slug,t[2]=o):o=t[2];let s,r,c;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=H("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),r=a.jsx(Lt,{size:13,className:"text-warning"}),c=a.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=r,t[5]=c):(s=t[3],r=t[4],c=t[5]);let l;return t[6]!==o?(l=a.jsxs("button",{type:"button",onClick:o,className:s,children:[r,c]}),t[6]=o,t[7]=l):l=t[7],l}function rs(t){const e=$.c(7),{scrollRef:n,sentinelRef:o,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:c}=t;let l,i;e[0]!==c||e[1]!==s||e[2]!==r||e[3]!==n||e[4]!==o?(l=()=>{const f=o.current,u=n.current;if(!f||!u||!s)return;const p=new IntersectionObserver(async m=>{if(!m[0]?.isIntersecting||r||!s)return;const x=u.scrollHeight,T=u.scrollTop;await c(),requestAnimationFrame(()=>{const h=u.scrollHeight;u.scrollTop=T+(h-x)})},{root:u,rootMargin:"200px 0px 0px 0px"});return p.observe(f),()=>p.disconnect()},i=[n,o,s,r,c],e[0]=c,e[1]=s,e[2]=r,e[3]=n,e[4]=o,e[5]=l,e[6]=i):(l=e[5],i=e[6]),k.useEffect(l,i)}function as(t){const e=$.c(5),{className:n,children:o}=t;let s;e[0]!==n?(s=H("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",n),e[0]=n,e[1]=s):s=e[1];let r;return e[2]!==o||e[3]!==s?(r=a.jsx("div",{className:s,children:o}),e[2]=o,e[3]=s,e[4]=r):r=e[4],r}function os(t){const e=$.c(5),{children:n,className:o}=t;let s;e[0]!==o?(s=H("flex-1 min-h-0 overflow-y-auto isolate",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=a.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function ls(t){const e=$.c(2),{children:n}=t;let o;return e[0]!==n?(o=a.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:n}),e[0]=n,e[1]=o):o=e[1],o}function is(){const t=X(),{messages:e,status:n,hasMoreOlder:o,isFetchingOlder:s,fetchOlderMessages:r,isRunInProgress:c}=Ne(),{taskId:l}=Qe();Zt();const i=Ye(l??""),f=We(i),u=f.size===0?e:e.filter(b=>!f.has(b.id)),p=Je(u,n==="submitted"||n==="streaming"||c),m=p.visible,E=Et(m),x=E.at(-1),h=St()*jt+16,y=k.useRef(null),w=k.useRef(null);rs({scrollRef:y,sentinelRef:w,hasMoreOlder:o,isFetchingOlder:s,fetchOlderMessages:r});const v=wt({initial:!1}),N=b=>{y.current=b,v.scrollRef(b)};return a.jsx(Xe.Provider,{value:p,children:a.jsx(Nt,{messages:e,children:a.jsxs("div",{className:"relative h-full w-full min-w-0",children:[a.jsx("div",{ref:N,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:h},children:a.jsxs("div",{ref:v.contentRef,className:"overflow-x-clip",children:[a.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[a.jsx("div",{ref:w,"aria-hidden":!0,className:"h-px"}),s&&a.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),E.slice(0,-1).map((b,S)=>a.jsx(fe,{pair:b,isLastPair:!1,status:S===E.length-1?n:void 0},`pair-${b.user?.id??b.assistant?.id}`))]}),x&&a.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:a.jsx(fe,{pair:x,isLastPair:!0,status:n},`pair-${x.user?.id??x.assistant?.id}`)})]})}),!v.isAtBottom&&a.jsx(Ee,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:h+8},onClick:()=>{v.scrollToBottom()},children:a.jsx(tt,{size:14})})]})})})}function cs(t){const e=$.c(5),{children:n,className:o}=t;let s;e[0]!==o?(s=H("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",o),e[0]=o,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=a.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}const Is=Object.assign(as,{Main:os,Messages:is,EmptyState:ls,Footer:cs,Input:vt,Provider:Ve,StreamHost:Ue,ActiveTaskStreamSource:Ge,ThreadlessStreamSource:qe,IceBreakers:Jt,NoAiProviderEmptyState:kt,CreditsEmptyState:es,CreditsEyebrow:ss,NoCreditsEyebrow:ns,CreditsExhaustedBanner:yt});export{Is as C,Ms as S,Bs as a,Os as b,me as i,De as u,As as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,b as j,r as E,j as x,m as q,bx as At,t as ue,b2 as Je,a5 as Mt,hb as St,i as Ct,K as Rt,bQ as Et,h as Ye,o as $t}from"./index-DGn-FPge.js";import{a as _t,n as et,E as ie,o as Lt,x as It,y as P,z as zt,A as Pt,B as tt,C as N,G as Ee,H as Ht,I as jt,J as $e,K as Nt,L as V,N as D,m as H,O as Y,T as nt,R as ke,Q as xe,U as Ot,V as Bt,W as Dt,X as Ft,Y as qt,s as Wt,Z as Ut,u as Gt,b as Zt}from"./usage-stats-B39QZ3Cn.js";import{T as _,n as Vt,i as Kt,E as Qt}from"./editor-classes-BnzpZOY5.js";import{a as Xt,e as rt,s as Jt,S as Yt}from"./suggestion-Dr321Cmr.js";import{B as en,c as tn,t as nn,C as st,f as rn,g as _e,s as sn,m as Le,a as Ie,b as an,d as ze,e as on,h as ln,i as cn,j as un,k as hn,l as dn,n as pn}from"./index-CN8uFy5p.js";import{aJ as fn,ae as gn,af as mn,ah as kn,X as xn,bl as bn,aY as wn}from"./agent-icon-FkFyvRCX.js";import{i as yn}from"./SwitchHorizontal01-D2vRhNhF.js";import{s as Tn}from"./Trash01-Ccl1EX2p.js";import{k as vn,a as An}from"./use-org-fs-CfPaWD_N.js";import{E as Pe,i as it,b as Mn,c as Sn,d as at,A as Cn,e as Rn,m as En,f as $n,g as _n}from"./markdown-C7Kie5ev.js";import{f as Ln,a as In,c as zn,C as Pn,b as He}from"./command-D1ggU7uN.js";import{I as Hn}from"./icon-button-CmFwjZ_m.js";function jn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const A=n.getAttributes("link").href;l(typeof A=="string"?A:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const A=Vt(a);if(A===""){g();return}if(!Kt(A)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:A}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let y;e[11]!==r?(y=r("markdownEditor.link"),e[11]=r,e[12]=y):y=e[12];let T;e[13]===Symbol.for("react.memo_cache_sentinel")?(T=x.jsx(fn,{size:14}),e[13]=T):T=e[13];let v;e[14]!==h||e[15]!==y||e[16]!==f?(v=x.jsx(_,{active:h,label:y,onClick:f,children:T}),e[14]=h,e[15]=y,e[16]=f,e[17]=v):v=e[17];let b;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(b=s&&x.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||i(!1)},children:[x.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:A=>{l(A.target.value),u(!1)},onKeyDown:A=>{A.key==="Enter"?(A.preventDefault(),k()):A.key==="Escape"&&(A.preventDefault(),i(!1),n.chain().focus().run())},className:q("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),x.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:x.jsx(At,{size:14})}),h&&x.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:x.jsx(Tn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=b):b=e[26];let w;return e[27]!==v||e[28]!==b?(w=x.jsxs("div",{className:"relative",children:[v,b]}),e[27]=v,e[28]=b,e[29]=w):w=e[29],w}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},je=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=x.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},ot=[1,2,3],Nn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function On(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:Bn},e[0]=n,e[1]=a):a=e[1];const l=_t(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&x.jsxs(en,{editor:n,shouldShow:Nn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[x.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:x.jsx(gn,{size:14})}),x.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:x.jsx(mn,{size:14})}),x.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:x.jsx(kn,{size:14})}),x.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:x.jsx(xn,{size:14})}),x.jsx(le,{}),ot.map((g,m)=>x.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:x.jsx(je,{children:`H${g}`})},g)),x.jsx(le,{}),x.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:x.jsx(yn,{size:14})}),x.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:x.jsx(je,{children:"1."})}),x.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:x.jsx(bn,{size:14})}),x.jsx(le,{}),x.jsx(jn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=x.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function Bn(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:ot.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Dn=10,Fn=25,qn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Wn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??qn[t.type]??""}function Un(){const t=$.c(4),e=j(),{upload:n}=vn(Pe),r=An(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=it(a),o=l?Dn:Fn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?Mn:Sn,c=`${crypto.randomUUID()}${Wn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new et("uploadSlots"),Gn=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Lt({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Zn(t,e){return ee.getState(t)?.get(e)}function Vn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((v,b,w,A)=>{p=w,g=A});let m;f.doc.nodesBetween(p,g,(v,b)=>{v===l&&(m=b+v.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const y=i.nodes.paragraph;m!==void 0&&l.isBlock&&y&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,y.create()),k=m+1);const T=It.near(f.doc.resolve(k));o&&f.setSelection(T),s&&he(f,s,T.to),t.dispatch(f)}function Kn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Qn(t=!0){const e=j(),{uploadFile:n}=Un(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=it(g);Vn(h,Zn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Kn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=be();function lt(t){F=t}var O={exec:()=>null};function M(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Xn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Jn=/^(?:[ \t]*(?:\n|$))+/,Yn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,er=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ct=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ut=M(ct).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nr=M(ct).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sr=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ir=M(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ar=M("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ht=M(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),or=M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ht).getRegex(),Ae={blockquote:or,code:Yn,def:sr,fences:er,heading:tr,hr:K,html:ar,lheading:ut,list:ir,newline:Jn,paragraph:ht,table:O,text:rr},Ne=M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),lr={...Ae,lheading:nr,table:Ne,paragraph:M(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},cr={...Ae,html:M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{c as $,b as j,r as E,j as x,m as q,bx as At,t as ue,b2 as Je,a5 as Mt,hb as St,i as Ct,K as Rt,bQ as Et,h as Ye,o as $t}from"./index-DWvRfTwV.js";import{a as _t,n as et,E as ie,o as Lt,x as It,y as P,z as zt,A as Pt,B as tt,C as N,G as Ee,H as Ht,I as jt,J as $e,K as Nt,L as V,N as D,m as H,O as Y,T as nt,R as ke,Q as xe,U as Ot,V as Bt,W as Dt,X as Ft,Y as qt,s as Wt,Z as Ut,u as Gt,b as Zt}from"./usage-stats-qZh3WQDj.js";import{T as _,n as Vt,i as Kt,E as Qt}from"./editor-classes-LBX4QjrW.js";import{a as Xt,e as rt,s as Jt,S as Yt}from"./suggestion-D-YZpsQl.js";import{B as en,c as tn,t as nn,C as st,f as rn,g as _e,s as sn,m as Le,a as Ie,b as an,d as ze,e as on,h as ln,i as cn,j as un,k as hn,l as dn,n as pn}from"./index-pqEXXiDC.js";import{aJ as fn,ae as gn,af as mn,ah as kn,X as xn,bl as bn,aY as wn}from"./agent-icon-Nkid6y9z.js";import{i as yn}from"./SwitchHorizontal01-C3qdjyVX.js";import{s as Tn}from"./Trash01-DSJ1LUhI.js";import{k as vn,a as An}from"./use-org-fs-DU8c86TB.js";import{E as Pe,i as it,b as Mn,c as Sn,d as at,A as Cn,e as Rn,m as En,f as $n,g as _n}from"./markdown-DkmjrNqn.js";import{f as Ln,a as In,c as zn,C as Pn,b as He}from"./command-CSFENWMV.js";import{I as Hn}from"./icon-button-1xC_JQLB.js";function jn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const A=n.getAttributes("link").href;l(typeof A=="string"?A:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const A=Vt(a);if(A===""){g();return}if(!Kt(A)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:A}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let y;e[11]!==r?(y=r("markdownEditor.link"),e[11]=r,e[12]=y):y=e[12];let T;e[13]===Symbol.for("react.memo_cache_sentinel")?(T=x.jsx(fn,{size:14}),e[13]=T):T=e[13];let v;e[14]!==h||e[15]!==y||e[16]!==f?(v=x.jsx(_,{active:h,label:y,onClick:f,children:T}),e[14]=h,e[15]=y,e[16]=f,e[17]=v):v=e[17];let b;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(b=s&&x.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||i(!1)},children:[x.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:A=>{l(A.target.value),u(!1)},onKeyDown:A=>{A.key==="Enter"?(A.preventDefault(),k()):A.key==="Escape"&&(A.preventDefault(),i(!1),n.chain().focus().run())},className:q("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),x.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:x.jsx(At,{size:14})}),h&&x.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:x.jsx(Tn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=b):b=e[26];let w;return e[27]!==v||e[28]!==b?(w=x.jsxs("div",{className:"relative",children:[v,b]}),e[27]=v,e[28]=b,e[29]=w):w=e[29],w}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},je=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=x.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},ot=[1,2,3],Nn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function On(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:Bn},e[0]=n,e[1]=a):a=e[1];const l=_t(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&x.jsxs(en,{editor:n,shouldShow:Nn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[x.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:x.jsx(gn,{size:14})}),x.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:x.jsx(mn,{size:14})}),x.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:x.jsx(kn,{size:14})}),x.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:x.jsx(xn,{size:14})}),x.jsx(le,{}),ot.map((g,m)=>x.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:x.jsx(je,{children:`H${g}`})},g)),x.jsx(le,{}),x.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:x.jsx(yn,{size:14})}),x.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:x.jsx(je,{children:"1."})}),x.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:x.jsx(bn,{size:14})}),x.jsx(le,{}),x.jsx(jn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=x.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function Bn(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:ot.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Dn=10,Fn=25,qn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Wn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??qn[t.type]??""}function Un(){const t=$.c(4),e=j(),{upload:n}=vn(Pe),r=An(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=it(a),o=l?Dn:Fn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?Mn:Sn,c=`${crypto.randomUUID()}${Wn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new et("uploadSlots"),Gn=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Lt({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Zn(t,e){return ee.getState(t)?.get(e)}function Vn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((v,b,w,A)=>{p=w,g=A});let m;f.doc.nodesBetween(p,g,(v,b)=>{v===l&&(m=b+v.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const y=i.nodes.paragraph;m!==void 0&&l.isBlock&&y&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,y.create()),k=m+1);const T=It.near(f.doc.resolve(k));o&&f.setSelection(T),s&&he(f,s,T.to),t.dispatch(f)}function Kn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Qn(t=!0){const e=j(),{uploadFile:n}=Un(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=it(g);Vn(h,Zn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Kn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=be();function lt(t){F=t}var O={exec:()=>null};function M(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Xn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Jn=/^(?:[ \t]*(?:\n|$))+/,Yn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,er=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ct=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ut=M(ct).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nr=M(ct).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sr=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ir=M(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ar=M("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ht=M(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),or=M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ht).getRegex(),Ae={blockquote:or,code:Yn,def:sr,fences:er,heading:tr,hr:K,html:ar,lheading:ut,list:ir,newline:Jn,paragraph:ht,table:O,text:rr},Ne=M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),lr={...Ae,lheading:nr,table:Ne,paragraph:M(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},cr={...Ae,html:M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ut).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ur=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dt=/^( {2,}|\\)\n(?!\s*$)/,dr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,W=/[\p{P}\p{S}]/u,oe=/[\s\p{P}\p{S}]/u,Me=/[^\s\p{P}\p{S}]/u,pr=M(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,oe).getRegex(),pt=/(?!~)[\p{P}\p{S}]/u,fr=/(?!~)[\s\p{P}\p{S}]/u,gr=/(?:[^\s\p{P}\p{S}]|~)/u,mr=M(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ft=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,kr=M(ft,"u").replace(/punct/g,W).getRegex(),xr=M(ft,"u").replace(/punct/g,pt).getRegex(),gt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",br=M(gt,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),wr=M(gt,"gu").replace(/notPunctSpace/g,gr).replace(/punctSpace/g,fr).replace(/punct/g,pt).getRegex(),yr=M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Tr=M(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,W).getRegex(),vr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ar=M(vr,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Mr=M(/\\(punct)/,"gu").replace(/punct/g,W).getRegex(),Sr=M(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Cr=M(ve).replace("(?:-->|$)","-->").getRegex(),Rr=M("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Cr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Er=M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mt=M(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),kt=M(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),$r=M("reflink|nolink(?!\\()","g").replace("reflink",mt).replace("nolink",kt).getRegex(),Oe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:O,anyPunctuation:Mr,autolink:Sr,blockSkip:mr,br:dt,code:hr,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:kr,emStrongRDelimAst:br,emStrongRDelimUnd:yr,escape:ur,link:Er,nolink:kt,punctuation:pr,reflink:mt,reflinkSearch:$r,tag:Rr,text:dr,url:O},_r={...Se,link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},de={...Se,emStrongRDelimAst:wr,emStrongLDelim:xr,delLDelim:Tr,delRDelim:Ar,url:M(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Oe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:M(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Oe).getRegex()},Lr={...de,br:M(dt).replace("{2,}","*").getRegex(),text:M(de.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:Ae,gfm:lr,pedantic:cr},U={normal:Se,gfm:de,breaks:Lr,pedantic:_r},Ir={"&":"&","<":"<",">":">",'"':""","'":"'"},Be=t=>Ir[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,Be)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,Be);return t}function De(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function Fe(t,e){let n=t.replace(R.findPipe,(i,a,l)=>{let o=!1,u=a;for(;--u>=0&&l[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split(R.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(R.slashPipe,"|");return r}function G(t,e,n){let r=t.length;if(r===0)return"";let s=0;for(;s<r&&t.charAt(r-s-1)===e;)s++;return t.slice(0,r-s)}function zr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Pr(t,e=0){let n=e,r="";for(let s of t)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function qe(t,e,n,r,s){let i=e.href,a=e.title||null,l=t[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}function Hr(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let s=r[1];return e.split(`
|
|
3
3
|
`).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=s.length?i.slice(s.length):i}).join(`
|
|
4
4
|
`)}var ne=class{options;rules;lexer;constructor(t){this.options=t||F}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:G(n,`
|