MSN

Posted by


MSN {n=!1,t=void 0}},o}var c=n(“xYH4″);const u=”currentaccount”,d=365,l={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1},p={edgeChromium:1},f=a(()=>Object(r.a)()&&Object(o.a)()||{});function h(){return f().apptype}const g=a(()=>{const e=Object(s.a)(u),{login_hint:t}=e&&Object(c.b)(decodeURIComponent(e))||{};return t&&{login_hint:t}}),m=a(()=>!!Object(s.a)(u)),b=a(()=>y()&&(Object(r.a)()&&location.search.match(/disable-old-auth/)||m()||!(Object(s.a)(i.h)||Object(s.a)(i.f)))),w=a(()=>!(h()in l)&&Object(r.a)()&&!!(document.head.dataset.info||””).match(/bprg-dualauthb/)),y=a(()=>w()&&!(h()in p)),k=a(()=>w()&&(!(h()in p)||!m()));function S(){return Object(r.a)()&&location.search.match(/block-1s-for-auth/)}function q(e,t){const n={};return e&&(n[i.r.authorization]=”Bearer “+e),t&&(n[i.r.userIdToken]=t),n}},AjCL:function(e,t,n){“use strict”;function o(){try{return localStorage}catch(e){return null}}n.d(t,”a”,(function(){return o}))},HDSB:function(e,t,n){“use strict”;function o(){return!(“undefined”==typeof window||!window.document||!window.document.createElement)}n.d(t,”a”,(function(){return o}))},VrHr:function(e,t,n){“use strict”;n.r(t);var o,i=n(“ulS/”),r=n(“8WO2”),s=n(“YBLW”);!function(e){e.Adult=”adult”,e.Enterprise=”enterprise”,e.Kids=”kids”}(o||(o={}));var a=n(“AjCL”);var c=n(“jXSF”);(new class{constructor(){this.childCookieName=”child”,this.domInfo=document.head.dataset.info,this.WeaDetectLocSetting=”weaPeregrineDetectLocation”,this.WeaHomeLocCookie=”weaPeregrineHomeLocation”,this.WeaSpartanDetectLocSetting=”weaDetectLocation”,this.WeaSpartanHomeLocCookie=”weaSpartanHomeLocation”}init(e=null){this.clientSettings=e||Object(i.a)(),this.authCookieName=window._authCookieName||””,this.bundle=window._webWorkerBundle||””;const t=this.buildWebWorkerUrl();if(window.webWorker=new Worker(t,{name:”web-worker”}),window.webWorkerMessages=[],window.webWorker.onmessage=e=>{window.webWorkerMessages.push(e.data)},window.webWorkerErrors=[],window.webWorker.onerror=e=>{window.webWorkerErrors.push(e)},window.chrome){const e=this.getAudienceMode(this.clientSettings),t=window.webWorker&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&”function”==typeof t.getPref&&(t.getPref(“ntp.news_feed_display”,e=>{e&&e.value&&window.webWorker.postMessage({id:”FeedDisplaySetting”,type:”command”,payload:e.value})}),t.getPref(“ntp.layout_mode”,e=>{e&&e.value&&window.webWorker.postMessage({id:”LayoutModeSetting”,type:”command”,payload:e.value})}),t.getPref(“ntp.user_nurturing”,e=>{let t=!1;e&&e.value&&e.value.length&&(t=this.getSingleColRequest(e.value)),window.webWorker.postMessage({id:”RenderSingleColumn”,type:”command”,payload:t})})),e===o.Enterprise&&this.clientSettings.browser&&”edgeChromium”===this.clientSettings.browser.browserType&&parseInt(this.clientSettings.browser.version)>=87&&this.getAccessToken().then(e=>{e&&window.webWorker.postMessage({id:”AuthTokenEnterprise”,type:”command”,payload:Object(r.b)(e)})}),e!==o.Adult&&e!==o.Enterprise||this.sendPageConfiguration()}}buildWebWorkerUrl(e=null){return(this.bundle||””)+”#”+this.qsFromDocument()+this.qsFromCookies()+this.qsFromDataAttribute(e||this.clientSettings)+this.qsMisc()+this.qsFromUrl()+this.qsFromServiceWorker()}qs(e,t,n){return e?t+”=”+(n||e)+”&”:””}qsFromDocument(){return this.qs(document.getElementsByTagName(“html”)[0].getAttribute(“lang”),”lang”)+this.qs(encodeURIComponent(window.location.href),”adsReferer”)}qsFromServiceWorker(){if(!navigator.serviceWorker||!navigator.serviceWorker.controller)return””;const e=navigator.serviceWorker.controller;if(“activated”!==e.state||!e.scriptURL)return””;if(e.scriptURL){const t=new URL(e.scriptURL).searchParams.toString();return t?”&”+t+”&”:””}return””}qsFromCookies(){return this.qs(Object(s.b)(this.authCookieName),”aace”,”1″)+this.qs(Object(s.b)(“muid”),”muid”)+this.qs(Object(s.b)(this.childCookieName),”child”)+this.qs(Object(s.b)(“cbypass”),”cbypass”)+this.qs(this.cookieBannerConsentRequired().toString(),”ccRequired”)+this.qs(Object(s.b)(“ecasession”),”ecasession”)+this.qs(Object(s.b)(“TOptOut”),”browserOptOut”)}qsFromDataAttributeHelper(e,t){return e&&e.featureFlags&&e.featureFlags.wpoEnabled&&(t=this.appendWpoFlightsToInfo(e,t)),this.qs(e.pcsInfo&&e.pcsInfo.env||e.env,”env”)+this.qs(e.aid,”aid”)+this.qs(e.apptype,”apptype”)+this.qs(e.pagetype,”pagetype”)+this.qs(e.audienceMode,”audienceMode”)+this.qs(e.configIndexDocId,”configIndexDocId”)+this.qs(e.deviceFormFactor,”deviceFormFactor”)+this.qs(e.domain,”domain”)+this.qs(e.configRootUrl,”configRootUrl”)+this.qs(this.getHighestCbid(e.cbid,e.apptype),”cbid”)+this.qs(e.ocid,”ocid”)+this.qs(e.os,”os”)+this.qs(JSON.stringify(e.locale),”locale”)+this.qs(e.geo_lat,”lat”)+this.qs(e.geo_long,”long”)+(“dhp”===e.pagetype||”ntp”===e.pagetype?this.qs(Object(s.b)(this.WeaSpartanHomeLocCookie),this.WeaSpartanHomeLocCookie)+this.qs(Object(s.b)(this.WeaSpartanDetectLocSetting),this.WeaSpartanDetectLocSetting):this.qs(Object(s.b)(this.WeaHomeLocCookie),this.WeaHomeLocCookie)+this.qs(Object(s.b)(this.WeaDetectLocSetting),this.WeaDetectLocSetting))+this.qs(JSON.stringify(e.featureFlags),”featureFlags”)+this.qs(JSON.stringify(e.browser),”browser”)+this.qs(JSON.stringify(e.servicesEndpoints),”servicesEndpoints”)+this.qs(e.bundleInfo&&e.bundleInfo.v||””,”buildVersion”)+this.buildArtifactHashes(e)+this.qs(t,”dataInfo”)}appendWpoFlightsToInfo(e,t){const n=this.getWpoFlightsFromLocalStorage(e);if(n&&n.length){const e=”;”,o=t.split(e);for(let e=0;ee.id)}}catch(e){console.warn(`Error getting wpo flights from ls for ${o} Error:${e}`)}return null}buildArtifactHashes(e){let t;try{const{locale:n={},bundleInfo:o={},audienceMode:i,pagetype:r,apptype:s}=e,{hash:c,configsHash:u,locConfigsHash:d}=o;if(!c||!u||!d)return””;t=this.qs(c,”bundleHash”)+this.qs(u,”configHash”)+this.qs(d,”locHash”);const l=`config_hash_${i}_${n.language}_${n.market}_${r}_${s}`,p=Object(a.a)().getItem(l);if(p){const{bundleHash:e,configHash:n,locHash:o}=JSON.parse(p)||{};e&&n&&o&&(t+=this.qs(e,”lastBundleHash”)+this.qs(n,”lastConfigHash”)+this.qs(o,”lastLocHash”))}return t}catch(e){console.error(“Error getting config hashes from ls: “+e)}return t}getHighestCbid(e,t){try{const n=Object(a.a)(),o=parseInt(e),i=parseInt(JSON.parse(n.getItem(“cbid_”+(t||””))));let r;if(o&&!isNaN(o)&&i&&!isNaN(i)&&(r=o>i?o:i),r=r||o||i,r)return window._cbid=r.toString()}catch(e){console.log(“Error getting highest CBID”+e)}}getAudienceMode(e){Object(a.a)();const t=Object(s.a)(this.authCookieName),n=Object(s.a)(this.childCookieName),{child:i}=t&&JSON.parse(t)||{};return t&&(1===i||n)?”kids”:”enterprise”===e.audienceMode&&e.IsCnDomain&&e.currentFlights.includes(“prg-china-aad”)?”adult”:e.audienceMode||o.Adult}sendPageConfiguration(){const e=this.clientSettings.pagetype;if(e){const t=s.a&&”function”==typeof s.a&&Object(s.a)(“pglt-edgeChromium-“+e);if(t)return void window.webWorker.postMessage({id:”PageConfiguration”,type:”command”,payload:t})}window.webWorker.postMessage({id:”PageConfiguration”,type:”command”,payload:!1})}qsFromDataAttribute(e){let t,n;const o=Object(a.a)();if(o){const i=JSON.parse(o.getItem(“shd_”+e.pagetype)||null);i&&i.clientSettings&&i.info&&(t=Object.assign(Object.assign({},i.clientSettings),{bundleInfo:e.bundleInfo}),n=i.info)}return(!t||!n||e.pageGenTime>=t.pageGenTime)&&(t=e,n=this.domInfo),t.audienceMode=this.getAudienceMode(t),this.qsFromDataAttributeHelper(t,n)}qsFromUrl(){const e=location.search;return e&&e.length?e.substring(1,e.length):””}getAccessToken(){return new Promise(e=>{window.chrome&&window.chrome.authPrivate?window.chrome.authPrivate.getPrimaryAccountInfo(t=>{t&&”GCC_MODERATE”!==t.region_scope||e(“”);const n={account_id:t.account_id,account_type:t.account_type,client_id:”d7b530a4-7680-4c23-a8bf-c52c121d2e87″,scope_or_resource:”https://enterprisenews.microsoft.com”};window.chrome.authPrivate.acquireAccessTokenSilently(n,t=>{t.is_success?e(t.access_token):e(“”)})}):e(“”)})}qsMisc(){return this.qs(performance.timeOrigin&&performance.timeOrigin.toString(),”mainTimeOrigin”)+this.qs(Object(r.h)()&&”1″,”disableWWAuth”)}getSingleColRequest(e){const t=”render_single_column”,n=”feed_layout”;let o,i;for(const r of e){const{key:e,value:s}=r;e===t?o=s:e===n&&(i=s)}return”boolean”==typeof o?o:!!i&&(i&&”single”===i.type)}cookieBannerConsentRequired(){const e=null!=document.getElementById(“consent-banner-container”)&&null===Object(s.a)(“MSCC”),t=null!=document.getElementById(“onetrust-sdk”)&&null===Object(s.a)(“eupubconsent-v2”);return e||t}}).init(),function(e=[“vendors”,”common”,”microsoft”],t=”Error when loading bundle(s): “,n){addEventListener(“beforeunload”,(function(){if(performance.now()

Source