HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/files.wb-cloud.nl/public_html/apps/text/js/MenuBar-D7Mx5BJq.chunk.mjs.map
{"version":3,"file":"MenuBar-D7Mx5BJq.chunk.mjs","sources":["../node_modules/y-prosemirror/src/plugins/undo-plugin.js","../node_modules/@tiptap/extension-collaboration/dist/index.js","../node_modules/@nextcloud/vue/dist/chunks/NcDialog-C1b3UtA7.mjs","../src/components/Menu/ActionListItem.vue","../src/components/Menu/ActionList.vue","../src/components/Menu/ActionSingle.vue","../src/components/Menu/ToolBarLogic.js","../src/components/Menu/ReadonlyBar.vue","../src/composables/useEditorWidth.ts","../node_modules/@nextcloud/vue/dist/chunks/NcActionCheckbox-DSMKeccY.mjs","../node_modules/path-normalize/lib/index.js","../src/services/AttachmentResolver.js","../node_modules/@tiptap/extension-node-range/dist/index.js","../node_modules/@tiptap/extension-drag-handle/dist/index.js","../node_modules/@tiptap/extension-drag-handle-vue-2/dist/index.js","../node_modules/vue-material-design-icons/DragVertical.vue","../src/components/Editor/ContentContainer.vue","../src/apis/attach.ts","../src/components/Editor/MediaHandler.vue","../src/components/Editor/MainContainer.vue","../src/components/Editor/Wrapper.vue","../src/helpers/platform.js","../src/components/HelpModal.vue","../src/components/Menu/ActionFormattingHelp.vue","../src/components/Menu/CharacterCount.vue","../src/components/Menu/TranslateButton.vue","../src/components/Menu/WidthToggle.vue","../src/components/Menu/MenuBar.vue"],"sourcesContent":["import { Plugin } from 'prosemirror-state'\n\nimport { getRelativeSelection } from './sync-plugin.js'\nimport { UndoManager, Item, ContentType, XmlElement, Text } from 'yjs'\nimport { yUndoPluginKey, ySyncPluginKey } from './keys.js'\n\n/**\n * @typedef {Object} UndoPluginState\n * @property {import('yjs').UndoManager} undoManager\n * @property {ReturnType<typeof getRelativeSelection> | null} prevSel\n * @property {boolean} hasUndoOps\n * @property {boolean} hasRedoOps\n */\n\n/**\n * Undo the last user action\n *\n * @param {import('prosemirror-state').EditorState} state\n * @return {boolean} whether a change was undone\n */\nexport const undo = state => yUndoPluginKey.getState(state)?.undoManager?.undo() != null\n\n/**\n * Redo the last user action\n *\n * @param {import('prosemirror-state').EditorState} state\n * @return {boolean} whether a change was undone\n */\nexport const redo = state => yUndoPluginKey.getState(state)?.undoManager?.redo() != null\n\n/**\n * Undo the last user action if there are undo operations available\n * @type {import('prosemirror-state').Command}\n */\nexport const undoCommand = (state, dispatch) => dispatch == null ? yUndoPluginKey.getState(state)?.undoManager?.canUndo() : undo(state)\n\n/**\n * Redo the last user action if there are redo operations available\n * @type {import('prosemirror-state').Command}\n */\nexport const redoCommand = (state, dispatch) => dispatch == null ? yUndoPluginKey.getState(state)?.undoManager?.canRedo() : redo(state)\n\nexport const defaultProtectedNodes = new Set(['paragraph'])\n\n/**\n * @param {import('yjs').Item} item\n * @param {Set<string>} protectedNodes\n * @returns {boolean}\n */\nexport const defaultDeleteFilter = (item, protectedNodes) => !(item instanceof Item) ||\n  !(item.content instanceof ContentType) ||\n  !(item.content.type instanceof Text ||\n  (item.content.type instanceof XmlElement && protectedNodes.has(item.content.type.nodeName))) ||\n  item.content.type._length === 0\n\n/**\n * @param {object} [options]\n * @param {Set<string>} [options.protectedNodes]\n * @param {any[]} [options.trackedOrigins]\n * @param {import('yjs').UndoManager | null} [options.undoManager]\n */\nexport const yUndoPlugin = ({ protectedNodes = defaultProtectedNodes, trackedOrigins = [], undoManager = null } = {}) => new Plugin({\n  key: yUndoPluginKey,\n  state: {\n    init: (initargs, state) => {\n      // TODO: check if plugin order matches and fix\n      const ystate = ySyncPluginKey.getState(state)\n      const _undoManager = undoManager || new UndoManager(ystate.type, {\n        trackedOrigins: new Set([ySyncPluginKey].concat(trackedOrigins)),\n        deleteFilter: (item) => defaultDeleteFilter(item, protectedNodes),\n        captureTransaction: tr => tr.meta.get('addToHistory') !== false\n      })\n      return {\n        undoManager: _undoManager,\n        prevSel: null,\n        hasUndoOps: _undoManager.undoStack.length > 0,\n        hasRedoOps: _undoManager.redoStack.length > 0\n      }\n    },\n    apply: (tr, val, oldState, state) => {\n      const binding = ySyncPluginKey.getState(state).binding\n      const undoManager = val.undoManager\n      const hasUndoOps = undoManager.undoStack.length > 0\n      const hasRedoOps = undoManager.redoStack.length > 0\n      if (binding) {\n        return {\n          undoManager,\n          prevSel: getRelativeSelection(binding, oldState),\n          hasUndoOps,\n          hasRedoOps\n        }\n      } else {\n        if (hasUndoOps !== val.hasUndoOps || hasRedoOps !== val.hasRedoOps) {\n          return Object.assign({}, val, {\n            hasUndoOps: undoManager.undoStack.length > 0,\n            hasRedoOps: undoManager.redoStack.length > 0\n          })\n        } else { // nothing changed\n          return val\n        }\n      }\n    }\n  },\n  view: view => {\n    const ystate = ySyncPluginKey.getState(view.state)\n    const undoManager = yUndoPluginKey.getState(view.state).undoManager\n    undoManager.on('stack-item-added', ({ stackItem }) => {\n      const binding = ystate.binding\n      if (binding) {\n        stackItem.meta.set(binding, yUndoPluginKey.getState(view.state).prevSel)\n      }\n    })\n    undoManager.on('stack-item-popped', ({ stackItem }) => {\n      const binding = ystate.binding\n      if (binding) {\n        binding.beforeTransactionSelection = stackItem.meta.get(binding) || binding.beforeTransactionSelection\n      }\n    })\n    return {\n      destroy: () => {\n        undoManager.destroy()\n      }\n    }\n  }\n})\n","import { Extension } from '@tiptap/core';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\nimport { yUndoPluginKey, undo, redo, yUndoPlugin, ySyncPlugin, yXmlFragmentToProsemirrorJSON, ySyncPluginKey } from 'y-prosemirror';\n\n/**\n * This extension allows you to collaborate with others in real-time.\n * @see https://tiptap.dev/api/extensions/collaboration\n */\nconst Collaboration = Extension.create({\n    name: 'collaboration',\n    priority: 1000,\n    addOptions() {\n        return {\n            document: null,\n            field: 'default',\n            fragment: null,\n        };\n    },\n    addStorage() {\n        return {\n            isDisabled: false,\n        };\n    },\n    onCreate() {\n        if (this.editor.extensionManager.extensions.find(extension => extension.name === 'history')) {\n            console.warn('[tiptap warn]: \"@tiptap/extension-collaboration\" comes with its own history support and is not compatible with \"@tiptap/extension-history\".');\n        }\n    },\n    addCommands() {\n        return {\n            undo: () => ({ tr, state, dispatch }) => {\n                tr.setMeta('preventDispatch', true);\n                const undoManager = yUndoPluginKey.getState(state).undoManager;\n                if (undoManager.undoStack.length === 0) {\n                    return false;\n                }\n                if (!dispatch) {\n                    return true;\n                }\n                return undo(state);\n            },\n            redo: () => ({ tr, state, dispatch }) => {\n                tr.setMeta('preventDispatch', true);\n                const undoManager = yUndoPluginKey.getState(state).undoManager;\n                if (undoManager.redoStack.length === 0) {\n                    return false;\n                }\n                if (!dispatch) {\n                    return true;\n                }\n                return redo(state);\n            },\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            'Mod-z': () => this.editor.commands.undo(),\n            'Mod-y': () => this.editor.commands.redo(),\n            'Shift-Mod-z': () => this.editor.commands.redo(),\n        };\n    },\n    addProseMirrorPlugins() {\n        var _a;\n        const fragment = this.options.fragment\n            ? this.options.fragment\n            : this.options.document.getXmlFragment(this.options.field);\n        // Quick fix until there is an official implementation (thanks to @hamflx).\n        // See https://github.com/yjs/y-prosemirror/issues/114 and https://github.com/yjs/y-prosemirror/issues/102\n        const yUndoPluginInstance = yUndoPlugin(this.options.yUndoOptions);\n        const originalUndoPluginView = yUndoPluginInstance.spec.view;\n        yUndoPluginInstance.spec.view = (view) => {\n            const { undoManager } = yUndoPluginKey.getState(view.state);\n            if (undoManager.restore) {\n                undoManager.restore();\n                undoManager.restore = () => {\n                    // noop\n                };\n            }\n            const viewRet = originalUndoPluginView ? originalUndoPluginView(view) : undefined;\n            return {\n                destroy: () => {\n                    const hasUndoManSelf = undoManager.trackedOrigins.has(undoManager);\n                    // eslint-disable-next-line no-underscore-dangle\n                    const observers = undoManager._observers;\n                    undoManager.restore = () => {\n                        if (hasUndoManSelf) {\n                            undoManager.trackedOrigins.add(undoManager);\n                        }\n                        undoManager.doc.on('afterTransaction', undoManager.afterTransactionHandler);\n                        // eslint-disable-next-line no-underscore-dangle\n                        undoManager._observers = observers;\n                    };\n                    if (viewRet === null || viewRet === void 0 ? void 0 : viewRet.destroy) {\n                        viewRet.destroy();\n                    }\n                },\n            };\n        };\n        const ySyncPluginOptions = {\n            ...this.options.ySyncOptions,\n            onFirstRender: this.options.onFirstRender,\n        };\n        const ySyncPluginInstance = ySyncPlugin(fragment, ySyncPluginOptions);\n        if (this.editor.options.enableContentCheck) {\n            (_a = fragment.doc) === null || _a === void 0 ? void 0 : _a.on('beforeTransaction', () => {\n                try {\n                    const jsonContent = (yXmlFragmentToProsemirrorJSON(fragment));\n                    if (jsonContent.content.length === 0) {\n                        return;\n                    }\n                    this.editor.schema.nodeFromJSON(jsonContent).check();\n                }\n                catch (error) {\n                    this.editor.emit('contentError', {\n                        error: error,\n                        editor: this.editor,\n                        disableCollaboration: () => {\n                            var _a;\n                            (_a = fragment.doc) === null || _a === void 0 ? void 0 : _a.destroy();\n                            this.storage.isDisabled = true;\n                        },\n                    });\n                    // If the content is invalid, return false to prevent the transaction from being applied\n                    return false;\n                }\n            });\n        }\n        return [\n            ySyncPluginInstance,\n            yUndoPluginInstance,\n            // Only add the filterInvalidContent plugin if content checking is enabled\n            this.editor.options.enableContentCheck\n                && new Plugin({\n                    key: new PluginKey('filterInvalidContent'),\n                    filterTransaction: () => {\n                        var _a;\n                        // When collaboration is disabled, prevent any sync transactions from being applied\n                        if (this.storage.isDisabled) {\n                            // Destroy the Yjs document to prevent any further sync transactions\n                            (_a = fragment.doc) === null || _a === void 0 ? void 0 : _a.destroy();\n                            return true;\n                        }\n                        return true;\n                    },\n                }),\n        ].filter(Boolean);\n    },\n});\n\n/**\n * Checks if a transaction was originated from a Yjs change.\n * @param {Transaction} transaction - The transaction to check.\n * @returns {boolean} - True if the transaction was originated from a Yjs change, false otherwise.\n * @example\n * const transaction = new Transaction(doc)\n * const isOrigin = isChangeOrigin(transaction) // returns false\n */\nfunction isChangeOrigin(transaction) {\n    return !!transaction.getMeta(ySyncPluginKey);\n}\n\nexport { Collaboration, Collaboration as default, isChangeOrigin };\n//# sourceMappingURL=index.js.map\n","import '../assets/NcDialog-X7BRqUGJ.css';\nimport { useElementSize } from \"@vueuse/core\";\nimport { defineComponent, ref, computed } from \"vue\";\nimport NcModal from \"../Components/NcModal.mjs\";\nimport { N as NcDialogButton } from \"./NcDialogButton-Di9tU3e_.mjs\";\nimport { G as GenRandomId } from \"./GenRandomId-CMooMQt0.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main = defineComponent({\n  name: \"NcDialog\",\n  components: {\n    NcDialogButton,\n    NcModal\n  },\n  props: {\n    /** Name of the dialog (the heading) */\n    name: {\n      type: String,\n      required: true\n    },\n    /** Text of the dialog */\n    message: {\n      type: String,\n      default: \"\"\n    },\n    /** Additional elements to add to the focus trap */\n    additionalTrapElements: {\n      type: Array,\n      validator: (arr) => {\n        return Array.isArray(arr) && arr.every(\n          (element) => typeof element === \"string\" || element instanceof HTMLElement\n        );\n      },\n      default: () => []\n    },\n    /**\n     * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n     * @default 'body'\n     */\n    container: {\n      type: String,\n      required: false,\n      default: \"body\"\n    },\n    /**\n     * Whether the dialog should be shown\n     * @default true\n     */\n    open: {\n      type: Boolean,\n      default: true\n    },\n    /**\n     * Size of the underlying NcModal\n     * @default 'small'\n     * @type {'small'|'normal'|'large'|'full'}\n     */\n    size: {\n      type: String,\n      required: false,\n      default: \"small\",\n      validator: (value) => typeof value === \"string\" && [\"small\", \"normal\", \"large\", \"full\"].includes(value)\n    },\n    /**\n     * Buttons to display\n     * @default []\n     */\n    buttons: {\n      type: Array,\n      required: false,\n      default: () => [],\n      validator: (value) => Array.isArray(value) && value.every((element) => typeof element === \"object\")\n    },\n    /**\n     * Do not show the close button for the dialog.\n     * @default false\n     */\n    noClose: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Set to false to no show a close button on the dialog\n     * @deprecated - Use `noClose` instead. Will be removed in v9.\n     * @default true\n     */\n    canClose: {\n      type: Boolean,\n      default: true\n    },\n    /**\n     * Close the dialog if the user clicked outside of the dialog\n     * Only relevant if `canClose` is set to true.\n     */\n    closeOnClickOutside: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Make the dialog wrapper a HTML form element.\n     * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n     * Please note that when using the property the `navigation` should not be used.\n     */\n    isForm: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Declare if hiding the modal should be animated\n     * @default false\n     */\n    outTransition: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Optionally pass additional classes which will be set on the navigation for custom styling\n     * @default ''\n     * @example\n     * ```html\n     * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n     * <!-- ... -->\n     * <style lang=\"scss\">\n     * :deep(.mydialog-navigation) {\n     *     flex-direction: row-reverse;\n     * }\n     * </style>\n     * ```\n     */\n    navigationClasses: {\n      type: [String, Array, Object],\n      required: false,\n      default: \"\"\n    },\n    /**\n     * aria-label for the dialog navigation.\n     * Use it when you want to provide a more meaningful label than the dialog name.\n     *\n     * By default, navigation is labeled by the dialog name.\n     */\n    navigationAriaLabel: {\n      type: String,\n      required: false,\n      default: \"\"\n    },\n    /**\n     * aria-labelledby for the dialog navigation.\n     * Use it when you have an implicit navigation label (e.g. a heading).\n     *\n     * By default, navigation is labeled by the dialog name.\n     */\n    navigationAriaLabelledby: {\n      type: String,\n      required: false,\n      default: \"\"\n    },\n    /**\n     * Optionally pass additional classes which will be set on the content wrapper for custom styling\n     * @default ''\n     */\n    contentClasses: {\n      type: [String, Array, Object],\n      required: false,\n      default: \"\"\n    },\n    /**\n     * Optionally pass additional classes which will be set on the dialog itself\n     * (the default `class` attribute will be set on the modal wrapper)\n     * @default ''\n     */\n    dialogClasses: {\n      type: [String, Array, Object],\n      required: false,\n      default: \"\"\n    }\n  },\n  emits: [\"closing\", \"update:open\", \"submit\"],\n  setup(props, { emit, slots }) {\n    const wrapper = ref();\n    const { width: dialogWidth } = useElementSize(wrapper, { width: 900 });\n    const isNavigationCollapsed = computed(() => dialogWidth.value < 876);\n    const hasNavigation = computed(() => slots?.navigation !== void 0);\n    const navigationId = GenRandomId();\n    const navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || void 0);\n    const navigationAriaLabelledbyAttr = computed(() => {\n      if (props.navigationAriaLabel) {\n        return void 0;\n      }\n      return props.navigationAriaLabelledby || navigationId;\n    });\n    const dialogElement = ref();\n    const dialogTagName = computed(() => props.isForm && !hasNavigation.value ? \"form\" : \"div\");\n    const dialogListeners = computed(\n      () => dialogTagName.value === \"form\" ? {\n        /**\n         * @param {SubmitEvent} event Form submit event\n         */\n        submit(event) {\n          event.preventDefault();\n          emit(\"submit\", event);\n        },\n        /**\n         * @param {Event} event Form submit event\n         */\n        reset(event) {\n          event.preventDefault();\n          emit(\"reset\", event);\n        }\n      } : {}\n    );\n    const showModal = ref(true);\n    function handleButtonClose(button, result) {\n      if ((button.type === \"submit\" || button.nativeType === \"submit\") && dialogTagName.value === \"form\" && !dialogElement.value.reportValidity()) {\n        return;\n      }\n      handleClosing(result);\n      window.setTimeout(() => handleClosed(), 300);\n    }\n    const handleClosing = (result) => {\n      showModal.value = false;\n      emit(\"closing\", result);\n    };\n    const handleClosed = () => {\n      showModal.value = true;\n      emit(\"update:open\", false);\n    };\n    const modalProps = computed(() => ({\n      noClose: props.noClose || !props.canClose,\n      container: props.container === void 0 ? \"body\" : props.container,\n      // we do not pass the name as we already have the name as the headline\n      // name: props.name,\n      // But we need to set the correct label id so the dialog is labelled\n      labelId: navigationId,\n      size: props.size,\n      show: props.open && showModal.value,\n      outTransition: props.outTransition,\n      closeOnClickOutside: props.closeOnClickOutside,\n      additionalTrapElements: props.additionalTrapElements\n    }));\n    return {\n      dialogElement,\n      dialogListeners,\n      dialogTagName,\n      handleButtonClose,\n      handleClosing,\n      handleClosed,\n      hasNavigation,\n      navigationId,\n      navigationAriaLabelAttr,\n      navigationAriaLabelledbyAttr,\n      isNavigationCollapsed,\n      modalProps,\n      wrapper\n    };\n  }\n});\nvar _sfc_render = function render() {\n  var _vm = this, _c = _vm._self._c;\n  _vm._self._setupProxy;\n  return _vm.open ? _c(\"NcModal\", _vm._b({ staticClass: \"dialog__modal\", attrs: { \"enable-slideshow\": false, \"enable-swipe\": false }, on: { \"close\": _vm.handleClosed, \"update:show\": function($event) {\n    return _vm.handleClosing();\n  } } }, \"NcModal\", _vm.modalProps, false), [_c(\"h2\", { staticClass: \"dialog__name\", attrs: { \"id\": _vm.navigationId }, domProps: { \"textContent\": _vm._s(_vm.name) } }), _c(_vm.dialogTagName, _vm._g({ ref: \"dialogElement\", tag: \"component\", staticClass: \"dialog\", class: _vm.dialogClasses }, _vm.dialogListeners), [_c(\"div\", { ref: \"wrapper\", class: [\"dialog__wrapper\", { \"dialog__wrapper--collapsed\": _vm.isNavigationCollapsed }] }, [_vm.hasNavigation ? _c(\"nav\", { staticClass: \"dialog__navigation\", class: _vm.navigationClasses, attrs: { \"aria-label\": _vm.navigationAriaLabelAttr, \"aria-labelledby\": _vm.navigationAriaLabelledbyAttr } }, [_vm._t(\"navigation\", null, { \"isCollapsed\": _vm.isNavigationCollapsed })], 2) : _vm._e(), _c(\"div\", { staticClass: \"dialog__content\", class: _vm.contentClasses }, [_vm._t(\"default\", function() {\n    return [_c(\"p\", { staticClass: \"dialog__text\" }, [_vm._v(\" \" + _vm._s(_vm.message) + \" \")])];\n  })], 2)]), _c(\"div\", { staticClass: \"dialog__actions\" }, [_vm._t(\"actions\", function() {\n    return _vm._l(_vm.buttons, function(button, idx) {\n      return _c(\"NcDialogButton\", _vm._b({ key: idx, on: { \"click\": (_, result) => _vm.handleButtonClose(button, result) } }, \"NcDialogButton\", button, false));\n    });\n  })], 2)])], 1) : _vm._e();\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n  _sfc_main,\n  _sfc_render,\n  _sfc_staticRenderFns,\n  false,\n  null,\n  \"49ff4e77\"\n);\nconst NcDialog = __component__.exports;\nexport {\n  NcDialog as N\n};\n//# sourceMappingURL=NcDialog-C1b3UtA7.mjs.map\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<NextcloudVueNcActionButton\n\t\tclass=\"entry-single-action entry-action entry-action-item\"\n\t\t:title=\"listItemTooltip || undefined\"\n\t\t:class=\"state.class\"\n\t\t:disabled=\"state.disabled\"\n\t\t:aria-keyshortcuts=\"keyshortcuts || undefined\"\n\t\t:data-text-action-entry=\"actionEntry.key\"\n\t\t:type=\"state.type\"\n\t\t:model-value=\"state.type !== 'button' ? state.active : undefined\"\n\t\tclose-after-click\n\t\tv-on=\"$listeners\"\n\t\t@click=\"runAction\">\n\t\t<template #icon>\n\t\t\t<component :is=\"icon\" />\n\t\t</template>\n\t\t{{ label }}\n\t</NextcloudVueNcActionButton>\n</template>\n\n<script>\nimport NextcloudVueNcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport { BaseActionEntry } from './BaseActionEntry.js'\n\nexport default {\n\t// This component is used as a direct child of NcActions.\n\t// Even if it actually renders NcActionButton, NcActions cannot see it due to rendering limitations in Vue.\n\t// Though it works in general, NcActions doesn't handle it correctly. See NcActions docs for details.\n\t// Hotfix - rename the component to NcActionButton because it represents and renders it.\n\t// eslint-disable-next-line vue/match-component-file-name\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tNextcloudVueNcActionButton,\n\t},\n\n\textends: BaseActionEntry,\n\n\tmounted() {\n\t\tthis.editor?.on('transaction', () => this.updateState())\n\t},\n\n\tmethods: {\n\t\trunAction() {\n\t\t\tconst { actionEntry } = this\n\n\t\t\tif (actionEntry.click) {\n\t\t\t\tactionEntry.click(this)\n\t\t\t} else {\n\t\t\t\t// Some actions run themselves.\n\t\t\t\t// others still need to have .run() called upon them.\n\t\t\t\tactionEntry.action(this.editor?.chain().focus(), this.editor)?.run()\n\t\t\t}\n\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$emit('trigged', { ...actionEntry })\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcActions\n\t\t:title=\"tooltip\"\n\t\tclass=\"entry-list-action entry-action\"\n\t\tv-bind=\"state\"\n\t\t:container=\"menuIDSelector\"\n\t\t:aria-label=\"labelWithSelected\"\n\t\t:type=\"state.active ? 'primary' : 'tertiary'\"\n\t\t:force-menu=\"true\"\n\t\t:data-text-action-entry=\"actionEntry.key\"\n\t\t:data-text-action-active=\"activeKey\"\n\t\t:disabled=\"!isEnabled\"\n\t\t@update:open=\"onOpenChange\">\n\t\t<template #icon>\n\t\t\t<component :is=\"icon\" :key=\"iconKey\" />\n\t\t</template>\n\t\t<template v-for=\"child in children\">\n\t\t\t<NcActionSeparator\n\t\t\t\tv-if=\"child.isSeparator\"\n\t\t\t\t:key=\"`child-${child.key}`\" />\n\t\t\t<ActionListItem\n\t\t\t\tv-else\n\t\t\t\t:key=\"`child-${child.key}`\"\n\t\t\t\t:active=\"currentChild?.key === child.key\"\n\t\t\t\tis-item\n\t\t\t\t:action-entry=\"child\"\n\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t@trigged=\"onTrigger\" />\n\t\t</template>\n\t\t<slot v-bind=\"{ visible }\" name=\"lastAction\" />\n\t</NcActions>\n</template>\n\n<script>\nimport { t } from '@nextcloud/l10n'\nimport NcActions from '@nextcloud/vue/components/NcActions'\nimport NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'\nimport debounce from 'debounce'\nimport { useOutlineStateMixin } from '../Editor/Wrapper.provider.js'\nimport ActionListItem from './ActionListItem.vue'\nimport { BaseActionEntry } from './BaseActionEntry.js'\nimport { useMenuIDMixin } from './MenuBar.provider.js'\nimport { getActionState, getIsActive } from './utils.js'\n\nexport default {\n\tname: 'ActionList',\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionSeparator,\n\t\tActionListItem,\n\t},\n\textends: BaseActionEntry,\n\tmixins: [useOutlineStateMixin, useMenuIDMixin],\n\tprops: {\n\t\tforceEnabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata: () => ({\n\t\tvisible: false,\n\t\thasEnabledChild: true,\n\t}),\n\tcomputed: {\n\t\tcurrentChild() {\n\t\t\tconst {\n\t\t\t\tstate,\n\t\t\t\teditor,\n\t\t\t\tactionEntry: { children },\n\t\t\t} = this\n\n\t\t\tif (!state.active) {\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t\treturn children.find((child) => {\n\t\t\t\treturn getIsActive(child, editor)\n\t\t\t})\n\t\t},\n\t\ticon() {\n\t\t\tif (this.currentChild) {\n\t\t\t\treturn this.currentChild.icon\n\t\t\t}\n\n\t\t\treturn this.actionEntry.icon\n\t\t},\n\t\ticonKey() {\n\t\t\treturn `${this.actionEntry.key}/${this.activeKey}`\n\t\t},\n\t\tactiveKey() {\n\t\t\treturn this.currentChild?.key\n\t\t},\n\t\tchildren() {\n\t\t\treturn this.actionEntry.children.filter(({ visible }) => {\n\t\t\t\tif (visible === undefined) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\treturn typeof visible === 'function' ? visible(this) : visible\n\t\t\t})\n\t\t},\n\t\tlabelWithSelected() {\n\t\t\tif (this.currentChild) {\n\t\t\t\t// TRANSLATORS: examples - Headings, \"Heading 1\" is selected - Blocks, \"Info callout\" is selected\n\t\t\t\treturn t(\n\t\t\t\t\t'text',\n\t\t\t\t\t'{menuItemName}, \"{selectedSubMenuItemName}\" is selected',\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuItemName: this.actionEntry.label,\n\t\t\t\t\t\tselectedSubMenuItemName: this.currentChild.label,\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t}\n\n\t\t\treturn this.actionEntry.label\n\t\t},\n\t\tisEnabled() {\n\t\t\treturn this.forceEnabled || this.hasEnabledChild\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.$_updateState = debounce(this.checkStateOfChildren.bind(this), 50)\n\t\tthis.editor?.on('update', this.$_updateState)\n\t\tthis.editor?.on('selectionUpdate', this.$_updateState)\n\t},\n\tbeforeDestroy() {\n\t\tthis.editor?.off('update', this.$_updateState)\n\t\tthis.editor?.off('selectionUpdate', this.$_updateState)\n\t},\n\tmethods: {\n\t\tonOpenChange(val) {\n\t\t\tthis.visible = val\n\t\t},\n\t\trunAction() {\n\t\t\t// nothing todo\n\t\t},\n\t\tonTrigger(entry) {\n\t\t\tif (entry?.click) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.editor?.chain().focus().run()\n\t\t\tthis.$emit('trigged', entry)\n\t\t},\n\t\tcheckStateOfChildren() {\n\t\t\tthis.hasEnabledChild = this.children.some((child) =>\n\t\t\t\tthis.isChildEnabled(child),\n\t\t\t)\n\t\t},\n\t\tisChildEnabled(child) {\n\t\t\treturn !child.isSeparator && !getActionState(child, this.editor).disabled\n\t\t},\n\t},\n}\n</script>\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcButton\n\t\tclass=\"entry-single-action entry-action\"\n\t\t:class=\"state.class\"\n\t\t:disabled=\"state.disabled\"\n\t\t:aria-keyshortcuts=\"keyshortcuts || undefined\"\n\t\t:data-text-action-entry=\"actionEntry.key\"\n\t\t:aria-label=\"label\"\n\t\t:title=\"tooltip\"\n\t\ttype=\"tertiary\"\n\t\t:pressed=\"state.type !== 'button' ? state.active : undefined\"\n\t\tv-on=\"$listeners\"\n\t\t@click=\"runAction\">\n\t\t<template #icon>\n\t\t\t<component :is=\"icon\" />\n\t\t</template>\n\n\t\t<template v-if=\"actionEntry.forceLabel\" #default>\n\t\t\t{{ label }}\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport { BaseActionEntry } from './BaseActionEntry.js'\n\nexport default {\n\tname: 'ActionSingle',\n\n\tcomponents: {\n\t\tNcButton,\n\t},\n\n\textends: BaseActionEntry,\n\n\tprops: {\n\t\tisItem: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.editor?.on('transaction', () => this.updateState())\n\t},\n\n\tmethods: {\n\t\trunAction() {\n\t\t\tconst { actionEntry } = this\n\n\t\t\tif (actionEntry.click) {\n\t\t\t\tactionEntry.click(this)\n\t\t\t} else {\n\t\t\t\t// Some actions run themselves.\n\t\t\t\t// others still need to have .run() called upon them.\n\t\t\t\tactionEntry.action(this.editor?.chain().focus(), this.editor)?.run()\n\t\t\t}\n\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$emit('trigged', { ...actionEntry })\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tdata() {\n\t\treturn {\n\t\t\t/** Current menu entry that has focus */\n\t\t\tactiveMenuEntry: 0,\n\t\t\tentries: [],\n\t\t}\n\t},\n\tcomputed: {\n\t\tvisibleEntries() {\n\t\t\treturn this.entries\n\t\t},\n\t},\n\twatch: {\n\t\tvisibleEntries() {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tif (\n\t\t\t\t\tthis.activeMenuEntry > this.visibleEntries.length\n\t\t\t\t\t|| this.visibleEntries[this.activeMenuEntry]?.disabled\n\t\t\t\t) {\n\t\t\t\t\tthis.setNextMenuEntry()\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Update the disabled state of an menu entry\n\t\t * @param {string} menuKey The key of the menu entry that changed\n\t\t * @param {boolean} state The new disabled state\n\t\t */\n\t\tdisableMenuEntry(menuKey, state) {\n\t\t\tconst index = this.visibleEntries.findIndex(({ key }) => key === menuKey)\n\t\t\tthis.visibleEntries[index].disabled = state\n\t\t\tif (state === false && this.activeMenuEntry === index) {\n\t\t\t\tthis.$nextTick(() => this.setNextMenuEntry())\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Set the active menu entry to the next one (or reset to first)\n\t\t */\n\t\tsetNextMenuEntry() {\n\t\t\t// refs is not reactive so we must check this every time\n\t\t\tconst modulo =\n\t\t\t\tthis.visibleEntries.length + (this.$refs.remainingEntries ? 1 : 0)\n\n\t\t\tdo {\n\t\t\t\tthis.activeMenuEntry = (this.activeMenuEntry + 1) % modulo\n\t\t\t} while (\n\t\t\t\tthis.activeMenuEntry < this.visibleEntries.length\n\t\t\t\t&& this.visibleEntries[this.activeMenuEntry].disabled\n\t\t\t)\n\t\t},\n\t\t/**\n\t\t * Set the active menu entry to the previous one (or reset to last entry (remaining actions))\n\t\t */\n\t\tsetPreviousMenuEntry() {\n\t\t\t// refs is not reactive so we must check this every time\n\t\t\tconst modulo =\n\t\t\t\tthis.visibleEntries.length + (this.$refs.remainingEntries ? 1 : 0)\n\n\t\t\tdo {\n\t\t\t\tconst index = this.activeMenuEntry - 1\n\t\t\t\tthis.activeMenuEntry = ((index % modulo) + modulo) % modulo // needed as JS does not work with negative modulos\n\t\t\t} while (\n\t\t\t\tthis.activeMenuEntry < this.visibleEntries.length\n\t\t\t\t&& this.visibleEntries[this.activeMenuEntry].disabled\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Handle navigation in toolbar\n\t\t * @param {KeyboardEvent} event The keyup event\n\t\t */\n\t\thandleToolbarNavigation(event) {\n\t\t\tif (event.key === 'ArrowRight') {\n\t\t\t\tthis.setNextMenuEntry()\n\t\t\t} else if (event.key === 'ArrowLeft') {\n\t\t\t\tthis.setPreviousMenuEntry()\n\t\t\t}\n\n\t\t\tif (this.activeMenuEntry === this.visibleEntries.length) {\n\t\t\t\tthis.$refs.remainingEntries?.focusButton?.()\n\t\t\t} else {\n\t\t\t\t// The ref is in no order (ordered by the time they needed to mount), so we need to order them like they are shown on the menu\n\t\t\t\tconst entries = [...this.$refs.menuEntries].sort(\n\t\t\t\t\t(a, b) =>\n\t\t\t\t\t\tthis.visibleEntries.findIndex(\n\t\t\t\t\t\t\t({ key }) => key === a.$vnode.data.key,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t- this.visibleEntries.findIndex(\n\t\t\t\t\t\t\t({ key }) => key === b.$vnode.data.key,\n\t\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t\tentries[this.activeMenuEntry].focusButton()\n\t\t\t}\n\t\t},\n\t},\n})\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\tdata-text-el=\"readonly-bar\"\n\t\tclass=\"text-readonly-bar\"\n\t\t:class=\"{\n\t\t\t'text-readonly-bar--ready': isReady,\n\t\t\t'text-readonly-bar--is-workspace': isRichWorkspace,\n\t\t\t'text-readonly-bar--hide': isHidden,\n\t\t\t'is-mobile': $isMobile,\n\t\t}\">\n\t\t<div\n\t\t\tref=\"menubar\"\n\t\t\trole=\"toolbar\"\n\t\t\tclass=\"text-readonly-bar__entries\"\n\t\t\t:aria-label=\"t('text', 'Editor actions')\">\n\t\t\t<component\n\t\t\t\t:is=\"\n\t\t\t\t\tactionEntry.component\n\t\t\t\t\t\t? actionEntry.component\n\t\t\t\t\t\t: actionEntry.children\n\t\t\t\t\t\t\t? 'ActionList'\n\t\t\t\t\t\t\t: 'ActionSingle'\n\t\t\t\t\"\n\t\t\t\tv-for=\"(actionEntry, index) in visibleEntries\"\n\t\t\t\tref=\"menuEntries\"\n\t\t\t\t:key=\"actionEntry.key\"\n\t\t\t\t:action-entry=\"actionEntry\"\n\t\t\t\t:can-be-focussed=\"activeMenuEntry === index\"\n\t\t\t\t@disabled=\"disableMenuEntry(actionEntry.key, $event)\" />\n\t\t</div>\n\t\t<div class=\"text-readonly-bar__slot\">\n\t\t\t<slot />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport { OutlineEntries, ReadOnlyEditEntries } from './entries.js'\n\nimport { t } from '@nextcloud/l10n'\nimport { useEditorFlags } from '../../composables/useEditorFlags.ts'\nimport { useIsMobileMixin } from '../Editor.provider.ts'\nimport ActionList from './ActionList.vue'\nimport ActionSingle from './ActionSingle.vue'\nimport ToolBarLogic from './ToolBarLogic.js'\n\nexport default defineComponent({\n\tname: 'ReadonlyBar',\n\n\tcomponents: {\n\t\tActionList,\n\t\tActionSingle,\n\t},\n\n\textends: ToolBarLogic,\n\n\tmixins: [useIsMobileMixin],\n\n\tprops: {\n\t\tisHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\topenReadOnly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['update:loaded'],\n\n\tsetup() {\n\t\tconst { isRichWorkspace } = useEditorFlags()\n\t\treturn {\n\t\t\tisRichWorkspace,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tentries: this.openReadOnly\n\t\t\t\t? [...ReadOnlyEditEntries, ...OutlineEntries]\n\t\t\t\t: [...OutlineEntries],\n\t\t\tisReady: false,\n\t\t}\n\t},\n\n\tmounted() {\n\t\tthis.$nextTick(() => {\n\t\t\tthis.isReady = true\n\t\t\tthis.$emit('update:loaded', true)\n\t\t})\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n})\n</script>\n\n<style scoped lang=\"scss\">\n.text-readonly-bar {\n\t--background-blur: blur(10px);\n\tposition: sticky;\n\ttop: 0;\n\tbottom: var(--default-grid-baseline);\n\twidth: 100%;\n\tz-index: 10021; // above modal-header so menubar is always on top\n\tbackground-color: var(--color-main-background-translucent);\n\tbackdrop-filter: var(--background-blur);\n\tmax-height: var(\n\t\t--default-clickable-area\n\t); // important for mobile so that the buttons are always inside the container\n\tborder-bottom: 1px solid var(--color-border);\n\tpadding-block: var(--default-grid-baseline);\n\n\tvisibility: hidden;\n\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\n\t&.is-mobile {\n\t\tborder-top: 1px solid var(--color-border);\n\t\tborder-bottom: unset;\n\t}\n\n\t&.text-readonly-bar--ready:not(.text-readonly-bar--hide) {\n\t\tvisibility: visible;\n\t\tanimation-name: fadeInDown;\n\t\tanimation-duration: 0.3s;\n\t}\n\n\t&.text-readonly-bar--hide {\n\t\topacity: 0;\n\t\ttransition:\n\t\t\tvisibility 0.2s 0.4s,\n\t\t\topacity 0.2s 0.4s;\n\t}\n\t.text-readonly-bar__entries {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tmargin-left: max(0px, calc((100% - var(--text-editor-max-width)) / 2));\n\t}\n\n\t.text-readonly-bar__slot {\n\t\tjustify-content: flex-end;\n\t\tdisplay: flex;\n\t\tmin-width: max(0px, min(100px, (100% - var(--text-editor-max-width)) / 2));\n\t}\n\n\t&.text-readonly-bar--is-workspace {\n\t\t.text-readonly-bar__entries {\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n\n\t@media (max-width: 660px) {\n\t\t.text-readonly-bar__entries {\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/*\n * Handle the state of the full editor width toggle.\n *\n * If the css variable `--text-editor-max-width` is already set\n * for `document.body` it will be left as is and\n * no toggle will be shown in the text ui.\n * This way the collectives app handles it's per document width setting.\n *\n * Otherwise this composable handles the `is_full_width_editor` initial state.\n * It sets the css variable on the document accordingly.\n * The state is stored in a singleton to preserve and reuse it on the next mount.\n * It is persisted in the user settings across page reloads.\n *\n */\n\nimport axios from '@nextcloud/axios'\nimport { emit, subscribe } from '@nextcloud/event-bus'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateUrl } from '@nextcloud/router'\nimport {\n\tcomputed,\n\tinject,\n\tprovide,\n\treadonly,\n\tref,\n\twatch,\n\ttype InjectionKey,\n\ttype Ref,\n} from 'vue'\n\n// Keep the current value around when leaving the editor and reopening\nlet valueSingleton = loadState('text', 'is_full_width_editor', false)\n\n// This is either the reactive value of the editor width toggle\n// or null if the width has already been set outside of text.\nexport const editorWidthKey = Symbol('text:editor:width') as InjectionKey<\n\tReadonly<Ref<boolean> | null>\n>\n\n/**\n * Detect if other apps (such as collectives) already configured texts max width.\n *\n * Check if document.body has a css variable `--text-editor-max-width` (either set or inherited).\n * Get the value set by text in the documentElement style.\n * If both values are set and match we assume text is handling the width.\n */\nfunction maxWidthSetOutsideOfText() {\n\tconst alreadySet = getComputedStyle(document.body).getPropertyValue(\n\t\t'--text-editor-max-width',\n\t)\n\tconst setByText = document.documentElement.style.getPropertyValue(\n\t\t'--text-editor-max-width',\n\t)\n\treturn Boolean(alreadySet) && alreadySet !== setByText\n}\n\nexport const provideEditorWidth = () => {\n\t// keep style that is already set - for example by collectives\n\tif (maxWidthSetOutsideOfText()) {\n\t\tprovide(editorWidthKey, null)\n\t\treturn { applyEditorWidth: () => {} }\n\t}\n\tconst isFullWidth = ref(valueSingleton)\n\tprovide(editorWidthKey, readonly(isFullWidth))\n\tsubscribe('text:editor:full-width', ({ value }) => {\n\t\tvalueSingleton = value\n\t\tisFullWidth.value = value\n\t})\n\tconst width = computed(() =>\n\t\tisFullWidth.value\n\t\t\t? '100%'\n\t\t\t: 'calc(80ch + 2 * 15 * var(--default-grid-baseline))',\n\t)\n\tconst applyEditorWidth = () => {\n\t\tdocument.documentElement.style.setProperty(\n\t\t\t'--text-editor-max-width',\n\t\t\twidth.value,\n\t\t)\n\t}\n\twatch(width, applyEditorWidth)\n\treturn { applyEditorWidth }\n}\n\nexport const useEditorWidth = () => {\n\t// This will be null if the width is already configured outside of text.\n\tconst isFullWidth = inject(editorWidthKey)\n\tif (isFullWidth === null) {\n\t\treturn { canToggleWidth: false }\n\t}\n\tconst setFullWidth = (checked: boolean) => {\n\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\tkey: 'is_full_width_editor',\n\t\t\tvalue: checked ? '1' : '0',\n\t\t})\n\t\temit('text:editor:full-width', { value: checked })\n\t}\n\treturn { canToggleWidth: true, isFullWidth, setFullWidth }\n}\n","import '../assets/NcActionCheckbox-BlyPt7DF.css';\nimport { u as useModelMigration } from \"./useModelMigration-EhAWvqDD.mjs\";\nimport { A as ActionGlobalMixin } from \"./actionGlobal-DqVa7c7G.mjs\";\nimport { G as GenRandomId } from \"./GenRandomId-CMooMQt0.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nconst _sfc_main = {\n  name: \"NcActionCheckbox\",\n  mixins: [ActionGlobalMixin],\n  inject: {\n    isInSemanticMenu: {\n      from: \"NcActions:isSemanticMenu\",\n      default: false\n    }\n  },\n  model: {\n    prop: \"modelValue\",\n    event: \"update:modelValue\"\n  },\n  props: {\n    /**\n     * id attribute of the checkbox element\n     */\n    id: {\n      type: String,\n      default: () => \"action-\" + GenRandomId(),\n      validator: (id) => id.trim() !== \"\"\n    },\n    /**\n     * Removed in v9 - use `modelValue` (`v-model`) instead\n     * @deprecated\n     */\n    checked: {\n      type: Boolean,\n      default: void 0\n    },\n    /**\n     * checked state of the the checkbox element\n     */\n    modelValue: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * value of the checkbox input\n     */\n    value: {\n      type: [String, Number],\n      default: \"\"\n    },\n    /**\n     * disabled state of the checkbox element\n     */\n    disabled: {\n      type: Boolean,\n      default: false\n    }\n  },\n  emits: [\n    \"change\",\n    \"check\",\n    \"uncheck\",\n    /**\n     * Removed in v9 - use `update:modelValue` (`v-model`) instead\n     * @deprecated\n     */\n    \"update:checked\",\n    /**\n     * Emitted when the checkbox state is changed\n     * @type {boolean}\n     */\n    \"update:modelValue\",\n    /** Same as update:modelValue for Vue 2 compatibility */\n    \"update:model-value\"\n  ],\n  setup() {\n    const model = useModelMigration(\"checked\", \"update:checked\");\n    return {\n      model\n    };\n  },\n  computed: {\n    /**\n     * determines if the action is focusable\n     *\n     * @return {boolean} is the action focusable ?\n     */\n    isFocusable() {\n      return !this.disabled;\n    },\n    /**\n     * aria-checked attribute for role=\"menuitemcheckbox\"\n     *\n     * @return {'true'|'false'|undefined} aria-checked value if needed\n     */\n    ariaChecked() {\n      if (this.isInSemanticMenu) {\n        return this.model ? \"true\" : \"false\";\n      }\n      return void 0;\n    }\n  },\n  methods: {\n    checkInput(event) {\n      this.$refs.label.click();\n    },\n    onChange(event) {\n      this.model = this.$refs.checkbox.checked;\n      this.$emit(\"change\", event);\n      if (this.$refs.checkbox.checked) {\n        this.$emit(\"check\");\n      } else {\n        this.$emit(\"uncheck\");\n      }\n    }\n  }\n};\nvar _sfc_render = function render() {\n  var _vm = this, _c = _vm._self._c;\n  return _c(\"li\", { staticClass: \"action\", class: { \"action--disabled\": _vm.disabled }, attrs: { \"role\": _vm.isInSemanticMenu && \"presentation\" } }, [_c(\"span\", { staticClass: \"action-checkbox\", attrs: { \"role\": _vm.isInSemanticMenu && \"menuitemcheckbox\", \"aria-checked\": _vm.ariaChecked } }, [_c(\"input\", { ref: \"checkbox\", staticClass: \"checkbox action-checkbox__checkbox\", class: { focusable: _vm.isFocusable }, attrs: { \"id\": _vm.id, \"disabled\": _vm.disabled, \"type\": \"checkbox\" }, domProps: { \"checked\": _vm.model, \"value\": _vm.value }, on: { \"keydown\": function($event) {\n    if (!$event.type.indexOf(\"key\") && _vm._k($event.keyCode, \"enter\", 13, $event.key, \"Enter\")) return null;\n    if ($event.ctrlKey || $event.shiftKey || $event.altKey || $event.metaKey) return null;\n    $event.preventDefault();\n    return _vm.checkInput.apply(null, arguments);\n  }, \"change\": _vm.onChange } }), _c(\"label\", { ref: \"label\", staticClass: \"action-checkbox__label\", attrs: { \"for\": _vm.id } }, [_vm._v(_vm._s(_vm.text))]), _vm._e()], 2)]);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n  _sfc_main,\n  _sfc_render,\n  _sfc_staticRenderFns,\n  false,\n  null,\n  \"96242645\"\n);\nconst NcActionCheckbox = __component__.exports;\nexport {\n  NcActionCheckbox as N\n};\n//# sourceMappingURL=NcActionCheckbox-DSMKeccY.mjs.map\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports[\"default\"] = void 0;\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n/* eslint-disable max-depth, max-statements, complexity, max-lines-per-function */\nvar SLASH = 47;\nvar DOT = 46;\nvar assertPath = function assertPath(path) {\n  var t = _typeof(path);\n  if (t !== 'string') {\n    throw new TypeError(\"Expected a string, got a \".concat(t));\n  }\n};\n\n// this function is directly from node source\nvar posixNormalize = function posixNormalize(path, allowAboveRoot) {\n  var res = '';\n  var lastSegmentLength = 0;\n  var lastSlash = -1;\n  var dots = 0;\n  var code;\n  for (var i = 0; i <= path.length; ++i) {\n    if (i < path.length) {\n      code = path.charCodeAt(i);\n    } else if (code === SLASH) {\n      break;\n    } else {\n      code = SLASH;\n    }\n    if (code === SLASH) {\n      if (lastSlash === i - 1 || dots === 1) {\n        // NOOP\n      } else if (lastSlash !== i - 1 && dots === 2) {\n        if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== DOT || res.charCodeAt(res.length - 2) !== DOT) {\n          if (res.length > 2) {\n            var lastSlashIndex = res.lastIndexOf('/');\n            if (lastSlashIndex !== res.length - 1) {\n              if (lastSlashIndex === -1) {\n                res = '';\n                lastSegmentLength = 0;\n              } else {\n                res = res.slice(0, lastSlashIndex);\n                lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n              }\n              lastSlash = i;\n              dots = 0;\n              continue;\n            }\n          } else if (res.length === 2 || res.length === 1) {\n            res = '';\n            lastSegmentLength = 0;\n            lastSlash = i;\n            dots = 0;\n            continue;\n          }\n        }\n        if (allowAboveRoot) {\n          if (res.length > 0) {\n            res += '/..';\n          } else {\n            res = '..';\n          }\n          lastSegmentLength = 2;\n        }\n      } else {\n        if (res.length > 0) {\n          res += '/' + path.slice(lastSlash + 1, i);\n        } else {\n          res = path.slice(lastSlash + 1, i);\n        }\n        lastSegmentLength = i - lastSlash - 1;\n      }\n      lastSlash = i;\n      dots = 0;\n    } else if (code === DOT && dots !== -1) {\n      ++dots;\n    } else {\n      dots = -1;\n    }\n  }\n  return res;\n};\nvar decode = function decode(s) {\n  try {\n    return decodeURIComponent(s);\n  } catch (_unused) {\n    return s;\n  }\n};\nvar normalize = function normalize(p) {\n  assertPath(p);\n  var path = p;\n  if (path.length === 0) {\n    return '.';\n  }\n  var isAbsolute = path.charCodeAt(0) === SLASH;\n  var trailingSeparator = path.charCodeAt(path.length - 1) === SLASH;\n  path = decode(path);\n  path = posixNormalize(path, !isAbsolute);\n  if (path.length === 0 && !isAbsolute) {\n    path = '.';\n  }\n  if (path.length > 0 && trailingSeparator) {\n    path += '/';\n  }\n  if (isAbsolute) {\n    return '/' + path;\n  }\n  return path;\n};\nvar _default = normalize;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios from '@nextcloud/axios'\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router'\nimport pathNormalize from 'path-normalize'\n\nexport default class AttachmentResolver {\n\t#session\n\t#user\n\t#shareToken\n\t#currentDirectory\n\t#documentId\n\t#initAttachmentListPromise\n\t#attachmentList = []\n\n\tconstructor({ session, user, shareToken, currentDirectory, fileId }) {\n\t\tthis.#session = session\n\t\tthis.#user = user\n\t\tthis.#shareToken = shareToken\n\t\tthis.#currentDirectory = currentDirectory\n\t\tthis.#documentId = fileId ?? session.documentId\n\t\tthis.#initAttachmentListPromise = this.#updateAttachmentList()\n\t}\n\n\tasync #updateAttachmentList() {\n\t\tconst response = await axios.post(generateUrl('/apps/text/attachments'), {\n\t\t\tdocumentId: this.#session?.documentId ?? this.#documentId,\n\t\t\tsessionId: this.#session?.id,\n\t\t\tsessionToken: this.#session?.token,\n\t\t\tshareToken: this.#shareToken,\n\t\t})\n\t\tthis.#attachmentList = response.data\n\t}\n\n\t#findAttachment(fileName) {\n\t\treturn this.#attachmentList.find((a) => a.name === fileName)\n\t}\n\n\t/*\n\t * Resolve a given image/attachment src.\n\t * @param { string } src - the original src in the node.\n\t * @param { bool } fallback - fetch again attachmentsList if not found | defaul = true\n\t */\n\tasync resolve(src, fallback = true) {\n\t\tlet attachment\n\n\t\t// Native attachment\n\t\tconst directoryRegexp = /^\\.attachments\\.\\d+\\//\n\t\tif (src.match(directoryRegexp)) {\n\t\t\tconst imageFileName = decodeURIComponent(\n\t\t\t\tsrc.replace(directoryRegexp, '').split('?')[0],\n\t\t\t)\n\n\t\t\t// Wait until attachment list got fetched (initialized by constructor)\n\t\t\tawait this.#initAttachmentListPromise\n\t\t\tattachment = this.#findAttachment(imageFileName)\n\n\t\t\tif (fallback && !attachment) {\n\t\t\t\t// Update attachments list. Needed if attachments gets added to the session\n\t\t\t\tawait this.#updateAttachmentList()\n\t\t\t\tattachment = this.#findAttachment(imageFileName)\n\t\t\t}\n\n\t\t\tif (attachment) {\n\t\t\t\treturn attachment\n\t\t\t}\n\t\t}\n\n\t\t// Direct URLs\n\t\tif (isDirectUrl(src)) {\n\t\t\treturn {\n\t\t\t\tisImage: true,\n\t\t\t\tname: this.#name(src),\n\t\t\t\tpreviewUrl: src,\n\t\t\t\tfullUrl: src,\n\t\t\t}\n\t\t}\n\n\t\t// Fallback: Return DAV url (e.g. for relative paths to images)\n\t\treturn {\n\t\t\tisImage: true,\n\t\t\tname: this.#name(src),\n\t\t\tpreviewUrl: this.#davUrl(src),\n\t\t\tfullUrl: this.#davUrl(src),\n\t\t}\n\t}\n\n\t#name(src) {\n\t\treturn src.split('/').pop()\n\t}\n\n\t#davUrl(src) {\n\t\tif (this.#user) {\n\t\t\tconst uid = this.#user.uid\n\t\t\tconst encoded = this.#filePath(src)\n\t\t\t\t.split('/')\n\t\t\t\t.map(encodeURIComponent)\n\t\t\t\t.join('/')\n\t\t\treturn generateRemoteUrl(`dav/files/${uid}${encoded}`)\n\t\t}\n\n\t\tconst path = this.#filePath(src).split('/')\n\t\tconst basename = path.pop()\n\t\tconst dirname = path.join('/')\n\n\t\treturn generateUrl('/s/{token}/download?path={dirname}&files={basename}', {\n\t\t\ttoken: this.#shareToken,\n\t\t\tbasename,\n\t\t\tdirname,\n\t\t})\n\t}\n\n\t/**\n\t * Return the relativePath to a file specified in the url\n\t *\n\t * @param {string} src - url to extract path from\n\t */\n\t#relativePath(src) {\n\t\treturn decodeURI(src.split('?')[0])\n\t}\n\n\t#filePath(src) {\n\t\tconst f = [this.#currentDirectory, this.#relativePath(src)].join('/')\n\n\t\treturn pathNormalize(f)\n\t}\n}\n\n/**\n * Check if src is a direct URL.\n * Full URLs only work for images on the same Nextcloud instance (due to CORS restrictions).\n *\n * @param {string} src - the url to check\n */\nfunction isDirectUrl(src) {\n\treturn (\n\t\tsrc.startsWith('http://')\n\t\t|| src.startsWith('https://')\n\t\t|| src.startsWith('data:')\n\t)\n}\n","import { Extension } from '@tiptap/core';\nimport { SelectionRange, Selection, Plugin, PluginKey } from '@tiptap/pm/state';\nimport { DecorationSet, Decoration } from '@tiptap/pm/view';\nimport { NodeRange as NodeRange$1 } from '@tiptap/pm/model';\n\nfunction getNodeRangeDecorations(ranges) {\n    if (!ranges.length) {\n        return DecorationSet.empty;\n    }\n    const decorations = [];\n    const doc = ranges[0].$from.node(0);\n    ranges.forEach(range => {\n        const pos = range.$from.pos;\n        const node = range.$from.nodeAfter;\n        if (!node) {\n            return;\n        }\n        decorations.push(Decoration.node(pos, pos + node.nodeSize, {\n            class: 'ProseMirror-selectednoderange',\n        }));\n    });\n    return DecorationSet.create(doc, decorations);\n}\n\nfunction getSelectionRanges($from, $to, depth) {\n    const ranges = [];\n    const doc = $from.node(0);\n    // eslint-disable-next-line\n    depth = (typeof depth === 'number' && depth >= 0)\n        ? depth\n        : $from.sameParent($to)\n            ? Math.max(0, $from.sharedDepth($to.pos) - 1)\n            : $from.sharedDepth($to.pos);\n    const nodeRange = new NodeRange$1($from, $to, depth);\n    const offset = nodeRange.depth === 0\n        ? 0\n        : doc.resolve(nodeRange.start).posAtIndex(0);\n    nodeRange.parent.forEach((node, pos) => {\n        const from = offset + pos;\n        const to = from + node.nodeSize;\n        if (from < nodeRange.start || from >= nodeRange.end) {\n            return;\n        }\n        const selectionRange = new SelectionRange(doc.resolve(from), doc.resolve(to));\n        ranges.push(selectionRange);\n    });\n    return ranges;\n}\n\nclass NodeRangeBookmark {\n    constructor(anchor, head) {\n        this.anchor = anchor;\n        this.head = head;\n    }\n    map(mapping) {\n        return new NodeRangeBookmark(mapping.map(this.anchor), mapping.map(this.head));\n    }\n    resolve(doc) {\n        const $anchor = doc.resolve(this.anchor);\n        const $head = doc.resolve(this.head);\n        return new NodeRangeSelection($anchor, $head);\n    }\n}\n\nclass NodeRangeSelection extends Selection {\n    constructor($anchor, $head, depth, bias = 1) {\n        // if there is only a cursor we can’t calculate a direction of the selection\n        // that’s why we adjust the head position by 1 in the desired direction\n        const { doc } = $anchor;\n        const isCursor = $anchor === $head;\n        const isCursorAtEnd = $anchor.pos === doc.content.size && $head.pos === doc.content.size;\n        const $correctedHead = isCursor && !isCursorAtEnd\n            ? doc.resolve($head.pos + (bias > 0 ? 1 : -1))\n            : $head;\n        const $correctedAnchor = isCursor && isCursorAtEnd\n            ? doc.resolve($anchor.pos - (bias > 0 ? 1 : -1))\n            : $anchor;\n        const ranges = getSelectionRanges($correctedAnchor.min($correctedHead), $correctedAnchor.max($correctedHead), depth);\n        // get the smallest range start position\n        // this will become the $anchor\n        const $rangeFrom = ($correctedHead.pos >= $anchor.pos)\n            ? ranges[0].$from\n            : ranges[ranges.length - 1].$to;\n        // get the biggest range end position\n        // this will become the $head\n        const $rangeTo = ($correctedHead.pos >= $anchor.pos)\n            ? ranges[ranges.length - 1].$to\n            : ranges[0].$from;\n        super($rangeFrom, $rangeTo, ranges);\n        this.depth = depth;\n    }\n    // we can safely ignore this TypeScript error: https://github.com/Microsoft/TypeScript/issues/338\n    // @ts-ignore\n    get $to() {\n        return this.ranges[this.ranges.length - 1].$to;\n    }\n    eq(other) {\n        return other instanceof NodeRangeSelection\n            && other.$from.pos === this.$from.pos\n            && other.$to.pos === this.$to.pos;\n    }\n    map(doc, mapping) {\n        const $anchor = doc.resolve(mapping.map(this.anchor));\n        const $head = doc.resolve(mapping.map(this.head));\n        return new NodeRangeSelection($anchor, $head);\n    }\n    toJSON() {\n        return {\n            type: 'nodeRange',\n            anchor: this.anchor,\n            head: this.head,\n        };\n    }\n    get isForwards() {\n        return this.head >= this.anchor;\n    }\n    get isBackwards() {\n        return !this.isForwards;\n    }\n    extendBackwards() {\n        const { doc } = this.$from;\n        if (this.isForwards && this.ranges.length > 1) {\n            const ranges = this.ranges.slice(0, -1);\n            const $from = ranges[0].$from;\n            const $to = ranges[ranges.length - 1].$to;\n            return new NodeRangeSelection($from, $to, this.depth);\n        }\n        const firstRange = this.ranges[0];\n        const $from = doc.resolve(Math.max(0, firstRange.$from.pos - 1));\n        return new NodeRangeSelection(this.$anchor, $from, this.depth);\n    }\n    extendForwards() {\n        const { doc } = this.$from;\n        if (this.isBackwards && this.ranges.length > 1) {\n            const ranges = this.ranges.slice(1);\n            const $from = ranges[0].$from;\n            const $to = ranges[ranges.length - 1].$to;\n            return new NodeRangeSelection($to, $from, this.depth);\n        }\n        const lastRange = this.ranges[this.ranges.length - 1];\n        const $to = doc.resolve(Math.min(doc.content.size, lastRange.$to.pos + 1));\n        return new NodeRangeSelection(this.$anchor, $to, this.depth);\n    }\n    static fromJSON(doc, json) {\n        return new NodeRangeSelection(doc.resolve(json.anchor), doc.resolve(json.head));\n    }\n    static create(doc, anchor, head, depth, bias = 1) {\n        return new this(doc.resolve(anchor), doc.resolve(head), depth, bias);\n    }\n    getBookmark() {\n        return new NodeRangeBookmark(this.anchor, this.head);\n    }\n}\nNodeRangeSelection.prototype.visible = false;\n\nfunction isNodeRangeSelection(value) {\n    return value instanceof NodeRangeSelection;\n}\n\nconst NodeRange = Extension.create({\n    name: 'nodeRange',\n    addOptions() {\n        return {\n            depth: undefined,\n            key: 'Mod',\n        };\n    },\n    addKeyboardShortcuts() {\n        return {\n            // extend NodeRangeSelection upwards\n            'Shift-ArrowUp': ({ editor }) => {\n                const { depth } = this.options;\n                const { view, state } = editor;\n                const { doc, selection, tr } = state;\n                const { anchor, head } = selection;\n                if (!isNodeRangeSelection(selection)) {\n                    const nodeRangeSelection = NodeRangeSelection.create(doc, anchor, head, depth, -1);\n                    tr.setSelection(nodeRangeSelection);\n                    view.dispatch(tr);\n                    return true;\n                }\n                const nodeRangeSelection = selection.extendBackwards();\n                tr.setSelection(nodeRangeSelection);\n                view.dispatch(tr);\n                return true;\n            },\n            // extend NodeRangeSelection downwards\n            'Shift-ArrowDown': ({ editor }) => {\n                const { depth } = this.options;\n                const { view, state } = editor;\n                const { doc, selection, tr } = state;\n                const { anchor, head } = selection;\n                if (!isNodeRangeSelection(selection)) {\n                    const nodeRangeSelection = NodeRangeSelection.create(doc, anchor, head, depth);\n                    tr.setSelection(nodeRangeSelection);\n                    view.dispatch(tr);\n                    return true;\n                }\n                const nodeRangeSelection = selection.extendForwards();\n                tr.setSelection(nodeRangeSelection);\n                view.dispatch(tr);\n                return true;\n            },\n            // add `NodeRangeSelection` to all nodes\n            'Mod-a': ({ editor }) => {\n                const { depth } = this.options;\n                const { view, state } = editor;\n                const { doc, tr } = state;\n                const nodeRangeSelection = NodeRangeSelection.create(doc, 0, doc.content.size, depth);\n                tr.setSelection(nodeRangeSelection);\n                view.dispatch(tr);\n                return true;\n            },\n        };\n    },\n    onSelectionUpdate() {\n        const { selection } = this.editor.state;\n        if (isNodeRangeSelection(selection)) {\n            this.editor.view.dom.classList.add('ProseMirror-noderangeselection');\n        }\n    },\n    addProseMirrorPlugins() {\n        let hideTextSelection = false;\n        let activeMouseSelection = false;\n        return [\n            new Plugin({\n                key: new PluginKey('nodeRange'),\n                props: {\n                    attributes: () => {\n                        if (hideTextSelection) {\n                            return {\n                                class: 'ProseMirror-noderangeselection',\n                            };\n                        }\n                        return { class: '' };\n                    },\n                    handleDOMEvents: {\n                        mousedown: (view, event) => {\n                            const { key } = this.options;\n                            const isMac = /Mac/.test(navigator.platform);\n                            const isShift = !!event.shiftKey;\n                            const isControl = !!event.ctrlKey;\n                            const isAlt = !!event.altKey;\n                            const isMeta = !!event.metaKey;\n                            const isMod = isMac\n                                ? isMeta\n                                : isControl;\n                            if (key === null\n                                || key === undefined\n                                || (key === 'Shift' && isShift)\n                                || (key === 'Control' && isControl)\n                                || (key === 'Alt' && isAlt)\n                                || (key === 'Meta' && isMeta)\n                                || (key === 'Mod' && isMod)) {\n                                activeMouseSelection = true;\n                            }\n                            if (!activeMouseSelection) {\n                                return false;\n                            }\n                            document.addEventListener('mouseup', () => {\n                                activeMouseSelection = false;\n                                const { state } = view;\n                                const { doc, selection, tr } = state;\n                                const { $anchor, $head } = selection;\n                                if ($anchor.sameParent($head)) {\n                                    return;\n                                }\n                                const nodeRangeSelection = NodeRangeSelection.create(doc, $anchor.pos, $head.pos, this.options.depth);\n                                tr.setSelection(nodeRangeSelection);\n                                view.dispatch(tr);\n                            }, { once: true });\n                            return false;\n                        },\n                    },\n                    // when selecting some text we want to render some decorations\n                    // to preview a `NodeRangeSelection`\n                    decorations: state => {\n                        const { selection } = state;\n                        const isNodeRange = isNodeRangeSelection(selection);\n                        hideTextSelection = false;\n                        if (!activeMouseSelection) {\n                            if (!isNodeRange) {\n                                return null;\n                            }\n                            hideTextSelection = true;\n                            return getNodeRangeDecorations(selection.ranges);\n                        }\n                        const { $from, $to } = selection;\n                        // selection is probably in the same node like a paragraph\n                        // so we don’t render decorations and show\n                        // a simple text selection instead\n                        if (!isNodeRange && $from.sameParent($to)) {\n                            return null;\n                        }\n                        // try to calculate some node ranges\n                        const nodeRanges = getSelectionRanges($from, $to, this.options.depth);\n                        if (!nodeRanges.length) {\n                            return null;\n                        }\n                        hideTextSelection = true;\n                        return getNodeRangeDecorations(nodeRanges);\n                    },\n                },\n            }),\n        ];\n    },\n});\n\nexport { NodeRange, NodeRangeSelection, NodeRange as default, getNodeRangeDecorations, getSelectionRanges, isNodeRangeSelection };\n//# sourceMappingURL=index.js.map\n","import { Extension } from '@tiptap/core';\nimport { isChangeOrigin } from '@tiptap/extension-collaboration';\nimport { PluginKey, Plugin } from '@tiptap/pm/state';\nimport tippy from 'tippy.js';\nimport { ySyncPluginKey, absolutePositionToRelativePosition, relativePositionToAbsolutePosition } from 'y-prosemirror';\nimport { getSelectionRanges, NodeRangeSelection } from '@tiptap/extension-node-range';\n\nfunction getCSSText(element) {\n    let value = '';\n    const style = getComputedStyle(element);\n    for (let i = 0; i < style.length; i += 1) {\n        value += `${style[i]}:${style.getPropertyValue(style[i])};`;\n    }\n    return value;\n}\nfunction cloneElement(node) {\n    const clonedNode = node.cloneNode(true);\n    const sourceElements = [node, ...Array.from(node.getElementsByTagName('*'))];\n    const targetElements = [clonedNode, ...Array.from(clonedNode.getElementsByTagName('*'))];\n    sourceElements.forEach((sourceElement, index) => {\n        targetElements[index].style.cssText = getCSSText(sourceElement);\n    });\n    return clonedNode;\n}\n\nconst findElementNextToCoords = (options) => {\n    const { x, y, direction, editor, } = options;\n    let resultElement = null;\n    let resultNode = null;\n    let pos = null;\n    let currentX = x;\n    while (resultNode === null && currentX < window.innerWidth && currentX > 0) {\n        const allElements = document.elementsFromPoint(currentX, y);\n        const prosemirrorIndex = allElements.findIndex(element => element.classList.contains('ProseMirror'));\n        const filteredElements = allElements.slice(0, prosemirrorIndex);\n        if (filteredElements.length > 0) {\n            const target = filteredElements[0];\n            resultElement = target;\n            pos = editor.view.posAtDOM(target, 0);\n            if (pos >= 0) {\n                resultNode = editor.state.doc.nodeAt(Math.max(pos - 1, 0));\n                if (resultNode === null || resultNode === void 0 ? void 0 : resultNode.isText) {\n                    resultNode = editor.state.doc.nodeAt(Math.max(pos - 1, 0));\n                }\n                if (!resultNode) {\n                    resultNode = editor.state.doc.nodeAt(Math.max(pos, 0));\n                }\n                break;\n            }\n        }\n        if (direction === 'left') {\n            currentX -= 1;\n        }\n        else {\n            currentX += 1;\n        }\n    }\n    return { resultElement, resultNode, pos: pos !== null && pos !== void 0 ? pos : null };\n};\n\nfunction getComputedStyle$1(node, property) {\n    const style = window.getComputedStyle(node);\n    return style[property];\n}\n\nfunction minMax(value = 0, min = 0, max = 0) {\n    return Math.min(Math.max(value, min), max);\n}\n\nfunction getInnerCoords(view, x, y) {\n    const paddingLeft = parseInt(getComputedStyle$1(view.dom, 'paddingLeft'), 10);\n    const paddingRight = parseInt(getComputedStyle$1(view.dom, 'paddingRight'), 10);\n    const borderLeft = parseInt(getComputedStyle$1(view.dom, 'borderLeftWidth'), 10);\n    const borderRight = parseInt(getComputedStyle$1(view.dom, 'borderLeftWidth'), 10);\n    const bounds = view.dom.getBoundingClientRect();\n    const coords = {\n        left: minMax(x, bounds.left + paddingLeft + borderLeft, bounds.right - paddingRight - borderRight),\n        top: y,\n    };\n    return coords;\n}\n\nfunction removeNode(node) {\n    var _a;\n    (_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(node);\n}\n\nfunction getDragHandleRanges(event, editor) {\n    const { doc } = editor.view.state;\n    const result = findElementNextToCoords({\n        editor, x: event.clientX, y: event.clientY, direction: 'right',\n    });\n    if (!result.resultNode || result.pos === null) {\n        return [];\n    }\n    const x = event.clientX;\n    // @ts-ignore\n    const coords = getInnerCoords(editor.view, x, event.clientY);\n    const posAtCoords = editor.view.posAtCoords(coords);\n    if (!posAtCoords) {\n        return [];\n    }\n    const { pos } = posAtCoords;\n    const nodeAt = doc.resolve(pos).parent;\n    if (!nodeAt) {\n        return [];\n    }\n    const $from = doc.resolve(result.pos);\n    const $to = doc.resolve(result.pos + 1);\n    return getSelectionRanges($from, $to, 0);\n}\nfunction dragHandler(event, editor) {\n    const { view } = editor;\n    if (!event.dataTransfer) {\n        return;\n    }\n    const { empty, $from, $to } = view.state.selection;\n    const dragHandleRanges = getDragHandleRanges(event, editor);\n    const selectionRanges = getSelectionRanges($from, $to, 0);\n    const isDragHandleWithinSelection = selectionRanges.some(range => {\n        return dragHandleRanges.find(dragHandleRange => {\n            return dragHandleRange.$from === range.$from\n                && dragHandleRange.$to === range.$to;\n        });\n    });\n    const ranges = empty || !isDragHandleWithinSelection\n        ? dragHandleRanges\n        : selectionRanges;\n    if (!ranges.length) {\n        return;\n    }\n    const { tr } = view.state;\n    const wrapper = document.createElement('div');\n    const from = ranges[0].$from.pos;\n    const to = ranges[ranges.length - 1].$to.pos;\n    const selection = NodeRangeSelection.create(view.state.doc, from, to);\n    const slice = selection.content();\n    ranges.forEach(range => {\n        const element = view.nodeDOM(range.$from.pos);\n        const clonedElement = cloneElement(element);\n        wrapper.append(clonedElement);\n    });\n    wrapper.style.position = 'absolute';\n    wrapper.style.top = '-10000px';\n    document.body.append(wrapper);\n    event.dataTransfer.clearData();\n    event.dataTransfer.setDragImage(wrapper, 0, 0);\n    // tell ProseMirror the dragged content\n    view.dragging = { slice, move: true };\n    tr.setSelection(selection);\n    view.dispatch(tr);\n    // clean up\n    document.addEventListener('drop', () => removeNode(wrapper), { once: true });\n}\n\nconst getOuterNodePos = (doc, pos) => {\n    const resolvedPos = doc.resolve(pos);\n    const { depth } = resolvedPos;\n    if (depth === 0) {\n        return pos;\n    }\n    const a = resolvedPos.pos - resolvedPos.parentOffset;\n    return a - 1;\n};\nconst getOuterNode = (doc, pos) => {\n    const node = doc.nodeAt(pos);\n    const resolvedPos = doc.resolve(pos);\n    let { depth } = resolvedPos;\n    let parent = node;\n    while (depth > 0) {\n        const currentNode = resolvedPos.node(depth);\n        depth -= 1;\n        if (depth === 0) {\n            parent = currentNode;\n        }\n    }\n    return parent;\n};\n\nconst getRelativePos = (state, absolutePos) => {\n    const ystate = ySyncPluginKey.getState(state);\n    if (!ystate) {\n        return null;\n    }\n    return absolutePositionToRelativePosition(absolutePos, ystate.type, ystate.binding.mapping);\n};\nconst getAbsolutePos = (state, relativePos) => {\n    const ystate = ySyncPluginKey.getState(state);\n    if (!ystate) {\n        return -1;\n    }\n    return (relativePositionToAbsolutePosition(ystate.doc, ystate.type, relativePos, ystate.binding.mapping) || 0);\n};\nconst getOuterDomNode = (view, domNode) => {\n    let tmpDomNode = domNode;\n    // Traverse to top level node.\n    while (tmpDomNode && tmpDomNode.parentNode) {\n        if (tmpDomNode.parentNode === view.dom) {\n            break;\n        }\n        tmpDomNode = tmpDomNode.parentNode;\n    }\n    return tmpDomNode;\n};\nconst dragHandlePluginDefaultKey = new PluginKey('dragHandle');\nconst DragHandlePlugin = ({ pluginKey = dragHandlePluginDefaultKey, element, editor, tippyOptions, onNodeChange, }) => {\n    const wrapper = document.createElement('div');\n    let popup = null;\n    let locked = false;\n    let currentNode = null;\n    let currentNodePos = -1;\n    let currentNodeRelPos;\n    element.addEventListener('dragstart', e => {\n        // Push this to the end of the event cue\n        // Fixes bug where incorrect drag pos is returned if drag handle has position: absolute\n        // @ts-ignore\n        dragHandler(e, editor);\n        setTimeout(() => {\n            if (element) {\n                element.style.pointerEvents = 'none';\n            }\n        }, 0);\n    });\n    element.addEventListener('dragend', () => {\n        if (element) {\n            element.style.pointerEvents = 'auto';\n        }\n    });\n    return new Plugin({\n        key: typeof pluginKey === 'string' ? new PluginKey(pluginKey) : pluginKey,\n        state: {\n            init() {\n                return { locked: false };\n            },\n            apply(tr, value, oldState, state) {\n                const isLocked = tr.getMeta('lockDragHandle');\n                const hideDragHandle = tr.getMeta('hideDragHandle');\n                if (isLocked !== undefined) {\n                    locked = isLocked;\n                }\n                if (hideDragHandle && popup) {\n                    popup.hide();\n                    locked = false;\n                    currentNode = null;\n                    currentNodePos = -1;\n                    onNodeChange === null || onNodeChange === void 0 ? void 0 : onNodeChange({ editor, node: null, pos: -1 });\n                    return value;\n                }\n                // Something has changed and drag handler is visible…\n                if (tr.docChanged && currentNodePos !== -1 && element && popup) {\n                    // Yjs replaces the entire document on every incoming change and needs a special handling.\n                    // If change comes from another user …\n                    if (isChangeOrigin(tr)) {\n                        // https://discuss.yjs.dev/t/y-prosemirror-mapping-a-single-relative-position-when-doc-changes/851/3\n                        const newPos = getAbsolutePos(state, currentNodeRelPos);\n                        if (newPos !== currentNodePos) {\n                            // Set the new position for our current node.\n                            currentNodePos = newPos;\n                            // We will get the outer node with data and position in views update method.\n                        }\n                    }\n                    else {\n                        // … otherwise use ProseMirror mapping to update the position.\n                        const newPos = tr.mapping.map(currentNodePos);\n                        if (newPos !== currentNodePos) {\n                            // TODO: Remove\n                            // console.log('Position has changed …', { old: currentNodePos, new: newPos }, tr);\n                            // Set the new position for our current node.\n                            currentNodePos = newPos;\n                            // Memorize relative position to retrieve absolute position in case of collaboration\n                            currentNodeRelPos = getRelativePos(state, currentNodePos);\n                            // We will get the outer node with data and position in views update method.\n                        }\n                    }\n                }\n                return value;\n            },\n        },\n        view: view => {\n            var _a;\n            element.draggable = true;\n            element.style.pointerEvents = 'auto';\n            (_a = editor.view.dom.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(wrapper);\n            wrapper.appendChild(element);\n            wrapper.style.pointerEvents = 'none';\n            wrapper.style.position = 'absolute';\n            wrapper.style.top = '0';\n            wrapper.style.left = '0';\n            return {\n                update(_, oldState) {\n                    if (!element) {\n                        return;\n                    }\n                    if (!editor.isEditable) {\n                        popup === null || popup === void 0 ? void 0 : popup.destroy();\n                        popup = null;\n                        return;\n                    }\n                    if (!popup) {\n                        popup = tippy(view.dom, {\n                            getReferenceClientRect: null,\n                            interactive: true,\n                            trigger: 'manual',\n                            placement: 'left-start',\n                            hideOnClick: false,\n                            duration: 100,\n                            popperOptions: {\n                                modifiers: [\n                                    { name: 'flip', enabled: false },\n                                    {\n                                        name: 'preventOverflow',\n                                        options: {\n                                            rootBoundary: 'document',\n                                            mainAxis: false,\n                                        },\n                                    },\n                                ],\n                            },\n                            ...tippyOptions,\n                            appendTo: wrapper,\n                            content: element,\n                        });\n                    }\n                    // Prevent element being draggend while being open.\n                    if (locked) {\n                        element.draggable = false;\n                    }\n                    else {\n                        element.draggable = true;\n                    }\n                    // Do not close on updates (e.g. changing padding of a section or collaboration events)\n                    // popup?.hide();\n                    // Recalculate popup position if doc has changend and drag handler is visible.\n                    if (view.state.doc.eq(oldState.doc) || currentNodePos === -1) {\n                        return;\n                    }\n                    // Get domNode from (new) position.\n                    let domNode = view.nodeDOM(currentNodePos);\n                    // Since old element could have been wrapped, we need to find\n                    // the outer node and take its position and node data.\n                    domNode = getOuterDomNode(view, domNode);\n                    // Skip if domNode is editor dom.\n                    if (domNode === view.dom) {\n                        return;\n                    }\n                    // We only want `Element`.\n                    if ((domNode === null || domNode === void 0 ? void 0 : domNode.nodeType) !== 1) {\n                        return;\n                    }\n                    const domNodePos = view.posAtDOM(domNode, 0);\n                    const outerNode = getOuterNode(editor.state.doc, domNodePos);\n                    const outerNodePos = getOuterNodePos(editor.state.doc, domNodePos); // TODO: needed?\n                    currentNode = outerNode;\n                    currentNodePos = outerNodePos;\n                    // Memorize relative position to retrieve absolute position in case of collaboration\n                    currentNodeRelPos = getRelativePos(view.state, currentNodePos);\n                    // TODO: Remove\n                    // console.log('View has updated: callback with new data and repositioning of popup …', {\n                    //   domNode,\n                    //   currentNodePos,\n                    //   currentNode,\n                    //   rect: (domNode as Element).getBoundingClientRect(),\n                    // });\n                    onNodeChange === null || onNodeChange === void 0 ? void 0 : onNodeChange({ editor, node: currentNode, pos: currentNodePos });\n                    // Update Tippys getReferenceClientRect since domNode might have changed.\n                    popup.setProps({\n                        getReferenceClientRect: () => domNode.getBoundingClientRect(),\n                    });\n                },\n                // TODO: Kills even on hot reload\n                destroy() {\n                    popup === null || popup === void 0 ? void 0 : popup.destroy();\n                    if (element) {\n                        removeNode(wrapper);\n                    }\n                },\n            };\n        },\n        props: {\n            handleDOMEvents: {\n                keydown(view) {\n                    if (popup && popup.state.isVisible && view.hasFocus()) {\n                        popup.hide();\n                        return false;\n                    }\n                    return false;\n                },\n                mouseleave(_view, e) {\n                    // Do not hide open popup on mouseleave.\n                    if (locked) {\n                        return false;\n                    }\n                    // If e.target is not inside the wrapper, hide.\n                    if (e.target && !wrapper.contains(e.relatedTarget)) {\n                        popup === null || popup === void 0 ? void 0 : popup.hide();\n                        currentNode = null;\n                        currentNodePos = -1;\n                        onNodeChange === null || onNodeChange === void 0 ? void 0 : onNodeChange({ editor, node: null, pos: -1 });\n                    }\n                    return false;\n                },\n                mousemove(view, e) {\n                    // Do not continue if popup is not initialized or open.\n                    if (!element || !popup || locked) {\n                        return false;\n                    }\n                    const nodeData = findElementNextToCoords({\n                        x: e.clientX,\n                        y: e.clientY,\n                        direction: 'right',\n                        editor,\n                    });\n                    // Skip if there is no node next to coords\n                    if (!nodeData.resultElement) {\n                        return false;\n                    }\n                    let domNode = nodeData.resultElement;\n                    domNode = getOuterDomNode(view, domNode);\n                    // Skip if domNode is editor dom.\n                    if (domNode === view.dom) {\n                        return false;\n                    }\n                    // We only want `Element`.\n                    if ((domNode === null || domNode === void 0 ? void 0 : domNode.nodeType) !== 1) {\n                        return false;\n                    }\n                    const domNodePos = view.posAtDOM(domNode, 0);\n                    const outerNode = getOuterNode(editor.state.doc, domNodePos);\n                    if (outerNode !== currentNode) {\n                        const outerNodePos = getOuterNodePos(editor.state.doc, domNodePos);\n                        currentNode = outerNode;\n                        currentNodePos = outerNodePos;\n                        // Memorize relative position to retrieve absolute position in case of collaboration\n                        currentNodeRelPos = getRelativePos(view.state, currentNodePos);\n                        // TODO: Remove\n                        // console.log('Mousemove with changed node / node data …', {\n                        //   domNode,\n                        //   currentNodePos,\n                        //   currentNode,\n                        //   rect: (domNode as Element).getBoundingClientRect(),\n                        // });\n                        onNodeChange === null || onNodeChange === void 0 ? void 0 : onNodeChange({ editor, node: currentNode, pos: currentNodePos });\n                        // Set nodes clientRect.\n                        popup.setProps({\n                            getReferenceClientRect: () => domNode.getBoundingClientRect(),\n                        });\n                        popup.show();\n                    }\n                    return false;\n                },\n            },\n        },\n    });\n};\n\nconst DragHandle = Extension.create({\n    name: 'dragHandle',\n    addOptions() {\n        return {\n            render() {\n                const element = document.createElement('div');\n                element.classList.add('drag-handle');\n                return element;\n            },\n            tippyOptions: {},\n            locked: false,\n            onNodeChange: () => { return null; },\n        };\n    },\n    addCommands() {\n        return {\n            lockDragHandle: () => ({ editor }) => {\n                this.options.locked = true;\n                return editor.commands.setMeta('lockDragHandle', this.options.locked);\n            },\n            unlockDragHandle: () => ({ editor }) => {\n                this.options.locked = false;\n                return editor.commands.setMeta('lockDragHandle', this.options.locked);\n            },\n            toggleDragHandle: () => ({ editor }) => {\n                this.options.locked = !this.options.locked;\n                return editor.commands.setMeta('lockDragHandle', this.options.locked);\n            },\n        };\n    },\n    addProseMirrorPlugins() {\n        const element = this.options.render();\n        return [\n            DragHandlePlugin({\n                tippyOptions: this.options.tippyOptions,\n                element,\n                editor: this.editor,\n                onNodeChange: this.options.onNodeChange,\n            }),\n        ];\n    },\n});\n\nexport { DragHandle, DragHandlePlugin, DragHandle as default, dragHandlePluginDefaultKey };\n//# sourceMappingURL=index.js.map\n","import { dragHandlePluginDefaultKey, DragHandlePlugin } from '@tiptap/extension-drag-handle';\nimport Vue from 'vue';\n\nconst DragHandle = Vue.extend({\n    name: 'DragHandleVue',\n    props: {\n        pluginKey: {\n            type: [String, Object],\n            default: dragHandlePluginDefaultKey,\n        },\n        editor: {\n            type: Object,\n            required: true,\n        },\n        tippyOptions: {\n            type: Object,\n            default: () => ({}),\n        },\n        onNodeChange: {\n            type: Function,\n            default: null,\n        },\n        class: {\n            type: String,\n            default: 'drag-handle',\n        },\n    },\n    mounted() {\n        const { editor, pluginKey, onNodeChange, tippyOptions, } = this.$props;\n        editor.registerPlugin(DragHandlePlugin({\n            editor,\n            element: this.$el,\n            pluginKey,\n            tippyOptions,\n            onNodeChange,\n        }));\n    },\n    // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle\n    beforeDestroy() {\n        const { pluginKey, editor } = this.$props;\n        editor.unregisterPlugin(pluginKey);\n    },\n    render(h) {\n        return h('div', {\n            class: this.class,\n        }, this.$slots.default);\n    },\n});\n\nexport { DragHandle, DragHandle as default };\n//# sourceMappingURL=index.js.map\n","<template>\n  <span v-bind=\"$attrs\"\n        :aria-hidden=\"title ? null : 'true'\"\n        :aria-label=\"title\"\n        class=\"material-design-icon drag-vertical-icon\"\n        role=\"img\"\n        @click=\"$emit('click', $event)\">\n    <svg :fill=\"fillColor\"\n         class=\"material-design-icon__svg\"\n         :width=\"size\"\n         :height=\"size\"\n         viewBox=\"0 0 24 24\">\n      <path d=\"M9,3H11V5H9V3M13,3H15V5H13V3M9,7H11V9H9V7M13,7H15V9H13V7M9,11H11V13H9V11M13,11H15V13H13V11M9,15H11V17H9V15M13,15H15V17H13V15M9,19H11V21H9V19M13,19H15V21H13V19Z\">\n        <title v-if=\"title\">{{ title }}</title>\n      </path>\n    </svg>\n  </span>\n</template>\n\n<script>\nexport default {\n  name: \"DragVerticalIcon\",\n  emits: ['click'],\n  props: {\n    title: {\n      type: String,\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n}\n</script>","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\tdata-text-el=\"editor-content-wrapper\"\n\t\tclass=\"content-wrapper text-editor__content-wrapper\"\n\t\t:class=\"{\n\t\t\t'--show-outline': showOutline,\n\t\t}\">\n\t\t<div v-if=\"showOutline\" class=\"text-editor__content-wrapper__left\">\n\t\t\t<EditorOutline />\n\t\t</div>\n\t\t<slot />\n\t\t<DragHandle :editor=\"editor\" class=\"drag-handle--button\">\n\t\t\t<NcButton type=\"tertiary-no-background\" size=\"normal\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<DragVerticalIcon :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\t\t</DragHandle>\n\t\t<EditorContent\n\t\t\trole=\"document\"\n\t\t\tclass=\"editor__content text-editor__content\"\n\t\t\t:editor=\"editor\" />\n\t\t<div class=\"text-editor__content-wrapper__right\" />\n\t</div>\n</template>\n\n<script>\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport { DragHandle } from '@tiptap/extension-drag-handle-vue-2'\nimport { EditorContent } from '@tiptap/vue-2'\nimport DragVerticalIcon from 'vue-material-design-icons/DragVertical.vue'\nimport { useEditor } from '../../composables/useEditor.ts'\nimport EditorOutline from './EditorOutline.vue'\nimport { useOutlineStateMixin } from './Wrapper.provider.js'\n\nexport default {\n\tname: 'ContentContainer',\n\tcomponents: {\n\t\tEditorContent,\n\t\tEditorOutline,\n\t\tNcButton,\n\t\tDragHandle,\n\t\tDragVerticalIcon,\n\t},\n\tmixins: [useOutlineStateMixin],\n\tsetup() {\n\t\tconst { editor } = useEditor()\n\t\treturn { editor }\n\t},\n\tcomputed: {\n\t\tshowOutline() {\n\t\t\treturn this.$outlineState.visible\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.editor__content {\n\tmax-width: min(var(--text-editor-max-width), calc(100vw - 16px));\n\tmargin: 0 auto;\n\tposition: relative;\n\twidth: 100%;\n\t:deep([contenteditable]) {\n\t\t// drop off obsolete server styles\n\t\tmargin: 0 !important;\n\t}\n}\n\n.ie {\n\t.editor__content:deep(.ProseMirror) {\n\t\tpadding-top: 50px;\n\t}\n}\n\n.text-editor__content-wrapper {\n\t--side-width: calc((100% - var(--text-editor-max-width)) / 2);\n\tdisplay: grid;\n\tgrid-template-columns: 1fr auto;\n\toverflow: auto;\n\tflex: 1;\n\t&.--show-outline {\n\t\tgrid-template-columns: var(--side-width) auto var(--side-width);\n\t}\n\t.text-editor__content-wrapper__left,\n\t.text-editor__content-wrapper__right {\n\t\theight: 100%;\n\t\tposition: relative;\n\t}\n}\n\n.is-rich-workspace {\n\t.text-editor__content-wrapper {\n\t\t--side-width: var(--text-editor-max-width);\n\t\tgrid-template-columns: var(--side-width) auto;\n\t\t.text-editor__content-wrapper__left,\n\t\t.text-editor__content-wrapper__right {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n.drag-handle--button {\n\tcolor: var(--color-maxcontrast);\n\tposition: absolute;\n\tleft: -60px;\n\ttransform: translate(0, -20%);\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios from '@nextcloud/axios'\nimport { generateUrl } from '@nextcloud/router'\nimport { unref, type ShallowRef } from 'vue'\nimport type { Connection } from '../composables/useConnection.js'\n\n/**\n * Upload an attachment to the server.\n * @param connection the active connection.\n * @param file upload this file.\n */\nexport function uploadAttachment(\n\tconnection: ShallowRef<Connection> | Connection,\n\tfile: string | Blob,\n) {\n\tconst {\n\t\tdocumentId,\n\t\tsessionId,\n\t\tsessionToken,\n\t\tshareToken: token,\n\t} = unref(connection)\n\tconst formData = new FormData()\n\tformData.append('file', file)\n\tconst url = generateUrl(`apps/text/attachment/upload?`)\n\treturn axios.post(url, formData, {\n\t\theaders: { 'Content-Type': 'multipart/form-data' },\n\t\tparams: { documentId, sessionId, sessionToken, token },\n\t})\n}\n\n/**\n * Create a new attachment based on the given template\n * @param connection the active connection\n * @param template create the attachment based on this\n * @param template.app app to create the attachment with\n * @param template.extension extension to use\n */\nexport function createAttachment(\n\tconnection: ShallowRef<Connection> | Connection,\n\ttemplate: { app: string; extension: string },\n) {\n\tconst { documentId, sessionId, sessionToken } = unref(connection)\n\tconst url = generateUrl(`apps/text/attachment/create`)\n\treturn axios.post(url, {\n\t\tdocumentId,\n\t\tsessionId,\n\t\tsessionToken,\n\t\tfileName: `${template.app}${template.extension}`,\n\t})\n}\n\n/**\n * Create a new attachment based on the given template\n * @param connection the active connection\n * @param filePath path to the file on the server.\n */\nexport function insertAttachmentFile(\n\tconnection: ShallowRef<Connection> | Connection,\n\tfilePath: string,\n) {\n\tconst { documentId, sessionId, sessionToken } = unref(connection)\n\tconst url = generateUrl(`apps/text/attachment/filepath`)\n\treturn axios.post(url, {\n\t\tdocumentId,\n\t\tsessionId,\n\t\tsessionToken,\n\t\tfilePath,\n\t})\n}\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\tclass=\"editor editor-media-handler\"\n\t\tdata-text-el=\"editor-media-handler\"\n\t\t:class=\"{ draggedOver, 'is-mobile': isMobile }\"\n\t\t@image-paste=\"onPaste\"\n\t\[email protected]=\"setDraggedOver(true, $event)\"\n\t\[email protected]=\"setDraggedOver(false, $event)\"\n\t\[email protected]=\"setDraggedOver(false, $event)\"\n\t\t@file-drop=\"onEditorDrop\">\n\t\t<input\n\t\t\tv-show=\"false\"\n\t\t\tref=\"attachmentFileInput\"\n\t\t\tdata-text-el=\"attachment-file-input\"\n\t\t\ttype=\"file\"\n\t\t\taccept=\"*/*\"\n\t\t\tmultiple\n\t\t\t@change=\"onAttachmentUploadFilePicked\" />\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { showError } from '@nextcloud/dialogs'\nimport { emit } from '@nextcloud/event-bus'\nimport { generateUrl } from '@nextcloud/router'\nimport { useIsMobile } from '@nextcloud/vue/composables/useIsMobile'\nimport {\n\tcreateAttachment,\n\tinsertAttachmentFile,\n\tuploadAttachment,\n} from '../../apis/attach.ts'\nimport { logger } from '../../helpers/logger.js'\n\nimport { useEditor } from '../../composables/useEditor.ts'\nimport { useFileMixin } from '../Editor.provider.ts'\n\nimport { useConnection } from '../../composables/useConnection.ts'\nimport {\n\tACTION_ATTACHMENT_PROMPT,\n\tACTION_CHOOSE_LOCAL_ATTACHMENT,\n\tACTION_CREATE_ATTACHMENT,\n\tSTATE_UPLOADING,\n} from './MediaHandler.provider.js'\n\nconst getDir = (val) => val.split('/').slice(0, -1).join('/')\n\nexport default {\n\tname: 'MediaHandler',\n\tmixins: [useFileMixin],\n\tprovide() {\n\t\tconst val = {}\n\n\t\tObject.defineProperties(val, {\n\t\t\t[ACTION_ATTACHMENT_PROMPT]: {\n\t\t\t\tget: () => this.showAttachmentPrompt,\n\t\t\t},\n\t\t\t[ACTION_CHOOSE_LOCAL_ATTACHMENT]: {\n\t\t\t\tget: () => this.chooseLocalFile,\n\t\t\t},\n\t\t\t[ACTION_CREATE_ATTACHMENT]: {\n\t\t\t\tget: () => this.createAttachment,\n\t\t\t},\n\t\t\t[STATE_UPLOADING]: {\n\t\t\t\tget: () => this.state,\n\t\t\t},\n\t\t})\n\n\t\treturn val\n\t},\n\tsetup() {\n\t\tconst { connection } = useConnection()\n\t\tconst isMobile = useIsMobile()\n\t\tconst { editor } = useEditor()\n\t\treturn {\n\t\t\tconnection,\n\t\t\teditor,\n\t\t\tisMobile,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tlastFilePath: null,\n\t\t\tdraggedOver: false,\n\t\t\t// make it reactive to be used inject/provide\n\t\t\tstate: {\n\t\t\t\tisUploadingAttachments: false,\n\t\t\t},\n\t\t}\n\t},\n\tcomputed: {\n\t\tinitialFilePath() {\n\t\t\treturn this.lastFilePath ?? getDir(this.$file?.relativePath ?? '/')\n\t\t},\n\t},\n\tmethods: {\n\t\tsetDraggedOver(val, event) {\n\t\t\tif (event.dataTransfer.types.includes('Files')) {\n\t\t\t\tthis.draggedOver = val\n\t\t\t}\n\t\t},\n\t\tonPaste(e) {\n\t\t\tthis.uploadAttachmentFiles(e.detail.files)\n\t\t},\n\t\tonEditorDrop(e) {\n\t\t\tthis.uploadAttachmentFiles(e.detail.files, e.detail.position)\n\t\t},\n\t\tonAttachmentUploadFilePicked(event) {\n\t\t\tthis.uploadAttachmentFiles(event.target.files)\n\t\t\t// Clear input to ensure that the change event will be emitted if\n\t\t\t// the same file is picked again.\n\t\t\tevent.target.value = ''\n\t\t},\n\t\tchooseLocalFile() {\n\t\t\tthis.$refs.attachmentFileInput.click()\n\t\t},\n\t\tasync uploadAttachmentFiles(files, position = null) {\n\t\t\tif (!files) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.state.isUploadingAttachments = true\n\n\t\t\tconst uploadPromises = [...files].map((file) => {\n\t\t\t\treturn this.uploadAttachmentFile(file, position)\n\t\t\t})\n\n\t\t\treturn Promise.all(uploadPromises)\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tlogger.error('Uploading multiple attachments failed', { error })\n\t\t\t\t\tshowError(t('text', 'Uploading multiple attachments failed.'))\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.state.isUploadingAttachments = false\n\t\t\t\t})\n\t\t},\n\t\tasync uploadAttachmentFile(file, position = null) {\n\t\t\tthis.state.isUploadingAttachments = true\n\n\t\t\treturn uploadAttachment(this.connection, file)\n\t\t\t\t.then((response) => {\n\t\t\t\t\tthis.insertAttachment(\n\t\t\t\t\t\tresponse.data?.name,\n\t\t\t\t\t\tresponse.data?.id,\n\t\t\t\t\t\tfile.type,\n\t\t\t\t\t\tposition,\n\t\t\t\t\t\tresponse.data?.dirname,\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tlogger.error('Uploading attachment failed', { error })\n\t\t\t\t\tif (error.response?.data.error) {\n\t\t\t\t\t\tshowError(\n\t\t\t\t\t\t\tt('text', 'Uploading attachment failed: {error}', {\n\t\t\t\t\t\t\t\terror: error.response.data.error,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowError(t('text', 'Uploading attachment failed.'))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.state.isUploadingAttachments = false\n\t\t\t\t})\n\t\t},\n\t\tshowAttachmentPrompt() {\n\t\t\tconst currentUser = getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tOC.dialogs.filepicker(\n\t\t\t\tt('text', 'Insert an attachment'),\n\t\t\t\t(filePath) => {\n\t\t\t\t\tthis.insertFromPath(filePath)\n\t\t\t\t},\n\t\t\t\tfalse,\n\t\t\t\t[],\n\t\t\t\ttrue,\n\t\t\t\tundefined,\n\t\t\t\tthis.initialFilePath,\n\t\t\t)\n\t\t},\n\t\tinsertFromPath(filePath) {\n\t\t\tthis.lastFilePath = getDir(filePath)\n\n\t\t\tthis.state.isUploadingAttachments = true\n\n\t\t\treturn insertAttachmentFile(this.connection, filePath)\n\t\t\t\t.then((response) => {\n\t\t\t\t\tthis.insertAttachment(\n\t\t\t\t\t\tresponse.data?.name,\n\t\t\t\t\t\tresponse.data?.id,\n\t\t\t\t\t\tresponse.data?.mimetype,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tresponse.data?.dirname,\n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tlogger.error('Failed to insert from Files', { error })\n\t\t\t\t\tshowError(t('text', 'Failed to insert from Files'))\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.state.isUploadingAttachments = false\n\t\t\t\t})\n\t\t},\n\t\tcreateAttachment(template) {\n\t\t\tthis.state.isUploadingAttachments = true\n\t\t\treturn createAttachment(this.connection, template)\n\t\t\t\t.then((response) => {\n\t\t\t\t\tthis.insertAttachmentPreview(response.data?.id)\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tlogger.error('Failed to create attachment', { error })\n\t\t\t\t\tshowError(t('text', 'Failed to create attachment'))\n\t\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.state.isUploadingAttachments = false\n\t\t\t\t})\n\t\t},\n\t\tinsertAttachmentPreview(fileId) {\n\t\t\tconst url = new URL(generateUrl(`/f/${fileId}`), window.origin)\n\t\t\tconst href = url.href.replaceAll(' ', '%20')\n\t\t\tthis.editor.chain().focus().insertPreview(href).run()\n\t\t},\n\t\tinsertAttachment(name, fileId, mimeType, position = null, dirname = '') {\n\t\t\t// inspired by the fixedEncodeURIComponent function suggested in\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent\n\t\t\tconst src =\n\t\t\t\tdirname\n\t\t\t\t+ '/'\n\t\t\t\t+ encodeURIComponent(name).replace(/[!'()*]/g, (c) => {\n\t\t\t\t\treturn '%' + c.charCodeAt(0).toString(16).toUpperCase()\n\t\t\t\t})\n\t\t\t// simply get rid of brackets to make sure link text is valid\n\t\t\t// as it does not need to be unique and matching the real file name\n\t\t\tconst alt = name.replaceAll(/[[\\]]/g, '')\n\n\t\t\tconst chain = position\n\t\t\t\t? this.editor.chain().focus(position)\n\t\t\t\t: this.editor.chain()\n\n\t\t\tchain.setImage({ src, alt }).run()\n\n\t\t\tconst selection = this.editor.view.state.selection\n\t\t\tif (!selection.empty) {\n\t\t\t\t// If inserted image is first element, it is selected and would get overwritten by\n\t\t\t\t// subsequent editor inserts (see tiptap#3355). So unselect the image by placing\n\t\t\t\t// the cursor at the end of the selection.\n\t\t\t\tthis.editor.commands.focus(selection.to)\n\t\t\t}\n\n\t\t\t// Scroll image into view\n\t\t\tthis.editor.commands.scrollIntoView()\n\n\t\t\t// Store last inserted attachment src to focus it in ImageView.vue\n\t\t\tthis.editor.commands.setMeta('insertedAttachmentSrc', { src })\n\n\t\t\temit('text:image-node:add', null)\n\t\t},\n\t},\n}\n</script>\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div class=\"editor\">\n\t\t<MediaHandler v-if=\"$editorUpload\" class=\"text-editor__main\">\n\t\t\t<slot />\n\t\t</MediaHandler>\n\t\t<slot v-else />\n\t</div>\n</template>\n\n<script>\nimport { useEditorUpload } from '../Editor.provider.ts'\nimport MediaHandler from './MediaHandler.vue'\n\nexport default {\n\tname: 'MainContainer',\n\tcomponents: {\n\t\tMediaHandler,\n\t},\n\tmixins: [useEditorUpload],\n}\n</script>\n\n<style scoped lang=\"scss\">\n.text-editor__main,\n.editor {\n\tdisplay: flex;\n\tflex-direction: column;\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n\tbackground-clip: padding-box;\n\tborder-radius: var(--border-radius);\n\tpadding: 0;\n\tposition: relative;\n\twidth: 100%;\n}\n\n.text-editor__main {\n\t&.is-mobile {\n\t\tflex-grow: 1;\n\t\tflex-direction: column-reverse;\n\t}\n}\n</style>\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\tclass=\"text-editor__wrapper\"\n\t\t:class=\"{\n\t\t\t'has-conflicts': isResolvingConflict,\n\t\t\t'is-rich-workspace': isRichWorkspace,\n\t\t\t'is-rich-editor': isRichEditor,\n\t\t}\">\n\t\t<slot />\n\t</div>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { useEditorFlags } from '../../composables/useEditorFlags.ts'\nimport {\n\tOUTLINE_ACTIONS,\n\tOUTLINE_STATE,\n\tREAD_ONLY_ACTIONS,\n} from './Wrapper.provider.js'\n\nexport default {\n\tname: 'Wrapper',\n\tprovide() {\n\t\tconst val = {}\n\n\t\tObject.defineProperties(val, {\n\t\t\t[OUTLINE_STATE]: {\n\t\t\t\tget: () => this.outline,\n\t\t\t},\n\t\t\t[OUTLINE_ACTIONS]: {\n\t\t\t\tget: () => ({\n\t\t\t\t\ttoggle: this.outlineToggle,\n\t\t\t\t}),\n\t\t\t},\n\t\t\t[READ_ONLY_ACTIONS]: {\n\t\t\t\tget: () => ({\n\t\t\t\t\ttoggle: this.readOnlyToggle,\n\t\t\t\t}),\n\t\t\t},\n\t\t})\n\n\t\treturn val\n\t},\n\n\tprops: {\n\t\tisResolvingConflict: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\thasConnectionIssue: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tcontentLoaded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tshowOutlineOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst { isRichEditor, isRichWorkspace } = useEditorFlags()\n\t\treturn { isRichEditor, isRichWorkspace }\n\t},\n\n\tdata: () => ({\n\t\toutline: {\n\t\t\tvisible: false,\n\t\t\tenable: false,\n\t\t},\n\t}),\n\n\tcomputed: {\n\t\tshowOutline() {\n\t\t\treturn this.isAbleToShowOutline ? this.outline.visible : false\n\t\t},\n\t\tisAbleToShowOutline() {\n\t\t\tif (this.isRichWorkspace) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\treturn true\n\t\t},\n\t},\n\n\twatch: {\n\t\tshowOutlineOutside() {\n\t\t\tthis.outline.visible = this.showOutlineOutside\n\t\t},\n\t},\n\n\tmounted() {\n\t\tsubscribe('text:keyboard:outline', this.outlineToggle)\n\t\tthis.outline.enable = this.isAbleToShowOutline\n\n\t\tthis.$watch(\n\t\t\t() => this.isAbleToShowOutline,\n\t\t\t(enable) => {\n\t\t\t\t// make outline state reactive through the provider\n\t\t\t\tObject.assign(this.outline, { enable })\n\t\t\t},\n\t\t)\n\t},\n\n\tbeforeDestroy() {\n\t\tunsubscribe('text:keyboard:outline', this.outlineToggle)\n\t},\n\n\tmethods: {\n\t\toutlineToggle() {\n\t\t\tthis.outline.visible = !this.outline.visible\n\t\t\tthis.$emit('outline-toggled', this.outline.visible)\n\t\t},\n\t\treadOnlyToggle() {\n\t\t\tthis.$emit('read-only-toggled')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.text-editor__wrapper {\n\tdisplay: flex;\n\tflex-grow: 1;\n\n\twidth: 100%;\n\n\t.ProseMirror {\n\t\tmargin-top: 0 !important;\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Check if current platform is a mobile device\n *\n * @return {boolean} whether the platform is a mobile device\n */\nexport function isMobilePlatform() {\n\t// Use client hints if already available\n\tif (navigator?.userAgentData?.mobile !== undefined)\n\t\treturn navigator.userAgentData.mobile\n\n\t// use regex to match userAgent (required for Safari and Firefox in 2022)\n\tconst mobileDevices = [\n\t\t/Android/i,\n\t\t/webOS/i,\n\t\t/iPhone/i,\n\t\t/iPad/i,\n\t\t/iPod/i,\n\t\t/playbook/i,\n\t\t/silk/i,\n\t\t/BlackBerry/i,\n\t\t/Windows Phone/i,\n\t]\n\n\treturn mobileDevices.some((regex) => navigator.userAgent.match(regex))\n}\n","<!--\n  - SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcDialog\n\t\tsize=\"large\"\n\t\tdata-text-el=\"formatting-help\"\n\t\t:name=\"t('text', 'Formatting and shortcuts')\"\n\t\t:close-on-click-outside=\"true\"\n\t\t@closing=\"$emit('close')\">\n\t\t<h2>{{ t('text', 'Formatting and shortcuts') }}</h2>\n\t\t<p>{{ t('text', 'Speed up your writing with simple shortcuts.') }}</p>\n\t\t<p v-if=\"!isMobileCached\">\n\t\t\t{{\n\t\t\t\tt(\n\t\t\t\t\t'text',\n\t\t\t\t\t'Just type the Markdown syntax or use keyboard shortcuts from below.',\n\t\t\t\t)\n\t\t\t}}\n\t\t</p>\n\t\t<p v-else>\n\t\t\t{{ t('text', 'Just type the Markdown syntax from below.') }}\n\t\t</p>\n\n\t\t<table>\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>{{ t('text', 'Style') }}</th>\n\t\t\t\t\t<th>{{ t('text', 'Syntax') }}</th>\n\t\t\t\t\t<th v-if=\"!isMobileCached\">\n\t\t\t\t\t\t{{ t('text', 'Keyboard shortcuts') }}\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'New paragraph') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<kbd>{{ t('text', 'Enter') }}</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" />\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Hard line break') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<kbd>{{ t('text', 'Enter') }}</kbd>\n\t\t\t\t\t\t{{ t('text', 'followed by') }}\n\t\t\t\t\t\t<kbd>{{ t('text', 'Backspace') }}</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ t('text', 'Shift') }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>{{ t('text', 'Enter') }}</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Bold') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>**{{ t('text', 'Bold text') }}**</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>B</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Italic') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>*{{ t('text', 'Italicized text') }}*</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>I</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Strikethrough') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>~~{{ t('text', 'Mistaken text') }}~~</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>{{ t('text', 'Shift') }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>S</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Underline') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>__{{ t('text', 'Underlined text') }}__</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>U</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"ellipsis_top\">\n\t\t\t\t\t\t{{ t('text', 'Heading 1') }}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"ellipsis_top\">\n\t\t\t\t\t\t<code># {{ t('text', 'Heading level 1') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" class=\"ellipsis_top\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>{{ t('text', 'Shift') }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>1</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"noborder ellipsis\">…</td>\n\t\t\t\t\t<td class=\"noborder ellipsis\">…</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" class=\"ellipsis noborder\">…</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"noborder ellipsis_bottom\">\n\t\t\t\t\t\t{{ t('text', 'Heading 6') }}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"noborder ellipsis_bottom\">\n\t\t\t\t\t\t<code>###### {{ t('text', 'Heading level 6') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" class=\"noborder ellipsis_bottom\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>{{ t('text', 'Shift') }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>6</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Unordered list') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>* {{ t('text', 'An item') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>{{ t('text', 'Shift') }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>8</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Ordered list') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>1. {{ t('text', 'First item') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>{{ t('text', 'Shift') }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>7</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Checklist') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>* [] {{ t('text', 'To-Do item') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>{{ t('text', 'Shift') }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>9</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Blockquote') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>> {{ t('text', 'Quoted text') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>></kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Code block') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>``` {{ t('text', 'Some code') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" />\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Link') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>[Title](https://example.org)</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\">\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>K</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Insert emoji') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>:{{ t('text', 'emoji') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" />\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Mention someone') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>@{{ t('text', 'name') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" />\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Smart picker') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<code>/{{ t('text', 'something') }}</code>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" />\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\n\t\t<table vif=\"!isMobileCached\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>{{ t('text', 'Action') }}</th>\n\t\t\t\t\t<th>{{ t('text', 'Keyboard shortcuts') }}</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Undo') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>Z</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Redo') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>Y</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{{ t('text', 'Toggle outline') }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<kbd>{{ ctrlOrModKey }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>{{ t('text', 'Alt') }}</kbd>\n\t\t\t\t\t\t+\n\t\t\t\t\t\t<kbd>H</kbd>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t</NcDialog>\n</template>\n\n<script>\nimport { t } from '@nextcloud/l10n'\nimport NcDialog from '@nextcloud/vue/components/NcDialog'\nimport { isMobilePlatform } from '../helpers/platform.js'\nimport { MODIFIERS, TRANSLATIONS } from './Menu/keys.js'\n\nexport default {\n\tname: 'HelpModal',\n\tcomponents: {\n\t\tNcDialog,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tformatted: {\n\t\t\t\tbold: true,\n\t\t\t\titalic: true,\n\t\t\t\tstrikethrough: true,\n\t\t\t\theading1: true,\n\t\t\t\theading6: true,\n\t\t\t\tunorderdList: true,\n\t\t\t\torderedList: true,\n\t\t\t\tcheckList: true,\n\t\t\t\tblockQuote: true,\n\t\t\t\tcodeBlock: true,\n\t\t\t},\n\t\t\tctrlOrModKey: TRANSLATIONS[MODIFIERS.Mod],\n\t\t}\n\t},\n\tcomputed: {\n\t\tisFormatted() {\n\t\t\treturn (style) => this.formatted[style]\n\t\t},\n\t\t// Cache the output of `isMobilePlatform()`\n\t\tisMobileCached() {\n\t\t\treturn this.isMobilePlatform()\n\t\t},\n\t},\n\tmethods: {\n\t\tt,\n\t\ttoggleFormatted(style) {\n\t\t\tthis.formatted[style] = !this.formatted[style]\n\t\t},\n\t\tisMobilePlatform,\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\ntable {\n\tmargin-top: 24px;\n\tborder-collapse: collapse;\n\twidth: 100%;\n\n\ttbody tr {\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground-color: transparent !important;\n\t\t}\n\t}\n\n\tthead tr {\n\t\tborder: none;\n\t}\n\n\tth {\n\t\tfont-weight: bold;\n\t\tpadding: 0.75rem 1rem 0.75rem 0;\n\t\tborder-bottom: 2px solid var(--color-background-darker);\n\t}\n\n\ttd {\n\t\tpadding: 0.75rem 1rem 0.75rem 0;\n\t\tborder-top: 1px solid var(--color-background-dark);\n\t\tborder-bottom: unset;\n\n\t\t&.noborder {\n\t\t\tborder-top: unset;\n\t\t}\n\n\t\t&.ellipsis_top {\n\t\t\tpadding-bottom: 0;\n\t\t}\n\n\t\t&.ellipsis {\n\t\t\tpadding-top: 0;\n\t\t\tpadding-bottom: 0;\n\t\t}\n\n\t\t&.ellipsis_bottom {\n\t\t\tpadding-top: 0;\n\t\t}\n\t}\n\n\tkbd {\n\t\tfont-size: smaller;\n\t}\n\n\tcode {\n\t\tpadding: 0.2em 0.4em;\n\t\tfont-size: 90%;\n\t\tbackground-color: var(--color-background-dark);\n\t\tborder-radius: 6px;\n\t}\n}\n\n@import '../css/prosemirror';\n\ndiv.ProseMirror {\n\tdisplay: inline;\n\tmargin-top: unset;\n\tposition: unset;\n\tpadding: unset;\n\tline-height: unset;\n\n\th1,\n\th6 {\n\t\tdisplay: inline;\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t}\n}\n</style>\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<NextcloudVueNcActionButton\n\t\tclose-after-click\n\t\tdata-text-action-entry=\"formatting-help\"\n\t\tv-on=\"$listeners\">\n\t\t<template #icon>\n\t\t\t<Help />\n\t\t</template>\n\t\t{{ t('text', 'Formatting help') }}\n\t</NextcloudVueNcActionButton>\n</template>\n\n<script>\nimport { t } from '@nextcloud/l10n'\nimport NextcloudVueNcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport { defineComponent } from 'vue'\nimport { Help } from '../icons.js'\n\nexport default defineComponent({\n\t// This component is used as a direct child of NcActions.\n\t// Even if it actually renders NcActionButton, NcActions cannot see it due to rendering limitations in Vue.\n\t// Though it works in general, NcActions doesn't handle it correctly. See NcActions docs for details.\n\t// Hotfix - rename the component to NcActionButton because it represents and renders it.\n\t// eslint-disable-next-line vue/match-component-file-name\n\tname: 'NcActionButton',\n\tcomponents: {\n\t\tNextcloudVueNcActionButton,\n\t\tHelp,\n\t},\n\tmethods: {\n\t\tt,\n\t},\n})\n</script>\n","<!--\n  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcActionText data-text-action-entry=\"character-count\" :name=\"countString\">\n\t\t<template #icon>\n\t\t\t<AlphabeticalVariant />\n\t\t</template>\n\t</NcActionText>\n</template>\n\n<script>\nimport { translatePlural as n } from '@nextcloud/l10n'\nimport NcActionText from '@nextcloud/vue/components/NcActionText'\nimport { defineComponent, ref } from 'vue'\nimport { useEditor } from '../../composables/useEditor.ts'\nimport { AlphabeticalVariant } from '../icons.js'\n\nexport default defineComponent({\n\tname: 'CharacterCount',\n\tcomponents: {\n\t\tAlphabeticalVariant,\n\t\tNcActionText,\n\t},\n\tprops: {\n\t\tvisible: Boolean,\n\t},\n\tsetup() {\n\t\tconst { editor } = useEditor()\n\t\tconst countString = ref('')\n\t\tconst refresh = () => {\n\t\t\tconst { storage, state } = editor\n\t\t\t// characterCount is not reactive so we need this workaround\n\t\t\t// We also need to provide the doc as storage is a singleton in tiptap v2.\n\t\t\t// See ueberdosis/tiptap#6060\n\t\t\tconst wordCount = storage.characterCount.words({ node: state.doc })\n\t\t\tconst charCount = storage.characterCount.characters({ node: state.doc })\n\t\t\tconst words = n('text', '%n word', '%n words', wordCount)\n\t\t\tconst chars = n('text', '%n char', '%n chars', charCount)\n\t\t\tcountString.value = [words, chars].join(', ')\n\t\t\tconsole.debug({ wordCount, charCount, countString: countString.value })\n\t\t}\n\t\treturn { countString, refresh }\n\t},\n\twatch: {\n\t\tvisible: 'refresh',\n\t},\n\tcreated() {\n\t\tthis.refresh()\n\t},\n})\n</script>\n","<!--\n  - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcActionButton v-if=\"canTranslate\" close-after-click @click=\"showTranslate\">\n\t\t<template #icon>\n\t\t\t<TranslateVariant />\n\t\t</template>\n\t\t{{ t('text', 'Translate') }}\n\t</NcActionButton>\n</template>\n\n<script setup>\nimport { emit } from '@nextcloud/event-bus'\nimport { loadState } from '@nextcloud/initial-state'\nimport { t } from '@nextcloud/l10n'\nimport NcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport { useEditor } from '../../composables/useEditor.ts'\nimport { TranslateVariant } from '../icons.js'\n\nconst { editor } = useEditor()\nconst languages = loadState('text', 'translation_languages', {})\nconsole.debug(languages)\nconst canTranslate = Boolean(languages.from?.length)\n\nconst showTranslate = () => {\n\tconst {\n\t\tcommands,\n\t\tview: { state },\n\t} = editor.value\n\tconst { from, to } = state.selection\n\tlet selectedText = state.doc.textBetween(from, to, ' ')\n\tif (!selectedText.trim().length) {\n\t\tcommands.selectAll()\n\t\tselectedText = state.doc.textContent\n\t}\n\temit('text:translate-modal:show', { content: selectedText })\n}\n</script>\n","<!--\n  - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcActionCheckbox\n\t\tv-if=\"canToggleWidth\"\n\t\t:checked=\"isFullWidth\"\n\t\t@update:checked=\"setFullWidth\">\n\t\t{{ t('text', 'Full width editor') }}\n\t</NcActionCheckbox>\n</template>\n\n<script setup>\nimport { t } from '@nextcloud/l10n'\nimport NcActionCheckbox from '@nextcloud/vue/components/NcActionCheckbox'\nimport { useEditorWidth } from '../../composables/useEditorWidth.ts'\n\nconst { canToggleWidth, isFullWidth, setFullWidth } = useEditorWidth()\n</script>\n","<!--\n  - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div\n\t\t:id=\"randomID\"\n\t\tclass=\"text-menubar\"\n\t\tdata-text-el=\"menubar\"\n\t\trole=\"region\"\n\t\t:aria-label=\"t('text', 'Editor actions')\"\n\t\t:class=\"{\n\t\t\t'text-menubar--ready': isReady,\n\t\t\t'text-menubar--hide': isHidden,\n\t\t\t'text-menubar--is-workspace': isRichWorkspace,\n\t\t\t'is-mobile': $isMobile,\n\t\t}\">\n\t\t<HelpModal v-if=\"displayHelp\" @close=\"hideHelp\" />\n\n\t\t<div\n\t\t\tv-if=\"isRichEditor\"\n\t\t\tref=\"menubar\"\n\t\t\trole=\"toolbar\"\n\t\t\tclass=\"text-menubar__entries\"\n\t\t\t:aria-label=\"t('text', 'Formatting menu bar')\"\n\t\t\[email protected]=\"handleToolbarNavigation\"\n\t\t\[email protected]=\"handleToolbarNavigation\">\n\t\t\t<!-- The visible inline actions -->\n\t\t\t<component\n\t\t\t\t:is=\"\n\t\t\t\t\tactionEntry.component\n\t\t\t\t\t\t? actionEntry.component\n\t\t\t\t\t\t: actionEntry.children\n\t\t\t\t\t\t\t? 'ActionList'\n\t\t\t\t\t\t\t: 'ActionSingle'\n\t\t\t\t\"\n\t\t\t\tv-for=\"(actionEntry, index) in visibleEntries\"\n\t\t\t\tref=\"menuEntries\"\n\t\t\t\t:key=\"actionEntry.key\"\n\t\t\t\t:action-entry=\"actionEntry\"\n\t\t\t\t:can-be-focussed=\"activeMenuEntry === index\"\n\t\t\t\t@disabled=\"disableMenuEntry(actionEntry.key, $event)\"\n\t\t\t\t@click=\"activeMenuEntry = index\" />\n\n\t\t\t<!-- The remaining actions -->\n\t\t\t<ActionList\n\t\t\t\tref=\"remainingEntries\"\n\t\t\t\t:action-entry=\"hiddenEntries\"\n\t\t\t\t:can-be-focussed=\"activeMenuEntry === visibleEntries.length\"\n\t\t\t\t:force-enabled=\"true\"\n\t\t\t\t@click=\"activeMenuEntry = 'remain'\">\n\t\t\t\t<template #lastAction=\"{ visible }\">\n\t\t\t\t\t<TranslateButton />\n\t\t\t\t\t<WidthToggle />\n\t\t\t\t\t<ActionFormattingHelp @click=\"showHelp\" />\n\t\t\t\t\t<NcActionSeparator />\n\t\t\t\t\t<CharacterCount v-bind=\"{ visible }\" />\n\t\t\t\t</template>\n\t\t\t</ActionList>\n\t\t</div>\n\t\t<div class=\"text-menubar__slot\">\n\t\t\t<slot />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'\nimport { useElementSize } from '@vueuse/core'\nimport { ref } from 'vue'\n\nimport { t } from '@nextcloud/l10n'\nimport { useEditor } from '../../composables/useEditor.ts'\nimport { useEditorFlags } from '../../composables/useEditorFlags.ts'\nimport { useIsMobileMixin } from '../Editor.provider.ts'\nimport HelpModal from '../HelpModal.vue'\nimport { DotsHorizontal } from '../icons.js'\nimport ActionFormattingHelp from './ActionFormattingHelp.vue'\nimport ActionList from './ActionList.vue'\nimport ActionSingle from './ActionSingle.vue'\nimport CharacterCount from './CharacterCount.vue'\nimport { MenuEntries, ReadOnlyDoneEntries } from './entries.js'\nimport { MENU_ID } from './MenuBar.provider.js'\nimport ToolBarLogic from './ToolBarLogic.js'\nimport TranslateButton from './TranslateButton.vue'\nimport WidthToggle from './WidthToggle.vue'\n\nexport default {\n\tname: 'MenuBar',\n\tcomponents: {\n\t\tActionFormattingHelp,\n\t\tActionList,\n\t\tActionSingle,\n\t\tHelpModal,\n\t\tNcActionSeparator,\n\t\tCharacterCount,\n\t\tTranslateButton,\n\t\tWidthToggle,\n\t},\n\textends: ToolBarLogic,\n\tmixins: [useIsMobileMixin],\n\tprovide() {\n\t\tconst val = {}\n\n\t\tObject.defineProperties(val, {\n\t\t\t[MENU_ID]: {\n\t\t\t\tget: () => this.randomID,\n\t\t\t},\n\t\t})\n\n\t\treturn val\n\t},\n\tprops: {\n\t\tisHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\topenReadOnly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst editor = useEditor()\n\t\tconst { isRichEditor, isRichWorkspace } = useEditorFlags()\n\t\tconst menubar = ref()\n\t\tconst { width } = useElementSize(menubar)\n\t\treturn { editor, isRichEditor, isRichWorkspace, menubar, width }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tentries: this.openReadOnly\n\t\t\t\t? [...ReadOnlyDoneEntries, ...MenuEntries]\n\t\t\t\t: [...MenuEntries],\n\t\t\trandomID: `menu-bar-${Math.ceil(Math.random() * 10000 + 500).toString(16)}`,\n\t\t\tdisplayHelp: false,\n\t\t\tisReady: false,\n\t\t\tresize: null,\n\t\t}\n\t},\n\tcomputed: {\n\t\tvisibleEntries() {\n\t\t\tconst list = this.entries.filter(({ priority }) => {\n\t\t\t\t// if entry has no priority, we assume it always will be visible\n\t\t\t\treturn priority === undefined || priority <= this.iconsLimit\n\t\t\t})\n\n\t\t\treturn list\n\t\t},\n\t\thiddenEntries() {\n\t\t\tconst remainingEntries = this.entries.filter(({ priority }) => {\n\t\t\t\t// reverse logic from visibleEntries\n\t\t\t\treturn priority !== undefined && priority > this.iconsLimit\n\t\t\t})\n\t\t\tconst entries = remainingEntries.reduce((acc, entry, index) => {\n\t\t\t\t// If entry has children, merge them into list. Otherwise keep entry itself.\n\t\t\t\tconst children = entry.children ?? [entry]\n\t\t\t\t// If this block has menu entries, it should be separated for better visibility and a11y (menu item radio grouping)\n\t\t\t\tif (children.length > 1) {\n\t\t\t\t\tconst hasPreviousItem = acc.length && !acc.at(-1).isSeparator\n\t\t\t\t\tconst separatorBefore = hasPreviousItem\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: `separator-before-${entry.id}`,\n\t\t\t\t\t\t\t\t\tisSeparator: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: []\n\n\t\t\t\t\tconst hasNextItem = index !== remainingEntries.length - 1\n\t\t\t\t\tconst separatorAfter = hasNextItem\n\t\t\t\t\t\t? [{ key: `separator-after-${entry.id}`, isSeparator: true }]\n\t\t\t\t\t\t: []\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t...separatorBefore,\n\t\t\t\t\t\t...children,\n\t\t\t\t\t\t...separatorAfter,\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t\treturn [...acc, ...children]\n\t\t\t}, [])\n\n\t\t\treturn {\n\t\t\t\tkey: 'remain',\n\t\t\t\tlabel: this.t('text', 'Remaining actions'),\n\t\t\t\ticon: DotsHorizontal,\n\t\t\t\tchildren: entries,\n\t\t\t}\n\t\t},\n\t\ticonWidth() {\n\t\t\tconst style = this.menubar && getComputedStyle(this.menubar)\n\t\t\tconst clickableArea = style?.getPropertyValue('--default-clickable-area')\n\t\t\treturn parseInt(clickableArea) || 34\n\t\t},\n\t\ticonsLimit() {\n\t\t\t// leave some buffer - this is necessary so the bar does not wrap during resizing\n\t\t\tconst spaceToFill = this.width - 4\n\t\t\tconst spacePerSlot = this.$isMobile ? this.iconWidth : this.iconWidth + 2\n\t\t\tconst slots = Math.floor(spaceToFill / spacePerSlot)\n\t\t\t// Leave one slot empty for the three dot menu\n\t\t\treturn slots - 1\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.$nextTick(() => {\n\t\t\tthis.isReady = true\n\t\t\tthis.$emit('update:loaded', true)\n\t\t})\n\t},\n\tmethods: {\n\t\tshowHelp() {\n\t\t\tthis.displayHelp = true\n\t\t},\n\n\t\thideHelp() {\n\t\t\tthis.displayHelp = false\n\t\t},\n\t\tt,\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.text-menubar {\n\t--background-blur: blur(10px);\n\tposition: sticky;\n\ttop: 0;\n\tbottom: var(--default-grid-baseline);\n\twidth: 100%;\n\tz-index: 10021; // above modal-header so menubar is always on top\n\tbackground-color: var(--color-main-background-translucent);\n\tbackdrop-filter: var(--background-blur);\n\tmax-height: var(\n\t\t--default-clickable-area\n\t); // important for mobile so that the buttons are always inside the container\n\tborder-bottom: 1px solid var(--color-border);\n\tpadding-block: var(--default-grid-baseline);\n\n\tvisibility: hidden;\n\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\n\t&.is-mobile {\n\t\tborder-top: 1px solid var(--color-border);\n\t\tborder-bottom: unset;\n\t}\n\n\t&.text-menubar--ready:not(.text-menubar--hide) {\n\t\tvisibility: visible;\n\t\tanimation-name: fadeInDown;\n\t\tanimation-duration: 0.3s;\n\t}\n\n\t&.text-menubar--hide {\n\t\topacity: 0;\n\t\ttransition:\n\t\t\tvisibility 0.2s 0.4s,\n\t\t\topacity 0.2s 0.4s;\n\t}\n\t.text-menubar__entries {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tmargin-left: max(0px, calc((100% - var(--text-editor-max-width)) / 2));\n\t}\n\n\t.text-menubar__slot {\n\t\tjustify-content: flex-end;\n\t\tdisplay: flex;\n\t\tmin-width: max(0px, min(100px, (100% - var(--text-editor-max-width)) / 2));\n\t}\n\n\t&.text-menubar--is-workspace {\n\t\t.text-menubar__entries {\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n\n\t@media (max-width: 660px) {\n\t\t.text-menubar__entries {\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n}\n</style>\n"],"names":["undo","state","yUndoPluginKey","redo","defaultProtectedNodes","defaultDeleteFilter","item","protectedNodes","Item","ContentType","Text","XmlElement","yUndoPlugin","trackedOrigins","undoManager","Plugin","initargs","ystate","ySyncPluginKey","_undoManager","UndoManager","tr","val","oldState","binding","hasUndoOps","hasRedoOps","getRelativeSelection","view","stackItem","Collaboration","Extension","extension","dispatch","_a","fragment","yUndoPluginInstance","originalUndoPluginView","viewRet","hasUndoManSelf","observers","ySyncPluginOptions","ySyncPluginInstance","ySyncPlugin","jsonContent","yXmlFragmentToProsemirrorJSON","error","PluginKey","isChangeOrigin","transaction","_sfc_main","defineComponent","NcDialogButton","NcModal","arr","element","value","props","emit","slots","wrapper","ref","dialogWidth","useElementSize","isNavigationCollapsed","computed","hasNavigation","navigationId","GenRandomId","navigationAriaLabelAttr","navigationAriaLabelledbyAttr","dialogElement","dialogTagName","dialogListeners","event","showModal","handleButtonClose","button","result","handleClosing","handleClosed","modalProps","_sfc_render","_vm","_c","$event","idx","_","_sfc_staticRenderFns","__component__","normalizeComponent","NcDialog","NextcloudVueNcActionButton","BaseActionEntry","actionEntry","NcActions","NcActionSeparator","ActionListItem","useOutlineStateMixin","useMenuIDMixin","editor","children","child","getIsActive","visible","t","debounce","entry","getActionState","NcButton","ToolBarLogic","menuKey","index","key","modulo","a","b","ActionList","ActionSingle","useIsMobileMixin","isRichWorkspace","useEditorFlags","ReadOnlyEditEntries","OutlineEntries","valueSingleton","loadState","editorWidthKey","maxWidthSetOutsideOfText","alreadySet","setByText","provideEditorWidth","provide","isFullWidth","readonly","subscribe","width","applyEditorWidth","watch","useEditorWidth","inject","checked","axios","generateUrl","ActionGlobalMixin","id","useModelMigration","NcActionCheckbox","exports","_typeof","obj","SLASH","DOT","assertPath","path","posixNormalize","allowAboveRoot","res","lastSegmentLength","lastSlash","dots","code","i","lastSlashIndex","decode","s","normalize","p","isAbsolute","trailingSeparator","_default","module","AttachmentResolver","#session","#user","#shareToken","#currentDirectory","#documentId","#initAttachmentListPromise","#attachmentList","session","user","shareToken","currentDirectory","fileId","#updateAttachmentList","response","#findAttachment","fileName","src","fallback","attachment","directoryRegexp","imageFileName","isDirectUrl","#name","#davUrl","uid","encoded","#filePath","generateRemoteUrl","basename","dirname","#relativePath","f","pathNormalize","getNodeRangeDecorations","ranges","DecorationSet","decorations","doc","range","pos","node","Decoration","getSelectionRanges","$from","$to","depth","nodeRange","NodeRange$1","offset","from","to","selectionRange","SelectionRange","NodeRangeBookmark","anchor","head","mapping","$anchor","$head","NodeRangeSelection","Selection","bias","isCursor","isCursorAtEnd","$correctedHead","$correctedAnchor","$rangeFrom","$rangeTo","other","firstRange","lastRange","json","isNodeRangeSelection","selection","nodeRangeSelection","hideTextSelection","activeMouseSelection","isMac","isShift","isControl","isAlt","isMeta","isMod","isNodeRange","nodeRanges","getCSSText","style","cloneElement","clonedNode","sourceElements","targetElements","sourceElement","findElementNextToCoords","options","x","y","direction","resultElement","resultNode","currentX","allElements","prosemirrorIndex","filteredElements","target","getComputedStyle$1","property","minMax","min","max","getInnerCoords","paddingLeft","paddingRight","borderLeft","borderRight","bounds","removeNode","getDragHandleRanges","coords","posAtCoords","dragHandler","empty","dragHandleRanges","selectionRanges","isDragHandleWithinSelection","dragHandleRange","slice","clonedElement","getOuterNodePos","resolvedPos","getOuterNode","parent","currentNode","getRelativePos","absolutePos","absolutePositionToRelativePosition","getAbsolutePos","relativePos","relativePositionToAbsolutePosition","getOuterDomNode","domNode","tmpDomNode","dragHandlePluginDefaultKey","DragHandlePlugin","pluginKey","tippyOptions","onNodeChange","popup","locked","currentNodePos","currentNodeRelPos","e","isLocked","hideDragHandle","newPos","tippy","domNodePos","outerNode","outerNodePos","_view","nodeData","DragHandle","Vue","h","EditorContent","EditorOutline","DragVerticalIcon","useEditor","uploadAttachment","connection","file","documentId","sessionId","sessionToken","token","unref","formData","url","createAttachment","template","insertAttachmentFile","filePath","getDir","useFileMixin","ACTION_ATTACHMENT_PROMPT","ACTION_CHOOSE_LOCAL_ATTACHMENT","ACTION_CREATE_ATTACHMENT","STATE_UPLOADING","useConnection","isMobile","useIsMobile","files","position","uploadPromises","logger","showError","getCurrentUser","href","name","mimeType","c","alt","MediaHandler","useEditorUpload","OUTLINE_STATE","OUTLINE_ACTIONS","READ_ONLY_ACTIONS","isRichEditor","enable","unsubscribe","isMobilePlatform","regex","TRANSLATIONS","MODIFIERS","Help","AlphabeticalVariant","NcActionText","countString","storage","wordCount","charCount","words","n","chars","languages","canTranslate","commands","selectedText","canToggleWidth","setFullWidth","ActionFormattingHelp","HelpModal","CharacterCount","TranslateButton","WidthToggle","MENU_ID","menubar","ReadOnlyDoneEntries","MenuEntries","priority","remainingEntries","entries","acc","separatorBefore","separatorAfter","DotsHorizontal","clickableArea","spaceToFill","spacePerSlot"],"mappings":"kxCAoBO,MAAMA,GAAOC,GAASC,EAAe,SAASD,CAAK,GAAG,aAAa,QAAU,KAQvEE,GAAOF,GAASC,EAAe,SAASD,CAAK,GAAG,aAAa,QAAU,KAcvEG,GAAwB,IAAI,IAAI,CAAC,WAAW,CAAC,EAO7CC,GAAsB,CAACC,EAAMC,IAAmB,EAAED,aAAgBE,KAC7E,EAAEF,EAAK,mBAAmBG,KAC1B,EAAEH,EAAK,QAAQ,gBAAgBI,IAC9BJ,EAAK,QAAQ,gBAAgBK,IAAcJ,EAAe,IAAID,EAAK,QAAQ,KAAK,QAAQ,IACzFA,EAAK,QAAQ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