[]
MSN s.delete(e),has:e=>s.has(e)});function a(){return!(“undefined”==typeof window||!window.document||!window.document.createElement||window.isRenderServiceEnv)}function l(e){let t,n=!1;const o=function(){return n||(n=!0,t=e()),t};return o.cache={clear:()=>{n=!1,t=void 0}},o}const d=”OnOOutlookMobile”,u=”OnOStartApp”,h=”xmweather-“,g=”launcherntp”,p=”launcherInterests”,m=”swiftKey”,w=”superappdhp”,f=”cp_msn_cmc”,v=”_ocidIsomorphicKey”,b=()=>(c.get(v)||c.set(v,R(“ocid”).toLowerCase()),c.get(v)),y=”_platformFlagKey”,C=”_hostAppNameKey”,S=”_clientTypeKey”,k=()=>(c.get(y)||c.set(y,R(“chpltfm”)),c.get(y)),I=()=>{if(!c.get(C)){const e=k();c.set(C,e.toLowerCase().split(“-“)[0])}return c.get(C)},A=()=>{if(!c.get(S)){const e=k();c.set(S,e.toLowerCase().split(“-“)[1])}return c.get(S)};function q(){if(!a()||N())return!1;const e=window.sapphireWebViewBridge,t=window.webkit,n=e&&e.send,o=t&&t.messageHandlers&&t.messageHandlers.send&&t.messageHandlers.send.postMessage;return!(!n&&!o)}function E(){return!!window._isCopilotBridge||”copilot”===R(“MBApp”)}function x(){const e=k()&&”outlook”===I()&&[“ios”,”android”,”ipados”].includes(A()),t=b()===d.toLowerCase();return e||t}function _(){return!(!a()||N())&&(q()||b()===u.toLowerCase()||b()===w.toLowerCase())}function L(){const e=R(“edge”);return(“emmx”===I()||”1″===e)&&_()||”mmx”===b()}function T(){return”3rdp”===I()||b().startsWith(h)||N()}function O(){return[g.toLowerCase(),p.toLowerCase()].includes(b())&&_()}function N(){return b().toLowerCase()===m.toLowerCase()||”swiftkey”==I().toLowerCase()}const W=l((()=>q()||x()||_()||b()===”weather-app-win”.toLowerCase()||b()===”finance-app-win”.toLowerCase()||L()||T()||O()||N()||-1!==window.location.href.indexOf(“metaos=true”)||E()||!!a()&&b()===f&&”true”===R(“hasBridge”)));function R(e){try{return new URL(location.href).searchParams.get(e)||””}catch(e){return””}}function M(e,t,n){const o=n&&”phone”===n.toLowerCase(),i=t&&”enterprise”===t;let r=”Edge”;N()?r=”swiftKey”:O()?r=”Launcher”:function(){var e;if(!a())return!1;if(“bingHomepageMobile”===(null===(e=window._clientSettings)||void 0===e?void 0:e.pagetype))return!0;{var t;const e=null===(t=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===t?void 0:t.getAttribute(“data-client-settings”);if(e){const t=JSON.parse(e);return t&&t.pagetype&&”bingHomepageMobile”===t.pagetype}return!1}}()&&(r=”bingHomepageMobile”);return{bingHomepage:”binghomepage”,mmx:”emmx”,edge:”spartan”,edgeChromium:i?”entnews”:”anaheim”,hybrid:”spartan”,hub:o?”prime_mobile”:”prime”,microsoftNews:”msnews”,office:”entnews”,views:o?”prime_mobile”:”prime”,homePage:o?”prime_mobile”:”prime”,windowsShell:”windowsshell”,edgeMobile:r}[e]}const P={homePage:{vertical:”homepage”,category:””,id:””,domainId:”13041″,title:”undefined”!=typeof document?document.title:””}};function U(e){let t=e;switch(e){case”windowsshellhp”:t=”dhp”;break;case”video”:t=”watch”;break;case”EdgeMobile”:t=L()?”ntp”:”dhp”}return t}function D(){try{var e;const t={};return null===(e=Error.captureStackTrace)||void 0===e||e.call(Error,t,D),t.stack}catch(e){return(new Error).stack}}function F(e){try{return decodeURIComponent(e)}catch(e){}}let $,H;function B(e,t){if(!e)return null;if(t)return function(e){var t;const n=null===(t=document.cookie)||void 0===t?void 0:t.match(`\b${e}=([^;]*)`);return n?F(n[1]):null}(e);if(!$){const e=”undefined”!=typeof document&&document.cookie.split(“; “);$={};const t=e&&e.length;for(let n=0;n0&&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 G(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:J.Alert,s=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;try{const l=function(){if(!o){const e=document.head.getAttribute(“data-client-settings”);e&&(o=JSON.parse(e))}return o}(),d=r(),u=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);H=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}(l);let h=””;u&&u.apikey&&””!==u.apikey&&(h=function(e){if(e){const t=e.indexOf(“-“);if(t>0)return e.substring(0,t)}return””}(u.apikey));const g=function(e,t,n,o,i,r){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:J.Alert,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:””;if(n){i=i||{};const{aid:u,apptype:h,audienceMode:g,pagetype:p,pageGenTime:m,bundleInfo:w,deviceFormFactor:f=””,fd_muid:v,os:b,static_page:y}=n;i.pageGenTime=m,i.build=w&&w.v,i.appType=h,i.pageVisible=document.visibilityState;const C=M(h,g,f),S=C||h,k=document.getElementsByTagName(“html”)[0].getAttribute(“lang”);let I,A=””,q=”muid”;try{if(“edgeChromium”===h&&”object”==typeof window&&window.location&&window.location.search){const e=new URLSearchParams(window.location.search);I=e.has(“startpage”)?”msedgdhp”:”msedgntp”,”enterprise”===g?I=”entnewsntp”:”xbox”===b&&(I=”xboxntp”)}window&&window.getCookieConsentRequired&&”function”==typeof window.getCookieConsentRequired&&window.getCookieConsentRequired()||(A=(null===(l=window)||void 0===l||null===(l=l.__SSRUserConfigEarlyLog)||void 0===l?void 0:l.consistentMuid)||(null===(d=window)||void 0===d?void 0:d.__muid)||B(“muid”))}catch{}A||(A=n.aid,q=”aid”);const E={name:”MS.News.Web.AppError”,time:m,ver:”4.0″,iKey:`o:${o}`,data:{baseData:{},baseType:”MS.News.Web.Base”,page:{name:”default”,product:S,type:U(p),content:P[h]??{category:”standaloneError”},ocid:I,url:location.href,isStatic:y},browser:{clientId:A,clientIdType:q},flight:{id:r,tmpl:c},request:{activityId:u,requestId:u,afdMuid:v},locale:{mkt:k},extSchema:{id:e,severity:s,pb:i,message:t}}};var a;if(A&&”muid”===q)E.ext={…null==E?void 0:E.ext,user:{…null==E||null===(a=E.ext)||void 0===a?void 0:a.user,localId:`t:${A}`}};return”object”==typeof window&&(window.isSSREnabled&&(E.data.flight.tmpl+=”;ssr-enabled:1″),window.isSSRCompleted&&(E.data.flight.tmpl+=”;ssr-completed:1″)),E?JSON.stringify(E):null}var l,d;return null}(t,e,l,h,n,d,i,a);if(c&&!function(e){if(null==e)return!1;return e.startsWith(“1”)||e.startsWith(“2”)||e.startsWith(“3”)||e.startsWith(“4″)}(null==l?void 0:l.aid))return console.error(g),void console.error(`This App error Id: ${t} will not be sent due to app error sampling!`);if(u&&g){console.error(g),V.push(g);const e=”https://”+H+”/OneCollector/1.0″+function(e){return”?”+Object.keys(e).map((function(t){return t+”=”+encodeURIComponent(e[t])})).join(“&”)}(u);if(s&&!performance.getEntriesByType(“visibility-state”).some((e=>”visible”===e.name))){const t=()=>{“visible”===document.visibilityState&&navigator.sendBeacon(e,g)};document.addEventListener(“visibilitychange”,t,{once:!0})}else navigator.sendBeacon(e,g)}}catch{}}function K(e){G(“Error when loading bundle: “+e,20202,{…arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}function X(e,t,n,o,i){const r=(i&&i.stack)??D(),s={source:t,customMessage:e??(null==i?void 0:i.message),line:n,column:o,stack:r};G(“JS Exception”+(s.customMessage?`- ${s.customMessage.substring(0,60)}`:””),20203,s)}function z(e){const t={customMessage:e&&e.reason&&e.reason.message,stack:(e&&e.reason&&e.reason.stack)??D()};G(“JS Exception on unhandled promise rejection”+(t.customMessage?`- ${t.customMessage.substring(0,60)}`:””),20203,t)}const Q=”experience”,Y=[“common-monthly”],Z=Object.create(null),ee=2;function te(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=Z[t]||0;Z[t]=++e,e{delete Z[t];const e=window._pageTimings.retriedBundles;window._pageTimings.retriedBundles=e?`${e},${t}`:t,oe()},n}((o=t.src,Z[e],o),e);var o;setTimeout((()=>t.replaceWith(n)),100)}function ne(){const[e={}]=performance.getEntriesByType(“navigation”);return e.type}function oe(){if(!Object.values(Z).every((e=>e===ee)))return;let e=””;Object.keys(Z).forEach((t=>{e=e?`${e},${t}`:t,delete Z[t]})),e&&G(`Error when loading bundle(s): ${e}`,20202,{timeElapsed:Math.round(performance.now()),navType:ne()})}function ie(e){try{if(e)return JSON.parse(e)}catch(e){}return null}”undefined”!=typeof window&&window.document&&window.document.createElement&&(window._pageTimings=window._pageTimings||{},window.requestIdleCallback=window.requestIdleCallback||window.setTimeout);const re=”Authorization”;var se,ce;!function(e){e.Presentation=”presentation”}(se||(se={})),function(e){e.Unknown=”Unknown”,e.Portrait=”Portrait”,e.Landscape=”Landscape”}(ce||(ce={}));var ae,le;!function(e){e[e.Undefined=0]=”Undefined”,e[e.Basic=1]=”Basic”,e[e.Advanced=2]=”Advanced”,e[e.Premium=3]=”Premium”}(ae||(ae={})),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”}(le||(le={}));const de=new Set([“finance-app-win”,”weather-app-win”,”winpstoreapp”]),ue=new Set([“hpmsn”]);new Set([“chromentpnews”]);function he(){var e;return a()?(window._clientSettings=window._clientSettings||ie(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===e?void 0:e.getAttribute(“data-client-settings”))),window._clientSettings):null}const ge=”feed/personalize/settings”;function pe(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 me=new class{constructor(){a()?(this.isDebugEnabled=(pe(window.location.href,”debug”)||””).toLowerCase()in{1:1,true:1}||”vp”===(pe(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 we{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=ie(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 ie(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;me.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!!B(Ie)));const Ee=”__RequestDataInstance__”;class xe{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.vpCetoToken=e.vpCetoToken,this.oneServiceHeaders=Le(e.oneServiceHeaders)||{},this.isPssrMode=t,t){const e=_e(“OSATE”,this.cookie),t=!!e&&”1″===e,n=_e(“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=c.get(Ee);return e||(n.g.TEST_ENV?Te({href:”http://localhost:8080/”,innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””,vpCetoToken:””}):Te({href:”http://localhost:8080/”,innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””,vpCetoToken:””}))}static resetInstance(e){const t=new xe(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);return c.set(Ee,t),t}}function _e(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}function Le(e){try{if(e)return JSON.parse(e)}catch(e){}}const Te=xe.resetInstance,Oe=()=>xe.getInstance();function Ne(){return a()?window.location.search:Oe().url.search}function We(){try{return localStorage}catch(e){return null}}const Re=”__PageExperimentInstance__”;function Me(e){c.set(Re,e)}function Pe(e){if(!c.has(Re)&&a()){var t;Me(Ue(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=c.get(Re);return n&&n.has(e)}function Ue(e){const t=(e||””).replace(/(^f:|;.*$)/g,””).split(“,”);return new Set(t)}const De=”uxlogin”,Fe=”uxlogout”,$e=”uxedit”,He=”useRedirect”,Be=”uxswitch”,je=l((()=>{const e=We();return e&&”1″===e.getItem(De)||a()&&location.search&&location.search.includes(`${De}=1`)}));const Je=l((()=>{const e=function(){try{return sessionStorage}catch(e){return null}}();return e&&!!e.getItem(Fe)}));const Ve=l((()=>{const e=We();return e&&”1″===e.getItem($e)}));const Ge=l((()=>{const e=We();return!Pe(“prg-noredirect”)&&e&&”1″===e.getItem(He)&&function(){const{browser:e}=window._clientSettings||{},{browserType:t=””}=e||{};return!!/safari/i.test(t)}()}));const Ke=l((()=>{const e=We();return e&&”1″===e.getItem(Be)}));const Xe=he()||{};const ze={winWidgets:1,webWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channelmobile:1,edgeMobile:1},Qe={edgeChromium:1},Ye={winWidgets:1,webWidgets:1},Ze={edgeChromium:1,shopping:1,winWidgets:1,webWidgets:1,windowsShell:1,windowsShellV2:1,msn:1},et={edgeChromium:1,channelmobile:1,cgHomePage:1,distribution:1,winWidgets:1,webWidgets:1,windowsShell:1,windowsShellV2:1,superApp:1,edgeMobile:1},tt=l((()=>Xe&&Xe.apptype)),nt=(l((()=>a()&&tt()in Ye)),l((()=>a()&&!W()&&!(tt()in ze)&&!rt()&&!st()))),ot=l((()=>nt()&&!(tt()in Qe)));l((()=>nt()&&(!(tt()in Qe)||!qe()))),l((()=>nt()&&!at()&&!lt()));const it=l((()=>lt()||at())),rt=l((()=>!(tt()in Ze)&&dt()&&function(){if(“homePage”==tt())return!0;const e=new URLSearchParams(Ne()).get(“ocid”)||(null==Xe?void 0:Xe.ocid),t=null==e?void 0:e.toLowerCase();if(ue.has(t))return!0;return!de.has(t)}()&&!function(){const e=”homePage”==tt()&&”hp”==(Xe&&Xe.pagetype)&&(a()?window.location.href:Oe().url.href).includes(`${ge}`);return e}()));const st=()=>a()&&document&&document.body&&document.body.getElementsByClassName(“peregrine-widgets”).length>0;l((()=>tt()in et||rt()));function ct(){if(Ce)return Ce;const e=Se();return e||void 0}function at(){return ot()&&je()||function(){const e=ot()&&!ut()&&!je()&&Ae()&&(“expired”==function(){if(ye=ke(),!ye)return”notAvailable”;const e=ye.expiresOn,t=new Date(e),n=”expired”;return t.getTime()&&t>new Date?”valid”:n}()||Ve());return e}()||Je()||Ge()}function lt(){return ot()&&!Ae()&&Ke()}const dt=l((()=>{const{browser:e}=Xe,{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)}));l((()=>ot()&&!rt()));const ut=()=>{const e=Ae();if(!e)return!1;let t;switch(e.account_type){case”MSA”:t=ot()?”ace”:”aace”;break;case”AAD”:t=ot()?”WID”:”APP_WID”;break;default:return!1}return!!B(t)};const ht=”__core_auth_authHeaderPromiseParts__”,gt=()=>c.get(ht);let pt;function mt(){return pt}!function(){let e;const t={promise:new Promise((t=>e=t)),resolver:e};c.set(ht,t)}();const wt=l((()=>ie(B(“AL_STATE”,!0))));class ft{constructor(){this.childCookieName=”child”,this.command=”command”,this.domInfo=document.head.dataset.info,this.canvasInfo=document.head.dataset.canvasInfo||””}init(e,t){this.clientSettings=e||he(),this.authCookieName=mt()||window._authCookieName||””,this.bundle=window._webWorkerBundle||””,t=t||{};const n=this.buildWebWorkerUrl(this.clientSettings,t),o=window.webWorker=this.createWebWorkerInstance(n);o?this.initCore(o):console.warn(“Error while initializing the web worker.”)}initCore(e){const t=window.webWorkerMessages=[];e.onmessage=e=>{t.push(e.data)};const n=window.webWorkerErrors=[];e.onerror=e=>{n.push(e)},it()&&gt().promise.then((t=>e.postMessage({id:”AuthHeaders”,type:this.command,payload:t||{}})))}createWebWorkerInstance(e){return new Worker(e,{name:”web-worker”})}shouldFetchAppAnonCookie(){return!0}getAudienceMode(e){const t=B(this.authCookieName),n=B(this.childCookieName),{child:o}=t&&JSON.parse(t)||{};return t&&(1===o||n)?”kids”:e.audienceMode||”adult”}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=a()?window.devicePixelRatio:Oe().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(j(this.authCookieName),”aace”,”1″)+this.qs(j(“muid”),”muid”)+this.qs(j(this.childCookieName),”child”)+this.qs(j(“cbypass”),”cbypass”)+this.qs(this.cookieBannerConsentRequired().toString(),”ccRequired”)+this.qs(j(“ecasession”),”ecasession”)+this.qs(j(“TOptOut”),”browserOptOut”)}qsFromDataAttributeHelper(e,t,n){var o;e&&e.featureFlags&&e.featureFlags.wpoEnabled&&t&&!t.includes(“remwpofltww”)&&(t=this.appendWpoFlightsToInfo(e,t));const i=(null===(o=e.modes)||void 0===o?void 0:o.uxMode)||void 0;return 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”)+this.qs(n,”canvasInfo”)+this.qs(i,”uxMode”)}qsSelectedPivot(){const e=”selectedPivot”;let t;try{const n=We();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=We();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=We(),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)}}qsFromDataAttribute(e){let t,n,o;const i=We();if(i){const o=JSON.parse(i.getItem(“shd_”+e.pagetype)||null);o&&o.clientSettings&&o.info&&(t={…o.clientSettings,bundleInfo:e.bundleInfo},n=o.info)}return(!t||!n||e.pageGenTime>=t.pageGenTime)&&(t=e,n=this.domInfo,o=this.canvasInfo),t.audienceMode=this.getAudienceMode(t),this.qsFromDataAttributeHelper(t,n,o)}qsFromUrl(){const e=location.search;return e&&e.length?e.substring(1,e.length):””}qsMisc(e){return this.qs(performance.timeOrigin&&performance.timeOrigin.toString(),”mainTimeOrigin”)+this.qs(e.disableWWConfig&&”1″,”disableWWConfig”)}qsAuth(e){let t=this.qs(ot()&&”1″,”disableWWAuth”);if(!it()){const e=ot()&&ct()||{};t+=this.qs(encodeURIComponent(JSON.stringify(function(e){const t={};return e&&(t[re]=`Bearer ${e}`),t}(e.accessToken))),”authHeaders”)}return t+=this.qs(function(e){const t=e||mt()||”al_app_anon”,n=wt();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===B(“MSCC”),t=null!=document.getElementById(“onetrust-sdk”)&&null===B(“eupubconsent-v2″);return e||t}}function vt(e){return new Promise((t=>setTimeout(t,e)))}var bt,yt;!function(e){e.Anon=”ANON”,e.AppAnon=”APP_ANON”,e.Unknown=””}(bt||(bt={})),function(e){e.AnonCookieExists=”ace”,e.AppAnonCookieExists=”aace”}(yt||(yt={}));const Ct=”child”;function St(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}const kt=”prg-pr2-“,It=”prg-pw-“,At=”prg-“,qt=”prg-1sw-“;function Et(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:At;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 xt(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:””,n=At;var o,i;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?n=It:t.toLocaleLowerCase()===”windowsShell”.toLocaleLowerCase()||t.toLocaleLowerCase()===”windowsShellV2″.toLocaleLowerCase()?n=qt:t.toLocaleLowerCase()!==”winWidgets”.toLocaleLowerCase()||(null===(o=window)||void 0===o||null===(o=o.location)||void 0===o||null===(o=o.search)||void 0===o?void 0:o.includes(“reqsrc=vp”))||null!==(i=window)&&void 0!==i&&null!==(i=i.location)&&void 0!==i&&null!==(i=i.search)&&void 0!==i&&i.includes(“vptest”)||(n=kt),n}function _t(e){var t;return document.head.dataset[e]||(null===(t=Tt())||void 0===t?void 0:t.dataset[e])}let Lt;function Tt(){return void 0===Lt&&(Lt=document.getElementsByClassName(“peregrine-widget-settings”)[0]||null),Lt}function Ot(e){var t;if(!e||!e.startsWith(“f:”))return;const n=(e.match(/f:s*([^;]+)/i)||[])[1];return n?null===(t=n.toLowerCase().split(“,”))||void 0===t?void 0:t.sort():[]}!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};try{var n,o,i;if(!a())return t;const r=ie(_t(“clientSettings”))||{};let s=null===(n=r.apptype)||void 0===n?void 0:n.toLocaleLowerCase();const c=e.crsOptions||{};”winwidgets”!==s&&”homepage”!==s&&”travel”!==s||(c.crsPrefetch=!0),null!==(o=r.widgetAttributes)&&void 0!==o&&null!==(o=o.clientPerf)&&void 0!==o&&o.earlyCRSCall&&(c.crsPrefetch=!0),”edgechromium”===s&&(s=”edgechr”);const l=!(null===(i=r.widgetAttributes)||void 0===i||null===(i=i.clientPerf)||void 0===i||!i.shouldUsePWOnlyFlights),{all:d,prg:u}=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:””;const n=Ot(_t(“info”))||[];let o=Ot(_t(“canvasInfo”));if(!o){o=Et(n,xt(n,e,t))}return{all:n,prg:o}}(l,s);(c.crsPrefetch||d.includes(“inlinecrscall”)||d.includes(`icrscall-${s}`))&&(!function(e,t,n){const o=function(e,t){let n;const o=decodeURIComponent(St(e,”aace”)),{child:i}=o&&ie(o)||{},r=St(e,Ct);var s;return n=o&&(1===i||r)?”kids”:(null===(s=t.modes)||void 0===s?void 0:s.audienceMode)||t.audienceMode||”adult”,n}(document.cookie,e),{apptype:i,browser:r,domain:s,bundleInfo:{v:c}={},deviceFormFactor:l,locale:{content:d,display:u}={},ocid:h,os:g,modes:p,pagetype:m,servicesEndpoints:{crs:w}={}}=e,f=(Tt()?a()?window.location.hostname:Oe().url.hostname:s)||””;if(!i||!c||!w)return;const v={audienceMode:o,uxMode:null==p?void 0:p.uxMode},b={audienceMode:o,browser:r,deviceFormFactor:l,domain:f,locale:{content:d,display:u},ocid:h,os:g,modes:v,platform:”web”,pageType:m,pageExperiments:t},y=new URLSearchParams([[“expType”,”AppConfig”],[“expInstance”,”default”],[“apptype”,i],[“v”,c]]),C=Ne(),S=C.includes(“?item=”)||C.includes(“&item=”)?”&citem=dev:true&instance=Int1″:””,k=`${w.path}${w.v}/config/?${y}&targetScope=${JSON.stringify(b)}${S}`,I=e=>{const t=new URL(`https://${e}${k}`),{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})},A=”msn.”+(function(e,t){return!!(e.hostname.toLowerCase().endsWith(“.cn”)||t.isChinaCompliance||t.useCnDomain||e.search.match(/isChinaBuild=true/i)||e.search.match(/item=revip:cn/))}(location,e)?”cn”:”com”),{domain:q}=w,E=q&&new URL(q).host;let x=I(E||`assets.${A}`);n.disableFallback||(x=x.catch((()=>{const{hostname:e}=location,t=e.match(/.msn.(com|cn)$/)?e:`www.${A}`;return I(t)})));n.silenceUnhandledError&&(x=x.catch((e=>{console.error(“InlineHeadCommon: CRS fetch error in silence”,e)})));window.crsPromise=x}(r,u,c),t.inlineCRS=!0)}catch(e){console.error(“InlineHeadCommon: “+e)}}();const Nt=document.head.attributes[“data-info”].value;let Wt;if(Nt){const e=Nt.split(“;”).find((e=>e.startsWith(“f:”)));e&&(Wt=e.substring(2),Wt.indexOf(“1sw-pcsreturnhp”)>-1&&G(“PCS returned. Executing inline JS.”,8e4,{customMessage:location.href},J.Deprecated))}function Rt(e){var t;return((null===(t=document.head)||void 0===t||null===(t=t.getAttribute(“data-info”))||void 0===t?void 0:t.split(“;”).find((e=>e.startsWith(“f:”))))||””).includes(e)}if(Rt(“hp-noww”)||(new ft).init(),window.onerror=X,void 0!==window.onunhandledrejection&&(window.onunhandledrejection=z),window.onErrorHandler=K,function(e){const t=[“vendors”,”microsoft”,”common”];e&&t.push(…Y),window.addEventListener(“load”,(()=>{window._pageTimings.navType=ne(),window.requestIdleCallback((()=>{const e=function(e){const t=window.homePageWebpackChunks;if(!t)return[…e,Q];if(t.length>e.length)return[];t.forEach((t=>e.splice(e.indexOf(t[0][0]),1))),t.push===Array.prototype.push&&e.push(Q);return e}(t);e.length&&e.forEach((e=>te(e)))}))}),{once:!0})}(),Rt(“prg-hp-fvrf”)||async function(){window.apntag=window.apntag||{anq:[]},window.apntag.anq=window.apntag.anq||[],await async function(e){if(!a())return;const{src:t,id:n,async:o=!0,container:i=document.head,retryNumber:r=0,retryDelayMs:s=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(t<=1)return e();let o,i=1;do{try{o=await e()}catch(e){if(i===t)throw e&&e.message&&(e.message=`${e.message} after ${i} attempts`),e;await vt(n)}}while(!o&&++ifunction(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return new Promise(((i,r)=>{const s=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],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:”anonymous”,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0;if(!a())throw new Error(“createScriptTag is unsupported server side. This call should be wrapped in canUseDOM().”);const s=document.createElement(“script”);return t&&(s.id=t),i&&s.setAttribute(“class”,i),r&&(s.onload=r),s.type=”text/javascript”,e&&(window&&window.trustedTypesURLValidation?s.src=window.trustedTypesURLValidation(e,”scriptSrcUrlPolicy”):s.src=e,s.async=n,s.crossOrigin=o),window&&window.NONCE_ID&&(s.nonce=window.NONCE_ID),s}(e,t,o,void 0,void 0,(()=>i(!0)));s.crossOrigin=void 0,s.onerror=r,n.prepend(s)}))}(t,n,i,o)),r,s)}catch(e){G(“Failed to download Static JS”,11103,{scriptId:n,scriptSrc:t},J.Alert)}}({id:”display-sdk”,src:”https://adsdk.microsoft.com/ast/ast.js”,container:document.head,retryDelayMs:200,retryNumber:5})}(),Rt(“prg-hp-ssr”)||Rt(“prg-c-hp-ssr”)){var Mt;const e=null===(Mt=navigator.serviceWorker)||void 0===Mt?void 0:Mt.controller;setTimeout((()=>{G(“Early Log – No Alert”,19018,{swURL:null==e?void 0:e.scriptURL,swState:null==e?void 0:e.state,timeToSendEarlyLog:performance.now()},J.Deprecated)}),Rt(“prg-c-hp-ssr”)?50:0)}}(); ]]> {t=o,s=e}),window._idbConfigOpenPromise=(()=>{try{const d=o.open(“wwConfigs”,1);return new Promise((o,c)=>{d.onerror=(()=>{c(new Error(“Config IDB preload open failure: “+d.error))}),d.onsuccess=(()=>{r[n+”open-End”]=performance.now();const c=d.result;o(c),r[n+”getAllObjects-Start”]=performance.now();const a=c.transaction(e,”readonly”).objectStore(e).openCursor();a.onsuccess=function(){const o=this.result;o?(i[o.key]=o.value,o.continue()):(r[n+”getAllObjects-End”]=performance.now(),t())},a.onerror=(()=>{s(new Error(“Config IDB preload read failure”))})}),d.onupgradeneeded=(()=>{d.result.createObjectStore(e)})})}catch(o){return Promise.reject(new Error(“Config IDB preload open failure: “+o))}})()}preloadConfigIDB(); ]]>

Related Posts