@vc-shell/framework 2.0.0-alpha.33 → 2.0.0-alpha.34

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.
Files changed (310) hide show
  1. package/CHANGELOG.md +258 -207
  2. package/dist/ai-agent/index.js +4 -4
  3. package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-D0kWIlz3.js +4485 -0
  4. package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-D71wkuIU.js +22109 -0
  5. package/dist/chunks/{index-HNCQdWHc.js → index-CDUdOax4.js} +2 -2
  6. package/dist/chunks/{vendor-boolbase-Cyd7_957.js → vendor-boolbase-DYkUBG-P.js} +1 -1
  7. package/dist/chunks/{vendor-cheerio-DKt5ox2U.js → vendor-cheerio-DE71XQ9x.js} +1 -1
  8. package/dist/chunks/{vendor-cheerio-select-B8BTSEdK.js → vendor-cheerio-select-D-qK1Cpo.js} +2 -2
  9. package/dist/chunks/{vendor-css-select-C4b9igDP.js → vendor-css-select-DqoO1-RK.js} +2 -2
  10. package/dist/chunks/{vendor-dompurify-BIuh5IAZ.js → vendor-dompurify-DpIUMBYC.js} +228 -221
  11. package/dist/chunks/{vendor-gridstack-Dkfw452e.js → vendor-gridstack-Beau2jQ7.js} +230 -160
  12. package/dist/chunks/{vendor-intlify-core-base-BfDxYEHM.js → vendor-intlify-core-base-Cf8V01l9.js} +260 -260
  13. package/dist/chunks/{vendor-intlify-message-compiler-B2Y3gZDu.js → vendor-intlify-message-compiler-h1txdYa8.js} +2 -2
  14. package/dist/chunks/{vendor-intlify-shared-Drx6AmQ9.js → vendor-intlify-shared-D4BJYR57.js} +3 -3
  15. package/dist/chunks/{vendor-iso-639-1-ig8i9Svg.js → vendor-iso-639-1-BEjYyfKo.js} +17 -14
  16. package/dist/chunks/{vendor-lodash-es-BB-IQCna.js → vendor-lodash-es-CfnUOh0o.js} +364 -371
  17. package/dist/chunks/vendor-markdown-it-task-lists-CHKeJZfk.js +69 -0
  18. package/dist/chunks/vendor-microsoft-applicationinsights-analytics-js-ufpnHxNR.js +1142 -0
  19. package/dist/chunks/vendor-microsoft-applicationinsights-cfgsync-js-BmGq5cEx.js +247 -0
  20. package/dist/chunks/vendor-microsoft-applicationinsights-channel-js-BdtUi1l8.js +1907 -0
  21. package/dist/chunks/vendor-microsoft-applicationinsights-core-js-CR3vyuZc.js +8406 -0
  22. package/dist/chunks/vendor-microsoft-applicationinsights-dependencies-js-DXmYt4tG.js +1441 -0
  23. package/dist/chunks/vendor-microsoft-applicationinsights-properties-js-CLbNzgkN.js +610 -0
  24. package/dist/chunks/{vendor-microsoft-applicationinsights-shims-Ds7KyOsR.js → vendor-microsoft-applicationinsights-shims-CGX8KXgN.js} +13 -12
  25. package/dist/chunks/vendor-microsoft-applicationinsights-web-DzgnK2Mn.js +970 -0
  26. package/dist/chunks/{vendor-microsoft-dynamicproto-js-CMXJqDx1.js → vendor-microsoft-dynamicproto-js-D7567TLZ.js} +15 -15
  27. package/dist/chunks/vendor-nevware21-ts-async-BxN_lmkD.js +271 -0
  28. package/dist/chunks/vendor-nevware21-ts-utils-Dr-hD3q9.js +973 -0
  29. package/dist/chunks/{vendor-nth-check-CuyQT_ny.js → vendor-nth-check-D0N1qpsw.js} +1 -1
  30. package/dist/chunks/{vendor-prettier-B0zlh-ye.js → vendor-prettier-2Sf6a5jB.js} +876 -782
  31. package/dist/chunks/{vendor-prosemirror-commands-Bv4ChObl.js → vendor-prosemirror-commands-BaRVaTVO.js} +2 -2
  32. package/dist/chunks/{vendor-prosemirror-dropcursor-kF5UKNFM.js → vendor-prosemirror-dropcursor-PuLxL9JM.js} +2 -2
  33. package/dist/chunks/{vendor-prosemirror-gapcursor-D3tpkzBp.js → vendor-prosemirror-gapcursor-C7MEx13L.js} +3 -3
  34. package/dist/chunks/{vendor-prosemirror-history-CQYKHz3u.js → vendor-prosemirror-history-_AfZxoMt.js} +2 -2
  35. package/dist/chunks/{vendor-prosemirror-keymap-CAfQyvJ7.js → vendor-prosemirror-keymap-tvZqK1zZ.js} +1 -1
  36. package/dist/chunks/{vendor-prosemirror-schema-list-BNJkECdS.js → vendor-prosemirror-schema-list-qDgvFydE.js} +1 -1
  37. package/dist/chunks/{vendor-prosemirror-state-IeimrELV.js → vendor-prosemirror-state-BvFA7AjG.js} +1 -1
  38. package/dist/chunks/{vendor-prosemirror-tables-DIAkeGRL.js → vendor-prosemirror-tables-CbmHRq4G.js} +4 -4
  39. package/dist/chunks/{vendor-prosemirror-transform-BUjWd5Tb.js → vendor-prosemirror-transform-DVGD47fI.js} +118 -102
  40. package/dist/chunks/{vendor-prosemirror-view-Chu67Jpw.js → vendor-prosemirror-view-BW4UqvjQ.js} +7 -5
  41. package/dist/chunks/{vendor-striptags--4dtoP3u.js → vendor-striptags-DtlgQudQ.js} +1 -1
  42. package/dist/chunks/{vendor-tiptap-core-BWgKs47g.js → vendor-tiptap-core-CZbeo7XQ.js} +722 -703
  43. package/dist/chunks/{vendor-tiptap-extension-blockquote-B1RV9c0W.js → vendor-tiptap-extension-blockquote-B8uwrgnZ.js} +1 -1
  44. package/dist/chunks/{vendor-tiptap-extension-bold-BdAf6fWQ.js → vendor-tiptap-extension-bold-Ch9pbrZY.js} +1 -1
  45. package/dist/chunks/{vendor-tiptap-extension-code-_cv4EOBy.js → vendor-tiptap-extension-code-CVh_mZgz.js} +1 -1
  46. package/dist/chunks/{vendor-tiptap-extension-code-block-CT5P4x0D.js → vendor-tiptap-extension-code-block-CfoUSR2N.js} +2 -2
  47. package/dist/chunks/{vendor-tiptap-extension-document-C41wXth1.js → vendor-tiptap-extension-document-C4tn-v0L.js} +1 -1
  48. package/dist/chunks/{vendor-tiptap-extension-hard-break-Ds2hA4at.js → vendor-tiptap-extension-hard-break-CbK1eM89.js} +1 -1
  49. package/dist/chunks/{vendor-tiptap-extension-heading-DvnqoCO-.js → vendor-tiptap-extension-heading-BlkYF-RD.js} +1 -1
  50. package/dist/chunks/{vendor-tiptap-extension-horizontal-rule-BceRNOIu.js → vendor-tiptap-extension-horizontal-rule-DjMOsQCA.js} +2 -2
  51. package/dist/chunks/{vendor-tiptap-extension-image-DLERQS1u.js → vendor-tiptap-extension-image-BpqLcXdw.js} +1 -1
  52. package/dist/chunks/{vendor-tiptap-extension-italic-BGv0ktjJ.js → vendor-tiptap-extension-italic-YDdh6jEW.js} +1 -1
  53. package/dist/chunks/{vendor-tiptap-extension-link-BAzgztbX.js → vendor-tiptap-extension-link-CETrc0Mo.js} +2 -2
  54. package/dist/chunks/{vendor-tiptap-extension-list-rFRwhCY_.js → vendor-tiptap-extension-list-DsiDvJxK.js} +209 -180
  55. package/dist/chunks/vendor-tiptap-extension-paragraph-Bcss4jc0.js +49 -0
  56. package/dist/chunks/vendor-tiptap-extension-placeholder-ClNjQXk_.js +1 -0
  57. package/dist/chunks/{vendor-tiptap-extension-strike-Cqq1i9pe.js → vendor-tiptap-extension-strike-BZiBed9b.js} +1 -1
  58. package/dist/chunks/vendor-tiptap-extension-table-QVjcLO_H.js +409 -0
  59. package/dist/chunks/vendor-tiptap-extension-table-cell-CuXZTKj8.js +1 -0
  60. package/dist/chunks/vendor-tiptap-extension-table-header-CuXZTKj8.js +1 -0
  61. package/dist/chunks/vendor-tiptap-extension-table-row-CuXZTKj8.js +1 -0
  62. package/dist/chunks/{vendor-tiptap-extension-text-BaLQc3hC.js → vendor-tiptap-extension-text-Wofhchrp.js} +1 -1
  63. package/dist/chunks/{vendor-tiptap-extension-text-style-BDbT1PMb.js → vendor-tiptap-extension-text-style-Bc6nvmn0.js} +1 -1
  64. package/dist/chunks/{vendor-tiptap-extension-underline-CiUEdG6D.js → vendor-tiptap-extension-underline-Bo1pXXDN.js} +1 -1
  65. package/dist/chunks/{vendor-tiptap-extensions-pwHVUzkb.js → vendor-tiptap-extensions-D7eaegpB.js} +6 -6
  66. package/dist/chunks/{vendor-tiptap-markdown-D0feGfKk.js → vendor-tiptap-markdown-18K1hcU0.js} +3 -3
  67. package/dist/chunks/vendor-tiptap-pm-yqZPZQMU.js +1 -0
  68. package/dist/chunks/{vendor-tiptap-starter-kit-BEsLVJ4Q.js → vendor-tiptap-starter-kit-ny-AoaO_.js} +17 -17
  69. package/dist/chunks/{vendor-tiptap-vue-3-CdIBiRMV.js → vendor-tiptap-vue-3-BNAw8onj.js} +1 -1
  70. package/dist/chunks/{vendor-truncate-html-DDVwXwPl.js → vendor-truncate-html-ChA1T5zy.js} +1 -1
  71. package/dist/chunks/{vendor-unovis-ts-D3MmJ11i.js → vendor-unovis-ts-stSsHr9j.js} +1 -1
  72. package/dist/chunks/{vendor-unovis-vue-CMGNLXsC.js → vendor-unovis-vue-CZWGT3-0.js} +1 -1
  73. package/dist/chunks/{vendor-vue-i18n-BSCeQYoP.js → vendor-vue-i18n-LO-EJStU.js} +27 -27
  74. package/dist/chunks/{vendor-vue3-application-insights-Cq46Q3rj.js → vendor-vue3-application-insights-CAgbt8pk.js} +2 -2
  75. package/dist/chunks/{vendor-vueuse-components-DRdTsx6e.js → vendor-vueuse-components-BW7i7Uhb.js} +1 -1
  76. package/dist/chunks/{vendor-vueuse-core-D4-2M4AW.js → vendor-vueuse-core-CEdpDfzx.js} +9 -9
  77. package/dist/chunks/{vendor-vueuse-shared-PQ04AyOW.js → vendor-vueuse-shared-BlCOXw5g.js} +8 -8
  78. package/dist/core/api/platform.d.ts +5 -5
  79. package/dist/core/api/platform.d.ts.map +1 -1
  80. package/dist/core/blade-navigation/types/index.d.ts +1 -1
  81. package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
  82. package/dist/core/composables/useAppInsights/index.d.ts.map +1 -1
  83. package/dist/core/composables/useBladeRegistry/index.d.ts.map +1 -1
  84. package/dist/core/composables/usePlatformLocaleSync/index.d.ts +17 -0
  85. package/dist/core/composables/usePlatformLocaleSync/index.d.ts.map +1 -0
  86. package/dist/core/composables/useTheme/index.d.ts.map +1 -1
  87. package/dist/core/composables/useUser/index.d.ts +1 -0
  88. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  89. package/dist/core/composables/useUserManagement/index.d.ts.map +1 -1
  90. package/dist/core/directives/index.d.ts +2 -0
  91. package/dist/core/directives/index.d.ts.map +1 -1
  92. package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts +2 -2
  93. package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts.map +1 -1
  94. package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue.d.ts.map +1 -1
  95. package/dist/core/plugins/ai-agent/composables/useAiAgentContext.d.ts.map +1 -1
  96. package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts.map +1 -1
  97. package/dist/core/plugins/modularity/index.d.ts +1 -1
  98. package/dist/core/plugins/modularity/index.d.ts.map +1 -1
  99. package/dist/core/services/widget-service.d.ts.map +1 -1
  100. package/dist/core/types/menu-types.d.ts.map +1 -1
  101. package/dist/framework.js +3188 -3934
  102. package/dist/index.css +2 -2
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/modules/assets/index.d.ts +0 -5
  105. package/dist/modules/assets/index.d.ts.map +1 -1
  106. package/dist/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
  107. package/dist/modules/assets-manager/index.d.ts +0 -6
  108. package/dist/modules/assets-manager/index.d.ts.map +1 -1
  109. package/dist/scripts/check-locales.cjs +3 -0
  110. package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts +0 -6
  111. package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts.map +1 -1
  112. package/dist/shell/_internal/notifications/components/notification-container/index.d.ts +2 -2
  113. package/dist/shell/_internal/notifications/composables/useInstance/index.d.ts.map +1 -1
  114. package/dist/shell/_internal/popup/common/vc-popup-base.vue.d.ts +1 -1
  115. package/dist/shell/_internal/popup/common/vc-popup-base.vue.d.ts.map +1 -1
  116. package/dist/shell/_internal/popup/index.d.ts +0 -4
  117. package/dist/shell/_internal/popup/index.d.ts.map +1 -1
  118. package/dist/shell/auth/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -1
  119. package/dist/shell/auth/ForgotPasswordPage/components/forgot-password/ForgotPassword.vue.d.ts.map +1 -1
  120. package/dist/shell/auth/InvitePage/components/invite/Invite.vue.d.ts +2 -2
  121. package/dist/shell/auth/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
  122. package/dist/shell/auth/LoginPage/components/login/Login.vue.d.ts.map +1 -1
  123. package/dist/shell/auth/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +2 -2
  124. package/dist/shell/auth/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
  125. package/dist/shell/auth/_test-utils/shared-dependency-mocks.d.ts +8 -0
  126. package/dist/shell/auth/_test-utils/shared-dependency-mocks.d.ts.map +1 -0
  127. package/dist/shell/auth/_test-utils/shared-mock-factories.d.ts +13 -0
  128. package/dist/shell/auth/_test-utils/shared-mock-factories.d.ts.map +1 -0
  129. package/dist/shell/auth/_test-utils/shared-stubs.d.ts +33 -0
  130. package/dist/shell/auth/_test-utils/shared-stubs.d.ts.map +1 -0
  131. package/dist/shell/auth/utils.d.ts +25 -0
  132. package/dist/shell/auth/utils.d.ts.map +1 -0
  133. package/dist/shell/components/change-password/change-password.vue.d.ts.map +1 -1
  134. package/dist/shell/components/change-password/index.d.ts +0 -5
  135. package/dist/shell/components/change-password/index.d.ts.map +1 -1
  136. package/dist/shell/components/error-interceptor/index.d.ts +0 -5
  137. package/dist/shell/components/error-interceptor/index.d.ts.map +1 -1
  138. package/dist/shell/components/language-selector/index.d.ts +0 -5
  139. package/dist/shell/components/language-selector/index.d.ts.map +1 -1
  140. package/dist/shell/components/notification-dropdown/_internal/notification/notification.vue.d.ts.map +1 -1
  141. package/dist/shell/components/notification-dropdown/index.d.ts +0 -5
  142. package/dist/shell/components/notification-dropdown/index.d.ts.map +1 -1
  143. package/dist/shell/components/notification-template/index.d.ts +0 -5
  144. package/dist/shell/components/notification-template/index.d.ts.map +1 -1
  145. package/dist/shell/components/sidebar/index.d.ts +3 -3
  146. package/dist/shell/components/sidebar/sidebar.vue.d.ts +1 -1
  147. package/dist/shell/components/sidebar/sidebar.vue.d.ts.map +1 -1
  148. package/dist/shell/components/user-dropdown-button/index.d.ts +0 -5
  149. package/dist/shell/components/user-dropdown-button/index.d.ts.map +1 -1
  150. package/dist/shell/dashboard/dashboard-widget-card/dashboard-widget-card.vue.d.ts.map +1 -1
  151. package/dist/test-helpers.d.ts +6 -18
  152. package/dist/test-helpers.d.ts.map +1 -1
  153. package/dist/test-mock-factories.d.ts +48 -0
  154. package/dist/test-mock-factories.d.ts.map +1 -0
  155. package/dist/tsconfig.tsbuildinfo +1 -1
  156. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +3 -3
  157. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
  158. package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +2 -2
  159. package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
  160. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +1 -1
  161. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
  162. package/dist/ui/components/atoms/vc-skeleton/vc-skeleton.vue.d.ts +1 -1
  163. package/dist/ui/components/atoms/vc-skeleton/vc-skeleton.vue.d.ts.map +1 -1
  164. package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts +2 -2
  165. package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
  166. package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
  167. package/dist/ui/components/molecules/index.d.ts +1 -0
  168. package/dist/ui/components/molecules/index.d.ts.map +1 -1
  169. package/dist/ui/components/molecules/multilanguage-selector/multilanguage-selector.vue.d.ts +1 -1
  170. package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts +1 -1
  171. package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts.map +1 -1
  172. package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts +1 -1
  173. package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts.map +1 -1
  174. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +1 -1
  175. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  176. package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts +3 -3
  177. package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts.map +1 -1
  178. package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts +3 -3
  179. package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts.map +1 -1
  180. package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts +1 -1
  181. package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts.map +1 -1
  182. package/dist/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.vue.d.ts +1 -1
  183. package/dist/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.vue.d.ts.map +1 -1
  184. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts +2 -2
  185. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts.map +1 -1
  186. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
  187. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
  188. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +1 -1
  189. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  190. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +3 -3
  191. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
  192. package/dist/ui/components/molecules/vc-menu/vc-menu-group.vue.d.ts +1 -1
  193. package/dist/ui/components/molecules/vc-menu/vc-menu-group.vue.d.ts.map +1 -1
  194. package/dist/ui/components/molecules/vc-menu/vc-menu-item.vue.d.ts +1 -1
  195. package/dist/ui/components/molecules/vc-menu/vc-menu-item.vue.d.ts.map +1 -1
  196. package/dist/ui/components/molecules/vc-multivalue/_internal/MultivalueTrigger.vue.d.ts +2 -2
  197. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -1
  198. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
  199. package/dist/ui/components/molecules/vc-select/_internal/SelectTrigger.vue.d.ts +2 -2
  200. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +10 -27
  201. package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
  202. package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
  203. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppBarWidgetItem.vue.d.ts.map +1 -1
  204. package/dist/ui/components/organisms/vc-app/_internal/app-bar/composables/useToggleableContent.d.ts +3 -3
  205. package/dist/ui/components/organisms/vc-app/_internal/app-bar/composables/useToggleableContent.d.ts.map +1 -1
  206. package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts +1 -1
  207. package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts.map +1 -1
  208. package/dist/ui/components/organisms/vc-app/composables/useShellBootstrap.d.ts.map +1 -1
  209. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  210. package/dist/ui/components/organisms/vc-blade/_internal/BladeHeader.vue.d.ts +2 -2
  211. package/dist/ui/components/organisms/vc-blade/_internal/BladeToolbar.vue.d.ts +1 -1
  212. package/dist/ui/components/organisms/vc-blade/_internal/BladeToolbar.vue.d.ts.map +1 -1
  213. package/dist/ui/components/organisms/vc-blade/_internal/toolbar/ToolbarBaseButton.vue.d.ts +1 -1
  214. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +3 -3
  215. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  216. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts +19 -17
  217. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
  218. package/dist/ui/components/organisms/vc-data-table/VcTableAdapter.vue.d.ts +1 -1
  219. package/dist/ui/components/organisms/vc-data-table/VcTableAdapter.vue.d.ts.map +1 -1
  220. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts.map +1 -1
  221. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +2 -2
  222. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
  223. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +1 -1
  224. package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
  225. package/dist/ui/components/organisms/vc-data-table/components/ColumnFilter.vue.d.ts +1 -1
  226. package/dist/ui/components/organisms/vc-data-table/components/ColumnFilter.vue.d.ts.map +1 -1
  227. package/dist/ui/components/organisms/vc-data-table/components/DataTableBody.vue.d.ts.map +1 -1
  228. package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersPanel.vue.d.ts +2 -2
  229. package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersPanel.vue.d.ts.map +1 -1
  230. package/dist/ui/components/organisms/vc-data-table/components/TableCell.vue.d.ts.map +1 -1
  231. package/dist/ui/components/organisms/vc-data-table/components/TableCheckbox.vue.d.ts +2 -2
  232. package/dist/ui/components/organisms/vc-data-table/components/TableHead.vue.d.ts.map +1 -1
  233. package/dist/ui/components/organisms/vc-data-table/components/TableRow.vue.d.ts.map +1 -1
  234. package/dist/ui/components/organisms/vc-data-table/components/TableRowActions.vue.d.ts +1 -1
  235. package/dist/ui/components/organisms/vc-data-table/components/TableRowActions.vue.d.ts.map +1 -1
  236. package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts +7 -7
  237. package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileCard.vue.d.ts +2 -2
  238. package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileCard.vue.d.ts.map +1 -1
  239. package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileView.vue.d.ts +4 -4
  240. package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileView.vue.d.ts.map +1 -1
  241. package/dist/ui/components/organisms/vc-data-table/components/mobile/MobileActionSheet.vue.d.ts +2 -2
  242. package/dist/ui/components/organisms/vc-data-table/components/mobile/PullToRefresh.vue.d.ts.map +1 -1
  243. package/dist/ui/components/organisms/vc-data-table/composables/useColumnWidthEngine.d.ts +46 -0
  244. package/dist/ui/components/organisms/vc-data-table/composables/useColumnWidthEngine.d.ts.map +1 -0
  245. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts +6 -5
  246. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts.map +1 -1
  247. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableState.d.ts +6 -6
  248. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableState.d.ts.map +1 -1
  249. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumns.d.ts +24 -11
  250. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumns.d.ts.map +1 -1
  251. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsReorder.d.ts +6 -9
  252. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsReorder.d.ts.map +1 -1
  253. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts +18 -13
  254. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts.map +1 -1
  255. package/dist/ui/components/organisms/vc-data-table/composables/useTableEditing.d.ts.map +1 -1
  256. package/dist/ui/components/organisms/vc-data-table/composables/useTableSort.d.ts.map +1 -1
  257. package/dist/ui/components/organisms/vc-data-table/keys.d.ts +2 -2
  258. package/dist/ui/components/organisms/vc-data-table/keys.d.ts.map +1 -1
  259. package/dist/ui/components/organisms/vc-data-table/types.d.ts +26 -0
  260. package/dist/ui/components/organisms/vc-data-table/types.d.ts.map +1 -1
  261. package/dist/ui/components/organisms/vc-data-table/utils/ColumnCollector.d.ts.map +1 -1
  262. package/dist/ui/components/organisms/vc-data-table/utils/columnHelpers.d.ts +30 -0
  263. package/dist/ui/components/organisms/vc-data-table/utils/columnHelpers.d.ts.map +1 -0
  264. package/dist/ui/components/organisms/vc-data-table/utils/index.d.ts +1 -0
  265. package/dist/ui/components/organisms/vc-data-table/utils/index.d.ts.map +1 -1
  266. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-filmstrip/vc-gallery-filmstrip.vue.d.ts +1 -1
  267. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-filmstrip/vc-gallery-filmstrip.vue.d.ts.map +1 -1
  268. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +1 -1
  269. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts.map +1 -1
  270. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
  271. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
  272. package/dist/ui/components/organisms/vc-gallery/composables/useGalleryUpload.d.ts.map +1 -1
  273. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +2 -1
  274. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
  275. package/dist/ui/components/organisms/vc-image-upload/vc-image-upload.vue.d.ts +1 -1
  276. package/dist/ui/components/organisms/vc-image-upload/vc-image-upload.vue.d.ts.map +1 -1
  277. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +4 -4
  278. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  279. package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts +8 -8
  280. package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
  281. package/dist/ui/composables/useCollapsible.d.ts.map +1 -1
  282. package/dist/ui/index.d.ts +1 -0
  283. package/dist/ui/index.d.ts.map +1 -1
  284. package/dist/ui/index.js +87 -81
  285. package/dist/vitest-axe.setup.d.ts.map +1 -1
  286. package/dist/vitest-mocks.setup.d.ts +2 -0
  287. package/dist/vitest-mocks.setup.d.ts.map +1 -0
  288. package/package.json +8 -6
  289. package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-CrmX4_5C.js +0 -4256
  290. package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-D9BrIj43.js +0 -21552
  291. package/dist/chunks/vendor-markdown-it-task-lists-xwqUBSah.js +0 -72
  292. package/dist/chunks/vendor-microsoft-applicationinsights-analytics-js-Dvbvo5Dl.js +0 -1207
  293. package/dist/chunks/vendor-microsoft-applicationinsights-cfgsync-js-9wxxo7yB.js +0 -261
  294. package/dist/chunks/vendor-microsoft-applicationinsights-channel-js-c-UYe0ly.js +0 -1822
  295. package/dist/chunks/vendor-microsoft-applicationinsights-common-DgFOCv6a.js +0 -1921
  296. package/dist/chunks/vendor-microsoft-applicationinsights-core-js-DYtaESwI.js +0 -4276
  297. package/dist/chunks/vendor-microsoft-applicationinsights-dependencies-js-BoRkSVPF.js +0 -1407
  298. package/dist/chunks/vendor-microsoft-applicationinsights-properties-js-Ymy9TFDL.js +0 -572
  299. package/dist/chunks/vendor-microsoft-applicationinsights-web-gIbMmGYP.js +0 -487
  300. package/dist/chunks/vendor-nevware21-ts-async-CP171WHM.js +0 -261
  301. package/dist/chunks/vendor-nevware21-ts-utils-Dl8msUu_.js +0 -853
  302. package/dist/chunks/vendor-tiptap-extension-paragraph-EwqudBl5.js +0 -49
  303. package/dist/chunks/vendor-tiptap-extension-placeholder-D1_k7Sra.js +0 -1
  304. package/dist/chunks/vendor-tiptap-extension-table-cell-odWoHoTv.js +0 -1
  305. package/dist/chunks/vendor-tiptap-extension-table-header-odWoHoTv.js +0 -1
  306. package/dist/chunks/vendor-tiptap-extension-table-row-odWoHoTv.js +0 -1
  307. package/dist/chunks/vendor-tiptap-extension-table-tNWQInwa.js +0 -374
  308. package/dist/chunks/vendor-tiptap-pm-CG4ksPkF.js +0 -1
  309. package/dist/ui/types/global-components.d.ts +0 -10
  310. package/dist/ui/types/global-components.d.ts.map +0 -1
