");!a&&t&&(a=t.message||t.statusText||"Unknown Error"),o(a,n,"error")}},clearMessage:n}}(),te=function(e,t,o,n){var a=document.getElementById("BFS"),r={brandContainer:document.getElementById("brand-container"),loading:document.getElementById("curtain-spinner"),loginContainer:document.getElementById("login-container"),emailInput:document.querySelector("#basic-login-form input"),codeInput:document.getElementsByName("code")[0],emailInputForgotPassword:document.querySelector("#forgot-password input"),emailInputForgotSubdomain:document.querySelector("#forgot-subdomain input"),footer:document.getElementsByClassName("footer")[0],app:document.getElementById("bento"),fedWarning:document.getElementById("fed-warning-placeholder")},i={loginForm:document.getElementById("basic-login-form"),mfaForm:document.getElementById("mfa-verification"),forgotPasswordForm:document.getElementById("forgot-password"),forgotSubdomainForm:document.getElementById("forgot-subdomain"),transferSubdomainForm:document.getElementById("transfer-subdomain")},s=U(e,t);function d(){r.loginContainer.classList.add("show-login"),a.style.display="block"}function c(){var e=r.emailInputForgotPassword;e&&(e.value=r.emailInput.value||I("forgotPassword")),d(),g(),m(i.forgotPasswordForm),r.emailInputForgotPassword.focus()}function l(){var e=r.emailInputForgotSubdomain;e&&(e.value=r.emailInput.value||I("forgotSubdomain")),d(),g(),m(i.forgotSubdomainForm),r.emailInputForgotSubdomain.focus()}function u(){d(),g(),m(i.transferSubdomainForm)}function m(e){r.brandContainer.insertAdjacentElement("afterend",e)}function g(){Object.keys(i).forEach((e=>{i[e].remove()}))}return{showLoading:function(){y("showLoading"),e.startProgress(),r.loginContainer.classList.remove("show-login"),a.style.display="block"},showLoginForm:function({showSamlLogin:e=!0}={}){var o;performance.mark("LOGIN_VIEW_SHOWN_MARK"),d(),g(),o=!!/[?&]fed=/.test(document.location.href),(document.location.hostname.endsWith(".fed.sumologic.com")||o)&&(r.fedWarning.innerHTML='
Use of this System is for Authorized purposes only
- You are accessing a U.S. Government Information System.
- System usage may be monitored, recorded, and subject to audit.
- Unauthorized use of the information system is prohibited and subject to criminal and civil penalties.
- Use of the System indicates consent to monitoring and recording.
Information on or transmitted by this system may contain controlled unclassified information (CUI) and, as such should be considered and treated as non-public information.
'),i.loginForm.setAttribute("autocomplete","off"),m(i.loginForm),r.emailInput.focus(),e&&n(t)},showForgotPassword:c,showForgotSubdomain:l,showTransferSubdomain:u,showMfaForm:function(e,t){y("response",arguments),d(),g(),s.handleMfa(e,(function(){m(i.mfaForm),r.codeInput.focus()}),t)},swapToApp:function(){s.removeListeners(),o.removeListeners(),window.removeEventListener("hashchange",j),r.loginContainer.classList.remove("show-login"),a.remove(),r.loading.remove()},swapToForms:function(){I("forgotPassword")?c():I("forgotSubdomain")?l():I("transfer-subdomain")?u():j()},removeAllForms:g,setLoginCurtain:function(e){r.loginContainer.classList[e?"add":"remove"]("show-login-curtain")},isLoginFormVisible:function(){return"block"===window.getComputedStyle(a).display&&r.loginContainer.classList.contains("show-login")}}}(Q,ee,X,Z.initiateSamlConfig),oe=function(e,n){var a=document.getElementById("prefetch-container"),r=document.head,i=document.createElement("div"),s={img:{},script:{async:!1,type:"text/javascript",defer:!0},link:{rel:"stylesheet",type:"text/css",charset:"utf-8"}};function d(e,t,o){e.forEach((e=>{var n=document.createElement(t);n["link"===t?"href":"src"]=e;var a=Object.assign(s[t],o||{});Object.keys(a).forEach((e=>{n[e]=a[e]})),(n&&n.type&&"text/css"===n.type.toLowerCase()?r:i).appendChild(n)}))}return{schedulePrefetching:function(){("hidden"===document.visibilityState?setTimeout:requestAnimationFrame)((()=>{d(t,"script",{onload:function(){e.increaseLoadCounter("script"),e.hasFinishLoading()&&(window.bfsScriptsLoaded=!0,window.shouldDelayLoad?y("finished loading...bootstrapping delayed because shouldDelayLoad is true"):(y("finished loading...bootstrapping bento"),setTimeout(n.swapToApp,f)))},onerror:function(){n.swapToForms(),ee.handleReason("pageLoadError",document.getElementById("login-messages"));for(let e of document.querySelectorAll('button[type="submit"]'))e.disabled=!0}}),d(o,"link",{onload:function(){e.increaseLoadCounter("style"),e.hasFinishLoading()&&!window.shouldDelayLoad&&(y("finished loading...bootstrapping bento"),setTimeout(n.swapToApp,f))}}),a.appendChild(i)}))}}}(Q,te),ne=function(e){const t=document.getElementById("login-messages");function o(){return function(e){if(!e)return null;const t=new URL(e,location.origin);return t.origin!==location.origin?null:(t.pathname.startsWith("/log-search")&&"true"===t.searchParams.get("run")&&t.searchParams.delete("run"),t.href)}(decodeURIComponent(I("next")))}function n(o=""){e.setLoginCurtain(!1),e.showLoginForm(),ee.handleReason(o,t)}function a(e){if(e.error)n("sessionGenericError");else{const e=o();e&&(window.location.href=e)}}function r(e){L&&"string"==typeof e&&"unauthorized"===e.toLowerCase()?(n("sessionInvalidError"),x("ASID","",-1)):n("sessionNetworkError")}return{getSanitizedRedirectURL:o,verifyAsidAndRedirect:function(){L||(L=M()),L?(window.shouldDelayLoad=!0,e.setLoginCurtain(!0),T("/json/v1/authentication/user",{method:"GET"}).then(a).catch(r)):ee.handleReason("noAsid",t)}}}(te),ae=function(e,t,o,n,a){var r=document.querySelector(".signin-button"),i=document.getElementById("login-messages"),s=!1,d=void 0,c=n.getSamlState;function l(){s=!1,e.enableButton(r,"Sign in")}function u(){window.shouldDelayLoad=!1,e.hasFinishLoading()?(window.loadApp&&window.loadApp(),t.swapToApp()):e.startProgress()}function f(){clearTimeout(d),L&&x("ASID",L,3e5),localStorage.setItem("ui.justLoggedIn","true"),le&&le.checkExternalLogin()?le.loadExternalService():a&&a.getSanitizedRedirectURL()?a.verifyAsidAndRedirect():(v&&function(){L||(L=M()),window.sumoEarlyApiCalls={auth:T("/json/v1/authentication/user",{method:"GET"}),userSettings:T("/json/v1/userSettings/get",{method:"POST",body:JSON.stringify({userSettingsList:[]})}),accountStatus:T("/api/v1/account/status",{method:"GET"}).then((e=>m(this,[e],(function*({applicationUse:e,canUpdatePlan:t,planExpirationDays:o,planType:n,pricingModel:a,totalCredits:r}){let i,s;if("credits"===a)i=t&&("Trial"===n||"Free"===n),s=t?"SelfService":"RequestUpgrade";else{const{upgradeButton:e,upgradePage:t}=yield N();i=e,s=t}return{accountStatusInfo:{applicationUse:e,canUpdatePlan:t,planExpirationDays:o,planType:n,pricingModel:a,totalCredits:r=void 0!==r?r:-1},upgradeButton:i,upgradePage:s}})))),upgradePageKnob:N(),passwordPolicy:T("/api/v1/passwordPolicy",{method:"GET"}).then((e=>(e=>{const t={mustContainSpecialChars:"mustContainSpecial",maxPasswordAgeInDays:"passwordExpiresAfterNDays",minUniquePasswords:"cannotReuseNOldPasswords",accountLockoutThreshold:"numberFailedLoginsAllowed",failedLoginResetDurationInMins:"failedLoginTimeWindowMinutes",accountLockoutDurationInMins:"accountLockoutMinutes"},o=e=>t[e]||e,n={};for(const t in e)n[o(t)]=e[t];return n})(e)))}}(),u())}function p(n){if(L=n.apiSessionId||"")if(localStorage.removeItem("ui.2fa.setup"),n.mfaStatus)if("REQUIRES_VALIDATION"===n.mfaStatus)e.cancelProgress(),t.showMfaForm(n,f);else{localStorage.setItem("ui.2fa.setup","true");try{var a=JSON.stringify({asid:(r=n).apiSessionId,canRememberMfa:r.canRememberMfa,mfa_status:r.mfaStatus,qrUrl:r.qrUrl});localStorage.setItem("ui.2fa.params",a)}catch(e){}f()}else f();else(function(e){var t=!1;if("auth1:redirect_to_other_deployment"===e.errorKey){var o=(e.keyedErrors||[])[0]||{},n=o.values&&o.values.tryAt||"",a=(document.querySelector("input[name=email]").value||"").trim(),r=(document.querySelector("input[name=password]").value||"").trim();if(n){y("Redirecting to ["+n+"] with "+a);var i=w("form",{action:n+"/json/v1/authentication/redirectedloginwithcredentials",method:"POST",target:"_top",style:"display: none;",autocomplete:"off"});i.appendChild(w("input",{name:"email",value:a,type:"hidden"})),i.appendChild(w("input",{name:"password",value:r,type:"hidden"}));var s=I("return_to"),d=function(e){var t=I("provider"),o=e.includes("sumologic")||e.includes("zendesk");return{aha:"aha",salesforce:"salesforce",mindtouch:"mindtouch",talentlms:"talentlms",skilljar:"skilljar"}[t]||(o?"zendesk":"")}(s),c=I("SAMLRequest"),l=I("RelayState");d?(i.appendChild(w("input",{name:"provider",value:d,type:"hidden"})),c&&(i.appendChild(w("input",{name:"SAMLRequest",value:c,type:"hidden"})),i.appendChild(w("input",{name:"RelayState",value:l,type:"hidden"}))),s&&i.appendChild(w("input",{name:"return_to",value:s,type:"hidden"}))):(i.appendChild(w("input",{name:"provider",value:"redirected_login",type:"hidden"})),i.appendChild(w("input",{name:"return_to",value:encodeURIComponent(n+location.href.substring(location.origin.length)),type:"hidden"}))),document.body.appendChild(i),i.submit(),t=!0}}return t})(n)||(l(),n.keyedErrors=n.keyedErrors.map((e=>{var t=e.key;"auth1:login_failed"===t&&("LOCKDOWN"===c()?t="auth1:login_failed_with_saml_lockdown":"ENABLED"===c()&&(t="auth1:login_failed_with_saml"));var o=Object.assign({},e);return o.key=t,o})),o.handleErrors(n,i));var r}function h(e){l(),o.handleErrors(e,i)}return function e(){const t=!(!g||Object.keys(localStorage).filter((e=>e.startsWith(R))).some((e=>"true"===localStorage.getItem(e))))||"visible"===document.visibilityState;!L&&D()&&t?f():(clearTimeout(d),d=setTimeout(e,500))}(),{doLogin:function(t){performance.mark("app_login_manual_attempt"),t.preventDefault(),t.stopPropagation(),o.clearMessage(i);var n=(document.querySelector("input[name=email]").value||"").trim(),a=(document.querySelector("input[name=password]").value||"").trim();if(n&&a&&!s){s=!0,e.disableButton(r);var d=(location.href.match(/[?&]customerId=([^]*)/i)||[])[1];T("/json/v1/authentication/loginwithcredentials",{method:"POST",body:JSON.stringify({email:n,password:a,customerId:d})}).then(p).catch(h)}},doFastMfa:function(){var e;try{var o=JSON.parse(localStorage.getItem("mfa.redirected.params"));if(o.canRememberMfa="true"===(null==(e=o.canRememberMfa)?void 0:e.toLowerCase()),localStorage.removeItem("mfa.redirected.params"),L=o.asid,"REQUIRES_SETUP"===o.mfa_status){var n=JSON.stringify(o);localStorage.setItem("ui.2fa.setup","true"),localStorage.setItem("ui.2fa.params",n),f()}else t.showMfaForm({apiSessionId:L,canRememberMfa:o.canRememberMfa},f)}catch(e){localStorage.removeItem("mfa.redirected.params"),t.swapToForms()}},submitRoute:function(e){document.location.hash="/"+e},handleUrlReasons:function(){var e=I("reason");o.handleReason(e,i,!1)},startProgressOrLoad:u}}(Q,te,ee,Z,ne),re=function(e,t,o){var n=document.querySelector("#forgot-password-form"),a=document.querySelector("#forgot-password-success"),r=document.getElementById("forgot-password-messages"),i=document.getElementById("forgot-password-submit"),s=document.querySelector("#forgot-password input[name=email]");function d(){e.enableButton(i,"Send Link")}function c(e){d();var t=e&&e.errors&&e.errors[0]||e.keyedErrors[0]||{};o.handleErrors(t,r)}function l(t){o.handleErrors("",r);var l=(s&&s.value||t||"").trim();l&&_(l)?(e.disableButton(i),T(`../json/v1/authentication/requestpasswordreset?email=${encodeURIComponent(l)}`,{method:"GET"}).then((e=>{e.error?c(e):function(e){if(d(),e.success)n.setAttribute("style","display: none;"),a.setAttribute("style","display: block;");else{var t=e.redirectedUrl||"";if(""!==t.trim()){var o=(s&&s.value||"").trim();y("ForgotPassword redirecting to "+t),document.location.assign(t+"/ui/?forgotPassword="+encodeURIComponent(o))}}}(e)})).catch(c)):o.handleErrors({message:"Please enter a valid email."},r,!0)}return{sendForgotPasswordLink:l,checkInitialTasks:function(){var e=I("forgotPassword").trim();e&&l(e)}}}(Q,0,ee),ie=function(e,t,o){var n=document.querySelector("#forgot-subdomain-form"),a=document.querySelector("#forgot-subdomain-success"),r=document.getElementById("forgot-subdomain-messages"),i=document.getElementById("forgot-subdomain-submit"),s=document.querySelector("#forgot-subdomain input[name=email]");function d(){e.enableButton(i,"Send Me My Subdomain")}function c(){d(),n.setAttribute("style","display: none;"),a.setAttribute("style","display: block;")}function l(e){d();var t=e&&e.errors&&e.errors[0]||{};o.handleErrors(t,r)}function u(t){o.handleErrors("",r);var n=(s&&s.value||t||"").trim();n&&_(n)?(e.disableButton(i),T(`../api/v1/account/subdomain/recover?email=${encodeURIComponent(n)}`,{method:"POST"}).then(c).catch(l)):o.handleErrors({message:"Please enter a valid email."},r,!0)}return{sendForgotSubdomainLink:u,checkInitialTasks:function(){var e=I("forgotSubdomain").trim();e&&u(e)}}}(Q,0,ee),se=(H=Q,q=ee,z=document.getElementById("transfer-subdomain-messages"),W=document.getElementById("transfer-subdomain-submit"),Y=document.querySelector("input[name=organization]"),G=document.location,V=document.location.hash.startsWith("#/transfer-subdomain")||I("transfer-subdomain")?"":G.href.substring(G.origin.length),{verifySubdomainRedirect:function(e){q.handleErrors("",z);var t=(Y&&Y.value||e||"").trim().toLowerCase();t&&(H.disableButton(W),T(`../api/v1/account/subdomain/${t}/url`,{method:"GET"}).then((e=>{window.location=`${e.url}${V}`})).catch((()=>{q.handleErrors({message:"Please enter a valid organization name"},z),H.enableButton(W,"Continue")})))}}),de=function(){var e={default:{start:168266514e4,title:"Check out our recent updates to get more value out of Sumo Logic",buttonText:"What's new",buttonLink:"https://www.sumologic.com/whats-new/",supportTextRight:"",className:"default"}},t=Object.keys(e).map((t=>e[t])).filter((e=>e)),o=function(){var o,n=e[(document.location.href.match(/[?&]b=([^&]*)/)||[])[1]];if(!n){var a=t.filter(l),r=a.reduce(u,0),i={banner:void 0,remainingWeight:Math.random()*r};o=a.reduce(m,i).banner||e.default}return n||o}(),n=document.getElementById("footer-animation-container"),a=document.getElementById("footer-title"),r=document.getElementById("footer-description"),i=document.getElementById("footer-cta"),s=document.getElementById("footer-support-element__right"),d=document.getElementById("footer-support-text__right"),c=document.getElementById("copyright-text");function l(e){var t=Date.now();return!(e.start>=t||e.end<=t)}function u(e,t){return e+(t.weight||.5)}function m(e,t){return e.remainingWeight>0&&(e.remainingWeight-=t.weight||.5,e.banner=t),e}return a.innerHTML=o.title||"",r.innerHTML=o.description||"",i.innerHTML=o.buttonText||"",i.setAttribute("href",o.buttonLink||"#"),d.innerHTML=o.supportTextRight||"",s.innerHTML=o.supportElementRight||"",n.classList.add(o.className||""),{updateCurrentYear:function(){c.innerHTML="Copyright 2010 - "+(new Date).getFullYear()+" Sumo Logic Inc."}}}(),ce=(J={footer:document.getElementById("footer"),brandContainer:document.getElementById("brand-container"),improvedLogin:document.getElementById("BFS"),oneTimePasswordNotification:document.getElementById("one-time-password-notification")},K={hds:{name:"Hitachi Data Systems Corporation",logo:"images/app/partners/Hitachi_Logo.png"},esentire:{name:"eSentire Inc."},ackcent:{name:"Ackcent Cybersecurity"},expel:{name:"Expel"},gmsectec:{name:"GM Security Technologies"},securitycentric:{name:"Security Centric"},infosec:{name:"Infosec"},m87:{name:"M87"},criticalstart:{name:"Critical Start"}},"https://sumologic-test-app-library.s3-us-west-1.amazonaws.com/msp-assets+/logos/","https://sumologic-production-apps-library.s3-us-west-1.amazonaws.com/msp-assets/msp-logos/",{handlePartners:function(){var e=I("logo"),t=K[e];t&&(function(e){J.footer.setAttribute("info",e.name+" is a reseller of Sumo Logic SaaS solution.")}(t),function(e,t){var o=document.createElement("img");o.className="logo partner-logo",o.src=function(e,t){return e.logo||(document.location.host.startsWith("localhost")?"https://sumologic-test-app-library.s3-us-west-1.amazonaws.com/msp-assets+/logos/":"https://sumologic-production-apps-library.s3-us-west-1.amazonaws.com/msp-assets/msp-logos/")+t+"/logo.png"}(e,t),o.alt=e.name,J.brandContainer.appendChild(o)}(t,e),J.improvedLogin.classList.add("partner")),"aws"===I("integration")&&J.oneTimePasswordNotification.classList.remove("hidden")}}),le=function(e,t){var o=I("tenantName"),n=I("redirectUrl"),a=document.getElementById("login-messages"),r=I("integrationName")||function(e){const t={".portal.jask.ai":"cse",".incman.sumologic.com":"cloudSoar"};for(const o in t)if(e.indexOf(o)>-1)return t[o];return""}(n);function i(o="",n=3e3){e.setLoginCurtain(!1),e.showLoginForm({showSamlLogin:!1}),ee.handleReason(o,a);for(let e of document.querySelectorAll('button[type="submit"]'))t.disableButton(e);setTimeout((()=>{ae.startProgressOrLoad()}),n)}function s(e){e.error?i("redirectGenericError"):window.location.assign(e.returnURL)}function d(e){L&&"401"===e.status?i("redirectAuthenticationError",3500):i("redirectNetworkError")}return{checkExternalLogin:function(){return o&&n},loadExternalService:function(){L||(L=M()),L?(window.shouldDelayLoad=!0,e.setLoginCurtain(!0),T("/json/v1/authentication/"+("cse"===r?`generateCseJwt?tenantName=${o}&redirectUrl=${n}`:`generateJwt?integrationName=${r}&tenantName=${o}&redirectUrl=${n}`),{method:"GET"}).then(s).catch(d)):ee.handleReason("noAsid",a)}}}(te,Q);Q.shouldShowAnimation||document.getElementById("BFS").classList.add("no-animation");var ue=[oe.schedulePrefetching,de.updateCurrentYear],me={asid:I("asid"),mfa_status:I("mfa_status")||I("mfaStatus"),canRememberMfa:I("canRememberMfa")};if(B()){me.mfa_status?localStorage.setItem("mfa.redirected.params",JSON.stringify(me)):x("ASID",me.asid,3e5);const e=I("return_to");(function(e){try{const{protocol:t,origin:o}=new URL(e);return"https:"===t&&(o.endsWith(".sumologic.net")||o.endsWith(".sumologic.com")||o.endsWith(".prada-epd.nl")||o.endsWith(".ephemeral.in"))}catch(e){return!1}})(e)&&document.location.assign(e)}else A?(ue.unshift(te.removeAllForms),b.has("asid")&&!D()&&x("ASID",I("asid"),3e5),le.checkExternalLogin()?le.loadExternalService():te.showLoading()):/\/dashboard.html/.test(window.location.href)||/\/dashboards.html/.test(window.location.href)?(window.shouldDelayLoad=!0,T(`/json/v2/content/item/public/${I("k")}?contentType=dashboard`,{method:"GET"}).then((e=>{e.error?F():(te.removeAllForms(),te.showLoading(),window.shouldDelayLoad=!1,window.loadApp&&window.loadApp(),window.bfsScriptsLoaded&&te.swapToApp())})).catch((()=>{F()}))):(O&&localStorage.setItem("mfa.redirected.params",JSON.stringify(me)),F());if(window.onload=()=>{ue.forEach((e=>{"function"==typeof e&&e()}))},window.addEventListener("hashchange",j),window.doLogin=ae.doLogin,window.submitRoute=ae.submitRoute,window.sendForgotPasswordLink=re.sendForgotPasswordLink,window.sendForgotSubdomainLink=ie.sendForgotSubdomainLink,window.verifySubdomainRedirect=se.verifySubdomainRedirect,/localhost|nite/.test(location.host)){let e=function(t){window.$?$.logWarn(t):setTimeout((function(){e(t)}),1e3)};var ge=new RegExp(["cosmeticsrc.com","tribedone.org","js-cache"].join("|"));new PerformanceObserver((t=>{t.getEntries().forEach((t=>{if(ge.test(t.name)){var o=JSON.stringify({resource:t.name,jira:"SEC-1118852"});e(o)}}))})).observe({entryTypes:["resource"]})}window.addEventListener("visibilitychange",(()=>{!g||"visible"!==document.visibilityState||D()||te.isLoginFormVisible()||document.location.reload()}))}()}()