decocms 4.86.0 → 4.86.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DriHvGW8.js → AlertCircle-DfZqGdIO.js} +1 -1
- package/dist/client/assets/{AreaChart-BU465nht.js → AreaChart-DXIhupUU.js} +1 -1
- package/dist/client/assets/{ArrowUp-BHLBiz0J.js → ArrowUp-mYUQI3ny.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CsopTrXA.js → ArrowUpRight-D7jEUphZ.js} +1 -1
- package/dist/client/assets/{CheckCircle-BSSfIVDh.js → CheckCircle-BA3THiSr.js} +1 -1
- package/dist/client/assets/{ChevronDown-DnuZlbXl.js → ChevronDown-BpKPHxDG.js} +1 -1
- package/dist/client/assets/{ChevronRight-D8z61LL4.js → ChevronRight-ByVxw7yb.js} +1 -1
- package/dist/client/assets/{ChevronUp-SvG4tBeC.js → ChevronUp-DKgNoV7g.js} +1 -1
- package/dist/client/assets/{Copy01-8RoWdlIb.js → Copy01-AuaMhdvh.js} +1 -1
- package/dist/client/assets/{DotsVertical-ByzWfjph.js → DotsVertical-Ctyi_Fcj.js} +1 -1
- package/dist/client/assets/{Eye-BMB6Dsvc.js → Eye-CaHkvWGU.js} +1 -1
- package/dist/client/assets/{FilterLines-Cb5gzr5c.js → FilterLines-B_F076bt.js} +1 -1
- package/dist/client/assets/{Globe01-C6g7oQ38.js → Globe01-9M3ZtnRh.js} +1 -1
- package/dist/client/assets/{Globe04-CYEWS6xQ.js → Globe04-BBu3oRiw.js} +1 -1
- package/dist/client/assets/{HardDrive-Dv77s3h5.js → HardDrive-Czo8EXKT.js} +1 -1
- package/dist/client/assets/{Image01-YE-JCd5P.js → Image01-C8aqMMC0.js} +1 -1
- package/dist/client/assets/{Key01-C9Hax98L.js → Key01-HpKP7kjq.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CoMgIDfR.js → LayoutLeft-BZQmnN4U.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BYMM_QSD.js → LinkExternal01-wLaoE2BO.js} +1 -1
- package/dist/client/assets/{Monitor01-CDUuvvya.js → Monitor01-CCqvvSCN.js} +1 -1
- package/dist/client/assets/{Package-BwfmB-wY.js → Package-DXwLO7TZ.js} +1 -1
- package/dist/client/assets/{Palette-wIBeqOmX.js → Palette-BOYYX-x4.js} +1 -1
- package/dist/client/assets/{Play-CmeXDhbv.js → Play-Bhc_0wGz.js} +1 -1
- package/dist/client/assets/{Plus-DErQhYMo.js → Plus-BFo0Fsne.js} +1 -1
- package/dist/client/assets/{SearchLg-BcyXaR5Z.js → SearchLg-D_s4Wx9C.js} +1 -1
- package/dist/client/assets/{SearchMd-B2xdLkpr.js → SearchMd-DnmtefV6.js} +1 -1
- package/dist/client/assets/{Settings02-BQIoToME.js → Settings02-DcvdDwJo.js} +1 -1
- package/dist/client/assets/{Shield01-BnV0ErmL.js → Shield01-hx04AF4i.js} +1 -1
- package/dist/client/assets/{Star01-BvPb97r4.js → Star01-DVFgs_0J.js} +1 -1
- package/dist/client/assets/{Stars01-Dq_ij1vd.js → Stars01-B5Wh8soo.js} +1 -1
- package/dist/client/assets/{Stars02-D0dtbcP0.js → Stars02-PuKOl8z5.js} +1 -1
- package/dist/client/assets/{Sun-BNn7fIcF.js → Sun-Cw5YUhig.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B5xg5r1q.js → SwitchHorizontal01-DYptKpyt.js} +1 -1
- package/dist/client/assets/{Tool01-1JY4WdfO.js → Tool01-CpROxlr0.js} +1 -1
- package/dist/client/assets/{Tool02-CJRfU6-e.js → Tool02-C8iwn6Q8.js} +1 -1
- package/dist/client/assets/{Trash01-D68y5OFq.js → Trash01-zPnxi6aE.js} +1 -1
- package/dist/client/assets/{TrendUp01-Be3cv-nx.js → TrendUp01-ryekGRAe.js} +1 -1
- package/dist/client/assets/{Upload01-CPQnKMdb.js → Upload01-L8Z9Doey.js} +1 -1
- package/dist/client/assets/{User01-BErqEcB8.js → User01-DewcmwdK.js} +1 -1
- package/dist/client/assets/{Users01-CdOl2233.js → Users01-Dc2haknw.js} +1 -1
- package/dist/client/assets/{Users03-01ZOLPet.js → Users03-DmiDj7OC.js} +1 -1
- package/dist/client/assets/{X-DXgmI1I4.js → X-DvSaCzV-.js} +1 -1
- package/dist/client/assets/{XCircle-DY497Rjn.js → XCircle-C6mRHoZP.js} +1 -1
- package/dist/client/assets/{XClose-C4EmtqAA.js → XClose-CnDiE4wN.js} +1 -1
- package/dist/client/assets/{Zap-BPdmVchQ.js → Zap-B7fiN40E.js} +1 -1
- package/dist/client/assets/{ZapSquare-DiXc_WiU.js → ZapSquare-BAQcu1iA.js} +1 -1
- package/dist/client/assets/{ZoomOut-DO1ABQMU.js → ZoomOut-shbGcJgg.js} +1 -1
- package/dist/client/assets/{access-gate-Du5lQEFN.js → access-gate-BQ5nV9CM.js} +1 -1
- package/dist/client/assets/{add-section-modal-Cj2upX49.js → add-section-modal-CDMDYlK5.js} +1 -1
- package/dist/client/assets/{agent-icon-D4a2yQAy.js → agent-icon-CzJVw_PS.js} +1 -1
- package/dist/client/assets/{agents-list-CbWCKvO8.js → agents-list-CdJFtIq2.js} +1 -1
- package/dist/client/assets/{ai-providers-CTkmKKCc.js → ai-providers-DluYZyyW.js} +1 -1
- package/dist/client/assets/{alert-dialog-C0dmYQwl.js → alert-dialog-Y1XXElMo.js} +1 -1
- package/dist/client/assets/{alert-ZjKFCE6g.js → alert-j08TigIF.js} +1 -1
- package/dist/client/assets/{app-editor-C9vstOJe.js → app-editor-D8GIAPUq.js} +1 -1
- package/dist/client/assets/{auth-z6bL2iLM.js → auth-DGbJKtcV.js} +1 -1
- package/dist/client/assets/{auth-catchall-CTUsNjBA.js → auth-catchall-CiycU9Fr.js} +1 -1
- package/dist/client/assets/{auth-entry-DhkhuzaY.js → auth-entry-CYNZqOOw.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BlG-p1RQ.js → auth-split-layout-BrESDdg5.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-C7P5en8H.js → authenticate-and-persist-oauth-tUtbW76M.js} +1 -1
- package/dist/client/assets/{automation-list-row-Bu9C738j.js → automation-list-row-Ci-vo0Ok.js} +1 -1
- package/dist/client/assets/automation-runs-BdqIedR2.js +87 -0
- package/dist/client/assets/{automations-Bnj3R1rO.js → automations-B5nmIsQw.js} +1 -1
- package/dist/client/assets/{autosend-DViO44x-.js → autosend-C5LHLeko.js} +1 -1
- package/dist/client/assets/{avatar-f9PWmWko.js → avatar-DBnOObMJ.js} +1 -1
- package/dist/client/assets/{badge-D-j0sOs9.js → badge-C6MoaNaP.js} +1 -1
- package/dist/client/assets/{block-document-Bp1KtsqP.js → block-document-aXxr97-G.js} +1 -1
- package/dist/client/assets/{brand-context-Ce4eNHs8.js → brand-context-CtFfSAiC.js} +1 -1
- package/dist/client/assets/{buckets-DFmFwZCi.js → buckets-BGwcc7oD.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CkjZ2spD.js → bulk-category-panel-C8XqXeAU.js} +1 -1
- package/dist/client/assets/{calendar-CL1lHfJI.js → calendar-DX2eI8nn.js} +1 -1
- package/dist/client/assets/{capability-load-error-DifNtXec.js → capability-load-error-C6Zz4eJ1.js} +1 -1
- package/dist/client/assets/{card-D4CJeQSR.js → card-CMA-4CeN.js} +1 -1
- package/dist/client/assets/{category-editor-DPATJKY9.js → category-editor-C6Be1dfI.js} +1 -1
- package/dist/client/assets/{chat-context-0yEIHZ6c.js → chat-context-CWKEbJVu.js} +1 -1
- package/dist/client/assets/{checkbox-JCl8QP8q.js → checkbox-BZmlCGR-.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BfTlukPl.js → cli-auth-success-D834jweo.js} +1 -1
- package/dist/client/assets/{collection-detail-Bd8G9LY3.js → collection-detail-jPNP5mzy.js} +1 -1
- package/dist/client/assets/{collection-display-button-DRoGXo78.js → collection-display-button-DrgpSLTZ.js} +1 -1
- package/dist/client/assets/{collection-search-C0RNwRHs.js → collection-search-CwZ01sWP.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-ByMEj5PE.js → collection-table-wrapper-DaIANWjI.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dhx2wMNU.js → collection-tabs-BtxGuG1G.js} +1 -1
- package/dist/client/assets/{command-DjqCY9Vi.js → command-Sec7WA_A.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-D5J7bOeb.js → commerce-onboarding-DOH59RlG.js} +1 -1
- package/dist/client/assets/{companions-core-Bn5T5Kw9.js → companions-core-CXq5b4GI.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-D_e_16jN.js → connect-desktop-dialog-aCqZE31x.js} +1 -1
- package/dist/client/assets/{connection-card-FP7DKtbx.js → connection-card-DNDrESB-.js} +1 -1
- package/dist/client/assets/{connection-detail-Cr17GhO0.js → connection-detail-CPrWbBFM.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C7V7pVnH.js → connection-form-helpers-l_ijwaHD.js} +1 -1
- package/dist/client/assets/{connections-WWFvOY1G.js → connections-F5mve2lg.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BNj5yLz-.js → decopilot-sse-pool-BOQSRcee.js} +1 -1
- package/dist/client/assets/{dialog-pxztKdM4.js → dialog-CvsnsHc6.js} +1 -1
- package/dist/client/assets/{domain-settings-IJTQ43bo.js → domain-settings-B9EhJQUW.js} +1 -1
- package/dist/client/assets/{drawer-eINF-fuO.js → drawer-D8dHZiX8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CRae2C9x.js → dropdown-menu-C1qlOMZ7.js} +1 -1
- package/dist/client/assets/{empty-state-DvObzH8u.js → empty-state-DA8bHc-1.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CeFGCUkk.js → extract-connection-data-CTvABTjg.js} +1 -1
- package/dist/client/assets/{file-explorer-3SJ4vb--.js → file-explorer-DLyQqFEm.js} +1 -1
- package/dist/client/assets/{file-type-icon-zSQ0dOtZ.js → file-type-icon-DnyFLF_v.js} +1 -1
- package/dist/client/assets/{files-CjIuQ02f.js → files-SyN3ok5O.js} +1 -1
- package/dist/client/assets/{form--yMAb3ro.js → form-DWLFR7nn.js} +1 -1
- package/dist/client/assets/{general-B9pSq-fb.js → general-CBHFRb3j.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Cgx6amzW.js → github-repo-picker-BnPj766W.js} +1 -1
- package/dist/client/assets/{hooks-C8ac-vFI.js → hooks-DPnPW1Ib.js} +1 -1
- package/dist/client/assets/{index-Bb03HxpV.js → index-B4M08Kup.js} +1 -1
- package/dist/client/assets/{index-SNB4eexL.js → index-BOTjGzy-.js} +1 -1
- package/dist/client/assets/{index-BeXgUXox.js → index-BP1MoKqU.js} +2 -2
- package/dist/client/assets/{index-CDvq8kTD.js → index-BS_H3vZJ.js} +1 -1
- package/dist/client/assets/{index-BSVi3cEY.js → index-BvCHxsMv.js} +1 -1
- package/dist/client/assets/{index-32Z_4GES.js → index-C2u4siS5.js} +3 -3
- package/dist/client/assets/{index-CmqIldWF.js → index-C652yWgR.js} +1 -1
- package/dist/client/assets/{index-xVsqSBJP.js → index-C8qWG1s1.js} +1 -1
- package/dist/client/assets/{index-BsOcdcPy.js → index-CfPj3M1l.js} +1 -1
- package/dist/client/assets/{index-CyCC6Kib.js → index-Cg3sR771.js} +5 -5
- package/dist/client/assets/{index-Cx9R0N8d.js → index-CnYXLAS2.js} +1 -1
- package/dist/client/assets/{index-3nwYTcZz.js → index-CuO_-GZV.js} +1 -1
- package/dist/client/assets/{index-BFiY8eXY.js → index-D3xpdmzO.js} +1 -1
- package/dist/client/assets/{index-ZgzVcEPr.js → index-gs_-K8Xc.js} +1 -1
- package/dist/client/assets/{index-redirect-CiTCXVUI.js → index-redirect-B0vIbjhT.js} +1 -1
- package/dist/client/assets/{input-DNRaDhXk.js → input-Cb7CGqPN.js} +1 -1
- package/dist/client/assets/{integration-icon-Bj_L5G59.js → integration-icon-J19ZNMb3.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DTrnC4Ns.js → invite-member-dialog-BktkDK4v.js} +1 -1
- package/dist/client/assets/{label-DqJN0Zl6.js → label-DhK5GRHz.js} +1 -1
- package/dist/client/assets/{layout-BkG06DbR.js → layout-mvz0VkGf.js} +1 -1
- package/dist/client/assets/{login-C9VxLGwl.js → login-DnHBlyYy.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ClvvvmOF.js → mcp-oauth-BC7utMST.js} +1 -1
- package/dist/client/assets/{members-CkIyByQ6.js → members-CtWVlKsQ.js} +1 -1
- package/dist/client/assets/{monaco-editor-D20TtRkQ.js → monaco-editor-BIYcRCql.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DZJthgJ6.js → monitoring-stats-row-IQKypVBe.js} +1 -1
- package/dist/client/assets/{multi-select-DypU6S8g.js → multi-select-34xx2CMv.js} +1 -1
- package/dist/client/assets/{oauth-callback-CU0eKEdH.js → oauth-callback-BGOH4D8o.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-4FUqXMlc.js → oauth-callback-ai-provider-PRHGkPfW.js} +1 -1
- package/dist/client/assets/{onboarding-C98UvNP1.js → onboarding-DLxx1gWn.js} +1 -1
- package/dist/client/assets/{org-install-DxjPueVj.js → org-install-Dwpb1igA.js} +1 -1
- package/dist/client/assets/{org-layout--0dYF5Rt.js → org-layout-bdr-vVje.js} +1 -1
- package/dist/client/assets/{organization-choice-BtDkbSqS.js → organization-choice-CIPEZcwe.js} +1 -1
- package/dist/client/assets/{orgs-Cau5_2Ta.js → orgs-od-Pv3L_.js} +1 -1
- package/dist/client/assets/{page-seo-form-DUIIg46E.js → page-seo-form-Dki7TfnI.js} +1 -1
- package/dist/client/assets/page-seo-sheet-IGjlhmAS.js +1 -0
- package/dist/client/assets/{popover-RIaRL7oB.js → popover-DfzsvCwC.js} +1 -1
- package/dist/client/assets/{post-editor-CSFQcBXM.js → post-editor-D9D6bmBX.js} +1 -1
- package/dist/client/assets/{primitives-CcasBN-m.js → primitives-BldH5G0Y.js} +1 -1
- package/dist/client/assets/{profile-CGP5jgHZ.js → profile-p6-RhyAf.js} +1 -1
- package/dist/client/assets/project-app-view-jcmOJAzs.js +1 -0
- package/dist/client/assets/record-editor-mYDnFPKa.js +1 -0
- package/dist/client/assets/redirect-editor-DDOBLKqx.js +1 -0
- package/dist/client/assets/registry-Cwg8k1bk.js +2 -0
- package/dist/client/assets/{registry-layout-DTfv4xqc.js → registry-layout-B0C8DhKi.js} +1 -1
- package/dist/client/assets/{reports-CGJDic-D.js → reports-zyK4duNr.js} +1 -1
- package/dist/client/assets/{require-capability-Dl7MMUtS.js → require-capability-1lcUjA-x.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BN9gLlS8.js → required-auth-layout-B1JMkrdm.js} +1 -1
- package/dist/client/assets/{reset-password-Btk86aOM.js → reset-password-BqQSf4XO.js} +1 -1
- package/dist/client/assets/{roles-p1k02HxK.js → roles-lEZwMitt.js} +1 -1
- package/dist/client/assets/{search-input-DrcJxljH.js → search-input-CFD2CbeL.js} +1 -1
- package/dist/client/assets/{secrets-tpvThXzx.js → secrets-Duyv1ctC.js} +1 -1
- package/dist/client/assets/{sections-editor-BuHOy4hR.js → sections-editor-BvKO1Jmq.js} +1 -1
- package/dist/client/assets/{select-B_NF3ir8.js → select-DMy4CZEM.js} +1 -1
- package/dist/client/assets/{select-model-CD-bNwFP.js → select-model-CeH3eiDd.js} +1 -1
- package/dist/client/assets/{self-tool-result-CQ9Oidp5.js → self-tool-result-CrTztwJC.js} +1 -1
- package/dist/client/assets/{seo-editor-tD1KbIp4.js → seo-editor-C8dIZ0r1.js} +1 -1
- package/dist/client/assets/{settings-layout-CIwY5Rcg.js → settings-layout-DYLu6KAT.js} +1 -1
- package/dist/client/assets/{settings-section-qHo4Kia8.js → settings-section-C9wxXn_P.js} +1 -1
- package/dist/client/assets/{shell-controls-DJ7fzt-b.js → shell-controls-Dn6r6Au7.js} +1 -1
- package/dist/client/assets/{shell-layout-gqjfXR2N.js → shell-layout-BBgOrDIL.js} +1 -1
- package/dist/client/assets/{sidebar-ChQMKige.js → sidebar-odBC32K5.js} +1 -1
- package/dist/client/assets/{skeleton-TPY4BgOd.js → skeleton-BTXeFNOv.js} +1 -1
- package/dist/client/assets/{sso-DwXA1_HM.js → sso-_Rhk71dv.js} +1 -1
- package/dist/client/assets/{store-DrJy9eqh.js → store-BHQI7MeI.js} +1 -1
- package/dist/client/assets/store-registry-E2glxuZA.js +2 -0
- package/dist/client/assets/{studio-tools-n8590dlO.js → studio-tools-DScMFawl.js} +1 -1
- package/dist/client/assets/{switch-Vi8KqJDK.js → switch-Ds8K2Lh_.js} +1 -1
- package/dist/client/assets/{table-4z3VGMcV.js → table-BW9KHE3_.js} +1 -1
- package/dist/client/assets/{tabs-C1aAnItW.js → tabs-DVwZBWMX.js} +1 -1
- package/dist/client/assets/{textarea-BIQq3kPx.js → textarea-CTeZ2lal.js} +1 -1
- package/dist/client/assets/{toggle-group-Buak4Ijq.js → toggle-group-BSTIOzYn.js} +1 -1
- package/dist/client/assets/{toolbar-ChkgagFk.js → toolbar-CgZE309S.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D0eZmrE1.js → toolbar-icon-button-8zS2muhz.js} +1 -1
- package/dist/client/assets/{tooltip-CpOqB12v.js → tooltip-DK2r83_Q.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DcaGLvIS.js → use-ai-providers-DHwTb1GL.js} +1 -1
- package/dist/client/assets/{use-automations-CuxMc1af.js → use-automations-BJ1_8SDs.js} +1 -1
- package/dist/client/assets/{use-autosave-CKpQpnkI.js → use-autosave-CY_dkvOM.js} +1 -1
- package/dist/client/assets/{use-capability-x8vfxJ7c.js → use-capability-ML8qbFhc.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BXhg46lH.js → use-clock-tick-D6R8tdxE.js} +1 -1
- package/dist/client/assets/{use-collections-CRs3mssF.js → use-collections-D6OYG-wc.js} +1 -1
- package/dist/client/assets/{use-connection-TbmZTa2Q.js → use-connection-B5YB38XE.js} +1 -1
- package/dist/client/assets/{use-copy-GJ89hYnU.js → use-copy-BkTOsha4.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D4A9sXWT.js → use-create-virtual-mcp-mhzGZuKh.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DxPGO2nZ.js → use-debounced-autosave-sFFdGAPI.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D3KV6ORm.js → use-debounced-value-BWIL-1on.js} +1 -1
- package/dist/client/assets/{use-deco-credits-FWA0HDvb.js → use-deco-credits-Sg-ppvw1.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BAuSsk9W.js → use-decopilot-events-D35HEWEA.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DP2vl3YF.js → use-delete-connection-Cv3MGM8b.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DxJ9HX0C.js → use-deployment-admin-C3okapNs.js} +1 -1
- package/dist/client/assets/{use-file-configs-CuD4x2Qa.js → use-file-configs-BCPI-hCq.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DDA5AXOs.js → use-infinite-scroll-CAmtVNGd.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bv2XJLBI.js → use-join-requests-mb4WWMEm.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DlG18-0i.js → use-mcp-auth-status-AcbyV1My.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Y-YAGLhv.js → use-mcp-client-ioNtd9Ao.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-UKnbu9YR.js → use-mcp-tools-DC9bMhqt.js} +1 -1
- package/dist/client/assets/{use-members-DSdmplcs.js → use-members-C5fA1N1j.js} +1 -1
- package/dist/client/assets/{use-mobile-Dfj2nxpB.js → use-mobile-Xv_R9Qvv.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DYHGQgra.js → use-navigate-to-agent-6EBjGP72.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DSB0aKlT.js → use-org-auth-client-17utjSn0.js} +1 -1
- package/dist/client/assets/{use-org-sso-e8s6CsXn.js → use-org-sso-DL3XEgfJ.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Bq0KJEFt.js → use-organization-roles-CNET-j1d.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Bj1mes2i.js → use-organization-settings-AW4Wtsqe.js} +1 -1
- package/dist/client/assets/{use-registry-app-UpQczPyM.js → use-registry-app-DboVWLxl.js} +1 -1
- package/dist/client/assets/{use-registry-connections-HQz0dDkM.js → use-registry-connections-Chwp5-AC.js} +1 -1
- package/dist/client/assets/{use-secrets-CyDme1l0.js → use-secrets-oaZoGdZ_.js} +1 -1
- package/dist/client/assets/{use-status-sounds-t_gRyaZh.js → use-status-sounds-DBpucGQh.js} +1 -1
- package/dist/client/assets/{use-view-mode-BE4pCHrP.js → use-view-mode-BVrJNwcR.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-1CuGEk-Q.js → use-virtual-mcp-ak6oQOpL.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DNnEgm4S.js +1 -0
- package/dist/client/assets/{useRouterState-B5TWQiWs.js → useRouterState-Dx8mQ23z.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BX2_Qxr6.js +1 -0
- package/dist/client/assets/{users-BcJP-c4R.js → users-CCS1SYP5.js} +1 -1
- package/dist/client/assets/{variant-calendar-Caqpyytx.js → variant-calendar-WXrlvvRY.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DhFesbxw.js → view-mode-toggle-DoOv5WAT.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +195 -195
- package/dist/server/server.js +159 -159
- package/package.json +1 -1
- package/dist/client/assets/automation-runs-B-V_i0FR.js +0 -87
- package/dist/client/assets/page-seo-sheet-ta7l_YbU.js +0 -1
- package/dist/client/assets/project-app-view-DmcoaFOE.js +0 -1
- package/dist/client/assets/record-editor-Dd2x-h5p.js +0 -1
- package/dist/client/assets/redirect-editor-CNwZ4fIt.js +0 -1
- package/dist/client/assets/registry-BLbhzFCc.js +0 -2
- package/dist/client/assets/store-registry-Bsp3lSub.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BYifa8Cc.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CgX7veRN.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as O,bN as cs,bO as zl,j as b,at as Ll,aM as lt,bP as jl,c as us,l as et,bQ as Bi}from"./index-32Z_4GES.js";import{w as Vl}from"./agent-icon-D4a2yQAy.js";import{i as Wl}from"./ChevronRight-D8z61LL4.js";function $l(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function nb(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function rb(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function Y(n){this.content=n}Y.prototype={constructor:Y,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new Y(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Y(t)},addToStart:function(n,e){return new Y([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Y(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Y(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Y.from(n),n.size?new Y(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Y.from(n),n.size?new Y(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Y.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Y.from=function(n){if(n instanceof Y)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Y(e)};function ds(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=ds(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function fs(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let c=fs(s.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class v{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new v(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new v(r,i)}cutByIndex(e,t){return e==t?v.empty:e==0&&t==this.content.length?this:new v(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new v(i,o)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ds(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return fs(this,e,t,r)}findIndex(e){if(e==0)return fn(0,e);if(e==this.size)return fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?fn(t+1,o):fn(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return v.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new v(t||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const rr={index:0,offset:0};function fn(n,e){return rr.index=n,rr.offset=e,rr}function Mn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Mn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Mn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Er{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Mn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Er.none;if(e instanceof Er)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class Cn extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ps(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(hs(this.content,e+this.openStart,t+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,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(v.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new S(e,r,i)}}S.empty=new S(v.empty,0,0);function hs(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(hs(o.content,e-i-1,t-i-1)))}function ps(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=ps(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function ql(n,e,t){if(t.openStart>n.depth)throw new Cn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Cn("Inconsistent open depths");return ms(n,e,t,0)}function ms(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=ms(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return ot(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Hl(t,n);return ot(o,ys(n,s,a,e,r))}else return ot(o,Nn(n,e,r))}function gs(n,e){if(!e.type.compatibleContent(n.type))throw new Cn("Cannot join "+e.type.name+" onto "+n.type.name)}function Tr(n,e,t){let r=n.node(t);return gs(r,e.node(t)),r}function it(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Wt(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(it(n.nodeAfter,r),o++));for(let a=o;a<s;a++)it(i.child(a),r);e&&e.depth==t&&e.textOffset&&it(e.nodeBefore,r)}function ot(n,e){return n.type.checkContent(e),n.copy(e)}function ys(n,e,t,r,i){let o=n.depth>i&&Tr(n,e,i+1),s=r.depth>i&&Tr(t,r,i+1),a=[];return Wt(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(gs(o,s),it(ot(o,ys(n,e,t,r,i+1)),a)):(o&&it(ot(o,Nn(n,e,i+1)),a),Wt(e,t,i,a),s&&it(ot(s,Nn(t,r,i+1)),a)),Wt(r,null,i,a),new v(a)}function Nn(n,e,t){let r=[];if(Wt(null,n,t,r),n.depth>t){let i=Tr(n,e,t+1);it(ot(i,Nn(n,e,t+1)),r)}return Wt(e,null,t,r),new v(r)}function Hl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(v.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Yt{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(this.node(r))))return new Dn(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Yt(t,r,o)}static resolveCached(e,t){let r=Fi.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Fi.set(e,r=new Jl);let i=r.elts[r.i]=Yt.resolve(e,t);return r.i=(r.i+1)%Yl,i}}class Jl{constructor(){this.elts=[],this.i=0}}const Yl=12,Fi=new WeakMap;class Dn{constructor(e,t,r){this.$from=e,this.$to=t,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 Ul=Object.create(null);class ye{constructor(e,t,r,i=j.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||v.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,t,r,i=0){this.content.nodesBetween(e,t,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,t,r,i){return this.content.textBetween(e,t,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,t,r){return this.type==e&&Mn(this.attrs,t||e.defaultAttrs||Ul)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new ye(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ye(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new S(c,i.depth-s,o.depth-s)}replace(e,t,r){return ql(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Yt.resolveCached(this,e)}resolveNoCache(e){return Yt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.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()+")"),bs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=v.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.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=j.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!j.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=v.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}ye.prototype.text=void 0;class En extends ye{constructor(e,t,r,i){if(super(e,t,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):bs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new En(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new En(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function bs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ct{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Kl(e,t);if(r.next==null)return ct.empty;let i=xs(r);r.next&&r.err("Unexpected trailing text");let o=nc(tc(i));return rc(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return v.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.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 t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
1
|
+
import{r as O,bN as cs,bO as zl,j as b,at as Ll,aM as lt,bP as jl,c as us,l as et,bQ as Bi}from"./index-C2u4siS5.js";import{w as Vl}from"./agent-icon-CzJVw_PS.js";import{i as Wl}from"./ChevronRight-ByVxw7yb.js";function $l(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function nb(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function rb(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function Y(n){this.content=n}Y.prototype={constructor:Y,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new Y(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Y(t)},addToStart:function(n,e){return new Y([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Y(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Y(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Y.from(n),n.size?new Y(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Y.from(n),n.size?new Y(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Y.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Y.from=function(n){if(n instanceof Y)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Y(e)};function ds(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=ds(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function fs(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let c=fs(s.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class v{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new v(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new v(r,i)}cutByIndex(e,t){return e==t?v.empty:e==0&&t==this.content.length?this:new v(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new v(i,o)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ds(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return fs(this,e,t,r)}findIndex(e){if(e==0)return fn(0,e);if(e==this.size)return fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?fn(t+1,o):fn(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return v.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new v(t||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const rr={index:0,offset:0};function fn(n,e){return rr.index=n,rr.offset=e,rr}function Mn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Mn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Mn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Er{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Mn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Er.none;if(e instanceof Er)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class Cn extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ps(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(hs(this.content,e+this.openStart,t+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,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(v.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new S(e,r,i)}}S.empty=new S(v.empty,0,0);function hs(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(hs(o.content,e-i-1,t-i-1)))}function ps(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=ps(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function ql(n,e,t){if(t.openStart>n.depth)throw new Cn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Cn("Inconsistent open depths");return ms(n,e,t,0)}function ms(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=ms(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return ot(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Hl(t,n);return ot(o,ys(n,s,a,e,r))}else return ot(o,Nn(n,e,r))}function gs(n,e){if(!e.type.compatibleContent(n.type))throw new Cn("Cannot join "+e.type.name+" onto "+n.type.name)}function Tr(n,e,t){let r=n.node(t);return gs(r,e.node(t)),r}function it(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Wt(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(it(n.nodeAfter,r),o++));for(let a=o;a<s;a++)it(i.child(a),r);e&&e.depth==t&&e.textOffset&&it(e.nodeBefore,r)}function ot(n,e){return n.type.checkContent(e),n.copy(e)}function ys(n,e,t,r,i){let o=n.depth>i&&Tr(n,e,i+1),s=r.depth>i&&Tr(t,r,i+1),a=[];return Wt(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(gs(o,s),it(ot(o,ys(n,e,t,r,i+1)),a)):(o&&it(ot(o,Nn(n,e,i+1)),a),Wt(e,t,i,a),s&&it(ot(s,Nn(t,r,i+1)),a)),Wt(r,null,i,a),new v(a)}function Nn(n,e,t){let r=[];if(Wt(null,n,t,r),n.depth>t){let i=Tr(n,e,t+1);it(ot(i,Nn(n,e,t+1)),r)}return Wt(e,null,t,r),new v(r)}function Hl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(v.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Yt{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(this.node(r))))return new Dn(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Yt(t,r,o)}static resolveCached(e,t){let r=Fi.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Fi.set(e,r=new Jl);let i=r.elts[r.i]=Yt.resolve(e,t);return r.i=(r.i+1)%Yl,i}}class Jl{constructor(){this.elts=[],this.i=0}}const Yl=12,Fi=new WeakMap;class Dn{constructor(e,t,r){this.$from=e,this.$to=t,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 Ul=Object.create(null);class ye{constructor(e,t,r,i=j.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||v.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,t,r,i=0){this.content.nodesBetween(e,t,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,t,r,i){return this.content.textBetween(e,t,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,t,r){return this.type==e&&Mn(this.attrs,t||e.defaultAttrs||Ul)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new ye(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ye(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new S(c,i.depth-s,o.depth-s)}replace(e,t,r){return ql(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Yt.resolveCached(this,e)}resolveNoCache(e){return Yt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.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()+")"),bs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=v.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.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=j.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!j.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=v.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}ye.prototype.text=void 0;class En extends ye{constructor(e,t,r,i){if(super(e,t,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):bs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new En(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new En(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function bs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ct{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Kl(e,t);if(r.next==null)return ct.empty;let i=xs(r);r.next&&r.err("Unexpected trailing text");let o=nc(tc(i));return rc(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return v.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.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 t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
2
2
|
`)}}ct.empty=new ct(!0);class Kl{constructor(e,t){this.string=e,this.nodeTypes=t,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 xs(n){let e=[];do e.push(Gl(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Gl(n){let e=[];do e.push(Xl(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Xl(n){let e=ec(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Ql(n,e);else break;return e}function zi(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Ql(n,e){let t=zi(n),r=t;return n.eat(",")&&(n.next!="}"?r=zi(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Zl(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function ec(n){if(n.eat("(")){let e=xs(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Zl(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function tc(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=t())}else if(s.type=="star"){let l=t();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=t();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let u=t();i(o(s.expr,l),u),l=u}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let u=t();r(l,u),i(o(s.expr,l),u),l=u}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function vs(n,e){return e-n}function Li(n,e){let t=[];return r(e),t.sort(vs);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&t.indexOf(l)==-1&&r(l)}}}function nc(n){let e=Object.create(null);return t(Li(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);Li(n,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new ct(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(vs);o.next.push({type:i[s][0],next:e[a.join(",")]||t(a)})}return o}}function rc(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ks(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function ws(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function Ss(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in n){let o=n[i];o.validate&&o.validate(e[i])}}function Ms(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new oc(n,r,e[r]);return t}let ji=class Cs{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ms(e,r.attrs),this.defaultAttrs=ks(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==ct.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:ws(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ye(this,this.computeAttrs(e),v.from(t),j.setFrom(r))}createChecked(e=null,t,r){return t=v.from(t),this.checkContent(t),new ye(this,this.computeAttrs(e),t,j.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=v.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(v.empty,!0);return o?new ye(this,e,t.append(o),j.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.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){Ss(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 t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:j.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Cs(o,t,s));let i=t.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 o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function ic(n,e,t){let r=t.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class oc{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?ic(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class jn{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Ms(e,i.attrs),this.excluded=null;let o=ks(this.attrs);this.instance=o?new j(this,o):null}create(e=null){return!e&&this.instance?this.instance:new j(this,ws(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new jn(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Ss(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Ns{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Y.from(e.nodes),t.marks=Y.from(e.marks||{}),this.nodes=ji.compile(this.spec.nodes,this),this.marks=jn.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 o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=ct.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?Vi(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:Vi(this,s.split(" "))}this.nodeFromJSON=i=>ye.fromJSON(this,i),this.markFromJSON=i=>j.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ji){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(t,r,i)}text(e,t){let r=this.nodes.text;return new En(r,r.defaultAttrs,e,j.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Vi(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let a in n.marks){let l=n.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function sc(n){return n.tag!=null}function ac(n){return n.style!=null}class $e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(sc(i))this.tags.push(i);else if(ac(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new $i(this,t,!1);return r.addAll(e,j.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new $i(this,t,!0);return r.addAll(e,j.none,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(uc(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(s.getAttrs){let l=s.getAttrs(t);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let a=t[s];if((a.priority==null?50:a.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qi(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qi(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $e(e,$e.schemaRules(e)))}}const Ds={address:!0,article:!0,aside:!0,blockquote:!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},lc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Es={ol:!0,ul:!0},Ut=1,Or=2,$t=4;function Wi(n,e,t){return e!=null?(e?Ut:0)|(e==="full"?Or:0):n&&n.whitespace=="pre"?Ut|Or:t&~$t}class hn{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=j.none,this.match=o||(s&$t?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(v.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);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&Ut)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=v.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(v.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Ds.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class $i{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,o,s=Wi(null,t.preserveWhitespace,0)|(r?$t:0);i?o=new hn(i.type,i.attrs,j.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new hn(null,null,j.none,!0,null,s):o=new hn(e.schema.topNodeType,null,j.none,!0,null,s),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,o=i.options&Or?"full":this.localPreserveWS||(i.options&Ut)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),t,!0),a[l]&&this.insertNode(s.text(a[l]),t,!/\S/.test(a[l]));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 a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;Es.hasOwnProperty(s)&&this.parser.normalizeLists&&cc(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:lc.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(Ds.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=l&&l.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(c=>!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,t.attrs||null,r,t.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,t,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+a)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)t=this.enterInner(i[s],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(t=this.enterInner(o,null,t))}let i=this.findPlace(e,t,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=j.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):Hi(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,t,r,i){let o=this.findPlace(e.create(t),r,!1);return o&&(o=this.enterInner(e,t,r,!0,i)),o}enterInner(e,t,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=Wi(e,o,s.options);s.options&$t&&s.content.length==0&&(a|=$t);let l=j.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Hi(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new hn(e,t,l,i,null,a)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Ut)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&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)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=t[a];if(c==""){if(a==t.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function cc(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Es.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function uc(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function qi(n){let e={};for(let t in n)e[t]=n[t];return e}function Hi(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class pt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=ir(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,t);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=vn(ir(t),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,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&vn(ir(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return vn(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new pt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ji(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ji(e.marks)}}function Ji(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function ir(n){return n.document||window.document}const Yi=new WeakMap;function dc(n){let e=Yi.get(n);return e===void 0&&Yi.set(n,e=fc(n)),e}function fc(n){let e=null;function t(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++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function vn(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=dc(r))&&o.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 s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let a,l=t?n.createElementNS(t,i):n.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 h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=vn(n,h,t,r);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const Ts=65535,Os=Math.pow(2,16);function hc(n,e){return n+e*Os}function Ui(n){return n&Ts}function pc(n){return(n-(n&Ts))/Os}const As=1,Ps=2,kn=4,Rs=8;class Ar{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Rs)>0}get deletedBefore(){return(this.delInfo&(As|kn))>0}get deletedAfter(){return(this.delInfo&(Ps|kn))>0}get deletedAcross(){return(this.delInfo&kn)>0}}class ae{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ae.empty)return ae.empty}recover(e){let t=0,r=Ui(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+pc(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let h=c?e==l?-1:e==d?1:t:t,f=l+i+(h<0?0:u);if(r)return f;let p=e==(t<0?l:d)?null:hc(a/3,e-l),g=e==l?Ps:e==d?As:kn;return(t<0?e!=l:e!=d)&&(g|=Rs),new Ar(f,g,p)}i+=u-c}return r?e+i:new Ar(e+i,0,null)}touches(e,t){let r=0,i=Ui(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==i*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+t],u=this.ranges[i+r];e(a,a+c,l,l+u),o+=u-c}}invert(){return new ae(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ae.empty:new ae(e<0?[0,-e,0]:[0,0,e])}}ae.empty=new ae([]);class Tn{constructor(e,t,r=0,i=e?e.length:0){this.mirror=t,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Tn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new Tn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(e,t);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new Ar(e,i,null)}}const or=Object.create(null);class Z{getMap(){return ae.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=or[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in or)throw new RangeError("Duplicate use of step JSON ID "+e);return or[e]=t,t.prototype.jsonID=e,t}}class ${constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new $(e,null)}static fail(e){return new $(null,e)}static fromReplace(e,t,r,i){try{return $.ok(e.replace(t,r,i))}catch(o){if(o instanceof Cn)return $.fail(o.message);throw o}}}function Kr(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Kr(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return v.fromArray(r)}class je extends Z{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new S(Kr(t.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,o)}invert(){return new me(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new je(t.pos,r.pos,this.mark)}merge(e){return e instanceof je&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new je(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new je(t.from,t.to,e.markFromJSON(t.mark))}}Z.jsonID("addMark",je);class me extends Z{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new S(Kr(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,r)}invert(){return new je(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new me(t.pos,r.pos,this.mark)}merge(e){return e instanceof me&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new me(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new me(t.from,t.to,e.markFromJSON(t.mark))}}Z.jsonID("removeMark",me);class Ve extends Z{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new S(v.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new Ve(this.pos,t.marks[i]);return new Ve(this.pos,this.mark)}}return new ut(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ve(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ve(t.pos,e.markFromJSON(t.mark))}}Z.jsonID("addNodeMark",Ve);class ut extends Z{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new S(v.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ve(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ut(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ut(t.pos,e.markFromJSON(t.mark))}}Z.jsonID("removeNodeMark",ut);class W extends Z{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Pr(e,this.from,this.to)?$.fail("Structure replace would overwrite content"):$.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ae([this.from,this.to-this.from,this.slice.size])}invert(e){return new W(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&W.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new W(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof W)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?S.empty:new S(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new W(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?S.empty:new S(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new W(e.from,this.to,t,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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new W(t.from,t.to,S.fromJSON(e,t.slice),!!t.structure)}}W.MAP_BIAS=1;Z.jsonID("replace",W);class H extends Z{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Pr(e,this.from,this.gapFrom)||Pr(e,this.gapTo,this.to)))return $.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return $.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?$.fromReplace(e,this.from,this.to,r):$.fail("Content does not fit in gap")}getMap(){return new ae([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new H(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new H(t.pos,r.pos,i,o,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new H(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}}Z.jsonID("replaceAround",H);function Pr(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function mc(n,e,t,r){let i=[],o=[],s,a;n.doc.nodesBetween(e,t,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(s&&s.to==h&&s.mark.eq(d[g])?s.to=f:i.push(s=new me(h,f,d[g])));a&&a.to==h?a.to=f:o.push(a=new je(h,f,r))}}),i.forEach(l=>n.step(l)),o.forEach(l=>n.step(l))}function gc(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof jn){let c=s.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,t);for(let u=0;u<l.length;u++){let d=l[u],h;for(let f=0;f<i.length;f++){let p=i[f];p.step==o-1&&d.eq(i[f].style)&&(h=p)}h?(h.to=c,h.step=o):i.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(s=>n.step(new me(s.from,s.to,s.style)))}function Gr(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)s.push(new W(a,u,S.empty));else{r=d;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new me(a,u,c.marks[h]));if(i&&c.isText&&t.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new S(v.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),s.push(new W(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!r.validEnd){let l=r.fillBefore(v.empty,!0);n.replace(a,a,new S(l,0,0))}for(let l=s.length-1;l>=0;l--)n.step(s[l])}function yc(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Pt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,o=0;;--r){let s=n.$from.node(r),a=n.$from.index(r)+i,l=n.$to.indexAfter(r)-o;if(r<n.depth&&s.canReplace(a,l,t))return r;if(r==0||s.type.spec.isolating||!yc(s,a,l))break;a&&(i=1),l<s.childCount&&(o=1)}return null}function bc(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,c=a,u=v.empty,d=0;for(let p=o,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=v.from(r.node(p).copy(u)),d++):l--;let h=v.empty,f=0;for(let p=o,g=!1;p>t;p--)g||i.after(p+1)<i.end(p)?(g=!0,h=v.from(i.node(p).copy(h)),f++):c++;n.step(new H(l,c,s,a,new S(u.append(h),d,f),u.size-d,!0))}function Xr(n,e,t=null,r=n){let i=xc(n,e),o=i&&vc(r,e);return o?i.map(Ki).concat({type:e,attrs:t}).concat(o.map(Ki)):null}function Ki(n){return{type:n,attrs:null}}function xc(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function vc(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(t.child(c).type);return!l||!l.validEnd?null:s}function kc(n,e,t){let r=v.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let a=t[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=v.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new H(i,o,i,o,new S(r,0,0),t.length,!0))}function wc(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&Sc(n.doc,n.mapping.slice(o).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&_s(n,s,a,o),Gr(n,n.mapping.slice(o).map(a,1),r,void 0,c===null);let u=n.mapping.slice(o),d=u.map(a,1),h=u.map(a+s.nodeSize,1);return n.step(new H(d,h,d+1,h-1,new S(v.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&Is(n,s,a,o),!1}})}function Is(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function _s(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(`
|
package/dist/client/assets/{capability-load-error-DifNtXec.js → capability-load-error-C6Zz4eJ1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,n as o,C as c,j as t,x as m,B as u,K as x}from"./index-
|
|
1
|
+
import{c as a,n as o,C as c,j as t,x as m,B as u,K as x}from"./index-C2u4siS5.js";function f(){const e=a.c(5),l=o(),{locator:n}=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(m,{size:28})}),e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"space-y-1",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Couldn't load your permissions"}),t.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:"Something went wrong checking your access. This is usually temporary."})]}),e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[s,i,t.jsx(u,{variant:"outline",size:"sm",onClick:()=>l.invalidateQueries({queryKey:x.myCapabilities(n)}),children:"Try again"})]}),e[2]=n,e[3]=l,e[4]=r):r=e[4],r}export{f as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l as n,j as c}from"./index-
|
|
1
|
+
import{c as o,l as n,j as c}from"./index-C2u4siS5.js";function i(a){const e=o.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let l;return e[5]!==s||e[6]!==r?(l=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=l):l=e[7],l}function f(a){const e=o.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J,r as k,l as Q,j as t,B as U,i as V,t as T}from"./index-32Z_4GES.js";import{i as X}from"./XCircle-DY497Rjn.js";import{c as I}from"./ZoomOut-DO1ABQMU.js";import{n as Y}from"./LinkExternal01-BYMM_QSD.js";import{aL as Z}from"./agent-icon-D4a2yQAy.js";import{f as _,a as K,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-C0dmYQwl.js";import{I as L}from"./input-DNRaDhXk.js";import{L as M}from"./label-DqJN0Zl6.js";import{v as at,w as mt,_ as nt,o as lt,y as R,B as pt,$ as ct,z as dt}from"./index-CyCC6Kib.js";import{c as ut,B as gt,a as xt}from"./block-document-Bp1KtsqP.js";import{u as ft}from"./use-autosave-CKpQpnkI.js";import{t as ht}from"./ChevronDown-DnuZlbXl.js";import{p as yt,q as jt,o as vt}from"./automation-runs-B-V_i0FR.js";import{s as v,E as bt}from"./primitives-CcasBN-m.js";import"./AlertCircle-DriHvGW8.js";import"./Tool01-1JY4WdfO.js";import"./ArrowUp-BHLBiz0J.js";import"./Settings02-BQIoToME.js";import"./Tool02-CJRfU6-e.js";import"./ArrowUpRight-CsopTrXA.js";import"./TrendUp01-Be3cv-nx.js";import"./ZapSquare-DiXc_WiU.js";import"./Users03-01ZOLPet.js";import"./CheckCircle-BSSfIVDh.js";import"./ChevronUp-SvG4tBeC.js";import"./ChevronRight-D8z61LL4.js";import"./DotsVertical-ByzWfjph.js";import"./Stars02-D0dtbcP0.js";import"./Copy01-8RoWdlIb.js";import"./Globe01-C6g7oQ38.js";import"./Eye-BMB6Dsvc.js";import"./FilterLines-Cb5gzr5c.js";import"./Star01-BvPb97r4.js";import"./Globe04-CYEWS6xQ.js";import"./SwitchHorizontal01-B5xg5r1q.js";import"./HardDrive-Dv77s3h5.js";import"./Image01-YE-JCd5P.js";import"./Key01-C9Hax98L.js";import"./LayoutLeft-CoMgIDfR.js";import"./Monitor01-CDUuvvya.js";import"./Sun-BNn7fIcF.js";import"./Package-BwfmB-wY.js";import"./Palette-wIBeqOmX.js";import"./Play-CmeXDhbv.js";import"./Plus-DErQhYMo.js";import"./SearchLg-BcyXaR5Z.js";import"./SearchMd-B2xdLkpr.js";import"./Shield01-BnV0ErmL.js";import"./Stars01-Dq_ij1vd.js";import"./Trash01-D68y5OFq.js";import"./Upload01-CPQnKMdb.js";import"./User01-BErqEcB8.js";import"./Users01-CdOl2233.js";import"./XClose-C4EmtqAA.js";import"./X-DXgmI1I4.js";import"./Zap-BPdmVchQ.js";import"./chat-context-0yEIHZ6c.js";import"./autosend-DViO44x-.js";import"./hooks-C8ac-vFI.js";import"./use-mcp-client-Y-YAGLhv.js";import"./auth-z6bL2iLM.js";import"./decopilot-sse-pool-BNj5yLz-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-n8590dlO.js";import"./use-virtual-mcp-1CuGEk-Q.js";import"./use-collections-CRs3mssF.js";import"./use-ai-providers-DcaGLvIS.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-BAuSsk9W.js";import"./use-organization-settings-Bj1mes2i.js";import"./tooltip-CpOqB12v.js";import"./dialog-pxztKdM4.js";import"./drawer-eINF-fuO.js";import"./collection-search-C0RNwRHs.js";import"./use-mobile-Dfj2nxpB.js";import"./AreaChart-BU465nht.js";import"./index-SNB4eexL.js";import"./calendar-CL1lHfJI.js";import"./shell-layout-gqjfXR2N.js";import"./avatar-f9PWmWko.js";import"./required-auth-layout-BN9gLlS8.js";import"./use-org-sso-e8s6CsXn.js";import"./index-BeXgUXox.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-UpQczPyM.js";import"./use-mcp-tools-UKnbu9YR.js";import"./use-connection-TbmZTa2Q.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-C7P5en8H.js";import"./mcp-oauth-ClvvvmOF.js";import"./extract-connection-data-CeFGCUkk.js";import"./use-members-DSdmplcs.js";import"./use-org-auth-client-DSB0aKlT.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-CRae2C9x.js";import"./popover-RIaRL7oB.js";import"./command-DjqCY9Vi.js";import"./index-BSVi3cEY.js";import"./use-copy-GJ89hYnU.js";import"./form--yMAb3ro.js";import"./select-B_NF3ir8.js";import"./tabs-C1aAnItW.js";import"./toggle-group-Buak4Ijq.js";import"./use-deco-credits-FWA0HDvb.js";import"./connection-card-FP7DKtbx.js";import"./use-registry-connections-HQz0dDkM.js";import"./useInfiniteQuery-BYifa8Cc.js";import"./use-infinite-scroll-DDA5AXOs.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-D4CJeQSR.js";import"./integration-icon-Bj_L5G59.js";import"./textarea-BIQq3kPx.js";import"./connection-form-helpers-C7V7pVnH.js";import"./collection-tabs-Dhx2wMNU.js";import"./badge-D-j0sOs9.js";import"./useSuspenseInfiniteQuery-CgX7veRN.js";import"./connect-desktop-dialog-D_e_16jN.js";import"./select-model-CD-bNwFP.js";import"./checkbox-JCl8QP8q.js";import"./skeleton-TPY4BgOd.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-qHo4Kia8.js";import"./index-xVsqSBJP.js";import"./file-type-icon-zSQ0dOtZ.js";import"./toolbar-ChkgagFk.js";import"./use-debounced-value-D3KV6ORm.js";import"./index-BsOcdcPy.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-t_gRyaZh.js";import"./empty-state-DvObzH8u.js";import"./use-capability-x8vfxJ7c.js";import"./toolbar-icon-button-D0eZmrE1.js";import"./use-debounced-autosave-DxPGO2nZ.js";import"./index-BFiY8eXY.js";import"./sidebar-ChQMKige.js";import"./search-input-DrcJxljH.js";import"./use-mcp-auth-status-DlG18-0i.js";import"./switch-Vi8KqJDK.js";import"./github-repo-picker-Cgx6amzW.js";import"./use-navigate-to-agent-DYHGQgra.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-CyDme1l0.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Bn5T5Kw9.js";import"./monaco-editor-D20TtRkQ.js";import"./use-file-configs-CuD4x2Qa.js";import"./use-automations-CuxMc1af.js";import"./automation-list-row-Bu9C738j.js";import"./table-4z3VGMcV.js";import"./use-clock-tick-BXhg46lH.js";function Ct(b){const e=J.c(18),{icon:x,title:n,defaultOpen:C,children:d}=b,D=C===void 0?!1:C,[f,A]=k.useState(D);let l;e[0]!==x?(l=t.jsx(x,{size:15}),e[0]=x,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=f&&"rotate-180";let r;e[4]!==h?(r=Q("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==f||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:f,onOpenChange:A,className:"mt-4",children:[c,s]}),e[14]=f,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function hr({orgSlug:b,virtualMcpId:e,branch:x,blockKey:n,block:C,decofile:d,meta:D,onManagePosts:f,onOpenPost:A,previewBaseUrl:l}){const i=at({orgSlug:b,virtualMcpId:e,branch:x}),h=mt(C,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,S)=>p({...r,[o]:S}),u=ut({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=k.useState(a),[m,N]=k.useState(null),[w,$]=k.useState(!1),z=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=z.length,q=o=>s("slug",o),H=async(o,S)=>{const G=v(r.name);$(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:G,slug:S});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const P={...r,slug:S};await i.mutateAsync({blockKey:n,data:R(n,"categories",P)}),c(P),T.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),N(null)}catch(g){y(o),N(null),T.error(g instanceof Error?g.message:"Rename failed")}finally{$(!1)}},W=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){q(o);return}N({oldSlug:a,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(U,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Y,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(M,{htmlFor:"category-slug",children:"Slug"}),t.jsx(L,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:W,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(M,{htmlFor:"category-description",children:"Description"}),t.jsx(L,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Z,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:D,sandboxRef:{orgSlug:b,virtualMcpId:e,branch:x},emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(I,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(U,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>f(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>A(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(I,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(_,{open:!!m,onOpenChange:o=>{o||w||(y(a),N(null))},children:t.jsxs(K,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:w,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&H(m.oldSlug,m.newSlug)},disabled:w,children:w?t.jsxs(t.Fragment,{children:[t.jsx(V,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{hr as CategoryEditor};
|
|
1
|
+
import{c as J,r as k,l as Q,j as t,B as U,i as V,t as T}from"./index-C2u4siS5.js";import{i as X}from"./XCircle-C6mRHoZP.js";import{c as I}from"./ZoomOut-shbGcJgg.js";import{n as Y}from"./LinkExternal01-wLaoE2BO.js";import{aL as Z}from"./agent-icon-CzJVw_PS.js";import{f as _,a as K,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-Y1XXElMo.js";import{I as L}from"./input-Cb7CGqPN.js";import{L as M}from"./label-DhK5GRHz.js";import{v as at,w as mt,_ as nt,o as lt,y as R,B as pt,$ as ct,z as dt}from"./index-Cg3sR771.js";import{c as ut,B as gt,a as xt}from"./block-document-aXxr97-G.js";import{u as ft}from"./use-autosave-CY_dkvOM.js";import{t as ht}from"./ChevronDown-BpKPHxDG.js";import{p as yt,q as jt,o as vt}from"./automation-runs-BdqIedR2.js";import{s as v,E as bt}from"./primitives-BldH5G0Y.js";import"./AlertCircle-DfZqGdIO.js";import"./Tool01-CpROxlr0.js";import"./ArrowUp-mYUQI3ny.js";import"./Settings02-DcvdDwJo.js";import"./Tool02-C8iwn6Q8.js";import"./ArrowUpRight-D7jEUphZ.js";import"./TrendUp01-ryekGRAe.js";import"./ZapSquare-BAQcu1iA.js";import"./Users03-DmiDj7OC.js";import"./CheckCircle-BA3THiSr.js";import"./ChevronUp-DKgNoV7g.js";import"./ChevronRight-ByVxw7yb.js";import"./DotsVertical-Ctyi_Fcj.js";import"./Stars02-PuKOl8z5.js";import"./Copy01-AuaMhdvh.js";import"./Globe01-9M3ZtnRh.js";import"./Eye-CaHkvWGU.js";import"./FilterLines-B_F076bt.js";import"./Star01-DVFgs_0J.js";import"./Globe04-BBu3oRiw.js";import"./SwitchHorizontal01-DYptKpyt.js";import"./HardDrive-Czo8EXKT.js";import"./Image01-C8aqMMC0.js";import"./Key01-HpKP7kjq.js";import"./LayoutLeft-BZQmnN4U.js";import"./Monitor01-CCqvvSCN.js";import"./Sun-Cw5YUhig.js";import"./Package-DXwLO7TZ.js";import"./Palette-BOYYX-x4.js";import"./Play-Bhc_0wGz.js";import"./Plus-BFo0Fsne.js";import"./SearchLg-D_s4Wx9C.js";import"./SearchMd-DnmtefV6.js";import"./Shield01-hx04AF4i.js";import"./Stars01-B5Wh8soo.js";import"./Trash01-zPnxi6aE.js";import"./Upload01-L8Z9Doey.js";import"./User01-DewcmwdK.js";import"./Users01-Dc2haknw.js";import"./XClose-CnDiE4wN.js";import"./X-DvSaCzV-.js";import"./Zap-B7fiN40E.js";import"./chat-context-CWKEbJVu.js";import"./autosend-C5LHLeko.js";import"./hooks-DPnPW1Ib.js";import"./use-mcp-client-ioNtd9Ao.js";import"./auth-DGbJKtcV.js";import"./decopilot-sse-pool-BOQSRcee.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-DScMFawl.js";import"./use-virtual-mcp-ak6oQOpL.js";import"./use-collections-D6OYG-wc.js";import"./use-ai-providers-DHwTb1GL.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-D35HEWEA.js";import"./use-organization-settings-AW4Wtsqe.js";import"./tooltip-DK2r83_Q.js";import"./dialog-CvsnsHc6.js";import"./drawer-D8dHZiX8.js";import"./collection-search-CwZ01sWP.js";import"./use-mobile-Xv_R9Qvv.js";import"./AreaChart-DXIhupUU.js";import"./index-BOTjGzy-.js";import"./calendar-DX2eI8nn.js";import"./shell-layout-BBgOrDIL.js";import"./avatar-DBnOObMJ.js";import"./required-auth-layout-B1JMkrdm.js";import"./use-org-sso-DL3XEgfJ.js";import"./index-BP1MoKqU.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-DboVWLxl.js";import"./use-mcp-tools-DC9bMhqt.js";import"./use-connection-B5YB38XE.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-tUtbW76M.js";import"./mcp-oauth-BC7utMST.js";import"./extract-connection-data-CTvABTjg.js";import"./use-members-C5fA1N1j.js";import"./use-org-auth-client-17utjSn0.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-C1qlOMZ7.js";import"./popover-DfzsvCwC.js";import"./command-Sec7WA_A.js";import"./index-BvCHxsMv.js";import"./use-copy-BkTOsha4.js";import"./form-DWLFR7nn.js";import"./select-DMy4CZEM.js";import"./tabs-DVwZBWMX.js";import"./toggle-group-BSTIOzYn.js";import"./use-deco-credits-Sg-ppvw1.js";import"./connection-card-DNDrESB-.js";import"./use-registry-connections-Chwp5-AC.js";import"./useInfiniteQuery-DNnEgm4S.js";import"./use-infinite-scroll-CAmtVNGd.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CMA-4CeN.js";import"./integration-icon-J19ZNMb3.js";import"./textarea-CTeZ2lal.js";import"./connection-form-helpers-l_ijwaHD.js";import"./collection-tabs-BtxGuG1G.js";import"./badge-C6MoaNaP.js";import"./useSuspenseInfiniteQuery-BX2_Qxr6.js";import"./connect-desktop-dialog-aCqZE31x.js";import"./select-model-CeH3eiDd.js";import"./checkbox-BZmlCGR-.js";import"./skeleton-BTXeFNOv.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C9wxXn_P.js";import"./index-C8qWG1s1.js";import"./file-type-icon-DnyFLF_v.js";import"./toolbar-CgZE309S.js";import"./use-debounced-value-BWIL-1on.js";import"./index-CfPj3M1l.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DBpucGQh.js";import"./empty-state-DA8bHc-1.js";import"./use-capability-ML8qbFhc.js";import"./toolbar-icon-button-8zS2muhz.js";import"./use-debounced-autosave-sFFdGAPI.js";import"./index-D3xpdmzO.js";import"./sidebar-odBC32K5.js";import"./search-input-CFD2CbeL.js";import"./use-mcp-auth-status-AcbyV1My.js";import"./switch-Ds8K2Lh_.js";import"./github-repo-picker-BnPj766W.js";import"./use-navigate-to-agent-6EBjGP72.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-oaZoGdZ_.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-CXq5b4GI.js";import"./monaco-editor-BIYcRCql.js";import"./use-file-configs-BCPI-hCq.js";import"./use-automations-BJ1_8SDs.js";import"./automation-list-row-Ci-vo0Ok.js";import"./table-BW9KHE3_.js";import"./use-clock-tick-D6R8tdxE.js";function Ct(b){const e=J.c(18),{icon:x,title:n,defaultOpen:C,children:d}=b,D=C===void 0?!1:C,[f,A]=k.useState(D);let l;e[0]!==x?(l=t.jsx(x,{size:15}),e[0]=x,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=f&&"rotate-180";let r;e[4]!==h?(r=Q("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==f||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:f,onOpenChange:A,className:"mt-4",children:[c,s]}),e[14]=f,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function hr({orgSlug:b,virtualMcpId:e,branch:x,blockKey:n,block:C,decofile:d,meta:D,onManagePosts:f,onOpenPost:A,previewBaseUrl:l}){const i=at({orgSlug:b,virtualMcpId:e,branch:x}),h=mt(C,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,S)=>p({...r,[o]:S}),u=ut({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=k.useState(a),[m,N]=k.useState(null),[w,$]=k.useState(!1),z=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=z.length,q=o=>s("slug",o),H=async(o,S)=>{const G=v(r.name);$(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:G,slug:S});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const P={...r,slug:S};await i.mutateAsync({blockKey:n,data:R(n,"categories",P)}),c(P),T.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),N(null)}catch(g){y(o),N(null),T.error(g instanceof Error?g.message:"Rename failed")}finally{$(!1)}},W=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){q(o);return}N({oldSlug:a,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(U,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Y,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(M,{htmlFor:"category-slug",children:"Slug"}),t.jsx(L,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:W,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(M,{htmlFor:"category-description",children:"Description"}),t.jsx(L,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Z,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:D,sandboxRef:{orgSlug:b,virtualMcpId:e,branch:x},emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(I,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(U,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>f(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>A(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(I,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(_,{open:!!m,onOpenChange:o=>{o||w||(y(a),N(null))},children:t.jsxs(K,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:w,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&H(m.oldSlug,m.newSlug)},disabled:w,children:w?t.jsxs(t.Fragment,{children:[t.jsx(V,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{hr as CategoryEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Fe,u as Ee,n as qe,t as ae,G as le,D as de,b as je,e as et,r as x,p as tt,a as nt,U as st,ak as at}from"./index-
|
|
1
|
+
import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Fe,u as Ee,n as qe,t as ae,G as le,D as de,b as je,e as et,r as x,p as tt,a as nt,U as st,ak as at}from"./index-C2u4siS5.js";import{A as Ue,c as ot,a as rt,w as it}from"./autosend-C5LHLeko.js";import{S as ct,b as lt,e as dt,u as ut}from"./hooks-DPnPW1Ib.js";import{u as pt}from"./studio-tools-DScMFawl.js";import{a as ft,u as ht,S as mt}from"./use-mcp-client-ioNtd9Ao.js";import{a as gt}from"./use-virtual-mcp-ak6oQOpL.js";import{u as yt,a as ge}from"./use-ai-providers-DHwTb1GL.js";import{o as xt,b as St}from"./location-BpLtHjTZ.js";import{d as bt,q as vt,n as It}from"./tab-id-BijBBRwE.js";import{u as kt}from"./use-decopilot-events-D35HEWEA.js";import{e as Ct}from"./use-organization-settings-AW4Wtsqe.js";const Tt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Mt={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},wt={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},Et={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},At={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},_t={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function Qe(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Rt(t){return Qe(t).includes("deepresearch")}const $t=["sonar","searchpreview","online"];function Ke(t){const e=Qe(t);return e.includes("deepresearch")?!1:$t.some(n=>e.includes(n))}function We(t){return t.asyncResearch!==!0&&Ke(t.modelId)}function Ve(t){return t.asyncResearch===!0||Rt(t.modelId)||Ke(t.modelId)}function ie(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function Pt(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=ie(a,s.id,Tt[o]??[])),n.chat.smart||(n.chat.smart=ie(a,s.id,Mt[o]??[])),n.chat.thinking||(n.chat.thinking=ie(a,s.id,wt[o]??[])),n.image||(n.image=ie(a,s.id,Et[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=ie(a,s.id,At[o]??[],We)),n.deepResearch||(n.deepResearch=ie(a,s.id,_t[o]??[],Ve))}return n}const Dt=Ze("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Cn(t){const e=oe.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Xe(Dt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=K.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=K.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let c;e[5]!==a?(c=K.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=c):c=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=K.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=p):p=e[7];let d;return e[8]!==c?(d=K.jsxs("div",{role:"status",children:[c,p]}),e[8]=c,e[9]=d):d=e[9],d}const Pe={online:!1,capabilities:[],ready:!1};function Ot(t){const e=oe.c(9),{org:n}=Y(),s=pt(),a=t?.fast??!1;let o;e[0]!==n.id?(o=ue.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const b=await s.call("LINK_CURRENT_GET",{});return b?{...b,ready:!0}:{...Pe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const c=a?1e3:1e4,p=a?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==c||e[7]!==p?(d={queryKey:o,queryFn:r,staleTime:c,refetchInterval:p,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=c,e[7]=p,e[8]=d):d=e[8];const{data:g}=Ye(d);return g??Pe}function Lt(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
2
2
|
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const ve={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Nt(t,e){if(!t)return null;const n=e?Je(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,a]of Object.entries(ve))if(a.harness===t&&a.sandbox===n)return s;return null}function Tn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function Ft(t,e){return e&&t&&ve[t].sandbox==="user-desktop"?"decopilot":t}function qt(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function jt(t){const e=oe.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=Fe(n);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ee(a);let r;e[2]!==o.brand||e[3]!==o.main||e[4]!==o.preview||e[5]!==o.skill?(r=(typeof o.main=="string"?bt(o.main)?.path:void 0)??o.preview??o.skill??o.brand??null,e[2]=o.brand,e[3]=o.main,e[4]=o.preview,e[5]=o.skill,e[6]=r):r=e[6];const c=r;let p;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(p=[],t&&p.push(`### Selected Agent
|
|
3
3
|
- ID: ${t}`),c){let g;e[13]!==c?(g=xt(c),e[13]=c,e[14]=g):g=e[14];const b=g;let A;e[15]!==c?(A=St(c),e[15]=c,e[16]=A):A=e[16],p.push(`### Currently Open File
|
|
4
4
|
The user has this file open in the Library and is most likely referring to it:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as d,j as c,bE as l,bF as b}from"./index-
|
|
1
|
+
import{c as n,l as d,j as c,bE as l,bF as b}from"./index-C2u4siS5.js";import{i as m}from"./ChevronUp-DKgNoV7g.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-C2u4siS5.js";import{A as u}from"./auth-split-layout-BrESDdg5.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y,j as t,B as F,i as Y,H as Ge,I as se,E as Pe,r as T,C as re,M as Qe,l as V,bd as Ze,u as Ye,L as G,t as Xe,e as ae,aZ as ke}from"./index-32Z_4GES.js";import{E as Ee}from"./empty-state-DvObzH8u.js";import{u as et,a as Ae}from"./use-collections-CRs3mssF.js";import{u as ce}from"./use-mcp-client-Y-YAGLhv.js";import{F as ne,a as tt,b as de,d as me}from"./form--yMAb3ro.js";import{I as ue}from"./input-DNRaDhXk.js";import{T as le}from"./textarea-BIQq3kPx.js";import{a as st,b as nt,V as xe,O as ot,M as it}from"./index-ZgzVcEPr.js";import{ax as lt,O as rt,an as at,V as ct,a4 as dt,ay as mt,Z as be}from"./agent-icon-D4a2yQAy.js";import{g as ut,M as xt,a as Ne}from"./index-SNB4eexL.js";import{A as pt,a as ft,b as ht}from"./alert-ZjKFCE6g.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-B_NF3ir8.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-CpOqB12v.js";import{i as jt}from"./AlertCircle-DriHvGW8.js";import{s as bt}from"./Stars02-D0dtbcP0.js";import{a as Nt}from"./Copy01-8RoWdlIb.js";import{i as vt}from"./Play-CmeXDhbv.js";import{i as St}from"./ChevronRight-D8z61LL4.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./use-mcp-auth-status-DlG18-0i.js";import{a as Oe,u as Re}from"./use-connection-TbmZTa2Q.js";import{a as It}from"./use-mcp-tools-UKnbu9YR.js";import{M as $t,c as Tt}from"./monaco-editor-D20TtRkQ.js";import{I as Te}from"./integration-icon-Bj_L5G59.js";import{h as Pt,m as kt}from"./chat-context-0yEIHZ6c.js";import{u as Et}from"./shell-layout-gqjfXR2N.js";import{n as At}from"./Tool02-CJRfU6-e.js";import"./auth-z6bL2iLM.js";import"./label-DqJN0Zl6.js";import"./index-BFiY8eXY.js";import"./sidebar-ChQMKige.js";import"./LayoutLeft-CoMgIDfR.js";import"./use-mobile-Dfj2nxpB.js";import"./X-DXgmI1I4.js";import"./ZoomOut-DO1ABQMU.js";import"./Key01-C9Hax98L.js";import"./extract-connection-data-CeFGCUkk.js";import"./use-registry-connections-HQz0dDkM.js";import"./use-organization-settings-Bj1mes2i.js";import"./studio-tools-n8590dlO.js";import"./Plus-DErQhYMo.js";import"./index-3nwYTcZz.js";import"./index-BSVi3cEY.js";import"./popover-RIaRL7oB.js";import"./use-virtual-mcp-1CuGEk-Q.js";import"./ChevronUp-SvG4tBeC.js";import"./SearchMd-B2xdLkpr.js";import"./Users03-01ZOLPet.js";import"./use-create-virtual-mcp-D4A9sXWT.js";import"./use-navigate-to-agent-DYHGQgra.js";import"./hooks-C8ac-vFI.js";import"./decopilot-sse-pool-BNj5yLz-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-1JY4WdfO.js";import"./ArrowUp-BHLBiz0J.js";import"./Settings02-BQIoToME.js";import"./XCircle-DY497Rjn.js";import"./ArrowUpRight-CsopTrXA.js";import"./TrendUp01-Be3cv-nx.js";import"./ZapSquare-DiXc_WiU.js";import"./CheckCircle-BSSfIVDh.js";import"./ChevronDown-DnuZlbXl.js";import"./DotsVertical-ByzWfjph.js";import"./Globe01-C6g7oQ38.js";import"./Eye-BMB6Dsvc.js";import"./FilterLines-Cb5gzr5c.js";import"./Star01-BvPb97r4.js";import"./Globe04-CYEWS6xQ.js";import"./SwitchHorizontal01-B5xg5r1q.js";import"./HardDrive-Dv77s3h5.js";import"./Image01-YE-JCd5P.js";import"./LinkExternal01-BYMM_QSD.js";import"./Monitor01-CDUuvvya.js";import"./Sun-BNn7fIcF.js";import"./Package-BwfmB-wY.js";import"./Palette-wIBeqOmX.js";import"./SearchLg-BcyXaR5Z.js";import"./Shield01-BnV0ErmL.js";import"./Stars01-Dq_ij1vd.js";import"./Trash01-D68y5OFq.js";import"./Upload01-CPQnKMdb.js";import"./User01-BErqEcB8.js";import"./Users01-CdOl2233.js";import"./XClose-C4EmtqAA.js";import"./Zap-BPdmVchQ.js";import"./badge-D-j0sOs9.js";import"./mcp-oauth-ClvvvmOF.js";import"./index-BsOcdcPy.js";import"./autosend-DViO44x-.js";import"./use-ai-providers-DcaGLvIS.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-BAuSsk9W.js";import"./avatar-f9PWmWko.js";import"./dialog-pxztKdM4.js";import"./required-auth-layout-BN9gLlS8.js";import"./use-org-sso-e8s6CsXn.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:i,isSaving:l,saveLabel:a,undoLabel:c}=s,r=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!i)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(lt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==l||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:l,"aria-label":u,children:[x,u]}),e[1]=l,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==l?(p=l?t.jsx(Y,{size:14,className:"animate-spin"}):t.jsx(rt,{size:14}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==l||e[8]!==o||e[9]!==r||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:l,"aria-label":r,children:[p,r]}),e[7]=l,e[8]=o,e[9]=r,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function ie(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let i;e[1]!==o.control?(i=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=i):i=e[2];let l,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=a):(l=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let r;e[7]!==i||e[8]!==c?(r=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=r):r=e[9];let u;return e[10]!==o||e[11]!==r?(u=t.jsx(tt,{...o,children:r}),e[10]=o,e[11]=r,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(le,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:i}=re(),l=o||null;let a;e[0]!==i.id||e[1]!==i.slug||e[2]!==l?(a={connectionId:l,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=l,e[3]=a):a=e[3];const c=ce(a),r=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==r?(m=r?{title:r.title,description:r.description??null,body:ie(r)}:void 0,e[4]=r,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==r?(g=()=>{r&&f.reset({title:r.title,description:r.description??null,body:ie(r)})},e[8]=f,e[9]=r,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:ie(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!r){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==r.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:r.title}),e[16]=r.title,e[17]=$):$=e[17];let E;e[18]!==r.description?(E=r.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:r.description})]}):null,e[18]=r.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const i=n;if(!i){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==o?(l=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:i,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Q(s){const e=y.c(10);let o,n,i;e[0]!==s?({asChild:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);const l=o?Ze:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==i||e[8]!==a?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:a,...i}),e[6]=l,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Z(s){const e=y.c(12);let o,n,i;e[0]!==s?({children:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);let l;e[4]!==n?(l=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==i||e[9]!==l||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...i,children:a}),e[8]=i,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:i,onSelectInstance:l,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const r=wt(c);if(!r.isAuthenticated){let m;return e[2]!==r.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(it,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==l||e[7]!==i||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:i,onSelectInstance:l},u),e[5]=n,e[6]=l,e[7]=i,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:i}=Ye({strict:!1}),l=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!l)return null;const d={};for(const[h,v]of Object.entries(l))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,r]=T.useState(a??{}),[u,x]=T.useState(l?JSON.stringify(l,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=re(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{r(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Z,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Z,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(le,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(le,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):L.isLoading?t.jsx(Y,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:i}=s,[l,a]=T.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(p=>p.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const r=c;if(!Oe(r||void 0)||!r){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==r||e[6]!==i||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:r,siblings:n,onSelectInstance:a,onBack:i})}),e[5]=r,e[6]=i,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:i,description:l,buttonProps:a,buttonComponent:c,className:r,children:u}=s;let x;e[0]!==r?(x=V("flex flex-col items-center justify-center py-16 text-center",r),e[0]=r,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==i?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:i}),e[5]=i,e[6]=p):p=e[6];let f;e[7]!==l?(f=l&&t.jsx("div",{className:"text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const a=Re(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const r=c,u=Wt;let x;return s[5]!==r||s[6]!==i||s[7]!==a?(x=t.jsx(Jt,{itemId:i,siblings:a,onBack:r,onUpdate:u}),s[5]=r,s[6]=i,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:r}=re();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==r.id||s[6]!==r.slug||s[7]!==g?(S={connectionId:g,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,i,I);let $;s[9]!==R||s[10]!==l?($=async M=>{l&&await R.update.mutateAsync({id:l,data:M})},s[9]=R,s[10]=l,s[11]=$):$=s[11];const E=$;let P;s[12]!==i?(P=i?.toLowerCase(),s[12]=i,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==i?(C=Gt(i),s[14]=i,s[15]=C):C=s[15];const k=C;let N;s[16]!==r.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Z,{}),s[18]=A):A=s[18];let U;s[19]!==i||s[20]!==m||s[21]!==r.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:n.appSlug},search:{tab:i},children:m.title})})}),t.jsx(Z,{})]}),s[19]=i,s[20]=m,s[21]=r.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==l?(M=t.jsx(w,{itemId:l,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=l,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Zt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Qt,{}),s[2]=l):l=s[2],l}function Jn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Zt,{})})}),s[0]=e):e=s[0],e}export{Jn as default};
|
|
1
|
+
import{c as y,j as t,B as F,i as Y,H as Ge,I as se,E as Pe,r as T,C as re,M as Qe,l as V,bd as Ze,u as Ye,L as G,t as Xe,e as ae,aZ as ke}from"./index-C2u4siS5.js";import{E as Ee}from"./empty-state-DA8bHc-1.js";import{u as et,a as Ae}from"./use-collections-D6OYG-wc.js";import{u as ce}from"./use-mcp-client-ioNtd9Ao.js";import{F as ne,a as tt,b as de,d as me}from"./form-DWLFR7nn.js";import{I as ue}from"./input-Cb7CGqPN.js";import{T as le}from"./textarea-CTeZ2lal.js";import{a as st,b as nt,V as xe,O as ot,M as it}from"./index-gs_-K8Xc.js";import{ax as lt,O as rt,an as at,V as ct,a4 as dt,ay as mt,Z as be}from"./agent-icon-CzJVw_PS.js";import{g as ut,M as xt,a as Ne}from"./index-BOTjGzy-.js";import{A as pt,a as ft,b as ht}from"./alert-j08TigIF.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-DMy4CZEM.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-DK2r83_Q.js";import{i as jt}from"./AlertCircle-DfZqGdIO.js";import{s as bt}from"./Stars02-PuKOl8z5.js";import{a as Nt}from"./Copy01-AuaMhdvh.js";import{i as vt}from"./Play-Bhc_0wGz.js";import{i as St}from"./ChevronRight-ByVxw7yb.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./use-mcp-auth-status-AcbyV1My.js";import{a as Oe,u as Re}from"./use-connection-B5YB38XE.js";import{a as It}from"./use-mcp-tools-DC9bMhqt.js";import{M as $t,c as Tt}from"./monaco-editor-BIYcRCql.js";import{I as Te}from"./integration-icon-J19ZNMb3.js";import{h as Pt,m as kt}from"./chat-context-CWKEbJVu.js";import{u as Et}from"./shell-layout-BBgOrDIL.js";import{n as At}from"./Tool02-C8iwn6Q8.js";import"./auth-DGbJKtcV.js";import"./label-DhK5GRHz.js";import"./index-D3xpdmzO.js";import"./sidebar-odBC32K5.js";import"./LayoutLeft-BZQmnN4U.js";import"./use-mobile-Xv_R9Qvv.js";import"./X-DvSaCzV-.js";import"./ZoomOut-shbGcJgg.js";import"./Key01-HpKP7kjq.js";import"./extract-connection-data-CTvABTjg.js";import"./use-registry-connections-Chwp5-AC.js";import"./use-organization-settings-AW4Wtsqe.js";import"./studio-tools-DScMFawl.js";import"./Plus-BFo0Fsne.js";import"./index-CuO_-GZV.js";import"./index-BvCHxsMv.js";import"./popover-DfzsvCwC.js";import"./use-virtual-mcp-ak6oQOpL.js";import"./ChevronUp-DKgNoV7g.js";import"./SearchMd-DnmtefV6.js";import"./Users03-DmiDj7OC.js";import"./use-create-virtual-mcp-mhzGZuKh.js";import"./use-navigate-to-agent-6EBjGP72.js";import"./hooks-DPnPW1Ib.js";import"./decopilot-sse-pool-BOQSRcee.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-CpROxlr0.js";import"./ArrowUp-mYUQI3ny.js";import"./Settings02-DcvdDwJo.js";import"./XCircle-C6mRHoZP.js";import"./ArrowUpRight-D7jEUphZ.js";import"./TrendUp01-ryekGRAe.js";import"./ZapSquare-BAQcu1iA.js";import"./CheckCircle-BA3THiSr.js";import"./ChevronDown-BpKPHxDG.js";import"./DotsVertical-Ctyi_Fcj.js";import"./Globe01-9M3ZtnRh.js";import"./Eye-CaHkvWGU.js";import"./FilterLines-B_F076bt.js";import"./Star01-DVFgs_0J.js";import"./Globe04-BBu3oRiw.js";import"./SwitchHorizontal01-DYptKpyt.js";import"./HardDrive-Czo8EXKT.js";import"./Image01-C8aqMMC0.js";import"./LinkExternal01-wLaoE2BO.js";import"./Monitor01-CCqvvSCN.js";import"./Sun-Cw5YUhig.js";import"./Package-DXwLO7TZ.js";import"./Palette-BOYYX-x4.js";import"./SearchLg-D_s4Wx9C.js";import"./Shield01-hx04AF4i.js";import"./Stars01-B5Wh8soo.js";import"./Trash01-zPnxi6aE.js";import"./Upload01-L8Z9Doey.js";import"./User01-DewcmwdK.js";import"./Users01-Dc2haknw.js";import"./XClose-CnDiE4wN.js";import"./Zap-B7fiN40E.js";import"./badge-C6MoaNaP.js";import"./mcp-oauth-BC7utMST.js";import"./index-CfPj3M1l.js";import"./autosend-C5LHLeko.js";import"./use-ai-providers-DHwTb1GL.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-D35HEWEA.js";import"./avatar-DBnOObMJ.js";import"./dialog-CvsnsHc6.js";import"./required-auth-layout-B1JMkrdm.js";import"./use-org-sso-DL3XEgfJ.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:i,isSaving:l,saveLabel:a,undoLabel:c}=s,r=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!i)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(lt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==l||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:l,"aria-label":u,children:[x,u]}),e[1]=l,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==l?(p=l?t.jsx(Y,{size:14,className:"animate-spin"}):t.jsx(rt,{size:14}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==l||e[8]!==o||e[9]!==r||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:l,"aria-label":r,children:[p,r]}),e[7]=l,e[8]=o,e[9]=r,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function ie(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let i;e[1]!==o.control?(i=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=i):i=e[2];let l,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=a):(l=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let r;e[7]!==i||e[8]!==c?(r=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=r):r=e[9];let u;return e[10]!==o||e[11]!==r?(u=t.jsx(tt,{...o,children:r}),e[10]=o,e[11]=r,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(le,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:i}=re(),l=o||null;let a;e[0]!==i.id||e[1]!==i.slug||e[2]!==l?(a={connectionId:l,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=l,e[3]=a):a=e[3];const c=ce(a),r=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==r?(m=r?{title:r.title,description:r.description??null,body:ie(r)}:void 0,e[4]=r,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==r?(g=()=>{r&&f.reset({title:r.title,description:r.description??null,body:ie(r)})},e[8]=f,e[9]=r,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:ie(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!r){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==r.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:r.title}),e[16]=r.title,e[17]=$):$=e[17];let E;e[18]!==r.description?(E=r.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:r.description})]}):null,e[18]=r.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const i=n;if(!i){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==o?(l=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:i,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Q(s){const e=y.c(10);let o,n,i;e[0]!==s?({asChild:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);const l=o?Ze:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==i||e[8]!==a?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:a,...i}),e[6]=l,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Z(s){const e=y.c(12);let o,n,i;e[0]!==s?({children:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);let l;e[4]!==n?(l=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==i||e[9]!==l||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...i,children:a}),e[8]=i,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:i,onSelectInstance:l,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const r=wt(c);if(!r.isAuthenticated){let m;return e[2]!==r.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(it,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==l||e[7]!==i||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:i,onSelectInstance:l},u),e[5]=n,e[6]=l,e[7]=i,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:i}=Ye({strict:!1}),l=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!l)return null;const d={};for(const[h,v]of Object.entries(l))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,r]=T.useState(a??{}),[u,x]=T.useState(l?JSON.stringify(l,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=re(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{r(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Z,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Z,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(le,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(le,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):L.isLoading?t.jsx(Y,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:i}=s,[l,a]=T.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(p=>p.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const r=c;if(!Oe(r||void 0)||!r){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==r||e[6]!==i||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:r,siblings:n,onSelectInstance:a,onBack:i})}),e[5]=r,e[6]=i,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:i,description:l,buttonProps:a,buttonComponent:c,className:r,children:u}=s;let x;e[0]!==r?(x=V("flex flex-col items-center justify-center py-16 text-center",r),e[0]=r,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==i?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:i}),e[5]=i,e[6]=p):p=e[6];let f;e[7]!==l?(f=l&&t.jsx("div",{className:"text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const a=Re(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const r=c,u=Wt;let x;return s[5]!==r||s[6]!==i||s[7]!==a?(x=t.jsx(Jt,{itemId:i,siblings:a,onBack:r,onUpdate:u}),s[5]=r,s[6]=i,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:r}=re();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==r.id||s[6]!==r.slug||s[7]!==g?(S={connectionId:g,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,i,I);let $;s[9]!==R||s[10]!==l?($=async M=>{l&&await R.update.mutateAsync({id:l,data:M})},s[9]=R,s[10]=l,s[11]=$):$=s[11];const E=$;let P;s[12]!==i?(P=i?.toLowerCase(),s[12]=i,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==i?(C=Gt(i),s[14]=i,s[15]=C):C=s[15];const k=C;let N;s[16]!==r.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Z,{}),s[18]=A):A=s[18];let U;s[19]!==i||s[20]!==m||s[21]!==r.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:n.appSlug},search:{tab:i},children:m.title})})}),t.jsx(Z,{})]}),s[19]=i,s[20]=m,s[21]=r.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==l?(M=t.jsx(w,{itemId:l,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=l,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Zt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Qt,{}),s[2]=l):l=s[2],l}function Jn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Zt,{})})}),s[0]=e):e=s[0],e}export{Jn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as s,l as M,B as V}from"./index-
|
|
1
|
+
import{c as B,j as s,l as M,B as V}from"./index-C2u4siS5.js";import{d as z,a as _,c as $,D as E}from"./dropdown-menu-C1qlOMZ7.js";import{i as L,n as O}from"./ArrowUp-mYUQI3ny.js";import{i as S}from"./ChevronUp-DKgNoV7g.js";import{a as R,i as A,c as F}from"./SwitchHorizontal01-DYptKpyt.js";import{T as I,a as K,c as P,b as W}from"./tooltip-DK2r83_Q.js";import{V as q}from"./view-mode-toggle-DoOv5WAT.js";import{B as G}from"./badge-C6MoaNaP.js";function re(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{re as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as b,j as a,i as w}from"./index-
|
|
1
|
+
import{c as v,l as b,j as a,i as w}from"./index-C2u4siS5.js";import{i as C}from"./SearchMd-DnmtefV6.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
|