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R,EACbrmB,EAAMsjC,QAAUD,EAChBF,EAAmB,GAAGnjC,EACvB,CACD,GAEwC,SAAWghC,EAASA,EAE/D,CACD,EAWFlB,EAAoBM,EAAEhmB,EAAK4mB,GAA0C,IAA7BkC,EAAgBlC,GAGxD,IAAIuC,EAAuB,CAACC,EAA4BvnC,KACvD,IAKI8jC,EAAUiB,EALVX,EAAWpkC,EAAK,GAChBwnC,EAAcxnC,EAAK,GACnBynC,EAAUznC,EAAK,GAGI8X,EAAI,EAC3B,GAAGssB,EAASsD,MAAMjnC,GAAgC,IAAxBwmC,EAAgBxmC,KAAa,CACtD,IAAIqjC,KAAY0D,EACZ3D,EAAoBe,EAAE4C,EAAa1D,KACrCD,EAAoB1mB,EAAE2mB,GAAY0D,EAAY1D,IAGhD,GAAG2D,EAAS,IAAIpxB,EAASoxB,EAAQ5D,EAClC,CAEA,IADG0D,GAA4BA,EAA2BvnC,GACrD8X,EAAIssB,EAASlhC,OAAQ4U,IACzBitB,EAAUX,EAAStsB,GAChB+rB,EAAoBe,EAAEqC,EAAiBlC,IAAYkC,EAAgBlC,IACrEkC,EAAgBlC,GAAS,KAE1BkC,EAAgBlC,GAAW,EAE5B,OAAOlB,EAAoBM,EAAE9tB,EAAO,EAGjCsxB,EAAqBX,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FW,EAAmBxhC,QAAQmhC,EAAqBxb,KAAK,KAAM,IAC3D6b,EAAmB9iC,KAAOyiC,EAAqBxb,KAAK,KAAM6b,EAAmB9iC,KAAKinB,KAAK6b,G,KCvFvF9D,EAAoBzP,QAAKjkB,ECGzB,IAAIy3B,EAAsB/D,EAAoBM,OAAEh0B,EAAW,CAAC,OAAO,IAAO0zB,EAAoB,SAC9F+D,EAAsB/D,EAAoBM,EAAEyD,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/settings/src/store/api.js","webpack:///nextcloud/apps/settings/src/store/users.js","webpack:///nextcloud/apps/settings/src/store/apps.js","webpack:///nextcloud/apps/settings/src/store/users-settings.js","webpack:///nextcloud/apps/settings/src/store/oc.js","webpack:///nextcloud/apps/settings/src/store/index.js","webpack:///nextcloud/apps/settings/src/constants/GroupManagement.ts","webpack:///nextcloud/apps/settings/src/logger.ts","webpack:///nextcloud/apps/settings/src/views/SettingsApp.vue","webpack:///nextcloud/apps/settings/src/views/SettingsApp.vue?vue&type=script&setup=true&lang=ts","webpack://nextcloud/./apps/settings/src/views/SettingsApp.vue?3a67","webpack:///nextcloud/apps/settings/src/router/routes.ts","webpack:///nextcloud/apps/settings/src/router/index.ts","webpack:///nextcloud/apps/settings/src/main-apps-users-management.ts","webpack:///nextcloud/node_modules/vue-router/dist/vue-router.esm.js","webpack:///nextcloud/node_modules/vuex-router-sync/index.js","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","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: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios from '@nextcloud/axios'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport '@nextcloud/password-confirmation/dist/style.css'\n\nconst sanitize = function(url) {\n\treturn url.replace(/\\/$/, '') // Remove last url slash\n}\n\nexport default {\n\n\t/**\n\t * This Promise is used to chain a request that require an admin password confirmation\n\t * Since chaining Promise have a very precise behavior concerning catch and then,\n\t * you'll need to be careful when using it.\n\t * e.g\n\t * // store\n\t * action(context) {\n\t * return api.requireAdmin().then((response) => {\n\t * return api.get('url')\n\t * .then((response) => {API success})\n\t * .catch((error) => {API failure});\n\t * }).catch((error) => {requireAdmin failure});\n\t * }\n\t * // vue\n\t * this.$store.dispatch('action').then(() => {always executed})\n\t *\n\t * Since Promise.then().catch().then() will always execute the last then\n\t * this.$store.dispatch('action').then will always be executed\n\t *\n\t * If you want requireAdmin failure to also catch the API request failure\n\t * you will need to throw a new error in the api.get.catch()\n\t *\n\t * e.g\n\t * api.requireAdmin().then((response) => {\n\t * api.get('url')\n\t * .then((response) => {API success})\n\t * .catch((error) => {throw error;});\n\t * }).catch((error) => {requireAdmin OR API failure});\n\t *\n\t * @return {Promise}\n\t */\n\trequireAdmin() {\n\t\treturn confirmPassword()\n\t},\n\tget(url, options) {\n\t\treturn axios.get(sanitize(url), options)\n\t},\n\tpost(url, data) {\n\t\treturn axios.post(sanitize(url), data)\n\t},\n\tpatch(url, data) {\n\t\treturn axios.patch(sanitize(url), data)\n\t},\n\tput(url, data) {\n\t\treturn axios.put(sanitize(url), data)\n\t},\n\tdelete(url, data) {\n\t\treturn axios.delete(sanitize(url), { params: data })\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getBuilder } from '@nextcloud/browser-storage'\nimport { getCapabilities } from '@nextcloud/capabilities'\nimport { parseFileSize } from '@nextcloud/files'\nimport { showError } from '@nextcloud/dialogs'\nimport { generateOcsUrl, generateUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nimport { GroupSorting } from '../constants/GroupManagement.ts'\nimport api from './api.js'\nimport logger from '../logger.ts'\n\nconst localStorage = getBuilder('settings').persist(true).build()\n\nconst defaults = {\n\tgroup: {\n\t\tid: '',\n\t\tname: '',\n\t\tusercount: 0,\n\t\tdisabled: 0,\n\t\tcanAdd: true,\n\t\tcanRemove: true,\n\t},\n}\n\nconst state = {\n\tusers: [],\n\tgroups: [],\n\torderBy: GroupSorting.UserCount,\n\tminPasswordLength: 0,\n\tusersOffset: 0,\n\tusersLimit: 25,\n\tdisabledUsersOffset: 0,\n\tdisabledUsersLimit: 25,\n\tuserCount: 0,\n\tshowConfig: {\n\t\tshowStoragePath: localStorage.getItem('account_settings__showStoragePath') === 'true',\n\t\tshowUserBackend: localStorage.getItem('account_settings__showUserBackend') === 'true',\n\t\tshowLastLogin: localStorage.getItem('account_settings__showLastLogin') === 'true',\n\t\tshowNewUserForm: localStorage.getItem('account_settings__showNewUserForm') === 'true',\n\t\tshowLanguages: localStorage.getItem('account_settings__showLanguages') === 'true',\n\t},\n}\n\nconst mutations = {\n\tappendUsers(state, usersObj) {\n\t\tconst existingUsers = state.users.map(({ id }) => id)\n\t\tconst newUsers = Object.values(usersObj)\n\t\t\t.filter(({ id }) => !existingUsers.includes(id))\n\n\t\tconst users = state.users.concat(newUsers)\n\t\tstate.usersOffset += state.usersLimit\n\t\tstate.users = users\n\t},\n\tupdateDisabledUsers(state, _usersObj) {\n\t\tstate.disabledUsersOffset += state.disabledUsersLimit\n\t},\n\tsetPasswordPolicyMinLength(state, length) {\n\t\tstate.minPasswordLength = length !== '' ? length : 0\n\t},\n\tinitGroups(state, { groups, orderBy, userCount }) {\n\t\tstate.groups = groups.map(group => Object.assign({}, defaults.group, group))\n\t\tstate.orderBy = orderBy\n\t\tstate.userCount = userCount\n\t},\n\taddGroup(state, { gid, displayName }) {\n\t\ttry {\n\t\t\tif (typeof state.groups.find((group) => group.id === gid) !== 'undefined') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// extend group to default values\n\t\t\tconst group = Object.assign({}, defaults.group, {\n\t\t\t\tid: gid,\n\t\t\t\tname: displayName,\n\t\t\t})\n\t\t\tstate.groups.unshift(group)\n\t\t} catch (e) {\n\t\t\tconsole.error('Can\\'t create group', e)\n\t\t}\n\t},\n\trenameGroup(state, { gid, displayName }) {\n\t\tconst groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid)\n\t\tif (groupIndex >= 0) {\n\t\t\tconst updatedGroup = state.groups[groupIndex]\n\t\t\tupdatedGroup.name = displayName\n\t\t\tstate.groups.splice(groupIndex, 1, updatedGroup)\n\t\t}\n\t},\n\tremoveGroup(state, gid) {\n\t\tconst groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid)\n\t\tif (groupIndex >= 0) {\n\t\t\tstate.groups.splice(groupIndex, 1)\n\t\t}\n\t},\n\taddUserGroup(state, { userid, gid }) {\n\t\tconst group = state.groups.find(groupSearch => groupSearch.id === gid)\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\t// increase count if user is enabled\n\t\tif (group && user.enabled && state.userCount > 0) {\n\t\t\tgroup.usercount++\n\t\t}\n\t\tconst groups = user.groups\n\t\tgroups.push(gid)\n\t},\n\tremoveUserGroup(state, { userid, gid }) {\n\t\tconst group = state.groups.find(groupSearch => groupSearch.id === gid)\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\t// lower count if user is enabled\n\t\tif (group && user.enabled && state.userCount > 0) {\n\t\t\tgroup.usercount--\n\t\t}\n\t\tconst groups = user.groups\n\t\tgroups.splice(groups.indexOf(gid), 1)\n\t},\n\taddUserSubAdmin(state, { userid, gid }) {\n\t\tconst groups = state.users.find(user => user.id === userid).subadmin\n\t\tgroups.push(gid)\n\t},\n\tremoveUserSubAdmin(state, { userid, gid }) {\n\t\tconst groups = state.users.find(user => user.id === userid).subadmin\n\t\tgroups.splice(groups.indexOf(gid), 1)\n\t},\n\tdeleteUser(state, userid) {\n\t\tconst userIndex = state.users.findIndex(user => user.id === userid)\n\t\tthis.commit('updateUserCounts', { user: state.users[userIndex], actionType: 'remove' })\n\t\tstate.users.splice(userIndex, 1)\n\t},\n\taddUserData(state, response) {\n\t\tconst user = response.data.ocs.data\n\t\tstate.users.unshift(user)\n\t\tthis.commit('updateUserCounts', { user, actionType: 'create' })\n\t},\n\tenableDisableUser(state, { userid, enabled }) {\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\tuser.enabled = enabled\n\t\tthis.commit('updateUserCounts', { user, actionType: enabled ? 'enable' : 'disable' })\n\t},\n\t// update active/disabled counts, groups counts\n\tupdateUserCounts(state, { user, actionType }) {\n\t\t// 0 is a special value\n\t\tif (state.userCount === 0) {\n\t\t\treturn\n\t\t}\n\n\t\tconst disabledGroup = state.groups.find(group => group.id === 'disabled')\n\t\tswitch (actionType) {\n\t\tcase 'enable':\n\t\tcase 'disable':\n\t\t\tdisabledGroup.usercount += user.enabled ? -1 : 1 // update Disabled Users count\n\t\t\tstate.userCount += user.enabled ? 1 : -1 // update Active Users count\n\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\tgroup.disabled += user.enabled ? -1 : 1 // update group disabled count\n\t\t\t})\n\t\t\tbreak\n\t\tcase 'create':\n\t\t\tstate.userCount++ // increment Active Users count\n\n\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\tstate.groups\n\t\t\t\t\t.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t .usercount++ // increment group total count\n\t\t\t})\n\t\t\tbreak\n\t\tcase 'remove':\n\t\t\tif (user.enabled) {\n\t\t\t\tstate.userCount-- // decrement Active Users count\n\t\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t\tif (!group) {\n\t\t\t\t\t\tconsole.warn('User group ' + userGroup + ' does not exist during user removal')\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tgroup.usercount-- // decrement group total count\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tdisabledGroup.usercount-- // decrement Disabled Users count\n\t\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t\tgroup.disabled-- // decrement group disabled count\n\t\t\t\t})\n\t\t\t}\n\t\t\tbreak\n\t\tdefault:\n\t\t\tlogger.error(`Unknown action type in updateUserCounts: '${actionType}'`)\n\t\t\t// not throwing error to interrupt execution as this is not fatal\n\t\t}\n\t},\n\tsetUserData(state, { userid, key, value }) {\n\t\tif (key === 'quota') {\n\t\t\tconst humanValue = parseFileSize(value, true)\n\t\t\tstate.users.find(user => user.id === userid)[key][key] = humanValue !== null ? humanValue : value\n\t\t} else {\n\t\t\tstate.users.find(user => user.id === userid)[key] = value\n\t\t}\n\t},\n\n\t/**\n\t * Reset users list\n\t *\n\t * @param {object} state the store state\n\t */\n\tresetUsers(state) {\n\t\tstate.users = []\n\t\tstate.usersOffset = 0\n\t\tstate.disabledUsersOffset = 0\n\t},\n\n\tsetShowConfig(state, { key, value }) {\n\t\tlocalStorage.setItem(`account_settings__${key}`, JSON.stringify(value))\n\t\tstate.showConfig[key] = value\n\t},\n\n\tsetGroupSorting(state, sorting) {\n\t\tconst oldValue = state.orderBy\n\t\tstate.orderBy = sorting\n\n\t\t// Persist the value on the server\n\t\taxios.post(\n\t\t\tgenerateUrl('/settings/users/preferences/group.sortBy'),\n\t\t\t{\n\t\t\t\tvalue: String(sorting),\n\t\t\t},\n\t\t).catch((error) => {\n\t\t\tstate.orderBy = oldValue\n\t\t\tshowError(t('settings', 'Could not set group sorting'))\n\t\t\tlogger.error(error)\n\t\t})\n\t},\n}\n\nconst getters = {\n\tgetUsers(state) {\n\t\treturn state.users\n\t},\n\tgetGroups(state) {\n\t\treturn state.groups\n\t},\n\tgetSubadminGroups(state) {\n\t\t// Can't be subadmin of admin or disabled\n\t\treturn state.groups.filter(group => group.id !== 'admin' && group.id !== 'disabled')\n\t},\n\tgetSortedGroups(state) {\n\t\tconst groups = [...state.groups]\n\t\tif (state.orderBy === GroupSorting.UserCount) {\n\t\t\treturn groups.sort((a, b) => {\n\t\t\t\tconst numA = a.usercount - a.disabled\n\t\t\t\tconst numB = b.usercount - b.disabled\n\t\t\t\treturn (numA < numB) ? 1 : (numB < numA ? -1 : a.name.localeCompare(b.name))\n\t\t\t})\n\t\t} else {\n\t\t\treturn groups.sort((a, b) => a.name.localeCompare(b.name))\n\t\t}\n\t},\n\tgetGroupSorting(state) {\n\t\treturn state.orderBy\n\t},\n\tgetPasswordPolicyMinLength(state) {\n\t\treturn state.minPasswordLength\n\t},\n\tgetUsersOffset(state) {\n\t\treturn state.usersOffset\n\t},\n\tgetUsersLimit(state) {\n\t\treturn state.usersLimit\n\t},\n\tgetDisabledUsersOffset(state) {\n\t\treturn state.disabledUsersOffset\n\t},\n\tgetDisabledUsersLimit(state) {\n\t\treturn state.disabledUsersLimit\n\t},\n\tgetUserCount(state) {\n\t\treturn state.userCount\n\t},\n\tgetShowConfig(state) {\n\t\treturn state.showConfig\n\t},\n}\n\nconst CancelToken = axios.CancelToken\nlet searchRequestCancelSource = null\n\nconst actions = {\n\n\t/**\n\t * search users\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search Search amongst users\n\t * @return {Promise}\n\t */\n\tsearchUsers(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search })).catch((error) => {\n\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t})\n\t},\n\n\t/**\n\t * Get user details\n\t *\n\t * @param {object} context store context\n\t * @param {string} userId user id\n\t * @return {Promise}\n\t */\n\tgetUser(context, userId) {\n\t\treturn api.get(generateOcsUrl(`cloud/users/${userId}`)).catch((error) => {\n\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t})\n\t},\n\n\t/**\n\t * Get all users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search Search amongst users\n\t * @param {string} options.group Get users from group\n\t * @return {Promise}\n\t */\n\tgetUsers(context, { offset, limit, search, group }) {\n\t\tif (searchRequestCancelSource) {\n\t\t\tsearchRequestCancelSource.cancel('Operation canceled by another search request.')\n\t\t}\n\t\tsearchRequestCancelSource = CancelToken.source()\n\t\tsearch = typeof search === 'string' ? search : ''\n\n\t\t/**\n\t\t * Adding filters in the search bar such as in:files, in:users, etc.\n\t\t * collides with this particular search, so we need to remove them\n\t\t * here and leave only the original search query\n\t\t */\n\t\tsearch = search.replace(/in:[^\\s]+/g, '').trim()\n\n\t\tgroup = typeof group === 'string' ? group : ''\n\t\tif (group !== '') {\n\t\t\treturn api.get(generateOcsUrl('cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}', { group: encodeURIComponent(group), offset, limit, search }), {\n\t\t\t\tcancelToken: searchRequestCancelSource.token,\n\t\t\t})\n\t\t\t\t.then((response) => {\n\t\t\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t\t}\n\t\t\t\t\treturn usersCount\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search }), {\n\t\t\tcancelToken: searchRequestCancelSource.token,\n\t\t})\n\t\t\t.then((response) => {\n\t\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t}\n\t\t\t\treturn usersCount\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t\t}\n\t\t\t})\n\t},\n\n\t/**\n\t * Get disabled users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @return {Promise<number>}\n\t */\n\tasync getDisabledUsers(context, { offset, limit, search }) {\n\t\tconst url = generateOcsUrl('cloud/users/disabled?offset={offset}&limit={limit}&search={search}', { offset, limit, search })\n\t\ttry {\n\t\t\tconst response = await api.get(url)\n\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\tif (usersCount > 0) {\n\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\tcontext.commit('updateDisabledUsers', response.data.ocs.data.users)\n\t\t\t}\n\t\t\treturn usersCount\n\t\t} catch (error) {\n\t\t\tcontext.commit('API_FAILURE', error)\n\t\t}\n\t},\n\n\tgetGroups(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\t\tconst limitParam = limit === -1 ? '' : `&limit=${limit}`\n\t\treturn api.get(generateOcsUrl('cloud/groups?offset={offset}&search={search}', { offset, search }) + limitParam)\n\t\t\t.then((response) => {\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tresponse.data.ocs.data.groups.forEach(function(group) {\n\t\t\t\t\t\tcontext.commit('addGroup', { gid: group, displayName: group })\n\t\t\t\t\t})\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\t/**\n\t * Get all users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search -\n\t * @return {Promise}\n\t */\n\tgetUsersFromList(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search }))\n\t\t\t.then((response) => {\n\t\t\t\tif (Object.keys(response.data.ocs.data.users).length > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\t/**\n\t * Get all users with full details from a groupid\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.groupid -\n\t * @return {Promise}\n\t */\n\tgetUsersFromGroup(context, { groupid, offset, limit }) {\n\t\treturn api.get(generateOcsUrl('cloud/users/{groupId}/details?offset={offset}&limit={limit}', { groupId: encodeURIComponent(groupid), offset, limit }))\n\t\t\t.then((response) => context.commit('getUsersFromList', response.data.ocs.data.users))\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\tgetPasswordPolicyMinLength(context) {\n\t\tif (getCapabilities().password_policy && getCapabilities().password_policy.minLength) {\n\t\t\tcontext.commit('setPasswordPolicyMinLength', getCapabilities().password_policy.minLength)\n\t\t\treturn getCapabilities().password_policy.minLength\n\t\t}\n\t\treturn false\n\t},\n\n\t/**\n\t * Add group\n\t *\n\t * @param {object} context store context\n\t * @param {string} gid Group id\n\t * @return {Promise}\n\t */\n\taddGroup(context, gid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/groups'), { groupid: gid })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('addGroup', { gid, displayName: gid })\n\t\t\t\t\treturn { gid, displayName: gid }\n\t\t\t\t})\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { gid, error })\n\t\t\t// let's throw one more time to prevent the view\n\t\t\t// from adding the user to a group that doesn't exists\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Rename group\n\t *\n\t * @param {object} context store context\n\t * @param {string} groupid Group id\n\t * @param {string} displayName Group display name\n\t * @return {Promise}\n\t */\n\trenameGroup(context, { groupid, displayName }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.put(generateOcsUrl('cloud/groups/{groupId}', { groupId: encodeURIComponent(groupid) }), { key: 'displayname', value: displayName })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('renameGroup', { gid: groupid, displayName })\n\t\t\t\t\treturn { groupid, displayName }\n\t\t\t\t})\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { groupid, error })\n\t\t\t// let's throw one more time to prevent the view\n\t\t\t// from renaming the group\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Remove group\n\t *\n\t * @param {object} context store context\n\t * @param {string} gid Group id\n\t * @return {Promise}\n\t */\n\tremoveGroup(context, gid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/groups/{groupId}', { groupId: encodeURIComponent(gid) }))\n\t\t\t\t.then((response) => context.commit('removeGroup', gid))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { gid, error }))\n\t},\n\n\t/**\n\t * Add user to group\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\taddUserGroup(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/groups', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('addUserGroup', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Remove user from group\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\tremoveUserGroup(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}/groups', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('removeUserGroup', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { userid, error })\n\t\t\t// let's throw one more time to prevent\n\t\t\t// the view from removing the user row on failure\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Add user to group admin\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\taddUserSubAdmin(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/subadmins', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('addUserSubAdmin', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Remove user from group admin\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\tremoveUserSubAdmin(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}/subadmins', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('removeUserSubAdmin', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Mark all user devices for remote wipe\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\twipeUserDevices(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/wipe', { userid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Delete a user\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\tdeleteUser(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}', { userid }))\n\t\t\t\t.then((response) => context.commit('deleteUser', userid))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Add a user\n\t *\n\t * @param {object} context store context\n\t * @param {Function} context.commit -\n\t * @param {Function} context.dispatch -\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.password User password\n\t * @param {string} options.displayName User display name\n\t * @param {string} options.email User email\n\t * @param {string} options.groups User groups\n\t * @param {string} options.subadmin User subadmin groups\n\t * @param {string} options.quota User email\n\t * @param {string} options.language User language\n\t * @param {string} options.manager User manager\n\t * @return {Promise}\n\t */\n\taddUser({ commit, dispatch }, { userid, password, displayName, email, groups, subadmin, quota, language, manager }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users'), { userid, password, displayName, email, groups, subadmin, quota, language, manager })\n\t\t\t\t.then((response) => dispatch('addUserData', userid || response.data.ocs.data.id))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcommit('API_FAILURE', { userid, error })\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Get user data and commit addition\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\taddUserData(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.get(generateOcsUrl('cloud/users/{userid}', { userid }))\n\t\t\t\t.then((response) => context.commit('addUserData', response))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Enable or disable user\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {boolean} options.enabled User enablement status\n\t * @return {Promise}\n\t */\n\tenableDisableUser(context, { userid, enabled = true }) {\n\t\tconst userStatus = enabled ? 'enable' : 'disable'\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.put(generateOcsUrl('cloud/users/{userid}/{userStatus}', { userid, userStatus }))\n\t\t\t\t.then((response) => context.commit('enableDisableUser', { userid, enabled }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Edit user data\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.key User field to edit\n\t * @param {string} options.value Value of the change\n\t * @return {Promise}\n\t */\n\tsetUserData(context, { userid, key, value }) {\n\t\tconst allowedEmpty = ['email', 'displayname', 'manager']\n\t\tif (['email', 'language', 'quota', 'displayname', 'password', 'manager'].indexOf(key) !== -1) {\n\t\t\t// We allow empty email or displayname\n\t\t\tif (typeof value === 'string'\n\t\t\t\t&& (\n\t\t\t\t\t(allowedEmpty.indexOf(key) === -1 && value.length > 0)\n\t\t\t\t\t|| allowedEmpty.indexOf(key) !== -1\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn api.requireAdmin().then((response) => {\n\t\t\t\t\treturn api.put(generateOcsUrl('cloud/users/{userid}', { userid }), { key, value })\n\t\t\t\t\t\t.then((response) => context.commit('setUserData', { userid, key, value }))\n\t\t\t\t\t\t.catch((error) => { throw error })\n\t\t\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t\t\t}\n\t\t}\n\t\treturn Promise.reject(new Error('Invalid request data'))\n\t},\n\n\t/**\n\t * Send welcome mail\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\tsendWelcomeMail(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/welcome', { userid }))\n\t\t\t\t.then(response => true)\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport api from './api.js'\nimport Vue from 'vue'\nimport { generateUrl } from '@nextcloud/router'\nimport { showError, showInfo } from '@nextcloud/dialogs'\nimport { loadState } from '@nextcloud/initial-state'\n\nconst state = {\n\tapps: [],\n\tbundles: loadState('settings', 'appstoreBundles', []),\n\tcategories: [],\n\tupdateCount: loadState('settings', 'appstoreUpdateCount', 0),\n\tloading: {},\n\tgettingCategoriesPromise: null,\n}\n\nconst mutations = {\n\n\tAPPS_API_FAILURE(state, error) {\n\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.') + '<br>' + error.error.response.data.data.message, { isHTML: true })\n\t\tconsole.error(state, error)\n\t},\n\n\tinitCategories(state, { categories, updateCount }) {\n\t\tstate.categories = categories\n\t\tstate.updateCount = updateCount\n\t},\n\n\tupdateCategories(state, categoriesPromise) {\n\t\tstate.gettingCategoriesPromise = categoriesPromise\n\t},\n\n\tsetUpdateCount(state, updateCount) {\n\t\tstate.updateCount = updateCount\n\t},\n\n\taddCategory(state, category) {\n\t\tstate.categories.push(category)\n\t},\n\n\tappendCategories(state, categoriesArray) {\n\t\t// convert obj to array\n\t\tstate.categories = categoriesArray\n\t},\n\n\tsetAllApps(state, apps) {\n\t\tstate.apps = apps\n\t},\n\n\tsetError(state, { appId, error }) {\n\t\tif (!Array.isArray(appId)) {\n\t\t\tappId = [appId]\n\t\t}\n\t\tappId.forEach((_id) => {\n\t\t\tconst app = state.apps.find(app => app.id === _id)\n\t\t\tapp.error = error\n\t\t})\n\t},\n\n\tclearError(state, { appId, error }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.error = null\n\t},\n\n\tenableApp(state, { appId, groups }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.active = true\n\t\tapp.groups = groups\n\t},\n\n\tsetInstallState(state, { appId, canInstall }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tif (app) {\n\t\t\tapp.canInstall = canInstall === true\n\t\t}\n\t},\n\n\tdisableApp(state, appId) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.active = false\n\t\tapp.groups = []\n\t\tif (app.removable) {\n\t\t\tapp.canUnInstall = true\n\t\t}\n\t},\n\n\tuninstallApp(state, appId) {\n\t\tstate.apps.find(app => app.id === appId).active = false\n\t\tstate.apps.find(app => app.id === appId).groups = []\n\t\tstate.apps.find(app => app.id === appId).needsDownload = true\n\t\tstate.apps.find(app => app.id === appId).installed = false\n\t\tstate.apps.find(app => app.id === appId).canUnInstall = false\n\t\tstate.apps.find(app => app.id === appId).canInstall = true\n\t},\n\n\tupdateApp(state, appId) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tconst version = app.update\n\t\tapp.update = null\n\t\tapp.version = version\n\t\tstate.updateCount--\n\n\t},\n\n\tresetApps(state) {\n\t\tstate.apps = []\n\t},\n\treset(state) {\n\t\tstate.apps = []\n\t\tstate.categories = []\n\t\tstate.updateCount = 0\n\t},\n\tstartLoading(state, id) {\n\t\tif (Array.isArray(id)) {\n\t\t\tid.forEach((_id) => {\n\t\t\t\tVue.set(state.loading, _id, true)\n\t\t\t})\n\t\t} else {\n\t\t\tVue.set(state.loading, id, true)\n\t\t}\n\t},\n\tstopLoading(state, id) {\n\t\tif (Array.isArray(id)) {\n\t\t\tid.forEach((_id) => {\n\t\t\t\tVue.set(state.loading, _id, false)\n\t\t\t})\n\t\t} else {\n\t\t\tVue.set(state.loading, id, false)\n\t\t}\n\t},\n}\n\nconst getters = {\n\tloading(state) {\n\t\treturn function(id) {\n\t\t\treturn state.loading[id]\n\t\t}\n\t},\n\tgetCategories(state) {\n\t\treturn state.categories\n\t},\n\tgetAllApps(state) {\n\t\treturn state.apps\n\t},\n\tgetAppBundles(state) {\n\t\treturn state.bundles\n\t},\n\tgetUpdateCount(state) {\n\t\treturn state.updateCount\n\t},\n\tgetCategoryById: (state) => (selectedCategoryId) => {\n\t\treturn state.categories.find((category) => category.id === selectedCategoryId)\n\t},\n}\n\nconst actions = {\n\n\tenableApp(context, { appId, groups }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.post(generateUrl('settings/apps/enable'), { appIds: apps, groups })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tapps.forEach(_appId => {\n\t\t\t\t\t\tcontext.commit('enableApp', { appId: _appId, groups })\n\t\t\t\t\t})\n\n\t\t\t\t\t// check for server health\n\t\t\t\t\treturn api.get(generateUrl('apps/files/'))\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\tif (response.data.update_required) {\n\t\t\t\t\t\t\t\tshowInfo(\n\t\t\t\t\t\t\t\t\tt(\n\t\t\t\t\t\t\t\t\t\t'settings',\n\t\t\t\t\t\t\t\t\t\t'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tonClick: () => window.location.reload(),\n\t\t\t\t\t\t\t\t\t\tclose: false,\n\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t\t\t}, 5000)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\tif (!Array.isArray(appId)) {\n\t\t\t\t\t\t\t\tshowError(t('settings', 'Error: This app cannot be enabled because it makes the server unstable'))\n\t\t\t\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\t\t\t\terror: t('settings', 'Error: This app cannot be enabled because it makes the server unstable'),\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tcontext.dispatch('disableApp', { appId })\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\terror: error.response.data.data.message,\n\t\t\t\t\t})\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tforceEnableApp(context, { appId, groups }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then(() => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.post(generateUrl('settings/apps/force'), { appId })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('setInstallState', { appId, canInstall: true })\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\terror: error.response.data.data.message,\n\t\t\t\t\t})\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t\t\t.finally(() => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tdisableApp(context, { appId }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\treturn api.post(generateUrl('settings/apps/disable'), { appIds: apps })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tapps.forEach(_appId => {\n\t\t\t\t\t\tcontext.commit('disableApp', _appId)\n\t\t\t\t\t})\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tuninstallApp(context, { appId }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', appId)\n\t\t\treturn api.get(generateUrl(`settings/apps/uninstall/${appId}`))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('uninstallApp', appId)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\n\tupdateApp(context, { appId }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', appId)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.get(generateUrl(`settings/apps/update/${appId}`))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('updateApp', appId)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\n\tgetAllApps(context) {\n\t\tcontext.commit('startLoading', 'list')\n\t\treturn api.get(generateUrl('settings/apps/list'))\n\t\t\t.then((response) => {\n\t\t\t\tcontext.commit('setAllApps', response.data.apps)\n\t\t\t\tcontext.commit('stopLoading', 'list')\n\t\t\t\treturn true\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\tasync getCategories(context, { shouldRefetchCategories = false } = {}) {\n\t\tif (shouldRefetchCategories || !context.state.gettingCategoriesPromise) {\n\t\t\tcontext.commit('startLoading', 'categories')\n\t\t\ttry {\n\t\t\t\tconst categoriesPromise = api.get(generateUrl('settings/apps/categories'))\n\t\t\t\tcontext.commit('updateCategories', categoriesPromise)\n\t\t\t\tconst categoriesPromiseResponse = await categoriesPromise\n\t\t\t\tif (categoriesPromiseResponse.data.length > 0) {\n\t\t\t\t\tcontext.commit('appendCategories', categoriesPromiseResponse.data)\n\t\t\t\t\tcontext.commit('stopLoading', 'categories')\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tcontext.commit('stopLoading', 'categories')\n\t\t\t\treturn false\n\t\t\t} catch (error) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t}\n\t\treturn context.state.gettingCategoriesPromise\n\t},\n\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\n\nconst state = {\n\tserverData: loadState('settings', 'usersSettings', {}),\n}\nconst mutations = {\n\tsetServerData(state, data) {\n\t\tstate.serverData = data\n\t},\n}\nconst getters = {\n\tgetServerData(state) {\n\t\treturn state.serverData\n\t},\n}\nconst actions = {}\n\nexport default { state, mutations, getters, actions }\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport api from './api.js'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nconst state = {}\nconst mutations = {}\nconst getters = {}\nconst actions = {\n\t/**\n\t * Set application config in database\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.app Application name\n\t * @param {boolean} options.key Config key\n\t * @param {boolean} options.value Value to set\n\t * @return {Promise}\n\t */\n\tsetAppConfig(context, { app, key, value }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('apps/provisioning_api/api/v1/config/apps/{app}/{key}', { app, key }), { value })\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { app, key, value, error }))\n\t},\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\nimport users from './users.js'\nimport apps from './apps.js'\nimport settings from './users-settings.js'\nimport oc from './oc.js'\nimport { showError } from '@nextcloud/dialogs'\n\nVue.use(Vuex)\n\nconst debug = process.env.NODE_ENV !== 'production'\n\nconst mutations = {\n\tAPI_FAILURE(state, error) {\n\t\ttry {\n\t\t\tconst message = error.error.response.data.ocs.meta.message\n\t\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.') + '<br>' + message, { isHTML: true })\n\t\t} catch (e) {\n\t\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.'))\n\t\t}\n\t\tconsole.error(state, error)\n\t},\n}\n\nlet store = null\n\nexport const useStore = () => {\n\tif (store === null) {\n\t\tstore = new Store({\n\t\t\tmodules: {\n\t\t\t\tusers,\n\t\t\t\tapps,\n\t\t\t\tsettings,\n\t\t\t\toc,\n\t\t\t},\n\t\t\tstrict: debug,\n\t\t\tmutations,\n\t\t})\n\t}\n\treturn store\n}\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n/**\n * https://github.com/nextcloud/server/blob/208e38e84e1a07a49699aa90dc5b7272d24489f0/lib/private/Group/MetaData.php#L34\n */\nexport var GroupSorting;\n(function (GroupSorting) {\n GroupSorting[GroupSorting[\"UserCount\"] = 1] = \"UserCount\";\n GroupSorting[GroupSorting[\"GroupName\"] = 2] = \"GroupName\";\n})(GroupSorting || (GroupSorting = {}));\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('settings')\n .detectUser()\n .build();\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c(_setup.NcContent,{attrs:{\"app-name\":\"settings\"}},[_c('router-view',{attrs:{\"name\":\"navigation\"}}),_vm._v(\" \"),_c('router-view'),_vm._v(\" \"),_c('router-view',{attrs:{\"name\":\"sidebar\"}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SettingsApp.vue?vue&type=script&setup=true&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SettingsApp.vue?vue&type=script&setup=true&lang=ts\"","import { render, staticRenderFns } from \"./SettingsApp.vue?vue&type=template&id=02c6e0e9\"\nimport script from \"./SettingsApp.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SettingsApp.vue?vue&type=script&setup=true&lang=ts\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","// Dynamic loading\nconst AppStore = () => import(/* webpackChunkName: 'settings-apps-view' */ '../views/AppStore.vue');\nconst AppStoreNavigation = () => import(/* webpackChunkName: 'settings-apps-view' */ '../views/AppStoreNavigation.vue');\nconst AppStoreSidebar = () => import(/* webpackChunkName: 'settings-apps-view' */ '../views/AppStoreSidebar.vue');\nconst UserManagement = () => import(/* webpackChunkName: 'settings-users' */ '../views/UserManagement.vue');\nconst UserManagementNavigation = () => import(/* webpackChunkName: 'settings-users' */ '../views/UserManagementNavigation.vue');\nconst routes = [\n {\n name: 'users',\n path: '/:index(index.php/)?settings/users',\n components: {\n default: UserManagement,\n navigation: UserManagementNavigation,\n },\n props: true,\n children: [\n {\n path: ':selectedGroup',\n name: 'group',\n },\n ],\n },\n {\n path: '/:index(index.php/)?settings/apps',\n name: 'apps',\n // redirect to our default route - the app discover section\n redirect: {\n name: 'apps-category',\n params: {\n category: 'discover',\n },\n },\n components: {\n default: AppStore,\n navigation: AppStoreNavigation,\n sidebar: AppStoreSidebar,\n },\n children: [\n {\n path: ':category',\n name: 'apps-category',\n children: [\n {\n path: ':id',\n name: 'apps-details',\n },\n ],\n },\n ],\n },\n];\nexport default routes;\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport Vue from 'vue';\nimport Router from 'vue-router';\nimport { generateUrl } from '@nextcloud/router';\nimport routes from './routes.ts';\nVue.use(Router);\nconst router = new Router({\n mode: 'history',\n // if index.php is in the url AND we got this far, then it's working:\n // let's keep using index.php in the url\n base: generateUrl(''),\n linkActiveClass: 'active',\n routes,\n});\nexport default router;\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport Vue from 'vue';\nimport VTooltip from 'v-tooltip';\nimport { sync } from 'vuex-router-sync';\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n';\nimport SettingsApp from './views/SettingsApp.vue';\nimport router from './router/index.ts';\nimport { useStore } from './store/index.js';\nimport { getRequestToken } from '@nextcloud/auth';\nimport { PiniaVuePlugin, createPinia } from 'pinia';\nVue.use(VTooltip, { defaultHtml: false });\nconst store = useStore();\nsync(store, router);\n// CSP config for webpack dynamic chunk loading\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(getRequestToken() ?? '');\n// bind to window\nVue.prototype.t = t;\nVue.prototype.n = n;\nVue.use(PiniaVuePlugin);\nconst pinia = createPinia();\nexport default new Vue({\n router,\n store,\n pinia,\n render: h => h(SettingsApp),\n el: '#content',\n});\n","/*!\n * vue-router v3.6.5\n * (c) 2022 Evan You\n * @license MIT\n */\n/* */\n\nfunction assert (condition, message) {\n if (!condition) {\n throw new Error((\"[vue-router] \" + message))\n }\n}\n\nfunction warn (condition, message) {\n if (!condition) {\n typeof console !== 'undefined' && console.warn((\"[vue-router] \" + message));\n }\n}\n\nfunction extend (a, b) {\n for (var key in b) {\n a[key] = b[key];\n }\n return a\n}\n\n/* */\n\nvar encodeReserveRE = /[!'()*]/g;\nvar encodeReserveReplacer = function (c) { return '%' + c.charCodeAt(0).toString(16); };\nvar commaRE = /%2C/g;\n\n// fixed encodeURIComponent which is more conformant to RFC3986:\n// - escapes [!'()*]\n// - preserve commas\nvar encode = function (str) { return encodeURIComponent(str)\n .replace(encodeReserveRE, encodeReserveReplacer)\n .replace(commaRE, ','); };\n\nfunction decode (str) {\n try {\n return decodeURIComponent(str)\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"Error decoding \\\"\" + str + \"\\\". Leaving it intact.\"));\n }\n }\n return str\n}\n\nfunction resolveQuery (\n query,\n extraQuery,\n _parseQuery\n) {\n if ( extraQuery === void 0 ) extraQuery = {};\n\n var parse = _parseQuery || parseQuery;\n var parsedQuery;\n try {\n parsedQuery = parse(query || '');\n } catch (e) {\n process.env.NODE_ENV !== 'production' && warn(false, e.message);\n parsedQuery = {};\n }\n for (var key in extraQuery) {\n var value = extraQuery[key];\n parsedQuery[key] = Array.isArray(value)\n ? value.map(castQueryParamValue)\n : castQueryParamValue(value);\n }\n return parsedQuery\n}\n\nvar castQueryParamValue = function (value) { return (value == null || typeof value === 'object' ? value : String(value)); };\n\nfunction parseQuery (query) {\n var res = {};\n\n query = query.trim().replace(/^(\\?|#|&)/, '');\n\n if (!query) {\n return res\n }\n\n query.split('&').forEach(function (param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = decode(parts.shift());\n var val = parts.length > 0 ? decode(parts.join('=')) : null;\n\n if (res[key] === undefined) {\n res[key] = val;\n } else if (Array.isArray(res[key])) {\n res[key].push(val);\n } else {\n res[key] = [res[key], val];\n }\n });\n\n return res\n}\n\nfunction stringifyQuery (obj) {\n var res = obj\n ? Object.keys(obj)\n .map(function (key) {\n var val = obj[key];\n\n if (val === undefined) {\n return ''\n }\n\n if (val === null) {\n return encode(key)\n }\n\n if (Array.isArray(val)) {\n var result = [];\n val.forEach(function (val2) {\n if (val2 === undefined) {\n return\n }\n if (val2 === null) {\n result.push(encode(key));\n } else {\n result.push(encode(key) + '=' + encode(val2));\n }\n });\n return result.join('&')\n }\n\n return encode(key) + '=' + encode(val)\n })\n .filter(function (x) { return x.length > 0; })\n .join('&')\n : null;\n return res ? (\"?\" + res) : ''\n}\n\n/* */\n\nvar trailingSlashRE = /\\/?$/;\n\nfunction createRoute (\n record,\n location,\n redirectedFrom,\n router\n) {\n var stringifyQuery = router && router.options.stringifyQuery;\n\n var query = location.query || {};\n try {\n query = clone(query);\n } catch (e) {}\n\n var route = {\n name: location.name || (record && record.name),\n meta: (record && record.meta) || {},\n path: location.path || '/',\n hash: location.hash || '',\n query: query,\n params: location.params || {},\n fullPath: getFullPath(location, stringifyQuery),\n matched: record ? formatMatch(record) : []\n };\n if (redirectedFrom) {\n route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery);\n }\n return Object.freeze(route)\n}\n\nfunction clone (value) {\n if (Array.isArray(value)) {\n return value.map(clone)\n } else if (value && typeof value === 'object') {\n var res = {};\n for (var key in value) {\n res[key] = clone(value[key]);\n }\n return res\n } else {\n return value\n }\n}\n\n// the starting route that represents the initial state\nvar START = createRoute(null, {\n path: '/'\n});\n\nfunction formatMatch (record) {\n var res = [];\n while (record) {\n res.unshift(record);\n record = record.parent;\n }\n return res\n}\n\nfunction getFullPath (\n ref,\n _stringifyQuery\n) {\n var path = ref.path;\n var query = ref.query; if ( query === void 0 ) query = {};\n var hash = ref.hash; if ( hash === void 0 ) hash = '';\n\n var stringify = _stringifyQuery || stringifyQuery;\n return (path || '/') + stringify(query) + hash\n}\n\nfunction isSameRoute (a, b, onlyPath) {\n if (b === START) {\n return a === b\n } else if (!b) {\n return false\n } else if (a.path && b.path) {\n return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && (onlyPath ||\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query))\n } else if (a.name && b.name) {\n return (\n a.name === b.name &&\n (onlyPath || (\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query) &&\n isObjectEqual(a.params, b.params))\n )\n )\n } else {\n return false\n }\n}\n\nfunction isObjectEqual (a, b) {\n if ( a === void 0 ) a = {};\n if ( b === void 0 ) b = {};\n\n // handle null value #1566\n if (!a || !b) { return a === b }\n var aKeys = Object.keys(a).sort();\n var bKeys = Object.keys(b).sort();\n if (aKeys.length !== bKeys.length) {\n return false\n }\n return aKeys.every(function (key, i) {\n var aVal = a[key];\n var bKey = bKeys[i];\n if (bKey !== key) { return false }\n var bVal = b[key];\n // query values can be null and undefined\n if (aVal == null || bVal == null) { return aVal === bVal }\n // check nested equality\n if (typeof aVal === 'object' && typeof bVal === 'object') {\n return isObjectEqual(aVal, bVal)\n }\n return String(aVal) === String(bVal)\n })\n}\n\nfunction isIncludedRoute (current, target) {\n return (\n current.path.replace(trailingSlashRE, '/').indexOf(\n target.path.replace(trailingSlashRE, '/')\n ) === 0 &&\n (!target.hash || current.hash === target.hash) &&\n queryIncludes(current.query, target.query)\n )\n}\n\nfunction queryIncludes (current, target) {\n for (var key in target) {\n if (!(key in current)) {\n return false\n }\n }\n return true\n}\n\nfunction handleRouteEntered (route) {\n for (var i = 0; i < route.matched.length; i++) {\n var record = route.matched[i];\n for (var name in record.instances) {\n var instance = record.instances[name];\n var cbs = record.enteredCbs[name];\n if (!instance || !cbs) { continue }\n delete record.enteredCbs[name];\n for (var i$1 = 0; i$1 < cbs.length; i$1++) {\n if (!instance._isBeingDestroyed) { cbs[i$1](instance); }\n }\n }\n }\n}\n\nvar View = {\n name: 'RouterView',\n functional: true,\n props: {\n name: {\n type: String,\n default: 'default'\n }\n },\n render: function render (_, ref) {\n var props = ref.props;\n var children = ref.children;\n var parent = ref.parent;\n var data = ref.data;\n\n // used by devtools to display a router-view badge\n data.routerView = true;\n\n // directly use parent context's createElement() function\n // so that components rendered by router-view can resolve named slots\n var h = parent.$createElement;\n var name = props.name;\n var route = parent.$route;\n var cache = parent._routerViewCache || (parent._routerViewCache = {});\n\n // determine current view depth, also check to see if the tree\n // has been toggled inactive but kept-alive.\n var depth = 0;\n var inactive = false;\n while (parent && parent._routerRoot !== parent) {\n var vnodeData = parent.$vnode ? parent.$vnode.data : {};\n if (vnodeData.routerView) {\n depth++;\n }\n if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {\n inactive = true;\n }\n parent = parent.$parent;\n }\n data.routerViewDepth = depth;\n\n // render previous view if the tree is inactive and kept-alive\n if (inactive) {\n var cachedData = cache[name];\n var cachedComponent = cachedData && cachedData.component;\n if (cachedComponent) {\n // #2301\n // pass props\n if (cachedData.configProps) {\n fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);\n }\n return h(cachedComponent, data, children)\n } else {\n // render previous empty view\n return h()\n }\n }\n\n var matched = route.matched[depth];\n var component = matched && matched.components[name];\n\n // render empty node if no matched route or no config component\n if (!matched || !component) {\n cache[name] = null;\n return h()\n }\n\n // cache component\n cache[name] = { component: component };\n\n // attach instance registration hook\n // this will be called in the instance's injected lifecycle hooks\n data.registerRouteInstance = function (vm, val) {\n // val could be undefined for unregistration\n var current = matched.instances[name];\n if (\n (val && current !== vm) ||\n (!val && current === vm)\n ) {\n matched.instances[name] = val;\n }\n }\n\n // also register instance in prepatch hook\n // in case the same component instance is reused across different routes\n ;(data.hook || (data.hook = {})).prepatch = function (_, vnode) {\n matched.instances[name] = vnode.componentInstance;\n };\n\n // register instance in init hook\n // in case kept-alive component be actived when routes changed\n data.hook.init = function (vnode) {\n if (vnode.data.keepAlive &&\n vnode.componentInstance &&\n vnode.componentInstance !== matched.instances[name]\n ) {\n matched.instances[name] = vnode.componentInstance;\n }\n\n // if the route transition has already been confirmed then we weren't\n // able to call the cbs during confirmation as the component was not\n // registered yet, so we call it here.\n handleRouteEntered(route);\n };\n\n var configProps = matched.props && matched.props[name];\n // save route and configProps in cache\n if (configProps) {\n extend(cache[name], {\n route: route,\n configProps: configProps\n });\n fillPropsinData(component, data, route, configProps);\n }\n\n return h(component, data, children)\n }\n};\n\nfunction fillPropsinData (component, data, route, configProps) {\n // resolve props\n var propsToPass = data.props = resolveProps(route, configProps);\n if (propsToPass) {\n // clone to prevent mutation\n propsToPass = data.props = extend({}, propsToPass);\n // pass non-declared props as attrs\n var attrs = data.attrs = data.attrs || {};\n for (var key in propsToPass) {\n if (!component.props || !(key in component.props)) {\n attrs[key] = propsToPass[key];\n delete propsToPass[key];\n }\n }\n }\n}\n\nfunction resolveProps (route, config) {\n switch (typeof config) {\n case 'undefined':\n return\n case 'object':\n return config\n case 'function':\n return config(route)\n case 'boolean':\n return config ? route.params : undefined\n default:\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n \"props in \\\"\" + (route.path) + \"\\\" is a \" + (typeof config) + \", \" +\n \"expecting an object, function or boolean.\"\n );\n }\n }\n}\n\n/* */\n\nfunction resolvePath (\n relative,\n base,\n append\n) {\n var firstChar = relative.charAt(0);\n if (firstChar === '/') {\n return relative\n }\n\n if (firstChar === '?' || firstChar === '#') {\n return base + relative\n }\n\n var stack = base.split('/');\n\n // remove trailing segment if:\n // - not appending\n // - appending to trailing slash (last segment is empty)\n if (!append || !stack[stack.length - 1]) {\n stack.pop();\n }\n\n // resolve relative path\n var segments = relative.replace(/^\\//, '').split('/');\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n if (segment === '..') {\n stack.pop();\n } else if (segment !== '.') {\n stack.push(segment);\n }\n }\n\n // ensure leading slash\n if (stack[0] !== '') {\n stack.unshift('');\n }\n\n return stack.join('/')\n}\n\nfunction parsePath (path) {\n var hash = '';\n var query = '';\n\n var hashIndex = path.indexOf('#');\n if (hashIndex >= 0) {\n hash = path.slice(hashIndex);\n path = path.slice(0, hashIndex);\n }\n\n var queryIndex = path.indexOf('?');\n if (queryIndex >= 0) {\n query = path.slice(queryIndex + 1);\n path = path.slice(0, queryIndex);\n }\n\n return {\n path: path,\n query: query,\n hash: hash\n }\n}\n\nfunction cleanPath (path) {\n return path.replace(/\\/(?:\\s*\\/)+/g, '/')\n}\n\nvar isarray = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n/**\n * Expose `pathToRegexp`.\n */\nvar pathToRegexp_1 = pathToRegexp;\nvar parse_1 = parse;\nvar compile_1 = compile;\nvar tokensToFunction_1 = tokensToFunction;\nvar tokensToRegExp_1 = tokensToRegExp;\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g');\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = options && options.delimiter || '/';\n var res;\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n continue\n }\n\n var next = str[index];\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var modifier = res[6];\n var asterisk = res[7];\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n }\n\n var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n });\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index);\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path);\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys;\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n });\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = [];\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n var strict = options.strict;\n var end = options.end !== false;\n var route = '';\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n\n keys.push(token);\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = prefix + '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n\n route += capture;\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/');\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';\n }\n\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\npathToRegexp_1.parse = parse_1;\npathToRegexp_1.compile = compile_1;\npathToRegexp_1.tokensToFunction = tokensToFunction_1;\npathToRegexp_1.tokensToRegExp = tokensToRegExp_1;\n\n/* */\n\n// $flow-disable-line\nvar regexpCompileCache = Object.create(null);\n\nfunction fillParams (\n path,\n params,\n routeMsg\n) {\n params = params || {};\n try {\n var filler =\n regexpCompileCache[path] ||\n (regexpCompileCache[path] = pathToRegexp_1.compile(path));\n\n // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}\n // and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string\n if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }\n\n return filler(params, { pretty: true })\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n // Fix #3072 no warn if `pathMatch` is string\n warn(typeof params.pathMatch === 'string', (\"missing param for \" + routeMsg + \": \" + (e.message)));\n }\n return ''\n } finally {\n // delete the 0 if it was added\n delete params[0];\n }\n}\n\n/* */\n\nfunction normalizeLocation (\n raw,\n current,\n append,\n router\n) {\n var next = typeof raw === 'string' ? { path: raw } : raw;\n // named target\n if (next._normalized) {\n return next\n } else if (next.name) {\n next = extend({}, raw);\n var params = next.params;\n if (params && typeof params === 'object') {\n next.params = extend({}, params);\n }\n return next\n }\n\n // relative params\n if (!next.path && next.params && current) {\n next = extend({}, next);\n next._normalized = true;\n var params$1 = extend(extend({}, current.params), next.params);\n if (current.name) {\n next.name = current.name;\n next.params = params$1;\n } else if (current.matched.length) {\n var rawPath = current.matched[current.matched.length - 1].path;\n next.path = fillParams(rawPath, params$1, (\"path \" + (current.path)));\n } else if (process.env.NODE_ENV !== 'production') {\n warn(false, \"relative params navigation requires a current route.\");\n }\n return next\n }\n\n var parsedPath = parsePath(next.path || '');\n var basePath = (current && current.path) || '/';\n var path = parsedPath.path\n ? resolvePath(parsedPath.path, basePath, append || next.append)\n : basePath;\n\n var query = resolveQuery(\n parsedPath.query,\n next.query,\n router && router.options.parseQuery\n );\n\n var hash = next.hash || parsedPath.hash;\n if (hash && hash.charAt(0) !== '#') {\n hash = \"#\" + hash;\n }\n\n return {\n _normalized: true,\n path: path,\n query: query,\n hash: hash\n }\n}\n\n/* */\n\n// work around weird flow bug\nvar toTypes = [String, Object];\nvar eventTypes = [String, Array];\n\nvar noop = function () {};\n\nvar warnedCustomSlot;\nvar warnedTagProp;\nvar warnedEventProp;\n\nvar Link = {\n name: 'RouterLink',\n props: {\n to: {\n type: toTypes,\n required: true\n },\n tag: {\n type: String,\n default: 'a'\n },\n custom: Boolean,\n exact: Boolean,\n exactPath: Boolean,\n append: Boolean,\n replace: Boolean,\n activeClass: String,\n exactActiveClass: String,\n ariaCurrentValue: {\n type: String,\n default: 'page'\n },\n event: {\n type: eventTypes,\n default: 'click'\n }\n },\n render: function render (h) {\n var this$1$1 = this;\n\n var router = this.$router;\n var current = this.$route;\n var ref = router.resolve(\n this.to,\n current,\n this.append\n );\n var location = ref.location;\n var route = ref.route;\n var href = ref.href;\n\n var classes = {};\n var globalActiveClass = router.options.linkActiveClass;\n var globalExactActiveClass = router.options.linkExactActiveClass;\n // Support global empty active class\n var activeClassFallback =\n globalActiveClass == null ? 'router-link-active' : globalActiveClass;\n var exactActiveClassFallback =\n globalExactActiveClass == null\n ? 'router-link-exact-active'\n : globalExactActiveClass;\n var activeClass =\n this.activeClass == null ? activeClassFallback : this.activeClass;\n var exactActiveClass =\n this.exactActiveClass == null\n ? exactActiveClassFallback\n : this.exactActiveClass;\n\n var compareTarget = route.redirectedFrom\n ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router)\n : route;\n\n classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);\n classes[activeClass] = this.exact || this.exactPath\n ? classes[exactActiveClass]\n : isIncludedRoute(current, compareTarget);\n\n var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;\n\n var handler = function (e) {\n if (guardEvent(e)) {\n if (this$1$1.replace) {\n router.replace(location, noop);\n } else {\n router.push(location, noop);\n }\n }\n };\n\n var on = { click: guardEvent };\n if (Array.isArray(this.event)) {\n this.event.forEach(function (e) {\n on[e] = handler;\n });\n } else {\n on[this.event] = handler;\n }\n\n var data = { class: classes };\n\n var scopedSlot =\n !this.$scopedSlots.$hasNormal &&\n this.$scopedSlots.default &&\n this.$scopedSlots.default({\n href: href,\n route: route,\n navigate: handler,\n isActive: classes[activeClass],\n isExactActive: classes[exactActiveClass]\n });\n\n if (scopedSlot) {\n if (process.env.NODE_ENV !== 'production' && !this.custom) {\n !warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an <a> element. Use the custom prop to remove this warning:\\n<router-link v-slot=\"{ navigate, href }\" custom></router-link>\\n');\n warnedCustomSlot = true;\n }\n if (scopedSlot.length === 1) {\n return scopedSlot[0]\n } else if (scopedSlot.length > 1 || !scopedSlot.length) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n (\"<router-link> with to=\\\"\" + (this.to) + \"\\\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.\")\n );\n }\n return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if ('tag' in this.$options.propsData && !warnedTagProp) {\n warn(\n false,\n \"<router-link>'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.\"\n );\n warnedTagProp = true;\n }\n if ('event' in this.$options.propsData && !warnedEventProp) {\n warn(\n false,\n \"<router-link>'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.\"\n );\n warnedEventProp = true;\n }\n }\n\n if (this.tag === 'a') {\n data.on = on;\n data.attrs = { href: href, 'aria-current': ariaCurrentValue };\n } else {\n // find the first <a> child and apply listener and href\n var a = findAnchor(this.$slots.default);\n if (a) {\n // in case the <a> is a static node\n a.isStatic = false;\n var aData = (a.data = extend({}, a.data));\n aData.on = aData.on || {};\n // transform existing events in both objects into arrays so we can push later\n for (var event in aData.on) {\n var handler$1 = aData.on[event];\n if (event in on) {\n aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];\n }\n }\n // append new listeners for router-link\n for (var event$1 in on) {\n if (event$1 in aData.on) {\n // on[event] is always a function\n aData.on[event$1].push(on[event$1]);\n } else {\n aData.on[event$1] = handler;\n }\n }\n\n var aAttrs = (a.data.attrs = extend({}, a.data.attrs));\n aAttrs.href = href;\n aAttrs['aria-current'] = ariaCurrentValue;\n } else {\n // doesn't have <a> child, apply listener to self\n data.on = on;\n }\n }\n\n return h(this.tag, data, this.$slots.default)\n }\n};\n\nfunction guardEvent (e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }\n // don't redirect when preventDefault called\n if (e.defaultPrevented) { return }\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0) { return }\n // don't redirect if `target=\"_blank\"`\n if (e.currentTarget && e.currentTarget.getAttribute) {\n var target = e.currentTarget.getAttribute('target');\n if (/\\b_blank\\b/i.test(target)) { return }\n }\n // this may be a Weex event which doesn't have this method\n if (e.preventDefault) {\n e.preventDefault();\n }\n return true\n}\n\nfunction findAnchor (children) {\n if (children) {\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.tag === 'a') {\n return child\n }\n if (child.children && (child = findAnchor(child.children))) {\n return child\n }\n }\n }\n}\n\nvar _Vue;\n\nfunction install (Vue) {\n if (install.installed && _Vue === Vue) { return }\n install.installed = true;\n\n _Vue = Vue;\n\n var isDef = function (v) { return v !== undefined; };\n\n var registerInstance = function (vm, callVal) {\n var i = vm.$options._parentVnode;\n if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {\n i(vm, callVal);\n }\n };\n\n Vue.mixin({\n beforeCreate: function beforeCreate () {\n if (isDef(this.$options.router)) {\n this._routerRoot = this;\n this._router = this.$options.router;\n this._router.init(this);\n Vue.util.defineReactive(this, '_route', this._router.history.current);\n } else {\n this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;\n }\n registerInstance(this, this);\n },\n destroyed: function destroyed () {\n registerInstance(this);\n }\n });\n\n Object.defineProperty(Vue.prototype, '$router', {\n get: function get () { return this._routerRoot._router }\n });\n\n Object.defineProperty(Vue.prototype, '$route', {\n get: function get () { return this._routerRoot._route }\n });\n\n Vue.component('RouterView', View);\n Vue.component('RouterLink', Link);\n\n var strats = Vue.config.optionMergeStrategies;\n // use the same hook merging strategy for route hooks\n strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;\n}\n\n/* */\n\nvar inBrowser = typeof window !== 'undefined';\n\n/* */\n\nfunction createRouteMap (\n routes,\n oldPathList,\n oldPathMap,\n oldNameMap,\n parentRoute\n) {\n // the path list is used to control path matching priority\n var pathList = oldPathList || [];\n // $flow-disable-line\n var pathMap = oldPathMap || Object.create(null);\n // $flow-disable-line\n var nameMap = oldNameMap || Object.create(null);\n\n routes.forEach(function (route) {\n addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);\n });\n\n // ensure wildcard routes are always at the end\n for (var i = 0, l = pathList.length; i < l; i++) {\n if (pathList[i] === '*') {\n pathList.push(pathList.splice(i, 1)[0]);\n l--;\n i--;\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n // warn if routes do not include leading slashes\n var found = pathList\n // check for missing leading slash\n .filter(function (path) { return path && path.charAt(0) !== '*' && path.charAt(0) !== '/'; });\n\n if (found.length > 0) {\n var pathNames = found.map(function (path) { return (\"- \" + path); }).join('\\n');\n warn(false, (\"Non-nested routes must include a leading slash character. Fix the following routes: \\n\" + pathNames));\n }\n }\n\n return {\n pathList: pathList,\n pathMap: pathMap,\n nameMap: nameMap\n }\n}\n\nfunction addRouteRecord (\n pathList,\n pathMap,\n nameMap,\n route,\n parent,\n matchAs\n) {\n var path = route.path;\n var name = route.name;\n if (process.env.NODE_ENV !== 'production') {\n assert(path != null, \"\\\"path\\\" is required in a route configuration.\");\n assert(\n typeof route.component !== 'string',\n \"route config \\\"component\\\" for path: \" + (String(\n path || name\n )) + \" cannot be a \" + \"string id. Use an actual component instead.\"\n );\n\n warn(\n // eslint-disable-next-line no-control-regex\n !/[^\\u0000-\\u007F]+/.test(path),\n \"Route with path \\\"\" + path + \"\\\" contains unencoded characters, make sure \" +\n \"your path is correctly encoded before passing it to the router. Use \" +\n \"encodeURI to encode static segments of your path.\"\n );\n }\n\n var pathToRegexpOptions =\n route.pathToRegexpOptions || {};\n var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);\n\n if (typeof route.caseSensitive === 'boolean') {\n pathToRegexpOptions.sensitive = route.caseSensitive;\n }\n\n var record = {\n path: normalizedPath,\n regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),\n components: route.components || { default: route.component },\n alias: route.alias\n ? typeof route.alias === 'string'\n ? [route.alias]\n : route.alias\n : [],\n instances: {},\n enteredCbs: {},\n name: name,\n parent: parent,\n matchAs: matchAs,\n redirect: route.redirect,\n beforeEnter: route.beforeEnter,\n meta: route.meta || {},\n props:\n route.props == null\n ? {}\n : route.components\n ? route.props\n : { default: route.props }\n };\n\n if (route.children) {\n // Warn if route is named, does not redirect and has a default child route.\n // If users navigate to this route by name, the default child will\n // not be rendered (GH Issue #629)\n if (process.env.NODE_ENV !== 'production') {\n if (\n route.name &&\n !route.redirect &&\n route.children.some(function (child) { return /^\\/?$/.test(child.path); })\n ) {\n warn(\n false,\n \"Named Route '\" + (route.name) + \"' has a default child route. \" +\n \"When navigating to this named route (:to=\\\"{name: '\" + (route.name) + \"'}\\\"), \" +\n \"the default child route will not be rendered. Remove the name from \" +\n \"this route and use the name of the default child route for named \" +\n \"links instead.\"\n );\n }\n }\n route.children.forEach(function (child) {\n var childMatchAs = matchAs\n ? cleanPath((matchAs + \"/\" + (child.path)))\n : undefined;\n addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);\n });\n }\n\n if (!pathMap[record.path]) {\n pathList.push(record.path);\n pathMap[record.path] = record;\n }\n\n if (route.alias !== undefined) {\n var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];\n for (var i = 0; i < aliases.length; ++i) {\n var alias = aliases[i];\n if (process.env.NODE_ENV !== 'production' && alias === path) {\n warn(\n false,\n (\"Found an alias with the same value as the path: \\\"\" + path + \"\\\". You have to remove that alias. It will be ignored in development.\")\n );\n // skip in dev to make it work\n continue\n }\n\n var aliasRoute = {\n path: alias,\n children: route.children\n };\n addRouteRecord(\n pathList,\n pathMap,\n nameMap,\n aliasRoute,\n parent,\n record.path || '/' // matchAs\n );\n }\n }\n\n if (name) {\n if (!nameMap[name]) {\n nameMap[name] = record;\n } else if (process.env.NODE_ENV !== 'production' && !matchAs) {\n warn(\n false,\n \"Duplicate named routes definition: \" +\n \"{ name: \\\"\" + name + \"\\\", path: \\\"\" + (record.path) + \"\\\" }\"\n );\n }\n }\n}\n\nfunction compileRouteRegex (\n path,\n pathToRegexpOptions\n) {\n var regex = pathToRegexp_1(path, [], pathToRegexpOptions);\n if (process.env.NODE_ENV !== 'production') {\n var keys = Object.create(null);\n regex.keys.forEach(function (key) {\n warn(\n !keys[key.name],\n (\"Duplicate param keys in route with path: \\\"\" + path + \"\\\"\")\n );\n keys[key.name] = true;\n });\n }\n return regex\n}\n\nfunction normalizePath (\n path,\n parent,\n strict\n) {\n if (!strict) { path = path.replace(/\\/$/, ''); }\n if (path[0] === '/') { return path }\n if (parent == null) { return path }\n return cleanPath(((parent.path) + \"/\" + path))\n}\n\n/* */\n\n\n\nfunction createMatcher (\n routes,\n router\n) {\n var ref = createRouteMap(routes);\n var pathList = ref.pathList;\n var pathMap = ref.pathMap;\n var nameMap = ref.nameMap;\n\n function addRoutes (routes) {\n createRouteMap(routes, pathList, pathMap, nameMap);\n }\n\n function addRoute (parentOrRoute, route) {\n var parent = (typeof parentOrRoute !== 'object') ? nameMap[parentOrRoute] : undefined;\n // $flow-disable-line\n createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);\n\n // add aliases of parent\n if (parent && parent.alias.length) {\n createRouteMap(\n // $flow-disable-line route is defined if parent is\n parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),\n pathList,\n pathMap,\n nameMap,\n parent\n );\n }\n }\n\n function getRoutes () {\n return pathList.map(function (path) { return pathMap[path]; })\n }\n\n function match (\n raw,\n currentRoute,\n redirectedFrom\n ) {\n var location = normalizeLocation(raw, currentRoute, false, router);\n var name = location.name;\n\n if (name) {\n var record = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n warn(record, (\"Route with name '\" + name + \"' does not exist\"));\n }\n if (!record) { return _createRoute(null, location) }\n var paramNames = record.regex.keys\n .filter(function (key) { return !key.optional; })\n .map(function (key) { return key.name; });\n\n if (typeof location.params !== 'object') {\n location.params = {};\n }\n\n if (currentRoute && typeof currentRoute.params === 'object') {\n for (var key in currentRoute.params) {\n if (!(key in location.params) && paramNames.indexOf(key) > -1) {\n location.params[key] = currentRoute.params[key];\n }\n }\n }\n\n location.path = fillParams(record.path, location.params, (\"named route \\\"\" + name + \"\\\"\"));\n return _createRoute(record, location, redirectedFrom)\n } else if (location.path) {\n location.params = {};\n for (var i = 0; i < pathList.length; i++) {\n var path = pathList[i];\n var record$1 = pathMap[path];\n if (matchRoute(record$1.regex, location.path, location.params)) {\n return _createRoute(record$1, location, redirectedFrom)\n }\n }\n }\n // no match\n return _createRoute(null, location)\n }\n\n function redirect (\n record,\n location\n ) {\n var originalRedirect = record.redirect;\n var redirect = typeof originalRedirect === 'function'\n ? originalRedirect(createRoute(record, location, null, router))\n : originalRedirect;\n\n if (typeof redirect === 'string') {\n redirect = { path: redirect };\n }\n\n if (!redirect || typeof redirect !== 'object') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false, (\"invalid redirect option: \" + (JSON.stringify(redirect)))\n );\n }\n return _createRoute(null, location)\n }\n\n var re = redirect;\n var name = re.name;\n var path = re.path;\n var query = location.query;\n var hash = location.hash;\n var params = location.params;\n query = re.hasOwnProperty('query') ? re.query : query;\n hash = re.hasOwnProperty('hash') ? re.hash : hash;\n params = re.hasOwnProperty('params') ? re.params : params;\n\n if (name) {\n // resolved named direct\n var targetRecord = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n assert(targetRecord, (\"redirect failed: named route \\\"\" + name + \"\\\" not found.\"));\n }\n return match({\n _normalized: true,\n name: name,\n query: query,\n hash: hash,\n params: params\n }, undefined, location)\n } else if (path) {\n // 1. resolve relative redirect\n var rawPath = resolveRecordPath(path, record);\n // 2. resolve params\n var resolvedPath = fillParams(rawPath, params, (\"redirect route with path \\\"\" + rawPath + \"\\\"\"));\n // 3. rematch with existing query and hash\n return match({\n _normalized: true,\n path: resolvedPath,\n query: query,\n hash: hash\n }, undefined, location)\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"invalid redirect option: \" + (JSON.stringify(redirect))));\n }\n return _createRoute(null, location)\n }\n }\n\n function alias (\n record,\n location,\n matchAs\n ) {\n var aliasedPath = fillParams(matchAs, location.params, (\"aliased route with path \\\"\" + matchAs + \"\\\"\"));\n var aliasedMatch = match({\n _normalized: true,\n path: aliasedPath\n });\n if (aliasedMatch) {\n var matched = aliasedMatch.matched;\n var aliasedRecord = matched[matched.length - 1];\n location.params = aliasedMatch.params;\n return _createRoute(aliasedRecord, location)\n }\n return _createRoute(null, location)\n }\n\n function _createRoute (\n record,\n location,\n redirectedFrom\n ) {\n if (record && record.redirect) {\n return redirect(record, redirectedFrom || location)\n }\n if (record && record.matchAs) {\n return alias(record, location, record.matchAs)\n }\n return createRoute(record, location, redirectedFrom, router)\n }\n\n return {\n match: match,\n addRoute: addRoute,\n getRoutes: getRoutes,\n addRoutes: addRoutes\n }\n}\n\nfunction matchRoute (\n regex,\n path,\n params\n) {\n var m = path.match(regex);\n\n if (!m) {\n return false\n } else if (!params) {\n return true\n }\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = regex.keys[i - 1];\n if (key) {\n // Fix #1994: using * with props: true generates a param named 0\n params[key.name || 'pathMatch'] = typeof m[i] === 'string' ? decode(m[i]) : m[i];\n }\n }\n\n return true\n}\n\nfunction resolveRecordPath (path, record) {\n return resolvePath(path, record.parent ? record.parent.path : '/', true)\n}\n\n/* */\n\n// use User Timing api (if present) for more accurate key precision\nvar Time =\n inBrowser && window.performance && window.performance.now\n ? window.performance\n : Date;\n\nfunction genStateKey () {\n return Time.now().toFixed(3)\n}\n\nvar _key = genStateKey();\n\nfunction getStateKey () {\n return _key\n}\n\nfunction setStateKey (key) {\n return (_key = key)\n}\n\n/* */\n\nvar positionStore = Object.create(null);\n\nfunction setupScroll () {\n // Prevent browser scroll behavior on History popstate\n if ('scrollRestoration' in window.history) {\n window.history.scrollRestoration = 'manual';\n }\n // Fix for #1585 for Firefox\n // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678\n // Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with\n // window.location.protocol + '//' + window.location.host\n // location.host contains the port and location.hostname doesn't\n var protocolAndPath = window.location.protocol + '//' + window.location.host;\n var absolutePath = window.location.href.replace(protocolAndPath, '');\n // preserve existing history state as it could be overriden by the user\n var stateCopy = extend({}, window.history.state);\n stateCopy.key = getStateKey();\n window.history.replaceState(stateCopy, '', absolutePath);\n window.addEventListener('popstate', handlePopState);\n return function () {\n window.removeEventListener('popstate', handlePopState);\n }\n}\n\nfunction handleScroll (\n router,\n to,\n from,\n isPop\n) {\n if (!router.app) {\n return\n }\n\n var behavior = router.options.scrollBehavior;\n if (!behavior) {\n return\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof behavior === 'function', \"scrollBehavior must be a function\");\n }\n\n // wait until re-render finishes before scrolling\n router.app.$nextTick(function () {\n var position = getScrollPosition();\n var shouldScroll = behavior.call(\n router,\n to,\n from,\n isPop ? position : null\n );\n\n if (!shouldScroll) {\n return\n }\n\n if (typeof shouldScroll.then === 'function') {\n shouldScroll\n .then(function (shouldScroll) {\n scrollToPosition((shouldScroll), position);\n })\n .catch(function (err) {\n if (process.env.NODE_ENV !== 'production') {\n assert(false, err.toString());\n }\n });\n } else {\n scrollToPosition(shouldScroll, position);\n }\n });\n}\n\nfunction saveScrollPosition () {\n var key = getStateKey();\n if (key) {\n positionStore[key] = {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n }\n}\n\nfunction handlePopState (e) {\n saveScrollPosition();\n if (e.state && e.state.key) {\n setStateKey(e.state.key);\n }\n}\n\nfunction getScrollPosition () {\n var key = getStateKey();\n if (key) {\n return positionStore[key]\n }\n}\n\nfunction getElementPosition (el, offset) {\n var docEl = document.documentElement;\n var docRect = docEl.getBoundingClientRect();\n var elRect = el.getBoundingClientRect();\n return {\n x: elRect.left - docRect.left - offset.x,\n y: elRect.top - docRect.top - offset.y\n }\n}\n\nfunction isValidPosition (obj) {\n return isNumber(obj.x) || isNumber(obj.y)\n}\n\nfunction normalizePosition (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : window.pageXOffset,\n y: isNumber(obj.y) ? obj.y : window.pageYOffset\n }\n}\n\nfunction normalizeOffset (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : 0,\n y: isNumber(obj.y) ? obj.y : 0\n }\n}\n\nfunction isNumber (v) {\n return typeof v === 'number'\n}\n\nvar hashStartsWithNumberRE = /^#\\d/;\n\nfunction scrollToPosition (shouldScroll, position) {\n var isObject = typeof shouldScroll === 'object';\n if (isObject && typeof shouldScroll.selector === 'string') {\n // getElementById would still fail if the selector contains a more complicated query like #main[data-attr]\n // but at the same time, it doesn't make much sense to select an element with an id and an extra selector\n var el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line\n ? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line\n : document.querySelector(shouldScroll.selector);\n\n if (el) {\n var offset =\n shouldScroll.offset && typeof shouldScroll.offset === 'object'\n ? shouldScroll.offset\n : {};\n offset = normalizeOffset(offset);\n position = getElementPosition(el, offset);\n } else if (isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n } else if (isObject && isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n\n if (position) {\n // $flow-disable-line\n if ('scrollBehavior' in document.documentElement.style) {\n window.scrollTo({\n left: position.x,\n top: position.y,\n // $flow-disable-line\n behavior: shouldScroll.behavior\n });\n } else {\n window.scrollTo(position.x, position.y);\n }\n }\n}\n\n/* */\n\nvar supportsPushState =\n inBrowser &&\n (function () {\n var ua = window.navigator.userAgent;\n\n if (\n (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&\n ua.indexOf('Mobile Safari') !== -1 &&\n ua.indexOf('Chrome') === -1 &&\n ua.indexOf('Windows Phone') === -1\n ) {\n return false\n }\n\n return window.history && typeof window.history.pushState === 'function'\n })();\n\nfunction pushState (url, replace) {\n saveScrollPosition();\n // try...catch the pushState call to get around Safari\n // DOM Exception 18 where it limits to 100 pushState calls\n var history = window.history;\n try {\n if (replace) {\n // preserve existing history state as it could be overriden by the user\n var stateCopy = extend({}, history.state);\n stateCopy.key = getStateKey();\n history.replaceState(stateCopy, '', url);\n } else {\n history.pushState({ key: setStateKey(genStateKey()) }, '', url);\n }\n } catch (e) {\n window.location[replace ? 'replace' : 'assign'](url);\n }\n}\n\nfunction replaceState (url) {\n pushState(url, true);\n}\n\n// When changing thing, also edit router.d.ts\nvar NavigationFailureType = {\n redirected: 2,\n aborted: 4,\n cancelled: 8,\n duplicated: 16\n};\n\nfunction createNavigationRedirectedError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.redirected,\n (\"Redirected when going from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (stringifyRoute(\n to\n )) + \"\\\" via a navigation guard.\")\n )\n}\n\nfunction createNavigationDuplicatedError (from, to) {\n var error = createRouterError(\n from,\n to,\n NavigationFailureType.duplicated,\n (\"Avoided redundant navigation to current location: \\\"\" + (from.fullPath) + \"\\\".\")\n );\n // backwards compatible with the first introduction of Errors\n error.name = 'NavigationDuplicated';\n return error\n}\n\nfunction createNavigationCancelledError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.cancelled,\n (\"Navigation cancelled from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (to.fullPath) + \"\\\" with a new navigation.\")\n )\n}\n\nfunction createNavigationAbortedError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.aborted,\n (\"Navigation aborted from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (to.fullPath) + \"\\\" via a navigation guard.\")\n )\n}\n\nfunction createRouterError (from, to, type, message) {\n var error = new Error(message);\n error._isRouter = true;\n error.from = from;\n error.to = to;\n error.type = type;\n\n return error\n}\n\nvar propertiesToLog = ['params', 'query', 'hash'];\n\nfunction stringifyRoute (to) {\n if (typeof to === 'string') { return to }\n if ('path' in to) { return to.path }\n var location = {};\n propertiesToLog.forEach(function (key) {\n if (key in to) { location[key] = to[key]; }\n });\n return JSON.stringify(location, null, 2)\n}\n\nfunction isError (err) {\n return Object.prototype.toString.call(err).indexOf('Error') > -1\n}\n\nfunction isNavigationFailure (err, errorType) {\n return (\n isError(err) &&\n err._isRouter &&\n (errorType == null || err.type === errorType)\n )\n}\n\n/* */\n\nfunction runQueue (queue, fn, cb) {\n var step = function (index) {\n if (index >= queue.length) {\n cb();\n } else {\n if (queue[index]) {\n fn(queue[index], function () {\n step(index + 1);\n });\n } else {\n step(index + 1);\n }\n }\n };\n step(0);\n}\n\n/* */\n\nfunction resolveAsyncComponents (matched) {\n return function (to, from, next) {\n var hasAsync = false;\n var pending = 0;\n var error = null;\n\n flatMapComponents(matched, function (def, _, match, key) {\n // if it's a function and doesn't have cid attached,\n // assume it's an async component resolve function.\n // we are not using Vue's default async resolving mechanism because\n // we want to halt the navigation until the incoming component has been\n // resolved.\n if (typeof def === 'function' && def.cid === undefined) {\n hasAsync = true;\n pending++;\n\n var resolve = once(function (resolvedDef) {\n if (isESModule(resolvedDef)) {\n resolvedDef = resolvedDef.default;\n }\n // save resolved on async factory in case it's used elsewhere\n def.resolved = typeof resolvedDef === 'function'\n ? resolvedDef\n : _Vue.extend(resolvedDef);\n match.components[key] = resolvedDef;\n pending--;\n if (pending <= 0) {\n next();\n }\n });\n\n var reject = once(function (reason) {\n var msg = \"Failed to resolve async component \" + key + \": \" + reason;\n process.env.NODE_ENV !== 'production' && warn(false, msg);\n if (!error) {\n error = isError(reason)\n ? reason\n : new Error(msg);\n next(error);\n }\n });\n\n var res;\n try {\n res = def(resolve, reject);\n } catch (e) {\n reject(e);\n }\n if (res) {\n if (typeof res.then === 'function') {\n res.then(resolve, reject);\n } else {\n // new syntax in Vue 2.3\n var comp = res.component;\n if (comp && typeof comp.then === 'function') {\n comp.then(resolve, reject);\n }\n }\n }\n }\n });\n\n if (!hasAsync) { next(); }\n }\n}\n\nfunction flatMapComponents (\n matched,\n fn\n) {\n return flatten(matched.map(function (m) {\n return Object.keys(m.components).map(function (key) { return fn(\n m.components[key],\n m.instances[key],\n m, key\n ); })\n }))\n}\n\nfunction flatten (arr) {\n return Array.prototype.concat.apply([], arr)\n}\n\nvar hasSymbol =\n typeof Symbol === 'function' &&\n typeof Symbol.toStringTag === 'symbol';\n\nfunction isESModule (obj) {\n return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module')\n}\n\n// in Webpack 2, require.ensure now also returns a Promise\n// so the resolve/reject functions may get called an extra time\n// if the user uses an arrow function shorthand that happens to\n// return that Promise.\nfunction once (fn) {\n var called = false;\n return function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (called) { return }\n called = true;\n return fn.apply(this, args)\n }\n}\n\n/* */\n\nvar History = function History (router, base) {\n this.router = router;\n this.base = normalizeBase(base);\n // start with a route object that stands for \"nowhere\"\n this.current = START;\n this.pending = null;\n this.ready = false;\n this.readyCbs = [];\n this.readyErrorCbs = [];\n this.errorCbs = [];\n this.listeners = [];\n};\n\nHistory.prototype.listen = function listen (cb) {\n this.cb = cb;\n};\n\nHistory.prototype.onReady = function onReady (cb, errorCb) {\n if (this.ready) {\n cb();\n } else {\n this.readyCbs.push(cb);\n if (errorCb) {\n this.readyErrorCbs.push(errorCb);\n }\n }\n};\n\nHistory.prototype.onError = function onError (errorCb) {\n this.errorCbs.push(errorCb);\n};\n\nHistory.prototype.transitionTo = function transitionTo (\n location,\n onComplete,\n onAbort\n) {\n var this$1$1 = this;\n\n var route;\n // catch redirect option https://github.com/vuejs/vue-router/issues/3201\n try {\n route = this.router.match(location, this.current);\n } catch (e) {\n this.errorCbs.forEach(function (cb) {\n cb(e);\n });\n // Exception should still be thrown\n throw e\n }\n var prev = this.current;\n this.confirmTransition(\n route,\n function () {\n this$1$1.updateRoute(route);\n onComplete && onComplete(route);\n this$1$1.ensureURL();\n this$1$1.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n\n // fire ready cbs once\n if (!this$1$1.ready) {\n this$1$1.ready = true;\n this$1$1.readyCbs.forEach(function (cb) {\n cb(route);\n });\n }\n },\n function (err) {\n if (onAbort) {\n onAbort(err);\n }\n if (err && !this$1$1.ready) {\n // Initial redirection should not mark the history as ready yet\n // because it's triggered by the redirection instead\n // https://github.com/vuejs/vue-router/issues/3225\n // https://github.com/vuejs/vue-router/issues/3331\n if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {\n this$1$1.ready = true;\n this$1$1.readyErrorCbs.forEach(function (cb) {\n cb(err);\n });\n }\n }\n }\n );\n};\n\nHistory.prototype.confirmTransition = function confirmTransition (route, onComplete, onAbort) {\n var this$1$1 = this;\n\n var current = this.current;\n this.pending = route;\n var abort = function (err) {\n // changed after adding errors with\n // https://github.com/vuejs/vue-router/pull/3047 before that change,\n // redirect and aborted navigation would produce an err == null\n if (!isNavigationFailure(err) && isError(err)) {\n if (this$1$1.errorCbs.length) {\n this$1$1.errorCbs.forEach(function (cb) {\n cb(err);\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, 'uncaught error during route navigation:');\n }\n console.error(err);\n }\n }\n onAbort && onAbort(err);\n };\n var lastRouteIndex = route.matched.length - 1;\n var lastCurrentIndex = current.matched.length - 1;\n if (\n isSameRoute(route, current) &&\n // in the case the route map has been dynamically appended to\n lastRouteIndex === lastCurrentIndex &&\n route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]\n ) {\n this.ensureURL();\n if (route.hash) {\n handleScroll(this.router, current, route, false);\n }\n return abort(createNavigationDuplicatedError(current, route))\n }\n\n var ref = resolveQueue(\n this.current.matched,\n route.matched\n );\n var updated = ref.updated;\n var deactivated = ref.deactivated;\n var activated = ref.activated;\n\n var queue = [].concat(\n // in-component leave guards\n extractLeaveGuards(deactivated),\n // global before hooks\n this.router.beforeHooks,\n // in-component update hooks\n extractUpdateHooks(updated),\n // in-config enter guards\n activated.map(function (m) { return m.beforeEnter; }),\n // async components\n resolveAsyncComponents(activated)\n );\n\n var iterator = function (hook, next) {\n if (this$1$1.pending !== route) {\n return abort(createNavigationCancelledError(current, route))\n }\n try {\n hook(route, current, function (to) {\n if (to === false) {\n // next(false) -> abort navigation, ensure current URL\n this$1$1.ensureURL(true);\n abort(createNavigationAbortedError(current, route));\n } else if (isError(to)) {\n this$1$1.ensureURL(true);\n abort(to);\n } else if (\n typeof to === 'string' ||\n (typeof to === 'object' &&\n (typeof to.path === 'string' || typeof to.name === 'string'))\n ) {\n // next('/') or next({ path: '/' }) -> redirect\n abort(createNavigationRedirectedError(current, route));\n if (typeof to === 'object' && to.replace) {\n this$1$1.replace(to);\n } else {\n this$1$1.push(to);\n }\n } else {\n // confirm transition and pass on the value\n next(to);\n }\n });\n } catch (e) {\n abort(e);\n }\n };\n\n runQueue(queue, iterator, function () {\n // wait until async components are resolved before\n // extracting in-component enter guards\n var enterGuards = extractEnterGuards(activated);\n var queue = enterGuards.concat(this$1$1.router.resolveHooks);\n runQueue(queue, iterator, function () {\n if (this$1$1.pending !== route) {\n return abort(createNavigationCancelledError(current, route))\n }\n this$1$1.pending = null;\n onComplete(route);\n if (this$1$1.router.app) {\n this$1$1.router.app.$nextTick(function () {\n handleRouteEntered(route);\n });\n }\n });\n });\n};\n\nHistory.prototype.updateRoute = function updateRoute (route) {\n this.current = route;\n this.cb && this.cb(route);\n};\n\nHistory.prototype.setupListeners = function setupListeners () {\n // Default implementation is empty\n};\n\nHistory.prototype.teardown = function teardown () {\n // clean up event listeners\n // https://github.com/vuejs/vue-router/issues/2341\n this.listeners.forEach(function (cleanupListener) {\n cleanupListener();\n });\n this.listeners = [];\n\n // reset current history route\n // https://github.com/vuejs/vue-router/issues/3294\n this.current = START;\n this.pending = null;\n};\n\nfunction normalizeBase (base) {\n if (!base) {\n if (inBrowser) {\n // respect <base> tag\n var baseEl = document.querySelector('base');\n base = (baseEl && baseEl.getAttribute('href')) || '/';\n // strip full URL origin\n base = base.replace(/^https?:\\/\\/[^\\/]+/, '');\n } else {\n base = '/';\n }\n }\n // make sure there's the starting slash\n if (base.charAt(0) !== '/') {\n base = '/' + base;\n }\n // remove trailing slash\n return base.replace(/\\/$/, '')\n}\n\nfunction resolveQueue (\n current,\n next\n) {\n var i;\n var max = Math.max(current.length, next.length);\n for (i = 0; i < max; i++) {\n if (current[i] !== next[i]) {\n break\n }\n }\n return {\n updated: next.slice(0, i),\n activated: next.slice(i),\n deactivated: current.slice(i)\n }\n}\n\nfunction extractGuards (\n records,\n name,\n bind,\n reverse\n) {\n var guards = flatMapComponents(records, function (def, instance, match, key) {\n var guard = extractGuard(def, name);\n if (guard) {\n return Array.isArray(guard)\n ? guard.map(function (guard) { return bind(guard, instance, match, key); })\n : bind(guard, instance, match, key)\n }\n });\n return flatten(reverse ? guards.reverse() : guards)\n}\n\nfunction extractGuard (\n def,\n key\n) {\n if (typeof def !== 'function') {\n // extend now so that global mixins are applied.\n def = _Vue.extend(def);\n }\n return def.options[key]\n}\n\nfunction extractLeaveGuards (deactivated) {\n return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true)\n}\n\nfunction extractUpdateHooks (updated) {\n return extractGuards(updated, 'beforeRouteUpdate', bindGuard)\n}\n\nfunction bindGuard (guard, instance) {\n if (instance) {\n return function boundRouteGuard () {\n return guard.apply(instance, arguments)\n }\n }\n}\n\nfunction extractEnterGuards (\n activated\n) {\n return extractGuards(\n activated,\n 'beforeRouteEnter',\n function (guard, _, match, key) {\n return bindEnterGuard(guard, match, key)\n }\n )\n}\n\nfunction bindEnterGuard (\n guard,\n match,\n key\n) {\n return function routeEnterGuard (to, from, next) {\n return guard(to, from, function (cb) {\n if (typeof cb === 'function') {\n if (!match.enteredCbs[key]) {\n match.enteredCbs[key] = [];\n }\n match.enteredCbs[key].push(cb);\n }\n next(cb);\n })\n }\n}\n\n/* */\n\nvar HTML5History = /*@__PURE__*/(function (History) {\n function HTML5History (router, base) {\n History.call(this, router, base);\n\n this._startLocation = getLocation(this.base);\n }\n\n if ( History ) HTML5History.__proto__ = History;\n HTML5History.prototype = Object.create( History && History.prototype );\n HTML5History.prototype.constructor = HTML5History;\n\n HTML5History.prototype.setupListeners = function setupListeners () {\n var this$1$1 = this;\n\n if (this.listeners.length > 0) {\n return\n }\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n this.listeners.push(setupScroll());\n }\n\n var handleRoutingEvent = function () {\n var current = this$1$1.current;\n\n // Avoiding first `popstate` event dispatched in some browsers but first\n // history route not updated since async guard at the same time.\n var location = getLocation(this$1$1.base);\n if (this$1$1.current === START && location === this$1$1._startLocation) {\n return\n }\n\n this$1$1.transitionTo(location, function (route) {\n if (supportsScroll) {\n handleScroll(router, route, current, true);\n }\n });\n };\n window.addEventListener('popstate', handleRoutingEvent);\n this.listeners.push(function () {\n window.removeEventListener('popstate', handleRoutingEvent);\n });\n };\n\n HTML5History.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HTML5History.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushState(cleanPath(this$1$1.base + route.fullPath));\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceState(cleanPath(this$1$1.base + route.fullPath));\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.ensureURL = function ensureURL (push) {\n if (getLocation(this.base) !== this.current.fullPath) {\n var current = cleanPath(this.base + this.current.fullPath);\n push ? pushState(current) : replaceState(current);\n }\n };\n\n HTML5History.prototype.getCurrentLocation = function getCurrentLocation () {\n return getLocation(this.base)\n };\n\n return HTML5History;\n}(History));\n\nfunction getLocation (base) {\n var path = window.location.pathname;\n var pathLowerCase = path.toLowerCase();\n var baseLowerCase = base.toLowerCase();\n // base=\"/a\" shouldn't turn path=\"/app\" into \"/a/pp\"\n // https://github.com/vuejs/vue-router/issues/3555\n // so we ensure the trailing slash in the base\n if (base && ((pathLowerCase === baseLowerCase) ||\n (pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {\n path = path.slice(base.length);\n }\n return (path || '/') + window.location.search + window.location.hash\n}\n\n/* */\n\nvar HashHistory = /*@__PURE__*/(function (History) {\n function HashHistory (router, base, fallback) {\n History.call(this, router, base);\n // check history fallback deeplinking\n if (fallback && checkFallback(this.base)) {\n return\n }\n ensureSlash();\n }\n\n if ( History ) HashHistory.__proto__ = History;\n HashHistory.prototype = Object.create( History && History.prototype );\n HashHistory.prototype.constructor = HashHistory;\n\n // this is delayed until the app mounts\n // to avoid the hashchange listener being fired too early\n HashHistory.prototype.setupListeners = function setupListeners () {\n var this$1$1 = this;\n\n if (this.listeners.length > 0) {\n return\n }\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n this.listeners.push(setupScroll());\n }\n\n var handleRoutingEvent = function () {\n var current = this$1$1.current;\n if (!ensureSlash()) {\n return\n }\n this$1$1.transitionTo(getHash(), function (route) {\n if (supportsScroll) {\n handleScroll(this$1$1.router, route, current, true);\n }\n if (!supportsPushState) {\n replaceHash(route.fullPath);\n }\n });\n };\n var eventType = supportsPushState ? 'popstate' : 'hashchange';\n window.addEventListener(\n eventType,\n handleRoutingEvent\n );\n this.listeners.push(function () {\n window.removeEventListener(eventType, handleRoutingEvent);\n });\n };\n\n HashHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(\n location,\n function (route) {\n pushHash(route.fullPath);\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n HashHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(\n location,\n function (route) {\n replaceHash(route.fullPath);\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n HashHistory.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HashHistory.prototype.ensureURL = function ensureURL (push) {\n var current = this.current.fullPath;\n if (getHash() !== current) {\n push ? pushHash(current) : replaceHash(current);\n }\n };\n\n HashHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n return getHash()\n };\n\n return HashHistory;\n}(History));\n\nfunction checkFallback (base) {\n var location = getLocation(base);\n if (!/^\\/#/.test(location)) {\n window.location.replace(cleanPath(base + '/#' + location));\n return true\n }\n}\n\nfunction ensureSlash () {\n var path = getHash();\n if (path.charAt(0) === '/') {\n return true\n }\n replaceHash('/' + path);\n return false\n}\n\nfunction getHash () {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var index = href.indexOf('#');\n // empty path\n if (index < 0) { return '' }\n\n href = href.slice(index + 1);\n\n return href\n}\n\nfunction getUrl (path) {\n var href = window.location.href;\n var i = href.indexOf('#');\n var base = i >= 0 ? href.slice(0, i) : href;\n return (base + \"#\" + path)\n}\n\nfunction pushHash (path) {\n if (supportsPushState) {\n pushState(getUrl(path));\n } else {\n window.location.hash = path;\n }\n}\n\nfunction replaceHash (path) {\n if (supportsPushState) {\n replaceState(getUrl(path));\n } else {\n window.location.replace(getUrl(path));\n }\n}\n\n/* */\n\nvar AbstractHistory = /*@__PURE__*/(function (History) {\n function AbstractHistory (router, base) {\n History.call(this, router, base);\n this.stack = [];\n this.index = -1;\n }\n\n if ( History ) AbstractHistory.__proto__ = History;\n AbstractHistory.prototype = Object.create( History && History.prototype );\n AbstractHistory.prototype.constructor = AbstractHistory;\n\n AbstractHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n this.transitionTo(\n location,\n function (route) {\n this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index + 1).concat(route);\n this$1$1.index++;\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n AbstractHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n this.transitionTo(\n location,\n function (route) {\n this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index).concat(route);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n AbstractHistory.prototype.go = function go (n) {\n var this$1$1 = this;\n\n var targetIndex = this.index + n;\n if (targetIndex < 0 || targetIndex >= this.stack.length) {\n return\n }\n var route = this.stack[targetIndex];\n this.confirmTransition(\n route,\n function () {\n var prev = this$1$1.current;\n this$1$1.index = targetIndex;\n this$1$1.updateRoute(route);\n this$1$1.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n },\n function (err) {\n if (isNavigationFailure(err, NavigationFailureType.duplicated)) {\n this$1$1.index = targetIndex;\n }\n }\n );\n };\n\n AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n var current = this.stack[this.stack.length - 1];\n return current ? current.fullPath : '/'\n };\n\n AbstractHistory.prototype.ensureURL = function ensureURL () {\n // noop\n };\n\n return AbstractHistory;\n}(History));\n\n/* */\n\n\n\nvar VueRouter = function VueRouter (options) {\n if ( options === void 0 ) options = {};\n\n if (process.env.NODE_ENV !== 'production') {\n warn(this instanceof VueRouter, \"Router must be called with the new operator.\");\n }\n this.app = null;\n this.apps = [];\n this.options = options;\n this.beforeHooks = [];\n this.resolveHooks = [];\n this.afterHooks = [];\n this.matcher = createMatcher(options.routes || [], this);\n\n var mode = options.mode || 'hash';\n this.fallback =\n mode === 'history' && !supportsPushState && options.fallback !== false;\n if (this.fallback) {\n mode = 'hash';\n }\n if (!inBrowser) {\n mode = 'abstract';\n }\n this.mode = mode;\n\n switch (mode) {\n case 'history':\n this.history = new HTML5History(this, options.base);\n break\n case 'hash':\n this.history = new HashHistory(this, options.base, this.fallback);\n break\n case 'abstract':\n this.history = new AbstractHistory(this, options.base);\n break\n default:\n if (process.env.NODE_ENV !== 'production') {\n assert(false, (\"invalid mode: \" + mode));\n }\n }\n};\n\nvar prototypeAccessors = { currentRoute: { configurable: true } };\n\nVueRouter.prototype.match = function match (raw, current, redirectedFrom) {\n return this.matcher.match(raw, current, redirectedFrom)\n};\n\nprototypeAccessors.currentRoute.get = function () {\n return this.history && this.history.current\n};\n\nVueRouter.prototype.init = function init (app /* Vue component instance */) {\n var this$1$1 = this;\n\n process.env.NODE_ENV !== 'production' &&\n assert(\n install.installed,\n \"not installed. Make sure to call `Vue.use(VueRouter)` \" +\n \"before creating root instance.\"\n );\n\n this.apps.push(app);\n\n // set up app destroyed handler\n // https://github.com/vuejs/vue-router/issues/2639\n app.$once('hook:destroyed', function () {\n // clean out app from this.apps array once destroyed\n var index = this$1$1.apps.indexOf(app);\n if (index > -1) { this$1$1.apps.splice(index, 1); }\n // ensure we still have a main app or null if no apps\n // we do not release the router so it can be reused\n if (this$1$1.app === app) { this$1$1.app = this$1$1.apps[0] || null; }\n\n if (!this$1$1.app) { this$1$1.history.teardown(); }\n });\n\n // main app previously initialized\n // return as we don't need to set up new history listener\n if (this.app) {\n return\n }\n\n this.app = app;\n\n var history = this.history;\n\n if (history instanceof HTML5History || history instanceof HashHistory) {\n var handleInitialScroll = function (routeOrError) {\n var from = history.current;\n var expectScroll = this$1$1.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll && 'fullPath' in routeOrError) {\n handleScroll(this$1$1, routeOrError, from, false);\n }\n };\n var setupListeners = function (routeOrError) {\n history.setupListeners();\n handleInitialScroll(routeOrError);\n };\n history.transitionTo(\n history.getCurrentLocation(),\n setupListeners,\n setupListeners\n );\n }\n\n history.listen(function (route) {\n this$1$1.apps.forEach(function (app) {\n app._route = route;\n });\n });\n};\n\nVueRouter.prototype.beforeEach = function beforeEach (fn) {\n return registerHook(this.beforeHooks, fn)\n};\n\nVueRouter.prototype.beforeResolve = function beforeResolve (fn) {\n return registerHook(this.resolveHooks, fn)\n};\n\nVueRouter.prototype.afterEach = function afterEach (fn) {\n return registerHook(this.afterHooks, fn)\n};\n\nVueRouter.prototype.onReady = function onReady (cb, errorCb) {\n this.history.onReady(cb, errorCb);\n};\n\nVueRouter.prototype.onError = function onError (errorCb) {\n this.history.onError(errorCb);\n};\n\nVueRouter.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n // $flow-disable-line\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1$1.history.push(location, resolve, reject);\n })\n } else {\n this.history.push(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n // $flow-disable-line\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1$1.history.replace(location, resolve, reject);\n })\n } else {\n this.history.replace(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.go = function go (n) {\n this.history.go(n);\n};\n\nVueRouter.prototype.back = function back () {\n this.go(-1);\n};\n\nVueRouter.prototype.forward = function forward () {\n this.go(1);\n};\n\nVueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) {\n var route = to\n ? to.matched\n ? to\n : this.resolve(to).route\n : this.currentRoute;\n if (!route) {\n return []\n }\n return [].concat.apply(\n [],\n route.matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return m.components[key]\n })\n })\n )\n};\n\nVueRouter.prototype.resolve = function resolve (\n to,\n current,\n append\n) {\n current = current || this.history.current;\n var location = normalizeLocation(to, current, append, this);\n var route = this.match(location, current);\n var fullPath = route.redirectedFrom || route.fullPath;\n var base = this.history.base;\n var href = createHref(base, fullPath, this.mode);\n return {\n location: location,\n route: route,\n href: href,\n // for backwards compat\n normalizedTo: location,\n resolved: route\n }\n};\n\nVueRouter.prototype.getRoutes = function getRoutes () {\n return this.matcher.getRoutes()\n};\n\nVueRouter.prototype.addRoute = function addRoute (parentOrRoute, route) {\n this.matcher.addRoute(parentOrRoute, route);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nVueRouter.prototype.addRoutes = function addRoutes (routes) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, 'router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.');\n }\n this.matcher.addRoutes(routes);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nObject.defineProperties( VueRouter.prototype, prototypeAccessors );\n\nvar VueRouter$1 = VueRouter;\n\nfunction registerHook (list, fn) {\n list.push(fn);\n return function () {\n var i = list.indexOf(fn);\n if (i > -1) { list.splice(i, 1); }\n }\n}\n\nfunction createHref (base, fullPath, mode) {\n var path = mode === 'hash' ? '#' + fullPath : fullPath;\n return base ? cleanPath(base + '/' + path) : path\n}\n\n// We cannot remove this as it would be a breaking change\nVueRouter.install = install;\nVueRouter.version = '3.6.5';\nVueRouter.isNavigationFailure = isNavigationFailure;\nVueRouter.NavigationFailureType = NavigationFailureType;\nVueRouter.START_LOCATION = START;\n\nif (inBrowser && window.Vue) {\n window.Vue.use(VueRouter);\n}\n\nvar version = '3.6.5';\n\nexport { NavigationFailureType, Link as RouterLink, View as RouterView, START as START_LOCATION, VueRouter$1 as default, isNavigationFailure, version };\n","exports.sync = function (store, router, options) {\n var moduleName = (options || {}).moduleName || 'route'\n\n store.registerModule(moduleName, {\n namespaced: true,\n state: cloneRoute(router.currentRoute),\n mutations: {\n 'ROUTE_CHANGED': function ROUTE_CHANGED (state, transition) {\n store.state[moduleName] = cloneRoute(transition.to, transition.from)\n }\n }\n })\n\n var isTimeTraveling = false\n var currentPath\n\n // sync router on store change\n var storeUnwatch = store.watch(\n function (state) { return state[moduleName]; },\n function (route) {\n var fullPath = route.fullPath;\n if (fullPath === currentPath) {\n return\n }\n if (currentPath != null) {\n isTimeTraveling = true\n router.push(route)\n }\n currentPath = fullPath\n },\n { sync: true }\n )\n\n // sync store on router navigation\n var afterEachUnHook = router.afterEach(function (to, from) {\n if (isTimeTraveling) {\n isTimeTraveling = false\n return\n }\n currentPath = to.fullPath\n store.commit(moduleName + '/ROUTE_CHANGED', { to: to, from: from })\n })\n\n return function unsync () {\n // On unsync, remove router hook\n if (afterEachUnHook != null) {\n afterEachUnHook()\n }\n\n // On unsync, remove store watch\n if (storeUnwatch != null) {\n storeUnwatch()\n }\n\n // On unsync, unregister Module with store\n store.unregisterModule(moduleName)\n }\n}\n\nfunction cloneRoute (to, from) {\n var clone = {\n name: to.name,\n path: to.path,\n hash: to.hash,\n query: to.query,\n params: to.params,\n fullPath: to.fullPath,\n meta: to.meta\n }\n if (from) {\n clone.from = cloneRoute(from)\n }\n return Object.freeze(clone)\n}\n\n","import { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { getLoggerBuilder } from \"@nextcloud/logger\";\nimport { join, basename, extname, dirname } from \"path\";\nimport { encodePath } from \"@nextcloud/paths\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { CancelablePromise } from \"cancelable-promise\";\nimport { getCanonicalLocale, getLanguage } from \"@nextcloud/l10n\";\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst getLogger = (user) => {\n if (user === null) {\n return getLoggerBuilder().setApp(\"files\").build();\n }\n return getLoggerBuilder().setApp(\"files\").setUid(user.uid).build();\n};\nconst logger = getLogger(getCurrentUser());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar NewMenuEntryCategory = /* @__PURE__ */ ((NewMenuEntryCategory2) => {\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"UploadFromDevice\"] = 0] = \"UploadFromDevice\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"CreateNew\"] = 1] = \"CreateNew\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"Other\"] = 2] = \"Other\";\n return NewMenuEntryCategory2;\n})(NewMenuEntryCategory || {});\nclass NewFileMenu {\n _entries = [];\n registerEntry(entry) {\n this.validateEntry(entry);\n entry.category = entry.category ?? 1;\n this._entries.push(entry);\n }\n unregisterEntry(entry) {\n const entryIndex = typeof entry === \"string\" ? this.getEntryIndex(entry) : this.getEntryIndex(entry.id);\n if (entryIndex === -1) {\n logger.warn(\"Entry not found, nothing removed\", { entry, entries: this.getEntries() });\n return;\n }\n this._entries.splice(entryIndex, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(context) {\n if (context) {\n return this._entries.filter((entry) => typeof entry.enabled === \"function\" ? entry.enabled(context) : true);\n }\n return this._entries;\n }\n getEntryIndex(id) {\n return this._entries.findIndex((entry) => entry.id === id);\n }\n validateEntry(entry) {\n if (!entry.id || !entry.displayName || !(entry.iconSvgInline || entry.iconClass) || !entry.handler) {\n throw new Error(\"Invalid entry\");\n }\n if (typeof entry.id !== \"string\" || typeof entry.displayName !== \"string\") {\n throw new Error(\"Invalid id or displayName property\");\n }\n if (entry.iconClass && typeof entry.iconClass !== \"string\" || entry.iconSvgInline && typeof entry.iconSvgInline !== \"string\") {\n throw new Error(\"Invalid icon provided\");\n }\n if (entry.enabled !== void 0 && typeof entry.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (typeof entry.handler !== \"function\") {\n throw new Error(\"Invalid handler property\");\n }\n if (\"order\" in entry && typeof entry.order !== \"number\") {\n throw new Error(\"Invalid order property\");\n }\n if (this.getEntryIndex(entry.id) !== -1) {\n throw new Error(\"Duplicate entry\");\n }\n }\n}\nconst getNewFileMenu = function() {\n if (typeof window._nc_newfilemenu === \"undefined\") {\n window._nc_newfilemenu = new NewFileMenu();\n logger.debug(\"NewFileMenu initialized\");\n }\n return window._nc_newfilemenu;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar DefaultType = /* @__PURE__ */ ((DefaultType2) => {\n DefaultType2[\"DEFAULT\"] = \"default\";\n DefaultType2[\"HIDDEN\"] = \"hidden\";\n return DefaultType2;\n})(DefaultType || {});\nclass FileAction {\n _action;\n constructor(action) {\n this.validateAction(action);\n this._action = action;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(action) {\n if (!action.id || typeof action.id !== \"string\") {\n throw new Error(\"Invalid id\");\n }\n if (!action.displayName || typeof action.displayName !== \"function\") {\n throw new Error(\"Invalid displayName function\");\n }\n if (\"title\" in action && typeof action.title !== \"function\") {\n throw new Error(\"Invalid title function\");\n }\n if (!action.iconSvgInline || typeof action.iconSvgInline !== \"function\") {\n throw new Error(\"Invalid iconSvgInline function\");\n }\n if (!action.exec || typeof action.exec !== \"function\") {\n throw new Error(\"Invalid exec function\");\n }\n if (\"enabled\" in action && typeof action.enabled !== \"function\") {\n throw new Error(\"Invalid enabled function\");\n }\n if (\"execBatch\" in action && typeof action.execBatch !== \"function\") {\n throw new Error(\"Invalid execBatch function\");\n }\n if (\"order\" in action && typeof action.order !== \"number\") {\n throw new Error(\"Invalid order\");\n }\n if (\"parent\" in action && typeof action.parent !== \"string\") {\n throw new Error(\"Invalid parent\");\n }\n if (action.default && !Object.values(DefaultType).includes(action.default)) {\n throw new Error(\"Invalid default\");\n }\n if (\"inline\" in action && typeof action.inline !== \"function\") {\n throw new Error(\"Invalid inline function\");\n }\n if (\"renderInline\" in action && typeof action.renderInline !== \"function\") {\n throw new Error(\"Invalid renderInline function\");\n }\n }\n}\nconst registerFileAction = function(action) {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n if (window._nc_fileactions.find((search) => search.id === action.id)) {\n logger.error(`FileAction ${action.id} already registered`, { action });\n return;\n }\n window._nc_fileactions.push(action);\n};\nconst getFileActions = function() {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n return window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Header {\n _header;\n constructor(header) {\n this.validateHeader(header);\n this._header = header;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(header) {\n if (!header.id || !header.render || !header.updated) {\n throw new Error(\"Invalid header: id, render and updated are required\");\n }\n if (typeof header.id !== \"string\") {\n throw new Error(\"Invalid id property\");\n }\n if (header.enabled !== void 0 && typeof header.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (header.render && typeof header.render !== \"function\") {\n throw new Error(\"Invalid render property\");\n }\n if (header.updated && typeof header.updated !== \"function\") {\n throw new Error(\"Invalid updated property\");\n }\n }\n}\nconst registerFileListHeaders = function(header) {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n if (window._nc_filelistheader.find((search) => search.id === header.id)) {\n logger.error(`Header ${header.id} already registered`, { header });\n return;\n }\n window._nc_filelistheader.push(header);\n};\nconst getFileListHeaders = function() {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n return window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Permission = /* @__PURE__ */ ((Permission2) => {\n Permission2[Permission2[\"NONE\"] = 0] = \"NONE\";\n Permission2[Permission2[\"CREATE\"] = 4] = \"CREATE\";\n Permission2[Permission2[\"READ\"] = 1] = \"READ\";\n Permission2[Permission2[\"UPDATE\"] = 2] = \"UPDATE\";\n Permission2[Permission2[\"DELETE\"] = 8] = \"DELETE\";\n Permission2[Permission2[\"SHARE\"] = 16] = \"SHARE\";\n Permission2[Permission2[\"ALL\"] = 31] = \"ALL\";\n return Permission2;\n})(Permission || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst defaultDavProperties = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:size\"\n];\nconst defaultDavNamespaces = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n};\nconst registerDavProperty = function(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n const namespaces = { ...window._nc_dav_namespaces, ...namespace };\n if (window._nc_dav_properties.find((search) => search === prop)) {\n logger.warn(`${prop} already registered`, { prop });\n return false;\n }\n if (prop.startsWith(\"<\") || prop.split(\":\").length !== 2) {\n logger.error(`${prop} is not valid. See example: 'oc:fileid'`, { prop });\n return false;\n }\n const ns = prop.split(\":\")[0];\n if (!namespaces[ns]) {\n logger.error(`${prop} namespace unknown`, { prop, namespaces });\n return false;\n }\n window._nc_dav_properties.push(prop);\n window._nc_dav_namespaces = namespaces;\n return true;\n};\nconst getDavProperties = function() {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n }\n return window._nc_dav_properties.map((prop) => `<${prop} />`).join(\" \");\n};\nconst getDavNameSpaces = function() {\n if (typeof window._nc_dav_namespaces === \"undefined\") {\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n return Object.keys(window._nc_dav_namespaces).map((ns) => `xmlns:${ns}=\"${window._nc_dav_namespaces?.[ns]}\"`).join(\" \");\n};\nconst davGetDefaultPropfind = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<d:propfind ${getDavNameSpaces()}>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;\n};\nconst davGetFavoritesReport = function() {\n return `<?xml version=\"1.0\"?>\n\t\t<oc:filter-files ${getDavNameSpaces()}>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`;\n};\nconst davGetRecentSearch = function(lastModified) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<d:searchrequest ${getDavNameSpaces()}\n\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${getDavProperties()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${getCurrentUser()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${lastModified}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst davParsePermissions = function(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"C\") || permString.includes(\"K\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\") || permString.includes(\"N\") || permString.includes(\"V\")) {\n permissions |= Permission.UPDATE;\n }\n if (permString.includes(\"D\")) {\n permissions |= Permission.DELETE;\n }\n if (permString.includes(\"R\")) {\n permissions |= Permission.SHARE;\n }\n return permissions;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar FileType = /* @__PURE__ */ ((FileType2) => {\n FileType2[\"Folder\"] = \"folder\";\n FileType2[\"File\"] = \"file\";\n return FileType2;\n})(FileType || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst isDavRessource = function(source, davService) {\n return source.match(davService) !== null;\n};\nconst validateData = (data, davService) => {\n if (data.id && typeof data.id !== \"number\") {\n throw new Error(\"Invalid id type of value\");\n }\n if (!data.source) {\n throw new Error(\"Missing mandatory source\");\n }\n try {\n new URL(data.source);\n } catch (e) {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!data.source.startsWith(\"http\")) {\n throw new Error(\"Invalid source format, only http(s) is supported\");\n }\n if (data.mtime && !(data.mtime instanceof Date)) {\n throw new Error(\"Invalid mtime type\");\n }\n if (data.crtime && !(data.crtime instanceof Date)) {\n throw new Error(\"Invalid crtime type\");\n }\n if (!data.mime || typeof data.mime !== \"string\" || !data.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi)) {\n throw new Error(\"Missing or invalid mandatory mime\");\n }\n if (\"size\" in data && typeof data.size !== \"number\" && data.size !== void 0) {\n throw new Error(\"Invalid size type\");\n }\n if (\"permissions\" in data && data.permissions !== void 0 && !(typeof data.permissions === \"number\" && data.permissions >= Permission.NONE && data.permissions <= Permission.ALL)) {\n throw new Error(\"Invalid permissions\");\n }\n if (data.owner && data.owner !== null && typeof data.owner !== \"string\") {\n throw new Error(\"Invalid owner type\");\n }\n if (data.attributes && typeof data.attributes !== \"object\") {\n throw new Error(\"Invalid attributes type\");\n }\n if (data.root && typeof data.root !== \"string\") {\n throw new Error(\"Invalid root type\");\n }\n if (data.root && !data.root.startsWith(\"/\")) {\n throw new Error(\"Root must start with a leading slash\");\n }\n if (data.root && !data.source.includes(data.root)) {\n throw new Error(\"Root must be part of the source\");\n }\n if (data.root && isDavRessource(data.source, davService)) {\n const service = data.source.match(davService)[0];\n if (!data.source.includes(join(service, data.root))) {\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n }\n if (data.status && !Object.values(NodeStatus).includes(data.status)) {\n throw new Error(\"Status must be a valid NodeStatus\");\n }\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {\n NodeStatus2[\"NEW\"] = \"new\";\n NodeStatus2[\"FAILED\"] = \"failed\";\n NodeStatus2[\"LOADING\"] = \"loading\";\n NodeStatus2[\"LOCKED\"] = \"locked\";\n return NodeStatus2;\n})(NodeStatus || {});\nclass Node {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n readonlyAttributes = Object.entries(Object.getOwnPropertyDescriptors(Node.prototype)).filter((e) => typeof e[1].get === \"function\" && e[0] !== \"__proto__\").map((e) => e[0]);\n handler = {\n set: (target, prop, value) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.set(target, prop, value);\n },\n deleteProperty: (target, prop) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.deleteProperty(target, prop);\n },\n // TODO: This is deprecated and only needed for files v3\n get: (target, prop, receiver) => {\n if (this.readonlyAttributes.includes(prop)) {\n logger.warn(`Accessing \"Node.attributes.${prop}\" is deprecated, access it directly on the Node instance.`);\n return Reflect.get(this, prop);\n }\n return Reflect.get(target, prop, receiver);\n }\n };\n constructor(data, davService) {\n validateData(data, davService || this._knownDavService);\n this._data = { ...data, attributes: {} };\n this._attributes = new Proxy(this._data.attributes, this.handler);\n this.update(data.attributes ?? {});\n if (davService) {\n this._knownDavService = davService;\n }\n }\n /**\n * Get the source url to this object\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin } = new URL(this.source);\n return origin + encodePath(this.source.slice(origin.length));\n }\n /**\n * Get this object name\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get basename() {\n return basename(this.source);\n }\n /**\n * Get this object's extension\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get extension() {\n return extname(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n *\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get dirname() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return dirname(source.slice(firstMatch + root.length) || \"/\");\n }\n const url = new URL(this.source);\n return dirname(url.pathname);\n }\n /**\n * Get the file mime\n * There is no setter as the mime is not meant to be changed\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Set the file modification time\n */\n set mtime(mtime) {\n this._data.mtime = mtime;\n }\n /**\n * Get the file creation time\n * There is no setter as the creation time is not meant to be changed\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Set the file size\n */\n set size(size) {\n this.updateMtime();\n this._data.size = size;\n }\n /**\n * Get the file attribute\n * This contains all additional attributes not provided by the Node class\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n if (this.owner === null && !this.isDavRessource) {\n return Permission.READ;\n }\n return this._data.permissions !== void 0 ? this._data.permissions : Permission.NONE;\n }\n /**\n * Set the file permissions\n */\n set permissions(permissions) {\n this.updateMtime();\n this._data.permissions = permissions;\n }\n /**\n * Get the file owner\n * There is no setter as the owner is not meant to be changed\n */\n get owner() {\n if (!this.isDavRessource) {\n return null;\n }\n return this._data.owner;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return isDavRessource(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n * There is no setter as the root is not meant to be changed\n */\n get root() {\n if (this._data.root) {\n return this._data.root.replace(/^(.+)\\/$/, \"$1\");\n }\n if (this.isDavRessource) {\n const root = dirname(this.source);\n return root.split(this._knownDavService).pop() || null;\n }\n return null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return source.slice(firstMatch + root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * There is no setter as the fileid is not meant to be changed\n */\n get fileid() {\n return this._data?.id;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(status) {\n this._data.status = status;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(destination) {\n validateData({ ...this._data, source: destination }, this._knownDavService);\n this._data.source = destination;\n this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(basename2) {\n if (basename2.includes(\"/\")) {\n throw new Error(\"Invalid basename\");\n }\n this.move(dirname(this.source) + \"/\" + basename2);\n }\n /**\n * Update the mtime if exists\n */\n updateMtime() {\n if (this._data.mtime) {\n this._data.mtime = /* @__PURE__ */ new Date();\n }\n }\n /**\n * Update the attributes of the node\n * Warning, updating attributes will NOT automatically update the mtime.\n *\n * @param attributes The new attributes to update on the Node attributes\n */\n update(attributes) {\n for (const [name, value] of Object.entries(attributes)) {\n try {\n if (value === void 0) {\n delete this.attributes[name];\n } else {\n this.attributes[name] = value;\n }\n } catch (e) {\n if (e instanceof TypeError) {\n continue;\n }\n throw e;\n }\n }\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass File extends Node {\n get type() {\n return FileType.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Folder extends Node {\n constructor(data) {\n super({\n ...data,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return FileType.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Ferdinand Thiessen <opensource@fthiessen.de>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst davRootPath = `/files/${getCurrentUser()?.uid}`;\nconst davRemoteURL = generateRemoteUrl(\"dav\");\nconst davGetClient = function(remoteURL = davRemoteURL, headers = {}) {\n const client = createClient(remoteURL, { headers });\n function setHeaders(token) {\n client.setHeaders({\n ...headers,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: token ?? \"\"\n });\n }\n onRequestTokenUpdate(setHeaders);\n setHeaders(getRequestToken());\n const patcher = getPatcher();\n patcher.patch(\"fetch\", (url, options) => {\n const headers2 = options.headers;\n if (headers2?.method) {\n options.method = headers2.method;\n delete headers2.method;\n }\n return fetch(url, options);\n });\n return client;\n};\nconst getFavoriteNodes = (davClient, path = \"/\", davRoot = davRootPath) => {\n const controller = new AbortController();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await davClient.getDirectoryContents(`${davRoot}${path}`, {\n signal: controller.signal,\n details: true,\n data: davGetFavoritesReport(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n const nodes = contentsResponse.data.filter((node) => node.filename !== path).map((result) => davResultToNode(result, davRoot));\n resolve(nodes);\n } catch (error) {\n reject(error);\n }\n });\n};\nconst davResultToNode = function(node, filesRoot = davRootPath, remoteURL = davRemoteURL) {\n let userId = getCurrentUser()?.uid;\n const isPublic = document.querySelector(\"input#isPublic\")?.value;\n if (isPublic) {\n userId = userId ?? document.querySelector(\"input#sharingUserId\")?.value;\n userId = userId ?? \"anonymous\";\n } else if (!userId) {\n throw new Error(\"No user id found\");\n }\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const nodeData = {\n id: props?.fileid || 0,\n source: `${remoteURL}${node.filename}`,\n mtime: new Date(Date.parse(node.lastmod)),\n mime: node.mime || \"application/octet-stream\",\n size: props?.size || Number.parseInt(props.getcontentlength || \"0\"),\n permissions,\n owner,\n root: filesRoot,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.[\"has-preview\"]\n }\n };\n delete nodeData.attributes?.props;\n return node.type === \"file\" ? new File(nodeData) : new Folder(nodeData);\n};\nconst forbiddenCharacters = window._oc_config?.forbidden_filenames_characters ?? [\"/\", \"\\\\\"];\nconst forbiddenFilenameRegex = window._oc_config?.blacklist_files_regex ? new RegExp(window._oc_config.blacklist_files_regex) : null;\nfunction isFilenameValid(filename) {\n if (forbiddenCharacters.some((character) => filename.includes(character))) {\n return false;\n }\n if (forbiddenFilenameRegex !== null && filename.match(forbiddenFilenameRegex)) {\n return false;\n }\n return true;\n}\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst humanList = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\nconst humanListBinary = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction formatFileSize(size, skipSmallSizes = false, binaryPrefixes = false, base1000 = false) {\n binaryPrefixes = binaryPrefixes && !base1000;\n if (typeof size === \"string\") {\n size = Number(size);\n }\n let order = size > 0 ? Math.floor(Math.log(size) / Math.log(base1000 ? 1e3 : 1024)) : 0;\n order = Math.min((binaryPrefixes ? humanListBinary.length : humanList.length) - 1, order);\n const readableFormat = binaryPrefixes ? humanListBinary[order] : humanList[order];\n let relativeSize = (size / Math.pow(base1000 ? 1e3 : 1024, order)).toFixed(1);\n if (skipSmallSizes === true && order === 0) {\n return (relativeSize !== \"0.0\" ? \"< 1 \" : \"0 \") + (binaryPrefixes ? humanListBinary[1] : humanList[1]);\n }\n if (order < 2) {\n relativeSize = parseFloat(relativeSize).toFixed(0);\n } else {\n relativeSize = parseFloat(relativeSize).toLocaleString(getCanonicalLocale());\n }\n return relativeSize + \" \" + readableFormat;\n}\nfunction parseFileSize(value, forceBinary = false) {\n try {\n value = `${value}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch (e) {\n return null;\n }\n const match = value.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (match === null || match[1] === \".\" || match[1] === \"\") {\n return null;\n }\n const bytesArray = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n };\n const decimalString = `${match[1]}`;\n const base = match[4] === \"i\" || forceBinary ? 1024 : 1e3;\n return Math.round(Number.parseFloat(decimalString) * base ** bytesArray[match[3]]);\n}\nfunction stringify(value) {\n if (value instanceof Date) {\n return value.toISOString();\n }\n return String(value);\n}\nfunction orderBy(collection, identifiers, orders) {\n identifiers = identifiers ?? [(value) => value];\n orders = orders ?? [];\n const sorting = identifiers.map((_, index) => (orders[index] ?? \"asc\") === \"asc\" ? 1 : -1);\n const collator = Intl.Collator(\n [getLanguage(), getCanonicalLocale()],\n {\n // handle 10 as ten and not as one-zero\n numeric: true,\n usage: \"sort\"\n }\n );\n return [...collection].sort((a, b) => {\n for (const [index, identifier] of identifiers.entries()) {\n const value = collator.compare(stringify(identifier(a)), stringify(identifier(b)));\n if (value !== 0) {\n return value * sorting[index];\n }\n }\n return 0;\n });\n}\nvar FilesSortingMode = /* @__PURE__ */ ((FilesSortingMode2) => {\n FilesSortingMode2[\"Name\"] = \"basename\";\n FilesSortingMode2[\"Modified\"] = \"mtime\";\n FilesSortingMode2[\"Size\"] = \"size\";\n return FilesSortingMode2;\n})(FilesSortingMode || {});\nfunction sortNodes(nodes, options = {}) {\n const sortingOptions = {\n // Default to sort by name\n sortingMode: \"basename\",\n // Default to sort ascending\n sortingOrder: \"asc\",\n ...options\n };\n const identifiers = [\n // 1: Sort favorites first if enabled\n ...sortingOptions.sortFavoritesFirst ? [(v) => v.attributes?.favorite !== 1] : [],\n // 2: Sort folders first if sorting by name\n ...sortingOptions.sortFoldersFirst ? [(v) => v.type !== \"folder\"] : [],\n // 3: Use sorting mode if NOT basename (to be able to use displayName too)\n ...sortingOptions.sortingMode !== \"basename\" ? [(v) => v[sortingOptions.sortingMode]] : [],\n // 4: Use displayName if available, fallback to name\n (v) => v.attributes?.displayName || v.basename,\n // 5: Finally, use basename if all previous sorting methods failed\n (v) => v.basename\n ];\n const orders = [\n // (for 1): always sort favorites before normal files\n ...sortingOptions.sortFavoritesFirst ? [\"asc\"] : [],\n // (for 2): always sort folders before files\n ...sortingOptions.sortFoldersFirst ? [\"asc\"] : [],\n // (for 3): Reverse if sorting by mtime as mtime higher means edited more recent -> lower\n ...sortingOptions.sortingMode === \"mtime\" ? [sortingOptions.sortingOrder === \"asc\" ? \"desc\" : \"asc\"] : [],\n // (also for 3 so make sure not to conflict with 2 and 3)\n ...sortingOptions.sortingMode !== \"mtime\" && sortingOptions.sortingMode !== \"basename\" ? [sortingOptions.sortingOrder] : [],\n // for 4: use configured sorting direction\n sortingOptions.sortingOrder,\n // for 5: use configured sorting direction\n sortingOptions.sortingOrder\n ];\n return orderBy(nodes, identifiers, orders);\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Navigation {\n _views = [];\n _currentView = null;\n register(view) {\n if (this._views.find((search) => search.id === view.id)) {\n throw new Error(`View id ${view.id} is already registered`);\n }\n this._views.push(view);\n }\n remove(id) {\n const index = this._views.findIndex((view) => view.id === id);\n if (index !== -1) {\n this._views.splice(index, 1);\n }\n }\n get views() {\n return this._views;\n }\n setActive(view) {\n this._currentView = view;\n }\n get active() {\n return this._currentView;\n }\n}\nconst getNavigation = function() {\n if (typeof window._nc_navigation === \"undefined\") {\n window._nc_navigation = new Navigation();\n logger.debug(\"Navigation service initialized\");\n }\n return window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Column {\n _column;\n constructor(column) {\n isValidColumn(column);\n this._column = column;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst isValidColumn = function(column) {\n if (!column.id || typeof column.id !== \"string\") {\n throw new Error(\"A column id is required\");\n }\n if (!column.title || typeof column.title !== \"string\") {\n throw new Error(\"A column title is required\");\n }\n if (!column.render || typeof column.render !== \"function\") {\n throw new Error(\"A render function is required\");\n }\n if (column.sort && typeof column.sort !== \"function\") {\n throw new Error(\"Column sortFunction must be a function\");\n }\n if (column.summary && typeof column.summary !== \"function\") {\n throw new Error(\"Column summary must be a function\");\n }\n return true;\n};\nvar validator$2 = {};\nvar util$3 = {};\n(function(exports) {\n const nameStartChar = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n const nameChar = nameStartChar + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n const nameRegexp = \"[\" + nameStartChar + \"][\" + nameChar + \"]*\";\n const regexName = new RegExp(\"^\" + nameRegexp + \"$\");\n const getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n };\n const isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === \"undefined\");\n };\n exports.isExist = function(v) {\n return typeof v !== \"undefined\";\n };\n exports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n };\n exports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n if (arrayMode === \"strict\") {\n target[keys[i]] = [a[keys[i]]];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n };\n exports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return \"\";\n }\n };\n exports.isName = isName;\n exports.getAllMatches = getAllMatches;\n exports.nameRegexp = nameRegexp;\n})(util$3);\nconst util$2 = util$3;\nconst defaultOptions$2 = {\n allowBooleanAttributes: false,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nvalidator$2.validate = function(xmlData, options) {\n options = Object.assign({}, defaultOptions$2, options);\n const tags = [];\n let tagFound = false;\n let reachedRoot = false;\n if (xmlData[0] === \"\\uFEFF\") {\n xmlData = xmlData.substr(1);\n }\n for (let i = 0; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && xmlData[i + 1] === \"?\") {\n i += 2;\n i = readPI(xmlData, i);\n if (i.err)\n return i;\n } else if (xmlData[i] === \"<\") {\n let tagStartPos = i;\n i++;\n if (xmlData[i] === \"!\") {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === \"/\") {\n closingTag = true;\n i++;\n }\n let tagName = \"\";\n for (; i < xmlData.length && xmlData[i] !== \">\" && xmlData[i] !== \" \" && xmlData[i] !== \"\t\" && xmlData[i] !== \"\\n\" && xmlData[i] !== \"\\r\"; i++) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substring(0, tagName.length - 1);\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\" + tagName + \"' is an invalid name.\";\n }\n return getErrorObject(\"InvalidTag\", msg, getLineNumberForPosition(xmlData, i));\n }\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject(\"InvalidAttr\", \"Attributes for '\" + tagName + \"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n if (attrStr[attrStr.length - 1] === \"/\") {\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n } else {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject(\n \"InvalidTag\",\n \"Expected closing tag '\" + otg.tagName + \"' (opened in line \" + openPos.line + \", col \" + openPos.col + \") instead of closing tag '\" + tagName + \"'.\",\n getLineNumberForPosition(xmlData, tagStartPos)\n );\n }\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n if (reachedRoot === true) {\n return getErrorObject(\"InvalidXml\", \"Multiple possible root nodes found.\", getLineNumberForPosition(xmlData, i));\n } else if (options.unpairedTags.indexOf(tagName) !== -1)\n ;\n else {\n tags.push({ tagName, tagStartPos });\n }\n tagFound = true;\n }\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"!\") {\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i + 1] === \"?\") {\n i = readPI(xmlData, ++i);\n if (i.err)\n return i;\n } else {\n break;\n }\n } else if (xmlData[i] === \"&\") {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject(\"InvalidChar\", \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n } else {\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject(\"InvalidXml\", \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n }\n if (xmlData[i] === \"<\") {\n i--;\n }\n }\n } else {\n if (isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject(\"InvalidChar\", \"char '\" + xmlData[i] + \"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n if (!tagFound) {\n return getErrorObject(\"InvalidXml\", \"Start tag expected.\", 1);\n } else if (tags.length == 1) {\n return getErrorObject(\"InvalidTag\", \"Unclosed tag '\" + tags[0].tagName + \"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n } else if (tags.length > 0) {\n return getErrorObject(\"InvalidXml\", \"Invalid '\" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n }\n return true;\n};\nfunction isWhiteSpace(char) {\n return char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\";\n}\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == \"?\" || xmlData[i] == \" \") {\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === \"xml\") {\n return getErrorObject(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == \"?\" && xmlData[i + 1] == \">\") {\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \"-\") {\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === \"-\" && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n } else if (xmlData.length > i + 8 && xmlData[i + 1] === \"D\" && xmlData[i + 2] === \"O\" && xmlData[i + 3] === \"C\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"Y\" && xmlData[i + 6] === \"P\" && xmlData[i + 7] === \"E\") {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n angleBracketsCount++;\n } else if (xmlData[i] === \">\") {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (xmlData.length > i + 9 && xmlData[i + 1] === \"[\" && xmlData[i + 2] === \"C\" && xmlData[i + 3] === \"D\" && xmlData[i + 4] === \"A\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"A\" && xmlData[i + 7] === \"[\") {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"]\" && xmlData[i + 1] === \"]\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n }\n return i;\n}\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\nfunction readAttributeStr(xmlData, i) {\n let attrStr = \"\";\n let startChar = \"\";\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === \"\") {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i])\n ;\n else {\n startChar = \"\";\n }\n } else if (xmlData[i] === \">\") {\n if (startChar === \"\") {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== \"\") {\n return false;\n }\n return {\n value: attrStr,\n index: i,\n tagClosed\n };\n}\nconst validAttrStrRegxp = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction validateAttributeString(attrStr, options) {\n const matches = util$2.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' has no space in starting.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) {\n return getErrorObject(\"InvalidAttr\", \"boolean attribute '\" + matches[i][2] + \"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n attrNames[attrName] = 1;\n } else {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n return true;\n}\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === \"x\") {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \";\")\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\nfunction validateAmpersand(xmlData, i) {\n i++;\n if (xmlData[i] === \";\")\n return -1;\n if (xmlData[i] === \"#\") {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === \";\")\n break;\n return -1;\n }\n return i;\n}\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col\n }\n };\n}\nfunction validateAttrName(attrName) {\n return util$2.isName(attrName);\n}\nfunction validateTagName(tagname) {\n return util$2.isName(tagname);\n}\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\nvar OptionsBuilder = {};\nconst defaultOptions$1 = {\n preserveOrder: false,\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n removeNSPrefix: false,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true,\n //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val2) {\n return val2;\n },\n attributeValueProcessor: function(attrName, val2) {\n return val2;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs) {\n return tagName;\n }\n // skipEmptyListItem: false\n};\nconst buildOptions$1 = function(options) {\n return Object.assign({}, defaultOptions$1, options);\n};\nOptionsBuilder.buildOptions = buildOptions$1;\nOptionsBuilder.defaultOptions = defaultOptions$1;\nclass XmlNode {\n constructor(tagname) {\n this.tagname = tagname;\n this.child = [];\n this[\":@\"] = {};\n }\n add(key, val2) {\n if (key === \"__proto__\")\n key = \"#__proto__\";\n this.child.push({ [key]: val2 });\n }\n addChild(node) {\n if (node.tagname === \"__proto__\")\n node.tagname = \"#__proto__\";\n if (node[\":@\"] && Object.keys(node[\":@\"]).length > 0) {\n this.child.push({ [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n } else {\n this.child.push({ [node.tagname]: node.child });\n }\n }\n}\nvar xmlNode$1 = XmlNode;\nconst util$1 = util$3;\nfunction readDocType$1(xmlData, i) {\n const entities = {};\n if (xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"C\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"Y\" && xmlData[i + 7] === \"P\" && xmlData[i + 8] === \"E\") {\n i = i + 9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && !comment) {\n if (hasBody && isEntity(xmlData, i)) {\n i += 7;\n [entityName, val, i] = readEntityExp(xmlData, i + 1);\n if (val.indexOf(\"&\") === -1)\n entities[validateEntityName(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n };\n } else if (hasBody && isElement(xmlData, i))\n i += 8;\n else if (hasBody && isAttlist(xmlData, i))\n i += 8;\n else if (hasBody && isNotation(xmlData, i))\n i += 9;\n else if (isComment)\n comment = true;\n else\n throw new Error(\"Invalid DOCTYPE\");\n angleBracketsCount++;\n exp = \"\";\n } else if (xmlData[i] === \">\") {\n if (comment) {\n if (xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\") {\n comment = false;\n angleBracketsCount--;\n }\n } else {\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n } else if (xmlData[i] === \"[\") {\n hasBody = true;\n } else {\n exp += xmlData[i];\n }\n }\n if (angleBracketsCount !== 0) {\n throw new Error(`Unclosed DOCTYPE`);\n }\n } else {\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return { entities, i };\n}\nfunction readEntityExp(xmlData, i) {\n let entityName2 = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"'); i++) {\n entityName2 += xmlData[i];\n }\n entityName2 = entityName2.trim();\n if (entityName2.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const startChar = xmlData[i++];\n let val2 = \"\";\n for (; i < xmlData.length && xmlData[i] !== startChar; i++) {\n val2 += xmlData[i];\n }\n return [entityName2, val2, i];\n}\nfunction isComment(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"-\" && xmlData[i + 3] === \"-\")\n return true;\n return false;\n}\nfunction isEntity(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"N\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"I\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"Y\")\n return true;\n return false;\n}\nfunction isElement(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"L\" && xmlData[i + 4] === \"E\" && xmlData[i + 5] === \"M\" && xmlData[i + 6] === \"E\" && xmlData[i + 7] === \"N\" && xmlData[i + 8] === \"T\")\n return true;\n return false;\n}\nfunction isAttlist(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"A\" && xmlData[i + 3] === \"T\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"L\" && xmlData[i + 6] === \"I\" && xmlData[i + 7] === \"S\" && xmlData[i + 8] === \"T\")\n return true;\n return false;\n}\nfunction isNotation(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"N\" && xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"A\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"I\" && xmlData[i + 8] === \"O\" && xmlData[i + 9] === \"N\")\n return true;\n return false;\n}\nfunction validateEntityName(name) {\n if (util$1.isName(name))\n return name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\nvar DocTypeReader = readDocType$1;\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\nconst consider = {\n hex: true,\n leadingZeros: true,\n decimalPoint: \".\",\n eNotation: true\n //skipLike: /regex/\n};\nfunction toNumber$1(str, options = {}) {\n options = Object.assign({}, consider, options);\n if (!str || typeof str !== \"string\")\n return str;\n let trimmedStr = str.trim();\n if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr))\n return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n } else {\n const match = numRegex.exec(trimmedStr);\n if (match) {\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]);\n const eNotation = match[4] || match[6];\n if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\")\n return str;\n else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\")\n return str;\n else {\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if (numStr.search(/[eE]/) !== -1) {\n if (options.eNotation)\n return num;\n else\n return str;\n } else if (eNotation) {\n if (options.eNotation)\n return num;\n else\n return str;\n } else if (trimmedStr.indexOf(\".\") !== -1) {\n if (numStr === \"0\" && numTrimmedByZeros === \"\")\n return num;\n else if (numStr === numTrimmedByZeros)\n return num;\n else if (sign && numStr === \"-\" + numTrimmedByZeros)\n return num;\n else\n return str;\n }\n if (leadingZeros) {\n if (numTrimmedByZeros === numStr)\n return num;\n else if (sign + numTrimmedByZeros === numStr)\n return num;\n else\n return str;\n }\n if (trimmedStr === numStr)\n return num;\n else if (trimmedStr === sign + numStr)\n return num;\n return str;\n }\n } else {\n return str;\n }\n }\n}\nfunction trimZeros(numStr) {\n if (numStr && numStr.indexOf(\".\") !== -1) {\n numStr = numStr.replace(/0+$/, \"\");\n if (numStr === \".\")\n numStr = \"0\";\n else if (numStr[0] === \".\")\n numStr = \"0\" + numStr;\n else if (numStr[numStr.length - 1] === \".\")\n numStr = numStr.substr(0, numStr.length - 1);\n return numStr;\n }\n return numStr;\n}\nvar strnum = toNumber$1;\nconst util = util$3;\nconst xmlNode = xmlNode$1;\nconst readDocType = DocTypeReader;\nconst toNumber = strnum;\nlet OrderedObjParser$1 = class OrderedObjParser {\n constructor(options) {\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\": { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n \"gt\": { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n \"lt\": { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n \"quot\": { regex: /&(quot|#34|#x22);/g, val: '\"' }\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" };\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\": { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\": { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\": { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\": { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\": { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\": { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\": { regex: /&(inr|#8377);/g, val: \"₹\" },\n \"num_dec\": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue$1;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n};\nfunction addExternalEntities(externalEntities) {\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\" + ent + \";\", \"g\"),\n val: externalEntities[ent]\n };\n }\n}\nfunction parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val2 !== void 0) {\n if (this.options.trimValues && !dontTrim) {\n val2 = val2.trim();\n }\n if (val2.length > 0) {\n if (!escapeEntities)\n val2 = this.replaceEntitiesValue(val2);\n const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode);\n if (newval === null || newval === void 0) {\n return val2;\n } else if (typeof newval !== typeof val2 || newval !== val2) {\n return newval;\n } else if (this.options.trimValues) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n const trimmedVal = val2.trim();\n if (trimmedVal === val2) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n return val2;\n }\n }\n }\n }\n}\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(\":\");\n const prefix = tagname.charAt(0) === \"/\" ? \"/\" : \"\";\n if (tags[0] === \"xmlns\") {\n return \"\";\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\nconst attrsRegx = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === \"string\") {\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length;\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if (aName === \"__proto__\")\n aName = \"#__proto__\";\n if (oldVal !== void 0) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if (newVal === null || newVal === void 0) {\n attrs[aName] = oldVal;\n } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {\n attrs[aName] = newVal;\n } else {\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n const xmlObj = new xmlNode(\"!xml\");\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for (let i = 0; i < xmlData.length; i++) {\n const ch = xmlData[i];\n if (ch === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\");\n let tagName = xmlData.substring(i + 2, closeIndex).trim();\n if (this.options.removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n }\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode) {\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\") + 1);\n if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {\n throw new Error(`Unpaired tag can not be used as closing tag: </${tagName}>`);\n }\n let propIndex = 0;\n if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {\n propIndex = jPath.lastIndexOf(\".\", jPath.lastIndexOf(\".\") - 1);\n this.tagsNodeStack.pop();\n } else {\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n currentNode = this.tagsNodeStack.pop();\n textData = \"\";\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n let tagData = readTagExp(xmlData, i, false, \"?>\");\n if (!tagData)\n throw new Error(\"Pi Tag is not closed.\");\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if (this.options.ignoreDeclaration && tagData.tagName === \"?xml\" || this.options.ignorePiTags)\n ;\n else {\n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n }\n i = tagData.closeIndex + 1;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const endIndex = findClosingIndex(xmlData, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const comment = xmlData.substring(i + 4, endIndex - 2);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);\n }\n i = endIndex;\n } else if (xmlData.substr(i + 1, 2) === \"!D\") {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9, closeIndex);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if (val2 == void 0)\n val2 = \"\";\n if (this.options.cdataPropName) {\n currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);\n } else {\n currentNode.add(this.options.textNodeName, val2);\n }\n i = closeIndex + 2;\n } else {\n let result = readTagExp(xmlData, i, this.options.removeNSPrefix);\n let tagName = result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode && textData) {\n if (currentNode.tagname !== \"!xml\") {\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n const lastTag = currentNode;\n if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if (tagName !== xmlObj.tagname) {\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i = result.closeIndex;\n } else if (this.options.unpairedTags.indexOf(tagName) !== -1) {\n i = result.closeIndex;\n } else {\n const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if (!result2)\n throw new Error(`Unexpected end of ${rawTagName}`);\n i = result2.i;\n tagContent = result2.tagContent;\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if (tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n this.addChild(currentNode, childNode, jPath);\n } else {\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n } else {\n const childNode = new xmlNode(tagName);\n this.tagsNodeStack.push(currentNode);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n } else {\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n};\nfunction addChild(currentNode, childNode, jPath) {\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"]);\n if (result === false)\n ;\n else if (typeof result === \"string\") {\n childNode.tagname = result;\n currentNode.addChild(childNode);\n } else {\n currentNode.addChild(childNode);\n }\n}\nconst replaceEntitiesValue$1 = function(val2) {\n if (this.options.processEntities) {\n for (let entityName2 in this.docTypeEntities) {\n const entity = this.docTypeEntities[entityName2];\n val2 = val2.replace(entity.regx, entity.val);\n }\n for (let entityName2 in this.lastEntities) {\n const entity = this.lastEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n if (this.options.htmlEntities) {\n for (let entityName2 in this.htmlEntities) {\n const entity = this.htmlEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n }\n val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return val2;\n};\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) {\n if (isLeafNode === void 0)\n isLeafNode = Object.keys(currentNode.child).length === 0;\n textData = this.parseTextData(\n textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode\n );\n if (textData !== void 0 && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\nfunction isItStopNode(stopNodes, jPath, currentTagName) {\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if (allNodesExp === stopNodeExp || jPath === stopNodeExp)\n return true;\n }\n return false;\n}\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\") {\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary)\n attrBoundary = \"\";\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if (closingChar[1]) {\n if (xmlData[index + 1] === closingChar[1]) {\n return {\n data: tagExp,\n index\n };\n }\n } else {\n return {\n data: tagExp,\n index\n };\n }\n } else if (ch === \"\t\") {\n ch = \" \";\n }\n tagExp += ch;\n }\n}\nfunction findClosingIndex(xmlData, str, i, errMsg) {\n const closingIndex = xmlData.indexOf(str, i);\n if (closingIndex === -1) {\n throw new Error(errMsg);\n } else {\n return closingIndex + str.length - 1;\n }\n}\nfunction readTagExp(xmlData, i, removeNSPrefix, closingChar = \">\") {\n const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);\n if (!result)\n return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if (separatorIndex !== -1) {\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n const rawTagName = tagName;\n if (removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n return {\n tagName,\n tagExp,\n closeIndex,\n attrExpPresent,\n rawTagName\n };\n}\nfunction readStopNodeData(xmlData, tagName, i) {\n const startIndex = i;\n let openTagCount = 1;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i + 2, closeIndex).trim();\n if (closeTagName === tagName) {\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i: closeIndex\n };\n }\n }\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n const closeIndex = findClosingIndex(xmlData, \"?>\", i + 1, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const closeIndex = findClosingIndex(xmlData, \"-->\", i + 3, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i = closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, \">\");\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== \"/\") {\n openTagCount++;\n }\n i = tagData.closeIndex;\n }\n }\n }\n }\n}\nfunction parseValue(val2, shouldParse, options) {\n if (shouldParse && typeof val2 === \"string\") {\n const newval = val2.trim();\n if (newval === \"true\")\n return true;\n else if (newval === \"false\")\n return false;\n else\n return toNumber(val2, options);\n } else {\n if (util.isExist(val2)) {\n return val2;\n } else {\n return \"\";\n }\n }\n}\nvar OrderedObjParser_1 = OrderedObjParser$1;\nvar node2json = {};\nfunction prettify$1(node, options) {\n return compress(node, options);\n}\nfunction compress(arr, options, jPath) {\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName$1(tagObj);\n let newJpath = \"\";\n if (jPath === void 0)\n newJpath = property;\n else\n newJpath = jPath + \".\" + property;\n if (property === options.textNodeName) {\n if (text === void 0)\n text = tagObj[property];\n else\n text += \"\" + tagObj[property];\n } else if (property === void 0) {\n continue;\n } else if (tagObj[property]) {\n let val2 = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val2, options);\n if (tagObj[\":@\"]) {\n assignAttributes(val2, tagObj[\":@\"], newJpath, options);\n } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) {\n val2 = val2[options.textNodeName];\n } else if (Object.keys(val2).length === 0) {\n if (options.alwaysCreateTextNode)\n val2[options.textNodeName] = \"\";\n else\n val2 = \"\";\n }\n if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) {\n if (!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [compressedObj[property]];\n }\n compressedObj[property].push(val2);\n } else {\n if (options.isArray(property, newJpath, isLeaf)) {\n compressedObj[property] = [val2];\n } else {\n compressedObj[property] = val2;\n }\n }\n }\n }\n if (typeof text === \"string\") {\n if (text.length > 0)\n compressedObj[options.textNodeName] = text;\n } else if (text !== void 0)\n compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\nfunction propName$1(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\")\n return key;\n }\n}\nfunction assignAttributes(obj, attrMap, jpath, options) {\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [attrMap[atrrName]];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\nfunction isLeafTag(obj, options) {\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n if (propCount === 0) {\n return true;\n }\n if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)) {\n return true;\n }\n return false;\n}\nnode2json.prettify = prettify$1;\nconst { buildOptions } = OptionsBuilder;\nconst OrderedObjParser2 = OrderedObjParser_1;\nconst { prettify } = node2json;\nconst validator$1 = validator$2;\nlet XMLParser$1 = class XMLParser {\n constructor(options) {\n this.externalEntities = {};\n this.options = buildOptions(options);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData, validationOption) {\n if (typeof xmlData === \"string\")\n ;\n else if (xmlData.toString) {\n xmlData = xmlData.toString();\n } else {\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n }\n if (validationOption) {\n if (validationOption === true)\n validationOption = {};\n const result = validator$1.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`);\n }\n }\n const orderedObjParser = new OrderedObjParser2(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if (this.options.preserveOrder || orderedResult === void 0)\n return orderedResult;\n else\n return prettify(orderedResult, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value) {\n if (value.indexOf(\"&\") !== -1) {\n throw new Error(\"Entity value can't have '&'\");\n } else if (key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1) {\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for '
'\");\n } else if (value === \"&\") {\n throw new Error(\"An entity with value '&' is not permitted\");\n } else {\n this.externalEntities[key] = value;\n }\n }\n};\nvar XMLParser_1 = XMLParser$1;\nconst EOL = \"\\n\";\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if (tagName === void 0)\n continue;\n let newJPath = \"\";\n if (jPath.length === 0)\n newJPath = tagName;\n else\n newJPath = `${jPath}.${tagName}`;\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += `<![CDATA[${tagObj[tagName][0][options.textNodeName]}]]>`;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + `<!--${tagObj[tagName][0][options.textNodeName]}-->`;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr2 = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\";\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode)\n xmlStr += tagStart + \">\";\n else\n xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}</${tagName}>`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"</\"))) {\n xmlStr += indentation + options.indentBy + tagValue + indentation;\n } else {\n xmlStr += tagValue;\n }\n xmlStr += `</${tagName}>`;\n }\n isPreviousElementTag = true;\n }\n return xmlStr;\n}\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!obj.hasOwnProperty(key))\n continue;\n if (key !== \":@\")\n return key;\n }\n}\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!attrMap.hasOwnProperty(attr))\n continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName)\n return true;\n }\n return false;\n}\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nvar orderedJs2Xml = toXml;\nconst buildFromOrderedJs = orderedJs2Xml;\nconst defaultOptions = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: \" \",\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function() {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n this.processTextOrObjNode = processTextOrObjNode;\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = \">\\n\";\n this.newLine = \"\\n\";\n } else {\n this.indentate = function() {\n return \"\";\n };\n this.tagEndChar = \">\";\n this.newLine = \"\";\n }\n}\nBuilder.prototype.build = function(jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n };\n }\n return this.j2x(jObj, 0).val;\n }\n};\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = \"\";\n let val2 = \"\";\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key))\n continue;\n if (typeof jObj[key] === \"undefined\") {\n if (this.isAttribute(key)) {\n val2 += \"\";\n }\n } else if (jObj[key] === null) {\n if (this.isAttribute(key)) {\n val2 += \"\";\n } else if (key[0] === \"?\") {\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n } else {\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n }\n } else if (jObj[key] instanceof Date) {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n } else if (typeof jObj[key] !== \"object\") {\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, \"\" + jObj[key]);\n } else {\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, \"\" + jObj[key]);\n val2 += this.replaceEntitiesValue(newval);\n } else {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === \"undefined\")\n ;\n else if (item === null) {\n if (key[0] === \"?\")\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n else\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n } else if (typeof item === \"object\") {\n if (this.options.oneListGroup) {\n listTagVal += this.j2x(item, level + 1).val;\n } else {\n listTagVal += this.processTextOrObjNode(item, key, level);\n }\n } else {\n listTagVal += this.buildTextValNode(item, key, \"\", level);\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, key, \"\", level);\n }\n val2 += listTagVal;\n } else {\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], \"\" + jObj[key][Ks[j]]);\n }\n } else {\n val2 += this.processTextOrObjNode(jObj[key], key, level);\n }\n }\n }\n return { attrStr, val: val2 };\n};\nBuilder.prototype.buildAttrPairStr = function(attrName, val2) {\n val2 = this.options.attributeValueProcessor(attrName, \"\" + val2);\n val2 = this.replaceEntitiesValue(val2);\n if (this.options.suppressBooleanAttributes && val2 === \"true\") {\n return \" \" + attrName;\n } else\n return \" \" + attrName + '=\"' + val2 + '\"';\n};\nfunction processTextOrObjNode(object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\nBuilder.prototype.buildObjectNode = function(val2, key, attrStr, level) {\n if (val2 === \"\") {\n if (key[0] === \"?\")\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n else {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else {\n let tagEndExp = \"</\" + key + this.tagEndChar;\n let piClosingChar = \"\";\n if (key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n if ((attrStr || attrStr === \"\") && val2.indexOf(\"<\") === -1) {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + \">\" + val2 + tagEndExp;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `<!--${val2}-->` + this.newLine;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp;\n }\n }\n};\nBuilder.prototype.closeTag = function(key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) {\n if (!this.options.suppressUnpairedNode)\n closeTag = \"/\";\n } else if (this.options.suppressEmptyNode) {\n closeTag = \"/\";\n } else {\n closeTag = `></${key}`;\n }\n return closeTag;\n};\nBuilder.prototype.buildTextValNode = function(val2, key, attrStr, level) {\n if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n return this.indentate(level) + `<![CDATA[${val2}]]>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `<!--${val2}-->` + this.newLine;\n } else if (key[0] === \"?\") {\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n } else {\n let textValue = this.options.tagValueProcessor(key, val2);\n textValue = this.replaceEntitiesValue(textValue);\n if (textValue === \"\") {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + \">\" + textValue + \"</\" + key + this.tagEndChar;\n }\n }\n};\nBuilder.prototype.replaceEntitiesValue = function(textValue) {\n if (textValue && textValue.length > 0 && this.options.processEntities) {\n for (let i = 0; i < this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n};\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\nfunction isAttribute(name) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\nvar json2xml = Builder;\nconst validator = validator$2;\nconst XMLParser2 = XMLParser_1;\nconst XMLBuilder = json2xml;\nvar fxp = {\n XMLParser: XMLParser2,\n XMLValidator: validator,\n XMLBuilder\n};\nfunction isSvg(string) {\n if (typeof string !== \"string\") {\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n }\n string = string.trim();\n if (string.length === 0) {\n return false;\n }\n if (fxp.XMLValidator.validate(string) !== true) {\n return false;\n }\n let jsonObject;\n const parser = new fxp.XMLParser();\n try {\n jsonObject = parser.parse(string);\n } catch {\n return false;\n }\n if (!jsonObject) {\n return false;\n }\n if (!Object.keys(jsonObject).some((x) => x.toLowerCase() === \"svg\")) {\n return false;\n }\n return true;\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass View {\n _view;\n constructor(view) {\n isValidView(view);\n this._view = view;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(icon) {\n this._view.icon = icon;\n }\n get order() {\n return this._view.order;\n }\n set order(order) {\n this._view.order = order;\n }\n get params() {\n return this._view.params;\n }\n set params(params) {\n this._view.params = params;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(expanded) {\n this._view.expanded = expanded;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst isValidView = function(view) {\n if (!view.id || typeof view.id !== \"string\") {\n throw new Error(\"View id is required and must be a string\");\n }\n if (!view.name || typeof view.name !== \"string\") {\n throw new Error(\"View name is required and must be a string\");\n }\n if (view.columns && view.columns.length > 0 && (!view.caption || typeof view.caption !== \"string\")) {\n throw new Error(\"View caption is required for top-level views and must be a string\");\n }\n if (!view.getContents || typeof view.getContents !== \"function\") {\n throw new Error(\"View getContents is required and must be a function\");\n }\n if (!view.icon || typeof view.icon !== \"string\" || !isSvg(view.icon)) {\n throw new Error(\"View icon is required and must be a valid svg string\");\n }\n if (!(\"order\" in view) || typeof view.order !== \"number\") {\n throw new Error(\"View order is required and must be a number\");\n }\n if (view.columns) {\n view.columns.forEach((column) => {\n if (!(column instanceof Column)) {\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }\n });\n }\n if (view.emptyView && typeof view.emptyView !== \"function\") {\n throw new Error(\"View emptyView must be a function\");\n }\n if (view.parent && typeof view.parent !== \"string\") {\n throw new Error(\"View parent must be a string\");\n }\n if (\"sticky\" in view && typeof view.sticky !== \"boolean\") {\n throw new Error(\"View sticky must be a boolean\");\n }\n if (\"expanded\" in view && typeof view.expanded !== \"boolean\") {\n throw new Error(\"View expanded must be a boolean\");\n }\n if (view.defaultSortKey && typeof view.defaultSortKey !== \"string\") {\n throw new Error(\"View defaultSortKey must be a string\");\n }\n return true;\n};\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst addNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.registerEntry(entry);\n};\nconst removeNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.unregisterEntry(entry);\n};\nconst getNewFileMenuEntries = function(context) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.getEntries(context).sort((a, b) => {\n if (a.order !== void 0 && b.order !== void 0 && a.order !== b.order) {\n return a.order - b.order;\n }\n return a.displayName.localeCompare(b.displayName, void 0, { numeric: true, sensitivity: \"base\" });\n });\n};\nexport {\n Column,\n DefaultType,\n File,\n FileAction,\n FileType,\n FilesSortingMode,\n Folder,\n Header,\n Navigation,\n NewMenuEntryCategory,\n Node,\n NodeStatus,\n Permission,\n View,\n addNewFileMenuEntry,\n davGetClient,\n davGetDefaultPropfind,\n davGetFavoritesReport,\n davGetRecentSearch,\n davParsePermissions,\n davRemoteURL,\n davResultToNode,\n davRootPath,\n defaultDavNamespaces,\n defaultDavProperties,\n formatFileSize,\n getDavNameSpaces,\n getDavProperties,\n getFavoriteNodes,\n getFileActions,\n getFileListHeaders,\n getNavigation,\n getNewFileMenuEntries,\n isFilenameValid,\n orderBy,\n parseFileSize,\n registerDavProperty,\n registerFileAction,\n registerFileListHeaders,\n removeNewFileMenuEntry,\n sortNodes\n};\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 \"\" + ({\"3239\":\"settings-users\",\"4529\":\"settings-apps-view\"}[chunkId] || chunkId) + \"-\" + chunkId + \".js?v=\" + {\"1110\":\"e20948a2fd7d006e5209\",\"1439\":\"e8a47ca9c09dfe5fd109\",\"1521\":\"e1051f3f73b100489093\",\"3239\":\"dd6b10c03c9f6a26998a\",\"4529\":\"9699f73a65ff08891e64\",\"5390\":\"773cdcdea5659920bbd7\",\"5455\":\"1a13ae0091b6c35ef72a\",\"8737\":\"41f38430e0c0380c362b\"}[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 = 2689;","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)\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\t2689: 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__(18539)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","sanitize","url","replace","requireAdmin","confirmPassword","get","options","axios","post","data","put","delete","params","localStorage","getBuilder","persist","build","defaults","id","name","usercount","disabled","canAdd","canRemove","state","users","groups","orderBy","GroupSorting","UserCount","minPasswordLength","usersOffset","usersLimit","disabledUsersOffset","disabledUsersLimit","userCount","showConfig","showStoragePath","getItem","showUserBackend","showLastLogin","showNewUserForm","showLanguages","mutations","appendUsers","usersObj","existingUsers","map","_ref","newUsers","Object","values","filter","_ref2","includes","concat","updateDisabledUsers","_usersObj","setPasswordPolicyMinLength","length","initGroups","_ref3","group","assign","addGroup","_ref4","gid","displayName","find","unshift","e","console","error","renameGroup","_ref5","groupIndex","findIndex","groupSearch","updatedGroup","splice","removeGroup","addUserGroup","_ref6","userid","user","enabled","push","removeUserGroup","_ref7","indexOf","addUserSubAdmin","_ref8","subadmin","removeUserSubAdmin","_ref9","deleteUser","userIndex","this","commit","actionType","addUserData","response","ocs","enableDisableUser","_ref10","updateUserCounts","_ref11","disabledGroup","forEach","userGroup","warn","logger","setUserData","_ref12","key","value","humanValue","parseFileSize","resetUsers","setShowConfig","_ref13","setItem","JSON","stringify","setGroupSorting","sorting","oldValue","generateUrl","String","catch","showError","t","getters","getUsers","getGroups","getSubadminGroups","getSortedGroups","sort","a","b","numA","numB","localeCompare","getGroupSorting","getPasswordPolicyMinLength","getUsersOffset","getUsersLimit","getDisabledUsersOffset","getDisabledUsersLimit","getUserCount","getShowConfig","CancelToken","searchRequestCancelSource","actions","searchUsers","context","_ref14","offset","limit","search","api","generateOcsUrl","getUser","userId","_ref15","cancel","source","trim","encodeURIComponent","cancelToken","token","then","usersCount","keys","getDisabledUsers","_ref16","_ref17","limitParam","getUsersFromList","_ref18","getUsersFromGroup","_ref19","groupid","groupId","getCapabilities","password_policy","minLength","_ref20","_ref21","_ref22","_ref23","_ref24","wipeUserDevices","addUser","_ref25","_ref26","dispatch","password","email","quota","language","manager","_ref27","userStatus","_ref28","allowedEmpty","Promise","reject","Error","sendWelcomeMail","APPS_API_FAILURE","message","isHTML","initCategories","categories","updateCount","updateCategories","categoriesPromise","gettingCategoriesPromise","setUpdateCount","addCategory","category","appendCategories","categoriesArray","setAllApps","apps","setError","appId","Array","isArray","_id","app","clearError","enableApp","active","setInstallState","canInstall","disableApp","removable","canUnInstall","uninstallApp","needsDownload","installed","updateApp","version","update","resetApps","reset","startLoading","Vue","loading","stopLoading","appIds","_appId","update_required","showInfo","onClick","window","location","reload","close","setTimeout","forceEnableApp","finally","getAllApps","getCategories","shouldRefetchCategories","arguments","undefined","categoriesPromiseResponse","bundles","loadState","getAppBundles","getUpdateCount","getCategoryById","selectedCategoryId","setServerData","serverData","getServerData","setAppConfig","use","Vuex","API_FAILURE","meta","store","useStore","Store","modules","settings","oc","strict","process","getLoggerBuilder","setApp","detectUser","_defineComponent","__name","setup","__props","__sfc","NcContent","_vm","_c","_self","_setupProxy","attrs","_v","path","components","default","UserManagement","navigation","UserManagementNavigation","props","children","redirect","AppStore","AppStoreNavigation","sidebar","AppStoreSidebar","Router","mode","base","linkActiveClass","routes","VTooltip","defaultHtml","sync","router","__webpack_nonce__","btoa","_getRequestToken","getRequestToken","prototype","n","PiniaVuePlugin","pinia","createPinia","render","h","SettingsApp","el","extend","encodeReserveRE","encodeReserveReplacer","c","charCodeAt","toString","commaRE","encode","str","decode","decodeURIComponent","err","castQueryParamValue","parseQuery","query","res","split","param","parts","shift","val","join","stringifyQuery","obj","result","val2","x","trailingSlashRE","createRoute","record","redirectedFrom","clone","route","hash","fullPath","getFullPath","matched","formatMatch","freeze","START","parent","ref","_stringifyQuery","isSameRoute","onlyPath","isObjectEqual","aKeys","bKeys","every","i","aVal","bVal","handleRouteEntered","instances","instance","cbs","enteredCbs","i$1","_isBeingDestroyed","View","functional","type","_","routerView","$createElement","$route","cache","_routerViewCache","depth","inactive","_routerRoot","vnodeData","$vnode","keepAlive","_directInactive","_inactive","$parent","routerViewDepth","cachedData","cachedComponent","component","configProps","fillPropsinData","registerRouteInstance","vm","current","hook","prepatch","vnode","componentInstance","init","propsToPass","config","resolveProps","resolvePath","relative","append","firstChar","charAt","stack","pop","segments","segment","cleanPath","isarray","arr","call","pathToRegexp_1","pathToRegexp","RegExp","match","prefix","delimiter","optional","repeat","partial","asterisk","pattern","attachKeys","regexpToRegexp","flags","arrayToRegexp","tokensToRegExp","parse","stringToRegexp","parse_1","tokensToFunction_1","tokensToFunction","tokensToRegExp_1","PATH_REGEXP","tokens","index","defaultDelimiter","exec","m","escaped","slice","next","capture","modifier","escapeGroup","escapeString","substr","encodeURIComponentPretty","encodeURI","toUpperCase","matches","opts","pretty","TypeError","j","test","re","sensitive","end","endsWithDelimiter","compile","regexpCompileCache","create","fillParams","routeMsg","filler","pathMatch","normalizeLocation","raw","_normalized","params$1","rawPath","parsedPath","hashIndex","queryIndex","parsePath","basePath","extraQuery","_parseQuery","parsedQuery","resolveQuery","_Vue","noop","Link","to","required","tag","custom","Boolean","exact","exactPath","activeClass","exactActiveClass","ariaCurrentValue","event","this$1$1","$router","resolve","href","classes","globalActiveClass","globalExactActiveClass","linkExactActiveClass","activeClassFallback","exactActiveClassFallback","compareTarget","target","queryIncludes","isIncludedRoute","handler","guardEvent","on","click","class","scopedSlot","$scopedSlots","$hasNormal","navigate","isActive","isExactActive","findAnchor","$slots","isStatic","aData","handler$1","event$1","aAttrs","metaKey","altKey","ctrlKey","shiftKey","defaultPrevented","button","currentTarget","getAttribute","preventDefault","child","inBrowser","createRouteMap","oldPathList","oldPathMap","oldNameMap","parentRoute","pathList","pathMap","nameMap","addRouteRecord","l","matchAs","pathToRegexpOptions","normalizedPath","normalizePath","caseSensitive","regex","compileRouteRegex","alias","beforeEnter","childMatchAs","aliases","aliasRoute","createMatcher","currentRoute","_createRoute","paramNames","record$1","matchRoute","originalRedirect","hasOwnProperty","resolveRecordPath","aliasedMatch","aliasedRecord","addRoute","parentOrRoute","getRoutes","addRoutes","len","Time","performance","now","Date","genStateKey","toFixed","_key","getStateKey","setStateKey","positionStore","setupScroll","history","scrollRestoration","protocolAndPath","protocol","host","absolutePath","stateCopy","replaceState","addEventListener","handlePopState","removeEventListener","handleScroll","from","isPop","behavior","scrollBehavior","$nextTick","position","getScrollPosition","shouldScroll","scrollToPosition","saveScrollPosition","pageXOffset","y","pageYOffset","isValidPosition","isNumber","normalizePosition","v","hashStartsWithNumberRE","isObject","selector","document","getElementById","querySelector","docRect","documentElement","getBoundingClientRect","elRect","left","top","getElementPosition","style","scrollTo","ua","supportsPushState","navigator","userAgent","pushState","NavigationFailureType","redirected","aborted","cancelled","duplicated","createNavigationCancelledError","createRouterError","_isRouter","propertiesToLog","isError","isNavigationFailure","errorType","runQueue","queue","fn","cb","step","flatMapComponents","flatten","apply","hasSymbol","Symbol","toStringTag","once","called","args","History","baseEl","normalizeBase","pending","ready","readyCbs","readyErrorCbs","errorCbs","listeners","extractGuards","records","bind","reverse","guards","def","guard","extractGuard","bindGuard","listen","onReady","errorCb","onError","transitionTo","onComplete","onAbort","prev","confirmTransition","updateRoute","ensureURL","afterHooks","abort","lastRouteIndex","lastCurrentIndex","max","Math","updated","activated","deactivated","resolveQueue","extractLeaveGuards","beforeHooks","extractUpdateHooks","hasAsync","cid","resolvedDef","__esModule","resolved","reason","msg","comp","iterator","createNavigationAbortedError","createNavigationRedirectedError","enterGuards","bindEnterGuard","extractEnterGuards","resolveHooks","setupListeners","teardown","cleanupListener","HTML5History","_startLocation","getLocation","__proto__","constructor","expectScroll","supportsScroll","handleRoutingEvent","go","fromRoute","getCurrentLocation","pathname","pathLowerCase","toLowerCase","baseLowerCase","HashHistory","fallback","checkFallback","ensureSlash","getHash","replaceHash","eventType","pushHash","getUrl","AbstractHistory","targetIndex","VueRouter","matcher","prototypeAccessors","configurable","$once","routeOrError","handleInitialScroll","_route","beforeEach","registerHook","beforeResolve","afterEach","back","forward","getMatchedComponents","createHref","normalizedTo","defineProperties","VueRouter$1","list","install","isDef","registerInstance","callVal","$options","_parentVnode","mixin","beforeCreate","_router","util","defineReactive","destroyed","defineProperty","strats","optionMergeStrategies","beforeRouteEnter","beforeRouteLeave","beforeRouteUpdate","created","START_LOCATION","cloneRoute","exports","moduleName","registerModule","namespaced","transition","currentPath","isTimeTraveling","storeUnwatch","watch","afterEachUnHook","unregisterModule","setUid","uid","Permission","Permission2","defaultDavProperties","defaultDavNamespaces","d","nc","getDavProperties","_nc_dav_properties","prop","getDavNameSpaces","_nc_dav_namespaces","ns","davGetDefaultPropfind","davGetRecentSearch","lastModified","FileType","FileType2","isDavRessource","davService","validateData","URL","startsWith","mtime","crtime","mime","size","permissions","NONE","ALL","owner","attributes","root","service","status","NodeStatus","NodeStatus2","Node","_data","_attributes","_knownDavService","readonlyAttributes","entries","getOwnPropertyDescriptors","set","Reflect","deleteProperty","receiver","Proxy","encodedSource","origin","basename","extension","extname","dirname","firstMatch","updateMtime","READ","fileid","move","destination","rename","basename2","File","Folder","super","davRootPath","davRemoteURL","davGetClient","remoteURL","headers","client","setHeaders","requesttoken","patch","headers2","method","fetch","getFavoriteNodes","davClient","davRoot","controller","AbortController","CancelablePromise","async","onCancel","getDirectoryContents","signal","details","includeSelf","node","filename","davResultToNode","filesRoot","isPublic","permString","CREATE","UPDATE","DELETE","SHARE","davParsePermissions","nodeData","lastmod","Number","parseInt","getcontentlength","hasPreview","_oc_config","blacklist_files_regex","humanList","humanListBinary","formatFileSize","skipSmallSizes","binaryPrefixes","base1000","order","floor","log","min","readableFormat","relativeSize","pow","parseFloat","toLocaleString","forceBinary","toLocaleLowerCase","replaceAll","decimalString","round","k","g","p","util$3","nameStartChar","nameRegexp","regexName","isExist","isEmptyObject","merge","arrayMode","getValue","isName","string","getAllMatches","allmatches","startIndex","lastIndex","OptionsBuilder","defaultOptions$1","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","allowBooleanAttributes","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","tagName","attributeValueProcessor","attrName","stopNodes","alwaysCreateTextNode","commentPropName","unpairedTags","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","jPath","buildOptions","defaultOptions","node2json","compress","text","compressedObj","tagObj","property","propName$1","newJpath","isLeaf","isLeafTag","assignAttributes","attrMap","jpath","atrrName","propCount","prettify","arrToStr","indentation","xmlStr","isPreviousElementTag","propName","newJPath","tagText","isStopNode","replaceEntitiesValue","attStr2","attr_to_str","tempInd","piTextNodeName","newIdentation","indentBy","tagStart","tagValue","suppressUnpairedNode","suppressEmptyNode","endsWith","attrStr","attr","attrVal","suppressBooleanAttributes","lastIndexOf","textValue","entities","entity","buildFromOrderedJs","jArray","format","oneListGroup","Builder","isAttribute","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","j2x","buildTextValNode","buildObjectNode","jObj","arrayNodeName","buildAttrPairStr","newval","arrLen","listTagVal","item","Ks","L","closeTag","tagEndExp","piClosingChar","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","module","loaded","__webpack_modules__","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","r","getter","definition","o","enumerable","f","chunkId","all","reduce","promises","u","globalThis","Function","done","script","needAttach","scripts","getElementsByTagName","s","createElement","charset","timeout","setAttribute","src","onScriptComplete","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","head","appendChild","nmd","paths","scriptUrl","importScripts","currentScript","baseURI","self","installedChunks","installedChunkData","promise","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
|