You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/dist/core-main.js.map

1 line
473 KiB
Plaintext

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

{"version":3,"file":"core-main.js?v=df4ca77b8342007d2532","mappings":";gBAAIA,8hBC4BEC,EAAgB,CAAC,EACjBC,EAAe,yBCQrB,GAECC,sBAAuB,KAEvBC,+BAAgC,KAMhCC,WAAU,SAACC,GACVC,KAAKH,+BAAiCE,CACvC,EAYAE,KAAI,SAACC,EAAMH,GACNI,EAAAA,GAAAA,WAAaD,KAEhBH,EAAWG,EACXA,OAAOE,GAGHF,GAMLA,EAAKG,MAAK,WACLC,IAAEN,MAAM,GAAGO,SACdD,IAAEN,MAAM,GAAGO,SAASC,YAEpBC,QAAQC,MAAM,+CAEXV,OAASA,KAAKJ,wBACjBI,KAAKJ,sBAAwB,KAE/B,IACIG,GACHA,EAASY,OAENX,KAAKH,gCACRG,KAAKH,kCAnBLY,QAAQC,MAAM,yHAqBhB,EAcAE,SAAQ,SAACC,EAAMC,IACdA,EAAUA,GAAW,CAAC,GACdC,QAAS,EACjBD,EAAQE,QAAYF,EAAQE,QAAqCF,EAAQE,QAAlCC,EAAAA,GACvC,IAAMC,GAAQC,EAAAA,EAAAA,IAAYN,EAAMC,GAEhC,OADAI,EAAME,aAAab,SAAWW,EACvBZ,IAAEY,EAAME,aAChB,EAYAC,KAAI,SAACC,EAAMR,IAUVA,EAAUA,GAAW,CAAC,GACdE,QAAYF,EAAQE,QAAqCF,EAAQE,QAAlCC,EAAAA,GACvC,IAAMC,GAAQC,EAAAA,EAAAA,IAXK,SAASG,GAC3B,OAAOA,EAAKC,WACVC,MAAM,KAAKC,KAAK,SAChBD,MAAM,KAAKC,KAAK,QAChBD,MAAM,KAAKC,KAAK,QAChBD,MAAM,KAAKC,KAAK,UAChBD,MAAM,KAAMC,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,GACrDyV,EAAIkxB,EAAS9nC,OAAQ4W,IACzBsyB,EAAUpB,EAASlxB,GAChB0wB,EAAoBxF,EAAEmH,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO5B,EAAoBO,EAAEllC,EAC9B,EAEI6mC,EAAqBphC,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FohC,EAAmBnhC,QAAQ8gC,EAAqB9nC,KAAK,KAAM,IAC3DmoC,EAAmB5gC,KAAOugC,EAAqB9nC,KAAK,KAAMmoC,EAAmB5gC,KAAKvH,KAAKmoC,OClDvFlC,EAAoBmC,QAAKrrC,ECGzB,IAAIsrC,EAAsBpC,EAAoBO,OAAEzpC,EAAW,CAAC,OAAO,WAAa,OAAOkpC,EAAoB,MAAQ,IACnHoC,EAAsBpC,EAAoBO,EAAE6B","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/core/src/OC/legacy-loader.js","webpack:///nextcloud/core/src/OC/notification.js","webpack:///nextcloud/core/src/OC/xhr-error.js","webpack:///nextcloud/core/src/OC/apps.js","webpack:///nextcloud/core/src/OCP/appconfig.js","webpack:///nextcloud/core/src/OC/appconfig.js","webpack:///nextcloud/core/src/OC/appswebroots.js","webpack:///nextcloud/core/src/OC/backbone-webdav.js","webpack:///nextcloud/core/src/OC/backbone.js","webpack:///nextcloud/core/src/OC/config.js","webpack:///nextcloud/core/src/OC/contactsmenu.js","webpack:///nextcloud/core/src/OC/currentuser.js","webpack:///nextcloud/core/src/OCA/search.js","webpack:///nextcloud/core/src/OCA/index.js","webpack:///nextcloud/core/src/Util/a11y.js","webpack:///nextcloud/core/src/OC/dialogs.js","webpack:///nextcloud/core/src/OC/requesttoken.js","webpack:///nextcloud/core/src/OC/eventsource.js","webpack:///nextcloud/core/src/OC/menu.js","webpack:///nextcloud/core/src/OC/constants.js","webpack:///nextcloud/core/src/OC/admin.js","webpack:///nextcloud/core/src/OC/l10n-registry.js","webpack:///nextcloud/core/src/OC/l10n.js","webpack:///nextcloud/core/src/OC/msg.js","webpack:///nextcloud/core/src/OC/password-confirmation.js","webpack:///nextcloud/core/src/OC/theme.js","webpack:///nextcloud/core/src/OC/util-history.js","webpack:///nextcloud/core/src/OC/util.js","webpack:///nextcloud/core/src/OC/debug.js","webpack:///nextcloud/core/src/OC/webroot.js","webpack:///nextcloud/core/src/OC/get_set.js","webpack:///nextcloud/core/src/OC/index.js","webpack:///nextcloud/core/src/OC/appsettings.js","webpack:///nextcloud/core/src/OC/capabilities.js","webpack:///nextcloud/core/src/OC/host.js","webpack:///nextcloud/core/src/OC/query-string.js","webpack:///nextcloud/core/src/OC/plugins.js","webpack:///nextcloud/core/src/OC/navigation.js","webpack:///nextcloud/core/src/OC/routing.js","webpack:///nextcloud/core/src/session-heartbeat.js","webpack:///nextcloud/core/src/components/AppMenu.vue","webpack:///nextcloud/core/src/components/AppMenu.vue?vue&type=script&lang=js&","webpack://nextcloud/./core/src/components/AppMenu.vue?1083","webpack://nextcloud/./core/src/components/AppMenu.vue?95cf","webpack://nextcloud/./core/src/components/AppMenu.vue?d0fd","webpack:///nextcloud/core/src/init.js","webpack:///nextcloud/core/src/Polyfill/tooltip.js","webpack:///nextcloud/core/src/components/UserMenu.js","webpack:///nextcloud/core/src/components/MainMenu.js","webpack:///nextcloud/core/src/components/ContactsMenu.js","webpack:///nextcloud/core/src/OCP/comments.js","webpack:///nextcloud/core/src/OCP/whatsnew.js","webpack:///nextcloud/core/src/OCP/accessibility.js","webpack:///nextcloud/core/src/globals.js","webpack:///nextcloud/core/src/OCP/collaboration.js","webpack:///nextcloud/core/src/OCP/loader.js","webpack:///nextcloud/core/src/OCP/toast.js","webpack:///nextcloud/core/src/OCP/index.js","webpack:///nextcloud/core/src/jquery/avatar.js","webpack:///nextcloud/core/src/jquery/contactsmenu.js","webpack:///nextcloud/core/src/jquery/exists.js","webpack:///nextcloud/core/src/jquery/filterattr.js","webpack:///nextcloud/core/src/jquery/ocdialog.js","webpack:///nextcloud/core/src/jquery/octemplate.js","webpack:///nextcloud/core/src/jquery/placeholder.js","webpack:///nextcloud/core/src/jquery/requesttoken.js","webpack:///nextcloud/core/src/jquery/selectrange.js","webpack:///nextcloud/core/src/jquery/showpassword.js","webpack:///nextcloud/core/src/jquery/ui-fixes.js","webpack://nextcloud/./core/src/jquery/css/jquery-ui-fixes.scss?a4c2","webpack://nextcloud/./core/src/jquery/css/jquery.ocdialog.scss?5718","webpack:///nextcloud/core/src/jquery/index.js","webpack:///nextcloud/core/src/main.js","webpack:///nextcloud/core/src/jquery/css/jquery-ui-fixes.scss","webpack:///nextcloud/core/src/jquery/css/jquery.ocdialog.scss","webpack:///nextcloud/core/src/components/AppMenu.vue?vue&type=style&index=0&id=93b7dca4&prod&lang=scss&scoped=true&","webpack:///nextcloud/core/src/OC/contactsmenu/contact.handlebars","webpack:///nextcloud/core/src/OC/contactsmenu/error.handlebars","webpack:///nextcloud/core/src/OC/contactsmenu/list.handlebars","webpack:///nextcloud/core/src/OC/contactsmenu/loading.handlebars","webpack:///nextcloud/core/src/OC/contactsmenu/menu.handlebars","webpack:///nextcloud/core/src/jquery/contactsmenu/jquery_entry.handlebars","webpack:///nextcloud/node_modules/moment/locale|sync|/^\\.\\/.*$","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","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/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(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(function(key) { return __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};","/**\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 * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\n/** @typedef {import('jquery')} jQuery */\nimport $ from 'jquery'\nimport { generateFilePath } from '@nextcloud/router'\n\nconst loadedScripts = {}\nconst loadedStyles = []\n\n/**\n * Load a script for the server and load it. If the script is already loaded,\n * the event handler will be called directly\n *\n * @param {string} app the app id to which the script belongs\n * @param {string} script the filename of the script\n * @param {Function} ready event handler to be called when the script is loaded\n * @return {jQuery.Deferred}\n * @deprecated 16.0.0 Use OCP.Loader.loadScript\n */\nexport const addScript = (app, script, ready) => {\n\tconsole.warn('OC.addScript is deprecated, use OCP.Loader.loadScript instead')\n\n\tlet deferred\n\tconst path = generateFilePath(app, 'js', script + '.js')\n\tif (!loadedScripts[path]) {\n\t\tdeferred = $.Deferred()\n\t\t$.getScript(path, () => deferred.resolve())\n\t\tloadedScripts[path] = deferred\n\t} else {\n\t\tif (ready) {\n\t\t\tready()\n\t\t}\n\t}\n\treturn loadedScripts[path]\n}\n\n/**\n * Loads a CSS file\n *\n * @param {string} app the app id to which the css style belongs\n * @param {string} style the filename of the css file\n * @deprecated 16.0.0 Use OCP.Loader.loadStylesheet\n */\nexport const addStyle = (app, style) => {\n\tconsole.warn('OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead')\n\n\tconst path = generateFilePath(app, 'css', style + '.css')\n\tif (loadedStyles.indexOf(path) === -1) {\n\t\tloadedStyles.push(path)\n\t\tif (document.createStyleSheet) {\n\t\t\tdocument.createStyleSheet(path)\n\t\t} else {\n\t\t\tstyle = $('<link rel=\"stylesheet\" type=\"text/css\" href=\"' + path + '\"/>')\n\t\t\t$('head').append(style)\n\t\t}\n\t}\n}\n","/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Daniel Calviño Sánchez <danxuliu@gmail.com>\n * @author Joas Schilling <coding@schilljs.com>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author npmbuildbot[bot] \"npmbuildbot[bot]@users.noreply.github.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 */\n\nimport _ from 'underscore'\n/** @typedef {import('jquery')} jQuery */\nimport $ from 'jquery'\nimport { showMessage, TOAST_DEFAULT_TIMEOUT, TOAST_PERMANENT_TIMEOUT } from '@nextcloud/dialogs'\n\n/**\n * @todo Write documentation\n * @deprecated 17.0.0 use the `@nextcloud/dialogs` package instead\n * @namespace OC.Notification\n */\nexport default {\n\n\tupdatableNotification: null,\n\n\tgetDefaultNotificationFunction: null,\n\n\t/**\n\t * @param {Function} callback callback function\n\t * @deprecated 17.0.0 use the `@nextcloud/dialogs` package\n\t */\n\tsetDefault(callback) {\n\t\tthis.getDefaultNotificationFunction = callback\n\t},\n\n\t/**\n\t * Hides a notification.\n\t *\n\t * If a row is given, only hide that one.\n\t * If no row is given, hide all notifications.\n\t *\n\t * @param {jQuery} [$row] notification row\n\t * @param {Function} [callback] callback\n\t * @deprecated 17.0.0 use the `@nextcloud/dialogs` package\n\t */\n\thide($row, callback) {\n\t\tif (_.isFunction($row)) {\n\t\t\t// first arg is the callback\n\t\t\tcallback = $row\n\t\t\t$row = undefined\n\t\t}\n\n\t\tif (!$row) {\n\t\t\tconsole.error('Missing argument $row in OC.Notification.hide() call, caller needs to be adjusted to only dismiss its own notification')\n\t\t\treturn\n\t\t}\n\n\t\t// remove the row directly\n\t\t$row.each(function() {\n\t\t\tif ($(this)[0].toastify) {\n\t\t\t\t$(this)[0].toastify.hideToast()\n\t\t\t} else {\n\t\t\t\tconsole.error('cannot hide toast because object is not set')\n\t\t\t}\n\t\t\tif (this === this.updatableNotification) {\n\t\t\t\tthis.updatableNotification = null\n\t\t\t}\n\t\t})\n\t\tif (callback) {\n\t\t\tcallback.call()\n\t\t}\n\t\tif (this.getDefaultNotificationFunction) {\n\t\t\tthis.getDefaultNotificationFunction()\n\t\t}\n\t},\n\n\t/**\n\t * Shows a notification as HTML without being sanitized before.\n\t * If you pass unsanitized user input this may lead to a XSS vulnerability.\n\t * Consider using show() instead of showHTML()\n\t *\n\t * @param {string} html Message to display\n\t * @param {object} [options] options\n\t * @param {string} [options.type] notification type\n\t * @param {number} [options.timeout=0] timeout value, defaults to 0 (permanent)\n\t * @return {jQuery} jQuery element for notification row\n\t * @deprecated 17.0.0 use the `@nextcloud/dialogs` package\n\t */\n\tshowHtml(html, options) {\n\t\toptions = options || {}\n\t\toptions.isHTML = true\n\t\toptions.timeout = (!options.timeout) ? TOAST_PERMANENT_TIMEOUT : options.timeout\n\t\tconst toast = showMessage(html, options)\n\t\ttoast.toastElement.toastify = toast\n\t\treturn $(toast.toastElement)\n\t},\n\n\t/**\n\t * Shows a sanitized notification\n\t *\n\t * @param {string} text Message to display\n\t * @param {object} [options] options\n\t * @param {string} [options.type] notification type\n\t * @param {number} [options.timeout=0] timeout value, defaults to 0 (permanent)\n\t * @return {jQuery} jQuery element for notification row\n\t * @deprecated 17.0.0 use the `@nextcloud/dialogs` package\n\t */\n\tshow(text, options) {\n\t\tconst escapeHTML = function(text) {\n\t\t\treturn text.toString()\n\t\t\t\t.split('&').join('&amp;')\n\t\t\t\t.split('<').join('&lt;')\n\t\t\t\t.split('>').join('&gt;')\n\t\t\t\t.split('\"').join('&quot;')\n\t\t\t\t.split('\\'').join('&#039;')\n\t\t}\n\n\t\toptions = options || {}\n\t\toptions.timeout = (!options.timeout) ? TOAST_PERMANENT_TIMEOUT : options.timeout\n\t\tconst toast = showMessage(escapeHTML(text), options)\n\t\ttoast.toastElement.toastify = toast\n\t\treturn $(toast.toastElement)\n\t},\n\n\t/**\n\t * Updates (replaces) a sanitized notification.\n\t *\n\t * @param {string} text Message to display\n\t * @return {jQuery} JQuery element for notificaiton row\n\t * @deprecated 17.0.0 use the `@nextcloud/dialogs` package\n\t */\n\tshowUpdate(text) {\n\t\tif (this.updatableNotification) {\n\t\t\tthis.updatableNotification.hideToast()\n\t\t}\n\t\tthis.updatableNotification = showMessage(text, { timeout: TOAST_PERMANENT_TIMEOUT })\n\t\tthis.updatableNotification.toastElement.toastify = this.updatableNotification\n\t\treturn $(this.updatableNotification.toastElement)\n\t},\n\n\t/**\n\t * Shows a notification that disappears after x seconds, default is\n\t * 7 seconds\n\t *\n\t * @param {string} text Message to show\n\t * @param {Array} [options] options array\n\t * @param {number} [options.timeout=7] timeout in seconds, if this is 0 it will show the message permanently\n\t * @param {boolean} [options.isHTML=false] an indicator for HTML notifications (true) or text (false)\n\t * @param {string} [options.type] notification type\n\t * @return {JQuery} the toast element\n\t * @deprecated 17.0.0 use the `@nextcloud/dialogs` package\n\t */\n\tshowTemporary(text, options) {\n\t\toptions = options || {}\n\t\toptions.timeout = options.timeout || TOAST_DEFAULT_TIMEOUT\n\t\tconst toast = showMessage(text, options)\n\t\ttoast.toastElement.toastify = toast\n\t\treturn $(toast.toastElement)\n\t},\n\n\t/**\n\t * Returns whether a notification is hidden.\n\t *\n\t * @return {boolean}\n\t * @deprecated 17.0.0 use the `@nextcloud/dialogs` package\n\t */\n\tisHidden() {\n\t\treturn !$('#content').find('.toastify').length\n\t},\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 */\n\nimport _ from 'underscore'\nimport $ from 'jquery'\n\nimport OC from './index'\nimport Notification from './notification'\n\n/**\n * Warn users that the connection to the server was lost temporarily\n *\n * This function is throttled to prevent stacked notfications.\n * After 7sec the first notification is gone, then we can show another one\n * if necessary.\n */\nexport const ajaxConnectionLostHandler = _.throttle(() => {\n\tNotification.showTemporary(t('core', 'Connection to server lost'))\n}, 7 * 1000, { trailing: false })\n\n/**\n * Process ajax error, redirects to main page\n * if an error/auth error status was returned.\n *\n * @param {XMLHttpRequest} xhr xhr request\n */\nexport const processAjaxError = xhr => {\n\t// purposefully aborted request ?\n\t// OC._userIsNavigatingAway needed to distinguish ajax calls cancelled by navigating away\n\t// from calls cancelled by failed cross-domain ajax due to SSO redirect\n\tif (xhr.status === 0 && (xhr.statusText === 'abort' || xhr.statusText === 'timeout' || OC._reloadCalled)) {\n\t\treturn\n\t}\n\n\tif (_.contains([302, 303, 307, 401], xhr.status) && OC.currentUser) {\n\t\t// sometimes \"beforeunload\" happens later, so need to defer the reload a bit\n\t\tsetTimeout(function() {\n\t\t\tif (!OC._userIsNavigatingAway && !OC._reloadCalled) {\n\t\t\t\tlet timer = 0\n\t\t\t\tconst seconds = 5\n\t\t\t\tconst interval = setInterval(function() {\n\t\t\t\t\tNotification.showUpdate(n('core', 'Problem loading page, reloading in %n second', 'Problem loading page, reloading in %n seconds', seconds - timer))\n\t\t\t\t\tif (timer >= seconds) {\n\t\t\t\t\t\tclearInterval(interval)\n\t\t\t\t\t\tOC.reload()\n\t\t\t\t\t}\n\t\t\t\t\ttimer++\n\t\t\t\t}, 1000 // 1 second interval\n\t\t\t\t)\n\n\t\t\t\t// only call reload once\n\t\t\t\tOC._reloadCalled = true\n\t\t\t}\n\t\t}, 100)\n\t} else if (xhr.status === 0) {\n\t\t// Connection lost (e.g. WiFi disconnected or server is down)\n\t\tsetTimeout(function() {\n\t\t\tif (!OC._userIsNavigatingAway && !OC._reloadCalled) {\n\t\t\t\t// TODO: call method above directly\n\t\t\t\tOC._ajaxConnectionLostHandler()\n\t\t\t}\n\t\t}, 100)\n\t}\n}\n\n/**\n * Registers XmlHttpRequest object for global error processing.\n *\n * This means that if this XHR object returns 401 or session timeout errors,\n * the current page will automatically be reloaded.\n *\n * @param {XMLHttpRequest} xhr xhr request\n */\nexport const registerXHRForErrorProcessing = xhr => {\n\tconst loadCallback = () => {\n\t\tif (xhr.readyState !== 4) {\n\t\t\treturn\n\t\t}\n\n\t\tif ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304) {\n\t\t\treturn\n\t\t}\n\n\t\t// fire jquery global ajax error handler\n\t\t$(document).trigger(new $.Event('ajaxError'), xhr)\n\t}\n\n\tconst errorCallback = () => {\n\t\t// fire jquery global ajax error handler\n\t\t$(document).trigger(new $.Event('ajaxError'), xhr)\n\t}\n\n\tif (xhr.addEventListener) {\n\t\txhr.addEventListener('load', loadCallback)\n\t\txhr.addEventListener('error', errorCallback)\n\t}\n\n}\n","/**\n * @copyright Bernhard Posselt 2014\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 */\n\nimport $ from 'jquery'\n\nlet dynamicSlideToggleEnabled = false\n\nconst Apps = {\n\tenableDynamicSlideToggle() {\n\t\tdynamicSlideToggleEnabled = true\n\t},\n}\n\n/**\n * Shows the #app-sidebar and add .with-app-sidebar to subsequent siblings\n *\n * @param {object} [$el] sidebar element to show, defaults to $('#app-sidebar')\n */\nApps.showAppSidebar = function($el) {\n\tconst $appSidebar = $el || $('#app-sidebar')\n\t$appSidebar.removeClass('disappear').show()\n\t$('#app-content').trigger(new $.Event('appresized'))\n}\n\n/**\n * Shows the #app-sidebar and removes .with-app-sidebar from subsequent\n * siblings\n *\n * @param {object} [$el] sidebar element to hide, defaults to $('#app-sidebar')\n */\nApps.hideAppSidebar = function($el) {\n\tconst $appSidebar = $el || $('#app-sidebar')\n\t$appSidebar.hide().addClass('disappear')\n\t$('#app-content').trigger(new $.Event('appresized'))\n}\n\n/**\n * Provides a way to slide down a target area through a button and slide it\n * up if the user clicks somewhere else. Used for the news app settings and\n * add new field.\n *\n * Usage:\n * <button data-apps-slide-toggle=\".slide-area\">slide</button>\n * <div class=\".slide-area\" class=\"hidden\">I'm sliding up</div>\n */\nexport const registerAppsSlideToggle = () => {\n\tlet buttons = $('[data-apps-slide-toggle]')\n\n\tif (buttons.length === 0) {\n\t\t$('#app-navigation').addClass('without-app-settings')\n\t}\n\n\t$(document).click(function(event) {\n\n\t\tif (dynamicSlideToggleEnabled) {\n\t\t\tbuttons = $('[data-apps-slide-toggle]')\n\t\t}\n\n\t\tbuttons.each(function(index, button) {\n\n\t\t\tconst areaSelector = $(button).data('apps-slide-toggle')\n\t\t\tconst area = $(areaSelector)\n\n\t\t\t/**\n\t\t\t *\n\t\t\t */\n\t\t\tfunction hideArea() {\n\t\t\t\tarea.slideUp(OC.menuSpeed * 4, function() {\n\t\t\t\t\tarea.trigger(new $.Event('hide'))\n\t\t\t\t})\n\t\t\t\tarea.removeClass('opened')\n\t\t\t\t$(button).removeClass('opened')\n\t\t\t}\n\n\t\t\t/**\n\t\t\t *\n\t\t\t */\n\t\t\tfunction showArea() {\n\t\t\t\tarea.slideDown(OC.menuSpeed * 4, function() {\n\t\t\t\t\tarea.trigger(new $.Event('show'))\n\t\t\t\t})\n\t\t\t\tarea.addClass('opened')\n\t\t\t\t$(button).addClass('opened')\n\t\t\t\tconst input = $(areaSelector + ' [autofocus]')\n\t\t\t\tif (input.length === 1) {\n\t\t\t\t\tinput.focus()\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// do nothing if the area is animated\n\t\t\tif (!area.is(':animated')) {\n\n\t\t\t\t// button toggles the area\n\t\t\t\tif ($(button).is($(event.target).closest('[data-apps-slide-toggle]'))) {\n\t\t\t\t\tif (area.is(':visible')) {\n\t\t\t\t\t\thideArea()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowArea()\n\t\t\t\t\t}\n\n\t\t\t\t\t// all other areas that have not been clicked but are open\n\t\t\t\t\t// should be slid up\n\t\t\t\t} else {\n\t\t\t\t\tconst closest = $(event.target).closest(areaSelector)\n\t\t\t\t\tif (area.is(':visible') && closest[0] !== area[0]) {\n\t\t\t\t\t\thideArea()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t})\n}\n\nexport default Apps\n","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\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 */\n\nimport $ from 'jquery'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nimport OC from '../OC/index'\n\n/**\n * @param {string} method 'post' or 'delete'\n * @param {string} endpoint endpoint\n * @param {object} [options] destructuring object\n * @param {object} [options.data] option data\n * @param {Function} [options.success] success callback\n * @param {Function} [options.error] error callback\n */\nfunction call(method, endpoint, options) {\n\tif ((method === 'post' || method === 'delete') && OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\tOC.PasswordConfirmation.requirePasswordConfirmation(_.bind(call, this, method, endpoint, options))\n\t\treturn\n\t}\n\n\toptions = options || {}\n\t$.ajax({\n\t\ttype: method.toUpperCase(),\n\t\turl: generateOcsUrl('apps/provisioning_api/api/v1/config/apps') + endpoint,\n\t\tdata: options.data || {},\n\t\tsuccess: options.success,\n\t\terror: options.error,\n\t})\n}\n\n/**\n * @param {object} [options] destructuring object\n * @param {Function} [options.success] success callback\n * @since 11.0.0\n */\nexport function getApps(options) {\n\tcall('get', '', options)\n}\n\n/**\n * @param {string} app app id\n * @param {object} [options] destructuring object\n * @param {Function} [options.success] success callback\n * @param {Function} [options.error] error callback\n * @since 11.0.0\n */\nexport function getKeys(app, options) {\n\tcall('get', '/' + app, options)\n}\n\n/**\n * @param {string} app app id\n * @param {string} key key\n * @param {string | Function} defaultValue default value\n * @param {object} [options] destructuring object\n * @param {Function} [options.success] success callback\n * @param {Function} [options.error] error callback\n * @since 11.0.0\n */\nexport function getValue(app, key, defaultValue, options) {\n\toptions = options || {}\n\toptions.data = {\n\t\tdefaultValue,\n\t}\n\n\tcall('get', '/' + app + '/' + key, options)\n}\n\n/**\n * @param {string} app app id\n * @param {string} key key\n * @param {string} value value\n * @param {object} [options] destructuring object\n * @param {Function} [options.success] success callback\n * @param {Function} [options.error] error callback\n * @since 11.0.0\n */\nexport function setValue(app, key, value, options) {\n\toptions = options || {}\n\toptions.data = {\n\t\tvalue,\n\t}\n\n\tcall('post', '/' + app + '/' + key, options)\n}\n\n/**\n * @param {string} app app id\n * @param {string} key key\n * @param {object} [options] destructuring object\n * @param {Function} [options.success] success callback\n * @param {Function} [options.error] error callback\n * @since 11.0.0\n */\nexport function deleteKey(app, key, options) {\n\tcall('delete', '/' + app + '/' + key, options)\n}\n","/**\n * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Joas Schilling <coding@schilljs.com>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Jörn Friedrich Dreyer <jfd@butonic.de>\n * @author Robin Appelman <robin@icewind.nl>\n * @author Vincent Petry <vincent@nextcloud.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 */\n\n/* eslint-disable */\n import { getValue, setValue, getApps, getKeys, deleteKey } from '../OCP/appconfig'\n\nexport const appConfig = window.oc_appconfig || {}\n\n/**\n * @namespace\n * @deprecated 16.0.0 Use OCP.AppConfig instead\n */\nexport const AppConfig = {\n\t/**\n\t * @deprecated Use OCP.AppConfig.getValue() instead\n\t */\n\tgetValue: function(app, key, defaultValue, callback) {\n\t\tgetValue(app, key, defaultValue, {\n\t\t\tsuccess: callback\n\t\t})\n\t},\n\n\t/**\n\t * @deprecated Use OCP.AppConfig.setValue() instead\n\t */\n\tsetValue: function(app, key, value) {\n\t\tsetValue(app, key, value)\n\t},\n\n\t/**\n\t * @deprecated Use OCP.AppConfig.getApps() instead\n\t */\n\tgetApps: function(callback) {\n\t\tgetApps({\n\t\t\tsuccess: callback\n\t\t})\n\t},\n\n\t/**\n\t * @deprecated Use OCP.AppConfig.getKeys() instead\n\t */\n\tgetKeys: function(app, callback) {\n\t\tgetKeys(app, {\n\t\t\tsuccess: callback\n\t\t})\n\t},\n\n\t/**\n\t * @deprecated Use OCP.AppConfig.deleteKey() instead\n\t */\n\tdeleteKey: function(app, key) {\n\t\tdeleteKey(app, key)\n\t}\n\n}\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 */\n\nconst appswebroots = (window._oc_appswebroots !== undefined) ? window._oc_appswebroots : false\n\nexport default appswebroots\n","/**\n * Copyright (c) 2015\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\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 */\n\n/* eslint-disable */\nimport _ from 'underscore'\nimport { dav } from 'davclient.js'\n\nconst methodMap = {\n\tcreate: 'POST',\n\tupdate: 'PROPPATCH',\n\tpatch: 'PROPPATCH',\n\tdelete: 'DELETE',\n\tread: 'PROPFIND'\n}\n\n// Throw an error when a URL is needed, and none is supplied.\nfunction urlError() {\n\tthrow new Error('A \"url\" property or function must be specified')\n}\n\n/**\n * Convert a single propfind result to JSON\n *\n * @param {Object} result\n * @param {Object} davProperties properties mapping\n */\nfunction parsePropFindResult(result, davProperties) {\n\tif (_.isArray(result)) {\n\t\treturn _.map(result, function(subResult) {\n\t\t\treturn parsePropFindResult(subResult, davProperties)\n\t\t})\n\t}\n\tvar props = {\n\t\thref: result.href\n\t}\n\n\t_.each(result.propStat, function(propStat) {\n\t\tif (propStat.status !== 'HTTP/1.1 200 OK') {\n\t\t\treturn\n\t\t}\n\n\t\tfor (var key in propStat.properties) {\n\t\t\tvar propKey = key\n\t\t\tif (key in davProperties) {\n\t\t\t\tpropKey = davProperties[key]\n\t\t\t}\n\t\t\tprops[propKey] = propStat.properties[key]\n\t\t}\n\t})\n\n\tif (!props.id) {\n\t\t// parse id from href\n\t\tprops.id = parseIdFromLocation(props.href)\n\t}\n\n\treturn props\n}\n\n/**\n * Parse ID from location\n *\n * @param {string} url url\n * @returns {string} id\n */\nfunction parseIdFromLocation(url) {\n\tvar queryPos = url.indexOf('?')\n\tif (queryPos > 0) {\n\t\turl = url.substr(0, queryPos)\n\t}\n\n\tvar parts = url.split('/')\n\tvar result\n\tdo {\n\t\tresult = parts[parts.length - 1]\n\t\tparts.pop()\n\t\t// note: first result can be empty when there is a trailing slash,\n\t\t// so we take the part before that\n\t} while (!result && parts.length > 0)\n\n\treturn result\n}\n\nfunction isSuccessStatus(status) {\n\treturn status >= 200 && status <= 299\n}\n\nfunction convertModelAttributesToDavProperties(attrs, davProperties) {\n\tvar props = {}\n\tvar key\n\tfor (key in attrs) {\n\t\tvar changedProp = davProperties[key]\n\t\tvar value = attrs[key]\n\t\tif (!changedProp) {\n\t\t\tconsole.warn('No matching DAV property for property \"' + key)\n\t\t\tchangedProp = key\n\t\t}\n\t\tif (_.isBoolean(value) || _.isNumber(value)) {\n\t\t\t// convert to string\n\t\t\tvalue = '' + value\n\t\t}\n\t\tprops[changedProp] = value\n\t}\n\treturn props\n}\n\nfunction callPropFind(client, options, model, headers) {\n\treturn client.propFind(\n\t\toptions.url,\n\t\t_.values(options.davProperties) || [],\n\t\toptions.depth,\n\t\theaders\n\t).then(function(response) {\n\t\tif (isSuccessStatus(response.status)) {\n\t\t\tif (_.isFunction(options.success)) {\n\t\t\t\tvar propsMapping = _.invert(options.davProperties)\n\t\t\t\tvar results = parsePropFindResult(response.body, propsMapping)\n\t\t\t\tif (options.depth > 0) {\n\t\t\t\t\t// discard root entry\n\t\t\t\t\tresults.shift()\n\t\t\t\t}\n\n\t\t\t\toptions.success(results)\n\n\t\t\t}\n\t\t} else if (_.isFunction(options.error)) {\n\t\t\toptions.error(response)\n\t\t}\n\t})\n}\n\nfunction callPropPatch(client, options, model, headers) {\n\treturn client.propPatch(\n\t\toptions.url,\n\t\tconvertModelAttributesToDavProperties(model.changed, options.davProperties),\n\t\theaders\n\t).then(function(result) {\n\t\tif (isSuccessStatus(result.status)) {\n\t\t\tif (_.isFunction(options.success)) {\n\t\t\t\t// pass the object's own values because the server\n\t\t\t\t// does not return the updated model\n\t\t\t\toptions.success(model.toJSON())\n\t\t\t}\n\t\t} else if (_.isFunction(options.error)) {\n\t\t\toptions.error(result)\n\t\t}\n\t})\n\n}\n\nfunction callMkCol(client, options, model, headers) {\n\t// call MKCOL without data, followed by PROPPATCH\n\treturn client.request(\n\t\toptions.type,\n\t\toptions.url,\n\t\theaders,\n\t\tnull\n\t).then(function(result) {\n\t\tif (!isSuccessStatus(result.status)) {\n\t\t\tif (_.isFunction(options.error)) {\n\t\t\t\toptions.error(result)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tcallPropPatch(client, options, model, headers)\n\t})\n}\n\nfunction callMethod(client, options, model, headers) {\n\theaders['Content-Type'] = 'application/json'\n\treturn client.request(\n\t\toptions.type,\n\t\toptions.url,\n\t\theaders,\n\t\toptions.data\n\t).then(function(result) {\n\t\tif (!isSuccessStatus(result.status)) {\n\t\t\tif (_.isFunction(options.error)) {\n\t\t\t\toptions.error(result)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tif (_.isFunction(options.success)) {\n\t\t\tif (options.type === 'PUT' || options.type === 'POST' || options.type === 'MKCOL') {\n\t\t\t\t// pass the object's own values because the server\n\t\t\t\t// does not return anything\n\t\t\t\tvar responseJson = result.body || model.toJSON()\n\t\t\t\tvar locationHeader = result.xhr.getResponseHeader('Content-Location')\n\t\t\t\tif (options.type === 'POST' && locationHeader) {\n\t\t\t\t\tresponseJson.id = parseIdFromLocation(locationHeader)\n\t\t\t\t}\n\t\t\t\toptions.success(responseJson)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// if multi-status, parse\n\t\t\tif (result.status === 207) {\n\t\t\t\tvar propsMapping = _.invert(options.davProperties)\n\t\t\t\toptions.success(parsePropFindResult(result.body, propsMapping))\n\t\t\t} else {\n\t\t\t\toptions.success(result.body)\n\t\t\t}\n\t\t}\n\t})\n}\n\nexport const davCall = (options, model) => {\n\tvar client = new dav.Client({\n\t\tbaseUrl: options.url,\n\t\txmlNamespaces: _.extend({\n\t\t\t'DAV:': 'd',\n\t\t\t'http://owncloud.org/ns': 'oc'\n\t\t}, options.xmlNamespaces || {})\n\t})\n\tclient.resolveUrl = function() {\n\t\treturn options.url\n\t}\n\tvar headers = _.extend({\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t'requesttoken': OC.requestToken\n\t}, options.headers)\n\tif (options.type === 'PROPFIND') {\n\t\treturn callPropFind(client, options, model, headers)\n\t} else if (options.type === 'PROPPATCH') {\n\t\treturn callPropPatch(client, options, model, headers)\n\t} else if (options.type === 'MKCOL') {\n\t\treturn callMkCol(client, options, model, headers)\n\t} else {\n\t\treturn callMethod(client, options, model, headers)\n\t}\n}\n\n/**\n * DAV transport\n */\nexport const davSync = Backbone => (method, model, options) => {\n\tvar params = { type: methodMap[method] || method }\n\tvar isCollection = (model instanceof Backbone.Collection)\n\n\tif (method === 'update') {\n\t\t// if a model has an inner collection, it must define an\n\t\t// attribute \"hasInnerCollection\" that evaluates to true\n\t\tif (model.hasInnerCollection) {\n\t\t\t// if the model itself is a Webdav collection, use MKCOL\n\t\t\tparams.type = 'MKCOL'\n\t\t} else if (model.usePUT || (model.collection && model.collection.usePUT)) {\n\t\t\t// use PUT instead of PROPPATCH\n\t\t\tparams.type = 'PUT'\n\t\t}\n\t}\n\n\t// Ensure that we have a URL.\n\tif (!options.url) {\n\t\tparams.url = _.result(model, 'url') || urlError()\n\t}\n\n\t// Ensure that we have the appropriate request data.\n\tif (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {\n\t\tparams.data = JSON.stringify(options.attrs || model.toJSON(options))\n\t}\n\n\t// Don't process data on a non-GET request.\n\tif (params.type !== 'PROPFIND') {\n\t\tparams.processData = false\n\t}\n\n\tif (params.type === 'PROPFIND' || params.type === 'PROPPATCH') {\n\t\tvar davProperties = model.davProperties\n\t\tif (!davProperties && model.model) {\n\t\t\t// use dav properties from model in case of collection\n\t\t\tdavProperties = model.model.prototype.davProperties\n\t\t}\n\t\tif (davProperties) {\n\t\t\tif (_.isFunction(davProperties)) {\n\t\t\t\tparams.davProperties = davProperties.call(model)\n\t\t\t} else {\n\t\t\t\tparams.davProperties = davProperties\n\t\t\t}\n\t\t}\n\n\t\tparams.davProperties = _.extend(params.davProperties || {}, options.davProperties)\n\n\t\tif (_.isUndefined(options.depth)) {\n\t\t\tif (isCollection) {\n\t\t\t\toptions.depth = 1\n\t\t\t} else {\n\t\t\t\toptions.depth = 0\n\t\t\t}\n\t\t}\n\t}\n\n\t// Pass along `textStatus` and `errorThrown` from jQuery.\n\tvar error = options.error\n\toptions.error = function(xhr, textStatus, errorThrown) {\n\t\toptions.textStatus = textStatus\n\t\toptions.errorThrown = errorThrown\n\t\tif (error) {\n\t\t\terror.call(options.context, xhr, textStatus, errorThrown)\n\t\t}\n\t}\n\n\t// Make the request, allowing the user to override any Ajax options.\n\tvar xhr = options.xhr = Backbone.davCall(_.extend(params, options), model)\n\tmodel.trigger('request', model, xhr, options)\n\treturn xhr\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 */\n\nimport VendorBackbone from 'backbone'\nimport { davCall, davSync } from './backbone-webdav'\n\nconst Backbone = VendorBackbone.noConflict()\n\n// Patch Backbone for DAV\nObject.assign(Backbone, {\n\tdavCall,\n\tdavSync: davSync(Backbone),\n})\n\nexport default Backbone\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 */\n\nconst config = window._oc_config || {}\n\nexport default config\n","/**\n * @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\n/* eslint-disable */\nimport _ from 'underscore'\nimport $ from 'jquery'\nimport { Collection, Model, View } from 'backbone'\n\nimport OC from './index'\n\n/**\n * @class Contact\n */\nconst Contact = Model.extend({\n\tdefaults: {\n\t\tfullName: '',\n\t\tlastMessage: '',\n\t\tactions: [],\n\t\thasOneAction: false,\n\t\thasTwoActions: false,\n\t\thasManyActions: false\n\t},\n\n\t/**\n\t * @returns {undefined}\n\t */\n\tinitialize: function() {\n\t\t// Add needed property for easier template rendering\n\t\tif (this.get('actions').length === 0) {\n\t\t\tthis.set('hasOneAction', true)\n\t\t} else if (this.get('actions').length === 1) {\n\t\t\tthis.set('hasTwoActions', true)\n\t\t\tthis.set('secondAction', this.get('actions')[0])\n\t\t} else {\n\t\t\tthis.set('hasManyActions', true)\n\t\t}\n\t}\n})\n\n/**\n * @class ContactCollection\n * @private\n */\nconst ContactCollection = Collection.extend({\n\tmodel: Contact\n})\n\n/**\n * @class ContactsListView\n * @private\n */\nconst ContactsListView = View.extend({\n\n\t/** @type {ContactCollection} */\n\t_collection: undefined,\n\n\t/** @type {array} */\n\t_subViews: [],\n\n\t/**\n\t * @param {object} options\n\t * @returns {undefined}\n\t */\n\tinitialize: function(options) {\n\t\tthis._collection = options.collection\n\t},\n\n\t/**\n\t * @returns {self}\n\t */\n\trender: function() {\n\t\tvar self = this\n\t\tself.$el.html('')\n\t\tself._subViews = []\n\n\t\tself._collection.forEach(function(contact) {\n\t\t\tvar item = new ContactsListItemView({\n\t\t\t\tmodel: contact\n\t\t\t})\n\t\t\titem.render()\n\t\t\tself.$el.append(item.$el)\n\t\t\titem.on('toggle:actionmenu', self._onChildActionMenuToggle, self)\n\t\t\tself._subViews.push(item)\n\t\t})\n\n\t\treturn self\n\t},\n\n\t/**\n\t * Event callback to propagate opening (another) entry's action menu\n\t *\n\t * @param {type} $src\n\t * @returns {undefined}\n\t */\n\t_onChildActionMenuToggle: function($src) {\n\t\tthis._subViews.forEach(function(view) {\n\t\t\tview.trigger('parent:toggle:actionmenu', $src)\n\t\t})\n\t}\n})\n\n/**\n * @class ContactsListItemView\n * @private\n */\nconst ContactsListItemView = View.extend({\n\n\t/** @type {string} */\n\tclassName: 'contact',\n\n\t/** @type {undefined|function} */\n\t_template: undefined,\n\n\t/** @type {Contact} */\n\t_model: undefined,\n\n\t/** @type {boolean} */\n\t_actionMenuShown: false,\n\n\tevents: {\n\t\t'click .icon-more': '_onToggleActionsMenu'\n\t},\n\n\tcontactTemplate: require('./contactsmenu/contact.handlebars'),\n\n\t/**\n\t * @param {object} data\n\t * @returns {undefined}\n\t */\n\ttemplate: function(data) {\n\t\treturn this.contactTemplate(data)\n\t},\n\n\t/**\n\t * @param {object} options\n\t * @returns {undefined}\n\t */\n\tinitialize: function(options) {\n\t\tthis._model = options.model\n\t\tthis.on('parent:toggle:actionmenu', this._onOtherActionMenuOpened, this)\n\t},\n\n\t/**\n\t * @returns {self}\n\t */\n\trender: function() {\n\t\tthis.$el.html(this.template({\n\t\t\tcontact: this._model.toJSON()\n\t\t}))\n\t\tthis.delegateEvents()\n\n\t\t// Show placeholder if no avatar is available (avatar is rendered as img, not div)\n\t\tthis.$('div.avatar').imageplaceholder(this._model.get('fullName'))\n\n\t\t// Show tooltip for top action\n\t\tthis.$('.top-action').tooltip({ placement: 'left' })\n\t\t// Show tooltip for second action\n\t\tthis.$('.second-action').tooltip({ placement: 'left' })\n\n\t\treturn this\n\t},\n\n\t/**\n\t * Toggle the visibility of the action popover menu\n\t *\n\t * @private\n\t * @returns {undefined}\n\t */\n\t_onToggleActionsMenu: function() {\n\t\tthis._actionMenuShown = !this._actionMenuShown\n\t\tif (this._actionMenuShown) {\n\t\t\tthis.$('.menu').show()\n\t\t} else {\n\t\t\tthis.$('.menu').hide()\n\t\t}\n\t\tthis.trigger('toggle:actionmenu', this.$el)\n\t},\n\n\t/**\n\t * @private\n\t * @argument {jQuery} $src\n\t * @returns {undefined}\n\t */\n\t_onOtherActionMenuOpened: function($src) {\n\t\tif (this.$el.is($src)) {\n\t\t\t// Ignore\n\t\t\treturn\n\t\t}\n\t\tthis._actionMenuShown = false\n\t\tthis.$('.menu').hide()\n\t}\n})\n\n/**\n * @class ContactsMenuView\n * @private\n */\nconst ContactsMenuView = View.extend({\n\n\t/** @type {undefined|function} */\n\t_loadingTemplate: undefined,\n\n\t/** @type {undefined|function} */\n\t_errorTemplate: undefined,\n\n\t/** @type {undefined|function} */\n\t_contentTemplate: undefined,\n\n\t/** @type {undefined|function} */\n\t_contactsTemplate: undefined,\n\n\t/** @type {undefined|ContactCollection} */\n\t_contacts: undefined,\n\n\t/** @type {string} */\n\t_searchTerm: '',\n\n\tevents: {\n\t\t'input #contactsmenu-search': '_onSearch'\n\t},\n\n\ttemplates: {\n\t\tloading: require('./contactsmenu/loading.handlebars'),\n\t\terror: require('./contactsmenu/error.handlebars'),\n\t\tmenu: require('./contactsmenu/menu.handlebars'),\n\t\tlist: require('./contactsmenu/list.handlebars')\n\t},\n\n\t/**\n\t * @returns {undefined}\n\t */\n\t_onSearch: _.debounce(function(e) {\n\t\tvar searchTerm = this.$('#contactsmenu-search').val()\n\t\t// IE11 triggers an 'input' event after the view has been rendered\n\t\t// resulting in an endless loading loop. To prevent this, we remember\n\t\t// the last search term to savely ignore some events\n\t\t// See https://github.com/nextcloud/server/issues/5281\n\t\tif (searchTerm !== this._searchTerm) {\n\t\t\tthis.trigger('search', this.$('#contactsmenu-search').val())\n\t\t\tthis._searchTerm = searchTerm\n\t\t}\n\t}, 700),\n\n\t/**\n\t * @param {object} data\n\t * @returns {string}\n\t */\n\tloadingTemplate: function(data) {\n\t\treturn this.templates.loading(data)\n\t},\n\n\t/**\n\t * @param {object} data\n\t * @returns {string}\n\t */\n\terrorTemplate: function(data) {\n\t\treturn this.templates.error(\n\t\t\t_.extend({\n\t\t\t\tcouldNotLoadText: t('core', 'Could not load your contacts')\n\t\t\t}, data)\n\t\t)\n\t},\n\n\t/**\n\t * @param {object} data\n\t * @returns {string}\n\t */\n\tcontentTemplate: function(data) {\n\t\treturn this.templates.menu(\n\t\t\t_.extend({\n\t\t\t\tsearchContactsText: t('core', 'Search contacts …')\n\t\t\t}, data)\n\t\t)\n\t},\n\n\t/**\n\t * @param {object} data\n\t * @returns {string}\n\t */\n\tcontactsTemplate: function(data) {\n\t\treturn this.templates.list(\n\t\t\t_.extend({\n\t\t\t\tnoContactsFoundText: t('core', 'No contacts found'),\n\t\t\t\tshowAllContactsText: t('core', 'Show all contacts …'),\n\t\t\t\tcontactsAppMgmtText: t('core', 'Install the Contacts app')\n\t\t\t}, data)\n\t\t)\n\t},\n\n\t/**\n\t * @param {object} options\n\t * @returns {undefined}\n\t */\n\tinitialize: function(options) {\n\t\tthis.options = options\n\t},\n\n\t/**\n\t * @param {string} text\n\t * @returns {undefined}\n\t */\n\tshowLoading: function(text) {\n\t\tthis.render()\n\t\tthis._contacts = undefined\n\t\tthis.$('.content').html(this.loadingTemplate({\n\t\t\tloadingText: text\n\t\t}))\n\t},\n\n\t/**\n\t * @returns {undefined}\n\t */\n\tshowError: function() {\n\t\tthis.render()\n\t\tthis._contacts = undefined\n\t\tthis.$('.content').html(this.errorTemplate())\n\t},\n\n\t/**\n\t * @param {object} viewData\n\t * @param {string} searchTerm\n\t * @returns {undefined}\n\t */\n\tshowContacts: function(viewData, searchTerm) {\n\t\tthis._contacts = viewData.contacts\n\t\tthis.render({\n\t\t\tcontacts: viewData.contacts\n\t\t})\n\n\t\tvar list = new ContactsListView({\n\t\t\tcollection: viewData.contacts\n\t\t})\n\t\tlist.render()\n\t\tthis.$('.content').html(this.contactsTemplate({\n\t\t\tcontacts: viewData.contacts,\n\t\t\tsearchTerm: searchTerm,\n\t\t\tcontactsAppEnabled: viewData.contactsAppEnabled,\n\t\t\tcontactsAppURL: OC.generateUrl('/apps/contacts'),\n\t\t\tcanInstallApp: OC.isUserAdmin(),\n\t\t\tcontactsAppMgmtURL: OC.generateUrl('/settings/apps/social/contacts')\n\t\t}))\n\t\tthis.$('#contactsmenu-contacts').html(list.$el)\n\t},\n\n\t/**\n\t * @param {object} data\n\t * @returns {self}\n\t */\n\trender: function(data) {\n\t\tvar searchVal = this.$('#contactsmenu-search').val()\n\t\tthis.$el.html(this.contentTemplate(data))\n\n\t\t// Focus search\n\t\tthis.$('#contactsmenu-search').val(searchVal)\n\t\tthis.$('#contactsmenu-search').focus()\n\t\treturn this\n\t}\n\n})\n\n/**\n * @param {Object} options\n * @param {jQuery} options.el\n * @param {jQuery} options.trigger\n * @class ContactsMenu\n * @memberOf OC\n */\nconst ContactsMenu = function(options) {\n\tthis.initialize(options)\n}\n\nContactsMenu.prototype = {\n\t/** @type {jQuery} */\n\t$el: undefined,\n\n\t/** @type {jQuery} */\n\t_$trigger: undefined,\n\n\t/** @type {ContactsMenuView} */\n\t_view: undefined,\n\n\t/** @type {Promise} */\n\t_contactsPromise: undefined,\n\n\t/**\n\t * @param {Object} options\n\t * @param {jQuery} options.el - the element to render the menu in\n\t * @param {jQuery} options.trigger - the element to click on to open the menu\n\t * @returns {undefined}\n\t */\n\tinitialize: function(options) {\n\t\tthis.$el = options.el\n\t\tthis._$trigger = options.trigger\n\n\t\tthis._view = new ContactsMenuView({\n\t\t\tel: this.$el\n\t\t})\n\t\tthis._view.on('search', function(searchTerm) {\n\t\t\tthis._loadContacts(searchTerm)\n\t\t}, this)\n\n\t\tOC.registerMenu(this._$trigger, this.$el, function() {\n\t\t\tthis._toggleVisibility(true)\n\t\t}.bind(this), true)\n\t\tthis.$el.on('beforeHide', function() {\n\t\t\tthis._toggleVisibility(false)\n\t\t}.bind(this))\n\t},\n\n\t/**\n\t * @private\n\t * @param {boolean} show\n\t * @returns {Promise}\n\t */\n\t_toggleVisibility: function(show) {\n\t\tif (show) {\n\t\t\treturn this._loadContacts()\n\t\t} else {\n\t\t\tthis.$el.html('')\n\t\t\treturn Promise.resolve()\n\t\t}\n\t},\n\n\t/**\n\t * @private\n\t * @param {string|undefined} searchTerm\n\t * @returns {Promise}\n\t */\n\t_getContacts: function(searchTerm) {\n\t\tvar url = OC.generateUrl('/contactsmenu/contacts')\n\t\treturn Promise.resolve($.ajax(url, {\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tfilter: searchTerm\n\t\t\t}\n\t\t}))\n\t},\n\n\t/**\n\t * @param {string|undefined} searchTerm\n\t * @returns {undefined}\n\t */\n\t_loadContacts: function(searchTerm) {\n\t\tvar self = this\n\n\t\tif (!self._contactsPromise) {\n\t\t\tself._contactsPromise = self._getContacts(searchTerm)\n\t\t}\n\n\t\tif (_.isUndefined(searchTerm) || searchTerm === '') {\n\t\t\tself._view.showLoading(t('core', 'Loading your contacts …'))\n\t\t} else {\n\t\t\tself._view.showLoading(t('core', 'Looking for {term} …', {\n\t\t\t\tterm: searchTerm\n\t\t\t}))\n\t\t}\n\t\treturn self._contactsPromise.then(function(data) {\n\t\t\t// Convert contact entries to Backbone collection\n\t\t\tdata.contacts = new ContactCollection(data.contacts)\n\n\t\t\tself._view.showContacts(data, searchTerm)\n\t\t}, function(e) {\n\t\t\tself._view.showError()\n\t\t\tconsole.error('There was an error loading your contacts', e)\n\t\t}).then(function() {\n\t\t\t// Delete promise, so that contacts are fetched again when the\n\t\t\t// menu is opened the next time.\n\t\t\tdelete self._contactsPromise\n\t\t}).catch(console.error.bind(this))\n\t}\n}\n\nexport default ContactsMenu\n","/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Joas Schilling <coding@schilljs.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 */\n\nconst rawUid = document\n\t.getElementsByTagName('head')[0]\n\t.getAttribute('data-user')\nconst displayName = document\n\t.getElementsByTagName('head')[0]\n\t.getAttribute('data-user-displayname')\n\nexport const currentUser = rawUid !== undefined ? rawUid : false\n\nexport const getCurrentUser = () => {\n\treturn {\n\t\tuid: currentUser,\n\t\tdisplayName,\n\t}\n}\n","/**\n * @copyright 2020 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 */\n\nexport default class Search {\n\n\t/**\n\t * @deprecated 20.0.0, will be removed in Nextcloud 22\n\t */\n\tconstructor() {\n\t\tconsole.warn('OCA.Search is deprecated. Please use the unified search API instead')\n\t}\n\n}\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 */\n\nimport Search from './search'\n\n/**\n * Namespace for apps\n *\n * @namespace OCA\n */\nexport default {\n\t/**\n\t * @deprecated 20.0.0, will be removed in Nextcloud 22\n\t */\n\tSearch,\n}\n","/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.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 */\n\n/**\n * Return whether the DOM event is an accessible mouse or keyboard element activation\n *\n * @param {Event} event DOM event\n *\n * @return {boolean}\n */\nexport const isA11yActivation = (event) => {\n\tif (event.type === 'click') {\n\t\treturn true\n\t}\n\tif (event.type === 'keydown' && event.key === 'Enter') {\n\t\treturn true\n\t}\n\treturn false\n}\n","/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n *\n * @author Bartek Przybylski <bart.p.pl@gmail.com>\n * @author Christopher Schäpers <kondou@ts.unde.re>\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Daniel Calviño Sánchez <danxuliu@gmail.com>\n * @author Daniel Kesselberg <mail@danielkesselberg.de>\n * @author Florian Schunk <florian.schunk@rwth-aachen.de>\n * @author Gary Kim <gary@garykim.dev>\n * @author Hendrik Leppelsack <hendrik@leppelsack.de>\n * @author Jan-Christoph Borchardt <hey@jancborchardt.net>\n * @author Joas Schilling <coding@schilljs.com>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Jörn Friedrich Dreyer <jfd@butonic.de>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Loïc Hermann <loic.hermann@sciam.fr>\n * @author Morris Jobke <hey@morrisjobke.de>\n * @author Olivier Paroz <github@oparoz.com>\n * @author Robin Appelman <robin@icewind.nl>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n * @author Sujith Haridasan <Sujith_Haridasan@mentor.com>\n * @author Thomas Citharel <nextcloud@tcit.fr>\n * @author Thomas Müller <thomas.mueller@tmit.eu>\n * @author Thomas Tanghus <thomas@tanghus.net>\n * @author Vincent Petry <vincent@nextcloud.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 */\n\n/* eslint-disable */\nimport _ from 'underscore'\nimport $ from 'jquery'\n\nimport OC from './index'\nimport OCA from '../OCA/index'\nimport { isA11yActivation } from '../Util/a11y'\n\n/**\n * this class to ease the usage of jquery dialogs\n */\nconst Dialogs = {\n\t// dialog button types\n\tYES_NO_BUTTONS: 70,\n\tOK_BUTTONS: 71,\n\n\tFILEPICKER_TYPE_CHOOSE: 1,\n\tFILEPICKER_TYPE_MOVE: 2,\n\tFILEPICKER_TYPE_COPY: 3,\n\tFILEPICKER_TYPE_COPY_MOVE: 4,\n\tFILEPICKER_TYPE_CUSTOM: 5,\n\n\t// used to name each dialog\n\tdialogsCounter: 0,\n\n\t/**\n\t * displays alert dialog\n\t * @param {string} text content of dialog\n\t * @param {string} title dialog title\n\t * @param {function} callback which will be triggered when user presses OK\n\t * @param {boolean} [modal] make the dialog modal\n\t */\n\talert: function(text, title, callback, modal) {\n\t\tthis.message(\n\t\t\ttext,\n\t\t\ttitle,\n\t\t\t'alert',\n\t\t\tDialogs.OK_BUTTON,\n\t\t\tcallback,\n\t\t\tmodal\n\t\t)\n\t},\n\t/**\n\t * displays info dialog\n\t * @param {string} text content of dialog\n\t * @param {string} title dialog title\n\t * @param {function} callback which will be triggered when user presses OK\n\t * @param {boolean} [modal] make the dialog modal\n\t */\n\tinfo: function(text, title, callback, modal) {\n\t\tthis.message(text, title, 'info', Dialogs.OK_BUTTON, callback, modal)\n\t},\n\n\t/**\n\t * displays confirmation dialog\n\t * @param {string} text content of dialog\n\t * @param {string} title dialog title\n\t * @param {function} callback which will be triggered when user presses OK (true or false would be passed to callback respectively)\n\t * @param {boolean} [modal] make the dialog modal\n\t * @returns {Promise}\n\t */\n\tconfirm: function(text, title, callback, modal) {\n\t\treturn this.message(\n\t\t\ttext,\n\t\t\ttitle,\n\t\t\t'notice',\n\t\t\tDialogs.YES_NO_BUTTONS,\n\t\t\tcallback,\n\t\t\tmodal\n\t\t)\n\t},\n\t/**\n\t * displays confirmation dialog\n\t * @param {string} text content of dialog\n\t * @param {string} title dialog title\n\t * @param {(number|{type: number, confirm: string, cancel: string, confirmClasses: string})} buttons text content of buttons\n\t * @param {function} callback which will be triggered when user presses OK (true or false would be passed to callback respectively)\n\t * @param {boolean} [modal] make the dialog modal\n\t * @returns {Promise}\n\t */\n\tconfirmDestructive: function(text, title, buttons, callback, modal) {\n\t\treturn this.message(\n\t\t\ttext,\n\t\t\ttitle,\n\t\t\t'none',\n\t\t\tbuttons,\n\t\t\tcallback,\n\t\t\tmodal === undefined ? true : modal\n\t\t)\n\t},\n\t/**\n\t * displays confirmation dialog\n\t * @param {string} text content of dialog\n\t * @param {string} title dialog title\n\t * @param {function} callback which will be triggered when user presses OK (true or false would be passed to callback respectively)\n\t * @param {boolean} [modal] make the dialog modal\n\t * @returns {Promise}\n\t */\n\tconfirmHtml: function(text, title, callback, modal) {\n\t\treturn this.message(\n\t\t\ttext,\n\t\t\ttitle,\n\t\t\t'notice',\n\t\t\tDialogs.YES_NO_BUTTONS,\n\t\t\tcallback,\n\t\t\tmodal,\n\t\t\ttrue\n\t\t)\n\t},\n\t/**\n\t * displays prompt dialog\n\t * @param {string} text content of dialog\n\t * @param {string} title dialog title\n\t * @param {function} callback which will be triggered when user presses OK (true or false would be passed to callback respectively)\n\t * @param {boolean} [modal] make the dialog modal\n\t * @param {string} name name of the input field\n\t * @param {boolean} password whether the input should be a password input\n\t * @returns {Promise}\n\t */\n\tprompt: function(text, title, callback, modal, name, password) {\n\t\treturn $.when(this._getMessageTemplate()).then(function($tmpl) {\n\t\t\tvar dialogName = 'oc-dialog-' + Dialogs.dialogsCounter + '-content'\n\t\t\tvar dialogId = '#' + dialogName\n\t\t\tvar $dlg = $tmpl.octemplate({\n\t\t\t\tdialog_name: dialogName,\n\t\t\t\ttitle: title,\n\t\t\t\tmessage: text,\n\t\t\t\ttype: 'notice'\n\t\t\t})\n\t\t\tvar input = $('<input/>')\n\t\t\tinput.attr('type', password ? 'password' : 'text').attr('id', dialogName + '-input').attr('placeholder', name)\n\t\t\tvar label = $('<label/>').attr('for', dialogName + '-input').text(name + ': ')\n\t\t\t$dlg.append(label)\n\t\t\t$dlg.append(input)\n\t\t\tif (modal === undefined) {\n\t\t\t\tmodal = false\n\t\t\t}\n\t\t\t$('body').append($dlg)\n\n\t\t\t// wrap callback in _.once():\n\t\t\t// only call callback once and not twice (button handler and close\n\t\t\t// event) but call it for the close event, if ESC or the x is hit\n\t\t\tif (callback !== undefined) {\n\t\t\t\tcallback = _.once(callback)\n\t\t\t}\n\n\t\t\tvar buttonlist = [{\n\t\t\t\ttext: t('core', 'No'),\n\t\t\t\tclick: function() {\n\t\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\t\t// eslint-disable-next-line standard/no-callback-literal\n\t\t\t\t\t\tcallback(false, input.val())\n\t\t\t\t\t}\n\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\ttext: t('core', 'Yes'),\n\t\t\t\tclick: function() {\n\t\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\t\t// eslint-disable-next-line standard/no-callback-literal\n\t\t\t\t\t\tcallback(true, input.val())\n\t\t\t\t\t}\n\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t},\n\t\t\t\tdefaultButton: true\n\t\t\t}]\n\n\t\t\t$(dialogId).ocdialog({\n\t\t\t\tcloseOnEscape: true,\n\t\t\t\tmodal: modal,\n\t\t\t\tbuttons: buttonlist,\n\t\t\t\tclose: function() {\n\t\t\t\t\t// callback is already fired if Yes/No is clicked directly\n\t\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\t\t// eslint-disable-next-line standard/no-callback-literal\n\t\t\t\t\t\tcallback(false, input.val())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tinput.focus()\n\t\t\tDialogs.dialogsCounter++\n\t\t})\n\t},\n\t/**\n\t * show a file picker to pick a file from\n\t *\n\t * In order to pick several types of mime types they need to be passed as an\n\t * array of strings.\n\t *\n\t * When no mime type filter is given only files can be selected. In order to\n\t * be able to select both files and folders \"['*', 'httpd/unix-directory']\"\n\t * should be used instead.\n\t *\n\t * @param {string} title dialog title\n\t * @param {function} callback which will be triggered when user presses Choose\n\t * @param {boolean} [multiselect] whether it should be possible to select multiple files\n\t * @param {string[]} [mimetypeFilter] mimetype to filter by - directories will always be included\n\t * @param {boolean} [modal] make the dialog modal\n\t * @param {string} [type] Type of file picker : Choose, copy, move, copy and move\n\t * @param {string} [path] path to the folder that the the file can be picket from\n\t * @param {Object} [options] additonal options that need to be set\n\t * @param {Function} [options.filter] filter function for advanced filtering\n\t */\n\tfilepicker: function(title, callback, multiselect, mimetypeFilter, modal, type, path, options) {\n\t\tvar self = this\n\n\t\tthis.filepicker.sortField = 'name'\n\t\tthis.filepicker.sortOrder = 'asc'\n\t\t// avoid opening the picker twice\n\t\tif (this.filepicker.loading) {\n\t\t\treturn\n\t\t}\n\n\t\tif (type === undefined) {\n\t\t\ttype = this.FILEPICKER_TYPE_CHOOSE\n\t\t}\n\n\t\tvar emptyText = t('core', 'No files in here')\n\t\tvar newText = t('files', 'New folder')\n\t\tif (type === this.FILEPICKER_TYPE_COPY || type === this.FILEPICKER_TYPE_MOVE || type === this.FILEPICKER_TYPE_COPY_MOVE) {\n\t\t\temptyText = t('core', 'No more subfolders in here')\n\t\t}\n\n\t\tthis.filepicker.loading = true\n\t\tthis.filepicker.filesClient = (OCA.Sharing && OCA.Sharing.PublicApp && OCA.Sharing.PublicApp.fileList) ? OCA.Sharing.PublicApp.fileList.filesClient : OC.Files.getClient()\n\n\t\tthis.filelist = null\n\t\tpath = path || ''\n\t\toptions = Object.assign({\n\t\t\tallowDirectoryChooser: false\n\t\t}, options)\n\n\t\t$.when(this._getFilePickerTemplate()).then(function($tmpl) {\n\t\t\tself.filepicker.loading = false\n\t\t\tvar dialogName = 'oc-dialog-filepicker-content'\n\t\t\tif (self.$filePicker) {\n\t\t\t\tself.$filePicker.ocdialog('close')\n\t\t\t}\n\n\t\t\tif (mimetypeFilter === undefined || mimetypeFilter === null) {\n\t\t\t\tmimetypeFilter = []\n\t\t\t}\n\t\t\tif (typeof (mimetypeFilter) === 'string') {\n\t\t\t\tmimetypeFilter = [mimetypeFilter]\n\t\t\t}\n\n\t\t\tself.$filePicker = $tmpl.octemplate({\n\t\t\t\tdialog_name: dialogName,\n\t\t\t\ttitle: title,\n\t\t\t\temptytext: emptyText,\n\t\t\t\tnewtext: newText,\n\t\t\t\tnameCol: t('core', 'Name'),\n\t\t\t\tsizeCol: t('core', 'Size'),\n\t\t\t\tmodifiedCol: t('core', 'Modified')\n\t\t\t}).data('path', path).data('multiselect', multiselect).data('mimetype', mimetypeFilter).data('allowDirectoryChooser', options.allowDirectoryChooser)\n\t\t\tif (typeof(options.filter) === 'function') {\n\t\t\t\tself.$filePicker.data('filter', options.filter)\n\t\t\t}\n\n\t\t\tif (modal === undefined) {\n\t\t\t\tmodal = false\n\t\t\t}\n\t\t\tif (multiselect === undefined) {\n\t\t\t\tmultiselect = false\n\t\t\t}\n\n\t\t\t$('body').prepend(self.$filePicker)\n\n\t\t\tself.$showGridView = $('button#picker-showgridview')\n\t\t\tself.$showGridView.on('click keydown', function(event) {\n\t\t\t\tif (isA11yActivation(event)) {\n\t\t\t\t\tself._onGridviewChange()\n\t\t\t\t}\n\t\t\t})\n\t\t\tself._getGridSettings()\n\n\t\t\tvar newButton = self.$filePicker.find('.actions.creatable .button-add')\n\t\t\tif (type === self.FILEPICKER_TYPE_CHOOSE && !options.allowDirectoryChooser) {\n\t\t\t\tself.$filePicker.find('.actions.creatable').hide()\n\t\t\t}\n\t\t\tnewButton.on('focus', function() {\n\t\t\t\tself.$filePicker.ocdialog('setEnterCallback', function(event) {\n\t\t\t\t\tevent.stopImmediatePropagation()\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tnewButton.click()\n\t\t\t\t})\n\t\t\t})\n\t\t\tnewButton.on('blur', function() {\n\t\t\t\tself.$filePicker.ocdialog('unsetEnterCallback')\n\t\t\t})\n\n\t\t\tOC.registerMenu(newButton, self.$filePicker.find('.menu'), function() {\n\t\t\t\t$input.tooltip('hide')\n\t\t\t\t$input.focus()\n\t\t\t\tself.$filePicker.ocdialog('setEnterCallback', function(event) {\n\t\t\t\t\tevent.stopImmediatePropagation()\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tself.$filePicker.submit()\n\t\t\t\t})\n\t\t\t\tvar newName = $input.val()\n\t\t\t\tvar lastPos = newName.lastIndexOf('.')\n\t\t\t\tif (lastPos === -1) {\n\t\t\t\t\tlastPos = newName.length\n\t\t\t\t}\n\t\t\t\t$input.selectRange(0, lastPos)\n\t\t\t})\n\t\t\tvar $form = self.$filePicker.find('.filenameform')\n\t\t\tvar $input = $form.find('input[type=\\'text\\']')\n\t\t\tvar $submit = $form.find('input[type=\\'submit\\']')\n\t\t\t$input.on('keydown', function(event) {\n\t\t\t\tif (isA11yActivation(event)) {\n\t\t\t\t\tevent.stopImmediatePropagation()\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t$form.submit()\n\t\t\t\t}\n\t\t\t})\n\t\t\t$submit.on('click', function(event) {\n\t\t\t\tevent.stopImmediatePropagation()\n\t\t\t\tevent.preventDefault()\n\t\t\t\t$form.submit()\n\t\t\t})\n\n\t\t\t/**\n\t\t\t * Checks whether the given file name is valid.\n\t\t\t *\n\t\t\t * @param name file name to check\n\t\t\t * @return true if the file name is valid.\n\t\t\t * @throws a string exception with an error message if\n\t\t\t * the file name is not valid\n\t\t\t *\n\t\t\t * NOTE: This function is duplicated in the files app:\n\t\t\t * https://github.com/nextcloud/server/blob/b9bc2417e7a8dc81feb0abe20359bedaf864f790/apps/files/js/files.js#L127-L148\n\t\t\t */\n\t\t\tvar isFileNameValid = function (name) {\n\t\t\t\tvar trimmedName = name.trim();\n\t\t\t\tif (trimmedName === '.' || trimmedName === '..')\n\t\t\t\t{\n\t\t\t\t\tthrow t('files', '\"{name}\" is an invalid file name.', {name: name})\n\t\t\t\t} else if (trimmedName.length === 0) {\n\t\t\t\t\tthrow t('files', 'File name cannot be empty.')\n\t\t\t\t} else if (trimmedName.indexOf('/') !== -1) {\n\t\t\t\t\tthrow t('files', '\"/\" is not allowed inside a file name.')\n\t\t\t\t} else if (!!(trimmedName.match(OC.config.blacklist_files_regex))) {\n\t\t\t\t\tthrow t('files', '\"{name}\" is not an allowed filetype', {name: name})\n\t\t\t\t}\n\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tvar checkInput = function() {\n\t\t\t\tvar filename = $input.val()\n\t\t\t\ttry {\n\t\t\t\t\tif (!isFileNameValid(filename)) {\n\t\t\t\t\t\t// isFileNameValid(filename) throws an exception itself\n\t\t\t\t\t} else if (self.filelist.find(function(file) {\n\t\t\t\t\t\treturn file.name === this\n\t\t\t\t\t}, filename)) {\n\t\t\t\t\t\tthrow t('files', '{newName} already exists', { newName: filename }, undefined, {\n\t\t\t\t\t\t\tescape: false\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\t$input.attr('title', error)\n\t\t\t\t\t$input.tooltip({\n\t\t\t\t\t\tplacement: 'right',\n\t\t\t\t\t\ttrigger: 'manual',\n\t\t\t\t\t\t'container': '.newFolderMenu'\n\t\t\t\t\t})\n\t\t\t\t\t$input.tooltip('_fixTitle')\n\t\t\t\t\t$input.tooltip('show')\n\t\t\t\t\t$input.addClass('error')\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\t$form.on('submit', function(event) {\n\t\t\t\tevent.stopPropagation()\n\t\t\t\tevent.preventDefault()\n\n\t\t\t\tif (checkInput()) {\n\t\t\t\t\tvar newname = $input.val()\n\t\t\t\t\tself.filepicker.filesClient.createDirectory(self.$filePicker.data('path') + \"/\" + newname).always(function (status) {\n\t\t\t\t\t\tself._fillFilePicker(self.$filePicker.data('path') + \"/\" + newname)\n\t\t\t\t\t})\n\t\t\t\t\tOC.hideMenus()\n\t\t\t\t\tself.$filePicker.ocdialog('unsetEnterCallback')\n\t\t\t\t\tself.$filePicker.click()\n\t\t\t\t\t$input.val(newText)\n\t\t\t\t}\n\t\t\t})\n\t\t\t$input.on('input', function(event) {\n\t\t\t\t$input.tooltip('hide')\n\t\t\t})\n\n\t\t\tself.$filePicker.ready(function() {\n\t\t\t\tself.$fileListHeader = self.$filePicker.find('.filelist thead tr')\n\t\t\t\tself.$filelist = self.$filePicker.find('.filelist tbody')\n\t\t\t\tself.$filelistContainer = self.$filePicker.find('.filelist-container')\n\t\t\t\tself.$dirTree = self.$filePicker.find('.dirtree')\n\t\t\t\tself.$dirTree.on('click keydown', 'div:not(:last-child)', self, function(event) {\n\t\t\t\t\tif (isA11yActivation(event)) {\n\t\t\t\t\t\tself._handleTreeListSelect(event, type)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tself.$filelist.on('click keydown', 'tr', function(event) {\n\t\t\t\t\tif (isA11yActivation(event)) {\n\t\t\t\t\t\tself._handlePickerClick(event, $(this), type)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tself.$fileListHeader.on('click keydown', 'a', function(event) {\n\t\t\t\t\tif (isA11yActivation(event)) {\n\t\t\t\t\t\tvar dir = self.$filePicker.data('path')\n\t\t\t\t\t\tself.filepicker.sortField = $(event.currentTarget).data('sort')\n\t\t\t\t\t\tself.filepicker.sortOrder = self.filepicker.sortOrder === 'asc' ? 'desc' : 'asc'\n\t\t\t\t\t\tself._fillFilePicker(dir)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tself._fillFilePicker(path)\n\t\t\t})\n\n\t\t\t// build buttons\n\t\t\tvar functionToCall = function(returnType) {\n\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\tvar datapath\n\t\t\t\t\tif (multiselect === true) {\n\t\t\t\t\t\tdatapath = []\n\t\t\t\t\t\tself.$filelist.find('tr.filepicker_element_selected').each(function(index, element) {\n\t\t\t\t\t\t\tdatapath.push(self.$filePicker.data('path') + '/' + $(element).data('entryname'))\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdatapath = self.$filePicker.data('path')\n\t\t\t\t\t\tvar selectedName = self.$filelist.find('tr.filepicker_element_selected').data('entryname')\n\t\t\t\t\t\tif (selectedName) {\n\t\t\t\t\t\t\tdatapath += '/' + selectedName\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcallback(datapath, returnType)\n\t\t\t\t\tself.$filePicker.ocdialog('close')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar chooseCallback = function() {\n\t\t\t\tfunctionToCall(Dialogs.FILEPICKER_TYPE_CHOOSE)\n\t\t\t}\n\n\t\t\tvar copyCallback = function() {\n\t\t\t\tfunctionToCall(Dialogs.FILEPICKER_TYPE_COPY)\n\t\t\t}\n\n\t\t\tvar moveCallback = function() {\n\t\t\t\tfunctionToCall(Dialogs.FILEPICKER_TYPE_MOVE)\n\t\t\t}\n\n\t\t\tvar buttonlist = []\n\t\t\tif (type === Dialogs.FILEPICKER_TYPE_CHOOSE) {\n\t\t\t\tbuttonlist.push({\n\t\t\t\t\ttext: t('core', 'Choose'),\n\t\t\t\t\tclick: chooseCallback,\n\t\t\t\t\tdefaultButton: true\n\t\t\t\t})\n\t\t\t} else if (type === Dialogs.FILEPICKER_TYPE_CUSTOM) {\n\t\t\t\toptions.buttons.forEach(function(button) {\n\t\t\t\t\tbuttonlist.push({\n\t\t\t\t\t\ttext: button.text,\n\t\t\t\t\t\tclick: function() {\n\t\t\t\t\t\t\tfunctionToCall(button.type)\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefaultButton: button.defaultButton\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tif (type === Dialogs.FILEPICKER_TYPE_COPY || type === Dialogs.FILEPICKER_TYPE_COPY_MOVE) {\n\t\t\t\t\tbuttonlist.push({\n\t\t\t\t\t\ttext: t('core', 'Copy'),\n\t\t\t\t\t\tclick: copyCallback,\n\t\t\t\t\t\tdefaultButton: false\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tif (type === Dialogs.FILEPICKER_TYPE_MOVE || type === Dialogs.FILEPICKER_TYPE_COPY_MOVE) {\n\t\t\t\t\tbuttonlist.push({\n\t\t\t\t\t\ttext: t('core', 'Move'),\n\t\t\t\t\t\tclick: moveCallback,\n\t\t\t\t\t\tdefaultButton: true\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.$filePicker.ocdialog({\n\t\t\t\tcloseOnEscape: true,\n\t\t\t\t// max-width of 600\n\t\t\t\twidth: 600,\n\t\t\t\theight: 500,\n\t\t\t\tmodal: modal,\n\t\t\t\tbuttons: buttonlist,\n\t\t\t\tstyle: {\n\t\t\t\t\tbuttons: 'aside'\n\t\t\t\t},\n\t\t\t\tclose: function() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$(this).ocdialog('destroy').remove()\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t}\n\t\t\t\t\tself.$filePicker = null\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// We can access primary class only from oc-dialog.\n\t\t\t// Hence this is one of the approach to get the choose button.\n\t\t\tvar getOcDialog = self.$filePicker.closest('.oc-dialog')\n\t\t\tvar buttonEnableDisable = getOcDialog.find('.primary')\n\t\t\tif (self.$filePicker.data('mimetype').indexOf('httpd/unix-directory') !== -1 || self.$filePicker.data('allowDirectoryChooser')) {\n\t\t\t\tbuttonEnableDisable.prop('disabled', false)\n\t\t\t} else {\n\t\t\t\tbuttonEnableDisable.prop('disabled', true)\n\t\t\t}\n\t\t})\n\t\t\t.fail(function(status, error) {\n\t\t\t\t// If the method is called while navigating away\n\t\t\t\t// from the page, it is probably not needed ;)\n\t\t\t\tself.filepicker.loading = false\n\t\t\t\tif (status !== 0) {\n\t\t\t\t\talert(t('core', 'Error loading file picker template: {error}', { error: error }))\n\t\t\t\t}\n\t\t\t})\n\t},\n\t/**\n\t * Displays raw dialog\n\t * You better use a wrapper instead ...\n\t */\n\tmessage: function(content, title, dialogType, buttons, callback, modal, allowHtml) {\n\t\treturn $.when(this._getMessageTemplate()).then(function($tmpl) {\n\t\t\tvar dialogName = 'oc-dialog-' + Dialogs.dialogsCounter + '-content'\n\t\t\tvar dialogId = '#' + dialogName\n\t\t\tvar $dlg = $tmpl.octemplate({\n\t\t\t\tdialog_name: dialogName,\n\t\t\t\ttitle: title,\n\t\t\t\tmessage: content,\n\t\t\t\ttype: dialogType\n\t\t\t}, allowHtml ? { escapeFunction: '' } : {})\n\t\t\tif (modal === undefined) {\n\t\t\t\tmodal = false\n\t\t\t}\n\t\t\t$('body').append($dlg)\n\t\t\tvar buttonlist = []\n\t\t\tswitch (buttons) {\n\t\t\tcase Dialogs.YES_NO_BUTTONS:\n\t\t\t\tbuttonlist = [{\n\t\t\t\t\ttext: t('core', 'No'),\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\t\t\tcallback(false)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: t('core', 'Yes'),\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\t\t\tcallback(true)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t\t},\n\t\t\t\t\tdefaultButton: true\n\t\t\t\t}]\n\t\t\t\tbreak\n\t\t\tcase Dialogs.OK_BUTTON:\n\t\t\t\tvar functionToCall = function() {\n\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\t\tcallback()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbuttonlist[0] = {\n\t\t\t\t\ttext: t('core', 'OK'),\n\t\t\t\t\tclick: functionToCall,\n\t\t\t\t\tdefaultButton: true\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tif (typeof(buttons) === 'object') {\n\t\t\t\t\tswitch (buttons.type) {\n\t\t\t\t\t\tcase Dialogs.YES_NO_BUTTONS:\n\t\t\t\t\t\t\tbuttonlist = [{\n\t\t\t\t\t\t\t\ttext: buttons.cancel || t('core', 'No'),\n\t\t\t\t\t\t\t\tclick: function() {\n\t\t\t\t\t\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\t\t\t\t\t\tcallback(false)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttext: buttons.confirm || t('core', 'Yes'),\n\t\t\t\t\t\t\t\t\tclick: function() {\n\t\t\t\t\t\t\t\t\t\tif (callback !== undefined) {\n\t\t\t\t\t\t\t\t\t\t\tcallback(true)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdefaultButton: true,\n\t\t\t\t\t\t\t\t\tclasses: buttons.confirmClasses\n\t\t\t\t\t\t\t\t}]\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\t$(dialogId).ocdialog({\n\t\t\t\tcloseOnEscape: true,\n\t\t\t\tcloseCallback: () => { callback && callback(false) },\n\t\t\t\tmodal: modal,\n\t\t\t\tbuttons: buttonlist\n\t\t\t})\n\t\t\tDialogs.dialogsCounter++\n\t\t})\n\t\t\t.fail(function(status, error) {\n\t\t\t\t// If the method is called while navigating away from\n\t\t\t\t// the page, we still want to deliver the message.\n\t\t\t\tif (status === 0) {\n\t\t\t\t\talert(title + ': ' + content)\n\t\t\t\t} else {\n\t\t\t\t\talert(t('core', 'Error loading message template: {error}', { error: error }))\n\t\t\t\t}\n\t\t\t})\n\t},\n\t_fileexistsshown: false,\n\t/**\n\t * Displays file exists dialog\n\t * @param {object} data upload object\n\t * @param {object} original file with name, size and mtime\n\t * @param {object} replacement file with name, size and mtime\n\t * @param {object} controller with onCancel, onSkip, onReplace and onRename methods\n\t * @returns {Promise} jquery promise that resolves after the dialog template was loaded\n\t */\n\tfileexists: function(data, original, replacement, controller) {\n\t\tvar self = this\n\t\tvar dialogDeferred = new $.Deferred()\n\n\t\tvar getCroppedPreview = function(file) {\n\t\t\tvar deferred = new $.Deferred()\n\t\t\t// Only process image files.\n\t\t\tvar type = file.type && file.type.split('/').shift()\n\t\t\tif (window.FileReader && type === 'image') {\n\t\t\t\tvar reader = new FileReader()\n\t\t\t\treader.onload = function(e) {\n\t\t\t\t\tvar blob = new Blob([e.target.result])\n\t\t\t\t\twindow.URL = window.URL || window.webkitURL\n\t\t\t\t\tvar originalUrl = window.URL.createObjectURL(blob)\n\t\t\t\t\tvar image = new Image()\n\t\t\t\t\timage.src = originalUrl\n\t\t\t\t\timage.onload = function() {\n\t\t\t\t\t\tvar url = crop(image)\n\t\t\t\t\t\tdeferred.resolve(url)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treader.readAsArrayBuffer(file)\n\t\t\t} else {\n\t\t\t\tdeferred.reject()\n\t\t\t}\n\t\t\treturn deferred\n\t\t}\n\n\t\tvar crop = function(img) {\n\t\t\tvar canvas = document.createElement('canvas')\n\t\t\tvar targetSize = 96\n\t\t\tvar width = img.width\n\t\t\tvar height = img.height\n\t\t\tvar x; var y; var size\n\n\t\t\t// Calculate the width and height, constraining the proportions\n\t\t\tif (width > height) {\n\t\t\t\ty = 0\n\t\t\t\tx = (width - height) / 2\n\t\t\t} else {\n\t\t\t\ty = (height - width) / 2\n\t\t\t\tx = 0\n\t\t\t}\n\t\t\tsize = Math.min(width, height)\n\n\t\t\t// Set canvas size to the cropped area\n\t\t\tcanvas.width = size\n\t\t\tcanvas.height = size\n\t\t\tvar ctx = canvas.getContext('2d')\n\t\t\tctx.drawImage(img, x, y, size, size, 0, 0, size, size)\n\n\t\t\t// Resize the canvas to match the destination (right size uses 96px)\n\t\t\tresampleHermite(canvas, size, size, targetSize, targetSize)\n\n\t\t\treturn canvas.toDataURL('image/png', 0.7)\n\t\t}\n\n\t\t/**\n\t\t * Fast image resize/resample using Hermite filter with JavaScript.\n\t\t *\n\t\t * @author: ViliusL\n\t\t *\n\t\t * @param {*} canvas\n\t\t * @param {number} W\n\t\t * @param {number} H\n\t\t * @param {number} W2\n\t\t * @param {number} H2\n\t\t */\n\t\tvar resampleHermite = function(canvas, W, H, W2, H2) {\n\t\t\tW2 = Math.round(W2)\n\t\t\tH2 = Math.round(H2)\n\t\t\tvar img = canvas.getContext('2d').getImageData(0, 0, W, H)\n\t\t\tvar img2 = canvas.getContext('2d').getImageData(0, 0, W2, H2)\n\t\t\tvar data = img.data\n\t\t\tvar data2 = img2.data\n\t\t\tvar ratio_w = W / W2\n\t\t\tvar ratio_h = H / H2\n\t\t\tvar ratio_w_half = Math.ceil(ratio_w / 2)\n\t\t\tvar ratio_h_half = Math.ceil(ratio_h / 2)\n\n\t\t\tfor (var j = 0; j < H2; j++) {\n\t\t\t\tfor (var i = 0; i < W2; i++) {\n\t\t\t\t\tvar x2 = (i + j * W2) * 4\n\t\t\t\t\tvar weight = 0\n\t\t\t\t\tvar weights = 0\n\t\t\t\t\tvar weights_alpha = 0\n\t\t\t\t\tvar gx_r = 0\n\t\t\t\t\tvar gx_g = 0\n\t\t\t\t\tvar gx_b = 0\n\t\t\t\t\tvar gx_a = 0\n\t\t\t\t\tvar center_y = (j + 0.5) * ratio_h\n\t\t\t\t\tfor (var yy = Math.floor(j * ratio_h); yy < (j + 1) * ratio_h; yy++) {\n\t\t\t\t\t\tvar dy = Math.abs(center_y - (yy + 0.5)) / ratio_h_half\n\t\t\t\t\t\tvar center_x = (i + 0.5) * ratio_w\n\t\t\t\t\t\tvar w0 = dy * dy // pre-calc part of w\n\t\t\t\t\t\tfor (var xx = Math.floor(i * ratio_w); xx < (i + 1) * ratio_w; xx++) {\n\t\t\t\t\t\t\tvar dx = Math.abs(center_x - (xx + 0.5)) / ratio_w_half\n\t\t\t\t\t\t\tvar w = Math.sqrt(w0 + dx * dx)\n\t\t\t\t\t\t\tif (w >= -1 && w <= 1) {\n\t\t\t\t\t\t\t\t// hermite filter\n\t\t\t\t\t\t\t\tweight = 2 * w * w * w - 3 * w * w + 1\n\t\t\t\t\t\t\t\tif (weight > 0) {\n\t\t\t\t\t\t\t\t\tdx = 4 * (xx + yy * W)\n\t\t\t\t\t\t\t\t\t// alpha\n\t\t\t\t\t\t\t\t\tgx_a += weight * data[dx + 3]\n\t\t\t\t\t\t\t\t\tweights_alpha += weight\n\t\t\t\t\t\t\t\t\t// colors\n\t\t\t\t\t\t\t\t\tif (data[dx + 3] < 255) { weight = weight * data[dx + 3] / 250 }\n\t\t\t\t\t\t\t\t\tgx_r += weight * data[dx]\n\t\t\t\t\t\t\t\t\tgx_g += weight * data[dx + 1]\n\t\t\t\t\t\t\t\t\tgx_b += weight * data[dx + 2]\n\t\t\t\t\t\t\t\t\tweights += weight\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdata2[x2] = gx_r / weights\n\t\t\t\t\tdata2[x2 + 1] = gx_g / weights\n\t\t\t\t\tdata2[x2 + 2] = gx_b / weights\n\t\t\t\t\tdata2[x2 + 3] = gx_a / weights_alpha\n\t\t\t\t}\n\t\t\t}\n\t\t\tcanvas.getContext('2d').clearRect(0, 0, Math.max(W, W2), Math.max(H, H2))\n\t\t\tcanvas.width = W2\n\t\t\tcanvas.height = H2\n\t\t\tcanvas.getContext('2d').putImageData(img2, 0, 0)\n\t\t}\n\n\t\tvar addConflict = function($conflicts, original, replacement) {\n\n\t\t\tvar $conflict = $conflicts.find('.template').clone().removeClass('template').addClass('conflict')\n\t\t\tvar $originalDiv = $conflict.find('.original')\n\t\t\tvar $replacementDiv = $conflict.find('.replacement')\n\n\t\t\t$conflict.data('data', data)\n\n\t\t\t$conflict.find('.filename').text(original.name)\n\t\t\t$originalDiv.find('.size').text(OC.Util.humanFileSize(original.size))\n\t\t\t$originalDiv.find('.mtime').text(OC.Util.formatDate(original.mtime))\n\t\t\t// ie sucks\n\t\t\tif (replacement.size && replacement.lastModified) {\n\t\t\t\t$replacementDiv.find('.size').text(OC.Util.humanFileSize(replacement.size))\n\t\t\t\t$replacementDiv.find('.mtime').text(OC.Util.formatDate(replacement.lastModified))\n\t\t\t}\n\t\t\tvar path = original.directory + '/' + original.name\n\t\t\tvar urlSpec = {\n\t\t\t\tfile: path,\n\t\t\t\tx: 96,\n\t\t\t\ty: 96,\n\t\t\t\tc: original.etag,\n\t\t\t\tforceIcon: 0\n\t\t\t}\n\t\t\tvar previewpath = Files.generatePreviewUrl(urlSpec)\n\t\t\t// Escaping single quotes\n\t\t\tpreviewpath = previewpath.replace(/'/g, '%27')\n\t\t\t$originalDiv.find('.icon').css({ 'background-image': \"url('\" + previewpath + \"')\" })\n\t\t\tgetCroppedPreview(replacement).then(\n\t\t\t\tfunction(path) {\n\t\t\t\t\t$replacementDiv.find('.icon').css('background-image', 'url(' + path + ')')\n\t\t\t\t}, function() {\n\t\t\t\t\tpath = OC.MimeType.getIconUrl(replacement.type)\n\t\t\t\t\t$replacementDiv.find('.icon').css('background-image', 'url(' + path + ')')\n\t\t\t\t}\n\t\t\t)\n\t\t\t// connect checkboxes with labels\n\t\t\tvar checkboxId = $conflicts.find('.conflict').length\n\t\t\t$originalDiv.find('input:checkbox').attr('id', 'checkbox_original_' + checkboxId)\n\t\t\t$replacementDiv.find('input:checkbox').attr('id', 'checkbox_replacement_' + checkboxId)\n\n\t\t\t$conflicts.append($conflict)\n\n\t\t\t// set more recent mtime bold\n\t\t\t// ie sucks\n\t\t\tif (replacement.lastModified > original.mtime) {\n\t\t\t\t$replacementDiv.find('.mtime').css('font-weight', 'bold')\n\t\t\t} else if (replacement.lastModified < original.mtime) {\n\t\t\t\t$originalDiv.find('.mtime').css('font-weight', 'bold')\n\t\t\t} else {\n\t\t\t\t// TODO add to same mtime collection?\n\t\t\t}\n\n\t\t\t// set bigger size bold\n\t\t\tif (replacement.size && replacement.size > original.size) {\n\t\t\t\t$replacementDiv.find('.size').css('font-weight', 'bold')\n\t\t\t} else if (replacement.size && replacement.size < original.size) {\n\t\t\t\t$originalDiv.find('.size').css('font-weight', 'bold')\n\t\t\t} else {\n\t\t\t\t// TODO add to same size collection?\n\t\t\t}\n\n\t\t\t// TODO show skip action for files with same size and mtime in bottom row\n\n\t\t\t// always keep readonly files\n\n\t\t\tif (original.status === 'readonly') {\n\t\t\t\t$originalDiv\n\t\t\t\t\t.addClass('readonly')\n\t\t\t\t\t.find('input[type=\"checkbox\"]')\n\t\t\t\t\t.prop('checked', true)\n\t\t\t\t\t.prop('disabled', true)\n\t\t\t\t$originalDiv.find('.message')\n\t\t\t\t\t.text(t('core', 'read-only'))\n\t\t\t}\n\t\t}\n\t\t// var selection = controller.getSelection(data.originalFiles);\n\t\t// if (selection.defaultAction) {\n\t\t//\tcontroller[selection.defaultAction](data);\n\t\t// } else {\n\t\tvar dialogName = 'oc-dialog-fileexists-content'\n\t\tvar dialogId = '#' + dialogName\n\t\tif (this._fileexistsshown) {\n\t\t\t// add conflict\n\n\t\t\tvar $conflicts = $(dialogId + ' .conflicts')\n\t\t\taddConflict($conflicts, original, replacement)\n\n\t\t\tvar count = $(dialogId + ' .conflict').length\n\t\t\tvar title = n('core',\n\t\t\t\t'{count} file conflict',\n\t\t\t\t'{count} file conflicts',\n\t\t\t\tcount,\n\t\t\t\t{ count: count }\n\t\t\t)\n\t\t\t$(dialogId).parent().children('.oc-dialog-title').text(title)\n\n\t\t\t// recalculate dimensions\n\t\t\t$(window).trigger('resize')\n\t\t\tdialogDeferred.resolve()\n\t\t} else {\n\t\t\t// create dialog\n\t\t\tthis._fileexistsshown = true\n\t\t\t$.when(this._getFileExistsTemplate()).then(function($tmpl) {\n\t\t\t\tvar title = t('core', 'One file conflict')\n\t\t\t\tvar $dlg = $tmpl.octemplate({\n\t\t\t\t\tdialog_name: dialogName,\n\t\t\t\t\ttitle: title,\n\t\t\t\t\ttype: 'fileexists',\n\n\t\t\t\t\tallnewfiles: t('core', 'New Files'),\n\t\t\t\t\tallexistingfiles: t('core', 'Already existing files'),\n\n\t\t\t\t\twhy: t('core', 'Which files do you want to keep?'),\n\t\t\t\t\twhat: t('core', 'If you select both versions, the copied file will have a number added to its name.')\n\t\t\t\t})\n\t\t\t\t$('body').append($dlg)\n\n\t\t\t\tif (original && replacement) {\n\t\t\t\t\tvar $conflicts = $dlg.find('.conflicts')\n\t\t\t\t\taddConflict($conflicts, original, replacement)\n\t\t\t\t}\n\n\t\t\t\tvar buttonlist = [{\n\t\t\t\t\ttext: t('core', 'Cancel'),\n\t\t\t\t\tclasses: 'cancel',\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\tif (typeof controller.onCancel !== 'undefined') {\n\t\t\t\t\t\t\tcontroller.onCancel(data)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: t('core', 'Continue'),\n\t\t\t\t\tclasses: 'continue',\n\t\t\t\t\tclick: function() {\n\t\t\t\t\t\tif (typeof controller.onContinue !== 'undefined') {\n\t\t\t\t\t\t\tcontroller.onContinue($(dialogId + ' .conflict'))\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(dialogId).ocdialog('close')\n\t\t\t\t\t}\n\t\t\t\t}]\n\n\t\t\t\t$(dialogId).ocdialog({\n\t\t\t\t\twidth: 500,\n\t\t\t\t\tcloseOnEscape: true,\n\t\t\t\t\tmodal: true,\n\t\t\t\t\tbuttons: buttonlist,\n\t\t\t\t\tcloseButton: null,\n\t\t\t\t\tclose: function() {\n\t\t\t\t\t\tself._fileexistsshown = false\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t$(this).ocdialog('destroy').remove()\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$(dialogId).css('height', 'auto')\n\n\t\t\t\tvar $primaryButton = $dlg.closest('.oc-dialog').find('button.continue')\n\t\t\t\t$primaryButton.prop('disabled', true)\n\n\t\t\t\tfunction updatePrimaryButton() {\n\t\t\t\t\tvar checkedCount = $dlg.find('.conflicts .checkbox:checked').length\n\t\t\t\t\t$primaryButton.prop('disabled', checkedCount === 0)\n\t\t\t\t}\n\n\t\t\t\t// add checkbox toggling actions\n\t\t\t\t$(dialogId).find('.allnewfiles').on('click', function() {\n\t\t\t\t\tvar $checkboxes = $(dialogId).find('.conflict .replacement input[type=\"checkbox\"]')\n\t\t\t\t\t$checkboxes.prop('checked', $(this).prop('checked'))\n\t\t\t\t})\n\t\t\t\t$(dialogId).find('.allexistingfiles').on('click', function() {\n\t\t\t\t\tvar $checkboxes = $(dialogId).find('.conflict .original:not(.readonly) input[type=\"checkbox\"]')\n\t\t\t\t\t$checkboxes.prop('checked', $(this).prop('checked'))\n\t\t\t\t})\n\t\t\t\t$(dialogId).find('.conflicts').on('click', '.replacement,.original:not(.readonly)', function() {\n\t\t\t\t\tvar $checkbox = $(this).find('input[type=\"checkbox\"]')\n\t\t\t\t\t$checkbox.prop('checked', !$checkbox.prop('checked'))\n\t\t\t\t})\n\t\t\t\t$(dialogId).find('.conflicts').on('click', '.replacement input[type=\"checkbox\"],.original:not(.readonly) input[type=\"checkbox\"]', function() {\n\t\t\t\t\tvar $checkbox = $(this)\n\t\t\t\t\t$checkbox.prop('checked', !$checkbox.prop('checked'))\n\t\t\t\t})\n\n\t\t\t\t// update counters\n\t\t\t\t$(dialogId).on('click', '.replacement,.allnewfiles', function() {\n\t\t\t\t\tvar count = $(dialogId).find('.conflict .replacement input[type=\"checkbox\"]:checked').length\n\t\t\t\t\tif (count === $(dialogId + ' .conflict').length) {\n\t\t\t\t\t\t$(dialogId).find('.allnewfiles').prop('checked', true)\n\t\t\t\t\t\t$(dialogId).find('.allnewfiles + .count').text(t('core', '(all selected)'))\n\t\t\t\t\t} else if (count > 0) {\n\t\t\t\t\t\t$(dialogId).find('.allnewfiles').prop('checked', false)\n\t\t\t\t\t\t$(dialogId).find('.allnewfiles + .count').text(t('core', '({count} selected)', { count: count }))\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(dialogId).find('.allnewfiles').prop('checked', false)\n\t\t\t\t\t\t$(dialogId).find('.allnewfiles + .count').text('')\n\t\t\t\t\t}\n\t\t\t\t\tupdatePrimaryButton()\n\t\t\t\t})\n\t\t\t\t$(dialogId).on('click', '.original,.allexistingfiles', function() {\n\t\t\t\t\tvar count = $(dialogId).find('.conflict .original input[type=\"checkbox\"]:checked').length\n\t\t\t\t\tif (count === $(dialogId + ' .conflict').length) {\n\t\t\t\t\t\t$(dialogId).find('.allexistingfiles').prop('checked', true)\n\t\t\t\t\t\t$(dialogId).find('.allexistingfiles + .count').text(t('core', '(all selected)'))\n\t\t\t\t\t} else if (count > 0) {\n\t\t\t\t\t\t$(dialogId).find('.allexistingfiles').prop('checked', false)\n\t\t\t\t\t\t$(dialogId).find('.allexistingfiles + .count')\n\t\t\t\t\t\t\t.text(t('core', '({count} selected)', { count: count }))\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(dialogId).find('.allexistingfiles').prop('checked', false)\n\t\t\t\t\t\t$(dialogId).find('.allexistingfiles + .count').text('')\n\t\t\t\t\t}\n\t\t\t\t\tupdatePrimaryButton()\n\t\t\t\t})\n\n\t\t\t\tdialogDeferred.resolve()\n\t\t\t})\n\t\t\t\t.fail(function() {\n\t\t\t\t\tdialogDeferred.reject()\n\t\t\t\t\talert(t('core', 'Error loading file exists template'))\n\t\t\t\t})\n\t\t}\n\t\t// }\n\t\treturn dialogDeferred.promise()\n\t},\n\t// get the gridview setting and set the input accordingly\n\t_getGridSettings: function() {\n\t\tconst self = this\n\t\t$.get(OC.generateUrl('/apps/files/api/v1/showgridview'), function(response) {\n\t\t\tself.$showGridView\n\t\t\t\t.removeClass('icon-toggle-filelist icon-toggle-pictures')\n\t\t\t\t.addClass(response.gridview ? 'icon-toggle-filelist' : 'icon-toggle-pictures')\n\t\t\tself.$showGridView.attr(\n\t\t\t\t'aria-label',\n\t\t\t\tresponse.gridview ? t('files', 'Show list view') : t('files', 'Show grid view'),\n\t\t\t)\n\t\t\t$('.list-container').toggleClass('view-grid', response.gridview)\n\t\t})\n\t},\n\t_onGridviewChange: function() {\n\t\tconst isGridView = this.$showGridView.hasClass('icon-toggle-filelist')\n\t\t// only save state if user is logged in\n\t\tif (OC.currentUser) {\n\t\t\t$.post(OC.generateUrl('/apps/files/api/v1/showgridview'), { show: !isGridView })\n\t\t}\n\t\tthis.$showGridView\n\t\t\t.removeClass('icon-toggle-filelist icon-toggle-pictures')\n\t\t\t.addClass(isGridView ? 'icon-toggle-pictures' : 'icon-toggle-filelist')\n\t\tthis.$showGridView.attr(\n\t\t\t'aria-label',\n\t\t\tisGridView ? t('files', 'Show grid view') : t('files', 'Show list view'),\n\t\t)\n\t\tthis.$filePicker.find('.list-container').toggleClass('view-grid', !isGridView)\n\t},\n\t_getFilePickerTemplate: function() {\n\t\tvar defer = $.Deferred()\n\t\tif (!this.$filePickerTemplate) {\n\t\t\tvar self = this\n\t\t\t$.get(OC.filePath('core', 'templates', 'filepicker.html'), function(tmpl) {\n\t\t\t\tself.$filePickerTemplate = $(tmpl)\n\t\t\t\tself.$listTmpl = self.$filePickerTemplate.find('.filelist tbody tr:first-child').detach()\n\t\t\t\tdefer.resolve(self.$filePickerTemplate)\n\t\t\t})\n\t\t\t\t.fail(function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tdefer.reject(jqXHR.status, errorThrown)\n\t\t\t\t})\n\t\t} else {\n\t\t\tdefer.resolve(this.$filePickerTemplate)\n\t\t}\n\t\treturn defer.promise()\n\t},\n\t_getMessageTemplate: function() {\n\t\tvar defer = $.Deferred()\n\t\tif (!this.$messageTemplate) {\n\t\t\tvar self = this\n\t\t\t$.get(OC.filePath('core', 'templates', 'message.html'), function(tmpl) {\n\t\t\t\tself.$messageTemplate = $(tmpl)\n\t\t\t\tdefer.resolve(self.$messageTemplate)\n\t\t\t})\n\t\t\t\t.fail(function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tdefer.reject(jqXHR.status, errorThrown)\n\t\t\t\t})\n\t\t} else {\n\t\t\tdefer.resolve(this.$messageTemplate)\n\t\t}\n\t\treturn defer.promise()\n\t},\n\t_getFileExistsTemplate: function() {\n\t\tvar defer = $.Deferred()\n\t\tif (!this.$fileexistsTemplate) {\n\t\t\tvar self = this\n\t\t\t$.get(OC.filePath('files', 'templates', 'fileexists.html'), function(tmpl) {\n\t\t\t\tself.$fileexistsTemplate = $(tmpl)\n\t\t\t\tdefer.resolve(self.$fileexistsTemplate)\n\t\t\t})\n\t\t\t\t.fail(function() {\n\t\t\t\t\tdefer.reject()\n\t\t\t\t})\n\t\t} else {\n\t\t\tdefer.resolve(this.$fileexistsTemplate)\n\t\t}\n\t\treturn defer.promise()\n\t},\n\t_getFileList: function(dir, mimeType) { // this is only used by the spreedme app atm\n\t\tif (typeof (mimeType) === 'string') {\n\t\t\tmimeType = [mimeType]\n\t\t}\n\n\t\treturn $.getJSON(\n\t\t\tOC.filePath('files', 'ajax', 'list.php'),\n\t\t\t{\n\t\t\t\tdir: dir,\n\t\t\t\tmimetypes: JSON.stringify(mimeType)\n\t\t\t}\n\t\t)\n\t},\n\n\t/**\n\t * fills the filepicker with files\n\t */\n\t_fillFilePicker: async function(dir) {\n\t\tvar self = this\n\t\tthis.$filelist.empty()\n\t\tthis.$filePicker.find('.emptycontent').hide()\n\t\tthis.$filelistContainer.addClass('icon-loading')\n\t\tthis.$filePicker.data('path', dir)\n\t\tvar filter = this.$filePicker.data('mimetype')\n\t\tvar advancedFilter = this.$filePicker.data('filter')\n\t\tif (typeof (filter) === 'string') {\n\t\t\tfilter = [filter]\n\t\t}\n\t\tself.$fileListHeader.find('.sort-indicator').addClass('hidden').removeClass('icon-triangle-n').removeClass('icon-triangle-s')\n\t\tself.$fileListHeader.find('[data-sort=' + self.filepicker.sortField + '] .sort-indicator').removeClass('hidden')\n\t\tif (self.filepicker.sortOrder === 'asc') {\n\t\t\tself.$fileListHeader.find('[data-sort=' + self.filepicker.sortField + '] .sort-indicator').addClass('icon-triangle-n')\n\t\t} else {\n\t\t\tself.$fileListHeader.find('[data-sort=' + self.filepicker.sortField + '] .sort-indicator').addClass('icon-triangle-s')\n\t\t}\n\n\t\t// Wrap within a method because a promise cannot return multiple values\n\t\t// But the client impleemntation still does it...\n\t\tvar getFolderContents = async function(dir) {\n\t\t\treturn self.filepicker.filesClient.getFolderContents(dir)\n\t\t\t\t.then((status, files) => {\n\t\t\t\t\treturn files\n\t\t\t\t})\n\t\t}\n\n\t\ttry {\n\t\t\tvar files = await getFolderContents(dir)\n\t\t} catch (error) {\n\t\t\t// fallback to root if requested dir is non-existent\n\t\t\tconsole.error('Requested path does not exists, falling back to root')\n\t\t\tvar files = await getFolderContents('/')\n\t\t\tthis.$filePicker.data('path', '/')\n\t\t}\n\n\t\tself.filelist = files\n\t\tif (filter && filter.length > 0 && filter.indexOf('*') === -1) {\n\t\t\tfiles = files.filter(function(file) {\n\t\t\t\treturn file.type === 'dir' || filter.indexOf(file.mimetype) !== -1\n\t\t\t})\n\t\t}\n\n\t\tif (advancedFilter) {\n\t\t\tfiles = files.filter(advancedFilter)\n\t\t}\n\n\t\t// Check if the showHidden input field exist and if it exist follow it\n\t\t// Otherwise just show the hidden files\n\t\tconst showHiddenInput = document.getElementById('showHiddenFiles')\n\t\tconst showHidden = showHiddenInput === null || showHiddenInput.value === \"1\"\n\t\tif (!showHidden) {\n\t\t\tfiles = files.filter(function(file) {\n\t\t\t\treturn !file.name.startsWith('.')\n\t\t\t})\n\t\t}\n\n\t\tvar Comparators = {\n\t\t\tname: function(fileInfo1, fileInfo2) {\n\t\t\t\tif (fileInfo1.type === 'dir' && fileInfo2.type !== 'dir') {\n\t\t\t\t\treturn -1\n\t\t\t\t}\n\t\t\t\tif (fileInfo1.type !== 'dir' && fileInfo2.type === 'dir') {\n\t\t\t\t\treturn 1\n\t\t\t\t}\n\t\t\t\treturn OC.Util.naturalSortCompare(fileInfo1.name, fileInfo2.name)\n\t\t\t},\n\t\t\tsize: function(fileInfo1, fileInfo2) {\n\t\t\t\treturn fileInfo1.size - fileInfo2.size\n\t\t\t},\n\t\t\tmtime: function(fileInfo1, fileInfo2) {\n\t\t\t\treturn fileInfo1.mtime - fileInfo2.mtime\n\t\t\t}\n\t\t}\n\t\tvar comparator = Comparators[self.filepicker.sortField] || Comparators.name\n\t\tfiles = files.sort(function(file1, file2) {\n\t\t\tvar isFavorite = function(fileInfo) {\n\t\t\t\treturn fileInfo.tags && fileInfo.tags.indexOf(OC.TAG_FAVORITE) >= 0\n\t\t\t}\n\n\t\t\tif (isFavorite(file1) && !isFavorite(file2)) {\n\t\t\t\treturn -1\n\t\t\t} else if (!isFavorite(file1) && isFavorite(file2)) {\n\t\t\t\treturn 1\n\t\t\t}\n\n\t\t\treturn self.filepicker.sortOrder === 'asc' ? comparator(file1, file2) : -comparator(file1, file2)\n\t\t})\n\n\t\tself._fillSlug()\n\n\t\tif (files.length === 0) {\n\t\t\tself.$filePicker.find('.emptycontent').show()\n\t\t\tself.$fileListHeader.hide()\n\t\t} else {\n\t\t\tself.$filePicker.find('.emptycontent').hide()\n\t\t\tself.$fileListHeader.show()\n\t\t}\n\n\t\tself.$filelist.empty();\n\n\t\t$.each(files, function(idx, entry) {\n\t\t\tif (entry.isEncrypted && entry.mimetype === 'httpd/unix-directory') {\n\t\t\t\tentry.icon = OC.MimeType.getIconUrl('dir-encrypted')\n\t\t\t} else {\n\t\t\t\tentry.icon = OC.MimeType.getIconUrl(entry.mimetype)\n\t\t\t}\n\n\t\t\tvar simpleSize, sizeColor\n\t\t\tif (typeof (entry.size) !== 'undefined' && entry.size >= 0) {\n\t\t\t\tsimpleSize = OC.Util.humanFileSize(parseInt(entry.size, 10), true)\n\t\t\t\tsizeColor = Math.round(160 - Math.pow((entry.size / (1024 * 1024)), 2))\n\t\t\t} else {\n\t\t\t\tsimpleSize = t('files', 'Pending')\n\t\t\t\tsizeColor = 80\n\t\t\t}\n\n\t\t\t// split the filename in half if the size is bigger than 20 char\n\t\t\t// for ellipsis\n\t\t\tif (entry.name.length >= 10) {\n\t\t\t\t// leave maximum 10 letters\n\t\t\t\tvar split = Math.min(Math.floor(entry.name.length / 2), 10)\n\t\t\t\tvar filename1 = entry.name.substr(0, entry.name.length - split)\n\t\t\t\tvar filename2 = entry.name.substr(entry.name.length - split)\n\t\t\t} else {\n\t\t\t\tvar filename1 = entry.name\n\t\t\t\tvar filename2 = ''\n\t\t\t}\n\n\t\t\tvar $row = self.$listTmpl.octemplate({\n\t\t\t\ttype: entry.type,\n\t\t\t\tdir: dir,\n\t\t\t\tfilename: entry.name,\n\t\t\t\tfilename1: filename1,\n\t\t\t\tfilename2: filename2,\n\t\t\t\tdate: OC.Util.relativeModifiedDate(entry.mtime),\n\t\t\t\tsize: simpleSize,\n\t\t\t\tsizeColor: sizeColor,\n\t\t\t\ticon: entry.icon\n\t\t\t})\n\t\t\tif (entry.type === 'file') {\n\t\t\t\tvar urlSpec = {\n\t\t\t\t\tfile: dir + '/' + entry.name,\n\t\t\t\t\tx: 100,\n\t\t\t\t\ty: 100\n\t\t\t\t}\n\t\t\t\tvar img = new Image()\n\t\t\t\tvar previewUrl = OC.generateUrl('/core/preview.png?') + $.param(urlSpec)\n\t\t\t\timg.onload = function() {\n\t\t\t\t\tif (img.width > 5) {\n\t\t\t\t\t\t$row.find('td.filename').attr('style', 'background-image:url(' + previewUrl + ')')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\timg.src = previewUrl\n\t\t\t}\n\t\t\tself.$filelist.append($row)\n\t\t})\n\n\t\tself.$filelistContainer.removeClass('icon-loading')\n\t},\n\t/**\n\t * fills the tree list with directories\n\t */\n\t_fillSlug: function() {\n\t\tvar addButton = this.$dirTree.find('.actions.creatable').detach()\n\t\tthis.$dirTree.empty()\n\t\tvar self = this\n\n\t\tself.$dirTree.append(addButton)\n\n\t\tvar dir\n\t\tvar path = this.$filePicker.data('path')\n\t\tvar $template = $('<div data-dir=\"{dir}\" tabindex=\"0\"><a>{name}</a></div>').addClass('crumb')\n\t\tif (path) {\n\t\t\tvar paths = path.split('/')\n\t\t\t$.each(paths, function(index, dir) {\n\t\t\t\tdir = paths.pop()\n\t\t\t\tif (dir === '') {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tself.$dirTree.prepend($template.octemplate({\n\t\t\t\t\tdir: paths.join('/') + '/' + dir,\n\t\t\t\t\tname: dir\n\t\t\t\t}))\n\t\t\t})\n\t\t}\n\n\t\t$template.octemplate({\n\t\t\tdir: '',\n\t\t\tname: '' // Ugly but works ;)\n\t\t}, { escapeFunction: null }).prependTo(this.$dirTree)\n\n\t},\n\t/**\n\t * handle selection made in the tree list\n\t */\n\t_handleTreeListSelect: function(event, type) {\n\t\tvar self = event.data\n\t\tvar dir = $(event.target).closest('.crumb').data('dir')\n\t\tself._fillFilePicker(dir)\n\t\tvar getOcDialog = (event.target).closest('.oc-dialog')\n\t\tvar buttonEnableDisable = $('.primary', getOcDialog)\n\t\tthis._changeButtonsText(type, dir.split(/[/]+/).pop())\n\t\tif (this.$filePicker.data('mimetype').indexOf('httpd/unix-directory') !== -1 || this.$filePicker.data('allowDirectoryChooser')) {\n\t\t\tbuttonEnableDisable.prop('disabled', false)\n\t\t} else {\n\t\t\tbuttonEnableDisable.prop('disabled', true)\n\t\t}\n\t},\n\t/**\n\t * handle clicks made in the filepicker\n\t */\n\t_handlePickerClick: function(event, $element, type) {\n\t\tvar getOcDialog = this.$filePicker.closest('.oc-dialog')\n\t\tvar buttonEnableDisable = getOcDialog.find('.primary')\n\t\tif ($element.data('type') === 'file') {\n\t\t\tif (this.$filePicker.data('multiselect') !== true || !event.ctrlKey) {\n\t\t\t\tthis.$filelist.find('.filepicker_element_selected').removeClass('filepicker_element_selected')\n\t\t\t}\n\t\t\t$element.toggleClass('filepicker_element_selected')\n\t\t\tbuttonEnableDisable.prop('disabled', false)\n\t\t} else if ($element.data('type') === 'dir') {\n\t\t\tthis._fillFilePicker(this.$filePicker.data('path') + '/' + $element.data('entryname'))\n\t\t\tthis._changeButtonsText(type, $element.data('entryname'))\n\t\t\tif (this.$filePicker.data('mimetype').indexOf('httpd/unix-directory') !== -1 || this.$filePicker.data('allowDirectoryChooser')) {\n\t\t\t\tbuttonEnableDisable.prop('disabled', false)\n\t\t\t} else {\n\t\t\t\tbuttonEnableDisable.prop('disabled', true)\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Handle\n\t * @param type of action\n\t * @param dir on which to change buttons text\n\t * @private\n\t */\n\t_changeButtonsText: function(type, dir) {\n\t\tvar copyText = dir === '' ? t('core', 'Copy') : t('core', 'Copy to {folder}', { folder: dir })\n\t\tvar moveText = dir === '' ? t('core', 'Move') : t('core', 'Move to {folder}', { folder: dir })\n\t\tvar buttons = $('.oc-dialog-buttonrow button')\n\t\tswitch (type) {\n\t\t\tcase this.FILEPICKER_TYPE_CHOOSE:\n\t\t\t\tbreak\n\t\t\tcase this.FILEPICKER_TYPE_CUSTOM:\n\t\t\t\tbreak\n\t\t\tcase this.FILEPICKER_TYPE_COPY:\n\t\t\t\tbuttons.text(copyText)\n\t\t\t\tbreak\n\t\t\tcase this.FILEPICKER_TYPE_MOVE:\n\t\t\t\tbuttons.text(moveText)\n\t\t\t\tbreak\n\t\t\tcase this.FILEPICKER_TYPE_COPY_MOVE:\n\t\t\t\tbuttons.eq(0).text(copyText)\n\t\t\t\tbuttons.eq(1).text(moveText)\n\t\t\t\tbreak\n\t\t}\n\t}\n}\n\nexport default Dialogs\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 */\n\nimport { emit } from '@nextcloud/event-bus'\n\n/**\n * @private\n * @param {Document} global the document to read the initial value from\n * @param {Function} emit the function to invoke for every new token\n * @return {object}\n */\nexport const manageToken = (global, emit) => {\n\tlet token = global.getElementsByTagName('head')[0].getAttribute('data-requesttoken')\n\n\treturn {\n\t\tgetToken: () => token,\n\t\tsetToken: newToken => {\n\t\t\ttoken = newToken\n\n\t\t\temit('csrf-token-update', {\n\t\t\t\ttoken,\n\t\t\t})\n\t\t},\n\t}\n}\n\nconst manageFromDocument = manageToken(document, emit)\n\n/**\n * @return {string}\n */\nexport const getToken = manageFromDocument.getToken\n\n/**\n * @param {string} newToken new token\n */\nexport const setToken = manageFromDocument.setToken\n","/**\n * @copyright 2012 Robin Appelman icewind1991@gmail.com\n *\n * @author Arthur Schiwon <blizzz@arthur-schiwon.de>\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Lukas Reschke <lukas@statuscode.ch>\n * @author Robin Appelman <robin@icewind.nl>\n * @author Thomas Müller <thomas.mueller@tmit.eu>\n * @author Vincent Petry <vincent@nextcloud.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 */\n\n/* eslint-disable */\nimport $ from 'jquery'\n\nimport { getToken } from './requesttoken'\n\n/**\n * Create a new event source\n * @param {string} src\n * @param {object} [data] to be send as GET\n *\n * @constructs OCEventSource\n */\nconst OCEventSource = function(src, data) {\n\tvar dataStr = ''\n\tvar name\n\tvar joinChar\n\tthis.typelessListeners = []\n\tthis.closed = false\n\tthis.listeners = {}\n\tif (data) {\n\t\tfor (name in data) {\n\t\t\tdataStr += name + '=' + encodeURIComponent(data[name]) + '&'\n\t\t}\n\t}\n\tdataStr += 'requesttoken=' + encodeURIComponent(getToken())\n\tif (!this.useFallBack && typeof EventSource !== 'undefined') {\n\t\tjoinChar = '&'\n\t\tif (src.indexOf('?') === -1) {\n\t\t\tjoinChar = '?'\n\t\t}\n\t\tthis.source = new EventSource(src + joinChar + dataStr)\n\t\tthis.source.onmessage = function(e) {\n\t\t\tfor (var i = 0; i < this.typelessListeners.length; i++) {\n\t\t\t\tthis.typelessListeners[i](JSON.parse(e.data))\n\t\t\t}\n\t\t}.bind(this)\n\t} else {\n\t\tvar iframeId = 'oc_eventsource_iframe_' + OCEventSource.iframeCount\n\t\tOCEventSource.fallBackSources[OCEventSource.iframeCount] = this\n\t\tthis.iframe = $('<iframe></iframe>')\n\t\tthis.iframe.attr('id', iframeId)\n\t\tthis.iframe.hide()\n\n\t\tjoinChar = '&'\n\t\tif (src.indexOf('?') === -1) {\n\t\t\tjoinChar = '?'\n\t\t}\n\t\tthis.iframe.attr('src', src + joinChar + 'fallback=true&fallback_id=' + OCEventSource.iframeCount + '&' + dataStr)\n\t\t$('body').append(this.iframe)\n\t\tthis.useFallBack = true\n\t\tOCEventSource.iframeCount++\n\t}\n\t// add close listener\n\tthis.listen('__internal__', function(data) {\n\t\tif (data === 'close') {\n\t\t\tthis.close()\n\t\t}\n\t}.bind(this))\n}\nOCEventSource.fallBackSources = []\nOCEventSource.iframeCount = 0// number of fallback iframes\nOCEventSource.fallBackCallBack = function(id, type, data) {\n\tOCEventSource.fallBackSources[id].fallBackCallBack(type, data)\n}\nOCEventSource.prototype = {\n\ttypelessListeners: [],\n\tiframe: null,\n\tlisteners: {}, // only for fallback\n\tuseFallBack: false,\n\t/**\n\t * Fallback callback for browsers that don't have the\n\t * native EventSource object.\n\t *\n\t * Calls the registered listeners.\n\t *\n\t * @private\n\t * @param {String} type event type\n\t * @param {Object} data received data\n\t */\n\tfallBackCallBack: function(type, data) {\n\t\tvar i\n\t\t// ignore messages that might appear after closing\n\t\tif (this.closed) {\n\t\t\treturn\n\t\t}\n\t\tif (type) {\n\t\t\tif (typeof this.listeners.done !== 'undefined') {\n\t\t\t\tfor (i = 0; i < this.listeners[type].length; i++) {\n\t\t\t\t\tthis.listeners[type][i](data)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (i = 0; i < this.typelessListeners.length; i++) {\n\t\t\t\tthis.typelessListeners[i](data)\n\t\t\t}\n\t\t}\n\t},\n\tlastLength: 0, // for fallback\n\t/**\n\t * Listen to a given type of events.\n\t *\n\t * @param {String} type event type\n\t * @param {Function} callback event callback\n\t */\n\tlisten: function(type, callback) {\n\t\tif (callback && callback.call) {\n\n\t\t\tif (type) {\n\t\t\t\tif (this.useFallBack) {\n\t\t\t\t\tif (!this.listeners[type]) {\n\t\t\t\t\t\tthis.listeners[type] = []\n\t\t\t\t\t}\n\t\t\t\t\tthis.listeners[type].push(callback)\n\t\t\t\t} else {\n\t\t\t\t\tthis.source.addEventListener(type, function(e) {\n\t\t\t\t\t\tif (typeof e.data !== 'undefined') {\n\t\t\t\t\t\t\tcallback(JSON.parse(e.data))\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcallback('')\n\t\t\t\t\t\t}\n\t\t\t\t\t}, false)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.typelessListeners.push(callback)\n\t\t\t}\n\t\t}\n\t},\n\t/**\n\t * Closes this event source.\n\t */\n\tclose: function() {\n\t\tthis.closed = true\n\t\tif (typeof this.source !== 'undefined') {\n\t\t\tthis.source.close()\n\t\t}\n\t}\n}\n\nexport default OCEventSource\n","/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Daniel Calviño Sánchez <danxuliu@gmail.com>\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 */\n\nimport _ from 'underscore'\n/** @typedef {import('jquery')} jQuery */\nimport $ from 'jquery'\n\nimport { menuSpeed } from './constants'\n\nexport let currentMenu = null\nexport let currentMenuToggle = null\n\n/**\n * For menu toggling\n *\n * @param {jQuery} $toggle the toggle element\n * @param {jQuery} $menuEl the menu container element\n * @param {Function | undefined} toggle callback invoked everytime the menu is opened\n * @param {boolean} headerMenu is this a top right header menu?\n * @return {void}\n */\nexport const registerMenu = function($toggle, $menuEl, toggle, headerMenu) {\n\t$menuEl.addClass('menu')\n\tconst isClickableElement = $toggle.prop('tagName') === 'A' || $toggle.prop('tagName') === 'BUTTON'\n\n\t// On link and button, the enter key trigger a click event\n\t// Only use the click to avoid two fired events\n\t$toggle.on(isClickableElement ? 'click.menu' : 'click.menu keyup.menu', function(event) {\n\t\t// prevent the link event (append anchor to URL)\n\t\tevent.preventDefault()\n\n\t\t// allow enter key as a trigger\n\t\tif (event.key && event.key !== 'Enter') {\n\t\t\treturn\n\t\t}\n\n\t\tif ($menuEl.is(currentMenu)) {\n\t\t\thideMenus()\n\t\t\treturn\n\t\t} else if (currentMenu) {\n\t\t\t// another menu was open?\n\t\t\t// close it\n\t\t\thideMenus()\n\t\t}\n\n\t\tif (headerMenu === true) {\n\t\t\t$menuEl.parent().addClass('openedMenu')\n\t\t}\n\n\t\t// Set menu to expanded\n\t\t$toggle.attr('aria-expanded', true)\n\n\t\t$menuEl.slideToggle(menuSpeed, toggle)\n\t\tcurrentMenu = $menuEl\n\t\tcurrentMenuToggle = $toggle\n\t})\n}\n\n/**\n * Unregister a previously registered menu\n *\n * @param {jQuery} $toggle the toggle element\n * @param {jQuery} $menuEl the menu container element\n */\nexport const unregisterMenu = ($toggle, $menuEl) => {\n\t// close menu if opened\n\tif ($menuEl.is(currentMenu)) {\n\t\thideMenus()\n\t}\n\t$toggle.off('click.menu').removeClass('menutoggle')\n\t$menuEl.removeClass('menu')\n}\n\n/**\n * Hides any open menus\n *\n * @param {Function} complete callback when the hiding animation is done\n */\nexport const hideMenus = function(complete) {\n\tif (currentMenu) {\n\t\tconst lastMenu = currentMenu\n\t\tcurrentMenu.trigger(new $.Event('beforeHide'))\n\t\tcurrentMenu.slideUp(menuSpeed, function() {\n\t\t\tlastMenu.trigger(new $.Event('afterHide'))\n\t\t\tif (complete) {\n\t\t\t\tcomplete.apply(this, arguments)\n\t\t\t}\n\t\t})\n\t}\n\n\t// Set menu to closed\n\t$('.menutoggle').attr('aria-expanded', false)\n\tif (currentMenuToggle) {\n\t\tcurrentMenuToggle.attr('aria-expanded', false)\n\t}\n\n\t$('.openedMenu').removeClass('openedMenu')\n\tcurrentMenu = null\n\tcurrentMenuToggle = null\n}\n\n/**\n * Shows a given element as menu\n *\n * @param {object} [$toggle=null] menu toggle\n * @param {object} $menuEl menu element\n * @param {Function} complete callback when the showing animation is done\n */\nexport const showMenu = ($toggle, $menuEl, complete) => {\n\tif ($menuEl.is(currentMenu)) {\n\t\treturn\n\t}\n\thideMenus()\n\tcurrentMenu = $menuEl\n\tcurrentMenuToggle = $toggle\n\t$menuEl.trigger(new $.Event('beforeShow'))\n\t$menuEl.show()\n\t$menuEl.trigger(new $.Event('afterShow'))\n\t// no animation\n\tif (_.isFunction(complete)) {\n\t\tcomplete()\n\t}\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 */\n\nexport const coreApps = ['', 'admin', 'log', 'core/search', 'core', '3rdparty']\nexport const menuSpeed = 50\nexport const PERMISSION_NONE = 0\nexport const PERMISSION_CREATE = 4\nexport const PERMISSION_READ = 1\nexport const PERMISSION_UPDATE = 2\nexport const PERMISSION_DELETE = 8\nexport const PERMISSION_SHARE = 16\nexport const PERMISSION_ALL = 31\nexport const TAG_FAVORITE = '_$!<Favorite>!$_'\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 */\n\nconst isAdmin = !!window._oc_isadmin\n\n/**\n * Returns whether the current user is an administrator\n *\n * @return {boolean} true if the user is an admin, false otherwise\n * @since 9.0.0\n */\nexport const isUserAdmin = () => isAdmin\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 */\n\n// This var is global because it's shared across webpack bundles\nwindow._oc_l10n_registry_translations = window._oc_l10n_registry_translations || {}\nwindow._oc_l10n_registry_plural_functions = window._oc_l10n_registry_plural_functions || {}\n\n/**\n * @param {string} appId the app id\n * @param {object} translations the translations list\n * @param {Function} pluralFunction the translations list\n */\nconst register = (appId, translations, pluralFunction) => {\n\twindow._oc_l10n_registry_translations[appId] = translations\n\twindow._oc_l10n_registry_plural_functions[appId] = pluralFunction\n}\n\n/**\n * @param {string} appId the app id\n * @param {object} translations the translations list\n * @param {Function} pluralFunction the translations list\n */\nconst extend = (appId, translations, pluralFunction) => {\n\twindow._oc_l10n_registry_translations[appId] = Object.assign(\n\t\twindow._oc_l10n_registry_translations[appId],\n\t\ttranslations\n\t)\n\twindow._oc_l10n_registry_plural_functions[appId] = pluralFunction\n}\n\n/**\n * @param {string} appId the app id\n * @param {object} translations the translations list\n * @param {Function} pluralFunction the translations list\n */\nexport const registerAppTranslations = (appId, translations, pluralFunction) => {\n\tif (!hasAppTranslations(appId)) {\n\t\tregister(appId, translations, pluralFunction)\n\t} else {\n\t\textend(appId, translations, pluralFunction)\n\t}\n}\n\n/**\n * @param {string} appId the app id\n */\nexport const unregisterAppTranslations = appId => {\n\tdelete window._oc_l10n_registry_translations[appId]\n\tdelete window._oc_l10n_registry_plural_functions[appId]\n}\n\n/**\n * @param {string} appId the app id\n * @return {boolean}\n */\nexport const hasAppTranslations = appId => {\n\treturn window._oc_l10n_registry_translations[appId] !== undefined\n\t\t&& window._oc_l10n_registry_plural_functions[appId] !== undefined\n}\n\n/**\n * @param {string} appId the app id\n * @return {object}\n */\nexport const getAppTranslations = appId => {\n\treturn {\n\t\ttranslations: window._oc_l10n_registry_translations[appId] || {},\n\t\tpluralFunction: window._oc_l10n_registry_plural_functions[appId],\n\t}\n}\n","/**\n * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>\n * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)\n * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Daniel Kesselberg <mail@danielkesselberg.de>\n * @author Joas Schilling <coding@schilljs.com>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Morris Jobke <hey@morrisjobke.de>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n * @author Vincent Petry <vincent@nextcloud.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 */\n\nimport _ from 'underscore'\nimport $ from 'jquery'\nimport DOMPurify from 'dompurify'\nimport Handlebars from 'handlebars'\nimport identity from 'lodash/fp/identity'\nimport escapeHTML from 'escape-html'\nimport { generateFilePath } from '@nextcloud/router'\n\nimport OC from './index'\nimport {\n\tgetAppTranslations,\n\thasAppTranslations,\n\tregisterAppTranslations,\n\tunregisterAppTranslations,\n} from './l10n-registry'\n\n/**\n * L10N namespace with localization functions.\n *\n * @namespace OC.L10n\n */\nconst L10n = {\n\n\t/**\n\t * Load an app's translation bundle if not loaded already.\n\t *\n\t * @param {string} appName name of the app\n\t * @param {Function} callback callback to be called when\n\t * the translations are loaded\n\t * @return {Promise} promise\n\t */\n\tload(appName, callback) {\n\t\t// already available ?\n\t\tif (hasAppTranslations(appName) || OC.getLocale() === 'en') {\n\t\t\tconst deferred = $.Deferred()\n\t\t\tconst promise = deferred.promise()\n\t\t\tpromise.then(callback)\n\t\t\tdeferred.resolve()\n\t\t\treturn promise\n\t\t}\n\n\t\tconst self = this\n\t\tconst url = generateFilePath(appName, 'l10n', OC.getLocale() + '.json')\n\n\t\t// load JSON translation bundle per AJAX\n\t\treturn $.get(url)\n\t\t\t.then(\n\t\t\t\tfunction(result) {\n\t\t\t\t\tif (result.translations) {\n\t\t\t\t\t\tself.register(appName, result.translations, result.pluralForm)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t.then(callback)\n\t},\n\n\t/**\n\t * Register an app's translation bundle.\n\t *\n\t * @param {string} appName name of the app\n\t * @param {Object<string, string>} bundle bundle\n\t */\n\tregister(appName, bundle) {\n\t\tregisterAppTranslations(appName, bundle, this._getPlural)\n\t},\n\n\t/**\n\t * @private\n\t */\n\t_unregister: unregisterAppTranslations,\n\n\t/**\n\t * Translate a string\n\t *\n\t * @param {string} app the id of the app for which to translate the string\n\t * @param {string} text the string to translate\n\t * @param {object} [vars] map of placeholder key to value\n\t * @param {number} [count] number to replace %n with\n\t * @param {Array} [options] options array\n\t * @param {boolean} [options.escape=true] enable/disable auto escape of placeholders (by default enabled)\n\t * @param {boolean} [options.sanitize=true] enable/disable sanitization (by default enabled)\n\t * @return {string}\n\t */\n\ttranslate(app, text, vars, count, options) {\n\t\tconst defaultOptions = {\n\t\t\tescape: true,\n\t\t\tsanitize: true,\n\t\t}\n\t\tconst allOptions = options || {}\n\t\t_.defaults(allOptions, defaultOptions)\n\n\t\tconst optSanitize = allOptions.sanitize ? DOMPurify.sanitize : identity\n\t\tconst optEscape = allOptions.escape ? escapeHTML : identity\n\n\t\t// TODO: cache this function to avoid inline recreation\n\t\t// of the same function over and over again in case\n\t\t// translate() is used in a loop\n\t\tconst _build = function(text, vars, count) {\n\t\t\treturn text.replace(/%n/g, count).replace(/{([^{}]*)}/g,\n\t\t\t\tfunction(a, b) {\n\t\t\t\t\tconst r = vars[b]\n\t\t\t\t\tif (typeof r === 'string' || typeof r === 'number') {\n\t\t\t\t\t\treturn optSanitize(optEscape(r))\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn optSanitize(a)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t)\n\t\t}\n\t\tlet translation = text\n\t\tconst bundle = getAppTranslations(app)\n\t\tconst value = bundle.translations[text]\n\t\tif (typeof (value) !== 'undefined') {\n\t\t\ttranslation = value\n\t\t}\n\n\t\tif (typeof vars === 'object' || count !== undefined) {\n\t\t\treturn optSanitize(_build(translation, vars, count))\n\t\t} else {\n\t\t\treturn optSanitize(translation)\n\t\t}\n\t},\n\n\t/**\n\t * Translate a plural string\n\t *\n\t * @param {string} app the id of the app for which to translate the string\n\t * @param {string} textSingular the string to translate for exactly one object\n\t * @param {string} textPlural the string to translate for n objects\n\t * @param {number} count number to determine whether to use singular or plural\n\t * @param {object} [vars] map of placeholder key to value\n\t * @param {Array} [options] options array\n\t * @param {boolean} [options.escape=true] enable/disable auto escape of placeholders (by default enabled)\n\t * @return {string} Translated string\n\t */\n\ttranslatePlural(app, textSingular, textPlural, count, vars, options) {\n\t\tconst identifier = '_' + textSingular + '_::_' + textPlural + '_'\n\t\tconst bundle = getAppTranslations(app)\n\t\tconst value = bundle.translations[identifier]\n\t\tif (typeof (value) !== 'undefined') {\n\t\t\tconst translation = value\n\t\t\tif ($.isArray(translation)) {\n\t\t\t\tconst plural = bundle.pluralFunction(count)\n\t\t\t\treturn this.translate(app, translation[plural], vars, count, options)\n\t\t\t}\n\t\t}\n\n\t\tif (count === 1) {\n\t\t\treturn this.translate(app, textSingular, vars, count, options)\n\t\t} else {\n\t\t\treturn this.translate(app, textPlural, vars, count, options)\n\t\t}\n\t},\n\n\t/**\n\t * The plural function taken from symfony\n\t *\n\t * @param {number} number the number of elements\n\t * @return {number}\n\t * @private\n\t */\n\t_getPlural(number) {\n\t\tlet language = OC.getLanguage()\n\t\tif (language === 'pt-BR') {\n\t\t\t// temporary set a locale for brazilian\n\t\t\tlanguage = 'xbr'\n\t\t}\n\n\t\tif (typeof language === 'undefined' || language === '') {\n\t\t\treturn (number === 1) ? 0 : 1\n\t\t}\n\n\t\tif (language.length > 3) {\n\t\t\tlanguage = language.substring(0, language.lastIndexOf('-'))\n\t\t}\n\n\t\t/*\n\t\t * The plural rules are derived from code of the Zend Framework (2010-09-25),\n\t\t * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd).\n\t\t * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)\n\t\t */\n\t\tswitch (language) {\n\t\tcase 'az':\n\t\tcase 'bo':\n\t\tcase 'dz':\n\t\tcase 'id':\n\t\tcase 'ja':\n\t\tcase 'jv':\n\t\tcase 'ka':\n\t\tcase 'km':\n\t\tcase 'kn':\n\t\tcase 'ko':\n\t\tcase 'ms':\n\t\tcase 'th':\n\t\tcase 'tr':\n\t\tcase 'vi':\n\t\tcase 'zh':\n\t\t\treturn 0\n\n\t\tcase 'af':\n\t\tcase 'bn':\n\t\tcase 'bg':\n\t\tcase 'ca':\n\t\tcase 'da':\n\t\tcase 'de':\n\t\tcase 'el':\n\t\tcase 'en':\n\t\tcase 'eo':\n\t\tcase 'es':\n\t\tcase 'et':\n\t\tcase 'eu':\n\t\tcase 'fa':\n\t\tcase 'fi':\n\t\tcase 'fo':\n\t\tcase 'fur':\n\t\tcase 'fy':\n\t\tcase 'gl':\n\t\tcase 'gu':\n\t\tcase 'ha':\n\t\tcase 'he':\n\t\tcase 'hu':\n\t\tcase 'is':\n\t\tcase 'it':\n\t\tcase 'ku':\n\t\tcase 'lb':\n\t\tcase 'ml':\n\t\tcase 'mn':\n\t\tcase 'mr':\n\t\tcase 'nah':\n\t\tcase 'nb':\n\t\tcase 'ne':\n\t\tcase 'nl':\n\t\tcase 'nn':\n\t\tcase 'no':\n\t\tcase 'oc':\n\t\tcase 'om':\n\t\tcase 'or':\n\t\tcase 'pa':\n\t\tcase 'pap':\n\t\tcase 'ps':\n\t\tcase 'pt':\n\t\tcase 'so':\n\t\tcase 'sq':\n\t\tcase 'sv':\n\t\tcase 'sw':\n\t\tcase 'ta':\n\t\tcase 'te':\n\t\tcase 'tk':\n\t\tcase 'ur':\n\t\tcase 'zu':\n\t\t\treturn (number === 1) ? 0 : 1\n\n\t\tcase 'am':\n\t\tcase 'bh':\n\t\tcase 'fil':\n\t\tcase 'fr':\n\t\tcase 'gun':\n\t\tcase 'hi':\n\t\tcase 'hy':\n\t\tcase 'ln':\n\t\tcase 'mg':\n\t\tcase 'nso':\n\t\tcase 'xbr':\n\t\tcase 'ti':\n\t\tcase 'wa':\n\t\t\treturn ((number === 0) || (number === 1)) ? 0 : 1\n\n\t\tcase 'be':\n\t\tcase 'bs':\n\t\tcase 'hr':\n\t\tcase 'ru':\n\t\tcase 'sh':\n\t\tcase 'sr':\n\t\tcase 'uk':\n\t\t\treturn ((number % 10 === 1) && (number % 100 !== 11)) ? 0 : (((number % 10 >= 2) && (number % 10 <= 4) && ((number % 100 < 10) || (number % 100 >= 20))) ? 1 : 2)\n\n\t\tcase 'cs':\n\t\tcase 'sk':\n\t\t\treturn (number === 1) ? 0 : (((number >= 2) && (number <= 4)) ? 1 : 2)\n\n\t\tcase 'ga':\n\t\t\treturn (number === 1) ? 0 : ((number === 2) ? 1 : 2)\n\n\t\tcase 'lt':\n\t\t\treturn ((number % 10 === 1) && (number % 100 !== 11)) ? 0 : (((number % 10 >= 2) && ((number % 100 < 10) || (number % 100 >= 20))) ? 1 : 2)\n\n\t\tcase 'sl':\n\t\t\treturn (number % 100 === 1) ? 0 : ((number % 100 === 2) ? 1 : (((number % 100 === 3) || (number % 100 === 4)) ? 2 : 3))\n\n\t\tcase 'mk':\n\t\t\treturn (number % 10 === 1) ? 0 : 1\n\n\t\tcase 'mt':\n\t\t\treturn (number === 1) ? 0 : (((number === 0) || ((number % 100 > 1) && (number % 100 < 11))) ? 1 : (((number % 100 > 10) && (number % 100 < 20)) ? 2 : 3))\n\n\t\tcase 'lv':\n\t\t\treturn (number === 0) ? 0 : (((number % 10 === 1) && (number % 100 !== 11)) ? 1 : 2)\n\n\t\tcase 'pl':\n\t\t\treturn (number === 1) ? 0 : (((number % 10 >= 2) && (number % 10 <= 4) && ((number % 100 < 12) || (number % 100 > 14))) ? 1 : 2)\n\n\t\tcase 'cy':\n\t\t\treturn (number === 1) ? 0 : ((number === 2) ? 1 : (((number === 8) || (number === 11)) ? 2 : 3))\n\n\t\tcase 'ro':\n\t\t\treturn (number === 1) ? 0 : (((number === 0) || ((number % 100 > 0) && (number % 100 < 20))) ? 1 : 2)\n\n\t\tcase 'ar':\n\t\t\treturn (number === 0) ? 0 : ((number === 1) ? 1 : ((number === 2) ? 2 : (((number % 100 >= 3) && (number % 100 <= 10)) ? 3 : (((number % 100 >= 11) && (number % 100 <= 99)) ? 4 : 5))))\n\n\t\tdefault:\n\t\t\treturn 0\n\t\t}\n\t},\n}\n\nexport default L10n\n\n/**\n * Returns the user's locale\n *\n * @return {string} locale string\n */\nexport const getLocale = () => $('html').data('locale') ?? 'en'\n\n/**\n * Returns the user's language\n *\n * @return {string} language string\n */\nexport const getLanguage = () => $('html').prop('lang')\n\nHandlebars.registerHelper('t', function(app, text) {\n\treturn L10n.translate(app, text)\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 * @author rakekniven <mark.ziegler@rakekniven.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 */\n\nimport $ from 'jquery'\n\n/**\n * A little class to manage a status field for a \"saving\" process.\n * It can be used to display a starting message (e.g. \"Saving...\") and then\n * replace it with a green success message or a red error message.\n *\n * @namespace OC.msg\n */\nexport default {\n\t/**\n\t * Displayes a \"Saving...\" message in the given message placeholder\n\t *\n\t * @param {object} selector Placeholder to display the message in\n\t */\n\tstartSaving(selector) {\n\t\tthis.startAction(selector, t('core', 'Saving …'))\n\t},\n\n\t/**\n\t * Displayes a custom message in the given message placeholder\n\t *\n\t * @param {object} selector Placeholder to display the message in\n\t * @param {string} message Plain text message to display (no HTML allowed)\n\t */\n\tstartAction(selector, message) {\n\t\t$(selector).text(message)\n\t\t\t.removeClass('success')\n\t\t\t.removeClass('error')\n\t\t\t.stop(true, true)\n\t\t\t.show()\n\t},\n\n\t/**\n\t * Displayes an success/error message in the given selector\n\t *\n\t * @param {object} selector Placeholder to display the message in\n\t * @param {object} response Response of the server\n\t * @param {object} response.data Data of the servers response\n\t * @param {string} response.data.message Plain text message to display (no HTML allowed)\n\t * @param {string} response.status is being used to decide whether the message\n\t * is displayed as an error/success\n\t */\n\tfinishedSaving(selector, response) {\n\t\tthis.finishedAction(selector, response)\n\t},\n\n\t/**\n\t * Displayes an success/error message in the given selector\n\t *\n\t * @param {object} selector Placeholder to display the message in\n\t * @param {object} response Response of the server\n\t * @param {object} response.data Data of the servers response\n\t * @param {string} response.data.message Plain text message to display (no HTML allowed)\n\t * @param {string} response.status is being used to decide whether the message\n\t * is displayed as an error/success\n\t */\n\tfinishedAction(selector, response) {\n\t\tif (response.status === 'success') {\n\t\t\tthis.finishedSuccess(selector, response.data.message)\n\t\t} else {\n\t\t\tthis.finishedError(selector, response.data.message)\n\t\t}\n\t},\n\n\t/**\n\t * Displayes an success message in the given selector\n\t *\n\t * @param {object} selector Placeholder to display the message in\n\t * @param {string} message Plain text success message to display (no HTML allowed)\n\t */\n\tfinishedSuccess(selector, message) {\n\t\t$(selector).text(message)\n\t\t\t.addClass('success')\n\t\t\t.removeClass('error')\n\t\t\t.stop(true, true)\n\t\t\t.delay(3000)\n\t\t\t.fadeOut(900)\n\t\t\t.show()\n\t},\n\n\t/**\n\t * Displayes an error message in the given selector\n\t *\n\t * @param {object} selector Placeholder to display the message in\n\t * @param {string} message Plain text error message to display (no HTML allowed)\n\t */\n\tfinishedError(selector, message) {\n\t\t$(selector).text(message)\n\t\t\t.addClass('error')\n\t\t\t.removeClass('success')\n\t\t\t.show()\n\t},\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 * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport _ from 'underscore'\nimport $ from 'jquery'\nimport moment from 'moment'\nimport { generateUrl } from '@nextcloud/router'\n\nimport OC from './index'\n\n/**\n * @namespace OC.PasswordConfirmation\n */\nexport default {\n\tcallback: null,\n\n\tpageLoadTime: null,\n\n\tinit() {\n\t\t$('.password-confirm-required').on('click', _.bind(this.requirePasswordConfirmation, this))\n\t\tthis.pageLoadTime = moment.now()\n\t},\n\n\trequiresPasswordConfirmation() {\n\t\tconst serverTimeDiff = this.pageLoadTime - (window.nc_pageLoad * 1000)\n\t\tconst timeSinceLogin = moment.now() - (serverTimeDiff + (window.nc_lastLogin * 1000))\n\n\t\t// if timeSinceLogin > 30 minutes and user backend allows password confirmation\n\t\treturn (window.backendAllowsPasswordConfirmation && timeSinceLogin > 30 * 60 * 1000)\n\t},\n\n\t/**\n\t * @param {Function} callback success callback function\n\t * @param {object} options options\n\t * @param {Function} rejectCallback error callback function\n\t */\n\trequirePasswordConfirmation(callback, options, rejectCallback) {\n\t\toptions = typeof options !== 'undefined' ? options : {}\n\t\tconst defaults = {\n\t\t\ttitle: t('core', 'Authentication required'),\n\t\t\ttext: t(\n\t\t\t\t'core',\n\t\t\t\t'This action requires you to confirm your password'\n\t\t\t),\n\t\t\tconfirm: t('core', 'Confirm'),\n\t\t\tlabel: t('core', 'Password'),\n\t\t\terror: '',\n\t\t}\n\n\t\tconst config = _.extend(defaults, options)\n\n\t\tconst self = this\n\n\t\tif (this.requiresPasswordConfirmation()) {\n\t\t\tOC.dialogs.prompt(\n\t\t\t\tconfig.text,\n\t\t\t\tconfig.title,\n\t\t\t\tfunction(result, password) {\n\t\t\t\t\tif (result && password !== '') {\n\t\t\t\t\t\tself._confirmPassword(password, config)\n\t\t\t\t\t} else if (_.isFunction(rejectCallback)) {\n\t\t\t\t\t\trejectCallback()\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t\tconfig.label,\n\t\t\t\ttrue\n\t\t\t).then(function() {\n\t\t\t\tconst $dialog = $('.oc-dialog:visible')\n\t\t\t\t$dialog.find('.ui-icon').remove()\n\t\t\t\t$dialog.addClass('password-confirmation')\n\t\t\t\tif (config.error !== '') {\n\t\t\t\t\tconst $error = $('<p></p>').addClass('msg warning').text(config.error)\n\t\t\t\t\t$dialog.find('.oc-dialog-content').append($error)\n\t\t\t\t}\n\t\t\t\t$dialog.find('.oc-dialog-buttonrow').addClass('aside')\n\n\t\t\t\tconst $buttons = $dialog.find('button')\n\t\t\t\t$buttons.eq(0).hide()\n\t\t\t\t$buttons.eq(1).text(config.confirm)\n\t\t\t})\n\t\t}\n\n\t\tthis.callback = callback\n\t},\n\n\t_confirmPassword(password, config) {\n\t\tconst self = this\n\n\t\t$.ajax({\n\t\t\turl: generateUrl('/login/confirm'),\n\t\t\tdata: {\n\t\t\t\tpassword,\n\t\t\t},\n\t\t\ttype: 'POST',\n\t\t\tsuccess(response) {\n\t\t\t\twindow.nc_lastLogin = response.lastLogin\n\n\t\t\t\tif (_.isFunction(self.callback)) {\n\t\t\t\t\tself.callback()\n\t\t\t\t}\n\t\t\t},\n\t\t\terror() {\n\t\t\t\tconfig.error = t('core', 'Failed to authenticate, try again')\n\t\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(self.callback, config)\n\t\t\t},\n\t\t})\n\t},\n}\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 */\n\nexport const theme = window._theme || {}\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 */\n\nimport _ from 'underscore'\nimport OC from './index'\n\n/**\n * Utility class for the history API,\n * includes fallback to using the URL hash when\n * the browser doesn't support the history API.\n *\n * @namespace OC.Util.History\n */\nexport default {\n\n\t_handlers: [],\n\n\t/**\n\t * Push the current URL parameters to the history stack\n\t * and change the visible URL.\n\t * Note: this includes a workaround for IE8/IE9 that uses\n\t * the hash part instead of the search part.\n\t *\n\t * @param {object | string} params to append to the URL, can be either a string\n\t * or a map\n\t * @param {string} [url] URL to be used, otherwise the current URL will be used,\n\t * using the params as query string\n\t * @param {boolean} [replace=false] whether to replace instead of pushing\n\t */\n\t_pushState(params, url, replace) {\n\t\tlet strParams\n\t\tif (typeof (params) === 'string') {\n\t\t\tstrParams = params\n\t\t} else {\n\t\t\tstrParams = OC.buildQueryString(params)\n\t\t}\n\n\t\tif (window.history.pushState) {\n\t\t\turl = url || location.pathname + '?' + strParams\n\t\t\t// Workaround for bug with SVG and window.history.pushState on Firefox < 51\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=652991\n\t\t\tconst isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1\n\t\t\tif (isFirefox && parseInt(navigator.userAgent.split('/').pop()) < 51) {\n\t\t\t\tconst patterns = document.querySelectorAll('[fill^=\"url(#\"], [stroke^=\"url(#\"], [filter^=\"url(#invert\"]')\n\t\t\t\tfor (let i = 0, ii = patterns.length, pattern; i < ii; i++) {\n\t\t\t\t\tpattern = patterns[i]\n\t\t\t\t\t// eslint-disable-next-line no-self-assign\n\t\t\t\t\tpattern.style.fill = pattern.style.fill\n\t\t\t\t\t// eslint-disable-next-line no-self-assign\n\t\t\t\t\tpattern.style.stroke = pattern.style.stroke\n\t\t\t\t\tpattern.removeAttribute('filter')\n\t\t\t\t\tpattern.setAttribute('filter', 'url(#invert)')\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (replace) {\n\t\t\t\twindow.history.replaceState(params, '', url)\n\t\t\t} else {\n\t\t\t\twindow.history.pushState(params, '', url)\n\t\t\t}\n\t\t} else {\n\t\t\t// use URL hash for IE8\n\t\t\twindow.location.hash = '?' + strParams\n\t\t\t// inhibit next onhashchange that just added itself\n\t\t\t// to the event queue\n\t\t\tthis._cancelPop = true\n\t\t}\n\t},\n\n\t/**\n\t * Push the current URL parameters to the history stack\n\t * and change the visible URL.\n\t * Note: this includes a workaround for IE8/IE9 that uses\n\t * the hash part instead of the search part.\n\t *\n\t * @param {object | string} params to append to the URL, can be either a string or a map\n\t * @param {string} [url] URL to be used, otherwise the current URL will be used, using the params as query string\n\t */\n\tpushState(params, url) {\n\t\tthis._pushState(params, url, false)\n\t},\n\n\t/**\n\t * Push the current URL parameters to the history stack\n\t * and change the visible URL.\n\t * Note: this includes a workaround for IE8/IE9 that uses\n\t * the hash part instead of the search part.\n\t *\n\t * @param {object | string} params to append to the URL, can be either a string\n\t * or a map\n\t * @param {string} [url] URL to be used, otherwise the current URL will be used,\n\t * using the params as query string\n\t */\n\treplaceState(params, url) {\n\t\tthis._pushState(params, url, true)\n\t},\n\n\t/**\n\t * Add a popstate handler\n\t *\n\t * @param {Function} handler handler\n\t */\n\taddOnPopStateHandler(handler) {\n\t\tthis._handlers.push(handler)\n\t},\n\n\t/**\n\t * Parse a query string from the hash part of the URL.\n\t * (workaround for IE8 / IE9)\n\t *\n\t * @return {string}\n\t */\n\t_parseHashQuery() {\n\t\tconst hash = window.location.hash\n\t\tconst pos = hash.indexOf('?')\n\t\tif (pos >= 0) {\n\t\t\treturn hash.substr(pos + 1)\n\t\t}\n\t\tif (hash.length) {\n\t\t\t// remove hash sign\n\t\t\treturn hash.substr(1)\n\t\t}\n\t\treturn ''\n\t},\n\n\t_decodeQuery(query) {\n\t\treturn query.replace(/\\+/g, ' ')\n\t},\n\n\t/**\n\t * Parse the query/search part of the URL.\n\t * Also try and parse it from the URL hash (for IE8)\n\t *\n\t * @return {object} map of parameters\n\t */\n\tparseUrlQuery() {\n\t\tconst query = this._parseHashQuery()\n\t\tlet params\n\t\t// try and parse from URL hash first\n\t\tif (query) {\n\t\t\tparams = OC.parseQueryString(this._decodeQuery(query))\n\t\t}\n\t\t// else read from query attributes\n\t\tparams = _.extend(params || {}, OC.parseQueryString(this._decodeQuery(location.search)))\n\t\treturn params || {}\n\t},\n\n\t_onPopState(e) {\n\t\tif (this._cancelPop) {\n\t\t\tthis._cancelPop = false\n\t\t\treturn\n\t\t}\n\t\tlet params\n\t\tif (!this._handlers.length) {\n\t\t\treturn\n\t\t}\n\t\tparams = (e && e.state)\n\t\tif (_.isString(params)) {\n\t\t\tparams = OC.parseQueryString(params)\n\t\t} else if (!params) {\n\t\t\tparams = this.parseUrlQuery() || {}\n\t\t}\n\t\tfor (let i = 0; i < this._handlers.length; i++) {\n\t\t\tthis._handlers[i](params)\n\t\t}\n\t},\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 */\n\nimport moment from 'moment'\n\nimport History from './util-history'\nimport OC from './index'\nimport { formatFileSize as humanFileSize } from '@nextcloud/files'\n\n/**\n * @param {any} t -\n */\nfunction chunkify(t) {\n\t// Adapted from http://my.opera.com/GreyWyvern/blog/show.dml/1671288\n\tconst tz = []\n\tlet x = 0\n\tlet y = -1\n\tlet n = 0\n\tlet c\n\n\twhile (x < t.length) {\n\t\tc = t.charAt(x)\n\t\t// only include the dot in strings\n\t\tconst m = ((!n && c === '.') || (c >= '0' && c <= '9'))\n\t\tif (m !== n) {\n\t\t\t// next chunk\n\t\t\ty++\n\t\t\ttz[y] = ''\n\t\t\tn = m\n\t\t}\n\t\ttz[y] += c\n\t\tx++\n\t}\n\treturn tz\n}\n\n/**\n * Utility functions\n *\n * @namespace OC.Util\n */\nexport default {\n\n\tHistory,\n\n\t/**\n\t * @deprecated use https://nextcloud.github.io/nextcloud-files/modules/_humanfilesize_.html#formatfilesize\n\t */\n\thumanFileSize,\n\n\t/**\n\t * Returns a file size in bytes from a humanly readable string\n\t * Makes 2kB to 2048.\n\t * Inspired by computerFileSize in helper.php\n\t *\n\t * @param {string} string file size in human readable format\n\t * @return {number} or null if string could not be parsed\n\t *\n\t *\n\t */\n\tcomputerFileSize(string) {\n\t\tif (typeof string !== 'string') {\n\t\t\treturn null\n\t\t}\n\n\t\tconst s = string.toLowerCase().trim()\n\t\tlet bytes = null\n\n\t\tconst bytesArray = {\n\t\t\tb: 1,\n\t\t\tk: 1024,\n\t\t\tkb: 1024,\n\t\t\tmb: 1024 * 1024,\n\t\t\tm: 1024 * 1024,\n\t\t\tgb: 1024 * 1024 * 1024,\n\t\t\tg: 1024 * 1024 * 1024,\n\t\t\ttb: 1024 * 1024 * 1024 * 1024,\n\t\t\tt: 1024 * 1024 * 1024 * 1024,\n\t\t\tpb: 1024 * 1024 * 1024 * 1024 * 1024,\n\t\t\tp: 1024 * 1024 * 1024 * 1024 * 1024,\n\t\t}\n\n\t\tconst matches = s.match(/^[\\s+]?([0-9]*)(\\.([0-9]+))?( +)?([kmgtp]?b?)$/i)\n\t\tif (matches !== null) {\n\t\t\tbytes = parseFloat(s)\n\t\t\tif (!isFinite(bytes)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t\tif (matches[5]) {\n\t\t\tbytes = bytes * bytesArray[matches[5]]\n\t\t}\n\n\t\tbytes = Math.round(bytes)\n\t\treturn bytes\n\t},\n\n\t/**\n\t * @param {string|number} timestamp timestamp\n\t * @param {string} format date format, see momentjs docs\n\t * @return {string} timestamp formatted as requested\n\t */\n\tformatDate(timestamp, format) {\n\t\tif (window.TESTING === undefined) {\n\t\t\tconsole.warn('OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment')\n\t\t}\n\t\tformat = format || 'LLL'\n\t\treturn moment(timestamp).format(format)\n\t},\n\n\t/**\n\t * @param {string|number} timestamp timestamp\n\t * @return {string} human readable difference from now\n\t */\n\trelativeModifiedDate(timestamp) {\n\t\tif (window.TESTING === undefined) {\n\t\t\tconsole.warn('OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment')\n\t\t}\n\t\tconst diff = moment().diff(moment(timestamp))\n\t\tif (diff >= 0 && diff < 45000) {\n\t\t\treturn t('core', 'seconds ago')\n\t\t}\n\t\treturn moment(timestamp).fromNow()\n\t},\n\n\t/**\n\t * Returns the width of a generic browser scrollbar\n\t *\n\t * @return {number} width of scrollbar\n\t */\n\tgetScrollBarWidth() {\n\t\tif (this._scrollBarWidth) {\n\t\t\treturn this._scrollBarWidth\n\t\t}\n\n\t\tconst inner = document.createElement('p')\n\t\tinner.style.width = '100%'\n\t\tinner.style.height = '200px'\n\n\t\tconst outer = document.createElement('div')\n\t\touter.style.position = 'absolute'\n\t\touter.style.top = '0px'\n\t\touter.style.left = '0px'\n\t\touter.style.visibility = 'hidden'\n\t\touter.style.width = '200px'\n\t\touter.style.height = '150px'\n\t\touter.style.overflow = 'hidden'\n\t\touter.appendChild(inner)\n\n\t\tdocument.body.appendChild(outer)\n\t\tconst w1 = inner.offsetWidth\n\t\touter.style.overflow = 'scroll'\n\t\tlet w2 = inner.offsetWidth\n\t\tif (w1 === w2) {\n\t\t\tw2 = outer.clientWidth\n\t\t}\n\n\t\tdocument.body.removeChild(outer)\n\n\t\tthis._scrollBarWidth = (w1 - w2)\n\n\t\treturn this._scrollBarWidth\n\t},\n\n\t/**\n\t * Remove the time component from a given date\n\t *\n\t * @param {Date} date date\n\t * @return {Date} date with stripped time\n\t */\n\tstripTime(date) {\n\t\t// FIXME: likely to break when crossing DST\n\t\t// would be better to use a library like momentJS\n\t\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate())\n\t},\n\n\t/**\n\t * Compare two strings to provide a natural sort\n\t *\n\t * @param {string} a first string to compare\n\t * @param {string} b second string to compare\n\t * @return {number} -1 if b comes before a, 1 if a comes before b\n\t * or 0 if the strings are identical\n\t */\n\tnaturalSortCompare(a, b) {\n\t\tlet x\n\t\tconst aa = chunkify(a)\n\t\tconst bb = chunkify(b)\n\n\t\tfor (x = 0; aa[x] && bb[x]; x++) {\n\t\t\tif (aa[x] !== bb[x]) {\n\t\t\t\tconst aNum = Number(aa[x]); const bNum = Number(bb[x])\n\t\t\t\t// note: == is correct here\n\t\t\t\t/* eslint-disable-next-line */\n\t\t\t\tif (aNum == aa[x] && bNum == bb[x]) {\n\t\t\t\t\treturn aNum - bNum\n\t\t\t\t} else {\n\t\t\t\t\t// Note: This locale setting isn't supported by all browsers but for the ones\n\t\t\t\t\t// that do there will be more consistency between client-server sorting\n\t\t\t\t\treturn aa[x].localeCompare(bb[x], OC.getLanguage())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn aa.length - bb.length\n\t},\n\n\t/**\n\t * Calls the callback in a given interval until it returns true\n\t *\n\t * @param {Function} callback function to call on success\n\t * @param {number} interval in milliseconds\n\t */\n\twaitFor(callback, interval) {\n\t\tconst internalCallback = function() {\n\t\t\tif (callback() !== true) {\n\t\t\t\tsetTimeout(internalCallback, interval)\n\t\t\t}\n\t\t}\n\n\t\tinternalCallback()\n\t},\n\n\t/**\n\t * Checks if a cookie with the given name is present and is set to the provided value.\n\t *\n\t * @param {string} name name of the cookie\n\t * @param {string} value value of the cookie\n\t * @return {boolean} true if the cookie with the given name has the given value\n\t */\n\tisCookieSetToValue(name, value) {\n\t\tconst cookies = document.cookie.split(';')\n\t\tfor (let i = 0; i < cookies.length; i++) {\n\t\t\tconst cookie = cookies[i].split('=')\n\t\t\tif (cookie[0].trim() === name && cookie[1].trim() === value) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn false\n\t},\n}\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 */\n\nconst base = window._oc_debug\n\nexport const debug = base\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 */\n\nlet webroot = window._oc_webroot\n\nif (typeof webroot === 'undefined') {\n\twebroot = location.pathname\n\tconst pos = webroot.indexOf('/index.php/')\n\tif (pos !== -1) {\n\t\twebroot = webroot.substr(0, pos)\n\t} else {\n\t\twebroot = webroot.substr(0, webroot.lastIndexOf('/'))\n\t}\n}\n\nexport default webroot\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 */\n\nexport const get = context => name => {\n\tconst namespaces = name.split('.')\n\tconst tail = namespaces.pop()\n\n\tfor (let i = 0; i < namespaces.length; i++) {\n\t\tcontext = context[namespaces[i]]\n\t\tif (!context) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn context[tail]\n}\n\n/**\n * Set a variable by name\n *\n * @param {string} context context\n * @return {Function} setter\n * @deprecated 19.0.0 use https://lodash.com/docs#set\n */\nexport const set = context => (name, value) => {\n\tconst namespaces = name.split('.')\n\tconst tail = namespaces.pop()\n\n\tfor (let i = 0; i < namespaces.length; i++) {\n\t\tif (!context[namespaces[i]]) {\n\t\t\tcontext[namespaces[i]] = {}\n\t\t}\n\t\tcontext = context[namespaces[i]]\n\t}\n\tcontext[tail] = value\n\treturn value\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 * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport { subscribe } from '@nextcloud/event-bus'\n\nimport { addScript, addStyle } from './legacy-loader'\nimport {\n\tajaxConnectionLostHandler,\n\tprocessAjaxError,\n\tregisterXHRForErrorProcessing,\n} from './xhr-error'\nimport Apps from './apps'\nimport { AppConfig, appConfig } from './appconfig'\nimport { appSettings } from './appsettings'\nimport appswebroots from './appswebroots'\nimport Backbone from './backbone'\nimport {\n\tbasename,\n\tdirname,\n\tencodePath,\n\tisSamePath,\n\tjoinPaths,\n} from '@nextcloud/paths'\nimport {\n\tbuild as buildQueryString,\n\tparse as parseQueryString,\n} from './query-string'\nimport Config from './config'\nimport {\n\tcoreApps,\n\tmenuSpeed,\n\tPERMISSION_ALL,\n\tPERMISSION_CREATE,\n\tPERMISSION_DELETE,\n\tPERMISSION_NONE,\n\tPERMISSION_READ,\n\tPERMISSION_SHARE,\n\tPERMISSION_UPDATE,\n\tTAG_FAVORITE,\n} from './constants'\nimport ContactsMenu from './contactsmenu'\nimport { currentUser, getCurrentUser } from './currentuser'\nimport Dialogs from './dialogs'\nimport EventSource from './eventsource'\nimport { get, set } from './get_set'\nimport { getCapabilities } from './capabilities'\nimport {\n\tgetHost,\n\tgetHostName,\n\tgetPort,\n\tgetProtocol,\n} from './host'\nimport {\n\tgetToken as getRequestToken,\n} from './requesttoken'\nimport {\n\thideMenus,\n\tregisterMenu,\n\tshowMenu,\n\tunregisterMenu,\n} from './menu'\nimport { isUserAdmin } from './admin'\nimport L10N, {\n\tgetLanguage,\n\tgetLocale,\n} from './l10n'\nimport {\n\tgetCanonicalLocale,\n} from '@nextcloud/l10n'\n\nimport {\n\tgenerateUrl,\n\tgenerateFilePath,\n\tgenerateOcsUrl,\n\tgenerateRemoteUrl,\n\tgetRootUrl,\n\timagePath,\n\tlinkTo,\n} from '@nextcloud/router'\n\nimport {\n\tlinkToRemoteBase,\n} from './routing'\nimport msg from './msg'\nimport Notification from './notification'\nimport PasswordConfirmation from './password-confirmation'\nimport Plugins from './plugins'\nimport { theme } from './theme'\nimport Util from './util'\nimport { debug } from './debug'\nimport { redirect, reload } from './navigation'\nimport webroot from './webroot'\n\n/** @namespace OC */\nexport default {\n\t/*\n\t * Constants\n\t */\n\tcoreApps,\n\tmenuSpeed,\n\tPERMISSION_ALL,\n\tPERMISSION_CREATE,\n\tPERMISSION_DELETE,\n\tPERMISSION_NONE,\n\tPERMISSION_READ,\n\tPERMISSION_SHARE,\n\tPERMISSION_UPDATE,\n\tTAG_FAVORITE,\n\n\t/*\n\t * Deprecated helpers to be removed\n\t */\n\t/**\n\t * Check if a user file is allowed to be handled.\n\t *\n\t * @param {string} file to check\n\t * @return {boolean}\n\t * @deprecated 17.0.0\n\t */\n\tfileIsBlacklisted: file => !!(file.match(Config.blacklist_files_regex)),\n\n\taddScript,\n\taddStyle,\n\tApps,\n\tAppConfig,\n\tappConfig,\n\tappSettings,\n\tappswebroots,\n\tBackbone,\n\tContactsMenu,\n\tconfig: Config,\n\t/**\n\t * Currently logged in user or null if none\n\t *\n\t * @type {string}\n\t * @deprecated use `getCurrentUser` from https://www.npmjs.com/package/@nextcloud/auth\n\t */\n\tcurrentUser,\n\tdialogs: Dialogs,\n\tEventSource,\n\t/**\n\t * Returns the currently logged in user or null if there is no logged in\n\t * user (public page mode)\n\t *\n\t * @since 9.0.0\n\t * @deprecated 19.0.0 use `getCurrentUser` from https://www.npmjs.com/package/@nextcloud/auth\n\t */\n\tgetCurrentUser,\n\tisUserAdmin,\n\tL10N,\n\n\t/**\n\t * Ajax error handlers\n\t *\n\t * @todo remove from here and keep internally -> requires new tests\n\t */\n\t_ajaxConnectionLostHandler: ajaxConnectionLostHandler,\n\t_processAjaxError: processAjaxError,\n\tregisterXHRForErrorProcessing,\n\n\t/**\n\t * Capabilities\n\t *\n\t * @type {Array}\n\t * @deprecated 20.0.0 use @nextcloud/capabilities instead\n\t */\n\tgetCapabilities,\n\n\t/*\n\t * Legacy menu helpers\n\t */\n\thideMenus,\n\tregisterMenu,\n\tshowMenu,\n\tunregisterMenu,\n\n\t/*\n\t * Path helpers\n\t */\n\t/**\n\t * @deprecated 18.0.0 use https://www.npmjs.com/package/@nextcloud/paths\n\t */\n\tbasename,\n\t/**\n\t * @deprecated 18.0.0 use https://www.npmjs.com/package/@nextcloud/paths\n\t */\n\tencodePath,\n\t/**\n\t * @deprecated 18.0.0 use https://www.npmjs.com/package/@nextcloud/paths\n\t */\n\tdirname,\n\t/**\n\t * @deprecated 18.0.0 use https://www.npmjs.com/package/@nextcloud/paths\n\t */\n\tisSamePath,\n\t/**\n\t * @deprecated 18.0.0 use https://www.npmjs.com/package/@nextcloud/paths\n\t */\n\tjoinPaths,\n\n\t/**\n\t * Host (url) helpers\n\t */\n\tgetHost,\n\tgetHostName,\n\tgetPort,\n\tgetProtocol,\n\n\t/**\n\t * @deprecated 20.0.0 use `getCanonicalLocale` from https://www.npmjs.com/package/@nextcloud/l10n\n\t */\n\tgetCanonicalLocale,\n\tgetLocale,\n\tgetLanguage,\n\t/**\n\t * Loads translations for the given app asynchronously.\n\t *\n\t * @param {string} app app name\n\t * @param {Function} callback callback to call after loading\n\t * @return {Promise}\n\t * @deprecated 17.0.0 use OC.L10N.load instead\n\t */\n\taddTranslations: L10N.load,\n\n\t/**\n\t * Query string helpers\n\t */\n\tbuildQueryString,\n\tparseQueryString,\n\n\tmsg,\n\tNotification,\n\tPasswordConfirmation,\n\tPlugins,\n\ttheme,\n\tUtil,\n\tdebug,\n\t/**\n\t * @deprecated 19.0.0 use `generateFilePath` from https://www.npmjs.com/package/@nextcloud/router\n\t */\n\tfilePath: generateFilePath,\n\t/**\n\t * @deprecated 19.0.0 use `generateUrl` from https://www.npmjs.com/package/@nextcloud/router\n\t */\n\tgenerateUrl,\n\t/**\n\t * @deprecated 19.0.0 use https://lodash.com/docs#get\n\t */\n\tget: get(window),\n\t/**\n\t * @deprecated 19.0.0 use https://lodash.com/docs#set\n\t */\n\tset: set(window),\n\t/**\n\t * @deprecated 19.0.0 use `getRootUrl` from https://www.npmjs.com/package/@nextcloud/router\n\t */\n\tgetRootPath: getRootUrl,\n\t/**\n\t * @deprecated 19.0.0 use `imagePath` from https://www.npmjs.com/package/@nextcloud/router\n\t */\n\timagePath,\n\tredirect,\n\treload,\n\trequestToken: getRequestToken(),\n\t/**\n\t * @deprecated 19.0.0 use `linkTo` from https://www.npmjs.com/package/@nextcloud/router\n\t */\n\tlinkTo,\n\t/**\n\t * @param {string} service service name\n\t * @param {number} version OCS API version\n\t * @return {string} OCS API base path\n\t * @deprecated 19.0.0 use `generateOcsUrl` from https://www.npmjs.com/package/@nextcloud/router\n\t */\n\tlinkToOCS: (service, version) => {\n\t\treturn generateOcsUrl(service, {}, {\n\t\t\tocsVersion: version || 1,\n\t\t}) + '/'\n\t},\n\t/**\n\t * @deprecated 19.0.0 use `generateRemoteUrl` from https://www.npmjs.com/package/@nextcloud/router\n\t */\n\tlinkToRemote: generateRemoteUrl,\n\tlinkToRemoteBase,\n\t/**\n\t * Relative path to Nextcloud root.\n\t * For example: \"/nextcloud\"\n\t *\n\t * @type {string}\n\t *\n\t * @deprecated 19.0.0 use `getRootUrl` from https://www.npmjs.com/package/@nextcloud/router\n\t * @see OC#getRootPath\n\t */\n\twebroot,\n}\n\n// Keep the request token prop in sync\nsubscribe('csrf-token-update', e => {\n\tOC.requestToken = e.token\n\n\t// Logging might help debug (Sentry) issues\n\tconsole.info('OC.requestToken changed', e.token)\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 */\n\n/* eslint-disable */\nimport $ from 'jquery'\nimport { filePath } from './routing'\nimport { generateFilePath } from \"@nextcloud/router\"\n\n/**\n * Opens a popup with the setting for an app.\n * @param {string} appid The ID of the app e.g. 'calendar', 'contacts' or 'files'.\n * @param {boolean|string} loadJS If true 'js/settings.js' is loaded. If it's a string\n * it will attempt to load a script by that name in the 'js' directory.\n * @param {boolean} [cache] If true the javascript file won't be forced refreshed. Defaults to true.\n * @param {string} [scriptName] The name of the PHP file to load. Defaults to 'settings.php' in\n * the root of the app directory hierarchy.\n *\n * @deprecated 17.0.0 this method is unused and will be removed with Nextcloud 18\n */\nexport const appSettings = args => {\n\tconsole.warn('OC.appSettings is deprecated and will be removed with Nextcloud 18')\n\n\tif (typeof args === 'undefined' || typeof args.appid === 'undefined') {\n\t\tthrow {\n\t\t\tname: 'MissingParameter',\n\t\t\tmessage: 'The parameter appid is missing'\n\t\t}\n\t}\n\tvar props = { scriptName: 'settings.php', cache: true }\n\t$.extend(props, args)\n\tvar settings = $('#appsettings')\n\tif (settings.length === 0) {\n\t\tthrow {\n\t\t\tname: 'MissingDOMElement',\n\t\t\tmessage: 'There has be be an element with id \"appsettings\" for the popup to show.'\n\t\t}\n\t}\n\tvar popup = $('#appsettings_popup')\n\tif (popup.length === 0) {\n\t\t$('body').prepend('<div class=\"popup hidden\" id=\"appsettings_popup\"></div>')\n\t\tpopup = $('#appsettings_popup')\n\t\tpopup.addClass(settings.hasClass('topright') ? 'topright' : 'bottomleft')\n\t}\n\tif (popup.is(':visible')) {\n\t\tpopup.hide().remove()\n\t} else {\n\t\tconst arrowclass = settings.hasClass('topright') ? 'up' : 'left'\n\t\t$.get(generateFilePath(props.appid, '', props.scriptName), function(data) {\n\t\t\tpopup.html(data).ready(function() {\n\t\t\t\tpopup.prepend('<span class=\"arrow ' + arrowclass + '\"></span><h2>' + t('core', 'Settings') + '</h2><a class=\"close\"></a>').show()\n\t\t\t\tpopup.find('.close').bind('click', function() {\n\t\t\t\t\tpopup.remove()\n\t\t\t\t})\n\t\t\t\tif (typeof props.loadJS !== 'undefined') {\n\t\t\t\t\tvar scriptname\n\t\t\t\t\tif (props.loadJS === true) {\n\t\t\t\t\t\tscriptname = 'settings.js'\n\t\t\t\t\t} else if (typeof props.loadJS === 'string') {\n\t\t\t\t\t\tscriptname = props.loadJS\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow {\n\t\t\t\t\t\t\tname: 'InvalidParameter',\n\t\t\t\t\t\t\tmessage: 'The \"loadJS\" parameter must be either boolean or a string.'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (props.cache) {\n\t\t\t\t\t\t$.ajaxSetup({ cache: true })\n\t\t\t\t\t}\n\t\t\t\t\t$.getScript(generateFilePath(props.appid, 'js', scriptname))\n\t\t\t\t\t\t.fail(function(jqxhr, settings, e) {\n\t\t\t\t\t\t\tthrow e\n\t\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}).show()\n\t\t}, 'html')\n\t}\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 * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport { getCapabilities as realGetCapabilities } from '@nextcloud/capabilities'\n\n/**\n * Returns the capabilities\n *\n * @return {Array} capabilities\n *\n * @since 14.0.0\n */\nexport const getCapabilities = () => {\n\tconsole.warn('OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities')\n\treturn realGetCapabilities()\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 */\n\nexport const getProtocol = () => window.location.protocol.split(':')[0]\n\n/**\n * Returns the host used to access this Nextcloud instance\n * Host is sometimes the same as the hostname but now always.\n *\n * Examples:\n * http://example.com => example.com\n * https://example.com => example.com\n * http://example.com:8080 => example.com:8080\n *\n * @return {string} host\n *\n * @since 8.2.0\n * @deprecated 17.0.0 use window.location.host directly\n */\nexport const getHost = () => window.location.host\n\n/**\n * Returns the hostname used to access this Nextcloud instance\n * The hostname is always stripped of the port\n *\n * @return {string} hostname\n * @since 9.0.0\n * @deprecated 17.0.0 use window.location.hostname directly\n */\nexport const getHostName = () => window.location.hostname\n\n/**\n * Returns the port number used to access this Nextcloud instance\n *\n * @return {number} port number\n *\n * @since 8.2.0\n * @deprecated 17.0.0 use window.location.port directly\n */\nexport const getPort = () => window.location.port\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 * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport $ from 'jquery'\n\n/**\n * Parses a URL query string into a JS map\n *\n * @param {string} queryString query string in the format param1=1234&param2=abcde&param3=xyz\n * @return {Object<string, string>} map containing key/values matching the URL parameters\n */\nexport const parse = queryString => {\n\tlet pos\n\tlet components\n\tconst result = {}\n\tlet key\n\tif (!queryString) {\n\t\treturn null\n\t}\n\tpos = queryString.indexOf('?')\n\tif (pos >= 0) {\n\t\tqueryString = queryString.substr(pos + 1)\n\t}\n\tconst parts = queryString.replace(/\\+/g, '%20').split('&')\n\tfor (let i = 0; i < parts.length; i++) {\n\t\t// split on first equal sign\n\t\tconst part = parts[i]\n\t\tpos = part.indexOf('=')\n\t\tif (pos >= 0) {\n\t\t\tcomponents = [\n\t\t\t\tpart.substr(0, pos),\n\t\t\t\tpart.substr(pos + 1),\n\t\t\t]\n\t\t} else {\n\t\t\t// key only\n\t\t\tcomponents = [part]\n\t\t}\n\t\tif (!components.length) {\n\t\t\tcontinue\n\t\t}\n\t\tkey = decodeURIComponent(components[0])\n\t\tif (!key) {\n\t\t\tcontinue\n\t\t}\n\t\t// if equal sign was there, return string\n\t\tif (components.length > 1) {\n\t\t\tresult[key] = decodeURIComponent(components[1])\n\t\t} else {\n\t\t\t// no equal sign => null value\n\t\t\tresult[key] = null\n\t\t}\n\t}\n\treturn result\n}\n\n/**\n * Builds a URL query from a JS map.\n *\n * @param {Object<string, string>} params map containing key/values matching the URL parameters\n * @return {string} String containing a URL query (without question) mark\n */\nexport const build = params => {\n\tif (!params) {\n\t\treturn ''\n\t}\n\treturn $.map(params, function(value, key) {\n\t\tlet s = encodeURIComponent(key)\n\t\tif (value !== null && typeof (value) !== 'undefined') {\n\t\t\ts += '=' + encodeURIComponent(value)\n\t\t}\n\t\treturn s\n\t}).join('&')\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 */\n\nexport default {\n\n\t/**\n\t * @type {Array.<OC.Plugin>}\n\t */\n\t_plugins: {},\n\n\t/**\n\t * Register plugin\n\t *\n\t * @param {string} targetName app name / class name to hook into\n\t * @param {OC.Plugin} plugin plugin\n\t */\n\tregister(targetName, plugin) {\n\t\tlet plugins = this._plugins[targetName]\n\t\tif (!plugins) {\n\t\t\tplugins = this._plugins[targetName] = []\n\t\t}\n\t\tplugins.push(plugin)\n\t},\n\n\t/**\n\t * Returns all plugin registered to the given target\n\t * name / app name / class name.\n\t *\n\t * @param {string} targetName app name / class name to hook into\n\t * @return {Array.<OC.Plugin>} array of plugins\n\t */\n\tgetPlugins(targetName) {\n\t\treturn this._plugins[targetName] || []\n\t},\n\n\t/**\n\t * Call attach() on all plugins registered to the given target name.\n\t *\n\t * @param {string} targetName app name / class name\n\t * @param {object} targetObject to be extended\n\t * @param {object} [options] options\n\t */\n\tattach(targetName, targetObject, options) {\n\t\tconst plugins = this.getPlugins(targetName)\n\t\tfor (let i = 0; i < plugins.length; i++) {\n\t\t\tif (plugins[i].attach) {\n\t\t\t\tplugins[i].attach(targetObject, options)\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Call detach() on all plugins registered to the given target name.\n\t *\n\t * @param {string} targetName app name / class name\n\t * @param {object} targetObject to be extended\n\t * @param {object} [options] options\n\t */\n\tdetach(targetName, targetObject, options) {\n\t\tconst plugins = this.getPlugins(targetName)\n\t\tfor (let i = 0; i < plugins.length; i++) {\n\t\t\tif (plugins[i].detach) {\n\t\t\t\tplugins[i].detach(targetObject, options)\n\t\t\t}\n\t\t}\n\t},\n\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 */\n\nexport const redirect = targetURL => { window.location = targetURL }\n\n/**\n * Reloads the current page\n *\n * @deprecated 17.0.0 use window.location.reload directly\n */\nexport const reload = () => { window.location.reload() }\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 * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport {\n\tgetRootUrl as realGetRootUrl,\n} from '@nextcloud/router'\n\n/**\n * Creates a relative url for remote use\n *\n * @param {string} service id\n * @return {string} the url\n */\nexport const linkToRemoteBase = service => {\n\treturn realGetRootUrl() + '/remote.php/' + service\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 * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport $ from 'jquery'\nimport { emit } from '@nextcloud/event-bus'\nimport { loadState } from '@nextcloud/initial-state'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { generateUrl } from '@nextcloud/router'\n\nimport OC from './OC'\nimport { setToken as setRequestToken, getToken as getRequestToken } from './OC/requesttoken'\n\nlet config = null\n/**\n * The legacy jsunit tests overwrite OC.config before calling initCore\n * therefore we need to wait with assigning the config fallback until initCore calls initSessionHeartBeat\n */\nconst loadConfig = () => {\n\ttry {\n\t\tconfig = loadState('core', 'config')\n\t} catch (e) {\n\t\t// This fallback is just for our legacy jsunit tests since we have no way to mock loadState calls\n\t\tconfig = OC.config\n\t}\n}\n\n/**\n * session heartbeat (defaults to enabled)\n *\n * @return {boolean}\n */\nconst keepSessionAlive = () => {\n\treturn config.session_keepalive === undefined\n\t\t|| !!config.session_keepalive\n}\n\n/**\n * get interval in seconds\n *\n * @return {number}\n */\nconst getInterval = () => {\n\tlet interval = NaN\n\tif (config.session_lifetime) {\n\t\tinterval = Math.floor(config.session_lifetime / 2)\n\t}\n\n\t// minimum one minute, max 24 hours, default 15 minutes\n\treturn Math.min(\n\t\t24 * 3600,\n\t\tMath.max(\n\t\t\t60,\n\t\t\tisNaN(interval) ? 900 : interval\n\t\t)\n\t)\n}\n\nconst getToken = async () => {\n\tconst url = generateUrl('/csrftoken')\n\n\t// Not using Axios here as Axios is not stubbable with the sinon fake server\n\t// see https://stackoverflow.com/questions/41516044/sinon-mocha-test-with-async-ajax-calls-didnt-return-promises\n\t// see js/tests/specs/coreSpec.js for the tests\n\tconst resp = await $.get(url)\n\n\treturn resp.token\n}\n\nconst poll = async () => {\n\ttry {\n\t\tconst token = await getToken()\n\t\tsetRequestToken(token)\n\t} catch (e) {\n\t\tconsole.error('session heartbeat failed', e)\n\t}\n}\n\nconst startPolling = () => {\n\tconst interval = setInterval(poll, getInterval() * 1000)\n\n\tconsole.info('session heartbeat polling started')\n\n\treturn interval\n}\n\nconst registerAutoLogout = () => {\n\tif (!config.auto_logout || !getCurrentUser()) {\n\t\treturn\n\t}\n\n\tlet lastActive = Date.now()\n\twindow.addEventListener('mousemove', e => {\n\t\tlastActive = Date.now()\n\t\tlocalStorage.setItem('lastActive', lastActive)\n\t})\n\n\twindow.addEventListener('touchstart', e => {\n\t\tlastActive = Date.now()\n\t\tlocalStorage.setItem('lastActive', lastActive)\n\t})\n\n\twindow.addEventListener('storage', e => {\n\t\tif (e.key !== 'lastActive') {\n\t\t\treturn\n\t\t}\n\t\tlastActive = e.newValue\n\t})\n\n\tsetInterval(function() {\n\t\tconst timeout = Date.now() - config.session_lifetime * 1000\n\t\tif (lastActive < timeout) {\n\t\t\tconsole.info('Inactivity timout reached, logging out')\n\t\t\tconst logoutUrl = generateUrl('/logout') + '?requesttoken=' + encodeURIComponent(getRequestToken())\n\t\t\twindow.location = logoutUrl\n\t\t}\n\t}, 1000)\n}\n\n/**\n * Calls the server periodically to ensure that session and CSRF\n * token doesn't expire\n */\nexport const initSessionHeartBeat = () => {\n\tloadConfig()\n\n\tregisterAutoLogout()\n\n\tif (!keepSessionAlive()) {\n\t\tconsole.info('session heartbeat disabled')\n\t\treturn\n\t}\n\tlet interval = startPolling()\n\n\twindow.addEventListener('online', async () => {\n\t\tconsole.info('browser is online again, resuming heartbeat')\n\t\tinterval = startPolling()\n\t\ttry {\n\t\t\tawait poll()\n\t\t\tconsole.info('session token successfully updated after resuming network')\n\n\t\t\t// Let apps know we're online and requests will have the new token\n\t\t\temit('networkOnline', {\n\t\t\t\tsuccess: true,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error('could not update session token after resuming network', e)\n\n\t\t\t// Let apps know we're online but requests might have an outdated token\n\t\t\temit('networkOnline', {\n\t\t\t\tsuccess: false,\n\t\t\t})\n\t\t}\n\t})\n\twindow.addEventListener('offline', () => {\n\t\tconsole.info('browser is offline, stopping heartbeat')\n\n\t\t// Let apps know we're offline\n\t\temit('networkOffline', {})\n\n\t\tclearInterval(interval)\n\t\tconsole.info('session heartbeat polling stopped')\n\t})\n}\n","<!--\n - @copyright Copyright (c) 2022 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\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\n<template>\n\t<nav class=\"app-menu\">\n\t\t<ul class=\"app-menu-main\">\n\t\t\t<li v-for=\"app in mainAppList\"\n\t\t\t\t:key=\"app.id\"\n\t\t\t\t:data-app-id=\"app.id\"\n\t\t\t\tclass=\"app-menu-entry\"\n\t\t\t\t:class=\"{ 'app-menu-entry__active': app.active }\">\n\t\t\t\t<a :href=\"app.href\"\n\t\t\t\t\t:class=\"{ 'has-unread': app.unread > 0 }\"\n\t\t\t\t\t:aria-label=\"appLabel(app)\"\n\t\t\t\t\t:title=\"app.name\"\n\t\t\t\t\t:aria-current=\"app.active ? 'page' : false\">\n\t\t\t\t\t<img :src=\"app.icon\" alt=\"\">\n\t\t\t\t\t<div class=\"app-menu-entry--label\">\n\t\t\t\t\t\t{{ app.name }}\n\t\t\t\t\t\t<span v-if=\"app.unread > 0\" class=\"hidden-visually unread-counter\">{{ app.unread }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\t\t<NcActions class=\"app-menu-more\" :aria-label=\"t('core', 'More apps')\">\n\t\t\t<NcActionLink v-for=\"app in popoverAppList\"\n\t\t\t\t:key=\"app.id\"\n\t\t\t\t:aria-label=\"appLabel(app)\"\n\t\t\t\t:aria-current=\"app.active ? 'page' : false\"\n\t\t\t\t:href=\"app.href\"\n\t\t\t\tclass=\"app-menu-popover-entry\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<div class=\"app-icon\" :class=\"{ 'has-unread': app.unread > 0 }\">\n\t\t\t\t\t\t<img :src=\"app.icon\" alt=\"\">\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t\t{{ app.name }}\n\t\t\t\t<span v-if=\"app.unread > 0\" class=\"hidden-visually unread-counter\">{{ app.unread }}</span>\n\t\t\t</NcActionLink>\n\t\t</NcActions>\n\t</nav>\n</template>\n\n<script>\nimport { loadState } from '@nextcloud/initial-state'\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport NcActions from '@nextcloud/vue/dist/Components/NcActions'\nimport NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink'\n\nexport default {\n\tname: 'AppMenu',\n\tcomponents: {\n\t\tNcActions, NcActionLink,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tapps: loadState('core', 'apps', {}),\n\t\t\tappLimit: 0,\n\t\t\tobserver: null,\n\t\t}\n\t},\n\tcomputed: {\n\t\tappList() {\n\t\t\treturn Object.values(this.apps)\n\t\t},\n\t\tmainAppList() {\n\t\t\treturn this.appList.slice(0, this.appLimit)\n\t\t},\n\t\tpopoverAppList() {\n\t\t\treturn this.appList.slice(this.appLimit)\n\t\t},\n\t\tappLabel() {\n\t\t\treturn (app) => app.name\n\t\t\t\t+ (app.active ? ' (' + t('core', 'Currently open') + ')' : '')\n\t\t\t\t+ (app.unread > 0 ? ' (' + n('core', '{count} notification', '{count} notifications', app.unread, { count: app.unread }) + ')' : '')\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.observer = new ResizeObserver(this.resize)\n\t\tthis.observer.observe(this.$el)\n\t\tthis.resize()\n\t\tsubscribe('nextcloud:app-menu.refresh', this.setApps)\n\t},\n\tbeforeDestroy() {\n\t\tthis.observer.disconnect()\n\t\tunsubscribe('nextcloud:app-menu.refresh', this.setApps)\n\t},\n\tmethods: {\n\t\tsetNavigationCounter(id, counter) {\n\t\t\tthis.$set(this.apps[id], 'unread', counter)\n\t\t},\n\t\tsetApps({ apps }) {\n\t\t\tthis.apps = apps\n\t\t},\n\t\tresize() {\n\t\t\tconst availableWidth = this.$el.offsetWidth\n\t\t\tlet appCount = Math.floor(availableWidth / 50) - 1\n\t\t\tconst popoverAppCount = this.appList.length - appCount\n\t\t\tif (popoverAppCount === 1) {\n\t\t\t\tappCount--\n\t\t\t}\n\t\t\tif (appCount < 1) {\n\t\t\t\tappCount = 0\n\t\t\t}\n\t\t\tthis.appLimit = appCount\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n$header-icon-size: 20px;\n\n.app-menu {\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-shrink: 1;\n\tflex-wrap: wrap;\n}\n.app-menu-main {\n\tdisplay: flex;\n\tflex-wrap: nowrap;\n\n\t.app-menu-entry {\n\t\twidth: 50px;\n\t\theight: 50px;\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\topacity: .7;\n\t\tfilter: var(--background-image-invert-if-bright);\n\n\t\t&.app-menu-entry__active {\n\t\t\topacity: 1;\n\n\t\t\t&::before {\n\t\t\t\tcontent: \" \";\n\t\t\t\tposition: absolute;\n\t\t\t\tpointer-events: none;\n\t\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\twidth: 12px;\n\t\t\t\theight: 5px;\n\t\t\t\tborder-radius: 3px;\n\t\t\t\tbackground-color: var(--color-primary-text);\n\t\t\t\tleft: 50%;\n\t\t\t\tbottom: 6px;\n\t\t\t\tdisplay: block;\n\t\t\t\ttransition: all 0.1s ease-in-out;\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\t.app-menu-entry--label {\n\t\t\t\tfont-weight: bold;\n\t\t\t}\n\t\t}\n\n\t\ta {\n\t\t\twidth: calc(100% - 4px);\n\t\t\theight: calc(100% - 4px);\n\t\t\tmargin: 2px;\n\t\t\tcolor: var(--color-primary-text);\n\t\t\tposition: relative;\n\t\t}\n\n\t\timg {\n\t\t\ttransition: margin 0.1s ease-in-out;\n\t\t\twidth: $header-icon-size;\n\t\t\theight: $header-icon-size;\n\t\t\tpadding: calc((100% - $header-icon-size) / 2);\n\t\t\tbox-sizing: content-box;\n\t\t}\n\n\t\t.app-menu-entry--label {\n\t\t\topacity: 0;\n\t\t\tposition: absolute;\n\t\t\tfont-size: 12px;\n\t\t\tcolor: var(--color-primary-text);\n\t\t\ttext-align: center;\n\t\t\tbottom: -5px;\n\t\t\tleft: 50%;\n\t\t\ttop: 45%;\n\t\t\tdisplay: block;\n\t\t\tmin-width: 100%;\n\t\t\ttransform: translateX(-50%);\n\t\t\ttransition: all 0.1s ease-in-out;\n\t\t\twidth: 100%;\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\tletter-spacing: -0.5px;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus-within {\n\t\t\topacity: 1;\n\t\t\t.app-menu-entry--label {\n\t\t\t\topacity: 1;\n\t\t\t\tfont-weight: bolder;\n\t\t\t\tbottom: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t}\n\n\t}\n\n\t// Show labels\n\t&:hover,\n\t&:focus-within,\n\t.app-menu-entry:hover,\n\t.app-menu-entry:focus {\n\t\topacity: 1;\n\n\t\timg {\n\t\t\tmargin-top: -8px;\n\t\t}\n\n\t\t.app-menu-entry--label {\n\t\t\topacity: 1;\n\t\t\tbottom: 0;\n\t\t}\n\n\t\t&::before, .app-menu-entry::before {\n\t\t\topacity: 0;\n\t\t}\n\t}\n}\n\n::v-deep .app-menu-more .button-vue--vue-tertiary {\n\tcolor: var(--color-primary-text);\n\topacity: .7;\n\tmargin: 3px;\n\tfilter: var(--background-image-invert-if-bright);\n\n\t&:hover {\n\t\topacity: 1;\n\t\tbackground-color: transparent !important;\n\t}\n\n\t&:focus-visible {\n\t\topacity: 1;\n\t\toutline: none !important;\n\t}\n}\n\n.app-menu-popover-entry {\n\t.app-icon {\n\t\tposition: relative;\n\t\theight: 44px;\n\n\t\t&.has-unread::after {\n\t\t\tbackground-color: var(--color-main-text);\n\t\t}\n\n\t\timg {\n\t\t\twidth: $header-icon-size;\n\t\t\theight: $header-icon-size;\n\t\t\tpadding: calc((50px - $header-icon-size) / 2);\n\t\t}\n\t}\n}\n\n.has-unread::after {\n\tcontent: \"\";\n\twidth: 8px;\n\theight: 8px;\n\tbackground-color: var(--color-primary-text);\n\tborder-radius: 50%;\n\tposition: absolute;\n\tdisplay: block;\n\ttop: 10px;\n\tright: 10px;\n}\n\n.unread-counter {\n\tdisplay: none;\n}\n</style>\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppMenu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppMenu.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/sass-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppMenu.vue?vue&type=style&index=0&id=93b7dca4&prod&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/sass-loader/dist/cjs.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppMenu.vue?vue&type=style&index=0&id=93b7dca4&prod&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./AppMenu.vue?vue&type=template&id=93b7dca4&scoped=true&\"\nimport script from \"./AppMenu.vue?vue&type=script&lang=js&\"\nexport * from \"./AppMenu.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AppMenu.vue?vue&type=style&index=0&id=93b7dca4&prod&lang=scss&scoped=true&\"\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 \"93b7dca4\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('nav',{staticClass:\"app-menu\"},[_c('ul',{staticClass:\"app-menu-main\"},_vm._l((_vm.mainAppList),function(app){return _c('li',{key:app.id,staticClass:\"app-menu-entry\",class:{ 'app-menu-entry__active': app.active },attrs:{\"data-app-id\":app.id}},[_c('a',{class:{ 'has-unread': app.unread > 0 },attrs:{\"href\":app.href,\"aria-label\":_vm.appLabel(app),\"title\":app.name,\"aria-current\":app.active ? 'page' : false}},[_c('img',{attrs:{\"src\":app.icon,\"alt\":\"\"}}),_vm._v(\" \"),_c('div',{staticClass:\"app-menu-entry--label\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(app.name)+\"\\n\\t\\t\\t\\t\\t\"),(app.unread > 0)?_c('span',{staticClass:\"hidden-visually unread-counter\"},[_vm._v(_vm._s(app.unread))]):_vm._e()])])])}),0),_vm._v(\" \"),_c('NcActions',{staticClass:\"app-menu-more\",attrs:{\"aria-label\":_vm.t('core', 'More apps')}},_vm._l((_vm.popoverAppList),function(app){return _c('NcActionLink',{key:app.id,staticClass:\"app-menu-popover-entry\",attrs:{\"aria-label\":_vm.appLabel(app),\"aria-current\":app.active ? 'page' : false,\"href\":app.href},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('div',{staticClass:\"app-icon\",class:{ 'has-unread': app.unread > 0 }},[_c('img',{attrs:{\"src\":app.icon,\"alt\":\"\"}})])]},proxy:true}],null,true)},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(app.name)+\"\\n\\t\\t\\t\"),(app.unread > 0)?_c('span',{staticClass:\"hidden-visually unread-counter\"},[_vm._v(_vm._s(app.unread))]):_vm._e()])}),1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Jan-Christoph Borchardt <hey@jancborchardt.net>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author nacho <nacho@ownyourbits.com>\n * @author Vincent Petry <vincent@nextcloud.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 */\n\n/* globals Snap */\nimport _ from 'underscore'\nimport $ from 'jquery'\nimport moment from 'moment'\n\nimport { initSessionHeartBeat } from './session-heartbeat.js'\nimport OC from './OC/index.js'\nimport { setUp as setUpContactsMenu } from './components/ContactsMenu.js'\nimport { setUp as setUpMainMenu } from './components/MainMenu.js'\nimport { setUp as setUpUserMenu } from './components/UserMenu.js'\nimport PasswordConfirmation from './OC/password-confirmation.js'\n\n// keep in sync with core/css/variables.scss\nconst breakpointMobileWidth = 1024\n\nconst initLiveTimestamps = () => {\n\t// Update live timestamps every 30 seconds\n\tsetInterval(() => {\n\t\t$('.live-relative-timestamp').each(function() {\n\t\t\tconst timestamp = parseInt($(this).attr('data-timestamp'), 10)\n\t\t\t$(this).text(moment(timestamp).fromNow())\n\t\t})\n\t}, 30 * 1000)\n}\n\n/**\n * Moment doesn't have aliases for every locale and doesn't parse some locale IDs correctly so we need to alias them\n */\nconst localeAliases = {\n\tzh: 'zh-cn',\n\tzh_Hans: 'zh-cn',\n\tzh_Hans_CN: 'zh-cn',\n\tzh_Hans_HK: 'zh-cn',\n\tzh_Hans_MO: 'zh-cn',\n\tzh_Hans_SG: 'zh-cn',\n\tzh_Hant: 'zh-hk',\n\tzh_Hant_HK: 'zh-hk',\n\tzh_Hant_MO: 'zh-mo',\n\tzh_Hant_TW: 'zh-tw',\n}\nlet locale = OC.getLocale()\nif (Object.prototype.hasOwnProperty.call(localeAliases, locale)) {\n\tlocale = localeAliases[locale]\n}\n\n/**\n * Set users locale to moment.js as soon as possible\n */\nmoment.locale(locale)\n\n/**\n * Initializes core\n */\nexport const initCore = () => {\n\t$(window).on('unload.main', () => { OC._unloadCalled = true })\n\t$(window).on('beforeunload.main', () => {\n\t\t// super-trick thanks to http://stackoverflow.com/a/4651049\n\t\t// in case another handler displays a confirmation dialog (ex: navigating away\n\t\t// during an upload), there are two possible outcomes: user clicked \"ok\" or\n\t\t// \"cancel\"\n\n\t\t// first timeout handler is called after unload dialog is closed\n\t\tsetTimeout(() => {\n\t\t\tOC._userIsNavigatingAway = true\n\n\t\t\t// second timeout event is only called if user cancelled (Chrome),\n\t\t\t// but in other browsers it might still be triggered, so need to\n\t\t\t// set a higher delay...\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (!OC._unloadCalled) {\n\t\t\t\t\tOC._userIsNavigatingAway = false\n\t\t\t\t}\n\t\t\t}, 10000)\n\t\t}, 1)\n\t})\n\t$(document).on('ajaxError.main', function(event, request, settings) {\n\t\tif (settings && settings.allowAuthErrors) {\n\t\t\treturn\n\t\t}\n\t\tOC._processAjaxError(request)\n\t})\n\n\tinitSessionHeartBeat()\n\n\tOC.registerMenu($('#expand'), $('#expanddiv'), false, true)\n\n\t// toggle for menus\n\t$(document).on('mouseup.closemenus', event => {\n\t\tconst $el = $(event.target)\n\t\tif ($el.closest('.menu').length || $el.closest('.menutoggle').length) {\n\t\t\t// don't close when clicking on the menu directly or a menu toggle\n\t\t\treturn false\n\t\t}\n\n\t\tOC.hideMenus()\n\t})\n\n\tsetUpMainMenu()\n\tsetUpUserMenu()\n\tsetUpContactsMenu()\n\n\t// just add snapper for logged in users\n\t// and if the app doesn't handle the nav slider itself\n\tif ($('#app-navigation').length && !$('html').hasClass('lte9')\n\t\t&& !$('#app-content').hasClass('no-snapper')) {\n\n\t\t// App sidebar on mobile\n\t\tconst snapper = new Snap({\n\t\t\telement: document.getElementById('app-content'),\n\t\t\tdisable: 'right',\n\t\t\tmaxPosition: 300, // $navigation-width\n\t\t\tminDragDistance: 100,\n\t\t})\n\n\t\t$('#app-content').prepend('<div id=\"app-navigation-toggle\" class=\"icon-menu\" style=\"display:none\" tabindex=\"0\"></div>')\n\n\t\t// keep track whether snapper is currently animating, and\n\t\t// prevent to call open or close while that is the case\n\t\t// to avoid duplicating events (snap.js doesn't check this)\n\t\tlet animating = false\n\t\tsnapper.on('animating', () => {\n\t\t\t// we need this because the trigger button\n\t\t\t// is also implicitly wired to close by snapper\n\t\t\tanimating = true\n\t\t})\n\t\tsnapper.on('animated', () => {\n\t\t\tanimating = false\n\t\t})\n\t\tsnapper.on('start', () => {\n\t\t\t// we need this because dragging triggers that\n\t\t\tanimating = true\n\t\t})\n\t\tsnapper.on('end', () => {\n\t\t\t// we need this because dragging stop triggers that\n\t\t\tanimating = false\n\t\t})\n\n\t\t// These are necessary because calling open or close\n\t\t// on snapper during an animation makes it trigger an\n\t\t// unfinishable animation, which itself will continue\n\t\t// triggering animating events and cause high CPU load,\n\t\t//\n\t\t// Ref https://github.com/jakiestfu/Snap.js/issues/216\n\t\tconst oldSnapperOpen = snapper.open\n\t\tconst oldSnapperClose = snapper.close\n\t\tconst _snapperOpen = () => {\n\t\t\tif (animating || snapper.state().state !== 'closed') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\toldSnapperOpen('left')\n\t\t}\n\n\t\tconst _snapperClose = () => {\n\t\t\tif (animating || snapper.state().state === 'closed') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\toldSnapperClose()\n\t\t}\n\n\t\t// Needs to be deferred to properly catch in-between\n\t\t// events that snap.js is triggering after dragging.\n\t\t//\n\t\t// Skipped when running unit tests as we are not testing\n\t\t// the snap.js workarounds...\n\t\tif (!window.TESTING) {\n\t\t\tsnapper.open = () => {\n\t\t\t\t_.defer(_snapperOpen)\n\t\t\t}\n\t\t\tsnapper.close = () => {\n\t\t\t\t_.defer(_snapperClose)\n\t\t\t}\n\t\t}\n\n\t\t$('#app-navigation-toggle').click((e) => {\n\t\t\t// close is implicit in the button by snap.js\n\t\t\tif (snapper.state().state !== 'left') {\n\t\t\t\tsnapper.open()\n\t\t\t}\n\t\t})\n\t\t$('#app-navigation-toggle').keypress(e => {\n\t\t\tif (snapper.state().state === 'left') {\n\t\t\t\tsnapper.close()\n\t\t\t} else {\n\t\t\t\tsnapper.open()\n\t\t\t}\n\t\t})\n\n\t\t// close sidebar when switching navigation entry\n\t\tconst $appNavigation = $('#app-navigation')\n\t\t$appNavigation.delegate('a, :button', 'click', event => {\n\t\t\tconst $target = $(event.target)\n\t\t\t// don't hide navigation when changing settings or adding things\n\t\t\tif ($target.is('.app-navigation-noclose')\n\t\t\t\t|| $target.closest('.app-navigation-noclose').length) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif ($target.is('.app-navigation-entry-utils-menu-button')\n\t\t\t\t|| $target.closest('.app-navigation-entry-utils-menu-button').length) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif ($target.is('.add-new')\n\t\t\t\t|| $target.closest('.add-new').length) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif ($target.is('#app-settings')\n\t\t\t\t|| $target.closest('#app-settings').length) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsnapper.close()\n\t\t})\n\n\t\tlet navigationBarSlideGestureEnabled = false\n\t\tlet navigationBarSlideGestureAllowed = true\n\t\tlet navigationBarSlideGestureEnablePending = false\n\n\t\tOC.allowNavigationBarSlideGesture = () => {\n\t\t\tnavigationBarSlideGestureAllowed = true\n\n\t\t\tif (navigationBarSlideGestureEnablePending) {\n\t\t\t\tsnapper.enable()\n\n\t\t\t\tnavigationBarSlideGestureEnabled = true\n\t\t\t\tnavigationBarSlideGestureEnablePending = false\n\t\t\t}\n\t\t}\n\n\t\tOC.disallowNavigationBarSlideGesture = () => {\n\t\t\tnavigationBarSlideGestureAllowed = false\n\n\t\t\tif (navigationBarSlideGestureEnabled) {\n\t\t\t\tconst endCurrentDrag = true\n\t\t\t\tsnapper.disable(endCurrentDrag)\n\n\t\t\t\tnavigationBarSlideGestureEnabled = false\n\t\t\t\tnavigationBarSlideGestureEnablePending = true\n\t\t\t}\n\t\t}\n\n\t\tconst toggleSnapperOnSize = () => {\n\t\t\tif ($(window).width() > breakpointMobileWidth) {\n\t\t\t\tsnapper.close()\n\t\t\t\tsnapper.disable()\n\n\t\t\t\tnavigationBarSlideGestureEnabled = false\n\t\t\t\tnavigationBarSlideGestureEnablePending = false\n\t\t\t} else if (navigationBarSlideGestureAllowed) {\n\t\t\t\tsnapper.enable()\n\n\t\t\t\tnavigationBarSlideGestureEnabled = true\n\t\t\t\tnavigationBarSlideGestureEnablePending = false\n\t\t\t} else {\n\t\t\t\tnavigationBarSlideGestureEnablePending = true\n\t\t\t}\n\t\t}\n\n\t\t$(window).resize(_.debounce(toggleSnapperOnSize, 250))\n\n\t\t// initial call\n\t\ttoggleSnapperOnSize()\n\n\t}\n\n\tinitLiveTimestamps()\n\tPasswordConfirmation.init()\n}\n","/**\n * @copyright 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\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 */\n\nimport $ from 'jquery'\n\n$.prototype.tooltip = (function(tooltip) {\n\treturn function(config) {\n\t\ttry {\n\t\t\treturn tooltip.call(this, config)\n\t\t} catch (ex) {\n\t\t\tif (ex instanceof TypeError && config === 'destroy') {\n\t\t\t\tif (window.TESTING === undefined) {\n\t\t\t\t\tconsole.error('Deprecated call $.tooltip(\\'destroy\\') has been deprecated and should be removed')\n\t\t\t\t}\n\t\t\t\treturn tooltip.call(this, 'dispose')\n\t\t\t}\n\t\t\tif (ex instanceof TypeError && config === 'fixTitle') {\n\t\t\t\tif (window.TESTING === undefined) {\n\t\t\t\t\tconsole.error('Deprecated call $.tooltip(\\'fixTitle\\') has been deprecated and should be removed')\n\t\t\t\t}\n\t\t\t\treturn tooltip.call(this, '_fixTitle')\n\t\t\t}\n\t\t}\n\t}\n})($.prototype.tooltip)\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 */\n\nimport OC from '../OC'\n\nimport $ from 'jquery'\n\nexport const setUp = () => {\n\tconst $menu = $('#header #settings')\n\t// Using page terminoogy as below\n\tconst $excludedPageClasses = [\n\t\t'user-status-menu-item__header',\n\t]\n\n\t// show loading feedback\n\t$menu.delegate('a', 'click', event => {\n\t\tlet $page = $(event.target)\n\t\tif (!$page.is('a')) {\n\t\t\t$page = $page.closest('a')\n\t\t}\n\t\tif (event.which === 1 && !event.ctrlKey && !event.metaKey) {\n\t\t\tif (!$excludedPageClasses.includes($page.attr('class'))) {\n\t\t\t\t$page.find('img').remove()\n\t\t\t\t$page.find('div').remove() // prevent odd double-clicks\n\t\t\t\t$page.prepend($('<div></div>').addClass('icon-loading-small'))\n\t\t\t}\n\t\t} else {\n\t\t\t// Close navigation when opening menu entry in\n\t\t\t// a new tab\n\t\t\tOC.hideMenus(() => false)\n\t\t}\n\t})\n\n\t$menu.delegate('a', 'mouseup', event => {\n\t\tif (event.which === 2) {\n\t\t\t// Close navigation when opening app in\n\t\t\t// a new tab via middle click\n\t\t\tOC.hideMenus(() => false)\n\t\t}\n\t})\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 * @author Julius Härtl <jus@bitgrid.net>\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 */\n\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n'\nimport Vue from 'vue'\n\nimport AppMenu from './AppMenu.vue'\n\nexport const setUp = () => {\n\n\tVue.mixin({\n\t\tmethods: {\n\t\t\tt,\n\t\t\tn,\n\t\t},\n\t})\n\n\tconst container = document.getElementById('header-left__appmenu')\n\tif (!container) {\n\t\t// no container, possibly we're on a public page\n\t\treturn\n\t}\n\tconst AppMenuApp = Vue.extend(AppMenu)\n\tconst appMenu = new AppMenuApp({}).$mount(container)\n\n\tObject.assign(OC, {\n\t\tsetNavigationCounter(id, counter) {\n\t\t\tappMenu.setNavigationCounter(id, counter)\n\t\t},\n\t})\n\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 */\n\nimport $ from 'jquery'\nimport OC from '../OC'\n\n/**\n * @todo move to contacts menu code https://github.com/orgs/nextcloud/projects/31#card-21213129\n */\nexport const setUp = () => {\n\t// eslint-disable-next-line no-new\n\tnew OC.ContactsMenu({\n\t\tel: $('#contactsmenu .menu'),\n\t\ttrigger: $('#contactsmenu .menutoggle'),\n\t})\n}\n","/**\n * @copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de>\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 */\n\nimport $ from 'jquery'\n\n/*\n * Detects links:\n * Either the http(s) protocol is given or two strings, basically limited to ascii with the last\n * word being at least one digit long,\n * followed by at least another character\n *\n * The downside: anything not ascii is excluded. Not sure how common it is in areas using different\n * alphabets… the upside: fake domains with similar looking characters won't be formatted as links\n *\n * This is a copy of the backend regex in IURLGenerator, make sure to adjust both when changing\n */\nconst urlRegex = /(\\s|^)(https?:\\/\\/)((?:[-A-Z0-9+_]+\\.)+[-A-Z]+(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\\s|$)/ig\n\n/**\n * @param {any} content -\n */\nexport function plainToRich(content) {\n\treturn this.formatLinksRich(content)\n}\n\n/**\n * @param {any} content -\n */\nexport function richToPlain(content) {\n\treturn this.formatLinksPlain(content)\n}\n\n/**\n * @param {any} content -\n */\nexport function formatLinksRich(content) {\n\treturn content.replace(urlRegex, function(_, leadingSpace, protocol, url, trailingSpace) {\n\t\tlet linkText = url\n\t\tif (!protocol) {\n\t\t\tprotocol = 'https://'\n\t\t} else if (protocol === 'http://') {\n\t\t\tlinkText = protocol + url\n\t\t}\n\n\t\treturn leadingSpace + '<a class=\"external\" target=\"_blank\" rel=\"noopener noreferrer\" href=\"' + protocol + url + '\">' + linkText + '</a>' + trailingSpace\n\t})\n}\n\n/**\n * @param {any} content -\n */\nexport function formatLinksPlain(content) {\n\tconst $content = $('<div></div>').html(content)\n\t$content.find('a').each(function() {\n\t\tconst $this = $(this)\n\t\t$this.html($this.attr('href'))\n\t})\n\treturn $content.html()\n}\n","/**\n * @copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de>\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 */\n\nimport _ from 'underscore'\nimport $ from 'jquery'\nimport { generateOcsUrl } from '@nextcloud/router'\n\n/**\n * @param {any} options -\n */\nexport function query(options) {\n\toptions = options || {}\n\tconst dismissOptions = options.dismiss || {}\n\t$.ajax({\n\t\ttype: 'GET',\n\t\turl: options.url || generateOcsUrl('core/whatsnew?format=json'),\n\t\tsuccess: options.success || function(data, statusText, xhr) {\n\t\t\tonQuerySuccess(data, statusText, xhr, dismissOptions)\n\t\t},\n\t\terror: options.error || onQueryError,\n\t})\n}\n\n/**\n * @param {any} version -\n * @param {any} options -\n */\nexport function dismiss(version, options) {\n\toptions = options || {}\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: options.url || generateOcsUrl('core/whatsnew'),\n\t\tdata: { version: encodeURIComponent(version) },\n\t\tsuccess: options.success || onDismissSuccess,\n\t\terror: options.error || onDismissError,\n\t})\n\t// remove element immediately\n\t$('.whatsNewPopover').remove()\n}\n\n/**\n * @param {any} data -\n * @param {any} statusText -\n * @param {any} xhr -\n * @param {any} dismissOptions -\n */\nfunction onQuerySuccess(data, statusText, xhr, dismissOptions) {\n\tconsole.debug('querying Whats New data was successful: ' + statusText)\n\tconsole.debug(data)\n\n\tif (xhr.status !== 200) {\n\t\treturn\n\t}\n\n\tlet item, menuItem, text, icon\n\n\tconst div = document.createElement('div')\n\tdiv.classList.add('popovermenu', 'open', 'whatsNewPopover', 'menu-left')\n\n\tconst list = document.createElement('ul')\n\n\t// header\n\titem = document.createElement('li')\n\tmenuItem = document.createElement('span')\n\tmenuItem.className = 'menuitem'\n\n\ttext = document.createElement('span')\n\ttext.innerText = t('core', 'New in') + ' ' + data.ocs.data.product\n\ttext.className = 'caption'\n\tmenuItem.appendChild(text)\n\n\ticon = document.createElement('span')\n\ticon.className = 'icon-close'\n\ticon.onclick = function() {\n\t\tdismiss(data.ocs.data.version, dismissOptions)\n\t}\n\tmenuItem.appendChild(icon)\n\n\titem.appendChild(menuItem)\n\tlist.appendChild(item)\n\n\t// Highlights\n\tfor (const i in data.ocs.data.whatsNew.regular) {\n\t\tconst whatsNewTextItem = data.ocs.data.whatsNew.regular[i]\n\t\titem = document.createElement('li')\n\n\t\tmenuItem = document.createElement('span')\n\t\tmenuItem.className = 'menuitem'\n\n\t\ticon = document.createElement('span')\n\t\ticon.className = 'icon-checkmark'\n\t\tmenuItem.appendChild(icon)\n\n\t\ttext = document.createElement('p')\n\t\ttext.innerHTML = _.escape(whatsNewTextItem)\n\t\tmenuItem.appendChild(text)\n\n\t\titem.appendChild(menuItem)\n\t\tlist.appendChild(item)\n\t}\n\n\t// Changelog URL\n\tif (!_.isUndefined(data.ocs.data.changelogURL)) {\n\t\titem = document.createElement('li')\n\n\t\tmenuItem = document.createElement('a')\n\t\tmenuItem.href = data.ocs.data.changelogURL\n\t\tmenuItem.rel = 'noreferrer noopener'\n\t\tmenuItem.target = '_blank'\n\n\t\ticon = document.createElement('span')\n\t\ticon.className = 'icon-link'\n\t\tmenuItem.appendChild(icon)\n\n\t\ttext = document.createElement('span')\n\t\ttext.innerText = t('core', 'View changelog')\n\t\tmenuItem.appendChild(text)\n\n\t\titem.appendChild(menuItem)\n\t\tlist.appendChild(item)\n\t}\n\n\tdiv.appendChild(list)\n\tdocument.body.appendChild(div)\n}\n\n/**\n * @param {any} x -\n * @param {any} t -\n * @param {any} e -\n */\nfunction onQueryError(x, t, e) {\n\tconsole.debug('querying Whats New Data resulted in an error: ' + t + e)\n\tconsole.debug(x)\n}\n\n/**\n * @param {any} data -\n */\nfunction onDismissSuccess(data) {\n\t// noop\n}\n\n/**\n * @param {any} data -\n */\nfunction onDismissError(data) {\n\tconsole.debug('dismissing Whats New data resulted in an error: ' + data)\n}\n","/**\n * @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>\n *\n * @author Joas Schilling <coding@schilljs.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 */\n\nimport { loadState } from '@nextcloud/initial-state'\n\nexport default {\n\t/**\n\t * @return {boolean} Whether the user opted-out of shortcuts so that they should not be registered\n\t */\n\tdisableKeyboardShortcuts() {\n\t\treturn loadState('theming', 'shortcutsDisabled', false)\n\t},\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 * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\n/* eslint-disable @nextcloud/no-deprecations */\nimport { initCore } from './init'\n\nimport _ from 'underscore'\nimport $ from 'jquery'\nimport 'jquery-migrate/dist/jquery-migrate.min'\n// TODO: switch to `jquery-ui` package and import widgets and effects individually\n// `jquery-ui-dist` is used as a workaround for the issue of missing effects\nimport 'jquery-ui-dist/jquery-ui'\nimport 'jquery-ui-dist/jquery-ui.css'\nimport 'jquery-ui-dist/jquery-ui.theme.css'\n// END TODO\nimport autosize from 'autosize'\nimport Backbone from 'backbone'\nimport 'bootstrap/js/dist/tooltip'\nimport './Polyfill/tooltip'\nimport ClipboardJS from 'clipboard'\nimport { dav } from 'davclient.js'\nimport Handlebars from 'handlebars'\nimport md5 from 'blueimp-md5'\nimport moment from 'moment'\nimport 'select2'\nimport 'select2/select2.css'\nimport 'snap.js/dist/snap'\nimport 'strengthify'\nimport 'strengthify/strengthify.css'\n\nimport OC from './OC/index'\nimport OCP from './OCP/index'\nimport OCA from './OCA/index'\nimport { getToken as getRequestToken } from './OC/requesttoken'\n\nconst warnIfNotTesting = function() {\n\tif (window.TESTING === undefined) {\n\t\tconsole.warn.apply(console, arguments)\n\t}\n}\n\n/**\n * Mark a function as deprecated and automatically\n * warn if used!\n *\n * @param {Function} func the library to deprecate\n * @param {string} funcName the name of the library\n * @param {number} version the version this gets removed\n * @return {Function}\n */\nconst deprecate = (func, funcName, version) => {\n\tconst oldFunc = func\n\tconst newFunc = function() {\n\t\twarnIfNotTesting(`The ${funcName} library is deprecated! It will be removed in nextcloud ${version}.`)\n\t\treturn oldFunc.apply(this, arguments)\n\t}\n\tObject.assign(newFunc, oldFunc)\n\treturn newFunc\n}\n\nconst setDeprecatedProp = (global, cb, msg) => {\n\t(Array.isArray(global) ? global : [global]).forEach(global => {\n\t\tif (window[global] !== undefined) {\n\t\t\tdelete window[global]\n\t\t}\n\t\tObject.defineProperty(window, global, {\n\t\t\tget: () => {\n\t\t\t\tif (msg) {\n\t\t\t\t\twarnIfNotTesting(`${global} is deprecated: ${msg}`)\n\t\t\t\t} else {\n\t\t\t\t\twarnIfNotTesting(`${global} is deprecated`)\n\t\t\t\t}\n\n\t\t\t\treturn cb()\n\t\t\t},\n\t\t})\n\t})\n}\n\nwindow._ = _\nsetDeprecatedProp(['$', 'jQuery'], () => $, 'The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.')\nsetDeprecatedProp('autosize', () => autosize, 'please ship your own, this will be removed in Nextcloud 20')\nsetDeprecatedProp('Backbone', () => Backbone, 'please ship your own, this will be removed in Nextcloud 20')\nsetDeprecatedProp(['Clipboard', 'ClipboardJS'], () => ClipboardJS, 'please ship your own, this will be removed in Nextcloud 20')\nwindow.dav = dav\nsetDeprecatedProp('Handlebars', () => Handlebars, 'please ship your own, this will be removed in Nextcloud 20')\nsetDeprecatedProp('md5', () => md5, 'please ship your own, this will be removed in Nextcloud 20')\nsetDeprecatedProp('moment', () => moment, 'please ship your own, this will be removed in Nextcloud 20')\n\nwindow.OC = OC\nsetDeprecatedProp('initCore', () => initCore, 'this is an internal function')\nsetDeprecatedProp('oc_appswebroots', () => OC.appswebroots, 'use OC.appswebroots instead, this will be removed in Nextcloud 20')\nsetDeprecatedProp('oc_config', () => OC.config, 'use OC.config instead, this will be removed in Nextcloud 20')\nsetDeprecatedProp('oc_current_user', () => OC.getCurrentUser().uid, 'use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20')\nsetDeprecatedProp('oc_debug', () => OC.debug, 'use OC.debug instead, this will be removed in Nextcloud 20')\nsetDeprecatedProp('oc_defaults', () => OC.theme, 'use OC.theme instead, this will be removed in Nextcloud 20')\nsetDeprecatedProp('oc_isadmin', OC.isUserAdmin, 'use OC.isUserAdmin() instead, this will be removed in Nextcloud 20')\nsetDeprecatedProp('oc_requesttoken', () => getRequestToken(), 'use OC.requestToken instead, this will be removed in Nextcloud 20')\nsetDeprecatedProp('oc_webroot', () => OC.webroot, 'use OC.getRootPath() instead, this will be removed in Nextcloud 20')\nsetDeprecatedProp('OCDialogs', () => OC.dialogs, 'use OC.dialogs instead, this will be removed in Nextcloud 20')\nwindow.OCP = OCP\nwindow.OCA = OCA\n$.fn.select2 = deprecate($.fn.select2, 'select2', 19)\n\n/**\n * translate a string\n *\n * @param {string} app the id of the app for which to translate the string\n * @param {string} text the string to translate\n * @param [vars] map of placeholder key to value\n * @param {number} [count] number to replace %n with\n * @return {string}\n */\nwindow.t = _.bind(OC.L10N.translate, OC.L10N)\n\n/**\n * translate a string\n *\n * @param {string} app the id of the app for which to translate the string\n * @param {string} text_singular the string to translate for exactly one object\n * @param {string} text_plural the string to translate for n objects\n * @param {number} count number to determine whether to use singular or plural\n * @param [vars] map of placeholder key to value\n * @return {string} Translated string\n */\nwindow.n = _.bind(OC.L10N.translatePlural, OC.L10N)\n","/**\n * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\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 */\n\nimport escapeHTML from 'escape-html'\n\n/**\n * @typedef TypeDefinition\n * @function {Function} action This action is executed to let the user select a resource\n * @param {string} icon Contains the icon css class for the type\n * @function Object() { [native code] }\n */\n\n/**\n * @type {TypeDefinition[]}\n */\nconst types = {}\n\n/**\n * Those translations will be used by the vue component but they should be shipped with the server\n * FIXME: Those translations should be added to the library\n *\n * @return {Array}\n */\nexport const l10nProjects = () => {\n\treturn [\n\t\tt('core', 'Add to a project'),\n\t\tt('core', 'Show details'),\n\t\tt('core', 'Hide details'),\n\t\tt('core', 'Rename project'),\n\t\tt('core', 'Failed to rename the project'),\n\t\tt('core', 'Failed to create a project'),\n\t\tt('core', 'Failed to add the item to the project'),\n\t\tt('core', 'Connect items to a project to make them easier to find'),\n\t\tt('core', 'Type to search for existing projects'),\n\t]\n}\n\nexport default {\n\t/**\n\t *\n\t * @param {string} type type\n\t * @param {TypeDefinition} typeDefinition typeDefinition\n\t */\n\tregisterType(type, typeDefinition) {\n\t\ttypes[type] = typeDefinition\n\t},\n\ttrigger(type) {\n\t\treturn types[type].action()\n\t},\n\tgetTypes() {\n\t\treturn Object.keys(types)\n\t},\n\tgetIcon(type) {\n\t\treturn types[type].typeIconClass || ''\n\t},\n\tgetLabel(type) {\n\t\treturn escapeHTML(types[type].typeString || type)\n\t},\n\tgetLink(type, id) {\n\t\t/* TODO: Allow action to be executed instead of href as well */\n\t\treturn typeof types[type] !== 'undefined' ? types[type].link(id) : ''\n\t},\n}\n","/**\n * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\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 */\n\nconst loadedScripts = {}\nconst loadedStylesheets = {}\n/**\n * @namespace OCP\n * @class Loader\n */\nexport default {\n\n\t/**\n\t * Load a script asynchronously\n\t *\n\t * @param {string} app the app name\n\t * @param {string} file the script file name\n\t * @return {Promise}\n\t */\n\tloadScript(app, file) {\n\t\tconst key = app + file\n\t\tif (Object.prototype.hasOwnProperty.call(loadedScripts, key)) {\n\t\t\treturn Promise.resolve()\n\t\t}\n\t\tloadedScripts[key] = true\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\tconst scriptPath = OC.filePath(app, 'js', file)\n\t\t\tconst script = document.createElement('script')\n\t\t\tscript.src = scriptPath\n\t\t\tscript.setAttribute('nonce', btoa(OC.requestToken))\n\t\t\tscript.onload = () => resolve()\n\t\t\tscript.onerror = () => reject(new Error(`Failed to load script from ${scriptPath}`))\n\t\t\tdocument.head.appendChild(script)\n\t\t})\n\t},\n\n\t/**\n\t * Load a stylesheet file asynchronously\n\t *\n\t * @param {string} app the app name\n\t * @param {string} file the script file name\n\t * @return {Promise}\n\t */\n\tloadStylesheet(app, file) {\n\t\tconst key = app + file\n\t\tif (Object.prototype.hasOwnProperty.call(loadedStylesheets, key)) {\n\t\t\treturn Promise.resolve()\n\t\t}\n\t\tloadedStylesheets[key] = true\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\tconst stylePath = OC.filePath(app, 'css', file)\n\t\t\tconst link = document.createElement('link')\n\t\t\tlink.href = stylePath\n\t\t\tlink.type = 'text/css'\n\t\t\tlink.rel = 'stylesheet'\n\t\t\tlink.onload = () => resolve()\n\t\t\tlink.onerror = () => reject(new Error(`Failed to load stylesheet from ${stylePath}`))\n\t\t\tdocument.head.appendChild(link)\n\t\t})\n\t},\n}\n","/**\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Julius Härtl <jus@bitgrid.net>\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 */\n\nimport {\n\tshowError,\n\tshowInfo, showMessage,\n\tshowSuccess,\n\tshowWarning,\n} from '@nextcloud/dialogs'\n\nexport default {\n\t/**\n\t * @deprecated 19.0.0 use `showSuccess` from the `@nextcloud/dialogs` package instead\n\t *\n\t * @param {string} text the toast text\n\t * @param {object} options options\n\t * @return {Toast}\n\t */\n\tsuccess(text, options) {\n\t\treturn showSuccess(text, options)\n\t},\n\t/**\n\t * @deprecated 19.0.0 use `showWarning` from the `@nextcloud/dialogs` package instead\n\t *\n\t * @param {string} text the toast text\n\t * @param {object} options options\n\t * @return {Toast}\n\t */\n\twarning(text, options) {\n\t\treturn showWarning(text, options)\n\t},\n\t/**\n\t * @deprecated 19.0.0 use `showError` from the `@nextcloud/dialogs` package instead\n\t *\n\t * @param {string} text the toast text\n\t * @param {object} options options\n\t * @return {Toast}\n\t */\n\terror(text, options) {\n\t\treturn showError(text, options)\n\t},\n\t/**\n\t * @deprecated 19.0.0 use `showInfo` from the `@nextcloud/dialogs` package instead\n\t *\n\t * @param {string} text the toast text\n\t * @param {object} options options\n\t * @return {Toast}\n\t */\n\tinfo(text, options) {\n\t\treturn showInfo(text, options)\n\t},\n\t/**\n\t * @deprecated 19.0.0 use `showMessage` from the `@nextcloud/dialogs` package instead\n\t *\n\t * @param {string} text the toast text\n\t * @param {object} options options\n\t * @return {Toast}\n\t */\n\tmessage(text, options) {\n\t\treturn showMessage(text, options)\n\t},\n\n}\n","/**\n * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\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 */\n\nimport { loadState } from '@nextcloud/initial-state'\n\nimport * as AppConfig from './appconfig'\nimport * as Comments from './comments'\nimport * as WhatsNew from './whatsnew'\n\nimport Accessibility from './accessibility'\nimport Collaboration from './collaboration'\nimport Loader from './loader'\nimport Toast from './toast'\n\n/** @namespace OCP */\nexport default {\n\tAccessibility,\n\tAppConfig,\n\tCollaboration,\n\tComments,\n\tInitialState: {\n\t\t/**\n\t\t * @deprecated 18.0.0 add https://www.npmjs.com/package/@nextcloud/initial-state to your app\n\t\t */\n\t\tloadState,\n\t},\n\tLoader,\n\t/**\n\t * @deprecated 19.0.0 use the `@nextcloud/dialogs` package instead\n\t */\n\tToast,\n\tWhatsNew,\n}\n","/**\n * @copyright 2018 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 */\n\nimport $ from 'jquery'\n\nimport OC from '../OC'\n\n/**\n * This plugin inserts the right avatar for the user, depending on, whether a\n * custom avatar is uploaded - which it uses then - or not, and display a\n * placeholder with the first letter of the users name instead.\n * For this it queries the core_avatar_get route, thus this plugin is fit very\n * tightly for owncloud, and it may not work anywhere else.\n *\n * You may use this on any <div></div>\n * Here I'm using <div class=\"avatardiv\"></div> as an example.\n *\n * There are 5 ways to call this:\n *\n * 1. $('.avatardiv').avatar('jdoe', 128);\n * This will make the div to jdoe's fitting avatar, with a size of 128px.\n *\n * 2. $('.avatardiv').avatar('jdoe');\n * This will make the div to jdoe's fitting avatar. If the div already has a\n * height, it will be used for the avatars size. Otherwise this plugin will\n * search for 'size' DOM data, to use for avatar size. If neither are available\n * it will default to 64px.\n *\n * 3. $('.avatardiv').avatar();\n * This will search the DOM for 'user' data, to use as the username. If there\n * is no username available it will default to a placeholder with the value of\n * \"?\". The size will be determined the same way, as the second example.\n *\n * 4. $('.avatardiv').avatar('jdoe', 128, true);\n * This will behave like the first example, except it will also append random\n * hashes to the custom avatar images, to force image reloading in IE8.\n *\n * 5. $('.avatardiv').avatar('jdoe', 128, undefined, true);\n * This will behave like the first example, but it will hide the avatardiv, if\n * it will display the default placeholder. undefined is the ie8fix from\n * example 4 and can be either true, or false/undefined, to be ignored.\n *\n * 6. $('.avatardiv').avatar('jdoe', 128, undefined, true, callback);\n * This will behave like the above example, but it will call the function\n * defined in callback after the avatar is placed into the DOM.\n *\n */\n\n$.fn.avatar = function(user, size, ie8fix, hidedefault, callback, displayname) {\n\tconst setAvatarForUnknownUser = function(target) {\n\t\ttarget.imageplaceholder('?')\n\t\ttarget.css('background-color', '#b9b9b9')\n\t}\n\n\tif (typeof (user) !== 'undefined') {\n\t\tuser = String(user)\n\t}\n\tif (typeof (displayname) !== 'undefined') {\n\t\tdisplayname = String(displayname)\n\t}\n\n\tif (typeof (size) === 'undefined') {\n\t\tif (this.height() > 0) {\n\t\t\tsize = this.height()\n\t\t} else if (this.data('size') > 0) {\n\t\t\tsize = this.data('size')\n\t\t} else {\n\t\t\tsize = 64\n\t\t}\n\t}\n\n\tthis.height(size)\n\tthis.width(size)\n\n\tif (typeof (user) === 'undefined') {\n\t\tif (typeof (this.data('user')) !== 'undefined') {\n\t\t\tuser = this.data('user')\n\t\t} else {\n\t\t\tsetAvatarForUnknownUser(this)\n\t\t\treturn\n\t\t}\n\t}\n\n\t// sanitize\n\tuser = String(user).replace(/\\//g, '')\n\n\tconst $div = this\n\tlet url\n\n\t// If this is our own avatar we have to use the version attribute\n\tif (user === OC.getCurrentUser().uid) {\n\t\turl = OC.generateUrl(\n\t\t\t'/avatar/{user}/{size}?v={version}',\n\t\t\t{\n\t\t\t\tuser,\n\t\t\t\tsize: Math.ceil(size * window.devicePixelRatio),\n\t\t\t\tversion: oc_userconfig.avatar.version,\n\t\t\t})\n\t} else {\n\t\turl = OC.generateUrl(\n\t\t\t'/avatar/{user}/{size}',\n\t\t\t{\n\t\t\t\tuser,\n\t\t\t\tsize: Math.ceil(size * window.devicePixelRatio),\n\t\t\t})\n\t}\n\n\tconst img = new Image()\n\n\t// If the new image loads successfully set it.\n\timg.onload = function() {\n\t\t$div.clearimageplaceholder()\n\t\t$div.append(img)\n\n\t\tif (typeof callback === 'function') {\n\t\t\tcallback()\n\t\t}\n\t}\n\t// Fallback when avatar loading fails:\n\t// Use old placeholder when a displayname attribute is defined,\n\t// otherwise show the unknown user placeholder.\n\timg.onerror = function() {\n\t\t$div.clearimageplaceholder()\n\t\tif (typeof (displayname) !== 'undefined') {\n\t\t\t$div.imageplaceholder(user, displayname)\n\t\t} else {\n\t\t\tsetAvatarForUnknownUser($div)\n\t\t}\n\n\t\tif (typeof callback === 'function') {\n\t\t\tcallback()\n\t\t}\n\t}\n\n\tif (size < 32) {\n\t\t$div.addClass('icon-loading-small')\n\t} else {\n\t\t$div.addClass('icon-loading')\n\t}\n\timg.width = size\n\timg.height = size\n\timg.src = url\n\timg.alt = ''\n}\n","/**\n * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport $ from 'jquery'\n\nimport OC from '../OC'\nimport { isA11yActivation } from '../Util/a11y.js'\n\nconst LIST = ''\n\t+ '<div class=\"menu popovermenu menu-left hidden contactsmenu-popover\">'\n\t+ ' <ul>'\n\t+ ' <li>'\n\t+ ' <a>'\n\t+ ' <span class=\"icon-loading-small\"></span>'\n\t+ ' </a>'\n\t+ ' </li>'\n\t+ ' </ul>'\n\t+ '</div>'\n\nconst entryTemplate = require('./contactsmenu/jquery_entry.handlebars')\n\n$.fn.contactsMenu = function(shareWith, shareType, appendTo) {\n\t// 0 - user, 4 - email, 6 - remote\n\tconst allowedTypes = [0, 4, 6]\n\tif (allowedTypes.indexOf(shareType) === -1) {\n\t\treturn\n\t}\n\n\tconst $div = this\n\tappendTo.append(LIST)\n\tconst $list = appendTo.find('div.contactsmenu-popover')\n\n\t$div.on('click keydown', function(event) {\n\t\tif (!isA11yActivation(event)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (!$list.hasClass('hidden')) {\n\t\t\t$list.addClass('hidden')\n\t\t\t$list.hide()\n\t\t\treturn\n\t\t}\n\n\t\t$list.removeClass('hidden')\n\t\t$list.show()\n\n\t\tif ($list.hasClass('loaded')) {\n\t\t\treturn\n\t\t}\n\n\t\t$list.addClass('loaded')\n\t\t$.ajax(OC.generateUrl('/contactsmenu/findOne'), {\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tshareType,\n\t\t\t\tshareWith,\n\t\t\t},\n\t\t}).then(function(data) {\n\t\t\t$list.find('ul').find('li').addClass('hidden')\n\n\t\t\tlet actions\n\t\t\tif (!data.topAction) {\n\t\t\t\tactions = [{\n\t\t\t\t\thyperlink: '#',\n\t\t\t\t\ttitle: t('core', 'No action available'),\n\t\t\t\t}]\n\t\t\t} else {\n\t\t\t\tactions = [data.topAction].concat(data.actions)\n\t\t\t}\n\n\t\t\tactions.forEach(function(action) {\n\t\t\t\t$list.find('ul').append(entryTemplate(action))\n\t\t\t})\n\n\t\t\t$div.trigger('load')\n\t\t}, function(jqXHR) {\n\t\t\t$list.find('ul').find('li').addClass('hidden')\n\n\t\t\tlet title\n\t\t\tif (jqXHR.status === 404) {\n\t\t\t\ttitle = t('core', 'No action available')\n\t\t\t} else {\n\t\t\t\ttitle = t('core', 'Error fetching contact actions')\n\t\t\t}\n\n\t\t\t$list.find('ul').append(entryTemplate({\n\t\t\t\thyperlink: '#',\n\t\t\t\ttitle,\n\t\t\t}))\n\n\t\t\t$div.trigger('loaderror', jqXHR)\n\t\t})\n\t})\n\n\t$(document).click(function(event) {\n\t\tconst clickedList = ($list.has(event.target).length > 0)\n\t\tlet clickedTarget = ($div.has(event.target).length > 0)\n\n\t\t$div.each(function() {\n\t\t\tif ($(this).is(event.target)) {\n\t\t\t\tclickedTarget = true\n\t\t\t}\n\t\t})\n\n\t\tif (clickedList || clickedTarget) {\n\t\t\treturn\n\t\t}\n\n\t\t$list.addClass('hidden')\n\t\t$list.hide()\n\t})\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 */\n\nimport $ from 'jquery'\n\n/**\n * check if an element exists.\n * allows you to write if ($('#myid').exists()) to increase readability\n *\n * @see {@link http://stackoverflow.com/questions/31044/is-there-an-exists-function-for-jquery}\n * @return {boolean}\n */\n$.fn.exists = function() {\n\treturn this.length > 0\n}\n","/**\n * @copyright 2018 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 */\n\nimport $ from 'jquery'\n\n/**\n * Filter jQuery selector by attribute value\n *\n * @param {string} attrName attribute name\n * @param {string} attrValue attribute value\n * @return {void}\n */\n$.fn.filterAttr = function(attrName, attrValue) {\n\treturn this.filter(function() {\n\t\treturn $(this).attr(attrName) === attrValue\n\t})\n}\n","/**\n * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Gary Kim <gary@garykim.dev>\n * @author Joas Schilling <coding@schilljs.com>\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 */\n\nimport $ from 'jquery'\nimport { isA11yActivation } from '../Util/a11y'\n\n$.widget('oc.ocdialog', {\n\toptions: {\n\t\twidth: 'auto',\n\t\theight: 'auto',\n\t\tcloseButton: true,\n\t\tcloseOnEscape: true,\n\t\tcloseCallback: null,\n\t\tmodal: false,\n\t},\n\t_create() {\n\t\tconst self = this\n\n\t\tthis.originalCss = {\n\t\t\tdisplay: this.element[0].style.display,\n\t\t\twidth: this.element[0].style.width,\n\t\t\theight: this.element[0].style.height,\n\t\t}\n\n\t\tthis.originalTitle = this.element.attr('title')\n\t\tthis.options.title = this.options.title || this.originalTitle\n\n\t\tthis.$dialog = $('<div class=\"oc-dialog\"></div>')\n\t\t\t.attr({\n\t\t\t\t// Setting tabIndex makes the div focusable\n\t\t\t\ttabIndex: -1,\n\t\t\t\trole: 'dialog',\n\t\t\t})\n\t\t\t.insertBefore(this.element)\n\t\tthis.$dialog.append(this.element.detach())\n\t\tthis.element.removeAttr('title').addClass('oc-dialog-content').appendTo(this.$dialog)\n\n\t\t// Activate the primary button on enter if there is a single input\n\t\tif (self.element.find('input').length === 1) {\n\t\t\tconst $input = self.element.find('input')\n\t\t\t$input.on('keydown', function(event) {\n\t\t\t\tif (isA11yActivation(event)) {\n\t\t\t\t\tif (self.$buttonrow) {\n\t\t\t\t\t\tconst $button = self.$buttonrow.find('button.primary')\n\t\t\t\t\t\tif ($button && !$button.prop('disabled')) {\n\t\t\t\t\t\t\t$button.click()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis.$dialog.css({\n\t\t\tdisplay: 'inline-block',\n\t\t\tposition: 'fixed',\n\t\t})\n\n\t\tthis.enterCallback = null\n\n\t\t$(document).on('keydown keyup', function(event) {\n\t\t\tif (\n\t\t\t\tevent.target !== self.$dialog.get(0)\n\t\t\t\t&& self.$dialog.find($(event.target)).length === 0\n\t\t\t) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Escape\n\t\t\tif (\n\t\t\t\tevent.keyCode === 27\n\t\t\t\t&& event.type === 'keydown'\n\t\t\t\t&& self.options.closeOnEscape\n\t\t\t) {\n\t\t\t\tevent.stopImmediatePropagation()\n\t\t\t\tself.close()\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t// Enter\n\t\t\tif (event.keyCode === 13) {\n\t\t\t\tevent.stopImmediatePropagation()\n\t\t\t\tif (self.enterCallback !== null) {\n\t\t\t\t\tself.enterCallback()\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tif (event.type === 'keyup') {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t}\n\t\t})\n\n\t\tthis._setOptions(this.options)\n\t\tthis._createOverlay()\n\t},\n\t_init() {\n\t\tthis.$dialog.focus()\n\t\tthis._trigger('open')\n\t},\n\t_setOption(key, value) {\n\t\tconst self = this\n\t\tswitch (key) {\n\t\tcase 'title':\n\t\t\tif (this.$title) {\n\t\t\t\tthis.$title.text(value)\n\t\t\t} else {\n\t\t\t\tconst $title = $('<h2 class=\"oc-dialog-title\">'\n\t\t\t\t\t\t+ value\n\t\t\t\t\t\t+ '</h2>')\n\t\t\t\tthis.$title = $title.prependTo(this.$dialog)\n\t\t\t}\n\t\t\tthis._setSizes()\n\t\t\tbreak\n\t\tcase 'buttons':\n\t\t\tif (this.$buttonrow) {\n\t\t\t\tthis.$buttonrow.empty()\n\t\t\t} else {\n\t\t\t\tconst $buttonrow = $('<div class=\"oc-dialog-buttonrow\"></div>')\n\t\t\t\tthis.$buttonrow = $buttonrow.appendTo(this.$dialog)\n\t\t\t}\n\t\t\tif (value.length === 1) {\n\t\t\t\tthis.$buttonrow.addClass('onebutton')\n\t\t\t} else if (value.length === 2) {\n\t\t\t\tthis.$buttonrow.addClass('twobuttons')\n\t\t\t} else if (value.length === 3) {\n\t\t\t\tthis.$buttonrow.addClass('threebuttons')\n\t\t\t}\n\t\t\t$.each(value, function(idx, val) {\n\t\t\t\tconst $button = $('<button>').text(val.text)\n\t\t\t\tif (val.classes) {\n\t\t\t\t\t$button.addClass(val.classes)\n\t\t\t\t}\n\t\t\t\tif (val.defaultButton) {\n\t\t\t\t\t$button.addClass('primary')\n\t\t\t\t\tself.$defaultButton = $button\n\t\t\t\t}\n\t\t\t\tself.$buttonrow.append($button)\n\t\t\t\t$button.on('click keydown', function(event) {\n\t\t\t\t\tif (isA11yActivation(event)) {\n\t\t\t\t\t\tval.click.apply(self.element[0], arguments)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t\t\tthis.$buttonrow.find('button')\n\t\t\t\t.on('focus', function(event) {\n\t\t\t\t\tself.$buttonrow.find('button').removeClass('primary')\n\t\t\t\t\t$(this).addClass('primary')\n\t\t\t\t})\n\t\t\tthis._setSizes()\n\t\t\tbreak\n\t\tcase 'style':\n\t\t\tif (value.buttons !== undefined) {\n\t\t\t\tthis.$buttonrow.addClass(value.buttons)\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'closeButton':\n\t\t\tif (value) {\n\t\t\t\tconst $closeButton = $('<a class=\"oc-dialog-close\" tabindex=\"0\"></a>')\n\t\t\t\tthis.$dialog.prepend($closeButton)\n\t\t\t\t$closeButton.on('click keydown', function(event) {\n\t\t\t\t\tif (isA11yActivation(event)) {\n\t\t\t\t\t\tself.options.closeCallback && self.options.closeCallback()\n\t\t\t\t\t\tself.close()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tthis.$dialog.find('.oc-dialog-close').remove()\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'width':\n\t\t\tthis.$dialog.css('width', value)\n\t\t\tbreak\n\t\tcase 'height':\n\t\t\tthis.$dialog.css('height', value)\n\t\t\tbreak\n\t\tcase 'close':\n\t\t\tthis.closeCB = value\n\t\t\tbreak\n\t\t}\n\t\t// this._super(key, value);\n\t\t$.Widget.prototype._setOption.apply(this, arguments)\n\t},\n\t_setOptions(options) {\n\t\t// this._super(options);\n\t\t$.Widget.prototype._setOptions.apply(this, arguments)\n\t},\n\t_setSizes() {\n\t\tlet lessHeight = 0\n\t\tif (this.$title) {\n\t\t\tlessHeight += this.$title.outerHeight(true)\n\t\t}\n\t\tif (this.$buttonrow) {\n\t\t\tlessHeight += this.$buttonrow.outerHeight(true)\n\t\t}\n\t\tthis.element.css({\n\t\t\theight: 'calc(100% - ' + lessHeight + 'px)',\n\t\t})\n\t},\n\t_createOverlay() {\n\t\tif (!this.options.modal) {\n\t\t\treturn\n\t\t}\n\n\t\tconst self = this\n\t\tlet contentDiv = $('#content')\n\t\tif (contentDiv.length === 0) {\n\t\t\t// nextcloud-vue compatibility\n\t\t\tcontentDiv = $('.content')\n\t\t}\n\t\tthis.overlay = $('<div>')\n\t\t\t.addClass('oc-dialog-dim')\n\t\t\t.appendTo(contentDiv)\n\t\tthis.overlay.on('click keydown keyup', function(event) {\n\t\t\tif (event.target !== self.$dialog.get(0) && self.$dialog.find($(event.target)).length === 0) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tevent.stopPropagation()\n\n\t\t\t}\n\t\t})\n\t},\n\t_destroyOverlay() {\n\t\tif (!this.options.modal) {\n\t\t\treturn\n\t\t}\n\n\t\tif (this.overlay) {\n\t\t\tthis.overlay.off('click keydown keyup')\n\t\t\tthis.overlay.remove()\n\t\t\tthis.overlay = null\n\t\t}\n\t},\n\twidget() {\n\t\treturn this.$dialog\n\t},\n\tsetEnterCallback(callback) {\n\t\tthis.enterCallback = callback\n\t},\n\tunsetEnterCallback() {\n\t\tthis.enterCallback = null\n\t},\n\tclose() {\n\t\tthis._destroyOverlay()\n\t\tconst self = this\n\t\t// Ugly hack to catch remaining keyup events.\n\t\tsetTimeout(function() {\n\t\t\tself._trigger('close', self)\n\t\t}, 200)\n\n\t\tself.$dialog.remove()\n\t\tthis.destroy()\n\t},\n\tdestroy() {\n\t\tif (this.$title) {\n\t\t\tthis.$title.remove()\n\t\t}\n\t\tif (this.$buttonrow) {\n\t\t\tthis.$buttonrow.remove()\n\t\t}\n\n\t\tif (this.originalTitle) {\n\t\t\tthis.element.attr('title', this.originalTitle)\n\t\t}\n\t\tthis.element.removeClass('oc-dialog-content')\n\t\t\t.css(this.originalCss).detach().insertBefore(this.$dialog)\n\t\tthis.$dialog.remove()\n\t},\n})\n","/**\n * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport $ from 'jquery'\nimport escapeHTML from 'escape-html'\n\n/**\n * jQuery plugin for micro templates\n *\n * Strings are automatically escaped, but that can be disabled by setting\n * escapeFunction to null.\n *\n * Usage examples:\n *\n * var htmlStr = '<p>Bake, uncovered, until the {greasystuff} is melted and the {pasta} is heated through, about {min} minutes.</p>'\n * $(htmlStr).octemplate({greasystuff: 'cheese', pasta: 'macaroni', min: 10});\n *\n * var htmlStr = '<p>Welcome back {user}</p>';\n * $(htmlStr).octemplate({user: 'John Q. Public'}, {escapeFunction: null});\n *\n * Be aware that the target string must be wrapped in an HTML element for the\n * plugin to work. The following won't work:\n *\n * var textStr = 'Welcome back {user}';\n * $(textStr).octemplate({user: 'John Q. Public'});\n *\n * For anything larger than one-liners, you can use a simple $.get() ajax\n * request to get the template, or you can embed them it the page using the\n * text/template type:\n *\n * <script id=\"contactListItemTemplate\" type=\"text/template\">\n * <tr class=\"contact\" data-id=\"{id}\">\n * <td class=\"name\">\n * <input type=\"checkbox\" name=\"id\" value=\"{id}\" /><span class=\"nametext\">{name}</span>\n * </td>\n * <td class=\"email\">\n * <a href=\"mailto:{email}\">{email}</a>\n * </td>\n * <td class=\"phone\">{phone}</td>\n * </tr>\n * </script>\n *\n * var $tmpl = $('#contactListItemTemplate');\n * var contacts = // fetched in some ajax call\n *\n * $.each(contacts, function(idx, contact) {\n * $contactList.append(\n * $tmpl.octemplate({\n * id: contact.getId(),\n * name: contact.getDisplayName(),\n * email: contact.getPreferredEmail(),\n * phone: contact.getPreferredPhone(),\n * });\n * );\n * });\n */\n/**\n * Object Template\n * Inspired by micro templating done by e.g. underscore.js\n */\nconst Template = {\n\tinit(vars, options, elem) {\n\t\t// Mix in the passed in options with the default options\n\t\tthis.vars = vars\n\t\tthis.options = $.extend({}, this.options, options)\n\n\t\tthis.elem = elem\n\t\tconst self = this\n\n\t\tif (typeof this.options.escapeFunction === 'function') {\n\t\t\tconst keys = Object.keys(this.vars)\n\t\t\tfor (let key = 0; key < keys.length; key++) {\n\t\t\t\tif (typeof this.vars[keys[key]] === 'string') {\n\t\t\t\t\tthis.vars[keys[key]] = self.options.escapeFunction(this.vars[keys[key]])\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst _html = this._build(this.vars)\n\t\treturn $(_html)\n\t},\n\t// From stackoverflow.com/questions/1408289/best-way-to-do-variable-interpolation-in-javascript\n\t_build(o) {\n\t\tconst data = this.elem.attr('type') === 'text/template' ? this.elem.html() : this.elem.get(0).outerHTML\n\t\ttry {\n\t\t\treturn data.replace(/{([^{}]*)}/g,\n\t\t\t\tfunction(a, b) {\n\t\t\t\t\tconst r = o[b]\n\t\t\t\t\treturn typeof r === 'string' || typeof r === 'number' ? r : a\n\t\t\t\t}\n\t\t\t)\n\t\t} catch (e) {\n\t\t\tconsole.error(e, 'data:', data)\n\t\t}\n\t},\n\toptions: {\n\t\tescapeFunction: escapeHTML,\n\t},\n}\n\n$.fn.octemplate = function(vars, options) {\n\tvars = vars || {}\n\tif (this.length) {\n\t\tconst _template = Object.create(Template)\n\t\treturn _template.init(vars, options, this)\n\t}\n}\n","/**\n * @copyright 2016-2018 John Molakvoæ <skjnldsv@protonmail.com>\n * @copyright 2013 Morris Jobke <morris.jobke@gmail.com>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Sergey Shliakhov <husband.sergey@gmail.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 */\n\n/* eslint-disable */\nimport $ from 'jquery'\nimport md5 from 'blueimp-md5'\n\n/*\n * Adds a background color to the element called on and adds the first character\n * of the passed in string. This string is also the seed for the generation of\n * the background color.\n *\n * You have following HTML:\n *\n * <div id=\"albumart\"></div>\n *\n * And call this from Javascript:\n *\n * $('#albumart').imageplaceholder('The Album Title');\n *\n * Which will result in:\n *\n * <div id=\"albumart\" style=\"background-color: rgb(121, 90, 171); ... \">T</div>\n *\n * You may also call it like this, to have a different background, than the seed:\n *\n * $('#albumart').imageplaceholder('The Album Title', 'Album Title');\n *\n * Resulting in:\n *\n * <div id=\"albumart\" style=\"background-color: rgb(121, 90, 171); ... \">A</div>\n *\n */\n\n/*\n* Alternatively, you can use the prototype function to convert your string to rgb colors:\n*\n* \"a6741a86aded5611a8e46ce16f2ad646\".toRgb()\n*\n* Will return the rgb parameters within the following object:\n*\n* Color {r: 208, g: 158, b: 109}\n*\n*/\n\nconst toRgb = (s) => {\n\t// Normalize hash\n\tvar hash = s.toLowerCase()\n\n\t// Already a md5 hash?\n\tif (hash.match(/^([0-9a-f]{4}-?){8}$/) === null) {\n\t\thash = md5(hash)\n\t}\n\n\thash = hash.replace(/[^0-9a-f]/g, '')\n\n\tfunction Color(r, g, b) {\n\t\tthis.r = r\n\t\tthis.g = g\n\t\tthis.b = b\n\t}\n\n\tfunction stepCalc(steps, ends) {\n\t\tvar step = new Array(3)\n\t\tstep[0] = (ends[1].r - ends[0].r) / steps\n\t\tstep[1] = (ends[1].g - ends[0].g) / steps\n\t\tstep[2] = (ends[1].b - ends[0].b) / steps\n\t\treturn step\n\t}\n\n\tfunction mixPalette(steps, color1, color2) {\n\t\tvar palette = []\n\t\tpalette.push(color1)\n\t\tvar step = stepCalc(steps, [color1, color2])\n\t\tfor (var i = 1; i < steps; i++) {\n\t\t\tvar r = parseInt(color1.r + (step[0] * i))\n\t\t\tvar g = parseInt(color1.g + (step[1] * i))\n\t\t\tvar b = parseInt(color1.b + (step[2] * i))\n\t\t\tpalette.push(new Color(r, g, b))\n\t\t}\n\t\treturn palette\n\t}\n\n\tconst red = new Color(182, 70, 157);\n\tconst yellow = new Color(221, 203, 85);\n\tconst blue = new Color(0, 130, 201); // Nextcloud blue\n\t// Number of steps to go from a color to another\n\t// 3 colors * 6 will result in 18 generated colors\n\tconst steps = 6;\n\n\tconst palette1 = mixPalette(steps, red, yellow);\n\tconst palette2 = mixPalette(steps, yellow, blue);\n\tconst palette3 = mixPalette(steps, blue, red);\n\n\tconst finalPalette = palette1.concat(palette2).concat(palette3);\n\n\t// Convert a string to an integer evenly\n\tfunction hashToInt(hash, maximum) {\n\t\tvar finalInt = 0\n\t\tvar result = []\n\n\t\t// Splitting evenly the string\n\t\tfor (var i = 0; i < hash.length; i++) {\n\t\t\t// chars in md5 goes up to f, hex:16\n\t\t\tresult.push(parseInt(hash.charAt(i), 16) % 16)\n\t\t}\n\t\t// Adds up all results\n\t\tfor (var j in result) {\n\t\t\tfinalInt += result[j]\n\t\t}\n\t\t// chars in md5 goes up to f, hex:16\n\t\t// make sure we're always using int in our operation\n\t\treturn parseInt(parseInt(finalInt) % maximum)\n\t}\n\n\treturn finalPalette[hashToInt(hash, steps * 3)]\n}\n\nString.prototype.toRgb = function() {\n\tconsole.warn('String.prototype.toRgb is deprecated! It will be removed in Nextcloud 22.')\n\n\treturn toRgb(this)\n}\n\n$.fn.imageplaceholder = function(seed, text, size) {\n\ttext = text || seed\n\n\t// Compute the hash\n\tvar rgb = toRgb(seed)\n\tthis.css('background-color', 'rgb(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ')')\n\n\t// Placeholders are square\n\tvar height = this.height() || size || 32\n\tthis.height(height)\n\tthis.width(height)\n\n\t// CSS rules\n\tthis.css('color', '#fff')\n\tthis.css('font-weight', 'normal')\n\tthis.css('text-align', 'center')\n\n\t// calculate the height\n\tthis.css('line-height', height + 'px')\n\tthis.css('font-size', (height * 0.55) + 'px')\n\n\tif (seed !== null && seed.length) {\n\t\tvar placeholderText = text.replace(/\\s+/g, ' ').trim().split(' ', 2).map((word) => word[0].toUpperCase()).join('')\n\t\tthis.html(placeholderText);\n\t}\n}\n\n$.fn.clearimageplaceholder = function() {\n\tthis.css('background-color', '')\n\tthis.css('color', '')\n\tthis.css('font-weight', '')\n\tthis.css('text-align', '')\n\tthis.css('line-height', '')\n\tthis.css('font-size', '')\n\tthis.html('')\n\tthis.removeClass('icon-loading')\n\tthis.removeClass('icon-loading-small')\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 */\n\nimport $ from 'jquery'\n\nimport { getToken } from '../OC/requesttoken'\n\n$(document).on('ajaxSend', function(elm, xhr, settings) {\n\tif (settings.crossDomain === false) {\n\t\txhr.setRequestHeader('requesttoken', getToken())\n\t\txhr.setRequestHeader('OCS-APIREQUEST', 'true')\n\t}\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 */\n\nimport $ from 'jquery'\n\n/**\n * select a range in an input field\n *\n * @see {@link http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area}\n * @param {number} start start selection from\n * @param {number} end number of char from start\n * @return {void}\n */\n$.fn.selectRange = function(start, end) {\n\treturn this.each(function() {\n\t\tif (this.setSelectionRange) {\n\t\t\tthis.focus()\n\t\t\tthis.setSelectionRange(start, end)\n\t\t} else if (this.createTextRange) {\n\t\t\tconst range = this.createTextRange()\n\t\t\trange.collapse(true)\n\t\t\trange.moveEnd('character', end)\n\t\t\trange.moveStart('character', start)\n\t\t\trange.select()\n\t\t}\n\t})\n}\n","/**\n * @copyright 2018 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 */\n\nimport $ from 'jquery'\n\n/**\n * @name Show Password\n * @description\n * @version 1.3.0\n * @requires Jquery 1.5\n *\n * @author Jan Jarfalk <jan.jarfalk@unwrongest.com>\n * author-website http://www.unwrongest.com\n *\n * special-thanks Michel Gratton\n *\n * @license MIT\n */\n$.fn.extend({\n\tshowPassword(c) {\n\n\t\t// Setup callback object\n\t\tconst callback = { fn: null, args: {} }\n\t\tcallback.fn = c\n\n\t\t// Clones passwords and turn the clones into text inputs\n\t\tconst cloneElement = function(element) {\n\n\t\t\tconst $element = $(element)\n\n\t\t\tconst $clone = $('<input />')\n\n\t\t\t// Name added for JQuery Validation compatibility\n\t\t\t// Element name is required to avoid script warning.\n\t\t\t$clone.attr({\n\t\t\t\ttype: 'text',\n\t\t\t\tclass: $element.attr('class'),\n\t\t\t\tstyle: $element.attr('style'),\n\t\t\t\tsize: $element.attr('size'),\n\t\t\t\tname: $element.attr('name') + '-clone',\n\t\t\t\ttabindex: $element.attr('tabindex'),\n\t\t\t\tautocomplete: 'off',\n\t\t\t})\n\n\t\t\tif ($element.attr('placeholder') !== undefined) {\n\t\t\t\t$clone.attr('placeholder', $element.attr('placeholder'))\n\t\t\t}\n\n\t\t\treturn $clone\n\n\t\t}\n\n\t\t// Transfers values between two elements\n\t\tconst update = function(a, b) {\n\t\t\tb.val(a.val())\n\t\t}\n\n\t\t// Shows a or b depending on checkbox\n\t\tconst setState = function(checkbox, a, b) {\n\n\t\t\tif (checkbox.is(':checked')) {\n\t\t\t\tupdate(a, b)\n\t\t\t\tb.show()\n\t\t\t\ta.hide()\n\t\t\t} else {\n\t\t\t\tupdate(b, a)\n\t\t\t\tb.hide()\n\t\t\t\ta.show()\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.each(function() {\n\n\t\t\tconst $input = $(this)\n\t\t\tconst $checkbox = $($input.data('typetoggle'))\n\n\t\t\t// Create clone\n\t\t\tconst $clone = cloneElement($input)\n\t\t\t$clone.insertAfter($input)\n\n\t\t\t// Set callback arguments\n\t\t\tif (callback.fn) {\n\t\t\t\tcallback.args.input = $input\n\t\t\t\tcallback.args.checkbox = $checkbox\n\t\t\t\tcallback.args.clone = $clone\n\t\t\t}\n\n\t\t\t$checkbox.bind('click', function() {\n\t\t\t\tsetState($checkbox, $input, $clone)\n\t\t\t})\n\n\t\t\t$input.bind('keyup', function() {\n\t\t\t\tupdate($input, $clone)\n\t\t\t})\n\n\t\t\t$clone.bind('keyup', function() {\n\t\t\t\tupdate($clone, $input)\n\n\t\t\t\t// Added for JQuery Validation compatibility\n\t\t\t\t// This will trigger validation if it's ON for keyup event\n\t\t\t\t$input.trigger('keyup')\n\n\t\t\t})\n\n\t\t\t// Added for JQuery Validation compatibility\n\t\t\t// This will trigger validation if it's ON for blur event\n\t\t\t$clone.bind('blur', function() {\n\t\t\t\t$input.trigger('focusout')\n\t\t\t})\n\n\t\t\tsetState($checkbox, $input, $clone)\n\n\t\t\t// set type of password field clone (type=text) to password right on submit\n\t\t\t// to prevent browser save the value of this field\n\t\t\t$clone.closest('form').submit(function(e) {\n\t\t\t\t// .prop has to be used, because .attr throws\n\t\t\t\t// an error while changing a type of an input\n\t\t\t\t// element\n\t\t\t\t$clone.prop('type', 'password')\n\t\t\t})\n\n\t\t\tif (callback.fn) {\n\t\t\t\tcallback.fn(callback.args)\n\t\t\t}\n\n\t\t})\n\t},\n})\n","/**\n * @copyright Copyright (c) 2016 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 */\n\nimport $ from 'jquery'\n\n// Set autocomplete width the same as the related input\n// See http://stackoverflow.com/a/11845718\n$.ui.autocomplete.prototype._resizeMenu = function() {\n\tconst ul = this.menu.element\n\tul.outerWidth(this.element.outerWidth())\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./jquery-ui-fixes.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./jquery-ui-fixes.scss\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./jquery.ocdialog.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./jquery.ocdialog.scss\";\n export default content && content.locals ? content.locals : undefined;\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 * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport $ from 'jquery'\n\nimport './avatar'\nimport './contactsmenu'\nimport './exists'\nimport './filterattr'\nimport './ocdialog'\nimport './octemplate'\nimport './placeholder'\nimport './requesttoken'\nimport './selectrange'\nimport './showpassword'\nimport './ui-fixes'\n\nimport './css/jquery-ui-fixes.scss'\nimport './css/jquery.ocdialog.scss'\n\n/**\n * Disable automatic evaluation of responses for $.ajax() functions (and its\n * higher-level alternatives like $.get() and $.post()).\n *\n * If a response to a $.ajax() request returns a content type of \"application/javascript\"\n * JQuery would previously execute the response body. This is a pretty unexpected\n * behaviour and can result in a bypass of our Content-Security-Policy as well as\n * multiple unexpected XSS vectors.\n */\n$.ajaxSetup({\n\tcontents: {\n\t\tscript: false,\n\t},\n})\n\n/**\n * Disable execution of eval in jQuery. We do require an allowed eval CSP\n * configuration at the moment for handlebars et al. But for jQuery there is\n * not much of a reason to execute JavaScript directly via eval.\n *\n * This thus mitigates some unexpected XSS vectors.\n */\n$.globalEval = function() {\n}\n","/**\n * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\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 */\n\nimport $ from 'jquery'\nimport 'core-js/stable'\nimport 'regenerator-runtime/runtime'\nimport './Polyfill/index.js'\n\n// If you remove the line below, tests won't pass\n// eslint-disable-next-line no-unused-vars\nimport OC from './OC/index.js'\n\nimport './globals.js'\nimport './jquery/index.js'\nimport { initCore } from './init.js'\nimport { registerAppsSlideToggle } from './OC/apps.js'\n\nwindow.addEventListener('DOMContentLoaded', function() {\n\tinitCore()\n\tregisterAppsSlideToggle()\n\n\t// fallback to hashchange when no history support\n\tif (window.history.pushState) {\n\t\twindow.onpopstate = _.bind(OC.Util.History._onPopState, OC.Util.History)\n\t} else {\n\t\t$(window).on('hashchange', _.bind(OC.Util.History._onPopState, OC.Util.History))\n\t}\n})\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"images/ui-icons_1d2d44_256x240.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"images/ui-icons_ffffff_256x240.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_2___ = new URL(\"images/ui-icons_ffd27a_256x240.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_3___ = new URL(\"images/ui-bg_diagonals-thick_20_666666_40x40.png\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_4___ = new URL(\"images/ui-bg_flat_10_000000_40x100.png\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\nvar ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___);\nvar ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ui-widget-content{border:1px solid var(--color-border);background:var(--color-main-background) none;color:var(--color-main-text)}.ui-widget-content a{color:var(--color-main-text)}.ui-widget-header{border:none;color:var(--color-main-text);background-image:none}.ui-widget-header a{color:var(--color-main-text)}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid var(--color-border);background:var(--color-main-background) none;font-weight:bold;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ddd;background:var(--color-main-background) none;font-weight:bold;color:var(--color-main-text)}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:var(--color-main-text)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid var(--color-primary);background:var(--color-main-background) none;font-weight:bold;color:var(--color-main-text)}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:var(--color-main-text)}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid var(--color-main-background);background:var(--color-main-background) none;color:var(--color-text-light);font-weight:600}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:var(--color-text-lighter)}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:var(--color-error);background:var(--color-error) none;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-state-default .ui-icon{background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \")}.ui-state-active .ui-icon{background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \")}.ui-state-highlight .ui-icon{background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \")}.ui-icon.ui-icon-none{display:none}.ui-widget-overlay{background:#666 url(\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \") 50% 50% repeat;opacity:.5}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \") 50% 50% repeat-x;opacity:.2;border-radius:5px}.ui-tabs{border:none}.ui-tabs .ui-tabs-nav.ui-corner-all{border-bottom-left-radius:0;border-bottom-right-radius:0}.ui-tabs .ui-tabs-nav{background:none;margin-bottom:15px}.ui-tabs .ui-tabs-nav .ui-state-default{border:none;border-bottom:1px solid rgba(0,0,0,0);font-weight:normal;margin:0 !important;padding:0 !important}.ui-tabs .ui-tabs-nav .ui-state-hover,.ui-tabs .ui-tabs-nav .ui-state-active{border:none;border-bottom:1px solid var(--color-main-text);color:var(--color-main-text)}.ui-tabs .ui-tabs-nav .ui-state-hover a,.ui-tabs .ui-tabs-nav .ui-state-hover a:link,.ui-tabs .ui-tabs-nav .ui-state-hover a:hover,.ui-tabs .ui-tabs-nav .ui-state-hover a:visited,.ui-tabs .ui-tabs-nav .ui-state-active a,.ui-tabs .ui-tabs-nav .ui-state-active a:link,.ui-tabs .ui-tabs-nav .ui-state-active a:hover,.ui-tabs .ui-tabs-nav .ui-state-active a:visited{color:var(--color-main-text)}.ui-tabs .ui-tabs-nav .ui-state-active{font-weight:bold}.ui-autocomplete.ui-menu{padding:0}.ui-autocomplete.ui-menu.item-count-1,.ui-autocomplete.ui-menu.item-count-2{overflow-y:hidden}.ui-autocomplete.ui-menu .ui-menu-item a{color:var(--color-text-lighter);display:block;padding:4px 4px 4px 14px}.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-focus,.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-active{box-shadow:inset 4px 0 var(--color-primary-element);color:var(--color-main-text)}.ui-autocomplete.ui-widget-content{background:var(--color-main-background);border-top:none}.ui-autocomplete.ui-corner-all{border-radius:0;border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.ui-autocomplete .ui-state-hover,.ui-autocomplete .ui-widget-content .ui-state-hover,.ui-autocomplete .ui-widget-header .ui-state-hover,.ui-autocomplete .ui-state-focus,.ui-autocomplete .ui-widget-content .ui-state-focus,.ui-autocomplete .ui-widget-header .ui-state-focus{border:1px solid rgba(0,0,0,0);background:inherit;color:var(--color-primary-element)}.ui-autocomplete .ui-menu-item a{border-radius:0 !important}.ui-button.primary{background-color:var(--color-primary);color:var(--color-primary-text);border:1px solid var(--color-primary-text)}.ui-button:hover{font-weight:bold !important}.ui-draggable-handle,.ui-selectable{touch-action:pan-y}\", \"\",{\"version\":3,\"sources\":[\"webpack://./core/src/jquery/css/jquery-ui-fixes.scss\"],\"names\":[],\"mappings\":\"AAEA,mBACC,oCAAA,CACA,4CAAA,CACA,4BAAA,CAED,qBACC,4BAAA,CAED,kBACC,WAAA,CACA,4BAAA,CACA,qBAAA,CAED,oBACC,4BAAA,CAKD,2FAGC,oCAAA,CACA,4CAAA,CACA,gBAAA,CACA,UAAA,CAED,yEAGC,UAAA,CAED,0KAMC,qBAAA,CACA,4CAAA,CACA,gBAAA,CACA,4BAAA,CAED,2FAIC,4BAAA,CAED,wFAGC,qCAAA,CACA,4CAAA,CACA,gBAAA,CACA,4BAAA,CAED,sEAGC,4BAAA,CAKD,iGAGC,6CAAA,CACA,4CAAA,CACA,6BAAA,CACA,eAAA,CAED,uGAGC,+BAAA,CAED,qFAGC,yBAAA,CACA,kCAAA,CACA,UAAA,CAED,2FAGC,UAAA,CAED,oGAGC,UAAA,CAKD,2BACC,wDAAA,CAED,kDAEC,wDAAA,CAED,0BACC,wDAAA,CAED,6BACC,wDAAA,CAED,uDAEC,wDAAA,CAED,sBACC,YAAA,CAMD,mBACC,sEAAA,CACA,UAAA,CAED,kBACC,oBAAA,CACA,WAAA,CACA,wEAAA,CACA,UAAA,CACA,iBAAA,CAID,SACC,WAAA,CAEA,oCACC,2BAAA,CACA,4BAAA,CAGD,sBACC,eAAA,CACA,kBAAA,CAEA,wCACC,WAAA,CACA,qCAAA,CACA,kBAAA,CACA,mBAAA,CACA,oBAAA,CAGD,6EAEC,WAAA,CACA,8CAAA,CACA,4BAAA,CACA,0WACC,4BAAA,CAGF,uCACC,gBAAA,CAOF,yBACC,SAAA,CAIA,4EAEC,iBAAA,CAGD,yCACC,+BAAA,CACA,aAAA,CACA,wBAAA,CAEA,iHACC,mDAAA,CACA,4BAAA,CAKH,mCACC,uCAAA,CACA,eAAA,CAGD,+BACC,eAAA,CACA,8CAAA,CACA,+CAAA,CAGD,gRAKC,8BAAA,CACA,kBAAA,CACA,kCAAA,CAIA,iCACC,0BAAA,CAKH,mBACC,qCAAA,CACA,+BAAA,CACA,0CAAA,CAID,iBACI,2BAAA,CAKJ,oCAEC,kBAAA\",\"sourcesContent\":[\"/* Component containers\\n----------------------------------*/\\n.ui-widget-content {\\n\\tborder: 1px solid var(--color-border);\\n\\tbackground: var(--color-main-background) none;\\n\\tcolor: var(--color-main-text);\\n}\\n.ui-widget-content a {\\n\\tcolor: var(--color-main-text);\\n}\\n.ui-widget-header {\\n\\tborder: none;\\n\\tcolor: var(--color-main-text);\\n\\tbackground-image: none;\\n}\\n.ui-widget-header a {\\n\\tcolor: var(--color-main-text);\\n}\\n\\n/* Interaction states\\n----------------------------------*/\\n.ui-state-default,\\n.ui-widget-content .ui-state-default,\\n.ui-widget-header .ui-state-default {\\n\\tborder: 1px solid var(--color-border);\\n\\tbackground: var(--color-main-background) none;\\n\\tfont-weight: bold;\\n\\tcolor: #555;\\n}\\n.ui-state-default a,\\n.ui-state-default a:link,\\n.ui-state-default a:visited {\\n\\tcolor: #555;\\n}\\n.ui-state-hover,\\n.ui-widget-content .ui-state-hover,\\n.ui-widget-header .ui-state-hover,\\n.ui-state-focus,\\n.ui-widget-content .ui-state-focus,\\n.ui-widget-header .ui-state-focus {\\n\\tborder: 1px solid #ddd;\\n\\tbackground: var(--color-main-background) none;\\n\\tfont-weight: bold;\\n\\tcolor: var(--color-main-text);\\n}\\n.ui-state-hover a,\\n.ui-state-hover a:hover,\\n.ui-state-hover a:link,\\n.ui-state-hover a:visited {\\n\\tcolor: var(--color-main-text);\\n}\\n.ui-state-active,\\n.ui-widget-content .ui-state-active,\\n.ui-widget-header .ui-state-active {\\n\\tborder: 1px solid var(--color-primary);\\n\\tbackground: var(--color-main-background) none;\\n\\tfont-weight: bold;\\n\\tcolor: var(--color-main-text);\\n}\\n.ui-state-active a,\\n.ui-state-active a:link,\\n.ui-state-active a:visited {\\n\\tcolor: var(--color-main-text);\\n}\\n\\n/* Interaction Cues\\n----------------------------------*/\\n.ui-state-highlight,\\n.ui-widget-content .ui-state-highlight,\\n.ui-widget-header .ui-state-highlight {\\n\\tborder: 1px solid var(--color-main-background);\\n\\tbackground: var(--color-main-background) none;\\n\\tcolor: var(--color-text-light);\\n\\tfont-weight: 600;\\n}\\n.ui-state-highlight a,\\n.ui-widget-content .ui-state-highlight a,\\n.ui-widget-header .ui-state-highlight a {\\n\\tcolor: var(--color-text-lighter);\\n}\\n.ui-state-error,\\n.ui-widget-content .ui-state-error,\\n.ui-widget-header .ui-state-error {\\n\\tborder: var(--color-error);\\n\\tbackground: var(--color-error) none;\\n\\tcolor: #ffffff;\\n}\\n.ui-state-error a,\\n.ui-widget-content .ui-state-error a,\\n.ui-widget-header .ui-state-error a {\\n\\tcolor: #ffffff;\\n}\\n.ui-state-error-text,\\n.ui-widget-content .ui-state-error-text,\\n.ui-widget-header .ui-state-error-text {\\n\\tcolor: #ffffff;\\n}\\n\\n/* Icons\\n----------------------------------*/\\n.ui-state-default .ui-icon {\\n\\tbackground-image: url('images/ui-icons_1d2d44_256x240.png');\\n}\\n.ui-state-hover .ui-icon,\\n.ui-state-focus .ui-icon {\\n\\tbackground-image: url('images/ui-icons_1d2d44_256x240.png');\\n}\\n.ui-state-active .ui-icon {\\n\\tbackground-image: url('images/ui-icons_1d2d44_256x240.png');\\n}\\n.ui-state-highlight .ui-icon {\\n\\tbackground-image: url('images/ui-icons_ffffff_256x240.png');\\n}\\n.ui-state-error .ui-icon,\\n.ui-state-error-text .ui-icon {\\n\\tbackground-image: url('images/ui-icons_ffd27a_256x240.png');\\n}\\n.ui-icon.ui-icon-none {\\n\\tdisplay: none;\\n}\\n\\n/* Misc visuals\\n----------------------------------*/\\n/* Overlays */\\n.ui-widget-overlay {\\n\\tbackground: #666666 url('images/ui-bg_diagonals-thick_20_666666_40x40.png') 50% 50% repeat;\\n\\topacity: .5;\\n}\\n.ui-widget-shadow {\\n\\tmargin: -5px 0 0 -5px;\\n\\tpadding: 5px;\\n\\tbackground: #000000 url('images/ui-bg_flat_10_000000_40x100.png') 50% 50% repeat-x;\\n\\topacity: .2;\\n\\tborder-radius: 5px;\\n}\\n\\n/* Tabs customizations */\\n.ui-tabs {\\n\\tborder: none;\\n\\n\\t.ui-tabs-nav.ui-corner-all {\\n\\t\\tborder-bottom-left-radius: 0;\\n\\t\\tborder-bottom-right-radius: 0;\\n\\t}\\n\\n\\t.ui-tabs-nav {\\n\\t\\tbackground: none;\\n\\t\\tmargin-bottom: 15px;\\n\\n\\t\\t.ui-state-default {\\n\\t\\t\\tborder: none;\\n\\t\\t\\tborder-bottom: 1px solid transparent;\\n\\t\\t\\tfont-weight: normal;\\n\\t\\t\\tmargin: 0 !important;\\n\\t\\t\\tpadding: 0 !important;\\n\\t\\t}\\n\\n\\t\\t.ui-state-hover,\\n\\t\\t.ui-state-active {\\n\\t\\t\\tborder: none;\\n\\t\\t\\tborder-bottom: 1px solid var(--color-main-text);\\n\\t\\t\\tcolor: var(--color-main-text);\\n\\t\\t\\ta, a:link, a:hover, a:visited {\\n\\t\\t\\t\\tcolor: var(--color-main-text);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t.ui-state-active {\\n\\t\\t\\tfont-weight: bold;\\n\\t\\t}\\n\\t}\\n}\\n\\n/* Select menus */\\n.ui-autocomplete {\\n\\t&.ui-menu {\\n\\t\\tpadding: 0;\\n\\n\\t\\t/* scrolling starts from three items,\\n\\t\\t * so hide overflow and scrollbars for a clean layout */\\n\\t\\t&.item-count-1,\\n\\t\\t&.item-count-2 {\\n\\t\\t\\toverflow-y: hidden;\\n\\t\\t}\\n\\n\\t\\t.ui-menu-item a {\\n\\t\\t\\tcolor: var(--color-text-lighter);\\n\\t\\t\\tdisplay: block;\\n\\t\\t\\tpadding: 4px 4px 4px 14px;\\n\\n\\t\\t\\t&.ui-state-focus, &.ui-state-active {\\n\\t\\t\\t\\tbox-shadow: inset 4px 0 var(--color-primary-element);\\n\\t\\t\\t\\tcolor: var(--color-main-text);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t&.ui-widget-content {\\n\\t\\tbackground: var(--color-main-background);\\n\\t\\tborder-top: none;\\n\\t}\\n\\n\\t&.ui-corner-all {\\n\\t\\tborder-radius: 0;\\n\\t\\tborder-bottom-left-radius: var(--border-radius);\\n\\t\\tborder-bottom-right-radius: var(--border-radius);\\n\\t}\\n\\n\\t.ui-state-hover, .ui-widget-content .ui-state-hover,\\n\\t.ui-widget-header .ui-state-hover,\\n\\t.ui-state-focus,\\n\\t.ui-widget-content .ui-state-focus,\\n\\t.ui-widget-header .ui-state-focus {\\n\\t\\tborder: 1px solid transparent;\\n\\t\\tbackground: inherit;\\n\\t\\tcolor: var(--color-primary-element);\\n\\t}\\n\\n\\t.ui-menu-item {\\n\\t\\ta {\\n\\t\\t\\tborder-radius: 0 !important;\\n\\t\\t}\\n\\t}\\n}\\n\\n.ui-button.primary {\\n\\tbackground-color: var(--color-primary);\\n\\tcolor: var(--color-primary-text);\\n\\tborder: 1px solid var(--color-primary-text);\\n}\\n\\n// fix ui-buttons on hover\\n.ui-button:hover {\\n font-weight:bold !important;\\n}\\n\\n\\n/* DRAGGABLE */\\n.ui-draggable-handle,\\n.ui-selectable {\\n\\ttouch-action: pan-y;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".oc-dialog{background:var(--color-main-background);color:var(--color-text-light);border-radius:var(--border-radius-large);box-shadow:0 0 30px var(--color-box-shadow);padding:24px;z-index:10000;font-size:100%;box-sizing:border-box;min-width:200px;top:50%;left:50%;transform:translate(-50%, -50%);max-height:calc(100% - 20px);max-width:calc(100% - 20px);overflow:auto}.oc-dialog-title{background:var(--color-main-background)}.oc-dialog-buttonrow{position:relative;display:flex;background:rgba(0,0,0,0);right:0;bottom:0;padding:0;padding-top:10px;box-sizing:border-box;width:100%;background-image:linear-gradient(rgba(255, 255, 255, 0), var(--color-main-background))}.oc-dialog-buttonrow.twobuttons{justify-content:space-between}.oc-dialog-buttonrow.onebutton,.oc-dialog-buttonrow.twobuttons.aside{justify-content:flex-end}.oc-dialog-buttonrow button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:44px;min-width:44px}.oc-dialog-close{position:absolute;top:0;right:0;padding:25px;background:var(--icon-close-dark) no-repeat center;opacity:.5;border-radius:var(--border-radius-pill)}.oc-dialog-close:hover,.oc-dialog-close:focus,.oc-dialog-close:active{opacity:1}.oc-dialog-dim{background-color:#000;opacity:.2;z-index:9999;position:fixed;top:0;left:0;width:100%;height:100%}body.theme--dark .oc-dialog-dim{opacity:.8}.oc-dialog-content{width:100%;max-width:550px}.oc-dialog.password-confirmation .oc-dialog-content{width:auto}.oc-dialog.password-confirmation .oc-dialog-content input[type=password]{width:100%}.oc-dialog.password-confirmation .oc-dialog-content label{display:none}\", \"\",{\"version\":3,\"sources\":[\"webpack://./core/src/jquery/css/jquery.ocdialog.scss\"],\"names\":[],\"mappings\":\"AAAA,WACC,uCAAA,CACA,6BAAA,CACA,wCAAA,CACA,2CAAA,CACA,YAAA,CACA,aAAA,CACA,cAAA,CACA,qBAAA,CACA,eAAA,CACA,OAAA,CACA,QAAA,CACA,+BAAA,CACA,4BAAA,CACA,2BAAA,CACA,aAAA,CAED,iBACC,uCAAA,CAED,qBACC,iBAAA,CACA,YAAA,CACA,wBAAA,CACA,OAAA,CACA,QAAA,CACA,SAAA,CACA,gBAAA,CACA,qBAAA,CACA,UAAA,CACA,sFAAA,CAEA,gCACO,6BAAA,CAGP,qEAEC,wBAAA,CAGD,4BACI,kBAAA,CACA,eAAA,CACH,sBAAA,CACA,WAAA,CACA,cAAA,CAIF,iBACC,iBAAA,CACA,KAAA,CACA,OAAA,CACA,YAAA,CACA,kDAAA,CACA,UAAA,CACA,uCAAA,CAEA,sEAGC,SAAA,CAIF,eACC,qBAAA,CACA,UAAA,CACA,YAAA,CACA,cAAA,CACA,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CAGD,gCACC,UAAA,CAGD,mBACC,UAAA,CACA,eAAA,CAIA,oDACC,UAAA,CAEA,yEACC,UAAA,CAED,0DACC,YAAA\",\"sourcesContent\":[\".oc-dialog {\\n\\tbackground: var(--color-main-background);\\n\\tcolor: var(--color-text-light);\\n\\tborder-radius: var(--border-radius-large);\\n\\tbox-shadow: 0 0 30px var(--color-box-shadow);\\n\\tpadding: 24px;\\n\\tz-index: 10000;\\n\\tfont-size: 100%;\\n\\tbox-sizing: border-box;\\n\\tmin-width: 200px;\\n\\ttop: 50%;\\n\\tleft: 50%;\\n\\ttransform: translate(-50%, -50%);\\n\\tmax-height: calc(100% - 20px);\\n\\tmax-width: calc(100% - 20px);\\n\\toverflow: auto;\\n}\\n.oc-dialog-title {\\n\\tbackground: var(--color-main-background);\\n}\\n.oc-dialog-buttonrow {\\n\\tposition: relative;\\n\\tdisplay: flex;\\n\\tbackground: transparent;\\n\\tright: 0;\\n\\tbottom: 0;\\n\\tpadding: 0;\\n\\tpadding-top: 10px;\\n\\tbox-sizing: border-box;\\n\\twidth: 100%;\\n\\tbackground-image: linear-gradient(rgba(255, 255, 255, 0.0), var(--color-main-background));\\n\\n\\t&.twobuttons {\\n justify-content: space-between;\\n }\\n\\n\\t&.onebutton,\\n\\t&.twobuttons.aside {\\n\\t\\tjustify-content: flex-end;\\n\\t}\\n\\n\\tbutton {\\n\\t white-space: nowrap;\\n\\t overflow: hidden;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\theight: 44px;\\n\\t\\tmin-width: 44px;\\n\\t}\\n}\\n\\n.oc-dialog-close {\\n\\tposition: absolute;\\n\\ttop: 0;\\n\\tright: 0;\\n\\tpadding: 25px;\\n\\tbackground: var(--icon-close-dark) no-repeat center;\\n\\topacity: .5;\\n\\tborder-radius: var(--border-radius-pill);\\n\\n\\t&:hover,\\n\\t&:focus,\\n\\t&:active {\\n\\t\\topacity: 1;\\n\\t}\\n}\\n\\n.oc-dialog-dim {\\n\\tbackground-color: #000;\\n\\topacity: .2;\\n\\tz-index: 9999;\\n\\tposition: fixed;\\n\\ttop: 0;\\n\\tleft: 0;\\n\\twidth: 100%;\\n\\theight: 100%;\\n}\\n\\nbody.theme--dark .oc-dialog-dim {\\n\\topacity: .8;\\n}\\n\\n.oc-dialog-content {\\n\\twidth: 100%;\\n\\tmax-width: 550px;\\n}\\n\\n.oc-dialog.password-confirmation {\\n\\t.oc-dialog-content {\\n\\t\\twidth: auto;\\n\\n\\t\\tinput[type=password] {\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\t\\tlabel {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".app-menu[data-v-93b7dca4]{width:100%;display:flex;flex-shrink:1;flex-wrap:wrap}.app-menu-main[data-v-93b7dca4]{display:flex;flex-wrap:nowrap}.app-menu-main .app-menu-entry[data-v-93b7dca4]{width:50px;height:50px;position:relative;display:flex;opacity:.7;filter:var(--background-image-invert-if-bright)}.app-menu-main .app-menu-entry.app-menu-entry__active[data-v-93b7dca4]{opacity:1}.app-menu-main .app-menu-entry.app-menu-entry__active[data-v-93b7dca4]::before{content:\\\" \\\";position:absolute;pointer-events:none;border-bottom-color:var(--color-main-background);transform:translateX(-50%);width:12px;height:5px;border-radius:3px;background-color:var(--color-primary-text);left:50%;bottom:6px;display:block;transition:all .1s ease-in-out;opacity:1}.app-menu-main .app-menu-entry.app-menu-entry__active .app-menu-entry--label[data-v-93b7dca4]{font-weight:bold}.app-menu-main .app-menu-entry a[data-v-93b7dca4]{width:calc(100% - 4px);height:calc(100% - 4px);margin:2px;color:var(--color-primary-text);position:relative}.app-menu-main .app-menu-entry img[data-v-93b7dca4]{transition:margin .1s ease-in-out;width:20px;height:20px;padding:calc((100% - 20px)/2);box-sizing:content-box}.app-menu-main .app-menu-entry .app-menu-entry--label[data-v-93b7dca4]{opacity:0;position:absolute;font-size:12px;color:var(--color-primary-text);text-align:center;bottom:-5px;left:50%;top:45%;display:block;min-width:100%;transform:translateX(-50%);transition:all .1s ease-in-out;width:100%;text-overflow:ellipsis;overflow:hidden;letter-spacing:-0.5px}.app-menu-main .app-menu-entry[data-v-93b7dca4]:hover,.app-menu-main .app-menu-entry[data-v-93b7dca4]:focus-within{opacity:1}.app-menu-main .app-menu-entry:hover .app-menu-entry--label[data-v-93b7dca4],.app-menu-main .app-menu-entry:focus-within .app-menu-entry--label[data-v-93b7dca4]{opacity:1;font-weight:bolder;bottom:0;width:100%;text-overflow:ellipsis;overflow:hidden}.app-menu-main[data-v-93b7dca4]:hover,.app-menu-main[data-v-93b7dca4]:focus-within,.app-menu-main .app-menu-entry[data-v-93b7dca4]:hover,.app-menu-main .app-menu-entry[data-v-93b7dca4]:focus{opacity:1}.app-menu-main:hover img[data-v-93b7dca4],.app-menu-main:focus-within img[data-v-93b7dca4],.app-menu-main .app-menu-entry:hover img[data-v-93b7dca4],.app-menu-main .app-menu-entry:focus img[data-v-93b7dca4]{margin-top:-8px}.app-menu-main:hover .app-menu-entry--label[data-v-93b7dca4],.app-menu-main:focus-within .app-menu-entry--label[data-v-93b7dca4],.app-menu-main .app-menu-entry:hover .app-menu-entry--label[data-v-93b7dca4],.app-menu-main .app-menu-entry:focus .app-menu-entry--label[data-v-93b7dca4]{opacity:1;bottom:0}.app-menu-main[data-v-93b7dca4]:hover::before,.app-menu-main:hover .app-menu-entry[data-v-93b7dca4]::before,.app-menu-main[data-v-93b7dca4]:focus-within::before,.app-menu-main:focus-within .app-menu-entry[data-v-93b7dca4]::before,.app-menu-main .app-menu-entry[data-v-93b7dca4]:hover::before,.app-menu-main .app-menu-entry:hover .app-menu-entry[data-v-93b7dca4]::before,.app-menu-main .app-menu-entry[data-v-93b7dca4]:focus::before,.app-menu-main .app-menu-entry:focus .app-menu-entry[data-v-93b7dca4]::before{opacity:0}[data-v-93b7dca4] .app-menu-more .button-vue--vue-tertiary{color:var(--color-primary-text);opacity:.7;margin:3px;filter:var(--background-image-invert-if-bright)}[data-v-93b7dca4] .app-menu-more .button-vue--vue-tertiary:hover{opacity:1;background-color:rgba(0,0,0,0) !important}[data-v-93b7dca4] .app-menu-more .button-vue--vue-tertiary:focus-visible{opacity:1;outline:none !important}.app-menu-popover-entry .app-icon[data-v-93b7dca4]{position:relative;height:44px}.app-menu-popover-entry .app-icon.has-unread[data-v-93b7dca4]::after{background-color:var(--color-main-text)}.app-menu-popover-entry .app-icon img[data-v-93b7dca4]{width:20px;height:20px;padding:15px}.has-unread[data-v-93b7dca4]::after{content:\\\"\\\";width:8px;height:8px;background-color:var(--color-primary-text);border-radius:50%;position:absolute;display:block;top:10px;right:10px}.unread-counter[data-v-93b7dca4]{display:none}\", \"\",{\"version\":3,\"sources\":[\"webpack://./core/src/components/AppMenu.vue\"],\"names\":[],\"mappings\":\"AAGA,2BACC,UAAA,CACA,YAAA,CACA,aAAA,CACA,cAAA,CAED,gCACC,YAAA,CACA,gBAAA,CAEA,gDACC,UAAA,CACA,WAAA,CACA,iBAAA,CACA,YAAA,CACA,UAAA,CACA,+CAAA,CAEA,uEACC,SAAA,CAEA,+EACC,WAAA,CACA,iBAAA,CACA,mBAAA,CACA,gDAAA,CACA,0BAAA,CACA,UAAA,CACA,UAAA,CACA,iBAAA,CACA,0CAAA,CACA,QAAA,CACA,UAAA,CACA,aAAA,CACA,8BAAA,CACA,SAAA,CAGD,8FACC,gBAAA,CAIF,kDACC,sBAAA,CACA,uBAAA,CACA,UAAA,CACA,+BAAA,CACA,iBAAA,CAGD,oDACC,iCAAA,CACA,UAvDgB,CAwDhB,WAxDgB,CAyDhB,6BAAA,CACA,sBAAA,CAGD,uEACC,SAAA,CACA,iBAAA,CACA,cAAA,CACA,+BAAA,CACA,iBAAA,CACA,WAAA,CACA,QAAA,CACA,OAAA,CACA,aAAA,CACA,cAAA,CACA,0BAAA,CACA,8BAAA,CACA,UAAA,CACA,sBAAA,CACA,eAAA,CACA,qBAAA,CAGD,mHAEC,SAAA,CACA,iKACC,SAAA,CACA,kBAAA,CACA,QAAA,CACA,UAAA,CACA,sBAAA,CACA,eAAA,CAOH,+LAIC,SAAA,CAEA,+MACC,eAAA,CAGD,2RACC,SAAA,CACA,QAAA,CAGD,8fACC,SAAA,CAKH,2DACC,+BAAA,CACA,UAAA,CACA,UAAA,CACA,+CAAA,CAEA,iEACC,SAAA,CACA,yCAAA,CAGD,yEACC,SAAA,CACA,uBAAA,CAKD,mDACC,iBAAA,CACA,WAAA,CAEA,qEACC,uCAAA,CAGD,uDACC,UAhJgB,CAiJhB,WAjJgB,CAkJhB,YAAA,CAKH,oCACC,UAAA,CACA,SAAA,CACA,UAAA,CACA,0CAAA,CACA,iBAAA,CACA,iBAAA,CACA,aAAA,CACA,QAAA,CACA,UAAA,CAGD,iCACC,YAAA\",\"sourcesContent\":[\"\\n$header-icon-size: 20px;\\n\\n.app-menu {\\n\\twidth: 100%;\\n\\tdisplay: flex;\\n\\tflex-shrink: 1;\\n\\tflex-wrap: wrap;\\n}\\n.app-menu-main {\\n\\tdisplay: flex;\\n\\tflex-wrap: nowrap;\\n\\n\\t.app-menu-entry {\\n\\t\\twidth: 50px;\\n\\t\\theight: 50px;\\n\\t\\tposition: relative;\\n\\t\\tdisplay: flex;\\n\\t\\topacity: .7;\\n\\t\\tfilter: var(--background-image-invert-if-bright);\\n\\n\\t\\t&.app-menu-entry__active {\\n\\t\\t\\topacity: 1;\\n\\n\\t\\t\\t&::before {\\n\\t\\t\\t\\tcontent: \\\" \\\";\\n\\t\\t\\t\\tposition: absolute;\\n\\t\\t\\t\\tpointer-events: none;\\n\\t\\t\\t\\tborder-bottom-color: var(--color-main-background);\\n\\t\\t\\t\\ttransform: translateX(-50%);\\n\\t\\t\\t\\twidth: 12px;\\n\\t\\t\\t\\theight: 5px;\\n\\t\\t\\t\\tborder-radius: 3px;\\n\\t\\t\\t\\tbackground-color: var(--color-primary-text);\\n\\t\\t\\t\\tleft: 50%;\\n\\t\\t\\t\\tbottom: 6px;\\n\\t\\t\\t\\tdisplay: block;\\n\\t\\t\\t\\ttransition: all 0.1s ease-in-out;\\n\\t\\t\\t\\topacity: 1;\\n\\t\\t\\t}\\n\\n\\t\\t\\t.app-menu-entry--label {\\n\\t\\t\\t\\tfont-weight: bold;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\ta {\\n\\t\\t\\twidth: calc(100% - 4px);\\n\\t\\t\\theight: calc(100% - 4px);\\n\\t\\t\\tmargin: 2px;\\n\\t\\t\\tcolor: var(--color-primary-text);\\n\\t\\t\\tposition: relative;\\n\\t\\t}\\n\\n\\t\\timg {\\n\\t\\t\\ttransition: margin 0.1s ease-in-out;\\n\\t\\t\\twidth: $header-icon-size;\\n\\t\\t\\theight: $header-icon-size;\\n\\t\\t\\tpadding: calc((100% - $header-icon-size) / 2);\\n\\t\\t\\tbox-sizing: content-box;\\n\\t\\t}\\n\\n\\t\\t.app-menu-entry--label {\\n\\t\\t\\topacity: 0;\\n\\t\\t\\tposition: absolute;\\n\\t\\t\\tfont-size: 12px;\\n\\t\\t\\tcolor: var(--color-primary-text);\\n\\t\\t\\ttext-align: center;\\n\\t\\t\\tbottom: -5px;\\n\\t\\t\\tleft: 50%;\\n\\t\\t\\ttop: 45%;\\n\\t\\t\\tdisplay: block;\\n\\t\\t\\tmin-width: 100%;\\n\\t\\t\\ttransform: translateX(-50%);\\n\\t\\t\\ttransition: all 0.1s ease-in-out;\\n\\t\\t\\twidth: 100%;\\n\\t\\t\\ttext-overflow: ellipsis;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\tletter-spacing: -0.5px;\\n\\t\\t}\\n\\n\\t\\t&:hover,\\n\\t\\t&:focus-within {\\n\\t\\t\\topacity: 1;\\n\\t\\t\\t.app-menu-entry--label {\\n\\t\\t\\t\\topacity: 1;\\n\\t\\t\\t\\tfont-weight: bolder;\\n\\t\\t\\t\\tbottom: 0;\\n\\t\\t\\t\\twidth: 100%;\\n\\t\\t\\t\\ttext-overflow: ellipsis;\\n\\t\\t\\t\\toverflow: hidden;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t}\\n\\n\\t// Show labels\\n\\t&:hover,\\n\\t&:focus-within,\\n\\t.app-menu-entry:hover,\\n\\t.app-menu-entry:focus {\\n\\t\\topacity: 1;\\n\\n\\t\\timg {\\n\\t\\t\\tmargin-top: -8px;\\n\\t\\t}\\n\\n\\t\\t.app-menu-entry--label {\\n\\t\\t\\topacity: 1;\\n\\t\\t\\tbottom: 0;\\n\\t\\t}\\n\\n\\t\\t&::before, .app-menu-entry::before {\\n\\t\\t\\topacity: 0;\\n\\t\\t}\\n\\t}\\n}\\n\\n::v-deep .app-menu-more .button-vue--vue-tertiary {\\n\\tcolor: var(--color-primary-text);\\n\\topacity: .7;\\n\\tmargin: 3px;\\n\\tfilter: var(--background-image-invert-if-bright);\\n\\n\\t&:hover {\\n\\t\\topacity: 1;\\n\\t\\tbackground-color: transparent !important;\\n\\t}\\n\\n\\t&:focus-visible {\\n\\t\\topacity: 1;\\n\\t\\toutline: none !important;\\n\\t}\\n}\\n\\n.app-menu-popover-entry {\\n\\t.app-icon {\\n\\t\\tposition: relative;\\n\\t\\theight: 44px;\\n\\n\\t\\t&.has-unread::after {\\n\\t\\t\\tbackground-color: var(--color-main-text);\\n\\t\\t}\\n\\n\\t\\timg {\\n\\t\\t\\twidth: $header-icon-size;\\n\\t\\t\\theight: $header-icon-size;\\n\\t\\t\\tpadding: calc((50px - $header-icon-size) / 2);\\n\\t\\t}\\n\\t}\\n}\\n\\n.has-unread::after {\\n\\tcontent: \\\"\\\";\\n\\twidth: 8px;\\n\\theight: 8px;\\n\\tbackground-color: var(--color-primary-text);\\n\\tborder-radius: 50%;\\n\\tposition: absolute;\\n\\tdisplay: block;\\n\\ttop: 10px;\\n\\tright: 10px;\\n}\\n\\n.unread-counter {\\n\\tdisplay: none;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileUrl\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":1},\"end\":{\"line\":10,\"column\":8}}})) != null ? stack1 : \"\");\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileTitle\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":2},\"end\":{\"line\":7,\"column\":9}}})) != null ? stack1 : \"\");\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\t<a class=\\\"profile-link--avatar\\\" href=\\\"\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileUrl\") : stack1), depth0))\n + \"\\\">\\n\t\t\t\t<img src=\\\"\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1), depth0))\n + \"&size=32\\\" class=\\\"avatar\\\" srcset=\\\"\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1), depth0))\n + \"&size=32 1x, \"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1), depth0))\n + \"&size=64 2x, \"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1), depth0))\n + \"&size=128 4x\\\" alt=\\\"\\\">\\n\t\t\t</a>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<img src=\\\"\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1), depth0))\n + \"&size=32\\\" class=\\\"avatar\\\" srcset=\\\"\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1), depth0))\n + \"&size=32 1x, \"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1), depth0))\n + \"&size=64 2x, \"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1), depth0))\n + \"&size=128 4x\\\" alt=\\\"\\\">\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileUrl\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(8, data, 0),\"inverse\":container.program(11, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":12,\"column\":1},\"end\":{\"line\":20,\"column\":8}}})) != null ? stack1 : \"\");\n},\"8\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileTitle\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":13,\"column\":2},\"end\":{\"line\":17,\"column\":9}}})) != null ? stack1 : \"\");\n},\"9\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\t<a class=\\\"profile-link--avatar\\\" href=\\\"\"\n + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileUrl\") : stack1), depth0))\n + \"\\\">\\n\t\t\t\t<div class=\\\"avatar\\\"></div>\\n\t\t\t</a>\\n\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n return \"\t\t<div class=\\\"avatar\\\"></div>\\n\";\n},\"13\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileTitle\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(14, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":23,\"column\":1},\"end\":{\"line\":29,\"column\":8}}})) != null ? stack1 : \"\")\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(16, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":30,\"column\":1},\"end\":{\"line\":34,\"column\":8}}})) != null ? stack1 : \"\");\n},\"14\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<a class=\\\"body profile-link--full-name\\\" href=\\\"\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileUrl\") : stack1), depth0))\n + \"\\\">\\n\t\t\t<div class=\\\"full-name\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"fullName\") : stack1), depth0))\n + \"</div>\\n\t\t\t<div class=\\\"last-message\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"lastMessage\") : stack1), depth0))\n + \"</div>\\n\t\t\t<div class=\\\"email-address\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"emailAddresses\") : stack1), depth0))\n + \"</div>\\n\t\t</a>\\n\";\n},\"16\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t<a class=\\\"top-action\\\" href=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"hyperlink\") : stack1), depth0))\n + \"\\\" title=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"title\") : stack1), depth0))\n + \"\\\">\\n\t\t\t<img src=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"icon\") : stack1), depth0))\n + \"\\\" alt=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"title\") : stack1), depth0))\n + \"\\\">\\n\t\t</a>\\n\";\n},\"18\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(19, data, 0),\"inverse\":container.program(21, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":35,\"column\":0},\"end\":{\"line\":50,\"column\":0}}})) != null ? stack1 : \"\");\n},\"19\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t<a class=\\\"body\\\" href=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"hyperlink\") : stack1), depth0))\n + \"\\\">\\n\t\t<div class=\\\"full-name\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"fullName\") : stack1), depth0))\n + \"</div>\\n\t\t<div class=\\\"last-message\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"lastMessage\") : stack1), depth0))\n + \"</div>\\n\t\t<div class=\\\"email-address\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"emailAddresses\") : stack1), depth0))\n + \"</div>\\n\t</a>\\n \t<a class=\\\"top-action\\\" href=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"hyperlink\") : stack1), depth0))\n + \"\\\" title=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"title\") : stack1), depth0))\n + \"\\\">\\n \t\t<img src=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"icon\") : stack1), depth0))\n + \"\\\" alt=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"topAction\") : stack1)) != null ? lookupProperty(stack1,\"title\") : stack1), depth0))\n + \"\\\">\\n\t</a>\\n\";\n},\"21\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t<div class=\\\"body\\\">\\n\t\t<div class=\\\"full-name\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"fullName\") : stack1), depth0))\n + \"</div>\\n\t\t<div class=\\\"last-message\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"lastMessage\") : stack1), depth0))\n + \"</div>\\n\t\t<div class=\\\"email-address\\\">\"\n + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"emailAddresses\") : stack1), depth0))\n + \"</div>\\n\t</div>\\n\";\n},\"23\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<a class=\\\"second-action\\\" href=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"secondAction\") : stack1)) != null ? lookupProperty(stack1,\"hyperlink\") : stack1), depth0))\n + \"\\\" title=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"secondAction\") : stack1)) != null ? lookupProperty(stack1,\"title\") : stack1), depth0))\n + \"\\\">\\n\t<img src=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"secondAction\") : stack1)) != null ? lookupProperty(stack1,\"icon\") : stack1), depth0))\n + \"\\\" alt=\\\"\"\n + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"secondAction\") : stack1)) != null ? lookupProperty(stack1,\"title\") : stack1), depth0))\n + \"\\\">\\n</a>\\n\";\n},\"25\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t<button class=\\\"other-actions icon-more\\\"></button>\\n\t<div class=\\\"menu popovermenu\\\">\\n\t\t<ul>\\n\"\n + ((stack1 = lookupProperty(helpers,\"each\").call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"actions\") : stack1),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(26, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":60,\"column\":3},\"end\":{\"line\":67,\"column\":12}}})) != null ? stack1 : \"\")\n + \"\t\t</ul>\\n\t</div>\\n\";\n},\"26\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\t<li>\\n\t\t\t\t<a href=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"hyperlink\") || (depth0 != null ? lookupProperty(depth0,\"hyperlink\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"hyperlink\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":62,\"column\":13},\"end\":{\"line\":62,\"column\":26}}}) : helper)))\n + \"\\\">\\n\t\t\t\t\t<img src=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"icon\") || (depth0 != null ? lookupProperty(depth0,\"icon\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"icon\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":63,\"column\":15},\"end\":{\"line\":63,\"column\":23}}}) : helper)))\n + \"\\\" alt=\\\"\\\">\\n\t\t\t\t\t<span>\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"title\") || (depth0 != null ? lookupProperty(depth0,\"title\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"title\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":64,\"column\":11},\"end\":{\"line\":64,\"column\":20}}}) : helper)))\n + \"</span>\\n\t\t\t\t</a>\\n\t\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"avatar\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(7, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":0},\"end\":{\"line\":21,\"column\":7}}})) != null ? stack1 : \"\")\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"profileUrl\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(13, data, 0),\"inverse\":container.program(18, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":22,\"column\":0},\"end\":{\"line\":50,\"column\":7}}})) != null ? stack1 : \"\")\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"hasTwoActions\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(23, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":51,\"column\":0},\"end\":{\"line\":55,\"column\":7}}})) != null ? stack1 : \"\")\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,\"contact\") : depth0)) != null ? lookupProperty(stack1,\"hasManyActions\") : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(25, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":56,\"column\":0},\"end\":{\"line\":70,\"column\":7}}})) != null ? stack1 : \"\");\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<div class=\\\"emptycontent\\\">\\n\t<div class=\\\"icon-search\\\"></div>\\n\t<h2>\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"couldNotLoadText\") || (depth0 != null ? lookupProperty(depth0,\"couldNotLoadText\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"couldNotLoadText\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":5},\"end\":{\"line\":3,\"column\":25}}}) : helper)))\n + \"</h2>\\n</div>\\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<div class=\\\"emptycontent\\\">\\n\t<div class=\\\"icon-search\\\"></div>\\n\t<h2>\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"noContactsFoundText\") || (depth0 != null ? lookupProperty(depth0,\"noContactsFoundText\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"noContactsFoundText\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":5},\"end\":{\"line\":4,\"column\":28}}}) : helper)))\n + \"</h2>\\n</div>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<div class=\\\"footer\\\"><a href=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"contactsAppURL\") || (depth0 != null ? lookupProperty(depth0,\"contactsAppURL\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"contactsAppURL\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":9,\"column\":29},\"end\":{\"line\":9,\"column\":47}}}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"showAllContactsText\") || (depth0 != null ? lookupProperty(depth0,\"showAllContactsText\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"showAllContactsText\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":9,\"column\":49},\"end\":{\"line\":9,\"column\":72}}}) : helper)))\n + \"</a></div>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,\"canInstallApp\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(6, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":10,\"column\":0},\"end\":{\"line\":12,\"column\":0}}})) != null ? stack1 : \"\");\n},\"6\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<div class=\\\"footer\\\"><a href=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"contactsAppMgmtURL\") || (depth0 != null ? lookupProperty(depth0,\"contactsAppMgmtURL\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"contactsAppMgmtURL\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":11,\"column\":29},\"end\":{\"line\":11,\"column\":51}}}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"contactsAppMgmtText\") || (depth0 != null ? lookupProperty(depth0,\"contactsAppMgmtText\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"contactsAppMgmtText\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":11,\"column\":53},\"end\":{\"line\":11,\"column\":76}}}) : helper)))\n + \"</a></div>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"unless\").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,\"contacts\") : depth0)) != null ? lookupProperty(stack1,\"length\") : stack1),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":0},\"end\":{\"line\":6,\"column\":11}}})) != null ? stack1 : \"\")\n + \"<div id=\\\"contactsmenu-contacts\\\"></div>\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"contactsAppEnabled\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":8,\"column\":0},\"end\":{\"line\":12,\"column\":7}}})) != null ? stack1 : \"\");\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<div class=\\\"emptycontent\\\">\\n\t<div class=\\\"icon-loading\\\"></div>\\n\t<h2>\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"loadingText\") || (depth0 != null ? lookupProperty(depth0,\"loadingText\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"loadingText\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":5},\"end\":{\"line\":3,\"column\":20}}}) : helper)))\n + \"</h2>\\n</div>\\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<label class=\\\"hidden-visually\\\" for=\\\"contactsmenu-search\\\">\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"searchContactsText\") || (depth0 != null ? lookupProperty(depth0,\"searchContactsText\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"searchContactsText\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":57},\"end\":{\"line\":1,\"column\":79}}}) : helper)))\n + \"</label>\\n<input id=\\\"contactsmenu-search\\\" type=\\\"search\\\" placeholder=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"searchContactsText\") || (depth0 != null ? lookupProperty(depth0,\"searchContactsText\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"searchContactsText\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":59},\"end\":{\"line\":2,\"column\":81}}}) : helper)))\n + \"\\\" value=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"searchTerm\") || (depth0 != null ? lookupProperty(depth0,\"searchTerm\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"searchTerm\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":90},\"end\":{\"line\":2,\"column\":104}}}) : helper)))\n + \"\\\">\\n<div class=\\\"content\\\">\\n</div>\\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<img src=\\\"\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"icon\") || (depth0 != null ? lookupProperty(depth0,\"icon\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"icon\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":24},\"end\":{\"line\":3,\"column\":32}}}) : helper)))\n + \"\\\">\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"<li>\\n\t<a href=\\\"\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"hyperlink\") || (depth0 != null ? lookupProperty(depth0,\"hyperlink\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"hyperlink\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":10},\"end\":{\"line\":2,\"column\":23}}}) : helper)))\n + \"\\\">\\n\t\t\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"icon\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":2},\"end\":{\"line\":3,\"column\":41}}})) != null ? stack1 : \"\")\n + \"\\n\t\t<span>\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"title\") || (depth0 != null ? lookupProperty(depth0,\"title\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"title\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":8},\"end\":{\"line\":4,\"column\":17}}}) : helper)))\n + \"</span>\\n\t</a>\\n</li>\\n\";\n},\"useData\":true});","var map = {\n\t\"./af\": 42786,\n\t\"./af.js\": 42786,\n\t\"./ar\": 30867,\n\t\"./ar-dz\": 14130,\n\t\"./ar-dz.js\": 14130,\n\t\"./ar-kw\": 96135,\n\t\"./ar-kw.js\": 96135,\n\t\"./ar-ly\": 56440,\n\t\"./ar-ly.js\": 56440,\n\t\"./ar-ma\": 47702,\n\t\"./ar-ma.js\": 47702,\n\t\"./ar-sa\": 16040,\n\t\"./ar-sa.js\": 16040,\n\t\"./ar-tn\": 37100,\n\t\"./ar-tn.js\": 37100,\n\t\"./ar.js\": 30867,\n\t\"./az\": 31083,\n\t\"./az.js\": 31083,\n\t\"./be\": 9808,\n\t\"./be.js\": 9808,\n\t\"./bg\": 68338,\n\t\"./bg.js\": 68338,\n\t\"./bm\": 67438,\n\t\"./bm.js\": 67438,\n\t\"./bn\": 8905,\n\t\"./bn-bd\": 76225,\n\t\"./bn-bd.js\": 76225,\n\t\"./bn.js\": 8905,\n\t\"./bo\": 11560,\n\t\"./bo.js\": 11560,\n\t\"./br\": 1278,\n\t\"./br.js\": 1278,\n\t\"./bs\": 80622,\n\t\"./bs.js\": 80622,\n\t\"./ca\": 2468,\n\t\"./ca.js\": 2468,\n\t\"./cs\": 5822,\n\t\"./cs.js\": 5822,\n\t\"./cv\": 50877,\n\t\"./cv.js\": 50877,\n\t\"./cy\": 47373,\n\t\"./cy.js\": 47373,\n\t\"./da\": 24780,\n\t\"./da.js\": 24780,\n\t\"./de\": 59740,\n\t\"./de-at\": 60217,\n\t\"./de-at.js\": 60217,\n\t\"./de-ch\": 60894,\n\t\"./de-ch.js\": 60894,\n\t\"./de.js\": 59740,\n\t\"./dv\": 5300,\n\t\"./dv.js\": 5300,\n\t\"./el\": 50837,\n\t\"./el.js\": 50837,\n\t\"./en-au\": 78348,\n\t\"./en-au.js\": 78348,\n\t\"./en-ca\": 77925,\n\t\"./en-ca.js\": 77925,\n\t\"./en-gb\": 22243,\n\t\"./en-gb.js\": 22243,\n\t\"./en-ie\": 46436,\n\t\"./en-ie.js\": 46436,\n\t\"./en-il\": 47207,\n\t\"./en-il.js\": 47207,\n\t\"./en-in\": 44175,\n\t\"./en-in.js\": 44175,\n\t\"./en-nz\": 76319,\n\t\"./en-nz.js\": 76319,\n\t\"./en-sg\": 31662,\n\t\"./en-sg.js\": 31662,\n\t\"./eo\": 92915,\n\t\"./eo.js\": 92915,\n\t\"./es\": 55655,\n\t\"./es-do\": 55251,\n\t\"./es-do.js\": 55251,\n\t\"./es-mx\": 96112,\n\t\"./es-mx.js\": 96112,\n\t\"./es-us\": 71146,\n\t\"./es-us.js\": 71146,\n\t\"./es.js\": 55655,\n\t\"./et\": 5603,\n\t\"./et.js\": 5603,\n\t\"./eu\": 77763,\n\t\"./eu.js\": 77763,\n\t\"./fa\": 76959,\n\t\"./fa.js\": 76959,\n\t\"./fi\": 11897,\n\t\"./fi.js\": 11897,\n\t\"./fil\": 42549,\n\t\"./fil.js\": 42549,\n\t\"./fo\": 94694,\n\t\"./fo.js\": 94694,\n\t\"./fr\": 94470,\n\t\"./fr-ca\": 63049,\n\t\"./fr-ca.js\": 63049,\n\t\"./fr-ch\": 52330,\n\t\"./fr-ch.js\": 52330,\n\t\"./fr.js\": 94470,\n\t\"./fy\": 5044,\n\t\"./fy.js\": 5044,\n\t\"./ga\": 29295,\n\t\"./ga.js\": 29295,\n\t\"./gd\": 2101,\n\t\"./gd.js\": 2101,\n\t\"./gl\": 38794,\n\t\"./gl.js\": 38794,\n\t\"./gom-deva\": 27884,\n\t\"./gom-deva.js\": 27884,\n\t\"./gom-latn\": 23168,\n\t\"./gom-latn.js\": 23168,\n\t\"./gu\": 95349,\n\t\"./gu.js\": 95349,\n\t\"./he\": 24206,\n\t\"./he.js\": 24206,\n\t\"./hi\": 30094,\n\t\"./hi.js\": 30094,\n\t\"./hr\": 30316,\n\t\"./hr.js\": 30316,\n\t\"./hu\": 22138,\n\t\"./hu.js\": 22138,\n\t\"./hy-am\": 11423,\n\t\"./hy-am.js\": 11423,\n\t\"./id\": 29218,\n\t\"./id.js\": 29218,\n\t\"./is\": 90135,\n\t\"./is.js\": 90135,\n\t\"./it\": 90626,\n\t\"./it-ch\": 10150,\n\t\"./it-ch.js\": 10150,\n\t\"./it.js\": 90626,\n\t\"./ja\": 39183,\n\t\"./ja.js\": 39183,\n\t\"./jv\": 24286,\n\t\"./jv.js\": 24286,\n\t\"./ka\": 12105,\n\t\"./ka.js\": 12105,\n\t\"./kk\": 47772,\n\t\"./kk.js\": 47772,\n\t\"./km\": 18758,\n\t\"./km.js\": 18758,\n\t\"./kn\": 79282,\n\t\"./kn.js\": 79282,\n\t\"./ko\": 33730,\n\t\"./ko.js\": 33730,\n\t\"./ku\": 1408,\n\t\"./ku.js\": 1408,\n\t\"./ky\": 33291,\n\t\"./ky.js\": 33291,\n\t\"./lb\": 36841,\n\t\"./lb.js\": 36841,\n\t\"./lo\": 55466,\n\t\"./lo.js\": 55466,\n\t\"./lt\": 57010,\n\t\"./lt.js\": 57010,\n\t\"./lv\": 37595,\n\t\"./lv.js\": 37595,\n\t\"./me\": 39861,\n\t\"./me.js\": 39861,\n\t\"./mi\": 35493,\n\t\"./mi.js\": 35493,\n\t\"./mk\": 95966,\n\t\"./mk.js\": 95966,\n\t\"./ml\": 87341,\n\t\"./ml.js\": 87341,\n\t\"./mn\": 5115,\n\t\"./mn.js\": 5115,\n\t\"./mr\": 10370,\n\t\"./mr.js\": 10370,\n\t\"./ms\": 9847,\n\t\"./ms-my\": 41237,\n\t\"./ms-my.js\": 41237,\n\t\"./ms.js\": 9847,\n\t\"./mt\": 72126,\n\t\"./mt.js\": 72126,\n\t\"./my\": 56165,\n\t\"./my.js\": 56165,\n\t\"./nb\": 64924,\n\t\"./nb.js\": 64924,\n\t\"./ne\": 16744,\n\t\"./ne.js\": 16744,\n\t\"./nl\": 93901,\n\t\"./nl-be\": 59814,\n\t\"./nl-be.js\": 59814,\n\t\"./nl.js\": 93901,\n\t\"./nn\": 83877,\n\t\"./nn.js\": 83877,\n\t\"./oc-lnc\": 92135,\n\t\"./oc-lnc.js\": 92135,\n\t\"./pa-in\": 15858,\n\t\"./pa-in.js\": 15858,\n\t\"./pl\": 64495,\n\t\"./pl.js\": 64495,\n\t\"./pt\": 89520,\n\t\"./pt-br\": 57971,\n\t\"./pt-br.js\": 57971,\n\t\"./pt.js\": 89520,\n\t\"./ro\": 96459,\n\t\"./ro.js\": 96459,\n\t\"./ru\": 21793,\n\t\"./ru.js\": 21793,\n\t\"./sd\": 40950,\n\t\"./sd.js\": 40950,\n\t\"./se\": 10490,\n\t\"./se.js\": 10490,\n\t\"./si\": 90124,\n\t\"./si.js\": 90124,\n\t\"./sk\": 64249,\n\t\"./sk.js\": 64249,\n\t\"./sl\": 14985,\n\t\"./sl.js\": 14985,\n\t\"./sq\": 51104,\n\t\"./sq.js\": 51104,\n\t\"./sr\": 49131,\n\t\"./sr-cyrl\": 79915,\n\t\"./sr-cyrl.js\": 79915,\n\t\"./sr.js\": 49131,\n\t\"./ss\": 85893,\n\t\"./ss.js\": 85893,\n\t\"./sv\": 98760,\n\t\"./sv.js\": 98760,\n\t\"./sw\": 91172,\n\t\"./sw.js\": 91172,\n\t\"./ta\": 27333,\n\t\"./ta.js\": 27333,\n\t\"./te\": 23110,\n\t\"./te.js\": 23110,\n\t\"./tet\": 52095,\n\t\"./tet.js\": 52095,\n\t\"./tg\": 27321,\n\t\"./tg.js\": 27321,\n\t\"./th\": 9041,\n\t\"./th.js\": 9041,\n\t\"./tk\": 19005,\n\t\"./tk.js\": 19005,\n\t\"./tl-ph\": 75768,\n\t\"./tl-ph.js\": 75768,\n\t\"./tlh\": 89444,\n\t\"./tlh.js\": 89444,\n\t\"./tr\": 72397,\n\t\"./tr.js\": 72397,\n\t\"./tzl\": 28254,\n\t\"./tzl.js\": 28254,\n\t\"./tzm\": 51106,\n\t\"./tzm-latn\": 30699,\n\t\"./tzm-latn.js\": 30699,\n\t\"./tzm.js\": 51106,\n\t\"./ug-cn\": 9288,\n\t\"./ug-cn.js\": 9288,\n\t\"./uk\": 67691,\n\t\"./uk.js\": 67691,\n\t\"./ur\": 13795,\n\t\"./ur.js\": 13795,\n\t\"./uz\": 6791,\n\t\"./uz-latn\": 60588,\n\t\"./uz-latn.js\": 60588,\n\t\"./uz.js\": 6791,\n\t\"./vi\": 65666,\n\t\"./vi.js\": 65666,\n\t\"./x-pseudo\": 14378,\n\t\"./x-pseudo.js\": 14378,\n\t\"./yo\": 75805,\n\t\"./yo.js\": 75805,\n\t\"./zh-cn\": 83839,\n\t\"./zh-cn.js\": 83839,\n\t\"./zh-hk\": 55726,\n\t\"./zh-hk.js\": 55726,\n\t\"./zh-mo\": 99807,\n\t\"./zh-mo.js\": 99807,\n\t\"./zh-tw\": 74152,\n\t\"./zh-tw.js\": 74152\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 46700;","// 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 = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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__.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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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 = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2943;","__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\t2943: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(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(function(id) { return 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, [7874], function() { return __webpack_require__(48379); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","loadedScripts","loadedStyles","updatableNotification","getDefaultNotificationFunction","setDefault","callback","this","hide","$row","_","undefined","each","$","toastify","hideToast","console","error","call","showHtml","html","options","isHTML","timeout","TOAST_PERMANENT_TIMEOUT","toast","showMessage","toastElement","show","text","toString","split","join","escapeHTML","showUpdate","showTemporary","TOAST_DEFAULT_TIMEOUT","isHidden","find","length","ajaxConnectionLostHandler","Notification","t","trailing","dynamicSlideToggleEnabled","enableDynamicSlideToggle","Apps","$el","removeClass","trigger","addClass","method","endpoint","OC","type","toUpperCase","url","generateOcsUrl","data","success","bind","getApps","getKeys","app","getValue","key","defaultValue","setValue","value","deleteKey","appConfig","window","oc_appconfig","AppConfig","_oc_appswebroots","methodMap","create","update","patch","delete","read","parsePropFindResult","result","davProperties","subResult","props","href","propStat","status","properties","propKey","id","parseIdFromLocation","queryPos","indexOf","substr","parts","pop","isSuccessStatus","callPropPatch","client","model","headers","propPatch","attrs","changedProp","warn","convertModelAttributesToDavProperties","changed","then","toJSON","Backbone","VendorBackbone","Object","assign","davCall","dav","baseUrl","xmlNamespaces","resolveUrl","requestToken","propFind","depth","response","propsMapping","results","body","shift","callPropFind","request","callMkCol","responseJson","locationHeader","xhr","getResponseHeader","callMethod","davSync","params","isCollection","Collection","hasInnerCollection","usePUT","collection","Error","urlError","JSON","stringify","processData","prototype","textStatus","errorThrown","context","_oc_config","Contact","Model","defaults","fullName","lastMessage","actions","hasOneAction","hasTwoActions","hasManyActions","initialize","get","set","ContactCollection","ContactsListView","View","_collection","_subViews","render","self","forEach","contact","item","ContactsListItemView","append","on","_onChildActionMenuToggle","push","$src","view","className","_template","_model","_actionMenuShown","events","contactTemplate","require","template","_onOtherActionMenuOpened","delegateEvents","imageplaceholder","tooltip","placement","_onToggleActionsMenu","is","ContactsMenuView","_loadingTemplate","_errorTemplate","_contentTemplate","_contactsTemplate","_contacts","_searchTerm","templates","loading","menu","list","_onSearch","e","searchTerm","val","loadingTemplate","errorTemplate","couldNotLoadText","contentTemplate","searchContactsText","contactsTemplate","noContactsFoundText","showAllContactsText","contactsAppMgmtText","showLoading","loadingText","showError","showContacts","viewData","contacts","contactsAppEnabled","contactsAppURL","canInstallApp","contactsAppMgmtURL","searchVal","focus","ContactsMenu","_$trigger","_view","_contactsPromise","el","_loadContacts","_toggleVisibility","Promise","resolve","_getContacts","filter","term","catch","rawUid","document","getElementsByTagName","getAttribute","displayName","currentUser","Search","isA11yActivation","event","global","emit","token","Dialogs","YES_NO_BUTTONS","OK_BUTTONS","FILEPICKER_TYPE_CHOOSE","FILEPICKER_TYPE_MOVE","FILEPICKER_TYPE_COPY","FILEPICKER_TYPE_COPY_MOVE","FILEPICKER_TYPE_CUSTOM","dialogsCounter","alert","title","modal","message","OK_BUTTON","info","confirm","confirmDestructive","buttons","confirmHtml","prompt","name","password","_getMessageTemplate","$tmpl","dialogName","dialogId","$dlg","octemplate","dialog_name","input","attr","label","buttonlist","click","ocdialog","defaultButton","closeOnEscape","close","filepicker","multiselect","mimetypeFilter","path","sortField","sortOrder","emptyText","newText","filesClient","OCA","Sharing","PublicApp","fileList","filelist","allowDirectoryChooser","_getFilePickerTemplate","$filePicker","emptytext","newtext","nameCol","sizeCol","modifiedCol","prepend","$showGridView","_onGridviewChange","_getGridSettings","newButton","stopImmediatePropagation","preventDefault","$input","submit","newName","lastPos","lastIndexOf","selectRange","$form","$submit","stopPropagation","filename","trimmedName","trim","match","isFileNameValid","file","escape","checkInput","newname","createDirectory","always","_fillFilePicker","ready","$fileListHeader","$filelist","$filelistContainer","$dirTree","_handleTreeListSelect","_handlePickerClick","dir","currentTarget","functionToCall","returnType","datapath","index","element","selectedName","button","width","height","style","remove","buttonEnableDisable","closest","prop","fail","content","dialogType","allowHtml","escapeFunction","cancel","classes","confirmClasses","closeCallback","_fileexistsshown","fileexists","original","replacement","controller","dialogDeferred","resampleHermite","canvas","W","H","W2","H2","Math","round","img","getContext","getImageData","img2","data2","ratio_w","ratio_h","ratio_w_half","ceil","ratio_h_half","j","i","x2","weight","weights","weights_alpha","gx_r","gx_g","gx_b","gx_a","center_y","yy","floor","dy","abs","center_x","w0","xx","dx","w","sqrt","clearRect","max","putImageData","addConflict","$conflicts","$conflict","clone","$originalDiv","$replacementDiv","size","mtime","lastModified","directory","urlSpec","x","y","c","etag","forceIcon","previewpath","Files","generatePreviewUrl","replace","css","FileReader","reader","onload","blob","Blob","target","URL","webkitURL","originalUrl","createObjectURL","image","Image","src","createElement","min","drawImage","toDataURL","readAsArrayBuffer","reject","getCroppedPreview","checkboxId","count","n","parent","children","_getFileExistsTemplate","allnewfiles","allexistingfiles","why","what","onCancel","onContinue","closeButton","$primaryButton","updatePrimaryButton","checkedCount","$checkbox","promise","gridview","toggleClass","isGridView","hasClass","defer","$filePickerTemplate","tmpl","$listTmpl","detach","jqXHR","$messageTemplate","$fileexistsTemplate","_getFileList","mimeType","mimetypes","empty","advancedFilter","getFolderContents","files","mimetype","showHiddenInput","getElementById","startsWith","comparator","Comparators","fileInfo1","fileInfo2","sort","file1","file2","isFavorite","fileInfo","tags","_fillSlug","idx","entry","simpleSize","sizeColor","isEncrypted","icon","parseInt","pow","filename1","filename2","date","previewUrl","addButton","$template","paths","prependTo","getOcDialog","_changeButtonsText","$element","ctrlKey","copyText","folder","moveText","eq","manageFromDocument","getToken","setToken","newToken","OCEventSource","joinChar","dataStr","typelessListeners","closed","listeners","encodeURIComponent","useFallBack","EventSource","iframeId","iframeCount","fallBackSources","iframe","source","onmessage","parse","listen","fallBackCallBack","done","lastLength","addEventListener","currentMenu","currentMenuToggle","hideMenus","complete","lastMenu","slideUp","apply","arguments","isAdmin","_oc_isadmin","_oc_l10n_registry_translations","_oc_l10n_registry_plural_functions","hasAppTranslations","appId","getAppTranslations","translations","pluralFunction","L10n","load","appName","generateFilePath","register","pluralForm","bundle","_getPlural","extend","_unregister","translate","vars","allOptions","sanitize","optSanitize","DOMPurify","identity","optEscape","translation","a","b","r","_build","translatePlural","textSingular","textPlural","identifier","plural","number","language","substring","Handlebars","startSaving","selector","startAction","stop","finishedSaving","finishedAction","finishedSuccess","finishedError","delay","fadeOut","pageLoadTime","init","requirePasswordConfirmation","moment","requiresPasswordConfirmation","serverTimeDiff","nc_pageLoad","timeSinceLogin","nc_lastLogin","backendAllowsPasswordConfirmation","rejectCallback","config","_confirmPassword","$dialog","$error","$buttons","generateUrl","lastLogin","theme","_theme","_handlers","_pushState","strParams","history","pushState","location","pathname","navigator","userAgent","toLowerCase","pattern","patterns","querySelectorAll","ii","fill","stroke","removeAttribute","setAttribute","replaceState","hash","_cancelPop","addOnPopStateHandler","handler","_parseHashQuery","pos","_decodeQuery","query","parseUrlQuery","search","_onPopState","state","chunkify","tz","charAt","m","History","humanFileSize","computerFileSize","string","s","bytes","matches","parseFloat","isFinite","k","kb","mb","gb","g","tb","pb","p","formatDate","timestamp","format","TESTING","relativeModifiedDate","diff","fromNow","getScrollBarWidth","_scrollBarWidth","inner","outer","position","top","left","visibility","overflow","appendChild","w1","offsetWidth","w2","clientWidth","removeChild","stripTime","Date","getFullYear","getMonth","getDate","naturalSortCompare","aa","bb","aNum","Number","bNum","localeCompare","waitFor","interval","internalCallback","setTimeout","isCookieSetToValue","cookies","cookie","debug","_oc_debug","webroot","_oc_webroot","coreApps","menuSpeed","PERMISSION_ALL","PERMISSION_CREATE","PERMISSION_DELETE","PERMISSION_NONE","PERMISSION_READ","PERMISSION_SHARE","PERMISSION_UPDATE","TAG_FAVORITE","fileIsBlacklisted","Config","addScript","script","addStyle","createStyleSheet","appSettings","args","appid","scriptName","cache","settings","popup","arrowclass","loadJS","scriptname","jqxhr","appswebroots","dialogs","getCurrentUser","uid","isUserAdmin","L10N","_ajaxConnectionLostHandler","_processAjaxError","statusText","timer","setInterval","clearInterval","registerXHRForErrorProcessing","readyState","getCapabilities","realGetCapabilities","registerMenu","$toggle","$menuEl","toggle","headerMenu","isClickableElement","slideToggle","showMenu","unregisterMenu","off","basename","encodePath","dirname","isSamePath","joinPaths","getHost","host","getHostName","hostname","getPort","port","getProtocol","protocol","getCanonicalLocale","getLocale","getLanguage","addTranslations","buildQueryString","parseQueryString","queryString","components","part","decodeURIComponent","msg","PasswordConfirmation","Plugins","_plugins","targetName","plugin","plugins","getPlugins","attach","targetObject","Util","filePath","namespaces","tail","getRootPath","getRootUrl","imagePath","redirect","targetURL","reload","getRequestToken","linkTo","linkToOCS","service","version","ocsVersion","linkToRemote","generateRemoteUrl","linkToRemoteBase","realGetRootUrl","subscribe","resp","poll","setRequestToken","startPolling","NaN","session_lifetime","isNaN","getInterval","NcActions","NcActionLink","apps","appLimit","observer","computed","appList","mainAppList","popoverAppList","appLabel","mounted","beforeDestroy","unsubscribe","methods","setNavigationCounter","setApps","resize","appCount","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","_c","_self","staticClass","_l","class","active","unread","_v","_s","_e","scopedSlots","_u","fn","proxy","localeAliases","zh","zh_Hans","zh_Hans_CN","zh_Hans_HK","zh_Hans_MO","zh_Hans_SG","zh_Hant","zh_Hant_HK","zh_Hant_MO","zh_Hant_TW","locale","hasOwnProperty","initCore","$menu","$excludedPageClasses","allowAuthErrors","loadState","loadConfig","auto_logout","lastActive","now","localStorage","setItem","newValue","logoutUrl","registerAutoLogout","session_keepalive","initSessionHeartBeat","Vue","container","appMenu","AppMenu","$mount","counter","setUpMainMenu","delegate","$page","which","metaKey","includes","snapper","Snap","disable","maxPosition","minDragDistance","animating","oldSnapperOpen","open","oldSnapperClose","_snapperOpen","_snapperClose","keypress","$target","navigationBarSlideGestureEnabled","navigationBarSlideGestureAllowed","navigationBarSlideGestureEnablePending","enable","toggleSnapperOnSize","ex","TypeError","urlRegex","plainToRich","formatLinksRich","richToPlain","formatLinksPlain","leadingSpace","trailingSpace","linkText","$content","$this","dismissOptions","dismiss","menuItem","div","classList","add","innerText","ocs","product","onclick","whatsNew","regular","whatsNewTextItem","innerHTML","changelogURL","rel","onQuerySuccess","onQueryError","onDismissSuccess","onDismissError","func","funcName","oldFunc","newFunc","types","loadedStylesheets","loadScript","scriptPath","btoa","onerror","head","loadStylesheet","stylePath","link","showSuccess","warning","showWarning","showInfo","Accessibility","disableKeyboardShortcuts","Collaboration","registerType","typeDefinition","action","getTypes","keys","getIcon","typeIconClass","getLabel","typeString","getLink","Comments","InitialState","Loader","Toast","WhatsNew","warnIfNotTesting","setDeprecatedProp","cb","Array","isArray","defineProperty","autosize","ClipboardJS","md5","OCP","user","ie8fix","hidedefault","displayname","setAvatarForUnknownUser","String","$div","devicePixelRatio","oc_userconfig","avatar","clearimageplaceholder","alt","entryTemplate","shareWith","shareType","appendTo","$list","topAction","concat","hyperlink","clickedList","has","clickedTarget","attrName","attrValue","_create","originalCss","display","originalTitle","tabIndex","role","insertBefore","removeAttr","$buttonrow","$button","enterCallback","keyCode","_setOptions","_createOverlay","_init","_trigger","_setOption","$title","_setSizes","$defaultButton","$closeButton","closeCB","lessHeight","outerHeight","contentDiv","overlay","_destroyOverlay","widget","setEnterCallback","unsetEnterCallback","destroy","Template","elem","_html","o","outerHTML","toRgb","Color","mixPalette","steps","color1","color2","palette","step","ends","stepCalc","red","yellow","blue","palette1","palette2","palette3","maximum","finalInt","hashToInt","seed","rgb","placeholderText","map","word","elm","crossDomain","setRequestHeader","start","end","setSelectionRange","createTextRange","range","collapse","moveEnd","moveStart","select","showPassword","setState","checkbox","$clone","tabindex","autocomplete","cloneElement","insertAfter","outerWidth","contents","areaSelector","area","hideArea","slideDown","showArea","onpopstate","___CSS_LOADER_URL_IMPORT_0___","___CSS_LOADER_URL_IMPORT_1___","___CSS_LOADER_URL_IMPORT_2___","___CSS_LOADER_URL_IMPORT_3___","___CSS_LOADER_URL_IMPORT_4___","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","___CSS_LOADER_URL_REPLACEMENT_1___","___CSS_LOADER_URL_REPLACEMENT_2___","___CSS_LOADER_URL_REPLACEMENT_3___","___CSS_LOADER_URL_REPLACEMENT_4___","module","exports","depth0","helpers","partials","stack1","lookupProperty","propertyName","nullContext","program","noop","alias1","lambda","alias2","escapeExpression","helper","hooks","helperMissing","alias3","alias4","webpackContext","req","webpackContextResolve","__webpack_require__","code","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","every","splice","getter","__esModule","d","definition","enumerable","globalThis","Function","obj","Symbol","toStringTag","nmd","baseURI","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","nc","__webpack_exports__"],"sourceRoot":""}