{"version":3,"file":"Wrapper-XbzQX4a7.chunk.mjs","sources":["../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","../node_modules/path-normalize/lib/index.js","../src/services/AttachmentResolver.js","../src/components/Menu/ActionFormattingHelp.vue","../src/components/Menu/CharacterCount.vue","../src/helpers/platform.js","../src/components/HelpModal.vue","../src/components/Menu/MenuBar.vue","../src/components/Editor/ContentContainer.vue","../src/components/Editor/MediaHandler.vue","../src/components/Editor/MainContainer.vue","../src/components/Editor/Wrapper.vue"],"sourcesContent":["<!--\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 class=\"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 :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 v-if=\"child.isSeparator\" :key=\"`child-${child.key}`\" />\n\t\t\t<ActionListItem v-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 NcActions from '@nextcloud/vue/components/NcActions'\nimport NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'\nimport { BaseActionEntry } from './BaseActionEntry.js'\nimport ActionListItem from './ActionListItem.vue'\nimport { getActionState, getIsActive } from './utils.js'\nimport { useOutlineStateMixin } from '../Editor/Wrapper.provider.js'\nimport useStore from '../../mixins/store.js'\nimport { useMenuIDMixin } from './MenuBar.provider.js'\nimport debounce from 'debounce'\n\nexport default {\n\tname: 'ActionList',\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionSeparator,\n\t\tActionListItem,\n\t},\n\textends: BaseActionEntry,\n\tmixins: [useStore, 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\t$editor,\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'\n\t\t\t\t\t? visible(this)\n\t\t\t\t\t: 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('text', '{menuItemName}, \"{selectedSubMenuItemName}\" is selected', {\n\t\t\t\t\tmenuItemName: this.actionEntry.label,\n\t\t\t\t\tselectedSubMenuItemName: this.currentChild.label,\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 => this.isChildEnabled(child))\n\t\t},\n\t\tisChildEnabled(child) {\n\t\t\treturn !child.isSeparator\n\t\t\t\t&& !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 class=\"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 (this.activeMenuEntry > this.visibleEntries.length || this.visibleEntries[this.activeMenuEntry]?.disabled) {\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 = this.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 (this.activeMenuEntry < this.visibleEntries.length && this.visibleEntries[this.activeMenuEntry].disabled)\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 = this.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 (this.activeMenuEntry < this.visibleEntries.length && this.visibleEntries[this.activeMenuEntry].disabled)\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((a, b) => this.visibleEntries.findIndex(({ key }) => key === a.$vnode.data.key) - this.visibleEntries.findIndex(({ key }) => key === b.$vnode.data.key))\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 data-text-el=\"readonly-bar\" class=\"text-readonly-bar\">\n\t\t<div ref=\"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 :is=\"actionEntry.component ? actionEntry.component : (actionEntry.children ? 'ActionList' : 'ActionSingle')\"\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-menubar__slot\">\n\t\t\t<slot />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport { ReadOnlyEditEntries, OutlineEntries } from './entries.js'\n\nimport ActionList from './ActionList.vue'\nimport ActionSingle from './ActionSingle.vue'\nimport ToolBarLogic from './ToolBarLogic.js'\n\nexport default defineComponent({\n\tname: 'ReadonlyBar',\n\tcomponents: {\n\t\tActionList,\n\t\tActionSingle,\n\t},\n\textends: ToolBarLogic,\n\tprops: {\n\t\topenReadOnly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tentries: this.openReadOnly ? [...ReadOnlyEditEntries, ...OutlineEntries] : [...OutlineEntries],\n\t\t}\n\t},\n})\n</script>\n\n<style scoped>\n.text-readonly-bar {\n\tdisplay: flex;\n\theight: var(--default-clickable-area);\n\tborder-bottom: 1px solid var(--color-border);\n\tpadding-block: var(--default-grid-baseline);\n}\n.text-readonly-bar__entries {\n\tdisplay: flex;\n\tflex-grow: 1;\n}\n</style>\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 { generateUrl, generateRemoteUrl } from '@nextcloud/router'\nimport pathNormalize from 'path-normalize'\n\nimport store from '../store/index.js'\n\nconst setAttachmentList = (val) => store.dispatch('text/setAttachmentList', val)\nconst findAttachment = store.getters['text/findAttachment']\n\nexport default class AttachmentResolver {\n\n\t#session\n\t#user\n\t#shareToken\n\t#currentDirectory\n\t#documentId\n\t#initAttachmentListPromise\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\treturn setAttachmentList({ documentId: this.#documentId, session: this.#session, shareToken: this.#shareToken })\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(src.replace(directoryRegexp, '').split('?')[0])\n\n\t\t\t// Wait until attachment list got fetched (initialized by constructor)\n\t\t\tawait this.#initAttachmentListPromise\n\t\t\tattachment = 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 = findAttachment(imageFileName)\n\t\t\t}\n\n\t\t\tif (attachment) {\n\t\t\t\treturn attachment\n\t\t\t}\n\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).split('/').map(encodeURIComponent).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 = [\n\t\t\tthis.#currentDirectory,\n\t\t\tthis.#relativePath(src),\n\t\t].join('/')\n\n\t\treturn pathNormalize(f)\n\t}\n\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 src.startsWith('http://')\n\t\t|| src.startsWith('https://')\n\t\t|| src.startsWith('data:')\n}\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 close-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 { defineComponent } from 'vue'\nimport NextcloudVueNcActionButton from '@nextcloud/vue/components/NcActionButton'\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})\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 { defineComponent } from 'vue'\nimport { translatePlural as n } from '@nextcloud/l10n'\nimport NcActionText from '@nextcloud/vue/components/NcActionText'\nimport { AlphabeticalVariant } from '../icons.js'\nimport { useEditorMixin } from '../Editor.provider.js'\n\nexport default defineComponent({\n\tname: 'CharacterCount',\n\tcomponents: {\n\t\tAlphabeticalVariant,\n\t\tNcActionText,\n\t},\n\tmixins: [useEditorMixin],\n\tprops: {\n\t\tvisible: Boolean,\n\t},\n\tdata: () => ({\n\t\twordCount: 0,\n\t\tcharCount: 0,\n\t}),\n\tcomputed: {\n\t\tcountString() {\n\t\t\treturn `${n('text', '%n word', '%n words', this.wordCount)}, ${n('text', '%n char', '%n chars', this.charCount)}`\n\t\t},\n\t},\n\twatch: {\n\t\tvisible: 'refresh',\n\t},\n\tcreated() {\n\t\tthis.refresh()\n\t},\n\tmethods: {\n\t\trefresh() {\n\t\t\t// characterCount is not reactive so we need this workaround\n\t\t\tthis.wordCount = this.$editor.storage.characterCount.words()\n\t\t\tthis.charCount = this.$editor.storage.characterCount.characters()\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/**\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) return 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 size=\"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{{ t('text', 'Just type the Markdown syntax or use keyboard shortcuts from below.') }}\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><code>**{{ t('text', 'Bold text') }}**</code></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><code>*{{ t('text', 'Italicized text') }}*</code></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><code>~~{{ t('text', 'Mistaken text') }}~~</code></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><code>__{{ t('text', 'Underlined text') }}__</code></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\">\n\t\t\t\t\t\t…\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"noborder ellipsis\">\n\t\t\t\t\t\t…\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!isMobileCached\" class=\"ellipsis noborder\">\n\t\t\t\t\t\t…\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_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 NcDialog from '@nextcloud/vue/components/NcDialog'\nimport { isMobilePlatform } from '../helpers/platform.js'\nimport { TRANSLATIONS, MODIFIERS } 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\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>\n\ttable {\n\t\tmargin-top: 24px;\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\n\t\ttbody tr {\n\t\t\t&:hover, &:focus, &:active {\n\t\t\t\tbackground-color: transparent !important;\n\t\t\t}\n\t\t}\n\n\t\tthead tr {\n\t\t\tborder: none;\n\t\t}\n\n\t\tth {\n\t\t\tfont-weight: bold;\n\t\t\tpadding: .75rem 1rem .75rem 0;\n\t\t\tborder-bottom: 2px solid var(--color-background-darker);\n\t\t}\n\n\t\ttd {\n\t\t\tpadding: .75rem 1rem .75rem 0;\n\t\t\tborder-top: 1px solid var(--color-background-dark);\n\t\t\tborder-bottom: unset;\n\n\t\t\t&.noborder {\n\t\t\t\tborder-top: unset;\n\t\t\t}\n\n\t\t\t&.ellipsis_top {\n\t\t\t\tpadding-bottom: 0;\n\t\t\t}\n\n\t\t\t&.ellipsis {\n\t\t\t\tpadding-top: 0;\n\t\t\t\tpadding-bottom: 0;\n\t\t\t}\n\n\t\t\t&.ellipsis_bottom {\n\t\t\t\tpadding-top: 0;\n\t\t\t}\n\t\t}\n\n\t\tkbd {\n\t\t\tfont-size: smaller;\n\t\t}\n\n\t\tcode {\n\t\t\tpadding: .2em .4em;\n\t\t\tfont-size: 90%;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t\tborder-radius: 6px;\n\t\t}\n\t}\n\n\t@import '../css/prosemirror';\n\n\tdiv.ProseMirror {\n\t\tdisplay: inline;\n\t\tmargin-top: unset;\n\t\tposition: unset;\n\t\tpadding: unset;\n\t\tline-height: unset;\n\n\t\th1, h6 {\n\t\t\tdisplay: inline;\n\t\t\tpadding: 0;\n\t\t\tmargin: 0;\n\t\t}\n\t}\n</style>\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 :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 v-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\t@keyup.left.stop=\"handleToolbarNavigation\"\n\t\t\t@keyup.right.stop=\"handleToolbarNavigation\">\n\t\t\t<!-- The visible inline actions -->\n\t\t\t<component :is=\"actionEntry.component ? actionEntry.component : (actionEntry.children ? 'ActionList' : 'ActionSingle')\"\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 ref=\"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<NcActionButton v-if=\"canTranslate\" close-after-click @click=\"showTranslate\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<TranslateVariant />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('text', 'Translate') }}\n\t\t\t\t\t</NcActionButton>\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 { ref } from 'vue'\nimport NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'\nimport NcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport { loadState } from '@nextcloud/initial-state'\nimport { useElementSize } from '@vueuse/core'\nimport { emit } from '@nextcloud/event-bus'\n\nimport ActionFormattingHelp from './ActionFormattingHelp.vue'\nimport ActionList from './ActionList.vue'\nimport ActionSingle from './ActionSingle.vue'\nimport CharacterCount from './CharacterCount.vue'\nimport HelpModal from '../HelpModal.vue'\nimport ToolBarLogic from './ToolBarLogic.js'\nimport { ReadOnlyDoneEntries, MenuEntries } from './entries.js'\nimport { MENU_ID } from './MenuBar.provider.js'\nimport { DotsHorizontal, TranslateVariant } from '../icons.js'\nimport {\n\tuseEditorMixin,\n\tuseIsMobileMixin,\n\tuseIsRichEditorMixin,\n\tuseIsRichWorkspaceMixin,\n} from '../Editor.provider.js'\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\tNcActionButton,\n\t\tCharacterCount,\n\t\tTranslateVariant,\n\t},\n\textends: ToolBarLogic,\n\tmixins: [\n\t\tuseEditorMixin,\n\t\tuseIsMobileMixin,\n\t\tuseIsRichEditorMixin,\n\t\tuseIsRichWorkspaceMixin,\n\t],\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 menubar = ref()\n\t\tconst { width } = useElementSize(menubar)\n\t\treturn { menubar, width }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tentries: this.openReadOnly ? [...ReadOnlyDoneEntries, ...MenuEntries] : [...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\tcanTranslate: loadState('text', 'translation_languages', []).from?.length > 0,\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 ? [{ key: `separator-before-${entry.id}`, isSeparator: true }] : []\n\n\t\t\t\t\tconst hasNextItem = index !== remainingEntries.length - 1\n\t\t\t\t\tconst separatorAfter = hasNextItem ? [{ key: `separator-after-${entry.id}`, isSeparator: true }] : []\n\n\t\t\t\t\treturn [...acc, ...separatorBefore, ...children, ...separatorAfter]\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\n\t\t\t\t? this.iconWidth\n\t\t\t\t: 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\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\tshowTranslate() {\n\t\t\tconst { from, to } = this.$editor.view.state.selection\n\t\t\tlet selectedText = this.$editor.view.state.doc.textBetween(from, to, ' ')\n\n\t\t\tif (!selectedText.trim().length) {\n\t\t\t\tthis.$editor.commands.selectAll()\n\t\t\t\tselectedText = this.$editor.view.state.doc.textContent\n\t\t\t}\n\n\t\t\tconsole.debug('translation click', this.$editor.view.state.selection, selectedText)\n\t\t\temit('text:translate-modal:show', { content: selectedText })\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.text-menubar {\n\t\t--background-blur: blur(10px);\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tbottom: var(--default-grid-baseline);\n\t\twidth: 100%;\n\t\tz-index: 10021; // above modal-header so menubar is always on top\n\t\tbackground-color: var(--color-main-background-translucent);\n\t\tbackdrop-filter: var(--background-blur);\n\t\tmax-height: var(--default-clickable-area); // important for mobile so that the buttons are always inside the container\n\t\tborder-bottom: 1px solid var(--color-border);\n\t\tpadding-block: var(--default-grid-baseline);\n\n\t\tvisibility: hidden;\n\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t\talign-items: center;\n\n\t\t&.is-mobile {\n\t\t\tborder-top: 1px solid var(--color-border);\n\t\t\tborder-bottom: unset;\n\t\t}\n\n\t\t&.text-menubar--ready:not(.text-menubar--hide) {\n\t\t\tvisibility: visible;\n\t\t\tanimation-name: fadeInDown;\n\t\t\tanimation-duration: 0.3s;\n\t\t}\n\n\t\t&.text-menubar--hide {\n\t\t\topacity: 0;\n\t\t\ttransition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;\n\t\t}\n\t\t.text-menubar__entries {\n\t\t\tdisplay: flex;\n\t\t\tflex-grow: 1;\n\t\t\tmargin-left: max(0px, calc((100% - var(--text-editor-max-width)) / 2));\n\t\t}\n\n\t\t.text-menubar__slot {\n\t\t\tjustify-content: flex-end;\n\t\t\tdisplay: flex;\n\t\t\tmin-width: max(0px, min(100px, (100% - var(--text-editor-max-width)) / 2));\n\t\t}\n\n\t\t&.text-menubar--is-workspace {\n\t\t\t.text-menubar__entries {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\n\t\t@media (max-width: 660px) {\n\t\t\t.text-menubar__entries {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\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 data-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<EditorContent role=\"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 { EditorContent } from '@tiptap/vue-2'\nimport { useEditorMixin } from '../Editor.provider.js'\nimport { useOutlineStateMixin } from './Wrapper.provider.js'\nimport EditorOutline from './EditorOutline.vue'\n\nexport default {\n\tname: 'ContentContainer',\n\tcomponents: {\n\t\tEditorContent,\n\t\tEditorOutline,\n\t},\n\tmixins: [useEditorMixin, useOutlineStateMixin],\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\t.editor__content {\n\t\tmax-width: min(var(--text-editor-max-width), calc(100vw - 16px));\n\t\tmargin: auto;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t}\n\n\t.ie {\n\t\t.editor__content:deep(.ProseMirror) {\n\t\t\tpadding-top: 50px;\n\t\t}\n\t}\n\n\t.text-editor__content-wrapper {\n\t\t--side-width: calc((100% - var(--text-editor-max-width)) / 2);\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr auto;\n\t\t&.--show-outline {\n\t\t\tgrid-template-columns: var(--side-width) auto var(--side-width);\n\t\t}\n\t\t.text-editor__content-wrapper__left,\n\t\t.text-editor__content-wrapper__right {\n\t\t\theight: 100%;\n\t\t\tposition: relative;\n\t\t}\n\t}\n\n\t.is-rich-workspace {\n\t\t.text-editor__content-wrapper {\n\t\t\t--side-width: var(--text-editor-max-width);\n\t\t\tgrid-template-columns: var(--side-width) auto;\n\t\t\t.text-editor__content-wrapper__left,\n\t\t\t.text-editor__content-wrapper__right {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\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 class=\"editor editor-media-handler\"\n\t\tdata-text-el=\"editor-media-handler\"\n\t\t:class=\"{ draggedOver }\"\n\t\t@image-paste=\"onPaste\"\n\t\t@dragover.prevent.stop=\"setDraggedOver(true)\"\n\t\t@dragleave.prevent.stop=\"setDraggedOver(false)\"\n\t\t@drop.prevent.stop=\"setDraggedOver(false)\"\n\t\t@file-drop=\"onEditorDrop\">\n\t\t<input v-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 { logger } from '../../helpers/logger.js'\n\nimport {\n\tuseEditorMixin,\n\tuseFileMixin,\n\tuseSyncServiceMixin,\n} from '../Editor.provider.js'\n\nimport {\n\tACTION_ATTACHMENT_PROMPT,\n\tACTION_CHOOSE_LOCAL_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: [useEditorMixin, useFileMixin, useSyncServiceMixin],\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[STATE_UPLOADING]: {\n\t\t\t\tget: () => this.state,\n\t\t\t},\n\t\t})\n\n\t\treturn val\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) {\n\t\t\tthis.draggedOver = val\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 this.$syncService.uploadAttachment(file)\n\t\t\t\t.then((response) => {\n\t\t\t\t\tthis.insertAttachment(\n\t\t\t\t\t\tresponse.data?.name, response.data?.id, file.type,\n\t\t\t\t\t\tposition, response.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(t('text', 'Uploading attachment failed: {error}', { error: error.response.data.error }))\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(t('text', 'Insert an attachment'), (filePath) => {\n\t\t\t\tthis.insertFromPath(filePath)\n\t\t\t}, false, [], true, undefined, this.initialFilePath)\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 this.$syncService.insertAttachmentFile(filePath).then((response) => {\n\t\t\t\tthis.insertAttachment(\n\t\t\t\t\tresponse.data?.name, response.data?.id, response.data?.mimetype,\n\t\t\t\t\tnull, response.data?.dirname,\n\t\t\t\t)\n\t\t\t}).catch((error) => {\n\t\t\t\tlogger.error('Failed to insert from Files', { error })\n\t\t\t\tshowError(t('text', 'Failed to insert from Files'))\n\t\t\t}).then(() => {\n\t\t\t\tthis.state.isUploadingAttachments = false\n\t\t\t})\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 = dirname + '/'\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 MediaHandler from './MediaHandler.vue'\nimport { useEditorUpload } from '../Editor.provider.js'\n\nexport default {\n\tname: 'MainContainer',\n\tcomponents: {\n\t\tMediaHandler,\n\t},\n\tmixins: [\n\t\tuseEditorUpload,\n\t],\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.text-editor__main, .editor {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tbackground: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tbackground-clip: padding-box;\n\t\tborder-radius: var(--border-radius);\n\t\tpadding: 0;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t}\n\n\t.text-editor__main {\n\t\t&.is-mobile {\n\t\t\tflex-grow: 1;\n\t\t\tflex-direction: column-reverse;\n\t\t}\n\t}\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 class=\"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 { useIsRichEditorMixin, useIsRichWorkspaceMixin } from './../Editor.provider.js'\nimport { OUTLINE_STATE, OUTLINE_ACTIONS, READ_ONLY_ACTIONS } from './Wrapper.provider.js'\nimport useStore from '../../mixins/store.js'\nimport { mapState } from 'vuex'\n\nexport default {\n\tname: 'Wrapper',\n\tmixins: [useStore, useIsRichEditorMixin, useIsRichWorkspaceMixin],\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\tdata: () => ({\n\t\toutline: {\n\t\t\tvisible: false,\n\t\t\tenable: false,\n\t\t},\n\t}),\n\n\tcomputed: {\n\t\t...mapState({\n\t\t\tviewWidth: (state) => state.text.viewWidth,\n\t\t}),\n\t\tshowOutline() {\n\t\t\treturn this.isAbleToShowOutline\n\t\t\t\t? this.outline.visible\n\t\t\t\t: 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\t'showOutlineOutside'() {\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}\n</script>\n\n<style scoped lang=\"scss\">\n\t.text-editor__wrapper {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\n\t\twidth: 100%;\n\n\t\t.ProseMirror {\n\t\t\tmargin-top: 0 !important;\n\t\t}\n\t}\n</style>\n"],"names":["_sfc_main","NextcloudVueNcActionButton","BaseActionEntry","actionEntry","NcActions","NcActionSeparator","ActionListItem","useStore","useOutlineStateMixin","useMenuIDMixin","state","$editor","children","child","getIsActive","visible","debounce","val","entry","getActionState","NcButton","ToolBarLogic","defineComponent","menuKey","index","key","modulo","event","a","b","ActionList","ActionSingle","ReadOnlyEditEntries","OutlineEntries","exports","_typeof","obj","SLASH","DOT","assertPath","path","t","posixNormalize","allowAboveRoot","res","lastSegmentLength","lastSlash","dots","code","i","lastSlashIndex","decode","s","normalize","p","isAbsolute","trailingSeparator","_default","module","setAttachmentList","store","findAttachment","AttachmentResolver","#session","#user","#shareToken","#currentDirectory","#documentId","#initAttachmentListPromise","session","user","shareToken","currentDirectory","fileId","#updateAttachmentList","src","fallback","attachment","directoryRegexp","imageFileName","isDirectUrl","#name","#davUrl","uid","encoded","#filePath","generateRemoteUrl","basename","dirname","generateUrl","#relativePath","f","pathNormalize","Help","AlphabeticalVariant","NcActionText","useEditorMixin","n","isMobilePlatform","regex","NcDialog","TRANSLATIONS","MODIFIERS","style","ActionFormattingHelp","HelpModal","NcActionButton","CharacterCount","TranslateVariant","useIsMobileMixin","useIsRichEditorMixin","useIsRichWorkspaceMixin","MENU_ID","menubar","ref","width","useElementSize","ReadOnlyDoneEntries","MenuEntries","loadState","priority","remainingEntries","entries","acc","separatorBefore","separatorAfter","DotsHorizontal","clickableArea","spaceToFill","spacePerSlot","from","to","selectedText","emit","EditorContent","EditorOutline","getDir","useFileMixin","useSyncServiceMixin","ACTION_ATTACHMENT_PROMPT","ACTION_CHOOSE_LOCAL_ATTACHMENT","STATE_UPLOADING","e","files","position","uploadPromises","file","error","logger","showError","response","getCurrentUser","filePath","name","mimeType","c","alt","selection","MediaHandler","useEditorUpload","OUTLINE_STATE","OUTLINE_ACTIONS","READ_ONLY_ACTIONS","mapState","subscribe","enable","unsubscribe"],"mappings":"k+BA4BA,MAAAA,GAAA,CAMA,KAAA,iBAEA,WAAA,CACA,2BAAAC,CACA,EAEA,QAAAC,EAEA,SAAA,CACA,KAAA,QAAA,GAAA,cAAA,IAAA,KAAA,aAAA,CACA,EAEA,QAAA,CACA,WAAA,CACA,KAAA,CAAA,YAAAC,CAAA,EAAA,KAEAA,EAAA,MACAA,EAAA,MAAA,IAAA,EAIAA,EAAA,OAAA,KAAA,QAAA,MAAA,EAAA,MAAA,EAAA,KAAA,OAAA,GAAA,IAAA,EAGA,KAAA,UAAA,IAAA,CACA,KAAA,MAAA,UAAA,CAAA,GAAAA,CAAA,CAAA,CACA,CAAA,CACA,CACA,CACA,moBClBAH,GAAA,CACA,KAAA,aACA,WAAA,CACA,U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