decocms 4.597.0 → 4.598.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-BLw7QvfG.js → AlertCircle-jxvwS2PA.js} +1 -1
- package/dist/client/assets/{AreaChart-Cg0oUTGM.js → AreaChart-zoolaKB0.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DH7F9HYx.js → ArrowLeft-Dlf39oKA.js} +1 -1
- package/dist/client/assets/{ArrowRight-DZeVAIN7.js → ArrowRight-DCL3gp96.js} +1 -1
- package/dist/client/assets/{ArrowUp-C_Mw0uky.js → ArrowUp-BbUoh0-h.js} +1 -1
- package/dist/client/assets/{BookOpen01-9fv3inuR.js → BookOpen01-C85UtDum.js} +1 -1
- package/dist/client/assets/{CartesianChart-B1PjlPEb.js → CartesianChart-Bl1HZv9F.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CcMGdgiC.js → CategoricalChart-jjkJNbxp.js} +1 -1
- package/dist/client/assets/{CheckCircle--1SXoxG_.js → CheckCircle-KztuMvd5.js} +1 -1
- package/dist/client/assets/{ChevronDown-DwO0ALfW.js → ChevronDown-c_BdXEOA.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Bj17dUxw.js → ChevronSelectorVertical-DmpvIgAy.js} +1 -1
- package/dist/client/assets/{ChevronUp-BaiO1bgX.js → ChevronUp-BSWVeXQq.js} +1 -1
- package/dist/client/assets/{CreditCard01-D6jLDMwS.js → CreditCard01-C4dCRCdu.js} +1 -1
- package/dist/client/assets/{Eye-DvcGz393.js → Eye-BSRrcDT9.js} +1 -1
- package/dist/client/assets/{File02-Bes4ATvL.js → File02-KoBPCXEf.js} +1 -1
- package/dist/client/assets/{Fingerprint04-BpB7HSc7.js → Fingerprint04-B2N20uu4.js} +1 -1
- package/dist/client/assets/{Globe04-BBsqVmHb.js → Globe04-UMTQ82HG.js} +1 -1
- package/dist/client/assets/{Image01-D2QOi7x6.js → Image01-BGM1ArTz.js} +1 -1
- package/dist/client/assets/{Key01-CDcaZkCg.js → Key01-BMkzySkS.js} +1 -1
- package/dist/client/assets/{LayoutLeft-19qu82-A.js → LayoutLeft-DrOR8tOg.js} +1 -1
- package/dist/client/assets/{LinkBroken01-Z9hP4zTf.js → LinkBroken01-hoBFLv94.js} +1 -1
- package/dist/client/assets/{MessageCircle01-DjShhQqZ.js → MessageCircle01-CDpj4jpt.js} +1 -1
- package/dist/client/assets/{Minus-ChoEICrx.js → Minus-DdEPrbsD.js} +1 -1
- package/dist/client/assets/{Monitor01-DtssQiym.js → Monitor01-B4iHbF93.js} +1 -1
- package/dist/client/assets/{Play-DatgPxza.js → Play-Clz2e0s4.js} +1 -1
- package/dist/client/assets/{Plus-GSWEwEm-.js → Plus-CO40HUhB.js} +1 -1
- package/dist/client/assets/{ReferenceLine-Cl-8dOcW.js → ReferenceLine-CeSeSzH6.js} +1 -1
- package/dist/client/assets/{SearchMd-DhrJsmFj.js → SearchMd-FI2fcykP.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DQR5ci-Q.js → ShoppingBag01-BBDr_WSy.js} +1 -1
- package/dist/client/assets/{Sun-Dpzqhodu.js → Sun-D531tFmZ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-NAHL2C3Y.js → SwitchHorizontal01-B8iZqdiB.js} +1 -1
- package/dist/client/assets/{Tool01-DJqLAFcI.js → Tool01-CldemTEe.js} +1 -1
- package/dist/client/assets/{Tooltip-fSWtSvYM.js → Tooltip-B1dYEjVO.js} +1 -1
- package/dist/client/assets/{Trash01-Br_8Dd8k.js → Trash01-W_zwe5xo.js} +1 -1
- package/dist/client/assets/{Upload01-B1gnueEL.js → Upload01-DDGkOE5t.js} +1 -1
- package/dist/client/assets/{UserCheck01-CpLKejEQ.js → UserCheck01-VgBUlrC3.js} +1 -1
- package/dist/client/assets/{UserSquare-D1HQ9ju8.js → UserSquare-YQkID8bv.js} +1 -1
- package/dist/client/assets/{Users01-qnd_BT_N.js → Users01-CJ_YMgJe.js} +1 -1
- package/dist/client/assets/{XClose-BbVr5nc7.js → XClose-Dv4YALPV.js} +1 -1
- package/dist/client/assets/{Zap-B1JA6VL5.js → Zap-DFubAl8b.js} +1 -1
- package/dist/client/assets/{access-gate-m6QmHtAD.js → access-gate-C-gJXueM.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BIOFD97r.js → add-connection-dialog-DyPd4ss_.js} +1 -1
- package/dist/client/assets/agent-app-BxXBXF3L.js +1 -0
- package/dist/client/assets/agent-assets-CFkP_Dfu.js +1 -0
- package/dist/client/assets/{agent-automation-to9UMVoQ.js → agent-automation-BaYqgCX1.js} +2 -2
- package/dist/client/assets/agent-automations-DBsSsUGW.js +1 -0
- package/dist/client/assets/agent-blog-lx6Ts7x1.js +2 -0
- package/dist/client/assets/agent-blog-post-BeOLBeeI.js +2 -0
- package/dist/client/assets/agent-calendar-BnmK4XQ1.js +1 -0
- package/dist/client/assets/{agent-capabilities-B8dQ_ZB8.js → agent-capabilities-CTj-iH2e.js} +1 -1
- package/dist/client/assets/agent-connect-sources-CH4TSb8y.js +1 -0
- package/dist/client/assets/agent-deck-DCB6fHd3.js +1 -0
- package/dist/client/assets/agent-e2e-BTYjDJlF.js +1 -0
- package/dist/client/assets/agent-experiments-Cw9pv6Dn.js +1 -0
- package/dist/client/assets/agent-file-CTx06rQr.js +1 -0
- package/dist/client/assets/agent-hosting-B5D0b6SX.js +1 -0
- package/dist/client/assets/agent-icon-CF35JltL.js +1 -0
- package/dist/client/assets/agent-library-BwDYP2WG.js +1 -0
- package/dist/client/assets/agent-library-file-C81bvh62.js +1 -0
- package/dist/client/assets/agent-overview-K-iHxR1q.js +1 -0
- package/dist/client/assets/{agent-releases-DxZH4Aop.js → agent-releases-BwmxxOKG.js} +1 -1
- package/dist/client/assets/agent-settings-DSkSbN3M.js +1 -0
- package/dist/client/assets/{agent-site-editor-BVDN7iAe.js → agent-site-editor-AlBg5D2V.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DKlbc-rv.js +2 -0
- package/dist/client/assets/agent-site-editor-content-D8oVt80T.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-C7REepxK.js +1 -0
- package/dist/client/assets/agent-view-B_4cQTkH.js +1 -0
- package/dist/client/assets/{agent-view-guard-DgSIx4Rz.js → agent-view-guard-ZsSVHdZf.js} +1 -1
- package/dist/client/assets/{ai-providers-BLNPddjm.js → ai-providers-hSqz3WwB.js} +1 -1
- package/dist/client/assets/{alert-B3inZFUT.js → alert-DvKjRxar.js} +1 -1
- package/dist/client/assets/{analytics-sections-CTzZQv_A.js → analytics-sections-VB2fGveD.js} +1 -1
- package/dist/client/assets/api-keys-1OldN0tT.js +1 -0
- package/dist/client/assets/{api-keys-D5yeJ96D.js → api-keys-5hVWR6f4.js} +1 -1
- package/dist/client/assets/app-editor-CKOA7wEE.js +1 -0
- package/dist/client/assets/{asset-utils-FQrgs53r.js → asset-utils-DRModSGS.js} +1 -1
- package/dist/client/assets/{auth-DlYbrS5R.js → auth-Ry9WrZV8.js} +1 -1
- package/dist/client/assets/{auth-catchall-DovAKkgg.js → auth-catchall-DJ81nN52.js} +1 -1
- package/dist/client/assets/{auth-entry-BeARMnxr.js → auth-entry-N3iwaDe6.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CnJuCNmk.js → auth-split-layout-DRc17L6c.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Da9zgsaC.js → authenticate-and-persist-oauth-ZYDIddXa.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cfemy10y.js → automation-list-row-DW-hLflG.js} +1 -1
- package/dist/client/assets/{automation-runs-DhXlimIG.js → automation-runs-Cn3-xcc-.js} +1 -1
- package/dist/client/assets/automations-CVx7XBRT.js +1 -0
- package/dist/client/assets/{badge-CaU7DsCB.js → badge-CWKaTosK.js} +1 -1
- package/dist/client/assets/{block-document-D8KopzHb.js → block-document-DnIO3ig2.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Rebn6SsT.js → blocks-preview-workspace-context-05h1qBm4.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CrihrdT0.js → blocks-tab-states-DDvkpFWf.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DM-lGGhF.js → blog-preview-url-BeobaMnK.js} +1 -1
- package/dist/client/assets/{blog-schema-0H53CE3k.js → blog-schema-BMIjJkjY.js} +1 -1
- package/dist/client/assets/{blog-source-gate-B_GOyP5p.js → blog-source-gate-CTlfDEgd.js} +1 -1
- package/dist/client/assets/{blog-view-gate-JzJtOYCL.js → blog-view-gate-BUKolpTm.js} +1 -1
- package/dist/client/assets/{buckets-CVXQhalH.js → buckets-Cojjk4Rx.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DgQdPFxI.js → build-improve-prompt-doc-cVHB56V7.js} +1 -1
- package/dist/client/assets/{calendar-DZVkXGhA.js → calendar-D3_Is4BX.js} +1 -1
- package/dist/client/assets/{capability-load-error-p87qKYlk.js → capability-load-error-l7VKbDu4.js} +1 -1
- package/dist/client/assets/category-editor-3t0p_Aia.js +1 -0
- package/dist/client/assets/{category-tree-DUNY9TG8.js → category-tree-rhKblFsZ.js} +1 -1
- package/dist/client/assets/{chart-D6tXreNC.js → chart-D0JID1mb.js} +1 -1
- package/dist/client/assets/{chat-context-DsLpz7ew.js → chat-context-D5EEwp_m.js} +1 -1
- package/dist/client/assets/{chat-draft-ODW7kZWh.js → chat-draft-CL1clhIN.js} +1 -1
- package/dist/client/assets/{checkbox-Bo6uhaqm.js → checkbox-DHBAzm3e.js} +1 -1
- package/dist/client/assets/choose-editor-CluRV_6I.js +1 -0
- package/dist/client/assets/{cli-auth-success-1ibs6VjG.js → cli-auth-success-D9loznd0.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DY7QQNQD.js +1 -0
- package/dist/client/assets/{cms-store-drafts-Da9bgH02.js → cms-store-drafts-BocSU3zl.js} +1 -1
- package/dist/client/assets/{collapsible-Cug6Pp5N.js → collapsible-JCTHx5_U.js} +1 -1
- package/dist/client/assets/collection-detail-l7ntNzFm.js +1 -0
- package/dist/client/assets/{collection-display-button-BeCmwRLy.js → collection-display-button-C6AAIEpT.js} +1 -1
- package/dist/client/assets/{collection-search-EKEj7NYh.js → collection-search-Cez2fKoW.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-QVfey_uk.js → collection-table-wrapper-DkyJJZPl.js} +1 -1
- package/dist/client/assets/{collection-tabs-THb2ZDUR.js → collection-tabs-D0yQpVJM.js} +1 -1
- package/dist/client/assets/{combobox-CkvX9Of3.js → combobox-Dm0ZumLc.js} +1 -1
- package/dist/client/assets/{command-BA_BVypg.js → command-CALEDfdi.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-mGMTO-21.js → companion-mcps-section-DyyItakB.js} +1 -1
- package/dist/client/assets/{config-DeP83Mjq.js → config-DpuCRGPS.js} +1 -1
- package/dist/client/assets/{connect-C-ernj3S.js → connect-DhDiKdM5.js} +3 -3
- package/dist/client/assets/{connect-key-B_1YtIEI.js → connect-key-BnZjV7h5.js} +1 -1
- package/dist/client/assets/{connect-layout-DhcQffyl.js → connect-layout-DPjmEUCP.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DXcG_Psx.js → connect-source-dialog-CPF3zqCW.js} +1 -1
- package/dist/client/assets/{connection-DUUZ34Ff.js → connection-ByE21sI5.js} +1 -1
- package/dist/client/assets/{connection-card-BbAx38kp.js → connection-card-v-6X4qws.js} +1 -1
- package/dist/client/assets/connection-detail-DOB5tzOq.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DEnW0ORZ.js → connection-form-helpers-BZq0bQw7.js} +1 -1
- package/dist/client/assets/{connection-slug-Wiu7W5Ro.js → connection-slug-Cu8poN2f.js} +1 -1
- package/dist/client/assets/connections-BshSiFUh.js +1 -0
- package/dist/client/assets/content-changes-Yn1NpHw-.js +1 -0
- package/dist/client/assets/{content-tab-CJmgvKjP.js → content-tab-BOS9R4w0.js} +3 -3
- package/dist/client/assets/context-CSNMIE52.js +1 -0
- package/dist/client/assets/{context-menu-BvoelKnM.js → context-menu-DjuEbDwW.js} +1 -1
- package/dist/client/assets/{context-shell-BHDXVCRL.js → context-shell-BtuEIN_r.js} +4 -4
- package/dist/client/assets/{create-organization-dialog-dpA6uSHX.js → create-organization-dialog-BFbwswlq.js} +1 -1
- package/dist/client/assets/{daily-pulse-83GnvMF_.js → daily-pulse-Bg2uZfJ3.js} +1 -1
- package/dist/client/assets/{delete-copy-C8ERxzK8.js → delete-copy-CyOQI_UN.js} +1 -1
- package/dist/client/assets/{device-hint-5lkWUASQ.js → device-hint-1SWvGp3v.js} +1 -1
- package/dist/client/assets/{discover-C9WBot8k.js → discover-DRvYEfga.js} +1 -1
- package/dist/client/assets/{domain-settings-C7L5I-Ps.js → domain-settings-kxDrXeNT.js} +1 -1
- package/dist/client/assets/{drawer-Daptw1OQ.js → drawer-CLdqPUpZ.js} +1 -1
- package/dist/client/assets/{editor-classes-eVnt4vp_.js → editor-classes-C7cnK7Wp.js} +1 -1
- package/dist/client/assets/{editor-CGkWZSA7.js → editor-fCTeAQ3h.js} +1 -1
- package/dist/client/assets/{empty-state-Dfjwzagg.js → empty-state-BM_yXYSI.js} +1 -1
- package/dist/client/assets/{empty-state--1H9mx7y.js → empty-state-CHF2Jno9.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BVYrDQR_.js → experiments-tab-choice-Bo36uaUs.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Csm2LLbI.js → extract-connection-data-jy3JaUYJ.js} +1 -1
- package/dist/client/assets/{feature-gate-DP0JLkRq.js → feature-gate-CDxHWMHG.js} +1 -1
- package/dist/client/assets/{feature-paywall-CuECkoDT.js → feature-paywall-Cc43JNfz.js} +1 -1
- package/dist/client/assets/file-explorer-BmZFNSEt.js +2 -0
- package/dist/client/assets/{file-preview-J0KlNfCN.js → file-preview-DSlXa64u.js} +1 -1
- package/dist/client/assets/{file-share-button-1KUHqOgB.js → file-share-button-mLtJT0f8.js} +2 -2
- package/dist/client/assets/{file-type-icon-sxJ1fqoc.js → file-type-icon-CNUBpmBv.js} +1 -1
- package/dist/client/assets/{folder-icon-DfGo2fIA.js → folder-icon-Db1WLgp9.js} +1 -1
- package/dist/client/assets/{form-msT-Nxjd.js → form-CCzLKFB7.js} +1 -1
- package/dist/client/assets/{frame-navigation-COhxs0rP.js → frame-navigation-B4-_qfJ3.js} +1 -1
- package/dist/client/assets/{gateway-client-mrWD5tSx.js → gateway-client-Dsg5xVl5.js} +1 -1
- package/dist/client/assets/general-DRn37bfZ.js +1 -0
- package/dist/client/assets/{github-icon-DGEVXZ8I.js → github-icon-CizbgzyS.js} +1 -1
- package/dist/client/assets/{held-block-view-DUdsae86.js → held-block-view-CYXKzDkA.js} +1 -1
- package/dist/client/assets/home-BDEWRpho.js +1 -0
- package/dist/client/assets/{home-overview-CC9gx7Fg.js → home-overview-Cc5zUwKU.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DH-KyBYi.js → hosted-reconcile-BT71cbCZ.js} +1 -1
- package/dist/client/assets/{icon-button-am6dsn69.js → icon-button-BY-Dtplw.js} +1 -1
- package/dist/client/assets/{index-CDpTFqpR.js → index-BKZ2GYzY.js} +1 -1
- package/dist/client/assets/{index-DjWhIee5.js → index-Bf_p4D_6.js} +1 -1
- package/dist/client/assets/index-C3JbUkAn.js +1 -0
- package/dist/client/assets/{index-DgVQUrlP.js → index-C6V-s7Mj.js} +1 -1
- package/dist/client/assets/index-C9ybKZad.css +1 -0
- package/dist/client/assets/{index-B26uWbt_.js → index-D146A7MA.js} +1 -1
- package/dist/client/assets/{index-B2vvUsuK.js → index-D19iAD4s.js} +51 -39
- package/dist/client/assets/{index-DeLM7Rkt.js → index-D6VuEonE.js} +1 -1
- package/dist/client/assets/{index-4q-RLwEk.js → index-DAZyLaeQ.js} +1 -1
- package/dist/client/assets/{index-BYSU1KyF.js → index-DHiZoBJ3.js} +1 -1
- package/dist/client/assets/index-DP6ex8je.js +4 -0
- package/dist/client/assets/{index-C0WKaVxy.js → index-DS6kB3db.js} +1 -1
- package/dist/client/assets/{index-D0GEyG42.js → index-DWF5ASE_.js} +8 -8
- package/dist/client/assets/{index-CsQM0oHc.js → index-DX45d0VZ.js} +1 -1
- package/dist/client/assets/{index-0yoxovPZ.js → index-DeWoNfZE.js} +1 -1
- package/dist/client/assets/{index-D9zWR22g.js → index-DqGbUVIr.js} +2 -2
- package/dist/client/assets/{index-D8TuIm4d.js → index-i1TGxsLb.js} +1 -1
- package/dist/client/assets/{index-redirect-uY3IN3rF.js → index-redirect-1X0s58OF.js} +1 -1
- package/dist/client/assets/{index-C9UqnrNB.js → index-tfWzV95z.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-B6MEVTvt.js → infiniteQueryObserver-B1MZYli5.js} +1 -1
- package/dist/client/assets/{infra-billing-4CjwqMVB.js → infra-billing-CEbGoBzj.js} +1 -1
- package/dist/client/assets/{input-Bzo1OCNz.js → input-DER1ofMN.js} +1 -1
- package/dist/client/assets/{input-DFHiqhmH.js → input-DUmEmIMD.js} +3 -3
- package/dist/client/assets/{integration-icon-DazsuPNm.js → integration-icon-LqaI_LSB.js} +1 -1
- package/dist/client/assets/{item-actions-Yc8vcOg0.js → item-actions-BQdANZXs.js} +1 -1
- package/dist/client/assets/{jira-icon-CsaUkukk.js → jira-icon-DNsDxAZ7.js} +1 -1
- package/dist/client/assets/{label-BLEP0nH0.js → label-B0UwCsXA.js} +1 -1
- package/dist/client/assets/{layout-c8-5uC_O.js → layout-CSIaEqJd.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DwTePCPF.js → legacy-admin-welcome-dialog-DgOZFBtI.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DL8ddlj5.js → legacy-agents-deep-Cx1B7fLu.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DjX7qNM7.js → legacy-main-redirect-CuOUB_B1.js} +1 -1
- package/dist/client/assets/library-B8otmHwX.js +1 -0
- package/dist/client/assets/{library-tab-DOE8AqM2.js → library-tab-BwU2UnDE.js} +1 -1
- package/dist/client/assets/{login--MYPwAKH.js → login-D7cd9YYg.js} +1 -1
- package/dist/client/assets/{markdown-COcXeIyG.js → markdown-BNFJrVwN.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CDjvP8t9.js → mcp-app-renderer-ChxjPYfG.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ciX7wK5f.js → mcp-oauth-BHqzrP9l.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DESKCBIm.js → mcp-oauth-CIbadsEV.js} +1 -1
- package/dist/client/assets/{members-DKu_OhY9.js → members-CRNf5jdg.js} +1 -1
- package/dist/client/assets/{memory-BL_L-Q3R.js → memory-BtUUGfBH.js} +2 -2
- package/dist/client/assets/{mock-board--Ssgy-f6.js → mock-board-CX-WNxEi.js} +3 -3
- package/dist/client/assets/{monaco-editor-C0bUrX9K.js → monaco-editor-oNRDmlFg.js} +1 -1
- package/dist/client/assets/{monitoring-D8_3FcCV.js → monitoring-DnzPiQ3F.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-L0MR9OOK.js → monitoring-stats-row-eut48zN3.js} +1 -1
- package/dist/client/assets/{multi-select-VurXcITl.js → multi-select-CADtUZ9A.js} +1 -1
- package/dist/client/assets/{mustache-CSfql4oE.js → mustache-BM5hcjQo.js} +1 -1
- package/dist/client/assets/{named-rule-step-BfgtyNIr.js → named-rule-step-jeqaAuBi.js} +1 -1
- package/dist/client/assets/named-rule-view-0M7nk7ZR.js +1 -0
- package/dist/client/assets/{new-project-dialog-CsFe_Ifg.js → new-project-dialog-TULM28H3.js} +1 -1
- package/dist/client/assets/{new-project-store-D3tRl8ms.js → new-project-store-Dkp4wOSi.js} +1 -1
- package/dist/client/assets/{oauth-callback-hp7uk30l.js → oauth-callback-D2m0oHFc.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DYAZYkh4.js → oauth-callback-ai-provider-Cg2K-hUv.js} +1 -1
- package/dist/client/assets/{oauth-consent-Buw7iq_C.js → oauth-consent-Cey84Qly.js} +1 -1
- package/dist/client/assets/{onboarding-CPK6bWVC.js → onboarding-C5tGxSm3.js} +1 -1
- package/dist/client/assets/openai-conversation-Cin6CRLj.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-DWktyZnu.js → optimistic-project-sidebar-views-BwI_h134.js} +1 -1
- package/dist/client/assets/{order-monitor-day-lcmZ_W6T.js → order-monitor-day-qB9QL9rR.js} +1 -1
- package/dist/client/assets/{organization-choice-5J7_8tx5.js → organization-choice-UcNwkZgV.js} +1 -1
- package/dist/client/assets/{orgs-CTAlA2gh.js → orgs-BNCJkrfd.js} +1 -1
- package/dist/client/assets/{own-accounts-section-CL-lWHC3.js → own-accounts-section-B_G3r2Ak.js} +1 -1
- package/dist/client/assets/{pair-IZ41S3dI.js → pair-DaLtpCvg.js} +8 -8
- package/dist/client/assets/{parse-sections-bc3ugIU6.js → parse-sections-BRYcF5X4.js} +3 -3
- package/dist/client/assets/plan-BkTiTYLU.js +1 -0
- package/dist/client/assets/{plan-ladder-CpzLELQm.js → plan-ladder-DZZeDiD-.js} +1 -1
- package/dist/client/assets/{plan-usage-card-Djn1n4Si.js → plan-usage-card-CUEZgkUc.js} +1 -1
- package/dist/client/assets/{popover-BN8yB-gL.js → popover-Bm-_ILu8.js} +1 -1
- package/dist/client/assets/post-calendar-Dx1uahJO.js +1 -0
- package/dist/client/assets/{post-editor-k1GseIfg.js → post-editor-DWqV-Y-J.js} +2 -2
- package/dist/client/assets/{preview-content-DrUsIXaL.js → preview-content-DiSiTI85.js} +1 -1
- package/dist/client/assets/{preview-dialog-Bl4nn6SJ.js → preview-dialog-BP-VZ8b7.js} +1 -1
- package/dist/client/assets/{preview-panel-CPnrD7jy.js → preview-panel-DO2qxYoE.js} +1 -1
- package/dist/client/assets/{preview-tab-DJCbL8xU.js → preview-tab-lvMZ2nQh.js} +3 -3
- package/dist/client/assets/{primitives-7GEzJciO.js → primitives-DlHl12Ki.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-BsLtWfxx.js → product-picker-dialog-2Sh66sGp.js} +1 -1
- package/dist/client/assets/{profile-LVIi9kQl.js → profile-C-34uFVs.js} +1 -1
- package/dist/client/assets/project-app-view-B1Na7Y2f.js +1 -0
- package/dist/client/assets/project-apps-4x8kh2Th.js +1 -0
- package/dist/client/assets/{project-icon-NAtCd-2E.js → project-icon-BpBMspxb.js} +1 -1
- package/dist/client/assets/{project-index-BDBvdHSq.js → project-index-Dn8Lu82V.js} +1 -1
- package/dist/client/assets/project-reports-BKA5CwLs.js +1 -0
- package/dist/client/assets/project-tasks-DII3t9E-.js +1 -0
- package/dist/client/assets/projects-COEtC32s.js +1 -0
- package/dist/client/assets/{projects-empty-state-Bhe-Ul5b.js → projects-empty-state-BaKUbZwF.js} +1 -1
- package/dist/client/assets/{prompts-fURd1E3_.js → prompts-BEx4mqMN.js} +1 -1
- package/dist/client/assets/record-editor-B5MUcK8d.js +1 -0
- package/dist/client/assets/redirect-editor-v_D7tsUa.js +1 -0
- package/dist/client/assets/{reports-K6JrO8c3.js → reports-CY9b4q7t.js} +1 -1
- package/dist/client/assets/reports-Dc_GbY37.js +1 -0
- package/dist/client/assets/reports-onboarding-B78MfFt5.js +1 -0
- package/dist/client/assets/reports-tab-DgzPfqIC.js +2 -0
- package/dist/client/assets/{repositories-noe5N_6-.js → repositories-BFzOuUP8.js} +1 -1
- package/dist/client/assets/repositories-DfE1c4ns.js +1 -0
- package/dist/client/assets/{repository-binding-DC98qYdg.js → repository-binding-CP_PNLcQ.js} +1 -1
- package/dist/client/assets/{repository-picker-BLhEIBPT.js → repository-picker-DCip0P__.js} +1 -1
- package/dist/client/assets/{require-capability-r0eDYoNg.js → require-capability-uCkyxJfa.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Dq6PcaGv.js → required-auth-layout-B7e3rkXx.js} +1 -1
- package/dist/client/assets/{reset-password-CeDXY3wu.js → reset-password-Bqbu7xzH.js} +1 -1
- package/dist/client/assets/{resizable-CDUVHUkS.js → resizable-D75nggzL.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-BqdaZDC9.js +1 -0
- package/dist/client/assets/review-settings-BU42FIg-.js +1 -0
- package/dist/client/assets/{role-color-j5ZAxcKG.js → role-color-CUZgXceG.js} +1 -1
- package/dist/client/assets/roles-BhkeI1Tk.js +1 -0
- package/dist/client/assets/route-BdFxUFy-.js +1 -0
- package/dist/client/assets/route-C_hx8Usp.js +1 -0
- package/dist/client/assets/route-CvQ9iNjI.js +1 -0
- package/dist/client/assets/{route-page-header-B-0s5BiJ.js → route-page-header-B8C1ZRVD.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-CJ3-CkeV.js → sandbox-git-api-B73fIbEU.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DJVkUHOC.js → sandbox-lifecycle-context-3zZM02yQ.js} +1 -1
- package/dist/client/assets/{save-status-5VC4rIi2.js → save-status-5VKYddaB.js} +1 -1
- package/dist/client/assets/{schema-B5pk7azZ.js → schema-Bbiw44C-.js} +1 -1
- package/dist/client/assets/schema-BmYiAOGn.js +1 -0
- package/dist/client/assets/{scroll-area-CXINzzvW.js → scroll-area-ZYmkOMr8.js} +1 -1
- package/dist/client/assets/{search-input-Dmx6N7Z7.js → search-input-Dfgi3Bm0.js} +1 -1
- package/dist/client/assets/{search-toggle-uhoeAt8V.js → search-toggle-Bt9uO9z1.js} +1 -1
- package/dist/client/assets/{secret-picker-CdBDBcEP.js → secret-picker-35tY3ayS.js} +1 -1
- package/dist/client/assets/{secrets-DdH9QnxK.js → secrets-CTezjK3j.js} +1 -1
- package/dist/client/assets/{section-array-field-RxYDyVUT.js → section-array-field-D3J7UHmj.js} +1 -1
- package/dist/client/assets/{sections-CvVT6jo9.js → sections-CsKHN4VK.js} +1 -1
- package/dist/client/assets/sections-editor-bf1W6507.js +1 -0
- package/dist/client/assets/{select-PhQ1dHUc.js → select-CKa1YoCw.js} +1 -1
- package/dist/client/assets/{select-model-DsYbAwnw.js → select-model-BzdKMpAz.js} +1 -1
- package/dist/client/assets/{seo-editor-DTf59Uvx.js → seo-editor-RhNyCqwO.js} +1 -1
- package/dist/client/assets/{separator-BspBySaE.js → separator-CmEbryS6.js} +1 -1
- package/dist/client/assets/{session-runtime-CWUXrNEM.js → session-runtime-DZiu3uM2.js} +1 -1
- package/dist/client/assets/settings-tab-DgRCBiDm.js +1 -0
- package/dist/client/assets/{sheet-DsBIaG5c.js → sheet-BDbcvRnu.js} +1 -1
- package/dist/client/assets/shell-layout-Lgn8VLZ9.js +1 -0
- package/dist/client/assets/{site-draft-actions-bEXIW2Ci.js → site-draft-actions-LxERm8rz.js} +5 -5
- package/dist/client/assets/{site-draft-view-DL1xS2bS.js → site-draft-view-Dzyq1aKZ.js} +1 -1
- package/dist/client/assets/site-editor-DVvyNYht.js +1 -0
- package/dist/client/assets/site-editor-toast-QCYxwt4C.js +1 -0
- package/dist/client/assets/skills-D2pt05Zp.js +1 -0
- package/dist/client/assets/{slider-DiJZup4s.js → slider-B257IOM8.js} +1 -1
- package/dist/client/assets/{sortable.esm-AH9TOEe6.js → sortable.esm-6QfVcWZZ.js} +1 -1
- package/dist/client/assets/{sso-DJUFzVd6.js → sso-QEHyu29Q.js} +1 -1
- package/dist/client/assets/{suggestion-BKU1aw0O.js → suggestion-DXAVxjkm.js} +1 -1
- package/dist/client/assets/{super-agent-icon-KeQzZLhO.js → super-agent-icon-Be9GDxp7.js} +1 -1
- package/dist/client/assets/{switch-CavZ0Td_.js → switch-DgvZdTyU.js} +1 -1
- package/dist/client/assets/{synced-repos-CpobCKuE.js → synced-repos-CsgMx0Ny.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BQpSs905.js → tab-icon-glyph-UH4S7mUc.js} +1 -1
- package/dist/client/assets/{table-_0cphCuz.js → table-ChqekQnS.js} +1 -1
- package/dist/client/assets/{tabs-CB9wyI2L.js → tabs-DV8AQUwT.js} +1 -1
- package/dist/client/assets/{task-board-DAlkVSdn.js → task-board-DQX_apb8.js} +1 -1
- package/dist/client/assets/{task-key-D_de_YB4.js → task-key-rSXWMPFP.js} +1 -1
- package/dist/client/assets/{task-route-gaZIOP1Q.js → task-route-KYQNiD-8.js} +1 -1
- package/dist/client/assets/{task-status-Dm8lN6h7.js → task-status-CadzUBkc.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BRO72FRF.js → taskboard-analytics-B1Tn3vRG.js} +1 -1
- package/dist/client/assets/tasks-BBJAHV_M.js +1 -0
- package/dist/client/assets/{tasks-LD7DAdjg.js → tasks-D0Ct-0ZT.js} +1 -1
- package/dist/client/assets/{textarea-C5yT2rai.js → textarea-DCWhTUrR.js} +1 -1
- package/dist/client/assets/thread-analytics-BXz4d40L.js +1 -0
- package/dist/client/assets/{thread-button-jA6lXOHW.js → thread-button-CkP3AL0P.js} +1 -1
- package/dist/client/assets/{thread-intent-DC5UuPI5.js → thread-intent-BsMPgCKi.js} +1 -1
- package/dist/client/assets/{thread-route-NC2TJMv2.js → thread-route-El3oNOnD.js} +1 -1
- package/dist/client/assets/thread-route-wZnmBpi8.js +1 -0
- package/dist/client/assets/{thread-sheet-body-BATHVA9a.js → thread-sheet-body-By8H92hw.js} +1 -1
- package/dist/client/assets/{time-range-picker-BdF4LahQ.js → time-range-picker-svLFcXAw.js} +1 -1
- package/dist/client/assets/{toggle-group-B2L0Fh-A.js → toggle-group-fJYx0W9h.js} +1 -1
- package/dist/client/assets/{tool-set-selector-sYj6JiLu.js → tool-set-selector-7nHtwp8O.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BleYd0k2.js → toolbar-icon-button-DIm3azB_.js} +1 -1
- package/dist/client/assets/{tooltip-C0XDZQqg.js → tooltip-B3-v7v0W.js} +1 -1
- package/dist/client/assets/{tooltipContext-B5tdv-rH.js → tooltipContext-oNzr-fXK.js} +1 -1
- package/dist/client/assets/{track-DkQvKF_r.js → track-C9EcyFLh.js} +1 -1
- package/dist/client/assets/{types-BmRTIjW9.js → types-6-Ps6AGR.js} +1 -1
- package/dist/client/assets/{url-slug-HTy1TIRr.js → url-slug-3v4BmBw0.js} +1 -1
- package/dist/client/assets/{usage-stats-BbuSELy1.js → usage-stats-njGMuDih.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CGeOv9zD.js → use-ai-providers-DFv4_P6Z.js} +1 -1
- package/dist/client/assets/{use-api-keys-BBDeQmvb.js → use-api-keys-PZMcZPlt.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-B8KW11JW.js +1 -0
- package/dist/client/assets/use-ask-in-chat-Dxj79lpz.js +1 -0
- package/dist/client/assets/{use-automations-UppgD9x4.js → use-automations-DD1lNWAq.js} +1 -1
- package/dist/client/assets/{use-autosave-DP-Xo78G.js → use-autosave-DBAueSyZ.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DjyJGATt.js +1 -0
- package/dist/client/assets/use-blog-view-B9cmKJN3.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-CYDJQho2.js → use-chat-layout-state-CAIrZGnL.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-sZFllHA3.js → use-cms-publish-actions-Dq9NhEOB.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DM6nloeD.js → use-connect-companion-CLP35iDK.js} +1 -1
- package/dist/client/assets/{use-connection-BlQSFvXZ.js → use-connection-CYsyXyy7.js} +1 -1
- package/dist/client/assets/{use-content-sync-CmcdSf-W.js → use-content-sync-DWcjd7N0.js} +1 -1
- package/dist/client/assets/{use-copy-_EjHpFlu.js → use-copy-BStTcLWM.js} +1 -1
- package/dist/client/assets/{use-current-view-DJmYWR9r.js → use-current-view-Cn9H-KAc.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-8kgkXGzy.js → use-date-fns-locale-CSKjWaLe.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-43RSVqCJ.js → use-debounced-autosave-BudnGn2r.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CtUf9JOP.js → use-debounced-value-Dcq0NTAp.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CrAjq5eE.js → use-deco-credits-D9t5Q-Ms.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CwyVZVbh.js → use-decopilot-events-DsEAOvda.js} +1 -1
- package/dist/client/assets/{use-delete-block-CziQYeFw.js → use-delete-block-BZCQAK3P.js} +1 -1
- package/dist/client/assets/{use-delete-connection-5KBJh_4H.js → use-delete-connection-CBkpbZja.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-vod10AYl.js → use-deployment-admin-HoxFQgZ9.js} +1 -1
- package/dist/client/assets/{use-entitlements-D-BsJsBn.js → use-entitlements-BzKQLk_u.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CTybhvJ7.js → use-fast-preview-draft-url-tiq51pbg.js} +1 -1
- package/dist/client/assets/{use-file-configs-zM1_UDsD.js → use-file-configs-Caaj88sr.js} +1 -1
- package/dist/client/assets/{use-id-selection-B-V9WQKU.js → use-id-selection-D0jc_Dy0.js} +1 -1
- package/dist/client/assets/{use-in-settings-CKmb_d-Z.js → use-in-settings-D-n4dJvM.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BIRoBmxG.js → use-inbox-feed-7Rm2Mjtr.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D0fDDIyn.js → use-infinite-scroll-f5g_Vpk-.js} +1 -1
- package/dist/client/assets/{use-join-requests-C7XAF7yu.js → use-join-requests-Cu6LZvjE.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CFBnVDX4.js → use-main-panel-tabs-Ch-_m9wA.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Cvpzf8bf.js → use-mcp-auth-status-CrggBiFo.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C25DU1dz.js → use-mcp-client-CCT6q-zj.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DFURxOZn.js → use-mcp-prompts-Bxssn6xT.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DU4EJz2s.js → use-mcp-tools-CdypNtPV.js} +1 -1
- package/dist/client/assets/{use-mobile-DFpIEPum.js → use-mobile-Dyvncftm.js} +1 -1
- package/dist/client/assets/{use-move-blocks-HLsANXZk.js → use-move-blocks-pw3TQRyc.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BGA3nmOF.js → use-navigate-to-agent-0M4hsJnf.js} +1 -1
- package/dist/client/assets/{use-never-published-BnWhN5r2.js → use-never-published-BsVhVpS1.js} +1 -1
- package/dist/client/assets/{use-org-fs-BrF60Lzy.js → use-org-fs-CyfRrBTl.js} +1 -1
- package/dist/client/assets/{use-org-notice-BmwTtllY.js → use-org-notice-BeUR_ZGA.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Bi8Ut_qX.js → use-org-repo-syncs-DvcdTgrS.js} +1 -1
- package/dist/client/assets/{use-org-sso-CpaEO6G5.js → use-org-sso-BOOKyOjL.js} +1 -1
- package/dist/client/assets/use-organization-settings-BEn5xJKT.js +1 -0
- package/dist/client/assets/{use-panel-navigate-BvdMbLN8.js → use-panel-navigate-DzpMtCDM.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-Cj3jJM1f.js → use-project-native-view-presence-D4Mhq-72.js} +1 -1
- package/dist/client/assets/{use-project-scope-TiMALD5Y.js → use-project-scope-DdM0t1xa.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CAx2Sj77.js → use-recent-apps-BclKHbIs.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BWUL8kSa.js → use-reports-diagnostic-BAbQPKnw.js} +1 -1
- package/dist/client/assets/use-sandbox-events-CdcsfdkO.js +2 -0
- package/dist/client/assets/{use-secrets-DYs_2mJJ.js → use-secrets-LrCR8jto.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-bQf9hU5_.js → use-section-preview-base-CiQHlYOM.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-Cynyx51j.js → use-sidebar-collapsed-CiqzdmQp.js} +1 -1
- package/dist/client/assets/{use-tags-Ds4Jpuu1.js → use-tags-B6rjUKRX.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-5UJcKLaD.js → use-task-board-analytics-B5zThTLs.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-C0gHPfb5.js → use-task-board-item-prs-QwsxzHpc.js} +1 -1
- package/dist/client/assets/{use-task-board-items-osFWr4F_.js → use-task-board-items-B0KeELtH.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-eYQIzP7F.js → use-task-board-prompts-DjkyWndN.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DqYio8UA.js → use-task-metadata-DRyTcJBf.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DJQKtV2q.js → use-thread-outputs-U5yvy3ti.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BYPtD8MA.js → use-view-draft-kind-C2cwPb-d.js} +1 -1
- package/dist/client/assets/{use-voice-input-wPU7RMRz.js → use-voice-input-D_lO17n9.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BIIkqC2p.js +1 -0
- package/dist/client/assets/{useQueries-DKbjoyEp.js → useQueries-C-94_zeU.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B5PirUR6.js +1 -0
- package/dist/client/assets/{users-BaX74SiF.js → users-D4cUiO-M.js} +1 -1
- package/dist/client/assets/{utils-C8EWsG3o.js → utils-CWN91Q0R.js} +1 -1
- package/dist/client/assets/variant-calendar-DHFpb0p3.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BsSZ5yFL.js → variant-matcher-override-GbUOkJxx.js} +1 -1
- package/dist/client/assets/{view-header-B-qrTWpm.js → view-header-BZNgPIdK.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DeWQ4GR6.js → virtual-mcp-jT57t8xN.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DSisQksD.js → watch-sse-pool-CrHa0Ln_.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/migrate.js +210 -210
- package/dist/server/server.js +693 -693
- package/package.json +1 -1
- package/dist/client/assets/TrendUp01-Dnr3ECEr.js +0 -1
- package/dist/client/assets/agent-app-gA5AyVqP.js +0 -1
- package/dist/client/assets/agent-assets-CHRKOS2u.js +0 -1
- package/dist/client/assets/agent-automations-VyCqK5Re.js +0 -1
- package/dist/client/assets/agent-blog-CZmmsFZV.js +0 -2
- package/dist/client/assets/agent-blog-post-CB4b_awk.js +0 -2
- package/dist/client/assets/agent-calendar-Cp5T7Qbr.js +0 -1
- package/dist/client/assets/agent-connect-sources-BoFtzsla.js +0 -1
- package/dist/client/assets/agent-deck-ClKs4ShI.js +0 -1
- package/dist/client/assets/agent-e2e-DYM6mhlb.js +0 -1
- package/dist/client/assets/agent-experiments-w6nqO2q9.js +0 -1
- package/dist/client/assets/agent-file-DrrOEB-e.js +0 -1
- package/dist/client/assets/agent-hosting-BSxiIsrn.js +0 -1
- package/dist/client/assets/agent-icon-ButaHLCM.js +0 -1
- package/dist/client/assets/agent-library-UPbdmbqv.js +0 -1
- package/dist/client/assets/agent-library-file-D6WFOASp.js +0 -1
- package/dist/client/assets/agent-overview-BYbm2jhI.js +0 -1
- package/dist/client/assets/agent-settings-BlXhuK2P.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BzxDSxJp.js +0 -2
- package/dist/client/assets/agent-site-editor-content-r61QYhf7.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BwuXgbhX.js +0 -1
- package/dist/client/assets/agent-view-Ba6W0Fqn.js +0 -1
- package/dist/client/assets/api-keys-BxUV6FZ8.js +0 -1
- package/dist/client/assets/app-editor-2zianuY6.js +0 -1
- package/dist/client/assets/automations-BgwFiPYA.js +0 -1
- package/dist/client/assets/category-editor-BEomaUlT.js +0 -1
- package/dist/client/assets/choose-editor-CptxA-2o.js +0 -1
- package/dist/client/assets/cms-settings-editor-q2PD6d-f.js +0 -1
- package/dist/client/assets/collection-detail-BFFv8EBD.js +0 -1
- package/dist/client/assets/connection-detail-NnYjF1KC.js +0 -1
- package/dist/client/assets/connections-Bs7MQX46.js +0 -1
- package/dist/client/assets/context-NTAokEvz.js +0 -1
- package/dist/client/assets/file-explorer-_xEpPcaK.js +0 -2
- package/dist/client/assets/general-C0agZL75.js +0 -1
- package/dist/client/assets/home-b8Q92l_T.js +0 -1
- package/dist/client/assets/index-C4wvi2v7.css +0 -1
- package/dist/client/assets/index-DETAJcho.js +0 -4
- package/dist/client/assets/index-DOrEGYb6.js +0 -1
- package/dist/client/assets/library-BD-JkXMr.js +0 -1
- package/dist/client/assets/named-rule-view-D1pVQoPd.js +0 -1
- package/dist/client/assets/openai-conversation-naly2gFj.js +0 -3
- package/dist/client/assets/plan-C-tbQnGr.js +0 -1
- package/dist/client/assets/post-calendar-B4Ra6fFT.js +0 -1
- package/dist/client/assets/project-app-view-CfT_gJz2.js +0 -1
- package/dist/client/assets/project-apps-B5076YmV.js +0 -1
- package/dist/client/assets/project-reports-Cc5D1Wqe.js +0 -1
- package/dist/client/assets/project-tasks-BzeYrrtq.js +0 -1
- package/dist/client/assets/projects-0NQRxQMi.js +0 -1
- package/dist/client/assets/record-editor-BiyfqDBa.js +0 -1
- package/dist/client/assets/redirect-editor-CysPkosR.js +0 -1
- package/dist/client/assets/reports-CuT-F3LQ.js +0 -1
- package/dist/client/assets/reports-onboarding-COfLbzIl.js +0 -1
- package/dist/client/assets/reports-tab-BNdKCtPv.js +0 -2
- package/dist/client/assets/repositories-BcVuKWWr.js +0 -1
- package/dist/client/assets/resolve-tab-icon-CCnYS1It.js +0 -1
- package/dist/client/assets/review-settings-Cfg9u4wr.js +0 -1
- package/dist/client/assets/roles-DNr0gwrs.js +0 -1
- package/dist/client/assets/route-Bny9Lc4o.js +0 -1
- package/dist/client/assets/route-CpGHqQae.js +0 -1
- package/dist/client/assets/route-zFj6XsMD.js +0 -1
- package/dist/client/assets/schema-CAZOGJTH.js +0 -1
- package/dist/client/assets/sections-editor-FJjN0xqY.js +0 -1
- package/dist/client/assets/settings-tab-CoHHJ63I.js +0 -1
- package/dist/client/assets/shell-layout-DfpoOTvP.js +0 -1
- package/dist/client/assets/site-editor-OTjpPpEJ.js +0 -1
- package/dist/client/assets/site-editor-toast-DI5QMuI-.js +0 -1
- package/dist/client/assets/skills-sOnNG6z3.js +0 -1
- package/dist/client/assets/tasks-BjMbQPZT.js +0 -1
- package/dist/client/assets/thread-analytics-TKt2gIA9.js +0 -1
- package/dist/client/assets/thread-route-BmXDes0-.js +0 -1
- package/dist/client/assets/use-apply-named-rule-c0_gPvLu.js +0 -1
- package/dist/client/assets/use-ask-in-chat-DQt8TEjL.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BzyehgAq.js +0 -1
- package/dist/client/assets/use-blog-view-BPx89KE1.js +0 -1
- package/dist/client/assets/use-organization-settings-CeyizmcT.js +0 -1
- package/dist/client/assets/use-sandbox-events-CrjWSBYb.js +0 -2
- package/dist/client/assets/useInfiniteQuery-EaWUgCtN.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D-KEcWQs.js +0 -1
- package/dist/client/assets/variant-calendar-56I1fIKh.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as P,r as De,c as k,R as Ie,t as Pe,v as se,w as E,x as Oe,T as H,y as je,z as M,A as L,B as ve,D as Q,G as Z,H as Fe,I as _e,J as Ve,K as Ke,L as q,f as Xe}from"./usage-stats-BbuSELy1.js";const qe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ue=P.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",k(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,o,l,r,s;const c=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",i=(o=(l=e.attrs)===null||l===void 0?void 0:l.alt)!==null&&o!==void 0?o:"",a=(r=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&r!==void 0?r:"";return a?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,l=new Set(["src","width","height"]);return({node:r,getPos:s,HTMLAttributes:c,editor:i})=>{const a=document.createElement("img");a.draggable=!1;const d=k(this.options.HTMLAttributes,c);Object.entries(d).forEach(([w,S])=>{if(S!=null)switch(w){case"src":case"width":case"height":break;default:a.setAttribute(w,S)}}),d.src!==null&&(a.src=d.src);let u={...c};const f=w=>{if(typeof w=="string"&&w!==""){a.getAttribute("src")!==w&&(a.src=w);return}a.hasAttribute("src")&&a.removeAttribute("src"),a.src!==""&&(a.src="")};f(c.src);const p=w=>{if(w.type!==r.type)return!1;const S=i.extensionManager.attributes.filter(A=>A.type===w.type.name),y=Pe(w,S);return Object.keys(u).forEach(A=>{!l.has(A)&&!(A in y)&&a.removeAttribute(A)}),Object.entries(y).forEach(([A,R])=>{l.has(A)||(R!=null?a.setAttribute(A,R):a.removeAttribute(A))}),f(y.src),u=y,!0},h=new Ie({element:a,editor:i,node:r,getPos:s,onResize:(w,S)=>{a.style.width=`${w}px`,a.style.height=`${S}px`},onCommit:(w,S)=>{const y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:w,height:S}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:o===!0}}),g=h.dom,m=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",a.complete&&a.naturalWidth>0?m():(a.onload=m,a.onerror=m),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[De({find:qe,type:this.type,getAttributes:e=>{const[,,t,n,o]=e;return{src:n,alt:t,title:o}}})]}});var un=Ue;let ee,te;if(typeof WeakMap<"u"){let e=new WeakMap;ee=t=>e.get(t),te=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;ee=o=>{for(let l=0;l<e.length;l+=2)if(e[l]==o)return e[l+1]},te=(o,l)=>(n==10&&(n=0),e[n++]=o,e[n++]=l)}var C=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,l=t/this.width|0;let r=o+1,s=l+1;for(let c=1;r<this.width&&this.map[t+c]==n;c++)r++;for(let c=1;s<this.height&&this.map[t+this.width*c]==n;c++)s++;return{left:o,top:l,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:o,right:l,top:r,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?o==0:l==this.width)?null:this.map[r*this.width+(n<0?o-1:l)]:(n<0?r==0:s==this.height)?null:this.map[o+this.width*(n<0?r-1:s)]}rectBetween(e,t){const{left:n,right:o,top:l,bottom:r}=this.findCell(e),{left:s,right:c,top:i,bottom:a}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(l,i),right:Math.max(o,c),bottom:Math.max(r,a)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let l=e.left;l<e.right;l++){const r=o*this.width+l,s=this.map[r];n[s]||(n[s]=!0,!(l==e.left&&l&&this.map[r-1]==s||o==e.top&&o&&this.map[r-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let o=0,l=0;;o++){const r=l+n.child(o).nodeSize;if(o==e){let s=t+e*this.width;const c=(e+1)*this.width;for(;s<c&&this.map[s]<l;)s++;return s==c?r-1:this.map[s]}l=r}}static get(e){return ee(e)||te(e,Je(e))}};function Je(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Ge(e),n=e.childCount,o=[];let l=0,r=null;const s=[];for(let a=0,d=t*n;a<d;a++)o[a]=0;for(let a=0,d=0;a<n;a++){const u=e.child(a);d++;for(let h=0;;h++){for(;l<o.length&&o[l]!=0;)l++;if(h==u.childCount)break;const g=u.child(h),{colspan:m,rowspan:w,colwidth:S}=g.attrs;for(let y=0;y<w;y++){if(y+a>=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:w-y});break}const A=l+y*t;for(let R=0;R<m;R++){o[A+R]==0?o[A+R]=d:(r||(r=[])).push({type:"collision",row:a,pos:d,n:m-R});const O=S&&S[R];if(O){const D=(A+R)%t*2,G=s[D];G==null||G!=O&&s[D+1]==1?(s[D]=O,s[D+1]=1):G==O&&s[D+1]++}}}l+=m,d+=g.nodeSize}const f=(a+1)*t;let p=0;for(;l<f;)o[l++]==0&&p++;p&&(r||(r=[])).push({type:"missing",row:a,n:p}),d++}(t===0||n===0)&&(r||(r=[])).push({type:"zero_sized"});const c=new C(t,n,o,r);let i=!1;for(let a=0;!i&&a<s.length;a+=2)s[a]!=null&&s[a+1]<n&&(i=!0);return i&&Ye(c,s,e),c}function Ge(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const l=e.child(o);let r=0;if(n)for(let s=0;s<o;s++){const c=e.child(s);for(let i=0;i<c.childCount;i++){const a=c.child(i);s+a.attrs.rowspan>o&&(r+=a.attrs.colspan)}}for(let s=0;s<l.childCount;s++){const c=l.child(s);r+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}t==-1?t=r:t!=r&&(t=Math.max(t,r))}return t}function Ye(e,t,n){e.problems||(e.problems=[]);const o={};for(let l=0;l<e.map.length;l++){const r=e.map[l];if(o[r])continue;o[r]=!0;const s=n.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let c=null;const i=s.attrs;for(let a=0;a<i.colspan;a++){const d=t[(l+a)%e.width*2];d!=null&&(!i.colwidth||i.colwidth[a]!=d)&&((c||(c=Qe(i)))[a]=d)}c&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:c})}}function Qe(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function v(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],l=o.spec.tableRole;l&&(t[l]=o)}}return t}const $=new se("selectingCells");function W(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Ze(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function T(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function J(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=W(t.$head)||et(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function et(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ne(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function tt(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ie(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Re(e,t,n){const o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.nextCell(e.pos-r,t,n);return s==null?null:e.node(0).resolve(r+s)}function B(e,t,n=1){const o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function xe(e,t,n=1){const o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;l<n;l++)o.colwidth.splice(t,0,0)}return o}function nt(e,t,n){const o=v(t.type.schema).header_cell;for(let l=0;l<e.height;l++)if(t.nodeAt(e.map[n+l*e.width]).type!=o)return!1;return!0}var b=class N extends E{constructor(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.rectBetween(t.pos-r,n.pos-r),c=t.node(0),i=l.cellsInRect(s).filter(d=>d!=n.pos-r);i.unshift(n.pos-r);const a=i.map(d=>{const u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);const f=r+d+1;return new je(c.resolve(f),c.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),l=t.resolve(n.map(this.$headCell.pos));if(ne(o)&&ne(l)&&ie(o,l)){const r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?N.rowSelection(o,l):r&&this.isColSelection()?N.colSelection(o,l):new N(o,l)}return H.between(o,l)}content(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let i=l.top;i<l.bottom;i++){const a=[];for(let d=i*n.width+l.left,u=l.left;u<l.right;u++,d++){const f=n.map[d];if(r[f])continue;r[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);const g=l.left-p.left,m=p.right-l.right;if(g>0||m>0){let w=h.attrs;if(g>0&&(w=B(w,0,g)),m>0&&(w=B(w,w.colspan-m,m)),p.left<l.left){if(h=h.type.createAndFill(w),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else h=h.type.create(w,h.content)}if(p.top<l.top||p.bottom>l.bottom){const w={...h.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top<l.top?h=h.type.createAndFill(w):h=h.type.create(w,h.content)}a.push(h)}s.push(t.child(i).copy(M.from(a)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new L(M.from(c),1,1)}replace(t,n=L.empty){const o=t.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){const{$from:c,$to:i}=l[s],a=t.mapping.slice(o);t.replace(a.map(c.pos),a.map(i.pos),s?L.empty:n)}const r=E.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);r&&t.setSelection(r)}replaceWith(t,n){this.replace(t,new L(M.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=C.get(n),l=this.$anchorCell.start(-1),r=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-l,this.$headCell.pos-l));for(let s=0;s<r.length;s++)t(n.nodeAt(r[s]),l+r[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.top<=c.top?(s.top>0&&(t=i.resolve(r+l.map[s.left])),c.bottom<l.height&&(n=i.resolve(r+l.map[l.width*(l.height-1)+c.right-1]))):(c.top>0&&(n=i.resolve(r+l.map[c.left])),s.bottom<l.height&&(t=i.resolve(r+l.map[l.width*(l.height-1)+s.right-1]))),new N(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.colCount(this.$anchorCell.pos-o),r=n.colCount(this.$headCell.pos-o);if(Math.min(l,r)>0)return!1;const s=l+this.$anchorCell.nodeAfter.attrs.colspan,c=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,c)==n.width}eq(t){return t instanceof N&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.left<=c.left?(s.left>0&&(t=i.resolve(r+l.map[s.top*l.width])),c.right<l.width&&(n=i.resolve(r+l.map[l.width*(c.top+1)-1]))):(c.left>0&&(n=i.resolve(r+l.map[c.top*l.width])),s.right<l.width&&(t=i.resolve(r+l.map[l.width*(s.top+1)-1]))),new N(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new N(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new N(t.resolve(n),t.resolve(o))}getBookmark(){return new ot(this.$anchorCell.pos,this.$headCell.pos)}};b.prototype.visible=!1;E.jsonID("cell",b);var ot=class Te{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Te(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),o=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&ie(n,o)?new b(n,o):E.near(o,1)}};function lt(e){if(!(e.selection instanceof b))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Z.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Q.create(e.doc,t)}function rt({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,o=t.pos,l=e.depth;for(;l>=0&&!(e.after(l+1)<e.end(l));l--,n++);for(let r=t.depth;r>=0&&!(t.before(r+1)>t.start(r));r--,o--);return n==o&&/row|table/.test(e.node(l).type.spec.tableRole)}function st({$from:e,$to:t}){let n,o;for(let l=e.depth;l>0;l--){const r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=t.depth;l>0;l--){const r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&t.parentOffset===0}function it(e,t,n){const o=(t||e).selection,l=(t||e).doc;let r,s;if(o instanceof Fe&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=b.create(l,o.from);else if(s=="row"){const c=l.resolve(o.from+1);r=b.rowSelection(c,c)}else if(!n){const c=C.get(o.node),i=o.from+1,a=i+c.map[c.width*c.height-1];r=b.create(l,i+1,a)}}else o instanceof H&&rt(o)?r=H.create(l,o.from):o instanceof H&&st(o)&&(r=H.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}const ct=new se("fix-tables");function Me(e,t,n,o){const l=e.childCount,r=t.childCount;e:for(let s=0,c=0;s<r;s++){const i=t.child(s);for(let a=c,d=Math.min(l,s+3);a<d;a++)if(e.child(a)==i){c=a+1,n+=i.nodeSize;continue e}o(i,n),c<l&&e.child(c).sameMarkup(i)?Me(e.child(c),i,n+1,o):i.nodesBetween(0,i.content.size,o,n+1),n+=i.nodeSize}}function ze(e,t){let n;const o=(l,r)=>{l.type.spec.tableRole=="table"&&(n=at(e,l,r,n))};return t?t.doc!=e.doc&&Me(t.doc,e.doc,0,o):e.doc.descendants(o),n}function at(e,t,n,o){const l=C.get(t);if(!l.problems)return o;o||(o=e.tr);const r=[];for(let i=0;i<l.height;i++)r.push(0);for(let i=0;i<l.problems.length;i++){const a=l.problems[i];if(a.type=="collision"){const d=t.nodeAt(a.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)r[a.row+f]+=a.n;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,B(u,u.colspan-a.n,a.n))}else if(a.type=="missing")r[a.row]+=a.n;else if(a.type=="overlong_rowspan"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-a.n})}else if(a.type=="colwidth mismatch"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,colwidth:a.colwidth})}else if(a.type=="zero_sized"){const d=o.mapping.map(n);o.delete(d,d+t.nodeSize)}}let s,c;for(let i=0;i<r.length;i++)r[i]&&(s==null&&(s=i),c=i);for(let i=0,a=n+1;i<l.height;i++){const d=t.child(i),u=a+d.nodeSize,f=r[i];if(f>0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);const h=[];for(let m=0;m<f;m++){const w=v(e.schema)[p].createAndFill();w&&h.push(w)}const g=(i==0||s==i-1)&&c==i?a+1:u-1;o.insert(o.mapping.map(g),h)}a=u}return o.setMeta(ct,{fixTables:!0})}function z(e){const t=e.selection,n=J(e),o=n.node(-1),l=n.start(-1),r=C.get(o);return{...t instanceof b?r.rectBetween(t.$anchorCell.pos-l,t.$headCell.pos-l):r.findCell(n.pos-l),tableStart:l,map:r,table:o}}function Ne(e,{map:t,tableStart:n,table:o},l){let r=l>0?-1:0;nt(t,o,l+r)&&(r=l==0||l==t.width?null:0);for(let s=0;s<t.height;s++){const c=s*t.width+l;if(l>0&&l<t.width&&t.map[c-1]==t.map[c]){const i=t.map[c],a=o.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,xe(a.attrs,l-t.colCount(i))),s+=a.attrs.rowspan-1}else{const i=r==null?v(o.type.schema).cell:o.nodeAt(t.map[c+r]).type,a=t.positionAt(s,l,o);e.insert(e.mapping.map(n+a),i.createAndFill())}}return e}function dt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.left))}return!0}function ut(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.right))}return!0}function ft(e,{map:t,table:n,tableStart:o},l){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const c=s*t.width+l,i=t.map[c],a=n.nodeAt(i),d=a.attrs;if(l>0&&t.map[c-1]==i||l<t.width-1&&t.map[c+1]==i)e.setNodeMarkup(e.mapping.slice(r).map(o+i),null,B(d,l-t.colCount(i)));else{const u=e.mapping.slice(r).map(o+i);e.delete(u,u+a.nodeSize)}s+=d.rowspan}}function ht(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let l=n.right-1;ft(o,n,l),l!=n.left;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(r)}t(o)}return!0}function pt(e,t,n){var o;const l=v(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if(((o=t.nodeAt(e.map[r+n*e.width]))===null||o===void 0?void 0:o.type)!=l)return!1;return!0}function Ee(e,{map:t,tableStart:n,table:o},l){let r=n;for(let a=0;a<l;a++)r+=o.child(a).nodeSize;const s=[];let c=l>0?-1:0;pt(t,o,l+c)&&(c=l==0||l==t.height?null:0);for(let a=0,d=t.width*l;a<t.width;a++,d++)if(l>0&&l<t.height&&t.map[d]==t.map[d-t.width]){const u=t.map[d],f=o.nodeAt(u).attrs;e.setNodeMarkup(n+u,null,{...f,rowspan:f.rowspan+1}),a+=f.colspan-1}else{var i;const u=c==null?v(o.type.schema).cell:(i=o.nodeAt(t.map[d+c*t.width]))===null||i===void 0?void 0:i.type,f=u?.createAndFill();f&&s.push(f)}return e.insert(r,v(o.type.schema).row.create(null,s)),e}function mt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.top))}return!0}function gt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.bottom))}return!0}function wt(e,{map:t,table:n,tableStart:o},l){let r=0;for(let a=0;a<l;a++)r+=n.child(a).nodeSize;const s=r+n.child(l).nodeSize,c=e.mapping.maps.length;e.delete(r+o,s+o);const i=new Set;for(let a=0,d=l*t.width;a<t.width;a++,d++){const u=t.map[d];if(!i.has(u)){if(i.add(u),l>0&&u==t.map[d-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l<t.height&&u==t.map[d+t.width]){const f=n.nodeAt(u),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=t.positionAt(l+1,a,n);e.insert(e.mapping.slice(c).map(o+g),h),a+=p.colspan-1}}}}function bt(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let l=n.bottom-1;wt(o,n,l),l!=n.top;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(n.table)}t(o)}return!0}function ce(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function Ct({width:e,height:t,map:n},o){let l=o.top*e+o.left,r=l,s=(o.bottom-1)*e+o.left,c=l+(o.right-o.left-1);for(let i=o.top;i<o.bottom;i++){if(o.left>0&&n[r]==n[r-1]||o.right<e&&n[c]==n[c+1])return!0;r+=e,c+=e}for(let i=o.left;i<o.right;i++){if(o.top>0&&n[l]==n[l-e]||o.bottom<t&&n[s]==n[s+e])return!0;l++,s++}return!1}function ae(e,t){const n=e.selection;if(!(n instanceof b)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=z(e),{map:l}=o;if(Ct(l,o))return!1;if(t){const r=e.tr,s={};let c=M.empty,i,a;for(let d=o.top;d<o.bottom;d++)for(let u=o.left;u<o.right;u++){const f=l.map[d*l.width+u],p=o.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,i==null)i=f,a=p;else{ce(p)||(c=c.append(p.content));const h=r.mapping.map(f+o.tableStart);r.delete(h,h+p.nodeSize)}}if(i==null||a==null)return!0;if(r.setNodeMarkup(i+o.tableStart,null,{...xe(a.attrs,a.attrs.colspan,o.right-o.left-a.attrs.colspan),rowspan:o.bottom-o.top}),c.size>0){const d=i+1+a.content.size,u=ce(a)?i+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,c)}r.setSelection(new b(r.doc.resolve(i+o.tableStart))),t(r)}return!0}function de(e,t){const n=v(e.schema);return yt(({node:o})=>n[o.type.spec.tableRole])(e,t)}function yt(e){return(t,n)=>{const o=t.selection;let l,r;if(o instanceof b){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=Ze(o.$from),!l)return!1;r=(s=W(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let c=l.attrs;const i=[],a=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const d=z(t),u=t.tr;for(let p=0;p<d.right-d.left;p++)i.push(a?{...c,colwidth:a&&a[p]?[a[p]]:null}:c);let f;for(let p=d.top;p<d.bottom;p++){let h=d.map.positionAt(p,d.left,d.table);p==d.top&&(h+=l.nodeSize);for(let g=d.left,m=0;g<d.right;g++,m++)g==d.left&&p==d.top||u.insert(f=u.mapping.map(h+d.tableStart,1),e({node:l,row:p,col:g}).createAndFill(i[m]))}u.setNodeMarkup(r,e({node:l,row:d.top,col:d.left}),i[0]),o instanceof b&&u.setSelection(new b(u.doc.resolve(o.$anchorCell.pos),f?u.doc.resolve(f):void 0)),n(u)}return!0}}function At(e,t){return function(n,o){if(!T(n))return!1;const l=J(n);if(l.nodeAfter.attrs[e]===t)return!1;if(o){const r=n.tr;n.selection instanceof b?n.selection.forEachCell((s,c)=>{s.attrs[e]!==t&&r.setNodeMarkup(c,null,{...s.attrs,[e]:t})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[e]:t}),o(r)}return!0}}function St(e){return function(t,n){if(!T(t))return!1;if(n){const o=v(t.schema),l=z(t),r=t.tr,s=l.map.cellsInRect(e=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:e=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),c=s.map(i=>l.table.nodeAt(i));for(let i=0;i<s.length;i++)c[i].type==o.header_cell&&r.setNodeMarkup(l.tableStart+s[i],o.cell,c[i].attrs);if(r.steps.length===0)for(let i=0;i<s.length;i++)r.setNodeMarkup(l.tableStart+s[i],o.header_cell,c[i].attrs);n(r)}return!0}}function ue(e,t,n){const o=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let l=0;l<o.length;l++){const r=t.table.nodeAt(o[l]);if(r&&r.type!==n.header_cell)return!1}return!0}function I(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?St(e):function(n,o){if(!T(n))return!1;if(o){const l=v(n.schema),r=z(n),s=n.tr,c=ue("row",r,l),i=ue("column",r,l),a=(e==="column"?c:e==="row"&&i)?1:0,d=e=="column"?{left:0,top:a,right:1,bottom:r.map.height}:e=="row"?{left:a,top:0,right:r.map.width,bottom:1}:r,u=e=="column"?i?l.cell:l.header_cell:e=="row"?c?l.cell:l.header_cell:l.cell;r.map.cellsInRect(d).forEach(f=>{const p=f+r.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,u,h.attrs)}),o(s)}return!0}}I("row",{useDeprecatedLogic:!0});I("column",{useDeprecatedLogic:!0});const vt=I("cell",{useDeprecatedLogic:!0});function Rt(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,l=e.before();o>=0;o--){const r=e.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let o=e.indexAfter(-1),l=e.after();o<n.childCount;o++){const r=n.child(o);if(r.childCount)return l+1;l+=r.nodeSize}}return null}function fe(e){return function(t,n){if(!T(t))return!1;const o=Rt(J(t),e);if(o==null)return!1;if(n){const l=t.doc.resolve(o);n(t.tr.setSelection(H.between(l,tt(l))).scrollIntoView())}return!0}}function xt(e,t){const n=e.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function j(e,t){const n=e.selection;if(!(n instanceof b))return!1;if(t){const o=e.tr,l=v(e.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new L(l,0,0))}),o.docChanged&&t(o)}return!0}function Tt(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const l=t.child(0),r=l.type.spec.tableRole,s=l.type.schema,c=[];if(r=="row")for(let i=0;i<t.childCount;i++){let a=t.child(i).content;const d=i?0:Math.max(0,n-1),u=i<t.childCount-1?0:Math.max(0,o-1);(d||u)&&(a=oe(v(s).row,new L(a,d,u)).content),c.push(a)}else if(r=="cell"||r=="header_cell")c.push(n||o?oe(v(s).row,new L(t,n,o)).content:t);else return null;return Mt(s,c)}function Mt(e,t){const n=[];for(let l=0;l<t.length;l++){const r=t[l];for(let s=r.childCount-1;s>=0;s--){const{rowspan:c,colspan:i}=r.child(s).attrs;for(let a=l;a<l+c;a++)n[a]=(n[a]||0)+i}}let o=0;for(let l=0;l<n.length;l++)o=Math.max(o,n[l]);for(let l=0;l<n.length;l++)if(l>=t.length&&t.push(M.empty),n[l]<o){const r=v(e).cell.createAndFill(),s=[];for(let c=n[l];c<o;c++)s.push(r);t[l]=t[l].append(M.from(s))}return{height:t.length,width:o,rows:t}}function oe(e,t){const n=e.createAndFill();return new _e(n).replace(0,n.content.size,t).doc}function zt({width:e,height:t,rows:n},o,l){if(e!=o){const r=[],s=[];for(let c=0;c<n.length;c++){const i=n[c],a=[];for(let d=r[c]||0,u=0;d<o;u++){let f=i.child(u%i.childCount);d+f.attrs.colspan>o&&(f=f.type.createChecked(B(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)r[c+p]=(r[c+p]||0)+f.attrs.colspan}s.push(M.from(a))}n=s,e=o}if(t!=l){const r=[];for(let s=0,c=0;s<l;s++,c++){const i=[],a=n[c%t];for(let d=0;d<a.childCount;d++){let u=a.child(d);s+u.attrs.rowspan>l&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),i.push(u)}r.push(M.from(i))}n=r,t=l}return{width:e,height:t,rows:n}}function Nt(e,t,n,o,l,r,s){const c=e.doc.type.schema,i=v(c);let a,d;if(l>t.width)for(let u=0,f=0;u<t.height;u++){const p=n.child(u);f+=p.nodeSize;const h=[];let g;p.lastChild==null||p.lastChild.type==i.cell?g=a||(a=i.cell.createAndFill()):g=d||(d=i.header_cell.createAndFill());for(let m=t.width;m<l;m++)h.push(g);e.insert(e.mapping.slice(s).map(f-1+o),h)}if(r>t.height){const u=[];for(let h=0,g=(t.height-1)*t.width;h<Math.max(t.width,l);h++){const m=h>=t.width?!1:n.nodeAt(t.map[g+h]).type==i.header_cell;u.push(m?d||(d=i.header_cell.createAndFill()):a||(a=i.cell.createAndFill()))}const f=i.row.create(null,M.from(u)),p=[];for(let h=t.height;h<r;h++)p.push(f);e.insert(e.mapping.slice(s).map(o+n.nodeSize-2),p)}return!!(a||d)}function he(e,t,n,o,l,r,s,c){if(s==0||s==t.height)return!1;let i=!1;for(let a=l;a<r;a++){const d=s*t.width+a,u=t.map[d];if(t.map[d-t.width]==u){i=!0;const f=n.nodeAt(u),{top:p,left:h}=t.findCell(u);e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(c).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),a+=f.attrs.colspan-1}}return i}function pe(e,t,n,o,l,r,s,c){if(s==0||s==t.width)return!1;let i=!1;for(let a=l;a<r;a++){const d=a*t.width+s,u=t.map[d];if(t.map[d-1]==u){i=!0;const f=n.nodeAt(u),p=t.colCount(u),h=e.mapping.slice(c).map(u+o);e.setNodeMarkup(h,null,B(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(B(f.attrs,0,s-p))),a+=f.attrs.rowspan-1}}return i}function me(e,t,n,o,l){let r=n?e.doc.nodeAt(n-1):e.doc;if(!r)throw new Error("No table found");let s=C.get(r);const{top:c,left:i}=o,a=i+l.width,d=c+l.height,u=e.tr;let f=0;function p(){if(r=n?u.doc.nodeAt(n-1):u.doc,!r)throw new Error("No table found");s=C.get(r),f=u.mapping.maps.length}Nt(u,s,r,n,a,d,f)&&p(),he(u,s,r,n,i,a,c,f)&&p(),he(u,s,r,n,i,a,d,f)&&p(),pe(u,s,r,n,c,d,i,f)&&p(),pe(u,s,r,n,c,d,a,f)&&p();for(let h=c;h<d;h++){const g=s.positionAt(h,i,r),m=s.positionAt(h,a,r);u.replace(u.mapping.slice(f).map(g+n),u.mapping.slice(f).map(m+n),new L(l.rows[h-c],0,0))}p(),u.setSelection(new b(u.doc.resolve(n+s.positionAt(c,i,r)),u.doc.resolve(n+s.positionAt(d-1,a-1,r)))),t(u)}const Et=Oe({ArrowLeft:F("horiz",-1),ArrowRight:F("horiz",1),ArrowUp:F("vert",-1),ArrowDown:F("vert",1),"Shift-ArrowLeft":_("horiz",-1),"Shift-ArrowRight":_("horiz",1),"Shift-ArrowUp":_("vert",-1),"Shift-ArrowDown":_("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function K(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function F(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;if(r instanceof b)return K(n,o,E.near(r.$headCell,t));if(e!="horiz"&&!r.empty)return!1;const s=He(l,e,t);if(s==null)return!1;if(e=="horiz")return K(n,o,E.near(n.doc.resolve(r.head+t),t));{const c=n.doc.resolve(s),i=Re(c,e,t);let a;return i?a=E.near(i,1):t<0?a=E.near(n.doc.resolve(c.before(-1)),-1):a=E.near(n.doc.resolve(c.after(-1)),1),K(n,o,a)}}}function _(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;let s;if(r instanceof b)s=r;else{const i=He(l,e,t);if(i==null)return!1;s=new b(n.doc.resolve(i))}const c=Re(s.$headCell,e,t);return c?K(n,o,new b(s.$anchorCell,c)):!1}}function Ht(e,t){const n=e.state.doc,o=W(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new b(o))),!0):!1}function $t(e,t,n){if(!T(e.state))return!1;let o=Tt(n);const l=e.state.selection;if(l instanceof b){o||(o={width:1,height:1,rows:[M.from(oe(v(e.state.schema).cell,n))]});const r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),c=C.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=zt(o,c.right-c.left,c.bottom-c.top),me(e.state,e.dispatch,s,c,o),!0}else if(o){const r=J(e.state),s=r.start(-1);return me(e.state,e.dispatch,s,C.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Lt(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const o=ge(e,t.target);let l;if(t.shiftKey&&e.state.selection instanceof b)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(l=W(e.state.selection.$anchor))!=null&&((n=Y(e,t))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,t),t.preventDefault();else if(!o)return;function r(i,a){let d=Y(e,a);const u=$.getState(e.state)==null;if(!d||!ie(i,d))if(u)d=i;else return;const f=new b(i,d);if(u||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);u&&p.setMeta($,i.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",c),$.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta($,-1))}function c(i){const a=i,d=$.getState(e.state);let u;if(d!=null)u=e.state.doc.resolve(d);else if(ge(e,a.target)!=o&&(u=Y(e,t),!u))return s();u&&r(u,a)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",c)}function He(e,t,n){if(!(e.state.selection instanceof H))return null;const{$head:o}=e.state.selection;for(let l=o.depth-1;l>=0;l--){const r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){const s=o.before(l),c=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?s:null}}return null}function ge(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&W(e.state.doc.resolve(o))||W(e.state.doc.resolve(l))}var kt=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),le(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,le(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function le(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a){for(let u=0,f=0;u<a.childCount;u++){const{colspan:p,colwidth:h}=a.child(u).attrs;for(let g=0;g<p;g++,f++){const m=l==f?r:h&&h[g],w=m?m+"px":"";if(s+=m||o,m||(c=!1),i)i.style.width!=w&&(i.style.width=w),i=i.nextSibling;else{const S=document.createElement("col");S.style.width=w,t.appendChild(S)}}}for(;i;){var d;const u=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=u}c?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const x=new se("tableColumnResizing");function Wt({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:o=kt,lastColumnResizable:l=!0}={}){const r=new ve({key:x,state:{init(s,c){var i;const a=(i=r.spec)===null||i===void 0||(i=i.props)===null||i===void 0?void 0:i.nodeViews,d=v(c.schema).table.name;return o&&a&&(a[d]=(u,f)=>new o(u,n,f)),new Bt(-1,!1)},apply(s,c){return c.apply(s)}},props:{attributes:s=>{const c=x.getState(s);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,c)=>{Dt(s,c,e,l)},mouseleave:s=>{It(s)},mousedown:(s,c)=>{Pt(s,c,t,n)}},decorations:s=>{const c=x.getState(s);if(c&&c.activeHandle>-1)return Vt(s,c.activeHandle)},nodeViews:{}}});return r}var Bt=class X{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(x);if(o&&o.setHandle!=null)return new X(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new X(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let l=t.mapping.map(n.activeHandle,-1);return ne(t.doc.resolve(l))||(l=-1),new X(l,n.dragging)}return n}};function Dt(e,t,n,o){if(!e.editable)return;const l=x.getState(e.state);if(l&&!l.dragging){const r=jt(t.target);let s=-1;if(r){const{left:c,right:i}=r.getBoundingClientRect();t.clientX-c<=n?s=we(e,t,"left",n):i-t.clientX<=n&&(s=we(e,t,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){const c=e.state.doc.resolve(s),i=c.node(-1),a=C.get(i),d=c.start(-1);if(a.colCount(c.pos-d)+c.nodeAfter.attrs.colspan-1==a.width-1)return}$e(e,s)}}}function It(e){if(!e.editable)return;const t=x.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&$e(e,-1)}function Pt(e,t,n,o){var l;if(!e.editable)return!1;const r=(l=e.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=x.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const c=e.state.doc.nodeAt(s.activeHandle),i=Ot(e,s.activeHandle,c.attrs);e.dispatch(e.state.tr.setMeta(x,{setDragging:{startX:t.clientX,startWidth:i}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);const f=x.getState(e.state);f?.dragging&&(Ft(e,f.activeHandle,be(f.dragging,u,n)),e.dispatch(e.state.tr.setMeta(x,{setDragging:null})))}function d(u){if(!u.which)return a(u);const f=x.getState(e.state);if(f&&f.dragging){const p=be(f.dragging,u,n);Ce(e,f.activeHandle,p,o)}}return Ce(e,s.activeHandle,i,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),t.preventDefault(),!0}function Ot(e,t,{colspan:n,colwidth:o}){const l=o&&o[o.length-1];if(l)return l;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,c=n;if(o)for(let i=0;i<n;i++)o[i]&&(s-=o[i],c--);return s/c}function jt(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function we(e,t,n,o){const l=n=="right"?-o:o,r=e.posAtCoords({left:t.clientX+l,top:t.clientY});if(!r)return-1;const{pos:s}=r,c=W(e.state.doc.resolve(s));if(!c)return-1;if(n=="right")return c.pos;const i=C.get(c.node(-1)),a=c.start(-1),d=i.map.indexOf(c.pos-a);return d%i.width==0?-1:a+i.map[d-1]}function be(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function $e(e,t){e.dispatch(e.state.tr.setMeta(x,{setHandle:t}))}function Ft(e,t,n){const o=e.state.doc.resolve(t),l=o.node(-1),r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,i=e.state.tr;for(let a=0;a<r.height;a++){const d=a*r.width+c;if(a&&r.map[d]==r.map[d-r.width])continue;const u=r.map[d],f=l.nodeAt(u).attrs,p=f.colspan==1?0:c-r.colCount(u);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():_t(f.colspan);h[p]=n,i.setNodeMarkup(s+u,null,{...f,colwidth:h})}i.docChanged&&e.dispatch(i)}function Ce(e,t,n,o){const l=e.state.doc.resolve(t),r=l.node(-1),s=l.start(-1),c=C.get(r).colCount(l.pos-s)+l.nodeAfter.attrs.colspan-1;let i=e.domAtPos(l.start(-1)).node;for(;i&&i.nodeName!="TABLE";)i=i.parentNode;i&&le(r,i.firstChild,i,o,c,n)}function _t(e){return Array(e).fill(0)}function Vt(e,t){const n=[],o=e.doc.resolve(t),l=o.node(-1);if(!l)return Q.empty;const r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<r.height;a++){const d=c+a*r.width;if((c==r.width-1||r.map[d]!=r.map[d+1])&&(a==0||r.map[d]!=r.map[d-r.width])){var i;const u=r.map[d],f=s+u+l.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((i=x.getState(e))===null||i===void 0)&&i.dragging&&n.push(Z.node(s+u,s+u+l.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),n.push(Z.widget(f,p))}}return Q.create(e.doc,n)}function Kt({allowTableNodeSelection:e=!1}={}){return new ve({key:$,state:{init(){return null},apply(t,n){const o=t.getMeta($);if(o!=null)return o==-1?null:o;if(n==null||!t.docChanged)return n;const{deleted:l,pos:r}=t.mapping.mapResult(n);return l?null:r}},props:{decorations:lt,handleDOMEvents:{mousedown:Lt},createSelectionBetween(t){return $.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Ht,handleKeyDown:Et,handlePaste:$t},appendTransaction(t,n,o){return it(o,ze(o,n),e)}})}function U(e){return e==="left"||e==="right"||e==="center"?e:null}function Xt(e){const t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return U(t||n)}function qt(e){return U(e?.align)}function Le(){return{default:null,parseHTML:e=>Xt(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function Ut(e){var t;const n=e.parentElement,o=e.closest("table");if(!n||!o)return null;const l=Array.from(n.children).indexOf(e),r=(t=o.querySelectorAll("colgroup > col")[l])===null||t===void 0?void 0:t.getAttribute("width");return r?[parseInt(r,10)]:null}function ke(e){const t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):Ut(e)}const Jt=/[ \t\r\n\f]+/g;function We(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(Jt,"")===""}function Be(e){const t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}const Gt=P.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",k(this.options.HTMLAttributes,e),0]}}),Yt=P.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",k(this.options.HTMLAttributes,e),0]}}),Qt=P.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",k(this.options.HTMLAttributes,e),0]}});function re(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ye(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a!==null)for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:h,colwidth:g}=a.child(f).attrs;for(let m=0;m<h;m+=1,p+=1){const w=l===p?r:g&&g[m],S=w?`${w}px`:"";if(s+=w||o,w||(c=!1),i){if(i.style.width!==S){const[y,A]=re(o,w);i.style.setProperty(y,A)}i=i.nextSibling}else{const y=document.createElement("col"),[A,R]=re(o,w);y.style.setProperty(A,R),t.appendChild(y)}}}for(;i;){var d;const f=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=f}const u=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);c&&!u?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var Zt=class{constructor(e,t,n,o={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[l,r]of Object.entries(o))r!=null&&(l==="style"?this.table.style.cssText=String(r):this.table.setAttribute(l,String(r)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ye(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,ye(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){const t=e.target,n=this.dom.contains(t),o=this.contentDOM.contains(t);return!!(n&&!o&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function en(e,t,n,o){let l=0,r=!0;const s=[],c=e.firstChild;if(!c)return{};for(let d=0,u=0;d<c.childCount;d+=1){const{colspan:f,colwidth:p}=c.child(d).attrs;for(let h=0;h<f;h+=1,u+=1){const g=n===u?o:p&&p[h];l+=g||t,g||(r=!1);const[m,w]=re(t,g);s.push(["col",{style:`${m}: ${w}`}])}}const i=r?`${l}px`:"",a=r?"":`${l}px`;return{colgroup:["colgroup",{},...s],tableWidth:i,tableMinWidth:a}}function Ae(e,t){return e.createAndFill()}function tn(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)}),e.cached.tableNodeTypes=t,t}function nn(e,t,n,o,l){const r=tn(e),s=[],c=[];for(let a=0;a<n;a+=1){const d=Ae(r.cell);if(d&&c.push(d),o){const u=Ae(r.header_cell);u&&s.push(u)}}const i=[];for(let a=0;a<t;a+=1)i.push(r.row.createChecked(null,o&&a===0?s:c));return r.table.createChecked(null,i)}function on(e){return e instanceof b}const V=({editor:e})=>{const{selection:t}=e.state;if(!on(t))return!1;let n=0;const o=q(t.ranges[0].$from,l=>l.type.name==="table");return o?.node.descendants(l=>{if(l.type.name==="table")return!1;["tableCell","tableHeader"].includes(l.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function Se(e,t){const n=e.mapping.map(t),o=q(e.selection.$from,s=>s.type.name==="table");if(o?.pos===n)return;const l=e.doc.nodeAt(n);if(!l)return;const r=n+l.nodeSize-1;e.setSelection(H.near(e.doc.resolve(r),-1))}function ln(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let o=0;for(;n+o<e.length&&e[n+o]==="`";)o+=1;let l=n+o,r=!1;for(;l<e.length;){if(e[l]!=="`"){l+=1;continue}let s=0;for(;l+s<e.length&&e[l+s]==="`";)s+=1;if(s===o){const c=e.slice(n+o,l);t+=e.slice(n,n+o)+c.replace(/\\\||\|/g,i=>i==="|"?"\\|":i)+e.slice(l,l+o),n=l+o,r=!0;break}l+=s}r||(t+=e.slice(n,n+o),n+=o)}return t}function rn(e){return e.split(`
|
|
1
|
+
import{N as P,r as De,c as k,R as Ie,t as Pe,v as se,w as E,x as Oe,T as H,y as je,z as M,A as L,B as ve,D as Q,G as Z,H as Fe,I as _e,J as Ve,K as Ke,L as q,f as Xe}from"./usage-stats-njGMuDih.js";const qe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ue=P.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",k(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,o,l,r,s;const c=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",i=(o=(l=e.attrs)===null||l===void 0?void 0:l.alt)!==null&&o!==void 0?o:"",a=(r=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&r!==void 0?r:"";return a?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,l=new Set(["src","width","height"]);return({node:r,getPos:s,HTMLAttributes:c,editor:i})=>{const a=document.createElement("img");a.draggable=!1;const d=k(this.options.HTMLAttributes,c);Object.entries(d).forEach(([w,S])=>{if(S!=null)switch(w){case"src":case"width":case"height":break;default:a.setAttribute(w,S)}}),d.src!==null&&(a.src=d.src);let u={...c};const f=w=>{if(typeof w=="string"&&w!==""){a.getAttribute("src")!==w&&(a.src=w);return}a.hasAttribute("src")&&a.removeAttribute("src"),a.src!==""&&(a.src="")};f(c.src);const p=w=>{if(w.type!==r.type)return!1;const S=i.extensionManager.attributes.filter(A=>A.type===w.type.name),y=Pe(w,S);return Object.keys(u).forEach(A=>{!l.has(A)&&!(A in y)&&a.removeAttribute(A)}),Object.entries(y).forEach(([A,R])=>{l.has(A)||(R!=null?a.setAttribute(A,R):a.removeAttribute(A))}),f(y.src),u=y,!0},h=new Ie({element:a,editor:i,node:r,getPos:s,onResize:(w,S)=>{a.style.width=`${w}px`,a.style.height=`${S}px`},onCommit:(w,S)=>{const y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:w,height:S}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:o===!0}}),g=h.dom,m=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",a.complete&&a.naturalWidth>0?m():(a.onload=m,a.onerror=m),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[De({find:qe,type:this.type,getAttributes:e=>{const[,,t,n,o]=e;return{src:n,alt:t,title:o}}})]}});var un=Ue;let ee,te;if(typeof WeakMap<"u"){let e=new WeakMap;ee=t=>e.get(t),te=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;ee=o=>{for(let l=0;l<e.length;l+=2)if(e[l]==o)return e[l+1]},te=(o,l)=>(n==10&&(n=0),e[n++]=o,e[n++]=l)}var C=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,l=t/this.width|0;let r=o+1,s=l+1;for(let c=1;r<this.width&&this.map[t+c]==n;c++)r++;for(let c=1;s<this.height&&this.map[t+this.width*c]==n;c++)s++;return{left:o,top:l,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:o,right:l,top:r,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?o==0:l==this.width)?null:this.map[r*this.width+(n<0?o-1:l)]:(n<0?r==0:s==this.height)?null:this.map[o+this.width*(n<0?r-1:s)]}rectBetween(e,t){const{left:n,right:o,top:l,bottom:r}=this.findCell(e),{left:s,right:c,top:i,bottom:a}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(l,i),right:Math.max(o,c),bottom:Math.max(r,a)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let l=e.left;l<e.right;l++){const r=o*this.width+l,s=this.map[r];n[s]||(n[s]=!0,!(l==e.left&&l&&this.map[r-1]==s||o==e.top&&o&&this.map[r-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let o=0,l=0;;o++){const r=l+n.child(o).nodeSize;if(o==e){let s=t+e*this.width;const c=(e+1)*this.width;for(;s<c&&this.map[s]<l;)s++;return s==c?r-1:this.map[s]}l=r}}static get(e){return ee(e)||te(e,Je(e))}};function Je(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Ge(e),n=e.childCount,o=[];let l=0,r=null;const s=[];for(let a=0,d=t*n;a<d;a++)o[a]=0;for(let a=0,d=0;a<n;a++){const u=e.child(a);d++;for(let h=0;;h++){for(;l<o.length&&o[l]!=0;)l++;if(h==u.childCount)break;const g=u.child(h),{colspan:m,rowspan:w,colwidth:S}=g.attrs;for(let y=0;y<w;y++){if(y+a>=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:w-y});break}const A=l+y*t;for(let R=0;R<m;R++){o[A+R]==0?o[A+R]=d:(r||(r=[])).push({type:"collision",row:a,pos:d,n:m-R});const O=S&&S[R];if(O){const D=(A+R)%t*2,G=s[D];G==null||G!=O&&s[D+1]==1?(s[D]=O,s[D+1]=1):G==O&&s[D+1]++}}}l+=m,d+=g.nodeSize}const f=(a+1)*t;let p=0;for(;l<f;)o[l++]==0&&p++;p&&(r||(r=[])).push({type:"missing",row:a,n:p}),d++}(t===0||n===0)&&(r||(r=[])).push({type:"zero_sized"});const c=new C(t,n,o,r);let i=!1;for(let a=0;!i&&a<s.length;a+=2)s[a]!=null&&s[a+1]<n&&(i=!0);return i&&Ye(c,s,e),c}function Ge(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const l=e.child(o);let r=0;if(n)for(let s=0;s<o;s++){const c=e.child(s);for(let i=0;i<c.childCount;i++){const a=c.child(i);s+a.attrs.rowspan>o&&(r+=a.attrs.colspan)}}for(let s=0;s<l.childCount;s++){const c=l.child(s);r+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}t==-1?t=r:t!=r&&(t=Math.max(t,r))}return t}function Ye(e,t,n){e.problems||(e.problems=[]);const o={};for(let l=0;l<e.map.length;l++){const r=e.map[l];if(o[r])continue;o[r]=!0;const s=n.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let c=null;const i=s.attrs;for(let a=0;a<i.colspan;a++){const d=t[(l+a)%e.width*2];d!=null&&(!i.colwidth||i.colwidth[a]!=d)&&((c||(c=Qe(i)))[a]=d)}c&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:c})}}function Qe(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function v(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],l=o.spec.tableRole;l&&(t[l]=o)}}return t}const $=new se("selectingCells");function W(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Ze(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function T(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function J(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=W(t.$head)||et(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function et(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ne(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function tt(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ie(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Re(e,t,n){const o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.nextCell(e.pos-r,t,n);return s==null?null:e.node(0).resolve(r+s)}function B(e,t,n=1){const o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function xe(e,t,n=1){const o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;l<n;l++)o.colwidth.splice(t,0,0)}return o}function nt(e,t,n){const o=v(t.type.schema).header_cell;for(let l=0;l<e.height;l++)if(t.nodeAt(e.map[n+l*e.width]).type!=o)return!1;return!0}var b=class N extends E{constructor(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.rectBetween(t.pos-r,n.pos-r),c=t.node(0),i=l.cellsInRect(s).filter(d=>d!=n.pos-r);i.unshift(n.pos-r);const a=i.map(d=>{const u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);const f=r+d+1;return new je(c.resolve(f),c.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),l=t.resolve(n.map(this.$headCell.pos));if(ne(o)&&ne(l)&&ie(o,l)){const r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?N.rowSelection(o,l):r&&this.isColSelection()?N.colSelection(o,l):new N(o,l)}return H.between(o,l)}content(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let i=l.top;i<l.bottom;i++){const a=[];for(let d=i*n.width+l.left,u=l.left;u<l.right;u++,d++){const f=n.map[d];if(r[f])continue;r[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);const g=l.left-p.left,m=p.right-l.right;if(g>0||m>0){let w=h.attrs;if(g>0&&(w=B(w,0,g)),m>0&&(w=B(w,w.colspan-m,m)),p.left<l.left){if(h=h.type.createAndFill(w),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else h=h.type.create(w,h.content)}if(p.top<l.top||p.bottom>l.bottom){const w={...h.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top<l.top?h=h.type.createAndFill(w):h=h.type.create(w,h.content)}a.push(h)}s.push(t.child(i).copy(M.from(a)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new L(M.from(c),1,1)}replace(t,n=L.empty){const o=t.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){const{$from:c,$to:i}=l[s],a=t.mapping.slice(o);t.replace(a.map(c.pos),a.map(i.pos),s?L.empty:n)}const r=E.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);r&&t.setSelection(r)}replaceWith(t,n){this.replace(t,new L(M.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=C.get(n),l=this.$anchorCell.start(-1),r=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-l,this.$headCell.pos-l));for(let s=0;s<r.length;s++)t(n.nodeAt(r[s]),l+r[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.top<=c.top?(s.top>0&&(t=i.resolve(r+l.map[s.left])),c.bottom<l.height&&(n=i.resolve(r+l.map[l.width*(l.height-1)+c.right-1]))):(c.top>0&&(n=i.resolve(r+l.map[c.left])),s.bottom<l.height&&(t=i.resolve(r+l.map[l.width*(l.height-1)+s.right-1]))),new N(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.colCount(this.$anchorCell.pos-o),r=n.colCount(this.$headCell.pos-o);if(Math.min(l,r)>0)return!1;const s=l+this.$anchorCell.nodeAfter.attrs.colspan,c=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,c)==n.width}eq(t){return t instanceof N&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.left<=c.left?(s.left>0&&(t=i.resolve(r+l.map[s.top*l.width])),c.right<l.width&&(n=i.resolve(r+l.map[l.width*(c.top+1)-1]))):(c.left>0&&(n=i.resolve(r+l.map[c.top*l.width])),s.right<l.width&&(t=i.resolve(r+l.map[l.width*(s.top+1)-1]))),new N(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new N(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new N(t.resolve(n),t.resolve(o))}getBookmark(){return new ot(this.$anchorCell.pos,this.$headCell.pos)}};b.prototype.visible=!1;E.jsonID("cell",b);var ot=class Te{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Te(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),o=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&ie(n,o)?new b(n,o):E.near(o,1)}};function lt(e){if(!(e.selection instanceof b))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Z.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Q.create(e.doc,t)}function rt({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,o=t.pos,l=e.depth;for(;l>=0&&!(e.after(l+1)<e.end(l));l--,n++);for(let r=t.depth;r>=0&&!(t.before(r+1)>t.start(r));r--,o--);return n==o&&/row|table/.test(e.node(l).type.spec.tableRole)}function st({$from:e,$to:t}){let n,o;for(let l=e.depth;l>0;l--){const r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=t.depth;l>0;l--){const r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&t.parentOffset===0}function it(e,t,n){const o=(t||e).selection,l=(t||e).doc;let r,s;if(o instanceof Fe&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=b.create(l,o.from);else if(s=="row"){const c=l.resolve(o.from+1);r=b.rowSelection(c,c)}else if(!n){const c=C.get(o.node),i=o.from+1,a=i+c.map[c.width*c.height-1];r=b.create(l,i+1,a)}}else o instanceof H&&rt(o)?r=H.create(l,o.from):o instanceof H&&st(o)&&(r=H.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}const ct=new se("fix-tables");function Me(e,t,n,o){const l=e.childCount,r=t.childCount;e:for(let s=0,c=0;s<r;s++){const i=t.child(s);for(let a=c,d=Math.min(l,s+3);a<d;a++)if(e.child(a)==i){c=a+1,n+=i.nodeSize;continue e}o(i,n),c<l&&e.child(c).sameMarkup(i)?Me(e.child(c),i,n+1,o):i.nodesBetween(0,i.content.size,o,n+1),n+=i.nodeSize}}function ze(e,t){let n;const o=(l,r)=>{l.type.spec.tableRole=="table"&&(n=at(e,l,r,n))};return t?t.doc!=e.doc&&Me(t.doc,e.doc,0,o):e.doc.descendants(o),n}function at(e,t,n,o){const l=C.get(t);if(!l.problems)return o;o||(o=e.tr);const r=[];for(let i=0;i<l.height;i++)r.push(0);for(let i=0;i<l.problems.length;i++){const a=l.problems[i];if(a.type=="collision"){const d=t.nodeAt(a.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)r[a.row+f]+=a.n;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,B(u,u.colspan-a.n,a.n))}else if(a.type=="missing")r[a.row]+=a.n;else if(a.type=="overlong_rowspan"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-a.n})}else if(a.type=="colwidth mismatch"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,colwidth:a.colwidth})}else if(a.type=="zero_sized"){const d=o.mapping.map(n);o.delete(d,d+t.nodeSize)}}let s,c;for(let i=0;i<r.length;i++)r[i]&&(s==null&&(s=i),c=i);for(let i=0,a=n+1;i<l.height;i++){const d=t.child(i),u=a+d.nodeSize,f=r[i];if(f>0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);const h=[];for(let m=0;m<f;m++){const w=v(e.schema)[p].createAndFill();w&&h.push(w)}const g=(i==0||s==i-1)&&c==i?a+1:u-1;o.insert(o.mapping.map(g),h)}a=u}return o.setMeta(ct,{fixTables:!0})}function z(e){const t=e.selection,n=J(e),o=n.node(-1),l=n.start(-1),r=C.get(o);return{...t instanceof b?r.rectBetween(t.$anchorCell.pos-l,t.$headCell.pos-l):r.findCell(n.pos-l),tableStart:l,map:r,table:o}}function Ne(e,{map:t,tableStart:n,table:o},l){let r=l>0?-1:0;nt(t,o,l+r)&&(r=l==0||l==t.width?null:0);for(let s=0;s<t.height;s++){const c=s*t.width+l;if(l>0&&l<t.width&&t.map[c-1]==t.map[c]){const i=t.map[c],a=o.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,xe(a.attrs,l-t.colCount(i))),s+=a.attrs.rowspan-1}else{const i=r==null?v(o.type.schema).cell:o.nodeAt(t.map[c+r]).type,a=t.positionAt(s,l,o);e.insert(e.mapping.map(n+a),i.createAndFill())}}return e}function dt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.left))}return!0}function ut(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.right))}return!0}function ft(e,{map:t,table:n,tableStart:o},l){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const c=s*t.width+l,i=t.map[c],a=n.nodeAt(i),d=a.attrs;if(l>0&&t.map[c-1]==i||l<t.width-1&&t.map[c+1]==i)e.setNodeMarkup(e.mapping.slice(r).map(o+i),null,B(d,l-t.colCount(i)));else{const u=e.mapping.slice(r).map(o+i);e.delete(u,u+a.nodeSize)}s+=d.rowspan}}function ht(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let l=n.right-1;ft(o,n,l),l!=n.left;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(r)}t(o)}return!0}function pt(e,t,n){var o;const l=v(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if(((o=t.nodeAt(e.map[r+n*e.width]))===null||o===void 0?void 0:o.type)!=l)return!1;return!0}function Ee(e,{map:t,tableStart:n,table:o},l){let r=n;for(let a=0;a<l;a++)r+=o.child(a).nodeSize;const s=[];let c=l>0?-1:0;pt(t,o,l+c)&&(c=l==0||l==t.height?null:0);for(let a=0,d=t.width*l;a<t.width;a++,d++)if(l>0&&l<t.height&&t.map[d]==t.map[d-t.width]){const u=t.map[d],f=o.nodeAt(u).attrs;e.setNodeMarkup(n+u,null,{...f,rowspan:f.rowspan+1}),a+=f.colspan-1}else{var i;const u=c==null?v(o.type.schema).cell:(i=o.nodeAt(t.map[d+c*t.width]))===null||i===void 0?void 0:i.type,f=u?.createAndFill();f&&s.push(f)}return e.insert(r,v(o.type.schema).row.create(null,s)),e}function mt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.top))}return!0}function gt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.bottom))}return!0}function wt(e,{map:t,table:n,tableStart:o},l){let r=0;for(let a=0;a<l;a++)r+=n.child(a).nodeSize;const s=r+n.child(l).nodeSize,c=e.mapping.maps.length;e.delete(r+o,s+o);const i=new Set;for(let a=0,d=l*t.width;a<t.width;a++,d++){const u=t.map[d];if(!i.has(u)){if(i.add(u),l>0&&u==t.map[d-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l<t.height&&u==t.map[d+t.width]){const f=n.nodeAt(u),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=t.positionAt(l+1,a,n);e.insert(e.mapping.slice(c).map(o+g),h),a+=p.colspan-1}}}}function bt(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let l=n.bottom-1;wt(o,n,l),l!=n.top;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(n.table)}t(o)}return!0}function ce(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function Ct({width:e,height:t,map:n},o){let l=o.top*e+o.left,r=l,s=(o.bottom-1)*e+o.left,c=l+(o.right-o.left-1);for(let i=o.top;i<o.bottom;i++){if(o.left>0&&n[r]==n[r-1]||o.right<e&&n[c]==n[c+1])return!0;r+=e,c+=e}for(let i=o.left;i<o.right;i++){if(o.top>0&&n[l]==n[l-e]||o.bottom<t&&n[s]==n[s+e])return!0;l++,s++}return!1}function ae(e,t){const n=e.selection;if(!(n instanceof b)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=z(e),{map:l}=o;if(Ct(l,o))return!1;if(t){const r=e.tr,s={};let c=M.empty,i,a;for(let d=o.top;d<o.bottom;d++)for(let u=o.left;u<o.right;u++){const f=l.map[d*l.width+u],p=o.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,i==null)i=f,a=p;else{ce(p)||(c=c.append(p.content));const h=r.mapping.map(f+o.tableStart);r.delete(h,h+p.nodeSize)}}if(i==null||a==null)return!0;if(r.setNodeMarkup(i+o.tableStart,null,{...xe(a.attrs,a.attrs.colspan,o.right-o.left-a.attrs.colspan),rowspan:o.bottom-o.top}),c.size>0){const d=i+1+a.content.size,u=ce(a)?i+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,c)}r.setSelection(new b(r.doc.resolve(i+o.tableStart))),t(r)}return!0}function de(e,t){const n=v(e.schema);return yt(({node:o})=>n[o.type.spec.tableRole])(e,t)}function yt(e){return(t,n)=>{const o=t.selection;let l,r;if(o instanceof b){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=Ze(o.$from),!l)return!1;r=(s=W(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let c=l.attrs;const i=[],a=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const d=z(t),u=t.tr;for(let p=0;p<d.right-d.left;p++)i.push(a?{...c,colwidth:a&&a[p]?[a[p]]:null}:c);let f;for(let p=d.top;p<d.bottom;p++){let h=d.map.positionAt(p,d.left,d.table);p==d.top&&(h+=l.nodeSize);for(let g=d.left,m=0;g<d.right;g++,m++)g==d.left&&p==d.top||u.insert(f=u.mapping.map(h+d.tableStart,1),e({node:l,row:p,col:g}).createAndFill(i[m]))}u.setNodeMarkup(r,e({node:l,row:d.top,col:d.left}),i[0]),o instanceof b&&u.setSelection(new b(u.doc.resolve(o.$anchorCell.pos),f?u.doc.resolve(f):void 0)),n(u)}return!0}}function At(e,t){return function(n,o){if(!T(n))return!1;const l=J(n);if(l.nodeAfter.attrs[e]===t)return!1;if(o){const r=n.tr;n.selection instanceof b?n.selection.forEachCell((s,c)=>{s.attrs[e]!==t&&r.setNodeMarkup(c,null,{...s.attrs,[e]:t})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[e]:t}),o(r)}return!0}}function St(e){return function(t,n){if(!T(t))return!1;if(n){const o=v(t.schema),l=z(t),r=t.tr,s=l.map.cellsInRect(e=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:e=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),c=s.map(i=>l.table.nodeAt(i));for(let i=0;i<s.length;i++)c[i].type==o.header_cell&&r.setNodeMarkup(l.tableStart+s[i],o.cell,c[i].attrs);if(r.steps.length===0)for(let i=0;i<s.length;i++)r.setNodeMarkup(l.tableStart+s[i],o.header_cell,c[i].attrs);n(r)}return!0}}function ue(e,t,n){const o=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let l=0;l<o.length;l++){const r=t.table.nodeAt(o[l]);if(r&&r.type!==n.header_cell)return!1}return!0}function I(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?St(e):function(n,o){if(!T(n))return!1;if(o){const l=v(n.schema),r=z(n),s=n.tr,c=ue("row",r,l),i=ue("column",r,l),a=(e==="column"?c:e==="row"&&i)?1:0,d=e=="column"?{left:0,top:a,right:1,bottom:r.map.height}:e=="row"?{left:a,top:0,right:r.map.width,bottom:1}:r,u=e=="column"?i?l.cell:l.header_cell:e=="row"?c?l.cell:l.header_cell:l.cell;r.map.cellsInRect(d).forEach(f=>{const p=f+r.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,u,h.attrs)}),o(s)}return!0}}I("row",{useDeprecatedLogic:!0});I("column",{useDeprecatedLogic:!0});const vt=I("cell",{useDeprecatedLogic:!0});function Rt(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,l=e.before();o>=0;o--){const r=e.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let o=e.indexAfter(-1),l=e.after();o<n.childCount;o++){const r=n.child(o);if(r.childCount)return l+1;l+=r.nodeSize}}return null}function fe(e){return function(t,n){if(!T(t))return!1;const o=Rt(J(t),e);if(o==null)return!1;if(n){const l=t.doc.resolve(o);n(t.tr.setSelection(H.between(l,tt(l))).scrollIntoView())}return!0}}function xt(e,t){const n=e.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function j(e,t){const n=e.selection;if(!(n instanceof b))return!1;if(t){const o=e.tr,l=v(e.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new L(l,0,0))}),o.docChanged&&t(o)}return!0}function Tt(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const l=t.child(0),r=l.type.spec.tableRole,s=l.type.schema,c=[];if(r=="row")for(let i=0;i<t.childCount;i++){let a=t.child(i).content;const d=i?0:Math.max(0,n-1),u=i<t.childCount-1?0:Math.max(0,o-1);(d||u)&&(a=oe(v(s).row,new L(a,d,u)).content),c.push(a)}else if(r=="cell"||r=="header_cell")c.push(n||o?oe(v(s).row,new L(t,n,o)).content:t);else return null;return Mt(s,c)}function Mt(e,t){const n=[];for(let l=0;l<t.length;l++){const r=t[l];for(let s=r.childCount-1;s>=0;s--){const{rowspan:c,colspan:i}=r.child(s).attrs;for(let a=l;a<l+c;a++)n[a]=(n[a]||0)+i}}let o=0;for(let l=0;l<n.length;l++)o=Math.max(o,n[l]);for(let l=0;l<n.length;l++)if(l>=t.length&&t.push(M.empty),n[l]<o){const r=v(e).cell.createAndFill(),s=[];for(let c=n[l];c<o;c++)s.push(r);t[l]=t[l].append(M.from(s))}return{height:t.length,width:o,rows:t}}function oe(e,t){const n=e.createAndFill();return new _e(n).replace(0,n.content.size,t).doc}function zt({width:e,height:t,rows:n},o,l){if(e!=o){const r=[],s=[];for(let c=0;c<n.length;c++){const i=n[c],a=[];for(let d=r[c]||0,u=0;d<o;u++){let f=i.child(u%i.childCount);d+f.attrs.colspan>o&&(f=f.type.createChecked(B(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)r[c+p]=(r[c+p]||0)+f.attrs.colspan}s.push(M.from(a))}n=s,e=o}if(t!=l){const r=[];for(let s=0,c=0;s<l;s++,c++){const i=[],a=n[c%t];for(let d=0;d<a.childCount;d++){let u=a.child(d);s+u.attrs.rowspan>l&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),i.push(u)}r.push(M.from(i))}n=r,t=l}return{width:e,height:t,rows:n}}function Nt(e,t,n,o,l,r,s){const c=e.doc.type.schema,i=v(c);let a,d;if(l>t.width)for(let u=0,f=0;u<t.height;u++){const p=n.child(u);f+=p.nodeSize;const h=[];let g;p.lastChild==null||p.lastChild.type==i.cell?g=a||(a=i.cell.createAndFill()):g=d||(d=i.header_cell.createAndFill());for(let m=t.width;m<l;m++)h.push(g);e.insert(e.mapping.slice(s).map(f-1+o),h)}if(r>t.height){const u=[];for(let h=0,g=(t.height-1)*t.width;h<Math.max(t.width,l);h++){const m=h>=t.width?!1:n.nodeAt(t.map[g+h]).type==i.header_cell;u.push(m?d||(d=i.header_cell.createAndFill()):a||(a=i.cell.createAndFill()))}const f=i.row.create(null,M.from(u)),p=[];for(let h=t.height;h<r;h++)p.push(f);e.insert(e.mapping.slice(s).map(o+n.nodeSize-2),p)}return!!(a||d)}function he(e,t,n,o,l,r,s,c){if(s==0||s==t.height)return!1;let i=!1;for(let a=l;a<r;a++){const d=s*t.width+a,u=t.map[d];if(t.map[d-t.width]==u){i=!0;const f=n.nodeAt(u),{top:p,left:h}=t.findCell(u);e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(c).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),a+=f.attrs.colspan-1}}return i}function pe(e,t,n,o,l,r,s,c){if(s==0||s==t.width)return!1;let i=!1;for(let a=l;a<r;a++){const d=a*t.width+s,u=t.map[d];if(t.map[d-1]==u){i=!0;const f=n.nodeAt(u),p=t.colCount(u),h=e.mapping.slice(c).map(u+o);e.setNodeMarkup(h,null,B(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(B(f.attrs,0,s-p))),a+=f.attrs.rowspan-1}}return i}function me(e,t,n,o,l){let r=n?e.doc.nodeAt(n-1):e.doc;if(!r)throw new Error("No table found");let s=C.get(r);const{top:c,left:i}=o,a=i+l.width,d=c+l.height,u=e.tr;let f=0;function p(){if(r=n?u.doc.nodeAt(n-1):u.doc,!r)throw new Error("No table found");s=C.get(r),f=u.mapping.maps.length}Nt(u,s,r,n,a,d,f)&&p(),he(u,s,r,n,i,a,c,f)&&p(),he(u,s,r,n,i,a,d,f)&&p(),pe(u,s,r,n,c,d,i,f)&&p(),pe(u,s,r,n,c,d,a,f)&&p();for(let h=c;h<d;h++){const g=s.positionAt(h,i,r),m=s.positionAt(h,a,r);u.replace(u.mapping.slice(f).map(g+n),u.mapping.slice(f).map(m+n),new L(l.rows[h-c],0,0))}p(),u.setSelection(new b(u.doc.resolve(n+s.positionAt(c,i,r)),u.doc.resolve(n+s.positionAt(d-1,a-1,r)))),t(u)}const Et=Oe({ArrowLeft:F("horiz",-1),ArrowRight:F("horiz",1),ArrowUp:F("vert",-1),ArrowDown:F("vert",1),"Shift-ArrowLeft":_("horiz",-1),"Shift-ArrowRight":_("horiz",1),"Shift-ArrowUp":_("vert",-1),"Shift-ArrowDown":_("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function K(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function F(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;if(r instanceof b)return K(n,o,E.near(r.$headCell,t));if(e!="horiz"&&!r.empty)return!1;const s=He(l,e,t);if(s==null)return!1;if(e=="horiz")return K(n,o,E.near(n.doc.resolve(r.head+t),t));{const c=n.doc.resolve(s),i=Re(c,e,t);let a;return i?a=E.near(i,1):t<0?a=E.near(n.doc.resolve(c.before(-1)),-1):a=E.near(n.doc.resolve(c.after(-1)),1),K(n,o,a)}}}function _(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;let s;if(r instanceof b)s=r;else{const i=He(l,e,t);if(i==null)return!1;s=new b(n.doc.resolve(i))}const c=Re(s.$headCell,e,t);return c?K(n,o,new b(s.$anchorCell,c)):!1}}function Ht(e,t){const n=e.state.doc,o=W(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new b(o))),!0):!1}function $t(e,t,n){if(!T(e.state))return!1;let o=Tt(n);const l=e.state.selection;if(l instanceof b){o||(o={width:1,height:1,rows:[M.from(oe(v(e.state.schema).cell,n))]});const r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),c=C.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=zt(o,c.right-c.left,c.bottom-c.top),me(e.state,e.dispatch,s,c,o),!0}else if(o){const r=J(e.state),s=r.start(-1);return me(e.state,e.dispatch,s,C.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Lt(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const o=ge(e,t.target);let l;if(t.shiftKey&&e.state.selection instanceof b)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(l=W(e.state.selection.$anchor))!=null&&((n=Y(e,t))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,t),t.preventDefault();else if(!o)return;function r(i,a){let d=Y(e,a);const u=$.getState(e.state)==null;if(!d||!ie(i,d))if(u)d=i;else return;const f=new b(i,d);if(u||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);u&&p.setMeta($,i.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",c),$.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta($,-1))}function c(i){const a=i,d=$.getState(e.state);let u;if(d!=null)u=e.state.doc.resolve(d);else if(ge(e,a.target)!=o&&(u=Y(e,t),!u))return s();u&&r(u,a)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",c)}function He(e,t,n){if(!(e.state.selection instanceof H))return null;const{$head:o}=e.state.selection;for(let l=o.depth-1;l>=0;l--){const r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){const s=o.before(l),c=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?s:null}}return null}function ge(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&W(e.state.doc.resolve(o))||W(e.state.doc.resolve(l))}var kt=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),le(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,le(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function le(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a){for(let u=0,f=0;u<a.childCount;u++){const{colspan:p,colwidth:h}=a.child(u).attrs;for(let g=0;g<p;g++,f++){const m=l==f?r:h&&h[g],w=m?m+"px":"";if(s+=m||o,m||(c=!1),i)i.style.width!=w&&(i.style.width=w),i=i.nextSibling;else{const S=document.createElement("col");S.style.width=w,t.appendChild(S)}}}for(;i;){var d;const u=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=u}c?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const x=new se("tableColumnResizing");function Wt({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:o=kt,lastColumnResizable:l=!0}={}){const r=new ve({key:x,state:{init(s,c){var i;const a=(i=r.spec)===null||i===void 0||(i=i.props)===null||i===void 0?void 0:i.nodeViews,d=v(c.schema).table.name;return o&&a&&(a[d]=(u,f)=>new o(u,n,f)),new Bt(-1,!1)},apply(s,c){return c.apply(s)}},props:{attributes:s=>{const c=x.getState(s);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,c)=>{Dt(s,c,e,l)},mouseleave:s=>{It(s)},mousedown:(s,c)=>{Pt(s,c,t,n)}},decorations:s=>{const c=x.getState(s);if(c&&c.activeHandle>-1)return Vt(s,c.activeHandle)},nodeViews:{}}});return r}var Bt=class X{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(x);if(o&&o.setHandle!=null)return new X(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new X(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let l=t.mapping.map(n.activeHandle,-1);return ne(t.doc.resolve(l))||(l=-1),new X(l,n.dragging)}return n}};function Dt(e,t,n,o){if(!e.editable)return;const l=x.getState(e.state);if(l&&!l.dragging){const r=jt(t.target);let s=-1;if(r){const{left:c,right:i}=r.getBoundingClientRect();t.clientX-c<=n?s=we(e,t,"left",n):i-t.clientX<=n&&(s=we(e,t,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){const c=e.state.doc.resolve(s),i=c.node(-1),a=C.get(i),d=c.start(-1);if(a.colCount(c.pos-d)+c.nodeAfter.attrs.colspan-1==a.width-1)return}$e(e,s)}}}function It(e){if(!e.editable)return;const t=x.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&$e(e,-1)}function Pt(e,t,n,o){var l;if(!e.editable)return!1;const r=(l=e.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=x.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const c=e.state.doc.nodeAt(s.activeHandle),i=Ot(e,s.activeHandle,c.attrs);e.dispatch(e.state.tr.setMeta(x,{setDragging:{startX:t.clientX,startWidth:i}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);const f=x.getState(e.state);f?.dragging&&(Ft(e,f.activeHandle,be(f.dragging,u,n)),e.dispatch(e.state.tr.setMeta(x,{setDragging:null})))}function d(u){if(!u.which)return a(u);const f=x.getState(e.state);if(f&&f.dragging){const p=be(f.dragging,u,n);Ce(e,f.activeHandle,p,o)}}return Ce(e,s.activeHandle,i,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),t.preventDefault(),!0}function Ot(e,t,{colspan:n,colwidth:o}){const l=o&&o[o.length-1];if(l)return l;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,c=n;if(o)for(let i=0;i<n;i++)o[i]&&(s-=o[i],c--);return s/c}function jt(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function we(e,t,n,o){const l=n=="right"?-o:o,r=e.posAtCoords({left:t.clientX+l,top:t.clientY});if(!r)return-1;const{pos:s}=r,c=W(e.state.doc.resolve(s));if(!c)return-1;if(n=="right")return c.pos;const i=C.get(c.node(-1)),a=c.start(-1),d=i.map.indexOf(c.pos-a);return d%i.width==0?-1:a+i.map[d-1]}function be(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function $e(e,t){e.dispatch(e.state.tr.setMeta(x,{setHandle:t}))}function Ft(e,t,n){const o=e.state.doc.resolve(t),l=o.node(-1),r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,i=e.state.tr;for(let a=0;a<r.height;a++){const d=a*r.width+c;if(a&&r.map[d]==r.map[d-r.width])continue;const u=r.map[d],f=l.nodeAt(u).attrs,p=f.colspan==1?0:c-r.colCount(u);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():_t(f.colspan);h[p]=n,i.setNodeMarkup(s+u,null,{...f,colwidth:h})}i.docChanged&&e.dispatch(i)}function Ce(e,t,n,o){const l=e.state.doc.resolve(t),r=l.node(-1),s=l.start(-1),c=C.get(r).colCount(l.pos-s)+l.nodeAfter.attrs.colspan-1;let i=e.domAtPos(l.start(-1)).node;for(;i&&i.nodeName!="TABLE";)i=i.parentNode;i&&le(r,i.firstChild,i,o,c,n)}function _t(e){return Array(e).fill(0)}function Vt(e,t){const n=[],o=e.doc.resolve(t),l=o.node(-1);if(!l)return Q.empty;const r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<r.height;a++){const d=c+a*r.width;if((c==r.width-1||r.map[d]!=r.map[d+1])&&(a==0||r.map[d]!=r.map[d-r.width])){var i;const u=r.map[d],f=s+u+l.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((i=x.getState(e))===null||i===void 0)&&i.dragging&&n.push(Z.node(s+u,s+u+l.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),n.push(Z.widget(f,p))}}return Q.create(e.doc,n)}function Kt({allowTableNodeSelection:e=!1}={}){return new ve({key:$,state:{init(){return null},apply(t,n){const o=t.getMeta($);if(o!=null)return o==-1?null:o;if(n==null||!t.docChanged)return n;const{deleted:l,pos:r}=t.mapping.mapResult(n);return l?null:r}},props:{decorations:lt,handleDOMEvents:{mousedown:Lt},createSelectionBetween(t){return $.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Ht,handleKeyDown:Et,handlePaste:$t},appendTransaction(t,n,o){return it(o,ze(o,n),e)}})}function U(e){return e==="left"||e==="right"||e==="center"?e:null}function Xt(e){const t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return U(t||n)}function qt(e){return U(e?.align)}function Le(){return{default:null,parseHTML:e=>Xt(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function Ut(e){var t;const n=e.parentElement,o=e.closest("table");if(!n||!o)return null;const l=Array.from(n.children).indexOf(e),r=(t=o.querySelectorAll("colgroup > col")[l])===null||t===void 0?void 0:t.getAttribute("width");return r?[parseInt(r,10)]:null}function ke(e){const t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):Ut(e)}const Jt=/[ \t\r\n\f]+/g;function We(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(Jt,"")===""}function Be(e){const t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}const Gt=P.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",k(this.options.HTMLAttributes,e),0]}}),Yt=P.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",k(this.options.HTMLAttributes,e),0]}}),Qt=P.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",k(this.options.HTMLAttributes,e),0]}});function re(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ye(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a!==null)for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:h,colwidth:g}=a.child(f).attrs;for(let m=0;m<h;m+=1,p+=1){const w=l===p?r:g&&g[m],S=w?`${w}px`:"";if(s+=w||o,w||(c=!1),i){if(i.style.width!==S){const[y,A]=re(o,w);i.style.setProperty(y,A)}i=i.nextSibling}else{const y=document.createElement("col"),[A,R]=re(o,w);y.style.setProperty(A,R),t.appendChild(y)}}}for(;i;){var d;const f=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=f}const u=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);c&&!u?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var Zt=class{constructor(e,t,n,o={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[l,r]of Object.entries(o))r!=null&&(l==="style"?this.table.style.cssText=String(r):this.table.setAttribute(l,String(r)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ye(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,ye(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){const t=e.target,n=this.dom.contains(t),o=this.contentDOM.contains(t);return!!(n&&!o&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function en(e,t,n,o){let l=0,r=!0;const s=[],c=e.firstChild;if(!c)return{};for(let d=0,u=0;d<c.childCount;d+=1){const{colspan:f,colwidth:p}=c.child(d).attrs;for(let h=0;h<f;h+=1,u+=1){const g=n===u?o:p&&p[h];l+=g||t,g||(r=!1);const[m,w]=re(t,g);s.push(["col",{style:`${m}: ${w}`}])}}const i=r?`${l}px`:"",a=r?"":`${l}px`;return{colgroup:["colgroup",{},...s],tableWidth:i,tableMinWidth:a}}function Ae(e,t){return e.createAndFill()}function tn(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)}),e.cached.tableNodeTypes=t,t}function nn(e,t,n,o,l){const r=tn(e),s=[],c=[];for(let a=0;a<n;a+=1){const d=Ae(r.cell);if(d&&c.push(d),o){const u=Ae(r.header_cell);u&&s.push(u)}}const i=[];for(let a=0;a<t;a+=1)i.push(r.row.createChecked(null,o&&a===0?s:c));return r.table.createChecked(null,i)}function on(e){return e instanceof b}const V=({editor:e})=>{const{selection:t}=e.state;if(!on(t))return!1;let n=0;const o=q(t.ranges[0].$from,l=>l.type.name==="table");return o?.node.descendants(l=>{if(l.type.name==="table")return!1;["tableCell","tableHeader"].includes(l.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function Se(e,t){const n=e.mapping.map(t),o=q(e.selection.$from,s=>s.type.name==="table");if(o?.pos===n)return;const l=e.doc.nodeAt(n);if(!l)return;const r=n+l.nodeSize-1;e.setSelection(H.near(e.doc.resolve(r),-1))}function ln(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let o=0;for(;n+o<e.length&&e[n+o]==="`";)o+=1;let l=n+o,r=!1;for(;l<e.length;){if(e[l]!=="`"){l+=1;continue}let s=0;for(;l+s<e.length&&e[l+s]==="`";)s+=1;if(s===o){const c=e.slice(n+o,l);t+=e.slice(n,n+o)+c.replace(/\\\||\|/g,i=>i==="|"?"\\|":i)+e.slice(l,l+o),n=l+o,r=!0;break}l+=s}r||(t+=e.slice(n,n+o),n+=o)}return t}function rn(e){return e.split(`
|
|
2
2
|
`).map(t=>!t.includes("|")||!t.includes("`")?t:ln(t)).join(`
|
|
3
3
|
`)}function sn(e){return(e||"").replace(/\s+/g," ").trim()}function cn(e,t,n={}){var o;const l=(o=n.cellLineSeparator)!==null&&o!==void 0?o:"";if(!e||!e.content||e.content.length===0)return"";const r=[];e.content.forEach(h=>{const g=[];h.content&&h.content.forEach(m=>{let w="";m.content&&Array.isArray(m.content)&&m.content.length>1?w=m.content.map(R=>t.renderChildren(R)).join(l):w=m.content?t.renderChildren(m.content):"";const S=sn(w.split(l).join(`
|
|
4
4
|
`).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=m.type==="tableHeader",A=qt(m.attrs);g.push({text:S,isHeader:y,align:A})}),r.push(g)});const s=r.reduce((h,g)=>Math.max(h,g.length),0);if(s===0)return"";const c=Array.from({length:s}).fill(0);r.forEach(h=>{for(let m=0;m<s;m+=1){var g;const w=(((g=h[m])===null||g===void 0?void 0:g.text)||"").length;w>c[m]&&(c[m]=w),c[m]<3&&(c[m]=3)}});const i=(h,g)=>h+" ".repeat(Math.max(0,g-h.length)),a=r[0],d=a.some(h=>h.isHeader),u=Array.from({length:s}).fill(null);r.forEach(h=>{for(let m=0;m<s;m+=1){var g;!u[m]&&(!((g=h[m])===null||g===void 0)&&g.align)&&(u[m]=h[m].align)}});let f=`
|