decocms 4.63.2 → 4.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BTBypCdn.js → AlertCircle-2jdjwXod.js} +1 -1
- package/dist/client/assets/{AreaChart-BhX94NDH.js → AreaChart-ChGdNg__.js} +1 -1
- package/dist/client/assets/{ArrowUp-BJLl9TqD.js → ArrowUp-Bns359kG.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-sV3vc65w.js → ArrowUpRight-B-SX4ds9.js} +1 -1
- package/dist/client/assets/{Check-C6CkZg9-.js → Check-Cs_nz_11.js} +1 -1
- package/dist/client/assets/{CheckCircle-uMaPMHfw.js → CheckCircle-ODzvf2Mk.js} +1 -1
- package/dist/client/assets/{ChevronDown-CnSiev6J.js → ChevronDown-BnmgLMQp.js} +1 -1
- package/dist/client/assets/{ChevronRight-Bl_yFHrD.js → ChevronRight-BmpzEjlZ.js} +1 -1
- package/dist/client/assets/{ChevronUp-BaPKVFC3.js → ChevronUp-BMWZkFCK.js} +1 -1
- package/dist/client/assets/{Circle-DWd5snPl.js → Circle-CiIqX-4A.js} +1 -1
- package/dist/client/assets/{Copy01-q1_4xSoT.js → Copy01-BBSGxvvU.js} +1 -1
- package/dist/client/assets/{DotsVertical-3-1wg6CQ.js → DotsVertical-DPYpow1e.js} +1 -1
- package/dist/client/assets/{Eye-BkqHAYFU.js → Eye-CxXCNp9x.js} +1 -1
- package/dist/client/assets/{FilterLines-C3raf_4-.js → FilterLines-B5ne1C-E.js} +1 -1
- package/dist/client/assets/{Globe01-C_XmMjFu.js → Globe01-CWT8cfe0.js} +1 -1
- package/dist/client/assets/{Globe04-BrGU2s2F.js → Globe04-EdxS5i8F.js} +1 -1
- package/dist/client/assets/{HardDrive-BphckALA.js → HardDrive-CyRX8eRE.js} +1 -1
- package/dist/client/assets/{Key01-DGNNZHBM.js → Key01-BVM01BsN.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DXTPhzEW.js → LayoutLeft-Ca9h62hv.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DLTXWmjD.js → LinkExternal01-BeHPDO-A.js} +1 -1
- package/dist/client/assets/{List-BwKSG732.js → List-vKHfauer.js} +1 -1
- package/dist/client/assets/{Monitor01-D7y4Pb1B.js → Monitor01-_dxOwg-V.js} +1 -1
- package/dist/client/assets/{Package-Q8Zv9Y_3.js → Package-_xGRzdZH.js} +1 -1
- package/dist/client/assets/{Palette-D82zDHT4.js → Palette-_Bxr-_IA.js} +1 -1
- package/dist/client/assets/{Play-CF7bszTU.js → Play-T6Ulwzbi.js} +1 -1
- package/dist/client/assets/{Plus-ZkctvKC4.js → Plus-5aSNzK4v.js} +1 -1
- package/dist/client/assets/{SearchLg-iQhGcj-a.js → SearchLg-DFE9tDzd.js} +1 -1
- package/dist/client/assets/{SearchMd-D002K9LO.js → SearchMd-BwPBMv_I.js} +1 -1
- package/dist/client/assets/{Settings02-Deuua6cy.js → Settings02-D0ZIXHKW.js} +1 -1
- package/dist/client/assets/{Shield01-DPjv8Zam.js → Shield01-K8ZclYuH.js} +1 -1
- package/dist/client/assets/{Star01-BhWhGrZ_.js → Star01-C6gIUnMC.js} +1 -1
- package/dist/client/assets/{Stars01-Dw5HzSvc.js → Stars01-CIY0Cbdf.js} +1 -1
- package/dist/client/assets/{Stars02-eG3W6QRG.js → Stars02-CaKsPC1S.js} +1 -1
- package/dist/client/assets/{Sun-CsySQ-v-.js → Sun-Cait_D1T.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-h4mu2LgB.js → SwitchHorizontal01-D0LWZZ0b.js} +1 -1
- package/dist/client/assets/{Tool01-BI49uxz7.js → Tool01-ZnHDW7TB.js} +1 -1
- package/dist/client/assets/{Tool02-bHBqq1Gb.js → Tool02-svmJaQQ3.js} +1 -1
- package/dist/client/assets/{Trash01-C4WuTo6-.js → Trash01-i_nNUn-v.js} +1 -1
- package/dist/client/assets/{Trash03-Cwg_hP4B.js → Trash03-pVWJ_Sy5.js} +1 -1
- package/dist/client/assets/{TrendUp01-Bp8GuuqE.js → TrendUp01-BrvNuhlW.js} +1 -1
- package/dist/client/assets/{Upload01-0ls4OKAV.js → Upload01-TtI1kXpP.js} +1 -1
- package/dist/client/assets/{User01-cqDu6Kgh.js → User01-BAWiktf8.js} +1 -1
- package/dist/client/assets/{Users01-BuDSv84q.js → Users01-41Hv3Ltw.js} +1 -1
- package/dist/client/assets/{Users03-DMqPwFCP.js → Users03-fKd2nbn9.js} +1 -1
- package/dist/client/assets/{X-Arce-Ge0.js → X-DToCREjt.js} +1 -1
- package/dist/client/assets/{XCircle-rnvB6r1o.js → XCircle-wrtOXX8g.js} +1 -1
- package/dist/client/assets/{XClose-Dq50L0Ca.js → XClose-BWDuYgYR.js} +1 -1
- package/dist/client/assets/{Zap-cEit2Hj5.js → Zap-CTmOhMPm.js} +1 -1
- package/dist/client/assets/{ZapSquare-DyWoH3ti.js → ZapSquare-Cn0geoo-.js} +1 -1
- package/dist/client/assets/{ZoomOut-CumCWj6X.js → ZoomOut-lcIrQxM0.js} +1 -1
- package/dist/client/assets/{access-gate-CIIsAfZg.js → access-gate-BBFl79aB.js} +1 -1
- package/dist/client/assets/{add-section-modal-DI17p83S.js → add-section-modal-BW5FyqgS.js} +1 -1
- package/dist/client/assets/{agent-icon-BnuD7OG4.js → agent-icon-DLC1L_Hk.js} +1 -1
- package/dist/client/assets/{agents-list-Brg6uD_-.js → agents-list-7yPhU2D5.js} +1 -1
- package/dist/client/assets/{ai-providers-Bh0y9jDE.js → ai-providers-hcb2MVw2.js} +1 -1
- package/dist/client/assets/{alert-Cpp44T6I.js → alert-CBEero1n.js} +1 -1
- package/dist/client/assets/{alert-dialog-B2NrMNUE.js → alert-dialog-CvkagUzR.js} +1 -1
- package/dist/client/assets/{app-editor-Cy8vcnnM.js → app-editor-tJ2cRiPa.js} +1 -1
- package/dist/client/assets/{auth-CWa2vT5L.js → auth-DOYJKEUb.js} +1 -1
- package/dist/client/assets/{auth-catchall-B0F8kAo5.js → auth-catchall-Bu3KTLfT.js} +1 -1
- package/dist/client/assets/{auth-entry-BD9y6J-q.js → auth-entry-CbYLnDEG.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DdUB_-Tg.js → auth-split-layout-D6TGavfk.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CEQqfsIQ.js → authenticate-and-persist-oauth-DU7oSTBO.js} +1 -1
- package/dist/client/assets/{automation-list-row-C16-DFOd.js → automation-list-row-D7B7KBd6.js} +1 -1
- package/dist/client/assets/{automation-runs-8UgQ1V2y.js → automation-runs-i5Bx7Dgv.js} +1 -1
- package/dist/client/assets/{automations-BlDoHSuP.js → automations-D-uJjkYY.js} +1 -1
- package/dist/client/assets/{autosend-CqddBdGe.js → autosend-nHqAyvYN.js} +1 -1
- package/dist/client/assets/{avatar-hfq9tnFm.js → avatar-Bs7NAfc8.js} +1 -1
- package/dist/client/assets/{badge-YHkNrrCW.js → badge-BpKhJajf.js} +1 -1
- package/dist/client/assets/{block-document-D76SqY1T.js → block-document-j4H-9U9T.js} +2 -2
- package/dist/client/assets/{brand-context-C7osILME.js → brand-context-Bnk7RPXs.js} +1 -1
- package/dist/client/assets/{buckets-B2Kkg2C1.js → buckets-DckQUB-T.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D-swgwub.js → bulk-category-panel-BaHtvno2.js} +1 -1
- package/dist/client/assets/{calendar-BKliC0dO.js → calendar-B82Lx8q5.js} +1 -1
- package/dist/client/assets/{capability-load-error-CpFzHmR1.js → capability-load-error-COHcRrGU.js} +1 -1
- package/dist/client/assets/{card-BuTTBPVv.js → card-BIUOZmk3.js} +1 -1
- package/dist/client/assets/category-editor-C-ERP_7K.js +1 -0
- package/dist/client/assets/{chat-context-CbliNlff.js → chat-context-BGrFDOtM.js} +1 -1
- package/dist/client/assets/{checkbox-q4GScbrY.js → checkbox-GDMFBUJd.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BKrJV8hJ.js → cli-auth-success-CU7JL8dO.js} +1 -1
- package/dist/client/assets/{collection-detail-CD7OwWYS.js → collection-detail-C2Bszkkb.js} +1 -1
- package/dist/client/assets/{collection-display-button-BjSnIE-R.js → collection-display-button-CU3RB7q1.js} +1 -1
- package/dist/client/assets/{collection-search-CMyvx3uf.js → collection-search-DMyO5_Ej.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-L5cOGjNI.js → collection-table-wrapper-DdZzQm1N.js} +1 -1
- package/dist/client/assets/{collection-tabs-DpKi-Pwv.js → collection-tabs-C9deI6X-.js} +1 -1
- package/dist/client/assets/{command-xRIzaNK4.js → command-B3AQHji-.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-wdm8gGPG.js → commerce-onboarding-BpVlrvES.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BIKJ6n-k.js → connect-desktop-dialog-BSRFYkBR.js} +1 -1
- package/dist/client/assets/{connection-card-DdMOmbQa.js → connection-card-BR5IaC1J.js} +1 -1
- package/dist/client/assets/{connection-detail-DqWeWMCH.js → connection-detail-DOHkFFI9.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-_RrYdkdW.js → connection-form-helpers-B6APusQF.js} +1 -1
- package/dist/client/assets/{connections-DJaNcvRd.js → connections-WwQ-bjsY.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DQQBYQUt.js → decopilot-sse-pool-2YgaflpO.js} +1 -1
- package/dist/client/assets/{dialog-CzzC6F62.js → dialog-CxIxeX9C.js} +1 -1
- package/dist/client/assets/{domain-settings-mISoIv8l.js → domain-settings-DaCqG-ZW.js} +1 -1
- package/dist/client/assets/{drawer-DuwjCdW6.js → drawer-DDntTgAi.js} +1 -1
- package/dist/client/assets/{dropdown-menu-JCGdvklS.js → dropdown-menu-Bgweaubl.js} +1 -1
- package/dist/client/assets/{empty-state-Dl4HXkXF.js → empty-state-Cayxj40G.js} +1 -1
- package/dist/client/assets/{extract-connection-data-_BJPZSvu.js → extract-connection-data-D94p_zzw.js} +1 -1
- package/dist/client/assets/{file-explorer-DBYEoeSj.js → file-explorer-DxpFV8c6.js} +1 -1
- package/dist/client/assets/{file-type-icon-CrZXGPZz.js → file-type-icon-Bu9aeBGQ.js} +1 -1
- package/dist/client/assets/{files-CIzhOaxH.js → files-Cbx2DmP4.js} +1 -1
- package/dist/client/assets/{form-Bezqbf8w.js → form-BBxIjEr6.js} +1 -1
- package/dist/client/assets/{general-Bu6jSzvS.js → general-B_FCI7wN.js} +1 -1
- package/dist/client/assets/{github-repo-picker-oKYi49JD.js → github-repo-picker-VZx0l9da.js} +1 -1
- package/dist/client/assets/{hooks-Lb4O_GM3.js → hooks-BXniOJ3o.js} +1 -1
- package/dist/client/assets/{index-BUMlAxI6.js → index-B59Kgxlq.js} +1 -1
- package/dist/client/assets/{index-UC-5Zxqy.js → index-B7P3JFfk.js} +3 -3
- package/dist/client/assets/{index-C43SQexq.js → index-BCppuwYp.js} +1 -1
- package/dist/client/assets/{index-Bkiwnc43.js → index-BfVeMOIm.js} +1 -1
- package/dist/client/assets/{index-ESHPxC-C.js → index-BqLPTB7A.js} +1 -1
- package/dist/client/assets/{index-DYt6FiP0.js → index-Bx3jIRiZ.js} +28 -28
- package/dist/client/assets/{index-BPuqsE1D.js → index-CpkDiyET.js} +1 -1
- package/dist/client/assets/{index-C2BgM8Yk.js → index-CuBkmpIe.js} +1 -1
- package/dist/client/assets/{index-D4CJqCP8.js → index-Cwh0OVmY.js} +1 -1
- package/dist/client/assets/{index-BM7GH0TM.js → index-DRXYdN6H.js} +1 -1
- package/dist/client/assets/{index-B35SIJeq.js → index-D_j43lM_.js} +1 -1
- package/dist/client/assets/{index-CyJbjnvf.js → index-DefBXvVw.js} +1 -1
- package/dist/client/assets/{index-Iu2z9rV5.js → index-DzPkLC_J.js} +1 -1
- package/dist/client/assets/{index-redirect-C-1Aum45.js → index-redirect-BDhXC6Ig.js} +1 -1
- package/dist/client/assets/{index-Ak5DgymX.js → index-sgF7uOD6.js} +1 -1
- package/dist/client/assets/{input-CdzdWrKi.js → input-BUDeW7hy.js} +1 -1
- package/dist/client/assets/{integration-icon-C9eGFf17.js → integration-icon-CZz-QSyi.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Dsrdx3GF.js → invite-member-dialog-gPgFMyer.js} +1 -1
- package/dist/client/assets/{label-B6bwSWu6.js → label-iRKA-RF_.js} +1 -1
- package/dist/client/assets/{layout-DozuMsvh.js → layout-C5Jn5Ck8.js} +1 -1
- package/dist/client/assets/{login-C9GZMnFR.js → login-CLODuQOK.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DytXRgMV.js → mcp-oauth-nx6JoJtc.js} +1 -1
- package/dist/client/assets/{members-BH9NbFKp.js → members-QbBRWFnU.js} +1 -1
- package/dist/client/assets/{monaco-editor-DBrHXynI.js → monaco-editor-o1-X26EN.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CO69tHOn.js → monitoring-stats-row-DId3IdA9.js} +1 -1
- package/dist/client/assets/{oauth-callback-CNY0mybS.js → oauth-callback-BgyuKSbG.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CXTgzB5t.js → oauth-callback-ai-provider-D8XWif_h.js} +1 -1
- package/dist/client/assets/{onboarding-DDJYNxgP.js → onboarding-CjxvUllE.js} +1 -1
- package/dist/client/assets/{org-install-nly3Bzjd.js → org-install-DfjZ9IkB.js} +1 -1
- package/dist/client/assets/{org-layout-BbVv-ivs.js → org-layout-D0JSPoO2.js} +1 -1
- package/dist/client/assets/{organization-choice-DVQDFQLE.js → organization-choice-Bricupp_.js} +1 -1
- package/dist/client/assets/{orgs-prHljJU8.js → orgs-CTyTKFBc.js} +1 -1
- package/dist/client/assets/{page-seo-form-CqY6_i8R.js → page-seo-form-CURmYd_o.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DMxSYprS.js +1 -0
- package/dist/client/assets/{popover-DSyswm1r.js → popover-RMDOVNrN.js} +1 -1
- package/dist/client/assets/post-editor-BPw-WVkc.js +1 -0
- package/dist/client/assets/{primitives-BYjlG1fS.js → primitives-CtcKvSOY.js} +1 -1
- package/dist/client/assets/{profile-DSppTsnH.js → profile-C_Wd3XWh.js} +1 -1
- package/dist/client/assets/project-app-view-DOnyWOt_.js +1 -0
- package/dist/client/assets/record-editor-UUQMFRRQ.js +1 -0
- package/dist/client/assets/registry-BOFHa9Y3.js +2 -0
- package/dist/client/assets/{registry-layout-C4dGAHKX.js → registry-layout-Be5afgOI.js} +1 -1
- package/dist/client/assets/{reports-rgCiaQfZ.js → reports-YzPc5Yte.js} +1 -1
- package/dist/client/assets/{require-capability-CHqKvGf6.js → require-capability-DpxZpNd6.js} +1 -1
- package/dist/client/assets/{required-auth-layout-NaXT3_BP.js → required-auth-layout-BxHvrnHd.js} +1 -1
- package/dist/client/assets/{reset-password-wmRO1kQU.js → reset-password-DJH3PjMn.js} +1 -1
- package/dist/client/assets/{roles-BCQT0qMS.js → roles-CvRHFRNy.js} +1 -1
- package/dist/client/assets/{search-input-CedQS3fi.js → search-input-CmYReEhV.js} +1 -1
- package/dist/client/assets/{secrets-NFKjvWj2.js → secrets-BO4MLJfG.js} +1 -1
- package/dist/client/assets/sections-editor-DMR5NTjW.js +2 -0
- package/dist/client/assets/{select-CBCIQKJa.js → select-Dj2K5yjy.js} +1 -1
- package/dist/client/assets/{select-model-Ct4g3NyR.js → select-model-BDs4pEIf.js} +1 -1
- package/dist/client/assets/{self-tool-result-xRS_KbBg.js → self-tool-result-C0z9l7BF.js} +1 -1
- package/dist/client/assets/{seo-editor-DF84QQ2c.js → seo-editor-HaJZpc82.js} +1 -1
- package/dist/client/assets/{settings-layout--8tic038.js → settings-layout-wRl6B5Ra.js} +1 -1
- package/dist/client/assets/{settings-section-BO3lvI3u.js → settings-section-BArXqQeZ.js} +1 -1
- package/dist/client/assets/{shell-controls-DHSs_8GA.js → shell-controls-j0Pjr9eV.js} +1 -1
- package/dist/client/assets/{shell-layout-CcwCsF5D.js → shell-layout-BI2uQO13.js} +1 -1
- package/dist/client/assets/{sidebar-DKTHHq9w.js → sidebar-ChFVldq8.js} +1 -1
- package/dist/client/assets/{skeleton-Bq-ZzOX2.js → skeleton-h93xmIzl.js} +1 -1
- package/dist/client/assets/{sso-D5cfEoiQ.js → sso-Br51DFgV.js} +1 -1
- package/dist/client/assets/{store-BNAUDVRg.js → store-BKizQS0y.js} +1 -1
- package/dist/client/assets/store-registry--3U_Fy0J.js +2 -0
- package/dist/client/assets/{studio-tools-LMp9AQEt.js → studio-tools-ClbHxQRS.js} +1 -1
- package/dist/client/assets/{switch-DSsZIKRQ.js → switch-LnAJMMUO.js} +1 -1
- package/dist/client/assets/{table-Ce-xb9xB.js → table-C5lMn_VP.js} +1 -1
- package/dist/client/assets/{tabs-BKFP20BY.js → tabs-CKW_utIi.js} +1 -1
- package/dist/client/assets/{textarea-hc_vGNu_.js → textarea-DOY6usAP.js} +1 -1
- package/dist/client/assets/{toggle-group-BcRGmKwE.js → toggle-group-J0dpra0o.js} +1 -1
- package/dist/client/assets/{toolbar-DummVT0p.js → toolbar-D6yvNnHM.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DkhMlFlp.js → toolbar-icon-button-bbPI9wI3.js} +1 -1
- package/dist/client/assets/{tools-list-BhzXdOBv.js → tools-list-CQCLDTU0.js} +1 -1
- package/dist/client/assets/{tooltip-oF2dxKvS.js → tooltip-y-gJd0JC.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DFrX5Ixe.js → use-ai-providers-CRVxMN94.js} +1 -1
- package/dist/client/assets/{use-automations-qBheTnHm.js → use-automations-To6FeF4j.js} +1 -1
- package/dist/client/assets/{use-capability-BFUmGJ2c.js → use-capability-yplSlEyH.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BgQszoea.js → use-clock-tick-TVfDewP_.js} +1 -1
- package/dist/client/assets/{use-collections-blnu2tgv.js → use-collections-0g9OhHq7.js} +1 -1
- package/dist/client/assets/{use-connection-Cw3xkHvl.js → use-connection-xe5-hxnX.js} +1 -1
- package/dist/client/assets/{use-copy-CvJ-3ij0.js → use-copy-CNVRhlMf.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-0npVNTv_.js → use-create-virtual-mcp-BbTxeR88.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CIB-GuAM.js → use-debounced-autosave-COJSOT4a.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DS-Y5UGJ.js → use-debounced-value-CbZi79SA.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CKlPfDA8.js → use-deco-credits-BZynjfR8.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DKbJl4ca.js → use-decopilot-events-9exjxACg.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CNp_BsSE.js → use-delete-connection-BPx6hKUu.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CZgq6nwd.js → use-deployment-admin-ryI4o5qb.js} +1 -1
- package/dist/client/assets/{use-file-configs-DY10vbdS.js → use-file-configs-Chz9_IRb.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CgK6_i3r.js → use-infinite-scroll-C4aMXL06.js} +1 -1
- package/dist/client/assets/{use-join-requests-BkeSpaw9.js → use-join-requests-CrCn5SOi.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dh-Q8DTG.js → use-mcp-client-PGzywnDQ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DHliIetD.js → use-mcp-tools-DXzabuTu.js} +1 -1
- package/dist/client/assets/{use-members-DMRYjiNZ.js → use-members-DdZYx5_m.js} +1 -1
- package/dist/client/assets/{use-mobile-Berquj-a.js → use-mobile-Dku4KQs9.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CN7_pj2K.js → use-navigate-to-agent-CBtoRE_I.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CYqoyStI.js → use-org-auth-client-Bxwan6CE.js} +1 -1
- package/dist/client/assets/{use-org-sso-BjUBqdim.js → use-org-sso-DaC4OhZk.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D1FuSBs8.js → use-organization-roles-BpTZMueS.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Dioq4CT5.js → use-organization-settings-DxzO3z8d.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CfnMZ-zK.js → use-registry-connections-BiSclmr4.js} +1 -1
- package/dist/client/assets/{use-secrets-yUdF3bez.js → use-secrets-Dm1RRD36.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CKrZbd8R.js → use-status-sounds-C4zoyVF2.js} +1 -1
- package/dist/client/assets/{use-view-mode-BS40WrZo.js → use-view-mode-Cfg-6vGg.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BxAPmhe1.js → use-virtual-mcp-BL4Oe6kY.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BngKVfqj.js +1 -0
- package/dist/client/assets/{useRouterState-BMsfOWFN.js → useRouterState-Bu5QfVp3.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-k9Ynp2wC.js +1 -0
- package/dist/client/assets/{users-Hi3d7jft.js → users-Bzu7dpup.js} +1 -1
- package/dist/client/assets/{variant-calendar-DmERYe5g.js → variant-calendar-Bodi5KUt.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-a9_CAW3t.js → view-mode-toggle-w4-SZlv8.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +375 -375
- package/dist/server/server.js +272 -272
- package/package.json +1 -1
- package/dist/client/assets/category-editor-DVOqZTFo.js +0 -1
- package/dist/client/assets/page-seo-sheet-BLlZasir.js +0 -1
- package/dist/client/assets/post-editor-BSxTbq-v.js +0 -1
- package/dist/client/assets/project-app-view-6KL604QS.js +0 -1
- package/dist/client/assets/record-editor-BYBgdt-l.js +0 -1
- package/dist/client/assets/registry-BK9rFqBw.js +0 -2
- package/dist/client/assets/sections-editor-DFbXpELA.js +0 -2
- package/dist/client/assets/store-registry-BhImI2Wc.js +0 -2
- package/dist/client/assets/useInfiniteQuery-gMRRahCY.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-22jejaAh.js +0 -1
package/dist/client/assets/{automation-list-row-C16-DFOd.js → automation-list-row-D7B7KBd6.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E,r as F,l as $,j as t,B as K}from"./index-
|
|
1
|
+
import{c as E,r as F,l as $,j as t,B as K}from"./index-B7P3JFfk.js";import{b as O,d as B,e as I,g as L,c as H,A as V,a as q,f as G}from"./alert-dialog-CvkagUzR.js";import{a as J,D as Q,c as U,d as W}from"./dropdown-menu-Bgweaubl.js";import{s as X}from"./Stars02-CaKsPC1S.js";import{i as Y}from"./DotsVertical-DPYpow1e.js";import{s as Z}from"./Trash01-i_nNUn-v.js";import{i as ee}from"./Zap-CTmOhMPm.js";import{a as te}from"./use-virtual-mcp-BL4Oe6kY.js";import{A as se}from"./agent-icon-DLC1L_Hk.js";import{u as ne}from"./use-automations-To6FeF4j.js";function he(a){const e=E.c(53),{automation:s,showAgent:n,onClick:r}=a,{remove:i}=ne(),[P,S]=F.useState(!1),o=te(n?s.virtual_mcp_id:void 0);let D;e[0]!==s.id||e[1]!==i?(D=()=>{i.mutate(s.id),S(!1)},e[0]=s.id,e[1]=i,e[2]=D):D=e[2];const z=D;let A;e[3]!==r?(A=l=>{l.target===l.currentTarget&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),r())},e[3]=r,e[4]=A):A=e[4];const T=A,M=s.active&&s.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let c;e[5]!==M?(c=$("inline-block size-2 rounded-full shrink-0",M),e[5]=M,e[6]=c):c=e[6];const R=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let m;e[7]!==c||e[8]!==R?(m=t.jsx("span",{className:c,"aria-label":R}),e[7]=c,e[8]=R,e[9]=m):m=e[9];let u;e[10]!==o?.icon||e[11]!==o?.title||e[12]!==s.name||e[13]!==n?(u=n&&t.jsx(se,{icon:o?.icon??null,name:o?.title??s.name,size:"xs",className:"shrink-0"}),e[10]=o?.icon,e[11]=o?.title,e[12]=s.name,e[13]=n,e[14]=u):u=e[14];let d;e[15]!==s.name?(d=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[15]=s.name,e[16]=d):d=e[16];let g;e[17]!==o||e[18]!==n?(g=n&&o&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",o.title]}),e[17]=o,e[18]=n,e[19]=g):g=e[19];let f;e[20]!==d||e[21]!==g?(f=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,g]}),e[20]=d,e[21]=g,e[22]=f):f=e[22];let x;e[23]!==s.nearest_next_run_at||e[24]!==s.trigger_count?(x=t.jsx(oe,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[23]=s.nearest_next_run_at,e[24]=s.trigger_count,e[25]=x):x=e[25];let p;e[26]!==f||e[27]!==x?(p=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[f,x]}),e[26]=f,e[27]=x,e[28]=p):p=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(J,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(Y,{size:16})})}),e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{onClick:ie,onKeyDown:re,role:"presentation",className:"shrink-0",children:t.jsxs(Q,{children:[N,t.jsx(U,{align:"end",children:t.jsxs(W,{variant:"destructive",onClick:l=>{l.stopPropagation(),S(!0)},children:[t.jsx(Z,{size:16}),"Delete"]})})]})}),e[30]=y):y=e[30];let h;e[31]!==T||e[32]!==r||e[33]!==p||e[34]!==m||e[35]!==u?(h=t.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:T,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[m,u,p,y]}),e[31]=T,e[32]=r,e[33]=p,e[34]=m,e[35]=u,e[36]=h):h=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(H,{children:"Delete automation?"}),e[37]=w):w=e[37];let j;e[38]!==s.name?(j=t.jsxs(O,{children:[w,t.jsxs(B,{children:["This removes"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[38]=s.name,e[39]=j):j=e[39];let C;e[40]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(V,{children:"Cancel"}),e[40]=C):C=e[40];let _;e[41]!==z||e[42]!==i.isPending?(_=t.jsxs(I,{children:[C,t.jsx(L,{onClick:z,disabled:i.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[41]=z,e[42]=i.isPending,e[43]=_):_=e[43];let v;e[44]!==j||e[45]!==_?(v=t.jsxs(q,{children:[j,_]}),e[44]=j,e[45]=_,e[46]=v):v=e[46];let b;e[47]!==P||e[48]!==v?(b=t.jsx(G,{open:P,onOpenChange:S,children:v}),e[47]=P,e[48]=v,e[49]=b):b=e[49];let k;return e[50]!==h||e[51]!==b?(k=t.jsxs(t.Fragment,{children:[h,b]}),e[50]=h,e[51]=b,e[52]=k):k=e[52],k}function re(a){return a.stopPropagation()}function ie(a){return a.stopPropagation()}function oe(a){const e=E.c(4),{triggerCount:s,nextRunAt:n}=a;if(s===0){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=i):i=e[0],i}let r;return e[1]!==n||e[2]!==s?(r=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?t.jsxs(t.Fragment,{children:[t.jsx(X,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):t.jsxs(t.Fragment,{children:[t.jsx(ee,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=r):r=e[3],r}export{he as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,c as L,H as eu,J as rp,M as sp,j as p,B as mt,I as la,bJ as tu,bK as ip,at as op,aM as hn,bL as lp,l as Z,p as ap,aR as cp,aO as Jt,aV as up,aU as Bt,ba as Ar,aS as vn,bM as nu,aQ as ru,C as Mt,n as dp,d as fp,K as nt,t as eo,m as jr,b as qn,E as su,aL as iu,bN as Uo,aT as hp,bO as tn}from"./index-UC-5Zxqy.js";import{e as pp,a as mp,b as gp,c as xp,d as Pr,S as yp}from"./select-CBCIQKJa.js";import{u as ou}from"./useInfiniteQuery-gMRRahCY.js";import{a as lu,u as bp}from"./use-connection-Cw3xkHvl.js";import{c as kp,u as qo}from"./use-mcp-client-Dh-Q8DTG.js";import{u as Sp}from"./use-virtual-mcp-BxAPmhe1.js";import{b as vp,i as wp,a as Cp,S as Tp}from"./constants-D_FQAPnt.js";import{C as Np}from"./card-BuTTBPVv.js";import{o as au,m as cu,p as Ko,q as Jo}from"./sidebar-DKTHHq9w.js";import{c as uu,d as du,a as Ys,e as Qe,b as fu,T as Ze}from"./table-Ce-xb9xB.js";import{E as to}from"./empty-state-Dl4HXkXF.js";import{u as Go}from"./use-infinite-scroll-CgK6_i3r.js";import{u as Mp}from"./use-members-DMRYjiNZ.js";import{u as hu,S as Pn}from"./use-clock-tick-BgQszoea.js";import{e as Ep}from"./use-automations-qBheTnHm.js";import{u as pu}from"./studio-tools-LMp9AQEt.js";import{u as Ap}from"./useSuspenseInfiniteQuery-22jejaAh.js";import{B as rs}from"./badge-YHkNrrCW.js";import{C as aa}from"./checkbox-q4GScbrY.js";import{t as Ln}from"./ChevronDown-CnSiev6J.js";import{b as jp,C as Ip,a as ca,c as Op,e as Rp,d as Dp}from"./command-xRIzaNK4.js";import{P as mu,a as gu,b as xu}from"./popover-DSyswm1r.js";import{A as yu}from"./avatar-hfq9tnFm.js";import{n as no}from"./ChevronUp-BaPKVFC3.js";import{t as Pp,a as bu,n as Xo}from"./Tool02-bHBqq1Gb.js";import{i as Lp}from"./FilterLines-C3raf_4-.js";import{f as _p,Y as $p,w as zp,at as Bp,ae as Fp,aj as Vp,k as Hp,ar as ku,au as Wp,av as Up,A as Su,aw as ht,ax as qp,ay as Kp,az as Jp,n as Gp}from"./agent-icon-BnuD7OG4.js";import{t as Qs}from"./Stars01-Dw5HzSvc.js";import{i as vu,b as Lr}from"./XCircle-rnvB6r1o.js";import{i as Yo}from"./Check-C6CkZg9-.js";import{i as ua}from"./ChevronRight-Bl_yFHrD.js";import{a as wu}from"./Copy01-q1_4xSoT.js";import{b as Ut,t as Qo,c as da}from"./format-time-BnbuEtat.js";import{u as Cu}from"./use-copy-CvJ-3ij0.js";import{T as pn,a as mn,b as gn}from"./tooltip-oF2dxKvS.js";import{M as Zo,I as Tu,F as Xp}from"./file-type-icon-CrZXGPZz.js";import{c as Yp}from"./monaco-editor-DBrHXynI.js";import{g as Nu,M as Qp}from"./index-Iu2z9rV5.js";import{S as Zp,h as Kn,m as em,c as el,d as tm,b as nm}from"./chat-context-CbliNlff.js";import{c as rm,r as sm,R as im}from"./hooks-Lb4O_GM3.js";import{f as om,n as lm,o as am}from"./tab-id-bb-jjgGv.js";import{i as Mu}from"./AlertCircle-BTBypCdn.js";import{s as cm}from"./Eye-BkqHAYFU.js";import{s as ss,t as Eu}from"./Star01-BhWhGrZ_.js";import{s as um}from"./XClose-Dq50L0Ca.js";import{n as ro}from"./ZapSquare-DyWoH3ti.js";import{n as Au,i as dm}from"./Globe01-C_XmMjFu.js";import{d as fm,c as hm,a as _r}from"./Tool01-BI49uxz7.js";import{i as fa,a as pm}from"./ZoomOut-CumCWj6X.js";import{i as ir}from"./Monitor01-D7y4Pb1B.js";import{i as mm}from"./SearchMd-D002K9LO.js";import{i as gm}from"./Upload01-0ls4OKAV.js";import{u as xm,a as ym}from"./shell-layout-CcwCsF5D.js";import{n as ju}from"./LinkExternal01-DLTXWmjD.js";import{I as Gt}from"./integration-icon-C9eGFf17.js";import{i as bm}from"./ArrowUpRight-sV3vc65w.js";import{a as tl}from"./Users03-DMqPwFCP.js";import{a as pt}from"./Palette-D82zDHT4.js";import{c as Iu}from"./use-navigate-to-agent-CN7_pj2K.js";import{a as km}from"./Stars02-eG3W6QRG.js";import{g as Sm}from"./AreaChart-BhX94NDH.js";import{a as vm,D as wm,c as Cm,d as Tm,e as Nm}from"./dialog-CzzC6F62.js";import{a as Mm,F as Em,b as Am,c as jm,d as Im,f as Om}from"./form-Bezqbf8w.js";import{I as Rm}from"./input-CdzdWrKi.js";const Dm={openrouter:n=>{const e=n?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Ou(n){if(!n?.providerMetadata)return 0;for(const e of Object.values(Dm)){const t=e(n.providerMetadata);if(t!==null)return t}return 0}function Ru(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Du(n,e){if(!e)return n;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:n.inputTokens+(e.inputTokens??0),outputTokens:n.outputTokens+(e.outputTokens??0),reasoningTokens:n.reasoningTokens+(e.reasoningTokens??0),totalTokens:n.totalTokens+(e.totalTokens??0),cost:n.cost+Ou(e),cacheReadTokens:n.cacheReadTokens+t,cacheWriteTokens:n.cacheWriteTokens+r}}function yT(n){return n.reduce((e,t)=>Du(e,t.metadata?.usage),Ru())}const Pm={damping:.7,stiffness:.05,mass:1.25},Lm=70,_m=1e3/60,$m=350;let Zs=!1;globalThis.document?.addEventListener("mousedown",()=>{Zs=!0});globalThis.document?.addEventListener("mouseup",()=>{Zs=!1});globalThis.document?.addEventListener("click",()=>{Zs=!1});const zm=(n={})=>{const[e,t]=E.useState(!1),[r,s]=E.useState(n.initial!==!1),[i,o]=E.useState(!1),l=E.useRef(null);l.current=n;const a=E.useCallback(()=>{if(!Zs)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),c=E.useCallback(b=>{d.isAtBottom=b,s(b)},[]),u=E.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=E.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:S}=getComputedStyle(x.current);S!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,S!=="auto"&&(x.current.style.scrollBehavior=S)}},get targetScrollTop(){return!x.current||!y.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!n.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const S=Math.max(Math.min(n.targetScrollTop(k,{scrollElement:x.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:S},requestAnimationFrame(()=>{b=void 0}),S},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Lm}}},[]),f=E.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const k=Date.now()+(Number(b.wait)||0),S=wi(l.current,b.animation),{ignoreEscapes:v=!1}=b;let C,w=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{C=Date.now()}):C=k+(b.duration??0);const T=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:M}=d,j=performance.now(),O=(j-(d.lastTick??j))/_m;if(d.animation||(d.animation={behavior:S,promise:N,ignoreEscapes:v}),d.animation.behavior===S&&(d.lastTick=j),a()||k>Date.now())return T();if(M<Math.min(w,d.calculatedTargetScrollTop)){if(d.animation?.behavior===S){if(S==="instant")return d.scrollTop=d.calculatedTargetScrollTop,T();d.velocity=(S.damping*d.velocity+S.stiffness*d.scrollDifference)/S.mass,d.accumulated+=d.velocity*O,d.scrollTop+=d.accumulated,d.scrollTop!==M&&(d.accumulated=0)}return T()}return C>Date.now()?(w=d.calculatedTargetScrollTop,T()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:wi(l.current,l.current.resize),ignoreEscapes:v,duration:Math.max(0,C-Date.now())||void 0}):d.isAtBottom)});return N.then(M=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),M))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===S?d.animation.promise:T()},[c,a,d]),h=E.useCallback(()=>{u(!0),c(!1)},[u,c]),m=E.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:S}=d;let{lastScrollTop:v=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,S&&S>k&&(v=S),o(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===S)return;if(a()){u(!0),c(!1);return}const C=k>v,w=k<v;if(d.animation?.ignoreEscapes){d.scrollTop=v;return}w&&(u(!0),c(!1)),C&&u(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[u,c,a,d]),g=E.useCallback(({target:b,deltaY:k})=>{let S=b;for(;!["scroll","auto"].includes(getComputedStyle(S).overflow);){if(!S.parentElement)return;S=S.parentElement}S===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),c(!1))},[u,c,d]),x=ha(b=>{x.current?.removeEventListener("scroll",m),x.current?.removeEventListener("wheel",g),b?.addEventListener("scroll",m,{passive:!0}),b?.addEventListener("wheel",g,{passive:!0})},[]),y=ha(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([S])=>{const{height:v}=S.contentRect,C=v-(k??v);if(d.resizeDifference=C,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),o(d.isNearBottom),C>=0){const w=wi(l.current,k?l.current.resize:l.current.initial);f({animation:w,wait:!0,preserveScrollPosition:!0,duration:w==="instant"?void 0:$m})}else d.isNearBottom&&(u(!1),c(!0));k=v,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===C&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:x,scrollToBottom:f,stopScroll:h,isAtBottom:r||i,isNearBottom:i,escapedFromLock:e,state:d}};function ha(n,e){const t=E.useCallback(r=>(t.current=r,n(r)),e);return t}const vi=new Map;function wi(...n){const e={...Pm};let t=!1;for(const s of n){if(s==="instant"){t=!0;continue}typeof s=="object"&&(t=!1,e.damping=s.damping??e.damping,e.stiffness=s.stiffness??e.stiffness,e.mass=s.mass??e.mass)}const r=JSON.stringify(e);return vi.has(r)||vi.set(r,Object.freeze(e)),t?"instant":vi.get(r)}function Bm(n){return n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function nl(n){if(n&&typeof n=="object"&&"gatewayClientId"in n&&typeof n.gatewayClientId=="string")return n.gatewayClientId}function rl(n,e){if(!e)return n;const t=`${Bm(e)}_`;return n.startsWith(t)?n.slice(t.length):n}function Fm(n,e){return rl(n,e).replace(/[_-]/g," ").toLowerCase()}function Vm(n){const e={};for(const t of n.arguments??[])e[t.name]=t.required?la().min(1,"Required"):la();return eu(e)}function Hm(n,e){const t={};for(const r of n.arguments??[])t[r.name]=e?.[r.name]??"";return t}function Wm(n){const e=L.c(66),{prompt:t,setPrompt:r,onSubmit:s,defaultValues:i}=n,o=E.useId();let l;if(e[0]!==t){const z=t?Vm(t):eu({});l=rp(z),e[0]=t,e[1]=l}else l=e[1];const c=l;let u;e[2]!==i||e[3]!==t?(u=t?Hm(t,i):{},e[2]=i,e[3]=t,e[4]=u):u=e[4];let d;e[5]!==c||e[6]!==u?(d={resolver:c,defaultValues:u,mode:"onChange"},e[5]=c,e[6]=u,e[7]=d):d=e[7];const f=sp(d);let h;e[8]!==t?.arguments?(h=t?.arguments??[],e[8]=t?.arguments,e[9]=h):h=e[9];const m=h;let g;e[10]!==f||e[11]!==s||e[12]!==r?(g=async z=>{await s(z),r(null),f.reset()},e[10]=f,e[11]=s,e[12]=r,e[13]=g):g=e[13];const x=g;let y;e[14]!==f||e[15]!==r?(y=z=>{z||(f.reset(),r(null))},e[14]=f,e[15]=r,e[16]=y):y=e[16];const b=y;if(!t)return null;let k;e[17]!==t._meta||e[18]!==t.name||e[19]!==t.title?(k=t.title||Fm(t.name,nl(t._meta)),e[17]=t._meta,e[18]=t.name,e[19]=t.title,e[20]=k):k=e[20];let S;e[21]!==k?(S=p.jsx(vm,{children:p.jsx("span",{className:"capitalize",children:k})}),e[21]=k,e[22]=S):S=e[22];let v;e[23]!==t.description?(v=t.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[23]=t.description,e[24]=v):v=e[24];let C;e[25]!==v||e[26]!==S?(C=p.jsxs(wm,{children:[S,v]}),e[25]=v,e[26]=S,e[27]=C):C=e[27];let w;e[28]!==f||e[29]!==x?(w=z=>{z.stopPropagation(),f.handleSubmit(x)(z)},e[28]=f,e[29]=x,e[30]=w):w=e[30];let T;if(e[31]!==m||e[32]!==f.control||e[33]!==f.formState.isSubmitting){let z;e[35]!==f.control||e[36]!==f.formState.isSubmitting?(z=B=>p.jsx(Em,{control:f.control,name:B.name,render:q=>{const{field:J}=q;return p.jsxs(Am,{children:[p.jsxs(jm,{className:"text-xs",children:[B.name,B.required?null:p.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),p.jsx(Im,{children:p.jsx(Rm,{...J,value:J.value??"",required:B.required,placeholder:B.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),p.jsx(Om,{})]})}},B.name),e[35]=f.control,e[36]=f.formState.isSubmitting,e[37]=z):z=e[37],T=m.map(z),e[31]=m,e[32]=f.control,e[33]=f.formState.isSubmitting,e[34]=T}else T=e[34];let N;e[38]!==b?(N=()=>b(!1),e[38]=b,e[39]=N):N=e[39];let M;e[40]!==f.formState.isSubmitting||e[41]!==N?(M=p.jsx(mt,{type:"button",variant:"ghost",onClick:N,disabled:f.formState.isSubmitting,children:"Cancel"}),e[40]=f.formState.isSubmitting,e[41]=N,e[42]=M):M=e[42];let j;e[43]!==f.formState.isSubmitting?(j=f.formState.isSubmitting?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(Zp,{size:"xs"}),"Loading..."]}):"Use prompt",e[43]=f.formState.isSubmitting,e[44]=j):j=e[44];let O;e[45]!==f.formState.isSubmitting||e[46]!==o||e[47]!==j?(O=p.jsx(mt,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:j}),e[45]=f.formState.isSubmitting,e[46]=o,e[47]=j,e[48]=O):O=e[48];let A;e[49]!==M||e[50]!==O?(A=p.jsxs(Cm,{children:[M,O]}),e[49]=M,e[50]=O,e[51]=A):A=e[51];let R;e[52]!==o||e[53]!==w||e[54]!==T||e[55]!==A?(R=p.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:w,children:[T,A]}),e[52]=o,e[53]=w,e[54]=T,e[55]=A,e[56]=R):R=e[56];let I;e[57]!==f||e[58]!==R?(I=p.jsx(Mm,{...f,children:R}),e[57]=f,e[58]=R,e[59]=I):I=e[59];let _;e[60]!==C||e[61]!==I?(_=p.jsxs(Tm,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[C,I]}),e[60]=C,e[61]=I,e[62]=_):_=e[62];let $;return e[63]!==b||e[64]!==_?($=p.jsx(Nm,{open:!0,onOpenChange:b,children:_}),e[63]=b,e[64]=_,e[65]=$):$=e[65],$}function Pu(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function ct(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 Jn(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 Oe(n){this.content=n}Oe.prototype={constructor:Oe,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,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new Oe(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Oe(t)},addToStart:function(n,e){return new Oe([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Oe(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new Oe(s)},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=Oe.from(n),n.size?new Oe(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Oe.from(n),n.size?new Oe(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Oe.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}};Oe.from=function(n){if(n instanceof Oe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Oe(e)};function Lu(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Lu(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function _u(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=_u(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class D{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,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new D(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new D(r,s)}cutByIndex(e,t){return e==t?D.empty:e==0&&t==this.content.length?this:new D(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new D(s,i)}addToStart(e){return new D([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new D(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 s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Lu(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return _u(this,e,t,r)}findIndex(e){if(e==0)return $r(0,e);if(e==this.size)return $r(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 s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?$r(t+1,i):$r(t,r);r=i}}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 D.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new D(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return D.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new D(t||e,r)}static from(e){if(!e)return D.empty;if(e instanceof D)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new D([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}D.empty=new D([],0);const Ci={index:0,offset:0};function $r(n,e){return Ci.index=n,Ci.offset=e,Ci}function is(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(!is(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!is(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let fe=class so{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}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&&is(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 s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}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 so.none;if(e instanceof so)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};fe.none=[];class ls extends Error{}class F{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=zu(this.content,e+this.openStart,t);return r&&new F(r,this.openStart,this.openEnd)}removeBetween(e,t){return new F($u(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 F.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new F(D.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new F(e,r,s)}}F.empty=new F(D.empty,0,0);function $u(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy($u(i.content,e-s-1,t-s-1)))}function zu(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=zu(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function Um(n,e,t){if(t.openStart>n.depth)throw new ls("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new ls("Inconsistent open depths");return Bu(n,e,t,0)}function Bu(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Bu(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return cn(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=qm(t,n);return cn(i,Vu(n,o,l,e,r))}else return cn(i,as(n,e,r))}function Fu(n,e){if(!e.type.compatibleContent(n.type))throw new ls("Cannot join "+e.type.name+" onto "+n.type.name)}function io(n,e,t){let r=n.node(t);return Fu(r,e.node(t)),r}function an(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 or(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(an(n.nodeAfter,r),i++));for(let l=i;l<o;l++)an(s.child(l),r);e&&e.depth==t&&e.textOffset&&an(e.nodeBefore,r)}function cn(n,e){return n.type.checkContent(e),n.copy(e)}function Vu(n,e,t,r,s){let i=n.depth>s&&io(n,e,s+1),o=r.depth>s&&io(t,r,s+1),l=[];return or(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Fu(i,o),an(cn(i,Vu(n,e,t,r,s+1)),l)):(i&&an(cn(i,as(n,e,s+1)),l),or(e,t,s,l),o&&an(cn(o,as(t,r,s+1)),l)),or(r,null,s,l),new D(l)}function as(n,e,t){let r=[];if(or(null,n,t,r),n.depth>t){let s=io(n,e,t+1);an(cn(s,as(n,e,t+1)),r)}return or(e,null,t,r),new D(r)}function qm(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(D.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class xr{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],s=e.child(t);return r?e.child(t).cut(r):s}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],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return fe.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].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 cs(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=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new xr(t,r,i)}static resolveCached(e,t){let r=pa.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else pa.set(e,r=new Km);let s=r.elts[r.i]=xr.resolve(e,t);return r.i=(r.i+1)%Jm,s}}class Km{constructor(){this.elts=[],this.i=0}}const Jm=12,pa=new WeakMap;class cs{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 Gm=Object.create(null);class at{constructor(e,t,r,s=fe.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||D.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,s=0){this.content.nodesBetween(e,t,r,s,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,s){return this.content.textBetween(e,t,r,s)}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&&is(this.attrs,t||e.defaultAttrs||Gm)&&fe.sameSet(this.marks,r||fe.none)}copy(e=null){return e==this.content?this:new at(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new at(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 F.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new F(c,s.depth-o,i.depth-o)}replace(e,t,r){return Um(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+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 s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return xr.resolveCached(this,e)}resolveNoCache(e){return xr.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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()+")"),Hu(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=D.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=fe.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(!fe.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 s=D.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}at.prototype.text=void 0;class us extends at{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Hu(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 us(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new us(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 Hu(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class xn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Xm(e,t);if(r.next==null)return xn.empty;let s=Wu(r);r.next&&r.err("Unexpected trailing text");let i=rg(ng(s));return sg(i,r),i}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 s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}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 s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return D.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(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 s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
1
|
+
import{r as E,c as L,H as eu,J as rp,M as sp,j as p,B as mt,I as la,bJ as tu,bK as ip,at as op,aM as hn,bL as lp,l as Z,p as ap,aR as cp,aO as Jt,aV as up,aU as Bt,ba as Ar,aS as vn,bM as nu,aQ as ru,C as Mt,n as dp,d as fp,K as nt,t as eo,m as jr,b as qn,E as su,aL as iu,bN as Uo,aT as hp,bO as tn}from"./index-B7P3JFfk.js";import{e as pp,a as mp,b as gp,c as xp,d as Pr,S as yp}from"./select-Dj2K5yjy.js";import{u as ou}from"./useInfiniteQuery-BngKVfqj.js";import{a as lu,u as bp}from"./use-connection-xe5-hxnX.js";import{c as kp,u as qo}from"./use-mcp-client-PGzywnDQ.js";import{u as Sp}from"./use-virtual-mcp-BL4Oe6kY.js";import{b as vp,i as wp,a as Cp,S as Tp}from"./constants-D_FQAPnt.js";import{C as Np}from"./card-BIUOZmk3.js";import{o as au,m as cu,p as Ko,q as Jo}from"./sidebar-ChFVldq8.js";import{c as uu,d as du,a as Ys,e as Qe,b as fu,T as Ze}from"./table-C5lMn_VP.js";import{E as to}from"./empty-state-Cayxj40G.js";import{u as Go}from"./use-infinite-scroll-C4aMXL06.js";import{u as Mp}from"./use-members-DdZYx5_m.js";import{u as hu,S as Pn}from"./use-clock-tick-TVfDewP_.js";import{e as Ep}from"./use-automations-To6FeF4j.js";import{u as pu}from"./studio-tools-ClbHxQRS.js";import{u as Ap}from"./useSuspenseInfiniteQuery-k9Ynp2wC.js";import{B as rs}from"./badge-BpKhJajf.js";import{C as aa}from"./checkbox-GDMFBUJd.js";import{t as Ln}from"./ChevronDown-BnmgLMQp.js";import{b as jp,C as Ip,a as ca,c as Op,e as Rp,d as Dp}from"./command-B3AQHji-.js";import{P as mu,a as gu,b as xu}from"./popover-RMDOVNrN.js";import{A as yu}from"./avatar-Bs7NAfc8.js";import{n as no}from"./ChevronUp-BMWZkFCK.js";import{t as Pp,a as bu,n as Xo}from"./Tool02-svmJaQQ3.js";import{i as Lp}from"./FilterLines-B5ne1C-E.js";import{f as _p,Y as $p,w as zp,at as Bp,ae as Fp,aj as Vp,k as Hp,ar as ku,au as Wp,av as Up,A as Su,aw as ht,ax as qp,ay as Kp,az as Jp,n as Gp}from"./agent-icon-DLC1L_Hk.js";import{t as Qs}from"./Stars01-CIY0Cbdf.js";import{i as vu,b as Lr}from"./XCircle-wrtOXX8g.js";import{i as Yo}from"./Check-Cs_nz_11.js";import{i as ua}from"./ChevronRight-BmpzEjlZ.js";import{a as wu}from"./Copy01-BBSGxvvU.js";import{b as Ut,t as Qo,c as da}from"./format-time-BnbuEtat.js";import{u as Cu}from"./use-copy-CNVRhlMf.js";import{T as pn,a as mn,b as gn}from"./tooltip-y-gJd0JC.js";import{M as Zo,I as Tu,F as Xp}from"./file-type-icon-Bu9aeBGQ.js";import{c as Yp}from"./monaco-editor-o1-X26EN.js";import{g as Nu,M as Qp}from"./index-DzPkLC_J.js";import{S as Zp,h as Kn,m as em,c as el,d as tm,b as nm}from"./chat-context-BGrFDOtM.js";import{c as rm,r as sm,R as im}from"./hooks-BXniOJ3o.js";import{f as om,n as lm,o as am}from"./tab-id-bb-jjgGv.js";import{i as Mu}from"./AlertCircle-2jdjwXod.js";import{s as cm}from"./Eye-CxXCNp9x.js";import{s as ss,t as Eu}from"./Star01-C6gIUnMC.js";import{s as um}from"./XClose-BWDuYgYR.js";import{n as ro}from"./ZapSquare-Cn0geoo-.js";import{n as Au,i as dm}from"./Globe01-CWT8cfe0.js";import{d as fm,c as hm,a as _r}from"./Tool01-ZnHDW7TB.js";import{i as fa,a as pm}from"./ZoomOut-lcIrQxM0.js";import{i as ir}from"./Monitor01-_dxOwg-V.js";import{i as mm}from"./SearchMd-BwPBMv_I.js";import{i as gm}from"./Upload01-TtI1kXpP.js";import{u as xm,a as ym}from"./shell-layout-BI2uQO13.js";import{n as ju}from"./LinkExternal01-BeHPDO-A.js";import{I as Gt}from"./integration-icon-CZz-QSyi.js";import{i as bm}from"./ArrowUpRight-B-SX4ds9.js";import{a as tl}from"./Users03-fKd2nbn9.js";import{a as pt}from"./Palette-_Bxr-_IA.js";import{c as Iu}from"./use-navigate-to-agent-CBtoRE_I.js";import{a as km}from"./Stars02-CaKsPC1S.js";import{g as Sm}from"./AreaChart-ChGdNg__.js";import{a as vm,D as wm,c as Cm,d as Tm,e as Nm}from"./dialog-CxIxeX9C.js";import{a as Mm,F as Em,b as Am,c as jm,d as Im,f as Om}from"./form-BBxIjEr6.js";import{I as Rm}from"./input-BUDeW7hy.js";const Dm={openrouter:n=>{const e=n?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Ou(n){if(!n?.providerMetadata)return 0;for(const e of Object.values(Dm)){const t=e(n.providerMetadata);if(t!==null)return t}return 0}function Ru(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Du(n,e){if(!e)return n;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:n.inputTokens+(e.inputTokens??0),outputTokens:n.outputTokens+(e.outputTokens??0),reasoningTokens:n.reasoningTokens+(e.reasoningTokens??0),totalTokens:n.totalTokens+(e.totalTokens??0),cost:n.cost+Ou(e),cacheReadTokens:n.cacheReadTokens+t,cacheWriteTokens:n.cacheWriteTokens+r}}function yT(n){return n.reduce((e,t)=>Du(e,t.metadata?.usage),Ru())}const Pm={damping:.7,stiffness:.05,mass:1.25},Lm=70,_m=1e3/60,$m=350;let Zs=!1;globalThis.document?.addEventListener("mousedown",()=>{Zs=!0});globalThis.document?.addEventListener("mouseup",()=>{Zs=!1});globalThis.document?.addEventListener("click",()=>{Zs=!1});const zm=(n={})=>{const[e,t]=E.useState(!1),[r,s]=E.useState(n.initial!==!1),[i,o]=E.useState(!1),l=E.useRef(null);l.current=n;const a=E.useCallback(()=>{if(!Zs)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),c=E.useCallback(b=>{d.isAtBottom=b,s(b)},[]),u=E.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=E.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:S}=getComputedStyle(x.current);S!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,S!=="auto"&&(x.current.style.scrollBehavior=S)}},get targetScrollTop(){return!x.current||!y.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!n.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const S=Math.max(Math.min(n.targetScrollTop(k,{scrollElement:x.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:S},requestAnimationFrame(()=>{b=void 0}),S},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Lm}}},[]),f=E.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const k=Date.now()+(Number(b.wait)||0),S=wi(l.current,b.animation),{ignoreEscapes:v=!1}=b;let C,w=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{C=Date.now()}):C=k+(b.duration??0);const T=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:M}=d,j=performance.now(),O=(j-(d.lastTick??j))/_m;if(d.animation||(d.animation={behavior:S,promise:N,ignoreEscapes:v}),d.animation.behavior===S&&(d.lastTick=j),a()||k>Date.now())return T();if(M<Math.min(w,d.calculatedTargetScrollTop)){if(d.animation?.behavior===S){if(S==="instant")return d.scrollTop=d.calculatedTargetScrollTop,T();d.velocity=(S.damping*d.velocity+S.stiffness*d.scrollDifference)/S.mass,d.accumulated+=d.velocity*O,d.scrollTop+=d.accumulated,d.scrollTop!==M&&(d.accumulated=0)}return T()}return C>Date.now()?(w=d.calculatedTargetScrollTop,T()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:wi(l.current,l.current.resize),ignoreEscapes:v,duration:Math.max(0,C-Date.now())||void 0}):d.isAtBottom)});return N.then(M=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),M))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===S?d.animation.promise:T()},[c,a,d]),h=E.useCallback(()=>{u(!0),c(!1)},[u,c]),m=E.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:S}=d;let{lastScrollTop:v=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,S&&S>k&&(v=S),o(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===S)return;if(a()){u(!0),c(!1);return}const C=k>v,w=k<v;if(d.animation?.ignoreEscapes){d.scrollTop=v;return}w&&(u(!0),c(!1)),C&&u(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[u,c,a,d]),g=E.useCallback(({target:b,deltaY:k})=>{let S=b;for(;!["scroll","auto"].includes(getComputedStyle(S).overflow);){if(!S.parentElement)return;S=S.parentElement}S===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),c(!1))},[u,c,d]),x=ha(b=>{x.current?.removeEventListener("scroll",m),x.current?.removeEventListener("wheel",g),b?.addEventListener("scroll",m,{passive:!0}),b?.addEventListener("wheel",g,{passive:!0})},[]),y=ha(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([S])=>{const{height:v}=S.contentRect,C=v-(k??v);if(d.resizeDifference=C,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),o(d.isNearBottom),C>=0){const w=wi(l.current,k?l.current.resize:l.current.initial);f({animation:w,wait:!0,preserveScrollPosition:!0,duration:w==="instant"?void 0:$m})}else d.isNearBottom&&(u(!1),c(!0));k=v,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===C&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:x,scrollToBottom:f,stopScroll:h,isAtBottom:r||i,isNearBottom:i,escapedFromLock:e,state:d}};function ha(n,e){const t=E.useCallback(r=>(t.current=r,n(r)),e);return t}const vi=new Map;function wi(...n){const e={...Pm};let t=!1;for(const s of n){if(s==="instant"){t=!0;continue}typeof s=="object"&&(t=!1,e.damping=s.damping??e.damping,e.stiffness=s.stiffness??e.stiffness,e.mass=s.mass??e.mass)}const r=JSON.stringify(e);return vi.has(r)||vi.set(r,Object.freeze(e)),t?"instant":vi.get(r)}function Bm(n){return n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function nl(n){if(n&&typeof n=="object"&&"gatewayClientId"in n&&typeof n.gatewayClientId=="string")return n.gatewayClientId}function rl(n,e){if(!e)return n;const t=`${Bm(e)}_`;return n.startsWith(t)?n.slice(t.length):n}function Fm(n,e){return rl(n,e).replace(/[_-]/g," ").toLowerCase()}function Vm(n){const e={};for(const t of n.arguments??[])e[t.name]=t.required?la().min(1,"Required"):la();return eu(e)}function Hm(n,e){const t={};for(const r of n.arguments??[])t[r.name]=e?.[r.name]??"";return t}function Wm(n){const e=L.c(66),{prompt:t,setPrompt:r,onSubmit:s,defaultValues:i}=n,o=E.useId();let l;if(e[0]!==t){const z=t?Vm(t):eu({});l=rp(z),e[0]=t,e[1]=l}else l=e[1];const c=l;let u;e[2]!==i||e[3]!==t?(u=t?Hm(t,i):{},e[2]=i,e[3]=t,e[4]=u):u=e[4];let d;e[5]!==c||e[6]!==u?(d={resolver:c,defaultValues:u,mode:"onChange"},e[5]=c,e[6]=u,e[7]=d):d=e[7];const f=sp(d);let h;e[8]!==t?.arguments?(h=t?.arguments??[],e[8]=t?.arguments,e[9]=h):h=e[9];const m=h;let g;e[10]!==f||e[11]!==s||e[12]!==r?(g=async z=>{await s(z),r(null),f.reset()},e[10]=f,e[11]=s,e[12]=r,e[13]=g):g=e[13];const x=g;let y;e[14]!==f||e[15]!==r?(y=z=>{z||(f.reset(),r(null))},e[14]=f,e[15]=r,e[16]=y):y=e[16];const b=y;if(!t)return null;let k;e[17]!==t._meta||e[18]!==t.name||e[19]!==t.title?(k=t.title||Fm(t.name,nl(t._meta)),e[17]=t._meta,e[18]=t.name,e[19]=t.title,e[20]=k):k=e[20];let S;e[21]!==k?(S=p.jsx(vm,{children:p.jsx("span",{className:"capitalize",children:k})}),e[21]=k,e[22]=S):S=e[22];let v;e[23]!==t.description?(v=t.description&&p.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[23]=t.description,e[24]=v):v=e[24];let C;e[25]!==v||e[26]!==S?(C=p.jsxs(wm,{children:[S,v]}),e[25]=v,e[26]=S,e[27]=C):C=e[27];let w;e[28]!==f||e[29]!==x?(w=z=>{z.stopPropagation(),f.handleSubmit(x)(z)},e[28]=f,e[29]=x,e[30]=w):w=e[30];let T;if(e[31]!==m||e[32]!==f.control||e[33]!==f.formState.isSubmitting){let z;e[35]!==f.control||e[36]!==f.formState.isSubmitting?(z=B=>p.jsx(Em,{control:f.control,name:B.name,render:q=>{const{field:J}=q;return p.jsxs(Am,{children:[p.jsxs(jm,{className:"text-xs",children:[B.name,B.required?null:p.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),p.jsx(Im,{children:p.jsx(Rm,{...J,value:J.value??"",required:B.required,placeholder:B.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),p.jsx(Om,{})]})}},B.name),e[35]=f.control,e[36]=f.formState.isSubmitting,e[37]=z):z=e[37],T=m.map(z),e[31]=m,e[32]=f.control,e[33]=f.formState.isSubmitting,e[34]=T}else T=e[34];let N;e[38]!==b?(N=()=>b(!1),e[38]=b,e[39]=N):N=e[39];let M;e[40]!==f.formState.isSubmitting||e[41]!==N?(M=p.jsx(mt,{type:"button",variant:"ghost",onClick:N,disabled:f.formState.isSubmitting,children:"Cancel"}),e[40]=f.formState.isSubmitting,e[41]=N,e[42]=M):M=e[42];let j;e[43]!==f.formState.isSubmitting?(j=f.formState.isSubmitting?p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(Zp,{size:"xs"}),"Loading..."]}):"Use prompt",e[43]=f.formState.isSubmitting,e[44]=j):j=e[44];let O;e[45]!==f.formState.isSubmitting||e[46]!==o||e[47]!==j?(O=p.jsx(mt,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:j}),e[45]=f.formState.isSubmitting,e[46]=o,e[47]=j,e[48]=O):O=e[48];let A;e[49]!==M||e[50]!==O?(A=p.jsxs(Cm,{children:[M,O]}),e[49]=M,e[50]=O,e[51]=A):A=e[51];let R;e[52]!==o||e[53]!==w||e[54]!==T||e[55]!==A?(R=p.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:w,children:[T,A]}),e[52]=o,e[53]=w,e[54]=T,e[55]=A,e[56]=R):R=e[56];let I;e[57]!==f||e[58]!==R?(I=p.jsx(Mm,{...f,children:R}),e[57]=f,e[58]=R,e[59]=I):I=e[59];let _;e[60]!==C||e[61]!==I?(_=p.jsxs(Tm,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[C,I]}),e[60]=C,e[61]=I,e[62]=_):_=e[62];let $;return e[63]!==b||e[64]!==_?($=p.jsx(Nm,{open:!0,onOpenChange:b,children:_}),e[63]=b,e[64]=_,e[65]=$):$=e[65],$}function Pu(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function ct(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 Jn(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 Oe(n){this.content=n}Oe.prototype={constructor:Oe,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,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new Oe(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Oe(t)},addToStart:function(n,e){return new Oe([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Oe(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new Oe(s)},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=Oe.from(n),n.size?new Oe(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Oe.from(n),n.size?new Oe(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Oe.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}};Oe.from=function(n){if(n instanceof Oe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Oe(e)};function Lu(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Lu(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function _u(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=_u(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class D{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,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new D(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new D(r,s)}cutByIndex(e,t){return e==t?D.empty:e==0&&t==this.content.length?this:new D(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new D(s,i)}addToStart(e){return new D([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new D(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 s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Lu(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return _u(this,e,t,r)}findIndex(e){if(e==0)return $r(0,e);if(e==this.size)return $r(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 s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?$r(t+1,i):$r(t,r);r=i}}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 D.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new D(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return D.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new D(t||e,r)}static from(e){if(!e)return D.empty;if(e instanceof D)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new D([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}D.empty=new D([],0);const Ci={index:0,offset:0};function $r(n,e){return Ci.index=n,Ci.offset=e,Ci}function is(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(!is(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!is(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let fe=class so{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}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&&is(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 s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}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 so.none;if(e instanceof so)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};fe.none=[];class ls extends Error{}class F{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=zu(this.content,e+this.openStart,t);return r&&new F(r,this.openStart,this.openEnd)}removeBetween(e,t){return new F($u(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 F.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new F(D.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new F(e,r,s)}}F.empty=new F(D.empty,0,0);function $u(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy($u(i.content,e-s-1,t-s-1)))}function zu(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=zu(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function Um(n,e,t){if(t.openStart>n.depth)throw new ls("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new ls("Inconsistent open depths");return Bu(n,e,t,0)}function Bu(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Bu(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return cn(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=qm(t,n);return cn(i,Vu(n,o,l,e,r))}else return cn(i,as(n,e,r))}function Fu(n,e){if(!e.type.compatibleContent(n.type))throw new ls("Cannot join "+e.type.name+" onto "+n.type.name)}function io(n,e,t){let r=n.node(t);return Fu(r,e.node(t)),r}function an(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 or(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(an(n.nodeAfter,r),i++));for(let l=i;l<o;l++)an(s.child(l),r);e&&e.depth==t&&e.textOffset&&an(e.nodeBefore,r)}function cn(n,e){return n.type.checkContent(e),n.copy(e)}function Vu(n,e,t,r,s){let i=n.depth>s&&io(n,e,s+1),o=r.depth>s&&io(t,r,s+1),l=[];return or(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Fu(i,o),an(cn(i,Vu(n,e,t,r,s+1)),l)):(i&&an(cn(i,as(n,e,s+1)),l),or(e,t,s,l),o&&an(cn(o,as(t,r,s+1)),l)),or(r,null,s,l),new D(l)}function as(n,e,t){let r=[];if(or(null,n,t,r),n.depth>t){let s=io(n,e,t+1);an(cn(s,as(n,e,t+1)),r)}return or(e,null,t,r),new D(r)}function qm(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(D.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class xr{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],s=e.child(t);return r?e.child(t).cut(r):s}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],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return fe.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].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 cs(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=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new xr(t,r,i)}static resolveCached(e,t){let r=pa.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else pa.set(e,r=new Km);let s=r.elts[r.i]=xr.resolve(e,t);return r.i=(r.i+1)%Jm,s}}class Km{constructor(){this.elts=[],this.i=0}}const Jm=12,pa=new WeakMap;class cs{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 Gm=Object.create(null);class at{constructor(e,t,r,s=fe.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||D.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,s=0){this.content.nodesBetween(e,t,r,s,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,s){return this.content.textBetween(e,t,r,s)}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&&is(this.attrs,t||e.defaultAttrs||Gm)&&fe.sameSet(this.marks,r||fe.none)}copy(e=null){return e==this.content?this:new at(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new at(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 F.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new F(c,s.depth-o,i.depth-o)}replace(e,t,r){return Um(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+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 s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return xr.resolveCached(this,e)}resolveNoCache(e){return xr.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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()+")"),Hu(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=D.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=fe.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(!fe.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 s=D.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}at.prototype.text=void 0;class us extends at{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Hu(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 us(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new us(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 Hu(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class xn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Xm(e,t);if(r.next==null)return xn.empty;let s=Wu(r);r.next&&r.err("Unexpected trailing text");let i=rg(ng(s));return sg(i,r),i}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 s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}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 s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return D.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(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 s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
2
2
|
`)}}xn.empty=new xn(!0);class Xm{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 Wu(n){let e=[];do e.push(Ym(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Ym(n){let e=[];do e.push(Qm(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Qm(n){let e=tg(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=Zm(n,e);else break;return e}function ma(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Zm(n,e){let t=ma(n),r=t;return n.eat(",")&&(n.next!="}"?r=ma(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function eg(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function tg(n){if(n.eat("(")){let e=Wu(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=eg(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 ng(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Uu(n,e){return e-n}function ga(n,e){let t=[];return r(e),t.sort(Uu);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function rg(n){let e=Object.create(null);return t(ga(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);ga(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new xn(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(Uu);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function sg(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function qu(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 Ku(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function Ju(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function Gu(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new og(n,r,e[r]);return t}let xa=class Xu{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=Gu(e,r.attrs),this.defaultAttrs=qu(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==xn.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:Ku(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new at(this,this.computeAttrs(e),D.from(t),fe.setFrom(r))}createChecked(e=null,t,r){return t=D.from(t),this.checkContent(t),new at(this,this.computeAttrs(e),t,fe.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=D.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(D.empty,!0);return i?new at(this,e,t.append(i),fe.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){Ju(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:fe.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new Xu(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function ig(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class og{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?ig(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ei{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=Gu(e,s.attrs),this.excluded=null;let i=qu(this.attrs);this.instance=i?new fe(this,i):null}create(e=null){return!e&&this.instance?this.instance:new fe(this,Ku(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new ei(i,s++,t,o)),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){Ju(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Yu{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=Oe.from(e.nodes),t.marks=Oe.from(e.marks||{}),this.nodes=xa.compile(this.spec.nodes,this),this.marks=ei.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=xn.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?ya(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:ya(this,o.split(" "))}this.nodeFromJSON=s=>at.fromJSON(this,s),this.markFromJSON=s=>fe.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof xa){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,s)}text(e,t){let r=this.nodes.text;return new us(r,r.defaultAttrs,e,fe.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 ya(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function lg(n){return n.tag!=null}function ag(n){return n.style!=null}class Ft{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(lg(s))this.tags.push(s);else if(ag(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new ka(this,t,!1);return r.addAll(e,fe.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new ka(this,t,!0);return r.addAll(e,fe.none,t.from,t.to),F.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(dg(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Sa(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Sa(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ft(e,Ft.schemaRules(e)))}}const Qu={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},cg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Zu={ol:!0,ul:!0},yr=1,oo=2,lr=4;function ba(n,e,t){return e!=null?(e?yr:0)|(e==="full"?oo:0):n&&n.whitespace=="pre"?yr|oo:t&~lr}class zr{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=fe.none,this.match=i||(o&lr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(D.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&yr)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=D.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(D.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&&!Qu.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class ka{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=ba(null,t.preserveWhitespace,0)|(r?lr:0);s?i=new zr(s.type,s.attrs,fe.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new zr(null,null,fe.none,!0,null,o):i=new zr(e.schema.topNodeType,null,fe.none,!0,null,o),this.nodes=[i],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,s=this.top,i=s.options&oo?"full":this.localPreserveWS||(s.options&yr)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Zu.hasOwnProperty(o)&&this.parser.normalizeLists&&ug(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:cg.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Qu.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}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 s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=fe.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):va(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=ba(e,i,o.options);o.options&lr&&o.content.length==0&&(l|=lr);let a=fe.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):va(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new zr(e,t,a,s,null,l)),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|=yr)}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 s=r.length-1;s>=0;s--)e+=r[s].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 s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].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,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(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 ug(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Zu.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function dg(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Sa(n){let e={};for(let t in n)e[t]=n[t];return e}function va(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class wn{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ti(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=Qr(Ti(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Qr(Ti(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return Qr(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new wn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=wa(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return wa(e.marks)}}function wa(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ti(n){return n.document||window.document}const Ca=new WeakMap;function fg(n){let e=Ca.get(n);return e===void 0&&Ca.set(n,e=hg(n)),e}function hg(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 s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Qr(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 s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=fg(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:m}=Qr(n,f,t,r);if(a.appendChild(h),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:a,contentDOM:l}}const ed=65535,td=Math.pow(2,16);function pg(n,e){return n+e*td}function Ta(n){return n&ed}function mg(n){return(n-(n&ed))/td}const nd=1,rd=2,Zr=4,sd=8;class lo{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&sd)>0}get deletedBefore(){return(this.delInfo&(nd|Zr))>0}get deletedAfter(){return(this.delInfo&(rd|Zr))>0}get deletedAcross(){return(this.delInfo&Zr)>0}}class Je{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Je.empty)return Je.empty}recover(e){let t=0,r=Ta(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+mg(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 s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let m=e==(t<0?a:d)?null:pg(l/3,e-a),g=e==a?rd:e==d?nd:Zr;return(t<0?e!=a:e!=d)&&(g|=sd),new lo(h,g,m)}s+=u-c}return r?e+s:new lo(e+s,0,null)}touches(e,t){let r=0,s=Ta(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new Je(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Je.empty:new Je(e<0?[0,-e,0]:[0,0,e])}}Je.empty=new Je([]);class br{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new br(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 s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s: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 s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new br;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 s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new lo(e,s,null)}}const Ni=Object.create(null);class Be{getMap(){return Je.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ni[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 Ni)throw new RangeError("Duplicate use of step JSON ID "+e);return Ni[e]=t,t.prototype.jsonID=e,t}}class Ce{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Ce(e,null)}static fail(e){return new Ce(null,e)}static fromReplace(e,t,r,s){try{return Ce.ok(e.replace(t,r,s))}catch(i){if(i instanceof ls)return Ce.fail(i.message);throw i}}}function sl(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(sl(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return D.fromArray(r)}class _t extends Be{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),s=r.node(r.sharedDepth(this.to)),i=new F(sl(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return Ce.fromReplace(e,this.from,this.to,i)}invert(){return new lt(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 _t(t.pos,r.pos,this.mark)}merge(e){return e instanceof _t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new _t(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 _t(t.from,t.to,e.markFromJSON(t.mark))}}Be.jsonID("addMark",_t);class lt extends Be{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 F(sl(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return Ce.fromReplace(e,this.from,this.to,r)}invert(){return new _t(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 lt(t.pos,r.pos,this.mark)}merge(e){return e instanceof lt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new lt(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 lt(t.from,t.to,e.markFromJSON(t.mark))}}Be.jsonID("removeMark",lt);class $t extends Be{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ce.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Ce.fromReplace(e,this.pos,this.pos+1,new F(D.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 s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new $t(this.pos,t.marks[s]);return new $t(this.pos,this.mark)}}return new yn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new $t(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 $t(t.pos,e.markFromJSON(t.mark))}}Be.jsonID("addNodeMark",$t);class yn extends Be{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ce.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Ce.fromReplace(e,this.pos,this.pos+1,new F(D.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new $t(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new yn(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 yn(t.pos,e.markFromJSON(t.mark))}}Be.jsonID("removeNodeMark",yn);class we extends Be{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&ao(e,this.from,this.to)?Ce.fail("Structure replace would overwrite content"):Ce.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Je([this.from,this.to-this.from,this.slice.size])}invert(e){return new we(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&&we.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new we(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof we)||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?F.empty:new F(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new we(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?F.empty:new F(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new we(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 we(t.from,t.to,F.fromJSON(e,t.slice),!!t.structure)}}we.MAP_BIAS=1;Be.jsonID("replace",we);class Ae extends Be{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(ao(e,this.from,this.gapFrom)||ao(e,this.gapTo,this.to)))return Ce.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ce.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Ce.fromReplace(e,this.from,this.to,r):Ce.fail("Content does not fit in gap")}getMap(){return new Je([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 Ae(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),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new Ae(t.pos,r.pos,s,i,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 Ae(t.from,t.to,t.gapFrom,t.gapTo,F.fromJSON(e,t.slice),t.insert,!!t.structure)}}Be.jsonID("replaceAround",Ae);function ao(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function gg(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),m=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(m)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:s.push(o=new lt(f,h,d[g])));l&&l.to==f?l.to=h:i.push(l=new _t(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function xg(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof ei){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let m=s[h];m.step==i-1&&d.eq(s[h].style)&&(f=m)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new lt(o.from,o.to,o.style)))}function il(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new we(l,u,F.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new lt(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,m;for(;f=h.exec(c.text);)m||(m=new F(D.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new we(l+f.index,l+f.index+f[0].length,m))}}l=u}if(!r.validEnd){let a=r.fillBefore(D.empty,!0);n.replace(l,l,new F(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function yg(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Gn(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!yg(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function bg(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=D.empty,d=0;for(let m=i,g=!1;m>t;m--)g||r.index(m)>0?(g=!0,u=D.from(r.node(m).copy(u)),d++):a--;let f=D.empty,h=0;for(let m=i,g=!1;m>t;m--)g||s.after(m+1)<s.end(m)?(g=!0,f=D.from(s.node(m).copy(f)),h++):c++;n.step(new Ae(a,c,o,l,new F(u.append(f),d,h),u.size-d,!0))}function ol(n,e,t=null,r=n){let s=kg(n,e),i=s&&Sg(r,e);return i?s.map(Na).concat({type:e,attrs:t}).concat(i.map(Na)):null}function Na(n){return{type:n,attrs:null}}function kg(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Sg(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function vg(n,e,t){let r=D.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=D.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new Ae(s,i,s,i,new F(r,0,0),t.length,!0))}function wg(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&Cg(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!m?c=!1:!h&&m&&(c=!0)}c===!1&&od(n,o,l,i),il(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new Ae(d,f,d+1,f-1,new F(D.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&id(n,o,l,i),!1}})}function id(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function od(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-
|
|
1
|
+
import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-B7P3JFfk.js";import{s as q}from"./Plus-5aSNzK4v.js";import{i as S}from"./Zap-CTmOhMPm.js";import{S as D}from"./search-input-CmYReEhV.js";import{P as l}from"./index-DRXYdN6H.js";import{E as b}from"./empty-state-Cayxj40G.js";import{c as O}from"./use-automations-To6FeF4j.js";import{c as V}from"./use-navigate-to-agent-CBtoRE_I.js";import{A as F}from"./automation-list-row-D7B7KBd6.js";import{f as G}from"./constants-D_FQAPnt.js";import{u as H}from"./use-virtual-mcp-BL4Oe6kY.js";import{R as J}from"./require-capability-DpxZpNd6.js";import"./SearchMd-BwPBMv_I.js";import"./sidebar-ChFVldq8.js";import"./LayoutLeft-Ca9h62hv.js";import"./use-mobile-Dku4KQs9.js";import"./X-DToCREjt.js";import"./tooltip-y-gJd0JC.js";import"./use-mcp-client-PGzywnDQ.js";import"./auth-DOYJKEUb.js";import"./studio-tools-ClbHxQRS.js";import"./hooks-BXniOJ3o.js";import"./decopilot-sse-pool-2YgaflpO.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-CvkagUzR.js";import"./dropdown-menu-Bgweaubl.js";import"./Check-Cs_nz_11.js";import"./ChevronRight-BmpzEjlZ.js";import"./Circle-CiIqX-4A.js";import"./Stars02-CaKsPC1S.js";import"./DotsVertical-DPYpow1e.js";import"./Trash01-i_nNUn-v.js";import"./agent-icon-DLC1L_Hk.js";import"./AlertCircle-2jdjwXod.js";import"./Trash03-pVWJ_Sy5.js";import"./Tool01-ZnHDW7TB.js";import"./ArrowUp-Bns359kG.js";import"./Settings02-D0ZIXHKW.js";import"./Tool02-svmJaQQ3.js";import"./XCircle-wrtOXX8g.js";import"./ArrowUpRight-B-SX4ds9.js";import"./TrendUp01-BrvNuhlW.js";import"./ZapSquare-Cn0geoo-.js";import"./Users03-fKd2nbn9.js";import"./CheckCircle-ODzvf2Mk.js";import"./ChevronDown-BnmgLMQp.js";import"./ChevronUp-BMWZkFCK.js";import"./Copy01-BBSGxvvU.js";import"./ZoomOut-lcIrQxM0.js";import"./Globe01-CWT8cfe0.js";import"./Eye-CxXCNp9x.js";import"./FilterLines-B5ne1C-E.js";import"./Star01-C6gIUnMC.js";import"./Globe04-EdxS5i8F.js";import"./SwitchHorizontal01-D0LWZZ0b.js";import"./HardDrive-CyRX8eRE.js";import"./Key01-BVM01BsN.js";import"./LinkExternal01-BeHPDO-A.js";import"./List-vKHfauer.js";import"./Monitor01-_dxOwg-V.js";import"./Sun-Cait_D1T.js";import"./Package-_xGRzdZH.js";import"./Palette-_Bxr-_IA.js";import"./Play-T6Ulwzbi.js";import"./SearchLg-DFE9tDzd.js";import"./Shield01-K8ZclYuH.js";import"./Stars01-CIY0Cbdf.js";import"./Upload01-TtI1kXpP.js";import"./User01-BAWiktf8.js";import"./Users01-41Hv3Ltw.js";import"./XClose-BWDuYgYR.js";import"./use-collections-0g9OhHq7.js";import"./use-capability-yplSlEyH.js";import"./access-gate-BBFl79aB.js";import"./capability-load-error-COHcRrGU.js";function K(){const t=B.c(16),{org:i}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,R=H(),k=V(),d=T(),[f,E]=$.useState(""),g=f.toLowerCase(),y=new Map(R.map(Q)),C=u.filter(e=>{if(!g||e.name.toLowerCase().includes(g))return!0;if(e.virtual_mcp_id){const a=y.get(e.virtual_mcp_id);if(a&&a.title.toLowerCase().includes(g))return!0}return!1}),P=(e,a)=>{const A=a&&y.has(a)?a:G(i.id);N("automations_list_row_clicked",{automation_id:e,agent_id:A,source:"settings_automations"}),k(A,{search:{main:"automation:"+e}})};let n;t[0]!==d||t[1]!==i.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:i.slug}})},t[0]=d,t[1]=i.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:o.jsxs(M,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(e=>o.jsx(F,{automation:e,showAgent:!0,onClick:()=>P(e.id,e.virtual_mcp_id)},e.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let m;t[10]!==h.Content||t[11]!==s?(m=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=m):m=t[12];let c;return t[13]!==x||t[14]!==m?(c=o.jsx(x,{children:m}),t[13]=x,t[14]=m,t[15]=c):c=t[15],c}function Q(t){return[t.id,t]}function jo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(J,{capability:"automations:manage",area:"automations",children:o.jsx(K,{})}),t[0]=i):i=t[0],i}export{jo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as a}from"./index-
|
|
1
|
+
import{D as a}from"./index-B7P3JFfk.js";const i=1e4,m="true";function s(e,t){return a.chatAutosend(e,t)}function d(e){return e==="pending"||e==="sending"}function c(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return!t||typeof t!="object"||typeof t.createdAt!="number"||typeof t.message!="object"||!d(t.status)?null:t}function A(e,t,r,o,u=Date.now()){const n={message:o,createdAt:u,status:"pending"};return e.setItem(s(t,r),JSON.stringify(n)),n}function f(e,t,r){const o=s(t,r),u=c(e.getItem(o));return u||(e.removeItem(o),null)}function S(e,t,r,o=Date.now()){const u=s(t,r),n=f(e,t,r);return!n||n.status!=="pending"?null:o-n.createdAt>=i?(e.removeItem(u),null):(e.setItem(u,JSON.stringify({...n,status:"sending"})),{message:n.message,createdAt:n.createdAt})}function p(e,t,r){e.removeItem(s(t,r))}export{m as A,p as a,S as c,A as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,l as m,bC as R,cI as S,cJ as V,cK as $}from"./index-
|
|
1
|
+
import{c as k,j as i,l as m,bC as R,cI as S,cJ as V,cK as $}from"./index-B7P3JFfk.js";import{s as O}from"./User01-BAWiktf8.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(S,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const I=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function J(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const f=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==f||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:m(_({objectFit:u}))}),i.jsx(M,{className:m(z,"rounded-none"),delayMs:l?600:0,children:f})]}),e[22]=z,e[23]=f,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function K(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let f;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(f=i.jsx(J,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=f):f=e[17],f}K.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{K as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,l as u,j as g,bd as v,bC as b}from"./index-
|
|
1
|
+
import{c as l,l as u,j as g,bd as v,bC as b}from"./index-B7P3JFfk.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=l.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=u(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|