MSN

[]
MSN window.innerWidth},innerHeight:{clientValue:()=>window.innerHeight},outerWidth:{clientValue:()=>window.outerWidth},breakpoint:{clientValue:()=>function(e,t){for(let n=t.length-1;n>=0;n–)if(e>=t[n])return n}(window.innerWidth,i)},locationHash:{clientValue:()=>window.location.hash},locationHref:{clientValue:()=>window.location.href},locationHost:{clientValue:()=>window.location.host},locationHostName:{clientValue:()=>window.location.hostname},locationOrigin:{clientValue:()=>window.location.origin},locationPathName:{clientValue:()=>window.location.pathname},locationProtocol:{clientValue:()=>window.location.protocol},locationSearch:{clientValue:()=>window.location.search},screenTop:{clientValue:()=>window.screenTop},screenY:{clientValue:()=>window.screenY},canUseCssGrid:{clientValue:()=>window.CSS&&window.CSS.supports&&CSS.supports(“display”,”grid”)||!1},devicePixelRatio:{clientValue:()=>window.devicePixelRatio},language:{clientValue:()=>document.documentElement.lang},direction:{clientValue:()=>document.documentElement.dir}}};Object.assign({},s.spec);function r(e){try{if(e)return JSON.parse(e)}catch(e){}return null}function a(e){try{return decodeURIComponent(e)}catch(e){}}function c(){return!(“undefined”==typeof window||!window.document||!window.document.createElement||window.isRenderServiceEnv)}const u=”Authorization”;var d,l;!function(e){e.Presentation=”presentation”}(d||(d={})),function(e){e.Unknown=”Unknown”,e.Portrait=”Portrait”,e.Landscape=”Landscape”}(l||(l={}));var p,h;!function(e){e[e.Undefined=0]=”Undefined”,e[e.Basic=1]=”Basic”,e[e.Advanced=2]=”Advanced”,e[e.Premium=3]=”Premium”}(p||(p={})),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”}(h||(h={}));new Set([“winp0dash”,”winp1taskbar”,”winp1taskbarent”,”winp1taskbardirect”,”winp1taskbardirectent”,”winp1taskbarent”,”winp2juntaskbar”,”winp2juntaskbarent”,”winp2″,”winp2ent”,”winp2fp”,”winp2fpent”,”winp2fptaskbar”,”winp2fptaskbarent”,”winp2fptaskbarhover”,”winp2fptaskbarhoverent”,”winp2widget”,”winp2widgetent”]);const g=new Set([“finance-app-win”,”weather-app-win”,”winpstoreapp”]);new Set([“msedgdhp”,”msedgdhphdr”,”msedgntphdr”,”msedgntp”,”msedgdhp”,”entnewsntp”]);var w;!function(e){e.outlookMobile=”OnOOutlookMobile”,e.officeMobile=”OnOOfficeMobile”,e.sapphire=”OnOStartApp”,e.skype=”OnOSkype”}(w||(w={}));const m=new Set([“hpmsn”]);new Set([“emmx”,”vivo”]);function f(){var e;return c()?r(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===e?void 0:e.getAttribute(“data-client-settings”))):null}function b(e,t,n,o){return new(n||(n=Promise))((function(i,s){function r(e){try{c(o.next(e))}catch(e){s(e)}}function a(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}c((o=o.apply(e,t||[])).next())}))}Object.create;Object.create;let y=new Map;const S=Object.freeze({set(e,t){return y.set(e,t),this},get:function(e,t){let n=y.get(e);return void 0===n&&t&&(n=t(),y.set(e,n)),n},clear(){y.clear()},delete:e=>y.delete(e),has:e=>y.has(e)});const v=”__RequestDataInstance__”;class k{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=S.get(v);return e||(o.g.TEST_ENV?C({href:”http://localhost:8080/”,innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}):C({href:”http://localhost:8080/”,innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}))}static resetInstance(e,t=!1){const n=new k(e,t);return S.set(v,n),n}}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 C=k.resetInstance,O=()=>k.getInstance();let I,P,E,_;function q(){if(P)return P;const e=document.head.getAttribute(“data-info”);return P=((/f:s*([^;]+)/i.exec(e)||{})[1]||””).toLowerCase(),P}function x(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?a(n[1]):null}(e);if(!E){const e=”undefined”!=typeof document&&document.cookie.split(“; “);E={};const t=e&&e.length;for(let n=0;nthis.maxLength&&this.list.shift()}get data(){return this.list}};function D(e,t,n,o=T.Alert){try{const i=function(){if(!I){const e=document.head.getAttribute(“data-client-settings”);e&&(I=JSON.parse(e))}return I}(),s=q(),r=function(e){if(e){const{pcsInfo:t,pageGenTime:n}=e,o=new Date(n).getTime(),i=[“prod”,”prod-ssr”,”prod-ssrntp”],s=!t||i.includes(t.env);_=s?”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:s?”0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279″:”f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028″,”upload-time”:o,w:”0″,anoncknm:”app_anon”}}return null}(i);let a=””;r&&r.apikey&&””!==r.apikey&&(a=function(e){if(e){const t=e.indexOf(“-“);if(t>0)return e.substring(0,t)}return””}(r.apikey));const c=function(e,t,n,o,i,s,r=T.Alert){var a;if(n){i=i||{};const{apptype:c,audienceMode:u,pagetype:d,pageGenTime:l,bundleInfo:p,deviceFormFactor:h=””,fd_muid:g,os:w}=n;i.pageGenTime=l,i.build=p&&p.v,i.appType=c;const m=function(e,t,n){const o=n&&”phone”===n.toLowerCase();return{bingHomepage:”binghomepage”,mmx:”emmx”,edge:”spartan”,edgeChromium:t&&”enterprise”===t?”entnews”:”anaheim”,hybrid:”spartan”,hub:o?”prime_mobile”:”prime”,microsoftNews:”msnews”,office:”entnews”,views:o?”prime_mobile”:”prime”,windowsShell:”windowsshell”}[e]}(c,u,h),f=m||c,b=document.getElementsByTagName(“html”)[0].getAttribute(“lang”);let y,S=””,v=”muid”;try{if(“edgeChromium”===c&&”object”==typeof window&&window.location&&window.location.search){const e=new URLSearchParams(window.location.search);y=e.has(“startpage”)?”msedgdhp”:”msedgntp”,”enterprise”===u?y=”entnewsntp”:”xbox”===w&&(y=”xboxntp”)}window&&window.getCookieConsentRequired&&”function”==typeof window.getCookieConsentRequired&&window.getCookieConsentRequired()||(S=x(“muid”))}catch(e){}S||(S=n.aid,v=”aid”);const k={name:”MS.News.Web.AppError”,time:l,ver:”4.0″,iKey:`o:${o}`,data:{baseData:{},baseType:”MS.News.Web.Base”,page:{name:”default”,product:f,type:L(d),content:{category:”standaloneError”},ocid:y},browser:{clientId:S,clientIdType:v},flight:{id:s},request:{activityId:n.aid,requestId:n.aid,afdMuid:g},locale:{mkt:b},extSchema:{id:e,severity:r,pb:i,message:t}}};return S&&”muid”===v&&(k.ext=Object.assign(Object.assign({},null==k?void 0:k.ext),{user:Object.assign(Object.assign({},null===(a=null==k?void 0:k.ext)||void 0===a?void 0:a.user),{localId:`t:${S}`})})),k.data.flight.tmpl=””,i.isSSRScope&&(k.data.flight.tmpl+=”ssrscope:1″),”object”==typeof window&&(window.isSSREnabled&&(k.data.flight.tmpl+=”;ssr-enabled:1″),window.isSSRCompleted&&(k.data.flight.tmpl+=”;ssr-completed:1″)),k?JSON.stringify(k):null}return null}(t,e,i,a,n,s,o);if(r&&c){console.error(c),R.push(c);const e=”https://”+_+”/OneCollector/1.0″+function(e){return”?”+Object.keys(e).map((function(t){return t+”=”+encodeURIComponent(e[t])})).join(“&”)}(r);navigator.sendBeacon(e,c)}}catch(e){}}function L(e){let t=e;switch(e){case”windowsshellhp”:t=”dhp”;break;case”video”:t=”watch”}return t}function M(e){return new Promise((t=>setTimeout(t,e)))}function F(){return b(this,void 0,void 0,(function*(){window.apntag=window.apntag||{anq:[]},window.apntag.anq=window.apntag.anq||[],yield function(e){return b(this,void 0,void 0,(function*(){if(!c())return;const{src:t,id:n,async:o=!0,container:i=document.head,retryNumber:s=0,retryDelayMs:r=0}=e;try{yield function(e,t=3,n=100){return b(this,void 0,void 0,(function*(){if(t<=1)return e();let o,i=1;do{try{o=yield e()}catch(e){if(i===t)throw e&&e.message&&(e.message=`${e.message} after ${i} attempts`),e;yield M(n)}}while(!o&&++ifunction(e,t,n,o=!0){return new Promise(((i,s)=>{const r=function(e,t,n=!0,o=”anonymous”,i,s){if(!c())throw new Error(“createScriptTag is unsupported server side. This call should be wrapped in canUseDOM().”);const r=document.createElement(“script”);return t&&(r.id=t),i&&r.setAttribute(“class”,i),s&&(r.onload=s),r.type=”text/javascript”,e&&(r.src=e,r.async=n,r.crossOrigin=o),window&&window.NONCE_ID&&(r.nonce=window.NONCE_ID),r}(e,t,o,void 0,void 0,(()=>i(!0)));r.crossOrigin=void 0,r.onerror=s,n.prepend(r)}))}(t,n,i,o)),s,r)}catch(e){D(“Failed to download Static JS”,11103,{scriptId:n,scriptSrc:t},T.Alert)}}))}({id:”display-sdk”,src:”https://acdn.adnxs.com/ast/ast.js”,container:document.head,retryDelayMs:200,retryNumber:5})}))}var W,U;!function(e){e.Article=”article”,e.ArticleFullScreen=”articlefullscreen”,e.CasualGames=”casualgames”,e.CasualGamesPlay=”casualgamesplay”,e.ChannelSource=”channel::source”,e.ChannelTopic=”channel::topic”,e.CmsExperience=”shopping::cms”,e.CmsBaseExperience=”shopping::cmsbase”,e.DHP=”dhp”,e.EdgeWelcome=”edgewelcome”,e.ForumDealsPage=”shopping::buydirect::superdeals”,e.Gallery=”gallery”,e.GalleryFullScreen=”galleryfullscreen”,e.Homepage=”hp”,e.Launcher=”launcher”,e.Lenovo=”lenovo”,e.MMX=”mmx”,e.NewsAndInterests=”newsandinterestshp”,e.Newsbar=”newsbar”,e.NewsbarUpsell=”newsbarupsell”,e.NewsCoronavirus=”news::coronavirus”,e.NewsVLP=”news”,e.NTP=”ntp”,e.Sidebar=”sidebar”,e.Story=”story”,e.Shopping=”shopping”,e.ShoppingDealsCategory=”shopping::deals-category”,e.ShoppingProductDetails=”shopping::product”,e.ShoppingExpressCheckout=”shopping::express-checkout”,e.ShoppingForumCheckout=”shopping::buydirect::checkout”,e.ShoppingForumProductPage=”shopping::buydirect::product”,e.ShoppingForumcheckoutWidget=”shopping::buydirect::checkout::widget”,e.ShoppingForumProductDetails=”shopping::buydirect::product1″,e.ShoppingForumCancelOrder=”shopping::buydirect::cancel-order”,e.ShoppingForumReturnDetails=”shopping::buydirect::return-details”,e.ShoppingForumReturnOrder=”shopping::buydirect::return-orders”,e.ShoppingForumRefundDetails=”shopping::buydirect::refund-details”,e.ShoppingForumRefundOrder=”shopping::buydirect::refund-orders”,e.ShoppingLiveDetails=”shoppinglivedetails”,e.ShoppingLiveInmobiDetails=”shoppingliveinmobidetails”,e.ShoppingLiveEmbed=”shopping::live::embed”,e.ShoppingLiveFeed=”shopping::live”,e.ShoppingLiveBase=”shopping::live”,e.ShoppingMomentInTime=”shopping::mit”,e.ShoppingExplore=”shopping::explore”,e.ShoppingExploreHalloween=”shopping::explore::halloween”,e.ShoppingCouponsPage=”shopping::coupons”,e.ShoppingDealsHomePage=”shopping::deals::coupons”,e.ShoppingStoreCouponsPage=”shopping::store-coupons”,e.ShoppingStyles=”shopping::styles”,e.ShoppingStylesHomePage=”shopping::style-ideas”,e.ShoppingLanding=”shopping::buydirect”,e.ShoppingSearchResult=”shopping::buydirect::search”,e.ShoppingCart=”shopping::buydirect::cart”,e.ShoppingOrders=”shopping::buydirect::orders”,e.ShoppingForumOrderConfirmation=”shopping::buydirect::order-confirmation”,e.ShoppingForumOrderDetails=”shopping::buydirect::order-details”,e.ShoppingForumHome=”shopping::buydirect::home”,e.Source=”source”,e.Sports=”sports”,e.Topic=”topic”,e.Travel=”travel”,e.TravelPlaces=”travel::places”,e.TravelCollections=”travel::collections”,e.Video=”video”,e.VideoInf=”videoinf”,e.WebContent=”webcontent”,e.Widget=”widget”,e.Windows=”windowshp”,e.WindowsShellHP=”windowsshellhp”,e.ShoppingAllStoresPage=”shopping::stores::popular”,e.ShoppingLiveProductDetailsPage=”shopping::live::product”,e.ShoppingForumSellerPage=”shopping::buydirect::stores”,e.ShoppingForumFavorites=”shopping::buydirect::favorites”,e.ShoppingBlackjackPage=”shopping::deals”,e.ShoppingBlackjackDealPage=”shopping::deals::product”,e.ShoppingSearch=”shopping::search”,e.ShoppingBingProductDetails=”shopping::product-details”,e.ShoppingInspiration=”shopping::inspire”,e.ShoppingBuyingGuide=”shopping::buying-guide”,e.ShoppingAssistant=”shopping::ai”,e.ShoppingShopDeals=”shopping::shopdeals”,e.ShoppingArticlePage=”shopping::shop-article”,e.ShoppingGuidesPage=”shopping::shop-guides”,e.ShoppingDebugPage=”shopping::debug”}(W||(W={})),function(e){e.Adult=”adult”,e.Enterprise=”enterprise”,e.Kids=”kids”}(U||(U={}));const H=”feed/personalize/settings”;var j,V,B;function G(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}!function(e){e[e.Unknown=0]=”Unknown”,e[e.NotSignedIn=1]=”NotSignedIn”,e[e.SignedIn=2]=”SignedIn”}(j||(j={})),function(e){e.MSA=”MSA”,e.AAD=”AAD”,e.UNSUPPORTED_SOVEREIGNTY=”UNSUPPORTED_SOVEREIGNTY”}(V||(V={})),function(e){e[e.NonAadAccount=0]=”NonAadAccount”,e[e.AadAccount=1]=”AadAccount”,e[e.Unknown=2]=”Unknown”}(B||(B={}));const $=”currentaccount”,J=G((()=>{const e=x($,!0),t=e&&r(e),{login_hint:n}=t||{};return n&&t})),X=G((()=>!!x($)));let z=new class{constructor(){c()?(this.isDebugEnabled=(function(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,” “))||””}(window.location.href,”debug”)||””).toLowerCase()in{1:1,true:1},this.isDebugEnabled&&!o.g.TEST_ENV&&(window.webpackRequire=o)):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(…e){this.isDebug()&&console.log(…e)}logSingleObject(e,t){this.isDebug()&&console.log(e)}};let K=new class extends class{constructor(e){this.storage=e}get supported(){return!!this.storage}getItem(e){if(this.supported)return this.storage.getItem(e)}getObject(e,t){const n=this.getItem(e);if(null!=n){const e=r(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 r(t)}setItem(e,t,n=!0){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;z.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;no)return i}}return n}function ce(){return ie=ie||void 0===ie&&K.getObject(te)||null,ie}function ue(){try{return localStorage}catch(e){return null}}!function(e){e.NotAvailable=”notAvailable”,e.Expired=”expired”,e.Valid=”valid”}(oe||(oe={}));const de=”uxlogin”,le=”uxlogout”,pe=”uxedit”,he=”useRedirect”,ge=”uxswitch”,we=G((()=>{const e=ue();return e&&”1″===e.getItem(de)||c()&&location.search&&location.search.includes(“uxlogin=1”)}));const me=G((()=>{const e=function(){try{return sessionStorage}catch(e){return null}}();return e&&!!e.getItem(le)}));const fe=G((()=>{const e=ue();return e&&”1″===e.getItem(pe)}));const be=G((()=>{const e=ue(),t=!Z(“prg-noredirect”)&&e&&”1″===e.getItem(he)&&function(){const e=document.head.dataset.clientSettings||””,{browser:t}=r(e)||{},{browserType:n=””}=t||{};return!!/safari/i.test(n)}();return t}));const ye=G((()=>{const e=ue();return e&&”1″===e.getItem(ge)}));var Se;!function(e){e.outlookMobile=”OnOOutlookMobile”,e.officeMobile=”OnOOfficeMobile”,e.sapphire=”OnOStartApp”,e.skype=”OnOSkype”,e.winWeatherApp=”weather-app-win”,e.winMoneyApp=”finance-app-win”}(Se||(Se={}));const ve=[“ios”,”android”,”ipados”];let ke=Te(“ocid”).toLowerCase(),Ae=Te(“chpltfm”),[Ce,Oe]=Ae.toLowerCase().split(“-“);function Ie(){if(!c())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 Pe(){const e=Ae&&”outlook”===Ce&&ve.includes(Oe),t=ke===Se.outlookMobile.toLowerCase();return e||t}function Ee(){const e=Ae&&[“office”,”union”].includes(Ce)&&ve.includes(Oe),t=ke===Se.officeMobile.toLowerCase();return e||t}function _e(){const e=ke===Se.skype.toLowerCase()||”skype”===Ce;return c()&&(null===(t=window.skypeWebviewBridge)||void 0===t?void 0:t.isSkype)||e;var t}function qe(){return Ie()||ke===Se.sapphire.toLowerCase()||ke===”superappdhp”.toLowerCase()}function xe(){return”3rdp”===Ce}const Ne=G((()=>Ie()||_e()||Ee()||Pe()||qe()||ke===Se.winWeatherApp.toLowerCase()||ke===Se.winMoneyApp.toLowerCase()||function(){const e=Te(“edge”);return(“emmx”===Ce||”1″===e)&&qe()}()||xe()));function Te(e){try{return new URL(location.href).searchParams.get(e)||””}catch(e){return””}}const Re=f()||{},De={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channel:1},Le={edgeChromium:1},Me={winWidgets:1},Fe={shopping:1},We=G((()=>Re&&Re.apptype)),Ue=(G((()=>c()&&We()in Me)),G((()=>c()&&!Ne()&&!(We()in De)&&!Ve()&&!Be()))),He=G((()=>Ue()&&!(We()in Le)));G((()=>Ue()&&(!(We()in Le)||!X()))),G((()=>Ue()&&!Je()&&!Xe()));function je(){return Xe()||Je()}const Ve=G((()=>{const e=”edgeChromium”!==We()&&!(We()in Fe)&&function(){const{browser:e}=Re,{browserType:t=””}=e||{};return!!/edgeChromium/i.test(t)}()&&function(){const e=new URLSearchParams(c()?window.location.search:O().url.search).get(“ocid”)||(null==Re?void 0:Re.ocid),t=null==e?void 0:e.toLowerCase();return!m.has(t)&&”homePage”!==We()&&!g.has(t)}()&&!(“windows”==We()&&(Re&&Re.pagetype)==W.Windows&&(c()?window.location.href:O().url.href).includes(`${H}`));return e})),Be=()=>c()&&document&&document.body&&document.body.getElementsByClassName(“peregrine-widgets”).length>0;G((()=>Z(“prg-1s-workid”)));function Ge(){const e=se;if(e)return z.log(“dual-auth: tryGet1SAuthToken returned live tokens”),e;const t=re();if(t)return z.log(`dual-auth: tryGet1SAuthToken returned cached tokens that are ${ae()}`),t;z.log(“dual-auth: tryGet1SAuthToken returned empty tokens”)}function $e(e){const t={};return e&&(t[u]=`Bearer ${e}`),t}function Je(){return He()&&we()||He()&&!we()&&J()&&(“expired”==ae()||fe())||me()||be()}function Xe(){return He()&&!J()&&ye()}const ze=”__core_auth_authHeaderPromiseParts__”,Ke=()=>S.get(ze);var Ye;!function(){let e;const t={promise:new Promise((t=>e=t)),resolver:e};S.set(ze,t)}(),function(e){e.GLOBAL=”GLOBAL”,e.GCC_MODERATE=”GCC_MODERATE”}(Ye||(Ye={}));let Qe;function Ze(){return Qe}const et=G((()=>r(x(“AL_STATE”,!0))));var tt;!function(e){e.Adult=”adult”,e.Enterprise=”enterprise”,e.Kids=”kids”}(tt||(tt={}));class nt{constructor(){this.childCookieName=”child”,this.domInfo=document.head.dataset.info,this.command=”command”}init(e=null){this.clientSettings=e||f(),this.authCookieName=Ze()||window._authCookieName||””,this.bundle=window._webWorkerBundle||””;const t=this.buildWebWorkerUrl(),n=window.webWorker=new Worker(t,{name:”web-worker”}),o=window.webWorkerMessages=[];n.onmessage=e=>{o.push(e.data)};const i=window.webWorkerErrors=[];if(n.onerror=e=>{i.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&&n.postMessage({id:”FeedDisplaySetting”,type:this.command,payload:e.value})})),t.getPref(“ntp.layout_mode”,(e=>{e&&e.value&&n.postMessage({id:”LayoutModeSetting”,type:this.command,payload:e.value})})),t.getPref(“ntp.user_nurturing”,(e=>{let t=!1;e&&e.value&&e.value.length&&(t=this.getSingleColRequest(e.value)),n.postMessage({id:”RenderSingleColumn”,type:this.command,payload:t})})),t.getPref(“new_device_fre.has_user_seen_new_fre”,(e=>{e&&n.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″)&&n.postMessage({id:”EdgeNoAds”,type:this.command,payload:!0}),t.includes(“msReducedNtpAdsForNewDevice_stage2″)&&n.postMessage({id:”EdgeReduceAds”,type:this.command,payload:!0})})),e===tt.Enterprise&&this.clientSettings.browser&&”edgeChromium”===this.clientSettings.browser.browserType&&parseInt(this.clientSettings.browser.version)>=87?this.getEnterpriseAccessToken().then((e=>{e&&n.postMessage({id:”AuthTokenEnterprise”,type:this.command,payload:$e(e)})})):n.postMessage({id:”AuthTokenEnterprise”,type:this.command,payload:{}}),e!==tt.Adult&&e!==tt.Enterprise||this.sendPageConfiguration()}je()&&Ke().promise.then((e=>n.postMessage({id:”AuthHeaders”,type:this.command,payload:e||{}})))}buildWebWorkerUrl(e=null){return(this.bundle||””)+”#”+this.qsFromDocument()+this.qsFromCookies()+this.qsFromDataAttribute(e||this.clientSettings)+this.qsMisc()+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=c()?window.devicePixelRatio:O().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(N(this.authCookieName),”aace”)+this.qs(N(“muid”),”muid”)+this.qs(N(this.childCookieName),”child”)+this.qs(N(“cbypass”),”cbypass”)+this.qs(this.cookieBannerConsentRequired().toString(),”ccRequired”)+this.qs(N(“ecasession”),”ecasession”)+this.qs(N(“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=ue();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=ue();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=ue(),o=parseInt(e),i=parseInt(JSON.parse(n.getItem(`cbid_${t||””}`)));let s;if(o&&!isNaN(o)&&i&&!isNaN(i)&&(s=o>i?o:i),s=s||o||i,s)return window._cbid=s.toString()}catch(e){console.warn(“Error getting highest CBID”+e)}}getAudienceMode(e){ue();const t=x(this.authCookieName),n=x(this.childCookieName),{child:o}=t&&JSON.parse(t)||{};return t&&(1===o||n)?”kids”:e.audienceMode||tt.Adult}sendPageConfiguration(){const e=this.clientSettings.pagetype;if(e){const t=x&&x(“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=ue();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):””}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(){return this.qs(performance.timeOrigin&&performance.timeOrigin.toString(),”mainTimeOrigin”)}qsAuth(e){let t=this.qs(He()&&”1″,”disableWWAuth”);if(!je()){const e=He()&&Ge()||{};t+=this.qs(encodeURIComponent(JSON.stringify($e(e.accessToken))),”authHeaders”)}return t+=this.qs(function(e){const t=e||Ze()||”al_app_anon”,n=et();return!(!n||!([“anon”,”al_anon”].includes(t)&&n.AL_ANON||[“app_anon”,”al_app_anon”].includes(t)&&n.AL_APP_ANON))}()&&”1″,”isAccountLinked”),t}getSingleColRequest(e){const t=”render_single_column”,n=”feed_layout”;let o,i;for(const s of e){const{key:e,value:r}=s;e===t?o=r:e===n&&(i=r)}return”boolean”==typeof o?o:!!i&&(i&&”single”===i.type)}cookieBannerConsentRequired(){const e=null!=document.getElementById(“consent-banner-container”)&&null===x(“MSCC”),t=null!=document.getElementById(“onetrust-sdk”)&&null===x(“eupubconsent-v2″);return e||t}}const ot=f();function it(e){return((null==ot?void 0:ot.ocid)||””).toLowerCase().includes(e.toLowerCase())}function st(){return it(“superappdhp”)}function rt(){return”visible”===document.visibilityState?Promise.resolve():new Promise((e=>{document.addEventListener(“visibilitychange”,(()=>{“visible”===document.visibilityState&&e()}))}))}function at(e){const t=window&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&t.logLoadingError&&rt().then((()=>{t.logLoadingError(e)}))}function ct(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 JSON.stringify(e)}catch(e){return””}}(e)}!function(){!function(e=[“vendors”,”common”,”microsoft”],t=”Error when loading bundle(s): “,n=5e5,o,i){rt().then((()=>{setTimeout((()=>{const n=window.webpackJsonp;if(n){const s=n.length,r=e.length+1;s{t.length&&t[0][0]&&e.splice(e.indexOf(t[0][0]),1)})),at(20202),D(t+e.toString(),20202,{}),i&&(at(o),i(o,{customMessage:e.toString()})))}}),n)}))}();const e=new Set([“Script error.”,”ResizeObserver loop limit exceeded”,”ResizeObserver loop completed with undelivered notifications.”]);window.onerror=function(t,n,o,i,s){if(e.has(t))return;D(“JS Exception”,20203,{source:n,line:o,message:t,stack:ct(s,!0),currentUrl:window.location.href,column:i},T.Alert)}}(),st()||(new nt).init(),st()||it(“skype”)||it(“office”)||it(“outlook”)||F()}(); ]]> onErrorHandler(s.src);s.nonce=””;s.crossOrigin=”anonymous”;document.body.appendChild(s);} ]]>

You May Also Like

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다