MSN
i.delete(e),has:e=>i.has(e)});const s="__RequestDataInstance__";class c{constructor(e,t){if(this.url=new URL(e.href),this.innerHeight=e.innerHeight,this.devicePixelRatio=e.devicePixelRatio,this.canUseCssGrid=e.canUseCssGrid,this.requestId=e.requestId,this.cookie=e.cookie,this.referer=e.referer,this.userAgent=e.userAgent,this.clientData=e.clientData,this.oneServiceHeaders=function(e){try{if(e)return JSON.parse(e)}catch(e){}}(e.oneServiceHeaders)||{},this.isPssrMode=t,t){const e=a("OSATE",this.cookie),t=!!e&&"1"===e,n=a("OSAT",this.cookie);if(t&&n||!e&&!n)return this.msalAuthReady=!0,void(n&&(this.oneServiceHeaders.Authorization=`Bearer ${n}`));this.msalAuthReady=!1,this.pssrRejectedReason=e&&!t?"interactiveLogin":e&&!n?"missOSAT":"missOSATE"}}static getInstance(){const e=r.get(s);return e||(n.g.TEST_ENV?d({href:"http://localhost:8080/",innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:"0",cookie:"",userAgent:"",referer:"",oneServiceHeaders:""}):d({href:"http://localhost:8080/",innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:"0",cookie:"",userAgent:"",referer:"",oneServiceHeaders:""}))}static resetInstance(e){const t=new c(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);return r.set(s,t),t}}function a(e,t){if(t&&e){const n=new RegExp("\\b"+e+"\\s*=\\s*([^;]*)","i").exec(t);return n&&n.length>1?n[1]:null}return null}const d=c.resetInstance,l=()=>c.getInstance();var u,p;!function(e){e.Anon="ANON",e.AppAnon="APP_ANON",e.Unknown=""}(u||(u={})),function(e){e.AnonCookieExists="ace",e.AppAnonCookieExists="aace"}(p||(p={}));const h="child";function g(e,t){if(e){const n=new RegExp("\\b"+t+"\\s*=\\s*([^;]*)","i").exec(e);return n&&n.length>1?n[1]:null}return null}function w(e){try{if(e)return JSON.parse(e)}catch(e){}return null}const m="prg-pr2-",f="prg-pr2-only",b="prg-pw-",v="prg-",y="prg-1sw-";function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;const n=t.length,o=[];return e&&e.length&&(e.forEach((e=>{const i=e&&e.trim();i&&i.length>=n&&i.substring(0,n).toLowerCase()===t&&o.push(i.toLowerCase())})),o.sort()),o}function S(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=C("info"),o=((n&&n.match(/f:\s*([^;]+)/i)||[])[1]||"").split(","),i=function(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=v;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?n=b:t.toLocaleLowerCase()==="windowsShell".toLocaleLowerCase()||t.toLocaleLowerCase()==="windowsShellV2".toLocaleLowerCase()?n=y:e&&e.includes(f)&&t.toLocaleLowerCase()==="winWidgets".toLocaleLowerCase()&&(n=m),n}(o,e,t);return{all:o,prg:k(o,i)}}function C(e){var t;return document.head.dataset[e]||(null===(t=I())||void 0===t?void 0:t.dataset[e])}let A;function I(){return void 0===A&&(A=document.getElementsByClassName("peregrine-widget-settings")[0]||null),A}const _="Authorization";var q,O;!function(e){e.Presentation="presentation"}(q||(q={})),function(e){e.Unknown="Unknown",e.Portrait="Portrait",e.Landscape="Landscape"}(O||(O={}));var E,L;!function(e){e[e.Undefined=0]="Undefined",e[e.Basic=1]="Basic",e[e.Advanced=2]="Advanced",e[e.Premium=3]="Premium"}(E||(E={})),function(e){e.Init="init",e.Config="config",e.Targeted="targeted",e.Sticky="sticky",e.NoSticky="no_sticky",e.Admin="admin",e.Forced="forced",e.Manual="manual"}(L||(L={}));new Set(["winp0dash","winp1taskbar","winp1taskbarent","winp1taskbardirect","winp1taskbardirectent","winp1taskbarent","winp2juntaskbar","winp2juntaskbarent","winp2","winp2ent","winp2fp","winp2fpent","winp2fptaskbar","winp2fptaskbarent","winp2fptaskbarhover","winp2fptaskbarhoverent","winp2widget","winp2widgetent"]);const x=new Set(["finance-app-win","weather-app-win","winpstoreapp"]),T=(new Set(["msedgdhp","msedgdhphdr","msedgntphdr","msedgntp","msedgdhp","entnewsntp"]),new Set(["hpmsn"]));new Set(["chromentpnews"]);function P(){var e;return o()?w(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName("peregrine-widget-settings")[0])||void 0===e?void 0:e.getAttribute("data-client-settings"))):null}const N="feed/personalize/settings";function R(e,t){const n=t.replace(/[[\]]/g,"\\$&"),o=new RegExp("[?&]"+n+"(=([^]*)|&|#|$)").exec(e);if(!o)return null;const i=o[2];return decodeURIComponent(i.replace(/\+/g," "))||""}let W=new class{constructor(){o()?(this.isDebugEnabled=(R(window.location.href,"debug")||"").toLowerCase()in{1:1,true:1}||"vp"===(R(window.location.href,"reqsrc")||"").toLowerCase(),this.isDebugEnabled&&!n.g.TEST_ENV&&(window.webpackRequire=n)):this.isDebugEnabled=!1}getLoggingService(){return null}isDebug(){return this.isDebugEnabled}setDebug(e){this.isDebugEnabled=e}setTags(e){}log(e,t){this.isDebug()&&console.info(e)}logError(e){console.error(e)}logCallback(e){this.isDebug()&&console.info(e())}logObjects(){this.isDebug()&&console.log(...arguments)}logSingleObject(e,t){this.isDebug()&&console.log(e)}};class M{get supported(){return!!this.storage}constructor(e){this.storage=e}getItem(e){if(this.supported)return this.storage.getItem(e)}getObject(e,t){const n=this.getItem(e);if(null!=n){const e=w(n);if(null!=e)return e}return t}key(e){if(this.supported&&e>=0)return this.storage.key(e)}keys(){return this.supported?Object.keys(this.storage):[]}setObject(e,t){void 0!==t?this.setItem(e,JSON.stringify(t)):this.removeItem(e)}removeObject(e){const t=this.removeItem(e);if(null!=t)return w(t)}setItem(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.supported)try{if(!t)throw"Attempted to store null/undefined value: "+t;this.storage.setItem(e,t)}catch(e){if(!n)throw e;W.logError(e)}else if(!n)throw new Error("WebStorage not supported")}get length(){if(this.supported)return this.storage.length}removeItem(e){if(this.supported){const t=this.getItem(e);return this.storage.removeItem(e),t}}clear(){this.supported&&this.storage.clear()}removeSubstringKeys(e){if(!this.supported||!e)return;const t=[];for(let n=0;n{const e=z(Y,!0),t=e&&w(e),{login_hint:n}=t||{};return n&&t})),ee=Q((()=>!!z(Y)));function te(){try{return localStorage}catch(e){return null}}const ne="__PageExperimentInstance__";function oe(e){r.set(ne,e)}function ie(e){if(!r.has(ne)&&o()){var t;oe(re(document.head.dataset.info||(null===(t=window.document.getElementsByClassName("peregrine-widget-settings")[0])||void 0===t||null===(t=t.dataset)||void 0===t?void 0:t.info)||""))}const n=r.get(ne);return n&&n.has(e)}function re(e){const t=(e||"").replace(/(^f:|;.*$)/g,"").split(",");return new Set(t)}const se="uxlogin",ce="uxlogout",ae="uxedit",de="useRedirect",le="uxswitch",ue=Q((()=>{const e=te();return e&&"1"===e.getItem(se)||o()&&location.search&&location.search.includes(`${se}=1`)}));const pe=Q((()=>{const e=function(){try{return sessionStorage}catch(e){return null}}();return e&&!!e.getItem(ce)}));const he=Q((()=>{const e=te();return e&&"1"===e.getItem(ae)}));const ge=Q((()=>{const e=te(),t=!ie("prg-noredirect")&&e&&"1"===e.getItem(de)&&function(){const e=document.head.dataset.clientSettings||"",{browser:t}=w(e)||{},{browserType:n=""}=t||{};return!!/safari/i.test(n)}();return t}));const we=Q((()=>{const e=te();return e&&"1"===e.getItem(le)}));const me={bingHomepageMobile:"binghomepagemobile",outlookMobile:"OnOOutlookMobile",officeMobile:"OnOOfficeMobile",sapphire:"OnOStartApp",skype:"OnOSkype",freFullPage:"emmxFre",winWeatherApp:"weather-app-win",xiaomiApp:"xmweather-",launcher:"launcherntp",launcherInterests:"launcherInterests",moto:"moto",swiftKey:"swiftKey",winMoneyApp:"finance-app-win"},fe="superappdhp",be=["ios","android","ipados"];let ve=Re("ocid").toLowerCase(),ye=Re("chpltfm"),[ke,Se]=ye.toLowerCase().split("-");function Ce(){if(!o()||Te())return!1;const e=window.sapphireWebViewBridge,t=window.webkit,n=e&&e.send,i=t&&t.messageHandlers&&t.messageHandlers.send&&t.messageHandlers.send.postMessage;return!(!n&&!i)}function Ae(){const e=ye&&"outlook"===ke&&be.includes(Se),t=ve===me.outlookMobile.toLowerCase();return e||t}function Ie(){const e=ye&&["office","union"].includes(ke)&&be.includes(Se),t=ve===me.officeMobile.toLowerCase();return e||t}function _e(){const e=ve===me.skype.toLowerCase()||"skype"===ke;return o()&&(null===(t=window.skypeWebviewBridge)||void 0===t?void 0:t.isSkype)||e;var t}function qe(){return!(!o()||Te())&&(Ce()||ve===me.sapphire.toLowerCase()||ve===fe.toLowerCase())}function Oe(){const e=Re("edge");return("emmx"===ke||"1"===e)&&qe()||"mmx"===ve}function Ee(){return"3rdp"===ke||ve.startsWith(me.xiaomiApp)||Le()||Te()}function Le(){return ve===me.moto.toLowerCase()}function xe(){return[me.launcher.toLowerCase(),me.launcherInterests.toLowerCase()].includes(ve)&&qe()}function Te(){return ve.toLowerCase()===me.swiftKey.toLowerCase()||"swiftkey"==ke.toLowerCase()}function Pe(){return-1!==location.href.indexOf("huawei")||-1!==location.href.indexOf("airfind")||-1!==location.href.indexOf("aloha")||"vivo"===ve&&Ee()}const Ne=Q((()=>Ce()||_e()||Ie()||Ae()||qe()||ve===me.winWeatherApp.toLowerCase()||ve===me.winMoneyApp.toLowerCase()||Oe()||Ee()||xe()||Te()||Pe()||-1!==location.href.indexOf("metaos=true")));function Re(e){try{return new URL(location.href).searchParams.get(e)||""}catch(e){return""}}const We=P()||{},Me={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channeldesktop:1,channelmobile:1,edgeMobile:1},De={edgeChromium:1},Fe={winWidgets:1},Ue={edgeChromium:1,shopping:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1},$e={edgeChromium:1,channeldesktop:1,channelmobile:1,cgHomePage:1,distribution:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,superApp:1,edgeMobile:1},Be=Q((()=>We&&We.apptype)),He=(Q((()=>o()&&Be()in Fe)),Q((()=>o()&&!Ne()&&!(Be()in Me)&&!Ge()&&!Ve()))),je=Q((()=>He()&&!(Be()in De)));Q((()=>He()&&(!(Be()in De)||!ee()))),Q((()=>He()&&!Xe()&&!Qe()));const Je=Q((()=>Qe()||Xe())),Ge=Q((()=>{const e=!(Be()in Ue)&&Ye()&&function(){const e=new URLSearchParams(o()?window.location.search:l().url.search).get("ocid")||(null==We?void 0:We.ocid),t=null==e?void 0:e.toLowerCase(),n=!T.has(t)&&"homePage"!==Be()&&!x.has(t);return n}()&&!function(){const e="windows"==Be()&&"windowshp"==(We&&We.pagetype)&&(o()?window.location.href:l().url.href).includes(`${N}`);return e}();return e})),Ve=()=>o()&&document&&document.body&&document.body.getElementsByClassName("peregrine-widgets").length>0;Q((()=>Be()in $e||Ge()));function ze(){const e=B;if(e)return W.log("dual-auth: tryGet1SAuthToken returned live tokens"),e;const t=j();if(t)return W.log(`dual-auth: tryGet1SAuthToken returned cached tokens that are ${J()}`),t;W.log("dual-auth: tryGet1SAuthToken returned empty tokens")}function Ke(e){const t={};return e&&(t[_]=`Bearer ${e}`),t}function Xe(){return je()&&ue()||function(){const e=je()&&!Ze()&&!ue()&&Z()&&("expired"==J()||he());return e}()||pe()||ge()}function Qe(){return je()&&!Z()&&we()}const Ye=Q((()=>{const{browser:e}=We,{browserType:t="",detected:n={}}=e||{},{browserType:o=""}=n||{};return/edgeChromium/i.test(t)||/edgeAndroid/i.test(t)||/edgeiOS/i.test(t)||/edge/i.test(o)}));Q((()=>je()&&!Ge()));const Ze=()=>{const e=Z();if(!e)return!1;let t;switch(e.account_type){case"MSA":t=je()?"ace":"aace";break;case"AAD":t=je()?"WID":"APP_WID";break;default:return!1}return!!z(t)};const et="__core_auth_authHeaderPromiseParts__",tt=()=>r.get(et);var nt;!function(){let e;const t={promise:new Promise((t=>e=t)),resolver:e};r.set(et,t)}(),function(e){e.GLOBAL="GLOBAL",e.GCC_MODERATE="GCC_MODERATE"}(nt||(nt={}));let ot;function it(){return ot}const rt=Q((()=>w(z("AL_STATE",!0))));const st=()=>{const e=z("elt",!0),t=e&&w(e),{access_token:n,account_type:o,login_hint:i,region_scope:r}=t||{};return(n||o||i||r)&&t};function ct(e){if("undefined"==typeof window||!window.document||window.isRenderServiceEnv)return;const t=window.trustedTypes;if(!t||!t.createPolicy)return;const n=window.trustedTypePolicies||(window.trustedTypePolicies={});if(n[e])return n[e];const o=t.createPolicy(e,{createScriptURL:e=>{const t=function(e){const t=["ntp.msn.com","ntp.msn.cn","assets.msn.cn","assets.msn.com","www.bing.com","assets2.msn.com","assets2.msn.cn","www.clarity.ms","int.msn.com","r.bing.com","business.bing.com","staticview.msn.com","staticview.msn.cn",document.location.hostname];let n;try{n=new URL(e,location.origin)}catch(e){return"about:blank#error"}if(n.hostname&&!t.includes(n.hostname))return"about:blank#error";return e}(e);return t}});return n[e]=o,o}class at{constructor(){this.childCookieName="child",this.domInfo=document.head.dataset.info,this.command="command"}init(e,t){this.clientSettings=e||P(),this.authCookieName=it()||window._authCookieName||"",this.bundle=window._webWorkerBundle||"",t=t||{};const n=this.buildWebWorkerUrl(this.clientSettings,t),o=this.clientSettings.apptype;let i;if(o&&"edgeChromium"===o){if(i=this.tryGetWebWorkerUsingPolicy(n,"webWorkerUrlPolicy"),!i)return void console.warn("Error in creating trusted types compliant web worker")}else i=window.webWorker=new Worker(n,{name:"web-worker"});const r=window.webWorkerMessages=[];i.onmessage=e=>{r.push(e.data)};const s=window.webWorkerErrors=[];if(i.onerror=e=>{s.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&&i.postMessage({id:"FeedDisplaySetting",type:this.command,payload:e.value})})),t.getPref("ntp.layout_mode",(e=>{e&&e.value&&i.postMessage({id:"LayoutModeSetting",type:this.command,payload:e.value})})),t.getPref("new_device_fre.has_user_seen_new_fre",(e=>{e&&i.postMessage({id:"NewUserFre",type:this.command,payload:e.value})}))),t&&"function"==typeof t.getConfigData&&t.getConfigData((e=>{const t=(null==e?void 0:e.enabledFeatures)||[];t.includes("msReducedNtpAdsForNewDevice_stage1")&&i.postMessage({id:"EdgeNoAds",type:this.command,payload:!0}),t.includes("msReducedNtpAdsForNewDevice_stage2")&&i.postMessage({id:"EdgeReduceAds",type:this.command,payload:!0})})),"enterprise"===e&&this.clientSettings.browser&&"edgeChromium"===this.clientSettings.browser.browserType&&parseInt(this.clientSettings.browser.version)>=87?this.getEnterpriseAccessToken().then((e=>{e&&i.postMessage({id:"AuthTokenEnterprise",type:this.command,payload:Ke(e)})})):i.postMessage({id:"AuthTokenEnterprise",type:this.command,payload:{}}),"adult"!==e&&"enterprise"!==e||this.sendPageConfiguration()}Je()&&tt().promise.then((e=>i.postMessage({id:"AuthHeaders",type:this.command,payload:e||{}})))}buildWebWorkerUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return(this.bundle||"")+"#"+this.qsFromDocument()+this.qsFromCookies()+this.qsFromDataAttribute(e||this.clientSettings)+this.qsMisc(t)+this.qsAuth(e||this.clientSettings)+this.qsFromUrl()+this.qsFromServiceWorker()+this.qsSelectedPivot()+this.qsXboxXToken()}qs(e,t,n){return e?t+"="+(n||e)+"&":""}qsFromDocument(){var e;return this.qs(document.getElementsByTagName("html")[0].getAttribute("lang"),"lang")+this.qs(encodeURIComponent(window.location.href),"adsReferer")+this.qs(null===(e=o()?window.devicePixelRatio:l().devicePixelRatio)||void 0===e?void 0:e.toString(),"devicePixelRatio")}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(X(this.authCookieName),"aace","1")+this.qs(X("muid"),"muid")+this.qs(X(this.childCookieName),"child")+this.qs(X("cbypass"),"cbypass")+this.qs(this.cookieBannerConsentRequired().toString(),"ccRequired")+this.qs(X("ecasession"),"ecasession")+this.qs(X("TOptOut"),"browserOptOut")}qsFromDataAttributeHelper(e,t){return e&&e.featureFlags&&e.featureFlags.wpoEnabled&&t&&!t.includes("remwpofltww")&&(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")+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.qs(t,"dataInfo")}qsSelectedPivot(){const e="selectedPivot";let t;try{const n=te();n&&(t=n.getItem(e))}catch(e){console.warn("Error getting pivot id from local storage. "+e)}return this.qs(t,e)}qsXboxXToken(){const e="xboxXTokenId";let t;try{const n=te();n&&(t=n.getItem(e))}catch(e){console.warn("Error getting xbox XToken from local storage. "+e)}return this.qs(t,e)}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}getHighestCbid(e,t){try{const n=te(),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.warn("Error getting highest CBID"+e)}}getAudienceMode(e){te();const t=z(this.authCookieName),n=z(this.childCookieName),{child:o}=t&&JSON.parse(t)||{};return t&&(1===o||n)?"kids":e.audienceMode||"adult"}sendPageConfiguration(){const e=this.clientSettings.pagetype;if(e){const t=z&&z("pglt-edgeChromium-"+e);if(t)return void window.webWorker.postMessage({id:"PageConfiguration",type:this.command,payload:t})}window.webWorker.postMessage({id:"PageConfiguration",type:this.command,payload:!1})}qsFromDataAttribute(e){let t,n;const o=te();if(o){const i=JSON.parse(o.getItem("shd_"+e.pagetype)||null);i&&i.clientSettings&&i.info&&(t={...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):""}getEnterpriseAccessToken(){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(e){return this.qs(performance.timeOrigin&&performance.timeOrigin.toString(),"mainTimeOrigin")+this.qs(e.disableWWConfig&&"1","disableWWConfig")}qsAuth(e){let t=this.qs(je()&&"1","disableWWAuth");if(!Je()){const e=je()&&ze()||{};t+=this.qs(encodeURIComponent(JSON.stringify(Ke(e.accessToken))),"authHeaders")}return t+=this.qs(function(e){const t=e||it()||"al_app_anon",n=rt();return!(!n||!(["anon","al_anon"].includes(t)&&n.AL_ANON||["app_anon","al_app_anon"].includes(t)&&n.AL_APP_ANON))}()&&"1","isAccountLinked"),t+=this.qs(this.shouldFetchAppAnonCookie()&&"1","fetchAppAnonCookie"),t}cookieBannerConsentRequired(){const e=null!=document.getElementById("consent-banner-container")&&null===z("MSCC"),t=null!=document.getElementById("onetrust-sdk")&&null===z("eupubconsent-v2");return e||t}shouldFetchAppAnonCookie(){if(!Ye())return!0;return"MSA"===(()=>{const e=st();if(e){if("MSA"===e.account_type)return"MSA";if("AAD"===e.account_type)return"AAD"}})()||K("lt")?!K("aace"):void 0}tryGetWebWorkerUsingPolicy(e,t){const n=ct(t);if(n){const t=n.createScriptURL(e),o=t&&t.toString();if(!o||"about:blank#error"===o)return;window.webWorker=new Worker(t,{name:"web-worker"})}else window.webWorker=new Worker(e,{name:"web-worker"});return window.webWorker}}let dt,lt,ut;function pt(){if(lt)return lt;const e=document.head.getAttribute("data-info");return lt=((/f:\s*([^;]+)/i.exec(e)||{})[1]||"").toLowerCase(),lt}var ht;!function(e){e[e.Alert=0]="Alert",e[e.Deprecated=1]="Deprecated",e[e.HighImpact=2]="HighImpact",e[e.Critical=3]="Critical"}(ht||(ht={}));const gt=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;this.maxLength=e,this.list=[]}push(e){this.list.push(e),this.list.length>this.maxLength&&this.list.shift()}get data(){return this.list}};function wt(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ht.Alert,r=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;try{const c=function(){if(!dt){const e=document.head.getAttribute("data-client-settings");e&&(dt=JSON.parse(e))}return dt}(),a=pt(),d=function(e){if(e){const{pcsInfo:t,pageGenTime:n}=e,o=new Date(n).getTime(),i=!t||["prod","prod-ssr","prod-ssrntp"].includes(t.env);ut=i?"browser.events.data.msn.com":"events-sandbox.data.msn.com";return{cors:"true","content-type":"application/x-json-stream","client-id":"NO_AUTH","client-version":"1DS-Web-JS-2.2.2",apikey:i?"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279":"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028","upload-time":o,w:"0",anoncknm:"app_anon"}}return null}(c);let l="";d&&d.apikey&&""!==d.apikey&&(l=function(e){if(e){const t=e.indexOf("-");if(t>0)return e.substring(0,t)}return""}(d.apikey));const u=function(e,t,n,i,r,s){let c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:ht.Alert;if(n){r=r||{};const{apptype:d,audienceMode:l,pagetype:u,pageGenTime:p,bundleInfo:h,deviceFormFactor:g="",fd_muid:w,os:m}=n;r.pageGenTime=p,r.build=h&&h.v,r.appType=d;const f=function(e,t,n){const i=n&&"phone"===n.toLowerCase(),r=t&&"enterprise"===t;let s="Edge";Te()?s="swiftKey":Le()?s="moto":xe()?s="Launcher":function(){var e;if(!o())return!1;const t=document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName("peregrine-widget-settings")[0])||void 0===e?void 0:e.getAttribute("data-client-settings"));if(t){const e=JSON.parse(t);return e&&e.pagetype&&"bingHomepageMobile"===e.pagetype}return!1}()&&(s="bingHomepageMobile");const c={bingHomepage:"binghomepage",mmx:"emmx",edge:"spartan",edgeChromium:r?"entnews":"anaheim",hybrid:"spartan",hub:i?"prime_mobile":"prime",microsoftNews:"msnews",office:"entnews",views:i?"prime_mobile":"prime",homePage:i?"prime_mobile":"prime",windowsShell:"windowsshell",edgeMobile:s};return c[e]}(d,l,g),b=f||d,v=document.getElementsByTagName("html")[0].getAttribute("lang");let y,k="",S="muid";try{if("edgeChromium"===d&&"object"==typeof window&&window.location&&window.location.search){const e=new URLSearchParams(window.location.search);y=e.has("startpage")?"msedgdhp":"msedgntp","enterprise"===l?y="entnewsntp":"xbox"===m&&(y="xboxntp")}window&&window.getCookieConsentRequired&&"function"==typeof window.getCookieConsentRequired&&window.getCookieConsentRequired()||(k=z("muid"))}catch{}k||(k=n.aid,S="aid");const C={name:"MS.News.Web.AppError",time:p,ver:"4.0",iKey:`o:${i}`,data:{baseData:{},baseType:"MS.News.Web.Base",page:{name:"default",product:b,type:ft(u),content:mt[d]??{category:"standaloneError"},ocid:y},browser:{clientId:k,clientIdType:S},flight:{id:s},request:{activityId:n.aid,requestId:n.aid,afdMuid:w},locale:{mkt:v},extSchema:{id:e,severity:c,pb:r,message:t}}};var a;if(k&&"muid"===S)C.ext={...null==C?void 0:C.ext,user:{...null==C||null===(a=C.ext)||void 0===a?void 0:a.user,localId:`t:${k}`}};return C.data.flight.tmpl="","object"==typeof window&&(window.isSSREnabled&&(C.data.flight.tmpl+=";ssr-enabled:1"),window.isSSRCompleted&&(C.data.flight.tmpl+=";ssr-completed:1")),C?JSON.stringify(C):null}return null}(t,e,c,l,n,a,i);if(s&&!function(e){if(null==e)return!1;return e.startsWith("1")||e.startsWith("2")||e.startsWith("3")||e.startsWith("4")}(null==c?void 0:c.aid))return console.error(u),void console.error(`This App error Id: ${t} will not be sent due to app error sampling!`);if(d&&u){console.error(u),gt.push(u);const e="https://"+ut+"/OneCollector/1.0"+function(e){return"?"+Object.keys(e).map((function(t){return t+"="+encodeURIComponent(e[t])})).join("&")}(d);if(r&&!performance.getEntriesByType("visibility-state").some((e=>"visible"===e.name))){const t=()=>{"visible"===document.visibilityState&&navigator.sendBeacon(e,u)};document.addEventListener("visibilitychange",t,{once:!0})}else navigator.sendBeacon(e,u)}}catch{}}const mt={homePage:{vertical:"homepage",category:"",id:"",domainId:"13041",title:"undefined"!=typeof document?document.title:""}};function ft(e){let t=e;switch(e){case"windowsshellhp":t="dhp";break;case"video":t="watch";break;case"EdgeMobile":t=Oe()?"ntp":"dhp"}return t}function bt(e){return new Promise((t=>setTimeout(t,e)))}const vt="https://acdn.adnxs.com/ast/ast.js",yt="https://adsdk.microsoft.com/ast/ast.js";async function kt(e){window.apntag=window.apntag||{anq:[]},window.apntag.anq=window.apntag.anq||[],await async function(e){if(!o())return;const{src:t,id:n,async:i=!0,container:r=document.head,retryNumber:s=0,retryDelayMs:c=0}=e;try{await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;if(t3&&void 0!==arguments[3])||arguments[3];return new Promise(((r,s)=>{const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"anonymous",r=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;if(!o())throw new Error("createScriptTag is unsupported server side. This call should be wrapped in canUseDOM().");const c=document.createElement("script");return t&&(c.id=t),r&&c.setAttribute("class",r),s&&(c.onload=s),c.type="text/javascript",e&&(window&&window.trustedTypesURLValidation?c.src=window.trustedTypesURLValidation(e,"scriptSrcUrlPolicy"):c.src=e,c.async=n,c.crossOrigin=i),window&&window.NONCE_ID&&(c.nonce=window.NONCE_ID),c}(e,t,i,void 0,void 0,(()=>r(!0)));c.crossOrigin=void 0,c.onerror=s,n.prepend(c)}))}(t,n,r,i)),s,c)}catch(e){wt("Failed to download Static JS",11103,{scriptId:n,scriptSrc:t},ht.Alert)}}({id:"display-sdk",src:e?yt:vt,container:document.head,retryDelayMs:200,retryNumber:5})}const St=P();function Ct(e){return((null==St?void 0:St.ocid)||"").toLowerCase().includes(e.toLowerCase())}function At(){return Ct("superappdhp")}function It(){const e=Ct("skype")&&!(Ct("msnaroverlay")||"phone"===(null==St?void 0:St.deviceFormFactor));if(At()||(Ct("skype")||Ct("office")||Ct("outlook"))&&!e)return;var t,n;kt((t="prg-msft-xan-sdk",((null===(n=document.head)||void 0===n||null===(n=n.getAttribute("data-info"))||void 0===n?void 0:n.split(";").find((e=>e.startsWith("f:"))))||"").includes(t)))}const _t="experience",qt=Object.create(null),Ot=2;function Et(){const e=["vendors","microsoft","common"];window.addEventListener("load",(()=>{window._pageTimings.navType=xt(),window.requestIdleCallback((()=>{const t=function(e){const t=window.viewsWebpackChunks;if(!t)return[...e,_t];if(t.length>e.length)return[];t.forEach((t=>e.splice(e.indexOf(t[0][0]),1))),t.push===Array.prototype.push&&e.push(_t);return e}(e);t.length&&t.forEach((e=>Lt(e)))}))}),{once:!0})}function Lt(e,t){if(!(t=t||Array.from(document.scripts).find((t=>t.src.indexOf(`/${e}.`)>-1))))return;const n=function(e,t){const n=document.createElement("script");return n.type="text/javascript",n.crossOrigin="anonymous",n.src=e,n.onerror=()=>{let e=qt[t]||0;qt[t]=++e,e{delete qt[t];const e=window._pageTimings.retriedBundles;window._pageTimings.retriedBundles=e?`${e},${t}`:t,Tt()},n}((o=t.src,qt[e],o),e);var o;setTimeout((()=>t.replaceWith(n)),100)}function xt(){const[e={}]=performance.getEntriesByType("navigation");return e.type}function Tt(){if(!Object.values(qt).every((e=>e===Ot)))return;let e="";Object.keys(qt).forEach((t=>{e=e?`${e},${t}`:t,delete qt[t]})),e&&wt(`Error when loading bundle(s): ${e}`,20202,{timeElapsed:Math.round(performance.now()),navType:xt()})}function Pt(e,t){if(e instanceof Error){const n=e.toString();return t&&e.stack?`${n}, Stack: ${e.stack}`:n}return"string"==typeof e?e:function(e){try{return void 0===e?"undefined":JSON.stringify(e)}catch{return""}}(e)}"undefined"!=typeof window&&window.document&&window.document.createElement&&(window._pageTimings=window._pageTimings||{},window.requestIdleCallback=window.requestIdleCallback||window.setTimeout);!function(){Et();const e=new Set(["Script error.","ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."]);window.onerror=function(t,n,o,i,r){if(e.has(t))return;wt("JS Exception",20203,{source:n,line:o,message:t,stack:Pt(r,!0),currentUrl:window.location.href,column:i},ht.Alert)}}();const{all:Nt}=S(),Rt=null==Nt?void 0:Nt.includes("icrscall-views");Rt&&It();const{inlineCRS:Wt}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};try{var n,i,r;if(!o())return t;const s=w(C("clientSettings"))||{};let c=null===(n=s.apptype)||void 0===n?void 0:n.toLocaleLowerCase();const a=e.crsOptions||{};"winwidgets"!==c&&"homepage"!==c&&"travel"!==c||(a.crsPrefetch=!0),null!==(i=s.widgetAttributes)&&void 0!==i&&null!==(i=i.clientPerf)&&void 0!==i&&i.earlyCRSCall&&(a.crsPrefetch=!0),"edgechromium"===c&&(c="edgechr");const d=!(null===(r=s.widgetAttributes)||void 0===r||null===(r=r.clientPerf)||void 0===r||!r.shouldUsePWOnlyFlights),{all:u,prg:p}=S(d,c);(a.crsPrefetch||u.includes("inlinecrscall")||u.includes(`icrscall-${c}`))&&(!function(e,t,n){const i=function(e,t){let n;const o=decodeURIComponent(g(e,"aace")),{child:i}=o&&w(o)||{},r=g(e,h);return n=o&&(1===i||r)?"kids":t.audienceMode||"adult",n}(document.cookie,e),{apptype:r,browser:s,domain:c,bundleInfo:{v:a}={},deviceFormFactor:d,locale:{content:u,display:p}={},ocid:m,os:f,pagetype:b,servicesEndpoints:{crs:v}={}}=e,y=(I()?o()?window.location.hostname:l().url.hostname:c)||"";if(!r||!a||!v)return;const k={audienceMode:i,browser:s,deviceFormFactor:d,domain:y,locale:{content:u,display:p},ocid:m,os:f,platform:"web",pageType:b,pageExperiments:t},S=new URLSearchParams([["expType","AppConfig"],["expInstance","default"],["apptype",r],["v",a]]),C=`${v.path}${v.v}/config/?${S}&targetScope=${JSON.stringify(k)}`,A=e=>{const t=new URL(`https://${e}${C}`),{timeout:o=5e3}=n;let i;if(window.crsRequestData={url:t.toString()},o>=0){const e=new AbortController;setTimeout((()=>e.abort()),o),i=e.signal}return fetch(t,{signal:i})},_="msn."+(function(e,t){return!!(e.hostname.toLowerCase().endsWith(".cn")||t.isChinaCompliance||t.useCnDomain||e.search.match(/item=revip:cn/))}(location,e)?"cn":"com"),{domain:q}=v,O=q&&new URL(q).host;let E=A(O||`assets.${_}`);n.disableFallback||(E=E.catch((()=>{const{hostname:e}=location,t=e.match(/\.msn\.(com|cn)$/)?e:`www.${_}`;return A(t)})));window.crsPromise=E}(s,p,a),t.inlineCRS=!0)}catch(e){console.error("InlineHeadCommon: "+e)}return t}();var Mt;Mt={disableWWConfig:Wt},At()||(new at).init(void 0,Mt),Rt||It()}();
]]>
onErrorHandler(s.src);s.nonce="";s.crossOrigin="anonymous";document.body.appendChild(s);}
]]>
/
Leave a Reply