(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-148cb4be"],{"0cb2":function(t,e,a){var n=a("e330"),o=a("7b0b"),r=Math.floor,i=n("".charAt),s=n("".replace),c=n("".slice),l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,a,n,p,h){var d=a+t.length,f=n.length,g=u;return void 0!==p&&(p=o(p),g=l),s(h,g,(function(o,s){var l;switch(i(s,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,a);case"'":return c(e,d);case"<":l=p[c(s,1,-1)];break;default:var u=+s;if(0===u)return o;if(u>f){var h=r(u/10);return 0===h?o:h<=f?void 0===n[h-1]?i(s,1):n[h-1]+i(s,1):o}l=n[u-1]}return void 0===l?"":l}))}},"44e7":function(t,e,a){var n=a("861d"),o=a("c6b6"),r=a("b622"),i=r("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},"5b81":function(t,e,a){"use strict";var n=a("23e7"),o=a("c65b"),r=a("e330"),i=a("1d80"),s=a("1626"),c=a("7234"),l=a("44e7"),u=a("577e"),p=a("dc4a"),h=a("90d8"),d=a("0cb2"),f=a("b622"),g=a("c430"),m=f("replace"),w=TypeError,v=r("".indexOf),C=r("".replace),b=r("".slice),x=Math.max,k=function(t,e,a){return a>t.length?-1:""===e?a:v(t,e,a)};n({target:"String",proto:!0},{replaceAll:function(t,e){var a,n,r,f,y,$,A,_,W,T=i(this),I=0,j=0,O="";if(!c(t)){if(a=l(t),a&&(n=u(i(h(t))),!~v(n,"g")))throw w("`.replaceAll` does not allow non-global regexes");if(r=p(t,m),r)return o(r,t,T,e);if(g&&a)return C(u(T),t,e)}f=u(T),y=u(t),$=s(e),$||(e=u(e)),A=y.length,_=x(1,A),I=k(f,y,0);while(-1!==I)W=$?u(e(y,I,f)):d(y,f,I,[],void 0,e),O+=b(f,j,I)+W,j=I+A,I=k(f,y,I+_);return j<f.length&&(O+=b(f,j)),O}})},6356:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("script",{attrs:{type:"application/javascript",src:"https://alcdn.msauth.net/browser/2.14.2/js/msal-browser.min.js"},on:{load:t.authLoaded}})])},o=[],r=(a("5b81"),a("be8c"),a("585f"),a("c6d8"),a("4a1f")),i=a.n(r);a("9225");i.a.current();var s={components:{},props:{teamsWrapper:Object},data:()=>({authConfig:{clientId:"5d1cde38-6b6f-4a7c-ab8a-12bb0d449c1d",redirectUri:window.location.origin+"/apps/teams-v2/auth/end-microsoft",cacheLocation:"localStorage",navigateToLoginRequestUrl:!1}}),methods:{async authLoaded(){this.tryCompleteFlow()},async tryCompleteFlow(){if(console.log("teams available in auth start",this.teamsWrapper,window.AuthenticationContext,this.teamsWrapper.teamsContext),this.teamsWrapper.microsoftTeams&&window.AuthenticationContext&&this.teamsWrapper.teamsContext){this.teamsContext.upn?this.authConfig.extraQueryParameters=`scope=${"email profile offline_access OpenId".replaceAll(",","+")}&login_hint=${encodeURIComponent(this.teamsContext.upn)}`:this.authConfig.extraQueryParameters="scope="+"email profile offline_access OpenId".replaceAll(",","+");let t=this;this.authConfig.displayCall=function(e){e&&(t.authConfig.extraQueryParameters&&(e+="&"+t.authConfig.extraQueryParameters),window.location.replace(e))},console.log("calling login ",window.AuthenticationContext,this.authConfig);let e=new window.AuthenticationContext(this.authConfig),a=e.getCachedUser();a&&a.userName!==this.teamsContext.upn&&e.clearCache();let n=e.getCachedToken(this.authConfig.clientId);n?this.teamsWrapper.microsoftTeams.authentication.notifySuccess():e.login()}}},computed:{},watch:{teamsWrapper(){this.tryCompleteFlow()},teamsWrapper(){console.log("teams available in auth start",window.AuthenticationContext,window.AuthenticationContext),this.tryCompleteFlow()}}},c=s,l=a("2877"),u=Object(l["a"])(c,n,o,!1,null,"014863c1",null);e["default"]=u.exports},"90d8":function(t,e,a){var n=a("c65b"),o=a("1a2d"),r=a("3a9b"),i=a("ad6d"),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||o(t,"flags")||!r(s,t)?e:n(i,t)}},ad6d:function(t,e,a){"use strict";var n=a("825a");t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},c6d8:function(t,e,a){"use strict";var n=a("dde5");a("b383");e["a"]={get(t){return n["a"].http.get("/v1.0/account/"+t)},linkSlack(t,e){return n["a"].http.post(`/v1.0/oauth/link-slack?code=${t}&scope=${e}`,{})},linkTeams(t,e){return n["a"].http.post(`/v1.0/oauth/link-teams?code=${t}&scope=${e}`,{})},createToken(){return n["a"].http.post("/v1.0/oauth/create-token",{})},createCookie(t){return n["a"].http.post("/v1.0/oauth/create-cookie",{id_token:t},this.getConfig(t))},login(t,e){return n["a"].http.post("/v1.0/oauth/login",{email:t,password:e,create_cookie:!1},{withCredentials:!1})},register(t,e,a){return n["a"].http.post("/v1.0/oauth/register",{email:t,password:e,display_name:a,create_cookie:!1},{withCredentials:!1})},getConfig(t){return{headers:{authorization:"Bearer "+t}}}}}}]);
//# sourceMappingURL=chunk-148cb4be.4efe0140.js.map