decocms 4.435.0 → 4.436.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DPZiMvN2.js → AlertCircle-6ybYQ23i.js} +1 -1
- package/dist/client/assets/{AreaChart-s05tWlGU.js → AreaChart-Dpo2DCFE.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CjTyzt3g.js → ArrowLeft-c2TyzYV8.js} +1 -1
- package/dist/client/assets/{ArrowUp-Yt4gbDvu.js → ArrowUp-Ck0_Bd3R.js} +1 -1
- package/dist/client/assets/{CartesianChart-mQf3Iyq0.js → CartesianChart-Bks6a_1V.js} +1 -1
- package/dist/client/assets/{Check-Dmr7pBQF.js → Check-B9MGwLYu.js} +1 -1
- package/dist/client/assets/{CheckCircle-D1Nws573.js → CheckCircle-D91123g-.js} +1 -1
- package/dist/client/assets/{ChevronUp-ChTjouRP.js → ChevronUp-efnDWTJo.js} +1 -1
- package/dist/client/assets/{Copy01-IzYp-LbI.js → Copy01-rQNANcmU.js} +1 -1
- package/dist/client/assets/{CreditCard01-BOc6Fq2p.js → CreditCard01-iCMKKibk.js} +1 -1
- package/dist/client/assets/{DotsVertical-CRbCZVHv.js → DotsVertical-_TKSgZ_X.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-BAItAaze.js → ErrorBarContext-BTFCRzpt.js} +1 -1
- package/dist/client/assets/{Image01-BnPKOufK.js → Image01-DAnmxYRB.js} +1 -1
- package/dist/client/assets/{Key01-Lasd54pd.js → Key01-DypAHQYR.js} +1 -1
- package/dist/client/assets/{Line-BFygTuMx.js → Line-CzSrIBNT.js} +1 -1
- package/dist/client/assets/{Link01-IfJ-2eZf.js → Link01-CXYgjG_2.js} +1 -1
- package/dist/client/assets/{LinkBroken01-C-IG039K.js → LinkBroken01-CXUAHdkG.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B8IX5Q-Z.js → LinkExternal01-DYpNBFe4.js} +1 -1
- package/dist/client/assets/{Monitor01-DUyrMqVD.js → Monitor01-BAjB03YK.js} +1 -1
- package/dist/client/assets/{Palette-Bv8GDfQQ.js → Palette-DCK6DhCo.js} +1 -1
- package/dist/client/assets/{Plus-BIdrASk5.js → Plus-BCvpEHBe.js} +1 -1
- package/dist/client/assets/{SearchMd-Bk9QJRgt.js → SearchMd-BZeBFgxn.js} +1 -1
- package/dist/client/assets/{Sector-BG2PXOYS.js → Sector-CxmP4STa.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-C2KAEwUK.js → ShoppingBag01-D9QLv3AR.js} +1 -1
- package/dist/client/assets/{Sun-CABStkjs.js → Sun-C0iRh-Gk.js} +1 -1
- package/dist/client/assets/{Tool01-B-XmH1ww.js → Tool01-BCWTP29t.js} +1 -1
- package/dist/client/assets/{Trash01-DGortNmD.js → Trash01-DYSwQZrr.js} +1 -1
- package/dist/client/assets/{Upload01-CUbYn_3T.js → Upload01-D1n8mQmM.js} +1 -1
- package/dist/client/assets/{User01-GgiHU2AS.js → User01-CqnrVGO2.js} +1 -1
- package/dist/client/assets/{UserSquare-h9TSCDjV.js → UserSquare-Cot0m-_1.js} +1 -1
- package/dist/client/assets/{Users01-BYkX8DZN.js → Users01-CrCP--sh.js} +1 -1
- package/dist/client/assets/{X-BiPIbWR-.js → X-Cjtw5tqD.js} +1 -1
- package/dist/client/assets/{XAxis-D-HqowzT.js → XAxis-BPHTmmQM.js} +1 -1
- package/dist/client/assets/{XClose-C2SCNtXa.js → XClose-C8P0rFOP.js} +1 -1
- package/dist/client/assets/{ZoomOut-BFcb2UCZ.js → ZoomOut-DF2wOfg4.js} +1 -1
- package/dist/client/assets/{access-gate-BM640D61.js → access-gate-CDhQZ3bi.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B6fDQZrH.js → add-connection-dialog-BFVFfXC3.js} +1 -1
- package/dist/client/assets/{agent-analytics-CDUTTrhu.js → agent-analytics-CdZXo_mN.js} +1 -1
- package/dist/client/assets/agent-app-H_lA87ih.js +1 -0
- package/dist/client/assets/{agent-assets-BJGBseqq.js → agent-assets-Cez9_bxl.js} +1 -1
- package/dist/client/assets/{agent-automation-CrUy9i_U.js → agent-automation-JjAIqJwX.js} +1 -1
- package/dist/client/assets/{agent-automations-Bba3D4ke.js → agent-automations-BOXHITiz.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-Dx55v6Ok.js → agent-connect-sources-Bp_dzf1u.js} +1 -1
- package/dist/client/assets/agent-deck-4S9mXIYh.js +1 -0
- package/dist/client/assets/{agent-e2e-yblXk9Co.js → agent-e2e-Dm2VTiiE.js} +1 -1
- package/dist/client/assets/{agent-experiments-lDggpVCf.js → agent-experiments-A5wh_VSI.js} +1 -1
- package/dist/client/assets/{agent-file-DcIeeWb7.js → agent-file-DaXlssWR.js} +1 -1
- package/dist/client/assets/{agent-git-Ll8hZBry.js → agent-git-3xYPhMt1.js} +1 -1
- package/dist/client/assets/{agent-hosting-BuOYjUe0.js → agent-hosting-B_XS63CC.js} +1 -1
- package/dist/client/assets/{agent-icon-BJP8PP0d.js → agent-icon-BSa4M47V.js} +1 -1
- package/dist/client/assets/agent-library-CGMqCDOd.js +1 -0
- package/dist/client/assets/agent-library-file-Ba6RU-PI.js +1 -0
- package/dist/client/assets/{agent-monitor-_tpLMfX0.js → agent-monitor-BlyV0ube.js} +1 -1
- package/dist/client/assets/{agent-overview-BO33YNXg.js → agent-overview-uCot9pZL.js} +1 -1
- package/dist/client/assets/agent-settings-B-eYuC65.js +1 -0
- package/dist/client/assets/agent-site-editor-code-ehB-ysAx.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-B2ilDrMl.js → agent-site-editor-content-BxqSMWeE.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-BMWL_0Tn.js → agent-site-editor-preview-30I-0d0y.js} +3 -3
- package/dist/client/assets/{agent-site-editor-Blbzc-r8.js → agent-site-editor-sYWtn6PH.js} +1 -1
- package/dist/client/assets/agent-view-BKSeTQN0.js +1 -0
- package/dist/client/assets/{agent-view-guard-CeykMhbd.js → agent-view-guard-CoRznXPE.js} +1 -1
- package/dist/client/assets/{agents-list-Coyjue6d.js → agents-list-CBDiY4gJ.js} +1 -1
- package/dist/client/assets/{ai-providers-B3dwRIP9.js → ai-providers-CXvmgcfH.js} +1 -1
- package/dist/client/assets/{alert-DAlDUvcH.js → alert-CQ4TnjsJ.js} +1 -1
- package/dist/client/assets/{alert-dialog-BGHe8RK1.js → alert-dialog-CRwe5o4p.js} +1 -1
- package/dist/client/assets/{analytics-sections-kIGnJ0VM.js → analytics-sections-D_eKWrvC.js} +1 -1
- package/dist/client/assets/{api-keys-CGrvu-9g.js → api-keys-CpUa8Qw-.js} +1 -1
- package/dist/client/assets/api-keys-RhgnfloG.js +1 -0
- package/dist/client/assets/{app-editor-JXI5xson.js → app-editor-O4jvZxzW.js} +1 -1
- package/dist/client/assets/{asset-utils-BTSqGL9M.js → asset-utils-B1NexnMU.js} +1 -1
- package/dist/client/assets/{auth-DcBz3Jfe.js → auth-DgAXBGyy.js} +1 -1
- package/dist/client/assets/{auth-catchall-C_9B_iHI.js → auth-catchall-CFOUIt1A.js} +1 -1
- package/dist/client/assets/{auth-entry-DEohc4tW.js → auth-entry-4kqX4ydS.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DPxbpFte.js → auth-split-layout-DpVaClFg.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Bkz_EiLT.js → authenticate-and-persist-oauth-DVtkeUNt.js} +1 -1
- package/dist/client/assets/{automation-list-row-Diz124sk.js → automation-list-row-DbEi-W0S.js} +1 -1
- package/dist/client/assets/{automation-runs-clU0RxZ1.js → automation-runs-B-nhvwsu.js} +1 -1
- package/dist/client/assets/{automations-CB0AGPt6.js → automations-npS5rTDq.js} +1 -1
- package/dist/client/assets/{autosend-CTtKUuKk.js → autosend-CLPSPXGZ.js} +1 -1
- package/dist/client/assets/{avatar-CnRm0_94.js → avatar-Drtufyjw.js} +1 -1
- package/dist/client/assets/{badge-g_l0okkz.js → badge-DpFKAdGf.js} +1 -1
- package/dist/client/assets/{block-document-B8T5aXC1.js → block-document-B5Cc-Zg7.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-K1fy_04Y.js → blocks-preview-workspace-context-Cjkrbhbk.js} +1 -1
- package/dist/client/assets/{buckets-8lWk64oz.js → buckets-DWUHnbQV.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-B6415RQ5.js → build-improve-prompt-doc-DIkN-a2Z.js} +1 -1
- package/dist/client/assets/{calendar-B5UP2by6.js → calendar-CG4qsKlv.js} +1 -1
- package/dist/client/assets/{capability-load-error-WfMTbRVu.js → capability-load-error-CC0ntXvK.js} +1 -1
- package/dist/client/assets/{category-editor-OUWWv9HA.js → category-editor-DUUE5m8F.js} +1 -1
- package/dist/client/assets/{chart-CjqFKJWN.js → chart-Cj6b_hgB.js} +1 -1
- package/dist/client/assets/{chat-context-DxeeSH4j.js → chat-context-Drs6TfxR.js} +1 -1
- package/dist/client/assets/{chat-draft-AYNyiwna.js → chat-draft-C163y66v.js} +1 -1
- package/dist/client/assets/{checkbox-D7h_tKSF.js → checkbox-B-ptMPYE.js} +1 -1
- package/dist/client/assets/{choose-editor-Cmdhd7xR.js → choose-editor-DWFaS58D.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-DXsdeD7c.js → claim-phase-copy-N518EVoU.js} +1 -1
- package/dist/client/assets/{cli-auth-success-IoscX3je.js → cli-auth-success-DyIaQMZT.js} +1 -1
- package/dist/client/assets/{client-icons-D5kiOSVI.js → client-icons-BPy89KI8.js} +1 -1
- package/dist/client/assets/{collapsible-DYBc7nQ6.js → collapsible-DuvoRmPZ.js} +1 -1
- package/dist/client/assets/{collection-detail-CXoRqSs6.js → collection-detail-CgYpP227.js} +1 -1
- package/dist/client/assets/{collection-display-button-BviyiXGz.js → collection-display-button-Nbd-2qNC.js} +1 -1
- package/dist/client/assets/{collection-search-CXOoi3KR.js → collection-search-RMk41ye0.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bn3_VKvF.js → collection-table-wrapper-Cty7TNa1.js} +1 -1
- package/dist/client/assets/{collection-tabs-gckXtGYi.js → collection-tabs-C7F9Kntb.js} +1 -1
- package/dist/client/assets/{combobox-DQGgX3OC.js → combobox-C2u0kYgx.js} +1 -1
- package/dist/client/assets/{command-Bop6bU1i.js → command-Dae572-g.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-D1E7_FHf.js → companion-mcps-section-L3Ob_Q-i.js} +1 -1
- package/dist/client/assets/{config-xsX1NXno.js → config-B644IckQ.js} +1 -1
- package/dist/client/assets/{connect-BGJtBM0N.js → connect-VkFeqP2u.js} +1 -1
- package/dist/client/assets/{connect-layout-LeBuY9KY.js → connect-layout-BzxwOLWE.js} +1 -1
- package/dist/client/assets/{connection-Bao38ay2.js → connection-DgUTLyWv.js} +1 -1
- package/dist/client/assets/{connection-card-BQ6pSr7m.js → connection-card-CYPVcyCl.js} +1 -1
- package/dist/client/assets/{connection-detail-B5C9cOYP.js → connection-detail-BDDxe447.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C-V6haqr.js → connection-form-helpers-CnazKdgJ.js} +1 -1
- package/dist/client/assets/{connections-C42945Au.js → connections-DGwh_Z7O.js} +1 -1
- package/dist/client/assets/{context-D0FhcjYd.js → context-D-BalDSl.js} +1 -1
- package/dist/client/assets/{context-menu-3vPUcdQq.js → context-menu-dYa0qKdh.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-D8hTaDTp.js → create-organization-dialog-BJxhfVj3.js} +1 -1
- package/dist/client/assets/{daily-pulse-D-mNC63s.js → daily-pulse-Cv4xy4Nf.js} +1 -1
- package/dist/client/assets/{decopilot-CfznPlDN.js → decopilot-BuBttE9O.js} +1 -1
- package/dist/client/assets/{dialog-DVzrCXE5.js → dialog-BDu7Odbi.js} +1 -1
- package/dist/client/assets/{discover-DpR8qA_M.js → discover-CDb8l0Cf.js} +1 -1
- package/dist/client/assets/{domain-settings-BcGpA-S_.js → domain-settings-CTUbB8ul.js} +1 -1
- package/dist/client/assets/{download-app-dialog-Dpp_8vJs.js → download-app-dialog-C5pSTRZI.js} +1 -1
- package/dist/client/assets/{drawer-5OLO6PpZ.js → drawer-B8K_Crzh.js} +1 -1
- package/dist/client/assets/{editor-GZ6eZT0C.js → editor-CdyJu6ec.js} +1 -1
- package/dist/client/assets/{empty-state-onJEO8rt.js → empty-state-CxMYhC6p.js} +1 -1
- package/dist/client/assets/{empty-state-DBl2fQ8g.js → empty-state-DjYKd98e.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C-SSYi9x.js → extract-connection-data-pEB9LnEc.js} +1 -1
- package/dist/client/assets/{feature-gate-ZNlXIHYC.js → feature-gate-CSsakESN.js} +1 -1
- package/dist/client/assets/{feature-paywall-BvLBz1-L.js → feature-paywall-CK4QTePu.js} +1 -1
- package/dist/client/assets/{file-explorer-NxzZmykh.js → file-explorer-xiGJikaa.js} +1 -1
- package/dist/client/assets/{file-preview-DfzMtCa9.js → file-preview-EUC0kMwT.js} +1 -1
- package/dist/client/assets/{file-share-button-Ca6wrZVa.js → file-share-button-DpDzBNlB.js} +1 -1
- package/dist/client/assets/{file-type-icon-LZrkIjqS.js → file-type-icon-D1P4nIkr.js} +1 -1
- package/dist/client/assets/flat-project-D-LcYYjE.js +1 -0
- package/dist/client/assets/{folder-icon-CozoAjpK.js → folder-icon-Ce07pgWj.js} +1 -1
- package/dist/client/assets/{form-Cbo9tpUX.js → form-C73wwUY1.js} +1 -1
- package/dist/client/assets/{gateway-client-B-LidRp4.js → gateway-client-DqxL5ILU.js} +1 -1
- package/dist/client/assets/{general-C2SOQghM.js → general-BgriYFfp.js} +1 -1
- package/dist/client/assets/{home-B6RDRPmm.js → home-B1Bms4Bc.js} +1 -1
- package/dist/client/assets/{icon-button-Cosv5r4_.js → icon-button-CCkUXmCt.js} +1 -1
- package/dist/client/assets/{index-BWNMxdtk.js → index-5DP27jDI.js} +1 -1
- package/dist/client/assets/{index-DsSeb-nf.js → index-BH0QOgT5.js} +1 -1
- package/dist/client/assets/{index-DSPqJ58N.js → index-BhDEqgvq.js} +1 -1
- package/dist/client/assets/{index-lO9l-PG1.js → index-BzpQR2a9.js} +1 -1
- package/dist/client/assets/{index-CUiaBYPH.js → index-CCpnBLTA.js} +1 -1
- package/dist/client/assets/{index-CuBsNEmt.js → index-CXcoN6fv.js} +1 -1
- package/dist/client/assets/{index-ARqO3o86.js → index-CcDcBNLg.js} +1 -1
- package/dist/client/assets/{index-_gbx2FvJ.js → index-CfB7uV8T.js} +1 -1
- package/dist/client/assets/{index-C148Q6lk.js → index-DDMwhF4p.js} +19 -19
- package/dist/client/assets/{index-Bz4_i_zW.js → index-DdlkV8jH.js} +1 -1
- package/dist/client/assets/index-Dq9aFrU7.js +5 -0
- package/dist/client/assets/{index-DYzZwlXV.js → index-MoGHGtG3.js} +1 -1
- package/dist/client/assets/{index-CKcGQLuN.js → index-TEoPG_xF.js} +3 -3
- package/dist/client/assets/index-dHzCl0SD.js +1 -0
- package/dist/client/assets/{index-redirect-JxxNxEsk.js → index-redirect-Dw5ZHcG5.js} +1 -1
- package/dist/client/assets/{index-BkNLMFdl.js → index-w_gUXlZB.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BC6gYV2t.js → infiniteQueryObserver-CJ5p49lP.js} +1 -1
- package/dist/client/assets/{infra-billing-B8jz0gJB.js → infra-billing-DzUVLa9p.js} +1 -1
- package/dist/client/assets/{input-BBdtaVaD.js → input-Bwjhgz40.js} +3 -3
- package/dist/client/assets/{input-Cba6Anet.js → input-DByUKMMK.js} +1 -1
- package/dist/client/assets/{input-BYKeCSXe.js → input-eTKbvNZz.js} +1 -1
- package/dist/client/assets/{integration-icon-aN6hkmsM.js → integration-icon-zyUczR_u.js} +1 -1
- package/dist/client/assets/{label-BRs8QTPW.js → label-C-T1eS6J.js} +1 -1
- package/dist/client/assets/{last-preview-page-imCj07NP.js → last-preview-page-CMEEXhSp.js} +1 -1
- package/dist/client/assets/{layout-Cf4FzoeU.js → layout-BHcUl3VL.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DsdWvm-T.js → legacy-agents-deep-CcuAWgCq.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DjhIi53G.js → legacy-main-redirect-Dc4dwfjW.js} +1 -1
- package/dist/client/assets/library-ChJFCyKu.js +1 -0
- package/dist/client/assets/{library-tab-CftE_h2q.js → library-tab-DEFxWXF-.js} +1 -1
- package/dist/client/assets/{login-Ci9Hcnp7.js → login-Yo0oz80D.js} +1 -1
- package/dist/client/assets/{markdown-BOzTX5yl.js → markdown-TyEv0NYc.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Bebpj2gS.js → mcp-app-renderer-BVvnriYN.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CDzAEya8.js → mcp-oauth-DfYPCFNO.js} +1 -1
- package/dist/client/assets/{members-CCUzj6s2.js → members-D-zmvBcH.js} +1 -1
- package/dist/client/assets/{message-templates-Cj8O8Twv.js → message-templates-DDSHBM61.js} +1 -1
- package/dist/client/assets/{mini-report-page-DtzsdAYu.js → mini-report-page-BpQis9_u.js} +1 -1
- package/dist/client/assets/{mock-board-NwIgAQef.js → mock-board-BFNKTSK0.js} +1 -1
- package/dist/client/assets/{monaco-editor-DuP5XMgv.js → monaco-editor-wtpXDYYn.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-ctll0Y-w.js → monitoring-stats-row-DrWKfMD3.js} +1 -1
- package/dist/client/assets/{multi-select-CV1gqTmd.js → multi-select-CnSDCQuL.js} +1 -1
- package/dist/client/assets/{mustache-CsZW8jDK.js → mustache-ByIPD-nA.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BbhMbmfB.js → new-project-dialog-C5yDBDMx.js} +1 -1
- package/dist/client/assets/{oauth-callback-37dheFfD.js → oauth-callback-DCD2tfNQ.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CI0rjr7U.js → oauth-callback-ai-provider-B-acjwSO.js} +1 -1
- package/dist/client/assets/{onboarding-ivea-Qw8.js → onboarding-CVAxJadd.js} +1 -1
- package/dist/client/assets/{openai-conversation-ODLoLHtg.js → openai-conversation-DkewqNIs.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-B3mu9osz.js → optimistic-project-sidebar-views-ZTOrpdg5.js} +1 -1
- package/dist/client/assets/{org-file-open-context-21ef7Mkk.js → org-file-open-context-BHYqBnHw.js} +1 -1
- package/dist/client/assets/{organization-choice-NK7eR6e8.js → organization-choice-CUVQJDxC.js} +1 -1
- package/dist/client/assets/{orgs-DBltjt6i.js → orgs-DQHcKvo3.js} +1 -1
- package/dist/client/assets/{page-seo-form-vHOp0QFQ.js → page-seo-form-BDAt2-On.js} +1 -1
- package/dist/client/assets/{pair-CqFS3Anb.js → pair-CcnGiyFG.js} +1 -1
- package/dist/client/assets/{plan-ladder-Ckyrd9DL.js → plan-ladder-BYdbNlFW.js} +1 -1
- package/dist/client/assets/{popover-B6R6QuHr.js → popover-D6rdo_8c.js} +1 -1
- package/dist/client/assets/{post-calendar-BJ18IcA5.js → post-calendar-Yn93DscO.js} +1 -1
- package/dist/client/assets/{post-editor-C76FN_F3.js → post-editor-DPLMVgB8.js} +1 -1
- package/dist/client/assets/{preview-content-CSD2fQNg.js → preview-content-98ufqmFe.js} +1 -1
- package/dist/client/assets/{preview-dialog-7xZ3kD-1.js → preview-dialog-DmLb99XJ.js} +1 -1
- package/dist/client/assets/{profile-BcfKV_S8.js → profile-BN74SJRo.js} +1 -1
- package/dist/client/assets/{project-app-view-DPR-v7k3.js → project-app-view-B6vN4d6S.js} +1 -1
- package/dist/client/assets/{project-feed-C3SJNvpy.js → project-feed-UldtDpQQ.js} +1 -1
- package/dist/client/assets/{project-icon-Lks8hFIR.js → project-icon-DGJ2Og-0.js} +1 -1
- package/dist/client/assets/project-reports-CJkTPIKs.js +1 -0
- package/dist/client/assets/project-tasks-TKEKoUK5.js +1 -0
- package/dist/client/assets/{projects-D5PeL-5f.js → projects-CoUK4NDR.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Cwa46iyp.js → projects-empty-state-D39dlUwN.js} +1 -1
- package/dist/client/assets/{prompts-CWSgwkJp.js → prompts-DXN6Ivcg.js} +1 -1
- package/dist/client/assets/record-editor-B4EOy63R.js +1 -0
- package/dist/client/assets/{redirect-editor-DREPtBdL.js → redirect-editor-AaUICYPD.js} +1 -1
- package/dist/client/assets/{reports-BoZ_x2sV.js → reports-Dnv_tcK4.js} +1 -1
- package/dist/client/assets/reports-JjzpPdlR.js +1 -0
- package/dist/client/assets/{reports-onboarding-C8z1urXS.js → reports-onboarding-jAhkROIl.js} +1 -1
- package/dist/client/assets/{reports-tab-DnhKYxNI.js → reports-tab-dX03q303.js} +2 -2
- package/dist/client/assets/{repositories-BtkuHcIU.js → repositories-BzKqKddF.js} +1 -1
- package/dist/client/assets/{repository-binding-CYp55Rv4.js → repository-binding-DzWJ2UJM.js} +1 -1
- package/dist/client/assets/{repository-import-picker-j3-O--Ol.js → repository-import-picker-Bv59I2Eu.js} +1 -1
- package/dist/client/assets/{repository-picker-BGkKmc6a.js → repository-picker-DGluhbRv.js} +1 -1
- package/dist/client/assets/{require-capability-B0A0NaZH.js → require-capability-BBlF9FlD.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BSF9DiJB.js → required-auth-layout-DEIqbZyY.js} +1 -1
- package/dist/client/assets/{reset-password-Drib5cGU.js → reset-password-DrwXIP-H.js} +1 -1
- package/dist/client/assets/{resizable-DXaEspCk.js → resizable-C3nSVuvm.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-ogCJsLMq.js → resolve-tab-icon-C3ov5Rmg.js} +1 -1
- package/dist/client/assets/{review-settings-CnY5ZOeh.js → review-settings-DesAsnsb.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-Dqc0Ss8x.js → rich-text-link-control-DYjn6aCW.js} +1 -1
- package/dist/client/assets/{roles-D5LtbY_P.js → roles-DAknCPv7.js} +1 -1
- package/dist/client/assets/{route-sgHag0Rl.js → route--Wfo6oin.js} +1 -1
- package/dist/client/assets/route-0hJDzhXC.js +1 -0
- package/dist/client/assets/{route-DQ5Ryxqx.js → route-ufiJKcWq.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-ocOJgL1y.js → runnable-block-editor-DC1cxOAj.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-C3uXmZzi.js → sandbox-lifecycle-context-DqpHXyQ8.js} +1 -1
- package/dist/client/assets/{schema-DcFgLIUP.js → schema-Rfnmg_Va.js} +1 -1
- package/dist/client/assets/{scroll-area-BOR82hHJ.js → scroll-area-7XZbPxZx.js} +1 -1
- package/dist/client/assets/{search-input-DXSjYVQa.js → search-input-Cx23lHh9.js} +1 -1
- package/dist/client/assets/{search-toggle-c8r02ITM.js → search-toggle-D-GqdL8M.js} +1 -1
- package/dist/client/assets/{secret-picker-DrlMmyfn.js → secret-picker-B9C-ibiZ.js} +1 -1
- package/dist/client/assets/{secrets-Bk4rVNgG.js → secrets-BFZw7lDg.js} +1 -1
- package/dist/client/assets/{sections-editor-BeMlWjLh.js → sections-editor-BZmRuOnF.js} +1 -1
- package/dist/client/assets/{select-B3cH9eR3.js → select-Cm7-2WsF.js} +1 -1
- package/dist/client/assets/{select-model-Cs-yXr95.js → select-model-D3pjihNr.js} +1 -1
- package/dist/client/assets/{seo-editor-DeSJkxX0.js → seo-editor-B-jyaCHB.js} +1 -1
- package/dist/client/assets/{separator-1awD64Cr.js → separator-4YDN-oFo.js} +1 -1
- package/dist/client/assets/{settings-tab-CZNwM2XW.js → settings-tab-ec2eSCVL.js} +1 -1
- package/dist/client/assets/{sheet-DVUy0av8.js → sheet-J0gPDiWd.js} +1 -1
- package/dist/client/assets/{shell-layout-D1Z_cO8F.js → shell-layout-Dnr_uzYF.js} +1 -1
- package/dist/client/assets/{skills-BPtDz4Ot.js → skills-DScaY7fG.js} +1 -1
- package/dist/client/assets/{sso-B2rMSHeI.js → sso-DFl41agF.js} +1 -1
- package/dist/client/assets/{suggestion-gqDyBlLg.js → suggestion-C0k3QqCT.js} +1 -1
- package/dist/client/assets/{switch-D63iwNgo.js → switch-Bq60aCIw.js} +1 -1
- package/dist/client/assets/{synced-repos-C8kQsbB5.js → synced-repos-BInlREuH.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph--xurEh1s.js → tab-icon-glyph-DkUk_qRB.js} +1 -1
- package/dist/client/assets/{table-CcSisicD.js → table-Cx8CjEtt.js} +1 -1
- package/dist/client/assets/{tabs-Dt91Srt0.js → tabs-BK_fP5GX.js} +1 -1
- package/dist/client/assets/{task-board-5yaw30vq.js → task-board-BFfl1D46.js} +1 -1
- package/dist/client/assets/{task-route-ipx_F_Fv.js → task-route-Bu4cJrWx.js} +1 -1
- package/dist/client/assets/{task-status-C4dqLZk_.js → task-status-C9TjzByx.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-Dg5VSZPI.js → taskboard-analytics-CUqMVWBV.js} +1 -1
- package/dist/client/assets/tasks-CYSMbcgO.js +1 -0
- package/dist/client/assets/{tasks-BiJ3W90D.js → tasks-jujyTQPa.js} +1 -1
- package/dist/client/assets/{textarea-D0qmNz5q.js → textarea-CnCfFKhD.js} +1 -1
- package/dist/client/assets/{thread-analytics-BtBELdX5.js → thread-analytics-DsLVbGaY.js} +1 -1
- package/dist/client/assets/{thread-button-hIURaN7H.js → thread-button-CxepnIG6.js} +1 -1
- package/dist/client/assets/{thread-intent-CtMUBLSw.js → thread-intent-C9kuh36t.js} +1 -1
- package/dist/client/assets/{thread-route-DiNksv4r.js → thread-route-C3M3jRBY.js} +1 -1
- package/dist/client/assets/{thread-route-BhQrbWYw.js → thread-route-C7AnvqYr.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-D4aPK_to.js → thread-sheet-body-h0OpwJ8W.js} +1 -1
- package/dist/client/assets/{toggle-group-CD8BAJJ1.js → toggle-group-p3YhZBU7.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D6DPXBZS.js → toolbar-icon-button-PPGgz1s-.js} +1 -1
- package/dist/client/assets/{tooltip-DspO8Y7M.js → tooltip-D1uOyILL.js} +1 -1
- package/dist/client/assets/{track-DFdkVfIT.js → track-BauEW8uP.js} +1 -1
- package/dist/client/assets/{types--SbVHs7E.js → types-CajZUOS1.js} +1 -1
- package/dist/client/assets/{usage-stats-DyLXbYDE.js → usage-stats-DndHGCep.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BrrQLRbB.js → use-ai-providers-fzwJF938.js} +1 -1
- package/dist/client/assets/{use-automations-H4jOPDCD.js → use-automations-C11dqaOx.js} +1 -1
- package/dist/client/assets/{use-autosave-8-ddQDE7.js → use-autosave-B_cEt1uS.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-Bna-ZKzL.js → use-chat-layout-state-7Ig_JdOB.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BZa5ebWy.js → use-connect-companion-DkLVJkUS.js} +1 -1
- package/dist/client/assets/{use-connection-ClCJom_T.js → use-connection-Dwv6oHsW.js} +1 -1
- package/dist/client/assets/{use-copy-QiHfir1I.js → use-copy-BQBzs990.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CDYzrI9u.js → use-create-virtual-mcp-DMneE24Y.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BwueOdjN.js → use-date-fns-locale-BF1mSvUK.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CS65oOrv.js → use-debounced-autosave-ByCOPpJl.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BI7BwIrU.js → use-debounced-value-CH4y_C86.js} +1 -1
- package/dist/client/assets/{use-deco-credits-rMy8HhID.js → use-deco-credits-DfQPfB_s.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BZ_ECs5u.js → use-decopilot-events-DPAyjg7V.js} +1 -1
- package/dist/client/assets/{use-delete-connection-dmI79OW4.js → use-delete-connection-DQIa7_24.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Bej48hit.js → use-deployment-admin-CZWREfNG.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BH5Y_h5I.js → use-fast-preview-draft-url-CzmpSdfG.js} +1 -1
- package/dist/client/assets/{use-file-configs-i7BM7Uai.js → use-file-configs-HV0eV5oN.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CMyz2E0C.js → use-infinite-scroll-DDhIk3H7.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bvx1wYbj.js → use-join-requests-BQSkOS_S.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CqEesnwp.js → use-main-panel-tabs-CGDbxv6C.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-B0zVh8do.js → use-mcp-auth-status-DsJAhKAI.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DHLbRrrB.js → use-mcp-client-xmMYYBPZ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CyB-rTIF.js → use-mcp-prompts-DPkKxsp-.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CdN2fCPH.js → use-mcp-tools-rRIvhYM8.js} +1 -1
- package/dist/client/assets/{use-members-Bko69eut.js → use-members-PzBtBJpI.js} +1 -1
- package/dist/client/assets/{use-mobile-DdA6rYz1.js → use-mobile-3IkoLh1U.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BzSsFQlh.js → use-navigate-to-agent-bOkMjgb4.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-BN50qZ8G.js +1 -0
- package/dist/client/assets/{use-open-billing-url-Rh44L_dC.js → use-open-billing-url-CGP1bKOW.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DUv3PaJc.js → use-org-auth-client-DvhI3uND.js} +1 -1
- package/dist/client/assets/{use-org-fs-DRJwzoS4.js → use-org-fs-BzaeparN.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CGmG43Tn.js → use-org-repo-syncs-C31wWX78.js} +1 -1
- package/dist/client/assets/{use-org-sso-Csl4VgcL.js → use-org-sso-Digx4keO.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CuVLspc7.js → use-organization-roles-5PbsFkhQ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Vz4NQqVZ.js → use-organization-settings-Ba5qIUFc.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BYj-wdDF.js → use-panel-navigate-BAXybbqr.js} +1 -1
- package/dist/client/assets/{use-project-scope-B6uTwokE.js → use-project-scope-CruROdaO.js} +1 -1
- package/dist/client/assets/{use-releases-Bt5ih6xF.js → use-releases-X1G95Uob.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BMsEGk4D.js → use-reports-diagnostic-_7dZvFHt.js} +1 -1
- package/dist/client/assets/{use-secrets-CxcwkxZt.js → use-secrets-B67HXR12.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-KrzSb9op.js → use-section-preview-base-CgHQlaST.js} +1 -1
- package/dist/client/assets/{use-session-runtime-1lVMpoXa.js → use-session-runtime-D0piPujV.js} +1 -1
- package/dist/client/assets/{use-tags-BDPAhcTB.js → use-tags-DnY1YcOc.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-m7l6rU9D.js → use-task-board-analytics-GV1BV282.js} +1 -1
- package/dist/client/assets/{use-task-board-events-D4EnRTJz.js → use-task-board-events-3yXHnrTg.js} +1 -1
- package/dist/client/assets/{use-task-metadata-aM1hSN88.js → use-task-metadata-BgGwUcnR.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CxuNhFcO.js → use-thread-analytics-l2MVf4gO.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-uqxgVuYf.js → use-thread-outputs-B-2LR7iv.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DalkWWtI.js +1 -0
- package/dist/client/assets/{useQueries-8HSoxBPA.js → useQueries-BXidqXZS.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CmIWBkvA.js +1 -0
- package/dist/client/assets/{users-BKO3508u.js → users-Axt4tfre.js} +1 -1
- package/dist/client/assets/{utils-DVXv6uoE.js → utils-DLRFnj_1.js} +1 -1
- package/dist/client/assets/{variant-calendar-Cd-nNUjm.js → variant-calendar-YnefvkFK.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-wsqIpvQU.js → variant-matcher-override-Bq5p7Tw_.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D79q8o8A.js → view-mode-toggle-D0juwS_t.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DnK1D-Uo.js → virtual-mcp-CIzV1BgR.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Wm49usWi.js +0 -1
- package/dist/client/assets/agent-deck-Q8NmuGsO.js +0 -1
- package/dist/client/assets/agent-library-BpszGfz_.js +0 -1
- package/dist/client/assets/agent-library-file-BaIFRCqY.js +0 -1
- package/dist/client/assets/agent-settings-CjoLANXP.js +0 -1
- package/dist/client/assets/agent-site-editor-code-B1CYioY6.js +0 -2
- package/dist/client/assets/agent-view-DXEomSHn.js +0 -1
- package/dist/client/assets/api-keys-DzVFs3I1.js +0 -1
- package/dist/client/assets/flat-project-By1ZV4XO.js +0 -1
- package/dist/client/assets/index-BaGKC4Yj.js +0 -1
- package/dist/client/assets/index-CHMdm5XN.js +0 -5
- package/dist/client/assets/library-fUIMO_1i.js +0 -1
- package/dist/client/assets/project-reports-BHe3QmTs.js +0 -1
- package/dist/client/assets/project-tasks-DLJCTLZn.js +0 -1
- package/dist/client/assets/record-editor-t6O1cxYq.js +0 -1
- package/dist/client/assets/reports-CFRqJ9I9.js +0 -1
- package/dist/client/assets/route-DX68dI1-.js +0 -1
- package/dist/client/assets/tasks-DP99wRTP.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-Tc7tq7hu.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DF2IN6sw.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ClJd84uF.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as fo,r as F,b as cc,as as Hf,j as R,h as Vf,B as cl,av as ul,au as jf,at as Wf,en as uc,eo as Kf,aR as Uf,ep as Kt,eq as _f,l as dc}from"./index-C148Q6lk.js";import{d as qf,g as Jf}from"./gateway-client-B-LidRp4.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-DVzrCXE5.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-Cbo9tpUX.js";import{I as oh}from"./input-Cba6Anet.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-21ef7Mkk.js";import{T as ah,a as ch,b as uh}from"./tooltip-DspO8Y7M.js";function dh(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?ul().min(1,e):ul();return jf(n)}function fh(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function yx(t){const e=fo.c(74),{prompt:n,setPrompt:r,onSubmit:i,defaultValues:s}=t,o=F.useId(),l=cc();let a,c;if(e[0]!==n||e[1]!==l){const ie=dh(n,l("chat.dialogPromptArguments.required"));c=Wf,a=Hf(ie),e[0]=n,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==s||e[5]!==n?(u=n?fh(n,s):{},e[4]=s,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==n?.arguments?(h=n?.arguments??[],e[10]=n?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==i||e[14]!==r?(g=async ie=>{await i(ie),r(null),f.reset()},e[12]=f,e[13]=i,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=ie=>{ie||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!n)return null;let S;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(S=n.title||qf(n.name,Jf(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=S):S=e[22];let C;e[23]!==S?(C=R.jsx(Gf,{children:R.jsx("span",{className:"capitalize",children:S})}),e[23]=S,e[24]=C):C=e[24];let T;e[25]!==n.description?(T=n.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=T):T=e[26];let N;e[27]!==T||e[28]!==C?(N=R.jsxs(Yf,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=N):N=e[29];let v;e[30]!==f||e[31]!==m?(v=ie=>{ie.stopPropagation(),f.handleSubmit(m)(ie)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let O;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let ie;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(ie=Le=>R.jsx(th,{control:f.control,name:Le.name,render:En=>{const{field:We}=En;return R.jsxs(nh,{children:[R.jsxs(rh,{className:"text-xs",children:[Le.name,Le.required?null:R.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),R.jsx(ih,{children:R.jsx(oh,{...We,value:We.value??"",required:Le.required,placeholder:Le.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),R.jsx(sh,{})]})}},Le.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=ie):ie=e[41],O=p.map(ie),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=O}else O=e[37];let P;e[42]!==b?(P=()=>b(!1),e[42]=b,e[43]=P):P=e[43];const _=f.formState.isSubmitting;let ne;e[44]!==l?(ne=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=ne):ne=e[45];let ce;e[46]!==f.formState.isSubmitting||e[47]!==P||e[48]!==ne?(ce=R.jsx(cl,{type:"button",variant:"ghost",onClick:P,disabled:_,children:ne}),e[46]=f.formState.isSubmitting,e[47]=P,e[48]=ne,e[49]=ce):ce=e[49];let H;e[50]!==f.formState.isSubmitting||e[51]!==l?(H=f.formState.isSubmitting?R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Vf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=H):H=e[52];let J;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==H?(J=R.jsx(cl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:H}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=H,e[56]=J):J=e[56];let V;e[57]!==ce||e[58]!==J?(V=R.jsxs(Xf,{children:[ce,J]}),e[57]=ce,e[58]=J,e[59]=V):V=e[59];let re;e[60]!==o||e[61]!==v||e[62]!==O||e[63]!==V?(re=R.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[O,V]}),e[60]=o,e[61]=v,e[62]=O,e[63]=V,e[64]=re):re=e[64];let Se;e[65]!==f||e[66]!==re?(Se=R.jsx(eh,{...f,children:re}),e[65]=f,e[66]=re,e[67]=Se):Se=e[67];let Pe;e[68]!==N||e[69]!==Se?(Pe=R.jsxs(Qf,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[N,Se]}),e[68]=N,e[69]=Se,e[70]=Pe):Pe=e[70];let ot;return e[71]!==b||e[72]!==Pe?(ot=R.jsx(Zf,{open:!0,onOpenChange:b,children:Pe}),e[71]=b,e[72]=Pe,e[73]=ot):ot=e[73],ot}var fl=Object.defineProperty,hh=(t,e)=>{let n={};for(var r in t)fl(n,r,{get:t[r],enumerable:!0});return fl(n,Symbol.toStringTag,{value:"Module"}),n};function se(t){this.content=t}se.prototype={constructor:se,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new se(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new se(n)},addToStart:function(t,e){return new se([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new se(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new se(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=se.from(t),t.size?new se(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=se.from(t),t.size?new se(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=se.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};se.from=function(t){if(t instanceof se)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new se(e)};function fc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)n++;return a&&a<o.length&&a<l.length&&mc(o.charCodeAt(a-1))&&pc(o.charCodeAt(a))&&n--,n}if(i.content.size||s.content.size){let o=fc(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function hc(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,r--;return d&&f&&d<c.length&&mc(c.charCodeAt(d-1))&&pc(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(o.content.size||l.content.size){let c=hc(o.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}function pc(t){return t>=56320&&t<57344}function mc(t){return t>=55296&&t<56320}class k{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,n){return e==n?k.empty:e==0&&n==this.content.length?this:new k(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return fc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hc(this,e,n,r)}findIndex(e){if(e==0)return xr(0,e);if(e==this.size)return xr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?xr(n+1,s):xr(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return k.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new k(n||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Ji={index:0,offset:0};function xr(t,e){return Ji.index=t,Ji.offset=e,Ji}function Hr(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hr(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hr(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $=class Es{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Es.none;if(e instanceof Es)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$.none=[];class Qn extends Error{}class M{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,n){return new M(gc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return M.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new M(e,r,i)}}M.empty=new M(k.empty,0,0);function gc(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(gc(s.content,e-i-1,n-i-1)))}function yc(t,e,n,r,i,s){let{index:o,offset:l}=t.findIndex(e),a=t.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=yc(a.content,e-l-1,n,o==0?r-1:0,o==t.childCount-1?i-1:0,a);return c&&t.replaceChild(o,a.copy(c))}function ph(t,e,n){if(n.openStart>t.depth)throw new Qn("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Qn("Inconsistent open depths");return bc(t,e,n,0)}function bc(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=bc(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return zt(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=mh(n,t);return zt(s,Sc(t,o,l,e,r))}else return zt(s,Vr(t,e,r))}function kc(t,e){if(!e.type.compatibleContent(t.type))throw new Qn("Cannot join "+e.type.name+" onto "+t.type.name)}function Ts(t,e,n){let r=t.node(n);return kc(r,e.node(n)),r}function $t(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zn(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($t(t.nodeAfter,r),s++));for(let l=s;l<o;l++)$t(i.child(l),r);e&&e.depth==n&&e.textOffset&&$t(e.nodeBefore,r)}function zt(t,e){if(!t.type.validContent(e))throw new Qn("Invalid content for node "+t.type.name);return t.copy(e)}function Sc(t,e,n,r,i){let s=t.depth>i&&Ts(t,e,i+1),o=r.depth>i&&Ts(n,r,i+1),l=[];return zn(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(kc(s,o),$t(zt(s,Sc(t,e,n,r,i+1)),l)):(s&&$t(zt(s,Vr(t,e,i+1)),l),zn(e,n,i,l),o&&$t(zt(o,Vr(n,r,i+1)),l)),zn(r,null,i,l),new k(l)}function Vr(t,e,n){let r=[];if(zn(null,t,n,r),t.depth>n){let i=Ts(t,e,n+1);$t(zt(i,Vr(t,e,n+1)),r)}return zn(e,null,n,r),new k(r)}function mh(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Zn{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Zn(n,r,s)}static resolveCached(e,n){let r=hl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else hl.set(e,r=new gh);let i=r.elts[r.i]=Zn.resolve(e,n);return r.i=(r.i+1)%yh,i}}class gh{constructor(){this.elts=[],this.i=0}}const yh=12,hl=new WeakMap;class jr{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const bh=Object.create(null);let Bt=class ws{constructor(e,n,r,i=$.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hr(this.attrs,n||e.defaultAttrs||bh)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new ws(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ws(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new M(c,i.depth-o,s.depth-o)}replace(e,n,r){return ph(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Zn.resolveCached(this,e)}resolveNoCache(e){return Zn.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),xc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=k.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Bt.prototype.text=void 0;class Wr extends Bt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):xc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Wr(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new kh(e,n);if(r.next==null)return Ut.empty;let i=Cc(r);r.next&&r.err("Unexpected trailing text");let s=wh(Th(i));return vh(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
|
|
1
|
+
import{c as fo,r as F,b as cc,as as Hf,j as R,h as Vf,B as cl,av as ul,au as jf,at as Wf,en as uc,eo as Kf,aR as Uf,ep as Kt,eq as _f,l as dc}from"./index-DDMwhF4p.js";import{d as qf,g as Jf}from"./gateway-client-DqxL5ILU.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-BDu7Odbi.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-C73wwUY1.js";import{I as oh}from"./input-DByUKMMK.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-BHYqBnHw.js";import{T as ah,a as ch,b as uh}from"./tooltip-D1uOyILL.js";function dh(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?ul().min(1,e):ul();return jf(n)}function fh(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function yx(t){const e=fo.c(74),{prompt:n,setPrompt:r,onSubmit:i,defaultValues:s}=t,o=F.useId(),l=cc();let a,c;if(e[0]!==n||e[1]!==l){const ie=dh(n,l("chat.dialogPromptArguments.required"));c=Wf,a=Hf(ie),e[0]=n,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==s||e[5]!==n?(u=n?fh(n,s):{},e[4]=s,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==n?.arguments?(h=n?.arguments??[],e[10]=n?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==i||e[14]!==r?(g=async ie=>{await i(ie),r(null),f.reset()},e[12]=f,e[13]=i,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=ie=>{ie||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!n)return null;let S;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(S=n.title||qf(n.name,Jf(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=S):S=e[22];let C;e[23]!==S?(C=R.jsx(Gf,{children:R.jsx("span",{className:"capitalize",children:S})}),e[23]=S,e[24]=C):C=e[24];let T;e[25]!==n.description?(T=n.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=T):T=e[26];let N;e[27]!==T||e[28]!==C?(N=R.jsxs(Yf,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=N):N=e[29];let v;e[30]!==f||e[31]!==m?(v=ie=>{ie.stopPropagation(),f.handleSubmit(m)(ie)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let O;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let ie;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(ie=Le=>R.jsx(th,{control:f.control,name:Le.name,render:En=>{const{field:We}=En;return R.jsxs(nh,{children:[R.jsxs(rh,{className:"text-xs",children:[Le.name,Le.required?null:R.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),R.jsx(ih,{children:R.jsx(oh,{...We,value:We.value??"",required:Le.required,placeholder:Le.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),R.jsx(sh,{})]})}},Le.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=ie):ie=e[41],O=p.map(ie),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=O}else O=e[37];let P;e[42]!==b?(P=()=>b(!1),e[42]=b,e[43]=P):P=e[43];const _=f.formState.isSubmitting;let ne;e[44]!==l?(ne=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=ne):ne=e[45];let ce;e[46]!==f.formState.isSubmitting||e[47]!==P||e[48]!==ne?(ce=R.jsx(cl,{type:"button",variant:"ghost",onClick:P,disabled:_,children:ne}),e[46]=f.formState.isSubmitting,e[47]=P,e[48]=ne,e[49]=ce):ce=e[49];let H;e[50]!==f.formState.isSubmitting||e[51]!==l?(H=f.formState.isSubmitting?R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Vf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=H):H=e[52];let J;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==H?(J=R.jsx(cl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:H}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=H,e[56]=J):J=e[56];let V;e[57]!==ce||e[58]!==J?(V=R.jsxs(Xf,{children:[ce,J]}),e[57]=ce,e[58]=J,e[59]=V):V=e[59];let re;e[60]!==o||e[61]!==v||e[62]!==O||e[63]!==V?(re=R.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[O,V]}),e[60]=o,e[61]=v,e[62]=O,e[63]=V,e[64]=re):re=e[64];let Se;e[65]!==f||e[66]!==re?(Se=R.jsx(eh,{...f,children:re}),e[65]=f,e[66]=re,e[67]=Se):Se=e[67];let Pe;e[68]!==N||e[69]!==Se?(Pe=R.jsxs(Qf,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[N,Se]}),e[68]=N,e[69]=Se,e[70]=Pe):Pe=e[70];let ot;return e[71]!==b||e[72]!==Pe?(ot=R.jsx(Zf,{open:!0,onOpenChange:b,children:Pe}),e[71]=b,e[72]=Pe,e[73]=ot):ot=e[73],ot}var fl=Object.defineProperty,hh=(t,e)=>{let n={};for(var r in t)fl(n,r,{get:t[r],enumerable:!0});return fl(n,Symbol.toStringTag,{value:"Module"}),n};function se(t){this.content=t}se.prototype={constructor:se,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new se(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new se(n)},addToStart:function(t,e){return new se([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new se(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new se(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=se.from(t),t.size?new se(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=se.from(t),t.size?new se(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=se.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};se.from=function(t){if(t instanceof se)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new se(e)};function fc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)n++;return a&&a<o.length&&a<l.length&&mc(o.charCodeAt(a-1))&&pc(o.charCodeAt(a))&&n--,n}if(i.content.size||s.content.size){let o=fc(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function hc(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,r--;return d&&f&&d<c.length&&mc(c.charCodeAt(d-1))&&pc(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(o.content.size||l.content.size){let c=hc(o.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}function pc(t){return t>=56320&&t<57344}function mc(t){return t>=55296&&t<56320}class k{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,n){return e==n?k.empty:e==0&&n==this.content.length?this:new k(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return fc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hc(this,e,n,r)}findIndex(e){if(e==0)return xr(0,e);if(e==this.size)return xr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?xr(n+1,s):xr(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return k.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new k(n||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Ji={index:0,offset:0};function xr(t,e){return Ji.index=t,Ji.offset=e,Ji}function Hr(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hr(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hr(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $=class Es{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Es.none;if(e instanceof Es)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$.none=[];class Qn extends Error{}class M{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,n){return new M(gc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return M.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new M(e,r,i)}}M.empty=new M(k.empty,0,0);function gc(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(gc(s.content,e-i-1,n-i-1)))}function yc(t,e,n,r,i,s){let{index:o,offset:l}=t.findIndex(e),a=t.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=yc(a.content,e-l-1,n,o==0?r-1:0,o==t.childCount-1?i-1:0,a);return c&&t.replaceChild(o,a.copy(c))}function ph(t,e,n){if(n.openStart>t.depth)throw new Qn("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Qn("Inconsistent open depths");return bc(t,e,n,0)}function bc(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=bc(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return zt(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=mh(n,t);return zt(s,Sc(t,o,l,e,r))}else return zt(s,Vr(t,e,r))}function kc(t,e){if(!e.type.compatibleContent(t.type))throw new Qn("Cannot join "+e.type.name+" onto "+t.type.name)}function Ts(t,e,n){let r=t.node(n);return kc(r,e.node(n)),r}function $t(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zn(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($t(t.nodeAfter,r),s++));for(let l=s;l<o;l++)$t(i.child(l),r);e&&e.depth==n&&e.textOffset&&$t(e.nodeBefore,r)}function zt(t,e){if(!t.type.validContent(e))throw new Qn("Invalid content for node "+t.type.name);return t.copy(e)}function Sc(t,e,n,r,i){let s=t.depth>i&&Ts(t,e,i+1),o=r.depth>i&&Ts(n,r,i+1),l=[];return zn(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(kc(s,o),$t(zt(s,Sc(t,e,n,r,i+1)),l)):(s&&$t(zt(s,Vr(t,e,i+1)),l),zn(e,n,i,l),o&&$t(zt(o,Vr(n,r,i+1)),l)),zn(r,null,i,l),new k(l)}function Vr(t,e,n){let r=[];if(zn(null,t,n,r),t.depth>n){let i=Ts(t,e,n+1);$t(zt(i,Vr(t,e,n+1)),r)}return zn(e,null,n,r),new k(r)}function mh(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Zn{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Zn(n,r,s)}static resolveCached(e,n){let r=hl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else hl.set(e,r=new gh);let i=r.elts[r.i]=Zn.resolve(e,n);return r.i=(r.i+1)%yh,i}}class gh{constructor(){this.elts=[],this.i=0}}const yh=12,hl=new WeakMap;class jr{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const bh=Object.create(null);let Bt=class ws{constructor(e,n,r,i=$.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hr(this.attrs,n||e.defaultAttrs||bh)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new ws(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ws(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new M(c,i.depth-o,s.depth-o)}replace(e,n,r){return ph(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Zn.resolveCached(this,e)}resolveNoCache(e){return Zn.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),xc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=k.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Bt.prototype.text=void 0;class Wr extends Bt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):xc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Wr(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new kh(e,n);if(r.next==null)return Ut.empty;let i=Cc(r);r.next&&r.err("Unexpected trailing text");let s=wh(Th(i));return vh(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
|
|
2
2
|
`)}}Ut.empty=new Ut(!0);class kh{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Cc(t){let e=[];do e.push(Sh(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Sh(t){let e=[];do e.push(xh(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function xh(t){let e=Eh(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Ch(t,e);else break;return e}function pl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Ch(t,e){let n=pl(t),r=n;return t.eat(",")&&(t.next!="}"?r=pl(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Mh(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function Eh(t){if(t.eat("(")){let e=Cc(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Mh(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Th(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=n())}else if(o.type=="star"){let a=n();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=n();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=n();i(s(o.expr,a),u),a=u}if(o.max==-1)i(s(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=n();r(a,u),i(s(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Mc(t,e){return e-t}function ml(t,e){let n=[];return r(e),n.sort(Mc);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:l,to:a}=s[o];!l&&n.indexOf(a)==-1&&r(a)}}}function wh(t){let e=Object.create(null);return n(ml(t,0));function n(r){let i=[];r.forEach(o=>{t[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<i.length;u++)i[u][0]==l&&(c=i[u][1]);ml(t,a).forEach(u=>{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new Ut(r.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let l=i[o][1].sort(Mc);s.next.push({type:i[o][0],next:e[l.join(",")]||n(l)})}return s}}function vh(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let l=0;l<i.next.length;l++){let{type:a,next:c}=i.next[l];o.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Ec(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Tc(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function wc(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let i in t)t[i].validate&&t[i].validate(e[i])}function vc(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Nh(t,r,e[r]);return n}let gl=class Ac{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=vc(e,r.attrs),this.defaultAttrs=Ec(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ut.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Tc(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Bt(this,this.computeAttrs(e),k.from(n),$.setFrom(r))}createChecked(e=null,n,r){return n=k.from(n),this.checkContent(n),new Bt(this,this.computeAttrs(e),n,$.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=k.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(k.empty,!0);return s?new Bt(this,e,n.append(s),$.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){wc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:$.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,o)=>r[s]=new Ac(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ah(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class Nh{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ah(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ri{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=vc(e,i.attrs),this.excluded=null;let s=Ec(this.attrs);this.instance=s?new $(this,s):null}create(e=null){return!e&&this.instance?this.instance:new $(this,Tc(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Ri(s,i++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){wc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Nc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=se.from(e.nodes),n.marks=se.from(e.marks||{}),this.nodes=gl.compile(this.spec.nodes,this),this.marks=Ri.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Ut.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?yl(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:yl(this,o.split(" "))}this.nodeFromJSON=i=>Bt.fromJSON(this,i),this.markFromJSON=i=>$.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof gl){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new Wr(r,r.defaultAttrs,e,$.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function yl(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let l in t.marks){let a=t.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Oh(t){return t.tag!=null}function Dh(t){return t.style!=null}class He{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(Oh(i))this.tags.push(i);else if(Dh(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new kl(this,n,!1);return r.addAll(e,$.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new kl(this,n,!0);return r.addAll(e,$.none,n.from,n.to),M.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(Ph(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(o.getAttrs){let a=o.getAttrs(n);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let l=n[o];if((l.priority==null?50:l.priority)<s)break}n.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Sl(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Sl(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new He(e,He.schemaRules(e)))}}const Oc={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Rh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dc={ol:!0,ul:!0},er=1,vs=2,Bn=4;function bl(t,e,n){return e!=null?(e?er:0)|(e==="full"?vs:0):t&&t.whitespace=="pre"?er|vs:n&~Bn}class Cr{constructor(e,n,r,i,s,o){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=$.none,this.match=s||(o&Bn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(k.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&er)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=k.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Oc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class kl{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,o=bl(null,n.preserveWhitespace,0)|(r?Bn:0);i?s=new Cr(i.type,i.attrs,$.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new Cr(null,null,$.none,!0,null,o):s=new Cr(e.schema.topNodeType,null,$.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,s=i.options&vs?"full":this.localPreserveWS||(i.options&er)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(o.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=i.content[i.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Dc.hasOwnProperty(o)&&this.parser.normalizeLists&&Ih(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Rh.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Oc.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=a&&a.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(s),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],o=r.getPropertyValue(s);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(s,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(c=>!a.clearMark(c)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,i){let s,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,n.attrs||null,r,n.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,n);this.findAtPoint(e,s)}findPlace(e,n,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)n=this.enterInner(i[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=$.none;for(let l of i.concat(e.marks))(s.type?s.type.allowsMarkType(l.type):xl(l.type,e.type))&&(o=l.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=bl(e,s,o.options);o.options&Bn&&o.content.length==0&&(l|=Bn);let a=$.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):xl(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Cr(e,n,a,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=er)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Ih(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Dc.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Ph(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Sl(t){let e={};for(let n in t)e[n]=t[n];return e}function xl(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||s.indexOf(u)<0&&o(u))return!0}};if(o(i.contentMatch))return!0}}class nt{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Mr(n).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let l=0,a=0;for(;l<s.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)i=s.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,n);u&&(s.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){if(e.isText)return Mr(n).createTextNode(e.text);let{dom:r,contentDOM:i}=Lr(Mr(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Lr(Mr(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return typeof n=="string"?{dom:e.createTextNode(n)}:Lr(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new nt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Cl(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Cl(e.marks)}}function Cl(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Mr(t){return t.document||window.document}const Ml=new WeakMap;function Lh(t){let e=Ml.get(t);return e===void 0&&Ml.set(t,e=$h(t)),e}function $h(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Lr(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=Lh(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let l,a=n?t.createElementNS(n,i):t.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(t.createTextNode(f));else{let{dom:h,contentDOM:p}=Lr(t,f,n,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Rc=65535,Ic=Math.pow(2,16);function zh(t,e){return t+e*Ic}function El(t){return t&Rc}function Bh(t){return(t-(t&Rc))/Ic}const Pc=1,Lc=2,$r=4,$c=8;class As{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$c)>0}get deletedBefore(){return(this.delInfo&(Pc|$r))>0}get deletedAfter(){return(this.delInfo&(Lc|$r))>0}get deletedAcross(){return(this.delInfo&$r)>0}}class xe{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&xe.empty)return xe.empty}recover(e){let n=0,r=El(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Bh(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>e)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:n:n,h=a+i+(f<0?0:u);if(r)return h;let p=e==(n<0?a:d)?null:zh(l/3,e-a),g=e==a?Lc:e==d?Pc:$r;return(n<0?e!=a:e!=d)&&(g|=$c),new As(h,g,p)}i+=u-c}return r?e+i:new As(e+i,0,null)}touches(e,n){let r=0,i=El(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],l=o-(this.inverted?s:0),a=o+(this.inverted?0:s),c=this.ranges[i+n],u=this.ranges[i+r];e(l,l+c,a,a+u),s+=u-c}}invert(){return new xe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?xe.empty:new xe(e<0?[0,-e,0]:[0,0,e])}}xe.empty=new xe([]);class tr{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new tr(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new tr;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],l=o.mapResult(e,n);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this._maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new As(e,i,null)}}const Gi=Object.create(null);class fe{getMap(){return xe.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Gi[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Gi)throw new RangeError("Duplicate use of step JSON ID "+e);return Gi[e]=n,n.prototype.jsonID=e,n}}class G{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new G(e,null)}static fail(e){return new G(null,e)}static fromReplace(e,n,r,i){try{return G.ok(e.replace(n,r,i))}catch(s){if(s instanceof Qn)return G.fail(s.message);throw s}}}function ho(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(ho(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return k.fromArray(r)}class mt extends fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new M(ho(n.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return G.fromReplace(e,this.from,this.to,s)}invert(){return new De(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mt(n.pos,r.pos,this.mark)}merge(e){return e instanceof mt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new mt(n.from,n.to,e.markFromJSON(n.mark))}}fe.jsonID("addMark",mt);class De extends fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new M(ho(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return G.fromReplace(e,this.from,this.to,r)}invert(){return new mt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new De(n.pos,r.pos,this.mark)}merge(e){return e instanceof De&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new De(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new De(n.from,n.to,e.markFromJSON(n.mark))}}fe.jsonID("removeMark",De);class gt extends fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return G.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new gt(this.pos,n.marks[i]);return new gt(this.pos,this.mark)}}return new _t(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new gt(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new gt(n.pos,e.markFromJSON(n.mark))}}fe.jsonID("addNodeMark",gt);class _t extends fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return G.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new gt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new _t(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new _t(n.pos,e.markFromJSON(n.mark))}}fe.jsonID("removeNodeMark",_t);class q extends fe{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Ns(e,this.from,this.to)?G.fail("Structure replace would overwrite content"):G.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new xe([this.from,this.to-this.from,this.slice.size])}invert(e){return new q(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&q.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new q(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof q)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new q(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new q(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new q(n.from,n.to,M.fromJSON(e,n.slice),!!n.structure)}}q.MAP_BIAS=1;fe.jsonID("replace",q);class ee extends fe{constructor(e,n,r,i,s,o,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=l}apply(e){if(this.structure&&(Ns(e,this.from,this.gapFrom)||Ns(e,this.gapTo,this.to)))return G.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return G.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?G.fromReplace(e,this.from,this.to,r):G.fail("Content does not fit in gap")}getMap(){return new xe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new ee(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new ee(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ee(n.from,n.to,n.gapFrom,n.gapTo,M.fromJSON(e,n.slice),n.insert,!!n.structure)}}fe.jsonID("replaceAround",ee);function Ns(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Fh(t,e,n,r){let i=[],s=[],o,l;t.doc.nodesBetween(e,n,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,n),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:i.push(o=new De(f,h,d[g])));l&&l.to==f?l.to=h:s.push(l=new mt(f,h,r))}}),i.forEach(a=>t.step(a)),s.forEach(a=>t.step(a))}function Hh(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Ri){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,n);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=c,f.step=s):i.push({style:d,from:Math.max(l,e),to:c,step:s})}}}),i.forEach(o=>t.step(new De(o.from,o.to,o.style)))}function po(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<s.childCount;a++){let c=s.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new q(l,u,M.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new De(l,u,c.marks[f]));if(i&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new M(k.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new q(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);t.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)t.step(o[a])}function Vh(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Mn(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,s=0;;--r){let o=t.$from.node(r),l=t.$from.index(r)+i,a=t.$to.indexAfter(r)-s;if(r<t.depth&&o.canReplace(l,a,n))return r;if(r==0||o.type.spec.isolating||!Vh(o,l,a))break;l&&(i=1),a<o.childCount&&(s=1)}return null}function jh(t,e,n){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),l=i.after(s+1),a=o,c=l,u=k.empty,d=0;for(let p=s,g=!1;p>n;p--)g||r.index(p)>0?(g=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=s,g=!1;p>n;p--)g||i.after(p+1)<i.end(p)?(g=!0,f=k.from(i.node(p).copy(f)),h++):c++;t.step(new ee(a,c,o,l,new M(u.append(f),d,h),u.size-d,!0))}function mo(t,e,n=null,r=t){let i=Wh(t,e),s=i&&Kh(r,e);return s?i.map(Tl).concat({type:e,attrs:n}).concat(s.map(Tl)):null}function Tl(t){return{type:t,attrs:null}}function Wh(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}function Kh(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<i;c++)a=a.matchType(n.child(c).type);return!a||!a.validEnd?null:o}function Uh(t,e,n){let r=k.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let l=n[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(n[o].type.create(n[o].attrs,r))}let i=e.start,s=e.end;t.step(new ee(i,s,i,s,new M(r,0,0),n.length,!0))}function _h(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&qh(t.doc,t.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Bc(t,o,l,s),po(t,t.mapping.slice(s).map(l,1),r,void 0,c===null);let u=t.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return t.step(new ee(d,f,d+1,f-1,new M(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&zc(t,o,l,s),!1}})}function zc(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Bc(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{c as fe,r as le,d as os,X as ht,b as Ae,j as t,B as ge,t as dt,l as Ve,a2 as ns,K as Nt,m as zt,Z as Us,e_ as Cs,h as Vs,u as Ks,n as Tt,E as Hs,q as Gt,z as qs,W as Bs}from"./index-DDMwhF4p.js";import{S as Js}from"./search-input-Cx23lHh9.js";import{E as Bt}from"./empty-state-DjYKd98e.js";import{R as Gs}from"./require-capability-BBlF9FlD.js";import{f as hs}from"./pair-CcnGiyFG.js";import{u as Zt}from"./use-connection-Dwv6oHsW.js";import{g as Ms}from"./connection-slug-CITJ0kGN.js";import{B as Dt}from"./badge-DpFKAdGf.js";import{P as Et,a as At,b as Ut}from"./popover-D6rdo_8c.js";import{b as Ct,T as Mt,a as _t,c as Qs}from"./tooltip-D1uOyILL.js";import{i as Qt}from"./Check-B9MGwLYu.js";import{a as Kt}from"./Copy01-rQNANcmU.js";import{n as vs}from"./Image01-DAnmxYRB.js";import{y as is,bx as Xs,_ as Ys,I as Ws,G as Zs}from"./agent-icon-BSa4M47V.js";import{i as el}from"./Key01-DypAHQYR.js";import{i as tl}from"./Sun-C0iRh-Gk.js";import{M as js}from"./monaco-editor-wtpXDYYn.js";import{a as sl}from"./use-members-PzBtBJpI.js";import{u as ll}from"./use-mcp-client-xmMYYBPZ.js";import{b as rl}from"./repository-binding-DzWJ2UJM.js";import{n as Lt}from"./LinkBroken01-CXUAHdkG.js";import{c as ol}from"./XClose-C8P0rFOP.js";import{s as nl}from"./Plus-BCvpEHBe.js";import{s as il}from"./Trash01-DYSwQZrr.js";import{I as Ot}from"./input-DByUKMMK.js";import{M as $t}from"./multi-select-CnSDCQuL.js";import{b as bt,a as wt,c as Ee,d as yt,S as St}from"./select-Cm7-2WsF.js";import{S as al}from"./scroll-area-7XZbPxZx.js";import{t as qt,n as es}from"./ChevronUp-efnDWTJo.js";import{C as cl}from"./calendar-CG4qsKlv.js";import{T as dl}from"./textarea-CnCfFKhD.js";import{C as _s}from"./collection-tabs-C7F9Kntb.js";import{S as ml}from"./switch-Bq60aCIw.js";import{L as ul}from"./label-C-T1eS6J.js";import{I as It}from"./integration-icon-zyUczR_u.js";import{A as as}from"./avatar-Drtufyjw.js";import{a as fl,b as xl,A as pl}from"./alert-CQ4TnjsJ.js";import{K as gt}from"./monitoring-stats-row-DrWKfMD3.js";import{c as Jt}from"./use-decopilot-events-DPAyjg7V.js";import{g as gl,b as Ns,f as jt,c as Xt,a as cs,d as hl,e as bs,h as vl,i as ds,T as jl,j as Nl,r as bl,k as wl}from"./thread-sheet-body-h0OpwJ8W.js";import{u as yl}from"./useSuspenseInfiniteQuery-CmIWBkvA.js";import{c as Sl,S as Il,b as Ds,a as Ls}from"./sheet-J0gPDiWd.js";import{c as Ue,b as Rt,d as ms,e as us,T as je,a as fs}from"./table-Cx8CjEtt.js";import{u as Rs,A as kl}from"./automation-runs-B-nhvwsu.js";import{u as Ps}from"./use-infinite-scroll-DDhIk3H7.js";import{u as Tl}from"./useInfiniteQuery-DalkWWtI.js";import{g as Cl}from"./task-status-C9TjzByx.js";import{u as Ml,d as _l}from"./use-automations-C11dqaOx.js";import"./SearchMd-BZeBFgxn.js";import"./access-gate-CDhQZ3bi.js";import"./capability-load-error-CC0ntXvK.js";import"./Tool01-BCWTP29t.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-DuvoRmPZ.js";import"./use-copy-BQBzs990.js";import"./usage-stats-DndHGCep.js";import"./markdown-TyEv0NYc.js";import"./dialog-BDu7Odbi.js";import"./X-Cjtw5tqD.js";import"./ZoomOut-DF2wOfg4.js";import"./location-DPIrGNp7.js";import"./org-file-open-context-BHYqBnHw.js";import"./use-mobile-3IkoLh1U.js";import"./use-panel-navigate-BAXybbqr.js";import"./thread-route-C7AnvqYr.js";import"./use-project-scope-CruROdaO.js";import"./chat-context-Drs6TfxR.js";import"./autosend-CLPSPXGZ.js";import"./thread-intent-C9kuh36t.js";import"./backoff-8mStPHYB.js";import"./task-board-BFfl1D46.js";import"./schema-Rfnmg_Va.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-fzwJF938.js";import"./use-organization-settings-Ba5qIUFc.js";import"./shell-layout-Dnr_uzYF.js";import"./Palette-DCK6DhCo.js";import"./UserSquare-Cot0m-_1.js";import"./download-app-dialog-C5pSTRZI.js";import"./CheckCircle-D91123g-.js";import"./Monitor01-BAjB03YK.js";import"./command-Dae572-g.js";import"./index-CCpnBLTA.js";import"./project-icon-DGJ2Og-0.js";import"./new-project-dialog-C5yDBDMx.js";import"./ArrowLeft-c2TyzYV8.js";import"./repository-import-picker-Bv59I2Eu.js";import"./use-navigate-to-agent-bOkMjgb4.js";import"./repository-picker-DGluhbRv.js";import"./LinkExternal01-DYpNBFe4.js";import"./collection-search-RMk41ye0.js";import"./ShoppingBag01-D9QLv3AR.js";import"./use-debounced-value-CH4y_C86.js";import"./required-auth-layout-DEIqbZyY.js";import"./use-org-sso-Digx4keO.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BVvnriYN.js";import"./types-CajZUOS1.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-DqxL5ILU.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./AlertCircle-6ybYQ23i.js";import"./Link01-CXYgjG_2.js";import"./use-mcp-prompts-DPkKxsp-.js";import"./index-DdlkV8jH.js";import"./form-C73wwUY1.js";import"./use-thread-outputs-B-2LR7iv.js";import"./file-type-icon-D1P4nIkr.js";import"./index-BzpQR2a9.js";import"./ArrowUp-Ck0_Bd3R.js";import"./CreditCard01-iCMKKibk.js";import"./DotsVertical-_TKSgZ_X.js";import"./Upload01-D1n8mQmM.js";import"./User01-CqnrVGO2.js";import"./Users01-CrCP--sh.js";import"./editor-CdyJu6ec.js";import"./use-org-auth-client-DvhI3uND.js";import"./auth-DgAXBGyy.js";import"./checkbox-B-ptMPYE.js";import"./chart-Cj6b_hgB.js";import"./index-MoGHGtG3.js";import"./CartesianChart-Bks6a_1V.js";import"./XAxis-BPHTmmQM.js";import"./AreaChart-Dpo2DCFE.js";import"./ErrorBarContext-BTFCRzpt.js";import"./Sector-CxmP4STa.js";import"./infiniteQueryObserver-CJ5p49lP.js";const ts={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Dl=["eq","contains","exists","in"];function Ll(l){return Dl.includes(l)}function vt(l){return l.filter(e=>e.key.trim()).map(e=>{const s=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${s}:${e.operator}:${o}`}).join(",")}function Rl(l){return!l||typeof l!="string"?[]:l.split(",").map(e=>{if(!e)return;const[s,o,...c]=e.split(":"),n=s?decodeURIComponent(s):"";if(n.trim())return{key:n,operator:o&&Ll(o)?o:"eq",value:decodeURIComponent(c.join(":")||"")}}).filter(e=>e!==void 0)}function Ht(l){return l.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
|
+
`)}function ws(l){return l.trim()?l.split(`
|
|
3
|
+
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[s,...o]=e.split("=");return{key:s||"",operator:"eq",value:o.join("=")}}if(e.includes("~")){const[s,...o]=e.split("~");return{key:s||"",operator:"contains",value:o.join("~")}}if(e.includes("@")){const[s,...o]=e.split("@");return{key:s||"",operator:"in",value:o.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Pl(l){const e={},s={},o=[],c={};for(const n of l)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(s[n.key]=`%${n.value}%`);break;case"exists":o.push(n.key);break;case"in":n.value&&(c[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(s).length>0?s:void 0,propertyKeys:o.length>0?o:void 0,propertyInValues:Object.keys(c).length>0?c:void 0}}function ys(l){if(!l)return{content:"null",isTruncated:!1,originalSize:4};const e=l._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let s;try{s=JSON.stringify(l,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const o=s.length;return o<=ts.maxJsonRenderSize?{content:s,isTruncated:!1,originalSize:o}:{content:s.slice(0,ts.maxJsonRenderSize)+`
|
|
4
|
+
|
|
5
|
+
... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:o}}function Fl(l){const e=fe.c(167),{log:s}=l,[o,c]=le.useState(!1),[n,f]=le.useState(!1),m=os(),{org:d}=ht(),r=Ae(),h=Zt(),g=ys(s.input),u=ys(s.output),i=Ol;let w;e[0]!==s.input||e[1]!==s.output||e[2]!==r?(w=async ve=>{const pe=i(ve==="input"?s.input:s.output);try{await navigator.clipboard.writeText(pe),ve==="input"?(c(!0),setTimeout(()=>c(!1),2e3)):(f(!0),setTimeout(()=>f(!1),2e3))}catch{dt.error(r("monitoring.types.failedToCopy"))}},e[0]=s.input,e[1]=s.output,e[2]=r,e[3]=w):w=e[3];const a=w;let I;e[4]!==s.id||e[5]!==s.input||e[6]!==s.output||e[7]!==s.toolName?(I=ve=>{const pe=i(ve==="input"?s.input:s.output),we=new Blob([pe],{type:"application/json"}),De=URL.createObjectURL(we),_e=document.createElement("a");_e.href=De,_e.download=`${s.toolName}-${ve}-${s.id}.json`,_e.click(),URL.revokeObjectURL(De)},e[4]=s.id,e[5]=s.input,e[6]=s.output,e[7]=s.toolName,e[8]=I):I=e[8];const N=I;let v;e[9]!==h||e[10]!==s.connectionId||e[11]!==s.input||e[12]!==s.toolName||e[13]!==m||e[14]!==d||e[15]!==r?(v=()=>{const ve=h.find(we=>we.id===s.connectionId);if(!ve){dt.error(r("monitoring.types.connectionNotFound"));return}const pe=crypto.randomUUID();sessionStorage.setItem(`replay-${pe}`,JSON.stringify(s.input)),m({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:d.slug,appSlug:Ms(ve),collectionName:"tools",itemId:encodeURIComponent(s.toolName)},search:{replayId:pe}})},e[9]=h,e[10]=s.connectionId,e[11]=s.input,e[12]=s.toolName,e[13]=m,e[14]=d,e[15]=r,e[16]=v):v=e[16];const D=v,[x,L]=le.useState(!1);let C;e[17]!==s.requestId||e[18]!==r?(C=async()=>{try{await navigator.clipboard.writeText(s.requestId),L(!0),setTimeout(()=>L(!1),2e3)}catch{dt.error(r("monitoring.types.failedToCopy"))}},e[17]=s.requestId,e[18]=r,e[19]=C):C=e[19];const p=C;let j;e[20]!==s.timestamp?(j=new Date(s.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[20]=s.timestamp,e[21]=j):j=e[21];const k=j,S="text-sm px-5 md:px-6 py-5 space-y-5";let M;e[22]!==r?(M=r("monitoring.types.timestamp"),e[22]=r,e[23]=M):M=e[23];let y;e[24]!==M?(y=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:M}),e[24]=M,e[25]=y):y=e[25];let T;e[26]!==k?(T=t.jsx("div",{className:"text-sm text-foreground",children:k}),e[26]=k,e[27]=T):T=e[27];let $;e[28]!==y||e[29]!==T?($=t.jsxs("div",{children:[y,T]}),e[28]=y,e[29]=T,e[30]=$):$=e[30];let P;e[31]!==r?(P=r("monitoring.types.duration"),e[31]=r,e[32]=P):P=e[32];let V;e[33]!==P?(V=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:P}),e[33]=P,e[34]=V):V=e[34];let G;e[35]!==s.durationMs?(G=t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[s.durationMs,"ms"]}),e[35]=s.durationMs,e[36]=G):G=e[36];let Q;e[37]!==V||e[38]!==G?(Q=t.jsxs("div",{children:[V,G]}),e[37]=V,e[38]=G,e[39]=Q):Q=e[39];let b;e[40]!==r?(b=r("monitoring.types.user"),e[40]=r,e[41]=b):b=e[41];let F;e[42]!==b?(F=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:b}),e[42]=b,e[43]=F):F=e[43];let R;e[44]!==s.userName?(R=t.jsx("div",{className:"text-sm text-foreground",children:s.userName}),e[44]=s.userName,e[45]=R):R=e[45];let A;e[46]!==F||e[47]!==R?(A=t.jsxs("div",{children:[F,R]}),e[46]=F,e[47]=R,e[48]=A):A=e[48];let X;e[49]!==s.virtualMcpName||e[50]!==r?(X=s.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:r("monitoring.types.agent")}),t.jsx("div",{className:"text-sm text-foreground",children:s.virtualMcpName})]}),e[49]=s.virtualMcpName,e[50]=r,e[51]=X):X=e[51];let W;e[52]!==r?(W=r("monitoring.types.requestId"),e[52]=r,e[53]=W):W=e[53];let U;e[54]!==W?(U=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:W}),e[54]=W,e[55]=U):U=e[55];let H;e[56]!==s.requestId?(H=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:s.requestId}),e[56]=s.requestId,e[57]=H):H=e[57];let z;e[58]!==r?(z=r("monitoring.types.copyRequestId"),e[58]=r,e[59]=z):z=e[59];let q;e[60]!==x?(q=x?t.jsx(Qt,{size:12}):t.jsx(Kt,{size:12}),e[60]=x,e[61]=q):q=e[61];let _;e[62]!==p||e[63]!==z||e[64]!==q?(_=t.jsx(ge,{size:"icon",variant:"ghost",onClick:p,"aria-label":z,className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:q}),e[62]=p,e[63]=z,e[64]=q,e[65]=_):_=e[65];let B;e[66]!==H||e[67]!==_?(B=t.jsxs("div",{className:"flex items-center gap-1",children:[H,_]}),e[66]=H,e[67]=_,e[68]=B):B=e[68];let K;e[69]!==U||e[70]!==B?(K=t.jsxs("div",{children:[U,B]}),e[69]=U,e[70]=B,e[71]=K):K=e[71];let O;e[72]!==s.userAgent||e[73]!==r?(O=s.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:r("monitoring.types.client")}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:s.userAgent})]}),e[72]=s.userAgent,e[73]=r,e[74]=O):O=e[74];let Z;e[75]!==s.properties||e[76]!==m||e[77]!==d||e[78]!==r?(Z=s.properties&&Object.keys(s.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:r("monitoring.types.properties")}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(s.properties).map(ve=>{const[pe,we]=ve;return t.jsxs(Et,{children:[t.jsx(At,{asChild:!0,children:t.jsxs(Dt,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[pe,"=",we]})}),t.jsx(Ut,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(ge,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:()=>{const De={key:pe,operator:"eq",value:we};m({to:"/$org/settings/monitor",params:{org:d.slug},search:{tab:"overview",propertyFilters:vt([De])}})},children:[t.jsx(is,{size:14,className:"mr-2"}),r("monitoring.types.filterByProperty")]}),t.jsxs(ge,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(`${pe}=${we}`),dt.success(r("monitoring.types.copiedFilter"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(Kt,{size:14,className:"mr-2"}),r("monitoring.types.copyFilter")]}),t.jsxs(ge,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(pe),dt.success(r("monitoring.types.copiedKey"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(el,{size:14,className:"mr-2"}),r("monitoring.types.copyKey")]}),t.jsxs(ge,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(we),dt.success(r("monitoring.types.copiedValue"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(Xs,{size:14,className:"mr-2"}),r("monitoring.types.copyValue")]})]})})]},pe)})})]}),e[75]=s.properties,e[76]=m,e[77]=d,e[78]=r,e[79]=Z):Z=e[79];let ee;e[80]!==$||e[81]!==Q||e[82]!==A||e[83]!==X||e[84]!==K||e[85]!==O||e[86]!==Z?(ee=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[$,Q,A,X,K,O,Z]}),e[80]=$,e[81]=Q,e[82]=A,e[83]=X,e[84]=K,e[85]=O,e[86]=Z,e[87]=ee):ee=e[87];let J;e[88]!==s.errorMessage||e[89]!==r?(J=s.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:r("monitoring.types.error")}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:s.errorMessage})]}),e[88]=s.errorMessage,e[89]=r,e[90]=J):J=e[90];const me="space-y-4";let te;e[91]!==r?(te=r("monitoring.types.input"),e[91]=r,e[92]=te):te=e[92];let ae;e[93]!==te?(ae=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:te}),e[93]=te,e[94]=ae):ae=e[94];const re=g.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",hs(g.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let Y;e[95]!==ae||e[96]!==re?(Y=t.jsxs("div",{className:"flex items-center gap-2",children:[ae,re]}),e[95]=ae,e[96]=re,e[97]=Y):Y=e[97];let oe;e[98]!==D||e[99]!==s.input||e[100]!==r?(oe=s.input&&t.jsxs(Ct,{children:[t.jsx(Mt,{asChild:!0,children:t.jsx(ge,{size:"icon",variant:"ghost",onClick:D,"aria-label":r("monitoring.types.replayToolCall"),className:"text-muted-foreground hover:text-foreground h-8 w-8",children:t.jsx(tl,{size:14})})}),t.jsx(_t,{children:r("monitoring.types.replayToolCall")})]}),e[98]=D,e[99]=s.input,e[100]=r,e[101]=oe):oe=e[101];let ne;e[102]!==N||e[103]!==g||e[104]!==r?(ne=g.isTruncated&&t.jsxs(Ct,{children:[t.jsx(Mt,{asChild:!0,children:t.jsx(ge,{size:"icon",variant:"ghost",onClick:()=>N("input"),"aria-label":r("monitoring.types.downloadFullInput"),className:"text-muted-foreground hover:text-foreground h-8 w-8",children:t.jsx(vs,{size:14})})}),t.jsx(_t,{children:r("monitoring.types.downloadFullInput")})]}),e[102]=N,e[103]=g,e[104]=r,e[105]=ne):ne=e[105];let ce;e[106]!==a?(ce=()=>a("input"),e[106]=a,e[107]=ce):ce=e[107];let ie;e[108]!==r?(ie=r("monitoring.types.copyInput"),e[108]=r,e[109]=ie):ie=e[109];let de;e[110]!==o?(de=o?t.jsx(Qt,{size:14}):t.jsx(Kt,{size:14}),e[110]=o,e[111]=de):de=e[111];let xe;e[112]!==ce||e[113]!==ie||e[114]!==de?(xe=t.jsx(ge,{size:"icon",variant:"ghost",onClick:ce,"aria-label":ie,className:"text-muted-foreground hover:text-foreground h-8 w-8",children:de}),e[112]=ce,e[113]=ie,e[114]=de,e[115]=xe):xe=e[115];let E;e[116]!==oe||e[117]!==ne||e[118]!==xe?(E=t.jsxs("div",{className:"flex items-center gap-1",children:[oe,ne,xe]}),e[116]=oe,e[117]=ne,e[118]=xe,e[119]=E):E=e[119];let se;e[120]!==Y||e[121]!==E?(se=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[Y,E]}),e[120]=Y,e[121]=E,e[122]=se):se=e[122];let ue;e[123]!==g?(ue=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(js,{code:g.content,language:"json",height:"100%",readOnly:!0})}),e[123]=g,e[124]=ue):ue=e[124];let he;e[125]!==se||e[126]!==ue?(he=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[se,ue]})}),e[125]=se,e[126]=ue,e[127]=he):he=e[127];const Ye="rounded-lg overflow-hidden border border-border",Le="flex items-center justify-between p-1 pl-4 border-b border-border",Re="flex items-center gap-2";let ye;e[128]!==r?(ye=r("monitoring.types.output"),e[128]=r,e[129]=ye):ye=e[129];let Pe;e[130]!==ye?(Pe=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:ye}),e[130]=ye,e[131]=Pe):Pe=e[131];const Fe=u.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",hs(u.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let Se;e[132]!==Pe||e[133]!==Fe?(Se=t.jsxs("div",{className:Re,children:[Pe,Fe]}),e[132]=Pe,e[133]=Fe,e[134]=Se):Se=e[134];let Oe;e[135]!==N||e[136]!==u.isTruncated||e[137]!==r?(Oe=u.isTruncated&&t.jsxs(Ct,{children:[t.jsx(Mt,{asChild:!0,children:t.jsx(ge,{size:"icon",variant:"ghost",onClick:()=>N("output"),"aria-label":r("monitoring.types.downloadFullOutput"),className:"text-muted-foreground hover:text-foreground h-8 w-8",children:t.jsx(vs,{size:14})})}),t.jsx(_t,{children:r("monitoring.types.downloadFullOutput")})]}),e[135]=N,e[136]=u.isTruncated,e[137]=r,e[138]=Oe):Oe=e[138];let $e;e[139]!==a?($e=()=>a("output"),e[139]=a,e[140]=$e):$e=e[140];let Ie;e[141]!==r?(Ie=r("monitoring.types.copyOutput"),e[141]=r,e[142]=Ie):Ie=e[142];let ke;e[143]!==n?(ke=n?t.jsx(Qt,{size:14}):t.jsx(Kt,{size:14}),e[143]=n,e[144]=ke):ke=e[144];let Ne;e[145]!==$e||e[146]!==Ie||e[147]!==ke?(Ne=t.jsx(ge,{size:"icon",variant:"ghost",onClick:$e,"aria-label":Ie,className:"text-muted-foreground hover:text-foreground h-8 w-8",children:ke}),e[145]=$e,e[146]=Ie,e[147]=ke,e[148]=Ne):Ne=e[148];let be;e[149]!==Oe||e[150]!==Ne?(be=t.jsxs("div",{className:"flex items-center gap-1",children:[Oe,Ne]}),e[149]=Oe,e[150]=Ne,e[151]=be):be=e[151];let Te;e[152]!==Se||e[153]!==be?(Te=t.jsxs("div",{className:Le,children:[Se,be]}),e[152]=Se,e[153]=be,e[154]=Te):Te=e[154];let Ce;e[155]!==u.content?(Ce=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(js,{code:u.content,language:"json",height:"100%",readOnly:!0})}),e[155]=u.content,e[156]=Ce):Ce=e[156];let Me;e[157]!==Te||e[158]!==Ce?(Me=t.jsx("div",{children:t.jsxs("div",{className:Ye,children:[Te,Ce]})}),e[157]=Te,e[158]=Ce,e[159]=Me):Me=e[159];let ze;e[160]!==he||e[161]!==Me?(ze=t.jsxs("div",{className:me,children:[he,Me]}),e[160]=he,e[161]=Me,e[162]=ze):ze=e[162];let Ke;return e[163]!==ee||e[164]!==J||e[165]!==ze?(Ke=t.jsxs("div",{className:S,children:[ee,J,ze]}),e[163]=ee,e[164]=J,e[165]=ze,e[166]=Ke):Ke=e[166],Ke}function Ol(l){return JSON.stringify(l,null,2)}const Fs=/^now(?:-(\d+)([mhdwM]))?$/,$l={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Os(l){const e=l.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const s=e.match(Fs);if(!s)return null;const o=s[1]?Number.parseInt(s[1],10):0,c=s[2]||null;return{isNow:!0,offset:o,unit:c}}function at(l){const e=l.trim(),s=new Date(e);if(!Number.isNaN(s.getTime())&&e.includes("-"))return{valid:!0,date:s};const o=Os(e);if(!o)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const c=new Date,n=new Date(c);if(o.offset===0||!o.unit)return{valid:!0,date:n};switch(o.unit){case"m":n.setMinutes(n.getMinutes()-o.offset);break;case"h":n.setHours(n.getHours()-o.offset);break;case"d":n.setDate(n.getDate()-o.offset);break;case"w":n.setDate(n.getDate()-o.offset*7);break;case"M":n.setMonth(n.getMonth()-o.offset);break}return{valid:!0,date:n}}function zl(l){return l.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function $s(l){const e=l.trim();return Fs.test(e)}function Ss(l){const e=l.trim();if(e==="now")return"Now";const s=Os(e);if(!s||!s.unit){const n=at(e);return n.valid&&n.date?zl(n.date):e}const o=$l[s.unit],c=s.offset!==1?"s":"";return`${s.offset} ${o}${c} ago`}const zs=[{label:"Last 5 minutes",from:"now-5m",to:"now",value:"5m"},{label:"Last 15 minutes",from:"now-15m",to:"now",value:"15m"},{label:"Last 30 minutes",from:"now-30m",to:"now",value:"30m"},{label:"Last 1 hour",from:"now-1h",to:"now",value:"1h"},{label:"Last 3 hours",from:"now-3h",to:"now",value:"3h"},{label:"Last 6 hours",from:"now-6h",to:"now",value:"6h"},{label:"Last 12 hours",from:"now-12h",to:"now",value:"12h"},{label:"Last 24 hours",from:"now-24h",to:"now",value:"24h"},{label:"Last 2 days",from:"now-2d",to:"now",value:"2d"},{label:"Last 7 days",from:"now-7d",to:"now",value:"7d"},{label:"Last 30 days",from:"now-30d",to:"now",value:"30d"}];function El(l,e){const s=zs.find(o=>o.from===l&&o.to===e);return s?s.label:`${Ss(l)} to ${Ss(e)}`}function Ft(l){const e=l.getFullYear(),s=String(l.getMonth()+1).padStart(2,"0"),o=String(l.getDate()).padStart(2,"0"),c=String(l.getHours()).padStart(2,"0"),n=String(l.getMinutes()).padStart(2,"0"),f=String(l.getSeconds()).padStart(2,"0");return`${e}-${s}-${o} ${c}:${n}:${f}`}function Al(l){const e=l.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,s,o,c,n,f,m]=e,d=new Date(Number(s),Number(o)-1,Number(c),Number(n),Number(f),Number(m));return Number.isNaN(d.getTime())?null:d}function Yt(l){if($s(l))return l;const e=at(l);return e.valid&&e.date?Ft(e.date):l}function Is({value:l,onChange:e,placeholder:s="now or now-2d",className:o,disabled:c,error:n}){const[f,m]=le.useState(!1),[d,r]=le.useState(()=>Yt(l)),[h,g]=le.useState(),[u,i]=le.useState(!1),w=le.useRef(l);w.current!==l&&(w.current=l,u||r(Yt(l)));const a=j=>{const k=j.target.value;r(k),g(void 0)},I=()=>{i(!0)},N=()=>{i(!1);const j=d.trim();if($s(j)){g(void 0),e(j);return}const k=Al(j);if(k){g(void 0),e(k.toISOString()),r(Ft(k));return}const S=at(j);if(S.valid&&S.date){g(void 0),e(j),r(Ft(S.date));return}r(Yt(l)),g(void 0)},v=j=>{if(j){const S=at(l).date||new Date;j.setHours(S.getHours()),j.setMinutes(S.getMinutes()),j.setSeconds(0),j.setMilliseconds(0);const M=j.toISOString();r(Ft(j)),e(M),g(void 0)}m(!1)},D=j=>{const[k,S]=j.target.value.split(":").map(Number),y=at(l).date||new Date;y.setHours(k||0),y.setMinutes(S||0),y.setSeconds(0),y.setMilliseconds(0);const T=y.toISOString();r(Ft(y)),e(T)},x=at(l),L=x.valid?x.date:new Date,C=L?`${String(L.getHours()).padStart(2,"0")}:${String(L.getMinutes()).padStart(2,"0")}`:"",p=n||h;return t.jsxs("div",{className:Ve("flex gap-1",o),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Ot,{value:d,onChange:a,onFocus:I,onBlur:N,placeholder:s,disabled:c,className:Ve("text-sm h-8",p&&"border-destructive focus-visible:ring-destructive")}),p&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:p})]}),t.jsxs(Et,{open:f,onOpenChange:m,children:[t.jsx(At,{asChild:!0,children:t.jsx(ge,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:c,children:t.jsx(Ys,{className:"h-4 w-4"})})}),t.jsxs(Ut,{className:"w-auto p-0",align:"end",children:[t.jsx(cl,{mode:"single",selected:L||void 0,onSelect:v,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(Ot,{type:"time",value:C,onChange:D,className:"text-sm h-8"})]})]})]})]})}function Ul({value:l,onChange:e,className:s,disabled:o,quickRanges:c=zs,labels:n}){const f=n?.absoluteTimeRange??"Absolute time range",m=n?.from??"From",d=n?.to??"To",r=n?.applyTimeRange??"Apply time range",[h,g]=le.useState(!1),[u,i]=le.useState(l.from),[w,a]=le.useState(l.to),[I,N]=le.useState(null),v=le.useRef({from:l.from,to:l.to});(v.current.from!==l.from||v.current.to!==l.to)&&(v.current={from:l.from,to:l.to},i(l.from),a(l.to));const D=p=>{v.current={from:p.from,to:p.to},i(p.from),a(p.to),g(!1),e({from:p.from,to:p.to})},x=()=>{const p=at(u),j=at(w);if(!p.valid||!p.date){N("Invalid 'From' date");return}if(!j.valid||!j.date){N("Invalid 'To' date");return}if(p.date>=j.date){N("'From' must be before 'To'");return}N(null),e({from:u,to:w}),g(!1)},L=p=>l.from===p.from&&l.to===p.to,C=El(l.from,l.to);return t.jsxs(Et,{open:h,onOpenChange:g,children:[t.jsx(At,{asChild:!0,children:t.jsxs(ge,{variant:"outline",className:Ve("gap-1.5 min-w-[160px] justify-between",s),disabled:o,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Ws,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:C})]}),t.jsx(qt,{className:"size-4 text-muted-foreground"})]})}),t.jsx(Ut,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:p=>p.preventDefault(),style:h?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:f}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:m}),t.jsx(Is,{value:u,onChange:i,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:d}),t.jsx(Is,{value:w,onChange:a,placeholder:"now"})]}),I&&t.jsx("p",{className:"text-xs text-destructive",children:I}),t.jsx(ge,{onClick:x,className:"w-full",size:"sm",children:r})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(al,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:c.map(p=>{const j=L(p);return t.jsx("button",{type:"button",onClick:()=>D(p),className:Ve("w-full text-left px-3 py-2 text-sm rounded-lg transition-colors","hover:bg-accent hover:text-accent-foreground",j&&"bg-accent text-accent-foreground font-medium"),children:p.label},p.value)})})})})]})})]})}const Es="decopilot";async function As(l,e){return await l.call("MONITORING_STATS",e)}function Vl(l,e){const s=fe.c(12),{org:o}=ht(),c=ns();let n,f,m;s[0]!==o.id||s[1]!==l?(m={...l,excludeConnectionIds:[Es,...l.excludeConnectionIds??[]]},f=zt,n=Nt.monitoringStatsToolCalls(o.id,JSON.stringify(m)),s[0]=o.id,s[1]=l,s[2]=n,s[3]=f,s[4]=m):(n=s[2],f=s[3],m=s[4]);let d;s[5]!==c||s[6]!==m?(d=()=>As(c,m),s[5]=c,s[6]=m,s[7]=d):d=s[7];let r;return s[8]!==e||s[9]!==n||s[10]!==d?(r={queryKey:n,queryFn:d,staleTime:3e4,retry:!1,...e},s[8]=e,s[9]=n,s[10]=d,s[11]=r):r=s[11],f(r)}function Kl(l,e){const s=fe.c(12),{org:o}=ht(),c=ns();let n,f,m;s[0]!==o.id||s[1]!==l?(m={...l,connectionIds:[Es],topN:5,llmUsage:!0,userIds:l.userIds?.length?l.userIds:void 0},f=zt,n=Nt.monitoringStatsLlm(o.id,JSON.stringify(m)),s[0]=o.id,s[1]=l,s[2]=n,s[3]=f,s[4]=m):(n=s[2],f=s[3],m=s[4]);let d;s[5]!==c||s[6]!==m?(d=()=>As(c,m),s[5]=c,s[6]=m,s[7]=d):d=s[7];let r;return s[8]!==e||s[9]!==n||s[10]!==d?(r={queryKey:n,queryFn:d,staleTime:3e4,retry:!1,...e},s[8]=e,s[9]=n,s[10]=d,s[11]=r):r=s[11],f(r)}function Hl(l,e){const s=fe.c(13),{org:o}=ht(),c=ns(),n=l.virtualMcpIds?.length?l.virtualMcpIds:void 0;let f,m,d;s[0]!==o.id||s[1]!==l||s[2]!==n?(d={...l,virtualMcpIds:n},m=zt,f=Nt.monitoringHeatmap(o.id,JSON.stringify(d)),s[0]=o.id,s[1]=l,s[2]=n,s[3]=f,s[4]=m,s[5]=d):(f=s[3],m=s[4],d=s[5]);let r;s[6]!==c||s[7]!==d?(r=async()=>await c.call("MONITORING_HEATMAP",d),s[6]=c,s[7]=d,s[8]=r):r=s[8];let h;return s[9]!==e||s[10]!==f||s[11]!==r?(h={queryKey:f,queryFn:r,staleTime:3e4,retry:!1,...e},s[9]=e,s[10]=f,s[11]=r,s[12]=h):h=s[12],m(h)}function mt(l){const e=fe.c(20),{title:s,value:o,action:c,children:n,className:f}=l;let m;e[0]!==f?(m=Ve("pt-4 px-4 pb-6 gap-8",f),e[0]=f,e[1]=m):m=e[1];let d;e[2]!==s?(d=t.jsx("span",{className:"text-sm text-foreground/70",children:s}),e[2]=s,e[3]=d):d=e[3];let r;e[4]!==o?(r=t.jsx("span",{className:"text-4xl font-normal",children:o}),e[4]=o,e[5]=r):r=e[5];let h;e[6]!==d||e[7]!==r?(h=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[d,r]}),e[6]=d,e[7]=r,e[8]=h):h=e[8];let g;e[9]!==c?(g=c&&t.jsx("div",{className:"shrink-0",children:c}),e[9]=c,e[10]=g):g=e[10];let u;e[11]!==h||e[12]!==g?(u=t.jsxs("div",{className:"flex items-start justify-between",children:[h,g]}),e[11]=h,e[12]=g,e[13]=u):u=e[13];let i;e[14]!==n?(i=n&&t.jsx("div",{className:"flex flex-col gap-6",children:n}),e[14]=n,e[15]=i):i=e[15];let w;return e[16]!==m||e[17]!==u||e[18]!==i?(w=t.jsxs(Cs,{className:m,children:[u,i]}),e[16]=m,e[17]=u,e[18]=i,e[19]=w):w=e[19],w}function Wt(l){const e=fe.c(14),{metrics:s,connections:o,mode:c,total:n}=l,{org:f}=ht(),m=os();let d,r,h;if(e[0]!==o||e[1]!==s||e[2]!==c||e[3]!==m||e[4]!==f||e[5]!==n){h=Symbol.for("react.early_return_sentinel");e:{const u=o??[],i=new Map(s.map(Bl));let w;e[9]!==c?(w=(I,N)=>{const v=bs(I.metric,c);return bs(N.metric,c)-v},e[9]=c,e[10]=w):w=e[10];const a=u.map(I=>({connection:I,metric:i.get(I.id)})).filter(ql).sort(w).slice(0,4);if(a.length===0){h=null;break e}d="flex flex-col",r=a.map((I,N)=>{const{connection:v,metric:D}=I,x=n>0?(D.calls/n*100).toFixed(1):"0.0",L=c==="errors"?`${D.errorRate.toFixed(1)}%`:`${x}%`,C=N===a.length-1;return t.jsxs("div",{className:Ve("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!C&&"border-b border-border/50"),onClick:()=>m({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:Ms(v)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(It,{icon:v.icon,name:v.title,size:"xs",fallbackIcon:t.jsx(Lt,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:v.title})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsx("span",{className:"text-sm text-foreground/30 tabular-nums",children:L}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:hl(D,c)})]})]},v.id)})}e[0]=o,e[1]=s,e[2]=c,e[3]=m,e[4]=f,e[5]=n,e[6]=d,e[7]=r,e[8]=h}else d=e[6],r=e[7],h=e[8];if(h!==Symbol.for("react.early_return_sentinel"))return h;let g;return e[11]!==d||e[12]!==r?(g=t.jsx("div",{className:d,children:r}),e[11]=d,e[12]=r,e[13]=g):g=e[13],g}function ql(l){return l.metric}function Bl(l){return[l.connectionId,l]}const ks=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Ts(l){let e=0;for(let s=0;s<l.length;s++)e=e*31+l.charCodeAt(s)>>>0;return ks[e%ks.length]}function Pt(l){const e=fe.c(21),{models:s,mode:o}=l,c=o===void 0?"calls":o;if(!Jt()||s.length===0)return null;let f;e[0]!==c?(f=a=>c==="tokens"?(a.inputTokens??0)+(a.outputTokens??0):c==="cost"?a.costUsd??0:a.calls,e[0]=c,e[1]=f):f=e[1];const m=f;let d;e[2]!==c?(d=a=>c==="cost"?cs(a):c==="tokens"?jt(a):a.toLocaleString(),e[2]=c,e[3]=d):d=e[3];const r=d;let h;e[4]!==m?(h=(a,I)=>a+m(I),e[4]=m,e[5]=h):h=e[5];const g=s.reduce(h,0);let u,i;if(e[6]!==r||e[7]!==s||e[8]!==g||e[9]!==m){let a;e[12]!==m?(a=(v,D)=>m(D)-m(v),e[12]=m,e[13]=a):a=e[13];const I=[...s].sort(a).slice(0,4);u="flex flex-col";let N;e[14]!==r||e[15]!==g||e[16]!==m?(N=(v,D,x)=>{const L=m(v),C=g>0?(L/g*100).toFixed(1):"0.0",p=D===x.length-1;return t.jsxs("div",{className:Ve("flex items-center h-10 px-3",!p&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx("div",{className:"size-6 rounded-md border border-border/10 shadow-sm flex items-center justify-center shrink-0",style:{backgroundColor:`color-mix(in oklch, ${Ts(v.toolName)} 18%, transparent)`},children:t.jsx(Lt,{size:14,style:{color:Ts(v.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:v.toolName})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsxs("span",{className:"text-sm text-foreground/30 tabular-nums",children:[C,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:r(L)})]})]},v.toolName)},e[14]=r,e[15]=g,e[16]=m,e[17]=N):N=e[17],i=I.map(N),e[6]=r,e[7]=s,e[8]=g,e[9]=m,e[10]=u,e[11]=i}else u=e[10],i=e[11];let w;return e[18]!==u||e[19]!==i?(w=t.jsx("div",{className:u,children:i}),e[18]=u,e[19]=i,e[20]=w):w=e[20],w}const Jl=12,Gl=8;function Ql(l,e){if(l===0)return"bg-muted-foreground/10";const s=e>0?l/e:0;return s<=.15?"bg-success/25":s<=.4?"bg-success/45":s<=.7?"bg-success/70":"bg-success"}function Xl(l){const e=fe.c(35),{cells:s,virtualMcps:o,metric:c}=l,n=Ae();if(s.length===0){let N;e[0]!==n?(N=n("orgs.overview.noHeatmapData"),e[0]=n,e[1]=N):N=e[1];let v;return e[2]!==N?(v=t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:N}),e[2]=N,e[3]=v):v=e[3],v}let f,m,d,r,h,g,u,i;if(e[4]!==s||e[5]!==c||e[6]!==n||e[7]!==o){const{topTools:N,topAgentIds:v,cellMap:D,maxValue:x}=vl(s,c,Jl,Gl);let L;e[16]!==n||e[17]!==o?(L=j=>j===""?n("orgs.overview.noAgent"):o.find(k=>k.id===j)?.title??j,e[16]=n,e[17]=o,e[18]=L):L=e[18];const C=L;f=Qs,i=0,u="overflow-x-auto",m="grid gap-1 min-w-max";const p=`140px repeat(${N.length}, 28px)`;e[19]!==p?(d={gridTemplateColumns:p},e[19]=p,e[20]=d):d=e[20],e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{}),e[21]=r):r=e[21],h=N.map(Yl),g=v.map(j=>t.jsxs(le.Fragment,{children:[t.jsx("div",{className:"text-xs text-muted-foreground truncate flex items-center pr-2",title:C(j),children:C(j)}),N.map(k=>{const S=D.get(`${j}::${k}`),M=S?.[c]??0;return t.jsxs(Ct,{children:[t.jsx(Mt,{asChild:!0,children:t.jsx("div",{className:Ve("aspect-square rounded-[2px]",Ql(M,x))})}),t.jsx(_t,{children:n("orgs.overview.heatmapCellTooltip",{agent:C(j),tool:k,calls:S?.calls??0,errors:S?.errors??0,outputSize:jt(S?.outputSize??0)})})]},k)})]},j||"none")),e[4]=s,e[5]=c,e[6]=n,e[7]=o,e[8]=f,e[9]=m,e[10]=d,e[11]=r,e[12]=h,e[13]=g,e[14]=u,e[15]=i}else f=e[8],m=e[9],d=e[10],r=e[11],h=e[12],g=e[13],u=e[14],i=e[15];let w;e[22]!==m||e[23]!==d||e[24]!==r||e[25]!==h||e[26]!==g?(w=t.jsxs("div",{className:m,style:d,children:[r,h,g]}),e[22]=m,e[23]=d,e[24]=r,e[25]=h,e[26]=g,e[27]=w):w=e[27];let a;e[28]!==u||e[29]!==w?(a=t.jsx("div",{className:u,children:w}),e[28]=u,e[29]=w,e[30]=a):a=e[30];let I;return e[31]!==f||e[32]!==i||e[33]!==a?(I=t.jsx(f,{delayDuration:i,children:a}),e[31]=f,e[32]=i,e[33]=a,e[34]=I):I=e[34],I}function Yl(l){return t.jsxs(Ct,{children:[t.jsx(Mt,{asChild:!0,children:t.jsx("div",{className:"h-[80px] flex items-end justify-center pb-1 text-[10px] text-muted-foreground overflow-hidden [writing-mode:vertical-rl]",children:l})}),t.jsx(_t,{children:l})]},l)}function Wl(l){const e=fe.c(143),{displayDateRange:s,connectionIds:o,excludeConnectionIds:c,toolName:n,status:f,connections:m,isStreaming:d,streamingRefetchInterval:r,llmUserIds:h,virtualMcpIds:g,virtualMcps:u}=l,i=Ae(),w=gl(s),a=d?r:!1;let I;e[0]!==a?(I={refetchInterval:a},e[0]=a,e[1]=I):I=e[1];const{data:N,isError:v}=Vl({interval:w,startDate:s.startDate.toISOString(),endDate:s.endDate.toISOString(),connectionIds:o.length>0?o:void 0,excludeConnectionIds:c,toolNames:n?[n]:void 0,status:f},I);let D;e[2]!==a?(D={refetchInterval:a},e[2]=a,e[3]=D):D=e[3];const{data:x,isError:L}=Kl({interval:w,startDate:s.startDate.toISOString(),endDate:s.endDate.toISOString(),userIds:h?.length?h:void 0},D);let C;e[4]!==s.startDate?(C=s.startDate.toISOString(),e[4]=s.startDate,e[5]=C):C=e[5];let p;e[6]!==s.endDate?(p=s.endDate.toISOString(),e[6]=s.endDate,e[7]=p):p=e[7];let j;e[8]!==c||e[9]!==C||e[10]!==p||e[11]!==g?(j={startDate:C,endDate:p,virtualMcpIds:g,excludeConnectionIds:c},e[8]=c,e[9]=C,e[10]=p,e[11]=g,e[12]=j):j=e[12];let k;e[13]!==a?(k={refetchInterval:a},e[13]=a,e[14]=k):k=e[14];const{data:S}=Hl(j,k),M=v||L,y=N?{totalCalls:N.totalCalls,totalErrors:N.totalErrors,avgDurationMs:N.avgDurationMs,p95DurationMs:N.p95DurationMs,data:Ns(N.timeseries,s,w)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},T=x?{totalCalls:x.totalCalls,totalErrors:x.totalErrors,avgDurationMs:x.avgDurationMs,p95DurationMs:x.p95DurationMs,data:Ns(x.timeseries,s,w)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let $;e[15]!==x?.topTools?($=x?.topTools??[],e[15]=x?.topTools,e[16]=$):$=e[16];const P=$,V=x?.totalInputTokens??0,G=x?.totalOutputTokens??0,Q=x?.totalTokens??0,b=x?.totalCostUsd??0,F=Jt();let R;e[17]!==N?.connectionBreakdown?(R=N?.connectionBreakdown??[],e[17]=N?.connectionBreakdown,e[18]=R):R=e[18];const A=R,[X,W]=le.useState("avg"),[U,H]=le.useState("calls");let z;e[19]!==M||e[20]!==i?(z=M&&t.jsxs(fl,{variant:"destructive",children:[t.jsx(Us,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(xl,{children:i("orgs.overview.failedToLoadTitle")}),t.jsx(pl,{children:i("orgs.overview.failedToLoadDescription")})]})]}),e[19]=M,e[20]=i,e[21]=z):z=e[21];let q;e[22]!==i?(q=i("orgs.overview.toolCalls"),e[22]=i,e[23]=q):q=e[23];const _=y.totalCalls.toLocaleString(),B=y.data;let K;e[24]!==i?(K=i("orgs.overview.toolCallsAriaLabel"),e[24]=i,e[25]=K):K=e[25];let O;e[26]!==i?(O=i("orgs.overview.toolCallHeatmap"),e[26]=i,e[27]=O):O=e[27];let Z;e[28]!==U||e[29]!==S?.cells?(Z=U==="calls"?(S?.cells??[]).reduce(er,0).toLocaleString():jt((S?.cells??[]).reduce(Zl,0)),e[28]=U,e[29]=S?.cells,e[30]=Z):Z=e[30];let ee;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=ct=>H(ct),e[31]=ee):ee=e[31];let J;e[32]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsx(bt,{className:"w-[140px]",children:t.jsx(wt,{})}),e[32]=J):J=e[32];let me;e[33]!==i?(me=i("orgs.overview.heatmapMetricCalls"),e[33]=i,e[34]=me):me=e[34];let te;e[35]!==me?(te=t.jsx(Ee,{value:"calls",children:me}),e[35]=me,e[36]=te):te=e[36];let ae;e[37]!==i?(ae=i("orgs.overview.heatmapMetricOutputSize"),e[37]=i,e[38]=ae):ae=e[38];let re;e[39]!==ae?(re=t.jsx(Ee,{value:"outputSize",children:ae}),e[39]=ae,e[40]=re):re=e[40];let Y;e[41]!==te||e[42]!==re?(Y=t.jsxs(yt,{children:[te,re]}),e[41]=te,e[42]=re,e[43]=Y):Y=e[43];let oe;e[44]!==U||e[45]!==Y?(oe=t.jsxs(St,{value:U,onValueChange:ee,children:[J,Y]}),e[44]=U,e[45]=Y,e[46]=oe):oe=e[46];let ne;e[47]!==S?.cells?(ne=S?.cells??[],e[47]=S?.cells,e[48]=ne):ne=e[48];let ce;e[49]!==U||e[50]!==ne||e[51]!==u?(ce=t.jsx(Xl,{cells:ne,virtualMcps:u,metric:U}),e[49]=U,e[50]=ne,e[51]=u,e[52]=ce):ce=e[52];let ie;e[53]!==O||e[54]!==Z||e[55]!==oe||e[56]!==ce?(ie=t.jsx(mt,{title:O,value:Z,action:oe,children:ce}),e[53]=O,e[54]=Z,e[55]=oe,e[56]=ce,e[57]=ie):ie=e[57];let de;e[58]!==i?(de=i("orgs.overview.latency"),e[58]=i,e[59]=de):de=e[59];const xe=Xt(X==="avg"?y.avgDurationMs:y.p95DurationMs);let E;e[60]===Symbol.for("react.memo_cache_sentinel")?(E=ct=>W(ct),e[60]=E):E=e[60];let se;e[61]===Symbol.for("react.memo_cache_sentinel")?(se=t.jsx(bt,{className:"w-[120px]",children:t.jsx(wt,{})}),e[61]=se):se=e[61];let ue;e[62]!==i?(ue=i("orgs.overview.latencyAvg"),e[62]=i,e[63]=ue):ue=e[63];let he;e[64]!==ue?(he=t.jsx(Ee,{value:"avg",children:ue}),e[64]=ue,e[65]=he):he=e[65];let Ye;e[66]!==i?(Ye=i("orgs.overview.latencyP95"),e[66]=i,e[67]=Ye):Ye=e[67];let Le;e[68]!==Ye?(Le=t.jsx(Ee,{value:"p95",children:Ye}),e[68]=Ye,e[69]=Le):Le=e[69];let Re;e[70]!==he||e[71]!==Le?(Re=t.jsxs(yt,{children:[he,Le]}),e[70]=he,e[71]=Le,e[72]=Re):Re=e[72];let ye;e[73]!==X||e[74]!==Re?(ye=t.jsxs(St,{value:X,onValueChange:E,children:[se,Re]}),e[73]=X,e[74]=Re,e[75]=ye):ye=e[75];const Pe=y.data;let Fe;e[76]!==X||e[77]!==i?(Fe=i("orgs.overview.latencyAriaLabel",{type:X==="avg"?i("orgs.overview.average"):"P95"}),e[76]=X,e[77]=i,e[78]=Fe):Fe=e[78];let Se;e[79]!==i?(Se=i("orgs.overview.errors"),e[79]=i,e[80]=Se):Se=e[80];const Oe=y.totalErrors.toLocaleString(),$e=y.data;let Ie;e[81]!==i?(Ie=i("orgs.overview.errorsAriaLabel"),e[81]=i,e[82]=Ie):Ie=e[82];let ke;e[83]===Symbol.for("react.memo_cache_sentinel")?(ke=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[83]=ke):ke=e[83];let Ne;e[84]!==i?(Ne=i("orgs.overview.aiUsage"),e[84]=i,e[85]=Ne):Ne=e[85];let be;e[86]!==Ne?(be=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:Ne}),e[86]=Ne,e[87]=be):be=e[87];let Te;e[88]===Symbol.for("react.memo_cache_sentinel")?(Te=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[88]=Te):Te=e[88];let Ce;e[89]!==be?(Ce=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[ke,be,Te]}),e[89]=be,e[90]=Ce):Ce=e[90];let Me;e[91]!==i?(Me=i("orgs.overview.aiCalls"),e[91]=i,e[92]=Me):Me=e[92];const ze=T.totalCalls.toLocaleString(),Ke=T.data;let ve;e[93]!==i?(ve=i("orgs.overview.aiCallsAriaLabel"),e[93]=i,e[94]=ve):ve=e[94];let pe;e[95]!==P?(pe=t.jsx(Pt,{models:P,mode:"calls"}),e[95]=P,e[96]=pe):pe=e[96];let we;e[97]!==i?(we=i("orgs.overview.tokens"),e[97]=i,e[98]=we):we=e[98];let De;e[99]!==Q?(De=jt(Q),e[99]=Q,e[100]=De):De=e[100];let _e;e[101]!==V?(_e=jt(V),e[101]=V,e[102]=_e):_e=e[102];let He;e[103]!==i?(He=i("orgs.overview.tokensIn"),e[103]=i,e[104]=He):He=e[104];let qe;e[105]!==G?(qe=jt(G),e[105]=G,e[106]=qe):qe=e[106];let Be;e[107]!==i?(Be=i("orgs.overview.tokensOut"),e[107]=i,e[108]=Be):Be=e[108];let We;e[109]!==_e||e[110]!==He||e[111]!==qe||e[112]!==Be?(We=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[_e," ",He," ·"," ",qe," ",Be]}),e[109]=_e,e[110]=He,e[111]=qe,e[112]=Be,e[113]=We):We=e[113];const ut=T.data;let Ze;e[114]!==i?(Ze=i("orgs.overview.tokensAriaLabel"),e[114]=i,e[115]=Ze):Ze=e[115];let et;e[116]!==P?(et=t.jsx(Pt,{models:P,mode:"tokens"}),e[116]=P,e[117]=et):et=e[117];let tt;e[118]!==i?(tt=i("orgs.overview.aiLatency"),e[118]=i,e[119]=tt):tt=e[119];const ft=Xt(T.avgDurationMs);let st;e[120]!==i?(st=i("orgs.overview.p95Prefix"),e[120]=i,e[121]=st):st=e[121];const xt=T.data;let lt;e[122]!==i?(lt=i("orgs.overview.aiLatencyAriaLabel"),e[122]=i,e[123]=lt):lt=e[123];let rt;e[124]!==P?(rt=t.jsx(Pt,{models:P,mode:"calls"}),e[124]=P,e[125]=rt):rt=e[125];const nt=mt;let Je;e[126]!==i?(Je=i("orgs.overview.aiErrors"),e[126]=i,e[127]=Je):Je=e[127];const it=T.totalErrors.toLocaleString(),pt=T.data;let Ge;e[128]!==i?(Ge=i("orgs.overview.aiErrorsAriaLabel"),e[128]=i,e[129]=Ge):Ge=e[129];let Qe;e[130]!==T.data||e[131]!==Ge?(Qe=t.jsx(gt,{data:pt,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Ge}),e[130]=T.data,e[131]=Ge,e[132]=Qe):Qe=e[132];let ot;e[133]!==P||e[134]!==T.totalErrors||e[135]!==i?(ot=T.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:i("orgs.overview.noAiErrors")}):t.jsx(Pt,{models:P,mode:"calls"}),e[133]=P,e[134]=T.totalErrors,e[135]=i,e[136]=ot):ot=e[136];let Xe;return e[137]!==nt||e[138]!==Je||e[139]!==it||e[140]!==Qe||e[141]!==ot?(Xe=t.jsxs(nt,{title:Je,value:it,children:[Qe,ot]}),e[137]=nt,e[138]=Je,e[139]=it,e[140]=Qe,e[141]=ot,e[142]=Xe):Xe=e[142],t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-2 pb-6 max-w-[1200px] mx-auto w-full overflow-auto",children:[z,t.jsxs(mt,{title:q,value:_,children:[t.jsx(gt,{data:B,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area",ariaLabel:K}),t.jsx(Wt,{metrics:A,connections:m,mode:"requests",total:y.totalCalls})]}),ie,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(mt,{title:de,value:xe,action:ye,children:[t.jsx(gt,{data:Pe,dataKey:X,colorNum:4,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:Fe}),t.jsx(Wt,{metrics:A,connections:m,mode:"latency",total:y.totalCalls})]}),t.jsxs(mt,{title:Se,value:Oe,children:[t.jsx(gt,{data:$e,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:Ie}),y.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:i("orgs.overview.noErrors")}):t.jsx(Wt,{metrics:A,connections:m,mode:"errors",total:y.totalErrors})]})]}),Ce,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(mt,{title:Me,value:ze,children:[t.jsx(gt,{data:Ke,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:ve}),pe]}),t.jsxs(mt,{title:we,value:De,action:We,children:[t.jsx(gt,{data:ut,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Ze}),et]}),F?t.jsxs(mt,{title:i("orgs.overview.cost"),value:b>0?cs(b):"—",action:b===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:i("orgs.overview.noCostData")}):void 0,children:[t.jsx(gt,{data:T.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:i("orgs.overview.costAriaLabel")}),b>0?t.jsx(Pt,{models:P,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:i("orgs.overview.costProvidersNotice")})]}):null]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(mt,{title:tt,value:ft,action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:[st,Xt(T.p95DurationMs)]}),children:[t.jsx(gt,{data:xt,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:lt}),rt]}),Xe]})]})}function Zl(l,e){return l+e.outputSize}function er(l,e){return l+e.calls}function kt(l){const e=fe.c(8),{className:s}=l;let o;e[0]!==s?(o=Ve("pt-4 px-4 pb-6 gap-8",s),e[0]=s,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-10 w-14 rounded bg-muted animate-pulse"})]}),t.jsx("div",{className:"h-8 w-[120px] rounded-md bg-muted animate-pulse"})]}),e[2]=c):c=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=n):n=e[3];let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=Array.from({length:4}).map(tr),e[4]=f):f=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"flex flex-col gap-6",children:[n,t.jsxs("div",{className:"flex flex-col",children:[f,t.jsx("div",{className:"flex items-center h-10 px-4 gap-2",children:t.jsx("div",{className:"h-4 w-14 rounded bg-muted animate-pulse"})})]})]}),e[5]=m):m=e[5];let d;return e[6]!==o?(d=t.jsxs(Cs,{className:o,children:[c,m]}),e[6]=o,e[7]=d):d=e[7],d}function tr(l,e){return t.jsxs("div",{className:Ve("flex items-center h-10 px-3",e<3&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[t.jsx("div",{className:"size-6 rounded-md bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"})]}),t.jsxs("div",{className:"flex items-center gap-2 px-3",children:[t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"})]})]},e)}function sr(){const l=fe.c(4);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(kt,{}),l[0]=e):e=l[0];let s,o;l[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(kt,{}),t.jsx(kt,{})]}),o=t.jsx("div",{className:"border-t border-border"}),l[1]=s,l[2]=o):(s=l[1],o=l[2]);let c;return l[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,s,o,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(kt,{}),t.jsx(kt,{}),t.jsx(kt,{})]})]}),l[3]=c):c=l[3],c}function lr(l){const e=fe.c(49),{log:s,connection:o,virtualMcpName:c,virtualMcpIcon:n,onClick:f,lastLogRef:m}=l,d=Ae();let r,h;if(e[0]!==s.timestamp){const P=new Date(s.timestamp);r=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),h=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=s.timestamp,e[1]=r,e[2]=h}else r=e[1],h=e[2];const g=h,u=o?.icon||null,i=o?.title??s.connectionId;let w;e[3]!==u||e[4]!==i?(w=t.jsx(Ue,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(It,{icon:u,name:i,size:"xs",className:"shadow-sm"})})}),e[3]=u,e[4]=i,e[5]=w):w=e[5];let a;e[6]!==s.toolName?(a=t.jsx("div",{className:"font-medium text-foreground truncate block",children:s.toolName}),e[6]=s.toolName,e[7]=a):a=e[7];const I=o?.title??s.connectionId;let N;e[8]!==I?(N=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:I}),e[8]=I,e[9]=N):N=e[9];let v;e[10]!==a||e[11]!==N?(v=t.jsxs(Ue,{className:"min-w-0 pr-2 md:pr-4",children:[a,N]}),e[10]=a,e[11]=N,e[12]=v):v=e[12];let D;e[13]!==n||e[14]!==c?(D=t.jsx(Ue,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:c?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(It,{icon:n,name:c,size:"xs",fallbackIcon:t.jsx(Lt,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:c})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=n,e[14]=c,e[15]=D):D=e[15];let x;e[16]!==s.userImage||e[17]!==s.userName?(x=t.jsx(as,{url:s.userImage,fallback:s.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=s.userImage,e[17]=s.userName,e[18]=x):x=e[18];let L;e[19]!==s.userName?(L=t.jsx("span",{className:"truncate",children:s.userName}),e[19]=s.userName,e[20]=L):L=e[20];let C;e[21]!==x||e[22]!==L?(C=t.jsx(Ue,{className:"w-28 md:w-36 px-2 md:px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,L]})}),e[21]=x,e[22]=L,e[23]=C):C=e[23];let p;e[24]!==r?(p=t.jsx("div",{children:r}),e[24]=r,e[25]=p):p=e[25];let j;e[26]!==g?(j=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:g}),e[26]=g,e[27]=j):j=e[27];let k;e[28]!==p||e[29]!==j?(k=t.jsxs(Ue,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[p,j]}),e[28]=p,e[29]=j,e[30]=k):k=e[30];let S;e[31]!==s.durationMs?(S=t.jsxs(Ue,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[s.durationMs,"ms"]}),e[31]=s.durationMs,e[32]=S):S=e[32];const M=s.isError?"destructive":"success";let y;e[33]!==s.isError||e[34]!==d?(y=s.isError?d("monitoring.logRow.statusError"):d("monitoring.logRow.statusOk"),e[33]=s.isError,e[34]=d,e[35]=y):y=e[35];let T;e[36]!==M||e[37]!==y?(T=t.jsx(Ue,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(Dt,{variant:M,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:y})})}),e[36]=M,e[37]=y,e[38]=T):T=e[38];let $;return e[39]!==m||e[40]!==f||e[41]!==C||e[42]!==k||e[43]!==S||e[44]!==T||e[45]!==w||e[46]!==v||e[47]!==D?($=t.jsxs(Rt,{ref:m,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:f,children:[w,v,D,C,k,S,T]}),e[39]=m,e[40]=f,e[41]=C,e[42]=k,e[43]=S,e[44]=T,e[45]=w,e[46]=v,e[47]=D,e[48]=$):$=e[48],$}function rr(l){const e=fe.c(79),{connectionIds:s,virtualMcpIds:o,tool:c,status:n,search:f,logs:m,hasMore:d,onLoadMore:r,isLoadingMore:h,connections:g,virtualMcps:u,membersData:i,client:w}=l,a=Ae(),I=g??[],N=u??[],v=Ps(r,d,h),D=ds(i),x=new Map(D.map(ir)),L=new Map(N.map(nr));let p=m.map(E=>{const se=x.get(E.userId??""),ue=E.virtualMcpId?L.get(E.virtualMcpId):null;return{...E,userName:se?.name??E.userId??"Unknown",userImage:se?.image??void 0,virtualMcpName:ue?.title??null,virtualMcpIcon:ue?.icon??null}});if(s.length>1){let E;e[0]!==s?(E=se=>s.includes(se.connectionId),e[0]=s,e[1]=E):E=e[1],p=p.filter(E)}if(o.length>1){let E;e[2]!==o?(E=se=>se.virtualMcpId&&o.includes(se.virtualMcpId),e[2]=o,e[3]=E):E=e[3],p=p.filter(E)}const j=new Map(I.map(or));if(f){const E=f.toLowerCase();p=p.filter(se=>se.toolName.toLowerCase().includes(E)||(j.get(se.connectionId)?.title??se.connectionId).toLowerCase().includes(E)||se.errorMessage?.toLowerCase().includes(E))}const k=Rs(p),S=k.selected;let M;e[4]!==S?.id?(M=Nt.monitoringLogDetail(S?.id??""),e[4]=S?.id,e[5]=M):M=e[5];let y;e[6]!==w||e[7]!==S?(y=async()=>{if(!w)throw new Error("MCP client is not available");const E=await w.callTool({name:"MONITORING_LOG_GET",arguments:{id:S.id}});return E.structuredContent??E},e[6]=w,e[7]=S,e[8]=y):y=e[8];const T=S!==null;let $;e[9]!==M||e[10]!==y||e[11]!==T?($={queryKey:M,queryFn:y,enabled:T},e[9]=M,e[10]=y,e[11]=T,e[12]=$):$=e[12];const P=zt($),V=P.data?.log;let G;e[13]!==V||e[14]!==S?(G=S&&V?{...S,input:V.input,output:V.output}:S,e[13]=V,e[14]=S,e[15]=G):G=e[15];const Q=G;if(p.length===0){let E;e[16]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[16]=E):E=e[16];let se;e[17]!==a?(se=a("orgs.audit.noLogsFound"),e[17]=a,e[18]=se):se=e[18];let ue;e[19]!==s.length||e[20]!==f||e[21]!==n||e[22]!==a||e[23]!==c||e[24]!==o.length?(ue=f||s.length>0||o.length>0||c||n!=="all"?a("orgs.audit.noLogsMatchFilters"):a("orgs.audit.noLogsInTimeRange"),e[19]=s.length,e[20]=f,e[21]=n,e[22]=a,e[23]=c,e[24]=o.length,e[25]=ue):ue=e[25];let he;return e[26]!==se||e[27]!==ue?(he=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Bt,{image:E,title:se,description:ue})}),e[26]=se,e[27]=ue,e[28]=he):he=e[28],he}const b="flex-1 flex flex-col min-w-0",F="flex-1 min-w-0 pt-1",R="min-w-[600px] md:min-w-0",A=us,X="w-full border-collapse";let W;e[29]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(je,{className:"w-5"}),e[29]=W):W=e[29];let U;e[30]!==a?(U=a("orgs.audit.toolConnection"),e[30]=a,e[31]=U):U=e[31];let H;e[32]!==U?(H=t.jsx(je,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:U}),e[32]=U,e[33]=H):H=e[33];let z;e[34]!==a?(z=a("orgs.audit.agent"),e[34]=a,e[35]=z):z=e[35];let q;e[36]!==z?(q=t.jsx(je,{className:"w-36 md:w-44 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:z}),e[36]=z,e[37]=q):q=e[37];let _;e[38]!==a?(_=a("orgs.audit.user"),e[38]=a,e[39]=_):_=e[39];let B;e[40]!==_?(B=t.jsx(je,{className:"w-28 md:w-36 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:_}),e[40]=_,e[41]=B):B=e[41];let K;e[42]!==a?(K=a("orgs.audit.date"),e[42]=a,e[43]=K):K=e[43];let O;e[44]!==K?(O=t.jsx(je,{className:"w-32 md:w-40 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:K}),e[44]=K,e[45]=O):O=e[45];let Z;e[46]!==a?(Z=a("orgs.audit.latency"),e[46]=a,e[47]=Z):Z=e[47];let ee;e[48]!==Z?(ee=t.jsx(je,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:Z}),e[48]=Z,e[49]=ee):ee=e[49];let J;e[50]!==a?(J=a("orgs.audit.status"),e[50]=a,e[51]=J):J=e[51];let me;e[52]!==J?(me=t.jsx(je,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:J}),e[52]=J,e[53]=me):me=e[53];let te;e[54]!==H||e[55]!==q||e[56]!==B||e[57]!==O||e[58]!==ee||e[59]!==me?(te=t.jsx(fs,{className:"border-b-0 z-20",children:t.jsxs(Rt,{className:"h-9 hover:bg-transparent border-b border-border",children:[W,H,q,B,O,ee,me]})}),e[54]=H,e[55]=q,e[56]=B,e[57]=O,e[58]=ee,e[59]=me,e[60]=te):te=e[60];const ae=ms,re=p.map((E,se)=>t.jsx(lr,{log:E,connection:j.get(E.connectionId),virtualMcpName:E.virtualMcpName??"",virtualMcpIcon:E.virtualMcpIcon,onClick:()=>k.select(E.id),lastLogRef:se===p.length-1?v:void 0},E.id));let Y;e[61]!==ae||e[62]!==re?(Y=t.jsx(ae,{children:re}),e[61]=ae,e[62]=re,e[63]=Y):Y=e[63];let oe;e[64]!==A||e[65]!==te||e[66]!==Y?(oe=t.jsx("div",{className:F,children:t.jsx("div",{className:R,children:t.jsxs(A,{className:X,children:[te,Y]})})}),e[64]=A,e[65]=te,e[66]=Y,e[67]=oe):oe=e[67];let ne;e[68]!==k?(ne=E=>{E||k.close()},e[68]=k,e[69]=ne):ne=e[69];const ce=S&&t.jsxs(t.Fragment,{children:[t.jsx(Sl,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(It,{icon:j.get(S.connectionId)?.icon||null,name:j.get(S.connectionId)?.title??S.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Il,{className:"text-sm leading-snug truncate",children:S.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:j.get(S.connectionId)?.title??S.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(ge,{size:"icon",variant:"ghost",onClick:k.prev,disabled:k.index===0,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.audit.previousEntry"),children:t.jsx(es,{size:14})}),t.jsx(ge,{size:"icon",variant:"ghost",onClick:k.next,disabled:k.index===p.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.audit.nextEntry"),children:t.jsx(qt,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:P.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx(Vs,{className:"size-5 text-muted-foreground"})}):P.isError?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:a("orgs.audit.failedLoadLogDetails")}),t.jsx(ge,{variant:"outline",size:"sm",onClick:()=>P.refetch(),children:a("orgs.audit.retry")})]}):t.jsx(Fl,{log:Q})})]});let ie;e[70]!==ce?(ie=t.jsx(Ls,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:ce}),e[70]=ce,e[71]=ie):ie=e[71];let de;e[72]!==k.isOpen||e[73]!==ne||e[74]!==ie?(de=t.jsx(Ds,{open:k.isOpen,onOpenChange:ne,children:ie}),e[72]=k.isOpen,e[73]=ne,e[74]=ie,e[75]=de):de=e[75];let xe;return e[76]!==oe||e[77]!==de?(xe=t.jsxs("div",{className:b,children:[oe,de]}),e[76]=oe,e[77]=de,e[78]=xe):xe=e[78],xe}function or(l){return[l.id,l]}function nr(l){return[l.id,l]}function ir(l){return[l.userId,l.user]}function ar(){const l=fe.c(8);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(je,{className:"w-12 md:w-16 px-2 md:px-4"}),l[0]=e):e=l[0];let s;l[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(je,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),l[1]=s):s=l[1];let o;l[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(je,{className:"w-24 md:w-32 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),l[2]=o):o=l[2];let c;l[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(je,{className:"w-20 md:w-24 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),l[3]=c):c=l[3];let n;l[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(je,{className:"w-32 md:w-40 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),l[4]=n):n=l[4];let f;l[5]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(je,{className:"w-16 md:w-20 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),l[5]=f):f=l[5];let m;l[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(fs,{className:"border-b-0 z-20",children:t.jsxs(Rt,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,s,o,c,n,f,t.jsx(je,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),l[6]=m):m=l[6];let d;return l[7]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsxs(us,{className:"w-full border-collapse",children:[m,t.jsx(ms,{children:Array.from({length:8}).map(cr)})]})})}),l[7]=d):d=l[7],d}function cr(l,e){return t.jsxs(Rt,{className:"h-14 border-b border-border hover:bg-transparent",children:[t.jsx("td",{className:"px-2 md:px-4",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"pr-2 md:pr-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const ss=Object.assign(rr,{Skeleton:ar});function dr(l){const e=fe.c(34),{client:s,locator:o,baseParams:c,pageSize:n,isStreaming:f,streamingRefetchInterval:m,connectionIds:d,virtualMcpIds:r,tool:h,status:g,searchQuery:u,allConnections:i,allVirtualMcps:w,membersData:a}=l;let I;e[0]!==c||e[1]!==o?(I=Nt.monitoringLogsInfinite(o,JSON.stringify(c)),e[0]=c,e[1]=o,e[2]=I):I=e[2];let N;e[3]!==c||e[4]!==s||e[5]!==n?(N=async P=>{const{pageParam:V}=P,G=V===void 0?0:V;if(!s)throw new Error("MCP client is not available");const Q=await s.callTool({name:"MONITORING_LOGS_LIST",arguments:{...c,limit:n,offset:G}});return Q.structuredContent??Q},e[3]=c,e[4]=s,e[5]=n,e[6]=N):N=e[6];let v;e[7]!==n?(v=(P,V)=>{if(!((P?.logs?.length??0)<n))return V.length*n},e[7]=n,e[8]=v):v=e[8];const D=f?m:!1;let x;e[9]!==I||e[10]!==N||e[11]!==v||e[12]!==D?(x={queryKey:I,queryFn:N,initialPageParam:0,getNextPageParam:v,staleTime:0,refetchInterval:D},e[9]=I,e[10]=N,e[11]=v,e[12]=D,e[13]=x):x=e[13];const{data:L,fetchNextPage:C,hasNextPage:p,isFetchingNextPage:j}=yl(x);let k;e[14]!==L.pages?(k=L.pages.flatMap(mr),e[14]=L.pages,e[15]=k):k=e[15];const S=k;let M;e[16]!==C||e[17]!==p||e[18]!==j?(M=()=>{p&&!j&&C()},e[16]=C,e[17]=p,e[18]=j,e[19]=M):M=e[19];const y=M,T=p??!1;let $;return e[20]!==i||e[21]!==w||e[22]!==s||e[23]!==d||e[24]!==y||e[25]!==j||e[26]!==a||e[27]!==S||e[28]!==u||e[29]!==g||e[30]!==T||e[31]!==h||e[32]!==r?($=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx(ss,{connectionIds:d,virtualMcpIds:r,tool:h,status:g,search:u,logs:S,hasMore:T,onLoadMore:y,isLoadingMore:j,connections:i,virtualMcps:w,membersData:a,client:s})})})}),e[20]=i,e[21]=w,e[22]=s,e[23]=d,e[24]=y,e[25]=j,e[26]=a,e[27]=S,e[28]=u,e[29]=g,e[30]=T,e[31]=h,e[32]=r,e[33]=$):$=e[33],$}function mr(l){return l.logs??[]}function ur(l){const e=fe.c(95),{thread:s,usage:o,members:c,connections:n,virtualMcps:f,onClick:m,lastRowRef:d}=l,r=Ae(),h=Jt();let g,u;if(e[0]!==n||e[1]!==s||e[2]!==f){const _=Nl(s);g=bl(_,f,n,"—"),u=wl(_,f,n),e[0]=n,e[1]=s,e[2]=f,e[3]=g,e[4]=u}else g=e[3],u=e[4];const i=u;let w;if(e[5]!==c||e[6]!==s.created_by){const _=ds(c);let B;e[8]!==s.created_by?(B=K=>K.userId===s.created_by,e[8]=s.created_by,e[9]=B):B=e[9],w=_.find(B),e[5]=c,e[6]=s.created_by,e[7]=w}else w=e[7];const a=w;let I;e[10]!==a?.user.email||e[11]!==a?.user.name||e[12]!==s.created_by?(I=a?.user.name??a?.user.email??s.created_by?.substring(0,8)??"—",e[10]=a?.user.email,e[11]=a?.user.name,e[12]=s.created_by,e[13]=I):I=e[13];const N=I,v=a?.user.image??void 0;let D,x;if(e[14]!==s.created_at){const _=new Date(s.created_at);D=_.toLocaleDateString("en-US",{month:"short",day:"numeric"}),x=_.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),e[14]=s.created_at,e[15]=D,e[16]=x}else D=e[15],x=e[16];const L=x;let C,p,j,k,S,M,y,T,$,P,V,G,Q;if(e[17]!==i||e[18]!==g||e[19]!==d||e[20]!==m||e[21]!==r||e[22]!==s.status||e[23]!==s.title||e[24]!==v||e[25]!==N){const _=Cl(s.status),B=_.icon;p=Rt,j=d,k="h-14 md:h-16 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=m,e[39]!==s.title?(M=t.jsx(Ue,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:t.jsx("div",{className:"font-medium text-foreground truncate",children:s.title})}),e[39]=s.title,e[40]=M):M=e[40];let K;e[41]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(Lt,{}),e[41]=K):K=e[41];let O;e[42]!==i||e[43]!==g?(O=t.jsx(It,{icon:i,name:g,size:"xs",fallbackIcon:K,className:"shrink-0 size-5! min-w-5! rounded-md"}),e[42]=i,e[43]=g,e[44]=O):O=e[44];let Z;e[45]!==g?(Z=t.jsx("span",{className:"truncate",children:g}),e[45]=g,e[46]=Z):Z=e[46],e[47]!==O||e[48]!==Z?(y=t.jsx(Ue,{className:"w-36 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[O,Z]})}),e[47]=O,e[48]=Z,e[49]=y):y=e[49];let ee;e[50]!==v||e[51]!==N?(ee=t.jsx(as,{url:v,fallback:N,shape:"circle",size:"2xs",className:"shrink-0"}),e[50]=v,e[51]=N,e[52]=ee):ee=e[52];let J;e[53]!==N?(J=t.jsx("span",{className:"truncate",children:N}),e[53]=N,e[54]=J):J=e[54],e[55]!==ee||e[56]!==J?(T=t.jsx(Ue,{className:"w-28 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[ee,J]})}),e[55]=ee,e[56]=J,e[57]=T):T=e[57],C=Ue,Q="w-24 px-3",V="flex items-center gap-1.5",G=t.jsx(B,{size:14,className:_.iconClassName}),$=Ve("text-sm",_.labelColor),P=r(_.labelKey),e[17]=i,e[18]=g,e[19]=d,e[20]=m,e[21]=r,e[22]=s.status,e[23]=s.title,e[24]=v,e[25]=N,e[26]=C,e[27]=p,e[28]=j,e[29]=k,e[30]=S,e[31]=M,e[32]=y,e[33]=T,e[34]=$,e[35]=P,e[36]=V,e[37]=G,e[38]=Q}else C=e[26],p=e[27],j=e[28],k=e[29],S=e[30],M=e[31],y=e[32],T=e[33],$=e[34],P=e[35],V=e[36],G=e[37],Q=e[38];let b;e[58]!==$||e[59]!==P?(b=t.jsx("span",{className:$,children:P}),e[58]=$,e[59]=P,e[60]=b):b=e[60];let F;e[61]!==b||e[62]!==V||e[63]!==G?(F=t.jsxs("div",{className:V,children:[G,b]}),e[61]=b,e[62]=V,e[63]=G,e[64]=F):F=e[64];let R;e[65]!==C||e[66]!==F||e[67]!==Q?(R=t.jsx(C,{className:Q,children:F}),e[65]=C,e[66]=F,e[67]=Q,e[68]=R):R=e[68];let A;e[69]!==o?(A=o?jt(o.totalTokens):"—",e[69]=o,e[70]=A):A=e[70];let X;e[71]!==A?(X=t.jsx(Ue,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:A}),e[71]=A,e[72]=X):X=e[72];let W;e[73]!==h||e[74]!==o?(W=h&&t.jsx(Ue,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:o&&o.costUsd>0?cs(o.costUsd):"—"}),e[73]=h,e[74]=o,e[75]=W):W=e[75];let U;e[76]!==D?(U=t.jsx("div",{children:D}),e[76]=D,e[77]=U):U=e[77];let H;e[78]!==L?(H=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:L}),e[78]=L,e[79]=H):H=e[79];let z;e[80]!==U||e[81]!==H?(z=t.jsxs(Ue,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[U,H]}),e[80]=U,e[81]=H,e[82]=z):z=e[82];let q;return e[83]!==p||e[84]!==j||e[85]!==k||e[86]!==S||e[87]!==M||e[88]!==y||e[89]!==T||e[90]!==R||e[91]!==X||e[92]!==W||e[93]!==z?(q=t.jsxs(p,{ref:j,className:k,onClick:S,children:[M,y,T,R,X,W,z]}),e[83]=p,e[84]=j,e[85]=k,e[86]=S,e[87]=M,e[88]=y,e[89]=T,e[90]=R,e[91]=X,e[92]=W,e[93]=z,e[94]=q):q=e[94],q}function fr(){const l=fe.c(4),e=Ae();let s;l[0]!==e?(s=e("orgs.threads.loading"),l[0]=e,l[1]=s):s=l[1];let o;return l[2]!==s?(o=t.jsx("div",{className:"flex flex-1 items-center justify-center py-20",children:t.jsx("span",{className:"text-sm text-muted-foreground",children:s})}),l[2]=s,l[3]=o):o=l[3],o}function xr(l){const e=fe.c(9),{hasActiveFilters:s,t:o}=l,c=s?"orgs.threads.noMatchingChats":"orgs.threads.noChatsInTimeRange";let n;e[0]!==o||e[1]!==c?(n=o(c),e[0]=o,e[1]=c,e[2]=n):n=e[2];const f=s?"orgs.threads.tryAdjustingFilters":"orgs.threads.tryExpandingTimeRange";let m;e[3]!==o||e[4]!==f?(m=o(f),e[3]=o,e[4]=f,e[5]=m):m=e[5];let d;return e[6]!==n||e[7]!==m?(d=t.jsx("div",{className:"flex flex-1 items-center justify-center py-20",children:t.jsx(Bt,{title:n,description:m})}),e[6]=n,e[7]=m,e[8]=d):d=e[8],d}function pr(){const l=fe.c(4),e=Ae();let s;l[0]!==e?(s=e("orgs.threads.loadingMore"),l[0]=e,l[1]=s):s=l[1];let o;return l[2]!==s?(o=t.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:s}),l[2]=s,l[3]=o):o=l[3],o}const ls=50;function gr(l){const e=fe.c(25),{client:s,locator:o,membersData:c,allConnections:n,allVirtualMcps:f,dateRange:m,searchQuery:d,filterAgentIds:r,filterUserIds:h,filterStatus:g,filterSource:u}=l,i=Ae(),w=Jt(),a=m.startDate.toISOString(),I=m.endDate.toISOString(),N=JSON.stringify({startDate:a,endDate:I,search:d,agentIds:r,userIds:h,status:g,source:u}),{data:v,fetchNextPage:D,hasNextPage:x,isFetchingNextPage:L,isLoading:C}=Tl({queryKey:Nt.threadsInfinite(o,N),queryFn:async _=>{const{pageParam:B}=_,K=B===void 0?0:B;if(!s)throw new Error("MCP client is not available");const O=await s.callTool({name:"COLLECTION_THREADS_LIST",arguments:{limit:ls,offset:K,startDate:a,endDate:I,...d?{search:d}:{},...r&&r.length>0?{agentId:r[0]}:{},...h&&h.length>0?{userId:h[0]}:{},...g&&g!=="all"?{status:g}:{},...u&&u!=="all"?{source:u}:{}}});return O.structuredContent??O},initialPageParam:0,getNextPageParam:br,staleTime:3e4}),p=(v?.pages??[]).flatMap(Nr),j=p.map(jr),{data:k}=zt({queryKey:Nt.monitoringThreadUsage(o,JSON.stringify({ids:j,startDate:a,endDate:I})),queryFn:async()=>{if(!s)throw new Error("MCP client is not available");const _=await s.callTool({name:"MONITORING_THREAD_USAGE",arguments:{threadIds:j,startDate:a,endDate:I}});return _.structuredContent??_},enabled:!!s&&j.length>0,staleTime:3e4}),S=new Map((k?.items??[]).map(vr)),[M,y]=le.useState(null),[T,$]=le.useState("desc");let P;e[0]!==M?(P=_=>{M===_?$(hr):(y(_),$("desc"))},e[0]=M,e[1]=P):P=e[1];const V=P,G=_=>{const B=S.get(_);return B?M==="cost"?B.costUsd:B.totalTokens:0},Q=M?[...p].sort((_,B)=>{const K=G(_.id),O=G(B.id);return T==="desc"?O-K:K-O}):p,b=Rs(Q),F=b.selected;let R;e[2]!==D||e[3]!==x||e[4]!==L?(R=()=>{x&&!L&&D()},e[2]=D,e[3]=x,e[4]=L,e[5]=R):R=e[5];const X=Ps(R,x??!1,L),W=!!d||(r?.length??0)>0||(h?.length??0)>0||!!(g&&g!=="all")||!!(u&&u!=="all");let U;e[6]!==b?(U=_=>{_||b.close()},e[6]=b,e[7]=U):U=e[7];let H;e[8]!==n||e[9]!==f||e[10]!==s||e[11]!==Q||e[12]!==o||e[13]!==c||e[14]!==F||e[15]!==b.index||e[16]!==b.next||e[17]!==b.prev?(H=F&&t.jsx(jl,{thread:F,client:s,locator:o,connections:n,virtualMcps:f,members:c,nav:{index:b.index,total:Q.length,onPrev:b.prev,onNext:b.next}}),e[8]=n,e[9]=f,e[10]=s,e[11]=Q,e[12]=o,e[13]=c,e[14]=F,e[15]=b.index,e[16]=b.next,e[17]=b.prev,e[18]=H):H=e[18];let z;e[19]!==H?(z=t.jsx(Ls,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:H}),e[19]=H,e[20]=z):z=e[20];let q;return e[21]!==b.isOpen||e[22]!==U||e[23]!==z?(q=t.jsx(Ds,{open:b.isOpen,onOpenChange:U,children:z}),e[21]=b.isOpen,e[22]=U,e[23]=z,e[24]=q):q=e[24],t.jsxs("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:[t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx("div",{className:"flex-1 min-w-0 pt-1",children:t.jsx("div",{className:"min-w-0",children:C?t.jsx(fr,{}):p.length===0?t.jsx(xr,{hasActiveFilters:W,t:i}):t.jsxs(t.Fragment,{children:[t.jsxs(us,{className:"w-full border-collapse",children:[t.jsx(fs,{className:"border-b-0 z-20",children:t.jsxs(Rt,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(je,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("orgs.threads.title")}),t.jsx(je,{className:"w-36 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("orgs.threads.agent")}),t.jsx(je,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("orgs.threads.user")}),t.jsx(je,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("orgs.threads.status")}),t.jsx(je,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:t.jsxs("button",{type:"button",onClick:()=>V("tokens"),className:"inline-flex items-center gap-1 ml-auto hover:text-foreground transition-colors uppercase",children:[i("orgs.threads.tokens"),M==="tokens"&&(T==="desc"?t.jsx(qt,{size:12}):t.jsx(es,{size:12}))]})}),w&&t.jsx(je,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:t.jsxs("button",{type:"button",onClick:()=>V("cost"),className:"inline-flex items-center gap-1 ml-auto hover:text-foreground transition-colors uppercase",children:[i("orgs.threads.cost"),M==="cost"&&(T==="desc"?t.jsx(qt,{size:12}):t.jsx(es,{size:12}))]})}),t.jsx(je,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("orgs.threads.date")})]})}),t.jsx(ms,{children:Q.map((_,B)=>t.jsx(ur,{thread:_,usage:S.get(_.id),members:c,connections:n,virtualMcps:f,onClick:()=>b.select(_.id),lastRowRef:B===Q.length-1?X:void 0},_.id))})]}),L&&t.jsx(pr,{})]})})})})}),q]})}function hr(l){return l==="desc"?"asc":"desc"}function vr(l){return[l.threadId,{calls:l.calls,inputTokens:l.inputTokens,outputTokens:l.outputTokens,totalTokens:l.totalTokens,costUsd:l.costUsd}]}function jr(l){return l.id}function Nr(l){return l.items??[]}function br(l,e){const s=l,o=e;if(!((s?.items?.length??0)<ls))return o.length*ls}function wr(l){const e=fe.c(123),{filterAgentIds:s,filterUserIds:o,filterStatus:c,filterSource:n,virtualMcpOptions:f,memberOptions:m,activeFiltersCount:d,onUpdateFilters:r}=l,[h,g]=le.useState(!1),u=Ae();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(is,{size:16}),e[0]=i):i=e[0];let w;e[1]!==u?(w=u("orgs.threadsFiltersPopover.filters"),e[1]=u,e[2]=w):w=e[2];let a;e[3]!==w?(a=t.jsx("span",{className:"hidden sm:inline",children:w}),e[3]=w,e[4]=a):a=e[4];let I;e[5]!==d?(I=d>0&&t.jsxs(t.Fragment,{children:[t.jsx(Dt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:d}),t.jsx(Dt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:d})]}),e[5]=d,e[6]=I):I=e[6];let N;e[7]!==a||e[8]!==I?(N=t.jsx(At,{asChild:!0,children:t.jsxs(ge,{variant:"outline",className:"relative",children:[i,a,I]})}),e[7]=a,e[8]=I,e[9]=N):N=e[9];let v;e[10]!==u?(v=u("orgs.threadsFiltersPopover.filterChats"),e[10]=u,e[11]=v):v=e[11];let D;e[12]!==v?(D=t.jsx("h4",{className:"font-medium text-sm",children:v}),e[12]=v,e[13]=D):D=e[13];let x;e[14]!==u?(x=u("orgs.threadsFiltersPopover.agent"),e[14]=u,e[15]=x):x=e[15];let L;e[16]!==x?(L=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:x}),e[16]=x,e[17]=L):L=e[17];let C;e[18]!==r?(C=xe=>r({filterAgentIds:xe.slice(0,1)}),e[18]=r,e[19]=C):C=e[19];let p;e[20]!==u?(p=u("orgs.threadsFiltersPopover.allAgents"),e[20]=u,e[21]=p):p=e[21];let j;e[22]!==s||e[23]!==C||e[24]!==p||e[25]!==f?(j=t.jsx($t,{options:f,defaultValue:s,onValueChange:C,placeholder:p,variant:"secondary",className:"w-full",maxCount:1}),e[22]=s,e[23]=C,e[24]=p,e[25]=f,e[26]=j):j=e[26];let k;e[27]!==j||e[28]!==L?(k=t.jsxs("div",{children:[L,j]}),e[27]=j,e[28]=L,e[29]=k):k=e[29];let S;e[30]!==u?(S=u("orgs.threadsFiltersPopover.user"),e[30]=u,e[31]=S):S=e[31];let M;e[32]!==S?(M=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:S}),e[32]=S,e[33]=M):M=e[33];let y;e[34]!==r?(y=xe=>r({filterUserIds:xe.slice(0,1)}),e[34]=r,e[35]=y):y=e[35];let T;e[36]!==u?(T=u("orgs.threadsFiltersPopover.allUsers"),e[36]=u,e[37]=T):T=e[37];let $;e[38]!==o||e[39]!==m||e[40]!==y||e[41]!==T?($=t.jsx($t,{options:m,defaultValue:o,onValueChange:y,placeholder:T,variant:"secondary",className:"w-full",maxCount:1}),e[38]=o,e[39]=m,e[40]=y,e[41]=T,e[42]=$):$=e[42];let P;e[43]!==M||e[44]!==$?(P=t.jsxs("div",{children:[M,$]}),e[43]=M,e[44]=$,e[45]=P):P=e[45];let V;e[46]!==u?(V=u("orgs.threadsFiltersPopover.status"),e[46]=u,e[47]=V):V=e[47];let G;e[48]!==V?(G=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:V}),e[48]=V,e[49]=G):G=e[49];let Q;e[50]!==r?(Q=xe=>r({filterStatus:xe}),e[50]=r,e[51]=Q):Q=e[51];let b;e[52]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(bt,{className:"w-full",children:t.jsx(wt,{})}),e[52]=b):b=e[52];let F;e[53]!==u?(F=u("orgs.threadsFiltersPopover.allStatuses"),e[53]=u,e[54]=F):F=e[54];let R;e[55]!==F?(R=t.jsx(Ee,{value:"all",children:F}),e[55]=F,e[56]=R):R=e[56];let A;e[57]!==u?(A=u("orgs.threadsFiltersPopover.completed"),e[57]=u,e[58]=A):A=e[58];let X;e[59]!==A?(X=t.jsx(Ee,{value:"completed",children:A}),e[59]=A,e[60]=X):X=e[60];let W;e[61]!==u?(W=u("orgs.threadsFiltersPopover.active"),e[61]=u,e[62]=W):W=e[62];let U;e[63]!==W?(U=t.jsx(Ee,{value:"active",children:W}),e[63]=W,e[64]=U):U=e[64];let H;e[65]!==u?(H=u("orgs.threadsFiltersPopover.failed"),e[65]=u,e[66]=H):H=e[66];let z;e[67]!==H?(z=t.jsx(Ee,{value:"failed",children:H}),e[67]=H,e[68]=z):z=e[68];let q;e[69]!==R||e[70]!==X||e[71]!==U||e[72]!==z?(q=t.jsxs(yt,{children:[R,X,U,z]}),e[69]=R,e[70]=X,e[71]=U,e[72]=z,e[73]=q):q=e[73];let _;e[74]!==c||e[75]!==Q||e[76]!==q?(_=t.jsxs(St,{value:c,onValueChange:Q,children:[b,q]}),e[74]=c,e[75]=Q,e[76]=q,e[77]=_):_=e[77];let B;e[78]!==G||e[79]!==_?(B=t.jsxs("div",{children:[G,_]}),e[78]=G,e[79]=_,e[80]=B):B=e[80];let K;e[81]!==u?(K=u("orgs.threadsFiltersPopover.source"),e[81]=u,e[82]=K):K=e[82];let O;e[83]!==K?(O=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:K}),e[83]=K,e[84]=O):O=e[84];let Z;e[85]!==r?(Z=xe=>r({filterSource:xe}),e[85]=r,e[86]=Z):Z=e[86];let ee;e[87]===Symbol.for("react.memo_cache_sentinel")?(ee=t.jsx(bt,{className:"w-full",children:t.jsx(wt,{})}),e[87]=ee):ee=e[87];let J;e[88]!==u?(J=u("orgs.threadsFiltersPopover.allSources"),e[88]=u,e[89]=J):J=e[89];let me;e[90]!==J?(me=t.jsx(Ee,{value:"all",children:J}),e[90]=J,e[91]=me):me=e[91];let te;e[92]!==u?(te=u("orgs.threadsFiltersPopover.sourceJira"),e[92]=u,e[93]=te):te=e[93];let ae;e[94]!==te?(ae=t.jsx(Ee,{value:"jira",children:te}),e[94]=te,e[95]=ae):ae=e[95];let re;e[96]!==me||e[97]!==ae?(re=t.jsxs(yt,{children:[me,ae]}),e[96]=me,e[97]=ae,e[98]=re):re=e[98];let Y;e[99]!==n||e[100]!==Z||e[101]!==re?(Y=t.jsxs(St,{value:n,onValueChange:Z,children:[ee,re]}),e[99]=n,e[100]=Z,e[101]=re,e[102]=Y):Y=e[102];let oe;e[103]!==O||e[104]!==Y?(oe=t.jsxs("div",{children:[O,Y]}),e[103]=O,e[104]=Y,e[105]=oe):oe=e[105];let ne;e[106]!==k||e[107]!==P||e[108]!==B||e[109]!==oe?(ne=t.jsxs("div",{className:"space-y-3",children:[k,P,B,oe]}),e[106]=k,e[107]=P,e[108]=B,e[109]=oe,e[110]=ne):ne=e[110];let ce;e[111]!==d||e[112]!==r||e[113]!==u?(ce=d>0&&t.jsx(ge,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{r({filterAgentIds:[],filterUserIds:[],filterStatus:"all",filterSource:"all"}),g(!1)},children:u("orgs.threadsFiltersPopover.clearAllFilters")}),e[111]=d,e[112]=r,e[113]=u,e[114]=ce):ce=e[114];let ie;e[115]!==ne||e[116]!==ce||e[117]!==D?(ie=t.jsx(Ut,{align:"end",className:"w-[280px]",children:t.jsxs("div",{className:"space-y-4",children:[D,ne,ce]})}),e[115]=ne,e[116]=ce,e[117]=D,e[118]=ie):ie=e[118];let de;return e[119]!==h||e[120]!==ie||e[121]!==N?(de=t.jsxs(Et,{open:h,onOpenChange:g,children:[N,ie]}),e[119]=h,e[120]=ie,e[121]=N,e[122]=de):de=e[122],de}function yr(l){const e=fe.c(16),{dateRange:s}=l,o=Ae(),{data:c,isLoading:n}=Ml(void 0);let f;e[0]!==c?(f=c===void 0?[]:c,e[0]=c,e[1]=f):f=e[1];const m=f,[d,r]=le.useState(null),h=d??m[0]?.id??null,{data:g}=_l(h??"");let u;e[2]!==s.startDate?(u=s.startDate.toISOString(),e[2]=s.startDate,e[3]=u):u=e[3];let i;e[4]!==s.endDate?(i=s.endDate.toISOString(),e[4]=s.endDate,e[5]=i):i=e[5];let w;e[6]!==u||e[7]!==i?(w={startDate:u,endDate:i},e[6]=u,e[7]=i,e[8]=w):w=e[8];const a=w;let I;return e[9]!==g||e[10]!==m||e[11]!==h||e[12]!==n||e[13]!==a||e[14]!==o?(I=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:n?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("orgs.automations.loading")}):m.length===0?t.jsx("div",{className:"py-16",children:t.jsx(Bt,{title:o("orgs.automations.emptyTitle"),description:o("orgs.automations.emptyDescription")})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(St,{value:h??"",onValueChange:N=>r(N),children:[t.jsx(bt,{className:"w-72",children:t.jsx(wt,{placeholder:o("orgs.automations.selectPlaceholder")})}),t.jsx(yt,{children:m.map(Ir)})]})}),g?t.jsx(kl,{automationId:g.id,triggerIds:g.triggers.map(Sr),range:a}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("orgs.automations.loading")})]})})}),e[9]=g,e[10]=m,e[11]=h,e[12]=n,e[13]=a,e[14]=o,e[15]=I):I=e[15],I}function Sr(l){return l.id}function Ir(l){return t.jsx(Ee,{value:l.id,children:l.name},l.id)}const kr=[];function xs(){const l=fe.c(21),e=Ae();let s;l[0]!==e?(s=e("orgs.monitoring.chats"),l[0]=e,l[1]=s):s=l[1];let o;l[2]!==s?(o={id:"threads",label:s},l[2]=s,l[3]=o):o=l[3];let c;l[4]!==e?(c=e("orgs.monitoring.overview"),l[4]=e,l[5]=c):c=l[5];let n;l[6]!==c?(n={id:"overview",label:c},l[6]=c,l[7]=n):n=l[7];let f;l[8]!==e?(f=e("orgs.monitoring.audit"),l[8]=e,l[9]=f):f=l[9];let m;l[10]!==f?(m={id:"audit",label:f},l[10]=f,l[11]=m):m=l[11];let d;l[12]!==e?(d=e("orgs.monitoring.automations"),l[12]=e,l[13]=d):d=l[13];let r;l[14]!==d?(r={id:"automations",label:d},l[14]=d,l[15]=r):r=l[15];let h;return l[16]!==o||l[17]!==n||l[18]!==m||l[19]!==r?(h=[o,n,m,r],l[16]=o,l[17]=n,l[18]=m,l[19]=r,l[20]=h):h=l[20],h}function rs(l){const e=fe.c(10),{tab:s}=l,{org:o}=ht(),c=xs();let n;e[0]!==s||e[1]!==c?(n=c.find(h=>h.id===s)??c.find(Tr),e[0]=s,e[1]=c,e[2]=n):n=e[2];const f=n;let m;e[3]!==o.slug?(m={link:{to:"/$org/settings/monitor",params:{org:o.slug}}},e[3]=o.slug,e[4]=m):m=e[4];let d;e[5]!==f?(d=f?[{key:"monitor-tab",label:f.label}]:[],e[5]=f,e[6]=d):d=e[6];let r;return e[7]!==m||e[8]!==d?(r=t.jsx(Tt.Breadcrumbs,{after:"page",parent:m,items:d}),e[7]=m,e[8]=d,e[9]=r):r=e[9],r}function Tr(l){return l.id==="overview"}const Cr=[{value:"eq",labelKey:"orgs.monitoring.operatorEquals"},{value:"contains",labelKey:"orgs.monitoring.operatorContains"},{value:"in",labelKey:"orgs.monitoring.operatorIn"},{value:"exists",labelKey:"orgs.monitoring.operatorExists"}];function Mr({connectionIds:l,virtualMcpIds:e,tool:s,status:o,hideSystem:c,propertyFilters:n,connectionOptions:f,virtualMcpOptions:m,activeFiltersCount:d,onUpdateFilters:r,onConnectionSearchChange:h,memberOptions:g,llmUserIds:u=kr,onLlmUserIdsChange:i,showMemberFilter:w}){const a=Ae(),[I,N]=le.useState(!1),[v,D]=le.useState("form"),[x,L]=le.useState(s),[C,p]=le.useState(n),[j,k]=le.useState(Ht(n)),S=le.useRef(s),M=le.useRef(vt(n));S.current!==s&&(S.current=s,x!==s&&L(s));const y=vt(n);M.current!==y&&(M.current=y,p(n),k(Ht(n)));const T=(b,F)=>{const R=[...C],A=R[b];A&&(R[b]={key:F.key??A.key,operator:F.operator??A.operator,value:F.value??A.value},p(R))},$=()=>{p([...C,{key:"",operator:"eq",value:""}])},P=b=>{const F=C.filter((R,A)=>A!==b);p(F),k(Ht(F)),r({propertyFilters:vt(F)})},V=()=>{r({propertyFilters:vt(C)})},G=()=>{const b=ws(j);p(b),r({propertyFilters:vt(b)})},Q=()=>{if(v==="raw"){const b=ws(j);p(b),D("form")}else k(Ht(C)),D("raw")};return t.jsxs(Et,{open:I,onOpenChange:N,children:[t.jsx(At,{asChild:!0,children:t.jsxs(ge,{variant:"outline",className:"relative",children:[t.jsx(is,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:a("orgs.monitoring.filters")}),d>0&&t.jsxs(t.Fragment,{children:[t.jsx(Dt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:d}),t.jsx(Dt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:d})]})]})}),t.jsx(Ut,{align:"end",className:"w-[320px]",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{children:t.jsx("h4",{className:"font-medium text-sm mb-3",children:a("orgs.monitoring.filterLogs")})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(ul,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:a("orgs.monitoring.hideSystemCalls")}),t.jsx(ml,{id:"hide-system-calls",checked:c,onCheckedChange:b=>r({hideSystem:!!b})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.connections")}),t.jsx($t,{options:f,defaultValue:l,onValueChange:b=>r({connectionId:b}),onSearchChange:h,placeholder:a("orgs.monitoring.allServers"),variant:"secondary",className:"w-full",maxCount:2})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.agents")}),t.jsx($t,{options:m,defaultValue:e,onValueChange:b=>r({virtualMcpId:b}),placeholder:a("orgs.monitoring.allAgents"),variant:"secondary",className:"w-full",maxCount:2})]}),w&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.members")}),t.jsx($t,{options:g??[],defaultValue:u,onValueChange:b=>i?.(b),placeholder:a("orgs.monitoring.allMembers"),variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:a("orgs.monitoring.filtersAiUsageOnly")})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.toolName")}),t.jsx(Ot,{id:"filter-tool",placeholder:a("orgs.monitoring.filterByToolPlaceholder"),value:x,onChange:b=>L(b.target.value),onBlur:()=>{x!==s&&r({tool:x})},onKeyDown:b=>{b.key==="Enter"&&x!==s&&r({tool:x})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.status")}),t.jsxs(St,{value:o,onValueChange:b=>r({status:b}),children:[t.jsx(bt,{className:"w-full",children:t.jsx(wt,{})}),t.jsxs(yt,{children:[t.jsx(Ee,{value:"all",children:a("orgs.monitoring.allStatus")}),t.jsx(Ee,{value:"success",children:a("orgs.monitoring.successOnly")}),t.jsx(Ee,{value:"errors",children:a("orgs.monitoring.errorsOnly")})]})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:a("orgs.monitoring.propertyFilters")}),t.jsxs(Ct,{children:[t.jsx(Mt,{asChild:!0,children:t.jsx(ge,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:Q,children:v==="raw"?t.jsx(ol,{size:14}):t.jsx(Zs,{size:14})})}),t.jsx(_t,{children:a(v==="raw"?"orgs.monitoring.switchToFormView":"orgs.monitoring.switchToRawText")})]})]}),v==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(dl,{placeholder:a("orgs.monitoring.pastePropertyFiltersPlaceholder"),value:j,onChange:b=>k(b.target.value),onBlur:G,onKeyDown:b=>{b.key==="Enter"&&b.metaKey&&G()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("orgs.monitoring.onePerLine")," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[C.map((b,F)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:a("orgs.monitoring.filter",{number:(F+1).toString()})}),t.jsx(ge,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>P(F),children:t.jsx(il,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ot,{placeholder:a("orgs.monitoring.keyPlaceholder"),value:b.key,onChange:R=>T(F,{key:R.target.value}),onBlur:V,onKeyDown:R=>{R.key==="Enter"&&V()},className:"flex-1 font-mono text-sm"}),t.jsxs(St,{value:b.operator,onValueChange:R=>{const A=[...C],X=A[F];X&&(A[F]={...X,operator:R,value:R==="exists"?"":X.value},p(A),r({propertyFilters:vt(A)}))},children:[t.jsx(bt,{className:"w-28",children:t.jsx(wt,{})}),t.jsx(yt,{children:Cr.map(R=>t.jsx(Ee,{value:R.value,children:a(R.labelKey)},R.value))})]})]}),b.operator!=="exists"&&t.jsx(Ot,{placeholder:a("orgs.monitoring.valuePlaceholder"),value:b.value,onChange:R=>T(F,{value:R.target.value}),onBlur:V,onKeyDown:R=>{R.key==="Enter"&&V()},className:"w-full font-mono text-sm"})]},F)),t.jsxs(ge,{variant:"outline",size:"sm",className:"w-full",onClick:$,children:[t.jsx(nl,{size:14,className:"mr-1.5"}),a("orgs.monitoring.addFilter")]})]})]})]}),d>0&&t.jsx(ge,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{L(""),p([]),k(""),r({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),N(!1)},children:a("orgs.monitoring.clearAllFilters")})]})})]})}function _r(l){const e=fe.c(188),{tab:s,dateRange:o,displayDateRange:c,connectionIds:n,virtualMcpIds:f,tool:m,status:d,search:r,streaming:h,hideSystem:g,activeFiltersCount:u,from:i,to:w,propertyFilters:a,onUpdateFilters:I,onTimeRangeChange:N,onStreamingToggle:v,onTabChange:D}=l,x=Ae(),L=Zt(),C=rl(),{data:p}=sl(),[j,k]=le.useState(""),S=j||void 0;let M;e[0]!==S?(M={searchTerm:S},e[0]=S,e[1]=M):M=e[1];const y=Zt(M);let T;e[2]!==y?(T=y??[],e[2]=y,e[3]=T):T=e[3];let $;e[4]!==T?($=T.map(Rr),e[4]=T,e[5]=$):$=e[5];const P=$;let V;e[6]!==C?(V=C.map(Lr),e[6]=C,e[7]=V):V=e[7];const G=V,{pageSize:Q,streamingRefetchInterval:b}=ts,{org:F,locator:R}=ht();let A;e[8]!==F.id||e[9]!==F.slug?(A={connectionId:qs,orgId:F.id,orgSlug:F.slug},e[8]=F.id,e[9]=F.slug,e[10]=A):A=e[10];const X=ll(A);let W;e[11]!==a?(W=Pl(a),e[11]=a,e[12]=W):W=e[12];const U=W;let H;e[13]!==g||e[14]!==F.id?(H=g?[Bs.SELF(F.id)]:void 0,e[13]=g,e[14]=F.id,e[15]=H):H=e[15];const z=H;let q;e[16]===Symbol.for("react.memo_cache_sentinel")?(q=[],e[16]=q):q=e[16];const[_,B]=le.useState(q);let K;e[17]===Symbol.for("react.memo_cache_sentinel")?(K=[],e[17]=K):K=e[17];const[O,Z]=le.useState(K);let ee;e[18]===Symbol.for("react.memo_cache_sentinel")?(ee=[],e[18]=ee):ee=e[18];const[J,me]=le.useState(ee),[te,ae]=le.useState("all"),[re,Y]=le.useState("all"),oe=(O.length>0?1:0)+(J.length>0?1:0)+(te!=="all"?1:0)+(re!=="all"?1:0);let ne;e[19]!==p?(ne=ds(p).map(Dr),e[19]=p,e[20]=ne):ne=e[20];const ce=ne;let ie;e[21]!==o.startDate?(ie=o.startDate.toISOString(),e[21]=o.startDate,e[22]=ie):ie=e[22];let de;e[23]!==o.endDate?(de=o.endDate.toISOString(),e[23]=o.endDate,e[24]=de):de=e[24];const xe=n.length===1?n[0]:void 0,E=f.length===1?f[0]:void 0,se=m||void 0,ue=d==="errors"?!0:d==="success"?!1:void 0;let he;e[25]!==z||e[26]!==U||e[27]!==ie||e[28]!==de||e[29]!==xe||e[30]!==E||e[31]!==se||e[32]!==ue?(he={startDate:ie,endDate:de,connectionId:xe,excludeConnectionIds:z,virtualMcpId:E,toolName:se,isError:ue,...U},e[25]=z,e[26]=U,e[27]=ie,e[28]=de,e[29]=xe,e[30]=E,e[31]=se,e[32]=ue,e[33]=he):he=e[33];const Ye=he,Le=xs();let Re;e[34]!==s?(Re=t.jsx(rs,{tab:s}),e[34]=s,e[35]=Re):Re=e[35];let ye;e[36]!==D||e[37]!==Le?(ye=Xe=>{const ct=Le.find(Vt=>Vt.id===Xe);ct&&D(ct.id)},e[36]=D,e[37]=Le,e[38]=ye):ye=e[38];let Pe;e[39]!==ye||e[40]!==s||e[41]!==Le?(Pe=t.jsx(_s,{placement:"page",tabs:Le,activeTab:s,onTabChange:ye}),e[39]=ye,e[40]=s,e[41]=Le,e[42]=Pe):Pe=e[42];let Fe;e[43]!==u||e[44]!==n||e[45]!==P||e[46]!==j||e[47]!==g||e[48]!==h||e[49]!==_||e[50]!==ce||e[51]!==v||e[52]!==I||e[53]!==a||e[54]!==d||e[55]!==x||e[56]!==s||e[57]!==m||e[58]!==f||e[59]!==G?(Fe=(s==="overview"||s==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(ge,{variant:h?"secondary":"outline",className:"gap-1.5",onClick:v,children:[h&&t.jsx("span",{className:"size-2 rounded-full bg-success animate-pulse"}),t.jsx("span",{children:x("orgs.monitoring.live")}),h&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Mr,{connectionIds:n,virtualMcpIds:f,tool:m,status:d,hideSystem:g,propertyFilters:a,connectionOptions:P,virtualMcpOptions:G,activeFiltersCount:u,onUpdateFilters:I,connectionSearchTerm:j,onConnectionSearchChange:k,memberOptions:ce,llmUserIds:_,onLlmUserIdsChange:B,showMemberFilter:s==="overview"})]}),e[43]=u,e[44]=n,e[45]=P,e[46]=j,e[47]=g,e[48]=h,e[49]=_,e[50]=ce,e[51]=v,e[52]=I,e[53]=a,e[54]=d,e[55]=x,e[56]=s,e[57]=m,e[58]=f,e[59]=G,e[60]=Fe):Fe=e[60];let Se;e[61]!==ce||e[62]!==s||e[63]!==oe||e[64]!==O||e[65]!==re||e[66]!==te||e[67]!==J||e[68]!==G?(Se=s==="threads"&&t.jsx(wr,{filterAgentIds:O,filterUserIds:J,filterStatus:te,filterSource:re,virtualMcpOptions:G,memberOptions:ce,activeFiltersCount:oe,onUpdateFilters:Xe=>{const{filterAgentIds:ct,filterUserIds:Vt,filterStatus:ps,filterSource:gs}=Xe;ct!==void 0&&Z(ct),Vt!==void 0&&me(Vt),ps!==void 0&&ae(ps),gs!==void 0&&Y(gs)}}),e[61]=ce,e[62]=s,e[63]=oe,e[64]=O,e[65]=re,e[66]=te,e[67]=J,e[68]=G,e[69]=Se):Se=e[69];let Oe;e[70]!==i||e[71]!==w?(Oe={from:i,to:w},e[70]=i,e[71]=w,e[72]=Oe):Oe=e[72];let $e;e[73]!==x?($e=x("monitoring.timeRangePicker.absoluteTimeRange"),e[73]=x,e[74]=$e):$e=e[74];let Ie;e[75]!==x?(Ie=x("monitoring.timeRangePicker.from"),e[75]=x,e[76]=Ie):Ie=e[76];let ke;e[77]!==x?(ke=x("monitoring.timeRangePicker.to"),e[77]=x,e[78]=ke):ke=e[78];let Ne;e[79]!==x?(Ne=x("monitoring.timeRangePicker.applyTimeRange"),e[79]=x,e[80]=Ne):Ne=e[80];let be;e[81]!==$e||e[82]!==Ie||e[83]!==ke||e[84]!==Ne?(be={absoluteTimeRange:$e,from:Ie,to:ke,applyTimeRange:Ne},e[81]=$e,e[82]=Ie,e[83]=ke,e[84]=Ne,e[85]=be):be=e[85];let Te;e[86]!==x?(Te=x("monitoring.timeRangePicker.last5Minutes"),e[86]=x,e[87]=Te):Te=e[87];let Ce;e[88]!==Te?(Ce={label:Te,from:"now-5m",to:"now",value:"5m"},e[88]=Te,e[89]=Ce):Ce=e[89];let Me;e[90]!==x?(Me=x("monitoring.timeRangePicker.last15Minutes"),e[90]=x,e[91]=Me):Me=e[91];let ze;e[92]!==Me?(ze={label:Me,from:"now-15m",to:"now",value:"15m"},e[92]=Me,e[93]=ze):ze=e[93];let Ke;e[94]!==x?(Ke=x("monitoring.timeRangePicker.last30Minutes"),e[94]=x,e[95]=Ke):Ke=e[95];let ve;e[96]!==Ke?(ve={label:Ke,from:"now-30m",to:"now",value:"30m"},e[96]=Ke,e[97]=ve):ve=e[97];let pe;e[98]!==x?(pe=x("monitoring.timeRangePicker.last1Hour"),e[98]=x,e[99]=pe):pe=e[99];let we;e[100]!==pe?(we={label:pe,from:"now-1h",to:"now",value:"1h"},e[100]=pe,e[101]=we):we=e[101];let De;e[102]!==x?(De=x("monitoring.timeRangePicker.last3Hours"),e[102]=x,e[103]=De):De=e[103];let _e;e[104]!==De?(_e={label:De,from:"now-3h",to:"now",value:"3h"},e[104]=De,e[105]=_e):_e=e[105];let He;e[106]!==x?(He=x("monitoring.timeRangePicker.last6Hours"),e[106]=x,e[107]=He):He=e[107];let qe;e[108]!==He?(qe={label:He,from:"now-6h",to:"now",value:"6h"},e[108]=He,e[109]=qe):qe=e[109];let Be;e[110]!==x?(Be=x("monitoring.timeRangePicker.last12Hours"),e[110]=x,e[111]=Be):Be=e[111];let We;e[112]!==Be?(We={label:Be,from:"now-12h",to:"now",value:"12h"},e[112]=Be,e[113]=We):We=e[113];let ut;e[114]!==x?(ut=x("monitoring.timeRangePicker.last24Hours"),e[114]=x,e[115]=ut):ut=e[115];let Ze;e[116]!==ut?(Ze={label:ut,from:"now-24h",to:"now",value:"24h"},e[116]=ut,e[117]=Ze):Ze=e[117];let et;e[118]!==x?(et=x("monitoring.timeRangePicker.last2Days"),e[118]=x,e[119]=et):et=e[119];let tt;e[120]!==et?(tt={label:et,from:"now-2d",to:"now",value:"2d"},e[120]=et,e[121]=tt):tt=e[121];let ft;e[122]!==x?(ft=x("monitoring.timeRangePicker.last7Days"),e[122]=x,e[123]=ft):ft=e[123];let st;e[124]!==ft?(st={label:ft,from:"now-7d",to:"now",value:"7d"},e[124]=ft,e[125]=st):st=e[125];let xt;e[126]!==x?(xt=x("monitoring.timeRangePicker.last30Days"),e[126]=x,e[127]=xt):xt=e[127];let lt;e[128]!==xt?(lt={label:xt,from:"now-30d",to:"now",value:"30d"},e[128]=xt,e[129]=lt):lt=e[129];let rt;e[130]!==Ce||e[131]!==ze||e[132]!==ve||e[133]!==we||e[134]!==_e||e[135]!==qe||e[136]!==We||e[137]!==Ze||e[138]!==tt||e[139]!==st||e[140]!==lt?(rt=[Ce,ze,ve,we,_e,qe,We,Ze,tt,st,lt],e[130]=Ce,e[131]=ze,e[132]=ve,e[133]=we,e[134]=_e,e[135]=qe,e[136]=We,e[137]=Ze,e[138]=tt,e[139]=st,e[140]=lt,e[141]=rt):rt=e[141];let nt;e[142]!==N||e[143]!==Oe||e[144]!==be||e[145]!==rt?(nt=t.jsx(Ul,{value:Oe,onChange:N,labels:be,quickRanges:rt}),e[142]=N,e[143]=Oe,e[144]=be,e[145]=rt,e[146]=nt):nt=e[146];let Je;e[147]!==Fe||e[148]!==Se||e[149]!==nt?(Je=t.jsxs("div",{className:"flex items-center gap-2",children:[Fe,Se,nt]}),e[147]=Fe,e[148]=Se,e[149]=nt,e[150]=Je):Je=e[150];let it;e[151]!==Pe||e[152]!==Je?(it=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[Pe,Je]}),e[151]=Pe,e[152]=Je,e[153]=it):it=e[153];let pt;e[154]!==I||e[155]!==r||e[156]!==x||e[157]!==s?(pt=(s==="audit"||s==="threads")&&t.jsx(Js,{value:r,onChange:Xe=>I({search:Xe}),placeholder:x(s==="threads"?"orgs.monitoring.searchByTitlePlaceholder":"orgs.monitoring.searchByToolPlaceholder"),onKeyDown:Xe=>{Xe.key==="Escape"&&(I({search:""}),Xe.target.blur())},className:"w-full md:w-[375px]"}),e[154]=I,e[155]=r,e[156]=x,e[157]=s,e[158]=pt):pt=e[158];let Ge;e[159]!==Re||e[160]!==it||e[161]!==pt?(Ge=t.jsx(Tt.Container,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[Re,it,pt]})}),e[159]=Re,e[160]=it,e[161]=pt,e[162]=Ge):Ge=e[162];let Qe;e[163]!==L||e[164]!==C||e[165]!==Ye||e[166]!==X||e[167]!==n||e[168]!==o||e[169]!==c||e[170]!==z||e[171]!==h||e[172]!==_||e[173]!==R||e[174]!==p||e[175]!==r||e[176]!==d||e[177]!==s||e[178]!==O||e[179]!==re||e[180]!==te||e[181]!==J||e[182]!==m||e[183]!==f?(Qe=s==="automations"?t.jsx(yr,{dateRange:o}):s==="threads"?t.jsx(gr,{client:X,locator:R,membersData:p,allConnections:L,allVirtualMcps:C,dateRange:o,searchQuery:r,filterAgentIds:O,filterUserIds:J,filterStatus:te,filterSource:re}):s==="audit"?t.jsx(dr,{client:X,locator:R,baseParams:Ye,pageSize:Q,isStreaming:h,streamingRefetchInterval:b,connectionIds:n,virtualMcpIds:f,tool:m,status:d,searchQuery:r,allConnections:L,allVirtualMcps:C,membersData:p}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(Wl,{displayDateRange:c,connectionIds:n,excludeConnectionIds:z,toolName:m||void 0,status:d==="errors"?"error":d==="success"?"success":void 0,connections:L,isStreaming:h,streamingRefetchInterval:b,llmUserIds:_,virtualMcpIds:f,virtualMcps:C})}),e[163]=L,e[164]=C,e[165]=Ye,e[166]=X,e[167]=n,e[168]=o,e[169]=c,e[170]=z,e[171]=h,e[172]=_,e[173]=R,e[174]=p,e[175]=r,e[176]=d,e[177]=s,e[178]=O,e[179]=re,e[180]=te,e[181]=J,e[182]=m,e[183]=f,e[184]=Qe):Qe=e[184];let ot;return e[185]!==Ge||e[186]!==Qe?(ot=t.jsxs(t.Fragment,{children:[Ge,Qe]}),e[185]=Ge,e[186]=Qe,e[187]=ot):ot=e[187],ot}function Dr(l){const e=l.user.name??l.user.email??l.userId,s=l.user.image??void 0;return{value:l.userId,label:e,icon:o=>{const{className:c}=o;return t.jsx(as,{url:s,fallback:e,shape:"circle",size:"2xs",className:Ve("shrink-0",c)})}}}function Lr(l){const e=l.icon,s=l.title??"Super Agent";return{value:l.id??"",label:s,icon:o=>{const{className:c}=o;return t.jsx(It,{icon:e,name:s,size:"xs",fallbackIcon:t.jsx(Lt,{}),className:Ve("size-4! min-w-4! rounded-sm shrink-0",c)})}}}function Rr(l){const e=l.icon,s=l.title||l.id;return{value:l.id,label:s,icon:o=>{const{className:c}=o;return t.jsx(It,{icon:e,name:s,size:"xs",fallbackIcon:t.jsx(Lt,{}),className:Ve("size-4! min-w-4! rounded-sm shrink-0",c)})}}}function ni(){const l=fe.c(51),e=Ae(),s=xs(),{org:o}=ht(),c=os();let n;l[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/monitor"},l[0]=n):n=l[0];const f=Ks(n),{tab:m,from:d,to:r,connectionId:h,virtualMcpId:g,tool:u,search:i,status:w,streaming:a,propertyFilters:I,hideSystem:N}=f,v=m===void 0?"threads":m;let D;l[1]!==h?(D=h===void 0?[]:h,l[1]=h,l[2]=D):D=l[2];const x=D;let L;l[3]!==g?(L=g===void 0?[]:g,l[3]=g,l[4]=L):L=l[4];const C=L,p=a===void 0?!0:a,j=I===void 0?"":I,k=N===void 0?!1:N,S=Rl(j);let M;l[5]!==c||l[6]!==o.slug||l[7]!==f?(M=Y=>{c({to:"/$org/settings/monitor",params:{org:o.slug},search:{...f,...Y}})},l[5]=c,l[6]=o.slug,l[7]=f,l[8]=M):M=l[8];const y=M;let T;l[9]!==y?(T=Y=>{y({from:Y.from,to:Y.to})},l[9]=y,l[10]=T):T=l[10];const $=T,P=at(d),V=at(r),[G]=le.useState(Fr),Q=P.date||new Date(G-864e5),b=V.date||new Date,F={startDate:Q,endDate:b};let R=b;p&&r==="now"&&(R=new Date(b),R.setHours(R.getHours()+1));let A;l[11]!==R||l[12]!==Q?(A={startDate:Q,endDate:R},l[11]=R,l[12]=Q,l[13]=A):A=l[13];const X=A;let W=0;x.length>0&&W++,C.length>0&&W++,u&&W++,w!=="all"&&W++,k&&W++;const U=S.filter(Pr);U.length>0&&(W=W+U.length);let H;l[14]!==v?(H=t.jsx(Tt.Container,{className:"!pb-3",children:t.jsx(rs,{tab:v})}),l[14]=v,l[15]=H):H=l[15];let z;l[16]!==e?(z=e("orgs.monitoring.failedLoadTitle"),l[16]=e,l[17]=z):z=l[17];let q;l[18]!==e?(q=e("orgs.monitoring.failedLoadDescription"),l[18]=e,l[19]=q):q=l[19];let _;l[20]!==z||l[21]!==q?(_=t.jsx(Tt.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(Bt,{title:z,description:q})})}),l[20]=z,l[21]=q,l[22]=_):_=l[22];let B;l[23]!==H||l[24]!==_?(B=t.jsxs(t.Fragment,{children:[H,_]}),l[23]=H,l[24]=_,l[25]=B):B=l[25];let K;l[26]!==v?(K=t.jsx(rs,{tab:v}),l[26]=v,l[27]=K):K=l[27];let O;l[28]!==s||l[29]!==y?(O=Y=>{const oe=s.find(ne=>ne.id===Y);oe&&y({tab:oe.id})},l[28]=s,l[29]=y,l[30]=O):O=l[30];let Z;l[31]!==O||l[32]!==v||l[33]!==s?(Z=t.jsx(_s,{placement:"page",tabs:s,activeTab:v,onTabChange:O}),l[31]=O,l[32]=v,l[33]=s,l[34]=Z):Z=l[34];let ee;l[35]!==K||l[36]!==Z?(ee=t.jsx(Tt.Container,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[K,Z]})}),l[35]=K,l[36]=Z,l[37]=ee):ee=l[37];let J;l[38]!==v?(J=v==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(ss.Skeleton,{})}):v==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(ss.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(sr,{})}),l[38]=v,l[39]=J):J=l[39];let me;l[40]!==ee||l[41]!==J?(me=t.jsxs(t.Fragment,{children:[ee,J]}),l[40]=ee,l[41]=J,l[42]=me):me=l[42];let te;l[43]!==$?(te=Y=>{Gt("monitoring_time_range_changed",{from:Y.from,to:Y.to}),$(Y)},l[43]=$,l[44]=te):te=l[44];let ae;l[45]!==p||l[46]!==y?(ae=()=>{Gt("monitoring_live_toggled",{enabled:!p}),y({streaming:!p})},l[45]=p,l[46]=y,l[47]=ae):ae=l[47];let re;return l[48]!==v||l[49]!==y?(re=Y=>{Y!==v&&Gt("monitoring_tab_changed",{from_tab:v,to_tab:Y}),y({tab:Y})},l[48]=v,l[49]=y,l[50]=re):re=l[50],t.jsx(Gs,{capability:"monitoring:view",area:"monitoring",children:t.jsx(Tt,{children:t.jsx(Hs,{fallback:B,children:t.jsx(le.Suspense,{fallback:me,children:t.jsx(_r,{tab:v,dateRange:X,displayDateRange:F,connectionIds:x,virtualMcpIds:C,tool:u,status:w,search:i,streaming:p,hideSystem:k,activeFiltersCount:W,from:d,to:r,propertyFilters:S,onUpdateFilters:y,onTimeRangeChange:te,onStreamingToggle:ae,onTabChange:re})})})})})}function Pr(l){return l.key.trim()}function Fr(){return Date.now()}export{ni as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{co as _}from"./index-
|
|
1
|
+
import{co as _}from"./index-DDMwhF4p.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|