@aquera/nile-elements 1.9.6 → 1.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index-178e1e57.cjs.js +2 -0
- package/dist/index-178e1e57.cjs.js.map +1 -0
- package/dist/index-1faa963c.esm.js +1 -0
- package/dist/index-249de90a.esm.js +1 -0
- package/dist/index-353172ed.esm.js +1 -0
- package/dist/index-6f3fa4ab.esm.js +1 -0
- package/dist/index-89c520e9.cjs.js +5 -0
- package/dist/index-89c520e9.cjs.js.map +1 -0
- package/dist/index-920675c4.esm.js +1 -0
- package/dist/index-b387a9f4.cjs.js +2 -0
- package/dist/index-b387a9f4.cjs.js.map +1 -0
- package/dist/index-cc1385e0.cjs.js +2 -0
- package/dist/index-cc1385e0.cjs.js.map +1 -0
- package/dist/index-dedc38a6.esm.js +1 -0
- package/dist/index-df196058.cjs.js +2 -0
- package/dist/index-df196058.cjs.js.map +1 -0
- package/dist/index-f956f56d.cjs.js +7 -0
- package/dist/index-f956f56d.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +3595 -629
- package/dist/internal/glyph.cjs.js +2 -0
- package/dist/internal/glyph.cjs.js.map +1 -0
- package/dist/internal/glyph.esm.js +5 -0
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-manager.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-utils.cjs.js +1 -1
- package/dist/nile-code-editor/extensionSetup.cjs.js +7 -7
- package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
- package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
- package/dist/nile-code-editor/index.cjs.js +1 -1
- package/dist/nile-code-editor/index.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
- package/dist/nile-color-picker/index.cjs.js +1 -1
- package/dist/nile-color-picker/nile-color-picker.cjs.js +1 -1
- package/dist/nile-combobox/index.cjs.js +1 -1
- package/dist/nile-combobox/index.esm.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.esm.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-context-menu/index.cjs.js +1 -1
- package/dist/nile-context-menu/nile-context-menu.cjs.js +1 -1
- package/dist/nile-context-submenu/index.cjs.js +1 -1
- package/dist/nile-context-submenu/nile-context-submenu.cjs.js +1 -1
- package/dist/nile-detail/index.cjs.js +1 -1
- package/dist/nile-detail/index.esm.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.esm.js +1 -1
- package/dist/nile-dropdown/index.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/portal-manager.cjs.js +1 -1
- package/dist/nile-file-upload/index.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +1 -1
- package/dist/nile-floating-panel/index.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-markdown-editor/index.cjs.js +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.cjs.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/portal-manager.cjs.js +1 -1
- package/dist/nile-popup/index.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.cjs.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/portal-manager.cjs.js +1 -1
- package/dist/nile-side-bar-action/index.cjs.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
- package/dist/nile-side-bar-action/portal-manager.cjs.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
- package/dist/nile-virtual-select/portal-manager.cjs.js +1 -1
- package/dist/nile-virtual-select/renderer.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/emoji.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/emoji.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/emoji.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/commands.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/export.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/export.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/export.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/schema.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +780 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +97 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.esm.js +244 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.esm.js +137 -0
- package/dist/nile-wysiwyg-editor/types.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/types.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/types.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.esm.js +97 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +67 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +65 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +64 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.esm.js +68 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.esm.js +96 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.esm.js +112 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +64 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.esm.js +171 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.esm.js +90 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.esm.js +114 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.esm.js +80 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.esm.js +92 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.esm.js +147 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +79 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.esm.js +96 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.esm.js +67 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.esm.js +100 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +58 -0
- package/dist/src/index.d.ts +24 -0
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/glyph.d.ts +6 -0
- package/dist/src/internal/glyph.js +13 -0
- package/dist/src/internal/glyph.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/emoji.d.ts +5 -0
- package/dist/src/nile-wysiwyg-editor/emoji.js +138 -0
- package/dist/src/nile-wysiwyg-editor/emoji.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.d.ts +69 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.js +863 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.d.ts +35 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js +67 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.d.ts +38 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.js +208 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.js +96 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.d.ts +37 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.js +29 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.d.ts +12 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js +144 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.d.ts +15 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.js +94 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.d.ts +22 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.js +287 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.js +106 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.js +162 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.d.ts +13 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.js +182 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.js +165 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.d.ts +17 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js +69 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.d.ts +17 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js +96 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.d.ts +26 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.js +123 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.d.ts +28 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.js +72 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.d.ts +41 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js +176 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.d.ts +15 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.js +64 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.d.ts +11 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js +42 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js +46 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.d.ts +7 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.js +26 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js +55 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.d.ts +7 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.js +25 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.js +48 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.d.ts +29 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.js +87 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.d.ts +8 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js +11 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.d.ts +16 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.js +49 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js +883 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.js +129 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.d.ts +13 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js +155 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.js +823 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.d.ts +70 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js +138 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js +63 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/index.d.ts +3 -0
- package/dist/src/nile-wysiwyg-editor/index.js +3 -0
- package/dist/src/nile-wysiwyg-editor/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +782 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +364 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +2038 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +636 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js +2 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.d.ts +6 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js +251 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.d.ts +41 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js +700 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/types.d.ts +49 -0
- package/dist/src/nile-wysiwyg-editor/types.js +8 -0
- package/dist/src/nile-wysiwyg-editor/types.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js +159 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.d.ts +21 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js +125 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.js +107 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.d.ts +19 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js +123 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.d.ts +27 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js +146 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.d.ts +21 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js +154 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.d.ts +26 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js +178 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js +129 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.d.ts +56 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js +349 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.d.ts +25 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js +142 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.d.ts +30 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js +189 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.d.ts +24 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js +144 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js +172 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.d.ts +30 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js +296 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.d.ts +19 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js +120 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js +199 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js +133 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.d.ts +23 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js +177 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.d.ts +16 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js +101 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js.map +1 -0
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -2
- package/src/index.ts +57 -1
- package/src/internal/glyph.ts +13 -0
- package/src/nile-wysiwyg-editor/emoji.ts +137 -0
- package/src/nile-wysiwyg-editor/engine/commands.ts +1035 -0
- package/src/nile-wysiwyg-editor/engine/create-state.ts +117 -0
- package/src/nile-wysiwyg-editor/engine/export.test.ts +113 -0
- package/src/nile-wysiwyg-editor/engine/export.ts +242 -0
- package/src/nile-wysiwyg-editor/engine/index.ts +69 -0
- package/src/nile-wysiwyg-editor/engine/inputrules.ts +169 -0
- package/src/nile-wysiwyg-editor/engine/keymap.ts +146 -0
- package/src/nile-wysiwyg-editor/engine/markdown-parse.test.ts +148 -0
- package/src/nile-wysiwyg-editor/engine/markdown-parse.ts +337 -0
- package/src/nile-wysiwyg-editor/engine/markdown.ts +165 -0
- package/src/nile-wysiwyg-editor/engine/office-paste.ts +199 -0
- package/src/nile-wysiwyg-editor/engine/plugins/code-highlight.ts +173 -0
- package/src/nile-wysiwyg-editor/engine/plugins/embed-view.ts +85 -0
- package/src/nile-wysiwyg-editor/engine/plugins/embeds.ts +99 -0
- package/src/nile-wysiwyg-editor/engine/plugins/find-replace.ts +155 -0
- package/src/nile-wysiwyg-editor/engine/plugins/format-painter.ts +80 -0
- package/src/nile-wysiwyg-editor/engine/plugins/image-view.ts +220 -0
- package/src/nile-wysiwyg-editor/engine/plugins/image.ts +80 -0
- package/src/nile-wysiwyg-editor/engine/plugins/link.ts +42 -0
- package/src/nile-wysiwyg-editor/engine/plugins/math-view.ts +56 -0
- package/src/nile-wysiwyg-editor/engine/plugins/max-length.ts +24 -0
- package/src/nile-wysiwyg-editor/engine/plugins/paste.ts +74 -0
- package/src/nile-wysiwyg-editor/engine/plugins/placeholder.ts +24 -0
- package/src/nile-wysiwyg-editor/engine/plugins/single-line.ts +47 -0
- package/src/nile-wysiwyg-editor/engine/plugins/suggestions.ts +110 -0
- package/src/nile-wysiwyg-editor/engine/plugins/tables.ts +12 -0
- package/src/nile-wysiwyg-editor/engine/plugins/task-list.ts +65 -0
- package/src/nile-wysiwyg-editor/engine/pm.test.ts +1088 -0
- package/src/nile-wysiwyg-editor/engine/productivity.test.ts +163 -0
- package/src/nile-wysiwyg-editor/engine/sanitize.ts +156 -0
- package/src/nile-wysiwyg-editor/engine/schema.ts +859 -0
- package/src/nile-wysiwyg-editor/engine/selection-state.ts +210 -0
- package/src/nile-wysiwyg-editor/engine/serializer.ts +78 -0
- package/src/nile-wysiwyg-editor/index.ts +3 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +782 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +750 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +2155 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.ts +1 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +251 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.ts +772 -0
- package/src/nile-wysiwyg-editor/types.ts +83 -0
- package/src/nile-wysiwyg-editor/ui/bookmark-panel.ts +155 -0
- package/src/nile-wysiwyg-editor/ui/bubble-menu.ts +135 -0
- package/src/nile-wysiwyg-editor/ui/code-block-menu.ts +105 -0
- package/src/nile-wysiwyg-editor/ui/embed-menu.ts +133 -0
- package/src/nile-wysiwyg-editor/ui/embed-panel.ts +143 -0
- package/src/nile-wysiwyg-editor/ui/emoji-picker.ts +152 -0
- package/src/nile-wysiwyg-editor/ui/find-replace.ts +174 -0
- package/src/nile-wysiwyg-editor/ui/image-menu.ts +140 -0
- package/src/nile-wysiwyg-editor/ui/image-panel.ts +337 -0
- package/src/nile-wysiwyg-editor/ui/insert-menu.ts +142 -0
- package/src/nile-wysiwyg-editor/ui/link-editor.ts +180 -0
- package/src/nile-wysiwyg-editor/ui/markdown-panel.ts +143 -0
- package/src/nile-wysiwyg-editor/ui/math-panel.ts +169 -0
- package/src/nile-wysiwyg-editor/ui/shortcut-help.ts +311 -0
- package/src/nile-wysiwyg-editor/ui/source-view.ts +119 -0
- package/src/nile-wysiwyg-editor/ui/special-chars.ts +209 -0
- package/src/nile-wysiwyg-editor/ui/suggest-list.ts +138 -0
- package/src/nile-wysiwyg-editor/ui/table-grid-picker.ts +173 -0
- package/src/nile-wysiwyg-editor/ui/table-menu.ts +109 -0
- package/vscode-html-custom-data.json +450 -0
- package/web-dev-server.config.mjs +6 -2
- package/dist/index-5fef1a0d.esm.js +0 -1
- package/dist/index-8f38fae3.cjs.js +0 -2
- package/dist/index-8f38fae3.cjs.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){this.content=t}function e(t,r,s){for(let h=0;;h++){if(h==t.childCount||h==r.childCount)return t.childCount==r.childCount?null:s;let l=t.child(h),o=r.child(h);if(l!=o){if(!l.sameMarkup(o))return s;if(l.isText&&l.text!=o.text){let t=l.text,e=o.text,r=0;for(;t[r]==e[r];r++)s++;return r&&r<t.length&&r<e.length&&n(t.charCodeAt(r-1))&&i(t.charCodeAt(r))&&s--,s}if(l.content.size||o.content.size){let t=e(l.content,o.content,s+1);if(null!=t)return t}s+=l.nodeSize}else s+=l.nodeSize}}function r(t,e,s,h){for(let l=t.childCount,o=e.childCount;;){if(0==l||0==o)return l==o?null:{a:s,b:h};let u=t.child(--l),f=e.child(--o),a=u.nodeSize;if(u!=f){if(!u.sameMarkup(f))return{a:s,b:h};if(u.isText&&u.text!=f.text){let t=u.text,e=f.text,r=t.length,l=e.length;for(;r>0&&l>0&&t[r-1]==e[l-1];)r--,l--,s--,h--;return r&&l&&r<t.length&&n(t.charCodeAt(r-1))&&i(t.charCodeAt(r))&&(s++,h++),{a:s,b:h}}if(u.content.size||f.content.size){let t=r(u.content,f.content,s-1,h-1);if(t)return t}s-=a,h-=a}else s-=a,h-=a}}function i(t){return t>=56320&&t<57344}function n(t){return t>=55296&&t<56320}t.prototype={constructor:t,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(e,r,i){var n=i&&i!=e?this.remove(i):this,s=n.find(e),h=n.content.slice();return-1==s?h.push(i||e,r):(h[s+1]=r,i&&(h[s]=i)),new t(h)},remove:function(e){var r=this.find(e);if(-1==r)return this;var i=this.content.slice();return i.splice(r,2),new t(i)},addToStart:function(e,r){return new t([e,r].concat(this.remove(e).content))},addToEnd:function(e,r){var i=this.remove(e).content.slice();return i.push(e,r),new t(i)},addBefore:function(e,r,i){var n=this.remove(r),s=n.content.slice(),h=n.find(e);return s.splice(-1==h?s.length:h,0,r,i),new t(s)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(e){return(e=t.from(e)).size?new t(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=t.from(e)).size?new t(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var r=this;e=t.from(e);for(var i=0;i<e.content.length;i+=2)r=r.remove(e.content[i]);return r},toObject:function(){var t={};return this.forEach((function(e,r){t[e]=r})),t},get size(){return this.content.length>>1}},t.from=function(e){if(e instanceof t)return e;var r=[];if(e)for(var i in e)r.push(i,e[i]);return new t(r)};class s{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,r,i=0,n){for(let s=0,h=0;h<e;s++){let l=this.content[s],o=h+l.nodeSize;if(o>t&&!1!==r(l,i+h,n||null,s)&&l.content.size){let n=h+1;l.nodesBetween(Math.max(0,t-n),Math.min(l.content.size,e-n),r,i+n)}h=o}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,r,i){let n="",s=!0;return this.nodesBetween(t,e,((h,l)=>{let o=h.isText?h.text.slice(Math.max(t,l)-l,e-l):h.isLeaf?i?"function"==typeof i?i(h):i:h.type.spec.leafText?h.type.spec.leafText(h):"":"";h.isBlock&&(h.isLeaf&&o||h.isTextblock)&&r&&(s?s=!1:n+=r),n+=o}),0),n}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,r=t.firstChild,i=this.content.slice(),n=0;for(e.isText&&e.sameMarkup(r)&&(i[i.length-1]=e.withText(e.text+r.text),n=1);n<t.content.length;n++)i.push(t.content[n]);return new s(i,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let r=[],i=0;if(e>t)for(let n=0,s=0;s<e;n++){let h=this.content[n],l=s+h.nodeSize;l>t&&((s<t||l>e)&&(h=h.isText?h.cut(Math.max(0,t-s),Math.min(h.text.length,e-s)):h.cut(Math.max(0,t-s-1),Math.min(h.content.size,e-s-1))),r.push(h),i+=h.nodeSize),s=l}return new s(r,i)}cutByIndex(t,e){return t==e?s.empty:0==t&&e==this.content.length?this:new s(this.content.slice(t,e))}replaceChild(t,e){let r=this.content[t];if(r==e)return this;let i=this.content.slice(),n=this.size+e.nodeSize-r.nodeSize;return i[t]=e,new s(i,n)}addToStart(t){return new s([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new s(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,r=0;e<this.content.length;e++){let i=this.content[e];t(i,r,e),r+=i.nodeSize}}findDiffStart(t,r=0){return e(this,t,r)}findDiffEnd(t,e=this.size,i=t.size){return r(this,t,e,i)}findIndex(t){if(0==t)return l(0,t);if(t==this.size)return l(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let e=0,r=0;;e++){let i=r+this.child(e).nodeSize;if(i>=t)return i==t?l(e+1,i):l(e,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return s.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return s.fromArray(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return s.empty;let e,r=0;for(let i=0;i<t.length;i++){let n=t[i];r+=n.nodeSize,i&&n.isText&&t[i-1].sameMarkup(n)?(e||(e=t.slice(0,i)),e[e.length-1]=n.withText(e[e.length-1].text+n.text)):e&&e.push(n)}return new s(e||t,r)}static from(t){if(!t)return s.empty;if(t instanceof s)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new s([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}s.empty=new s([],0);const h={index:0,offset:0};function l(t,e){return h.index=t,h.offset=e,h}function o(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!o(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!o(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}class u{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,r=!1;for(let i=0;i<t.length;i++){let n=t[i];if(this.eq(n))return t;if(this.type.excludes(n.type))e||(e=t.slice(0,i));else{if(n.type.excludes(this.type))return t;!r&&n.type.rank>this.type.rank&&(e||(e=t.slice(0,i)),e.push(this),r=!0),e&&e.push(n)}}return e||(e=t.slice()),r||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&o(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[e.type];if(!r)throw new RangeError(`There is no mark type ${e.type} in this schema`);let i=r.create(e.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(e[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return u.none;if(t instanceof u)return[t];let e=t.slice();return e.sort(((t,e)=>t.type.rank-e.type.rank)),e}}u.none=[];class f extends Error{}class a{constructor(t,e,r){this.content=t,this.openStart=e,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let r=p(this.content,t+this.openStart,e,this.openStart+1,this.openEnd+1);return r&&new a(r,this.openStart,this.openEnd)}removeBetween(t,e){return new a(c(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return a.empty;let r=e.openStart||0,i=e.openEnd||0;if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new a(s.fromJSON(t,e.content),r,i)}static maxOpen(t,e=!0){let r=0,i=0;for(let i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)r++;for(let r=t.lastChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.lastChild)i++;return new a(t,r,i)}}function c(t,e,r){let{index:i,offset:n}=t.findIndex(e),s=t.maybeChild(i),{index:h,offset:l}=t.findIndex(r);if(n==e||s.isText){if(l!=r&&!t.child(h).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(i!=h)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(c(s.content,e-n-1,r-n-1)))}function p(t,e,r,i,n,s){let{index:h,offset:l}=t.findIndex(e),o=t.maybeChild(h);if(l==e||o.isText)return s&&i<=0&&n<=0&&!s.canReplace(h,h,r)?null:t.cut(0,e).append(r).append(t.cut(e));let u=p(o.content,e-l-1,r,0==h?i-1:0,h==t.childCount-1?n-1:0,o);return u&&t.replaceChild(h,o.copy(u))}function d(t,e,r){if(r.openStart>t.depth)throw new f("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new f("Inconsistent open depths");return w(t,e,r,0)}function w(t,e,r,i){let n=t.index(i),h=t.node(i);if(n==e.index(i)&&i<t.depth-r.openStart){let s=w(t,e,r,i+1);return h.copy(h.content.replaceChild(n,s))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=i||e.depth!=i){let{start:n,end:l}=function(t,e){let r=e.depth-t.openStart,i=e.node(r).copy(t.content);for(let t=r-1;t>=0;t--)i=e.node(t).copy(s.from(i));return{start:i.resolveNoCache(t.openStart+r),end:i.resolveNoCache(i.content.size-t.openEnd-r)}}(r,t);return b(h,v(t,n,l,e,i))}{let i=t.parent,n=i.content;return b(i,n.cut(0,t.parentOffset).append(r.content).append(n.cut(e.parentOffset)))}}return b(h,k(t,e,i))}function g(t,e){if(!e.type.compatibleContent(t.type))throw new f("Cannot join "+e.type.name+" onto "+t.type.name)}function m(t,e,r){let i=t.node(r);return g(i,e.node(r)),i}function y(t,e){let r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function S(t,e,r,i){let n=(e||t).node(r),s=0,h=e?e.index(r):n.childCount;t&&(s=t.index(r),t.depth>r?s++:t.textOffset&&(y(t.nodeAfter,i),s++));for(let t=s;t<h;t++)y(n.child(t),i);e&&e.depth==r&&e.textOffset&&y(e.nodeBefore,i)}function b(t,e){if(!t.type.validContent(e))throw new f("Invalid content for node "+t.type.name);return t.copy(e)}function v(t,e,r,i,n){let h=t.depth>n&&m(t,e,n+1),l=i.depth>n&&m(r,i,n+1),o=[];return S(null,t,n,o),h&&l&&e.index(n)==r.index(n)?(g(h,l),y(b(h,v(t,e,r,i,n+1)),o)):(h&&y(b(h,k(t,e,n+1)),o),S(e,r,n,o),l&&y(b(l,k(r,i,n+1)),o)),S(i,null,n,o),new s(o)}function k(t,e,r){let i=[];if(S(null,t,r,i),t.depth>r){y(b(m(t,e,r+1),k(t,e,r+1)),i)}return S(e,null,r,i),new s(i)}a.empty=new a(s.empty,0,0);class x{constructor(t,e,r){this.pos=t,this.path=e,this.parentOffset=r,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(e);return r?t.child(e).cut(r):i}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let r=this.path[3*e],i=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)i+=r.child(e).nodeSize;return i}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return u.none;if(this.textOffset)return t.child(e).marks;let r=t.maybeChild(e-1),i=t.maybeChild(e);if(!r){let t=r;r=i,i=t}let n=r.marks;for(var s=0;s<n.length;s++)!1!==n[s].type.spec.inclusive||i&&n[s].isInSet(i.marks)||(n=n[s--].removeFromSet(n));return n}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let r=e.marks,i=t.parent.maybeChild(t.index());for(var n=0;n<r.length;n++)!1!==r[n].type.spec.inclusive||i&&r[n].isInSet(i.marks)||(r=r[n--].removeFromSet(r));return r}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!e||e(this.node(r))))return new R(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let r=[],i=0,n=e;for(let e=t;;){let{index:t,offset:s}=e.content.findIndex(n),h=n-s;if(r.push(e,t,i+s),!h)break;if(e=e.child(t),e.isText)break;n=h-1,i+=s+1}return new x(e,r,n)}static resolveCached(t,e){let r=O.get(t);if(r)for(let t=0;t<r.elts.length;t++){let i=r.elts[t];if(i.pos==e)return i}else O.set(t,r=new E);let i=r.elts[r.i]=x.resolve(t,e);return r.i=(r.i+1)%N,i}}class E{constructor(){this.elts=[],this.i=0}}const N=12,O=new WeakMap;class R{constructor(t,e,r){this.$from=t,this.$to=e,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const M=Object.create(null);class J{constructor(t,e,r,i=u.none){this.type=t,this.attrs=e,this.marks=i,this.content=r||s.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,r,i=0){this.content.nodesBetween(t,e,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,r,i){return this.content.textBetween(t,e,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,r){return this.type==t&&o(this.attrs,e||t.defaultAttrs||M)&&u.sameSet(this.marks,r||u.none)}copy(t=null){return t==this.content?this:new J(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new J(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,r=!1){if(t==e)return a.empty;let i=this.resolve(t),n=this.resolve(e),s=r?0:i.sharedDepth(e),h=i.start(s),l=i.node(s).content.cut(i.pos-h,n.pos-h);return new a(l,i.depth-s,n.depth-s)}replace(t,e,r){return d(this.resolve(t),this.resolve(e),r)}nodeAt(t){for(let e=this;;){let{index:r,offset:i}=e.content.findIndex(t);if(e=e.maybeChild(r),!e)return null;if(i==t||e.isText)return e;t-=i+1}}childAfter(t){let{index:e,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:r}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(e),index:e,offset:r};let i=this.content.child(e-1);return{node:i,index:e-1,offset:r-i.nodeSize}}resolve(t){return x.resolveCached(this,t)}resolveNoCache(t){return x.resolve(this,t)}rangeHasMark(t,e,r){let i=!1;return e>t&&this.nodesBetween(t,e,(t=>(r.isInSet(t.marks)&&(i=!0),!i))),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),T(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,r=s.empty,i=0,n=r.childCount){let h=this.contentMatchAt(t).matchFragment(r,i,n),l=h&&h.matchFragment(this.content,e);if(!l||!l.validEnd)return!1;for(let t=i;t<n;t++)if(!this.type.allowsMarks(r.child(t).marks))return!1;return!0}canReplaceWith(t,e,r,i){if(i&&!this.type.allowsMarks(i))return!1;let n=this.contentMatchAt(t).matchType(r),s=n&&n.matchFragment(this.content,e);return!!s&&s.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=u.none;for(let e=0;e<this.marks.length;e++){let r=this.marks[e];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!u.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t=>t.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let r;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,r)}let i=s.fromJSON(t,e.content),n=t.nodeType(e.type).create(e.attrs,i,r);return n.type.checkAttrs(n.attrs),n}}J.prototype.text=void 0;class I extends J{constructor(t,e,r,i){if(super(t,e,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):T(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new I(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new I(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function T(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class A{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let r=new j(t,e);if(null==r.next)return A.empty;let i=C(r);r.next&&r.err("Unexpected trailing text");let n=function(t){let e=Object.create(null);return r(W(t,0));function r(i){let n=[];i.forEach((e=>{t[e].forEach((({term:e,to:r})=>{if(!e)return;let i;for(let t=0;t<n.length;t++)n[t][0]==e&&(i=n[t][1]);W(t,r).forEach((t=>{i||n.push([e,i=[]]),-1==i.indexOf(t)&&i.push(t)}))}))}));let s=e[i.join(",")]=new A(i.indexOf(t.length-1)>-1);for(let t=0;t<n.length;t++){let i=n[t][1].sort(q);s.next.push({type:n[t][0],next:e[i.join(",")]||r(i)})}return s}}(function(t){let e=[[]];return n(s(t,0),r()),e;function r(){return e.push([])-1}function i(t,r,i){let n={term:i,to:r};return e[t].push(n),n}function n(t,e){t.forEach((t=>t.to=e))}function s(t,e){if("choice"==t.type)return t.exprs.reduce(((t,r)=>t.concat(s(r,e))),[]);if("seq"!=t.type){if("star"==t.type){let h=r();return i(e,h),n(s(t.expr,h),h),[i(h)]}if("plus"==t.type){let h=r();return n(s(t.expr,e),h),n(s(t.expr,h),h),[i(h)]}if("opt"==t.type)return[i(e)].concat(s(t.expr,e));if("range"==t.type){let h=e;for(let e=0;e<t.min;e++){let e=r();n(s(t.expr,h),e),h=e}if(-1==t.max)n(s(t.expr,h),h);else for(let e=t.min;e<t.max;e++){let e=r();i(h,e),n(s(t.expr,h),e),h=e}return[i(h)]}if("name"==t.type)return[i(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let i=0;;i++){let h=s(t.exprs[i],e);if(i==t.exprs.length-1)return h;n(h,e=r())}}}(i));return function(t,e){for(let r=0,i=[t];r<i.length;r++){let t=i[r],n=!t.validEnd,s=[];for(let e=0;e<t.next.length;e++){let{type:r,next:h}=t.next[e];s.push(r.name),!n||r.isText||r.hasRequiredAttrs()||(n=!1),-1==i.indexOf(h)&&i.push(h)}n&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(n,r),n}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,r=t.childCount){let i=this;for(let n=e;i&&n<r;n++)i=i.matchType(t.child(n).type);return i}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let r=0;r<t.next.length;r++)if(this.next[e].type==t.next[r].type)return!0;return!1}fillBefore(t,e=!1,r=0){let i=[this];return function n(h,l){let o=h.matchFragment(t,r);if(o&&(!e||o.validEnd))return s.from(l.map((t=>t.createAndFill())));for(let t=0;t<h.next.length;t++){let{type:e,next:r}=h.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==i.indexOf(r)){i.push(r);let t=n(r,l.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),n=i.match;if(n.matchType(t)){let t=[];for(let e=i;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<n.next.length;t++){let{type:s,next:h}=n.next[t];s.isLeaf||s.hasRequiredAttrs()||s.name in e||i.type&&!h.validEnd||(r.push({match:s.contentMatch,type:s,via:i}),e[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(r){t.push(r);for(let i=0;i<r.next.length;i++)-1==t.indexOf(r.next[i].next)&&e(r.next[i].next)}(this),t.map(((e,r)=>{let i=r+(e.validEnd?"*":" ")+" ";for(let r=0;r<e.next.length;r++)i+=(r?", ":"")+e.next[r].type.name+"->"+t.indexOf(e.next[r].next);return i})).join("\n")}}A.empty=new A(!0);class j{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function C(t){let e=[];do{e.push($(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function $(t){let e=[];do{e.push(D(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function D(t){let e=function(t){if(t.eat("(")){let e=C(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let r=t.nodeTypes,i=r[e];if(i)return[i];let n=[];for(let t in r){let i=r[t];i.isInGroup(e)&&n.push(i)}0==n.length&&t.err("No node type or group '"+e+"' found");return n}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=F(t,e)}return e}function B(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function F(t,e){let r=B(t),i=r;return t.eat(",")&&(i="}"!=t.next?B(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:i,expr:e}}function q(t,e){return e-t}function W(t,e){let r=[];return function e(i){let n=t[i];if(1==n.length&&!n[0].term)return e(n[0].to);r.push(i);for(let t=0;t<n.length;t++){let{term:i,to:s}=n[t];i||-1!=r.indexOf(s)||e(s)}}(e),r.sort(q)}function z(t){let e=Object.create(null);for(let r in t){let i=t[r];if(!i.hasDefault)return null;e[r]=i.default}return e}function P(t,e){let r=Object.create(null);for(let i in t){let n=e&&e[i];if(void 0===n){let e=t[i];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+i);n=e.default}r[i]=n}return r}function U(t,e,r,i){for(let n in e)if(!(n in t))throw new RangeError(`Unsupported attribute ${n} for ${r} of type ${i}`);for(let r in t)t[r].validate&&t[r].validate(e[r])}function _(t,e){let r=Object.create(null);if(e)for(let i in e)r[i]=new G(t,i,e[i]);return r}class L{constructor(t,e,r){this.name=t,this.schema=e,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=_(t,r.attrs),this.defaultAttrs=z(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==A.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:P(this.attrs,t)}create(t=null,e,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new J(this,this.computeAttrs(t),s.from(e),u.setFrom(r))}createChecked(t=null,e,r){return e=s.from(e),this.checkContent(e),new J(this,this.computeAttrs(t),e,u.setFrom(r))}createAndFill(t=null,e,r){if(t=this.computeAttrs(t),(e=s.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let i=this.contentMatch.matchFragment(e),n=i&&i.fillBefore(s.empty,!0);return n?new J(this,t,e.append(n),u.setFrom(r)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){U(this.attrs,t,"node",this.name)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?e&&e.push(t[r]):e||(e=t.slice(0,r));return e?e.length?e:u.none:t}static compile(t,e){let r=Object.create(null);t.forEach(((t,i)=>r[t]=new L(t,e,i)));let i=e.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let t in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}class G{constructor(t,e,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate="string"==typeof r.validate?function(t,e,r){let i=r.split("|");return r=>{let n=null===r?"null":typeof r;if(i.indexOf(n)<0)throw new RangeError(`Expected value of type ${i} for attribute ${e} on type ${t}, got ${n}`)}}(t,e,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class V{constructor(t,e,r,i){this.name=t,this.rank=e,this.schema=r,this.spec=i,this.attrs=_(t,i.attrs),this.excluded=null;let n=z(this.attrs);this.instance=n?new u(this,n):null}create(t=null){return!t&&this.instance?this.instance:new u(this,P(this.attrs,t))}static compile(t,e){let r=Object.create(null),i=0;return t.forEach(((t,n)=>r[t]=new V(t,i++,e,n))),r}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}checkAttrs(t){U(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class H{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let t in e)r[t]=e[t];r.nodes=t.from(e.nodes),r.marks=t.from(e.marks||{}),this.nodes=L.compile(this.spec.nodes,this),this.marks=V.compile(this.spec.marks,this);let i=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",n=e.spec.marks;if(e.contentMatch=i[r]||(i[r]=A.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==n?null:n?K(this,n.split(" ")):""!=n&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],r=e.spec.excludes;e.excluded=null==r?[e]:""==r?[]:K(this,r.split(" "))}this.nodeFromJSON=t=>J.fromJSON(this,t),this.markFromJSON=t=>u.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,r,i){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof L))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,r,i)}text(t,e){let r=this.nodes.text;return new I(r,r.defaultAttrs,t,u.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function K(t,e){let r=[];for(let i=0;i<e.length;i++){let n=e[i],s=t.marks[n],h=s;if(s)r.push(s);else for(let e in t.marks){let i=t.marks[e];("_"==n||i.spec.group&&i.spec.group.split(" ").indexOf(n)>-1)&&r.push(h=i)}if(!h)throw new SyntaxError("Unknown mark type: '"+e[i]+"'")}return r}class Q{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let r=this.matchedStyles=[];e.forEach((t=>{if(function(t){return null!=t.tag}(t))this.tags.push(t);else if(function(t){return null!=t.style}(t)){let e=/[^=]*/.exec(t.style)[0];r.indexOf(e)<0&&r.push(e),this.styles.push(t)}})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let r=t.nodes[e.node];return r.contentMatch.matchType(r)}))}parse(t,e={}){let r=new rt(this,e,!1);return r.addAll(t,u.none,e.from,e.to),r.finish()}parseSlice(t,e={}){let r=new rt(this,e,!0);return r.addAll(t,u.none,e.from,e.to),a.maxOpen(r.finish())}matchTag(t,e,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let r=this.tags[i];if(it(t,r.tag)&&(void 0===r.namespace||t.namespaceURI==r.namespace)&&(!r.context||e.matchesContext(r.context))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}matchStyle(t,e,r,i){for(let n=i?this.styles.indexOf(i)+1:0;n<this.styles.length;n++){let i=this.styles[n],s=i.style;if(!(0!=s.indexOf(t)||i.context&&!r.matchesContext(i.context)||s.length>t.length&&(61!=s.charCodeAt(t.length)||s.slice(t.length+1)!=e))){if(i.getAttrs){let t=i.getAttrs(e);if(!1===t)continue;i.attrs=t||void 0}return i}}}static schemaRules(t){let e=[];function r(t){let r=null==t.priority?50:t.priority,i=0;for(;i<e.length;i++){let t=e[i];if((null==t.priority?50:t.priority)<r)break}e.splice(i,0,t)}for(let e in t.marks){let i=t.marks[e].spec.parseDOM;i&&i.forEach((t=>{r(t=nt(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)}))}for(let e in t.nodes){let i=t.nodes[e].spec.parseDOM;i&&i.forEach((t=>{r(t=nt(t)),t.node||t.ignore||t.mark||(t.node=e)}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Q(t,Q.schemaRules(t)))}}const X={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Y={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Z={ol:!0,ul:!0};function tt(t,e,r){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&r}class et{constructor(t,e,r,i,n,s){this.type=t,this.attrs=e,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=u.none,this.match=n||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(s.from(t));if(!e){let e,r=this.type.contentMatch;return(e=r.findWrapping(t.type))?(this.match=r,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let r=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-t[0].length))}}let e=s.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(s.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!X.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class rt{constructor(t,e,r){this.parser=t,this.options=e,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i,n=e.topNode,s=tt(null,e.preserveWhitespace,0)|(r?4:0);i=n?new et(n.type,n.attrs,u.none,!0,e.topMatch||n.type.contentMatch,s):new et(r?null:t.schema.topNodeType,null,u.none,!0,null,s),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let r=t.nodeValue,i=this.top,n=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:s}=this.parser;if("full"===n||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(n)if("full"===n)r=r.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let t=r.split(/\r?\n|\r/);for(let r=0;r<t.length;r++)r&&this.insertNode(s.linebreakReplacement.create(),e,!0),t[r]&&this.insertNode(s.text(t[r]),e,!/\S/.test(t[r]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let e=i.content[i.content.length-1],n=t.previousSibling;(!e||n&&"BR"==n.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),e,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,e,r){let i=this.localPreserveWS,n=this.top;("PRE"==t.tagName||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s,h=t.nodeName.toLowerCase();Z.hasOwnProperty(h)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,r=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&Z.hasOwnProperty(t)&&r?(r.appendChild(e),e=r):"li"==t?r=e:t&&(r=null)}}(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,r));t:if(l?l.ignore:Y.hasOwnProperty(h))this.findInside(t),this.ignoreFallback(t,e);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let r,i=this.needsBlock;if(X.hasOwnProperty(h))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),r=!0,n.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break t}let s=l&&l.skip?e:this.readStyles(t,e);s&&this.addAll(t,s),r&&this.sync(n),this.needsBlock=i}else{let r=this.readStyles(t,e);r&&this.addElementByRule(t,l,r,!1===l.consuming?s:void 0)}this.localPreserveWS=i}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e)}ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e,!0)}readStyles(t,e){let r=t.style;if(r&&r.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let i=this.parser.matchedStyles[t],n=r.getPropertyValue(i);if(n)for(let t;;){let r=this.parser.matchStyle(i,n,this,t);if(!r)break;if(r.ignore)return null;if(e=r.clearMark?e.filter((t=>!r.clearMark(t))):e.concat(this.parser.schema.marks[r.mark].create(r.attrs)),!1!==r.consuming)break;t=r}}return e}addElementByRule(t,e,r,i){let n,s;if(e.node)if(s=this.parser.schema.nodes[e.node],s.isLeaf)this.insertNode(s.create(e.attrs),r,"BR"==t.nodeName)||this.leafFallback(t,r);else{let t=this.enter(s,e.attrs||null,r,e.preserveWhitespace);t&&(n=!0,r=t)}else{let t=this.parser.schema.marks[e.mark];r=r.concat(t.create(e.attrs))}let h=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t,r,!1)));else{let i=t;"string"==typeof e.contentElement?i=t.querySelector(e.contentElement):"function"==typeof e.contentElement?i=e.contentElement(t):e.contentElement&&(i=e.contentElement),this.findAround(t,i,!0),this.addAll(i,r),this.findAround(t,i,!1)}n&&this.sync(h)&&this.open--}addAll(t,e,r,i){let n=r||0;for(let s=r?t.childNodes[r]:t.firstChild,h=null==i?null:t.childNodes[i];s!=h;s=s.nextSibling,++n)this.findAtPoint(t,n),this.addDOM(s,e);this.findAtPoint(t,n)}findPlace(t,e,r){let i,n;for(let e=this.open,s=0;e>=0;e--){let h=this.nodes[e],l=h.findWrapping(t);if(l&&(!i||i.length>l.length+s)&&(i=l,n=h,!l.length))break;if(h.solid){if(r)break;s+=2}}if(!i)return null;this.sync(n);for(let t=0;t<i.length;t++)e=this.enterInner(i[t],null,e,!1);return e}insertNode(t,e,r){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let i=this.findPlace(t,e,r);if(i){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let r=u.none;for(let n of i.concat(t.marks))(e.type?e.type.allowsMarkType(n.type):st(n.type,t.type))&&(r=n.addToSet(r));return e.content.push(t.mark(r)),!0}return!1}enter(t,e,r,i){let n=this.findPlace(t.create(e),r,!1);return n&&(n=this.enterInner(t,e,r,!0,i)),n}enterInner(t,e,r,i=!1,n){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let h=tt(t,n,s.options);4&s.options&&0==s.content.length&&(h|=4);let l=u.none;return r=r.filter((e=>!(s.type?s.type.allowsMarkType(e.type):st(e.type,t))||(l=e.addToSet(l),!1))),this.nodes.push(new et(t,e,l,i,null,h)),this.open++,r}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(t){for(let e=this.open;e>=0;e--){if(this.nodes[e]==t)return this.open=e,!0;this.localPreserveWS&&(this.nodes[e].options|=1)}return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let r=this.nodes[e].content;for(let e=r.length-1;e>=0;e--)t+=r[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==e&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,r){if(t!=e&&this.find)for(let i=0;i<this.find.length;i++)if(null==this.find[i].pos&&1==t.nodeType&&t.contains(this.find[i].node)){e.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),n=-(r?r.depth+1:0)+(i?0:1),s=(t,h)=>{for(;t>=0;t--){let l=e[t];if(""==l){if(t==e.length-1||0==t)continue;for(;h>=n;h--)if(s(t-1,h))return!0;return!1}{let t=h>0||0==h&&i?this.nodes[h].type:r&&h>=n?r.node(h-n).type:null;if(!t||t.name!=l&&!t.isInGroup(l))return!1;h--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let r=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}}function it(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function nt(t){let e={};for(let r in t)e[r]=t[r];return e}function st(t,e){let r=e.schema.nodes;for(let i in r){let n=r[i];if(!n.allowsMarkType(t))continue;let s=[],h=t=>{s.push(t);for(let r=0;r<t.edgeCount;r++){let{type:i,next:n}=t.edge(r);if(i==e)return!0;if(s.indexOf(n)<0&&h(n))return!0}};if(h(n.contentMatch))return!0}}class ht{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},r){r||(r=ot(e).createDocumentFragment());let i=r,n=[];return t.forEach((t=>{if(n.length||t.marks.length){let r=0,s=0;for(;r<n.length&&s<t.marks.length;){let e=t.marks[s];if(this.marks[e.type.name]){if(!e.eq(n[r][0])||!1===e.type.spec.spanning)break;r++,s++}else s++}for(;r<n.length;)i=n.pop()[1];for(;s<t.marks.length;){let r=t.marks[s++],h=this.serializeMark(r,t.isInline,e);h&&(n.push([r,i]),i.appendChild(h.dom),i=h.contentDOM||h.dom)}}i.appendChild(this.serializeNodeInner(t,e))})),r}serializeNodeInner(t,e){if(t.isText)return ot(e).createTextNode(t.text);let{dom:r,contentDOM:i}=at(ot(e),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,i)}return r}serializeNode(t,e={}){let r=this.serializeNodeInner(t,e);for(let i=t.marks.length-1;i>=0;i--){let n=this.serializeMark(t.marks[i],t.isInline,e);n&&((n.contentDOM||n.dom).appendChild(r),r=n.dom)}return r}serializeMark(t,e,r={}){let i=this.marks[t.type.name];return i&&at(ot(r),i(t,e),null,t.attrs)}static renderSpec(t,e,r=null,i){return"string"==typeof e?{dom:t.createTextNode(e)}:at(t,e,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ht(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=lt(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return lt(t.marks)}}function lt(t){let e={};for(let r in t){let i=t[r].spec.toDOM;i&&(e[r]=i)}return e}function ot(t){return t.document||window.document}const ut=new WeakMap;function ft(t){let e=ut.get(t);return void 0===e&&ut.set(t,e=function(t){let e=null;function r(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])e||(e=[]),e.push(t);else for(let e=0;e<t.length;e++)r(t[e]);else for(let e in t)r(t[e])}return r(t),e}(t)),e}function at(t,e,r,i){if(1==e.nodeType)return{dom:e};if(e.dom&&1==e.dom.nodeType)return e;let n,s=e[0];if("string"!=typeof s)throw new RangeError("Invalid array passed to renderSpec");if(i&&(n=ft(i))&&n.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let h,l=s.indexOf(" ");l>0&&(r=s.slice(0,l),s=s.slice(l+1));let o=r?t.createElementNS(r,s):t.createElement(s),u=e[1],f=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u)){f=2;for(let t in u)if(null!=u[t]){let e=t.indexOf(" ");e>0?o.setAttributeNS(t.slice(0,e),t.slice(e+1),u[t]):"style"==t&&o.style?o.style.cssText=u[t]:o.setAttribute(t,u[t])}}for(let n=f;n<e.length;n++){let s=e[n];if(0===s){if(n<e.length-1||n>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:o,contentDOM:o}}if("string"==typeof s)o.appendChild(t.createTextNode(s));else{let{dom:e,contentDOM:n}=at(t,s,r,i);if(o.appendChild(e),n){if(h)throw new RangeError("Multiple content holes");h=n}}}return{dom:o,contentDOM:h}}const ct=Math.pow(2,16);function pt(t){return 65535&t}class dt{constructor(t,e,r){this.pos=t,this.delInfo=e,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class wt{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&wt.empty)return wt.empty}recover(t){let e=0,r=pt(t);if(!this.inverted)for(let t=0;t<r;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*r]+e+function(t){return(t-(65535&t))/ct}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,r){let i=0,n=this.inverted?2:1,s=this.inverted?1:2;for(let h=0;h<this.ranges.length;h+=3){let l=this.ranges[h]-(this.inverted?i:0);if(l>t)break;let o=this.ranges[h+n],u=this.ranges[h+s],f=l+o;if(t<=f){let n=l+i+((o?t==l?-1:t==f?1:e:e)<0?0:u);if(r)return n;let s=t==(e<0?l:f)?null:h/3+(t-l)*ct,a=t==l?2:t==f?1:4;return(e<0?t!=l:t!=f)&&(a|=8),new dt(n,a,s)}i+=u-o}return r?t+i:new dt(t+i,0,null)}touches(t,e){let r=0,i=pt(e),n=this.inverted?2:1,s=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let h=this.ranges[e]-(this.inverted?r:0);if(h>t)break;let l=this.ranges[e+n];if(t<=h+l&&e==3*i)return!0;r+=this.ranges[e+s]-l}return!1}forEach(t){let e=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,n=0;i<this.ranges.length;i+=3){let s=this.ranges[i],h=s-(this.inverted?n:0),l=s+(this.inverted?0:n),o=this.ranges[i+e],u=this.ranges[i+r];t(h,h+o,l,l+u),n+=u-o}}invert(){return new wt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?wt.empty:new wt(t<0?[0,-t,0]:[0,0,t])}}wt.empty=new wt([]);class gt{constructor(t,e,r=0,i=(t?t.length:0)){this.mirror=e,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||e)}get maps(){return this._maps}slice(t=0,e=this.maps.length){return new gt(this._maps,this.mirror,t,e)}appendMap(t,e){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),null!=e&&this.setMirror(this._maps.length-1,e)}appendMapping(t){for(let e=0,r=this._maps.length;e<t._maps.length;e++){let i=t.getMirror(e);this.appendMap(t._maps[e],null!=i&&i<e?r+i:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,r=this._maps.length+t._maps.length;e>=0;e--){let i=t.getMirror(e);this.appendMap(t._maps[e].invert(),null!=i&&i>e?r-i-1:void 0)}}invert(){let t=new gt;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,r){let i=0;for(let r=this.from;r<this.to;r++){let n=this._maps[r].mapResult(t,e);if(null!=n.recover){let e=this.getMirror(r);if(null!=e&&e>r&&e<this.to){r=e,t=this._maps[e].recover(n.recover);continue}}i|=n.delInfo,t=n.pos}return r?t:new dt(t,i,null)}}const mt=Object.create(null);class yt{getMap(){return wt.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=mt[e.stepType];if(!r)throw new RangeError(`No step type ${e.stepType} defined`);return r.fromJSON(t,e)}static jsonID(t,e){if(t in mt)throw new RangeError("Duplicate use of step JSON ID "+t);return mt[t]=e,e.prototype.jsonID=t,e}}class St{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new St(t,null)}static fail(t){return new St(null,t)}static fromReplace(t,e,r,i){try{return St.ok(t.replace(e,r,i))}catch(t){if(t instanceof f)return St.fail(t.message);throw t}}}function bt(t,e,r){let i=[];for(let n=0;n<t.childCount;n++){let s=t.child(n);s.content.size&&(s=s.copy(bt(s.content,e,s))),s.isInline&&(s=e(s,r,n)),i.push(s)}return s.fromArray(i)}class vt extends yt{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(t){let e=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),n=new a(bt(e.content,((t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),i),e.openStart,e.openEnd);return St.fromReplace(t,this.from,this.to,n)}invert(){return new kt(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new vt(e.pos,r.pos,this.mark)}merge(t){return t instanceof vt&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new vt(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new vt(e.from,e.to,t.markFromJSON(e.mark))}}yt.jsonID("addMark",vt);class kt extends yt{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(t){let e=t.slice(this.from,this.to),r=new a(bt(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return St.fromReplace(t,this.from,this.to,r)}invert(){return new vt(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new kt(e.pos,r.pos,this.mark)}merge(t){return t instanceof kt&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new kt(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new kt(e.from,e.to,t.markFromJSON(e.mark))}}yt.jsonID("removeMark",kt);class xt extends yt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return St.fail("No node at mark step's position");let r=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return St.fromReplace(t,this.pos,this.pos+1,new a(s.from(r),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let r=0;r<e.marks.length;r++)if(!e.marks[r].isInSet(t))return new xt(this.pos,e.marks[r]);return new xt(this.pos,this.mark)}}return new Et(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new xt(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new xt(e.pos,t.markFromJSON(e.mark))}}yt.jsonID("addNodeMark",xt);class Et extends yt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return St.fail("No node at mark step's position");let r=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return St.fromReplace(t,this.pos,this.pos+1,new a(s.from(r),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new xt(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Et(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Et(e.pos,t.markFromJSON(e.mark))}}yt.jsonID("removeNodeMark",Et);class Nt extends yt{constructor(t,e,r,i=!1){super(),this.from=t,this.to=e,this.slice=r,this.structure=i}apply(t){return this.structure&&Rt(t,this.from,this.to)?St.fail("Structure replace would overwrite content"):St.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new wt([this.from,this.to-this.from,this.slice.size])}invert(t){return new Nt(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.to,-1),r=this.from==this.to&&Nt.MAP_BIAS<0?e:t.mapResult(this.from,1);return r.deletedAcross&&e.deletedAcross?null:new Nt(r.pos,Math.max(r.pos,e.pos),this.slice,this.structure)}merge(t){if(!(t instanceof Nt)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?a.empty:new a(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Nt(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?a.empty:new a(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Nt(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Nt(e.from,e.to,a.fromJSON(t,e.slice),!!e.structure)}}Nt.MAP_BIAS=1,yt.jsonID("replace",Nt);class Ot extends yt{constructor(t,e,r,i,n,s,h=!1){super(),this.from=t,this.to=e,this.gapFrom=r,this.gapTo=i,this.slice=n,this.insert=s,this.structure=h}apply(t){if(this.structure&&(Rt(t,this.from,this.gapFrom)||Rt(t,this.gapTo,this.to)))return St.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return St.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,e.content);return r?St.fromReplace(t,this.from,this.to,r):St.fail("Content does not fit in gap")}getMap(){return new wt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new Ot(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),n=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return e.deletedAcross&&r.deletedAcross||i<e.pos||n>r.pos?null:new Ot(e.pos,r.pos,i,n,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ot(e.from,e.to,e.gapFrom,e.gapTo,a.fromJSON(t,e.slice),e.insert,!!e.structure)}}function Rt(t,e,r){let i=t.resolve(e),n=r-e,s=i.depth;for(;n>0&&s>0&&i.indexAfter(s)==i.node(s).childCount;)s--,n--;if(n>0){let t=i.node(s).maybeChild(i.indexAfter(s));for(;n>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,n--}}return!1}function Mt(t,e,r,i=r.contentMatch,n=!0){let h=t.doc.nodeAt(e),l=[],o=e+1;for(let e=0;e<h.childCount;e++){let u=h.child(e),f=o+u.nodeSize,c=i.matchType(u.type);if(c){i=c;for(let e=0;e<u.marks.length;e++)r.allowsMarkType(u.marks[e].type)||t.step(new kt(o,f,u.marks[e]));if(n&&u.isText&&"pre"!=r.whitespace){let t,e,i=/\r?\n|\r/g;for(;t=i.exec(u.text);)e||(e=new a(s.from(r.schema.text(" ",r.allowedMarks(u.marks))),0,0)),l.push(new Nt(o+t.index,o+t.index+t[0].length,e))}}else l.push(new Nt(o,f,a.empty));o=f}if(!i.validEnd){let e=i.fillBefore(s.empty,!0);t.replace(o,o,new a(e,0,0))}for(let e=l.length-1;e>=0;e--)t.step(l[e])}function Jt(t,e,r){return(0==e||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function It(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,n=0;;--r){let s=t.$from.node(r),h=t.$from.index(r)+i,l=t.$to.indexAfter(r)-n;if(r<t.depth&&s.canReplace(h,l,e))return r;if(0==r||s.type.spec.isolating||!Jt(s,h,l))break;h&&(i=1),l<s.childCount&&(n=1)}return null}function Tt(t,e,r=null,i=t){let n=function(t,e){let{parent:r,startIndex:i,endIndex:n}=t,s=r.contentMatchAt(i).findWrapping(e);if(!s)return null;let h=s.length?s[0]:e;return r.canReplaceWith(i,n,h)?s:null}(t,e),s=n&&function(t,e){let{parent:r,startIndex:i,endIndex:n}=t,s=r.child(i),h=e.contentMatch.findWrapping(s.type);if(!h)return null;let l=(h.length?h[h.length-1]:e).contentMatch;for(let t=i;l&&t<n;t++)l=l.matchType(r.child(t).type);return l&&l.validEnd?h:null}(i,e);return s?n.map(At).concat({type:e,attrs:r}).concat(s.map(At)):null}function At(t){return{type:t,attrs:null}}function jt(t,e,r,i){e.forEach(((n,s)=>{if(n.isText){let h,l=/\r?\n|\r/g;for(;h=l.exec(n.text);){let n=t.mapping.slice(i).map(r+1+s+h.index);t.replaceWith(n,n+1,e.type.schema.linebreakReplacement.create())}}}))}function Ct(t,e,r,i){e.forEach(((n,s)=>{if(n.type==n.type.schema.linebreakReplacement){let n=t.mapping.slice(i).map(r+1+s);t.replaceWith(n,n+1,e.type.schema.text("\n"))}}))}function $t(t,e,r=1,i){let n=t.resolve(e),s=n.depth-r,h=i&&i[i.length-1]||n.parent;if(s<0||n.parent.type.spec.isolating||!n.parent.canReplace(n.index(),n.parent.childCount)||!h.type.validContent(n.parent.content.cutByIndex(n.index(),n.parent.childCount)))return!1;for(let t=n.depth-1,e=r-2;t>s;t--,e--){let r=n.node(t),s=n.index(t);if(r.type.spec.isolating)return!1;let h=r.content.cutByIndex(s,r.childCount),l=i&&i[e+1];l&&(h=h.replaceChild(0,l.type.create(l.attrs)));let o=i&&i[e]||r;if(!r.canReplace(s+1,r.childCount)||!o.type.validContent(h))return!1}let l=n.indexAfter(s),o=i&&i[0];return n.node(s).canReplaceWith(l,l,o?o.type:n.node(s+1).type)}function Dt(t,e){let r=t.resolve(e),i=r.index();return n=r.nodeBefore,s=r.nodeAfter,!(!n||!s||n.isLeaf||!function(t,e){e.content.size||t.type.compatibleContent(e.type);let r=t.contentMatchAt(t.childCount),{linebreakReplacement:i}=t.type.schema;for(let n=0;n<e.childCount;n++){let s=e.child(n),h=s.type==i?t.type.schema.nodes.text:s.type;if(r=r.matchType(h),!r)return!1;if(!t.type.allowsMarks(s.marks))return!1}return r.validEnd}(n,s))&&r.parent.canReplace(i,i+1);var n,s}function Bt(t,e,r){let i=t.resolve(e);if(!r.content.size)return e;let n=r.content;for(let t=0;t<r.openStart;t++)n=n.firstChild.content;for(let t=1;t<=(0==r.openStart&&r.size?2:1);t++)for(let e=i.depth;e>=0;e--){let r=e==i.depth?0:i.pos<=(i.start(e+1)+i.end(e+1))/2?-1:1,s=i.index(e)+(r>0?1:0),h=i.node(e),l=!1;if(1==t)l=h.canReplace(s,s,n);else{let t=h.contentMatchAt(s).findWrapping(n.firstChild.type);l=t&&h.canReplaceWith(s,s,t[0])}if(l)return 0==r?i.pos:r<0?i.before(e+1):i.after(e+1)}return null}function Ft(t,e,r=e,i=a.empty){if(e==r&&!i.size)return null;let n=t.resolve(e),s=t.resolve(r);return qt(n,s,i)?new Nt(e,r,i):new Wt(n,s,i).fit()}function qt(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}yt.jsonID("replaceAround",Ot);class Wt{constructor(t,e,r){this.$from=t,this.$to=e,this.unplaced=r,this.frontier=[],this.placed=s.empty;for(let e=0;e<=t.depth;e++){let r=t.node(e);this.frontier.push({type:r.type,match:r.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=s.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let n=this.placed,s=r.depth,h=i.depth;for(;s&&h&&1==n.childCount;)n=n.firstChild.content,s--,h--;let l=new a(n,s,h);return t>-1?new Ot(r.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||r.pos!=this.$to.pos?new Nt(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let n=e.firstChild;if(e.childCount>1&&(i=0),n.type.spec.isolating&&i<=r){t=r;break}e=n.content}for(let e=1;e<=2;e++)for(let r=1==e?t:this.unplaced.openStart;r>=0;r--){let t,i=null;r?(i=Ut(this.unplaced.content,r-1).firstChild,t=i.content):t=this.unplaced.content;let n=t.firstChild;for(let t=this.depth;t>=0;t--){let h,{type:l,match:o}=this.frontier[t],u=null;if(1==e&&(n?o.matchType(n.type)||(u=o.fillBefore(s.from(n),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:t,parent:i,inject:u};if(2==e&&n&&(h=o.findWrapping(n.type)))return{sliceDepth:r,frontierDepth:t,parent:i,wrap:h};if(i&&o.matchType(i.type))break}}}openMore(){let{content:t,openStart:e,openEnd:r}=this.unplaced,i=Ut(t,e);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new a(t,e+1,Math.max(r,i.size+e>=t.size-r?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:r}=this.unplaced,i=Ut(t,e);if(i.childCount<=1&&e>0){let n=t.size-e<=e+i.size;this.unplaced=new a(zt(t,e-1,1),e-1,n?e-1:r)}else this.unplaced=new a(zt(t,e,1),e,r)}placeNodes({sliceDepth:t,frontierDepth:e,parent:r,inject:i,wrap:n}){for(;this.depth>e;)this.closeFrontierNode();if(n)for(let t=0;t<n.length;t++)this.openFrontierNode(n[t]);let h=this.unplaced,l=r?r.content:h.content,o=h.openStart-t,u=0,f=[],{match:c,type:p}=this.frontier[e];if(i){for(let t=0;t<i.childCount;t++)f.push(i.child(t));c=c.matchFragment(i)}let d=l.size+t-(h.content.size-h.openEnd);for(;u<l.childCount;){let t=l.child(u),e=c.matchType(t.type);if(!e)break;u++,(u>1||0==o||t.content.size)&&(c=e,f.push(_t(t.mark(p.allowedMarks(t.marks)),1==u?o:0,u==l.childCount?d:-1)))}let w=u==l.childCount;w||(d=-1),this.placed=Pt(this.placed,e,s.from(f)),this.frontier[e].match=c,w&&d<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=l;t<d;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=w?0==t?a.empty:new a(zt(h.content,t-1,1),t-1,d<0?h.openEnd:t-1):new a(zt(h.content,t,u),h.openStart,h.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!Lt(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:r,type:i}=this.frontier[e],n=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),s=Lt(t,e,i,r,n);if(s){for(let r=e-1;r>=0;r--){let{match:e,type:i}=this.frontier[r],n=Lt(t,r,i,e,!0);if(!n||n.childCount)continue t}return{depth:e,fit:s,move:n?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Pt(this.placed,e.depth,e.fit)),t=e.move;for(let r=e.depth+1;r<=t.depth;r++){let e=t.node(r),i=e.type.contentMatch.fillBefore(e.content,!0,t.index(r));this.openFrontierNode(e.type,e.attrs,i)}return t}openFrontierNode(t,e=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Pt(this.placed,this.depth,s.from(t.create(e,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(s.empty,!0);t.childCount&&(this.placed=Pt(this.placed,this.frontier.length,t))}}function zt(t,e,r){return 0==e?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(zt(t.firstChild.content,e-1,r)))}function Pt(t,e,r){return 0==e?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(Pt(t.lastChild.content,e-1,r)))}function Ut(t,e){for(let r=0;r<e;r++)t=t.firstChild.content;return t}function _t(t,e,r){if(e<=0)return t;let i=t.content;return e>1&&(i=i.replaceChild(0,_t(i.firstChild,e-1,1==i.childCount?r-1:0))),e>0&&(i=t.type.contentMatch.fillBefore(i).append(i),r<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(s.empty,!0)))),t.copy(i)}function Lt(t,e,r,i,n){let s=t.node(e),h=n?t.indexAfter(e):t.index(e);if(h==s.childCount&&!r.compatibleContent(s.type))return null;let l=i.fillBefore(s.content,!0,h);return l&&!function(t,e,r){for(let i=r;i<e.childCount;i++)if(!t.allowsMarks(e.child(i).marks))return!0;return!1}(r,s.content,h)?l:null}function Gt(t,e,r,i,n){if(e<r){let n=t.firstChild;t=t.replaceChild(0,n.copy(Gt(n.content,e+1,r,i,n)))}if(e>i){let e=n.contentMatchAt(0),r=e.fillBefore(t).append(t);t=r.append(e.matchFragment(r).fillBefore(s.empty,!0))}return t}function Vt(t,e){let r=[];for(let i=Math.min(t.depth,e.depth);i>=0;i--){let n=t.start(i);if(n<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(n==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==n-1)&&r.push(i)}return r}class Ht extends yt{constructor(t,e,r){super(),this.pos=t,this.attr=e,this.value=r}apply(t){let e=t.nodeAt(this.pos);if(!e)return St.fail("No node at attribute step's position");let r=Object.create(null);for(let t in e.attrs)r[t]=e.attrs[t];r[this.attr]=this.value;let i=e.type.create(r,null,e.marks);return St.fromReplace(t,this.pos,this.pos+1,new a(s.from(i),0,e.isLeaf?0:1))}getMap(){return wt.empty}invert(t){return new Ht(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Ht(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ht(e.pos,e.attr,e.value)}}yt.jsonID("attr",Ht);class Kt extends yt{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let r in t.attrs)e[r]=t.attrs[r];e[this.attr]=this.value;let r=t.type.create(e,t.content,t.marks);return St.ok(r)}getMap(){return wt.empty}invert(t){return new Kt(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Kt(e.attr,e.value)}}yt.jsonID("docAttr",Kt);let Qt=class extends Error{};Qt=function t(e){let r=Error.call(this,e);return r.__proto__=t.prototype,r},(Qt.prototype=Object.create(Error.prototype)).constructor=Qt,Qt.prototype.name="TransformError";class Xt{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new gt}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Qt(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,e=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(t=i.map(t,1),e=i.map(e,-1)),i.forEach(((r,i,n,s)=>{t=Math.min(t,n),e=Math.max(e,s)}))}return 1e9==t?null:{from:t,to:e}}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,r=a.empty){let i=Ft(this.doc,t,e,r);return i&&this.step(i),this}replaceWith(t,e,r){return this.replace(t,e,new a(s.from(r),0,0))}delete(t,e){return this.replace(t,e,a.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,r){return function(t,e,r,i){if(!i.size)return t.deleteRange(e,r);let n=t.doc.resolve(e),s=t.doc.resolve(r);if(qt(n,s,i))return t.step(new Nt(e,r,i));let h=Vt(n,s);0==h[h.length-1]&&h.pop();let l=-(n.depth+1);h.unshift(l);for(let t=n.depth,e=n.pos-1;t>0;t--,e--){let r=n.node(t).type.spec;if(r.defining||r.definingAsContext||r.isolating)break;h.indexOf(t)>-1?l=t:n.before(t)==e&&h.splice(1,0,-t)}let o=h.indexOf(l),u=[],f=i.openStart;for(let t=i.content,e=0;;e++){let r=t.firstChild;if(u.push(r),e==i.openStart)break;t=r.content}for(let t=f-1;t>=0;t--){let e=u[t],r=(c=e.type).spec.defining||c.spec.definingForContent;if(r&&!e.sameMarkup(n.node(Math.abs(l)-1)))f=t;else if(r||!e.type.isTextblock)break}var c;for(let e=i.openStart;e>=0;e--){let l=(e+f+1)%(i.openStart+1),c=u[l];if(c)for(let e=0;e<h.length;e++){let u=h[(e+o)%h.length],f=!0;u<0&&(f=!1,u=-u);let p=n.node(u-1),d=n.index(u-1);if(p.canReplaceWith(d,d,c.type,c.marks))return t.replace(n.before(u),f?s.after(u):r,new a(Gt(i.content,0,i.openStart,l),l,i.openEnd))}}let p=t.steps.length;for(let l=h.length-1;l>=0&&(t.replace(e,r,i),!(t.steps.length>p));l--){let t=h[l];t<0||(e=n.before(t),r=s.after(t))}}(this,t,e,r),this}replaceRangeWith(t,e,r){return function(t,e,r,i){if(!i.isInline&&e==r&&t.doc.resolve(e).parent.content.size){let n=function(t,e,r){let i=t.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),r))return e;if(0==i.parentOffset)for(let t=i.depth-1;t>=0;t--){let e=i.index(t);if(i.node(t).canReplaceWith(e,e,r))return i.before(t+1);if(e>0)return null}if(i.parentOffset==i.parent.content.size)for(let t=i.depth-1;t>=0;t--){let e=i.indexAfter(t);if(i.node(t).canReplaceWith(e,e,r))return i.after(t+1);if(e<i.node(t).childCount)return null}return null}(t.doc,e,i.type);null!=n&&(e=r=n)}t.replaceRange(e,r,new a(s.from(i),0,0))}(this,t,e,r),this}deleteRange(t,e){return function(t,e,r){let i=t.doc.resolve(e),n=t.doc.resolve(r);if(i.parent.isTextblock&&n.parent.isTextblock&&i.start()!=n.start()&&0==i.parentOffset&&0==n.parentOffset){let s=i.sharedDepth(r),h=!1;for(let t=i.depth;t>s;t--)i.node(t).type.spec.isolating&&(h=!0);for(let t=n.depth;t>s;t--)n.node(t).type.spec.isolating&&(h=!0);if(!h){for(let t=i.depth;t>0&&e==i.start(t);t--)e=i.before(t);for(let t=n.depth;t>0&&r==n.start(t);t--)r=n.before(t);i=t.doc.resolve(e),n=t.doc.resolve(r)}}let s=Vt(i,n);for(let e=0;e<s.length;e++){let r=s[e],h=e==s.length-1;if(h&&0==r||i.node(r).type.contentMatch.validEnd)return t.delete(i.start(r),n.end(r));if(r>0&&(h||i.node(r-1).canReplace(i.index(r-1),n.indexAfter(r-1))))return t.delete(i.before(r),n.after(r))}for(let s=1;s<=i.depth&&s<=n.depth;s++)if(e-i.start(s)==i.depth-s&&r>i.end(s)&&n.end(s)-r!=n.depth-s&&i.start(s-1)==n.start(s-1)&&i.node(s-1).canReplace(i.index(s-1),n.index(s-1)))return t.delete(i.before(s),r);t.delete(e,r)}(this,t,e),this}lift(t,e){return function(t,e,r){let{$from:i,$to:n,depth:h}=e,l=i.before(h+1),o=n.after(h+1),u=l,f=o,c=s.empty,p=0;for(let t=h,e=!1;t>r;t--)e||i.index(t)>0?(e=!0,c=s.from(i.node(t).copy(c)),p++):u--;let d=s.empty,w=0;for(let t=h,e=!1;t>r;t--)e||n.after(t+1)<n.end(t)?(e=!0,d=s.from(n.node(t).copy(d)),w++):f++;t.step(new Ot(u,f,l,o,new a(c.append(d),p,w),c.size-p,!0))}(this,t,e),this}join(t,e=1){return function(t,e,r){let i=null,{linebreakReplacement:n}=t.doc.type.schema,s=t.doc.resolve(e-r),h=s.node().type;if(n&&h.inlineContent){let t="pre"==h.whitespace,e=!!h.contentMatch.matchType(n);t&&!e?i=!1:!t&&e&&(i=!0)}let l=t.steps.length;if(!1===i){let i=t.doc.resolve(e+r);Ct(t,i.node(),i.before(),l)}h.inlineContent&&Mt(t,e+r-1,h,s.node().contentMatchAt(s.index()),null==i);let o=t.mapping.slice(l),u=o.map(e-r);if(t.step(new Nt(u,o.map(e+r,-1),a.empty,!0)),!0===i){let e=t.doc.resolve(u);jt(t,e.node(),e.before(),t.steps.length)}}(this,t,e),this}wrap(t,e){return function(t,e,r){let i=s.empty;for(let t=r.length-1;t>=0;t--){if(i.size){let e=r[t].type.contentMatch.matchFragment(i);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=s.from(r[t].type.create(r[t].attrs,i))}let n=e.start,h=e.end;t.step(new Ot(n,h,n,h,new a(i,0,0),r.length,!0))}(this,t,e),this}setBlockType(t,e=t,r,i=null){return function(t,e,r,i,n){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let h=t.steps.length;t.doc.nodesBetween(e,r,((e,r)=>{let l="function"==typeof n?n(e):n;if(e.isTextblock&&!e.hasMarkup(i,l)&&function(t,e,r){let i=t.resolve(e),n=i.index();return i.parent.canReplaceWith(n,n+1,r)}(t.doc,t.mapping.slice(h).map(r),i)){let n=null;if(i.schema.linebreakReplacement){let t="pre"==i.whitespace,e=!!i.contentMatch.matchType(i.schema.linebreakReplacement);t&&!e?n=!1:!t&&e&&(n=!0)}!1===n&&Ct(t,e,r,h),Mt(t,t.mapping.slice(h).map(r,1),i,void 0,null===n);let o=t.mapping.slice(h),u=o.map(r,1),f=o.map(r+e.nodeSize,1);return t.step(new Ot(u,f,u+1,f-1,new a(s.from(i.create(l,null,e.marks)),0,0),1,!0)),!0===n&&jt(t,e,r,h),!1}}))}(this,t,e,r,i),this}setNodeMarkup(t,e,r=null,i){return function(t,e,r,i,n){let h=t.doc.nodeAt(e);if(!h)throw new RangeError("No node at given position");r||(r=h.type);let l=r.create(i,null,n||h.marks);if(h.isLeaf)return t.replaceWith(e,e+h.nodeSize,l);if(!r.validContent(h.content))throw new RangeError("Invalid content for node type "+r.name);t.step(new Ot(e,e+h.nodeSize,e+1,e+h.nodeSize-1,new a(s.from(l),0,0),1,!0))}(this,t,e,r,i),this}setNodeAttribute(t,e,r){return this.step(new Ht(t,e,r)),this}setDocAttribute(t,e){return this.step(new Kt(t,e)),this}addNodeMark(t,e){return this.step(new xt(t,e)),this}removeNodeMark(t,e){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(e instanceof u)e.isInSet(r.marks)&&this.step(new Et(t,e));else{let i,n=r.marks,s=[];for(;i=e.isInSet(n);)s.push(new Et(t,i)),n=i.removeFromSet(n);for(let t=s.length-1;t>=0;t--)this.step(s[t])}return this}split(t,e=1,r){return function(t,e,r=1,i){let n=t.doc.resolve(e),h=s.empty,l=s.empty;for(let t=n.depth,e=n.depth-r,o=r-1;t>e;t--,o--){h=s.from(n.node(t).copy(h));let e=i&&i[o];l=s.from(e?e.type.create(e.attrs,l):n.node(t).copy(l))}t.step(new Nt(e,e,new a(h.append(l),r,r),!0))}(this,t,e,r),this}addMark(t,e,r){return function(t,e,r,i){let n,s,h=[],l=[];t.doc.nodesBetween(e,r,((t,o,u)=>{if(!t.isInline)return;let f=t.marks;if(!i.isInSet(f)&&u.type.allowsMarkType(i.type)){let u=Math.max(o,e),a=Math.min(o+t.nodeSize,r),c=i.addToSet(f);for(let t=0;t<f.length;t++)f[t].isInSet(c)||(n&&n.to==u&&n.mark.eq(f[t])?n.to=a:h.push(n=new kt(u,a,f[t])));s&&s.to==u?s.to=a:l.push(s=new vt(u,a,i))}})),h.forEach((e=>t.step(e))),l.forEach((e=>t.step(e)))}(this,t,e,r),this}removeMark(t,e,r){return function(t,e,r,i){let n=[],s=0;t.doc.nodesBetween(e,r,((t,h)=>{if(!t.isInline)return;s++;let l=null;if(i instanceof V){let e,r=t.marks;for(;e=i.isInSet(r);)(l||(l=[])).push(e),r=e.removeFromSet(r)}else i?i.isInSet(t.marks)&&(l=[i]):l=t.marks;if(l&&l.length){let i=Math.min(h+t.nodeSize,r);for(let t=0;t<l.length;t++){let r,o=l[t];for(let t=0;t<n.length;t++){let e=n[t];e.step==s-1&&o.eq(n[t].style)&&(r=e)}r?(r.to=i,r.step=s):n.push({style:o,from:Math.max(h,e),to:i,step:s})}}})),n.forEach((e=>t.step(new kt(e.from,e.to,e.style))))}(this,t,e,r),this}clearIncompatible(t,e,r){return Mt(this,t,e,r),this}}const Yt=Object.create(null);class Zt{constructor(t,e,r){this.$anchor=t,this.$head=e,this.ranges=r||[new te(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=a.empty){let r=e.content.lastChild,i=null;for(let t=0;t<e.openEnd;t++)i=r,r=r.lastChild;let n=t.steps.length,s=this.ranges;for(let h=0;h<s.length;h++){let{$from:l,$to:o}=s[h],u=t.mapping.slice(n);t.replaceRange(u.map(l.pos),u.map(o.pos),h?a.empty:e),0==h&&fe(t,n,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,e){let r=t.steps.length,i=this.ranges;for(let n=0;n<i.length;n++){let{$from:s,$to:h}=i[n],l=t.mapping.slice(r),o=l.map(s.pos),u=l.map(h.pos);n?t.deleteRange(o,u):(t.replaceRangeWith(o,u,e),fe(t,r,e.isInline?-1:1))}}static findFrom(t,e,r=!1){let i=t.parent.inlineContent?new ie(t):ue(t.node(0),t.parent,t.pos,t.index(),e,r);if(i)return i;for(let i=t.depth-1;i>=0;i--){let n=e<0?ue(t.node(0),t.node(i),t.before(i+1),t.index(i),e,r):ue(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,r);if(n)return n}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new le(t.node(0))}static atStart(t){return ue(t,t,0,0,1)||new le(t)}static atEnd(t){return ue(t,t,t.content.size,t.childCount,-1)||new le(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Yt[e.type];if(!r)throw new RangeError(`No selection type ${e.type} defined`);return r.fromJSON(t,e)}static jsonID(t,e){if(t in Yt)throw new RangeError("Duplicate use of selection JSON ID "+t);return Yt[t]=e,e.prototype.jsonID=t,e}getBookmark(){return ie.between(this.$anchor,this.$head).getBookmark()}}Zt.prototype.visible=!0;class te{constructor(t,e){this.$from=t,this.$to=e}}let ee=!1;function re(t){ee||t.parent.inlineContent||(ee=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ie extends Zt{constructor(t,e=t){re(t),re(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let r=t.resolve(e.map(this.head));if(!r.parent.inlineContent)return Zt.near(r);let i=t.resolve(e.map(this.anchor));return new ie(i.parent.inlineContent?i:r,r)}replace(t,e=a.empty){if(super.replace(t,e),e==a.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof ie&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new ne(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new ie(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,r=e){let i=t.resolve(e);return new this(i,r==e?i:t.resolve(r))}static between(t,e,r){let i=t.pos-e.pos;if(r&&!i||(r=i>=0?1:-1),!e.parent.inlineContent){let t=Zt.findFrom(e,r,!0)||Zt.findFrom(e,-r,!0);if(!t)return Zt.near(e,r);e=t.$head}return t.parent.inlineContent||(0==i||(t=(Zt.findFrom(t,-r,!0)||Zt.findFrom(t,r,!0)).$anchor).pos<e.pos!=i<0)&&(t=e),new ie(t,e)}}Zt.jsonID("text",ie);class ne{constructor(t,e){this.anchor=t,this.head=e}map(t){return new ne(t.map(this.anchor),t.map(this.head))}resolve(t){return ie.between(t.resolve(this.anchor),t.resolve(this.head))}}class se extends Zt{constructor(t){let e=t.nodeAfter,r=t.node(0).resolve(t.pos+e.nodeSize);super(t,r),this.node=e}map(t,e){let{deleted:r,pos:i}=e.mapResult(this.anchor),n=t.resolve(i);return r?Zt.near(n):new se(n)}content(){return new a(s.from(this.node),0,0)}eq(t){return t instanceof se&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new he(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new se(t.resolve(e.anchor))}static create(t,e){return new se(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}se.prototype.visible=!1,Zt.jsonID("node",se);class he{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:r}=t.mapResult(this.anchor);return e?new ne(r,r):new he(r)}resolve(t){let e=t.resolve(this.anchor),r=e.nodeAfter;return r&&se.isSelectable(r)?new se(e):Zt.near(e)}}class le extends Zt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=a.empty){if(e==a.empty){t.delete(0,t.doc.content.size);let e=Zt.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new le(t)}map(t){return new le(t)}eq(t){return t instanceof le}getBookmark(){return oe}}Zt.jsonID("all",le);const oe={map(){return this},resolve:t=>new le(t)};function ue(t,e,r,i,n,s=!1){if(e.inlineContent)return ie.create(t,r);for(let h=i-(n>0?0:1);n>0?h<e.childCount:h>=0;h+=n){let i=e.child(h);if(i.isAtom){if(!s&&se.isSelectable(i))return se.create(t,r-(n<0?i.nodeSize:0))}else{let e=ue(t,i,r+n,n<0?i.childCount:0,n,s);if(e)return e}r+=i.nodeSize*n}return null}function fe(t,e,r){let i=t.steps.length-1;if(i<e)return;let n,s=t.steps[i];(s instanceof Nt||s instanceof Ot)&&(t.mapping.maps[i].forEach(((t,e,r,i)=>{null==n&&(n=i)})),t.setSelection(Zt.near(t.doc.resolve(n),r)))}class ae extends Xt{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return u.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let r=this.selection;return e&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||u.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,r){let i=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(null==r&&(r=e),!t)return this.deleteRange(e,r);let n=this.storedMarks;if(!n){let t=this.doc.resolve(e);n=r==e?t.marks():t.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(e,r,i.text(t,n)),this.selection.empty||this.selection.to!=e+t.length||this.setSelection(Zt.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function ce(t,e){return e&&t?t.bind(e):t}class pe{constructor(t,e,r){this.name=t,this.init=ce(e.init,r),this.apply=ce(e.apply,r)}}const de=[new pe("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new pe("selection",{init:(t,e)=>t.selection||Zt.atStart(e.doc),apply:t=>t.selection}),new pe("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,r,i)=>i.selection.$cursor?t.storedMarks:null}),new pe("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class we{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=de.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new pe(t.key,t.spec.state,t))}))}}class ge{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=e){let e=this.config.plugins[r];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],r=this.applyInner(t),i=null;for(;;){let n=!1;for(let s=0;s<this.config.plugins.length;s++){let h=this.config.plugins[s];if(h.spec.appendTransaction){let l=i?i[s].n:0,o=i?i[s].state:this,u=l<e.length&&h.spec.appendTransaction.call(h,l?e.slice(l):e,o,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",t),!i){i=[];for(let t=0;t<this.config.plugins.length;t++)i.push(t<s?{state:r,n:e.length}:{state:this,n:0})}e.push(u),r=r.applyInner(u),n=!0}i&&(i[s]={state:r,n:e.length})}}if(!n)return{state:r,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new ge(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let n=r[i];e[n.name]=n.apply(t,this[n.name],this,e)}return e}get tr(){return new ae(this)}static create(t){let e=new we(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ge(e);for(let i=0;i<e.fields.length;i++)r[e.fields[i].name]=e.fields[i].init(t,r);return r}reconfigure(t){let e=new we(this.schema,t.plugins),r=e.fields,i=new ge(e);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((t=>t.toJSON()))),t&&"object"==typeof t)for(let r in t){if("doc"==r||"selection"==r)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],n=i.spec.state;n&&n.toJSON&&(e[r]=n.toJSON.call(i,this[i.key]))}return e}static fromJSON(t,e,r){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new we(t.schema,t.plugins),n=new ge(i);return i.fields.forEach((i=>{if("doc"==i.name)n.doc=J.fromJSON(t.schema,e.doc);else if("selection"==i.name)n.selection=Zt.fromJSON(n.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(n.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let s in r){let h=r[s],l=h.spec.state;if(h.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,s))return void(n[i.name]=l.fromJSON.call(h,t,e[s],n))}n[i.name]=i.init(t,n)}})),n}}function me(t,e,r){for(let i in t){let n=t[i];n instanceof Function?n=n.bind(e):"handleDOMEvents"==i&&(n=me(n,e,{})),r[i]=n}return r}class ye{constructor(t){this.spec=t,this.props={},t.props&&me(t.props,this,this.props),this.key=t.key?t.key.key:be("plugin")}getState(t){return t[this.key]}}const Se=Object.create(null);function be(t){return t in Se?t+"$"+ ++Se[t]:(Se[t]=0,t+"$")}class ve{constructor(t="key"){this.key=be(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}export{le as A,Q as D,ge as E,s as F,u as M,J as N,t as O,ve as P,Ot as R,Zt as S,ie as T,ht as a,ye as b,se as c,a as d,Bt as e,Tt as f,Dt as g,R as h,$t as i,H as j,te as k,It as l,Xt as m,gt as n,Ft as r};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
System.register([],function(_export,_context){"use strict";var s,h,u,f,a,x,E,N,O,R,M,J,I,A,j,L,G,V,H,Q,X,Y,Z,et,rt,ht,ut,ct,dt,wt,gt,mt,yt,St,vt,kt,xt,Et,Nt,Ot,Wt,Ht,Kt,Qt,Xt,Yt,Zt,te,ee,ie,ne,se,he,le,oe,ae,pe,de,we,ge,ye,Se,ve;function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n48=0,F=function F(){};return{s:F,n:function n(){return _n48>=r.length?{done:!0}:{done:!1,value:r[_n48++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _wrapNativeSuper(t){var r="function"==typeof Map?new Map():void 0;return _wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper);}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor);}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t);},_wrapNativeSuper(t);}function _construct(t,e,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o))();return r&&_setPrototypeOf(p,r.prototype),p;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]");}catch(n){return"function"==typeof t;}}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function t(t){this.content=t;}function e(t,r,s){for(var _h=0;;_h++){if(_h==t.childCount||_h==r.childCount)return t.childCount==r.childCount?null:s;var _l=t.child(_h),_o=r.child(_h);if(_l!=_o){if(!_l.sameMarkup(_o))return s;if(_l.isText&&_l.text!=_o.text){var _t2=_l.text,_e=_o.text,_r=0;for(;_t2[_r]==_e[_r];_r++)s++;return _r&&_r<_t2.length&&_r<_e.length&&n(_t2.charCodeAt(_r-1))&&i(_t2.charCodeAt(_r))&&s--,s;}if(_l.content.size||_o.content.size){var _t3=e(_l.content,_o.content,s+1);if(null!=_t3)return _t3;}s+=_l.nodeSize;}else s+=_l.nodeSize;}}function r(t,e,s,h){for(var _l2=t.childCount,_o2=e.childCount;;){if(0==_l2||0==_o2)return _l2==_o2?null:{a:s,b:h};var _u=t.child(--_l2),_f=e.child(--_o2),_a=_u.nodeSize;if(_u!=_f){if(!_u.sameMarkup(_f))return{a:s,b:h};if(_u.isText&&_u.text!=_f.text){var _t4=_u.text,_e2=_f.text,_r2=_t4.length,_l3=_e2.length;for(;_r2>0&&_l3>0&&_t4[_r2-1]==_e2[_l3-1];)_r2--,_l3--,s--,h--;return _r2&&_l3&&_r2<_t4.length&&n(_t4.charCodeAt(_r2-1))&&i(_t4.charCodeAt(_r2))&&(s++,h++),{a:s,b:h};}if(_u.content.size||_f.content.size){var _t5=r(_u.content,_f.content,s-1,h-1);if(_t5)return _t5;}s-=_a,h-=_a;}else s-=_a,h-=_a;}}function i(t){return t>=56320&&t<57344;}function n(t){return t>=55296&&t<56320;}function l(t,e){return h.index=t,h.offset=e,h;}function o(t,e){if(t===e)return!0;if(!t||"object"!=_typeof(t)||!e||"object"!=_typeof(e))return!1;var r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(var _r5=0;_r5<t.length;_r5++)if(!o(t[_r5],e[_r5]))return!1;}else{for(var _r6 in t)if(!(_r6 in e)||!o(t[_r6],e[_r6]))return!1;for(var _r7 in e)if(!(_r7 in t))return!1;}return!0;}function c(t,e,r){var _t$findIndex=t.findIndex(e),i=_t$findIndex.index,n=_t$findIndex.offset,s=t.maybeChild(i),_t$findIndex2=t.findIndex(r),h=_t$findIndex2.index,l=_t$findIndex2.offset;if(n==e||s.isText){if(l!=r&&!t.child(h).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r));}if(i!=h)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(c(s.content,e-n-1,r-n-1)));}function p(t,e,r,i,n,s){var _t$findIndex3=t.findIndex(e),h=_t$findIndex3.index,l=_t$findIndex3.offset,o=t.maybeChild(h);if(l==e||o.isText)return s&&i<=0&&n<=0&&!s.canReplace(h,h,r)?null:t.cut(0,e).append(r).append(t.cut(e));var u=p(o.content,e-l-1,r,0==h?i-1:0,h==t.childCount-1?n-1:0,o);return u&&t.replaceChild(h,o.copy(u));}function d(t,e,r){if(r.openStart>t.depth)throw new f("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new f("Inconsistent open depths");return w(t,e,r,0);}function w(t,e,r,i){var n=t.index(i),h=t.node(i);if(n==e.index(i)&&i<t.depth-r.openStart){var _s6=w(t,e,r,i+1);return h.copy(h.content.replaceChild(n,_s6));}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=i||e.depth!=i){var _ref=function(t,e){var r=e.depth-t.openStart,i=e.node(r).copy(t.content);for(var _t6=r-1;_t6>=0;_t6--)i=e.node(_t6).copy(s.from(i));return{start:i.resolveNoCache(t.openStart+r),end:i.resolveNoCache(i.content.size-t.openEnd-r)};}(r,t),_n5=_ref.start,_l6=_ref.end;return b(h,v(t,_n5,_l6,e,i));}{var _i6=t.parent,_n6=_i6.content;return b(_i6,_n6.cut(0,t.parentOffset).append(r.content).append(_n6.cut(e.parentOffset)));}}return b(h,k(t,e,i));}function g(t,e){if(!e.type.compatibleContent(t.type))throw new f("Cannot join "+e.type.name+" onto "+t.type.name);}function m(t,e,r){var i=t.node(r);return g(i,e.node(r)),i;}function y(t,e){var r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t);}function S(t,e,r,i){var n=(e||t).node(r),s=0,h=e?e.index(r):n.childCount;t&&(s=t.index(r),t.depth>r?s++:t.textOffset&&(y(t.nodeAfter,i),s++));for(var _t7=s;_t7<h;_t7++)y(n.child(_t7),i);e&&e.depth==r&&e.textOffset&&y(e.nodeBefore,i);}function b(t,e){if(!t.type.validContent(e))throw new f("Invalid content for node "+t.type.name);return t.copy(e);}function v(t,e,r,i,n){var h=t.depth>n&&m(t,e,n+1),l=i.depth>n&&m(r,i,n+1),o=[];return S(null,t,n,o),h&&l&&e.index(n)==r.index(n)?(g(h,l),y(b(h,v(t,e,r,i,n+1)),o)):(h&&y(b(h,k(t,e,n+1)),o),S(e,r,n,o),l&&y(b(l,k(r,i,n+1)),o)),S(i,null,n,o),new s(o);}function k(t,e,r){var i=[];if(S(null,t,r,i),t.depth>r){y(b(m(t,e,r+1),k(t,e,r+1)),i);}return S(e,null,r,i),new s(i);}function T(t,e){for(var _r13=t.length-1;_r13>=0;_r13--)e=t[_r13].type.name+"("+e+")";return e;}function C(t){var e=[];do{e.push($(t));}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e};}function $(t){var e=[];do{e.push(D(t));}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e};}function D(t){var e=function(t){if(t.eat("(")){var _e28=C(t);return t.eat(")")||t.err("Missing closing paren"),_e28;}if(!/\W/.test(t.next)){var _e29=function(t,e){var r=t.nodeTypes,i=r[e];if(i)return[i];var n=[];for(var _t20 in r){var _i14=r[_t20];_i14.isInGroup(e)&&n.push(_i14);}0==n.length&&t.err("No node type or group '"+e+"' found");return n;}(t,t.next).map(function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e};});return t.pos++,1==_e29.length?_e29[0]:{type:"choice",exprs:_e29};}t.err("Unexpected token '"+t.next+"'");}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=F(t,e);}return e;}function B(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e;}function F(t,e){var r=B(t),i=r;return t.eat(",")&&(i="}"!=t.next?B(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:i,expr:e};}function q(t,e){return e-t;}function W(t,e){var r=[];return function e(i){var n=t[i];if(1==n.length&&!n[0].term)return e(n[0].to);r.push(i);for(var _t21=0;_t21<n.length;_t21++){var _n$_t=n[_t21],_i15=_n$_t.term,_s10=_n$_t.to;_i15||-1!=r.indexOf(_s10)||e(_s10);}}(e),r.sort(q);}function z(t){var e=Object.create(null);for(var _r19 in t){var _i16=t[_r19];if(!_i16.hasDefault)return null;e[_r19]=_i16["default"];}return e;}function P(t,e){var r=Object.create(null);for(var _i17 in t){var _n10=e&&e[_i17];if(void 0===_n10){var _e30=t[_i17];if(!_e30.hasDefault)throw new RangeError("No value supplied for attribute "+_i17);_n10=_e30["default"];}r[_i17]=_n10;}return r;}function U(t,e,r,i){for(var _n11 in e)if(!(_n11 in t))throw new RangeError("Unsupported attribute ".concat(_n11," for ").concat(r," of type ").concat(i));for(var _r20 in t)t[_r20].validate&&t[_r20].validate(e[_r20]);}function _(t,e){var r=Object.create(null);if(e)for(var _i18 in e)r[_i18]=new G(t,_i18,e[_i18]);return r;}function K(t,e){var r=[];for(var _i19=0;_i19<e.length;_i19++){var _n13=e[_i19],_s11=t.marks[_n13],_h11=_s11;if(_s11)r.push(_s11);else for(var _e36 in t.marks){var _i20=t.marks[_e36];("_"==_n13||_i20.spec.group&&_i20.spec.group.split(" ").indexOf(_n13)>-1)&&r.push(_h11=_i20);}if(!_h11)throw new SyntaxError("Unknown mark type: '"+e[_i19]+"'");}return r;}function tt(t,e,r){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&r;}function it(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e);}function nt(t){var e={};for(var _r35 in t)e[_r35]=t[_r35];return e;}function st(t,e){var r=e.schema.nodes;var _loop4=function _loop4(){var n=r[_i27];if(!n.allowsMarkType(t))return 0;// continue
|
|
2
|
+
var s=[],_h14=function h(t){s.push(t);for(var _r36=0;_r36<t.edgeCount;_r36++){var _t$edge=t.edge(_r36),_i28=_t$edge.type,_n18=_t$edge.next;if(_i28==e)return!0;if(s.indexOf(_n18)<0&&_h14(_n18))return!0;}};if(_h14(n.contentMatch))return{v:!0};},_ret2;for(var _i27 in r){_ret2=_loop4();if(_ret2===0)continue;if(_ret2)return _ret2.v;}}function lt(t){var e={};for(var _r39 in t){var _i30=t[_r39].spec.toDOM;_i30&&(e[_r39]=_i30);}return e;}function ot(t){return t.document||window.document;}function ft(t){var e=ut.get(t);return void 0===e&&ut.set(t,e=function(t){var e=null;function r(t){if(t&&"object"==_typeof(t))if(Array.isArray(t)){if("string"==typeof t[0])e||(e=[]),e.push(t);else for(var _e56=0;_e56<t.length;_e56++)r(t[_e56]);}else for(var _e57 in t)r(t[_e57]);}return r(t),e;}(t)),e;}function at(t,e,r,i){if(1==e.nodeType)return{dom:e};if(e.dom&&1==e.dom.nodeType)return e;var n,s=e[0];if("string"!=typeof s)throw new RangeError("Invalid array passed to renderSpec");if(i&&(n=ft(i))&&n.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");var h,l=s.indexOf(" ");l>0&&(r=s.slice(0,l),s=s.slice(l+1));var o=r?t.createElementNS(r,s):t.createElement(s),u=e[1],f=1;if(u&&"object"==_typeof(u)&&null==u.nodeType&&!Array.isArray(u)){f=2;for(var _t42 in u)if(null!=u[_t42]){var _e58=_t42.indexOf(" ");_e58>0?o.setAttributeNS(_t42.slice(0,_e58),_t42.slice(_e58+1),u[_t42]):"style"==_t42&&o.style?o.style.cssText=u[_t42]:o.setAttribute(_t42,u[_t42]);}}for(var _n20=f;_n20<e.length;_n20++){var _s18=e[_n20];if(0===_s18){if(_n20<e.length-1||_n20>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:o,contentDOM:o};}if("string"==typeof _s18)o.appendChild(t.createTextNode(_s18));else{var _at2=at(t,_s18,r,i),_e59=_at2.dom,_n21=_at2.contentDOM;if(o.appendChild(_e59),_n21){if(h)throw new RangeError("Multiple content holes");h=_n21;}}}return{dom:o,contentDOM:h};}function pt(t){return 65535&t;}function bt(t,e,r){var i=[];for(var _n25=0;_n25<t.childCount;_n25++){var _s21=t.child(_n25);_s21.content.size&&(_s21=_s21.copy(bt(_s21.content,e,_s21))),_s21.isInline&&(_s21=e(_s21,r,_n25)),i.push(_s21);}return s.fromArray(i);}function Rt(t,e,r){var i=t.resolve(e),n=r-e,s=i.depth;for(;n>0&&s>0&&i.indexAfter(s)==i.node(s).childCount;)s--,n--;if(n>0){var _t45=i.node(s).maybeChild(i.indexAfter(s));for(;n>0;){if(!_t45||_t45.isLeaf)return!0;_t45=_t45.firstChild,n--;}}return!1;}function Mt(t,e,r){var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:r.contentMatch;var n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:!0;var h=t.doc.nodeAt(e),l=[],o=e+1;for(var _e67=0;_e67<h.childCount;_e67++){var _u4=h.child(_e67),_f3=o+_u4.nodeSize,_c=i.matchType(_u4.type);if(_c){i=_c;for(var _e68=0;_e68<_u4.marks.length;_e68++)r.allowsMarkType(_u4.marks[_e68].type)||t.step(new kt(o,_f3,_u4.marks[_e68]));if(n&&_u4.isText&&"pre"!=r.whitespace){var _t46=void 0,_e69=void 0,_i34=/\r?\n|\r/g;for(;_t46=_i34.exec(_u4.text);)_e69||(_e69=new a(s.from(r.schema.text(" ",r.allowedMarks(_u4.marks))),0,0)),l.push(new Nt(o+_t46.index,o+_t46.index+_t46[0].length,_e69));}}else l.push(new Nt(o,_f3,a.empty));o=_f3;}if(!i.validEnd){var _e70=i.fillBefore(s.empty,!0);t.replace(o,o,new a(_e70,0,0));}for(var _e71=l.length-1;_e71>=0;_e71--)t.step(l[_e71]);}function Jt(t,e,r){return(0==e||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r));}function It(t){var e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(var _r45=t.depth,_i35=0,_n26=0;;--_r45){var _s22=t.$from.node(_r45),_h19=t.$from.index(_r45)+_i35,_l12=t.$to.indexAfter(_r45)-_n26;if(_r45<t.depth&&_s22.canReplace(_h19,_l12,e))return _r45;if(0==_r45||_s22.type.spec.isolating||!Jt(_s22,_h19,_l12))break;_h19&&(_i35=1),_l12<_s22.childCount&&(_n26=1);}return null;}function Tt(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:t;var n=function(t,e){var r=t.parent,i=t.startIndex,n=t.endIndex,s=r.contentMatchAt(i).findWrapping(e);if(!s)return null;var h=s.length?s[0]:e;return r.canReplaceWith(i,n,h)?s:null;}(t,e),s=n&&function(t,e){var r=t.parent,i=t.startIndex,n=t.endIndex,s=r.child(i),h=e.contentMatch.findWrapping(s.type);if(!h)return null;var l=(h.length?h[h.length-1]:e).contentMatch;for(var _t47=i;l&&_t47<n;_t47++)l=l.matchType(r.child(_t47).type);return l&&l.validEnd?h:null;}(i,e);return s?n.map(At).concat({type:e,attrs:r}).concat(s.map(At)):null;}function At(t){return{type:t,attrs:null};}function jt(t,e,r,i){e.forEach(function(n,s){if(n.isText){var _h20,_l13=/\r?\n|\r/g;for(;_h20=_l13.exec(n.text);){var _n27=t.mapping.slice(i).map(r+1+s+_h20.index);t.replaceWith(_n27,_n27+1,e.type.schema.linebreakReplacement.create());}}});}function Ct(t,e,r,i){e.forEach(function(n,s){if(n.type==n.type.schema.linebreakReplacement){var _n28=t.mapping.slice(i).map(r+1+s);t.replaceWith(_n28,_n28+1,e.type.schema.text("\n"));}});}function $t(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var i=arguments.length>3?arguments[3]:undefined;var n=t.resolve(e),s=n.depth-r,h=i&&i[i.length-1]||n.parent;if(s<0||n.parent.type.spec.isolating||!n.parent.canReplace(n.index(),n.parent.childCount)||!h.type.validContent(n.parent.content.cutByIndex(n.index(),n.parent.childCount)))return!1;for(var _t48=n.depth-1,_e72=r-2;_t48>s;_t48--,_e72--){var _r46=n.node(_t48),_s23=n.index(_t48);if(_r46.type.spec.isolating)return!1;var _h21=_r46.content.cutByIndex(_s23,_r46.childCount),_l14=i&&i[_e72+1];_l14&&(_h21=_h21.replaceChild(0,_l14.type.create(_l14.attrs)));var _o6=i&&i[_e72]||_r46;if(!_r46.canReplace(_s23+1,_r46.childCount)||!_o6.type.validContent(_h21))return!1;}var l=n.indexAfter(s),o=i&&i[0];return n.node(s).canReplaceWith(l,l,o?o.type:n.node(s+1).type);}function Dt(t,e){var r=t.resolve(e),i=r.index();return n=r.nodeBefore,s=r.nodeAfter,!(!n||!s||n.isLeaf||!function(t,e){e.content.size||t.type.compatibleContent(e.type);var r=t.contentMatchAt(t.childCount),i=t.type.schema.linebreakReplacement;for(var _n29=0;_n29<e.childCount;_n29++){var _s24=e.child(_n29),_h22=_s24.type==i?t.type.schema.nodes.text:_s24.type;if(r=r.matchType(_h22),!r)return!1;if(!t.type.allowsMarks(_s24.marks))return!1;}return r.validEnd;}(n,s))&&r.parent.canReplace(i,i+1);var n,s;}function Bt(t,e,r){var i=t.resolve(e);if(!r.content.size)return e;var n=r.content;for(var _t49=0;_t49<r.openStart;_t49++)n=n.firstChild.content;for(var _t50=1;_t50<=(0==r.openStart&&r.size?2:1);_t50++)for(var _e73=i.depth;_e73>=0;_e73--){var _r47=_e73==i.depth?0:i.pos<=(i.start(_e73+1)+i.end(_e73+1))/2?-1:1,_s25=i.index(_e73)+(_r47>0?1:0),_h23=i.node(_e73),_l15=!1;if(1==_t50)_l15=_h23.canReplace(_s25,_s25,n);else{var _t51=_h23.contentMatchAt(_s25).findWrapping(n.firstChild.type);_l15=_t51&&_h23.canReplaceWith(_s25,_s25,_t51[0]);}if(_l15)return 0==_r47?i.pos:_r47<0?i.before(_e73+1):i.after(_e73+1);}return null;}function Ft(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:e;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:a.empty;if(e==r&&!i.size)return null;var n=t.resolve(e),s=t.resolve(r);return qt(n,s,i)?new Nt(e,r,i):new Wt(n,s,i).fit();}function qt(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content);}function zt(t,e,r){return 0==e?t.cutByIndex(r,t.childCount):t.replaceChild(0,t.firstChild.copy(zt(t.firstChild.content,e-1,r)));}function Pt(t,e,r){return 0==e?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(Pt(t.lastChild.content,e-1,r)));}function Ut(t,e){for(var _r54=0;_r54<e;_r54++)t=t.firstChild.content;return t;}function _t(t,e,r){if(e<=0)return t;var i=t.content;return e>1&&(i=i.replaceChild(0,_t(i.firstChild,e-1,1==i.childCount?r-1:0))),e>0&&(i=t.type.contentMatch.fillBefore(i).append(i),r<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(s.empty,!0)))),t.copy(i);}function Lt(t,e,r,i,n){var s=t.node(e),h=n?t.indexAfter(e):t.index(e);if(h==s.childCount&&!r.compatibleContent(s.type))return null;var l=i.fillBefore(s.content,!0,h);return l&&!function(t,e,r){for(var _i41=r;_i41<e.childCount;_i41++)if(!t.allowsMarks(e.child(_i41).marks))return!0;return!1;}(r,s.content,h)?l:null;}function Gt(t,e,r,i,n){if(e<r){var _n35=t.firstChild;t=t.replaceChild(0,_n35.copy(Gt(_n35.content,e+1,r,i,_n35)));}if(e>i){var _e83=n.contentMatchAt(0),_r55=_e83.fillBefore(t).append(t);t=_r55.append(_e83.matchFragment(_r55).fillBefore(s.empty,!0));}return t;}function Vt(t,e){var r=[];for(var _i42=Math.min(t.depth,e.depth);_i42>=0;_i42--){var _n36=t.start(_i42);if(_n36<t.pos-(t.depth-_i42)||e.end(_i42)>e.pos+(e.depth-_i42)||t.node(_i42).type.spec.isolating||e.node(_i42).type.spec.isolating)break;(_n36==e.start(_i42)||_i42==t.depth&&_i42==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&_i42&&e.start(_i42-1)==_n36-1)&&r.push(_i42);}return r;}function re(t){ee||t.parent.inlineContent||(ee=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"));}function ue(t,e,r,i,n){var s=arguments.length>5&&arguments[5]!==undefined?arguments[5]:!1;if(e.inlineContent)return ie.create(t,r);for(var _h29=i-(n>0?0:1);n>0?_h29<e.childCount:_h29>=0;_h29+=n){var _i48=e.child(_h29);if(_i48.isAtom){if(!s&&se.isSelectable(_i48))return se.create(t,r-(n<0?_i48.nodeSize:0));}else{var _e105=ue(t,_i48,r+n,n<0?_i48.childCount:0,n,s);if(_e105)return _e105;}r+=_i48.nodeSize*n;}return null;}function fe(t,e,r){var i=t.steps.length-1;if(i<e)return;var n,s=t.steps[i];(s instanceof Nt||s instanceof Ot)&&(t.mapping.maps[i].forEach(function(t,e,r,i){null==n&&(n=i);}),t.setSelection(Zt.near(t.doc.resolve(n),r)));}function ce(t,e){return e&&t?t.bind(e):t;}function me(t,e,r){for(var _i52 in t){var _n47=t[_i52];_n47 instanceof Function?_n47=_n47.bind(e):"handleDOMEvents"==_i52&&(_n47=me(_n47,e,{})),r[_i52]=_n47;}return r;}function be(t){return t in Se?t+"$"+ ++Se[t]:(Se[t]=0,t+"$");}_export({O:t,e:Bt,f:Tt,g:Dt,i:$t,l:It,r:Ft});return{setters:[],execute:function execute(){t.prototype={constructor:t,find:function find(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1;},get:function get(t){var e=this.find(t);return-1==e?void 0:this.content[e+1];},update:function update(e,r,i){var n=i&&i!=e?this.remove(i):this,s=n.find(e),h=n.content.slice();return-1==s?h.push(i||e,r):(h[s+1]=r,i&&(h[s]=i)),new t(h);},remove:function remove(e){var r=this.find(e);if(-1==r)return this;var i=this.content.slice();return i.splice(r,2),new t(i);},addToStart:function addToStart(e,r){return new t([e,r].concat(this.remove(e).content));},addToEnd:function addToEnd(e,r){var i=this.remove(e).content.slice();return i.push(e,r),new t(i);},addBefore:function addBefore(e,r,i){var n=this.remove(r),s=n.content.slice(),h=n.find(e);return s.splice(-1==h?s.length:h,0,r,i),new t(s);},forEach:function forEach(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1]);},prepend:function prepend(e){return(e=t.from(e)).size?new t(e.content.concat(this.subtract(e).content)):this;},append:function append(e){return(e=t.from(e)).size?new t(this.subtract(e).content.concat(e.content)):this;},subtract:function subtract(e){var r=this;e=t.from(e);for(var i=0;i<e.content.length;i+=2)r=r.remove(e.content[i]);return r;},toObject:function toObject(){var t={};return this.forEach(function(e,r){t[e]=r;}),t;},get size(){return this.content.length>>1;}},t.from=function(e){if(e instanceof t)return e;var r=[];if(e)for(var i in e)r.push(i,e[i]);return new t(r);};_export("F",s=/*#__PURE__*/function(){function s(t,e){_classCallCheck(this,s);if(this.content=t,this.size=e||0,null==e)for(var _e3=0;_e3<t.length;_e3++)this.size+=t[_e3].nodeSize;}return _createClass(s,[{key:"nodesBetween",value:function nodesBetween(t,e,r){var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var n=arguments.length>4?arguments[4]:undefined;for(var _s4=0,_h2=0;_h2<e;_s4++){var _l4=this.content[_s4],_o3=_h2+_l4.nodeSize;if(_o3>t&&!1!==r(_l4,i+_h2,n||null,_s4)&&_l4.content.size){var _n=_h2+1;_l4.nodesBetween(Math.max(0,t-_n),Math.min(_l4.content.size,e-_n),r,i+_n);}_h2=_o3;}}},{key:"descendants",value:function descendants(t){this.nodesBetween(0,this.size,t);}},{key:"textBetween",value:function textBetween(t,e,r,i){var n="",_s2=!0;return this.nodesBetween(t,e,function(h,l){var o=h.isText?h.text.slice(Math.max(t,l)-l,e-l):h.isLeaf?i?"function"==typeof i?i(h):i:h.type.spec.leafText?h.type.spec.leafText(h):"":"";h.isBlock&&(h.isLeaf&&o||h.isTextblock)&&r&&(_s2?_s2=!1:n+=r),n+=o;},0),n;}},{key:"append",value:function append(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,r=t.firstChild,i=this.content.slice(),n=0;for(e.isText&&e.sameMarkup(r)&&(i[i.length-1]=e.withText(e.text+r.text),n=1);n<t.content.length;n++)i.push(t.content[n]);return new s(i,this.size+t.size);}},{key:"cut",value:function cut(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.size;if(0==t&&e==this.size)return this;var r=[],i=0;if(e>t)for(var _n2=0,_s5=0;_s5<e;_n2++){var _h3=this.content[_n2],_l5=_s5+_h3.nodeSize;_l5>t&&((_s5<t||_l5>e)&&(_h3=_h3.isText?_h3.cut(Math.max(0,t-_s5),Math.min(_h3.text.length,e-_s5)):_h3.cut(Math.max(0,t-_s5-1),Math.min(_h3.content.size,e-_s5-1))),r.push(_h3),i+=_h3.nodeSize),_s5=_l5;}return new s(r,i);}},{key:"cutByIndex",value:function cutByIndex(t,e){return t==e?s.empty:0==t&&e==this.content.length?this:new s(this.content.slice(t,e));}},{key:"replaceChild",value:function replaceChild(t,e){var r=this.content[t];if(r==e)return this;var i=this.content.slice(),n=this.size+e.nodeSize-r.nodeSize;return i[t]=e,new s(i,n);}},{key:"addToStart",value:function addToStart(t){return new s([t].concat(this.content),this.size+t.nodeSize);}},{key:"addToEnd",value:function addToEnd(t){return new s(this.content.concat(t),this.size+t.nodeSize);}},{key:"eq",value:function eq(t){if(this.content.length!=t.content.length)return!1;for(var _e4=0;_e4<this.content.length;_e4++)if(!this.content[_e4].eq(t.content[_e4]))return!1;return!0;}},{key:"firstChild",get:function get(){return this.content.length?this.content[0]:null;}},{key:"lastChild",get:function get(){return this.content.length?this.content[this.content.length-1]:null;}},{key:"childCount",get:function get(){return this.content.length;}},{key:"child",value:function child(t){var e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e;}},{key:"maybeChild",value:function maybeChild(t){return this.content[t]||null;}},{key:"forEach",value:function forEach(t){for(var _e5=0,_r3=0;_e5<this.content.length;_e5++){var _i=this.content[_e5];t(_i,_r3,_e5),_r3+=_i.nodeSize;}}},{key:"findDiffStart",value:function findDiffStart(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;return e(this,t,r);}},{key:"findDiffEnd",value:function findDiffEnd(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.size;var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:t.size;return r(this,t,e,i);}},{key:"findIndex",value:function findIndex(t){if(0==t)return l(0,t);if(t==this.size)return l(this.content.length,t);if(t>this.size||t<0)throw new RangeError("Position ".concat(t," outside of fragment (").concat(this,")"));for(var _e6=0,_r4=0;;_e6++){var _i2=_r4+this.child(_e6).nodeSize;if(_i2>=t)return _i2==t?l(_e6+1,_i2):l(_e6,_r4);_r4=_i2;}}},{key:"toString",value:function toString(){return"<"+this.toStringInner()+">";}},{key:"toStringInner",value:function toStringInner(){return this.content.join(", ");}},{key:"toJSON",value:function toJSON(){return this.content.length?this.content.map(function(t){return t.toJSON();}):null;}}],[{key:"fromJSON",value:function fromJSON(t,e){if(!e)return s.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return s.fromArray(e.map(t.nodeFromJSON));}},{key:"fromArray",value:function fromArray(t){if(!t.length)return s.empty;var e,r=0;for(var _i3=0;_i3<t.length;_i3++){var _n3=t[_i3];r+=_n3.nodeSize,_i3&&_n3.isText&&t[_i3-1].sameMarkup(_n3)?(e||(e=t.slice(0,_i3)),e[e.length-1]=_n3.withText(e[e.length-1].text+_n3.text)):e&&e.push(_n3);}return new s(e||t,r);}},{key:"from",value:function from(t){if(!t)return s.empty;if(t instanceof s)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new s([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""));}}]);}());s.empty=new s([],0);h={index:0,offset:0};_export("M",u=/*#__PURE__*/function(){function u(t,e){_classCallCheck(this,u);this.type=t,this.attrs=e;}return _createClass(u,[{key:"addToSet",value:function addToSet(t){var e,r=!1;for(var _i4=0;_i4<t.length;_i4++){var _n4=t[_i4];if(this.eq(_n4))return t;if(this.type.excludes(_n4.type))e||(e=t.slice(0,_i4));else{if(_n4.type.excludes(this.type))return t;!r&&_n4.type.rank>this.type.rank&&(e||(e=t.slice(0,_i4)),e.push(this),r=!0),e&&e.push(_n4);}}return e||(e=t.slice()),r||e.push(this),e;}},{key:"removeFromSet",value:function removeFromSet(t){for(var _e7=0;_e7<t.length;_e7++)if(this.eq(t[_e7]))return t.slice(0,_e7).concat(t.slice(_e7+1));return t;}},{key:"isInSet",value:function isInSet(t){for(var _e8=0;_e8<t.length;_e8++)if(this.eq(t[_e8]))return!0;return!1;}},{key:"eq",value:function eq(t){return this==t||this.type==t.type&&o(this.attrs,t.attrs);}},{key:"toJSON",value:function toJSON(){var t={type:this.type.name};for(var _e9 in this.attrs){t.attrs=this.attrs;break;}return t;}}],[{key:"fromJSON",value:function fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");var r=t.marks[e.type];if(!r)throw new RangeError("There is no mark type ".concat(e.type," in this schema"));var i=r.create(e.attrs);return r.checkAttrs(i.attrs),i;}},{key:"sameSet",value:function sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(var _r8=0;_r8<t.length;_r8++)if(!t[_r8].eq(e[_r8]))return!1;return!0;}},{key:"setFrom",value:function setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return u.none;if(t instanceof u)return[t];var e=t.slice();return e.sort(function(t,e){return t.type.rank-e.type.rank;}),e;}}]);}());u.none=[];f=/*#__PURE__*/function(_Error){function f(){_classCallCheck(this,f);return _callSuper(this,f,arguments);}_inherits(f,_Error);return _createClass(f);}(/*#__PURE__*/_wrapNativeSuper(Error));_export("d",a=/*#__PURE__*/function(){function a(t,e,r){_classCallCheck(this,a);this.content=t,this.openStart=e,this.openEnd=r;}return _createClass(a,[{key:"size",get:function get(){return this.content.size-this.openStart-this.openEnd;}},{key:"insertAt",value:function insertAt(t,e){var r=p(this.content,t+this.openStart,e,this.openStart+1,this.openEnd+1);return r&&new a(r,this.openStart,this.openEnd);}},{key:"removeBetween",value:function removeBetween(t,e){return new a(c(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd);}},{key:"eq",value:function eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd;}},{key:"toString",value:function toString(){return this.content+"("+this.openStart+","+this.openEnd+")";}},{key:"toJSON",value:function toJSON(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t;}}],[{key:"fromJSON",value:function fromJSON(t,e){if(!e)return a.empty;var r=e.openStart||0,i=e.openEnd||0;if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new a(s.fromJSON(t,e.content),r,i);}},{key:"maxOpen",value:function maxOpen(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!0;var r=0,i=0;for(var _i5=t.firstChild;_i5&&!_i5.isLeaf&&(e||!_i5.type.spec.isolating);_i5=_i5.firstChild)r++;for(var _r9=t.lastChild;_r9&&!_r9.isLeaf&&(e||!_r9.type.spec.isolating);_r9=_r9.lastChild)i++;return new a(t,r,i);}}]);}());a.empty=new a(s.empty,0,0);x=/*#__PURE__*/function(){function x(t,e,r){_classCallCheck(this,x);this.pos=t,this.path=e,this.parentOffset=r,this.depth=e.length/3-1;}return _createClass(x,[{key:"resolveDepth",value:function resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t;}},{key:"parent",get:function get(){return this.node(this.depth);}},{key:"doc",get:function get(){return this.node(0);}},{key:"node",value:function node(t){return this.path[3*this.resolveDepth(t)];}},{key:"index",value:function index(t){return this.path[3*this.resolveDepth(t)+1];}},{key:"indexAfter",value:function indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0);}},{key:"start",value:function start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1;}},{key:"end",value:function end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size;}},{key:"before",value:function before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1];}},{key:"after",value:function after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize;}},{key:"textOffset",get:function get(){return this.pos-this.path[this.path.length-1];}},{key:"nodeAfter",get:function get(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var r=this.pos-this.path[this.path.length-1],i=t.child(e);return r?t.child(e).cut(r):i;}},{key:"nodeBefore",get:function get(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1);}},{key:"posAtIndex",value:function posAtIndex(t,e){e=this.resolveDepth(e);var r=this.path[3*e],i=0==e?0:this.path[3*e-1]+1;for(var _e10=0;_e10<t;_e10++)i+=r.child(_e10).nodeSize;return i;}},{key:"marks",value:function marks(){var t=this.parent,e=this.index();if(0==t.content.size)return u.none;if(this.textOffset)return t.child(e).marks;var r=t.maybeChild(e-1),i=t.maybeChild(e);if(!r){var _t8=r;r=i,i=_t8;}var n=r.marks;for(var s=0;s<n.length;s++)!1!==n[s].type.spec.inclusive||i&&n[s].isInSet(i.marks)||(n=n[s--].removeFromSet(n));return n;}},{key:"marksAcross",value:function marksAcross(t){var e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;var r=e.marks,i=t.parent.maybeChild(t.index());for(var n=0;n<r.length;n++)!1!==r[n].type.spec.inclusive||i&&r[n].isInSet(i.marks)||(r=r[n--].removeFromSet(r));return r;}},{key:"sharedDepth",value:function sharedDepth(t){for(var _e11=this.depth;_e11>0;_e11--)if(this.start(_e11)<=t&&this.end(_e11)>=t)return _e11;return 0;}},{key:"blockRange",value:function blockRange(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this;var e=arguments.length>1?arguments[1]:undefined;if(t.pos<this.pos)return t.blockRange(this);for(var _r10=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);_r10>=0;_r10--)if(t.pos<=this.end(_r10)&&(!e||e(this.node(_r10))))return new R(this,t,_r10);return null;}},{key:"sameParent",value:function sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset;}},{key:"max",value:function max(t){return t.pos>this.pos?t:this;}},{key:"min",value:function min(t){return t.pos<this.pos?t:this;}},{key:"toString",value:function toString(){var t="";for(var _e12=1;_e12<=this.depth;_e12++)t+=(t?"/":"")+this.node(_e12).type.name+"_"+this.index(_e12-1);return t+":"+this.parentOffset;}}],[{key:"resolve",value:function resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");var r=[],i=0,n=e;for(var _e13=t;;){var _e13$content$findInde=_e13.content.findIndex(n),_t9=_e13$content$findInde.index,_s7=_e13$content$findInde.offset,_h4=n-_s7;if(r.push(_e13,_t9,i+_s7),!_h4)break;if(_e13=_e13.child(_t9),_e13.isText)break;n=_h4-1,i+=_s7+1;}return new x(e,r,n);}},{key:"resolveCached",value:function resolveCached(t,e){var r=O.get(t);if(r)for(var _t10=0;_t10<r.elts.length;_t10++){var _i7=r.elts[_t10];if(_i7.pos==e)return _i7;}else O.set(t,r=new E());var i=r.elts[r.i]=x.resolve(t,e);return r.i=(r.i+1)%N,i;}}]);}();E=/*#__PURE__*/_createClass(function E(){_classCallCheck(this,E);this.elts=[],this.i=0;});N=12,O=new WeakMap();_export("h",R=/*#__PURE__*/function(){function R(t,e,r){_classCallCheck(this,R);this.$from=t,this.$to=e,this.depth=r;}return _createClass(R,[{key:"start",get:function get(){return this.$from.before(this.depth+1);}},{key:"end",get:function get(){return this.$to.after(this.depth+1);}},{key:"parent",get:function get(){return this.$from.node(this.depth);}},{key:"startIndex",get:function get(){return this.$from.index(this.depth);}},{key:"endIndex",get:function get(){return this.$to.indexAfter(this.depth);}}]);}());M=Object.create(null);_export("N",J=/*#__PURE__*/function(){function J(t,e,r){var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:u.none;_classCallCheck(this,J);this.type=t,this.attrs=e,this.marks=i,this.content=r||s.empty;}return _createClass(J,[{key:"children",get:function get(){return this.content.content;}},{key:"nodeSize",get:function get(){return this.isLeaf?1:2+this.content.size;}},{key:"childCount",get:function get(){return this.content.childCount;}},{key:"child",value:function child(t){return this.content.child(t);}},{key:"maybeChild",value:function maybeChild(t){return this.content.maybeChild(t);}},{key:"forEach",value:function forEach(t){this.content.forEach(t);}},{key:"nodesBetween",value:function nodesBetween(t,e,r){var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;this.content.nodesBetween(t,e,r,i,this);}},{key:"descendants",value:function descendants(t){this.nodesBetween(0,this.content.size,t);}},{key:"textContent",get:function get(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"");}},{key:"textBetween",value:function textBetween(t,e,r,i){return this.content.textBetween(t,e,r,i);}},{key:"firstChild",get:function get(){return this.content.firstChild;}},{key:"lastChild",get:function get(){return this.content.lastChild;}},{key:"eq",value:function eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content);}},{key:"sameMarkup",value:function sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks);}},{key:"hasMarkup",value:function hasMarkup(t,e,r){return this.type==t&&o(this.attrs,e||t.defaultAttrs||M)&&u.sameSet(this.marks,r||u.none);}},{key:"copy",value:function copy(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;return t==this.content?this:new J(this.type,this.attrs,t,this.marks);}},{key:"mark",value:function mark(t){return t==this.marks?this:new J(this.type,this.attrs,this.content,t);}},{key:"cut",value:function cut(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.content.size;return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e));}},{key:"slice",value:function slice(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.content.size;var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;if(t==e)return a.empty;var i=this.resolve(t),n=this.resolve(e),s=r?0:i.sharedDepth(e),h=i.start(s),l=i.node(s).content.cut(i.pos-h,n.pos-h);return new a(l,i.depth-s,n.depth-s);}},{key:"replace",value:function replace(t,e,r){return d(this.resolve(t),this.resolve(e),r);}},{key:"nodeAt",value:function nodeAt(t){for(var _e14=this;;){var _e14$content$findInde=_e14.content.findIndex(t),_r11=_e14$content$findInde.index,_i8=_e14$content$findInde.offset;if(_e14=_e14.maybeChild(_r11),!_e14)return null;if(_i8==t||_e14.isText)return _e14;t-=_i8+1;}}},{key:"childAfter",value:function childAfter(t){var _this$content$findInd=this.content.findIndex(t),e=_this$content$findInd.index,r=_this$content$findInd.offset;return{node:this.content.maybeChild(e),index:e,offset:r};}},{key:"childBefore",value:function childBefore(t){if(0==t)return{node:null,index:0,offset:0};var _this$content$findInd2=this.content.findIndex(t),e=_this$content$findInd2.index,r=_this$content$findInd2.offset;if(r<t)return{node:this.content.child(e),index:e,offset:r};var i=this.content.child(e-1);return{node:i,index:e-1,offset:r-i.nodeSize};}},{key:"resolve",value:function resolve(t){return x.resolveCached(this,t);}},{key:"resolveNoCache",value:function resolveNoCache(t){return x.resolve(this,t);}},{key:"rangeHasMark",value:function rangeHasMark(t,e,r){var i=!1;return e>t&&this.nodesBetween(t,e,function(t){return r.isInSet(t.marks)&&(i=!0),!i;}),i;}},{key:"isBlock",get:function get(){return this.type.isBlock;}},{key:"isTextblock",get:function get(){return this.type.isTextblock;}},{key:"inlineContent",get:function get(){return this.type.inlineContent;}},{key:"isInline",get:function get(){return this.type.isInline;}},{key:"isText",get:function get(){return this.type.isText;}},{key:"isLeaf",get:function get(){return this.type.isLeaf;}},{key:"isAtom",get:function get(){return this.type.isAtom;}},{key:"toString",value:function toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),T(this.marks,t);}},{key:"contentMatchAt",value:function contentMatchAt(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e;}},{key:"canReplace",value:function canReplace(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:s.empty;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:r.childCount;var h=this.contentMatchAt(t).matchFragment(r,i,n),l=h&&h.matchFragment(this.content,e);if(!l||!l.validEnd)return!1;for(var _t11=i;_t11<n;_t11++)if(!this.type.allowsMarks(r.child(_t11).marks))return!1;return!0;}},{key:"canReplaceWith",value:function canReplaceWith(t,e,r,i){if(i&&!this.type.allowsMarks(i))return!1;var n=this.contentMatchAt(t).matchType(r),s=n&&n.matchFragment(this.content,e);return!!s&&s.validEnd;}},{key:"canAppend",value:function canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type);}},{key:"check",value:function check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);var t=u.none;for(var _e15=0;_e15<this.marks.length;_e15++){var _r12=this.marks[_e15];_r12.type.checkAttrs(_r12.attrs),t=_r12.addToSet(t);}if(!u.sameSet(t,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map(function(t){return t.type.name;})));this.content.forEach(function(t){return t.check();});}},{key:"toJSON",value:function toJSON(){var t={type:this.type.name};for(var _e16 in this.attrs){t.attrs=this.attrs;break;}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(function(t){return t.toJSON();})),t;}}],[{key:"fromJSON",value:function fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");var r;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=e.marks.map(t.markFromJSON);}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,r);}var i=s.fromJSON(t,e.content),n=t.nodeType(e.type).create(e.attrs,i,r);return n.type.checkAttrs(n.attrs),n;}}]);}());J.prototype.text=void 0;I=/*#__PURE__*/function(_J){function I(t,e,r,i){var _this;_classCallCheck(this,I);if(_this=_callSuper(this,I,[t,e,null,i]),!r)throw new RangeError("Empty text nodes are not allowed");_this.text=r;return _this;}_inherits(I,_J);return _createClass(I,[{key:"toString",value:function toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):T(this.marks,JSON.stringify(this.text));}},{key:"textContent",get:function get(){return this.text;}},{key:"textBetween",value:function textBetween(t,e){return this.text.slice(t,e);}},{key:"nodeSize",get:function get(){return this.text.length;}},{key:"mark",value:function mark(t){return t==this.marks?this:new I(this.type,this.attrs,this.text,t);}},{key:"withText",value:function withText(t){return t==this.text?this:new I(this.type,this.attrs,t,this.marks);}},{key:"cut",value:function cut(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.text.length;return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e));}},{key:"eq",value:function eq(t){return this.sameMarkup(t)&&this.text==t.text;}},{key:"toJSON",value:function toJSON(){var t=_superPropGet(I,"toJSON",this,3)([]);return t.text=this.text,t;}}]);}(J);A=/*#__PURE__*/function(){function A(t){_classCallCheck(this,A);this.validEnd=t,this.next=[],this.wrapCache=[];}return _createClass(A,[{key:"matchType",value:function matchType(t){for(var _e17=0;_e17<this.next.length;_e17++)if(this.next[_e17].type==t)return this.next[_e17].next;return null;}},{key:"matchFragment",value:function matchFragment(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:t.childCount;var i=this;for(var _n7=e;i&&_n7<r;_n7++)i=i.matchType(t.child(_n7).type);return i;}},{key:"inlineContent",get:function get(){return 0!=this.next.length&&this.next[0].type.isInline;}},{key:"defaultType",get:function get(){for(var _t12=0;_t12<this.next.length;_t12++){var _e18=this.next[_t12].type;if(!_e18.isText&&!_e18.hasRequiredAttrs())return _e18;}return null;}},{key:"compatible",value:function compatible(t){for(var _e19=0;_e19<this.next.length;_e19++)for(var _r14=0;_r14<t.next.length;_r14++)if(this.next[_e19].type==t.next[_r14].type)return!0;return!1;}},{key:"fillBefore",value:function fillBefore(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var i=[this];return function n(h,l){var o=h.matchFragment(t,r);if(o&&(!e||o.validEnd))return s.from(l.map(function(t){return t.createAndFill();}));for(var _t13=0;_t13<h.next.length;_t13++){var _h$next$_t=h.next[_t13],_e20=_h$next$_t.type,_r15=_h$next$_t.next;if(!_e20.isText&&!_e20.hasRequiredAttrs()&&-1==i.indexOf(_r15)){i.push(_r15);var _t14=n(_r15,l.concat(_e20));if(_t14)return _t14;}}return null;}(this,[]);}},{key:"findWrapping",value:function findWrapping(t){for(var _e21=0;_e21<this.wrapCache.length;_e21+=2)if(this.wrapCache[_e21]==t)return this.wrapCache[_e21+1];var e=this.computeWrapping(t);return this.wrapCache.push(t,e),e;}},{key:"computeWrapping",value:function computeWrapping(t){var e=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){var _i9=r.shift(),_n8=_i9.match;if(_n8.matchType(t)){var _t15=[];for(var _e22=_i9;_e22.type;_e22=_e22.via)_t15.push(_e22.type);return _t15.reverse();}for(var _t16=0;_t16<_n8.next.length;_t16++){var _n8$next$_t=_n8.next[_t16],_s8=_n8$next$_t.type,_h5=_n8$next$_t.next;_s8.isLeaf||_s8.hasRequiredAttrs()||_s8.name in e||_i9.type&&!_h5.validEnd||(r.push({match:_s8.contentMatch,type:_s8,via:_i9}),e[_s8.name]=!0);}}return null;}},{key:"edgeCount",get:function get(){return this.next.length;}},{key:"edge",value:function edge(t){if(t>=this.next.length)throw new RangeError("There's no ".concat(t,"th edge in this content match"));return this.next[t];}},{key:"toString",value:function toString(){var t=[];return function e(r){t.push(r);for(var _i10=0;_i10<r.next.length;_i10++)-1==t.indexOf(r.next[_i10].next)&&e(r.next[_i10].next);}(this),t.map(function(e,r){var i=r+(e.validEnd?"*":" ")+" ";for(var _r16=0;_r16<e.next.length;_r16++)i+=(_r16?", ":"")+e.next[_r16].type.name+"->"+t.indexOf(e.next[_r16].next);return i;}).join("\n");}}],[{key:"parse",value:function parse(t,e){var r=new j(t,e);if(null==r.next)return A.empty;var i=C(r);r.next&&r.err("Unexpected trailing text");var n=function(t){var e=Object.create(null);return r(W(t,0));function r(i){var n=[];i.forEach(function(e){t[e].forEach(function(_ref2){var e=_ref2.term,r=_ref2.to;if(!e)return;var i;for(var _t17=0;_t17<n.length;_t17++)n[_t17][0]==e&&(i=n[_t17][1]);W(t,r).forEach(function(t){i||n.push([e,i=[]]),-1==i.indexOf(t)&&i.push(t);});});});var s=e[i.join(",")]=new A(i.indexOf(t.length-1)>-1);for(var _t18=0;_t18<n.length;_t18++){var _i11=n[_t18][1].sort(q);s.next.push({type:n[_t18][0],next:e[_i11.join(",")]||r(_i11)});}return s;}}(function(t){var e=[[]];return n(s(t,0),r()),e;function r(){return e.push([])-1;}function i(t,r,i){var n={term:i,to:r};return e[t].push(n),n;}function n(t,e){t.forEach(function(t){return t.to=e;});}function s(t,e){if("choice"==t.type)return t.exprs.reduce(function(t,r){return t.concat(s(r,e));},[]);if("seq"!=t.type){if("star"==t.type){var _h6=r();return i(e,_h6),n(s(t.expr,_h6),_h6),[i(_h6)];}if("plus"==t.type){var _h7=r();return n(s(t.expr,e),_h7),n(s(t.expr,_h7),_h7),[i(_h7)];}if("opt"==t.type)return[i(e)].concat(s(t.expr,e));if("range"==t.type){var _h8=e;for(var _e23=0;_e23<t.min;_e23++){var _e24=r();n(s(t.expr,_h8),_e24),_h8=_e24;}if(-1==t.max)n(s(t.expr,_h8),_h8);else for(var _e25=t.min;_e25<t.max;_e25++){var _e26=r();i(_h8,_e26),n(s(t.expr,_h8),_e26),_h8=_e26;}return[i(_h8)];}if("name"==t.type)return[i(e,void 0,t.value)];throw new Error("Unknown expr type");}for(var _i12=0;;_i12++){var _h9=s(t.exprs[_i12],e);if(_i12==t.exprs.length-1)return _h9;n(_h9,e=r());}}}(i));return function(t,e){for(var _r17=0,_i13=[t];_r17<_i13.length;_r17++){var _t19=_i13[_r17],_n9=!_t19.validEnd,_s9=[];for(var _e27=0;_e27<_t19.next.length;_e27++){var _t19$next$_e=_t19.next[_e27],_r18=_t19$next$_e.type,_h10=_t19$next$_e.next;_s9.push(_r18.name),!_n9||_r18.isText||_r18.hasRequiredAttrs()||(_n9=!1),-1==_i13.indexOf(_h10)&&_i13.push(_h10);}_n9&&e.err("Only non-generatable nodes ("+_s9.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)");}}(n,r),n;}}]);}();A.empty=new A(!0);j=/*#__PURE__*/function(){function j(t,e){_classCallCheck(this,j);this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift();}return _createClass(j,[{key:"next",get:function get(){return this.tokens[this.pos];}},{key:"eat",value:function eat(t){return this.next==t&&(this.pos++||!0);}},{key:"err",value:function err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')");}}]);}();L=/*#__PURE__*/function(){function L(t,e,r){_classCallCheck(this,L);this.name=t,this.schema=e,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=_(t,r.attrs),this.defaultAttrs=z(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t;}return _createClass(L,[{key:"isInline",get:function get(){return!this.isBlock;}},{key:"isTextblock",get:function get(){return this.isBlock&&this.inlineContent;}},{key:"isLeaf",get:function get(){return this.contentMatch==A.empty;}},{key:"isAtom",get:function get(){return this.isLeaf||!!this.spec.atom;}},{key:"isInGroup",value:function isInGroup(t){return this.groups.indexOf(t)>-1;}},{key:"whitespace",get:function get(){return this.spec.whitespace||(this.spec.code?"pre":"normal");}},{key:"hasRequiredAttrs",value:function hasRequiredAttrs(){for(var _t22 in this.attrs)if(this.attrs[_t22].isRequired)return!0;return!1;}},{key:"compatibleContent",value:function compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch);}},{key:"computeAttrs",value:function computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:P(this.attrs,t);}},{key:"create",value:function create(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var e=arguments.length>1?arguments[1]:undefined;var r=arguments.length>2?arguments[2]:undefined;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new J(this,this.computeAttrs(t),s.from(e),u.setFrom(r));}},{key:"createChecked",value:function createChecked(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var e=arguments.length>1?arguments[1]:undefined;var r=arguments.length>2?arguments[2]:undefined;return e=s.from(e),this.checkContent(e),new J(this,this.computeAttrs(t),e,u.setFrom(r));}},{key:"createAndFill",value:function createAndFill(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var e=arguments.length>1?arguments[1]:undefined;var r=arguments.length>2?arguments[2]:undefined;if(t=this.computeAttrs(t),(e=s.from(e)).size){var _t23=this.contentMatch.fillBefore(e);if(!_t23)return null;e=_t23.append(e);}var i=this.contentMatch.matchFragment(e),n=i&&i.fillBefore(s.empty,!0);return n?new J(this,t,e.append(n),u.setFrom(r)):null;}},{key:"validContent",value:function validContent(t){var e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(var _e31=0;_e31<t.childCount;_e31++)if(!this.allowsMarks(t.child(_e31).marks))return!1;return!0;}},{key:"checkContent",value:function checkContent(t){if(!this.validContent(t))throw new RangeError("Invalid content for node ".concat(this.name,": ").concat(t.toString().slice(0,50)));}},{key:"checkAttrs",value:function checkAttrs(t){U(this.attrs,t,"node",this.name);}},{key:"allowsMarkType",value:function allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1;}},{key:"allowsMarks",value:function allowsMarks(t){if(null==this.markSet)return!0;for(var _e32=0;_e32<t.length;_e32++)if(!this.allowsMarkType(t[_e32].type))return!1;return!0;}},{key:"allowedMarks",value:function allowedMarks(t){if(null==this.markSet)return t;var e;for(var _r21=0;_r21<t.length;_r21++)this.allowsMarkType(t[_r21].type)?e&&e.push(t[_r21]):e||(e=t.slice(0,_r21));return e?e.length?e:u.none:t;}}],[{key:"compile",value:function compile(t,e){var r=Object.create(null);t.forEach(function(t,i){return r[t]=new L(t,e,i);});var i=e.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var _t24 in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r;}}]);}();G=/*#__PURE__*/function(){function G(t,e,r){_classCallCheck(this,G);this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this["default"]=r["default"],this.validate="string"==typeof r.validate?function(t,e,r){var i=r.split("|");return function(r){var n=null===r?"null":_typeof(r);if(i.indexOf(n)<0)throw new RangeError("Expected value of type ".concat(i," for attribute ").concat(e," on type ").concat(t,", got ").concat(n));};}(t,e,r.validate):r.validate;}return _createClass(G,[{key:"isRequired",get:function get(){return!this.hasDefault;}}]);}();V=/*#__PURE__*/function(){function V(t,e,r,i){_classCallCheck(this,V);this.name=t,this.rank=e,this.schema=r,this.spec=i,this.attrs=_(t,i.attrs),this.excluded=null;var n=z(this.attrs);this.instance=n?new u(this,n):null;}return _createClass(V,[{key:"create",value:function create(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;return!t&&this.instance?this.instance:new u(this,P(this.attrs,t));}},{key:"removeFromSet",value:function removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t;}},{key:"isInSet",value:function isInSet(t){for(var _e33=0;_e33<t.length;_e33++)if(t[_e33].type==this)return t[_e33];}},{key:"checkAttrs",value:function checkAttrs(t){U(this.attrs,t,"mark",this.name);}},{key:"excludes",value:function excludes(t){return this.excluded.indexOf(t)>-1;}}],[{key:"compile",value:function compile(t,e){var r=Object.create(null),i=0;return t.forEach(function(t,n){return r[t]=new V(t,i++,e,n);}),r;}}]);}();_export("j",H=/*#__PURE__*/function(){function H(e){var _this2=this;_classCallCheck(this,H);this.linebreakReplacement=null,this.cached=Object.create(null);var r=this.spec={};for(var _t25 in e)r[_t25]=e[_t25];r.nodes=t.from(e.nodes),r.marks=t.from(e.marks||{}),this.nodes=L.compile(this.spec.nodes,this),this.marks=V.compile(this.spec.marks,this);var i=Object.create(null);for(var _t26 in this.nodes){if(_t26 in this.marks)throw new RangeError(_t26+" can not be both a node and a mark");var _e34=this.nodes[_t26],_r22=_e34.spec.content||"",_n12=_e34.spec.marks;if(_e34.contentMatch=i[_r22]||(i[_r22]=A.parse(_r22,this.nodes)),_e34.inlineContent=_e34.contentMatch.inlineContent,_e34.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!_e34.isInline||!_e34.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=_e34;}_e34.markSet="_"==_n12?null:_n12?K(this,_n12.split(" ")):""!=_n12&&_e34.inlineContent?null:[];}for(var _t27 in this.marks){var _e35=this.marks[_t27],_r23=_e35.spec.excludes;_e35.excluded=null==_r23?[_e35]:""==_r23?[]:K(this,_r23.split(" "));}this.nodeFromJSON=function(t){return J.fromJSON(_this2,t);},this.markFromJSON=function(t){return u.fromJSON(_this2,t);},this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null);}return _createClass(H,[{key:"node",value:function node(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var r=arguments.length>2?arguments[2]:undefined;var i=arguments.length>3?arguments[3]:undefined;if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof L))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")");}return t.createChecked(e,r,i);}},{key:"text",value:function text(t,e){var r=this.nodes.text;return new I(r,r.defaultAttrs,t,u.setFrom(e));}},{key:"mark",value:function mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e);}},{key:"nodeType",value:function nodeType(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e;}}]);}());_export("D",Q=/*#__PURE__*/function(){function Q(t,e){var _this3=this;_classCallCheck(this,Q);this.schema=t,this.rules=e,this.tags=[],this.styles=[];var r=this.matchedStyles=[];e.forEach(function(t){if(function(t){return null!=t.tag;}(t))_this3.tags.push(t);else if(function(t){return null!=t.style;}(t)){var _e37=/[^=]*/.exec(t.style)[0];r.indexOf(_e37)<0&&r.push(_e37),_this3.styles.push(t);}}),this.normalizeLists=!this.tags.some(function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var r=t.nodes[e.node];return r.contentMatch.matchType(r);});}return _createClass(Q,[{key:"parse",value:function parse(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=new rt(this,e,!1);return r.addAll(t,u.none,e.from,e.to),r.finish();}},{key:"parseSlice",value:function parseSlice(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=new rt(this,e,!0);return r.addAll(t,u.none,e.from,e.to),a.maxOpen(r.finish());}},{key:"matchTag",value:function matchTag(t,e,r){for(var _i21=r?this.tags.indexOf(r)+1:0;_i21<this.tags.length;_i21++){var _r24=this.tags[_i21];if(it(t,_r24.tag)&&(void 0===_r24.namespace||t.namespaceURI==_r24.namespace)&&(!_r24.context||e.matchesContext(_r24.context))){if(_r24.getAttrs){var _e38=_r24.getAttrs(t);if(!1===_e38)continue;_r24.attrs=_e38||void 0;}return _r24;}}}},{key:"matchStyle",value:function matchStyle(t,e,r,i){for(var _n14=i?this.styles.indexOf(i)+1:0;_n14<this.styles.length;_n14++){var _i22=this.styles[_n14],_s12=_i22.style;if(!(0!=_s12.indexOf(t)||_i22.context&&!r.matchesContext(_i22.context)||_s12.length>t.length&&(61!=_s12.charCodeAt(t.length)||_s12.slice(t.length+1)!=e))){if(_i22.getAttrs){var _t28=_i22.getAttrs(e);if(!1===_t28)continue;_i22.attrs=_t28||void 0;}return _i22;}}}}],[{key:"schemaRules",value:function schemaRules(t){var e=[];function r(t){var r=null==t.priority?50:t.priority,i=0;for(;i<e.length;i++){var _t29=e[i];if((null==_t29.priority?50:_t29.priority)<r)break;}e.splice(i,0,t);}var _loop=function _loop(_e39){var i=t.marks[_e39].spec.parseDOM;i&&i.forEach(function(t){r(t=nt(t)),t.mark||t.ignore||t.clearMark||(t.mark=_e39);});};for(var _e39 in t.marks){_loop(_e39);}var _loop2=function _loop2(_e40){var i=t.nodes[_e40].spec.parseDOM;i&&i.forEach(function(t){r(t=nt(t)),t.node||t.ignore||t.mark||(t.node=_e40);});};for(var _e40 in t.nodes){_loop2(_e40);}return e;}},{key:"fromSchema",value:function fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Q(t,Q.schemaRules(t)));}}]);}());X={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Y={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Z={ol:!0,ul:!0};et=/*#__PURE__*/function(){function et(t,e,r,i,n,s){_classCallCheck(this,et);this.type=t,this.attrs=e,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=u.none,this.match=n||(4&s?null:t.contentMatch);}return _createClass(et,[{key:"findWrapping",value:function findWrapping(t){if(!this.match){if(!this.type)return[];var _e41=this.type.contentMatch.fillBefore(s.from(t));if(!_e41){var _e42,_r25=this.type.contentMatch;return(_e42=_r25.findWrapping(t.type))?(this.match=_r25,_e42):null;}this.match=this.type.contentMatch.matchFragment(_e41);}return this.match.findWrapping(t.type);}},{key:"finish",value:function finish(t){if(!(1&this.options)){var _t30,_e43=this.content[this.content.length-1];if(_e43&&_e43.isText&&(_t30=/[ \t\r\n\u000c]+$/.exec(_e43.text))){var _r26=_e43;_e43.text.length==_t30[0].length?this.content.pop():this.content[this.content.length-1]=_r26.withText(_r26.text.slice(0,_r26.text.length-_t30[0].length));}}var e=s.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(s.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e;}},{key:"inlineContext",value:function inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!X.hasOwnProperty(t.parentNode.nodeName.toLowerCase());}}]);}();rt=/*#__PURE__*/function(){function rt(t,e,r){_classCallCheck(this,rt);this.parser=t,this.options=e,this.isOpen=r,this.open=0,this.localPreserveWS=!1;var i,n=e.topNode,s=tt(null,e.preserveWhitespace,0)|(r?4:0);i=n?new et(n.type,n.attrs,u.none,!0,e.topMatch||n.type.contentMatch,s):new et(r?null:t.schema.topNodeType,null,u.none,!0,null,s),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1;}return _createClass(rt,[{key:"top",get:function get(){return this.nodes[this.open];}},{key:"addDOM",value:function addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e);}},{key:"addTextNode",value:function addTextNode(t,e){var r=t.nodeValue,i=this.top,n=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,s=this.parser.schema;if("full"===n||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(n){if("full"===n)r=r.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){var _t31=r.split(/\r?\n|\r/);for(var _r27=0;_r27<_t31.length;_r27++)_r27&&this.insertNode(s.linebreakReplacement.create(),e,!0),_t31[_r27]&&this.insertNode(s.text(_t31[_r27]),e,!/\S/.test(_t31[_r27]));r="";}else r=r.replace(/\r?\n|\r/g," ");}else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){var _e44=i.content[i.content.length-1],_n15=t.previousSibling;(!_e44||_n15&&"BR"==_n15.nodeName||_e44.isText&&/[ \t\r\n\u000c]$/.test(_e44.text))&&(r=r.slice(1));}r&&this.insertNode(s.text(r),e,!/\S/.test(r)),this.findInText(t);}else this.findInside(t);}},{key:"addElement",value:function addElement(t,e,r){var i=this.localPreserveWS,n=this.top;("PRE"==t.tagName||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);var s,h=t.nodeName.toLowerCase();Z.hasOwnProperty(h)&&this.parser.normalizeLists&&function(t){for(var _e45=t.firstChild,_r28=null;_e45;_e45=_e45.nextSibling){var _t32=1==_e45.nodeType?_e45.nodeName.toLowerCase():null;_t32&&Z.hasOwnProperty(_t32)&&_r28?(_r28.appendChild(_e45),_e45=_r28):"li"==_t32?_r28=_e45:_t32&&(_r28=null);}}(t);var l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,r));t:if(l?l.ignore:Y.hasOwnProperty(h))this.findInside(t),this.ignoreFallback(t,e);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);var _r29,_i23=this.needsBlock;if(X.hasOwnProperty(h))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),_r29=!0,n.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break t;}var _s13=l&&l.skip?e:this.readStyles(t,e);_s13&&this.addAll(t,_s13),_r29&&this.sync(n),this.needsBlock=_i23;}else{var _r30=this.readStyles(t,e);_r30&&this.addElementByRule(t,l,_r30,!1===l.consuming?s:void 0);}this.localPreserveWS=i;}},{key:"leafFallback",value:function leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e);}},{key:"ignoreFallback",value:function ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e,!0);}},{key:"readStyles",value:function readStyles(t,e){var _this4=this;var r=t.style;if(r&&r.length)for(var _t33=0;_t33<this.parser.matchedStyles.length;_t33++){var _i24=this.parser.matchedStyles[_t33],_n16=r.getPropertyValue(_i24);if(_n16){var _loop3=function _loop3(_t35){var r=_this4.parser.matchStyle(_i24,_n16,_this4,_t35);if(!r){_t34=_t35;return 0;}// break
|
|
3
|
+
if(r.ignore)return{v:null};if(e=r.clearMark?e.filter(function(t){return!r.clearMark(t);}):e.concat(_this4.parser.schema.marks[r.mark].create(r.attrs)),!1!==r.consuming){_t34=_t35;return 0;}// break
|
|
4
|
+
_t35=r;_t34=_t35;},_ret;for(var _t34;;){_ret=_loop3(_t34);if(_ret===0)break;if(_ret)return _ret.v;}}}return e;}},{key:"addElementByRule",value:function addElementByRule(t,e,r,i){var _this5=this;var n,s;if(e.node){if(s=this.parser.schema.nodes[e.node],s.isLeaf)this.insertNode(s.create(e.attrs),r,"BR"==t.nodeName)||this.leafFallback(t,r);else{var _t36=this.enter(s,e.attrs||null,r,e.preserveWhitespace);_t36&&(n=!0,r=_t36);}}else{var _t37=this.parser.schema.marks[e.mark];r=r.concat(_t37.create(e.attrs));}var h=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(function(t){return _this5.insertNode(t,r,!1);});else{var _i25=t;"string"==typeof e.contentElement?_i25=t.querySelector(e.contentElement):"function"==typeof e.contentElement?_i25=e.contentElement(t):e.contentElement&&(_i25=e.contentElement),this.findAround(t,_i25,!0),this.addAll(_i25,r),this.findAround(t,_i25,!1);}n&&this.sync(h)&&this.open--;}},{key:"addAll",value:function addAll(t,e,r,i){var n=r||0;for(var _s14=r?t.childNodes[r]:t.firstChild,_h12=null==i?null:t.childNodes[i];_s14!=_h12;_s14=_s14.nextSibling,++n)this.findAtPoint(t,n),this.addDOM(_s14,e);this.findAtPoint(t,n);}},{key:"findPlace",value:function findPlace(t,e,r){var i,n;for(var _e46=this.open,_s15=0;_e46>=0;_e46--){var _h13=this.nodes[_e46],_l7=_h13.findWrapping(t);if(_l7&&(!i||i.length>_l7.length+_s15)&&(i=_l7,n=_h13,!_l7.length))break;if(_h13.solid){if(r)break;_s15+=2;}}if(!i)return null;this.sync(n);for(var _t38=0;_t38<i.length;_t38++)e=this.enterInner(i[_t38],null,e,!1);return e;}},{key:"insertNode",value:function insertNode(t,e,r){if(t.isInline&&this.needsBlock&&!this.top.type){var _t39=this.textblockFromContext();_t39&&(e=this.enterInner(_t39,null,e));}var i=this.findPlace(t,e,r);if(i){this.closeExtra();var _e47=this.top;_e47.match&&(_e47.match=_e47.match.matchType(t.type));var _r31=u.none;var _iterator=_createForOfIteratorHelper(i.concat(t.marks)),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _n17=_step.value;(_e47.type?_e47.type.allowsMarkType(_n17.type):st(_n17.type,t.type))&&(_r31=_n17.addToSet(_r31));}}catch(err){_iterator.e(err);}finally{_iterator.f();}return _e47.content.push(t.mark(_r31)),!0;}return!1;}},{key:"enter",value:function enter(t,e,r,i){var n=this.findPlace(t.create(e),r,!1);return n&&(n=this.enterInner(t,e,r,!0,i)),n;}},{key:"enterInner",value:function enterInner(t,e,r){var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;var n=arguments.length>4?arguments[4]:undefined;this.closeExtra();var s=this.top;s.match=s.match&&s.match.matchType(t);var h=tt(t,n,s.options);4&s.options&&0==s.content.length&&(h|=4);var l=u.none;return r=r.filter(function(e){return!(s.type?s.type.allowsMarkType(e.type):st(e.type,t))||(l=e.addToSet(l),!1);}),this.nodes.push(new et(t,e,l,i,null,h)),this.open++,r;}},{key:"closeExtra",value:function closeExtra(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;var e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1;}}},{key:"finish",value:function finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen));}},{key:"sync",value:function sync(t){for(var _e48=this.open;_e48>=0;_e48--){if(this.nodes[_e48]==t)return this.open=_e48,!0;this.localPreserveWS&&(this.nodes[_e48].options|=1);}return!1;}},{key:"currentPos",get:function get(){this.closeExtra();var t=0;for(var _e49=this.open;_e49>=0;_e49--){var _r32=this.nodes[_e49].content;for(var _e50=_r32.length-1;_e50>=0;_e50--)t+=_r32[_e50].nodeSize;_e49&&t++;}return t;}},{key:"findAtPoint",value:function findAtPoint(t,e){if(this.find)for(var _r33=0;_r33<this.find.length;_r33++)this.find[_r33].node==t&&this.find[_r33].offset==e&&(this.find[_r33].pos=this.currentPos);}},{key:"findInside",value:function findInside(t){if(this.find)for(var _e51=0;_e51<this.find.length;_e51++)null==this.find[_e51].pos&&1==t.nodeType&&t.contains(this.find[_e51].node)&&(this.find[_e51].pos=this.currentPos);}},{key:"findAround",value:function findAround(t,e,r){if(t!=e&&this.find)for(var _i26=0;_i26<this.find.length;_i26++)if(null==this.find[_i26].pos&&1==t.nodeType&&t.contains(this.find[_i26].node)){e.compareDocumentPosition(this.find[_i26].node)&(r?2:4)&&(this.find[_i26].pos=this.currentPos);}}},{key:"findInText",value:function findInText(t){if(this.find)for(var _e52=0;_e52<this.find.length;_e52++)this.find[_e52].node==t&&(this.find[_e52].pos=this.currentPos-(t.nodeValue.length-this.find[_e52].offset));}},{key:"matchesContext",value:function matchesContext(t){var _this6=this;if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var e=t.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),n=-(r?r.depth+1:0)+(i?0:1),_s16=function s(t,h){for(;t>=0;t--){var _l8=e[t];if(""==_l8){if(t==e.length-1||0==t)continue;for(;h>=n;h--)if(_s16(t-1,h))return!0;return!1;}{var _t40=h>0||0==h&&i?_this6.nodes[h].type:r&&h>=n?r.node(h-n).type:null;if(!_t40||_t40.name!=_l8&&!_t40.isInGroup(_l8))return!1;h--;}}return!0;};return _s16(e.length-1,this.open);}},{key:"textblockFromContext",value:function textblockFromContext(){var t=this.options.context;if(t)for(var _e53=t.depth;_e53>=0;_e53--){var _r34=t.node(_e53).contentMatchAt(t.indexAfter(_e53)).defaultType;if(_r34&&_r34.isTextblock&&_r34.defaultAttrs)return _r34;}for(var _t41 in this.parser.schema.nodes){var _e54=this.parser.schema.nodes[_t41];if(_e54.isTextblock&&_e54.defaultAttrs)return _e54;}}}]);}();_export("a",ht=/*#__PURE__*/function(){function ht(t,e){_classCallCheck(this,ht);this.nodes=t,this.marks=e;}return _createClass(ht,[{key:"serializeFragment",value:function serializeFragment(t){var _this7=this;var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=arguments.length>2?arguments[2]:undefined;r||(r=ot(e).createDocumentFragment());var i=r,n=[];return t.forEach(function(t){if(n.length||t.marks.length){var _r37=0,_s17=0;for(;_r37<n.length&&_s17<t.marks.length;){var _e55=t.marks[_s17];if(_this7.marks[_e55.type.name]){if(!_e55.eq(n[_r37][0])||!1===_e55.type.spec.spanning)break;_r37++,_s17++;}else _s17++;}for(;_r37<n.length;)i=n.pop()[1];for(;_s17<t.marks.length;){var _r38=t.marks[_s17++],_h15=_this7.serializeMark(_r38,t.isInline,e);_h15&&(n.push([_r38,i]),i.appendChild(_h15.dom),i=_h15.contentDOM||_h15.dom);}}i.appendChild(_this7.serializeNodeInner(t,e));}),r;}},{key:"serializeNodeInner",value:function serializeNodeInner(t,e){if(t.isText)return ot(e).createTextNode(t.text);var _at=at(ot(e),this.nodes[t.type.name](t),null,t.attrs),r=_at.dom,i=_at.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,i);}return r;}},{key:"serializeNode",value:function serializeNode(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=this.serializeNodeInner(t,e);for(var _i29=t.marks.length-1;_i29>=0;_i29--){var _n19=this.serializeMark(t.marks[_i29],t.isInline,e);_n19&&((_n19.contentDOM||_n19.dom).appendChild(r),r=_n19.dom);}return r;}},{key:"serializeMark",value:function serializeMark(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var i=this.marks[t.type.name];return i&&at(ot(r),i(t,e),null,t.attrs);}}],[{key:"renderSpec",value:function renderSpec(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3?arguments[3]:undefined;return"string"==typeof e?{dom:t.createTextNode(e)}:at(t,e,r,i);}},{key:"fromSchema",value:function fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ht(this.nodesFromSchema(t),this.marksFromSchema(t)));}},{key:"nodesFromSchema",value:function nodesFromSchema(t){var e=lt(t.nodes);return e.text||(e.text=function(t){return t.text;}),e;}},{key:"marksFromSchema",value:function marksFromSchema(t){return lt(t.marks);}}]);}());ut=new WeakMap();ct=Math.pow(2,16);dt=/*#__PURE__*/function(){function dt(t,e,r){_classCallCheck(this,dt);this.pos=t,this.delInfo=e,this.recover=r;}return _createClass(dt,[{key:"deleted",get:function get(){return(8&this.delInfo)>0;}},{key:"deletedBefore",get:function get(){return(5&this.delInfo)>0;}},{key:"deletedAfter",get:function get(){return(6&this.delInfo)>0;}},{key:"deletedAcross",get:function get(){return(4&this.delInfo)>0;}}]);}();wt=/*#__PURE__*/function(){function wt(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck(this,wt);if(this.ranges=t,this.inverted=e,!t.length&&wt.empty)return wt.empty;}return _createClass(wt,[{key:"recover",value:function recover(t){var e=0,r=pt(t);if(!this.inverted)for(var _t43=0;_t43<r;_t43++)e+=this.ranges[3*_t43+2]-this.ranges[3*_t43+1];return this.ranges[3*r]+e+function(t){return(t-(65535&t))/ct;}(t);}},{key:"mapResult",value:function mapResult(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return this._map(t,e,!1);}},{key:"map",value:function map(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return this._map(t,e,!0);}},{key:"_map",value:function _map(t,e,r){var i=0,n=this.inverted?2:1,s=this.inverted?1:2;for(var _h16=0;_h16<this.ranges.length;_h16+=3){var _l9=this.ranges[_h16]-(this.inverted?i:0);if(_l9>t)break;var _o4=this.ranges[_h16+n],_u2=this.ranges[_h16+s],_f2=_l9+_o4;if(t<=_f2){var _n22=_l9+i+((_o4?t==_l9?-1:t==_f2?1:e:e)<0?0:_u2);if(r)return _n22;var _s19=t==(e<0?_l9:_f2)?null:_h16/3+(t-_l9)*ct,_a2=t==_l9?2:t==_f2?1:4;return(e<0?t!=_l9:t!=_f2)&&(_a2|=8),new dt(_n22,_a2,_s19);}i+=_u2-_o4;}return r?t+i:new dt(t+i,0,null);}},{key:"touches",value:function touches(t,e){var r=0,i=pt(e),n=this.inverted?2:1,s=this.inverted?1:2;for(var _e60=0;_e60<this.ranges.length;_e60+=3){var _h17=this.ranges[_e60]-(this.inverted?r:0);if(_h17>t)break;var _l10=this.ranges[_e60+n];if(t<=_h17+_l10&&_e60==3*i)return!0;r+=this.ranges[_e60+s]-_l10;}return!1;}},{key:"forEach",value:function forEach(t){var e=this.inverted?2:1,r=this.inverted?1:2;for(var _i31=0,_n23=0;_i31<this.ranges.length;_i31+=3){var _s20=this.ranges[_i31],_h18=_s20-(this.inverted?_n23:0),_l11=_s20+(this.inverted?0:_n23),_o5=this.ranges[_i31+e],_u3=this.ranges[_i31+r];t(_h18,_h18+_o5,_l11,_l11+_u3),_n23+=_u3-_o5;}}},{key:"invert",value:function invert(){return new wt(this.ranges,!this.inverted);}},{key:"toString",value:function toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges);}}],[{key:"offset",value:function offset(t){return 0==t?wt.empty:new wt(t<0?[0,-t,0]:[0,0,t]);}}]);}();wt.empty=new wt([]);_export("n",gt=/*#__PURE__*/function(){function gt(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:t?t.length:0;_classCallCheck(this,gt);this.mirror=e,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||e);}return _createClass(gt,[{key:"maps",get:function get(){return this._maps;}},{key:"slice",value:function slice(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.maps.length;return new gt(this._maps,this.mirror,t,e);}},{key:"appendMap",value:function appendMap(t,e){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),null!=e&&this.setMirror(this._maps.length-1,e);}},{key:"appendMapping",value:function appendMapping(t){for(var _e61=0,_r40=this._maps.length;_e61<t._maps.length;_e61++){var _i32=t.getMirror(_e61);this.appendMap(t._maps[_e61],null!=_i32&&_i32<_e61?_r40+_i32:void 0);}}},{key:"getMirror",value:function getMirror(t){if(this.mirror)for(var _e62=0;_e62<this.mirror.length;_e62++)if(this.mirror[_e62]==t)return this.mirror[_e62+(_e62%2?-1:1)];}},{key:"setMirror",value:function setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e);}},{key:"appendMappingInverted",value:function appendMappingInverted(t){for(var _e63=t.maps.length-1,_r41=this._maps.length+t._maps.length;_e63>=0;_e63--){var _i33=t.getMirror(_e63);this.appendMap(t._maps[_e63].invert(),null!=_i33&&_i33>_e63?_r41-_i33-1:void 0);}}},{key:"invert",value:function invert(){var t=new gt();return t.appendMappingInverted(this),t;}},{key:"map",value:function map(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;if(this.mirror)return this._map(t,e,!0);for(var _r42=this.from;_r42<this.to;_r42++)t=this._maps[_r42].map(t,e);return t;}},{key:"mapResult",value:function mapResult(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return this._map(t,e,!1);}},{key:"_map",value:function _map(t,e,r){var i=0;for(var _r43=this.from;_r43<this.to;_r43++){var _n24=this._maps[_r43].mapResult(t,e);if(null!=_n24.recover){var _e64=this.getMirror(_r43);if(null!=_e64&&_e64>_r43&&_e64<this.to){_r43=_e64,t=this._maps[_e64].recover(_n24.recover);continue;}}i|=_n24.delInfo,t=_n24.pos;}return r?t:new dt(t,i,null);}}]);}());mt=Object.create(null);yt=/*#__PURE__*/function(){function yt(){_classCallCheck(this,yt);}return _createClass(yt,[{key:"getMap",value:function getMap(){return wt.empty;}},{key:"merge",value:function merge(t){return null;}}],[{key:"fromJSON",value:function fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=mt[e.stepType];if(!r)throw new RangeError("No step type ".concat(e.stepType," defined"));return r.fromJSON(t,e);}},{key:"jsonID",value:function jsonID(t,e){if(t in mt)throw new RangeError("Duplicate use of step JSON ID "+t);return mt[t]=e,e.prototype.jsonID=t,e;}}]);}();St=/*#__PURE__*/function(){function St(t,e){_classCallCheck(this,St);this.doc=t,this.failed=e;}return _createClass(St,null,[{key:"ok",value:function ok(t){return new St(t,null);}},{key:"fail",value:function fail(t){return new St(null,t);}},{key:"fromReplace",value:function fromReplace(t,e,r,i){try{return St.ok(t.replace(e,r,i));}catch(t){if(t instanceof f)return St.fail(t.message);throw t;}}}]);}();vt=/*#__PURE__*/function(_yt){function vt(t,e,r){var _this8;_classCallCheck(this,vt);_this8=_callSuper(this,vt),_this8.from=t,_this8.to=e,_this8.mark=r;return _this8;}_inherits(vt,_yt);return _createClass(vt,[{key:"apply",value:function apply(t){var _this9=this;var e=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),n=new a(bt(e.content,function(t,e){return t.isAtom&&e.type.allowsMarkType(_this9.mark.type)?t.mark(_this9.mark.addToSet(t.marks)):t;},i),e.openStart,e.openEnd);return St.fromReplace(t,this.from,this.to,n);}},{key:"invert",value:function invert(){return new kt(this.from,this.to,this.mark);}},{key:"map",value:function map(t){var e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new vt(e.pos,r.pos,this.mark);}},{key:"merge",value:function merge(t){return t instanceof vt&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new vt(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null;}},{key:"toJSON",value:function toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to};}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new vt(e.from,e.to,t.markFromJSON(e.mark));}}]);}(yt);yt.jsonID("addMark",vt);kt=/*#__PURE__*/function(_yt2){function kt(t,e,r){var _this10;_classCallCheck(this,kt);_this10=_callSuper(this,kt),_this10.from=t,_this10.to=e,_this10.mark=r;return _this10;}_inherits(kt,_yt2);return _createClass(kt,[{key:"apply",value:function apply(t){var _this11=this;var e=t.slice(this.from,this.to),r=new a(bt(e.content,function(t){return t.mark(_this11.mark.removeFromSet(t.marks));},t),e.openStart,e.openEnd);return St.fromReplace(t,this.from,this.to,r);}},{key:"invert",value:function invert(){return new vt(this.from,this.to,this.mark);}},{key:"map",value:function map(t){var e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new kt(e.pos,r.pos,this.mark);}},{key:"merge",value:function merge(t){return t instanceof kt&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new kt(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null;}},{key:"toJSON",value:function toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to};}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new kt(e.from,e.to,t.markFromJSON(e.mark));}}]);}(yt);yt.jsonID("removeMark",kt);xt=/*#__PURE__*/function(_yt3){function xt(t,e){var _this12;_classCallCheck(this,xt);_this12=_callSuper(this,xt),_this12.pos=t,_this12.mark=e;return _this12;}_inherits(xt,_yt3);return _createClass(xt,[{key:"apply",value:function apply(t){var e=t.nodeAt(this.pos);if(!e)return St.fail("No node at mark step's position");var r=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return St.fromReplace(t,this.pos,this.pos+1,new a(s.from(r),0,e.isLeaf?0:1));}},{key:"invert",value:function invert(t){var e=t.nodeAt(this.pos);if(e){var _t44=this.mark.addToSet(e.marks);if(_t44.length==e.marks.length){for(var _r44=0;_r44<e.marks.length;_r44++)if(!e.marks[_r44].isInSet(_t44))return new xt(this.pos,e.marks[_r44]);return new xt(this.pos,this.mark);}}return new Et(this.pos,this.mark);}},{key:"map",value:function map(t){var e=t.mapResult(this.pos,1);return e.deletedAfter?null:new xt(e.pos,this.mark);}},{key:"toJSON",value:function toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()};}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new xt(e.pos,t.markFromJSON(e.mark));}}]);}(yt);yt.jsonID("addNodeMark",xt);Et=/*#__PURE__*/function(_yt4){function Et(t,e){var _this13;_classCallCheck(this,Et);_this13=_callSuper(this,Et),_this13.pos=t,_this13.mark=e;return _this13;}_inherits(Et,_yt4);return _createClass(Et,[{key:"apply",value:function apply(t){var e=t.nodeAt(this.pos);if(!e)return St.fail("No node at mark step's position");var r=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return St.fromReplace(t,this.pos,this.pos+1,new a(s.from(r),0,e.isLeaf?0:1));}},{key:"invert",value:function invert(t){var e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new xt(this.pos,this.mark):this;}},{key:"map",value:function map(t){var e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Et(e.pos,this.mark);}},{key:"toJSON",value:function toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()};}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Et(e.pos,t.markFromJSON(e.mark));}}]);}(yt);yt.jsonID("removeNodeMark",Et);Nt=/*#__PURE__*/function(_yt5){function Nt(t,e,r){var _this14;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;_classCallCheck(this,Nt);_this14=_callSuper(this,Nt),_this14.from=t,_this14.to=e,_this14.slice=r,_this14.structure=i;return _this14;}_inherits(Nt,_yt5);return _createClass(Nt,[{key:"apply",value:function apply(t){return this.structure&&Rt(t,this.from,this.to)?St.fail("Structure replace would overwrite content"):St.fromReplace(t,this.from,this.to,this.slice);}},{key:"getMap",value:function getMap(){return new wt([this.from,this.to-this.from,this.slice.size]);}},{key:"invert",value:function invert(t){return new Nt(this.from,this.from+this.slice.size,t.slice(this.from,this.to));}},{key:"map",value:function map(t){var e=t.mapResult(this.to,-1),r=this.from==this.to&&Nt.MAP_BIAS<0?e:t.mapResult(this.from,1);return r.deletedAcross&&e.deletedAcross?null:new Nt(r.pos,Math.max(r.pos,e.pos),this.slice,this.structure);}},{key:"merge",value:function merge(t){if(!(t instanceof Nt)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{var _e65=this.slice.size+t.slice.size==0?a.empty:new a(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Nt(t.from,this.to,_e65,this.structure);}}{var _e66=this.slice.size+t.slice.size==0?a.empty:new a(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Nt(this.from,this.to+(t.to-t.from),_e66,this.structure);}}},{key:"toJSON",value:function toJSON(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t;}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Nt(e.from,e.to,a.fromJSON(t,e.slice),!!e.structure);}}]);}(yt);Nt.MAP_BIAS=1,yt.jsonID("replace",Nt);_export("R",Ot=/*#__PURE__*/function(_yt6){function Ot(t,e,r,i,n,s){var _this15;var h=arguments.length>6&&arguments[6]!==undefined?arguments[6]:!1;_classCallCheck(this,Ot);_this15=_callSuper(this,Ot),_this15.from=t,_this15.to=e,_this15.gapFrom=r,_this15.gapTo=i,_this15.slice=n,_this15.insert=s,_this15.structure=h;return _this15;}_inherits(Ot,_yt6);return _createClass(Ot,[{key:"apply",value:function apply(t){if(this.structure&&(Rt(t,this.from,this.gapFrom)||Rt(t,this.gapTo,this.to)))return St.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return St.fail("Gap is not a flat range");var r=this.slice.insertAt(this.insert,e.content);return r?St.fromReplace(t,this.from,this.to,r):St.fail("Content does not fit in gap");}},{key:"getMap",value:function getMap(){return new wt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert]);}},{key:"invert",value:function invert(t){var e=this.gapTo-this.gapFrom;return new Ot(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure);}},{key:"map",value:function map(t){var e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),n=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return e.deletedAcross&&r.deletedAcross||i<e.pos||n>r.pos?null:new Ot(e.pos,r.pos,i,n,this.slice,this.insert,this.structure);}},{key:"toJSON",value:function toJSON(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t;}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ot(e.from,e.to,e.gapFrom,e.gapTo,a.fromJSON(t,e.slice),e.insert,!!e.structure);}}]);}(yt));yt.jsonID("replaceAround",Ot);Wt=/*#__PURE__*/function(){function Wt(t,e,r){_classCallCheck(this,Wt);this.$from=t,this.$to=e,this.unplaced=r,this.frontier=[],this.placed=s.empty;for(var _e74=0;_e74<=t.depth;_e74++){var _r48=t.node(_e74);this.frontier.push({type:_r48.type,match:_r48.contentMatchAt(t.indexAfter(_e74))});}for(var _e75=t.depth;_e75>0;_e75--)this.placed=s.from(t.node(_e75).copy(this.placed));}return _createClass(Wt,[{key:"depth",get:function get(){return this.frontier.length-1;}},{key:"fit",value:function fit(){for(;this.unplaced.size;){var _t52=this.findFittable();_t52?this.placeNodes(_t52):this.openMore()||this.dropNode();}var t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;var n=this.placed,s=r.depth,h=i.depth;for(;s&&h&&1==n.childCount;)n=n.firstChild.content,s--,h--;var l=new a(n,s,h);return t>-1?new Ot(r.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||r.pos!=this.$to.pos?new Nt(r.pos,i.pos,l):null;}},{key:"findFittable",value:function findFittable(){var t=this.unplaced.openStart;for(var _e76=this.unplaced.content,_r49=0,_i36=this.unplaced.openEnd;_r49<t;_r49++){var _n30=_e76.firstChild;if(_e76.childCount>1&&(_i36=0),_n30.type.spec.isolating&&_i36<=_r49){t=_r49;break;}_e76=_n30.content;}for(var _e77=1;_e77<=2;_e77++)for(var _r50=1==_e77?t:this.unplaced.openStart;_r50>=0;_r50--){var _t53=void 0,_i37=null;_r50?(_i37=Ut(this.unplaced.content,_r50-1).firstChild,_t53=_i37.content):_t53=this.unplaced.content;var _n31=_t53.firstChild;for(var _t54=this.depth;_t54>=0;_t54--){var _h24=void 0,_this$frontier$_t=this.frontier[_t54],_l16=_this$frontier$_t.type,_o7=_this$frontier$_t.match,_u5=null;if(1==_e77&&(_n31?_o7.matchType(_n31.type)||(_u5=_o7.fillBefore(s.from(_n31),!1)):_i37&&_l16.compatibleContent(_i37.type)))return{sliceDepth:_r50,frontierDepth:_t54,parent:_i37,inject:_u5};if(2==_e77&&_n31&&(_h24=_o7.findWrapping(_n31.type)))return{sliceDepth:_r50,frontierDepth:_t54,parent:_i37,wrap:_h24};if(_i37&&_o7.matchType(_i37.type))break;}}}},{key:"openMore",value:function openMore(){var _this$unplaced=this.unplaced,t=_this$unplaced.content,e=_this$unplaced.openStart,r=_this$unplaced.openEnd,i=Ut(t,e);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new a(t,e+1,Math.max(r,i.size+e>=t.size-r?e+1:0)),!0);}},{key:"dropNode",value:function dropNode(){var _this$unplaced2=this.unplaced,t=_this$unplaced2.content,e=_this$unplaced2.openStart,r=_this$unplaced2.openEnd,i=Ut(t,e);if(i.childCount<=1&&e>0){var _n32=t.size-e<=e+i.size;this.unplaced=new a(zt(t,e-1,1),e-1,_n32?e-1:r);}else this.unplaced=new a(zt(t,e,1),e,r);}},{key:"placeNodes",value:function placeNodes(_ref3){var t=_ref3.sliceDepth,e=_ref3.frontierDepth,r=_ref3.parent,i=_ref3.inject,n=_ref3.wrap;for(;this.depth>e;)this.closeFrontierNode();if(n)for(var _t55=0;_t55<n.length;_t55++)this.openFrontierNode(n[_t55]);var h=this.unplaced,l=r?r.content:h.content,o=h.openStart-t,u=0,f=[],_this$frontier$e=this.frontier[e],c=_this$frontier$e.match,p=_this$frontier$e.type;if(i){for(var _t56=0;_t56<i.childCount;_t56++)f.push(i.child(_t56));c=c.matchFragment(i);}var d=l.size+t-(h.content.size-h.openEnd);for(;u<l.childCount;){var _t57=l.child(u),_e78=c.matchType(_t57.type);if(!_e78)break;u++,(u>1||0==o||_t57.content.size)&&(c=_e78,f.push(_t(_t57.mark(p.allowedMarks(_t57.marks)),1==u?o:0,u==l.childCount?d:-1)));}var w=u==l.childCount;w||(d=-1),this.placed=Pt(this.placed,e,s.from(f)),this.frontier[e].match=c,w&&d<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var _t58=0,_e79=l;_t58<d;_t58++){var _t59=_e79.lastChild;this.frontier.push({type:_t59.type,match:_t59.contentMatchAt(_t59.childCount)}),_e79=_t59.content;}this.unplaced=w?0==t?a.empty:new a(zt(h.content,t-1,1),t-1,d<0?h.openEnd:t-1):new a(zt(h.content,t,u),h.openStart,h.openEnd);}},{key:"mustMoveInline",value:function mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;var t,e=this.frontier[this.depth];if(!e.type.isTextblock||!Lt(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;var r=this.$to.depth,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i;}},{key:"findCloseLevel",value:function findCloseLevel(t){t:for(var _e80=Math.min(this.depth,t.depth);_e80>=0;_e80--){var _this$frontier$_e=this.frontier[_e80],_r51=_this$frontier$_e.match,_i38=_this$frontier$_e.type,_n33=_e80<t.depth&&t.end(_e80+1)==t.pos+(t.depth-(_e80+1)),_s26=Lt(t,_e80,_i38,_r51,_n33);if(_s26){for(var _r52=_e80-1;_r52>=0;_r52--){var _this$frontier$_r=this.frontier[_r52],_e81=_this$frontier$_r.match,_i39=_this$frontier$_r.type,_n34=Lt(t,_r52,_i39,_e81,!0);if(!_n34||_n34.childCount)continue t;}return{depth:_e80,fit:_s26,move:_n33?t.doc.resolve(t.after(_e80+1)):t};}}}},{key:"close",value:function close(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Pt(this.placed,e.depth,e.fit)),t=e.move;for(var _r53=e.depth+1;_r53<=t.depth;_r53++){var _e82=t.node(_r53),_i40=_e82.type.contentMatch.fillBefore(_e82.content,!0,t.index(_r53));this.openFrontierNode(_e82.type,_e82.attrs,_i40);}return t;}},{key:"openFrontierNode",value:function openFrontierNode(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var r=arguments.length>2?arguments[2]:undefined;var i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Pt(this.placed,this.depth,s.from(t.create(e,r))),this.frontier.push({type:t,match:t.contentMatch});}},{key:"closeFrontierNode",value:function closeFrontierNode(){var t=this.frontier.pop().match.fillBefore(s.empty,!0);t.childCount&&(this.placed=Pt(this.placed,this.frontier.length,t));}}]);}();Ht=/*#__PURE__*/function(_yt7){function Ht(t,e,r){var _this16;_classCallCheck(this,Ht);_this16=_callSuper(this,Ht),_this16.pos=t,_this16.attr=e,_this16.value=r;return _this16;}_inherits(Ht,_yt7);return _createClass(Ht,[{key:"apply",value:function apply(t){var e=t.nodeAt(this.pos);if(!e)return St.fail("No node at attribute step's position");var r=Object.create(null);for(var _t60 in e.attrs)r[_t60]=e.attrs[_t60];r[this.attr]=this.value;var i=e.type.create(r,null,e.marks);return St.fromReplace(t,this.pos,this.pos+1,new a(s.from(i),0,e.isLeaf?0:1));}},{key:"getMap",value:function getMap(){return wt.empty;}},{key:"invert",value:function invert(t){return new Ht(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr]);}},{key:"map",value:function map(t){var e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Ht(e.pos,this.attr,this.value);}},{key:"toJSON",value:function toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value};}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ht(e.pos,e.attr,e.value);}}]);}(yt);yt.jsonID("attr",Ht);Kt=/*#__PURE__*/function(_yt8){function Kt(t,e){var _this17;_classCallCheck(this,Kt);_this17=_callSuper(this,Kt),_this17.attr=t,_this17.value=e;return _this17;}_inherits(Kt,_yt8);return _createClass(Kt,[{key:"apply",value:function apply(t){var e=Object.create(null);for(var _r56 in t.attrs)e[_r56]=t.attrs[_r56];e[this.attr]=this.value;var r=t.type.create(e,t.content,t.marks);return St.ok(r);}},{key:"getMap",value:function getMap(){return wt.empty;}},{key:"invert",value:function invert(t){return new Kt(this.attr,t.attrs[this.attr]);}},{key:"map",value:function map(t){return this;}},{key:"toJSON",value:function toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value};}}],[{key:"fromJSON",value:function fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Kt(e.attr,e.value);}}]);}(yt);yt.jsonID("docAttr",Kt);Qt=/*#__PURE__*/function(_Error2){function Qt(){_classCallCheck(this,Qt);return _callSuper(this,Qt,arguments);}_inherits(Qt,_Error2);return _createClass(Qt);}(/*#__PURE__*/_wrapNativeSuper(Error));Qt=function t(e){var r=Error.call(this,e);return r.__proto__=t.prototype,r;},(Qt.prototype=Object.create(Error.prototype)).constructor=Qt,Qt.prototype.name="TransformError";_export("m",Xt=/*#__PURE__*/function(){function Xt(t){_classCallCheck(this,Xt);this.doc=t,this.steps=[],this.docs=[],this.mapping=new gt();}return _createClass(Xt,[{key:"before",get:function get(){return this.docs.length?this.docs[0]:this.doc;}},{key:"step",value:function step(t){var e=this.maybeStep(t);if(e.failed)throw new Qt(e.failed);return this;}},{key:"maybeStep",value:function maybeStep(t){var e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e;}},{key:"docChanged",get:function get(){return this.steps.length>0;}},{key:"changedRange",value:function changedRange(){var t=1e9,e=-1e9;for(var _r57=0;_r57<this.mapping.maps.length;_r57++){var _i43=this.mapping.maps[_r57];_r57&&(t=_i43.map(t,1),e=_i43.map(e,-1)),_i43.forEach(function(r,i,n,s){t=Math.min(t,n),e=Math.max(e,s);});}return 1e9==t?null:{from:t,to:e};}},{key:"addStep",value:function addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e;}},{key:"replace",value:function replace(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t;var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:a.empty;var i=Ft(this.doc,t,e,r);return i&&this.step(i),this;}},{key:"replaceWith",value:function replaceWith(t,e,r){return this.replace(t,e,new a(s.from(r),0,0));}},{key:"delete",value:function _delete(t,e){return this.replace(t,e,a.empty);}},{key:"insert",value:function insert(t,e){return this.replaceWith(t,t,e);}},{key:"replaceRange",value:function replaceRange(t,e,r){return function(t,e,r,i){if(!i.size)return t.deleteRange(e,r);var n=t.doc.resolve(e),s=t.doc.resolve(r);if(qt(n,s,i))return t.step(new Nt(e,r,i));var h=Vt(n,s);0==h[h.length-1]&&h.pop();var l=-(n.depth+1);h.unshift(l);for(var _t61=n.depth,_e84=n.pos-1;_t61>0;_t61--,_e84--){var _r58=n.node(_t61).type.spec;if(_r58.defining||_r58.definingAsContext||_r58.isolating)break;h.indexOf(_t61)>-1?l=_t61:n.before(_t61)==_e84&&h.splice(1,0,-_t61);}var o=h.indexOf(l),u=[],f=i.openStart;for(var _t62=i.content,_e85=0;;_e85++){var _r59=_t62.firstChild;if(u.push(_r59),_e85==i.openStart)break;_t62=_r59.content;}for(var _t63=f-1;_t63>=0;_t63--){var _e86=u[_t63],_r60=(c=_e86.type).spec.defining||c.spec.definingForContent;if(_r60&&!_e86.sameMarkup(n.node(Math.abs(l)-1)))f=_t63;else if(_r60||!_e86.type.isTextblock)break;}var c;for(var _e87=i.openStart;_e87>=0;_e87--){var _l17=(_e87+f+1)%(i.openStart+1),_c2=u[_l17];if(_c2)for(var _e88=0;_e88<h.length;_e88++){var _u6=h[(_e88+o)%h.length],_f4=!0;_u6<0&&(_f4=!1,_u6=-_u6);var _p=n.node(_u6-1),_d=n.index(_u6-1);if(_p.canReplaceWith(_d,_d,_c2.type,_c2.marks))return t.replace(n.before(_u6),_f4?s.after(_u6):r,new a(Gt(i.content,0,i.openStart,_l17),_l17,i.openEnd));}}var p=t.steps.length;for(var _l18=h.length-1;_l18>=0&&(t.replace(e,r,i),!(t.steps.length>p));_l18--){var _t64=h[_l18];_t64<0||(e=n.before(_t64),r=s.after(_t64));}}(this,t,e,r),this;}},{key:"replaceRangeWith",value:function replaceRangeWith(t,e,r){return function(t,e,r,i){if(!i.isInline&&e==r&&t.doc.resolve(e).parent.content.size){var _n37=function(t,e,r){var i=t.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),r))return e;if(0==i.parentOffset)for(var _t65=i.depth-1;_t65>=0;_t65--){var _e89=i.index(_t65);if(i.node(_t65).canReplaceWith(_e89,_e89,r))return i.before(_t65+1);if(_e89>0)return null;}if(i.parentOffset==i.parent.content.size)for(var _t66=i.depth-1;_t66>=0;_t66--){var _e90=i.indexAfter(_t66);if(i.node(_t66).canReplaceWith(_e90,_e90,r))return i.after(_t66+1);if(_e90<i.node(_t66).childCount)return null;}return null;}(t.doc,e,i.type);null!=_n37&&(e=r=_n37);}t.replaceRange(e,r,new a(s.from(i),0,0));}(this,t,e,r),this;}},{key:"deleteRange",value:function deleteRange(t,e){return function(t,e,r){var i=t.doc.resolve(e),n=t.doc.resolve(r);if(i.parent.isTextblock&&n.parent.isTextblock&&i.start()!=n.start()&&0==i.parentOffset&&0==n.parentOffset){var _s27=i.sharedDepth(r),_h25=!1;for(var _t67=i.depth;_t67>_s27;_t67--)i.node(_t67).type.spec.isolating&&(_h25=!0);for(var _t68=n.depth;_t68>_s27;_t68--)n.node(_t68).type.spec.isolating&&(_h25=!0);if(!_h25){for(var _t69=i.depth;_t69>0&&e==i.start(_t69);_t69--)e=i.before(_t69);for(var _t70=n.depth;_t70>0&&r==n.start(_t70);_t70--)r=n.before(_t70);i=t.doc.resolve(e),n=t.doc.resolve(r);}}var s=Vt(i,n);for(var _e91=0;_e91<s.length;_e91++){var _r61=s[_e91],_h26=_e91==s.length-1;if(_h26&&0==_r61||i.node(_r61).type.contentMatch.validEnd)return t["delete"](i.start(_r61),n.end(_r61));if(_r61>0&&(_h26||i.node(_r61-1).canReplace(i.index(_r61-1),n.indexAfter(_r61-1))))return t["delete"](i.before(_r61),n.after(_r61));}for(var _s28=1;_s28<=i.depth&&_s28<=n.depth;_s28++)if(e-i.start(_s28)==i.depth-_s28&&r>i.end(_s28)&&n.end(_s28)-r!=n.depth-_s28&&i.start(_s28-1)==n.start(_s28-1)&&i.node(_s28-1).canReplace(i.index(_s28-1),n.index(_s28-1)))return t["delete"](i.before(_s28),r);t["delete"](e,r);}(this,t,e),this;}},{key:"lift",value:function lift(t,e){return function(t,e,r){var i=e.$from,n=e.$to,h=e.depth,l=i.before(h+1),o=n.after(h+1),u=l,f=o,c=s.empty,p=0;for(var _t71=h,_e92=!1;_t71>r;_t71--)_e92||i.index(_t71)>0?(_e92=!0,c=s.from(i.node(_t71).copy(c)),p++):u--;var d=s.empty,w=0;for(var _t72=h,_e93=!1;_t72>r;_t72--)_e93||n.after(_t72+1)<n.end(_t72)?(_e93=!0,d=s.from(n.node(_t72).copy(d)),w++):f++;t.step(new Ot(u,f,l,o,new a(c.append(d),p,w),c.size-p,!0));}(this,t,e),this;}},{key:"join",value:function join(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return function(t,e,r){var i=null,n=t.doc.type.schema.linebreakReplacement,s=t.doc.resolve(e-r),h=s.node().type;if(n&&h.inlineContent){var _t73="pre"==h.whitespace,_e94=!!h.contentMatch.matchType(n);_t73&&!_e94?i=!1:!_t73&&_e94&&(i=!0);}var l=t.steps.length;if(!1===i){var _i44=t.doc.resolve(e+r);Ct(t,_i44.node(),_i44.before(),l);}h.inlineContent&&Mt(t,e+r-1,h,s.node().contentMatchAt(s.index()),null==i);var o=t.mapping.slice(l),u=o.map(e-r);if(t.step(new Nt(u,o.map(e+r,-1),a.empty,!0)),!0===i){var _e95=t.doc.resolve(u);jt(t,_e95.node(),_e95.before(),t.steps.length);}}(this,t,e),this;}},{key:"wrap",value:function wrap(t,e){return function(t,e,r){var i=s.empty;for(var _t74=r.length-1;_t74>=0;_t74--){if(i.size){var _e96=r[_t74].type.contentMatch.matchFragment(i);if(!_e96||!_e96.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");}i=s.from(r[_t74].type.create(r[_t74].attrs,i));}var n=e.start,h=e.end;t.step(new Ot(n,h,n,h,new a(i,0,0),r.length,!0));}(this,t,e),this;}},{key:"setBlockType",value:function setBlockType(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t;var r=arguments.length>2?arguments[2]:undefined;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;return function(t,e,r,i,n){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var h=t.steps.length;t.doc.nodesBetween(e,r,function(e,r){var l="function"==typeof n?n(e):n;if(e.isTextblock&&!e.hasMarkup(i,l)&&function(t,e,r){var i=t.resolve(e),n=i.index();return i.parent.canReplaceWith(n,n+1,r);}(t.doc,t.mapping.slice(h).map(r),i)){var _n38=null;if(i.schema.linebreakReplacement){var _t75="pre"==i.whitespace,_e97=!!i.contentMatch.matchType(i.schema.linebreakReplacement);_t75&&!_e97?_n38=!1:!_t75&&_e97&&(_n38=!0);}!1===_n38&&Ct(t,e,r,h),Mt(t,t.mapping.slice(h).map(r,1),i,void 0,null===_n38);var _o8=t.mapping.slice(h),_u7=_o8.map(r,1),_f5=_o8.map(r+e.nodeSize,1);return t.step(new Ot(_u7,_f5,_u7+1,_f5-1,new a(s.from(i.create(l,null,e.marks)),0,0),1,!0)),!0===_n38&&jt(t,e,r,h),!1;}});}(this,t,e,r,i),this;}},{key:"setNodeMarkup",value:function setNodeMarkup(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3?arguments[3]:undefined;return function(t,e,r,i,n){var h=t.doc.nodeAt(e);if(!h)throw new RangeError("No node at given position");r||(r=h.type);var l=r.create(i,null,n||h.marks);if(h.isLeaf)return t.replaceWith(e,e+h.nodeSize,l);if(!r.validContent(h.content))throw new RangeError("Invalid content for node type "+r.name);t.step(new Ot(e,e+h.nodeSize,e+1,e+h.nodeSize-1,new a(s.from(l),0,0),1,!0));}(this,t,e,r,i),this;}},{key:"setNodeAttribute",value:function setNodeAttribute(t,e,r){return this.step(new Ht(t,e,r)),this;}},{key:"setDocAttribute",value:function setDocAttribute(t,e){return this.step(new Kt(t,e)),this;}},{key:"addNodeMark",value:function addNodeMark(t,e){return this.step(new xt(t,e)),this;}},{key:"removeNodeMark",value:function removeNodeMark(t,e){var r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(e instanceof u)e.isInSet(r.marks)&&this.step(new Et(t,e));else{var _i45,_n39=r.marks,_s29=[];for(;_i45=e.isInSet(_n39);)_s29.push(new Et(t,_i45)),_n39=_i45.removeFromSet(_n39);for(var _t76=_s29.length-1;_t76>=0;_t76--)this.step(_s29[_t76]);}return this;}},{key:"split",value:function split(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var r=arguments.length>2?arguments[2]:undefined;return function(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var i=arguments.length>3?arguments[3]:undefined;var n=t.doc.resolve(e),h=s.empty,l=s.empty;for(var _t77=n.depth,_e98=n.depth-r,_o9=r-1;_t77>_e98;_t77--,_o9--){h=s.from(n.node(_t77).copy(h));var _e99=i&&i[_o9];l=s.from(_e99?_e99.type.create(_e99.attrs,l):n.node(_t77).copy(l));}t.step(new Nt(e,e,new a(h.append(l),r,r),!0));}(this,t,e,r),this;}},{key:"addMark",value:function addMark(t,e,r){return function(t,e,r,i){var n,s,h=[],l=[];t.doc.nodesBetween(e,r,function(t,o,u){if(!t.isInline)return;var f=t.marks;if(!i.isInSet(f)&&u.type.allowsMarkType(i.type)){var _u8=Math.max(o,e),_a3=Math.min(o+t.nodeSize,r),_c3=i.addToSet(f);for(var _t78=0;_t78<f.length;_t78++)f[_t78].isInSet(_c3)||(n&&n.to==_u8&&n.mark.eq(f[_t78])?n.to=_a3:h.push(n=new kt(_u8,_a3,f[_t78])));s&&s.to==_u8?s.to=_a3:l.push(s=new vt(_u8,_a3,i));}}),h.forEach(function(e){return t.step(e);}),l.forEach(function(e){return t.step(e);});}(this,t,e,r),this;}},{key:"removeMark",value:function removeMark(t,e,r){return function(t,e,r,i){var n=[],s=0;t.doc.nodesBetween(e,r,function(t,h){if(!t.isInline)return;s++;var l=null;if(i instanceof V){var _e100,_r62=t.marks;for(;_e100=i.isInSet(_r62);)(l||(l=[])).push(_e100),_r62=_e100.removeFromSet(_r62);}else i?i.isInSet(t.marks)&&(l=[i]):l=t.marks;if(l&&l.length){var _i46=Math.min(h+t.nodeSize,r);for(var _t79=0;_t79<l.length;_t79++){var _r63=void 0,_o10=l[_t79];for(var _t80=0;_t80<n.length;_t80++){var _e101=n[_t80];_e101.step==s-1&&_o10.eq(n[_t80].style)&&(_r63=_e101);}_r63?(_r63.to=_i46,_r63.step=s):n.push({style:_o10,from:Math.max(h,e),to:_i46,step:s});}}}),n.forEach(function(e){return t.step(new kt(e.from,e.to,e.style));});}(this,t,e,r),this;}},{key:"clearIncompatible",value:function clearIncompatible(t,e,r){return Mt(this,t,e,r),this;}}]);}());Yt=Object.create(null);_export("S",Zt=/*#__PURE__*/function(){function Zt(t,e,r){_classCallCheck(this,Zt);this.$anchor=t,this.$head=e,this.ranges=r||[new te(t.min(e),t.max(e))];}return _createClass(Zt,[{key:"anchor",get:function get(){return this.$anchor.pos;}},{key:"head",get:function get(){return this.$head.pos;}},{key:"from",get:function get(){return this.$from.pos;}},{key:"to",get:function get(){return this.$to.pos;}},{key:"$from",get:function get(){return this.ranges[0].$from;}},{key:"$to",get:function get(){return this.ranges[0].$to;}},{key:"empty",get:function get(){var t=this.ranges;for(var _e102=0;_e102<t.length;_e102++)if(t[_e102].$from.pos!=t[_e102].$to.pos)return!1;return!0;}},{key:"content",value:function content(){return this.$from.doc.slice(this.from,this.to,!0);}},{key:"replace",value:function replace(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:a.empty;var r=e.content.lastChild,i=null;for(var _t81=0;_t81<e.openEnd;_t81++)i=r,r=r.lastChild;var n=t.steps.length,s=this.ranges;for(var _h27=0;_h27<s.length;_h27++){var _s$_h=s[_h27],_l19=_s$_h.$from,_o11=_s$_h.$to,_u9=t.mapping.slice(n);t.replaceRange(_u9.map(_l19.pos),_u9.map(_o11.pos),_h27?a.empty:e),0==_h27&&fe(t,n,(r?r.isInline:i&&i.isTextblock)?-1:1);}}},{key:"replaceWith",value:function replaceWith(t,e){var r=t.steps.length,i=this.ranges;for(var _n40=0;_n40<i.length;_n40++){var _i$_n=i[_n40],_s30=_i$_n.$from,_h28=_i$_n.$to,_l20=t.mapping.slice(r),_o12=_l20.map(_s30.pos),_u10=_l20.map(_h28.pos);_n40?t.deleteRange(_o12,_u10):(t.replaceRangeWith(_o12,_u10,e),fe(t,r,e.isInline?-1:1));}}},{key:"getBookmark",value:function getBookmark(){return ie.between(this.$anchor,this.$head).getBookmark();}}],[{key:"findFrom",value:function findFrom(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;var i=t.parent.inlineContent?new ie(t):ue(t.node(0),t.parent,t.pos,t.index(),e,r);if(i)return i;for(var _i47=t.depth-1;_i47>=0;_i47--){var _n41=e<0?ue(t.node(0),t.node(_i47),t.before(_i47+1),t.index(_i47),e,r):ue(t.node(0),t.node(_i47),t.after(_i47+1),t.index(_i47)+1,e,r);if(_n41)return _n41;}return null;}},{key:"near",value:function near(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;return this.findFrom(t,e)||this.findFrom(t,-e)||new le(t.node(0));}},{key:"atStart",value:function atStart(t){return ue(t,t,0,0,1)||new le(t);}},{key:"atEnd",value:function atEnd(t){return ue(t,t,t.content.size,t.childCount,-1)||new le(t);}},{key:"fromJSON",value:function fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var r=Yt[e.type];if(!r)throw new RangeError("No selection type ".concat(e.type," defined"));return r.fromJSON(t,e);}},{key:"jsonID",value:function jsonID(t,e){if(t in Yt)throw new RangeError("Duplicate use of selection JSON ID "+t);return Yt[t]=e,e.prototype.jsonID=t,e;}}]);}());Zt.prototype.visible=!0;_export("k",te=/*#__PURE__*/_createClass(function te(t,e){_classCallCheck(this,te);this.$from=t,this.$to=e;}));ee=!1;_export("T",ie=/*#__PURE__*/function(_Zt){function ie(t){var _this18;var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t;_classCallCheck(this,ie);re(t),re(e),_this18=_callSuper(this,ie,[t,e]);return _this18;}_inherits(ie,_Zt);return _createClass(ie,[{key:"$cursor",get:function get(){return this.$anchor.pos==this.$head.pos?this.$head:null;}},{key:"map",value:function map(t,e){var r=t.resolve(e.map(this.head));if(!r.parent.inlineContent)return Zt.near(r);var i=t.resolve(e.map(this.anchor));return new ie(i.parent.inlineContent?i:r,r);}},{key:"replace",value:function replace(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:a.empty;if(_superPropGet(ie,"replace",this,3)([t,e]),e==a.empty){var _e103=this.$from.marksAcross(this.$to);_e103&&t.ensureMarks(_e103);}}},{key:"eq",value:function eq(t){return t instanceof ie&&t.anchor==this.anchor&&t.head==this.head;}},{key:"getBookmark",value:function getBookmark(){return new ne(this.anchor,this.head);}},{key:"toJSON",value:function toJSON(){return{type:"text",anchor:this.anchor,head:this.head};}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new ie(t.resolve(e.anchor),t.resolve(e.head));}},{key:"create",value:function create(t,e){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:e;var i=t.resolve(e);return new this(i,r==e?i:t.resolve(r));}},{key:"between",value:function between(t,e,r){var i=t.pos-e.pos;if(r&&!i||(r=i>=0?1:-1),!e.parent.inlineContent){var _t82=Zt.findFrom(e,r,!0)||Zt.findFrom(e,-r,!0);if(!_t82)return Zt.near(e,r);e=_t82.$head;}return t.parent.inlineContent||(0==i||(t=(Zt.findFrom(t,-r,!0)||Zt.findFrom(t,r,!0)).$anchor).pos<e.pos!=i<0)&&(t=e),new ie(t,e);}}]);}(Zt));Zt.jsonID("text",ie);ne=/*#__PURE__*/function(){function ne(t,e){_classCallCheck(this,ne);this.anchor=t,this.head=e;}return _createClass(ne,[{key:"map",value:function map(t){return new ne(t.map(this.anchor),t.map(this.head));}},{key:"resolve",value:function resolve(t){return ie.between(t.resolve(this.anchor),t.resolve(this.head));}}]);}();_export("c",se=/*#__PURE__*/function(_Zt2){function se(t){var _this19;_classCallCheck(this,se);var e=t.nodeAfter,r=t.node(0).resolve(t.pos+e.nodeSize);_this19=_callSuper(this,se,[t,r]),_this19.node=e;return _this19;}_inherits(se,_Zt2);return _createClass(se,[{key:"map",value:function map(t,e){var _e$mapResult=e.mapResult(this.anchor),r=_e$mapResult.deleted,i=_e$mapResult.pos,n=t.resolve(i);return r?Zt.near(n):new se(n);}},{key:"content",value:function content(){return new a(s.from(this.node),0,0);}},{key:"eq",value:function eq(t){return t instanceof se&&t.anchor==this.anchor;}},{key:"toJSON",value:function toJSON(){return{type:"node",anchor:this.anchor};}},{key:"getBookmark",value:function getBookmark(){return new he(this.anchor);}}],[{key:"fromJSON",value:function fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new se(t.resolve(e.anchor));}},{key:"create",value:function create(t,e){return new se(t.resolve(e));}},{key:"isSelectable",value:function isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable;}}]);}(Zt));se.prototype.visible=!1,Zt.jsonID("node",se);he=/*#__PURE__*/function(){function he(t){_classCallCheck(this,he);this.anchor=t;}return _createClass(he,[{key:"map",value:function map(t){var _t$mapResult=t.mapResult(this.anchor),e=_t$mapResult.deleted,r=_t$mapResult.pos;return e?new ne(r,r):new he(r);}},{key:"resolve",value:function resolve(t){var e=t.resolve(this.anchor),r=e.nodeAfter;return r&&se.isSelectable(r)?new se(e):Zt.near(e);}}]);}();_export("A",le=/*#__PURE__*/function(_Zt3){function le(t){_classCallCheck(this,le);return _callSuper(this,le,[t.resolve(0),t.resolve(t.content.size)]);}_inherits(le,_Zt3);return _createClass(le,[{key:"replace",value:function replace(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:a.empty;if(e==a.empty){t["delete"](0,t.doc.content.size);var _e104=Zt.atStart(t.doc);_e104.eq(t.selection)||t.setSelection(_e104);}else _superPropGet(le,"replace",this,3)([t,e]);}},{key:"toJSON",value:function toJSON(){return{type:"all"};}},{key:"map",value:function map(t){return new le(t);}},{key:"eq",value:function eq(t){return t instanceof le;}},{key:"getBookmark",value:function getBookmark(){return oe;}}],[{key:"fromJSON",value:function fromJSON(t){return new le(t);}}]);}(Zt));Zt.jsonID("all",le);oe={map:function map(){return this;},resolve:function resolve(t){return new le(t);}};ae=/*#__PURE__*/function(_Xt){function ae(t){var _this20;_classCallCheck(this,ae);_this20=_callSuper(this,ae,[t.doc]),_this20.curSelectionFor=0,_this20.updated=0,_this20.meta=Object.create(null),_this20.time=Date.now(),_this20.curSelection=t.selection,_this20.storedMarks=t.storedMarks;return _this20;}_inherits(ae,_Xt);return _createClass(ae,[{key:"selection",get:function get(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection;}},{key:"setSelection",value:function setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this;}},{key:"selectionSet",get:function get(){return(1&this.updated)>0;}},{key:"setStoredMarks",value:function setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this;}},{key:"ensureMarks",value:function ensureMarks(t){return u.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this;}},{key:"addStoredMark",value:function addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()));}},{key:"removeStoredMark",value:function removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()));}},{key:"storedMarksSet",get:function get(){return(2&this.updated)>0;}},{key:"addStep",value:function addStep(t,e){_superPropGet(ae,"addStep",this,3)([t,e]),this.updated=-3&this.updated,this.storedMarks=null;}},{key:"setTime",value:function setTime(t){return this.time=t,this;}},{key:"replaceSelection",value:function replaceSelection(t){return this.selection.replace(this,t),this;}},{key:"replaceSelectionWith",value:function replaceSelectionWith(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!0;var r=this.selection;return e&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||u.none))),r.replaceWith(this,t),this;}},{key:"deleteSelection",value:function deleteSelection(){return this.selection.replace(this),this;}},{key:"insertText",value:function insertText(t,e,r){var i=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(null==r&&(r=e),!t)return this.deleteRange(e,r);var _n42=this.storedMarks;if(!_n42){var _t83=this.doc.resolve(e);_n42=r==e?_t83.marks():_t83.marksAcross(this.doc.resolve(r));}return this.replaceRangeWith(e,r,i.text(t,_n42)),this.selection.empty||this.selection.to!=e+t.length||this.setSelection(Zt.near(this.selection.$to)),this;}}},{key:"setMeta",value:function setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this;}},{key:"getMeta",value:function getMeta(t){return this.meta["string"==typeof t?t:t.key];}},{key:"isGeneric",get:function get(){for(var _t84 in this.meta)return!1;return!0;}},{key:"scrollIntoView",value:function scrollIntoView(){return this.updated|=4,this;}},{key:"scrolledIntoView",get:function get(){return(4&this.updated)>0;}}]);}(Xt);pe=/*#__PURE__*/_createClass(function pe(t,e,r){_classCallCheck(this,pe);this.name=t,this.init=ce(e.init,r),this.apply=ce(e.apply,r);});de=[new pe("doc",{init:function init(t){return t.doc||t.schema.topNodeType.createAndFill();},apply:function apply(t){return t.doc;}}),new pe("selection",{init:function init(t,e){return t.selection||Zt.atStart(e.doc);},apply:function apply(t){return t.selection;}}),new pe("storedMarks",{init:function init(t){return t.storedMarks||null;},apply:function apply(t,e,r,i){return i.selection.$cursor?t.storedMarks:null;}}),new pe("scrollToSelection",{init:function init(){return 0;},apply:function apply(t,e){return t.scrolledIntoView?e+1:e;}})];we=/*#__PURE__*/_createClass(function we(t,e){var _this21=this;_classCallCheck(this,we);this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=de.slice(),e&&e.forEach(function(t){if(_this21.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");_this21.plugins.push(t),_this21.pluginsByKey[t.key]=t,t.spec.state&&_this21.fields.push(new pe(t.key,t.spec.state,t));});});_export("E",ge=/*#__PURE__*/function(){function ge(t){_classCallCheck(this,ge);this.config=t;}return _createClass(ge,[{key:"schema",get:function get(){return this.config.schema;}},{key:"plugins",get:function get(){return this.config.plugins;}},{key:"apply",value:function apply(t){return this.applyTransaction(t).state;}},{key:"filterTransaction",value:function filterTransaction(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:-1;for(var _r64=0;_r64<this.config.plugins.length;_r64++)if(_r64!=e){var _e106=this.config.plugins[_r64];if(_e106.spec.filterTransaction&&!_e106.spec.filterTransaction.call(_e106,t,this))return!1;}return!0;}},{key:"applyTransaction",value:function applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};var e=[t],r=this.applyInner(t),i=null;for(;;){var _n43=!1;for(var _s31=0;_s31<this.config.plugins.length;_s31++){var _h30=this.config.plugins[_s31];if(_h30.spec.appendTransaction){var _l21=i?i[_s31].n:0,_o13=i?i[_s31].state:this,_u11=_l21<e.length&&_h30.spec.appendTransaction.call(_h30,_l21?e.slice(_l21):e,_o13,r);if(_u11&&r.filterTransaction(_u11,_s31)){if(_u11.setMeta("appendedTransaction",t),!i){i=[];for(var _t85=0;_t85<this.config.plugins.length;_t85++)i.push(_t85<_s31?{state:r,n:e.length}:{state:this,n:0});}e.push(_u11),r=r.applyInner(_u11),_n43=!0;}i&&(i[_s31]={state:r,n:e.length});}}if(!_n43)return{state:r,transactions:e};}}},{key:"applyInner",value:function applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");var e=new ge(this.config),r=this.config.fields;for(var _i49=0;_i49<r.length;_i49++){var _n44=r[_i49];e[_n44.name]=_n44.apply(t,this[_n44.name],this,e);}return e;}},{key:"tr",get:function get(){return new ae(this);}},{key:"reconfigure",value:function reconfigure(t){var e=new we(this.schema,t.plugins),r=e.fields,i=new ge(e);for(var _e107=0;_e107<r.length;_e107++){var _n45=r[_e107].name;i[_n45]=this.hasOwnProperty(_n45)?this[_n45]:r[_e107].init(t,i);}return i;}},{key:"toJSON",value:function toJSON(t){var e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map(function(t){return t.toJSON();})),t&&"object"==_typeof(t))for(var _r65 in t){if("doc"==_r65||"selection"==_r65)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var _i50=t[_r65],_n46=_i50.spec.state;_n46&&_n46.toJSON&&(e[_r65]=_n46.toJSON.call(_i50,this[_i50.key]));}return e;}}],[{key:"create",value:function create(t){var e=new we(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ge(e);for(var _i51=0;_i51<e.fields.length;_i51++)r[e.fields[_i51].name]=e.fields[_i51].init(t,r);return r;}},{key:"fromJSON",value:function fromJSON(t,e,r){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var i=new we(t.schema,t.plugins),n=new ge(i);return i.fields.forEach(function(i){if("doc"==i.name)n.doc=J.fromJSON(t.schema,e.doc);else if("selection"==i.name)n.selection=Zt.fromJSON(n.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(n.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var _s32 in r){var _h31=r[_s32],_l22=_h31.spec.state;if(_h31.key==i.name&&_l22&&_l22.fromJSON&&Object.prototype.hasOwnProperty.call(e,_s32))return void(n[i.name]=_l22.fromJSON.call(_h31,t,e[_s32],n));}n[i.name]=i.init(t,n);}}),n;}}]);}());_export("b",ye=/*#__PURE__*/function(){function ye(t){_classCallCheck(this,ye);this.spec=t,this.props={},t.props&&me(t.props,this,this.props),this.key=t.key?t.key.key:be("plugin");}return _createClass(ye,[{key:"getState",value:function getState(t){return t[this.key];}}]);}());Se=Object.create(null);_export("P",ve=/*#__PURE__*/function(){function ve(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"key";_classCallCheck(this,ve);this.key=be(t);}return _createClass(ve,[{key:"get",value:function get(t){return t.config.pluginsByKey[this.key];}},{key:"getState",value:function getState(t){return t[this.key];}}]);}());}};});
|
|
5
|
+
//# sourceMappingURL=index-89c520e9.cjs.js.map
|