MSN {document.addEventListener(“visibilitychange”,(()=>{“visible”===document.visibilityState&&e()}))}))}function w(e){const t=window&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&t.logLoadingError&&m().then((()=>{t.logLoadingError(e)}))}function b(){return!(“undefined”==typeof window||!window.document||!window.document.createElement||window.isRenderServiceEnv)}const y=”Authorization”,v=”UserAuthToken”;var k,S;!function(e){e.Presentation=”presentation”}(k||(k={})),function(e){e.Unknown=”Unknown”,e.Portrait=”Portrait”,e.Landscape=”Landscape”}(S||(S={}));var A,x;!function(e){e[e.Undefined=0]=”Undefined”,e[e.Basic=1]=”Basic”,e[e.Advanced=2]=”Advanced”,e[e.Premium=3]=”Premium”}(A||(A={})),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”}(x||(x={}));new Set([“winp0dash”,”winp1taskbar”,”winp1taskbarent”,”winp1taskbardirect”,”winp1taskbardirectent”,”winp1taskbarent”,”winp2juntaskbar”,”winp2juntaskbarent”,”winp2″,”winp2ent”,”winp2fp”,”winp2fpent”,”winp2fptaskbar”,”winp2fptaskbarent”,”winp2fptaskbarhover”,”winp2fptaskbarhoverent”,”winp2widget”,”winp2widgetent”]);const O=new Set([“finance-app-win”,”weather-app-win”]);new Set([“msedgdhp”,”msedgdhphdr”,”msedgntphdr”,”msedgntp”,”msedgdhp”,”entnewsntp”]);var I;!function(e){e.outlookMobile=”OnOOutlookMobile”,e.officeMobile=”OnOOfficeMobile”,e.sapphire=”OnOStartApp”,e.skype=”OnOSkype”}(I||(I={}));const _=new Set([“hpmsn”]);function C(){var e;return b()?a(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===e?void 0:e.getAttribute(“data-client-settings”))):null}var q,E,T;function M(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”}(q||(q={})),function(e){e.MSA=”MSA”,e.AAD=”AAD”,e.UNSUPPORTED_SOVEREIGNTY=”UNSUPPORTED_SOVEREIGNTY”}(E||(E={})),function(e){e[e.NonAadAccount=0]=”NonAadAccount”,e[e.AadAccount=1]=”AadAccount”,e[e.Unknown=2]=”Unknown”}(T||(T={}));const N=”currentaccount”,R=M((()=>{const e=u(N,!0),t=e&&a(e),{login_hint:n}=t||{};return n&&t})),P=M((()=>!!u(N)));let L=new class{constructor(){b()?(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&&!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(…e){this.isDebug()&&console.log(…e)}logSingleObject(e,t){this.isDebug()&&console.log(e)}};let D=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=a(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 a(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;L.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;nU.has(e)});const F=”__PageExperimentInstance__”;function H(e){W.set(F,e)}function j(e){!W.has(F)&&b()&&H(B(document.head.dataset.info||””));const t=W.get(F);return t&&t.has(e)}function B(e){const t=(e||””).replace(/(^f:|;.*$)/g,””).split(“,”);return new Set(t)}const G=”1s-tokens”,$=12096e5;var J;let V,z;function X(){return V=Y(),V&&V.accessToken?V:void 0}function K(){if(V=Y(),!V)return”notAvailable”;const e=V.expiresOn,t=new Date(e),n=”expired”;if(!t.getTime())return n;const o=new Date,i=”valid”;if(t>o)return i;if(j(“prg-noext”))return n;{const e=R();if(e&&e.account_type===E.MSA){if(new Date(t.getTime()+$)>o)return i}}return n}function Y(){return V=V||void 0===V&&D.getObject(G)||null,V}!function(e){e.NotAvailable=”notAvailable”,e.Expired=”expired”,e.Valid=”valid”}(J||(J={}));const Z=”__RequestDataInstance__”;class Q{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=ee(“OSATE”,this.cookie),t=!!e&&”1″===e,n=ee(“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=W.get(Z);return e||(n.g.TEST_ENV?te({href:”http://localhost:8080/”,innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}):te({href:”http://localhost:8080/”,innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}))}static resetInstance(e,t=!1){const n=new Q(e,t);return W.set(Z,n),n}}function ee(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 te=Q.resetInstance,ne=()=>Q.getInstance();function oe(){try{return localStorage}catch(e){return null}}const ie=”uxlogin”,se=”uxlogout”,re=”uxedit”,ce=”useRedirect”,ae=”uxswitch”,de=M((()=>{const e=oe();return e&&”1″===e.getItem(ie)||b()&&location.search&&location.search.includes(“uxlogin=1”)}));const ue=M((()=>{const e=function(){try{return sessionStorage}catch(e){return null}}();return e&&!!e.getItem(se)}));const le=M((()=>{const e=oe();return e&&”1″===e.getItem(re)}));const pe=M((()=>{const e=oe(),t=!j(“prg-noredirect”)&&e&&”1″===e.getItem(ce)&&function(){const e=document.head.dataset.clientSettings||””,{browser:t}=a(e)||{},{browserType:n=””}=t||{};return!!/safari/i.test(n)}();return t}));const he=M((()=>{const e=oe();return e&&”1″===e.getItem(ae)}));var ge,fe;!function(e){e.Adult=”adult”,e.Enterprise=”enterprise”,e.Kids=”kids”}(ge||(ge={})),function(e){e.outlookMobile=”OnOOutlookMobile”,e.officeMobile=”OnOOfficeMobile”,e.sapphire=”OnOStartApp”,e.skype=”OnOSkype”,e.winWeatherApp=”weather-app-win”,e.winMoneyApp=”finance-app-win”}(fe||(fe={}));let me=Oe(“ocid”),we=Oe(“chpltfm”),[be,ye]=we.toLowerCase().split(“-“);function ve(){if(!b())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 ke(){const e=we&&”outlook”===be&&[“ios”,”android”].includes(ye),t=me===fe.outlookMobile;return e||t}function Se(){const e=we&&[“office”,”union”].includes(be)&&[“ios”,”android”].includes(ye),t=me===fe.officeMobile;return e||t}function Ae(){const e=me===fe.skype||”skype”===be;return b()&&(null===(t=window.skypeWebviewBridge)||void 0===t?void 0:t.isSkype)||e;var t}const xe=M((()=>ve()||Ae()||Se()||ke()||ve()||me===fe.sapphire||”superappdhp”===me||me===fe.winWeatherApp||me===fe.winMoneyApp));function Oe(e){try{return new URL(location.href).searchParams.get(e)||””}catch(e){return””}}const Ie=C()||{},_e={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channel:1},Ce={edgeChromium:1},qe={winWidgets:1},Ee={shopping:1,ugc:1},Te=M((()=>Ie&&Ie.apptype)),Me=M((()=>!!(Re()&&(R()||!u(“ace”))))),Ne=(M((()=>b()&&Te()in qe)),M((()=>b()&&!xe()&&!(Te()in _e)&&!Ue()&&!We()))),Re=M((()=>Ne()&&!(Te()in Ce)));M((()=>Ne()&&(!(Te()in Ce)||!P()))),M((()=>Ne()&&!Be()&&!Ge()));function Pe(){return Ge()||Be()}function Le(e){return De(e)&&(j(“prg-ntp-uat”)||j(“prg-ntp-uat-nf”))}function De(e){return!(“edgeChromium”!=Te()||e!=ge.Adult&&e!=ge.Kids||!u(“at”)&&!u(“lt”))}M((()=>{const e=(b()?window.location.host:ne().url.host).toLowerCase().endsWith(“.cn”);return Ne()&&(!e||e&&!j(“prg-no-auth-zhcn”))}));const Ue=M((()=>{const e=”edgeChromium”!==Te()&&!(Te()in Ee)&&function(){const{browser:e}=Ie,{browserType:t=””}=e||{};return!!/edgeChromium/i.test(t)}()&&function(){const e=new URLSearchParams(b()?window.location.search:ne().url.search).get(“ocid”)||(null==Ie?void 0:Ie.ocid),t=null==e?void 0:e.toLowerCase();return!_.has(t)&&”homePage”!==Te()&&!O.has(t)}();return e})),We=()=>b()&&document&&document.body&&document.body.getElementsByClassName(“peregrine-widgets”).length>0;function Fe(){const e=z;if(e)return L.log(“dual-auth: tryGet1SAuthToken returned live tokens”),e;const t=X();if(t)return L.log(`dual-auth: tryGet1SAuthToken returned cached tokens that are ${K()}`),t;L.log(“dual-auth: tryGet1SAuthToken returned empty tokens”)}function He(e){const t={};return e&&(t[y]=`Bearer ${e}`),t}function je(e){const t={};return e&&(t[v]=e),t}function Be(){return Re()&&de()||Me()&&(Me()&&!de()&&R()&&(“expired”==K()||le())||ue()||pe())}function…
Continue reading