/**
 * @license
 * Copyright (C) 2020–2025 Pryv S.A. https://pryv.com
 *
 * This file is part of Open-Pryv.io and released under BSD-Clause-3 License
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its contributors
 *   may be used to endorse or promote products derived from this software
 *   without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
webpackJsonp([1],{"4lvf":function(e,t){e.exports={basePath:"access",pages:{index:"/index.html",auth:"/access.html",register:"/register.html",reset:"/reset-password.html",signin:"/signinhub.html",changepass:"/change-password.html"}}},"7zck":function(e,t){},NHnr:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=r("7+uW"),n=r("Xxa5"),a=r.n(n),i=r("exGp"),c=r.n(i),o=r("Zrlr"),u=r.n(o),l=r("wxAW"),p=r.n(l),h=r("+T3g"),f=r.n(h),d=function(){function e(t){var r=this;u()(this,e),this.selection=[];var s=t.regions;Object.keys(s).forEach(function(e){var t=s[e].zones;Object.keys(t).forEach(function(e){var s=t[e].hostings;Object.keys(s).forEach(function(e){var t=s[e],n=t.name||e;null!=t.description&&(n=n+" ("+t.description+")"),r.selection.push({value:e,text:n,description:t.description,availableCore:t.availableCore})})})})}return p()(e,[{key:"getSelection",value:function(){return this.selection}}]),e}(),v=r("UZ5h");function m(e,t){for(var r=e.split("."),s=t.split("."),n=0;n<r.length;++n){if(r[n]!==s[n])return r[n]>s[n];if(s.length===n+1)return!0}return!1}f.a.Service.prototype.apiEndpointForSync=function(e,t){return f.a.Service.buildAPIEndpoint(this.infoSync(),e,t)},f.a.Service.prototype.mfaChallenge=function(){var e=c()(a.a.mark(function e(t,r){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.post(this.apiEndpointForSync(t)+"mfa/challenge").set("accept","json").set("Authorization",r).send({});case 2:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),f.a.Service.prototype.mfaVerify=function(){var e=c()(a.a.mark(function e(t,r,s){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.post(this.apiEndpointForSync(t)+"mfa/verify").set("accept","json").set("Authorization",r).send({code:s});case 2:return n=e.sent,e.abrupt("return",n.body.token);case 4:case"end":return e.stop()}},e,this)}));return function(t,r,s){return e.apply(this,arguments)}}(),f.a.Service.prototype.checkAppAccess=function(){var e=c()(a.a.mark(function e(t,r,s){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.post(this.apiEndpointForSync(t)+"accesses/check-app").set("accept","json").set("Authorization",r).send(s);case 2:return n=e.sent,e.abrupt("return",n.body);case 4:case"end":return e.stop()}},e,this)}));return function(t,r,s){return e.apply(this,arguments)}}(),f.a.Service.prototype.createAppAccess=function(){var e=c()(a.a.mark(function e(t,r,s){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.post(this.apiEndpointForSync(t)+"accesses").set("accept","json").set("Authorization",r).send(s);case 2:return n=e.sent,e.abrupt("return",n.body.access);case 4:case"end":return e.stop()}},e,this)}));return function(t,r,s){return e.apply(this,arguments)}}(),f.a.Service.prototype.deleteAppAccess=function(){var e=c()(a.a.mark(function e(t,r,s){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.delete(this.apiEndpointForSync(t)+"accesses/"+s).set("accept","json").set("Authorization",r).send({id:s});case 2:return n=e.sent,e.abrupt("return",n.body.accessDeletion);case 4:case"end":return e.stop()}},e,this)}));return function(t,r,s){return e.apply(this,arguments)}}(),f.a.Service.prototype.getAvailableHostings=function(){var e=c()(a.a.mark(function e(){var t;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.get(this.infoSync().register+"hostings").set("accept","json");case 2:return t=e.sent,e.abrupt("return",new d(t.body));case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),f.a.Service.prototype.createUser=function(){var e=c()(a.a.mark(function e(t,r,s,n,i,c,o,u,l){var p,h;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(p=this.infoSync().version,h=void 0,!p||!m(p,"1.6.0")){e.next=8;break}return e.next=5,f.a.utils.superagent.post(v.resolve(t,"users")).set("accept","json").send({appId:o,username:r,password:s,email:n,hosting:i,language:c||"en",invitationToken:u||"enjoy",referer:l});case 5:h=e.sent,e.next=11;break;case 8:return e.next=10,f.a.utils.superagent.post(this.infoSync().register+"user").set("accept","json").send({appid:o,username:r,password:s,email:n,hosting:i,languageCode:c||"en",invitationtoken:u||"enjoy",referer:l});case 10:h=e.sent;case 11:return e.abrupt("return",h.body);case 12:case"end":return e.stop()}},e,this)}));return function(t,r,s,n,a,i,c,o,u){return e.apply(this,arguments)}}(),f.a.Service.prototype.checkUsernameExistence=function(){var e=c()(a.a.mark(function e(t){var r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.post(this.infoSync().register+t+"/server").set("accept","json").send({});case 2:return r=e.sent,e.abrupt("return",r.body.server);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),f.a.Service.prototype.getUsernameForEmail=function(){var e=c()(a.a.mark(function e(t){var r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.search("@")<0)){e.next=2;break}return e.abrupt("return",t);case 2:return e.next=4,f.a.utils.superagent.get(this.infoSync().register+t+"/uid").set("accept","json");case 4:return r=e.sent,e.abrupt("return",r.body.uid);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),f.a.Service.prototype.requestPasswordReset=function(){var e=c()(a.a.mark(function e(t,r){var s;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.post(this.apiEndpointForSync(t)+"account/request-password-reset").set("accept","json").send({appId:r,username:t});case 2:return s=e.sent,e.abrupt("return",s.status);case 4:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),f.a.Service.prototype.resetPassword=function(){var e=c()(a.a.mark(function e(t,r,s,n){var i;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.post(this.apiEndpointForSync(t)+"account/reset-password").set("accept","json").send({username:t,newPassword:r,appId:n,resetToken:s});case 2:return i=e.sent,e.abrupt("return",i.status);case 4:case"end":return e.stop()}},e,this)}));return function(t,r,s,n){return e.apply(this,arguments)}}(),f.a.Service.prototype.changePassword=function(){var e=c()(a.a.mark(function e(t,r,s,n){var i;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.a.utils.superagent.post(this.apiEndpointForSync(t)+"account/change-password").set("accept","json").set("Authorization",n).send({oldPassword:r,newPassword:s});case 2:return i=e.sent,e.abrupt("return",i.status);case 4:case"end":return e.stop()}},e,this)}));return function(t,r,s,n){return e.apply(this,arguments)}}(),f.a.Service.prototype.loginWithThrow=function(){var e=c()(a.a.mark(function e(t,r,s,n){var i,c,o,u,l;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.apiEndpointFor(t);case 2:if(i=e.sent,e.prev=3,c={accept:"json"},e.t0=n,e.t0){e.next=10;break}return e.next=9,this.info();case 9:e.t0=e.sent.register;case 10:return n=e.t0,f.a.utils.isBrowser()||(c.Origin=n),e.next=14,f.a.utils.superagent.post(i+"auth/login").set(c).send({username:t,password:r,appId:s});case 14:if((o=e.sent).body.token){e.next=17;break}throw new Error("Invalid login response: "+o.body);case 17:return e.t1=f.a.Connection,e.t2=f.a.Service,e.next=21,this.info();case 21:return e.t3=e.sent,e.t4=t,e.t5=o.body.token,e.t6=e.t2.buildAPIEndpoint.call(e.t2,e.t3,e.t4,e.t5),e.t7=this,e.abrupt("return",new e.t1(e.t6,e.t7));case 29:if(e.prev=29,e.t8=e.catch(3),!(e.t8.response&&e.t8.response.body&&e.t8.response.body)){e.next=39;break}if(!(u=e.t8.response.body).error||!u.error.message){e.next=35;break}throw new Error(u.error.message);case 35:if(!u.mfaToken){e.next=39;break}throw(l=new Error).mfaToken=u.mfaToken,l;case 39:case"end":return e.stop()}},e,this,[[3,29]])}));return function(t,r,s,n){return e.apply(this,arguments)}}();var g=r("Zthf"),w=r.n(g),x=r("M4fF"),b=r.n(x);var y=function(){function e(t){if(u()(this,e),console.log("QUERY PARAMS",t),this.language=t.lang||"en",this.appId="pryv-app-web-auth-3",this.pollUrl=t.poll||t.pollUrl,null!=t&&null!=t.oauthState&&(this.accessState={oaccessState:t.oauthState}),this.isAccessRequest())this.pryvService=new f.a.Service;else{var r=t.pryvServiceInfoUrl||function(){if(w.a.DNSLess)return new URL("/reg/service/info",window.location.href).href;return"https://reg."+(location.hostname.split(".").slice(1).join(".")||"pryv.me")+"/service/info"}();this.pryvService=new f.a.Service(r)}this.user={username:"",personalToken:"",mfaToken:""},this.checkAppResult={},this.initialized=!1}return p()(e,[{key:"init",value:function(){var e=c()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.initialized){e.next=2;break}return e.abrupt("return");case 2:if(this.initialized=!1,!this.isAccessRequest()){e.next=7;break}return e.next=6,this.loadAccessState();case 6:this.pryvService.setServiceInfo(this.accessState.serviceInfo);case 7:return e.next=9,this.pryvService.info();case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"isAccessRequest",value:function(){return null!=this.pollUrl}},{key:"loadAccessState",value:function(){var e=c()(a.a.mark(function e(){var t;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.a.utils.superagent.get(this.pollUrl).set("accept","json");case 3:return t=e.sent,this.accessState=b.a.merge(this.accessState,t.body),null!=this.accessState.lang&&(this.language=this.accessState.lang),e.abrupt("return",this.accessState);case 9:throw e.prev=9,e.t0=e.catch(0),console.log(e.t0),new Error("Invalid data from Access server");case 13:case"end":return e.stop()}},e,this,[[0,9]])}));return function(){return e.apply(this,arguments)}}()},{key:"updateAccessState",value:function(){var e=c()(a.a.mark(function e(t){var r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.accessState&&this.accessState.returnURL&&(t.returnURL=this.accessState.returnURL),e.next=3,f.a.utils.superagent.post(this.pollUrl).send(t);case 3:return r=e.sent,this.accessState=b.a.merge(this.accessState,t),null!=this.accessState.lang&&(this.language=this.accessState.lang),e.abrupt("return",r.status);case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),k={name:"App",data:function(){return{title:"App-web-auth3",logoSrcUrl:null}},errorCaptured:function(e,t,r){alert("[Vue warn]: Unexpected error in "+r+":\n      "+e)},created:function(){var e=c()(a.a.mark(function e(){var t;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.ctx=new y(this.$route.query),e.next=3,this.ctx.init();case 3:return e.next=5,this.ctx.pryvService.assets();case 5:(t=e.sent).setAllDefaults(),this.logoSrcUrl=t.relativeURL(t._assets["app-web-auth3"].logo.url);case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},S={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[this._m(0),this._v(" "),t("v-app",[t("v-content",[t("v-container",[t("img",{attrs:{src:this.logoSrcUrl,height:"50px"}}),this._v(" "),t("router-view")],1)],1)],1)],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("head",[t("title",[this._v("Auth")]),this._v(" "),t("link",{attrs:{href:"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons",rel:"stylesheet"}})])}]};var _=r("VU/8")(k,S,!1,function(e){r("vYrD")},null,null).exports,A=r("/ocq"),E={props:{confirmation:{type:Boolean,default:!1},value:{type:String,default:""},label:{type:String,default:"Password"},id:{type:String,default:"password"}},data:function(){return{visiblePass:!1,repass:"",rules:{required:function(e){return!!e||"Password is required."}}}},computed:{matchPassword:function(){return this.value===this.repass||"Password confirmation does not match."}}},P={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("v-text-field",{attrs:{id:e.id,value:e.value,appendIcon:e.visiblePass?"lock_open":"lock",type:e.visiblePass?"text":"password",rules:[e.rules.required],label:e.label},on:{input:function(t){return e.$emit("input",t)},"click:append":function(){return e.visiblePass=!e.visiblePass}}}),e._v(" "),e.confirmation?r("v-text-field",{attrs:{id:e.id+"Confirmation",type:e.visiblePass?"text":"password",rules:[e.matchPassword],label:e.label+" confirmation"},model:{value:e.repass,callback:function(t){e.repass=t},expression:"repass"}}):e._e()],1)},staticRenderFns:[]},F=r("VU/8")(E,P,!1,null,null,null).exports,R={props:{errorMsg:{type:String,default:""},successMsg:{type:String,default:""}},computed:{alertMsg:function(){return this.successMsg.length>0?this.successMsg:this.errorMsg.length>0?this.errorMsg:""},alertType:function(){return this.successMsg.length>0?"success":"error"}}},q={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("v-divider",{staticClass:"mt-3 mb-2"}),this._v(" "),t("v-alert",{attrs:{value:this.alertMsg,type:this.alertType,transition:"scale-transition"}},[t("span",{domProps:{innerHTML:this._s(this.alertMsg)}})])],1)},staticRenderFns:[]},U=r("VU/8")(R,q,!1,null,null,null).exports,T=r("Gu7T"),C=r.n(T),I=function(){function e(t){u()(this,e),this.msg=this.parseError(t)}return p()(e,[{key:"parseError",value:function(e){if(console.error(e),"string"==typeof e)return"<b>"+e+"</b>";if(null==e||null==e.response||null==e.response.body)return"<b>"+this.unexpectedError()+"</b>";var t=e.response.body,r=t.error,s="<b>"+this.parseErrorData(r||t)+"</b>",n=r?r.body:t.errors;return s+=this.parseSubErrors(n),r&&r.data&&Array.isArray(r.data)&&(s+=this.parseValidationSubErrors(r.data)),s}},{key:"parseValidationSubErrors",value:function(e){var t="";return null!=e&&Array.isArray(e)&&e.forEach(function(e){t+="<br/>"+e.message}),t}},{key:"parseSubErrors",value:function(e){var t=this,r="";return null!=e&&Array.isArray(e)&&e.forEach(function(e){r+="<br/>"+t.parseErrorData(e)}),r}},{key:"parseErrorData",value:function(e){return e.detail||e.message||this.unexpectedError()}},{key:"unexpectedError",value:function(){return"Unexpected error"}}]),e}(),j=r("d7EF"),M=r.n(j);var $,D=function(e){var t=e.accessState.returnURL;if(null!=t&&"false"!==t&&t){if(t.endsWith("?")||(t+="?"),e.accessState.oaccessState){var r="";e.accessState.key&&(r="&code="+e.accessState.key),t+="state="+e.accessState.oaccessState+r+"&poll="+e.pollUrl}else{t+="prYvpoll="+e.pollUrl;var s=!0,n=!1,a=void 0;try{for(var i,c=Object.entries(e.accessState)[Symbol.iterator]();!(s=(i=c.next()).done);s=!0){var o=i.value,u=M()(o,2),l=u[0],p=u[1];"string"!=typeof p&&"number"!=typeof p||(t+="&prYv"+l+"="+p)}}catch(e){n=!0,a=e}finally{try{!s&&c.return&&c.return()}finally{if(n)throw a}}}location.href=t}else window.close()},V=($=c()(a.a.mark(function e(t){var r,s,n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.checkAppResult.mismatchingAccess){e.next=6;break}return e.next=3,t.pryvService.deleteAppAccess(t.user.username,t.user.personalToken,t.checkAppResult.mismatchingAccess.id);case 3:if(e.sent.id){e.next=6;break}throw new Error("Failed removing existing access");case 6:return r={permissions:t.checkAppResult.checkedPermissions,name:t.accessState.requestingAppId,type:"app"},["deviceName","token","expireAfter","clientData"].forEach(function(e){void 0!==t.accessState[e]&&(r[e]=t.accessState[e])}),e.next=10,t.pryvService.createAppAccess(t.user.username,t.user.personalToken,r);case 10:return s=e.sent,n={status:"ACCEPTED",apiEndpoint:t.pryvService.apiEndpointForSync(t.user.username,s.token),username:t.user.username,token:s.token},e.next=14,t.updateAccessState(n);case 14:D(t);case 15:case"end":return e.stop()}},e,this)})),function(e){return $.apply(this,arguments)}),z=function(){var e=c()(a.a.mark(function e(t){var r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.pryvService.getUsernameForEmail(t.user.username);case 2:return r=t.user.username=e.sent,e.next=5,t.pryvService.checkUsernameExistence(r);case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=c()(a.a.mark(function e(t,r,s){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(t);case 2:return e.next=4,t.pryvService.resetPassword(t.user.username,r,s,t.appId);case 4:case"end":return e.stop()}},e,this)}));return function(t,r,s){return e.apply(this,arguments)}}(),O=function(){var e=c()(a.a.mark(function e(t,r,s){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(t);case 2:return e.next=4,t.pryvService.changePassword(t.user.username,r,s,t.user.personalToken);case 4:case"end":return e.stop()}},e,this)}));return function(t,r,s){return e.apply(this,arguments)}}(),L=function(){var e=c()(a.a.mark(function e(t,r){var s,n,i;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s={},["requestingAppId","requestedPermissions","deviceName","token","expireAfter","clientData"].forEach(function(e){void 0!==t.accessState[e]&&(s[e]=t.accessState[e])}),e.next=4,t.pryvService.checkAppAccess(t.user.username,t.user.personalToken,s);case 4:if(null==(n=e.sent).matchingAccess){e.next=10;break}return i={status:"ACCEPTED",apiEndpoint:t.pryvService.apiEndpointForSync(t.user.username,n.matchingAccess.token),username:t.user.username,token:n.matchingAccess.token},e.next=9,t.updateAccessState(i);case 9:return e.abrupt("return",D(t));case 10:null!=n.checkedPermissions&&(t.accessState.requestedPermissions=n.checkedPermissions),t.checkAppResult=n,r();case 13:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),H=function(){var e=c()(a.a.mark(function e(t,r,s,n,i){var c,o;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=null,t.accessState&&(c=t.accessState.referer||t.accessState.requestingAppId),e.next=5,t.pryvService.createUser(r,t.user.username,s,n,i,t.language,t.appId,null,c);case 5:return o=e.sent,e.abrupt("return",o);case 7:case"end":return e.stop()}},e,this)}));return function(t,r,s,n,a){return e.apply(this,arguments)}}(),B=function(){var e=c()(a.a.mark(function e(t){var r,s;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.pryvService.getAvailableHostings();case 2:return r=e.sent,s=r.getSelection(),e.abrupt("return",s);case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=c()(a.a.mark(function e(t,r){var s,n,i,c;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.accessState||"NEED_SIGNIN"===t.accessState.status){e.next=2;break}return e.abrupt("return",D(t));case 2:return e.next=4,z(t);case 4:return s=t.user.username,e.prev=5,e.next=8,t.pryvService.loginWithThrow(s,r,t.appId);case 8:n=e.sent,t.user.personalToken=n.token||"",e.next=29;break;case 12:if(e.prev=12,e.t0=e.catch(5),null==e.t0.mfaToken){e.next=27;break}return i=e.t0.mfaToken,e.prev=16,e.next=19,t.pryvService.mfaChallenge(s,i);case 19:t.user.mfaToken=i||"",e.next=25;break;case 22:throw e.prev=22,e.t1=e.catch(16),new I("Failed to perform MFA challenge.");case 25:e.next=29;break;case 27:throw c=e.t0.message||"Failed to login.",new I(c);case 29:case"end":return e.stop()}},e,this,[[5,12],[16,22]])}));return function(t,r){return e.apply(this,arguments)}}(),Y=function(){var e=c()(a.a.mark(function e(t){var r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={status:"REFUSED",reasonId:"REFUSED_BY_USER",message:"The user refused to give access to the requested permissions"},e.prev=1,e.next=4,t.updateAccessState(r);case 4:return e.prev=4,D(t),e.finish(4);case 7:case"end":return e.stop()}},e,this,[[1,,4,7]])}));return function(t){return e.apply(this,arguments)}}(),W=function(){var e=c()(a.a.mark(function e(t){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(t);case 2:return e.next=4,t.pryvService.requestPasswordReset(t.user.username,t.appId);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),Z=function(){var e=c()(a.a.mark(function e(t){var r;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.pryvService.info();case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=c()(a.a.mark(function e(t,r){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.pryvService.mfaVerify(t.user.username,t.user.mfaToken,r);case 3:t.user.personalToken=e.sent,e.next=9;break;case 6:throw e.prev=6,e.t0=e.catch(0),new I("MFA verification failed.");case 9:case"end":return e.stop()}},e,this,[[0,6]])}));return function(t,r){return e.apply(this,arguments)}}();function Q(e,t){var r=this;return c()(a.a.mark(function s(){for(var n=arguments.length,i=Array(n),c=0;c<n;c++)i[c]=arguments[c];return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t.apply(void 0,[e].concat(C()(i)));case 3:return r.abrupt("return",r.sent);case 6:if(r.prev=6,r.t0=r.catch(0),!(r.t0 instanceof I)){r.next=12;break}throw r.t0;case 12:throw new I(r.t0);case 13:case"end":return r.stop()}},s,r,[[0,6]])}))}var X=function(e){return{acceptAccess:Q(e,V),resetPassword:Q(e,N),changePassword:Q(e,O),checkAccess:Q(e,L),createUser:Q(e,H),loadHostings:Q(e,B),login:Q(e,G),refuseAccess:Q(e,Y),requestResetPassword:Q(e,W),getServiceInfo:Q(e,Z),checkUsername:Q(e,z),mfaVerify:Q(e,J)}},K={components:{Password:F,Alerts:U},data:function(){return{password:"",email:"",hosting:"",hostingsSelection:[],newUser:null,submitting:!1,ctx:{},c:null,error:"",success:"",rules:{required:function(e){return!!e||"This field is required."}},validForm:!1}},created:function(){var e=c()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.ctx=new y(this.$route.query),e.next=3,this.ctx.init();case 3:this.c=X(this.ctx),this.c.loadHostings().then(this.initHostings).catch(this.showError);case 5:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),methods:{submit:function(){var e=this;if(this.$refs.form.validate()){this.submitting=!0,this.generateRandomEmailIfNeeded();var t="";this.hostingsSelection.forEach(function(r){r.value===e.hosting&&(t=r.availableCore)}),this.c.createUser(t,this.password,this.email,this.hosting).then(function(t){e.newUser=t,e.success="New user successfully created: "+t.username+".",e.ctx.isAccessRequest()||(location.href=e.ctx.pryvService.apiEndpointForSync(t.username))}).catch(this.showError).finally(function(){e.submitting=!1})}},clear:function(){this.$refs.form.reset()},initHostings:function(e){this.hostingsSelection=e,this.hostingsSelection.length>0&&(this.hosting=this.hostingsSelection[0].value)},showError:function(e){this.error=e.msg},generateRandomEmailIfNeeded:function(){(null==this.email||"string"==typeof this.email&&0===this.email.length)&&(this.email=function(e){for(var t="",r="abcdefghijklmnopqrstuvwxyz0123456789",s=r.length,n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*s));return t}(20)+"@pryv.io")}}};var ee={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("h1",[e._v("Register a new user")]),e._v(" "),null==e.newUser?r("v-form",{ref:"form",attrs:{id:"registerForm"},on:{submit:function(e){e.preventDefault()}},model:{value:e.validForm,callback:function(t){e.validForm=t},expression:"validForm"}},[r("v-text-field",{attrs:{id:"email",label:"E-mail",placeholder:"Optional (required for password reset)"},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}}),e._v(" "),r("v-text-field",{attrs:{id:"username",rules:[e.rules.required],label:"Username"},model:{value:e.ctx.user.username,callback:function(t){e.$set(e.ctx.user,"username",t)},expression:"ctx.user.username"}}),e._v(" "),r("Password",{attrs:{confirmation:!0},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}),e._v(" "),r("v-autocomplete",{attrs:{id:"hosting",items:e.hostingsSelection,rules:[e.rules.required],placeholder:"Choose hosting...",label:"Hosting"},model:{value:e.hosting,callback:function(t){e.hosting=t},expression:"hosting"}}),e._v(" "),r("v-btn",{attrs:{id:"submitButton",disabled:!e.validForm||e.submitting},on:{click:e.submit}},[e._v("Create")]),e._v(" "),r("v-btn",{attrs:{id:"clearButton"},on:{click:e.clear}},[e._v("Clear")]),e._v(" "),r("div",[e._v("\n      By registering you agree with our\n      "),r("a",{attrs:{target:"_blank",href:"https://pryv.com/terms-of-use/"}},[e._v("\n      terms of use")]),e._v(".\n    ")])],1):e._e(),e._v(" "),e.ctx.isAccessRequest()?r("div",[r("v-divider",{staticClass:"mt-3 mb-2"}),e._v(" "),r("router-link",{attrs:{to:{name:"Authorization"}}},[r("h3",[e._v("Go to Sign in")])])],1):e._e(),e._v(" "),r("Alerts",{attrs:{successMsg:e.success,errorMsg:e.error}})],1)},staticRenderFns:[]},te=r("VU/8")(K,ee,!1,null,null,null).exports,re={components:{Password:F,Alerts:U},props:{resetToken:{type:String,default:null}},data:function(){return{password:"",error:"",success:"",showForm:!0,submitting:!1,ctx:{},c:null,rules:{required:function(e){return!!e||"This field is required."}},validForm:!1}},computed:{pageTitle:function(){return this.resetToken?"Set a new password":"Reset password"},buttonText:function(){return this.resetToken?"Change password":"Request password reset"}},created:function(){var e=c()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.ctx=new y(this.$route.query),e.next=3,this.ctx.init();case 3:this.c=X(this.ctx);case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),methods:{submit:function(){var e=this;this.ctx.user.username=this.ctx.user.username.trim(),this.$refs.form.validate()&&(this.submitting=!0,null==this.resetToken?this.c.requestResetPassword().then(function(){e.showForm=!1,e.success="We have sent password reset instructions to your e-mail address."}).catch(this.showError).finally(function(){e.submitting=!1}):this.c.resetPassword(this.password,this.resetToken).then(function(){e.showForm=!1,e.success="Your password have been successfully changed."}).catch(this.showError).finally(function(){e.submitting=!1}))},showError:function(e){this.error=e.msg}}},se={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("h1",[e._v(e._s(e.pageTitle))]),e._v(" "),e.showForm?r("v-form",{ref:"form",on:{submit:function(e){e.preventDefault()}},model:{value:e.validForm,callback:function(t){e.validForm=t},expression:"validForm"}},[r("v-text-field",{attrs:{id:"usernameOrEmail",rules:[e.rules.required],label:"Username or email"},model:{value:e.ctx.user.username,callback:function(t){e.$set(e.ctx.user,"username",t)},expression:"ctx.user.username"}}),e._v(" "),null!=e.resetToken?r("Password",{attrs:{confirmation:!0},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}):e._e(),e._v(" "),r("v-btn",{attrs:{id:"submitButton",disabled:!e.validForm||e.submitting},on:{click:e.submit}},[e._v(e._s(e.buttonText))])],1):e._e(),e._v(" "),e.ctx.isAccessRequest()?r("div",[r("v-divider",{staticClass:"mt-3 mb-2"}),e._v(" "),r("router-link",{attrs:{to:{name:"Authorization"}}},[r("h3",[e._v("Go to Sign in")])])],1):e._e(),e._v(" "),r("Alerts",{attrs:{successMsg:e.success,errorMsg:e.error}})],1)},staticRenderFns:[]},ne=r("VU/8")(re,se,!1,null,null,null).exports,ae=r("xt7F"),ie={props:{ctx:{type:Object,default:function(){}}},data:function(){return{dialog:!0,accessState:null,checkAppResult:null}},computed:{consentMsg:function(){if(null!=this.ctx.accessState.clientData){var e=this.ctx.accessState.clientData["app-web-auth:description"];return null!=e?ae.marked.parse(e.content):""}},accessMismatch:function(){return null!=this.ctx.checkAppResult.mismatchingAccess},expire:function(){return null!=this.ctx.accessState.expireAfter}},created:function(){this.accessState=this.ctx.accessState,this.checkAppResult=this.ctx.checkAppResult},methods:{closeDialog:function(e){this.dialog=!1,this.$emit(e)}}},ce={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-dialog",{attrs:{width:"600",persistent:""},model:{value:e.dialog,callback:function(t){e.dialog=t},expression:"dialog"}},[r("v-card",[r("v-card-title",{staticClass:"headline grey lighten-2",attrs:{id:"appIdText"}},[r("span",[r("b",[e._v(e._s(e.accessState.requestingAppId))])])]),e._v(" "),r("v-card-text",{staticStyle:{"text-align":"left"}},[r("h4",[e._v("Is requesting permission:")]),e._v(" "),r("ul",e._l(e.accessState.requestedPermissions,function(t,s){return r("li",{key:s},[e._v("\n          to "+e._s(t.level.toLowerCase())+" "),r("u",[e._v(e._s("*"===t.streamId?"* (all data)":t.name||t.defaultName))])])}),0),e._v(" "),e.expire?r("span",{staticStyle:{"text-align":"left"}},[r("b",[e._v("will expire after:")]),e._v(" "+e._s(e.accessState.expireAfter)+"s\n      ")]):e._e(),e._v(" "),r("br"),e._v(" "),e.consentMsg?r("span",{domProps:{innerHTML:e._s(e.consentMsg)}}):e._e()]),e._v(" "),e.accessMismatch?r("v-alert",{staticStyle:{"text-align":"left"},attrs:{value:e.accessMismatch,type:e.alertType,transition:"scale-transition"}},[r("b",[e._v("A different access was already given to this app. Do you want to replace it?")])]):e._e(),e._v(" "),r("v-divider"),e._v(" "),r("v-card-actions",[r("v-spacer"),e._v(" "),r("v-btn",{attrs:{id:"refusePermissions"},on:{click:function(t){return e.closeDialog("refused")}}},[e._v("Reject")]),e._v(" "),r("v-btn",{attrs:{id:"acceptPermissions"},on:{click:function(t){return e.closeDialog("accepted")}}},[e._v("Accept")])],1)],1)],1)},staticRenderFns:[]},oe={components:{Password:F,Permissions:r("VU/8")(ie,ce,!1,null,null,null).exports,Alerts:U},data:function(){return{password:"",personalToken:"",mfaToken:"",mfaCode:"",error:"",checkedPermissions:null,checkAppResult:null,serviceInfos:{},submitting:!1,c:null,ctx:{},rules:{required:function(e){return!!e||"This field is required."},email:function(e){return/.+@.+/.test(e)||"E-mail must be valid"}},validForm:!1}},computed:{mfaActivated:{get:function(){return""!==this.ctx.user.mfaToken}}},created:function(){var e=c()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.ctx=new y(this.$route.query),e.next=3,this.ctx.init();case 3:this.c=X(this.ctx),this.c.getServiceInfo().then(this.showInfos).catch(this.showError);case 5:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),methods:{submit:function(){var e=c()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.ctx.user.username=this.ctx.user.username.trim(),!this.$refs.form.validate()){e.next=19;break}return this.submitting=!0,e.prev=3,e.next=6,this.c.login(this.password);case 6:if(this.ctx.accessState){e.next=8;break}throw new Error('Context access state not defined. Verify that you are performing an Auth request process and either "poll" is specified in query parameters.');case 8:if(this.mfaActivated){e.next=11;break}return e.next=11,this.c.checkAccess(this.showPermissions);case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),this.showError(e.t0);case 16:return e.prev=16,this.submitting=!1,e.finish(16);case 19:case"end":return e.stop()}},e,this,[[3,13,16,19]])}));return function(){return e.apply(this,arguments)}}(),handleMFA:function(){var e=c()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.c.mfaVerify(this.mfaCode);case 3:return e.next=5,this.c.checkAccess(this.showPermissions);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),this.showError(e.t0);case 10:return e.prev=10,this.ctx.user.mfaToken="",e.finish(10);case 13:case"end":return e.stop()}},e,this,[[0,7,10,13]])}));return function(){return e.apply(this,arguments)}}(),showPermissions:function(){this.checkAppResult=this.ctx.checkAppResult,this.checkedPermissions=this.ctx.checkedPermissions},accept:function(){this.c.acceptAccess().catch(this.showError)},refuse:function(){this.c.refuseAccess().catch(this.showError)},showError:function(e){this.error=e.msg||e.message},showInfos:function(e){this.serviceInfos=e}}},ue={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("h1",[e._v("Sign in")]),e._v(" "),null!=e.ctx.checkAppResult.checkedPermissions?r("Permissions",{attrs:{ctx:e.ctx},on:{accepted:e.accept,refused:e.refuse}}):e._e(),e._v(" "),r("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:e.mfaActivated,callback:function(t){e.mfaActivated=t},expression:"mfaActivated"}},[r("v-card",[r("v-card-title",{staticClass:"headline grey lighten-2"},[e._v("MFA verification")]),e._v(" "),r("v-text-field",{staticClass:"ma-3",attrs:{id:"mfaCode",rules:[e.rules.required],label:"MFA code"},model:{value:e.mfaCode,callback:function(t){e.mfaCode=t},expression:"mfaCode"}}),e._v(" "),r("v-card-actions",[r("v-spacer"),e._v(" "),r("v-btn",{on:{click:function(t){e.ctx.user.mfaToken="",e.mfaCode=""}}},[e._v("Cancel")]),e._v(" "),r("v-btn",{on:{click:function(t){return e.handleMFA()}}},[e._v("Ok")])],1)],1)],1),e._v(" "),r("v-form",{ref:"form",on:{submit:function(e){e.preventDefault()}},model:{value:e.validForm,callback:function(t){e.validForm=t},expression:"validForm"}},[r("v-text-field",{attrs:{id:"usernameOrEmail",rules:[e.rules.required],label:"Username or email"},model:{value:e.ctx.user.username,callback:function(t){e.$set(e.ctx.user,"username",t)},expression:"ctx.user.username"}}),e._v(" "),r("Password",{model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}),e._v(" "),r("v-btn",{attrs:{id:"submitButton",disabled:!e.validForm||e.submitting},on:{click:e.submit}},[e._v("Sign In")]),e._v(" "),r("v-btn",{on:{click:e.refuse}},[e._v("Cancel")]),e._v(" "),e.serviceInfos.support?r("div",[e._v("\n      Feel free to reach our\n      "),r("a",{attrs:{href:e.serviceInfos.support,target:"_blank"}},[e._v(" helpdesk")]),e._v("\n      if you have questions.\n    ")]):e._e()],1),e._v(" "),r("v-divider",{staticClass:"mt-3 mb-2"}),e._v(" "),r("router-link",{attrs:{to:{name:"RegisterUser"}}},[r("h3",[e._v("Create an account")])]),e._v(" "),r("router-link",{attrs:{to:{name:"ResetPassword"}}},[r("h3",[e._v("Forgot password")])]),e._v(" "),r("router-link",{attrs:{to:{name:"ChangePassword"}}},[r("h3",[e._v("Change password")])]),e._v(" "),r("Alerts",{attrs:{errorMsg:e.error}})],1)},staticRenderFns:[]},le=r("VU/8")(oe,ue,!1,null,null,null).exports,pe={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("404 - Page not found")]),this._v("\n  The page you are looking for is like time in quantum gravity theories, it does not exist.\n")])}]},he=r("VU/8")(null,pe,!1,null,null,null).exports,fe={components:{Alerts:U},data:function(){return{username:"",error:"",ctx:{},c:null,rules:{required:function(e){return!!e||"This field is required."}},validForm:!1,serviceInfo:{name:""}}},created:function(){var e=c()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.ctx=new y(this.$route.query),e.next=3,this.ctx.init();case 3:return this.c=X(this.ctx),e.next=6,this.ctx.pryvService.info();case 6:this.serviceInfo=e.sent;case 7:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),methods:{submit:function(){this.ctx.user.username=this.ctx.user.username.trim(),this.$refs.form.validate()&&this.c.checkUsername().then(this.toMyPryv).catch(this.showError)},toMyPryv:function(){location.href=this.ctx.pryvService.apiEndpointForSync(this.ctx.user.username)},showError:function(e){this.error=e.msg}}},de={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("h1",[e._v("Signin hub")]),e._v(" "),r("v-form",{ref:"form",on:{submit:function(e){e.preventDefault()}},model:{value:e.validForm,callback:function(t){e.validForm=t},expression:"validForm"}},[r("v-text-field",{attrs:{id:"usernameOrEmail",rules:[e.rules.required],label:"Username or email"},model:{value:e.ctx.user.username,callback:function(t){e.$set(e.ctx.user,"username",t)},expression:"ctx.user.username"}}),e._v(" "),r("v-btn",{attrs:{id:"submitButton",disabled:!e.validForm},on:{click:e.submit}},[e._v("Go to my homepage")])],1),e._v(" "),r("v-divider",{staticClass:"mt-3 mb-2"}),e._v(" "),r("router-link",{attrs:{to:{name:"RegisterUser"}}},[r("h3",[e._v("New to "+e._s(e.serviceInfo.name)+" ? Create an account")])]),e._v(" "),r("Alerts",{attrs:{errorMsg:e.error}})],1)},staticRenderFns:[]},ve=r("VU/8")(fe,de,!1,null,null,null).exports,me={components:{Password:F,Alerts:U},data:function(){return{showForm:!0,oldPassword:"",newPassword:"",error:"",success:"",submitting:!1,ctx:{},controllerFactory:null,rules:{required:function(e){return!!e||"This field is required."}},validForm:!1}},created:function(){var e=c()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.ctx=new y(this.$route.query),e.next=3,this.ctx.init();case 3:this.controllerFactory=X(this.ctx);case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),methods:{submit:function(){var e=this;this.ctx.user.username=this.ctx.user.username.trim(),this.$refs.form.validate()&&(this.submitting=!0,this.controllerFactory.login(this.oldPassword).then(function(){return e.controllerFactory.changePassword(e.oldPassword,e.newPassword)}).then(function(){e.showForm=!1,e.success="Your password has been successfully changed."}).catch(this.showError).finally(function(){e.submitting=!1}))},showError:function(e){this.error=e.msg}}},ge={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("h1",[e._v("Change password")]),e._v(" "),e.showForm?r("v-form",{ref:"form",on:{submit:function(e){e.preventDefault()}},model:{value:e.validForm,callback:function(t){e.validForm=t},expression:"validForm"}},[r("v-text-field",{attrs:{id:"usernameOrEmail",rules:[e.rules.required],label:"Username or email"},model:{value:e.ctx.user.username,callback:function(t){e.$set(e.ctx.user,"username",t)},expression:"ctx.user.username"}}),e._v(" "),r("Password",{attrs:{confirmation:!1,id:"oldPassword"},model:{value:e.oldPassword,callback:function(t){e.oldPassword=t},expression:"oldPassword"}}),e._v(" "),r("Password",{attrs:{confirmation:!0,label:"New password",id:"newPassword"},model:{value:e.newPassword,callback:function(t){e.newPassword=t},expression:"newPassword"}}),e._v(" "),r("v-btn",{attrs:{id:"submitButton",disabled:!e.validForm||e.submitting},on:{click:e.submit}},[e._v("REQUEST PASSWORD CHANGE")])],1):e._e(),e._v(" "),r("Alerts",{attrs:{successMsg:e.success,errorMsg:e.error}})],1)},staticRenderFns:[]},we=r("VU/8")(me,ge,!1,null,null,null).exports,xe=r("4lvf"),be=r.n(xe);s.default.use(A.a);var ye=new URL(document.location).pathname,ke=ye.substring(0,ye.lastIndexOf("/access/"))+"/"+be.a.basePath,Se=new A.a({mode:"history",base:ke,routes:[{path:"/",redirect:{name:"Authorization"}},{path:"/auth",name:"Authorization",component:le,alias:be.a.pages.auth},{path:"/register",name:"RegisterUser",component:te,alias:be.a.pages.register},{path:"/reset",name:"ResetPassword",component:ne,props:function(e){return{resetToken:e.query.resetToken}},alias:be.a.pages.reset},{path:"/signin",name:"SigninHub",component:ve,alias:be.a.pages.signin},{path:"/change-password",name:"ChangePassword",component:we,alias:be.a.pages.changepass},{path:"*",component:he}]});function _e(e){return!!Object.keys(e.query).length}Se.beforeEach(function(e,t,r){!_e(e)&&_e(t)?r({name:e.name,query:t.query}):r()});var Ae=Se,Ee=r("3EgV"),Pe=r.n(Ee);r("7zck");s.default.use(Pe.a),s.default.config.productionTip=!1,new s.default({el:"#app",router:Ae,components:{App:_},template:"<App/>"})},Zthf:function(e,t){e.exports={DNSLess:!0}},kGJU:function(e,t){e.exports={name:"pryv",version:"2.1.4",homepage:"https://github.com/pryv/lib-js",description:"Pryv Javascript Library",keywords:["Pryv"],repository:{type:"git",url:"git://github.com/pryv/lib-js"},bugs:{url:"https://github.com/pryv/lib-js/issues"},author:{name:"Pryv S.A."},main:"src/index.js",license:"BSD-3-Clause",scripts:{setup:"./scripts/setup-environment-dev.sh",build:"webpack --config webpack.config.js",doc:"node node_modules/jsdoc/jsdoc.js -c .jsdoc-conf.json",test:"mocha --reporter spec  test/**/*.test.js --timeout 3000","test-debug":"mocha --inpect-brk=40000 --reporter spec  test/**/*.test.js ","test:browser":"npm run build; ",cover:"nyc npm run test && npm run cover:report","cover:report":"nyc report --reporter=lcov --reporter=html",webserver:"./node_modules/.bin/rec-la ./dist 9443","gh-pages":"./scripts/upload.sh",clear:"rm -r dist/ && npm run setup"},contributors:[{name:"Pierre-Mikael Legris",email:"perki@pryv.com"}],dependencies:{superagent:"^5.2.2"},devDependencies:{"@pryv/lib-js-common":"git+https://github.com/pryv/lib-js-common.git#1.0.2","@pryv/monitor":"^1.0.2","@pryv/socket.io":"^1.0.2",chai:"^4.2.0","chai-as-promised":"^7.1.1",cuid:"^2.1.8",jsdoc:"^3.6.6",mocha:"^6.2.3","node-fetch":"^2.6.0",nyc:"^14.1.1","rec-la":"latest","universal-url":"^2.0.0",zombie:"^6.1.4"}}},vYrD:function(e,t){}},["NHnr"]);
//# sourceMappingURL=app.3577262b24e5e1324efd.js.map