MSN
MSN 0)return e.substring(0,t)}return””}(c.apikey));const d=function(e,t,n,i,o,r,s=f.Alert){if(n){o=o||{};const{apptype:c,audienceMode:a,pagetype:u,pageGenTime:l,bundleInfo:d,deviceFormFactor:h=””,fd_muid:p}=n;o.pageGenTime=l,o.build=d&&d.v,o.appType=c;const f=function(e,t,n){const i=n&&”phone”===n.toLowerCase();return{bingHomepage:”binghomepage”,mmx:”emmx”,edge:”spartan”,edgeChromium:t&&”enterprise”===t?”entnews”:”anaheim”,hybrid:”spartan”,hub:i?”prime_mobile”:”prime”,microsoftNews:”msnews”,office:”entnews”,views:i?”prime_mobile”:”prime”,windowsShell:”windowsshell”}[e]}(c,a,h),m=f||c,w=document.getElementsByTagName(“html”)[0].getAttribute(“lang”);let y=””,v=”muid”;try{window&&window.getCookieConsentRequired&&”function”==typeof window.getCookieConsentRequired&&window.getCookieConsentRequired()||(y=g(“muid”))}catch(e){console.log(“error fetching muid.”)}y||(y=n.aid,v=”aid”);const S={name:”MS.News.Web.AppError”,time:l,ver:”4.0″,iKey:`o:${i}`,data:{baseData:{},baseType:”MS.News.Web.Base”,page:{name:”default”,product:m,type:b(u),content:{category:”standaloneError”}},browser:{clientId:y,clientIdType:v},flight:{id:r},request:{activityId:n.aid,requestId:n.aid,afdMuid:p},locale:{mkt:w},extSchema:{id:e,severity:s,pb:o,message:t}}};return S?JSON.stringify(S):null}return null}(t,e,o,u,n,r,i);if(c&&d){console.error(d),m.push(d);const e=”https://”+a+”/OneCollector/1.0″+function(e){return”?”+Object.keys(e).map((function(t){return t+”=”+encodeURIComponent(e[t])})).join(“&”)}(c);navigator.sendBeacon(e,d)}else console.log(“missing parameters in data-client-settings. “+e)}catch(t){console.log(“error logging the app error. “+e)}}function b(e){let t=e;switch(e){case”windowsshellhp”:t=”dhp”;break;case”video”:t=”watch”}return t}function y(e){w(“Error when loading bundle: “+e,20202,{})}function v(e,t,n,i,o){w(“JS Exception”,20203,{source:t,customMessage:e,line:n,column:i,stack:o&&o.stack})}function S(e){w(“Click event occurred before hydration”,35800,{})}const k=[0,656,980,1304],A=[0,540,768,1084,1400,1779];function I(e,t=A){for(let n=t.length-1;n>=0;n–)if(e>=t[n])return n}const q={ver:”0.1.0″,spec:{innerWidth:{clientValue:()=>window.innerWidth},innerHeight:{clientValue:()=>window.innerHeight},outerWidth:{clientValue:()=>window.outerWidth},breakpoint:{clientValue:()=>I(window.innerWidth,k)},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}}},C=(Object.assign({},q.spec),”Authorization”),T=”UserAuthToken”;var E,_;!function(e){e.Presentation=”presentation”}(E||(E={})),function(e){e.Unknown=”Unknown”,e.Portrait=”Portrait”,e.Landscape=”Landscape”}(_||(_={}));var O,N,x,P,R,U;function M(){var e;return i()?d(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===e?void 0:e.getAttribute(“data-client-settings”))):null}function W(e){let t,n=!1;const i=function(){return n||(n=!0,t=e()),t};return i.cache={clear:()=>{n=!1,t=void 0}},i}!function(e){e[e.Undefined=0]=”Undefined”,e[e.Basic=1]=”Basic”,e[e.Advanced=2]=”Advanced”,e[e.Premium=3]=”Premium”}(O||(O={})),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”}(N||(N={})),function(e){e.Adult=”adult”,e.Enterprise=”enterprise”,e.Kids=”kids”}(x||(x={})),function(e){e[e.Unknown=0]=”Unknown”,e[e.NotSignedIn=1]=”NotSignedIn”,e[e.SignedIn=2]=”SignedIn”}(P||(P={})),function(e){e.MSA=”MSA”,e.AAD=”AAD”,e.UNSUPPORTED_SOVEREIGNTY=”UNSUPPORTED_SOVEREIGNTY”}(R||(R={})),function(e){e[e.NonAadAccount=0]=”NonAadAccount”,e[e.AadAccount=1]=”AadAccount”,e[e.Unknown=2]=”Unknown”}(U||(U={}));const D=”currentaccount”,F=W((()=>{const e=g(D,!0),t=e&&d(e),{login_hint:n}=t||{};return n&&t})),H=W((()=>!!g(D)));let L,V=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=d(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 d(t)}setItem(e,t,n=!0){if(this.supported)try{this.storage.setItem(e,t)}catch(e){if(!n)throw e;u.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}}removeSubstringKeys(e){if(!this.supported||!e)return;const t=[];for(let n=0;n
Source
