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,GAGIqG,EAAI,EAC3B,GAAGL,EAASuG,MAAMhN,GAAgC,IAAxBkM,EAAgBlM,KAAa,CACtD,IAAIgG,KAAY8G,EACZ/G,EAAoB6B,EAAEkF,EAAa9G,KACrCD,EAAoBQ,EAAEP,GAAY8G,EAAY9G,IAGhD,GAAG+G,EAAS,IAAIrL,EAASqL,EAAQhH,EAClC,CAEA,IADG8G,GAA4BA,EAA2BpM,GACrDqG,EAAIL,EAAS5E,OAAQiF,IACzBoB,EAAUzB,EAASK,GAChBf,EAAoB6B,EAAEsE,EAAiBhE,IAAYgE,EAAgBhE,IACrEgE,EAAgBhE,GAAS,KAE1BgE,EAAgBhE,GAAW,EAE5B,OAAOnC,EAAoBS,EAAE9E,EAAO,EAGjCuL,EAAqBjB,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FiB,EAAmBzC,QAAQoC,EAAqBlC,KAAK,KAAM,IAC3DuC,EAAmBhE,KAAO2D,EAAqBlC,KAAK,KAAMuC,EAAmBhE,KAAKyB,KAAKuC,G,KCvFvFlH,EAAoB6D,QAAK9H,ECGzB,IAAIoL,EAAsBnH,EAAoBS,OAAE1E,EAAW,CAAC,OAAO,IAAOiE,EAAoB,QAC9FmH,EAAsBnH,EAAoBS,EAAE0G,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/comments-activity-tab.ts","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/comments-tab.js","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport moment from '@nextcloud/moment';\nimport Vue, {} from 'vue';\nimport logger from './logger.js';\nimport { getComments } from './services/GetComments.js';\nimport { PiniaVuePlugin, createPinia } from 'pinia';\nVue.use(PiniaVuePlugin);\nlet ActivityTabPluginView;\nlet ActivityTabPluginInstance;\n/**\n * Register the comments plugins for the Activity sidebar\n */\nexport function registerCommentsPlugins() {\n window.OCA.Activity.registerSidebarAction({\n mount: async (el, { context, fileInfo, reload }) => {\n const pinia = createPinia();\n if (!ActivityTabPluginView) {\n const { default: ActivityCommentAction } = await import('./views/ActivityCommentAction.vue');\n // @ts-expect-error Types are broken for Vue2\n ActivityTabPluginView = Vue.extend(ActivityCommentAction);\n }\n ActivityTabPluginInstance = new ActivityTabPluginView({\n el,\n parent: context,\n pinia,\n propsData: {\n reloadCallback: reload,\n resourceId: fileInfo.id,\n },\n });\n logger.info('Comments plugin mounted in Activity sidebar action', { fileInfo });\n },\n unmount: () => {\n // destroy previous instance if available\n if (ActivityTabPluginInstance) {\n ActivityTabPluginInstance.$destroy();\n }\n },\n });\n window.OCA.Activity.registerSidebarEntries(async ({ fileInfo, limit, offset }) => {\n const { data: comments } = await getComments({ resourceType: 'files', resourceId: fileInfo.id }, { limit, offset });\n logger.debug('Loaded comments', { fileInfo, comments });\n const { default: CommentView } = await import('./views/ActivityCommentEntry.vue');\n // @ts-expect-error Types are broken for Vue2\n const CommentsViewObject = Vue.extend(CommentView);\n return comments.map((comment) => ({\n _CommentsViewInstance: undefined,\n timestamp: moment(comment.props?.creationDateTime).toDate().getTime(),\n mount(element, { context, reload }) {\n this._CommentsViewInstance = new CommentsViewObject({\n el: element,\n parent: context,\n propsData: {\n comment,\n resourceId: fileInfo.id,\n reloadCallback: reload,\n },\n });\n },\n unmount() {\n this._CommentsViewInstance?.$destroy();\n },\n }));\n });\n window.OCA.Activity.registerSidebarFilter((activity) => activity.type !== 'comments');\n logger.info('Comments plugin registered for Activity sidebar action');\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\n// https://github.com/perry-mitchell/webdav-client/issues/339\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param {object} data destructuring object\n * @param {string} data.resourceType the resource type\n * @param {number} data.resourceId the resource ID\n * @param {object} [options] optional options for axios\n * @param {number} [options.offset] the pagination offset\n * @param {number} [options.limit] the pagination limit, defaults to 20\n * @param {Date} [options.datetime] optional date to query\n * @return {{data: object[]}} the comments list\n */\nexport const getComments = async function ({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `<oc:datetime>${options.datetime.toISOString()}</oc:datetime>` : '';\n const response = await client.customRequest(resourcePath, Object.assign({\n method: 'REPORT',\n data: `<?xml version=\"1.0\"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<oc:limit>${options.limit ?? DEFAULT_LIMIT}</oc:limit>\n\t\t\t\t<oc:offset>${options.offset || 0}</oc:offset>\n\t\t\t\t${datetime}\n\t\t\t</oc:filter-comments>`,\n }, options));\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n return processResponsePayload(response, stat, true);\n};\n// https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\nconst getDirectoryFiles = function (result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map(item => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n// eslint-disable-next-line n/no-missing-import, import/no-unresolved\nimport MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport { registerCommentsPlugins } from './comments-activity-tab.ts'\n\n// @ts-expect-error __webpack_nonce__ is injected by webpack\n__webpack_nonce__ = getCSPNonce()\n\nif (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {\n\t// Do not mount own tab but mount into activity\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tregisterCommentsPlugins()\n\t})\n} else {\n\t// Init Comments tab component\n\tlet TabInstance = null\n\tconst commentTab = new OCA.Files.Sidebar.Tab({\n\t\tid: 'comments',\n\t\tname: t('comments', 'Comments'),\n\t\ticonSvg: MessageReplyText,\n\n\t\tasync mount(el, fileInfo, context) {\n\t\t\tif (TabInstance) {\n\t\t\t\tTabInstance.$destroy()\n\t\t\t}\n\t\t\tTabInstance = new OCA.Comments.View('files', {\n\t\t\t\t// Better integration with vue parent component\n\t\t\t\tparent: context,\n\t\t\t\tpropsData: {\n\t\t\t\t\tresourceId: fileInfo.id,\n\t\t\t\t},\n\t\t\t})\n\t\t\t// Only mount after we have all the info we need\n\t\t\tawait TabInstance.update(fileInfo.id)\n\t\t\tTabInstance.$mount(el)\n\t\t},\n\t\tupdate(fileInfo) {\n\t\t\tTabInstance.update(fileInfo.id)\n\t\t},\n\t\tdestroy() {\n\t\t\tTabInstance.$destroy()\n\t\t\tTabInstance = null\n\t\t},\n\t\tscrollBottomReached() {\n\t\t\tTabInstance.onScrollBottomReached()\n\t\t},\n\t})\n\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\t\tOCA.Files.Sidebar.registerTab(commentTab)\n\t\t}\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\nconst setHeaders = (token) => {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\nconst getRootPath = function() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"3920\":\"d2965aff947ea8ac373f\",\"5528\":\"f4a674e50ce6ae9227c0\",\"5706\":\"3153330af47fc26a725a\",\"6127\":\"40fbb3532bb7846b7035\",\"7462\":\"bfaca1815d41ba91708b\",\"8057\":\"2c8f7e35c56e047ba73f\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2122;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2122: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(1836)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","ActivityTabPluginView","ActivityTabPluginInstance","registerCommentsPlugins","window","OCA","Activity","registerSidebarAction","mount","async","el","_ref","context","fileInfo","reload","pinia","createPinia","default","ActivityCommentAction","Vue","extend","parent","propsData","reloadCallback","resourceId","id","logger","info","unmount","$destroy","registerSidebarEntries","limit","offset","_ref2","data","comments","options","resourceType","resourcePath","join","datetime","toISOString","response","client","customRequest","Object","assign","method","responseData","text","stat","result","isDetailed","arguments","length","undefined","multistatus","responseItems","map","item","props","propstat","prop","prepareFileFromProps","toString","getDirectoryFiles","parseXML","processResponsePayload","getComments","debug","CommentView","CommentsViewObject","comment","_CommentsViewInstance","timestamp","moment","creationDateTime","toDate","getTime","element","_ref3","this","registerSidebarFilter","activity","type","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","loadState","addEventListener","TabInstance","commentTab","Files","Sidebar","Tab","name","t","iconSvg","Comments","View","update","$mount","destroy","scrollBottomReached","onScrollBottomReached","registerTab","getLoggerBuilder","setApp","detectUser","build","createClient","getRootPath","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","generateRemoteUrl","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","loaded","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","g","globalThis","Function","obj","prototype","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","value","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}