Unfortunately, github.com/nextcloud/text is not REUSE compliant and does not fully adopt the recommendations to make software licensing easy for humans and machines alike. Have a look at our tutorial to learn about the three simple steps to become REUSE compliant.
To add the badge to your project's README.md
file,
use the following snippet:
[](https://api.reuse.software/info/github.com/nextcloud/text)
The API provides machine-readable artifacts for automatic analysis.
reuse spdx
command.
Commit 412942997720510a298f1795ab5710f7217be803
was checked on 14 Mar 2025 03:00:10 UTC
with the following result:
reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { registerFileListHeaders, registerDavProperty } from '@nextcloud/files'\nimport { loadState } from '@nextcloud/initial-state'\nimport { addMenuRichWorkspace, FilesWorkspaceHeader } from './helpers/files.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nconst workspaceAvailable = loadState('text', 'workspace_available')\n\nregisterDavProperty('nc:rich-workspace', { nc: 'http://nextcloud.org/ns' })\nregisterDavProperty('nc:rich-workspace-file', { nc: 'http://nextcloud.org/ns' })\n\nif (workspaceAvailable) {\n\taddMenuRichWorkspace()\n\tregisterFileListHeaders(FilesWorkspaceHeader)\n}\n"],"names":["workspaceAvailable","loadState","registerDavProperty","addMenuRichWorkspace","registerFileListHeaders","FilesWorkspaceHeader"],"mappings":"kfAWA,MAAMA,EAAqBC,EAAU,OAAQ,qBAAqB,EAElEC,EAAoB,oBAAqB,CAAE,GAAI,yBAA2B,CAAA,EAC1EA,EAAoB,yBAA0B,CAAE,GAAI,yBAA2B,CAAA,EAE3EF,IACHG,EAAoB,EACpBC,EAAwBC,CAAoB"' reuse._util - ERROR - 'js/text-init.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nconst openMimetypesMarkdown = [\n\t'text/markdown',\n]\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/javascript',\n\t'application/json',\n\t'application/x-perl',\n\t'application/x-php',\n\t'application/x-tex',\n\t'application/xml',\n\t'application/yaml',\n\t'text/asciidoc',\n\t'text/css',\n\t'text/html',\n\t'text/org',\n\t'text/x-c',\n\t'text/x-c++src',\n\t'text/x-h',\n\t'text/x-java-source',\n\t'text/x-ldif',\n\t'text/x-nfo',\n\t'text/x-python',\n\t'text/x-shellscript',\n]\n\nif (!OC.appswebroots?.richdocuments && !OC.appswebroots?.onlyoffice) {\n\topenMimetypesPlainText.push('text/csv')\n}\n\nconst openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]\n\nexport {\n\topenMimetypes,\n\topenMimetypesMarkdown,\n\topenMimetypesPlainText,\n}\n"],"names":["openMimetypesMarkdown","openMimetypesPlainText","openMimetypes"],"mappings":"MAKMA,EAAwB,CAC7B,eACD,EAEMC,EAAyB,CAC9B,aACA,kBACA,sBACA,8BACA,yBACA,mBACA,qBACA,oBACA,oBACA,kBACA,mBACA,gBACA,WACA,YACA,WACA,WACA,gBACA,WACA,qBACA,cACA,aACA,gBACA,oBACD,EAEI,CAAC,GAAG,cAAc,eAAiB,CAAC,GAAG,cAAc,YACxDA,EAAuB,KAAK,UAAU,EAGlC,MAACC,EAAgB,CAAC,GAAGF,EAAuB,GAAGC,CAAsB"' reuse._util - ERROR - 'js/mime-CuxkK4Yj.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div class=\"avatar-wrapper\" :style=\"sessionAvatarStyle\">\n\t\t<NcAvatar v-if=\"session.userId\"\n\t\t\t:user=\"session.userId ? session.userId : session.guestName\"\n\t\t\t:is-guest=\"session.userId === null\"\n\t\t\t:disable-menu=\"true\"\n\t\t\t:show-user-status=\"false\"\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:size=\"size\" />\n\t\t<div v-else class=\"avatar\" :style=\"sessionBackgroundStyle\">\n\t\t\t{{ guestInitial }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { NcAvatar } from '@nextcloud/vue'\nexport default {\n\tname: 'AvatarWrapper',\n\tcomponents: {\n\t\tNcAvatar,\n\t},\n\tprops: {\n\t\tsession: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tsize: {\n\t\t\ttype: Number,\n\t\t\tdefault: () => 32,\n\t\t},\n\t},\n\tcomputed: {\n\t\tsessionAvatarStyle() {\n\t\t\treturn {\n\t\t\t\t...this.sessionBackgroundStyle,\n\t\t\t\t'border-color': this.session.color,\n\t\t\t\t'border-width': '2px',\n\t\t\t\t'border-style': 'solid',\n\t\t\t\t'--size': this.size + 'px',\n\t\t\t\t'--font-size': this.size / 2 + 'px',\n\t\t\t}\n\t\t},\n\t\tsessionBackgroundStyle() {\n\t\t\treturn {\n\t\t\t\t'background-color': this.session.userId ? this.session.color + ' !important' : '#b9b9b9',\n\t\t\t}\n\t\t},\n\t\tguestInitial() {\n\t\t\treturn this.session.guestName === '' ? '?' : this.session.guestName.slice(0, 1).toUpperCase()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.avatar, .avatar-wrapper {\n\tborder-radius: 50%;\n\twidth: var(--size);\n\theight: var(--size);\n\ttext-align: center;\n\tcolor: #ffffff;\n\tline-height: var(--size);\n\tfont-size: var(--font-size);\n\tfont-weight: normal;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n</style>\n"],"names":["_sfc_main","NcAvatar"],"mappings":"8IAsBA,MAAAA,EAAA,CACA,KAAA,gBACA,WAAA,CACA,SAAAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,KAAA,CACA,KAAA,OACA,QAAA,IAAA,EACA,CACA,EACA,SAAA,CACA,oBAAA,CACA,MAAA,CACA,GAAA,KAAA,uBACA,eAAA,KAAA,QAAA,MACA,eAAA,MACA,eAAA,QACA,SAAA,KAAA,KAAA,KACA,cAAA,KAAA,KAAA,EAAA,IACA,CACA,EACA,wBAAA,CACA,MAAA,CACA,mBAAA,KAAA,QAAA,OAAA,KAAA,QAAA,MAAA,cAAA,SACA,CACA,EACA,cAAA,CACA,OAAA,KAAA,QAAA,YAAA,GAAA,IAAA,KAAA,QAAA,UAAA,MAAA,EAAA,CAAA,EAAA,YAAA,CACA,CACA,CACA"' reuse._util - ERROR - 'js/AvatarWrapper-CnM7N5W3.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n<template>\n\t<div id=\"files-setting-richworkspace\">\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"showWorkspace\" @update:checked=\"toggle\">\n\t\t\t{{ t('text', 'Show folder description') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { emit } from '@nextcloud/event-bus'\nimport axios from '@nextcloud/axios'\nimport { NcCheckboxRadioSwitch } from '@nextcloud/vue'\nimport { generateUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'FilesSettings',\n\tcomponents: {\n\t\tNcCheckboxRadioSwitch,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tshowWorkspace: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggle() {\n\t\t\t// FIXME: save to app config\n\t\t\tif (this.showWorkspace) {\n\t\t\t\temit('Text::showRichWorkspace')\n\t\t\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\t\t\tkey: 'workspace_enabled',\n\t\t\t\t\tvalue: '1',\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\temit('Text::hideRichWorkspace')\n\t\t\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\t\t\tkey: 'workspace_enabled',\n\t\t\t\t\tvalue: '0',\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcCheckboxRadioSwitch","emit","axios","generateUrl"],"mappings":"uSAkBA,MAAAA,EAAA,CACA,KAAA,gBACA,WAAA,CACA,sBAAAC,CACA,EACA,MAAA,CACA,MAAA,CACA,cAAA,IAAA,KAAA,oBACA,CACA,EACA,QAAA,CACA,QAAA,CAEA,KAAA,eACAC,EAAA,yBAAA,EACAC,EAAA,KAAAC,EAAA,qBAAA,EAAA,CACA,IAAA,oBACA,MAAA,GACA,CAAA,IAEAF,EAAA,yBAAA,EACAC,EAAA,KAAAC,EAAA,qBAAA,EAAA,CACA,IAAA,oBACA,MAAA,GACA,CAAA,EAEA,CACA,CACA"' reuse._util - ERROR - 'js/FilesSettings-DjOXVi_X.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<form :title=\"t('text', 'Enter your name so other people can see who is editing')\" class=\"guest-name-dialog\" @submit.prevent=\"setGuestName()\">\n\t\t<label><AvatarWrapper :session=\"session\" :size=\"32\" /></label>\n\t\t<input v-model=\"guestName\"\n\t\t\ttype=\"text\"\n\t\t\t:aria-label=\"t('text', 'Edit guest name')\"\n\t\t\t:placeholder=\"t('text', 'Guest')\">\n\t\t<input type=\"submit\"\n\t\t\tclass=\"icon-confirm\"\n\t\t\t:aria-label=\"t('text', 'Save guest name')\"\n\t\t\tvalue=\"\">\n\t</form>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\nimport AvatarWrapper from './AvatarWrapper.vue'\nimport { useSyncServiceMixin } from '../Editor.provider.js'\n\nexport default {\n\tname: 'GuestNameDialog',\n\tcomponents: {\n\t\tAvatarWrapper,\n\t},\n\tmixins: [\n\t\tuseSyncServiceMixin,\n\t],\n\tprops: {\n\t\tsession: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tguestName: '',\n\t\t\tguestNameBuffered: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\tavatarUrl() {\n\t\t\tconst size = 32\n\t\t\tconst avatarUrl = generateUrl(\n\t\t\t\t'/avatar/guest/{user}/{size}',\n\t\t\t\t{\n\t\t\t\t\tuser: this.guestNameBuffered,\n\t\t\t\t\tsize,\n\t\t\t\t})\n\t\t\treturn window.location.protocol + '//' + window.location.host + avatarUrl\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tthis.guestName = this.$syncService.guestName\n\t\tthis.updateBufferedGuestName()\n\t},\n\tmethods: {\n\t\tsetGuestName() {\n\t\t\tconst previousGuestName = this.$syncService.guestName\n\t\t\tthis.$syncService.updateSession(this.guestName).then(() => {\n\t\t\t\tlocalStorage.setItem('nick', this.guestName)\n\t\t\t\tthis.updateBufferedGuestName()\n\t\t\t}).catch((e) => {\n\t\t\t\tthis.guestName = previousGuestName\n\t\t\t})\n\t\t},\n\t\tupdateBufferedGuestName() {\n\t\t\tthis.guestNameBuffered = this.guestName\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\tform.guest-name-dialog {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tpadding: 6px;\n\n\t\t&:deep(img) {\n\t\t\tmargin: 0 !important;\n\t\t}\n\n\t\tinput[type=text] {\n\t\t\tflex-grow: 1;\n\t\t}\n\t\tlabel {\n\t\t\tpadding-right: 3px;\n\t\t\theight: 32px;\n\t\t}\n\t}\n</style>\n"],"names":["_sfc_main","AvatarWrapper","useSyncServiceMixin","avatarUrl","generateUrl","previousGuestName","e"],"mappings":"uaAwBA,MAAAA,EAAA,CACA,KAAA,kBACA,WAAA,CACA,cAAAC,CACA,EACA,OAAA,CACAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EACA,MAAA,CACA,MAAA,CACA,UAAA,GACA,kBAAA,EACA,CACA,EACA,SAAA,CACA,WAAA,CAEA,MAAAC,EAAAC,EACA,8BACA,CACA,KAAA,KAAA,kBACA,KACA,EAAA,CAAA,EACA,OAAA,OAAA,SAAA,SAAA,KAAA,OAAA,SAAA,KAAAD,CACA,CACA,EACA,aAAA,CACA,KAAA,UAAA,KAAA,aAAA,UACA,KAAA,wBAAA,CACA,EACA,QAAA,CACA,cAAA,CACA,MAAAE,EAAA,KAAA,aAAA,UACA,KAAA,aAAA,cAAA,KAAA,SAAA,EAAA,KAAA,IAAA,CACA,aAAA,QAAA,OAAA,KAAA,SAAA,EACA,KAAA,wBAAA,CACA,CAAA,EAAA,MAAAC,GAAA,CACA,KAAA,UAAAD,CACA,CAAA,CACA,EACA,yBAAA,CACA,KAAA,kBAAA,KAAA,SACA,CACA,CACA"' reuse._util - ERROR - 'js/GuestNameDialog-CnSlyqWa.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { logger } from './helpers/logger.js'\nimport { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\n/**\n * Wrapper for async registration of ViewerComponent.\n * Note: it should be named function - the name is used for component registration.\n *\n * @return {Promise<import('./components/ViewerComponent.vue')>} ViewerComponent\n */\nfunction AsyncTextViewerComponent() {\n\treturn import('./components/ViewerComponent.vue')\n}\n\nif (typeof OCA.Viewer === 'undefined') {\n\tlogger.error('Viewer app is not installed')\n} else {\n\tOCA.Viewer.registerHandler({\n\t\tid: 'text',\n\t\tmimes: [...openMimetypesMarkdown, ...openMimetypesPlainText],\n\t\tcomponent: AsyncTextViewerComponent,\n\t\tgroup: null,\n\t\ttheme: 'default',\n\t\tcanCompare: true,\n\t})\n}\n"],"file":"js/text-viewer.mjs"' reuse._util - ERROR - 'js/text-viewer.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nconst logger = getLoggerBuilder()\n\t.setApp('text')\n\t.detectUser()\n\t.build()\n\nexport {\n\tlogger,\n}\n"],"names":["logger","getLoggerBuilder"],"mappings":"+CAOK,MAACA,EAASC,EAAgB,EAC7B,OAAO,MAAM,EACb,WAAU,EACV,MAAK"' reuse._util - ERROR - 'js/logger-Csk1_XRx.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse '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 { NcActionButton as NextcloudVueNcActionButton } from '@nextcloud/vue'\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, NcActionSeparator } from '@nextcloud/vue'\nimport { BaseActionEntry } from './BaseActionEntry.js'\nimport ActionListItem from './ActionListItem.vue'\nimport { getActionSta' reuse._util - ERROR - 'js/Wrapper-CISHjFiH.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<BaseReader :content=\"content\" @click-link=\"(e, a) => $emit('click-link', e, a)\" />\n</template>\n\n<script>\nimport BaseReader from './BaseReader.vue'\nimport { RichText } from './../extensions/index.js'\nimport markdownit from './../markdownit/index.js'\n\nexport default {\n\tname: 'RichTextReader',\n\tcomponents: { BaseReader },\n\n\tprovide: {\n\t\trenderHtml(content) {\n\t\t\treturn markdownit.render(content)\n\t\t},\n\t\textensions() {\n\t\t\treturn [\n\t\t\t\tRichText.configure({\n\t\t\t\t\tediting: false,\n\t\t\t\t}),\n\t\t\t]\n\t\t},\n\t},\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\t@import './../css/prosemirror';\n\t@import './../css/print';\n</style>\n"],"names":["_sfc_main","BaseReader","content","markdownit","RichText"],"mappings":"8KAcA,MAAAA,EAAA,CACA,KAAA,iBACA,WAAA,CAAA,WAAAC,CAAA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,OAAAC,EAAA,OAAAD,CAAA,CACA,EACA,YAAA,CACA,MAAA,CACAE,EAAA,UAAA,CACA,QAAA,EACA,CAAA,CACA,CACA,CACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,CACA"' reuse._util - ERROR - 'js/RichTextReader-BAq8wJNR.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcModal v-if=\"active\" :name=\"fileName\" @close=\"close\">\n\t\t<Editor :file-id=\"fileId\"\n\t\t\t:relative-path=\"relativePath\"\n\t\t\t:active=\"active\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"mimeType\" />\n\t</NcModal>\n</template>\n\n<script>\nimport { NcModal } from '@nextcloud/vue'\n\nexport default {\n\tname: 'PublicFilesEditor',\n\tcomponents: {\n\t\tNcModal,\n\t\tEditor: () => import(/* webpackChunkName: \"editor\" */'./Editor.vue'),\n\t},\n\tprops: {\n\t\tfileId: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\trelativePath: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tshareToken: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tmimeType: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tcomputed: {\n\t\tfileName() {\n\t\t\treturn this.relativePath.substring(this.relativePath.lastIndexOf('/') + 1)\n\t\t},\n\t},\n\tmethods: {\n\t\tclose() {\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n"],"file":"js/PublicFilesEditor-CmzIDqjR.chunk.mjs"' reuse._util - ERROR - 'js/PublicFilesEditor-CmzIDqjR.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { logger } from '../helpers/logger.js'\n\nexport const EDITOR = Symbol('tiptap:editor')\nexport const FILE = Symbol('editor:file')\nexport const ATTACHMENT_RESOLVER = Symbol('attachment:resolver')\nexport const IS_MOBILE = Symbol('editor:is-mobile')\nexport const IS_PUBLIC = Symbol('editor:is-public')\nexport const IS_RICH_EDITOR = Symbol('editor:is-rich-editor')\nexport const IS_RICH_WORKSPACE = Symbol('editor:is-rich-woskapace')\nexport const SYNC_SERVICE = Symbol('sync:service')\nexport const EDITOR_UPLOAD = Symbol('editor:upload')\nexport const HOOK_MENTION_SEARCH = Symbol('hook:mention-search')\nexport const HOOK_MENTION_INSERT = Symbol('hook:mention-insert')\n\nexport const useEditorMixin = {\n\tinject: {\n\t\t$editor: { from: EDITOR, default: null },\n\t},\n}\n\nexport const useSyncServiceMixin = {\n\tinject: {\n\t\t$syncService: { from: SYNC_SERVICE, default: null },\n\t},\n}\n\nexport const useIsPublicMixin = {\n\tinject: {\n\t\t$isPublic: { from: IS_PUBLIC, default: false },\n\t},\n}\n\nexport const useIsRichWorkspaceMixin = {\n\tinject: {\n\t\t$isRichWorkspace: { from: IS_RICH_WORKSPACE, default: false },\n\t},\n}\n\nexport const useIsRichEditorMixin = {\n\tinject: {\n\t\t$isRichEditor: { from: IS_RICH_EDITOR, default: false },\n\t},\n}\n\nexport const useIsMobileMixin = {\n\tinject: {\n\t\t$isMobile: { from: IS_MOBILE, default: false },\n\t},\n}\n\nexport const useFileMixin = {\n\tinject: {\n\t\t$file: {\n\t\t\tfrom: FILE,\n\t\t\tdefault: () => ({\n\t\t\t\tfileId: 0,\n\t\t\t\trelativePath: null,\n\t\t\t\tdocument: null,\n\t\t\t}),\n\t\t},\n\t},\n}\n\nexport const useAttachmentResolver = {\n\tinject: {\n\t\t$attachmentResolver: {\n\t\t\tfrom: ATTACHMENT_RESOLVER,\n\t\t\tdefault: {\n\t\t\t\tresolve(src) {\n\t\t\t\t\tlogger.warn('No attachment resolver provided. Some attachment sources cannot be resolved.')\n\t\t\t\t\treturn [src]\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n}\nexport const useEditorUpload = {\n\tinject: {\n\t\t$editorUpload: {\n\t\t\tfrom: EDITOR_UPLOAD,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\nexport const useMentionHook = {\n\tinject: {\n\t\t$mentionHookInsert: {\n\t\t\tfrom: HOOK_MENTION_INSERT,\n\t\t\tdefault: true,\n\t\t},\n\t\t$mentionHookSearch: {\n\t\t\tfrom: HOOK_MENTION_SEARCH,\n\t\t\tdefault: true,\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\nexport const STATE_UPLOADING = Symbol('state:uploading-state')\nexport const ACTION_ATTACHMENT_PROMPT = Symbol('editor:action:attachment-prompt')\nexport const ACTION_CHOOSE_LOCAL_ATTACHMENT = Symbol('editor:action:upload-attachment')\n\nexport const useUploadingStateMixin = {\n\tinject: {\n\t\t$uploadingState: {\n\t\t\tfrom: STATE_UPLOADING,\n\t\t\tdefault: {\n\t\t\t\tisUploadingAttachments: false,\n\t\t\t},\n\t\t},\n\t},\n}\n\nexport const useActionAttachmentPromptMixin = {\n\tinject: {\n\t\t$callAttachmentPrompt: { from: ACTION_ATTACHMENT_PROMPT, default: () => {} },\n\t},\n}\n\nexport const useActionChooseLocalAttachmentMixin = {\n\tinject: {\n\t\t$callChooseLocalAttachment: { from: ACTION_CHOOSE_LOCAL_ATTACHMENT, default: () => {} },\n\t},\n}\n"],"names":["EDITOR","FILE","ATTACHMENT_RESOLVER","IS_MOBILE","IS_PUBLIC","IS_RICH_EDITOR","IS_RICH_WORKSPACE","SYNC_SERVICE","EDITOR_UPLOAD","HOOK_MENTION_SEARCH","HOOK_MENTION_INSERT","useEditorMixin","useSyncServiceMixin","useIsPublicMixin","useIsRichWorkspaceMixin","useIsRichEditorMixin","useIsMobileMixin","useFileMixin","useAttachmentResolver","src","logger","useEditorUpload","STATE_UPLOADING","ACTION_ATTACHMENT_PROMPT","ACTION_CHOOSE_LOCAL_ATTACHMENT","useUploadingStateMixin","useActionAttachmentPromptMixin","useActionChooseLocalAttachmentMixin"],"mappings":"gDAOY,MAACA,EAAS,O' reuse._util - ERROR - 'js/MediaHandler.provider-C6D-wsfU.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<RichTextReader v-if=\"isRichEditor\"\n\t\t:content=\"content\" />\n\t<PlainTextReader v-else\n\t\t:content=\"content\" />\n</template>\n\n<script>\nimport PlainTextReader from './PlainTextReader.vue'\nimport RichTextReader from './RichTextReader.vue'\n\nexport default {\n\tname: 'Reader',\n\tcomponents: { PlainTextReader, RichTextReader },\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tisRichEditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\n\t#read-only-editor {\n\t\toverflow: scroll;\n\t}\n\n\t.thumbnailContainer #read-only-editor {\n\t\twidth: 100%;\n\n\t\t.ProseMirror {\n\t\t\theight: auto;\n\t\t\tmargin: 0 0 0 0;\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n</style>\n"],"names":["_sfc_main","PlainTextReader","RichTextReader"],"mappings":"yoBAgBA,MAAAA,EAAA,CACA,KAAA,SACA,WAAA,CAAA,gBAAAC,EAAA,eAAAC,CAAA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,aAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,CACA"' reuse._util - ERROR - 'js/Reader-LXy8ELQ1.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\r\n-->\r\n\r\n<template>\r\n\t<NcPopover class=\"session-list\" placement=\"bottom\">\r\n\t\t<template #trigger=\"{ attrs }\">\r\n\t\t\t<div>\r\n\t\t\t\t<button :title=\"label\"\r\n\t\t\t\t\t:aria-label=\"label\"\r\n\t\t\t\t\tclass=\"avatar-list\"\r\n\t\t\t\t\tv-bind=\"attrs\">\r\n\t\t\t\t\t<div class=\"avatardiv icon-group\" />\r\n\t\t\t\t\t<AvatarWrapper v-for=\"session in sessionsVisible\"\r\n\t\t\t\t\t\t:key=\"session.id\"\r\n\t\t\t\t\t\t:session=\"session\"\r\n\t\t\t\t\t\t:size=\"30\" />\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</template>\r\n\t\t<template #default>\r\n\t\t\t<div class=\"session-menu\">\r\n\t\t\t\t<slot name=\"lastSaved\" />\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t<slot />\r\n\t\t\t\t\t<li v-for=\"session in participantsPopover\"\r\n\t\t\t\t\t\t:key=\"session.id\"\r\n\t\t\t\t\t\t:style=\"avatarStyle(session)\">\r\n\t\t\t\t\t\t<AvatarWrapper :session=\"session\" :size=\"36\" />\r\n\t\t\t\t\t\t<span class=\"session-label\">\r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\tsession.userId ? session.displayName : (session.guestName ? session.guestName : t('text', 'Guest'))\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span v-if=\"session.userId === null\" class=\"guest-label\">({{ t('text', 'guest') }})</span>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<NcCheckboxRadioSwitch :checked=\"isFullWidth\" @update:checked=\"onWidthToggle\">\r\n\t\t\t\t\t\t\t{{ t('text', 'Full width editor') }}\r\n\t\t\t\t\t\t</NcCheckboxRadioSwitch>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t</template>\r\n\t</NcPopover>\r\n</template>\r\n\r\n<script>\r\nimport { NcCheckboxRadioSwitch, NcPopover } from '@nextcloud/vue'\r\nimport AvatarWrapper from './AvatarWrapper.vue'\r\nimport { COLLABORATOR_DISCONNECT_TIME, COLLABORATOR_IDLE_TIME } from '../../services/SyncService.js'\r\nimport { loadState } from '@nextcloud/initial-state'\r\nimport axios from '@nextcloud/axios'\r\nimport { generateUrl } from '@nextcloud/router'\r\n\r\nexport default {\r\n\tname: 'SessionList',\r\n\tcomponents: {\r\n\t\tAvatarWrapper,\r\n\t\tNcPopover,\r\n\t\tNcCheckboxRadioSwitch,\r\n\t},\r\n\tprops: {\r\n\t\tsessions: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => {\r\n\t\t\t\treturn {}\r\n\t\t\t},\r\n\t\t},\r\n\t},\r\n\tdata() {\r\n\t\tconst isFullWidth = loadState('text', 'is_full_width_editor', false)\r\n\t\treturn {\r\n\t\t\tmyName: '',\r\n\t\t\tisFullWidth,\r\n\t\t}\r\n\t},\r\n\tcomputed: {\r\n\t\tlabel() {\r\n\t\t\treturn t('text', 'Active people')\r\n\t\t},\r\n\t\tparticipantsPopover() {\r\n\t\t\tif (this.currentSession?.guestName) {\r\n\t\t\t\treturn this.participantsWithoutCurrent\r\n\t\t\t}\r\n\t\t\treturn this.participants\r\n\t\t},\r\n\t\tparticipantsWithoutCurrent() {\r\n\t\t\treturn this.participants.filter((session) => !session.isCurrent)\r\n\t\t},\r\n\t\tparticipants() {\r\n\t\t\treturn Object.values(this.sessions).filter((session) =>\r\n\t\t\t\tsession.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME\r\n\t\t\t\t&& (session.userId !== null || session.guestName !== null),\r\n\t\t\t).sort((a, b) => a.lastContact < b.lastContact)\r\n\t\t},\r\n\t\tcurrentSession() {\r\n\t\t\treturn Object.values(this.sessions).find((session) => session.isCurrent)\r\n\t\t},\r\n\t\tavatarStyle() {\r\n\t\t\treturn (session) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\topacity: session.lastContact > Date.now() / 1000 - COLLABORATOR_IDLE_TIME ? 1 : 0.5,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsessionsVisible() {\r\n\t\t\treturn this.participantsWithoutCurrent.slice(0, 3)\r\n\t\t},\r\n\t},\r\n\tmethods: {\r\n\t\tonWidthToggle(checked) {\r\n\t\t\tthis.isFullWidth = checked\r\n\t\t\tthis.$emit('editor-width-change', checked ? '100%' : '80ch')\r\n\r\n\t\t\taxios.post(generateUrl('/apps/text/settings'), {\r\n\t\t\t\tkey: 'is_full_width_editor',\r\n\t\t\t\tvalue: checked ? '1' : '0',\r\n' reuse._util - ERROR - 'js/SessionList-BvDxxWUy.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<BaseReader :content=\"content\" />\n</template>\n\n<script>\n/* eslint-disable import/no-named-as-default */\nimport CodeBlock from '@tiptap/extension-code-block'\nimport escapeHtml from 'escape-html'\nimport BaseReader from './BaseReader.vue'\nimport { PlainText } from './../extensions/index.js'\n\nexport default {\n\tname: 'PlainTextReader',\n\tcomponents: { BaseReader },\n\n\tprovide: {\n\t\trenderHtml(content) {\n\t\t\treturn '<pre>' + escapeHtml(content) + '</pre>'\n\t\t},\n\t\textensions: () => [PlainText, CodeBlock],\n\t},\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n}\n</script>\n"],"names":["_sfc_main","BaseReader","content","escapeHtml","PlainText","CodeBlock"],"mappings":"6NAgBA,MAAAA,EAAA,CACA,KAAA,kBACA,WAAA,CAAA,WAAAC,CAAA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,MAAA,QAAAC,EAAAD,CAAA,EAAA,QACA,EACA,WAAA,IAAA,CAAAE,EAAAC,CAAA,CACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,CAEA"' reuse._util - ERROR - 'js/PlainTextReader-_IY8HU4N.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div id=\"direct-editor\" :class=\"{'icon-loading': saving}\">\n\t\t<Editor ref=\"editor\"\n\t\t\t:initial-session=\"initialSession\"\n\t\t\t:file-id=\"initial.fileId\"\n\t\t\t:active=\"true\"\n\t\t\t:mime=\"initial.mimetype\"\n\t\t\t:is-direct-editing=\"true\"\n\t\t\t@ready=\"loaded\">\n\t\t\t<template v-if=\"isMobile\" #header>\n\t\t\t\t<button class=\"icon-share\" @click=\"share\" />\n\t\t\t\t<button class=\"icon-close\" @click=\"close\" />\n\t\t\t</template>\n\t\t</Editor>\n\t</div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport Editor from '../components/Editor.vue'\n\nimport { logger } from '../helpers/logger.js'\n\nconst log = Vue.observable({\n\tmessages: [],\n\tmtime: 0,\n})\n\nconst callMobileMessage = (messageName, attributes) => {\n\tlogger.debug(`callMobileMessage ${messageName}`, { attributes })\n\tlet message = messageName\n\tif (typeof attributes !== 'undefined') {\n\t\tmessage = {\n\t\t\tMessageName: messageName,\n\t\t\tValues: attributes,\n\t\t}\n\t}\n\tlet attributesString = null\n\ttry {\n\t\tattributesString = JSON.stringify(attributes)\n\t} catch (e) {\n\t\tattributesString = null\n\t}\n\n\t// Forward to mobile handler\n\tif (window.DirectEditingMobileInterface && typeof window.DirectEditingMobileInterface[messageName] === 'function') {\n\t\tif (attributesString === null || typeof attributesString === 'undefined') {\n\t\t\twindow.DirectEditingMobileInterface[messageName]()\n\t\t} else {\n\t\t\twindow.DirectEditingMobileInterface[messageName](attributesString)\n\t\t}\n\t}\n\n\t// iOS webkit fallback\n\tif (window.webkit\n\t\t&& window.webkit.messageHandlers\n\t\t&& window.webkit.messageHandlers.DirectEditingMobileInterface) {\n\t\twindow.webkit.messageHandlers.DirectEditingMobileInterface.postMessage(message)\n\t}\n\n\twindow.postMessage(message)\n}\n\nwindow.addEventListener('message', function(message) {\n\tlog.messages.push(message.data)\n\tlogger.debug('postMessage', { message })\n})\n\nexport default {\n\tname: 'DirectEditing',\n\tcomponents: { Editor },\n\tdata() {\n\t\treturn {\n\t\t\tinitial: OCP.InitialState.loadState('text', 'file'),\n\t\t\tmessages: log.messages,\n\t\t\tlog,\n\t\t\tsaving: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tinitialSession() {\n\t\t\treturn JSON.parse(this.initial.session) || null\n\t\t},\n\t\tisMobile() {\n\t\t\treturn (window.DirectEditingMobileInterface || (window.webkit\n\t\t\t\t&& window.webkit.messageHandlers\n\t\t\t\t&& window.webkit.messageHandlers.DirectEditingMobileInterface))\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tcallMobileMessage('loading')\n\t},\n\tmounted() {\n\t\tdocument.querySelector('meta[name=\"viewport\"]').setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0')\n\n\t\tthis.$refs.editor.$on('push:forbidden', () => {\n\t\t\tlogger.warn('push was forbidden due to invalidated session')\n\t\t\tthis.reload()\n\t\t})\n\t},\n\tmethods: {\n\t\tasync close() {\n\t\t\tthis.saving = true\n\t\t\tsetTimeout(async () => {\n\t\t\t\tawait this.$refs.editor.$destroy()\n\t\t\t\tcallMobileMessage('close')\n\t\t\t}, 0)\n\t\t},\n\t\tshare() {\n\t\t\tcallMobileMessage('share')\n\t\t},\n\t\tloaded() {\n\t\t\tcallMobileMessage('loaded')\n\t\t},\n\t\treload() {\n\t\t\tcallMobileMessage('reload')\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\tbody {\n\t\tposition: fixed;\n\t\tbackground-color: var(--color-main-background);\n\t}\n\n\t#content[class=app-public] {\n\t\tmargin: 0;\n\t\tmargin-top: 0;\n\t}\n</style>\n\n<style scoped lang=\"scss\">\n\t#direct-editor {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tposition: fixed;\n\t\toverflow: auto;\n\n\t\t&:deep(.text-editor) {\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t}\n\t\t&:deep(.text-editor__wrapper div.ProseMirror) {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\n\tpre {\n\t\twidth: 100%;\n\t\tmax-width: 700px;' reuse._util - ERROR - 'js/DirectEditing-vgDtEPzh.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div v-if=\"enabled && localHasRichWorkspace\"\n\t\tid=\"rich-workspace\"\n\t\t:class=\"{'focus': focus, 'dark': darkTheme }\">\n\t\t<RichTextReader v-if=\"!loaded || !ready\" :content=\"content\" class=\"rich-workspace--preview\" />\n\t\t<Editor v-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"file.path\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\t:hide-menu=\"hideMenu\"\n\t\t\tactive\n\t\t\trich-workspace\n\t\t\t@ready=\"ready=true\"\n\t\t\t@focus=\"onFocus\"\n\t\t\t@error=\"reset\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { getSharingToken, isPublicShare } from '@nextcloud/sharing/public'\nimport getEditorInstance from '../components/Editor.singleton.js'\nimport RichTextReader from '../components/RichTextReader.vue'\nimport { loadState } from '@nextcloud/initial-state'\n\nconst IS_PUBLIC = isPublicShare()\nconst WORKSPACE_URL = generateOcsUrl('apps/text' + (IS_PUBLIC ? '/public' : '') + '/workspace', 2)\nconst descriptionFile = t('text', 'Readme') + '.' + loadState('text', 'default_file_extension')\nconst SUPPORTED_STATIC_FILENAMES = [descriptionFile, 'Readme.md', 'README.md', 'readme.md']\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tRichTextReader,\n\t\tEditor: getEditorInstance,\n\t},\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\thasRichWorkspace: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\t// Keep track of a local copy of the hasRichWorkspace state as it might change after initial rendering (e.g. when adding/removing the readme)\n\t\t\tlocalHasRichWorkspace: false,\n\t\t\tfocus: false,\n\t\t\tfolder: null,\n\t\t\tfile: null,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\thideMenu: true,\n\t\t\tdarkTheme: OCA.Accessibility && OCA.Accessibility.theme === 'dark',\n\t\t\tenabled: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn getSharingToken()\n\t\t},\n\t},\n\twatch: {\n\t\tpath() {\n\t\t\tthis.getFileInfo()\n\t\t},\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\tdocument.querySelector('#rich-workspace .text-editor__main').scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t\thasRichWorkspace(value) {\n\t\t\tthis.localHasRichWorkspace = value\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.localHasRichWorkspace = this.hasRichWorkspace\n\t\tif (this.enabled && this.hasRichWorkspace) {\n\t\t\tthis.getFileInfo()\n\t\t}\n\t\tsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tsubscribe('files:node:created', this.onFileCreated)\n\t\tsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.listenKeydownEvents()\n\n\t},\n\tbeforeDestroy() {\n\t\tunsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tunsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tunsubscribe('files:node:created', this.onFileCreated)\n\t\tunsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tunsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.unlistenKeydownEvents()\n\t},\n\tmethods: {\n\t\tonFocus() {\n\t\t\tthis.focus = true\n\t\t\tthis.hideMenu = false\n\t\t\tthis.unlistenKeydownEvents()\n\t\t},\n\t\treset() {\n\t\t\tthis.localHasRichWorkspace = false\n\t\t\tthis.file = null\n\t\t\tthis.focus = false\n\t\t\tthis.$nextTick(() =>' reuse._util - ERROR - 'js/RichWorkspace-CcX0wTC7.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\n/**\n * Callback that should be executed after the document is ready\n *\n * @param callback\n */\n\nconst documentReady = function(callback) {\n\tconst fn = () => setTimeout(callback, 0)\n\tif (document.attachEvent ? document.readyState === 'complete' : document.readyState !== 'loading') {\n\t\tfn()\n\t} else {\n\t\tdocument.addEventListener('DOMContentLoaded', callback)\n\t}\n}\n\nexport {\n\tdocumentReady,\n}\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\nimport { getSharingToken } from '@nextcloud/sharing/public'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nimport {\n\tregisterFileActionFallback,\n\tregisterFileCreate,\n} from './helpers/files.js'\nimport { logger } from './' reuse._util - ERROR - 'js/text-public.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nif (document.getElementById('app-content')) {\n\tPromise.all([\n\t\timport(/* webpackChunkName: \"editor\" */'vue'),\n\t\timport(/* webpackChunkName: \"editor\" */'./views/DirectEditing.vue'),\n\t]).then((imports) => {\n\t\tconst Vue = imports[0].default\n\t\tVue.prototype.t = window.t\n\t\tVue.prototype.OCA = window.OCA\n\t\tconst DirectEditing = imports[1].default\n\t\tconst vm = new Vue({\n\t\t\trender: h => h(DirectEditing),\n\t\t})\n\t\tvm.$mount(document.getElementById('app-content'))\n\t})\n}\n"],"file":"js/text-text.mjs"' reuse._util - ERROR - 'js/text-text.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse '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<EditorContent v-if=\"$editor\"\n\t\t\tid=\"read-only-editor\"\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 { Editor } from '@tiptap/core'\nimport { EditorContent } from '@tiptap/vue-2'\nimport { EDITOR } from './Editor.provider.js'\nimport { useOutlineStateMixin, useOutlineActions } from './Editor/Wrapper.provider.js'\nimport EditorOutline from './Editor/EditorOutline.vue'\n\nexport default {\n\tname: 'BaseReader',\n\tcomponents: {\n\t\tEditorContent,\n\t\tEditorOutline,\n\t},\n\n\tmixins: [useOutlineStateMixin, useOutlineActions],\n\n\tprovide() {\n\t\tconst val = {}\n\n\t\tObject.defineProperties(val, {\n\t\t\t[EDITOR]: {\n\t\t\t\tget: () => this.$editor,\n\t\t\t},\n\t\t})\n\n\t\treturn val\n\t},\n\n\t// extensions is a factory building a list of extensions for the editor\n\tinject: ['renderHtml', 'extensions'],\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thtmlContent() {\n\t\t\treturn this.renderHtml(this.content)\n\t\t},\n\t\tshowOutline() {\n\t\t\treturn this.$outlineState.visible\n\t\t},\n\t},\n\n\twatch: {\n\t\tcontent() {\n\t\t\tthis.updateContent()\n\t\t},\n\t},\n\n\tcreated() {\n\t\tthis.$editor = this.createEditor()\n\t\tthis.$editor.setEditable(false)\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.$editor.destroy()\n\t},\n\n\tmethods: {\n\t\tcreateEditor() {\n\t\t\treturn new Editor({\n\t\t\t\tcontent: this.htmlContent,\n\t\t\t\textensions: this.extensions(),\n\t\t\t})\n\t\t},\n\n\t\tupdateContent() {\n\t\t\tthis.$editor.commands.setContent(this.htmlContent, true)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.editor__content {\n\tmax-width: var(--text-editor-max-width);\n\tmargin: auto;\n\tposition: relative;\n\twidth: 100%;\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\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</style>\n"],"names":["_sfc_main","EditorContent","EditorOutline","useOutlineStateMixin","useOutlineActions","val","EDITOR","Editor"],"mappings":"8MA6BA,MAAAA,EAAA,CACA,KAAA,aACA,WAAA,CACA,cAAAC,EACA,cAAAC,CACA,EAEA,OAAA,CAAAC,EAAAC,CAAA,EAEA,SAAA,CACA,MAAAC,EAAA,CAAA,EAEA,OAAA,OAAA,iBAAAA,EAAA,CACA,CAAAC,CAAA,EAAA,CACA,IAAA,IAAA,KAAA,OACA,CACA,CAAA,EAEAD,CACA,EAGA,OAAA,CAAA,aAAA,YAAA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EAEA,SAAA,CACA,aAAA,CACA,OAAA,KAAA,WAAA,KAAA,OAAA,CACA,EACA,aAAA,CACA,OAAA,KAAA,cAAA,OACA,CACA,EAEA,MAAA,CACA,SAAA,CACA,KAAA,cAAA,CACA,CACA,EAEA,SAAA,CACA,KAAA,QAAA,KAAA,aAAA,EACA,KAAA,QAAA,YAAA,EAAA,CACA,EAEA,eAAA,CACA,KAAA,QAAA,QAAA,CACA,EAEA,QAAA,CACA,cAAA,CACA,OAAA,IAAAE,EAAA,CACA,QAAA,KAAA,YACA,WAAA,KAAA,WAAA,CACA,CAAA,CACA,EAEA,eAAA,CACA,KAAA,QAAA,SAAA,WAAA,KAAA,YAAA,EAAA,CACA,CACA,CACA"' reuse._util - ERROR - 'js/BaseReader-DnIanI_C.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<Editor v-if=\"!useSourceView\"\n\t\t:file-id=\"fileid\"\n\t\t:relative-path=\"filename\"\n\t\t:active=\"active || isEmbedded\"\n\t\t:autofocus=\"autofocus\"\n\t\t:share-token=\"shareToken\"\n\t\t:class=\"{ 'text-editor--embedding': isEmbedded }\"\n\t\t:mime=\"mime\"\n\t\t:show-outline-outside=\"showOutlineOutside\" />\n\t<div v-else\n\t\tid=\"editor-container\"\n\t\tdata-text-el=\"editor-container\"\n\t\tclass=\"text-editor source-viewer\">\n\t\t<Component :is=\"readerComponent\"\n\t\t\t:content=\"content\"\n\t\t\t:file-id=\"fileid\"\n\t\t\t:read-only=\"true\"\n\t\t\t:show-menu-bar=\"false\" />\n\t\t<NcButton v-if=\"isEmbedded\" class=\"toggle-interactive\" @click=\"toggleEdit\">\n\t\t\t{{ t('text', 'Edit') }}\n\t\t\t<template #icon>\n\t\t\t\t<PencilIcon />\n\t\t\t</template>\n\t\t</NcButton>\n\t</div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport axios from '@nextcloud/axios'\nimport { getSharingToken } from '@nextcloud/sharing/public'\nimport PencilIcon from 'vue-material-design-icons/Pencil.vue'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\nimport PlainTextReader from './PlainTextReader.vue'\nimport MarkdownContentEditor from './Editor/MarkdownContentEditor.vue'\nimport { translate, translatePlural } from '@nextcloud/l10n'\n\nimport getEditorInstance from './Editor.singleton.js'\n\nVue.prototype.t = translate\nVue.prototype.n = translatePlural\n\nexport default {\n\tname: 'ViewerComponent',\n\tcomponents: {\n\t\tNcButton: Vue.extend(NcButton),\n\t\tPencilIcon: Vue.extend(PencilIcon),\n\t\tPlainTextReader: Vue.extend(PlainTextReader),\n\t\tMarkdownContentEditor: Vue.extend(MarkdownContentEditor),\n\t\tEditor: getEditorInstance,\n\t},\n\tprovide() {\n\t\treturn {\n\t\t\tisEmbedded: this.isEmbedded,\n\t\t}\n\t},\n\tprops: {\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tautofocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tshareToken: {\n\t\t\ttype: String,\n\t\t\tdefault: () => getSharingToken(),\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tshowOutlineOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tpermissions: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tsource: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\tisEmbedded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tcontent: '',\n\t\t\thasToggledInteractiveEmbedding: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\t/** @return {boolean} */\n\t\tuseSourceView() {\n\t\t\treturn this.source && (this.fileVersion || !this.fileid || this.isEmbedded) && !this.hasToggledInteractiveEmbedding\n\t\t},\n\n\t\t/** @return {boolean} */\n\t\treaderComponent() {\n\t\t\treturn this.mime === 'text/markdown' ? MarkdownContentEditor : PlainTextReader\n\t\t},\n\t},\n\n\twatch: {\n\t\tsource() {\n\t\t\tthis.loadFileContent()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.loadFileContent()\n\t},\n\n\tmethods: {\n\t\tt: translate,\n\t\tasync loadFileContent() {\n\t\t\tif (this.useSourceView) {\n\t\t\t\tconst response = await axios.get(this.source)\n\t\t\t\tthis.content = response.data\n\t\t\t\tthis.contentLoaded = true\n\t\t\t}\n\t\t\tthis.$emit('update:loaded', true)\n\t\t},\n\t\ttoggleEdit() {\n\t\t\tthis.hasToggledInteractiveEmbedding = true\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.text-editor:not(.viewer__file--hidden) {\n\ttop: 0;\n\twidth: 100%;\n\tmax-width: 100%;\n\theight: 100%;\n\tleft: 0;\n\tmargin: 0 auto;\n\tposition: relative;\n\tbackground-color: var(--color-main-background);\n\n\t&.source-viewer {\n\t\tdisplay: block;\n\n\t\t.text-editor__content-wrapper {\n\t\t\tmargin' reuse._util - ERROR - 'js/ViewerComponent-DTQOPy6Y.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\nimport { loadState } from '@nextcloud/initial-state'\n\nimport { logger } from './helpers/logger.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nconst workspaceAvailable = loadState('text', 'workspace_available')\nconst workspaceEnabled = loadState('text', 'workspace_enabled')\nconst openReadOnlyEnabled = loadState('text', 'open_read_only_enabled')\n\ndocument.addEventListener('DOMContentLoaded', async () => {\n\tif (typeof OCA.Viewer === 'undefined') {\n\t\tconst { registerFileActionFallback } = await import('./helpers/files.js')\n\t\tlogger.error('Viewer app is not installed')\n\t\tregisterFileActionFallback()\n\t}\n\n\tif (workspaceAvailable && OCA && OCA?.Files?.Settings) {\n\t\tconst { default: Vue } = await import('vue')\n\t\tconst { default: FilesSettings } = await import('./views/FilesSettings.vue')\n\n\t\tVue.prototype.t = window.t\n\t\tVue.prototype.n = window.n\n\t\tVue.prototype.OCA = window.OCA\n\t\tconst vm = new Vue({\n\t\t\trender: h => h(FilesSettings, {}),\n\t\t})\n\t\tconst el = vm.$mount().$el\n\t\tOCA.Files.Settings.register(new OCA.Files.Settings.Setting('text', {\n\t\t\tel: () => { return el },\n\t\t}))\n\t}\n})\n\nOCA.Text = {\n\tRichWorkspaceEnabled: workspaceEnabled,\n\tOpenReadOnlyEnabled: openReadOnlyEnabled,\n}\n"],"file":"js/text-files.mjs"' reuse._util - ERROR - 'js/text-files.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\n/**\n * Get instance of Editor component\n * Using singleton approach here to avoid duplicate yjs import error\n * @return {Promise<*>}\n */\nexport default async function getEditorInstance() {\n\tif (!window._nc_text_editor_instance) {\n\t\tif (window._nc_text_editor_importing) {\n\t\t\treturn await new Promise((resolve) => {\n\t\t\t\tconst intervalId = setInterval(() => {\n\t\t\t\t\tif (!window._nc_text_editor_instance) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tresolve(window._nc_text_editor_instance)\n\t\t\t\t\tclearInterval(intervalId)\n\t\t\t\t}, 200)\n\t\t\t})\n\t\t} else {\n\t\t\twindow._nc_text_editor_importing = true\n\t\t}\n\t\tconst Editor = await import(/* webpackChunkName: \"editor\" */'./Editor.vue')\n\t\tconst { default: Vue } = await import('vue')\n\t\tVue.prototype.t = window.t\n\t\tVue.prototype.OCA = window.OCA\n\t\tconst EditorConstructor = Vue.extend(Editor.default)\n\t\twindow._nc_text_editor_instance = EditorConstructor\n\t}\n\treturn window._nc_text_editor_instance\n}\n"],"file":"js/Editor.singleton-Dr8vGbaa.chunk.mjs"' reuse._util - ERROR - 'js/Editor.singleton-Dr8vGbaa.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { registerFileListHeaders, registerDavProperty } from '@nextcloud/files'\nimport { loadState } from '@nextcloud/initial-state'\nimport { addMenuRichWorkspace, FilesWorkspaceHeader } from './helpers/files.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nconst workspaceAvailable = loadState('text', 'workspace_available')\n\nregisterDavProperty('nc:rich-workspace', { nc: 'http://nextcloud.org/ns' })\nregisterDavProperty('nc:rich-workspace-file', { nc: 'http://nextcloud.org/ns' })\n\nif (workspaceAvailable) {\n\taddMenuRichWorkspace()\n\tregisterFileListHeaders(FilesWorkspaceHeader)\n}\n"],"names":["workspaceAvailable","loadState","registerDavProperty","addMenuRichWorkspace","registerFileListHeaders","FilesWorkspaceHeader"],"mappings":"kfAWA,MAAMA,EAAqBC,EAAU,OAAQ,qBAAqB,EAElEC,EAAoB,oBAAqB,CAAE,GAAI,yBAA2B,CAAA,EAC1EA,EAAoB,yBAA0B,CAAE,GAAI,yBAA2B,CAAA,EAE3EF,IACHG,EAAoB,EACpBC,EAAwBC,CAAoB"' reuse._util - ERROR - 'js/text-init.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nconst openMimetypesMarkdown = [\n\t'text/markdown',\n]\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/javascript',\n\t'application/json',\n\t'application/x-perl',\n\t'application/x-php',\n\t'application/x-tex',\n\t'application/xml',\n\t'application/yaml',\n\t'text/asciidoc',\n\t'text/css',\n\t'text/html',\n\t'text/org',\n\t'text/x-c',\n\t'text/x-c++src',\n\t'text/x-h',\n\t'text/x-java-source',\n\t'text/x-ldif',\n\t'text/x-nfo',\n\t'text/x-python',\n\t'text/x-shellscript',\n]\n\nif (!OC.appswebroots?.richdocuments && !OC.appswebroots?.onlyoffice) {\n\topenMimetypesPlainText.push('text/csv')\n}\n\nconst openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]\n\nexport {\n\topenMimetypes,\n\topenMimetypesMarkdown,\n\topenMimetypesPlainText,\n}\n"],"names":["openMimetypesMarkdown","openMimetypesPlainText","openMimetypes"],"mappings":"MAKMA,EAAwB,CAC7B,eACD,EAEMC,EAAyB,CAC9B,aACA,kBACA,sBACA,8BACA,yBACA,mBACA,qBACA,oBACA,oBACA,kBACA,mBACA,gBACA,WACA,YACA,WACA,WACA,gBACA,WACA,qBACA,cACA,aACA,gBACA,oBACD,EAEI,CAAC,GAAG,cAAc,eAAiB,CAAC,GAAG,cAAc,YACxDA,EAAuB,KAAK,UAAU,EAGlC,MAACC,EAAgB,CAAC,GAAGF,EAAuB,GAAGC,CAAsB"' reuse._util - ERROR - 'js/mime-CuxkK4Yj.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div class=\"avatar-wrapper\" :style=\"sessionAvatarStyle\">\n\t\t<NcAvatar v-if=\"session.userId\"\n\t\t\t:user=\"session.userId ? session.userId : session.guestName\"\n\t\t\t:is-guest=\"session.userId === null\"\n\t\t\t:disable-menu=\"true\"\n\t\t\t:show-user-status=\"false\"\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:size=\"size\" />\n\t\t<div v-else class=\"avatar\" :style=\"sessionBackgroundStyle\">\n\t\t\t{{ guestInitial }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { NcAvatar } from '@nextcloud/vue'\nexport default {\n\tname: 'AvatarWrapper',\n\tcomponents: {\n\t\tNcAvatar,\n\t},\n\tprops: {\n\t\tsession: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tsize: {\n\t\t\ttype: Number,\n\t\t\tdefault: () => 32,\n\t\t},\n\t},\n\tcomputed: {\n\t\tsessionAvatarStyle() {\n\t\t\treturn {\n\t\t\t\t...this.sessionBackgroundStyle,\n\t\t\t\t'border-color': this.session.color,\n\t\t\t\t'border-width': '2px',\n\t\t\t\t'border-style': 'solid',\n\t\t\t\t'--size': this.size + 'px',\n\t\t\t\t'--font-size': this.size / 2 + 'px',\n\t\t\t}\n\t\t},\n\t\tsessionBackgroundStyle() {\n\t\t\treturn {\n\t\t\t\t'background-color': this.session.userId ? this.session.color + ' !important' : '#b9b9b9',\n\t\t\t}\n\t\t},\n\t\tguestInitial() {\n\t\t\treturn this.session.guestName === '' ? '?' : this.session.guestName.slice(0, 1).toUpperCase()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.avatar, .avatar-wrapper {\n\tborder-radius: 50%;\n\twidth: var(--size);\n\theight: var(--size);\n\ttext-align: center;\n\tcolor: #ffffff;\n\tline-height: var(--size);\n\tfont-size: var(--font-size);\n\tfont-weight: normal;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n</style>\n"],"names":["_sfc_main","NcAvatar"],"mappings":"8IAsBA,MAAAA,EAAA,CACA,KAAA,gBACA,WAAA,CACA,SAAAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,KAAA,CACA,KAAA,OACA,QAAA,IAAA,EACA,CACA,EACA,SAAA,CACA,oBAAA,CACA,MAAA,CACA,GAAA,KAAA,uBACA,eAAA,KAAA,QAAA,MACA,eAAA,MACA,eAAA,QACA,SAAA,KAAA,KAAA,KACA,cAAA,KAAA,KAAA,EAAA,IACA,CACA,EACA,wBAAA,CACA,MAAA,CACA,mBAAA,KAAA,QAAA,OAAA,KAAA,QAAA,MAAA,cAAA,SACA,CACA,EACA,cAAA,CACA,OAAA,KAAA,QAAA,YAAA,GAAA,IAAA,KAAA,QAAA,UAAA,MAAA,EAAA,CAAA,EAAA,YAAA,CACA,CACA,CACA"' reuse._util - ERROR - 'js/AvatarWrapper-CnM7N5W3.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n<template>\n\t<div id=\"files-setting-richworkspace\">\n\t\t<NcCheckboxRadioSwitch :checked.sync=\"showWorkspace\" @update:checked=\"toggle\">\n\t\t\t{{ t('text', 'Show folder description') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { emit } from '@nextcloud/event-bus'\nimport axios from '@nextcloud/axios'\nimport { NcCheckboxRadioSwitch } from '@nextcloud/vue'\nimport { generateUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'FilesSettings',\n\tcomponents: {\n\t\tNcCheckboxRadioSwitch,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tshowWorkspace: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tmethods: {\n\t\ttoggle() {\n\t\t\t// FIXME: save to app config\n\t\t\tif (this.showWorkspace) {\n\t\t\t\temit('Text::showRichWorkspace')\n\t\t\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\t\t\tkey: 'workspace_enabled',\n\t\t\t\t\tvalue: '1',\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\temit('Text::hideRichWorkspace')\n\t\t\t\taxios.post(generateUrl('/apps/text/settings'), {\n\t\t\t\t\tkey: 'workspace_enabled',\n\t\t\t\t\tvalue: '0',\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcCheckboxRadioSwitch","emit","axios","generateUrl"],"mappings":"uSAkBA,MAAAA,EAAA,CACA,KAAA,gBACA,WAAA,CACA,sBAAAC,CACA,EACA,MAAA,CACA,MAAA,CACA,cAAA,IAAA,KAAA,oBACA,CACA,EACA,QAAA,CACA,QAAA,CAEA,KAAA,eACAC,EAAA,yBAAA,EACAC,EAAA,KAAAC,EAAA,qBAAA,EAAA,CACA,IAAA,oBACA,MAAA,GACA,CAAA,IAEAF,EAAA,yBAAA,EACAC,EAAA,KAAAC,EAAA,qBAAA,EAAA,CACA,IAAA,oBACA,MAAA,GACA,CAAA,EAEA,CACA,CACA"' reuse._util - ERROR - 'js/FilesSettings-DjOXVi_X.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<form :title=\"t('text', 'Enter your name so other people can see who is editing')\" class=\"guest-name-dialog\" @submit.prevent=\"setGuestName()\">\n\t\t<label><AvatarWrapper :session=\"session\" :size=\"32\" /></label>\n\t\t<input v-model=\"guestName\"\n\t\t\ttype=\"text\"\n\t\t\t:aria-label=\"t('text', 'Edit guest name')\"\n\t\t\t:placeholder=\"t('text', 'Guest')\">\n\t\t<input type=\"submit\"\n\t\t\tclass=\"icon-confirm\"\n\t\t\t:aria-label=\"t('text', 'Save guest name')\"\n\t\t\tvalue=\"\">\n\t</form>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\nimport AvatarWrapper from './AvatarWrapper.vue'\nimport { useSyncServiceMixin } from '../Editor.provider.js'\n\nexport default {\n\tname: 'GuestNameDialog',\n\tcomponents: {\n\t\tAvatarWrapper,\n\t},\n\tmixins: [\n\t\tuseSyncServiceMixin,\n\t],\n\tprops: {\n\t\tsession: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tguestName: '',\n\t\t\tguestNameBuffered: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\tavatarUrl() {\n\t\t\tconst size = 32\n\t\t\tconst avatarUrl = generateUrl(\n\t\t\t\t'/avatar/guest/{user}/{size}',\n\t\t\t\t{\n\t\t\t\t\tuser: this.guestNameBuffered,\n\t\t\t\t\tsize,\n\t\t\t\t})\n\t\t\treturn window.location.protocol + '//' + window.location.host + avatarUrl\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tthis.guestName = this.$syncService.guestName\n\t\tthis.updateBufferedGuestName()\n\t},\n\tmethods: {\n\t\tsetGuestName() {\n\t\t\tconst previousGuestName = this.$syncService.guestName\n\t\t\tthis.$syncService.updateSession(this.guestName).then(() => {\n\t\t\t\tlocalStorage.setItem('nick', this.guestName)\n\t\t\t\tthis.updateBufferedGuestName()\n\t\t\t}).catch((e) => {\n\t\t\t\tthis.guestName = previousGuestName\n\t\t\t})\n\t\t},\n\t\tupdateBufferedGuestName() {\n\t\t\tthis.guestNameBuffered = this.guestName\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\tform.guest-name-dialog {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tpadding: 6px;\n\n\t\t&:deep(img) {\n\t\t\tmargin: 0 !important;\n\t\t}\n\n\t\tinput[type=text] {\n\t\t\tflex-grow: 1;\n\t\t}\n\t\tlabel {\n\t\t\tpadding-right: 3px;\n\t\t\theight: 32px;\n\t\t}\n\t}\n</style>\n"],"names":["_sfc_main","AvatarWrapper","useSyncServiceMixin","avatarUrl","generateUrl","previousGuestName","e"],"mappings":"uaAwBA,MAAAA,EAAA,CACA,KAAA,kBACA,WAAA,CACA,cAAAC,CACA,EACA,OAAA,CACAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EACA,MAAA,CACA,MAAA,CACA,UAAA,GACA,kBAAA,EACA,CACA,EACA,SAAA,CACA,WAAA,CAEA,MAAAC,EAAAC,EACA,8BACA,CACA,KAAA,KAAA,kBACA,KACA,EAAA,CAAA,EACA,OAAA,OAAA,SAAA,SAAA,KAAA,OAAA,SAAA,KAAAD,CACA,CACA,EACA,aAAA,CACA,KAAA,UAAA,KAAA,aAAA,UACA,KAAA,wBAAA,CACA,EACA,QAAA,CACA,cAAA,CACA,MAAAE,EAAA,KAAA,aAAA,UACA,KAAA,aAAA,cAAA,KAAA,SAAA,EAAA,KAAA,IAAA,CACA,aAAA,QAAA,OAAA,KAAA,SAAA,EACA,KAAA,wBAAA,CACA,CAAA,EAAA,MAAAC,GAAA,CACA,KAAA,UAAAD,CACA,CAAA,CACA,EACA,yBAAA,CACA,KAAA,kBAAA,KAAA,SACA,CACA,CACA"' reuse._util - ERROR - 'js/GuestNameDialog-CnSlyqWa.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { logger } from './helpers/logger.js'\nimport { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\n/**\n * Wrapper for async registration of ViewerComponent.\n * Note: it should be named function - the name is used for component registration.\n *\n * @return {Promise<import('./components/ViewerComponent.vue')>} ViewerComponent\n */\nfunction AsyncTextViewerComponent() {\n\treturn import('./components/ViewerComponent.vue')\n}\n\nif (typeof OCA.Viewer === 'undefined') {\n\tlogger.error('Viewer app is not installed')\n} else {\n\tOCA.Viewer.registerHandler({\n\t\tid: 'text',\n\t\tmimes: [...openMimetypesMarkdown, ...openMimetypesPlainText],\n\t\tcomponent: AsyncTextViewerComponent,\n\t\tgroup: null,\n\t\ttheme: 'default',\n\t\tcanCompare: true,\n\t})\n}\n"],"file":"js/text-viewer.mjs"' reuse._util - ERROR - 'js/text-viewer.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nconst logger = getLoggerBuilder()\n\t.setApp('text')\n\t.detectUser()\n\t.build()\n\nexport {\n\tlogger,\n}\n"],"names":["logger","getLoggerBuilder"],"mappings":"+CAOK,MAACA,EAASC,EAAgB,EAC7B,OAAO,MAAM,EACb,WAAU,EACV,MAAK"' reuse._util - ERROR - 'js/logger-Csk1_XRx.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse '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 { NcActionButton as NextcloudVueNcActionButton } from '@nextcloud/vue'\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, NcActionSeparator } from '@nextcloud/vue'\nimport { BaseActionEntry } from './BaseActionEntry.js'\nimport ActionListItem from './ActionListItem.vue'\nimport { getActionSta' reuse._util - ERROR - 'js/Wrapper-CISHjFiH.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\nimport { logger } from '../helpers/logger.js'\n\nexport const EDITOR = Symbol('tiptap:editor')\nexport const FILE = Symbol('editor:file')\nexport const ATTACHMENT_RESOLVER = Symbol('attachment:resolver')\nexport const IS_MOBILE = Symbol('editor:is-mobile')\nexport const IS_PUBLIC = Symbol('editor:is-public')\nexport const IS_RICH_EDITOR = Symbol('editor:is-rich-editor')\nexport const IS_RICH_WORKSPACE = Symbol('editor:is-rich-woskapace')\nexport const SYNC_SERVICE = Symbol('sync:service')\nexport const EDITOR_UPLOAD = Symbol('editor:upload')\nexport const HOOK_MENTION_SEARCH = Symbol('hook:mention-search')\nexport const HOOK_MENTION_INSERT = Symbol('hook:mention-insert')\n\nexport const useEditorMixin = {\n\tinject: {\n\t\t$editor: { from: EDITOR, default: null },\n\t},\n}\n\nexport const useSyncServiceMixin = {\n\tinject: {\n\t\t$syncService: { from: SYNC_SERVICE, default: null },\n\t},\n}\n\nexport const useIsPublicMixin = {\n\tinject: {\n\t\t$isPublic: { from: IS_PUBLIC, default: false },\n\t},\n}\n\nexport const useIsRichWorkspaceMixin = {\n\tinject: {\n\t\t$isRichWorkspace: { from: IS_RICH_WORKSPACE, default: false },\n\t},\n}\n\nexport const useIsRichEditorMixin = {\n\tinject: {\n\t\t$isRichEditor: { from: IS_RICH_EDITOR, default: false },\n\t},\n}\n\nexport const useIsMobileMixin = {\n\tinject: {\n\t\t$isMobile: { from: IS_MOBILE, default: false },\n\t},\n}\n\nexport const useFileMixin = {\n\tinject: {\n\t\t$file: {\n\t\t\tfrom: FILE,\n\t\t\tdefault: () => ({\n\t\t\t\tfileId: 0,\n\t\t\t\trelativePath: null,\n\t\t\t\tdocument: null,\n\t\t\t}),\n\t\t},\n\t},\n}\n\nexport const useAttachmentResolver = {\n\tinject: {\n\t\t$attachmentResolver: {\n\t\t\tfrom: ATTACHMENT_RESOLVER,\n\t\t\tdefault: {\n\t\t\t\tresolve(src) {\n\t\t\t\t\tlogger.warn('No attachment resolver provided. Some attachment sources cannot be resolved.')\n\t\t\t\t\treturn [src]\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n}\nexport const useEditorUpload = {\n\tinject: {\n\t\t$editorUpload: {\n\t\t\tfrom: EDITOR_UPLOAD,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\nexport const useMentionHook = {\n\tinject: {\n\t\t$mentionHookInsert: {\n\t\t\tfrom: HOOK_MENTION_INSERT,\n\t\t\tdefault: true,\n\t\t},\n\t\t$mentionHookSearch: {\n\t\t\tfrom: HOOK_MENTION_SEARCH,\n\t\t\tdefault: true,\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\nexport const STATE_UPLOADING = Symbol('state:uploading-state')\nexport const ACTION_ATTACHMENT_PROMPT = Symbol('editor:action:attachment-prompt')\nexport const ACTION_CHOOSE_LOCAL_ATTACHMENT = Symbol('editor:action:upload-attachment')\n\nexport const useUploadingStateMixin = {\n\tinject: {\n\t\t$uploadingState: {\n\t\t\tfrom: STATE_UPLOADING,\n\t\t\tdefault: {\n\t\t\t\tisUploadingAttachments: false,\n\t\t\t},\n\t\t},\n\t},\n}\n\nexport const useActionAttachmentPromptMixin = {\n\tinject: {\n\t\t$callAttachmentPrompt: { from: ACTION_ATTACHMENT_PROMPT, default: () => {} },\n\t},\n}\n\nexport const useActionChooseLocalAttachmentMixin = {\n\tinject: {\n\t\t$callChooseLocalAttachment: { from: ACTION_CHOOSE_LOCAL_ATTACHMENT, default: () => {} },\n\t},\n}\n"],"names":["EDITOR","FILE","ATTACHMENT_RESOLVER","IS_MOBILE","IS_PUBLIC","IS_RICH_EDITOR","IS_RICH_WORKSPACE","SYNC_SERVICE","EDITOR_UPLOAD","HOOK_MENTION_SEARCH","HOOK_MENTION_INSERT","useEditorMixin","useSyncServiceMixin","useIsPublicMixin","useIsRichWorkspaceMixin","useIsRichEditorMixin","useIsMobileMixin","useFileMixin","useAttachmentResolver","src","logger","useEditorUpload","STATE_UPLOADING","ACTION_ATTACHMENT_PROMPT","ACTION_CHOOSE_LOCAL_ATTACHMENT","useUploadingStateMixin","useActionAttachmentPromptMixin","useActionChooseLocalAttachmentMixin"],"mappings":"gDAOY,MAACA,EAAS,O' reuse._util - ERROR - 'js/MediaHandler.provider-C6D-wsfU.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<BaseReader :content=\"content\" @click-link=\"(e, a) => $emit('click-link', e, a)\" />\n</template>\n\n<script>\nimport BaseReader from './BaseReader.vue'\nimport { RichText } from './../extensions/index.js'\nimport markdownit from './../markdownit/index.js'\n\nexport default {\n\tname: 'RichTextReader',\n\tcomponents: { BaseReader },\n\n\tprovide: {\n\t\trenderHtml(content) {\n\t\t\treturn markdownit.render(content)\n\t\t},\n\t\textensions() {\n\t\t\treturn [\n\t\t\t\tRichText.configure({\n\t\t\t\t\tediting: false,\n\t\t\t\t}),\n\t\t\t]\n\t\t},\n\t},\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\t@import './../css/prosemirror';\n\t@import './../css/print';\n</style>\n"],"names":["_sfc_main","BaseReader","content","markdownit","RichText"],"mappings":"8KAcA,MAAAA,EAAA,CACA,KAAA,iBACA,WAAA,CAAA,WAAAC,CAAA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,OAAAC,EAAA,OAAAD,CAAA,CACA,EACA,YAAA,CACA,MAAA,CACAE,EAAA,UAAA,CACA,QAAA,EACA,CAAA,CACA,CACA,CACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,CACA"' reuse._util - ERROR - 'js/RichTextReader-BAq8wJNR.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<NcModal v-if=\"active\" :name=\"fileName\" @close=\"close\">\n\t\t<Editor :file-id=\"fileId\"\n\t\t\t:relative-path=\"relativePath\"\n\t\t\t:active=\"active\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"mimeType\" />\n\t</NcModal>\n</template>\n\n<script>\nimport { NcModal } from '@nextcloud/vue'\n\nexport default {\n\tname: 'PublicFilesEditor',\n\tcomponents: {\n\t\tNcModal,\n\t\tEditor: () => import(/* webpackChunkName: \"editor\" */'./Editor.vue'),\n\t},\n\tprops: {\n\t\tfileId: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\trelativePath: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tshareToken: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tmimeType: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tcomputed: {\n\t\tfileName() {\n\t\t\treturn this.relativePath.substring(this.relativePath.lastIndexOf('/') + 1)\n\t\t},\n\t},\n\tmethods: {\n\t\tclose() {\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n"],"file":"js/PublicFilesEditor-CmzIDqjR.chunk.mjs"' reuse._util - ERROR - 'js/PublicFilesEditor-CmzIDqjR.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<RichTextReader v-if=\"isRichEditor\"\n\t\t:content=\"content\" />\n\t<PlainTextReader v-else\n\t\t:content=\"content\" />\n</template>\n\n<script>\nimport PlainTextReader from './PlainTextReader.vue'\nimport RichTextReader from './RichTextReader.vue'\n\nexport default {\n\tname: 'Reader',\n\tcomponents: { PlainTextReader, RichTextReader },\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tisRichEditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\n\t#read-only-editor {\n\t\toverflow: scroll;\n\t}\n\n\t.thumbnailContainer #read-only-editor {\n\t\twidth: 100%;\n\n\t\t.ProseMirror {\n\t\t\theight: auto;\n\t\t\tmargin: 0 0 0 0;\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n</style>\n"],"names":["_sfc_main","PlainTextReader","RichTextReader"],"mappings":"yoBAgBA,MAAAA,EAAA,CACA,KAAA,SACA,WAAA,CAAA,gBAAAC,EAAA,eAAAC,CAAA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,aAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,CACA"' reuse._util - ERROR - 'js/Reader-LXy8ELQ1.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\r\n-->\r\n\r\n<template>\r\n\t<NcPopover class=\"session-list\" placement=\"bottom\">\r\n\t\t<template #trigger=\"{ attrs }\">\r\n\t\t\t<div>\r\n\t\t\t\t<button :title=\"label\"\r\n\t\t\t\t\t:aria-label=\"label\"\r\n\t\t\t\t\tclass=\"avatar-list\"\r\n\t\t\t\t\tv-bind=\"attrs\">\r\n\t\t\t\t\t<div class=\"avatardiv icon-group\" />\r\n\t\t\t\t\t<AvatarWrapper v-for=\"session in sessionsVisible\"\r\n\t\t\t\t\t\t:key=\"session.id\"\r\n\t\t\t\t\t\t:session=\"session\"\r\n\t\t\t\t\t\t:size=\"30\" />\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</template>\r\n\t\t<template #default>\r\n\t\t\t<div class=\"session-menu\">\r\n\t\t\t\t<slot name=\"lastSaved\" />\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t<slot />\r\n\t\t\t\t\t<li v-for=\"session in participantsPopover\"\r\n\t\t\t\t\t\t:key=\"session.id\"\r\n\t\t\t\t\t\t:style=\"avatarStyle(session)\">\r\n\t\t\t\t\t\t<AvatarWrapper :session=\"session\" :size=\"36\" />\r\n\t\t\t\t\t\t<span class=\"session-label\">\r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\tsession.userId ? session.displayName : (session.guestName ? session.guestName : t('text', 'Guest'))\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span v-if=\"session.userId === null\" class=\"guest-label\">({{ t('text', 'guest') }})</span>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<NcCheckboxRadioSwitch :checked=\"isFullWidth\" @update:checked=\"onWidthToggle\">\r\n\t\t\t\t\t\t\t{{ t('text', 'Full width editor') }}\r\n\t\t\t\t\t\t</NcCheckboxRadioSwitch>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t</template>\r\n\t</NcPopover>\r\n</template>\r\n\r\n<script>\r\nimport { NcCheckboxRadioSwitch, NcPopover } from '@nextcloud/vue'\r\nimport AvatarWrapper from './AvatarWrapper.vue'\r\nimport { COLLABORATOR_DISCONNECT_TIME, COLLABORATOR_IDLE_TIME } from '../../services/SyncService.js'\r\nimport { loadState } from '@nextcloud/initial-state'\r\nimport axios from '@nextcloud/axios'\r\nimport { generateUrl } from '@nextcloud/router'\r\n\r\nexport default {\r\n\tname: 'SessionList',\r\n\tcomponents: {\r\n\t\tAvatarWrapper,\r\n\t\tNcPopover,\r\n\t\tNcCheckboxRadioSwitch,\r\n\t},\r\n\tprops: {\r\n\t\tsessions: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => {\r\n\t\t\t\treturn {}\r\n\t\t\t},\r\n\t\t},\r\n\t},\r\n\tdata() {\r\n\t\tconst isFullWidth = loadState('text', 'is_full_width_editor', false)\r\n\t\treturn {\r\n\t\t\tmyName: '',\r\n\t\t\tisFullWidth,\r\n\t\t}\r\n\t},\r\n\tcomputed: {\r\n\t\tlabel() {\r\n\t\t\treturn t('text', 'Active people')\r\n\t\t},\r\n\t\tparticipantsPopover() {\r\n\t\t\tif (this.currentSession?.guestName) {\r\n\t\t\t\treturn this.participantsWithoutCurrent\r\n\t\t\t}\r\n\t\t\treturn this.participants\r\n\t\t},\r\n\t\tparticipantsWithoutCurrent() {\r\n\t\t\treturn this.participants.filter((session) => !session.isCurrent)\r\n\t\t},\r\n\t\tparticipants() {\r\n\t\t\treturn Object.values(this.sessions).filter((session) =>\r\n\t\t\t\tsession.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME\r\n\t\t\t\t&& (session.userId !== null || session.guestName !== null),\r\n\t\t\t).sort((a, b) => a.lastContact < b.lastContact)\r\n\t\t},\r\n\t\tcurrentSession() {\r\n\t\t\treturn Object.values(this.sessions).find((session) => session.isCurrent)\r\n\t\t},\r\n\t\tavatarStyle() {\r\n\t\t\treturn (session) => {\r\n\t\t\t\treturn {\r\n\t\t\t\t\topacity: session.lastContact > Date.now() / 1000 - COLLABORATOR_IDLE_TIME ? 1 : 0.5,\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsessionsVisible() {\r\n\t\t\treturn this.participantsWithoutCurrent.slice(0, 3)\r\n\t\t},\r\n\t},\r\n\tmethods: {\r\n\t\tonWidthToggle(checked) {\r\n\t\t\tthis.isFullWidth = checked\r\n\t\t\tthis.$emit('editor-width-change', checked ? '100%' : '80ch')\r\n\r\n\t\t\taxios.post(generateUrl('/apps/text/settings'), {\r\n\t\t\t\tkey: 'is_full_width_editor',\r\n\t\t\t\tvalue: checked ? '1' : '0',\r\n' reuse._util - ERROR - 'js/SessionList-BvDxxWUy.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<BaseReader :content=\"content\" />\n</template>\n\n<script>\n/* eslint-disable import/no-named-as-default */\nimport CodeBlock from '@tiptap/extension-code-block'\nimport escapeHtml from 'escape-html'\nimport BaseReader from './BaseReader.vue'\nimport { PlainText } from './../extensions/index.js'\n\nexport default {\n\tname: 'PlainTextReader',\n\tcomponents: { BaseReader },\n\n\tprovide: {\n\t\trenderHtml(content) {\n\t\t\treturn '<pre>' + escapeHtml(content) + '</pre>'\n\t\t},\n\t\textensions: () => [PlainText, CodeBlock],\n\t},\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n}\n</script>\n"],"names":["_sfc_main","BaseReader","content","escapeHtml","PlainText","CodeBlock"],"mappings":"6NAgBA,MAAAA,EAAA,CACA,KAAA,kBACA,WAAA,CAAA,WAAAC,CAAA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,MAAA,QAAAC,EAAAD,CAAA,EAAA,QACA,EACA,WAAA,IAAA,CAAAE,EAAAC,CAAA,CACA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,CAEA"' reuse._util - ERROR - 'js/PlainTextReader-_IY8HU4N.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div id=\"direct-editor\" :class=\"{'icon-loading': saving}\">\n\t\t<Editor ref=\"editor\"\n\t\t\t:initial-session=\"initialSession\"\n\t\t\t:file-id=\"initial.fileId\"\n\t\t\t:active=\"true\"\n\t\t\t:mime=\"initial.mimetype\"\n\t\t\t:is-direct-editing=\"true\"\n\t\t\t@ready=\"loaded\">\n\t\t\t<template v-if=\"isMobile\" #header>\n\t\t\t\t<button class=\"icon-share\" @click=\"share\" />\n\t\t\t\t<button class=\"icon-close\" @click=\"close\" />\n\t\t\t</template>\n\t\t</Editor>\n\t</div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport Editor from '../components/Editor.vue'\n\nimport { logger } from '../helpers/logger.js'\n\nconst log = Vue.observable({\n\tmessages: [],\n\tmtime: 0,\n})\n\nconst callMobileMessage = (messageName, attributes) => {\n\tlogger.debug(`callMobileMessage ${messageName}`, { attributes })\n\tlet message = messageName\n\tif (typeof attributes !== 'undefined') {\n\t\tmessage = {\n\t\t\tMessageName: messageName,\n\t\t\tValues: attributes,\n\t\t}\n\t}\n\tlet attributesString = null\n\ttry {\n\t\tattributesString = JSON.stringify(attributes)\n\t} catch (e) {\n\t\tattributesString = null\n\t}\n\n\t// Forward to mobile handler\n\tif (window.DirectEditingMobileInterface && typeof window.DirectEditingMobileInterface[messageName] === 'function') {\n\t\tif (attributesString === null || typeof attributesString === 'undefined') {\n\t\t\twindow.DirectEditingMobileInterface[messageName]()\n\t\t} else {\n\t\t\twindow.DirectEditingMobileInterface[messageName](attributesString)\n\t\t}\n\t}\n\n\t// iOS webkit fallback\n\tif (window.webkit\n\t\t&& window.webkit.messageHandlers\n\t\t&& window.webkit.messageHandlers.DirectEditingMobileInterface) {\n\t\twindow.webkit.messageHandlers.DirectEditingMobileInterface.postMessage(message)\n\t}\n\n\twindow.postMessage(message)\n}\n\nwindow.addEventListener('message', function(message) {\n\tlog.messages.push(message.data)\n\tlogger.debug('postMessage', { message })\n})\n\nexport default {\n\tname: 'DirectEditing',\n\tcomponents: { Editor },\n\tdata() {\n\t\treturn {\n\t\t\tinitial: OCP.InitialState.loadState('text', 'file'),\n\t\t\tmessages: log.messages,\n\t\t\tlog,\n\t\t\tsaving: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tinitialSession() {\n\t\t\treturn JSON.parse(this.initial.session) || null\n\t\t},\n\t\tisMobile() {\n\t\t\treturn (window.DirectEditingMobileInterface || (window.webkit\n\t\t\t\t&& window.webkit.messageHandlers\n\t\t\t\t&& window.webkit.messageHandlers.DirectEditingMobileInterface))\n\t\t},\n\t},\n\tbeforeMount() {\n\t\tcallMobileMessage('loading')\n\t},\n\tmounted() {\n\t\tdocument.querySelector('meta[name=\"viewport\"]').setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0')\n\n\t\tthis.$refs.editor.$on('push:forbidden', () => {\n\t\t\tlogger.warn('push was forbidden due to invalidated session')\n\t\t\tthis.reload()\n\t\t})\n\t},\n\tmethods: {\n\t\tasync close() {\n\t\t\tthis.saving = true\n\t\t\tsetTimeout(async () => {\n\t\t\t\tawait this.$refs.editor.$destroy()\n\t\t\t\tcallMobileMessage('close')\n\t\t\t}, 0)\n\t\t},\n\t\tshare() {\n\t\t\tcallMobileMessage('share')\n\t\t},\n\t\tloaded() {\n\t\t\tcallMobileMessage('loaded')\n\t\t},\n\t\treload() {\n\t\t\tcallMobileMessage('reload')\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\tbody {\n\t\tposition: fixed;\n\t\tbackground-color: var(--color-main-background);\n\t}\n\n\t#content[class=app-public] {\n\t\tmargin: 0;\n\t\tmargin-top: 0;\n\t}\n</style>\n\n<style scoped lang=\"scss\">\n\t#direct-editor {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tposition: fixed;\n\t\toverflow: auto;\n\n\t\t&:deep(.text-editor) {\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t}\n\t\t&:deep(.text-editor__wrapper div.ProseMirror) {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\n\tpre {\n\t\twidth: 100%;\n\t\tmax-width: 700px;' reuse._util - ERROR - 'js/DirectEditing-vgDtEPzh.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\n/**\n * Callback that should be executed after the document is ready\n *\n * @param callback\n */\n\nconst documentReady = function(callback) {\n\tconst fn = () => setTimeout(callback, 0)\n\tif (document.attachEvent ? document.readyState === 'complete' : document.readyState !== 'loading') {\n\t\tfn()\n\t} else {\n\t\tdocument.addEventListener('DOMContentLoaded', callback)\n\t}\n}\n\nexport {\n\tdocumentReady,\n}\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\nimport { getSharingToken } from '@nextcloud/sharing/public'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nimport {\n\tregisterFileActionFallback,\n\tregisterFileCreate,\n} from './helpers/files.js'\nimport { logger } from './' reuse._util - ERROR - 'js/text-public.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<div v-if=\"enabled && localHasRichWorkspace\"\n\t\tid=\"rich-workspace\"\n\t\t:class=\"{'focus': focus, 'dark': darkTheme }\">\n\t\t<RichTextReader v-if=\"!loaded || !ready\" :content=\"content\" class=\"rich-workspace--preview\" />\n\t\t<Editor v-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"file.path\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\t:hide-menu=\"hideMenu\"\n\t\t\tactive\n\t\t\trich-workspace\n\t\t\t@ready=\"ready=true\"\n\t\t\t@focus=\"onFocus\"\n\t\t\t@error=\"reset\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { getSharingToken, isPublicShare } from '@nextcloud/sharing/public'\nimport getEditorInstance from '../components/Editor.singleton.js'\nimport RichTextReader from '../components/RichTextReader.vue'\nimport { loadState } from '@nextcloud/initial-state'\n\nconst IS_PUBLIC = isPublicShare()\nconst WORKSPACE_URL = generateOcsUrl('apps/text' + (IS_PUBLIC ? '/public' : '') + '/workspace', 2)\nconst descriptionFile = t('text', 'Readme') + '.' + loadState('text', 'default_file_extension')\nconst SUPPORTED_STATIC_FILENAMES = [descriptionFile, 'Readme.md', 'README.md', 'readme.md']\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tRichTextReader,\n\t\tEditor: getEditorInstance,\n\t},\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\thasRichWorkspace: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\t// Keep track of a local copy of the hasRichWorkspace state as it might change after initial rendering (e.g. when adding/removing the readme)\n\t\t\tlocalHasRichWorkspace: false,\n\t\t\tfocus: false,\n\t\t\tfolder: null,\n\t\t\tfile: null,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\thideMenu: true,\n\t\t\tdarkTheme: OCA.Accessibility && OCA.Accessibility.theme === 'dark',\n\t\t\tenabled: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn getSharingToken()\n\t\t},\n\t},\n\twatch: {\n\t\tpath() {\n\t\t\tthis.getFileInfo()\n\t\t},\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\tdocument.querySelector('#rich-workspace .text-editor__main').scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t\thasRichWorkspace(value) {\n\t\t\tthis.localHasRichWorkspace = value\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.localHasRichWorkspace = this.hasRichWorkspace\n\t\tif (this.enabled && this.hasRichWorkspace) {\n\t\t\tthis.getFileInfo()\n\t\t}\n\t\tsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tsubscribe('files:node:created', this.onFileCreated)\n\t\tsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.listenKeydownEvents()\n\n\t},\n\tbeforeDestroy() {\n\t\tunsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tunsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tunsubscribe('files:node:created', this.onFileCreated)\n\t\tunsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tunsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.unlistenKeydownEvents()\n\t},\n\tmethods: {\n\t\tonFocus() {\n\t\t\tthis.focus = true\n\t\t\tthis.hideMenu = false\n\t\t\tthis.unlistenKeydownEvents()\n\t\t},\n\t\treset() {\n\t\t\tthis.localHasRichWorkspace = false\n\t\t\tthis.file = null\n\t\t\tthis.focus = false\n\t\t\tthis.$nextTick(() =>' reuse._util - ERROR - 'js/RichWorkspace-CcX0wTC7.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n-->\n\n<template>\n\t<Editor v-if=\"!useSourceView\"\n\t\t:file-id=\"fileid\"\n\t\t:relative-path=\"filename\"\n\t\t:active=\"active || isEmbedded\"\n\t\t:autofocus=\"autofocus\"\n\t\t:share-token=\"shareToken\"\n\t\t:class=\"{ 'text-editor--embedding': isEmbedded }\"\n\t\t:mime=\"mime\"\n\t\t:show-outline-outside=\"showOutlineOutside\" />\n\t<div v-else\n\t\tid=\"editor-container\"\n\t\tdata-text-el=\"editor-container\"\n\t\tclass=\"text-editor source-viewer\">\n\t\t<Component :is=\"readerComponent\"\n\t\t\t:content=\"content\"\n\t\t\t:file-id=\"fileid\"\n\t\t\t:read-only=\"true\"\n\t\t\t:show-menu-bar=\"false\" />\n\t\t<NcButton v-if=\"isEmbedded\" class=\"toggle-interactive\" @click=\"toggleEdit\">\n\t\t\t{{ t('text', 'Edit') }}\n\t\t\t<template #icon>\n\t\t\t\t<PencilIcon />\n\t\t\t</template>\n\t\t</NcButton>\n\t</div>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport axios from '@nextcloud/axios'\nimport { getSharingToken } from '@nextcloud/sharing/public'\nimport PencilIcon from 'vue-material-design-icons/Pencil.vue'\nimport NcButton from '@nextcloud/vue/dist/Components/NcButton.js'\nimport PlainTextReader from './PlainTextReader.vue'\nimport MarkdownContentEditor from './Editor/MarkdownContentEditor.vue'\nimport { translate, translatePlural } from '@nextcloud/l10n'\n\nimport getEditorInstance from './Editor.singleton.js'\n\nVue.prototype.t = translate\nVue.prototype.n = translatePlural\n\nexport default {\n\tname: 'ViewerComponent',\n\tcomponents: {\n\t\tNcButton: Vue.extend(NcButton),\n\t\tPencilIcon: Vue.extend(PencilIcon),\n\t\tPlainTextReader: Vue.extend(PlainTextReader),\n\t\tMarkdownContentEditor: Vue.extend(MarkdownContentEditor),\n\t\tEditor: getEditorInstance,\n\t},\n\tprovide() {\n\t\treturn {\n\t\t\tisEmbedded: this.isEmbedded,\n\t\t}\n\t},\n\tprops: {\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tautofocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tshareToken: {\n\t\t\ttype: String,\n\t\t\tdefault: () => getSharingToken(),\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\tshowOutlineOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tpermissions: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tsource: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\tisEmbedded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tcontent: '',\n\t\t\thasToggledInteractiveEmbedding: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\t/** @return {boolean} */\n\t\tuseSourceView() {\n\t\t\treturn this.source && (this.fileVersion || !this.fileid || this.isEmbedded) && !this.hasToggledInteractiveEmbedding\n\t\t},\n\n\t\t/** @return {boolean} */\n\t\treaderComponent() {\n\t\t\treturn this.mime === 'text/markdown' ? MarkdownContentEditor : PlainTextReader\n\t\t},\n\t},\n\n\twatch: {\n\t\tsource() {\n\t\t\tthis.loadFileContent()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.loadFileContent()\n\t},\n\n\tmethods: {\n\t\tt: translate,\n\t\tasync loadFileContent() {\n\t\t\tif (this.useSourceView) {\n\t\t\t\tconst response = await axios.get(this.source)\n\t\t\t\tthis.content = response.data\n\t\t\t\tthis.contentLoaded = true\n\t\t\t}\n\t\t\tthis.$emit('update:loaded', true)\n\t\t},\n\t\ttoggleEdit() {\n\t\t\tthis.hasToggledInteractiveEmbedding = true\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.text-editor:not(.viewer__file--hidden) {\n\ttop: 0;\n\twidth: 100%;\n\tmax-width: 100%;\n\theight: 100%;\n\tleft: 0;\n\tmargin: 0 auto;\n\tposition: relative;\n\tbackground-color: var(--color-main-background);\n\n\t&.source-viewer {\n\t\tdisplay: block;\n\n\t\t.text-editor__content-wrapper {\n\t\t\tmargin' reuse._util - ERROR - 'js/ViewerComponent-DTQOPy6Y.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nif (document.getElementById('app-content')) {\n\tPromise.all([\n\t\timport(/* webpackChunkName: \"editor\" */'vue'),\n\t\timport(/* webpackChunkName: \"editor\" */'./views/DirectEditing.vue'),\n\t]).then((imports) => {\n\t\tconst Vue = imports[0].default\n\t\tVue.prototype.t = window.t\n\t\tVue.prototype.OCA = window.OCA\n\t\tconst DirectEditing = imports[1].default\n\t\tconst vm = new Vue({\n\t\t\trender: h => h(DirectEditing),\n\t\t})\n\t\tvm.$mount(document.getElementById('app-content'))\n\t})\n}\n"],"file":"js/text-text.mjs"' reuse._util - ERROR - 'js/text-text.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse '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<EditorContent v-if=\"$editor\"\n\t\t\tid=\"read-only-editor\"\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 { Editor } from '@tiptap/core'\nimport { EditorContent } from '@tiptap/vue-2'\nimport { EDITOR } from './Editor.provider.js'\nimport { useOutlineStateMixin, useOutlineActions } from './Editor/Wrapper.provider.js'\nimport EditorOutline from './Editor/EditorOutline.vue'\n\nexport default {\n\tname: 'BaseReader',\n\tcomponents: {\n\t\tEditorContent,\n\t\tEditorOutline,\n\t},\n\n\tmixins: [useOutlineStateMixin, useOutlineActions],\n\n\tprovide() {\n\t\tconst val = {}\n\n\t\tObject.defineProperties(val, {\n\t\t\t[EDITOR]: {\n\t\t\t\tget: () => this.$editor,\n\t\t\t},\n\t\t})\n\n\t\treturn val\n\t},\n\n\t// extensions is a factory building a list of extensions for the editor\n\tinject: ['renderHtml', 'extensions'],\n\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thtmlContent() {\n\t\t\treturn this.renderHtml(this.content)\n\t\t},\n\t\tshowOutline() {\n\t\t\treturn this.$outlineState.visible\n\t\t},\n\t},\n\n\twatch: {\n\t\tcontent() {\n\t\t\tthis.updateContent()\n\t\t},\n\t},\n\n\tcreated() {\n\t\tthis.$editor = this.createEditor()\n\t\tthis.$editor.setEditable(false)\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.$editor.destroy()\n\t},\n\n\tmethods: {\n\t\tcreateEditor() {\n\t\t\treturn new Editor({\n\t\t\t\tcontent: this.htmlContent,\n\t\t\t\textensions: this.extensions(),\n\t\t\t})\n\t\t},\n\n\t\tupdateContent() {\n\t\t\tthis.$editor.commands.setContent(this.htmlContent, true)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.editor__content {\n\tmax-width: var(--text-editor-max-width);\n\tmargin: auto;\n\tposition: relative;\n\twidth: 100%;\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\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</style>\n"],"names":["_sfc_main","EditorContent","EditorOutline","useOutlineStateMixin","useOutlineActions","val","EDITOR","Editor"],"mappings":"8MA6BA,MAAAA,EAAA,CACA,KAAA,aACA,WAAA,CACA,cAAAC,EACA,cAAAC,CACA,EAEA,OAAA,CAAAC,EAAAC,CAAA,EAEA,SAAA,CACA,MAAAC,EAAA,CAAA,EAEA,OAAA,OAAA,iBAAAA,EAAA,CACA,CAAAC,CAAA,EAAA,CACA,IAAA,IAAA,KAAA,OACA,CACA,CAAA,EAEAD,CACA,EAGA,OAAA,CAAA,aAAA,YAAA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EAEA,SAAA,CACA,aAAA,CACA,OAAA,KAAA,WAAA,KAAA,OAAA,CACA,EACA,aAAA,CACA,OAAA,KAAA,cAAA,OACA,CACA,EAEA,MAAA,CACA,SAAA,CACA,KAAA,cAAA,CACA,CACA,EAEA,SAAA,CACA,KAAA,QAAA,KAAA,aAAA,EACA,KAAA,QAAA,YAAA,EAAA,CACA,EAEA,eAAA,CACA,KAAA,QAAA,QAAA,CACA,EAEA,QAAA,CACA,cAAA,CACA,OAAA,IAAAE,EAAA,CACA,QAAA,KAAA,YACA,WAAA,KAAA,WAAA,CACA,CAAA,CACA,EAEA,eAAA,CACA,KAAA,QAAA,SAAA,WAAA,KAAA,YAAA,EAAA,CACA,CACA,CACA"' reuse._util - ERROR - 'js/BaseReader-DnIanI_C.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\nimport { loadState } from '@nextcloud/initial-state'\n\nimport { logger } from './helpers/logger.js'\n// eslint-disable-next-line import/no-unresolved, n/no-missing-import\nimport 'vite/modulepreload-polyfill'\n\nconst workspaceAvailable = loadState('text', 'workspace_available')\nconst workspaceEnabled = loadState('text', 'workspace_enabled')\nconst openReadOnlyEnabled = loadState('text', 'open_read_only_enabled')\n\ndocument.addEventListener('DOMContentLoaded', async () => {\n\tif (typeof OCA.Viewer === 'undefined') {\n\t\tconst { registerFileActionFallback } = await import('./helpers/files.js')\n\t\tlogger.error('Viewer app is not installed')\n\t\tregisterFileActionFallback()\n\t}\n\n\tif (workspaceAvailable && OCA && OCA?.Files?.Settings) {\n\t\tconst { default: Vue } = await import('vue')\n\t\tconst { default: FilesSettings } = await import('./views/FilesSettings.vue')\n\n\t\tVue.prototype.t = window.t\n\t\tVue.prototype.n = window.n\n\t\tVue.prototype.OCA = window.OCA\n\t\tconst vm = new Vue({\n\t\t\trender: h => h(FilesSettings, {}),\n\t\t})\n\t\tconst el = vm.$mount().$el\n\t\tOCA.Files.Settings.register(new OCA.Files.Settings.Setting('text', {\n\t\t\tel: () => { return el },\n\t\t}))\n\t}\n})\n\nOCA.Text = {\n\tRichWorkspaceEnabled: workspaceEnabled,\n\tOpenReadOnlyEnabled: openReadOnlyEnabled,\n}\n"],"file":"js/text-files.mjs"' reuse._util - ERROR - 'js/text-files.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file reuse._util - ERROR - Could not parse 'AGPL-3.0-or-later\n */\n\n/**\n * Get instance of Editor component\n * Using singleton approach here to avoid duplicate yjs import error\n * @return {Promise<*>}\n */\nexport default async function getEditorInstance() {\n\tif (!window._nc_text_editor_instance) {\n\t\tif (window._nc_text_editor_importing) {\n\t\t\treturn await new Promise((resolve) => {\n\t\t\t\tconst intervalId = setInterval(() => {\n\t\t\t\t\tif (!window._nc_text_editor_instance) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tresolve(window._nc_text_editor_instance)\n\t\t\t\t\tclearInterval(intervalId)\n\t\t\t\t}, 200)\n\t\t\t})\n\t\t} else {\n\t\t\twindow._nc_text_editor_importing = true\n\t\t}\n\t\tconst Editor = await import(/* webpackChunkName: \"editor\" */'./Editor.vue')\n\t\tconst { default: Vue } = await import('vue')\n\t\tVue.prototype.t = window.t\n\t\tVue.prototype.OCA = window.OCA\n\t\tconst EditorConstructor = Vue.extend(Editor.default)\n\t\twindow._nc_text_editor_instance = EditorConstructor\n\t}\n\treturn window._nc_text_editor_instance\n}\n"],"file":"js/Editor.singleton-Dr8vGbaa.chunk.mjs"' reuse._util - ERROR - 'js/Editor.singleton-Dr8vGbaa.chunk.mjs.map' holds an SPDX expression that cannot be parsed, skipping the file # MISSING COPYRIGHT AND LICENSING INFORMATION The following files have no copyright and licensing information: * js/modulepreload-polyfill-Cp76Uzro.chunk.mjs # SUMMARY * Bad licenses: 0 * Deprecated licenses: 0 * Licenses without file extension: 0 * Missing licenses: 0 * Unused licenses: 0 * Used licenses: MIT, AGPL-3.0-or-later, BSD-3-Clause, CC0-1.0, MPL-2.0, BSD-2-Clause, Apache-2.0, ISC, GPL-3.0-or-later * Read errors: 0 * Files with copyright information: 2131 / 2132 * Files with license information: 2131 / 2132 Unfortunately, your project is not compliant with version 3.2 of the REUSE Specification :-( # RECOMMENDATIONS * Fix missing copyright/licensing information: For one or more files, the tool cannot find copyright and/or licensing information. You typically do this by adding 'SPDX-FileCopyrightText' and 'SPDX-License-Identifier' tags to each file. The tutorial explains additional ways to do this: <https://reuse.software/tutorial/>