@gsc-basic/components 1.1.6 → 1.1.8
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 +8 -8
- package/dist/es/Button/index.js +9 -4
- package/dist/es/Button/src/Button.css +3 -3
- package/dist/es/Button/src/Button.vue.js +44 -4
- package/dist/es/Button/src/Button2.css +3 -3
- package/dist/es/CodeEditor/index.js +9 -4
- package/dist/es/CodeEditor/src/index.css +4 -4
- package/dist/es/CodeEditor/src/index.vue.js +148 -4
- package/dist/es/CodeEditor/src/index2.css +3 -3
- package/dist/es/CodeEditor/src/index3.css +4 -4
- package/dist/es/ConfigProvider/index.js +9 -4
- package/dist/es/ConfigProvider/src/configProvider.js +17 -4
- package/dist/es/ConfigProvider/src/configProviderProps.js +25 -4
- package/dist/es/ConfigProvider/src/constants.js +12 -4
- package/dist/es/ConfigProvider/src/useGlobalConfig.js +48 -4
- package/dist/es/CountTo/index.js +9 -4
- package/dist/es/CountTo/src/index.css +3 -3
- package/dist/es/CountTo/src/index.vue.js +126 -4
- package/dist/es/Ellipsis/index.js +9 -4
- package/dist/es/Ellipsis/src/components/JsEllipsis.css +3 -3
- package/dist/es/Ellipsis/src/components/JsEllipsis.vue.js +181 -4
- package/dist/es/Ellipsis/src/components/NativeEllipsis.css +3 -3
- package/dist/es/Ellipsis/src/components/NativeEllipsis.vue.js +44 -4
- package/dist/es/Ellipsis/src/components/NativeEllipsis2.css +3 -3
- package/dist/es/Ellipsis/src/index.css +3 -3
- package/dist/es/Ellipsis/src/index.vue.js +96 -4
- package/dist/es/Ellipsis/src/utils/utils.js +59 -4
- package/dist/es/Form/index.js +9 -4
- package/dist/es/Form/src/Form.css +3 -3
- package/dist/es/Form/src/Form.vue.js +377 -4
- package/dist/es/Form/src/Form2.css +3 -3
- package/dist/es/Form/src/styles/form.css +3 -3
- package/dist/es/Marquee/index.js +9 -4
- package/dist/es/Marquee/src/index.css +3 -3
- package/dist/es/Marquee/src/index.vue.js +191 -4
- package/dist/es/Marquee/src/index2.css +3 -3
- package/dist/es/Overlay/index.js +64 -4
- package/dist/es/Overlay/src/Message.css +3 -3
- package/dist/es/Overlay/src/Message.vue.js +39 -4
- package/dist/es/Overlay/src/Message2.css +3 -3
- package/dist/es/Overlay/src/Modal.css +3 -3
- package/dist/es/Overlay/src/Modal.vue.js +70 -4
- package/dist/es/Overlay/src/Modal2.css +3 -3
- package/dist/es/Overlay/src/Notice.css +3 -3
- package/dist/es/Overlay/src/Notice.vue.js +40 -4
- package/dist/es/Overlay/src/Notice2.css +3 -3
- package/dist/es/Overlay/src/Tooltip.css +3 -3
- package/dist/es/Overlay/src/Tooltip.vue.js +87 -4
- package/dist/es/Overlay/src/Tooltip2.css +3 -3
- package/dist/es/RichTextEditor/index.js +9 -4
- package/dist/es/RichTextEditor/src/ToolbarPanel.css +3 -3
- package/dist/es/RichTextEditor/src/ToolbarPanel.vue.js +162 -4
- package/dist/es/RichTextEditor/src/ToolbarPanel2.css +3 -3
- package/dist/es/RichTextEditor/src/components/BlockquoteButton.css +4 -4
- package/dist/es/RichTextEditor/src/components/BlockquoteButton.vue.js +40 -4
- package/dist/es/RichTextEditor/src/components/CodeBlockButton.css +4 -4
- package/dist/es/RichTextEditor/src/components/CodeBlockButton.vue.js +40 -4
- package/dist/es/RichTextEditor/src/components/ColorHighlightPopover.css +3 -3
- package/dist/es/RichTextEditor/src/components/ColorHighlightPopover.vue.js +40 -4
- package/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.css +3 -3
- package/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +58 -4
- package/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.css +3 -3
- package/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +69 -4
- package/dist/es/RichTextEditor/src/components/ImageUploadButton.css +4 -4
- package/dist/es/RichTextEditor/src/components/ImageUploadButton.vue.js +74 -4
- package/dist/es/RichTextEditor/src/components/LinkPopover.css +4 -4
- package/dist/es/RichTextEditor/src/components/LinkPopover.vue.js +92 -4
- package/dist/es/RichTextEditor/src/components/LinkPopover2.css +4 -4
- package/dist/es/RichTextEditor/src/components/ListDropdownMenu.css +3 -3
- package/dist/es/RichTextEditor/src/components/ListDropdownMenu.vue.js +76 -4
- package/dist/es/RichTextEditor/src/components/MarkButton.css +4 -4
- package/dist/es/RichTextEditor/src/components/MarkButton.vue.js +89 -4
- package/dist/es/RichTextEditor/src/components/TableButton.css +3 -3
- package/dist/es/RichTextEditor/src/components/TableButton.vue.js +165 -4
- package/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.css +3 -3
- package/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +85 -4
- package/dist/es/RichTextEditor/src/components/TextColorPopover.css +3 -3
- package/dist/es/RichTextEditor/src/components/TextColorPopover.vue.js +40 -4
- package/dist/es/RichTextEditor/src/components/ToolbarGroup.css +3 -3
- package/dist/es/RichTextEditor/src/components/ToolbarGroup.vue.js +19 -4
- package/dist/es/RichTextEditor/src/components/ToolbarSeparator.css +3 -3
- package/dist/es/RichTextEditor/src/components/ToolbarSeparator.vue.js +17 -4
- package/dist/es/RichTextEditor/src/components/UndoRedoButton.css +4 -4
- package/dist/es/RichTextEditor/src/components/UndoRedoButton.vue.js +54 -4
- package/dist/es/RichTextEditor/src/components/VideoUploadButton.css +4 -4
- package/dist/es/RichTextEditor/src/components/VideoUploadButton.vue.js +74 -4
- package/dist/es/RichTextEditor/src/components/basic/ColorPicker.css +4 -4
- package/dist/es/RichTextEditor/src/components/basic/ColorPicker.vue.js +101 -4
- package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.css +3 -3
- package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +364 -4
- package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal2.css +3 -3
- package/dist/es/RichTextEditor/src/components/basic/SelectMenu.css +4 -4
- package/dist/es/RichTextEditor/src/components/basic/SelectMenu.vue.js +137 -4
- package/dist/es/RichTextEditor/src/components/basic/SelectMenu2.css +4 -4
- package/dist/es/RichTextEditor/src/constant/index.js +53 -4
- package/dist/es/RichTextEditor/src/extensions/video.js +68 -4
- package/dist/es/RichTextEditor/src/index.css +4 -4
- package/dist/es/RichTextEditor/src/index.vue.js +158 -4
- package/dist/es/RichTextEditor/src/index2.css +4 -4
- package/dist/es/RichTextEditor/src/props.js +24 -4
- package/dist/es/ScaleScreen/index.js +9 -4
- package/dist/es/ScaleScreen/src/index.css +3 -3
- package/dist/es/ScaleScreen/src/index.vue.js +118 -4
- package/dist/es/ScaleScreen/src/index2.css +3 -3
- package/dist/es/Transition/index.js +30 -4
- package/dist/es/Transition/src/CollapseTransition.css +3 -3
- package/dist/es/Transition/src/CollapseTransition.vue.js +44 -4
- package/dist/es/Transition/src/CollapseTransition2.css +3 -3
- package/dist/es/Transition/src/CreateTransition.js +75 -6
- package/dist/es/Transition/src/ExpandTransition.js +42 -4
- package/dist/es/Transition/src/style/index.css +3 -3
- package/dist/es/Transition/style.js +4 -4
- package/dist/es/VideoBackground/index.js +9 -4
- package/dist/es/VideoBackground/src/helper.js +32 -4
- package/dist/es/VideoBackground/src/index.css +3 -3
- package/dist/es/VideoBackground/src/index.vue.js +111 -4
- package/dist/es/VideoBackground/src/index2.css +3 -3
- package/dist/es/VideoBackground/src/index3.css +3 -3
- package/dist/es/VideoBackground/src/videoBackground.js +34 -4
- package/dist/es/VideoPlayer/index.js +9 -4
- package/dist/es/VideoPlayer/src/index.css +3 -3
- package/dist/es/VideoPlayer/src/index.vue.js +63 -4
- package/dist/es/VirtualScroll/index.js +9 -4
- package/dist/es/VirtualScroll/src/index.css +3 -3
- package/dist/es/VirtualScroll/src/index.vue.js +11 -4
- package/dist/es/VirtualScroll/src/index.vue2.js +107 -4
- package/dist/es/VirtualScroll/src/index2.css +3 -3
- package/dist/es/_virtual/_commonjsHelpers.js +9 -4
- package/dist/es/_virtual/_plugin-vue_export-helper.js +12 -4
- package/dist/es/_virtual/delegate.js +10 -4
- package/dist/es/_virtual/download.js +10 -4
- package/dist/es/_virtual/download2.js +7 -4
- package/dist/es/_virtual/index.js +5 -4
- package/dist/es/_virtual/index2.js +7 -4
- package/dist/es/_virtual/index3.js +21 -0
- package/dist/es/{Grid/src/components/CellEditor.css → _virtual/index4.js} +7 -4
- package/dist/es/hooks/useLocale.js +28 -4
- package/dist/es/hooks/useNamespace.js +11 -4
- package/dist/es/index.js +79 -4
- package/dist/es/locale/lang/en-US.js +167 -4
- package/dist/es/locale/lang/ja-JP.js +167 -4
- package/dist/es/locale/lang/zh-CN.js +167 -4
- package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +1379 -4
- package/dist/es/node_modules/@codemirror/commands/dist/index.js +847 -4
- package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +41 -6
- package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +315 -20
- package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +51 -6
- package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +402 -15
- package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +500 -7
- package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +219 -7
- package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +54 -6
- package/dist/es/node_modules/@codemirror/language/dist/index.js +1304 -4
- package/dist/es/node_modules/@codemirror/lint/dist/index.js +660 -6
- package/dist/es/node_modules/@codemirror/search/dist/index.js +842 -5
- package/dist/es/node_modules/@codemirror/state/dist/index.js +2646 -4
- package/dist/es/node_modules/@codemirror/theme-one-dark/dist/index.js +135 -4
- package/dist/es/node_modules/@codemirror/view/dist/index.js +7492 -4
- package/dist/es/node_modules/@lezer/common/dist/index.js +1433 -5
- package/dist/es/node_modules/@lezer/highlight/dist/index.js +640 -4
- package/dist/es/node_modules/@lezer/java/dist/index.js +65 -4
- package/dist/es/node_modules/@lezer/javascript/dist/index.js +164 -4
- package/dist/es/node_modules/@lezer/json/dist/index.js +37 -4
- package/dist/es/node_modules/@lezer/lr/dist/index.js +1312 -4
- package/dist/es/node_modules/@lezer/python/dist/index.js +224 -4
- package/dist/es/node_modules/@lezer/xml/dist/index.js +103 -4
- package/dist/es/node_modules/@lezer/yaml/dist/index.js +277 -4
- package/dist/es/node_modules/@marijn/find-cluster-break/src/index.js +72 -4
- package/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +181 -4
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +16 -4
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +409 -4
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +792 -4
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +58 -4
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +112 -5
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +48 -4
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +216 -4
- package/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +32 -4
- package/dist/es/node_modules/@tanstack/store/dist/esm/alien.js +221 -0
- package/dist/es/node_modules/@tanstack/store/dist/esm/atom.js +136 -0
- package/dist/es/node_modules/@tanstack/store/dist/esm/batch.js +25 -0
- package/dist/es/node_modules/@tanstack/store/dist/esm/store.js +47 -4
- package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +41 -4
- package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +36 -4
- package/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +51 -4
- package/dist/es/node_modules/@tiptap/core/dist/index.js +3984 -4
- package/dist/es/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +20 -4
- package/dist/es/node_modules/@tiptap/extension-blockquote/dist/index.js +60 -5
- package/dist/es/node_modules/@tiptap/extension-bold/dist/index.js +82 -5
- package/dist/es/node_modules/@tiptap/extension-character-count/dist/index.js +9 -4
- package/dist/es/node_modules/@tiptap/extension-code/dist/index.js +57 -4
- package/dist/es/node_modules/@tiptap/extension-code-block/dist/index.js +220 -4
- package/dist/es/node_modules/@tiptap/extension-document/dist/index.js +15 -4
- package/dist/es/node_modules/@tiptap/extension-hard-break/dist/index.js +62 -4
- package/dist/es/node_modules/@tiptap/extension-heading/dist/index.js +66 -4
- package/dist/es/node_modules/@tiptap/extension-highlight/dist/index.js +88 -4
- package/dist/es/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +59 -4
- package/dist/es/node_modules/@tiptap/extension-image/dist/index.js +133 -4
- package/dist/es/node_modules/@tiptap/extension-italic/dist/index.js +80 -4
- package/dist/es/node_modules/@tiptap/extension-link/dist/index.js +316 -4
- package/dist/es/node_modules/@tiptap/extension-list/dist/index.js +731 -4
- package/dist/es/node_modules/@tiptap/extension-paragraph/dist/index.js +47 -4
- package/dist/es/node_modules/@tiptap/extension-strike/dist/index.js +69 -4
- package/dist/es/node_modules/@tiptap/extension-subscript/dist/index.js +44 -4
- package/dist/es/node_modules/@tiptap/extension-superscript/dist/index.js +44 -4
- package/dist/es/node_modules/@tiptap/extension-table/dist/index.js +383 -4
- package/dist/es/node_modules/@tiptap/extension-task-item/dist/index.js +9 -4
- package/dist/es/node_modules/@tiptap/extension-task-list/dist/index.js +9 -4
- package/dist/es/node_modules/@tiptap/extension-text/dist/index.js +16 -4
- package/dist/es/node_modules/@tiptap/extension-text-align/dist/index.js +50 -4
- package/dist/es/node_modules/@tiptap/extension-text-style/dist/index.js +243 -4
- package/dist/es/node_modules/@tiptap/extension-underline/dist/index.js +68 -4
- package/dist/es/node_modules/@tiptap/extensions/dist/index.js +299 -4
- package/dist/es/node_modules/@tiptap/html/dist/index.js +28 -0
- package/dist/es/node_modules/@tiptap/starter-kit/dist/index.js +32 -4
- package/dist/es/node_modules/@tiptap/vue-3/dist/index.js +260 -4
- package/dist/es/node_modules/@vueuse/core/dist/index.js +354 -4
- package/dist/es/node_modules/@vueuse/shared/dist/index.js +139 -4
- package/dist/es/node_modules/codemirror/dist/index.js +43 -4
- package/dist/es/node_modules/crelt/index.js +30 -4
- package/dist/es/node_modules/delegate/src/closest.js +24 -4
- package/dist/es/node_modules/delegate/src/delegate.js +32 -4
- package/dist/es/node_modules/downloadjs/download.js +80 -4
- package/dist/es/node_modules/eventemitter3/index.js +114 -4
- package/dist/es/node_modules/linkifyjs/dist/linkify.js +710 -4
- package/dist/es/node_modules/lodash-es/_DataView.js +9 -4
- package/dist/es/node_modules/lodash-es/_Hash.js +23 -4
- package/dist/es/node_modules/lodash-es/_ListCache.js +23 -4
- package/dist/es/node_modules/lodash-es/_Map.js +9 -4
- package/dist/es/node_modules/lodash-es/_MapCache.js +23 -4
- package/dist/es/node_modules/lodash-es/_Promise.js +9 -4
- package/dist/es/node_modules/lodash-es/_Set.js +9 -4
- package/dist/es/node_modules/lodash-es/_SetCache.js +26 -0
- package/dist/es/node_modules/lodash-es/_Stack.js +21 -4
- package/dist/es/node_modules/lodash-es/_Symbol.js +8 -4
- package/dist/es/node_modules/lodash-es/_Uint8Array.js +8 -4
- package/dist/es/node_modules/lodash-es/_WeakMap.js +9 -4
- package/dist/es/node_modules/lodash-es/_apply.js +19 -4
- package/dist/es/node_modules/lodash-es/_arrayEach.js +11 -4
- package/dist/es/node_modules/lodash-es/_arrayFilter.js +13 -4
- package/dist/es/node_modules/lodash-es/_arrayIncludes.js +21 -0
- package/dist/es/node_modules/lodash-es/_arrayIncludesWith.js +22 -0
- package/dist/es/node_modules/lodash-es/_arrayLikeKeys.js +23 -4
- package/dist/es/node_modules/lodash-es/_arrayMap.js +11 -4
- package/dist/es/node_modules/lodash-es/_arrayPush.js +11 -4
- package/dist/es/node_modules/lodash-es/_arraySome.js +22 -0
- package/dist/es/node_modules/lodash-es/_asciiToArray.js +9 -4
- package/dist/es/node_modules/lodash-es/_assignMergeValue.js +21 -0
- package/dist/es/node_modules/lodash-es/_assignValue.js +13 -4
- package/dist/es/node_modules/lodash-es/_assocIndexOf.js +13 -4
- package/dist/es/node_modules/lodash-es/_baseAssignValue.js +15 -4
- package/dist/es/node_modules/lodash-es/_baseClone.js +57 -4
- package/dist/es/node_modules/lodash-es/_baseCreate.js +30 -0
- package/dist/es/node_modules/lodash-es/_baseFindIndex.js +22 -0
- package/dist/es/node_modules/lodash-es/_baseFlatten.js +16 -4
- package/dist/es/node_modules/lodash-es/_baseFor.js +18 -0
- package/dist/es/node_modules/lodash-es/_baseGet.js +14 -4
- package/dist/es/node_modules/lodash-es/_baseGetAllKeys.js +12 -4
- package/dist/es/node_modules/lodash-es/_baseGetTag.js +13 -4
- package/dist/es/node_modules/lodash-es/_baseIndexOf.js +22 -0
- package/dist/es/node_modules/lodash-es/_baseIntersection.js +42 -0
- package/dist/es/node_modules/lodash-es/_baseIsArguments.js +12 -4
- package/dist/es/node_modules/lodash-es/_baseIsEqual.js +21 -0
- package/dist/es/node_modules/lodash-es/_baseIsEqualDeep.js +45 -0
- package/dist/es/node_modules/lodash-es/_baseIsMap.js +12 -4
- package/dist/{lib/Grid/src/components/CellEditor.css → es/node_modules/lodash-es/_baseIsNaN.js} +9 -4
- package/dist/es/node_modules/lodash-es/_baseIsNative.js +19 -4
- package/dist/es/node_modules/lodash-es/_baseIsRegExp.js +12 -4
- package/dist/es/node_modules/lodash-es/_baseIsSet.js +12 -4
- package/dist/es/node_modules/lodash-es/_baseIsTypedArray.js +15 -4
- package/dist/es/node_modules/lodash-es/_baseKeys.js +27 -0
- package/dist/es/node_modules/lodash-es/_baseKeysIn.js +18 -4
- package/dist/es/node_modules/lodash-es/_baseMerge.js +33 -0
- package/dist/es/node_modules/lodash-es/_baseMergeDeep.js +44 -0
- package/dist/es/node_modules/lodash-es/_baseRest.js +22 -0
- package/dist/es/node_modules/lodash-es/_baseSetToString.js +17 -4
- package/dist/es/node_modules/lodash-es/_baseSlice.js +13 -4
- package/dist/es/node_modules/lodash-es/_baseTimes.js +11 -4
- package/dist/es/node_modules/lodash-es/_baseToString.js +21 -4
- package/dist/es/node_modules/lodash-es/_baseUnary.js +11 -4
- package/dist/es/node_modules/lodash-es/_baseUniq.js +46 -0
- package/dist/es/node_modules/lodash-es/_baseUnset.js +31 -4
- package/dist/es/node_modules/{@tanstack/store/dist/esm/types.js → lodash-es/_cacheHas.js} +9 -4
- package/dist/es/node_modules/lodash-es/_castArrayLikeObject.js +20 -0
- package/dist/es/node_modules/lodash-es/_castPath.js +13 -4
- package/dist/es/node_modules/lodash-es/_castSlice.js +11 -4
- package/dist/es/node_modules/lodash-es/_cloneArrayBuffer.js +11 -4
- package/dist/es/node_modules/lodash-es/_cloneBuffer.js +14 -4
- package/dist/es/node_modules/lodash-es/_cloneDataView.js +11 -4
- package/dist/es/node_modules/lodash-es/_cloneRegExp.js +11 -4
- package/dist/es/node_modules/lodash-es/_cloneSymbol.js +11 -4
- package/dist/es/node_modules/lodash-es/_cloneTypedArray.js +11 -4
- package/dist/es/node_modules/lodash-es/_copyArray.js +22 -0
- package/dist/es/node_modules/lodash-es/_copyObject.js +17 -4
- package/dist/es/node_modules/lodash-es/_coreJsData.js +8 -4
- package/dist/es/node_modules/lodash-es/_createAssigner.js +28 -0
- package/dist/es/node_modules/lodash-es/_createBaseFor.js +26 -0
- package/dist/es/node_modules/lodash-es/_createCaseFirst.js +17 -4
- package/dist/es/node_modules/lodash-es/_createSet.js +22 -0
- package/dist/es/node_modules/lodash-es/_customOmitClone.js +10 -4
- package/dist/es/node_modules/lodash-es/_defineProperty.js +14 -4
- package/dist/es/node_modules/lodash-es/_equalArrays.js +53 -0
- package/dist/es/node_modules/lodash-es/_equalByTag.js +58 -0
- package/dist/es/node_modules/lodash-es/_equalObjects.js +49 -0
- package/dist/es/node_modules/lodash-es/_flatRest.js +12 -4
- package/dist/es/node_modules/lodash-es/_freeGlobal.js +7 -4
- package/dist/es/node_modules/lodash-es/_getAllKeys.js +22 -0
- package/dist/es/node_modules/lodash-es/_getAllKeysIn.js +12 -4
- package/dist/es/node_modules/lodash-es/_getMapData.js +11 -4
- package/dist/es/node_modules/lodash-es/_getNative.js +12 -4
- package/dist/es/node_modules/lodash-es/_getPrototype.js +8 -4
- package/dist/es/node_modules/lodash-es/_getRawTag.js +18 -4
- package/dist/es/node_modules/lodash-es/_getSymbols.js +13 -4
- package/dist/es/node_modules/lodash-es/_getSymbolsIn.js +15 -4
- package/dist/es/node_modules/lodash-es/_getTag.js +31 -4
- package/dist/es/node_modules/lodash-es/_getValue.js +9 -4
- package/dist/es/node_modules/lodash-es/_hasUnicode.js +10 -4
- package/dist/es/node_modules/lodash-es/_hashClear.js +10 -4
- package/dist/es/node_modules/lodash-es/_hashDelete.js +10 -4
- package/dist/es/node_modules/lodash-es/_hashGet.js +16 -4
- package/dist/es/node_modules/lodash-es/_hashHas.js +12 -4
- package/dist/es/node_modules/lodash-es/_hashSet.js +12 -4
- package/dist/es/node_modules/lodash-es/_initCloneArray.js +11 -4
- package/dist/es/node_modules/lodash-es/_initCloneByTag.js +45 -4
- package/dist/es/node_modules/lodash-es/_initCloneObject.js +22 -0
- package/dist/es/node_modules/lodash-es/_isFlattenable.js +13 -4
- package/dist/es/node_modules/lodash-es/_isIndex.js +11 -4
- package/dist/es/node_modules/lodash-es/_isIterateeCall.js +26 -0
- package/dist/es/node_modules/lodash-es/_isKey.js +15 -4
- package/dist/es/node_modules/lodash-es/_isKeyable.js +10 -4
- package/dist/es/node_modules/lodash-es/_isMasked.js +14 -4
- package/dist/es/node_modules/lodash-es/_isPrototype.js +11 -4
- package/dist/es/node_modules/lodash-es/_listCacheClear.js +9 -4
- package/dist/es/node_modules/lodash-es/_listCacheDelete.js +15 -4
- package/dist/es/node_modules/lodash-es/_listCacheGet.js +11 -4
- package/dist/es/node_modules/lodash-es/_listCacheHas.js +10 -4
- package/dist/es/node_modules/lodash-es/_listCacheSet.js +11 -4
- package/dist/es/node_modules/lodash-es/_mapCacheClear.js +16 -4
- package/dist/es/node_modules/lodash-es/_mapCacheDelete.js +11 -4
- package/dist/es/node_modules/lodash-es/_mapCacheGet.js +10 -4
- package/dist/es/node_modules/lodash-es/_mapCacheHas.js +10 -4
- package/dist/es/node_modules/lodash-es/_mapCacheSet.js +11 -4
- package/dist/es/node_modules/lodash-es/_mapToArray.js +22 -0
- package/dist/es/node_modules/lodash-es/_memoizeCapped.js +14 -4
- package/dist/es/node_modules/lodash-es/_nativeCreate.js +8 -4
- package/dist/es/node_modules/lodash-es/_nativeKeys.js +18 -0
- package/dist/es/node_modules/lodash-es/_nativeKeysIn.js +13 -4
- package/dist/es/node_modules/lodash-es/_nodeUtil.js +14 -4
- package/dist/es/node_modules/lodash-es/_objectToString.js +10 -4
- package/dist/es/node_modules/lodash-es/_overArg.js +11 -4
- package/dist/es/node_modules/lodash-es/_overRest.js +18 -4
- package/dist/es/node_modules/lodash-es/_parent.js +11 -4
- package/dist/es/node_modules/lodash-es/_root.js +8 -4
- package/dist/es/node_modules/lodash-es/_safeGet.js +20 -0
- package/dist/es/node_modules/lodash-es/_setCacheAdd.js +20 -0
- package/dist/es/node_modules/lodash-es/_setCacheHas.js +19 -0
- package/dist/es/node_modules/lodash-es/_setToArray.js +22 -0
- package/dist/es/node_modules/lodash-es/_setToString.js +9 -4
- package/dist/es/node_modules/lodash-es/_shortOut.js +19 -4
- package/dist/es/node_modules/lodash-es/_stackClear.js +10 -4
- package/dist/es/node_modules/lodash-es/_stackDelete.js +10 -4
- package/dist/es/node_modules/lodash-es/_stackGet.js +9 -4
- package/dist/es/node_modules/lodash-es/_stackHas.js +9 -4
- package/dist/es/node_modules/lodash-es/_stackSet.js +20 -4
- package/dist/es/node_modules/lodash-es/_strictIndexOf.js +22 -0
- package/dist/es/node_modules/lodash-es/_stringToArray.js +12 -4
- package/dist/es/node_modules/lodash-es/_stringToPath.js +13 -4
- package/dist/es/node_modules/lodash-es/_toKey.js +13 -4
- package/dist/es/node_modules/lodash-es/_toSource.js +20 -4
- package/dist/es/node_modules/lodash-es/_unicodeToArray.js +10 -4
- package/dist/es/node_modules/lodash-es/constant.js +11 -4
- package/dist/es/node_modules/lodash-es/eq.js +9 -4
- package/dist/es/node_modules/lodash-es/flatten.js +11 -4
- package/dist/es/node_modules/lodash-es/get.js +11 -4
- package/dist/es/node_modules/lodash-es/identity.js +9 -4
- package/dist/es/node_modules/lodash-es/intersectionWith.js +25 -0
- package/dist/es/node_modules/lodash-es/isArguments.js +13 -4
- package/dist/es/node_modules/lodash-es/isArray.js +7 -4
- package/dist/es/node_modules/lodash-es/isArrayLike.js +11 -4
- package/dist/es/node_modules/lodash-es/isArrayLikeObject.js +21 -0
- package/dist/es/node_modules/lodash-es/isBuffer.js +9 -4
- package/dist/es/node_modules/lodash-es/isEqual.js +20 -0
- package/dist/es/node_modules/lodash-es/isFinite.js +11 -4
- package/dist/es/node_modules/lodash-es/isFunction.js +15 -4
- package/dist/es/node_modules/lodash-es/isLength.js +10 -4
- package/dist/es/node_modules/lodash-es/isMap.js +10 -4
- package/dist/es/node_modules/lodash-es/isNaN.js +10 -4
- package/dist/es/node_modules/lodash-es/isNil.js +9 -4
- package/dist/es/node_modules/lodash-es/isNumber.js +12 -4
- package/dist/es/node_modules/lodash-es/isObject.js +10 -4
- package/dist/es/node_modules/lodash-es/isObjectLike.js +9 -4
- package/dist/es/node_modules/lodash-es/isPlainObject.js +19 -4
- package/dist/es/node_modules/lodash-es/isRegExp.js +10 -4
- package/dist/es/node_modules/lodash-es/isSet.js +10 -4
- package/dist/es/node_modules/lodash-es/isString.js +13 -4
- package/dist/es/node_modules/lodash-es/isSymbol.js +12 -4
- package/dist/es/node_modules/lodash-es/isTypedArray.js +10 -4
- package/dist/es/node_modules/lodash-es/keys.js +22 -0
- package/dist/es/node_modules/lodash-es/keysIn.js +12 -4
- package/dist/es/node_modules/lodash-es/last.js +10 -4
- package/dist/es/node_modules/lodash-es/memoize.js +21 -4
- package/dist/es/node_modules/lodash-es/mergeWith.js +21 -0
- package/dist/es/node_modules/lodash-es/noop.js +18 -0
- package/dist/es/node_modules/lodash-es/omit.js +26 -4
- package/dist/es/node_modules/lodash-es/stubArray.js +9 -4
- package/dist/es/node_modules/lodash-es/stubFalse.js +9 -4
- package/dist/es/node_modules/lodash-es/toPlainObject.js +21 -0
- package/dist/es/node_modules/lodash-es/toString.js +10 -4
- package/dist/es/node_modules/lodash-es/unionWith.js +25 -0
- package/dist/es/node_modules/lodash-es/upperFirst.js +8 -4
- package/dist/es/node_modules/orderedmap/dist/index.js +106 -4
- package/dist/es/node_modules/path-to-regexp/dist/index.js +275 -0
- package/dist/es/node_modules/prosemirror-commands/dist/index.js +391 -4
- package/dist/es/node_modules/prosemirror-dropcursor/dist/index.js +89 -4
- package/dist/es/node_modules/prosemirror-gapcursor/dist/index.js +207 -4
- package/dist/es/node_modules/prosemirror-history/dist/index.js +251 -4
- package/dist/es/node_modules/prosemirror-keymap/dist/index.js +65 -4
- package/dist/es/node_modules/prosemirror-model/dist/index.js +2736 -4
- package/dist/es/node_modules/prosemirror-schema-list/dist/index.js +91 -4
- package/dist/es/node_modules/prosemirror-state/dist/index.js +825 -4
- package/dist/es/node_modules/prosemirror-tables/dist/index.js +1449 -4
- package/dist/es/node_modules/prosemirror-transform/dist/index.js +1539 -4
- package/dist/es/node_modules/prosemirror-view/dist/index.js +3797 -4
- package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +300 -0
- package/dist/es/node_modules/rope-sequence/dist/index.js +103 -4
- package/dist/es/node_modules/sortablejs/modular/sortable.esm.js +1283 -0
- package/dist/es/node_modules/style-mod/src/style-mod.js +112 -4
- package/dist/es/{Grid → node_modules/title-case/dist}/index.js +10 -4
- package/dist/es/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +135 -4
- package/dist/es/node_modules/w3c-keyname/index.js +96 -4
- package/dist/es/node_modules/xgplayer/dist/index.min.css +3 -3
- package/dist/es/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +200 -4
- package/dist/es/node_modules/xgplayer/es/constant.js +10 -4
- package/dist/es/node_modules/xgplayer/es/defaultConfig.js +90 -4
- package/dist/es/node_modules/xgplayer/es/error.js +67 -4
- package/dist/es/node_modules/xgplayer/es/events.js +70 -4
- package/dist/es/node_modules/xgplayer/es/index.umd.js +48 -4
- package/dist/es/node_modules/xgplayer/es/instManager.js +104 -4
- package/dist/es/node_modules/xgplayer/es/lang/en.js +82 -4
- package/dist/es/node_modules/xgplayer/es/lang/i18n.js +78 -4
- package/dist/es/node_modules/xgplayer/es/lang/jp.js +82 -4
- package/dist/es/node_modules/xgplayer/es/lang/zh-cn.js +82 -4
- package/dist/es/node_modules/xgplayer/es/mediaProxy.js +469 -4
- package/dist/es/node_modules/xgplayer/es/player.js +1243 -4
- package/dist/es/node_modules/xgplayer/es/plugin/basePlugin.js +210 -4
- package/dist/es/node_modules/xgplayer/es/plugin/hooksDescriptor.js +133 -4
- package/dist/es/node_modules/xgplayer/es/plugin/plugin.js +369 -4
- package/dist/es/node_modules/xgplayer/es/plugin/pluginsManager.js +207 -4
- package/dist/es/node_modules/xgplayer/es/plugin/preset.js +17 -4
- package/dist/es/node_modules/xgplayer/es/plugin/resizeObserver.js +84 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/back.js +13 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/download.js +23 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/exitFull.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/loading.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/pause.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/pipIcon.js +13 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +16 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/play.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/playNext.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/replay.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/requestFull.js +12 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/rotate.js +20 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/seekicon.js +15 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +13 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +13 -4
- package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +13 -4
- package/dist/es/node_modules/xgplayer/es/plugins/common/iconPlugin.js +38 -4
- package/dist/es/node_modules/xgplayer/es/plugins/common/iconTools.js +15 -4
- package/dist/es/node_modules/xgplayer/es/plugins/common/optionList.js +82 -4
- package/dist/es/node_modules/xgplayer/es/plugins/common/optionsIcon.js +196 -4
- package/dist/es/node_modules/xgplayer/es/plugins/common/thumbnail.js +144 -4
- package/dist/es/node_modules/xgplayer/es/plugins/controls/index.js +174 -4
- package/dist/es/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +108 -4
- package/dist/es/node_modules/xgplayer/es/plugins/definition/index.js +113 -4
- package/dist/es/node_modules/xgplayer/es/plugins/download/index.js +86 -4
- package/dist/es/node_modules/xgplayer/es/plugins/dynamicBg/index.js +235 -5
- package/dist/es/node_modules/xgplayer/es/plugins/enter/index.js +45 -4
- package/dist/es/node_modules/xgplayer/es/plugins/error/index.js +71 -4
- package/dist/es/node_modules/xgplayer/es/plugins/fpsDetect/index.js +119 -4
- package/dist/es/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +71 -4
- package/dist/es/node_modules/xgplayer/es/plugins/fullscreen/index.js +153 -4
- package/dist/es/node_modules/xgplayer/es/plugins/gapJump/index.js +99 -4
- package/dist/es/node_modules/xgplayer/es/plugins/keyboard/index.js +302 -4
- package/dist/es/node_modules/xgplayer/es/plugins/loading/index.js +49 -4
- package/dist/es/node_modules/xgplayer/es/plugins/logger/index.js +174 -5
- package/dist/es/node_modules/xgplayer/es/plugins/miniScreen/index.js +172 -4
- package/dist/es/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +58 -4
- package/dist/es/node_modules/xgplayer/es/plugins/mobile/index.js +446 -4
- package/dist/es/node_modules/xgplayer/es/plugins/mobile/touch.js +141 -4
- package/dist/es/node_modules/xgplayer/es/plugins/pc/index.js +125 -4
- package/dist/es/node_modules/xgplayer/es/plugins/pip/index.js +219 -4
- package/dist/es/node_modules/xgplayer/es/plugins/play/index.js +105 -4
- package/dist/es/node_modules/xgplayer/es/plugins/playNext/index.js +81 -4
- package/dist/es/node_modules/xgplayer/es/plugins/playbackRate/index.js +103 -4
- package/dist/es/node_modules/xgplayer/es/plugins/poster/index.js +122 -4
- package/dist/es/node_modules/xgplayer/es/plugins/progress/index.js +434 -4
- package/dist/es/node_modules/xgplayer/es/plugins/progress/innerList.js +218 -4
- package/dist/es/node_modules/xgplayer/es/plugins/progress/miniProgress.js +96 -4
- package/dist/es/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +178 -4
- package/dist/es/node_modules/xgplayer/es/plugins/progressPreview/index.js +295 -4
- package/dist/es/node_modules/xgplayer/es/plugins/prompt/index.js +89 -4
- package/dist/es/node_modules/xgplayer/es/plugins/replay/index.js +95 -4
- package/dist/es/node_modules/xgplayer/es/plugins/rotate/index.js +109 -4
- package/dist/es/node_modules/xgplayer/es/plugins/screenShot/index.js +137 -4
- package/dist/es/node_modules/xgplayer/es/plugins/start/index.js +225 -4
- package/dist/es/node_modules/xgplayer/es/plugins/stats/index.js +155 -4
- package/dist/es/node_modules/xgplayer/es/plugins/testspeed/index.js +137 -4
- package/dist/es/node_modules/xgplayer/es/plugins/time/index.js +167 -4
- package/dist/es/node_modules/xgplayer/es/plugins/time/timesegments.js +149 -4
- package/dist/es/node_modules/xgplayer/es/plugins/volume/index.js +209 -4
- package/dist/es/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +56 -4
- package/dist/es/node_modules/xgplayer/es/presets/default.js +64 -4
- package/dist/es/node_modules/xgplayer/es/state.js +16 -4
- package/dist/es/node_modules/xgplayer/es/stateClassMap.js +37 -4
- package/dist/es/node_modules/xgplayer/es/utils/database.js +86 -4
- package/dist/es/node_modules/xgplayer/es/utils/debug.js +37 -4
- package/dist/es/node_modules/xgplayer/es/utils/draggabilly.js +274 -4
- package/dist/es/node_modules/xgplayer/es/utils/sniffer.js +114 -4
- package/dist/es/node_modules/xgplayer/es/utils/util.js +520 -4
- package/dist/es/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +28 -4
- package/dist/es/node_modules/xgplayer/es/version.js +7 -4
- package/dist/es/packages/components/index.js +88 -4
- package/dist/es/packages/hooks/dist/index.js +81 -0
- package/dist/es/packages/utils/dist/index.js +599 -0
- package/dist/es/styles/tokens.css +3 -3
- package/dist/lib/Button/index.js +4 -4
- package/dist/lib/Button/src/Button.css +3 -3
- package/dist/lib/Button/src/Button.vue.js +4 -4
- package/dist/lib/Button/src/Button2.css +3 -3
- package/dist/lib/CodeEditor/index.js +4 -4
- package/dist/lib/CodeEditor/src/index.css +4 -4
- package/dist/lib/CodeEditor/src/index.vue.js +4 -4
- package/dist/lib/CodeEditor/src/index2.css +3 -3
- package/dist/lib/CodeEditor/src/index3.css +4 -4
- package/dist/lib/ConfigProvider/index.js +4 -4
- package/dist/lib/ConfigProvider/src/configProvider.js +4 -4
- package/dist/lib/ConfigProvider/src/configProviderProps.js +4 -4
- package/dist/lib/ConfigProvider/src/constants.js +4 -4
- package/dist/lib/ConfigProvider/src/useGlobalConfig.js +4 -4
- package/dist/lib/CountTo/index.js +4 -4
- package/dist/lib/CountTo/src/index.css +3 -3
- package/dist/lib/CountTo/src/index.vue.js +4 -4
- package/dist/lib/Ellipsis/index.js +4 -4
- package/dist/lib/Ellipsis/src/components/JsEllipsis.css +3 -3
- package/dist/lib/Ellipsis/src/components/JsEllipsis.vue.js +4 -4
- package/dist/lib/Ellipsis/src/components/NativeEllipsis.css +3 -3
- package/dist/lib/Ellipsis/src/components/NativeEllipsis.vue.js +4 -4
- package/dist/lib/Ellipsis/src/components/NativeEllipsis2.css +3 -3
- package/dist/lib/Ellipsis/src/index.css +3 -3
- package/dist/lib/Ellipsis/src/index.vue.js +4 -4
- package/dist/lib/Ellipsis/src/utils/utils.js +4 -4
- package/dist/lib/Form/index.js +4 -4
- package/dist/lib/Form/src/Form.css +3 -3
- package/dist/lib/Form/src/Form.vue.js +4 -4
- package/dist/lib/Form/src/Form2.css +3 -3
- package/dist/lib/Form/src/styles/form.css +3 -3
- package/dist/lib/Marquee/index.js +4 -4
- package/dist/lib/Marquee/src/index.css +3 -3
- package/dist/lib/Marquee/src/index.vue.js +4 -4
- package/dist/lib/Marquee/src/index2.css +3 -3
- package/dist/lib/Overlay/index.js +4 -4
- package/dist/lib/Overlay/src/Message.css +3 -3
- package/dist/lib/Overlay/src/Message.vue.js +4 -4
- package/dist/lib/Overlay/src/Message2.css +3 -3
- package/dist/lib/Overlay/src/Modal.css +3 -3
- package/dist/lib/Overlay/src/Modal.vue.js +4 -4
- package/dist/lib/Overlay/src/Modal2.css +3 -3
- package/dist/lib/Overlay/src/Notice.css +3 -3
- package/dist/lib/Overlay/src/Notice.vue.js +4 -4
- package/dist/lib/Overlay/src/Notice2.css +3 -3
- package/dist/lib/Overlay/src/Tooltip.css +3 -3
- package/dist/lib/Overlay/src/Tooltip.vue.js +4 -4
- package/dist/lib/Overlay/src/Tooltip2.css +3 -3
- package/dist/lib/RichTextEditor/index.js +4 -4
- package/dist/lib/RichTextEditor/src/ToolbarPanel.css +3 -3
- package/dist/lib/RichTextEditor/src/ToolbarPanel.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/ToolbarPanel2.css +3 -3
- package/dist/lib/RichTextEditor/src/components/BlockquoteButton.css +4 -4
- package/dist/lib/RichTextEditor/src/components/BlockquoteButton.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/CodeBlockButton.css +4 -4
- package/dist/lib/RichTextEditor/src/components/CodeBlockButton.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/ColorHighlightPopover.css +3 -3
- package/dist/lib/RichTextEditor/src/components/ColorHighlightPopover.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/FontSizeDropdownMenu.css +3 -3
- package/dist/lib/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/HeadingDropdownMenu.css +3 -3
- package/dist/lib/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/ImageUploadButton.css +4 -4
- package/dist/lib/RichTextEditor/src/components/ImageUploadButton.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/LinkPopover.css +4 -4
- package/dist/lib/RichTextEditor/src/components/LinkPopover.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/LinkPopover2.css +4 -4
- package/dist/lib/RichTextEditor/src/components/ListDropdownMenu.css +3 -3
- package/dist/lib/RichTextEditor/src/components/ListDropdownMenu.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/MarkButton.css +4 -4
- package/dist/lib/RichTextEditor/src/components/MarkButton.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/TableButton.css +3 -3
- package/dist/lib/RichTextEditor/src/components/TableButton.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/TextAlignDropdownMenu.css +3 -3
- package/dist/lib/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/TextColorPopover.css +3 -3
- package/dist/lib/RichTextEditor/src/components/TextColorPopover.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/ToolbarGroup.css +3 -3
- package/dist/lib/RichTextEditor/src/components/ToolbarGroup.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/ToolbarSeparator.css +3 -3
- package/dist/lib/RichTextEditor/src/components/ToolbarSeparator.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/UndoRedoButton.css +4 -4
- package/dist/lib/RichTextEditor/src/components/UndoRedoButton.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/VideoUploadButton.css +4 -4
- package/dist/lib/RichTextEditor/src/components/VideoUploadButton.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/basic/ColorPicker.css +4 -4
- package/dist/lib/RichTextEditor/src/components/basic/ColorPicker.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal.css +3 -3
- package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal2.css +3 -3
- package/dist/lib/RichTextEditor/src/components/basic/SelectMenu.css +4 -4
- package/dist/lib/RichTextEditor/src/components/basic/SelectMenu.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/components/basic/SelectMenu2.css +4 -4
- package/dist/lib/RichTextEditor/src/constant/index.js +4 -4
- package/dist/lib/RichTextEditor/src/extensions/video.js +4 -4
- package/dist/lib/RichTextEditor/src/index.css +4 -4
- package/dist/lib/RichTextEditor/src/index.vue.js +4 -4
- package/dist/lib/RichTextEditor/src/index2.css +4 -4
- package/dist/lib/RichTextEditor/src/props.js +4 -4
- package/dist/lib/ScaleScreen/index.js +4 -4
- package/dist/lib/ScaleScreen/src/index.css +3 -3
- package/dist/lib/ScaleScreen/src/index.vue.js +4 -4
- package/dist/lib/ScaleScreen/src/index2.css +3 -3
- package/dist/lib/Transition/index.js +4 -4
- package/dist/lib/Transition/src/CollapseTransition.css +3 -3
- package/dist/lib/Transition/src/CollapseTransition.vue.js +4 -4
- package/dist/lib/Transition/src/CollapseTransition2.css +3 -3
- package/dist/lib/Transition/src/CreateTransition.js +4 -4
- package/dist/lib/Transition/src/ExpandTransition.js +4 -4
- package/dist/lib/Transition/src/style/index.css +3 -3
- package/dist/lib/Transition/style.js +4 -4
- package/dist/lib/VideoBackground/index.js +4 -4
- package/dist/lib/VideoBackground/src/helper.js +4 -4
- package/dist/lib/VideoBackground/src/index.css +3 -3
- package/dist/lib/VideoBackground/src/index.vue.js +4 -4
- package/dist/lib/VideoBackground/src/index2.css +3 -3
- package/dist/lib/VideoBackground/src/index3.css +3 -3
- package/dist/lib/VideoBackground/src/videoBackground.js +4 -4
- package/dist/lib/VideoPlayer/index.js +4 -4
- package/dist/lib/VideoPlayer/src/index.css +3 -3
- package/dist/lib/VideoPlayer/src/index.vue.js +4 -4
- package/dist/lib/VirtualScroll/index.js +4 -4
- package/dist/lib/VirtualScroll/src/index.css +3 -3
- package/dist/lib/VirtualScroll/src/index.vue.js +4 -4
- package/dist/lib/VirtualScroll/src/index.vue2.js +4 -4
- package/dist/lib/VirtualScroll/src/index2.css +3 -3
- package/dist/lib/_virtual/_commonjsHelpers.js +4 -4
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +4 -4
- package/dist/lib/_virtual/delegate.js +4 -4
- package/dist/lib/_virtual/download.js +4 -4
- package/dist/lib/_virtual/download2.js +4 -4
- package/dist/lib/_virtual/index.js +4 -4
- package/dist/lib/_virtual/index2.js +4 -4
- package/dist/lib/_virtual/index3.js +14 -0
- package/dist/lib/{node_modules/@tanstack/store/dist/esm/types.js → _virtual/index4.js} +4 -4
- package/dist/lib/hooks/useLocale.js +4 -4
- package/dist/lib/hooks/useNamespace.js +4 -4
- package/dist/lib/index.js +4 -4
- package/dist/lib/locale/lang/en-US.js +4 -4
- package/dist/lib/locale/lang/ja-JP.js +4 -4
- package/dist/lib/locale/lang/zh-CN.js +4 -4
- package/dist/lib/node_modules/@codemirror/autocomplete/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/commands/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/lang-java/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/lang-javascript/dist/index.js +16 -4
- package/dist/lib/node_modules/@codemirror/lang-json/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/lang-python/dist/index.js +6 -4
- package/dist/lib/node_modules/@codemirror/lang-sql/dist/index.js +5 -4
- package/dist/lib/node_modules/@codemirror/lang-xml/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/lang-yaml/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/language/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/lint/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/search/dist/index.js +5 -4
- package/dist/lib/node_modules/@codemirror/state/dist/index.js +8 -4
- package/dist/lib/node_modules/@codemirror/theme-one-dark/dist/index.js +4 -4
- package/dist/lib/node_modules/@codemirror/view/dist/index.js +8 -4
- package/dist/lib/node_modules/@lezer/common/dist/index.js +4 -4
- package/dist/lib/node_modules/@lezer/highlight/dist/index.js +4 -4
- package/dist/lib/node_modules/@lezer/java/dist/index.js +4 -4
- package/dist/lib/node_modules/@lezer/javascript/dist/index.js +4 -4
- package/dist/lib/node_modules/@lezer/json/dist/index.js +4 -4
- package/dist/lib/node_modules/@lezer/lr/dist/index.js +4 -4
- package/dist/lib/node_modules/@lezer/python/dist/index.js +4 -4
- package/dist/lib/node_modules/@lezer/xml/dist/index.js +4 -4
- package/dist/lib/node_modules/@lezer/yaml/dist/index.js +4 -4
- package/dist/lib/node_modules/@marijn/find-cluster-break/src/index.js +4 -4
- package/dist/lib/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +4 -4
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/EventClient.js +4 -4
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +4 -4
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FormApi.js +4 -4
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +4 -4
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +4 -4
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +4 -4
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/utils.js +4 -4
- package/dist/lib/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +4 -4
- package/dist/lib/node_modules/@tanstack/store/dist/esm/alien.js +14 -0
- package/dist/lib/node_modules/@tanstack/store/dist/esm/atom.js +14 -0
- package/dist/lib/node_modules/@tanstack/store/dist/esm/batch.js +14 -0
- package/dist/lib/node_modules/@tanstack/store/dist/esm/store.js +4 -4
- package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useField.js +4 -4
- package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useForm.js +4 -4
- package/dist/lib/node_modules/@tanstack/vue-store/dist/esm/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/core/dist/index.js +94 -4
- package/dist/lib/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-blockquote/dist/index.js +8 -4
- package/dist/lib/node_modules/@tiptap/extension-bold/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-character-count/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-code/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-code-block/dist/index.js +21 -4
- package/dist/lib/node_modules/@tiptap/extension-document/dist/index.js +6 -4
- package/dist/lib/node_modules/@tiptap/extension-hard-break/dist/index.js +6 -4
- package/dist/lib/node_modules/@tiptap/extension-heading/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-highlight/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-image/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-italic/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-link/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-list/dist/index.js +15 -4
- package/dist/lib/node_modules/@tiptap/extension-paragraph/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-strike/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-subscript/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-superscript/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-table/dist/index.js +8 -4
- package/dist/lib/node_modules/@tiptap/extension-task-item/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-task-list/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-text/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-text-align/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-text-style/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extension-underline/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/extensions/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/html/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/starter-kit/dist/index.js +4 -4
- package/dist/lib/node_modules/@tiptap/vue-3/dist/index.js +4 -4
- package/dist/lib/node_modules/@vueuse/core/dist/index.js +4 -4
- package/dist/lib/node_modules/@vueuse/shared/dist/index.js +4 -4
- package/dist/lib/node_modules/codemirror/dist/index.js +4 -4
- package/dist/lib/node_modules/crelt/index.js +4 -4
- package/dist/lib/node_modules/delegate/src/closest.js +4 -4
- package/dist/lib/node_modules/delegate/src/delegate.js +4 -4
- package/dist/lib/node_modules/downloadjs/download.js +6 -4
- package/dist/lib/node_modules/eventemitter3/index.js +4 -4
- package/dist/lib/node_modules/linkifyjs/dist/linkify.js +8 -4
- package/dist/lib/node_modules/lodash-es/_DataView.js +4 -4
- package/dist/lib/node_modules/lodash-es/_Hash.js +4 -4
- package/dist/lib/node_modules/lodash-es/_ListCache.js +4 -4
- package/dist/lib/node_modules/lodash-es/_Map.js +4 -4
- package/dist/lib/node_modules/lodash-es/_MapCache.js +4 -4
- package/dist/lib/node_modules/lodash-es/_Promise.js +4 -4
- package/dist/lib/node_modules/lodash-es/_Set.js +4 -4
- package/dist/lib/node_modules/lodash-es/_SetCache.js +14 -0
- package/dist/lib/node_modules/lodash-es/_Stack.js +4 -4
- package/dist/lib/node_modules/lodash-es/_Symbol.js +4 -4
- package/dist/lib/node_modules/lodash-es/_Uint8Array.js +4 -4
- package/dist/lib/node_modules/lodash-es/_WeakMap.js +4 -4
- package/dist/lib/node_modules/lodash-es/_apply.js +4 -4
- package/dist/lib/node_modules/lodash-es/_arrayEach.js +4 -4
- package/dist/lib/node_modules/lodash-es/_arrayFilter.js +4 -4
- package/dist/lib/node_modules/lodash-es/_arrayIncludes.js +14 -0
- package/dist/lib/node_modules/lodash-es/_arrayIncludesWith.js +14 -0
- package/dist/lib/node_modules/lodash-es/_arrayLikeKeys.js +4 -4
- package/dist/lib/node_modules/lodash-es/_arrayMap.js +4 -4
- package/dist/lib/node_modules/lodash-es/_arrayPush.js +4 -4
- package/dist/lib/node_modules/lodash-es/_arraySome.js +14 -0
- package/dist/lib/node_modules/lodash-es/_asciiToArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/_assignMergeValue.js +14 -0
- package/dist/lib/node_modules/lodash-es/_assignValue.js +4 -4
- package/dist/lib/node_modules/lodash-es/_assocIndexOf.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseAssignValue.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseClone.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseFindIndex.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseFlatten.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseFor.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseGet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseGetAllKeys.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseGetTag.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseIndexOf.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIntersection.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIsArguments.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseIsEqual.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIsEqualDeep.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIsMap.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseIsNaN.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIsNative.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseIsRegExp.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseIsSet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseIsTypedArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseKeys.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseKeysIn.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseMerge.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseMergeDeep.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseRest.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseSetToString.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseSlice.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseTimes.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseToString.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseUnary.js +4 -4
- package/dist/lib/node_modules/lodash-es/_baseUniq.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseUnset.js +4 -4
- package/dist/lib/node_modules/lodash-es/_cacheHas.js +14 -0
- package/dist/lib/node_modules/lodash-es/_castArrayLikeObject.js +14 -0
- package/dist/lib/node_modules/lodash-es/_castPath.js +4 -4
- package/dist/lib/node_modules/lodash-es/_castSlice.js +4 -4
- package/dist/lib/node_modules/lodash-es/_cloneArrayBuffer.js +4 -4
- package/dist/lib/node_modules/lodash-es/_cloneBuffer.js +4 -4
- package/dist/lib/node_modules/lodash-es/_cloneDataView.js +4 -4
- package/dist/lib/node_modules/lodash-es/_cloneRegExp.js +4 -4
- package/dist/lib/node_modules/lodash-es/_cloneSymbol.js +4 -4
- package/dist/lib/node_modules/lodash-es/_cloneTypedArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/_copyArray.js +14 -0
- package/dist/lib/node_modules/lodash-es/_copyObject.js +4 -4
- package/dist/lib/node_modules/lodash-es/_coreJsData.js +4 -4
- package/dist/lib/node_modules/lodash-es/_createAssigner.js +14 -0
- package/dist/lib/node_modules/lodash-es/_createBaseFor.js +14 -0
- package/dist/lib/node_modules/lodash-es/_createCaseFirst.js +4 -4
- package/dist/lib/node_modules/lodash-es/_createSet.js +14 -0
- package/dist/lib/node_modules/lodash-es/_customOmitClone.js +4 -4
- package/dist/lib/node_modules/lodash-es/_defineProperty.js +4 -4
- package/dist/lib/node_modules/lodash-es/_equalArrays.js +14 -0
- package/dist/lib/node_modules/lodash-es/_equalByTag.js +14 -0
- package/dist/lib/node_modules/lodash-es/_equalObjects.js +14 -0
- package/dist/lib/node_modules/lodash-es/_flatRest.js +4 -4
- package/dist/lib/node_modules/lodash-es/_freeGlobal.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getAllKeys.js +14 -0
- package/dist/lib/node_modules/lodash-es/_getAllKeysIn.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getMapData.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getNative.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getPrototype.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getRawTag.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getSymbols.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getSymbolsIn.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getTag.js +4 -4
- package/dist/lib/node_modules/lodash-es/_getValue.js +4 -4
- package/dist/lib/node_modules/lodash-es/_hasUnicode.js +4 -4
- package/dist/lib/node_modules/lodash-es/_hashClear.js +4 -4
- package/dist/lib/node_modules/lodash-es/_hashDelete.js +4 -4
- package/dist/lib/node_modules/lodash-es/_hashGet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_hashHas.js +4 -4
- package/dist/lib/node_modules/lodash-es/_hashSet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_initCloneArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/_initCloneByTag.js +4 -4
- package/dist/lib/node_modules/lodash-es/_initCloneObject.js +14 -0
- package/dist/lib/node_modules/lodash-es/_isFlattenable.js +4 -4
- package/dist/lib/node_modules/lodash-es/_isIndex.js +4 -4
- package/dist/lib/node_modules/lodash-es/_isIterateeCall.js +14 -0
- package/dist/lib/node_modules/lodash-es/_isKey.js +4 -4
- package/dist/lib/node_modules/lodash-es/_isKeyable.js +4 -4
- package/dist/lib/node_modules/lodash-es/_isMasked.js +4 -4
- package/dist/lib/node_modules/lodash-es/_isPrototype.js +4 -4
- package/dist/lib/node_modules/lodash-es/_listCacheClear.js +4 -4
- package/dist/lib/node_modules/lodash-es/_listCacheDelete.js +4 -4
- package/dist/lib/node_modules/lodash-es/_listCacheGet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_listCacheHas.js +4 -4
- package/dist/lib/node_modules/lodash-es/_listCacheSet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_mapCacheClear.js +4 -4
- package/dist/lib/node_modules/lodash-es/_mapCacheDelete.js +4 -4
- package/dist/lib/node_modules/lodash-es/_mapCacheGet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_mapCacheHas.js +4 -4
- package/dist/lib/node_modules/lodash-es/_mapCacheSet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_mapToArray.js +14 -0
- package/dist/lib/node_modules/lodash-es/_memoizeCapped.js +4 -4
- package/dist/lib/node_modules/lodash-es/_nativeCreate.js +4 -4
- package/dist/lib/node_modules/lodash-es/_nativeKeys.js +14 -0
- package/dist/lib/node_modules/lodash-es/_nativeKeysIn.js +4 -4
- package/dist/lib/node_modules/lodash-es/_nodeUtil.js +4 -4
- package/dist/lib/node_modules/lodash-es/_objectToString.js +4 -4
- package/dist/lib/node_modules/lodash-es/_overArg.js +4 -4
- package/dist/lib/node_modules/lodash-es/_overRest.js +4 -4
- package/dist/lib/node_modules/lodash-es/_parent.js +4 -4
- package/dist/lib/node_modules/lodash-es/_root.js +4 -4
- package/dist/lib/node_modules/lodash-es/_safeGet.js +14 -0
- package/dist/lib/node_modules/lodash-es/_setCacheAdd.js +14 -0
- package/dist/lib/node_modules/lodash-es/_setCacheHas.js +14 -0
- package/dist/lib/node_modules/lodash-es/_setToArray.js +14 -0
- package/dist/lib/node_modules/lodash-es/_setToString.js +4 -4
- package/dist/lib/node_modules/lodash-es/_shortOut.js +4 -4
- package/dist/lib/node_modules/lodash-es/_stackClear.js +4 -4
- package/dist/lib/node_modules/lodash-es/_stackDelete.js +4 -4
- package/dist/lib/node_modules/lodash-es/_stackGet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_stackHas.js +4 -4
- package/dist/lib/node_modules/lodash-es/_stackSet.js +4 -4
- package/dist/lib/node_modules/lodash-es/_strictIndexOf.js +14 -0
- package/dist/lib/node_modules/lodash-es/_stringToArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/_stringToPath.js +4 -4
- package/dist/lib/node_modules/lodash-es/_toKey.js +4 -4
- package/dist/lib/node_modules/lodash-es/_toSource.js +4 -4
- package/dist/lib/node_modules/lodash-es/_unicodeToArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/constant.js +4 -4
- package/dist/lib/node_modules/lodash-es/eq.js +4 -4
- package/dist/lib/node_modules/lodash-es/flatten.js +4 -4
- package/dist/lib/node_modules/lodash-es/get.js +4 -4
- package/dist/lib/node_modules/lodash-es/identity.js +4 -4
- package/dist/lib/node_modules/lodash-es/intersectionWith.js +14 -0
- package/dist/lib/node_modules/lodash-es/isArguments.js +4 -4
- package/dist/lib/node_modules/lodash-es/isArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/isArrayLike.js +4 -4
- package/dist/lib/node_modules/lodash-es/isArrayLikeObject.js +14 -0
- package/dist/lib/node_modules/lodash-es/isBuffer.js +4 -4
- package/dist/lib/node_modules/lodash-es/isEqual.js +14 -0
- package/dist/lib/node_modules/lodash-es/isFinite.js +4 -4
- package/dist/lib/node_modules/lodash-es/isFunction.js +4 -4
- package/dist/lib/node_modules/lodash-es/isLength.js +4 -4
- package/dist/lib/node_modules/lodash-es/isMap.js +4 -4
- package/dist/lib/node_modules/lodash-es/isNaN.js +4 -4
- package/dist/lib/node_modules/lodash-es/isNil.js +4 -4
- package/dist/lib/node_modules/lodash-es/isNumber.js +4 -4
- package/dist/lib/node_modules/lodash-es/isObject.js +4 -4
- package/dist/lib/node_modules/lodash-es/isObjectLike.js +4 -4
- package/dist/lib/node_modules/lodash-es/isPlainObject.js +4 -4
- package/dist/lib/node_modules/lodash-es/isRegExp.js +4 -4
- package/dist/lib/node_modules/lodash-es/isSet.js +4 -4
- package/dist/lib/node_modules/lodash-es/isString.js +4 -4
- package/dist/lib/node_modules/lodash-es/isSymbol.js +4 -4
- package/dist/lib/node_modules/lodash-es/isTypedArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/keys.js +14 -0
- package/dist/lib/node_modules/lodash-es/keysIn.js +4 -4
- package/dist/lib/node_modules/lodash-es/last.js +4 -4
- package/dist/lib/node_modules/lodash-es/memoize.js +4 -4
- package/dist/lib/node_modules/lodash-es/mergeWith.js +14 -0
- package/dist/lib/node_modules/lodash-es/noop.js +14 -0
- package/dist/lib/node_modules/lodash-es/omit.js +4 -4
- package/dist/lib/node_modules/lodash-es/stubArray.js +4 -4
- package/dist/lib/node_modules/lodash-es/stubFalse.js +4 -4
- package/dist/lib/node_modules/lodash-es/toPlainObject.js +14 -0
- package/dist/lib/node_modules/lodash-es/toString.js +4 -4
- package/dist/lib/node_modules/lodash-es/unionWith.js +14 -0
- package/dist/lib/node_modules/lodash-es/upperFirst.js +4 -4
- package/dist/lib/node_modules/orderedmap/dist/index.js +4 -4
- package/dist/lib/node_modules/path-to-regexp/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-commands/dist/index.js +5 -4
- package/dist/lib/node_modules/prosemirror-dropcursor/dist/index.js +4 -4
- package/dist/lib/node_modules/prosemirror-gapcursor/dist/index.js +4 -4
- package/dist/lib/node_modules/prosemirror-history/dist/index.js +4 -4
- package/dist/lib/node_modules/prosemirror-keymap/dist/index.js +4 -4
- package/dist/lib/node_modules/prosemirror-model/dist/index.js +7 -4
- package/dist/lib/node_modules/prosemirror-schema-list/dist/index.js +4 -4
- package/dist/lib/node_modules/prosemirror-state/dist/index.js +4 -4
- package/dist/lib/node_modules/prosemirror-tables/dist/index.js +4 -4
- package/dist/lib/node_modules/prosemirror-transform/dist/index.js +5 -4
- package/dist/lib/node_modules/prosemirror-view/dist/index.js +8 -4
- package/dist/lib/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +14 -0
- package/dist/lib/node_modules/rope-sequence/dist/index.js +4 -4
- package/dist/lib/node_modules/sortablejs/modular/sortable.esm.js +14 -0
- package/dist/lib/node_modules/style-mod/src/style-mod.js +6 -4
- package/dist/lib/{Grid → node_modules/title-case/dist}/index.js +4 -4
- package/dist/lib/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +4 -4
- package/dist/lib/node_modules/w3c-keyname/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/dist/index.min.css +3 -3
- package/dist/lib/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +5 -4
- package/dist/lib/node_modules/xgplayer/es/constant.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/defaultConfig.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/error.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/events.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/index.umd.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/instManager.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/lang/en.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/lang/i18n.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/lang/jp.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/lang/zh-cn.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/mediaProxy.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/player.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugin/basePlugin.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugin/hooksDescriptor.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugin/plugin.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugin/pluginsManager.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugin/preset.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugin/resizeObserver.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/back.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/download.js +18 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/exitFull.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/loading.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/pause.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/pipIcon.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +11 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/play.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/playNext.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/replay.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/requestFull.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/rotate.js +15 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/seekicon.js +10 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/common/iconPlugin.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/common/iconTools.js +6 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/common/optionList.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/common/optionsIcon.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/common/thumbnail.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/controls/index.js +12 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/definition/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/download/index.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/dynamicBg/index.js +5 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/enter/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/error/index.js +9 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/fpsDetect/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +5 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/fullscreen/index.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/gapJump/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/keyboard/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/loading/index.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/logger/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/miniScreen/index.js +16 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/mobile/index.js +22 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/mobile/touch.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/pc/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/pip/index.js +11 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/play/index.js +8 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/playNext/index.js +10 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/playbackRate/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/poster/index.js +5 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/progress/index.js +10 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/progress/innerList.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/progress/miniProgress.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/progressPreview/index.js +14 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/prompt/index.js +6 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/replay/index.js +6 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/rotate/index.js +9 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/screenShot/index.js +9 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/start/index.js +7 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/stats/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/testspeed/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/time/index.js +9 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/time/timesegments.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/volume/index.js +14 -4
- package/dist/lib/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/presets/default.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/state.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/stateClassMap.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/utils/database.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/utils/debug.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/utils/draggabilly.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/utils/sniffer.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/utils/util.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +4 -4
- package/dist/lib/node_modules/xgplayer/es/version.js +4 -4
- package/dist/lib/packages/components/index.js +4 -4
- package/dist/lib/packages/hooks/dist/index.js +14 -0
- package/dist/lib/packages/utils/dist/index.js +14 -0
- package/dist/lib/styles/tokens.css +3 -3
- package/index.d.ts +227 -113
- package/package.json +26 -28
- package/dist/es/Grid/src/Grid.css +0 -14
- package/dist/es/Grid/src/Grid.vue.js +0 -14
- package/dist/es/Grid/src/components/ActionBar.css +0 -14
- package/dist/es/Grid/src/components/ActionBar.vue.js +0 -14
- package/dist/es/Grid/src/components/CellEditor.vue.js +0 -14
- package/dist/es/Grid/src/components/CellEditor2.css +0 -14
- package/dist/es/Grid/src/components/ColumnFilter.css +0 -14
- package/dist/es/Grid/src/components/ColumnFilter.vue.js +0 -14
- package/dist/es/Grid/src/components/ColumnSettings.css +0 -14
- package/dist/es/Grid/src/components/ColumnSettings.vue.js +0 -14
- package/dist/es/Grid/src/components/DataTable.css +0 -14
- package/dist/es/Grid/src/components/DataTable.vue.js +0 -14
- package/dist/es/Grid/src/components/Pager.css +0 -14
- package/dist/es/Grid/src/components/Pager.vue.js +0 -14
- package/dist/es/Grid/src/components/QueryBar.css +0 -14
- package/dist/es/Grid/src/components/QueryBar.vue.js +0 -14
- package/dist/es/Grid/src/composables/useCellEditor.js +0 -14
- package/dist/es/Grid/src/composables/useGridTable.js +0 -14
- package/dist/es/Grid/src/styles/table.css +0 -14
- package/dist/es/node_modules/@tanstack/store/dist/esm/derived.js +0 -14
- package/dist/es/node_modules/@tanstack/store/dist/esm/scheduler.js +0 -14
- package/dist/es/node_modules/@tanstack/table-core/build/lib/index.js +0 -14
- package/dist/es/node_modules/@tanstack/vue-table/build/lib/index.js +0 -14
- package/dist/lib/Grid/src/Grid.css +0 -14
- package/dist/lib/Grid/src/Grid.vue.js +0 -14
- package/dist/lib/Grid/src/components/ActionBar.css +0 -14
- package/dist/lib/Grid/src/components/ActionBar.vue.js +0 -14
- package/dist/lib/Grid/src/components/CellEditor.vue.js +0 -14
- package/dist/lib/Grid/src/components/CellEditor2.css +0 -14
- package/dist/lib/Grid/src/components/ColumnFilter.css +0 -14
- package/dist/lib/Grid/src/components/ColumnFilter.vue.js +0 -14
- package/dist/lib/Grid/src/components/ColumnSettings.css +0 -14
- package/dist/lib/Grid/src/components/ColumnSettings.vue.js +0 -14
- package/dist/lib/Grid/src/components/DataTable.css +0 -14
- package/dist/lib/Grid/src/components/DataTable.vue.js +0 -14
- package/dist/lib/Grid/src/components/Pager.css +0 -14
- package/dist/lib/Grid/src/components/Pager.vue.js +0 -14
- package/dist/lib/Grid/src/components/QueryBar.css +0 -14
- package/dist/lib/Grid/src/components/QueryBar.vue.js +0 -14
- package/dist/lib/Grid/src/composables/useCellEditor.js +0 -14
- package/dist/lib/Grid/src/composables/useGridTable.js +0 -14
- package/dist/lib/Grid/src/styles/table.css +0 -14
- package/dist/lib/node_modules/@tanstack/store/dist/esm/derived.js +0 -14
- package/dist/lib/node_modules/@tanstack/store/dist/esm/scheduler.js +0 -14
- package/dist/lib/node_modules/@tanstack/table-core/build/lib/index.js +0 -14
- package/dist/lib/node_modules/@tanstack/vue-table/build/lib/index.js +0 -14
|
@@ -7,8 +7,1453 @@ You shall not disclose such Confidential Information and shall use it only in
|
|
|
7
7
|
accordance with the terms of the license agreement.
|
|
8
8
|
|
|
9
9
|
--- Build Info ---
|
|
10
|
-
Version: 1.1.
|
|
11
|
-
Build Time: 2026/3/
|
|
12
|
-
Build Commit:
|
|
10
|
+
Version: 1.1.7
|
|
11
|
+
Build Time: 2026/3/13 18:25:06
|
|
12
|
+
Build Commit: 0b162dea954baa715e67b70f80401a571205058a
|
|
13
13
|
*/
|
|
14
|
-
import{Plugin as t,PluginKey as e,Selection as o,SelectionRange as n,TextSelection as l,NodeSelection as r}from"../../prosemirror-state/dist/index.js";import{Fragment as s,Slice as i}from"../../prosemirror-model/dist/index.js";import{DecorationSet as c,Decoration as a}from"../../prosemirror-view/dist/index.js";import{keydownHandler as d}from"../../prosemirror-keymap/dist/index.js";import{Transform as p}from"../../prosemirror-transform/dist/index.js";let h,f;if("undefined"!=typeof WeakMap){let t=/* @__PURE__ */new WeakMap;h=e=>t.get(e),f=(e,o)=>(t.set(e,o),o)}else{const t=[],e=10;let o=0;h=e=>{for(let o=0;o<t.length;o+=2)if(t[o]==e)return t[o+1]},f=(n,l)=>(o==e&&(o=0),t[o++]=n,t[o++]=l)}var u=class{constructor(t,e,o,n){this.width=t,this.height=e,this.map=o,this.problems=n}findCell(t){for(let e=0;e<this.map.length;e++){const o=this.map[e];if(o!=t)continue;const n=e%this.width,l=e/this.width|0;let r=n+1,s=l+1;for(let t=1;r<this.width&&this.map[e+t]==o;t++)r++;for(let t=1;s<this.height&&this.map[e+this.width*t]==o;t++)s++;return{left:n,top:l,right:r,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,o){const{left:n,right:l,top:r,bottom:s}=this.findCell(t);return"horiz"==e?(o<0?0==n:l==this.width)?null:this.map[r*this.width+(o<0?n-1:l)]:(o<0?0==r:s==this.height)?null:this.map[n+this.width*(o<0?r-1:s)]}rectBetween(t,e){const{left:o,right:n,top:l,bottom:r}=this.findCell(t),{left:s,right:i,top:c,bottom:a}=this.findCell(e);return{left:Math.min(o,s),top:Math.min(l,c),right:Math.max(n,i),bottom:Math.max(r,a)}}cellsInRect(t){const e=[],o={};for(let n=t.top;n<t.bottom;n++)for(let l=t.left;l<t.right;l++){const r=n*this.width+l,s=this.map[r];o[s]||(o[s]=!0,l==t.left&&l&&this.map[r-1]==s||n==t.top&&n&&this.map[r-this.width]==s||e.push(s))}return e}positionAt(t,e,o){for(let n=0,l=0;;n++){const r=l+o.child(n).nodeSize;if(n==t){let o=e+t*this.width;const n=(t+1)*this.width;for(;o<n&&this.map[o]<l;)o++;return o==n?r-1:this.map[o]}l=r}}static get(t){return h(t)||f(t,function(t){if("table"!=t.type.spec.tableRole)throw new RangeError("Not a table node: "+t.type.name);const e=function(t){let e=-1,o=!1;for(let n=0;n<t.childCount;n++){const l=t.child(n);let r=0;if(o)for(let e=0;e<n;e++){const o=t.child(e);for(let t=0;t<o.childCount;t++){const l=o.child(t);e+l.attrs.rowspan>n&&(r+=l.attrs.colspan)}}for(let t=0;t<l.childCount;t++){const e=l.child(t);r+=e.attrs.colspan,e.attrs.rowspan>1&&(o=!0)}-1==e?e=r:e!=r&&(e=Math.max(e,r))}return e}(t),o=t.childCount,n=[];let l=0,r=null;const s=[];for(let a=0,d=e*o;a<d;a++)n[a]=0;for(let a=0,d=0;a<o;a++){const i=t.child(a);d++;for(let t=0;;t++){for(;l<n.length&&0!=n[l];)l++;if(t==i.childCount)break;const c=i.child(t),{colspan:p,rowspan:h,colwidth:f}=c.attrs;for(let t=0;t<h;t++){if(t+a>=o){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:h-t});break}const i=l+t*e;for(let t=0;t<p;t++){0==n[i+t]?n[i+t]=d:(r||(r=[])).push({type:"collision",row:a,pos:d,n:p-t});const o=f&&f[t];if(o){const n=(i+t)%e*2,l=s[n];null==l||l!=o&&1==s[n+1]?(s[n]=o,s[n+1]=1):l==o&&s[n+1]++}}}l+=p,d+=c.nodeSize}const c=(a+1)*e;let p=0;for(;l<c;)0==n[l++]&&p++;p&&(r||(r=[])).push({type:"missing",row:a,n:p}),d++}0!==e&&0!==o||(r||(r=[])).push({type:"zero_sized"});const i=new u(e,o,n,r);let c=!1;for(let a=0;!c&&a<s.length;a+=2)null!=s[a]&&s[a+1]<o&&(c=!0);c&&function(t,e,o){t.problems||(t.problems=[]);const n={};for(let l=0;l<t.map.length;l++){const r=t.map[l];if(n[r])continue;n[r]=!0;const s=o.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let i=null;const c=s.attrs;for(let o=0;o<c.colspan;o++){const n=e[(l+o)%t.width*2];null==n||c.colwidth&&c.colwidth[o]==n||((i||(i=m(c)))[o]=n)}i&&t.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:i})}}(i,s,t);return i}(t))}};function m(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let o=0;o<t.colspan;o++)e.push(0);return e}function w(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const o in t.nodes){const n=t.nodes[o],l=n.spec.tableRole;l&&(e[l]=n)}}return e}const g=new e("selectingCells");function C(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function b(t){const e=t.selection.$head;for(let o=e.depth;o>0;o--)if("row"==e.node(o).type.spec.tableRole)return!0;return!1}function v(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;const o=C(e.$head)||y(e.$head);if(o)return o;throw new RangeError(`No cell found around position ${e.head}`)}function y(t){for(let e=t.nodeAfter,o=t.pos;e;e=e.firstChild,o++){const n=e.type.spec.tableRole;if("cell"==n||"header_cell"==n)return t.doc.resolve(o)}for(let e=t.nodeBefore,o=t.pos;e;e=e.lastChild,o--){const n=e.type.spec.tableRole;if("cell"==n||"header_cell"==n)return t.doc.resolve(o-e.nodeSize)}}function S(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function A(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function $(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function M(t,e,o){const n=t.node(-1),l=u.get(n),r=t.start(-1),s=l.nextCell(t.pos-r,e,o);return null==s?null:t.node(0).resolve(r+s)}function R(t,e,o=1){const n={...t,colspan:t.colspan-o};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(e,o),n.colwidth.some(t=>t>0)||(n.colwidth=null)),n}function z(t,e,o=1){const n={...t,colspan:t.colspan+o};if(n.colwidth){n.colwidth=n.colwidth.slice();for(let t=0;t<o;t++)n.colwidth.splice(e,0,0)}return n}function N(t,e,o){const n=w(e.type.schema).header_cell;for(let l=0;l<t.height;l++)if(e.nodeAt(t.map[o+l*t.width]).type!=n)return!1;return!0}var x=class t extends o{constructor(t,e=t){const o=t.node(-1),l=u.get(o),r=t.start(-1),s=l.rectBetween(t.pos-r,e.pos-r),i=t.node(0),c=l.cellsInRect(s).filter(t=>t!=e.pos-r);c.unshift(e.pos-r);const a=c.map(t=>{const e=o.nodeAt(t);if(!e)throw new RangeError(`No cell with offset ${t} found`);const l=r+t+1;return new n(i.resolve(l),i.resolve(l+e.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=e}map(e,o){const n=e.resolve(o.map(this.$anchorCell.pos)),r=e.resolve(o.map(this.$headCell.pos));if(S(n)&&S(r)&&$(n,r)){const e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?t.rowSelection(n,r):e&&this.isColSelection()?t.colSelection(n,r):new t(n,r)}return l.between(n,r)}content(){const t=this.$anchorCell.node(-1),e=u.get(t),o=this.$anchorCell.start(-1),n=e.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),l={},r=[];for(let i=n.top;i<n.bottom;i++){const o=[];for(let r=i*e.width+n.left,s=n.left;s<n.right;s++,r++){const s=e.map[r];if(l[s])continue;l[s]=!0;const i=e.findCell(s);let c=t.nodeAt(s);if(!c)throw new RangeError(`No cell with offset ${s} found`);const a=n.left-i.left,d=i.right-n.right;if(a>0||d>0){let t=c.attrs;if(a>0&&(t=R(t,0,a)),d>0&&(t=R(t,t.colspan-d,d)),i.left<n.left){if(c=c.type.createAndFill(t),!c)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(t)}`)}else c=c.type.create(t,c.content)}if(i.top<n.top||i.bottom>n.bottom){const t={...c.attrs,rowspan:Math.min(i.bottom,n.bottom)-Math.max(i.top,n.top)};c=i.top<n.top?c.type.createAndFill(t):c.type.create(t,c.content)}o.push(c)}r.push(t.child(i).copy(s.from(o)))}const c=this.isColSelection()&&this.isRowSelection()?t:r;return new i(s.from(c),1,1)}replace(t,e=i.empty){const n=t.steps.length,l=this.ranges;for(let o=0;o<l.length;o++){const{$from:r,$to:s}=l[o],c=t.mapping.slice(n);t.replace(c.map(r.pos),c.map(s.pos),o?i.empty:e)}const r=o.findFrom(t.doc.resolve(t.mapping.slice(n).map(this.to)),-1);r&&t.setSelection(r)}replaceWith(t,e){this.replace(t,new i(s.from(e),0,0))}forEachCell(t){const e=this.$anchorCell.node(-1),o=u.get(e),n=this.$anchorCell.start(-1),l=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n));for(let r=0;r<l.length;r++)t(e.nodeAt(l[r]),n+l[r])}isColSelection(){const t=this.$anchorCell.index(-1),e=this.$headCell.index(-1);if(Math.min(t,e)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,n=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,n)==this.$headCell.node(-1).childCount}static colSelection(e,o=e){const n=e.node(-1),l=u.get(n),r=e.start(-1),s=l.findCell(e.pos-r),i=l.findCell(o.pos-r),c=e.node(0);return s.top<=i.top?(s.top>0&&(e=c.resolve(r+l.map[s.left])),i.bottom<l.height&&(o=c.resolve(r+l.map[l.width*(l.height-1)+i.right-1]))):(i.top>0&&(o=c.resolve(r+l.map[i.left])),s.bottom<l.height&&(e=c.resolve(r+l.map[l.width*(l.height-1)+s.right-1]))),new t(e,o)}isRowSelection(){const t=this.$anchorCell.node(-1),e=u.get(t),o=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-o),l=e.colCount(this.$headCell.pos-o);if(Math.min(n,l)>0)return!1;const r=n+this.$anchorCell.nodeAfter.attrs.colspan,s=l+this.$headCell.nodeAfter.attrs.colspan;return Math.max(r,s)==e.width}eq(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,o=e){const n=e.node(-1),l=u.get(n),r=e.start(-1),s=l.findCell(e.pos-r),i=l.findCell(o.pos-r),c=e.node(0);return s.left<=i.left?(s.left>0&&(e=c.resolve(r+l.map[s.top*l.width])),i.right<l.width&&(o=c.resolve(r+l.map[l.width*(i.top+1)-1]))):(i.left>0&&(o=c.resolve(r+l.map[i.top*l.width])),s.right<l.width&&(e=c.resolve(r+l.map[l.width*(s.top+1)-1]))),new t(e,o)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,o){return new t(e.resolve(o.anchor),e.resolve(o.head))}static create(e,o,n=o){return new t(e.resolve(o),e.resolve(n))}getBookmark(){return new E(this.$anchorCell.pos,this.$headCell.pos)}};x.prototype.visible=!1,o.jsonID("cell",x);var E=class t{constructor(t,e){this.anchor=t,this.head=e}map(e){return new t(e.map(this.anchor),e.map(this.head))}resolve(t){const e=t.resolve(this.anchor),n=t.resolve(this.head);return"row"==e.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&e.index()<e.parent.childCount&&n.index()<n.parent.childCount&&$(e,n)?new x(e,n):o.near(n,1)}};function k(t){if(!(t.selection instanceof x))return null;const e=[];return t.selection.forEachCell((t,o)=>{e.push(a.node(o,o+t.nodeSize,{class:"selectedCell"}))}),c.create(t.doc,e)}const _=new e("fix-tables");function D(t,e,o,n){const l=t.childCount,r=e.childCount;t:for(let s=0,i=0;s<r;s++){const r=e.child(s);for(let e=i,n=Math.min(l,s+3);e<n;e++)if(t.child(e)==r){i=e+1,o+=r.nodeSize;continue t}n(r,o),i<l&&t.child(i).sameMarkup(r)?D(t.child(i),r,o+1,n):r.nodesBetween(0,r.content.size,n,o+1),o+=r.nodeSize}}function H(t,e){let o;const n=(e,n)=>{"table"==e.type.spec.tableRole&&(o=function(t,e,o,n){const l=u.get(e);if(!l.problems)return n;n||(n=t.tr);const r=[];for(let c=0;c<l.height;c++)r.push(0);for(let c=0;c<l.problems.length;c++){const t=l.problems[c];if("collision"==t.type){const l=e.nodeAt(t.pos);if(!l)continue;const s=l.attrs;for(let e=0;e<s.rowspan;e++)r[t.row+e]+=t.n;n.setNodeMarkup(n.mapping.map(o+1+t.pos),null,R(s,s.colspan-t.n,t.n))}else if("missing"==t.type)r[t.row]+=t.n;else if("overlong_rowspan"==t.type){const l=e.nodeAt(t.pos);if(!l)continue;n.setNodeMarkup(n.mapping.map(o+1+t.pos),null,{...l.attrs,rowspan:l.attrs.rowspan-t.n})}else if("colwidth mismatch"==t.type){const l=e.nodeAt(t.pos);if(!l)continue;n.setNodeMarkup(n.mapping.map(o+1+t.pos),null,{...l.attrs,colwidth:t.colwidth})}else if("zero_sized"==t.type){const t=n.mapping.map(o);n.delete(t,t+e.nodeSize)}}let s,i;for(let c=0;c<r.length;c++)r[c]&&(null==s&&(s=c),i=c);for(let c=0,a=o+1;c<l.height;c++){const o=e.child(c),l=a+o.nodeSize,d=r[c];if(d>0){let e="cell";o.firstChild&&(e=o.firstChild.type.spec.tableRole);const r=[];for(let o=0;o<d;o++){const o=w(t.schema)[e].createAndFill();o&&r.push(o)}const p=0!=c&&s!=c-1||i!=c?l-1:a+1;n.insert(n.mapping.map(p),r)}a=l}return n.setMeta(_,{fixTables:!0})}(t,e,n,o))};return e?e.doc!=t.doc&&D(e.doc,t.doc,0,n):t.doc.descendants(n),o}function L(t){const e=t.selection,o=v(t),n=o.node(-1),l=o.start(-1),r=u.get(n);return{...e instanceof x?r.rectBetween(e.$anchorCell.pos-l,e.$headCell.pos-l):r.findCell(o.pos-l),tableStart:l,map:r,table:n}}function F(t,{map:e,tableStart:o,table:n},l){let r=l>0?-1:0;N(e,n,l+r)&&(r=0==l||l==e.width?null:0);for(let s=0;s<e.height;s++){const i=s*e.width+l;if(l>0&&l<e.width&&e.map[i-1]==e.map[i]){const r=e.map[i],c=n.nodeAt(r);t.setNodeMarkup(t.mapping.map(o+r),null,z(c.attrs,l-e.colCount(r))),s+=c.attrs.rowspan-1}else{const c=null==r?w(n.type.schema).cell:n.nodeAt(e.map[i+r]).type,a=e.positionAt(s,l,n);t.insert(t.mapping.map(o+a),c.createAndFill())}}return t}function B(t,e){if(!b(t))return!1;if(e){const o=L(t);e(F(t.tr,o,o.left))}return!0}function W(t,e){if(!b(t))return!1;if(e){const o=L(t);e(F(t.tr,o,o.right))}return!0}function T(t,{map:e,table:o,tableStart:n},l){const r=t.mapping.maps.length;for(let s=0;s<e.height;){const i=s*e.width+l,c=e.map[i],a=o.nodeAt(c),d=a.attrs;if(l>0&&e.map[i-1]==c||l<e.width-1&&e.map[i+1]==c)t.setNodeMarkup(t.mapping.slice(r).map(n+c),null,R(d,l-e.colCount(c)));else{const e=t.mapping.slice(r).map(n+c);t.delete(e,e+a.nodeSize)}s+=d.rowspan}}function I(t,e){if(!b(t))return!1;if(e){const o=L(t),n=t.tr;if(0==o.left&&o.right==o.map.width)return!1;for(let t=o.right-1;T(n,o,t),t!=o.left;t--){const t=o.tableStart?n.doc.nodeAt(o.tableStart-1):n.doc;if(!t)throw new RangeError("No table found");o.table=t,o.map=u.get(t)}e(n)}return!0}function O(t,e,o){var n;const l=w(e.type.schema).header_cell;for(let r=0;r<t.width;r++)if((null===(n=e.nodeAt(t.map[r+o*t.width]))||void 0===n?void 0:n.type)!=l)return!1;return!0}function X(t,{map:e,tableStart:o,table:n},l){let r=o;for(let a=0;a<l;a++)r+=n.child(a).nodeSize;const s=[];let i=l>0?-1:0;O(e,n,l+i)&&(i=0==l||l==e.height?null:0);for(let a=0,d=e.width*l;a<e.width;a++,d++)if(l>0&&l<e.height&&e.map[d]==e.map[d-e.width]){const l=e.map[d],r=n.nodeAt(l).attrs;t.setNodeMarkup(o+l,null,{...r,rowspan:r.rowspan+1}),a+=r.colspan-1}else{var c;const t=null==i?w(n.type.schema).cell:null===(c=n.nodeAt(e.map[d+i*e.width]))||void 0===c?void 0:c.type,o=null==t?void 0:t.createAndFill();o&&s.push(o)}return t.insert(r,w(n.type.schema).row.create(null,s)),t}function V(t,e){if(!b(t))return!1;if(e){const o=L(t);e(X(t.tr,o,o.top))}return!0}function j(t,e){if(!b(t))return!1;if(e){const o=L(t);e(X(t.tr,o,o.bottom))}return!0}function K(t,{map:e,table:o,tableStart:n},l){let r=0;for(let a=0;a<l;a++)r+=o.child(a).nodeSize;const s=r+o.child(l).nodeSize,i=t.mapping.maps.length;t.delete(r+n,s+n);const c=/* @__PURE__ */new Set;for(let a=0,d=l*e.width;a<e.width;a++,d++){const r=e.map[d];if(!c.has(r))if(c.add(r),l>0&&r==e.map[d-e.width]){const e=o.nodeAt(r).attrs;t.setNodeMarkup(t.mapping.slice(i).map(r+n),null,{...e,rowspan:e.rowspan-1}),a+=e.colspan-1}else if(l<e.height&&r==e.map[d+e.width]){const s=o.nodeAt(r),c=s.attrs,d=s.type.create({...c,rowspan:s.attrs.rowspan-1},s.content),p=e.positionAt(l+1,a,o);t.insert(t.mapping.slice(i).map(n+p),d),a+=c.colspan-1}}}function P(t,e){if(!b(t))return!1;if(e){const o=L(t),n=t.tr;if(0==o.top&&o.bottom==o.map.height)return!1;for(let t=o.bottom-1;K(n,o,t),t!=o.top;t--){const t=o.tableStart?n.doc.nodeAt(o.tableStart-1):n.doc;if(!t)throw new RangeError("No table found");o.table=t,o.map=u.get(o.table)}e(n)}return!0}function q(t){const e=t.content;return 1==e.childCount&&e.child(0).isTextblock&&0==e.child(0).childCount}function J(t,e){const o=t.selection;if(!(o instanceof x)||o.$anchorCell.pos==o.$headCell.pos)return!1;const n=L(t),{map:l}=n;if(function({width:t,height:e,map:o},n){let l=n.top*t+n.left,r=l,s=(n.bottom-1)*t+n.left,i=l+(n.right-n.left-1);for(let c=n.top;c<n.bottom;c++){if(n.left>0&&o[r]==o[r-1]||n.right<t&&o[i]==o[i+1])return!0;r+=t,i+=t}for(let c=n.left;c<n.right;c++){if(n.top>0&&o[l]==o[l-t]||n.bottom<e&&o[s]==o[s+t])return!0;l++,s++}return!1}(l,n))return!1;if(e){const o=t.tr,r={};let i,c,a=s.empty;for(let t=n.top;t<n.bottom;t++)for(let e=n.left;e<n.right;e++){const s=l.map[t*l.width+e],d=n.table.nodeAt(s);if(!r[s]&&d)if(r[s]=!0,null==i)i=s,c=d;else{q(d)||(a=a.append(d.content));const t=o.mapping.map(s+n.tableStart);o.delete(t,t+d.nodeSize)}}if(null==i||null==c)return!0;if(o.setNodeMarkup(i+n.tableStart,null,{...z(c.attrs,c.attrs.colspan,n.right-n.left-c.attrs.colspan),rowspan:n.bottom-n.top}),a.size>0){const t=i+1+c.content.size,e=q(c)?i+1:t;o.replaceWith(e+n.tableStart,t+n.tableStart,a)}o.setSelection(new x(o.doc.resolve(i+n.tableStart))),e(o)}return!0}function U(t,e){const o=w(t.schema);return Y(({node:t})=>o[t.type.spec.tableRole])(t,e)}function Y(t){return(e,o)=>{const n=e.selection;let l,r;if(n instanceof x){if(n.$anchorCell.pos!=n.$headCell.pos)return!1;l=n.$anchorCell.nodeAfter,r=n.$anchorCell.pos}else{var s;if(l=function(t){for(let e=t.depth;e>0;e--){const o=t.node(e).type.spec.tableRole;if("cell"===o||"header_cell"===o)return t.node(e)}return null}(n.$from),!l)return!1;r=null===(s=C(n.$from))||void 0===s?void 0:s.pos}if(null==l||null==r)return!1;if(1==l.attrs.colspan&&1==l.attrs.rowspan)return!1;if(o){let s=l.attrs;const i=[],c=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const a=L(e),d=e.tr;for(let t=0;t<a.right-a.left;t++)i.push(c?{...s,colwidth:c&&c[t]?[c[t]]:null}:s);let p;for(let e=a.top;e<a.bottom;e++){let o=a.map.positionAt(e,a.left,a.table);e==a.top&&(o+=l.nodeSize);for(let n=a.left,r=0;n<a.right;n++,r++)n==a.left&&e==a.top||d.insert(p=d.mapping.map(o+a.tableStart,1),t({node:l,row:e,col:n}).createAndFill(i[r]))}d.setNodeMarkup(r,t({node:l,row:a.top,col:a.left}),i[0]),n instanceof x&&d.setSelection(new x(d.doc.resolve(n.$anchorCell.pos),p?d.doc.resolve(p):void 0)),o(d)}return!0}}function G(t,e){return function(o,n){if(!b(o))return!1;const l=v(o);if(l.nodeAfter.attrs[t]===e)return!1;if(n){const r=o.tr;o.selection instanceof x?o.selection.forEachCell((o,n)=>{o.attrs[t]!==e&&r.setNodeMarkup(n,null,{...o.attrs,[t]:e})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[t]:e}),n(r)}return!0}}function Q(t,e,o){const n=e.map.cellsInRect({left:0,top:0,right:"row"==t?e.map.width:1,bottom:"column"==t?e.map.height:1});for(let l=0;l<n.length;l++){const t=e.table.nodeAt(n[l]);if(t&&t.type!==o.header_cell)return!1}return!0}function Z(t,e){return(e=e||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(t){return function(e,o){if(!b(e))return!1;if(o){const n=w(e.schema),l=L(e),r=e.tr,s=l.map.cellsInRect("column"==t?{left:l.left,top:0,right:l.right,bottom:l.map.height}:"row"==t?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),i=s.map(t=>l.table.nodeAt(t));for(let t=0;t<s.length;t++)i[t].type==n.header_cell&&r.setNodeMarkup(l.tableStart+s[t],n.cell,i[t].attrs);if(0===r.steps.length)for(let t=0;t<s.length;t++)r.setNodeMarkup(l.tableStart+s[t],n.header_cell,i[t].attrs);o(r)}return!0}}(t):function(e,o){if(!b(e))return!1;if(o){const n=w(e.schema),l=L(e),r=e.tr,s=Q("row",l,n),i=Q("column",l,n),c=("column"===t?s:"row"===t&&i)?1:0,a="column"==t?{left:0,top:c,right:1,bottom:l.map.height}:"row"==t?{left:c,top:0,right:l.map.width,bottom:1}:l,d="column"==t?i?n.cell:n.header_cell:"row"==t?s?n.cell:n.header_cell:n.cell;l.map.cellsInRect(a).forEach(t=>{const e=t+l.tableStart,o=r.doc.nodeAt(e);o&&r.setNodeMarkup(e,d,o.attrs)}),o(r)}return!0}}Z("row",{useDeprecatedLogic:!0}),Z("column",{useDeprecatedLogic:!0});const tt=Z("cell",{useDeprecatedLogic:!0});function et(t){return function(e,o){if(!b(e))return!1;const n=function(t,e){if(e<0){const e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let o=t.index(-1)-1,n=t.before();o>=0;o--){const e=t.node(-1).child(o),l=e.lastChild;if(l)return n-1-l.nodeSize;n-=e.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const e=t.node(-1);for(let o=t.indexAfter(-1),n=t.after();o<e.childCount;o++){const t=e.child(o);if(t.childCount)return n+1;n+=t.nodeSize}}return null}(v(e),t);if(null==n)return!1;if(o){const t=e.doc.resolve(n);o(e.tr.setSelection(l.between(t,A(t))).scrollIntoView())}return!0}}function ot(t,e){const o=t.selection.$anchor;for(let n=o.depth;n>0;n--)if("table"==o.node(n).type.spec.tableRole)return e&&e(t.tr.delete(o.before(n),o.after(n)).scrollIntoView()),!0;return!1}function nt(t,e){const o=t.selection;if(!(o instanceof x))return!1;if(e){const n=t.tr,l=w(t.schema).cell.createAndFill().content;o.forEachCell((t,e)=>{t.content.eq(l)||n.replace(n.mapping.map(e+1),n.mapping.map(e+t.nodeSize-1),new i(l,0,0))}),n.docChanged&&e(n)}return!0}function lt(t){if(0===t.size)return null;let{content:e,openStart:o,openEnd:n}=t;for(;1==e.childCount&&(o>0&&n>0||"table"==e.child(0).type.spec.tableRole);)o--,n--,e=e.child(0).content;const l=e.child(0),r=l.type.spec.tableRole,c=l.type.schema,a=[];if("row"==r)for(let s=0;s<e.childCount;s++){let t=e.child(s).content;const l=s?0:Math.max(0,o-1),r=s<e.childCount-1?0:Math.max(0,n-1);(l||r)&&(t=rt(w(c).row,new i(t,l,r)).content),a.push(t)}else{if("cell"!=r&&"header_cell"!=r)return null;a.push(o||n?rt(w(c).row,new i(e,o,n)).content:e)}return function(t,e){const o=[];for(let l=0;l<e.length;l++){const t=e[l];for(let e=t.childCount-1;e>=0;e--){const{rowspan:n,colspan:r}=t.child(e).attrs;for(let t=l;t<l+n;t++)o[t]=(o[t]||0)+r}}let n=0;for(let l=0;l<o.length;l++)n=Math.max(n,o[l]);for(let l=0;l<o.length;l++)if(l>=e.length&&e.push(s.empty),o[l]<n){const r=w(t).cell.createAndFill(),i=[];for(let t=o[l];t<n;t++)i.push(r);e[l]=e[l].append(s.from(i))}return{height:e.length,width:n,rows:e}}(c,a)}function rt(t,e){const o=t.createAndFill();return new p(o).replace(0,o.content.size,e).doc}function st({width:t,height:e,rows:o},n,l){if(t!=n){const e=[],l=[];for(let t=0;t<o.length;t++){const r=o[t],i=[];for(let o=e[t]||0,l=0;o<n;l++){let s=r.child(l%r.childCount);o+s.attrs.colspan>n&&(s=s.type.createChecked(R(s.attrs,s.attrs.colspan,o+s.attrs.colspan-n),s.content)),i.push(s),o+=s.attrs.colspan;for(let o=1;o<s.attrs.rowspan;o++)e[t+o]=(e[t+o]||0)+s.attrs.colspan}l.push(s.from(i))}o=l,t=n}if(e!=l){const t=[];for(let n=0,r=0;n<l;n++,r++){const i=[],c=o[r%e];for(let t=0;t<c.childCount;t++){let e=c.child(t);n+e.attrs.rowspan>l&&(e=e.type.create({...e.attrs,rowspan:Math.max(1,l-e.attrs.rowspan)},e.content)),i.push(e)}t.push(s.from(i))}o=t,e=l}return{width:t,height:e,rows:o}}function it(t,e,o,n,l,r,s,i){if(0==s||s==e.height)return!1;let c=!1;for(let a=l;a<r;a++){const l=s*e.width+a,r=e.map[l];if(e.map[l-e.width]==r){c=!0;const l=o.nodeAt(r),{top:d,left:p}=e.findCell(r);t.setNodeMarkup(t.mapping.slice(i).map(r+n),null,{...l.attrs,rowspan:s-d}),t.insert(t.mapping.slice(i).map(e.positionAt(s,p,o)),l.type.createAndFill({...l.attrs,rowspan:d+l.attrs.rowspan-s})),a+=l.attrs.colspan-1}}return c}function ct(t,e,o,n,l,r,s,i){if(0==s||s==e.width)return!1;let c=!1;for(let a=l;a<r;a++){const l=a*e.width+s,r=e.map[l];if(e.map[l-1]==r){c=!0;const l=o.nodeAt(r),d=e.colCount(r),p=t.mapping.slice(i).map(r+n);t.setNodeMarkup(p,null,R(l.attrs,s-d,l.attrs.colspan-(s-d))),t.insert(p+l.nodeSize,l.type.createAndFill(R(l.attrs,0,s-d))),a+=l.attrs.rowspan-1}}return c}function at(t,e,o,n,l){let r=o?t.doc.nodeAt(o-1):t.doc;if(!r)throw new Error("No table found");let c=u.get(r);const{top:a,left:d}=n,p=d+l.width,h=a+l.height,f=t.tr;let m=0;function g(){if(r=o?f.doc.nodeAt(o-1):f.doc,!r)throw new Error("No table found");c=u.get(r),m=f.mapping.maps.length}(function(t,e,o,n,l,r,i){const c=w(t.doc.type.schema);let a,d;if(l>e.width)for(let s=0,p=0;s<e.height;s++){const r=o.child(s);p+=r.nodeSize;const h=[];let f;f=null==r.lastChild||r.lastChild.type==c.cell?a||(a=c.cell.createAndFill()):d||(d=c.header_cell.createAndFill());for(let t=e.width;t<l;t++)h.push(f);t.insert(t.mapping.slice(i).map(p-1+n),h)}if(r>e.height){const p=[];for(let t=0,n=(e.height-1)*e.width;t<Math.max(e.width,l);t++){const l=!(t>=e.width)&&o.nodeAt(e.map[n+t]).type==c.header_cell;p.push(l?d||(d=c.header_cell.createAndFill()):a||(a=c.cell.createAndFill()))}const h=c.row.create(null,s.from(p)),f=[];for(let t=e.height;t<r;t++)f.push(h);t.insert(t.mapping.slice(i).map(n+o.nodeSize-2),f)}return!(!a&&!d)})(f,c,r,o,p,h,m)&&g(),it(f,c,r,o,d,p,a,m)&&g(),it(f,c,r,o,d,p,h,m)&&g(),ct(f,c,r,o,a,h,d,m)&&g(),ct(f,c,r,o,a,h,p,m)&&g();for(let s=a;s<h;s++){const t=c.positionAt(s,d,r),e=c.positionAt(s,p,r);f.replace(f.mapping.slice(m).map(t+o),f.mapping.slice(m).map(e+o),new i(l.rows[s-a],0,0))}g(),f.setSelection(new x(f.doc.resolve(o+c.positionAt(a,d,r)),f.doc.resolve(o+c.positionAt(h-1,p-1,r)))),e(f)}const dt=d({ArrowLeft:ht("horiz",-1),ArrowRight:ht("horiz",1),ArrowUp:ht("vert",-1),ArrowDown:ht("vert",1),"Shift-ArrowLeft":ft("horiz",-1),"Shift-ArrowRight":ft("horiz",1),"Shift-ArrowUp":ft("vert",-1),"Shift-ArrowDown":ft("vert",1),Backspace:nt,"Mod-Backspace":nt,Delete:nt,"Mod-Delete":nt});function pt(t,e,o){return!o.eq(t.selection)&&(e&&e(t.tr.setSelection(o).scrollIntoView()),!0)}function ht(t,e){return(n,l,r)=>{if(!r)return!1;const s=n.selection;if(s instanceof x)return pt(n,l,o.near(s.$headCell,e));if("horiz"!=t&&!s.empty)return!1;const i=gt(r,t,e);if(null==i)return!1;if("horiz"==t)return pt(n,l,o.near(n.doc.resolve(s.head+e),e));{const r=n.doc.resolve(i),s=M(r,t,e);let c;return c=s?o.near(s,1):e<0?o.near(n.doc.resolve(r.before(-1)),-1):o.near(n.doc.resolve(r.after(-1)),1),pt(n,l,c)}}}function ft(t,e){return(o,n,l)=>{if(!l)return!1;const r=o.selection;let s;if(r instanceof x)s=r;else{const n=gt(l,t,e);if(null==n)return!1;s=new x(o.doc.resolve(n))}const i=M(s.$headCell,t,e);return!!i&&pt(o,n,new x(s.$anchorCell,i))}}function ut(t,e){const o=C(t.state.doc.resolve(e));return!!o&&(t.dispatch(t.state.tr.setSelection(new x(o))),!0)}function mt(t,e,o){if(!b(t.state))return!1;let n=lt(o);const l=t.state.selection;if(l instanceof x){n||(n={width:1,height:1,rows:[s.from(rt(w(t.state.schema).cell,o))]});const e=l.$anchorCell.node(-1),r=l.$anchorCell.start(-1),i=u.get(e).rectBetween(l.$anchorCell.pos-r,l.$headCell.pos-r);return n=st(n,i.right-i.left,i.bottom-i.top),at(t.state,t.dispatch,r,i,n),!0}if(n){const e=v(t.state),o=e.start(-1);return at(t.state,t.dispatch,o,u.get(e.node(-1)).findCell(e.pos-o),n),!0}return!1}function wt(t,e){var o;if(0!=e.button)return;if(e.ctrlKey||e.metaKey)return;const n=Ct(t,e.target);let l;if(e.shiftKey&&t.state.selection instanceof x)r(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&n&&null!=(l=C(t.state.selection.$anchor))&&(null===(o=bt(t,e))||void 0===o?void 0:o.pos)!=l.pos)r(l,e),e.preventDefault();else if(!n)return;function r(e,o){let n=bt(t,o);const l=null==g.getState(t.state);if(!n||!$(e,n)){if(!l)return;n=e}const r=new x(e,n);if(l||!t.state.selection.eq(r)){const o=t.state.tr.setSelection(r);l&&o.setMeta(g,e.pos),t.dispatch(o)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",i),null!=g.getState(t.state)&&t.dispatch(t.state.tr.setMeta(g,-1))}function i(o){const l=o,i=g.getState(t.state);let c;if(null!=i)c=t.state.doc.resolve(i);else if(Ct(t,l.target)!=n&&(c=bt(t,e),!c))return s();c&&r(c,l)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",i)}function gt(t,e,o){if(!(t.state.selection instanceof l))return null;const{$head:n}=t.state.selection;for(let l=n.depth-1;l>=0;l--){const r=n.node(l);if((o<0?n.index(l):n.indexAfter(l))!=(o<0?0:r.childCount))return null;if("cell"==r.type.spec.tableRole||"header_cell"==r.type.spec.tableRole){const r=n.before(l),s="vert"==e?o>0?"down":"up":o>0?"right":"left";return t.endOfTextblock(s)?r:null}}return null}function Ct(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function bt(t,e){const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return null;let{inside:n,pos:l}=o;return n>=0&&C(t.state.doc.resolve(n))||C(t.state.doc.resolve(l))}var vt=class{constructor(t,e){this.node=t,this.defaultCellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),yt(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,yt(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}};function yt(t,e,o,n,l,r){let s=0,i=!0,c=e.firstChild;const a=t.firstChild;if(a){for(let t=0,o=0;t<a.childCount;t++){const{colspan:d,colwidth:p}=a.child(t).attrs;for(let t=0;t<d;t++,o++){const a=l==o?r:p&&p[t],d=a?a+"px":"";if(s+=a||n,a||(i=!1),c)c.style.width!=d&&(c.style.width=d),c=c.nextSibling;else{const t=document.createElement("col");t.style.width=d,e.appendChild(t)}}}for(;c;){var d;const t=c.nextSibling;null===(d=c.parentNode)||void 0===d||d.removeChild(c),c=t}i?(o.style.width=s+"px",o.style.minWidth=""):(o.style.width="",o.style.minWidth=s+"px")}}const St=new e("tableColumnResizing");function At({handleWidth:e=5,cellMinWidth:o=25,defaultCellMinWidth:n=100,View:l=vt,lastColumnResizable:r=!0}={}){const s=new t({key:St,state:{init(t,e){var o;const r=null===(o=s.spec)||void 0===o||null===(o=o.props)||void 0===o?void 0:o.nodeViews,i=w(e.schema).table.name;return l&&r&&(r[i]=(t,e)=>new l(t,n,e)),new $t(-1,!1)},apply:(t,e)=>e.apply(t)},props:{attributes:t=>{const e=St.getState(t);return e&&e.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,o)=>{!function(t,e,o,n){if(!t.editable)return;const l=St.getState(t.state);if(!l)return;if(!l.dragging){const r=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target);let s=-1;if(r){const{left:n,right:l}=r.getBoundingClientRect();e.clientX-n<=o?s=Mt(t,e,"left",o):l-e.clientX<=o&&(s=Mt(t,e,"right",o))}if(s!=l.activeHandle){if(!n&&-1!==s){const e=t.state.doc.resolve(s),o=e.node(-1),n=u.get(o),l=e.start(-1);if(n.colCount(e.pos-l)+e.nodeAfter.attrs.colspan-1==n.width-1)return}zt(t,s)}}}(t,o,e,r)},mouseleave:t=>{!function(t){if(!t.editable)return;const e=St.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&zt(t,-1)}(t)},mousedown:(t,e)=>{!function(t,e,o,n){var l;if(!t.editable)return!1;const r=null!==(l=t.dom.ownerDocument.defaultView)&&void 0!==l?l:window,s=St.getState(t.state);if(!s||-1==s.activeHandle||s.dragging)return!1;const i=t.state.doc.nodeAt(s.activeHandle),c=function(t,e,{colspan:o,colwidth:n}){const l=n&&n[n.length-1];if(l)return l;const r=t.domAtPos(e);let s=r.node.childNodes[r.offset].offsetWidth,i=o;if(n)for(let c=0;c<o;c++)n[c]&&(s-=n[c],i--);return s/i}(t,s.activeHandle,i.attrs);function a(e){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);const n=St.getState(t.state);(null==n?void 0:n.dragging)&&(!function(t,e,o){const n=t.state.doc.resolve(e),l=n.node(-1),r=u.get(l),s=n.start(-1),i=r.colCount(n.pos-s)+n.nodeAfter.attrs.colspan-1,c=t.state.tr;for(let a=0;a<r.height;a++){const t=a*r.width+i;if(a&&r.map[t]==r.map[t-r.width])continue;const e=r.map[t],n=l.nodeAt(e).attrs,d=1==n.colspan?0:i-r.colCount(e);if(n.colwidth&&n.colwidth[d]==o)continue;const p=n.colwidth?n.colwidth.slice():xt(n.colspan);p[d]=o,c.setNodeMarkup(s+e,null,{...n,colwidth:p})}c.docChanged&&t.dispatch(c)}(t,n.activeHandle,Rt(n.dragging,e,o)),t.dispatch(t.state.tr.setMeta(St,{setDragging:null})))}function d(e){if(!e.which)return a(e);const l=St.getState(t.state);if(l&&l.dragging){const r=Rt(l.dragging,e,o);Nt(t,l.activeHandle,r,n)}}t.dispatch(t.state.tr.setMeta(St,{setDragging:{startX:e.clientX,startWidth:c}})),Nt(t,s.activeHandle,c,n),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),e.preventDefault()}(t,e,o,n)}},decorations:t=>{const e=St.getState(t);if(e&&e.activeHandle>-1)return function(t,e){const o=[],n=t.doc.resolve(e),l=n.node(-1);if(!l)return c.empty;const r=u.get(l),s=n.start(-1),i=r.colCount(n.pos-s)+n.nodeAfter.attrs.colspan-1;for(let c=0;c<r.height;c++){const e=i+c*r.width;if(!(i!=r.width-1&&r.map[e]==r.map[e+1]||0!=c&&r.map[e]==r.map[e-r.width])){var d;const n=r.map[e],i=s+n+l.nodeAt(n).nodeSize-1,c=document.createElement("div");c.className="column-resize-handle",(null===(d=St.getState(t))||void 0===d?void 0:d.dragging)&&o.push(a.node(s+n,s+n+l.nodeAt(n).nodeSize,{class:"column-resize-dragging"})),o.push(a.widget(i,c))}}return c.create(t.doc,o)}(t,e.activeHandle)},nodeViews:{}}});return s}var $t=class t{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(e){const o=this,n=e.getMeta(St);if(n&&null!=n.setHandle)return new t(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new t(o.activeHandle,n.setDragging);if(o.activeHandle>-1&&e.docChanged){let n=e.mapping.map(o.activeHandle,-1);return S(e.doc.resolve(n))||(n=-1),new t(n,o.dragging)}return o}};function Mt(t,e,o,n){const l="right"==o?-n:n,r=t.posAtCoords({left:e.clientX+l,top:e.clientY});if(!r)return-1;const{pos:s}=r,i=C(t.state.doc.resolve(s));if(!i)return-1;if("right"==o)return i.pos;const c=u.get(i.node(-1)),a=i.start(-1),d=c.map.indexOf(i.pos-a);return d%c.width==0?-1:a+c.map[d-1]}function Rt(t,e,o){const n=e.clientX-t.startX;return Math.max(o,t.startWidth+n)}function zt(t,e){t.dispatch(t.state.tr.setMeta(St,{setHandle:e}))}function Nt(t,e,o,n){const l=t.state.doc.resolve(e),r=l.node(-1),s=l.start(-1),i=u.get(r).colCount(l.pos-s)+l.nodeAfter.attrs.colspan-1;let c=t.domAtPos(l.start(-1)).node;for(;c&&"TABLE"!=c.nodeName;)c=c.parentNode;c&&yt(r,c.firstChild,c,n,i,o)}function xt(t){return Array(t).fill(0)}function Et({allowTableNodeSelection:e=!1}={}){return new t({key:g,state:{init:()=>null,apply(t,e){const o=t.getMeta(g);if(null!=o)return-1==o?null:o;if(null==e||!t.docChanged)return e;const{deleted:n,pos:l}=t.mapping.mapResult(e);return n?null:l}},props:{decorations:k,handleDOMEvents:{mousedown:wt},createSelectionBetween:t=>null!=g.getState(t.state)?t.state.selection:null,handleTripleClick:ut,handleKeyDown:dt,handlePaste:mt},appendTransaction:(t,o,n)=>function(t,e,o){const n=(e||t).selection,s=(e||t).doc;let i,c;if(n instanceof r&&(c=n.node.type.spec.tableRole)){if("cell"==c||"header_cell"==c)i=x.create(s,n.from);else if("row"==c){const t=s.resolve(n.from+1);i=x.rowSelection(t,t)}else if(!o){const t=u.get(n.node),e=n.from+1,o=e+t.map[t.width*t.height-1];i=x.create(s,e+1,o)}}else n instanceof l&&function({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let o=t.pos,n=e.pos,l=t.depth;for(;l>=0&&!(t.after(l+1)<t.end(l));l--,o++);for(let r=e.depth;r>=0&&!(e.before(r+1)>e.start(r));r--,n--);return o==n&&/row|table/.test(t.node(l).type.spec.tableRole)}(n)?i=l.create(s,n.from):n instanceof l&&function({$from:t,$to:e}){let o,n;for(let l=t.depth;l>0;l--){const e=t.node(l);if("cell"===e.type.spec.tableRole||"header_cell"===e.type.spec.tableRole){o=e;break}}for(let l=e.depth;l>0;l--){const t=e.node(l);if("cell"===t.type.spec.tableRole||"header_cell"===t.type.spec.tableRole){n=t;break}}return o!==n&&0===e.parentOffset}(n)&&(i=l.create(s,n.$from.start(),n.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}(n,H(n,o),e)})}export{E as CellBookmark,x as CellSelection,$t as ResizeState,u as TableMap,vt as TableView,st as __clipCells,at as __insertCells,lt as __pastedCells,z as addColSpan,F as addColumn,W as addColumnAfter,B as addColumnBefore,X as addRow,j as addRowAfter,V as addRowBefore,C as cellAround,y as cellNear,N as columnIsHeader,At as columnResizing,St as columnResizingPluginKey,nt as deleteCellSelection,I as deleteColumn,P as deleteRow,ot as deleteTable,H as fixTables,_ as fixTablesKey,et as goToNextCell,mt as handlePaste,$ as inSameTable,b as isInTable,J as mergeCells,A as moveCellForward,M as nextCell,S as pointsAtCell,R as removeColSpan,T as removeColumn,K as removeRow,O as rowIsHeader,L as selectedRect,v as selectionCell,G as setCellAttr,U as splitCell,Y as splitCellWithType,Et as tableEditing,g as tableEditingKey,w as tableNodeTypes,Z as toggleHeader,tt as toggleHeaderCell,yt as updateColumnsOnResize};
|
|
14
|
+
import { PluginKey as Z, Selection as M, TextSelection as E, SelectionRange as ye, Plugin as fe, NodeSelection as Se } from "../../prosemirror-state/dist/index.js";
|
|
15
|
+
import { Fragment as R, Slice as N } from "../../prosemirror-model/dist/index.js";
|
|
16
|
+
import { DecorationSet as X, Decoration as q } from "../../prosemirror-view/dist/index.js";
|
|
17
|
+
import { keydownHandler as Ae } from "../../prosemirror-keymap/dist/index.js";
|
|
18
|
+
import { Transform as Re } from "../../prosemirror-transform/dist/index.js";
|
|
19
|
+
let U, J;
|
|
20
|
+
if (typeof WeakMap < "u") {
|
|
21
|
+
let t = /* @__PURE__ */ new WeakMap();
|
|
22
|
+
U = (e) => t.get(e), J = (e, o) => (t.set(e, o), o);
|
|
23
|
+
} else {
|
|
24
|
+
const t = [];
|
|
25
|
+
let o = 0;
|
|
26
|
+
U = (n) => {
|
|
27
|
+
for (let l = 0; l < t.length; l += 2) if (t[l] == n) return t[l + 1];
|
|
28
|
+
}, J = (n, l) => (o == 10 && (o = 0), t[o++] = n, t[o++] = l);
|
|
29
|
+
}
|
|
30
|
+
var C = class {
|
|
31
|
+
constructor(t, e, o, n) {
|
|
32
|
+
this.width = t, this.height = e, this.map = o, this.problems = n;
|
|
33
|
+
}
|
|
34
|
+
findCell(t) {
|
|
35
|
+
for (let e = 0; e < this.map.length; e++) {
|
|
36
|
+
const o = this.map[e];
|
|
37
|
+
if (o != t) continue;
|
|
38
|
+
const n = e % this.width, l = e / this.width | 0;
|
|
39
|
+
let r = n + 1, s = l + 1;
|
|
40
|
+
for (let c = 1; r < this.width && this.map[e + c] == o; c++) r++;
|
|
41
|
+
for (let c = 1; s < this.height && this.map[e + this.width * c] == o; c++) s++;
|
|
42
|
+
return {
|
|
43
|
+
left: n,
|
|
44
|
+
top: l,
|
|
45
|
+
right: r,
|
|
46
|
+
bottom: s
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
throw new RangeError(`No cell with offset ${t} found`);
|
|
50
|
+
}
|
|
51
|
+
colCount(t) {
|
|
52
|
+
for (let e = 0; e < this.map.length; e++) if (this.map[e] == t) return e % this.width;
|
|
53
|
+
throw new RangeError(`No cell with offset ${t} found`);
|
|
54
|
+
}
|
|
55
|
+
nextCell(t, e, o) {
|
|
56
|
+
const { left: n, right: l, top: r, bottom: s } = this.findCell(t);
|
|
57
|
+
return e == "horiz" ? (o < 0 ? n == 0 : l == this.width) ? null : this.map[r * this.width + (o < 0 ? n - 1 : l)] : (o < 0 ? r == 0 : s == this.height) ? null : this.map[n + this.width * (o < 0 ? r - 1 : s)];
|
|
58
|
+
}
|
|
59
|
+
rectBetween(t, e) {
|
|
60
|
+
const { left: o, right: n, top: l, bottom: r } = this.findCell(t), { left: s, right: c, top: i, bottom: a } = this.findCell(e);
|
|
61
|
+
return {
|
|
62
|
+
left: Math.min(o, s),
|
|
63
|
+
top: Math.min(l, i),
|
|
64
|
+
right: Math.max(n, c),
|
|
65
|
+
bottom: Math.max(r, a)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
cellsInRect(t) {
|
|
69
|
+
const e = [], o = {};
|
|
70
|
+
for (let n = t.top; n < t.bottom; n++) for (let l = t.left; l < t.right; l++) {
|
|
71
|
+
const r = n * this.width + l, s = this.map[r];
|
|
72
|
+
o[s] || (o[s] = !0, !(l == t.left && l && this.map[r - 1] == s || n == t.top && n && this.map[r - this.width] == s) && e.push(s));
|
|
73
|
+
}
|
|
74
|
+
return e;
|
|
75
|
+
}
|
|
76
|
+
positionAt(t, e, o) {
|
|
77
|
+
for (let n = 0, l = 0; ; n++) {
|
|
78
|
+
const r = l + o.child(n).nodeSize;
|
|
79
|
+
if (n == t) {
|
|
80
|
+
let s = e + t * this.width;
|
|
81
|
+
const c = (t + 1) * this.width;
|
|
82
|
+
for (; s < c && this.map[s] < l; ) s++;
|
|
83
|
+
return s == c ? r - 1 : this.map[s];
|
|
84
|
+
}
|
|
85
|
+
l = r;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
static get(t) {
|
|
89
|
+
return U(t) || J(t, xe(t));
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
function xe(t) {
|
|
93
|
+
if (t.type.spec.tableRole != "table") throw new RangeError("Not a table node: " + t.type.name);
|
|
94
|
+
const e = ve(t), o = t.childCount, n = [];
|
|
95
|
+
let l = 0, r = null;
|
|
96
|
+
const s = [];
|
|
97
|
+
for (let a = 0, d = e * o; a < d; a++) n[a] = 0;
|
|
98
|
+
for (let a = 0, d = 0; a < o; a++) {
|
|
99
|
+
const f = t.child(a);
|
|
100
|
+
d++;
|
|
101
|
+
for (let p = 0; ; p++) {
|
|
102
|
+
for (; l < n.length && n[l] != 0; ) l++;
|
|
103
|
+
if (p == f.childCount) break;
|
|
104
|
+
const m = f.child(p), { colspan: g, rowspan: b, colwidth: B } = m.attrs;
|
|
105
|
+
for (let H = 0; H < b; H++) {
|
|
106
|
+
if (H + a >= o) {
|
|
107
|
+
(r || (r = [])).push({
|
|
108
|
+
type: "overlong_rowspan",
|
|
109
|
+
pos: d,
|
|
110
|
+
n: b - H
|
|
111
|
+
});
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
const j = l + H * e;
|
|
115
|
+
for (let k = 0; k < g; k++) {
|
|
116
|
+
n[j + k] == 0 ? n[j + k] = d : (r || (r = [])).push({
|
|
117
|
+
type: "collision",
|
|
118
|
+
row: a,
|
|
119
|
+
pos: d,
|
|
120
|
+
n: g - k
|
|
121
|
+
});
|
|
122
|
+
const $ = B && B[k];
|
|
123
|
+
if ($) {
|
|
124
|
+
const L = (j + k) % e * 2, K = s[L];
|
|
125
|
+
K == null || K != $ && s[L + 1] == 1 ? (s[L] = $, s[L + 1] = 1) : K == $ && s[L + 1]++;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
l += g, d += m.nodeSize;
|
|
130
|
+
}
|
|
131
|
+
const u = (a + 1) * e;
|
|
132
|
+
let h = 0;
|
|
133
|
+
for (; l < u; ) n[l++] == 0 && h++;
|
|
134
|
+
h && (r || (r = [])).push({
|
|
135
|
+
type: "missing",
|
|
136
|
+
row: a,
|
|
137
|
+
n: h
|
|
138
|
+
}), d++;
|
|
139
|
+
}
|
|
140
|
+
(e === 0 || o === 0) && (r || (r = [])).push({ type: "zero_sized" });
|
|
141
|
+
const c = new C(e, o, n, r);
|
|
142
|
+
let i = !1;
|
|
143
|
+
for (let a = 0; !i && a < s.length; a += 2) s[a] != null && s[a + 1] < o && (i = !0);
|
|
144
|
+
return i && Me(c, s, t), c;
|
|
145
|
+
}
|
|
146
|
+
function ve(t) {
|
|
147
|
+
let e = -1, o = !1;
|
|
148
|
+
for (let n = 0; n < t.childCount; n++) {
|
|
149
|
+
const l = t.child(n);
|
|
150
|
+
let r = 0;
|
|
151
|
+
if (o) for (let s = 0; s < n; s++) {
|
|
152
|
+
const c = t.child(s);
|
|
153
|
+
for (let i = 0; i < c.childCount; i++) {
|
|
154
|
+
const a = c.child(i);
|
|
155
|
+
s + a.attrs.rowspan > n && (r += a.attrs.colspan);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
for (let s = 0; s < l.childCount; s++) {
|
|
159
|
+
const c = l.child(s);
|
|
160
|
+
r += c.attrs.colspan, c.attrs.rowspan > 1 && (o = !0);
|
|
161
|
+
}
|
|
162
|
+
e == -1 ? e = r : e != r && (e = Math.max(e, r));
|
|
163
|
+
}
|
|
164
|
+
return e;
|
|
165
|
+
}
|
|
166
|
+
function Me(t, e, o) {
|
|
167
|
+
t.problems || (t.problems = []);
|
|
168
|
+
const n = {};
|
|
169
|
+
for (let l = 0; l < t.map.length; l++) {
|
|
170
|
+
const r = t.map[l];
|
|
171
|
+
if (n[r]) continue;
|
|
172
|
+
n[r] = !0;
|
|
173
|
+
const s = o.nodeAt(r);
|
|
174
|
+
if (!s) throw new RangeError(`No cell with offset ${r} found`);
|
|
175
|
+
let c = null;
|
|
176
|
+
const i = s.attrs;
|
|
177
|
+
for (let a = 0; a < i.colspan; a++) {
|
|
178
|
+
const d = e[(l + a) % t.width * 2];
|
|
179
|
+
d != null && (!i.colwidth || i.colwidth[a] != d) && ((c || (c = ze(i)))[a] = d);
|
|
180
|
+
}
|
|
181
|
+
c && t.problems.unshift({
|
|
182
|
+
type: "colwidth mismatch",
|
|
183
|
+
pos: r,
|
|
184
|
+
colwidth: c
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function ze(t) {
|
|
189
|
+
if (t.colwidth) return t.colwidth.slice();
|
|
190
|
+
const e = [];
|
|
191
|
+
for (let o = 0; o < t.colspan; o++) e.push(0);
|
|
192
|
+
return e;
|
|
193
|
+
}
|
|
194
|
+
function y(t) {
|
|
195
|
+
let e = t.cached.tableNodeTypes;
|
|
196
|
+
if (!e) {
|
|
197
|
+
e = t.cached.tableNodeTypes = {};
|
|
198
|
+
for (const o in t.nodes) {
|
|
199
|
+
const n = t.nodes[o], l = n.spec.tableRole;
|
|
200
|
+
l && (e[l] = n);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return e;
|
|
204
|
+
}
|
|
205
|
+
const z = new Z("selectingCells");
|
|
206
|
+
function T(t) {
|
|
207
|
+
for (let e = t.depth - 1; e > 0; e--) if (t.node(e).type.spec.tableRole == "row") return t.node(0).resolve(t.before(e + 1));
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
function Ne(t) {
|
|
211
|
+
for (let e = t.depth; e > 0; e--) {
|
|
212
|
+
const o = t.node(e).type.spec.tableRole;
|
|
213
|
+
if (o === "cell" || o === "header_cell") return t.node(e);
|
|
214
|
+
}
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
function A(t) {
|
|
218
|
+
const e = t.selection.$head;
|
|
219
|
+
for (let o = e.depth; o > 0; o--) if (e.node(o).type.spec.tableRole == "row") return !0;
|
|
220
|
+
return !1;
|
|
221
|
+
}
|
|
222
|
+
function O(t) {
|
|
223
|
+
const e = t.selection;
|
|
224
|
+
if ("$anchorCell" in e && e.$anchorCell) return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
225
|
+
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell") return e.$anchor;
|
|
226
|
+
const o = T(e.$head) || ke(e.$head);
|
|
227
|
+
if (o) return o;
|
|
228
|
+
throw new RangeError(`No cell found around position ${e.head}`);
|
|
229
|
+
}
|
|
230
|
+
function ke(t) {
|
|
231
|
+
for (let e = t.nodeAfter, o = t.pos; e; e = e.firstChild, o++) {
|
|
232
|
+
const n = e.type.spec.tableRole;
|
|
233
|
+
if (n == "cell" || n == "header_cell") return t.doc.resolve(o);
|
|
234
|
+
}
|
|
235
|
+
for (let e = t.nodeBefore, o = t.pos; e; e = e.lastChild, o--) {
|
|
236
|
+
const n = e.type.spec.tableRole;
|
|
237
|
+
if (n == "cell" || n == "header_cell") return t.doc.resolve(o - e.nodeSize);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function Y(t) {
|
|
241
|
+
return t.parent.type.spec.tableRole == "row" && !!t.nodeAfter;
|
|
242
|
+
}
|
|
243
|
+
function Ee(t) {
|
|
244
|
+
return t.node(0).resolve(t.pos + t.nodeAfter.nodeSize);
|
|
245
|
+
}
|
|
246
|
+
function ee(t, e) {
|
|
247
|
+
return t.depth == e.depth && t.pos >= e.start(-1) && t.pos <= e.end(-1);
|
|
248
|
+
}
|
|
249
|
+
function ue(t, e, o) {
|
|
250
|
+
const n = t.node(-1), l = C.get(n), r = t.start(-1), s = l.nextCell(t.pos - r, e, o);
|
|
251
|
+
return s == null ? null : t.node(0).resolve(r + s);
|
|
252
|
+
}
|
|
253
|
+
function D(t, e, o = 1) {
|
|
254
|
+
const n = {
|
|
255
|
+
...t,
|
|
256
|
+
colspan: t.colspan - o
|
|
257
|
+
};
|
|
258
|
+
return n.colwidth && (n.colwidth = n.colwidth.slice(), n.colwidth.splice(e, o), n.colwidth.some((l) => l > 0) || (n.colwidth = null)), n;
|
|
259
|
+
}
|
|
260
|
+
function he(t, e, o = 1) {
|
|
261
|
+
const n = {
|
|
262
|
+
...t,
|
|
263
|
+
colspan: t.colspan + o
|
|
264
|
+
};
|
|
265
|
+
if (n.colwidth) {
|
|
266
|
+
n.colwidth = n.colwidth.slice();
|
|
267
|
+
for (let l = 0; l < o; l++) n.colwidth.splice(e, 0, 0);
|
|
268
|
+
}
|
|
269
|
+
return n;
|
|
270
|
+
}
|
|
271
|
+
function Te(t, e, o) {
|
|
272
|
+
const n = y(e.type.schema).header_cell;
|
|
273
|
+
for (let l = 0; l < t.height; l++) if (e.nodeAt(t.map[o + l * t.width]).type != n) return !1;
|
|
274
|
+
return !0;
|
|
275
|
+
}
|
|
276
|
+
var w = class v extends M {
|
|
277
|
+
constructor(e, o = e) {
|
|
278
|
+
const n = e.node(-1), l = C.get(n), r = e.start(-1), s = l.rectBetween(e.pos - r, o.pos - r), c = e.node(0), i = l.cellsInRect(s).filter((d) => d != o.pos - r);
|
|
279
|
+
i.unshift(o.pos - r);
|
|
280
|
+
const a = i.map((d) => {
|
|
281
|
+
const f = n.nodeAt(d);
|
|
282
|
+
if (!f) throw new RangeError(`No cell with offset ${d} found`);
|
|
283
|
+
const u = r + d + 1;
|
|
284
|
+
return new ye(c.resolve(u), c.resolve(u + f.content.size));
|
|
285
|
+
});
|
|
286
|
+
super(a[0].$from, a[0].$to, a), this.$anchorCell = e, this.$headCell = o;
|
|
287
|
+
}
|
|
288
|
+
map(e, o) {
|
|
289
|
+
const n = e.resolve(o.map(this.$anchorCell.pos)), l = e.resolve(o.map(this.$headCell.pos));
|
|
290
|
+
if (Y(n) && Y(l) && ee(n, l)) {
|
|
291
|
+
const r = this.$anchorCell.node(-1) != n.node(-1);
|
|
292
|
+
return r && this.isRowSelection() ? v.rowSelection(n, l) : r && this.isColSelection() ? v.colSelection(n, l) : new v(n, l);
|
|
293
|
+
}
|
|
294
|
+
return E.between(n, l);
|
|
295
|
+
}
|
|
296
|
+
content() {
|
|
297
|
+
const e = this.$anchorCell.node(-1), o = C.get(e), n = this.$anchorCell.start(-1), l = o.rectBetween(this.$anchorCell.pos - n, this.$headCell.pos - n), r = {}, s = [];
|
|
298
|
+
for (let i = l.top; i < l.bottom; i++) {
|
|
299
|
+
const a = [];
|
|
300
|
+
for (let d = i * o.width + l.left, f = l.left; f < l.right; f++, d++) {
|
|
301
|
+
const u = o.map[d];
|
|
302
|
+
if (r[u]) continue;
|
|
303
|
+
r[u] = !0;
|
|
304
|
+
const h = o.findCell(u);
|
|
305
|
+
let p = e.nodeAt(u);
|
|
306
|
+
if (!p) throw new RangeError(`No cell with offset ${u} found`);
|
|
307
|
+
const m = l.left - h.left, g = h.right - l.right;
|
|
308
|
+
if (m > 0 || g > 0) {
|
|
309
|
+
let b = p.attrs;
|
|
310
|
+
if (m > 0 && (b = D(b, 0, m)), g > 0 && (b = D(b, b.colspan - g, g)), h.left < l.left) {
|
|
311
|
+
if (p = p.type.createAndFill(b), !p) throw new RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`);
|
|
312
|
+
} else p = p.type.create(b, p.content);
|
|
313
|
+
}
|
|
314
|
+
if (h.top < l.top || h.bottom > l.bottom) {
|
|
315
|
+
const b = {
|
|
316
|
+
...p.attrs,
|
|
317
|
+
rowspan: Math.min(h.bottom, l.bottom) - Math.max(h.top, l.top)
|
|
318
|
+
};
|
|
319
|
+
h.top < l.top ? p = p.type.createAndFill(b) : p = p.type.create(b, p.content);
|
|
320
|
+
}
|
|
321
|
+
a.push(p);
|
|
322
|
+
}
|
|
323
|
+
s.push(e.child(i).copy(R.from(a)));
|
|
324
|
+
}
|
|
325
|
+
const c = this.isColSelection() && this.isRowSelection() ? e : s;
|
|
326
|
+
return new N(R.from(c), 1, 1);
|
|
327
|
+
}
|
|
328
|
+
replace(e, o = N.empty) {
|
|
329
|
+
const n = e.steps.length, l = this.ranges;
|
|
330
|
+
for (let s = 0; s < l.length; s++) {
|
|
331
|
+
const { $from: c, $to: i } = l[s], a = e.mapping.slice(n);
|
|
332
|
+
e.replace(a.map(c.pos), a.map(i.pos), s ? N.empty : o);
|
|
333
|
+
}
|
|
334
|
+
const r = M.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)), -1);
|
|
335
|
+
r && e.setSelection(r);
|
|
336
|
+
}
|
|
337
|
+
replaceWith(e, o) {
|
|
338
|
+
this.replace(e, new N(R.from(o), 0, 0));
|
|
339
|
+
}
|
|
340
|
+
forEachCell(e) {
|
|
341
|
+
const o = this.$anchorCell.node(-1), n = C.get(o), l = this.$anchorCell.start(-1), r = n.cellsInRect(n.rectBetween(this.$anchorCell.pos - l, this.$headCell.pos - l));
|
|
342
|
+
for (let s = 0; s < r.length; s++) e(o.nodeAt(r[s]), l + r[s]);
|
|
343
|
+
}
|
|
344
|
+
isColSelection() {
|
|
345
|
+
const e = this.$anchorCell.index(-1), o = this.$headCell.index(-1);
|
|
346
|
+
if (Math.min(e, o) > 0) return !1;
|
|
347
|
+
const n = e + this.$anchorCell.nodeAfter.attrs.rowspan, l = o + this.$headCell.nodeAfter.attrs.rowspan;
|
|
348
|
+
return Math.max(n, l) == this.$headCell.node(-1).childCount;
|
|
349
|
+
}
|
|
350
|
+
static colSelection(e, o = e) {
|
|
351
|
+
const n = e.node(-1), l = C.get(n), r = e.start(-1), s = l.findCell(e.pos - r), c = l.findCell(o.pos - r), i = e.node(0);
|
|
352
|
+
return s.top <= c.top ? (s.top > 0 && (e = i.resolve(r + l.map[s.left])), c.bottom < l.height && (o = i.resolve(r + l.map[l.width * (l.height - 1) + c.right - 1]))) : (c.top > 0 && (o = i.resolve(r + l.map[c.left])), s.bottom < l.height && (e = i.resolve(r + l.map[l.width * (l.height - 1) + s.right - 1]))), new v(e, o);
|
|
353
|
+
}
|
|
354
|
+
isRowSelection() {
|
|
355
|
+
const e = this.$anchorCell.node(-1), o = C.get(e), n = this.$anchorCell.start(-1), l = o.colCount(this.$anchorCell.pos - n), r = o.colCount(this.$headCell.pos - n);
|
|
356
|
+
if (Math.min(l, r) > 0) return !1;
|
|
357
|
+
const s = l + this.$anchorCell.nodeAfter.attrs.colspan, c = r + this.$headCell.nodeAfter.attrs.colspan;
|
|
358
|
+
return Math.max(s, c) == o.width;
|
|
359
|
+
}
|
|
360
|
+
eq(e) {
|
|
361
|
+
return e instanceof v && e.$anchorCell.pos == this.$anchorCell.pos && e.$headCell.pos == this.$headCell.pos;
|
|
362
|
+
}
|
|
363
|
+
static rowSelection(e, o = e) {
|
|
364
|
+
const n = e.node(-1), l = C.get(n), r = e.start(-1), s = l.findCell(e.pos - r), c = l.findCell(o.pos - r), i = e.node(0);
|
|
365
|
+
return s.left <= c.left ? (s.left > 0 && (e = i.resolve(r + l.map[s.top * l.width])), c.right < l.width && (o = i.resolve(r + l.map[l.width * (c.top + 1) - 1]))) : (c.left > 0 && (o = i.resolve(r + l.map[c.top * l.width])), s.right < l.width && (e = i.resolve(r + l.map[l.width * (s.top + 1) - 1]))), new v(e, o);
|
|
366
|
+
}
|
|
367
|
+
toJSON() {
|
|
368
|
+
return {
|
|
369
|
+
type: "cell",
|
|
370
|
+
anchor: this.$anchorCell.pos,
|
|
371
|
+
head: this.$headCell.pos
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
static fromJSON(e, o) {
|
|
375
|
+
return new v(e.resolve(o.anchor), e.resolve(o.head));
|
|
376
|
+
}
|
|
377
|
+
static create(e, o, n = o) {
|
|
378
|
+
return new v(e.resolve(o), e.resolve(n));
|
|
379
|
+
}
|
|
380
|
+
getBookmark() {
|
|
381
|
+
return new De(this.$anchorCell.pos, this.$headCell.pos);
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
w.prototype.visible = !1;
|
|
385
|
+
M.jsonID("cell", w);
|
|
386
|
+
var De = class pe {
|
|
387
|
+
constructor(e, o) {
|
|
388
|
+
this.anchor = e, this.head = o;
|
|
389
|
+
}
|
|
390
|
+
map(e) {
|
|
391
|
+
return new pe(e.map(this.anchor), e.map(this.head));
|
|
392
|
+
}
|
|
393
|
+
resolve(e) {
|
|
394
|
+
const o = e.resolve(this.anchor), n = e.resolve(this.head);
|
|
395
|
+
return o.parent.type.spec.tableRole == "row" && n.parent.type.spec.tableRole == "row" && o.index() < o.parent.childCount && n.index() < n.parent.childCount && ee(o, n) ? new w(o, n) : M.near(n, 1);
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
function Be(t) {
|
|
399
|
+
if (!(t.selection instanceof w)) return null;
|
|
400
|
+
const e = [];
|
|
401
|
+
return t.selection.forEachCell((o, n) => {
|
|
402
|
+
e.push(q.node(n, n + o.nodeSize, { class: "selectedCell" }));
|
|
403
|
+
}), X.create(t.doc, e);
|
|
404
|
+
}
|
|
405
|
+
function He({ $from: t, $to: e }) {
|
|
406
|
+
if (t.pos == e.pos || t.pos < e.pos - 6) return !1;
|
|
407
|
+
let o = t.pos, n = e.pos, l = t.depth;
|
|
408
|
+
for (; l >= 0 && !(t.after(l + 1) < t.end(l)); l--, o++) ;
|
|
409
|
+
for (let r = e.depth; r >= 0 && !(e.before(r + 1) > e.start(r)); r--, n--) ;
|
|
410
|
+
return o == n && /row|table/.test(t.node(l).type.spec.tableRole);
|
|
411
|
+
}
|
|
412
|
+
function Le({ $from: t, $to: e }) {
|
|
413
|
+
let o, n;
|
|
414
|
+
for (let l = t.depth; l > 0; l--) {
|
|
415
|
+
const r = t.node(l);
|
|
416
|
+
if (r.type.spec.tableRole === "cell" || r.type.spec.tableRole === "header_cell") {
|
|
417
|
+
o = r;
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
for (let l = e.depth; l > 0; l--) {
|
|
422
|
+
const r = e.node(l);
|
|
423
|
+
if (r.type.spec.tableRole === "cell" || r.type.spec.tableRole === "header_cell") {
|
|
424
|
+
n = r;
|
|
425
|
+
break;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return o !== n && e.parentOffset === 0;
|
|
429
|
+
}
|
|
430
|
+
function $e(t, e, o) {
|
|
431
|
+
const n = (e || t).selection, l = (e || t).doc;
|
|
432
|
+
let r, s;
|
|
433
|
+
if (n instanceof Se && (s = n.node.type.spec.tableRole)) {
|
|
434
|
+
if (s == "cell" || s == "header_cell") r = w.create(l, n.from);
|
|
435
|
+
else if (s == "row") {
|
|
436
|
+
const c = l.resolve(n.from + 1);
|
|
437
|
+
r = w.rowSelection(c, c);
|
|
438
|
+
} else if (!o) {
|
|
439
|
+
const c = C.get(n.node), i = n.from + 1, a = i + c.map[c.width * c.height - 1];
|
|
440
|
+
r = w.create(l, i + 1, a);
|
|
441
|
+
}
|
|
442
|
+
} else n instanceof E && He(n) ? r = E.create(l, n.from) : n instanceof E && Le(n) && (r = E.create(l, n.$from.start(), n.$from.end()));
|
|
443
|
+
return r && (e || (e = t.tr)).setSelection(r), e;
|
|
444
|
+
}
|
|
445
|
+
const Fe = new Z("fix-tables");
|
|
446
|
+
function me(t, e, o, n) {
|
|
447
|
+
const l = t.childCount, r = e.childCount;
|
|
448
|
+
e: for (let s = 0, c = 0; s < r; s++) {
|
|
449
|
+
const i = e.child(s);
|
|
450
|
+
for (let a = c, d = Math.min(l, s + 3); a < d; a++) if (t.child(a) == i) {
|
|
451
|
+
c = a + 1, o += i.nodeSize;
|
|
452
|
+
continue e;
|
|
453
|
+
}
|
|
454
|
+
n(i, o), c < l && t.child(c).sameMarkup(i) ? me(t.child(c), i, o + 1, n) : i.nodesBetween(0, i.content.size, n, o + 1), o += i.nodeSize;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
function Pe(t, e) {
|
|
458
|
+
let o;
|
|
459
|
+
const n = (l, r) => {
|
|
460
|
+
l.type.spec.tableRole == "table" && (o = We(t, l, r, o));
|
|
461
|
+
};
|
|
462
|
+
return e ? e.doc != t.doc && me(e.doc, t.doc, 0, n) : t.doc.descendants(n), o;
|
|
463
|
+
}
|
|
464
|
+
function We(t, e, o, n) {
|
|
465
|
+
const l = C.get(e);
|
|
466
|
+
if (!l.problems) return n;
|
|
467
|
+
n || (n = t.tr);
|
|
468
|
+
const r = [];
|
|
469
|
+
for (let i = 0; i < l.height; i++) r.push(0);
|
|
470
|
+
for (let i = 0; i < l.problems.length; i++) {
|
|
471
|
+
const a = l.problems[i];
|
|
472
|
+
if (a.type == "collision") {
|
|
473
|
+
const d = e.nodeAt(a.pos);
|
|
474
|
+
if (!d) continue;
|
|
475
|
+
const f = d.attrs;
|
|
476
|
+
for (let u = 0; u < f.rowspan; u++) r[a.row + u] += a.n;
|
|
477
|
+
n.setNodeMarkup(n.mapping.map(o + 1 + a.pos), null, D(f, f.colspan - a.n, a.n));
|
|
478
|
+
} else if (a.type == "missing") r[a.row] += a.n;
|
|
479
|
+
else if (a.type == "overlong_rowspan") {
|
|
480
|
+
const d = e.nodeAt(a.pos);
|
|
481
|
+
if (!d) continue;
|
|
482
|
+
n.setNodeMarkup(n.mapping.map(o + 1 + a.pos), null, {
|
|
483
|
+
...d.attrs,
|
|
484
|
+
rowspan: d.attrs.rowspan - a.n
|
|
485
|
+
});
|
|
486
|
+
} else if (a.type == "colwidth mismatch") {
|
|
487
|
+
const d = e.nodeAt(a.pos);
|
|
488
|
+
if (!d) continue;
|
|
489
|
+
n.setNodeMarkup(n.mapping.map(o + 1 + a.pos), null, {
|
|
490
|
+
...d.attrs,
|
|
491
|
+
colwidth: a.colwidth
|
|
492
|
+
});
|
|
493
|
+
} else if (a.type == "zero_sized") {
|
|
494
|
+
const d = n.mapping.map(o);
|
|
495
|
+
n.delete(d, d + e.nodeSize);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
let s, c;
|
|
499
|
+
for (let i = 0; i < r.length; i++) r[i] && (s == null && (s = i), c = i);
|
|
500
|
+
for (let i = 0, a = o + 1; i < l.height; i++) {
|
|
501
|
+
const d = e.child(i), f = a + d.nodeSize, u = r[i];
|
|
502
|
+
if (u > 0) {
|
|
503
|
+
let h = "cell";
|
|
504
|
+
d.firstChild && (h = d.firstChild.type.spec.tableRole);
|
|
505
|
+
const p = [];
|
|
506
|
+
for (let g = 0; g < u; g++) {
|
|
507
|
+
const b = y(t.schema)[h].createAndFill();
|
|
508
|
+
b && p.push(b);
|
|
509
|
+
}
|
|
510
|
+
const m = (i == 0 || s == i - 1) && c == i ? a + 1 : f - 1;
|
|
511
|
+
n.insert(n.mapping.map(m), p);
|
|
512
|
+
}
|
|
513
|
+
a = f;
|
|
514
|
+
}
|
|
515
|
+
return n.setMeta(Fe, { fixTables: !0 });
|
|
516
|
+
}
|
|
517
|
+
function x(t) {
|
|
518
|
+
const e = t.selection, o = O(t), n = o.node(-1), l = o.start(-1), r = C.get(n);
|
|
519
|
+
return {
|
|
520
|
+
...e instanceof w ? r.rectBetween(e.$anchorCell.pos - l, e.$headCell.pos - l) : r.findCell(o.pos - l),
|
|
521
|
+
tableStart: l,
|
|
522
|
+
map: r,
|
|
523
|
+
table: n
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
function ge(t, { map: e, tableStart: o, table: n }, l) {
|
|
527
|
+
let r = l > 0 ? -1 : 0;
|
|
528
|
+
Te(e, n, l + r) && (r = l == 0 || l == e.width ? null : 0);
|
|
529
|
+
for (let s = 0; s < e.height; s++) {
|
|
530
|
+
const c = s * e.width + l;
|
|
531
|
+
if (l > 0 && l < e.width && e.map[c - 1] == e.map[c]) {
|
|
532
|
+
const i = e.map[c], a = n.nodeAt(i);
|
|
533
|
+
t.setNodeMarkup(t.mapping.map(o + i), null, he(a.attrs, l - e.colCount(i))), s += a.attrs.rowspan - 1;
|
|
534
|
+
} else {
|
|
535
|
+
const i = r == null ? y(n.type.schema).cell : n.nodeAt(e.map[c + r]).type, a = e.positionAt(s, l, n);
|
|
536
|
+
t.insert(t.mapping.map(o + a), i.createAndFill());
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
return t;
|
|
540
|
+
}
|
|
541
|
+
function gt(t, e) {
|
|
542
|
+
if (!A(t)) return !1;
|
|
543
|
+
if (e) {
|
|
544
|
+
const o = x(t);
|
|
545
|
+
e(ge(t.tr, o, o.left));
|
|
546
|
+
}
|
|
547
|
+
return !0;
|
|
548
|
+
}
|
|
549
|
+
function wt(t, e) {
|
|
550
|
+
if (!A(t)) return !1;
|
|
551
|
+
if (e) {
|
|
552
|
+
const o = x(t);
|
|
553
|
+
e(ge(t.tr, o, o.right));
|
|
554
|
+
}
|
|
555
|
+
return !0;
|
|
556
|
+
}
|
|
557
|
+
function Ie(t, { map: e, table: o, tableStart: n }, l) {
|
|
558
|
+
const r = t.mapping.maps.length;
|
|
559
|
+
for (let s = 0; s < e.height; ) {
|
|
560
|
+
const c = s * e.width + l, i = e.map[c], a = o.nodeAt(i), d = a.attrs;
|
|
561
|
+
if (l > 0 && e.map[c - 1] == i || l < e.width - 1 && e.map[c + 1] == i) t.setNodeMarkup(t.mapping.slice(r).map(n + i), null, D(d, l - e.colCount(i)));
|
|
562
|
+
else {
|
|
563
|
+
const f = t.mapping.slice(r).map(n + i);
|
|
564
|
+
t.delete(f, f + a.nodeSize);
|
|
565
|
+
}
|
|
566
|
+
s += d.rowspan;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
function Ct(t, e) {
|
|
570
|
+
if (!A(t)) return !1;
|
|
571
|
+
if (e) {
|
|
572
|
+
const o = x(t), n = t.tr;
|
|
573
|
+
if (o.left == 0 && o.right == o.map.width) return !1;
|
|
574
|
+
for (let l = o.right - 1; Ie(n, o, l), l != o.left; l--) {
|
|
575
|
+
const r = o.tableStart ? n.doc.nodeAt(o.tableStart - 1) : n.doc;
|
|
576
|
+
if (!r) throw new RangeError("No table found");
|
|
577
|
+
o.table = r, o.map = C.get(r);
|
|
578
|
+
}
|
|
579
|
+
e(n);
|
|
580
|
+
}
|
|
581
|
+
return !0;
|
|
582
|
+
}
|
|
583
|
+
function _e(t, e, o) {
|
|
584
|
+
var n;
|
|
585
|
+
const l = y(e.type.schema).header_cell;
|
|
586
|
+
for (let r = 0; r < t.width; r++) if (((n = e.nodeAt(t.map[r + o * t.width])) === null || n === void 0 ? void 0 : n.type) != l) return !1;
|
|
587
|
+
return !0;
|
|
588
|
+
}
|
|
589
|
+
function we(t, { map: e, tableStart: o, table: n }, l) {
|
|
590
|
+
let r = o;
|
|
591
|
+
for (let a = 0; a < l; a++) r += n.child(a).nodeSize;
|
|
592
|
+
const s = [];
|
|
593
|
+
let c = l > 0 ? -1 : 0;
|
|
594
|
+
_e(e, n, l + c) && (c = l == 0 || l == e.height ? null : 0);
|
|
595
|
+
for (let a = 0, d = e.width * l; a < e.width; a++, d++) if (l > 0 && l < e.height && e.map[d] == e.map[d - e.width]) {
|
|
596
|
+
const f = e.map[d], u = n.nodeAt(f).attrs;
|
|
597
|
+
t.setNodeMarkup(o + f, null, {
|
|
598
|
+
...u,
|
|
599
|
+
rowspan: u.rowspan + 1
|
|
600
|
+
}), a += u.colspan - 1;
|
|
601
|
+
} else {
|
|
602
|
+
var i;
|
|
603
|
+
const f = c == null ? y(n.type.schema).cell : (i = n.nodeAt(e.map[d + c * e.width])) === null || i === void 0 ? void 0 : i.type, u = f?.createAndFill();
|
|
604
|
+
u && s.push(u);
|
|
605
|
+
}
|
|
606
|
+
return t.insert(r, y(n.type.schema).row.create(null, s)), t;
|
|
607
|
+
}
|
|
608
|
+
function bt(t, e) {
|
|
609
|
+
if (!A(t)) return !1;
|
|
610
|
+
if (e) {
|
|
611
|
+
const o = x(t);
|
|
612
|
+
e(we(t.tr, o, o.top));
|
|
613
|
+
}
|
|
614
|
+
return !0;
|
|
615
|
+
}
|
|
616
|
+
function yt(t, e) {
|
|
617
|
+
if (!A(t)) return !1;
|
|
618
|
+
if (e) {
|
|
619
|
+
const o = x(t);
|
|
620
|
+
e(we(t.tr, o, o.bottom));
|
|
621
|
+
}
|
|
622
|
+
return !0;
|
|
623
|
+
}
|
|
624
|
+
function Oe(t, { map: e, table: o, tableStart: n }, l) {
|
|
625
|
+
let r = 0;
|
|
626
|
+
for (let a = 0; a < l; a++) r += o.child(a).nodeSize;
|
|
627
|
+
const s = r + o.child(l).nodeSize, c = t.mapping.maps.length;
|
|
628
|
+
t.delete(r + n, s + n);
|
|
629
|
+
const i = /* @__PURE__ */ new Set();
|
|
630
|
+
for (let a = 0, d = l * e.width; a < e.width; a++, d++) {
|
|
631
|
+
const f = e.map[d];
|
|
632
|
+
if (!i.has(f)) {
|
|
633
|
+
if (i.add(f), l > 0 && f == e.map[d - e.width]) {
|
|
634
|
+
const u = o.nodeAt(f).attrs;
|
|
635
|
+
t.setNodeMarkup(t.mapping.slice(c).map(f + n), null, {
|
|
636
|
+
...u,
|
|
637
|
+
rowspan: u.rowspan - 1
|
|
638
|
+
}), a += u.colspan - 1;
|
|
639
|
+
} else if (l < e.height && f == e.map[d + e.width]) {
|
|
640
|
+
const u = o.nodeAt(f), h = u.attrs, p = u.type.create({
|
|
641
|
+
...h,
|
|
642
|
+
rowspan: u.attrs.rowspan - 1
|
|
643
|
+
}, u.content), m = e.positionAt(l + 1, a, o);
|
|
644
|
+
t.insert(t.mapping.slice(c).map(n + m), p), a += h.colspan - 1;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
function St(t, e) {
|
|
650
|
+
if (!A(t)) return !1;
|
|
651
|
+
if (e) {
|
|
652
|
+
const o = x(t), n = t.tr;
|
|
653
|
+
if (o.top == 0 && o.bottom == o.map.height) return !1;
|
|
654
|
+
for (let l = o.bottom - 1; Oe(n, o, l), l != o.top; l--) {
|
|
655
|
+
const r = o.tableStart ? n.doc.nodeAt(o.tableStart - 1) : n.doc;
|
|
656
|
+
if (!r) throw new RangeError("No table found");
|
|
657
|
+
o.table = r, o.map = C.get(o.table);
|
|
658
|
+
}
|
|
659
|
+
e(n);
|
|
660
|
+
}
|
|
661
|
+
return !0;
|
|
662
|
+
}
|
|
663
|
+
function oe(t) {
|
|
664
|
+
const e = t.content;
|
|
665
|
+
return e.childCount == 1 && e.child(0).isTextblock && e.child(0).childCount == 0;
|
|
666
|
+
}
|
|
667
|
+
function je({ width: t, height: e, map: o }, n) {
|
|
668
|
+
let l = n.top * t + n.left, r = l, s = (n.bottom - 1) * t + n.left, c = l + (n.right - n.left - 1);
|
|
669
|
+
for (let i = n.top; i < n.bottom; i++) {
|
|
670
|
+
if (n.left > 0 && o[r] == o[r - 1] || n.right < t && o[c] == o[c + 1]) return !0;
|
|
671
|
+
r += t, c += t;
|
|
672
|
+
}
|
|
673
|
+
for (let i = n.left; i < n.right; i++) {
|
|
674
|
+
if (n.top > 0 && o[l] == o[l - t] || n.bottom < e && o[s] == o[s + t]) return !0;
|
|
675
|
+
l++, s++;
|
|
676
|
+
}
|
|
677
|
+
return !1;
|
|
678
|
+
}
|
|
679
|
+
function At(t, e) {
|
|
680
|
+
const o = t.selection;
|
|
681
|
+
if (!(o instanceof w) || o.$anchorCell.pos == o.$headCell.pos) return !1;
|
|
682
|
+
const n = x(t), { map: l } = n;
|
|
683
|
+
if (je(l, n)) return !1;
|
|
684
|
+
if (e) {
|
|
685
|
+
const r = t.tr, s = {};
|
|
686
|
+
let c = R.empty, i, a;
|
|
687
|
+
for (let d = n.top; d < n.bottom; d++) for (let f = n.left; f < n.right; f++) {
|
|
688
|
+
const u = l.map[d * l.width + f], h = n.table.nodeAt(u);
|
|
689
|
+
if (!(s[u] || !h))
|
|
690
|
+
if (s[u] = !0, i == null)
|
|
691
|
+
i = u, a = h;
|
|
692
|
+
else {
|
|
693
|
+
oe(h) || (c = c.append(h.content));
|
|
694
|
+
const p = r.mapping.map(u + n.tableStart);
|
|
695
|
+
r.delete(p, p + h.nodeSize);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
if (i == null || a == null) return !0;
|
|
699
|
+
if (r.setNodeMarkup(i + n.tableStart, null, {
|
|
700
|
+
...he(a.attrs, a.attrs.colspan, n.right - n.left - a.attrs.colspan),
|
|
701
|
+
rowspan: n.bottom - n.top
|
|
702
|
+
}), c.size > 0) {
|
|
703
|
+
const d = i + 1 + a.content.size, f = oe(a) ? i + 1 : d;
|
|
704
|
+
r.replaceWith(f + n.tableStart, d + n.tableStart, c);
|
|
705
|
+
}
|
|
706
|
+
r.setSelection(new w(r.doc.resolve(i + n.tableStart))), e(r);
|
|
707
|
+
}
|
|
708
|
+
return !0;
|
|
709
|
+
}
|
|
710
|
+
function Rt(t, e) {
|
|
711
|
+
const o = y(t.schema);
|
|
712
|
+
return Ke(({ node: n }) => o[n.type.spec.tableRole])(t, e);
|
|
713
|
+
}
|
|
714
|
+
function Ke(t) {
|
|
715
|
+
return (e, o) => {
|
|
716
|
+
const n = e.selection;
|
|
717
|
+
let l, r;
|
|
718
|
+
if (n instanceof w) {
|
|
719
|
+
if (n.$anchorCell.pos != n.$headCell.pos) return !1;
|
|
720
|
+
l = n.$anchorCell.nodeAfter, r = n.$anchorCell.pos;
|
|
721
|
+
} else {
|
|
722
|
+
var s;
|
|
723
|
+
if (l = Ne(n.$from), !l) return !1;
|
|
724
|
+
r = (s = T(n.$from)) === null || s === void 0 ? void 0 : s.pos;
|
|
725
|
+
}
|
|
726
|
+
if (l == null || r == null || l.attrs.colspan == 1 && l.attrs.rowspan == 1) return !1;
|
|
727
|
+
if (o) {
|
|
728
|
+
let c = l.attrs;
|
|
729
|
+
const i = [], a = c.colwidth;
|
|
730
|
+
c.rowspan > 1 && (c = {
|
|
731
|
+
...c,
|
|
732
|
+
rowspan: 1
|
|
733
|
+
}), c.colspan > 1 && (c = {
|
|
734
|
+
...c,
|
|
735
|
+
colspan: 1
|
|
736
|
+
});
|
|
737
|
+
const d = x(e), f = e.tr;
|
|
738
|
+
for (let h = 0; h < d.right - d.left; h++) i.push(a ? {
|
|
739
|
+
...c,
|
|
740
|
+
colwidth: a && a[h] ? [a[h]] : null
|
|
741
|
+
} : c);
|
|
742
|
+
let u;
|
|
743
|
+
for (let h = d.top; h < d.bottom; h++) {
|
|
744
|
+
let p = d.map.positionAt(h, d.left, d.table);
|
|
745
|
+
h == d.top && (p += l.nodeSize);
|
|
746
|
+
for (let m = d.left, g = 0; m < d.right; m++, g++)
|
|
747
|
+
m == d.left && h == d.top || f.insert(u = f.mapping.map(p + d.tableStart, 1), t({
|
|
748
|
+
node: l,
|
|
749
|
+
row: h,
|
|
750
|
+
col: m
|
|
751
|
+
}).createAndFill(i[g]));
|
|
752
|
+
}
|
|
753
|
+
f.setNodeMarkup(r, t({
|
|
754
|
+
node: l,
|
|
755
|
+
row: d.top,
|
|
756
|
+
col: d.left
|
|
757
|
+
}), i[0]), n instanceof w && f.setSelection(new w(f.doc.resolve(n.$anchorCell.pos), u ? f.doc.resolve(u) : void 0)), o(f);
|
|
758
|
+
}
|
|
759
|
+
return !0;
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
function xt(t, e) {
|
|
763
|
+
return function(o, n) {
|
|
764
|
+
if (!A(o)) return !1;
|
|
765
|
+
const l = O(o);
|
|
766
|
+
if (l.nodeAfter.attrs[t] === e) return !1;
|
|
767
|
+
if (n) {
|
|
768
|
+
const r = o.tr;
|
|
769
|
+
o.selection instanceof w ? o.selection.forEachCell((s, c) => {
|
|
770
|
+
s.attrs[t] !== e && r.setNodeMarkup(c, null, {
|
|
771
|
+
...s.attrs,
|
|
772
|
+
[t]: e
|
|
773
|
+
});
|
|
774
|
+
}) : r.setNodeMarkup(l.pos, null, {
|
|
775
|
+
...l.nodeAfter.attrs,
|
|
776
|
+
[t]: e
|
|
777
|
+
}), n(r);
|
|
778
|
+
}
|
|
779
|
+
return !0;
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
function Ve(t) {
|
|
783
|
+
return function(e, o) {
|
|
784
|
+
if (!A(e)) return !1;
|
|
785
|
+
if (o) {
|
|
786
|
+
const n = y(e.schema), l = x(e), r = e.tr, s = l.map.cellsInRect(t == "column" ? {
|
|
787
|
+
left: l.left,
|
|
788
|
+
top: 0,
|
|
789
|
+
right: l.right,
|
|
790
|
+
bottom: l.map.height
|
|
791
|
+
} : t == "row" ? {
|
|
792
|
+
left: 0,
|
|
793
|
+
top: l.top,
|
|
794
|
+
right: l.map.width,
|
|
795
|
+
bottom: l.bottom
|
|
796
|
+
} : l), c = s.map((i) => l.table.nodeAt(i));
|
|
797
|
+
for (let i = 0; i < s.length; i++) c[i].type == n.header_cell && r.setNodeMarkup(l.tableStart + s[i], n.cell, c[i].attrs);
|
|
798
|
+
if (r.steps.length === 0) for (let i = 0; i < s.length; i++) r.setNodeMarkup(l.tableStart + s[i], n.header_cell, c[i].attrs);
|
|
799
|
+
o(r);
|
|
800
|
+
}
|
|
801
|
+
return !0;
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
function ne(t, e, o) {
|
|
805
|
+
const n = e.map.cellsInRect({
|
|
806
|
+
left: 0,
|
|
807
|
+
top: 0,
|
|
808
|
+
right: t == "row" ? e.map.width : 1,
|
|
809
|
+
bottom: t == "column" ? e.map.height : 1
|
|
810
|
+
});
|
|
811
|
+
for (let l = 0; l < n.length; l++) {
|
|
812
|
+
const r = e.table.nodeAt(n[l]);
|
|
813
|
+
if (r && r.type !== o.header_cell) return !1;
|
|
814
|
+
}
|
|
815
|
+
return !0;
|
|
816
|
+
}
|
|
817
|
+
function te(t, e) {
|
|
818
|
+
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? Ve(t) : function(o, n) {
|
|
819
|
+
if (!A(o)) return !1;
|
|
820
|
+
if (n) {
|
|
821
|
+
const l = y(o.schema), r = x(o), s = o.tr, c = ne("row", r, l), i = ne("column", r, l), a = (t === "column" ? c : t === "row" && i) ? 1 : 0, d = t == "column" ? {
|
|
822
|
+
left: 0,
|
|
823
|
+
top: a,
|
|
824
|
+
right: 1,
|
|
825
|
+
bottom: r.map.height
|
|
826
|
+
} : t == "row" ? {
|
|
827
|
+
left: a,
|
|
828
|
+
top: 0,
|
|
829
|
+
right: r.map.width,
|
|
830
|
+
bottom: 1
|
|
831
|
+
} : r, f = t == "column" ? i ? l.cell : l.header_cell : t == "row" ? c ? l.cell : l.header_cell : l.cell;
|
|
832
|
+
r.map.cellsInRect(d).forEach((u) => {
|
|
833
|
+
const h = u + r.tableStart, p = s.doc.nodeAt(h);
|
|
834
|
+
p && s.setNodeMarkup(h, f, p.attrs);
|
|
835
|
+
}), n(s);
|
|
836
|
+
}
|
|
837
|
+
return !0;
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
te("row", { useDeprecatedLogic: !0 });
|
|
841
|
+
te("column", { useDeprecatedLogic: !0 });
|
|
842
|
+
const vt = te("cell", { useDeprecatedLogic: !0 });
|
|
843
|
+
function Xe(t, e) {
|
|
844
|
+
if (e < 0) {
|
|
845
|
+
const o = t.nodeBefore;
|
|
846
|
+
if (o) return t.pos - o.nodeSize;
|
|
847
|
+
for (let n = t.index(-1) - 1, l = t.before(); n >= 0; n--) {
|
|
848
|
+
const r = t.node(-1).child(n), s = r.lastChild;
|
|
849
|
+
if (s) return l - 1 - s.nodeSize;
|
|
850
|
+
l -= r.nodeSize;
|
|
851
|
+
}
|
|
852
|
+
} else {
|
|
853
|
+
if (t.index() < t.parent.childCount - 1) return t.pos + t.nodeAfter.nodeSize;
|
|
854
|
+
const o = t.node(-1);
|
|
855
|
+
for (let n = t.indexAfter(-1), l = t.after(); n < o.childCount; n++) {
|
|
856
|
+
const r = o.child(n);
|
|
857
|
+
if (r.childCount) return l + 1;
|
|
858
|
+
l += r.nodeSize;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
return null;
|
|
862
|
+
}
|
|
863
|
+
function Mt(t) {
|
|
864
|
+
return function(e, o) {
|
|
865
|
+
if (!A(e)) return !1;
|
|
866
|
+
const n = Xe(O(e), t);
|
|
867
|
+
if (n == null) return !1;
|
|
868
|
+
if (o) {
|
|
869
|
+
const l = e.doc.resolve(n);
|
|
870
|
+
o(e.tr.setSelection(E.between(l, Ee(l))).scrollIntoView());
|
|
871
|
+
}
|
|
872
|
+
return !0;
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
function zt(t, e) {
|
|
876
|
+
const o = t.selection.$anchor;
|
|
877
|
+
for (let n = o.depth; n > 0; n--) if (o.node(n).type.spec.tableRole == "table")
|
|
878
|
+
return e && e(t.tr.delete(o.before(n), o.after(n)).scrollIntoView()), !0;
|
|
879
|
+
return !1;
|
|
880
|
+
}
|
|
881
|
+
function F(t, e) {
|
|
882
|
+
const o = t.selection;
|
|
883
|
+
if (!(o instanceof w)) return !1;
|
|
884
|
+
if (e) {
|
|
885
|
+
const n = t.tr, l = y(t.schema).cell.createAndFill().content;
|
|
886
|
+
o.forEachCell((r, s) => {
|
|
887
|
+
r.content.eq(l) || n.replace(n.mapping.map(s + 1), n.mapping.map(s + r.nodeSize - 1), new N(l, 0, 0));
|
|
888
|
+
}), n.docChanged && e(n);
|
|
889
|
+
}
|
|
890
|
+
return !0;
|
|
891
|
+
}
|
|
892
|
+
function qe(t) {
|
|
893
|
+
if (t.size === 0) return null;
|
|
894
|
+
let { content: e, openStart: o, openEnd: n } = t;
|
|
895
|
+
for (; e.childCount == 1 && (o > 0 && n > 0 || e.child(0).type.spec.tableRole == "table"); )
|
|
896
|
+
o--, n--, e = e.child(0).content;
|
|
897
|
+
const l = e.child(0), r = l.type.spec.tableRole, s = l.type.schema, c = [];
|
|
898
|
+
if (r == "row") for (let i = 0; i < e.childCount; i++) {
|
|
899
|
+
let a = e.child(i).content;
|
|
900
|
+
const d = i ? 0 : Math.max(0, o - 1), f = i < e.childCount - 1 ? 0 : Math.max(0, n - 1);
|
|
901
|
+
(d || f) && (a = G(y(s).row, new N(a, d, f)).content), c.push(a);
|
|
902
|
+
}
|
|
903
|
+
else if (r == "cell" || r == "header_cell") c.push(o || n ? G(y(s).row, new N(e, o, n)).content : e);
|
|
904
|
+
else return null;
|
|
905
|
+
return Ue(s, c);
|
|
906
|
+
}
|
|
907
|
+
function Ue(t, e) {
|
|
908
|
+
const o = [];
|
|
909
|
+
for (let l = 0; l < e.length; l++) {
|
|
910
|
+
const r = e[l];
|
|
911
|
+
for (let s = r.childCount - 1; s >= 0; s--) {
|
|
912
|
+
const { rowspan: c, colspan: i } = r.child(s).attrs;
|
|
913
|
+
for (let a = l; a < l + c; a++) o[a] = (o[a] || 0) + i;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
let n = 0;
|
|
917
|
+
for (let l = 0; l < o.length; l++) n = Math.max(n, o[l]);
|
|
918
|
+
for (let l = 0; l < o.length; l++)
|
|
919
|
+
if (l >= e.length && e.push(R.empty), o[l] < n) {
|
|
920
|
+
const r = y(t).cell.createAndFill(), s = [];
|
|
921
|
+
for (let c = o[l]; c < n; c++) s.push(r);
|
|
922
|
+
e[l] = e[l].append(R.from(s));
|
|
923
|
+
}
|
|
924
|
+
return {
|
|
925
|
+
height: e.length,
|
|
926
|
+
width: n,
|
|
927
|
+
rows: e
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
function G(t, e) {
|
|
931
|
+
const o = t.createAndFill();
|
|
932
|
+
return new Re(o).replace(0, o.content.size, e).doc;
|
|
933
|
+
}
|
|
934
|
+
function Je({ width: t, height: e, rows: o }, n, l) {
|
|
935
|
+
if (t != n) {
|
|
936
|
+
const r = [], s = [];
|
|
937
|
+
for (let c = 0; c < o.length; c++) {
|
|
938
|
+
const i = o[c], a = [];
|
|
939
|
+
for (let d = r[c] || 0, f = 0; d < n; f++) {
|
|
940
|
+
let u = i.child(f % i.childCount);
|
|
941
|
+
d + u.attrs.colspan > n && (u = u.type.createChecked(D(u.attrs, u.attrs.colspan, d + u.attrs.colspan - n), u.content)), a.push(u), d += u.attrs.colspan;
|
|
942
|
+
for (let h = 1; h < u.attrs.rowspan; h++) r[c + h] = (r[c + h] || 0) + u.attrs.colspan;
|
|
943
|
+
}
|
|
944
|
+
s.push(R.from(a));
|
|
945
|
+
}
|
|
946
|
+
o = s, t = n;
|
|
947
|
+
}
|
|
948
|
+
if (e != l) {
|
|
949
|
+
const r = [];
|
|
950
|
+
for (let s = 0, c = 0; s < l; s++, c++) {
|
|
951
|
+
const i = [], a = o[c % e];
|
|
952
|
+
for (let d = 0; d < a.childCount; d++) {
|
|
953
|
+
let f = a.child(d);
|
|
954
|
+
s + f.attrs.rowspan > l && (f = f.type.create({
|
|
955
|
+
...f.attrs,
|
|
956
|
+
rowspan: Math.max(1, l - f.attrs.rowspan)
|
|
957
|
+
}, f.content)), i.push(f);
|
|
958
|
+
}
|
|
959
|
+
r.push(R.from(i));
|
|
960
|
+
}
|
|
961
|
+
o = r, e = l;
|
|
962
|
+
}
|
|
963
|
+
return {
|
|
964
|
+
width: t,
|
|
965
|
+
height: e,
|
|
966
|
+
rows: o
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
function Ye(t, e, o, n, l, r, s) {
|
|
970
|
+
const c = t.doc.type.schema, i = y(c);
|
|
971
|
+
let a, d;
|
|
972
|
+
if (l > e.width) for (let f = 0, u = 0; f < e.height; f++) {
|
|
973
|
+
const h = o.child(f);
|
|
974
|
+
u += h.nodeSize;
|
|
975
|
+
const p = [];
|
|
976
|
+
let m;
|
|
977
|
+
h.lastChild == null || h.lastChild.type == i.cell ? m = a || (a = i.cell.createAndFill()) : m = d || (d = i.header_cell.createAndFill());
|
|
978
|
+
for (let g = e.width; g < l; g++) p.push(m);
|
|
979
|
+
t.insert(t.mapping.slice(s).map(u - 1 + n), p);
|
|
980
|
+
}
|
|
981
|
+
if (r > e.height) {
|
|
982
|
+
const f = [];
|
|
983
|
+
for (let p = 0, m = (e.height - 1) * e.width; p < Math.max(e.width, l); p++) {
|
|
984
|
+
const g = p >= e.width ? !1 : o.nodeAt(e.map[m + p]).type == i.header_cell;
|
|
985
|
+
f.push(g ? d || (d = i.header_cell.createAndFill()) : a || (a = i.cell.createAndFill()));
|
|
986
|
+
}
|
|
987
|
+
const u = i.row.create(null, R.from(f)), h = [];
|
|
988
|
+
for (let p = e.height; p < r; p++) h.push(u);
|
|
989
|
+
t.insert(t.mapping.slice(s).map(n + o.nodeSize - 2), h);
|
|
990
|
+
}
|
|
991
|
+
return !!(a || d);
|
|
992
|
+
}
|
|
993
|
+
function le(t, e, o, n, l, r, s, c) {
|
|
994
|
+
if (s == 0 || s == e.height) return !1;
|
|
995
|
+
let i = !1;
|
|
996
|
+
for (let a = l; a < r; a++) {
|
|
997
|
+
const d = s * e.width + a, f = e.map[d];
|
|
998
|
+
if (e.map[d - e.width] == f) {
|
|
999
|
+
i = !0;
|
|
1000
|
+
const u = o.nodeAt(f), { top: h, left: p } = e.findCell(f);
|
|
1001
|
+
t.setNodeMarkup(t.mapping.slice(c).map(f + n), null, {
|
|
1002
|
+
...u.attrs,
|
|
1003
|
+
rowspan: s - h
|
|
1004
|
+
}), t.insert(t.mapping.slice(c).map(e.positionAt(s, p, o)), u.type.createAndFill({
|
|
1005
|
+
...u.attrs,
|
|
1006
|
+
rowspan: h + u.attrs.rowspan - s
|
|
1007
|
+
})), a += u.attrs.colspan - 1;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
return i;
|
|
1011
|
+
}
|
|
1012
|
+
function re(t, e, o, n, l, r, s, c) {
|
|
1013
|
+
if (s == 0 || s == e.width) return !1;
|
|
1014
|
+
let i = !1;
|
|
1015
|
+
for (let a = l; a < r; a++) {
|
|
1016
|
+
const d = a * e.width + s, f = e.map[d];
|
|
1017
|
+
if (e.map[d - 1] == f) {
|
|
1018
|
+
i = !0;
|
|
1019
|
+
const u = o.nodeAt(f), h = e.colCount(f), p = t.mapping.slice(c).map(f + n);
|
|
1020
|
+
t.setNodeMarkup(p, null, D(u.attrs, s - h, u.attrs.colspan - (s - h))), t.insert(p + u.nodeSize, u.type.createAndFill(D(u.attrs, 0, s - h))), a += u.attrs.rowspan - 1;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
return i;
|
|
1024
|
+
}
|
|
1025
|
+
function se(t, e, o, n, l) {
|
|
1026
|
+
let r = o ? t.doc.nodeAt(o - 1) : t.doc;
|
|
1027
|
+
if (!r) throw new Error("No table found");
|
|
1028
|
+
let s = C.get(r);
|
|
1029
|
+
const { top: c, left: i } = n, a = i + l.width, d = c + l.height, f = t.tr;
|
|
1030
|
+
let u = 0;
|
|
1031
|
+
function h() {
|
|
1032
|
+
if (r = o ? f.doc.nodeAt(o - 1) : f.doc, !r) throw new Error("No table found");
|
|
1033
|
+
s = C.get(r), u = f.mapping.maps.length;
|
|
1034
|
+
}
|
|
1035
|
+
Ye(f, s, r, o, a, d, u) && h(), le(f, s, r, o, i, a, c, u) && h(), le(f, s, r, o, i, a, d, u) && h(), re(f, s, r, o, c, d, i, u) && h(), re(f, s, r, o, c, d, a, u) && h();
|
|
1036
|
+
for (let p = c; p < d; p++) {
|
|
1037
|
+
const m = s.positionAt(p, i, r), g = s.positionAt(p, a, r);
|
|
1038
|
+
f.replace(f.mapping.slice(u).map(m + o), f.mapping.slice(u).map(g + o), new N(l.rows[p - c], 0, 0));
|
|
1039
|
+
}
|
|
1040
|
+
h(), f.setSelection(new w(f.doc.resolve(o + s.positionAt(c, i, r)), f.doc.resolve(o + s.positionAt(d - 1, a - 1, r)))), e(f);
|
|
1041
|
+
}
|
|
1042
|
+
const Ge = Ae({
|
|
1043
|
+
ArrowLeft: P("horiz", -1),
|
|
1044
|
+
ArrowRight: P("horiz", 1),
|
|
1045
|
+
ArrowUp: P("vert", -1),
|
|
1046
|
+
ArrowDown: P("vert", 1),
|
|
1047
|
+
"Shift-ArrowLeft": W("horiz", -1),
|
|
1048
|
+
"Shift-ArrowRight": W("horiz", 1),
|
|
1049
|
+
"Shift-ArrowUp": W("vert", -1),
|
|
1050
|
+
"Shift-ArrowDown": W("vert", 1),
|
|
1051
|
+
Backspace: F,
|
|
1052
|
+
"Mod-Backspace": F,
|
|
1053
|
+
Delete: F,
|
|
1054
|
+
"Mod-Delete": F
|
|
1055
|
+
});
|
|
1056
|
+
function I(t, e, o) {
|
|
1057
|
+
return o.eq(t.selection) ? !1 : (e && e(t.tr.setSelection(o).scrollIntoView()), !0);
|
|
1058
|
+
}
|
|
1059
|
+
function P(t, e) {
|
|
1060
|
+
return (o, n, l) => {
|
|
1061
|
+
if (!l) return !1;
|
|
1062
|
+
const r = o.selection;
|
|
1063
|
+
if (r instanceof w) return I(o, n, M.near(r.$headCell, e));
|
|
1064
|
+
if (t != "horiz" && !r.empty) return !1;
|
|
1065
|
+
const s = Ce(l, t, e);
|
|
1066
|
+
if (s == null) return !1;
|
|
1067
|
+
if (t == "horiz") return I(o, n, M.near(o.doc.resolve(r.head + e), e));
|
|
1068
|
+
{
|
|
1069
|
+
const c = o.doc.resolve(s), i = ue(c, t, e);
|
|
1070
|
+
let a;
|
|
1071
|
+
return i ? a = M.near(i, 1) : e < 0 ? a = M.near(o.doc.resolve(c.before(-1)), -1) : a = M.near(o.doc.resolve(c.after(-1)), 1), I(o, n, a);
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
function W(t, e) {
|
|
1076
|
+
return (o, n, l) => {
|
|
1077
|
+
if (!l) return !1;
|
|
1078
|
+
const r = o.selection;
|
|
1079
|
+
let s;
|
|
1080
|
+
if (r instanceof w) s = r;
|
|
1081
|
+
else {
|
|
1082
|
+
const i = Ce(l, t, e);
|
|
1083
|
+
if (i == null) return !1;
|
|
1084
|
+
s = new w(o.doc.resolve(i));
|
|
1085
|
+
}
|
|
1086
|
+
const c = ue(s.$headCell, t, e);
|
|
1087
|
+
return c ? I(o, n, new w(s.$anchorCell, c)) : !1;
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
function Qe(t, e) {
|
|
1091
|
+
const o = t.state.doc, n = T(o.resolve(e));
|
|
1092
|
+
return n ? (t.dispatch(t.state.tr.setSelection(new w(n))), !0) : !1;
|
|
1093
|
+
}
|
|
1094
|
+
function Ze(t, e, o) {
|
|
1095
|
+
if (!A(t.state)) return !1;
|
|
1096
|
+
let n = qe(o);
|
|
1097
|
+
const l = t.state.selection;
|
|
1098
|
+
if (l instanceof w) {
|
|
1099
|
+
n || (n = {
|
|
1100
|
+
width: 1,
|
|
1101
|
+
height: 1,
|
|
1102
|
+
rows: [R.from(G(y(t.state.schema).cell, o))]
|
|
1103
|
+
});
|
|
1104
|
+
const r = l.$anchorCell.node(-1), s = l.$anchorCell.start(-1), c = C.get(r).rectBetween(l.$anchorCell.pos - s, l.$headCell.pos - s);
|
|
1105
|
+
return n = Je(n, c.right - c.left, c.bottom - c.top), se(t.state, t.dispatch, s, c, n), !0;
|
|
1106
|
+
} else if (n) {
|
|
1107
|
+
const r = O(t.state), s = r.start(-1);
|
|
1108
|
+
return se(t.state, t.dispatch, s, C.get(r.node(-1)).findCell(r.pos - s), n), !0;
|
|
1109
|
+
} else return !1;
|
|
1110
|
+
}
|
|
1111
|
+
function et(t, e) {
|
|
1112
|
+
var o;
|
|
1113
|
+
if (e.button != 0 || e.ctrlKey || e.metaKey) return;
|
|
1114
|
+
const n = ie(t, e.target);
|
|
1115
|
+
let l;
|
|
1116
|
+
if (e.shiftKey && t.state.selection instanceof w)
|
|
1117
|
+
r(t.state.selection.$anchorCell, e), e.preventDefault();
|
|
1118
|
+
else if (e.shiftKey && n && (l = T(t.state.selection.$anchor)) != null && ((o = V(t, e)) === null || o === void 0 ? void 0 : o.pos) != l.pos)
|
|
1119
|
+
r(l, e), e.preventDefault();
|
|
1120
|
+
else if (!n) return;
|
|
1121
|
+
function r(i, a) {
|
|
1122
|
+
let d = V(t, a);
|
|
1123
|
+
const f = z.getState(t.state) == null;
|
|
1124
|
+
if (!d || !ee(i, d)) if (f) d = i;
|
|
1125
|
+
else return;
|
|
1126
|
+
const u = new w(i, d);
|
|
1127
|
+
if (f || !t.state.selection.eq(u)) {
|
|
1128
|
+
const h = t.state.tr.setSelection(u);
|
|
1129
|
+
f && h.setMeta(z, i.pos), t.dispatch(h);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
function s() {
|
|
1133
|
+
t.root.removeEventListener("mouseup", s), t.root.removeEventListener("dragstart", s), t.root.removeEventListener("mousemove", c), z.getState(t.state) != null && t.dispatch(t.state.tr.setMeta(z, -1));
|
|
1134
|
+
}
|
|
1135
|
+
function c(i) {
|
|
1136
|
+
const a = i, d = z.getState(t.state);
|
|
1137
|
+
let f;
|
|
1138
|
+
if (d != null) f = t.state.doc.resolve(d);
|
|
1139
|
+
else if (ie(t, a.target) != n && (f = V(t, e), !f))
|
|
1140
|
+
return s();
|
|
1141
|
+
f && r(f, a);
|
|
1142
|
+
}
|
|
1143
|
+
t.root.addEventListener("mouseup", s), t.root.addEventListener("dragstart", s), t.root.addEventListener("mousemove", c);
|
|
1144
|
+
}
|
|
1145
|
+
function Ce(t, e, o) {
|
|
1146
|
+
if (!(t.state.selection instanceof E)) return null;
|
|
1147
|
+
const { $head: n } = t.state.selection;
|
|
1148
|
+
for (let l = n.depth - 1; l >= 0; l--) {
|
|
1149
|
+
const r = n.node(l);
|
|
1150
|
+
if ((o < 0 ? n.index(l) : n.indexAfter(l)) != (o < 0 ? 0 : r.childCount)) return null;
|
|
1151
|
+
if (r.type.spec.tableRole == "cell" || r.type.spec.tableRole == "header_cell") {
|
|
1152
|
+
const s = n.before(l), c = e == "vert" ? o > 0 ? "down" : "up" : o > 0 ? "right" : "left";
|
|
1153
|
+
return t.endOfTextblock(c) ? s : null;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
return null;
|
|
1157
|
+
}
|
|
1158
|
+
function ie(t, e) {
|
|
1159
|
+
for (; e && e != t.dom; e = e.parentNode) if (e.nodeName == "TD" || e.nodeName == "TH") return e;
|
|
1160
|
+
return null;
|
|
1161
|
+
}
|
|
1162
|
+
function V(t, e) {
|
|
1163
|
+
const o = t.posAtCoords({
|
|
1164
|
+
left: e.clientX,
|
|
1165
|
+
top: e.clientY
|
|
1166
|
+
});
|
|
1167
|
+
if (!o) return null;
|
|
1168
|
+
let { inside: n, pos: l } = o;
|
|
1169
|
+
return n >= 0 && T(t.state.doc.resolve(n)) || T(t.state.doc.resolve(l));
|
|
1170
|
+
}
|
|
1171
|
+
var tt = class {
|
|
1172
|
+
constructor(t, e) {
|
|
1173
|
+
this.node = t, this.defaultCellMinWidth = e, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), this.table.style.setProperty("--default-cell-min-width", `${e}px`), this.colgroup = this.table.appendChild(document.createElement("colgroup")), Q(t, this.colgroup, this.table, e), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
1174
|
+
}
|
|
1175
|
+
update(t) {
|
|
1176
|
+
return t.type != this.node.type ? !1 : (this.node = t, Q(t, this.colgroup, this.table, this.defaultCellMinWidth), !0);
|
|
1177
|
+
}
|
|
1178
|
+
ignoreMutation(t) {
|
|
1179
|
+
return t.type == "attributes" && (t.target == this.table || this.colgroup.contains(t.target));
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
function Q(t, e, o, n, l, r) {
|
|
1183
|
+
let s = 0, c = !0, i = e.firstChild;
|
|
1184
|
+
const a = t.firstChild;
|
|
1185
|
+
if (a) {
|
|
1186
|
+
for (let f = 0, u = 0; f < a.childCount; f++) {
|
|
1187
|
+
const { colspan: h, colwidth: p } = a.child(f).attrs;
|
|
1188
|
+
for (let m = 0; m < h; m++, u++) {
|
|
1189
|
+
const g = l == u ? r : p && p[m], b = g ? g + "px" : "";
|
|
1190
|
+
if (s += g || n, g || (c = !1), i)
|
|
1191
|
+
i.style.width != b && (i.style.width = b), i = i.nextSibling;
|
|
1192
|
+
else {
|
|
1193
|
+
const B = document.createElement("col");
|
|
1194
|
+
B.style.width = b, e.appendChild(B);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
for (; i; ) {
|
|
1199
|
+
var d;
|
|
1200
|
+
const f = i.nextSibling;
|
|
1201
|
+
(d = i.parentNode) === null || d === void 0 || d.removeChild(i), i = f;
|
|
1202
|
+
}
|
|
1203
|
+
c ? (o.style.width = s + "px", o.style.minWidth = "") : (o.style.width = "", o.style.minWidth = s + "px");
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
const S = new Z("tableColumnResizing");
|
|
1207
|
+
function Nt({ handleWidth: t = 5, cellMinWidth: e = 25, defaultCellMinWidth: o = 100, View: n = tt, lastColumnResizable: l = !0 } = {}) {
|
|
1208
|
+
const r = new fe({
|
|
1209
|
+
key: S,
|
|
1210
|
+
state: {
|
|
1211
|
+
init(s, c) {
|
|
1212
|
+
var i;
|
|
1213
|
+
const a = (i = r.spec) === null || i === void 0 || (i = i.props) === null || i === void 0 ? void 0 : i.nodeViews, d = y(c.schema).table.name;
|
|
1214
|
+
return n && a && (a[d] = (f, u) => new n(f, o, u)), new ot(-1, !1);
|
|
1215
|
+
},
|
|
1216
|
+
apply(s, c) {
|
|
1217
|
+
return c.apply(s);
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
props: {
|
|
1221
|
+
attributes: (s) => {
|
|
1222
|
+
const c = S.getState(s);
|
|
1223
|
+
return c && c.activeHandle > -1 ? { class: "resize-cursor" } : {};
|
|
1224
|
+
},
|
|
1225
|
+
handleDOMEvents: {
|
|
1226
|
+
mousemove: (s, c) => {
|
|
1227
|
+
nt(s, c, t, l);
|
|
1228
|
+
},
|
|
1229
|
+
mouseleave: (s) => {
|
|
1230
|
+
lt(s);
|
|
1231
|
+
},
|
|
1232
|
+
mousedown: (s, c) => {
|
|
1233
|
+
rt(s, c, e, o);
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
decorations: (s) => {
|
|
1237
|
+
const c = S.getState(s);
|
|
1238
|
+
if (c && c.activeHandle > -1) return dt(s, c.activeHandle);
|
|
1239
|
+
},
|
|
1240
|
+
nodeViews: {}
|
|
1241
|
+
}
|
|
1242
|
+
});
|
|
1243
|
+
return r;
|
|
1244
|
+
}
|
|
1245
|
+
var ot = class _ {
|
|
1246
|
+
constructor(e, o) {
|
|
1247
|
+
this.activeHandle = e, this.dragging = o;
|
|
1248
|
+
}
|
|
1249
|
+
apply(e) {
|
|
1250
|
+
const o = this, n = e.getMeta(S);
|
|
1251
|
+
if (n && n.setHandle != null) return new _(n.setHandle, !1);
|
|
1252
|
+
if (n && n.setDragging !== void 0) return new _(o.activeHandle, n.setDragging);
|
|
1253
|
+
if (o.activeHandle > -1 && e.docChanged) {
|
|
1254
|
+
let l = e.mapping.map(o.activeHandle, -1);
|
|
1255
|
+
return Y(e.doc.resolve(l)) || (l = -1), new _(l, o.dragging);
|
|
1256
|
+
}
|
|
1257
|
+
return o;
|
|
1258
|
+
}
|
|
1259
|
+
};
|
|
1260
|
+
function nt(t, e, o, n) {
|
|
1261
|
+
if (!t.editable) return;
|
|
1262
|
+
const l = S.getState(t.state);
|
|
1263
|
+
if (l && !l.dragging) {
|
|
1264
|
+
const r = it(e.target);
|
|
1265
|
+
let s = -1;
|
|
1266
|
+
if (r) {
|
|
1267
|
+
const { left: c, right: i } = r.getBoundingClientRect();
|
|
1268
|
+
e.clientX - c <= o ? s = ce(t, e, "left", o) : i - e.clientX <= o && (s = ce(t, e, "right", o));
|
|
1269
|
+
}
|
|
1270
|
+
if (s != l.activeHandle) {
|
|
1271
|
+
if (!n && s !== -1) {
|
|
1272
|
+
const c = t.state.doc.resolve(s), i = c.node(-1), a = C.get(i), d = c.start(-1);
|
|
1273
|
+
if (a.colCount(c.pos - d) + c.nodeAfter.attrs.colspan - 1 == a.width - 1) return;
|
|
1274
|
+
}
|
|
1275
|
+
be(t, s);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
function lt(t) {
|
|
1280
|
+
if (!t.editable) return;
|
|
1281
|
+
const e = S.getState(t.state);
|
|
1282
|
+
e && e.activeHandle > -1 && !e.dragging && be(t, -1);
|
|
1283
|
+
}
|
|
1284
|
+
function rt(t, e, o, n) {
|
|
1285
|
+
var l;
|
|
1286
|
+
if (!t.editable) return !1;
|
|
1287
|
+
const r = (l = t.dom.ownerDocument.defaultView) !== null && l !== void 0 ? l : window, s = S.getState(t.state);
|
|
1288
|
+
if (!s || s.activeHandle == -1 || s.dragging) return !1;
|
|
1289
|
+
const c = t.state.doc.nodeAt(s.activeHandle), i = st(t, s.activeHandle, c.attrs);
|
|
1290
|
+
t.dispatch(t.state.tr.setMeta(S, { setDragging: {
|
|
1291
|
+
startX: e.clientX,
|
|
1292
|
+
startWidth: i
|
|
1293
|
+
} }));
|
|
1294
|
+
function a(f) {
|
|
1295
|
+
r.removeEventListener("mouseup", a), r.removeEventListener("mousemove", d);
|
|
1296
|
+
const u = S.getState(t.state);
|
|
1297
|
+
u?.dragging && (ct(t, u.activeHandle, ae(u.dragging, f, o)), t.dispatch(t.state.tr.setMeta(S, { setDragging: null })));
|
|
1298
|
+
}
|
|
1299
|
+
function d(f) {
|
|
1300
|
+
if (!f.which) return a(f);
|
|
1301
|
+
const u = S.getState(t.state);
|
|
1302
|
+
if (u && u.dragging) {
|
|
1303
|
+
const h = ae(u.dragging, f, o);
|
|
1304
|
+
de(t, u.activeHandle, h, n);
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
return de(t, s.activeHandle, i, n), r.addEventListener("mouseup", a), r.addEventListener("mousemove", d), e.preventDefault(), !0;
|
|
1308
|
+
}
|
|
1309
|
+
function st(t, e, { colspan: o, colwidth: n }) {
|
|
1310
|
+
const l = n && n[n.length - 1];
|
|
1311
|
+
if (l) return l;
|
|
1312
|
+
const r = t.domAtPos(e);
|
|
1313
|
+
let s = r.node.childNodes[r.offset].offsetWidth, c = o;
|
|
1314
|
+
if (n)
|
|
1315
|
+
for (let i = 0; i < o; i++) n[i] && (s -= n[i], c--);
|
|
1316
|
+
return s / c;
|
|
1317
|
+
}
|
|
1318
|
+
function it(t) {
|
|
1319
|
+
for (; t && t.nodeName != "TD" && t.nodeName != "TH"; ) t = t.classList && t.classList.contains("ProseMirror") ? null : t.parentNode;
|
|
1320
|
+
return t;
|
|
1321
|
+
}
|
|
1322
|
+
function ce(t, e, o, n) {
|
|
1323
|
+
const l = o == "right" ? -n : n, r = t.posAtCoords({
|
|
1324
|
+
left: e.clientX + l,
|
|
1325
|
+
top: e.clientY
|
|
1326
|
+
});
|
|
1327
|
+
if (!r) return -1;
|
|
1328
|
+
const { pos: s } = r, c = T(t.state.doc.resolve(s));
|
|
1329
|
+
if (!c) return -1;
|
|
1330
|
+
if (o == "right") return c.pos;
|
|
1331
|
+
const i = C.get(c.node(-1)), a = c.start(-1), d = i.map.indexOf(c.pos - a);
|
|
1332
|
+
return d % i.width == 0 ? -1 : a + i.map[d - 1];
|
|
1333
|
+
}
|
|
1334
|
+
function ae(t, e, o) {
|
|
1335
|
+
const n = e.clientX - t.startX;
|
|
1336
|
+
return Math.max(o, t.startWidth + n);
|
|
1337
|
+
}
|
|
1338
|
+
function be(t, e) {
|
|
1339
|
+
t.dispatch(t.state.tr.setMeta(S, { setHandle: e }));
|
|
1340
|
+
}
|
|
1341
|
+
function ct(t, e, o) {
|
|
1342
|
+
const n = t.state.doc.resolve(e), l = n.node(-1), r = C.get(l), s = n.start(-1), c = r.colCount(n.pos - s) + n.nodeAfter.attrs.colspan - 1, i = t.state.tr;
|
|
1343
|
+
for (let a = 0; a < r.height; a++) {
|
|
1344
|
+
const d = a * r.width + c;
|
|
1345
|
+
if (a && r.map[d] == r.map[d - r.width]) continue;
|
|
1346
|
+
const f = r.map[d], u = l.nodeAt(f).attrs, h = u.colspan == 1 ? 0 : c - r.colCount(f);
|
|
1347
|
+
if (u.colwidth && u.colwidth[h] == o) continue;
|
|
1348
|
+
const p = u.colwidth ? u.colwidth.slice() : at(u.colspan);
|
|
1349
|
+
p[h] = o, i.setNodeMarkup(s + f, null, {
|
|
1350
|
+
...u,
|
|
1351
|
+
colwidth: p
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
i.docChanged && t.dispatch(i);
|
|
1355
|
+
}
|
|
1356
|
+
function de(t, e, o, n) {
|
|
1357
|
+
const l = t.state.doc.resolve(e), r = l.node(-1), s = l.start(-1), c = C.get(r).colCount(l.pos - s) + l.nodeAfter.attrs.colspan - 1;
|
|
1358
|
+
let i = t.domAtPos(l.start(-1)).node;
|
|
1359
|
+
for (; i && i.nodeName != "TABLE"; ) i = i.parentNode;
|
|
1360
|
+
i && Q(r, i.firstChild, i, n, c, o);
|
|
1361
|
+
}
|
|
1362
|
+
function at(t) {
|
|
1363
|
+
return Array(t).fill(0);
|
|
1364
|
+
}
|
|
1365
|
+
function dt(t, e) {
|
|
1366
|
+
const o = [], n = t.doc.resolve(e), l = n.node(-1);
|
|
1367
|
+
if (!l) return X.empty;
|
|
1368
|
+
const r = C.get(l), s = n.start(-1), c = r.colCount(n.pos - s) + n.nodeAfter.attrs.colspan - 1;
|
|
1369
|
+
for (let a = 0; a < r.height; a++) {
|
|
1370
|
+
const d = c + a * r.width;
|
|
1371
|
+
if ((c == r.width - 1 || r.map[d] != r.map[d + 1]) && (a == 0 || r.map[d] != r.map[d - r.width])) {
|
|
1372
|
+
var i;
|
|
1373
|
+
const f = r.map[d], u = s + f + l.nodeAt(f).nodeSize - 1, h = document.createElement("div");
|
|
1374
|
+
h.className = "column-resize-handle", !((i = S.getState(t)) === null || i === void 0) && i.dragging && o.push(q.node(s + f, s + f + l.nodeAt(f).nodeSize, { class: "column-resize-dragging" })), o.push(q.widget(u, h));
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
return X.create(t.doc, o);
|
|
1378
|
+
}
|
|
1379
|
+
function kt({ allowTableNodeSelection: t = !1 } = {}) {
|
|
1380
|
+
return new fe({
|
|
1381
|
+
key: z,
|
|
1382
|
+
state: {
|
|
1383
|
+
init() {
|
|
1384
|
+
return null;
|
|
1385
|
+
},
|
|
1386
|
+
apply(e, o) {
|
|
1387
|
+
const n = e.getMeta(z);
|
|
1388
|
+
if (n != null) return n == -1 ? null : n;
|
|
1389
|
+
if (o == null || !e.docChanged) return o;
|
|
1390
|
+
const { deleted: l, pos: r } = e.mapping.mapResult(o);
|
|
1391
|
+
return l ? null : r;
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
props: {
|
|
1395
|
+
decorations: Be,
|
|
1396
|
+
handleDOMEvents: { mousedown: et },
|
|
1397
|
+
createSelectionBetween(e) {
|
|
1398
|
+
return z.getState(e.state) != null ? e.state.selection : null;
|
|
1399
|
+
},
|
|
1400
|
+
handleTripleClick: Qe,
|
|
1401
|
+
handleKeyDown: Ge,
|
|
1402
|
+
handlePaste: Ze
|
|
1403
|
+
},
|
|
1404
|
+
appendTransaction(e, o, n) {
|
|
1405
|
+
return $e(n, Pe(n, o), t);
|
|
1406
|
+
}
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
export {
|
|
1410
|
+
De as CellBookmark,
|
|
1411
|
+
w as CellSelection,
|
|
1412
|
+
ot as ResizeState,
|
|
1413
|
+
C as TableMap,
|
|
1414
|
+
tt as TableView,
|
|
1415
|
+
Je as __clipCells,
|
|
1416
|
+
se as __insertCells,
|
|
1417
|
+
qe as __pastedCells,
|
|
1418
|
+
he as addColSpan,
|
|
1419
|
+
ge as addColumn,
|
|
1420
|
+
wt as addColumnAfter,
|
|
1421
|
+
gt as addColumnBefore,
|
|
1422
|
+
we as addRow,
|
|
1423
|
+
yt as addRowAfter,
|
|
1424
|
+
bt as addRowBefore,
|
|
1425
|
+
T as cellAround,
|
|
1426
|
+
ke as cellNear,
|
|
1427
|
+
Te as columnIsHeader,
|
|
1428
|
+
Nt as columnResizing,
|
|
1429
|
+
S as columnResizingPluginKey,
|
|
1430
|
+
F as deleteCellSelection,
|
|
1431
|
+
Ct as deleteColumn,
|
|
1432
|
+
St as deleteRow,
|
|
1433
|
+
zt as deleteTable,
|
|
1434
|
+
Pe as fixTables,
|
|
1435
|
+
Fe as fixTablesKey,
|
|
1436
|
+
Mt as goToNextCell,
|
|
1437
|
+
Ze as handlePaste,
|
|
1438
|
+
ee as inSameTable,
|
|
1439
|
+
A as isInTable,
|
|
1440
|
+
At as mergeCells,
|
|
1441
|
+
Ee as moveCellForward,
|
|
1442
|
+
ue as nextCell,
|
|
1443
|
+
Y as pointsAtCell,
|
|
1444
|
+
D as removeColSpan,
|
|
1445
|
+
Ie as removeColumn,
|
|
1446
|
+
Oe as removeRow,
|
|
1447
|
+
_e as rowIsHeader,
|
|
1448
|
+
x as selectedRect,
|
|
1449
|
+
O as selectionCell,
|
|
1450
|
+
xt as setCellAttr,
|
|
1451
|
+
Rt as splitCell,
|
|
1452
|
+
Ke as splitCellWithType,
|
|
1453
|
+
kt as tableEditing,
|
|
1454
|
+
z as tableEditingKey,
|
|
1455
|
+
y as tableNodeTypes,
|
|
1456
|
+
te as toggleHeader,
|
|
1457
|
+
vt as toggleHeaderCell,
|
|
1458
|
+
Q as updateColumnsOnResize
|
|
1459
|
+
};
|