@@ -1,15 +1,15 @@
1
- import { f as me, c as gt, T as ge, e as ve, l as ye, j as Ot, b as Q, R as be, a as we } from "./vendor-prosemirror-transform-BUjWd5Tb.js";
2
- import { c as ke, d as Me, e as xe, j as Se, a as Ee, b as Te, f as Ae, g as Ce, h as Pe, l as $e, i as Ne, n as Re, s as ze, k as Ie, m as De, o as _e, p as Oe, q as Tt, w as Be } from "./vendor-prosemirror-commands-Bv4ChObl.js";
3
- import { N as nt, E as je, S as j, T as P, P as $, a as _, A as Le } from "./vendor-prosemirror-state-IeimrELV.js";
4
- import { D as He, d as Bt, F as D, N as Fe, c as ut, S as Ve } from "./vendor-prosemirror-model-DAA3avbR.js";
5
- import { l as We, s as Ue, w as Ke } from "./vendor-prosemirror-schema-list-BNJkECdS.js";
6
- import { E as qe } from "./vendor-prosemirror-view-Chu67Jpw.js";
7
- import { k as Je } from "./vendor-prosemirror-keymap-CAfQyvJ7.js";
8
- var Xe = Object.defineProperty, vt = (e, t) => {
1
+ import { f as me, c as vt, T as ge, e as ve, l as ye, j as _t, b as G, R as be, a as we } from "./vendor-prosemirror-transform-DVGD47fI.js";
2
+ import { c as ke, d as Me, e as xe, j as Se, a as Ee, b as Te, f as Ae, g as Ce, h as Pe, l as $e, i as Ne, n as Re, s as ze, k as Ie, m as De, o as Oe, p as _e, q as At, w as Be } from "./vendor-prosemirror-commands-BaRVaTVO.js";
3
+ import { N as st, E as je, S as H, T as z, P as I, a as B, A as Le } from "./vendor-prosemirror-state-BvFA7AjG.js";
4
+ import { D as He, d as Bt, F as _, N as Fe, c as ut, S as Ve } from "./vendor-prosemirror-model-DAA3avbR.js";
5
+ import { l as We, s as Ue, w as Ke } from "./vendor-prosemirror-schema-list-qDgvFydE.js";
6
+ import { E as qe } from "./vendor-prosemirror-view-BW4UqvjQ.js";
7
+ import { k as Je } from "./vendor-prosemirror-keymap-tvZqK1zZ.js";
8
+ var Xe = Object.defineProperty, yt = (e, t) => {
9
9
  for (var n in t)
10
10
  Xe(e, n, { get: t[n], enumerable: !0 });
11
11
  };
12
- function rt(e) {
12
+ function ot(e) {
13
13
  const { state: t, transaction: n } = e;
14
14
  let { selection: r } = n, { doc: s } = n, { storedMarks: o } = n;
15
15
  return {
@@ -34,7 +34,7 @@ function rt(e) {
34
34
  }
35
35
  };
36
36
  }
37
- var st = class {
37
+ var it = class {
38
38
  constructor(e) {
39
39
  this.editor = e.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = e.state;
40
40
  }
@@ -48,8 +48,8 @@ var st = class {
48
48
  const { rawCommands: e, editor: t, state: n } = this, { view: r } = t, { tr: s } = n, o = this.buildProps(s);
49
49
  return Object.fromEntries(
50
50
  Object.entries(e).map(([i, a]) => [i, (...l) => {
51
- const u = a(...l)(o);
52
- return !s.getMeta("preventDispatch") && !this.hasCustomState && r.dispatch(s), u;
51
+ const f = a(...l)(o);
52
+ return !s.getMeta("preventDispatch") && !this.hasCustomState && r.dispatch(s), f;
53
53
  }])
54
54
  );
55
55
  }
@@ -60,16 +60,16 @@ var st = class {
60
60
  return () => this.createCan();
61
61
  }
62
62
  createChain(e, t = !0) {
63
- const { rawCommands: n, editor: r, state: s } = this, { view: o } = r, i = [], a = !!e, c = e || s.tr, l = () => (!a && t && !c.getMeta("preventDispatch") && !this.hasCustomState && o.dispatch(c), i.every((d) => d === !0)), u = {
63
+ const { rawCommands: n, editor: r, state: s } = this, { view: o } = r, i = [], a = !!e, c = e || s.tr, l = () => (!a && t && !c.getMeta("preventDispatch") && !this.hasCustomState && o.dispatch(c), i.every((d) => d === !0)), f = {
64
64
  ...Object.fromEntries(
65
- Object.entries(n).map(([d, p]) => [d, (...h) => {
66
- const m = this.buildProps(c, t), g = p(...h)(m);
67
- return i.push(g), u;
65
+ Object.entries(n).map(([d, p]) => [d, (...m) => {
66
+ const h = this.buildProps(c, t), g = p(...m)(h);
67
+ return i.push(g), f;
68
68
  }])
69
69
  ),
70
70
  run: l
71
71
  };
72
- return u;
72
+ return f;
73
73
  }
74
74
  createCan(e) {
75
75
  const { rawCommands: t, state: n } = this, r = !1, s = e || n.tr, o = this.buildProps(s, r);
@@ -85,7 +85,7 @@ var st = class {
85
85
  tr: e,
86
86
  editor: r,
87
87
  view: o,
88
- state: rt({
88
+ state: ot({
89
89
  state: s,
90
90
  transaction: e
91
91
  }),
@@ -102,7 +102,7 @@ var st = class {
102
102
  return i;
103
103
  }
104
104
  }, jt = {};
105
- vt(jt, {
105
+ yt(jt, {
106
106
  blur: () => Ye,
107
107
  clearContent: () => Qe,
108
108
  clearNodes: () => Ze,
@@ -138,8 +138,8 @@ vt(jt, {
138
138
  scrollIntoView: () => zn,
139
139
  selectAll: () => In,
140
140
  selectNodeBackward: () => Dn,
141
- selectNodeForward: () => _n,
142
- selectParentNode: () => On,
141
+ selectNodeForward: () => On,
142
+ selectParentNode: () => _n,
143
143
  selectTextblockEnd: () => Bn,
144
144
  selectTextblockStart: () => jn,
145
145
  setContent: () => Ln,
@@ -152,17 +152,17 @@ vt(jt, {
152
152
  sinkListItem: () => pr,
153
153
  splitBlock: () => hr,
154
154
  splitListItem: () => mr,
155
- toggleList: () => gr,
156
- toggleMark: () => vr,
157
- toggleNode: () => yr,
158
- toggleWrap: () => br,
159
- undoInputRule: () => wr,
160
- unsetAllMarks: () => kr,
161
- unsetMark: () => Mr,
162
- unsetTextDirection: () => xr,
163
- updateAttributes: () => Sr,
164
- wrapIn: () => Er,
165
- wrapInList: () => Tr
155
+ toggleList: () => vr,
156
+ toggleMark: () => yr,
157
+ toggleNode: () => br,
158
+ toggleWrap: () => wr,
159
+ undoInputRule: () => kr,
160
+ unsetAllMarks: () => Mr,
161
+ unsetMark: () => xr,
162
+ unsetTextDirection: () => Sr,
163
+ updateAttributes: () => Er,
164
+ wrapIn: () => Tr,
165
+ wrapInList: () => Ar
166
166
  });
167
167
  var Ye = () => ({ editor: e, view: t }) => (requestAnimationFrame(() => {
168
168
  var n;
@@ -173,22 +173,22 @@ var Ye = () => ({ editor: e, view: t }) => (requestAnimationFrame(() => {
173
173
  e.doc.nodesBetween(o.pos, i.pos, (a, c) => {
174
174
  if (a.type.isText)
175
175
  return;
176
- const { doc: l, mapping: u } = t, d = l.resolve(u.map(c)), p = l.resolve(u.map(c + a.nodeSize)), f = d.blockRange(p);
177
- if (!f)
176
+ const { doc: l, mapping: f } = t, d = l.resolve(f.map(c)), p = l.resolve(f.map(c + a.nodeSize)), u = d.blockRange(p);
177
+ if (!u)
178
178
  return;
179
- const h = ye(f);
179
+ const m = ye(u);
180
180
  if (a.type.isTextblock) {
181
- const { defaultType: m } = d.parent.contentMatchAt(d.index());
182
- t.setNodeMarkup(f.start, m);
181
+ const { defaultType: h } = d.parent.contentMatchAt(d.index());
182
+ t.setNodeMarkup(u.start, h);
183
183
  }
184
- (h || h === 0) && t.lift(f, h);
184
+ (m || m === 0) && t.lift(u, m);
185
185
  });
186
186
  }), !0;
187
187
  }, Ge = (e) => (t) => e(t), tn = () => ({ state: e, dispatch: t }) => ke(e, t), en = (e, t) => ({ editor: n, tr: r }) => {
188
188
  const { state: s } = n, o = s.doc.slice(e.from, e.to);
189
189
  r.deleteRange(e.from, e.to);
190
190
  const i = r.mapping.map(t);
191
- return r.insert(i, o.content), r.setSelection(new P(r.doc.resolve(Math.max(i - 1, 0)))), !0;
191
+ return r.insert(i, o.content), r.setSelection(new z(r.doc.resolve(Math.max(i - 1, 0)))), !0;
192
192
  }, nn = () => ({ tr: e, dispatch: t }) => {
193
193
  const { selection: n } = e, r = n.$anchor.node();
194
194
  if (r.content.size > 0)
@@ -227,41 +227,46 @@ var rn = (e) => ({ tr: t, state: n, dispatch: r }) => {
227
227
  const { from: r, to: s } = e;
228
228
  return n && t.delete(r, s), !0;
229
229
  }, on = () => ({ state: e, dispatch: t }) => Me(e, t), an = () => ({ commands: e }) => e.keyboardShortcut("Enter"), cn = () => ({ state: e, dispatch: t }) => xe(e, t);
230
- function yt(e) {
230
+ function bt(e) {
231
231
  return Object.prototype.toString.call(e) === "[object RegExp]";
232
232
  }
233
- function G(e, t, n = { strict: !0 }) {
233
+ function et(e, t, n = { strict: !0 }) {
234
234
  const r = Object.keys(t);
235
- return r.length ? r.every((s) => n.strict ? t[s] === e[s] : yt(t[s]) ? t[s].test(e[s]) : t[s] === e[s]) : !0;
235
+ return r.length ? r.every((s) => n.strict ? t[s] === e[s] : bt(t[s]) ? t[s].test(e[s]) : t[s] === e[s]) : !0;
236
236
  }
237
237
  function Lt(e, t, n = {}) {
238
- return e.find((r) => r.type === t && G(
238
+ return e.find((r) => r.type === t && et(
239
239
  // Only check equality for the attributes that are provided
240
240
  Object.fromEntries(Object.keys(n).map((s) => [s, r.attrs[s]])),
241
241
  n
242
242
  ));
243
243
  }
244
- function At(e, t, n = {}) {
244
+ function Ct(e, t, n = {}) {
245
245
  return !!Lt(e, t, n);
246
246
  }
247
- function bt(e, t, n) {
248
- var r;
247
+ function wt(e, t, n) {
249
248
  if (!e || !t)
250
249
  return;
251
- let s = e.parent.childAfter(e.parentOffset);
252
- if ((!s.node || !s.node.marks.some((u) => u.type === t)) && (s = e.parent.childBefore(e.parentOffset)), !s.node || !s.node.marks.some((u) => u.type === t) || (n = n || ((r = s.node.marks[0]) == null ? void 0 : r.attrs), !Lt([...s.node.marks], t, n)))
250
+ let r = e.parent.childAfter(e.parentOffset);
251
+ if ((!r.node || !r.node.marks.some((l) => l.type === t)) && (r = e.parent.childBefore(e.parentOffset)), !r.node || !r.node.marks.some((l) => l.type === t))
252
+ return;
253
+ if (!n) {
254
+ const l = r.node.marks.find((f) => f.type === t);
255
+ l && (n = l.attrs);
256
+ }
257
+ if (!Lt([...r.node.marks], t, n))
253
258
  return;
254
- let i = s.index, a = e.start() + s.offset, c = i + 1, l = a + s.node.nodeSize;
255
- for (; i > 0 && At([...e.parent.child(i - 1).marks], t, n); )
256
- i -= 1, a -= e.parent.child(i).nodeSize;
257
- for (; c < e.parent.childCount && At([...e.parent.child(c).marks], t, n); )
258
- l += e.parent.child(c).nodeSize, c += 1;
259
+ let o = r.index, i = e.start() + r.offset, a = o + 1, c = i + r.node.nodeSize;
260
+ for (; o > 0 && Ct([...e.parent.child(o - 1).marks], t, n); )
261
+ o -= 1, i -= e.parent.child(o).nodeSize;
262
+ for (; a < e.parent.childCount && Ct([...e.parent.child(a).marks], t, n); )
263
+ c += e.parent.child(a).nodeSize, a += 1;
259
264
  return {
260
- from: a,
261
- to: l
265
+ from: i,
266
+ to: c
262
267
  };
263
268
  }
264
- function z(e, t) {
269
+ function O(e, t) {
265
270
  if (typeof e == "string") {
266
271
  if (!t.marks[e])
267
272
  throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);
@@ -269,12 +274,12 @@ function z(e, t) {
269
274
  }
270
275
  return e;
271
276
  }
272
- var ln = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
273
- const o = z(e, r.schema), { doc: i, selection: a } = n, { $from: c, from: l, to: u } = a;
277
+ var ln = (e, t) => ({ tr: n, state: r, dispatch: s }) => {
278
+ const o = O(e, r.schema), { doc: i, selection: a } = n, { $from: c, from: l, to: f } = a;
274
279
  if (s) {
275
- const d = bt(c, o, t);
276
- if (d && d.from <= l && d.to >= u) {
277
- const p = P.create(i, d.from, d.to);
280
+ const d = wt(c, o, t);
281
+ if (d && d.from <= l && d.to >= f) {
282
+ const p = z.create(i, d.from, d.to);
278
283
  n.setSelection(p);
279
284
  }
280
285
  }
@@ -287,26 +292,26 @@ var ln = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
287
292
  return !1;
288
293
  };
289
294
  function Ht(e) {
290
- return e instanceof P;
295
+ return e instanceof z;
291
296
  }
292
- function B(e = 0, t = 0, n = 0) {
297
+ function L(e = 0, t = 0, n = 0) {
293
298
  return Math.min(Math.max(e, t), n);
294
299
  }
295
300
  function Ft(e, t = null) {
296
301
  if (!t)
297
302
  return null;
298
- const n = j.atStart(e), r = j.atEnd(e);
303
+ const n = H.atStart(e), r = H.atEnd(e);
299
304
  if (t === "start" || t === !0)
300
305
  return n;
301
306
  if (t === "end")
302
307
  return r;
303
308
  const s = n.from, o = r.to;
304
- return t === "all" ? P.create(e, B(0, s, o), B(e.content.size, s, o)) : P.create(e, B(t, s, o), B(t, s, o));
309
+ return t === "all" ? z.create(e, L(0, s, o), L(e.content.size, s, o)) : z.create(e, L(t, s, o), L(t, s, o));
305
310
  }
306
- function Ct() {
311
+ function Pt() {
307
312
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
308
313
  }
309
- function tt() {
314
+ function nt() {
310
315
  return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || // iPad on iOS 13 detection
311
316
  navigator.userAgent.includes("Mac") && "ontouchend" in document;
312
317
  }
@@ -319,7 +324,7 @@ var fn = (e = null, t = {}) => ({ editor: n, view: r, tr: s, dispatch: o }) => {
319
324
  ...t
320
325
  };
321
326
  const i = () => {
322
- (tt() || Ct()) && r.dom.focus(), un() && !tt() && !Ct() && r.dom.focus({ preventScroll: !0 }), requestAnimationFrame(() => {
327
+ (nt() || Pt()) && r.dom.focus(), un() && !nt() && !Pt() && r.dom.focus({ preventScroll: !0 }), requestAnimationFrame(() => {
323
328
  n.isDestroyed || (r.focus(), t?.scrollIntoView && n.commands.scrollIntoView());
324
329
  });
325
330
  };
@@ -341,14 +346,14 @@ var fn = (e = null, t = {}) => ({ editor: n, view: r, tr: s, dispatch: o }) => {
341
346
  }
342
347
  return e;
343
348
  };
344
- function q(e) {
349
+ function X(e) {
345
350
  if (typeof window > "u")
346
351
  throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
347
352
  const t = `<body>${e}</body>`, n = new window.DOMParser().parseFromString(t, "text/html").body;
348
353
  return Vt(n);
349
354
  }
350
- function W(e, t, n) {
351
- if (e instanceof Fe || e instanceof D)
355
+ function q(e, t, n) {
356
+ if (e instanceof Fe || e instanceof _)
352
357
  return e;
353
358
  n = {
354
359
  slice: !0,
@@ -359,13 +364,13 @@ function W(e, t, n) {
359
364
  if (r)
360
365
  try {
361
366
  if (Array.isArray(e) && e.length > 0)
362
- return D.fromArray(e.map((a) => t.nodeFromJSON(a)));
367
+ return _.fromArray(e.map((a) => t.nodeFromJSON(a)));
363
368
  const i = t.nodeFromJSON(e);
364
369
  return n.errorOnInvalidContent && i.check(), i;
365
370
  } catch (o) {
366
371
  if (n.errorOnInvalidContent)
367
372
  throw new Error("[tiptap error]: Invalid JSON content", { cause: o });
368
- return console.warn("[tiptap warn]: Invalid content.", "Passed value:", e, "Error:", o), W("", t, n);
373
+ return console.warn("[tiptap warn]: Invalid content.", "Passed value:", e, "Error:", o), q("", t, n);
369
374
  }
370
375
  if (s) {
371
376
  if (n.errorOnInvalidContent) {
@@ -388,15 +393,15 @@ function W(e, t, n) {
388
393
  }
389
394
  })
390
395
  });
391
- if (n.slice ? ut.fromSchema(c).parseSlice(q(e), n.parseOptions) : ut.fromSchema(c).parse(q(e), n.parseOptions), n.errorOnInvalidContent && i)
396
+ if (n.slice ? ut.fromSchema(c).parseSlice(X(e), n.parseOptions) : ut.fromSchema(c).parse(X(e), n.parseOptions), n.errorOnInvalidContent && i)
392
397
  throw new Error("[tiptap error]: Invalid HTML content", {
393
398
  cause: new Error(`Invalid element found: ${a}`)
394
399
  });
395
400
  }
396
401
  const o = ut.fromSchema(t);
397
- return n.slice ? o.parseSlice(q(e), n.parseOptions).content : o.parse(q(e), n.parseOptions);
402
+ return n.slice ? o.parseSlice(X(e), n.parseOptions).content : o.parse(X(e), n.parseOptions);
398
403
  }
399
- return W("", t, n);
404
+ return q("", t, n);
400
405
  }
401
406
  function mn(e, t, n) {
402
407
  const r = e.steps.length - 1;
@@ -407,9 +412,9 @@ function mn(e, t, n) {
407
412
  return;
408
413
  const o = e.mapping.maps[r];
409
414
  let i = 0;
410
- o.forEach((a, c, l, u) => {
411
- i === 0 && (i = u);
412
- }), e.setSelection(j.near(e.doc.resolve(i), n));
415
+ o.forEach((a, c, l, f) => {
416
+ i === 0 && (i = f);
417
+ }), e.setSelection(H.near(e.doc.resolve(i), n));
413
418
  }
414
419
  var gn = (e) => !("type" in e), vn = (e, t, n) => ({ tr: r, dispatch: s, editor: o }) => {
415
420
  var i;
@@ -436,7 +441,7 @@ var gn = (e) => !("type" in e), vn = (e, t, n) => ({ tr: r, dispatch: s, editor:
436
441
  };
437
442
  if (!n.errorOnInvalidContent && !o.options.enableContentCheck && o.options.emitContentError)
438
443
  try {
439
- W(t, o.schema, {
444
+ q(t, o.schema, {
440
445
  parseOptions: l,
441
446
  errorOnInvalidContent: !0
442
447
  });
@@ -444,49 +449,49 @@ var gn = (e) => !("type" in e), vn = (e, t, n) => ({ tr: r, dispatch: s, editor:
444
449
  c(g);
445
450
  }
446
451
  try {
447
- a = W(t, o.schema, {
452
+ a = q(t, o.schema, {
448
453
  parseOptions: l,
449
454
  errorOnInvalidContent: (i = n.errorOnInvalidContent) != null ? i : o.options.enableContentCheck
450
455
  });
451
456
  } catch (g) {
452
457
  return c(g), !1;
453
458
  }
454
- let { from: u, to: d } = typeof e == "number" ? { from: e, to: e } : { from: e.from, to: e.to }, p = !0, f = !0;
459
+ let { from: f, to: d } = typeof e == "number" ? { from: e, to: e } : { from: e.from, to: e.to }, p = !0, u = !0;
455
460
  if ((gn(a) ? a : [a]).forEach((g) => {
456
- g.check(), p = p ? g.isText && g.marks.length === 0 : !1, f = f ? g.isBlock : !1;
457
- }), u === d && f) {
458
- const { parent: g } = r.doc.resolve(u);
459
- g.isTextblock && !g.type.spec.code && !g.childCount && (u -= 1, d += 1);
461
+ g.check(), p = p ? g.isText && g.marks.length === 0 : !1, u = u ? g.isBlock : !1;
462
+ }), f === d && u) {
463
+ const { parent: g } = r.doc.resolve(f);
464
+ g.isTextblock && !g.type.spec.code && !g.childCount && (f -= 1, d += 1);
460
465
  }
461
- let m;
466
+ let h;
462
467
  if (p) {
463
468
  if (Array.isArray(t))
464
- m = t.map((g) => g.text || "").join("");
465
- else if (t instanceof D) {
469
+ h = t.map((g) => g.text || "").join("");
470
+ else if (t instanceof _) {
466
471
  let g = "";
467
472
  t.forEach((v) => {
468
473
  v.text && (g += v.text);
469
- }), m = g;
470
- } else typeof t == "object" && t && t.text ? m = t.text : m = t;
471
- r.insertText(m, u, d);
474
+ }), h = g;
475
+ } else typeof t == "object" && t && t.text ? h = t.text : h = t;
476
+ r.insertText(h, f, d);
472
477
  } else {
473
- m = a;
474
- const g = r.doc.resolve(u), v = g.node(), b = g.parentOffset === 0, k = v.isText || v.isTextblock, M = v.content.size > 0;
475
- b && k && M && (u = Math.max(0, u - 1)), r.replaceWith(u, d, m);
478
+ h = a;
479
+ const g = r.doc.resolve(f), v = g.node(), b = g.parentOffset === 0, k = v.isText || v.isTextblock, M = v.content.size > 0;
480
+ b && k && M && u && (f = Math.max(0, f - 1)), r.replaceWith(f, d, h);
476
481
  }
477
- n.updateSelection && mn(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: u, text: m }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: u, text: m });
482
+ n.updateSelection && mn(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: f, text: h }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: f, text: h });
478
483
  }
479
484
  return !0;
480
485
  }, yn = () => ({ state: e, dispatch: t }) => Se(e, t), bn = () => ({ state: e, dispatch: t }) => Ee(e, t), wn = () => ({ state: e, dispatch: t }) => Te(e, t), kn = () => ({ state: e, dispatch: t }) => Ae(e, t), Mn = () => ({ state: e, dispatch: t, tr: n }) => {
481
486
  try {
482
- const r = Ot(e.doc, e.selection.$from.pos, -1);
487
+ const r = _t(e.doc, e.selection.$from.pos, -1);
483
488
  return r == null ? !1 : (n.join(r, 2), t && t(n), !0);
484
489
  } catch {
485
490
  return !1;
486
491
  }
487
492
  }, xn = () => ({ state: e, dispatch: t, tr: n }) => {
488
493
  try {
489
- const r = Ot(e.doc, e.selection.$from.pos, 1);
494
+ const r = _t(e.doc, e.selection.$from.pos, 1);
490
495
  return r == null ? !1 : (n.join(r, 2), t && t(n), !0);
491
496
  } catch {
492
497
  return !1;
@@ -511,7 +516,7 @@ function Tn(e) {
511
516
  else if (/^s(hift)?$/i.test(c))
512
517
  o = !0;
513
518
  else if (/^mod$/i.test(c))
514
- tt() || Wt() ? i = !0 : s = !0;
519
+ nt() || Wt() ? i = !0 : s = !0;
515
520
  else
516
521
  throw new Error(`Unrecognized modifier name: ${c}`);
517
522
  }
@@ -530,53 +535,53 @@ var An = (e) => ({ editor: t, view: n, tr: r, dispatch: s }) => {
530
535
  n.someProp("handleKeyDown", (l) => l(n, a));
531
536
  });
532
537
  return c?.steps.forEach((l) => {
533
- const u = l.map(r.mapping);
534
- u && s && r.maybeStep(u);
538
+ const f = l.map(r.mapping);
539
+ f && s && r.maybeStep(f);
535
540
  }), !0;
536
541
  };
537
- function U(e, t, n = {}) {
542
+ function J(e, t, n = {}) {
538
543
  const { from: r, to: s, empty: o } = e.selection, i = t ? T(t, e.schema) : null, a = [];
539
544
  e.doc.nodesBetween(r, s, (d, p) => {
540
545
  if (d.isText)
541
546
  return;
542
- const f = Math.max(r, p), h = Math.min(s, p + d.nodeSize);
547
+ const u = Math.max(r, p), m = Math.min(s, p + d.nodeSize);
543
548
  a.push({
544
549
  node: d,
545
- from: f,
546
- to: h
550
+ from: u,
551
+ to: m
547
552
  });
548
553
  });
549
- const c = s - r, l = a.filter((d) => i ? i.name === d.node.type.name : !0).filter((d) => G(d.node.attrs, n, { strict: !1 }));
554
+ const c = s - r, l = a.filter((d) => i ? i.name === d.node.type.name : !0).filter((d) => et(d.node.attrs, n, { strict: !1 }));
550
555
  return o ? !!l.length : l.reduce((d, p) => d + p.to - p.from, 0) >= c;
551
556
  }
552
557
  var Cn = (e, t = {}) => ({ state: n, dispatch: r }) => {
553
558
  const s = T(e, n.schema);
554
- return U(n, s, t) ? $e(n, r) : !1;
559
+ return J(n, s, t) ? $e(n, r) : !1;
555
560
  }, Pn = () => ({ state: e, dispatch: t }) => Ne(e, t), $n = (e) => ({ state: t, dispatch: n }) => {
556
561
  const r = T(e, t.schema);
557
562
  return We(r)(t, n);
558
563
  }, Nn = () => ({ state: e, dispatch: t }) => Re(e, t);
559
- function ot(e, t) {
564
+ function at(e, t) {
560
565
  return t.nodes[e] ? "node" : t.marks[e] ? "mark" : null;
561
566
  }
562
- function Pt(e, t) {
567
+ function $t(e, t) {
563
568
  const n = typeof t == "string" ? [t] : t;
564
569
  return Object.keys(e).reduce((r, s) => (n.includes(s) || (r[s] = e[s]), r), {});
565
570
  }
566
571
  var Rn = (e, t) => ({ tr: n, state: r, dispatch: s }) => {
567
572
  let o = null, i = null;
568
- const a = ot(
573
+ const a = at(
569
574
  typeof e == "string" ? e : e.name,
570
575
  r.schema
571
576
  );
572
577
  if (!a)
573
578
  return !1;
574
- a === "node" && (o = T(e, r.schema)), a === "mark" && (i = z(e, r.schema));
579
+ a === "node" && (o = T(e, r.schema)), a === "mark" && (i = O(e, r.schema));
575
580
  let c = !1;
576
581
  return n.selection.ranges.forEach((l) => {
577
- r.doc.nodesBetween(l.$from.pos, l.$to.pos, (u, d) => {
578
- o && o === u.type && (c = !0, s && n.setNodeMarkup(d, void 0, Pt(u.attrs, t))), i && u.marks.length && u.marks.forEach((p) => {
579
- i === p.type && (c = !0, s && n.addMark(d, d + u.nodeSize, i.create(Pt(p.attrs, t))));
582
+ r.doc.nodesBetween(l.$from.pos, l.$to.pos, (f, d) => {
583
+ o && o === f.type && (c = !0, s && n.setNodeMarkup(d, void 0, $t(f.attrs, t))), i && f.marks.length && f.marks.forEach((p) => {
584
+ i === p.type && (c = !0, s && n.addMark(d, d + f.nodeSize, i.create($t(p.attrs, t))));
580
585
  });
581
586
  });
582
587
  }), c;
@@ -586,9 +591,9 @@ var Rn = (e, t) => ({ tr: n, state: r, dispatch: s }) => {
586
591
  e.setSelection(n);
587
592
  }
588
593
  return !0;
589
- }, Dn = () => ({ state: e, dispatch: t }) => ze(e, t), _n = () => ({ state: e, dispatch: t }) => Ie(e, t), On = () => ({ state: e, dispatch: t }) => De(e, t), Bn = () => ({ state: e, dispatch: t }) => _e(e, t), jn = () => ({ state: e, dispatch: t }) => Oe(e, t);
590
- function ht(e, t, n = {}, r = {}) {
591
- return W(e, t, {
594
+ }, Dn = () => ({ state: e, dispatch: t }) => ze(e, t), On = () => ({ state: e, dispatch: t }) => Ie(e, t), _n = () => ({ state: e, dispatch: t }) => De(e, t), Bn = () => ({ state: e, dispatch: t }) => Oe(e, t), jn = () => ({ state: e, dispatch: t }) => _e(e, t);
595
+ function mt(e, t, n = {}, r = {}) {
596
+ return q(e, t, {
592
597
  slice: !1,
593
598
  parseOptions: n,
594
599
  errorOnInvalidContent: r.errorOnInvalidContent
@@ -597,7 +602,7 @@ function ht(e, t, n = {}, r = {}) {
597
602
  var Ln = (e, { errorOnInvalidContent: t, emitUpdate: n = !0, parseOptions: r = {} } = {}) => ({ editor: s, tr: o, dispatch: i, commands: a }) => {
598
603
  const { doc: c } = o;
599
604
  if (r.preserveWhitespace !== "full") {
600
- const l = ht(e, s.schema, r, {
605
+ const l = mt(e, s.schema, r, {
601
606
  errorOnInvalidContent: t ?? s.options.enableContentCheck
602
607
  });
603
608
  return i && o.replaceWith(0, c.content.size, l).setMeta("preventUpdate", !n), !0;
@@ -608,7 +613,7 @@ var Ln = (e, { errorOnInvalidContent: t, emitUpdate: n = !0, parseOptions: r = {
608
613
  });
609
614
  };
610
615
  function Ut(e, t) {
611
- const n = z(t, e.schema), { from: r, to: s, empty: o } = e.selection, i = [];
616
+ const n = O(t, e.schema), { from: r, to: s, empty: o } = e.selection, i = [];
612
617
  o ? (e.storedMarks && i.push(...e.storedMarks), i.push(...e.selection.$head.marks())) : e.doc.nodesBetween(r, s, (c) => {
613
618
  i.push(...c.marks);
614
619
  });
@@ -631,7 +636,7 @@ function Fn(e) {
631
636
  }
632
637
  return null;
633
638
  }
634
- function os(e, t, n) {
639
+ function is(e, t, n) {
635
640
  const r = [];
636
641
  return e.nodesBetween(t.from, t.to, (s, o) => {
637
642
  n(s) && r.push({
@@ -652,7 +657,7 @@ function Vn(e, t) {
652
657
  };
653
658
  }
654
659
  }
655
- function it(e) {
660
+ function ct(e) {
656
661
  return (t) => Vn(t.$from, e);
657
662
  }
658
663
  function y(e, t, n) {
@@ -661,17 +666,17 @@ function y(e, t, n) {
661
666
  parent: e.parent ? y(e.parent, t, n) : null
662
667
  }) : e.config[t];
663
668
  }
664
- function wt(e) {
669
+ function kt(e) {
665
670
  return e.map((t) => {
666
671
  const n = {
667
672
  name: t.name,
668
673
  options: t.options,
669
674
  storage: t.storage
670
675
  }, r = y(t, "addExtensions", n);
671
- return r ? [t, ...wt(r())] : t;
676
+ return r ? [t, ...kt(r())] : t;
672
677
  }).flat(10);
673
678
  }
674
- function kt(e, t) {
679
+ function Mt(e, t) {
675
680
  const n = He.fromSchema(t).serializeFragment(e), s = document.implementation.createHTMLDocument().createElement("div");
676
681
  return s.appendChild(n), s.innerHTML;
677
682
  }
@@ -684,7 +689,7 @@ function x(e, t = void 0, ...n) {
684
689
  function Wn(e = {}) {
685
690
  return Object.keys(e).length === 0 && e.constructor === Object;
686
691
  }
687
- function L(e) {
692
+ function F(e) {
688
693
  const t = e.filter((s) => s.type === "extension"), n = e.filter((s) => s.type === "node"), r = e.filter((s) => s.type === "mark");
689
694
  return {
690
695
  baseExtensions: t,
@@ -693,7 +698,7 @@ function L(e) {
693
698
  };
694
699
  }
695
700
  function qt(e) {
696
- const t = [], { nodeExtensions: n, markExtensions: r } = L(e), s = [...n, ...r], o = {
701
+ const t = [], { nodeExtensions: n, markExtensions: r } = F(e), s = [...n, ...r], o = {
697
702
  default: null,
698
703
  validate: void 0,
699
704
  rendered: !0,
@@ -703,7 +708,7 @@ function qt(e) {
703
708
  isRequired: !1
704
709
  }, i = n.filter((l) => l.name !== "text").map((l) => l.name), a = r.map((l) => l.name), c = [...i, ...a];
705
710
  return e.forEach((l) => {
706
- const u = {
711
+ const f = {
707
712
  name: l.name,
708
713
  options: l.options,
709
714
  storage: l.storage,
@@ -711,16 +716,16 @@ function qt(e) {
711
716
  }, d = y(
712
717
  l,
713
718
  "addGlobalAttributes",
714
- u
719
+ f
715
720
  );
716
721
  if (!d)
717
722
  return;
718
- d().forEach((f) => {
719
- let h;
720
- Array.isArray(f.types) ? h = f.types : f.types === "*" ? h = c : f.types === "nodes" ? h = i : f.types === "marks" ? h = a : h = [], h.forEach((m) => {
721
- Object.entries(f.attributes).forEach(([g, v]) => {
723
+ d().forEach((u) => {
724
+ let m;
725
+ Array.isArray(u.types) ? m = u.types : u.types === "*" ? m = c : u.types === "nodes" ? m = i : u.types === "marks" ? m = a : m = [], m.forEach((h) => {
726
+ Object.entries(u.attributes).forEach(([g, v]) => {
722
727
  t.push({
723
- type: m,
728
+ type: h,
724
729
  name: g,
725
730
  attribute: {
726
731
  ...o,
@@ -731,27 +736,27 @@ function qt(e) {
731
736
  });
732
737
  });
733
738
  }), s.forEach((l) => {
734
- const u = {
739
+ const f = {
735
740
  name: l.name,
736
741
  options: l.options,
737
742
  storage: l.storage
738
743
  }, d = y(
739
744
  l,
740
745
  "addAttributes",
741
- u
746
+ f
742
747
  );
743
748
  if (!d)
744
749
  return;
745
750
  const p = d();
746
- Object.entries(p).forEach(([f, h]) => {
747
- const m = {
751
+ Object.entries(p).forEach(([u, m]) => {
752
+ const h = {
748
753
  ...o,
749
- ...h
754
+ ...m
750
755
  };
751
- typeof m?.default == "function" && (m.default = m.default()), m?.isRequired && m?.default === void 0 && delete m.default, t.push({
756
+ typeof h?.default == "function" && (h.default = h.default()), h?.isRequired && h?.default === void 0 && delete h.default, t.push({
752
757
  type: l.name,
753
- name: f,
754
- attribute: m
758
+ name: u,
759
+ attribute: h
755
760
  });
756
761
  });
757
762
  }), t;
@@ -788,7 +793,7 @@ function Un(e) {
788
793
  }
789
794
  return n && t.push(n), t;
790
795
  }
791
- function $t(e) {
796
+ function Nt(e) {
792
797
  const t = [], n = Un(e || ""), r = n.length;
793
798
  for (let s = 0; s < r; s += 1) {
794
799
  const o = n[s], i = o.indexOf(":");
@@ -808,17 +813,17 @@ function Kn(...e) {
808
813
  return;
809
814
  }
810
815
  if (s === "class") {
811
- const a = o ? String(o).split(" ") : [], c = r[s] ? r[s].split(" ") : [], l = a.filter((u) => !c.includes(u));
816
+ const a = o ? String(o).split(" ") : [], c = r[s] ? r[s].split(" ") : [], l = a.filter((f) => !c.includes(f));
812
817
  r[s] = [...c, ...l].join(" ");
813
818
  } else if (s === "style") {
814
- const a = new Map([...$t(r[s]), ...$t(o)]);
819
+ const a = new Map([...Nt(r[s]), ...Nt(o)]);
815
820
  r[s] = Array.from(a.entries()).map(([c, l]) => `${c}: ${l}`).join("; ");
816
821
  } else
817
822
  r[s] = o;
818
823
  }), r;
819
824
  }, {});
820
825
  }
821
- function et(e, t) {
826
+ function rt(e, t) {
822
827
  return t.filter((n) => n.type === e.type.name).filter((n) => n.attribute.rendered).map((n) => n.attribute.renderHTML ? n.attribute.renderHTML(e.attrs) || {} : {
823
828
  [n.name]: e.attrs[n.name]
824
829
  }).reduce((n, r) => Kn(n, r), {});
@@ -826,7 +831,7 @@ function et(e, t) {
826
831
  function qn(e) {
827
832
  return typeof e != "string" ? e : e.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(e) : e === "true" ? !0 : e === "false" ? !1 : e;
828
833
  }
829
- function Nt(e, t) {
834
+ function Rt(e, t) {
830
835
  return "style" in e ? e : {
831
836
  ...e,
832
837
  getAttrs: (n) => {
@@ -844,22 +849,22 @@ function Nt(e, t) {
844
849
  }
845
850
  };
846
851
  }
847
- function Rt(e) {
852
+ function zt(e) {
848
853
  return Object.fromEntries(
849
854
  // @ts-ignore
850
855
  Object.entries(e).filter(([t, n]) => t === "attrs" && Wn(n) ? !1 : n != null)
851
856
  );
852
857
  }
853
- function zt(e) {
858
+ function It(e) {
854
859
  var t, n;
855
860
  const r = {};
856
861
  return !((t = e?.attribute) != null && t.isRequired) && "default" in (e?.attribute || {}) && (r.default = e.attribute.default), ((n = e?.attribute) == null ? void 0 : n.validate) !== void 0 && (r.validate = e.attribute.validate), [e.name, r];
857
862
  }
858
863
  function Jn(e, t) {
859
864
  var n;
860
- const r = qt(e), { nodeExtensions: s, markExtensions: o } = L(e), i = (n = s.find((l) => y(l, "topNode"))) == null ? void 0 : n.name, a = Object.fromEntries(
865
+ const r = qt(e), { nodeExtensions: s, markExtensions: o } = F(e), i = (n = s.find((l) => y(l, "topNode"))) == null ? void 0 : n.name, a = Object.fromEntries(
861
866
  s.map((l) => {
862
- const u = r.filter((v) => v.type === l.name), d = {
867
+ const f = r.filter((v) => v.type === l.name), d = {
863
868
  name: l.name,
864
869
  options: l.options,
865
870
  storage: l.storage,
@@ -870,7 +875,7 @@ function Jn(e, t) {
870
875
  ...v,
871
876
  ...k ? k(l) : {}
872
877
  };
873
- }, {}), f = Rt({
878
+ }, {}), u = zt({
874
879
  ...p,
875
880
  content: x(y(l, "content", d)),
876
881
  marks: x(y(l, "marks", d)),
@@ -886,22 +891,22 @@ function Jn(e, t) {
886
891
  ),
887
892
  defining: x(y(l, "defining", d)),
888
893
  isolating: x(y(l, "isolating", d)),
889
- attrs: Object.fromEntries(u.map(zt))
890
- }), h = x(y(l, "parseHTML", d));
891
- h && (f.parseDOM = h.map(
892
- (v) => Nt(v, u)
894
+ attrs: Object.fromEntries(f.map(It))
895
+ }), m = x(y(l, "parseHTML", d));
896
+ m && (u.parseDOM = m.map(
897
+ (v) => Rt(v, f)
893
898
  ));
894
- const m = y(l, "renderHTML", d);
895
- m && (f.toDOM = (v) => m({
899
+ const h = y(l, "renderHTML", d);
900
+ h && (u.toDOM = (v) => h({
896
901
  node: v,
897
- HTMLAttributes: et(v, u)
902
+ HTMLAttributes: rt(v, f)
898
903
  }));
899
904
  const g = y(l, "renderText", d);
900
- return g && (f.toText = g), [l.name, f];
905
+ return g && (u.toText = g), [l.name, u];
901
906
  })
902
907
  ), c = Object.fromEntries(
903
908
  o.map((l) => {
904
- const u = r.filter((g) => g.type === l.name), d = {
909
+ const f = r.filter((g) => g.type === l.name), d = {
905
910
  name: l.name,
906
911
  options: l.options,
907
912
  storage: l.storage,
@@ -912,23 +917,23 @@ function Jn(e, t) {
912
917
  ...g,
913
918
  ...b ? b(l) : {}
914
919
  };
915
- }, {}), f = Rt({
920
+ }, {}), u = zt({
916
921
  ...p,
917
922
  inclusive: x(y(l, "inclusive", d)),
918
923
  excludes: x(y(l, "excludes", d)),
919
924
  group: x(y(l, "group", d)),
920
925
  spanning: x(y(l, "spanning", d)),
921
926
  code: x(y(l, "code", d)),
922
- attrs: Object.fromEntries(u.map(zt))
923
- }), h = x(y(l, "parseHTML", d));
924
- h && (f.parseDOM = h.map(
925
- (g) => Nt(g, u)
927
+ attrs: Object.fromEntries(f.map(It))
928
+ }), m = x(y(l, "parseHTML", d));
929
+ m && (u.parseDOM = m.map(
930
+ (g) => Rt(g, f)
926
931
  ));
927
- const m = y(l, "renderHTML", d);
928
- return m && (f.toDOM = (g) => m({
932
+ const h = y(l, "renderHTML", d);
933
+ return h && (u.toDOM = (g) => h({
929
934
  mark: g,
930
- HTMLAttributes: et(g, u)
931
- })), [l.name, f];
935
+ HTMLAttributes: rt(g, f)
936
+ })), [l.name, u];
932
937
  })
933
938
  );
934
939
  return new Bt({
@@ -941,14 +946,14 @@ function Xn(e) {
941
946
  const t = e.filter((n, r) => e.indexOf(n) !== r);
942
947
  return Array.from(new Set(t));
943
948
  }
944
- function V(e) {
949
+ function K(e) {
945
950
  return e.sort((n, r) => {
946
951
  const s = y(n, "priority") || 100, o = y(r, "priority") || 100;
947
952
  return s > o ? -1 : s < o ? 1 : 0;
948
953
  });
949
954
  }
950
955
  function Jt(e) {
951
- const t = V(wt(e)), n = Xn(t.map((r) => r.name));
956
+ const t = K(kt(e)), n = Xn(t.map((r) => r.name));
952
957
  return n.length && console.warn(
953
958
  `[tiptap warn]: Duplicate extension names found: [${n.map((r) => `'${r}'`).join(", ")}]. This can lead to issues.`
954
959
  ), t;
@@ -958,15 +963,15 @@ function Xt(e, t, n) {
958
963
 
959
964
  `, textSerializers: i = {} } = n || {};
960
965
  let a = "";
961
- return e.nodesBetween(r, s, (c, l, u, d) => {
966
+ return e.nodesBetween(r, s, (c, l, f, d) => {
962
967
  var p;
963
968
  c.isBlock && l > r && (a += o);
964
- const f = i?.[c.type.name];
965
- if (f)
966
- return u && (a += f({
969
+ const u = i?.[c.type.name];
970
+ if (u)
971
+ return f && (a += u({
967
972
  node: c,
968
973
  pos: l,
969
- parent: u,
974
+ parent: f,
970
975
  index: d,
971
976
  range: t
972
977
  })), !1;
@@ -994,7 +999,7 @@ function Qn(e, t) {
994
999
  return i ? { ...i.attrs } : {};
995
1000
  }
996
1001
  function Zn(e, t) {
997
- const n = ot(
1002
+ const n = at(
998
1003
  typeof t == "string" ? t : t.name,
999
1004
  e.schema
1000
1005
  );
@@ -1026,7 +1031,7 @@ function er(e) {
1026
1031
  i.push({ from: a, to: c });
1027
1032
  }
1028
1033
  i.forEach(({ from: a, to: c }) => {
1029
- const l = t.slice(o).map(a, -1), u = t.slice(o).map(c), d = t.invert().map(l, -1), p = t.invert().map(u);
1034
+ const l = t.slice(o).map(a, -1), f = t.slice(o).map(c), d = t.invert().map(l, -1), p = t.invert().map(f);
1030
1035
  r.push({
1031
1036
  oldRange: {
1032
1037
  from: d,
@@ -1034,7 +1039,7 @@ function er(e) {
1034
1039
  },
1035
1040
  newRange: {
1036
1041
  from: l,
1037
- to: u
1042
+ to: f
1038
1043
  }
1039
1044
  });
1040
1045
  });
@@ -1043,7 +1048,7 @@ function er(e) {
1043
1048
  function Qt(e, t, n) {
1044
1049
  const r = [];
1045
1050
  return e === t ? n.resolve(e).marks().forEach((s) => {
1046
- const o = n.resolve(e), i = bt(o, s.type);
1051
+ const o = n.resolve(e), i = wt(o, s.type);
1047
1052
  i && r.push({
1048
1053
  mark: s,
1049
1054
  ...i
@@ -1058,7 +1063,7 @@ function Qt(e, t, n) {
1058
1063
  );
1059
1064
  }), r;
1060
1065
  }
1061
- var is = (e, t, n, r = 20) => {
1066
+ var as = (e, t, n, r = 20) => {
1062
1067
  const s = e.doc.resolve(n);
1063
1068
  let o = r, i = null;
1064
1069
  for (; o > 0 && i === null; ) {
@@ -1067,10 +1072,10 @@ var is = (e, t, n, r = 20) => {
1067
1072
  }
1068
1073
  return [i, o];
1069
1074
  };
1070
- function H(e, t) {
1075
+ function W(e, t) {
1071
1076
  return t.nodes[e] || t.marks[e] || null;
1072
1077
  }
1073
- function Z(e, t, n) {
1078
+ function tt(e, t, n) {
1074
1079
  return Object.fromEntries(
1075
1080
  Object.entries(n).filter(([r]) => {
1076
1081
  const s = e.find((o) => o.type === t && o.name === r);
@@ -1083,31 +1088,31 @@ var nr = (e, t = 500) => {
1083
1088
  const r = e.parentOffset;
1084
1089
  return e.parent.nodesBetween(Math.max(0, r - t), r, (s, o, i, a) => {
1085
1090
  var c, l;
1086
- const u = ((l = (c = s.type.spec).toText) == null ? void 0 : l.call(c, {
1091
+ const f = ((l = (c = s.type.spec).toText) == null ? void 0 : l.call(c, {
1087
1092
  node: s,
1088
1093
  pos: o,
1089
1094
  parent: i,
1090
1095
  index: a
1091
1096
  })) || s.textContent || "%leaf%";
1092
- n += s.isAtom && !s.isText ? u : u.slice(0, Math.max(0, r - o));
1097
+ n += s.isAtom && !s.isText ? f : f.slice(0, Math.max(0, r - o));
1093
1098
  }), n;
1094
1099
  };
1095
- function mt(e, t, n = {}) {
1096
- const { empty: r, ranges: s } = e.selection, o = t ? z(t, e.schema) : null;
1100
+ function gt(e, t, n = {}) {
1101
+ const { empty: r, ranges: s } = e.selection, o = t ? O(t, e.schema) : null;
1097
1102
  if (r)
1098
- return !!(e.storedMarks || e.selection.$from.marks()).filter((d) => o ? o.name === d.type.name : !0).find((d) => G(d.attrs, n, { strict: !1 }));
1103
+ return !!(e.storedMarks || e.selection.$from.marks()).filter((d) => o ? o.name === d.type.name : !0).find((d) => et(d.attrs, n, { strict: !1 }));
1099
1104
  let i = 0;
1100
1105
  const a = [];
1101
1106
  if (s.forEach(({ $from: d, $to: p }) => {
1102
- const f = d.pos, h = p.pos;
1103
- e.doc.nodesBetween(f, h, (m, g) => {
1104
- if (o && m.inlineContent && !m.type.allowsMarkType(o))
1107
+ const u = d.pos, m = p.pos;
1108
+ e.doc.nodesBetween(u, m, (h, g) => {
1109
+ if (o && h.inlineContent && !h.type.allowsMarkType(o))
1105
1110
  return !1;
1106
- if (!m.isText && !m.marks.length)
1111
+ if (!h.isText && !h.marks.length)
1107
1112
  return;
1108
- const v = Math.max(f, g), b = Math.min(h, g + m.nodeSize), k = b - v;
1113
+ const v = Math.max(u, g), b = Math.min(m, g + h.nodeSize), k = b - v;
1109
1114
  i += k, a.push(
1110
- ...m.marks.map((M) => ({
1115
+ ...h.marks.map((M) => ({
1111
1116
  mark: M,
1112
1117
  from: v,
1113
1118
  to: b
@@ -1116,34 +1121,34 @@ function mt(e, t, n = {}) {
1116
1121
  });
1117
1122
  }), i === 0)
1118
1123
  return !1;
1119
- const c = a.filter((d) => o ? o.name === d.mark.type.name : !0).filter((d) => G(d.mark.attrs, n, { strict: !1 })).reduce((d, p) => d + p.to - p.from, 0), l = a.filter((d) => o ? d.mark.type !== o && d.mark.type.excludes(o) : !0).reduce((d, p) => d + p.to - p.from, 0);
1124
+ const c = a.filter((d) => o ? o.name === d.mark.type.name : !0).filter((d) => et(d.mark.attrs, n, { strict: !1 })).reduce((d, p) => d + p.to - p.from, 0), l = a.filter((d) => o ? d.mark.type !== o && d.mark.type.excludes(o) : !0).reduce((d, p) => d + p.to - p.from, 0);
1120
1125
  return (c > 0 ? c + l : c) >= i;
1121
1126
  }
1122
1127
  function rr(e, t, n = {}) {
1123
1128
  if (!t)
1124
- return U(e, null, n) || mt(e, null, n);
1125
- const r = ot(t, e.schema);
1126
- return r === "node" ? U(e, t, n) : r === "mark" ? mt(e, t, n) : !1;
1129
+ return J(e, null, n) || gt(e, null, n);
1130
+ const r = at(t, e.schema);
1131
+ return r === "node" ? J(e, t, n) : r === "mark" ? gt(e, t, n) : !1;
1127
1132
  }
1128
- var as = (e, t) => {
1133
+ var cs = (e, t) => {
1129
1134
  const { $from: n, $to: r, $anchor: s } = e.selection;
1130
1135
  if (t) {
1131
- const o = it((a) => a.type.name === t)(e.selection);
1136
+ const o = ct((a) => a.type.name === t)(e.selection);
1132
1137
  if (!o)
1133
1138
  return !1;
1134
1139
  const i = e.doc.resolve(o.pos + 1);
1135
1140
  return s.pos + 1 === i.end();
1136
1141
  }
1137
1142
  return !(r.parentOffset < r.parent.nodeSize - 2 || n.pos !== r.pos);
1138
- }, cs = (e) => {
1143
+ }, ls = (e) => {
1139
1144
  const { $from: t, $to: n } = e.selection;
1140
1145
  return !(t.parentOffset > 0 || t.pos !== n.pos);
1141
1146
  };
1142
- function It(e, t) {
1147
+ function Dt(e, t) {
1143
1148
  return Array.isArray(t) ? t.some((n) => (typeof n == "string" ? n : n.name) === e.name) : t;
1144
1149
  }
1145
- function Dt(e, t) {
1146
- const { nodeExtensions: n } = L(t), r = n.find((i) => i.name === e);
1150
+ function ft(e, t) {
1151
+ const { nodeExtensions: n } = F(t), r = n.find((i) => i.name === e);
1147
1152
  if (!r)
1148
1153
  return !1;
1149
1154
  const s = {
@@ -1153,7 +1158,7 @@ function Dt(e, t) {
1153
1158
  }, o = x(y(r, "group", s));
1154
1159
  return typeof o != "string" ? !1 : o.split(" ").includes("list");
1155
1160
  }
1156
- function Mt(e, {
1161
+ function xt(e, {
1157
1162
  checkChildren: t = !0,
1158
1163
  ignoreWhitespace: n = !1
1159
1164
  } = {}) {
@@ -1173,13 +1178,13 @@ function Mt(e, {
1173
1178
  if (t) {
1174
1179
  let s = !0;
1175
1180
  return e.content.forEach((o) => {
1176
- s !== !1 && (Mt(o, { ignoreWhitespace: n, checkChildren: t }) || (s = !1));
1181
+ s !== !1 && (xt(o, { ignoreWhitespace: n, checkChildren: t }) || (s = !1));
1177
1182
  }), s;
1178
1183
  }
1179
1184
  return !1;
1180
1185
  }
1181
- function ls(e) {
1182
- return e instanceof nt;
1186
+ function ds(e) {
1187
+ return e instanceof st;
1183
1188
  }
1184
1189
  var Zt = class Gt {
1185
1190
  constructor(t) {
@@ -1221,19 +1226,19 @@ function ir(e, t, n) {
1221
1226
  const { ranges: i } = s;
1222
1227
  return i.some(({ $from: a, $to: c }) => {
1223
1228
  let l = a.depth === 0 ? e.doc.inlineContent && e.doc.type.allowsMarkType(n) : !1;
1224
- return e.doc.nodesBetween(a.pos, c.pos, (u, d, p) => {
1229
+ return e.doc.nodesBetween(a.pos, c.pos, (f, d, p) => {
1225
1230
  if (l)
1226
1231
  return !1;
1227
- if (u.isInline) {
1228
- const f = !p || p.type.allowsMarkType(n), h = !!n.isInSet(u.marks) || !u.marks.some((m) => m.type.excludes(n));
1229
- l = f && h;
1232
+ if (f.isInline) {
1233
+ const u = !p || p.type.allowsMarkType(n), m = !!n.isInSet(f.marks) || !f.marks.some((h) => h.type.excludes(n));
1234
+ l = u && m;
1230
1235
  }
1231
1236
  return !l;
1232
1237
  }), l;
1233
1238
  });
1234
1239
  }
1235
1240
  var ar = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
1236
- const { selection: o } = n, { empty: i, ranges: a } = o, c = z(e, r.schema);
1241
+ const { selection: o } = n, { empty: i, ranges: a } = o, c = O(e, r.schema);
1237
1242
  if (s)
1238
1243
  if (i) {
1239
1244
  const l = Ut(r, c);
@@ -1245,29 +1250,29 @@ var ar = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
1245
1250
  );
1246
1251
  } else
1247
1252
  a.forEach((l) => {
1248
- const u = l.$from.pos, d = l.$to.pos;
1249
- r.doc.nodesBetween(u, d, (p, f) => {
1250
- const h = Math.max(f, u), m = Math.min(f + p.nodeSize, d);
1253
+ const f = l.$from.pos, d = l.$to.pos;
1254
+ r.doc.nodesBetween(f, d, (p, u) => {
1255
+ const m = Math.max(u, f), h = Math.min(u + p.nodeSize, d);
1251
1256
  p.marks.find((v) => v.type === c) ? p.marks.forEach((v) => {
1252
1257
  c === v.type && n.addMark(
1253
- h,
1254
1258
  m,
1259
+ h,
1255
1260
  c.create({
1256
1261
  ...v.attrs,
1257
1262
  ...t
1258
1263
  })
1259
1264
  );
1260
- }) : n.addMark(h, m, c.create(t));
1265
+ }) : n.addMark(m, h, c.create(t));
1261
1266
  });
1262
1267
  });
1263
1268
  return ir(r, n, c);
1264
1269
  }, cr = (e, t) => ({ tr: n }) => (n.setMeta(e, t), !0), lr = (e, t = {}) => ({ state: n, dispatch: r, chain: s }) => {
1265
1270
  const o = T(e, n.schema);
1266
1271
  let i;
1267
- return n.selection.$anchor.sameParent(n.selection.$head) && (i = n.selection.$anchor.parent.attrs), o.isTextblock ? s().command(({ commands: a }) => Tt(o, { ...i, ...t })(n) ? !0 : a.clearNodes()).command(({ state: a }) => Tt(o, { ...i, ...t })(a, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
1272
+ return n.selection.$anchor.sameParent(n.selection.$head) && (i = n.selection.$anchor.parent.attrs), o.isTextblock ? s().command(({ commands: a }) => At(o, { ...i, ...t })(n) ? !0 : a.clearNodes()).command(({ state: a }) => At(o, { ...i, ...t })(a, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
1268
1273
  }, dr = (e) => ({ tr: t, dispatch: n }) => {
1269
1274
  if (n) {
1270
- const { doc: r } = t, s = B(e, 0, r.content.size), o = nt.create(r, s);
1275
+ const { doc: r } = t, s = L(e, 0, r.content.size), o = st.create(r, s);
1271
1276
  t.setSelection(o);
1272
1277
  }
1273
1278
  return !0;
@@ -1282,15 +1287,15 @@ var ar = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
1282
1287
  }), !0;
1283
1288
  }, fr = (e) => ({ tr: t, dispatch: n }) => {
1284
1289
  if (n) {
1285
- const { doc: r } = t, { from: s, to: o } = typeof e == "number" ? { from: e, to: e } : e, i = P.atStart(r).from, a = P.atEnd(r).to, c = B(s, i, a), l = B(o, i, a), u = P.create(r, c, l);
1286
- t.setSelection(u);
1290
+ const { doc: r } = t, { from: s, to: o } = typeof e == "number" ? { from: e, to: e } : e, i = z.atStart(r).from, a = z.atEnd(r).to, c = L(s, i, a), l = L(o, i, a), f = z.create(r, c, l);
1291
+ t.setSelection(f);
1287
1292
  }
1288
1293
  return !0;
1289
1294
  }, pr = (e) => ({ state: t, dispatch: n }) => {
1290
1295
  const r = T(e, t.schema);
1291
1296
  return Ue(r)(t, n);
1292
1297
  };
1293
- function _t(e, t) {
1298
+ function Ot(e, t) {
1294
1299
  const n = e.storedMarks || e.selection.$to.parentOffset && e.selection.$from.marks();
1295
1300
  if (n) {
1296
1301
  const r = n.filter((s) => t?.includes(s.type.name));
@@ -1298,35 +1303,35 @@ function _t(e, t) {
1298
1303
  }
1299
1304
  }
1300
1305
  var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor: s }) => {
1301
- const { selection: o, doc: i } = t, { $from: a, $to: c } = o, l = s.extensionManager.attributes, u = Z(l, a.node().type.name, a.node().attrs);
1302
- if (o instanceof nt && o.node.isBlock)
1303
- return !a.parentOffset || !Q(i, a.pos) ? !1 : (r && (e && _t(n, s.extensionManager.splittableMarks), t.split(a.pos).scrollIntoView()), !0);
1306
+ const { selection: o, doc: i } = t, { $from: a, $to: c } = o, l = s.extensionManager.attributes, f = tt(l, a.node().type.name, a.node().attrs);
1307
+ if (o instanceof st && o.node.isBlock)
1308
+ return !a.parentOffset || !G(i, a.pos) ? !1 : (r && (e && Ot(n, s.extensionManager.splittableMarks), t.split(a.pos).scrollIntoView()), !0);
1304
1309
  if (!a.parent.isBlock)
1305
1310
  return !1;
1306
1311
  const d = c.parentOffset === c.parent.content.size, p = a.depth === 0 ? void 0 : Fn(a.node(-1).contentMatchAt(a.indexAfter(-1)));
1307
- let f = d && p ? [
1312
+ let u = d && p ? [
1308
1313
  {
1309
1314
  type: p,
1310
- attrs: u
1315
+ attrs: f
1311
1316
  }
1312
- ] : void 0, h = Q(t.doc, t.mapping.map(a.pos), 1, f);
1313
- if (!f && !h && Q(t.doc, t.mapping.map(a.pos), 1, p ? [{ type: p }] : void 0) && (h = !0, f = p ? [
1317
+ ] : void 0, m = G(t.doc, t.mapping.map(a.pos), 1, u);
1318
+ if (!u && !m && G(t.doc, t.mapping.map(a.pos), 1, p ? [{ type: p }] : void 0) && (m = !0, u = p ? [
1314
1319
  {
1315
1320
  type: p,
1316
- attrs: u
1321
+ attrs: f
1317
1322
  }
1318
1323
  ] : void 0), r) {
1319
- if (h && (o instanceof P && t.deleteSelection(), t.split(t.mapping.map(a.pos), 1, f), p && !d && !a.parentOffset && a.parent.type !== p)) {
1320
- const m = t.mapping.map(a.before()), g = t.doc.resolve(m);
1324
+ if (m && (o instanceof z && t.deleteSelection(), t.split(t.mapping.map(a.pos), 1, u), p && !d && !a.parentOffset && a.parent.type !== p)) {
1325
+ const h = t.mapping.map(a.before()), g = t.doc.resolve(h);
1321
1326
  a.node(-1).canReplaceWith(g.index(), g.index() + 1, p) && t.setNodeMarkup(t.mapping.map(a.before()), p);
1322
1327
  }
1323
- e && _t(n, s.extensionManager.splittableMarks), t.scrollIntoView();
1328
+ e && Ot(n, s.extensionManager.splittableMarks), t.scrollIntoView();
1324
1329
  }
1325
- return h;
1330
+ return m;
1326
1331
  }, mr = (e, t = {}) => ({ tr: n, state: r, dispatch: s, editor: o }) => {
1327
1332
  var i;
1328
- const a = T(e, r.schema), { $from: c, $to: l } = r.selection, u = r.selection.node;
1329
- if (u && u.isBlock || c.depth < 2 || !c.sameParent(l))
1333
+ const a = T(e, r.schema), { $from: c, $to: l } = r.selection, f = r.selection.node;
1334
+ if (f && f.isBlock || c.depth < 2 || !c.sameParent(l))
1330
1335
  return !1;
1331
1336
  const d = c.node(-1);
1332
1337
  if (d.type !== a)
@@ -1336,18 +1341,18 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1336
1341
  if (c.depth === 2 || c.node(-3).type !== a || c.index(-2) !== c.node(-2).childCount - 1)
1337
1342
  return !1;
1338
1343
  if (s) {
1339
- let v = D.empty;
1344
+ let v = _.empty;
1340
1345
  const b = c.index(-1) ? 1 : c.index(-2) ? 2 : 3;
1341
1346
  for (let A = c.depth - b; A >= c.depth - 3; A -= 1)
1342
- v = D.from(c.node(A).copy(v));
1347
+ v = _.from(c.node(A).copy(v));
1343
1348
  const k = (
1344
1349
  // eslint-disable-next-line no-nested-ternary
1345
1350
  c.indexAfter(-1) < c.node(-2).childCount ? 1 : c.indexAfter(-2) < c.node(-3).childCount ? 2 : 3
1346
1351
  ), M = {
1347
- ...Z(p, c.node().type.name, c.node().attrs),
1352
+ ...tt(p, c.node().type.name, c.node().attrs),
1348
1353
  ...t
1349
1354
  }, w = ((i = a.contentMatch.defaultType) == null ? void 0 : i.createAndFill(M)) || void 0;
1350
- v = v.append(D.from(a.createAndFill(null, w) || void 0));
1355
+ v = v.append(_.from(a.createAndFill(null, w) || void 0));
1351
1356
  const S = c.before(c.depth - (b - 1));
1352
1357
  n.replace(S, c.after(-k), new Ve(v, 4 - b, 0));
1353
1358
  let E = -1;
@@ -1355,23 +1360,23 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1355
1360
  if (E > -1)
1356
1361
  return !1;
1357
1362
  A.isTextblock && A.content.size === 0 && (E = C + 1);
1358
- }), E > -1 && n.setSelection(P.near(n.doc.resolve(E))), n.scrollIntoView();
1363
+ }), E > -1 && n.setSelection(z.near(n.doc.resolve(E))), n.scrollIntoView();
1359
1364
  }
1360
1365
  return !0;
1361
1366
  }
1362
- const f = l.pos === c.end() ? d.contentMatchAt(0).defaultType : null, h = {
1363
- ...Z(p, d.type.name, d.attrs),
1367
+ const u = l.pos === c.end() ? d.contentMatchAt(0).defaultType : null, m = {
1368
+ ...tt(p, d.type.name, d.attrs),
1364
1369
  ...t
1365
- }, m = {
1366
- ...Z(p, c.node().type.name, c.node().attrs),
1370
+ }, h = {
1371
+ ...tt(p, c.node().type.name, c.node().attrs),
1367
1372
  ...t
1368
1373
  };
1369
1374
  n.delete(c.pos, l.pos);
1370
- const g = f ? [
1371
- { type: a, attrs: h },
1372
- { type: f, attrs: m }
1373
- ] : [{ type: a, attrs: h }];
1374
- if (!Q(n.doc, c.pos, 2))
1375
+ const g = u ? [
1376
+ { type: a, attrs: m },
1377
+ { type: u, attrs: h }
1378
+ ] : [{ type: a, attrs: m }];
1379
+ if (!G(n.doc, c.pos, 2))
1375
1380
  return !1;
1376
1381
  if (s) {
1377
1382
  const { selection: v, storedMarks: b } = r, { splittableMarks: k } = o.extensionManager, M = b || v.$to.parentOffset && v.$from.marks();
@@ -1381,50 +1386,64 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1381
1386
  n.ensureMarks(w);
1382
1387
  }
1383
1388
  return !0;
1384
- }, ft = (e, t) => {
1385
- const n = it((i) => i.type === t)(e.selection);
1389
+ }, pt = (e, t) => {
1390
+ const n = ct((i) => i.type === t)(e.selection);
1386
1391
  if (!n)
1387
1392
  return !0;
1388
1393
  const r = e.doc.resolve(Math.max(0, n.pos - 1)).before(n.depth);
1389
1394
  if (r === void 0)
1390
1395
  return !0;
1391
1396
  const s = e.doc.nodeAt(r);
1392
- return n.node.type === s?.type && gt(e.doc, n.pos) && e.join(n.pos), !0;
1393
- }, pt = (e, t) => {
1394
- const n = it((i) => i.type === t)(e.selection);
1397
+ return n.node.type === s?.type && vt(e.doc, n.pos) && e.join(n.pos), !0;
1398
+ }, ht = (e, t) => {
1399
+ const n = ct((i) => i.type === t)(e.selection);
1395
1400
  if (!n)
1396
1401
  return !0;
1397
1402
  const r = e.doc.resolve(n.start).after(n.depth);
1398
1403
  if (r === void 0)
1399
1404
  return !0;
1400
1405
  const s = e.doc.nodeAt(r);
1401
- return n.node.type === s?.type && gt(e.doc, r) && e.join(r), !0;
1402
- }, gr = (e, t, n, r = {}) => ({ editor: s, tr: o, state: i, dispatch: a, chain: c, commands: l, can: u }) => {
1403
- const { extensions: d, splittableMarks: p } = s.extensionManager, f = T(e, i.schema), h = T(t, i.schema), { selection: m, storedMarks: g } = i, { $from: v, $to: b } = m, k = v.blockRange(b), M = g || m.$to.parentOffset && m.$from.marks();
1406
+ return n.node.type === s?.type && vt(e.doc, r) && e.join(r), !0;
1407
+ };
1408
+ function gr(e) {
1409
+ const t = e.doc, n = t.firstChild;
1410
+ if (!n)
1411
+ return null;
1412
+ const r = t.resolve(1), s = t.resolve(n.nodeSize - 1);
1413
+ return z.between(r, s);
1414
+ }
1415
+ var vr = (e, t, n, r = {}) => ({ editor: s, tr: o, state: i, dispatch: a, chain: c, commands: l, can: f }) => {
1416
+ const { extensions: d, splittableMarks: p } = s.extensionManager, u = T(e, i.schema), m = T(t, i.schema), { selection: h, storedMarks: g } = i, { $from: v, $to: b } = h, k = v.blockRange(b), M = g || h.$to.parentOffset && h.$from.marks();
1404
1417
  if (!k)
1405
1418
  return !1;
1406
- const w = it((S) => Dt(S.type.name, d))(m);
1407
- if (k.depth >= 1 && w && k.depth - w.depth <= 1) {
1408
- if (w.node.type === f)
1409
- return l.liftListItem(h);
1410
- if (Dt(w.node.type.name, d) && f.validContent(w.node.content) && a)
1411
- return c().command(() => (o.setNodeMarkup(w.pos, f), !0)).command(() => ft(o, f)).command(() => pt(o, f)).run();
1412
- }
1413
- return !n || !M || !a ? c().command(() => u().wrapInList(f, r) ? !0 : l.clearNodes()).wrapInList(f, r).command(() => ft(o, f)).command(() => pt(o, f)).run() : c().command(() => {
1414
- const S = u().wrapInList(f, r), E = M.filter((A) => p.includes(A.type.name));
1415
- return o.ensureMarks(E), S ? !0 : l.clearNodes();
1416
- }).wrapInList(f, r).command(() => ft(o, f)).command(() => pt(o, f)).run();
1417
- }, vr = (e, t = {}, n = {}) => ({ state: r, commands: s }) => {
1418
- const { extendEmptyMarkRange: o = !1 } = n, i = z(e, r.schema);
1419
- return mt(r, i, t) ? s.unsetMark(i, { extendEmptyMarkRange: o }) : s.setMark(i, t);
1420
- }, yr = (e, t, n = {}) => ({ state: r, commands: s }) => {
1421
- const o = T(e, r.schema), i = T(t, r.schema), a = U(r, o, n);
1419
+ const w = ct((R) => ft(R.type.name, d))(h), S = h.from === 0 && h.to === i.doc.content.size, E = i.doc.content.content, A = E.length === 1 ? E[0] : null, C = S && A && ft(A.type.name, d) ? {
1420
+ node: A,
1421
+ pos: 0
1422
+ } : null, $ = w ?? C, V = !!w && k.depth >= 1 && k.depth - w.depth <= 1, j = !!C;
1423
+ if ((V || j) && $) {
1424
+ if ($.node.type === u)
1425
+ return S && j ? c().command(({ tr: R, dispatch: N }) => {
1426
+ const P = gr(R);
1427
+ return P ? (R.setSelection(P), N && N(R), !0) : !1;
1428
+ }).liftListItem(m).run() : l.liftListItem(m);
1429
+ if (ft($.node.type.name, d) && u.validContent($.node.content))
1430
+ return c().command(() => (o.setNodeMarkup($.pos, u), !0)).command(() => pt(o, u)).command(() => ht(o, u)).run();
1431
+ }
1432
+ return !n || !M || !a ? c().command(() => f().wrapInList(u, r) ? !0 : l.clearNodes()).wrapInList(u, r).command(() => pt(o, u)).command(() => ht(o, u)).run() : c().command(() => {
1433
+ const R = f().wrapInList(u, r), N = M.filter((P) => p.includes(P.type.name));
1434
+ return o.ensureMarks(N), R ? !0 : l.clearNodes();
1435
+ }).wrapInList(u, r).command(() => pt(o, u)).command(() => ht(o, u)).run();
1436
+ }, yr = (e, t = {}, n = {}) => ({ state: r, commands: s }) => {
1437
+ const { extendEmptyMarkRange: o = !1 } = n, i = O(e, r.schema);
1438
+ return gt(r, i, t) ? s.unsetMark(i, { extendEmptyMarkRange: o }) : s.setMark(i, t);
1439
+ }, br = (e, t, n = {}) => ({ state: r, commands: s }) => {
1440
+ const o = T(e, r.schema), i = T(t, r.schema), a = J(r, o, n);
1422
1441
  let c;
1423
1442
  return r.selection.$anchor.sameParent(r.selection.$head) && (c = r.selection.$anchor.parent.attrs), a ? s.setNode(i, c) : s.setNode(o, { ...c, ...n });
1424
- }, br = (e, t = {}) => ({ state: n, commands: r }) => {
1443
+ }, wr = (e, t = {}) => ({ state: n, commands: r }) => {
1425
1444
  const s = T(e, n.schema);
1426
- return U(n, s, t) ? r.lift(s) : r.wrapIn(s, t);
1427
- }, wr = () => ({ state: e, dispatch: t }) => {
1445
+ return J(n, s, t) ? r.lift(s) : r.wrapIn(s, t);
1446
+ }, kr = () => ({ state: e, dispatch: t }) => {
1428
1447
  const n = e.plugins;
1429
1448
  for (let r = 0; r < n.length; r += 1) {
1430
1449
  const s = n[r];
@@ -1444,26 +1463,26 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1444
1463
  }
1445
1464
  }
1446
1465
  return !1;
1447
- }, kr = () => ({ tr: e, dispatch: t }) => {
1466
+ }, Mr = () => ({ tr: e, dispatch: t }) => {
1448
1467
  const { selection: n } = e, { empty: r, ranges: s } = n;
1449
1468
  return r || t && s.forEach((o) => {
1450
1469
  e.removeMark(o.$from.pos, o.$to.pos);
1451
1470
  }), !0;
1452
- }, Mr = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
1471
+ }, xr = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
1453
1472
  var o;
1454
- const { extendEmptyMarkRange: i = !1 } = t, { selection: a } = n, c = z(e, r.schema), { $from: l, empty: u, ranges: d } = a;
1473
+ const { extendEmptyMarkRange: i = !1 } = t, { selection: a } = n, c = O(e, r.schema), { $from: l, empty: f, ranges: d } = a;
1455
1474
  if (!s)
1456
1475
  return !0;
1457
- if (u && i) {
1458
- let { from: p, to: f } = a;
1459
- const h = (o = l.marks().find((g) => g.type === c)) == null ? void 0 : o.attrs, m = bt(l, c, h);
1460
- m && (p = m.from, f = m.to), n.removeMark(p, f, c);
1476
+ if (f && i) {
1477
+ let { from: p, to: u } = a;
1478
+ const m = (o = l.marks().find((g) => g.type === c)) == null ? void 0 : o.attrs, h = wt(l, c, m);
1479
+ h && (p = h.from, u = h.to), n.removeMark(p, u, c);
1461
1480
  } else
1462
1481
  d.forEach((p) => {
1463
1482
  n.removeMark(p.$from.pos, p.$to.pos, c);
1464
1483
  });
1465
1484
  return n.removeStoredMark(c), !0;
1466
- }, xr = (e) => ({ tr: t, state: n, dispatch: r }) => {
1485
+ }, Sr = (e) => ({ tr: t, state: n, dispatch: r }) => {
1467
1486
  const { selection: s } = n;
1468
1487
  let o, i;
1469
1488
  return typeof e == "number" ? (o = e, i = e) : e && "from" in e && "to" in e ? (o = e.from, i = e.to) : (o = s.from, i = s.to), r && t.doc.nodesBetween(o, i, (a, c) => {
@@ -1472,28 +1491,28 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1472
1491
  const l = { ...a.attrs };
1473
1492
  delete l.dir, t.setNodeMarkup(c, void 0, l);
1474
1493
  }), !0;
1475
- }, Sr = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
1494
+ }, Er = (e, t = {}) => ({ tr: n, state: r, dispatch: s }) => {
1476
1495
  let o = null, i = null;
1477
- const a = ot(
1496
+ const a = at(
1478
1497
  typeof e == "string" ? e : e.name,
1479
1498
  r.schema
1480
1499
  );
1481
1500
  if (!a)
1482
1501
  return !1;
1483
- a === "node" && (o = T(e, r.schema)), a === "mark" && (i = z(e, r.schema));
1502
+ a === "node" && (o = T(e, r.schema)), a === "mark" && (i = O(e, r.schema));
1484
1503
  let c = !1;
1485
1504
  return n.selection.ranges.forEach((l) => {
1486
- const u = l.$from.pos, d = l.$to.pos;
1487
- let p, f, h, m;
1488
- n.selection.empty ? r.doc.nodesBetween(u, d, (g, v) => {
1489
- o && o === g.type && (c = !0, h = Math.max(v, u), m = Math.min(v + g.nodeSize, d), p = v, f = g);
1490
- }) : r.doc.nodesBetween(u, d, (g, v) => {
1491
- v < u && o && o === g.type && (c = !0, h = Math.max(v, u), m = Math.min(v + g.nodeSize, d), p = v, f = g), v >= u && v <= d && (o && o === g.type && (c = !0, s && n.setNodeMarkup(v, void 0, {
1505
+ const f = l.$from.pos, d = l.$to.pos;
1506
+ let p, u, m, h;
1507
+ n.selection.empty ? r.doc.nodesBetween(f, d, (g, v) => {
1508
+ o && o === g.type && (c = !0, m = Math.max(v, f), h = Math.min(v + g.nodeSize, d), p = v, u = g);
1509
+ }) : r.doc.nodesBetween(f, d, (g, v) => {
1510
+ v < f && o && o === g.type && (c = !0, m = Math.max(v, f), h = Math.min(v + g.nodeSize, d), p = v, u = g), v >= f && v <= d && (o && o === g.type && (c = !0, s && n.setNodeMarkup(v, void 0, {
1492
1511
  ...g.attrs,
1493
1512
  ...t
1494
1513
  })), i && g.marks.length && g.marks.forEach((b) => {
1495
1514
  if (i === b.type && (c = !0, s)) {
1496
- const k = Math.max(v, u), M = Math.min(v + g.nodeSize, d);
1515
+ const k = Math.max(v, f), M = Math.min(v + g.nodeSize, d);
1497
1516
  n.addMark(
1498
1517
  k,
1499
1518
  M,
@@ -1504,13 +1523,13 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1504
1523
  );
1505
1524
  }
1506
1525
  }));
1507
- }), f && (p !== void 0 && s && n.setNodeMarkup(p, void 0, {
1508
- ...f.attrs,
1526
+ }), u && (p !== void 0 && s && n.setNodeMarkup(p, void 0, {
1527
+ ...u.attrs,
1509
1528
  ...t
1510
- }), i && f.marks.length && f.marks.forEach((g) => {
1529
+ }), i && u.marks.length && u.marks.forEach((g) => {
1511
1530
  i === g.type && s && n.addMark(
1512
- h,
1513
1531
  m,
1532
+ h,
1514
1533
  i.create({
1515
1534
  ...g.attrs,
1516
1535
  ...t
@@ -1518,13 +1537,13 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1518
1537
  );
1519
1538
  }));
1520
1539
  }), c;
1521
- }, Er = (e, t = {}) => ({ state: n, dispatch: r }) => {
1540
+ }, Tr = (e, t = {}) => ({ state: n, dispatch: r }) => {
1522
1541
  const s = T(e, n.schema);
1523
1542
  return Be(s, t)(n, r);
1524
- }, Tr = (e, t = {}) => ({ state: n, dispatch: r }) => {
1543
+ }, Ar = (e, t = {}) => ({ state: n, dispatch: r }) => {
1525
1544
  const s = T(e, n.schema);
1526
1545
  return Ke(s, t)(n, r);
1527
- }, Ar = class {
1546
+ }, Cr = class {
1528
1547
  constructor() {
1529
1548
  this.callbacks = {};
1530
1549
  }
@@ -1548,13 +1567,13 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1548
1567
  removeAllListeners() {
1549
1568
  this.callbacks = {};
1550
1569
  }
1551
- }, at = class {
1570
+ }, lt = class {
1552
1571
  constructor(e) {
1553
1572
  var t;
1554
1573
  this.find = e.find, this.handler = e.handler, this.undoable = (t = e.undoable) != null ? t : !0;
1555
1574
  }
1556
- }, Cr = (e, t) => {
1557
- if (yt(t))
1575
+ }, Pr = (e, t) => {
1576
+ if (bt(t))
1558
1577
  return t.exec(e);
1559
1578
  const n = t(e);
1560
1579
  if (!n)
@@ -1562,7 +1581,7 @@ var hr = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, editor
1562
1581
  const r = [n.text];
1563
1582
  return r.index = n.index, r.input = e, r.data = n.data, n.replaceWith && (n.text.includes(n.replaceWith) || console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'), r.push(n.replaceWith)), r;
1564
1583
  };
1565
- function J(e) {
1584
+ function Y(e) {
1566
1585
  var t;
1567
1586
  const { editor: n, from: r, to: s, text: o, rules: i, plugin: a } = e, { view: c } = n;
1568
1587
  if (c.composing)
@@ -1573,41 +1592,41 @@ function J(e) {
1573
1592
  l.parent.type.spec.code || (t = l.nodeBefore || l.nodeAfter) != null && t.marks.find((p) => p.type.spec.code)
1574
1593
  )
1575
1594
  return !1;
1576
- let u = !1;
1595
+ let f = !1;
1577
1596
  const d = nr(l) + o;
1578
1597
  return i.forEach((p) => {
1579
- if (u)
1598
+ if (f)
1580
1599
  return;
1581
- const f = Cr(d, p.find);
1582
- if (!f)
1600
+ const u = Pr(d, p.find);
1601
+ if (!u)
1583
1602
  return;
1584
- const h = c.state.tr, m = rt({
1603
+ const m = c.state.tr, h = ot({
1585
1604
  state: c.state,
1586
- transaction: h
1605
+ transaction: m
1587
1606
  }), g = {
1588
- from: r - (f[0].length - o.length),
1607
+ from: r - (u[0].length - o.length),
1589
1608
  to: s
1590
- }, { commands: v, chain: b, can: k } = new st({
1609
+ }, { commands: v, chain: b, can: k } = new it({
1591
1610
  editor: n,
1592
- state: m
1611
+ state: h
1593
1612
  });
1594
1613
  p.handler({
1595
- state: m,
1614
+ state: h,
1596
1615
  range: g,
1597
- match: f,
1616
+ match: u,
1598
1617
  commands: v,
1599
1618
  chain: b,
1600
1619
  can: k
1601
- }) === null || !h.steps.length || (p.undoable && h.setMeta(a, {
1602
- transform: h,
1620
+ }) === null || !m.steps.length || (p.undoable && m.setMeta(a, {
1621
+ transform: m,
1603
1622
  from: r,
1604
1623
  to: s,
1605
1624
  text: o
1606
- }), c.dispatch(h), u = !0);
1607
- }), u;
1625
+ }), c.dispatch(m), f = !0);
1626
+ }), f;
1608
1627
  }
1609
- function Pr(e) {
1610
- const { editor: t, rules: n } = e, r = new $({
1628
+ function $r(e) {
1629
+ const { editor: t, rules: n } = e, r = new I({
1611
1630
  state: {
1612
1631
  init() {
1613
1632
  return null;
@@ -1618,14 +1637,14 @@ function Pr(e) {
1618
1637
  return a;
1619
1638
  const c = s.getMeta("applyInputRules");
1620
1639
  return !!c && setTimeout(() => {
1621
- let { text: u } = c;
1622
- typeof u == "string" ? u = u : u = kt(D.from(u), i.schema);
1623
- const { from: d } = c, p = d + u.length;
1624
- J({
1640
+ let { text: f } = c;
1641
+ typeof f == "string" ? f = f : f = Mt(_.from(f), i.schema);
1642
+ const { from: d } = c, p = d + f.length;
1643
+ Y({
1625
1644
  editor: t,
1626
1645
  from: d,
1627
1646
  to: p,
1628
- text: u,
1647
+ text: f,
1629
1648
  rules: n,
1630
1649
  plugin: r
1631
1650
  });
@@ -1634,7 +1653,7 @@ function Pr(e) {
1634
1653
  },
1635
1654
  props: {
1636
1655
  handleTextInput(s, o, i, a) {
1637
- return J({
1656
+ return Y({
1638
1657
  editor: t,
1639
1658
  from: o,
1640
1659
  to: i,
@@ -1646,7 +1665,7 @@ function Pr(e) {
1646
1665
  handleDOMEvents: {
1647
1666
  compositionend: (s) => (setTimeout(() => {
1648
1667
  const { $cursor: o } = s.state.selection;
1649
- o && J({
1668
+ o && Y({
1650
1669
  editor: t,
1651
1670
  from: o.pos,
1652
1671
  to: o.pos,
@@ -1662,7 +1681,7 @@ function Pr(e) {
1662
1681
  if (o.key !== "Enter")
1663
1682
  return !1;
1664
1683
  const { $cursor: i } = s.state.selection;
1665
- return i ? J({
1684
+ return i ? Y({
1666
1685
  editor: t,
1667
1686
  from: i.pos,
1668
1687
  to: i.pos,
@@ -1678,19 +1697,19 @@ function Pr(e) {
1678
1697
  });
1679
1698
  return r;
1680
1699
  }
1681
- function $r(e) {
1700
+ function Nr(e) {
1682
1701
  return Object.prototype.toString.call(e).slice(8, -1);
1683
1702
  }
1684
- function X(e) {
1685
- return $r(e) !== "Object" ? !1 : e.constructor === Object && Object.getPrototypeOf(e) === Object.prototype;
1703
+ function Q(e) {
1704
+ return Nr(e) !== "Object" ? !1 : e.constructor === Object && Object.getPrototypeOf(e) === Object.prototype;
1686
1705
  }
1687
1706
  function te(e, t) {
1688
1707
  const n = { ...e };
1689
- return X(e) && X(t) && Object.keys(t).forEach((r) => {
1690
- X(t[r]) && X(e[r]) ? n[r] = te(e[r], t[r]) : n[r] = t[r];
1708
+ return Q(e) && Q(t) && Object.keys(t).forEach((r) => {
1709
+ Q(t[r]) && Q(e[r]) ? n[r] = te(e[r], t[r]) : n[r] = t[r];
1691
1710
  }), n;
1692
1711
  }
1693
- var xt = class {
1712
+ var St = class {
1694
1713
  constructor(e = {}) {
1695
1714
  this.type = "extendable", this.parent = null, this.child = null, this.name = "", this.config = {
1696
1715
  name: this.name
@@ -1729,7 +1748,7 @@ var xt = class {
1729
1748
  const t = new this.constructor({ ...this.config, ...e });
1730
1749
  return t.parent = this, this.child = t, t.name = "name" in e ? e.name : t.parent.name, t;
1731
1750
  }
1732
- }, Nr = class ee extends xt {
1751
+ }, Rr = class ee extends St {
1733
1752
  constructor() {
1734
1753
  super(...arguments), this.type = "mark";
1735
1754
  }
@@ -1760,15 +1779,15 @@ var xt = class {
1760
1779
  return super.extend(n);
1761
1780
  }
1762
1781
  };
1763
- function Rr(e) {
1782
+ function zr(e) {
1764
1783
  return typeof e == "number";
1765
1784
  }
1766
- var zr = class {
1785
+ var Ir = class {
1767
1786
  constructor(e) {
1768
1787
  this.find = e.find, this.handler = e.handler;
1769
1788
  }
1770
- }, Ir = (e, t, n) => {
1771
- if (yt(t))
1789
+ }, Dr = (e, t, n) => {
1790
+ if (bt(t))
1772
1791
  return [...e.matchAll(t)];
1773
1792
  const r = t(e, n);
1774
1793
  return r ? r.map((s) => {
@@ -1776,47 +1795,47 @@ var zr = class {
1776
1795
  return o.index = s.index, o.input = e, o.data = s.data, s.replaceWith && (s.text.includes(s.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), o.push(s.replaceWith)), o;
1777
1796
  }) : [];
1778
1797
  };
1779
- function Dr(e) {
1780
- const { editor: t, state: n, from: r, to: s, rule: o, pasteEvent: i, dropEvent: a } = e, { commands: c, chain: l, can: u } = new st({
1798
+ function Or(e) {
1799
+ const { editor: t, state: n, from: r, to: s, rule: o, pasteEvent: i, dropEvent: a } = e, { commands: c, chain: l, can: f } = new it({
1781
1800
  editor: t,
1782
1801
  state: n
1783
1802
  }), d = [];
1784
- return n.doc.nodesBetween(r, s, (f, h) => {
1785
- var m, g, v, b, k;
1786
- if ((g = (m = f.type) == null ? void 0 : m.spec) != null && g.code || !(f.isText || f.isTextblock || f.isInline))
1803
+ return n.doc.nodesBetween(r, s, (u, m) => {
1804
+ var h, g, v, b, k;
1805
+ if ((g = (h = u.type) == null ? void 0 : h.spec) != null && g.code || !(u.isText || u.isTextblock || u.isInline))
1787
1806
  return;
1788
- const M = (k = (b = (v = f.content) == null ? void 0 : v.size) != null ? b : f.nodeSize) != null ? k : 0, w = Math.max(r, h), S = Math.min(s, h + M);
1807
+ const M = (k = (b = (v = u.content) == null ? void 0 : v.size) != null ? b : u.nodeSize) != null ? k : 0, w = Math.max(r, m), S = Math.min(s, m + M);
1789
1808
  if (w >= S)
1790
1809
  return;
1791
- const E = f.isText ? f.text || "" : f.textBetween(w - h, S - h, void 0, "");
1792
- Ir(E, o.find, i).forEach((C) => {
1810
+ const E = u.isText ? u.text || "" : u.textBetween(w - m, S - m, void 0, "");
1811
+ Dr(E, o.find, i).forEach((C) => {
1793
1812
  if (C.index === void 0)
1794
1813
  return;
1795
- const O = w + C.index + 1, lt = O + C[0].length, K = {
1796
- from: n.tr.mapping.map(O),
1797
- to: n.tr.mapping.map(lt)
1798
- }, dt = o.handler({
1814
+ const $ = w + C.index + 1, V = $ + C[0].length, j = {
1815
+ from: n.tr.mapping.map($),
1816
+ to: n.tr.mapping.map(V)
1817
+ }, R = o.handler({
1799
1818
  state: n,
1800
- range: K,
1819
+ range: j,
1801
1820
  match: C,
1802
1821
  commands: c,
1803
1822
  chain: l,
1804
- can: u,
1823
+ can: f,
1805
1824
  pasteEvent: i,
1806
1825
  dropEvent: a
1807
1826
  });
1808
- d.push(dt);
1827
+ d.push(R);
1809
1828
  });
1810
- }), d.every((f) => f !== null);
1829
+ }), d.every((u) => u !== null);
1811
1830
  }
1812
- var Y = null, _r = (e) => {
1831
+ var Z = null, _r = (e) => {
1813
1832
  var t;
1814
1833
  const n = new ClipboardEvent("paste", {
1815
1834
  clipboardData: new DataTransfer()
1816
1835
  });
1817
1836
  return (t = n.clipboardData) == null || t.setData("text/html", e), n;
1818
1837
  };
1819
- function Or(e) {
1838
+ function Br(e) {
1820
1839
  const { editor: t, rules: n } = e;
1821
1840
  let r = null, s = !1, o = !1, i = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, a;
1822
1841
  try {
@@ -1825,45 +1844,45 @@ function Or(e) {
1825
1844
  a = null;
1826
1845
  }
1827
1846
  const c = ({
1828
- state: u,
1847
+ state: f,
1829
1848
  from: d,
1830
1849
  to: p,
1831
- rule: f,
1832
- pasteEvt: h
1850
+ rule: u,
1851
+ pasteEvt: m
1833
1852
  }) => {
1834
- const m = u.tr, g = rt({
1835
- state: u,
1836
- transaction: m
1853
+ const h = f.tr, g = ot({
1854
+ state: f,
1855
+ transaction: h
1837
1856
  });
1838
- if (!(!Dr({
1857
+ if (!(!Or({
1839
1858
  editor: t,
1840
1859
  state: g,
1841
1860
  from: Math.max(d - 1, 0),
1842
1861
  to: p.b - 1,
1843
- rule: f,
1844
- pasteEvent: h,
1862
+ rule: u,
1863
+ pasteEvent: m,
1845
1864
  dropEvent: a
1846
- }) || !m.steps.length)) {
1865
+ }) || !h.steps.length)) {
1847
1866
  try {
1848
1867
  a = typeof DragEvent < "u" ? new DragEvent("drop") : null;
1849
1868
  } catch {
1850
1869
  a = null;
1851
1870
  }
1852
- return i = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, m;
1871
+ return i = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, h;
1853
1872
  }
1854
1873
  };
1855
- return n.map((u) => new $({
1874
+ return n.map((f) => new I({
1856
1875
  // we register a global drag handler to track the current drag source element
1857
1876
  view(d) {
1858
- const p = (h) => {
1859
- var m;
1860
- r = (m = d.dom.parentElement) != null && m.contains(h.target) ? d.dom.parentElement : null, r && (Y = t);
1861
- }, f = () => {
1862
- Y && (Y = null);
1877
+ const p = (m) => {
1878
+ var h;
1879
+ r = (h = d.dom.parentElement) != null && h.contains(m.target) ? d.dom.parentElement : null, r && (Z = t);
1880
+ }, u = () => {
1881
+ Z && (Z = null);
1863
1882
  };
1864
- return window.addEventListener("dragstart", p), window.addEventListener("dragend", f), {
1883
+ return window.addEventListener("dragstart", p), window.addEventListener("dragend", u), {
1865
1884
  destroy() {
1866
- window.removeEventListener("dragstart", p), window.removeEventListener("dragend", f);
1885
+ window.removeEventListener("dragstart", p), window.removeEventListener("dragend", u);
1867
1886
  }
1868
1887
  };
1869
1888
  },
@@ -1871,42 +1890,42 @@ function Or(e) {
1871
1890
  handleDOMEvents: {
1872
1891
  drop: (d, p) => {
1873
1892
  if (o = r === d.dom.parentElement, a = p, !o) {
1874
- const f = Y;
1875
- f?.isEditable && setTimeout(() => {
1876
- const h = f.state.selection;
1877
- h && f.commands.deleteRange({ from: h.from, to: h.to });
1893
+ const u = Z;
1894
+ u?.isEditable && setTimeout(() => {
1895
+ const m = u.state.selection;
1896
+ m && u.commands.deleteRange({ from: m.from, to: m.to });
1878
1897
  }, 10);
1879
1898
  }
1880
1899
  return !1;
1881
1900
  },
1882
1901
  paste: (d, p) => {
1883
- var f;
1884
- const h = (f = p.clipboardData) == null ? void 0 : f.getData("text/html");
1885
- return i = p, s = !!h?.includes("data-pm-slice"), !1;
1902
+ var u;
1903
+ const m = (u = p.clipboardData) == null ? void 0 : u.getData("text/html");
1904
+ return i = p, s = !!m?.includes("data-pm-slice"), !1;
1886
1905
  }
1887
1906
  }
1888
1907
  },
1889
- appendTransaction: (d, p, f) => {
1890
- const h = d[0], m = h.getMeta("uiEvent") === "paste" && !s, g = h.getMeta("uiEvent") === "drop" && !o, v = h.getMeta("applyPasteRules"), b = !!v;
1891
- if (!m && !g && !b)
1908
+ appendTransaction: (d, p, u) => {
1909
+ const m = d[0], h = m.getMeta("uiEvent") === "paste" && !s, g = m.getMeta("uiEvent") === "drop" && !o, v = m.getMeta("applyPasteRules"), b = !!v;
1910
+ if (!h && !g && !b)
1892
1911
  return;
1893
1912
  if (b) {
1894
1913
  let { text: w } = v;
1895
- typeof w == "string" ? w = w : w = kt(D.from(w), f.schema);
1914
+ typeof w == "string" ? w = w : w = Mt(_.from(w), u.schema);
1896
1915
  const { from: S } = v, E = S + w.length, A = _r(w);
1897
1916
  return c({
1898
- rule: u,
1899
- state: f,
1917
+ rule: f,
1918
+ state: u,
1900
1919
  from: S,
1901
1920
  to: { b: E },
1902
1921
  pasteEvt: A
1903
1922
  });
1904
1923
  }
1905
- const k = p.doc.content.findDiffStart(f.doc.content), M = p.doc.content.findDiffEnd(f.doc.content);
1906
- if (!(!Rr(k) || !M || k === M.b))
1924
+ const k = p.doc.content.findDiffStart(u.doc.content), M = p.doc.content.findDiffEnd(u.doc.content);
1925
+ if (!(!zr(k) || !M || k === M.b))
1907
1926
  return c({
1908
- rule: u,
1909
- state: f,
1927
+ rule: f,
1928
+ state: u,
1910
1929
  from: k,
1911
1930
  to: M,
1912
1931
  pasteEvt: i
@@ -1914,7 +1933,7 @@ function Or(e) {
1914
1933
  }
1915
1934
  }));
1916
1935
  }
1917
- var ct = class {
1936
+ var dt = class {
1918
1937
  constructor(e, t) {
1919
1938
  this.splittableMarks = [], this.editor = t, this.baseExtensions = e, this.extensions = Jt(e), this.schema = Jn(this.extensions, t), this.setupExtensions();
1920
1939
  }
@@ -1929,7 +1948,7 @@ var ct = class {
1929
1948
  options: t.options,
1930
1949
  storage: this.editor.extensionStorage[t.name],
1931
1950
  editor: this.editor,
1932
- type: H(t.name, this.schema)
1951
+ type: W(t.name, this.schema)
1933
1952
  }, r = y(t, "addCommands", n);
1934
1953
  return r ? {
1935
1954
  ...e,
@@ -1943,44 +1962,44 @@ var ct = class {
1943
1962
  */
1944
1963
  get plugins() {
1945
1964
  const { editor: e } = this;
1946
- return V([...this.extensions].reverse()).flatMap((r) => {
1965
+ return K([...this.extensions].reverse()).flatMap((r) => {
1947
1966
  const s = {
1948
1967
  name: r.name,
1949
1968
  options: r.options,
1950
1969
  storage: this.editor.extensionStorage[r.name],
1951
1970
  editor: e,
1952
- type: H(r.name, this.schema)
1971
+ type: W(r.name, this.schema)
1953
1972
  }, o = [], i = y(
1954
1973
  r,
1955
1974
  "addKeyboardShortcuts",
1956
1975
  s
1957
1976
  );
1958
1977
  let a = {};
1959
- if (r.type === "mark" && y(r, "exitable", s) && (a.ArrowRight = () => Nr.handleExit({ editor: e, mark: r })), i) {
1978
+ if (r.type === "mark" && y(r, "exitable", s) && (a.ArrowRight = () => Rr.handleExit({ editor: e, mark: r })), i) {
1960
1979
  const p = Object.fromEntries(
1961
- Object.entries(i()).map(([f, h]) => [f, () => h({ editor: e })])
1980
+ Object.entries(i()).map(([u, m]) => [u, () => m({ editor: e })])
1962
1981
  );
1963
1982
  a = { ...a, ...p };
1964
1983
  }
1965
1984
  const c = Je(a);
1966
1985
  o.push(c);
1967
1986
  const l = y(r, "addInputRules", s);
1968
- if (It(r, e.options.enableInputRules) && l) {
1987
+ if (Dt(r, e.options.enableInputRules) && l) {
1969
1988
  const p = l();
1970
1989
  if (p && p.length) {
1971
- const f = Pr({
1990
+ const u = $r({
1972
1991
  editor: e,
1973
1992
  rules: p
1974
- }), h = Array.isArray(f) ? f : [f];
1975
- o.push(...h);
1993
+ }), m = Array.isArray(u) ? u : [u];
1994
+ o.push(...m);
1976
1995
  }
1977
1996
  }
1978
- const u = y(r, "addPasteRules", s);
1979
- if (It(r, e.options.enablePasteRules) && u) {
1980
- const p = u();
1997
+ const f = y(r, "addPasteRules", s);
1998
+ if (Dt(r, e.options.enablePasteRules) && f) {
1999
+ const p = f();
1981
2000
  if (p && p.length) {
1982
- const f = Or({ editor: e, rules: p });
1983
- o.push(...f);
2001
+ const u = Br({ editor: e, rules: p });
2002
+ o.push(...u);
1984
2003
  }
1985
2004
  }
1986
2005
  const d = y(
@@ -2007,7 +2026,7 @@ var ct = class {
2007
2026
  * @returns An object with all node views where the key is the node name and the value is the node view function
2008
2027
  */
2009
2028
  get nodeViews() {
2010
- const { editor: e } = this, { nodeExtensions: t } = L(this.extensions);
2029
+ const { editor: e } = this, { nodeExtensions: t } = F(this.extensions);
2011
2030
  return Object.fromEntries(
2012
2031
  t.filter((n) => !!y(n, "addNodeView")).map((n) => {
2013
2032
  const r = this.attributes.filter((c) => c.type === n.name), s = {
@@ -2022,19 +2041,19 @@ var ct = class {
2022
2041
  const i = o();
2023
2042
  if (!i)
2024
2043
  return [];
2025
- const a = (c, l, u, d, p) => {
2026
- const f = et(c, r);
2044
+ const a = (c, l, f, d, p) => {
2045
+ const u = rt(c, r);
2027
2046
  return i({
2028
2047
  // pass-through
2029
2048
  node: c,
2030
2049
  view: l,
2031
- getPos: u,
2050
+ getPos: f,
2032
2051
  decorations: d,
2033
2052
  innerDecorations: p,
2034
2053
  // tiptap-specific
2035
2054
  editor: e,
2036
2055
  extension: n,
2037
- HTMLAttributes: f
2056
+ HTMLAttributes: u
2038
2057
  });
2039
2058
  };
2040
2059
  return [n.name, a];
@@ -2048,13 +2067,13 @@ var ct = class {
2048
2067
  */
2049
2068
  dispatchTransaction(e) {
2050
2069
  const { editor: t } = this;
2051
- return V([...this.extensions].reverse()).reduceRight((r, s) => {
2070
+ return K([...this.extensions].reverse()).reduceRight((r, s) => {
2052
2071
  const o = {
2053
2072
  name: s.name,
2054
2073
  options: s.options,
2055
2074
  storage: this.editor.extensionStorage[s.name],
2056
2075
  editor: t,
2057
- type: H(s.name, this.schema)
2076
+ type: W(s.name, this.schema)
2058
2077
  }, i = y(
2059
2078
  s,
2060
2079
  "dispatchTransaction",
@@ -2072,14 +2091,14 @@ var ct = class {
2072
2091
  */
2073
2092
  transformPastedHTML(e) {
2074
2093
  const { editor: t } = this;
2075
- return V([...this.extensions]).reduce(
2094
+ return K([...this.extensions]).reduce(
2076
2095
  (r, s) => {
2077
2096
  const o = {
2078
2097
  name: s.name,
2079
2098
  options: s.options,
2080
2099
  storage: this.editor.extensionStorage[s.name],
2081
2100
  editor: t,
2082
- type: H(s.name, this.schema)
2101
+ type: W(s.name, this.schema)
2083
2102
  }, i = y(
2084
2103
  s,
2085
2104
  "transformPastedHTML",
@@ -2094,7 +2113,7 @@ var ct = class {
2094
2113
  );
2095
2114
  }
2096
2115
  get markViews() {
2097
- const { editor: e } = this, { markExtensions: t } = L(this.extensions);
2116
+ const { editor: e } = this, { markExtensions: t } = F(this.extensions);
2098
2117
  return Object.fromEntries(
2099
2118
  t.filter((n) => !!y(n, "addMarkView")).map((n) => {
2100
2119
  const r = this.attributes.filter((a) => a.type === n.name), s = {
@@ -2102,12 +2121,12 @@ var ct = class {
2102
2121
  options: n.options,
2103
2122
  storage: this.editor.extensionStorage[n.name],
2104
2123
  editor: e,
2105
- type: z(n.name, this.schema)
2124
+ type: O(n.name, this.schema)
2106
2125
  }, o = y(n, "addMarkView", s);
2107
2126
  if (!o)
2108
2127
  return [];
2109
2128
  const i = (a, c, l) => {
2110
- const u = et(a, r);
2129
+ const f = rt(a, r);
2111
2130
  return o()({
2112
2131
  // pass-through
2113
2132
  mark: a,
@@ -2116,9 +2135,9 @@ var ct = class {
2116
2135
  // tiptap-specific
2117
2136
  editor: e,
2118
2137
  extension: n,
2119
- HTMLAttributes: u,
2138
+ HTMLAttributes: f,
2120
2139
  updateAttributes: (d) => {
2121
- Qr(a, e, d);
2140
+ Zr(a, e, d);
2122
2141
  }
2123
2142
  });
2124
2143
  };
@@ -2141,23 +2160,23 @@ var ct = class {
2141
2160
  options: t.options,
2142
2161
  storage: this.editor.extensionStorage[t.name],
2143
2162
  editor: this.editor,
2144
- type: H(t.name, this.schema)
2163
+ type: W(t.name, this.schema)
2145
2164
  };
2146
2165
  t.type === "mark" && ((n = x(y(t, "keepOnSplit", r))) == null || n) && this.splittableMarks.push(t.name);
2147
2166
  const s = y(t, "onBeforeCreate", r), o = y(t, "onCreate", r), i = y(t, "onUpdate", r), a = y(
2148
2167
  t,
2149
2168
  "onSelectionUpdate",
2150
2169
  r
2151
- ), c = y(t, "onTransaction", r), l = y(t, "onFocus", r), u = y(t, "onBlur", r), d = y(t, "onDestroy", r);
2152
- s && this.editor.on("beforeCreate", s), o && this.editor.on("create", o), i && this.editor.on("update", i), a && this.editor.on("selectionUpdate", a), c && this.editor.on("transaction", c), l && this.editor.on("focus", l), u && this.editor.on("blur", u), d && this.editor.on("destroy", d);
2170
+ ), c = y(t, "onTransaction", r), l = y(t, "onFocus", r), f = y(t, "onBlur", r), d = y(t, "onDestroy", r);
2171
+ s && this.editor.on("beforeCreate", s), o && this.editor.on("create", o), i && this.editor.on("update", i), a && this.editor.on("selectionUpdate", a), c && this.editor.on("transaction", c), l && this.editor.on("focus", l), f && this.editor.on("blur", f), d && this.editor.on("destroy", d);
2153
2172
  });
2154
2173
  }
2155
2174
  };
2156
- ct.resolve = Jt;
2157
- ct.sort = V;
2158
- ct.flatten = wt;
2159
- var Br = {};
2160
- vt(Br, {
2175
+ dt.resolve = Jt;
2176
+ dt.sort = K;
2177
+ dt.flatten = kt;
2178
+ var jr = {};
2179
+ yt(jr, {
2161
2180
  ClipboardTextSerializer: () => re,
2162
2181
  Commands: () => se,
2163
2182
  Delete: () => oe,
@@ -2170,7 +2189,7 @@ vt(Br, {
2170
2189
  TextDirection: () => pe,
2171
2190
  focusEventsPluginKey: () => ce
2172
2191
  });
2173
- var N = class ne extends xt {
2192
+ var D = class ne extends St {
2174
2193
  constructor() {
2175
2194
  super(...arguments), this.type = "extension";
2176
2195
  }
@@ -2189,7 +2208,7 @@ var N = class ne extends xt {
2189
2208
  const n = typeof t == "function" ? t() : t;
2190
2209
  return super.extend(n);
2191
2210
  }
2192
- }, re = N.create({
2211
+ }, re = D.create({
2193
2212
  name: "clipboardTextSerializer",
2194
2213
  addOptions() {
2195
2214
  return {
@@ -2198,11 +2217,11 @@ var N = class ne extends xt {
2198
2217
  },
2199
2218
  addProseMirrorPlugins() {
2200
2219
  return [
2201
- new $({
2202
- key: new _("clipboardTextSerializer"),
2220
+ new I({
2221
+ key: new B("clipboardTextSerializer"),
2203
2222
  props: {
2204
2223
  clipboardTextSerializer: () => {
2205
- const { editor: e } = this, { state: t, schema: n } = e, { doc: r, selection: s } = t, { ranges: o } = s, i = Math.min(...o.map((u) => u.$from.pos)), a = Math.max(...o.map((u) => u.$to.pos)), c = Yt(n);
2224
+ const { editor: e } = this, { state: t, schema: n } = e, { doc: r, selection: s } = t, { ranges: o } = s, i = Math.min(...o.map((f) => f.$from.pos)), a = Math.max(...o.map((f) => f.$to.pos)), c = Yt(n);
2206
2225
  return Xt(r, { from: i, to: a }, {
2207
2226
  ...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
2208
2227
  textSerializers: c
@@ -2212,14 +2231,14 @@ var N = class ne extends xt {
2212
2231
  })
2213
2232
  ];
2214
2233
  }
2215
- }), se = N.create({
2234
+ }), se = D.create({
2216
2235
  name: "commands",
2217
2236
  addCommands() {
2218
2237
  return {
2219
2238
  ...jt
2220
2239
  };
2221
2240
  }
2222
- }), oe = N.create({
2241
+ }), oe = D.create({
2223
2242
  name: "delete",
2224
2243
  onUpdate({ transaction: e, appendedTransactions: t }) {
2225
2244
  var n, r, s;
@@ -2227,36 +2246,36 @@ var N = class ne extends xt {
2227
2246
  var i, a, c, l;
2228
2247
  if ((l = (c = (a = (i = this.editor.options.coreExtensionOptions) == null ? void 0 : i.delete) == null ? void 0 : a.filterTransaction) == null ? void 0 : c.call(a, e)) != null ? l : e.getMeta("y-sync$"))
2229
2248
  return;
2230
- const u = Hn(e.before, [e, ...t]);
2231
- er(u).forEach((f) => {
2232
- u.mapping.mapResult(f.oldRange.from).deletedAfter && u.mapping.mapResult(f.oldRange.to).deletedBefore && u.before.nodesBetween(f.oldRange.from, f.oldRange.to, (h, m) => {
2233
- const g = m + h.nodeSize - 2, v = f.oldRange.from <= m && g <= f.oldRange.to;
2249
+ const f = Hn(e.before, [e, ...t]);
2250
+ er(f).forEach((u) => {
2251
+ f.mapping.mapResult(u.oldRange.from).deletedAfter && f.mapping.mapResult(u.oldRange.to).deletedBefore && f.before.nodesBetween(u.oldRange.from, u.oldRange.to, (m, h) => {
2252
+ const g = h + m.nodeSize - 2, v = u.oldRange.from <= h && g <= u.oldRange.to;
2234
2253
  this.editor.emit("delete", {
2235
2254
  type: "node",
2236
- node: h,
2237
- from: m,
2255
+ node: m,
2256
+ from: h,
2238
2257
  to: g,
2239
- newFrom: u.mapping.map(m),
2240
- newTo: u.mapping.map(g),
2241
- deletedRange: f.oldRange,
2242
- newRange: f.newRange,
2258
+ newFrom: f.mapping.map(h),
2259
+ newTo: f.mapping.map(g),
2260
+ deletedRange: u.oldRange,
2261
+ newRange: u.newRange,
2243
2262
  partial: !v,
2244
2263
  editor: this.editor,
2245
2264
  transaction: e,
2246
- combinedTransform: u
2265
+ combinedTransform: f
2247
2266
  });
2248
2267
  });
2249
2268
  });
2250
- const p = u.mapping;
2251
- u.steps.forEach((f, h) => {
2252
- var m, g;
2253
- if (f instanceof ve) {
2254
- const v = p.slice(h).map(f.from, -1), b = p.slice(h).map(f.to), k = p.invert().map(v, -1), M = p.invert().map(b), w = (m = u.doc.nodeAt(v - 1)) == null ? void 0 : m.marks.some((E) => E.eq(f.mark)), S = (g = u.doc.nodeAt(b)) == null ? void 0 : g.marks.some((E) => E.eq(f.mark));
2269
+ const p = f.mapping;
2270
+ f.steps.forEach((u, m) => {
2271
+ var h, g;
2272
+ if (u instanceof ve) {
2273
+ const v = p.slice(m).map(u.from, -1), b = p.slice(m).map(u.to), k = p.invert().map(v, -1), M = p.invert().map(b), w = v > 0 ? (h = f.doc.nodeAt(v - 1)) == null ? void 0 : h.marks.some((E) => E.eq(u.mark)) : !1, S = (g = f.doc.nodeAt(b)) == null ? void 0 : g.marks.some((E) => E.eq(u.mark));
2255
2274
  this.editor.emit("delete", {
2256
2275
  type: "mark",
2257
- mark: f.mark,
2258
- from: f.from,
2259
- to: f.to,
2276
+ mark: u.mark,
2277
+ from: u.from,
2278
+ to: u.to,
2260
2279
  deletedRange: {
2261
2280
  from: k,
2262
2281
  to: M
@@ -2268,19 +2287,19 @@ var N = class ne extends xt {
2268
2287
  partial: !!(S || w),
2269
2288
  editor: this.editor,
2270
2289
  transaction: e,
2271
- combinedTransform: u
2290
+ combinedTransform: f
2272
2291
  });
2273
2292
  }
2274
2293
  });
2275
2294
  };
2276
2295
  (s = (r = (n = this.editor.options.coreExtensionOptions) == null ? void 0 : n.delete) == null ? void 0 : r.async) == null || s ? setTimeout(o, 0) : o();
2277
2296
  }
2278
- }), ie = N.create({
2297
+ }), ie = D.create({
2279
2298
  name: "drop",
2280
2299
  addProseMirrorPlugins() {
2281
2300
  return [
2282
- new $({
2283
- key: new _("tiptapDrop"),
2301
+ new I({
2302
+ key: new B("tiptapDrop"),
2284
2303
  props: {
2285
2304
  handleDrop: (e, t, n, r) => {
2286
2305
  this.editor.emit("drop", {
@@ -2294,24 +2313,24 @@ var N = class ne extends xt {
2294
2313
  })
2295
2314
  ];
2296
2315
  }
2297
- }), ae = N.create({
2316
+ }), ae = D.create({
2298
2317
  name: "editable",
2299
2318
  addProseMirrorPlugins() {
2300
2319
  return [
2301
- new $({
2302
- key: new _("editable"),
2320
+ new I({
2321
+ key: new B("editable"),
2303
2322
  props: {
2304
2323
  editable: () => this.editor.options.editable
2305
2324
  }
2306
2325
  })
2307
2326
  ];
2308
2327
  }
2309
- }), ce = new _("focusEvents"), le = N.create({
2328
+ }), ce = new B("focusEvents"), le = D.create({
2310
2329
  name: "focusEvents",
2311
2330
  addProseMirrorPlugins() {
2312
2331
  const { editor: e } = this;
2313
2332
  return [
2314
- new $({
2333
+ new I({
2315
2334
  key: ce,
2316
2335
  props: {
2317
2336
  handleDOMEvents: {
@@ -2330,15 +2349,15 @@ var N = class ne extends xt {
2330
2349
  })
2331
2350
  ];
2332
2351
  }
2333
- }), de = N.create({
2352
+ }), de = D.create({
2334
2353
  name: "keymap",
2335
2354
  addKeyboardShortcuts() {
2336
2355
  const e = () => this.editor.commands.first(({ commands: i }) => [
2337
2356
  () => i.undoInputRule(),
2338
2357
  // maybe convert first text block node to default node
2339
2358
  () => i.command(({ tr: a }) => {
2340
- const { selection: c, doc: l } = a, { empty: u, $anchor: d } = c, { pos: p, parent: f } = d, h = d.parent.isTextblock && p > 0 ? a.doc.resolve(p - 1) : d, m = h.parent.type.spec.isolating, g = d.pos - d.parentOffset, v = m && h.parent.childCount === 1 ? g === d.pos : j.atStart(l).from === p;
2341
- return !u || !f.type.isTextblock || f.textContent.length || !v || v && d.parent.type.name === "paragraph" ? !1 : i.clearNodes();
2359
+ const { selection: c, doc: l } = a, { empty: f, $anchor: d } = c, { pos: p, parent: u } = d, m = d.parent.isTextblock && p > 0 ? a.doc.resolve(p - 1) : d, h = m.parent.type.spec.isolating, g = d.pos - d.parentOffset, v = h && m.parent.childCount === 1 ? g === d.pos : H.atStart(l).from === p;
2360
+ return !f || !u.type.isTextblock || u.textContent.length || !v || v && d.parent.type.name === "paragraph" ? !1 : i.clearNodes();
2342
2361
  }),
2343
2362
  () => i.deleteSelection(),
2344
2363
  () => i.joinBackward(),
@@ -2375,7 +2394,7 @@ var N = class ne extends xt {
2375
2394
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
2376
2395
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
2377
2396
  };
2378
- return tt() || Wt() ? o : s;
2397
+ return nt() || Wt() ? o : s;
2379
2398
  },
2380
2399
  addProseMirrorPlugins() {
2381
2400
  return [
@@ -2384,36 +2403,36 @@ var N = class ne extends xt {
2384
2403
  // to a paragraph if necessary.
2385
2404
  // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
2386
2405
  // with many other commands.
2387
- new $({
2388
- key: new _("clearDocument"),
2406
+ new I({
2407
+ key: new B("clearDocument"),
2389
2408
  appendTransaction: (e, t, n) => {
2390
- if (e.some((m) => m.getMeta("composition")))
2409
+ if (e.some((h) => h.getMeta("composition")))
2391
2410
  return;
2392
- const r = e.some((m) => m.docChanged) && !t.doc.eq(n.doc), s = e.some((m) => m.getMeta("preventClearDocument"));
2411
+ const r = e.some((h) => h.docChanged) && !t.doc.eq(n.doc), s = e.some((h) => h.getMeta("preventClearDocument"));
2393
2412
  if (!r || s)
2394
2413
  return;
2395
- const { empty: o, from: i, to: a } = t.selection, c = j.atStart(t.doc).from, l = j.atEnd(t.doc).to;
2396
- if (o || !(i === c && a === l) || !Mt(n.doc))
2414
+ const { empty: o, from: i, to: a } = t.selection, c = H.atStart(t.doc).from, l = H.atEnd(t.doc).to;
2415
+ if (o || !(i === c && a === l) || !xt(n.doc))
2397
2416
  return;
2398
- const p = n.tr, f = rt({
2417
+ const p = n.tr, u = ot({
2399
2418
  state: n,
2400
2419
  transaction: p
2401
- }), { commands: h } = new st({
2420
+ }), { commands: m } = new it({
2402
2421
  editor: this.editor,
2403
- state: f
2422
+ state: u
2404
2423
  });
2405
- if (h.clearNodes(), !!p.steps.length)
2424
+ if (m.clearNodes(), !!p.steps.length)
2406
2425
  return p;
2407
2426
  }
2408
2427
  })
2409
2428
  ];
2410
2429
  }
2411
- }), ue = N.create({
2430
+ }), ue = D.create({
2412
2431
  name: "paste",
2413
2432
  addProseMirrorPlugins() {
2414
2433
  return [
2415
- new $({
2416
- key: new _("tiptapPaste"),
2434
+ new I({
2435
+ key: new B("tiptapPaste"),
2417
2436
  props: {
2418
2437
  handlePaste: (e, t, n) => {
2419
2438
  this.editor.emit("paste", {
@@ -2426,19 +2445,19 @@ var N = class ne extends xt {
2426
2445
  })
2427
2446
  ];
2428
2447
  }
2429
- }), fe = N.create({
2448
+ }), fe = D.create({
2430
2449
  name: "tabindex",
2431
2450
  addProseMirrorPlugins() {
2432
2451
  return [
2433
- new $({
2434
- key: new _("tabindex"),
2452
+ new I({
2453
+ key: new B("tabindex"),
2435
2454
  props: {
2436
2455
  attributes: () => this.editor.isEditable ? { tabindex: "0" } : {}
2437
2456
  }
2438
2457
  })
2439
2458
  ];
2440
2459
  }
2441
- }), pe = N.create({
2460
+ }), pe = D.create({
2442
2461
  name: "textDirection",
2443
2462
  addOptions() {
2444
2463
  return {
@@ -2448,7 +2467,7 @@ var N = class ne extends xt {
2448
2467
  addGlobalAttributes() {
2449
2468
  if (!this.options.direction)
2450
2469
  return [];
2451
- const { nodeExtensions: e } = L(this.extensions);
2470
+ const { nodeExtensions: e } = F(this.extensions);
2452
2471
  return [
2453
2472
  {
2454
2473
  types: e.filter((t) => t.name !== "text").map((t) => t.name),
@@ -2469,8 +2488,8 @@ var N = class ne extends xt {
2469
2488
  },
2470
2489
  addProseMirrorPlugins() {
2471
2490
  return [
2472
- new $({
2473
- key: new _("textDirection"),
2491
+ new I({
2492
+ key: new B("textDirection"),
2474
2493
  props: {
2475
2494
  attributes: () => {
2476
2495
  const e = this.options.direction;
@@ -2482,7 +2501,7 @@ var N = class ne extends xt {
2482
2501
  })
2483
2502
  ];
2484
2503
  }
2485
- }), jr = class F {
2504
+ }), Lr = class U {
2486
2505
  constructor(t, n, r = !1, s = null) {
2487
2506
  this.currentNode = null, this.actualDepth = null, this.isBlock = r, this.resolvedPos = t, this.editor = n, this.currentNode = s;
2488
2507
  }
@@ -2541,15 +2560,15 @@ var N = class ne extends xt {
2541
2560
  if (this.depth === 0)
2542
2561
  return null;
2543
2562
  const t = this.resolvedPos.start(this.resolvedPos.depth - 1), n = this.resolvedPos.doc.resolve(t);
2544
- return new F(n, this.editor);
2563
+ return new U(n, this.editor);
2545
2564
  }
2546
2565
  get before() {
2547
2566
  let t = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));
2548
- return t.depth !== this.depth && (t = this.resolvedPos.doc.resolve(this.from - 3)), new F(t, this.editor);
2567
+ return t.depth !== this.depth && (t = this.resolvedPos.doc.resolve(this.from - 3)), new U(t, this.editor);
2549
2568
  }
2550
2569
  get after() {
2551
2570
  let t = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));
2552
- return t.depth !== this.depth && (t = this.resolvedPos.doc.resolve(this.to + 3)), new F(t, this.editor);
2571
+ return t.depth !== this.depth && (t = this.resolvedPos.doc.resolve(this.to + 3)), new U(t, this.editor);
2553
2572
  }
2554
2573
  get children() {
2555
2574
  const t = [];
@@ -2560,7 +2579,7 @@ var N = class ne extends xt {
2560
2579
  const c = this.resolvedPos.doc.resolve(a);
2561
2580
  if (!s && !i && c.depth <= this.depth)
2562
2581
  return;
2563
- const l = new F(c, this.editor, s, s || i ? n : null);
2582
+ const l = new U(c, this.editor, s, s || i ? n : null);
2564
2583
  s && (l.actualDepth = this.depth + 1), t.push(l);
2565
2584
  }), t;
2566
2585
  }
@@ -2607,7 +2626,7 @@ var N = class ne extends xt {
2607
2626
  ...t
2608
2627
  }), this.editor.view.dispatch(n);
2609
2628
  }
2610
- }, Lr = `.ProseMirror {
2629
+ }, Hr = `.ProseMirror {
2611
2630
  position: relative;
2612
2631
  }
2613
2632
 
@@ -2678,14 +2697,14 @@ img.ProseMirror-separator {
2678
2697
  .ProseMirror-focused .ProseMirror-gapcursor {
2679
2698
  display: block;
2680
2699
  }`;
2681
- function Hr(e, t, n) {
2700
+ function Fr(e, t, n) {
2682
2701
  const r = document.querySelector("style[data-tiptap-style]");
2683
2702
  if (r !== null)
2684
2703
  return r;
2685
2704
  const s = document.createElement("style");
2686
2705
  return t && s.setAttribute("nonce", t), s.setAttribute("data-tiptap-style", ""), s.innerHTML = e, document.getElementsByTagName("head")[0].appendChild(s), s;
2687
2706
  }
2688
- var ds = class extends Ar {
2707
+ var us = class extends Cr {
2689
2708
  constructor(t = {}) {
2690
2709
  super(), this.css = null, this.className = "tiptap", this.editorView = null, this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.instanceId = Math.random().toString(36).slice(2, 9), this.options = {
2691
2710
  element: typeof document < "u" ? document.createElement("div") : null,
@@ -2788,7 +2807,7 @@ var ds = class extends Ar {
2788
2807
  * Inject CSS styles.
2789
2808
  */
2790
2809
  injectCSS() {
2791
- this.options.injectCSS && typeof document < "u" && (this.css = Hr(Lr, this.options.injectNonce));
2810
+ this.options.injectCSS && typeof document < "u" && (this.css = Fr(Hr, this.options.injectNonce));
2792
2811
  }
2793
2812
  /**
2794
2813
  * Update editor options.
@@ -2906,13 +2925,13 @@ var ds = class extends Ar {
2906
2925
  direction: this.options.textDirection
2907
2926
  })
2908
2927
  ].filter((o) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[o.name] !== !1 : !0) : [], ...this.options.extensions].filter((o) => ["extension", "node", "mark"].includes(o?.type));
2909
- this.extensionManager = new ct(s, this);
2928
+ this.extensionManager = new dt(s, this);
2910
2929
  }
2911
2930
  /**
2912
2931
  * Creates an command manager.
2913
2932
  */
2914
2933
  createCommandManager() {
2915
- this.commandManager = new st({
2934
+ this.commandManager = new it({
2916
2935
  editor: this
2917
2936
  });
2918
2937
  }
@@ -2928,7 +2947,7 @@ var ds = class extends Ar {
2928
2947
  createDoc() {
2929
2948
  let t;
2930
2949
  try {
2931
- t = ht(this.options.content, this.schema, this.options.parseOptions, {
2950
+ t = mt(this.options.content, this.schema, this.options.parseOptions, {
2932
2951
  errorOnInvalidContent: this.options.enableContentCheck
2933
2952
  });
2934
2953
  } catch (n) {
@@ -2940,7 +2959,7 @@ var ds = class extends Ar {
2940
2959
  disableCollaboration: () => {
2941
2960
  "collaboration" in this.storage && typeof this.storage.collaboration == "object" && this.storage.collaboration && (this.storage.collaboration.isDisabled = !0), this.options.extensions = this.options.extensions.filter((r) => r.name !== "collaboration"), this.createExtensionManager();
2942
2961
  }
2943
- }), t = ht(this.options.content, this.schema, this.options.parseOptions, {
2962
+ }), t = mt(this.options.content, this.schema, this.options.parseOptions, {
2944
2963
  errorOnInvalidContent: !1
2945
2964
  });
2946
2965
  }
@@ -3004,9 +3023,9 @@ var ds = class extends Ar {
3004
3023
  this.capturedTransaction = t;
3005
3024
  return;
3006
3025
  }
3007
- t.steps.forEach((u) => {
3026
+ t.steps.forEach((f) => {
3008
3027
  var d;
3009
- return (d = this.capturedTransaction) == null ? void 0 : d.step(u);
3028
+ return (d = this.capturedTransaction) == null ? void 0 : d.step(f);
3010
3029
  });
3011
3030
  return;
3012
3031
  }
@@ -3025,7 +3044,7 @@ var ds = class extends Ar {
3025
3044
  editor: this,
3026
3045
  transaction: t
3027
3046
  });
3028
- const a = r.findLast((u) => u.getMeta("focus") || u.getMeta("blur")), c = a?.getMeta("focus"), l = a?.getMeta("blur");
3047
+ const a = r.findLast((f) => f.getMeta("focus") || f.getMeta("blur")), c = a?.getMeta("focus"), l = a?.getMeta("blur");
3029
3048
  c && this.emit("focus", {
3030
3049
  editor: this,
3031
3050
  event: c.event,
@@ -3036,7 +3055,7 @@ var ds = class extends Ar {
3036
3055
  event: l.event,
3037
3056
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3038
3057
  transaction: a
3039
- }), !(t.getMeta("preventUpdate") || !r.some((u) => u.docChanged) || i.doc.eq(n.doc)) && this.emit("update", {
3058
+ }), !(t.getMeta("preventUpdate") || !r.some((f) => f.docChanged) || i.doc.eq(n.doc)) && this.emit("update", {
3040
3059
  editor: this,
3041
3060
  transaction: t,
3042
3061
  appendedTransactions: r.slice(1)
@@ -3062,7 +3081,7 @@ var ds = class extends Ar {
3062
3081
  * Get the document as HTML.
3063
3082
  */
3064
3083
  getHTML() {
3065
- return kt(this.state.doc.content, this.schema);
3084
+ return Mt(this.state.doc.content, this.schema);
3066
3085
  }
3067
3086
  /**
3068
3087
  * Get the document as text.
@@ -3083,7 +3102,7 @@ var ds = class extends Ar {
3083
3102
  * Check if there is no content.
3084
3103
  */
3085
3104
  get isEmpty() {
3086
- return Mt(this.state.doc);
3105
+ return xt(this.state.doc);
3087
3106
  }
3088
3107
  /**
3089
3108
  * Destroy the editor.
@@ -3108,14 +3127,14 @@ var ds = class extends Ar {
3108
3127
  }
3109
3128
  $pos(t) {
3110
3129
  const n = this.state.doc.resolve(t);
3111
- return new jr(n, this);
3130
+ return new Lr(n, this);
3112
3131
  }
3113
3132
  get $doc() {
3114
3133
  return this.$pos(0);
3115
3134
  }
3116
3135
  };
3117
- function fs(e) {
3118
- return new at({
3136
+ function ps(e) {
3137
+ return new lt({
3119
3138
  find: e.find,
3120
3139
  handler: ({ state: t, range: n, match: r }) => {
3121
3140
  const s = x(e.getAttributes, void 0, r);
@@ -3123,10 +3142,10 @@ function fs(e) {
3123
3142
  return null;
3124
3143
  const { tr: o } = t, i = r[r.length - 1], a = r[0];
3125
3144
  if (i) {
3126
- const c = a.search(/\S/), l = n.from + a.indexOf(i), u = l + i.length;
3127
- if (Qt(n.from, n.to, t.doc).filter((f) => f.mark.type.excluded.find((m) => m === e.type && m !== f.mark.type)).filter((f) => f.to > l).length)
3145
+ const c = a.search(/\S/), l = n.from + a.indexOf(i), f = l + i.length;
3146
+ if (Qt(n.from, n.to, t.doc).filter((u) => u.mark.type.excluded.find((h) => h === e.type && h !== u.mark.type)).filter((u) => u.to > l).length)
3128
3147
  return null;
3129
- u < n.to && o.delete(u, n.to), l > n.from && o.delete(n.from + c, l);
3148
+ f < n.to && o.delete(f, n.to), l > n.from && o.delete(n.from + c, l);
3130
3149
  const p = n.from + c + i.length;
3131
3150
  o.addMark(n.from + c, p, e.type.create(s || {})), o.removeStoredMark(e.type);
3132
3151
  }
@@ -3134,8 +3153,8 @@ function fs(e) {
3134
3153
  undoable: e.undoable
3135
3154
  });
3136
3155
  }
3137
- function ps(e) {
3138
- return new at({
3156
+ function hs(e) {
3157
+ return new lt({
3139
3158
  find: e.find,
3140
3159
  handler: ({ state: t, range: n, match: r }) => {
3141
3160
  const s = x(e.getAttributes, void 0, r) || {}, { tr: o } = t, i = n.from;
@@ -3143,10 +3162,10 @@ function ps(e) {
3143
3162
  const c = e.type.create(s);
3144
3163
  if (r[1]) {
3145
3164
  const l = r[0].lastIndexOf(r[1]);
3146
- let u = i + l;
3147
- u > a ? u = a : a = u + r[1].length;
3165
+ let f = i + l;
3166
+ f > a ? f = a : a = f + r[1].length;
3148
3167
  const d = r[0][r[0].length - 1];
3149
- o.insertText(d, i + r[0].length - 1), o.replaceWith(u, a, c);
3168
+ o.insertText(d, i + r[0].length - 1), o.replaceWith(f, a, c);
3150
3169
  } else if (r[0]) {
3151
3170
  const l = e.type.isInline ? i : i - 1;
3152
3171
  o.insert(l, e.type.create(s)).delete(o.mapping.map(i), o.mapping.map(a));
@@ -3156,8 +3175,8 @@ function ps(e) {
3156
3175
  undoable: e.undoable
3157
3176
  });
3158
3177
  }
3159
- function hs(e) {
3160
- return new at({
3178
+ function ms(e) {
3179
+ return new lt({
3161
3180
  find: e.find,
3162
3181
  handler: ({ state: t, range: n, match: r }) => {
3163
3182
  const s = t.doc.resolve(n.from), o = x(e.getAttributes, void 0, r) || {};
@@ -3168,31 +3187,31 @@ function hs(e) {
3168
3187
  undoable: e.undoable
3169
3188
  });
3170
3189
  }
3171
- function ms(e) {
3172
- return new at({
3190
+ function gs(e) {
3191
+ return new lt({
3173
3192
  find: e.find,
3174
3193
  handler: ({ state: t, range: n, match: r, chain: s }) => {
3175
3194
  const o = x(e.getAttributes, void 0, r) || {}, i = t.tr.delete(n.from, n.to), c = i.doc.resolve(n.from).blockRange(), l = c && me(c, e.type, o);
3176
3195
  if (!l)
3177
3196
  return null;
3178
3197
  if (i.wrap(c, l), e.keepMarks && e.editor) {
3179
- const { selection: d, storedMarks: p } = t, { splittableMarks: f } = e.editor.extensionManager, h = p || d.$to.parentOffset && d.$from.marks();
3180
- if (h) {
3181
- const m = h.filter((g) => f.includes(g.type.name));
3182
- i.ensureMarks(m);
3198
+ const { selection: d, storedMarks: p } = t, { splittableMarks: u } = e.editor.extensionManager, m = p || d.$to.parentOffset && d.$from.marks();
3199
+ if (m) {
3200
+ const h = m.filter((g) => u.includes(g.type.name));
3201
+ i.ensureMarks(h);
3183
3202
  }
3184
3203
  }
3185
3204
  if (e.keepAttributes) {
3186
3205
  const d = e.type.name === "bulletList" || e.type.name === "orderedList" ? "listItem" : "taskList";
3187
3206
  s().updateAttributes(d, o).run();
3188
3207
  }
3189
- const u = i.doc.resolve(n.from - 1).nodeBefore;
3190
- u && u.type === e.type && gt(i.doc, n.from - 1) && (!e.joinPredicate || e.joinPredicate(r, u)) && i.join(n.from - 1);
3208
+ const f = i.doc.resolve(n.from - 1).nodeBefore;
3209
+ f && f.type === e.type && vt(i.doc, n.from - 1) && (!e.joinPredicate || e.joinPredicate(r, f)) && i.join(n.from - 1);
3191
3210
  },
3192
3211
  undoable: e.undoable
3193
3212
  });
3194
3213
  }
3195
- var Fr = (e) => "touches" in e, gs = class {
3214
+ var Vr = (e) => "touches" in e, vs = class {
3196
3215
  /**
3197
3216
  * Creates a new ResizableNodeView instance.
3198
3217
  *
@@ -3221,8 +3240,8 @@ var Fr = (e) => "touches" in e, gs = class {
3221
3240
  const c = a.touches[0];
3222
3241
  if (!c)
3223
3242
  return;
3224
- const l = c.clientX - this.startX, u = c.clientY - this.startY;
3225
- this.handleResize(l, u);
3243
+ const l = c.clientX - this.startX, f = c.clientY - this.startY;
3244
+ this.handleResize(l, f);
3226
3245
  }, this.handleMouseUp = () => {
3227
3246
  if (!this.isResizing)
3228
3247
  return;
@@ -3298,7 +3317,7 @@ var Fr = (e) => "touches" in e, gs = class {
3298
3317
  */
3299
3318
  createContainer() {
3300
3319
  const e = document.createElement("div");
3301
- return e.dataset.resizeContainer = "", e.dataset.node = this.node.type.name, e.style.display = "flex", this.classNames.container && (e.className = this.classNames.container), e.appendChild(this.wrapper), e;
3320
+ return e.dataset.resizeContainer = "", e.dataset.node = this.node.type.name, e.style.display = this.node.type.isInline ? "inline-flex" : "flex", this.classNames.container && (e.className = this.classNames.container), e.appendChild(this.wrapper), e;
3302
3321
  }
3303
3322
  /**
3304
3323
  * Creates the wrapper element that contains the content and handles.
@@ -3383,7 +3402,7 @@ var Fr = (e) => "touches" in e, gs = class {
3383
3402
  * @param direction - The direction of the handle being dragged
3384
3403
  */
3385
3404
  handleResizeStart(e, t) {
3386
- e.preventDefault(), e.stopPropagation(), this.isResizing = !0, this.activeHandle = t, Fr(e) ? (this.startX = e.touches[0].clientX, this.startY = e.touches[0].clientY) : (this.startX = e.clientX, this.startY = e.clientY), this.startWidth = this.element.offsetWidth, this.startHeight = this.element.offsetHeight, this.startWidth > 0 && this.startHeight > 0 && (this.aspectRatio = this.startWidth / this.startHeight), this.getPos(), this.container.dataset.resizeState = "true", this.classNames.resizing && this.container.classList.add(this.classNames.resizing), document.addEventListener("mousemove", this.handleMouseMove), document.addEventListener("touchmove", this.handleTouchMove), document.addEventListener("mouseup", this.handleMouseUp), document.addEventListener("keydown", this.handleKeyDown), document.addEventListener("keyup", this.handleKeyUp);
3405
+ e.preventDefault(), e.stopPropagation(), this.isResizing = !0, this.activeHandle = t, Vr(e) ? (this.startX = e.touches[0].clientX, this.startY = e.touches[0].clientY) : (this.startX = e.clientX, this.startY = e.clientY), this.startWidth = this.element.offsetWidth, this.startHeight = this.element.offsetHeight, this.startWidth > 0 && this.startHeight > 0 && (this.aspectRatio = this.startWidth / this.startHeight), this.getPos(), this.container.dataset.resizeState = "true", this.classNames.resizing && this.container.classList.add(this.classNames.resizing), document.addEventListener("mousemove", this.handleMouseMove), document.addEventListener("touchmove", this.handleTouchMove), document.addEventListener("mouseup", this.handleMouseUp), document.addEventListener("keydown", this.handleKeyDown), document.addEventListener("keyup", this.handleKeyUp);
3387
3406
  }
3388
3407
  handleResize(e, t) {
3389
3408
  if (!this.activeHandle)
@@ -3427,8 +3446,8 @@ var Fr = (e) => "touches" in e, gs = class {
3427
3446
  applyConstraints(e, t, n) {
3428
3447
  var r, s, o, i;
3429
3448
  if (!n) {
3430
- let l = Math.max(this.minSize.width, e), u = Math.max(this.minSize.height, t);
3431
- return (r = this.maxSize) != null && r.width && (l = Math.min(this.maxSize.width, l)), (s = this.maxSize) != null && s.height && (u = Math.min(this.maxSize.height, u)), { width: l, height: u };
3449
+ let l = Math.max(this.minSize.width, e), f = Math.max(this.minSize.height, t);
3450
+ return (r = this.maxSize) != null && r.width && (l = Math.min(this.maxSize.width, l)), (s = this.maxSize) != null && s.height && (f = Math.min(this.maxSize.height, f)), { width: l, height: f };
3432
3451
  }
3433
3452
  let a = e, c = t;
3434
3453
  return a < this.minSize.width && (a = this.minSize.width, c = a / this.aspectRatio), c < this.minSize.height && (c = this.minSize.height, a = c * this.aspectRatio), (o = this.maxSize) != null && o.width && a > this.maxSize.width && (a = this.maxSize.width, c = a / this.aspectRatio), (i = this.maxSize) != null && i.height && c > this.maxSize.height && (c = this.maxSize.height, a = c * this.aspectRatio), { width: a, height: c };
@@ -3460,9 +3479,9 @@ var Fr = (e) => "touches" in e, gs = class {
3460
3479
  };
3461
3480
  }
3462
3481
  };
3463
- function vs(e, t) {
3482
+ function ys(e, t) {
3464
3483
  const { selection: n } = e, { $from: r } = n;
3465
- if (n instanceof nt) {
3484
+ if (n instanceof st) {
3466
3485
  const o = r.index();
3467
3486
  return r.parent.canReplaceWith(o, o + 1, t);
3468
3487
  }
@@ -3475,38 +3494,38 @@ function vs(e, t) {
3475
3494
  }
3476
3495
  return !1;
3477
3496
  }
3478
- var Vr = {};
3479
- vt(Vr, {
3480
- createAtomBlockMarkdownSpec: () => Wr,
3481
- createBlockMarkdownSpec: () => Ur,
3482
- createInlineMarkdownSpec: () => Jr,
3483
- parseAttributes: () => St,
3484
- parseIndentedBlocks: () => Xr,
3485
- renderNestedMarkdownContent: () => Yr,
3486
- serializeAttributes: () => Et
3497
+ var Wr = {};
3498
+ yt(Wr, {
3499
+ createAtomBlockMarkdownSpec: () => Ur,
3500
+ createBlockMarkdownSpec: () => Kr,
3501
+ createInlineMarkdownSpec: () => Xr,
3502
+ parseAttributes: () => Et,
3503
+ parseIndentedBlocks: () => Yr,
3504
+ renderNestedMarkdownContent: () => Qr,
3505
+ serializeAttributes: () => Tt
3487
3506
  });
3488
- function St(e) {
3507
+ function Et(e) {
3489
3508
  if (!e?.trim())
3490
3509
  return {};
3491
3510
  const t = {}, n = [], r = e.replace(/["']([^"']*)["']/g, (l) => (n.push(l), `__QUOTED_${n.length - 1}__`)), s = r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);
3492
3511
  if (s) {
3493
- const l = s.map((u) => u.trim().slice(1));
3512
+ const l = s.map((f) => f.trim().slice(1));
3494
3513
  t.class = l.join(" ");
3495
3514
  }
3496
3515
  const o = r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);
3497
3516
  o && (t.id = o[1]);
3498
3517
  const i = /([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;
3499
- Array.from(r.matchAll(i)).forEach(([, l, u]) => {
3518
+ Array.from(r.matchAll(i)).forEach(([, l, f]) => {
3500
3519
  var d;
3501
- const p = parseInt(((d = u.match(/__QUOTED_(\d+)__/)) == null ? void 0 : d[1]) || "0", 10), f = n[p];
3502
- f && (t[l] = f.slice(1, -1));
3520
+ const p = parseInt(((d = f.match(/__QUOTED_(\d+)__/)) == null ? void 0 : d[1]) || "0", 10), u = n[p];
3521
+ u && (t[l] = u.slice(1, -1));
3503
3522
  });
3504
3523
  const c = r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g, "").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g, "").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g, "").trim();
3505
- return c && c.split(/\s+/).filter(Boolean).forEach((u) => {
3506
- u.match(/^[a-zA-Z][\w-]*$/) && (t[u] = !0);
3524
+ return c && c.split(/\s+/).filter(Boolean).forEach((f) => {
3525
+ f.match(/^[a-zA-Z][\w-]*$/) && (t[f] = !0);
3507
3526
  }), t;
3508
3527
  }
3509
- function Et(e) {
3528
+ function Tt(e) {
3510
3529
  if (!e || Object.keys(e).length === 0)
3511
3530
  return "";
3512
3531
  const t = [];
@@ -3514,94 +3533,94 @@ function Et(e) {
3514
3533
  n === "class" || n === "id" || (r === !0 ? t.push(n) : r !== !1 && r != null && t.push(`${n}="${String(r)}"`));
3515
3534
  }), t.join(" ");
3516
3535
  }
3517
- function Wr(e) {
3536
+ function Ur(e) {
3518
3537
  const {
3519
3538
  nodeName: t,
3520
3539
  name: n,
3521
- parseAttributes: r = St,
3522
- serializeAttributes: s = Et,
3540
+ parseAttributes: r = Et,
3541
+ serializeAttributes: s = Tt,
3523
3542
  defaultAttributes: o = {},
3524
3543
  requiredAttributes: i = [],
3525
3544
  allowedAttributes: a
3526
- } = e, c = n || t, l = (u) => {
3545
+ } = e, c = n || t, l = (f) => {
3527
3546
  if (!a)
3528
- return u;
3547
+ return f;
3529
3548
  const d = {};
3530
3549
  return a.forEach((p) => {
3531
- p in u && (d[p] = u[p]);
3550
+ p in f && (d[p] = f[p]);
3532
3551
  }), d;
3533
3552
  };
3534
3553
  return {
3535
- parseMarkdown: (u, d) => {
3536
- const p = { ...o, ...u.attributes };
3554
+ parseMarkdown: (f, d) => {
3555
+ const p = { ...o, ...f.attributes };
3537
3556
  return d.createNode(t, p, []);
3538
3557
  },
3539
3558
  markdownTokenizer: {
3540
3559
  name: t,
3541
3560
  level: "block",
3542
- start(u) {
3561
+ start(f) {
3543
3562
  var d;
3544
- const p = new RegExp(`^:::${c}(?:\\s|$)`, "m"), f = (d = u.match(p)) == null ? void 0 : d.index;
3545
- return f !== void 0 ? f : -1;
3563
+ const p = new RegExp(`^:::${c}(?:\\s|$)`, "m"), u = (d = f.match(p)) == null ? void 0 : d.index;
3564
+ return u !== void 0 ? u : -1;
3546
3565
  },
3547
- tokenize(u, d, p) {
3548
- const f = new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`), h = u.match(f);
3549
- if (!h)
3566
+ tokenize(f, d, p) {
3567
+ const u = new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`), m = f.match(u);
3568
+ if (!m)
3550
3569
  return;
3551
- const m = h[1] || "", g = r(m);
3570
+ const h = m[1] || "", g = r(h);
3552
3571
  if (!i.find((b) => !(b in g)))
3553
3572
  return {
3554
3573
  type: t,
3555
- raw: h[0],
3574
+ raw: m[0],
3556
3575
  attributes: g
3557
3576
  };
3558
3577
  }
3559
3578
  },
3560
- renderMarkdown: (u) => {
3561
- const d = l(u.attrs || {}), p = s(d), f = p ? ` {${p}}` : "";
3562
- return `:::${c}${f} :::`;
3579
+ renderMarkdown: (f) => {
3580
+ const d = l(f.attrs || {}), p = s(d), u = p ? ` {${p}}` : "";
3581
+ return `:::${c}${u} :::`;
3563
3582
  }
3564
3583
  };
3565
3584
  }
3566
- function Ur(e) {
3585
+ function Kr(e) {
3567
3586
  const {
3568
3587
  nodeName: t,
3569
3588
  name: n,
3570
3589
  getContent: r,
3571
- parseAttributes: s = St,
3572
- serializeAttributes: o = Et,
3590
+ parseAttributes: s = Et,
3591
+ serializeAttributes: o = Tt,
3573
3592
  defaultAttributes: i = {},
3574
3593
  content: a = "block",
3575
3594
  allowedAttributes: c
3576
- } = e, l = n || t, u = (d) => {
3595
+ } = e, l = n || t, f = (d) => {
3577
3596
  if (!c)
3578
3597
  return d;
3579
3598
  const p = {};
3580
- return c.forEach((f) => {
3581
- f in d && (p[f] = d[f]);
3599
+ return c.forEach((u) => {
3600
+ u in d && (p[u] = d[u]);
3582
3601
  }), p;
3583
3602
  };
3584
3603
  return {
3585
3604
  parseMarkdown: (d, p) => {
3586
- let f;
3605
+ let u;
3587
3606
  if (r) {
3588
- const m = r(d);
3589
- f = typeof m == "string" ? [{ type: "text", text: m }] : m;
3590
- } else a === "block" ? f = p.parseChildren(d.tokens || []) : f = p.parseInline(d.tokens || []);
3591
- const h = { ...i, ...d.attributes };
3592
- return p.createNode(t, h, f);
3607
+ const h = r(d);
3608
+ u = typeof h == "string" ? [{ type: "text", text: h }] : h;
3609
+ } else a === "block" ? u = p.parseChildren(d.tokens || []) : u = p.parseInline(d.tokens || []);
3610
+ const m = { ...i, ...d.attributes };
3611
+ return p.createNode(t, m, u);
3593
3612
  },
3594
3613
  markdownTokenizer: {
3595
3614
  name: t,
3596
3615
  level: "block",
3597
3616
  start(d) {
3598
3617
  var p;
3599
- const f = new RegExp(`^:::${l}`, "m"), h = (p = d.match(f)) == null ? void 0 : p.index;
3600
- return h !== void 0 ? h : -1;
3618
+ const u = new RegExp(`^:::${l}`, "m"), m = (p = d.match(u)) == null ? void 0 : p.index;
3619
+ return m !== void 0 ? m : -1;
3601
3620
  },
3602
- tokenize(d, p, f) {
3603
- var h;
3604
- const m = new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*\\n`), g = d.match(m);
3621
+ tokenize(d, p, u) {
3622
+ var m;
3623
+ const h = new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*\\n`), g = d.match(h);
3605
3624
  if (!g)
3606
3625
  return;
3607
3626
  const [v, b = ""] = g, k = s(b);
@@ -3613,34 +3632,34 @@ function Ur(e) {
3613
3632
  const C = E.exec(A);
3614
3633
  if (C === null)
3615
3634
  break;
3616
- const O = C.index, lt = C[1];
3617
- if (!((h = C[2]) != null && h.endsWith(":::"))) {
3618
- if (lt)
3635
+ const $ = C.index, V = C[1];
3636
+ if (!((m = C[2]) != null && m.endsWith(":::"))) {
3637
+ if (V)
3619
3638
  M += 1;
3620
3639
  else if (M -= 1, M === 0) {
3621
- const K = A.slice(0, O);
3622
- S = K.trim();
3623
- const dt = d.slice(0, w + O + C[0].length);
3624
- let I = [];
3640
+ const j = A.slice(0, $);
3641
+ S = j.trim();
3642
+ const R = d.slice(0, w + $ + C[0].length);
3643
+ let N = [];
3625
3644
  if (S)
3626
3645
  if (a === "block")
3627
- for (I = f.blockTokens(K), I.forEach((R) => {
3628
- R.text && (!R.tokens || R.tokens.length === 0) && (R.tokens = f.inlineTokens(R.text));
3629
- }); I.length > 0; ) {
3630
- const R = I[I.length - 1];
3631
- if (R.type === "paragraph" && (!R.text || R.text.trim() === ""))
3632
- I.pop();
3646
+ for (N = u.blockTokens(j), N.forEach((P) => {
3647
+ P.text && (!P.tokens || P.tokens.length === 0) && (P.tokens = u.inlineTokens(P.text));
3648
+ }); N.length > 0; ) {
3649
+ const P = N[N.length - 1];
3650
+ if (P.type === "paragraph" && (!P.text || P.text.trim() === ""))
3651
+ N.pop();
3633
3652
  else
3634
3653
  break;
3635
3654
  }
3636
3655
  else
3637
- I = f.inlineTokens(S);
3656
+ N = u.inlineTokens(S);
3638
3657
  return {
3639
3658
  type: t,
3640
- raw: dt,
3659
+ raw: R,
3641
3660
  attributes: k,
3642
3661
  content: S,
3643
- tokens: I
3662
+ tokens: N
3644
3663
  };
3645
3664
  }
3646
3665
  }
@@ -3648,10 +3667,10 @@ function Ur(e) {
3648
3667
  }
3649
3668
  },
3650
3669
  renderMarkdown: (d, p) => {
3651
- const f = u(d.attrs || {}), h = o(f), m = h ? ` {${h}}` : "", g = p.renderChildren(d.content || [], `
3670
+ const u = f(d.attrs || {}), m = o(u), h = m ? ` {${m}}` : "", g = p.renderChildren(d.content || [], `
3652
3671
 
3653
3672
  `);
3654
- return `:::${l}${m}
3673
+ return `:::${l}${h}
3655
3674
 
3656
3675
  ${g}
3657
3676
 
@@ -3659,7 +3678,7 @@ ${g}
3659
3678
  }
3660
3679
  };
3661
3680
  }
3662
- function Kr(e) {
3681
+ function qr(e) {
3663
3682
  if (!e.trim())
3664
3683
  return {};
3665
3684
  const t = {}, n = /(\w+)=(?:"([^"]*)"|'([^']*)')/g;
@@ -3670,50 +3689,50 @@ function Kr(e) {
3670
3689
  }
3671
3690
  return t;
3672
3691
  }
3673
- function qr(e) {
3692
+ function Jr(e) {
3674
3693
  return Object.entries(e).filter(([, t]) => t != null).map(([t, n]) => `${t}="${n}"`).join(" ");
3675
3694
  }
3676
- function Jr(e) {
3695
+ function Xr(e) {
3677
3696
  const {
3678
3697
  nodeName: t,
3679
3698
  name: n,
3680
3699
  getContent: r,
3681
- parseAttributes: s = Kr,
3682
- serializeAttributes: o = qr,
3700
+ parseAttributes: s = qr,
3701
+ serializeAttributes: o = Jr,
3683
3702
  defaultAttributes: i = {},
3684
3703
  selfClosing: a = !1,
3685
3704
  allowedAttributes: c
3686
- } = e, l = n || t, u = (p) => {
3705
+ } = e, l = n || t, f = (p) => {
3687
3706
  if (!c)
3688
3707
  return p;
3689
- const f = {};
3690
- return c.forEach((h) => {
3691
- const m = typeof h == "string" ? h : h.name, g = typeof h == "string" ? void 0 : h.skipIfDefault;
3692
- if (m in p) {
3693
- const v = p[m];
3708
+ const u = {};
3709
+ return c.forEach((m) => {
3710
+ const h = typeof m == "string" ? m : m.name, g = typeof m == "string" ? void 0 : m.skipIfDefault;
3711
+ if (h in p) {
3712
+ const v = p[h];
3694
3713
  if (g !== void 0 && v === g)
3695
3714
  return;
3696
- f[m] = v;
3715
+ u[h] = v;
3697
3716
  }
3698
- }), f;
3717
+ }), u;
3699
3718
  }, d = l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3700
3719
  return {
3701
- parseMarkdown: (p, f) => {
3702
- const h = { ...i, ...p.attributes };
3720
+ parseMarkdown: (p, u) => {
3721
+ const m = { ...i, ...p.attributes };
3703
3722
  if (a)
3704
- return f.createNode(t, h);
3705
- const m = r ? r(p) : p.content || "";
3706
- return m ? f.createNode(t, h, [f.createTextNode(m)]) : f.createNode(t, h, []);
3723
+ return u.createNode(t, m);
3724
+ const h = r ? r(p) : p.content || "";
3725
+ return h ? u.createNode(t, m, [u.createTextNode(h)]) : u.createNode(t, m, []);
3707
3726
  },
3708
3727
  markdownTokenizer: {
3709
3728
  name: t,
3710
3729
  level: "inline",
3711
3730
  start(p) {
3712
- const f = a ? new RegExp(`\\[${d}\\s*[^\\]]*\\]`) : new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`), h = p.match(f), m = h?.index;
3713
- return m !== void 0 ? m : -1;
3731
+ const u = a ? new RegExp(`\\[${d}\\s*[^\\]]*\\]`) : new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`), m = p.match(u), h = m?.index;
3732
+ return h !== void 0 ? h : -1;
3714
3733
  },
3715
- tokenize(p, f, h) {
3716
- const m = a ? new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`) : new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`), g = p.match(m);
3734
+ tokenize(p, u, m) {
3735
+ const h = a ? new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`) : new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`), g = p.match(h);
3717
3736
  if (!g)
3718
3737
  return;
3719
3738
  let v = "", b = "";
@@ -3734,62 +3753,62 @@ function Jr(e) {
3734
3753
  }
3735
3754
  },
3736
3755
  renderMarkdown: (p) => {
3737
- let f = "";
3738
- r ? f = r(p) : p.content && p.content.length > 0 && (f = p.content.filter((v) => v.type === "text").map((v) => v.text).join(""));
3739
- const h = u(p.attrs || {}), m = o(h), g = m ? ` ${m}` : "";
3740
- return a ? `[${l}${g}]` : `[${l}${g}]${f}[/${l}]`;
3756
+ let u = "";
3757
+ r ? u = r(p) : p.content && p.content.length > 0 && (u = p.content.filter((v) => v.type === "text").map((v) => v.text).join(""));
3758
+ const m = f(p.attrs || {}), h = o(m), g = h ? ` ${h}` : "";
3759
+ return a ? `[${l}${g}]` : `[${l}${g}]${u}[/${l}]`;
3741
3760
  }
3742
3761
  };
3743
3762
  }
3744
- function Xr(e, t, n) {
3763
+ function Yr(e, t, n) {
3745
3764
  var r, s, o, i;
3746
3765
  const a = e.split(`
3747
3766
  `), c = [];
3748
- let l = "", u = 0;
3767
+ let l = "", f = 0;
3749
3768
  const d = t.baseIndentSize || 2;
3750
- for (; u < a.length; ) {
3751
- const p = a[u], f = p.match(t.itemPattern);
3752
- if (!f) {
3769
+ for (; f < a.length; ) {
3770
+ const p = a[f], u = p.match(t.itemPattern);
3771
+ if (!u) {
3753
3772
  if (c.length > 0)
3754
3773
  break;
3755
3774
  if (p.trim() === "") {
3756
- u += 1, l = `${l}${p}
3775
+ f += 1, l = `${l}${p}
3757
3776
  `;
3758
3777
  continue;
3759
3778
  } else
3760
3779
  return;
3761
3780
  }
3762
- const h = t.extractItemData(f), { indentLevel: m, mainContent: g } = h;
3781
+ const m = t.extractItemData(u), { indentLevel: h, mainContent: g } = m;
3763
3782
  l = `${l}${p}
3764
3783
  `;
3765
3784
  const v = [g];
3766
- for (u += 1; u < a.length; ) {
3767
- const w = a[u];
3785
+ for (f += 1; f < a.length; ) {
3786
+ const w = a[f];
3768
3787
  if (w.trim() === "") {
3769
- const E = a.slice(u + 1).findIndex((O) => O.trim() !== "");
3788
+ const E = a.slice(f + 1).findIndex(($) => $.trim() !== "");
3770
3789
  if (E === -1)
3771
3790
  break;
3772
- if ((((s = (r = a[u + 1 + E].match(/^(\s*)/)) == null ? void 0 : r[1]) == null ? void 0 : s.length) || 0) > m) {
3791
+ if ((((s = (r = a[f + 1 + E].match(/^(\s*)/)) == null ? void 0 : r[1]) == null ? void 0 : s.length) || 0) > h) {
3773
3792
  v.push(w), l = `${l}${w}
3774
- `, u += 1;
3793
+ `, f += 1;
3775
3794
  continue;
3776
3795
  } else
3777
3796
  break;
3778
3797
  }
3779
- if ((((i = (o = w.match(/^(\s*)/)) == null ? void 0 : o[1]) == null ? void 0 : i.length) || 0) > m)
3798
+ if ((((i = (o = w.match(/^(\s*)/)) == null ? void 0 : o[1]) == null ? void 0 : i.length) || 0) > h)
3780
3799
  v.push(w), l = `${l}${w}
3781
- `, u += 1;
3800
+ `, f += 1;
3782
3801
  else
3783
3802
  break;
3784
3803
  }
3785
3804
  let b;
3786
3805
  const k = v.slice(1);
3787
3806
  if (k.length > 0) {
3788
- const w = k.map((S) => S.slice(m + d)).join(`
3807
+ const w = k.map((S) => S.slice(h + d)).join(`
3789
3808
  `);
3790
3809
  w.trim() && (t.customNestedParser ? b = t.customNestedParser(w) : b = n.blockTokens(w));
3791
3810
  }
3792
- const M = t.createToken(h, b);
3811
+ const M = t.createToken(m, b);
3793
3812
  c.push(M);
3794
3813
  }
3795
3814
  if (c.length !== 0)
@@ -3798,49 +3817,49 @@ function Xr(e, t, n) {
3798
3817
  raw: l
3799
3818
  };
3800
3819
  }
3801
- function Yr(e, t, n, r) {
3820
+ function Qr(e, t, n, r) {
3802
3821
  if (!e || !Array.isArray(e.content))
3803
3822
  return "";
3804
3823
  const s = typeof n == "function" ? n(r) : n, [o, ...i] = e.content, a = t.renderChildren([o]);
3805
3824
  let c = `${s}${a}`;
3806
- return i && i.length > 0 && i.forEach((l, u) => {
3825
+ return i && i.length > 0 && i.forEach((l, f) => {
3807
3826
  var d, p;
3808
- const f = (p = (d = t.renderChild) == null ? void 0 : d.call(t, l, u + 1)) != null ? p : t.renderChildren([l]);
3809
- if (f != null) {
3810
- const h = f.split(`
3811
- `).map((m) => m ? t.indent(m) : t.indent("")).join(`
3827
+ const u = (p = (d = t.renderChild) == null ? void 0 : d.call(t, l, f + 1)) != null ? p : t.renderChildren([l]);
3828
+ if (u != null) {
3829
+ const m = u.split(`
3830
+ `).map((h) => h ? t.indent(h) : t.indent("")).join(`
3812
3831
  `);
3813
3832
  c += l.type === "paragraph" ? `
3814
3833
 
3815
- ${h}` : `
3816
- ${h}`;
3834
+ ${m}` : `
3835
+ ${m}`;
3817
3836
  }
3818
3837
  }), c;
3819
3838
  }
3820
- function Qr(e, t, n = {}) {
3839
+ function Zr(e, t, n = {}) {
3821
3840
  const { state: r } = t, { doc: s, tr: o } = r, i = e;
3822
3841
  s.descendants((a, c) => {
3823
- const l = o.mapping.map(c), u = o.mapping.map(c) + a.nodeSize;
3842
+ const l = o.mapping.map(c), f = o.mapping.map(c) + a.nodeSize;
3824
3843
  let d = null;
3825
- if (a.marks.forEach((f) => {
3826
- if (f !== i)
3844
+ if (a.marks.forEach((u) => {
3845
+ if (u !== i)
3827
3846
  return !1;
3828
- d = f;
3847
+ d = u;
3829
3848
  }), !d)
3830
3849
  return;
3831
3850
  let p = !1;
3832
- if (Object.keys(n).forEach((f) => {
3833
- n[f] !== d.attrs[f] && (p = !0);
3851
+ if (Object.keys(n).forEach((u) => {
3852
+ n[u] !== d.attrs[u] && (p = !0);
3834
3853
  }), p) {
3835
- const f = e.type.create({
3854
+ const u = e.type.create({
3836
3855
  ...e.attrs,
3837
3856
  ...n
3838
3857
  });
3839
- o.removeMark(l, u, e.type), o.addMark(l, u, f);
3858
+ o.removeMark(l, f, e.type), o.addMark(l, f, u);
3840
3859
  }
3841
3860
  }), o.docChanged && t.view.dispatch(o);
3842
3861
  }
3843
- var ys = class he extends xt {
3862
+ var bs = class he extends St {
3844
3863
  constructor() {
3845
3864
  super(...arguments), this.type = "node";
3846
3865
  }
@@ -3860,8 +3879,8 @@ var ys = class he extends xt {
3860
3879
  return super.extend(n);
3861
3880
  }
3862
3881
  };
3863
- function bs(e) {
3864
- return new zr({
3882
+ function ws(e) {
3883
+ return new Ir({
3865
3884
  find: e.find,
3866
3885
  handler: ({ state: t, range: n, match: r, pasteEvent: s }) => {
3867
3886
  const o = x(e.getAttributes, void 0, r, s);
@@ -3870,15 +3889,15 @@ function bs(e) {
3870
3889
  const { tr: i } = t, a = r[r.length - 1], c = r[0];
3871
3890
  let l = n.to;
3872
3891
  if (a) {
3873
- const u = c.search(/\S/), d = n.from + c.indexOf(a), p = d + a.length;
3874
- if (Qt(n.from, n.to, t.doc).filter((h) => h.mark.type.excluded.find((g) => g === e.type && g !== h.mark.type)).filter((h) => h.to > d).length)
3892
+ const f = c.search(/\S/), d = n.from + c.indexOf(a), p = d + a.length;
3893
+ if (Qt(n.from, n.to, t.doc).filter((h) => h.mark.type.excluded.find((v) => v === e.type && v !== h.mark.type)).filter((h) => h.to > d).length)
3875
3894
  return null;
3876
- p < n.to && i.delete(p, n.to), d > n.from && i.delete(n.from + u, d), l = n.from + u + a.length, i.addMark(n.from + u, l, e.type.create(o || {})), i.removeStoredMark(e.type);
3895
+ p < n.to && i.delete(p, n.to), d > n.from && i.delete(n.from + f, d), l = n.from + f + a.length, i.addMark(n.from + f, l, e.type.create(o || {})), r.index !== void 0 && r.input !== void 0 && r.index + r[0].length >= r.input.length || i.removeStoredMark(e.type);
3877
3896
  }
3878
3897
  }
3879
3898
  });
3880
3899
  }
3881
- var ws = (e, t) => {
3900
+ var ks = (e, t) => {
3882
3901
  if (e === "slot")
3883
3902
  return 0;
3884
3903
  if (e instanceof Function)
@@ -3890,36 +3909,36 @@ var ws = (e, t) => {
3890
3909
  };
3891
3910
  export {
3892
3911
  Vn as A,
3893
- Br as B,
3894
- kt as C,
3895
- ds as E,
3896
- Nr as M,
3897
- ys as N,
3898
- gs as R,
3899
- bs as a,
3900
- fs as b,
3901
- vs as c,
3912
+ jr as B,
3913
+ Mt as C,
3914
+ us as E,
3915
+ Rr as M,
3916
+ bs as N,
3917
+ vs as R,
3918
+ ws as a,
3919
+ ps as b,
3920
+ ys as c,
3902
3921
  Hn as d,
3903
3922
  Qt as e,
3904
- os as f,
3923
+ is as f,
3905
3924
  er as g,
3906
- ws as h,
3907
- ls as i,
3925
+ ks as h,
3926
+ ds as i,
3908
3927
  Zn as j,
3909
- N as k,
3910
- et as l,
3928
+ D as k,
3929
+ rt as l,
3911
3930
  Kn as m,
3912
- ps as n,
3913
- U as o,
3914
- Xr as p,
3915
- cs as q,
3916
- Yr as r,
3917
- as as s,
3918
- hs as t,
3931
+ hs as n,
3932
+ J as o,
3933
+ Yr as p,
3934
+ ls as q,
3935
+ Qr as r,
3936
+ cs as s,
3937
+ ms as t,
3919
3938
  T as u,
3920
- is as v,
3921
- ms as w,
3939
+ as as v,
3940
+ gs as w,
3922
3941
  x,
3923
3942
  y,
3924
- Mt as z
3943
+ xt as z
3925
3944
  };