decocms 4.97.2 → 4.97.3
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-C4BWLdJ4.js → AlertCircle-BHAhKNmK.js} +1 -1
- package/dist/client/assets/{AreaChart-2lzk5ej3.js → AreaChart-BFLsc656.js} +1 -1
- package/dist/client/assets/{ArrowRight-qJlbKSrg.js → ArrowRight-BrCnT9QC.js} +1 -1
- package/dist/client/assets/{ArrowUp-BVYSfKPB.js → ArrowUp-DxGnDz2z.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CZ2fIDWv.js → ArrowUpRight-Da7Xj47Z.js} +1 -1
- package/dist/client/assets/{Check-CymDPtaz.js → Check-y6lwxF--.js} +1 -1
- package/dist/client/assets/{CheckCircle-CeUlzZCm.js → CheckCircle-B2E1-lHd.js} +1 -1
- package/dist/client/assets/{ChevronDown-B6-w9q8W.js → ChevronDown-EuCf1m86.js} +1 -1
- package/dist/client/assets/{ChevronRight-DEIr6kW5.js → ChevronRight-CadciNy4.js} +1 -1
- package/dist/client/assets/{ChevronUp-C_eomkpm.js → ChevronUp-CYsWN-oD.js} +1 -1
- package/dist/client/assets/{Copy01-R8AR2-1c.js → Copy01-B9oBh-Sc.js} +1 -1
- package/dist/client/assets/{DotsVertical-C3MnHRz8.js → DotsVertical-C88_zwNA.js} +1 -1
- package/dist/client/assets/{Eye-CE-cR8Oa.js → Eye-D6wO7Qmh.js} +1 -1
- package/dist/client/assets/{FilterLines-D4J8LYhW.js → FilterLines-CeB6mwpD.js} +1 -1
- package/dist/client/assets/{Globe01-hVg4-cH5.js → Globe01-BSQmAWCO.js} +1 -1
- package/dist/client/assets/{Globe04-D5VJ_hkz.js → Globe04-Meo0lTn8.js} +1 -1
- package/dist/client/assets/{HardDrive-zN0Is6H-.js → HardDrive-CJjhHD1B.js} +1 -1
- package/dist/client/assets/{Image01-DG088yrA.js → Image01-Dilf3q7O.js} +1 -1
- package/dist/client/assets/{Key01-CHhJPyPs.js → Key01-BuFHyFwG.js} +1 -1
- package/dist/client/assets/{LayoutLeft-C4fmYl61.js → LayoutLeft-CQjONItu.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DuSi53Ey.js → LinkExternal01-DBkSmTNi.js} +1 -1
- package/dist/client/assets/{Monitor01-D09qwZZ1.js → Monitor01-BpX1UZkt.js} +1 -1
- package/dist/client/assets/{Package-oKuIYsv6.js → Package-nB3nhOrK.js} +1 -1
- package/dist/client/assets/{Palette-DxnkmeGc.js → Palette-C-DUUOXH.js} +1 -1
- package/dist/client/assets/{Play-BMDEoRJl.js → Play-CORh1b3h.js} +1 -1
- package/dist/client/assets/{Plus-D7pYKUsO.js → Plus-CymFBrv_.js} +1 -1
- package/dist/client/assets/{SearchLg-C42MXEKt.js → SearchLg-BUQSfVKQ.js} +1 -1
- package/dist/client/assets/{SearchMd-CP6wLgs6.js → SearchMd-Dx46GNbC.js} +1 -1
- package/dist/client/assets/{Settings02-BbDm-Ne4.js → Settings02-Bs97ZIUi.js} +1 -1
- package/dist/client/assets/{Shield01-CjiZhLxU.js → Shield01-hMgJ9M7q.js} +1 -1
- package/dist/client/assets/{Star01-DZ_3ux8i.js → Star01-BM6MjJ7W.js} +1 -1
- package/dist/client/assets/{Stars01-JDxcV7AF.js → Stars01-CPGdNFPa.js} +1 -1
- package/dist/client/assets/{Stars02-CmhbeIDG.js → Stars02-DPmHqm_5.js} +1 -1
- package/dist/client/assets/{Sun-DoaIj1xZ.js → Sun-Be3KSXJM.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CRibS_Zy.js → SwitchHorizontal01-likZrCDK.js} +1 -1
- package/dist/client/assets/{Tool01-DMTzqx5i.js → Tool01-DiNQfNvy.js} +1 -1
- package/dist/client/assets/{Tool02-DGUi9uKr.js → Tool02-IVtF0j03.js} +1 -1
- package/dist/client/assets/{Trash01-D08DuleC.js → Trash01-DI7LTPFE.js} +1 -1
- package/dist/client/assets/{TrendUp01-B8sZVpOQ.js → TrendUp01-BCX1tOr9.js} +1 -1
- package/dist/client/assets/{Upload01-kJs7y_sS.js → Upload01-cMcdAXoX.js} +1 -1
- package/dist/client/assets/{User01-9n6b7RP1.js → User01-CVYsS5YD.js} +1 -1
- package/dist/client/assets/{Users01-ZUQPsXZL.js → Users01-DWjKxfaH.js} +1 -1
- package/dist/client/assets/{Users03-CjXk-r9i.js → Users03-CZWdpGhj.js} +1 -1
- package/dist/client/assets/{X-_ogr2Thx.js → X-DMWoe6ED.js} +1 -1
- package/dist/client/assets/{XCircle-Ojqttb4K.js → XCircle-BA2kRTL2.js} +1 -1
- package/dist/client/assets/{XClose-C5Joak01.js → XClose-l2X2CDWa.js} +1 -1
- package/dist/client/assets/{Zap-CVYBhiGb.js → Zap-CmG1qL65.js} +1 -1
- package/dist/client/assets/{ZapSquare-DuoaxuW6.js → ZapSquare-DbcSaxo0.js} +1 -1
- package/dist/client/assets/{ZoomOut-6evm9HJr.js → ZoomOut-zIwnbKGd.js} +1 -1
- package/dist/client/assets/{access-gate-CROyFBNQ.js → access-gate-2KgptRJh.js} +1 -1
- package/dist/client/assets/{add-section-modal-Dtdlek5H.js → add-section-modal-B42eVrGY.js} +1 -1
- package/dist/client/assets/{agent-icon-BBgjEkV0.js → agent-icon-BtZnpkLs.js} +1 -1
- package/dist/client/assets/{agents-list-B2pe35L-.js → agents-list-Bnp8zAsu.js} +1 -1
- package/dist/client/assets/{ai-providers-C3odtRrl.js → ai-providers-DsjxBF5b.js} +1 -1
- package/dist/client/assets/{alert-Be-D3J6_.js → alert-CSs1qt-4.js} +1 -1
- package/dist/client/assets/{alert-dialog-C2Bqhcmc.js → alert-dialog-BFIFM8C5.js} +1 -1
- package/dist/client/assets/{app-editor-B3Nz7_-S.js → app-editor-BLCDgG5E.js} +1 -1
- package/dist/client/assets/{auth-BU8dnKUI.js → auth-DnzmBzsd.js} +1 -1
- package/dist/client/assets/{auth-catchall-EXC_8C7r.js → auth-catchall-CDKV6Csn.js} +1 -1
- package/dist/client/assets/{auth-entry-A7pTSp0P.js → auth-entry-Hm1C4KM_.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C7ta0NVe.js → auth-split-layout-B872E6bM.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CXoW_w5W.js → authenticate-and-persist-oauth-DNlXTrjF.js} +1 -1
- package/dist/client/assets/{automation-list-row-DRyf2mOg.js → automation-list-row-Cl1bK8TB.js} +1 -1
- package/dist/client/assets/{automation-runs-U2tWrOBe.js → automation-runs-iGhaxGuG.js} +1 -1
- package/dist/client/assets/{automations-Dd_qxkUk.js → automations-gNHti-H0.js} +1 -1
- package/dist/client/assets/{autosend-DZWEI21D.js → autosend-BKdSCcaS.js} +1 -1
- package/dist/client/assets/{avatar-UzWl0gwW.js → avatar-i6Im8YbJ.js} +1 -1
- package/dist/client/assets/{badge-Baw1FT-S.js → badge-De0Mn2aQ.js} +1 -1
- package/dist/client/assets/{block-document-Bo4gMMfS.js → block-document-KtXXADJO.js} +1 -1
- package/dist/client/assets/{brand-context-CG5th-2x.js → brand-context-D01sQi-5.js} +1 -1
- package/dist/client/assets/{buckets-t5T7X7Zi.js → buckets-DsNNZkVJ.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BcmvRZsS.js → bulk-category-panel-DmQv8YY1.js} +1 -1
- package/dist/client/assets/{calendar-CDlXA0Du.js → calendar-frZOe-KM.js} +1 -1
- package/dist/client/assets/{capability-load-error-KKdV9Q3l.js → capability-load-error-CE9LGC4o.js} +1 -1
- package/dist/client/assets/{card-zoyg0nhK.js → card-DoS8eHYx.js} +1 -1
- package/dist/client/assets/{category-editor-B3YyI2nN.js → category-editor-g47oT8Er.js} +1 -1
- package/dist/client/assets/{chat-context-DUAqM3BL.js → chat-context-C4uHb9fh.js} +1 -1
- package/dist/client/assets/{checkbox-FmmsZFBn.js → checkbox-C9xto-so.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C8PJDHgg.js → cli-auth-success-IQ5-wweX.js} +1 -1
- package/dist/client/assets/{collection-detail-DFnnR_Ed.js → collection-detail-Csz1925H.js} +1 -1
- package/dist/client/assets/{collection-display-button-O06UP2ip.js → collection-display-button-D6UaoPmu.js} +1 -1
- package/dist/client/assets/{collection-search-zof41lOw.js → collection-search-CCKfG0HO.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-zYN8dorL.js → collection-table-wrapper-D3TX-8Ht.js} +1 -1
- package/dist/client/assets/{collection-tabs-CgqHDjS1.js → collection-tabs-BJllJZst.js} +1 -1
- package/dist/client/assets/{command-rWYtUR5c.js → command-BUFMt8W5.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-C645w_Mz.js → commerce-onboarding-BIHKNhoD.js} +1 -1
- package/dist/client/assets/{companions-core-sVa6Qw5T.js → companions-core-sbB7670J.js} +1 -1
- package/dist/client/assets/{connect-D8942-MM.js → connect-BcLkNEwD.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DxGAbniS.js → connect-desktop-dialog-CEvuTZ6X.js} +1 -1
- package/dist/client/assets/{connection-card-Dz1fwerM.js → connection-card-CGSfDNM4.js} +1 -1
- package/dist/client/assets/{connection-detail-DbXXUV2H.js → connection-detail-95g1t_2D.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C_ssxiIn.js → connection-form-helpers-DcoCg3gU.js} +1 -1
- package/dist/client/assets/{connections-CLeMA5sw.js → connections-FzMuXlBw.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-yan_82bi.js → decopilot-sse-pool-BxDksZ_n.js} +1 -1
- package/dist/client/assets/{dialog-BhvH5UUY.js → dialog-Bz1Pb7BF.js} +1 -1
- package/dist/client/assets/{domain-settings-aEds6nPr.js → domain-settings-Cn2ttuJT.js} +1 -1
- package/dist/client/assets/{drawer-Clee3MiY.js → drawer-Cu47sEU7.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CJMe9yFA.js → dropdown-menu-HGb4wnMG.js} +1 -1
- package/dist/client/assets/{empty-state-YC9UCU06.js → empty-state-DGKv6iaQ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CRUudyOW.js → extract-connection-data-CaQkLtKm.js} +1 -1
- package/dist/client/assets/{file-explorer-xqvaLr55.js → file-explorer-CA757Cbz.js} +1 -1
- package/dist/client/assets/{file-type-icon-Wt0fW6Db.js → file-type-icon-kjm_haaJ.js} +1 -1
- package/dist/client/assets/{files-PO932eji.js → files-D7iHOo0W.js} +1 -1
- package/dist/client/assets/{form-C5iFi2jZ.js → form-BjILzwX8.js} +1 -1
- package/dist/client/assets/{general-BcJnDe6x.js → general-DHt3od4D.js} +1 -1
- package/dist/client/assets/{github-repo-picker-C6QGF-3R.js → github-repo-picker-DNAkBWqO.js} +1 -1
- package/dist/client/assets/{hooks-2c34l0ae.js → hooks-s-wg_yWq.js} +1 -1
- package/dist/client/assets/{index-BZKh5x8S.js → index-1U4mbrvV.js} +3 -3
- package/dist/client/assets/{index-Dha2A-8H.js → index-B3R7me5P.js} +1 -1
- package/dist/client/assets/{index-BWC7sFp_.js → index-BtBAx8XA.js} +3 -3
- package/dist/client/assets/{index-CDy6bFpC.js → index-BwGOx5jo.js} +1 -1
- package/dist/client/assets/{index-CAwc9d0_.js → index-CNkaQrPc.js} +1 -1
- package/dist/client/assets/{index-DXU-zOnf.js → index-Cd_w_H_F.js} +1 -1
- package/dist/client/assets/{index-DdFBHhSl.js → index-CiVIW2Nl.js} +1 -1
- package/dist/client/assets/{index-D8dz7OgV.css → index-CnexIaKK.css} +1 -1
- package/dist/client/assets/{index-D0YUP6cD.js → index-CwNfd2lk.js} +1 -1
- package/dist/client/assets/{index-CHtFJlMs.js → index-IQULYRIk.js} +1 -1
- package/dist/client/assets/{index-DkqrfhJp.js → index-R8HG5AiS.js} +5 -5
- package/dist/client/assets/{index-uvwA1VZB.js → index-cttjfEtv.js} +1 -1
- package/dist/client/assets/{index-D3Egmveq.js → index-dbtBCUMA.js} +1 -1
- package/dist/client/assets/{index-_4qsQ90U.js → index-n3fgmeeF.js} +1 -1
- package/dist/client/assets/{index-D4LYwylo.js → index-qrgZ0NGo.js} +1 -1
- package/dist/client/assets/{index-redirect-Bsk6Qi8z.js → index-redirect-BKezRaRR.js} +1 -1
- package/dist/client/assets/{input-Dwgjs0Me.js → input-Dyh2_qZE.js} +1 -1
- package/dist/client/assets/{integration-icon-9QXIMfmD.js → integration-icon-BIKsn1PU.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CVfjEmwU.js → invite-member-dialog-BvQNVYnl.js} +1 -1
- package/dist/client/assets/{label-BK6sLMEK.js → label-sXTl0vPj.js} +1 -1
- package/dist/client/assets/{layout-BL3WnOhQ.js → layout-CoWaRZeo.js} +1 -1
- package/dist/client/assets/{login-4_3ws-KS.js → login-Q852zIKF.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CCJ1wn2F.js → mcp-oauth-BNY9Gdeq.js} +1 -1
- package/dist/client/assets/{members-DBEjnYOy.js → members-BK09qS7b.js} +1 -1
- package/dist/client/assets/{monaco-editor-dhKEhAZV.js → monaco-editor-DYWuYlrw.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BbVanr4F.js → monitoring-stats-row-DXzFlj0M.js} +1 -1
- package/dist/client/assets/{multi-select-BR19LYze.js → multi-select-kKjMkVge.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dvq5W1_N.js → oauth-callback-CA7gxSc5.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DbmJB-Oh.js → oauth-callback-ai-provider-Blr-W0Zw.js} +1 -1
- package/dist/client/assets/{onboarding-C8unJq0w.js → onboarding-H-k1WFrA.js} +1 -1
- package/dist/client/assets/{org-install--ffHoCdp.js → org-install-BOVJLzIS.js} +1 -1
- package/dist/client/assets/{org-layout-A8-sPwxd.js → org-layout-BF2kMweq.js} +1 -1
- package/dist/client/assets/{organization-choice-DtcC4Aee.js → organization-choice-U7WiVZAf.js} +1 -1
- package/dist/client/assets/{orgs-DzN52fjP.js → orgs-BsFTjDIr.js} +1 -1
- package/dist/client/assets/{page-seo-form-CQiZ7Ngj.js → page-seo-form-DmIu9dR1.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BDXz3gPB.js +1 -0
- package/dist/client/assets/{popover-C35uikDd.js → popover-Dw3xO39E.js} +1 -1
- package/dist/client/assets/{post-editor-Bhd63YjE.js → post-editor-CkQJoa7b.js} +1 -1
- package/dist/client/assets/{primitives-BcOXHRHh.js → primitives-CKQKcei0.js} +1 -1
- package/dist/client/assets/{profile-D7z_2Q-S.js → profile-BWhxc_T_.js} +1 -1
- package/dist/client/assets/project-app-view-Dzg0Hyms.js +1 -0
- package/dist/client/assets/record-editor-ClpVH4Ia.js +1 -0
- package/dist/client/assets/{redirect-editor-mfOHOEeZ.js → redirect-editor-BaYaFVhZ.js} +1 -1
- package/dist/client/assets/registry-CHTQs4v0.js +2 -0
- package/dist/client/assets/{registry-layout-BmXDtVhQ.js → registry-layout-lKRWIioG.js} +1 -1
- package/dist/client/assets/{reports-Ch_0FWNX.js → reports-D9-g7tsW.js} +1 -1
- package/dist/client/assets/{require-capability-BudvvNO5.js → require-capability-BjxeGTTL.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BrqitDmd.js → required-auth-layout-2GvIg9iS.js} +1 -1
- package/dist/client/assets/{reset-password-BbJbIECY.js → reset-password-DAkgadc1.js} +1 -1
- package/dist/client/assets/{roles-BNyb78Mb.js → roles-p_uUuX66.js} +1 -1
- package/dist/client/assets/{search-input-Ccf8_eUm.js → search-input-BKutO8Lz.js} +1 -1
- package/dist/client/assets/{secrets-BzFJ43TI.js → secrets-CSvYoXBT.js} +1 -1
- package/dist/client/assets/{sections-editor-CPeM3Vti.js → sections-editor-C6jjz2D1.js} +1 -1
- package/dist/client/assets/{select-uGrWbEMz.js → select-DEGZ_IWN.js} +1 -1
- package/dist/client/assets/{select-model-gBHKlDIm.js → select-model-B7PYESb7.js} +1 -1
- package/dist/client/assets/{self-tool-result-mjYjIdAR.js → self-tool-result-BT4bWUTC.js} +1 -1
- package/dist/client/assets/{seo-editor-C6FBYCud.js → seo-editor-DpShrS9s.js} +1 -1
- package/dist/client/assets/{settings-layout-DenVW1V_.js → settings-layout-CfPcSY6e.js} +1 -1
- package/dist/client/assets/{settings-section-B8q2fbg4.js → settings-section-BA5qd1iA.js} +1 -1
- package/dist/client/assets/{shell-controls-ChkZgq-8.js → shell-controls-CZP2nE8M.js} +1 -1
- package/dist/client/assets/{shell-layout-Mucs34pV.js → shell-layout-ScztsXlF.js} +1 -1
- package/dist/client/assets/{sidebar-Dv_H2jfW.js → sidebar-BSz--1bS.js} +1 -1
- package/dist/client/assets/{skeleton-CEv-QtIz.js → skeleton-BaKD7gbs.js} +1 -1
- package/dist/client/assets/{sso-NPY_FcmV.js → sso-CoRLqBWj.js} +1 -1
- package/dist/client/assets/{store-DvLImTcn.js → store-D3VrgdyB.js} +1 -1
- package/dist/client/assets/store-registry-Dk5edv4b.js +2 -0
- package/dist/client/assets/{studio-tools-DqyzSTaT.js → studio-tools-CVmQa-wr.js} +1 -1
- package/dist/client/assets/{switch-BQHSVMIs.js → switch-D8BsY_R5.js} +1 -1
- package/dist/client/assets/{table-CbpS0yp4.js → table-D1UGgJJx.js} +1 -1
- package/dist/client/assets/{tabs-_KEklsIu.js → tabs-DorrckbV.js} +1 -1
- package/dist/client/assets/{textarea-D2K-qpEF.js → textarea-BQMP1z52.js} +1 -1
- package/dist/client/assets/{toggle-group-DZVcSFOA.js → toggle-group-C3nFsVA3.js} +1 -1
- package/dist/client/assets/{toolbar-cItkaIEN.js → toolbar-Beg08Z0i.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CmxseXuq.js → toolbar-icon-button-CSU7kSSh.js} +1 -1
- package/dist/client/assets/{tooltip-BmutXqWI.js → tooltip-rruKccQl.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Dp6I5-8x.js → use-ai-providers-Cl1fKuZS.js} +1 -1
- package/dist/client/assets/{use-api-keys-BNoqdZYe.js → use-api-keys-Bi1phtYQ.js} +1 -1
- package/dist/client/assets/{use-automations-zyl04vpa.js → use-automations-BCejZQUy.js} +1 -1
- package/dist/client/assets/{use-autosave-DxV5LsO-.js → use-autosave-MbsjrshC.js} +1 -1
- package/dist/client/assets/{use-capability-B1l0lZqa.js → use-capability-BKDE5sLC.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Bn8KTZQB.js → use-clock-tick-DqdQTNL4.js} +1 -1
- package/dist/client/assets/{use-connection-Db71aL_l.js → use-connection-L-lqPFAt.js} +1 -1
- package/dist/client/assets/{use-copy-C9WCw_xQ.js → use-copy-BFLAC4kD.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B9oPChqg.js → use-create-virtual-mcp-twWonYuu.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CF3nwEaJ.js → use-debounced-autosave-z3BBC6KF.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CmRylZJc.js → use-debounced-value-Bf73a2Dn.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CNlP8bKq.js → use-deco-credits-Kg8cuy_l.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-JGRwbLqN.js → use-decopilot-events-Ce4--_At.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Bbxuu1s-.js → use-delete-connection-_zX9kzb9.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dd6ryBl2.js → use-deployment-admin-DMbaozBm.js} +1 -1
- package/dist/client/assets/{use-file-configs-BNgMZFIO.js → use-file-configs-DyqQzjQE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C9CrduD1.js → use-infinite-scroll-CWP757S6.js} +1 -1
- package/dist/client/assets/{use-join-requests-pdqNaIsl.js → use-join-requests-DkNll3B8.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-B8Ydhf-J.js → use-mcp-auth-status-BkfLoLOV.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BfCXL7Ea.js → use-mcp-client-CynPg1uL.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dmvh1NTU.js → use-mcp-tools-Dsinsy2u.js} +1 -1
- package/dist/client/assets/{use-members-DHjn4tSi.js → use-members-Df-pX_wh.js} +1 -1
- package/dist/client/assets/{use-mobile-D2X5CiwU.js → use-mobile-Dq40loMm.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BRmHvfMz.js → use-navigate-to-agent-6yPtW66t.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Y3lH7Le-.js → use-org-auth-client-DmDRXrVO.js} +1 -1
- package/dist/client/assets/{use-org-sso-C63dt58J.js → use-org-sso-5PRzOD99.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DAWTrk9s.js → use-organization-roles-N-CO1Vtu.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DdWAi5Fa.js → use-organization-settings-C79CzSGf.js} +1 -1
- package/dist/client/assets/{use-registry-app-DhV6qG8g.js → use-registry-app-D3U3LTOB.js} +1 -1
- package/dist/client/assets/{use-registry-connections-B2LAq4ux.js → use-registry-connections-B5YrUvTg.js} +1 -1
- package/dist/client/assets/{use-secrets-C2rRzzPu.js → use-secrets-z-cBc8-s.js} +1 -1
- package/dist/client/assets/{use-status-sounds-K0-7jWPp.js → use-status-sounds-36V78SeG.js} +1 -1
- package/dist/client/assets/{use-view-mode-BSR8qosx.js → use-view-mode-CrQv9zut.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B4R9Gg2E.js → use-virtual-mcp-iyzyi2rH.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DczQf9_R.js +1 -0
- package/dist/client/assets/{useRouterState-DfytzR2p.js → useRouterState-Da--n_2-.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B-6Oc6pG.js +1 -0
- package/dist/client/assets/{users-K-MwRA9n.js → users-B8iKsYkU.js} +1 -1
- package/dist/client/assets/{variant-calendar-BVVOn_dO.js → variant-calendar-CsrAJLwW.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-B1kegHzc.js → view-mode-toggle-BfB35D_i.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-Cr5zp_Qx.js +0 -1
- package/dist/client/assets/project-app-view-ByXtWSB_.js +0 -1
- package/dist/client/assets/record-editor-CzCU9PKr.js +0 -1
- package/dist/client/assets/registry-BeUPIlNQ.js +0 -2
- package/dist/client/assets/store-registry-DkfCPpEE.js +0 -2
- package/dist/client/assets/useInfiniteQuery-B4u61JTE.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-S8U9qcL-.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as A,bM as us,bN as Ll,j as b,au as jl,aN as ut,bO as Vl,c as ds,i as Wl,m as nt,bP as Fi}from"./index-BWC7sFp_.js";import{z as $l}from"./agent-icon-BBgjEkV0.js";import{i as ql}from"./ChevronRight-DEIr6kW5.js";function Hl(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function rb(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 ib(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 U(n){this.content=n}U.prototype={constructor:U,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 U(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 U(t)},addToStart:function(n,e){return new U([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new U(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 U(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=U.from(n),n.size?new U(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=U.from(n),n.size?new U(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=U.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}};U.from=function(n){if(n instanceof U)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new U(e)};function fs(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=fs(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function hs(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=hs(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 fs(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return hs(this,e,t,r)}findIndex(e){if(e==0)return mn(0,e);if(e==this.size)return mn(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?mn(t+1,o):mn(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 ir={index:0,offset:0};function mn(n,e){return ir.index=n,ir.offset=e,ir}function Dn(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(!Dn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Dn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Tr{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&&Dn(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 Tr.none;if(e instanceof Tr)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class En 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=ms(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(ps(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 ps(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(ps(o.content,e-i-1,t-i-1)))}function ms(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=ms(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function Jl(n,e,t){if(t.openStart>n.depth)throw new En("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new En("Inconsistent open depths");return gs(n,e,t,0)}function gs(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=gs(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 at(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Yl(t,n);return at(o,bs(n,s,a,e,r))}else return at(o,Tn(n,e,r))}function ys(n,e){if(!e.type.compatibleContent(n.type))throw new En("Cannot join "+e.type.name+" onto "+n.type.name)}function Or(n,e,t){let r=n.node(t);return ys(r,e.node(t)),r}function st(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 Ht(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&&(st(n.nodeAfter,r),o++));for(let a=o;a<s;a++)st(i.child(a),r);e&&e.depth==t&&e.textOffset&&st(e.nodeBefore,r)}function at(n,e){return n.type.checkContent(e),n.copy(e)}function bs(n,e,t,r,i){let o=n.depth>i&&Or(n,e,i+1),s=r.depth>i&&Or(t,r,i+1),a=[];return Ht(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(ys(o,s),st(at(o,bs(n,e,t,r,i+1)),a)):(o&&st(at(o,Tn(n,e,i+1)),a),Ht(e,t,i,a),s&&st(at(s,Tn(t,r,i+1)),a)),Ht(r,null,i,a),new v(a)}function Tn(n,e,t){let r=[];if(Ht(null,n,t,r),n.depth>t){let i=Or(n,e,t+1);st(at(i,Tn(n,e,t+1)),r)}return Ht(e,null,t,r),new v(r)}function Yl(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 Gt{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 On(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 Gt(t,r,o)}static resolveCached(e,t){let r=zi.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 zi.set(e,r=new Ul);let i=r.elts[r.i]=Gt.resolve(e,t);return r.i=(r.i+1)%Kl,i}}class Ul{constructor(){this.elts=[],this.i=0}}const Kl=12,zi=new WeakMap;class On{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 Gl=Object.create(null);class be{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&&Dn(this.attrs,t||e.defaultAttrs||Gl)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new be(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new be(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 Jl(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 Gt.resolveCached(this,e)}resolveNoCache(e){return Gt.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()+")"),xs(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}}be.prototype.text=void 0;class An extends be{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):xs(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 An(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new An(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 xs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class dt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Xl(e,t);if(r.next==null)return dt.empty;let i=vs(r);r.next&&r.err("Unexpected trailing text");let o=ic(rc(i));return oc(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 f=o(d,a.concat(u));if(f)return f}}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 A,bM as us,bN as Ll,j as b,au as jl,aN as ut,bO as Vl,c as ds,i as Wl,m as nt,bP as Fi}from"./index-BtBAx8XA.js";import{z as $l}from"./agent-icon-BtZnpkLs.js";import{i as ql}from"./ChevronRight-CadciNy4.js";function Hl(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function rb(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 ib(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 U(n){this.content=n}U.prototype={constructor:U,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 U(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 U(t)},addToStart:function(n,e){return new U([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new U(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 U(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=U.from(n),n.size?new U(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=U.from(n),n.size?new U(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=U.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}};U.from=function(n){if(n instanceof U)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new U(e)};function fs(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=fs(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function hs(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=hs(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 fs(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return hs(this,e,t,r)}findIndex(e){if(e==0)return mn(0,e);if(e==this.size)return mn(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?mn(t+1,o):mn(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 ir={index:0,offset:0};function mn(n,e){return ir.index=n,ir.offset=e,ir}function Dn(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(!Dn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Dn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Tr{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&&Dn(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 Tr.none;if(e instanceof Tr)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class En 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=ms(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(ps(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 ps(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(ps(o.content,e-i-1,t-i-1)))}function ms(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=ms(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function Jl(n,e,t){if(t.openStart>n.depth)throw new En("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new En("Inconsistent open depths");return gs(n,e,t,0)}function gs(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=gs(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 at(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Yl(t,n);return at(o,bs(n,s,a,e,r))}else return at(o,Tn(n,e,r))}function ys(n,e){if(!e.type.compatibleContent(n.type))throw new En("Cannot join "+e.type.name+" onto "+n.type.name)}function Or(n,e,t){let r=n.node(t);return ys(r,e.node(t)),r}function st(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 Ht(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&&(st(n.nodeAfter,r),o++));for(let a=o;a<s;a++)st(i.child(a),r);e&&e.depth==t&&e.textOffset&&st(e.nodeBefore,r)}function at(n,e){return n.type.checkContent(e),n.copy(e)}function bs(n,e,t,r,i){let o=n.depth>i&&Or(n,e,i+1),s=r.depth>i&&Or(t,r,i+1),a=[];return Ht(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(ys(o,s),st(at(o,bs(n,e,t,r,i+1)),a)):(o&&st(at(o,Tn(n,e,i+1)),a),Ht(e,t,i,a),s&&st(at(s,Tn(t,r,i+1)),a)),Ht(r,null,i,a),new v(a)}function Tn(n,e,t){let r=[];if(Ht(null,n,t,r),n.depth>t){let i=Or(n,e,t+1);st(at(i,Tn(n,e,t+1)),r)}return Ht(e,null,t,r),new v(r)}function Yl(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 Gt{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 On(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 Gt(t,r,o)}static resolveCached(e,t){let r=zi.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 zi.set(e,r=new Ul);let i=r.elts[r.i]=Gt.resolve(e,t);return r.i=(r.i+1)%Kl,i}}class Ul{constructor(){this.elts=[],this.i=0}}const Kl=12,zi=new WeakMap;class On{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 Gl=Object.create(null);class be{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&&Dn(this.attrs,t||e.defaultAttrs||Gl)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new be(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new be(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 Jl(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 Gt.resolveCached(this,e)}resolveNoCache(e){return Gt.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()+")"),xs(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}}be.prototype.text=void 0;class An extends be{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):xs(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 An(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new An(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 xs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class dt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Xl(e,t);if(r.next==null)return dt.empty;let i=vs(r);r.next&&r.err("Unexpected trailing text");let o=ic(rc(i));return oc(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 f=o(d,a.concat(u));if(f)return f}}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
|
`)}}dt.empty=new dt(!0);class Xl{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 vs(n){let e=[];do e.push(Ql(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Ql(n){let e=[];do e.push(Zl(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Zl(n){let e=nc(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=ec(n,e);else break;return e}function Li(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function ec(n,e){let t=Li(n),r=t;return n.eat(",")&&(n.next!="}"?r=Li(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function tc(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 nc(n){if(n.eat("(")){let e=vs(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=tc(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 rc(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 ks(n,e){return e-n}function ji(n,e){let t=[];return r(e),t.sort(ks);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 ic(n){let e=Object.create(null);return t(ji(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]);ji(n,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new dt(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(ks);o.next.push({type:i[s][0],next:e[a.join(",")]||t(a)})}return o}}function oc(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 ws(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 Ss(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 Ms(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 Cs(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new ac(n,r,e[r]);return t}let Vi=class Ns{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=Cs(e,r.attrs),this.defaultAttrs=ws(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==dt.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:Ss(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new be(this,this.computeAttrs(e),v.from(t),j.setFrom(r))}createChecked(e=null,t,r){return t=v.from(t),this.checkContent(t),new be(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 be(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){Ms(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 Ns(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 sc(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 ac{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?sc(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class $n{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Cs(e,i.attrs),this.excluded=null;let o=ws(this.attrs);this.instance=o?new j(this,o):null}create(e=null){return!e&&this.instance?this.instance:new j(this,Ss(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new $n(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){Ms(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Ds{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=U.from(e.nodes),t.marks=U.from(e.marks||{}),this.nodes=Vi.compile(this.spec.nodes,this),this.marks=$n.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]=dt.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?Wi(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==""?[]:Wi(this,s.split(" "))}this.nodeFromJSON=i=>be.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 Vi){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 An(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 Wi(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 lc(n){return n.tag!=null}function cc(n){return n.style!=null}class He{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(lc(i))this.tags.push(i);else if(cc(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 qi(this,t,!1);return r.addAll(e,j.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new qi(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(fc(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=Hi(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=Hi(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new He(e,He.schemaRules(e)))}}const Es={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},uc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ts={ol:!0,ul:!0},Xt=1,Ar=2,Jt=4;function $i(n,e,t){return e!=null?(e?Xt:0)|(e==="full"?Ar:0):n&&n.whitespace=="pre"?Xt|Ar:t&~Jt}class gn{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&Jt?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&Xt)){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&&!Es.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class qi{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=$i(null,t.preserveWhitespace,0)|(r?Jt:0);i?o=new gn(i.type,i.attrs,j.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new gn(null,null,j.none,!0,null,s):o=new gn(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&Ar?"full":this.localPreserveWS||(i.options&Xt)>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;Ts.hasOwnProperty(s)&&this.parser.normalizeLists&&dc(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:uc.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(Es.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):Ji(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=$i(e,o,s.options);s.options&Jt&&s.content.length==0&&(a|=Jt);let l=j.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Ji(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new gn(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|=Xt)}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 dc(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ts.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function fc(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Hi(n){let e={};for(let t in n)e[t]=n[t];return e}function Ji(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 gt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=or(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}=Sn(or(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&&Sn(or(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return Sn(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new gt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Yi(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Yi(e.marks)}}function Yi(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function or(n){return n.document||window.document}const Ui=new WeakMap;function hc(n){let e=Ui.get(n);return e===void 0&&Ui.set(n,e=pc(n)),e}function pc(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 Sn(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=hc(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 f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+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 f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=Sn(n,f,t,r);if(l.appendChild(h),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const Os=65535,As=Math.pow(2,16);function mc(n,e){return n+e*As}function Ki(n){return n&Os}function gc(n){return(n-(n&Os))/As}const Ps=1,Rs=2,Mn=4,Is=8;class Pr{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Is)>0}get deletedBefore(){return(this.delInfo&(Ps|Mn))>0}get deletedAfter(){return(this.delInfo&(Rs|Mn))>0}get deletedAcross(){return(this.delInfo&Mn)>0}}class ce{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ce.empty)return ce.empty}recover(e){let t=0,r=Ki(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+gc(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 f=c?e==l?-1:e==d?1:t:t,h=l+i+(f<0?0:u);if(r)return h;let p=e==(t<0?l:d)?null:mc(a/3,e-l),g=e==l?Rs:e==d?Ps:Mn;return(t<0?e!=l:e!=d)&&(g|=Is),new Pr(h,g,p)}i+=u-c}return r?e+i:new Pr(e+i,0,null)}touches(e,t){let r=0,i=Ki(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 ce(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ce.empty:new ce(e<0?[0,-e,0]:[0,0,e])}}ce.empty=new ce([]);class Pn{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 Pn(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 Pn;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 Pr(e,i,null)}}const sr=Object.create(null);class ee{getMap(){return ce.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=sr[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 sr)throw new RangeError("Duplicate use of step JSON ID "+e);return sr[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 En)return $.fail(o.message);throw o}}}function Gr(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Gr(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return v.fromArray(r)}class We extends ee{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(Gr(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 ge(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 We(t.pos,r.pos,this.mark)}merge(e){return e instanceof We&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new We(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 We(t.from,t.to,e.markFromJSON(t.mark))}}ee.jsonID("addMark",We);class ge extends ee{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(Gr(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 We(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 ge(t.pos,r.pos,this.mark)}merge(e){return e instanceof ge&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ge(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 ge(t.from,t.to,e.markFromJSON(t.mark))}}ee.jsonID("removeMark",ge);class $e extends ee{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 $e(this.pos,t.marks[i]);return new $e(this.pos,this.mark)}}return new ft(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new $e(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 $e(t.pos,e.markFromJSON(t.mark))}}ee.jsonID("addNodeMark",$e);class ft extends ee{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 $e(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ft(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 ft(t.pos,e.markFromJSON(t.mark))}}ee.jsonID("removeNodeMark",ft);class W extends ee{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Rr(e,this.from,this.to)?$.fail("Structure replace would overwrite content"):$.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ce([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;ee.jsonID("replace",W);class J extends ee{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&&(Rr(e,this.from,this.gapFrom)||Rr(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 ce([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 J(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 J(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 J(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}}ee.jsonID("replaceAround",J);function Rr(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 yc(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 f=Math.max(c,e),h=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==f&&s.mark.eq(d[g])?s.to=h:i.push(s=new ge(f,h,d[g])));a&&a.to==f?a.to=h:o.push(a=new We(f,h,r))}}),i.forEach(l=>n.step(l)),o.forEach(l=>n.step(l))}function bc(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 $n){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],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==o-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=c,f.step=o):i.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(s=>n.step(new ge(s.from,s.to,s.style)))}function Xr(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 f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new ge(a,u,c.marks[f]));if(i&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new S(v.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),s.push(new W(a+f.index,a+f.index+f[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 xc(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function _t(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||!xc(s,a,l))break;a&&(i=1),l<s.childCount&&(o=1)}return null}function vc(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 f=v.empty,h=0;for(let p=o,g=!1;p>t;p--)g||i.after(p+1)<i.end(p)?(g=!0,f=v.from(i.node(p).copy(f)),h++):c++;n.step(new J(l,c,s,a,new S(u.append(f),d,h),u.size-d,!0))}function Qr(n,e,t=null,r=n){let i=kc(n,e),o=i&&wc(r,e);return o?i.map(Gi).concat({type:e,attrs:t}).concat(o.map(Gi)):null}function Gi(n){return{type:n,attrs:null}}function kc(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 wc(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 Sc(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 J(i,o,i,o,new S(r,0,0),t.length,!0))}function Mc(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)&&Cc(n.doc,n.mapping.slice(o).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Bs(n,s,a,o),Xr(n,n.mapping.slice(o).map(a,1),r,void 0,c===null);let u=n.mapping.slice(o),d=u.map(a,1),f=u.map(a+s.nodeSize,1);return n.step(new J(d,f,d+1,f-1,new S(v.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&_s(n,s,a,o),!1}})}function _s(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 Bs(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-KKdV9Q3l.js → capability-load-error-CE9LGC4o.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,i as y,o as h,F as j,j as s,z as b,K as C,B as E}from"./index-
|
|
1
|
+
import{c as p,i as y,o as h,F as j,j as s,z as b,K as C,B as E}from"./index-BtBAx8XA.js";function v(){const e=p.c(23),t=y(),d=h(),{locator:x}=j();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx(b,{size:28})}),e[0]=u):u=e[0];let i;e[1]!==t?(i=t("common.capabilityLoadError.title"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==i?(l=s.jsx("h3",{className:"text-lg font-medium",children:i}),e[3]=i,e[4]=l):l=e[4];let r;e[5]!==t?(r=t("common.capabilityLoadError.description"),e[5]=t,e[6]=r):r=e[6];let a;e[7]!==r?(a=s.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=a):a=e[8];let o;e[9]!==l||e[10]!==a?(o=s.jsxs("div",{className:"space-y-1",children:[l,a]}),e[9]=l,e[10]=a,e[11]=o):o=e[11];let n;e[12]!==x||e[13]!==d?(n=()=>d.invalidateQueries({queryKey:C.myCapabilities(x)}),e[12]=x,e[13]=d,e[14]=n):n=e[14];let c;e[15]!==t?(c=t("common.capabilityLoadError.tryAgain"),e[15]=t,e[16]=c):c=e[16];let m;e[17]!==n||e[18]!==c?(m=s.jsx(E,{variant:"outline",size:"sm",onClick:n,children:c}),e[17]=n,e[18]=c,e[19]=m):m=e[19];let f;return e[20]!==o||e[21]!==m?(f=s.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[u,o,m]}),e[20]=o,e[21]=m,e[22]=f):f=e[22],f}export{v as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,m as n,j as c}from"./index-
|
|
1
|
+
import{c as l,m as n,j as c}from"./index-BtBAx8XA.js";function i(a){const e=l.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 o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.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 Q,r as w,m as V,j as t,i as X,B as $,k as Y,t as I}from"./index-BWC7sFp_.js";import{i as Z}from"./ArrowRight-qJlbKSrg.js";import{c as U}from"./ZoomOut-6evm9HJr.js";import{n as _}from"./LinkExternal01-DuSi53Ey.js";import{aO as K}from"./agent-icon-BBgjEkV0.js";import{f as tt,e as ot,b as et,A as rt,a as it,d as st,c as at,g as nt}from"./alert-dialog-C2Bqhcmc.js";import{I as W}from"./input-Dwgjs0Me.js";import{L as q}from"./label-BK6sLMEK.js";import{w as mt,v as lt,x as pt,$ as ct,o as dt,z as B,C as gt,a0 as ut,A as xt}from"./index-DkqrfhJp.js";import{c as ft,B as ht,a as yt}from"./block-document-Bo4gMMfS.js";import{u as bt}from"./use-autosave-DxV5LsO-.js";import{t as jt}from"./ChevronDown-B6-w9q8W.js";import{p as vt,q as Et,o as Ct}from"./automation-runs-U2tWrOBe.js";import{s as b,E as Nt}from"./primitives-BcOXHRHh.js";import"./AlertCircle-C4BWLdJ4.js";import"./Tool01-DMTzqx5i.js";import"./ArrowUp-BVYSfKPB.js";import"./Settings02-BbDm-Ne4.js";import"./Tool02-DGUi9uKr.js";import"./ArrowUpRight-CZ2fIDWv.js";import"./TrendUp01-B8sZVpOQ.js";import"./ZapSquare-DuoaxuW6.js";import"./Users03-CjXk-r9i.js";import"./CheckCircle-CeUlzZCm.js";import"./Check-CymDPtaz.js";import"./ChevronRight-DEIr6kW5.js";import"./ChevronUp-C_eomkpm.js";import"./DotsVertical-C3MnHRz8.js";import"./Stars02-CmhbeIDG.js";import"./Copy01-R8AR2-1c.js";import"./Globe01-hVg4-cH5.js";import"./Eye-CE-cR8Oa.js";import"./FilterLines-D4J8LYhW.js";import"./Star01-DZ_3ux8i.js";import"./Globe04-D5VJ_hkz.js";import"./SwitchHorizontal01-CRibS_Zy.js";import"./HardDrive-zN0Is6H-.js";import"./Image01-DG088yrA.js";import"./Key01-CHhJPyPs.js";import"./LayoutLeft-C4fmYl61.js";import"./XCircle-Ojqttb4K.js";import"./Monitor01-D09qwZZ1.js";import"./Sun-DoaIj1xZ.js";import"./Package-oKuIYsv6.js";import"./Palette-DxnkmeGc.js";import"./Play-BMDEoRJl.js";import"./Plus-D7pYKUsO.js";import"./SearchLg-C42MXEKt.js";import"./SearchMd-CP6wLgs6.js";import"./Shield01-CjiZhLxU.js";import"./Stars01-JDxcV7AF.js";import"./Trash01-D08DuleC.js";import"./Upload01-kJs7y_sS.js";import"./User01-9n6b7RP1.js";import"./Users01-ZUQPsXZL.js";import"./XClose-C5Joak01.js";import"./X-_ogr2Thx.js";import"./Zap-CVYBhiGb.js";import"./chat-context-DUAqM3BL.js";import"./autosend-DZWEI21D.js";import"./hooks-2c34l0ae.js";import"./use-mcp-client-BfCXL7Ea.js";import"./auth-BU8dnKUI.js";import"./decopilot-sse-pool-yan_82bi.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-DqyzSTaT.js";import"./use-virtual-mcp-B4R9Gg2E.js";import"./use-ai-providers-Dp6I5-8x.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-JGRwbLqN.js";import"./use-organization-settings-DdWAi5Fa.js";import"./tooltip-BmutXqWI.js";import"./dialog-BhvH5UUY.js";import"./drawer-Clee3MiY.js";import"./collection-search-zof41lOw.js";import"./use-mobile-D2X5CiwU.js";import"./AreaChart-2lzk5ej3.js";import"./index-D3Egmveq.js";import"./calendar-CDlXA0Du.js";import"./shell-layout-Mucs34pV.js";import"./avatar-UzWl0gwW.js";import"./required-auth-layout-BrqitDmd.js";import"./use-org-sso-C63dt58J.js";import"./index-BZKh5x8S.js";import"./get-initials-D-f_fDFw.js";import"./popover-C35uikDd.js";import"./use-registry-app-DhV6qG8g.js";import"./use-mcp-tools-Dmvh1NTU.js";import"./use-connection-Db71aL_l.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-CXoW_w5W.js";import"./mcp-oauth-CCJ1wn2F.js";import"./extract-connection-data-CRUudyOW.js";import"./use-members-DHjn4tSi.js";import"./use-org-auth-client-Y3lH7Le-.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-CJMe9yFA.js";import"./use-copy-C9WCw_xQ.js";import"./command-rWYtUR5c.js";import"./index-D0YUP6cD.js";import"./companions-core-sVa6Qw5T.js";import"./form-C5iFi2jZ.js";import"./select-uGrWbEMz.js";import"./tabs-_KEklsIu.js";import"./toggle-group-DZVcSFOA.js";import"./use-deco-credits-CNlP8bKq.js";import"./connection-card-Dz1fwerM.js";import"./use-registry-connections-B2LAq4ux.js";import"./useInfiniteQuery-B4u61JTE.js";import"./use-infinite-scroll-C9CrduD1.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-zoyg0nhK.js";import"./integration-icon-9QXIMfmD.js";import"./textarea-D2K-qpEF.js";import"./connection-form-helpers-C_ssxiIn.js";import"./collection-tabs-CgqHDjS1.js";import"./badge-Baw1FT-S.js";import"./useSuspenseInfiniteQuery-S8U9qcL-.js";import"./connect-desktop-dialog-DxGAbniS.js";import"./select-model-gBHKlDIm.js";import"./checkbox-FmmsZFBn.js";import"./skeleton-CEv-QtIz.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B8q2fbg4.js";import"./index-DXU-zOnf.js";import"./file-type-icon-Wt0fW6Db.js";import"./toolbar-cItkaIEN.js";import"./use-debounced-value-CmRylZJc.js";import"./index-Dha2A-8H.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-K0-7jWPp.js";import"./empty-state-YC9UCU06.js";import"./use-capability-B1l0lZqa.js";import"./toolbar-icon-button-CmxseXuq.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-CF3nwEaJ.js";import"./index-DdFBHhSl.js";import"./sidebar-Dv_H2jfW.js";import"./search-input-Ccf8_eUm.js";import"./use-mcp-auth-status-B8Ydhf-J.js";import"./switch-BQHSVMIs.js";import"./github-repo-picker-C6QGF-3R.js";import"./use-navigate-to-agent-BRmHvfMz.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-C2rRzzPu.js";import"./monaco-editor-dhKEhAZV.js";import"./use-file-configs-BNgMZFIO.js";import"./use-automations-zyl04vpa.js";import"./automation-list-row-DRyf2mOg.js";import"./table-CbpS0yp4.js";import"./use-clock-tick-Bn8KTZQB.js";function St(j){const o=Q.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,k=v===void 0?!1:v,[f,P]=w.useState(k);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{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,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function vr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:k,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=w.useState(s),[g,E]=w.useState(null),[C,z]=w.useState(!1),T=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=T.length,H=e=>n("slug",e),M=async(e,S)=>{const J=b(i.name);z(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:J,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:B(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},G=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){H(e);return}E({oldSlug:s,newSlug:e,count:N})};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:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(_,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),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(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:G,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:k,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),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(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:T.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.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(U,{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:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&M(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{vr as CategoryEditor};
|
|
1
|
+
import{c as Q,r as w,m as V,j as t,i as X,B as $,k as Y,t as I}from"./index-BtBAx8XA.js";import{i as Z}from"./ArrowRight-BrCnT9QC.js";import{c as U}from"./ZoomOut-zIwnbKGd.js";import{n as _}from"./LinkExternal01-DBkSmTNi.js";import{aO as K}from"./agent-icon-BtZnpkLs.js";import{f as tt,e as ot,b as et,A as rt,a as it,d as st,c as at,g as nt}from"./alert-dialog-BFIFM8C5.js";import{I as W}from"./input-Dyh2_qZE.js";import{L as q}from"./label-sXTl0vPj.js";import{w as mt,v as lt,x as pt,$ as ct,o as dt,z as B,C as gt,a0 as ut,A as xt}from"./index-R8HG5AiS.js";import{c as ft,B as ht,a as yt}from"./block-document-KtXXADJO.js";import{u as bt}from"./use-autosave-MbsjrshC.js";import{t as jt}from"./ChevronDown-EuCf1m86.js";import{p as vt,q as Et,o as Ct}from"./automation-runs-iGhaxGuG.js";import{s as b,E as Nt}from"./primitives-CKQKcei0.js";import"./AlertCircle-BHAhKNmK.js";import"./Tool01-DiNQfNvy.js";import"./ArrowUp-DxGnDz2z.js";import"./Settings02-Bs97ZIUi.js";import"./Tool02-IVtF0j03.js";import"./ArrowUpRight-Da7Xj47Z.js";import"./TrendUp01-BCX1tOr9.js";import"./ZapSquare-DbcSaxo0.js";import"./Users03-CZWdpGhj.js";import"./CheckCircle-B2E1-lHd.js";import"./Check-y6lwxF--.js";import"./ChevronRight-CadciNy4.js";import"./ChevronUp-CYsWN-oD.js";import"./DotsVertical-C88_zwNA.js";import"./Stars02-DPmHqm_5.js";import"./Copy01-B9oBh-Sc.js";import"./Globe01-BSQmAWCO.js";import"./Eye-D6wO7Qmh.js";import"./FilterLines-CeB6mwpD.js";import"./Star01-BM6MjJ7W.js";import"./Globe04-Meo0lTn8.js";import"./SwitchHorizontal01-likZrCDK.js";import"./HardDrive-CJjhHD1B.js";import"./Image01-Dilf3q7O.js";import"./Key01-BuFHyFwG.js";import"./LayoutLeft-CQjONItu.js";import"./XCircle-BA2kRTL2.js";import"./Monitor01-BpX1UZkt.js";import"./Sun-Be3KSXJM.js";import"./Package-nB3nhOrK.js";import"./Palette-C-DUUOXH.js";import"./Play-CORh1b3h.js";import"./Plus-CymFBrv_.js";import"./SearchLg-BUQSfVKQ.js";import"./SearchMd-Dx46GNbC.js";import"./Shield01-hMgJ9M7q.js";import"./Stars01-CPGdNFPa.js";import"./Trash01-DI7LTPFE.js";import"./Upload01-cMcdAXoX.js";import"./User01-CVYsS5YD.js";import"./Users01-DWjKxfaH.js";import"./XClose-l2X2CDWa.js";import"./X-DMWoe6ED.js";import"./Zap-CmG1qL65.js";import"./chat-context-C4uHb9fh.js";import"./autosend-BKdSCcaS.js";import"./hooks-s-wg_yWq.js";import"./use-mcp-client-CynPg1uL.js";import"./auth-DnzmBzsd.js";import"./decopilot-sse-pool-BxDksZ_n.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-CVmQa-wr.js";import"./use-virtual-mcp-iyzyi2rH.js";import"./use-ai-providers-Cl1fKuZS.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-Ce4--_At.js";import"./use-organization-settings-C79CzSGf.js";import"./tooltip-rruKccQl.js";import"./dialog-Bz1Pb7BF.js";import"./drawer-Cu47sEU7.js";import"./collection-search-CCKfG0HO.js";import"./use-mobile-Dq40loMm.js";import"./AreaChart-BFLsc656.js";import"./index-dbtBCUMA.js";import"./calendar-frZOe-KM.js";import"./shell-layout-ScztsXlF.js";import"./avatar-i6Im8YbJ.js";import"./required-auth-layout-2GvIg9iS.js";import"./use-org-sso-5PRzOD99.js";import"./index-1U4mbrvV.js";import"./get-initials-D-f_fDFw.js";import"./popover-Dw3xO39E.js";import"./use-registry-app-D3U3LTOB.js";import"./use-mcp-tools-Dsinsy2u.js";import"./use-connection-L-lqPFAt.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-DNlXTrjF.js";import"./mcp-oauth-BNY9Gdeq.js";import"./extract-connection-data-CaQkLtKm.js";import"./use-members-Df-pX_wh.js";import"./use-org-auth-client-DmDRXrVO.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-HGb4wnMG.js";import"./use-copy-BFLAC4kD.js";import"./command-BUFMt8W5.js";import"./index-CwNfd2lk.js";import"./companions-core-sbB7670J.js";import"./form-BjILzwX8.js";import"./select-DEGZ_IWN.js";import"./tabs-DorrckbV.js";import"./toggle-group-C3nFsVA3.js";import"./use-deco-credits-Kg8cuy_l.js";import"./connection-card-CGSfDNM4.js";import"./use-registry-connections-B5YrUvTg.js";import"./useInfiniteQuery-DczQf9_R.js";import"./use-infinite-scroll-CWP757S6.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-DoS8eHYx.js";import"./integration-icon-BIKsn1PU.js";import"./textarea-BQMP1z52.js";import"./connection-form-helpers-DcoCg3gU.js";import"./collection-tabs-BJllJZst.js";import"./badge-De0Mn2aQ.js";import"./useSuspenseInfiniteQuery-B-6Oc6pG.js";import"./connect-desktop-dialog-CEvuTZ6X.js";import"./select-model-B7PYESb7.js";import"./checkbox-C9xto-so.js";import"./skeleton-BaKD7gbs.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BA5qd1iA.js";import"./index-Cd_w_H_F.js";import"./file-type-icon-kjm_haaJ.js";import"./toolbar-Beg08Z0i.js";import"./use-debounced-value-Bf73a2Dn.js";import"./index-B3R7me5P.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-36V78SeG.js";import"./empty-state-DGKv6iaQ.js";import"./use-capability-BKDE5sLC.js";import"./toolbar-icon-button-CSU7kSSh.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-z3BBC6KF.js";import"./index-CiVIW2Nl.js";import"./sidebar-BSz--1bS.js";import"./search-input-BKutO8Lz.js";import"./use-mcp-auth-status-BkfLoLOV.js";import"./switch-D8BsY_R5.js";import"./github-repo-picker-DNAkBWqO.js";import"./use-navigate-to-agent-6yPtW66t.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-z-cBc8-s.js";import"./monaco-editor-DYWuYlrw.js";import"./use-file-configs-DyqQzjQE.js";import"./use-automations-BCejZQUy.js";import"./automation-list-row-Cl1bK8TB.js";import"./table-D1UGgJJx.js";import"./use-clock-tick-DqdQTNL4.js";function St(j){const o=Q.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,k=v===void 0?!1:v,[f,P]=w.useState(k);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{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,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function vr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:k,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=w.useState(s),[g,E]=w.useState(null),[C,z]=w.useState(!1),T=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=T.length,H=e=>n("slug",e),M=async(e,S)=>{const J=b(i.name);z(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:J,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:B(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},G=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){H(e);return}E({oldSlug:s,newSlug:e,count:N})};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:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(_,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),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(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:G,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:k,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),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(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:T.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.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(U,{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:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&M(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{vr as CategoryEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as oe,m as Ye,bA as Je,j as B,F as Y,K as fe,n as et,cv as tt,V as je,u as Ae,o as Ue,t as ae,I as ue,G as pe,b as Qe,e as nt,r as x,i as Me,q as st,a as at,x as ot,al as rt}from"./index-
|
|
1
|
+
import{c as oe,m as Ye,bA as Je,j as B,F as Y,K as fe,n as et,cv as tt,V as je,u as Ae,o as Ue,t as ae,I as ue,G as pe,b as Qe,e as nt,r as x,i as Me,q as st,a as at,x as ot,al as rt}from"./index-BtBAx8XA.js";import{A as Ke,c as it,a as ct,w as lt}from"./autosend-BKdSCcaS.js";import{S as dt,b as ut,e as pt,u as ft}from"./hooks-s-wg_yWq.js";import{u as ht}from"./studio-tools-CVmQa-wr.js";import{a as mt,u as gt,S as yt}from"./use-mcp-client-CynPg1uL.js";import{a as xt}from"./use-virtual-mcp-iyzyi2rH.js";import{u as St,a as me}from"./use-ai-providers-Cl1fKuZS.js";import{o as bt,b as vt}from"./location-BpLtHjTZ.js";import{d as It,q as Ct,n as kt}from"./tab-id-BijBBRwE.js";import{u as Mt}from"./use-decopilot-events-Ce4--_At.js";import{e as Tt}from"./use-organization-settings-C79CzSGf.js";const wt={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"]},Et={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"]},At={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"]},_t={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"]},Rt={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 We(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Pt(t){return We(t).includes("deepresearch")}const Dt=["sonar","searchpreview","online"];function Ve(t){const e=We(t);return e.includes("deepresearch")?!1:Dt.some(n=>e.includes(n))}function Be(t){return t.asyncResearch!==!0&&Ve(t.modelId)}function He(t){return t.asyncResearch===!0||Pt(t.modelId)||Ve(t.modelId)}function le(t,e,n,a){for(const s of n){const o=t.find(r=>r.modelId===s);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const s of n){const o=t.find(r=>r.modelId.includes(s));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(a){const s=t.find(a);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}return null}function Ot(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const a of t){const s=e[a.id]??[],o=a.providerId;n.chat.fast||(n.chat.fast=le(s,a.id,wt[o]??[])),n.chat.smart||(n.chat.smart=le(s,a.id,Et[o]??[])),n.chat.thinking||(n.chat.thinking=le(s,a.id,At[o]??[])),n.image||(n.image=le(s,a.id,_t[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=le(s,a.id,Rt[o]??[],Be)),n.deepResearch||(n.deepResearch=le(s,a.id,$t[o]??[],He))}return n}const Lt=Je("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 Tn(t){const e=oe.c(10),{variant:n,size:a}=t;let s;e[0]!==a||e[1]!==n?(s=Ye(Lt({variant:n,size:a})),e[0]=a,e[1]=n,e[2]=s):s=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=B.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=B.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 i;e[5]!==s?(i=B.jsxs("svg",{"aria-hidden":"true",className:s,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=s,e[6]=i):i=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=B.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=u):u=e[7];let d;return e[8]!==i?(d=B.jsxs("div",{role:"status",children:[i,u]}),e[8]=i,e[9]=d):d=e[9],d}const Oe={online:!1,capabilities:[],ready:!1};function Nt(t){const e=oe.c(9),{org:n}=Y(),a=ht(),s=t?.fast??!1;let o;e[0]!==n.id?(o=fe.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==a?(r=async()=>{const v=await a.call("LINK_CURRENT_GET",{});return v?{...v,ready:!0}:{...Oe,ready:!0}},e[2]=a,e[3]=r):r=e[3];const i=s?1e3:1e4,u=s?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==i||e[7]!==u?(d={queryKey:o,queryFn:r,staleTime:i,refetchInterval:u,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=i,e[7]=u,e[8]=d):d=e[8];const{data:y}=et(d);return y??Oe}function qt(t,e=[]){return t==="stop"?e.filter(s=>s.type==="text"&&s.text).map(s=>s.text).join(`
|
|
2
2
|
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(a=>a.type==="tool-user_ask"&&a.state==="input-available"||a.state==="approval-requested")?"requires_action":"completed":"failed"}const Ce={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Ft(t,e){if(!t)return null;const n=e?tt(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[a,s]of Object.entries(Ce))if(s.harness===t&&s.sandbox===n)return a;return null}function wn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function jt(t,e){return e&&t&&Ce[t].sandbox==="user-desktop"?"decopilot":t}function Ut(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function Qt(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 a=je(n);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const o=Ae(s);let r;e[2]!==o.brand||e[3]!==o.main||e[4]!==o.preview||e[5]!==o.skill?(r=(typeof o.main=="string"?It(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 i=r;let u;if(e[7]!==a?.params.appSlug||e[8]!==a?.params.collectionName||e[9]!==a?.params.itemId||e[10]!==i||e[11]!==t){if(u=[],t&&u.push(`### Selected Agent
|
|
3
3
|
- ID: ${t}`),i){let y;e[13]!==i?(y=bt(i),e[13]=i,e[14]=y):y=e[14];const v=y;let w;e[15]!==i?(w=vt(i),e[15]=i,e[16]=w):w=e[16],u.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,m as d,j as c,bC as l,bD as m}from"./index-
|
|
1
|
+
import{c as n,m as d,j as c,bC as l,bD as m}from"./index-BtBAx8XA.js";import{i as b}from"./Check-y6lwxF--.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(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{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-BtBAx8XA.js";import{A as u}from"./auth-split-layout-B872E6bM.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 C,j as t,B as M,k as G,J as Ge,M as se,i as L,E as ke,r as T,F as de,ba as Xe,bb as Ae,R as Ze,m as z,bc as et,u as tt,L as W,t as st,e as me,a_ as De}from"./index-BWC7sFp_.js";import{E as Ee}from"./empty-state-YC9UCU06.js";import{u as ue}from"./use-mcp-client-BfCXL7Ea.js";import{F as oe,a as ot,b as ne,d as le}from"./form-C5iFi2jZ.js";import{I as ae}from"./input-Dwgjs0Me.js";import{T as ce}from"./textarea-D2K-qpEF.js";import{a as nt,b as lt,V as pe,O as it,M as rt}from"./index-D4LYwylo.js";import{aA as at,T as ct,ar as dt,_ as mt,a9 as ut,aB as pt,a6 as Ne}from"./agent-icon-BBgjEkV0.js";import{g as xt,M as ft,a as ve}from"./index-D3Egmveq.js";import{A as ht,a as gt,b as jt}from"./alert-Be-D3J6_.js";import{S as Se,a as ye,b as we,c as Ce,d as ie}from"./select-uGrWbEMz.js";import{c as bt,b as Ie,T as $e,a as Te}from"./tooltip-BmutXqWI.js";import{i as Nt}from"./AlertCircle-C4BWLdJ4.js";import{s as vt}from"./Stars02-CmhbeIDG.js";import{a as St}from"./Copy01-R8AR2-1c.js";import{i as yt}from"./Play-BMDEoRJl.js";import{i as wt}from"./ChevronRight-DEIr6kW5.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./use-mcp-auth-status-B8Ydhf-J.js";import{a as Re,u as Oe}from"./use-connection-Db71aL_l.js";import{a as Tt}from"./use-mcp-tools-Dmvh1NTU.js";import{M as Pt,c as kt}from"./monaco-editor-dhKEhAZV.js";import{I as Pe}from"./integration-icon-9QXIMfmD.js";import{h as At,m as Dt}from"./chat-context-DUAqM3BL.js";import{u as Et}from"./shell-layout-Mucs34pV.js";import{n as Rt}from"./Tool02-DGUi9uKr.js";import"./auth-BU8dnKUI.js";import"./label-BK6sLMEK.js";import"./index-DdFBHhSl.js";import"./sidebar-Dv_H2jfW.js";import"./LayoutLeft-C4fmYl61.js";import"./use-mobile-D2X5CiwU.js";import"./X-_ogr2Thx.js";import"./ZoomOut-6evm9HJr.js";import"./Key01-CHhJPyPs.js";import"./extract-connection-data-CRUudyOW.js";import"./use-registry-connections-B2LAq4ux.js";import"./use-organization-settings-DdWAi5Fa.js";import"./studio-tools-DqyzSTaT.js";import"./Plus-D7pYKUsO.js";import"./index-uvwA1VZB.js";import"./index-D0YUP6cD.js";import"./popover-C35uikDd.js";import"./use-virtual-mcp-B4R9Gg2E.js";import"./Check-CymDPtaz.js";import"./SearchMd-CP6wLgs6.js";import"./Users03-CjXk-r9i.js";import"./use-create-virtual-mcp-B9oPChqg.js";import"./use-navigate-to-agent-BRmHvfMz.js";import"./hooks-2c34l0ae.js";import"./decopilot-sse-pool-yan_82bi.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-DMTzqx5i.js";import"./ArrowUp-BVYSfKPB.js";import"./Settings02-BbDm-Ne4.js";import"./ArrowRight-qJlbKSrg.js";import"./ArrowUpRight-CZ2fIDWv.js";import"./TrendUp01-B8sZVpOQ.js";import"./ZapSquare-DuoaxuW6.js";import"./CheckCircle-CeUlzZCm.js";import"./ChevronDown-B6-w9q8W.js";import"./ChevronUp-C_eomkpm.js";import"./DotsVertical-C3MnHRz8.js";import"./Globe01-hVg4-cH5.js";import"./Eye-CE-cR8Oa.js";import"./FilterLines-D4J8LYhW.js";import"./Star01-DZ_3ux8i.js";import"./Globe04-D5VJ_hkz.js";import"./SwitchHorizontal01-CRibS_Zy.js";import"./HardDrive-zN0Is6H-.js";import"./Image01-DG088yrA.js";import"./XCircle-Ojqttb4K.js";import"./LinkExternal01-DuSi53Ey.js";import"./Monitor01-D09qwZZ1.js";import"./Sun-DoaIj1xZ.js";import"./Package-oKuIYsv6.js";import"./Palette-DxnkmeGc.js";import"./SearchLg-C42MXEKt.js";import"./Shield01-CjiZhLxU.js";import"./Stars01-JDxcV7AF.js";import"./Trash01-D08DuleC.js";import"./Upload01-kJs7y_sS.js";import"./User01-9n6b7RP1.js";import"./Users01-ZUQPsXZL.js";import"./XClose-C5Joak01.js";import"./Zap-CVYBhiGb.js";import"./badge-Baw1FT-S.js";import"./mcp-oauth-CCJ1wn2F.js";import"./index-Dha2A-8H.js";import"./autosend-DZWEI21D.js";import"./use-ai-providers-Dp6I5-8x.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-JGRwbLqN.js";import"./avatar-UzWl0gwW.js";import"./dialog-BhvH5UUY.js";import"./required-auth-layout-BrqitDmd.js";import"./use-org-sso-C63dt58J.js";function Ot(l){const e=C.c(15),{onSave:n,onUndo:s,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=l,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(at,{size:14}),e[0]=f):f=e[0];let h;e[1]!==i||e[2]!==s||e[3]!==a?(h=t.jsxs(M,{variant:"outline",size:"sm",onClick:s,disabled:i,"aria-label":a,children:[f,a]}),e[1]=i,e[2]=s,e[3]=a,e[4]=h):h=e[4];let p;e[5]!==i?(p=i?t.jsx(G,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=p):p=e[6];let x;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==p?(x=t.jsxs(M,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[p,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=p,e[11]=x):x=e[11];let u;return e[12]!==h||e[13]!==x?(u=t.jsxs(t.Fragment,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=u):u=e[14],u}Ge({title:se().min(1),description:se().nullable(),body:se()});function re(l){for(const e of l.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const l=window.location.pathname.split("/").filter(Boolean),e=l.findIndex(s=>s==="mcps"),n=e>=0?l[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Mt(l){const e=C.c(43),{form:n}=l,s=L();let o;e[0]!==s?(o=s("details.prompt.details"),e[0]=s,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==s?(r=$=>{const{field:v}=$;return t.jsxs(ne,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:s("details.prompt.title")}),t.jsx(le,{children:t.jsx(ae,{...v,placeholder:s("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=s,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(oe,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==s?(d=$=>{const{field:v}=$;return t.jsxs(ne,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:s("details.prompt.description")}),t.jsx(le,{children:t.jsx(ae,{...v,value:v.value??"",placeholder:s("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=s,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(oe,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let f;e[14]!==c||e[15]!==a?(f=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=f):f=e[16];let h;e[17]!==i||e[18]!==f?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,f]}),e[17]=i,e[18]=f,e[19]=h):h=e[19];let p;e[20]!==s?(p=s("details.prompt.message"),e[20]=s,e[21]=p):p=e[21];let x;e[22]!==p?(x=t.jsx("div",{className:"text-sm font-medium text-foreground",children:p}),e[22]=p,e[23]=x):x=e[23];let u;e[24]!==s?(u=s("details.prompt.messageDescription"),e[24]=s,e[25]=u):u=e[25];let g;e[26]!==u?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:u}),e[26]=u,e[27]=g):g=e[27];let b;e[28]!==s?(b=$=>{const{field:v}=$;return t.jsx(ne,{children:t.jsx(le,{children:t.jsx(ce,{...v,value:v.value??"",placeholder:s("details.prompt.bodyPlaceholder"),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"})})})},e[28]=s,e[29]=b):b=e[29];let N;e[30]!==n.control||e[31]!==b?(N=t.jsx(oe,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=N):N=e[32];let I;e[33]!==x||e[34]!==g||e[35]!==N?(I=t.jsxs("div",{className:"flex flex-col gap-2",children:[x,g,N]}),e[33]=x,e[34]=g,e[35]=N,e[36]=I):I=e[36];let w;e[37]!==I||e[38]!==h?(w=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:[h,I]}),e[37]=I,e[38]=h,e[39]=w):w=e[39];let P;return e[40]!==n||e[41]!==w?(P=t.jsx(ot,{...n,children:w}),e[40]=n,e[41]=w,e[42]=P):P=e[42],P}function zt(l){const e=C.c(42),{providerId:n,promptId:s}=l,o=L(),{org:i}=de(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ue(c),a=Xe(n,"PROMPT",s,d),f=Ae(n,"PROMPT",d),h=f.update.isPending;let p;e[4]!==a?(p=a?{title:a.title,description:a.description??null,body:re(a)}:void 0,e[4]=a,e[5]=p):p=e[5];let x;e[6]!==p?(x={values:p},e[6]=p,e[7]=x):x=e[7];const u=Ze(x);let g;e[8]!==u||e[9]!==a?(g=()=>{a&&u.reset({title:a.title,description:a.description??null,body:re(a)})},e[8]=u,e[9]=a,e[10]=g):g=e[10];const b=g;let N;e[11]!==f.update||e[12]!==u||e[13]!==s?(N=u.handleSubmit(async k=>{const A=await f.update.mutateAsync({id:s,data:{title:k.title,description:k.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:k.body}}]}});u.reset({title:A.title,description:A.description??null,body:re(A)})}),e[11]=f.update,e[12]=u,e[13]=s,e[14]=N):N=e[14];const I=N;if(!a){let k;e[15]!==o?(k=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=k):k=e[16];let A;e[17]!==o?(A=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=A):A=e[18];let B;return e[19]!==k||e[20]!==A?(B=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:k,description:A})}),e[19]=k,e[20]=A,e[21]=B):B=e[21],B}let w;e[22]!==a.title?(w=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=w):w=e[23];let P;e[24]!==a.description?(P=a.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:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let $;e[26]!==w||e[27]!==P?($=t.jsx(lt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[w,P]})}),e[26]=w,e[27]=P,e[28]=$):$=e[28];let v;e[29]!==I?(v=()=>{I()},e[29]=I,e[30]=v):v=e[30];let D;e[31]!==u.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==v?(D=t.jsx(nt,{children:t.jsx(Ot,{onSave:v,onUndo:b,isDirty:u.formState.isDirty,isSaving:h})}),e[31]=u.formState.isDirty,e[32]=h,e[33]=b,e[34]=v,e[35]=D):D=e[35];let E;e[36]!==u?(E=t.jsx("div",{className:"h-full",children:t.jsx(Mt,{form:u})}),e[36]=u,e[37]=E):E=e[37];let R;return e[38]!==D||e[39]!==E||e[40]!==$?(R=t.jsxs(pe,{children:[$,D,E]}),e[38]=D,e[39]=E,e[40]=$,e[41]=R):R=e[41],R}function Lt(l){const e=C.c(10),{itemId:n}=l,s=L();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==s?(c=s("details.prompt.notFoundTitle"),e[1]=s,e[2]=c):c=e[2];let d;e[3]!==s?(d=s("details.prompt.missingConnectionDescription"),e[3]=s,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(ke,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Fe(l){const e=C.c(8);let n,s;e[0]!==l?({className:n,...s}=l,e[0]=l,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=z("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...s}),e[5]=s,e[6]=o,e[7]=i):i=e[7],i}function Me(l){const e=C.c(8);let n,s;e[0]!==l?({className:n,...s}=l,e[0]=l,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=z("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=i):i=e[7],i}function U(l){const e=C.c(8);let n,s;e[0]!==l?({className:n,...s}=l,e[0]=l,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=z("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=i):i=e[7],i}function Q(l){const e=C.c(10);let n,s,o;e[0]!==l?({asChild:n,className:s,...o}=l,e[0]=l,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==s?(r=z("hover:text-foreground transition-colors truncate",s),e[4]=s,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function ze(l){const e=C.c(8);let n,s;e[0]!==l?({className:n,...s}=l,e[0]=l,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=z("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...s}),e[5]=s,e[6]=o,e[7]=i):i=e[7],i}function Y(l){const e=C.c(12);let n,s,o;e[0]!==l?({children:n,className:s,...o}=l,e[0]=l,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=e[3]);let i;e[4]!==s?(i=z("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",s),e[4]=s,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=l=>l.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(l){const e=C.c(12),{toolName:n,connectionId:s,siblings:o,onSelectInstance:i,onBack:r}=l,c=L();let d;e[0]!==s?(d={connectionId:s},e[0]=s,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let p;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=p):p=e[5],p}const f=`${s}:${n}`;let h;return e[6]!==s||e[7]!==i||e[8]!==o||e[9]!==f||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:s,siblings:o,onSelectInstance:i},f),e[6]=s,e[7]=i,e[8]=o,e[9]=f,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:l,connectionId:e,siblings:n,onSelectInstance:s}){const o=L(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const m=`replay-${i}`,j=sessionStorage.getItem(m);if(!j)return null;sessionStorage.removeItem(m);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const m={};for(const[j,y]of Object.entries(r))y!==null&&typeof y=="object"?m[j]=JSON.stringify(y,null,2):m[j]=y;return m})(),[d,a]=T.useState(c??{}),[f,h]=T.useState(r?JSON.stringify(r,null,2):"{}"),[p,x]=T.useState(null),[u,g]=T.useState(null),[b,N]=T.useState(null),[I,w]=T.useState(null),[P,$]=T.useState(!1),[v,D]=T.useState(null),{org:E}=de(),R=Re(e),k=At(),A=Dt(),{openSidePanel:B}=Et(),xe=`${e}:${l}`,V=ue({connectionId:e,orgId:E.id,orgSlug:E.slug}),J=Tt({client:V}),S=J.data?.tools?.find(m=>m.name===l),q=xt(S?._meta),Le=m=>{if(!k)return;const j=kt(m.content);j.content.length>0&&(B("chat"),k.sendMessage({tiptapDoc:j}))},[X,Z]=T.useState("json"),[Be,Ue]=T.useState(!1);q&&!Be&&(Z("ui"),Ue(!0));const fe=S?.inputSchema?.properties,he=fe?Object.keys(fe):[],_=he.length>0,H={};if(_&&S?.inputSchema?.properties)for(const m of he)H[m]=S.inputSchema.required?.includes(m)?"":void 0;const ee=m=>Object.prototype.hasOwnProperty.call(d,m),Ve=async()=>{$(!0),w(null),x(null),g(null),N(null),D(null);const m=performance.now();try{if(!V)throw new Error("MCP client is not available");const j=_?{...H,...d}:(()=>{const O=f.trim();if(!O)return{};const F=JSON.parse(O);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();_&&S?.inputSchema?.properties&&Object.entries(S.inputSchema.properties).forEach(([O,F])=>{if((F.type==="object"||F.type==="array")&&typeof j[O]=="string")try{j[O]=JSON.parse(j[O])}catch{}else if((F.type==="number"||F.type==="integer")&&typeof j[O]=="string"&&j[O]!==""){const be=Number(j[O]);Number.isNaN(be)||(j[O]=be)}});const y=await V.callTool({name:l,arguments:j}),K=y.structuredContent??y,We=performance.now(),Qe=Math.round(We-m);x(K),g(y),N(j);const Ye=JSON.stringify(K),je=new TextEncoder().encode(Ye).length;D({duration:`${Qe}ms`,bytes:`${je} bytes`,tokens:`~${Math.ceil(je/4)} tokens`,cost:"$0.0000"})}catch(j){const y=j instanceof Error?j.message:String(j);w(y||"Unknown error occurred");const K=performance.now();D({duration:`${Math.round(K-m)}ms`})}finally{$(!1)}},te=(m,j)=>{a(y=>({...y,[m]:j}))},Je=()=>{x(null),g(null),N(null),w(null),D(null)},_e=S?.name??Bt(l),qe=t.jsx(Fe,{children:t.jsxs(Me,{children:[t.jsx(U,{children:t.jsx(Q,{asChild:!0,children:t.jsx(W,{to:"/$org/settings/connections",params:{org:E.slug},children:o("details.tool.connections")})})}),t.jsx(Y,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(U,{children:t.jsx(Q,{asChild:!0,children:t.jsx(W,{to:"/$org/settings/connections/$appSlug",params:{org:E.slug,appSlug:Ct(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(Y,{})]}),t.jsx(U,{children:t.jsx(ze,{children:_e})})]})}),ge=n.length>1&&t.jsxs(Se,{value:e,onValueChange:s,children:[t.jsx(ye,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(we,{})}),t.jsx(Ce,{children:n.map(m=>t.jsx(ie,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Pe,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),He=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:o("details.tool.parameters")}),S?.inputSchema?.required&&S.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:_&&S?.inputSchema?.properties?Object.entries(S.inputSchema.properties).map(([m,j])=>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:[m,S.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(ce,{className:"font-mono text-xs",value:ee(m)?d[m]??"":H[m]??"",onChange:y=>te(m,y.target.value),placeholder:o("details.tool.enterAsJson",{key:m}),rows:3}):j.type==="boolean"?t.jsxs(Se,{value:ee(m)?String(d[m]??""):"",onValueChange:y=>te(m,y==="true"),children:[t.jsx(ye,{children:t.jsx(we,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Ce,{children:[t.jsx(ie,{value:"true",children:"true"}),t.jsx(ie,{value:"false",children:"false"})]})]}):t.jsx(ae,{value:ee(m)?d[m]??"":H[m]??"",onChange:y=>te(m,y.target.value),placeholder:o("details.tool.enter",{key:m})})]},m)):S?.inputSchema&&!_?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(ce,{className:"font-mono text-xs min-h-[120px]",value:f,onChange:m=>h(m.target.value),placeholder:o("details.tool.rawJsonExample")})]}):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:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(M,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Je,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(M,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=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:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[v&&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(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.duration})]}),v.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.tokens})]}),v.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.bytes})]}),v.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:v.cost})})]}),q&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ie,{children:[t.jsx($e,{asChild:!0,children:t.jsx(M,{size:"icon",variant:X==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Te,{children:o("details.tool.interactiveView")})]}),t.jsxs(Ie,{children:[t.jsx($e,{asChild:!0,children:t.jsx(M,{size:"icon",variant:X==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(Ne,{size:14})})}),t.jsx(Te,{children:o("details.tool.jsonView")})]})]})})]})]}),I&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{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(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:I})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:q&&X==="ui"&&V?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:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:q,toolInfo:S?{tool:S}:void 0,toolInput:b??void 0,toolResult:u??void 0,displayMode:"fullscreen",minHeight:ve.view.minHeight,maxHeight:ve.view.maxHeight,client:V,onMessage:Le,onUpdateModelContext:m=>A?.setAppContext(xe,m),onTeardown:()=>A?.clearAppContext(xe),className:"h-full"})}):p?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(p,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(M,{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(p,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{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(Ne,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(pe,{breadcrumb:qe,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(Pe,{icon:R?.icon||null,name:R?.title||l,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:l}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[J.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):J.isLoading?t.jsx(G,{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:J.isSuccess?"ready":J.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:S?.annotations,_meta:S?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:ge})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:S?.description||"No description available"})]}),n.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:o("details.tool.instance")}),ge]}),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:He}),Ke]})})]})})}function Jt(l){const e=C.c(20),{itemId:n,siblings:s,onBack:o}=l,i=L(),[r,c]=T.useState(s[0]?.id??"");let d;e[0]!==r||e[1]!==s?(d=s.find(x=>x.id===r)?.id??s[0]?.id??"",e[0]=r,e[1]=s,e[2]=d):d=e[2];const a=d;if(!Re(a||void 0)||!a){let x;e[3]!==i?(x=i("details.tool.connectionNotFound"),e[3]=i,e[4]=x):x=e[4];let u;e[5]!==x?(u=t.jsx("h3",{className:"text-lg font-semibold",children:x}),e[5]=x,e[6]=u):u=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let N;return e[11]!==u||e[12]!==b?(N=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:[u,b]})}),e[11]=u,e[12]=b,e[13]=N):N=e[13],N}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let p;return e[15]!==a||e[16]!==o||e[17]!==s||e[18]!==n?(p=t.jsx(T.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:s,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=s,e[18]=n,e[19]=p):p=e[19],p}function _t(l){const e=C.c(21),{icon:n,illustration:s,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=l;let f;e[0]!==d?(f=z("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=f):f=e[1];let h;e[2]!==n||e[3]!==s?(h=s?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:s}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=s,e[4]=h):h=e[4];let p;e[5]!==o?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=p):p=e[6];let x;e[7]!==i?(x=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=x):x=e[8];let u;e[9]!==p||e[10]!==x?(u=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,x]}),e[9]=p,e[10]=x,e[11]=u):u=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(M,{size:"sm",className:z(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==f||e[17]!==h||e[18]!==u||e[19]!==g?(b=t.jsxs("div",{className:f,children:[h,u,g,a]}),e[15]=a,e[16]=f,e[17]=h,e[18]=u,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const l=C.c(9),e=De();let n;l[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},l[0]=n):n=l[0];const s=me(n),o=decodeURIComponent(s.itemId);let i;l[1]!==s.appSlug?(i={slug:s.appSlug},l[1]=s.appSlug,l[2]=i):i=l[2];const r=Oe(i);let c;l[3]!==e.history?(c=()=>{e.history.back()},l[3]=e.history,l[4]=c):c=l[4];const d=c,a=Kt;let f;return l[5]!==d||l[6]!==o||l[7]!==r?(f=t.jsx(Jt,{itemId:o,siblings:r,onBack:d,onUpdate:a}),l[5]=d,l[6]=o,l[7]=r,l[8]=f):f=l[8],f}async function Kt(l){return Promise.resolve()}function Wt(l){return l.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const l=De(),e=me({from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"}),n=decodeURIComponent(e.collectionName),s=decodeURIComponent(e.itemId),o=()=>{l.history.back()},{org:i}=de(),c=Oe({slug:e.appSlug})[0]??null,d=c?.id??"",a=d||"no-connection",f=ue({connectionId:d??null,orgId:i.id,orgSlug:i.slug}),h=Ae(a,n,f),p=async I=>{s&&await h.update.mutateAsync({id:s,data:I})},x=n?.toLowerCase(),u=x&&qt[x],g=Wt(n),b=t.jsx(Fe,{children:t.jsxs(Me,{children:[t.jsx(U,{children:t.jsx(Q,{asChild:!0,children:t.jsx(W,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),t.jsx(Y,{}),c&&t.jsxs(t.Fragment,{children:[t.jsx(U,{children:t.jsx(Q,{asChild:!0,children:t.jsx(W,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:e.appSlug},search:{tab:n},children:c.title})})}),t.jsx(Y,{})]}),t.jsx(U,{children:t.jsx(ze,{children:g})})]})});if(u)return t.jsx(u,{itemId:s,onBack:o,onUpdate:p});const N=L();return t.jsx(pe,{breadcrumb:b,children:t.jsx(_t,{icon:t.jsx(Rt,{size:36,className:"text-muted-foreground"}),title:N("orgs.collectionDetail.noComponentDefinedTitle"),description:N("orgs.collectionDetail.noComponentDefinedDescription"),buttonProps:{onClick:o,children:N("orgs.collectionDetail.goBackButton")}})})}function Yt(){const l=C.c(3);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},l[0]=e):e=l[0];const n=me(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return l[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),l[1]=r):r=l[1],r}let i;return l[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),l[2]=i):i=l[2],i}function _o(){const l=C.c(7),e=L();let n;l[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),l[0]=e,l[1]=n):n=l[1];let s;l[2]!==n?(s=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),l[2]=n,l[3]=s):s=l[3];let o;l[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Yt,{}),l[4]=o):o=l[4];let i;return l[5]!==s?(i=t.jsx(ke,{children:t.jsx(T.Suspense,{fallback:s,children:o})}),l[5]=s,l[6]=i):i=l[6],i}export{_o as default};
|
|
1
|
+
import{c as C,j as t,B as M,k as G,J as Ge,M as se,i as L,E as ke,r as T,F as de,ba as Xe,bb as Ae,R as Ze,m as z,bc as et,u as tt,L as W,t as st,e as me,a_ as De}from"./index-BtBAx8XA.js";import{E as Ee}from"./empty-state-DGKv6iaQ.js";import{u as ue}from"./use-mcp-client-CynPg1uL.js";import{F as oe,a as ot,b as ne,d as le}from"./form-BjILzwX8.js";import{I as ae}from"./input-Dyh2_qZE.js";import{T as ce}from"./textarea-BQMP1z52.js";import{a as nt,b as lt,V as pe,O as it,M as rt}from"./index-qrgZ0NGo.js";import{aA as at,T as ct,ar as dt,_ as mt,a9 as ut,aB as pt,a6 as Ne}from"./agent-icon-BtZnpkLs.js";import{g as xt,M as ft,a as ve}from"./index-dbtBCUMA.js";import{A as ht,a as gt,b as jt}from"./alert-CSs1qt-4.js";import{S as Se,a as ye,b as we,c as Ce,d as ie}from"./select-DEGZ_IWN.js";import{c as bt,b as Ie,T as $e,a as Te}from"./tooltip-rruKccQl.js";import{i as Nt}from"./AlertCircle-BHAhKNmK.js";import{s as vt}from"./Stars02-DPmHqm_5.js";import{a as St}from"./Copy01-B9oBh-Sc.js";import{i as yt}from"./Play-CORh1b3h.js";import{i as wt}from"./ChevronRight-CadciNy4.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./use-mcp-auth-status-BkfLoLOV.js";import{a as Re,u as Oe}from"./use-connection-L-lqPFAt.js";import{a as Tt}from"./use-mcp-tools-Dsinsy2u.js";import{M as Pt,c as kt}from"./monaco-editor-DYWuYlrw.js";import{I as Pe}from"./integration-icon-BIKsn1PU.js";import{h as At,m as Dt}from"./chat-context-C4uHb9fh.js";import{u as Et}from"./shell-layout-ScztsXlF.js";import{n as Rt}from"./Tool02-IVtF0j03.js";import"./auth-DnzmBzsd.js";import"./label-sXTl0vPj.js";import"./index-CiVIW2Nl.js";import"./sidebar-BSz--1bS.js";import"./LayoutLeft-CQjONItu.js";import"./use-mobile-Dq40loMm.js";import"./X-DMWoe6ED.js";import"./ZoomOut-zIwnbKGd.js";import"./Key01-BuFHyFwG.js";import"./extract-connection-data-CaQkLtKm.js";import"./use-registry-connections-B5YrUvTg.js";import"./use-organization-settings-C79CzSGf.js";import"./studio-tools-CVmQa-wr.js";import"./Plus-CymFBrv_.js";import"./index-cttjfEtv.js";import"./index-CwNfd2lk.js";import"./popover-Dw3xO39E.js";import"./use-virtual-mcp-iyzyi2rH.js";import"./Check-y6lwxF--.js";import"./SearchMd-Dx46GNbC.js";import"./Users03-CZWdpGhj.js";import"./use-create-virtual-mcp-twWonYuu.js";import"./use-navigate-to-agent-6yPtW66t.js";import"./hooks-s-wg_yWq.js";import"./decopilot-sse-pool-BxDksZ_n.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-DiNQfNvy.js";import"./ArrowUp-DxGnDz2z.js";import"./Settings02-Bs97ZIUi.js";import"./ArrowRight-BrCnT9QC.js";import"./ArrowUpRight-Da7Xj47Z.js";import"./TrendUp01-BCX1tOr9.js";import"./ZapSquare-DbcSaxo0.js";import"./CheckCircle-B2E1-lHd.js";import"./ChevronDown-EuCf1m86.js";import"./ChevronUp-CYsWN-oD.js";import"./DotsVertical-C88_zwNA.js";import"./Globe01-BSQmAWCO.js";import"./Eye-D6wO7Qmh.js";import"./FilterLines-CeB6mwpD.js";import"./Star01-BM6MjJ7W.js";import"./Globe04-Meo0lTn8.js";import"./SwitchHorizontal01-likZrCDK.js";import"./HardDrive-CJjhHD1B.js";import"./Image01-Dilf3q7O.js";import"./XCircle-BA2kRTL2.js";import"./LinkExternal01-DBkSmTNi.js";import"./Monitor01-BpX1UZkt.js";import"./Sun-Be3KSXJM.js";import"./Package-nB3nhOrK.js";import"./Palette-C-DUUOXH.js";import"./SearchLg-BUQSfVKQ.js";import"./Shield01-hMgJ9M7q.js";import"./Stars01-CPGdNFPa.js";import"./Trash01-DI7LTPFE.js";import"./Upload01-cMcdAXoX.js";import"./User01-CVYsS5YD.js";import"./Users01-DWjKxfaH.js";import"./XClose-l2X2CDWa.js";import"./Zap-CmG1qL65.js";import"./badge-De0Mn2aQ.js";import"./mcp-oauth-BNY9Gdeq.js";import"./index-B3R7me5P.js";import"./autosend-BKdSCcaS.js";import"./use-ai-providers-Cl1fKuZS.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-Ce4--_At.js";import"./avatar-i6Im8YbJ.js";import"./dialog-Bz1Pb7BF.js";import"./required-auth-layout-2GvIg9iS.js";import"./use-org-sso-5PRzOD99.js";function Ot(l){const e=C.c(15),{onSave:n,onUndo:s,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=l,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(at,{size:14}),e[0]=f):f=e[0];let h;e[1]!==i||e[2]!==s||e[3]!==a?(h=t.jsxs(M,{variant:"outline",size:"sm",onClick:s,disabled:i,"aria-label":a,children:[f,a]}),e[1]=i,e[2]=s,e[3]=a,e[4]=h):h=e[4];let p;e[5]!==i?(p=i?t.jsx(G,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=p):p=e[6];let x;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==p?(x=t.jsxs(M,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[p,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=p,e[11]=x):x=e[11];let u;return e[12]!==h||e[13]!==x?(u=t.jsxs(t.Fragment,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=u):u=e[14],u}Ge({title:se().min(1),description:se().nullable(),body:se()});function re(l){for(const e of l.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const l=window.location.pathname.split("/").filter(Boolean),e=l.findIndex(s=>s==="mcps"),n=e>=0?l[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Mt(l){const e=C.c(43),{form:n}=l,s=L();let o;e[0]!==s?(o=s("details.prompt.details"),e[0]=s,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==s?(r=$=>{const{field:v}=$;return t.jsxs(ne,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:s("details.prompt.title")}),t.jsx(le,{children:t.jsx(ae,{...v,placeholder:s("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=s,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(oe,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==s?(d=$=>{const{field:v}=$;return t.jsxs(ne,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:s("details.prompt.description")}),t.jsx(le,{children:t.jsx(ae,{...v,value:v.value??"",placeholder:s("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=s,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(oe,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let f;e[14]!==c||e[15]!==a?(f=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=f):f=e[16];let h;e[17]!==i||e[18]!==f?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,f]}),e[17]=i,e[18]=f,e[19]=h):h=e[19];let p;e[20]!==s?(p=s("details.prompt.message"),e[20]=s,e[21]=p):p=e[21];let x;e[22]!==p?(x=t.jsx("div",{className:"text-sm font-medium text-foreground",children:p}),e[22]=p,e[23]=x):x=e[23];let u;e[24]!==s?(u=s("details.prompt.messageDescription"),e[24]=s,e[25]=u):u=e[25];let g;e[26]!==u?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:u}),e[26]=u,e[27]=g):g=e[27];let b;e[28]!==s?(b=$=>{const{field:v}=$;return t.jsx(ne,{children:t.jsx(le,{children:t.jsx(ce,{...v,value:v.value??"",placeholder:s("details.prompt.bodyPlaceholder"),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"})})})},e[28]=s,e[29]=b):b=e[29];let N;e[30]!==n.control||e[31]!==b?(N=t.jsx(oe,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=N):N=e[32];let I;e[33]!==x||e[34]!==g||e[35]!==N?(I=t.jsxs("div",{className:"flex flex-col gap-2",children:[x,g,N]}),e[33]=x,e[34]=g,e[35]=N,e[36]=I):I=e[36];let w;e[37]!==I||e[38]!==h?(w=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:[h,I]}),e[37]=I,e[38]=h,e[39]=w):w=e[39];let P;return e[40]!==n||e[41]!==w?(P=t.jsx(ot,{...n,children:w}),e[40]=n,e[41]=w,e[42]=P):P=e[42],P}function zt(l){const e=C.c(42),{providerId:n,promptId:s}=l,o=L(),{org:i}=de(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ue(c),a=Xe(n,"PROMPT",s,d),f=Ae(n,"PROMPT",d),h=f.update.isPending;let p;e[4]!==a?(p=a?{title:a.title,description:a.description??null,body:re(a)}:void 0,e[4]=a,e[5]=p):p=e[5];let x;e[6]!==p?(x={values:p},e[6]=p,e[7]=x):x=e[7];const u=Ze(x);let g;e[8]!==u||e[9]!==a?(g=()=>{a&&u.reset({title:a.title,description:a.description??null,body:re(a)})},e[8]=u,e[9]=a,e[10]=g):g=e[10];const b=g;let N;e[11]!==f.update||e[12]!==u||e[13]!==s?(N=u.handleSubmit(async k=>{const A=await f.update.mutateAsync({id:s,data:{title:k.title,description:k.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:k.body}}]}});u.reset({title:A.title,description:A.description??null,body:re(A)})}),e[11]=f.update,e[12]=u,e[13]=s,e[14]=N):N=e[14];const I=N;if(!a){let k;e[15]!==o?(k=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=k):k=e[16];let A;e[17]!==o?(A=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=A):A=e[18];let B;return e[19]!==k||e[20]!==A?(B=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:k,description:A})}),e[19]=k,e[20]=A,e[21]=B):B=e[21],B}let w;e[22]!==a.title?(w=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=w):w=e[23];let P;e[24]!==a.description?(P=a.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:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let $;e[26]!==w||e[27]!==P?($=t.jsx(lt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[w,P]})}),e[26]=w,e[27]=P,e[28]=$):$=e[28];let v;e[29]!==I?(v=()=>{I()},e[29]=I,e[30]=v):v=e[30];let D;e[31]!==u.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==v?(D=t.jsx(nt,{children:t.jsx(Ot,{onSave:v,onUndo:b,isDirty:u.formState.isDirty,isSaving:h})}),e[31]=u.formState.isDirty,e[32]=h,e[33]=b,e[34]=v,e[35]=D):D=e[35];let E;e[36]!==u?(E=t.jsx("div",{className:"h-full",children:t.jsx(Mt,{form:u})}),e[36]=u,e[37]=E):E=e[37];let R;return e[38]!==D||e[39]!==E||e[40]!==$?(R=t.jsxs(pe,{children:[$,D,E]}),e[38]=D,e[39]=E,e[40]=$,e[41]=R):R=e[41],R}function Lt(l){const e=C.c(10),{itemId:n}=l,s=L();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==s?(c=s("details.prompt.notFoundTitle"),e[1]=s,e[2]=c):c=e[2];let d;e[3]!==s?(d=s("details.prompt.missingConnectionDescription"),e[3]=s,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(ke,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Fe(l){const e=C.c(8);let n,s;e[0]!==l?({className:n,...s}=l,e[0]=l,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=z("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...s}),e[5]=s,e[6]=o,e[7]=i):i=e[7],i}function Me(l){const e=C.c(8);let n,s;e[0]!==l?({className:n,...s}=l,e[0]=l,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=z("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=i):i=e[7],i}function U(l){const e=C.c(8);let n,s;e[0]!==l?({className:n,...s}=l,e[0]=l,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=z("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=i):i=e[7],i}function Q(l){const e=C.c(10);let n,s,o;e[0]!==l?({asChild:n,className:s,...o}=l,e[0]=l,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==s?(r=z("hover:text-foreground transition-colors truncate",s),e[4]=s,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function ze(l){const e=C.c(8);let n,s;e[0]!==l?({className:n,...s}=l,e[0]=l,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let o;e[3]!==n?(o=z("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==s||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...s}),e[5]=s,e[6]=o,e[7]=i):i=e[7],i}function Y(l){const e=C.c(12);let n,s,o;e[0]!==l?({children:n,className:s,...o}=l,e[0]=l,e[1]=n,e[2]=s,e[3]=o):(n=e[1],s=e[2],o=e[3]);let i;e[4]!==s?(i=z("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",s),e[4]=s,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=l=>l.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(l){const e=C.c(12),{toolName:n,connectionId:s,siblings:o,onSelectInstance:i,onBack:r}=l,c=L();let d;e[0]!==s?(d={connectionId:s},e[0]=s,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let p;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=p):p=e[5],p}const f=`${s}:${n}`;let h;return e[6]!==s||e[7]!==i||e[8]!==o||e[9]!==f||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:s,siblings:o,onSelectInstance:i},f),e[6]=s,e[7]=i,e[8]=o,e[9]=f,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:l,connectionId:e,siblings:n,onSelectInstance:s}){const o=L(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const m=`replay-${i}`,j=sessionStorage.getItem(m);if(!j)return null;sessionStorage.removeItem(m);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const m={};for(const[j,y]of Object.entries(r))y!==null&&typeof y=="object"?m[j]=JSON.stringify(y,null,2):m[j]=y;return m})(),[d,a]=T.useState(c??{}),[f,h]=T.useState(r?JSON.stringify(r,null,2):"{}"),[p,x]=T.useState(null),[u,g]=T.useState(null),[b,N]=T.useState(null),[I,w]=T.useState(null),[P,$]=T.useState(!1),[v,D]=T.useState(null),{org:E}=de(),R=Re(e),k=At(),A=Dt(),{openSidePanel:B}=Et(),xe=`${e}:${l}`,V=ue({connectionId:e,orgId:E.id,orgSlug:E.slug}),J=Tt({client:V}),S=J.data?.tools?.find(m=>m.name===l),q=xt(S?._meta),Le=m=>{if(!k)return;const j=kt(m.content);j.content.length>0&&(B("chat"),k.sendMessage({tiptapDoc:j}))},[X,Z]=T.useState("json"),[Be,Ue]=T.useState(!1);q&&!Be&&(Z("ui"),Ue(!0));const fe=S?.inputSchema?.properties,he=fe?Object.keys(fe):[],_=he.length>0,H={};if(_&&S?.inputSchema?.properties)for(const m of he)H[m]=S.inputSchema.required?.includes(m)?"":void 0;const ee=m=>Object.prototype.hasOwnProperty.call(d,m),Ve=async()=>{$(!0),w(null),x(null),g(null),N(null),D(null);const m=performance.now();try{if(!V)throw new Error("MCP client is not available");const j=_?{...H,...d}:(()=>{const O=f.trim();if(!O)return{};const F=JSON.parse(O);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();_&&S?.inputSchema?.properties&&Object.entries(S.inputSchema.properties).forEach(([O,F])=>{if((F.type==="object"||F.type==="array")&&typeof j[O]=="string")try{j[O]=JSON.parse(j[O])}catch{}else if((F.type==="number"||F.type==="integer")&&typeof j[O]=="string"&&j[O]!==""){const be=Number(j[O]);Number.isNaN(be)||(j[O]=be)}});const y=await V.callTool({name:l,arguments:j}),K=y.structuredContent??y,We=performance.now(),Qe=Math.round(We-m);x(K),g(y),N(j);const Ye=JSON.stringify(K),je=new TextEncoder().encode(Ye).length;D({duration:`${Qe}ms`,bytes:`${je} bytes`,tokens:`~${Math.ceil(je/4)} tokens`,cost:"$0.0000"})}catch(j){const y=j instanceof Error?j.message:String(j);w(y||"Unknown error occurred");const K=performance.now();D({duration:`${Math.round(K-m)}ms`})}finally{$(!1)}},te=(m,j)=>{a(y=>({...y,[m]:j}))},Je=()=>{x(null),g(null),N(null),w(null),D(null)},_e=S?.name??Bt(l),qe=t.jsx(Fe,{children:t.jsxs(Me,{children:[t.jsx(U,{children:t.jsx(Q,{asChild:!0,children:t.jsx(W,{to:"/$org/settings/connections",params:{org:E.slug},children:o("details.tool.connections")})})}),t.jsx(Y,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(U,{children:t.jsx(Q,{asChild:!0,children:t.jsx(W,{to:"/$org/settings/connections/$appSlug",params:{org:E.slug,appSlug:Ct(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(Y,{})]}),t.jsx(U,{children:t.jsx(ze,{children:_e})})]})}),ge=n.length>1&&t.jsxs(Se,{value:e,onValueChange:s,children:[t.jsx(ye,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(we,{})}),t.jsx(Ce,{children:n.map(m=>t.jsx(ie,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Pe,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),He=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:o("details.tool.parameters")}),S?.inputSchema?.required&&S.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:_&&S?.inputSchema?.properties?Object.entries(S.inputSchema.properties).map(([m,j])=>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:[m,S.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(ce,{className:"font-mono text-xs",value:ee(m)?d[m]??"":H[m]??"",onChange:y=>te(m,y.target.value),placeholder:o("details.tool.enterAsJson",{key:m}),rows:3}):j.type==="boolean"?t.jsxs(Se,{value:ee(m)?String(d[m]??""):"",onValueChange:y=>te(m,y==="true"),children:[t.jsx(ye,{children:t.jsx(we,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Ce,{children:[t.jsx(ie,{value:"true",children:"true"}),t.jsx(ie,{value:"false",children:"false"})]})]}):t.jsx(ae,{value:ee(m)?d[m]??"":H[m]??"",onChange:y=>te(m,y.target.value),placeholder:o("details.tool.enter",{key:m})})]},m)):S?.inputSchema&&!_?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(ce,{className:"font-mono text-xs min-h-[120px]",value:f,onChange:m=>h(m.target.value),placeholder:o("details.tool.rawJsonExample")})]}):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:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(M,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Je,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(M,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=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:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[v&&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(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.duration})]}),v.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.tokens})]}),v.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:v.bytes})]}),v.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:v.cost})})]}),q&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ie,{children:[t.jsx($e,{asChild:!0,children:t.jsx(M,{size:"icon",variant:X==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Te,{children:o("details.tool.interactiveView")})]}),t.jsxs(Ie,{children:[t.jsx($e,{asChild:!0,children:t.jsx(M,{size:"icon",variant:X==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(Ne,{size:14})})}),t.jsx(Te,{children:o("details.tool.jsonView")})]})]})})]})]}),I&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{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(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:I})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:q&&X==="ui"&&V?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:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:q,toolInfo:S?{tool:S}:void 0,toolInput:b??void 0,toolResult:u??void 0,displayMode:"fullscreen",minHeight:ve.view.minHeight,maxHeight:ve.view.maxHeight,client:V,onMessage:Le,onUpdateModelContext:m=>A?.setAppContext(xe,m),onTeardown:()=>A?.clearAppContext(xe),className:"h-full"})}):p?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(p,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(M,{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(p,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{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(Ne,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(pe,{breadcrumb:qe,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(Pe,{icon:R?.icon||null,name:R?.title||l,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:l}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[J.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):J.isLoading?t.jsx(G,{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:J.isSuccess?"ready":J.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:S?.annotations,_meta:S?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:ge})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:S?.description||"No description available"})]}),n.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:o("details.tool.instance")}),ge]}),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:He}),Ke]})})]})})}function Jt(l){const e=C.c(20),{itemId:n,siblings:s,onBack:o}=l,i=L(),[r,c]=T.useState(s[0]?.id??"");let d;e[0]!==r||e[1]!==s?(d=s.find(x=>x.id===r)?.id??s[0]?.id??"",e[0]=r,e[1]=s,e[2]=d):d=e[2];const a=d;if(!Re(a||void 0)||!a){let x;e[3]!==i?(x=i("details.tool.connectionNotFound"),e[3]=i,e[4]=x):x=e[4];let u;e[5]!==x?(u=t.jsx("h3",{className:"text-lg font-semibold",children:x}),e[5]=x,e[6]=u):u=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let N;return e[11]!==u||e[12]!==b?(N=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:[u,b]})}),e[11]=u,e[12]=b,e[13]=N):N=e[13],N}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let p;return e[15]!==a||e[16]!==o||e[17]!==s||e[18]!==n?(p=t.jsx(T.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:s,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=s,e[18]=n,e[19]=p):p=e[19],p}function _t(l){const e=C.c(21),{icon:n,illustration:s,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=l;let f;e[0]!==d?(f=z("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=f):f=e[1];let h;e[2]!==n||e[3]!==s?(h=s?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:s}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=s,e[4]=h):h=e[4];let p;e[5]!==o?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=p):p=e[6];let x;e[7]!==i?(x=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=x):x=e[8];let u;e[9]!==p||e[10]!==x?(u=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,x]}),e[9]=p,e[10]=x,e[11]=u):u=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(M,{size:"sm",className:z(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==f||e[17]!==h||e[18]!==u||e[19]!==g?(b=t.jsxs("div",{className:f,children:[h,u,g,a]}),e[15]=a,e[16]=f,e[17]=h,e[18]=u,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const l=C.c(9),e=De();let n;l[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},l[0]=n):n=l[0];const s=me(n),o=decodeURIComponent(s.itemId);let i;l[1]!==s.appSlug?(i={slug:s.appSlug},l[1]=s.appSlug,l[2]=i):i=l[2];const r=Oe(i);let c;l[3]!==e.history?(c=()=>{e.history.back()},l[3]=e.history,l[4]=c):c=l[4];const d=c,a=Kt;let f;return l[5]!==d||l[6]!==o||l[7]!==r?(f=t.jsx(Jt,{itemId:o,siblings:r,onBack:d,onUpdate:a}),l[5]=d,l[6]=o,l[7]=r,l[8]=f):f=l[8],f}async function Kt(l){return Promise.resolve()}function Wt(l){return l.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const l=De(),e=me({from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"}),n=decodeURIComponent(e.collectionName),s=decodeURIComponent(e.itemId),o=()=>{l.history.back()},{org:i}=de(),c=Oe({slug:e.appSlug})[0]??null,d=c?.id??"",a=d||"no-connection",f=ue({connectionId:d??null,orgId:i.id,orgSlug:i.slug}),h=Ae(a,n,f),p=async I=>{s&&await h.update.mutateAsync({id:s,data:I})},x=n?.toLowerCase(),u=x&&qt[x],g=Wt(n),b=t.jsx(Fe,{children:t.jsxs(Me,{children:[t.jsx(U,{children:t.jsx(Q,{asChild:!0,children:t.jsx(W,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),t.jsx(Y,{}),c&&t.jsxs(t.Fragment,{children:[t.jsx(U,{children:t.jsx(Q,{asChild:!0,children:t.jsx(W,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:e.appSlug},search:{tab:n},children:c.title})})}),t.jsx(Y,{})]}),t.jsx(U,{children:t.jsx(ze,{children:g})})]})});if(u)return t.jsx(u,{itemId:s,onBack:o,onUpdate:p});const N=L();return t.jsx(pe,{breadcrumb:b,children:t.jsx(_t,{icon:t.jsx(Rt,{size:36,className:"text-muted-foreground"}),title:N("orgs.collectionDetail.noComponentDefinedTitle"),description:N("orgs.collectionDetail.noComponentDefinedDescription"),buttonProps:{onClick:o,children:N("orgs.collectionDetail.goBackButton")}})})}function Yt(){const l=C.c(3);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},l[0]=e):e=l[0];const n=me(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return l[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),l[1]=r):r=l[1],r}let i;return l[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),l[2]=i):i=l[2],i}function _o(){const l=C.c(7),e=L();let n;l[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),l[0]=e,l[1]=n):n=l[1];let s;l[2]!==n?(s=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),l[2]=n,l[3]=s):s=l[3];let o;l[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Yt,{}),l[4]=o):o=l[4];let i;return l[5]!==s?(i=t.jsx(ke,{children:t.jsx(T.Suspense,{fallback:s,children:o})}),l[5]=s,l[6]=i):i=l[6],i}export{_o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,i as A,j as s,m as z,B as E}from"./index-
|
|
1
|
+
import{c as $,i as A,j as s,m as z,B as E}from"./index-BtBAx8XA.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-HGb4wnMG.js";import{i as R,n as _}from"./ArrowUp-DxGnDz2z.js";import{i as V}from"./Check-y6lwxF--.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-likZrCDK.js";import{T as W,a as q,c as G,b as H}from"./tooltip-rruKccQl.js";import{V as J}from"./view-mode-toggle-BfB35D_i.js";import{B as Q}from"./badge-De0Mn2aQ.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&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:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(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 l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&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 X(t){return t.value!=="ALL"}export{oe as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,m as b,j as n,k as v}from"./index-
|
|
1
|
+
import{c as k,m as b,j as n,k as v}from"./index-BtBAx8XA.js";import{i as w}from"./SearchMd-Dx46GNbC.js";function S(j){const e=k.c(21),{value:m,onChange:d,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?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,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]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
|