aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js/vue-settings-personal-security.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-09-25 09:16:51 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-09-25 10:12:23 +0200
commit17a6bb95c25afd94df3c80665ea8fd2eda302543 (patch)
tree9ec39385f59fbd26c286107bf2f31076dd5776e2 /settings/js/vue-settings-personal-security.js
parentc99fcd63f8762233bb6867c4f44cc637808e4a83 (diff)
downloadnextcloud-server-17a6bb95c25afd94df3c80665ea8fd2eda302543.tar.gz
nextcloud-server-17a6bb95c25afd94df3c80665ea8fd2eda302543.zip
Fix apptoken creation
Seems there was a small bug in #15936 This inverts the check and add the property Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'settings/js/vue-settings-personal-security.js')
-rw-r--r--settings/js/vue-settings-personal-security.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/settings/js/vue-settings-personal-security.js b/settings/js/vue-settings-personal-security.js
index fef6c7bebbe..e7f1b878e45 100644
--- a/settings/js/vue-settings-personal-security.js
+++ b/settings/js/vue-settings-personal-security.js
@@ -873,7 +873,7 @@ t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.
*
* Licensed MIT © Zeno Rocha
*/
-t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=c(n(1)),a=c(n(3)),s=c(n(4));function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.resolveOptions(n),i.listenClick(t),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),r(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===i(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,s.default)(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new o.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}]),e}();function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=(i=n(2))&&i.__esModule?i:{default:i},s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.resolveOptions(e),this.initSelection()}return o(t,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,a.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,a.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=s},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),r=document.createRange();r.selectNodeContents(t),i.removeAllRanges(),i.addRange(r),e=i.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var i=this;function r(){i.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,r=n.length;i<r;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],r=[];if(i&&e)for(var o=0,a=i.length;o<a;o++)i[o].fn!==e&&i[o].fn._!==e&&r.push(i[o]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var i=n(5),r=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!i.string(e))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(t))return p=e,f=n,(d=t).addEventListener(p,f),{destroy:function(){d.removeEventListener(p,f)}};if(i.nodeList(t))return c=t,l=e,u=n,Array.prototype.forEach.call(c,(function(t){t.addEventListener(l,u)})),{destroy:function(){Array.prototype.forEach.call(c,(function(t){t.removeEventListener(l,u)}))}};if(i.string(t))return o=t,a=e,s=n,r(document.body,o,a,s);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,a,s,c,l,u,d,p,f}},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var i=n(7);function r(t,e,n,r,o){var a=function(t,e,n,r){return function(n){n.delegateTarget=i(n.target,e),n.delegateTarget&&r.call(t,n)}}.apply(this,arguments);return t.addEventListener(n,a,o),{destroy:function(){t.removeEventListener(n,a,o)}}}t.exports=function(t,e,n,i,o){return"function"==typeof t.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return r(t,e,n,i,o)})))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])},function(t,e,n){"use strict";var i=n(44);n.n(i).a},function(t,e,n){(t.exports=n(19)(!1)).push([t.i,".wiping[data-v-b910d4d6]{background-color:var(--color-background-darker)}td[data-v-b910d4d6]{border-top:1px solid var(--color-border);max-width:200px;white-space:normal;vertical-align:middle;position:relative}td.more[data-v-b910d4d6],td.client[data-v-b910d4d6]{overflow:visible;position:relative;width:44px;height:44px}td.token-name[data-v-b910d4d6]{padding:10px 6px}td.token-name.token-rename[data-v-b910d4d6]{padding:0}td.token-name input[data-v-b910d4d6]{width:100%;margin:0}td.token-name .wiping-warning[data-v-b910d4d6]{color:var(--color-text-lighter)}td.more[data-v-b910d4d6]{padding:0 10px}td.client div[data-v-b910d4d6]{opacity:0.57;width:44px;height:44px}\n",""])},function(t,e,n){"use strict";var i=n(45);n.n(i).a},function(t,e,n){(t.exports=n(19)(!1)).push([t.i,"table[data-v-8430f154]{width:100%;min-height:50px;padding-top:5px;max-width:580px}table th[data-v-8430f154]{opacity:.5;padding:10px 10px 10px 0}.token-list td>a.icon-more[data-v-8430f154]{transition:opacity var(--animation-quick)}.token-list a.icon-more[data-v-8430f154]{padding:14px;display:block;width:44px;height:44px;opacity:.5}.token-list tr:hover td>a.icon[data-v-8430f154],.token-list tr td>a.icon[data-v-8430f154]:focus,.token-list tr.active td>a.icon[data-v-8430f154]{opacity:1}\n",""])},function(t,e,n){"use strict";var i=n(46);n.n(i).a},function(t,e,n){(t.exports=n(19)(!1)).push([t.i,"#app-tokens-table tr>*:nth-child(2){padding-left:6px}#app-tokens-table tr>*:nth-child(3){text-align:right}\n",""])},function(t,e,n){"use strict";var i=n(47);n.n(i).a},function(t,e,n){(t.exports=n(19)(!1)).push([t.i,".app-password-row[data-v-68c31750]{display:table-row}.app-password-row .icon[data-v-68c31750]{background-size:16px 16px;display:inline-block;position:relative;top:3px;margin-left:5px;margin-right:8px}.app-password-label[data-v-68c31750]{display:table-cell;padding-right:1em;text-align:right;vertical-align:middle}.monospaced[data-v-68c31750]{width:245px;font-family:monospace}\n",""])},function(e,n,i){"use strict";i.r(n);var r=i(2),o=i(49),a=i.n(o),s=i(41),c=i(4),l=i.n(c),u=i(17),d=i.n(u),p=i(16),f={ie:/(?:MSIE|Trident|Trident\/7.0; rv)[ :](\d+)/,edge:/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/[0-9.]+ (?:Mobile Safari|Safari)\/[0-9.]+ Edge\/[0-9.]+$/,firefox:/^Mozilla\/5\.0 \([^)]*(Windows|OS X|Linux)[^)]+\) Gecko\/[0-9.]+ Firefox\/(\d+)(?:\.\d)?$/,chrome:/^Mozilla\/5\.0 \([^)]*(Windows|OS X|Linux)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/(\d+)[0-9.]+ (?:Mobile Safari|Safari)\/[0-9.]+$/,safari:/^Mozilla\/5\.0 \([^)]*(Windows|OS X)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)(?: Version\/([0-9]+)[0-9.]+)? Safari\/[0-9.A-Z]+$/,androidChrome:/Android.*(?:; (.*) Build\/).*Chrome\/(\d+)[0-9.]+/,iphone:/ *CPU +iPhone +OS +([0-9]+)_(?:[0-9_])+ +like +Mac +OS +X */,ipad:/\(iPad\; *CPU +OS +([0-9]+)_(?:[0-9_])+ +like +Mac +OS +X */,iosClient:/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/,androidClient:/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/,iosTalkClient:/^Mozilla\/5\.0 \(iOS\) Nextcloud\-Talk.*$/,androidTalkClient:/^Mozilla\/5\.0 \(Android\) Nextcloud\-Talk.*$/,davDroid:/DAV(droid|x5)\/([0-9.]+)/,webPirate:/(Sailfish).*WebPirate\/(\d+)/,sailfishBrowser:/(Sailfish).*SailfishBrowser\/(\d+)/},h={ie:t("setting","Internet Explorer"),edge:t("setting","Edge"),firefox:t("setting","Firefox"),chrome:t("setting","Google Chrome"),safari:t("setting","Safari"),androidChrome:t("setting","Google Chrome for Android"),iphone:t("setting","iPhone"),ipad:t("setting","iPad"),iosClient:t("setting","Nextcloud iOS app"),androidClient:t("setting","Nextcloud Android app"),iosTalkClient:t("setting","Nextcloud Talk for iOS"),androidTalkClient:t("setting","Nextcloud Talk for Android"),davDroid:"DAVdroid",webPirate:"WebPirate",sailfishBrowser:"SailfishBrowser"},v={ie:"icon-desktop",edge:"icon-desktop",firefox:"icon-desktop",chrome:"icon-desktop",safari:"icon-desktop",androidChrome:"icon-phone",iphone:"icon-phone",ipad:"icon-tablet",iosClient:"icon-phone",androidClient:"icon-phone",iosTalkClient:"icon-phone",androidTalkClient:"icon-phone",davDroid:"icon-phone",webPirate:"icon-link",sailfishBrowser:"icon-link"},m={name:"AuthToken",components:{Actions:p.Actions,ActionButton:p.ActionButton,ActionCheckbox:p.ActionCheckbox},props:{token:{type:Object,required:!0}},computed:{lastActivityRelative:function(){return OC.Util.relativeModifiedDate(1e3*this.token.lastActivity)},lastActivity:function(){return OC.Util.formatDate(1e3*this.token.lastActivity,"LLL")},iconName:function(){var e=this.token.name.match(/Mozilla\/5\.0 \((\w+)\) (?:mirall|csyncoC)\/(\d+\.\d+\.\d+)/),n="";e&&(this.token.name=t("settings","Sync client - {os}",{os:e[1],version:e[2]}),n="icon-desktop");var i=this.token.name,r=this.token.name;for(var o in f)(e=i.match(f[o]))&&(r=e[2]&&e[1]?h[o]+" "+e[2]+" - "+e[1]:e[1]?h[o]+" "+e[1]:h[o],n=v[o]);return this.token.current&&(r=t("settings","This session")),{icon:n,name:r}},wiping:function(){return 2===this.token.type}},data:function(){return{showMore:this.token.canScope||this.token.canDelete,renaming:!1,newName:"",actionOpen:!1}},methods:{startRename:function(){var t=this;this.actionOpen=!1,this.newName=this.token.name,this.renaming=!0,this.$nextTick((function(){t.$refs.input.select()}))},cancelRename:function(){this.renaming=!1},revoke:function(){this.actionOpen=!1,this.$emit("delete",this.token)},rename:function(){this.renaming=!1,this.$emit("rename",this.token,this.newName)},wipe:function(){this.actionOpen=!1,this.$emit("wipe",this.token)}}},A=(i(54),i(5)),g={name:"AuthTokenList",components:{AuthToken:Object(A.a)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("tr",{class:t.wiping,attrs:{"data-id":t.token.id}},[n("td",{staticClass:"client"},[n("div",{class:t.iconName.icon})]),t._v(" "),n("td",{staticClass:"token-name"},[t.token.canRename&&t.renaming?n("input",{directives:[{name:"model",rawName:"v-model",value:t.newName,expression:"newName"}],ref:"input",attrs:{type:"text"},domProps:{value:t.newName},on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.rename(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.cancelRename(e)}],blur:t.cancelRename,input:function(e){e.target.composing||(t.newName=e.target.value)}}}):n("span",[t._v(t._s(t.iconName.name))]),t._v(" "),t.wiping?n("span",{staticClass:"wiping-warning"},[t._v("("+t._s(t.t("settings","Marked for remote wipe"))+")")]):t._e()]),t._v(" "),n("td",[n("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.lastActivity,expression:"lastActivity"}],staticClass:"last-activity"},[t._v(t._s(t.lastActivityRelative))])]),t._v(" "),n("td",{staticClass:"more"},[t.token.current?t._e():n("Actions",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:{content:t.t("settings","Device settings"),container:"body"},expression:"{\n\t\t\t\tcontent: t('settings', 'Device settings'),\n\t\t\t\tcontainer: 'body'\n\t\t\t}",modifiers:{auto:!0}}],attrs:{actions:t.actions,open:t.actionOpen},on:{"update:open":function(e){t.actionOpen=e}}},[1===t.token.type?n("ActionCheckbox",{attrs:{checked:t.token.scope.filesystem},on:{change:function(e){return e.stopPropagation(),e.preventDefault(),t.$emit("toggleScope",t.token,"filesystem",!t.token.scope.filesystem)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Allow filesystem access"))+"\n\t\t\t")]):t._e(),t._v(" "),t.token.canRename?n("ActionButton",{attrs:{icon:"icon-rename"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.startRename(e)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Rename"))+"\n\t\t\t")]):t._e(),t._v(" "),t.token.canDelete?[2!==t.token.type?[n("ActionButton",{attrs:{icon:"icon-delete"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.revoke(e)}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Revoke"))+"\n\t\t\t\t\t")]),t._v(" "),n("ActionButton",{attrs:{icon:"icon-delete"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.wipe(e)}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Wipe device"))+"\n\t\t\t\t\t")])]:2===t.token.type?n("ActionButton",{attrs:{icon:"icon-delete",title:t.t("settings","Revoke")},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.revoke(e)}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Revoking this token might prevent the wiping of your device if it hasn't started the wipe yet."))+"\n\t\t\t\t")]):t._e()]:t._e()],2)],1)])}),[],!1,null,"b910d4d6",null).exports},props:{tokens:{type:Array,required:!0}},computed:{sortedTokens:function(){return this.tokens.sort((function(t,e){var n=parseInt(t.lastActivity,10);return parseInt(e.lastActivity,10)-n}))}},methods:{toggleScope:function(t,e,n){this.$emit("toggleScope",t,e,n)},rename:function(t,e){this.$emit("rename",t,e)},onDelete:function(t){this.$emit("delete",t)},onWipe:function(t){this.$emit("wipe",t)}}},b=(i(56),i(58),Object(A.a)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("table",{attrs:{id:"app-tokens-table"}},[t.tokens.length?n("thead",[n("tr",[n("th"),t._v(" "),n("th",[t._v(t._s(t.t("settings","Device")))]),t._v(" "),n("th",[t._v(t._s(t.t("settings","Last activity")))]),t._v(" "),n("th")])]):t._e(),t._v(" "),n("tbody",{staticClass:"token-list"},t._l(t.sortedTokens,(function(e){return n("AuthToken",{key:e.id,attrs:{token:e},on:{toggleScope:t.toggleScope,rename:t.rename,delete:t.onDelete,wipe:t.onWipe}})})),1)])}),[],!1,null,"8430f154",null).exports);
+t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=c(n(1)),a=c(n(3)),s=c(n(4));function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.resolveOptions(n),i.listenClick(t),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),r(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===i(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,s.default)(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new o.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}]),e}();function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=(i=n(2))&&i.__esModule?i:{default:i},s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.resolveOptions(e),this.initSelection()}return o(t,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,a.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,a.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=s},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),r=document.createRange();r.selectNodeContents(t),i.removeAllRanges(),i.addRange(r),e=i.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var i=this;function r(){i.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,r=n.length;i<r;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],r=[];if(i&&e)for(var o=0,a=i.length;o<a;o++)i[o].fn!==e&&i[o].fn._!==e&&r.push(i[o]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var i=n(5),r=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!i.string(e))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(t))return p=e,f=n,(d=t).addEventListener(p,f),{destroy:function(){d.removeEventListener(p,f)}};if(i.nodeList(t))return c=t,l=e,u=n,Array.prototype.forEach.call(c,(function(t){t.addEventListener(l,u)})),{destroy:function(){Array.prototype.forEach.call(c,(function(t){t.removeEventListener(l,u)}))}};if(i.string(t))return o=t,a=e,s=n,r(document.body,o,a,s);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,a,s,c,l,u,d,p,f}},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var i=n(7);function r(t,e,n,r,o){var a=function(t,e,n,r){return function(n){n.delegateTarget=i(n.target,e),n.delegateTarget&&r.call(t,n)}}.apply(this,arguments);return t.addEventListener(n,a,o),{destroy:function(){t.removeEventListener(n,a,o)}}}t.exports=function(t,e,n,i,o){return"function"==typeof t.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return r(t,e,n,i,o)})))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])},function(t,e,n){"use strict";var i=n(44);n.n(i).a},function(t,e,n){(t.exports=n(19)(!1)).push([t.i,".wiping[data-v-867b6056]{background-color:var(--color-background-darker)}td[data-v-867b6056]{border-top:1px solid var(--color-border);max-width:200px;white-space:normal;vertical-align:middle;position:relative}td.more[data-v-867b6056],td.client[data-v-867b6056]{overflow:visible;position:relative;width:44px;height:44px}td.token-name[data-v-867b6056]{padding:10px 6px}td.token-name.token-rename[data-v-867b6056]{padding:0}td.token-name input[data-v-867b6056]{width:100%;margin:0}td.token-name .wiping-warning[data-v-867b6056]{color:var(--color-text-lighter)}td.more[data-v-867b6056]{padding:0 10px}td.client div[data-v-867b6056]{opacity:0.57;width:44px;height:44px}\n",""])},function(t,e,n){"use strict";var i=n(45);n.n(i).a},function(t,e,n){(t.exports=n(19)(!1)).push([t.i,"table[data-v-8430f154]{width:100%;min-height:50px;padding-top:5px;max-width:580px}table th[data-v-8430f154]{opacity:.5;padding:10px 10px 10px 0}.token-list td>a.icon-more[data-v-8430f154]{transition:opacity var(--animation-quick)}.token-list a.icon-more[data-v-8430f154]{padding:14px;display:block;width:44px;height:44px;opacity:.5}.token-list tr:hover td>a.icon[data-v-8430f154],.token-list tr td>a.icon[data-v-8430f154]:focus,.token-list tr.active td>a.icon[data-v-8430f154]{opacity:1}\n",""])},function(t,e,n){"use strict";var i=n(46);n.n(i).a},function(t,e,n){(t.exports=n(19)(!1)).push([t.i,"#app-tokens-table tr>*:nth-child(2){padding-left:6px}#app-tokens-table tr>*:nth-child(3){text-align:right}\n",""])},function(t,e,n){"use strict";var i=n(47);n.n(i).a},function(t,e,n){(t.exports=n(19)(!1)).push([t.i,".app-password-row[data-v-68c31750]{display:table-row}.app-password-row .icon[data-v-68c31750]{background-size:16px 16px;display:inline-block;position:relative;top:3px;margin-left:5px;margin-right:8px}.app-password-label[data-v-68c31750]{display:table-cell;padding-right:1em;text-align:right;vertical-align:middle}.monospaced[data-v-68c31750]{width:245px;font-family:monospace}\n",""])},function(e,n,i){"use strict";i.r(n);var r=i(2),o=i(49),a=i.n(o),s=i(41),c=i(4),l=i.n(c),u=i(17),d=i.n(u),p=i(16),f={ie:/(?:MSIE|Trident|Trident\/7.0; rv)[ :](\d+)/,edge:/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/[0-9.]+ (?:Mobile Safari|Safari)\/[0-9.]+ Edge\/[0-9.]+$/,firefox:/^Mozilla\/5\.0 \([^)]*(Windows|OS X|Linux)[^)]+\) Gecko\/[0-9.]+ Firefox\/(\d+)(?:\.\d)?$/,chrome:/^Mozilla\/5\.0 \([^)]*(Windows|OS X|Linux)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/(\d+)[0-9.]+ (?:Mobile Safari|Safari)\/[0-9.]+$/,safari:/^Mozilla\/5\.0 \([^)]*(Windows|OS X)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)(?: Version\/([0-9]+)[0-9.]+)? Safari\/[0-9.A-Z]+$/,androidChrome:/Android.*(?:; (.*) Build\/).*Chrome\/(\d+)[0-9.]+/,iphone:/ *CPU +iPhone +OS +([0-9]+)_(?:[0-9_])+ +like +Mac +OS +X */,ipad:/\(iPad\; *CPU +OS +([0-9]+)_(?:[0-9_])+ +like +Mac +OS +X */,iosClient:/^Mozilla\/5\.0 \(iOS\) (ownCloud|Nextcloud)\-iOS.*$/,androidClient:/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/,iosTalkClient:/^Mozilla\/5\.0 \(iOS\) Nextcloud\-Talk.*$/,androidTalkClient:/^Mozilla\/5\.0 \(Android\) Nextcloud\-Talk.*$/,davDroid:/DAV(droid|x5)\/([0-9.]+)/,webPirate:/(Sailfish).*WebPirate\/(\d+)/,sailfishBrowser:/(Sailfish).*SailfishBrowser\/(\d+)/},h={ie:t("setting","Internet Explorer"),edge:t("setting","Edge"),firefox:t("setting","Firefox"),chrome:t("setting","Google Chrome"),safari:t("setting","Safari"),androidChrome:t("setting","Google Chrome for Android"),iphone:t("setting","iPhone"),ipad:t("setting","iPad"),iosClient:t("setting","Nextcloud iOS app"),androidClient:t("setting","Nextcloud Android app"),iosTalkClient:t("setting","Nextcloud Talk for iOS"),androidTalkClient:t("setting","Nextcloud Talk for Android"),davDroid:"DAVdroid",webPirate:"WebPirate",sailfishBrowser:"SailfishBrowser"},v={ie:"icon-desktop",edge:"icon-desktop",firefox:"icon-desktop",chrome:"icon-desktop",safari:"icon-desktop",androidChrome:"icon-phone",iphone:"icon-phone",ipad:"icon-tablet",iosClient:"icon-phone",androidClient:"icon-phone",iosTalkClient:"icon-phone",androidTalkClient:"icon-phone",davDroid:"icon-phone",webPirate:"icon-link",sailfishBrowser:"icon-link"},m={name:"AuthToken",components:{Actions:p.Actions,ActionButton:p.ActionButton,ActionCheckbox:p.ActionCheckbox},props:{token:{type:Object,required:!0}},computed:{lastActivityRelative:function(){return OC.Util.relativeModifiedDate(1e3*this.token.lastActivity)},lastActivity:function(){return OC.Util.formatDate(1e3*this.token.lastActivity,"LLL")},iconName:function(){var e=this.token.name.match(/Mozilla\/5\.0 \((\w+)\) (?:mirall|csyncoC)\/(\d+\.\d+\.\d+)/),n="";e&&(this.token.name=t("settings","Sync client - {os}",{os:e[1],version:e[2]}),n="icon-desktop");var i=this.token.name,r=this.token.name;for(var o in f)(e=i.match(f[o]))&&(r=e[2]&&e[1]?h[o]+" "+e[2]+" - "+e[1]:e[1]?h[o]+" "+e[1]:h[o],n=v[o]);return this.token.current&&(r=t("settings","This session")),{icon:n,name:r}},wiping:function(){return 2===this.token.type}},data:function(){return{showMore:this.token.canScope||this.token.canDelete,renaming:!1,newName:"",actionOpen:!1}},methods:{startRename:function(){var t=this;this.actionOpen=!1,this.newName=this.token.name,this.renaming=!0,this.$nextTick((function(){t.$refs.input.select()}))},cancelRename:function(){this.renaming=!1},revoke:function(){this.actionOpen=!1,this.$emit("delete",this.token)},rename:function(){this.renaming=!1,this.$emit("rename",this.token,this.newName)},wipe:function(){this.actionOpen=!1,this.$emit("wipe",this.token)}}},A=(i(54),i(5)),g={name:"AuthTokenList",components:{AuthToken:Object(A.a)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("tr",{class:t.wiping,attrs:{"data-id":t.token.id}},[n("td",{staticClass:"client"},[n("div",{class:t.iconName.icon})]),t._v(" "),n("td",{staticClass:"token-name"},[t.token.canRename&&t.renaming?n("input",{directives:[{name:"model",rawName:"v-model",value:t.newName,expression:"newName"}],ref:"input",attrs:{type:"text"},domProps:{value:t.newName},on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.rename(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.cancelRename(e)}],blur:t.cancelRename,input:function(e){e.target.composing||(t.newName=e.target.value)}}}):n("span",[t._v(t._s(t.iconName.name))]),t._v(" "),t.wiping?n("span",{staticClass:"wiping-warning"},[t._v("("+t._s(t.t("settings","Marked for remote wipe"))+")")]):t._e()]),t._v(" "),n("td",[n("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.lastActivity,expression:"lastActivity"}],staticClass:"last-activity"},[t._v(t._s(t.lastActivityRelative))])]),t._v(" "),n("td",{staticClass:"more"},[t.token.current?t._e():n("Actions",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:{content:t.t("settings","Device settings"),container:"body"},expression:"{\n\t\t\t\tcontent: t('settings', 'Device settings'),\n\t\t\t\tcontainer: 'body'\n\t\t\t}",modifiers:{auto:!0}}],attrs:{actions:t.actions,open:t.actionOpen},on:{"update:open":function(e){t.actionOpen=e}}},[1===t.token.type?n("ActionCheckbox",{attrs:{checked:t.token.scope.filesystem},on:{change:function(e){return e.stopPropagation(),e.preventDefault(),t.$emit("toggleScope",t.token,"filesystem",!t.token.scope.filesystem)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Allow filesystem access"))+"\n\t\t\t")]):t._e(),t._v(" "),t.token.canRename?n("ActionButton",{attrs:{icon:"icon-rename"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.startRename(e)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Rename"))+"\n\t\t\t")]):t._e(),t._v(" "),t.token.canDelete?[2!==t.token.type?[n("ActionButton",{attrs:{icon:"icon-delete"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.revoke(e)}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Revoke"))+"\n\t\t\t\t\t")]),t._v(" "),n("ActionButton",{attrs:{icon:"icon-delete"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.wipe(e)}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Wipe device"))+"\n\t\t\t\t\t")])]:2===t.token.type?n("ActionButton",{attrs:{icon:"icon-delete",title:t.t("settings","Revoke")},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.revoke(e)}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Revoking this token might prevent the wiping of your device if it hasn't started the wipe yet."))+"\n\t\t\t\t")]):t._e()]:t._e()],2)],1)])}),[],!1,null,"867b6056",null).exports},props:{tokens:{type:Array,required:!0}},computed:{sortedTokens:function(){return this.tokens.sort((function(t,e){var n=parseInt(t.lastActivity,10);return parseInt(e.lastActivity,10)-n}))}},methods:{toggleScope:function(t,e,n){this.$emit("toggleScope",t,e,n)},rename:function(t,e){this.$emit("rename",t,e)},onDelete:function(t){this.$emit("delete",t)},onWipe:function(t){this.$emit("wipe",t)}}},b=(i(56),i(58),Object(A.a)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("table",{attrs:{id:"app-tokens-table"}},[t.tokens.length?n("thead",[n("tr",[n("th"),t._v(" "),n("th",[t._v(t._s(t.t("settings","Device")))]),t._v(" "),n("th",[t._v(t._s(t.t("settings","Last activity")))]),t._v(" "),n("th")])]):t._e(),t._v(" "),n("tbody",{staticClass:"token-list"},t._l(t.sortedTokens,(function(e){return n("AuthToken",{key:e.id,attrs:{token:e},on:{toggleScope:t.toggleScope,rename:t.rename,delete:t.onDelete,wipe:t.onWipe}})})),1)])}),[],!1,null,"8430f154",null).exports);
/*!
* vue-qrcode v1.0.1
* https://fengyuanchen.github.io/vue-qrcode
@@ -883,7 +883,7 @@ t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e
*
* Date: 2019-06-29T08:20:19.827Z
*/
-function y(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var _=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){if(!s&&y)return y();if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,(function(t){return r(e[a][1][t]||t)}),l,l.exports,t,e,n,i)}return n[a].exports}for(var o=y,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,n=i(t),r=145===n?26:2*Math.ceil((n-13)/(2*e-2)),o=[n-7],a=1;a<e-1;a++)o[a]=o[a-1]-r;return o.push(6),o.reverse()},n.getPositions=function(t){for(var e=[],i=n.getRowColCoords(t),r=i.length,o=0;o<r;o++)for(var a=0;a<r;a++)0===o&&0===a||0===o&&a===r-1||o===r-1&&0===a||e.push([i[o],i[a]]);return e}},{"./utils":21}],3:[function(t,e,n){var i=t("./mode"),r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=i.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*r.indexOf(this.data[e]);n+=r.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(r.indexOf(this.data[e]),6)},e.exports=o},{"./mode":14}],4:[function(t,e,n){function i(){this.buffer=[],this.length=0}i.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},e.exports=i},{}],5:[function(t,e,n){var i=t("../utils/buffer");function r(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new i(t*t),this.data.fill(0),this.reservedBit=new i(t*t),this.reservedBit.fill(0)}r.prototype.set=function(t,e,n,i){var r=t*this.size+e;this.data[r]=n,i&&(this.reservedBit[r]=!0)},r.prototype.get=function(t,e){return this.data[t*this.size+e]},r.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},r.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=r},{"../utils/buffer":28}],6:[function(t,e,n){var i=t("../utils/buffer"),r=t("./mode");function o(t){this.mode=r.BYTE,this.data=new i(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},e.exports=o},{"../utils/buffer":28,"./mode":14}],7:[function(t,e,n){var i=t("./error-correction-level"),r=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];n.getBlocksCount=function(t,e){switch(e){case i.L:return r[4*(t-1)+0];case i.M:return r[4*(t-1)+1];case i.Q:return r[4*(t-1)+2];case i.H:return r[4*(t-1)+3];default:return}},n.getTotalCodewordsCount=function(t,e){switch(e){case i.L:return o[4*(t-1)+0];case i.M:return o[4*(t-1)+1];case i.Q:return o[4*(t-1)+2];case i.H:return o[4*(t-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(t,e,n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2},n.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},{}],9:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getPositions=function(t){var e=i(t);return[[0,0],[e-7,0],[0,e-7]]}},{"./utils":21}],10:[function(t,e,n){var i=t("./utils"),r=i.getBCHDigit(1335);n.getEncodedBits=function(t,e){for(var n=t.bit<<3|e,o=n<<10;i.getBCHDigit(o)-r>=0;)o^=1335<<i.getBCHDigit(o)-r;return 21522^(n<<10|o)}},{"./utils":21}],11:[function(t,e,n){var i=t("../utils/buffer");if(i.alloc)var r=i.alloc(512),o=i.alloc(256);else r=new i(512),o=new i(256);!function(){for(var t=1,e=0;e<255;e++)r[e]=t,o[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)r[e]=r[e-255]}(),n.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},n.exp=function(t){return r[t]},n.mul=function(t,e){return 0===t||0===e?0:r[o[t]+o[e]]}},{"../utils/buffer":28}],12:[function(t,e,n){var i=t("./mode"),r=t("./utils");function o(t){this.mode=i.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var n=r.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},e.exports=o},{"./mode":14,"./utils":21}],13:[function(t,e,n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var i=3,r=3,o=40,a=10;function s(t,e,i){switch(t){case n.Patterns.PATTERN000:return(e+i)%2==0;case n.Patterns.PATTERN001:return e%2==0;case n.Patterns.PATTERN010:return i%3==0;case n.Patterns.PATTERN011:return(e+i)%3==0;case n.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case n.Patterns.PATTERN101:return e*i%2+e*i%3==0;case n.Patterns.PATTERN110:return(e*i%2+e*i%3)%2==0;case n.Patterns.PATTERN111:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}n.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},n.from=function(t){return n.isValid(t)?parseInt(t,10):void 0},n.getPenaltyN1=function(t){for(var e=t.size,n=0,r=0,o=0,a=null,s=null,c=0;c<e;c++){r=o=0,a=s=null;for(var l=0;l<e;l++){var u=t.get(c,l);u===a?r++:(r>=5&&(n+=i+(r-5)),a=u,r=1),(u=t.get(l,c))===s?o++:(o>=5&&(n+=i+(o-5)),s=u,o=1)}r>=5&&(n+=i+(r-5)),o>=5&&(n+=i+(o-5))}return n},n.getPenaltyN2=function(t){for(var e=t.size,n=0,i=0;i<e-1;i++)for(var o=0;o<e-1;o++){var a=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);4!==a&&0!==a||n++}return n*r},n.getPenaltyN3=function(t){for(var e=t.size,n=0,i=0,r=0,a=0;a<e;a++){i=r=0;for(var s=0;s<e;s++)i=i<<1&2047|t.get(a,s),s>=10&&(1488===i||93===i)&&n++,r=r<<1&2047|t.get(s,a),s>=10&&(1488===r||93===r)&&n++}return n*o},n.getPenaltyN4=function(t){for(var e=0,n=t.data.length,i=0;i<n;i++)e+=t.data[i];return Math.abs(Math.ceil(100*e/n/5)-10)*a},n.applyMask=function(t,e){for(var n=e.size,i=0;i<n;i++)for(var r=0;r<n;r++)e.isReserved(r,i)||e.xor(r,i,s(t,r,i))},n.getBestMask=function(t,e){for(var i=Object.keys(n.Patterns).length,r=0,o=1/0,a=0;a<i;a++){e(a),n.applyMask(a,t);var s=n.getPenaltyN1(t)+n.getPenaltyN2(t)+n.getPenaltyN3(t)+n.getPenaltyN4(t);n.applyMask(a,t),s<o&&(o=s,r=a)}return r}},{}],14:[function(t,e,n){var i=t("./version-check"),r=t("./regex");n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!i.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},n.getBestModeForData=function(t){return r.testNumeric(t)?n.NUMERIC:r.testAlphanumeric(t)?n.ALPHANUMERIC:r.testKanji(t)?n.KANJI:n.BYTE},n.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},n.isValid=function(t){return t&&t.bit&&t.ccBits},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},{"./regex":19,"./version-check":22}],15:[function(t,e,n){var i=t("./mode");function r(t){this.mode=i.NUMERIC,this.data=t.toString()}r.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){var e,n,i;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),i=parseInt(n,10),t.put(i,10);var r=this.data.length-e;r>0&&(n=this.data.substr(e),i=parseInt(n,10),t.put(i,3*r+1))},e.exports=r},{"./mode":14}],16:[function(t,e,n){var i=t("../utils/buffer"),r=t("./galois-field");n.mul=function(t,e){var n=new i(t.length+e.length-1);n.fill(0);for(var o=0;o<t.length;o++)for(var a=0;a<e.length;a++)n[o+a]^=r.mul(t[o],e[a]);return n},n.mod=function(t,e){for(var n=new i(t);n.length-e.length>=0;){for(var o=n[0],a=0;a<e.length;a++)n[a]^=r.mul(e[a],o);for(var s=0;s<n.length&&0===n[s];)s++;n=n.slice(s)}return n},n.generateECPolynomial=function(t){for(var e=new i([1]),o=0;o<t;o++)e=n.mul(e,[1,r.exp(o)]);return e}},{"../utils/buffer":28,"./galois-field":11}],17:[function(t,e,n){var i=t("../utils/buffer"),r=t("./utils"),o=t("./error-correction-level"),a=t("./bit-buffer"),s=t("./bit-matrix"),c=t("./alignment-pattern"),l=t("./finder-pattern"),u=t("./mask-pattern"),d=t("./error-correction-code"),p=t("./reed-solomon-encoder"),f=t("./version"),h=t("./format-info"),v=t("./mode"),m=t("./segments"),A=t("isarray");function g(t,e,n){var i,r,o=t.size,a=h.getEncodedBits(e,n);for(i=0;i<15;i++)r=1==(a>>i&1),i<6?t.set(i,8,r,!0):i<8?t.set(i+1,8,r,!0):t.set(o-15+i,8,r,!0),i<8?t.set(8,o-i-1,r,!0):i<9?t.set(8,15-i-1+1,r,!0):t.set(8,15-i-1,r,!0);t.set(o-8,8,1,!0)}function b(t,e,n){var o=new a;n.forEach((function(e){o.put(e.mode.bit,4),o.put(e.getLength(),v.getCharCountIndicator(e.mode,t)),e.write(o)}));var s=8*(r.getSymbolTotalCodewords(t)-d.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);for(var c=(s-o.getLengthInBits())/8,l=0;l<c;l++)o.put(l%2?17:236,8);return function(t,e,n){for(var o=r.getSymbolTotalCodewords(e),a=d.getTotalCodewordsCount(e,n),s=o-a,c=d.getBlocksCount(e,n),l=c-o%c,u=Math.floor(o/c),f=Math.floor(s/c),h=f+1,v=u-f,m=new p(v),A=0,g=new Array(c),b=new Array(c),y=0,_=new i(t.buffer),w=0;w<c;w++){var x=w<l?f:h;g[w]=_.slice(A,A+x),b[w]=m.encode(g[w]),A+=x,y=Math.max(y,x)}var C,k,T=new i(o),E=0;for(C=0;C<y;C++)for(k=0;k<c;k++)C<g[k].length&&(T[E++]=g[k][C]);for(C=0;C<v;C++)for(k=0;k<c;k++)T[E++]=b[k][C];return T}(o,t,e)}function y(t,e,n,i){var o;if(A(t))o=m.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=e;if(!a){var d=m.rawSplit(t);a=f.getBestVersionForData(d,n)}o=m.fromString(t,a||40)}var p=f.getBestVersionForData(o,n);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else e=p;var h=b(e,n,o),v=r.getSymbolSize(e),y=new s(v);return function(t,e){for(var n=t.size,i=l.getPositions(e),r=0;r<i.length;r++)for(var o=i[r][0],a=i[r][1],s=-1;s<=7;s++)if(!(o+s<=-1||n<=o+s))for(var c=-1;c<=7;c++)a+c<=-1||n<=a+c||(s>=0&&s<=6&&(0===c||6===c)||c>=0&&c<=6&&(0===s||6===s)||s>=2&&s<=4&&c>=2&&c<=4?t.set(o+s,a+c,!0,!0):t.set(o+s,a+c,!1,!0))}(y,e),function(t){for(var e=t.size,n=8;n<e-8;n++){var i=n%2==0;t.set(n,6,i,!0),t.set(6,n,i,!0)}}(y),function(t,e){for(var n=c.getPositions(e),i=0;i<n.length;i++)for(var r=n[i][0],o=n[i][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?t.set(r+a,o+s,!0,!0):t.set(r+a,o+s,!1,!0)}(y,e),g(y,n,0),e>=7&&function(t,e){for(var n,i,r,o=t.size,a=f.getEncodedBits(e),s=0;s<18;s++)n=Math.floor(s/3),i=s%3+o-8-3,r=1==(a>>s&1),t.set(n,i,r,!0),t.set(i,n,r,!0)}(y,e),function(t,e){for(var n=t.size,i=-1,r=n-1,o=7,a=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var c=0;c<2;c++)if(!t.isReserved(r,s-c)){var l=!1;a<e.length&&(l=1==(e[a]>>>o&1)),t.set(r,s-c,l),-1==--o&&(a++,o=7)}if((r+=i)<0||n<=r){r-=i,i=-i;break}}}(y,h),isNaN(i)&&(i=u.getBestMask(y,g.bind(null,y,n))),u.applyMask(i,y),g(y,n,i),{modules:y,version:e,errorCorrectionLevel:n,maskPattern:i,segments:o}}n.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=f.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),y(t,n,a,i)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:30}],18:[function(t,e,n){var i=t("../utils/buffer"),r=t("./polynomial");function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=new i(this.degree);e.fill(0);var n=i.concat([t,e],t.length+this.degree),o=r.mod(n,this.genPoly),a=this.degree-o.length;if(a>0){var s=new i(this.degree);return s.fill(0),o.copy(s,a),s}return o},e.exports=o},{"../utils/buffer":28,"./polynomial":16}],19:[function(t,e,n){var i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(i=i.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";n.KANJI=new RegExp(i,"g"),n.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),n.BYTE=new RegExp(r,"g"),n.NUMERIC=new RegExp("[0-9]+","g"),n.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+i+"$"),a=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");n.testKanji=function(t){return o.test(t)},n.testNumeric=function(t){return a.test(t)},n.testAlphanumeric=function(t){return s.test(t)}},{}],20:[function(t,e,n){var i=t("./mode"),r=t("./numeric-data"),o=t("./alphanumeric-data"),a=t("./byte-data"),s=t("./kanji-data"),c=t("./regex"),l=t("./utils"),u=t("dijkstrajs");function d(t){return unescape(encodeURIComponent(t)).length}function p(t,e,n){for(var i,r=[];null!==(i=t.exec(n));)r.push({data:i[0],index:i.index,mode:e,length:i[0].length});return r}function f(t){var e,n,r=p(c.NUMERIC,i.NUMERIC,t),o=p(c.ALPHANUMERIC,i.ALPHANUMERIC,t);return l.isKanjiModeEnabled()?(e=p(c.BYTE,i.BYTE,t),n=p(c.KANJI,i.KANJI,t)):(e=p(c.BYTE_KANJI,i.BYTE,t),n=[]),r.concat(o,e,n).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,e){switch(e){case i.NUMERIC:return r.getBitsLength(t);case i.ALPHANUMERIC:return o.getBitsLength(t);case i.KANJI:return s.getBitsLength(t);case i.BYTE:return a.getBitsLength(t)}}function v(t,e){var n,c=i.getBestModeForData(t);if((n=i.from(e,c))!==i.BYTE&&n.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+i.toString(n)+".\n Suggested mode is: "+i.toString(c));switch(n!==i.KANJI||l.isKanjiModeEnabled()||(n=i.BYTE),n){case i.NUMERIC:return new r(t);case i.ALPHANUMERIC:return new o(t);case i.KANJI:return new s(t);case i.BYTE:return new a(t)}}n.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(v(e,null)):e.data&&t.push(v(e.data,e.mode)),t}),[])},n.fromString=function(t,e){for(var r=function(t,e){for(var n={},r={start:{}},o=["start"],a=0;a<t.length;a++){for(var s=t[a],c=[],l=0;l<s.length;l++){var u=s[l],d=""+a+l;c.push(d),n[d]={node:u,lastCount:0},r[d]={};for(var p=0;p<o.length;p++){var f=o[p];n[f]&&n[f].node.mode===u.mode?(r[f][d]=h(n[f].lastCount+u.length,u.mode)-h(n[f].lastCount,u.mode),n[f].lastCount+=u.length):(n[f]&&(n[f].lastCount=u.length),r[f][d]=h(u.length,u.mode)+4+i.getCharCountIndicator(u.mode,e))}}o=c}for(p=0;p<o.length;p++)r[o[p]].end=0;return{map:r,table:n}}(function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];switch(r.mode){case i.NUMERIC:e.push([r,{data:r.data,mode:i.ALPHANUMERIC,length:r.length},{data:r.data,mode:i.BYTE,length:r.length}]);break;case i.ALPHANUMERIC:e.push([r,{data:r.data,mode:i.BYTE,length:r.length}]);break;case i.KANJI:e.push([r,{data:r.data,mode:i.BYTE,length:d(r.data)}]);break;case i.BYTE:e.push([{data:r.data,mode:i.BYTE,length:d(r.data)}])}}return e}(f(t,l.isKanjiModeEnabled())),e),o=u.find_path(r.map,"start","end"),a=[],s=1;s<o.length-1;s++)a.push(r.table[o[s]].node);return n.fromArray(function(t){return t.reduce((function(t,e){var n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(a))},n.rawSplit=function(t){return n.fromArray(f(t,l.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:29}],21:[function(t,e,n){var i,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];n.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},n.getSymbolTotalCodewords=function(t){return r[t]},n.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},n.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');i=t},n.isKanjiModeEnabled=function(){return void 0!==i},n.toSJIS=function(t){return i(t)}},{}],22:[function(t,e,n){n.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},{}],23:[function(t,e,n){var i=t("./utils"),r=t("./error-correction-code"),o=t("./error-correction-level"),a=t("./mode"),s=t("./version-check"),c=t("isarray"),l=i.getBCHDigit(7973);function u(t,e){return a.getCharCountIndicator(t,e)+4}function d(t,e){var n=0;return t.forEach((function(t){var i=u(t.mode,e);n+=i+t.getBitsLength()})),n}n.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},n.getCapacity=function(t,e,n){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);var o=8*(i.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,e));if(n===a.MIXED)return o;var c=o-u(n,t);switch(n){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},n.getBestVersionForData=function(t,e){var i,r=o.from(e,o.M);if(c(t)){if(t.length>1)return function(t,e){for(var i=1;i<=40;i++)if(d(t,i)<=n.getCapacity(i,e,a.MIXED))return i}(t,r);if(0===t.length)return 1;i=t[0]}else i=t;return function(t,e,i){for(var r=1;r<=40;r++)if(e<=n.getCapacity(r,i,t))return r}(i.mode,i.getLength(),r)},n.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;i.getBCHDigit(e)-l>=0;)e^=7973<<i.getBCHDigit(e)-l;return t<<12|e}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:30}],24:[function(t,e,n){var i=t("./can-promise"),r=t("./core/qrcode"),o=t("./renderer/canvas"),a=t("./renderer/svg-tag.js");function s(t,e,n,o,a){var s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!i())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=e,e=o=void 0):2!==c||e.getContext||(o=n,n=e,e=void 0),new Promise((function(i,a){try{var s=r.create(n,o);i(t(s,e,o))}catch(t){a(t)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=e,e=o=void 0):3===c&&(e.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=n,n=e,e=void 0));try{var u=r.create(n,o);a(null,t(u,e,o))}catch(t){a(t)}}n.create=r.create,n.toCanvas=s.bind(null,o.render),n.toDataURL=s.bind(null,o.renderToDataURL),n.toString=s.bind(null,(function(t,e,n){return a.render(t,n)}))},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(t,e,n){var i=t("./utils");n.render=function(t,e,n){var r=n,o=e;void 0!==r||e&&e.getContext||(r=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),r=i.getOptions(r);var a=i.getImageWidth(t.modules.size,r),s=o.getContext("2d"),c=s.createImageData(a,a);return i.qrToImageData(c.data,t,r),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,o,a),s.putImageData(c,0,0),o},n.renderToDataURL=function(t,e,i){var r=i;void 0!==r||e&&e.getContext||(r=e,e=void 0),r||(r={});var o=n.render(t,e,r),a=r.type||"image/png",s=r.rendererOpts||{};return o.toDataURL(a,s.quality)}},{"./utils":27}],26:[function(t,e,n){var i=t("./utils");function r(t,e){var n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function o(t,e,n){var i=t+e;return void 0!==n&&(i+=" "+n),i}n.render=function(t,e,n){var a=i.getOptions(e),s=t.modules.size,c=t.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+r(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+r(a.color.dark,"stroke")+' d="'+function(t,e,n){for(var i="",r=0,a=!1,s=0,c=0;c<t.length;c++){var l=Math.floor(c%e),u=Math.floor(c/e);l||a||(a=!0),t[c]?(s++,c>0&&l>0&&t[c-1]||(i+=a?o("M",l+n,.5+u+n):o("m",r,0),r=0,a=!1),l+1<e&&t[c+1]||(i+=o("h",s),s=0)):r++}return i}(c,s,a.margin)+'"/>',p='viewBox="0 0 '+l+" "+l+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+p+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,f),f}},{"./utils":27}],27:[function(t,e,n){function i(t){if("string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}n.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,r=t.scale||4;return{width:n,scale:n?4:r,margin:e,color:{dark:i(t.color.dark||"#000000ff"),light:i(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},n.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},n.getImageWidth=function(t,e){var i=n.getScale(t,e);return Math.floor((t+2*e.margin)*i)},n.qrToImageData=function(t,e,i){for(var r=e.modules.size,o=e.modules.data,a=n.getScale(r,i),s=Math.floor((r+2*i.margin)*a),c=i.margin*a,l=[i.color.light,i.color.dark],u=0;u<s;u++)for(var d=0;d<s;d++){var p=4*(u*s+d),f=i.color.light;u>=c&&d>=c&&u<s-c&&d<s-c&&(f=l[o[Math.floor((u-c)/a)*r+Math.floor((d-c)/a)]?1:0]),t[p++]=f.r,t[p++]=f.g,t[p++]=f.b,t[p]=f.a}}},{}],28:[function(t,e,n){var i=t("isarray");o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}();var r=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(t,e,n){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"==typeof t?c(this,t):function(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");var r;return r=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i),o.TYPED_ARRAY_SUPPORT?r.__proto__=o.prototype:r=l(t,r),r}(t,e,n,i):"string"==typeof e?function(t,e){var n=0|d(e),i=s(t,n),r=i.write(e);return r!==n&&(i=i.slice(0,r)),i}(t,e):function(t,e){if(o.isBuffer(e)){var n=0|a(e.length),i=s(t,n);return 0===i.length?i:(e.copy(i,0,0,n),i)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):l(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return l(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,n):new o(t,e,n)}function a(t){if(t>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function s(t,e){var n;return o.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=o.prototype:(null===(n=t)&&(n=new o(e)),n.length=e),n}function c(t,e){var n=s(t,e<0?0:0|a(e));if(!o.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)n[i]=0;return n}function l(t,e){for(var n=e.length<0?0:0|a(e.length),i=s(t,n),r=0;r<n;r+=1)i[r]=255&e[r];return i}function u(t,e){var n;e=e||1/0;for(var i=t.length,r=null,o=[],a=0;a<i;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function d(t){return o.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:u(t).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(t,e,n){void 0===e?(n=this.length,e=0):void 0===n&&"string"==typeof e?(n=this.length,e=0):isFinite(e)&&(e|=0,isFinite(n)?n|=0:n=void 0);var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,n,i){return function(t,e,n,i){for(var r=0;r<i&&!(r+n>=e.length||r>=t.length);++r)e[r+n]=t[r];return r}(u(e,t.length-n),t,n,i)}(this,t,e,n)},o.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),o.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=o.prototype;else{var r=e-t;n=new o(r,void 0);for(var a=0;a<r;++a)n[a]=this[a+t]}return n},o.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r,a=i-n;if(this===t&&n<e&&e<i)for(r=a-1;r>=0;--r)t[r+e]=this[r+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},o.prototype.fill=function(t,e,n){if("string"==typeof t){if("string"==typeof e?(e=0,n=this.length):"string"==typeof n&&(n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var r;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(r=e;r<n;++r)this[r]=t;else{var a=o.isBuffer(t)?t:new o(t),s=a.length;for(r=0;r<n-e;++r)this[r+e]=a[r%s]}return this},o.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s(null,0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c(null,e),a=0;for(n=0;n<t.length;++n){var l=t[n];if(!o.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(r,a),a+=l.length}return r},o.byteLength=d,o.prototype._isBuffer=!0,o.isBuffer=function(t){return!(null==t||!t._isBuffer)},e.exports=o},{isarray:30}],29:[function(t,e,n){var i={single_source_shortest_paths:function(t,e,n){var r={},o={};o[e]=0;var a,s,c,l,u,d,p,f=i.PriorityQueue.make();for(f.push(e,0);!f.empty();)for(c in s=(a=f.pop()).value,l=a.cost,u=t[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],p=o[c],(void 0===o[c]||p>d)&&(o[c]=d,f.push(c,d),r[c]=s));if(void 0!==n&&void 0===o[n]){var h=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(h)}return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],i=e;i;)n.push(i),t[i],i=t[i];return n.reverse(),n},find_path:function(t,e,n){var r=i.single_source_shortest_paths(t,e,n);return i.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(t){var e,n=i.PriorityQueue,r={};for(e in t=t||{},n)n.hasOwnProperty(e)&&(r[e]=n[e]);return r.queue=[],r.sorter=t.sorter||n.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==e&&(e.exports=i)},{}],30:[function(t,e,n){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}]},{},[24])(24)}));function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(n,!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var k={name:"AuthTokenSetupDialogue",components:{QR:{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,e=this.options,n=this.tag,i=String(this.value);"canvas"===n?_.toCanvas(this.$el,i,e,(function(t){if(t)throw t})):"img"===n?_.toDataURL(i,e,(function(e,n){if(e)throw e;t.$el.src=n})):_.toString(i,e,(function(e,n){if(e)throw e;t.$el.innerHTML=n}))}},mounted:function(){this.generate()}}},props:{add:{type:Function,required:!0}},data:function(){return{adding:!1,loading:!1,deviceName:"",appPassword:"",loginName:"",passwordCopied:!1,showQR:!1,qrUrl:"",hoveringCopyButton:!1}},computed:{copyTooltipOptions:function(){var e={hideOnTargetClick:!1,trigger:"manual"};return this.passwordCopied?x({},e,{content:t("core","Copied!"),show:!0}):x({},e,{content:t("core","Copy"),show:this.hoveringCopyButton})}},methods:{selectInput:function(t){t.currentTarget.select()},submit:function(){var e=this;d()().then((function(){return e.loading=!0,e.add(e.deviceName)})).then((function(t){e.adding=!0,e.loginName=t.loginName,e.appPassword=t.token;var n=window.location.protocol+"//"+window.location.host+OC.getRootPath();e.qrUrl="nc://login/user:".concat(t.loginName,"&password:").concat(t.token,"&server:").concat(n),e.$nextTick((function(){e.$refs.appPassword.select()}))})).catch((function(n){console.error("could not create a new app password",n),OC.Notification.showTemporary(t("core","Error while creating device token")),e.reset()}))},onCopyPassword:function(){var t=this;this.passwordCopied=!0,this.$refs.clipboardButton.blur(),setTimeout((function(){return t.passwordCopied=!1}),3e3)},onCopyPasswordFailed:function(){OC.Notification.showTemporary(t("core","Could not copy app password. Please copy it manually."))},reset:function(){this.adding=!1,this.loading=!1,this.showQR=!1,this.qrUrl="",this.deviceName="",this.appPassword="",this.loginName=""}}},T=(i(60),Object(A.a)(k,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.adding?n("div",[t._v("\n\t"+t._s(t.t("settings","Use the credentials below to configure your app or device."))+"\n\t"+t._s(t.t("settings","For security reasons this password will only be shown once."))+"\n\t"),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"},[t._v(t._s(t.t("settings","Username")))]),t._v(" "),n("input",{staticClass:"monospaced",attrs:{type:"text",readonly:"readonly"},domProps:{value:t.loginName},on:{focus:t.selectInput}})]),t._v(" "),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"},[t._v(t._s(t.t("settings","Password")))]),t._v(" "),n("input",{ref:"appPassword",staticClass:"monospaced",attrs:{type:"text",readonly:"readonly"},domProps:{value:t.appPassword},on:{focus:t.selectInput}}),t._v(" "),n("a",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.copyTooltipOptions,expression:"copyTooltipOptions"},{name:"clipboard",rawName:"v-clipboard:copy",value:t.appPassword,expression:"appPassword",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopyPassword,expression:"onCopyPassword",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:t.onCopyPasswordFailed,expression:"onCopyPasswordFailed",arg:"error"}],ref:"clipboardButton",staticClass:"icon icon-clippy",on:{mouseover:function(e){t.hoveringCopyButton=!0},mouseleave:function(e){t.hoveringCopyButton=!1}}}),t._v(" "),n("button",{staticClass:"button",on:{click:t.reset}},[t._v("\n\t\t\t"+t._s(t.t("settings","Done"))+"\n\t\t")])]),t._v(" "),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"}),t._v(" "),t.showQR?n("QR",{attrs:{value:t.qrUrl}}):n("a",{on:{click:function(e){t.showQR=!0}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show QR code for mobile apps"))+"\n\t\t")])],1)]):n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.deviceName,expression:"deviceName"}],attrs:{type:"text",disabled:t.loading,placeholder:t.t("settings","App name")},domProps:{value:t.deviceName},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)},input:function(e){e.target.composing||(t.deviceName=e.target.value)}}}),t._v(" "),n("button",{staticClass:"button",attrs:{disabled:t.loading},on:{click:t.submit}},[t._v(t._s(t.t("settings","Create new app password"))+"\n\t")])])}),[],!1,null,"68c31750",null).exports);function E(t,e,n,i,r,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,r)}var O,S,M=function(t){return function(e){return t(e),e}},D={name:"AuthTokenSection",props:{tokens:{type:Array,required:!0}},components:{AuthTokenSetupDialogue:T,AuthTokenList:b},data:function(){return{baseUrl:OC.generateUrl("/settings/personal/authtokens")}},methods:{addNewToken:function(e){var n=this;console.debug("creating a new app token",e);var i={name:e};return l.a.post(this.baseUrl,i).then((function(t){return t.data})).then(M((function(){return console.debug("app token created")}))).then(M((function(t){return n.tokens.push(t.deviceToken)}))).catch((function(e){throw console.error.bind("could not create app password",e),OC.Notification.showTemporary(t("core","Error while creating device token")),e}))},toggleTokenScope:function(e,n,i){console.debug("updating app token scope",e.id,n,i);var r=e.scope[n];return e.scope[n]=i,this.updateToken(e).then(M((function(){return console.debug("app token scope updated")}))).catch((function(i){throw console.error.bind("could not update app token scope",i),OC.Notification.showTemporary(t("core","Error while updating device token scope")),e.scope[n]=r,i}))},rename:function(e,n){console.debug("renaming app token",e.id,e.name,n);var i=e.name;return e.name=n,this.updateToken(e).then(M((function(){return console.debug("app token name updated")}))).catch((function(n){console.error.bind("could not update app token name",n),OC.Notification.showTemporary(t("core","Error while updating device token name")),e.name=i}))},updateToken:function(t){return l.a.put(this.baseUrl+"/"+t.id,t).then((function(t){return t.data}))},deleteToken:function(e){var n=this;return console.debug("deleting app token",e),this.tokens=this.tokens.filter((function(t){return t!==e})),l.a.delete(this.baseUrl+"/"+e.id).then((function(t){return t.data})).then(M((function(){return console.debug("app token deleted")}))).catch((function(i){console.error.bind("could not delete app token",i),OC.Notification.showTemporary(t("core","Error while deleting the token")),n.tokens.push(e)}))},wipeToken:(O=regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.debug("wiping app token",n),e.prev=1,e.next=4,d()();case 4:return e.next=6,new Promise((function(e){OC.dialogs.confirm(t("core","Do you really want to wipe your data from this device?"),t("core","Confirm wipe"),e,!0)}));case 6:if(e.sent){e.next=9;break}return console.debug("wipe aborted by user"),e.abrupt("return");case 9:return e.next=11,l.a.post(this.baseUrl+"/wipe/"+n.id);case 11:console.debug("app token marked for wipe"),n.type=2,e.next=19;break;case 15:e.prev=15,e.t0=e.catch(1),console.error("could not wipe app token",e.t0),OC.Notification.showTemporary(t("core","Error while wiping the device with the token"));case 19:case"end":return e.stop()}}),e,this,[[1,15]])})),S=function(){var t=this,e=arguments;return new Promise((function(n,i){var r=O.apply(t,e);function o(t){E(r,n,i,o,a,"next",t)}function a(t){E(r,n,i,o,a,"throw",t)}o(void 0)}))},function(t){return S.apply(this,arguments)})}},N=Object(A.a)(D,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"section",attrs:{id:"security"}},[n("h2",[t._v(t._s(t.t("settings","Devices & sessions")))]),t._v(" "),n("p",{staticClass:"settings-hint hidden-when-empty"},[t._v(t._s(t.t("settings","Web, desktop and mobile clients currently logged in to your account.")))]),t._v(" "),n("AuthTokenList",{attrs:{tokens:t.tokens},on:{toggleScope:t.toggleTokenScope,rename:t.rename,delete:t.deleteToken,wipe:t.wipeToken}}),t._v(" "),t.canCreateToken?n("AuthTokenSetupDialogue",{attrs:{add:t.addNewToken}}):t._e()],1)}),[],!1,null,"2a9ebaf4",null).exports;
+function y(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var _=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){if(!s&&y)return y();if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,(function(t){return r(e[a][1][t]||t)}),l,l.exports,t,e,n,i)}return n[a].exports}for(var o=y,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,n=i(t),r=145===n?26:2*Math.ceil((n-13)/(2*e-2)),o=[n-7],a=1;a<e-1;a++)o[a]=o[a-1]-r;return o.push(6),o.reverse()},n.getPositions=function(t){for(var e=[],i=n.getRowColCoords(t),r=i.length,o=0;o<r;o++)for(var a=0;a<r;a++)0===o&&0===a||0===o&&a===r-1||o===r-1&&0===a||e.push([i[o],i[a]]);return e}},{"./utils":21}],3:[function(t,e,n){var i=t("./mode"),r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=i.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*r.indexOf(this.data[e]);n+=r.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(r.indexOf(this.data[e]),6)},e.exports=o},{"./mode":14}],4:[function(t,e,n){function i(){this.buffer=[],this.length=0}i.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},e.exports=i},{}],5:[function(t,e,n){var i=t("../utils/buffer");function r(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new i(t*t),this.data.fill(0),this.reservedBit=new i(t*t),this.reservedBit.fill(0)}r.prototype.set=function(t,e,n,i){var r=t*this.size+e;this.data[r]=n,i&&(this.reservedBit[r]=!0)},r.prototype.get=function(t,e){return this.data[t*this.size+e]},r.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},r.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=r},{"../utils/buffer":28}],6:[function(t,e,n){var i=t("../utils/buffer"),r=t("./mode");function o(t){this.mode=r.BYTE,this.data=new i(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},e.exports=o},{"../utils/buffer":28,"./mode":14}],7:[function(t,e,n){var i=t("./error-correction-level"),r=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];n.getBlocksCount=function(t,e){switch(e){case i.L:return r[4*(t-1)+0];case i.M:return r[4*(t-1)+1];case i.Q:return r[4*(t-1)+2];case i.H:return r[4*(t-1)+3];default:return}},n.getTotalCodewordsCount=function(t,e){switch(e){case i.L:return o[4*(t-1)+0];case i.M:return o[4*(t-1)+1];case i.Q:return o[4*(t-1)+2];case i.H:return o[4*(t-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(t,e,n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2},n.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},{}],9:[function(t,e,n){var i=t("./utils").getSymbolSize;n.getPositions=function(t){var e=i(t);return[[0,0],[e-7,0],[0,e-7]]}},{"./utils":21}],10:[function(t,e,n){var i=t("./utils"),r=i.getBCHDigit(1335);n.getEncodedBits=function(t,e){for(var n=t.bit<<3|e,o=n<<10;i.getBCHDigit(o)-r>=0;)o^=1335<<i.getBCHDigit(o)-r;return 21522^(n<<10|o)}},{"./utils":21}],11:[function(t,e,n){var i=t("../utils/buffer");if(i.alloc)var r=i.alloc(512),o=i.alloc(256);else r=new i(512),o=new i(256);!function(){for(var t=1,e=0;e<255;e++)r[e]=t,o[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)r[e]=r[e-255]}(),n.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},n.exp=function(t){return r[t]},n.mul=function(t,e){return 0===t||0===e?0:r[o[t]+o[e]]}},{"../utils/buffer":28}],12:[function(t,e,n){var i=t("./mode"),r=t("./utils");function o(t){this.mode=i.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var n=r.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},e.exports=o},{"./mode":14,"./utils":21}],13:[function(t,e,n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var i=3,r=3,o=40,a=10;function s(t,e,i){switch(t){case n.Patterns.PATTERN000:return(e+i)%2==0;case n.Patterns.PATTERN001:return e%2==0;case n.Patterns.PATTERN010:return i%3==0;case n.Patterns.PATTERN011:return(e+i)%3==0;case n.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case n.Patterns.PATTERN101:return e*i%2+e*i%3==0;case n.Patterns.PATTERN110:return(e*i%2+e*i%3)%2==0;case n.Patterns.PATTERN111:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}n.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},n.from=function(t){return n.isValid(t)?parseInt(t,10):void 0},n.getPenaltyN1=function(t){for(var e=t.size,n=0,r=0,o=0,a=null,s=null,c=0;c<e;c++){r=o=0,a=s=null;for(var l=0;l<e;l++){var u=t.get(c,l);u===a?r++:(r>=5&&(n+=i+(r-5)),a=u,r=1),(u=t.get(l,c))===s?o++:(o>=5&&(n+=i+(o-5)),s=u,o=1)}r>=5&&(n+=i+(r-5)),o>=5&&(n+=i+(o-5))}return n},n.getPenaltyN2=function(t){for(var e=t.size,n=0,i=0;i<e-1;i++)for(var o=0;o<e-1;o++){var a=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);4!==a&&0!==a||n++}return n*r},n.getPenaltyN3=function(t){for(var e=t.size,n=0,i=0,r=0,a=0;a<e;a++){i=r=0;for(var s=0;s<e;s++)i=i<<1&2047|t.get(a,s),s>=10&&(1488===i||93===i)&&n++,r=r<<1&2047|t.get(s,a),s>=10&&(1488===r||93===r)&&n++}return n*o},n.getPenaltyN4=function(t){for(var e=0,n=t.data.length,i=0;i<n;i++)e+=t.data[i];return Math.abs(Math.ceil(100*e/n/5)-10)*a},n.applyMask=function(t,e){for(var n=e.size,i=0;i<n;i++)for(var r=0;r<n;r++)e.isReserved(r,i)||e.xor(r,i,s(t,r,i))},n.getBestMask=function(t,e){for(var i=Object.keys(n.Patterns).length,r=0,o=1/0,a=0;a<i;a++){e(a),n.applyMask(a,t);var s=n.getPenaltyN1(t)+n.getPenaltyN2(t)+n.getPenaltyN3(t)+n.getPenaltyN4(t);n.applyMask(a,t),s<o&&(o=s,r=a)}return r}},{}],14:[function(t,e,n){var i=t("./version-check"),r=t("./regex");n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!i.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},n.getBestModeForData=function(t){return r.testNumeric(t)?n.NUMERIC:r.testAlphanumeric(t)?n.ALPHANUMERIC:r.testKanji(t)?n.KANJI:n.BYTE},n.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},n.isValid=function(t){return t&&t.bit&&t.ccBits},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},{"./regex":19,"./version-check":22}],15:[function(t,e,n){var i=t("./mode");function r(t){this.mode=i.NUMERIC,this.data=t.toString()}r.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){var e,n,i;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),i=parseInt(n,10),t.put(i,10);var r=this.data.length-e;r>0&&(n=this.data.substr(e),i=parseInt(n,10),t.put(i,3*r+1))},e.exports=r},{"./mode":14}],16:[function(t,e,n){var i=t("../utils/buffer"),r=t("./galois-field");n.mul=function(t,e){var n=new i(t.length+e.length-1);n.fill(0);for(var o=0;o<t.length;o++)for(var a=0;a<e.length;a++)n[o+a]^=r.mul(t[o],e[a]);return n},n.mod=function(t,e){for(var n=new i(t);n.length-e.length>=0;){for(var o=n[0],a=0;a<e.length;a++)n[a]^=r.mul(e[a],o);for(var s=0;s<n.length&&0===n[s];)s++;n=n.slice(s)}return n},n.generateECPolynomial=function(t){for(var e=new i([1]),o=0;o<t;o++)e=n.mul(e,[1,r.exp(o)]);return e}},{"../utils/buffer":28,"./galois-field":11}],17:[function(t,e,n){var i=t("../utils/buffer"),r=t("./utils"),o=t("./error-correction-level"),a=t("./bit-buffer"),s=t("./bit-matrix"),c=t("./alignment-pattern"),l=t("./finder-pattern"),u=t("./mask-pattern"),d=t("./error-correction-code"),p=t("./reed-solomon-encoder"),f=t("./version"),h=t("./format-info"),v=t("./mode"),m=t("./segments"),A=t("isarray");function g(t,e,n){var i,r,o=t.size,a=h.getEncodedBits(e,n);for(i=0;i<15;i++)r=1==(a>>i&1),i<6?t.set(i,8,r,!0):i<8?t.set(i+1,8,r,!0):t.set(o-15+i,8,r,!0),i<8?t.set(8,o-i-1,r,!0):i<9?t.set(8,15-i-1+1,r,!0):t.set(8,15-i-1,r,!0);t.set(o-8,8,1,!0)}function b(t,e,n){var o=new a;n.forEach((function(e){o.put(e.mode.bit,4),o.put(e.getLength(),v.getCharCountIndicator(e.mode,t)),e.write(o)}));var s=8*(r.getSymbolTotalCodewords(t)-d.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);for(var c=(s-o.getLengthInBits())/8,l=0;l<c;l++)o.put(l%2?17:236,8);return function(t,e,n){for(var o=r.getSymbolTotalCodewords(e),a=d.getTotalCodewordsCount(e,n),s=o-a,c=d.getBlocksCount(e,n),l=c-o%c,u=Math.floor(o/c),f=Math.floor(s/c),h=f+1,v=u-f,m=new p(v),A=0,g=new Array(c),b=new Array(c),y=0,_=new i(t.buffer),w=0;w<c;w++){var x=w<l?f:h;g[w]=_.slice(A,A+x),b[w]=m.encode(g[w]),A+=x,y=Math.max(y,x)}var C,k,T=new i(o),E=0;for(C=0;C<y;C++)for(k=0;k<c;k++)C<g[k].length&&(T[E++]=g[k][C]);for(C=0;C<v;C++)for(k=0;k<c;k++)T[E++]=b[k][C];return T}(o,t,e)}function y(t,e,n,i){var o;if(A(t))o=m.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=e;if(!a){var d=m.rawSplit(t);a=f.getBestVersionForData(d,n)}o=m.fromString(t,a||40)}var p=f.getBestVersionForData(o,n);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else e=p;var h=b(e,n,o),v=r.getSymbolSize(e),y=new s(v);return function(t,e){for(var n=t.size,i=l.getPositions(e),r=0;r<i.length;r++)for(var o=i[r][0],a=i[r][1],s=-1;s<=7;s++)if(!(o+s<=-1||n<=o+s))for(var c=-1;c<=7;c++)a+c<=-1||n<=a+c||(s>=0&&s<=6&&(0===c||6===c)||c>=0&&c<=6&&(0===s||6===s)||s>=2&&s<=4&&c>=2&&c<=4?t.set(o+s,a+c,!0,!0):t.set(o+s,a+c,!1,!0))}(y,e),function(t){for(var e=t.size,n=8;n<e-8;n++){var i=n%2==0;t.set(n,6,i,!0),t.set(6,n,i,!0)}}(y),function(t,e){for(var n=c.getPositions(e),i=0;i<n.length;i++)for(var r=n[i][0],o=n[i][1],a=-2;a<=2;a++)for(var s=-2;s<=2;s++)-2===a||2===a||-2===s||2===s||0===a&&0===s?t.set(r+a,o+s,!0,!0):t.set(r+a,o+s,!1,!0)}(y,e),g(y,n,0),e>=7&&function(t,e){for(var n,i,r,o=t.size,a=f.getEncodedBits(e),s=0;s<18;s++)n=Math.floor(s/3),i=s%3+o-8-3,r=1==(a>>s&1),t.set(n,i,r,!0),t.set(i,n,r,!0)}(y,e),function(t,e){for(var n=t.size,i=-1,r=n-1,o=7,a=0,s=n-1;s>0;s-=2)for(6===s&&s--;;){for(var c=0;c<2;c++)if(!t.isReserved(r,s-c)){var l=!1;a<e.length&&(l=1==(e[a]>>>o&1)),t.set(r,s-c,l),-1==--o&&(a++,o=7)}if((r+=i)<0||n<=r){r-=i,i=-i;break}}}(y,h),isNaN(i)&&(i=u.getBestMask(y,g.bind(null,y,n))),u.applyMask(i,y),g(y,n,i),{modules:y,version:e,errorCorrectionLevel:n,maskPattern:i,segments:o}}n.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=f.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),y(t,n,a,i)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:30}],18:[function(t,e,n){var i=t("../utils/buffer"),r=t("./polynomial");function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=new i(this.degree);e.fill(0);var n=i.concat([t,e],t.length+this.degree),o=r.mod(n,this.genPoly),a=this.degree-o.length;if(a>0){var s=new i(this.degree);return s.fill(0),o.copy(s,a),s}return o},e.exports=o},{"../utils/buffer":28,"./polynomial":16}],19:[function(t,e,n){var i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(i=i.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";n.KANJI=new RegExp(i,"g"),n.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),n.BYTE=new RegExp(r,"g"),n.NUMERIC=new RegExp("[0-9]+","g"),n.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+i+"$"),a=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");n.testKanji=function(t){return o.test(t)},n.testNumeric=function(t){return a.test(t)},n.testAlphanumeric=function(t){return s.test(t)}},{}],20:[function(t,e,n){var i=t("./mode"),r=t("./numeric-data"),o=t("./alphanumeric-data"),a=t("./byte-data"),s=t("./kanji-data"),c=t("./regex"),l=t("./utils"),u=t("dijkstrajs");function d(t){return unescape(encodeURIComponent(t)).length}function p(t,e,n){for(var i,r=[];null!==(i=t.exec(n));)r.push({data:i[0],index:i.index,mode:e,length:i[0].length});return r}function f(t){var e,n,r=p(c.NUMERIC,i.NUMERIC,t),o=p(c.ALPHANUMERIC,i.ALPHANUMERIC,t);return l.isKanjiModeEnabled()?(e=p(c.BYTE,i.BYTE,t),n=p(c.KANJI,i.KANJI,t)):(e=p(c.BYTE_KANJI,i.BYTE,t),n=[]),r.concat(o,e,n).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,e){switch(e){case i.NUMERIC:return r.getBitsLength(t);case i.ALPHANUMERIC:return o.getBitsLength(t);case i.KANJI:return s.getBitsLength(t);case i.BYTE:return a.getBitsLength(t)}}function v(t,e){var n,c=i.getBestModeForData(t);if((n=i.from(e,c))!==i.BYTE&&n.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+i.toString(n)+".\n Suggested mode is: "+i.toString(c));switch(n!==i.KANJI||l.isKanjiModeEnabled()||(n=i.BYTE),n){case i.NUMERIC:return new r(t);case i.ALPHANUMERIC:return new o(t);case i.KANJI:return new s(t);case i.BYTE:return new a(t)}}n.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(v(e,null)):e.data&&t.push(v(e.data,e.mode)),t}),[])},n.fromString=function(t,e){for(var r=function(t,e){for(var n={},r={start:{}},o=["start"],a=0;a<t.length;a++){for(var s=t[a],c=[],l=0;l<s.length;l++){var u=s[l],d=""+a+l;c.push(d),n[d]={node:u,lastCount:0},r[d]={};for(var p=0;p<o.length;p++){var f=o[p];n[f]&&n[f].node.mode===u.mode?(r[f][d]=h(n[f].lastCount+u.length,u.mode)-h(n[f].lastCount,u.mode),n[f].lastCount+=u.length):(n[f]&&(n[f].lastCount=u.length),r[f][d]=h(u.length,u.mode)+4+i.getCharCountIndicator(u.mode,e))}}o=c}for(p=0;p<o.length;p++)r[o[p]].end=0;return{map:r,table:n}}(function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];switch(r.mode){case i.NUMERIC:e.push([r,{data:r.data,mode:i.ALPHANUMERIC,length:r.length},{data:r.data,mode:i.BYTE,length:r.length}]);break;case i.ALPHANUMERIC:e.push([r,{data:r.data,mode:i.BYTE,length:r.length}]);break;case i.KANJI:e.push([r,{data:r.data,mode:i.BYTE,length:d(r.data)}]);break;case i.BYTE:e.push([{data:r.data,mode:i.BYTE,length:d(r.data)}])}}return e}(f(t,l.isKanjiModeEnabled())),e),o=u.find_path(r.map,"start","end"),a=[],s=1;s<o.length-1;s++)a.push(r.table[o[s]].node);return n.fromArray(function(t){return t.reduce((function(t,e){var n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(a))},n.rawSplit=function(t){return n.fromArray(f(t,l.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:29}],21:[function(t,e,n){var i,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];n.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},n.getSymbolTotalCodewords=function(t){return r[t]},n.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},n.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');i=t},n.isKanjiModeEnabled=function(){return void 0!==i},n.toSJIS=function(t){return i(t)}},{}],22:[function(t,e,n){n.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},{}],23:[function(t,e,n){var i=t("./utils"),r=t("./error-correction-code"),o=t("./error-correction-level"),a=t("./mode"),s=t("./version-check"),c=t("isarray"),l=i.getBCHDigit(7973);function u(t,e){return a.getCharCountIndicator(t,e)+4}function d(t,e){var n=0;return t.forEach((function(t){var i=u(t.mode,e);n+=i+t.getBitsLength()})),n}n.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},n.getCapacity=function(t,e,n){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);var o=8*(i.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,e));if(n===a.MIXED)return o;var c=o-u(n,t);switch(n){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},n.getBestVersionForData=function(t,e){var i,r=o.from(e,o.M);if(c(t)){if(t.length>1)return function(t,e){for(var i=1;i<=40;i++)if(d(t,i)<=n.getCapacity(i,e,a.MIXED))return i}(t,r);if(0===t.length)return 1;i=t[0]}else i=t;return function(t,e,i){for(var r=1;r<=40;r++)if(e<=n.getCapacity(r,i,t))return r}(i.mode,i.getLength(),r)},n.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;i.getBCHDigit(e)-l>=0;)e^=7973<<i.getBCHDigit(e)-l;return t<<12|e}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:30}],24:[function(t,e,n){var i=t("./can-promise"),r=t("./core/qrcode"),o=t("./renderer/canvas"),a=t("./renderer/svg-tag.js");function s(t,e,n,o,a){var s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!i())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=e,e=o=void 0):2!==c||e.getContext||(o=n,n=e,e=void 0),new Promise((function(i,a){try{var s=r.create(n,o);i(t(s,e,o))}catch(t){a(t)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=e,e=o=void 0):3===c&&(e.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=n,n=e,e=void 0));try{var u=r.create(n,o);a(null,t(u,e,o))}catch(t){a(t)}}n.create=r.create,n.toCanvas=s.bind(null,o.render),n.toDataURL=s.bind(null,o.renderToDataURL),n.toString=s.bind(null,(function(t,e,n){return a.render(t,n)}))},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(t,e,n){var i=t("./utils");n.render=function(t,e,n){var r=n,o=e;void 0!==r||e&&e.getContext||(r=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),r=i.getOptions(r);var a=i.getImageWidth(t.modules.size,r),s=o.getContext("2d"),c=s.createImageData(a,a);return i.qrToImageData(c.data,t,r),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,o,a),s.putImageData(c,0,0),o},n.renderToDataURL=function(t,e,i){var r=i;void 0!==r||e&&e.getContext||(r=e,e=void 0),r||(r={});var o=n.render(t,e,r),a=r.type||"image/png",s=r.rendererOpts||{};return o.toDataURL(a,s.quality)}},{"./utils":27}],26:[function(t,e,n){var i=t("./utils");function r(t,e){var n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function o(t,e,n){var i=t+e;return void 0!==n&&(i+=" "+n),i}n.render=function(t,e,n){var a=i.getOptions(e),s=t.modules.size,c=t.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+r(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+r(a.color.dark,"stroke")+' d="'+function(t,e,n){for(var i="",r=0,a=!1,s=0,c=0;c<t.length;c++){var l=Math.floor(c%e),u=Math.floor(c/e);l||a||(a=!0),t[c]?(s++,c>0&&l>0&&t[c-1]||(i+=a?o("M",l+n,.5+u+n):o("m",r,0),r=0,a=!1),l+1<e&&t[c+1]||(i+=o("h",s),s=0)):r++}return i}(c,s,a.margin)+'"/>',p='viewBox="0 0 '+l+" "+l+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+p+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,f),f}},{"./utils":27}],27:[function(t,e,n){function i(t){if("string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}n.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,r=t.scale||4;return{width:n,scale:n?4:r,margin:e,color:{dark:i(t.color.dark||"#000000ff"),light:i(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},n.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},n.getImageWidth=function(t,e){var i=n.getScale(t,e);return Math.floor((t+2*e.margin)*i)},n.qrToImageData=function(t,e,i){for(var r=e.modules.size,o=e.modules.data,a=n.getScale(r,i),s=Math.floor((r+2*i.margin)*a),c=i.margin*a,l=[i.color.light,i.color.dark],u=0;u<s;u++)for(var d=0;d<s;d++){var p=4*(u*s+d),f=i.color.light;u>=c&&d>=c&&u<s-c&&d<s-c&&(f=l[o[Math.floor((u-c)/a)*r+Math.floor((d-c)/a)]?1:0]),t[p++]=f.r,t[p++]=f.g,t[p++]=f.b,t[p]=f.a}}},{}],28:[function(t,e,n){var i=t("isarray");o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}();var r=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(t,e,n){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"==typeof t?c(this,t):function(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");var r;return r=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i),o.TYPED_ARRAY_SUPPORT?r.__proto__=o.prototype:r=l(t,r),r}(t,e,n,i):"string"==typeof e?function(t,e){var n=0|d(e),i=s(t,n),r=i.write(e);return r!==n&&(i=i.slice(0,r)),i}(t,e):function(t,e){if(o.isBuffer(e)){var n=0|a(e.length),i=s(t,n);return 0===i.length?i:(e.copy(i,0,0,n),i)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):l(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return l(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,n):new o(t,e,n)}function a(t){if(t>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function s(t,e){var n;return o.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=o.prototype:(null===(n=t)&&(n=new o(e)),n.length=e),n}function c(t,e){var n=s(t,e<0?0:0|a(e));if(!o.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)n[i]=0;return n}function l(t,e){for(var n=e.length<0?0:0|a(e.length),i=s(t,n),r=0;r<n;r+=1)i[r]=255&e[r];return i}function u(t,e){var n;e=e||1/0;for(var i=t.length,r=null,o=[],a=0;a<i;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function d(t){return o.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:u(t).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(t,e,n){void 0===e?(n=this.length,e=0):void 0===n&&"string"==typeof e?(n=this.length,e=0):isFinite(e)&&(e|=0,isFinite(n)?n|=0:n=void 0);var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,n,i){return function(t,e,n,i){for(var r=0;r<i&&!(r+n>=e.length||r>=t.length);++r)e[r+n]=t[r];return r}(u(e,t.length-n),t,n,i)}(this,t,e,n)},o.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),o.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=o.prototype;else{var r=e-t;n=new o(r,void 0);for(var a=0;a<r;++a)n[a]=this[a+t]}return n},o.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r,a=i-n;if(this===t&&n<e&&e<i)for(r=a-1;r>=0;--r)t[r+e]=this[r+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},o.prototype.fill=function(t,e,n){if("string"==typeof t){if("string"==typeof e?(e=0,n=this.length):"string"==typeof n&&(n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var r;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(r=e;r<n;++r)this[r]=t;else{var a=o.isBuffer(t)?t:new o(t),s=a.length;for(r=0;r<n-e;++r)this[r+e]=a[r%s]}return this},o.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s(null,0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c(null,e),a=0;for(n=0;n<t.length;++n){var l=t[n];if(!o.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(r,a),a+=l.length}return r},o.byteLength=d,o.prototype._isBuffer=!0,o.isBuffer=function(t){return!(null==t||!t._isBuffer)},e.exports=o},{isarray:30}],29:[function(t,e,n){var i={single_source_shortest_paths:function(t,e,n){var r={},o={};o[e]=0;var a,s,c,l,u,d,p,f=i.PriorityQueue.make();for(f.push(e,0);!f.empty();)for(c in s=(a=f.pop()).value,l=a.cost,u=t[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],p=o[c],(void 0===o[c]||p>d)&&(o[c]=d,f.push(c,d),r[c]=s));if(void 0!==n&&void 0===o[n]){var h=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(h)}return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],i=e;i;)n.push(i),t[i],i=t[i];return n.reverse(),n},find_path:function(t,e,n){var r=i.single_source_shortest_paths(t,e,n);return i.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(t){var e,n=i.PriorityQueue,r={};for(e in t=t||{},n)n.hasOwnProperty(e)&&(r[e]=n[e]);return r.queue=[],r.sorter=t.sorter||n.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==e&&(e.exports=i)},{}],30:[function(t,e,n){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}]},{},[24])(24)}));function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(n,!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var k={name:"AuthTokenSetupDialogue",components:{QR:{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,e=this.options,n=this.tag,i=String(this.value);"canvas"===n?_.toCanvas(this.$el,i,e,(function(t){if(t)throw t})):"img"===n?_.toDataURL(i,e,(function(e,n){if(e)throw e;t.$el.src=n})):_.toString(i,e,(function(e,n){if(e)throw e;t.$el.innerHTML=n}))}},mounted:function(){this.generate()}}},props:{add:{type:Function,required:!0}},data:function(){return{adding:!1,loading:!1,deviceName:"",appPassword:"",loginName:"",passwordCopied:!1,showQR:!1,qrUrl:"",hoveringCopyButton:!1}},computed:{copyTooltipOptions:function(){var e={hideOnTargetClick:!1,trigger:"manual"};return this.passwordCopied?x({},e,{content:t("core","Copied!"),show:!0}):x({},e,{content:t("core","Copy"),show:this.hoveringCopyButton})}},methods:{selectInput:function(t){t.currentTarget.select()},submit:function(){var e=this;d()().then((function(){return e.loading=!0,e.add(e.deviceName)})).then((function(t){e.adding=!0,e.loginName=t.loginName,e.appPassword=t.token;var n=window.location.protocol+"//"+window.location.host+OC.getRootPath();e.qrUrl="nc://login/user:".concat(t.loginName,"&password:").concat(t.token,"&server:").concat(n),e.$nextTick((function(){e.$refs.appPassword.select()}))})).catch((function(n){console.error("could not create a new app password",n),OC.Notification.showTemporary(t("core","Error while creating device token")),e.reset()}))},onCopyPassword:function(){var t=this;this.passwordCopied=!0,this.$refs.clipboardButton.blur(),setTimeout((function(){return t.passwordCopied=!1}),3e3)},onCopyPasswordFailed:function(){OC.Notification.showTemporary(t("core","Could not copy app password. Please copy it manually."))},reset:function(){this.adding=!1,this.loading=!1,this.showQR=!1,this.qrUrl="",this.deviceName="",this.appPassword="",this.loginName=""}}},T=(i(60),Object(A.a)(k,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.adding?n("div",[t._v("\n\t"+t._s(t.t("settings","Use the credentials below to configure your app or device."))+"\n\t"+t._s(t.t("settings","For security reasons this password will only be shown once."))+"\n\t"),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"},[t._v(t._s(t.t("settings","Username")))]),t._v(" "),n("input",{staticClass:"monospaced",attrs:{type:"text",readonly:"readonly"},domProps:{value:t.loginName},on:{focus:t.selectInput}})]),t._v(" "),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"},[t._v(t._s(t.t("settings","Password")))]),t._v(" "),n("input",{ref:"appPassword",staticClass:"monospaced",attrs:{type:"text",readonly:"readonly"},domProps:{value:t.appPassword},on:{focus:t.selectInput}}),t._v(" "),n("a",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.copyTooltipOptions,expression:"copyTooltipOptions"},{name:"clipboard",rawName:"v-clipboard:copy",value:t.appPassword,expression:"appPassword",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopyPassword,expression:"onCopyPassword",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:t.onCopyPasswordFailed,expression:"onCopyPasswordFailed",arg:"error"}],ref:"clipboardButton",staticClass:"icon icon-clippy",on:{mouseover:function(e){t.hoveringCopyButton=!0},mouseleave:function(e){t.hoveringCopyButton=!1}}}),t._v(" "),n("button",{staticClass:"button",on:{click:t.reset}},[t._v("\n\t\t\t"+t._s(t.t("settings","Done"))+"\n\t\t")])]),t._v(" "),n("div",{staticClass:"app-password-row"},[n("span",{staticClass:"app-password-label"}),t._v(" "),t.showQR?n("QR",{attrs:{value:t.qrUrl}}):n("a",{on:{click:function(e){t.showQR=!0}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show QR code for mobile apps"))+"\n\t\t")])],1)]):n("div",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.deviceName,expression:"deviceName"}],attrs:{type:"text",disabled:t.loading,placeholder:t.t("settings","App name")},domProps:{value:t.deviceName},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submit(e)},input:function(e){e.target.composing||(t.deviceName=e.target.value)}}}),t._v(" "),n("button",{staticClass:"button",attrs:{disabled:t.loading},on:{click:t.submit}},[t._v(t._s(t.t("settings","Create new app password"))+"\n\t")])])}),[],!1,null,"68c31750",null).exports);function E(t,e,n,i,r,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,r)}var O,S,M=function(t){return function(e){return t(e),e}},D={name:"AuthTokenSection",props:{tokens:{type:Array,required:!0},canCreateToken:{type:Boolean,required:!0}},components:{AuthTokenSetupDialogue:T,AuthTokenList:b},data:function(){return{baseUrl:OC.generateUrl("/settings/personal/authtokens")}},methods:{addNewToken:function(e){var n=this;console.debug("creating a new app token",e);var i={name:e};return l.a.post(this.baseUrl,i).then((function(t){return t.data})).then(M((function(){return console.debug("app token created")}))).then(M((function(t){return n.tokens.push(t.deviceToken)}))).catch((function(e){throw console.error.bind("could not create app password",e),OC.Notification.showTemporary(t("core","Error while creating device token")),e}))},toggleTokenScope:function(e,n,i){console.debug("updating app token scope",e.id,n,i);var r=e.scope[n];return e.scope[n]=i,this.updateToken(e).then(M((function(){return console.debug("app token scope updated")}))).catch((function(i){throw console.error.bind("could not update app token scope",i),OC.Notification.showTemporary(t("core","Error while updating device token scope")),e.scope[n]=r,i}))},rename:function(e,n){console.debug("renaming app token",e.id,e.name,n);var i=e.name;return e.name=n,this.updateToken(e).then(M((function(){return console.debug("app token name updated")}))).catch((function(n){console.error.bind("could not update app token name",n),OC.Notification.showTemporary(t("core","Error while updating device token name")),e.name=i}))},updateToken:function(t){return l.a.put(this.baseUrl+"/"+t.id,t).then((function(t){return t.data}))},deleteToken:function(e){var n=this;return console.debug("deleting app token",e),this.tokens=this.tokens.filter((function(t){return t!==e})),l.a.delete(this.baseUrl+"/"+e.id).then((function(t){return t.data})).then(M((function(){return console.debug("app token deleted")}))).catch((function(i){console.error.bind("could not delete app token",i),OC.Notification.showTemporary(t("core","Error while deleting the token")),n.tokens.push(e)}))},wipeToken:(O=regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.debug("wiping app token",n),e.prev=1,e.next=4,d()();case 4:return e.next=6,new Promise((function(e){OC.dialogs.confirm(t("core","Do you really want to wipe your data from this device?"),t("core","Confirm wipe"),e,!0)}));case 6:if(e.sent){e.next=9;break}return console.debug("wipe aborted by user"),e.abrupt("return");case 9:return e.next=11,l.a.post(this.baseUrl+"/wipe/"+n.id);case 11:console.debug("app token marked for wipe"),n.type=2,e.next=19;break;case 15:e.prev=15,e.t0=e.catch(1),console.error("could not wipe app token",e.t0),OC.Notification.showTemporary(t("core","Error while wiping the device with the token"));case 19:case"end":return e.stop()}}),e,this,[[1,15]])})),S=function(){var t=this,e=arguments;return new Promise((function(n,i){var r=O.apply(t,e);function o(t){E(r,n,i,o,a,"next",t)}function a(t){E(r,n,i,o,a,"throw",t)}o(void 0)}))},function(t){return S.apply(this,arguments)})}},N=Object(A.a)(D,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"section",attrs:{id:"security"}},[n("h2",[t._v(t._s(t.t("settings","Devices & sessions")))]),t._v(" "),n("p",{staticClass:"settings-hint hidden-when-empty"},[t._v(t._s(t.t("settings","Web, desktop and mobile clients currently logged in to your account.")))]),t._v(" "),n("AuthTokenList",{attrs:{tokens:t.tokens},on:{toggleScope:t.toggleTokenScope,rename:t.rename,delete:t.deleteToken,wipe:t.wipeToken}}),t._v(" "),t.canCreateToken?n("AuthTokenSetupDialogue",{attrs:{add:t.addNewToken}}):t._e()],1)}),[],!1,null,"2bd81540",null).exports;
/*
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
@@ -905,4 +905,4 @@ function y(){throw new Error("Dynamic requires are not currently supported by ro
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
i.nc=btoa(OC.requestToken),r.default.use(a.a),r.default.use(s.a,{defaultHtml:!1}),r.default.prototype.t=t,new(r.default.extend(N))({propsData:{tokens:OCP.InitialState.loadState("settings","app_tokens"),canCreateToken:OCP.InitialState.loadState("settings","can_create_app_token")}}).$mount("#security-authtokens")}]);
-//# sourceMappingURL=vue-settings-personal-security.js.map?v=b73ce66aed04a1bc921a \ No newline at end of file
+//# sourceMappingURL=vue-settings-personal-security.js.map?v=80c42ac6a7ea5ec4873d \ No newline at end of file