(()=>{"use strict";function e(e){const n=window.location.href;e=e.replace(/[\[\]]/g,"\\$&");const t=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(n);return t?t[2]?decodeURIComponent(t[2].replace(/\+/g," ")):"":null}function n(e,n,t){window.postMessage({command:"authResult",code:e,state:n,lastpass:t},window.location.origin);const o=("; "+document.cookie).split("; ssoHandOffMessage=").pop().split(";").shift();document.cookie="ssoHandOffMessage=;SameSite=strict;max-age=0";const c=document.getElementById("content");c.innerHTML="";const s=document.createElement("p");s.innerText=o,c.appendChild(s)}window.addEventListener("load",()=>{const t=e("code"),o=e("state");"1"===e("lp")?n(t,o,!0):null!=o&&o.includes(":clientId=browser")?n(t,o,!1):function(e,n){const t=window.location.href.replace(/\/sso-connector.html.*$/,""),o=function(e,n){const t=new RegExp(n).exec(e);if(!t)return null;return t[0]}(n,"(?<=_returnUri=')(.*)(?=')");window.location.href=o?t+`/#${o}`:t+"/#/sso?code="+e+"&state="+n}(t,o)})})();
//# sourceMappingURL=sso.c4950d48540f84f41e7b.js.map