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KAAK6H,G,KClDvF7D,EAAoB+D,QAAK5D,ECGzB,IAAI6D,EAAsBhE,EAAoBS,OAAEN,EAAW,CAAC,OAAO,IAAOH,EAAoB,SAC9FgE,EAAsBhE,EAAoBS,EAAEuD,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/twofactor_backupcodes/src/views/PersonalSettings.vue","webpack:///nextcloud/apps/twofactor_backupcodes/src/views/PersonalSettings.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/twofactor_backupcodes/src/service/PrintService.js","webpack://nextcloud/./apps/twofactor_backupcodes/src/views/PersonalSettings.vue?c515","webpack://nextcloud/./apps/twofactor_backupcodes/src/views/PersonalSettings.vue?81a7","webpack://nextcloud/./apps/twofactor_backupcodes/src/views/PersonalSettings.vue?0c03","webpack:///nextcloud/apps/twofactor_backupcodes/src/store.js","webpack:///nextcloud/apps/twofactor_backupcodes/src/service/BackupCodesService.js","webpack:///nextcloud/apps/twofactor_backupcodes/src/settings.js","webpack:///nextcloud/apps/twofactor_backupcodes/src/views/PersonalSettings.vue?vue&type=style&index=0&id=f5e07a6a&prod&scoped=true&lang=css","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/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 = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","\n\n\t \n\t\t\t\t\n\t\t\t\t\t{{ t('twofactor_backupcodes', 'Backup codes have been generated. {used} of {total} codes have been used.', {used, total}) }}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{{ t('twofactor_backupcodes', 'These are your backup codes. Please save and/or print them as you will not be able to read the codes again later') }}\n\t\t\t\t\t \n\t\t\t\t\n\t\t\t \n\t\t\t\t\n\t\t\t\t\t{{ t('twofactor_backupcodes', 'If you regenerate backup codes, you automatically invalidate old codes.') }}\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t{{ t('twofactor_backupcodes', 'Save backup codes') }}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
' + data + '')\n\tnewTab.print()\n\tnewTab.close()\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/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalSettings.vue?vue&type=style&index=0&id=f5e07a6a&prod&scoped=true&lang=css\";\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/vue-loader/lib/index.js??vue-loader-options!./PersonalSettings.vue?vue&type=style&index=0&id=f5e07a6a&prod&scoped=true&lang=css\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./PersonalSettings.vue?vue&type=template&id=f5e07a6a&scoped=true\"\nimport script from \"./PersonalSettings.vue?vue&type=script&lang=js\"\nexport * from \"./PersonalSettings.vue?vue&type=script&lang=js\"\nimport style0 from \"./PersonalSettings.vue?vue&type=style&index=0&id=f5e07a6a&prod&scoped=true&lang=css\"\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 \"f5e07a6a\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[(!_vm.enabled)?_c('button',{attrs:{\"id\":\"generate-backup-codes\",\"disabled\":_vm.generatingCodes},on:{\"click\":_vm.generateBackupCodes}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('twofactor_backupcodes', 'Generate backup codes'))+\"\\n\\t\\t\"),_c('span',{class:{'icon-loading-small': _vm.generatingCodes}})]):[_c('p',[(!_vm.haveCodes)?[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('twofactor_backupcodes', 'Backup codes have been generated. {used} of {total} codes have been used.', {used: _vm.used, total: _vm.total}))+\"\\n\\t\\t\\t\")]:[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('twofactor_backupcodes', 'These are your backup codes. Please save and/or print them as you will not be able to read the codes again later'))+\"\\n\\t\\t\\t\\t\"),_c('ul',_vm._l((_vm.codes),function(code){return _c('li',{key:code,staticClass:\"backup-code\"},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(code)+\"\\n\\t\\t\\t\\t\\t\")])}),0),_vm._v(\" \"),_c('a',{staticClass:\"button primary\",attrs:{\"href\":_vm.downloadUrl,\"download\":_vm.downloadFilename}},[_vm._v(_vm._s(_vm.t('twofactor_backupcodes', 'Save backup codes')))]),_vm._v(\" \"),_c('button',{staticClass:\"button\",on:{\"click\":_vm.printCodes}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('twofactor_backupcodes', 'Print backup codes'))+\"\\n\\t\\t\\t\\t\")])]],2),_vm._v(\" \"),_c('p',[_c('button',{attrs:{\"id\":\"generate-backup-codes\"},on:{\"click\":_vm.generateBackupCodes}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('twofactor_backupcodes', 'Regenerate backup codes'))+\"\\n\\t\\t\\t\")])]),_vm._v(\" \"),_c('p',[_c('em',[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('twofactor_backupcodes', 'If you regenerate backup codes, you automatically invalidate old codes.'))+\"\\n\\t\\t\\t\")])])]],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\nimport { generateCodes } from './service/BackupCodesService.js'\n\nVue.use(Vuex)\n\nconst state = {\n\tenabled: false,\n\ttotal: 0,\n\tused: 0,\n\tcodes: [],\n}\n\nconst mutations = {\n\tsetEnabled(state, enabled) {\n\t\tVue.set(state, 'enabled', enabled)\n\t},\n\tsetTotal(state, total) {\n\t\tVue.set(state, 'total', total)\n\t},\n\tsetUsed(state, used) {\n\t\tVue.set(state, 'used', used)\n\t},\n\tsetCodes(state, codes) {\n\t\tVue.set(state, 'codes', codes)\n\t},\n}\n\nconst actions = {\n\tgenerate({ commit }) {\n\t\tcommit('setEnabled', false)\n\n\t\treturn generateCodes().then(({ codes, state }) => {\n\t\t\tcommit('setEnabled', state.enabled)\n\t\t\tcommit('setTotal', state.total)\n\t\t\tcommit('setUsed', state.used)\n\t\t\tcommit('setCodes', codes)\n\t\t\treturn true\n\t\t})\n\t},\n}\n\nexport default new Store({\n\tstrict: process.env.NODE_ENV !== 'production',\n\tstate,\n\tmutations,\n\tactions,\n})\n","/**\n * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Axios from '@nextcloud/axios'\nimport { generateUrl } from '@nextcloud/router'\n\n/**\n *\n */\nexport function generateCodes() {\n\tconst url = generateUrl('/apps/twofactor_backupcodes/settings/create')\n\n\treturn Axios.post(url, {}).then(resp => resp.data)\n}\n","/**\n * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\nimport Vue from 'vue'\n\nimport PersonalSettings from './views/PersonalSettings.vue'\nimport store from './store.js'\n\nVue.prototype.t = t\n\nconst initialState = loadState('twofactor_backupcodes', 'state')\nstore.replaceState(initialState)\n\nconst View = Vue.extend(PersonalSettings)\nnew View({\n\tstore,\n}).$mount('#twofactor-backupcodes-settings')\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, `\n.backup-code[data-v-f5e07a6a] {\n\tfont-family: monospace;\n\tletter-spacing: 0.02em;\n\tfont-size: 1.2em;\n}\n.button[data-v-f5e07a6a] {\n\tdisplay: inline-block;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/twofactor_backupcodes/src/views/PersonalSettings.vue\"],\"names\":[],\"mappings\":\";AAwIA;CACA,sBAAA;CACA,sBAAA;CACA,gBAAA;AACA;AACA;CACA,qBAAA;AACA\",\"sourcesContent\":[\"\\n\\n\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{{ t('twofactor_backupcodes', 'Backup codes have been generated. {used} of {total} codes have been used.', {used, total}) }}\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{{ t('twofactor_backupcodes', 'These are your backup codes. Please save and/or print them as you will not be able to read the codes again later') }}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t
\\n\\t\\t\\t\\t\\t{{ t('twofactor_backupcodes', 'Save backup codes') }}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t
\\n\\t\\t\\t\\t\\n\\t\\t\\t
\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t{{ t('twofactor_backupcodes', 'If you regenerate backup codes, you automatically invalidate old codes.') }}\\n\\t\\t\\t\\t\\n\\t\\t\\t
\\n\\t\\t\\n\\t