nm3clol-public/Virginia_Energy/5353107_files/common.aa96c3c4e36cbf2397af.js.download

113 lines
1.7 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(self.webpackChunk_msnews_msnews_experiences=self.webpackChunk_msnews_msnews_experiences||[]).push([["common"],{36777:function(e,t,n){"use strict";n.d(t,{Fv:function(){return o},_t:function(){return r},gQ:function(){return i}});const i="selectedNavItemClicked",r="navRefreshButtonEvent";class o{constructor(){this.supports3DContent=!1}attemptNavItemChange(e){return!!this.superNavChangeCallback&&(this.superNavChangeCallback(e),!0)}disconnectSuperNav(){this.superNavChangeCallback=void 0}getForceSelectedNavItemId(){return this.forceSelectedNavItemId}getSupports3DContent(){return this.supports3DContent}static getInstance(e){return o.instance||(o.instance=new o),e&&(o.instance.superNavChangeCallback=e),o.instance}registerForceSelectedNavItemId(e){this.forceSelectedNavItemId=e}registerSupports3DContent(e){this.supports3DContent=e}}},4862:function(e,t,n){"use strict";n.r(t),n.d(t,{BackgroundImageWC:function(){return He},BackgroundImageWCInlineStyles:function(){return tn},BackgroundImageWCStyles:function(){return nn},BackgroundImageWCTemplate:function(){return qt},EventName:function(){return s},ToolingInfo:function(){return rn},getEventToggleButtonProps:function(){return Ue}});var i=n(33940),r=n(7476),o=n(26181);const a=o.K.Dialog.toString();var s;!function(e){e.Secondary="backgroundImageWCSecondary",e.Edit="backgroundImageWCEdit",e.Toggle="backgroundImageWCToggle",e.StatesSync="backgroundImageWCStatesSync",e.StatesSyncAsk="backgroundImageWCStatesSyncAsk",e.EventToggle="eventToggle"}(s||(s={}));var c=n(45266),d=n(98106),l=n(25598),u=n(79545),p=n(12756),h=n(85205),g=n(19233),m=n(31499),f=n(91046),v=n(34551),y=n(21789),S=n(21931),C=n(40762),w=n(13334),b=n(20089),T=n(86522),k=n(71486),P=n(92100),I=n(54297),A=n(20758),E=n(52817),x=n(87095),M=n(71568),L=n(63815),D=n(51683),R=n(23549),F=n(82898),O=n(944),B=n(66963);const N=()=>{};var $=n(31558),U=n(67044),_=n(85663),H=n(43356);var W;!function(e){e.alert="Alert",e.edit="Edit",e.globe="Globe",e.lightbulb="Lightbulb",e.meetNow="MeetNow",e.news="News",e.search="Search"}(W||(W={}));class q{constructor(e,t,n,i,o){this.fallbackImageURL="",this.museumBarText="",this.likeClickButtonHandler=()=>{const{actTelemetry:e}=this.irisStateInfo||{};this.sendIrisActionTelemetry(e,E.M.Like)},this.dislikeClickButtonHandler=()=>{const{actTelemetry:e}=this.irisStateInfo||{};if(this.dislikeCountWasIncremented=D.Vv.addImageCreativeToDislikeList(),this.dislikeCountWasIncremented||this.newIrisSurfaceInfo)return this.sendIrisActionTelemetry(e,E.M.Dislike),this.getNewIrisContent()},this.hotSpotClickHandler=(e,t)=>{t&&t.preventDefault&&t.preventDefault();const{creativeId:n,placementId:i,actTelemetry:r,impTelemetry:o}=this.irisStateInfo||{},a={ctaType:e.cta_type,ctaMetaData:e.cta,delayInMs:void 0,irisTelemetryActionId:e.hs,irisTelemetryActionString:r},s=this.hotSpotCtaHandler(a,t);s&&s().then((e=>{if(e&&e.actionCompleted&&a.ctaType===x.W.executeAction&&a.ctaMetaData===A.uS.setDefaultBrowser){const e={actionUrl:r,impressionUrl:o};this.fireIrisBeacon(i,n,E.R.Action,e,E.M.Conversion),this.irisDataConnector.resetImageLastUpdateTime()}}))},this.hotSpotMouseEnterHandler=e=>{R.M0.sendActionEvent(null==e?void 0:e.currentTarget,F.Aw.Hover,F.wu.View)},this.hotSpotCtaHandler=(e,t)=>{if(e)if(e.ctaType&&e.ctaMetaData){if(t)return async()=>{const n=M._.formatTelemetryActionUrl(e.irisTelemetryActionString,E.M.Click+e.irisTelemetryActionId);L.c.sendActionUpdate(n),R.M0.sendActionEvent(t.currentTarget,F.Aw.Click,F.wu.Navigate);const i=this.getCtaCallback(e);return i?await i():null};N({...r.OeS,message:"Event is not defined"})}else N({...r.jSE,message:"Either of call to action type or metadata is not defined",pb:{...r.jSE.pb,customMessage:`ctaType: ${e.ctaType||""} and ctaMetaData: ${e.ctaMetaData||""}`}});else N({...r.drd,message:"HotSpot call to action state not defined"})},this.getCtaCallback=e=>{switch(e.ctaType){case x.W.offPageNavigation:return z(e.ctaType,e.ctaMetaData)?(0,A.$y)(e.ctaMetaData):void N({...r.MaG,message:"Invalid CTA Offpage Nav Data",pb:{...r.MaG.pb,customMessage:`ctaType: ${e.ctaType||""} and ctaMetaData: ${e.ctaMetaData||""}`}});case x.W.inPageNavigation:return(0,A.U$)(e.ctaMetaData,e.delayInMs);case x.W.executeAction:return(0,A.jo)(e.ctaMetaData)}},this.fireIrisBeacon=(e,t,n,i,r)=>{(0,U.oU)(h.z.IrisData).then((o=>{o&&o.sendActionUpdate(e,t,n,i,r)}))},this.sendIrisActionTelemetry=(e,t)=>{if(e){const n=M._.formatTelemetryActionUrl(e,t);L.c.sendActionUpdate(n)}},this.getNewIrisContent=async()=>{this.getImageHotSpotsData(!0)},(0,$.N)()&&(this.connector=e,this.fallbackImageURL=t,this.dislikeCountWasIncremented=!0,this.updatedImageCallback=n,this.notifyOnCallCompletion=i,this.irisFallbackTitle=o,this.newIrisSurfaceInfo=void 0,this.getImageHotSpotsData())}loadImageHotSpots(){return this.irisFetchPromise}updateImageMetadata(e,t,n){e&&t&&n&&(this.irisImageURL=e,this.museumCard=t,this.irisStateInfo=n,this.updatedImageCallback())}async getImageHotSpotsData(e){this.irisFetchPromise=new Promise((async(t,n)=>{const i=!(0,_.isNullOrUndefined)(e)&&e,o={credits:null,irisButtons:{likeClicked:!1,dislikeClicked:!1},isDisplayed:!1,title:null,titleURL:null},a={};let s,c;if(this.irisDataConnector=await(0,U.oU)(h.z.IrisData),!this.irisDataConnector)return B.i.trackAppErrorEvent({...r._c7,message:"No Iris data connector for background image"}),void n();if(i){if(!D.Vv.addImageCreativeToDislikeList()&&!this.newIrisSurfaceInfo)return void t()}if(c=e?await this.handleDislike():await this.populateSurfaceInfo(),(0,_.isNullOrUndefined)(c)||(0,_.isNullOrUndefined)(c.creatives)||c.creatives.length<=0)return s=this.fallbackImageURL,o.title=this.museumBarText,a.disableMuseumCard=!0,B.i.trackAppErrorEvent({...r.sd_,message:`No creative in surface info. Triggered by dislike: ${i}. Surface info: ${c}`}),this.updateImageMetadata(s,o,a),this.notifyOnCallCompletion&&O.f.irisImageUpdated.getActionSender(this.connector).send(),void n();const d=c.creatives[0],l={title:d.content.title||"",credits:d.content.copyright||"",titleURL:d.content.cta},u={titleLink:d.content.cta,ctaType:d.content.cta_type,creativeId:d.content.creativeId,placementId:c.placement,impTelemetry:d.telemetry?d.telemetry.impressionUrl:null,actTelemetry:d.telemetry?d.telemetry.actionUrl:null,hsList:V(d)};s=d.content.LANDSCAPE,Object.assign(o,l),Object.assign(a,u),(0,_.isNullOrUndefined)(a.impTelemetry)||(i?L.c.sendActionUpdate(a.impTelemetry):((0,H.F_)().then((()=>{this.irisDataConnector.fetchedNewImage()&&L.c.sendActionUpdate(a.impTelemetry)})),this.updateImageMetadata(s,o,a)),this.updateImageMetadata(s,o,a),this.notifyOnCallCompletion&&O.f.irisImageUpdated.getActionSender(this.connector).send()),t()})),this.irisFetchPromise}async populateSurfaceInfo(){if(!window.isSSREnabled)return await this.irisDataConnector.getImagePayload();let e;const t=await this.irisDataConnector.tryGetPreviousImagePayload();return t?(e=t,this.newIrisSurfaceInfo=await this.irisDataConnector.getImagePayload()):e=await this.irisDataConnector.getImagePayload(),e}async handleDislike(){if(!window.isSSREnabled||!this.newIrisSurfaceInfo)return await this.irisDataConnector.getImagePayload(!0);const e=this.newIrisSurfaceInfo;return this.newIrisSurfaceInfo=void 0,this.irisDataConnector.clearPreviousImagePayload(),e}getNewImageUrl(){const e=this.newIrisSurfaceInfo.creatives;if(!e||!e.length)return"";return(e[0]&&e[0].content).LANDSCAPE}}const V=e=>{if((0,_.isNullOrUndefined)(e)||(0,_.isNullOrUndefined)(e.content)||(0,_.isNullOrUndefined)(e.content.hs)||0===e.content.hs.length)return null;const t=[];return e.content.hs.forEach((e=>{t.push(e)})),t},G=e=>{let t="",n="";switch(e){case W.alert:t="-8 -8 40 40",n="M12,1.99622391 C16.0499218,1.99622391 19.3566662,5.19096617 19.4958079,9.24527692 L19.5,9.49622391 L19.5,13.5931945 L20.8800025,16.7492056 C20.949058,16.9071328 20.9847056,17.0776351 20.9847056,17.25 C20.9847056,17.9403559 20.4250615,18.5 19.7347056,18.5 L15,18.5014962 C15,20.1583504 13.6568542,21.5014962 12,21.5014962 C10.4023191,21.5014962 9.09633912,20.2525762 9.00509269,18.6777689 L8.99954674,18.4992239 L4.27486429,18.5 C4.10352557,18.5 3.93401618,18.4647755 3.7768624,18.3965139 C3.14366026,18.121475 2.85331154,17.3852002 3.1283504,16.7519981 L4.5,13.594148 L4.50000001,9.4961162 C4.50059668,5.34132493 7.85208744,1.99622391 12,1.99622391 Z M13.4995467,18.4992239 L10.5,18.5014962 C10.5,19.3299233 11.1715729,20.0014962 12,20.0014962 C12.7796961,20.0014962 13.4204487,19.4066081 13.4931334,18.6459562 L13.4995467,18.4992239 Z M12,3.49622391 C8.67983848,3.49622391 6.00047762,6.17047646 6,9.49622391 L6,13.905852 L4.65602014,17 L19.3525351,17 L18,13.9068055 L18.0001102,9.5090803 L17.9963601,9.28387824 C17.8853006,6.05040449 15.2415749,3.49622391 12,3.49622391 Z";break;case W.edit:t="-8 -8 40 40",n="M21.0303301,2.96966991 C22.4277928,4.36713263 22.4277928,6.63286737 21.0303301,8.03033009 L9.06200371,19.9986565 C8.78512854,20.2755316 8.44079112,20.4753584 8.06302761,20.5783848 L2.94733805,21.9735729 C2.38746387,22.1262658 1.87373417,21.6125361 2.02642713,21.0526619 L3.4216152,15.9369724 C3.52464161,15.5592089 3.72446837,15.2148715 4.00134354,14.9379963 L15.9696699,2.96966991 C17.3671326,1.5722072 19.6328674,1.5722072 21.0303301,2.96966991 Z M15.0001717,6.06057288 L5.06200371,15.9986565 C4.96971199,16.0909482 4.90310306,16.2057273 4.86876093,16.3316485 L3.81891446,20.1810855 L7.6683515,19.1312391 C7.79427267,19.0968969 7.90905181,19.030288 8.00134354,18.9379963 L17.9391717,8.99957288 L15.0001717,6.06057288 Z M17.0303301,4.03033009 L16.0601717,4.99957288 L18.9991717,7.93957288 L19.9696699,6.96966991 C20.7813462,6.15799363 20.7813462,4.84200637 19.9696699,4.03033009 C19.1579936,3.21865381 17.8420064,3.21865381 17.0303301,4.03033009 Z";break;case W.globe:t="-5 -5 26 26",n="M7.93868 0H8.06132C10.6629 0 12.8409 1.14472 14.5951 3.43415C15.5317 4.87619 16 6.3777 16 7.93868V8.06132C16 10.6629 14.8553 12.8409 12.5659 14.5951C11.1238 15.5317 9.6223 16 8.06132 16H7.93868C5.33705 16 3.15912 14.8553 1.40488 12.5659C0.468293 11.1312 0 9.62973 0 8.06132V7.93868C0 5.33705 1.14472 3.15912 3.43415 1.40488C4.86876 0.468293 6.37027 0 7.93868 0ZM4.89477 5.32962H11.1052C10.9268 4.46736 10.715 3.72404 10.4697 3.09965C9.74123 1.47921 8.90871 0.66899 7.97213 0.66899C7.08757 0.66899 6.28478 1.46806 5.56376 3.0662C5.29617 3.66829 5.07317 4.42276 4.89477 5.32962ZM1.20418 5.32962H4.17003C4.21463 5.32962 4.31498 4.93194 4.47108 4.13659C4.90221 2.72427 5.43368 1.65761 6.06551 0.936585H6.03206C4.11429 1.56098 2.69082 2.62764 1.76167 4.13659C1.39001 4.82044 1.20418 5.21812 1.20418 5.32962ZM9.93449 0.936585C10.7001 1.79884 11.2985 3.14053 11.7296 4.96167C11.7296 5.20697 11.7631 5.32962 11.83 5.32962H14.7958C14.164 3.64971 12.997 2.36376 11.2948 1.47178C10.8636 1.24878 10.4102 1.07038 9.93449 0.936585ZM0.936585 5.99861C0.758188 6.79396 0.66899 7.47038 0.66899 8.02787C0.66899 8.5259 0.758188 9.18374 0.936585 10.0014H4.10314C4.03624 9.22091 4.00279 8.60767 4.00279 8.16167V7.83833C4.00279 7.39233 4.03624 6.77909 4.10314 5.99861H0.936585ZM4.80557 5.99861C4.71638 6.77909 4.67178 7.45552 4.67178 8.02787C4.67178 8.54077 4.71638 9.19861 4.80557 10.0014H11.2056C11.2873 9.22091 11.3282 8.54448 11.3282 7.97213C11.3282 7.45923 11.2873 6.80139 11.2056 5.99861H4.80557ZM11.8969 5.99861C11.9638 6.77909 11.9972 7.39233 11.9972 7.83833V8.16167C11.9972 8.60767 11.9638 9.22091 11.8969 10.0014H15.0634C15.2418 9.20604 15.331 8.52962 15.331 7.97213C15.331 7.4741 15.2418 6.81626 15.0634 5.99861H11.8969ZM1.20418 10.6704C1.82857 12.3503 2.99559 13.6362 4.70523 14.5282C5.06945 14.7364 5.52288 14.9148 6.06551 15.0634C5.23299 14.1343 4.61231 12.6699 4.20348 10.6704H1.20418ZM4.89477 10.6704C5.07317 11.5326 5.28502 12.276 5.53031 12.9003C6.25877 14.5208 7.09129 15.331 8.02787 15.331C9.03879 15.331 9.93078 14.3089 10.7038 12.2648C10.793 11.9972 10.9268 11.4657 11.1052 10.6704H4.89477ZM9.93449 15.0634H9.96794C11.7816 14.4911 13.1494 13.5024 14.0711 12.0976C14.4056 11.5995 14.6472 11.1238 14.7958 10.6704H11.83C11.7854 10.6704 11.6962 11.0235 11.5624 11.7296C11.1461 13.1791 10.6035 14.2904 9.93449 15.0634Z";break;case W.lightbulb:t="-8 -8 40 40",n="M12.000008,2.00139734 C16.0040628,2.00139734 19.249992,5.24733208 19.249992,9.25139734 C19.249992,11.3474567 18.3493333,13.2711054 16.5869535,14.9933011 C16.5100054,15.0685004 16.450441,15.1590617 16.4118457,15.2586031 L16.380373,15.3609016 L15.2492957,20.256497 C15.0265913,21.2204195 14.2034707,21.9187611 13.2302558,21.9933796 L13.0570456,22 L10.9432689,22 C9.95374997,22 9.08791486,21.3549492 8.79629808,20.4232534 L8.75088874,20.2559339 L7.62132399,15.3611533 C7.58904306,15.2212595 7.51728321,15.0935695 7.41456824,14.9932517 C5.73516207,13.3530399 4.83779011,11.5301519 4.75613429,9.54965138 L4.750008,9.25139734 L4.75388322,9.01208292 C4.88014853,5.11879041 8.07602134,2.00139734 12.000008,2.00139734 Z M14.115008,18.4993973 L9.884008,18.4993973 L10.2124755,19.9186446 C10.2831529,20.2249131 10.5356676,20.4507962 10.8400612,20.4929101 L10.9432689,20.5 L13.0570456,20.5 C13.3712985,20.5 13.6481364,20.3048226 13.757662,20.0177756 L13.7877956,19.9188323 L14.115008,18.4993973 Z M12.000008,3.50139734 C8.89821922,3.50139734 6.37007083,5.95741111 6.25416008,9.03084139 L6.250008,9.25139734 L6.25672343,9.52840679 C6.33286953,11.0917695 7.05722352,12.5475342 8.46263227,13.9201432 C8.72676013,14.1781068 8.92266257,14.4964075 9.03423135,14.8463815 L9.08291336,15.0238752 L9.538008,16.9993973 L14.461008,16.9993973 L14.9188729,15.023237 C15.0019011,14.6638694 15.1717664,14.3313677 15.4124215,14.0542893 L15.5385739,13.9205009 C16.9431998,12.547902 17.6671738,11.0920338 17.7432801,9.5284475 L17.749992,9.25139734 L17.7458399,9.03084154 C17.6299293,5.9574132 15.1017833,3.50139734 12.000008,3.50139734 Z";break;case W.meetNow:break;case W.news:t="-5 -5 25 25",n="M16 4V11C16 11.276 15.9453 11.5365 15.8359 11.7812C15.7318 12.0208 15.5885 12.2318 15.4062 12.4141C15.2292 12.5911 15.0182 12.7344 14.7734 12.8438C14.5286 12.9479 14.2708 13 14 13H1.94531C1.67969 13 1.42708 12.9479 1.1875 12.8438C0.953125 12.7396 0.747396 12.6016 0.570312 12.4297C0.398438 12.2526 0.260417 12.0469 0.15625 11.8125C0.0520833 11.5729 0 11.3203 0 11.0547V2H14V4H16ZM15 5H14V10.5C14 10.6354 13.9505 10.7526 13.8516 10.8516C13.7526 10.9505 13.6354 11 13.5 11C13.3646 11 13.2474 10.9505 13.1484 10.8516C13.0495 10.7526 13 10.6354 13 10.5V3H1V11.0547C1 11.1849 1.02344 11.3073 1.07031 11.4219C1.1224 11.5365 1.1901 11.638 1.27344 11.7266C1.36198 11.8099 1.46354 11.8776 1.57812 11.9297C1.69271 11.9766 1.8151 12 1.94531 12H14C14.1406 12 14.2708 11.974 14.3906 11.9219C14.5104 11.8698 14.6146 11.7995 14.7031 11.7109C14.7969 11.6172 14.8698 11.5104 14.9219 11.3906C14.974 11.2708 15 11.1406 15 11V5ZM12 5H2V4H12V5ZM12 11H8V10H12V11ZM12 9H8V8H12V9ZM12 7H8V6H12V7ZM7 11H2V5.97656H7V11ZM3 10H6V6.97656H3V10Z";break;default:t="-12 -12 40 40",n="M10.5 0C11.0052 0 11.4922 0.0651042 11.9609 0.195312C12.4297 0.325521 12.8672 0.510417 13.2734 0.75C13.6797 0.989583 14.0495 1.27865 14.3828 1.61719C14.7214 1.95052 15.0104 2.32031 15.25 2.72656C15.4896 3.13281 15.6745 3.57031 15.8047 4.03906C15.9349 4.50781 16 4.99479 16 5.5C16 6.00521 15.9349 6.49219 15.8047 6.96094C15.6745 7.42969 15.4896 7.86719 15.25 8.27344C15.0104 8.67969 14.7214 9.05208 14.3828 9.39062C14.0495 9.72396 13.6797 10.0104 13.2734 10.25C12.8672 10.4896 12.4297 10.6745 11.9609 10.8047C11.4922 10.9349 11.0052 11 10.5 11C9.84896 11 9.22396 10.8906 8.625 10.6719C8.03125 10.4531 7.48438 10.138 6.98438 9.72656L0.851562 15.8516C0.752604 15.9505 0.635417 16 0.5 16C0.364583 16 0.247396 15.9505 0.148438 15.8516C0.0494792 15.7526 0 15.6354 0 15.5C0 15.3646 0.0494792 15.2474 0.148438 15.1484L6.27344 9.01562C5.86198 8.51562 5.54688 7.96875 5.32812 7.375C5.10938 6.77604 5 6.15104 5 5.5C5 4.99479 5.0651 4.50781 5.19531 4.03906C5.32552 3.57031 5.51042 3.13281 5.75 2.72656C5.98958 2.32031 6.27604 1.95052 6.60938 1.61719C6.94792 1.27865 7.32031 0.989583 7.72656 0.75C8.13281 0.510417 8.57031 0.325521 9.03906 0.195312C9.50781 0.0651042 9.99479 0 10.5 0ZM10.5 10C11.1198 10 11.7031 9.88281 12.25 9.64844C12.7969 9.40885 13.2734 9.08594 13.6797 8.67969C14.0859 8.27344 14.4062 7.79688 14.6406 7.25C14.8802 6.70312 15 6.11979 15 5.5C15 4.88021 14.8802 4.29688 14.6406 3.75C14.4062 3.20312 14.0859 2.72656 13.6797 2.32031C13.2734 1.91406 12.7969 1.59375 12.25 1.35938C11.7031 1.11979 11.1198 1 10.5 1C9.88021 1 9.29688 1.11979 8.75 1.35938C8.20312 1.59375 7.72656 1.91406 7.32031 2.32031C6.91406 2.72656 6.59115 3.20312 6.35156 3.75C6.11719 4.29688 6 4.88021 6 5.5C6 6.11979 6.11719 6.70312 6.35156 7.25C6.59115 7.79688 6.91406 8.27344 7.32031 8.67969C7.72656 9.08594 8.20312 9.40885 8.75 9.64844C9.29688 9.88281 9.88021 10 10.5 10Z"}return{viewBoxString:t,svgString:n}},z=(e,t)=>!(!e||!t)&&(e===x.W.offPageNavigation&&j(t)),j=e=>/^((microsoft-edge:)?https:\/\/((www)|(cn)|(go))\.((msn)|(bing)|(skype)|(microsoft))\.com)|(edge:\/\/)/.test(e);var K,Q=n(70280),Z=n(31699),J=n(99452),X=n(42590),Y=n(84515),ee=n(66415),te=n(88762);!function(e){e.offPageNavigation="nav-newtab",e.inPageNavigation="nav-inpage",e.executeAction="execute-action"}(K||(K={}));var ne=n(88826),ie=n(21930),re=n(87574),oe=n(95153),ae=n(78672),se=n(32614),ce=n(95063),de=n(40860),le=n(64726);class ue{constructor(e,t){if(this.dayNow=(new Date).getDay(),this.firstFrameHidden=!1,this.isEnergySaverMode=!1,this.isGalleryEnabled=!1,this.isPlaying=!1,this.isReducedMotionActive=!1,this.isTomorrowsVideoCached=!1,this.prefersReducedMotion=window.matchMedia("(prefers-reduced-motion)"),this.showVideo=!1,this.showToast=!1,this.storageKey="bkgdV",this.timeNow=(new Date).getTime(),this.batteryChargingChange=()=>{this.battery.charging?this.currentTrigger?this.playVideo("Battery"):this.playVideo("Timer"):this.backgroundImageWC.config.translucentFeedEnabled||this.showToastMessage(this.backgroundImageWC.config.localizedStrings.video_pauseToast,!0)},this.playVideo=async e=>{!this.config.isTest&&this.showVideo&&e&&((this.config.turnOffAutoPlay||this.backgroundImageWC.config.translucentFeedEnabled)&&"Button"!==e||(await this.batteryPromise,e!==this.currentTrigger&&"Timer"!==e&&"Button"!==e||this.battery&&!this.battery.charging&&"Button"!==e||this.isPlaying||this.isReducedMotionActive&&"Button"!==e?this.battery.charging||(this.currentTrigger="Battery"):(0,le.eC)().then((()=>{const e=1e3*this.config.pauseTime;this.videoTimer&&this.videoTimer.timer&&clearTimeout(this.videoTimer.timer),this.isGalleryEnabled&&this.isEnergySaverMode&&!this.isBandwidthAdequateForVideo()?this.pauseVideo("Network"):this.battery.charging?(this.videoTimer.remainingTime<=0&&(this.videoTimer.remainingTime=e),this.videoTimer.startTime=Date.now(),this.videoTimer.timer=n.g.setTimeout((()=>{(this.isGalleryEnabled||!this.battery.charging)&&(!this.isGalleryEnabled||this.isEnergySaverMode)?this.pauseVideo("Timer"):this.playVideo("Timer")}),this.videoTimer.remainingTime),this.handleVideoPlay()):this.pauseVideo("Battery")}))))},this.handleVideoPlay=()=>{this.isPlaying=!1,requestAnimationFrame((()=>{this.isReducedMotionActive=!1,this.backgroundImageWC.ref_video.play().then((()=>{this.isPlaying=!0})).catch((e=>{(0,ne.OO)(e,r.N1Y,"Failed to trigger play.","Timer: "+JSON.stringify(this.videoTimer)+". Current trigger: "+this.currentTrigger+". Show video: "+this.showVideo),this.isPlaying=!1})).finally((()=>{this.backgroundImageWC.updateProperties()}))}))},this.pauseVideo=e=>{if(this.isPlaying&&this.showVideo){this.currentTrigger=e,this.videoTimer&&this.videoTimer.timer&&(clearTimeout(this.videoTimer.timer),this.videoTimer.remainingTime-=Date.now()-this.videoTimer.startTime),this.isPlaying=!1,this.backgroundImageWC.updateProperties();try{this.backgroundImageWC.ref_video.pause()}catch(e){(0,ne.OO)(e,r.FtH,"Failed to trigger pause.","Timer: "+JSON.stringify(this.videoTimer)+". Current trigger: "+this.currentTrigger+". Show video: "+this.showVideo)}}},this.reducedMotionChange=()=>{this.isReducedMotionActive=this.prefersReducedMotion.matches},this.showToastMessage=(e,t)=>{this.showToast=!0,this.toastMessage=e,t&&this.pauseVideo("Battery"),this.shouldSkipShowToast()?this.hideToastMessage():(this.backgroundImageWC.updateProperties(),n.g.setTimeout((()=>{this.hideToastMessage()}),5e3))},this.hideToastMessage=()=>{this.showToast=!1,this.toastMessage=null,this.backgroundImageWC.updateProperties()},this.shouldSkipShowToast=()=>{var e;const t="off"===(null===(e=this.backgroundImageWC.chromiumPageSettingsState)||void 0===e?void 0:e.selectedQuickLinksDisplaySetting);return"always"===this.backgroundImageWC.chromiumPageSettingsState.selectedFeedDisplaySetting&&t},this.config=e,this.backgroundImageWC=t,this.backgroundImageWC.config.newStorage&&(this.config.data=ce.p.getCMSVideoData()),!(0,$.N)())return;if(this.topSitesLayoutDataConnector=(0,U.K0)(h.z.TopSitesLayoutData),this.isGalleryEnabled=!t.config.disableBackgroundGallery&&ce.p.getBackgroundGalleryEligibility(),this.isGalleryEnabled){this.backgroundDataConnector=(0,U.K0)(h.z.BackgroundData);const e=this.backgroundDataConnector.getCurrentState();this.isEnergySaverMode=!(0,_.isNullOrUndefined)(e)&&"energySaver"===e.selectedVideoSetting,O.f.videoSettingsUpdated.registerObserver((e=>{const t=e&&e.params;if(!t||!t.length)return;const n=t[0];this.isEnergySaverMode="energySaver"===n}))}this.videoTimer={remainingTime:-1,startTime:-1,timer:null},this.assignVideoSchedule();const i=window&&window.navigator;this.deviceLogicalProcessors=i?i.hardwareConcurrency:-1,this.deviceMemoryGB=i?i.deviceMemory:-1,this.batteryPromise=i.getBattery().then((e=>{this.battery=e})),this.deviceLogicalProcessors<=2||this.deviceMemoryGB<4?this.showVideo=!1:(this.showVideo=this.shouldShowVideo(),this.showVideo&&this.setVideoAndMuseumCardProperties(),this.config.isTest||Promise.all([(0,ie.e3)(),(0,H.F_)()]).then((()=>{this.cacheNextVideo()})))}setVideoAndMuseumCardProperties(){this.defineResolution(),this.videoSource=this.getVideoURL(this.videoId),this.firstFrameSource=this.getFirstFrameURL(this.videoId);const e="video"+this.videoId;this.videoSource&&this.firstFrameSource&&(this.museumCard={credits:this.config.data[this.videoId].attribution,isDisplayed:!0,irisButtons:{likeClicked:!1,dislikeClicked:!1},title:this.backgroundImageWC.config.localizedStrings.video_titles[e],titleURL:null})}assignBackgroundUsingIndex(e){window.isSSREnabled&&this.defineResolution(),this.videoId=Number(e),this.setVideoAndMuseumCardProperties()}getCurrentBackgroundVideoId(){return this.videoId}assignVideoSchedule(){const e=this.getVideoData();e&&e.schedule?(this.schedule=e.schedule,this.scheduleFixed=e.scheduleFixed,this.checkAndGenerateVideoSchedule(),this.reRandomizeSchedule(e)):this.isGalleryEnabled?this.generateFilteredVideoSchedule():this.generateVideoSchedule()}checkAndGenerateVideoSchedule(){for(let e=0;e<this.schedule.length;e++){const t=this.schedule[e];if(this.config.data[t]&&this.config.data[t].removeContent||t>-1&&!this.validateCurrentIndex(t,!0)){this.isGalleryEnabled?this.generateFilteredVideoSchedule():this.generateVideoSchedule();break}}}validateCurrentIndex(e,t=!1){const n=!(0,_.isNullOrUndefined)(e)&&e<this.config.data.length&&!!this.config.data[e];return!n&&t&&(0,ne.H)(r.FEC,"Error validating video configuration index: "+e),n}cacheNextVideo(){const e=new Date;e.setDate(e.getDate()+1);const t=e.getDay(),n=this.getVideoData();if(!(n&&n.cachedVideoId===this.schedule[t]||ce.p.getDailyRotationOnlySimpleImages()&&this.backgroundImageWC.config.simpleImages)&&this.schedule[t]>=0&&this.config.enableFeature){const e=this.schedule[t];try{const t=this.getVideoURL(e),i=this.getFirstFrameURL(e);if(!t||!i)return;fetch(t),fetch(i),this.isTomorrowsVideoCached=!0,this.storeVideoData({cachedVideoId:e,lastUpdatedTime:null==n?void 0:n.lastUpdatedTime,schedule:null==n?void 0:n.schedule,scheduleFixed:null==n?void 0:n.scheduleFixed})}catch(t){(0,ne.H)(r.LWq,"Video caching failed. Video url: "+this.getVideoURL(e)+" First frame url: "+this.getFirstFrameURL(e),"Error: "+t)}}}defineResolution(){const e=new oe.fH,t=(0,oe.Nd)(e.data.innerHeight,"innerHeight"),n=(0,oe.Nd)(e.data.innerWidth,"innerWidth"),i=(0,ae.x_)()||1,r=(window.screen&&window.screen.height?window.screen.height:t+150)*i,o=(window.screen&&window.screen.width?window.screen.width:n)*i;this.backgroundImageWC.config.serveBetterResolution?this.currentResolution=r<=720||o<=1280?"1080":720<r&&r<=1080||1280<o&&o<=1920?"1440":r>=1080||o>=1920?"2160":"1440":this.currentResolution=r<=720||o<=1280?"720":720<r&&r<=1080||1280<o&&o<=1920?"1080":1080<r&&r<2e3||1920<o&&o<3e3?"1440":r>=2e3||o>=3e3?"2160":"1440"}error(){this.showVideo=!1}generateVideoSchedule(){const e=[];for(let t=0;t<this.config.data.length;t++)e[t]=!1;this.schedule=[-1,-1,-1,-1,-1,-1,-1],this.scheduleFixed=[-1,-1,-1,-1,-1,-1,-1];for(let t=0;t<this.config.videosPerWeek;t++){let n=Math.floor(Math.random()*this.config.data.length);if(e[n]||!this.config.data[n]||this.config.data[n].skipRotation||this.config.data[n].removeContent)do{n===this.config.data.length-1?n=0:n++}while(e[n]||!this.config.data[n]||this.config.data[n].skipRotation||this.config.data[n].removeContent);this.schedule[t]=n,e[n]=!0}(0,de.Z)(this.schedule),this.scheduleFixed=this.schedule;const t=this.getVideoData();this.storeVideoData({cachedVideoId:null!=t&&t.cachedVideoId?t.cachedVideoId:-1,lastUpdatedTime:this.timeNow,schedule:this.schedule,scheduleFixed:this.scheduleFixed})}generateFilteredVideoSchedule(){const e=[],t=ce.p.getLikeAndDislikeCacheByType(re.wI.videoDislikes);for(let n=0;n<this.config.data.length;n++)t.has(String(n))||e.push(n);const n=[];for(let t=0;t<e.length;t++)n[t]=!1;this.schedule=[-1,-1,-1,-1,-1,-1,-1],this.scheduleFixed=[-1,-1,-1,-1,-1,-1,-1];const i=Math.min(e.length,this.config.videosPerWeek);for(let t=0;t<i;t++){let i=Math.floor(Math.random()*e.length);if(n[i]||!this.config.data[i]||this.config.data[i].skipRotation||this.config.data[i].removeContent)do{i===e.length-1?i=0:i++}while(n[i]||!this.config.data[i]||this.config.data[i].skipRotation||this.config.data[i].removeContent);this.schedule[t]=e[i],n[i]=!0}(0,de.Z)(this.schedule),this.scheduleFixed=this.schedule;const r=this.getVideoData();this.storeVideoData({cachedVideoId:null!=r&&r.cachedVideoId?r.cachedVideoId:-1,lastUpdatedTime:this.timeNow,schedule:this.schedule,scheduleFixed:this.scheduleFixed})}getFirstFrameURL(e){var t;if(!this.config.data[e])return null;let n;switch(this.currentResolution){case"720":n=this.config.data[e].firstFrame.i720;break;case"1080":n=this.config.data[e].firstFrame.i1080;break;case"1440":n=this.config.data[e].firstFrame.i1440;break;case"2160":n=this.config.data[e].firstFrame.i2160}return(0,$.N)()&&(this.isGalleryEnabled?this.isGalleryEnabled&&(n=this.isEnergySaverMode?this.config.data[e].firstFrame.i720:n):n=this.shouldReduceTo1080()?this.config.data[e].firstFrame.i1080:n),n=null!==(t=this.backgroundImageWC.config)&&void 0!==t&&t.useImgGenerator?(0,se.zz)(n,{width:0,height:0,enableDpiScaling:!1}):re.qR+n+".img",n}getVideoData(){try{return(0,I.$o)().getObject(this.storageKey)}catch(e){return(0,ne.H)(r.eEQ,"Local storage for video data failed."),null}}getVideoURL(e){var t;if(!this.config.data[e])return null;let n;switch(this.currentResolution){case"720":n=this.config.data[e].video.v720;break;case"1080":n=this.config.data[e].video.v1080;break;case"1440":n=this.config.data[e].video.v1440;break;case"2160":n=this.config.data[e].video.v2160}return(0,$.N)()&&(this.isGalleryEnabled?this.isGalleryEnabled&&(n=this.isEnergySaverMode?this.config.data[e].video.v720:n):n=this.shouldReduceTo1080()?this.config.data[e].video.v1080:n),n=null!==(t=this.backgroundImageWC.config)&&void 0!==t&&t.useImgGenerator?(0,se.QG)(n):re.Od+n+".mp4",n}removeVideoForToday(){const e=this.getVideoData();e&&e.schedule&&(e.schedule[this.dayNow]=-1,this.showVideo=!1,this.storeVideoData(e))}removeVideoFromLocalStorage(e){const t=this.getVideoData(),n=Number(e);let i=!1;if(t&&t.schedule){for(let e=0;e<t.schedule.length;e++)t.schedule[e]===n&&(t.schedule[e]=-1,i=e===this.dayNow);this.storeVideoData(t)}return i}reRandomizeSchedule(e){e.lastUpdatedTime<this.timeNow-6048e5&&(this.isGalleryEnabled?this.generateFilteredVideoSchedule():this.generateVideoSchedule())}shouldShowVideo(){const e=ce.p.getBackgroundSettingsPreferencesCache(),t=this.backgroundImageWC.dailyRotationEnabled(e);if(this.backgroundImageWC.ssrRotationMismatch&&t&&"Video"===this.backgroundImageWC.ssrBackgroundMetadata.provider)return!0;const n=this.schedule&&this.schedule[this.dayNow];return!!(n>-1&&this.validateCurrentIndex(n)&&this.config.enableFeature&&this.config.data)&&(this.videoId=this.schedule[this.dayNow],!0)}shouldReduceTo1080(){const e=this.isBandwidthAdequateForVideo(),t=this.deviceMemoryGB>=4;return(!e||!t)&&(this.currentResolution="1080",!0)}isBandwidthAdequateForVideo(){return"4g"===window.navigator.connection.effectiveType}storeVideoData(e){try{(0,I.$o)().setObject(this.storageKey,e)}catch(e){return void(0,ne.H)(r.ybt,"Local storage for video data failed.")}}unloadVideo(){this.batteryPromise.then((()=>{this.battery.removeEventListener("chargingchange",this.batteryChargingChange)})),this.prefersReducedMotion.removeEventListener("change",this.reducedMotionChange)}videoLoaded(){this.firstFrameHidden=!0,this.backgroundImageWC.updateProperties();const e=this.getVideoData();e&&e.cachedVideoId<0&&R.M0.addOrUpdateTmplString("videoFirstLoad"),this.isReducedMotionActive=this.prefersReducedMotion.matches,!this.isReducedMotionActive&&this.deviceMemoryGB>=4&&(this.isPlaying=!1,this.playVideo("Timer")),this.batteryPromise.then((()=>{this.battery.addEventListener("chargingchange",this.batteryChargingChange)})),this.prefersReducedMotion.addEventListener("change",this.reducedMotionChange)}}var pe=n(47266),he=n(10754),ge=n(20009),me=n(98619),fe=n(50632),ve=n(40378),ye=n(91992),Se=n(59952),Ce=n(68963);class we{constructor(e,t){this.showImageInRotation=!1,this.dayNow=(new Date).getDay(),this.darkModeQuery=window.matchMedia&&window.matchMedia("(prefers-color-scheme:dark)"),this.config=e,this.backgroundImageWC=t,this.backgroundImageWC.config.newStorage&&(this.config.data=ce.p.getCMSImageData()),(0,$.N)()&&(this.cmsSize=ce.p.getCMSImageSize(),this.showImageInRotation=!(!this.backgroundImageWC.config.simpleImages||!ce.p.getDailyRotationOnlySimpleImages())&&this.shouldShowImageInRotation(),this.showImageInRotation&&this.setImageAndMuseumCardProperties())}shouldShowImageInRotation(){if(this.backgroundImageWC.simpleSchedule){const e=this.backgroundImageWC.simpleSchedule,t=e&&e[this.dayNow];if(t>-1&&this.validateCurrentIndex(t)&&this.config.data)return this.imageId=e[this.dayNow],!0}return!1}setImageAndMuseumCardProperties(){if(this.defineResolution(),this.imageSource=this.getImageURL(this.imageId),!this.imageSource)return;const e=this.imageId<this.cmsSize?"image"+this.imageId:"simple";this.museumCard={credits:this.config.data[this.imageId].attribution,isDisplayed:!0,irisButtons:{likeClicked:!1,dislikeClicked:!1},title:this.backgroundImageWC.config.localizedStrings.cmsimage_titles[e]||"",titleURL:null}}assignBackgroundUsingIndex(e){this.imageId=Number(e),this.setImageAndMuseumCardProperties()}assignHolidayBackground(e){this.defineResolution();const{enableEventGleamImage:t}=this.backgroundImageWC.config;this.imageSource=t?this.getEventImageURL(e):this.getHolidayImageURL(),this.imageSource&&(this.museumCard={credits:this.backgroundImageWC.config.holidayImage.attribution,isDisplayed:!0,irisButtons:{likeClicked:!1,dislikeClicked:!1},title:null,titleURL:null})}getHolidayImageURL(){if(!this.backgroundImageWC.config.holidayImage)return null;let e;switch(this.currentResolution){case"720":e=this.darkModeQuery.matches?this.backgroundImageWC.config.holidayImage.dark.i720:this.backgroundImageWC.config.holidayImage.light.i720;break;case"1080":e=this.darkModeQuery.matches?this.backgroundImageWC.config.holidayImage.dark.i1080:this.backgroundImageWC.config.holidayImage.light.i1080;break;case"1440":e=this.darkModeQuery.matches?this.backgroundImageWC.config.holidayImage.dark.i1440:this.backgroundImageWC.config.holidayImage.light.i1440;break;case"2160":e=this.darkModeQuery.matches?this.backgroundImageWC.config.holidayImage.dark.i2160:this.backgroundImageWC.config.holidayImage.light.i2160}return e=re.qR+e+".img",e}getEventImageURL(e){const t=e?{DarkGleamUrl:this.backgroundImageWC.ssrBackgroundMetadata.dark,LightGleamUrl:this.backgroundImageWC.ssrBackgroundMetadata.light}:this.backgroundImageWC.eventGleam;return t?this.darkModeQuery.matches?t.DarkGleamUrl:t.LightGleamUrl:null}getImageURL(e){if(!this.config.data[e])return null;let t;switch(this.currentResolution){case"720":t=this.config.data[e].image.i720;break;case"1080":t=this.config.data[e].image.i1080;break;case"1440":t=this.config.data[e].image.i1440;break;case"2160":t=this.config.data[e].image.i2160}return t=re.qR+t+".img",t}defineResolution(){const e=new oe.fH,t=(0,oe.Nd)(e.data.innerHeight,"innerHeight"),n=(0,oe.Nd)(e.data.innerWidth,"innerWidth"),i=(0,ae.x_)()||1,r=(window.screen&&window.screen.height?window.screen.height:t+150)*i,o=(window.screen&&window.screen.width?window.screen.width:n)*i;this.backgroundImageWC.config.serveBetterResolution?this.currentResolution=r<=720||o<=1280?"1080":720<r&&r<=1080||1280<o&&o<=1920?"1440":r>=1080||o>=1920?"2160":"1440":this.currentResolution=r<=720||o<=1280?"720":720<r&&r<=1080||1280<o&&o<=1920?"1080":1080<r&&r<2e3||1920<o&&o<3e3?"1440":r>=2e3||o>=3e3?"2160":"1440"}validateCurrentIndex(e,t=!1){const n=!(0,_.isNullOrUndefined)(e)&&e<this.config.data.length&&!!this.config.data[e];return!n&&t&&(0,ne.H)(r.FEC,"Error validating CMS Image configuration index: "+e),n}}var be=n(9498),Te=n(67213),ke=n(62929),Pe=n(16614),Ie=n(77195),Ae=n(28326),Ee=n(55522),xe=n(94409),Me=n(23234),Le=n(26465),De=n(2587),Re=n(27412),Fe=n(12912);async function Oe(){const e=Re.k.isImageOfTheDayDisabled(),t=ce.p.getBackgroundImageTypeFromSettings(this.includeVideoBackgroundsInRotation,e),n=await ce.p.backgroundSelectionSet();Re.k.updateLayoutAndBackgroundImageType(t,n)}var Be=n(61303),Ne=n(88672),$e=n(53629);function Ue(e){return e?{dark:{toggleOffUrl:e.DarkToggleIconUrlOff||e.DarkToggleIconUrl,toggleOnUrl:e.DarkToggleIconUrl},light:{toggleOffUrl:e.LightToggleIconUrlOff||e.LightToggleIconUrl,toggleOnUrl:e.LightToggleIconUrl},offBgColor:e.OffIconBackgroundColor,onBgColor:e.OnIconBackgroundColor}:null}const _e="vp"===(0,f.L)().get("reqsrc")||!!(0,f.L)().get("vptest");class He extends pe.l{constructor(){super(...arguments),this.hotSpots=[],this.eventLocalStorage=v.Q.getInstance(),this.imageInformationalStyles="",this.imageOverrideStyles="",this.isFeedDisplayAlwaysOn=!1,this.isFRE=y.jG.IsFrePage,this.isTestRunning=!1,this.isReducedMotionActive=!1,this.isTTVRFired=!1,this.isLoadComplete=!1,this.hasFeedDisplayChanged=!1,this.museumCreditsCardIsShown=!1,this.copilotMuseumCardIsShown=!1,this.copilotHideTimeout=null,this.copilotCardIsHovered=!1,this.isChinaCompliance=(0,y.Yq)().IsChinaCompliance,this.storeOverrideStyles="",this.telemetryTags={},this.videoPlaying=!1,this.spaceHolderHeight=null,this.bgBlurSize="0px",this.displayMarqueeAd=!1,this.marqueeAdTopHeight=null,this.marqueeAdHeight=null,this.marqueeAdOverlayHeight=null,this.loadImageHotSpotsErrorFired=!1,this.shouldUpdateMuseumCardVisibility=!0,this.shouldUpdateMarqueeAdDismissButtonVisibility=!0,this.renderHotSpots=!0,this.storageKey="bkgdV",this.timeNow=(new Date).getTime(),this.backgroundGalleryEligibility=!1,this.includeVideoBackgroundsInRotation=!1,this.isDarkMode=!1,this.imageEmptyChecked=!1,this.dayNow=(new Date).getDay(),this.holidayKey="holidayBkgd",this.darkModeQuery=window.matchMedia&&window.matchMedia("(prefers-color-scheme:dark)"),this.currentProviderChanged=(e,t)=>{var n,i;switch(this.imageOverrideStyles="",this.imageInformationalStyles="",this.isLoadComplete=!1,"NoBackground"===t?(0,S.j3)("backgroundImage","hidden"):(0,S.j3)("backgroundImage","displayed"),t){case"Iris":this.checkAndCreateIrisProvider();break;case"Video":if(this.checkAndCreateVideoProvider(),(0,$.N)()&&this.backgroundGalleryEligibility&&this.galleryBackgroundSelectionMetadata&&"Video"===this.galleryBackgroundSelectionMetadata.provider&&(this.videoProvider.showVideo=this.videoProvider.validateCurrentIndex(Number(this.galleryBackgroundSelectionMetadata.configIndex),!0),!this.videoProvider.showVideo)){ce.p.clearCachedBackground().then((()=>{this.defineCurrentProviderAndSync()}));break}this.videoProvider&&(this.videoProvider.showVideo||this.shouldOverrideWithPreviousRotation())?(window.addEventListener("blur",this.onWindowBlur,!1),window.addEventListener("focus",this.onWindowFocus,!1)):(0,$.N)()&&this.setProviderForRotation();break;case"CMSImage":if(this.checkAndCreateCMSImageProvider(),!(0,$.N)())return;this.holidayBackground&&this.config.holidayImage||this.cmsImageProvider.showImageInRotation||this.cmsImageProvider.validateCurrentIndex(Number(null===(n=this.galleryBackgroundSelectionMetadata)||void 0===n?void 0:n.configIndex),!0)||ce.p.clearCachedBackground().then((()=>{this.defineCurrentProviderAndSync()}))}("Video"!==this.currentProvider&&this.videoProvider&&(this.videoProvider.isPlaying=!1),"Video"===e)&&((0,$.N)()&&(null===(i=this.videoProvider)||void 0===i||i.unloadVideo()),window.removeEventListener("blur",this.onWindowBlur,!1),window.removeEventListener("focus",this.onWindowFocus,!1));this.updateProperties()},this.animationComplete=()=>{this.calcMuseumBottom()},this.calcMuseumBottom=()=>{if(this.ref_museumCardContainer&&this.ref_museumCardContainer.classList.remove("museumCard_hide"),this.museumCreditsCardIsShown)return void(this.museumBottom=7);const e=this.getHeaderSpaceHolderHeight();null!==e&&(this.marqueeAdBottom=window.innerHeight-e+7,this.museumBottom=40)},this.createTelemetryTags=()=>{(0,_.isNullOrUndefined)(this.telemetryObject)?(0,ne.H)(r.CgS,"Telemetry object is undefined"):(this.telemetryTags.hotSpots={},this.telemetryTags.video=this.telemetryObject.addOrUpdateChild({name:"BackgroundVideo"}).getMetadataTag(),this.backgroundGalleryEligibility&&(this.telemetryTags.backgroundGalleryButton=this.telemetryObject.addOrUpdateChild({name:"BackgroundGalleryButton",type:F.c9.Interaction,behavior:F.wu.Navigate,content:{headline:"Edit Background"}}).getMetadataTag()),this.backgroundImageFixedWCStateSyncEventEmit([{key:"telemetryTags",value:this.telemetryTags}]),this.imageEditButtonTelemetryTag=this.telemetryObject.addOrUpdateChild({name:"ImageEditButtonButton",type:F.c9.Interaction,behavior:F.wu.More,content:{headline:"Edit Background"}}).getMetadataTag(),this.turnOnHolidaySwitchButtonTelemetryTag=this.telemetryObject.addOrUpdateChild({name:"HolidaySwitchButton>TurnOn",type:F.c9.Interaction,behavior:F.wu.Follow,content:{headline:"Turn On Holiday Switch Background"}}).getMetadataTag(),this.turnOffHolidaySwitchButtonTelemetryTag=this.telemetryObject.addOrUpdateChild({name:"HolidaySwitchButton>TurnOff",type:F.c9.Interaction,behavior:F.wu.Unfollow,content:{headline:"Turn Off Holiday Switch Background"}}).getMetadataTag(),this.openCopilotButtonTelemetryTag=this.telemetryObject.addOrUpdateChild({name:"openCopilotButton",type:F.c9.Interaction,behavior:F.wu.More,content:{headline:"Open Copilot"}}).getMetadataTag())},this.defineCurrentProvider=()=>{var e,t,n;if(this.holidayBackground=(0,$.N)()?this.getHolidayBkgdData():this.ssrBackgroundMetadata.holiday,this.config.holidayImage&&(this.toggleHolidaySwitch(),this.config.enableEventGleamImage&&this.updateHolidayBackgroundInFloatButton()),!(0,$.N)()||this.shouldOverrideWithPreviousRotation()){if(this.displayMarqueeAd)return void(this.currentProvider="MarqueeAd");if(this.holidayBackground&&this.config.holidayImage&&!this.config.enableEventGleamImage)return void(this.currentProvider="CMSImage");const e=this.chromiumPageSettingsState.currentBackgroundImageType===c.HX.off;return this.holidayBackground&&this.config.enableEventGleamImage&&this.ssrBackgroundMetadata.gleam&&this.chromiumPageSettingsState.currentLayout!==c.nP.focused&&!e?void(this.currentProvider="CMSImage"):void(this.currentProvider=this.ssrBackgroundMetadata.provider)}if(null!==(e=this.config.video)&&void 0!==e&&e.isTest)return void(this.currentProvider="Video");if(this.backgroundGalleryEligibility&&(this.galleryBackgroundSelectionMetadata=ce.p.getPreferenceByKeyFromFromPreferencesCache(re.wI.backgroundSelectionMetadata),this.includeVideoBackgroundsInRotation=ce.p.getPreferenceByKeyFromFromPreferencesCache(re.wI.includeVideoBackgroundsInRotation)),this.currentBackgroundMetadata=ce.p.getCurrentBackgroundPreferenceCache(),this.holidayBackground&&this.config.holidayImage&&!this.config.enableEventGleamImage)return void(this.currentProvider="CMSImage");const i=this.chromiumPageSettingsState.currentBackgroundImageType===c.HX.off;if(this.holidayBackground&&this.config.enableEventGleamImage&&this.eventGleam&&this.chromiumPageSettingsState.currentLayout!==c.nP.focused&&!i)this.currentProvider="CMSImage";else if("bing"!==this.chromiumPageSettingsState.currentBackgroundImageType&&"imageAndVideo"!==this.chromiumPageSettingsState.currentBackgroundImageType||!this.isTestRunning)switch(this.chromiumPageSettingsState.currentBackgroundImageType){case c.HX.bing:case c.HX.enterprise:case c.HX.imageAndVideo:case c.HX.iris:if(this.displayMarqueeAd){this.currentProvider="MarqueeAd";break}if(this.isFRE&&!this.config.turnOffFREImage){this.currentProvider="FREBackground";break}if(!this.isSSRBkgd&&null!==(t=this.config.event)&&void 0!==t&&t.enableEvent){var o;const e=this.config.event.showImageIndefinitely?C.vC:void 0;this.eventLocalStorage.shouldShowEvent(this.config.event.eventId,u.x.backgroundImageWC,this.config.event.creatives,e,null===(o=this.config.event.cmsContent)||void 0===o?void 0:o.url,r.LXY).then((e=>{this.showEvent=e,this.showEvent&&this.chromiumPageSettingsState.backgroundImageTypePolicy===c.gZ.allowAll?this.currentProvider="Event":(this.config.event.enableEvent=!1,this.defineCurrentProviderAndSync())}));break}if(this.chromiumPageSettingsState.currentLayout==c.nP.informational&&(0,Te.I9)()){this.currentProvider="NoBackground",R.M0.addOrUpdateTmplProperty("LowEndDeviceBkgdOff","1"),window.dispatchEvent(new CustomEvent("LowEndDeviceBkgd",{detail:{isLowEndDevice:!0}}));break}if(window.dispatchEvent(new CustomEvent("LowEndDeviceBkgd",{detail:{isLowEndDevice:!1}})),this.backgroundGalleryEligibility&&this.galleryBackgroundSelectionMetadata){if("CMSImage"===this.galleryBackgroundSelectionMetadata.provider){this.currentProvider="CMSImage";break}if("Video"===this.galleryBackgroundSelectionMetadata.provider){this.videoProvider&&!this.videoProvider.showVideo?this.setProviderForRotation():this.config.simpleImages&&this.cmsImageProvider&&this.cmsImageProvider.showImageInRotation&&ce.p.getDailyRotationOnlySimpleImages()?this.currentProvider="CMSImage":this.config.setBkgdOffInformational&&this.checkInformataionalFlight()?this.currentProvider="NoBackground":this.currentProvider="Video";break}if("Iris"===this.galleryBackgroundSelectionMetadata.provider){this.currentProvider="Iris";break}if("BrowserLocal"===this.galleryBackgroundSelectionMetadata.provider&&this.chromiumPageSettingsState.customBackgroundImageInfo&&this.chromiumPageSettingsState.customBackgroundImageInfo.hasImage){this.currentProvider="BrowserLocal";break}}if(null!==(n=this.config.video)&&void 0!==n&&n.enableFeature&&this.chromiumPageSettingsState.backgroundImageTypePolicy===c.gZ.allowAll&&this.chromiumPageSettingsState.currentBackgroundImageType!==c.HX.bing){if(!this.videoProvider||this.videoProvider.showVideo&&this.videoProvider.shouldShowVideo()&&(!this.backgroundGalleryEligibility||this.includeVideoBackgroundsInRotation)){this.config.simpleImages&&this.cmsImageProvider&&this.cmsImageProvider.showImageInRotation&&ce.p.getDailyRotationOnlySimpleImages()?this.currentProvider="CMSImage":this.config.setBkgdOffInformational&&this.checkInformataionalFlight()?this.currentProvider="NoBackground":this.currentProvider="Video";break}this.setProviderForRotation();break}this.setProviderForRotation();break;case c.HX.custom:this.chromiumPageSettingsState.customBackgroundImageInfo&&this.chromiumPageSettingsState.customBackgroundImageInfo.hasImage?this.currentProvider="BrowserLocal":this.currentProvider="Iris";break;case c.HX.off:this.currentProvider="NoBackground";break;case c.HX.theme:{var a;const e=this.chromiumPageSettingsState.configData,t=e&&e.enabledFeatures&&e.enabledFeatures.includes("msAllowThemeInstallationFromChromeStore"),n=this.chromiumPageSettingsState.ntpTheme&&this.chromiumPageSettingsState.ntpTheme.usingDefaultTheme,i=this.chromiumPageSettingsState.ntpTheme&&this.chromiumPageSettingsState.ntpTheme.imageUrl,r=this.chromiumPageSettingsState.ntpTheme&&(null===(a=this.chromiumPageSettingsState.ntpTheme.backgroundColorRgba)||void 0===a?void 0:a.length)>3;this.currentProvider=t&&!n&&(i||r)?"Theme":"NoBackground";break}default:this.currentProvider="Iris"}else this.isFRE&&!this.config.turnOffFREImage?this.currentProvider="FREBackground":this.displayMarqueeAd?this.currentProvider="MarqueeAd":this.currentProvider="Iris"},this.defineCurrentProviderAndSync=()=>{this.defineCurrentProvider(),this.backgroundImageFixedWCStateSyncEventEmit([{key:"currentProvider",value:this.currentProvider}])},this.error=e=>{if(this.isTTVRFired||(this.isTTVRFired=!0,this.markVisuallyReady(),(0,$.N)()&&(0,le.eC)().then((()=>(0,ke.f)(60,w.Al.IsPrerender)))),(0,ne.H)(r.yb9,"Error fetching source","Source: "+e),"Video"===this.currentProvider)this.videoProvider.error(),this.defineCurrentProviderAndSync();else this.currentProvider="Error",this.updateProperties(),this.backgroundImageFixedWCStateSyncEventEmit([{key:"currentProvider",value:this.currentProvider}])},this.loadComplete=()=>{this.isTTVRFired||(this.isTTVRFired=!0,this.markVisuallyReady(),(0,$.N)()&&(0,le.eC)().then((()=>(0,ke.f)(60,w.Al.IsPrerender))))},this.playVideo=()=>{this.videoPlaying||this.videoProvider.videoLoaded()},this.toggleMuseumCardOpen=()=>{const e=this.getStyleForElementKey(Y._.backgroundOuterHolder);this.museumCreditsCardIsShown?(window.removeEventListener("click",this.onClick_outsideMuseumCard),window.removeEventListener("keydown",this.onKeyDown_closeMuseumCard)):window.setTimeout((()=>{window.addEventListener("click",this.onClick_outsideMuseumCard),window.addEventListener("keydown",this.onKeyDown_closeMuseumCard)}),100),this.isFeedDisplayAlwaysOn&&(this.museumCreditsCardIsShown?(this.imageInformationalStyles=this.storeOverrideStyles,this.storeOverrideStyles=""):(this.storeOverrideStyles=this.imageInformationalStyles,this.imageInformationalStyles="")),this.museumCreditsCardIsShown?e.zIndex="":(e.zIndex=a,this.getStyleForElementKey(Y._.backgroundInnerHolder).height=window.innerHeight+"px"),this.museumCreditsCardIsShown=!this.museumCreditsCardIsShown,this.backgroundImageFixedWCStateSyncEventEmit([{key:"museumCreditsCardIsShown",value:this.museumCreditsCardIsShown}]),(0,b.Gg)(b.tk.museumCard,this.museumCreditsCardIsShown),this.calcMuseumBottom(),"Video"===this.currentProvider&&this.museumCreditsCardIsShown&&this.videoProvider.playVideo("Timer")},this.syncWithStateChange=()=>{const e=this.chromiumPageSettingsConnector.getCurrentState(),t=e.selectedFeedDisplaySetting!==this.chromiumPageSettingsState.selectedFeedDisplaySetting,n=e.quickLinksEnabled!==this.chromiumPageSettingsState.quickLinksEnabled;if((t||n)&&(this.museumBottom=0,this.marqueeAdBottom=0,this.hasFeedDisplayChanged=t),t&&this.displayMarqueeAd&&"always"!==e.selectedFeedDisplaySetting&&(this.displayMarqueeAd=!1,this.backgroundDataConnector.marqueAdDisplayStatusUpdated(!1)),this.displayMarqueeAd){e.currentBackgroundImageType!==this.chromiumPageSettingsState.currentBackgroundImageType&&e.currentBackgroundImageType!==c.HX.imageAndVideo&&e.currentBackgroundImageType!==c.HX.bing&&(this.displayMarqueeAd=!1,this.backgroundDataConnector.marqueAdDisplayStatusUpdated(!1))}if(!this.isFeedDisplayAlwaysOn||this.hasFeedDisplayChanged||this.config.translucentFeedEnabled)this.imageInformationalStyles="";else{const e=this.getHeaderSpaceHolderHeight();null!==e&&(this.imageInformationalStyles=`height: ${e}px;`)}if(this.chromiumPageSettingsState=e,this.isSSRBkgd&&!this.backgroundGalleryEligibility&&(this.ssrModifiedMismatchBackgroundType=this.chromiumPageSettingsState.currentBackgroundImageType),this.holidayBackground&&!this.config.enableEventGleamImage&&this.chromiumPageSettingsState.currentLayout==c.nP.focused&&(this.updateHolidayBackground(!1),this.config.holidayImage&&this.toggleHolidaySwitch()),this.defineCurrentProviderAndSync(),this.updateProperties(),this.calcMuseumBottom(),this.config.noBckImgOnNavSticky&&0===window.scrollY){const e="off"===this.chromiumPageSettingsState.currentBackgroundImageType;this.updatebackgroundImageOp(e)}},this.updateProperties=()=>{switch(this.isFeedDisplayAlwaysOn="always"===this.chromiumPageSettingsState.selectedFeedDisplaySetting,this.currentProvider){case"BrowserLocal":this.updateProperties_customImage();break;case"FREBackground":this.updateProperties_fre();break;case"Event":this.updateProperties_event();break;case"Iris":this.updateProperties_iris();break;case"NoBackground":this.updateProperties_noBackground();break;case"Theme":this.updateProperties_theme();break;case"Video":this.updateProperties_video();break;case"CMSImage":this.updateProperties_cmsImage();break;case"MarqueeAd":this.updateProperties_marqueeAd();break;default:this.updateProperties_error()}this.isCurrentBackgroundMetadataLoaded=!0,this.shouldOverrideWithPreviousRotation()?this.setCorrectRotationBackground():this.saveBackgroundPref(this.currentProvider)},this.updateProperties_customImage=()=>{this.imageSourceAgent=(0,$.N)()?this.chromiumPageSettingsState.customBackgroundImageInfo.resourceUrl:this.ssrBackgroundMetadata.imageUrl,this.museumCard=null,this.imageInformationalStyles=this.isFeedDisplayAlwaysOn?this.imageInformationalStyles:"",this.imageOverrideStyles=""},this.updateProperties_error=()=>{const e=this.config.freImages.informational,t=this.config.freImages.inspirational;this.imageSourceAgent="always"===this.chromiumPageSettingsState.selectedFeedDisplaySetting?(0,se.zz)(e,{width:0,height:0,enableDpiScaling:!1}):(0,se.zz)(t,{width:0,height:0,enableDpiScaling:!1}),this.museumCard=null,this.imageInformationalStyles=this.isFeedDisplayAlwaysOn?this.imageInformationalStyles:"",this.imageOverrideStyles=""},this.updateProperties_event=async()=>{var e,t;const n=this.config.event.eventId,i=this.config.event.showImageIndefinitely?C.vC:void 0;let o,a;if(this.currentEventCreative=await this.eventLocalStorage.getCurrentCreativeId(n,u.x.backgroundImageWC,this.config.event.creatives,i,null===(e=this.config.event.cmsContent)||void 0===e?void 0:e.url,r.LXY),null!==(t=this.config.event)&&void 0!==t&&t.cmsContent){if(o=this.eventLocalStorage.getCMSContent(n,u.x.backgroundImageWC,this.config.event.creatives,r.LXY),!o)return this.config.event=null,void this.defineCurrentProviderAndSync();this.config.event.imageData.CMS.attribution=o.attribution,this.config.event.imageData.CMS.imageSource=o.imageSource,this.config.event.imageData.CMS.imageHref=o.imageHref}if(a="VpTest"===n?"Test image":this.config.event.cmsContent?o.title:this.strings.events[this.config.event.useCommonIdForLocString?this.config.event.eventId:this.currentEventCreative],this.imageSourceAgent=this.config.event.imageData[this.currentEventCreative].imageSource,this.museumCard={credits:this.config.event.imageData[this.currentEventCreative].attribution,isDisplayed:!0,irisButtons:{likeClicked:!1,dislikeClicked:!1},title:a,titleURL:(0,T.h_)(this.config.event.imageData[this.currentEventCreative].imageHref)},this.imageInformationalStyles=this.isFeedDisplayAlwaysOn?this.imageInformationalStyles:"",this.imageOverrideStyles="",!this.telemetryObject)return void(0,ne.H)(r.CgS,"Telemetry object is undefined on Iris update");this.telemetryTags.cardTitle=this.telemetryObject.addOrUpdateChild({name:"CopyrightLink",behavior:F.wu.Navigate,content:{headline:a,id:C.YO+this.config.event.eventId},overrideDestinationUrl:this.config.event.imageData[this.currentEventCreative].imageHref}).getMetadataTag(),this.telemetryTags.dismissButton=this.telemetryObject.addOrUpdateChild({name:"DismissEvent",behavior:F.wu.Dislike,content:{headline:this.museumCard.title,id:C.YO+this.config.event.eventId}}).getMetadataTag(),this.telemetryTags.title_cardHidden=this.telemetryObject.addOrUpdateChild({name:"LikeBackground",behavior:F.wu.Show,content:{headline:"LikeBackground",id:C.YO+this.config.event.eventId}}).getMetadataTag(),this.telemetryTags.title_cardShown=this.telemetryObject.addOrUpdateChild({name:"ExitFullView",behavior:F.wu.Close,content:{headline:"ExitFullView",id:C.YO+this.config.event.eventId}}).getMetadataTag(),this.backgroundImageFixedWCStateSyncEventEmit([{key:"telemetryTags",value:this.telemetryTags}]);const s=this.config.event.imageData[this.currentEventCreative].secondaryButton;s&&(this.secondaryButtonTelemetryTag=this.telemetryObject.addOrUpdateChild({name:"SecondaryButton",behavior:F.wu.Navigate,content:{headline:this.museumCard.title,id:C.YO+this.config.event.eventId},overrideDestinationUrl:s.href}).getMetadataTag(),this.backgroundImageFixedWCStateSyncEventEmit([{key:"secondaryButtonTelemetryTag",value:this.secondaryButtonTelemetryTag}]))},this.updateProperties_fre=()=>{const e=this.config.freImages.informational,t=this.config.freImages.inspirational,n="always"===this.chromiumPageSettingsState.selectedFeedDisplaySetting?(0,se.zz)(e,{width:0,height:0,enableDpiScaling:!1}):(0,se.zz)(t,{width:0,height:0,enableDpiScaling:!1});this.imageSourceAgent=n,this.museumCard=null,this.imageInformationalStyles=this.isFeedDisplayAlwaysOn?this.imageInformationalStyles:"",this.imageOverrideStyles=""},this.updateProperties_iris=async()=>{var e;if(!(0,$.N)())return void(this.imageSourceAgent=this.ssrBackgroundMetadata.imageUrl);if(_e)await this.irisProvider.loadImageHotSpots();else try{await this.irisProvider.loadImageHotSpots()}catch(e){this.loadImageHotSpotsErrorFired||((0,ne.H)(r.W91,"irisProvider.loadImageHotSpots failed. Mark load complete.",e&&e.message),this.loadImageHotSpotsErrorFired=!0)}const t=this.irisProvider.irisStateInfo;this.imageSourceAgent=this.irisProvider.irisImageURL,this.museumCard={...this.irisProvider.museumCard,irisButtons:{...null===(e=this.museumCard)||void 0===e?void 0:e.irisButtons}},this.saveBackgroundPref("Iris"),this.imageInformationalStyles=this.isFeedDisplayAlwaysOn?this.imageInformationalStyles:"",this.imageOverrideStyles="";const n=this.config.iris.disableHotSpots||this.isFeedDisplayAlwaysOn||!t||!t.hsList||0===t.hsList.length;if(this.hotSpots=[],!n){let e,n;const i=(0,ee.b_)(Y._.topSites);this.config.topSitesCloserToSearchBox?(e=i,n=(0,ee.b_)(Y._.navBar)):(e=(0,ee.b_)(Y._.searchBox),n=i);let r=e?e.getBoundingClientRect().bottom:0,o=n?n.getBoundingClientRect().top:0;r=i?i.getBoundingClientRect().bottom:0;const a=(0,ee.b_)(Y._.recommendedSites);if(a&&(o=a.getBoundingClientRect().top),0==o||!a){const e=(0,ee.b_)(Y._.headerGrid);o=e?e.getBoundingClientRect().bottom:0}const s=Math.max(o-r-32,0),c=Math.max(window.outerWidth-64,0);t.hsList.forEach((e=>{if(!e||!e.landscape)return;const t=s*parseFloat(e.landscape.y_percent),n=c*parseFloat(e.landscape.x_percent);if(t+32+16+20<=s&&n+32+8+256<=c){const i={marginTop:r+16+"px",marginLeft:"16px",marginRight:"32px",height:s+"px",width:c+"px",widthOffset:Math.floor(n)+"px",heightOffset:Math.floor(t)+"px"};this.hotSpots.push({data:e,styles:i,icon:G(e.icon),telemetryTags:this.telemetryTags.hotSpots[e.title],onClickHandler:this.irisProvider.hotSpotClickHandler,onMouseEnterHandler:this.irisProvider.hotSpotMouseEnterHandler})}}))}if(!this.telemetryObject||!t)return void(0,ne.H)(r.CgS,"Telemetry object is undefined on Iris update");const i=this.museumCard.title?this.museumCard.title:"",o=t.titleLink?t.titleLink:"";this.telemetryTags.cardTitle=this.telemetryObject.addOrUpdateChild({name:"CopyrightLink",behavior:F.wu.Navigate,content:{headline:i},overrideDestinationUrl:o}).getMetadataTag(),this.telemetryTags.dislikeButton=this.telemetryObject.addOrUpdateChild({name:"DisLike",behavior:F.wu.Dislike,content:{headline:i}}).getMetadataTag(),this.telemetryTags.likeButton=this.telemetryObject.addOrUpdateChild({name:"Like",behavior:F.wu.Like,content:{headline:i}}).getMetadataTag(),this.telemetryTags.title_cardHidden=this.telemetryObject.addOrUpdateChild({name:"IrisMuseumCard",behavior:F.wu.Show,content:{headline:"Like this Background?",type:F.uH.Image}}).getMetadataTag(),this.telemetryTags.title_cardShown=this.telemetryObject.addOrUpdateChild({name:"IrisMuseumCard",behavior:F.wu.Close,content:{headline:"Exit Full View",type:F.uH.Image}}).getMetadataTag();const{hsList:a,creativeId:s}=t;a&&a.forEach((e=>{const t=this.telemetryObject.addOrUpdateChild({name:"HotSpot",content:{headline:(e.cta_type===K.offPageNavigation?`HotSpot_${s}_${e.hs}`:`HotSpot_${e.cta}_${s}_${e.hs}`)+" - "+e.title},type:F.c9.Module,behavior:F.wu.Navigate,action:F.Aw.Click,overrideDestinationUrl:e.cta}).getMetadataTag();this.telemetryTags.hotSpots&&(this.telemetryTags.hotSpots[e.title]=t)})),this.backgroundImageFixedWCStateSyncEventEmit([{key:"telemetryTags",value:this.telemetryTags}])},this.updateProperties_noBackground=()=>{this.imageSourceAgent=null,this.museumCard=null,this.imageOverrideStyles="",this.loadComplete()},this.updateProperties_theme=()=>{var e;(this.ntpTheme=this.chromiumPageSettingsState.ntpTheme,this.imageSourceAgent=null,this.museumCard=null,this.imageInformationalStyles="",(0,$.N)())?this.imageOverrideStyles=`background-position: ${this.ntpTheme.imageHorizontalAlignment} ${this.ntpTheme.imageVerticalAlignment}; background-repeat: ${this.ntpTheme.imageTiling}; background-image: ${this.ntpTheme.imageUrl}; background-color: ${this.getThemeBackgroundColor()}`:null!==(e=this.ssrBackgroundMetadata)&&void 0!==e&&e.imageUrl&&"#"!=this.ssrBackgroundMetadata.imageUrl.charAt(0)?this.imageOverrideStyles=`background-image: ${this.ssrBackgroundMetadata.imageUrl};`:this.imageOverrideStyles=`background-color: ${this.ssrBackgroundMetadata.imageUrl}`;this.ntpTheme&&"repeat"===this.ntpTheme.imageTiling&&(this.imageOverrideStyles+="background-size: auto;"),this.loadComplete()},this.updateProperties_video=()=>{!(0,$.N)()||this.shouldOverrideWithPreviousRotation()?this.videoProvider&&this.videoProvider.assignBackgroundUsingIndex(this.ssrBackgroundMetadata.configIndex.toString()):this.backgroundGalleryEligibility&&this.galleryBackgroundSelectionMetadata&&"Video"===this.galleryBackgroundSelectionMetadata.provider?this.videoProvider&&this.videoProvider.assignBackgroundUsingIndex(this.galleryBackgroundSelectionMetadata.configIndex):this.videoProvider&&this.videoProvider.setVideoAndMuseumCardProperties(),this.imageSourceAgent=this.videoProvider.firstFrameSource,this.museumCard={...this.videoProvider.museumCard},this.imageInformationalStyles=this.isFeedDisplayAlwaysOn?this.imageInformationalStyles:"",this.isReducedMotionActive=this.videoProvider.isReducedMotionActive,this.showToast=this.videoProvider.showToast,this.toastMessage=this.videoProvider.toastMessage,this.videoPlaying=this.videoProvider.isPlaying,this.backgroundImageFixedWCStateSyncEventEmit([{key:"videoPlaying",value:this.videoProvider.isPlaying}]),this.videoSource=this.videoProvider.videoSource,this.imageInformationalStyles=this.isFeedDisplayAlwaysOn?this.imageInformationalStyles:"",this.loadComplete(),this.telemetryObject?(0,$.N)()&&(this.setVideoSecondaryButtonTelemetry(),this.telemetryTags.dislikeButton=this.telemetryObject.addOrUpdateChild({name:"DisLike",behavior:F.wu.Dislike,content:{headline:this.videoProvider.museumCard.title,id:this.videoProvider.videoId+" - "+this.videoProvider.currentResolution}}).getMetadataTag(),this.telemetryTags.likeButton=this.telemetryObject.addOrUpdateChild({name:"Like",behavior:F.wu.Like,content:{headline:this.videoProvider.museumCard.title,id:this.videoProvider.videoId+" - "+this.videoProvider.currentResolution}}).getMetadataTag(),this.telemetryTags.title_cardHidden=this.telemetryObject.addOrUpdateChild({name:"LikeBackground",behavior:F.wu.Show,content:{headline:"LikeBackground",id:this.videoProvider.videoId+" - "+this.videoProvider.currentResolution}}).getMetadataTag(),this.telemetryTags.title_cardShown=this.telemetryObject.addOrUpdateChild({name:"ExitFullView",behavior:F.wu.Close,content:{headline:"ExitFullView",id:this.videoProvider.videoId+" - "+this.videoProvider.currentResolution}}).getMetadataTag(),this.backgroundImageFixedWCStateSyncEventEmit([{key:"telemetryTags",value:this.telemetryTags}])):(0,ne.H)(r.CgS,"Telemetry object is undefined on Iris update")},this.updateProperties_cmsImage=()=>{if(this.holidayBackground&&this.config.holidayImage&&!this.config.enableEventGleamImage)this.cmsImageProvider.assignHolidayBackground();else if(this.holidayBackground&&this.config.enableEventGleamImage&&this.eventGleam)this.cmsImageProvider.assignHolidayBackground();else if((0,$.N)())this.backgroundGalleryEligibility&&this.galleryBackgroundSelectionMetadata&&this.cmsImageProvider.assignBackgroundUsingIndex(this.galleryBackgroundSelectionMetadata.configIndex);else{this.ssrBackgroundMetadata.gleam&&this.ssrBackgroundMetadata.holiday?this.cmsImageProvider.assignHolidayBackground(!0):this.cmsImageProvider.assignBackgroundUsingIndex(this.ssrBackgroundMetadata.configIndex.toString())}this.imageSourceAgent=this.cmsImageProvider.imageSource,this.museumCard={...this.cmsImageProvider.museumCard},this.imageInformationalStyles=this.isFeedDisplayAlwaysOn?this.imageInformationalStyles:""},this.updateProperties_marqueeAd=()=>{if(this.marqueeAd){var e,t,n,i,o,a;let s;const c=(window.screen&&window.screen.height?window.screen.height:window.innerHeight)*window.devicePixelRatio,d=(window.screen&&window.screen.width?window.screen.width:window.innerWidth)*window.devicePixelRatio>=3840||c>=2160,l=(0,me.Bn)().currentColumnArrangement;if(l===fe.K$.c5&&d)s=this.marqueeAd.images.find((e=>e.type===p.r.HighResolution4K));else{const e={[fe.K$.c1]:p.r.C1,[fe.K$.c2]:p.r.C2,[fe.K$.c3]:p.r.C3,[fe.K$.c4]:p.r.C4,[fe.K$.c5]:p.r.C5};s=this.marqueeAd.images.find((t=>t.type===e[l]))}if(this.imageSourceAgent=s?s.url:this.marqueeAd.images[0].url,this.museumCard=null,!this.telemetryObject)return void(0,ne.H)(r.CgS,"Telemetry object is undefined for bespoke ads update");this.telemetryTags.marqueeAdDismissButton=this.telemetryObject.addOrUpdateChild({name:"MarqueeAdDismissButton",behavior:F.wu.Hide,content:{headline:null===(e=this.marqueeAd)||void 0===e?void 0:e.title,id:null===(t=this.marqueeAd)||void 0===t?void 0:t.clickThroughUrl}}).getMetadataTag(),this.telemetryTags.marqueeAdCTAButton=this.telemetryObject.addOrUpdateChild({name:"MarqueeAdCTAButton",type:F.c9.Interaction,behavior:F.wu.Navigate,content:{headline:null===(n=this.marqueeAd)||void 0===n?void 0:n.ctaText,id:null===(i=this.marqueeAd)||void 0===i?void 0:i.clickThroughUrl}}).getMetadataTag(),this.telemetryTags.marqueeAdSponsorLogo=this.telemetryObject.addOrUpdateChild({name:"MarqueeAdSponsorLogo",type:F.c9.Interaction,behavior:F.wu.Navigate,content:{headline:null===(o=this.marqueeAd)||void 0===o?void 0:o.providerName,id:null===(a=this.marqueeAd)||void 0===a?void 0:a.clickThroughUrl}}).getMetadataTag()}},this.handleGalleryDispositionButtonClick=async()=>{const e=this.backgroundDataConnector.getCurrentState(),t=null==e?void 0:e.backgroundDispositionMetadata;switch(null==t?void 0:t.actionType){case"like":await this.handleGalleryLike(null==t?void 0:t.provider);break;case"dislike":await this.handleGalleryDislike(null==t?void 0:t.provider,null==t?void 0:t.configIndex)}},this.handleGalleryLike=async e=>{if("Iris"===e)this.irisProvider.likeClickButtonHandler()},this.handleGalleryDislike=async(e,t)=>{let n;switch(e){case"Video":n=this.videoProvider&&this.videoProvider.removeVideoFromLocalStorage(t),n&&this.shouldOverrideWithPreviousRotation()&&this.setCorrectRotationBackground();break;case"Iris":await this.irisProvider.dislikeClickButtonHandler()}},this.onClick_secondaryButton=()=>{"Video"===this.currentProvider?this.videoProvider?(this.videoProvider.isPlaying?this.videoProvider.pauseVideo("Button"):this.videoProvider.playVideo("Button"),this.setVideoSecondaryButtonTelemetry(!0)):(0,ne.H)(r.$qz,"Video provider not available. Attempted play/pause video"):"Event"===this.currentProvider&&window.open(this.config.event.imageData[this.currentEventCreative].secondaryButton.href)},this.onClick_outsideMuseumCard=e=>{e.composedPath().includes(this.ref_museumCardContainer)||(R.M0.sendActionEvent(this.ref_museumCardButton,F.Aw.Click,F.wu.Close),this.toggleMuseumCardOpen())},this.onClick_openGalleryButton=()=>{this.backgroundDataConnector&&this.galleryBroadcastChannel&&(this.galleryBroadcastChannel.postMessage("galleryOpened"),this.backgroundDataConnector.updateBackgroundGalleryDisplayed(!0),this.toggleMuseumCardOpen())},this.onClick_imageEditButton=()=>{this.backgroundDataConnector&&this.galleryBroadcastChannel&&(this.galleryBroadcastChannel.postMessage("galleryOpened"),this.backgroundDataConnector.updateBackgroundGalleryDisplayed(!0))},this.onClick_openCopilotButton=()=>{this.copilotShowCard&&this.copilotShowCard(!0)},this.onClick_pickMessageItem=e=>{(e||" "===e)&&window.chrome.edgeMarketingPagePrivate.sendNtpQuery("summarize the page",e,"https://www.msn.com/en-us/money/markets/biden-saved-the-economy-and-launched-a-new-age-of-prosperity-why-isn-t-he-getting-any-credit-opinion/ar-AA1eUYUo?ocid=entnewsntp&pc=U531&cvid=f91d7332657f4f8d849065750a18721c&ei=17")},this.onClick_marqueeAdClose=()=>{this.displayMarqueeAd=!1,this.defineCurrentProviderAndSync(),this.backgroundDataConnector&&this.backgroundDataConnector.marqueAdDisplayStatusUpdated(!1),this.marqueeAd&&this.marqueeAd.optOutUrl&&Ie.o.sendBeacons([this.marqueeAd.optOutUrl]),R.M0.sendActionEvent(this.ref_marqueeAdDismissButton,F.Aw.Click,F.wu.Close)},this.onKeyDown_closeMuseumCard=e=>{"Escape"===e.code&&(R.M0.sendActionEvent(this.ref_museumCardButton,F.Aw.Click,F.wu.Close),this.toggleMuseumCardOpen())},this.onFocusLeave_museumCardButton=()=>{this.museumCreditsCardIsShown&&this.ref_backgroundGalleryButton&&this.ref_backgroundGalleryButton.focus()},this.onFocusLeave_backgroundGalleryButton=()=>{this.museumCreditsCardIsShown&&this.ref_museumCardButton&&this.ref_museumCardButton.focus()},this.onResize=()=>{this.museumCard&&this.calcMuseumBottom(),"Iris"===this.currentProvider&&this.updateProperties(),this.backgroundGalleryEligibility&&this.checkMinimumWidthForGallery()},this.onScroll=(0,k.k)((()=>{this.museumCreditsCardIsShown&&this.toggleMuseumCardOpen();const e=0===window.scrollY;this.museumCard&&(e?(this.ref_hotSpotsContainer&&this.ref_hotSpotsContainer.classList.remove("hotSpotContainer_hide"),this.calcMuseumBottom(),this.shouldUpdateMuseumCardVisibility=!0):!e&&this.shouldUpdateMuseumCardVisibility&&(this.ref_hotSpotsContainer&&this.ref_hotSpotsContainer.classList.add("hotSpotContainer_hide"),this.shouldUpdateMuseumCardVisibility=!1)),this.displayMarqueeAd&&(e?(this.ref_marqueeAdDismissButtonContainer&&this.ref_marqueeAdDismissButtonContainer.classList.remove("museumCard_hide"),this.calcMuseumBottom(),this.shouldUpdateMarqueeAdDismissButtonVisibility=!0):!e&&this.shouldUpdateMarqueeAdDismissButtonVisibility&&(this.ref_marqueeAdDismissButtonContainer&&this.ref_marqueeAdDismissButtonContainer.classList.add("museumCard_hide"),this.shouldUpdateMarqueeAdDismissButtonVisibility=!1)),"Video"===this.currentProvider&&(e?this.videoProvider.playVideo("Scroll"):this.videoProvider.pauseVideo("Scroll"));const t=window.scrollY>d.FT;if(this.config.noBckImgOnNavSticky){const e="off"===this.chromiumPageSettingsState.currentBackgroundImageType||t;this.updatebackgroundImageOp(e)}}),350),this.onWindowBlur=()=>{this.videoProvider.pauseVideo("Focus")},this.onWindowFocus=()=>{this.videoProvider.playVideo("Focus")},this.updatebackgroundImageOp=e=>{var t,n;const i=null===(t=this.shadowRoot)||void 0===t||null===(n=t.getElementById)||void 0===n?void 0:n.call(t,"backgroundImage");(0,$.N)()&&i&&(i.style.opacity=e?"0":"1")},this.dailyRotationEnabled=e=>{var t,n;if(!this.backgroundGalleryEligibility)return(null===(t=this.chromiumPageSettingsState)||void 0===t?void 0:t.currentBackgroundImageType)===c.HX.imageAndVideo||(null===(n=this.chromiumPageSettingsState)||void 0===n?void 0:n.currentBackgroundImageType)===c.HX.bing;const i=this.ssrBackgroundMetadata?this.ssrBackgroundMetadata.provider:this.currentProvider;return(null==e?void 0:e.changeBackgroundDaily)||void 0===this.galleryBackgroundSelectionMetadata&&("Video"===i||"Iris"===i)},this.videoBackgroundsIncludedInRotation=e=>this.backgroundGalleryEligibility?null==e?void 0:e.includeVideoBackgroundsInRotation:this.chromiumPageSettingsState.currentBackgroundImageType===c.HX.imageAndVideo,this.isPotentiallyMismatchedForRotation=e=>this.backgroundGalleryEligibility?this.dailyRotationEnabled(e)&&this.videoBackgroundsIncludedInRotation(e)||void 0!==this.config.simpleImages:this.dailyRotationEnabled(e),this.themeChanged=()=>{Z.S.queueUpdate((()=>{this.isDarkMode=(0,ve.Y)()}))},this.handleImageEditEmitListener=()=>{this.onClick_imageEditButton()},this.handleSecondaryEmitListener=()=>{this.onClick_secondaryButton()},this.handleToggleEmitListener=()=>{this.toggleMuseumCardOpen()},this.handleEventToggleEmitListener=()=>{const e=this.getHolidayBkgdData();this.updateHolidayBackground(e),this.defineCurrentProviderAndSync(),"CMSImage"===this.currentProvider&&this.updateProperties()},this.toggleHolidaySwitch=()=>{this.ref_holidayToggle&&void 0!==this.holidayBackground&&(this.ref_holidayToggle.toggleAttribute("checked",this.holidayBackground),this.ref_holidayToggle.toggleAttribute("current-checked",this.holidayBackground))},this.statesSyncInit=()=>{const e=[];["backgroundGalleryButtonEnabled","currentProvider","museumCreditsCardIsShown","secondaryButtonTelemetryTag","telemetryTags","videoPlaying","eventGleam","holidayBackground"].forEach((t=>{e.push({key:t,value:this[t]})})),window.dispatchEvent(new CustomEvent("backgroundImageWCStatesSync",{detail:{states:e,init:!0}}))},this.setMarqueeExtraClassName=e=>{e===fe.K$.c1||e===fe.K$.c2?this.marqueeAdExtraClass="marqueeAdSmall":this.marqueeAdExtraClass="marqueeAdLarge"},this.updateHolidayBackgroundInFloatButton=()=>{this.backgroundImageFixedWCStateSyncEventEmit([{key:"holidayBackground",value:this.holidayBackground}])}}set imageSourceAgent(e){if(!e&&!this.imageEmptyChecked&&!_e)switch(this.currentProvider){case"NoBackground":case"Theme":break;default:this.imageEmptyChecked=!0,this.error("No image source")}this.imageSource=e}afterHydration(){this.canRenderNonSsrElements=!0,this.loadComplete(),this.ref_video&&"Video"===this.currentProvider&&this.playVideo()}async prerenderRefreshCritical(){if(this.displayMarqueeAd){await Ie.o.initializeMarqueeAd(!0);await Ie.o.getMarqueeAdEligibilityAsync()&&(this.marqueeAd=Ie.o.getMarqueeAd())}}async experienceConnected(){if((0,$.N)()?(this.canRenderNonSsrElements=!this.isSSRRendered,this.imageEditButtonRefPromise=new Promise((e=>this.imageEditButtonRefPromiseResolver=e)),this.videoButtonRefRefPromise=new Promise((e=>this.videoButtonRefPromiseResolver=e))):this.canRenderNonSsrElements=!1,this.config.newStorage&&(await ce.p.loadCMSImageData(),await ce.p.loadCMSVideoData()),this.config.enableEventGleamImage&&(this.eventGleam=function(){try{var e;const t=$e.k.getWpoTreatmentsWithType(Ne._h.eventGleam,!0),n=null===(e=t[0])||void 0===e?void 0:e.properties;if((null==t?void 0:t.length)>0&&n)return n}catch(e){const t="Error in getting wpo event gleam data";(0,ne.H)(r.Od5,t,`error:${e}`)}return null}(),this.backgroundImageFixedWCStateSyncEventEmit([{key:"eventGleam",value:this.eventGleam}])),this.chromiumPageSettingsConnector=(0,U.K0)(h.z.ChromiumPageSettings),this.isDarkMode=(0,ve.Y)(),this.darkModeQuery.addEventListener("change",this.themeChanged),(0,_.isNullOrUndefined)(this.chromiumPageSettingsConnector)){const e=(0,_.isNullOrUndefined)(this.chromiumPageSettingsConnector);return(0,ne.H)(r.B5f,"Data connector missing: ChromiumSettings-"+e),void this.error("Data connectors missing")}this.config.simpleImages?(ce.p.setSimpleImagesandCMSSize(!0,this.config.cmsImage.data.length),this.config.cmsImage.data=this.config.cmsImage.data.concat(this.config.simpleImages.data),await ce.p.checkAndUpdateRotation(),(0,$.N)()&&(this.checkAndGenerateSimpleImageOnlySchedule(),window.addEventListener("simpleImageBkgdToggle",this.syncWithStateChange)),this.checkAndCreateCMSImageProvider()):ce.p.checkAndRemoveSimpleInfo();let e=ce.p.getBackgroundGalleryEligibility();if(void 0!==e||this.config.disableBackgroundGallery||y.jG.IsFrePage||(await ce.p.initState(O.f.backgroundDataStateLoaded.getActionSender((0,U.K0)(h.z.BackgroundData))),e=ce.p.getBackgroundGalleryEligibility()),this.backgroundGalleryEligibility=!this.config.disableBackgroundGallery&&!this.isFRE&&ce.p&&e,this.backgroundGalleryEligibility&&(this.checkMinimumWidthForGallery(),this.backgroundDataConnector=(0,U.K0)(h.z.BackgroundData),this.galleryBroadcastChannel=new BroadcastChannel(Se.fZ)),this.backgroundGalleryEligibility&&(0,_.isNullOrUndefined)(this.backgroundDataConnector))return(0,ne.H)(r.B5f,"Data connector missing: BackgroundData"),void this.error("Data connectors missing");let t=!1;const n=ce.p.getPreferenceByKeyFromFromPreferencesCache(re.wI.backgroundSelectionMetadata);if(n&&n.configIndex){("Video"===n.provider&&this.config.video.data[n.configIndex].removeContent||"CMSImage"===n.provider&&this.config.cmsImage.data[n.configIndex].removeContent)&&(ce.p.setBackgroundPreferenceByKey(re.wI.backgroundSelectionMetadata,void 0),ce.p.setBackgroundPreferenceByKey(re.wI.changeBackgroundDaily,!0),ce.p.updateLayoutBasedOnBackgroundType()),t="CMSImage"===n.provider||"Video"===n.provider||"Iris"===n.provider}if(this.config.enableEventGleamImage&&void 0===this.getHolidayBkgdData()&&(n&&!t||this.updateHolidayBackground(!0)),this.chromiumPageSettingsState=this.chromiumPageSettingsConnector.getCurrentState(),this.isTestRunning="1"===P.c.getQueryParameterByName("forceImageTest",(0,ae.zp)()),this.config.enableMarqueeAd){await Ie.o.initializeMarqueeAd();await Ie.o.getMarqueeAdEligibilityAsync()&&(this.marqueeAd=Ie.o.getMarqueeAd(),this.backgroundDataConnector=(0,U.K0)(h.z.BackgroundData),this.displayMarqueeAd=!0,this.setMarqueeExtraClassName((0,me.Bn)().currentColumnArrangement),(0,me.Bn)().subscribe((e=>{this.setMarqueeExtraClassName(e),this.syncWithStateChange()})))}if(!(0,$.N)())return this.ssrBackgroundMetadata={provider:w.Al.EdgeNTPHeader.backgroundImage.provider,configIndex:w.Al.EdgeNTPHeader.backgroundImage.configIndex,imageUrl:w.Al.EdgeNTPHeader.backgroundImage.imageUrl,holiday:w.Al.EdgeNTPHeader.backgroundImage.holiday,dark:w.Al.EdgeNTPHeader.backgroundImage.dark,light:w.Al.EdgeNTPHeader.backgroundImage.light,gleam:w.Al.EdgeNTPHeader.backgroundImage.gleam},ce.p.setSSRBackgroundMetadata(this.ssrBackgroundMetadata),ce.p.setCurrentBackgroundMetadata(this.ssrBackgroundMetadata),void this.defineCurrentProviderAndSync();if(this.isSSRBkgd=window.isSSREnabled&&w.Al&&w.Al.CurrentFlightSet&&!w.Al.CurrentFlightSet.has("prg-ssrheader-c"),this.isSSRBkgd){const e=this.backgroundGalleryEligibility&&await ce.p.getBackgroundPreferences();this.galleryBackgroundSelectionMetadata=ce.p.getPreferenceByKeyFromFromPreferencesCache(re.wI.backgroundSelectionMetadata),this.ssrBackgroundMetadata=await ce.p.getCurrentBackgroundMetadata(),this.holidayBackground=this.getHolidayBkgdData(),this.holidayBackground&&this.ssrBackgroundMetadata&&!this.ssrBackgroundMetadata.holiday&&this.updateHolidayBackground(!1),ce.p.setCurrentBackgroundPreferenceCache(this.ssrBackgroundMetadata),this.isPotentiallyMismatchedForRotation(e)&&(this.data=this.getVideoData(),this.checkForSSRRotationMismatch(this.data))}var i,o;(this.defineCurrentProviderAndSync(),this.config.holidayImage&&window.setTimeout((()=>{this.$emit("holidayBgChanged",this.holidayBackground)}),0),"NoBackground"===this.currentProvider&&this.config.enableBgImagePromotion)&&function(e){var t;const n={id:De.gz.BackgroundImagePromotion,group:Ae.V.Functional,placementSource:Ae.m.Internal,surfaceModel:{surfaceType:Ee.U.Coachmark,size:De.dm.Medium,position:{coachmarkAnchor:Y._.settingsButton,anchoringPosition:De.RC.Below,hasPointer:!0,pointerPosition:De.Jt.Opposite},dismissAfterSeconds:15},contentModel:{title:(null==e?void 0:e.title)||"Your background image is off.",description:(null==e?void 0:e.description)||"Want to turn it on?",contentType:xe.J.CallToAction,engageContentAction:{label:(null==e?void 0:e.engageButtonLabel)||"Turn on",actionDelegate:Oe},dismissContentAction:{label:(null==e?void 0:e.closeButtonLabel)||"Maybe later",actionDelegate:()=>{}}}},i=(0,Me.l)(Le.p.Viewed,1);null===(t=(0,Fe.$0)())||void 0===t||t.sendInternalPlacement(n,[i])}((null===(i=this.config)||void 0===i||null===(o=i.localizedStrings)||void 0===o?void 0:o.promotionStrings)||{});if(!this.holidayBackground&&this.isSSRBkgd&&void 0!==this.ssrBackgroundMetadata&&!this.displayMarqueeAd&&(R.M0.addOrUpdateTmplProperty("bkgdSSRProvider",this.currentProvider),void 0!==this.ssrBackgroundMetadata.provider&&this.ssrBackgroundMetadata.provider!==this.currentProvider)){"true"===(0,f.L)().get("mock-ntp-header")||R.M0.sendAppErrorEvent({...r.sFk,message:"SSR - Edge header mismatch.",pb:{...r.sFk.pb,customMessage:`key: backgroundImage, header: ${this.ssrBackgroundMetadata.provider}, state: ${this.currentProvider}, userSelected: ${this.ssrBackgroundMetadata.userSelected}`}})}this.createTelemetryTags(),l.J.updateLayout.registerObserver((()=>{this.ref_hotSpotsContainer&&this.ref_hotSpotsContainer.classList.add("hotSpotContainer_hide"),window.setTimeout((()=>{this.ref_hotSpotsContainer&&this.ref_hotSpotsContainer.classList.remove("hotSpotContainer_hide"),this.syncWithStateChange()}),500)})),te.V.updateNtpTheme.registerObserver((()=>{this.syncWithStateChange()})),m.I.layoutAnimationComplete.registerObserver((()=>{this.animationComplete()})),this.backgroundGalleryEligibility&&(O.f.backgroundDispositionUpdated.registerObserver((()=>{this.handleGalleryDispositionButtonClick()})),O.f.updateGallerySelectedBackground.registerObserver((()=>{this.handleGalleryBackgroundSelection()})),O.f.refreshBackgroundMetadata.registerObserver((()=>{this.handleBackgroundRefresh()})),(0,Ce.Uo)(h.z.BackgroundData,(e=>{this.renderHotSpots=e.shouldRenderHotSpots}))),this.isFeedDisplayAlwaysOn="always"===this.chromiumPageSettingsState.selectedFeedDisplaySetting,window.addEventListener("resize",this.onResize),window.addEventListener("scroll",this.onScroll),window.addEventListener("backgroundImageWCEdit",this.handleImageEditEmitListener),window.addEventListener("backgroundImageWCSecondary",this.handleSecondaryEmitListener),window.addEventListener("backgroundImageWCToggle",this.handleToggleEmitListener),window.addEventListener("backgroundImageWCStatesSyncAsk",this.statesSyncInit),this.config.enableEventGleamImage&&window.addEventListener("eventToggle",this.handleEventToggleEmitListener),window.setTimeout((()=>this.statesSyncInit()),0)}disconnectedCallback(){if(super.disconnectedCallback(),removeEventListener("resize",this.onResize),removeEventListener("scroll",this.onScroll),window.removeEventListener("backgroundImageWCEdit",this.handleImageEditEmitListener),window.removeEventListener("backgroundImageWCSecondary",this.handleSecondaryEmitListener),window.removeEventListener("backgroundImageWCToggle",this.handleToggleEmitListener),window.removeEventListener("backgroundImageWCStatesSyncAsk",this.statesSyncInit),this.config.enableEventGleamImage&&window.removeEventListener("eventToggle",this.handleEventToggleEmitListener),this.config.simpleImages&&window.removeEventListener("simpleImageBkgdToggle",this.syncWithStateChange),"Video"===this.currentProvider)window.removeEventListener("blur",this.onWindowBlur,!1),window.removeEventListener("focus",this.onWindowFocus,!1);this.darkModeQuery.removeEventListener("change",this.themeChanged)}getExperienceType(){return u.x.backgroundImageWC}shadowDomPopulated(){var e,t,n,i;this.syncWithStateChange(),(0,ee.h_)(Y._.headerSpaceHolder).then((e=>{var t;(t=this.syncWithStateChange,new ResizeObserver(t)).observe(e),this.calcMuseumBottom(),this.displayMarqueeAd&&((0,be.TR)()&&("hidden"===document.visibilityState||_e)&&(0,ie.su)(g.Q4.TimeToPrerenderAd,(0,he.UE)()),(0,le.eC)().then((()=>{const e=!0===w.Al.IsPrerender?performance.now()-(0,ie.TZ)(ge.DB):0;(0,ie.su)(g.Q4.TimeToRenderAd,performance.now()-e),Ie.o.sendBeacons(this.marqueeAd.adViewedUrls),R.M0.sendContentViewEvent(this.ref_marqueeAdTemplate,Q.NS.View),R.M0.sendClientLogEvent({message:"Marquee Ad viewed",type:"information"})})))})),null!==(e=this.config)&&void 0!==e&&null!==(t=e.bgImageEditPromotion)&&void 0!==t&&t.enabled&&this.promoteImageEditButton(),null!==(n=this.config)&&void 0!==n&&null!==(i=n.bgImageVideoPromotion)&&void 0!==i&&i.enabled&&this.promoteVideoButton(),this.config.holidayImage&&window.setTimeout((()=>{this.$emit("holidayBgChanged",this.holidayBackground)}),0)}imageEditButtonRefChanged(e,t){t&&this.imageEditButtonRefPromiseResolver(t)}videoButtonRefChanged(e,t){t&&this.videoButtonRefPromiseResolver(t)}async promoteImageEditButton(){var e,t,n;if(null!==(e=this.config)&&void 0!==e&&null!==(t=e.bgImageEditPromotion)&&void 0!==t&&t.informationalExcluded&&this.isFeedDisplayAlwaysOn)return;!function(e,t,n){var i;const r={id:De.gz.BackgroundImageEditPromotion,group:Ae.V.Functional,placementSource:Ae.m.Internal,surfaceModel:{surfaceType:Ee.U.Coachmark,size:De.dm.Medium,position:{coachmarkAnchor:e,anchoringPosition:De.RC.Above,hasPointer:!0,pointerPosition:De.Jt.Opposite},dismissAfterSeconds:15},contentModel:{title:(null==n?void 0:n.title)||"Want a change of scenery?",description:(null==n?void 0:n.description)||"Try a new background image.",contentType:xe.J.CallToAction,engageContentAction:{label:(null==n?void 0:n.engageButtonLabel)||"See gallery",actionDelegate:t},dismissContentAction:{label:(null==n?void 0:n.closeButtonLabel)||"No thanks",actionDelegate:()=>{}}}},o=(0,Me.l)(Le.p.Viewed,1);null===(i=(0,Fe.$0)())||void 0===i||i.sendInternalPlacement(r,[o])}(await(0,ee.h_)(Y._.imageEditButton)??this.imageEditButtonRef,this.onClick_imageEditButton.bind(this),(null===(n=this.config.localizedStrings)||void 0===n?void 0:n.editPromotionStrings)||{})}async promoteVideoButton(){var e,t;if(!(null!==(e=this.config)&&void 0!==e&&null!==(t=e.bgImageVideoPromotion)&&void 0!==t&&t.informationalExcluded&&this.isFeedDisplayAlwaysOn||"Video"!==this.currentProvider||this.videoPlaying)){var n,i;!function(e,t,n){var i;const r={id:De.gz.BackgroundImageVideoPromotion,group:Ae.V.Functional,placementSource:Ae.m.Internal,surfaceModel:{surfaceType:Ee.U.Coachmark,size:De.dm.Medium,position:{coachmarkAnchor:e,anchoringPosition:De.RC.Above,hasPointer:!0,pointerPosition:De.Jt.Opposite},dismissAfterSeconds:15},contentModel:{title:(null==n?void 0:n.title)||"Want to see this image move?",description:(null==n?void 0:n.description)||"Play this inspiring background video now!",contentType:xe.J.CallToAction,engageContentAction:{label:(null==n?void 0:n.engageButtonLabel)||"Try it",actionDelegate:t},dismissContentAction:{label:(null==n?void 0:n.closeButtonLabel)||"Maybe later",actionDelegate:()=>{}}}},o=(0,Me.l)(Le.p.Viewed,1);null===(i=(0,Fe.$0)())||void 0===i||i.sendInternalPlacement(r,[o])}(await(0,ee.h_)(Y._.videoPlayButton)??this.videoButtonRef,this.onClick_secondaryButton.bind(this),(null===(n=this.config)||void 0===n||null===(i=n.localizedStrings)||void 0===i?void 0:i.videoPromotionStrings)||{})}}checkAndGenerateSimpleImageOnlySchedule(){const e=this.getVideoData();if(e&&e.schedule){this.schedule=e.schedule,this.scheduleFixed=e.scheduleFixed,e.simpleSchedule?this.simpleSchedule=e.simpleSchedule:this.simpleSchedule=[-1,-1,-1,-1,-1,-1,-1];for(let e=0;e<this.simpleSchedule.length;e++)if(-1==this.simpleSchedule[e]||this.simpleSchedule[e]>-1&&this.config.cmsImage.data.length-1<this.simpleSchedule[e]){const t=Math.floor(Math.random()*this.config.cmsImage.data.length);this.simpleSchedule[e]=t}this.storeVideoData({cachedVideoId:-1,lastUpdatedTime:this.timeNow,schedule:this.schedule,scheduleFixed:this.scheduleFixed,simpleSchedule:this.simpleSchedule})}}getVideoData(){try{return(0,I.$o)().getObject(this.storageKey)}catch(e){return(0,ne.H)(r.eEQ,"Local storage for video data failed."),null}}storeVideoData(e){this.data=e;try{(0,I.$o)().setObject(this.storageKey,e)}catch(e){return void(0,ne.H)(r.ybt,"Local storage for video data failed.")}}getHolidayBkgdData(){try{return(this.config.holidayImage||this.config.enableEventGleamImage)&&(0,I.$o)().getObject(this.holidayKey)}catch(e){return(0,ne.H)(r.eEQ,"Local storage for holiday background failed."),!1}}storeHolidayBkgdData(e){try{(0,I.$o)().setObject(this.holidayKey,e)}catch(e){return void(0,ne.H)(r.ybt,"Local storage for holiday background failed.")}}getHeaderSpaceHolderHeight(){const e=(0,ee.b_)(Y._.headerSpaceHolder);return e?e.offsetHeight:this.spaceHolderHeight}checkMinimumWidthForGallery(){this.backgroundGalleryButtonEnabled=window.innerWidth>re.Gb,this.backgroundImageFixedWCStateSyncEventEmit([{key:"backgroundGalleryButtonEnabled",value:this.backgroundGalleryButtonEnabled}])}getThemeBackgroundColor(){var e,t;let n=null;const i=null===(e=this.chromiumPageSettingsState)||void 0===e||null===(t=e.ntpTheme)||void 0===t?void 0:t.backgroundColorRgba;if(!i||i.length<4)return null;const r={r:i[0],g:i[1],b:i[2],a:i[3]};return n=ye.g.rgbNumberToCssHexColor(ye.g.parsedColorToNumber(r)),n}toggleHoliday(e){e.preventDefault();const t=e&&e.target;t&&(this.updateHolidayBackground(t.checked),this.defineCurrentProviderAndSync(),"CMSImage"===this.currentProvider&&this.updateProperties(),this.config.enableEventGleamImage&&R.M0.sendActionEvent(e.target,F.Aw.Click))}updateHolidayBackground(e){this.holidayBackground=e,this.storeHolidayBkgdData(this.holidayBackground),this.config.enableEventGleamImage&&this.updateHolidayBackgroundInFloatButton(),this.$emit("holidayBgChanged",e)}setVideoSecondaryButtonTelemetry(e){!e||this.telemetryObject?(this.secondaryButtonTelemetryTag=this.videoPlaying?this.telemetryObject.addOrUpdateChild({name:"Pause",behavior:F.wu.Pause,content:{headline:this.videoProvider.museumCard.title,id:this.videoProvider.videoId+" - "+this.videoProvider.currentResolution}}).getMetadataTag():this.telemetryObject.addOrUpdateChild({name:"Play",behavior:F.wu.Play,content:{headline:this.videoProvider.museumCard.title,id:this.videoProvider.videoId+" - "+this.videoProvider.currentResolution}}).getMetadataTag(),this.backgroundImageFixedWCStateSyncEventEmit([{key:"secondaryButtonTelemetryTag",value:this.secondaryButtonTelemetryTag}])):(0,ne.H)(r.CgS,"Telemetry object is undefined on Iris update")}saveBackgroundPref(e,t){if(!(0,$.N)()||this.displayMarqueeAd||"Error"===e||"Event"===e)return;if(this.holidayBackground){if(!this.isSSRBkgd)return;return this.ssrBackgroundMetadata={provider:this.ssrBackgroundMetadata.provider,configIndex:this.ssrBackgroundMetadata.configIndex,imageUrl:this.ssrBackgroundMetadata.imageUrl,holiday:this.holidayBackground},this.config.enableEventGleamImage&&this.eventGleam&&(this.ssrBackgroundMetadata={...this.ssrBackgroundMetadata,dark:this.eventGleam.DarkGleamUrl,light:this.eventGleam.LightGleamUrl,gleam:!0}),void this.setCurrentBackgroundMetadata(this.ssrBackgroundMetadata)}const n=this.backgroundGalleryEligibility&&this.galleryBackgroundSelectionMetadata&&("Video"==e||"Iris"==e);switch(e){case"Iris":this.setCurrentBackgroundMetadata({provider:e,userSelected:n,imageUrl:this.irisProvider.newIrisSurfaceInfo&&this.isSSRBkgd?this.irisProvider.getNewImageUrl():this.irisProvider.irisImageURL});break;case"Video":this.setCurrentBackgroundMetadata({provider:e,userSelected:n,configIndex:t||this.videoProvider.videoId});break;case"BrowserLocal":this.setCurrentBackgroundMetadata({provider:e,userSelected:!0,imageUrl:this.chromiumPageSettingsState.customBackgroundImageInfo.resourceUrl});break;case"Theme":this.setCurrentBackgroundMetadata({provider:e,userSelected:!0,imageUrl:this.getThemeBackgroundInfo(this.ntpTheme),darkIcons:!this.ntpTheme.isNtpBackgroundDark});break;case"CMSImage":this.setCurrentBackgroundMetadata({provider:e,userSelected:!0,configIndex:this.cmsImageProvider.imageId});break;case"NoBackground":this.setCurrentBackgroundMetadata({provider:e,userSelected:!0});break;default:this.setCurrentBackgroundMetadata({provider:e})}ce.p.getCurrentBackgroundMetadata()}handleGalleryBackgroundSelection(){const e=this.backgroundDataConnector.getCurrentState();if(!e)return;const t=this.currentProvider;switch(this.galleryBackgroundSelectionMetadata=e.backgroundSelectionMetadata,this.galleryBackgroundSelectionMetadata.provider){case"Video":this.currentProvider="Video";break;case"Iris":this.currentProvider="Iris";break;case"BrowserLocal":this.currentProvider="BrowserLocal";break;case"CMSImage":this.currentProvider="CMSImage"}this.videoProvider&&"Video"===this.currentProvider&&(this.videoProvider.isPlaying=!1),this.config.holidayImage&&(this.holidayBackground=(0,$.N)()?this.getHolidayBkgdData():this.ssrBackgroundMetadata.holiday,this.toggleHolidaySwitch(),this.config.enableEventGleamImage&&this.updateHolidayBackgroundInFloatButton()),t===this.currentProvider&&(this.isLoadComplete=!1,this.updateProperties()),this.backgroundImageFixedWCStateSyncEventEmit([{key:"currentProvider",value:this.currentProvider}])}handleBackgroundRefresh(){this.defineCurrentProviderAndSync(),"Video"===this.currentProvider&&(this.videoProvider.setVideoAndMuseumCardProperties(),this.videoProvider.isPlaying=!1,this.isLoadComplete=!1),this.updateProperties()}async onClick_dislikeButton(){if(this.museumCard={...this.museumCard,irisButtons:{...this.museumCard.irisButtons,dislikeClicked:!0}},window.setTimeout((()=>{this.museumCard={...this.museumCard,irisButtons:{...this.museumCard.irisButtons,dislikeClicked:!1,likeClicked:!1}}}),3e3),"Video"===this.currentProvider)this.videoProvider.removeVideoForToday(),this.currentProvider="Iris";else await this.irisProvider.dislikeClickButtonHandler();this.backgroundImageFixedWCStateSyncEventEmit([{key:"currentProvider",value:this.currentProvider}])}onClick_dismissButton(){this.eventLocalStorage.dismissCreative(this.config.event.eventId,u.x.backgroundImageWC,this.currentEventCreative,r.LXY),this.defineCurrentProviderAndSync()}onClick_likeButton(){if(this.museumCard={...this.museumCard,irisButtons:{...this.museumCard.irisButtons,likeClicked:!0}},"Video"===this.currentProvider);else this.irisProvider.likeClickButtonHandler()}async onClick_MarqueeAdCTAButton(){await this.onClick_MarqueeAd(this.ref_marqueeAdCTAButton)}async onClick_MarqueeAdSponsorLogo(){await this.onClick_MarqueeAd(this.ref_marqueeAdSponsorLogo)}async onClick_MarqueeAd(e){window.open(this.marqueeAd.clickThroughUrl,"_blank").focus(),await Ie.o.sendBeacons(this.marqueeAd.adClickedUrls),R.M0.sendActionEvent(e,F.Aw.Click,F.wu.Navigate)}getStyleForElementKey(e){var t;return null===(t=(0,ee.b_)(e))||void 0===t?void 0:t.style}checkInformataionalFlight(){return this.config.informationalFlightOnly&&this.chromiumPageSettingsState.currentLayout==c.nP.informational}setProviderForRotation(){this.config.simpleImages&&this.cmsImageProvider&&this.cmsImageProvider.showImageInRotation&&ce.p.getDailyRotationOnlySimpleImages()?this.currentProvider="CMSImage":this.config.setBkgdOffInformational&&this.checkInformataionalFlight()?this.currentProvider="NoBackground":this.currentProvider="Iris",this.backgroundImageFixedWCStateSyncEventEmit([{key:"currentProvider",value:this.currentProvider}])}getThemeBackgroundInfo(e){return e?e.backgroundColorRgba&&!e.imageUrl?this.getThemeBackgroundColor():e.imageUrl?e.imageUrl:void 0:""}checkAndCreateIrisProvider(){if(!this.irisProvider){const e=(0,se.zz)(this.config.fallbackImageId,{width:0,height:0,enableDpiScaling:!1});this.irisProvider=this.backgroundGalleryEligibility?new q(this.backgroundDataConnector,e,this.updateProperties,!0,this.strings.irisFallbackTitle):new q(this.chromiumPageSettingsConnector,e,this.updateProperties)}}checkAndCreateVideoProvider(){this.videoProvider||(this.videoProvider=new ue(this.config.video,this))}checkAndCreateCMSImageProvider(){this.cmsImageProvider||(this.cmsImageProvider=new we(this.config.cmsImage,this)),this.config.simpleImages&&this.checkAndGenerateSimpleImageOnlySchedule()}async setCurrentBackgroundMetadata(e){this.isCurrentBackgroundMetadataLoaded&&!(0,Pe.Z)(this.currentBackgroundMetadata,e)&&(this.currentBackgroundMetadata=e,ce.p.setCurrentBackgroundMetadata(this.currentBackgroundMetadata))}setCorrectRotationBackground(){const e=this.backgroundGalleryEligibility?ce.p.getPreferenceByKeyFromFromPreferencesCache(re.wI.includeVideoBackgroundsInRotation):this.chromiumPageSettingsState.currentBackgroundImageType===c.HX.imageAndVideo;this.data=this.getVideoData();const t=this.data.schedule[this.dayNow];this.config.simpleImages&&!e?(this.checkAndCreateCMSImageProvider(),this.saveBackgroundPref("CMSImage",this.data.simpleSchedule[this.dayNow])):e&&-1!=t?(this.checkAndCreateVideoProvider(),this.saveBackgroundPref("Video",t)):(this.checkAndCreateIrisProvider(),this.saveBackgroundPref("Iris"))}shouldOverrideWithPreviousRotation(){if(!this.isSSRBkgd||this.displayMarqueeAd)return!1;if(!this.backgroundGalleryEligibility)return this.ssrRotationMismatch&&this.dailyRotationEnabled()&&this.ssrPageLoadMismatchBackgroundType===this.ssrModifiedMismatchBackgroundType;const e=this.chromiumPageSettingsState&&this.chromiumPageSettingsState.currentBackgroundImageType===c.HX.off,t=ce.p.getPreferenceByKeyFromFromPreferencesCache(re.wI.changeBackgroundDaily)||void 0===this.galleryBackgroundSelectionMetadata&&("Video"===this.ssrBackgroundMetadata.provider||"Iris"===this.ssrBackgroundMetadata.provider),n=ce.p.getPreferenceByKeyFromFromPreferencesCache(re.wI.includeVideoBackgroundsInRotation);return this.ssrRotationMismatch&&!e&&t&&(n||void 0!==this.config.simpleImages)}checkForSSRRotationMismatch(e){e&&e.schedule&&(!this.backgroundGalleryEligibility&&this.isRotationMismatchWithoutGallery()?(ce.p.setSSRBackgroundMetadata(this.ssrBackgroundMetadata),this.ssrRotationMismatch=!0,this.ssrPageLoadMismatchBackgroundType=this.chromiumPageSettingsState.currentBackgroundImageType,this.ssrModifiedMismatchBackgroundType=this.chromiumPageSettingsState.currentBackgroundImageType):("Video"===this.ssrBackgroundMetadata.provider&&this.data.schedule[this.dayNow]!==this.ssrBackgroundMetadata.configIndex||"Iris"===this.ssrBackgroundMetadata.provider&&-1!==this.data.schedule[this.dayNow]||this.config.simpleImages&&"CMSImage"!==this.ssrBackgroundMetadata.provider||this.config.simpleImages&&"CMSImage"===this.ssrBackgroundMetadata.provider&&this.data.simpleSchedule&&this.data.simpleSchedule[this.dayNow]!==this.ssrBackgroundMetadata.configIndex)&&(ce.p.setSSRBackgroundMetadata(this.ssrBackgroundMetadata),this.ssrRotationMismatch=!0))}isRotationMismatchWithoutGallery(){return"Video"===this.ssrBackgroundMetadata.provider?this.chromiumPageSettingsState.currentBackgroundImageType!==c.HX.imageAndVideo||this.data.schedule[this.dayNow]!==this.ssrBackgroundMetadata.configIndex:"Iris"===this.ssrBackgroundMetadata.provider&&(this.chromiumPageSettingsState.currentBackgroundImageType===c.HX.imageAndVideo&&-1!==this.data.schedule[this.dayNow])}get backgroundMuseumCarddBtnMoveToBottom(){return!this.museumCreditsCardIsShown}backgroundImageFixedWCStateSyncEventEmit(e){window.dispatchEvent(new CustomEvent("backgroundImageWCStatesSync",{detail:{states:e}}))}getToggleIconUrl(){const e=Ue(this.eventGleam);return(0,Be.EQ)({checked:this.holidayBackground,isDarkMode:this.darkModeQuery.matches}).with({checked:!0,isDarkMode:!0},(()=>e.dark.toggleOnUrl)).with({checked:!0,isDarkMode:!1},(()=>e.light.toggleOnUrl)).with({checked:!1,isDarkMode:!0},(()=>e.dark.toggleOffUrl)).with({checked:!1,isDarkMode:!1},(()=>e.light.toggleOffUrl)).otherwise((()=>""))}}(0,i.gn)([J.LO],He.prototype,"currentProvider",void 0),(0,i.gn)([J.LO],He.prototype,"hotSpots",void 0),(0,i.gn)([J.LO],He.prototype,"imageInformationalStyles",void 0),(0,i.gn)([J.LO],He.prototype,"imageOverrideStyles",void 0),(0,i.gn)([J.LO],He.prototype,"imageSource",void 0),(0,i.gn)([J.LO],He.prototype,"isReducedMotionActive",void 0),(0,i.gn)([J.LO],He.prototype,"isTTVRFired",void 0),(0,i.gn)([J.LO],He.prototype,"isLoadComplete",void 0),(0,i.gn)([J.LO],He.prototype,"museumBottom",void 0),(0,i.gn)([J.LO],He.prototype,"marqueeAdBottom",void 0),(0,i.gn)([J.LO],He.prototype,"museumCard",void 0),(0,i.gn)([J.LO],He.prototype,"museumCreditsCardIsShown",void 0),(0,i.gn)([J.LO],He.prototype,"copilotMuseumCardIsShown",void 0),(0,i.gn)([J.LO],He.prototype,"copilotHideTimeout",void 0),(0,i.gn)([J.LO],He.prototype,"copilotCardIsHovered",void 0),(0,i.gn)([J.LO],He.prototype,"isChinaCompliance",void 0),(0,i.gn)([J.LO],He.prototype,"showToast",void 0),(0,i.gn)([J.LO],He.prototype,"telemetryTags",void 0),(0,i.gn)([J.LO],He.prototype,"toastMessage",void 0),(0,i.gn)([J.LO],He.prototype,"videoPlaying",void 0),(0,i.gn)([J.LO],He.prototype,"videoSource",void 0),(0,i.gn)([(0,X.Lj)({converter:X.Id})],He.prototype,"spaceHolderHeight",void 0),(0,i.gn)([(0,X.Lj)({mode:"boolean"})],He.prototype,"showFullPageBlur",void 0),(0,i.gn)([X.Lj],He.prototype,"bgBlurSize",void 0),(0,i.gn)([(0,X.Lj)({mode:"boolean"})],He.prototype,"displayMarqueeAd",void 0),(0,i.gn)([(0,X.Lj)({converter:X.Id})],He.prototype,"marqueeAdTopHeight",void 0),(0,i.gn)([(0,X.Lj)({converter:X.Id})],He.prototype,"marqueeAdHeight",void 0),(0,i.gn)([(0,X.Lj)({converter:X.Id})],He.prototype,"marqueeAdOverlayHeight",void 0),(0,i.gn)([J.LO],He.prototype,"marqueeAd",void 0),(0,i.gn)([J.LO],He.prototype,"marqueeAdExtraClass",void 0),(0,i.gn)([J.LO],He.prototype,"secondaryButtonTelemetryTag",void 0),(0,i.gn)([J.LO],He.prototype,"imageEditButtonTelemetryTag",void 0),(0,i.gn)([J.LO],He.prototype,"turnOnHolidaySwitchButtonTelemetryTag",void 0),(0,i.gn)([J.LO],He.prototype,"turnOffHolidaySwitchButtonTelemetryTag",void 0),(0,i.gn)([J.LO],He.prototype,"openCopilotButtonTelemetryTag",void 0),(0,i.gn)([J.LO],He.prototype,"copilotShowCard",void 0),(0,i.gn)([J.LO],He.prototype,"renderHotSpots",void 0),(0,i.gn)([J.LO],He.prototype,"backgroundGalleryButtonEnabled",void 0),(0,i.gn)([J.LO],He.prototype,"canRenderNonSsrElements",void 0),(0,i.gn)([J.LO],He.prototype,"isDarkMode",void 0),(0,i.gn)([J.LO],He.prototype,"holidayBackground",void 0),(0,i.gn)([J.LO],He.prototype,"imageEditButtonRef",void 0),(0,i.gn)([J.LO],He.prototype,"openCopilotButtonRef",void 0),(0,i.gn)([J.LO],He.prototype,"videoButtonRef",void 0);const We=()=>`https://assets.msn.${y.jG.topDomain}/staticsb/statics/latest/common/icons/`;var qe=n(49218),Ve=n(41472),Ge=n(93703),ze=n(89150),je=n(56618),Ke=n.n(je),Qe=n(41990),Ze=n.n(Qe),Je=n(14289),Xe=n.n(Je),Ye=n(13622),et=n.n(Ye),tt=n(7143),nt=n.n(tt),it=n(1591),rt=n(93638),ot=n.n(rt),at=n(14547),st=n.n(at),ct=n(88070);it.Z;const dt=qe.dy`<p class="irisResponse">${e=>e.strings.irisResponse}</p>`,lt=qe.dy`<img class="picture" id="backgroundImagePicture" src=${e=>e.imageSource} style=${e=>e.imageOverrideStyles+e.imageInformationalStyles} @load=${e=>e.loadComplete()} @error=${e=>e.error(e.imageSource)}></img>`,ut=qe.dy`<div class="museumButtonContainer" ${(0,Ve.i)("ref_museumButtonContainer")}><fluent-button appearance="stealth" class="irisButton" data-t="${e=>e.telemetryTags&&e.telemetryTags.dismissButton}" id="like" @click="${e=>e.onClick_dismissButton()}"><span slot="start">${qe.dy.partial(Ke())}</span><div class="irisButtonTitle">${e=>e.strings.dismissTitle}</div></fluent-button></div>`,pt=qe.dy`<div class="museumButtonContainer" ${(0,Ve.i)("ref_museumButtonContainer")}><fluent-button appearance="stealth" class="irisButton" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.likeButton}}" id="like" @click="${e=>e.onClick_likeButton()}"><span slot="start">${qe.dy.partial(Xe())}</span><div><div class="irisButtonTitle">${e=>e.strings.irisLikeTitle}</div><div class="irisButtonSubtitle">${e=>e.strings.irisLikeSubTitle}</div></div></fluent-button><fluent-button appearance="stealth" class="irisButton" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.dislikeButton}}" id="dislike" @click="${e=>e.onClick_dislikeButton()}"><span slot="start">${qe.dy.partial(Ze())}</span><div class="irisButtonTitle">${e=>e.strings.irisDislikeTitle}</div><div class="irisButtonSubtitle">${e=>e.strings.irisDislikeSubTitle}</div></fluent-button></div>`,ht=qe.dy`<div class="backgroundGalleryButtonContainer"><fluent-button appearance="outline" class="backgroundGalleryButton" @click=${e=>e.onClick_openGalleryButton()} @focusout=${e=>e.onFocusLeave_backgroundGalleryButton()} title="${e=>e.backgroundGalleryButtonEnabled?e.strings.backgroundGalleryButtonText:e.strings.backgroundGalleryBelowMinimumWidthTooltip}" ?disabled=${e=>!e.backgroundGalleryButtonEnabled} data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.backgroundGalleryButton}}" ${(0,Ve.i)("ref_backgroundGalleryButton")}><span class="backgroundGalleryButtonText">${e=>e.strings.backgroundGalleryButtonText}</span></fluent-button></div>`,gt=qe.dy`<div class="museumCardCreditsContainer" ${(0,Ve.i)("ref_museumCreditsContainer")}><div class="museumCardTitleContainer">${(0,Ge.g)((e=>e.museumCard.titleURL),qe.dy`<a class="museumCardTitle museumCardTitleAnchor" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.cardTitle}}" href="${e=>e.museumCard.titleURL}" target="_blank">${e=>e.museumCard.title}</a>`)} ${(0,Ge.g)((e=>!e.museumCard.titleURL),qe.dy`<p class="museumCardTitle">${e=>e.museumCard.title}</p>`)}<p class="museumCardCredits ${e=>e.backgroundGalleryEligibility&&"Event"!==e.currentProvider?"backgroundGallery":""}">${e=>e.museumCard.credits}</p></div>${(0,Ge.g)((e=>!e.backgroundGalleryEligibility||"Event"===e.currentProvider),qe.dy`<div class="museumCardDivider"></div>${(0,Ge.g)((e=>"Event"!==e.currentProvider&&!e.museumCard.irisButtons.likeClicked&&!e.museumCard.irisButtons.dislikeClicked),pt)} ${(0,Ge.g)((e=>"Event"!==e.currentProvider&&e.museumCard.irisButtons.likeClicked||e.museumCard.irisButtons.dislikeClicked),dt)} ${(0,Ge.g)((e=>"Event"===e.currentProvider),ut)}</div>`)} ${(0,Ge.g)((e=>e.backgroundGalleryEligibility&&"Event"!==e.currentProvider),qe.dy`<div class="copyrightContainer">${e=>`© ${e.strings.copyrightText}`}</div>${ht} `)}
`,mt=qe.dy`<fluent-button class="backgroundButton ${e=>e.museumCreditsCardIsShown?"backgroundButton_active":""} ${e=>e.showFullPageBlur?"blurbg":""}" ${(0,Ve.i)("imageEditButtonRef")} data-t="${e=>e.imageEditButtonTelemetryTag}" id="imageEditButton" @click="${e=>e.onClick_imageEditButton()}" title="${e=>e.backgroundGalleryButtonEnabled?e.strings.backgroundGalleryButtonText:e.strings.backgroundGalleryBelowMinimumWidthTooltip}" aria-label="${e=>e.strings.backgroundGalleryButtonText}"><span slot="start">${(0,Ge.g)((e=>e.backgroundMuseumCarddBtnMoveToBottom),qe.dy`<img src="${e=>e.showFullPageBlur&&!e.isDarkMode?`${We()}EditImageBlack.svg`:`${We()}EditImageWhite.svg`}">`,qe.dy`${qe.dy.partial(et())}`)}</span></fluent-button>`,ft=qe.dy`<fluent-button class="backgroundButton ${e=>e.museumCreditsCardIsShown?"backgroundButton_active":""} ${(0,Ve.i)("openCopilotButtonRef")} data-t="${e=>e.openCopilotButtonTelemetryTag}" id="openCopilotButton" title="${e=>e.strings.openCopilotButtonText}" aria-label="${e=>e.strings.openCopilotButtonText}" @click="${e=>e.onClick_openCopilotButton()}"><span slot="start" class="openCopilotIcon"><img src="${`${We()}talkToCopilot.svg`}"></span></fluent-button>`,vt=qe.dy`<fluent-button ${(0,Ve.i)("videoButtonRef")} appearance=${e=>"Event"===e.currentProvider?"hypertext":"neutral"} class="backgroundButton ${e=>e.museumCreditsCardIsShown?"backgroundButton_active":""} ${e=>e.showFullPageBlur?"blurbg":""}" data-t="${e=>e.secondaryButtonTelemetryTag}" id="secondaryButton" href=${e=>"Event"===e.currentProvider?e.config.event.imageData[e.currentEventCreative].secondaryButton.href:""} @click="${e=>e.onClick_secondaryButton()}" title="${e=>e.videoPlaying?e.strings.video_pause:e.strings.video_play}" aria-label="${e=>e.videoPlaying?e.strings.video_pause:e.strings.video_play}">${(0,Ge.g)((e=>"Video"===e.currentProvider),qe.dy` ${(0,Ge.g)((e=>e.videoPlaying),qe.dy`${(0,Ge.g)((e=>e.backgroundMuseumCarddBtnMoveToBottom),qe.dy`<img src="${e=>e.showFullPageBlur&&!e.isDarkMode?`${We()}PauseBlack.svg`:`${We()}PauseWhite.svg`}">`,qe.dy`<span slot="start">${qe.dy.partial(ot())}</span>`)}`)} ${(0,Ge.g)((e=>!e.videoPlaying),qe.dy`${(0,Ge.g)((e=>e.backgroundMuseumCarddBtnMoveToBottom),qe.dy`<img src="${e=>e.showFullPageBlur&&!e.isDarkMode?`${We()}PlayBlack.svg`:`${We()}PlayWhite.svg`}">`,qe.dy`<span slot="start">${qe.dy.partial(st())}</span>`)}`)} `)} ${(0,Ge.g)((e=>"Event"===e.currentProvider),qe.dy`<a href=${e=>e.config.event.imageData[e.currentEventCreative].secondaryButton.href} class="backgroundButtonText secondaryButtonAnchor">${(0,Ge.g)((e=>"Event"===e.currentProvider),qe.dy` ${e=>e.config.event.useCommonIdForLocString?e.strings.events[e.config.event.eventId+"Button"]:e.strings.events[e.config.event.imageData[e.currentEventCreative].secondaryButton.id]} `)}</a>`)}</fluent-button>`,yt=qe.dy`<fluent-switch checked=${e=>e.holidayBackground} class="backgroundHolidaySwitch ${e=>e.holidayBackground?"turnOn":"turnOff"}" data-t="${e=>e.holidayBackground?e.turnOffHolidaySwitchButtonTelemetryTag:e.turnOnHolidaySwitchButtonTelemetryTag}" @change=${(e,t)=>e.toggleHoliday(t.event)} title="${e=>e.strings.holidayTitle}" aria-label="${e=>e.strings.holidayTitle}" ${(0,Ve.i)("ref_holidayToggle")}></fluent-switch>`,St=qe.dy` ${(0,Ge.g)((e=>!!e.getToggleIconUrl()),qe.dy`<span class="event_toggle_img"><img src="${e=>e.getToggleIconUrl()}"></span>`)} ${(0,Ge.g)((e=>!e.getToggleIconUrl()),qe.dy`<span class="event_toggle"></span>`)}
`,Ct=qe.dy`<label class="event_toggle_container" title="${e=>e.eventGleam.ToggleIconTextToolTip}"><input type="checkbox" ?checked=${e=>e.holidayBackground} data-t="${e=>e.holidayBackground?e.turnOffHolidaySwitchButtonTelemetryTag:e.turnOnHolidaySwitchButtonTelemetryTag}" style="border-color: ${e=>e.holidayBackground?e.eventGleam.OnIconBackgroundColor:e.eventGleam.OffIconBackgroundColor};background-color: ${e=>e.holidayBackground?e.eventGleam.OnIconBackgroundColor:e.eventGleam.OffIconBackgroundColor}" @change=${(e,t)=>e.toggleHoliday(t.event)} ${(0,Ve.i)("ref_holidayToggle")} />${St}</label>`,wt=qe.dy` ${(0,Ge.g)((e=>e.museumCreditsCardIsShown),gt)} ${(0,Ge.g)((e=>e.config.holidayImage&&!e.config.enableEventGleamImage),yt)} ${(0,Ge.g)((e=>e.config.holidayImage&&e.config.enableEventGleamImage&&e.eventGleam&&e.isTTVRFired),Ct)}<fluent-button class="backgroundButton ${e=>e.museumCreditsCardIsShown?"backgroundButton_active":""} ${e=>e.showFullPageBlur?"blurbg":""}" data-t="${e=>{var t,n;return e.museumCreditsCardIsShown?null===(n=e.telemetryTags)||void 0===n?void 0:n.title_cardShown:null===(t=e.telemetryTags)||void 0===t?void 0:t.title_cardHidden}}" id="museumCardButton" @click="${e=>e.toggleMuseumCardOpen()}" @focusout=${e=>e.onFocusLeave_museumCardButton()} title="${e=>e.museumCreditsCardIsShown?e.strings.museumCardExpanded:e.strings.museumCardCollapsed}" aria-label="${e=>e.museumCreditsCardIsShown?e.strings.museumCardExpanded:e.strings.museumCardCollapsed}" aria-expanded="${e=>e.museumCreditsCardIsShown}" ${(0,Ve.i)("ref_museumCardButton")}>${e=>e.museumCreditsCardIsShown?qe.dy`<span slot="start">${qe.dy.partial(nt())}</span>`:qe.dy`<img src="${e=>e.showFullPageBlur&&!e.isDarkMode?`${We()}ZoomBlack.svg`:`${We()}ZoomWhite.svg`}">`}</fluent-button>`,bt=(0,Ge.g)((e=>e.museumCard&&e.museumBottom>0&&e.canRenderNonSsrElements),qe.dy`<div class="museumCard ${e=>e.museumCreditsCardIsShown?"museumCardVertical":"museumCardVerticalHide"} ${e=>e.holidayBackground&&e.config.holidayImage&&!e.isDarkMode?"holidayLight":""} " style="${e=>`bottom:${e.museumBottom}px`}" ${(0,Ve.i)("ref_museumCardContainer")}>${wt} ${(0,Ge.g)((e=>e.backgroundGalleryButtonEnabled),mt)} ${(0,Ge.g)((e=>{var t;return"Video"===e.currentProvider||"Event"===e.currentProvider&&(null===(t=e.config.event)||void 0===t?void 0:t.imageData[e.currentEventCreative].secondaryButton)}),vt)} ${(0,Ge.g)((e=>e.config.copilotTemplateEnable&&!e.museumCreditsCardIsShown),ft)}</div>`),Tt=qe.dy`<span class="${e=>e.config&&e.config.wholePageOpacity?"overlayTranslucent":"overlay"} ${e=>e.museumCreditsCardIsShown||"Theme"===e.currentProvider&&e.config&&!e.config.wholePageOpacity?"overlay_hide":""} ${e=>e.showFullPageBlur&&!e.museumCreditsCardIsShown?"windowsBlur":""}" data-mscc-ic="false" id="backgroundImageOverlay" ${(0,Ve.i)("ref_backgroundOverlay")}></span>${(0,Ge.g)((e=>e.config&&!e.config.removeOverlayGradient&&!e.museumCreditsCardIsShown&&"Theme"!==e.currentProvider&&!(e.holidayBackground&&e.config.holidayImage&&!e.config.enableEventGleamImage)),qe.dy`<span class="overlayGradient ${e=>e.showFullPageBlur?"overlayGradientTranslucent":""}"></span>`)}
`,kt=qe.dy`<fluent-button class="backgroundButton opaqueOnRest" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.marqueeAdDismissButton}}" id="marqueeAdDismissButton" @click="${e=>e.onClick_marqueeAdClose()}" title="${e=>e.strings.dismissMarqueeAdText}" aria-label="${e=>e.strings.dismissMarqueeAdText}" ${(0,Ve.i)("ref_marqueeAdDismissButton")}><span slot="start"><img src="${(0,y.Yq)().StaticsUrl}/latest/icons-wc/CloseButton.svg" alt="Close button" aria-hidden="true" /></span><p class="backgroundButtonText">${e=>e.strings.dismissMarqueeAdText}</p></fluent-button>`,Pt=qe.dy`<div class="marqueeAdDismissButtonContainer" style="${e=>`bottom:${e.marqueeAdBottom}px`}" ${(0,Ve.i)("ref_marqueeAdDismissButtonContainer")}>${kt}</div>`,It=(0,Ge.g)((e=>e.marqueeAd),qe.dy`<div ${(0,Ve.i)("ref_marqueeAdTemplate")} data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.marqueeAdTemplate}}" class="${e=>`marqueeAdOverlay ${e.marqueeAdExtraClass}`}" style="${e=>`height: ${e.marqueeAdOverlayHeight}px; top: ${e.marqueeAdTopHeight}px;`}"><div class="marqueeAdContainer" id="marqueeAdContainer" style="${e=>`height: ${e.marqueeAdHeight}px;`}"><div class="marqueeAdSponsor"><div>${e=>e.strings.marqueeAdSponsorText}</div><fluent-button @click=${e=>e.onClick_MarqueeAdSponsorLogo()} class="marqueeAdSponsorLogo" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.marqueeAdSponsorLogo}}" title="${e=>e.marqueeAd.providerName}" aria-label="${e=>e.marqueeAd.providerName}" ${(0,Ve.i)("ref_marqueeAdSponsorLogo")}><img class="marqueeAdSponsorLogoImage" src="${e=>e.marqueeAd.sponsorLogoImageUrl}" /></fluent-button></div><div class="marqueeAdContent"><div class="marqueeAdTitle">${e=>e.marqueeAd.title}</div><div class="marqueeAdCTAButtonContainer"><fluent-button @click=${e=>e.onClick_MarqueeAdCTAButton()} class="marqueeAdCTA" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.marqueeAdCTAButton}}" title="${e=>e.marqueeAd.ctaText}" aria-label="${e=>e.marqueeAd.ctaText}" ${(0,Ve.i)("ref_marqueeAdCTAButton")}>${e=>e.marqueeAd.ctaText}</fluent-button></div></div></div></div>`),At=e=>e.museumCreditsCardIsShown,Et=qe.dy` ${lt} ${Tt}
`,xt=qe.dy` ${lt} ${Tt}
`,Mt=qe.dy` ${lt} ${Tt}
`,Lt=qe.dy` ${lt} ${Tt} ${(0,Ge.g)(At,qe.dy`${bt}`)}
`,Dt=qe.dy` ${lt} ${Tt}
`,Rt=qe.dy` ${lt} ${Tt} ${It} ${Pt}
`,Ft=qe.dy`<svg role="img" viewBox="${e=>e.icon.viewBoxString}" xmlns="http://www.w3.org/2000/svg"><path d="${e=>e.icon.svgString}" fill="#fff" /></svg>`,Ot=qe.dy`<div class="hotSpotRenderRegion" id = "hotspots" style="margin-top:${e=>e.styles.marginTop}; margin-left:${e=>e.styles.marginLeft}; margin-right:${e=>e.styles.marginRight}; height:${e=>e.styles.height}; width:${e=>e.styles.width};"><div class="hotSpot" data-t="${e=>e.telemetryTags}" style="left: ${e=>e.styles.widthOffset}; top: ${e=>e.styles.heightOffset};" @mouseenter="${(e,t)=>null==e?void 0:e.onMouseEnterHandler(null==t?void 0:t.event)}"><a class="hotSpot hotSpotAccess" href="${e=>e.data.cta}" target="_blank" @click="${(e,t)=>e.onClickHandler&&e.onClickHandler(e.data,t)}"><div class="hotSpotSpot hotSpotClickable">${e=>""===e.icon.svgString?qe.dy`<img src="${`${We()}HotSpotIconMeetNow.svg`}" alt="Hot spot icon meet now" aria-hidden="true">`:Ft}</div><div class="hotSpotTextArea hotSpotClickable">${e=>e.data.title}<div class="hotSpotSubTextArea">${e=>e.data.text}</div></div></a></div></div>`,Bt=qe.dy` ${lt} ${Tt} ${(0,Ge.g)(At,qe.dy`${bt}`)} ${(0,Ge.g)((e=>!e.museumCreditsCardIsShown&&e.renderHotSpots&&e.canRenderNonSsrElements),qe.dy`<div class="hotSpotContainer" ${(0,Ve.i)("ref_hotSpotsContainer")}>${(0,ze.rx)((e=>e.hotSpots),Ot)}</div>`)}`,Nt=qe.dy` ${lt} ${Tt}
`,$t=qe.dy`<msn-toast class="toast" style="${e=>`bottom:${e.museumBottom}px`}">${e=>e.toastMessage}</msn-toast>`,Ut=qe.dy`<video class="video" loop muted src="${e=>e.videoSource}" poster="${e=>e.imageSource}" style=${e=>e.imageInformationalStyles} @canplaythrough=${e=>e.playVideo()} @error=${e=>e.error(e.videoSource)} ${(0,Ve.i)("ref_video")}></video>`,_t=qe.dy` ${(0,Ge.g)((e=>e.imageSource||e.videoSource),qe.dy` ${Ut} ${Tt} ${(0,Ge.g)(At,qe.dy`${bt}`)} ${(0,Ge.g)((e=>e.showToast&&e.canRenderNonSsrElements),$t)} `)}
`,Ht=qe.dy` ${lt} ${Tt} ${(0,Ge.g)(At,qe.dy`${bt}`)}
`,Wt=(0,ct.a)("TTSR.BackgroundImageWC"),qt=qe.dy`<div class="backgroundImage" id="backgroundImage">${e=>{switch(e.currentProvider){case"BrowserLocal":return Et;case"FREBackground":return Mt;case"Event":return Lt;case"Iris":return Bt;case"NoBackground":return null;case"Theme":return Nt;case"Video":return _t;case"CMSImage":return Ht;case"MarqueeAd":return e.config.enableMarqueeAdV3?Dt:Rt;default:return xt}}}</div>${(0,Ge.g)((()=>window.isSSREnabled),Wt)}
`;var Vt=n(22674),Gt=n(78923),zt=n(81239),jt=n(29717);const Kt=y.jG.getStaticUrls("latest/windowsShell/svgs/toggle-dark-on.svg"),Qt=y.jG.getStaticUrls("latest/windowsShell/svgs/toggle-dark-off.svg"),Zt=y.jG.getStaticUrls("latest/windowsShell/svgs/toggle-light-on.svg"),Jt=y.jG.getStaticUrls("latest/windowsShell/svgs/toggle-light-off.svg"),Xt=Gt.i` .backgroundButton{float:right}.backgroundGalleryButtonContainer{padding-left:12px}.marqueeAdDismissButtonContainer{left:initial;right:12px}.copyrightContainer{padding-left:12px}.museumCard{left:initial;right:12px}.secondaryButton{float:right;margin-right:8px}`,Yt=Gt.i` .backgroundButton{float:left}.backgroundGalleryButtonContainer{padding-right:12px}.marqueeAdDismissButtonContainer{left:initial;right:12px}.copyrightContainer{padding-right:12px}.museumCard{left:12px;right:initial}.secondaryButton{float:left;margin-left:8px}`,en=Gt.i` .windowsBlur{background:rgba(31,31,31,0.7)}.backgroundButton.blurbg{color:#FFFFFF}.backgroundButton.blurbg:hover{background:rgba(0,0,0,.6)}.backgroundButton_active.blurbg{background:rgba(0,0,0,.6)}.backgroundButton_active.blurbg:hover{background:rgba(0,0,0,.9)}fluent-switch.backgroundHolidaySwitch.turnOn::part(switch),fluent-switch.backgroundHolidaySwitch.turnOn::part(switch):hover{background:#4DACF5;border:1px solid #4DACF5}fluent-switch.backgroundHolidaySwitch.turnOn::part(checked-indicator){background:var(--dark-turn-on-icon-url) center center / cover no-repeat}fluent-switch.backgroundHolidaySwitch.turnOff::part(checked-indicator){background:var(--dark-turn-off-icon-url) center center / cover no-repeat}`.withBehaviors(new zt.w("isChinaCompliance",!0,Gt.i` fluent-switch.backgroundHolidaySwitch::part(checked-indicator){--dark-turn-on-icon-url:url(${Kt.cn});--dark-turn-off-icon-url:url(${Qt.cn})}`),new zt.w("isChinaCompliance",!1,Gt.i` fluent-switch.backgroundHolidaySwitch::part(checked-indicator){--dark-turn-on-icon-url:url(${Kt.com});--dark-turn-off-icon-url:url(${Qt.com})}`)),tn=Gt.i`:not(:defined){visibility:hidden}.backgroundButton{background:transparent;border-radius:12px;border:none;color:white;cursor:pointer;display:inline-block;font-size:12px;height:24px;overflow:hidden;white-space:nowrap;fill:currentColor}.backgroundButton svg{display:flex}.backgroundButton:hover{background:rgba(0,0,0,.6)}.backgroundButton span[slot="start"]{margin-inline:0px}.backgroundButton::part(control){padding:0 8px}.backgroundButton_active{background:rgba(0,0,0,.6)}.backgroundButton_active:hover{background:rgba(0,0,0,.9)}.holidayLight .backgroundButton,.backgroundButton.blurbg{color:#262626}.holidayLight .backgroundButton:hover,.backgroundButton.blurbg:hover{background:rgba(255,255,255,.6)}.holidayLight .backgroundButton_active,.backgroundButton_active.blurbg{background:rgba(255,255,255,.6)}.holidayLight .backgroundButton_active:hover,.backgroundButton_active.blurbg:hover{background:rgba(255,255,255,.9)}.backgroundButtonText{font-size:12px;margin-inline-start:8px;padding:0}.backgroundGalleryButtonContainer{padding-bottom:4px;width:362px}.backgroundGalleryButtonText{color:white}.marqueeAdDismissButtonContainer{position:absolute}.copyrightContainer{color:rgba(255,255,255,0.54);padding-bottom:10px}fluent-button.backgroundGalleryButton::part(control){border-radius:16px}.white-icon svg{fill:white}.backgroundImage{height:100%;width:100%}.backgroundHolidaySwitch{float:right;display:inline-block}.hotSpot{height:max-content;position:absolute;width:max-content;z-index:290}.hotSpotAccess{animation-fill-mode:forwards;animation:"backgroundFadeInAnimation 0.5s linear";cursor:default;display:flex;text-decoration:none;z-index:292}.hotSpotClickable{cursor:pointer !important}.hotSpotContainer{opacity:1;transition:opacity 0.2s}.hotSpotContainer_hide{opacity:0;transition:opacity 0.2s}.hotSpotRenderRegion{opacity:1;position:absolute}.hotSpotSpot{background-color:rgba(0,0,0,0.64);border-radius:16px;cursor:default;height:32px;margin-inline-end:8px;width:32px}.hotSpotSubTextArea{color:rgba(255,255,255,0.74);font-size:12px;line-height:16px;opacity:0}.hotSpotSubTextArea:hover{opacity:1}.hotSpotTextArea{border-radius:4px;color:#FFFFFF;font-size:14px;line-height:20px;max-width:256px;padding:4px 12px 10px 12px}.hotSpotTextArea:hover{background-color:rgba(0,0,0,0.64);cursor:pointer;z-index:292}.hotSpotTextArea:hover .hotSpotSubTextArea{opacity:1}.irisButton{background:none;border:none;color:#fff;cursor:pointer;height:auto;width:100%;fill:currentColor}.irisButton:hover{background:rgba(0,0,0,.9)}.irisButton::part(control){align-items:flex-start;justify-content:unset;padding:10px 15px}.irisButtonTitle{font-size:14px;line-height:16px;margin-bottom:4px;text-align:start;user-select:none;width:100%}.irisButtonSubtitle{color:rgba(255,255,255,0.54);font-size:12px;line-height:14px;text-align:start;user-select:none;white-space:normal}.irisResponse{padding:0px 12px;user-select:none}.museumCard{color:#fff;opacity:1;position:absolute;transition:opacity 0.2s;z-index:100}.museumCard_hide{opacity:0;transition:opacity 0.2s}.museumCardCredits{color:rgba(255,255,255,0.54);font-size:13px;margin:10px 0px 16px 0px;user-select:none}.museumCardCredits.backgroundGallery{margin:10px 0px 12px 0px}.museumCardCreditsContainer{background:rgba(0,0,0,.77);border-bottom:1px solid transparent;border-radius:4px;font-family:inherit;font-size:12px;font-weight:400;margin-bottom:10px;max-width:384px;padding:8px 4px}.museumCardDivider{background-color:rgba(255,255,255,0.54);height:1px;margin:4px 12px;width:350px}.museumCardIcon{display:inline;fill:#fff;font-size:20px;height:14px;position:relative;top:1px;width:20px}.museumCardTextContainer{background:none;border:none;color:#fff;display:inline;height:auto;padding-left:12px;padding-right:12px;position:relative;text-decoration:none;width:auto}.museumCardTextContainer:hover,.irisButton:hover{cursor:pointer}.museumCardTitle{color:#fff;font-family:inherit;font-size:20px;font-weight:400;line-height:24px;margin:4px 0px;text-decoration:none;user-select:none}.museumCardTitleAnchor:hover{cursor:pointer;text-decoration:underline}.museumCardTitleContainer{padding:0px 12px}.overlayGradient{width:120%;height:100%;position:absolute;top:0;background-image:radial-gradient(rgba(0,0,0,0) 0%,rgba(0,0,0,0.5) 100%),radial-gradient(rgba(0,0,0,0) 33%,rgba(0,0,0,0.3) 166%);transform:translateZ(0px);backface-visibility:hidden;perspective:1000px;transition:all 0.07s ease-out 0s}.overlayGradient.overlayGradientTranslucent{opacity:0}.overlayGradientWhiteGradient{background-image:linear-gradient(89.98deg,rgba(255,255,255,0.9) 0.02%,rgba(255,255,255,0.54) 59.36%,rgba(255,255,255,0) 99.98%)}.overlay{top:0;backdrop-filter:blur(60px);transition:all 0.4s ease-out 0s;position:absolute;width:100%;height:100%;opacity:0}.overlayTranslucent{background:#00000052;height:100%;opacity:0.5;position:absolute;top:0;transition:opacity 0.4s ease-in-out,background 0.4s ease-in-out,backdrop-filter 0.4s ease-in-out;width:100%}.overlay_hide{opacity:0}.picture{background-position:center;background-repeat:no-repeat;background-size:cover;height:101%;margin:-1px 0px 0px -1px;object-fit:cover;padding:0;position:absolute;width:101%}.resizeFadeInAnimation{animation:opacityFadeInAnimation 0.5s ease-in-out;animation-fill-mode:forwards}.resizeFadeOutAnimation{animation:opacityFadeOutAnimation 0.02s linear;animation-fill-mode:forwards}.secondaryButtonAnchor{color:#fff;text-decoration:none}.secondaryButtonAnchor:hover{text-decoration:underline}.scrollFadeInAnimation{animation:opacityFadeInAnimation 0.5s ease-in-out;animation-fill-mode:forwards}.scrollFadeOutAnimation{animation:opacityFadeOutAnimation 0.5s ease-in-out;animation-fill-mode:forwards}.toast{bottom:32px;left:50%;position:fixed;transform:translate(-50%,0);width:fit-content;z-index:${String(o.K.Over)}}.video{height:100%;margin:0;object-fit:cover;padding:0;position:absolute;width:100%}.windowsBlur{background:rgba(255,255,255,.55);height:100%;position:absolute;width:120%;z-index:1;transform:translateZ(0px);backface-visibility:hidden;perspective:1000px;opacity:1}#backgroundImage{transition:opacity 0.3s}.marqueeAdOverlay{position:absolute;width:100%;user-select:none;font-style:normal;color:#FFF}.marqueeAdContainer{display:flex;box-sizing:border-box}.marqueeAdLarge .marqueeAdContainer{padding:24px 0 0 47px;width:612px}.marqueeAdSmall .marqueeAdContainer{padding:50px 0 0 47px;width:306px;flex-direction:column}.marqueeAdSponsor{display:flex;flex-direction:column;align-items:center;font-size:12px}.marqueeAdLarge .marqueeAdSponsor{margin-right:32px}.marqueeAdSmall .marqueeAdSponsor{align-items:flex-start;margin-bottom:16px}.marqueeAdSponsorLogo{margin-top:8px;background:none;height:auto}.marqueeAdSponsorLogo::part(control){padding:0;border:0}.marqueeAdSponsorLogoImage{display:block;width:100%;height:100%}.marqueeAdLarge .marqueeAdSponsorLogoImage{max-width:160px;max-height:44px}.marqueeAdSmall .marqueeAdSponsorLogoImage{max-width:120px;max-height:32px}.marqueeAdContent{flex:1;display:flex;flex-direction:column;align-items:flex-start}.marqueeAdTitle{font-weight:600}.marqueeAdLarge .marqueeAdTitle{font-size:16px;line-height:22px}.marqueeAdSmall .marqueeAdTitle{font-size:14px;line-height:20px}.marqueeAdCTA{height:auto;display:flex;align-items:center;justify-content:center;font-weight:600;border-radius:4px;border:1px solid #FFF;cursor:pointer;text-decoration:none;color:#FFF;background-color:#ffffff0f;padding:5px 10px}.marqueeAdCTA:hover{background-color:#ffffff1f}.marqueeAdCTA::part(control){padding:0;border:0}.marqueeAdLarge .marqueeAdCTA{margin-top:12px;padding:5px 16px}.marqueeAdLarge .marqueeAdCTA::part(control){font-size:16px;line-height:22px}.marqueeAdSmall .marqueeAdCTA{margin-top:16px;padding:2px 12px 4px 12px}.marqueeAdSmall .marqueeAdCTA::part(control){font-size:14px;font-weight:600;line-height:20px}.marqueeAdCloseButton{padding:4px 8px;position:absolute;right:12px;bottom:12px;font-size:12px;line-height:16px;border-radius:999px;background:rgba(0,0,0,0.54);cursor:pointer}fluent-switch.backgroundHolidaySwitch.turnOn::part(switch),fluent-switch.backgroundHolidaySwitch.turnOn::part(switch):hover{background:#0E17C4;border:1px solid #0E17C4}fluent-switch.backgroundHolidaySwitch.turnOn::part(checked-indicator){top:1px;margin-inline-start:-4px}fluent-switch.backgroundHolidaySwitch.turnOff::part(checked-indicator){top:1.5px}fluent-switch.backgroundHolidaySwitch::part(checked-indicator){height:15px;width:15px}fluent-switch.backgroundHolidaySwitch.turnOn::part(checked-indicator){background:var(--light-turn-on-icon-url) center center / cover no-repeat}fluent-switch.backgroundHolidaySwitch.turnOff::part(checked-indicator){background:var(--light-turn-off-icon-url) center center / cover no-repeat}.openCopilotIcon{height:16px;width:16px;transform:scale(2.5);fill:inherit}.openCopilotIconBox{display:flex}.event_toggle_container{display:inline-block;float:right;cursor:pointer;position:relative;transition:.4s;top:2px;margin-left:2px}.event_toggle_container input{cursor:pointer;display:block;height:20px;margin:0;position:relative;width:40px;border:1.5px solid;-webkit-appearance:none;border-radius:20px;border-color:#52595f}.event_toggle_container input:checked + span{left:22px}.event_toggle_img{align-items:center;display:flex;height:20px;left:3px;position:absolute;top:0px;transition:all .1s ease}.event_toggle_img img{width:15px;height:15px;border-radius:50%}.event_toggle{position:absolute;top:3px;left:3px;display:inline-block;width:15px;height:15px;background:white;border-radius:50%}`.withBehaviors((0,jt.Uu)(en),new zt.w("isChinaCompliance",!0,Gt.i` fluent-switch.backgroundHolidaySwitch::part(checked-indicator){--light-turn-on-icon-url:url(${Zt.cn});--light-turn-off-icon-url:url(${Jt.cn})}`),new zt.w("isChinaCompliance",!1,Gt.i` fluent-switch.backgroundHolidaySwitch::part(checked-indicator){--light-turn-on-icon-url:url(${Zt.com});--light-turn-off-icon-url:url(${Jt.com})}`)),nn=tn.withBehaviors(new Vt.O(Xt,Yt)),rn={experienceConfigSchema:undefined}},69997:function(e,t,n){"use strict";n.d(t,{Ik:function(){return f},oR:function(){return S},vC:function(){return i},y3:function(){return v}});var i,r=n(55524),o=n(36867),a=n(74161),s=n(2587),c=n(28326),d=n(55522),l=n(94409),u=n(23234),p=n(26465),h=n(12912),g=n(49218);!function(e){e.internal="internal",e.intl="intl",e.both="both"}(i||(i={}));const m="__storedBingIntlUpsellState__";async function f(){let e=r.Gq.get(m);if(e)return e;if(!await o.L.isApiAvailableToUse())return e=i.internal,r.Gq.set(m,e),e;const t=await o.L.getPreferenceSetting(a.nc.bing_intl_upsell);return t&&void 0!==t.value&&(e=t.value),r.Gq.set(m,e),e??i.internal}async function v(e){if(!await o.L.isApiAvailableToUse())return;const t={setting:a.nc.bing_intl_upsell,source:"ntp",timestamp:(new Date).getTime(),value:e};o.L.savePreferenceSetting(a.nc.bing_intl_upsell,t)}const y=g.dy`
<div>
<div style="margin-bottom: 5px"><b>国内版:</b>获取国内网站的权威信息</div>
<div style="margin-bottom: 5px"><b>国际版:</b>发现全球网站的丰富内容</div>
</div>
`;function S(e){var t;const n={id:s.gz.BingIntlUpsellPromotion,group:c.V.Functional,placementSource:c.m.Internal,surfaceModel:{surfaceType:d.U.Coachmark,size:s.dm.Medium,position:{coachmarkAnchor:e,anchoringPosition:s.RC.Below,hasPointer:!0,pointerPosition:s.Jt.Opposite}},contentModel:{title:"下拉选择您喜欢的必应版本",description:y,contentType:l.J.CallToAction}},i=(0,u.l)(p.p.Viewed,1);null===(t=(0,h.$0)())||void 0===t||t.sendInternalPlacement(n,[i])}},2189:function(e,t,n){"use strict";n.r(t),n.d(t,{CommonSearchBoxEdgeNext:function(){return $},CommonSearchBoxEdgeNextStyles:function(){return X},CommonSearchBoxEdgeNextTemplate:function(){return j},ToolingInfo:function(){return Y}});var i=n(10255);var r=n(77615),o=n(33940),a=n(50176),s=n(85205),c=n(69233),d=n(79545),l=n(23549),u=n(78951),p=n(91046),h=n(21789),g=n(66415),m=n(84515),f=n(10754),v=n(19995),y=n(21930),S=n(36926),C=n(76733),w=n(88826),b=n(7476),T=n(47266),k=n(25598),P=n(31558),I=n(99452),A=n(68963),E=n(67044),x=n(43356),M=n(9498),L=n(69997),D=n(58616),R=n(29597),F=n(54297);const O="TOB_QUERIES";async function B(e){l.M0.addOrUpdateTmplProperty("trendingsearch","1");let t=[];if((0,P.N)())try{const t=(0,F.$o)().getItem(O);if(t){const n=JSON.parse(t),i=((null==n?void 0:n.cacheTime)||0)+1e3*(e.cacheTimeout||60),r=null==n?void 0:n.queries;if((null==n?void 0:n.mkt)===h.jG.CurrentMarket&&r&&r.length&&i>Date.now())return r}}catch(e){(0,w.H)(b.yHB,`${e}`)}if(t=await async function(e){let t,n=[];if(!e||!e.apiEndpoint)return n;const i=!!e.appId,r={};try{var o;let a;a=i?e.apiEndpoint+"?appid="+e.appId+"&features="+e.features+"&mkt="+h.jG.CurrentMarket:e.apiEndpoint+"?apikey="+e.apikey+"&market="+h.jG.CurrentMarket+"&fdhead="+e.features,e.setlang&&(a+="&setlang="+e.setlang),e.cc&&(a+="&cc="+e.cc);const s={method:"GET",credentials:"same-origin"},c=e.apiTimeout||1e4,d=await(0,R.Sm)(decodeURIComponent(a),c,s);if(r.traceId=null===(o=d.headers)||void 0===o?void 0:o.get("bingapis-traceid"),!d||!d.ok){if(404===d.status)return l.M0.addOrUpdateTmplProperty("tobResponse","0"),n;throw new Error("Error response: "+d.status)}t=await d.json()}catch(e){return(0,w.H)(b.QWk,`${e}`,"",r),n}try{if(!t)throw new Error("Invalid format of response.");if(i){var a;n=(null===(a=t.value)||void 0===a?void 0:a.map((e=>{var t;return null===(t=e.query)||void 0===t?void 0:t.text})))||[]}else{var s;const e=JSON.parse(null===(s=t[0])||void 0===s?void 0:s.data);n=(null==e?void 0:e.map((e=>null==e?void 0:e.Query)))||[]}if(!n||!Array.isArray(n))throw new Error("Invalid format of response.");return 0===n.length&&(l.M0.addOrUpdateTmplProperty("tobResponse","0"),(0,w.H)(b.wMp,"Empty trending search content","",r)),n.slice(0,e.cacheCount||5)}catch(e){(0,w.H)(b.yHB,`${e}`,"",r)}return n}(e),(0,P.N)())if(t&&t.length){const e={cacheTime:Date.now(),mkt:h.jG.CurrentMarket,queries:t};(0,F.$o)().setItem(O,JSON.stringify(e))}else(0,F.$o)().removeItem(O);return t}const N=["pc","pcmpc","ucpdpc","adppc"];class $ extends T.l{constructor(){super(...arguments),this.enableSearchAutoSuggestion=!1,this.enableWarmBingUrl=!1,this.options=null,this.commonSearchBoxRef=null,this.inputElementHasInput=!1,this.voiceSearchButtonTelemetryTag="",this.openVoiceSearchDialog=!1,this.isVoiceSearchLoaded=!1,this.searchVisible=!0,this.placeholderText="",this.showMultiLineSearchBox=!1,this.showCodexBingPlaceHolder=!1,this.showBingLogo=!1,this.canShowCodexBingUpsellByPolicy=!1,this.canShowCodexBingButton=!1,this.canShowBingIntlUpsellSelector=!1,this.isDefaultSearchBing="0"!==(0,p.L)().get("dsp"),this.codexBingChatTelemetryTags="",this.dailyDiscoveryShown=!0,this.dailyDiscoveryHasContent=!0,this.enableCodexBingIconStyles=!1,this.handleFocusEvent=()=>{this.fakeFocused=!0,this.searchboxApiHandle&&this.searchboxApiHandle.startCapturingKeyStrokes()},this.handleMouseDownEvent=e=>{this.commonSearchBoxRef&&this.commonSearchBoxRef!==e.target&&this.fakeFocused&&(this.fakeFocused=!1,this.searchboxApiHandle&&this.searchboxApiHandle.stopCapturingKeyStrokes())},this.onInputStart=()=>{this.fakeFocused&&(this.fakeFocused=!1,this.searchVisible=!1)},this.onInputCancel=()=>{this.searchVisible=!0},this.onKeyCaptureChange=()=>{this.searchboxApiHandle&&(this.fakeFocused=this.searchboxApiHandle.isKeyCaptureEnabled)},this.handInputEvent=e=>{const t=e.target.value;this.inputElementHasInput=!!t},this.dailyDiscoveryContentFetchedCallback=e=>{this.dailyDiscoveryHasContent=e,this.dailyDiscoveryHasContent||(this.dailyDiscoveryShown=!1,this.updateVoiceImageSearchButton())},this.onBingIntlUpsellSelection=e=>{if(null!=e&&e.detail){var t,n,i,r;const o=null===(t=this.config)||void 0===t||null===(n=t.bingIntlUpsellSlcOpt)||void 0===n||null===(i=n.find((t=>t.id===e.detail.key)))||void 0===i?void 0:i.additionalParam,a=o?{...null===(r=this.options)||void 0===r?void 0:r.additionalFormParamMap,...o}:this.config.additionalFormParamMap;this.options=this.options&&{...this.options,additionalFormParamMap:a}}},this.onBingIntlUpsellClick=()=>{this.commonSearchBoxRef&&this.commonSearchBoxRef.onSubmit()}}placeholderTextChanged(e,t){t!==e&&(this.options=this.options&&{...this.options,localizedStrings:{...this.options.localizedStrings,placeholderText:this.placeholderText}})}experienceConnected(){var e,t,n,i,r,o,c,d,l;const p=null===(e=(0,E.K0)(s.z.ChromiumPageSettings))||void 0===e?void 0:e.getCurrentState();this.enableFocusRedirect=(null==p||null===(t=p.configData)||void 0===t?void 0:t.inPageSearchBoxType)===a.HT.redirect,this.isProjectEqual=null==p||null===(n=p.configData)||void 0===n?void 0:n.isEnrolledInProjectEqual,this.dailyDiscoveryShown=!(null===(i=this.config.childExperienceReferencesWC)||void 0===i||!i.DailyDiscovery||null==p||!p.dailyDiscoveryInSearchBoxEnabled),this.enableCodexBingIconStyles=!!this.config.showCodexBingIcon&&p&&"always"===p.selectedFeedDisplaySetting,this.canShowCodexBingUpsellByPolicy=!(0,h.Yq)().isAadAccountUser||((null==p?void 0:p.isCodexBingUpsellEnabledByPolicy)??!1),this.canShowCodexBingButton=!(null===(r=this.config.childExperienceReferencesWC)||void 0===r||!r.CodexBingChat)&&this.canShowCodexBingUpsellByPolicy,this.canShowBingIntlUpsellSelector=!(null===(o=this.config.childExperienceReferencesWC)||void 0===o||!o.BingIntlUpsell);const g=window;g.chrome&&g.chrome.embeddedSearch&&(this.ntpApiHandle=g.chrome.embeddedSearch.newTabPage,this.searchboxApiHandle=g.chrome.embeddedSearch.searchBox),this.showMultiLineSearchBox=this.config&&!!this.config.enableMultiLineSearchBox&&this.config.enableMultiLineSearchBox&&!this.enableFocusRedirect&&(!this.config.limitMSBToNonDSE||!this.isDefaultSearchBing),this.showCodexBingPlaceHolder=this.showMultiLineSearchBox||this.config&&!!this.config.codexBingPlaceHolder&&this.config.codexBingPlaceHolder&&(this.isDefaultSearchBing||!this.enableFocusRedirect),this.showBingLogo=!(this.isDefaultSearchBing||this.enableFocusRedirect||null!==(c=this.config)&&void 0!==c&&null!==(d=c.childExperienceReferencesWC)&&void 0!==d&&d.CodexBingChat),this.canShowCodexBingButton&&(this.codexBingChatTelemetryTags=new u.D({name:"headersearch"}).getMetadataTag()),this.populateCommonSearchBoxOptions(),this.setTelemetryPersonalizationParam(),(0,P.N)()&&window.searchFormSubmitListener&&window.requestAnimationFrame((()=>{var e;null!==(e=this.commonSearchBoxRef)&&void 0!==e&&e.formElement&&this.commonSearchBoxRef.formElement.removeEventListener("submit",window.searchFormSubmitListener)})),null!==(l=this.config.childExperienceReferencesWC)&&void 0!==l&&l.DailyDiscovery&&k.J.updateLayout.registerObserver((e=>{const t=e&&e.params;if(!t||t.length<1)return;const n=t[0],i=!!n.dailyDiscoveryInSearchBoxEnabled;this.dailyDiscoveryHasContent&&this.dailyDiscoveryShown!==i&&(this.dailyDiscoveryShown=i,this.updateVoiceImageSearchButton()),this.config.showCodexBingIcon&&(this.enableCodexBingIconStyles="always"===n.selectedFeedDisplaySetting,this.options=this.options&&{...this.options,enableCodexBingIconStyles:this.enableCodexBingIconStyles})})),(0,P.N)()&&this.canShowBingIntlUpsellSelector&&(0,D.l_)(this).then((()=>{(0,L.Ik)().then((e=>{var t,n,i,r;const o=null===(t=this.config)||void 0===t||null===(n=t.bingIntlUpsellSlcOpt)||void 0===n||null===(i=n.find((t=>t.id===e)))||void 0===i?void 0:i.additionalParam,a=o?{...null===(r=this.options)||void 0===r?void 0:r.additionalFormParamMap,...o}:this.config.additionalFormParamMap;this.options=this.options&&{...this.options,additionalFormParamMap:a}}))}))}shadowDomPopulated(){var e,t,n,i;if((0,P.N)()){const e=(0,f.Ou)();(0,v.c)((()=>{const t=e[y.nz+c.p.searchBox],n=t&&void 0===e[c.p.isSSRAborted];this.markVisuallyReady(n?t:void 0,!n)})),this.config.trendingSearchConfig&&this.config.enableContextualSuggest&&this.getTrendingSearchData()}else(0,S.hf)("SSR.SearchBoxRendered",(0,f.UE)());!this.config.enableClarity&&(0,h.Yq)().ClarityEnabled&&(this.options=this.options&&{...this.options,enableClarity:!0}),this.setPlaceholderText(),(0,g.FY)(m._.searchBox,this);const r=this.commonSearchBoxRef&&this.commonSearchBoxRef.shadowRoot&&(null===(e=(t=this.commonSearchBoxRef.shadowRoot).querySelector)||void 0===e?void 0:e.call(t,"#q"));r&&(this.inputElement=r,this.canShowCodexBingButton&&this.inputElement.addEventListener("input",this.handInputEvent),(0,g.FY)(m._.searchBoxInput,this.inputElement));const o=this.commonSearchBoxRef&&this.commonSearchBoxRef.shadowRoot&&(null===(n=(i=this.commonSearchBoxRef.shadowRoot).querySelector)||void 0===n?void 0:n.call(i,"#voice_srch_go"));var a,s,d;(o&&(0,g.FY)(m._.searchBoxVoiceButton,o),this.enableFocusRedirect?this.registerFocusRedirectHandler():this.config.enableDelayASAfterReveal?(0,M.lr)().then((()=>{this.enableSearchAutoSuggestion=!0})):this.enableSearchAutoSuggestion=!0,Promise.all([(0,x.F_)(),(0,M.lr)()]).then((()=>{this.enableWarmBingUrl=!0})).catch((()=>{C.k.logError("Failed to wait for ATF visually ready and reveal")})),this.config.stampSideBarSupported)&&(null!==(a=window)&&void 0!==a&&null!==(s=a.chrome)&&void 0!==s&&null!==(d=s.edgeMarketingPagePrivate)&&void 0!==d&&d.showFeatures?l.M0.addOrUpdateTmplProperty("CodexBingChatSidebarSupported"):l.M0.addOrUpdateTmplProperty("CodexBingChatSidebarNotAvailable"));this.canShowBingIntlUpsellSelector&&(window.addEventListener("bingIntlUpsellSelection",this.onBingIntlUpsellSelection),window.addEventListener("bingIntlUpsellClick",this.onBingIntlUpsellClick))}getExperienceType(){return d.x.commonSearchBoxEdgeNext}setPlaceholderText(){var e;if(!this.config.localizedStrings)return;const{testBingPlaceholderText:t,placeholderText:n,placeholderTextMSNntp:i,placeholderTextMSNntpv2:r,tenantMissingEnterprisePlaceholderText:o,tenantAvailableEnterprisePlaceholderText:a}=this.config.localizedStrings;if(this.showMultiLineSearchBox||this.showCodexBingPlaceHolder)return void(this.placeholderText=t);if(!(0,h.Yq)().isAadAccountUser)return this.placeholderText=n,void(this.config&&!0===this.config.enableWebAPISuggetion&&this.config.enableMSNSuggestions&&(1===this.config.enableMSNSuggestions&&i?this.placeholderText=i:2===this.config.enableMSNSuggestions&&r&&(this.placeholderText=r)));let c=!1;const d=null===(e=(0,E.K0)(s.z.AdminPortalData))||void 0===e?void 0:e.getCurrentState();d&&(c=!0,this.setEnterprisePlaceholderTextWithAdminSettings(d)),(0,A.Uo)(s.z.AdminPortalData,(e=>{c=!0,this.setEnterprisePlaceholderTextWithAdminSettings(e)})),c||(this.placeholderText=o)}setEnterprisePlaceholderTextWithAdminSettings(e){if(!this.config.localizedStrings)return;const{tenantMissingEnterprisePlaceholderText:t,tenantAvailableEnterprisePlaceholderText:n}=this.config.localizedStrings;if(this.placeholderText)return;if(!e.settingsDataRecieved)return;const{company:i,isMsbEnabled:r}=e.settings||{};this.placeholderText=r&&i?n.replace(/\{0\}/g,i):t}getFormParameters(){const e={...this.config.additionalFormParamMap};e.refig=l.M0.getRequestId();const{formCodes:t}=this.config;return e.form=this.isDefaultSearchBing?t.bingSearchEngine:t.nonBingSearchEngine,N.forEach((t=>{const n=(0,p.L)().get(t.toUpperCase())||(0,p.L)().get(t)||"";n&&(e[t]=n)})),e}populateCommonSearchBoxOptions(){var e,t;this.options={...this.config,showCodexBingASUpsell:this.canShowCodexBingUpsellByPolicy&&this.config.showCodexBingASUpsell,showMultiLineSearchBox:this.showMultiLineSearchBox,enableCodexBingIconStyles:this.enableCodexBingIconStyles,localizedStrings:{...this.strings,placeholderText:this.placeholderText,inputTitle:this.showMultiLineSearchBox?null===(e=this.strings)||void 0===e?void 0:e.testBingInputTitle:null===(t=this.strings)||void 0===t?void 0:t.inputTitle},additionalFormParamMap:this.getFormParameters(),showVoiceSearchButton:this.config.showVoiceSearchButton&&this.isDefaultSearchBing&&!(this.config.onlyShowDailyDiscovery&&this.dailyDiscoveryShown)&&!this.canShowCodexBingButton&&!this.canShowBingIntlUpsellSelector,childExperienceReferencesWC:this.config.childExperienceReferencesWC?{...this.config.childExperienceReferencesWC,ImageSearchWC:!this.isDefaultSearchBing||this.config.onlyShowDailyDiscovery&&this.dailyDiscoveryShown||this.canShowCodexBingButton||this.canShowBingIntlUpsellSelector?null:this.config.childExperienceReferencesWC.ImageSearchWC,DailyDiscovery:this.config.childExperienceReferencesWC.DailyDiscovery}:void 0}}updateVoiceImageSearchButton(){this.config.onlyShowDailyDiscovery&&this.options&&(this.options={...this.options,showVoiceSearchButton:this.config.showVoiceSearchButton&&this.isDefaultSearchBing&&!this.dailyDiscoveryShown,childExperienceReferencesWC:this.config.childExperienceReferencesWC?{...this.options.childExperienceReferencesWC,ImageSearchWC:this.isDefaultSearchBing&&!this.dailyDiscoveryShown?this.config.childExperienceReferencesWC.ImageSearchWC:null}:void 0})}registerFocusRedirectHandler(){this.ntpApiHandle&&(this.ntpApiHandle.oninputstart=this.onInputStart,this.ntpApiHandle.oninputcancel=this.onInputCancel,this.ntpApiHandle.isInputInProgress&&this.onInputStart()),this.searchboxApiHandle&&(this.searchboxApiHandle.onkeycapturechange=this.onKeyCaptureChange,this.fakeFocused=this.searchboxApiHandle.isKeyCaptureEnabled,this.searchboxApiHandle.isKeyCaptureEnabled&&this.searchboxApiHandle.startCapturingKeyStrokes()),this.commonSearchBoxRef&&this.commonSearchBoxRef.addEventListener("focus",this.handleFocusEvent),document.body.addEventListener("mousedown",this.handleMouseDownEvent)}setTelemetryPersonalizationParam(){const e={page:{has3PSearch:!this.isDefaultSearchBing,isSearchAB:this.enableFocusRedirect}};l.M0.updatePageMetadata(e)}clickBingIcon(){this.commonSearchBoxRef&&this.commonSearchBoxRef.onSubmit()}disconnectedCallback(){var e;(super.disconnectedCallback(),this.canShowCodexBingButton)&&(null===(e=this.inputElement)||void 0===e||e.removeEventListener("input",this.handInputEvent));this.enableFocusRedirect&&(this.commonSearchBoxRef&&this.commonSearchBoxRef.removeEventListener("focus",this.handleFocusEvent),document.body.removeEventListener("mousedown",this.handleMouseDownEvent)),this.canShowBingIntlUpsellSelector&&(window.removeEventListener("bingIntlUpsellSelection",this.onBingIntlUpsellSelection),window.removeEventListener("bingIntlUpsellClick",this.onBingIntlUpsellClick))}getTrendingSearchData(){var e;null!==(e=this.config)&&void 0!==e&&e.trendingSearchConfig&&B(this.config.trendingSearchConfig).then((e=>{e&&e.length&&e[0]&&this.$emit("contextualSuggestionChange",{suggestion:e[0]})})).catch((e=>(0,w.H)(b.QWk,"Fetch trending searches promise failed",e)))}}(0,o.gn)([I.LO],$.prototype,"enableSearchAutoSuggestion",void 0),(0,o.gn)([I.LO],$.prototype,"enableWarmBingUrl",void 0),(0,o.gn)([I.LO],$.prototype,"options",void 0),(0,o.gn)([I.LO],$.prototype,"inputElementHasInput",void 0),(0,o.gn)([I.LO],$.prototype,"openVoiceSearchDialog",void 0),(0,o.gn)([I.LO],$.prototype,"isVoiceSearchLoaded",void 0),(0,o.gn)([I.LO],$.prototype,"fakeFocused",void 0),(0,o.gn)([I.LO],$.prototype,"searchVisible",void 0),(0,o.gn)([I.LO],$.prototype,"placeholderText",void 0),(0,o.gn)([I.LO],$.prototype,"showMultiLineSearchBox",void 0),(0,o.gn)([I.LO],$.prototype,"showCodexBingPlaceHolder",void 0),(0,o.gn)([I.LO],$.prototype,"showBingLogo",void 0),(0,o.gn)([I.LO],$.prototype,"canShowCodexBingUpsellByPolicy",void 0),(0,o.gn)([I.LO],$.prototype,"canShowCodexBingButton",void 0),(0,o.gn)([I.LO],$.prototype,"canShowBingIntlUpsellSelector",void 0);var U=n(49218),_=n(41472),H=n(93703),W=n(7275);const q=U.dy`<div slot=${e=>e.config.searchButtonOnRight?"search-options-left":"search-options"} class="bing-logo-container"><fluent-button class="bing-logo-btn ${e=>e.showMultiLineSearchBox?"ml-bing-logo":"bing-logo-o"} ${e=>e.config.searchButtonOnRight?"bing-logo-left":""}" part="button" title=${e=>e.strings&&e.strings.bingIconText} aria-label=${e=>e.strings&&e.strings.bingIconText} appearance="stealth" @click="${e=>e.clickBingIcon()}" @keypress="${e=>e.clickBingIcon()}" data-t="${e=>{var t;return null===(t=e.commonSearchBoxRef)||void 0===t?void 0:t.buttonTelemetryTag}}" data-customhandled="true"><img src=${()=>`${(0,h.Yq)().StaticsUrl}/latest/icons/BingLogo.svg`}></fluent-button></div>`,V=U.dy`<div slot="search-options" class="daily-discovery-container">${e=>{var t;return e.options&&(null===(t=e.options.childExperienceReferencesWC)||void 0===t?void 0:t.DailyDiscovery)&&(0,W.Ot)(e.options.childExperienceReferencesWC.DailyDiscovery,{properties:{contentFetchedCallback:e.dailyDiscoveryContentFetchedCallback}})}}</div>`,G=U.dy`<div slot="search-options" class="bing-intl-container">${e=>{var t;return e.options&&(null===(t=e.options.childExperienceReferencesWC)||void 0===t?void 0:t.BingIntlUpsell)&&(0,W.Ot)(e.options.childExperienceReferencesWC.BingIntlUpsell,{properties:{bingIntlUpsellMenuItems:e.config.bingIntlUpsellSlcOpt}})}}</div>`,z=U.dy`<div slot="${e=>e.config&&e.config.showCodexButtonInBox?"search-options":"codex-bing-chat"}" data-t="${e=>e.codexBingChatTelemetryTags}">${e=>{var t;return e.options&&(null===(t=e.options.childExperienceReferencesWC)||void 0===t?void 0:t.CodexBingChat)&&(0,W.Ot)(e.options.childExperienceReferencesWC.CodexBingChat,{properties:{showCodexButtonInBox:e.config.showCodexButtonInBox}})}}</div>`,j=U.dy`<cs-common-search-box ${(0,_.i)("commonSearchBoxRef")} :options=${e=>e.options} :enableAutoSuggestion=${e=>e.enableSearchAutoSuggestion} :enableWarmBingUrl=${e=>e.enableWarmBingUrl} :fakeFocused=${e=>e.fakeFocused} :disableSubmit=${e=>e.enableFocusRedirect} :searchVisible=${e=>e.searchVisible} exportparts="root, searchcore" class=${e=>{var t;return null!==(t=e.config.childExperienceReferencesWC)&&void 0!==t&&t.DailyDiscovery?"with-gleam":""}} ?usePageBreakpoints=${e=>!!e.config.usePageBreakpoints}>${(0,H.g)((e=>{var t;return null===(t=e.config)||void 0===t?void 0:t.enableCodexBundlePrefetch}),U.dy`<div><iframe src="https://www.bing.com/wpt/prefetchcib" style="display: none;"></iframe></div>`)} ${(0,H.g)((e=>{var t;return null===(t=e.config.childExperienceReferencesWC)||void 0===t?void 0:t.DailyDiscovery}),V)} ${(0,H.g)((e=>e.canShowCodexBingButton&&!e.inputElementHasInput),z)} ${(0,H.g)((e=>e.showBingLogo),q)} ${(0,H.g)((e=>{var t;return null===(t=e.config.childExperienceReferencesWC)||void 0===t?void 0:t.BingIntlUpsell}),G)}</cs-common-search-box>`;var K=n(78923),Q=n(22674);const Z=K.i`
.bing-logo-btn{border-radius:0 var(--search-box-radius) var(--search-box-radius) 0}`,J=K.i`
.bing-logo-btn{border-radius:var(--search-box-radius) 0 0 var(--search-box-radius)}`,X=K.i` .bing-logo-btn{height:46px;background:transparent;padding:0;border:none}.bing-logo-o::part(control){padding-inline-end:11px}.ml-bing-logo::part(control){padding-inline-end:7px}.bing-logo-left::part(control){padding-inline-end:0px}.bing-logo-btn > img{margin:12px 2px;height:22px;width:22px;vertical-align:bottom}.daily-discovery-container{margin-inline-end:12px;display:flex;justify-content:center;align-items:center}`.withBehaviors(new Q.O(Z,J)),Y={experienceConfigSchema:undefined};i.il.define(r.s.registry)},34168:function(e,t,n){"use strict";n.r(t),n.d(t,{EdgeChromiumPageWC:function(){return Un},EdgeChromiumPageWCCommonTemplate:function(){return Mi},EdgeChromiumPageWCInlineStyles:function(){return ji},EdgeChromiumPageWCStyles:function(){return Ki},EdgeChromiumPageWCTemplate:function(){return Li},EdgeChromiumPageWCWithJSDependencyStyles:function(){return zi},OverlapState:function(){return ie},ToolingInfo:function(){return Qi}});var i=n(61421),r=n(33940),o=n(85205);const a=new Map([["en",["en-xl","en-ae","en-au","en-ca","en-gb","en-ie","en-in","en-my","en-nz","en-ph","en-sg","en-us","en-za"]],["ja",["ja-jp"]],["ko",["ko-kr"]],["ru",["ru-ru","ru-xl"]],["de",["de-de","de-ch","de-at"]],["fr",["fr-xl","fr-be","fr-ca","fr-ch","fr-fr"]],["es",["es-xl","es-us","es-mx","es-ar","es-cl","es-co","es-es"]],["it",["it-it"]],["pl",["pl-pl"]],["ar",["ar-eg","ar-sa","ar-ae"]],["sv",["sv-se"]],["nl",["nl-nl","nl-be"]],["tr",["tr-tr"]],["bn",["bn-in"]],["te",["te-in"]],["hi",["hi-in"]],["mr",["mr-in"]],["nb",["nb-no"]],["pt",["pt-pt","pt-br"]],["id",["id-id"]]]);var s=n(79545),c=n(46986),d=n(58980),l=n(83102),u=n(69233);const p=new Set(["AD","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BW","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CO","CR","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","ID","IE","IM","IN","IO","IQ","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PR","PT","PW","PY","QA","RE","RO","RS","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW","EN-US","JA-JP","DE-DE"]);var h=n(88249),g=n(21789),m=n(13334),f=n(71486),v=n(21931),y=n(54297),S=n(20089),C=n(26181),w=n(95153),b=n(91046),T=n(8780),k=n(77036),P=n(48204),I=n(3104),A=n(92100),E=n(84231),x=n(86522),M=n(61153),L=n(98106),D=n(45266),R=n(56591),F=n(25598),O=n(88762),B=n(88456),N=n(50176),$=n(59489),U=n(45870),_=n(50632),H=n(40378),W=n(98619),q=n(49155),V=n(72322);const G="background",z="pivot",j="solidHeader",K="top",Q="scrollToFeed",Z="ntps",J=204,X=176,Y=64,ee=400,te=900,ne={[V.IY.ENUS]:"Y_993301dc-ad41-46da-b9ee-85cd71d083b7",[V.IY.ENIN]:"Y_7b280bce-7a91-4a7a-b3f8-72012a43944d"};var ie;!function(e){e[e.NoOverlap=0]="NoOverlap",e[e.PartialOverlap=1]="PartialOverlap",e[e.CompleteOverlap=2]="CompleteOverlap"}(ie||(ie={}));const re=138,oe=240,ae={off:{Small:150,Medium:88,Large:102},top:{Small:150,Medium:88,Large:102},onerow:{Small:160,Medium:88,Large:102},tworows:{Small:160,Medium:88,Large:102}},se={off:{Small:184,Medium:122,Large:136},top:{Small:184,Medium:122,Large:136},onerow:{Small:204,Medium:132,Large:146},tworows:{Small:204,Medium:132,Large:146}};var ce=n(95815),de=n(56117),le=n(23549),ue=n(82898),pe=n(7476),he=n(21930),ge=n(10754),me=n(20009),fe=n(88826),ve=n(59450),ye=n(90215),Se=n(40015),Ce=n(87172),we=n(74161),be=n(67213),Te=n(62929),ke=n(36867);async function Pe(){var e;const t="vp"===(0,b.L)().get("reqsrc")||!!(0,b.L)().get("vptest");if(!window.caches||-1!=(null===(e=location.href)||void 0===e?void 0:e.indexOf("enableForceCache=true"))||t)return;const n=Date.now(),i=await async function(){let e="";const t=await Ae("edgenext-base-V1");t&&t.length>0||(e="edgenext-base-v1-empty.");const n=e?[]:t.filter((e=>e.url&&function(e,t){if(!e||!t)return!1;const n=xe(new URL(e)),i=xe(new URL(t));if(!n||!i)return!1;return n.href==i.href}(e.url,location.href)));e||n&&0!=n.length||(e="edgenext-base-v1-missing.");const i=await caches.open("edgenext-base-fallback-V1");if(e){const t=Ee(new URL(location.href));try{return await i.add(t),e+" NetworkCall"}catch(t){return e+" "+t}}const r=n[0],o=await caches.match(r.url);if(!o)return"Empty cache entry.";const a=Ee(new URL(r.url));return await i.put(a,o),"saved."}(),r=Date.now(),o={r:i,ic:await Ie(),te:r-n};(0,y.$o)().setObject("FallbackNavigationResult",o)}async function Ie(){const e=await Ae("edgenext-base-fallback-V1");if(!(e&&e.length>0))return!1;const t=Ee(new URL(location.href)),n=e.filter((e=>e.url&&e.url===t.toString()));return!!(n&&n.length>0)}async function Ae(e){if(!window.caches)return[];const t=await caches.open(e);return t&&await t.keys()||[]}function Ee(e){return(e=xe(e)).searchParams.append("enableForceCache","true"),e}function xe(e){return e.searchParams.has("prerender")&&e.searchParams.delete("prerender"),e.searchParams.has("startpage")&&e.searchParams.delete("startpage"),e}var Me=n(74450);const Le={NavResponseParsingFailed:pe.D7p,FeedResponseCachingFailed:pe.uAr,FeedRequestURLGenerationFailed:pe.Mr7,UserIDNotAvailableForFeedFetch:pe.Ins,FailedToReadNavResponseStream:pe.F14,NavResponseHandlerFailed:pe.T93,NavResponseErrorHandlerReturnedFallback:pe.npY,NavHandlerMarkersNotFound:pe.RD7,UnhandledErrorInNavHandler:pe.Bi$,NavFeedRequestFailed:pe.K1E,NavFeedHandlerExited:pe.ePs,InMemoryHandlerCacheMissed:pe.cJZ,FetchMsgHandlerCacheMissed:pe.rqK};async function De(){const e=await(0,Me.T)({type:"SW_ERROR_DATA"});if(e&&e.length){for(const t of e){const e=Le[t.id];if(!e)continue;const n={...e,message:t.message};if(t.data&&(n.pb={...n.pb,...t.data}),(e.id===Le.FetchMsgHandlerCacheMissed.id||e.id===Le.InMemoryHandlerCacheMissed.id)&&t.data&&t.data.pageUrl&&t.data.swUrl){const i=A.c.compareURLs(t.data.pageUrl,t.data.swUrl);n.pb={...e,urlMismatchData:i}}le.M0.sendAppErrorEvent(n)}le.M0.addOrUpdateTmplProperty("swerr",e.length.toString())}}async function Re(e){if(!e)return;const t=await async function(){return await(0,Me.T)({type:"SW_FLAGS_DATA"})}();if(t&&t.featureFlags&&t.workerParams){["enableEarlyFeedFetchMem","enableEarlyFeedFetchMsg","enableEarlyFeedFetch"].forEach((n=>{const i=e[n],r=t.featureFlags[n];if((i||r)&&i!==r){var o,a,s;const e=((null===(o=navigator)||void 0===o||null===(a=o.serviceWorker)||void 0===a||null===(s=a.controller)||void 0===s?void 0:s.scriptURL)||"").split("?")[1];le.M0.sendAppErrorEvent({...pe.IXH,message:`Flag mismatch. Page: ${i}, Worker: ${r}`,pb:{...pe.IXH.pb,workerParams:t.workerParams,pageSwParams:e}})}}))}}var Fe=n(78324),Oe=n(81949),Be=n(47266),Ne=n(88070),$e=n(16844),Ue=n(66794),_e=n(7124),He=n(16614),We=n(52965),qe=n(66415),Ve=n(84515);var Ge=n(43356);function ze(e,t,n=!1,i,r,o){if(e)if("serviceWorker"in navigator){if(e=function(e,t){const n=t.indexOf("?")>-1?"&":"?",i=n+function(e){const t=(0,b.L)().getAll("item"),n=t?t.find((e=>e&&0===e.indexOf("spalink:"))):void 0;let i=function(e){const t=(0,b.L)().get("bundles");let n;if(t&&(n=je("bundles",t),n))return n;if(n=je("bundles",e.bundlesOverride),n)return n;return je("bundles",m.Al.ClientSettings&&m.Al.ClientSettings.bundleInfo.alias)}(e);n&&(i=je("item",n.replace("/mobile","")));return i}(e)+function(e){const t=(0,b.L)().get("raceEnabled");return e.cacheAndNetworkRaceEnabled||t?je("raceEnabled","true"):""}(e)+((null===m.Al||void 0===m.Al||null===(r=m.Al.ClientSettings)||void 0===r?void 0:r.audienceMode)===c.F.Enterprise?je("enableOfficeRoutes","true"):"")+function(e){return isNaN(e.riverAgeMinutes)?"":je("riverAgeMinutes",e.riverAgeMinutes.toString())}(e)+function(e){const t=(0,b.L)().get("enableNetworkFirst");return e.enableNetworkFirst||t?je("enableNetworkFirst","true"):""}(e)+function(e){return isNaN(e.navAgeMinutes)?"":je("navAgeMinutes",e.navAgeMinutes.toString())}(e)+function(e){const t=(0,b.L)().get("enableNavPreload");return e.enableNavPreload||t?je("enableNavPreload","true"):""}(e)+function(e){const t=(0,b.L)().get("enablePreRenderPartialResponseRoute");return e.enablePreRenderPartialResponseRoute||t?je("enablePreRenderPartialResponseRoute","true"):""}(e)+function(e){const t=(0,b.L)().get("enableEmptySectionRoute");return e.enableEmptySectionRoute||t?je("enableEmptySectionRoute","true"):""}(e)+function(e){const t=(0,b.L)().get("enableEarlyFeedFetch");return e.enableEarlyFeedFetch||t?je("enableEarlyFeedFetch","true"):""}(e)+function(e){const t=(0,b.L)().get("enableEarlyFeedFetchMsg");return e.enableEarlyFeedFetchMsg||t?je("enableEarlyFeedFetchMsg","true"):""}(e)+function(e){const t=(0,b.L)().get("enableEarlyFeedFetchMem");return e.enableEarlyFeedFetchMem||t?je("enableEarlyFeedFetchMem","true"):""}(e)+function(e){const t=(0,b.L)().get("enableBaseResponseTeeNoOp");return e.enableBaseResponseTeeNoOp||t?je("enableBaseResponseTeeNoOp","true"):""}(e)+function(e){const t=(0,b.L)().get("enableBkgdNewStorage");return e.enableBkgdNewStorage||t?je("enableBkgdNewStorage","true"):""}(e)+function(e){const t=(0,b.L)().get("enableAltCacheNetworkRace");return e.enableAltCacheNetworkRace||t?je("enableAltCacheNetworkRace","true"):""}(e)+function(e){const t=(0,b.L)().get("enableNavErrorHandler");return e.enableNavErrorHandler||t?je("enableNavErrorHandler","true"):""}(e)+function(e){const t=(0,b.L)().get("enableFallbackVerticalsFeed");return e.enableFallbackVerticalsFeed||t?je("enableFallbackVerticalsFeed","true"):""}(e)+function(e){const t=(0,b.L)().get("disableDefaultNavigationRoute");return e.disableDefaultNavigationRoute||t?je("disableDefaultNavigationRoute","true"):""}(e)+function(e){return isNaN(e.networkTimeoutSeconds)?"":je("networkTimeoutSeconds",e.networkTimeoutSeconds.toString())}(e)+function(e){const t=(0,b.L)().get("enableExternalCssPrecache");return e.enableExternalCssPrecache||t?je("enableExternalCssPrecache","true"):""}(e);var r;i!==n&&(t=function(e,t){if(!e||!e.endsWith(t))return e;return e.slice(0,-1)}(t+=i,"&"));return t}(i,e),o){const t=(e=o(e,"serviceWorkerUrlPolicy"))&&e.toString();if(!t||"about:blank#error"===t)return void(0,fe.H)(pe.a6r,"Service Worker script Url is not trusted type compliant")}n?Qe(e,t,r):(0,Ge.F_)().then((()=>{Qe(e,t,r)}))}else(0,fe.H)(pe.a6r,"Service Worker is not in navigator.");else(0,fe.H)(pe.a6r,"No scriptUrl provided")}function je(e,t){return t?e+"="+t+"&":""}async function Ke(e="/"){try{const t=await navigator.serviceWorker.getRegistration(e);if(!t)return;await t.unregister()||(0,fe.H)(pe.Fst,"ServiceWorker unregistration failed.")}catch(e){(0,fe.OO)(e,pe.Fst,"Failed to unregister ServiceWorker:"+e.message)}}async function Qe(e,t,n){try{await navigator.serviceWorker.register(e,{scope:t}),n&&n()}catch(e){(0,fe.OO)(e,pe.a6r,"ServiceWorker registration failed.")}}var Ze=n(78672),Je=n(48503);function Xe(e,t,n,i,r,o){if(!t||"true"!==t.enabled)return;const a=m.Al.ClientSettings.deviceFormFactor;if("false"===t.mobileEnabled&&("phone"===a||"tablet"===a))return;if(!function(e){const t=m.Al.ClientSettings.browser;if(!t&&"false"===e.mobileEnabled)return!1;const n=e.unsupportedBrowsers;if(!n||!n.length)return!0;if(n.findIndex((e=>e.toLowerCase()===t.browserType.toLowerCase()))>-1)return!1;return!0}(t))return;if(!(0,y.$o)().supported)return;const s=t.isLowEndDevice&&t.disableOnLowEndDevices;if("true"===t.registrationEnabled&&!s){const a=function(){const e=(0,Ze.zp)(),t=A.c.getQueryParameterByName("swimmediateregistration",e);if(t)return"true"===t.toLocaleLowerCase();return!1}();i=i||a,Je.U.setIsServiceWorkerEnabled(!0),ze(e,n,i,t,r,o)}("true"===t.unregistrationEnabled||s)&&(!function(e="/",t=!1){if(!e||!("serviceWorker"in navigator))return null;t||"complete"===document.readyState?Ke(e):window.addEventListener("load",(()=>{Ke(e)}),{once:!0})}(n),Je.U.setIsServiceWorkerEnabled(!1))}var Ye=n(58560),et=n(84424),tt=n(20300),nt=n(64902),it=n(94746),rt=n(96531);var ot=n(56401),at=n(34780),st=n(31558),ct=n(75776);var dt,lt=n(91735),ut=n(9498),pt=n(64726),ht=n(59997),gt=n(31499),mt=n(70280);let ft;!function(e){e.topStories="topstory",e.breakingNews="breakingnews",e.socialReplies="socialreplies",e.socialReactions="socialreactions",e.socialFollowers="socialfollowers",e.socialAchievements="socialachievements",e.socialAlerts="socialalerts"}(dt||(dt={}));class vt{constructor(e){this.resolvePushNotificationsSubscription=async(e,t,n,i,r,o,a)=>{const s=await this.swRegistration.pushManager.getSubscription();if("denied"===Notification.permission)return;if(o.size<1&&(!s||"granted"!==Notification.permission))return;if(s)return void vt.updateSubscriptions(s,e,o);let c="granted"===Notification.permission;const d=c;let l="";const{defaultNotification:u,defaultNotificationPromptAllow:p,defaultNotificationPromptBlock:h,defaultNotificationPromptDefault:g}=vt.buildDefaultNotificationPermissionPromptTelemetryElement(a);if(!c){let e;switch(le.M0.sendContentViewEvent(u,mt.NS.View),l=await Notification.requestPermission(),l){case"granted":e=p,c=!0;break;case"denied":e=h;break;default:e=g}le.M0.sendActionEvent(e,ue.Aw.Click,ue.wu.Undefined)}if(!c)return;if(fetch(e+"/webpush/key").then((async t=>{if(t.ok){const n=await this.swRegistration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:vt.urlB64ToUint8Array((await t.json()).key)});vt.updateSubscriptions(n,e,o)}else le.M0.sendAppErrorEvent({...pe.fcE,message:"Error fetching key for subscribing to push notifications endpoint",pb:{...pe.fcE.pb,customMessage:`HTTP Status: ${t.status}`}})})),!d){const e={body:n,tag:"web-notification",icon:r,data:{url:A.c.getAbsoluteUrl(i)}};"edge"===m.Al.ClientSettings.browser.browserType?this.swRegistration.showNotification(t,e):new Notification(t,e)}},this.swRegistration=e}static getInstance(){return ft}static initializePushSubscriptionManager(e){"string"==typeof e?this.initializeFromScope(e):this.initializeFromRegistration(e)}static initializeFromRegistration(e){ft=new vt(e)}static async initializeFromScope(e){await navigator.serviceWorker.ready,vt.initializePushSubscriptionManager(await navigator.serviceWorker.getRegistration(e))}static urlB64ToUint8Array(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),n=atob(t),i=new Uint8Array(n.length);for(let e=0;e<n.length;++e)i[e]=n.charCodeAt(e);return i}static addTelemetryTagsToElement(e,t,n){const i={name:n},r=t?t.addOrUpdateChild(i):null,o=r.render();return Object.keys(o).forEach((t=>{e.setAttribute(t,o[t])})),r}static buildDefaultNotificationPermissionPromptTelemetryElement(e){const t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),r=document.createElement("div");t.appendChild(n),t.appendChild(i),t.appendChild(r);const o=vt.addTelemetryTagsToElement(t,e,"browserNativeNotificationPermissionPrompt");return vt.addTelemetryTagsToElement(n,o,"Accept"),vt.addTelemetryTagsToElement(i,o,"Block"),vt.addTelemetryTagsToElement(r,o,"Default"),{defaultNotification:t,defaultNotificationPromptAllow:n,defaultNotificationPromptBlock:i,defaultNotificationPromptDefault:r}}static async updateSubscriptions(e,t,n){const i=Object.values(dt).filter((e=>!n.has(e)));[{segment:"subscribe",tags:[...n]},{segment:"unsubscribe",tags:i}].forEach((async n=>{if(n.tags.length<1)return;const i=n.tags.join(";"),r=t+"/webpush/news/"+m.Al.Locale+"/v1/webpush/"+n.segment+"?scn=MSNRPSAuth",o=await fetch(r,{credentials:"include",method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Tags:i},body:JSON.stringify({subscription:e})});o.ok?o.json().then((e=>{"Success"!==e.message&&le.M0.sendAppErrorEvent({...pe.M7L,message:"Response contained unexpected value when subscribing or unsubscribing from push notifications endpoint",pb:{...pe.M7L.pb,customMessage:`Expected response message to be 'Success' but instead was ${e.message} when receiving response from endpoint at ${r}`}})})):le.M0.sendAppErrorEvent({...pe.M7L,message:"HTTP error when making subscribe or unsubscribe call from push notifications endpoint",pb:{...pe.M7L.pb,customMessage:`Response status was ${o.status} when attempting to communicate with the endpoint at ${r}`}})}))}}var yt=n(39100),St=n(41074);const Ct=(0,f.k)((function(){window.pageYOffset>0&&bt()}),0);let wt=!1;function bt(){const e=(0,Ge.S0)();e&&St.g.updateBelowTheFoldTransitionStart.getActionSender(e).send(!0),wt=!0,window.removeEventListener("scroll",Ct)}const Tt={initialize:function(){window.addEventListener("scroll",Ct,{passive:!0})},handleSettingUpdate:function(e){wt||"always"!==e&&"headingsonly"!==e&&"peek"!==e||bt()}};var kt=n(55524),Pt=n(339),It=n(99452),At=n(68963),Et=n(67044),xt=n(944),Mt=n(95063),Lt=n(548),Dt=n(99064),Rt=n(54155),Ft=n(69734),Ot=n(59044),Bt=n(19547),Nt=n(87697),$t=n(60189),Ut=n(2186),_t=n(36941),Ht=n(87574),Wt=n(45539),qt=n(19779);const Vt="ntps";var Gt=n(70169);async function zt(e,t,n){if(!window.navigator.cookieEnabled)return;await(0,Gt.rr)();let i="";try{i=await async function(){var e;const t=await qt.N.getPdpUserPreference(!0);if(!t||!t.value||0===t.value.length)return"";const n=t.value[0];if(!n)return"";return(null===(e=n.userSettings)||void 0===e?void 0:e.preferredMarket)??""}()}catch{return void(0,fe.H)(pe.Xa2,"There was an error getting preferredMarket from PDP services.")}const r=function(){let e="";const t=(0,ce.ej)(Vt);if(!t)return"";const n=JSON.parse(t);n&&n.m&&(e=n.m);return e}();let o=!1,a="";if(a=(0,y.$o)().getItem("marketConsolidationTmpl"),i)r?i!==r?(t&&(n&&(a=`MarketConsolidationSync_Mismatch_${i}_${r}`,e(i),(0,y.$o)().setObject("showMarketRoamingCoachmark",!0)),o=!0),(0,fe.H)(pe.i05,`Market missmatch. Server market: ${i}, Client market: ${r}`)):i!==r||a||(a="MarketConsolidationSync_Match",o=!0):(n&&(a="MarketConsolidationSync_Client_"+i,e(i)),o=!0);else if(r&&(o=!0,n)){await qt.N.updateMarketPreference(r)?a="MarketConsolidationSync_Server_"+r:(o=!1,(0,fe.H)(pe.zm9,"There was an error updating preferredMarket."))}a&&(0,y.$o)().setItem("marketConsolidationTmpl",a),(o||a)&&(le.M0.addOrUpdateTmplProperty("MarketConsolidationSync",o&&n?"1":"0"),le.M0.addOrUpdateTmplProperty(a,"1"))}var jt=n(77195),Kt=n(36777),Qt=n(35114),Zt=n(93893),Jt=n(78617),Xt=n(26465),Yt=n(28326),en=n(55522),tn=n(94409),nn=n(76040),rn=n(23234),on=n(2587),an=n(12912);const sn=6048e5,cn=2;const dn=6048e5,ln=3;const un=2592e5;async function pn(e,t,n,i){var r,o;if(!t||!e||null===(r=e.localizedStrings)||void 0===r||!r.LockScreenNewLayoutCM)return;const a=await(null===(o=(0,Jt.Un)())||void 0===o?void 0:o.getInteractions());if("1"!==A.c.getQueryParameterByName("newLayoutTestMode",(0,Ze.zp)())){var s;const e=null==a||null===(s=a[on.gz.LockScreenPersonalizeCoachmark])||void 0===s?void 0:s.find((e=>e.type===Xt.p.Engaged)),t=e?function(e,t=864e5){const n=new Date(e),i=((new Date).getTime()-n.getTime())/t;return i}(e.ts):null;if(!t||t<3)return}const c=await ke.L.getPreferenceSetting(we.nc.layout_mode);if((null==c?void 0:c.value)===we.Uq.informational)return;const d=await ke.L.getPreferenceSetting(we._9.feeds);if("always"===(null==d?void 0:d.value))return;const l={feedName:"filteredChannels",fcl:!0},u=await(null===Ut.yg||void 0===Ut.yg?void 0:Ut.yg.fetchChannelFilter("Channel Store",l));if(0===(u&&u.subCards||[]).length)return;le.M0.addOrUpdateTmplProperty("newLayoutReviewCoachmark_show","1");!async function(e,t,n){var i;const{title:r,description:o,engageContentActionLabel:a,dismissContentActionLabel:s}=e.localizedStrings.LockScreenNewLayoutCM,c={id:on.gz.NewLayoutReviewCoachmark,group:Yt.V.Exclude,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.Coachmark,size:on.dm.Medium,position:on.pY.BottomEnd},contentModel:{contentType:tn.J.CallToAction,title:r,description:o,contentImage:{url:`${g.jG.StaticsUrl}/pr-4566482/nurturing/img/review_layout.png`,altText:e.localizedStrings.lockScreenNewLayoutAltText??"New Layout Review Coachmark Image"},dismissContentAction:{label:s},engageContentAction:{label:a,actionDelegate:()=>{t.updateLayout(n)}}}},d=[(0,nn.H)(Xt.p.Viewed,un),(0,rn.l)(Xt.p.Viewed,3),(0,rn.l)(Xt.p.Engaged,1)];null===(i=(0,an.$0)())||void 0===i||i.sendInternalPlacement(c,d)}(e,i,{...n,currentLayout:D.nP.informational})}const hn=2592e5;async function gn(e,t){const n=await(null===Ut.yg||void 0===Ut.yg?void 0:Ut.yg.fetchChannelFilter("Channel Store",{feedName:"filteredChannels"}));e.lockScreenUserJourney&&t&&n&&!(n.subCards&&(null==n?void 0:n.subCards.length)>0)&&(le.M0.addOrUpdateTmplProperty("lockScreenPersonalize_show","1"),async function(e){var t;const n=await(0,qe.h_)(Ve._.personalizeButton);if(!n)return;const i=[(0,nn.H)(Xt.p.Viewed,hn),(0,rn.l)(Xt.p.Viewed,3),(0,rn.l)(Xt.p.Engaged,1)],r={id:on.gz.LockScreenPersonalizeCoachmark,group:Yt.V.Exclude,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.Coachmark,size:on.dm.Medium,position:on.pY.BottomEnd},contentModel:{title:e.localizedStrings.LockScreenPersonalizeCM.title,description:e.localizedStrings.LockScreenPersonalizeCM.description,contentType:tn.J.CallToAction,engageContentAction:{label:e.localizedStrings.LockScreenPersonalizeCM.engageContentActionLabel,actionDelegate:()=>{null==n||n.click()}},dismissContentAction:{label:e.localizedStrings.LockScreenPersonalizeCM.dismissContentActionLabel}}};null===(t=(0,an.$0)())||void 0===t||t.sendInternalPlacement(r,i)}(e))}var mn=n(88672),fn=n(53629);var vn=n(20758);const yn=(e,t)=>{const{currentLayout:n,selectedFeedDisplaySetting:i}=t,{optInFeedLayoutCMConfig:r}=e;if(n===D.nP.informational||n===D.nP.custom&&"always"===i)return;if(n===D.nP.custom&&"off"===i)return;const o=((e,t)=>{const{currentLayout:n,selectedFeedDisplaySetting:i}=t;let r=0;const o=(0,$e.Nu)(K)-8;var a,s;return r=n===D.nP.focused||n===D.nP.custom&&"headingsonly"===i?(null==e||null===(a=e.scrollDistanceInPx)||void 0===a?void 0:a.focused)||o:(null==e||null===(s=e.scrollDistanceInPx)||void 0===s?void 0:s.inspirational)||o,r})(r,t),a=t=>{var n;(t.type===Q||((null===(n=window)||void 0===n?void 0:n.scrollY)??0)>=o)&&(le.M0.addOrUpdateTmplProperty("triggerOptInFeedLayoutCM",t.type===Q?"1":"2"),Sn(e.localizedStrings.optInFeedLayoutCMStrings||{}),window.removeEventListener("scroll",a))};return window.addEventListener("scroll",a),window.addEventListener(Q,a,{once:!0}),()=>{window.removeEventListener("scroll",a),window.removeEventListener(Q,a)}},Sn=e=>{var t;const n=matchMedia("(prefers-color-scheme:dark)"),i=`${g.jG.StaticsUrl}/pr-4549507/nurturing/img/layout_promotion_dark.png`,r=`${g.jG.StaticsUrl}/pr-4549507/nurturing/img/layout_promotion_light.png`,o=null!=n&&n.matches?i:r,a={id:on.gz.OptInFeedLayout,group:Yt.V.Functional,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.Coachmark,size:on.dm.Large,position:on.pY.BottomEnd},contentModel:{title:(null==e?void 0:e.title)||"",description:(null==e?void 0:e.description)||"",contentType:tn.J.CallToAction,contentImage:{url:o,altText:"Opt-in feed layout"},dismissContentAction:{label:(null==e?void 0:e.dismBtnLabel)||""},engageContentAction:{label:(null==e?void 0:e.engageBtnLabel)||"",actionDelegate:()=>{(0,vn.Rc)()()}}}},s=[(0,rn.l)(Xt.p.Viewed,2),(0,nn.H)(Xt.p.Viewed,12096e5),(0,nn.H)(Xt.p.Viewed,6048e5,{relatedPlacementIds:[on.gz.LayoutPromotion,on.gz.stickyPeekOnLoad,on.gz.stickyPeekOnLoadAutoScroll,on.gz.informationalSwitchCompletion]})];null===(t=(0,an.$0)())||void 0===t||t.sendInternalPlacement(a,s)},Cn="new_device_experimentation.ntp_feed_below_the_fold_should_show_withdrawal_dialog";var wn=n(33881);const bn=1728e5;var Tn=n(42809);let kn;const Pn=6048e5,In=864e5;async function An(e){var t,n;const{config:i,isSignedOutPromise:r,isFromWidgetLockScreen:a,newYearV2Anchor:s,onScrollPromise:c,onSocialPromise:d,layoutState:l,pageSettingsDataConnector:u}=e,p=[];if(!i)return;i.enableLangExpBanner&&function(){var e;const t={id:"LanguageExplainingBanner",group:Yt.V.Functional,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.HorizontalBanner,position:wn.bw.Top},contentModel:{title:"Language Explaining Banner",description:"Почему мой канал на английском языке? Вы видите наш международный канал, так как каналы на русском языке больше не доступны.",contentType:tn.J.CallToAction,dismissContentAction:{label:"Понятно."}}},n=[(0,nn.H)(Xt.p.Dismissed,bn),(0,rn.l)(Xt.p.Dismissed,3)];null===(e=(0,an.$0)())||void 0===e||e.sendInternalPlacement(t,n)}(),i.enableEdgeFeedCoachmark&&async function(e){var t,n,i,r;if(!e.enableEdgeFeedCoachmark||null==e||null===(t=e.localizedStrings)||void 0===t||!t.edgeFeedBelowTheFoldCoachmark||null===(n=window)||void 0===n||null===(i=n.chrome)||void 0===i||!i.ntpSettingsPrivate)return;const o=new U.o;if(window.chrome.ntpSettingsPrivate.getPref(Cn,(e=>o.set(null==e?void 0:e.value))),!await o.getResultAsync())return;const{title:a,description:s}=e.localizedStrings.edgeFeedBelowTheFoldCoachmark,c={id:"edgeFeedBelowTheFoldCoachmark",group:Yt.V.Functional,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.Coachmark,size:on.dm.Large,position:{coachmarkAnchor:Ve._.settingsButton,anchoringPosition:on.RC.Below,hasPointer:!0,pointerPosition:on.Jt.Opposite},displaySurfaceAction:{actionDelegate:()=>{window.chrome.ntpSettingsPrivate.setPref(Cn,!1)}}},contentModel:{contentType:tn.J.CallToAction,title:a,description:s}},d=[(0,rn.l)(Xt.p.Viewed,1)];null===(r=(0,an.$0)())||void 0===r||r.sendInternalPlacement(c,d)}(i),null!==(t=i.termOfUseBannerConfig)&&void 0!==t&&t.enabled&&await r&&function(e){var t,n,i,r,o,a,s,c,d,l;const u=!(null===(t=this.config.termOfUseBannerConfig)||void 0===t||!t.isSecondBanner),p=(null==e||null===(n=e.termOfUseBannerConfig)||void 0===n?void 0:n.termOfUseBanner1Description)||(null==e||null===(i=e.localizedStrings)||void 0===i?void 0:i.termOfUseBanner1Description)||"We're updating our Terms of Use",h=(null==e||null===(r=e.termOfUseBannerConfig)||void 0===r?void 0:r.termOfUseBanner2Description)||(null==e||null===(o=e.localizedStrings)||void 0===o?void 0:o.termOfUseBanner2Description)||"We've updated our Terms of Use",m=u?h:p,f={id:u?"TermOfUseBanner2":"TermOfUseBanner1",group:Yt.V.Promotional,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.HorizontalBanner,position:wn.bw.Top,bannerType:wn.pp.LegalCompliance,displaySurfaceAction:{actionDelegate:()=>{}},hideSurfaceAction:{actionDelegate:()=>{}},closeSurfaceAction:{label:"Close"}},contentModel:{title:m,description:m,contentType:tn.J.CallToAction,logoImage:{url:`${g.jG.StaticsUrl}/latest/nurturing/img/i-logo.png`,altText:"Image Alt Text"},dismissContentAction:{label:(null==e||null===(a=e.termOfUseBannerConfig)||void 0===a?void 0:a.termOfUseBannerDismBtnLabel)||(null==e||null===(s=e.localizedStrings)||void 0===s?void 0:s.termOfUseBannerDismBtnLabel)||"Dismiss"},engageContentAction:{label:(null==e||null===(c=e.termOfUseBannerConfig)||void 0===c?void 0:c.termOfUseBannerEngageBtnLabel)||(null==e||null===(d=e.localizedStrings)||void 0===d?void 0:d.termOfUseBannerEngageBtnLabel)||"Learn more",actionDelegate:()=>{window.open("https://go.microsoft.com/fwlink/?LinkID=2092201","_blank")}}}},v=u?In:Pn,y=[(0,nn.H)(Xt.p.Viewed,v),(0,rn.l)(Xt.p.Dismissed,1),(0,rn.l)(Xt.p.Closed,1),(0,rn.l)(Xt.p.Engaged,1)];null===(l=(0,an.$0)())||void 0===l||l.sendInternalPlacement(f,y)}(i),(i.enableNewYearThemeCoachMark||i.enableNewYearThemeCoachMarkV2)&&await new Promise((e=>{window.chrome&&window.chrome.edgeMarketingPagePrivate&&window.chrome.edgeMarketingPagePrivate.showFeatures&&window.chrome.edgeMarketingPagePrivate.showFeatures("open_hub_app_store_theme_dry_run",(t=>{e("SUCCESS"===t)}))}))&&function(e,t){var n;const i=e.localizedStrings,r={id:on.gz.NewYearThemeStore,group:Yt.V.Functional,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.Coachmark,size:on.dm.Large,position:on.pY.BottomEnd},contentModel:{title:i.lunarNewYearCoachMarkTitle,description:i.lunarNewYearCoachMarkContent,contentType:tn.J.CallToAction,contentImage:{url:`${g.jG.StaticsUrl}/latest/lunar-new-year/LunarNewYear.png`,altText:"Lunar New Year "},dismissContentAction:{label:i.lunarNewYearCoachMarkCancel},engageContentAction:{label:i.lunarNewYearCoachMarkConfirm,actionDelegate:()=>{window.chrome.edgeMarketingPagePrivate.showFeatures("open_hub_app_store_theme")}}}};t&&(r.surfaceModel.position={coachmarkAnchor:t,anchoringPosition:on.RC.Above,hasPointer:!1});const o=[(0,nn.H)(Xt.p.Viewed,sn),(0,rn.l)(Xt.p.Viewed,cn)];null===(n=(0,an.$0)())||void 0===n||n.sendInternalPlacement(r,o)}(i,s);const h=function(){try{var e,t;const n=fn.k.getWpoTreatmentsWithType(mn._h.pinProngCoachMark),i=(null==n?void 0:n.length)>0&&(null===(e=n[0])||void 0===e||null===(t=e.properties)||void 0===t?void 0:t.showCoachMark);if(i)return{showCoachMark:i}}catch(e){const t="Error in getting pin prong promotion data";(0,fe.H)(pe.Od5,t,`error:${e}`)}return null}();if(h&&(null!=h&&h.showCoachMark?(le.M0.addOrUpdateTmplProperty("coachmarkToPinProng1","1"),i.enableCoachMarkToPinProng&&await async function(){var e,t,n;const i=null===(e=window)||void 0===e?void 0:e.navigator;if(!i)return!1;const r=null===(t=window)||void 0===t||null===(n=t.screen)||void 0===n?void 0:n.availWidth;if(!r||r<1024)return!1;const o=await i.userAgentData.getHighEntropyValues(["platformVersion"]);if("Windows"!==(null==o?void 0:o.platformVersion))return!1;const a=parseInt(o.platformVersion.split(".")[0]);return a>0&&a<13}()&&function(e,t){var n;const i=e.localizedStrings,r=e.onlyEnableCoachmarkHeading?null==i?void 0:i.pinProng1BannerDescription1:null==i?void 0:i.pinProng1CoachmarkHeadingText,o=e.onlyEnableCoachmarkHeading?" ":null==i?void 0:i.pinProng1CoachmarkBodyText,a={id:on.gz.PinProng1Flyout,group:Yt.V.Functional,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.Coachmark,size:on.dm.Large,position:on.pY.BottomEnd},contentModel:{title:(null==e?void 0:e.pinProng1CoachmarkHeadingText)||r||"Open Windows News and Interests to see your weather, sports, finance, and so much more!",description:(null==e?void 0:e.pinProng1CoachmarkBodyText)||o||" ",contentType:tn.J.CallToAction,contentImage:{url:`${g.jG.StaticsUrl}/latest/windowsShell/images/pin-over-v2.png`,altText:"Image Alt Text"},dismissContentAction:{label:(null==e?void 0:e.pinProngCloseBtnLabel)||(null==i?void 0:i.pinProngCloseBtnLabel)||"No thanks"},engageContentAction:{label:(null==e?void 0:e.pinProngEngageBtnLabel)||(null==i?void 0:i.pinProngEngageBtnLabel)||"Try it now",actionDelegate:()=>{window.open(t,"_self")}}}},s=[(0,nn.H)(Xt.p.Viewed,dn),(0,rn.l)(Xt.p.Viewed,ln),(0,rn.l)(Xt.p.Dismissed,1),(0,rn.l)(Xt.p.Closed,1),(0,rn.l)(Xt.p.Engaged,1)];null===(n=(0,an.$0)())||void 0===n||n.sendInternalPlacement(a,s)}(i,"ms-newsandinterests:?pc=ntp_repin")):le.M0.removeTmplProperty("coachmarkToPinProng1")),null!=i&&null!==(n=i.optInFeedLayoutCMConfig)&&void 0!==n&&n.enabled){const e=yn(i,l);p.push(e)}return a&&await async function(e){var t;const{config:n,isFromWidgetLockScreen:i,onScrollPromise:r,onSocialPromise:a,layoutState:s,pageSettingsDataConnector:c}=e;if(await(0,be.hK)(),await async function(e){var t;let n=!1;const i=new URLSearchParams(window.location.search);null!=i&&i.get("forceLocationCoachmark")&&(n=!0);const r=await(0,qe.h_)(Ve._.weatherHeroExperience);if(!r)return;if(kn=(0,Et.K0)(o.z.WeatherCardData),!kn)return;const a=kn.getCurrentState();if(a&&1==(null==a?void 0:a.locationDetectionSetting))le.M0.addOrUpdateTmplProperty("LockScreenLocationTypeRevIp","1");else if(!n)return;const{title:s,engageContentActionLabel:c,dismissContentActionLabel:d}=e.localizedStrings.LockScreenLocationCoachmark,l={id:on.gz.LockScreenLocationCoachmark,group:Yt.V.Exclude,placementSource:Yt.m.Internal,surfaceModel:{surfaceType:en.U.Coachmark,size:on.dm.Small,position:{coachmarkAnchor:r,anchoringPosition:on.RC.Above,hasPointer:!0,pointerPosition:on.Jt.Adjacent}},contentModel:{title:s||"Did we get your location right?",description:"",contentType:tn.J.CallToAction,engageContentAction:{label:c,actionDelegate:()=>{}},dismissContentAction:{label:d,actionDelegate:()=>{window.dispatchEvent(new CustomEvent("openWeatherHeroLocationEdit"))}}}},u=[(0,rn.l)(Xt.p.Viewed,3),(0,nn.H)(Xt.p.Viewed,3*Tn.y),(0,rn.l)(Xt.p.Dismissed,1),(0,rn.l)(Xt.p.Closed,3),(0,rn.l)(Xt.p.Engaged,1)];null===(t=(0,an.$0)())||void 0===t||t.sendInternalPlacement(l,u)}(n),!n.lockScreenUserJourney)return;const d=await(0,be.y3)();if(!d||!d.length)return;const l=await(null===(t=(0,Jt.Un)())||void 0===t?void 0:t.getInteractions());Promise.any([r,a]).then((()=>{En(on.gz.LockScreenPersonalizeCoachmark,l,d)&&gn(n,i),En(on.gz.NewLayoutReviewCoachmark,l,d)&&pn(n,i,s,c)}))}(e),()=>{p.forEach((e=>{e()}))}}function En(e,t,n,i=[1,3,6]){var r;if(!n||0===n.length)return!1;const o=n.length,a=null==t||null===(r=t[e])||void 0===r?void 0:r.reduce(((e,t)=>t.type===Xt.p.Viewed&&(!e||t.ts>e.ts)?t:e),null),s=null==a?void 0:a.ts;if(!s||o>=i[i.length-1])return!0;let c=0,d=n.length-1,l=-1,u=-1;for(;c<=d;){const e=Math.floor((c+d)/2);n[e].ts<=s?(l=n[e].ts,u=e+1,c=e+1):d=e-1}if(-1===u)return!1;for(const e of i)if(u<e&&e<=o)return!0;return!1}var xn=n(27681),Mn=n(71484);const Ln="localhost.msn.com"===(0,Ze.Td)(),Dn=300;let Rn="";const Fn=`${(0,g.Yq)().AssetsUrl}/statics/icons/Microsoft_16_SVG.ico`,On=`${(0,g.Yq)().AssetsUrl}/statics/icons/favicon_newtabpage.png`,Bn="gaming",Nn=(0,Se.AF)("feedDependencies",(()=>Promise.all([n.e("common-others"),n.e("common-windows-widget-shared"),n.e("common-feed-libs"),n.e("common-cscore"),n.e("common-fast-msft-web-components"),n.e("libs_experiences-telemetry-data-mapper_dist_helpers_TelemetryObjectForBehaviorType_js-libs_fe-fc6773"),n.e("libs_sports-data-service_dist_SportsDataMapper_js"),n.e("nas-highlight-v1"),n.e("libs_feed-layout_dist_card-templates_top-stories-card_TopStoriesCardDataMapper_js-libs_feed-l-1afd74"),n.e("libs_super-feed_dist_feed-manager_FeedManagerWithClientAd_js-node_modules_fluentui_svg-icons_-8f340f"),n.e("feedDependencies")]).then(n.bind(n,12025)))),$n=(0,Se.AF)("feedDependenciesGaming",(()=>Promise.all([n.e("common-others"),n.e("common-windows-widget-shared"),n.e("common-feed-libs"),n.e("common-cscore"),n.e("common-fast-msft-web-components"),n.e("libs_experiences-telemetry-data-mapper_dist_helpers_TelemetryObjectForBehaviorType_js-libs_fe-fc6773"),n.e("libs_sports-data-service_dist_SportsDataMapper_js"),n.e("nas-highlight-v1"),n.e("libs_feed-layout_dist_card-templates_top-stories-card_TopStoriesCardDataMapper_js-libs_feed-l-1afd74"),n.e("libs_super-feed_dist_feed-manager_FeedManagerWithClientAd_js-node_modules_fluentui_svg-icons_-8f340f"),n.e("feedDependenciesGaming")]).then(n.bind(n,52465))));class Un extends Be.l{constructor(){super(...arguments),this.isWeatherOneLinerMapped=!1,this.showWeatherOneLiner=!1,this.showFeedTranslucent=!0,this.showDarkIcon=!1,this.needDarkThemeIcons=!1,this.enableHiddenRecommendedSitesStyles=!1,this.brandZoneShowInRecommendedSites=!1,this.brandZoneSize="large",this.isTtvrFired=!1,this.edgeHeaderTopMarin=10,this.hideComplianceLink=!1,this.isNotificationEnabledByAdmin=!0,this.isShowMSRewardsAllowedByPolicy=!0,this.isShowRewardsAllowedByLocation=!1,this.isAppLauncherAllowedByPolicy=!0,this.onScrollSettablePromise=new U.o,this.onSocialBarReactedSettablePromise=new U.o,this.enableMobileAppUpsell=!1,this.marketToggleCanFit=!0,this.className="",this.disableStickyHeader=!1,this.canaryFlightEnabled=!1,this.holidayEffectsPosition="display: none;",this.displayConditionalBanner=!1,this.isOnPersonalizeOrM365Page=!1,this.nowPivotId="",this.hideQuickLinks=!1,this.hideOneLineTopSites=!1,this.isNewTabPageContentManagedByPolicy=!1,this.hideSearchHistory=!1,this.headerCoreOffset=0,this.stickyHeaderHeight=L.FQ,this.navHeight=L.A$,this.isSearchSticky=!1,this.enableNotificationAnimation=!1,this.searchStickyBreakpoint=0,this.skeletonCardArray=Array(18),this.isImageHiddenAndNotDark=!1,this.copilotMuseumCardIsShown=!1,this.copilotCoachMarkIsShown=!1,this.messages=[],this.hideSearchBox=!1,this.isScrollDownButtonDismissed=!1,this.topSitesQuickLinkEndMarginUsedPadding=0,this.museumCardShown=!1,this.scrollIsPastStyleThreshold=!0,this.brandZoneSizeHeightMapping={large:{[_.K$.c1]:0,[_.K$.c2]:311,[_.K$.c3]:371,[_.K$.c4]:371,[_.K$.c5]:371},medium:{[_.K$.c1]:0,[_.K$.c2]:271,[_.K$.c3]:331,[_.K$.c4]:331,[_.K$.c5]:331},small:{[_.K$.c1]:0,[_.K$.c2]:221,[_.K$.c3]:281,[_.K$.c4]:281,[_.K$.c5]:281}},this.msNtpExpBitmask="",this.multiLineSearchBox=!1,this.showCodexBingWithNonBingDSE=!1,this.headingsOnlyHeightReduction=0,this.overriddenFeedConfig=null,this.overlapState={state:0,feedbackState:0},this.isFeedRendered=!1,this.shouldRenderToastWC=!1,this.telemetryTags={},this.marqueeAdActive=!1,this.marqueeAdOverlayHeight=0,this.marqueeAdHeight=0,this.marqueeAdPlaceholderHeight=0,this.recommendedSitesSelection=e=>{null!=e&&e.detail&&(this.recommendedSitesDisplaySetting=(null==e?void 0:e.detail.key)??this.recommendedSitesDisplaySetting,this.brandZoneShowInRecommendedSites=(null==e?void 0:e.detail.showBrandZone)??this.brandZoneShowInRecommendedSites,this.brandZoneSize=(null==e?void 0:e.detail.brandZoneSize)??this.brandZoneSize,this.refreshHeaderHeight(),this.updateHeaderGrid(),this.calculateTopAndBackgroundStickyBreakpoints())},this.checkThemeColorIcons=()=>{if(this.needDarkThemeIcons=!1,!(0,st.N)()){var e;const t=null===(e=m.Al.EdgeNTPHeader)||void 0===e?void 0:e.backgroundImage;return void(t&&"Theme"==t.provider&&t.imageUrl&&"#"==t.imageUrl.charAt(0)&&(this.needDarkThemeIcons=t.darkIcons))}if(this.layoutState.currentBackgroundImageType!=D.HX.theme||!this.layoutState.ntpTheme)return;const t=this.layoutState.configData,n=t&&t.enabledFeatures&&t.enabledFeatures.includes("msAllowThemeInstallationFromChromeStore"),i=this.layoutState.ntpTheme&&this.layoutState.ntpTheme.usingDefaultTheme,r=this.layoutState.ntpTheme&&this.layoutState.ntpTheme.imageUrl;!n||i||r||(this.needDarkThemeIcons=!this.layoutState.ntpTheme.isNtpBackgroundDark)},this.updateDarkIconValue=e=>{e&&(this.showDarkIcon=!(!e.detail||!this.config.enableHolidayBg||(0,H.Y)()))},this.displayQuickLinks=()=>{this.hideQuickLinks=!1,this.topSitesHolder.style.visibility="",this.updateAfterWheelingToDisplayMore()},this.updateFeedLayoutFromDropdown=e=>{var t;const n=e.detail,i=this.layoutState?this.layoutState.currentLayout:D.L_.currentLayout,r=null===(t=this.layoutState)||void 0===t?void 0:t.selectedFeedDisplaySetting;let o=(0,R.j)(n,this.layoutState.currentBackgroundImageType,this.layoutState.greetingEnabled,this.layoutState.hideDefaultTopSites);if(this.backgroundGalleryEligibility&&this.layoutState.currentBackgroundImageType!==D.HX.off&&(o=Mt.p.shouldOverrideLayoutToCustomCache()?D.nP.custom:o),i!==o){var a;let e;if(o!==D.nP.custom){const t=D.Wi[o];e={currentBackgroundImageType:t.current_background_image_type,originalLayout:i,currentLayout:o,greetingEnabled:t.greeting,imageOfTheDayEnabled:t.current_background_image_type!==D.HX.off,quickLinksEnabled:t.quick_links,hideDefaultTopSites:t.hide_promoted_links,selectedFeedDisplaySetting:n}}else e={...this.layoutState,originalLayout:i,currentLayout:o,selectedFeedDisplaySetting:n};null===(a=this.pageSettingsDataConnector)||void 0===a||a.updateLayout(e)}else{var s;null===(s=this.pageSettingsDataConnector)||void 0===s||s.updateFeeds(n,r)}},this.updateAfterWheelingToDisplayMore=()=>{this.calculateStickyBreakpoints(),this.hideSearchHistory=!1,this.updateHeaderCoreBelowSearchData(),this.refreshHeaderHeight(),window.removeEventListener("wheel",this.quickLinksToggle)},this.quickLinksToggle=e=>{if("always"!==this.layoutState.selectedFeedDisplaySetting)return;const{selectedQuickLinksDisplaySetting:t}=this.layoutState;if(![D.Z3.onerow,D.Z3.tworows,D.Z3.top].includes(t))return;0===(document.documentElement?document.documentElement:document.body).scrollTop&&e.deltaY<0&&this.hideQuickLinks&&this.displayQuickLinks()},this.controlNewTabSettings=()=>{var e,t;Rn=document.title;const n=null===(e=(t=document).querySelector)||void 0===e?void 0:e.call(t,'head link[rel="icon"]');if(n)n.href=On;else{const e=document.createElement("link");e.rel="icon",e.href=On,e.type="image/png",document.head.appendChild(e)}},this.changeNewTabSettings=e=>{var t,n;document.title=e?"Microsoft Start":Rn;const i=null===(t=(n=document).querySelector)||void 0===t?void 0:t.call(n,'head link[rel="icon"]');i&&(i.href=e?Fn:On)},this.dismissNotificationMiniCard=(e="manual")=>{Ot.u.dismissNotificationMiniCard(e)},this.areNavTopSitesOverlapping=(0,_e.Z)((()=>{if("hidden"===document.visibilityState||!this.nav||!this.topSitesHolder||"hidden"===this.topSitesHolder.style.visibility||!this.topSitesHolder.children.length||"1"!==this.topSitesHolder.style.opacity&&""!==this.topSitesHolder.style.opacity)return;if(this.topSitesHolder.children[0]&&0===this.topSitesHolder.children[0].offsetHeight)return;const e=this.nav.getBoundingClientRect(),t=this.topSitesHolder.getBoundingClientRect();this.checkAndLogRectsOverlapping(e,t)}),500),this.initFeedDependencies=e=>{this.getFeedDependencyPromise=e===Bn?$n().then((({FeedManagerWithClientAd:e,GamingLayoutTemplateMap:t})=>{const n=t,i=new e({disablePreloadLikelyExperiences:this.layoutState.currentLayout!==D.nP.informational});return this.msNtpExpBitmask&&(i.edgExpMask=this.msNtpExpBitmask),{feedManager:i,layoutTemplateMap:n}})):Nn().then((({FeedManagerWithClientAd:e,AnaheimLayoutTemplateMap:t,AnaheimWaterfallLayoutTemplateMap:n,AnaheimWaterfallLayoutTemplateFallbackMap:i})=>{const r=this.config.enableFeed3Cards?{...n,...t}:{...t,...i},o=new e({disablePreloadLikelyExperiences:this.layoutState.currentLayout!==D.nP.informational});return(0,st.N)()&&this.config.enableChannelFiltering&&Ut.yg.setFeedManager(o),this.msNtpExpBitmask&&(o.edgExpMask=this.msNtpExpBitmask),{feedManager:o,layoutTemplateMap:r}})),this.getFeedDependencyPromise.catch((t=>{const n={...pe.dp6.pb,stack:t.stack};(0,Wt.Y)(pe.dp6.id),le.M0.sendAppErrorEvent({...pe.dp6,message:`Failed to load feedDependencies bundle for ${e}. ${t.message||""}`,pb:n})}))},this._scrollToShowFeed=async(e=!1)=>{const t=(0,$e.Nu)(K);var n,i;t&&(window.scrollTo({top:t-8,behavior:"smooth"}),null!==(n=this.config)&&void 0!==n&&null!==(i=n.optInFeedLayoutCMConfig)&&void 0!==i&&i.enabled&&window.dispatchEvent(new CustomEvent(Q,{detail:{withRefresh:e}})));if(e){const{feedManager:e}=await this.getFeedDependencyPromise;e.callRefreshRegionsData({invalidateCache:!0,scrollToTop:!1}),le.M0.sendPageView({page:{name:"IAR",isAutoRefresh:!1}}),window.dispatchEvent(new CustomEvent("RefreshPillResetAbsoluteTimer"))}},this.scrollToShowFeed=()=>{this._scrollToShowFeed()},this.scrollToShowFeedWithRefresh=()=>{this._scrollToShowFeed(!0)},this.changeContentOffToVisible=()=>{const e=(0,Et.K0)(o.z.ChromiumPageSettings);e&&e.updateFeeds("always","off","scrollDownButton")},this.getExperienceConfigInfo=(e,t=e,n="default")=>({instanceId:e,configRef:{experienceType:t,instanceSrc:n}}),this.copilotShowCard=e=>{this.removeEventListener(),e&&(this.close_CoachMarkTelemetry(),this.onClick_openCopilotButton())},this.setShowWeatherOneLiner=e=>{this.showWeatherOneLiner=e},this.setIsWeatherOneLinerMapped=e=>{this.isWeatherOneLinerMapped=e},this.onClick_openCopilotButton=()=>{this.copilotMuseumCardIsShown=!0,this.copilotMuseumCardIsShown&&window.setTimeout((()=>{this.initEventListener()}),0)},this.close_CopilotCardTelemetry=()=>{this.copilotMuseumCardIsShown&&(this.copilotMuseumCardIsShown=!1,this.removeEventListener())},this.close_CoachMarkTelemetry=()=>{this.copilotCoachMarkIsShown&&(this.copilotCoachMarkIsShown=!1)},this.onClick_pickMessageItem=async e=>{await window.chrome.edgeMarketingPagePrivate.showFeatures(`hub_apps_cd4688a9-e888-48ea-ad81-76193d56b1be?scope=chat&form=f123&prompt=${e}`),this.close_CopilotCardTelemetry(),this.close_CoachMarkTelemetry()},this.onHover_coachMark=()=>{this.close_CoachMarkTelemetry(),this.onClick_openCopilotButton()},this.onClick_coachMark=async()=>{this.close_CoachMarkTelemetry(),this.onClick_openCopilotButton(),await window.chrome.edgeMarketingPagePrivate.showFeatures(`hub_apps_cd4688a9-e888-48ea-ad81-76193d56b1be?scope=chat&form=f123&prompt=${this.messages[0].content}`)},this.initEventListener=()=>{document.addEventListener("click",this.handleDocumentClick)},this.onClick_marqueeAdClose=()=>{this.marqueeAdActive=!1,this.marqueeAd&&this.marqueeAd.optOutUrl&&jt.o.sendBeacons([this.marqueeAd.optOutUrl]),this.backgroundDataConnector&&this.backgroundDataConnector.marqueAdDisplayStatusUpdated(!1)},this.handleDocumentClick=e=>{const t=e.composedPath()[0];this.copilotMuseumCardIsShown&&!this.isClickInsideElement(t)&&this.close_CopilotCardTelemetry()},this.isClickInsideElement=e=>{var t,n;const i=null===(t=this.shadowRoot)||void 0===t||null===(n=t.getElementById)||void 0===n?void 0:n.call(t,"copilotMuseumTemplate");return i&&i.contains(e)},this.removeEventListener=()=>{document.removeEventListener("click",this.handleDocumentClick)},this.topSitesIntersectionObserverCallback=e=>{var t;if(this.topSitesHolder&&(!this.layoutState.quickLinksEnabled||"off"===this.layoutState.selectedQuickLinksDisplaySetting))return this.topSitesHolder.style.opacity="0",void(this.topSitesHolder.style.visibility="hidden");const n=e[e.length-1];let i,r,o;null!==(t=this.config.translucentFeed)&&void 0!==t&&t.enableTranslucentFeed&&this.disableStickyHeader||!(n.intersectionRatio<=.99)||"top"===this.layoutState.selectedQuickLinksDisplaySetting?(i=1,r="",o=""):(i=0,r="none",o="1"),this.topSitesHolder.style.opacity=`${i>1?1:i}`,this.topSitesHolder.style.pointerEvents=r,this.topSitesHolder.style.zIndex=o},this.setupTopSitesIntersectionObserver=()=>{const e={root:null,rootMargin:`${this.hideSearchBox?-44:-117}px 0px 0px 0px`,threshold:[.99]};this.topSitesObserver=new IntersectionObserver(this.topSitesIntersectionObserverCallback,e),this.topSitesObserver.observe(this.topSitesHolder)},this.onResize=()=>{const e=this.showCodexBingWithNonBingDSE;this.checkCodexBingFlagWithNonBingDSE(),e!=this.showCodexBingWithNonBingDSE&&this.updateHeaderGrid(),this.refreshHeaderHeight(),this.refreshImageHeight(),this.calculateStickyBreakpointsDebounced(),this.renderBackgroundGallery&&this.checkGalleryPageFitAndDisplayToast(),this.renderMarketLanguageToggle&&(this.checkMarketToggleFitOnPage()||(this.marketToggleCanFit=!1,this.updateHeaderCoreData())),this.config.enableRiverZoomStamping&&this.setZoomTmpl(),this.overlapStateChange()},this.onScroll=(0,f.k)((()=>{var e;if(this.onScrollSettablePromise.set(),this.marqueeAdActive){var t,n;this.updateHeaderGrid();const e=0===window.scrollY,i=null===(t=this.shadowRoot)||void 0===t||null===(n=t.querySelector)||void 0===n?void 0:n.call(t,"cs-header-core");i&&(e?(i.start.classList.remove("header_hidden"),i.end.classList.remove("header_hidden")):(i.start.classList.add("header_hidden"),i.end.classList.add("header_hidden")))}const i=window.scrollY<100,r=window.scrollY>L.FT;i==this.scrollIsPastStyleThreshold&&r==this.navIsSticky||(this.scrollIsPastStyleThreshold=i,this.navIsSticky=r,this.refreshTranslucentMode());const o=window.scrollY>L.FT-this.recommendedSitesHeight;var a,s,c,d,l;(this.hideOneLineTopSites=this.quickLinksDisplaySetting===D.Z3.top&&window.scrollY>L.FT-L.jb,this.navIsSticky&&le.M0.addOrUpdateTmplProperty("StickyBreakpointTriggered","1"),this.config.translucentFeed&&null!==(e=this.config.translucentFeed)&&void 0!==e&&e.enableTranslucentFeed&&this.layoutState.currentBackgroundImageType!==D.HX.off&&this.layoutState.currentBackgroundImageType!==D.HX.theme)&&(!o||null!==(a=this.config.translucentFeed)&&void 0!==a&&a.disableSticky?(0,v.j3)("backgroundImage","displayed"):(0,v.j3)("backgroundImage","hidden"));if(this.config.complianceHyperlink&&this.updateComplianceLinkStyleOnScroll(),this.config.useNewTabSettings&&this.changeNewTabSettings(this.navIsSticky),this.config.noBckImgOnNavSticky){const e="off"===this.layoutState.currentBackgroundImageType||this.navIsSticky;this.showBackplate=e,(0,v.j3)("backgroundImage",e?"hidden":"displayed")}(this.updateHeaderCoreOffset(),this.isSearchSticky=!this.disableStickyHeader&&!this.config.disableFeed&&("always"===this.layoutState.selectedFeedDisplaySetting||window.scrollY>this.searchStickyBreakpoint),this.config.showCodexBingNudge&&(0!=scrollY?(this.showCodexBingWithNonBingDSE=!1,this.updateHeaderCoreBelowSearchData()):this.checkCodexBingFlagWithNonBingDSE()),this.config.enableHeadingsOnlyCardSlivers&&this.displayBlankRiver&&(this.handleCardSliversOnScroll(),this.stampScrollTmpl()),"headingsonly"===this.layoutState.selectedFeedDisplaySetting&&this.childRefs.scrollDownButton)&&(this.scrollDownButton=null===(s=this.shadowRoot)||void 0===s||null===(c=s.querySelector)||void 0===c||null===(d=c.call(s,".navAndContent"))||void 0===d||null===(l=d.querySelector)||void 0===l?void 0:l.call(d,"#scrollDownButtonContainer"),this.scrollDownButton&&(this.scrollDownButton.style.display=0!=scrollY?"none":"flex"));this.config.showCodexBingIcon&&this.updateHeaderCoreSearchData(),("focused"===this.layoutState.currentLayout||"headingsonly"===this.layoutState.selectedFeedDisplaySetting&&"custom"===this.layoutState.currentLayout&&"off"===this.layoutState.currentBackgroundImageType)&&this.focusFeedBorderScrollFade(),"headingsonly"===this.layoutState.selectedFeedDisplaySetting&&this.config.noHideFeedbackButton&&window.scrollY<=50?this.overlapStateChange():"headingsonly"===this.layoutState.selectedFeedDisplaySetting&&this.config.noHideFeedbackButton&&window.scrollY>50&&(this.overlapState={state:this.overlapState.state,feedbackState:0})})),this.buildFocusBorderStyleClasses=()=>"focused"===this.layoutState.currentLayout||"headingsonly"===this.layoutState.selectedFeedDisplaySetting&&"custom"===this.layoutState.currentLayout&&"off"===this.layoutState.currentBackgroundImageType?"navAndContent_border_shadow "+(0!=window.scrollY?"navAndContent_noshadow":""):"",this.updateComplianceLinkStyleOnScroll=()=>{const e=window.scrollY>0;e!==this.hideComplianceLink&&(this.hideComplianceLink=e,this.hideComplianceLink?this.complianceHyperlink&&this.complianceHyperlink.classList.add("complianceHyperlink_hide"):this.complianceHyperlink&&this.complianceHyperlink.classList.remove("complianceHyperlink_hide"))},this.calculateStickyBreakpointsDebounced=(0,_e.Z)(this.calculateStickyBreakpoints,Dn),this.getCompanyLogoFromLocalStorage=()=>{const e=(0,y.$o)().supported&&(0,y.$o)().getObject("companyLogo",null);if(!e||!e.default_logo)return"";return!this.layoutState.imageOfTheDayEnabled||!e.light_logo?e.default_logo||"":e.light_logo||""},this.onFlyoutEvent=(e,t)=>{var n,i,r,o,a,s,c,d;let l;switch(e){case S.tk.settings:case S.tk.msRewards:case S.tk.notificationBell:case S.tk.signInControl:case S.tk.mobileAppUpsell:l=this.hideSearchBox?this.headerCoreRef:null===(n=this.headerCoreRef)||void 0===n?void 0:n.end;break;case S.tk.search:case S.tk.imageSearch:case S.tk.voiceSearchWC:case S.tk.dailyDiscovery:l=this.hideSearchBox?this.headerCoreRef:null===(i=this.headerCoreRef)||void 0===i?void 0:i.core;break;case S.tk.searchHistoryMoreOptions:case S.tk.newsHeadlineBelowSearchboxMoreOptions:l=this.hideSearchBox?this.headerCoreRef:null===(r=this.headerCoreRef)||void 0===r?void 0:r.belowSearch;break;case S.tk.waffle:case S.tk.editWelcomeGreeting:l=this.hideSearchBox?this.headerCoreRef:null===(o=this.headerCoreRef)||void 0===o?void 0:o.start;break;case S.tk.addTopSite:case S.tk.editTopSite:case S.tk.topSiteOverflowPanel:l=this.topSitesHolder;break;case S.tk.museumCard:this.museumCardShown=t;break;case S.tk.locationMarkerCard:l=null===(a=this.shadowRoot)||void 0===a||null===(s=a.getElementById)||void 0===s?void 0:s.call(a,"locationMarkerHolder");break;case S.tk.recommendedSitesSetting:l=null===(c=this.shadowRoot)||void 0===c||null===(d=c.getElementById)||void 0===d?void 0:d.call(c,"recommendedSites")}if(l&&(l.style.zIndex=t?C.K.Flyout.toString():null),l&&e===S.tk.dailyDiscovery&&!t&&((0,S.YN)(S.tk.search)?l.style.zIndex=C.K.Flyout.toString():l.style.zIndex=null),l&&e===S.tk.settings&&(l.style.zIndex=t?C.K.Flyout.toString():null),e===S.tk.topSiteOverflowPanel&&(l.style.zIndex=t?(C.K.Flyout+1).toString():null),this.quickLinksDisplaySetting===D.Z3.top&&l===this.topSitesHolder&&e!==S.tk.topSiteOverflowPanel&&(l.style.zIndex=(C.K.Flyout+1).toString()),e===S.tk.hamburgerMenu||e===S.tk.navOverflow){var u;if(this.headerCoreRef)null!==(u=this.config)&&void 0!==u&&u.enableTopNav?this.headerCoreRef.style.zIndex=t?(C.K.Flyout+1).toString():(C.K.Nav+2).toString():this.headerCoreRef.style.zIndex=t?"302":(C.K.Nav+2).toString();this.quickLinksDisplaySetting===D.Z3.top&&(this.topSitesHolder.style.zIndex=t?"302":(C.K.Nav+2).toString())}if(e===S.tk.toast&&this.quickLinksDisplaySetting!==D.Z3.top&&(this.topSitesHolder.style.zIndex=t?(C.K.Nav+1).toString():(C.K.Over+3).toString()),e===S.tk.actionMenuOpen){var p,h;const e=null===(p=this.shadowRoot)||void 0===p||null===(h=p.getElementById)||void 0===h?void 0:h.call(p,"g_nav");null!=e&&e.style&&(e.style.zIndex=t?"0":"")}},this.switchListenerCallback=e=>{var t;if(le.M0.addOrUpdateTmplProperty("fl","1"),this.isOnPersonalizeOrM365Page=!1,this.isOnM365Page=!1,this.nowPivotId=(null==e||null===(t=e.newSelection)||void 0===t?void 0:t.pivotId)||"",e&&e.newSelection){const t=e.newSelection;le.M0.addOrUpdateTmplProperty("fl","2"),this.startContentLoad(t.configIndexRef,t.context,void 0,t.pivotId),this.isOnM365Page="productivityhub"===t.pivotId.toLocaleLowerCase(),this.isOnPersonalizeOrM365Page="myInterests"===t.pivotId||this.isOnM365Page||"navigationPage"===t.pivotId}if(this.canShowTopNav){if(e.oldSelection&&!this.isAlwaysMode){var n;if(!this.pageSettingsDataConnector)return;if(this.nowPivotId===e.oldSelection.pivotId||void 0===(null===(n=e.newSelection)||void 0===n?void 0:n.context))return;const t={...this.layoutState,originalLayout:this.layoutState.currentLayout,currentLayout:D.nP.custom,selectedFeedDisplaySetting:"always"};this.pageSettingsDataConnector.updateStateOnce(t)}}else e.oldSelection&&!this.transitionFromContentOff&&this.scrollToShowFeed();this.transitionFromContentOff=!1},this.handleColumnArrangementChange=e=>{if(this.columnArrangement=e,this.enableOneColumn=this.config.enableOneColumn&&"c1"===this.columnArrangement,le.M0.addOrUpdateTmplProperty("pageColumn",this.columnArrangement),this.config.enableMarqueeAd&&this.updateMarqueeAdHeightByColumn(e),this.updateHeaderGrid(),(0,st.N)()){var t,n;(null===(t=this.shadowRoot)||void 0===t||null===(n=t.querySelector)||void 0===n?void 0:n.call(t,"background-image")).recommendedSitesHeight=this.recommendedSitesHeight}le.M0.updatePageMetadata({page:{viewType:(0,W.vi)()}},!0),this.config.companyLogo&&(this.showCompanyLogo=!("c1"===this.columnArrangement||"c2"===this.columnArrangement)),this.refreshHeaderHeight(),this.updateHeaderCoreData()},this.onHeaderSpaceHolderTransitionEnd=()=>{gt.I.headerTransitionEnd.getActionSender(this.pageSettingsDataConnector).send()},this.onMarketValueChange=async e=>{var t;(this.pageSettingsDataConnector||(this.pageSettingsDataConnector=(0,Et.K0)(o.z.ChromiumPageSettings)),e&&this.pageSettingsDataConnector)&&(null===(t=O.V.marketUpdated.getActionSender(this.pageSettingsDataConnector))||void 0===t||t.send(e),(0,lt.yV)(2))},this.updateLanguageToggle=()=>{if("language"==g.jG.MarketMismatchDetail.type){const e=this.targetLanguageOnMismatch(a);e&&(this.renderMarketLanguageToggle=!0,this.localeMarket=e,"marketmismatch"===g.jG.LanguageRegionMismatchExplicit?le.M0.addOrUpdateTmplProperty("marketMismatchToggleForExplicitMismatch","1"):"marketmismatch"===g.jG.LanguageRegionMismatch&&le.M0.addOrUpdateTmplProperty("marketMismatchForToggle","1"))}},this.setOverriddenFeedConfig=e=>{this.overriddenFeedConfig={...e}},this.saveViewportInPref=()=>{if((0,st.N)()){const{innerWidth:e,innerHeight:t}=window;Ce.U.savePreferenceSetting(we.Xm.viewport,{width:e,height:t},!1)}},this.focusControlOnWheel=e=>{this.blurGridViewWhenActive(e.target)},this.focusControlOnScrollKeyUp=e=>{"PageDown"!=e.key&&"PageUp"!=e.key||this.blurGridViewWhenActive(e.target)},this.handleSocialBarReaction=e=>{const{id:t,reactionType:n}=e.detail;t&&n&&[de.FE.upvote,de.FE.downvote].includes(n)&&this.onSocialBarReactedSettablePromise.set()},this.updateMarqueeAdHeightByColumn=e=>{const{selectedQuickLinksDisplaySetting:t}=this.layoutState;if(this.config.enableMarqueeAdV3)switch(e){case _.K$.c1:case _.K$.c2:this.marqueeAdHeight=ae[t].Small,this.marqueeAdPlaceholderHeight=se[t].Small;break;case _.K$.c3:this.marqueeAdHeight=ae[t].Medium,this.marqueeAdPlaceholderHeight=se[t].Medium;break;case _.K$.c4:case _.K$.c5:this.marqueeAdHeight=ae[t].Large,this.marqueeAdPlaceholderHeight=se[t].Large}else e===_.K$.c1||e===_.K$.c2?this.marqueeAdHeight=oe:this.marqueeAdHeight=re},this.overlapStateChange=(0,_e.Z)((async()=>{if(!(0,st.N)()||!this.navAndContentFeedRef)return void(this.overlapState={state:0,feedbackState:0});const e=((0,w.Nd)((new w.fH).data.innerWidth,"innerWidth")-this.navAndContentFeedRef.getBoundingClientRect().width)/2,t=await(0,qe.h_)(Ve._.floatButtonGroupWC);let n,i,r=t?t.getBoundingClientRect().width+12:42;r=this.config.noHideFeedbackButton?108:r,i=e>=r?0:e<=0?2:1,n=e>=42?0:e<=0?2:1,this.overlapState={state:n,feedbackState:i}}),10),this.scrollToHideSearchBox=()=>{this.config.scrollToHideSearchBox&&this.layoutState.hideSearchBox&&"always"===this.layoutState.selectedFeedDisplaySetting&&(this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.tworows||this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.onerow)&&window.scrollTo({top:46+this.edgeHeaderTopMarin})},this.lowEndDeviceHandler=e=>{var t;this.isLowEndDevice=(null==e||null===(t=e.detail)||void 0===t?void 0:t.isLowEndDevice)??!1},this.setMarqueeV3ExtraClassName=e=>{switch(e){case _.K$.c1:case _.K$.c2:this.marqueeAdExtraClass="marqueeAdSmallV3";break;case _.K$.c3:this.marqueeAdExtraClass="marqueeAdMediumV3";break;case _.K$.c4:case _.K$.c5:this.marqueeAdExtraClass="marqueeAdLargeV3"}},this.updateQSParam=(e,t)=>{const n=new RegExp("([?&])"+t+"=.*?(&|$)","i");return e.match(n)?e.replace(n,"&"):e}}get canShowTopNav(){return this.config&&this.config.enableTopNav&&this.layoutState&&"off"!==this.layoutState.selectedFeedDisplaySetting&&!this.config.disableFeed}get isTopSitesMovedUp(){return this.hideSearchBox&&this.isAlwaysMode&&this.quickLinksDisplaySetting!==D.Z3.off&&this.quickLinksDisplaySetting!==D.Z3.top}get topBannerOffsetHeight(){if(!this.displayConditionalBanner)return 0;return this.quickLinksDisplaySetting===D.Z3.top&&!this.hideOneLineTopSites?48:46}get topSitesOffsetHeight(){return this.quickLinksDisplaySetting===D.Z3.top&&!this.hideOneLineTopSites?L.jb:0}get responsiveSupported(){return this.config.enableResponsiveFeed&&"myFeed"===this.getSelectedPivot(this.layoutState)}get topSitesHeightBelowSearchBoxForPeekMode(){const{selectedQuickLinksDisplaySetting:e}=this.layoutState,t=e==D.Z3.tworows;return e==D.Z3.off||e==D.Z3.top?0:this.columnArrangement>=_.K$.c3&&!t?90:174}get recommendedSitesHeight(){if(!this.childRefs.recommendedSites||this.recommendedSitesDisplaySetting===D.yR.off)return 0;if(this.config.enableBrandZoneInRecommendedSites&&this.brandZoneShowInRecommendedSites&&"c1"!==this.columnArrangement&&this.brandZoneSize&&this.columnArrangement&&this.brandZoneSizeHeightMapping[this.brandZoneSize][this.columnArrangement])return this.brandZoneSizeHeightMapping[this.brandZoneSize][this.columnArrangement];const e=this.config.enableBrandZoneInRecommendedSites?21:0;switch(this.recommendedSitesDisplaySetting){case D.yR.onerow:return 52+e;case D.yR.tworows:return 88+e;case D.yR.threerows:return 124+e;default:return 0}}get isFromWidgetLockScreen(){return(0,Ze.zp)().includes("ocid=widgetonlockscreen")}get isWeatherHeroExperience(){var e;return this.isFromWidgetLockScreen&&(null===(e=(0,Ze.zp)())||void 0===e?void 0:e.toLowerCase().includes("segment=weather"))}async experienceConnected(){var e,t,n,i,r,a,u,p,h,f,w;if(this.messages=[{content:"What's happening in the news?",onClickHandlerMessage:this.onClick_pickMessageItem},{content:"Enable dark mode",onClickHandlerMessage:this.onClick_pickMessageItem},{content:"Enable light mode",onClickHandlerMessage:this.onClick_pickMessageItem},{content:"Manage my password",onClickHandlerMessage:this.onClick_pickMessageItem},{content:"Informational mode",onClickHandlerMessage:this.onClick_pickMessageItem},{content:"Inspirational mode",onClickHandlerMessage:this.onClick_pickMessageItem}],this.config.earlyLoadSuperComponentConfig&&await Zt.L.initConfig(),(0,b.L)().get("takeabreak")&&(this.copilotCoachMarkIsShown=!0),null!==(e=this.config)&&void 0!==e&&e.enableTopSitesSubscriptions&&(0,st.N)()){const e=(0,Et.K0)(o.z.ChromiumPageSettings);null==e||e.getPrimaryAccountInfoAsync(!1).then((e=>{const t=e&&!!e.accountType;xn.Zl.fetchFollowedPublishers(Ut.yg,this.config.targetPublisherData,t),xn.Zl.getShouldOverwritePersistentStorage().then((e=>{if(!e)return;const t=xn.Zl.getUserPublisherCampaignData();Ce.U.savePreferenceSetting(Mn.EI,t)}))}))}if((0,st.N)()){const{oneSvcUniTunMode:e}=this.config;e?((0,y.$o)().setItem("oneSvcUniTunMode",e.toString()),kt.Gq.set("oneSvcUniTunMode",e)):((0,y.$o)().removeItem("oneSvcUniTunMode"),kt.Gq.delete("oneSvcUniTunMode"))}if(this.disableStickyHeader=!(null===(t=this.config.translucentFeed)||void 0===t||!t.disableSticky),this.notSupportLayout=this.config.enableNewsHeadlineInInformational?["off"]:["always","off"],this.updateStickyHeaderHeight(),(0,he.hy)(!m.Al.IsPrerender,"Header"),"marketmismatch"===g.jG.LanguageRegionMismatch){"language"==g.jG.MarketMismatchDetail.type&&(0,he.YJ)(s.x.marketLanguageToggleWC)}if(this.config.enableWpoTopSitesConfigOverride){const e=(0,et.R)();e&&(this.config.topSitesCollapsibleControlConfig=e)}if(this.config.enableMarqueeAd&&jt.o.initializeMarqueeAd(),this.config.enableLoaderFlight&&(this.skeletonObserver=new MutationObserver(this.skeletonObserverCallback),this.skeletonObserver.observe(document.documentElement,{attributes:!0,childList:!0,subtree:!0})),Bt.SI.setShouldUsePromiseForEarlyFeed(!!this.config.enableEarlyMainFeedV2),this.childRefs=this.config.childRefs,this.updateHeaderCoreSearchData(),this.pageSettingsDataConnector=(0,Et.K0)(o.z.ChromiumPageSettings),this.topSitesLayoutDataConnector=(0,Et.K0)(o.z.TopSitesLayoutData),(0,st.N)()){this.marketLanguageConsolidation(),this.initializeDevTools();const e=((e=2)=>{let t="/";const n=window.location.pathname.split("/");if(n.length>e&&n[e]){t+=n[1];for(let i=2;i<=e;i++)t+="/"+n[i]}return t})(2);Xe(Ln?"service-worker.js":"./ntp/service-worker.js",this.config.serviceWorker,e,!1,(async()=>{vt.initializePushSubscriptionManager(e)}),be.nz),this.reportPerfMarkers()}if(function(e){if(!e.useEnterpriseCompliance)return;const t=rt._.getInstance().rootReducer.connector(o.z.SharedState),n=it.s.useEnterpriseCompliance.getActionSender(t);n&&n.send(!0)}(this.config),this.config.preloadFeed){const{viewFeedConfig:e}=this.getViewFeedConfigAndPivot();(0,nt.Fg)(e)}this.checkIPLocationForRewardsMedallion(),(0,he.b1)().then((e=>{if(this.isTtvrFired=!0,m.Al.IsPrerender)(0,ut.lr)().then((()=>{const e=(0,ge.Ou)().TTVR+(0,he.TZ)(me.DB);(0,Te.f)(62,m.Al.IsPrerender,!isNaN(e)&&e||performance.now())}));else{var t;const n=null===(t=e.find((e=>"TTVR"===e[0])))||void 0===t?void 0:t[1];(0,Te.f)(62,m.Al.IsPrerender,n)}this.renderMarketLanguageToggle&&(this.checkMarketToggleFitOnPage()||(this.marketToggleCanFit=!1,this.updateHeaderCoreData()),le.M0.addOrUpdateTmplProperty("marketToggleLoaded",this.marketToggleCanFit?"1":"0"))})),(0,S.WW)(this.onFlyoutEvent),this.columnArrangement=(0,W.Bn)().currentColumnArrangement,this.enableOneColumn=this.config.enableOneColumn&&"c1"===this.columnArrangement,le.M0.addOrUpdateTmplProperty("pageColumn",this.columnArrangement),(0,W.Bn)().subscribe(this.handleColumnArrangementChange),Tt.initialize(),this.recommendedSitesDisplaySetting=this.childRefs.recommendedSites&&await(0,tt.P6)({enableRecommendedSitesSelection:!0,enableWpoRecommededSitesConfigOverride:!!this.config.enableWpoRecommededSitesConfigOverride});let A=!1;const E=new U.o;let x=!1;(0,At.Uo)(o.z.ChromiumPageSettings,(async e=>{var t;if(!e.isLoadCompleted)return;E.set();const n=this.layoutState;this.layoutState=e;const i=kt.Gq.get("__hydrationPromise__");var r;(m.Al.CurrentFlightSet.has("prg-usessrlayout")&&(0,st.N)()&&window.isSSREnabled&&window.ssrLayoutState&&!window.isHydrationCompleted&&i&&(this.layoutState=window.ssrLayoutState,i.getResultAsync().then((()=>{(0,At.T3)(o.z.ChromiumPageSettings,e)}))),n||x||null===(t=window.ssrLayoutState)||void 0===t||!t.selectedFeedDisplaySetting||window.ssrLayoutState.selectedFeedDisplaySetting===e.selectedFeedDisplaySetting)||(le.M0.sendAppErrorEvent({...pe.XDw,message:"SSR Layout mismatch CSR Layout",pb:{...pe.XDw.pb,customMessage:`SSR Layout:${null===(r=window.ssrLayoutState)||void 0===r?void 0:r.selectedFeedDisplaySetting}; CSR Layout:${e.selectedFeedDisplaySetting}; edgeHeader: ${JSON.stringify(window.edgeNTPHeader)}`}}),x=!0);"off"===e.selectedFeedDisplaySetting&&(this.isFeedRendered=!1),this.shouldRenderToastWC="off"===e.selectedFeedDisplaySetting||"headingsonly"===e.selectedFeedDisplaySetting&&!this.isFeedRendered,this.isAlwaysMode="always"===e.selectedFeedDisplaySetting,this.config.showCodexBingIcon&&this.updateHeaderCoreSearchData(),!this.isAlwaysMode&&this.hideQuickLinks&&this.displayQuickLinks(),this.quickLinksDisplaySetting=e.selectedQuickLinksDisplaySetting;let a=!1,s=!1,c=!1,d=!1,l=!1;if(n){var u;if(a=n.selectedQuickLinksDisplaySetting!==e.selectedQuickLinksDisplaySetting,s=n.selectedFeedDisplaySetting!==e.selectedFeedDisplaySetting,c=n.imageOfTheDayEnabled!==e.imageOfTheDayEnabled,d=n.currentLayout!==e.currentLayout,l=n.sponsoredContentEnabled!==e.sponsoredContentEnabled,this.transitionFromContentOff=(null===(u=this.config.translucentFeed)||void 0===u?void 0:u.enableTranslucentFeed)&&"off"===n.selectedFeedDisplaySetting&&"off"!==e.selectedFeedDisplaySetting,a){const t=e.selectedQuickLinksDisplaySetting===D.Z3.onerow||e.selectedQuickLinksDisplaySetting===D.Z3.tworows||e.selectedQuickLinksDisplaySetting===D.Z3.top;this.handleTopSitesEnableChange(t,e)}s&&(window.setTimeout((()=>{Tt.handleSettingUpdate(e.selectedFeedDisplaySetting)}),0),this.marqueeAdActive&&"always"!==e.selectedFeedDisplaySetting&&(this.marqueeAdActive=!1,window.setTimeout((()=>{this.backgroundDataConnector&&this.backgroundDataConnector.marqueAdDisplayStatusUpdated(!1)}))),this.config.enableHeadingsOnlyCardSlivers&&(this.displayBlankRiver=!1)),!d||e.currentLayout!=D.nP.informational&&e.currentLayout!=D.nP.inspirational&&e.currentLayout!=D.nP.focused||Mt.p.resetAppliedBackgroundAndToggleStorage(e.currentLayout),d&&le.M0.addOrUpdateTmplProperty("layoutChanged","1"),l&&!e.sponsoredContentEnabled&&(this.marqueeAdActive=!1,window.requestAnimationFrame((()=>{this.backgroundDataConnector&&this.backgroundDataConnector.marqueAdDisplayStatusUpdated(!1)}))),this.config.enableMarqueeAd&&d&&e.currentLayout!==D.nP.informational&&(this.marqueeAdActive=!1,window.requestAnimationFrame((()=>{this.backgroundDataConnector&&this.backgroundDataConnector.marqueAdDisplayStatusUpdated(!1)})))}if(this.multiLineSearchBox=this.config.enableMultiLineSearchBox,this.checkCodexBingFlagWithNonBingDSE(),this.config.hidableSearchBox){const e=this.layoutState.hideSearchBox&&"always"===this.layoutState.selectedFeedDisplaySetting,t=n&&e!==this.hideSearchBox;this.hideSearchBox=e,t&&this.hideSearchBox&&(0,S.YN)(S.tk.settings)&&(this.headerCoreRef.style.zIndex=C.K.Flyout.toString())}if(this.canShowTopNav&&(this.edgeHeaderTopMarin=8),this.updateHeaderGrid(),this.refreshTranslucentMode(),this.refreshHeaderHeight(),this.updateHeaderCoreData(),this.updateHeaderCoreOffset(),this.checkThemeColorIcons(),n&&!s||(this.isSearchSticky=!this.disableStickyHeader&&!this.config.disableFeed&&"always"===this.layoutState.selectedFeedDisplaySetting),(0,st.N)()){if((0,Ue.Vo)(A),A=!0,n){if((a||s||c)&&(this.fireLayoutAnimationComplete(),scrollTo(0,0),await(0,T.rh)(400),this.config.noBckImgOnNavSticky&&0===window.scrollY)){const e="off"===this.layoutState.currentBackgroundImageType;(0,v.j3)("backgroundImage",e?"hidden":"displayed")}await(0,Ne.y)(),this.calculateStickyBreakpoints()}this.config.companyLogo&&this.layoutState.isCompanyLogoEnabledByPolicy&&this.getCompanyLogo(),"headingsonly"===this.layoutState.selectedFeedDisplaySetting&&this.childRefs.scrollDownButton&&(this.isScrollDownButtonDismissed=this.layoutState.isScrollDownButtonDismissed),await(0,Ne.y)(),this.config.useNewTabSettings&&this.changeNewTabSettings(this.navIsSticky),window.setTimeout((()=>this.overlapStateChange()))}}));const M=this.getSelectedPivot(this.layoutState),L=(null===g.jG||void 0===g.jG||null===(n=g.jG.CurrentRequestTargetScope)||void 0===n?void 0:n.audienceMode)===c.F.Enterprise,R=L?"productivityHub"!==M:"following"!==M;this.config.enableHeadingsOnlyCardSlivers&&R&&(this.headingsOnlyHeightReduction=this.config.headingsOnlyHeightReduction||0,(0,st.N)()&&Promise.all([(0,he.b1)(),(0,ut.lr)(),(0,pt.eC)()]).then((()=>{"headingsonly"===this.layoutState.selectedFeedDisplaySetting&&(this.displayBlankRiver=L?"productivityHub"!==M:"gaming"!==M&&"following"!==M)}))),this.hideQuickLinks=(null===(i=this.config)||void 0===i?void 0:i.autoHideQuickLinksInAlways)&&"always"===(null===(r=this.layoutState)||void 0===r?void 0:r.selectedFeedDisplaySetting),this.hideQuickLinks&&window.addEventListener("wheel",this.quickLinksToggle),window.addEventListener("LowEndDeviceBkgd",this.lowEndDeviceHandler),window.addEventListener("trigger-user-journey-coachmark",this.handleSocialBarReaction),await E.getResultAsync(),this.config.enableRiverZoomStamping&&this.setZoomTmpl(),!(0,st.N)()||null!==(a=window.ssrAdData)&&void 0!==a&&a.length||window.isSSREnabled||m.Al.IsPrerender||(0,Lt.j)(k.U,this.layoutState,this.isWaterfallFeed((0,P.$z)())),le.M0.addOrUpdateTmplProperty("csrLayout",null===(u=this.layoutState)||void 0===u?void 0:u.selectedFeedDisplaySetting),le.M0.addOrUpdateTmplProperty("ssrLayout",null===(p=window.ssrLayoutState)||void 0===p?void 0:p.selectedFeedDisplaySetting);const $=await(0,be.aT)((null===(h=this.layoutState.configData)||void 0===h?void 0:h.enabledFeatures)||[]);let _;this.msNtpExpBitmask=(0,be._W)($),$.length&&le.M0.addOrUpdateTmplProperty("edgExpMask",$.join("-")),(0,At.Uo)(o.z.TopSitesLayoutData,(e=>{this.topSitesLayoutState=e,this.checkCodexBingFlagWithNonBingDSE(),this.refreshHeaderHeight(),this.config.enableUnifiedTopSites&&this.updateHeaderGrid(),this.hideSearchHistory=!1,this.updateHeaderCoreBelowSearchData(),(0,Ne.y)().then((()=>this.calculateStickyBreakpoints()))})),window.isSSREnabled&&(_=await ke.L.getPreferenceSetting("tscollapsed"));let V,G,z,j,K="",Q="";if(this.config.enableWpoPromotHistory){const e=await(0,be.H1)();null!=e&&e.promotion&&(K=e.promotion),null!=e&&e.selection&&(Q=e.selection)}if(this.config.enableEventGleam){const e=await(0,be.Zb)(),t=await Mt.p.getCurrentBackgroundMetadata(),n=null==t?void 0:t.provider;V=!!e||"NoBackground"===n,le.M0.addOrUpdateTmplProperty("backgroundImageIsSet",V?"1":"0")}this.config.enableWpoPromotionSignals&&(G=await(0,be.$1)(),j=await(0,be.Qw)(),z=(0,be.Kr)());const Z=e=>"productivityHub"===(0,P.$z)()||"headingsonly"===e.selectedFeedDisplaySetting||"off"===e.selectedFeedDisplaySetting;(0,st.N)()&&this.config.useTreatmentsFromFeedResponse&&Z(this.layoutState)&&!Bt.SI.isOptimizationDataReceived()&&Promise.all([(0,Ge.F_)(),(0,ut.lr)()]).then((()=>{const e=this.config.useTreatmentsFromFeedResponseSuperDp&&this.config.useSuperDataProvider;Z(this.layoutState)&&this.fetchAndStoreWpoTreatments(e,_,K,Q,G,j,z,V)}));const J=(!L||this.config.enableEarlyMainFeedV2)&&(!(0,be.Tr)()&&!this.config.triggerLowMemDhp||this.config.noDisablePrerenderFeed)&&!(0,be.ZE)();if(!this.config.enableEarlyMainFeedRequest||this.config.enableEarlyFeedSSR||null!==m.Al&&void 0!==m.Al&&m.Al.IsPrerender&&!J||this.fetchAndStoreMainFeed(this.config.useSuperDataProvider,K,Q,G,j,z,V),(0,st.N)()){if(window.addEventListener("resize",this.saveViewportInPref),window.addEventListener("beforeunload",this.saveViewportInPref),"gaming"===(0,P.$z)()&&g.jG.CurrentRequestTargetScope.audienceMode!==c.F.Enterprise){const e=ne[g.jG.CurrentMarket];if(e&&!(0,y.$o)().getItem(d.d.VideoGameInterestFollowed)){const t="Video Games";(0,Et.K0)(o.z.TopicData).followTopic(e,t).then((e=>{e&&(0,y.$o)().setItem(d.d.VideoGameInterestFollowed,"true")}))}}this.attachListenerForKeyDownScrollOnFocus(),(0,y.$o)().setItem("LastKnownPV",(new Date).getTime().toString()),Promise.all([(0,Ge.F_)(),(0,ut.lr)()]).then((()=>{if((0,y.$o)().setItem("LastVisuallyReadyMarker",(new Date).getTime().toString()),window.navigator.serviceWorker&&void 0!==window.navigator.serviceWorker.controller)Pe();else{const e={sw:window.navigator.serviceWorker&&void 0!==window.navigator.serviceWorker.controller};(0,y.$o)().setObject("FallbackNavigationResult",e)}}))}if((0,st.N)())(0,At.Uo)(o.z.SignInData,(e=>{void 0!==e.isUserSignedIn&&(this.renderSignInControls=!e.isUserSignedIn,this.updateHeaderCoreData())}));else{var X;const e=(0,Et.K0)(o.z.SharedState);this.renderSignInControls=(null==e||null===(X=e.getCurrentState())||void 0===X?void 0:X.signedIn)===l.Hy.NotSignedIn}!this.childRefs.backgroundGallery||this.config.disableBackgroundGallery||g.jG.IsFrePage||(this.backgroundGalleryEligibility=!0,this.backgroundDataConnector=(0,Et.K0)(o.z.BackgroundData),this.backgroundDataConnector&&await Mt.p.initState(xt.f.backgroundDataStateLoaded.getActionSender(this.backgroundDataConnector)),(0,At.Uo)(o.z.BackgroundData,(e=>{this.renderBackgroundGallery=e.backgroundGalleryDisplayed}))),this.isNewTabPageContentManagedByPolicy=this.layoutState.isContentFeedManagedByPolicy,this.isAppLauncherAllowedByPolicy=!1!==this.layoutState.isAppLauncherEnabledByPolicy;let Y=this.layoutState&&this.layoutState.configData;const ee=(0,Et.K0)(o.z.ChromiumPageSettings);if(ee){var te,ie;const e=await ee.getConfigDataAsync();if(void 0===Y&&(Y=await ee.getConfigDataAsync()),(0,st.N)()){var re;if((null==e||null===(re=e.enabledFeatures)||void 0===re?void 0:re.includes("msUndersideAutoOpenForMsnTopQuestion"))?((0,y.$o)().setItem("enableUndersideAutoOpenFromEdge","true"),le.M0.addOrUpdateTmplProperty("enableUndersideAutoOpenFromEdge","1")):(0,y.$o)().setItem("enableUndersideAutoOpenFromEdge","false"),this.config.enableUserTopics){const e=(await(0,B.O3)()).toString();(0,y.$o)().setItem("userTopics",e),Ce.U.savePreferenceSetting("userTopics",e)}}const t=null==e||null===(te=e.enabledFeatures)||void 0===te?void 0:te.includes("msNtpExp1"),n=null==e||null===(ie=e.enabledFeatures)||void 0===ie?void 0:ie.includes("msNtpExp2");t?(le.M0.addOrUpdateTmplProperty("TopSitesDedupeFeatureActive","1"),le.M0.addOrUpdateTmplProperty("TopSitesDedupeTreatmentActive","1")):n&&(le.M0.addOrUpdateTmplProperty("TopSitesDedupeFeatureActive","1"),le.M0.addOrUpdateTmplProperty("TopSitesDedupeControlActive","1")),le.M0.addOrUpdateTmplProperty("headingsOnlyNoBackground",String("headingsonly"===this.layoutState.selectedFeedDisplaySetting&&"custom"===this.layoutState.currentLayout&&"off"===this.layoutState.currentBackgroundImageType))}if(this.isShowMSRewardsAllowedByPolicy=void 0===(null===(f=Y)||void 0===f?void 0:f.isShowMicrosoftRewardsEnabled)||Y.isShowMicrosoftRewardsEnabled,this.config.enableSignInControl&&(0,st.N)()&&this.checkSignInStatusAndSetup(Y),(0,he.b1)().then((async()=>{var e,t;(0,st.N)()&&(this.nurturingCleanUp=await An({config:this.config,isSignedOutPromise:this.checkIsSignedOut(),isFromWidgetLockScreen:this.isFromWidgetLockScreen,newYearV2Anchor:this.config.enableNewYearThemeCoachMarkV2&&(null===(e=this.shadowRoot)||void 0===e||null===(t=e.getElementById)||void 0===t?void 0:t.call(e,"g_nav")),onScrollPromise:this.onScrollSettablePromise.getResultAsync(),onSocialPromise:this.onSocialBarReactedSettablePromise.getResultAsync(),layoutState:this.layoutState,pageSettingsDataConnector:this.pageSettingsDataConnector}))})),this.config.enableMarqueeAd){const e=await jt.o.getMarqueeAdEligibilityAsync(),t=this.config.enableMarqueeAdV3;var oe,ae,se,ce,de,fe;if(e)this.marqueeAdActive=!0,t&&(this.setMarqueeV3ExtraClassName((0,W.Bn)().currentColumnArrangement),this.marqueeAd=jt.o.getMarqueeAd(),this.isSearchSticky=!this.disableStickyHeader),this.backgroundDataConnector&&this.backgroundDataConnector.marqueAdDisplayStatusUpdated(!0),this.updateMarqueeAdHeightByColumn(this.columnArrangement),this.refreshHeaderHeight(),this.updateHeaderGrid(),t&&(this.calculateStickyBreakpoints(),this.refreshTranslucentMode(),(0,W.Bn)().subscribe((e=>{this.setMarqueeV3ExtraClassName(e)}))),(0,pt.eC)().then((()=>{const e=jt.o.getMarqueeAd();le.M0.addOrUpdateTmplProperty(e.isUpdated?"MarqueeAdUpdate":"MarqueeAdVisible","1"),jt.o.sendBeacons(e.adServedUrls),jt.o.sendVerificationToIas()})),this.telemetryTags.marqueeAdDismissButton=this.telemetryObject.addOrUpdateChild({name:"MarqueeAdDismissButton",behavior:ue.wu.Hide,content:{headline:null===(oe=this.marqueeAd)||void 0===oe?void 0:oe.title,id:null===(ae=this.marqueeAd)||void 0===ae?void 0:ae.clickThroughUrl}}).getMetadataTag(),this.telemetryTags.marqueeAdCTAButton=this.telemetryObject.addOrUpdateChild({name:"MarqueeAdCTAButton",type:ue.c9.Interaction,behavior:ue.wu.Navigate,content:{headline:null===(se=this.marqueeAd)||void 0===se?void 0:se.ctaText,id:null===(ce=this.marqueeAd)||void 0===ce?void 0:ce.clickThroughUrl}}).getMetadataTag(),this.telemetryTags.marqueeAdSponsorLogo=this.telemetryObject.addOrUpdateChild({name:"MarqueeAdSponsorLogo",type:ue.c9.Interaction,behavior:ue.wu.Navigate,content:{headline:null===(de=this.marqueeAd)||void 0===de?void 0:de.providerName,id:null===(fe=this.marqueeAd)||void 0===fe?void 0:fe.clickThroughUrl}}).getMetadataTag();xt.f.updateMarqueeAdDisplayStatus.registerObserver((e=>{const t=e&&e.params;t&&t.length>0&&(this.marqueeAdActive=e.params[0]),this.refreshHeaderHeight(),this.updateHeaderGrid()}))}this.checkAndEnableMobileUpsell(),this.focusRedirectEnabled=Y&&Y.inPageSearchBoxType===N.HT.redirect,O.V.updateConfigDataChanged.registerObserver((e=>{const t=e&&e.params;if(!t||t.length<1)return;t[0]===N.HT.redirect!==this.focusRedirectEnabled&&(0,q.Z)()}));const ve=this.showCodexBingWithNonBingDSE;this.checkCodexBingFlagWithNonBingDSE(),ve!==this.showCodexBingWithNonBingDSE&&(this.updateHeaderGrid(),this.refreshHeaderHeight()),this.multiLineSearchBox&&this.focusRedirectEnabled&&"0"===(0,b.L)().get("dsp")&&(this.multiLineSearchBox=!1),Object.keys(this.childRefs).filter((e=>e&&(0,I.oO)(this.childRefs[e])&&this.filterFeedExperiencesToSkip(e))).forEach((e=>(0,nt.Fg)(this.childRefs[e]))),this.config.childRefRenderSuccess&&le.M0.sendAppErrorEvent({...pe._Gp,message:"ChildRef rendered successfully"}),F.J.updateLayout.registerObserver((async e=>{var t,n;null!==(t=this.config)&&void 0!==t&&null!==(n=t.childRefs)&&void 0!==n&&n.holidayEffects&&this.updateHolidayEffectsPostion();const i=e&&e.params;i&&i.length<1||this.updateFeedLayoutTelemetry()})),this.config.enableHolidayBg&&window.addEventListener("holidayBgChanged",this.updateDarkIconValue),this.childRefs.recommendedSites&&window.addEventListener("recommendedSitesSelection",this.recommendedSitesSelection),this.config.enableFeedDropdown&&window.addEventListener("feedDropdownChange",this.updateFeedLayoutFromDropdown),this.pageSettingsDataConnector&&this.pageSettingsDataConnector.getLayoutStateAsync().then((e=>this.isAlwaysMode="always"===e.selectedFeedDisplaySetting));const ye=(0,Et.K0)(o.z.AdminPortalData),Se=ye&&ye.getCurrentState();if(Se&&Se.settings&&(this.isNotificationEnabledByAdmin=!!Se.settings.isShowCompanyAndIndustry),"marketmismatch"!==g.jG.LanguageRegionMismatch&&"marketmismatch"!==g.jG.LanguageRegionMismatchExplicit||this.updateLanguageToggle(),(0,st.N)()||(await this.initSSRContentConfigInfo(),await this.tryLoadFeedModuleBundle()),this.config.enableTopNav&&!this.config.disableFeed&&(0,v.N6)("backgroundImage",(e=>{this.isImageHiddenAndNotDark="hidden"===e&&!(0,H.Y)(),this.updateHeaderCoreData()})),this.updateHeaderCoreData(),this.updateHeaderCoreBelowSearchData(),(0,st.N)()&&this.config.compressionDictionaryEnabled&&document.createElement("link").relList.supports("dictionary")){le.M0.addOrUpdateTmplProperty("sbr","1");const e=performance.getEntriesByType("resource").find((e=>{var t;return"script"===e.initiatorType&&(null===(t=e.name)||void 0===t?void 0:t.includes("/common."))}));e&&e.encodedBodySize&&le.M0.addOrUpdateTmplProperty("sbrc",e.encodedBodySize),Promise.all([(0,ut.lr)(),(0,he.b1)()]).then((()=>(0,be.x5)())).then((e=>e&&le.M0.sendLoadTimeEvent({markers:{size:e.headers.get("content-length"),url:e.url}})))}this.config.childRefRenderSuccess&&(0,st.N)()&&(0,ut.lr)().then((()=>{window.addEventListener("beforeunload",(()=>{const e=(0,ge.Ou)(),{TTVR:t,visualDependenciesConnector:n,IncompleteMarkers:i}=e,r={TTVR:t,visualDependenciesConnector:n,IncompleteMarkers:i,FeedTTVR:e["TTVR.GridViewFeed"],name:"header-debug"};le.M0.sendLoadTimeEvent({markers:r})}),{once:!0})})),this.config.enableKidsModeTmpl&&le.M0.addOrUpdateTmplProperty("kidsModeConfigsActive","true"),le.M0.addOrUpdateTmplProperty("audienceMode",null!==m.Al&&void 0!==m.Al&&null!==(w=m.Al.ClientSettings)&&void 0!==w&&w.audienceMode?m.Al.ClientSettings.audienceMode:"undefined")}disconnectedCallback(){var e;super.disconnectedCallback(),(0,S.St)(this.onFlyoutEvent),(0,W.Bn)().unsubscribe(this.handleColumnArrangementChange),this.pivotManager&&(this.pivotManager.removeSwitchListener(yt.D.onPivotSwitch),this.pivotManager.removeSwitchListener(this.switchListenerCallback)),removeEventListener("scroll",this.areNavTopSitesOverlapping),removeEventListener("resize",this.onResize),removeEventListener("scroll",this.onScroll),window.removeEventListener("wheel",this.quickLinksToggle),window.removeEventListener("LowEndDeviceBkgd",this.lowEndDeviceHandler),removeEventListener("recommendedSitesSelection",this.recommendedSitesSelection),window.removeEventListener(Kt.gQ,this.scrollToShowFeed),window.removeEventListener(Kt._t,this.scrollToShowFeedWithRefresh),window.removeEventListener("resize",this.saveViewportInPref),window.removeEventListener("beforeunload",this.saveViewportInPref),window.removeEventListener("keyup",this.focusControlOnScrollKeyUp),window.removeEventListener("wheel",this.focusControlOnWheel),window.removeEventListener("trigger-user-journey-coachmark",this.handleSocialBarReaction),this.onScrollSettablePromise.set(),this.headerSpaceHolder&&this.headerSpaceHolder.removeEventListener("transitionend",this.onHeaderSpaceHolderTransitionEnd),null===(e=this.nurturingCleanUp)||void 0===e||e.call(this),this.config.enableLoaderFlight&&this.skeletonObserver&&this.skeletonObserver.disconnect(),this.config.enableHolidayBg&&window.removeEventListener("holidayBgChanged",this.updateDarkIconValue),this.config.enableFeedDropdown&&window.removeEventListener("feedDropdownChange",this.updateFeedLayoutFromDropdown)}async marketLanguageConsolidation(){var e,t;const n=null===m.Al||void 0===m.Al||null===(e=m.Al.ClientSettings)||void 0===e||null===(t=e.market)||void 0===t?void 0:t.detection;if(!window.navigator.cookieEnabled||!n||"cm"===n.type)return;const i=(0,ce.ej)(Z),r=await ke.L.getPreferenceSetting(Z,!1);if(!i||r&&i===r.value||await ke.L.savePreferenceSetting(Z,{setting:Z,source:"ntp",timestamp:(new Date).getTime(),value:i}),!i&&r&&r.value){const e=JSON.parse(r.value);e.m&&(await this.onMarketValueChange(e.m),le.M0.sendAppErrorEvent({...pe.v7z,message:"Edge Next page refresh due to market cookie missing.",pb:{...pe.v7z.pb,customMessage:`market: ${e.m}`}}))}(0,ut.lr)().then((async()=>{await zt(this.onMarketValueChange,!0,!0),i||r||"true"===m.Al.ClientSettings.static_page||async function(e=!1){var t;const n="sptmarket",i=(0,ce.ej)(n),r=await ke.L.getPreferenceSetting(n,!1);if(le.M0.addOrUpdateTmplProperty("ImplicitMarketRestoredSync","1"),!i)return;const o=m.Al.ClientSettings&&m.Al.ClientSettings.market&&(null===(t=m.Al.ClientSettings.market.detection)||void 0===t?void 0:t.type);r?("implicitExisting"!=o&&"implicitReset"!=o||await ke.L.savePreferenceSetting(n,{setting:n,source:"ntp",timestamp:(new Date).getTime(),value:i}),"implicitNew"==o&&r.value&&(e||((0,ce.sq)(n,void 0,-1),(0,ce.sq)(n,void 0,-1,void 0,"/edge"),(0,ce.sq)(n,r.value,365,g.jG.HostPage.hostName,"/"),(0,fe.H)(pe.y5G,`Edge Next page refresh due to implicit market cookie restored. market: ${r.value}`),(0,q.Z)()))):"implicitExisting"!=o&&"implicitNew"!=o||await ke.L.savePreferenceSetting(n,{setting:n,source:"ntp",timestamp:(new Date).getTime(),value:i})}(this.config.disableImplicitRestore)}))}async beforeHydration(){switch(this.layoutState.selectedFeedDisplaySetting){case"headingsonly":case"onscroll":case"off":break;default:{const{viewFeedConfig:e,selectedPivot:t}=this.getViewFeedConfigAndPivot(),n=t===Bn?{gamingPivotSwitched:!0}:void 0;await this.startContentLoad(e,n,!0,t)}}}async afterHydration(){var e;switch(this.refreshHeaderHeight(),this.headerGrid.style&&(this.headerGrid.style.height=this.headerHeight+"px"),this.headerSpaceHolder.style&&(this.headerSpaceHolder.style.height=this.headerHeight+"px"),this.layoutState.selectedFeedDisplaySetting){case"headingsonly":case"onscroll":case"off":{const e=this.isWaterfallFeed((0,P.$z)())?this.getExperienceConfigInfo("WaterfallViewFeed"):this.getExperienceConfigInfo("GridViewFeed");await this.startContentLoad(e,void 0,!0);break}}if(void 0!==(null===(e=window)||void 0===e?void 0:e.ssrSizes)&&!window.isResized){const e=this.columnArrangement+"",t=new w.fH,n=(0,w.Nd)(t.data.innerWidth,"innerWidth"),i=(0,w.Nd)(t.data.innerHeight,"innerHeight");window.ssrSizes.ssrCol!==e&&le.M0.sendAppErrorEvent({...pe.v8K,message:"SSR - Column count mismatch after hydration.",pb:{...pe.v8K.pb,customMessage:`ssrSizes: {ssrCol: ${window.ssrSizes.ssrCol}, ssrWidth: ${window.ssrSizes.ssrWidth} px, ssrHeight: ${window.ssrSizes.ssrHeight} px},csrSizes: {csrCol: ${e}, csrWidth: ${n} px, csrHeight: ${i} px},breakpoints: ${JSON.stringify((0,W.Bn)().breakpoints)}`}})}}logCriticalException(){const e="Fatal web component experience exception encountered in EdgeChromiumPageWC.",t=new Error(e);(0,Wt.Y)(pe.aFk.id),(0,fe.OO)(t,pe.aFk,e)}skeletonObserverCallback(){if(st.N){var e,t,n,i,r,o,a,s,c,d,l,u,p,h,g;const f=null===(e=document)||void 0===e||null===(t=e.body)||void 0===t||null===(n=t.querySelector)||void 0===n||null===(i=n.call(t,"edge-chromium-page"))||void 0===i?void 0:i.shadowRoot;if(f&&(null!=f&&null!==(r=f.querySelector)&&void 0!==r&&null!==(o=r.call(f,"grid-view-feed"))&&void 0!==o&&null!==(a=o.shadowRoot)&&void 0!==a&&null!==(s=a.querySelector)&&void 0!==s&&null!==(c=s.call(a,"cs-super-container"))&&void 0!==c&&null!==(d=c.shadowRoot)&&void 0!==d&&null!==(l=d.querySelector)&&void 0!==l&&l.call(d,"cs-personalized-feed")||null!=f&&null!==(u=f.querySelector)&&void 0!==u&&null!==(p=u.call(f,"grid-view-feed"))&&void 0!==p&&null!==(h=p.shadowRoot)&&void 0!==h&&null!==(g=h.querySelector)&&void 0!==g&&g.call(h,".heading-group-error"))){var m;const e=null===(m=f.querySelector)||void 0===m?void 0:m.call(f,"#skeleton-loader");e&&e.remove()}}}async initSSRContentConfigInfo(){switch(this.layoutState.selectedFeedDisplaySetting){case"headingsonly":case"onscroll":case"off":return}const{viewFeedConfig:e,selectedPivot:t}=this.getViewFeedConfigAndPivot();this.initFeedDependencies(t),await this.getFeedDependencyPromise,this.contentConfigInfo=e,this.context={},await(0,nt.Fg)(e)}isWaterfallFeed(e){return this.config.enableWaterfallViewFeed&&e&&("myFeed"===e||""===e)}getViewFeedConfigAndPivot(){const e=(0,P.$z)(),t=e===Bn,n=this.getExperienceConfigInfo("GamingGridViewFeed","GridViewFeed","index_GamingGridViewFeed"),i=this.isWaterfallFeed(e)?this.getExperienceConfigInfo("WaterfallViewFeed"):this.getExperienceConfigInfo("GridViewFeed");let r;return r=t?n:i,{viewFeedConfig:r,selectedPivot:e}}async fetchAndStoreWpoTreatments(e=!1,t,n,i,r,o,a,s){var c,d,l;const u=e=>{e&&((0,ge.Ou)()[Bt.C5.Response]=Math.round(performance.now()),Bt.SI.addWpoOptimizationDataToLocalStorage(e.pageContext,g.jG.AppType,g.jG.CurrentRequestTargetScope,!1,this.config.enbWpoPromotionFromPSL,t),Ot.u.storeWpoNotificationPreviewData(e))};(0,ge.Ou)()[Bt.C5.Request]=Math.round(performance.now());const p={isXFeed:!1,ocid:"anaheim-ntp-feeds",timeoutMs:1e3,feedName:(null===(c=le.M0.getPageMetadata())||void 0===c||null===(d=c.contract)||void 0===d||null===(l=d.page)||void 0===l?void 0:l.name)===Bn?Bn:"default",pageScenario:"ntp",pageConfiguration:(0,$t.y)(this.layoutState,!1),requestId:le.M0.getRequestId(),disableContent:!0,shouldUseNewWpoEndpoint:!0,wpoSchema:"byregion",column:this.columnArrangement,anaheimLayoutPromotion:n,anaheimContentSelection:i,inEdgeFeatures:r,revertTimes:o,adminDisabled:a,backgroundImageIsSet:s};if(e){new Dt.X({auctionRidOverride:this.config.auctionRidOverride,initialRequest:{timeoutMs:1e3}}).fetchFromWpoService(p,null).then(u)}else{new Nt.fy({auctionRidOverride:this.config.auctionRidOverride,initialRequest:{timeoutMs:1e3}},!1).fetchFromWpoService(p,!0).then(u)}}isFeedDisabled(){var e;const t=null===(e=this.layoutState)||void 0===e?void 0:e.selectedFeedDisplaySetting;return"headingsonly"===t||"off"===t}async fetchAndStoreMainFeed(e=!1,t,n,i,r,o,a){var c,d,l,u,p,h;const m=(0,P.$z)();if([Bn,"productivityHub","following"].includes(m))return this.isOnM365Page="productivityHub"===m,void(this.isOnPersonalizeOrM365Page=this.isOnM365Page);if(this.isFeedDisabled())return;const f={experienceType:this.isWaterfallFeed(m)?s.x.waterfallViewFeed:s.x.gridViewFeed,instanceSrc:"default"},v=await k.U.getConfig(f);let y=null==v||null===(c=v.properties)||void 0===c||null===(d=c.riverSectionCardProviderConfig)||void 0===d?void 0:d.initialRequest;if(!y)return;var S;this.config.auctionRidOverride&&(y.adRefreshVariant="",y.gdpr=!!window.__tcfapi,y.anaheimPageLayout=this.layoutState.currentLayout,y.verticalName=null===g.jG||void 0===g.jG||null===(S=g.jG.HostPage)||void 0===S?void 0:S.verticalKey);if(y.anaheimLayoutPromotion=t,y.anaheimContentSelection=n,y.inEdgeFeatures=i,y.revertTimes=r,y.adminDisabled=o,y.backgroundImageIsSet=a,this.columnArrangement&&(y.column=this.columnArrangement),this.isFromWidgetLockScreen&&(y.pageOcid=A.c.getQueryParameterByName("ocid",(0,Ze.zp)()),y.segment=A.c.getQueryParameterByName("segment",(0,Ze.zp)()),y.scenario=A.c.getQueryParameterByName("scenario",(0,Ze.zp)()),y.scenario)){const e=this.updateQSParam(window.location.href,"scenario");window.history.replaceState({},"",e)}if(this.isWaterfallFeed(m)){const e={c1:Qt.Kx.C1,c2:Qt.Kx.C2,c3:Qt.Kx.C3,c4:Qt.Kx.C4,c5:Qt.Kx.C5},t=this.config.enableFlatListWaterfallFeed?(0,Rt.Qf)(e[this.columnArrangement],void 0,void 0,2):(0,Rt.Qf)(e[this.columnArrangement]);y={...y,...t}}if(y.pageConfiguration=null===(l=le.M0.getPageMetadata())||void 0===l||null===(u=l.contract)||void 0===u||null===(p=u.page)||void 0===p?void 0:p.config,!y.pageConfiguration&&this.layoutState){const e=await this.getPrimaryAccountInfo();y.pageConfiguration=(0,$t.y)(this.layoutState,(null==e?void 0:e.accountType)===$.l.MSA)}let C;this.msNtpExpBitmask&&(y.edgExpMask=this.msNtpExpBitmask),y.skipRetry=this.config.enableSkipRetry;const w=null==v||null===(h=v.properties)||void 0===h?void 0:h.preloadLikelyExperiences,b=(0,E.x)(w)?void 0:()=>(0,Ft.P)(w,(()=>!!C));Bt.SI.enableEarlyMainFeedRequest=!0;const T=(0,Nt.eW)();if(T)C=T,kt.Gq.set("__isSSRWpoFeedConsumed__",!0);else if(e){const e=new Dt.X({auctionRidOverride:this.config.auctionRidOverride,initialRequest:{timeoutMs:y.timeoutInMs}});C=await e.fetchFromService(y,b)}else{const e=new Nt.fy({auctionRidOverride:this.config.auctionRidOverride,initialRequest:{timeoutMs:y.timeoutInMs}},!1);C=await e.fetchFromWpoService(y,!0,b),C&&(C.responseStatus=e.getResponseStatus())}Bt.SI.storeEarlyWpoFeedData(C),this.isWaterfallFeed(m)&&(0,Rt.s2)(y,C,this.config.enableFlatListWaterfallFeed??!1),(0,st.N)()||Bt.SI.setSSRInitialFeedResponse(C)}async checkSignInStatusAndSetup(e){var t;const n=await this.checkIsSignedOut(),i=void 0!==e.isEdgeSignInAllowed&&e.isEdgeSignInAllowed;let r;r=void 0===e.isEdgeSignInAllowed?"-1":!1===e.isEdgeSignInAllowed?"0":"1",le.M0.addOrUpdateTmplProperty("signInPolicy",r);return n&&(null===(t=this.pageSettingsDataConnector)||void 0===t?void 0:t.checkAuthApiIsAvailable())&&i?(this.renderSignInControls=!0,this.updateHeaderGrid()):this.renderSignInControls=!1,this.updateHeaderCoreData(),n}async checkIsSignedOut(){const e=await this.getPrimaryAccountInfo();return e&&""===e.accountId}async getPrimaryAccountInfo(){var e;return null===(e=this.pageSettingsDataConnector)||void 0===e?void 0:e.getPrimaryAccountInfoAsync(!1)}get shouldShowNotificationMiniCard(){return!(this.config.notificationHeadingsOnly&&!this.isFeedDisabled())&&(this.config.childRefs.notificationMiniCard&&this.wpoNotificationPreviewData&&(this.columnArrangement===_.K$.c4||this.columnArrangement===_.K$.c5)&&this.quickLinksDisplaySetting===D.Z3.onerow&&!Ot.u.notificationMiniCardDismissed)}shadowDomPopulated(){var e,t,n,i,r,o,a,s,c,d,l,u,p,h,g,f,y,S,C,w,b,T;if(this.tryLoadFeedModuleBundle(),!(0,st.N)())return;if((this.config.childRefs.notificationMiniCard&&(this.config.notificationAnimation&&(m.Al.IsPrerender?(0,ut.lr)().then((()=>{this.enableNotificationAnimation=!0})):this.enableNotificationAnimation=!0),Ot.u.subscribe((e=>{this.wpoNotificationPreviewData=e}))),this.markVisuallyReadyRaf(),(0,qe.FY)(Ve._.headerSpaceHolder,null===(e=this.shadowRoot)||void 0===e||null===(t=e.getElementById)||void 0===t?void 0:t.call(e,"headerSpaceHolder")),this.backgroundOuterHolder=null===(n=this.shadowRoot)||void 0===n||null===(i=n.getElementById)||void 0===i?void 0:i.call(n,"bgOuterHolder"),(0,qe.FY)(Ve._.backgroundOuterHolder,this.backgroundOuterHolder),(0,qe.FY)(Ve._.backgroundInnerHolder,null===(r=this.shadowRoot)||void 0===r||null===(o=r.getElementById)||void 0===o?void 0:o.call(r,"bgInnerHolder")),(0,qe.FY)(Ve._.navBar,null===(a=this.shadowRoot)||void 0===a||null===(s=a.getElementById)||void 0===s?void 0:s.call(a,"g_nav")),(0,qe.FY)(Ve._.searchHistory,this.headerCoreRef.belowSearch),(0,qe.FY)(Ve._.headerGrid,null===(c=this.shadowRoot)||void 0===c||null===(d=c.getElementById)||void 0===d?void 0:d.call(c,"headerGrid")),this.topSitesHolder=null===(l=this.shadowRoot)||void 0===l||null===(u=l.getElementById)||void 0===u?void 0:u.call(l,"topSitesHolder"),this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.off?(this.quickLinksDisplaySetting!==D.Z3.top&&(this.topSitesHolder.style.visibility="hidden"),this.hideSearchHistory=!0):this.hideSearchHistory=!1,this.updateHeaderCoreBelowSearchData(),this.enableOneColumn)&&(this.conditionalBanner=null===(b=this.shadowRoot)||void 0===b||null===(T=b.querySelector)||void 0===T?void 0:T.call(b,".conditionalBannerHolder"),this.conditionalBanner)){new IntersectionObserver((e=>{const t=e[e.length-1];this.conditionalBannerShown=t.intersectionRatio>.5}),{root:null,rootMargin:"-10px 0px 0px 0px",threshold:.5}).observe(this.conditionalBanner)}if(this.refreshImageHeight(),this.calculateStickyBreakpoints(),this.setupTopSitesIntersectionObserver(),this.headerGrid=null===(p=this.shadowRoot)||void 0===p||null===(h=p.getElementById)||void 0===h?void 0:h.call(p,"headerGrid"),this.disableStickyHeader&&this.headerGrid){var k,P;const e=null===(k=this.shadowRoot)||void 0===k||null===(P=k.getElementById)||void 0===P?void 0:P.call(k,"translucentFeedSentinel"),t={root:null,rootMargin:-1*this.stickyHeaderHeight+"px 0px 0px",threshold:[.1,1]};new IntersectionObserver((t=>{if(!e||"off"===this.layoutState.selectedFeedDisplaySetting)return;1===t[t.length-1].intersectionRatio||window.innerHeight<this.headerHeight?(this.headerGrid.style.zIndex="1",this.headerGrid.classList.add("headerGrid_visible"),this.headerGrid.classList.remove("headerGrid_hidden"),(0,v.j3)("headerGrid","displayed"),window.setTimeout((()=>{this.headerGrid.style.zIndex=null}),200)):(this.headerGrid.classList.remove("headerGrid_visible"),this.headerGrid.classList.add("headerGrid_hidden"),(0,v.j3)("headerGrid","hidden"))}),t).observe(e)}if(this.nav=null===(g=this.shadowRoot)||void 0===g||null===(f=g.getElementById)||void 0===f?void 0:f.call(g,"g_nav"),window.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onResize),this.headerSpaceHolder.addEventListener("transitionend",this.onHeaderSpaceHolderTransitionEnd),this.initializePivotManager(),(0,qe.FY)(Ve._.complianceHyperlink,null===(y=this.shadowRoot)||void 0===y||null===(S=y.querySelector)||void 0===S?void 0:S.call(y,"#complianceHyperlink")),this.complianceHyperlink=(0,qe.b_)(Ve._.complianceHyperlink),(0,qe.FY)(Ve._.recommendedSites,null===(C=this.shadowRoot)||void 0===C||null===(w=C.querySelector)||void 0===w?void 0:w.call(C,"#recommendedSites")),this.recommendedSites=(0,qe.b_)(Ve._.recommendedSites),this.childRefs.recommendedSites){const e={root:null,rootMargin:-1*this.stickyHeaderHeight+"px 0px 0px",threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,.95,.99,1]};new IntersectionObserver((e=>{e[e.length-1].intersectionRatio>.99?this.recommendedSites.style.visibility="visible":this.recommendedSites.style.visibility="hidden"}),e).observe(this.recommendedSites)}(0,Ge.F_)().then((()=>window.requestAnimationFrame((()=>window.setTimeout((()=>{var e,t,n,i,r,o,a,s,c,d,l;null!==(e=this.config)&&void 0!==e&&null!==(t=e.childRefs)&&void 0!==t&&t.holidayEffects&&this.updateHolidayEffectsPostion(),this.updateTopSitesQuickLinkEndMarginUsedPadding(),(0,qe.FY)(Ve._.personalizeButton,null===(n=this.shadowRoot)||void 0===n||null===(i=n.getElementById)||void 0===i||null===(r=i.call(n,"g_nav"))||void 0===r||null===(o=r.querySelector)||void 0===o||null===(a=o.call(r,"super-nav"))||void 0===a||null===(s=a.shadowRoot)||void 0===s||null===(c=s.querySelector)||void 0===c||null===(d=c.call(s,"cs-super-nav-bar"))||void 0===d||null===(l=d.querySelector)||void 0===l?void 0:l.call(d,".settings-link"))}),10))))),this.controlNewTabSettings(),this.scrollToHideSearchBox(),(0,ut.lr)().then((()=>{this.areNavTopSitesOverlapping(),window.addEventListener("scroll",this.areNavTopSitesOverlapping)})),(0,Ge.F_)().then((()=>{var e,t,n;var i;if(!!(i=null===(e=this.config)||void 0===e?void 0:e.serviceWorker)&&(i.enableEarlyFeedFetch||i.enableEarlyFeedFetchMem||i.enableEarlyFeedFetchMsg||i.enableBaseResponseTeeNoOp)){var r;De();const e=(0,ge.Ou)();(0,Ye.f)(e),Re(null===(r=this.config)||void 0===r?void 0:r.serviceWorker)}else null!==(t=this.config)&&void 0!==t&&null!==(n=t.serviceWorker)&&void 0!==n&&n.enableNavErrorHandler&&De()})),this.config.enableScrollPerfMetrics&&(0,st.N)()&&Promise.all([(0,he.b1)(),(0,he.e3)(),(0,ut.lr)()]).then((()=>{var e,t;return le.M0.initScrollPerformanceTrackers({enableScrollInputTracking:this.config.enableScrollInputTracking&&((null===(e=le.M0.getRequestId())||void 0===e?void 0:e.startsWith("1"))||(null===(t=(0,Ze.zp)())||void 0===t?void 0:t.includes("scrolltest=1"))),enableMissedScrollTracking:this.config.enableMissedScrollTracking,enableSectionScrollTracking:this.config.enableSectionScrollTracking})}));(window&&window.navigator).getBattery().then((e=>{le.M0.addOrUpdateTmplProperty("userOnBatteryPower:",String(!e.charging))})),(0,he.b1)().then((()=>this.overlapStateChange()))}checkAndLogRectsOverlapping(e,t){if(0===e.height||0===e.width||0===t.height||0===t.width)return;!(e.top>t.bottom||e.right<t.left||e.bottom<t.top||e.left>t.right)&&(le.M0.sendAppErrorEvent({...pe.RtG,message:"Nav and top sites are overlapping",pb:{...pe.RtG.pb,customMessage:`{"nav": ${JSON.stringify(e)}, "top sites": ${JSON.stringify(t)}, "selectedQuickLinksDisplaySetting": ${this.layoutState.selectedQuickLinksDisplaySetting}}`}}),removeEventListener("scroll",this.areNavTopSitesOverlapping))}initializePivotManager(){this.pivotManager=(0,Fe.l)(null),this.pivotManager&&(le.M0.addOrUpdateTmplProperty("fl","0"),this.pivotManager.addSwitchListener(yt.D.onPivotSwitch,Oe.I.Telemetry),this.pivotManager.addSwitchListener(this.switchListenerCallback)),window.addEventListener(Kt.gQ,this.scrollToShowFeed),this.config.enableNavRefreshButton&&window.addEventListener(Kt._t,this.scrollToShowFeedWithRefresh)}filterFeedExperiencesToSkip(e){if("devTools"===e&&!this.enableDevTools)return!1;if("msRewards"===e)return this.isShowRewardsAllowedByLocation;if("waterfallViewFeed"===e)return!1;return(0,P.$z)()===Bn||"gamingDiscoverStrip"!==e}async startContentLoad(e,t,n=!1,i){le.M0.addOrUpdateTmplProperty("fl","3");const r=this.isWaterfallFeed(i)?this.getExperienceConfigInfo("WaterfallViewFeed"):e;if(!(0,He.Z)(this.lastPivotSelection,{configInfo:r,context:t})){switch(this.lastPivotSelection={configInfo:r,context:t},this.layoutState.selectedFeedDisplaySetting){case"headingsonly":case"onscroll":case"off":await(0,Ge.Qm)()}if((0,st.N)()&&this.config.enableChannelFiltering){if(null===Ut.yg||void 0===Ut.yg||!Ut.yg.overrideFeedConfig){const{properties:e}=(0,We.Z)(await k.U.getConfig(r.configRef)||{});e&&Ut.yg.setFeedConfigOverrider((t=>this.setOverriddenFeedConfig(t(e))))}this.overriddenFeedConfig=null}n||(le.M0.addOrUpdateTmplProperty("fl","4"),(0,nt.Fg)(r)),this.initFeedDependencies(i),this.contentConfigInfo=r,this.context=t,this.isFeedRendered=!0,(0,ut.lr)().then((()=>{(0,be.w$)("FEED_VISIBLE")}))}}fireLayoutAnimationComplete(){window.setTimeout((()=>{gt.I.layoutAnimationComplete.getActionSender(this.pageSettingsDataConnector).send({height:100})}),0)}async onClick_MarqueeAd(e){window.open(this.marqueeAd.clickThroughUrl,"_blank").focus(),await jt.o.sendBeacons(this.marqueeAd.adClickedUrls)}async onClick_MarqueeAdCTAButton(){await this.onClick_MarqueeAd(this.ref_marqueeAdCTAButton)}async onClick_MarqueeAdSponsorLogo(){await this.onClick_MarqueeAd(this.ref_marqueeAdSponsorLogo)}async reportPerfMarkers(){const e=(0,Et.K0)(o.z.ExperienceTrackerEdgeNextData);if(((0,be.ZE)()||this.config.triggerLowMemDhp)&&await(0,ut.VD)(),await(0,ot.f)({incompleteVisualDependencyCallback:e&&e.getIncompleteVisualDependencies||null,contentViewTimeoutOverride:2e3,timeoutOverride:35e3,onBeforeNotifyCallback:()=>{(0,ve.o)([["TTVR.BingImage",["TTVR.BackgroundImageWC"]],["TTVR.QuickLinks",["TTVR.TopSitesEdgeNextWC"]],["TTVR.Feed",["TTVR"]]]);const e=(0,ge.Ou)();m.Al.IsPrerender||((0,ge.zp)("reload")?e["TTVR.E2E"]=e.TTVR:e.tabStartToNavigationStart&&(e["TTVR.E2E"]=e.TTVR+e.tabStartToNavigationStart))}}),m.Al.IsPrerender){let e=!1;(0,pt.eC)().then((()=>{window.setTimeout((()=>{e||le.M0.sendAppErrorEvent({...pe.aay,message:"Prerender Reveal not completed before timeout"})}),3e3)})),this.checkForMissingSecondaryPerfMarkers(),await(0,ut.lr)(),e=!0}this.addE2ETtvrToSecondaryPageTimings();!async function(e){if(!(0,st.N)())return;e=e||{},m.Al.IsPrerender&&((0,ge.Y9)()[ct.C7]=1);let t=!1;new Promise((n=>{const i=setTimeout((()=>{n(),t=!0,(0,at.If)(r,he.oN.Secondary,e.incompleteVisualDependencyCallback)}),e.timeoutOverride||2e4);async function r(t){i&&clearTimeout(i);const n=!!e.pageLoadEventsAvailableCallback&&!e.pageLoadEventsAvailableCallback();(0,at.ql)(t,e.onBeforeNotifyCallback&&(()=>{e.onBeforeNotifyCallback(t)}),n)}(0,he.e3)().then((e=>{n(),t||r(e)}))}))}({incompleteVisualDependencyCallback:e&&e.getIncompleteVisualDependencies||null,timeoutOverride:35e3})}addE2ETtvrToSecondaryPageTimings(){var e,t,n,i;const r=(0,ge.Ou)(),o=(0,ge.Y9)();if(!r||!o)return;const a=r[me.MV],s=r[`${me.MV}.${u.p.searchBox}`],c=r[me.zJ],d=`${me.MV}.${me.T8}`,l=`${me.MV}.${u.p.searchBox}.${me.T8}`,p=`${me.zJ}.${me.T8}`,h=(e,t,n,i)=>{r[e]=o[e]=t,(0,ye.QP)({name:e,startTime:n,endTime:i})},g=(e,t)=>{r[e]=o[e]=t,(0,ye.zI)({name:e,duration:t})};if((0,ge.zp)("reload"))return h(d,a,0,a),h(l,s,0,s),void h(p,c,0,c);if(null===(e=window)||void 0===e||null===(t=e.chrome)||void 0===t||null===(n=t.embeddedSearch)||void 0===n||null===(i=n.newTabPage)||void 0===i||!i.getTabTimings)return void le.M0.sendAppErrorEvent({...pe.IfP,message:"window.chrome.embeddedSearch.newTabPage.getTabTimings does not exist."});const f=e=>{m.Al.IsPrerender&&(e+=r[me.U4]),a&&g(d,e+a),s&&g(l,e+s),c&&g(p,e+c)},v=r.tabStartToNavigationStart;if(v)f(v);else{const e=Math.round(performance.now());window.chrome.embeddedSearch.newTabPage.getTabTimings(((t,n)=>{if(!t)return void le.M0.sendAppErrorEvent({...pe.tkb,message:"chrome.embeddedSearch.newTabPage.getTabTimings returned false."});if(!n||!n.tabStartToNavigationStart)return void le.M0.sendAppErrorEvent({...pe.OWM,message:"chrome.embeddedSearch.newTabPage.getTabTimings returned invalid timing object."});f(n.tabStartToNavigationStart);const i=Math.round(performance.now()),r=i-e;h(me.OM,r,e,i)}))}}getExperienceType(){return s.x.edgeChromiumPageWC}updateHeaderGrid(){const{selectedFeedDisplaySetting:e,selectedQuickLinksDisplaySetting:t}=this.layoutState,n="always"===e&&!this.config.disableFeed,i=this.layoutState.imageOfTheDayEnabled,r=this.canShowTopNav?this.navHeight:0;let o=46,a=16;this.childRefs.newsHeadlineBelowSearchbox&&this.notSupportLayout&&-1===this.notSupportLayout.indexOf(e)&&(a=32),this.showCodexBingWithNonBingDSE&&(a=n?Y:"headingsonly"===e?J:X),n&&t!==D.Z3.off&&t!==D.Z3.top&&(this.childRefs.newsHeadlineBelowSearchbox&&this.notSupportLayout&&-1===this.notSupportLayout.indexOf(e)?a-=32:a-=16);const s=L.jb+"px",c=this.recommendedSitesHeight,d=this.childRefs.recommendedSites?`${c}px`:"",l=this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.off||this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.top,u=l?"0":"auto",p=this.config.enableUnifiedTopSites&&this.childRefs.recommendedSites&&"0"!==u&&c>0,h=`${(()=>{return this.canShowTopNav&&!this.childRefs.recommendedSites?10:!n||t===D.Z3.off||t===D.Z3.top||this.childRefs.recommendedSites&&this.recommendedSitesDisplaySetting!==D.yR.off?this.childRefs.recommendedSites?this.layoutState.currentBackgroundImageType!==D.HX.off&&this.childRefs.weatherOneLiner&&"off"===this.layoutState.selectedFeedDisplaySetting?80:"headingsonly"===this.layoutState.selectedFeedDisplaySetting&&this.childRefs.scrollDownButton?60:30-(this.config.reduceHeaderHeight||0):30:null!==(e=this.config)&&void 0!==e&&e.enableConsistentRowGap&&this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.tworows?10:6;var e})()}px`;let g=l?"0":"16px";if(n){const e=this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.off,t=this.childRefs.recommendedSites?this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.off:this.layoutState.quickLinksEnabled&&e;let n=this.edgeHeaderTopMarin+this.topBannerOffsetHeight+r;this.enableOneColumn&&(n=32);const i=`${n}px`;g=p?"8px":"0",this.marqueeAdActive&&(this.marqueeAdTopHeight=n+o+a-window.scrollY,this.marqueeAdOverlayHeight=this.headerHeight-this.marqueeAdTopHeight);const s=this.config.enableMarqueeAdV3?` ${this.marqueeAdPlaceholderHeight}px`:"";if(t){var m;const e="auto";let t=16;if(this.hideSearchBox&&this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.top?(o=0,a=0,t=0):this.config.tsBackplateEnabled&&[D.Z3.onerow,D.Z3.tworows].includes(this.layoutState.selectedQuickLinksDisplaySetting)?t=6:null===(m=this.config)||void 0===m||!m.enableConsistentRowGap||this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.tworows||this.childRefs.recommendedSites&&this.recommendedSitesDisplaySetting!==D.yR.off||(t=10),this.marqueeAdActive&&!this.config.enableMarqueeAdV3&&(t+=this.marqueeAdHeight),this.gridRows=`${i} ${o}px ${a}px ${t}px ${e}${s} ${h}`,this.childRefs.recommendedSites&&(this.gridRows=`${i} ${o}px ${a}px ${t}px ${u} ${g} ${d} ${h}`,this.recommendedSitesRow=7),this.searchRow=2,this.topSitesRow=5,this.marqueeAdRow=6,this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.top){const e=this.config.enableUnifiedTopSites?"0":"16px",t=`${L.jb+this.topBannerOffsetHeight}px`;this.marqueeAdActive&&this.config.enableMarqueeAdV3&&(a=15),this.gridRows=`${t} ${i} ${o}px ${a}px${s} ${e} ${h}`,this.childRefs.recommendedSites&&(this.gridRows=`${t} ${i} ${o}px ${a}px ${e} ${d} ${h}`,this.recommendedSitesRow=6),this.searchRow=3,this.marqueeAdRow=5,this.topSitesRow=1}}else this.marqueeAdActive&&this.config.enableMarqueeAdV3&&(a=10),this.gridRows=`${i} ${o}px ${a}px${s} 16px ${h}`,this.childRefs.recommendedSites&&(this.gridRows=`${i} ${o}px ${a}px ${this.marqueeAdPlaceholderHeight}px 16px ${u} ${g} ${d} ${h}`,this.recommendedSitesRow=6),this.searchRow=2,this.marqueeAdRow=4,this.topSitesRow=this.config.enableMarqueeAdV3?5:4;this.logoRow=0}else if(i){let e;var f;if(this.layoutState.selectedQuickLinksDisplaySetting)e=this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.tworows;else e=(null===(f=this.topSitesLayoutState)||void 0===f?void 0:f.maxTiles)>10;this.weatherOneLinerRow=6;const t=this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.onerow||"off"===this.layoutState.selectedQuickLinksDisplaySetting||this.config.disableFeed,n=this.enableOneColumn?"minmax(32px, 15%)":"minmax(78px, 15%)";this.layoutState.configData&&this.layoutState.configData.maxQuickLinks&&this.layoutState.configData.maxQuickLinks>=29&&this.layoutState.configData.enabledFeatures&&this.layoutState.configData.enabledFeatures.includes("msNtpExp1")&&t&&"off"===this.layoutState.selectedFeedDisplaySetting?(this.gridRows=`${n} ${o}px ${a}px 1fr auto 20%`,this.childRefs.recommendedSites&&(this.gridRows=this.recommendedSitesDisplaySetting===D.yR.off?`${n} ${o}px ${a}px 1fr ${u} ${d} 20%`:`${n} ${o}px ${a}px 1fr ${u} ${d} ${h}`,this.recommendedSitesRow=6,this.weatherOneLinerRow=7)):(this.gridRows=e?`${n} ${o}px ${a}px auto 1fr 20%`:`${n} ${o}px ${a}px auto 1fr 12%`,this.childRefs.recommendedSites&&(this.recommendedSitesDisplaySetting===D.yR.off?this.gridRows=e?`${n} ${o}px ${a}px ${u} 1fr ${g} ${d} 20%`:`${n} ${o}px ${a}px ${u} 1fr ${g} ${d} 12%`:this.config.enableRecommendedSitesTop?this.gridRows=`${n} ${o}px ${a}px ${u} 0 ${g} ${d} 1fr`:this.gridRows=`${n} ${o}px ${a}px ${u} 1fr ${g} ${d} ${h}`,this.recommendedSitesRow=7,this.weatherOneLinerRow=8)),this.logoRow=1,this.searchRow=2,this.topSitesRow=4,this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.top&&(this.gridRows=`${s} ${n} ${o}px ${a}px 1fr 12%`,this.childRefs.recommendedSites&&(this.recommendedSitesDisplaySetting===D.yR.off?this.gridRows=`${s} ${n} ${o}px ${a}px 1fr ${d} 12%`:this.config.enableRecommendedSitesTop?this.gridRows=`${s} ${n} ${o}px ${a}px 0 ${d} 1fr`:this.gridRows=`${s} ${n} ${o}px ${a}px 1fr ${d} ${h}`,this.recommendedSitesRow=6),this.logoRow=2,this.searchRow=3,this.topSitesRow=1,this.weatherOneLinerRow=7)}else this.childRefs.recommendedSites&&this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.off||!this.childRefs.recommendedSites&&(this.layoutState.quickLinksEnabled||this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.off)?(this.gridRows=`1fr ${this.enableOneColumn?"minmax(0px, auto)":"auto"} 72px ${o}px ${a}px auto 32px 1fr`,this.weatherOneLinerRow=8,this.childRefs.recommendedSites&&(this.config.enableUnifiedTopSites?this.gridRows=`1fr ${this.enableOneColumn?"minmax(0px, auto)":"auto"} 72px ${o}px ${a}px ${u} 0 0 ${d} 1fr`:this.gridRows=`1fr ${this.enableOneColumn?"minmax(0px, auto)":"auto"} 72px ${o}px ${a}px ${u} 32px ${g} ${d} 1fr`,this.recommendedSitesRow=9,this.weatherOneLinerRow=10),this.logoRow=2,this.searchRow=4,this.topSitesRow=6,this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.top&&(this.gridRows=`${s} 1fr ${this.enableOneColumn?"minmax(0px, auto)":"auto"} 72px ${o}px ${a}px 32px 1fr`,this.logoRow=3,this.searchRow=5,this.topSitesRow=1,this.childRefs.recommendedSites&&(this.gridRows=`${s} 1fr ${this.enableOneColumn?"minmax(0px, auto)":"auto"} 72px ${o}px ${a}px 32px ${d} 1fr`,this.weatherOneLinerRow=9,this.recommendedSitesRow=8))):(this.gridRows=`1fr ${this.enableOneColumn?"minmax(0px, auto)":"auto"} 72px ${o}px ${a}px 1fr`,this.logoRow=2,this.searchRow=4,this.topSitesRow=6,this.weatherOneLinerRow=7,this.childRefs.recommendedSites&&(this.gridRows=`1fr ${this.enableOneColumn?"minmax(0px, auto)":"auto"} 72px ${o}px ${a}px 32px ${u} ${d} 1fr`,this.topSitesRow=7,this.weatherOneLinerRow=9,this.recommendedSitesRow=8))}getHeaderHeightForPeekMode(){const e=this.getMinimumHeaderHeightForPeekMode();let t=window.innerHeight-this.navHeight-(this.config.maxPeekViewport??262);return this.childRefs.recommendedSites&&this.recommendedSitesDisplaySetting!==D.yR.off&&(t-=this.config.reduceHeaderHeight||0),t<e&&(t=e),t}refreshHeaderHeight(){if(!this.topSitesLayoutState||!this.layoutState)return;if(this.contentOffHeaderHeight=void 0,this.config.disableFeed)return void(this.headerHeight=window.innerHeight);let e;switch(this.layoutState.selectedFeedDisplaySetting){case"headingsonly":e=window.innerHeight-(this.canShowTopNav?0:this.navHeight)-this.headingsOnlyHeightReduction;break;case"peek":e=this.getHeaderHeightForPeekMode();break;case"onscroll":e=window.innerHeight;break;case"off":e=window.innerHeight,this.contentOffHeaderHeight="100vh";break;default:{if(this.museumCardShown)return window.innerHeight-this.navHeight;let t=0;this.enableOneColumn&&(t+=8),this.showCodexBingWithNonBingDSE&&(t+=this.calculateAdditionalHeaderHeightForCodexBingNudge(this.columnArrangement,this.layoutState.selectedQuickLinksDisplaySetting)),t+=this.canShowTopNav&&!this.enableOneColumn?L.O9+this.edgeHeaderTopMarin:0,this.marqueeAdActive&&(this.config.enableMarqueeAdV3?t+=this.marqueeAdPlaceholderHeight:t+=this.marqueeAdHeight);const n=this.calculateInformationalHeaderHeight()+t,i=this.stickyHeaderHeight+t;if(this.childRefs.recommendedSites&&this.recommendedSitesDisplaySetting!==D.yR.off)return this.headerHeight=n-(this.config.reduceHeaderHeight||0);const r=this.config.enableMarqueeAdV3&&"marqueeAdSmallV3"==this.marqueeAdExtraClass;if(this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.onerow||this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.tworows)return this.headerHeight=n;if(this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.off)return this.headerHeight=i+(r?30:0);if(this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.top)return this.headerHeight=i+L.jb+(r?30:0);e=this.layoutState.quickLinksEnabled?n:i,this.columnArrangement>"c2"&&this.layoutState.quickLinksEnabled&&"always"===this.layoutState.selectedFeedDisplaySetting&&(e+=112);break}}this.headerHeight=e}getMinimumHeaderHeightForPeekMode(){let e=0;return this.layoutState.imageOfTheDayEnabled?(this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.top&&(e+=40),e+=78,e+=46,e+=32,e+=this.topSitesHeightBelowSearchBoxForPeekMode,this.childRefs.recommendedSites&&this.recommendedSitesDisplaySetting!==D.yR.off&&(this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.top&&this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.off&&(e+=16),e+=this.recommendedSitesHeight),e+=30):(e+=64,this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.top&&(e+=40),e+=48,e+=72,e+=46,e+=32,e+=32,e+=this.topSitesHeightBelowSearchBoxForPeekMode,this.childRefs.recommendedSites&&this.recommendedSitesDisplaySetting!==D.yR.off&&(this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.top&&this.layoutState.selectedQuickLinksDisplaySetting!==D.Z3.off&&(e+=16),e+=this.recommendedSitesHeight),e+=30),e}refreshImageHeight(){this.imageHeight=window.innerHeight+"px"}refreshTranslucentMode(){var e,t;if(this.config.translucentFeed&&null!==(e=this.config.translucentFeed)&&void 0!==e&&e.enableTranslucentFeed&&this.layoutState.currentBackgroundImageType!==D.HX.off){var n,i,r,o,a,s,c,d,l,u,p,h,g,m,f,y,S,C,w;this.showFeedTranslucent=!0,this.stickyOverrideStyles="",null!==(n=this.config.translucentFeed)&&void 0!==n&&n.translucentStickyHeader&&(this.stickyOverrideStyles="background-color: "+((0,H.Y)()?"#242424e6":"#F7F7F7e6")+";");const e=(null===(i=this.config.translucentFeed)||void 0===i?void 0:i.enableBlur)&&["always","peek","headingsonly"].includes(null===(r=this.layoutState)||void 0===r?void 0:r.selectedFeedDisplaySetting)&&(this.navIsSticky||"always"==(null===(o=this.layoutState)||void 0===o?void 0:o.selectedFeedDisplaySetting)&&["load","all"].includes(null===(a=this.config.translucentFeed)||void 0===a?void 0:a.infoBlurEnabledScene)&&!(null!==(s=this.config.translucentFeed)&&void 0!==s&&s.enableFeedBackplate)),t=(null===(c=this.config.translucentFeed)||void 0===c?void 0:c.enableBlur)&&!this.navIsSticky&&["peek","headingsonly"].includes(null===(d=this.layoutState)||void 0===d?void 0:d.selectedFeedDisplaySetting)&&["load","all"].includes(null===(l=this.config.translucentFeed)||void 0===l?void 0:l.inspBlurEnabledScene);var b;if(this.feedOverrideStyles="",t)this.feedOverrideStyles+="backdrop-filter: blur("+(null===(b=this.config.translucentFeed)||void 0===b?void 0:b.bgBlurSize)+");";if(e)this.feedOverrideStyles+="";else if(null!==(u=this.config.translucentFeed)&&void 0!==u&&u.feedOpacity&&(0,H.Y)()){var T;this.feedOverrideStyles+="background-color: rgb(36 36 36 / "+(t?"0.5":null===(T=this.config.translucentFeed)||void 0===T?void 0:T.feedOpacity)+");"}else if(null===(p=this.config.translucentFeed)||void 0===p||!p.feedOpacity||(0,H.Y)()||this.config.solidColor){if(null!==(h=this.config.translucentFeed)&&void 0!==h&&h.feedOpacity&&!(0,H.Y)()&&this.config.solidColor){var k;this.feedOverrideStyles+="background-color: rgb(245 245 245 /"+(t?"0.5":null===(k=this.config.translucentFeed)||void 0===k?void 0:k.feedOpacity)+");"}}else{var P;this.feedOverrideStyles+="background-color: rgb(247 247 247 /"+(t?"0.5":null===(P=this.config.translucentFeed)||void 0===P?void 0:P.feedOpacity)+");"}return this.feedOverrideStyles+=null!==(g=this.config.translucentFeed)&&void 0!==g&&g.feedSidePadding?`padding-left: ${null===(m=this.config.translucentFeed)||void 0===m?void 0:m.feedSidePadding}; padding-right: ${null===(f=this.config.translucentFeed)||void 0===f?void 0:f.feedSidePadding};`:"",this.feedOverrideStyles+=null!==(y=this.config.translucentFeed)&&void 0!==y&&y.feedBorderRadius?`border-radius: ${null===(S=this.config.translucentFeed)||void 0===S?void 0:S.feedBorderRadius};`:"",this.feedOverrideStyles+=!e&&null!==(C=this.config.translucentFeed)&&void 0!==C&&C.feedBoxShadow?`box-shadow: ${null===(w=this.config.translucentFeed)||void 0===w?void 0:w.feedBoxShadow};`:"",void(0,v.j3)("backgroundImage","displayed")}this.feedOverrideStyles="",this.stickyOverrideStyles="",this.showFeedTranslucent=this.scrollIsPastStyleThreshold&&this.layoutState.imageOfTheDayEnabled&&("headingsonly"===this.layoutState.selectedFeedDisplaySetting||"peek"===this.layoutState.selectedFeedDisplaySetting),null!==(t=this.config.translucentFeed)&&void 0!==t&&t.enableTranslucentFeed&&(0,v.j3)("backgroundImage",this.showFeedTranslucent?"displayed":"hidden")}handleTopSitesEnableChange(e,t){if(this.topSitesHolder){if("always"===t.selectedFeedDisplaySetting&&!e)return this.topSitesHolder.style.opacity="0",void(this.topSitesHolder.style.visibility="hidden");e?(this.topSitesHolder.style.visibility="",this.topSitesHolder.style.opacity="1"):this.topSitesHolder.style.opacity="0",window.setTimeout((()=>{e||(this.topSitesHolder.style.visibility="hidden"),this.topSitesHolder.style.transition=null}),Dn)}}unifiedTopSitesCalculateInformationalHeaderHeight(){const{selectedQuickLinksDisplaySetting:e}=this.layoutState,t=e===D.Z3.top?0:16,n=this.edgeHeaderTopMarin+46+t+38,i=this.config.enableFixLengthOfTopSites&&(this.columnArrangement===_.K$.c2||this.columnArrangement===_.K$.c1);let r=n;if(e===D.Z3.tworows?r+=i?112:72:e===D.Z3.onerow?r+=i?72:32:e===D.Z3.top&&(r+=40),this.childRefs.recommendedSites){const t=this.recommendedSitesHeight;r+=t+(!(e===D.Z3.off||e===D.Z3.top)&&t>0?8:0)}return r}calculateInformationalHeaderHeight(){if(this.config.enableUnifiedTopSites)return this.unifiedTopSitesCalculateInformationalHeaderHeight();let e=0,t=this.childRefs.recommendedSites?224:218,n=330;"always"===this.layoutState.selectedFeedDisplaySetting&&(t=this.childRefs.recommendedSites?214:208,n=310);const{selectedQuickLinksDisplaySetting:i}=this.layoutState,r=i==D.Z3.tworows;let o;var a;(i==D.Z3.off||i==D.Z3.top?(o=78,e=56):o=(this.columnArrangement>=_.K$.c3||this.config.enableOneColOnly)&&!r?t:n,t=o,i==D.Z3.top&&(t+=L.jb),this.childRefs.recommendedSites&&(t+=this.recommendedSitesHeight+e),this.displayConditionalBanner&&(t+=this.topBannerOffsetHeight),this.hideSearchBox&&i!==D.Z3.off&&i!==D.Z3.top&&(t-=62),i!==D.Z3.off&&i!==D.Z3.top)&&(t-=32,this.childRefs.recommendedSites&&this.recommendedSitesDisplaySetting!==D.yR.off||(i==D.Z3.tworows?null!==(a=this.config)&&void 0!==a&&a.enableConsistentRowGap?t-=this.columnArrangement>=_.K$.c2?40:26:t-=32:t-=16));return i==D.Z3.tworows?t-=32:i==D.Z3.onerow&&(t-=16),this.config.enableFeeds3HeaderDecrease&&(i!=D.Z3.tworows&&i!=D.Z3.onerow||(t-=16)),t}checkMarketToggleOverlap(e,t,n){const i=e.getBoundingClientRect();let r=!1;if(i){const e=!(i.right<t.left||i.left>t.right),o=n?i.bottom>t.top:i.top<t.bottom;r=e&&o}return r}checkMarketToggleFitOnPage(){var e,t,n,i,r,o,a,s,c,d,l;if(!this.shadowRoot)return!0;let u=null===(e=this.shadowRoot)||void 0===e||null===(t=e.querySelector)||void 0===t?void 0:t.call(e,"market-language-toggle");const p=null===(n=this.shadowRoot)||void 0===n||null===(i=n.querySelector)||void 0===i?void 0:i.call(n,"cs-header-core");if(!u){var h,g;if(!p)return!0;u=null===(h=p.shadowRoot)||void 0===h||null===(g=h.querySelector)||void 0===g?void 0:g.call(h,"market-language-toggle")}if(!u||!u.shadowRoot||null===(r=u.shadowRoot)||void 0===r||!r.children)return!0;const m=null===(o=u.shadowRoot)||void 0===o?void 0:o.children[0];if(!m)return!0;const f=m.getBoundingClientRect(),v=null===(a=this.headerCoreRef)||void 0===a?void 0:a.search;if(v&&this.checkMarketToggleOverlap(v,f,!1))return!1;const y=null===(s=this.shadowRoot)||void 0===s||null===(c=s.querySelector)||void 0===c?void 0:c.call(s,"background-image");if(y){var S,C;const e=null===(S=y.shadowRoot)||void 0===S||null===(C=S.querySelector)||void 0===C?void 0:C.call(S,".museumCard");if(e&&this.checkMarketToggleOverlap(e,f,!1))return!1}const w=null===(d=this.shadowRoot)||void 0===d||null===(l=d.querySelector)||void 0===l?void 0:l.call(d,"top-sites-edgenext");if(w){var b,T;if(this.checkMarketToggleOverlap(w,f,!1))return!1;const e=null===(b=w.shadowRoot)||void 0===b||null===(T=b.querySelector)||void 0===T?void 0:T.call(b,".action-button");if(e&&this.checkMarketToggleOverlap(e,f,!1))return!1}return!0}focusFeedBorderScrollFade(){var e,t;const n=null===(e=this.shadowRoot)||void 0===e||null===(t=e.querySelector)||void 0===t?void 0:t.call(e,".navAndContent_feed");n&&(0!=window.scrollY?n.classList.add("navAndContent_noshadow"):0==window.scrollY&&n.classList.remove("navAndContent_noshadow"))}checkGalleryPageFitAndDisplayToast(){window.requestAnimationFrame((()=>{innerWidth<Ht.Gb&&(this.backgroundDataConnector.updateBackgroundGalleryDisplayed(!1),this.renderGalleryMinimumWidthToast())}))}renderGalleryMinimumWidthToast(){this.displayGalleryMinimumWidthToast=!0,window.setTimeout((()=>{this.displayGalleryMinimumWidthToast=!1}),5e3)}getSelectedPivot(e){return e&&e.selectedFeedPivot?e.selectedFeedPivot:(0,y.$o)().getItem("switchedPivot")}stampScrollTmpl(){le.M0.addOrUpdateTmplProperty("userScrolled","1")}handleCardSliversOnScroll(){var e,t;const n=null===(e=this.shadowRoot)||void 0===e||null===(t=e.getElementById)||void 0===t?void 0:t.call(e,"blankRiverContainer");n&&(n.classList.add("fadeOut"),window.setTimeout((()=>{this.displayBlankRiver=!1}),500))}calculateStickyBreakpoints(){0===window.scrollY&&this.calculateSearchStickyBreakpoint(),this.calculateTopAndBackgroundStickyBreakpoints()}calculateSearchStickyBreakpoint(){const e=this.headerCoreRef;if(!e)return;let t=this.edgeHeaderTopMarin;this.quickLinksDisplaySetting===D.Z3.top&&(t+=36),t+=this.topBannerOffsetHeight;const n=e.offsetTop;this.searchStickyBreakpoint=n-t+(this.enableOneColumn?this.stickyHeaderHeight:0),(0,$e.Fc)("search",this.searchStickyBreakpoint)}calculateTopAndBackgroundStickyBreakpoints(){var e;const{selectedFeedDisplaySetting:t,selectedQuickLinksDisplaySetting:n}=this.layoutState;let i,r=this.calculateAdditionalHeaderHeight(this.columnArrangement,n);const o=this.calculateAdditionalHeaderHeightForCodexBingNudge(this.columnArrangement,this.layoutState.selectedQuickLinksDisplaySetting);switch(t){case"always":{const e=this.calculateInformationalHeaderHeight();this.enableOneColumn&&(r+=8),i=n===D.Z3.off&&this.recommendedSitesDisplaySetting===D.yR.off?0+r:e-this.stickyHeaderHeight+r,i+=o;break}case"peek":i=this.getHeaderHeightForPeekMode()-this.stickyHeaderHeight-this.topBannerOffsetHeight;break;case"headingsonly":i=window.innerHeight-this.stickyHeaderHeight-this.navHeight-this.topBannerOffsetHeight-this.headingsOnlyHeightReduction;break;default:i=window.innerHeight-this.stickyHeaderHeight-this.topBannerOffsetHeight}let a=i;const s=i;a+=+(this.enableOneColumn?this.stickyHeaderHeight:0),null===(e=this.config.translucentFeed)||void 0===e||!e.enableTranslucentFeed||this.layoutState.currentBackgroundImageType===D.HX.off&&!this.disableStickyHeader?(0,$e.Fc)(G,s):(0,$e.Fc)(G,-1),this.disableStickyHeader?((0,$e.Fc)(K,a+this.stickyHeaderHeight),(0,L.cN)(a+this.stickyHeaderHeight)):((0,$e.Fc)(z,a),(0,$e.Fc)(K,a),(0,L.cN)(a)),this.layoutState.currentBackgroundImageType!==D.HX.off?(0,$e.Fc)(j,s):(0,$e.Fc)(j,-1),this.navIsSticky=window.scrollY>a,this.hideOneLineTopSites=this.quickLinksDisplaySetting===D.Z3.top&&window.scrollY>a-L.jb,this.updateHeaderCoreOffset()}calculateAdditionalHeaderHeight(e,t){var n,i;if(!this.config||!this.config.extraHeaderHeight||"always"!==this.layoutState.selectedFeedDisplaySetting&&"peek"!==this.layoutState.selectedFeedDisplaySetting||!this.config.extraHeaderHeight[e])return 0;if(!this.marqueeAdActive||!this.config.enableMarqueeAdV3)return 0;if(e<"c5")return this.config.extraHeaderHeight[e];let r=0;t!==D.Z3.off&&t!==D.Z3.top||(r=60);const o=this.config.extraHeaderHeight[e],a=Math.floor((null===(n=window)||void 0===n||null===(i=n.screen)||void 0===i?void 0:i.availWidth)/3)-248+r;return Math.max(o,a)}calculateAdditionalHeaderHeightForCodexBingNudge(e,t){if(!this.showCodexBingWithNonBingDSE||!this.config||"always"!==this.layoutState.selectedFeedDisplaySetting||e<"c2")return 0;let n=32;return t===D.Z3.off||t===D.Z3.top?n=60:t===D.Z3.tworows&&(n=10),n}getCompanyLogo(){const e=this.layoutState.currentLayout;this.showBackplate=e===D.nP.focused||e===D.nP.custom&&!this.layoutState.imageOfTheDayEnabled||e===D.nP.informational&&this.config.turnOffBkgdForInformational&&this.layoutState.imageOfTheDayEnabled||e===D.nP.informational&&this.isLowEndDevice,this.showCompanyLogo=!("c1"===this.columnArrangement||"c2"===this.columnArrangement),this.companyLogoImage=this.getCompanyLogoFromLocalStorage(),this.updateHeaderCoreData()}updateHolidayEffectsPostion(){this.holidayEffectsPosition="display: none;",window.setTimeout((()=>{var e,t,n,i,r;const o=getComputedStyle(this).getPropertyValue("--direction")===ht.N.ltr,a=null===(e=this.shadowRoot)||void 0===e||null===(t=e.querySelector)||void 0===t||null===(n=t.call(e,"background-image"))||void 0===n||null===(i=n.shadowRoot)||void 0===i||null===(r=i.querySelector)||void 0===r?void 0:r.call(i,".museumCard");if(a&&a.clientWidth){const e=a.clientWidth+162;this.holidayEffectsPosition=o?`left: calc(100% - ${e}px);`:`right: calc(100% - ${e}px);`}else this.holidayEffectsPosition=o?"left: calc(100% - 300px);":"right: calc(100% - 300px);"}),Dn)}updateTopSitesQuickLinkEndMarginUsedPadding(){var e,t,n,i,r,o,a;const s=!(null===(e=this.config)||void 0===e||null===(t=e.childRefs)||void 0===t||!t.holidayEffects),c=null===(n=this.shadowRoot)||void 0===n||null===(i=n.querySelector)||void 0===i||null===(r=i.call(n,"background-image"))||void 0===r||null===(o=r.shadowRoot)||void 0===o||null===(a=o.querySelector)||void 0===a?void 0:a.call(o,".museumCard");(s||c)&&window.setTimeout((()=>{var e;this.layoutState.selectedQuickLinksDisplaySetting===D.Z3.off&&null!==(e=this.config)&&void 0!==e&&e.enableNewQuickLinksPositionInAlways&&(s&&(this.topSitesQuickLinkEndMarginUsedPadding+=124),c&&c.clientWidth&&(this.topSitesQuickLinkEndMarginUsedPadding+=c.clientWidth),this.pageSettingsDataConnector&&this.pageSettingsDataConnector.updateTopSitesQuickLinkEndMarginUsedPadding(this.topSitesQuickLinkEndMarginUsedPadding))}),Dn)}async initializeDevTools(){if(this.config.childRefs.devTools){var e,t;await(0,he.b1)();const n=m.Al.ClientSettings,i=(null==n||null===(e=n.detection)||void 0===e?void 0:e.isMsft)||(null==n||null===(t=n.detection)||void 0===t?void 0:t.isCorpNet)||g.jG.IsDebug||"int"===n.env;i&&await(0,nt.Fg)(this.config.childRefs.devTools),this.enableDevTools=i}}updateFeedLayoutTelemetry(){le.M0.updatePageMetadata({feed:{layout:"multicol"}})}checkAndEnableMobileUpsell(){if(this.childRefs.mobileAppUpsell){var e,t,n;const i=m.Al.ClientSettings,r=(null==i||null===(e=i.detection)||void 0===e?void 0:e.isMsft)||(null==i||null===(t=i.detection)||void 0===t?void 0:t.isCorpNet),o="1"===(0,b.L)().get("showupsellicon");null===(n=this.pageSettingsDataConnector)||void 0===n||n.getPrimaryAccountInfoAsync(!0).then((e=>{const t=o||!r&&e.accountType!==$.l.AAD;t&&le.M0.addOrUpdateTmplProperty("MobileAppUpsellDisplay","1"),this.enableMobileAppUpsell=t,this.updateHeaderCoreData()}))}}checkIPLocationForRewardsMedallion(){var e;if(null===(e=this.config)||void 0===e||!e.enableCountryCheckForRewards||!g.jG.CountryCode)return void(this.isShowRewardsAllowedByLocation=!1);const t=g.jG.CountryCode.toUpperCase();this.isShowRewardsAllowedByLocation=null==p?void 0:p.has(t)}async tryLoadFeedModuleBundle(){this.feedModuleImportPromise||(this.feedModuleImportPromise=(0,Pt.n)(this.config),await this.feedModuleImportPromise)}updateHeaderCoreData(){const e=this.layoutState.greetingEnabled&&this.childRefs.welcomeGreeting&&!this.isNewTabPageContentManagedByPolicy&&!this.isWeatherHeroExperience,t=this.isAppLauncherAllowedByPolicy,n=this.renderSignInControls,i=this.childRefs.mobileAppUpsell&&this.enableMobileAppUpsell,r=this.childRefs.msRewards&&this.isShowRewardsAllowedByLocation&&this.isShowMSRewardsAllowedByPolicy,o=this.childRefs.notificationBell&&"off"!==this.layoutState.selectedFeedDisplaySetting&&this.isNotificationEnabledByAdmin,a=this.renderMarketLanguageToggle&&this.marketToggleCanFit,s=this.layoutState.isCompanyLogoEnabledByPolicy&&this.showCompanyLogo&&this.config.companyLogo&&!!this.companyLogoImage;this.headerCoreTopStartData={waffleRef:t?this.childRefs.waffle:null,enableMSBranding:!this.config.companyLogo,brandingTitle:this.config.logoRedirectionUrl?this.strings.logoSeeMoreTitleText:this.strings.logoTitleText,brandingHref:this.config.logoRedirectionUrl?(0,x.h_)(this.config.logoRedirectionUrl):"",backgroundImageOn:this.layoutState.imageOfTheDayEnabled,enableCompanyLogo:s,companyLogoImage:this.companyLogoImage,showcompanyLogoBackplate:this.showBackplate,enableClickableCompanyLogo:s&&this.config.enableClickableCompanyLogo},this.headerCoreTopEndData={rewardsHideFirst:this.config.rewardsHideFirst,addMobOrRwdsHiddenTMPL:this.config.addMobOrRwdsHiddenTMPL,signInControlRef:n&&!this.config.useNewSignInButtonStyles?this.childRefs.signInControl:null,signInControlAtTheEndRef:n&&this.config.useNewSignInButtonStyles?this.childRefs.signInControl:null,mobileAppUpsellRef:i?this.childRefs.mobileAppUpsell:null,rewardsRef:r?this.childRefs.msRewards:null,welcomeGreetingRef:e?this.childRefs.welcomeGreeting:null,notificationBellRef:o?this.childRefs.notificationBell:null,settingsRef:this.childRefs.settings,themePickerRef:this.childRefs.themePicker,marketLanguageToggleRef:a?this.childRefs.marketLanguageToggleWC:null,localeMarket:this.localeMarket,onMarketValueChange:this.onMarketValueChange,languageToggleHorizontalAlignment:!1,shouldSendRenderAppError:this.config.childRefRenderSuccess,shouldSendHeaderRenderAppError:this.config.childRefRenderSuccess},this.headerCoreNavData={navRef:this.canShowTopNav?this.childRefs.superNav:null,isImageHiddenAndNotDark:this.isImageHiddenAndNotDark}}updateHeaderCoreSearchData(){var e,t,n;this.headerCoreSearchData={searchConfigRef:this.childRefs.search,showCodexBingIcon:null===(e=this.config)||void 0===e?void 0:e.showCodexBingIcon,enableCodexBingStyles:(null===(t=this.config)||void 0===t?void 0:t.showCodexBingIcon)&&(this.isAlwaysMode||0!=(null===(n=window)||void 0===n?void 0:n.scrollY))}}updateHeaderCoreBelowSearchData(){this.headerCoreBelowSearchData={testBingNudgeRef:this.childRefs.testBingNudge&&this.showCodexBingWithNonBingDSE?this.childRefs.testBingNudge:null,searchHistoryRef:this.childRefs.searchHistory,newsHeadlineBelowSearchboxRef:this.isNewTabPageContentManagedByPolicy?null:this.childRefs.newsHeadlineBelowSearchbox}}checkCodexBingFlagWithNonBingDSE(){if(!this.config.showCodexBingNudge||this.focusRedirectEnabled||!document||!document.documentElement||"0"!==(0,b.L)().get("dsp"))return void(this.showCodexBingWithNonBingDSE=!1);const e=document.documentElement.clientHeight,{selectedFeedDisplaySetting:t}=this.layoutState,n="headingsonly"===t||"off"===t,i="always"===t;this.showCodexBingWithNonBingDSE=n?e>ee:!!i||document.documentElement.clientHeight>te,this.updateHeaderCoreBelowSearchData()}targetLanguageOnMismatch(e){const t=m.Al.ClientSettings&&m.Al.ClientSettings.market&&m.Al.ClientSettings.market.requestInput,n=g.jG.CurrentMarket.split("-"),i={language:(t.language??"").toLowerCase(),market:(t.region??"").toLowerCase()};if(t&&i&&"zh"!==i.language){const t={language:i.language,market:n[n.length-1]},r=h.$n.find((e=>e.id==(0,_t.p)(t)));if(r)return r;const o=i.market&&h.$n.find((e=>e.id==(0,_t.p)(i)));if(o)return o;{const t=e.get(i.language);if(t)return h.$n.find((e=>e.id==t[0]))}}}async onConditionalBannerDisplayChange(e){this.displayConditionalBanner=e,this.updateStickyHeaderHeight(),this.updateHeaderCoreOffset(),this.updateHeaderGrid(),this.refreshHeaderHeight(),await(0,Ne.y)().then((()=>this.calculateStickyBreakpoints()))}updateStickyHeaderHeight(){this.stickyHeaderHeight=L.FQ,this.enableOneColumn||(this.stickyHeaderHeight+=this.topBannerOffsetHeight)}updateHeaderCoreOffset(){this.headerCoreOffset=this.quickLinksDisplaySetting!==D.Z3.top||this.hideOneLineTopSites?0:L.jb,this.enableOneColumn||(this.headerCoreOffset+=this.topBannerOffsetHeight)}setZoomTmpl(){if(!(0,st.N)())return;const e=this.getZoomTmpl();this.riverZoomTmpl!==e&&(le.M0.removeTmplProperty(this.riverZoomTmpl),le.M0.addOrUpdateTmplProperty(e,"1"),this.riverZoomTmpl=e)}getZoomTmpl(){let e,t;if(this.isCurrentWidthInZoomRange(3))t="c4",le.M0.addOrUpdateTmplProperty(t+"riverZoomOutTMPL","1"),e=innerWidth>1132&&innerWidth<1257?"90":innerWidth<1133?"80":"100";else if(this.isCurrentWidthInZoomRange(2))t="c3",le.M0.addOrUpdateTmplProperty(t+"riverZoomOutTMPL","1"),e=innerWidth>855&&innerWidth<949?"90":innerWidth<856?"80":"100";else{var n;t=null===(n=(0,W.Bn)())||void 0===n?void 0:n.currentColumnArrangement,e="100"}return"riverZoom_"+t+"_"+e}isCurrentWidthInZoomRange(e){if(!this.config.columnDifferences)return!1;const t=(0,W.sZ)(e);return this.config.enableRiverZoom?innerWidth>t-1&&innerWidth<(0,W.sZ)(e)+this.config.columnDifferences[e]+1:innerWidth>(0,W.sZ)(e)-this.config.columnDifferences[e]-1&&innerWidth<(0,W.sZ)(e)+1}attachListenerForKeyDownScrollOnFocus(){window.addEventListener("keyup",this.scrollOnKeyUp,{once:!0}),window.addEventListener("keyup",this.focusControlOnScrollKeyUp),window.addEventListener("wheel",this.focusControlOnWheel)}scrollOnKeyUp(e){"PageDown"!=e.key&&"ArrowDown"!=e.key||window.setTimeout((()=>{if(0==window.scrollY){const t="PageDown"==e.key?window.innerHeight:window.innerHeight/5;window.scrollBy({top:t,behavior:"smooth"})}}),1)}blurGridViewWhenActive(e){var t,n,i;e&&e.shadowRoot&&null!==(t=e.shadowRoot)&&void 0!==t&&t.activeElement&&"gridViewFeed"==(null===(n=e.shadowRoot)||void 0===n?void 0:n.activeElement.elementKey)&&(null===(i=e.shadowRoot)||void 0===i||i.activeElement.blur())}checkForMissingSecondaryPerfMarkers(){var e;let t=!1;const n=()=>{if(!(0,M.j)()||t)return;const e=(0,he.bO)(he.oN.Secondary);e&&e.length&&(t=!0,le.M0.sendAppErrorEvent({...pe.zis,message:`Incomplete markers: ${e.join(",")}`,pb:{...pe.zis.pb}}))};if(window.addEventListener("beforeunload",n,{once:!0}),Promise.all([(0,pt.eC)(),(0,he.b1)()]).then((()=>(0,T.rh)(2e3))).then(n),null!==(e=this.config)&&void 0!==e&&e.enablePageTimingsDebug){const e=()=>{if(!(0,M.j)())return;const e=["Background.Request","Background.Serve","Consume","Prerender","Request","Response","Serve"],t=(0,ge.Y9)(),n={type:"debug"};for(const i of e){const e="TTNativeAd."+i;e in t&&(n[i]=t[e])}const i=(0,he.bO)(he.oN.Primary);if(null!=i&&i.length){const e=(0,ge.Ou)();n.pendingPrimaryTimings=e,n.incompleteMarkers=i}le.M0.sendLoadTimeEvent({markers:n})};window.addEventListener("beforeunload",e,{once:!0})}}}(0,r.gn)([It.LO],Un.prototype,"isLowEndDevice",void 0),(0,r.gn)([It.LO],Un.prototype,"layoutState",void 0),(0,r.gn)([It.LO],Un.prototype,"columnArrangement",void 0),(0,r.gn)([It.LO],Un.prototype,"quickLinksDisplaySetting",void 0),(0,r.gn)([It.LO],Un.prototype,"headerHeight",void 0),(0,r.gn)([It.LO],Un.prototype,"contentOffHeaderHeight",void 0),(0,r.gn)([It.LO],Un.prototype,"imageHeight",void 0),(0,r.gn)([It.LO],Un.prototype,"gridRows",void 0),(0,r.gn)([It.LO],Un.prototype,"enableOneColumn",void 0),(0,r.gn)([It.LO],Un.prototype,"showPivotRefreshButton",void 0),(0,r.gn)([It.LO],Un.prototype,"closeRefreshAnimation",void 0),(0,r.gn)([It.LO],Un.prototype,"logoRow",void 0),(0,r.gn)([It.LO],Un.prototype,"searchRow",void 0),(0,r.gn)([It.LO],Un.prototype,"topSitesRow",void 0),(0,r.gn)([It.LO],Un.prototype,"marqueeAdRow",void 0),(0,r.gn)([It.LO],Un.prototype,"recommendedSitesRow",void 0),(0,r.gn)([It.LO],Un.prototype,"weatherOneLinerRow",void 0),(0,r.gn)([It.LO],Un.prototype,"isWeatherOneLinerMapped",void 0),(0,r.gn)([It.LO],Un.prototype,"showWeatherOneLiner",void 0),(0,r.gn)([It.LO],Un.prototype,"showFeedTranslucent",void 0),(0,r.gn)([It.LO],Un.prototype,"showDarkIcon",void 0),(0,r.gn)([It.LO],Un.prototype,"needDarkThemeIcons",void 0),(0,r.gn)([It.LO],Un.prototype,"stickyOverrideStyles",void 0),(0,r.gn)([It.LO],Un.prototype,"feedOverrideStyles",void 0),(0,r.gn)([It.LO],Un.prototype,"enableHiddenRecommendedSitesStyles",void 0),(0,r.gn)([It.LO],Un.prototype,"recommendedSitesDisplaySetting",void 0),(0,r.gn)([It.LO],Un.prototype,"brandZoneShowInRecommendedSites",void 0),(0,r.gn)([It.LO],Un.prototype,"brandZoneSize",void 0),(0,r.gn)([It.LO],Un.prototype,"navIsSticky",void 0),(0,r.gn)([It.LO],Un.prototype,"isTtvrFired",void 0),(0,r.gn)([It.LO],Un.prototype,"edgeHeaderTopMarin",void 0),(0,r.gn)([It.LO],Un.prototype,"pivotManager",void 0),(0,r.gn)([It.LO],Un.prototype,"conditionalBannerShown",void 0),(0,r.gn)([It.LO],Un.prototype,"isAlwaysMode",void 0),(0,r.gn)([It.LO],Un.prototype,"bottomRightCornerClassName",void 0),(0,r.gn)([It.LO],Un.prototype,"className",void 0),(0,r.gn)([It.LO],Un.prototype,"disableStickyHeader",void 0),(0,r.gn)([It.LO],Un.prototype,"canaryFlightEnabled",void 0),(0,r.gn)([It.LO],Un.prototype,"holidayEffectsPosition",void 0),(0,r.gn)([It.LO],Un.prototype,"displayConditionalBanner",void 0),(0,r.gn)([It.LO],Un.prototype,"isOnPersonalizeOrM365Page",void 0),(0,r.gn)([It.LO],Un.prototype,"isOnM365Page",void 0),(0,r.gn)([It.LO],Un.prototype,"nowPivotId",void 0),(0,r.gn)([It.LO],Un.prototype,"hideOneLineTopSites",void 0),(0,r.gn)([It.LO],Un.prototype,"isNewTabPageContentManagedByPolicy",void 0),(0,r.gn)([It.LO],Un.prototype,"contentConfigInfo",void 0),(0,r.gn)([It.LO],Un.prototype,"context",void 0),(0,r.gn)([It.LO],Un.prototype,"getFeedDependencyPromise",void 0),(0,r.gn)([It.LO],Un.prototype,"renderBackgroundGallery",void 0),(0,r.gn)([It.LO],Un.prototype,"displayGalleryMinimumWidthToast",void 0),(0,r.gn)([It.LO],Un.prototype,"headerCoreTopStartData",void 0),(0,r.gn)([It.LO],Un.prototype,"headerCoreTopEndData",void 0),(0,r.gn)([It.LO],Un.prototype,"headerCoreNavData",void 0),(0,r.gn)([It.LO],Un.prototype,"headerCoreSearchData",void 0),(0,r.gn)([It.LO],Un.prototype,"headerCoreBelowSearchData",void 0),(0,r.gn)([It.LO],Un.prototype,"headerCoreOffset",void 0),(0,r.gn)([It.LO],Un.prototype,"stickyHeaderHeight",void 0),(0,r.gn)([It.LO],Un.prototype,"isSearchSticky",void 0),(0,r.gn)([It.LO],Un.prototype,"wpoNotificationPreviewData",void 0),(0,r.gn)([It.LO],Un.prototype,"enableNotificationAnimation",void 0),(0,r.gn)([It.LO],Un.prototype,"notSupportLayout",void 0),(0,r.gn)([It.LO],Un.prototype,"isImageHiddenAndNotDark",void 0),(0,r.gn)([It.LO],Un.prototype,"copilotMuseumCardIsShown",void 0),(0,r.gn)([It.LO],Un.prototype,"copilotCoachMarkIsShown",void 0),(0,r.gn)([It.LO],Un.prototype,"messages",void 0),(0,r.gn)([It.LO],Un.prototype,"hideSearchBox",void 0),(0,r.gn)([It.LO],Un.prototype,"isScrollDownButtonDismissed",void 0),(0,r.gn)([It.lk],Un.prototype,"topBannerOffsetHeight",null),(0,r.gn)([It.lk],Un.prototype,"topSitesOffsetHeight",null),(0,r.gn)([It.LO],Un.prototype,"enableDevTools",void 0),(0,r.gn)([It.LO],Un.prototype,"multiLineSearchBox",void 0),(0,r.gn)([It.LO],Un.prototype,"showCodexBingWithNonBingDSE",void 0),(0,r.gn)([It.LO],Un.prototype,"displayBlankRiver",void 0),(0,r.gn)([It.LO],Un.prototype,"overriddenFeedConfig",void 0),(0,r.gn)([It.LO],Un.prototype,"overlapState",void 0),(0,r.gn)([It.LO],Un.prototype,"shouldRenderToastWC",void 0),(0,r.gn)([It.LO],Un.prototype,"telemetryTags",void 0),(0,r.gn)([It.LO],Un.prototype,"marqueeAdActive",void 0),(0,r.gn)([It.LO],Un.prototype,"marqueeAd",void 0),(0,r.gn)([It.LO],Un.prototype,"marqueeAdExtraClass",void 0),(0,r.gn)([It.LO],Un.prototype,"marqueeAdOverlayHeight",void 0),(0,r.gn)([It.LO],Un.prototype,"marqueeAdHeight",void 0),(0,r.gn)([It.LO],Un.prototype,"marqueeAdPlaceholderHeight",void 0),(0,r.gn)([It.lk],Un.prototype,"shouldShowNotificationMiniCard",null);var _n=n(7275),Hn=n(49218);var Wn=n(89150),qn=n(93703),Vn=n(41472),Gn=n(36362),zn=n.n(Gn);const jn=()=>`https://assets.msn.${g.jG.topDomain}/staticsb/statics/latest/common/icons/chatIcon.svg`,Kn=Hn.dy`
<div class="heading-container">
<h1 class="title">${e=>e.strings.openCopilotTitleText}</h1>
<div class="openCopilotIconBox">
<fluent-button
class="openCopilot-close-button"
role="button"
@click="${e=>e.close_CopilotCardTelemetry()}"
>
<span class="close-button-glyph">
${Hn.dy.partial(zn())}</span
>
</fluent-button>
</div>
</div>
`,Qn=Hn.dy`
<div class="copilotCoachMark ${e=>e.copilotCoachMarkIsShown?"copilotMuseumCard_show":"copilotMuseumCard_hide"}"
@mouseenter=${e=>e.onHover_coachMark()}
>
<img src="${jn()}">
<span>${e=>e.strings.copilotCoachmarkText}</span>
</div>
`,Zn=Hn.dy`
<div class="copilotCoachMark ${e=>e.copilotCoachMarkIsShown?"copilotMuseumCard_show":"copilotMuseumCard_hide"}"
@click=${e=>e.onClick_coachMark()}
>
<img src="${jn()}">
<span>${e=>e.strings.copilotCoachmarkText}</span>
</div>
`,Jn=Hn.dy`
<div class="copilotMuseumCard">
<div class="message-box" @click="${e=>e.onClickHandlerMessage&&e.onClickHandlerMessage(e.content)}">
${e=>e.content}
</div>
</div>
`,Xn=Hn.dy`
<div class="copilotContainer">
<div
id="copilotMuseumTemplate"
${(0,Vn.i)("copilotMuseumTemplate")}
class="
${e=>e.copilotCoachMarkIsShown?"copilotMuseumTemplateHasCoachMark":"copilotMuseumTemplate"}
${e=>e.copilotMuseumCardIsShown?"copilotMuseumCard_show":"copilotMuseumCard_hide"}"
>
${Kn}
<div class="messageBigBox">${(0,Wn.rx)((e=>e.messages),Jn)}</div>
<div class="requestAnythingBox" @click="${e=>e.onClick_pickMessageItem("")}">
<div class="copilotRequestAnything">
<img src="${jn()}">
<span> ${e=>e.strings.copilotRequestText}</span>
</div>
</div>
</div>
${(0,qn.g)((e=>e.copilotCoachMarkIsShown&&e.config.copilotCoachmarkHoverEnable),Qn)}
${(0,qn.g)((e=>e.copilotCoachMarkIsShown&&!e.config.copilotCoachmarkHoverEnable),Zn)}
</div>
`;var Yn=n(47507),ei=n(1591);Yn.q,ei.Z;const ti=(e,t=!1)=>{const n=t?`window.dispatchEvent(new Event("${e}"));`:"";return Hn.dy`<script nonce="${()=>window.NONCE_ID}">${Hn.dy.partial(`window.markTTSR("${e}");`)} ${Hn.dy.partial(n)}</script>`},ni=ti("TTSR.TopSitesTag",!0),ii=ti("TTSR.HeaderTag",!0),ri=ti(`${he.nz}${u.p.complete}`),oi=ti(`${he.nz}${u.p.searchBox}`,!0),ai=e=>`--sticky-height:${e.stickyHeaderHeight||108}px;--search-sticky-extra-height:${e.topBannerOffsetHeight}px`,si=Hn.dy`<div class="refreshPage ${e=>e.closeRefreshAnimation?"hide":""}"><fluent-progress-ring></fluent-progress-ring></div>`,ci=Hn.dy`<div class="doubleWideRiverCard"></div>`,di=Hn.dy`<div class="singleWideRiverCard"></div>`,li=Hn.dy`<div class="fixed-size-card"><div class="card-img skeleton"></div><div class="card-label skeleton"></div><div class="card-text skeleton"></div><div class="card-text skeleton"></div><div class="card-text skeleton" style="width: 70%;"></div></div>`,ui=Hn.dy`<div class="fixed-size-card work-feed"></div>`,pi=Hn.dy`<div class="fixed-size-card-infopane"><div class="card-img skeleton"></div><div class="card-label skeleton"></div><div class="card-text skeleton"></div><div class="card-text skeleton"></div><div class="card-text skeleton" style="width: 70%;"></div></div>`,hi=Hn.dy`<div class="fixed-size-card-infopane work-feed"></div>`,gi=Hn.dy`<div class="skeleton-container ${e=>e.isOnM365Page?"work-feed":""}" id="skeleton-loader"><div class="skeleton-feed fixed-size-feed">${e=>e.isOnM365Page?hi:pi} ${(0,Wn.rx)((e=>e.skeletonCardArray),(e=>e.isOnM365Page?ui:li))}</div></div>`,mi=Hn.dy`${ci} ${di} ${di} ${di}`,fi=Hn.dy`${ci} ${di} ${di}`,vi=Hn.dy`${ci} ${di}`,yi=Hn.dy`${ci}`,Si=Hn.dy`${di}`,Ci=Hn.dy`<div id="blankRiverContainer" class="blankRiverContainer">${(0,qn.g)((e=>"c5"===e.columnArrangement),mi)} ${(0,qn.g)((e=>"c4"===e.columnArrangement),fi)} ${(0,qn.g)((e=>"c3"===e.columnArrangement),vi)} ${(0,qn.g)((e=>"c2"===e.columnArrangement),yi)} ${(0,qn.g)((e=>"c1"===e.columnArrangement),Si)}</div>`,wi=Hn.dy`<div id="scrollDownButtonContainer">${e=>(0,_n.Ot)(e.childRefs.scrollDownButton,{properties:{scrollToShowFeed:e.scrollToShowFeed,isOnBackgroundImage:!!e.layoutState.imageOfTheDayEnabled}})}</div>`,bi=Hn.dy`<div class="navAndContent ${e=>e.config.enableOneColumn?"navAndContentOneColumn":""} ${e=>e.showFeedTranslucent?"navAndContent_tb":""} ${e=>{var t;return null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableTranslucentFeed?"navAndContent_nb":""}} ${e=>e.config.solidColor?"solidtx":""} ${e=>e.config.enableRiverZoom?"riverZoom":""}">${e=>(0,_n.Ot)(e.childRefs.backToTopButton)} ${(0,qn.g)((e=>!e.config.noScrollDownBtn&&"headingsonly"===e.layoutState.selectedFeedDisplaySetting&&!!e.childRefs.scrollDownButton&&!e.isScrollDownButtonDismissed&&(!e.childRefs.weatherOneLiner||e.childRefs.weatherOneLiner&&e.isWeatherOneLinerMapped&&!e.showWeatherOneLiner)&&0===window.scrollY),wi)}<div class="navAndContent_feed ${e=>"play"===e.nowPivotId?"navAndContent_feed_fullpage":""} ${e=>e.responsiveSupported?"nav-feed-size-responsive":""} ${e=>e.buildFocusBorderStyleClasses()}" style="${e=>e.feedOverrideStyles}; ${e=>(e=>`--nav-height:${e.navHeight||50}px;`)(e)} ${e=>ai(e)}" ${(0,Vn.i)("navAndContentFeedRef")}>${(0,qn.g)((e=>!e.config.enableTopNav),Hn.dy`<div class="g_nav_container"><div id="g_nav" style="${e=>{var t;return e.isOnM365Page&&null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableTranslucentFeed?"position:relative;--m365-column-width:fit-content;justify-content:flex-start":""}}" class="nav ${e=>e.className} ${e=>e.config.enableOneColumn?"navStickyOneColumn":""} ${e=>e.conditionalBannerShown?"conditionalBannerShown":""} ${e=>e.config.translucentFeed&&e.config.translucentFeed.translucentStickyHeader&&e.showFeedTranslucent?"translucentHeader":""}" ${(0,$e.Fl)({stickyClassName:"nav_sticky",breakpointName:z})} ${e=>e.config.solidColor?"solidtx":""}"><div class="contentSized navSized ${e=>e.config.enableOneColumn?"contentSizedOneColumn":""} ${e=>e.responsiveSupported?"nav-size-responsive":""} ${e=>e.config.enableRiverZoom?"short":""} ">${e=>{var t,n,i,r;return(0,_n.Ot)(e.childRefs.superNav,{attributes:{showFullPageBlur:!!(null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableBlur&&e.showFeedTranslucent&&["always","peek","headingsonly"].includes(null===(n=e.layoutState)||void 0===n?void 0:n.selectedFeedDisplaySetting)&&(e.navIsSticky||"always"==(null===(i=e.layoutState)||void 0===i?void 0:i.selectedFeedDisplaySetting)&&["load","all"].includes(null===(r=e.config.translucentFeed)||void 0===r?void 0:r.infoBlurEnabledScene)))},ttvrMarkerAggregate:"Header"})}}</div></div></div>`)} ${(0,qn.g)((e=>e.showPivotRefreshButton),si)}<div style="${e=>{var t;return!e.canShowTopNav&&e.isOnM365Page&&null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableTranslucentFeed?"margin-top:0;":""}}" class="${e=>e.config.enableTopNav?"contentNoNav":"contentBelowNav"} ${e=>e.isOnM365Page?"":"contentSized"} ${e=>!e.isOnM365Page&&e.config.enableOneColumn?"contentSizedOneColumn":""} ${e=>"play"===e.nowPivotId?"contentSizedFullScreen":""} ${e=>e.config.enableContentPlaceHolder?"contentPlaceHolder":""} ${e=>e.responsiveSupported?"content-size-responsive":""} ${e=>e.config.enableRiverZoom?"riverZoom short":""} ">${(0,qn.g)((e=>e.config.enableLoaderFlight),gi)} ${(0,qn.g)((e=>!e.isOnPersonalizeOrM365Page&&e.config.childRefs.superBreakingNews),Hn.dy`${e=>(0,_n.Ot)(e.childRefs.superBreakingNews,{attributes:{style:"display: grid; justify-items: center;"},ttvrMarkerAggregate:"Header"})}`)} ${(0,qn.g)((e=>"gaming"===e.nowPivotId&&e.childRefs.gamingDiscoverStrip),Hn.dy`${e=>(0,_n.Ot)(e.childRefs.gamingDiscoverStrip,{ttvrMarkerAggregate:"Header"})}`)} ${(0,qn.g)((e=>e.config.enableHeadingsOnlyCardSlivers&&e.displayBlankRiver),Ci)} ${(0,qn.g)((e=>e.config.enableChannelFiltering&&"following"===e.nowPivotId),Hn.dy`${e=>(0,_n.Ot)(e.getExperienceConfigInfo("ChannelFilterCard"),{memoize:!1})}`)} ${(0,qn.g)((e=>e.contentConfigInfo),Hn.dy` ${(0,qn.g)((()=>window.isSSREnabled),Hn.dy`${()=>Hn.dy`${Hn.dy.partial((0,Se.yC)())}`}`)} ${(0,qn.g)((e=>window.isSSREnabled),(e=>{return t=e.contentConfigInfo,Hn.dy`<script nonce="${()=>window.NONCE_ID}">window.ssrLoadedExperience.publish(${Hn.dy.partial(JSON.stringify(t))})</script>`;var t}))} ${e=>{var t;return(0,_n.Ot)(e.contentConfigInfo,{includeTelemetryTag:!1,properties:{gamingPivotSwitched:null===(t=e.context)||void 0===t?void 0:t.gamingPivotSwitched,context:e.context,getFeedDependencyPromise:e.getFeedDependencyPromise,overriddenConfig:e.config.enableChannelFiltering?e.overriddenFeedConfig:null},memoize:!1})}} `)}</div></div></div>`,Ti=Hn.dy`<msn-toast class="backgroundGalleryMinimumWidthToast">${e=>e.strings.backgroundGalleryBelowMinimumWidthToastText}</msn-toast>`,ki=Hn.dy`<cs-header-core :startSection=${e=>e.headerCoreTopStartData} :endSection=${e=>e.headerCoreTopEndData} :navSection=${e=>e.headerCoreNavData} :searchSection=${e=>e.headerCoreSearchData} :belowSearchSection=${e=>e.headerCoreBelowSearchData} :chromiumPageSettingsState=${e=>e.layoutState} :headerCoreTTVRTemplate=${oi} :topSitesInCenter=${e=>e.hideSearchBox&&e.isAlwaysMode&&e.quickLinksDisplaySetting!==D.Z3.off&&e.quickLinksDisplaySetting!==D.Z3.top} :showFullPageBlur=${e=>{var t,n,i,r;return!!(null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableBlur&&e.showFeedTranslucent&&["always","peek","headingsonly"].includes(null===(n=e.layoutState)||void 0===n?void 0:n.selectedFeedDisplaySetting)&&(e.navIsSticky||"always"==(null===(i=e.layoutState)||void 0===i?void 0:i.selectedFeedDisplaySetting)&&["load","all"].includes(null===(r=e.config.translucentFeed)||void 0===r?void 0:r.infoBlurEnabledScene)))||e.showDarkIcon}} :needDarkThemeIcons=${e=>e.needDarkThemeIcons} class="${e=>e.isSearchSticky?"search-sticky":""} ${e=>e.hideSearchBox?"hide-search-box":""} ${e=>{var t;return null!==(t=e.headerCoreSearchData)&&void 0!==t&&t.enableCodexBingStyles?"bing-chat":""}} ${e=>{var t;return null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableTranslucentFeed?"translucent":""}}" style="grid-row:${e=>e.searchRow};${e=>(e=>`--header-offset:${e.headerCoreOffset||0}px;--header-top-margin:${e.edgeHeaderTopMarin}px;`)(e)}" ${(0,Vn.i)("headerCoreRef")}></cs-header-core>`,Pi=Hn.dy` ${(0,qn.g)((e=>e.topSitesLayoutState&&e.childRefs.topSites&&e.quickLinksDisplaySetting!==D.Z3.off),(e=>{var t,n,i,r;return(0,_n.Ot)(e.childRefs.topSites,{attributes:{selectedQuickLinksDisplaySetting:e.quickLinksDisplaySetting,quickLinksToggleSpacingForBanner:!!e.displayConditionalBanner,showFullPageBlur:!!(null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableBlur&&e.showFeedTranslucent&&["always","peek","headingsonly"].includes(null===(n=e.layoutState)||void 0===n?void 0:n.selectedFeedDisplaySetting)&&(e.navIsSticky||"always"==(null===(i=e.layoutState)||void 0===i?void 0:i.selectedFeedDisplaySetting)&&["load","all"].includes(null===(r=e.config.translucentFeed)||void 0===r?void 0:r.infoBlurEnabledScene)))||e.showDarkIcon,needDarkThemeIcons:e.needDarkThemeIcons,quickBriefVisible:!!e.shouldShowNotificationMiniCard},ttvrMarkerAggregate:"Header"})}))} ${(0,qn.g)((()=>!(0,st.N)()),ni)}
`,Ii=Hn.dy`<fluent-button id="marqueeAdDismissButton" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.marqueeAdDismissButton}}" @click="${e=>e.onClick_marqueeAdClose()}" title="${e=>e.strings.dismissMarqueeAdText}" aria-label="${e=>e.strings.dismissMarqueeAdText}" ${(0,Vn.i)("ref_marqueeAdDismissButton")}></fluent-button>`,Ai=(0,qn.g)((e=>e.marqueeAd),Hn.dy`<div ${(0,Vn.i)("ref_marqueeAdTemplate")} class="${e=>`marqueeAdOverlayV3 ${e.marqueeAdExtraClass}`}" style="grid-row: ${e=>e.marqueeAdRow};"><div class="marqueeAdContainerV3" id="marqueeAdContainer"><div class="marqueeAdSponsor" style="${e=>`background-color: ${e.marqueeAd.sponsorBackgroundColor}`}"><div>${e=>e.strings.marqueeAdSponsorText}</div><fluent-button @click=${e=>e.onClick_MarqueeAdSponsorLogo()} class="marqueeAdSponsorLogo" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.marqueeAdSponsorLogo}}" title="${e=>e.marqueeAd.providerName}" aria-label="${e=>e.marqueeAd.providerName}" ${(0,Vn.i)("ref_marqueeAdSponsorLogo")}><img class="marqueeAdSponsorLogoImage" src="${e=>e.marqueeAd.sponsorLogoImageUrl}" /></fluent-button></div><div class="marqueeAdContent"><div class="marqueeAdTitle">${e=>e.marqueeAd.title}</div><div class="marqueeAdCTAButtonContainer"><fluent-button @click=${e=>e.onClick_MarqueeAdCTAButton()} class="marqueeAdCTA" data-t="${e=>{var t;return null===(t=e.telemetryTags)||void 0===t?void 0:t.marqueeAdCTAButton}}" title="${e=>e.marqueeAd.ctaText}" aria-label="${e=>e.marqueeAd.ctaText}" ${(0,Vn.i)("ref_marqueeAdCTAButton")}>${e=>e.marqueeAd.ctaText}</fluent-button></div></div>${Ii}</div></div>`),Ei=Hn.dy`${Hn.dy.partial('<svg viewBox="0 0 226 48" height="48" width="225"><path key="MicrosoftLogo1" id="microsoft" d="M93.6 9.6v28.8h-5V15.8h-.1l-8.9 22.6h-3.3l-9.1-22.6h-.1v22.6h-4.6V9.6h7.2L78 30.9h.1l8.7-21.3h6.8zm4.1 2.2c0-.8.3-1.5.9-2 .6-.5 1.3-.8 2.1-.8.9 0 1.6.3 2.1.9.5.5.9 1.2.9 2s-.3 1.5-.9 2c-.6.5-1.3.8-2.1.8-.9 0-1.5-.3-2.1-.8-.5-.7-.9-1.4-.9-2.1zm5.4 5.9v20.7h-4.9V17.7h4.9zm14.8 17.2a9.2 9.2 0 0 0 4.8-1.8v4.5c-.8.5-1.7.8-2.7 1-1 .2-2.1.3-3.3.3-3.1 0-5.5-.9-7.4-2.9-1.9-1.9-2.9-4.4-2.9-7.3 0-3.3 1-6.1 2.9-8.2 1.9-2.1 4.7-3.2 8.3-3.2.9 0 1.8.1 2.7.3.9.3 1.7.5 2.2.8v4.7c-.7-.5-1.5-1-2.3-1.3-.8-.3-1.6-.5-2.4-.5-1.9 0-3.5.6-4.7 1.9-1.2 1.3-1.8 2.9-1.8 5.1 0 2.1.5 3.7 1.7 4.9 1.4 1.1 2.9 1.7 4.9 1.7zm18.6-17.5c.4 0 .7 0 1.1.1.3.1.6.1.8.2v4.9c-.3-.2-.6-.3-1.1-.5-.5-.2-1.1-.3-1.8-.3-1.2 0-2.2.5-3 1.5-.8 1-1.3 2.5-1.3 4.7v10.4h-4.9V17.7h4.9V21h.1c.5-1.1 1.1-2 2-2.7.8-.6 1.9-.9 3.2-.9zm2.1 11c0-3.4.9-6.1 2.9-8.1 1.9-2 4.6-3 8.1-3 3.2 0 5.7.9 7.5 2.9 1.8 1.9 2.7 4.5 2.7 7.8s-.9 6-2.9 8c-1.9 2-4.5 3-7.9 3-3.2 0-5.7-.9-7.6-2.8-1.9-2-2.8-4.6-2.8-7.8zm5.1-.2c0 2.1.5 3.8 1.5 4.9 1 1.1 2.4 1.7 4.2 1.7 1.8 0 3.1-.6 4.1-1.7.9-1.1 1.4-2.8 1.4-5.1 0-2.2-.5-3.9-1.5-5-.9-1.1-2.3-1.7-4-1.7-1.8 0-3.1.6-4.1 1.8-1.2 1.2-1.6 2.9-1.6 5.1zm23.3-5c0 .7.2 1.3.7 1.7.5.4 1.4.9 2.9 1.5 1.9.8 3.3 1.7 4.1 2.6.8 1 1.2 2.1 1.2 3.5 0 1.9-.7 3.5-2.3 4.7-1.5 1.2-3.5 1.8-6.1 1.8-.9 0-1.8-.1-2.9-.3-1.1-.2-1.9-.5-2.7-.8V33c.9.6 1.9 1.1 2.9 1.5 1 .3 1.9.5 2.8.5 1.1 0 1.9-.1 2.4-.5.5-.3.8-.8.8-1.5s-.3-1.3-.8-1.7c-.5-.5-1.6-1-3.1-1.6-1.8-.7-3.1-1.6-3.8-2.5s-1.1-2.1-1.1-3.6c0-1.9.7-3.4 2.2-4.6 1.5-1.2 3.4-1.8 5.7-1.8.7 0 1.5.1 2.4.3.9.1 1.7.4 2.3.6v4.6c-.7-.4-1.4-.8-2.3-1.1-.9-.3-1.7-.5-2.5-.5-.9 0-1.7.2-2.1.5-.4.5-.7.9-.7 1.6zm10.9 5.2c0-3.4.9-6.1 2.9-8.1s4.6-3 8.1-3c3.2 0 5.7.9 7.5 2.9 1.8 1.9 2.7 4.5 2.7 7.8s-.9 6-2.9 8c-1.9 2-4.5 3-7.9 3-3.2 0-5.7-.9-7.6-2.8-1.8-2-2.8-4.6-2.8-7.8zm5.1-.2c0 2.1.5 3.8 1.5 4.9 1 1.1 2.4 1.7 4.2 1.7 1.8 0 3.1-.6 4.1-1.7.9-1.1 1.4-2.8 1.4-5.1 0-2.2-.5-3.9-1.5-5-.9-1.1-2.3-1.7-4-1.7-1.8 0-3.1.6-4.1 1.8-1.1 1.2-1.6 2.9-1.6 5.1zm32.3-6.5H208v16.7h-4.9V21.7h-3.5v-4h3.5v-2.9c0-2.2.7-3.9 2.1-5.3 1.4-1.4 3.2-2.1 5.4-2.1.6 0 1.1 0 1.6.1s.9.1 1.2.3V12c-.1-.1-.5-.2-.9-.3-.4-.1-.9-.2-1.4-.2-1 0-1.8.3-2.3.9-.5.7-.8 1.6-.8 2.8v2.5h7.3V13l4.9-1.5v6.1h4.9v4h-4.9v9.7c0 1.3.2 2.2.7 2.7.5.5 1.2.8 2.2.8.3 0 .6-.1 1-.2s.7-.3 1.1-.5v4c-.3.2-.8.3-1.5.5-.7.1-1.4.2-2.1.2-2.1 0-3.6-.5-4.6-1.7-1-1.1-1.5-2.7-1.5-4.9V21.7h-.2z"/><path key="MicrosoftLogo2" id="blue" d="M22.8 25.2H0V48h22.8V25.2z" fill="#00A4EF"/><path key="MicrosoftLogo3" id="yellow" d="M48 25.2H25.2V48H48V25.2z" fill="#FFB900"/><path key="MicrosoftLogo4" id="green" d="M48 0H25.2v22.8H48V0z" fill="#7FBA00"/><path key="MicrosoftLogo5" id="red" d="M22.8 0H0v22.8h22.8V0z" fill="#F25022"/></svg>')}`,xi=Hn.dy` ${(0,qn.g)((e=>!e.config.notificationOnRight),Hn.dy`<div id="notificationMiniCardWrapper">${(0,qn.g)((e=>e.shouldShowNotificationMiniCard),(e=>(0,_n.Ot)(e.childRefs.notificationMiniCard,{properties:{data:e.wpoNotificationPreviewData,onDismiss:e.dismissNotificationMiniCard}})))}</div>`)} ${Pi} ${(0,qn.g)((e=>e.config.notificationOnRight),Hn.dy`<div id="notificationMiniCardWrapper">${(0,qn.g)((e=>e.shouldShowNotificationMiniCard),(e=>(0,_n.Ot)(e.childRefs.notificationMiniCard,{properties:{data:e.wpoNotificationPreviewData,onDismiss:e.dismissNotificationMiniCard}})))}</div>`)}
`,Mi=Hn.dy`
${(0,qn.g)((e=>e.childRefs.conditionalBanner),Hn.dy`<div class="conditionalBannerHolder">${e=>(0,_n.Ot)(e.childRefs.conditionalBanner,{properties:{onDisplayChange:e.onConditionalBannerDisplayChange.bind(e)}})}</div>`)}
${(0,qn.g)((e=>e.childRefs.superCoachMark),Hn.dy`<div class="superCoachMarkHolder">${e=>(0,_n.Ot)(e.childRefs.superCoachMark)}</div>`)}
${(0,qn.g)((e=>e.childRefs.nurturingCoachMark&&e.isTtvrFired),Hn.dy`<div>${e=>(0,_n.Ot)(e.childRefs.nurturingCoachMark,{includeTelemetryTag:!1})}</div>`)}
${(0,qn.g)((e=>e.childRefs.superNavCoachMark),Hn.dy`${e=>(0,_n.Ot)(e.childRefs.superNavCoachMark,{attributes:{style:"display: none"}})}`)}
${(0,qn.g)((e=>e.childRefs.stickyPeek),Hn.dy`<div class="stickyPeekHolder">${e=>(0,_n.Ot)(e.childRefs.stickyPeek)}</div>`)}
${(0,qn.g)((e=>e.childRefs.officeCoachmark),Hn.dy`<div class="officeCoachmarkHolder">${e=>(0,_n.Ot)(e.childRefs.officeCoachmark)}</div>`)}
${(0,qn.g)((e=>e.displayGalleryMinimumWidthToast),Ti)}
${(0,qn.g)((e=>e.config.copilotTemplateEnable),Xn)}<div id="headerGrid" style="grid-template-rows: ${e=>e.gridRows};${e=>e.config.enableAdaptiveHeader&&"always"==e.layoutState.selectedFeedDisplaySetting?"max-height":"height"}:${e=>e.contentOffHeaderHeight??e.headerHeight+"px"};" role="${e=>"off"===e.layoutState.selectedFeedDisplaySetting?"main":"banner"}"><div class="companyLogoHolder_aboveSearch" ${e=>e.logoRow?"grid-row: ${x => x.logoRow};":""} style=${e=>e.logoRow&&e.quickLinksDisplaySetting===D.Z3.top?"grid-row:"+e.logoRow:""} ${(0,Ue.XJ)()}>${(0,qn.g)((e=>"always"!==e.layoutState.selectedFeedDisplaySetting&&!e.layoutState.imageOfTheDayEnabled),Ei)}</div>${ki} ${(0,qn.g)((e=>!(0,st.N)()),ii)}<div id="topSitesHolder" class=" ${e=>e.quickLinksDisplaySetting===D.Z3.top?"oneline-topsite-holder":""} ${e=>e.hideOneLineTopSites||e.quickLinksDisplaySetting===D.Z3.off?"hide":""} ${e=>e.config.enableRiverZoom&&e.quickLinksDisplaySetting!==D.Z3.top?"short":""} ${e=>e.hideSearchBox&&e.isAlwaysMode?"move-upward":""} ${e=>e.childRefs.notificationMiniCard&&e.quickLinksDisplaySetting!==D.Z3.top?"enable-notification":""} ${e=>e.enableNotificationAnimation?"notification-anime":""} ${e=>e.config.notificationOnRight?"notification-right":"notification-left"} " style="grid-row: ${e=>e.topSitesRow}; ${e=>(e=>`--top-banner-offset-height:${e.topBannerOffsetHeight||0}px;`)(e)}" ${(0,Ue.XJ)()}>${(0,qn.g)((e=>e.childRefs.notificationMiniCard),xi,Pi)}</div>${(0,qn.g)((e=>e.marqueeAdActive&&e.config.enableMarqueeAdV3),Hn.dy`${Ai}`)} ${(0,qn.g)((e=>e.layoutState.greetingEnabled&&e.childRefs.weatherOneLiner&&("focused"===e.layoutState.currentLayout||"headingsonly"===e.layoutState.selectedFeedDisplaySetting||"off"===e.layoutState.selectedFeedDisplaySetting)),Hn.dy`<div id="weatherOneLinerHolder" style="grid-row: ${e=>e.weatherOneLinerRow};" class="oneline-weather-holder-margin ${e=>"off"===e.layoutState.selectedFeedDisplaySetting&&"oneline-weather-holder-content-off"} ${e=>"off"===e.layoutState.selectedFeedDisplaySetting&&e.layoutState.currentBackgroundImageType!==D.HX.off&&"oneline-weather-holder-content-off-bg"}">${e=>(0,_n.Ot)(e.childRefs.weatherOneLiner,{properties:{setShowWeatherOneLiner:e.setShowWeatherOneLiner,setIsWeatherOneLinerMapped:e.setIsWeatherOneLinerMapped}})}</div>`)} ${(0,qn.g)((e=>e.childRefs.recommendedSites),Hn.dy`<div id="recommendedSites" class=" ${e=>e.recommendedSitesDisplaySetting===D.yR.off?"hide":""} unified " style="grid-row: ${e=>e.recommendedSitesRow};" ${(0,Ue.XJ)()}>${(0,qn.g)((e=>!e.enableHiddenRecommendedSitesStyles),Hn.dy` ${e=>{var t,n,i,r;return(0,_n.Ot)(e.childRefs.recommendedSites,{properties:{narrowed:!e.layoutState.imageOfTheDayEnabled&&["peek","headingsonly","off"].includes(e.layoutState.selectedFeedDisplaySetting),isOnBackgroundImage:!(!e.layoutState.imageOfTheDayEnabled||e.config.turnOffBkgdForInformational&&e.layoutState.currentLayout==D.nP.informational),showFullPageBlur:!!(null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableBlur&&e.showFeedTranslucent&&["always","peek","headingsonly"].includes(null===(n=e.layoutState)||void 0===n?void 0:n.selectedFeedDisplaySetting)&&(e.navIsSticky||"always"==(null===(i=e.layoutState)||void 0===i?void 0:i.selectedFeedDisplaySetting)&&["load","all"].includes(null===(r=e.config.translucentFeed)||void 0===r?void 0:r.infoBlurEnabledScene)))||e.showDarkIcon,needDarkThemeIcons:e.needDarkThemeIcons},ttvrMarkerAggregate:"Header"})}} `)}</div>`)} ${(0,qn.g)((e=>e.config.complianceHyperlink),Hn.dy`<a href=${e=>(0,x.h_)(e.config.complianceHyperlink.url)} id="complianceHyperlink" class="${e=>e.layoutState.imageOfTheDayEnabled?"complianceHyperlink_imageEnabled":null}" ${(0,Ue.XJ)()}>${e=>e.config.complianceHyperlink.text}</a>`)} ${(0,qn.g)((e=>e.childRefs.holidayEffects&&"off"!==e.layoutState.selectedFeedDisplaySetting&&"focused"!==e.layoutState.currentLayout),Hn.dy`<div class="holidayEffectsHolder ${e=>e.layoutState.currentBackgroundImageType!==D.HX.off?"darkMode":""}" id="holidayEffects" style="${e=>e.holidayEffectsPosition}">${e=>(0,_n.Ot)(e.childRefs.holidayEffects,{ttvrMarkerAggregate:"Header"})}</div>`)} ${(0,qn.g)((e=>e.childRefs.backgroundGallery&&e.renderBackgroundGallery),Hn.dy`<div id="backgroundGalleryContainer">${e=>(0,_n.Ot)(e.childRefs.backgroundGallery,{memoize:!1,ttvrMarkerAggregate:"Header"})}</div>`)}</div>${(0,qn.g)((e=>{var t;return(null===(t=e.config.translucentFeed)||void 0===t?void 0:t.enableTranslucentFeed)&&!e.disableStickyHeader}),Hn.dy`<div ${(0,$e.Fl)({stickyClassName:"translucentSticky",breakpointName:j})} style=${e=>e.stickyOverrideStyles}></div>`)}<div ${(0,Vn.i)("headerSpaceHolder")} id="headerSpaceHolder" style="${e=>e.config.enableAdaptiveHeader&&"always"==e.layoutState.selectedFeedDisplaySetting?"max-height":"height"}:${e=>e.contentOffHeaderHeight??e.headerHeight+"px"};${e=>ai(e)}" class="${e=>{var t;return null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableTranslucentFeed&&e.disableStickyHeader?"":"headerSpaceHolder"}}"><div id="bgOuterHolder" class="bgOuterHolder ${e=>e.config.solidColor?"solidtx":""}" ${(0,$e.Fl)({stickyClassName:"bgOuterHolder_sticky",breakpointName:G})}><div id="bgInnerHolder" style="height:${e=>e.imageHeight};">${e=>{var t,n,i,r,o,a;return(0,_n.Ot)(e.childRefs.backgroundImage,{attributes:{spaceHolderHeight:e.headerHeight,showFullPageBlur:!!(null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableBlur&&e.showFeedTranslucent&&["always","peek","headingsonly"].includes(null===(n=e.layoutState)||void 0===n?void 0:n.selectedFeedDisplaySetting)&&(e.navIsSticky||"always"==(null===(i=e.layoutState)||void 0===i?void 0:i.selectedFeedDisplaySetting)&&["load","all"].includes(null===(r=e.config.translucentFeed)||void 0===r?void 0:r.infoBlurEnabledScene))),bgBlurSize:null!==(o=e.config.translucentFeed)&&void 0!==o&&o.bgBlurSize?null===(a=e.config.translucentFeed)||void 0===a?void 0:a.bgBlurSize:"0px",displayMarqueeAd:e.marqueeAdActive,marqueeAdTopHeight:e.marqueeAdTopHeight,marqueeAdHeight:e.marqueeAdHeight,marqueeAdOverlayHeight:e.marqueeAdOverlayHeight},properties:{copilotShowCard:e.copilotShowCard},ttvrMarkerAggregate:"Header"})}}</div></div></div><div id="translucentFeedSentinel"></div>${(0,qn.g)((e=>"off"!==e.layoutState.selectedFeedDisplaySetting&&!e.config.disableFeed),bi)}
${(0,qn.g)((e=>"off"===e.layoutState.selectedFeedDisplaySetting&&e.config.enableBtnForContentOff&&!!e.childRefs.scrollDownButton&&!e.isScrollDownButtonDismissed),Hn.dy`<div id="scrollDownButtonContainer" class="exploreMoreBtn">${e=>(0,_n.Ot)(e.childRefs.scrollDownButton,{properties:{scrollToShowFeed:e.changeContentOffToVisible,isOnBackgroundImage:!!e.layoutState.imageOfTheDayEnabled}})}</div>`)}
${(0,qn.g)((e=>e.childRefs.topSites&&!e.hideOneLineTopSites),Hn.dy`${e=>(0,_n.Ot)(e.childRefs.edgeShopping)}`)}
${(0,qn.g)((e=>e.enableDevTools),Hn.dy`${e=>(0,_n.Ot)(e.childRefs.devTools)}`)}
${e=>(0,_n.Ot)(e.childRefs.sharedLinks,{ttvrMarkerAggregate:"Header"})}
${e=>(0,_n.Ot)(e.childRefs.topSitesBookmarks,{ttvrMarkerAggregate:"Header"})}
${(0,qn.g)((e=>e.childRefs.topSitesSubscription),(e=>(0,_n.Ot)(e.childRefs.topSitesSubscription)))}
${e=>(0,_n.Ot)(e.childRefs.floatButtonGroupWC,{properties:{overlapState:e.overlapState},attributes:{class:"floatButtonGroup"}})}
${(0,qn.g)((e=>e.childRefs.dailyBrief),(e=>(0,_n.Ot)(e.childRefs.dailyBrief)))}
${(0,qn.g)((e=>e.childRefs.contentGroupCard),(e=>(0,_n.Ot)(e.childRefs.contentGroupCard,{properties:{isSmartList:!0}})))}
${(0,qn.g)((e=>e.config.feedbackOldStyle&&e.childRefs.feedback),Hn.dy`${e=>{var t,n,i,r;return(0,_n.Ot)(e.childRefs.feedback,{properties:{isAutoHide:e.config.feedbackOldStyle&&!e.isAlwaysMode&&!e.config.noHideFeedbackButton,overlapState:e.overlapState.feedbackState},attributes:{showFullPageBlur:!!(null!==(t=e.config.translucentFeed)&&void 0!==t&&t.enableBlur&&e.showFeedTranslucent&&["always","peek","headingsonly"].includes(null===(n=e.layoutState)||void 0===n?void 0:n.selectedFeedDisplaySetting)&&(e.navIsSticky||"always"==(null===(i=e.layoutState)||void 0===i?void 0:i.selectedFeedDisplaySetting)&&["load","all"].includes(null===(r=e.config.translucentFeed)||void 0===r?void 0:r.infoBlurEnabledScene)))||e.showDarkIcon},ttvrMarkerAggregate:"Header"})}}`)}
${e=>e.childRefs.channelStore&&(0,_n.Ot)(e.childRefs.channelStore,{properties:{showOverlay:!1}})}
${e=>e.childRefs.shoppingNotification&&(0,_n.Ot)(e.childRefs.shoppingNotification)}
${(0,qn.g)((e=>e.childRefs.toastWC&&e.shouldRenderToastWC),(e=>(0,_n.Ot)(e.childRefs.toastWC)))}
`,Li=Hn.dy` ${(0,qn.g)((e=>e.config.enableMournMode),Hn.dy`<div class="mourn">${Mi}</div>`)} ${(0,qn.g)((e=>!e.config.enableMournMode),Mi)} ${(0,qn.g)((()=>!(0,st.N)()),ri)}
`;var Di=n(97030),Ri=n(78923),Fi=n(29717),Oi=n(74449),Bi=n(39238),Ni=n(32572),$i=n(35680);const Ui=(C.K.Over+2).toString(),_i=(C.K.Over+3).toString(),Hi=(C.K.Nav+2).toString(),Wi="https://assets.msn.com/staticsb/statics/pr-4464804/icons-wc/icons/marquee-ad/CloseButtonHoverBlack.svg",qi="https://assets.msn.com/staticsb/statics/pr-4464804/icons-wc/icons/marquee-ad/CloseButtonWhite.svg",Vi="https://assets.msn.com/staticsb/statics/pr-4464804/icons-wc/icons/marquee-ad/CloseButtonHoverWhite.svg",Gi=Ri.i`
.companyLogoHolder_aboveSearch > svg{fill:white}.navAndContent,.nav.nav_sticky,.bgOuterHolder_sticky,.solidtx{background:#242424}.translucentHeader.nav.nav_sticky{background:#242424e6}.translucentSticky{background:#242424}.navAndContent_wb{background:rgba(0,0,0,.5) !important}.doubleWideRiverCard,.singleWideRiverCard{background:#656565}.skeleton{background:#4a4a4a}.copilotRequestAnything{border:1px solid #69A1FA}.copilotRequestAnything span{color:#69A1FA}.copilotCoachMark{border:1px solid #69A1FA}.copilotCoachMark span{color:#69A1FA}.marqueeAdContainerV3 .marqueeAdContent{background-color:#292929}.marqueeAdContainerV3 .marqueeAdTitle{color:#FFF}.marqueeAdContainerV3 .marqueeAdCTA{border:1px solid #FFF;color:#FFF;background-color:#292929}.marqueeAdContainerV3 .marqueeAdCTA:hover{background-color:#3D3D3D}.marqueeAdContainerV3 .marqueeAdCTA:focus{background-color:#1F1F1F}.marqueeAdContainerV3 #marqueeAdDismissButton{background:url(${qi})}.marqueeAdContainerV3 #marqueeAdDismissButton:hover,.marqueeAdContainerV3 #marqueeAdDismissButton:focus{background:url(${Vi})}.marqueeAdContainerV3 #marqueeAdDismissButton::part(content){visibility:hidden;background:url(${Vi})}`,zi=Ri.i`${(0,_.vW)(null,_.K$.c2)}{.contentSized{width:${Di._3.toString()}px}#topSitesHolder{height:100%}.skeleton-container{width:${Di._3.toString()}px}.fixed-size-card{display:flex;flex-direction:column;height:304px;width:274px;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}.fixed-size-card-infopane{display:flex;flex-direction:column;height:304px;width:560px;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}}${(0,_.eH)(_.K$.c3)}{.contentSized{width:${Di.Xn.toString()}px}.skeleton-container{width:${Di.Xn.toString()}px}.fixed-size-card{display:flex;flex-direction:column;height:304px;width:282px;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}.fixed-size-card-infopane{display:flex;flex-direction:column;height:304px;width:576px;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}}${(0,_.eH)(_.K$.c4)}{.contentSized{width:${Di.xX.toString()}px}.skeleton-container{width:${Di.xX.toString()}px}.fixed-size-card{display:flex;flex-direction:column;height:304px;width:287px;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}.fixed-size-card-infopane{display:flex;flex-direction:column;height:304px;width:586px;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}}${(0,_.vW)(_.K$.c5,null)}{.contentSized{width:var(--m365-column-width,${Di.sc.toString()}px)}.skeleton-container{width:${Di.sc.toString()}px}.fixed-size-card{display:flex;flex-direction:column;height:304px;width:289px;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}.fixed-size-card-infopane{display:flex;flex-direction:column;height:304px;width:590px;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}}${(0,_.vW)(null,_.K$.c1)}{.contentSizedOneColumn{width:${Di.xs.toString()}px}.nav.navStickyOneColumn{top:0}.navStickyOneColumn.conditionalBannerShown{top:30px}.navAndContentOneColumn{z-index:401}.skeleton-container{width:${Di.xs.toString()}px}.fixed-size-card-infopane{display:flex;flex-direction:column;height:304px;width:100%;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}.fixed-size-card{display:flex;flex-direction:column;height:304px;width:100%;border-radius:5px;float:left;margin-bottom:12px;margin-right:12px}}@media (min-width:1133px) and (max-width:1256px){.contentSized.short{width:1109px}}@media (min-width:${(0,W.sZ)(3).toString()}px) and (max-width:1132px){.contentSized.short{width:996px}#topSitesHolder.short{transform:scale(0.9)}}@media (min-width:856px) and (max-width:948px){.contentSized.short{width:830px}#topSitesHolder.short{transform:scale(0.9)}}@media (min-width:${(0,W.sZ)(2).toString()}px) and (max-width:855px){.contentSized.short{width:775px}#topSitesHolder.short{transform:scale(0.9)}}`,ji=Ri.i`
:host(){--breaking-news-height-offset:0}#backgroundGalleryContainer{position:relative;z-index:${C.K.Flyout.toString()}}#scrollDownButtonContainer{position:fixed;z-index:${(C.K.Over+3).toString()}}.exploreMoreBtn{width:100vw;display:flex;justify-content:center}.mourn{filter:grayscale(1)}.backgroundGalleryMinimumWidthToast{bottom:25px;left:50%;position:fixed;transform:translateX(-50%);width:fit-content;z-index:${C.K.Overlay.toString()}}.bgOuterHolder{height:100%;overflow:hidden;position:fixed;width:100%}.bgOuterHolder_sticky{background:#F7F7F7;height:calc(var(--sticky-height,108px) + var(--search-sticky-extra-height,0px));z-index:${C.K.Over.toString()}}#bgInnerHolder{height:100%;opacity:1;overflow:hidden;top:0px;transform:scale(1);width:100%}.coachMarkHolder{left:initial;position:fixed;z-index:${C.K.Flyout.toString()}}.companyLogoHolder_aboveSearch{align-self:end;height:48px;opacity:1;width:225px}.companyLogoHolder_aboveSearch > svg{fill:#737373}#complianceHyperlink{bottom:8px;color:${Oi.Q};font-size:10px;justify-self:self-start;padding:0 8px;opacity:1;position:absolute;text-decoration:none;transition:opacity 0.2s;z-index:${Ui}}#complianceHyperlink.complianceHyperlink_imageEnabled,#complianceHyperlink.translucentFeed{color:white;opacity:0.64}#complianceHyperlink.onScroll{transform:translate(-50%,-60px)}.complianceHyperlink_hide{opacity:0 !important}.doubleWideRiverCard,.singleWideRiverCard{background:#dadada;border-radius:8px;height:304px}.doubleWideRiverCard{width:612px}.singleWideRiverCard{width:300px}.blankRiverContainer{display:flex;gap:12px}.blankRiverContainer.fadeOut{opacity:0;transition:opacity 0.5s}.location-marker{bottom:5px;color:white;justify-self:self-start;padding:0 8px;opacity:1;position:absolute;left:36px;text-decoration:none;transition:opacity 0.2s;z-index:${C.K.Nav.toString()}}.conditionalBannerHolder{max-height:200px;position:fixed;top:0;width:100%;z-index:${C.K.Overlay.toString()}}#headerGrid{display:grid;justify-items:center;width:100%}.headerGrid_hidden{visibility:hidden}.headerGrid_visible{opacity:1}.headerSpaceHolder{transition:height .3s ease-out,visibility 0.3s}#headerSpaceHolder{position:absolute;top:0}.holidayEffectsHolder{position:absolute;bottom:7px;opacity:1}.holidayEffectsHolder.darkMode{--border:none;--bg-color:#0000008A;--flipper-color:#fff}.holidayEffectsSticky{--menu-opacity:0}.nav{display:flex;height:var(--nav-height);justify-content:center;z-index:${C.K.Nav.toString()}}.navAndContent{align-items:center;background:#F7F7F7;display:flex;flex-direction:column;min-height:100vh;position:relative;transition:background-color 0.4s ease-in-out}.navAndContent.navAndContent_tb{background:#00000051}.navAndContent.navAndContent_nb{background:#00000000}.navAndContent_wb{background:rgba(255,255,255,.5) !important;backdrop-filter:blur(10px);transition:unset !important}.navAndContent.navAndContent_nwb{transition:unset}navAndContent.riverZoom{overflow-x:hidden}#recommendedSites{align-items:center;display:flex;flex-direction:column}#recommendedSites.hide{display:none}#recommendedSites.unified{z-index:${Ui}}.navAndContent_feed{align-items:center;display:flex;flex-direction:column;transition:background-color 0.4s ease-in-out,opacity 0.4s ease-in-out}.navAndContent_feed_fullpage{width:100%}.navAndContent_border_shadow{border-radius:12px;padding-left:20px;padding-right:20px;box-shadow:rgba(0,0,0,0.35) 0px 0px 15px;transition:1s box-shadow ease}.navAndContent_border_shadow.navAndContent_noshadow{box-shadow:rgb(0 0 0 / 0%) 0px 0px 0px 0px}@media ((min-width:632px) and (max-width:675px)){.navAndContent_border_shadow{width:93%}}@media ((min-width:944px) and (max-width:990px)){.navAndContent_border_shadow{width:95%}}@media ((min-width:1256px) and (max-width:1300px)){.navAndContent_border_shadow{width:96.5%}}@media ((min-width:1568px) and (max-width:1613px)){.navAndContent_border_shadow{width:97%}}.g_nav_container{position:relative;display:flex;justify-content:center;width:100%}.navAndContent_feed > .contentBelowNav{margin-top:var(--nav-height)}.navAndContent_feed > .contentNoNav{margin-top:20px}.navAndContent_feed_hidden_rs{background:#00000051}.nav{position:absolute;top:0px;width :100%}.nav.nav_sticky{background:#F7F7F7;position:fixed;top:calc(var(--sticky-height,108px) + var(--search-sticky-extra-height,0px));width:100%}.translucentHeader.nav.nav_sticky{background:#F7F7F7e6}.navSized{align-items:center;display:flex;gap:5px}.translucentSticky{background:#F7F7F7;height:108px;position:fixed;top:0px;width:100%;z-index:${C.K.Over.toString()}}#weatherOneLinerHolder{min-width:0;z-index:302;opacity:1}.oneline-weather-holder-margin{margin-top:auto;margin-bottom:15px}.oneline-weather-holder-content-off{margin-bottom:40px}.oneline-weather-holder-content-off-bg{margin-bottom:20px}#topSitesHolder{--notification-mini-card-width:208px;--notification-mini-card-height:58px;--notification-mini-card-vertical-gap:0;--notification-mini-card-gap:30px;height:100%;min-width:0;z-index:${_i};opacity:1}#topSitesHolder.oneline-topsite-holder{height:36px;position:fixed;top:var(--top-banner-offset-height,0px);width:100%;z-index:${Hi}}#topSitesHolder.hide{visibility:hidden;opacity:0}#topSitesHolder.move-upward{z-index:${Hi}}#topSitesHolder.enable-notification{display:flex;justify-content:center}#topSitesHolder.enable-notification top-sites-edgenext{max-width:fit-content}#notificationMiniCardWrapper{width:0;margin-top:var(--notification-mini-card-vertical-gap)}#topSitesHolder.notification-anime #notificationMiniCardWrapper{transition:all 0.3s ease-in}#topSitesHolder.notification-left #notificationMiniCardWrapper:has(notification-mini-card:defined){width:var(--notification-mini-card-width);margin-inline-end:var(--notification-mini-card-gap)}#topSitesHolder.notification-left #notificationMiniCardWrapper notification-mini-card{float:right}#topSitesHolder.notification-right #notificationMiniCardWrapper:has(notification-mini-card:defined){width:var(--notification-mini-card-width);margin-inline-start:var(--notification-mini-card-gap)}#topSitesHolder.notification-right #notificationMiniCardWrapper notification-mini-card{float:left}.topSitesZoomHidden{visibility:hidden}.headerGrid_hidden cs-header-core::part(core){top:calc(-1 * var(--header-height));display:none}cs-header-core{z-index:${Hi}}cs-header-core.hide-search-box:focus-within{z-index:700}@media (max-width:1097px){#topSitesHolder{height:100%}}.contentSizedFullScreen{width:100%!important}.refreshPage{height:50px;width:50px;margin-top:50px;margin-bottom:-50px}.refreshPage.hide{animation:hideRefreshBtn ease-in both 1s}@keyframes hideRefreshBtn{from{height:50px;opacity:1}to{height:0px;opacity:0}}.refreshPage fluent-progress-ring{margin:8px auto}.weather-current-precipitation-glyph{margin-inline-start:auto;margin-inline-end:4px;fill:currentcolor;filter:invert(var(--iconInvert))}.nocolor-img-aqi,.nocolor-img-nm-aqi{filter:invert(var(--iconInvert))}.nocolor-img-aqi{width:20px !important;height:20px !important}.marqueeAdOverlayV3{width:100%;user-select:none;font-style:normal;z-index:${Ui}}.marqueeAdLargeV3,.marqueeAdMediumV3{margin:22px 0}.marqueeAdSmallV3{margin-top:12px;margin-bottom:22px}.marqueeAdContainerV3{display:flex;box-sizing:border-box;border-radius:12px;border:1px solid rgba(0,0,0,0.05);overflow:hidden;position:relative}.marqueeAdSmallV3{width:338px;min-height:180px}.marqueeAdMediumV3{width:612px;min-height:88px}.marqueeAdLargeV3{width:612px;min-height:100px}.marqueeAdMediumV3.alighWith2ColumnWidth{width:652px}.marqueeAdSmallV3 .marqueeAdContainerV3{flex-direction:column}.marqueeAdContainerV3 .marqueeAdSponsor{width:159px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:12px;color:#FFF;font-weight:400;line-height:16px;margin:0;background-color:#FFF}.marqueeAdSmallV3 .marqueeAdSponsor{width:100%;height:82px;padding:16px;box-sizing:border-box;align-items:center}.marqueeAdSponsorLogo{margin-top:8px;background:none;height:auto}.marqueeAdSponsorLogo::part(control){padding:0;border:0}.marqueeAdSponsorLogoImage{display:block;width:100%;height:100%;max-width:127px;max-height:36px}.marqueeAdContent{flex:1;display:flex;flex-direction:column;align-items:flex-start}.marqueeAdContainerV3 .marqueeAdContent{background-color:#FFF;padding:16px;box-sizing:border-box}.marqueeAdTitle{font-weight:600}.marqueeAdSmallV3 .marqueeAdTitle{font-size:14px;line-height:20px}.marqueeAdLargeV3 .marqueeAdContainerV3 .marqueeAdTitle{font-size:16px;line-height:22px;width:380px}.marqueeAdMediumV3 .marqueeAdContainerV3 .marqueeAdTitle{font-size:14px;line-height:20px;width:380px}.marqueeAdSmallV3 .marqueeAdContainerV3 .marqueeAdTitle{font-size:14px;line-height:20px}.marqueeAdContainerV3 .marqueeAdCTA{height:auto;display:flex;align-items:center;justify-content:center;border-radius:1000px;border:1px solid #242424;cursor:pointer;text-decoration:none;color:#2F2F2F;background-color:#FFFFFF;padding:5px 10px}.marqueeAdContainerV3 .marqueeAdCTA:hover{background-color:#F5F5F5}.marqueeAdContainerV3 .marqueeAdCTA:focus{background-color:#E0E0E0}.marqueeAdContainerV3 .marqueeAdCTA::part(control){padding:0;border:0;font-size:16px;font-weight:600;line-height:22px}.marqueeAdLargeV3 .marqueeAdCTA{padding:5px 16px}.marqueeAdMediumV3 .marqueeAdCTA{padding:3px 12px}.marqueeAdMediumV3 .marqueeAdCTA::part(control){font-size:12px;font-weight:600;line-height:16px}.marqueeAdLargeV3 .marqueeAdCTA,.marqueeAdMediumV3 .marqueeAdCTA{margin-top:12px}.marqueeAdSmallV3 .marqueeAdCTA{margin-top:12px;padding:3px 12px}.marqueeAdSmallV3 .marqueeAdCTA::part(control){font-size:12px;font-weight:600;line-height:16px}.marqueeAdContainerV3 #marqueeAdDismissButton{position:absolute;right:16px;top:16px;width:20px;height:20px;min-width:0;background:url(${"https://assets.msn.com/staticsb/statics/pr-4464804/icons-wc/icons/marquee-ad/CloseButtonBlack.svg"})}.marqueeAdContainerV3 #marqueeAdDismissButton:hover,.marqueeAdContainerV3 #marqueeAdDismissButton:focus{background:url(${Wi})}.marqueeAdContainerV3 #marqueeAdDismissButton::part(control){padding:0;border:0}.marqueeAdContainerV3 #marqueeAdDismissButton::part(content){visibility:hidden;background:url(${Wi})}.marqueeAdSmallV3 .marqueeAdContainerV3 #marqueeAdDismissButton{background:url(${qi})}${zi} .contentPlaceHolder{min-height:100vh}.solidtx{background:#f5f5f5}.content-size-responsive{min-width:100%;width:100%}.nav-size-responsive{width:100%;min-width:100%}.nav-feed-size-responsive{margin:0px 24px;min-width:90%}@media (min-width:${Di.gf.toString()}px){.nav-feed-size-responsive{margin:0px 24px;min-width:1588px;max-width:2088px}}.skeleton-container{height:100%;position:absolute;top:43px;z-index:99999999;background:${Bi._B}}.work-feed{height:0px}.skeleton-channel{display:flex;position:relative;padding:20px 20px;box-sizing:border-box;overflow:hidden}.skeleton-feed{display:block;flex-direction:column;position:relative;padding:20px;box-sizing:border-box;overflow:hidden}.skeleton-header{padding:12px 20px 0}.skeleton-header .card-label{height:15px;width:95px;border-radius:5px}.fixed-size-card .card-img{width:100%;height:157px;border-radius:5px}.fixed-size-card .card-label{margin:10px 16px 8px 16px;height:16px;width:100px;border-radius:5px}.fixed-size-card .card-text{margin:5px 16px 0 16px;height:20px;border-radius:5px}.fixed-size-card-infopane .card-img{width:100%;height:380px;border-radius:5px}.fixed-size-card .work-feed{height:0px}.fixed-size-card-infopane .work-feed{height:0px}.skeleton{display:block;background:#e0e0e0;position:relative;overflow:hidden}.skeleton:before{content:"";display:block;position:absolute;top:0;left:-80px;height:100%;width:80px;opacity:0.3;background-image:linear-gradient(to right,transparent,#f5f5f5,transparent);animation:shine 1s infinite}@keyframes shine{to{left:calc(100% + 80px)}}.fixed-size-feed{margin:0 auto}.floatButtonGroup{position:relative;z-index:500}.copilotContainer{bottom:145px;left:initial;right:42px;position:relative}.copilotMuseumTemplateHasCoachMark{display:block;position:fixed;bottom:145px;left:initial;right:42px;width:0px;height:0px;width:173px;overflow:hidden;transition:all 0.3s ease-in-out}.copilotMuseumTemplate{display:block;position:fixed;bottom:145px;left:initial;right:42px;width:285px;max-height:500px;padding:8px 16px 16px 16px;border-radius:6px;background:var(--neutral-layer-floating);box-shadow:0px 4px 20px 0px #00000029;z-index:1000;overflow:hidden;transition:all 0.3s ease-in-out}.copilotMuseumCard_show{visibility:visible;transition:opacity 0.2s,visibility 0s;opacity:1}.copilotMuseumCard_hide{opacity:0;visibility:hidden;transition:opacity 0.2s,visibility 0s 0.2s}span[slot="start"]{margin-inline:0px}.copilotMuseumTemplate .messageBigBox{overflow-x:hidden;overflow-y:auto;padding-bottom:10px}.heading-container{border-radius:2px 2px 0px 0px;display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.heading-container .title{font-size:${Ni.P};line-height:${Ni.b};color:var(--neutral-foreground-rest);font-weight:600;font-weight:700;letter-spacing:0em;text-align:left;margin-top:0;margin-bottom:0;transition:all 0.2s ease-in-out;display:inline-block;user-select:none}.openCopilot-close-button{background:transparent}.openCopilot-close-button:hover{background-color:${$i.Xi}}.openCopilot-close-button:active{background-color:${$i.Gy}}.close-button-glyph{display:flex}.close-button-glyph svg{item-align:center;fill:inherit}.openCopilotIcon{height:16px;width:16px;transform:scale(2);fill:inherit}.openCopilotIconBox{display:flex}.copilotMuseumCard{display:flex;flex-direction:column;align-items:flex-end;overflow:hidden;width:100%;max-height:78%;gap:8px;overflow-y:auto}.copilotMuseumCard .message-box{max-width:90%;height:25px;display:flex;align-items:center;padding:4px 12px 6px 12px;border-radius:12px;border:1px solid var(--neutral-stroke-rest);background:var(--neutral-fill-rest);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-bottom:8px;cursor:pointer;color:var(--neutral-foreground-rest);font-weight:400}.copilotMuseumCard .message-box:hover{background:var(--neutral-fill-hover)}.copilotMuseumCard .message-box .framesSlideIn{animation:slide-top 1s cubic-bezier(0.25,0.46,0.45,0.94) forwards}@keyframes slide-top{0%{transform:translateY(0)}100%{transform:translateY(-100%)}}@keyframes slide-in{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}.copilotRequestAnything{width:173px;padding:4px 10px 4px 10px;border-radius:10px;border:1px solid #036ac4;text-align:center;display:flex;align-items:center;justify-content:center;margin:auto;cursor:pointer}.copilotRequestAnything span{color:#036ac4;font-size:16px;font-weight:600;line-height:28px;letter-spacing:0em;text-align:left;margin-left:5px}.requestAnythingBox{}.copilotCoachMark{width:173px;padding:2px;border-radius:10px;border:1px solid #036AC4;display:block;position:fixed;bottom:140px;left:initial;right:42px;background:var(--neutral-layer-floating);box-shadow:0px 4px 20px 0px #00000029;z-index:1000;overflow:hidden;text-align:center;display:flex;align-items:center;justify-content:center;margin:auto;cursor:pointer}.copilotCoachMark span{color:#036ac4;font-size:16px;font-weight:600;line-height:28px;letter-spacing:0em;text-align:left;margin-left:5px}.copilotCoachMark,.copilotMuseumTemplate{transition:all 0.3s ease-in-out}.copilotMuseumCard_hide{opacity:0;visibility:hidden;transform:scale(0.9)}`.withBehaviors((0,Fi.Uu)(Gi)),Ki=ji,Qi={experienceConfigSchema:undefined};(0,i.W)()},43974:function(e,t,n){"use strict";n.r(t),n.d(t,{AdLabelType:function(){return _},BlockedDomainAndTitles:function(){return U},BlockedHosts:function(){return $},DragDropType:function(){return c},GroupPolicySettings:function(){return a},OneLineTopSitesStyles:function(){return so},OptioTopSitesTemplate:function(){return ti},SharedLinksUrl:function(){return N},TileSource:function(){return s},TileSourceString:function(){return z},ToggleOverflowMenuElement:function(){return H},ToolingInfo:function(){return mo},TopSitesClassNameConstants:function(){return B},TopSitesDataHelper:function(){return Wi},TopSitesEdgeNextWC:function(){return Ar},TopSitesEdgeNextWCInlineStyles:function(){return ho},TopSitesEdgeNextWCStyles:function(){return go},TopSitesEdgeNextWCTemplate:function(){return Li},TopSitesEdgeNextWCWithJSDependencyStyles:function(){return po},TopSitesElementConstants:function(){return O},TopSitesNextStyles:function(){return uo},TopSitesResponsiveStyles:function(){return lo},UnifiedTopSitesResponsiveStyles:function(){return co},WEB_APPS_GET_INFO_LOADING_ACTION_ID:function(){return ce},WINDOWS_INDEXER_PROMOTED_SITES_PSL_KEY:function(){return de},addDialogHeight:function(){return p},addDialogWithSubSectionHeight:function(){return h},blockedDomainsPair:function(){return W},closeButtonSvg:function(){return fi},contextMenuWidth:function(){return g},defaultMaxTileForFirstRow:function(){return y},defaultMaxTileForSixteenTopSites:function(){return f},defaultMaxTileForThreeRowsTopSites:function(){return S},defaultMaxTileForTwentyTopSites:function(){return v},defaultMaxTiles:function(){return m},defaultOverrideIconsList:function(){return q},defaultTopSiteIcon:function(){return C},dialogWidth:function(){return w},displayPinIconTopSitesBindingSource:function(){return Ti},editDialogHeight:function(){return b},errorInstallingWebAppToastTemplate:function(){return Ci},feeds3T1SearchBoxWidthTilesxColxRowsMap:function(){return ae},feeds3T1SearchBoxWidthWithNotificationMiniCardTilesxColxRowsMap:function(){return se},installingWebAppToastTemplate:function(){return Si},isOverflowNotEmpty:function(){return Pi},notificationToastDefaultDisplayMs:function(){return T},openWebAppToastTemplate:function(){return wi},overflowTopSitesBindingSource:function(){return ki},pinToastDefaultDisplayMs:function(){return k},pinToastTemplate:function(){return yi},tileDialogMargin:function(){return P},tileSourceToTopSiteDataCollections:function(){return oe},titleOverrides:function(){return V},topSiteAddDialogTemplate:function(){return gi},topSiteEditDialogTemplate:function(){return mi},topSiteShell:function(){return G},topSiteTileHeight:function(){return A},topSiteTileWidth:function(){return E},topSiteTopTileHeight:function(){return I},topSitesBindingSource:function(){return bi},topSitesCollapsedStorageKey:function(){return x},topSitesDragDropStorageKey:function(){return L},topSitesDragDropUnpinStorageKey:function(){return D},topSitesUndoToastMessageMargin:function(){return R},topSitesUnpinnedStorageKey:function(){return M},undoToastTemplate:function(){return vi},validQueryParameterPrefix:function(){return F}});var i=n(45900),r=n(63070),o=n(64888);var a,s,c,d=n(33940),l=n(50632),u=n(45266);!function(e){e.Enforced="ENFORCED",e.Recommended="RECOMMENDED"}(a||(a={})),function(e){e[e.CuratedTileSource=-5]="CuratedTileSource",e[e.UserAddedTileSource=4]="UserAddedTileSource",e[e.UserAddedTileSourceNewVal=3]="UserAddedTileSourceNewVal",e[e.AlgoGeneratedTileSource=0]="AlgoGeneratedTileSource",e[e.WPOPromotedTileSource=-4]="WPOPromotedTileSource",e[e.PromotedCuratedTileSource=-6]="PromotedCuratedTileSource",e[e.SponsoredPromotedCuratedTileSource=-7]="SponsoredPromotedCuratedTileSource",e[e.SponsoredCuratedTileSource=-8]="SponsoredCuratedTileSource",e[e.AffiliateAutoAppendTileSource=2]="AffiliateAutoAppendTileSource"}(s||(s={})),function(e){e[e.DragDrop=1]="DragDrop",e[e.DragDropUnpin=-1]="DragDropUnpin"}(c||(c={}));const p=282,h=386,g="130px",m=8,f=16,v=20,y=10,S=30,C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFZJREFUeNrsl7EJADAIBGPIEO4/nVt8SCFkgijhvhCsPNQHNUmjWnM0EBCpdYK7i07cSUTYy+I5ARaz705UuQR34A4ggAACCCCA4LL6qhPGV94JYgswAGXGEhq663zFAAAAAElFTkSuQmCC",w=320,b=176,T=1e4,k=1200,P=8,I=30,A=84,E=108,x="tsCollapsed",M="tsUnpinned",L="tsDragDrop",D="tsDragDropUnpin",R=32,F=/^(\/\?|\?|&|)/,O={topSitesContainerId:"TopSitesContainer",topSitesId:"TopSitesCommon",topSitesClassSelector:"topSitesCommon",topSiteActionMenuId:"tsam"},B={topSitesDarkOnBackgroundImage:"topSitesDarkOnBackgroundImage",topSitesLightOnBackgroundImage:"topSitesLightOnBackgroundImage",topSitesDark:"topSitesDark",topSitesLight:"topSitesLight",tenSites:"ten-sites",nineSites:"nine-sites",eightSites:"eight-sites",sixSites:"six-sites",twoRowSites:"two-row-sites",feeds3T1SearchBoxWidth:"f3t1tsb",feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled:"qbf3t1tsb",large:"Large"},N="https://ntp.msn.com/edge/ntp?feedPivot=productivityHub&query=enterprise&prodHubSmartPrompt=shared-links-tab",$=["ntp.msn.com","ntp.msn.cn","microsoftedgewelcome.microsoft.com"],U={"go.microsoft.com":["Welcome to Microsoft Edge"],"msn.com":["MSN","Microsoft Start"]};var _,H;!function(e){e[e.topSiteAdLabelBig=0]="topSiteAdLabelBig",e[e.topSiteAdLabelSmall=1]="topSiteAdLabelSmall",e[e.topSiteAdTxtBig=2]="topSiteAdTxtBig",e[e.topSiteAdTxtSmall=3]="topSiteAdTxtSmall"}(_||(_={})),function(e){e[e.AllQuickLinksButton=1]="AllQuickLinksButton",e[e.SeeMoreButton=2]="SeeMoreButton"}(H||(H={}));const W=[{url:"https://www.bing.com",exc:["maps"]},{url:"https://www2.bing.com",exc:["maps"]},{url:"https://bing.com",exc:["maps"]},{url:"https://chat.bing.com"},{url:"https://www.google.co.jp",exc:["maps","photos","flights"]},{url:"https://google.com",exc:["maps","photos","flights","mail"]},{url:"https://www.google.com",exc:["maps","photos","flights"]},{url:"https://www.google.com.au",exc:["maps","photos","flights"]},{url:"https://www.google.com.br",exc:["maps","photos","flights"]},{url:"https://www.google.com.fr",exc:["maps","photos","flights"]},{url:"https://www.google.co.uk",exc:["maps","photos","flights"]},{url:"https://www.google.de",exc:["maps","photos","flights"]},{url:"https://www.yahoo.com"},{url:"https://search.yahoo.com"},{url:"https://uk.yahoo.com "},{url:"https://uk.search.yahoo.com"},{url:"https://de.yahoo.com"},{url:"https://de.search.yahoo.com"},{url:"https://fr.yahoo.com"},{url:"https://fr.search.yahoo.com"},{url:"https://ca.yahoo.com"},{url:"https://ca.search.yahoo.com"},{url:"https://au.yahoo.com"},{url:"https://www.yahoo.co.jp"},{url:"https://search.yahoo.co.jp"},{url:"https://www.baidu.com"},{url:"https://www.duckduckgo.com"},{url:"https://yandex.com"},{url:"https://www.yandex.com"},{url:"https://www.yandex.ru"},{url:"https://www.naver.com"},{url:"https://www.microsoft.com/en-us/edge/update"}],q={"https://www.office.com":"AA13Q6AL","https://www.office.com/":"AA13Q6AL"},V={"https://www.office.com":"Microsoft 365","https://www.office.com/":"Microsoft 365"},G={rid:1,dataGenerationTime:null,faviconUrl:"",domain:"",enforcement:void 0,title:" ",tileSource:0,tileTitleSource:0,url:"",direction:"ltr"},z={0:"AlgoGenerated",[-5]:"CuratedTileSource",4:"UserAddedTileSource",3:"UserAddedTileSourceNewVal"},j=new Set,K=new Set,Q=new Set,Z=new Set,J=new Set,X=new Set,Y=new Set,ee=new Set,te=new Set,ne=new Set,ie=new Set,re=new Set,oe=new Map([[0,[ne,ie,re]],[-5,[j,K,Q]],[4,[Z,J,X]],[3,[Y,ee,te]]]),ae={[u.Z3.onerow]:{[l.K$.c1]:{default:{tile:8,class:B.feeds3T1SearchBoxWidth}},[l.K$.c2]:{default:{tile:10,class:B.feeds3T1SearchBoxWidth}},[l.K$.c3]:{default:{tile:6,class:B.feeds3T1SearchBoxWidth}},[l.K$.c4]:{default:{tile:9,class:B.feeds3T1SearchBoxWidth}},[l.K$.c5]:{default:{tile:9,class:B.feeds3T1SearchBoxWidth}}},[u.Z3.tworows]:{[l.K$.c1]:{default:{tile:8,class:B.feeds3T1SearchBoxWidth}},[l.K$.c2]:{default:{tile:10,class:B.feeds3T1SearchBoxWidth}},[l.K$.c3]:{default:{tile:12,class:B.feeds3T1SearchBoxWidth}},[l.K$.c4]:{default:{tile:18,class:B.feeds3T1SearchBoxWidth}},[l.K$.c5]:{default:{tile:18,class:B.feeds3T1SearchBoxWidth}}},[u.Z3.top]:{[l.K$.c1]:{default:{tile:100,class:""}},[l.K$.c2]:{default:{tile:100,class:""}},[l.K$.c3]:{default:{tile:100,class:""}},[l.K$.c4]:{default:{tile:100,class:""}},[l.K$.c5]:{default:{tile:100,class:""}}}},se={[u.Z3.onerow]:{[l.K$.c1]:{default:{tile:8,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}},[l.K$.c2]:{default:{tile:10,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}},[l.K$.c3]:{default:{tile:3,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}},[l.K$.c4]:{default:{tile:6,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}},[l.K$.c5]:{default:{tile:6,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}}},[u.Z3.tworows]:{[l.K$.c1]:{default:{tile:8,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}},[l.K$.c2]:{default:{tile:10,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}},[l.K$.c3]:{default:{tile:6,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}},[l.K$.c4]:{default:{tile:12,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}},[l.K$.c5]:{default:{tile:12,class:B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}}},[u.Z3.top]:{[l.K$.c1]:{default:{tile:100,class:""}},[l.K$.c2]:{default:{tile:100,class:""}},[l.K$.c3]:{default:{tile:100,class:""}},[l.K$.c4]:{default:{tile:100,class:""}},[l.K$.c5]:{default:{tile:100,class:""}}}},ce="WEB_APPS_GET_INFO_LOADING_ACTION_ID",de="ntp.promoted_top_sites";var le=n(54297),ue=n(21789),pe=n(22140);const he=/www\d*\./i,ge=/^https?:/i;class me{constructor(e){if(!pe.b.isNotNullOrUndefined(e))return;let t;try{t=new URL(e.trim())}catch{t=void 0}if(!t||!e.toLocaleLowerCase().startsWith(t.origin.toLocaleLowerCase()))try{t=new URL("http://"+e)}catch{t=void 0}if(!t||!t.host||!ge.test(t.protocol))return;const n=t.hostname.replace(he,"");this.url=t.href.replace(/\/$/,""),this.domain=n,this.domainAndPath=this.domain+t.pathname.replace(/[\s/]+$/g,""),this.domainPathAndQuery=this.domainAndPath+t.search,this.hasQuery=!!t.search}}const fe="//img-s-msn-com.akamaized.net/tenant/amp/entityid/",ve="//img-s.msn.cn/tenant/amp/entityid/",ye="removedTopSiteUrls",Se={};let Ce,we,be,Te;function ke(e){if(e){return null!=ue.jG&&ue.jG.IsChinaCompliance?`${ve}${e}.img`:`${fe}${e}.img`}return C}function Pe(e){if(e){return(e&&e.match(/cms\/api\/amp\/image\/([a-z0-9]+)$/i)||{})[1]}return null}function Ie(e,t){t&&!e[t]&&(e[t]=!0)}Te=(0,le.$o)(),be=Te.getObject(ye)||{},we={};var Ae=n(71486),Ee=n(20089),xe=n(13334),Me=n(20196),Le=n(91046),De=n(96329),Re=n(72322),Fe=n(98619),Oe=n(45870),Be=n(40378),Ne=n(28326),$e=n(55522),Ue=n(94409),_e=n(23234),He=n(26465),We=n(76040),qe=n(88456),Ve=n(2587),Ge=n(79545),ze=n(85205),je=n(69233),Ke=n(62929),Qe=n(28496),Ze=n(74161),Je=n(87172),Xe=n(7476),Ye=n(10754),et=n(21930),tt=n(88826),nt=n(27681),it=n(23549),rt=n(82898),ot=n(78951);const at="curated_topsite",st="user_topsite",ct="frequent_topsite",dt="promotedcurated_topsite",lt="promotedcurated_topsite_sponsored",ut="wpopromoted_topsite",pt="curatedleadgen_topsite",ht="autoappend_topsite",gt="tile",mt="url",ft="context_menu",vt="topsite_remove_toast",yt="remove",St="undoremove",Ct="close",wt="cancel",bt="rename",Tt="save",kt="suggestedlink",Pt="edit_dialog",It="add_dialog",At="topsiteaddtile",Et="topsite",xt="onelinetopsite",Mt="turnonpreview",Lt="turnoffpreview",Dt="topsitePinToTaskBar",Rt="unpin",Ft="pin",Ot="allquicklinkbutton",Bt="seemorebutton",Nt="settingButton",$t="dropdownSelector",Ut="action_menu";var _t;!function(e){e.tsn="tsn",e.moreOption="More Options",e.remove="Remove",e.undoRemove="Undo Remove",e.close="Close",e.rename="Rename",e.save="Save",e.cancel="Cancel",e.addSite="Add a site",e.add="Add",e.show="Show",e.suggestedLink="Add a suggested link",e.turnOnPreview="Turn On Preview",e.turnOffPreview="Turn Off Preview",e.container="Container",e.unpin="Unpin",e.pin="Pin",e.topsiteTaskbarpin="TopSite Pin to TaskBar",e.allQuickLinkButton="All Quick Link Button",e.seeMoreButton="See More Button",e.settingButton="Setting Button",e.selector="Dropdown Selector",e.edgeShoppingTile="EdgeShopping",e.ActionMenu="Action Menu"}(_t||(_t={}));const Ht="tsu";var Wt;!function(e){e.OPEN_THREE_DOT_MENU="OPEN_THREE_DOT_MENU",e.CLICK_INSTALL_OPTION="CLICK_INSTALL_OPTION",e.CLICK_OPEN_OPTION="CLICK_OPEN_OPTION",e.INSTALLING_APP_TOAST_DISMISS="INSTALLING_APP_TOAST_DISMISS",e.OPEN_APP_TOAST_DISMISS="OPEN_APP_TOAST_DISMISS",e.OPEN_APP_TOAST_OPEN_APP="OPEN_APP_TOAST_OPEN_APP",e.ERROR_INSTALLING_APP_TOAST_DISMISS="ERROR_INSTALLING_APP_TOAST_DISMISS",e.DISMISS_THREE_DOT_MENU_BEFORE_FINISH_LOAD="DISMISS_THREE_DOT_MENU_BEFORE_FINISH_LOAD"}(Wt||(Wt={}));const qt=e=>{var t,n,i,r;return void 0!==(null===(t=window)||void 0===t||null===(n=t.chrome)||void 0===n||null===(i=n.edgeWebAppsPrivate)||void 0===i||null===(r=i.WebAppsOnNTPAction)||void 0===r?void 0:r[e])&&void 0!==window.chrome.edgeWebAppsPrivate.recordWebAppsOnNtpAction&&(window.chrome.edgeWebAppsPrivate.recordWebAppsOnNtpAction(e),!0)},Vt=e=>{let t,n=!1;switch(e.tileSource){case 4:case 3:t=st;break;case-5:t=at,n=!0;break;case-6:t=dt,n=!0;break;case-7:t=lt,n=!0;break;case-4:t=ut,n=!0;break;case-8:t=pt,n=!0;break;case 2:t=ht,n=!0;break;default:t=ct}return{tileSourcePrefix:t,isCuratedOrPromoted:n}};var Gt=n(99452),zt=n(42590),jt=n(7522);function Kt(e,t){const n=[];let i=0,r=0;const o=(0,jt.Z)(t,"slot"),a=e.length+t.length;for(let t=0;t<a;t++){var s;t>=(null===(s=o[r])||void 0===s?void 0:s.slot)?n.push(o[r++]):i<e.length&&n.push(e[i++])}for(;r<o.length;)n.push(o[r++]);return n}var Qt=n(99528);const Zt=[-5,-8,-4,-6,-7];let Jt=!1;function Xt(e,t,n){var i;const r={props:{notificationDurationMs:t,closeToastNotificationHandler:n},timerId:null,startTime:t,remainingTime:t,paused:!1};(null===(i=e.currentToastTimerHandle)||void 0===i?void 0:i.timerId)&&window.clearTimeout(e.currentToastTimerHandle.timerId),e.currentToastTimerHandle=r,e.currentToastTimerHandle.startTime=Date.now(),t&&t!==1/0&&(e.currentToastTimerHandle.timerId=window.setTimeout((()=>{e.currentToastTimerHandle.props.closeToastNotificationHandler(!0)}),t))}function Yt(e){it.M0.sendAppErrorEvent({...Xe.pqC,message:e})}function en(e,t,n,i,r,o,a){if(e){const{left:s,right:c,bottom:d,top:l}=e.getBoundingClientRect(),u=a?I:A,p=t.getBoundingClientRect(),h=i-c>w,g=h?s-p.left:c-w-p.left,m=h?p.right-s-w:p.right-c,f=r-d-P>n,v=l>=n;let y="auto";f&&(y=d-p.bottom+P+"px"),f||v||(y=-l+"px");const S=f?"auto":p.bottom-d+u+P+"px";return o?`--dialog-left:${g}px;--dialog-top:${y};--dialog-bottom:${S};`:`--dialog-right:${m}px;--dialog-top:${y};--dialog-bottom:${S};`}return o?`--dialog-left:0px; --dialog-top:${P}px;`:`--dialog-right:0px; --dialog-top:${P}px;`}function tn(e,t){if(null==e||!e.mostVisitedAvailable)return[];const n=[],i=new Set,r=new Set,o=new Set,a=new Set;return e.mostVisited.forEach((s=>{const c=e.getMostVisitedItemData(s.rid),d={rid:s.rid,dataGenerationTime:c.dataGenerationTime,faviconUrl:s.faviconUrl,domain:c.domain,title:c.title,tileSource:c.tileSource,tileTitleSource:c.tileTitleSource,url:c.url,direction:c.direction,enforcement:s.enforcement,customImagePart:s.customImagePart};if(0!=c.tileSource)return n.push(d),!o.has(d.url)&&o.add(d.url),!r.has(d.domain)&&r.add(d.domain),void(!a.has(d.title)&&a.add(d.title));const l=(c.domain??an(c.url)).replace("www.","");!i.has(l)&&i.add(l),(!t||0!=c.tileSource||"https://www.office.com/"!=c.url&&"https://www.office.com"!=c.url)&&($.includes(l)||function(e,t){if(U&&U[e])for(let n=0;n<U[e].length;n++)if(0===U[e][n].localeCompare(t,{sensitivity:"accent"}))return!0;return!1}(l,c.title)||o.has(d.url)||(r.has(d.domain)||i.has(l))&&a.has(d.title)||n.push(d))})),i.clear(),r.clear(),o.clear(),n}function nn(e,t,n,i){const r=e.recommendedSites,o=be||{},a=we||{},s=new Set;let c=!1,d=new Map;i&&(c=i.requestsSuccessful,d=i.publisherIdToEligibilityMap);const l=n.map((e=>e.url)),u=r.filter((e=>{let t=!0,n=!1;(e.publisherId||e.subscriptionId)&&(t=c&&d.get(e.publisherId),n=!0),n&&function(e){if(Jt)return;Jt=!0;const t={};t["TopSitesSubscription-"+e]=1,it.M0.sendLoadTimeEvent({markers:t})}(e.title);const i=an(e.url);if(!a[i]&&!o[e.url]&&!l.includes(e.url)&&!s.has(e.url)&&t)return s.add(e.url),e})),p=t-n.filter((e=>4===e.tileSource||3===e.tileSource)).length;return u.splice(0,p)}function rn(e,t,n,i,r,o){if(n){if((a=n.url)&&(be[a]=!0,Te.setObject(ye,be)),o&&r(),Zt.includes(n.tileSource))return void t();i&&n.rid&&(i.deleteMostVisitedItem(n.rid),(0,Ke.f)(53,!!xe.Al.IsPrerender))}var a}function on(e,t,n,i,r){if(Zt.includes(i))return(o=r)&&(delete be[o],Te.setObject(ye,be)),void e();var o;if(t&&n){const e=t.getMostVisitedItemData(n),i=e?e.tileSource:null;4===i||3===i?t.undoCustomLinkAction(n):0!==i&&2!==i||t.undoMostVisitedDeletion(n)}}function an(e){try{return new URL(e).hostname}catch{return""}}function sn(e,t){t&&null!=e&&e.mostVisitedAvailable&&e.mostVisited.forEach((t=>{const n=e.getMostVisitedItemData(t.rid),i=(n.domain??an(n.url)).replace("www.",""),r=oe.get(n.tileSource);!r||r.length<3||(r[0].add(n.url),r[1].add(n.domain),r[2].add(i),0!==n.tileSource&&cn(n,0),-5!==n.tileSource&&cn(n,-5),4!==n.tileSource&&cn(n,4),3!==n.tileSource&&cn(n,3),async function(e){const t=["sign in","signin","working","loading","log in","login","logging in","interstitial","redirect"];for(let n=0;n<t.length;n++)await(0,Qt.R)(),null!=e&&e.toLocaleLowerCase().includes(t[n])&&it.M0.sendAppErrorEvent({...Xe.lqy,message:"Interstitial title appears which includes:"+t[n]})}(n.title))}))}function cn(e,t){const n=z[e.tileSource],i=z[t],r=oe.get(t),o=e.url,a=e.domain,s=(e.domain??an(e.url)).replace("www.",""),c=r[0],d=r[1],l=r[2];c.has(o)&&Yt("Urls match of types: "+n+" and "+i+" "+o),d.has(a)&&Yt("Domains match of types: "+n+" and "+i+" "+a),l.has(s)&&Yt("Hosts match of types: "+n+" and "+i+" "+s)}var dn=n(37802),ln=n(52965),un=n(70430),pn=n(66415),hn=n(84515),gn=n(64726),mn=n(9498),fn=n(91735);const vn=["prg-sharedl-t","prg-sharedlr-t","prg-sharedl-te","prg-slsix-t","prg-slrads-t"],yn="shared_links_right_location_index",Sn="shared_links_ads_location_index",Cn="shared_links_ads_algo_generated_site_replace",wn=e=>0===e.tileSource;var bn=n(68963),Tn=n(92100),kn=n(11974);function Pn(e){if(!e)return;let t=In(e=(0,kn.Z)(e).replace(/^[\b\n\r]*/,""));return t&&t.href.toLocaleUpperCase().startsWith(e.toLocaleUpperCase())||ge.test(e)||(t=In("https://"+e)),t&&t.host&&ge.test(t.protocol)&&Tn.c.isValidUrl(t.href,!0)?t:void 0}function In(e){try{return new URL(e)}catch{return}}var An=n(83726),En=n.n(An),xn=n(54678),Mn=n.n(xn),Ln=n(59997),Dn=n(44070),Rn=n(49218),Fn=n(93703),On=n(89150),Bn=n(41472),Nn=n(74037),$n=n(11310),Un=n.n($n),_n=n(43730),Hn=n(23865),Wn=n(65815),qn=n(1591),Vn=n(16818),Gn=n(34009),zn=n.n(Gn),jn=n(7137),Kn=n.n(jn),Qn=n(12287),Zn=n.n(Qn);_n.v,Hn.S,qn.Z,Vn.X,Wn.Oj;const Jn=Rn.dy`<span class="badge">${e=>e.badge.children}</span>`,Xn=Rn.dy` ${e=>"topSiteAdLabelSmall"!==e.adLabelType?Rn.dy`<span class="dot-separator"> · </span>`:null}<msn-native-ad-ad-label class="${e=>"topSiteAdLabelSmall"===e.adLabelType?"top-site-ad-label":" "}" type="${e=>e.adLabelType}"></msn-native-ad-ad-label>`,Yn=Rn.dy`
${(0,Fn.g)(((e,t)=>t.parent.sharedLinksPropsSharedByPhotoUrl),Rn.dy`<img class="shared-links__persona" src="${(e,t)=>t.parent.sharedLinksPropsSharedByPhotoUrl}"/>`,Rn.dy`<div class="shared-links__persona shared-links__persona--initials" style="background-color: ${(e,t)=>t.parent.sharedLinksDynamicTileProps.sharedByInitialsAndColor.color}"><span>${(e,t)=>t.parent.sharedLinksDynamicTileProps.sharedByInitialsAndColor.initials}</span></div>`)}
`,ei=(e,t)=>{const n=[];return t.parent.userSelectedSetting!==u.Z3.top&&(n.push("top-site-f3v1b"),t.parent.config.enableMiddleTileSize&&n.push("top-site-s2ts"),t.parent.config.enableSmallerRoundedCorner&&n.push("top-site-s2rc")),n.join(" ")},ti=Rn.dy`<fluent-option value="${e=>e.title}" id="${e=>e.id}" class=${(e,t)=>t.parent.topSiteSelectedItem&&t.parent.topSiteSelectedItem.id===e.id?"selected":"unselected"} ?selected=${(e,t)=>t.parent.topSiteSelectedItem&&t.parent.topSiteSelectedItem.id===e.id}>${e=>e.title}</fluent-option>`,ni=Rn.dy`<div class="topsite-list-footer-setting topsite-direct-settings"><label>${e=>{var t;return null===(t=e.strings)||void 0===t?void 0:t.quickLinksLabelText}}</label><fluent-select class="topSitesOptions" id="topSitessSelector" appearance="filled" @click=${(e,t)=>e.onTopSiteOptions(t.event)} data-t="${e=>e.oneLineTopSitesSelectorTelemetryTag}" @change=${(e,t)=>e.updateTopSite(t.event)} current-value=${e=>e.topSiteSelectedItem&&e.topSiteSelectedItem.title} data-customhandled="true"><span slot="selected-value">${e=>e.topSiteSelectedItem&&e.topSiteSelectedItem.title}</span>${(0,On.rx)((e=>e.topSiteMenuItems),ti)}</fluent-select></div>`,ii=Rn.dy`<fluent-button class="start-button" appearance="stealth" title="${(e,t)=>{var n,i;return null!==(n=t.parent)&&void 0!==n&&null!==(i=n.config)&&void 0!==i&&i.enablePinIconUnclickable?null:e.pinLabel}}" aria-lable="${e=>e.pinLabel}" role="button" @click=${(e,t)=>{var n,i;return t.parent.pinAction&&!(null!==(n=t.parent)&&void 0!==n&&null!==(i=n.config)&&void 0!==i&&i.enablePinIconUnclickable)&&t.parent.pinAction(e,t.event)}} data-t="${e=>e.pinActionButtonTelemetryTag}" icon-only>${(0,Fn.g)(((e,t)=>{var n;return!(null!==(n=t.parent.config)&&void 0!==n&&n.enableAllPin)}),Rn.dy`${Rn.dy.partial(Kn())}`)} ${(0,Fn.g)(((e,t)=>{var n;return null===(n=t.parent.config)||void 0===n?void 0:n.enableAllPin}),Rn.dy` ${(0,Fn.g)((e=>1===e.dragDropType),Rn.dy`${Rn.dy.partial(Kn())}`)} ${(0,Fn.g)(((e,t)=>{var n,i;return 1!==e.dragDropType&&!(null!==(n=t.parent)&&void 0!==n&&null!==(i=n.config)&&void 0!==i&&i.enablePinIconUnclickable)}),Rn.dy`${Rn.dy.partial(zn())}`)} `)}</fluent-button>`,ri=Rn.dy`<fluent-button class="end-button" appearance="stealth" title="${e=>e.contextMenuLabel}" aria-label="${e=>e.contextMenuLabel}" role="button" @click=${(e,t)=>t.parent.toggleActionMenu&&t.parent.toggleActionMenu(e,t.event)} data-t="${e=>e.toggleActionMenuButtonTelemetryTag}" icon-only>${Rn.dy.partial(Un())}</fluent-button>`,oi=Rn.dy`<div class="top-site-title ${e=>e.textShadowEnabled?"top-site-shadow":""}"><span class="top-site-title-text ${(e,t)=>t.parent.config.enableOnelineClamp?"one-line-title":""}">${e=>e.title}</span>${(0,Fn.g)((e=>e.adLabelType&&e.isSponsored),Xn)} ${(0,Fn.g)((e=>e.badge),Jn)}</div>`,ai=Rn.dy`<a class="control" href="${(e,t)=>t.parent.getTopSiteTemplateUrl(e)}" data-t="${e=>e.anchorTelemetryTag}" target="${(e,t)=>t.parent.config.enableOpenInNewTab?"_blank":""}">${oi}</a>`,si=Rn.dy`<a class="control" href="${(e,t)=>t.parent.getTopSiteTemplateUrl(e)}" data-t="${e=>e.anchorTelemetryTag}" @click=${(e,t)=>t.parent.preventClickOnTopSite(t.event)}>${oi}</a>`,ci=Rn.dy`<div title="${e=>e.title}" aria-label="${e=>e.title}" class="top-site-next small-top-sites pill-top-site ${(e,t)=>t.parent.config.enablePinIconUnclickable?"pinned-top-site":" "} ${(e,t)=>t.parent.config.enableGridTopSites&&t.parent.userSelectedSetting===u.Z3.top?"grid-top-sites ":""} ${(e,t)=>t.parent.config.enableHoverTitle?"uses-hover-title":""} ${(e,t)=>t.parent.config.enableHideTitle?"hide-title":""} ${(e,t)=>t.parent.config.enableTopsitesDecrease?"decrease-top-site":""} ${(e,t)=>t.parent.config.enableCancelHoverTitleHeight?"cancel-hover-top-site":""} ${ei} ${(e,t)=>t.parent.topSitesClassName}" href="${(e,t)=>t.parent.getTopSiteTemplateUrl(e)}" data-t="${e=>e.contentViewTelemetryTag}" @mouseenter=${(e,t)=>t.parent.handleTopSiteHover(e.rid,!0,e.hasEdgeShoppingSmartlist)(t.event)} @mouseleave=${(e,t)=>t.parent.handleTopSiteHover(e.rid,!1,e.hasEdgeShoppingSmartlist)(t.event)} @focus=${(e,t)=>t.parent.handleTopSiteHover(e.rid,!0,e.hasEdgeShoppingSmartlist)(t.event)} @blur=${(e,t)=>t.parent.handleTopSiteHover(e.rid,!1,e.hasEdgeShoppingSmartlist)(t.event)} @keyup=${(e,t)=>t.parent.handleKeyDownPress(e.rid,e.hasEdgeShoppingSmartlist)(t.event)} @mouseup=${(e,t)=>t.parent.handleTopSiteClick(e.rid,e.hasEdgeShoppingSmartlist)(t.event)}>${(0,Fn.g)(((e,t)=>{var n,i;return(t.parent.renderTopSiteStartAndEnd&&(null===(n=t.parent.config)||void 0===n?void 0:n.enableAllPin)&&!(null!==(i=t.parent)&&void 0!==i&&i.config.enablePinIconUnclickable&&1!==e.dragDropType)||e.promote)&&!e.enablePinnedIndicator}),Rn.dy`<span class="start"><div class="top-site-next-g">${ii}</div></span>`)}<div class="content-container ${(e,t)=>t.parent.topSitesClassName}"><div class="image-container"><div class="image">${(0,Fn.g)(((e,t)=>t.parent.isSharedLinksSmartListWithValidDynamicTileProps(e)),Rn.dy` ${Yn} `,Rn.dy`<img src="${e=>e.faviconUrl}" />`)}</div></div><div class="title-container">${(0,Fn.g)((e=>1===e.dragDropType&&e.enablePinnedIndicator),Rn.dy`<div class="pinned-container"><span class="pinned-indicator">${Rn.dy`${Rn.dy.partial(Kn())}`}</span></div>`)} ${(0,Fn.g)((e=>e.disableHref),si,ai)}</div></div>${(0,Fn.g)(((e,t)=>t.parent.renderTopSiteStartAndEnd),Rn.dy`<span class="end"><div class="top-site-next-g">${ri}</div></span>`)}</div>`,di=Rn.dy`<div class="top-site-next small-top-sites pill-top-site drag-locked add-placeholder ${(e,t)=>t.parent.config.enableGridTopSites&&t.parent.userSelectedSetting===u.Z3.top?"grid-top-sites ":""} ${(e,t)=>t.parent.config.enableHoverTitle?"uses-hover-title":""} ${(e,t)=>t.parent.config.enableTopsitesDecrease?"decrease-top-site":""} ${(e,t)=>t.parent.config.enableCancelHoverTitleHeight?"cancel-hover-top-site":""} ${ei} ${(e,t)=>t.parent.topSitesClassName}"><div class="content-container ${(e,t)=>t.parent.topSitesClassName}"><div class="image-container"><div class="${(e,t)=>t.parent.config.enableNewAddImage?"image new-add-image":"add-image"}"><svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><path d="M12 5.625V6.375H6.375V12H5.625V6.375H0V5.625H5.625V0H6.375V5.625H12Z" /></svg></div></div><div class="title-container"><a class="control" href="#" @click=${(e,t)=>e.onAddTopSiteClick(t.event)} data-t="${e=>e.addTopSiteButtonTelemetryTag}" aria-label="${(e,t)=>t.parent.strings.ariaLabel_addTile}" title="${(e,t)=>t.parent.strings.ariaLabel_addTile}"><div class="top-site-title"><span class="top-site-title-text">${(e,t)=>t.parent.config.enableNewAddImage?t.parent.getAddShortcutTitle():""}</span></div></a></div></div></div>`,li=Rn.dy`<msft-top-site-placeholder class="small-top-sites drag-locked ${(e,t)=>t.parent.topSitesClassName} ${(e,t)=>t.parent.config.enableHoverTitle?"uses-hover-title":""}" ?backPlateEnabled=${e=>e.backPlateEnabled}><div slot="icon-action"><fluent-button class="add-button ${e=>e.backPlateEnabled?"with-back-plate":""}" appearance="stealth" aria-label="${e=>e.ariaLabel}" role="button" title="${e=>e.ariaLabel}" id="clickAddTileButton" @click=${(e,t)=>e.onAddTopSiteClick(t.event)} data-t="${e=>e.addTopSiteButtonTelemetryTag}"><div class="add-button-label"><svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><path d="M12 5.625V6.375H6.375V12H5.625V6.375H0V5.625H5.625V0H6.375V5.625H12Z" /></svg><span>${e=>e.addTileLabel}</span></div></fluent-button></div></msft-top-site-placeholder>`,ui=Rn.dy`<msft-top-site-placeholder class="small-top-sites drag-locked ${(e,t)=>t.parent.topSitesClassName}" ?backPlateEnabled=${e=>e.backPlateEnabled}><div slot="icon-action"><fluent-button class="add-button ${e=>e.backPlateEnabled?"with-back-plate":""}" appearance="stealth" aria-label="${e=>e.ariaLabel}" role="button" title="${e=>e.ariaLabel}" id="clickSeeAllTileButton" @click=${(e,t)=>e.onSeeAllTopSiteClick(t.event)}><div><svg width="14" height="4" viewBox="0 0 14 4" xmlns="http://www.w3.org/2000/svg"><path d="M3.25 2C3.25 2.69036 2.69036 3.25 2 3.25C1.30964 3.25 0.75 2.69036 0.75 2C0.75 1.30964 1.30964 0.75 2 0.75C2.69036 0.75 3.25 1.30964 3.25 2ZM8.25 2C8.25 2.69036 7.69036 3.25 7 3.25C6.30964 3.25 5.75 2.69036 5.75 2C5.75 1.30964 6.30964 0.75 7 0.75C7.69036 0.75 8.25 1.30964 8.25 2ZM12 3.25C12.6904 3.25 13.25 2.69036 13.25 2C13.25 1.30964 12.6904 0.75 12 0.75C11.3096 0.75 10.75 1.30964 10.75 2C10.75 2.69036 11.3096 3.25 12 3.25Z" /></svg><span>${e=>e.ariaLabel}</span></div></fluent-button></div></msft-top-site-placeholder>`,pi=Rn.dy`
${(0,Fn.g)((e=>e.seeAllTileEnabled),ui)}
${(0,Fn.g)((e=>!e.seeAllTileEnabled),Rn.dy`${(0,Fn.g)(((e,t)=>t.parent.userSelectedSetting!==u.Z3.top),di,li)}`)}`,hi=Rn.dy`<div class="top-sites-responsive-item drag-locked"><msft-top-site-placeholder class="pill-top-site top-sites-responsive-placeholder" ?backPlateEnabled=${e=>e.backPlateEnabled}><div class="left-part top-sites-responsive-placeholder-add-button" id="clickAddTileButton" slot="icon-action" title="${e=>e.ariaLabel}" role="button" aria-label="${e=>e.ariaLabel}" data-t="${e=>e.addTopSiteButtonTelemetryTag}" @click=${(e,t)=>e.onAddTopSiteClick(t.event)}><div class="top-sites-responsive-icon ${(e,t)=>t.parent.config.enableUnifiedRecommendedSites?"top-sites-responsive-icon-size-20":""}"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 12 12"><path d="M 12 5.625 V 6.375 H 6.375 V 12 H 5.625 V 6.375 H 0 V 5.625 H 5.625 V 0 H 6.375 V 5.625 H 12 Z" /></svg></div><span>${e=>e.addTileLabel}</span></div></msft-top-site-placeholder></div>`,gi=Rn.dy`<msn-top-site-dialog id="topSiteAddDialog" cancelText="${e=>e.topSiteAddDialog.cancelText}" headerTitle="${e=>e.topSiteAddDialog.headerTitle}" saveText="${e=>e.topSiteAddDialog.saveText}" closeText="${e=>e.topSiteAddDialog.closeText}" :nameInputData="${e=>e.topSiteAddDialog.nameInputBox}" :urlInputData="${e=>e.topSiteAddDialog.urlInputBox}" :newOrUpdatedTopSite="${e=>e.topSiteAddDialog.newOrUpdatedTopSite}" :saveButtonTelemetryTag="${e=>e.topSiteAddDialog.saveButtonTelemetryTag}" :cancelButtonTelemetryTag="${e=>e.topSiteAddDialog.cancelButtonTelemetryTag}" :closeButtonTelemetryTag="${e=>e.topSiteAddDialog.closeButtonTelemetryTag}" @focus="${(e,t)=>e.topSiteAddDialog.addInputListener(t.event)}" @close="${(e,t)=>e.topSiteAddDialog.onClose(t.event)}" @save="${(e,t)=>e.topSiteAddDialog.saveHandler(t.event)}" style="${e=>e.topSiteAddDialogContainerPosition}">${(0,Fn.g)((e=>e.config.suggestedTopSiteList&&e.config.suggestedTopSiteList.length>0),Rn.dy`<div slot="subSection"><h3 class="suggestion-title">${e=>e.strings.addDialogSubHeading}</h3><div class="suggestion-body">${(0,On.rx)((e=>e.config.suggestedTopSiteList),Rn.dy`<div tabIndex="0" style="margin-inline-end: 12px"><div class="top-site-next" href="${e=>e.url}" title="${e=>e.title}" aria-label="${e=>e.title}" tabIndex="-1" @click=${(e,t)=>t.parent.topSiteAddDialog.saveHandler&&t.parent.topSiteAddDialog.saveHandler(t.event,e)} @keydown=${(e,t)=>t.parent.topSiteAddDialog.saveHandler&&t.parent.topSiteAddDialog.saveHandler(t.event,e)}><div class="content-container"><div class="image-container"><div class="image"><img src="${e=>ke(e.faviconId)}" alt="${e=>e.title}" /></div></div><div class="title-container"><div class="control" data-t="${e=>e.suggestedLinkTelemetryTag}"><div class="top-site-title"><span class="top-site-title-text">${e=>e.title}</span>${(0,Fn.g)((e=>e.adLabelType&&e.isSponsored),Xn)} ${(0,Fn.g)((e=>e.badge),Jn)}</div></div></div></div></div></div>`)}</div></div>`)}</msn-top-site-dialog>`,mi=Rn.dy`<msn-top-site-dialog id="topSiteEditDialog" cancelText="${e=>e.topSiteEditDialog.cancelText}" headerTitle="${e=>e.topSiteEditDialog.headerTitle}" saveText="${e=>e.topSiteEditDialog.saveText}" closeText="${e=>e.topSiteEditDialog.closeText}" :nameInputData="${e=>e.topSiteEditDialog.nameInputBox}" :newOrUpdatedTopSite="${e=>e.topSiteEditDialog.newOrUpdatedTopSite}" :saveButtonTelemetryTag="${e=>e.topSiteEditDialog.saveButtonTelemetryTag}" :cancelButtonTelemetryTag="${e=>e.topSiteEditDialog.cancelButtonTelemetryTag}" :closeButtonTelemetryTag="${e=>e.topSiteEditDialog.closeButtonTelemetryTag}" @focus="${(e,t)=>e.topSiteEditDialog.addInputListener(t.event)}" @close="${(e,t)=>e.topSiteEditDialog.onClose(t.event)}" @save="${(e,t)=>e.topSiteEditDialog.saveHandler(t.event)}" style="${e=>e.topSiteEditDialogContainerPosition}"></msn-top-site-dialog>`,fi=Rn.dy`<svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M6.84961 6L12 11.1504L11.1504 12L6 6.84961L0.849609 12L0 11.1504L5.15039 6L0 0.849609L0.849609 0L6 5.15039L11.1504 0L12 0.849609L6.84961 6Z"/></svg>`,vi=Rn.dy`<msn-toast id="undo-toast">${(0,On.rx)((e=>e.undoToast.removedText),Rn.dy`<span>${e=>e}</span>`)}<fluent-button ${(0,Bn.i)("undoButton")} appearance=${e=>e.enableWebAppsOnNTP?"accent":"lightweight"} slot="actions" class=${e=>e.enableWebAppsOnNTP?"toast-navigation-button-accent":"toast-navigation-button"} title=${e=>e.undoToast.undoButtonLabel} @click=${(e,t)=>e.undoToast.undoTopSiteHandler(t.event)} data-t="${e=>e.undoToast.undoButtonTelemetryTag}">${e=>e.undoToast.undoButtonLabel}</fluent-button><fluent-button apperance="stealth" slot="close-button" class="toast-close-button" title=${e=>e.undoToast.closeButtonLabel} @click=${(e,t)=>e.undoToast.closeHandler(t.event)} data-t="${e=>e.undoToast.closeButtonTelemetryTag}">${fi}</fluent-button></msn-toast>`,yi=Rn.dy`<msn-toast id="pin-toast">${(0,On.rx)((e=>e.pinToast.pinText),Rn.dy`<span>${e=>e}</span>`)}<fluent-button apperance="stealth" slot="close-button" class="toast-close-button" title=${e=>e.pinToast.closeButtonLabel} @click=${(e,t)=>e.pinToast.closeHandler(t.event)} data-t="${e=>e.pinToast.closeButtonTelemetryTag}">${fi}</fluent-button></msn-toast>`,Si=Rn.dy`<msn-toast id="installing-web-app-toast"><span>${e=>e.installingWebAppToastProps.displayText}</span><fluent-progress></fluent-progress><fluent-button apperance="stealth" slot="close-button" class="toast-close-button" title=${e=>e.installingWebAppToastProps.closeButtonLabel} aria-label=${e=>e.installingWebAppToastProps.closeButtonLabel} @click=${(e,t)=>e.installingWebAppToastProps.closeHandler(t.event)} data-t="${e=>e.installingWebAppToastProps.closeButtonTelemetryTag}">${fi}</fluent-button></msn-toast>`,Ci=Rn.dy`<msn-toast id="error-installing-web-app-toast"><fluent-button apperance="stealth" slot="close-button" class="toast-close-button" title=${e=>e.errorInstallingWebAppToastProps.closeButtonLabel} aria-label=${e=>e.errorInstallingWebAppToastProps.closeButtonLabel} @click=${(e,t)=>e.errorInstallingWebAppToastProps.closeHandler(t.event)} data-t="${e=>e.errorInstallingWebAppToastProps.closeButtonTelemetryTag}">${fi}</fluent-button><span>${e=>e.errorInstallingWebAppToastProps.displayText}</span></msn-toast>`,wi=Rn.dy`<msn-toast id="open-web-app-toast" ${(0,Bn.i)("openWebAppToastRef")}>${(0,On.rx)((e=>e.openWebAppToastProps.displayText),Rn.dy`<span>${e=>e}</span>`)}<fluent-button appearance="accent" slot="actions" class="toast-navigation-button-accent" title=${e=>e.openWebAppToastProps.openButtonLabel} @click=${(e,t)=>e.openWebAppToastProps.openButtonHandler(t.event)} data-t="${e=>e.openWebAppToastProps.openButtonTelemetryTag}">${e=>e.openWebAppToastProps.openButtonLabel}</fluent-button><fluent-button apperance="stealth" slot="close-button" class="toast-close-button" aria-label=${e=>e.openWebAppToastProps.closeButtonLabel} title=${e=>e.openWebAppToastProps.closeButtonLabel} @click=${(e,t)=>e.openWebAppToastProps.closeHandler(t.event)} data-t="${e=>e.openWebAppToastProps.closeButtonTelemetryTag}">${fi}</fluent-button></msn-toast>`,bi=e=>e.topSites,Ti=e=>e.topSites.map((e=>({...e,displayPinIcon:!0}))),ki=e=>e.overflowItems,Pi=e=>e.overflowItems&&e.overflowItems.length&&e.overflowItems.length>0,Ii=e=>e.topSites&&e.topSites.length,Ai=Rn.dy`<a class="pill-top-site ${(e,t)=>{var n;return null!==(n=t.parent.config)&&void 0!==n&&n.enableTopsitesTopMiniMargin?"mini-margin":""}}" href="${e=>e.url}" title="${e=>e.title===e.url?e.title:e.title+": "+e.url}" aria-label="${e=>e.title}" data-t="${e=>e.anchorTelemetryTag}" target="${(e,t)=>t.parent.config.enableOpenInNewTab?"_blank":""}"><div class="left-part"><img slot="image" src="${e=>e.faviconUrl}" /><span>${e=>e.title}</span>${(0,Fn.g)((e=>e.adLabelType&&e.isSponsored),Xn)}</div>${(0,Fn.g)((e=>e.displayPinIcon),Rn.dy` ${(0,Fn.g)(((e,t)=>{var n;return!(null!==(n=t.parent.config)&&void 0!==n&&n.enableAllPin)}),Rn.dy`<div class="top-sites-responsive-pin-icon">${Rn.dy.partial(Kn())}</div>`)} ${(0,Fn.g)(((e,t)=>{var n;return null===(n=t.parent.config)||void 0===n?void 0:n.enableAllPin}),Rn.dy` ${(0,Fn.g)((e=>1===e.dragDropType),Rn.dy`<div class="top-sites-responsive-pin-icon">${Rn.dy.partial(Kn())}</div>`)} ${(0,Fn.g)(((e,t)=>{var n,i;return 1!==e.dragDropType&&!(null!==(n=t.parent)&&void 0!==n&&null!==(i=n.config)&&void 0!==i&&i.enablePinIconUnclickable)}),Rn.dy`<div class="top-sites-responsive-pin-icon">${Rn.dy.partial(zn())}</div>`)} `)} `)}<div class="right-part">${ri}</div></a>`,Ei=Rn.dy`<fluent-button type="button" id="allQuickLinksButtonId" ${(0,Bn.i)("allQuickLinksButton")} appearance="stealth" aria-label="${e=>e.strings.quickLinksLabelText||""}" title="${e=>e.strings.quickLinksLabelText||""}" aria-haspopup="true" aria-expanded="${e=>e.showMenu?"true":null}" @click=${(e,t)=>e.toggleOverflowMenu(H.AllQuickLinksButton)} data-t="${e=>e.oneLinetopSitesAllQuickLinkButtonTelemetryTag}"><div class="all-links-btn ${e=>"start"===e.overflowMenuClass?"active":""}">${Rn.dy.partial(Nn.Z)} ${e=>e.strings.quickLinksLabelText}</div></fluent-button>`,xi=Rn.dy`<fluent-button type="button" id="seeMoreButtonId" ${(0,Bn.i)("seeMoreButton")} aria-label="${e=>e.strings.quickLinksSeeMoreButton||""}" title="${e=>e.strings.quickLinksSeeMoreButton||""}" aria-haspopup="true" aria-expanded="${e=>e.showMenu?"true":null}" @click=${(e,t)=>e.toggleOverflowMenu(H.SeeMoreButton)} data-t="${e=>e.oneLinetopSitesSeeMoreButtonTelemetryTag}"><div class="all-links-btn ${e=>"end"===e.overflowMenuClass?"active":""}">${e=>e.strings.quickLinksSeeMoreButton} ${Rn.dy.partial(Nn.Z)}</div></fluent-button>`,Mi=Rn.dy`<div class="${e=>e.showMenu?"overflow-menu":"overflow-menu hidden"} ${e=>e.config.enableGridTopSites?"overflow-menu-grid ":""}${e=>e.overflowMenuClass}" ${(0,Bn.i)("overflowPanelContainer")}>${(0,Fn.g)((e=>Pi&&!e.config.enableGridTopSites),Rn.dy`<div class="topsite-list">${(0,On.rx)(ki,Ai)}</div><div class="divider"></div>`)} ${(0,Fn.g)((e=>e.config.enableGridTopSites&&Ii),Rn.dy`<div class="topsite-list">${(0,On.rx)((e=>e.topSites),ci)}</div><div class="divider"></div>`)}<div class="topsite-list-footer">${(0,On.rx)((e=>e.topSitesPlaceHolders),pi)} ${(0,Fn.g)((e=>!e.config.enbOnLineSetting),Rn.dy`<div title="${e=>{var t;return null===(t=e.strings)||void 0===t?void 0:t.quickLinksSetting}}" data-t="${e=>e.oneLinetopSitesSettingButtonTelemetryTag}" class="topsite-list-footer-setting" @click=${(e,t)=>e.openSettingDialog(t.event)}>${Rn.dy.partial(Zn())} ${e=>{var t;return null===(t=e.strings)||void 0===t?void 0:t.quickLinksSetting}}</div>`)} ${(0,Fn.g)((e=>e.config.enbOnLineSetting),ni)}</div></div>`,Li=Rn.dy`
${(0,Fn.g)((e=>e.userSelectedSetting===u.Z3.top),Rn.dy`<div class="one-line-top-sites-container ${e=>{var t;return e.isOnImage||null!==(t=e.config)&&void 0!==t&&t.enableOneLineTopSitesSoildBg?"":"notonimg"}} ${e=>{var t;return null!==(t=e.config)&&void 0!==t&&t.enableOneLineTopSitesSoildBg?"solid":""}} ${e=>{var t;return null!==(t=e.config)&&void 0!==t&&t.enableOneLineTopSitesPillShape?"pill":""}}" id="oneLineTopSitesContainer" data-t="${e=>e.oneLinetopSitesCommonTelemetryTag}" ${(0,Bn.i)("topSitesRoot")}>${(0,Fn.g)((e=>{var t;return null===(t=e.config)||void 0===t?void 0:t.enbOnLineQicLink}),Rn.dy`<div class="see-more-container start">${Ei}<div class="divider"></div></div>`)} ${(0,Fn.g)((e=>{var t,n;return!(null!==(t=e.config)&&void 0!==t&&t.enableGridTopSites)||(null===(n=e.config)||void 0===n?void 0:n.enableGridTopSites)&&!e.showMenu}),Rn.dy`<div class="oneline-top-sites settings" ${(0,Bn.i)("oneLineTopSitesContainer")}>${(0,On.rx)(Ti,Ai)} ${(0,Fn.g)((e=>{var t,n;return(null===(t=e.config)||void 0===t?void 0:t.enableOneLineTopSitesPillShape)&&!(null!==(n=e.config)&&void 0!==n&&n.disableSeeMoreButton)}),Rn.dy`<div class="see-more-container" ${(0,Bn.i)("oneLineTopSitesSeeMoreEle")}>${xi}</div>`)}</div>`)} ${(0,Fn.g)((e=>{var t,n;return!(null!==(t=e.config)&&void 0!==t&&t.enableOneLineTopSitesPillShape||null!==(n=e.config)&&void 0!==n&&n.disableSeeMoreButton)}),Rn.dy`<div class="see-more-container">${xi}</div>`)} ${Mi}</div>`,Rn.dy`<div class="root ${e=>e.extraAddedSitesClassName} ${e=>e.className} ${e=>e.config.enableRiverZoom?"river-zoom":""} ${e=>e.moveUpward?"move-upward":""}" id="${O.topSitesClassSelector}" ${(0,Bn.i)("topSitesRoot")}><div class="top-sites ${e=>e.twoRowSitesClassName} ${e=>e.config.topsitesCommonBackplate?"topsitesplate":""} ${e=>e.config.enableMiddleTileSize&&!e.config.spacingAdjustment?"top-site-s2tss":""} ${e=>e.config.enableUnifiedTopSites?"unified-top-sites":""}" role="status"><div id=${O.topSitesId} class="sites ${e=>e.sitesClassName} ${e=>e.topSitesClassName} ${e=>e.topSitesResponsiveClassName}" data-t="${e=>e.topSiteCommonTelemetryTag}" ${(0,Bn.i)("topSitesContainer")}>${(0,Fn.g)((e=>!e.config.enableUnifiedTopSites),Rn.dy`${(0,On.rx)(bi,ci)}`,Rn.dy` ${(0,On.rx)(Ti,Rn.dy`<div class="top-sites-responsive-item">${Ai}</div>`)} `)} ${(0,Fn.g)((e=>!e.config.enableUnifiedTopSites),Rn.dy` ${(0,On.rx)((e=>e.topSitesPlaceHolders),pi)} `,Rn.dy` ${(0,On.rx)((e=>e.topSitesPlaceHolders),hi)} `)}</div></div></div>`)}<div ${(0,Bn.i)("dialogRoot")}>${(0,Fn.g)((e=>e.isAddDialogOpen),gi)} ${(0,Fn.g)((e=>e.topSiteAddedSuccessfully),Rn.dy`<div class="top-site-add-success" aria-live="polite">${e=>e.lastAddedTopSite} added successfully</div>`)} ${(0,Fn.g)((e=>e.isEditDialogOpen),mi)} ${(0,Fn.g)((e=>e.isActionMenuOpen),Rn.dy`<div data-t=${e=>e.topsiteItemContainerTelemetry()}><msn-actions-menu id="actions-menu" :referrerButton=${e=>e.activeContextMenuButtonElement} class="${e=>e.config.enableAllPin?"long-width-menu":""}" :menuItems=${e=>{var t;return null===(t=e.actionsMenuProps)||void 0===t?void 0:t.menuItems}} ${(0,Bn.i)("topSiteActionsMenu")} @dismiss-menu=${e=>e.isActionMenuOpen=!1} :isGlyphUrlsPicture=${!0} data-t=${e=>e.actionsMenuTelemetry()}>x</msn-actions-menu></div>`)}<div ${(0,Bn.i)("toastContainer")} class="toast-root">${(0,Fn.g)((e=>"undo"===e.currentToastTag),vi)} ${(0,Fn.g)((e=>"pin"===e.currentToastTag),yi)} ${(0,Fn.g)((e=>"installing-web-app"===e.currentToastTag),Si)} ${(0,Fn.g)((e=>"error-installing-web-app"===e.currentToastTag),Ci)} ${(0,Fn.g)((e=>"open-web-app"===e.currentToastTag),wi)}</div></div>`;class Di{constructor(e,t){this.onTouchStart=()=>{this.sortableService&&this.sortableService.destroy(),this.sortableService=null,document.addEventListener("mousemove",this.onMouseMove)},this.onMouseMove=()=>{this.initializeService(),document.removeEventListener("mousemove",this.onMouseMove)},this.onUnloadPage=()=>{this.clearTopsiteByUnpinnedSites(),this.clearUnpinStorage()},this.component=e,this.container=t.container,this.disableDragDrop=t.disableDragDrop,this.webStorage=(0,le.$o)(),this.bindEvents()}bindEvents(){window.addEventListener("beforeunload",this.onUnloadPage),document.addEventListener("touchstart",this.onTouchStart),document.addEventListener("mousemove",this.onMouseMove)}unBindEvents(){window.removeEventListener("beforeunload",this.onUnloadPage),document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("mousemove",this.onMouseMove)}getDataFromStorage(e){try{const t=this.webStorage.getItem(e);if(t){return JSON.parse(t)}}catch(e){it.M0.sendAppErrorEvent({...Xe.OF8,message:"Cannot read/write storage for topsite drag drop service",pb:{...Xe.OF8.pb,customMessage:`Cannot get drag drop service data, msg: ${e.message||JSON.stringify(e)}`}})}}saveDataToStorage(e,t){try{this.webStorage.setItem(e,JSON.stringify(t))}catch(e){it.M0.sendAppErrorEvent({...Xe.OF8,message:"Cannot read/write storage for topsite drag drop service",pb:{...Xe.OF8.pb,customMessage:`Cannot save data to topsites, msg: ${e.message||JSON.stringify(e)}`}})}}reorderItems(e,t,n){Array.isArray(e)&&e.splice(t,0,e.splice(n,1)[0])}getValidTopSitesFromStorageData(){const e=this.getDataFromStorage(L)||{},t=(e.data??[]).filter((e=>e.slot>=0)).sort(((e,t)=>e.slot-t.slot)).reduce(((e,t)=>"rid"in t||"url"in t||"faviconUrl"in t?((e=>{const t=xe.Al.CurrentFlightSet;return!(-1!==vn.findIndex((e=>t.has(e))))&&e===N})(t.url)||(0===e.length||e[e.length-1].slot!==t.slot)&&e.push(t),e):e),[]);return{...e,data:t}}getFixedTopSites(){const{data:e}=this.getValidTopSitesFromStorageData();return e||[]}getTopSites(e,t){let n=e;const{data:i}=this.getValidTopSitesFromStorageData();if(!i)return e;const r=i.filter((e=>e.slot<t));return n=[...Kt((0,un.Z)(e,r,"url"),r)],n=n.filter((e=>e)).slice(0,t),n}removeTopSiteFromStorage(e,t){const n=this.getDataFromStorage(e)||{},i=n.data;i&&(n.data=i.filter((e=>e.rid!==t.rid)),this.saveDataToStorage(e,n))}clearUnpinStorage(){this.saveDataToStorage(D,{})}clearTopsiteByUnpinnedSites(){const e=(this.getDataFromStorage(D)||{}).data;e&&e.forEach((e=>{this.removeTopSite(e)}))}addTopSite(e,t){let n=this.getValidTopSitesFromStorageData(),i=n.data;if(i||(i=[],n={data:i}),t){i.filter((t=>t.rid!==e.rid&&t.slot>=Math.min(e.fromIndex,e.toIndex)&&t.slot<=Math.max(e.fromIndex,e.toIndex))).forEach((t=>e.fromIndex>e.toIndex?t.slot++:t.slot--))}const r=i.find((t=>t.rid===e.rid));r?Object.assign(r,e):i.push(e),n.data=(0,Dn.Z)(i,"rid"),this.saveDataToStorage(L,n),this.removeUnpinnedTopSite(e)}removeTopSite(e){this.removeTopSiteFromStorage(L,e)}addUnpinnedTopSite(e){let t=this.getDataFromStorage(D)||{},n=t.data;n||(n=[],t={data:n}),n.push(e),this.saveDataToStorage(D,t)}removeUnpinnedTopSite(e){this.removeTopSiteFromStorage(D,e)}updateTopSites(e){const t=this.getValidTopSitesFromStorageData(),n=t.data;if(!n)return;const i=n.find((t=>t.rid===e.rid));i&&Object.assign(i,e),this.saveDataToStorage(L,t)}async initializeService(){if(this.sortableService||this.disableDragDrop)return;let e;if(e=this.container instanceof Promise?await this.container:this.container,!e)return;const{Sortable:t}=await n.e("node_modules_sortablejs_modular_sortable_esm_js").then(n.bind(n,54958)),i=new Image;i.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==",this.sortableService=t.create(e,{animation:150,chosenClass:"drag-chosen",dragClass:"drag-dragged",delay:100,touchStartThreshold:5,delayOnTouchOnly:!0,filter:".drag-locked",setData:e=>{e.setDragImage(i,0,0)},onMove:e=>{if(e.related||e.dragged)return!e.related.classList.contains("drag-locked")&&!e.dragged.classList.contains("drag-locked")&&(e.related.classList.add("drag-chosen__no-hover"),!0)},onEnd:t=>{var n;const{oldIndex:i,newIndex:r}=t;null===(n=Array.from(e.children))||void 0===n||n.forEach((e=>{var t;null===(t=e.classList)||void 0===t||t.remove("drag-chosen__no-hover")}));const o=this.component.topSites;if(o&&0!==o.length&&-1!==i&&-1!==r&&i!==r){var a;it.M0.addOrUpdateTmplProperty("tpsdrag","1");if(!this.component.getUserSelectedSetting())return;const e={...o[i],slot:r,fromIndex:i,toIndex:r,dragDropType:1};this.addTopSite(e,!0);const n=null===(a=this.component.$fastController.subscribers)||void 0===a?void 0:a.topSites;if(n){const e=[...this.component.topSites];this.reorderItems(e,r,i);let o=[];if(n.spillover)o=n.spillover;else{const{sub1:e,sub2:t}=n;o=[e,t].filter((e=>e))}const a=o.filter((e=>e.subject===bi))[0];if(a){const e=a.sub1.views,n=e[i].firstChild.parentNode;if(r<i)n.insertBefore(e[r].firstChild,t.item.nextSibling),n.insertBefore(e[i].firstChild,t.item),n.insertBefore(e[i].lastChild,t.item.nextSibling);else{const o=e[r+1];o&&n.insertBefore(o.firstChild,t.item.nextSibling),n.insertBefore(e[i].firstChild,t.item),n.insertBefore(e[i].lastChild,t.item.nextSibling)}this.reorderItems(e,r,i),this.component.getOrUpdateTopSites()}}it.M0.sendActionEvent(t.item)}},onChange:e=>{this.component.setActiveTopSiteElement(e.item)}})}destroy(){this.sortableService&&this.sortableService.destroy(),this.sortableService=null,this.unBindEvents()}}var Ri=n(851),Fi=n.n(Ri),Oi=n(25158),Bi=n.n(Oi),Ni=n(12912),$i=n(91104),Ui=n.n($i),_i=n(45927);const Hi="TSNP1.topsites";class Wi{constructor(){try{this.storage=window.localStorage}catch(e){}}write(e,t){if(this.storage)try{this.storage[e]=t}catch(e){}}writeJsonKey(e,t){return this.write(e,JSON.stringify(t))}readJsonKey(e,t=void 0){var n;const i=null===(n=this.storage)||void 0===n?void 0:n[e];return i?JSON.parse(i):t}getTopSites(){return this.readJsonKey(Hi,[])}writeTopSites(e){this.writeJsonKey(Hi,e)}}const qi="TopSitesSmartListsState";let Vi=[];function Gi(e,t,n){const i=zi(e);i&&(i.enabled=t,i.isUserSignedIn=n||!1,(0,le.$o)().setObject(qi,Vi))}function zi(e){let t;return Vi.forEach((n=>{n.experienceType===e&&(t=n)})),t}function ji(e){const t=zi(e);return!t||t.enabled}function Ki(e){const t=zi(e);return!!t&&t.isUserSignedIn}function Qi(){const e=(0,le.$o)().getObject(qi);return e?(Vi&&Vi.length||(Vi=e),Vi):null}function Zi(...e){return Vi=[...e]}var Ji=n(54820),Xi=n(44672),Yi=n(32810),er=n(72626),tr=n(78672),nr=JSON.parse('[{"storeName":"Gap ","domain":"gap.com","cashbackInfo":{"value":"4","isPercentage":false,"schemaName":"Retail.CashbackValue","kifMajorVersion":1,"kifMinorVersion":0,"kifMinorVersion2":0}},{"storeName":"Amazon","domain":"amazon.com","cashbackInfo":{"value":"5","isPercentage":true,"schemaName":"Retail.CashbackValue","kifMajorVersion":1,"kifMinorVersion":0,"kifMinorVersion2":0}},{"storeName":"Macys","domain":"macys.com","cashbackInfo":{"value":"","isPercentage":false,"schemaName":"Retail.CashbackValue","kifMajorVersion":1,"kifMinorVersion":0,"kifMinorVersion2":0}}]'),ir=JSON.parse('{"priceDrops":{"data":[{"clickUrl":"https://www.amazon.com/Dr-Squatch-Mens-Soap-Sampler/dp/B07BQBNV7C/ref=sr_1_22_sspa?crid=1O8A2MCWA9XY6&keywords=dr+squatch&qid=1649030218&sprefix=dr+squatch,aps,53&sr=8-22-spons&psc=1&smid=A2R651JBHM4ZCY&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExMjQ2MTJSM1gwNlFJJmVuY3J5cHRlZElkPUEwNzY5OTUwMjFPUDgxNlFSWUU3TiZlbmNyeXB0ZWRBZElkPUEwMTQ4ODk3MVZQV0FKSVdFTVQzMSZ3aWRnZXROYW1lPXNwX210ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=","storeInfo":{"storeId":"","storeName":"Amazon","storeImage":{"altText":"","clickUrl":"","overlayTexts":{},"overlayImages":{},"sourceImageUrl":"https://www.bing.com/th?id=OBO.6D49B76E24DD41E00E98B89E828DDF45","imageTint":0,"backgroundColor":"","fontStyle":{},"cssStyle":{},"sourceImagesUrls":[]},"domain":"amazon.com"},"trendRank":"","id":"","title":"Dr. Squatch All Natural Bar Soap for Men, 5 Bar Variety Pack - Aloe, Alpine Sage, Spearmin, Bay Rum and Grapefruit IPA","description":"","dealPercentage":"","priceDropPercentage":"","annotation":"","seller":"","ratingInfo":{"rating":0,"maxRating":"","ratingLink":"","numberOfReviews":0},"imageInfo":{"altText":"","clickUrl":"","overlayTexts":{},"overlayImages":{},"sourceImageUrl":"https://images-na.ssl-images-amazon.com/images/I/41aJlevN4RS.jpg","imageTint":0,"backgroundColor":"","fontStyle":{},"cssStyle":{},"sourceImagesUrls":[]},"priceInfo":{"originalPrice":"39.95","price":"32.99","priceCurrencySymbol":"$"},"productAdsScenarioType":0,"groupingId":"","globalOfferId":"","installmentInfo":{"amount":"","description":"","amountValue":0,"downPayment":"","downPaymentValue":0,"months":0,"schemaName":"Ads.InstallmentInfo","kifMajorVersion":0,"kifMinorVersion":0,"kifMinorVersion2":0},"images":[],"clickPingUrl":"","impressionToken":""},{"clickUrl":"https://www.amazon.com/Votatu-VRD501-Co-Witness-Low-Profile-Anti-Reflection/dp/B09MV1F1PV/ref=sr_1_14_sspa?crid=26O7KIBNHKC6I&keywords=airsoft+blue+dot+sight&qid=1647052224&refinements=p_72%3A1248957011&rnid=1248955011&s=sporting-goods&sprefix=airsoft+blue,aps,51&sr=1-14-spons&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzQzFIUUI0R002WUREJmVuY3J5cHRlZElkPUEwMDU0NjY4MVZUVzJCMllFRlk3NyZlbmNyeXB0ZWRBZElkPUEwOTk3MjU2MTRXMFpWWTZYRTJUJndpZGdldE5hbWU9c3BfbXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ&th=1","storeInfo":{"storeId":"","storeName":"Amazon","storeImage":{"altText":"","clickUrl":"","overlayTexts":{},"overlayImages":{},"sourceImageUrl":"https://www.bing.com/th?id=OBO.6D49B76E24DD41E00E98B89E828DDF45","imageTint":0,"backgroundColor":"","fontStyle":{},"cssStyle":{},"sourceImagesUrls":[]},"domain":"amazon.com"},"trendRank":"","id":"","title":"Votatu Red Dot Sight, VRD501 2MOA Auto Off and Motion Awake Red Dot Site with Co-Witness and Low-Profile Mount, Anti-Reflection Device and Flip Up Lens Cover","description":"","dealPercentage":"","priceDropPercentage":"","annotation":"","seller":"","ratingInfo":{"rating":0,"maxRating":"","ratingLink":"","numberOfReviews":0},"imageInfo":{"altText":"","clickUrl":"","overlayTexts":{},"overlayImages":{},"sourceImageUrl":"https://images-na.ssl-images-amazon.com/images/I/41AbIfRCBCL.jpg","imageTint":0,"backgroundColor":"","fontStyle":{},"cssStyle":{},"sourceImagesUrls":[]},"priceInfo":{"originalPrice":"79.99","price":"67.99","priceCurrencySymbol":"$"},"productAdsScenarioType":0,"groupingId":"","globalOfferId":"","installmentInfo":{"amount":"","description":"","amountValue":0,"downPayment":"","downPaymentValue":0,"months":0,"schemaName":"Ads.InstallmentInfo","kifMajorVersion":0,"kifMinorVersion":0,"kifMinorVersion2":0},"images":[],"clickPingUrl":"","impressionToken":""}],"rank":2},"abandonedCarts":{"data":[{"clickUrl":"https://amazon.com/gp/product/B07LD1NVY6/ref=ox_sc_act_image_1?smid=A115IJ93FOJ777&psc=1","storeInfo":{"storeId":"","storeName":"Amazon","storeImage":{"altText":"","clickUrl":"","overlayTexts":{},"overlayImages":{},"sourceImageUrl":"https://www.bing.com/th?id=OBO.6D49B76E24DD41E00E98B89E828DDF45","imageTint":0,"backgroundColor":"","fontStyle":{},"cssStyle":{},"sourceImagesUrls":[]},"domain":"amazon.com","couponsCount":32},"trendRank":"","id":"","title":"Windproof Arc Lighter X Plasma Lighters Rechargeable USB Lighters Candle Lighter-with LED Display Power (Magic)","description":"","dealPercentage":"","priceDropPercentage":"","annotation":"","seller":"","ratingInfo":{"rating":0,"maxRating":"","ratingLink":"","numberOfReviews":0},"imageInfo":{"altText":"","clickUrl":"","overlayTexts":{},"overlayImages":{},"sourceImageUrl":"https://m.media-amazon.com/images/I/31tgF8bG2HS._AC_AA180_.jpg","imageTint":0,"backgroundColor":"","fontStyle":{},"cssStyle":{},"sourceImagesUrls":[]},"priceInfo":{"originalPrice":"0","price":"14.89","priceCurrencySymbol":"$"},"productAdsScenarioType":0,"groupingId":"","globalOfferId":"","installmentInfo":{"amount":"","description":"","amountValue":0,"downPayment":"","downPaymentValue":0,"months":0,"schemaName":"Ads.InstallmentInfo","kifMajorVersion":0,"kifMinorVersion":0,"kifMinorVersion2":0},"images":[],"clickPingUrl":"","impressionToken":""},{"clickUrl":"https://amazon.com/gp/product/B07QCW3FXZ/ref=ox_sc_act_image_8?smid=ACF1CCU9ZUYCB&psc=1","storeInfo":{"storeId":"","storeName":"Amazon","storeImage":{"altText":"","clickUrl":"","overlayTexts":{},"overlayImages":{},"sourceImageUrl":"https://www.bing.com/th?id=OBO.6D49B76E24DD41E00E98B89E828DDF45","imageTint":0,"backgroundColor":"","fontStyle":{},"cssStyle":{},"sourceImagesUrls":[]},"domain":"amazon.com","couponsCount":32},"trendRank":"","id":"","title":"DoppSåk Waterproof & Leak-Proof Travel Toiletry Bag | Small, Black","description":"","dealPercentage":"","priceDropPercentage":"","annotation":"","seller":"","ratingInfo":{"rating":0,"maxRating":"","ratingLink":"","numberOfReviews":0},"imageInfo":{"altText":"","clickUrl":"","overlayTexts":{},"overlayImages":{},"sourceImageUrl":"https://m.media-amazon.com/images/I/A1BGJlWrx+L._AC_AA180_.jpg","imageTint":0,"backgroundColor":"","fontStyle":{},"cssStyle":{},"sourceImagesUrls":[]},"priceInfo":{"originalPrice":"0","price":"34.95","priceCurrencySymbol":"$"},"productAdsScenarioType":0,"groupingId":"","globalOfferId":"","installmentInfo":{"amount":"","description":"","amountValue":0,"downPayment":"","downPaymentValue":0,"months":0,"schemaName":"Ads.InstallmentInfo","kifMajorVersion":0,"kifMinorVersion":0,"kifMinorVersion2":0},"images":[],"clickPingUrl":"","impressionToken":""}],"rank":1}}');const rr=1e4,or=!0,ar="https://assets.msn.com/service/segments/recoitems/shopping",sr={ocid:"anaheim-shopping-topsites",apiKey:"ogTIEkUJTNRKfuviV6imfOBW6i874Wsn2XeWZBW83k",$select:"BatchStoresCashbackWorkflow"};function cr(){return"1"===Tn.c.getParamsObj((0,tr.zp)()).vptest}function dr(e){try{var t,n,i;null!==(t=window)&&void 0!==t&&null!==(n=t.chrome)&&void 0!==n&&null!==(i=n.ntpSettingsPrivate)&&void 0!==i&&i.recordShoppingUserEngagement&&window.chrome.ntpSettingsPrivate.recordShoppingUserEngagement(e,(()=>{}))}catch(e){(0,tt.OO)(e,Xe.V5U,"Unable to send user engagement")}}function lr(){var e,t,n;null!==(e=window)&&void 0!==e&&null!==(t=e.chrome)&&void 0!==t&&null!==(n=t.ntpSettingsPrivate)&&void 0!==n&&n.ShoppingEngagement&&(window.chrome.ntpSettingsPrivate.ShoppingEngagement.NTP_TOP_SITES_CLICK?dr(window.chrome.ntpSettingsPrivate.ShoppingEngagement.NTP_TOP_SITES_CLICK):window.chrome.ntpSettingsPrivate.ShoppingEngagement.NTP_TOP_SITES_HOVER&&dr(window.chrome.ntpSettingsPrivate.ShoppingEngagement.NTP_TOP_SITES_HOVER))}function ur(e){return new Promise((t=>{var n,i,r;cr()?t(!0):null!==(n=window)&&void 0!==n&&null!==(i=n.chrome)&&void 0!==i&&null!==(r=i.ntpSettingsPrivate)&&void 0!==r&&r.getPref?window.chrome.ntpSettingsPrivate.getPref(e,(n=>{t(n&&n.key===e?n.value:null)})):t(null)}))}async function pr(e,t,n){const i=new Map;if(!cr())if(n&&t){var r,o;const t=await async function(e){try{const t={method:"GET",credentials:"include",headers:await Ji.$D.getOneServiceHeaders()},n=hr(e),i=await(0,Xi.w)((async()=>{const e=await fetch(n,t);if(!e)throw Error(`Null response. Url = ${n}`);if(!e.ok)throw Error(`Status:${e.status} Url = ${n}`);return e.json()}),"getShoppingDataFromOneService",rr,or);if(!(i&&i.length&&i[0]&&i[0].data))throw new Error(`Null, empty or invalid response Json. Url = ${n}`);const r={cashbackData:null,userData:null};return i.forEach((e=>{"BatchStoresCashback"===e.type?r.cashbackData=JSON.parse(e.data):"EdgeShoppingCard"===e.type&&(r.userData=JSON.parse(e.data))})),r}catch(e){return null}}(e),n=null==t?void 0:t.userData,s=null==t?void 0:t.cashbackData;let c=[],d=[];var a;if(null!=n&&null!==(r=n.abandonedCarts)&&void 0!==r&&r.data&&n.abandonedCarts.data.length>0)c=null==n||null===(a=n.abandonedCarts)||void 0===a?void 0:a.data;null!=n&&null!==(o=n.priceDrops)&&void 0!==o&&o.data&&n.priceDrops.data.length>0&&(d=n.priceDrops.data),gr(c,d,s,i)}else{gr([],[],await async function(e){try{const t={method:"GET",credentials:"include",headers:await Ji.$D.getOneServiceHeaders()},n=hr(e),i=await(0,Xi.w)((async()=>{const e=await fetch(n,t);if(!e)throw Error(`Null response. Url = ${n}`);if(!e.ok)throw Error(`Status:${e.status} Url = ${n}`);return e.json()}),"getCashbackDataFromOneService",rr,or);if(!(i&&i.length&&i[0]&&i[0].data))throw new Error(`Null, empty or invalid response Json. Url = ${n}`);return JSON.parse(i[0].data)}catch(e){return null}}(e),i)}var s,c;(function(){const e=Tn.c.getParamsObj((0,tr.zp)());return"1"===e.test||"1"===e.vptest})()&&gr(null==ir||null===(s=ir.abandonedCarts)||void 0===s?void 0:s.data,null==ir||null===(c=ir.priceDrops)||void 0===c?void 0:c.data,nr,i);return i}function hr(e){const t=ue.jG.CurrentMarket;if("en-us"!=t)throw new Error(`Unsuported market ${t}`);const n=new URL(ar),i=new Yi.h;for(const e in sr){const t=sr[e];i.set(e,t)}const r=(0,er.pW)();return i.set("activityId",r),i.set(ue.jG.OneServiceContentMarketQspKey,t),i.set("$filter",e.join(",")),n.search=i.toString(),n.href}function gr(e,t,n,i){return(null==e?void 0:e.length)>0&&function(e,t){t.forEach((t=>{const n=t.storeInfo.domain;let i=mr(n);if(e.has(n)&&(i=e.get(n)),""===i.abandonedCart.webLink){const e=new URL(`https://${n}`);i.abandonedCart.webLink=e.toString()}if(i.abandonedCart.numberOfItems=i.abandonedCart.numberOfItems+1,2==i.abandonedCart.cartItems.length)return void e.set(n,i);let r=t.priceInfo.priceCurrencySymbol;"%24"===r&&(r="$");const o=+t.priceInfo.price,a={imgSrc:t.imageInfo.sourceImageUrl,title:t.title,price:`${r}${o.toFixed(2)}`,webLink:t.clickUrl,cartItemAriaLabel:""};a.cartItemAriaLabel=`${a.title} ${a.price}`,i.abandonedCart.cartItems.push(a),e.set(n,i)}))}(i,e),(null==t?void 0:t.length)>0&&function(e,t){t.forEach((t=>{const n=t.storeInfo.domain;let i=mr(n);if(e.has(n)&&(i=e.get(n),2==i.priceDrops.priceDropItems.length))return;let r=t.priceInfo.priceCurrencySymbol;"%24"===r&&(r="$");const o=+t.priceInfo.price,a=+t.priceInfo.originalPrice,s=a-o,c={imgSrc:t.imageInfo.sourceImageUrl,title:t.title,newPrice:`${r}${o.toFixed(2)}`,oldPrice:`${r}${a.toFixed(2)}`,priceDropValue:`${r}${s.toFixed(2)}`,webLink:t.clickUrl,priceDropAriaLabel:""};i.priceDrops.priceDropItems.push(c),e.set(n,i)}))}(i,t),n&&n.length&&function(e,t){t.forEach((t=>{if(t.cashbackInfo.value.length>0){const n=t.domain;let i=mr(n);e.has(n)&&(i=e.get(n));let r="";n&&(r=`&domain=${n}`);const o=new URL(`https://www.bing.com/rebates/details?merchant=${t.storeName}&redref=amc${r}`),a=parseFloat(t.cashbackInfo.value),s=1==t.cashbackInfo.isPercentage?`${a}%`:`$${a.toFixed(2)}`,c={retailer:t.storeName,cashbackValue:s,urlLink:o.toString(),cashbackTextStart:"",cashbackTextEnd:""};i.cashBackInfo=c,e.set(n,i)}}))}(i,n),i}function mr(e){return{domain:e,dialogBoxAriaLabel:"",abandonedCart:{heading:"",cartItems:[],numberOfItems:0,buttonText:"",webLink:""},priceDrops:{heading:"",priceDropItems:[]},cashBackInfo:{retailer:"",cashbackValue:"",urlLink:"",cashbackTextStart:"",cashbackTextEnd:""}}}var fr;!function(e){e[e.initialize=0]="initialize",e[e.render=1]="render",e[e.unmount=2]="unmount",e[e.updateSingInStatus=3]="updateSingInStatus"}(fr||(fr={}));var vr=n(56090),yr=n(96531),Sr=n(85663);class Cr{get shouldRenderSmartList(){return this.$enabled}get smartListBadgePropsMap(){return this.$smartListBadgePropsMap}constructor(e,t,n){this.$sharedLinksDynamicTilePropsCallback=void 0,this.$updateTopSitesHandler=t,this.$sharedLinksDynamicTilePropsCallback=n,this.$smartListConfig=e,this.validateConfigAndSetEnableState(),this.$enabled&&(this.$smartListStorageState=Qi(),this.$smartListSharedConnector=this.getSmartListSharedConnector(),this.startSmartListObservers())}static getInstance(e,t,n){return this.$instance||(this.$instance=new this(e,t,n))}static deInit(){this.$instance=void 0}disableSmartList(e){if(!this.$enabled||!e||!this.$topSiteSmartListMap)return;const t=this.$topSiteSmartListMap.get(e);t&&(t.enabled=!1,Gi(t.experienceType,!1),this.$updateTopSitesHandler())}enableSmartList(e){if(!(this.$enabled&&e&&this.$topSiteSmartListMap&&this.$topSiteSmartListMap.get(e)))return;const t=this.$topSiteSmartListMap.get(e);t&&!t.enabled&&(t.enabled=!0,Gi(t.experienceType,!0),t.experienceType===Ge.x.edgeShopping?this.initEdgeShoppingSmartlist():this.tryInitSmartList(t.experienceType),this.$updateTopSitesHandler())}getSmartListSignInStatus(e){if(!(this.$enabled&&e&&this.$topSiteSmartListMap&&this.$topSiteSmartListMap.get(e)))return;const t=this.$topSiteSmartListMap.get(e);return t?t.isUserSignedIn:void 0}hoverTopSite(e,t=!0,n){if(this.$enabled&&this.$topSiteSmartListMap&&this.$topSiteSmartListMap.has(e)){const i=this.$topSiteSmartListMap.get(e),r=n.currentTarget;i&&i.enabled&&(t?this.executeSmartListCallback(i.experienceType,fr.render,r):this.executeSmartListCallback(i.experienceType,fr.unmount,r))}}mapMostVisitedDataToSmartLists(e,t){var n;if(this.$enabled&&(this.$topSiteSmartListMap=new Map,e.forEach((e=>{const t=this.trimUrl(e.url);Object.values(this.$smartListConfig.smartLists).forEach((n=>{this.getSmartList(n.experienceType)||n.identifierHosts.every((i=>{if(0===t.indexOf(i)||this.checkAndStampIfIsSharedLinks(n,i,e)||this.checkAndStampIfIsContentGroupCard(n,i,e)||this.checkAndStampIfIsTopSiteSubscription(n,i,e)){const t=!this.$smartListStorageState||ji(n.experienceType);return this.$topSiteSmartListMap.set(e.rid,{experienceType:n.experienceType,enabled:t,isSignInAvailable:!(0,Sr.isNullOrUndefined)(n.isSignInAvailable)&&n.isSignInAvailable,isUserSignedIn:!!this.$smartListStorageState&&Ki(n.experienceType)}),this.tryInitSmartList(n.experienceType),!1}return!0}))}))})),this.$smartListStorageState=Zi(...this.$topSiteSmartListMap.values()),this.edgeShoppingSmartlistConfigEnabled()&&(it.M0.addOrUpdateTmplProperty("ShoppingSmartlistsHasConfigEnabled","1"),t||this.fetchShopingDataForTopSites(e),(null===(n=this.$shoppingSmartListData)||void 0===n?void 0:n.size)>0))){const t=Array.from(this.$shoppingSmartListData.keys()),n=e.filter((e=>{var n;const i=null===(n=Pn(e.url))||void 0===n?void 0:n.hostname.replace("www.","");return t.includes(i)}));if(n&&n.length>0){const e=!this.$smartListStorageState||ji(Ge.x.edgeShopping),t={experienceType:Ge.x.edgeShopping,enabled:e,isSignInAvailable:!1,isUserSignedIn:!!this.$smartListStorageState&&Ki(Ge.x.edgeShopping)};this.$smartListStorageState=Zi(...this.$topSiteSmartListMap.values(),t),n.forEach((e=>{e.hasEdgeShoppingSmartlist=!0,this.$topSiteSmartListMap.set(e.rid,t)})),this.initEdgeShoppingSmartlist()}}}checkAndStampIfIsSharedLinks(e,t,n){return e.experienceType===Ge.x.sharedLinks&&t===n.url&&(it.M0.addOrUpdateTmplProperty("SharedLinksTSEnabled","1"),!0)}checkAndStampIfIsContentGroupCard(e,t,n){return e.experienceType===Ge.x.contentGroupCard&&t===n.url&&(it.M0.addOrUpdateTmplProperty("ContentGroupCardEnabled","1"),!0)}checkAndStampIfIsTopSiteSubscription(e,t,n){return e.experienceType===Ge.x.topSitesSubscription&&t===n.url&&(it.M0.addOrUpdateTmplProperty("ContentGroupCardEnabled","1"),!0)}moveFocusToSmartList(e,t){if(this.$enabled&&this.$topSiteSmartListMap){if(this.$topSiteSmartListMap.has(e)){const n=this.$topSiteSmartListMap.get(e);if(n&&n.enabled&&this.$smartListSharedConnector)return this.$smartListSharedConnector.moveFocusToSmartList(n.experienceType,t)}return!1}}signInSmartList(e){if(!(this.$enabled&&e&&this.$topSiteSmartListMap&&this.$topSiteSmartListMap.get(e)))return;const t=this.$topSiteSmartListMap.get(e);t&&t.isSignInAvailable&&!Ki(t.experienceType)&&(t.isUserSignedIn=!0,Gi(t.experienceType,t.enabled,!0),this.executeSmartListCallback(t.experienceType,fr.updateSingInStatus,!0))}signOutSmartList(e){if(!this.$enabled||!e||!this.$topSiteSmartListMap)return;const t=this.$topSiteSmartListMap.get(e);t&&t.isSignInAvailable&&Ki(t.experienceType)&&(t.isUserSignedIn=!1,Gi(t.experienceType,t.enabled,!1),this.executeSmartListCallback(t.experienceType,fr.updateSingInStatus,!1))}getEnabledSmartList(e){if(!(this.$enabled&&e&&this.$topSiteSmartListMap&&this.$topSiteSmartListMap.has(e)))return null;const t=this.$topSiteSmartListMap.get(e);return t.enabled?t:null}hasSignInAvailable(e){return!!(this.$enabled&&this.$topSiteSmartListMap&&this.$topSiteSmartListMap.get(e)&&this.$topSiteSmartListMap.get(e).isSignInAvailable)}hasSmartList(e){return!!(this.$enabled&&e&&this.$topSiteSmartListMap&&this.$topSiteSmartListMap.get(e))}isTopBookmarksSmartList(e){var t;if(!this.$enabled||null===(t=this.$topSiteSmartListMap)||void 0===t||!t.get(e))return!1;return this.$topSiteSmartListMap.get(e).experienceType===Ge.x.topSitesBookmarks}isSharedLinksSmartList(e){var t;if(!this.$enabled||null===(t=this.$topSiteSmartListMap)||void 0===t||!t.get(e))return!1;return this.$topSiteSmartListMap.get(e).experienceType===Ge.x.sharedLinks}executeSmartListCallback(e,t,n){if(this.$smartListSharedConnector)switch(t){case fr.initialize:e===Ge.x.edgeShopping?this.$smartListSharedConnector.initSmartList(e,n):this.$smartListSharedConnector.initSmartList(e);break;case fr.render:this.$smartListSharedConnector.renderSmartList(e,n);break;case fr.unmount:this.$smartListSharedConnector.unmountSmartList(e,n);break;case fr.updateSingInStatus:this.$smartListSharedConnector.updateSignInStatus(e,n)}}tryInitSmartList(e,t){if(!this.isSmartListEnabled(e)||!this.$smartListSharedConnector)return;const n=this.$smartListSharedConnector.getCurrentState().smartLists;n&&0!==n.size&&this.executeSmartListCallback(e,fr.initialize,t)}getSmartListSharedConnector(){return yr._.getInstance().rootReducer.connector(ze.z.SmartListSharedData)}isSmartListEnabled(e){const t=this.getSmartList(e);return!(!t||!t.enabled)}getSmartList(e){for(const[t,n]of this.$topSiteSmartListMap)if(n.experienceType===e)return n;return null}validateConfigAndSetEnableState(){this.$smartListConfig&&this.$smartListConfig.enabled&&this.$smartListConfig.smartLists&&0!==Object.entries(this.$smartListConfig.smartLists).length?this.$enabled=!0:this.$enabled=!1}trimUrl(e){let t;try{t=new URL(e)}catch(e){return""}let n=t.host?t.host:"";return n=n.replace(/^(www\.)?/i,""),`${n}${t.pathname?t.pathname:""}`}updateSmartListBadgeProps(e,t){this.$smartListBadgePropsMap||(this.$smartListBadgePropsMap=new Map),this.$smartListBadgePropsMap.set(e,t)}observeSmartListRegistrations(){this.$smartListSharedConnector&&vr.j.registerSmartList.registerObserver((e=>{if(!e.params&&!e.params[0])return;const t=e.params[0];t.experienceType===Ge.x.edgeShopping?this.initEdgeShoppingSmartlist():this.tryInitSmartList(t.experienceType)}))}observeSmartListBadgePropUpdate(){this.$smartListSharedConnector&&vr.j.updateSmartListBadgeProps.registerObserver((e=>{if(!e.params||!e.params[0])return;const t=e.params[0],n=e.params[1];this.getSmartList(t)&&(this.updateSmartListBadgeProps(t,n),this.$updateTopSitesHandler())}))}observeSmartListDisable(){this.$smartListSharedConnector&&vr.j.disableSmartList.registerObserver((e=>{if(!e.params||!e.params[0])return;const t=e.params[0],n=this.getSmartList(t);if(n)for(const[e,t]of this.$topSiteSmartListMap)if(t===n)return void this.disableSmartList(e)}))}observeSmartListUpdateSignInState(){this.$smartListSharedConnector&&(vr.j.userSignInSignature.registerObserver((e=>{if(!e.params||!e.params[0])return;const t=e.params[0],n=this.getSmartList(t);if(n)for(const[e,t]of this.$topSiteSmartListMap)if(t===n)return void this.signInSmartList(e)})),vr.j.userSignOutSignature.registerObserver((e=>{if(!e.params||!e.params[0])return;const t=e.params[0],n=this.getSmartList(t);if(n)for(const[e,t]of this.$topSiteSmartListMap)if(t===n)return void this.signOutSmartList(e)})))}observeSmartListItemsReady(){vr.j.smartListItemsReadySignature.registerObserver((e=>{var t,n;if(e.params[0]===Ge.x.sharedLinks&&null!==(t=this.$smartListConfig.smartLists)&&void 0!==t&&null!==(n=t.SharedLinks)&&void 0!==n&&n.hasDynamicTile){const t=this.getSharedLinksDynamicTileProps(e.params[1]);this.$sharedLinksDynamicTilePropsCallback(t),this.$updateTopSitesHandler()}}))}getSharedLinksDynamicTileProps(e){if(void 0!==e)try{const t=JSON.parse(e);if(!t)return;return{url:t.link,sharedByEmail:t.sharedByEmail,sharedByInitialsAndColor:t.userInitialsAndColor}}catch(e){return void(0,tt.H)(Xe.DR1,"Failed to parse shared links data from smartlist shared data connector")}}startSmartListObservers(){this.observeSmartListRegistrations(),this.observeSmartListBadgePropUpdate(),this.observeSmartListDisable(),this.observeSmartListUpdateSignInState(),this.observeSmartListItemsReady()}initEdgeShoppingSmartlist(){var e;if((null===(e=this.$shoppingSmartListData)||void 0===e?void 0:e.size)>0){const e=Array.from(this.$shoppingSmartListData.values());this.tryInitSmartList(Ge.x.edgeShopping,JSON.stringify(e))}}edgeShoppingSmartlistConfigEnabled(){return!!this.$smartListConfig.smartLists.EdgeShopping}async fetchShopingDataForTopSites(e){if(!await ur("edge_shopping_assistant_enabled"))return;it.M0.addOrUpdateTmplProperty("HasShoppingPreference","1");if(!await ur("shopping.allow_personalized_shopping"))return;it.M0.addOrUpdateTmplProperty("HasShoppingReminders","1");const t=e.reduce(((e,t)=>{const n=Pn(t.url);return n&&e.push(n.toString()),e}),[]),n=await(i=t,new Promise((e=>{var t,n,r;cr()?e(["https://www.amazon.com"]):null!==(t=window)&&void 0!==t&&null!==(n=t.chrome)&&void 0!==n&&null!==(r=n.edgeShoppingPrivate)&&void 0!==r&&r.getShoppingDomainsEligibility?window.chrome.edgeShoppingPrivate.getShoppingDomainsEligibility(i,(t=>{t&&Object.keys(t).length>0?e(Object.keys(t)):e([])})):e(null)})));var i;if(!n||!Array.isArray(n)||0===n.length)return;it.M0.addOrUpdateTmplProperty("HasShoppingDomain","1");const r=await ur("user_experience_metrics.personalization_data_consent_enabled")??!1,o=r?"1":"0";it.M0.addOrUpdateTmplProperty("HasSanConsent",o);const a=n.map((e=>{var t;return null===(t=Pn(e))||void 0===t?void 0:t.hostname.replace("www.","")})).filter(Boolean),s=a.filter(((e,t)=>a.indexOf(e)===t)),c=await pr(s,r,this.$smartListConfig.useNewShoppingApi);this.$shoppingSmartListData=c,c.size>0?(it.M0.addOrUpdateTmplProperty("HasShoppingDataForTopSites","1"),this.mapMostVisitedDataToSmartLists(e,!0)):it.M0.addOrUpdateTmplProperty("HasShoppingDataForTopSites","0")}}var wr=n(47266),br=n(31558),Tr=n(67044),kr=n(84424);const Pr={lightMode:(0,ue.Yq)().StaticsUrl+"/staticsb/statics/latest/icons-wc/icons/Preview.svg",darkMode:(0,ue.Yq)().StaticsUrl+"/staticsb/statics/latest/icons-wc/icons/PreviewDark.svg"},Ir="removedTopSiteUrls";class Ar extends wr.l{constructor(){super(...arguments),this.dataHelper=new Wi,this.marqueeAdActive=!1,this.publisherEligibilityData=void 0,this.extraAddedSitesClassName="",this.currentNumberOfTopSitesReturnedByClient=0,this.topSitesEndMarginUsedPadding=0,this.enableOfficeComCurated=!1,this.enableWebAppsOnNTP=!1,this.actionMenuOpenTime=void 0,this.isActionMenuOpen=!1,this.isEditDialogOpen=!1,this.isUndoToastOpen=!1,this.isPinToastOpen=!1,this.topSiteMapper=new Map,this.topSites=[],this.currentToastTag=void 0,this.toastExpirationTimerHost={currentToastTimerHandle:null},this.moveUpward=!1,this.topSiteAddedSuccessfully=!1,this.addTopSiteDialogListener=!1,this.editTopSiteDialogListener=!1,this.shouldAddSeeAllLinksInFavoritesHubButton=!1,this.numberPromotedSites=0,this.disablePromoteTopSites=!1,this.isWindowsIndexerFeatureActive=!1,this.topSitesSmartListConfig=null,this.sharedLinksDynamicTileProps=void 0,this.sharedLinksPropsSharedByPhotoUrl=void 0,this.isDisableDefaultInProgress=!1,this.getUserSelectedSetting=()=>this.userSelectedSetting,this.setActiveTopSiteElement=e=>{this.activeTopSiteElement=e},this.overflowItems=[],this.showMenu=!1,this.isOverflowing=!1,this.isOnImage=!0,this.renderTopSiteStartAndEnd=!1,this.topSitesResponsiveClassName="",this.closeFlyouts=(0,Ae.k)((()=>{this.isActionMenuOpen&&this.toggleActionMenu(null),this.isAddDialogOpen&&this.toggleAddDialog(),this.isEditDialogOpen&&this.toggleEditDialog()}),400),this.closeToast=(e=!1)=>{var t;this.currentToastTag=null,e&&(0,Ee.Gg)(Ee.tk.toast,!1),this.isAddDialogOpen&&this.toggleAddDialog(),this.isEditDialogOpen&&this.toggleEditDialog(),null===(t=this.activeContextMenuButtonElement)||void 0===t||t.focus(),this.toastContainer.removeEventListener("focus",this.handleToastFocus,!0),this.toastContainer.removeEventListener("blur",this.handleToastBlur,!0)},this.getOrUpdateTopSites=()=>{var e;this.topSites=this.getTopSites(),this.currentTilesNumber=(null===(e=this.topSites)||void 0===e?void 0:e.length)??0,this.topSitesPlaceHolders=this.getTopSitesPlaceHolders(),this.userSelectedSetting===u.Z3.top&&window.requestAnimationFrame((()=>{window.setTimeout((()=>{this.calcTopSitesToTopOverflowItems()}),10)}))},this.setSharedLinksDynamicTileProps=async e=>{if(this.sharedLinksDynamicTileProps=e,!this.hasValidSharedLinksDynamicTileProps())return;const{getUserPhotoWithEmailUrl:t}=await Promise.all([n.e("common-feed-libs"),n.e("libs_productivity-hub-common_dist_index_js")]).then(n.bind(n,71036));this.sharedLinksPropsSharedByPhotoUrl=await t(this.sharedLinksDynamicTileProps.sharedByEmail)},this.handleClick=e=>{this.isActionMenuOpen&&(!this.topSiteActionsMenu||this.topSiteActionsMenu.contains(e.target)||this.activeContextMenuButtonElement.contains(e.target)||!e.composedPath()||e.composedPath().includes(this.activeContextMenuButtonElement)||this.toggleActionMenu(this.activeTopSiteItem,e)),this.topSites&&this.topSites.length>0&&this.ShowPinningWizardCampaign()},this.lowEndDeviceHandler=e=>{var t;this.isLowEndDevice=(null==e||null===(t=e.detail)||void 0===t?void 0:t.isLowEndDevice)??!1},this.handleTopSiteHover=(e,t=!0,n=!1)=>i=>{if(i&&i.target&&t&&it.M0.sendActionEvent(i.target,rt.Aw.Hover),this.topSitesSmartListManager.shouldRenderSmartList){if(this.topSitesSmartListManager.isSharedLinksSmartList(e)&&this.isActionMenuOpen)return;if(this.topSitesSmartListManager.hoverTopSite(e,t,i),this.topSitesSmartListManager.hasSmartList(e)&&i.target&&"mouseleave"!==i.type){const t=_i.u.get(i.target);if(t&&t.contract){const r=t.contract;r.content&&(n?r.content.headline=Ge.x.edgeShopping:this.topSitesSmartListManager.isSharedLinksSmartList(e)?r.content.headline=Ge.x.sharedLinks:r.content.headline=e.toString()),_i.u.setAttribute(i.target,r),it.M0.sendActionEvent(i.target,rt.Aw.Hover,rt.wu.Show)}}}},this.onMostVisitedHandler=()=>{this.getOrUpdateTopSites()},this.pinAction=(e,t)=>{var n,i;if(1===e.dragDropType&&(null!==(i=this.config)&&void 0!==i&&i.enableAllPin||this.dragDropService&&"slot"in e))return e.dragDropType=-1,this.togglePinToast({toastText:this.strings.unpinConfirmationMessage,toastDisplayMs:k,tileTitle:e.title}),this.dragDropService.updateTopSites(e),this.getOrUpdateTopSites(),void this.dragDropService.addUnpinnedTopSite(e);if(this.activeTopSiteItem=e,null!==(n=this.config)&&void 0!==n&&n.enableAllPin){e.dragDropType=1;let t={...e};t={...e,slot:this.findActiveSiteIndex(e)},this.dragDropService.addTopSite(t),this.togglePinToast({toastText:this.strings.pinConfirmationMessage,toastDisplayMs:k,tileTitle:e.title}),this.getOrUpdateTopSites()}},this.toggleActionMenu=(e,t)=>{var n,i;(this.activeTopSiteElement=!this.isActionMenuOpen&&t?t.currentTarget.parentElement.parentElement:this.activeTopSiteElement,this.activeTopSiteItem=e,this.isActionMenuOpen)?(window.removeEventListener("scroll",this.closeFlyouts),this.actionsMenuProps=void 0):(this.actionMenuOpenTime=null===(n=performance)||void 0===n?void 0:n.now(),window.addEventListener("scroll",this.closeFlyouts),t&&t.currentTarget&&_i.u.addElement(t.currentTarget),this.topSiteActionTelemetryContext&&this.activeTopSiteItem&&(this.topSiteActionTelemetryContext=((e,t)=>{const{tileSourcePrefix:n,isCuratedOrPromoted:i}=Vt(t),{removeTopSite:r,editDialog:o,closeEditDialog:a,saveEdit:s,cancelEdit:c,turnOffPreview:d,turnOnPreview:l,pinningTopSiteInQuickLinks:u,undoRemoveTopSite:p,closeRemoveToast:h,pinningTopSite:g}=e;return r.contract.name=`${n}_${yt}`,p.contract.name=`${n}_${St}`,h.contract.name=`${n}_${vt}`,o.contract.name=`${n}_${bt}`,a.contract.name=`${n}_${Pt}_${Ct}`,s.contract.name=`${n}_${Pt}_${Tt}`,c.contract.name=`${n}_${Pt}_${wt}`,d.contract.name=`${n}_${Lt}`,l.contract.name=`${n}_${Mt}`,g.contract.name=`${n}_${Ft}`,u.contract.name=`${n}_${Dt}`,i&&(r.contract.content.headline=`${_t.remove}_${t.title}`,p.contract.content.headline=`${_t.undoRemove}_${t.title}`,h.contract.content.headline=`${_t.close}_${t.title}`,o.contract.content.headline=`${_t.rename}_${t.title}`,a.contract.content.headline=`${_t.close}_${t.title}`,s.contract.content.headline=`${_t.save}_${t.title}`,c.contract.content.headline=`${_t.cancel}_${t.title}`,d.contract.content.headline=`${_t.turnOffPreview}_${t.title}`,l.contract.content.headline=`${_t.turnOnPreview}_${t.title}`,g.contract.content.headline=`${_t.topsiteTaskbarpin}_${t.title}`,u.contract.content.headline=`${_t.pin}_${t.title}`,r.contract.destinationUrl=`${t.url}`,p.contract.destinationUrl=`${t.url}`,h.contract.destinationUrl=`${t.url}`,o.contract.destinationUrl=`${t.url}`,a.contract.destinationUrl=`${t.url}`,s.contract.destinationUrl=`${t.url}`,c.contract.destinationUrl=`${t.url}`,d.contract.destinationUrl=`${t.url}`,l.contract.destinationUrl=`${t.url}`,g.contract.destinationUrl=`${t.url}`,u.contract.destinationUrl=`${t.url}`),e})(this.topSiteActionTelemetryContext,this.activeTopSiteItem)),this.actionsMenuProps=this.generateActionsMenuProps(),this.activeContextMenuButtonElement=t.currentTarget,null!==(i=this.topSitesSmartListManager)&&void 0!==i&&i.isSharedLinksSmartList(e.rid)&&this.topSitesSmartListManager.hoverTopSite(e.rid,!1,t));this.isActionMenuOpen=!this.isActionMenuOpen,(0,Ee.Gg)(Ee.tk.actionMenuOpen,this.isActionMenuOpen)},this.toggleAddDialog=e=>{if(this.activeTopSitePlaceholderElement=!this.isAddDialogOpen&&e?e.currentTarget.parentElement.parentElement:null,this.isAddDialogOpen)window.removeEventListener("scroll",this.closeFlyouts);else{window.addEventListener("scroll",this.closeFlyouts),e&&e.currentTarget&&_i.u.addElement(e.currentTarget);const t=document.dir===Ln.N.ltr,n=this.config.suggestedTopSiteList&&this.config.suggestedTopSiteList.length>0?h:p,i=this.userSelectedSetting===u.Z3.top,r=i?this.oneLineTopSitesContainer:this.topSitesRoot,o=en(i?this.oneLineTopSitesContainer:this.activeTopSitePlaceholderElement,r,n,document.documentElement.clientWidth,document.documentElement.clientHeight,t,i);this.topSiteAddDialogContainerPosition=o}this.isAddDialogOpen=!this.isAddDialogOpen,this.isAddDialogOpen||(this.isEditDialogOpen&&this.toggleEditDialog(),"undo"===this.currentToastTag&&this.toggleUndoToast()),(0,Ee.Gg)(Ee.tk.addTopSite,this.isAddDialogOpen),this.topSiteAddDialog.newOrUpdatedTopSite={name:"",url:""}},this.handleToastFocus=e=>{var t;this.toastContainer.contains(e.target)&&(t=this.toastExpirationTimerHost).currentToastTimerHandle&&(t.currentToastTimerHandle.paused||(t.currentToastTimerHandle.timerId&&(window.clearTimeout(t.currentToastTimerHandle.timerId),t.currentToastTimerHandle.remainingTime-=Date.now()-t.currentToastTimerHandle.startTime),t.currentToastTimerHandle.paused=!0))},this.handleToastBlur=e=>{var t;this.toastContainer.contains(e.relatedTarget)||(t=this.toastExpirationTimerHost).currentToastTimerHandle&&t.currentToastTimerHandle.paused&&t.currentToastTimerHandle.remainingTime&&(t.currentToastTimerHandle.props.notificationDurationMs&&t.currentToastTimerHandle.props.notificationDurationMs!==1/0&&(t.currentToastTimerHandle.startTime=Date.now(),t.currentToastTimerHandle.timerId=window.setTimeout((()=>{t.currentToastTimerHandle.props.closeToastNotificationHandler(!0)}),t.currentToastTimerHandle.remainingTime)),t.currentToastTimerHandle.paused=!1)},this.toggleSeeAllLinksInFavoritesHubButton=()=>{window&&window.chrome&&window.chrome.ntpSettingsPrivate&&window.chrome.ntpSettingsPrivate.Hub&&window.chrome.ntpSettingsPrivate.openHub&&window.chrome.ntpSettingsPrivate.openHub(window.chrome.ntpSettingsPrivate.Hub.FAVORITES)},this.updateSmartListStateHandler=(e,t)=>{t?this.topSitesSmartListManager.enableSmartList(e):this.topSitesSmartListManager.disableSmartList(e),function(e){e?(0,Ke.f)(63,!!xe.Al.IsPrerender):(0,Ke.f)(64,!!xe.Al.IsPrerender)}(t)},this.saveTopSitesTP1Data=()=>{this.dataHelper.writeTopSites(this.topSites)},this.onBreakpointCallback=e=>{this.columnArrangement=e,this.reRenderTopsite()},this.getCurrentLayoutConfig=()=>{var e;const t=null===(e=this.chromiumPageSettingState)||void 0===e?void 0:e.selectedFeedDisplaySetting,{enableUnifiedTopSites:n,enableUnifiedTopSitesTwoLinesOption:i}=this.config,r=this.userSelectedSetting&&this.userSelectedSetting!==u.Z3.off?this.userSelectedSetting:u.Z3.onerow,o=(n?this.unifiedTopSitesTilesxColxRowsMap:this.tilesxColxRowsMap)[r];var a;if(!o)return it.M0.sendAppErrorEvent({...Xe.A$C,message:"Can't find layout config for topsites",pb:{...Xe.A$C.pb,userSelectedSetting:this.userSelectedSetting,chromiumPageSettingStatePresent:!!this.chromiumPageSettingState,selectedQuickLinksDisplaySetting:null===(a=this.chromiumPageSettingState)||void 0===a?void 0:a.selectedQuickLinksDisplaySetting}}),null;const s=o[this.columnArrangement];return s[t]??s.default},this.onResize=()=>{this.closeFlyouts(),this.userSelectedSetting===u.Z3.top&&this.calcTopSitesToTopOverflowItems()},this.toggleOverflowMenu=e=>{let t,n;switch(e){case H.AllQuickLinksButton:t=this.allQuickLinksButton,n="start";break;case H.SeeMoreButton:t=this.seeMoreButton,n="end";break;default:n="end"}if(!0===this.showMenu&&t!=this.toggleEle&&this.hideOverflowMenu(),!0===this.showMenu)this.toggleEle=null,this.overflowMenuClass="",this.hideOverflowMenu();else{if(this.toggleEle=t,this.overflowMenuClass=n,this.config.enableOneLineTopSitesPillShape&&this.overflowPanelContainer){const e=this.toggleEle&&this.oneLineTopSitesContainer?this.oneLineTopSitesContainer.offsetWidth-this.toggleEle.offsetLeft-this.toggleEle.offsetWidth:0;document.dir===Ln.N.ltr?this.overflowPanelContainer.style.right=e>8?e+"px":"8px":this.overflowPanelContainer.style.left=e>8?e+"px":"8px"}this.showOverflowMenu()}},this.onClickOutside=e=>{const t=e.composedPath();t&&t.includes(this.toggleEle)||this.isActionMenuOpen||t.includes(this.dialogRoot)||t.includes(this.oneLineTopSitesContainer)||t.includes(this.overflowPanelContainer)||this.hideOverflowMenu()},this.onScrollOutside=(0,dn.Z)((()=>{this.hideOverflowMenu()}),200),this.onKeyDown=e=>{const{code:t}=e;"Escape"===t&&this.hideOverflowMenu()}}async experienceConnected(){var e,t,n,i,r,o;(0,Ye.Ou)().TopSitesConnected=null===(e=performance)||void 0===e?void 0:e.now();const a=!xe.Al.IsPrerender;if(this.config.enableWpoTopSitesConfigOverride){const e=(0,kr.DU)();var s,c;if(e)if(null!==(s=this.config.recommendedSites)&&void 0!==s&&s.length&&this.config.enableRecommendedSites&&null!==(c=e.recommendedSites)&&void 0!==c&&c.length){const t=this.config.recommendedSites.concat(e.recommendedSites);t.sort(((e,t)=>e.locationIndex-t.locationIndex));const n=this.config.overrideIconsList;var d;if(this.config={...this.config,...e,recommendedSites:t},null!=n&&n.length)this.config={...this.config,overrideIconsList:null!==(d=this.config.overrideIconsList)&&void 0!==d&&d.length?this.config.overrideIconsList.concat(n):n}}else this.config={...this.config,...e}}var p;(this.topSitesContainerPromise=new Promise((e=>this.topSitesContainerPromiseResolver=e)),this.dragDropService||this.initializeDragDropService(),this.topSiteMenuItems=[{id:u.Z3.off,title:this.strings.offOption||""},{id:u.Z3.onerow,title:this.strings.quickLinks1Row||""},{id:u.Z3.tworows,title:this.strings.quickLinks2Rows||""},{id:u.Z3.top,title:this.strings.quickLinksTop||""}],this.config.enableUnifiedTopSitesTwoLinesOption&&(this.strings.quickLinksMiddle&&(this.topSiteMenuItems[2].title=this.strings.quickLinksMiddle),this.topSiteMenuItems.splice(1,1)),a&&(this.topSites=this.dataHelper.getTopSites()),this.isTP1DataUsed=a&&this.topSites.length>0,this.isTP1DataUsed)?(await this.waitForSelectedQuickLinksReady(),this.chromiumPageSettingState=(0,Tr.K0)(ze.z.ChromiumPageSettings).getCurrentState(),this.userSelectedSetting=this.chromiumPageSettingState.selectedQuickLinksDisplaySetting||this.selectedQuickLinksDisplaySetting,this.processWindowsIndexerFeatureStatus(),(0,Ye.Ou)().TopSitesConnectedFirstGetTopSites=null===(p=performance)||void 0===p?void 0:p.now(),(0,br.N)()&&(0,gn.eC)().then((()=>(0,Ke.f)(11,xe.Al.IsPrerender)))):await this.subscribeToChromiumPageState();this.columnArrangement=(0,Fe.Bn)().currentColumnArrangement,this.numberPromotedSites=this.config.promoteCurated;const h=(0,le.$o)().getItem(M),g=Number(null==h?void 0:h);if(this.disablePromoteTopSites=!isNaN(g)&&0===g,!this.disablePromoteTopSites&&this.numberPromotedSites>g&&(this.numberPromotedSites=g),this.enableSixteenTopSites?(this.maxTiles=f,this.extraAddedSitesClassName=this.userSelectedSetting===u.Z3.tworows&&this.columnArrangement>="c4"?null:B.tenSites):(this.maxTiles=m,this.extraAddedSitesClassName=B.eightSites),this.config.enableOneColumn&&this.columnArrangement===l.K$.c1&&(this.extraAddedSitesClassName=B.sixSites),this.userSelectedSetting===u.Z3.top&&(this.maxTiles=100),this.config.enableUnifiedTopSites&&this.config.enableUnifiedTopSitesTwoLinesOption&&(this.userSelectedSetting===u.Z3.tworows||this.userSelectedSetting===u.Z3.onerow)&&(this.maxTiles=f),null===(t=(0,Tr.K0)(ze.z.TopSitesLayoutData))||void 0===t||t.updateMaxTiles(this.maxTiles),this.pageSettingsConnector=(0,Tr.K0)(ze.z.ChromiumPageSettings),this.config.hidableSearchBox&&this.pageSettingsConnector){var v;const e=null===(v=this.pageSettingsConnector)||void 0===v?void 0:v.getCurrentState();this.moveUpward=(null==e?void 0:e.hideSearchBox)&&"always"===(null==e?void 0:e.selectedFeedDisplaySetting)}if(this.isTP1DataUsed){const e=this.getCurrentLayoutConfig();e&&(this.maxTiles=e.tile,this.extraAddedSitesClassName=e.class),this.topSites.length>=this.maxTiles&&(this.topSites=this.topSites.slice(0,this.maxActualTile))}const y=window;y.chrome&&y.chrome.embeddedSearch&&(this.ntpApiHandle=y.chrome.embeddedSearch.newTabPage),y.chrome&&y.chrome.ntpSettingsPrivate&&(this.ntpSettingsPrivateApiHandle=y.chrome.ntpSettingsPrivate),this.topSitesSmartListConfig=this.config?this.config.smartListConfig:null,this.topSitesSmartListManager=Cr.getInstance(this.topSitesSmartListConfig,this.getOrUpdateTopSites,(null===(n=this.topSitesSmartListConfig)||void 0===n||null===(i=n.smartLists)||void 0===i||null===(r=i.SharedLinks)||void 0===r?void 0:r.hasDynamicTile)&&this.setSharedLinksDynamicTileProps),this.ntpApiHandle&&(this.ntpApiHandle.onmostvisitedchange=this.onMostVisitedHandler);const S=this.getOverrideIconList();if(S&&S.length>0&&S.forEach((e=>{e.identifierHosts.forEach((t=>{this.topSiteMapper.set(t,e.faviconUrl??ke(e.faviconId))}))})),this.config.suggestedTopSiteList&&this.config.suggestedTopSiteList.length>0&&(this.config.suggestedTopSiteList=((e,t)=>{if(!e)return t;for(const n of t){const t=e.addOrUpdateChild({name:`${Et}_${It}_${kt}`,behavior:rt.wu.Save,content:{headline:_t.suggestedLink,type:rt.uH.TopSites},overrideDestinationUrl:Ht,type:rt.c9.ActionButton});n.suggestedLinkTelemetryTag=t.getMetadataTag()}return t})(this.telemetryObject,this.config.suggestedTopSiteList)),this.initializeTopSitesState(),this.minimumTopSites=m-1,this.topSitesResponsiveClassName=this.getTopSitesResponsiveClassName(),!(0,br.N)()){const e=this.getCurrentLayoutConfig();return this.maxTiles=e.tile,this.extraAddedSitesClassName=e.class,void this.getOrUpdateTopSites()}var C,w;this.isTP1DataUsed?(this.currentTilesNumber=(null===(C=this.topSites)||void 0===C?void 0:C.length)??0,this.topSitesPlaceHolders=this.getTopSitesPlaceHolders()):(this.getOrUpdateTopSites(),(0,Ye.Ou)().TopSitesConnectedFirstGetTopSites=null===(w=performance)||void 0===w?void 0:w.now(),(0,br.N)()&&(0,gn.eC)().then((()=>(0,Ke.f)(11,xe.Al.IsPrerender))));this.topSiteAddDialog=this.generateTopSiteAddDialogProps(),this.topSiteAddedSuccessfully=!1,this.topSiteEditDialog=this.generateTopSiteEditDialogProps(),this.actionsMenuProps=this.generateActionsMenuProps(),this.isOnImage=null===(o=this.pageSettingsConnector)||void 0===o?void 0:o.getCurrentState().imageOfTheDayEnabled,(0,pn.FY)(hn._.topSites,this),Promise.all([(0,et.b1)(),(0,mn.lr)()]).then((()=>{sn(this.ntpApiHandle,this.config.enableTelemetryTopSite)})),this.config.enableTopSitesSubscriptions&&nt.Zl.getPublisherEligibilityData().then((e=>{this.publisherEligibilityData=e,e.requestsSuccessful&&this.reRenderTopsite()}))}async subscribeToChromiumPageState(){const e=new Oe.o;(0,bn.Uo)(ze.z.ChromiumPageSettings,(t=>{if(!t.isLoadCompleted)return;e.set(),this.chromiumPageSettingState=t,t&&t.configData&&t.configData.enabledFeatures&&(this.enableOfficeComCurated=t.configData.enabledFeatures.includes("msNtpNoClientCuratedSites"),this.enableWebAppsOnNTP=t.configData.enabledFeatures.includes("msWebAppsOnNTP")),this.processWindowsIndexerFeatureStatus();const n=t&&t.selectedQuickLinksDisplaySetting;if(this.enableSixteenTopSites&&this.userSelectedSetting!==n&&(this.userSelectedSetting&&(this.userSelectedSettingCheck=!0,this.userSelectedSetting=n,this.userSelectedSetting===u.Z3.tworows?this.maxTiles=f:this.userSelectedSetting===u.Z3.top&&(this.maxTiles=100),this.getOrUpdateTopSites()),this.userSelectedSetting=n),this.config.hidableSearchBox){const e=t.hideSearchBox&&"always"===t.selectedFeedDisplaySetting;this.moveUpward!==e&&(this.moveUpward=e)}this.chromiumPageSettingLayoutState&&this.chromiumPageSettingLayoutState!=t&&this.reRenderTopsite(),this.topSiteSelectedItem=this.topSiteMenuItems.find((e=>e.id===this.userSelectedSetting)),this.chromiumPageSettingLayoutState=t,this.isOnImage=t.imageOfTheDayEnabled,this.chromiumPageSettingState.topSitesQuickLinkEndMarginUsedPadding&&this.chromiumPageSettingState.topSitesQuickLinkEndMarginUsedPadding!=this.topSitesEndMarginUsedPadding&&(this.topSitesEndMarginUsedPadding=this.chromiumPageSettingState.topSitesQuickLinkEndMarginUsedPadding),this.topSitesResponsiveClassName=this.getTopSitesResponsiveClassName(),it.M0.addOrUpdateTmplProperty("tsLayout",`${this.userSelectedSetting}`),it.M0.addOrUpdateTmplProperty("tsHideDefault",""+(t.hideDefaultTopSites?1:0))})),window.isSSREnabled&&await e.getResultAsync()}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.dragDropService)||void 0===e||e.destroy(),this.dragDropService=null,window.removeEventListener("resize",this.onResize),window.removeEventListener("mouseup",this.handleClick,!1),window.removeEventListener("LowEndDeviceBkgd",this.lowEndDeviceHandler)}async prerenderRefreshCritical(){return this.initializeTopSitesState()}getApproxTTVRValue(e){const t=(0,Ye.Ou)();if(t[je.p.isSSRCompleted])return t[et.nz+(e||this.getExperienceType())]||t[et.nz+je.p.complete]}shadowDomPopulated(){if((0,br.N)()){if(window.addEventListener("resize",this.onResize),window.addEventListener("mouseup",this.handleClick,!1),window.addEventListener("LowEndDeviceBkgd",this.lowEndDeviceHandler),(0,Fe.Bn)().subscribe(this.onBreakpointCallback),this.isTP1DataUsed?window.requestAnimationFrame((()=>{this.markVisuallyReady(),it.M0.observeSingleElement(this.topSitesRoot)})):window.requestAnimationFrame((()=>{window.setTimeout((()=>{this.markVisuallyReady(),it.M0.observeSingleElement(this.topSitesRoot)}))})),this.columnArrangement=(0,Fe.Bn)().currentColumnArrangement,this.renderTopSiteStartAndEnd=!0,this.isTP1DataUsed){var e;const t=(null===(e=this.topSites)||void 0===e?void 0:e.length)??0;(0,Me.C)((()=>{var e;this.subscribeToChromiumPageState(),this.getOrUpdateTopSites();((null===(e=this.topSites)||void 0===e?void 0:e.length)??0)-t>1&&it.M0.sendAppErrorEvent({...Xe.VKG,message:"TopSites don't get enough data from TP1",pb:{...Xe.VKG.pb,tp1DataLength:this.topSites.length,maxTiles:this.maxTiles,columnArrangement:this.columnArrangement}})}))}else this.reRenderTopsite();this.registerElements(),window.addEventListener("beforeunload",this.saveTopSitesTP1Data,{once:!0})}}registerElements(){if((0,ue.Yq)().ClarityEnabled||this.config.clarityEnabled){var e,t;const n=null===(e=this.shadowRoot)||void 0===e||null===(t=e.getElementById)||void 0===t?void 0:t.call(e,O.topSitesId);n&&n.setAttribute("data-clarity-mask","true")}this.topSitesContainerPromiseResolver(this.userSelectedSetting===u.Z3.top?this.oneLineTopSitesContainer:this.topSitesContainer),this.config.enablePromotionCoachMark&&this.registerCoachMark()}oneLineTopSitesSeeMoreEleChanged(){this.oneLineTopSitesSeeMoreObserver||(this.oneLineTopSitesSeeMoreObserver=new IntersectionObserver((e=>{e.forEach((e=>{e.intersectionRatio<1&&this.calcTopSitesToTopOverflowItems()}))}),{root:null,rootMargin:"0px",threshold:[.8,1]})),this.oneLineTopSitesSeeMoreObserver.disconnect(),this.oneLineTopSitesSeeMoreObserver.observe(this.oneLineTopSitesSeeMoreEle)}quickBriefVisibleChanged(){this.$fastController.isConnected&&this.reRenderTopsite(!0)}get shouldHidePlaceholders(){var e;return(null===(e=this.config)||void 0===e?void 0:e.qbHideAdd)&&this.quickBriefVisible}get maxActualTile(){return this.shouldHidePlaceholders?this.maxTiles:this.maxTiles-1}get tilesxColxRowsMap(){return this.quickBriefVisible?se:ae}getExperienceType(){return Ge.x.topSitesEdgeNextWC}get className(){var e,t,n,i;return this.config.enableMarqueeAd&&(0,bn.Uo)(ze.z.BackgroundData,(e=>{this.marqueeAdActive!==e.displayMarqueeAd&&(this.marqueeAdActive=e.displayMarqueeAd)})),!this.marqueeAdActive&&this.isLowEndDevice&&(null===(e=this.chromiumPageSettingState)||void 0===e?void 0:e.currentLayout)==u.nP.informational||this.config.setBkgdOffInformational&&null!==(t=this.chromiumPageSettingState)&&void 0!==t&&t.imageOfTheDayEnabled&&(null===(n=this.chromiumPageSettingState)||void 0===n?void 0:n.currentLayout)==u.nP.informational?(0,Be.Y)()?B.topSitesDark:B.topSitesLight:this.needDarkThemeIcons?B.topSitesLight:null!==(i=this.chromiumPageSettingState)&&void 0!==i&&i.imageOfTheDayEnabled&&!this.showFullPageBlur?(0,Be.Y)()?B.topSitesDarkOnBackgroundImage:B.topSitesLightOnBackgroundImage:(0,Be.Y)()?B.topSitesDark:B.topSitesLight}get enableSixteenTopSites(){var e;return!(null===(e=this.chromiumPageSettingState)||void 0===e||!e.ntpPrefOptionApiAvailability)}get twoRowSitesClassName(){var e;return this.selectedQuickLinksDisplaySetting&&this.selectedQuickLinksDisplaySetting==u.Z3.tworows?(null===(e=this.topSites)||void 0===e?void 0:e.length)<=this.minimumTopSites?"":B.twoRowSites:""}get showCodexBingNudge(){return this.config&&this.config.showCodexBingNudge&&(0,Le.L)()&&"0"===(0,Le.L)().get("dsp")}get topSitesClassName(){return this.isInformationalLayout&&this.userSelectedSetting!==u.Z3.top?"information-layout":""}get isInformationalLayout(){var e;return!("always"!=(null===(e=this.chromiumPageSettingState)||void 0===e?void 0:e.selectedFeedDisplaySetting))}generateActionsMenuProps(){return{menuItems:this.getActionMenuItem(),onDismiss:this.toggleActionMenu}}generateTopSiteAddDialogProps(){return{addInputListener:e=>{var t,n;this.addTopSiteDialogElement=null===(t=this.shadowRoot)||void 0===t||null===(n=t.getElementById)||void 0===n?void 0:n.call(t,"topSiteAddDialog"),this.addTopSiteDialogListener||(this.addTopSiteDialogListener=!0,this.addTopSiteDialogElement.addEventListener("keydown",(e=>{"Escape"===e.key&&this.addTopSiteDialogElement.closeTopSiteDialog()}))),this.addTopSiteDialogElement.nameInputControl.addEventListener("keydown",(e=>{"Tab"!==e.key&&"Shift"!==e.key||this.addTopSiteDialogElement.nameInputKeyHandler(e)}))},onClose:e=>{this.toggleAddDialog()},saveHandler:(e,t)=>{const n=t||e.detail,i=Pn(n.url),r=t?t.title:n.name,o=function(e,t,n){if(e&&t){const i=e.fixupAndValidateUrl(t.href);if(i)return e.updateCustomLink(-1,i,n||t.hostname),(0,Ke.f)(58,!!xe.Al.IsPrerender),!0}return!1}(this.ntpApiHandle,i,r);this.lastAddedTopSite=r,o?(this.topSiteAddedSuccessfully=!0,this.toggleAddDialog()):(this.topSiteAddedSuccessfully=!1,this.lastAddedTopSite="")},headerTitle:this.strings.addDialogHeadingText,saveText:this.strings.addText,cancelText:this.strings.cancelText,closeText:this.strings.closeButtonText,dialogAnchor:this.activeTopSiteElement,nameInputBox:{name:this.strings.nameLabelText,value:"",ariaLabel:this.strings.ariaLabel_addNameInput||"",id:"nameInputControl"},urlInputBox:{name:this.strings.urlLabelText,value:"",ariaLabel:this.strings.ariaLabel_addUrlInput||"",id:"urlInputControl"},newOrUpdatedTopSite:{name:"",url:""},saveButtonTelemetryTag:this.topSitesTelemetryContext&&this.topSitesTelemetryContext.saveAdd&&this.topSitesTelemetryContext.saveAdd.getMetadataTag(),cancelButtonTelemetryTag:this.topSitesTelemetryContext&&this.topSitesTelemetryContext.cancelAdd&&this.topSitesTelemetryContext.cancelAdd.getMetadataTag(),closeButtonTelemetryTag:this.topSitesTelemetryContext&&this.topSitesTelemetryContext.closeAddDialog&&this.topSitesTelemetryContext.closeAddDialog.getMetadataTag()}}generateTopSiteEditDialogProps(){return{addInputListener:e=>{var t,n;this.editTopSiteDialogElement=null===(t=this.shadowRoot)||void 0===t||null===(n=t.getElementById)||void 0===n?void 0:n.call(t,"topSiteEditDialog"),this.editTopSiteDialogListener||(this.editTopSiteDialogListener=!0,this.editTopSiteDialogElement.addEventListener("keydown",(e=>{"Escape"===e.key&&this.editTopSiteDialogElement.closeTopSiteDialog()}))),this.editTopSiteDialogElement.nameInputControl.addEventListener("keydown",(e=>{"Tab"!==e.key&&"Shift"!==e.key||this.editTopSiteDialogElement.nameInputKeyHandler(e)}))},onClose:e=>{this.toggleEditDialog(e)},saveHandler:e=>{const t=e.detail,n=Pn(t.url),i=t.name;if(this.dragDropService&&"slot"in this.activeTopSiteItem)return this.activeTopSiteItem.title=i,this.dragDropService.updateTopSites(this.activeTopSiteItem),this.toggleEditDialog(e),void this.getOrUpdateTopSites();const r=function(e,t,n,i,r,o){if(t&&i){let a=t.fixupAndValidateUrl(i.href);if(a&&r)return t.getMostVisitedItemData(r)?(a=t.getMostVisitedItemData(r).url!==a?a:"",t.updateCustomLink(r,a,o||i.hostname),(0,Ke.f)(59,!!xe.Al.IsPrerender)):(t.onmostvisitedchange=n,t.updateCustomLink(-1,a,o||i.hostname),e()),!0}return!1}(this.getOrUpdateTopSites,this.ntpApiHandle,this.onMostVisitedHandler,n,this.activeTopSiteItem.rid,i);r&&this.toggleEditDialog(e)},headerTitle:this.strings.renameDialogHeadingText,saveText:this.strings.saveText,cancelText:this.strings.cancelText,closeText:this.strings.closeButtonText,dialogAnchor:this.activeTopSiteElement,nameInputBox:{name:this.strings.nameLabelText,value:"",ariaLabel:this.strings.ariaLabel_addNameInput||"",id:"nameInputControl"},saveButtonTelemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.saveEdit&&this.topSiteActionTelemetryContext.saveEdit.getMetadataTag(),cancelButtonTelemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.cancelEdit&&this.topSiteActionTelemetryContext.cancelEdit.getMetadataTag(),closeButtonTelemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.closeEditDialog&&this.topSiteActionTelemetryContext.closeEditDialog.getMetadataTag()}}generateUndoTopSiteHandler(){return this.isDisableDefaultInProgress?(this.disableCurated(),void(this.isDisableDefaultInProgress=!1)):this.dragDropService&&"slot"in this.activeTopSiteItem?(this.dragDropService.addTopSite(this.activeTopSiteItem),this.toggleUndoToast(),void this.getOrUpdateTopSites()):(-6!=this.activeTopSiteItem.tileSource&&-7!=this.activeTopSiteItem.tileSource||(this.numberPromotedSites++,(0,le.$o)().setItem(M,this.numberPromotedSites.toString())),on(this.getOrUpdateTopSites,this.ntpApiHandle,this.activeTopSiteItem.rid,this.activeTopSiteItem.tileSource,this.activeTopSiteItem.url),void this.toggleUndoToast(!0))}generateUndoToastProps(){const e=this.activeTopSiteItem.title,t=e.length>20?`${e.substring(0,20)}…`:e,n=this.strings.undoRemovedFormat;let i=(0,De.Z)(n,t);return this.isDisableDefaultInProgress&&(i=[this.strings.undoDisableDefault]),{closeButtonLabel:this.strings.closeButtonText,closeButtonTelemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.closeRemoveToast?this.topSiteActionTelemetryContext.closeRemoveToast.getMetadataTag():null,closeHandler:()=>{this.closeToast()},notificationDurationMs:this.config.undoToastNotificationDurationMs||T,removedText:i,undoButtonLabel:this.strings.undoLabelText,undoButtonTelemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.undoRemoveTopSite?this.topSiteActionTelemetryContext.undoRemoveTopSite.getMetadataTag():null,undoTopSiteHandler:()=>{this.generateUndoTopSiteHandler()}}}generatePinToastProps(e){const{toastText:t,toastDisplayMs:n,tileTitle:i=this.activeTopSiteItem.title}=e,r=i.length>20?`${i.substring(0,20)}…`:i,o=(0,De.Z)(t,r);return{closeButtonLabel:this.strings.closeButtonText,closeButtonTelemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.closeRemoveToast?this.topSiteActionTelemetryContext.closeRemoveToast.getMetadataTag():null,closeHandler:()=>{this.closeToast()},notificationDurationMs:n||this.config.undoToastNotificationDurationMs||T,pinText:o}}generateInstallingWebAppToastProps(){return{displayText:this.strings.installingWebAppToastMessage,notificationDurationMs:1/0,closeButtonLabel:this.strings.toastDismissButtonLabel,closeHandler:()=>{qt(Wt.INSTALLING_APP_TOAST_DISMISS),this.closeToast()}}}generateErrorInstallingWebAppToastProps(){return{displayText:this.strings.errInstallWebAppToastMsg,notificationDurationMs:T,closeButtonLabel:this.strings.toastDismissButtonLabel,closeHandler:()=>{qt(Wt.ERROR_INSTALLING_APP_TOAST_DISMISS),this.closeToast()}}}generateOpenWebAppToastProps(e,t){const n=e.length>20?`${e.substring(0,20)}…`:e;return{displayText:(0,De.Z)(this.strings.openWebAppToastMessage,n),notificationDurationMs:T,closeButtonLabel:this.strings.toastDismissButtonLabel,closeHandler:()=>{qt(Wt.OPEN_APP_TOAST_DISMISS),this.closeToast()},openButtonLabel:this.strings.openWebAppToastAction,openButtonHandler:()=>{qt(Wt.OPEN_APP_TOAST_OPEN_APP),this.openWebApp(t),this.closeToast()}}}checkTopsitesTail(e){var t;const n=null===(t=this.topSites)||void 0===t?void 0:t.length;if(n)for(let t=n-1;t>e&&"slot"in this.topSites[t];t--)this.topSites[t].slot--,this.dragDropService.addTopSite(this.topSites[t])}getActionMenuItem(){var e,t,n;const i=this.activeTopSiteItem&&[-5,-6].includes(this.activeTopSiteItem.tileSource),r=this.activeTopSiteItem&&(-8===this.activeTopSiteItem.tileSource||-7===this.activeTopSiteItem.tileSource),o=ue.jG.CurrentMarket===Re.IY.ENUS,a=this.activeTopSiteItem&&(null===(e=this.topSitesSmartListManager)||void 0===e?void 0:e.isSharedLinksSmartList(this.activeTopSiteItem.rid)),s={id:"Remove",title:this.strings.removeLabelText,glyph:Mn(),onClick:e=>{this.checkTopsitesTail(this.findActiveSiteIndex(this.activeTopSiteItem)),"https://www.office.com"==this.activeTopSiteItem.url&&(this.deletedUrlLookup[this.activeTopSiteItem.url]=!0,this.webStorage.setObject(Ir,this.deletedUrlLookup)),-6!=this.activeTopSiteItem.tileSource&&-7!=this.activeTopSiteItem.tileSource||(this.numberPromotedSites--,(0,le.$o)().setItem(M,this.numberPromotedSites.toString())),this.dragDropService&&"slot"in this.activeTopSiteItem&&this.dragDropService.removeTopSite(this.activeTopSiteItem),rn(0,this.getOrUpdateTopSites,this.activeTopSiteItem,this.ntpApiHandle,this.toggleUndoToast.bind(this,!0),!0),this.onMostVisitedHandler()},telemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.removeTopSite?this.topSiteActionTelemetryContext.removeTopSite.getMetadataTag():""},c={id:"Rename",title:this.strings.renameLabelText,glyph:Fi(),onClick:e=>{this.toggleEditDialog(e)},telemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.editDialog?this.topSiteActionTelemetryContext.editDialog.getMetadataTag():""},d={id:"Hide",title:o?this.strings.hidePromotedCuratedLabelText:this.strings.hideCuratedLabelText,glyph:Bi(),onClick:e=>{this.disableCurated()},telemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.removeCurated?this.topSiteActionTelemetryContext.removeCurated.getMetadataTag():""},l={id:"Hide",title:o?this.strings.hideSponsoredCuratedLabelText:this.strings.hideCuratedLabelText,glyph:Bi(),onClick:e=>{this.disableCurated()},telemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.removeCurated?this.topSiteActionTelemetryContext.removeCurated.getMetadataTag():""},u={id:"PinToTaskBar",title:this.strings.pinToTaskBar,glyph:Ui(),onClick:e=>{this.pinToTaskBar(),this.togglePinToast()},telemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.pinningTopSite?this.topSiteActionTelemetryContext.pinningTopSite.getMetadataTag():""},p={id:"Pin",title:1===(null===(t=this.activeTopSiteItem)||void 0===t?void 0:t.dragDropType)?this.strings.unpinSite:this.strings.pinSite,glyph:1===(null===(n=this.activeTopSiteItem)||void 0===n?void 0:n.dragDropType)?Kn():zn(),onClick:e=>{this.pinAction(this.activeTopSiteItem)},telemetryTag:this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.pinningTopSite?this.topSiteActionTelemetryContext.pinningTopSiteInQuickLinks.getMetadataTag():""},h=[c,s];if(i&&h.push(d),r&&h.push(l),this.config.enableAllPin&&h.push(p),this.config.enablePinningTopSite&&!a&&h.push(u),this.showWebAppInstall()){h.push({id:ce,isLoading:!0});const e=(e,t)=>({id:"installWebApp",title:this.strings.installWebApp||"",glyph:En(),onClick:n=>{qt(Wt.CLICK_INSTALL_OPTION),this.installWebApp(e,t)}}),t=(e,t)=>({id:"openWebApp",title:this.strings.openWebApp||"",glyphUrls:{lightMode:t,darkMode:t},onClick:t=>{qt(Wt.CLICK_OPEN_OPTION),this.openWebApp(e)}}),n=this.actionMenuOpenTime;window.chrome.edgeWebAppsPrivate.getWebAppLaunchOrInstallInfo(this.activeTopSiteItem.url,(i=>{var r;if(!this.actionsMenuProps)return void qt(Wt.DISMISS_THREE_DOT_MENU_BEFORE_FINISH_LOAD);if(!this.activeTopSiteItem)return;const o=h.findIndex((e=>e.id===ce));var a,s,c,d,l;i?(i.appId?h.splice(o,1,t(i.appId,i.iconUrl||this.activeTopSiteItem.faviconUrl)):h.splice(o,1,e(i.url,this.activeTopSiteItem.title)),void 0!==n&&void 0!==(null===(r=performance)||void 0===r?void 0:r.now)&&(a=performance.now()-n,s=void 0!==i.appId,void 0!==(null===(c=window)||void 0===c||null===(d=c.chrome)||void 0===d||null===(l=d.edgeWebAppsPrivate)||void 0===l?void 0:l.recordTimeToShowMenuItem)&&window.chrome.edgeWebAppsPrivate.recordTimeToShowMenuItem(a,s))):h.splice(o,1)}))}const g=this.getSmartListActionsMenuItem();return g&&!a&&h.push(g),h}getSmartListActionsMenuItem(){var e,t;if(this.activeTopSiteItem&&null!==(e=this.topSitesSmartListManager)&&void 0!==e&&e.shouldRenderSmartList&&null!==(t=this.topSitesSmartListManager)&&void 0!==t&&t.hasSmartList(this.activeTopSiteItem.rid)){let e,t,n;return this.topSitesSmartListManager.getEnabledSmartList(this.activeTopSiteItem.rid)?(e=this.strings.disableSmartListText,n=this.updateSmartListStateHandler.bind(this,this.activeTopSiteItem.rid,!1),t=this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.turnOffPreview?this.topSiteActionTelemetryContext.turnOffPreview.getMetadataTag():""):(e=this.strings.enableSmartListText,n=this.updateSmartListStateHandler.bind(this,this.activeTopSiteItem.rid,!0),t=this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.turnOnPreview?this.topSiteActionTelemetryContext.turnOnPreview.getMetadataTag():""),{id:"SmartList",title:e,glyphUrls:Pr,onClick:e=>{n(),this.toggleActionMenu(null)},telemetryTag:t}}return null}hasValidSharedLinksDynamicTileProps(){var e,t,n,i,r,o;return(null===(e=this.topSitesSmartListConfig)||void 0===e||null===(t=e.smartLists)||void 0===t||null===(n=t.SharedLinks)||void 0===n?void 0:n.hasDynamicTile)&&!(null===(i=this.sharedLinksDynamicTileProps)||void 0===i||!i.sharedByEmail)&&!(null===(r=this.sharedLinksDynamicTileProps)||void 0===r||!r.sharedByInitialsAndColor)&&!(null===(o=this.sharedLinksDynamicTileProps)||void 0===o||!o.url)}isSharedLinksSmartListWithValidDynamicTileProps(e){return this.topSitesSmartListManager.isSharedLinksSmartList(e.rid)&&this.hasValidSharedLinksDynamicTileProps()}getOrderedTopSites(){var e,t,n;let i,r;const o=this.config.enableIndexerPrefTest||this.isWindowsIndexerFeatureActive,a=[];if(!(0,br.N)())return Array(this.maxActualTile).fill(G).map(((e,t)=>({...e,rid:t+1})));var s,c,d;i=tn(this.ntpApiHandle,this.config.disableOfficeSite),o&&(r=(0,ln.Z)(i)),i=this.sliceMostVisitedSites(i,r),0!==this.currentNumberOfTopSitesReturnedByClient&&i&&i.length>this.currentNumberOfTopSitesReturnedByClient&&(s=this.chromiumPageSettingState,c=this.pageSettingsConnector,d=i.length,c&&s&&s.configData&&s.configData.maxQuickLinks&&s.selectedQuickLinksDisplaySetting&&s.configData.isQuickLinksFolderInFavoritesEnabled&&10===d&&s.selectedQuickLinksDisplaySetting===u.Z3.onerow&&c.executeSettingsChange(u._9.quickLinksDisplaySetting,u.VE[u.Z3.tworows])),i&&i.length!==this.currentNumberOfTopSitesReturnedByClient&&(this.currentNumberOfTopSitesReturnedByClient=i.length),i=this.removeBlockedSites(i);let l=1;const p=new Map,h=this.numberPromotedSites;let g=h>0&&!this.disablePromoteTopSites;const f=[];if(i||(i=[]),this.config.enableBingChatTS){const e=i.findIndex((e=>"www.office.com"==e.domain));-1!==e&&0==i[e].tileSource&&(i[e].url="https://www.bing.com/chat?form=NTPQL1",i[e].title="Bing Chat",i[e].faviconUrl=ke("AA1cfVF7"),i[e].domain=void 0)}this.updateAffiliateAutoAppendTileSource(i),o&&this.processAffiliateLinksForWindowsIndexer(a);let v=this.maxTiles?this.maxTiles-1:m-1;const y=this.getCurrentLayoutConfig();var S;(v=this.shouldHidePlaceholders?y.tile:y.tile-1,this.config.enableSharedLinksAtRight)&&(null!==(S=i)&&void 0!==S&&S.length&&0===i[i.length-1].tileSource&&i.splice(i.length-1,1),this.config=((e,t)=>{const n=t.recommendedSites;if(null==n||!n.length)return t;const i=n.findIndex((e=>e.url===N));if(-1===i)return t;let r=-1;const o=(0,le.$o)().getItem(yn);return o?r=Number(o):(r=e-1,(0,le.$o)().setItem(yn,String(r))),n[i]={...n[i],locationIndex:r},{...t,recommendedSites:n}})(v,this.config));const C=null===(e=this.chromiumPageSettingState)||void 0===e?void 0:e.hideDefaultTopSites;!C&&g&&this.config.curatedSites&&this.config.reduceFrequentSite&&i.splice(v-this.config.reduceFrequentSite);let w=i.length>=v;if(!C&&i&&this.config&&(i.length<v||g)&&this.config.curatedSites){!function(e,t){if(t&&t.forEach((e=>{const t=Se[e.url]??new me(e.url);we[t.domain]=!0,be[e.url]=!0,!Se[e.url]&&(Se[e.url]=t)})),Ce=[],!e.curatedSites)return;const n={};for(const e in we)Ie(n,e);for(const e in be){if(!e||n[e])return;const t=Se[e]??new me(e);!Se[e]&&(Se[e]=t),Ie(n,t.domainAndPath),n[e]=!0}Ce=new Array,e.curatedSites.forEach((e=>{const i=e.faviconId||Pe(e.faviconUrl),r={...e,faviconUrl:i?ke(i):e.faviconUrl},o=new me(r.url);n[o.domain]||n[o.domainAndPath]||n[r.url]||Ce.push(r),r.isSponsored&&t.forEach((e=>{if(e.url===r.url&&0==e.tileSource){const t=r.faviconId||Pe(r.faviconUrl);e.title=r.title,e.faviconUrl=t?ke(t):r.faviconUrl}}))}))}(this.config,i),i.length<v&&(g=!1,w=!1);const e=i.length;e>0&&(l=i[e-1].rid+1e3);const t=Ce;let n=this.maxActualTile-i.length;g&&(n=h,this.config.enablePromTopsitesSort&&t.sort(((e,t)=>(e.isSponsored=e.isSponsored??!1,t.isSponsored=t.isSponsored??!1,Number(t.isSponsored)-Number(e.isSponsored)))));const r=t.slice(0,n).map((e=>(p.set(l,e),{rid:l++,dataGenerationTime:void 0,faviconUrl:e.faviconUrl??ke(e.faviconId),domain:void 0,title:e.title,tileSource:this.getTileSource(g,e.isSponsored),tileTitleSource:void 0,url:e.url,direction:e.direction,enforcement:void 0,isSponsored:e.isSponsored})));if(!this.config.enableBingChatTS&&(this.webStorage=(0,le.$o)(),this.deletedUrlLookup=this.webStorage.getObject(Ir)||{},this.enableOfficeComCurated&&!this.deletedUrlLookup["https://www.office.com"])){const e={rid:l++,dataGenerationTime:void 0,faviconUrl:ke("BBMzZlJ"),domain:void 0,title:"Office",tileSource:-5,tileTitleSource:void 0,url:"https://www.office.com",direction:"ltr",enforcement:void 0};r.unshift(e)}g?f.push(...r):i.push(...r)}if(this.config.enableSharedLinksWithAds){const e=((e,t,n)=>{const i=n.recommendedSites;if(null==i||!i.length)return{config:n,sites:t};const r=i.findIndex((e=>e.url===N));if(-1===r)return{config:n,sites:t};let o=-1;const a=(0,le.$o)().getItem(Sn),s=(0,le.$o)().getItem(Cn);if(a){if(o=Number(a),s){const e=t.findIndex((e=>e.url===s));-1!==e&&wn(t[e])&&t.splice(e,1)}}else for(let n=Math.min(e-1,t.length-1);n>=0;n--)if(wn(t[n])){(0,le.$o)().setItem(Cn,t[n].url),t.splice(n,1),o=n,(0,le.$o)().setItem(Sn,String(n));break}return-1===o?{config:n,sites:t}:(i[r]={...i[r],locationIndex:o},{config:n={...n,recommendedSites:i},sites:t})})(v,i,this.config);this.config=e.config,i=e.sites}this.config.enableRecommendedSites&&!C&&(i=function(e,t,n,i,r,o){const a=nn(e,t,n,o),s=a.map((e=>e.url));let c;return n=n.filter((e=>{if(!s.includes(e.url))return e})),c=0===n.length&&0===r.length?1:r.length>0?r[r.length-1].rid+1:n[n.length-1].rid+1e3,function(e,t){const n=e.length+t.length,i=[];let r=0,o=0,a=0;for(let s=0;s<n;s++)o<t.length&&t[o].locationIndex===a?i[a++]=t[o++]:r<e.length?i[a++]=e[r++]:i[a++]=t[o++];return i}(n,a.map((e=>{i.set(c,e);const t=e.faviconId??Pe(e.faviconUrl);return{...e,faviconUrl:ke(t),tileSource:-4,rid:c++,customImagePart:e.customImagePart??"image"}})))}(this.config,this.maxTiles,i,p,f,this.publisherEligibilityData),o&&function(e,t,n){const i=nn(e,e.numIndexerTopSites,t,{}),r=new Set(t.map((e=>e.url))),o={key:"wpo",value:i.filter((e=>{if(!r.has(e.url)&&!e.publisherId)return e})).map((e=>({url:e.url,title:e.title})))};n.push(o)}(this.config,r,a)),o&&this.processWindowsIndexerPromotedSites(a);const b=new Map;if(g&&f.length>0)for(let e=h,t=0;e>0&&t<f.length;e--,t++)b.set(v-e,f[t]);const T=new Set([0,2,-5,-8,-4]),k=new Set([4,3]);let P=y.tile;const I=(0,br.N)()?(null===(t=this.dragDropService)||void 0===t||null===(n=t.getFixedTopSites)||void 0===n?void 0:n.call(t))??[]:[];let A=I.filter((e=>e.slot<P)),E=(0,un.Z)(i,A,"url"),x=E.filter((e=>k.has(e.tileSource)));x.length+I.filter((e=>e.slot<y.tile)).length<y.tile&&!this.shouldHidePlaceholders&&(P=y.tile-1,A=I.filter((e=>e.slot<P)),E=(0,un.Z)(i,A,"url"),x=E.filter((e=>k.has(e.tileSource))));const M=A.length,L=Math.min(P-M,x.length),D=P-M-L;let R=0,F=0;const O=E.reduce(((e,t)=>(T.has(t.tileSource)&&F<D&&(e.push(t),F+=1),k.has(t.tileSource)&&R<L&&(e.push(t),R+=1),e)),[]);i=[...Kt(O,A)],g&&0===L&&b.size>0&&b.forEach(((e,t)=>{i.splice(t,0,e),i.pop()}));const B=xe.Al.CurrentFlightSet;return(B.has("prg-prmt-crtdv2")||B.has("prg-prmt-ctrlv2"))&&w&&it.M0.addOrUpdateTmplString("promotedTopSites"),i}getTopSites(){const e=this.getOrderedTopSites();if(null==e||!e.length)return this.userSelectedSetting&&this.userSelectedSetting==u.Z3.off||this.zeroTopSitesErrorHandler(),[];this.userSelectedSettingCheck||this.topSitesSmartListManager.mapMostVisitedDataToSmartLists(e),this.userSelectedSettingCheck=!1;const t=[],n=this.maxActualTile;return e.forEach(((e,i)=>{if(n<i)return;if(this.config.overrideIconsList&&this.config.overrideIconsList.length>0&&this.topSiteMapper.size>0)if(this.topSiteMapper.get(e.url))e.faviconUrl=this.topSiteMapper.get(e.url);else{const t=an(e.url);this.topSiteMapper.get(t)&&(e.faviconUrl=this.topSiteMapper.get(t))}q&&q[e.url]&&(e.faviconUrl=ke(q[e.url])),V&&V[e.url]&&(e.title=V[e.url]);const r=new me(e.url),{topSitesAffiliates:o,affiliateLinkOverrides:a}=this.config;o&&o[r.domainPathAndQuery]&&"/"!==o[r.domainPathAndQuery]&&2===e.tileSource&&F.test(o[r.domainPathAndQuery])&&(e.url=e.url.replace(/\/$/,"")+o[r.domainPathAndQuery]),a&&this.handleAffiliateOverrides(r,e);const s=function(e,t){if(t.shouldRenderSmartList){const n=t.getEnabledSmartList(e.rid);if(n&&t.smartListBadgePropsMap&&t.smartListBadgePropsMap.size>0)return t.smartListBadgePropsMap.get(n.experienceType)}return null}(e,this.topSitesSmartListManager),c={...e,badge:s,adLabelType:this.config.adLabelType},d=((e,t)=>{if(!e)return;const{tileSourcePrefix:n,isCuratedOrPromoted:i}=Vt(t),r=rt.uH.TopSites;let o=_t.tsn,a=Ht;return i&&(o=t.title,a=t.url),t.hasEdgeShoppingSmartlist&&(o=_t.edgeShoppingTile),{topSiteTile:e.addOrUpdateChild({name:`${n}_${gt}`,content:{headline:o,type:r},overrideDestinationUrl:a}),destination:e.addOrUpdateChild({name:`${n}_${mt}${"https://www.bing.com/work"===t.url?">top-sites-bookmarks-tile-click":""}`,behavior:rt.wu.Navigate,content:{headline:o,type:r},overrideDestinationUrl:a}),moreOption:e.addOrUpdateChild({name:`${n}_${ft}`,behavior:rt.wu.More,content:{headline:`${_t.moreOption}_${o}`,type:r},overrideDestinationUrl:a}),unpin:e.addOrUpdateChild({name:`${n}_${Rt}`,behavior:rt.wu.Unpin,content:{headline:`${_t.unpin}_${o}`,type:r},overrideDestinationUrl:a}),pin:e.addOrUpdateChild({name:`${n}_${Ft}`,behavior:rt.wu.Pin,content:{headline:`${_t.pin}_${o}`,type:r},overrideDestinationUrl:a})}})(this.telemetryObject,c);let l=(-6===c.tileSource||-7===c.tileSource)&&d&&d.unpin&&d.unpin.getMetadataTag();this.config.enableAllPin&&1===c.dragDropType&&(l=d&&d.pin&&d.pin.getMetadataTag()),t.push({...c,contextMenuLabel:this.strings.contextMenuLabel,contentViewTelemetryTag:d&&d.topSiteTile&&d.topSiteTile.getMetadataTag(),anchorTelemetryTag:d&&d.destination&&d.destination.getMetadataTag(),toggleActionMenuButtonTelemetryTag:d&&d.moreOption&&d.moreOption.getMetadataTag(),enablePinnedIndicator:this.config.enablePinnedIndicator,promote:1===c.dragDropType,pinLabel:1===c.dragDropType?this.strings.unpinSite:this.strings.pinSite,pinActionButtonTelemetryTag:l,textShadowEnabled:this.config.enableBackPlateForPlaceholder})})),t}handleAffiliateOverrides(e,t){const n=this.config.affiliateLinkOverrides;0===t.tileSource&&n[e.domainAndPath]&&"/"!==n[e.domainAndPath]&&this.config.enableAffiliateOverride&&!e.hasQuery&&(t.url=n[e.domain],t.tileSource=2,t.isSponsored=!0,it.M0.addOrUpdateTmplProperty("tsaffov","4"))}getTopSitesPlaceHolders(){const e=[];return this.shouldAddSeeAllLinksInFavoritesHubButton?(e.push({addTileSupported:!1,ariaLabel:this.strings.ariaLabel_seeAllTile,backPlateEnabled:this.config.enableBackPlateForPlaceholder||!1,onSeeAllTopSiteClick:this.toggleSeeAllLinksInFavoritesHubButton,seeAllTileEnabled:!0}),this.currentTilesNumber++):this.currentTilesNumber<this.maxTiles&&(e.push({addTileSupported:!0,backPlateEnabled:this.config.enableBackPlateForPlaceholder||!1,onAddTopSiteClick:this.toggleAddDialog,addTileLabel:this.strings.addTileLabel,ariaLabel:this.strings.ariaLabel_addTile,addTopSiteButtonTelemetryTag:this.topSitesTelemetryContext&&this.topSitesTelemetryContext.topSitePlaceHolderAddSite&&this.topSitesTelemetryContext.topSitePlaceHolderAddSite.getMetadataTag(),seeAllTileEnabled:!1}),this.currentTilesNumber++),e}handleTopSiteClick(e,t){return e=>{const n=e.target;"A"===(null==n?void 0:n.tagName)&&2!==e.button&&t&&lr()}}handleKeyDownPress(e,t){return n=>{"ArrowUp"===n.key?this.topSitesSmartListManager.moveFocusToSmartList(e,!1)&&n.preventDefault():"ArrowDown"===n.key?this.topSitesSmartListManager.moveFocusToSmartList(e,!0)&&n.preventDefault():!t||"Enter"!==n.key&&"NumpadEnter"!==n.key||lr()}}findActiveSiteIndex(e){var t;if(!e||null===(t=this.topSites)||void 0===t||!t.length)return-1;let n=-1;for(let t=0;t<this.topSites.length;t++)if(e.rid===this.topSites[t].rid){n=t;break}return n}installWebApp(e,t){var n,i;this.activeTopSiteItem&&void 0!==(null===(n=window)||void 0===n||null===(i=n.chrome)||void 0===i?void 0:i.edgeWebAppsPrivate)&&(this.toggleInstallingWebAppToast(),window.chrome.edgeWebAppsPrivate.installWebApp(e,t,(e=>{var t;if(!e||!e.success)return void this.toggleErrorInstallingWebAppToast();const n=(null===(t=this.toastExpirationTimerHost.currentToastTimerHandle)||void 0===t?void 0:t.paused)||!1;this.toggleOpenWebAppToast(e.appName,e.appId),n&&window.requestAnimationFrame((()=>{window.setTimeout((()=>{var e;null===(e=this.openWebAppToastRef)||void 0===e||e.focus()}))}))})))}openWebApp(e){var t,n;this.activeTopSiteItem&&void 0!==(null===(t=window)||void 0===t||null===(n=t.chrome)||void 0===n?void 0:n.edgeWebAppsPrivate)&&window.chrome.edgeWebAppsPrivate.openWebApp(e)}disableCurated(){this.isDisableDefaultInProgress=!0;const e=this.chromiumPageSettingState,t={hideDefaultTopSites:!e.hideDefaultTopSites,currentBackgroundImageType:e.currentBackgroundImageType,originalLayout:e.currentLayout,currentLayout:u.nP.custom,greetingEnabled:e.greetingEnabled,imageOfTheDayEnabled:e.imageOfTheDayEnabled,quickLinksEnabled:e.quickLinksEnabled,selectedQuickLinksDisplaySetting:e.selectedQuickLinksDisplaySetting,selectedFeedDisplaySetting:e.selectedFeedDisplaySetting};this.pageSettingsConnector&&(this.pageSettingsConnector.updateLayout(t),this.getOrUpdateTopSites(),this.toggleUndoToast(),this.isDisableDefaultInProgress=!1,(0,fn.ih)(Ge.x.topSitesEdgeNextWC))}getAddShortcutTitle(){var e;return null!==(e=this.strings)&&void 0!==e&&e.addShortcutTitle?this.strings.addShortcutTitle:"Add shortcut"}pinToTaskBar(e){window&&window.chrome&&window.chrome.appPinningPrivate&&window.chrome.appPinningPrivate.pinPage("This attests that the user has agreed to pin this website",this.activeTopSiteItem.url,this.activeTopSiteItem.title)}toggleEditDialog(e){if(this.isEditDialogOpen)window.removeEventListener("scroll",this.closeFlyouts);else{window.addEventListener("scroll",this.closeFlyouts),e&&e.currentTarget&&_i.u.addElement(e.currentTarget),this.topSiteEditDialog.newOrUpdatedTopSite={name:this.activeTopSiteItem.title,url:this.activeTopSiteItem.url},this.topSiteEditDialog.nameInputBox.value=this.activeTopSiteItem.title;const t=document.dir===Ln.N.ltr,n=this.userSelectedSetting===u.Z3.top,i=n?this.oneLineTopSitesContainer:this.topSitesRoot,r=en(this.activeTopSiteElement,i,b,document.documentElement.clientWidth,document.documentElement.clientHeight,t,n);this.topSiteEditDialogContainerPosition=r,this.topSiteEditDialog.saveButtonTelemetryTag=this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.saveEdit&&this.topSiteActionTelemetryContext.saveEdit.getMetadataTag(),this.topSiteEditDialog.cancelButtonTelemetryTag=this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.cancelEdit&&this.topSiteActionTelemetryContext.cancelEdit.getMetadataTag(),this.topSiteEditDialog.closeButtonTelemetryTag=this.topSiteActionTelemetryContext&&this.topSiteActionTelemetryContext.closeEditDialog&&this.topSiteActionTelemetryContext.closeEditDialog.getMetadataTag()}this.isEditDialogOpen=!this.isEditDialogOpen,this.isEditDialogOpen||(this.isAddDialogOpen&&this.toggleAddDialog(),"undo"===this.currentToastTag&&this.toggleUndoToast()),(0,Ee.Gg)(Ee.tk.editTopSite,this.isEditDialogOpen)}updateToastContainer(){const e=this.userSelectedSetting===u.Z3.top?this.oneLineTopSitesContainer:this.topSitesRoot;if(!e)return!1;const t=e.getBoundingClientRect(),n=`top: ${Math.ceil(t.bottom)+window.scrollY+R}px`;return this.toastContainer.setAttribute("style",n),this.toastContainer.addEventListener("focus",this.handleToastFocus,!0),this.toastContainer.addEventListener("blur",this.handleToastBlur,!0),!0}toggleUndoToast(e){(e||"undo"!==this.currentToastTag)&&this.toastContainer&&this.updateToastContainer()?(this.isActionMenuOpen=!1,this.undoToast=this.generateUndoToastProps(),_i.u.addElement(this.toastContainer),this.currentToastTag="undo",Xt(this.toastExpirationTimerHost,this.undoToast.notificationDurationMs,this.closeToast),window.setTimeout((()=>{this.undoButton.focus()}),100)):this.closeToast(),(0,Ee.Gg)(Ee.tk.toast,"undo"===this.currentToastTag)}togglePinToast(e={toastText:this.strings.pinToTaskBarConfirmationMessage}){"pin"!==this.currentToastTag&&this.toastContainer&&this.updateToastContainer()?(this.isActionMenuOpen=!1,this.pinToast=this.generatePinToastProps(e),_i.u.addElement(this.toastContainer),this.currentToastTag="pin",Xt(this.toastExpirationTimerHost,this.pinToast.notificationDurationMs,this.closeToast)):this.closeToast(),(0,Ee.Gg)(Ee.tk.toast,this.isPinToastOpen)}toggleInstallingWebAppToast(){"installing-web-app"!==this.currentToastTag&&this.toastContainer&&this.updateToastContainer()?(this.isActionMenuOpen=!1,this.installingWebAppToastProps=this.generateInstallingWebAppToastProps(),_i.u.addElement(this.toastContainer),this.currentToastTag="installing-web-app",Xt(this.toastExpirationTimerHost,null,(()=>{}))):this.closeToast(),(0,Ee.Gg)(Ee.tk.toast,"installing-web-app"===this.currentToastTag)}toggleErrorInstallingWebAppToast(){"error-installing-web-app"!==this.currentToastTag&&this.toastContainer&&this.updateToastContainer()?(this.isActionMenuOpen=!1,this.errorInstallingWebAppToastProps=this.generateErrorInstallingWebAppToastProps(),_i.u.addElement(this.toastContainer),this.currentToastTag="error-installing-web-app",Xt(this.toastExpirationTimerHost,this.errorInstallingWebAppToastProps.notificationDurationMs,this.closeToast)):this.closeToast(),(0,Ee.Gg)(Ee.tk.toast,"error-installing-web-app"===this.currentToastTag)}toggleOpenWebAppToast(e,t){"open-web-app"!==this.currentToastTag?(this.isActionMenuOpen=!1,this.openWebAppToastProps=this.generateOpenWebAppToastProps(e,t),_i.u.addElement(this.toastContainer),this.currentToastTag="open-web-app",Xt(this.toastExpirationTimerHost,this.openWebAppToastProps.notificationDurationMs,this.closeToast)):this.closeToast(),(0,Ee.Gg)(Ee.tk.toast,"open-web-app"===this.currentToastTag)}async waitForSelectedQuickLinksReady(){const e=new Oe.o,t=n=>{n.isLoadCompleted&&n.selectedQuickLinksDisplaySetting&&((0,bn.q1)(ze.z.ChromiumPageSettings,t),e.set())};(0,bn.Uo)(ze.z.ChromiumPageSettings,t),await e.getResultAsync()}initializeTopSitesState(){this.sitesClassName="expanded-sites",this.topSitesTelemetryContext=(e=>{if(!e)return;const t=rt.uH.TopSites,n=e.addOrUpdateChild({name:At,behavior:rt.wu.Add,content:{headline:_t.addSite,type:t},overrideDestinationUrl:Ht}),i={name:Et,type:rt.wu.View,content:{headline:_t.container,type:rt.uH.TopSites},action:rt.Aw.View,overrideDestinationUrl:Ht};return{topSitePlaceHolderAddSite:n,topSiteCommon:new ot.D(i),saveAdd:e.addOrUpdateChild({name:`${Et}_${It}_${Tt}`,behavior:rt.wu.Save,content:{headline:_t.add,type:t},overrideDestinationUrl:Ht}),cancelAdd:e.addOrUpdateChild({name:`${Et}_${It}_${wt}`,behavior:rt.wu.Cancel,content:{headline:_t.cancel,type:t},overrideDestinationUrl:Ht}),closeAddDialog:e.addOrUpdateChild({name:`${Et}_${It}_${Ct}`,behavior:rt.wu.Close,content:{headline:_t.close,type:t},overrideDestinationUrl:Ht})}})(this.telemetryObject),this.topSiteActionTelemetryContext=(e=>{if(!e)return;const t=rt.uH.TopSites;return{removeTopSite:e.addOrUpdateChild({name:`${yt}`,behavior:rt.wu.Remove,content:{headline:`${_t.remove} ${_t.tsn}`,type:t},overrideDestinationUrl:Ht}),undoRemoveTopSite:e.addOrUpdateChild({name:`${vt}_${St}`,behavior:rt.wu.UndoRemove,content:{headline:`${_t.undoRemove} ${_t.tsn}`,type:t},overrideDestinationUrl:Ht}),closeRemoveToast:e.addOrUpdateChild({name:`${vt}_${Ct}`,behavior:rt.wu.Close,content:{headline:_t.close,type:t},overrideDestinationUrl:Ht}),editDialog:e.addOrUpdateChild({name:`${Et}_${bt}`,behavior:rt.wu.Rename,content:{headline:`${_t.rename} ${_t.tsn}`,type:t},overrideDestinationUrl:Ht}),closeEditDialog:e.addOrUpdateChild({name:`${Et}_${Pt}_${Ct}`,behavior:rt.wu.Close,content:{headline:_t.close,type:t},overrideDestinationUrl:Ht}),saveEdit:e.addOrUpdateChild({name:`${Et}_${Pt}_${Tt}`,behavior:rt.wu.Save,content:{headline:_t.save,type:t},overrideDestinationUrl:Ht}),cancelEdit:e.addOrUpdateChild({name:`${Et}_${Pt}_${wt}`,behavior:rt.wu.Cancel,content:{headline:_t.cancel,type:t},overrideDestinationUrl:Ht}),turnOnPreview:e.addOrUpdateChild({name:`${Et}_${Mt}`,behavior:rt.wu.TurnOn,content:{headline:_t.turnOnPreview,type:t},overrideDestinationUrl:Ht}),turnOffPreview:e.addOrUpdateChild({name:`${Et}_${Lt}`,behavior:rt.wu.TurnOff,content:{headline:_t.turnOffPreview,type:t},overrideDestinationUrl:Ht}),pinningTopSite:e.addOrUpdateChild({name:`${Et}_${Dt}`,behavior:rt.wu.Pin,content:{headline:_t.topsiteTaskbarpin,type:t},overrideDestinationUrl:Ht}),pinningTopSiteInQuickLinks:e.addOrUpdateChild({name:`${Et}_${Ft}`,behavior:rt.wu.Pin,content:{headline:_t.pin,type:t},overrideDestinationUrl:Ht})}})(this.telemetryObject),this.topSiteCommonTelemetryTag=this.topSitesTelemetryContext&&this.topSitesTelemetryContext.topSiteCommon&&this.topSitesTelemetryContext.topSiteCommon.getMetadataTag();const e=(e=>{if(!e)return;const t=rt.uH.TopSites,n={name:xt,type:rt.wu.View,content:{headline:_t.container,type:rt.uH.TopSites},action:rt.Aw.View,overrideDestinationUrl:Ht};return{topSiteCommon:new ot.D(n),allQuickLinkButton:e.addOrUpdateChild({name:`${xt}_${Ot}`,behavior:rt.wu.More,content:{headline:_t.allQuickLinkButton,type:t},overrideDestinationUrl:Ht}),seeMoreButton:e.addOrUpdateChild({name:`${xt}_${Bt}`,behavior:rt.wu.More,content:{headline:_t.seeMoreButton,type:t},overrideDestinationUrl:Ht}),settingButton:e.addOrUpdateChild({name:`${xt}_${Nt}`,behavior:rt.wu.Open,content:{headline:_t.settingButton,type:t},overrideDestinationUrl:Ht}),selector:e.addOrUpdateChild({name:`${xt}_${$t}`,behavior:rt.wu.Click,content:{headline:_t.selector,type:t},overrideDestinationUrl:Ht})}})(this.telemetryObject);this.oneLinetopSitesCommonTelemetryTag=this.topSitesTelemetryContext&&e.topSiteCommon&&e.topSiteCommon.getMetadataTag(),this.oneLinetopSitesAllQuickLinkButtonTelemetryTag=this.topSitesTelemetryContext&&e.allQuickLinkButton&&e.allQuickLinkButton.getMetadataTag(),this.oneLinetopSitesSeeMoreButtonTelemetryTag=this.topSitesTelemetryContext&&e.seeMoreButton&&e.seeMoreButton.getMetadataTag(),this.oneLinetopSitesSettingButtonTelemetryTag=this.topSitesTelemetryContext&&e.settingButton&&e.settingButton.getMetadataTag(),this.oneLineTopSitesSelectorTelemetryTag=this.topSitesTelemetryContext&&e.selector&&e.selector.getMetadataTag()}ShowPinningWizardCampaign(){Qe.MN.notifyTriggerEvent(Qe.j0.NTP_TOP_SITES_CLICK).then((e=>{e&&!e.success&&(0,tt.H)(Xe.Qc1,"TopSitesEdgeNextWC: "+e.Message)})).catch((e=>{(0,tt.OO)(e,Xe.Qc1,"TopSitesEdgeNextWC: Failed to call window.chrome.edgeNurturingPrivate.NotifyTriggerEvent chromium API")}))}reRenderTopsite(e=!1){const t=this.getCurrentLayoutConfig();this.maxTiles=t.tile,this.extraAddedSitesClassName=t.class,e?this.getOrUpdateTopSites():this.renderTopsite()}renderTopsite(){window.requestAnimationFrame((()=>{window.setTimeout((()=>{this.getOrUpdateTopSites()}),0)}))}zeroTopSitesErrorHandler(){it.M0.sendAppErrorEvent({...Xe.xKE,message:"Zero top sites returned"})}initializeDragDropService(){this.dragDropService=new Di(this,{container:this.topSitesContainerPromise,disableDragDrop:!this.config.draggable}),this.dragDropService.initializeService()}shouldDropTopSite(e){const t=0==e.url.indexOf("http://")?e.url.replace("http://","https://"):e.url,n=this.config.blockedDomains||W;if(n)for(let e=0;e<n.length;e++){const i=n[e];if(t.startsWith(i.url)&&(!i.exc||!i.exc.find((e=>t.includes(e)))))return!0}return!1}removeBlockedSites(e){return e?e.filter((e=>{if(0==e.tileSource){if(this.shouldDropTopSite(e))return it.M0.addOrUpdateTmplProperty("RemSE","1"),!1;if(this.config.enableAffiliateOverride&&this.config.affiliateLinkOverrides)return!Object.values(this.config.affiliateLinkOverrides).includes(e.url)}return!0})):null}getTileSource(e,t){return e?t?-7:-6:t?-8:-5}updateAffiliateAutoAppendTileSource(e){const{topSitesAffiliates:t}=this.config;e.forEach((e=>{const n=new me(e.url);t[n.domain]&&"/"!==t[n.domain]&&0==e.tileSource&&(e.tileSource=2,e.isSponsored=!0)}))}processAffiliateLinksForWindowsIndexer(e){const{topSitesAffiliates:t}=this.config,n={key:"affiliate",value:Object.entries(t).map((e=>({url:"https://"+e[0]+e[1]})))};e.push(n)}showOverflowMenu(){this.showMenu=!0,document.addEventListener("click",this.onClickOutside),document.addEventListener("scroll",this.onScrollOutside),document.addEventListener("keydown",this.onKeyDown),(0,Ee.Gg)(Ee.tk.topSiteOverflowPanel,!0)}hideOverflowMenu(){this.showMenu=!1,this.overflowMenuClass="",document.removeEventListener("click",this.onClickOutside),document.removeEventListener("scroll",this.onScrollOutside),document.removeEventListener("keydown",this.onKeyDown),(0,Ee.Gg)(Ee.tk.topSiteOverflowPanel,!1)}calcTopSitesToTopOverflowItems(){if(!this.oneLineTopSitesContainer||!this.oneLineTopSitesContainer.offsetWidth)return;this.overflowItems=[],this.showMenu=!1;let e=0;const t=this.oneLineTopSitesContainer.offsetWidth;this.config.enableOneLineTopSitesPillShape&&(e=this.oneLineTopSitesSeeMoreEle?this.oneLineTopSitesSeeMoreEle.offsetWidth:0),Array.from(this.oneLineTopSitesContainer.children).filter((e=>"A"===e.tagName)).forEach(((n,i)=>{const r=this.topSites[i];if(!r)return;const o=this.config.enableTopsitesTopMiniMargin?4:7;n.classList.remove("hidden"),e+=n.offsetWidth+o,e>t-18?(this.overflowItems.push(r),n.classList.add("hidden")):n.classList.remove("hidden")})),this.isOverflowing=!!this.overflowItems.length}openSettingDialog(e){if(!e)return;e.preventDefault(),e.stopPropagation();const t=(0,pn.b_)(hn._.settingsButton);t&&(it.M0.sendActionEvent(e.target,rt.Aw.Click,rt.wu.Show),t.click())}async registerCoachMark(){var e;const t=this.pageSettingsConnector&&this.pageSettingsConnector.getCurrentState();if(null==t||!t.isTopsitesWPOPromoted)return;const n=this.allQuickLinksButton?this.allQuickLinksButton:this.oneLineTopSitesContainer.querySelector(".pill-top-site"),{topSitesPromotionCoachMark:i}=this.strings,r={id:Ve.gz.TopSitesPromotion,group:Ne.V.Functional,placementSource:Ne.m.Internal,surfaceModel:{surfaceType:$e.U.Coachmark,size:Ve.dm.Large,position:{coachmarkAnchor:n,anchoringPosition:Ve.RC.Below,hasPointer:!0,pointerPosition:Ve.Jt.Adjacent},closeSurfaceAction:{ariaLabel:(null==i?void 0:i.dismissContentActionLabel)||""}},contentModel:{title:(null==i?void 0:i.title)||"",description:(null==i?void 0:i.description)||"",contentType:Ue.J.CallToAction,engageContentAction:{label:(null==i?void 0:i.engageContentActionLabel)||"",actionDelegate:()=>{this.pageSettingsConnector&&(this.pageSettingsConnector.updateQuickLinksDisplayOption(u.Z3.top),(0,qe.qi)(Ze.nc.quick_links_options,u.Z3.top))}},dismissContentAction:{label:(null==i?void 0:i.closeContentActionLabel)||"",actionDelegate:()=>{this.pageSettingsConnector&&(this.pageSettingsConnector.updateQuickLinksDisplayOption(u.Z3.top),(0,qe.qi)(Ze.nc.quick_links_options,u.Z3.top),this.pageSettingsConnector.updateQuickLinksDisplayOption(u.Z3.onerow),(0,qe.qi)(Ze.nc.quick_links_options,u.Z3.onerow))}}}},o=[(0,_e.l)(He.p.Viewed,1),(0,We.H)(He.p.Viewed,864e5)];null===(e=(0,Ni.$0)())||void 0===e||e.sendInternalPlacement(r,o)}sliceMostVisitedSites(e,t){if(this.shouldAddSeeAllLinksInFavoritesHubButton=!1,!e)return null;if(this.chromiumPageSettingState&&this.chromiumPageSettingState.configData&&this.chromiumPageSettingState.configData.isQuickLinksFolderInFavoritesEnabled&&this.chromiumPageSettingState.selectedQuickLinksDisplaySetting){const t=Math.max(...Object.values(this.tilesxColxRowsMap[u.Z3.tworows]).map((e=>{var t;return null===(t=e.default)||void 0===t?void 0:t.tile})))-1;e.length>=t&&this.chromiumPageSettingState.selectedQuickLinksDisplaySetting===u.Z3.tworows&&(e=e.slice(0,t),this.shouldAddSeeAllLinksInFavoritesHubButton=!0)}return(this.config.enableIndexerPrefTest||this.isWindowsIndexerFeatureActive)&&t.slice(0,this.config.numIndexerTopSites),e}getOverrideIconList(){const e=[];if(this.config.overrideIconsList&&this.config.overrideIconsList.length>0)for(const t of this.config.overrideIconsList)e.push(t);return e}focusedAndNotAlways(){const{selectedFeedDisplaySetting:e,currentBackgroundImageType:t}=this.chromiumPageSettingState;return["peek","headingsonly","off"].includes(e)&&t===u.HX.off}setUpSearchBoxHiddenTilesColxRowsMap(){const e=(0,ln.Z)(this.tilesxColxRowsMap);e[u.Z3.onerow][l.K$.c2].default={tile:10,class:B.tenSites},e[u.Z3.onerow][l.K$.c3].always={tile:6,class:B.sixSites},e[u.Z3.onerow][l.K$.c4].default={tile:9,class:B.nineSites},e[u.Z3.tworows][l.K$.c2].default={tile:10,class:B.tenSites},e[u.Z3.tworows][l.K$.c3].default={tile:12,class:B.sixSites},this.searchBoxHiddenTilesxColxRowsMap=e}onTopSiteOptions(e){let t=e&&e.target;t&&"FLUENT-OPTION"!=t.tagName&&"SPAN"==t.tagName&&(t=e.currentTarget)}updateTopSite(e){const t=e&&e.target;if(!t&&!t.selectedIndex)return;const n=t.selectedIndex;isNaN(n)||(this.topSiteSelectedItem=this.topSiteMenuItems[n],window.setTimeout((()=>{this.pageSettingsConnector.updateQuickLinksDisplayOption(this.topSiteSelectedItem.id),(0,qe.qi)(Ze.nc.quick_links_options,this.topSiteSelectedItem.id)})),this.sitesSelectionToggleTelemetry(this.topSiteSelectedItem.id,t))}sitesSelectionToggleTelemetry(e,t){if(!t)return;const n=t;_i.u.addElement(n);const i=_i.u.get(n);i&&i.contract&&(e&&""!==e.toString()&&((i.contract.content=i.contract.content||{}).headline=e.toString()),i.contract.type=rt.c9.ActionButton,i.contract.destinationUrl=location.href,n.setAttribute("data-customhandled","true"),_i.u.setAttribute(n,i.contract),it.M0.sendActionEvent(n,"click"))}topsiteItemContainerTelemetry(){if(this.isActionMenuOpen&&this.activeTopSiteItem)return this.activeTopSiteItem.anchorTelemetryTag}actionsMenuTelemetry(){if(this.isActionMenuOpen&&this.activeTopSiteItem){const e=this.topSites.findIndex((e=>e.url===this.activeTopSiteItem.url));if(e>=0)return function(e,t){return e.addOrUpdateChild({name:`${Ut}_${t}`,behavior:rt.wu.Show,content:{headline:_t.ActionMenu,type:rt.uH.TopSites},overrideDestinationUrl:Ht})}(this.telemetryObject,e+1).getMetadataTag()}}preventClickOnTopSite(e){null==e||e.preventDefault()}getTopSiteTemplateUrl(e){return this.isSharedLinksSmartListWithValidDynamicTileProps(e)?this.sharedLinksDynamicTileProps.url:e.url}processWindowsIndexerFeatureStatus(){var e,t;if(!this.pageSettingsConnector||!this.chromiumPageSettingState)return;const n=this.pageSettingsConnector.isPromotedTopSitesPreferenceAvailable(),i=null===(e=this.chromiumPageSettingState.configData)||void 0===e||null===(t=e.enabledFeatures)||void 0===t?void 0:t.includes("msPromotedLinksInWindowsIndexer");this.isWindowsIndexerFeatureActive=n&&i}processWindowsIndexerPromotedSites(e){this.config.enableIndexerPrefTest&&Je.U.savePreferenceSetting(de,e),this.isWindowsIndexerFeatureActive&&this.ntpSettingsPrivateApiHandle.setPref(de,e)}getTopSitesResponsiveClassName(){const{enableUnifiedTopSites:e,enableUnifiedRecommendedSites:t}=this.config;if(!e)return"";const n=["top-sites-responsive"],i=this.focusedAndNotAlways();return t&&n.push("top-sites-responsive-unified-recommended-sites"),t&&i?n.push("top-sites-responsive-c3-same-width"):n.push("top-sites-responsive-normal-width"),t?n.push("top-sites-responsive-columns-res2"):n.push("top-sites-responsive-columns"),n.join(" ")}get unifiedTopSitesTilesxColxRowsMap(){const{enableUnifiedRecommendedSites:e,enableFixLengthOfTopSites:t}=this.config,n=[2,4,6,8,8],i=[2,6,8,8,8],r=t&&(this.columnArrangement===l.K$.c2||this.columnArrangement===l.K$.c1)?1:0;let o;o=e?i:n;return{[u.Z3.top]:{[l.K$.c1]:{default:{tile:100,class:""}},[l.K$.c2]:{default:{tile:100,class:""}},[l.K$.c3]:{default:{tile:100,class:""}},[l.K$.c4]:{default:{tile:100,class:""}},[l.K$.c5]:{default:{tile:100,class:""}}},[u.Z3.onerow]:{[l.K$.c1]:{default:{tile:o[0]*(1+r),class:""}},[l.K$.c2]:{default:{tile:o[1]*(1+r),class:""}},[l.K$.c3]:{default:{tile:o[2],class:""}},[l.K$.c4]:{default:{tile:o[3],class:""}},[l.K$.c5]:{default:{tile:o[4],class:""}}},[u.Z3.tworows]:{[l.K$.c1]:{default:{tile:o[0]*(2+r),class:""}},[l.K$.c2]:{default:{tile:o[1]*(2+r),class:""}},[l.K$.c3]:{default:{tile:2*o[2],class:""}},[l.K$.c4]:{default:{tile:2*o[3],class:""}},[l.K$.c5]:{default:{tile:2*o[4],class:""}}}}}showWebAppInstall(){var e,t,n;if(!this.activeTopSiteItem)return!1;const i=In(this.activeTopSiteItem.url);return!this.activeTopSiteItem.isSponsored&&!(null!==(e=this.topSitesSmartListManager)&&void 0!==e&&e.isSharedLinksSmartList(this.activeTopSiteItem.rid))&&i&&!$.includes(i.host)&&qt(Wt.OPEN_THREE_DOT_MENU)&&this.enableWebAppsOnNTP&&(null===(t=window)||void 0===t||null===(n=t.chrome)||void 0===n?void 0:n.edgeWebAppsPrivate)}}(0,d.gn)([Gt.LO],Ar.prototype,"isLowEndDevice",void 0),(0,d.gn)([(0,zt.Lj)({mode:"boolean"})],Ar.prototype,"quickBriefVisible",void 0),(0,d.gn)([Gt.lk],Ar.prototype,"shouldHidePlaceholders",null),(0,d.gn)([Gt.LO],Ar.prototype,"actionsMenuProps",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"activeTopSiteItem",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"activeTopSiteElement",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"activeTopSitePlaceholderElement",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"activeContextMenuButtonElement",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"maxTiles",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"chromiumPageSettingState",void 0),(0,d.gn)([(0,zt.Lj)({mode:"boolean"})],Ar.prototype,"needDarkThemeIcons",void 0),(0,d.gn)([Gt.lk],Ar.prototype,"className",null),(0,d.gn)([Gt.LO],Ar.prototype,"extraAddedSitesClassName",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"currentTilesNumber",void 0),(0,d.gn)([(0,zt.Lj)({mode:"boolean"})],Ar.prototype,"showFullPageBlur",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"userSelectedSetting",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"enableWebAppsOnNTP",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"isAddDialogOpen",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"isActionMenuOpen",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"isEditDialogOpen",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"isUndoToastOpen",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"isPinToastOpen",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"isLtr",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"ntpApiHandle",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"sitesClassName",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSiteAddDialog",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSiteEditDialog",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSiteMapper",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSites",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSitesPlaceHolders",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"currentToastTag",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"undoToast",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"pinToast",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"installingWebAppToastProps",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"errorInstallingWebAppToastProps",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"openWebAppToastProps",void 0),(0,d.gn)([zt.Lj],Ar.prototype,"selectedQuickLinksDisplaySetting",void 0),(0,d.gn)([(0,zt.Lj)({mode:"boolean"})],Ar.prototype,"quickLinksToggleSpacingForBanner",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"moveUpward",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSiteAddedSuccessfully",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"lastAddedTopSite",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSiteSelectedItem",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSiteAddDialogContainerPosition",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSiteEditDialogContainerPosition",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"sharedLinksDynamicTileProps",void 0),(0,d.gn)([zt.Lj],Ar.prototype,"sharedLinksPropsSharedByPhotoUrl",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"overflowItems",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"showMenu",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"isOverflowing",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"overflowMenuClass",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"oneLineTopSitesSeeMoreEle",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"isOnImage",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"renderTopSiteStartAndEnd",void 0),(0,d.gn)([Gt.LO],Ar.prototype,"topSitesResponsiveClassName",void 0),(0,d.gn)([Gt.lk],Ar.prototype,"topSitesClassName",null),(0,d.gn)([Gt.lk],Ar.prototype,"isInformationalLayout",null);var Er=n(69416),xr=n(97030),Mr=n(33442),Lr=n(92531),Dr=n(35680),Rr=n(27460),Fr=n(42689),Or=n(80260),Br=n(71942),Nr=n(60184),$r=n(26512),Ur=n(17993),_r=n(27782),Hr=n(38492),Wr=n(26738),qr=n(78923),Vr=n(98106),Gr=n(42166);const zr=(e,t)=>t.replace(/\{([\s\S]+?)\}/g,(t=>`{ .${e} ${t} }`)),jr=(0,Gr.a)(xr.xs),Kr=(0,Gr.a)(xr._3),Qr=(0,Gr.a)(xr.Xn),Zr=(0,Gr.a)(xr.xX),Jr=(0,Gr.a)(xr.sc),Xr=`\n ${(0,l.vW)(null,l.K$.c1)}{width:${jr};\n }\n ${(0,l.eH)(l.K$.c2)}{width:${Kr};\n }\n ${(0,l.eH)(l.K$.c3)}{width:${Qr};\n }\n ${(0,l.eH)(l.K$.c4)}{width:${Zr};\n }\n ${(0,l.vW)(l.K$.c5,null)}{width:${Jr};\n }\n`,Yr=`\n ${(0,l.vW)(null,l.K$.c1)}{width:${jr};\n }\n ${(0,l.eH)(l.K$.c2)}{width:${Kr};\n }\n ${(0,l.eH)(l.K$.c3)}{width:${Qr};\n }\n ${(0,l.eH)(l.K$.c4)}{width:${Qr};\n }\n ${(0,l.vW)(l.K$.c5,null)}{width:${Qr};\n }\n`,eo="2, 50%",to="4, 25%",no=`6, ${(100/6).toFixed(2)}%`,io="8, 12.5%",ro=`\n ${(0,l.vW)(null,l.K$.c1)}{grid-template-columns:repeat(${eo});\n }\n ${(0,l.eH)(l.K$.c2)}{grid-template-columns:repeat(${to});\n }\n ${(0,l.eH)(l.K$.c3)}{grid-template-columns:repeat(${no});\n }\n ${(0,l.eH)(l.K$.c4)}{grid-template-columns:repeat(${io});\n }\n ${(0,l.vW)(l.K$.c5,null)}{grid-template-columns:repeat(${io});\n }\n`,oo=`\n ${(0,l.vW)(null,l.K$.c1)}{grid-template-columns:repeat(${eo});\n }\n ${(0,l.eH)(l.K$.c2)}{grid-template-columns:repeat(${no});\n }\n ${(0,l.eH)(l.K$.c3)}{grid-template-columns:repeat(${io});\n }\n ${(0,l.eH)(l.K$.c4)}{grid-template-columns:repeat(${io});\n }\n ${(0,l.vW)(l.K$.c5,null)}{grid-template-columns:repeat(${io});\n }\n`,ao=`\n ${(0,l.vW)(null,l.K$.c1)}{padding-right:47px}${(0,l.eH)(l.K$.c2)}{padding-right:70px}${(0,l.eH)(l.K$.c3)}{padding-right:85px}${(0,l.eH)(l.K$.c4)}{padding-right:85px}${(0,l.vW)(l.K$.c5,null)}{padding-right:85px}`,so=qr.i`
.one-line-top-sites-container{width:100%;display:flex;height:${Vr.jb.toString()}px;background:rgba(255,255,255,0.1);position:relative}.one-line-top-sites-container.notonimg:not(.pill){background:${Dr.Gy}}.one-line-top-sites-container.solid{background:${Rr.s}}.one-line-top-sites-container.pill{background:none}.oneline-top-sites{display:flex;overflow:hidden;width:100%}.oneline-top-sites .pill-top-site .right-part{display:none}.oneline-top-sites.settings .pill-top-site{position:relative;max-width:unset;transition:background-color 0.5s ease-in-out 0.5s}.oneline-top-sites.settings .pill-top-site .left-part{max-width:150px}.oneline-top-sites.settings .pill-top-site .right-part{display:flex;visibility:hidden;width:0px;border-radius:50%;margin-inline:4px -6px;transition:all 0.5s ease-in-out 0.5s}.oneline-top-sites.settings .pill-top-site:hover .right-part{visibility:inherit;width:24px}.oneline-top-sites .pill-top-site .right-part>fluent-button{color:#FFFFFF;fill:#FFFFFF}.one-line-top-sites-container.notonimg .pill-top-site .right-part>fluent-button,.one-line-top-sites-container.solid .pill-top-site .right-part>fluent-button{color:${Fr.C};fill:${Fr.C}}.oneline-top-sites .pill-top-site .right-part>fluent-button{background:rgba(255,255,255,0.32)}.notonimg .oneline-top-sites .pill-top-site .right-part>fluent-button,.solid .oneline-top-sites .pill-top-site .right-part>fluent-button{background:${Dr.wF}}.one-line-top-sites-container .pill-top-site{cursor:pointer;text-decoration:none;display:flex;max-width:150px;margin:6px 0 6px 7px;padding:6px 11px;align-items:center;box-sizing:border-box;justify-content:space-between;color:#FFFFFF;border-radius:2px}.one-line-top-sites-container.pill .pill-top-site{background:rgba(255,255,255,0.3);border-radius:16px;padding:4px 12px}.one-line-top-sites-container.notonimg.pill .pill-top-site{background:${Dr.Gy}}.one-line-top-sites-container.notonimg .pill-top-site,.one-line-top-sites-container.solid .pill-top-site{color:${Fr.C}}.one-line-top-sites-container .pill-top-site:hover{background:rgba(255,255,255,0.3)}.one-line-top-sites-container .pill-top-site.mini-margin{margin:6px 0px 6px 4px;padding:6px 8px}.one-line-top-sites-container .overflow-menu .pill-top-site{color:${Fr.C};margin:0 0 6px 0;padding:6px 4px}.one-line-top-sites-container .overflow-menu .pill-top-site:nth-child(odd){margin-inline-end:8px}.one-line-top-sites-container.pill .overflow-menu .pill-top-site{background:none;border-radius:2px}.one-line-top-sites-container .overflow-menu .pill-top-site:hover,.one-line-top-sites-container.pill .overflow-menu .pill-top-site:hover{background:${Dr.Xi}}.pill-top-site .left-part,.pill-top-site .right-part{display:flex;--base-height-multiplier:6;overflow:hidden}.pill-top-site .left-part{flex:1}.one-line-top-sites-container.notonimg:not(.pill) .pill-top-site:hover,.one-line-top-sites-container.solid .pill-top-site:hover{background:${Or.sG}}.one-line-top-sites-container.solid .grid-top-sites{--top-site-fill-hover:${(0,Be.Y)()?"rgba(66, 66, 66, 0.4)":"rgba(229, 229, 229, 0.3)"}}.one-line-top-sites-container.solid .grid-top-sites:hover{background:var(--top-site-fill-hover,var(--neutral-fill-hover))}.one-line-top-sites-container .pill-top-site img{width:16px;height:16px;image-rendering:-webkit-optimize-contrast}.one-line-top-sites-container .grid-top-sites img{width:30px;height:30px;max-width:30px !important}.one-line-top-sites-container .grid-top-sites .end{width:30px;height:30px;max-width:30px !important}.one-line-top-sites-container .pill-top-site span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:400;font-size:12px;line-height:16px;margin-inline-start:6px}.hidden{visibility:hidden}.pill .hidden{display:none !important}.see-more-container{display:flex;align-items:center;margin:0 8px;border-radius:2px}.see-more-container .all-links-btn{display:flex;align-items:center;font-size:12px;vertical-align:middle}.see-more-container .all-links-btn svg{margin-inline-start:8px;margin-top:3px;width:12px;height:12px}.see-more-container .all-links-btn.active svg{transform:rotate(-180deg)}.see-more-container>fluent-button{background:none;color:#FFFFFF}.one-line-top-sites-container.pill .see-more-container>fluent-button{background:rgba(255,255,255,0.3);border-radius:16px;height:28px}.one-line-top-sites-container.notonimg.pill .see-more-container>fluent-button{background:${Dr.Gy}}.one-line-top-sites-container.notonimg .see-more-container>fluent-button,.one-line-top-sites-container.solid .see-more-container>fluent-button{color:${Fr.C};}.see-more-container>fluent-button:hover{background-color:rgba(255,255,255,0.07)}.one-line-top-sites-container.notonimg:not(.pill) .see-more-container>fluent-button:hover,.one-line-top-sites-container.solid .see-more-container>fluent-button:hover{background:${Or.sG}}.overflow-menu{color:${Fr.C};fill:${Fr.C};position:absolute;background:${Rr.s};top:${Vr.jb.toString()}px;width:320px;overflow:hidden;border-radius:4px;box-shadow:0 16px 32px rgba(0,0,0,0.14)}.overflow-menu-grid{width:100%;z-index:700}.overflow-menu.hidden{display:none}.overflow-menu .topsite-list{display:flex;flex-wrap:wrap;overflow-y:auto;max-height:200px;padding:12px 0 10px 0;padding-inline-start:10px}.overflow-menu msft-top-site-placeholder{width:100%;height:32px;overflow:hidden}.overflow-menu msft-top-site-placeholder,.overflow-menu msft-top-site-placeholder .add-button,.overflow-menu msft-top-site-placeholder:hover .add-button{background:none}.overflow-menu msft-top-site-placeholder .add-button .add-button-label{display:flex;align-items:center;height:100%}.overflow-menu msft-top-site-placeholder .add-button span{display:inline-block;font-size:14px;line-height:20px}.overflow-menu msft-top-site-placeholder .add-button svg{padding-inline-end:7px;width:15px;height:15px}.overflow-menu msft-top-site-placeholder fluent-button::part(control){justify-content:unset;padding-inline-start:14px}.overflow-menu msft-top-site-placeholder [slot="icon-action"]{display:flex}.overflow-menu .divider{border-top:1px solid ${Br.dt};margin-inline:4px}.topsite-list .pill-top-site{width:142px;height:28px}.topsite-list .grid-top-sites{height:85px;width:104px}.topsite-list .grid-top-sites .end-button{width:24px;height:24px;min-width:24px;display:flex;justify-content:center}.topsite-list .pill-top-site .right-part{visibility:hidden;width:1px;border-radius:50%}.topsite-list .pill-top-site:hover .right-part>fluent-button{background:${Dr.wF}}.topsite-list .pill-top-site:hover .right-part{visibility:inherit;width:unset}.topsite-list-footer{padding:10px 4px 12px 4px}.topsite-list-footer-setting{display:flex;font-size:14px;font-weight:400;line-height:20px;padding:6px 0;cursor:pointer}.topsite-list-footer-setting svg{padding-inline-start:14px;padding-inline-end:4px;width:20px;height:20px}.topsite-list-footer-setting.topsite-direct-settings{padding-inline:14px;justify-content:space-between;vertical-align:middle}.topsite-direct-settings label{line-height:32px;min-width:120px}.topsite-direct-settings fluent-select{min-width:150px;max-width:250px;margin-inline-end:auto;width:100%}.see-more-container.start .all-links-btn svg{margin-inline-end:4px;margin-inline-start:0px}.see-more-container .divider{height:20px;border-right:1px solid ${Nr.rU};margin-inline-start:5px;margin-inline-end:-10px}`,co=qr.i` ${zr("unified-top-sites .top-sites-responsive-normal-width",Xr)} ${zr("unified-top-sites .top-sites-responsive-c3-same-width",Yr)} ${zr("unified-top-sites .top-sites-responsive-columns",ro)} ${zr("unified-top-sites .top-sites-responsive-columns-res2",oo)} ${zr("top-sites .top-sites-responsive-unified-recommended-sites",ao)} .top-sites .top-sites-responsive{box-sizing:border-box}.expanded-sites.top-sites-responsive{min-height:32px}.top-sites .top-sites-responsive-unified-recommended-sites{padding-left:15px}.top-sites .top-sites-responsive-item{padding-right:12px}.top-sites .top-sites-responsive .pill-top-site{margin-left:-4px;padding:4px;height:24px;border-radius:6px;cursor:pointer}.top-sites-responsive .pill-top-site:hover{background-color:var(--top-site-fill-hover,var(--neutral-fill-hover))}.top-sites-responsive .pill-top-site,.top-sites-responsive .left-part{display:flex;text-decoration:none}.top-sites .top-sites-responsive .left-part{flex-grow:1;align-items:center}.top-sites .top-sites-responsive .left-part .dot-separator{color:var(--top-site-color,var(--neutral-foreground-rest))}.top-sites .top-sites-responsive .left-part span:not(.dot-separator){font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--top-site-color,var(--neutral-foreground-rest))}.top-sites-responsive-icon{display:inline-block;line-height:21px;text-align:center}.top-sites .top-sites-responsive .left-part img,.top-sites-responsive-icon{width:16px;height:16px;margin-inline-start:initial;margin-inline-end:8px;transform:translate(0,1px)}.top-sites .top-sites-responsive.top-sites-responsive-unified-recommended-sites .left-part img,.top-sites-responsive-icon.top-sites-responsive-icon-size-20{width:20px;height:20px}.top-sites-responsive .top-sites-responsive-item .right-part{width:0;flex-shrink:0;border-radius:0}.top-sites-responsive .right-part fluent-button{visibility:hidden;border-radius:4px}.top-sites-responsive .pill-top-site:hover .right-part{width:auto}.top-sites-responsive .pill-top-site:hover .right-part fluent-button{visibility:visible}.top-sites .top-sites-responsive .top-sites-responsive-placeholder{width:100%;height:32px;padding:0}.top-sites-responsive-placeholder-add-button{padding:4px}.top-sites-responsive .pill-top-site:hover .top-sites-responsive-pin-icon{display:block}.unified-top-sites > .sites{max-width:none}`,lo=qr.i` .top-sites-responsive-pin-icon{flex-shrink:0;display:none;margin:0 5px}.top-sites .top-sites-responsive-pin-icon{line-height:26px}.one-line-top-sites-container .top-sites-responsive-pin-icon svg{width:12px;height:12px}.top-sites .top-sites-responsive-pin-icon svg{width:14px;height:14px}${co}
`,uo=qr.i` .top-site-next{background-color:transparent;border-radius:4px;box-shadow:none;display:flex;height:var(--top-site-height,84px);justify-content:center;width:var(--top-site-width,108px);position:relative;border:calc(${$r.H} * 1px) solid transparent}.top-site-next:hover:not(.uses-hover-title){background:var(--top-site-fill-hover,${Dr.Xi})}.top-site-next.top-site-f3v1b:hover{background:unset}.top-site-next:has(.control:focus){outline:none;border-color:${Ur.yG}}.top-site-next .control:focus{outline:none;border:none}.top-site-next .start,.top-site-next .end{position:absolute;top:var(--top-site-margin,9px);z-index:2;opacity:0}.top-site-next.small-top-sites.top-site-f3v1b .start{top:var(--top-site-action-top-position);left:var(--top-site-action-border-position)}.top-site-next.small-top-sites.top-site-f3v1b .end{top:var(--top-site-action-top-position);right:var(--top-site-action-border-position)}.top-site-next .pinned-top-site .start{pointer-events:none}.top-site-next:active .start,.top-site-next:active .end,.top-site-next:focus .start,.top-site-next:focus .end,.top-site-next:hover .start,.top-site-next:hover .end,.top-site-next:hover fluent-button,.top-site-next .start:active,.top-site-next .end:active,.top-site-next .start:focus-within,.top-site-next .end:focus-within{background:transparent;opacity:1;outline:none}.top-site-next .content-container{transition:all 0.2s ease-in-out;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;width:100%;height:100%;padding:10px 12px;border-radius:4px}.top-site-next .content-container.information-layout{padding:8px 10px;justify-content:center}.top-site-next .image{align-items:center;box-sizing:border-box;width:var(--top-site-black-plate-width,44px);height:var(--top-site-black-plate-height,44px);justify-content:center;display:flex}.top-site-next .image img{margin:0 auto;max-width:24px;height:24px}.shared-links__persona,.top-site-next .image .shared-links__persona{--top-site-sharedl-tile-icon-size:28px;border-radius:50%;inline-size:var(--top-site-sharedl-tile-icon-size);block-size:var(--top-site-sharedl-tile-icon-size);max-width:none}.shared-links__persona--initials{contain:paint;display:flex;align-items:center;justify-content:center;color:#FFFFFF}.shared-links__persona--initials span{padding-block-end:2px}.top-site-next .title-container{display:flex;justify-content:center;margin:4px 0 0 0;width:100%}.top-site-next .control{box-sizing:content-box;color:var(--top-site-color,${Fr.C});font-family:inherit;font-size:12px;font-weight:400;line-height:18px;max-height:18px;max-width:100%;white-space:nowrap;overflow:hidden;padding:0;text-overflow:ellipsis;text-decoration:none}.top-site-next .control:after{bottom:0;content:"";height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:1}.top-site-next .top-site-next-g{display:grid;gap:5px;align-items:center;grid-auto-flow:column}.top-site-next .pinned-container{display:flex;width:0;margin-inline-end:2px;flex-direction:row-reverse}.top-site-next .pinned-indicator{height:12px;width:12px;align-self:center;display:flex}.top-site-next .pinned-indicator-svg svg{width:12px;height:12px}.top-site-next.small-top-sites.information-layout.uses-hover-title{height:80px}.top-site-next.uses-hover-title .content-container{height:fit-content;justify-content:center;padding:4px 12px 0px}.top-site-next.small-top-sites.information-layout.cancel-hover-top-site{height:var(--top-site-pill-height)}.top-site-next.small-top-sites.information-layout.decrease-top-site{height:50px}.top-site-next.uses-hover-title .title-container{margin:3px 0px 0px}.top-site-next.uses-hover-title .top-site-title{flex-direction:row-reverse}.top-site-next.uses-hover-title .top-site-title-text{display:-webkit-box;opacity:0;-webkit-line-clamp:2;-webkit-box-orient:vertical}.top-site-next.uses-hover-title .top-site-title-text.one-line-title{-webkit-line-clamp:1}.top-site-next.uses-hover-title:hover:not(.drag-chosen__no-hover) .top-site-title-text,.top-site-next.drag-chosen.uses-hover-title .top-site-title-text{opacity:1}.top-site-next.hide-title .top-site-title-text{opacity:0 !important}.top-site-next.uses-hover-title .control{height:34px;line-height:unset;max-height:34px;text-align:center;white-space:unset}.top-site-next.uses-hover-title msn-native-ad-ad-label{position:absolute;top:38px;margin-inline-start:44px}.top-site-next.uses-hover-title.top-site-f3v1b msn-native-ad-ad-label{top:28px}.sites msft-top-site-placeholder.uses-hover-title{height:44px !important;margin:0px 30px;top:4px;width:44px !important}.sites msft-top-site-placeholder.information-layout.uses-hover-title{margin:0px 28px}.top-site-next.uses-hover-title .badge{margin-inline-end:4px;margin-inline-start:0px;opacity:0}.top-site-next.uses-hover-title:hover .badge{opacity:1}.top-site-next.uses-hover-title.add-placeholder.top-site-f3v1b .title-container{height:34px}.top-site-next.uses-hover-title.add-placeholder.top-site-f3v1b .image-container{height:36px;display:flex;align-items:center}.oneline-top-sites msn-native-ad-ad-label[type="topSiteAdLabelSmall"],.overflow-menu msn-native-ad-ad-label[type="topSiteAdLabelSmall"]{margin-inline-start:5px}`,po=qr.i`
${(0,l.vW)(l.K$.c3,null)}{.move-upward.six-sites{--top-sites-grid-template-column:6}}${(0,l.vW)(l.K$.c3,null)}{.move-upward.nine-sites{--top-sites-grid-template-column:9}}.${B.feeds3T1SearchBoxWidth}{--top-sites-grid-template-column:4}${(0,l.vW)(l.K$.c2,null)}{.${B.feeds3T1SearchBoxWidth}{--top-sites-grid-template-column:5}}${(0,l.vW)(l.K$.c3,null)}{.${B.feeds3T1SearchBoxWidth}{--top-sites-grid-template-column:6}}${(0,l.vW)(l.K$.c4,null)}{.${B.feeds3T1SearchBoxWidth}{--top-sites-grid-template-column:9}}.${B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}{--top-sites-grid-template-column:4}${(0,l.vW)(l.K$.c2,null)}{.${B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}{--top-sites-grid-template-column:5}}${(0,l.vW)(l.K$.c3,null)}{.${B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}{--top-sites-grid-template-column:3}}${(0,l.vW)(l.K$.c4,null)}{.${B.feeds3T1SearchBoxWidthWithNotificationMiniCardEnabled}{--top-sites-grid-template-column:6}}`,ho=qr.i` :host{width:100%;--menu-max-width:210px;--menu-min-width:160px;--top-site-dialog-z-index:900}.long-width-menu{--menu-max-width:360px}msn-actions-menu::part(menu-region){z-index:700}.root{display:flex;background-color:transparent;flex-direction:row;justify-content:center;position:relative;transition:transform .3s ease-out;z-index:301;--top-site-margin:4px;--outline-width:2}.expanded-sites{opacity:1;visibility:inherit}.expanded-sites-large{opacity:1;visibility:inherit}.dot-separator{margin-left:2px;margin-right:2px;font-size:9px}msft-top-site-placeholder fluent-button::part(content){height:16px}.add-button{width:100%;height:100%}.add-button svg{width:16px;height:16px;pointer-events:none}.add-button span{display:none}.add-dialog-show{display:block}.add-dialog-hide{display:none}.see-all-button{width:100%;height:100%}.see-all-button svg{width:16px;height:16px;pointer-events:none}.see-all-button span{display:none}.sites{display:grid;grid-template-columns:repeat(var(--top-sites-grid-template-column,8),auto);transition:opacity 0.3s ease-out;row-gap:8px;overflow:hidden}.top-sites > .sites{row-gap:10px;column-gap:var(--top-site-column-gap);overflow:visible;transition:none}.sites .start-button,.sites .end-button{width:24px;height:24px;min-width:24px;display:flex;justify-content:center}.sites .end-button-medium{width:24px;height:24px;min-width:24px;display:flex;justify-content:center;margin-right:7px}.sites .end-button-large{width:24px;height:24px;min-width:24px;display:flex;justify-content:center;margin-right:7px;--top-site-color:${(0,Be.Y)()?"#FFFFFF":"#000000"}}.sites .start-button:hover,.sites .end-button:hover{background:var(--top-site-action-icon-hover,${Or.Qp})}.sites .option-icon{width:14px;height:14px}.sites path{fill:var(--top-site-color,${Fr.C})}@media screen and (-ms-high-contrast:active){.sites path{fill:currentColor}}.sites fluent-button{background:transparent}.suggestion-title{font-weight:600;font-size:${_r.c};line-height:20px}.suggestion-body{margin-top:16px;display:flex}.suggestion-body msft-top-site,.suggestion-body .top-site-next{transition:all 0.2s ease-in-out;border-radius:4px;background:${Rr.s};box-shadow:0px 1.6px 3.6px rgb(0 0 0 / 13%),0px 0px 2.9px rgb(0 0 0 / 11%);cursor:default}.suggestion-body msft-top-site:hover,.suggestion-body .top-site-next:hover{background:${Rr.s};box-shadow:0px 3.2px 7.2px rgb(0 0 0 / 13%),0px 0px 3.8px rgb(0 0 0 / 11%)}.suggestion-body .top-site-next .control{display:inline}.toast-root{position:absolute;left:50%;transform:translate(-50%,0);width:fit-content;max-width:95%;z-index:700;--fill-color:${(()=>{const e=(0,Mr.$B)((()=>Er.m0))(Lr.ZP);return(0,Be.Y)()?Er.P5:e})()};--neutral-foreground-rest:${(()=>{const e=(0,Mr.$B)((()=>Er.m0))(Lr.ZP);return(0,Be.Y)()?e:Er.P5})()};--accent-foreground-rest:${(0,Be.Y)()?"#006CBE":"#63ADE5"};--toast-message-max-width:287px}msn-toast::part(toast-root){color:${Fr.C};background:${Hr.I}}.toast-close-button{background:transparent}.toast-navigation-button{margin-inline-start:4px;background:transparent;color:${Wr.go}}.toast-navigation-button-accent{margin-inline-start:4px;--design-unit:3.2;--control-corner-radius:4}.top-sites{position:relative;--top-site-backplate-color:rgba(255,255,255,0.8);--top-site-backplate-border-color:rgba(0,0,0,0.05);--top-site-pill-width:77px;--top-site-pill-height:58px;--top-site-column-gap:6px;--top-site-border-width:1px}.top-sites.top-site-s2tss{--top-site-pill-width:81px;--top-site-pill-height:62px}.top-sites > .sites{--top-site-pill-calculated-width:calc(var(--top-site-pill-width) + var(--top-site-border-width) * 2);max-width:calc(var(--top-site-pill-calculated-width) * var(--top-sites-grid-template-column) + var(--top-site-column-gap) * (var(--top-sites-grid-template-column) - 1));grid-template-columns:repeat(auto-fit,var(--top-site-pill-calculated-width))}.top-sites.topsitesplate{background:var(--top-site-backplate-color);border:1px solid var(--top-site-backplate-border-color);border-radius:12px;padding:7px;--top-site-color:rgba(0,0,0,0.83)}@media (prefers-color-scheme:dark){.top-sites{--top-site-backplate-color:rgba(0,0,0,0.4)}.top-sites.topsitesplate{--top-site-color:#FFFFFF}}.topSitesLightOnBackgroundImage{--top-site-fill-hover:rgba(229,229,229,0.3);--top-site-color:#FFFFFF;--top-site-action-icon-hover:rgba(234,234,234,0.42);--top-site-placeholder-backplate-fill:rgba(229,229,229,0.7);--neutral-foreground-hint:rgba(255,255,255,0.54)}.topSitesDarkOnBackgroundImage{--top-site-fill-hover:rgba(66,66,66,0.4);--top-site-color:#FFFFFF;--top-site-action-icon-hover:rgba(36,36,36,0.42);--neutral-foreground-hint:rgba(255,255,255,0.54)}.topSitesDark{--top-site-fill-hover:rgba(0,0,0,0.3);--top-site-color:#FFFFFF;--top-site-placeholder-backplate-fill:transparent}.topSitesLight{--top-site-fill-hover:rgba(229,229,229,0.3);--top-site-color:rgba(0,0,0,0.83);--top-site-placeholder-backplate-fill:transparent}.with-back-plate path{fill:${Fr.C}}.top-site-next.drag-chosen:not(.top-site-f3v1b,.uses-hover-title){background:var(--top-site-fill-hover,var(--neutral-fill-hover))}.top-site-next.drag-chosen__no-hover{background:transparent !important}.top-site-next.drag-dragged{background:transparent}.top-site-next.small-top-sites{height:80px;width:104px}.top-site-next.small-top-sites.information-layout{height:75px;width:99px}msft-top-site::part(image),.top-site-next .image{background:${Rr.s};border-radius:4px}msft-top-site::part(image),.add-placeholder.top-site-f3v1b .image{background:transparent}msft-top-site::part(image),.add-placeholder.top-site-f3v1b .image.new-add-image{background:${Rr.s}}msft-top-site::part(imageMSB){background:#0078D4;border-radius:4px}.top-site-next.pill-top-site .image{box-shadow:0px 2px 4px rgb(0 0 0 / 10%);border-radius:12px}.top-site-next.pill-top-site.top-site-s2rc .image{border-radius:8px}.top-site-next.pill-top-site.top-site-f3v1b .add-image{border-radius:12px}.top-site-next.grid-top-sites .image{box-shadow:unset;border-radius:unset;background:unset}.top-site-next.grid-top-sites .start{top:2px;left:0px}.top-site-next.grid-top-sites .end{top:5px;right:0px}.top-site-next.pill-top-site fluent-button{border-radius:4px}.top-site-next.grid-top-sites fluent-button{background:transparent}.top-site-next.grid-top-sites .end:hover{background:var(--top-site-action-icon-hover,${Or.Qp})}.top-site-next.pill-top-site{border-radius:6px}.top-site-next.pinned-top-site .start{pointer-events:none}.top-site-next .control{padding:0;margin:0}.top-site-next .top-site-title{display:flex;justify-content:center;align-items:center}.top-site-next .top-site-title-large-tile{display:flex;justify-content:center;align-items:center;color:${(0,Be.Y)()?"white":"black"};--top-site-color:${(0,Be.Y)()?"white":"black"}}.top-site-next .top-site-title span{overflow:hidden;text-overflow:ellipsis}.top-site-next .top-site-title-large-tile a{overflow:hidden;text-overflow:ellipsis}.top-site-next .badge{padding:1px 5px;border-radius:12px;flex:none;min-width:16px;background-color:#EDEDED;color:#0078D4;margin-inline-start:4px;font-size:10px;line-height:13px;height:16px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;max-width:215px;transition:all 0.2s ease-in-out}.top-site-next.uses-hover-title .badge{display:none}.top-site-next.uses-hover-title:hover .badge{display:inline}msft-top-site-placeholder{height:88px}msft-top-site-placeholder.small-top-sites{height:84px}msft-top-site-placeholder.small-top-sites.information-layout{height:75px;width:99px}.top-site-next .top-site-shadow .top-site-title-text{text-shadow:black 1px 1px 1px}@media (min-width:1012px) and (max-width:1097px){.river-zoom{--top-sites-grid-template-column:10 !important}}.top-site-next.small-top-sites.top-site-f3v1b{--top-site-black-plate-height:36px;--top-site-black-plate-width:36px;--top-site-hover-backplate-width:90px;--top-site-hover-backplate-height:78px;--top-site-action-icon-hover:rgba(0,0,0,0.05);--top-site-action-top-position:-5px;--top-site-action-border-position:-4px;--top-site-anchor-left-fix:-10px;--top-site-fill-hover:transparent;width:var(--top-site-pill-width);height:var(--top-site-pill-height)}.top-site-next.small-top-sites.top-site-f3v1b.top-site-s2ts{--top-site-black-plate-height:40px;--top-site-black-plate-width:40px;--top-site-action-border-position:-6px}.top-site-next.small-top-sites.top-site-f3v1b .image svg{--top-site-color:#FFFFFF}.top-site-next.small-top-sites.top-site-f3v1b .image.new-add-image svg{--top-site-color:#242424}@media (prefers-color-scheme:light){.top-site-next.small-top-sites.top-site-f3v1b .image svg{--top-site-fill-hover:#FFFFFF}.top-site-next.small-top-sites.top-site-f3v1b .image.new-add-image svg{--top-site-color:#242424}}@media (prefers-color-scheme:dark){.top-site-next.small-top-sites.top-site-f3v1b .image svg{--top-site-color:#FFFFFF}.top-site-next.small-top-sites.top-site-f3v1b .image.new-add-image svg{--top-site-color:#ADADAD}.top-site-next.small-top-sites.top-site-f3v1b{--top-site-action-icon-hover:rgba(255,255,255,0.05)}}.top-site-next.small-top-sites.top-site-f3v1b::before{transition:all 0.5s ease-in-out}.top-site-next.small-top-sites.top-site-f3v1b .content-container{padding:0}.top-site-next.small-top-sites.top-site-f3v1b .content-container{justify-content:center}.top-site-next.small-top-sites.top-site-f3v1b .image img{max-width:24px;height:24px}.top-site-next.small-top-sites.top-site-f3v1b .image svg{width:20px;height:20px}.top-site-next.small-top-sites.top-site-f3v1b .image.new-add-image svg{width:15px;height:15px}@media (max-width:1097px){:host{--top-sites-grid-template-column:4}.ten-sites{--top-sites-grid-template-column:5}.eight-sites{--top-sites-grid-template-column:8}.six-sites{--top-sites-grid-template-column:3}}@media (min-width:1098px){:host{--top-sites-grid-template-column:8}.ten-sites{--top-sites-grid-template-column:10}.expanded-sites{min-height:90px}.expanded-sites.information-layout{min-height:75px}.expanded-sites-large{min-height:72.9px}}.top-sites > .expanded-sites{min-height:unset}.top-site-add-success{position:absolute;top:40px;left:-10000px}.pinned-indicator{width:12px;height:12px}#dismissButtonId{margin-top:1px}.topsite-info{float:inline-end}.overflow-menu.start{inset-inline-start:8px}.overflow-menu-grid.start{inset-inline-start:0px}.overflow-menu.end{inset-inline-end:8px}.overflow-menu .dismiss-button{inset-block-start:2px;inset-inline-end:2px}.top-site-next .start{inset-inline-start:var(--top-site-margin,9px)}.top-site-next .end{inset-inline-end:var(--top-site-margin,9px)}msn-actions-menu::part(icon-img){width:20px}${po} ${so} ${lo} ${uo}
`,go=ho,mo={experienceConfigSchema:undefined};i.D.define(r.H.registry),o.D.define(r.H.registry)},82634:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});const i=["/ads-prebid.js","/istripper.js","/javascript/fropo.js","/nb/f_ls.js","/prebid-add.js","/prebid-ads/adsensebase.js","/prebid-article-ad-ad-300x250.js","/reclama/ads.js","/safu/safu.js","/wp-content/plugins/wp-banners/js/wp-banners.js","/zlk/zlk.js"],r=["/adex.js","/adgpt.js","/ados.js","/ads/stickyLb.js","/ane-popup-banner/ane-popup-banner.js","/ane-preroll/preroll.js","/arcads.js","/awe2.js","/clever_ads.js","/cnads.js","/dfp/dc.js","/doublepimp2.js","/eureka/eureka.js","/exopopunderdesktop.js","/expop.js","/fload.js","/fro_lo.js","/frontend_loader.js","/gpt.min.js","/invoke-2.js","/js/m/i-def.js","/js/youmuffpu.js","/js3caf.js","/kampyle.js","/keyade.js","/lib/ad.js","/markpop.js","/moatsdk.min.js","/nugg.min.js","/nwm-fcn.min.js","/nwm-pw2.min.js","/p8network.js","/popu.js","/popup2.js","/popup3.js","/punder.js","/pustrck.js","/scripts/chatur.js","/soralink.js","/suv4.js","/taboola_ads.js","/tardisrocinante/austin.js","/utep_ad.js","/weborama.js","/wp-content/plugins/bhcb/lock.js","/xpopup.js","/_adverts.js","/_rebid.js","/cmbdv2.js","/push-skin/skin.min.js","/pop2.js","/banger.js","/detroitchicago/anaheim.js","/detroitchicago/boise.js","/detroitchicago/houston.js","/detroitchicago/memphis.js","/detroitchicago/minneapolis.js","/detroitchicago/raleigh.js","/detroitchicago/rochester.js","/detroitchicago/tampa.js","/_js/prbd_6.19.0.js","/prebid14.js","/prebid_ver.js","/pubfig.js","/pubfig.min.js","/_prebid.js","/~Prebid.js","/datomata.widget.js","/abtest_ab.js","/adb.min.js","/adblock-relief.js","/blockblock/blockblock.jquery.js","/fuckadb.js"];var o=n(95651),a=n.n(o);class s{Impacts(){const e=this.GetConfig();return new Promise(function(t,n){const i=[this.CheckLoadStatus(e.EasyList),this.CheckLoadStatus(e.UboSpecial),this.CheckLoadStatus(e.Param)];Promise.all(i).then((e=>{t(e[0]||e[1]||e[2])})).catch((e=>{n(e)}))}.bind(this))}CheckLoadStatus(e){const t=document.createElement("script");t.src=e.urls,document.body.appendChild(t);return(async(e,t)=>{const n=new Promise(((t,n)=>{setTimeout(t,e,!1)}));return Promise.race([t,n])})(500,new Promise((function(n,i){t.onload=function(){document.getElementById(e.id)?n(!1):n(!0)},t.onerror=function(){n(!0)}})))}GetConfig(){const e="https://assets.msn.com/staticsb/statics/latest/adboxes",t=this.Sample(r),n=this.Sample(i),o=this.Sample(r);return{UboSpecial:{urls:e+"/ubo"+n,id:btoa(n)},EasyList:{urls:e+"/egb"+t,id:btoa(t)},Param:{urls:e+"/general.js?"+o,id:btoa(o)}}}Sample(e){return e[Math.floor(Math.random()*e.length)]}}var c=new class{constructor(){this.adbTime=0,this.getAdbStatus=()=>(this.hasAdbStatus||(this.adbStatus=this.checkAdbStatus(),this.hasAdbStatus=!0),this.adbStatus),this.getAdbLoggedTime=()=>{const e=a().get("AlgoRes");return e&&"ABD=V=0"!=e&&(this.adbTime=Number(e.split("=")[2])),this.adbTime},this.executeDetector=async()=>{const e=new s,t=await e.Impacts();this.setCookie(t)},this.appendAdbStatusToUrl=e=>{if(!e||0===e.length||!this.getAdbStatus())return e;const t=new URL(e),n=t.searchParams.get("rlink");if(!n)return e;const i=decodeURIComponent(n);if(!(i.includes("www.bing.com/aclick?ld=")||i.includes("www.bing.com/ac?ld=")||i.includes("www.bing.com/ck?ld=")||i.includes("www.bing.com/ack?ld=")||i.includes("www.bing.com/clk?ld=")||i.includes("www.bing.com/aclk?ld=")||i.includes("www.bing.com/click?ld=")))return e;const r=n.concat("&adb=1");return t.searchParams.set("rlink",r),t.toString()},this.checkAdbStatus=()=>{const e=a().get("AlgoRes");return!(!e||"ABD=V=0"===e)},this.setCookie=e=>{if(e){const e=(new Date).getTime();a().set("AlgoRes",`ABD=V=${e}`,{expires:30})}else a().set("AlgoRes","ABD=V=0",{expires:30})}}}},46058:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});n(34757);var i=n(13334);const r="undefined"!=typeof window?function(){const e={positions:[],beacons:{},clickBeacons:{},elements:{},timer:null,watch:null,paused:!1,supportsIO:!(window.location.search.indexOf("useLegacyTracking=1")>-1)&&"IntersectionObserver"in window,viewedBeaconHistory:new Set},t="background: #fff; border-radius: 2px; color: #5f6a96; padding: 4px;";let n=!1;window&&(n=window.location.search.toLowerCase().indexOf("debug=1",0)>-1);const i=function(e){"NOT_PROVIDED"!==e&&((new Image).src=e)},o=function(t){const n=e.clickBeacons[t]||[];if(n.length)for(let e=0,t=n.length;e<t;e++)i(n[e])},a=function(e,t){const n=(new Date).getTime()/1e3|0,i=Math.floor(9007199254740990*Math.random()),r=t&&t.index||0;return e.replace("$(AD_POSN)",encodeURIComponent("pp=m,pi="+r)).replace("{REQUEST_ID}",i).replace("[timestamp]",n).replace("[CACHEBUSTER]",n).replace("[RANDOM_NUMBER]",i)},s=function(e,t,n){const i=function(e,t){const n=t+1,i=Math.floor(e.width/n),r=Math.floor(e.height/n),o=Math.max(0,e.left),a=e.top,s=[];for(let e=1;e<n;e++){const t=o+i*e;for(let e=1;e<n;e++){const n=a+r*e;s[s.length]=[t,n]}}return s}(t,10);let r=0;for(let t=0,n=i.length;t<n;t++){const n=i[t][0],o=i[t][1];c(e,n,o)||r++}const o=100*n;return!(100-r/i.length*100>=o)},c=(e,t,n)=>{if(!!e.shadowRoot){const i=e.shadowRoot.elementFromPoint(t,n);return e.shadowRoot.contains(i)||e.contains(i)}const i=document.elementFromPoint(t,n);return!(!i||"MSFT-FEED-LAYOUT"!==i.tagName.toUpperCase()&&"VIEWS-NATIVE-AD"!==i.tagName.toUpperCase()&&"EDGE-CHROMIUM-PAGE"!==i.tagName.toUpperCase())},d=function(e,t){const n=function(){const e=document,t=window,n=e.body,i=e.documentElement;return{height:t.innerHeight||i.clientHeight||n&&n.clientHeight,width:t.innerWidth||i.clientWidth||n&&n.clientWidth}}(),i=e.getBoundingClientRect(),r=Math.max(0,Math.min(i.bottom,n.height)-Math.max(i.top,0)),o=Math.max(0,Math.min(i.right,n.width)-Math.max(i.left,0)),a=r/(i.height||e.offsetHeight)||0,c=o/(i.width||e.offsetWidth)||0;return!window.disableObstructionDetection&&window.addEventListener&&s(e,i,t)?0:Math.max(0,a+c-1)},l=function(e,t,n){return window.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},u=function(){const i=e.positions.length;for(let r=0;r<i;r++){const i=e.positions[r];if(!e.paused&&i){const a=i.uid,s=i.node;if(!s)continue;if(e.elements[a]||(e.elements[a]=s,e.clickBeacons[a]&&l(s,"click",(function(){o(a)}))),d(s,i.threshold)<i.threshold)i.history=null;else{i.history||(i.history=Date.now(),n&&console.log("%c[ Gemini: Started - "+i.history+" ]",t));const o=(Date.now()-i.history)/1e3;if(n&&console.log("%c[ Gemini: Tracking - "+o+" ]",t),o>=i.duration&&(n&&console.log("%c[ Gemini: Tracking - "+o+" ]",t),i.timer&&(clearInterval(i.timer),i.timer=null),i.observer&&i.observer.unobserve(s),e.viewedBeaconHistory.has(i.uid)||(e.viewedBeaconHistory.add(i.uid),i.callback(i)),i.history=Date.now(),e.positions.splice(r,1),r-=1,!e.positions.length)){n&&console.log("%c[ Gemini: Finished - "+i.history+" ]","background: #eb2e2e; border-radius: 2px; color: #fff; padding: 4px;"),e.timer&&(clearInterval(e.timer),e.timer=null);break}}}}},p=function(e){const t=e.node;if(!e.observer){const n=new IntersectionObserver((function(t){return function(t){const n=t[t.length-1];n.isIntersecting?n.isIntersecting&&!e.timer&&(e.timer=setInterval(u,150)):(clearInterval(e.timer),e.timer=null,e.history=null)}(t)}),{threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});n.observe(t),e.observer=n}},h=function(t,o,s,c,d,l){const u=s.a,h=s.c,g=s.d,m=s.p,f=s.t,v=e.beacons,y=e.positions,S=m/100;v[t]||(v[t]={});v[t][o]={urls:c,threshold:S,duration:g,type:f,consecutive:h,audio:u};const C={uid:t,threshold:S,duration:g,consecutive:h,audio:u,callback:function(){const e=v[t][o],s=e.urls,c=s.length,d=r.beaconCallback;for(let r=0;r<c;r++){const c=s[r];i(a(c,l)),"function"==typeof d&&d(v[t][o],t,o,c),n&&console.log("%c[ Gemini: $$$$ ]\n"+JSON.stringify({url:c,rule:o,threshold:e.threshold,duration:e.duration,consecutive:e.consecutive},null,2),"background: #5c71d9; border-radius: 2px; color: #fff; padding: 4px;")}},node:d,history:null};y.push(C),e.supportsIO&&p(C)},g=function(t,n,i){const r=n.rules,o=r.viewabilityDefStatic,a=r.viewabilityDefStatic3P,s=n.tag,c=s.clickTrackingUrl,d=s.imprTrackingUrl,l=s.imprTrackingUrls,u=n.actionUrls,p=n.beacon;if(u&&u.PARTIAL_VIEW){const e=u.PARTIAL_VIEW;h(t,"viewabilityDefStaticPartial",{p:.01,d:0,t:21},e,i,n)}if(o||p||u&&u.IMPR_INTERNAL){const e="viewabilityDefStatic",r=o||{c:1,d:1,p:50};let a=[];p&&p.length&&a.push(p),u&&u.IMPR_INTERNAL&&(a=a.concat(u.IMPR_INTERNAL)),l&&l.length?a=a.concat(l):d&&(d instanceof Array?a=a.concat(d):a.push(d)),h(t,e,r,a,i,n)}if(a&&u&&u.STATIC_VIEW_3P){const e=a.length;for(let r=0;r<e;r++){const e=u.STATIC_VIEW_3P.slice(),o=a[r],s="viewabilityDefStatic3P:"+r,c=a[r].t;for(let t=0,n=e.length;t<n;t++)e[t]=(g=e[t],m=c,g.replace("$(S_VIEW_TYPE)",m));h(t,s,o,e,i,n)}}var g,m;let f=[];u&&u.CLICK_INTERNAL&&(f=f.concat(u.CLICK_INTERNAL)),c&&c.length&&(f=f.concat(c)),e.clickBeacons[t]=f},m=function(e,t){const n=e.ads,i=e.section.id,r=n.length;for(let e=0;e<r;e++){const r=n[e],o=r.customId||"gemini-"+i+"-"+(r.creativeId||r.demandSourceCreativeId||r.dynamicProductAdId||0)+"-"+r.index,a=t;r.tag="string"==typeof r.tag?JSON.parse(r.tag):r.tag,r.beacon=r.beacon.replace("$(AD_POSN)",encodeURIComponent("pp=m,pi="+r.index)),g(o,r,a)}},f=function(t,i){const r=t instanceof Array;if(!t||r&&!t.length||t&&"object"!=typeof t)return;t&&!r&&(t=[t]);const o=t.length;for(let e=0;e<o;e++){const n=t[e],r=n.sectionads;if(r)for(let e=0;e<r.length;e++)m(r[e],i);else m(n,i)}return"IntersectionObserver"in window||e.timer||(n&&console.log("%c[ Gemini: Start Watching ]","background: #55ae3f; border-radius: 2px; color: #fff; padding: 4px;"),e.timer=setInterval(u,150)),this};return window.Gemini=f,"hidden"in document&&document.addEventListener("visibilitychange",(function(){return e.paused=document.hidden})),f.version="2.0",f}():null;var o=n(76733),a=n(88826),s=n(7476),c=n(61633),d=n(45069),l=n(50462),u=n(31558),p=n(78672),h=n(23549),g=n(70280);class m{constructor(e){this.config=e,this.visiJsonTrackingData=new Map,this.userActionLog=new d.Km,this.beaconsProcessed=new Map,this.currentVideoDom=new Map,this.onObserve=(e,t)=>(n,i)=>{n&&n.forEach((n=>{o.k.logCallback((()=>"IntersectionRatio: "+n.intersectionRatio.toString())),n.intersectionRatio>=.5?this.timerId=window.setTimeout(((n,i)=>{this.fireVisibilityBeacon(n,i),this.userActionLog.fireImpressionLog(e,t,i)}),1e3,i,n.target):this.timerId&&clearTimeout(this.timerId)}))}}async sendBeaconForAdServed(e){const{beaconsJson:t,beaconsSupportHttpPOST:n}=e;this.fireAdServedTrackingCall(t,n)}async fireAdServedTrackingCall(e,t){if(e&&e.length>0)try{const i=JSON.parse(e),r=i&&i.trb;if(r)for(let e=0;e<r.length;e++){var n;const o=r[e];null!==(n=window.servedBeaconUrls)&&void 0!==n&&n.includes(o)||(this.beaconsProcessed&&this.beaconsProcessed.has(o)&&this.beaconsProcessed.get(o)===c.hE.BeaconTypeAdServed||m.allServeBeaconsFiredOnPage&&m.allServeBeaconsFiredOnPage.has(o)||(this.config&&this.config.useNavigatorSendBeacon&&t?this.firePostTrackingBeacon(r[e],c.hE.BeaconTypeAdServed,i.e):this.fireTrackingBeacon(r[e],c.hE.BeaconTypeAdServed,i.e)))}}catch(t){h.M0.sendAppErrorEvent((0,a.Tr)(s.Cy3,"Fail to fire ad served call",`Fail to parse beacon json tracking data: ${e}`))}}fireClickTrackingCall(e,t){if(e&&e.length>0)try{const n=JSON.parse(e),i=JSON.parse(t),r=n&&n.tcb,o=i&&i.e;if(r)for(let e=0;e<r.length;e++)this.fireTrackingBeacon(r[e],c.hE.BeaconTypeClick,o)}catch(t){h.M0.sendAppErrorEvent((0,a.Tr)(s.Cy3,"Fail to fire ad clicked call",`Fail to parse beacon click json: ${e}`))}}fireUserActionBeacon(e){this.fireTrackingBeacon(e,c.hE.UserActionEvent,!1)}visibilityObserver(e,t,n){const i=document.querySelector(e.replace(/\s/g,".")),r=e.slice(1,e.length);i&&this.elementVisibilityObserver(i,t,void 0,r,n)}visibilityCarouselObserver(e,t){e&&t&&this.elementVisibilityObserver(e,t)}elementVisibilityObserver(e,t,n,i,r,o,c,d){if(this.visiJsonTrackingData.set(e,t),n)try{!function(e,t){window.Gemini&&window.Gemini(e,t)}(JSON.parse(n),e)}catch(e){h.M0.sendAppErrorEvent((0,a.Tr)(s.Cy3,"Fail to invoke gemini caller",`Fail to parse beacon gemini json: ${n}`))}const l={root:null,rootMargin:"0px",threshold:.5};let u;return this.onObserve=this.onObserve.bind(this),this.fireVisibilityBeacon=this.fireVisibilityBeacon.bind(this),this.loadPolyfills().then((()=>{u=new IntersectionObserver(this.onObserve(c,d),l),u.observe(e),r&&r.length>0&&(this.trackBingViewability=this.trackBingViewability.bind(this),this.trackBingViewability(e,i,r,!0,this.beaconsProcessed,o,t))})),()=>{var e;return null===(e=u)||void 0===e?void 0:e.disconnect()}}checkVideoElementChanged(e,t,n){const i=e&&e.querySelector("native-ad-video-player")&&e.querySelector("native-ad-video-player").shadowRoot,r=i&&i.querySelector("content-video-player")&&i.querySelector("content-video-player").shadowRoot?i.querySelector("content-video-player").shadowRoot.querySelector("video"):null,o=n?n.get(e):null;n&&r!=o&&(t.element=r,t.videoParenentElement=i&&i.host&&i.host.parentElement,window&&window.MSANTracker&&window.MSANTracker.TrackElements&&(window.MSANTracker.PlayUtils.untrackElement(o),window.MSANTracker.TrackElements([t],window)),n.set(e,r))}trackBingViewability(e,t,n,i,r,o,a){const s=(this.config&&this.config.VideoAd&&this.config.VideoAd.view&&this.config.VideoAd.view.triggerType)??"play",d=(this.config&&this.config.VideoAd&&this.config.VideoAd.view&&this.config.VideoAd.view.durationMs)??2e3,l=!!o,u=t?t.concat(" video"):"";let p=e,h=null;i&&l&&(null==this.currentVideoDom&&(this.currentVideoDom=new Map),p=e&&e.querySelector("native-ad-video-player")&&e.querySelector("native-ad-video-player").shadowRoot,h=p&&p.querySelector("content-video-player")&&p.querySelector("content-video-player").shadowRoot&&p.querySelector("content-video-player").shadowRoot.querySelector("video"),this.currentVideoDom.set(e,h));let g=[];const m=[];let f=[],v=[];if(n&&n.length>0)for(let e=0;e<n.length;e++){const t=n[e];r&&r.has(t)&&r.get(t)===c.hE.BeaconTypeVisibility||(l?f.push({type:"videoView",triggerType:s,url:t,percentage:50,duration:d}):m.push({type:"view",triggerType:"view",url:t,percentage:50,duration:1e3}),null!=r&&i&&r.set(t,c.hE.BeaconTypeVisibility),v.push({beaconUrl:t,type:c.hE.BeaconTypeVisibility}))}if(l){const{bingBeacons:n,servedBeacons:s,videoTrackedUrls:c}=this.getBeaconsForVideo(o,r,i,a);f=f.concat(n),v=v.concat(c),g=[{impid:t,element:i?e:null,beacons:s},{impid:i?t:u,element:i?h:null,videoParenentElement:i?p&&p.host&&p.host.parentElement:null,beacons:f}]}else g=[{impid:t,element:i?e:null,beacons:m}];if(window&&window.MSANTracker&&window.MSANTracker.TrackElements&&window.MSANTracker.TrackElements(g,window),i&&l){const n={impid:t,element:h,videoParenentElement:p&&p.host&&p.host.parentElement,beacons:f};setInterval(this.checkVideoElementChanged,100,e,n,this.currentVideoDom)}return v}getBeaconsForVideo(e,t,n,r){const o=(this.config&&this.config.VideoAd&&this.config.VideoAd.mobileEnable)??!0,d=(this.config&&this.config.VideoAd&&this.config.VideoAd.impression&&this.config.VideoAd.impression.durationMs)??1e3;let l=[];const u=[],{bingBeacons:p,videoUrls:g}=this.generateVideoBeaconsFromVast(e,t,n);l=l.concat(g);const m=r,f=i.Al&&i.Al.ClientSettings||{},v=f.browser&&"true"===f.browser.ismobile||"phone"===f.deviceFormFactor;if(m&&m.length>0)try{const e=JSON.parse(m);if(e){const i=e.trb;if(i)for(let r=0;r<i.length;r++){const a=i[r];t&&t.has(a)&&t.get(a)===c.hE.BeaconTypeAdServed||(u.push({type:"videoImpression",triggerType:"view",url:e.e?a:decodeURIComponent(a),percentage:50,duration:o&&v?300:d}),null!=t&&n&&t.set(a,c.hE.BeaconTypeAdServed),l.push({beaconUrl:a,type:c.hE.BeaconTypeAdServed}))}}}catch(e){h.M0.sendAppErrorEvent((0,a.Tr)(s.Cy3,"Fail to fire video tracked beacon",`Fail to parse beacon json tracking data: ${m}`))}return{bingBeacons:p,servedBeacons:u,videoTrackedUrls:l}}getMilliseconds(e){const t=e.split(".");let n=0;const i=t[0];t.length>1&&(n+=Number(t[1]));const r=i.split(":");return n+1e3*(3600*Number(r[0])+60*Number(r[1])+Number(r[2]))}generateVideoBeaconsFromVast(e,t,n){const i=[],r=[],o=this.getMilliseconds(e.Duration);if(e.TrackingEvents)for(let a=0;a<e.TrackingEvents.length;a++)if(e.TrackingEvents[a]){const s=e.TrackingEvents[a].value;if(t&&t.has(s)&&t.get(s)===c.hE.BeaconTypeVideoProgress)continue;let d="";switch(e.TrackingEvents[a].event&&(d=e.TrackingEvents[a].event.toLowerCase()),d){case c.hE.StartEvent:i.push({type:"start",triggerType:"play",url:s,percentage:50,duration:0});break;case c.hE.FirstQuartileEvent:i.push({type:"quartile",triggerType:"play",url:s,percentage:50,duration:Math.ceil(o/4)});break;case c.hE.MidPointEvent:i.push({type:"quartile",triggerType:"play",url:s,percentage:50,duration:Math.ceil(o/2)});break;case c.hE.ThirdQuartileEvent:i.push({type:"quartile",triggerType:"play",url:s,percentage:50,duration:Math.ceil(o/4*3)});break;case c.hE.CompleteEvent:i.push({type:"complete",triggerType:"play",url:s,percentage:50,duration:o});break;case c.hE.ProgressEvent:e.TrackingEvents[a].offset&&i.push({type:"progress",triggerType:"play",url:s,percentage:50,duration:this.getMilliseconds(e.TrackingEvents[a].offset)})}null!=t&&n&&t.set(s,c.hE.BeaconTypeVideoProgress),r.push({beaconUrl:s,type:c.hE.BeaconTypeVideoProgress})}return{bingBeacons:i,videoUrls:r}}firePageMonetizedTelemetry(e){if(null==e||!e.getAttribute)return;const t=e.getAttribute(g.qP);try{const n=JSON.parse(t);(null==n?void 0:n.ism)&&h.M0.sendContentViewEvent(e.parentElement,g.NS.Partial)}catch(e){h.M0.sendAppErrorEvent((0,a.Tr)(s.Cy3,"Fail to set isMonetized flag",`Fail to parse telemetryObject json: ${t}`))}}fireVisibilityBeacon(e,t){if(o.k.logCallback((()=>"ad visible for 1 second")),this.firePageMonetizedTelemetry(t),this.visiJsonTrackingData&&this.visiJsonTrackingData.get(t))try{const e=JSON.parse(this.visiJsonTrackingData.get(t)),i=e&&e.tvb;if(i)for(let t=0;t<i.length;t++){var n;const r=i[t];null!==(n=window.viewedBeaconUrls)&&void 0!==n&&n.includes(r)||(this.beaconsProcessed&&this.beaconsProcessed.has(r)&&this.beaconsProcessed.get(r)===c.hE.BeaconTypeVisibility||m.allVisiBeaconsFiredOnPage&&m.allVisiBeaconsFiredOnPage.has(r)||this.fireTrackingBeacon(r,c.hE.BeaconTypeVisibility,e.e))}}catch(e){h.M0.sendAppErrorEvent((0,a.Tr)(s.Cy3,"Fail to fire visibility beacon",`Fail to parse beacon json tracking data: ${this.visiJsonTrackingData.get(t)}`))}e&&e.unobserve(t)}fireRequestLevelBeacons(e){e&&e.forEach((e=>{e&&this.fireRequestLevelBeaconCall(e)}))}fireJSTrackers(e,t=!1){if(e&&e.length>0)try{const n=JSON.parse(e),i=n&&n.tjb;if(!Array.isArray(i))return;for(const e of i)e&&"string"==typeof e&&(this.beaconsProcessed&&this.beaconsProcessed.has(e)&&this.beaconsProcessed.get(e)===c.hE.BeaconTypeJsTracker||(t&&this.isXandrVisibilityTracker(e)?this.fireXandrJSTracker(e):this.fireJSTracker(e)))}catch(t){h.M0.sendAppErrorEvent((0,a.Tr)(s.Cy3,"Fail to fire jstrackers",`Fail to parse beacon json tracking data: ${e}`))}}async fireJSTracker(e){return new Promise(((t,n)=>{if(!(0,u.N)())return;const i=(0,p.b0)(e,void 0,!0,void 0);i.onload=()=>{o.k.logCallback((()=>"Added jsTracker url: "+e)),this.beaconsProcessed.set(e,c.hE.BeaconTypeJsTracker),t()},i.onerror=t=>{h.M0.sendAppErrorEvent({...s.is$,message:"Failed to load partner jsTracker file",pb:{...s.is$.pb,customMessage:`Error occurred while loading ad partner trackerJS file: ${e}`}}),n(t)},document.body.appendChild(i)}))}async fireRequestLevelBeaconCall(e){if(e){o.k.logCallback((()=>"Firing encoded requestlevel beacon: "+e));let t=await new Image(1,1);t.src=e,t=null}}firePostTrackingBeacon(e,t,n){let i=c.hE.BeaconFormatEncoded;n||(e=decodeURIComponent(e),i=c.hE.BeaconFormatDecoded),e&&(o.k.logCallback((()=>"Firing "+i+" "+t+" beacon, beaconUrl: "+e)),navigator.sendBeacon(e),this.beaconsProcessed.set(e,t))}fireTrackingBeacon(e,t,n){let i=c.hE.BeaconFormatEncoded;n||(e=decodeURIComponent(e),i=c.hE.BeaconFormatDecoded),e&&(o.k.logCallback((()=>"Firing "+i+" "+t+" beacon, beaconUrl: "+e)),this.fireBeaconCall(e,t))}fireBeaconCall(e,t){try{let t=new Image(1,1);t.src=e,t=null}catch(t){h.M0.sendAppErrorEvent((0,a.Tr)(s.AIp,"Invalid beacon URL",`Fail to parse beacon json tracking data: ${e}`))}finally{this.beaconsProcessed.set(e,t),t===c.hE.BeaconTypeVisibility&&m.allVisiBeaconsFiredOnPage.add(e),t===c.hE.BeaconTypeAdServed&&m.allServeBeaconsFiredOnPage.add(e)}}supportsIntersectionObserver(){return"IntersectionObserver"in n.g&&"IntersectionObserverEntry"in n.g&&"intersectionRatio"in IntersectionObserverEntry.prototype}loadPolyfills(){const e=[];return this.supportsIntersectionObserver()||e.push(n.e("node_modules_intersection-observer_intersection-observer_js").then(n.t.bind(n,76583,23))),Promise.all(e)}isXandrVisibilityTracker(e){return e.includes("trk.js")}fireXandrJSTracker(e){document.addEventListener(l.gL,(t=>{const n=this.extractAdIdFromXandrTrackerUrl(e);t.detail.adUniqueIds.includes(n)&&this.fireJSTracker(this.replaceXandrVisibilityTrackerParam(n,e))}))}replaceXandrVisibilityTrackerParam(e,t){const n=`dom_id=${e};`,i=`dom_elt_var=${e};`;return t.replace(n,i)}extractAdIdFromXandrTrackerUrl(e){var t;const n=null===(t=e.match(/dom_id=([a-zA-Z0-9_-]+);/))||void 0===t?void 0:t[1];return n||(0,a.H)(s.C$l,"Xandr visibility tracker URL doesn't have ad id","dom_id parameter is empty",{trackerUrl:e}),n}get intersectionObserver(){return this.loadPolyfills()}}m.allVisiBeaconsFiredOnPage=new Set,m.allServeBeaconsFiredOnPage=new Set},31643:function(e,t,n){"use strict";n.d(t,{UF:function(){return d}});var i=n(43438),r=n(68054),o=n(31558);let a,s=!1;const c=new Promise((e=>{a=e}));async function d(){switch(await async function(){s||(i.A.subscribe(i.U.CookieConsentStatus,(e=>{e!==r._.Unknown&&a()})),s=!0);const e=i.A.get(i.U.CookieConsentStatus);return e!==r._.Unknown?e:((0,o.N)()&&await c,i.A.get(i.U.CookieConsentStatus))}()){case r._.Required:return!0;case r._.NotRequired:return!1;default:return}}},37213:function(e,t,n){"use strict";n.d(t,{N:function(){return o}});var i=n(61633),r=n(95815);class o{updateMsaOptOutCookie(e){if(!this.getMsaOptoutCookieData()&&e&&e.optout){const t=!0===e.optout.msaOptOut?"1":"0";this.setMsaOptoutCookie(t)}}getMsaOptoutCookieData(){const e=(0,r.ej)(i.yV.MSAOptOut);return e&&e.length>0?e:null}setMsaOptoutCookie(e){e&&e.length>0&&(0,r.sq)(i.yV.MSAOptOut,e,1,null,"/")}getBrowserOptoutStatus(){const e=(0,r.ej)(i.yV.BrowserOptOut);return!(!e||"1"!==e)}setUserOptOutSettings(){const e=this.getBrowserOptoutStatus(),t=this.getMsaOptoutCookieData(),n=!(!t||"1"!==t),r=(e||n).toString().toLowerCase();let o="";e&&(o="b|"),n&&(o+="m");const a=i.Lr.UserOptOut+":"+r+";"+i.Lr.UserOptOutOptions+":"+o;if(document.head.attributes["data-info"]){const e=document.head.attributes["data-info"].value.split(";");e.find((e=>e.indexOf(i.Lr.UserOptOut)>-1))?e.find((e=>e.indexOf(i.Lr.UserOptOut)>-1))!==i.Lr.UserOptOut+":"+r&&(document.head.attributes["data-info"].value=document.head.attributes["data-info"].value.replace(i.Lr.UserOptOut+":false",i.Lr.UserOptOut+":"+r).replace(i.Lr.UserOptOut+":true",i.Lr.UserOptOut+":"+r)):document.head.attributes["data-info"].value=document.head.attributes["data-info"].value+";"+i.Lr.UserOptOut+":"+r,e.find((e=>e.indexOf(i.Lr.UserOptOutOptions)>-1))?e.find((e=>e.indexOf(i.Lr.UserOptOutOptions)>-1))!==i.Lr.UserOptOutOptions+":"+o&&(e.includes(i.Lr.UserOptOutOptions+":")?document.head.attributes["data-info"].value=document.head.attributes["data-info"].value.replace(i.Lr.UserOptOutOptions+":",i.Lr.UserOptOutOptions+":"+o):e.includes(i.Lr.UserOptOutOptions+":b|")?document.head.attributes["data-info"].value=document.head.attributes["data-info"].value.replace(i.Lr.UserOptOutOptions+":b|",i.Lr.UserOptOutOptions+":"+o):e.includes(i.Lr.UserOptOutOptions+":b|m")?document.head.attributes["data-info"].value=document.head.attributes["data-info"].value.replace(i.Lr.UserOptOutOptions+":b|m",i.Lr.UserOptOutOptions+":"+o):e.includes(i.Lr.UserOptOutOptions+":m")&&(document.head.attributes["data-info"].value=document.head.attributes["data-info"].value.replace(i.Lr.UserOptOutOptions+":m",i.Lr.UserOptOutOptions+":"+o))):document.head.attributes["data-info"].value=document.head.attributes["data-info"].value+";"+i.Lr.UserOptOutOptions+":"+o}else document.head.setAttribute("data-info",a)}}},15755:function(e,t,n){"use strict";n.d(t,{F:function(){return d}});var i=n(88826),r=n(7476),o=n(31558),a=n(69425),s=n(23549);const c={};function d(e,t,n){if(!(0,o.N)()||!e||!t)return;const d=s.M0.getRequestId();if(c[d]&&c[d].has(t))return;c[d]||(c[d]=new Set),c[d].add(t);const l=(0,a.Et)(n,"attachIasScript")(((e,t,n)=>{const o=e.split(";"),a=o[0]&&o[0].split(":")[1],c=o[1]&&o[1].split(":")[1];if(a&&c){if(globalThis.isSingleIASInstance=!0,globalThis.__IntegralASAdPush)return void u(t,a,c);const e=document.createElement("script");e.async=!0,e.src="https://assets.msn.com/staticsb/statics/latest/js/thirdparty/ias/fw.js",e.onload=()=>{u(t,a,c,n)},e.onerror=e=>{s.M0.sendAppErrorEvent((0,i.Tr)(r.Sp0,"Failed to download IAS FW JS"))},document.head.appendChild(e)}})),u=(0,a.Et)(n,"IASAdPush")(((e,t,n)=>{const i="%23"+e;globalThis.__IntegralASAdPush([{adSelector:i,iasParameters:JSON.stringify({host:"",config:"/rjss/st/"+t+"/"+n+"/skeleton.js?iasProxyPartnerId=2&ias_adpath="+i,contentType:"application/json"})}]),s.M0.addOrUpdateTmplProperty("marqueeAdContainer"===e?"MarqueeIASTriggered":`NativeIASTriggered_${i}`,"1")}));l(e,t,null==n?void 0:n.id)}},95433:function(e,t,n){"use strict";n.d(t,{c:function(){return Fe},d:function(){return Oe}});var i,r=n(33940),o=n(61633),a=n(19233),s=n(23019),c=n(88826),d=n(7476),l=n(21930),u=n(20009),p=n(10754),h=n(26671),g=n(4935),m=n(90351),f=n(25156),v=n(76623),y=n(36926),S=n(46058),C=n(92100),w=n(10671),b=n(21789),T=n(32614);!function(e){e.SlideshowPreview="ss",e.ArticlePreview="ar",e.VideoPreview="vi"}(i||(i={}));var k=n(44672),P=n(23549);class I{constructor(){this.cmsProviderCache=new Map}async getCMSList(e,t){if(e)try{const n={method:"GET",headers:{}},i=await(0,k.w)((async()=>{const t=new URL(`${o.ZG.CMSListServiceUrl}${e}${this.getContentServiceUrlBase().search}`,`${this.getContentServiceUrlBase()}`),i=await fetch(t.toString(),n);if(i.ok)return i.json();P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Invalid response from CMS, ${i.statusText}, listId: ${e}`))}),"getCMSList");if(!i)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Invalid response.json(), listId: ${e}`));const r=i;return this.translateToCMSItem(r,e,t,o.Lr.PrivacyUrl)}catch(t){return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Error while fetching CMS Native Ad ${t}, id: ${e}`))}else P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`No backfill id found, listId: ${e}`))}async translateToCMSItem(e,t,n,i){if(!e||!e.list||0===e.list.length)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`No CMS Response returned from ${t}`));const r=[];for(const t of e.list){let e=!1;const a=t.extendedProperties;if(a)for(const t of a)if(t.key&&t.key.indexOf("is_content")>-1&&t.values&&t.values.indexOf("true")>-1){e=!0;break}let s;if(null!=t.link&&null!=t.link.title&&t.link.href&&null!=t.link.image&&null!=t.link.image.href){const n=this.getCMSContentId(t.link.image.href);let r,a;if(t.link.ad)if(t.link.ad.providerHref&&t.link.ad.providerHref.href){const e=this.getCMSContentId(t.link.ad.providerHref.href);e?r=await this.fetchProviderName(e):t.link.ad.sponsorText&&(r=t.link.ad.sponsorText)}else t.link.ad.sponsorText&&(r=t.link.ad.sponsorText);a=r||(null!=t.link.kicker?t.link.kicker:o.ZG.DefaultProviderName),s={title:t.link.title,url:t.link.href,provider:{name:a},imageUrl:n?(0,T.zz)(n,{width:624,height:350,enableDpiScaling:!1}):t.link.image.href,isContent:e,privacyUrl:i}}else if(null!=t.reference&&null!=t.reference.href){const r=this.getCMSContentId(t.reference.href);if(null!=r){const t=await this.getCMSContent(r);if(!t)continue;s={title:t.title,url:this.constructDestinationUrl(t,n),provider:this.constructProvider(t),imageUrl:this.constructImageUrl(t),isContent:e,privacyUrl:i}}}s&&s.title&&s.imageUrl&&s.url&&r.push(s)}return{id:e._id,items:r}}async getCMSContent(e){try{const t=new URL(this.getContentServiceUrlBase().search,`${this.getContentServiceUrlBase()}${o.ZG.CMSContentServiceURl}${e}/`),n=await fetch(t.toString());if(!n||!n.ok)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Failed to fetch CMS content, cmsId: ${e}`));const i=await n.json();return i||void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Invalid JSON response to get CMS content, cmsId: ${e}`))}catch(t){return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Error while fetching CMS content ${t}, cmsId: ${e}`))}}constructDestinationUrl(e,t){const{category:n}=e,r=n&&n.product||"news",o=n&&n.label||"other",a=i[e.type]||"xx";return`https://www.msn.com/${t}/${C.c.encodeURIComponentForPrime(r||"")}/${C.c.encodeURIComponentForPrime(o||"")}/${C.c.encodeURIComponentForPrime(e.title||"")}/${a}-${e.id}`}constructProvider(e){const{name:t,logo:n}=e.provider;return{name:t,logo:n&&n.id?{src:`${w.E.prod}${n.id}?w=16&h=16`,alt:t}:void 0}}constructImageUrl(e){if(e.images&&!(e.images.length<1)&&e.images[0].id)return(0,T.zz)(e.images[0].id,{width:624,height:350,focalRegion:e.images[0].focalRegion,enableDpiScaling:!1})}getCMSContentId(e){return e&&e.indexOf("cms/api/amp")>-1?e.substring(e.lastIndexOf("/")+1):null}async fetchProviderName(e){try{if(this.cmsProviderCache.get(e))return this.cmsProviderCache.get(e);const t={method:"GET",headers:{}},n=await(0,k.w)((async()=>{const n=new URL(`${o.ZG.CMSListServiceUrl}${e}${this.getContentServiceUrlBase().search}`,`${this.getContentServiceUrlBase()}`),i=await fetch(n.toString(),t);if(i.ok)return i.json();P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Invalid response from CMS. status: ${i.status}, statusText: ${i.statusText}, url: ${i.url}`))}),"getProviderName");if(!n)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Invalid response.json(), cmsId: ${e}`));const i=n;return i?(this.cmsProviderCache.set(e,i.displayName),i.displayName):void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Failed to parse JSON response, cmsId: ${e}`))}catch(t){return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Cfk,"Get CMSAd content failed",`Error while fetching Provider name ${t}, cmsId: ${e}`))}}getContentServiceUrlBase(){let e=b.jG.ContentServiceUrlBase;return e&&!e.toString().includes("localhost")||(e=new URL(o.Lr.DefaultContentServiceBaseUrl)),e}}var A,E=n(89315),x=n(13334),M=n(23357),L=n(95815);!function(e){e.AR="AR",e.GA="GA",e.VI="VI",e.EDGECHRNTP="edgechrntp",e.EDGECHRDHP="edgechrdhp",e.MSNEWS="msnews",e.FirstParty="firstparty",e.SAA="saa",e.SAI="sai",e.VerticalLandingPage="vlp",e.WINVLP="winvlp",e.WINAR="winar",e.WINGA="winga",e.WINVI="winvi",e.WEBCOMPAR="webcompar",e.WEBCOMPGA="webcompga",e.WEBCOMPVI="webcompvi",e.WATCH="watch",e.WINWEB="Winweb",e.SKYPEAR="skypear",e.SKYPEGA="skypega",e.SKYPEVI="skypevi",e.SKYPEWATCH="skypewatch",e.OUTLOOKAR="outlookar",e.OUTLOOKGA="outlookga",e.OUTLOOKVI="outlookvi",e.OUTLOOKWATCH="outlookwatch"}(A||(A={}));var D,R,F,O,B,N,$=n(85205);!function(e){e[e.Sponsored=1]="Sponsored",e[e.Description=2]="Description",e[e.Rating=3]="Rating",e[e.Likes=4]="Likes",e[e.Downloads=5]="Downloads",e[e.Price=6]="Price",e[e.Saleprice=7]="Saleprice",e[e.Phone=8]="Phone",e[e.Address=9]="Address",e[e.Description2=10]="Description2",e[e.DisplayUrl=11]="DisplayUrl",e[e.CTAText=12]="CTAText",e[e.InstallmentPrice=500]="InstallmentPrice",e[e.PriceDrop=501]="PriceDrop",e[e.FreeShipping=502]="FreeShipping",e[e.TopViewed=503]="TopViewed",e[e.Sold=504]="Sold",e[e.SpecialOffer=505]="SpecialOffer",e[e.EliteBadge=506]="EliteBadge",e[e.Condition=507]="Condition",e[e.LIA=508]="LIA",e[e.CurbsidePickup=509]="CurbsidePickup",e[e.Review=510]="Review",e[e.ShortTitle=511]="ShortTitle",e[e.ReturnPolicy=512]="ReturnPolicy",e[e.DisclaimerText=513]="DisclaimerText",e[e.AdSelectionReason=514]="AdSelectionReason",e[e.Discount=600]="Discount"}(D||(D={})),function(e){e[e.Mobile=1]="Mobile",e[e.PC=2]="PC"}(R||(R={})),function(e){e[e.Large=3]="Large",e[e.MultipleImages=600]="MultipleImages"}(F||(F={})),function(e){e[e.TrackingAllowed=0]="TrackingAllowed",e[e.NoTrackingAllowed=1]="NoTrackingAllowed"}(O||(O={})),function(e){e[e.Impression=1]="Impression",e[e.Viewed=2]="Viewed"}(B||(B={})),function(e){e[e.Image=1]="Image",e[e.JavaScript=2]="JavaScript"}(N||(N={}));var U=n(31643),_=n(37213),H=n(96531),W=n(81949),q=n(78324),V=n(36560),G=n(54297);const z=async(e,t,n,i,r,o,s,l)=>{if(r){var u;const e=r.serverTiming&&(null===(u=r.serverTiming[0])||void 0===u?void 0:u.duration);if(e&&s(a.qG.AdServerLatency,e),i>-1){const e=(0,y.v0)(t&&!n,r.requestStart),c=e-i;s(a.qG.RequestSent,c>0?c:0),o||l(n?a.qG.TimeToRequestAdBackground:a.qG.TimeToRequestAd,0,e)}s(a.qG.TimeToAdResponse,(0,y.v0)(t&&!n,r.responseEnd)),r.isApproximate||l(a.qG.AdFetched,r.fetchStart,r.responseEnd),s(a.qG.ApiDuration,null==r?void 0:r.duration)}else(0,c.H)(d.iVH,"Unable to find performance entry for RTB request")};function j(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}var K=n(31558),Q=n(10141),Z=n(21882),J=n(8780);var X,Y=n(55524),ee=n(291),te=n(56687),ne=n(72626);!function(e){e.AdReturned="adAvailable",e.AdNotReturned="AdNotReturned"}(X||(X={}));class ie{constructor(){this.groupedAdRequests={},this.adRequestsInfoById={},this.initialized=!1,this.handleAdNotReturned=e=>{const t=e.targetId;if(!t||!this.adRequestsInfoById[t])return;const{_groupKey:n,_cancelled:i}=this.adRequestsInfoById[t];i||(this.adRequestsInfoById[t]={...this.adRequestsInfoById[t],_fetched:!0},this.updateGroupInfoOnAdUpdate(n))},this.handleAdReturned=e=>{const t=e.targetId;if(!t||!this.adRequestsInfoById[t])return;const{_groupKey:n,_onAvailable:i,_cancelled:r}=this.adRequestsInfoById[t];if(r)return;const o=i&&i(this.adRequestsInfoById[t].initialData,e);this.adRequestsInfoById[t]={...this.adRequestsInfoById[t],_fetched:!0,fetchedData:o},this.sdkWrapper.fireServeBeacon(e),this.updateGroupInfoOnAdUpdate(n)}}initialize(e){this.initialized||(this.sdkWrapper=e,this.sdkWrapper.addEventListener(X.AdReturned,this.handleAdReturned),this.sdkWrapper.addEventListener(X.AdNotReturned,this.handleAdNotReturned),this.initialized=!0)}tryRegisterPlacements(e,t,n){const i=this.findValidPlacements(e);if(0===i.length)return!1;const r=[];let o=0;i.forEach((e=>{const{targetId:t}=e||{};o+=1,r.push(t)}));const a=j();return this.groupedAdRequests[a]={targetIds:r,pendingCount:o,onCompleteAll:t},i.forEach((e=>{const{targetId:t}=e;this.adRequestsInfoById[t]={initialData:{...e},_groupKey:a,_onAvailable:n}})),!0}unregisterPlacements(e){const t=this.findValidPlacements(e);if(0===t.length)return null;let n;return t.forEach((e=>{const{targetId:t}=e;this.sdkWrapper&&this.sdkWrapper.removeAllEventListeners(t),this.adRequestsInfoById[t]._cancelled=!0,n||(n=this.adRequestsInfoById[e.targetId]._groupKey)})),this.collectGroupResults(n)}findValidPlacements(e){return e&&0!==e.length?e.filter((e=>this.validatePlacement(e))):[]}validatePlacement(e){const{targetId:t}=e||{};return!!t||(P.M0.sendAppErrorEvent({...d.Mc7,message:"Missing targetId in placement info"}),!1)}collectGroupResults(e){if(!e)return null;const t=this.groupedAdRequests[e];if(!t||!t.targetIds||0==t.targetIds.length)return null;const n=[];return t.targetIds.forEach((e=>{const t=this.adRequestsInfoById[e];if(t&&t._fetched){const e={...t.initialData||{},...t.fetchedData||{}};n.push(e)}})),0===n.length&&P.M0.sendAppErrorEvent((0,c.Tr)(d.XWd,"No placements returned from Xandr SDK per request")),{data:n}}updateGroupInfoOnAdUpdate(e){const t=this.groupedAdRequests[e];t.pendingCount-=1,0===t.pendingCount&&t.onCompleteAll(this.collectGroupResults(e))}}var re=n(78672);var oe;!function(e){e.AdRequested="adRequested",e.AdReturned="adAvailable",e.AdRefreshed="adLoaded",e.AdError="adError",e.AdRequestFailure="adRequestFailure",e.AdCollapse="adCollapse",e.AdNoBid="adNoBid"}(oe||(oe={}));var ae=n(54820);const se=new class{constructor(){this.fetchCalled=!1,this.baseUrl="https://api.msn.com/segments/recoitems/LiveRampObjectStoreCaller",this.oneServiceOcid="peregrine",this.noEnvelopeIdConst="_"}fetchAndOutputEnvelopeId(){if(this.fetchCalled)return;this.fetchCalled=!0;if(!(0,L.ej)(o.yV.LiverampEnvelopeId)&&this.isCookieSetAllowed()){const e=this.fetchEnvelopeIdFromObjectStore();this.liverampCookieSetPromise=this.setCookie(o.yV.LiverampEnvelopeId,e)}}getEnvelopeIdFromCookie(){const e=(0,L.ej)(o.yV.LiverampEnvelopeId);return e===this.noEnvelopeIdConst?null:e}async finishLiverampCookieSet(){this.liverampCookieSetPromise&&await this.liverampCookieSetPromise}async fetchEnvelopeIdFromObjectStore(){const e={method:"GET",headers:await ae.$D.getOneServiceHeaders(),credentials:"include"},t=this.getServiceUrl();let n;try{n=await(0,k.w)((async()=>{const n=await fetch(t.href,e);if(200!=n.status)return 404==n.status||P.M0.sendAppErrorEvent({...d.t7r,message:`Unexpected response from OneService call. Status: ${n.status}`}),null;try{const e=await n.text();let t=JSON.parse(e)[0].data;return'"'===t.charAt(0)&&'"'===t.charAt(t.length-1)&&(t=t.substr(1,t.length-2)),t}catch{return P.M0.sendAppErrorEvent({...d.t7r,message:"OneService response is not in expected format."}),null}}),"liverampObjectStoreCall")}catch(e){return P.M0.sendAppErrorEvent({...d.t7r,message:`Error sending OneService request. Error: ${e}`}),null}return n}async setCookie(e,t){let n=await t;n||(n=this.noEnvelopeIdConst);(0,L.sq)(e,n,1,".msn.com","/",!0)||P.M0.sendAppErrorEvent({...d.lxu,message:"Unable to set LiverampEnvelopeId Cookie."})}getServiceUrl(){const e=new URL(this.baseUrl);return[...ae.$D.getCommonParams2(this.oneServiceOcid,!0)].forEach((t=>{t.value&&e.searchParams.set(t.key,t.value)})),e.searchParams.set("ocid",this.oneServiceOcid),e}isCookieSetAllowed(){try{return(0,L.sq)(o.yV.LiverampEnvelopeId,this.noEnvelopeIdConst,1,".msn.com","/",!0)}catch(e){return!1}}};class ce{constructor(){this.sdkUrl="https://acdn.adnxs.com/ast/ast.js",this.sdkPending=!1,this.apnMemberId=this.getApnMemberId()}static getInstance(){return Y.Gq.get("__XandrAdSdkWrapper__",(()=>new ce))}async loadSdkAsync(){return new Promise(((e,t)=>{if(!(0,K.N)())return P.M0.sendAppErrorEvent({...d.FER,message:"unexpected call to loadSdkAsync on server side"}),void t(new Error("unexpected call to loadSdkAsync on server side"));if(globalThis.apntag)return e();if(this.sdkPending)return void window.addEventListener("xandrAdSdkLoadedCustomEvent",(function(){e()}));const n=(0,re.b0)(this.sdkUrl);this.sdkPending=!0,n.onload=()=>{const t=new CustomEvent("xandrAdSdkLoadedCustomEvent");window.dispatchEvent(t),e()},n.onerror=e=>{this.sdkPending=!1,P.M0.sendAppErrorEvent({...d.FER,message:JSON.stringify(e)}),t(e)},document.body.appendChild(n)}))}tryBuildPageOptions(e){if(!globalThis.apntag){const e="Xandr SDK is not loaded";return P.M0.sendAppErrorEvent({...d.FER,message:e}),!1}const{prid:t,rid:n,pageType:i,locale:r,verticalName:o,audienceMode:a,ocid:s,flightKeywords:c}=e||{};var l;this.pageType||(this.pageType=i||(null===x.Al||void 0===x.Al||null===(l=x.Al.ClientSettings)||void 0===l?void 0:l.pagetype));if(!this.providerId)if(t)this.providerId=t;else{this.providerId="EMPTYPIDAN";const e="ProviderId is empty for page type: "+this.pageType;P.M0.sendAppErrorEvent({...d.pa7,message:e})}this.externalUid||(this.externalUid=(0,L.jG)());const u=(new Date).getTime()+"|"+(9*Math.random()+1)*Math.pow(10,17);this.pageOptions=this.pageOptions||{member:this.apnMemberId,user:{externalUid:this.externalUid,externalImpId:u,userIds:[{type:"extendedIDs",eids:[{id:this.externalUid,source:"msft_muid"}]}]},keywords:{page_type:this.pageType,rid:n,provider_id:this.providerId,user_locale:r,vertical:o,audience_mode:a,ocid:s,rebroadcast_origin:"MSN",optout:this.getBrowserOptoutStatus(),flight:c?Object.keys(c):[]},trackingManagement:{native:{loadViewabilityScriptAt:"impression"}}};const p=se.getEnvelopeIdFromCookie();return p&&this.pageOptions.user.userIds.push({type:"liveramp",id:p}),(0,re.zw)().startsWith("localhost.")&&(this.pageOptions.test=!0),!0}clearEventHandlers(e){globalThis&&globalThis.apntag&&(globalThis.apntag.offEvent(oe.AdRequested,e),globalThis.apntag.offEvent(oe.AdReturned,e),globalThis.apntag.offEvent(oe.AdRefreshed,e),globalThis.apntag.offEvent(oe.AdError,e),globalThis.apntag.offEvent(oe.AdRequestFailure,e),globalThis.apntag.offEvent(oe.AdCollapse,e),globalThis.apntag.offEvent(oe.AdNoBid,e))}getApnMemberId(){return["en-au","en-nz"].includes(b.jG.CurrentMarket)?1705:280}getBrowserOptoutStatus(){return(0,L.ej)(o.yV.BrowserOptOut)}}const de=(0,ee.h)(ce);var le=n(76733);const ue=(e,t,n,i)=>{if(!t||!n)return;let r=5;t.divid=t.divid||t.divName,t.msnSdkName=i;const o=setInterval((()=>{if(n[e]&&n[e].length){for(let i=0;i<n[e].length;i++)n[e][i](t);clearInterval(o)}else r--||clearInterval(o)}),500)};class pe{constructor(){this.memberId=280,this.events=[]}static getInstance(){return Y.Gq.get("__NativeAdXandrWrapper__",(()=>new pe))}async loadSdkAsync(){return de.loadSdkAsync().then((()=>!0)).catch((()=>!1))}tryConfigPlacements(e,t){return!!de.tryBuildPageOptions(t)&&(this.providerId=de.providerId,this.pageOptions=de.pageOptions,globalThis.apntag.setPageOpts(this.pageOptions),e.forEach((e=>{de.clearEventHandlers(e.targetId);const n=this.buildNativeAdPlacement(e,t);globalThis.apntag.defineTag(n),this.attachEventHandlers(e.targetId)})),!0)}startAdServerCalls(){globalThis&&globalThis.apntag&&globalThis.apntag.loadTags()}fireServeBeacon(e){globalThis&&globalThis.apntag&&globalThis.apntag.fireImpressionTrackers(e)}attachClickBeacon(e,t){globalThis&&globalThis.apntag&&globalThis.apntag.attachClickTrackers(e,t)}addEventListener(e,t){((e,t,n,i=!1)=>{i?n[e]?n[e].push(t):n[e]=[t]:e&&"function"==typeof t&&n&&(le.k.log(`DisplayAd: addEventListener eventName: ${e} callback: ${t} events: ${n}`),n[e]&&n[e][0].toString()!=t.toString()?n[e].push(t):n[e]=[t])})(e,t,this.events)}removeAllEventListeners(e){de.clearEventHandlers(e)}buildNativeAdPlacement(e,t){var n;this.countryCode||(this.countryCode=(null===b.jG||void 0===b.jG||null===(n=b.jG.LocaleContentMarket)||void 0===n?void 0:n.market)||"CO");const i={targetId:e.targetId,member:this.memberId,invCode:e.tagCode,native:{title:{required:!0,max_length:140},image:{required:!0,sizes:[{width:e.img.w,height:e.img.h}]},sponsoredBy:{required:!0},clickUrl:{required:!0},privacySupported:!0},extInvCode:this.countryCode,allowSmallerSizes:!1,nobidIfUnsold:(!1,!0),trafficSourceCode:"tg:"+e.tagCode+";p:"+this.providerId+";r:"+t.rid,keywords:{pos:e.regionIndex}};return i}attachEventHandlers(e){const t=this.events;globalThis.apntag.onEvent(oe.AdRequested,e,(()=>{})),globalThis.apntag.onEvent(oe.AdReturned,e,(e=>{ue(X.AdReturned,e,t,"xandr")})),globalThis.apntag.onEvent(oe.AdError,e,(e=>{this.adNotReturned(e,t)})),globalThis.apntag.onEvent(oe.AdRequestFailure,e,(e=>{this.adNotReturned(e,t)})),globalThis.apntag.onEvent(oe.AdNoBid,e,(e=>{this.adNotReturned(e,t)}))}adNotReturned(e,t){ue(X.AdNotReturned,e,t,"xandr")}}const he=(0,ee.h)(pe);var ge=n(49915);const me="infopane",fe={hp:{[me]:[6,18,29]}},ve=["interstitialgallery","interstitialgallerymsx","galleryonepagecontent"],ye=["river","rivertall","peekriver","sriver"],Se=["river-dbl","riverdb"],Ce=["river-half","river-half-textonly"],we=(e,t)=>{var n,i,r;if(!e||!e.native)return{};const o=e.native,a=12085===e.buyerMemberId?"https://account.microsoft.com/privacy/ad-settings":"https://monetize.xandr.com/privacy-center/captcha?next_page=/privacy-center/delete";const s=((e,t)=>{var n,i;const{rid:r,locale:o,region:a,index:s,relativeIndex:c,pageType:d,tagCode:l}=t||{},{msft:u,auctionId:p}=e,{bidder_id:h,msx_creative_id:g}=u||{},m=null===(n=b.jG.CurrentRequestTargetScope)||void 0===n||null===(i=n.browser)||void 0===i?void 0:i.browserType,f=e.is_prebid_server_bid?e.buyerMemberId:"0";return(0,ge.$A)("https://g.msn.com/neg/0?type=adsfb",{rid:r,r:a,i:null==s?void 0:s.toString(),p:d,l:o,d:null==h?void 0:h.toString(),b:m,a:p,ii:null==c?void 0:c.toString(),c:g,tid:l,m:null==f?void 0:f.toString()})})(e,t);return{imageWidth:null===(n=o.image)||void 0===n?void 0:n.width,imageHeight:null===(i=o.image)||void 0===i?void 0:i.height,items:[{url:o.clickUrl,sourceName:null==o?void 0:o.sponsoredBy,title:o.title,imageUrl:null===(r=o.image)||void 0===r?void 0:r.url,uniqueId:e.targetId,adChoicesUrl:o.privacyLink,clickBeacons:o.clickTrackers&&JSON.stringify({tcb:o.clickTrackers})}],privacyUrl:a,feedbackUrl:s,beaconsJson:JSON.stringify({e:!0})}};class be{static getInstance(){return Y.Gq.get("__NativeAdSdkService__",(()=>new be))}async fetchAds(e,t){return e&&e.placements&&0!==e.placements.length?he.loadSdkAsync().then((n=>{if(!n)return null;const i=this.buildPlacementsToFetch(e,t);if(!he.tryConfigPlacements(i,t))throw new Error("NativeAdXandrWrapper: tryConfigPlacements failed");this.eventHub||(this.eventHub=new ie,this.eventHub.initialize(he));const r=this.buildPlacementsRegisteredToEventHub(i,t);let o;if(!this.eventHub.tryRegisterPlacements(r,((...e)=>o(...e)),this.calculateUpdates))throw new Error("NativeAdSdkEventHub: tryRegisterPlacements failed");const s=!0===x.Al.IsPrerender?performance.now()-(0,l.TZ)(u.DB):performance.now();(0,l.su)(a.qG.RequestInitiated,s),he.startAdServerCalls();const p=this.calculateRequestTimeout();return(async(e,t)=>{const n=(0,J.rh)(e);return Promise.race([t,n])})(p,new Promise((e=>o=e))).then((e=>{if(!e){const e=this.eventHub.unregisterPlacements(r),t=(null==e?void 0:e.data)||[],n=i.filter((e=>!t.find((t=>t.targetId===e.targetId)))).map((e=>e.targetId));return P.M0.sendAppErrorEvent((0,c.Tr)(d._nz,`Timeout to fetch native ads from Xandr SDK within ${p}ms`,`missing placements: (${n.join(",")})`)),this.formatAdRespons(e)}return this.formatAdRespons(e)}))})).catch((e=>(P.M0.sendAppErrorEvent((0,c.Tr)(d.nZ_,"Error while fetch native ads from Xandr SDK",`fetchAds reject: ${(0,te.n)(e)}`)),null))):(P.M0.sendAppErrorEvent((0,c.Tr)(d.nZ_,"Empty placements in ad request")),Promise.resolve(null))}formatAdRespons(e){return{placements:(null==e?void 0:e.data)||[]}}buildPlacementsToFetch(e,t){const n=[];e.placements.forEach((e=>{const{indices:i,img:r,region:o,allIndices:a,diceRoll:s}=e;let{adContainerIds:c}=e;c||(c=i.map((e=>`${t.pageType}-${o}-${e}-${(0,ne.pW)()}`))),i&&i.length&&c&&c.length&&i.forEach(((e,t)=>{n.push({region:o,regionIndex:e,mappedPosition:Number(e),targetId:c[t],img:r,allIndices:a,diceRoll:s,tagCode:void 0})}))}));const i={pageType:t.pageType,previousRiverNativeAdCount:t.previousRiverNativeAdCount,previousReservedRiverNativeAdCount:t.previousReservedRiverNativeAdCount,previousRiverDualWideNativeAdCount:t.previousRiverDualWideNativeAdCount,previousRiverHalfNativeAdCount:t.previousRiverHalfNativeAdCount};return((e,t)=>{let n=0,i=0,r=0,o=0,a=t.previousRiverNativeAdCount??0,s=t.previousReservedRiverNativeAdCount??0,c=t.previousRiverDualWideNativeAdCount??0,d=t.previousRiverHalfNativeAdCount??0,l=0,u=0;e.forEach((e=>{if(!e.isStrictIndices){const p=t.pageType.toLowerCase(),h=e.region.toLowerCase(),g=e.mappedPosition;if(fe[p]&&fe[p][h]&&fe[p][h].indexOf(g)>=0)return;h===me||"peekinfopane"===h?e.allIndices&&""!==e.diceRoll?e.mappedPosition=e.allIndices.indexOf(g.toString())+1:(n+=1,e.mappedPosition=n):"infopane.river"===h?(i+=1,e.mappedPosition=i):"resinfopane"===h?(r+=1,e.mappedPosition=r):ve.indexOf(h)>=0?(o+=1,e.mappedPosition=o):ye.indexOf(h)>=0?(a+=1,e.mappedPosition=a):"resriver"===h?(s+=1,e.mappedPosition=s):"river_amp"===h?(l+=1,e.mappedPosition=l):Se.indexOf(h)>=0?(c+=1,e.mappedPosition=c):Ce.indexOf(h)>=0?(d+=1,e.mappedPosition=d):"rightrail"===h&&(u+=1,e.mappedPosition=u)}})),e.forEach((e=>{e.tagCode=`${t.pageType}-${e.region}-${e.mappedPosition}`.toLowerCase()}))})(n,i),n}buildPlacementsRegisteredToEventHub(e,t){const n=[];return e.forEach(((e,i)=>{const{region:r,regionIndex:o,targetId:a,tagCode:s}=e;n.push({targetId:a,region:r,index:Number(o),relativeIndex:i+1,pageType:t.pageType,id:`extcontentsponcon_${t.pageType}_${r}_${o}`,rid:t.rid,locale:t.locale,tagCode:s})})),n}calculateUpdates(e,t){var n,i,r;return null!=t&&t.native||P.M0.sendAppErrorEvent((0,c.Tr)(d.yL3,"Missing native in returned ad object")),null!=t&&null!==(n=t.native)&&void 0!==n&&n.clickTrackers||P.M0.sendAppErrorEvent((0,c.Tr)(d.jSV,"Missing click trackers in returned ad object")),null!=t&&null!==(i=t.native)&&void 0!==i&&i.impressionTrackers||P.M0.sendAppErrorEvent((0,c.Tr)(d.qok,"Missing impression trackers in returned ad object")),null!=t&&null!==(r=t.native)&&void 0!==r&&r.javascriptTrackers&&P.M0.sendAppErrorEvent((0,c.Tr)(d.Z6e,"Javascript trackers are not expected in returned ad object")),we(t,e)}calculateRequestTimeout(){return o.il.Timeout}}const Te=(0,ee.h)(be);var ke=n(64518),Pe=n(59002);class Ie{get sourceUrl(){if(this._sourceUrl)return this._sourceUrl;this._sourceUrl=b.jG.HostPage.originalUrl;const e=b.jG.CurrentRequestTargetScope.pageType,t=b.jG.HostPage.verticalKey;if(e&&t){const n=e.toLowerCase();(n.indexOf("dhp")>-1||n.indexOf("ntp")>-1)&&(this._sourceUrl="https://"+b.jG.HostPage.hostName+"/"+t+"/"+e)}return this._sourceUrl}get pageType(){if(this._pageType)return this._pageType;const e=b.jG.CurrentRequestTargetScope.pageType,t=b.jG.CurrentRequestTargetScope.ocid;switch(b.jG.AppType){case"edgeChromium":this._pageType=A.EDGECHRNTP;break;case"views":if((0,E.wq)()&&["article","gallery"].includes(e)){const e=(0,Q.v1)();this._pageType=e&&"iOS"===e.platform?A.SAI:A.SAA}else if("article"===e)this._pageType=this.isWindowsViewsPage(t)?A.WINAR:A.WEBCOMPAR;else if("gallery"===e)this._pageType=this.isWindowsViewsPage(t)?A.WINGA:A.WEBCOMPGA;else if("video"===e)this._pageType=A.WATCH;else{new Set(["topic","source"]).has(e)&&(this._pageType=A.VerticalLandingPage)}break;case"gaming":case"hub":case"sports":this._pageType=A.VerticalLandingPage;break;case"windows":location.href.includes("feed/interest/following")?this._pageType=A.WINWEB:this._pageType=e;break;default:this._pageType=e}return this._pageType}constructor(e){this.config=e,this.riverNativeAdCount=0,this.reservedRiverNativeAdCount=0,this.dualWideRiverNativeAdCount=0,this.halfRiverNativeAdCount=0,this.beaconService=new S.A,this.cookieService=new _.N,this.ecasession=o.Lr.Ecasession;const t=H._.getInstance().rootReducer;if("edgeChromium"===b.jG.AppType){const e=t.connector($.z.ChromiumPageSettings);e&&(this.anaheimPageLayout=e.getCurrentState().currentLayout)}const n=t.connector($.z.SharedState);n&&n.getCurrentState().useHistory?(0,V.lY)().addSwitchListener(this.onPivotSwitch.bind(this),W.I.Monetization):(0,q.l)().addSwitchListener(this.onPivotSwitch.bind(this),W.I.Monetization)}async fetchSAMAds(e,t=!1,n=!1,i=null,r,s){var p,h,g;if(!e||!e.placements||e.placements.length<1)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.rmC,"Invalid request to fetch native ads","No placements found in the request"));const m=e.pageType||this.pageType;if(!m)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.rmC,"Invalid request to fetch native ads","No page type found"));const f="ru-xl"===e.locale?"en-xl":e.locale,v=null===b.jG||void 0===b.jG||null===(p=b.jG.HostPage)||void 0===p?void 0:p.verticalKey,y=null===b.jG||void 0===b.jG||null===(h=b.jG.CurrentRequestTargetScope)||void 0===h?void 0:h.audienceMode,S=null===b.jG||void 0===b.jG||null===(g=b.jG.CurrentRequestTargetScope)||void 0===g?void 0:g.ocid,C=this.riverNativeAdCount,w=this.reservedRiverNativeAdCount,T=this.dualWideRiverNativeAdCount,k=this.halfRiverNativeAdCount;if(e.enableNativeAdXandr){const t={placements:this.getPlacementsForXandr(e,m)};return Te.fetchAds(t,{rid:this.getImpressionId(),prid:e.prid,pageType:m,locale:f,verticalName:v,audienceMode:y,ocid:S,flightKeywords:e.xandrFlightKeywords,previousRiverNativeAdCount:C,previousReservedRiverNativeAdCount:w,previousRiverDualWideNativeAdCount:T,previousRiverHalfNativeAdCount:k})}this._isSuperAppPage=this.isSuperAppPage(m,e.appName),this._isChannelAppPage=this.isChannelAppPage(m,e.appName),this._isMsnHpMobileAppPage=this.isMsnHpMobileAppPage(m,e.appName);const I=this.isNotMyFeed(),A=this.getImpressionId(),E=!this._isSuperAppPage&&this.cookieService.getBrowserOptoutStatus(),M=!this._isSuperAppPage&&await(0,U.UF)(),D=this.getMuid(e.muid),R=e.partnerId||b.jG.CurrentRequestTargetScope.pageType,{anaheimColLayout:F}=e,O=!!window.__tcfapi;M||this._isSuperAppPage||!t||(this.ecasession=(0,L.ej)(o.yV.TaboolaSessionCookieName)||this.ecasession);const B=this._isSuperAppPage||this._isChannelAppPage||this._isMsnHpMobileAppPage||!(!x.Al.ClientSettings||!x.Al.ClientSettings.deviceFormFactor||"phone"!==x.Al.ClientSettings.deviceFormFactor);void 0===this.isAdBlock&&(this.config&&this.config.sendAdBlockDetection?this.isAdBlock=function(){if((0,G.$o)().supported){const e=(0,G.$o)().getObject("BT_AA_DETECTION",void 0);if(void 0!==e)return!1===e.acceptable}return!1}():this.isAdBlock=!1);const N={adRefreshVariant:e.adRefreshVariant??"",locale:f,rid:A,partnerId:R,content:{sourceUrl:this.sourceUrl,pageType:m,previousReservedRiverNativeAdCount:w,previousRiverDualWideNativeAdCount:T,previousRiverHalfNativeAdCount:k,previousRiverNativeAdCount:C,verticalName:v,anaheimPageLayout:this.anaheimPageLayout,anaheimColLayout:F,isXfeed:I,audienceMode:y},user:{muid:D,browserOptOut:E,isAdblock:this.isAdBlock,gdpr:O},placements:this.getPlacements(e,m),extensions:this.getExtensions(this.lastResponseMetadata,this.ecasession),isCookieWallPresent:M,isPeregrine:!0,device:{isMobile:B}};(0,Pe.Z)(e.tmax)&&(N.tmax=e.tmax);this.config&&this.config.enablePrerenderAdsAuctionFlag&&(0,K.N)()&&(N.content.prerender=r?1:0);const $=(0,L.ej)(o.il.BCPCookieKey);var _;("bingHomepage"===b.jG.AppType&&$&&(N.user.bcp=$),this._isSuperAppPage&&(N.app={adid:e.adid,anid:e.anid,muid:e.muid,sapphireid:e.sapphireid,version:e.clientVersion,bundle:e.packageName}),(0,K.N)())&&(N.extensions.impressedCrids=ke.k.attachCridsToRequest(null==N||null===(_=N.placements[0])||void 0===_?void 0:_.region));const H=i||o.Lr.SamDomain,W=n?o.Lr.SamOpenRtbEndpoint:o.Lr.SamEndpoint,q=new URL(W,H),V=n?this.createOpenRtbRequest(N):N,z=JSON.stringify(V),j=!0===x.Al.IsPrerender?performance.now()-(0,l.TZ)(u.DB):performance.now();return(0,l.su)(a.qG.RequestInitiated,j),this.stampSamRequestIndices(e.placements),this.fetchSAMAdsCSR(z,f,D,q.href,m,V,r,n,s)}stampSamRequestIndices(e){let t="";e.forEach((e=>e.indices.forEach((n=>{t+=`${e.region}-${n}|`})))),P.M0.addOrUpdateTmplString(t)}generateSourceUrl(){const e=b.jG.CurrentRequestTargetScope.pageType;let t=b.jG.HostPage.originalUrl;const n=b.jG.HostPage.verticalKey;if(e&&n){const i=e.toLowerCase();(i.indexOf("dhp")>-1||i.indexOf("ntp")>-1)&&(t="https://"+b.jG.HostPage.hostName+"/"+n+"/"+e)}return t}processAdResponse(e){if(200!==e.status)return 204===e.status?(P.M0.sendAppErrorEvent((0,c.Tr)(d.vvT,"No content received from SAMRTB Ajax",`Status: ${e.status}, StatusText: ${e.statusText}`)),this.config&&this.config.useEmptyPlacementsForNoContent?{placements:[]}:void 0):void P.M0.sendAppErrorEvent((0,c.Tr)(d.I2B,"Invalid response from SAMRTB Ajax",`Status: ${e.status}, StatusText: ${e.statusText}`));try{const t=JSON.parse(e.response);if(!t)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.K8d,"Invalid json response from SAMRTB",`Status: ${e.status}, Invalid json: ${e.response}`));const n=t.metaData;return this.processMetaData(n),this.beaconService.fireRequestLevelBeacons(n.requestLevelBeaconUrls),t}catch(t){return void(0,c.OO)(t,d.ryt,"Failed to process SAMRTB response",`Status: ${e.status}, json: ${e.response}`)}}processOpenRtbAdResponse(e,t){if(200!==t.status)return 204===t.status?(P.M0.sendAppErrorEvent((0,c.Tr)(d.vvT,"No content received from SAMRTB Ajax",`Status: ${t.status}, StatusText: ${t.statusText}`)),this.config&&this.config.useEmptyPlacementsForNoContent?{placements:[]}:void 0):void P.M0.sendAppErrorEvent((0,c.Tr)(d.I2B,"Invalid response from SAMRTB Ajax",`Status: ${t.status}, StatusText: ${t.statusText}`));try{const n=JSON.parse(t.response);if(!n)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.K8d,"Invalid json response from SAMRTB",`Status: ${t.status}, Invalid json: ${t.response}`));const i=this.convertOpenRtbResponseToNativeAdResponse(e,n),r=i.metaData;return this.processMetaData(r),this.beaconService.fireRequestLevelBeacons(r.requestLevelBeaconUrls),i}catch(e){return void(0,c.OO)(e,d.ryt,"Failed to process SAMRTB response",`Status: ${t.status}, json: ${t.response}`)}}createOpenRtbRequest(e){var t;const n={native:{assets:[{id:1,img:{type:F.Large}}]}},i=JSON.stringify(n);let r=1;const a=e.placements.flatMap((t=>t.indices.map((n=>({id:(r++).toString(),tagid:`${e.content.pageType}-${t.region}-${n}`,native:{request:i},ext:{msn:{index:n,region:t.region}}}))))),s={url:e.content.sourceUrl,ext:{locale:e.locale,msn:{pageType:e.content.pageType,verticalName:e.content.verticalName,anaheimPageLayout:e.content.anaheimPageLayout,isXfeed:e.content.isXfeed,audienceMode:e.content.audienceMode,isPeregrine:e.isPeregrine,previousReservedRiverNativeAdCount:e.content.previousReservedRiverNativeAdCount,previousRiverDualWideNativeAdCount:e.content.previousRiverDualWideNativeAdCount,previousRiverHalfNativeAdCount:e.content.previousRiverHalfNativeAdCount,previousRiverNativeAdCount:e.content.previousRiverNativeAdCount,partnerId:e.partnerId}}},c={id:o.Lr.PublisherId},d={id:j(),imp:a,user:{dnt:e.user.browserOptOut?1:0,ext:{anid:"",muid:null===(t=e.user)||void 0===t?void 0:t.muid,msn:{isCookieWallPresent:e.isCookieWallPresent,bcp:e.user.bcp}}},device:{devicetype:e.device.isMobile?R.Mobile:R.PC,ext:{isAdBlock:e.user.isAdblock}},ext:{sessionId:e.rid,admConfiguration:{useAdmObject:!0,useMultipleAdms:!0,maxAdmCount:999},msn:{adRefreshVariant:e.adRefreshVariant,metadata:e.extensions}}};return this._isSuperAppPage?d.app={id:o.Lr.AppId,bundle:e.app.bundle,ver:e.app.version,content:s,publisher:c,ext:{msn:{adid:e.app.adid,sapphireId:e.app.sapphireid}}}:d.site={content:s,publisher:c},d}createSamRtbXmlHttpRequest(e,t,n){const i=new XMLHttpRequest;return i.open(o.il.Method,n,!0),i.withCredentials=!0,i.timeout=this.config&&this.config.auctionTimeoutOverride?this.config.auctionTimeoutOverride:o.il.Timeout,i.setRequestHeader(o.il.ContentTypeKey,o.il.ContentType),i.setRequestHeader(o.il.FlightIdKey,x.Al.CurrentFlights),i.setRequestHeader(o.il.CacheControlKey,o.il.CacheControl),i.setRequestHeader(o.il.MarketKey,e),t&&i.setRequestHeader(o.il.ClientIdKey,t),!this._isSuperAppPage&&(0,L.ej)(o.yV.AppAnonCookieExist)&&i.setRequestHeader(o.il.AuthCookieNameKey,M.Ji),i}async fetchSAMAdsCSR(e,t,n,i,r,o,s,u,p){return new Promise((h=>{try{const g=this.createSamRtbXmlHttpRequest(t,n,i);g.onload=()=>{(async(e,t,n=!1)=>{const i=performance.getEntriesByName&&performance.getEntriesByName(e)&&performance.getEntriesByName(e)[0],r=(0,l.O0)(a.qG.RequestInitiated);z(0,t,n,r,i,!1,((e,t)=>{(0,l.su)(e,t)}),((e,t,n)=>{(0,l.O_)(e,t,n)}))})(i,x.Al.IsPrerender,s),h(u?this.processOpenRtbAdResponse(o,g):this.processAdResponse(g))},g.ontimeout=()=>{P.M0.sendAppErrorEvent((0,c.Tr)(d.vvT,"Timeout calling SAMRTB Ajax",`pageType: ${r}, status: ${g.status}, StatusText: ${g.statusText}, StartTime: ${m}, EndTime: ${(new Date).toISOString()}`)),h(void 0)},g.onerror=()=>{P.M0.sendAppErrorEvent((0,c.Tr)(d.I2B,"Error calling SAMRTB Ajax",`pageType: ${r}, status: ${g.status}, StatusText: ${g.statusText}, StartTime: ${m}, EndTime: ${(new Date).toISOString()}`)),h(void 0)};const m=(new Date).toISOString();g.send(e),p&&p()}catch(e){(0,c.OO)(e,d.ryt,"Failed to get response from SAMRTB call",`pageType: ${r}`),h(void 0)}}))}convertOpenRtbResponseToNativeAdResponse(e,t){var n,i,r,o;const a=(null===(n=t.seatbid)||void 0===n||null===(i=n.flatMap((e=>e.bid)))||void 0===i?void 0:i.filter((e=>e.ext.admObjects.length>0)))??[],s=new Map;e.imp.forEach((e=>s.set(e.id,e)));return{placements:a.map((e=>{const t=e.ext.admObjects[0].native.ext.msn.mappedRegion,n=e.ext.admObjects.flatMap((e=>e.native.eventtrackers)),{geminiViewabilityDataJson:i,beaconsSupportHttpPOST:r}=e.ext.admObjects[0].native.ext.msn,o=e.ext.admObjects[0].native.privacy,a=[],c=[],d=[],l=[];null==n||n.forEach((e=>{var t,n;null!==(t=e.ext)&&void 0!==t&&null!==(n=t.msn)&&void 0!==n&&n.isBingTracker&&e.event==B.Viewed?l.push(e.url):e.method==N.JavaScript?d.push(e.url):e.event==B.Impression&&e.method==N.Image?a.push(e.url):e.event==B.Viewed&&e.method==N.Image&&c.push(e.url)}));const u=e.ext.admObjects.flatMap((e=>e.native.link.clicktrackers)),p=e.ext.admObjects[0].native.ext.msn.fireEncodedBeacons,h=JSON.stringify({tvb:c,trb:a,tcb:u,tjb:d,p:e.ext.bidderId,e:p}),g=e.ext.admObjects.map((e=>{const t=e.native,n={title:null,adSelectionReason:t.ext.msn.adSelectionReason,description:null,url:t.link.url,sourceName:null,adChoicesUrl:t.ext.adChoicesUrl,imageUrl:null,imageHeight:null,imageWidth:null,images:null,clickBeacons:null,uniqueId:t.ext.msn.uniqueId,beaconsJson:null,originalImageWidth:null,originalImageHeight:null,verificationParameters:t.ext.msn.verificationParameters,ext:t.ext.msn.ext,assets:[]};return n.clickBeacons=JSON.stringify({tcb:t.link.clicktrackers}),e.native.assets.forEach((e=>{if(e.ext.msn.isRtbAsset)e.img?n.assets.push({w:e.img.w,h:e.img.h,url:e.img.url,alt:e.img.ext.alt,ext:e.img.ext.msn}):n.assets.push(e);else if(e.data){const t=e.data.value;switch(e.data.type){case D.Sponsored:n.sourceName=t;break;case D.Description:n.description=t}}else if(e.img){const{url:t,w:i,h:r}=e.img;switch(e.img.type){case F.Large:n.imageUrl=t,n.imageWidth=i,n.imageHeight=r,n.originalImageHeight=e.img.ext.msn.originalImageHeight,n.originalImageWidth=e.img.ext.msn.originalImageWidth;break;case F.MultipleImages:n.images||(n.images=[]),n.images.push({url:t,alt:e.img.ext.alt,ext:e.img.ext.msn})}}else null!=e.title&&(n.title=e.title.text)})),n})),m=s.get(e.impid);return{items:g,privacyUrl:o,adServedUrls:a,jsTrackerUrls:d,visibilityUrls:c,beaconsJson:h,bingTrackerUrls:l,beaconsSupportHttpPOST:r,geminiViewabilityDataJson:i,region:t,index:m.ext.msn.index}})),metaData:null===(r=t.ext)||void 0===r||null===(o=r.msn)||void 0===o?void 0:o.metadata}}mapPlacementRegion(e,t){return t==A.EDGECHRNTP&&o.d5[e.region]||e.region}updatePlacementStrictIndices(e,t){"rivert"===e.region&&(t.isStrictIndices=!0),Z.BU.includes(e.region)&&(t.isStrictIndices=!0),void 0!==e.isStrictIndices&&(t.isStrictIndices=e.isStrictIndices)}updateRequestedPlacementsInfo(e){const t=e.region.toLocaleLowerCase();t===o.Lr.RiverRegion?this.riverNativeAdCount+=e.indices.length:t===o.Lr.ReservedRiver?this.reservedRiverNativeAdCount+=e.indices.length:t===o.Lr.RiverDoubleWide?this.dualWideRiverNativeAdCount+=e.indices.length:t!==o.Lr.RiverHalf&&t!==o.Lr.RiverHalfTextOnly||(this.halfRiverNativeAdCount+=e.indices.length)}getPlacementsForXandr(e,t){const n=[];return e.placements.forEach((e=>{if(e.region&&e.indices&&e.indices.length){const{adContainerIds:i,indices:r,img:o}=e,a={region:this.mapPlacementRegion(e,t),indices:r,img:o,adContainerIds:i};this.updatePlacementStrictIndices(e,a),n.push(a),this.updateRequestedPlacementsInfo(e)}})),n}getPlacements(e,t){const n=[];return e.placements.forEach((e=>{if(e.region&&e.indices&&e.indices.length){const{assets:i,indices:r,img:a,extensions:s}=e,c=t==A.EDGECHRNTP&&o.d5[e.region]||e.region,d=a?{assets:i,region:c,indices:r,img:a}:{assets:i,region:c,indices:r};s&&(d.extensions=s),this.updatePlacementStrictIndices(e,d),n.push(d),this.updateRequestedPlacementsInfo(e)}})),n}processMetaData(e){if(this._isSuperAppPage||this._isChannelAppPage||this._isMsnHpMobileAppPage)return;const t=e&&e.taboola&&e.taboola.sessionId;!this.isCookieWallPresent&&t&&(0,L.sq)(o.yV.TaboolaSessionCookieName,t,.042),this.lastResponseMetadata=this.mergeMetadata(this.lastResponseMetadata,e),this.cookieService.updateMsaOptOutCookie(e)}mergeMetadata(e,t){return e?t?(t.taboola=this.mergePartnerMetadata(e.taboola,t.taboola),t):e:t}mergePartnerMetadata(e,t){return t=t||{},e&&e.sessionId&&!t.sessionId&&(t.sessionId=e.sessionId),t}getImpressionId(){return this.config&&this.config.auctionRidOverride&&b.jG.ActivityIdLowerCaseNoHypens?b.jG.ActivityIdLowerCaseNoHypens:this.lastResponseMetadata&&this.lastResponseMetadata.pageViewId?this.lastResponseMetadata.pageViewId:P.M0.getRequestId()}clearPreviousInfo(){var e;this.riverNativeAdCount=0,this.reservedRiverNativeAdCount=0,this.dualWideRiverNativeAdCount=0,this.halfRiverNativeAdCount=0,null!==(e=this.lastResponseMetadata)&&void 0!==e&&e.pageViewId&&delete this.lastResponseMetadata.pageViewId}getExtensions(e,t){const n={taboola:(e=e||{taboola:{}}).taboola};return n.taboola.sessionId||(n.taboola.sessionId=t),n}getMuid(e){return this.isCookieWallPresent?null:e||(0,L.jG)()}onPivotSwitch(e){if(!e.oldSelection)return;const t=e.newSelection.pivotId;t&&t.toLowerCase()!==o.E7.EditInterestPivotId&&(this.pivotId=t)}isNotMyFeed(){return!!this.pivotId&&this.pivotId.toLowerCase()!==o.E7.MyFeedPivotId&&this.pivotId.toLowerCase()!==o.E7.StripeMyFeedPivotId}isWindowsViewsPage(e){return!!e&&("windirect"===(e=e.toLowerCase())||e.startsWith("winp"))}isSuperAppPage(e,t){return!!(e&&["saa","sai","mmx","mobilefeededge"].includes(e.toLowerCase())&&["SuperAppHP","SuperAppViews"].includes(t))}isChannelAppPage(e,t){return!(!e||!["skypefeed","outlookfeed"].includes(e.toLowerCase())||"Channel"!==t)}isMsnHpMobileAppPage(e,t){return!(!e||!["mobilefeed"].includes(e.toLowerCase())||"prime_mobile"!==t)}}var Ae,Ee=n(45701),xe=n(8991),Me=n(69425),Le=n(9498);!function(e){e.success="success",e.cmsBackfill="cmsBackfill",e.fail="fail"}(Ae||(Ae={}));const De={},Re=(e,t)=>{var n;null!==(n=b.jG.CurrentRequestTargetScope)&&void 0!==n&&n.pageExperiments.includes("prg-ad-cms-cnt")&&(De[t]||(De[t]={[Ae.success]:0,[Ae.cmsBackfill]:0,[Ae.fail]:0}),De[t][e]++,P.M0.sendClientLogEvent({pb:{clientLogName:"NativeAdCMSBackfillCount",region:t,...De[t]}}))};class Fe{constructor(e,t,n){this.adTemplateConfig=e,this.adServiceConfig=t,this.adBeaconServiceConfig=n,this.beaconService=new S.A(this.adBeaconServiceConfig),this.cmsService=new I,this.samService=new Ie(this.adServiceConfig),this.templateService=new Ee.E,this.cmsNativeAdsItemsMap=new Map,this.cmsRetryCount=0,this.backfillIndex=0,this.cmsAdsCounter=0,this.callbackFnPlacementList=[],this.callbackList=[]}resetNativeAdService(){this.backfillIndex=0,this.cmsAdsCounter=0,this.callbackFnPlacementList.length=0,this.callbackList.length=0,this.samService.clearPreviousInfo()}async fetchNativeAds(e,t){var n,i,r;if(!e||!e.placements||0===e.placements.length)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Zmj,"Fetch NativeAd failed","No placements found in the request"));const a="true"===(null===(n=C.c.getParamsWithItems((0,re.zp)(),!0,"citem").find((({key:e})=>"nativeAdDebug"===e)))||void 0===n?void 0:n.value);if(e.locale||(e.locale=x.Al.Locale),"ru-xl"===e.locale&&(e.locale="en-xl"),!e.locale)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Zmj,"Fetch NativeAd failed",`No locale found, headData.Locale: ${x.Al.Locale}, adRequest.locale: ${e.locale}`));var s;null!==(i=this.adServiceConfig)&&void 0!==i&&i.enableNativeAdXandr&&(e.enableNativeAdXandr=!0,e.xandrFlightKeywords=null===(s=this.adServiceConfig)||void 0===s?void 0:s.xandrFlightKeywords);const l=this.buildAdResponse(e),u=this.samService.fetchSAMAds(e,!1,!0===(null===(r=this.adTemplateConfig)||void 0===r?void 0:r.useOpenRtb),null,null,t),p=e.locale,h=o.Wi[p];if(!this.cmsItems){const e=await this.cmsService.getCMSList(h,p);e&&(this.cmsItems=e.items)}const g=await u;return this.updateAdResponse(l,this.cmsItems,h,g,e.enableNativeAdXandr,e.enableExtraImageData),a?{...l,debugInfo:{adRequest:e}}:l}updateAdResponse(e,t,n,i,r,o){const s=!t||0==t.length,p=!i||!i.placements||0==i.placements.length;if(s&&p)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.v73,"Fetch NativeAd failed",`Unable to retrieve backfill list id: ${n} and SAM response`));s&&P.M0.sendAppErrorEvent((0,c.Tr)(d.v73,"Unable to retrieve backfill list",`Backfill list id: ${n}`));const h=this.mapSAMPlacements(i);return e.pageViewId=i&&i.metaData&&i.metaData.pageViewId,e.placements.forEach((n=>{var i;const p=n.region+n.regionIndex,g=h.get(p);if(null!==(i=this.adServiceConfig)&&void 0!==i&&i.enableBuyDirectAd&&"infopane"==n.region&&15==n.regionIndex&&this.buyDirectItem){const e=this.buyDirectItem,t={title:e.title,destinationUrl:e.url,imageUrl:this.updateImageUrl(n,e.imageUrl),providerName:"Buy with Microsoft"};n.items.push(t),n.privacyUrl=e.privacyUrl,n.isBackfill=!1}else if(g&&g.items&&g.items.length>0){g.items.forEach((e=>{const t={title:e.title,description:e.description,destinationUrl:e.url,imageUrl:e.imageUrl,providerName:e.sourceName,adChoiceIconUrl:e.adChoicesUrl,imageHeight:e.imageHeight,imageWidth:e.imageWidth,clickBeacons:e.clickBeacons,uniqueId:e.uniqueId,feedbackUrl:r?g.feedbackUrl:(0,v.Yf)(e.clickBeacons),verificationParameters:e.verificationParameters,cashback:e.cashback};var i;(Fe.updateAssetDataFields(t,e.assets),o)&&(t.originalImageHeight=e.originalImageHeight,t.originalImageWidth=e.originalImageWidth,t.providerId=g.providerId,t.isProductAd=Boolean(null===(i=t.assets)||void 0===i?void 0:i.price));n.items.push(t)})),n.privacyUrl=g.privacyUrl,n.adServedUrls=g.adServedUrls,n.jsTrackerUrls=g.jsTrackerUrls,n.visibilityUrls=g.visibilityUrls,n.beaconsJson=g.beaconsJson,n.bingTrackerUrls=g.bingTrackerUrls,n.beaconsSupportHttpPOST=g.beaconsSupportHttpPOST,n.geminiViewabilityDataJson=g.geminiViewabilityDataJson,n.crids=g.crids,n.iasId=j(),this.updateTemplate(n),this.beaconService.sendBeaconForAdServed({beaconsJson:n.beaconsJson,beaconsSupportHttpPOST:n.beaconsSupportHttpPOST}),this.beaconService.fireJSTrackers(g.beaconsJson,e.shouldUseWindowVisibilityTrackingForXandr);const t=!0===x.Al.IsPrerender?performance.now()-(0,l.TZ)(u.DB):performance.now();(0,l.su)(a.qG.TimeToServeAd,t),Re(Ae.success,p)}else if(s)P.M0.sendAppErrorEvent((0,c.Tr)(d.m9g,"Unable to backfill invalid sam placement",`Placement key: ${p}`)),this.updateTemplate(n),Re(Ae.fail,p);else{const e=this.backfillIndex++%t.length,i=t[e],r={title:i.title,destinationUrl:i.url,imageUrl:this.updateImageUrl(n,i.imageUrl),providerName:i.provider?i.provider.name:""};n.items.push(r),n.privacyUrl=i.privacyUrl,this.updateTemplate(n),Re(Ae.cmsBackfill,p)}})),e}updateTemplate(e){var t;(null===(t=e.items)||void 0===t?void 0:t.length)>0&&this.templateService.updateTemplate(e,this.adTemplateConfig)}addToCallbackList(e){e&&e.length>0&&this.callbackList.push(...e)}async fetchSamAds(e,t=!1,n,i){var r,o;if(!e||!e.placements||0===e.placements.length)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Zmj,"Fetch NativeAd failed","No placements found in the request"));if(e.locale||(e.locale=x.Al.Locale),"ru-xl"===e.locale&&(e.locale="en-xl"),!e.locale)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Zmj,"Fetch NativeAd failed",`No locale found, headData.Locale: ${x.Al.Locale}, adRequest.locale: ${e.locale}`));this.addToCallbackList(n),this.locale=e.locale;const a=this.samService.fetchSAMAds(e,t,!0===(null===(r=this.adTemplateConfig)||void 0===r?void 0:r.useOpenRtb),null===(o=this.adTemplateConfig)||void 0===o?void 0:o.msxServiceUrl,i,null);return{placeHolderResponse:this.buildAdResponse(e),samResponse:await a}}async fetchCmsAds(e,t,n){if(!e||!e.placements||0===e.placements.length)return void P.M0.sendAppErrorEvent((0,c.Tr)(d.Zmj,"Fetch NativeAd failed","No placements found in the request"));let i=x.Al.Locale;if("ru-xl"===i&&(i="en-xl"),!this.cmsNativeAdsItemsMap.has(t)){const e=await this.cmsService.getCMSList(t,i);e&&e.id&&e.items&&this.cmsNativeAdsItemsMap.set(t,e.items)}const r=this.buildAdResponse(e),o=this.cmsNativeAdsItemsMap.has(t)?this.cmsNativeAdsItemsMap.get(t):[];for(const e of r.placements){const t=n.shift();let r,a;if(t){let e=parseInt(t,10);if(e)e=Math.max(e-1,0),e=e<o.length?e:e%o.length,r=o[e];else{if(!this.cmsNativeAdsItemsMap.has(t)){const e=await this.cmsService.getCMSList(t,i);e&&e.id&&e.items&&this.cmsNativeAdsItemsMap.set(t,e.items)}const e=this.cmsNativeAdsItemsMap.has(t)?this.cmsNativeAdsItemsMap.get(t):[];r=(0,h.Z)(e)[0],r||(r=o[this.cmsAdsCounter%o.length])}}else r=o[this.cmsAdsCounter%o.length];r&&(a={title:r.title,destinationUrl:r.url,imageUrl:this.updateImageUrl(e,r.imageUrl),providerName:r.provider?r.provider.name:""},e.items.push(a),e.privacyUrl=r.privacyUrl),this.updateTemplate(e),this.cmsAdsCounter++}return r}updateSamAdResponse(e,t,n){const i=this.cmsItems,r=this.mapSAMPlacements(t),o=!i||0==i.length;return e.pageViewId=t&&t.metaData&&t.metaData.pageViewId,e.placements.forEach((e=>{var t,s,c;null!==(t=this.adServiceConfig)&&void 0!==t&&t.enableAdsWaterfall&&"river"===e.region&&e.regionIndex===(null===(s=this.adServiceConfig)||void 0===s?void 0:s.tallAdsIndex)&&(e.region="rivert");const u=e.region+e.regionIndex,h=r.get(u);if(null!==(c=this.adServiceConfig)&&void 0!==c&&c.enableBuyDirectAd&&"infopane"==e.region&&15==e.regionIndex&&this.buyDirectItem){const t=this.buyDirectItem,n={title:t.title,destinationUrl:t.url,imageUrl:this.updateImageUrl(e,t.imageUrl),providerName:"Buy with Microsoft"};e.items.push(n),e.privacyUrl=t.privacyUrl,e.isBackfill=!1}else if(h&&h.items&&h.items.length>0){h.items.forEach((t=>{const n={title:t.title,adSelectionReason:t.adSelectionReason,description:t.description,destinationUrl:t.url,providerName:t.sourceName,adChoiceIconUrl:t.adChoicesUrl,imageUrl:t.imageUrl,imageHeight:t.imageHeight,imageWidth:t.imageWidth,images:t.images,clickBeacons:t.clickBeacons,uniqueId:t.uniqueId,beaconsJson:t.beaconsJson,feedbackUrl:(0,v.Yf)(t.clickBeacons),originalImageWidth:t.originalImageWidth,originalImageHeight:t.originalImageHeight,verificationParameters:t.verificationParameters,ext:t.ext,adScenarioType:t.adScenarioType,cashback:t.cashback};Fe.updateAssetVideoField(n,t.assets),Fe.updateAssetDataFields(n,t.assets),e.items.push(n)}));const t=(0,xe.dQ)(e,0);e.videoViewabilityData=t?t.ViewabilityProps:null,e.privacyUrl=h.privacyUrl,e.adServedUrls=h.adServedUrls,e.jsTrackerUrls=h.jsTrackerUrls,e.visibilityUrls=h.visibilityUrls,e.beaconsJson=h.beaconsJson,e.bingTrackerUrls=h.bingTrackerUrls,e.beaconsSupportHttpPOST=h.beaconsSupportHttpPOST,e.geminiViewabilityDataJson=h.geminiViewabilityDataJson,e.providerId=h.providerId,e.crids=h.crids;const i=(0,y.v0)(x.Al.IsPrerender&&!n);n?((0,l.su)(a.qG.TimeToServeAdBackground,i),(0,Le.lr)().then((()=>{const e=(0,p.Ou)().TTPR;e?(0,l.su)(a.qG.TimeToServeAd,e):P.M0.sendAppErrorEvent({...d.iVH,message:"Could not find TTPR to set TimeToServeAd"})}))):(0,l.su)(a.qG.TimeToServeAd,i)}else if(o)this.handleCmsStandyPlacement(e);else{const t=this.backfillIndex++%i.length,n=i[t],r={title:n.title,destinationUrl:n.url,imageUrl:this.updateImageUrl(e,n.imageUrl),providerName:n.provider?n.provider.name:""};e.items.push(r),e.privacyUrl=n.privacyUrl,e.isBackfill=!0}this.updateTemplate(e)})),e}handleCmsStandyPlacement(e){if(this.cmsItems){const t=this.cmsItems;for(const n of this.callbackFnPlacementList){const i=t[this.backfillIndex++%t.length];if(i){const t={title:i.title,destinationUrl:i.url,imageUrl:this.updateImageUrl(e,i.imageUrl),providerName:i.provider?i.provider.name:""};n.items.push(t),n.privacyUrl=i.privacyUrl,n.isBackfill=!0,this.updateTemplate(n)}}this.callbackList.forEach((e=>{e(this)})),this.callbackList=[],this.callbackFnPlacementList=[]}else e&&this.callbackFnPlacementList.push(e)}loadCmsBackFillList(){let e=this.locale?this.locale:x.Al.Locale;"ru-xl"===e&&(e="en-xl");const t=o.Wi[e];t&&!this.cmsItems&&this.cmsService.getCMSList(t,e).then((e=>{e?(this.cmsItems=e.items,this.handleCmsStandyPlacement()):++this.cmsRetryCount<10&&this.loadCmsBackFillList()})),this.adServiceConfig.enableBuyDirectAd&&this.cmsService.getCMSList("AA13DgW5",e).then((e=>{e&&(this.buyDirectItem=e.items[0])}))}async tryGetCmsList(e=0){let t=this.locale?this.locale:x.Al.Locale;"ru-xl"===t&&(t="en-xl");const n=o.Wi[t];if(!n||!t)return;const i=await this.cmsService.getCMSList(n,t);return i||(e<5?await this.tryGetCmsList(++e):void 0)}mapSAMPlacements(e){const t=new Map;return e&&e.placements&&e.placements.forEach((e=>{e.region&&e.index&&t.set(e.region+e.index,e)})),t}buildAdResponse(e){const t=[];e.placements.forEach((e=>{e.region&&e.indices&&e.indices.length&&e.indices.forEach((n=>{const i={region:e.region,regionIndex:n,imageHeight:e.img&&e.img.h&&e.img.h.toString(),imageWidth:e.img&&e.img.w&&e.img.w.toString(),items:[]};t.push(i)}))}));const n=b.jG.LocaleDisplayLanguageString;return{placements:t,adLabelText:(0,v.En)(n),isGreyAdsLabelEnabled:o.Eg.includes(e.locale),shouldUseWindowVisibilityTrackingForXandr:Boolean(e.shouldUseWindowVisibilityTrackingForXandr),privacyUrl:o.Lr.PrivacyUrl}}async loadBuyDirectAd(){const e=this.locale?this.locale:x.Al.Locale;if(!this.buyDirectItem){const t=await this.cmsService.getCMSList("AA13DgW5",e);t&&(this.buyDirectItem=t.items[0])}}updateImageUrl(e,t){return e&&e.imageWidth&&e.imageHeight&&t?t.replace("w=624","w="+e.imageWidth).replace("h=350","h="+e.imageHeight):t}static updateAssetDataFields(e,t){const n=(0,g.Z)(t,((e,t)=>{if(null!=t&&t.data){const n=(0,m.Z)(t,"data.type"),i=(0,f.Z)(s.aT,(e=>e===`data-${n}`));if(i)if(s.xs.includes(i)){const n=(0,m.Z)(t,"data.value")||"{}";e[i]=JSON.parse(n)}else e[i]=(0,m.Z)(t,"data.value")}else if(null!=t&&t.image||null!=t&&t.img){let a,c;null!=t&&t.image?(a=null==t?void 0:t.image,c=(0,m.Z)(t,"image.type")):(a=null==t?void 0:t.img,c=(0,m.Z)(t,"img.type"));const d=(0,f.Z)(s.aT,(e=>e===`image-${c}`));var n,i,r,o;if(d)e[d]={w:null===(n=a)||void 0===n?void 0:n.w,h:null===(i=a)||void 0===i?void 0:i.h,url:null===(r=a)||void 0===r?void 0:r.url,ext:null===(o=a)||void 0===o?void 0:o.ext}}else null!=t&&t.title&&(e.title=t.title.text);return e}),{});e.assets=n}static updateAssetVideoField(e,t){t&&t.length>0&&t.forEach((t=>{const n=(0,m.Z)(t,"video.vasttag");n&&(e.video=n)}))}getAdTagStyleByLocale(e){const t=b.jG.LocaleDisplayLanguageString;let n=e??x.Al.Locale;return"ru-xl"===n&&(n="en-xl"),{adLabelText:(0,v.En)(t),isGreyAdsLabelEnabled:o.Eg.includes(n)}}}(0,r.gn)([(0,Me.Et)(d.rEw,"fetchNativeAds")],Fe.prototype,"fetchNativeAds",null),(0,r.gn)([(0,Me.Et)(d.rEw,"updateAdResponse")],Fe.prototype,"updateAdResponse",null),(0,r.gn)([(0,Me.Et)(d.rEw,"updateTemplate")],Fe.prototype,"updateTemplate",null),(0,r.gn)([(0,Me.Et)(d.rEw,"fetchSamAds")],Fe.prototype,"fetchSamAds",null),(0,r.gn)([(0,Me.Et)(d.rEw,"fetchCmsAds")],Fe.prototype,"fetchCmsAds",null),(0,r.gn)([(0,Me.Et)(d.rEw,"updateSamAdResponse")],Fe.prototype,"updateSamAdResponse",null),(0,r.gn)([(0,Me.Et)(d.rEw,"handleCmsStandyPlacement")],Fe.prototype,"handleCmsStandyPlacement",null),(0,r.gn)([(0,Me.Et)(d.rEw,"loadCmsBackFillList")],Fe.prototype,"loadCmsBackFillList",null),(0,r.gn)([(0,Me.Et)(d.rEw,"tryGetCmsList")],Fe.prototype,"tryGetCmsList",null),(0,r.gn)([(0,Me.Et)(d.rEw,"mapSAMPlacements")],Fe.prototype,"mapSAMPlacements",null),(0,r.gn)([(0,Me.Et)(d.rEw,"buildAdResponse")],Fe.prototype,"buildAdResponse",null),(0,r.gn)([(0,Me.Et)(d.rEw,"updateImageUrl")],Fe.prototype,"updateImageUrl",null),(0,r.gn)([(0,Me.Et)(d.rEw,"getAdTagStyleByLocale")],Fe.prototype,"getAdTagStyleByLocale",null),(0,r.gn)([(0,Me.Et)(d.rEw,"updateAssetDataFields")],Fe,"updateAssetDataFields",null),(0,r.gn)([(0,Me.Et)(d.rEw,"updateAssetVideoField")],Fe,"updateAssetVideoField",null);const Oe=(0,Me.Et)(d.Evv,"getNativeAdService")(((e,t)=>{const n=Y.Gq.get("__NativeAdServiceInstance__",(()=>new Fe(e||{},t)));return n.resetNativeAdService(),n}))},64518:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var i=n(21882);const r=new class{constructor(){this.excludedPlacement=[i.yp.inarticle,i.yp.interstitialgallery,i.yp.inarticlecarousel],this.dedupeIds=new Array,this.cacheSize=0}setCacheSize(e){for(;this.dedupeIds.length>e;)this.dedupeIds.shift();this.cacheSize=e}addDedupeIds(e){this.cacheSize&&e&&0!=e.length&&e.forEach((e=>{const t=this.dedupeIds.findIndex((t=>t===e));if(t>-1)return this.dedupeIds.splice(t,1),void this.dedupeIds.push(e);this.dedupeIds.length==this.cacheSize&&this.dedupeIds.shift(),this.dedupeIds.push(e)}))}getDedupeIds(){return this.dedupeIds}attachCridsToRequest(e){return this.excludedPlacement.includes(e)?[]:this.getDedupeIds()}}},45701:function(e,t,n){"use strict";n.d(t,{E:function(){return fn}});var i=n(33940),r=n(23019),o=n(82694),a=n(7476),s=n(88826),c=n(90351),d=n(25193),l=n(52965),u=n(72554),p=n(13578),h=n(92170),g=n(11935),m=n(4935),f=n(40252),v=n(31011),y=n(21882);const S={configType:"prg-d-rating-n-y",region:[y.yp.river],template:(e,t)=>o.SI.RatingDefaultYellowNonDRStatic,requiredAssetsAll:[r.aT.rating],supportedAssets:[r.aT.rating]},C={configType:"prg-h-rating-n-r",region:[y.yp.river],template:(e,t)=>o.SI.RatingHighlightRedNonDR,requiredAssetsAll:[r.aT.rating],supportedAssets:[r.aT.rating]},w={configType:"prg-h-rating-n-y",region:[y.yp.river],template:(e,t)=>o.SI.RatingHighlightYellowNonDR,requiredAssetsAll:[r.aT.rating],supportedAssets:[r.aT.rating]},b={configType:"prg-h-rating-nys",region:[y.yp.river],template:(e,t)=>o.SI.RatingHighlightYellowNonDRStatic,requiredAssetsAll:[r.aT.rating],supportedAssets:[r.aT.rating]},T={configType:"prg-promo-ndr",region:[...y.Fg],template:(e,t)=>o.SI.SpecialOfferNonDR,requiredAssetsAll:[r.aT.specialOffer],supportedAssets:[r.aT.specialOffer]},k={configType:"prg-promo-ndr2",region:[...y.Fg],template:(e,t)=>o.SI.SpecialOfferNonDRWithExp,requiredAssetsAll:[r.aT.specialOffer],supportedAssets:[r.aT.specialOffer]},P={configType:"prg-ad-condition",region:[y.yp.river],template:o.SI.ConditionNonDR,requiredAssetsAll:[r.aT.condition]},I={configType:"prg-ad-return",region:[y.yp.river],template:o.SI.ReturnPolicyNonDR,requiredAssetsAll:[r.aT.returnPolicy]},A={configType:"prg-ad-sold",region:[y.yp.river],template:o.SI.SoldNonDR,requiredAssetsAll:[r.aT.sold]},E={configType:"prg-fship-in-b-n",region:[y.yp.river],template:o.SI.FreeShippingInlineNonDR,requiredAssetsAll:[r.aT.freeShipping],supportedAssets:[r.aT.freeShipping]},x={configType:"prg-fship-in-t-n",region:[y.yp.river],template:o.SI.FreeShippingPlainTextNonDR,requiredAssetsAll:[r.aT.freeShipping],supportedAssets:[r.aT.freeShipping]},M={configType:"prg-fship-tl-n",region:[y.yp.river],template:o.SI.FreeShippingTopLeftNonDR,requiredAssetsAll:[r.aT.freeShipping],supportedAssets:[r.aT.freeShipping]},L={configType:"prg-fship-tr-n",region:[y.yp.river],template:o.SI.FreeShippingTopRightNonDR,requiredAssetsAll:[r.aT.freeShipping],supportedAssets:[r.aT.freeShipping]};var D=n(91257);const R={name:"gamification-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:5},children:[...D.u,{name:"gradient-mask",paddingTop:"120",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:2}},{name:"gamification",layout:{mode:"pixel",bottom:"35",width:"300",zIndex:4}}]}]},F=(e,t,n)=>({modifier:(e,t)=>{t.template.useClickInGamify=n},configType:e,region:[y.yp.river],template:o.SI.Gamification,discountThreshold:t,requiredAssetsAll:[r.aT.price,r.aT.salePrice],supportedAssets:[r.aT.price,r.aT.salePrice,r.aT.discount],dynamicRenderingConfig:()=>R}),O=F("prg-wpo-gamify-c",y.XP.gamification,!0),B=F("prg-wpo-gamify-h",y.XP.gamification,!1),N={name:"hotspot-single-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:5},children:[...D.u,{layout:{mode:"pixel",bottom:"0",zIndex:2},children:[{name:"gradient-mask",paddingTop:"30",children:[{name:"div-wrapper",marginBottom:"10",children:[{name:"animation-decorator",animationType:"scale-up",animationConfig:{scaleFrom:0,scaleTo:1,durationString:".3s",delayTimeMs:0},children:[{name:"hotspot-single"}]}]},{name:"ad-title"}]}]}]}]},$=(e,t)=>({configType:e,region:[y.yp.river],requiredAssetsAll:[r.aT.price,r.aT.salePrice],template:o.SI.HotspotSingle,supportedAssets:[r.aT.price,r.aT.salePrice,r.aT.discount],discountThreshold:t,dynamicRenderingConfig:()=>N}),U=$("prg-wpo-hs",y.XP.default),_=$("prg-wpo-hs10",y.XP.hotspotSingle10),H={configType:"prg-ad-ctav3",region:[...y.cE,...y.Fg],maxAdCount:3,template:(e,t)=>o.SI.CallToActionV3},W={configType:"prg-ad-cta-pa",region:[...y.Fg],requiredAssetsAll:[r.aT.price],maxAdCount:3,template:(e,t)=>o.SI.CallToActionV3PA};var q=n(37500),V=n(99478);const G={name:"feedv2-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[{name:"ad-title-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:4}},{name:"product-image",layout:{mode:"pixel",left:"0",top:"0",width:"302",height:"157",zIndex:1}},{name:"color-mask",alwaysPresent:!0,feedV2:!0,layout:{mode:"pixel",left:"0",top:"157",width:"300",height:"147",zIndex:1}},{name:"ad-title",isFeedV2:!0,titleFontSize:18,layout:{mode:"pixel",top:"169",zIndex:1}},{name:"see-more",isFeedV2:!0,layout:{mode:"pixel",top:"8",height:"31",left:"260",zIndex:5}},(0,V.It)((0,V.ZV)(q.l,"end-action-part",2,[],1),["ad-label","provider-name","ad-choice"],[{isFeedV2:!0},{isFeedV2:!0},{isFeedV2:!0,layout:{zIndex:5,marginInlineEnd:10}}])]}]},z={configType:"prg-scards",region:[...y.Fg],template:o.SI.AdFeedV2,dynamicRenderingConfig:()=>G},j=(0,V.RM)(G,"ad-title",{name:"ad-title",isFeedV2:!0,titleFontSize:18,customStyleHovered:"text-decoration:underline;",layout:{mode:"pixel",top:"169",zIndex:1}}),K={configType:"prg-scardsul",region:[...y.Fg],template:o.SI.AdFeedV2,dynamicRenderingConfig:()=>j},Q=(0,V.RM)(G,"ad-title",{name:"ad-title",isFeedV2:!0,titleFontSize:20,customStyleHovered:"text-decoration:underline;",layout:{mode:"pixel",top:"169",zIndex:1}}),Z={configType:"prg-scardshov",region:[...y.Fg],template:o.SI.AdFeedV2,dynamicRenderingConfig:()=>Q};var J,X,Y,ee,te,ne;!function(e){e.ROW="row",e.ROW_REVERSE="row-reverse",e.COLUMN="column",e.COLUMN_REVERSE="column-reverse"}(J||(J={})),function(e){e.FLEX="flex",e.INLINE_FLEX="inline-flex"}(X||(X={})),function(e){e.FLEX_START="flex-start",e.FLEX_END="flex-end",e.CENTER="center",e.SPACE_BETWEEN="space-between",e.SPACE_AROUND="space-around",e.SPACE_EVENLY="space-evenly"}(Y||(Y={})),function(e){e.FLEX_START="flex-start",e.FLEX_END="flex-end",e.CENTER="center",e.STRETCH="stretch",e.BASELINE="baseline"}(ee||(ee={})),function(e){e.NOWRAP="nowrap",e.WRAP="wrap",e.WRAP_REVERSE="wrap-reverse"}(te||(te={})),function(e){e.AUTO="auto",e.STRETCH="stretch",e.CENTER="center",e.FLEX_START="flex-start",e.FLEX_END="flex-end",e.BASELINE="baseline",e.INITIAL="initial",e.INHERIT="inherit"}(ne||(ne={}));const ie={name:"ad-slug-v3-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[{name:"ad-label",layout:{mode:"pixel",top:"270",height:"31",zIndex:5,marginInlineStart:"16",marginInlineEnd:"8"}},{name:"ad-choice",layout:{mode:"pixel",top:"267",height:"31",zIndex:5,marginInlineStart:"231",marginInlineEnd:"8"}},{name:"see-more",layout:{mode:"pixel",top:"262",height:"31",zIndex:5,marginInlineStart:"256"}},{name:"product-image",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"225",zIndex:1},imageMaskOn:!0},{name:"background-image",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:0}},{name:"ad-title-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:4}},{name:"gradient-mask",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:2},children:[{name:"div-wrapper",marginBottom:"6",marginLeft:"16",marginRight:"16",width:"260",children:[{name:"favicon-provider-name",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,flex:1,alignItems:ee.CENTER},children:[{name:"ad-favicon",layout:{mode:"flex"}},{name:"provider-name",layout:{mode:"flex",flex:1,marginInline:"6",minWidth:"0"},customStyleClass:"white-12-flex-layout",keepOpacity:!0}]}]},{name:"ad-title",twoLine:!0}]}]}]},re={configType:"prg-wpo-ad-slug3",region:[y.yp.river,y.yp.rivercms,y.yp.resriver],template:o.SI.AdSlugV3,dynamicRenderingConfig:()=>ie},oe={configType:"prg-wpo-ad-slug4",region:[y.yp.river,y.yp.resriver,y.yp.rivercms],template:o.SI.AdSlugV4,dynamicRenderingConfig:()=>ie};var ae=n(82),se=n(7291);const ce={maxAdCount:3,template:(e,t)=>y.cE.includes(t.region)?o.SI.InfopaneDynamicRendering:o.SI.DecorationDynamic,region:[...y.vn],dynamicRenderingConfig:e=>y.cE.includes(e.region)?ae.v:se.$},de=[{...ce,configType:"prg-ads-deco",supportedAssets:[r.aT.rating,r.aT.freeShipping,r.aT.review]},{...ce,configType:"prg-ads-no-deco"}],le={name:"default-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[{name:"div-text",inlineStyle:"font-size:14px;line-height:16px;letter-spacing:0.7px",text:"nativeAdBingRewardsText",layout:{mode:"pixel",left:"16",top:"16",zIndex:2}},{name:"product-image",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"225",zIndex:1},imageMaskOn:!0},{name:"gradient-mask",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:2},children:[{name:"ad-title"}]},{name:"ad-title-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:4}},{name:"footer-wrapper",layout:{mode:"pixel",top:"264",height:"31",width:"100%",zIndex:5},children:[{name:"footer",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,alignItems:ee.CENTER,height:"31"},children:[{name:"start-action-part",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,flex:1,alignItems:ee.CENTER},children:[{name:"join-now",layout:{mode:"pixel",left:"16",zIndex:2}}]},{name:"end-action-part",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW_REVERSE,alignItems:ee.CENTER},children:[{name:"ad-choice",layout:{mode:"flex",paddingRight:"6"}},{name:"div-text",inlineStyle:"font-size:12px;color:rgba(255,255,255,0.7);padding-right:11px",text:"nativeAdPromotedByText",layout:{mode:"flex"}}]}]}]}]}]},ue={configType:"prg-amplify",region:[y.yp.riverAmplify,y.yp.rightRailAmplify],template:o.SI.Amplify,dynamicRenderingConfig:()=>le},pe=e=>({name:"animation-decorator",animationType:"scale-up",animationConfig:{scaleFrom:1.5,scaleTo:1,durationString:"1s",duration:1500,delayTimeMs:500},intersectionRootMargin:"0px 0px 0px 0px",children:[e]}),he=e=>(0,V.BH)(e,V.Oz.byName("product-image"),pe),ge=he(se.$),me=he(ae.v);var fe,ve,ye,Se,Ce,we,be;!function(e){e[e["Segoe UI"]=1]="Segoe UI",e[e.Tenorite=2]="Tenorite",e[e.Lora=3]="Lora"}(fe||(fe={})),function(e){e[e["scale-up"]=1]="scale-up",e[e["scale-down"]=2]="scale-down",e[e["scale-up-down"]=3]="scale-up-down"}(ve||(ve={})),function(e){e[e["#036AC4"]=1]="#036AC4",e[e["#B26200"]=2]="#B26200",e[e["#508128"]=3]="#508128",e[e["#158389"]=4]="#158389",e[e["#C84C56"]=5]="#C84C56",e[e["#12875E"]=6]="#12875E",e[e["#666666"]=7]="#666666"}(ye||(ye={})),function(e){e[e.cube=2]="cube",e[e.box=3]="box",e[e.truck=4]="truck"}(Se||(Se={})),function(e){e[e.normal=1]="normal",e[e.small=2]="small",e[e.large=3]="large"}(Ce||(Ce={})),function(e){e[e.default=1]="default",e[e["5-star-with-button"]=2]="5-star-with-button",e[e["1-star-with-button"]=3]="1-star-with-button",e[e["1-star-with-shadow"]=4]="1-star-with-shadow"}(we||(we={})),function(e){e.normal="265",e.small="270",e.large="255"}(be||(be={}));var Te=n(69425);const ke=(0,Te.Et)(a.Evv,"personalizedV2Override")((e=>{var t,n,i;(0,p.Z)(null===(t=e.items)||void 0===t||null===(n=t[0])||void 0===n||null===(i=n.ext)||void 0===i?void 0:i.adCreativeV2)||(e.items[0].ext.adCreative=JSON.parse(e.items[0].ext.adCreativeV2))})),Pe=(0,Te.Et)(a.Evv,"isPersonalizedAvailable")(((e,t)=>{var n,i,r,o,a,s,c,d;return(null===(n=e.items)||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.ext)||void 0===r||null===(o=r.adCreative)||void 0===o?void 0:o.templateId)===t&&!(null===(a=e.items)||void 0===a||null===(s=a[0])||void 0===s||null===(c=s.ext)||void 0===c||null===(d=c.adCreative)||void 0===d||!d.templateConfig)})),Ie=(0,Te.Et)(a.Evv,"isShippingConfig")((e=>{var t,n,i,r,o,a,s,c,d,l,u,p,h;return!(null===(t=e.items[0])||void 0===t||null===(n=t.assets)||void 0===n||!n.freeShipping||null===(i=e.items)||void 0===i||null===(r=i[0])||void 0===r||null===(o=r.ext)||void 0===o||null===(a=o.adCreative)||void 0===a||null===(s=a.templateConfig)||void 0===s||!s.shipping||null!==(c=e.items)&&void 0!==c&&null!==(d=c[0])&&void 0!==d&&null!==(l=d.ext)&&void 0!==l&&null!==(u=l.adCreative)&&void 0!==u&&null!==(p=u.templateConfig)&&void 0!==p&&null!==(h=p.shipping)&&void 0!==h&&h.suppress)})),Ae=(0,Te.Et)(a.Evv,"isRatingConfig")((e=>{var t,n,i,r,o,a,s,c,d,l,u,p,h;return!(null===(t=e.items[0])||void 0===t||null===(n=t.assets)||void 0===n||!n.rating||null===(i=e.items)||void 0===i||null===(r=i[0])||void 0===r||null===(o=r.ext)||void 0===o||null===(a=o.adCreative)||void 0===a||null===(s=a.templateConfig)||void 0===s||!s.ratings||null!==(c=e.items)&&void 0!==c&&null!==(d=c[0])&&void 0!==d&&null!==(l=d.ext)&&void 0!==l&&null!==(u=l.adCreative)&&void 0!==u&&null!==(p=u.templateConfig)&&void 0!==p&&null!==(h=p.ratings)&&void 0!==h&&h.suppress)})),Ee=(0,Te.Et)(a.Evv,"getPersonalizedConfig")(((e,t)=>{if(Pe(e,t)){const[t]=e.items;return t.ext.adCreative.templateConfig}return null}));var xe;!function(e){const t=(0,Te.Et)(a.Evv,"processDecorations");e.processDecorations=t(((e,t)=>{var n,i;return(0,V.Tb)(t,"ad-decoration",{fontSizes:{price:null===(n=e.price)||void 0===n?void 0:n.fontSize,salePrice:null===(i=e.saleprice)||void 0===i?void 0:i.fontSize},fontFamily:fe[e.font]})}));const n=(0,Te.Et)(a.Evv,"getAnimationDuration")((e=>e?{duration:e,durationString:e/1e3+"s"}:{})),i=(0,Te.Et)(a.Evv,"getAnimationScale")(((e,t)=>e&&t?{scaleFrom:e,scaleTo:e-t}:{})),r=(0,Te.Et)(a.Evv,"getLocationAlignRight")((e=>{if(2==e)return{mode:"flex",display:X.FLEX,flexDirection:J.ROW,justifyContent:Y.FLEX_END}})),o=(0,Te.Et)(a.Evv,"getLocation")(((e,t)=>3==e?{mode:"pixel",bottom:be[t||"normal"]}:4==e?{mode:"pixel",bottom:be[t||"normal"],right:"16"}:void 0)),s=(0,Te.Et)(a.Evv,"getDelayTime")((e=>e?{delayTimeMs:e}:{})),c=(0,Te.Et)(a.Evv,"processAnimationImage");e.processAnimationImage=c(((e,t)=>{if(!e.image)return t;return(0,V.BH)(t,V.Oz.byName("animation-decorator"),(t=>{if(e.image.suppress)return{};const{animation:r}=e.image,o={...t,animationType:ve[null==r?void 0:r.type]||t.animationType,animationConfig:{...t.animationConfig,...i(null==r?void 0:r.scaleFrom,null==r?void 0:r.scaleBy),...n(null==r?void 0:r.duration),...s(null==r?void 0:r.delayTimeMS)}};if((null==r||!r.scaleFrom)&&"scale-down"===o.animationType){const e=t.animationConfig.scaleFrom;t.animationConfig.scaleFrom=t.animationConfig.scaleTo,t.animationConfig.scaleTo=e}return o}))}));const d=(0,Te.Et)(a.Evv,"processFreeShipping");e.processFreeShipping=d(((e,t)=>{if(!e.shipping||e.shipping.suppress)return t;const{color:n,location:i}=e.shipping,a=Se[e.shipping.icon],s=(0,V.Tb)(t,"div-wrapper",{layout:{...r(i)}});return(0,V.Tb)(s,"free-shipping",{fontFamily:fe[e.font],color:ye[n||"1"],icon:a,layout:{...o(i)}})}));const l=(0,Te.Et)(a.Evv,"processRating");e.processRating=l(((e,t)=>{if(!e.ratings||e.ratings.suppress)return t;const{color:n,elementStyle:i,elementSize:a,location:s,displayReviewCount:c}=e.ratings,d=Ce[a],l=(0,V.Tb)(t,"div-wrapper",{layout:{...r(s)}});return(0,V.Tb)(l,"rating",{fontFamily:fe[e.font],color:ye[n||"1"],elementStyle:we[i],elementSize:d,displayReviewCount:c,layout:{...o(s,d)}})}));const u=(0,Te.Et)(a.Evv,"processTitle");e.processTitle=u(((e,t)=>(0,V.Tb)(t,"ad-title",{fontFamily:fe[e.font]})))}(xe||(xe={}));const Me=[xe.processDecorations,xe.processTitle],Le=(0,Te.Et)(a.Evv,"processPersonalizedConfig")(((e,t,n,i=Me)=>{const r=Ee(e,t);return r?(0,m.Z)(i,((e,t)=>t(r,e)),n):n})),De=(0,Te.Et)(a.Evv,"removeAssets")((e=>{for(const s of e.items){var t,n,i;if(!(e.enableNativeAdWC||null!=e&&null!==(t=e.template)&&void 0!==t&&t.enableVA)){var r,o;null===(r=s.assets)||void 0===r||delete r.price,null===(o=s.assets)||void 0===o||delete o.salePrice;continue}const c=null===(n=s.ext)||void 0===n||null===(i=n.adCreative)||void 0===i?void 0:i.templateConfig;if(c){const{price:e,saleprice:t}=c;var a;if(null!=e&&e.suppress)null===(a=s.assets)||void 0===a||delete a.price;null!=t&&t.suppress&&delete s.assets.salePrice}}return e})),Re=(0,Te.Et)(a.Evv,"processConfig")(((e,t,n)=>Le(e,t,n,[xe.processTitle,xe.processAnimationImage,xe.processDecorations,xe.processFreeShipping,xe.processRating]))),Fe={configType:"prg-ani-img",qualifier:(e,t)=>Pe(t,"animatedimageryinf")||Pe(t,"animatedimageryriver"),region:[y.yp.river,y.yp.resriver,y.yp.infopane,y.yp.resinfopane],template:o.SI.AnimatedImagery,supportedAssets:[r.aT.price,r.aT.salePrice],dynamicRenderingConfig:e=>"infopane"===e.region||"resinfopane"===e.region?Re(e,"animatedimageryinf",me):Re(e,"animatedimageryriver",ge),modifier:(e,t)=>{De(t)}},Oe=(0,V.RM)(se.$,"gradient-mask",{name:"gradient-mask",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:2},children:[{name:"div",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,flex:1,alignItems:ee.CENTER},children:[{name:"ad-title",lineHeight:"28",titleFontSize:"20",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,flex:1,alignItems:ee.CENTER,bottom:"52",zIndex:2}},{name:"call-to-action",layout:{mode:"flex",display:X.FLEX,paddingRight:"16"}}]}]}),Be={configType:"prg-ad-cta",region:[...y.Fg],requiredAssetsAll:[r.aT.price],template:o.SI.CallToAction,supportedAssets:[r.aT.price,r.aT.salePrice],dynamicRenderingConfig:()=>Oe},Ne=(0,V.RM)(se.$,"gradient-mask",{name:"gradient-mask",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:4},children:[{name:"div",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,flex:1,alignItems:ee.CENTER},children:[{name:"ad-title",lineHeight:"28",titleFontSize:"20",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,flex:1,alignItems:ee.CENTER,bottom:"52",zIndex:2}},{name:"ad-title-mask"},{name:"call-to-action",ctaMode:"arrow",backgroundColor:"#C6C0BA",color:"#000000;",layout:{mode:"flex",display:X.FLEX,paddingRight:"16"}}]}]}),$e={configType:"prg-ad-cta-ic",region:[...y.Fg],requiredAssetsAll:[r.aT.price],template:o.SI.CallToActionIcon,dynamicRenderingConfig:()=>Ne},Ue={configType:"prg-ad-cta-lm",region:[...y.Fg],requiredAssetsAll:[r.aT.price],template:o.SI.CallToActionLearnMore,dynamicRenderingConfig:()=>Oe},_e=(0,V.RM)(Oe,"call-to-action",{name:"call-to-action",backgroundColor:"#C6C0BA",color:"#000000;",layout:{mode:"flex",display:X.FLEX,paddingRight:"16"}}),He={configType:"prg-ad-cta-lmd",region:[...y.Fg],requiredAssetsAll:[r.aT.price],template:o.SI.CallToActionDarkMode,dynamicRenderingConfig:()=>_e},We=(0,V.As)(Oe,["call-to-action","product-image"],[{name:"call-to-action",ctaMode:"mask"},{name:"product-image",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"225",zIndex:1},imageMaskOn:!1}]),qe={configType:"prg-ad-cta-m",region:[...y.Fg],requiredAssetsAll:[r.aT.price],template:o.SI.CallToActionMaskMode,supportedAssets:[r.aT.price,r.aT.salePrice],dynamicRenderingConfig:()=>We},Ve={configType:"prg-ad-cta-st",region:[...y.Fg],requiredAssetsAll:[r.aT.price,r.aT.shortTitle],template:o.SI.CallToActionShortTitle,dynamicRenderingConfig:()=>_e},Ge={configType:"prg-ad-ctav2",region:[...y.Fg],template:o.SI.CallToActionV2,dynamicRenderingConfig:()=>Ne},ze=[{configType:"prg-ad-logo-c",template:o.SI.LogoControl,region:[...y.Fg],qualifier:(e,t)=>{var n,i,r,o;return!(null===(n=t.items)||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.assets)||void 0===r||null===(o=r.logo)||void 0===o||!o.url)},requiredAssetsAll:[r.aT.logo]},{configType:"prg-ad-z-c",template:o.SI.ZIndexControl,region:[y.yp.river],qualifier:(e,t)=>(0,y.Ue)(t),requiredAssetsAll:[r.aT.transparentImage]},{configType:"prg-promo-ndr-c",template:o.SI.SpecialOfferControl,region:[...y.Fg],requiredAssetsAll:[r.aT.specialOffer]},{configType:"prg-fship-c",template:o.SI.FreeShippingControl,region:[y.yp.river],requiredAssetsAll:[r.aT.freeShipping]},{configType:"prg-rating-c",template:o.SI.RatingControl,region:[y.yp.river],requiredAssetsAll:[r.aT.rating]},{configType:"prg-trendingc",template:o.SI.TrendingControl,region:[...y.Fg],requiredAssetsAll:[r.aT.viewed]},{configType:"prg-ad-cta-c",template:o.SI.CallToActionControl,region:[...y.Fg],requiredAssetsAll:[r.aT.price]},{configType:"prg-ad-s-title-c",template:o.SI.ShortTitleControl,region:[y.yp.river],qualifier:(e,t)=>{var n,i,r;return!(null===(n=t.items)||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.assets)||void 0===r||!r.shortTitle)},requiredAssetsAll:[r.aT.shortTitle]},{configType:"prg-ad-sh-v1-c",template:o.SI.SaleHighlightV1Control,region:[...y.Fg,...y.cE],requiredAssetsAll:[r.aT.price,r.aT.salePrice,r.aT.discount],discountThreshold:y.XP.saleHighlight15,maxAdCount:1},{configType:"prg-ad-sh-v3v4-c",template:o.SI.SaleHighlightV3V4Control,region:[...y.Fg],qualifier:(e,t)=>(0,y.Ue)(t),requiredAssetsAll:[r.aT.price,r.aT.salePrice,r.aT.discount,r.aT.transparentImage],discountThreshold:y.XP.saleHighlight15,maxAdCount:1},{configType:"prg-ad-combo-c",region:[...y.Fg],template:(e,t)=>(0,y.J2)(t),requiredAssetsAny:[r.aT.rating,r.aT.specialOffer,r.aT.freeShipping]},{configType:"prg-ad-condition-c",region:[y.yp.river],template:o.SI.ConditionNonDRControl,requiredAssetsAll:[r.aT.condition]},{configType:"prg-ad-return-c",region:[y.yp.river],template:o.SI.ReturnPolicyNonDRControl,requiredAssetsAll:[r.aT.returnPolicy]},{configType:"prg-ad-sold-c",region:[y.yp.river],template:o.SI.SoldNonDRControl,requiredAssetsAll:[r.aT.sold]},{configType:"prg-ad-combo-t-c",region:[...y.Fg],template:(e,t)=>(0,y.ZV)(t),requiredAssetsAny:[r.aT.sold,r.aT.returnPolicy,r.aT.condition]},{configType:"prg-ad-ris1-c",region:y.Fg,supportedAssets:[r.aT.price],modifier:(e,t)=>{(0,y.dj)(t,!0)}},{configType:"prg-ad-desc-c",region:y.Fg,template:(e,t)=>(0,y.PY)(t)},{configType:"prg-ad-gpt-title-c",region:[y.yp.infopane,y.yp.river],requiredAssetsAll:[r.aT.shortTitle],template:o.SI.GPTTitle},{configType:"prg-ad-align-rf",region:y.Fg,template:(e,t)=>o.SI.AlignmentRF},{configType:"prg-ad-ai-imgs-c",region:[...y.Fg,...y.cE],template:o.SI.AIImg,requiredAssetsAll:[r.aT.transparentImage]},{configType:"prg-ad-ai-imgf-c",region:[...y.Fg,...y.cE],template:o.SI.AIImg,requiredAssetsAll:[r.aT.transparentImage]}],je={configType:"default",region:[y.yp.infopane,y.yp.resinfopane],maxAdCount:2,template:(e,t)=>t.enableNativeAdWC?o.SI.AnimatedImagery:o.SI.Default,supportedAssets:[],dynamicRenderingConfig:e=>{if(e.enableNativeAdWC)return Re(e,"animatedimageryinf",me)},modifier:(e,t)=>{De(t)}},Ke={configType:"default",region:[y.yp.river,y.yp.resriver],template:o.SI.Default},Qe={configType:"prg-dr-combined",region:y.vn,template:(e,t)=>y.cE.includes(t.region)?o.SI.InfopaneDynamicRendering:o.SI.DecorationDynamic,dynamicRenderingConfig:e=>y.cE.includes(e.region)?ae.v:se.$,modifier:(e,t)=>{t.enableNativeAdWC=!0}},Ze={configType:"prg-ad-combo",region:[y.yp.river],template:(e,t)=>(0,y.JU)(t),requiredAssetsAny:[r.aT.freeShipping,r.aT.rating,r.aT.specialOffer],dynamicRenderingConfig:e=>(0,y.R)(e),modifier:(e,t)=>(0,y.$u)(t,!0)},Je={configType:"prg-dr-infopane",region:[y.yp.infopane,y.yp.resinfopane],maxAdCount:3,template:o.SI.InfopaneDynamicRendering,supportedAssets:[r.aT.rating,r.aT.freeShipping,r.aT.review],dynamicRenderingConfig:()=>ae.v},Xe=[{configType:"prg-ads-tel-i",region:y.cE,template:o.SI.DrPerf,dynamicRenderingConfig:()=>ae.v},{configType:"prg-ads-tel-r",region:y.Fg,template:o.SI.DrPerf,dynamicRenderingConfig:()=>se.$}],Ye={configType:"prg-ad-eb",region:[...y.Fg,...y.cE],template:o.SI.EliteBadge,requiredAssetsAll:[r.aT.eliteBadge],supportedAssets:[r.aT.eliteBadge],maxAdCount:3,dynamicRenderingConfig:e=>y.cE.includes(e.region)?ae.v:se.$},et=(0,V.ZV)(se.$,"gradient-mask",0,[{name:"div-wrapper",marginBottom:"8",marginLeft:"16",marginRight:"16",children:[{name:"free-shipping",color:"#036ac4",layout:{mode:"pixel",bottom:"265"}}]}]),tt={configType:"prg-dr-fship",qualifier:(e,t)=>Pe(t,"shippingriver"),region:[y.yp.river],template:o.SI.FreeShippingDR,requiredAssetsAll:[r.aT.freeShipping],dynamicRenderingConfig:e=>Re(e,"shippingriver",et)},nt={name:"highlight-rating-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:5},children:[...D.u,{layout:{mode:"pixel",bottom:"0",zIndex:2},children:[{name:"gradient-mask",paddingTop:"30",children:[{name:"div-wrapper",marginBottom:"10",children:[{name:"highlight-rating"}]},{name:"ad-title",oneLineTitle:!0}]}]}]}]},it={configType:"prg-wpo-h-rating",region:[y.yp.river],requiredAssetsAll:[r.aT.rating],template:o.SI.HighlightRating,supportedAssets:[r.aT.rating],dynamicRenderingConfig:()=>nt},rt=(0,V.It)(ae.v,["hover-mask","product-image"],[{layout:{mode:"pixel",filter:"contrast(115%)",left:"0",top:"0",width:"100%",height:"100%"}},{imageMaskOn:!1}]),ot=(0,V.It)(se.$,["hover-mask","product-image"],[{layout:{mode:"pixel",filter:"contrast(115%)",left:"0",top:"0",width:"100%",height:"100%"}},{imageMaskOn:!1}]),at={configType:"prg-ad-hover",region:[...y.vn],template:o.SI.Default,dynamicRenderingConfig:e=>y.cE.includes(null==e?void 0:e.region)?rt:ot},st={name:"default-infopane-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"100%",height:"100%"},children:[{name:"ad-title-mask",layout:{mode:"pixel",left:"0",top:"0",width:"100%",height:"100%",zIndex:4}},{name:"product-image",layout:{mode:"pixel",left:"0",top:"0",zIndex:1,width:"100%",height:"304"},imageMaskOn:!0,imageMaskOpacity:"0.1",trimBottom:!0},{name:"gradient-mask",paddingTop:"90",layout:{mode:"pixel",bottom:"0",width:"100%",zIndex:2},children:[{name:"ad-title",lineHeight:"36",titleFontSize:"28",oneLineTitle:!0}]},q.l]}]},ct={configType:"prg-infopaneDoubleCard19",region:y.cE,maxAdCount:3,template:o.SI.InfopaneDoubleCard_19by10,dynamicRenderingConfig:()=>st},dt=(0,V.It)(st,["footer","ad-title"],[{layout:{mode:"flex",flexDirection:"row",alignItems:"center",position:"absolute",bottom:"17",height:"31",width:"100%"}},{lineHeight:"44"}]),lt={configType:"prg-infopane-db",region:[y.yp.riverdb],maxAdCount:3,template:o.SI.InfopaneDoubleCard_19by10,dynamicRenderingConfig:()=>dt,modifier:(e,t)=>{t.enableNativeAdWC=!0}},ut=(0,V.FT)(se.$,"end-action-part",0,[{name:"like-button",layout:{zIndex:5}}]),pt={configType:"prg-ad-like",region:[y.yp.river,y.yp.resriver],template:o.SI.LikeButton,dynamicRenderingConfig:()=>ut},ht={name:"logo-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:5},children:[...D.u,{name:"gradient-mask",paddingTop:"120",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:2}},{name:"logo",width:"42",height:"42",layout:{mode:"pixel",left:"16",bottom:"49",zIndex:2}},{name:"logo-title-wrapper",layout:{mode:"pixel",left:"54",bottom:"54",zIndex:2},children:[{name:"logo-title-flex-wrapper",layout:{mode:"flex",height:"42",display:X.FLEX,flexDirection:J.ROW,flex:1,alignItems:ee.CENTER},children:[{name:"ad-title",titleFontSize:"20",twoLine:!0}]}]}]}]},gt={qualifier:(e,t)=>{var n,i,r,o;return!(null===(n=t.items)||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.assets)||void 0===r||null===(o=r.logo)||void 0===o||!o.url)},configType:"prg-ad-logo",region:[...y.Fg],template:o.SI.Logo,requiredAssetsAll:[r.aT.logo],dynamicRenderingConfig:()=>ht,modifier:(e,t)=>{t.items&&t.items[0]}},mt=(0,V.RM)(ht,"logo",{name:"logo",width:"42",height:"42",borderRadius:"6",layout:{mode:"pixel",left:"16",bottom:"49",zIndex:2}}),ft={qualifier:(e,t)=>{var n,i,r,o;return!(null===(n=t.items)||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.assets)||void 0===r||null===(o=r.logo)||void 0===o||!o.url)},configType:"prg-ad-logo-r",region:[...y.Fg],template:o.SI.LogoWithBorderRadius,requiredAssetsAll:[r.aT.logo],dynamicRenderingConfig:()=>mt},vt={configType:"prg-ad-combo2",region:y.Fg.concat(y.cE),template:(e,t)=>(0,y.uH)(t),requiredAssetsAny:[r.aT.rating,r.aT.specialOffer,r.aT.freeShipping,r.aT.discount],maxAdCount:1,modifier:(e,t)=>(0,y.$u)(t)},yt=(e,t)=>{const n=(0,V.As)(se.$,["gradient-mask","provider-name","ad-label"],[{name:"gradient-mask",peSeasonalColorMode:`peSeasonalColorMode${e}`,layout:{position:"absolute",bottom:"0",width:"300",zIndex:2},children:[{name:"ad-title"}]},{name:"provider-name",layout:{flex:1,minWidth:0,zIndex:5},customStyleClass:"white-12-flex-layout",adLabelTextOpacity:"1",isSeasonal:!0},{name:"ad-label",layout:{marginInlineStart:"16",marginInlineEnd:"6",zIndex:5},adLabelTextOpacity:"1",isSeasonal:!0}]);return(0,V.FT)(n,"default-template",3,[{name:"product-image",patternMode:`patternMode${t}`,useTransparentImage:!0,layout:{position:"absolute",bottom:0,width:"100%",height:121,zIndex:2,pointerEvents:"none"}}])},St=(yt("1","1"),yt("2","1"),yt("3","1"),yt("4","1"),yt("1","2"),yt("2","2"),yt("3","2"),yt("4","2"),{configType:"prg-ads-seasonal",qualifier:(e,t)=>Ct(t),region:[...y.Fg],template:(e,t)=>o.SI.PESeasonalAds,dynamicRenderingConfig:e=>{const t=(0,c.Z)(e,"items[0].ext.adCreative.templateConfig.seasonal.color"),n=(0,c.Z)(e,"items[0].ext.adCreative.templateConfig.seasonal.elementStyle");return yt(t,n)}}),Ct=(0,Te.Et)(a.Evv,"isPersonalizedAvailable")((e=>{var t,n,i,r;return"seasonal"===(0,c.Z)(e,"items[0].ext.adCreative.templateId")&&!(null===(t=e.items)||void 0===t||null===(n=t[0])||void 0===n||null===(i=n.ext)||void 0===i||null===(r=i.adCreative)||void 0===r||!r.templateConfig)&&!1===(0,c.Z)(e,"items[0].ext.adCreative.templateConfig.seasonal.suppress")})),wt={configType:"prg-ads-seav1",region:[...y.Fg],template:(e,t)=>o.SI.PESeasonalAdsV1,dynamicRenderingConfig:e=>yt("3","1")},bt={configType:"prg-ads-seav1-p",region:y.Fg,template:(e,t)=>o.SI.PESeasonalAdsV1P,qualifier:(e,t)=>t.providerId&&"bing"===t.providerId.toLowerCase(),dynamicRenderingConfig:e=>yt("3","1")},Tt=(0,V.FT)(se.$,"gradient-mask",0,[{name:"div-wrapper",marginBottom:"8",marginLeft:"16",marginRight:"16",children:[{name:"rating"}]}]),kt={name:"default-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[...D.u.filter((e=>"product-image"!==e.name)),{name:"product-image",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"225",zIndex:1},imageMaskOn:!0},{name:"gradient-mask",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:2},children:[{name:"ad-title"}]}]}]},Pt=e=>Pe(e,"shippingriver"),It={configType:"prg-ads-personal",qualifier:(e,t)=>Pt(t)||Pe(t,"ratingsriver"),region:[y.yp.river],template:(e,t)=>Pt(t)?o.SI.FreeShippingDR:o.SI.RatingDR,supportedAssets:[r.aT.freeShipping,r.aT.rating,r.aT.review],dynamicRenderingConfig:e=>{const t=Ie(e)?et:kt,n=Ae(e)?Tt:kt;return Pt(e)?Re(e,"shippingriver",t):Re(e,"ratingsriver",n)}},At={configType:"prg-wpo-deco-dr",region:[y.yp.river,y.yp.infopane,y.yp.resriver,y.yp.resinfopane],template:o.SI.DecorationDynamic,requiredAssetsAny:[r.aT.rating,r.aT.freeShipping,r.aT.review],dynamicRenderingConfig:()=>se.$},Et={configType:"prg-dr-rating",qualifier:(e,t)=>Pe(t,"ratingsriver"),region:[y.yp.river],template:o.SI.RatingDR,requiredAssetsAll:[r.aT.rating],supportedAssets:[r.aT.rating,r.aT.review],dynamicRenderingConfig:e=>Re(e,"ratingsriver",Tt)},xt=e=>(0,V.FT)(e?ae.v:se.$,e?"default-infopane-template":"default-template",0,[{name:"sale-highlight-badge",layout:{mode:"pixel",top:"16",left:"16",zIndex:2}}]),Mt=xt(!1),Lt=xt(!0),Dt={configType:"prg-ad-sh-v1",region:[...y.Fg,...y.cE],template:o.SI.SaleHighlightV1,requiredAssetsAll:[r.aT.price,r.aT.salePrice,r.aT.discount],discountThreshold:y.XP.saleHighlight15,maxAdCount:1,dynamicRenderingConfig:e=>y.cE.includes(e.region)?Lt:Mt},Rt={name:"sale-highlight-v3-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[...D.u.filter((e=>"product-image"!==e.name&&"background-image"!==e.name)),{name:"ad-title-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:4}},{name:"sh-content-wrapper",layout:{mode:"pixel",zIndex:1},children:[{name:"sale-highlight-flex-wrapper",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,width:"300",height:"304"},children:[{name:"sale-highlight-title",layout:{mode:"flex",display:X.FLEX,alignItems:ee.CENTER,width:"126",height:"183",marginInline:"8",marginTop:"10"}},{name:"product-image",useTransparentImage:!0,noDropShadow:!0,imageMaskOn:!0,imageMaskLeft:"0",imageMaskTop:"0",layout:{width:"150",height:"183",marginTop:"10"}}]}]},{name:"color-mask",layout:{mode:"pixel",left:"0",top:"0",width:"100%",height:"100%",zIndex:0},opacity:"0.4",alwaysPresent:!0},{name:"gradient-mask",isFullGradient:!1,useDynamicStyle:!0,paddingTop:"28",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:3},children:[{name:"ad-title"}]}]}]},Ft={name:"sale-highlight-v3-template",children:[...D.u.filter((e=>"product-image"!==e.name)),{name:"sale-highlight-horizontal-title",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,alignItems:ee.CENTER,justifyContent:Y.CENTER,width:"300",marginInline:"8",marginBottom:"10",zIndex:1,marginTop:19,position:"absolute"}},{name:"product-image",useTransparentImage:!0,noDropShadow:!0,imageMaskOn:!0,imageMaskLeft:0,imageMaskTop:0,imageMaskHeight:304,imageMaskWidth:300,layout:{position:"absolute",width:"236",height:"118",left:"32",top:"77",zIndex:1}},{name:"color-mask",layout:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:0},opacity:"0.4",alwaysPresent:!0},{name:"gradient-mask",isFullGradient:!1,useDynamicStyle:!0,paddingTop:"28",layout:{position:"absolute",bottom:"0",width:"300",zIndex:2},children:[{name:"ad-title"}]}]},Ot={configType:"prg-ad-sh-v3",region:[...y.Fg],template:o.SI.SaleHighlightV3,qualifier:(e,t)=>(0,y.Ue)(t),requiredAssetsAll:[r.aT.price,r.aT.salePrice,r.aT.discount,r.aT.transparentImage],discountThreshold:y.XP.saleHighlight15,maxAdCount:1,dynamicRenderingConfig:e=>(0,y.Up)(e)?Rt:Ft},Bt={name:"sale-highlight-v4-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[{name:"ad-title-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:4}},{name:"sh-content-wrapper",layout:{mode:"pixel",zIndex:1},children:[{name:"sale-highlight-flex-wrapper",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,width:"300",height:"304"},children:[{name:"sale-highlight-title",layout:{mode:"flex",display:X.FLEX,alignItems:ee.CENTER,width:"126",height:"183",marginInline:"8",marginTop:"10"}},{name:"product-image",useTransparentImage:!0,noDropShadow:!0,imageMaskOn:!0,imageMaskLeft:"0",imageMaskTop:"0",layout:{adBackgroundColor:"#2E2E2E",width:"150",height:"183",marginTop:"10"}}]}]},{name:"color-mask",layout:{mode:"pixel",left:"0",top:"0",width:"100%",height:"100%",zIndex:0},opacity:"0.7",alwaysPresent:!0},{name:"gradient-mask",isFullGradient:!1,useDynamicStyle:!0,paddingTop:"28",background:"linear-gradient(var(--gradient-end-color) 0%, var(--gradient-mid-color) 20%, var(--ad-background-color) 30%, var(--ad-background-color) 100%)",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:3,neutralFillHoverColor:"#484848",neutralFillActiveColor:"#3B3B3B",neutralForegroundRestColor:"#FFFFFF",adBackgroundColor:"#2E2E2E",gradientMidColor:"rgba(46, 46, 46, 0.8)",gradientEndColor:"rgba(46, 46, 46, 0)"},children:[{name:"ad-title"}]},(0,V.Tb)(q.l,"footer",{layout:{mode:"flex",flexDirection:"row",alignItems:"center",position:"absolute",bottom:"9",height:"31",width:"100%",neutralFillHoverColor:"#484848",neutralFillActiveColor:"#3B3B3B",neutralForegroundRestColor:"#FFFFFF"}})]}]},Nt={name:"sale-highlight-v4-template",children:[...D.u.filter((e=>"product-image"!==e.name)),{name:"sale-highlight-horizontal-title",layout:{mode:"flex",display:X.FLEX,flexDirection:J.ROW,alignItems:ee.CENTER,justifyContent:Y.CENTER,width:"300",marginInline:"8",marginBottom:"10",zIndex:1,marginTop:19,position:"absolute"}},{name:"product-image",useTransparentImage:!0,noDropShadow:!0,imageMaskOn:!0,imageMaskLeft:0,imageMaskTop:0,imageMaskHeight:304,imageMaskWidth:300,layout:{position:"absolute",width:"236",height:"118",left:"32",top:"77",zIndex:1,adBackgroundColor:"#2E2E2E"}},{name:"color-mask",layout:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:0},opacity:"0.4",alwaysPresent:!0},{name:"gradient-mask",isFullGradient:!1,useDynamicStyle:!0,paddingTop:"28",background:"linear-gradient(var(--gradient-end-color) 0%, var(--gradient-mid-color) 20%, var(--ad-background-color) 30%, var(--ad-background-color) 100%)",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:3,neutralFillHoverColor:"#484848",neutralFillActiveColor:"#3B3B3B",neutralForegroundRestColor:"#FFFFFF",adBackgroundColor:"#2E2E2E",gradientMidColor:"rgba(46, 46, 46, 0.8)",gradientEndColor:"rgba(46, 46, 46, 0)"},children:[{name:"ad-title"}]},(0,V.Tb)(q.l,"footer",{layout:{mode:"flex",flexDirection:"row",alignItems:"center",position:"absolute",bottom:"9",height:"31",width:"100%",neutralFillHoverColor:"#484848",neutralFillActiveColor:"#3B3B3B",neutralForegroundRestColor:"#FFFFFF"}})]},$t={configType:"prg-ad-sh-v4",region:[...y.Fg],template:o.SI.SaleHighlightV4,qualifier:(e,t)=>(0,y.Ue)(t),requiredAssetsAll:[r.aT.price,r.aT.salePrice,r.aT.discount,r.aT.transparentImage],discountThreshold:y.XP.saleHighlight15,maxAdCount:1,dynamicRenderingConfig:e=>(0,y.Up)(e)?Bt:Nt},Ut={qualifier:(e,t)=>{var n,i,r;return!(null===(n=t.items)||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.assets)||void 0===r||!r.shortTitle)},configType:"prg-ad-gpt-title",region:[y.yp.infopane,y.yp.river],requiredAssetsAll:[r.aT.shortTitle],template:o.SI.GPTTitle,modifier:(e,t)=>{var n,i;t.items&&t.items[0]&&null!==(n=t.items[0])&&void 0!==n&&null!==(i=n.assets)&&void 0!==i&&i.shortTitle&&(t.items[0].title=t.items[0].assets.shortTitle)}},_t={configType:"prg-wpo-ss",region:[y.yp.river],template:o.SI.Slideshow,modifier:(e,t)=>{t.slideshowProps=t.template.slideshowProps={autoScroll:!0,autoScrollIntervalMs:3e3,maxImageCount:5,enableSlideshowMediaControls:!0}},multiImage:!0},Ht={name:"spotlight-image-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[...D.u.filter((e=>"product-image"!==e.name)),{name:"product-image",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:1},imageMaskOn:!0},{name:"spotlight-background",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304",zIndex:0}},{name:"gradient-mask",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:2},paddingBottom:"0"}]}]},Wt={configType:"prg-wpo-sl",region:[y.yp.river],template:o.SI.Spotlight,supportedAssets:[],supportedImageRatios:[o.hb._1by1,o.hb._3by4,o.hb._4by3],targetImageRatio:o.hb._1by1,dynamicRenderingConfig:()=>Ht},qt={...se.$,userActionLogger:"PrgTitle2"},Vt={configType:"prg-title-2",region:y.Fg,template:o.SI.TitleMaxLine2,dynamicRenderingConfig:()=>qt},Gt={...se.$,userActionLogger:"PrgTitle2C"},zt={configType:"prg-title-2-c",region:y.Fg,template:o.SI.TitleMaxLine2C,dynamicRenderingConfig:()=>Gt},jt=(0,V.RM)(se.$,"gradient-mask",{name:"gradient-mask",layout:{position:"absolute",bottom:"0",width:"300",zIndex:2},children:[{name:"trending",layout:{position:"relative",zIndex:5}},{name:"ad-title"}]}),Kt={configType:"prg-trending",region:[...y.Fg],template:o.SI.Trending,requiredAssetsAll:[r.aT.viewed],dynamicRenderingConfig:()=>jt},Qt={name:"zindex-v2-original-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[...D.u.filter((e=>"product-image"!==e.name&&"background-image"!==e.name)),{name:"product-image",layout:{mode:"pixel",left:"24",top:"20",width:"252",height:"150",zIndex:2},useTransparentImage:!0},{name:"gradient-mask",layout:{mode:"pixel",bottom:"0",width:"300",height:"304",zIndex:1},isFullGradient:!0},{name:"color-mask",layout:{mode:"pixel",left:"0",top:"0",width:"100%",height:"100%",zIndex:2},opacity:"0.3"},{name:"div",layout:{mode:"pixel",bottom:"45",width:"300",zIndex:2},children:[{name:"ad-title"}]}]}]},Zt={configType:"prg-ad-zv2-o",region:[y.yp.river],qualifier:(e,t)=>(0,y.Ue)(t),template:o.SI.ZIndexV2Original,requiredAssetsAll:[r.aT.transparentImage],dynamicRenderingConfig:()=>Qt},Jt={name:"zindex-v2-polygon-template",children:[{name:"hover-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"304"},children:[...D.u.filter((e=>"product-image"!==e.name&&"background-image"!==e.name)),{name:"color-mask",layout:{mode:"pixel",left:"0",top:"0",width:"100%",height:"100%",zIndex:1},opacity:"0.4",alwaysPresent:!0},{name:"product-image",layout:{mode:"pixel",left:"24",top:"20",width:"252",height:"150",zIndex:2},useTransparentImage:!0},{name:"polygon-mask",layout:{mode:"pixel",left:"0",top:"0",width:"300",height:"225",zIndex:2}},{name:"color-mask",layout:{mode:"pixel",left:"0",top:"0",width:"100%",height:"100%",zIndex:2},opacity:"0.3"},{name:"gradient-mask",layout:{mode:"pixel",bottom:"0",width:"300",zIndex:2},children:[{name:"ad-title"}],isRadialMask:!0}]}]},Xt={configType:"prg-ad-zv2-p",region:[y.yp.river],qualifier:(e,t)=>(0,y.Ue)(t),template:o.SI.ZIndexV2Polygon,requiredAssetsAll:[r.aT.transparentImage],dynamicRenderingConfig:()=>Jt},Yt={configType:"prg-ad-combo-txt",region:[...y.Fg],template:(e,t)=>(0,y.xP)(t),requiredAssetsAny:[r.aT.sold,r.aT.returnPolicy,r.aT.condition],modifier:(e,t)=>(0,y.E5)(t)},en={configType:"prg-ad-ris1",region:y.Fg,supportedAssets:[r.aT.price],modifier:(e,t)=>{(0,y.dj)(t)}},tn=[{configType:"prg-ad-desc-wide-1",region:y.Fz,template:(e,t)=>(0,y.PY)(t)},{configType:"prg-ad-desc-wide-2",region:y.Fz,template:(e,t)=>(0,y.PY)(t)}],nn=[o.SI.GeometricAdWaves1,o.SI.GeometricAdWaves3,o.SI.GeometricAdWaves4,o.SI.GeometricAdNature3,o.SI.GeometricAdSparkles1,o.SI.GeometricAdSparkles2,o.SI.GeometricAdSparkles3,o.SI.GeometricAdSparkles4,o.SI.GeometricAdSparkles5],rn=[{configType:"prg-ad-geometric",region:[...y.Fg],modifier:(e,t)=>{(0,y.rf)(t,nn,o.SI.Default,t.template.seasonalAdTemplateConfig.density)}}],on={configType:"prg-ad-ai-img",region:[...y.Fg,...y.cE],template:o.SI.AIImg,requiredAssetsAll:[r.aT.transparentImage],modifier:(e,t)=>{(0,y.Gu)(t)}},an=[O,B,U,_,je,Ke,At,Fe,_t,Vt,zt,it,gt,ft,Ut,Be,$e,Ue,He,Ve,qe,Ge,Je,ct,lt,Zt,Xt,Wt,K,Z,z,re,oe,ue,...de,...Xe,T,k,E,x,M,L,C,w,b,S,A,P,I,Qe,tt,Ye,Et,It,pt,at,Kt,Dt,Ot,$t,Ze,vt,H,W,St,wt,bt,Yt,en,on,...rn,...tn,...ze];var sn=n(87851),cn=n(78931),dn=n(94921),ln=n(95623);class un{constructor(){this.filterConfigs=(e,t=[])=>(0,cn.Z)([...an,...t],(t=>(0,dn.Z)([...sn.Sj,t.qualifier],(n=>!n||n(t,e))))),this.fallbackConfig=e=>y.cE.includes(e.region)?je:Ke,this.pickConfigByWeight=e=>{let t=0;(0,g.Z)(e,(e=>{t=t+e.weight||y.KB}));const n=Math.floor(Math.random()*t);let i=0;for(let t=0;t<e.length;++t)if(i+=e[t].weight||y.KB,n<i)return e[t]},this.preProcess=e=>{(0,g.Z)(e.items,(e=>{e.assets&&(this.calculateDiscount(e.assets),this.filterRatings(e.assets))})),(0,ln.dO)(e)},this.postProcess=(e,t)=>{(0,g.Z)([...sn.F8,e.modifier],(n=>null==n?void 0:n(e,t)))},this.calculateDiscount=e=>{const t=e.price,n=e.salePrice;if(t&&n){const i=Number(t.replace(/[^0-9.-]+/g,"")),r=Number(n.replace(/[^0-9.-]+/g,""));e.discount=Math.floor((i-r)/i*100)}},this.filterRatings=e=>{e&&e.rating&&(isNaN(parseInt(e.rating))||parseInt(e.rating)<=6)&&(e.rating=void 0)}}selectTemplate(e,t=[]){this.preProcess(e);const n=this.filterConfigs(e,t),i=n&&n.length>0?this.pickConfigByWeight(n):this.fallbackConfig(e);this.postProcess(i,e)}}var pn=n(92100);class hn{}hn.concat=(e,t)=>`${e}.${t}`,hn.identity=e=>t=>hn.concat(e,t),hn.boolean=e=>t=>t?hn.concat(e,"1"):null;class gn{constructor(){this._availableAssets="",this._displayedAssets=""}get availableAssets(){return this._availableAssets}get displayedAssets(){return this._displayedAssets}setAvailableAssets(e){var t,n;(null!==(t=e.items)&&void 0!==t&&null!==(n=t[0])&&void 0!==n&&n.assets||(0,c.Z)(e,"items[0].ext.adCreative.templateConfig"))&&(this._availableAssets=this.concatAssets(e))}setDisplayedAssets(e){var t,n;null!==(t=e.items)&&void 0!==t&&null!==(n=t[0])&&void 0!==n&&n.assets&&(this._displayedAssets=this.concatAssets(e))}concatAssets(e){let t="";(0,c.Z)(e,"items[0].assets")&&(t=(0,d.Z)(Object.keys(e.items[0].assets),(e=>{const t=r.aT[e].split("-");return"data"==(null==t?void 0:t[0])?t[1]:"image"==(null==t?void 0:t[0])?`i${t[1]}`:void 0})).join("_"));const n=(0,c.Z)(e,"items[0].ext.adCreative.templateConfig");if(!n)return t;let i="";n&&(i=(0,d.Z)(Object.keys(n),(e=>r.XY[e])).join("_"));return t+(t&&i?"_":"")+i}}(0,i.gn)([(0,Te.Et)(a.NMS,"setAvailableAssets")],gn.prototype,"setAvailableAssets",null),(0,i.gn)([(0,Te.Et)(a.NMS,"setDisplayedAssets")],gn.prototype,"setDisplayedAssets",null),(0,i.gn)([(0,Te.Et)(a.NMS,"concatAssets")],gn.prototype,"concatAssets",null);const mn={templateType:hn.identity("type"),animatedImage:hn.identity("ani"),flipZIndex:hn.boolean("fz"),landscapeOverlay:hn.boolean("lo")};class fn{constructor(){this.hasAnyInlineDecoration=e=>{if(e.items&&0!==e.items.length){if(e.items[0]&&e.items[0].assets){const t=e.items[0].assets;return!!(t.price||t.salePrice||t.installmentPrice||t.rating||t.review||t.priceDrop||t.viewed||t.freeShipping||t.discount)}return!1}return!1}}updateTemplate(e,t={}){const n=(0,l.Z)(e);try{this.updateTemplateInternal(e,t)}catch(t){(0,s.OO)(t,a.NMS,"Fail to apply template service on placement"),e=void 0,e=(0,l.Z)(n)}}updateTemplateInternal(e,t){var n;if(!e)return;ke(e),this.decorationBeaconBuilder=new gn,this.decorationBeaconBuilder.setAvailableAssets(e);const i=(0,u.Z)({},t,o.j3);if(i.configType){e.template=i;(new un).selectTemplate(e)}else e.template=this.processConfig(e,i),this.resetTempateTypeForInfopaneInMultiAds(e),this.filterAssetByFlight(e),this.updatePlacementImageSize(e),this.updateTemplateTypeForPriceDiscount(e);this.updateBeacon(e),null!=e&&null!==(n=e.template)&&void 0!==n&&n.templateType&&e.template.templateType.endsWith("-c")&&(e.template.templateType=o.SI.Default,this.filterAssetByFlight(e))}processConfig(e,t){const n=t;if(this.updateAllowedAssetsAndTemplateForInfopane(e,n),this.updateTemplateInfoForDRInfopane(e,n),n.templateType!==o.SI.Slideshow&&n.templateType!==o.SI.PseudoVideo||this.updateSlideshowTemplateType(e,t,n),n.templateType===o.SI.PatternOverlay){"225"===this.getItemImageSize(e).height?n.landscapeOverlay=!1:n.templateType=o.SI.Default}return n.templateType===o.SI.Default&&e.items&&e.items.length>3&&n.adCarousel&&(n.templateType=o.SI.AdCarousel),this.updateTemplateInfoForBrandStory(e,n),n}updatePlacementImageSize(e){if(e.template.templateType===o.SI.PatternOverlay){const t=this.getItemImageSize(e);e.imageWidth=(0,c.Z)(e,"imageWidth",t.width),e.imageHeight=(0,c.Z)(e,"imageHeight",t.height)}}updateBeacon(e){const t=t=>{if(t.includes("srtb.msn.com")){const n=new URL(t);return this.addOrUpdateUrlQueryParam(n,"t",this.serializeTemplateConfig(e)),this.decorationBeaconBuilder.setDisplayedAssets(e),this.decorationBeaconBuilder.availableAssets&&this.addOrUpdateUrlQueryParam(n,"dec",this.decorationBeaconBuilder.availableAssets+"-"+this.decorationBeaconBuilder.displayedAssets),n.href}return t};if(!(0,p.Z)(e.beaconsJson)){const n=JSON.parse(e.beaconsJson);n&&((0,h.Z)(n.trb)&&(n.trb=n.trb.map((e=>t(e)))),(0,h.Z)(n.tvb)&&(n.tvb=n.tvb.map((e=>t(e)))),e.beaconsJson=JSON.stringify(n))}e&&(0,h.Z)(e.items)&&(0,g.Z)(e.items,(e=>{if(!(0,p.Z)(e.clickBeacons)){const n=JSON.parse(e.clickBeacons);n&&((0,h.Z)(n.tcb)&&(n.tcb=n.tcb.map((e=>t(e)))),e.clickBeacons=JSON.stringify(n))}}))}serializeTemplateConfig(e){return e.items&&e.items.length>0&&e.items[0].video?e.items[0].verificationParameters?o.SI.VideoIAS:o.SI.Video:(0,m.Z)(mn,((t,n,i)=>{const r=(0,c.Z)(e.template,i);if(r){const e=n(r);if(e)return""===t?e:`${t}_${e}`}return t}),"")}addOrUpdateUrlQueryParam(e,t,n){return pn.c.getQueryParameterByName(t,e.href)?pn.c.updateSearchParam(e,t,n):pn.c.appendSearchParam(e,t,n)}updateSlideshowTemplateType(e,t,n){e&&e.items&&e.items[0]&&e.items[0].images&&e.items[0].images.length>1?(n.templateType=t.templateType,e.slideshowProps=n.slideshowProps):(n.templateType=o.SI.Default,n.slideshowProps=void 0)}getItemImageSize(e){const t=(0,f.Z)(e.items);return(0,p.Z)(t)?{}:{width:`${(0,c.Z)(t,"imageWidth")}`,height:`${(0,c.Z)(t,"imageHeight")}`}}calculateDiscount(e){const t=e.price,n=e.salePrice;if(t&&n){const i=Number(t.replace(/[^0-9.-]+/g,"")),r=Number(n.replace(/[^0-9.-]+/g,""));e.discount=Math.floor((i-r)/i*100)}}filterAssetByFlight(e){if(e&&e.items&&e.items[0]&&e.items[0].assets){var t;this.calculateDiscount(e.items[0].assets);const n=(0,v.Z)((0,h.Z)(null===(t=e.template)||void 0===t?void 0:t.allowedAssets)?[...r.fs,...e.template.allowedAssets]:r.fs),i=(0,m.Z)(e.items[0].assets,((e,t,i)=>(n.includes(r.aT[i])&&(e[i]=t),e)),{});e.items[0].assets=i}}resetTempateTypeForInfopaneInMultiAds(e){"infopane"===e.region&&e.items&&e.items.length>1&&e.template.templateType!==o.SI.InfopaneDynamicRendering&&(e.template.templateType=o.SI.Default,e.template.animatedImage="")}isValidProviderNameForBrand(e){if(!(e&&e.items&&e.items[0]&&e.items[0].providerName))return!1;const t=e.items[0].providerName;return-1===t.indexOf("/")&&t.length<20}updateAllowedAssetsAndTemplateForInfopane(e,t){t.templateType!==o.SI.BrandStory&&t.templateType!==o.SI.BrandStoryNoDeco&&t.templateType!==o.SI.BrandStoryNoProgressiveDisplay&&t.templateType!==o.SI.HotspotSingle&&t.templateType!==o.SI.DiscountScribble&&t.templateType!==o.SI.ContentReveal&&t.templateType!==o.SI.Gamification||"infopane"===e.region&&(t.allowedAssets=void 0,t.templateType=o.SI.Default)}updateTemplateInfoForBrandStory(e,t){var n,i,r,a;t.templateType!==o.SI.BrandStory&&t.templateType!==o.SI.BrandStoryNoDeco&&t.templateType!==o.SI.BrandStoryNoProgressiveDisplay||((null===(n=e.items)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.description)===(null===(r=e.items)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.providerName)&&(e.items[0].description=null),this.isValidProviderNameForBrand(e)||(t.templateType=o.SI.Default,t.allowedAssets=void 0))}updateTemplateTypeForPriceDiscount(e){var t,n,i,r,a,s,c;const{Default:d,HotspotSingle:l,BrandStory:u,DiscountScribble:p,ContentReveal:h,Gamification:g}=o.SI;if(!((null===(t=e.items)||void 0===t||null===(n=t[0])||void 0===n||null===(i=n.assets)||void 0===i?void 0:i.discount)>=(null===(r=e.template)||void 0===r?void 0:r.discountThreshold))){var m,f,v,y,S,C,w,b,T,k,P,I;if([l,p,g].includes(null===(a=e.template)||void 0===a?void 0:a.templateType)&&(e.template.templateType=d,e.template.allowedAssets=void 0,e.items[0].assets={}),(null===(s=e.template)||void 0===s?void 0:s.templateType)===h)null===(m=e.items)||void 0===m||(null===(f=m[0])||void 0===f||(null===(v=f.assets)||void 0===v||delete v.discount)),(null===(y=e.items)||void 0===y||null===(S=y[0])||void 0===S?void 0:S.description)===(null===(C=e.items)||void 0===C||null===(w=C[0])||void 0===w?void 0:w.providerName)&&(e.items[0].description=null),null!==(b=e.items)&&void 0!==b&&null!==(T=b[0])&&void 0!==T&&T.description||this.hasAnyInlineDecoration(e)||(e.template.templateType=d,e.template.allowedAssets=void 0);if((null===(c=e.template)||void 0===c?void 0:c.templateType)===u)null===(k=e.items)||void 0===k||(null===(P=k[0])||void 0===P||(null===(I=P.assets)||void 0===I||delete I.discount))}}updateTemplateInfoForDRInfopane(e,t){"river"===e.region||"infopane"==e.region&&t.templateType===o.SI.InfopaneDynamicRendering||(t.templateType=o.SI.Default),"river"===e.region&&t.templateType===o.SI.InfopaneDynamicRendering&&(t.templateType=o.SI.Default)}}(0,i.gn)([(0,Te.Et)(a.NMS,"updateTemplate")],fn.prototype,"updateTemplate",null),(0,i.gn)([(0,Te.Et)(a.NMS,"updateTemplateInternal")],fn.prototype,"updateTemplateInternal",null),(0,i.gn)([(0,Te.Et)(a.NMS,"processConfig")],fn.prototype,"processConfig",null),(0,i.gn)([(0,Te.Et)(a.NMS,"updatePlacementImageSize")],fn.prototype,"updatePlacementImageSize",null),(0,i.gn)([(0,Te.Et)(a.NMS,"updateBeacon")],fn.prototype,"updateBeacon",null),(0,i.gn)([(0,Te.Et)(a.NMS,"serializeTemplateConfig")],fn.prototype,"serializeTemplateConfig",null),(0,i.gn)([(0,Te.Et)(a.NMS,"addOrUpdateQueryParam")],fn.prototype,"addOrUpdateUrlQueryParam",null),(0,i.gn)([(0,Te.Et)(a.NMS,"updateSlideshowTemplateType")],fn.prototype,"updateSlideshowTemplateType",null),(0,i.gn)([(0,Te.Et)(a.NMS,"getItemImageSize")],fn.prototype,"getItemImageSize",null),(0,i.gn)([(0,Te.Et)(a.NMS,"calculateDiscount")],fn.prototype,"calculateDiscount",null),(0,i.gn)([(0,Te.Et)(a.NMS,"filterAssetByFlight")],fn.prototype,"filterAssetByFlight",null),(0,i.gn)([(0,Te.Et)(a.NMS,"resetTempateTypeForInfopaneInMultiAds")],fn.prototype,"resetTempateTypeForInfopaneInMultiAds",null),(0,i.gn)([(0,Te.Et)(a.NMS,"isValidProviderNameForBrand",(()=>!1))],fn.prototype,"isValidProviderNameForBrand",null),(0,i.gn)([(0,Te.Et)(a.NMS,"updateAllowedAssetsAndTemplateForInfopane")],fn.prototype,"updateAllowedAssetsAndTemplateForInfopane",null),(0,i.gn)([(0,Te.Et)(a.NMS,"updateTemplateInfoForBrandStory")],fn.prototype,"updateTemplateInfoForBrandStory",null),(0,i.gn)([(0,Te.Et)(a.NMS,"updateTemplateTypeForPriceDiscount")],fn.prototype,"updateTemplateTypeForPriceDiscount",null),(0,i.gn)([(0,Te.Et)(a.NMS,"hasAnyInlineDecoration")],fn.prototype,"hasAnyInlineDecoration",void 0),(0,i.gn)([(0,Te.Et)(a.NMS,"updateTemplateInfoForDRInfopane")],fn.prototype,"updateTemplateInfoForDRInfopane",null)},8991:function(e,t,n){"use strict";n.d(t,{dQ:function(){return p}});var i=n(13334),r=n(23549),o=n(88826),a=n(7476),s=n(61633),c=n(31558);const d={180:"101",270:"102",360:"103",540:"104",720:"105",1080:"107"};function l(e,t,n,o,a,c){var d,l,u,p,h,g,m,f,v,y;if(!e||!t)return;const S=e.target.parentElement,C=e.target.querySelector("video"),w=JSON.parse(null===(d=S.attributes["data-t"])||void 0===d?void 0:d.value).n,b=e.target.player,T=function(e){const t={AdStart:"AdPlayStarted",AdComplete:"AdPlayCompleted",EventPause:"Pause",ContentResume:"Resume",seeked:"Seek",error:"ContentError",canplay:"Canplay",canplaythrough:"Canplaythrough"};return t[e]&&(e=t[e]),s.Bs[e]}(t.name),k=t.data??{PlayerTechnology:"HTML5",VideoPlayerType:"HTML5"},P="video/mp4"===(null==b?void 0:b.currentType()),I={type:61,name:"nativeAds_"+w,ext:{videoCs:n,eventType:T,timeElasped:C.currentTime,videoFormatCode:P?Number(null==c?void 0:c.format):1006,title:o,videoDuration:null==b?void 0:b.duration(),fr:(null===i.Al||void 0===i.Al||null===(l=i.Al.ClientSettings)||void 0===l?void 0:l.geo_country)+"_"+(null===i.Al||void 0===i.Al||null===(u=i.Al.ClientSettings)||void 0===u?void 0:u.geo_city)+"_"+(null===i.Al||void 0===i.Al?void 0:i.Al.Locale)+"_"+a,pageGroup:"",playerInstanceId:e.target.id,playType:"pb",playerTech:k.PlayerTechnology,pluginVersion:k.PlayerTechnology,size:C.clientWidth+"x"+C.clientHeight,videoPlayerType:k.VideoPlayerType,playerType:k.PlayerTechnology,playDuration:C.currentTime,inline:!1,videoUrl:null==b?void 0:b.src(),errorType:t.name===s.pt.Error?null==b||null===(p=b.error())||void 0===p?void 0:p.code:null,errorDescription:t.name===s.pt.Error?null==b||null===(h=b.error())||void 0===h?void 0:h.message:null,bandwidth:P?null:null==b||null===(g=b.tech_)||void 0===g||null===(m=g.hls)||void 0===m?void 0:m.bandwidth,throughput:P?null:null==b||null===(f=b.tech_)||void 0===f||null===(v=f.hls)||void 0===v?void 0:v.throughput,bufferWaitTime:null===(y=t.data)||void 0===y?void 0:y.bufferTime}};r.M0.sendVideoPlayEvent(I,S,!0)}function u(e,t){e&&(e.bigPlayButton&&e.bigPlayButton.el_&&e.bigPlayButton.enabled_&&(e.bigPlayButton.el_.style.display="none"),e.loadingSpinner&&e.loadingSpinner.el_&&(e.loadingSpinner.el_.style.display="none"),t&&(t.style.display="none"))}function p(e,t,n=!0){if((0,c.N)()&&e&&e.items&&e.items.length>t&&e.items[t].video){const i=(new DOMParser).parseFromString(e.items[t].video,"application/xml"),r=e.region,c=i.getElementsByTagName("MediaFile"),p=Array.from(c).map((e=>{return{url:e.textContent,delivery:e.getAttribute("delivery"),id:e.getAttribute("id"),bitrate:Number(e.getAttribute("bitrate")),minBitrate:Number(e.getAttribute("minBitrate")),maxBitrate:Number(e.getAttribute("maxBitrate")),codec:e.getAttribute("codec"),scalable:!!Number(e.getAttribute("scalable")),maintainAspectRatio:!!Number(e.getAttribute("maintainAspectRatio")),width:Number(e.getAttribute("width")),height:Number(e.getAttribute("height")),contentType:e.getAttribute("type"),format:(t=e.getAttribute("type"),n=e.getAttribute("height"),"application/x-mpegURL"==t?"1006":d[n])};var t,n})),h=i.getElementsByTagName("Duration"),g=h.length>0?h[0].textContent:null,m=i.getElementsByTagName("Tracking"),f=Array.from(m).map((e=>({value:e.textContent,event:e.getAttribute("event"),offset:e.getAttribute("offset")}))),v=i.getElementsByTagName("Ad"),y=v.length>0?Number(v[0].getAttribute("id")):null,S=i.getElementsByTagName("AdTitle"),C=S.length>0?S[0].textContent:"",w=i.getElementsByTagName("AdServingId"),b=w.length>0?w[0].textContent:"",T=i.getElementsByTagName("ClickThrough"),k=T.length>0?T[0].textContent:"",P=i.getElementsByTagName("Impression"),I=P.length>0?P[0].textContent:"",A=i.getElementsByTagName("Pricing");let E=null,x=null,M=null;A.length>0&&(E=Number(A[0].textContent),x=A[0].getAttribute("model"),M=A[0].getAttribute("currency"));let L=null,D=null;const R=b+"_"+y,F=async(e,t,n,i)=>{var c;if(e.type===s.pt.Telemetry&&("ContentOpen"==t.name&&(L=Date.now(),D=L),l(e,t,R,C,r,i)),n===s.pt.Error)(0,o.H)(a.mFi,null===(c=t.error())||void 0===c?void 0:c.message),l(e,{name:s.pt.Error,data:{VideoDuration:g,PlayerTechnology:"HTML5",VideoPlayerType:"HTML5"}},R,C,r,i);else if(L&&n===s.pt.CanPlay){const t=Date.now()-L;L=null,l(e,{name:n,data:{VideoDuration:g,bufferTime:t,PlayerTechnology:"HTML5",VideoPlayerType:"HTML5"}},R,C,r,i)}else if(D&&n===s.pt.CanPlayThrough){const t=Date.now()-D;D=null,l(e,{name:n,data:{VideoDuration:g,bufferTime:t,PlayerTechnology:"HTML5",VideoPlayerType:"HTML5"}},R,C,r,i)}},O=document.createElement("div");O.id="nativeAdVideoMask",O.className="nativeAdVideoMask-mask",O.style.cssText="position:absolute;inset:0px;background-image:var(--mask-gradient, linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0,0,0,0) 176px));display:flex;";const B=(e,t)=>{let[i,o,a,c,d,l,p,h]=[null,null,null,null,null,null,null,null],[g,m,f]=[null,null,null];const v=!!e&&e.el_&&e.el_.querySelector("#nativeAdVideoMask");if(n?(g=!!e&&e.el_&&e.el_.getRootNode().host&&e.el_.getRootNode().host.getRootNode(),m=!!g&&g.host&&g.host.parentElement&&g.host.parentElement.querySelector("native-ad-video-controls")&&g.host.parentElement.querySelector("native-ad-video-controls").shadowRoot,f=!!g&&g.host&&g.host.parentElement&&g.host.parentElement.parentElement&&g.host.parentElement.parentElement.querySelector("native-ad-video-controls")&&g.host.parentElement.parentElement.querySelector("native-ad-video-controls").shadowRoot):(m=!!e&&e.el_&&e.el_.parentElement&&e.el_.parentElement.parentElement,f=!!m&&m.parentElement,g=m||f),g&&(p=g.querySelector(".video-ad-background-img-river"),h=g.querySelector(".video-ad-background-img-infopane")),m&&(c=m.querySelector("#nativead-video-replay-button-river"),d=m.querySelector("#nativead-video-learn-more-button-river")),f&&(i=f.querySelector("#nativead-video-play-button-infopane"),o=f.querySelector("#nativead-video-replay-button-infopane"),a=f.querySelector("#nativead-video-learn-more-button-infopane"),n?l=g.host.parentElement.parentElement.querySelector(".info-pane-slide-title"):"infopane"==r&&(l=f.nextElementSibling&&f.nextElementSibling.querySelector("h3"))),t&&t.toLowerCase()==s.pt.Ended&&(c&&(c.style.display="block"),o&&(o.style.display="block"),a&&(a.style.display="block"),d&&(d.style.display="block")),e&&e.errorDisplay&&e.errorDisplay.el_&&(e.errorDisplay.el_.style.display="none"),t&&t.toLowerCase()==s.pt.Play&&(c&&(c.style.display="none"),i&&(i.style.display="none"),o&&(o.style.display="none"),a&&(a.style.display="none"),d&&(d.style.display="none"),l&&(l.style.display="none"),v&&(v.style.display="none")),t&&t.toLowerCase()==s.pt.Error&&e&&"video/mp4"==e.currentType()&&u(e,i),t&&t.toLowerCase()==s.pt.Pause&&(l&&(l.style.display=null),v&&(v.style.display="flex")),t&&t.toLowerCase()==s.pt.Ready){if(p&&(p.style.display="none"),h&&(h.style.display="none"),i){i.style.display="block";const t=e&&e.posterImage&&e.posterImage.el_;if(t){const n=t.nextSibling;e.el_.insertBefore(O,n)}}e&&!e.currentSrc()&&u(e,i)}};return{VideoPlayerProps:{posterUrl:e.items[t].imageUrl,onMessage:(e,t,n,i)=>{B(t,n),F(e,t,n,i)},videoMetadataProps:{videoSources:p},playerConfigProps:{autoplay:"river"==r,inViewPlay:"river"==r,replayWhenInView:!1,outOfViewPause:!0,inViewPlayPercentage:.5,muted:!0,disableSeek:!0,useProgressiveVideoFallback:!0}},ViewabilityProps:{Duration:g,TrackingEvents:f},VideoAdProps:{AdId:y,AdTitle:C,AdServingId:b,ClickThrough:k,Impression:I,Price:E,PricingModel:x,Currency:M}}}return null}},77195:function(e,t,n){"use strict";n.d(t,{o:function(){return T}});var i=n(13334),r=n(55524),o=n(291),a=n(23549),s=n(12756),c=n(88826),d=n(7476),l=n(56687);const u="_marquee_ad_request";var p=n(54557),h=n(61633);const g="ntp.record_user_choices",m="ntp.background_image_type",f="ntp.news_feed_display",v="ntp.layout_mode",y=(new Set(["ntp.user_nurturing",g,m,f,v]),new Set(["cs-cz","da-dk","de-at","de-ch","de-de","de-ch","el-gr","en-gb","en-ie","en-xl","es-es","fi-fi","fr-be","fr-ch","fr-fr","hu-hu","it-it","nb-no","nl-be","nl-nl","pl-pl","pt-pt","sv-se","tr-tr"]));new Set(["fr-fr","de-de"]);let S="";class C{static initializeMarqueeAd(e,t,n,i){const r=new C;if(!window)throw new Error("Can not fetch Marquee ad since no window object available");window[u]={marqueeAdFetchPromise:r.fetchMarqueeAd(t,e,n,i)}}getBrowserOptOutStatus(){const e=(0,p.AE)("TOptOut");return!(!e||"1"!==e)}isCookieBannerPresent(e){if(!e||!y.has(e.toLowerCase()))return!1;return null===(0,p.AE)("eupubconsent-v2")}createSamAdRequestData(e,t,n,i){if(!e)return;const{locale:r,pagetype:o,audienceMode:a,fd_muid:c,aid:d}=e,l=c||(0,p.AE)("MUID");if(!(r&&r.language&&r.market&&o&&"kids"!==a))return;const u=r.language+"-"+r.market,h=this.isCookieBannerPresent(e.locale.language+"-"+e.locale.market),g=!h&&l?l:null,m=!!window.__tcfapi,f=this.getBrowserOptOutStatus(),v=i||(document.URL&&document.URL.includes("localhost")?"https://ntp.msn.com/edge/ntp":document.URL),y={[s.r.Logo]:[0,0],[s.r.HighResolution4K]:[3840,2160],[s.r.C1]:[632,1440],[s.r.C2]:[944,1440],[s.r.C3]:[1256,1440],[s.r.C4]:[1600,1440],[s.r.C5]:[1920,1440]},C={locale:u,rid:d&&d.toLocaleLowerCase(),partnerId:o,content:{anaheimPageLayout:S,sourceUrl:v,pageType:"edgechrntp",audienceMode:a,verticalName:"edge"},user:{muid:g,browserOptOut:f,isAdblock:!1,gdpr:m},placements:[{region:"bespoke",indices:[1],img:{w:1920,h:1440},assets:[[{id:1,required:1,title:{len:90}},{id:2,required:1,data:{type:1}},{id:3,required:1,data:{type:2}},{id:4,required:1,data:{type:12}},...Object.keys(y).map(((e,t)=>({id:t+5,required:1,img:{type:Number(e),w:y[e][0],h:y[e][1],wmin:y[e][0],hmin:y[e][1]}})))]]}],isCookieWallPresent:h,isPeregrine:!0,device:{isMobile:!1}},w=new Headers;return w.append("x-ms-flightId",t),w.append("Content-Type","application/json; charset=utf-8"),w.append("User-Agent",n||navigator.userAgent),w.append("x-msedge-market",u),w.append("x-msedge-clientid",g),{headers:w,method:"POST",body:JSON.stringify(C)}}fetchMarqueeAd(e,t,n,i){if(!t)throw new Error("Can not fetch Marquee ad since no client settings available");let r;r=window.location.search&&window.location.search.includes("useDevSrtb=1")?new URL(h.Lr.SamEndpoint,"https://srtb-dev.msn.com/"):new URL(h.Lr.SamEndpoint,h.Lr.SamDomain);const o=this.createSamAdRequestData(t,e,n,i);return fetch(r,o)}}var w=n(15755);class b{constructor(){this.marqueeAdEligibility=!1,this.marqueeAdInitialized=!1,this.marqueeAdResponseProcessed=new Promise((e=>{this.marqueeAdPromiseResolver=e}))}static getInstance(){return r.Gq.get("__MarqueeAdService__",(()=>new b))}mapSamAdResponseToMarqueeAd(e,t){var n,i,r;const o={title:"",images:[],adClickedUrls:[],adServedUrls:[],adViewedUrls:[],clickThroughUrl:"",isUpdated:t,sponsorBackgroundColor:"",optOutUrl:""};if(!e)throw new Error("Invalid SAM response");if(null==e||!e.placements||0===(null==e?void 0:e.placements.length))throw new Error("Ad placements is empty in SAM response");const a=e.placements[0];if(null==a||!a.items||0===a.items.length)throw new Error("Ad items is empty in ad placement");const c=a.items[0];if(null==c||!c.assets||0===c.assets.length)throw new Error("Ad assets is empty in ad item");const d=c.assets.find((e=>e.title));if(!d)throw new Error("Ad item title is empty");o.title=d.title.text;const l=c.assets.find((e=>{var t;return 1===(null===(t=e.data)||void 0===t?void 0:t.type)}));if(!l||null===(n=l.data)||void 0===n||!n.value)throw new Error("Ad item provider name is empty");o.providerName=l.data.value;const u=c.assets.filter((e=>e.image));if(!u.length)throw new Error("Ad item images is empty");o.images=u.map((e=>e.image));const p=c.assets.find((e=>{var t;return 12===(null===(t=e.data)||void 0===t?void 0:t.type)}));if(!p||null===(i=p.data)||void 0===i||!i.value)throw new Error("Ad item cta text is empty");o.ctaText=p.data.value;const h=c.assets.find((e=>{var t;return(null===(t=e.image)||void 0===t?void 0:t.type)===s.r.Logo}));if(!h||null===(r=h.image)||void 0===r||!r.url)throw new Error("Ad item sponsor logo is empty");if(o.sponsorLogoImageUrl=h.image.url,c.verificationParameters){var g,m,f,v;const e=c.verificationParameters.split(";"),t=null===(g=e.find((e=>e.startsWith("backgroundColor"))))||void 0===g||null===(m=g.split(":"))||void 0===m?void 0:m[1];t&&(o.sponsorBackgroundColor=t);const n=null===(f=e.find((e=>e.startsWith("optoutsegid"))))||void 0===f||null===(v=f.split(":"))||void 0===v?void 0:v[1];n&&(o.optOutUrl=`https://secure.adnxs.com/seg?t=1&add=${n}`)}if(!c.url||0===c.url.length)throw new Error("Ad item url is empty");return o.clickThroughUrl=c.url,a.adServedUrls&&(o.adServedUrls=a.adServedUrls),a.visibilityUrls&&(o.adViewedUrls=a.visibilityUrls),c.clickUrls&&(o.adClickedUrls=c.clickUrls),o.nativeAdId="marqueeAdContainer",o.verificationParameters=c.verificationParameters,o}sendAppErrorEvent(e,t){a.M0.sendAppErrorEvent((0,c.Tr)(e,t))}getMarqueeAdRequest(){return window[u]}getMarqueeAd(){return this.marqueeAd}async initializeMarqueeAd(e=!1){var t;if(window.marqueeAdInitialized&&window.marqueeAd&&!this.marqueeAd)return this.marqueeAd=window.marqueeAd,this.marqueeAdInitialized=!0,void(this.marqueeAdEligibility=!0);if(window.isSSRCompleted&&!window.marqueeAdInitialized)return;if(!e&&this.marqueeAdInitialized)return;if(this.marqueeAdInitialized=!0,e&&C.initializeMarqueeAd(i.Al.ClientSettings,i.Al.CurrentFlights),null===(t=this.getMarqueeAdRequest())||void 0===t||!t.marqueeAdFetchPromise)return void this.marqueeAdPromiseResolver();let n,r;try{const e=this.getMarqueeAdRequest();if(null==e||!e.marqueeAdFetchPromise)throw new Error("Marquee ad request is missing, maybe it is not initialized successfully");n=await e.marqueeAdFetchPromise}catch(e){return this.sendAppErrorEvent(d.KPf,`Marquee ad request failed. Error: ${(0,l.n)(e)}`),void this.marqueeAdPromiseResolver()}if(n&&n.body&&n.ok&&200===n.status){try{r=await n.json()}catch(e){return this.sendAppErrorEvent(d.KPf,`Marquee ad response could not be parsed. Error: ${(0,l.n)(e)}`),void this.marqueeAdPromiseResolver()}try{this.marqueeAd=this.mapSamAdResponseToMarqueeAd(r,e),this.marqueeAdEligibility=!0}catch(e){this.sendAppErrorEvent(d.KPf,`Map marquee ad error. Error: ${(0,l.n)(e)}`)}this.marqueeAdPromiseResolver()}else{var o;if(204===(null===(o=n)||void 0===o?void 0:o.status))a.M0.addOrUpdateTmplProperty("MarqueeAdNoContent","204");else{var s;let e="";try{e=JSON.stringify(n)}catch(e){return}this.sendAppErrorEvent(d.KPf,`Marquee ad did not return the expected response. marqueeAdResponse: ${e}, status code: ${null===(s=n)||void 0===s?void 0:s.status}`)}this.marqueeAdPromiseResolver()}}async getMarqueeAdEligibilityAsync(){return!!this.marqueeAdEligibility||(await this.marqueeAdResponseProcessed,this.marqueeAdEligibility)}sendVerificationToIas(){(0,w.F)(this.marqueeAd.verificationParameters,this.marqueeAd.nativeAdId,d.Q0n)}async sendBeacons(e){if(e&&e.length)for(let t=0;t<e.length;t++){let n=new Image(1,1);n.src=e[t],n=null}}}const T=(0,o.h)(b)},95623:function(e,t,n){"use strict";n.d(t,{GM:function(){return d},dO:function(){return c}});var i=n(82694),r=n(7476),o=n(78931),a=n(69425);const s=[{ratio:i.hb._lowerBound,width:1,height:9999},{ratio:i.hb._1by191,width:1,height:1.91},{ratio:i.hb._9by16,width:9,height:16},{ratio:i.hb._3by4,width:3,height:4},{ratio:i.hb._1by1,width:1,height:1},{ratio:i.hb._4by3,width:4,height:3},{ratio:i.hb._16by9,width:16,height:9},{ratio:i.hb._191by1,width:1.91,height:1}],c=(0,a.Et)(r.Evv,"calculateRatio")((e=>{var t,n;const i=null==e||null===(t=e.items[0])||void 0===t?void 0:t.originalImageWidth,r=null==e||null===(n=e.items[0])||void 0===n?void 0:n.originalImageHeight;if(!i||!r)return;const o=u(e.items[0].imageUrl);if(!o)return;const a=o.searchParams.get("c");if(a&&"4"!==a)return;const c=Number(i),d=Number(r);let l=1;for(;l<s.length&&Math.ceil(c*s[l].height)!==Math.ceil(d*s[l].width);++l)if(!(Math.ceil(c*s[l].height)>Math.ceil(d*s[l].width))){if(1==l)break;const e=1*c/d;Math.abs(e-s[l].width/s[l].height)>=Math.abs(e-s[l-1].width/s[l-1].height)&&(l-=1);break}l==s.length&&(l-=1),e.template.desiredRatio=s[l].ratio})),d=(0,a.Et)(r.Evv,"reduceWidthOrHeightAndUpdateUrl")(((e,t,n,i)=>{const r=(0,o.Z)(s,(e=>e.ratio===t));if(1!==r.length)return;const a=r[0],c=n?e.ext.originalImageWidth:e.originalImageWidth,d=n?e.ext.originalImageHeight:e.originalImageHeight;if(!c||!d)return;const u=1*c/d,p=1*a.width/a.height,h={w:c,h:d};u>=p?h.w=Math.round(d*p):h.h=Math.round(c/p);const g={river:300,infopane:604};return h.w>g[i]?(h.h=Math.round(h.h*g[i]/h.w),h.w=g[i]):(h.h=g[i]*p,h.w=g[i]),l(h.h,h.w,e,n),h})),l=(0,a.Et)(r.Evv,"updateUrlWithDesiredSize")(((e,t,n,i)=>{const r=u(i?n.url:n.imageUrl);r&&(r.searchParams.set("h",e),r.searchParams.set("w",t),r.searchParams.set("c","4"),i?n.url=r.href:n.imageUrl=r.href)})),u=(0,a.Et)(r.Evv,"constructUrl")((e=>{let t;try{t=new URL(e)}catch(n){try{t=new URL(`https://${e}`)}catch{return}}return t}))},87851:function(e,t,n){"use strict";n.d(t,{F8:function(){return A},Sj:function(){return I},vy:function(){return k}});var i=n(23019),r=n(13578),o=n(31011),a=n(11935),s=n(4935),c=n(7476),d=n(21882),l=n(95623),u=n(69425);const p=(0,u.Et)(c.Evv,"checkConfigType")(((e,t)=>t.template.configType===e.configType)),h=(0,u.Et)(c.Evv,"checkRegion")(((e,t)=>e.region.includes(t.region))),g=(0,u.Et)(c.Evv,"checkAllAssets")(((e,t)=>!!(0,r.Z)(e.requiredAssetsAll)||e.requiredAssetsAll.every((e=>{var n,o;return!(0,r.Z)(null==t||null===(n=t.items[0])||void 0===n?void 0:n.assets)&&Object.keys(null==t||null===(o=t.items[0])||void 0===o?void 0:o.assets).some((t=>e===i.aT[t]))})))),m=(0,u.Et)(c.Evv,"checkAnyAssets")(((e,t)=>!!(0,r.Z)(e.requiredAssetsAny)||e.requiredAssetsAny.some((e=>{var n,o;return!(0,r.Z)(null==t||null===(n=t.items[0])||void 0===n?void 0:n.assets)&&Object.keys(null==t||null===(o=t.items[0])||void 0===o?void 0:o.assets).some((t=>e===i.aT[t]))})))),f=(0,u.Et)(c.Evv,"checkAdCount")(((e,t)=>t.items.length<=(e.maxAdCount||1))),v=(0,u.Et)(c.Evv,"checkMultiImage")(((e,t)=>{var n,i;return!e.multiImage||(null===(n=t.items[0])||void 0===n||null===(i=n.images)||void 0===i?void 0:i.length)>1})),y=(0,u.Et)(c.Evv,"checkDiscountThreshold")(((e,t)=>{var n;return!e.discountThreshold||!(null!==(n=t.items[0])&&void 0!==n&&n.assets)||e.discountThreshold<=t.items[0].assets.discount})),S=(0,u.Et)(c.Evv,"checkRatio")(((e,t)=>{var n,i;return!e.supportedImageRatios||(null===(n=e.supportedImageRatios)||void 0===n?void 0:n.includes(null==t||null===(i=t.template)||void 0===i?void 0:i.desiredRatio))})),C=(0,u.Et)(c.Evv,"setTemplate")(((e,t)=>{t.template.templateType=e.template instanceof Function?e.template(e,t):e.template,t.template.dynamicRenderingConfig=e.dynamicRenderingConfig&&e.dynamicRenderingConfig(t)})),w=(0,u.Et)(c.Evv,"filterAssets")(((e,t)=>{var n,c;if(null!=t&&null!==(n=t.template)&&void 0!==n&&n.enableVA)return;const d=(0,o.Z)([...i.fs,...(null==t||null===(c=t.template)||void 0===c?void 0:c.allowedAssets)||[],...e.supportedAssets||[],...e.requiredAssetsAll||[],...e.requiredAssetsAny||[]]);(0,a.Z)(t.items,(e=>{if((0,r.Z)(d)||(0,r.Z)(null==e?void 0:e.assets))return void delete e.assets;const t=(0,s.Z)(e.assets,((e,t,n)=>(d.includes(i.aT[n])&&(e[n]=t),e)),{});e.assets=t}))})),b=(0,u.Et)(c.Evv,"updateImageRatio")(((e,t)=>{var n,i;if(!e.supportedImageRatios||!e.targetImageRatio)return;let r;const o=d.cE.includes(t.region)?"infopane":"river";t.items.forEach((t=>{const n=(0,l.GM)(t,e.targetImageRatio,!1,o);r||(r=n),t.images&&(0,a.Z)(t.images,(t=>{t.ext&&t.ext.originalImageWidth&&t.ext.originalImageHeight&&(0,l.GM)(t,e.targetImageRatio,!0,o)}))})),null!==(n=r)&&void 0!==n&&n.h&&null!==(i=r)&&void 0!==i&&i.w&&(t.template.desiredHeight=r.h.toString(),t.template.desiredWidth=r.w.toString())})),T=(0,u.Et)(c.Evv,"trimProviderName")(((e,t)=>{t&&t.items&&t.items.forEach((e=>{e.providerName&&(e.providerName=k(e.providerName))}))})),k=(0,u.Et)(c.Evv,"trimProviderNameHelper")((e=>{if(!e)return"";const t=e.trim();try{let e=t;t.startsWith("http://")||t.startsWith("https://")||(e="https://"+t),new URL(e);const n=t.match(/^(www\.)?([a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+)/);return n?t.length-n[2].length==1?t:n[2]:t}catch(e){return t}})),P=(0,u.Et)(c.Evv,"updateLayoutColor")(((e,t)=>{t&&t.items&&t.items.forEach((e=>{e.images&&e.images.forEach((e=>{e&&e.ext&&e.ext.layoutColor&&(e.ext.layoutColor.startsWith("#")||(e.ext.layoutColor="#"+e.ext.layoutColor))}))}))})),I=[p,h,g,m,f,y,v,S],A=[C,w,b,T,P]},21882:function(e,t,n){"use strict";n.d(t,{yp:function(){return d},vn:function(){return C},KB:function(){return I},XP:function(){return P},cE:function(){return y},Ue:function(){return A},PY:function(){return z},Up:function(){return E},dj:function(){return V},FH:function(){return S},FC:function(){return w},rf:function(){return j},PB:function(){return T},Fg:function(){return v},R:function(){return R},JU:function(){return F},J2:function(){return N},uH:function(){return B},ZV:function(){return W},xP:function(){return H},$u:function(){return O},E5:function(){return q},Gu:function(){return J},BU:function(){return k},n_:function(){return m},zI:function(){return f},Fz:function(){return b}});var i=n(82694),r=n(99478),o=n(7291);const a=(0,r.ZV)(o.$,"gradient-mask",0,[{name:"div-wrapper",marginBottom:"8",marginLeft:"16",marginRight:"16",children:[{name:"rating",displayReviewCount:!1}]}]),s=(0,r.RM)(o.$,"gradient-mask",{name:"gradient-mask",setClickBeacon:!0,layout:{mode:"pixel",bottom:"0",width:"300",zIndex:4},children:[{name:"special-offer",isDrConfig:!0,layout:{mode:"block",display:"inline-block",position:"relative",marginBottom:"8",marginInlineStart:"16",marginInlineEnd:"16",width:"150",zIndex:5}},{name:"ad-title",setClickBeacon:!0}]}),c=(0,r.ZV)(o.$,"gradient-mask",0,[{name:"div-wrapper",marginBottom:"8",marginLeft:"16",marginRight:"16",children:[{name:"free-shipping",color:"#036ac4",layout:{mode:"pixel",bottom:"265"}}]}]);var d,l=n(90351),u=n(24526),p=n(7476),h=n(89401),g=n(69425);!function(e){e.river="river",e.infopane="infopane",e.resriver="resriver",e.rivercms="river_cms",e.riverdb="riverdb",e.riverdbside="riverdbside",e.riverAmplify="river_amp",e.restoday="restoday",e.todaystripe="todaystripe",e.newsstripe="News-Stripe",e.entertainmentstripe="Entertainment-Stripe",e.sportsstripe="Sports-Stripe",e.lifestylestripe="Lifestyle-Stripe",e.rightRail="rightRail",e.rightRailAmplify="rr_amp",e.resinfopane="resinfopane",e.infopanetab="infopane-tab",e.infopanecms="infopane_cms",e.sliver="sliver",e.rightrail="rightrail",e.eoab="eoab",e.rectangle="rectangle",e.inarticle="inarticle",e.WatchInFeed="intranative",e.eoabmsx="eoabmsx",e.interstitialgallery="interstitialgallery",e.articleInline="ArticleInline",e.rivert="rivert",e.infopanet1="infopanet1",e.infopanet3="infopanet3",e.inarticlecarousel="inarticlecarousel",e.incontentcarousel="incontentcarousel",e.triver="triver"}(d||(d={}));const m=[d.rightrail,d.eoab,d.rectangle,d.inarticle,d.eoabmsx,d.interstitialgallery,d.WatchInFeed,d.articleInline,d.rivert,d.inarticlecarousel,d.incontentcarousel],f=[d.river,d.riverdb,d.riverdbside],v=(d.riverdb,[d.river,d.resriver,d.rivercms,d.rightRail,d.rightrail]),y=[d.infopane,d.resinfopane,d.infopanetab,d.infopanecms],S=[d.restoday,d.todaystripe,d.newsstripe,d.entertainmentstripe,d.sportsstripe,d.lifestylestripe],C=[...v,...y],w=[...v,...S,d.riverdb,d.rightRail,d.rightrail,d.sliver,d.rectangle,d.eoab,d.inarticle,d.inarticlecarousel],b=[d.infopane,d.resinfopane,d.riverdb],T=[d.infopane,d.resinfopane],k=[d.infopanet1,d.infopanet3],P={default:20,discScribble10:10,hotspotSingle10:10,saleHighlight15:15,gamification:5},I=10,A=e=>!!(e&&e.items&&e.items[0]&&e.items[0].assets&&e.items[0].assets.transparentImage&&e.items[0].assets.transparentImage.url&&e.items[0].images&&e.items[0].images[0]&&e.items[0].images[0].ext&&e.items[0].images[0].ext.layoutColor),E=e=>((e,t)=>{var n,i,r;const o=null==e||null===(n=e.items)||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.assets)||void 0===r?void 0:r.transparentImage,a=null==o?void 0:o.w,s=null==o?void 0:o.h;return!!((null==o?void 0:o.url)&&null!=o&&s>0&&a>0)&&t(a,s)})(e,((e,t)=>e/t<1.4)),x=e=>(0,l.Z)(e,"items[0].assets.rating"),M=e=>(0,l.Z)(e,"items[0].assets.specialOffer"),L=e=>(0,l.Z)(e,"items[0].assets.freeShipping"),D=e=>(0,l.Z)(e,"items[0].assets.discount"),R=e=>x(e)?a:M(e)?s:L(e)?c:void 0,F=e=>x(e)?i.SI.ComboRating:M(e)?i.SI.ComboSpecialOffer:L(e)?i.SI.ComboFreeShipping:void 0,O=(e,t)=>{var n;t&&(e.enableNativeAdWC=!0);const i=null==e||null===(n=e.items[0])||void 0===n?void 0:n.assets;null!=i&&i.rating?e.items[0].assets=(0,u.Z)(i,["rating"]):null!=i&&i.specialOffer?e.items[0].assets=(0,u.Z)(i,["specialOffer"]):null!=i&&i.discount&&(null==i?void 0:i.discount)>=P.saleHighlight15?e.items[0].assets=(0,u.Z)(i,["discount"]):null!=i&&i.freeShipping&&(e.items[0].assets=(0,u.Z)(i,["freeShipping"]))},B=e=>x(e)?i.SI.ComboRatingNonDR:M(e)?i.SI.ComboSpecialOfferNonDR:D(e)&&D(e)>=P.saleHighlight15?i.SI.ComboSaleHighlightNonDR:L(e)?i.SI.ComboFreeShippingNonDR:i.SI.Default,N=e=>x(e)?i.SI.ComboRatingNonDRControl:M(e)?i.SI.ComboSpecialOfferNonDRControl:D(e)&&D(e)>=P.saleHighlight15?i.SI.ComboSaleHighlightNonDRControl:L(e)?i.SI.ComboFreeShippingNonDRControl:i.SI.Default,$=e=>(0,l.Z)(e,"items[0].assets.sold"),U=e=>(0,l.Z)(e,"items[0].assets.returnPolicy"),_=e=>(0,l.Z)(e,"items[0].assets.condition"),H=e=>$(e)?i.SI.ComboSoldNonDR:U(e)?i.SI.ComboReturnPolicyNonDR:_(e)?i.SI.ComboConditionNonDR:i.SI.Default,W=e=>$(e)?i.SI.ComboSoldNonDRControl:U(e)?i.SI.ComboReturnPolicyNonDRControl:_(e)?i.SI.ComboConditionNonDRControl:i.SI.Default,q=(e,t)=>{var n;t&&(e.enableNativeAdWC=!0);const i=null==e||null===(n=e.items[0])||void 0===n?void 0:n.assets;null!=i&&i.sold?e.items[0].assets=(0,u.Z)(i,["sold"]):null!=i&&i.returnPolicy?e.items[0].assets=(0,u.Z)(i,["returnPolicy"]):null!=i&&i.condition&&(e.items[0].assets=(0,u.Z)(i,["condition"]))},V=(0,g.Et)(p.Evv,"modifyImageUrlForResponsiveImageSizingTemplate")(((e,t)=>{var n,r;const o=null==e||null===(n=e.items)||void 0===n?void 0:n[0],a=null===(r=o.assets)||void 0===r?void 0:r.price;if(e.template.templateType=i.SI.Default,o&&!a){var s,c,d;const n=Q(parseFloat(o.originalImageHeight),parseFloat(o.originalImageWidth),o.imageUrl,e.template.responsiveImageSizingTemplateConfigs);n&&n.imageUrl!==o.imageUrl&&K(null==n||null===(s=n.responsiveImageSizingTemplateConfig)||void 0===s?void 0:s.maxHeight,(0,h.O1)(null===(c=e.items)||void 0===c||null===(d=c[0])||void 0===d?void 0:d.title))&&(e.enableResponsiveImageSize=!0,e.template.templateType=i.SI.ResponsiveImageSizing,t||(e.responsiveImageSizingTemplateConfig=n.responsiveImageSizingTemplateConfig,e.items[0].imageUrl=n.imageUrl))}})),G=(0,g.Et)(p.Evv,"isDescriptionShowingHelper")(((e,t)=>{var n,i,r,o;const a=null===(n=e.items)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.description,s=null===(r=e.items)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.title,c=(null==a?void 0:a.length)>1&&s!=a,l=d[e.region];return b.includes(l)?c:c&&(0,h.O1)(s)<=t})),z=(0,g.Et)(p.Evv,"isDescriptionShowing")(((e,t)=>G(e,t)?i.SI.ResponsiveDescription:i.SI.Default)),j=(0,g.Et)(p.Evv,"pickRandomTemplateWithDensity")(((e,t,n,i)=>{if(Math.random()>i)e.enablePattern=!1,e.template.templateType=n;else{const n=t.length,i=Math.floor(Math.random()*n);e.template.templateType=t[i],e.enablePattern=!0}})),K=(0,g.Et)(p.Evv,"isTitleLineMeetRequire")(((e,t)=>!(!e||!t)&&(225===e&&t<=1||200===e&&t<=2))),Q=(0,g.Et)(p.Evv,"modifyImageUrl")(((e,t,n,i)=>{if(!(e&&t&&n&&n.startsWith("https://www.bing.com/th")))return{imageUrl:n};const r=Z(n),o=n.split("?")[0];if(!i||0===i.length)return{imageUrl:n};for(let n=0;n<i.length;n++){const a=i[n],s=t/e;if(s>=a.lowerBound&&s<=a.placementRatio){return{imageUrl:`${o}?id=${r.id}${r.pid?`&pid=${r.pid}`:""}&w=${a.maxWidth}`,responsiveImageSizingTemplateConfig:a}}if(s>a.placementRatio&&s<=a.upperBound){return{imageUrl:`${o}?id=${r.id}${r.pid?`&pid=${r.pid}`:""}&h=${a.maxHeight}`,responsiveImageSizingTemplateConfig:a}}}return{imageUrl:n}})),Z=(0,g.Et)(p.Evv,"parseImageUrl")((e=>{if(!e)return;const t=new URL(e),n=new URLSearchParams(t.searchParams),i={};return n.forEach(((e,t)=>{["id","pid"].includes(t)&&(i[t]=e)})),i})),J=(0,g.Et)(p.Evv,"switchToAIImage")((e=>{e&&e.items&&e.items[0]&&e.items[0].assets&&e.items[0].assets.transparentImage&&e.items[0].assets.transparentImage.url&&e.items[0].imageUrl&&(e.items[0].imageUrl=e.items[0].assets.transparentImage.url)}))},76623:function(e,t,n){"use strict";n.d(t,{Bi:function(){return m},En:function(){return d},FD:function(){return u},IA:function(){return g},Yf:function(){return l},c5:function(){return f}});var i=n(61633),r=n(27517),o=n(7476),a=n(23549),s=n(31558),c=n(46058);function d(e){return i.S7[e]||"Ad"}function l(e){let t="";if(!e)return t;try{const n=JSON.parse(e).tcb;n&&Array.isArray(n)&&n.forEach((e=>{e.includes("srtb")&&(t=e.replace("notify/clicked","notify/feedback"))}))}catch(e){t=""}return t}function u(e,t,n){var i,c;let d;if(t)d=e.imp[0];else{if(!e.data)return;try{d=JSON.parse(e.data)}catch(t){a.M0.sendAppErrorEvent({...o.TBk,message:"Invalid JSON sent to card mapper from WPO Boost",pb:{...o.TBk.pb,customMessage:`${t&&t.message}`,wpoJson:e.data}})}}const l=null===(i=p(d,!0))||void 0===i||null===(c=i.promotions)||void 0===c?void 0:c[0];return(0,s.N)()&&f(l,n),d.tagid===r.x.Prong2?l.isProng2Promotion=!0:d.tagid==r.x.Prong1&&(l.isProng1Promotion=!0),l}function p(e,t){if(!(e.Promotions&&e.Promotions.length>0))return;const n={promotions:[]};var i;t?(n.promotions[0]=h(e.Promotions[0]),null!==(i=n.promotions)&&void 0!==i&&i[0]&&(n.promotions[0].adsTraceId=e.id)):n.promotions=e.Promotions.map((e=>h(e)));return n}function h(e){var t;const{images:n,longTitle:i,title:r,description:o,displayUrl:a,targetUrl:s,Beacons:c,brand:d,merchantCategory:l,actionText:u,logo:p,adScenarioType:h,rebateValue:g,minPurchaseValue:m,valueType:f,isTextAd:v,scope:y,priceCurrencySymbol:S}=e,{imageUrl:C}=n&&n[0],w=c.map((e=>e.MIFeedbackurl)),b=c.map((e=>e.MVFeedbackurl)),T=c.map((e=>e.EventUrl.replace("{ACTION}","click"))),k=JSON.stringify({tcb:T}),P=JSON.stringify({tvb:b,trb:w,e:!0,tjb:[]});return{region:"rr_amp",regionIndex:void 0,destinationUrl:s||"",imageUrl:C||"",imageUrlFallback:(null===(t=n[1])||void 0===t?void 0:t.imageUrl)||C,tagLine:i||r,logoText:a||"",clickBeacons:k||"",beaconsJson:P||"",images:n,logo:p,brand:d,category:l,actionText:u,logoUrl:null==p?void 0:p.imageUrl,adScenarioType:h,rebateValue:g,minPurchaseValue:m,valueType:f,isStoreWide:1==y,isTextAd:v,priceCurrencySymbol:S}}function g(e,t){if(!function(e,t=0){return e.Promotions&&e.Promotions.length>t}(e))return;const n=e.Promotions[0],{images:i,longTitle:r,title:o,description:a,displayUrl:s,targetUrl:c,Beacons:d}=n,{height:l,width:u,imageUrl:p}=i[0];let h="",g="";h=l&&l.toString(),g=u&&u.toString();const m=d.map((e=>e.MIFeedbackurl)),f=d.map((e=>e.MVFeedbackurl)),v=d.map((e=>e.EventUrl.replace("{ACTION}","click"))),y=JSON.stringify({tcb:v}),S={region:"rr_amp",regionIndex:1,items:[],adServedUrls:m,visibilityUrls:f,beaconsJson:JSON.stringify({tvb:f,trb:m,e:!0,tjb:[]})},C={destinationUrl:c,imageHeight:h,imageUrl:p,imageWidth:g,title:r||o,description:a,prong2AmplifyBusinessName:s,clickBeacons:y};return S.items.push(C),S.imageHeight=h,S.imageWidth=g,S}function m(e,t){if(!e||!e.index||!e.region)return;const{adServedUrls:n,beaconsJson:r,index:o,items:a,jsTrackerUrls:s,locale:c,privacyUrl:u,providerId:p,region:h,visibilityUrls:g,crids:m}=e,f={adServedUrls:n,beaconsJson:r,crids:m,items:[],jsTrackerUrls:s,privacyUrl:u,providerId:p,region:h,regionIndex:o,visibilityUrls:g};f.adLabelText=d(c),f.isGreyAdsLabelEnabled=i.Eg.includes(c);let v="",y="";return a.forEach((e=>{const{adChoicesUrl:t,assets:n,clickBeacons:i,description:r,imageHeight:o,imageWidth:a,imageUrl:s,originalImageHeight:c,originalImageWidth:d,sourceName:u,title:p,uniqueId:h,url:g,verificationParameters:m}=e;v=o&&o.toString(),y=a&&a.toString();const S={adChoiceIconUrl:t,assets:n,clickBeacons:i,destinationUrl:g,description:r,feedbackUrl:i&&l(i),imageHeight:v,imageUrl:s,imageWidth:y,originalImageHeight:c&&c.toString(),originalImageWidth:d&&d.toString(),providerName:u,title:p,uniqueId:h,verificationParameters:m};f.items.push(S)})),f.imageHeight=v,f.imageWidth=y,f}function f(e,t){if(e.beaconsJson){new c.A(t).sendBeaconForAdServed({beaconsJson:e.beaconsJson,beaconsSupportHttpPOST:e.beaconsSupportHttpPOST})}}},89401:function(e,t,n){"use strict";n.d(t,{O1:function(){return a}});const i=2.255859375,r=(e,t=20)=>{if(!e||0===e.length)return 0;const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.13623046875,.3046875,.4375,.8,.6,.9,.8,.3,.4,.4328125,.5,.7,.4,.403125,.3,.6,.6,.403125,.6,.6,.7,.6,.6,.6,.6,.6,.3,.4,.6953125,.7,.6953125,.5,1,.8,.6046875,.7,.71875,.6,.503125,.7,.7359375,.3,.5,.7,.6,.925,.8,.8,.6,.9,.7,.6,.7,.703125,.8,1.1,.8,.8,.7,.4,.6,.3328125,.7,.6,.3,.5234375,.603125,.5,.603125,.6,.5,.603125,.6,.3,.5,.6,.3,.9,.6,.6,.603125,.603125,.4,.5,.5,.6,.7,.9,.7,.7,.6,.4,.3,.4,.7];return e.split("").map((e=>o(e,n,.5944274259868422,1.030769230769231))).reduce(((e,t)=>t+e))*t},o=(e,t,n,i)=>{const r=e.charCodeAt(0);return r<t.length?t[r]:s(e)?i:n},a=(e,t=265,n=20)=>{if(!e||0===e.length)return 0;const o=e.split(" ");let a=1,s=t;for(let e=0;e<o.length;e++){const c=r(o[e],n);c>s?(a+=1,s=t-c-i):c===s?(a+=1,s=t):s=s-c-i}return a},s=e=>/^[\u4e00-\u9fff\u3040-\u30ff\u1100-\u11ff\u3130-\u318f\uac00-\ud7af]$/.test(e)},14116:function(e,t,n){"use strict";n.d(t,{Ai:function(){return a},F8:function(){return d},GL:function(){return o},P$:function(){return i},_7:function(){return c},jV:function(){return s},mC:function(){return r},x7:function(){return l}});const i={id:"https://enterprisenews.microsoft.com",friendlyName:n(92095).Ak},r="https://ent-api.msn.com/news/companies/current/settings",o="Peregrine",a="AdminPortalSettings",s="AdminPortalSettingsRetryTimes",c=3,d="AdminPortalUserLayoutCache",l="isContentFeedManagedByAdminPortal"},14377:function(e,t,n){"use strict";n.d(t,{N:function(){return i}});const i=["prg-wpo-ss","prg-dr-infopanec","prg-title-2","prg-trending","prg-trendingc","prg-ad-ctav2","prg-ad-sh-v1","prg-ad-sh-v1-c","prg-ad-sh-v3","prg-ad-sh-v4","prg-ad-sh-v3v4-c","prg-ad-hover","prg-ad-hover-c","prg-ad-combo","prg-ad-combo2","prg-ad-combo-c","prg-ad-shortg","prg-ad-shortgc"]},7291:function(e,t,n){"use strict";n.d(t,{$:function(){return a}});var i=n(91257),r=n(99478);const o={name:"default-template",children:[...i.u,{name:"gradient-mask",layout:{position:"absolute",bottom:"0",width:"300",zIndex:2},children:[{name:"ad-title"}]}]},a=(0,r.Tb)(o,"product-image",{imageMaskOn:!0})},99478:function(e,t,n){"use strict";n.d(t,{As:function(){return s},BH:function(){return o},FT:function(){return l},It:function(){return d},Oz:function(){return i},RM:function(){return a},Tb:function(){return c},ZV:function(){return u}});class i{}i.byName=e=>t=>(null==t?void 0:t.name)===e;class r{}function o(e,t,n=r.identity()){return p(e,[{condition:t,action:n}])}function a(e,t,n){return o(e,i.byName(t),r.replaceWith(n))}function s(e,t,n){const o=[];for(let e=0;e<t.length;e++)o.push({condition:i.byName(t[e]),action:r.replaceWith(n[e])});return p(e,o)}function c(e,t,n){return o(e,i.byName(t),r.extendFields(n))}function d(e,t,n){const o=[];for(let e=0;e<t.length;e++)o.push({condition:i.byName(t[e]),action:r.extendFields(n[e])});return p(e,o)}function l(e,t,n,a){return o(e,i.byName(t),r.spliceChildren(n,a))}function u(e,t,n,a=[],s){return o(e,i.byName(t),r.spliceChildren(n,a,s))}function p(e,t){if((e=t.reduce(((e,t,n,i)=>{const{condition:r,action:o}=t;return r(e)?(i[n]=null,o(e)):e}),e)).children){const n=e.children.map((e=>p(e,t.filter((e=>e)))));return{...e,children:n}}return e}r.identity=()=>e=>e,r.replaceWith=e=>()=>e,r.extendFields=e=>t=>({...t,...e}),r.spliceChildren=(e,t=[],n)=>i=>{const r=[...i.children||[]];return r.splice(e,n,...t),{...i,children:r}}},91257:function(e,t,n){"use strict";n.d(t,{u:function(){return i}});const i=[{name:"product-image",layout:{position:"absolute",left:0,top:0,width:"300",height:"225",zIndex:1}},n(37500).l]},37500:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});const i={name:"footer",layout:{mode:"flex",flexDirection:"row",alignItems:"center",position:"absolute",bottom:"9",height:"31",width:"100%"},children:[{name:"start-action-part",children:[{name:"ad-label",layout:{marginInlineStart:"16",marginInlineEnd:"6",zIndex:5}},{name:"provider-name",layout:{flex:1,minWidth:0,zIndex:5},customStyleClass:"white-12-flex-layout"}]},{name:"end-action-part",children:[{name:"disclaimer",layout:{zIndex:5}},{name:"ad-choice",layout:{zIndex:5}},{name:"see-more",layout:{marginInlineEnd:"16",zIndex:5}}]}]}},82:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});const i={name:"default-infopane-template",children:[{name:"product-image",layout:{position:"absolute",left:"0",top:"0",zIndex:1,width:"100%",height:"304"},imageMaskOn:!0,imageMaskOpacity:"0.1"},{name:"gradient-mask",height:"176",paddingBottom:"0",paddingTop:"0",layout:{position:"absolute",bottom:"0",width:"100%",zIndex:2},useDynamicStyle:!0},{name:"ad-title",lineHeight:"36",titleFontSize:"28",layout:{position:"absolute",bottom:"53",width:"100%",zIndex:2}},n(37500).l]}},50462:function(e,t,n){"use strict";function i(e){for(const[t,n]of e)window[t]=n;const t=new CustomEvent(o,{detail:{adUniqueIds:Array.from(e.keys())}});document.dispatchEvent(t)}function r(e){for(const t of e)delete window[t]}n.d(t,{gL:function(){return o},gy:function(){return i},l$:function(){return r}});const o="nativeAdRendered"},43063:function(e,t,n){"use strict";n.d(t,{$H:function(){return u},V8:function(){return l},lj:function(){return d}});var i=n(82634);const r=5131;let o;try{o=(()=>{const e=i.Z.getAdbLoggedTime();return r+e%r})()}catch(e){o=r}const a=/(a)(d)/gi,s=e=>String.fromCharCode(e+97),c=(new Map,(e,t)=>{const n=(e=>{let t,n="";for(t=Math.abs(e);t>26;t=t/26|0)n=s(t%26)+n;return(s(t%26)+n).replace(a,"$1-$2")})(((e,t)=>(void 0===t&&(t=o),((e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e})(t,e)))(e,t)>>>0);return n}),d=(e,t)=>`${h(e,t)}`,l=(e,t)=>`algo-${h(e,t)}`,u=(e,t,n)=>e&&null!==i.Z&&void 0!==i.Z&&i.Z.getAdbStatus()?d(t,n):t,p=new Map,h=(e,t)=>{const n=((e,t)=>(p.has(e)||p.set(e,c(e,t)),p))(e,t).get(e);return n}},15293:function(e,t,n){"use strict";n.d(t,{_t:function(){return a}});const i={neutralForegroundRestColor:"--neutral-foreground-rest",neutralFillHoverColor:"--neutral-fill-hover",neutralFillActiveColor:"--neutral-fill-active",adBackgroundColor:"--ad-background-color",gradientMidColor:"--gradient-mid-color",gradientEndColor:"--gradient-end-color"},r={"font-weight":"","z-index":"",flex:"","flex-grow":"","flex-shrink":"",order:""},o=e=>null!=r[e]?r[e]:"px";function a(e,t){return null==t||"undefined"===t?"":(e=null!=i[n=e]?i[n]:n.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),isNaN(Number(t))?`${e}:${t}`:`${e}:${t}${o(e)}`);var n}},69425:function(e,t,n){"use strict";n.d(t,{Et:function(){return d},uj:function(){return l}});var i=n(88826),r=n(23549);function o(e){var t;return!(!/^.*{\s*return __awaiter/.test(String(e))&&!/^\([\w_$,\s]*?\) => __awaiter/.test(String(e)))||"AsyncFunction"===(null==e||null===(t=e.constructor)||void 0===t?void 0:t.name)}function a(e,t,n,a,s,c){if(r.M0.sendAppErrorEvent((0,i.Tr)(t,n||"",function(e,t){return`args: ${JSON.stringify(e)||""}\nerror: ${(null==t?void 0:t.stack)||(null==t?void 0:t.message)||""}`}(a,s))),!c)return;const d=c(...a,s);return o(e)?Promise.resolve(d):d}function s(e,t,n,i,r,s){try{return o(e)?e.call(this,...i).catch((o=>a(e,t,n,i,o,r))).finally((()=>{null==s||s(...i)})):e.call(this,...i)}catch(o){return a(e,t,n,i,o,r)}finally{o(e)||null==s||s(...i)}}function c(e,t){const n=Object.getOwnPropertyDescriptor(e.prototype,t);return n||{configurable:!0,enumerable:!0,writable:!0,value:e.prototype[t]}}const d=(e,t,n,i)=>(r,o,a)=>{const c=null==a?void 0:a.value;if("function"==typeof r)return function(...o){return s.call(this,r,e,t,o,n,i)};if("function"!=typeof c)return a;if(!e)throw Error("Parameter baseError is missed");return a&&(a.value=function(...r){return s.call(this,c,e,t,r,n,i)}),a},l=(e,t,n,i)=>r=>{class o extends r{connectedCallback(){super.connectedCallback()}}const a={...Object.getOwnPropertyDescriptors(r.prototype),...Object.getOwnPropertyDescriptors(o.prototype)};for(const r in a){var d;if("constructor"===r||null===(d=a[r])||void 0===d||!d.value)continue;if(!(o.prototype[r]instanceof Function))continue;const l=c(o,r),u=l.value;l.value=function(...r){return s.call(this,u,e,t,r,n,i)},Object.defineProperty(o.prototype,r,l)}return o}},45069:function(e,t,n){"use strict";n.d(t,{Cw:function(){return a},Km:function(){return s}});var i=n(33940),r=n(69425),o=n(7476);const a={EventType:"uat",Timestamp:"uats",Duration:"uad",Element:"uae",Message:"uam"};class s{fireImpressionLog(e,t,n){null!=e&&e.id&&!s.impressionNativeAdIdSet.has(null==e?void 0:e.id)&&s.impressionLog&&(s.impressionLog(e,t,n),s.impressionNativeAdIdSet.add(null==e?void 0:e.id))}fireClickLog(e,t,n){s.clickLog&&s.clickLog(e,t,n)}saveUserActionBeacon(e="",t="{}",n="srtb.msn.com"){const i=JSON.parse(t),r=i&&i.trb;if(e&&r)for(let t=0;t<r.length;t++){if(!r[t].includes(n))continue;const i=new URL(r[t]);i.pathname=i.pathname.replace("served","useraction"),s.userActionBeaconsMap.set(e,i),s.startTimestampMap.set(e,(new Date).getTime())}}getUserActionBeacon(e=""){return s.userActionBeaconsMap.get(e)}populateBeaconUrl(e,t,n,i,r,o){const c=this.getUserActionBeacon(e);if(!c)return"";for(const e of Object.values(a)){var d;null===(d=c.searchParams)||void 0===d||d.delete(e)}if(n){var l,u,p,h,g,m;const d=s.startTimestampMap.get(e),f={m:i,f:t};null===(l=c.searchParams)||void 0===l||l.set(a.EventType,n),null===(u=c.searchParams)||void 0===u||u.set(a.Timestamp,String(d?(new Date).getTime()-d:0)),null===(p=c.searchParams)||void 0===p||p.set(a.Duration,r||0),null===(h=c.searchParams)||void 0===h||h.set(a.Message,JSON.stringify(f)),null===(g=c.searchParams)||void 0===g||g.set(a.Element,(null==o||null===(m=o.tagName)||void 0===m?void 0:m.toLowerCase())||"")}return c}}s.impressionNativeAdIdSet=new Set,s.userActionBeaconsMap=new Map,s.startTimestampMap=new Map,(0,i.gn)([(0,r.Et)(o.a4J,"UserActionLog.fireImpressionLog")],s.prototype,"fireImpressionLog",null),(0,i.gn)([(0,r.Et)(o.a4J,"UserActionLog.fireClickLog")],s.prototype,"fireClickLog",null),(0,i.gn)([(0,r.Et)(o.a4J,"UserActionLog.saveUserActionBeacon")],s.prototype,"saveUserActionBeacon",null),(0,i.gn)([(0,r.Et)(o.a4J,"UserActionLog.getUserActionBeacon")],s.prototype,"getUserActionBeacon",null),(0,i.gn)([(0,r.Et)(o.a4J,"UserActionLog.populateBeaconUrl")],s.prototype,"populateBeaconUrl",null)},57405:function(e,t,n){"use strict";var i;n.d(t,{v:function(){return i}}),function(e){e.CacheMissing="authCacheMissing",e.CacheExpired="authCacheExpired",e.OtherCacheError="authCacheError"}(i||(i={}))},86489:function(e,t,n){"use strict";n.d(t,{y:function(){return r}});var i=n(57405);class r{constructor(){this.AuthDataMap={}}async getAuthDataFromCache(e){if(null==e||!e.id)return{authToken:void 0,resource:e,error:{message:"inMemoryAuthCacheStrategy Resource Id is missing",status:i.v.OtherCacheError}};const t=Math.round(performance.now()),n=this.AuthDataMap[e.id],r=Math.round(performance.now());return n?this.isJwtTokenExpired(n.authToken)?{authToken:void 0,resource:e,error:{message:"inMemoryAuthCacheStrategy Cache is expired",status:i.v.CacheExpired},performance:{startTime:t,endTime:r}}:{resource:e,authToken:n.authToken,performance:{startTime:t,endTime:r}}:{authToken:void 0,resource:e,error:{message:"inMemoryAuthCacheStrategy Cache is missing",status:i.v.CacheMissing},performance:{startTime:t,endTime:r}}}async setAuthDataToCache(e,t){if(null==e||!e.id)return{resource:e,error:{message:"setAuthDataToCache Resource Id is missing",status:i.v.OtherCacheError}};const{authToken:n}=t,r=Math.round(performance.now());this.AuthDataMap[e.id]={authToken:n};return{resource:e,performance:{startTime:r,endTime:Math.round(performance.now())}}}async removeAuthDataFromCache(e){if(null==e||!e.id)return{resource:e,error:{message:"removeAuthDataFromCache Resource Id is missing",status:i.v.OtherCacheError}};const t=Math.round(performance.now());delete this.AuthDataMap[e.id];return{resource:e,performance:{startTime:t,endTime:Math.round(performance.now())}}}isJwtTokenExpired(e){var t;if(!e)return;let n;try{n=JSON.parse(atob(e.split(".")[1]))}catch(e){return}return null!==(t=n)&&void 0!==t&&t.exp?1e3*n.exp<Date.now():void 0}}},92979:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var i=n(57405);class r{async getAuthDataFromCache(e){return{resource:e,error:{message:"inMemoryAuthCacheStrategy Resource Id is missing",status:i.v.CacheMissing}}}async setAuthDataToCache(e){return{resource:e}}async removeAuthDataFromCache(e){return{resource:e}}}},34004:function(e,t,n){"use strict";var i;n.d(t,{H:function(){return i}}),function(e){e.InteractionRequired="userInteractionRequired",e.AuthProviderNotSupported="authProviderNotSupported",e.MaySucceedOnRetry="fetchRetryableError",e.AuthPrivateNotSupportedForMAM="authPrivateNotSupportedForMAM",e.OtherError="authFetchError"}(i||(i={}))},46243:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});var i=n(34004);const r=(e,t=3,n=1e3)=>(t<0&&(t=0),{fetchAuthData:async(r,a)=>{let s={resource:r,error:{status:i.H.OtherError}};a&&(t=0);for(let l=0;l<t+1;l++){var c,d;if(s=await e.fetchAuthData(r,a),(null===(c=s)||void 0===c||null===(d=c.error)||void 0===d?void 0:d.status)!==i.H.MaySucceedOnRetry)break;await o(n)}return s}}),o=async e=>new Promise((function(t){setTimeout(t,e)}))},20509:function(e,t,n){"use strict";n.d(t,{a:function(){return a}});var i=n(34004),r=n(45870);var o;!function(e){e[e.kNoError=0]="kNoError",e[e.kTokenFetchUserInteractionRequired=13]="kTokenFetchUserInteractionRequired",e[e.kTokenFetchProviderError=15]="kTokenFetchProviderError",e[e.kInteractionRequired=24]="kInteractionRequired",e[e.kUnsupportedSovereignty=60]="kUnsupportedSovereignty",e[e.kSovereigntyDetectionFailed=61]="kSovereigntyDetectionFailed"}(o||(o={}));class a{constructor(e){if(this.authCallerValidator=e,!e)throw new Error("Auth Caller Validator is not provided in EdgeChromiumFetchStrategy")}async fetchAuthData(e,t=!1){const{account:n,client:a,...s}=await this.authCallerValidator.validateAuthCaller();if(!n||!a)return{...s,resource:e};if(null==e||!e.id)return{resource:e,error:{message:"Resource Id not provided.",status:i.H.OtherError}};const c=t?window.chrome.authPrivate.acquireAccessTokenWithUserInteraction:window.chrome.authPrivate.acquireAccessTokenSilently,d=new r.o,l={account_id:n.account_id,account_type:n.account_type,client_id:a.id,scope_or_resource:e.id},u=Math.round(performance.now());let p=-1;c(l,(e=>{d.set(e),p=Math.round(performance.now())}));const h=await d.getResultAsync(),{access_token:g,is_success:m,error_info:f,is_token_valid:v}=h||{};if(m&&v)return{authToken:g,resource:e,callerId:s.callerId,performance:{startTime:u,endTime:p}};let y=i.H.OtherError,S=(null==f?void 0:f.error_string)||"Unknown Error";return m&&!v?(y=i.H.MaySucceedOnRetry,S="Invalid Auth Token returned"):(null==f?void 0:f.secondary_error)===o.kTokenFetchUserInteractionRequired||(null==f?void 0:f.secondary_error)===o.kInteractionRequired?(y=i.H.InteractionRequired,S="User interaction Required"):(null==f?void 0:f.secondary_error)===o.kTokenFetchProviderError?(y=i.H.AuthProviderNotSupported,S="Authentication provider not supported"):this.isRetryableError(f)?(y=i.H.MaySucceedOnRetry,S="Retryable fetch error"):"Auth private api is not allowed when MAM enabled."===S&&(y=i.H.AuthPrivateNotSupportedForMAM),{resource:e,error:{message:S,status:y,internalError:f},callerId:s.callerId,performance:{startTime:u,endTime:p}}}isRetryableError(e){if(null==e||!e.platform_error_code)return!1;const t=(e.platform_error_code>>>0).toString(16).toUpperCase();return void 0!==["CAA3","CAA7","CAA8","CAAD"].find((e=>t.startsWith(e)))||!!["CAA20005","CAA20008","CAA10001"].includes(t)}}},63011:function(e,t,n){"use strict";n.d(t,{BV:function(){return a},Kf:function(){return s},U:function(){return r}});var i=n(34004);class r{constructor(e,t,n=(()=>{})){if(this.authDataFetchStrategy=e,this.authDataCacheStrategy=t,this.logAuthEvent=n,!e)throw new Error("Fetch Strategy is not provided in ModularAuthManager");if(!t)throw new Error("Cache Strategy is not provided in ModularAuthManager")}async getAuthData(e,t=!1){const n=await this.authDataCacheStrategy.getAuthDataFromCache(e),{authToken:i,...r}=n||{};if(this.logAuthEvent(r,t),null!=n&&n.authToken)return n;const o=await this.authDataFetchStrategy.fetchAuthData(e,t),{authToken:a,...s}=o||{};return this.logAuthEvent(s,t),null!=o&&o.error||this.authDataCacheStrategy.setAuthDataToCache(e,o).then((e=>{this.logAuthEvent(e,t)})),o}}let o={getAuthData:async e=>({resource:e,error:{message:"Auth manager is not initialized",status:i.H.OtherError}})};function a(e){o=e}function s(){return o}},95508:function(e,t,n){"use strict";n.d(t,{W:function(){return a}});var i=n(21789),r=n(29989),o=n(83102);class a{constructor(e){if(this.authCallerGetter=e,!e)throw new Error("Auth Caller Getter is not provided in AadEdgeChromiumAuthCallerValidator")}async validateAuthCaller(){const{authCallerGetter:e}=this,{account:t,client:n}=await e()||{};return t?t.account_type===o.Qm.UNSUPPORTED_SOVEREIGNTY?{callerId:t.tenant_id,error:{message:"Edge unsupported sovereignty",status:r.$.UnsupportedSovereignty}}:t.account_type!==o.Qm.AAD?{callerId:t.tenant_id,error:{message:"Not valid AAD account.",status:r.$.OtherValidationError}}:null!=n&&n.id?(0,i.Yq)().IsChinaCompliance?{callerId:t.tenant_id,error:{message:"CN domain unsupported",status:r.$.CnDomain}}:{client:n,account:t,callerId:t.tenant_id}:{callerId:t.tenant_id,error:{message:"Client Id not provided.",status:r.$.OtherValidationError}}:{error:{message:"Account info not available",status:r.$.AccountInfoUnavailable}}}}},29989:function(e,t,n){"use strict";var i;n.d(t,{$:function(){return i}}),function(e){e.AccountInfoUnavailable="accountInfoUnavailable",e.UnsupportedSovereignty="unsupportedSovereignty",e.CnDomain="cnDomainUnsupported",e.OtherValidationError="otherValidationError"}(i||(i={}))},18860:function(e,t,n){"use strict";n.d(t,{P:function(){return p}});const i=/(?:Primary Error:\s)(\w+)/,r=/(?:Secondary Error:\s)(\w+)/,o=/(?:hex:)(\w+)/,a=/(?:Error code:\s)(\w+)/,s=/(?:error message:)(AADSTS\w+)/,c=/(?:Trace ID:\s)([0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})/,d=/(?:Correlation ID:\s)([0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})/,l=/(?:Timestamp:\s)([0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}Z)/,u=/([\w.-]+)@([\w-]+)((\.(\w){2,3})+)/g;function p(e,t){const n={};try{if(n.requestedResource=null==t?void 0:t.id,e&&e.internalError){const t=e.internalError;if(n.platformCode=t.platform_error_code||void 0,t.error_string){var p,h,g,m,f,v,y,S;const e=t.error_string.replace(u,"");n.primaryError=(null===(p=e.match(i))||void 0===p?void 0:p[1])||"",n.secondaryError=(null===(h=e.match(r))||void 0===h?void 0:h[1])||"",n.aadErrorCode=(null===(g=e.match(s))||void 0===g?void 0:g[1])||"",n.errorCode=(null===(m=e.match(a))||void 0===m?void 0:m[1])||"",n.hexCode=(null===(f=e.match(o))||void 0===f?void 0:f[1])||"",n.traceId=(null===(v=e.match(c))||void 0===v?void 0:v[1])||"",n.correlationId=(null===(y=e.match(d))||void 0===y?void 0:y[1])||"",n.timestamp=(null===(S=e.match(l))||void 0===S?void 0:S[1])||""}}}catch(e){return n}return n}},65902:function(e,t,n){"use strict";n.d(t,{oc:function(){return d}});var i=n(7476),r=n(10754),o=n(23549),a=n(29989),s=n(34004),c=n(18860);const d=(e,t)=>{((e,t)=>{var n,r;if(!e||!o.M0)return;let d;if(!e.error)return;switch(e.error.status){case s.H.InteractionRequired:case a.$.CnDomain:case a.$.UnsupportedSovereignty:case a.$.AccountInfoUnavailable:d=i.N1G;break;case a.$.OtherValidationError:case s.H.OtherError:d=i.etM;break;case s.H.AuthPrivateNotSupportedForMAM:default:return}const l={...(0,c.P)(e.error,e.resource),authPrivateApi:t?"acquireAccessTokenWithUserInteraction":"acquireAccessTokenSilently",resource:null===(n=e.resource)||void 0===n?void 0:n.friendlyName},u={id:e.callerId||"",status:!1,name:(null===(r=e.resource)||void 0===r?void 0:r.friendlyName)||"",info:{...d,message:e.error.message,pb:{...d.pb,customMessage:JSON.stringify(l)}}};o.M0.sendAuthEvent(u)})(e,t),((e,t)=>{var n;if(!e||!o.M0)return;if(!e.error)return;let r;switch(e.error.status){case s.H.InteractionRequired:case a.$.AccountInfoUnavailable:r=i.N1G;break;case a.$.OtherValidationError:case s.H.OtherError:r=i.etM;break;default:return}const d={...(0,c.P)(e.error,e.resource),authPrivateApi:t?"acquireAccessTokenWithUserInteraction":"acquireAccessTokenSilently",resource:null===(n=e.resource)||void 0===n?void 0:n.friendlyName};o.M0.sendAppErrorEvent({...r,message:e.error.message,pb:{...r.pb,customMessage:JSON.stringify(d)}})})(e,t),(e=>{var t,n;if(!e)return;const i=`Auth.AcquireAccessToken.${e.callerId}`,o=`${i}.Start`,a=`${i}.End`,{startTime:s,endTime:c}=e.performance||{},d=(0,r.Ou)();d&&(d[o]=(null===(t=e.performance)||void 0===t?void 0:t.startTime)||-1,d[a]=(null===(n=e.performance)||void 0===n?void 0:n.endTime)||-1,d[i]=c&&s?c-s:-1)})(e)}},35281:function(e,t,n){"use strict";n.d(t,{AN:function(){return a},VQ:function(){return s},bk:function(){return c},rZ:function(){return o}});var i=n(65774),r=n(21789);const o="stn",a="aad";function s(){return(0,i.m)().useEnterpriseCompliance()}async function c(){return(0,r.Yq)().AccountInfoPromise.then((e=>e&&e.tenant_id?e.oid?`Oid:${e.oid}@${e.tenant_id}`:`TID:${e.tenant_id}`:""))}},69438:function(e,t,n){"use strict";n.d(t,{$q:function(){return c},GL:function(){return d},I0:function(){return i},VT:function(){return o},X_:function(){return r},Yc:function(){return s},gQ:function(){return l},m2:function(){return a}});const i="at-bing",r="at-bing-dt",o="sign-in-active",a="initial-page-nav",s="sign-in-pending",c="sign-in-refreshed-page",d="authconstants-peregrine",l="sign-in-refresh-session"},15606:function(e,t,n){"use strict";n.d(t,{Yb:function(){return a},Z6:function(){return o},w0:function(){return s}});var i=n(42933),r=n(36926);const o=(0,n(76187).p)((()=>(0,i.oA)("auth","auth"))),a=e=>(0,r.FF)(`Auth.${e}`,{logStart:!0,logDuration:!0,firstTimeOnly:!0}),s=(e,t)=>(0,r.hf)(`Auth.${e}`,t,!0)},31479:function(e,t,n){"use strict";n.d(t,{ID:function(){return y},Z5:function(){return v}});var i=n(76733),r=n(21930),o=n(88826),a=n(7476),s=n(21789),c=n(65505),d=n(10788),l=n(23357),u=n(83102),p=n(95815),h=n(70169),g=n(52681),m=n(34479),f=n(84626);function v(e){s.jG.AuthCookieName=function(e){let t=s.jG.AuthCookieName;if(e)t=e.isAAD?"al_app_anon":"app_anon";else if((0,c.TJ)()){t=(0,d.XS)().accountType===u.Qm.AAD?"al_app_anon":"app_anon"}else t=(0,c.P8)()&&(0,h.xQ)()===u.Qm.AAD?"al_anon":"anon";return t}(e),(0,g.jW)(s.jG.AuthCookieName),(0,c.TJ)()&&(0,d.XS)().accountType===u.Qm.AAD&&y()}function y(e,t=!0){if(!(0,c._K)())return void i.k.log("Auth: WorkId work flow is not enabled in this environment");let n;(!(0,p.ej)(l.og)||!t)&&Promise.race([(0,r.b1)(),(0,m.Kb)(1e4).then((()=>n=!0))]).then((t=>{n&&(0,o.H)(a.nrW,"Work Id call was made before TTVR marker was set"),(0,f.qs)(e)}))}},11915:function(e,t,n){"use strict";n.d(t,{Gy:function(){return P},aH:function(){return S},cu:function(){return v},ks:function(){return y}});var i=n(46986),r=n(7476),o=n(23357),a=n(34832),s=n(21789),c=n(10788),d=n(7183),l=n(54297),u=n(95815),p=n(69438),h=n(23549),g=n(85485),m=n(49155);function f(){b(),T(),w(p.gQ)}function v(e=null){const t=decodeURIComponent((0,u.ej)("aace")),n=(0,u.ej)(o.nM),{child:r}=t&&(0,a.d)(t)||{};if(("edgeChromium"!=s.jG.AppType||!t||0!=r)&&t&&(1===r||n)){const t=s.jG.CurrentRequestTargetScope;t&&t.audienceMode!==i.F.Kids&&(e&&e(),(0,m.Z)())}}async function y(e,t=null,n=!1){const i=(0,u.ej)(o.m$),r=!!(0,u.ej)(c.g8);if(n){if(i)return C(),void await A(t,!1,!0);await A(t,r,!1)}else if(e){if(r||(0,u.sq)(c.g8,e,1,s.jG.HostPage.topDomain,"/",!0),!i)return void await A(t,!0,!1);f()}else{if(C(),i)return void await A(t,!1,!0);f()}}function S(){if((0,d.G)().getItem(p.Yc))return b(),void k();I()?x(p.$q):k(),x(p.Yc)}function C(){const e=s.jG.HostPage.topDomain;(0,u.sq)(c.g8,"",-1,e,"/",!0),(0,l.$o)().removeItem(p.I0)}function w(e){(0,d.G)().removeItem(e)}function b(){w(p.VT)}function T(){w(p.Yc)}function k(){w(p.$q)}function P(){const e=parseInt((0,d.G)().getItem(p.m2));return w(p.m2),Number.isInteger(e)?e:0}function I(){return!!(0,d.G)().getItem(p.VT)}async function A(e,t,n){if(t!==n&&await(0,g.FI)(),I())return h.M0.sendAppErrorEvent({...r.amS,message:`Auth refresh blocked. TokenExists: ${t}, CookieExists: ${n}.`}),void f();(0,d.G)().supported?(T(),E(),function(){const e=Date.now()-Math.round(window.performance.now());x(p.m2,e.toString())}(),h.M0.sendAppErrorEvent(r.XD),h.M0.sendAppErrorEvent({...r.G0e,message:`Sign In Refresh Required. TokenExists: ${t}, CookieExists: ${n}.`}),e&&e(),x(p.gQ),(0,m.Z)()):f()}function E(){x(p.VT)}function x(e,t="1"){(0,d.G)().setItem(e,t)}},70169:function(e,t,n){"use strict";n.d(t,{KW:function(){return y},XJ:function(){return C},YX:function(){return b},hC:function(){return S},rr:function(){return w},xQ:function(){return P}});var i=n(83102),r=n(65774),o=n(65505),a=n(13334),s=n(10788),c=n(96694),d=n(90158),l=n(83089),u=n(15606),p=n(55524),h=n(42429);const g="__SignInStateIsValid__",m="__SignInStatePromiseResolver__",f=()=>{p.Gq.set(g,new Promise((e=>{p.Gq.set(m,e)})))};f();const v=()=>p.Gq.get(g);function y(){const e=p.Gq.get(m);e&&e()}function S(){return(0,r.m)().getSignInState()===i.Hy.SignedIn}function C(){return T("getUserSignInState",(0,o.hk)())}function w(){return T("waitForSignInState",!0)}async function b(e=!0){const t={signedInStatus:i.Hy.NotSignedIn,accountType:null};if((0,d.wq)()&&e){await(0,l.mr)();const e=(0,l._4)();e&&(t.signedInStatus=e.isSignedIn?i.Hy.SignedIn:i.Hy.NotSignedIn,t.accountType=k(e.accountType))}else if((0,c.ID)()){const e=await(0,c.yb)();t.accountType=k(e.accountType),t.signedInStatus=e.tokenValue?i.Hy.SignedIn:i.Hy.NotSignedIn}else t.signedInStatus=await w(),t.accountType=P();return t}async function T(e,t){const n=(0,a.nP)().UserIsSignedIn;if(null!=n)return n?i.Hy.SignedIn:i.Hy.NotSignedIn;const o=(0,u.Z6)(),s=o&&o.startMeasure(e).endMeasure;let c;t&&(c=(0,u.Yb)("GetSignInStateAsync"),(0,r.m)().initOverrides(),await v());const d=(0,r.m)().getSignInState();return s&&s(),c&&c(),d}function k(e=null){return"MSA"===e?i.Qm.MSA:"AAD"===e?i.Qm.AAD:void 0}function P(){if((0,o.TJ)()){const e=(0,s.XS)();return e.isSignedIn===i.Hy.SignedIn&&e.accountType}if((0,o.P8)())return(0,h.bW)()}},51993:function(e,t,n){"use strict";n.d(t,{M:function(){return u}});var i=n(83102),r=n(65505),o=n(10788),a=n(88749),s=n(76716),c=n(6914),d=n(70169),l=n(96694);async function u(e){let t,n,u;if(e)t=e.isMsa,n=e.isAAD,u=e.isSSO;else if((0,l.ID)()){t=!!(await(0,l.yb)()).tokenValue}else if((0,r.TJ)()){const e=(0,o.XS)();u=e.isSignedIn===i.Hy.SignedIn,u&&(t=e.accountType===i.Qm.MSA,n=e.accountType===i.Qm.AAD)}else if((0,r.P8)()){const e=(0,d.xQ)();t=e===i.Qm.MSA,n=e===i.Qm.AAD,u=!(0,a.YU)()}else t=await(0,d.XJ)()===i.Hy.SignedIn;const p={aadState:n?1:0,isSignedIn:t,isSso:u},h=function(e,t){let n;const i=(0,s.E)()===s.M.Web?"anon":"app_anon";let r=!1;t&&(r=(0,c.u6)(i));n=r?"AAD-AL":t?"AAD":e?"MSA":"NA";return n}(t,n),g={...p,loginState:h};return Promise.resolve(g)}},85485:function(e,t,n){"use strict";n.d(t,{B0:function(){return b},B9:function(){return T},FA:function(){return S},FI:function(){return C}});var i=n(83102),r=n(71778),o=n(65505),a=n(21789),s=n(23357),c=n(10788),d=n(65774),l=n(23979),u=n(6914),p=n(70169),h=n(42429),g=n(23549),m=n(69438),f=n(95815),v=n(13578),y=n(15606);async function S(e,t,n,i){const a=(0,y.Z6)(),s=a&&a.startMeasure("updateAuthState").endMeasure;try{if(n||!r.yb&&!r.R0)await C(i),await w(t);else if((0,o.P8)())await(0,h.GQ)(),await w(t,!1);else{const e=await(0,r.ot)({id:"appanoncookie"}),n=e&&e.payload&&e.payload.appAnonCookieExists;await w(t,n)}}catch(t){await w(),e(t)}s&&s()}async function C(e,t){(0,o.P8)()?await(0,h.GQ)():function(){if((0,o.TJ)()){const e=(0,c.XS)(),t=!!(0,f.ej)("aace");if((0,l.vs)()){if(e.accountType===i.Qm.MSA)return!t;if(e.accountType===i.Qm.AAD)return(0,u.u6)()&&!(0,o._K)()}}else if((0,o.Pz)())return!0}()&&await function(e,t){const n=new URL(`https://api.msn.${a.jG.IsChinaCompliance?"cn":"com"}/auth/cookie/appanon`),i={credentials:"include"};return e&&(i.headers=e),n.searchParams.set("apikey",a.jG.OneServiceApiKey),n.searchParams.set("ocid",t||m.GL),n.searchParams.set("activityId",a.jG.ActivityId),n.searchParams.set("scn","app_anon"),fetch(n.href,i)}(e,t)}async function w(e,t){let n=!1;const a=(0,y.Z6)(),l=a&&a.startMeasure("handleSignInStateUpdateAsync").endMeasure;if((0,o.P8)()){const{accessToken:e}=((0,o.hk)()?await(0,h.IY)():(0,o.aS)())||{},t=(0,o.me)(e);(0,v.Z)(t)||(n=!0,(0,r.mS)({id:"AuthHeaders",type:"command",payload:t}))}else if(n=null!=(0,f.ej)(s.m$),(0,o.TJ)()){(0,c.KO)();n=(0,c.XS)().isSignedIn===i.Hy.SignedIn}const u=n?i.Hy.SignedIn:i.Hy.NotSignedIn;!1===t&&u===i.Hy.SignedIn&&((0,r.mS)({id:"updatemyfeed"}),(0,r.mS)({id:"updatepdp"}),(0,r.mS)({id:"UpdateMyBriefing"})),(0,d.m)().setSignInState(u),(0,p.KW)(),void 0!==e&&e!==u&&g.M0.addOrUpdateTmplProperty("signInUpdate","1"),l&&l()}function b(){return(0,p.hC)()&&(!(0,o.P8)()||(0,p.xQ)()===i.Qm.MSA)}function T(){return(0,p.xQ)()===i.Qm.AAD}},96694:function(e,t,n){"use strict";n.d(t,{ID:function(){return s},Vo:function(){return d},yb:function(){return c}});var i=n(31558),r=n(21789),o=n(76187),a=n(34479);function s(){return r.jG.WidgetAttributes&&"shopping"==r.jG.AppType}const c=(0,o.p)((async()=>{let e;const t=(0,i.N)()&&window.__pw_options,n=t&&t.auth&&t.auth.serviceToken;if("object"==typeof n&&n.then){const t=3e3;e=await Promise.race([n,(0,a.Kb)(t).then((()=>null))])}return e||{tokenValue:void 0,accountType:void 0}}));function d(){c.cache.clear()}},84626:function(e,t,n){"use strict";n.d(t,{qs:function(){return v}});var i,r=n(42933),o=n(76733),a=n(88826),s=n(7476),c=n(56687),d=n(65505),l=n(76716),u=n(21789),p=n(18562),h=n(23357),g=n(69438),m=n(95815),f=n(15606);function v(e){return(0,r.fW)((()=>y("Acquire",e)),"tryAcquire1SWorkIdCookies",(0,f.Z6)())}async function y(e,t){if(!(0,d._K)())return void o.k.log("Auth: WorkId work flow is not enabled in this environment");const n="Acquire"===e,i="Reset"===e,r=n||i?"GET":"DELETE",f=(0,l.E)(),v=`https://api.msn.${u.jG.IsChinaCompliance?"cn":"com"}/auth/cookie/${i?"wid":"AAD"}`;let y,S;try{var C;let o;if(y=await fetch(`${v}?apikey=${u.jG.OneServiceApiKey}&ocid=${g.GL}&activityId=${u.jG.ActivityId}&it=${f}${i?"&reset=true":""}`,{method:r,credentials:"include",headers:(0,d.me)(t)||void 0}),(0,p.Nv)("prg-1s-workid")&&y.ok){const e=n&&await y.json(),{consent:t,migrated:i,userType:r}=e||{};o={consent:null==t?void 0:t.toLowerCase(),migrated:"yes"===(null==i?void 0:i.toLowerCase()),userType:null==r?void 0:r.toLowerCase()}}const a=f===l.M.Web?h.yz:h.og,s=!!(0,m.ej)(a),c=n&&(null===(C=o)||void 0===C?void 0:C.migrated)||i;c!==s&&(S=new Error(`${c?"Expected":"Unexpected"} cookie ${a} is ${c?"missing":"still present"} after ${e} 1S call to ${v} with status ${y.status}`))}catch(e){S=e}const w=!S&&y&&y.ok?null:`Error in ${e} mode in ${v} call. ${S||""}`;w&&(0,a.H)(s.FTS,w,S&&(S.message||(0,c.n)(S)))}!function(e){e.Acquire="Acquire",e.Delete="Delete",e.Reset="Reset"}(i||(i={}))},25745:function(e,t,n){"use strict";n.d(t,{B:function(){return m}});var i=n(59489),r=n(54297),o=n(13334),a=n(10788),s=n(95815),c=n(69438),d=n(11915),l=n(7476),u=n(23549),p=n(31558);const h="f3222e55-ab35-49de-81f3-88a3be08cf77",g="service::www.msn.com::mbi_ssl";async function m(e,t,n=!1){const m=window.chrome,v=m&&m.authPrivate,y=e&&e.accountType===i.l.MSA;if(!v||!y)return await(0,d.ks)(null,null,n),void(0,r.$o)().removeItem(c.I0);(0,p.N)()&&o.Al.IsPrerender&&"visible"!==document.visibilityState||(0,d.aH)();const S=await async function(){const e=(0,s.ej)(a.g8);if(!e)return u.M0.sendAppErrorEvent({...l.Mef,message:"MSA user, lt cookie not present.",pb:{...l.Mef.pb,isPrerender:o.Al.IsPrerender,msnCookiePresent:e}}),!1;return await(0,d.ks)(e),!0}(),C=function(){var e,t;const n=null===(e=(0,r.$o)())||void 0===e?void 0:e.getItem(c.I0),i=null===(t=(0,r.$o)())||void 0===t?void 0:t.getItem(c.X_);if(n&&i){const e=Number(i);if(e){const t=36e5,n=(new Date).getTime()-new Date(e).getTime();return Math.ceil(n/t)<12}}return u.M0.sendAppErrorEvent({...l.sNU,message:"MSA user, Bing token not found.",pb:{...l.sNU.pb,isPrerender:o.Al.IsPrerender,bingTokenFound:null!=n}}),!1}();if(!S){const i={account_id:e.accountId,account_type:e.accountType,client_id:t||h,scope_or_resource:g},r=await f(i);if(r&&!r.is_success&&r.error_info&&0==r.error_info.primary_error&&0==r.error_info.platform_error_code&&""!=r.error_string&&(0,s.ej)(a.g8))return w=r.error_string,void u.M0.sendAppErrorEvent({...l.u8h,message:"Access token fetch failed. Used LT cookie",pb:{...l.u8h.pb,errorMessage:w,isPrerender:o.Al.IsPrerender}});await async function(e,t=!1){await(0,d.ks)(e&&e.is_success&&e.is_token_valid&&e.access_token,null,t)}(r,n)}var w,b;if(!C){const n={account_id:e.accountId,account_type:e.accountType,client_id:t||h,scope_or_resource:"service::bing.com::MBI_SSL"},i=await f(n);(b=i)&&b.is_success&&b.is_token_valid&&b.access_token&&((0,r.$o)().setItem(c.I0,b.access_token),(0,r.$o)().setItem(c.X_,(new Date).getTime().toString()),(0,s.sq)(c.I0,"",-1,"msn.com","/",!0))}}async function f(e){const t=await function(e){return new Promise((t=>{window.chrome.authPrivate.acquireAccessTokenSilently(e,(e=>{t(e)}))}))}(e);return t&&t.is_success||function(e,t){if(!e||!e.is_success){const n=t.scope_or_resource==g?l.npG:l.PAZ;u.M0.sendAppErrorEvent({...n,message:"Failed to acquire MSA access token.",pb:{...n.pb,customMessage:e&&e.error_info}})}}(t,e),t}},35620:function(e,t,n){"use strict";n.d(t,{h:function(){return u}});var i=n(56687),r=n(76187),o=n(54557),a=n(89912),s=n(23549),c=n(45106),d=n(21937);const l=(0,r.p)((()=>(0,d.vp)((0,o.AE)("MUID"),100)<2));function u(e,t,n=null){s.M0.sendAppErrorEvent({...e,message:t,pb:{...e.pb,customMessage:(0,i.n)(n),authRecordTrail:l()&&(0,c.xI)()||void 0,tokenCacheState:(0,a.wX)()}})}},21937:function(e,t,n){"use strict";n.d(t,{sm:function(){return b},lx:function(){return f},LT:function(){return y},Df:function(){return S},sA:function(){return C},nt:function(){return w},vp:function(){return T},nq:function(){return m},RH:function(){return v}});var i=n(4619),r=n(21789),o=n(65505),a=n(54557),s=n(34832);const c=()=>{const e=(0,a.AE)("lh",!0),t=e&&(0,s.d)(e),{login_hint:n}=t||{};return n&&t};var d=n(23357),l=n(7394),u=n(83102),p=n(13583),h=n(76610),g=n(95815);function m(e){const t=encodeURIComponent(JSON.stringify(e||{}));(0,g.sq)(i.sM,t,i.ac,r.jG.HostPage.topDomain,"/",!1,p.f.Strict),(0,o.yd)()}function f(e){if(e)return function(e){return e&&e.tenantId===l.bc}(e)?u.Qm.MSA:u.Qm.AAD}async function v(e){let t;if(e){t=(await y()).find((t=>t.username===e))}else{const e=C();if(e){t=(await y()).find((t=>S(t)===e))}}return t}async function y(){const e=await(0,h.Yu)();return await e.handleRedirectPromise(),e.getAllAccounts()}function S(e){return e&&e.idTokenClaims&&e.idTokenClaims[l.an]}function C(){const e=(0,i.x6)();return e&&e.login_hint}function w(){const e=c();return e&&e.login_hint}function b(){(0,g.sq)(d.cs,null,-1,r.jG.HostPage.topDomain,"/")}function T(e,t=1e3){let n=0;for(let t=0,i=e&&e.length;t<i;t++){n=(n<<5)-n+e.charCodeAt(t),n&=n}return n<0&&(n+=2147483647),n%t}},45106:function(e,t,n){"use strict";n.d(t,{Ov:function(){return T},pD:function(){return P},xI:function(){return k}});var i=n(7394),r=n(83102),o=n(54297),a=n(76187),s=n(34832),c=n(13334),d=n(4619),l=n(54557),u=n(65774),p=n(23357),h=n(88749),g=n(55377),m=n(30323),f=n(16614),v=n(62515),y=n(21937),S=n(76610),C=n(76733);let w;const b=(0,o.$o)();async function T(e,t){const n={time:(new Date).toISOString(),action:e.toString(),result:t,state:await A()};C.k.log(`dual-auth: authRecord entry - ${e}: ${t}`),function(e){if(!e)return void C.k.logError("dual-auth: authRecord is null or undefined");w||(w=I());w.push(e),P.cache.clear();const t=w.slice(-i.tk);b.setItem(i.tU,JSON.stringify(t))}(n)}function k(){return function(){if(w)return w;return w=I(),w}().slice(-i.tk)}const P=(0,a.p)((()=>(w||(w=I()),function(e){const t=";";let n={};if(!e)return n;return n={a:"",r:"",s:[],t:[]},e.forEach(((i,r)=>{n.a+=i.action+t,n.r+=function(e){if(!e)return null;if(e.match(/\bsuccess\b/i))return"S";if(e.match(/\bfailure\b/i))return"F";{let t=e.match(/tryInitiateEarlyAuth: Finalized sign in state (\w+) from auth-(\w+)/);return t?`EarlyAuth: ${t[1]} from ${t[2]}`:(t=e.match(/initiateSSOCore: (\w+) - SSO data from the (\w+) auth flow[^]*/),t?`SSO: ${t[1]} from ${t[2]}`:e.toString())}}(i.result)+t,n.s.push(function(e,t){if(!e)return{};if(e===t)return e;const n=(0,g.Z)((0,m.Z)(e),(0,m.Z)(t),f.Z);return(0,v.Z)(n)}(i.state,r>0?e[r-1].state:i.state)),n.t.push(function(e,t){if(!e)return;if(e===t)return e;const n=new Date(e),i=n&&n.getTime(),r=t&&new Date(t),o=r&&r.getTime();if(i&&o)return(i-o).toString()}(i.time,r>0?e[r-1].time:i.time))})),n}(w))));function I(){if(!b.supported)return void C.k.log("dual-auth: Local storage access is not supported");const e=b.getItem(i.tU);return(0,s.d)(e)||[]}async function A(){var e;const t=c.Al.ClientSettings,n=(0,S.dn)(),i=n&&(0,y.lx)(await(0,y.RH)())||(null===(e=(0,d.x6)())||void 0===e?void 0:e.account_type)||void 0,o=(0,l.AE)(d.sM),{login_hint:a}=o&&(0,s.d)(o)||{},g=a&&0!==Object.keys(a).length;return{isSignedIn:(0,u.m)().getSignInState()===r.Hy.SignedIn,accountType:i,signedInAccounts:n?await E():void 0,storage:{aace:(0,l.AE)(p.m$),ace:(0,l.AE)(p.Li),als:(0,l.AE)(p.tX,!0),child:(0,l.AE)(p.nM),currentAccount:g,loginFlowMarker:(0,h.YU)(),logoutFlowMarker:(0,h.SY)(),editFlowMarker:(0,h.hU)(),osate:(0,l.AE)(p.cs)},appType:t&&t.apptype,pageType:t&&t.pagetype}}async function E(){if(!await(0,S.Yu)())return[-1];return(await(0,y.LT)()).map((e=>(0,y.vp)(e.username)))}},7394:function(e,t,n){"use strict";n.d(t,{BS:function(){return c},Ic:function(){return r},QL:function(){return o},an:function(){return i},bc:function(){return u},g4:function(){return p},kQ:function(){return d},tU:function(){return a},tk:function(){return s},w6:function(){return l}});const i="login_hint",r=300,o=3600,a="authRecordTrail",s=10,c="InteractionRequiredAuthError",d="BrowserAuthError",l="no_tokens_found",u="9188040d-6c67-4c5b-b112-36a304b66dad";var p,h;!function(e){e.tryAcquire1STokenLite="ATL",e.acquireTokenSilent="ATS",e.tryAcquire1STokenProfileSwitch="ATP",e.clearAccountLinkingCookies="CAL",e.jwtSSOService="JWT",e.interactiveLogin="ILO",e.loginRedirect="LRD",e.loginPopup="LPP",e.logout="LGT",e.ssoSilent="SSL",e.singleSignOn="SSO",e.waitFor1SToken="W1S"}(p||(p={})),function(e){e[e.NotAttempted=0]="NotAttempted",e[e.Fail=1]="Fail",e[e.FailTrySSO=2]="FailTrySSO",e[e.Success=3]="Success"}(h||(h={}))},76610:function(e,t,n){"use strict";n.d(t,{Bj:function(){return D},Oo:function(){return F},Yu:function(){return R},dn:function(){return M},qW:function(){return L}});var i=n(7394),r=n(76733),o=n(10754),a=n(21930),s=n(88826),c=n(7476),d=n(56687),l=n(45870),u=n(34479),p=n(92095),h=n(54297),g=n(21789),m=n(13334),f=n(65505),v=n(78672),y=n(31558),S=n(9791),C=n(11935),w=n(15606);const b="2.18.0",T="2.24.0",k="1p-2.24.0",P="2.16";let I,A,E,x;function M(){return A}function L(e=!1){const t={scopes:["User.Read"],loginHint:"",redirectUri:O(e)};return e||Object.assign(t,{...N(),extraQueryParameters:{edge_suppress_profile_switch:"1"}}),t}function D(e){return{scopes:e,forceRefresh:!1,redirectUri:O(!0)}}I="localhost.msn.com"===(0,v.Td)(),x=(0,v.zw)().toLowerCase().endsWith(".cn"),E=((0,v.zp)().match(/\bpr=([\d]+)\b/)||{})[1];const R=(0,S.Z)((async e=>{await async function(){if(!(0,y.N)())return;let e;(0,f.lT)()&&(await Promise.race([B.getResultAsync(),(0,a.b1)(),(0,u.Kb)(1e4).then((()=>e=!0))]),e&&(0,s.H)(c.gZU,"Loading MSAL before TTVR in delay load"));const t=(0,w.Z6)(),n=t&&t.startMeasure("loadMsalScript").endMeasure;let i;const r=new Promise((e=>{i=e})),o=e=>{n&&n({customSuffix:e}),i()},l=W(`auth/msal-browser-${$()}.min.js`),p=(0,v.b0)(l);return p.onload=()=>o(),p.onerror=e=>{(0,s.H)(c.ydI,"Error in loading MSAL script",(0,d.n)(e)),o("error")},document.head.appendChild(p),await r}();const t=window.msal;A=!!t,t&&!U()&&function(e){const t=(0,h.$o)();t.keys().forEach((e=>{const n=e.match(/-[-]+/),i=n&&n[0].length;i>=2&&(2===i&&e.includes("accesstoken")||3===i&&e.includes("idtoken")||4===i&&e.includes("refreshtoken"))&&t.removeItem(e)}))}();const n=H()?{performanceTelemetryConfiguration:{samplingPrecentage:1}}:void 0;if(t&&t.PublicClientApplication){const a=new t.PublicClientApplication(function(e){const{tenantScope:t="Dual",tenantId:n}=e||{};let o;return o=n||("MSA"===t?"consumers":"AAD"===t?"organizations":"common"),{auth:{clientId:p.I4,authority:`https://login.microsoftonline.com/${o}`,redirectUri:O(),navigateToLoginRequestUrl:!0},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(e,t,n)=>{if(!n)switch(e){case"Error":return void r.k.logError("dual-auth: "+t.toString());case"Info":case"Verbose":case"Warning":return void r.k.log("dual-auth: "+t.toString())}}},tokenRenewalOffsetSeconds:i.Ic}}}(e),n);return function(e){if(!U()||!m.Al.CurrentFlightSet.has("prg-msal224-ts")&&!g.jG.IsDebug)return;let t=1;const n=(0,o.Ou)(),i=(e,i)=>n[`MSAL.${t}.${e}`]=i,r=e=>Math.round(10*e)/10;e.addPerformanceCallback((e=>{e.forEach((e=>{const n=e.name;i(`${n}-start`,r(e.startTimeMs-performance.timeOrigin)),i(n,r(e.durationMs)),i("meta",`c:${e.fromCache?1:0}-v:${e.startPageVisibility}-ok:${e.success?1:0}`),i("cv",e.correlationId);const o="DurationMs";(0,C.Z)(e,((e,t)=>{if(t.endsWith(o)){const n=t.substring(0,t.length-o.length);i(`fn.${n}`,e)}})),t++}))}))}(a),a}}));function F(){B.set()}function O(e){return W(e?"auth/auth-redirect-blank.html":"0/auth/auth-redirect.html","https://"+(!!(0,v.Td)().match(/\.msn\.(com|cn)$/i)?(0,v.zw)():"www.msn."+(x?"cn":"com")),!1)}const B=new l.o;function N(){const e={appType:g.jG.AppType,authRedirJsVer:P,buildVersion:g.jG.BuildVersion,debug:g.jG.IsDebug?1:void 0,msalJsVer:$(),pr:E,returnUrl:(0,v.l4)()};return{state:encodeURIComponent(JSON.stringify(e))}}function $(){return H()?k:_()?T:b}function U(){return _()||H()}function _(){return m.Al.CurrentFlightSet.has("prg-msal224-b")}function H(){return m.Al.CurrentFlightSet.has("prg-msal224-1p")}function W(e,t="https://assets.msn."+(x?"cn":"com"),n=!0){let i="/latest",r=t;E&&n?i=`/pr-${E}`:I&&(i="",r=`https://${(0,v.zw)()}`);return`${r}/staticsb/statics${i}/${e}`}},42429:function(e,t,n){"use strict";n.d(t,{tE:function(){return Q},bW:function(){return K},x4:function(){return Z},GQ:function(){return W},vW:function(){return V},IY:function(){return j}});var i,r=n(7394),o=n(42933),a=n(76733),s=n(56687),c=n(7476),d=n(45870),l=n(34479),u=n(76187),p=n(88749),h=n(23979),g=n(4619),m=n(65505),f=n(89912),v=n(21937),y=n(76610),S=n(15606),C=n(21789),w=n(23357),b=n(45106),T=n(69438),k=n(95815),P=n(35620);async function I(e,t){const n=t&&t.accessToken,i="Acquire"===e;if(!n&&i){const e="Invalid access token in jwtSSOCore";return(0,b.Ov)(r.g4.jwtSSOService,e),void(0,P.h)(c.fvr,e)}let o,a;try{o=await fetch(`https://api.msn.${C.jG.IsChinaCompliance?"cn":"com"}/auth/token/v2/jwtsso?apikey=${C.jG.OneServiceApiKey}&ocid=${T.GL}&activityId=${C.jG.ActivityId}`,{method:i?"POST":"DELETE",credentials:"include",body:JSON.stringify({userAccessToken:n})||void 0,headers:(0,m.me)(n)||void 0});i!==!!(0,k.ej)(w.cs)&&(a=new Error(`${i?"Expected":"Unexpected"} cookie ${w.cs} is ${i?"missing":"still present"} after ${e} JwtSSO call`))}catch(e){a=e}const s=!a&&o&&o.ok?null:`Error in ${e} mode in jwtSSO call. ${a||""}`;s&&(0,P.h)(c.fvr,s),(0,b.Ov)(r.g4.jwtSSOService,`${s||"Success"}`)}!function(e){e.Acquire="Acquire",e.Delete="Delete"}(i||(i={}));var A=n(84626),E=n(83102),x=n(31558),M=n(9791),L=n(76716),D=n(6914);const R=`apikey=${C.jG.OneServiceApiKey}&ocid=Peregrine&it=${(0,L.E)()}&activityId=${C.jG.ActivityId}`;function F(){return(0,o.fW)((()=>async function(){let e,t;try{e=await fetch(`https://api.msn.${C.jG.IsChinaCompliance?"cn":"com"}/auth/cookie/clearALCookies?${R}`,{method:"DELETE",credentials:"include"}),(0,D.EX)();if((0,D.u6)()){const e=decodeURIComponent((0,k.ej)(w.tX));t=new Error(`Account linking cookie ${e} indicates account is still linked after clearALCookies call`)}}catch(e){t=e}const n=!t&&e&&e.ok&&200===e.status?null:`Error in clearALCookies call. ${t||""}`;n&&(0,P.h)(c.L8S,n),(0,b.Ov)(r.g4.clearAccountLinkingCookies,`${n||"Success"}`)}()),"tryDelete1SAcctLnkCookies",(0,S.Z6)())}const O=7e3,B=7e3;let N,$=!1;const U={acquireTokenStatus:0,accessTokenResult1S:null,currentAccountInfo:null};let _=new d.o;const H=(0,u.p)((async()=>{const e=N||await(0,y.Yu)(),t=await(0,o.fW)((()=>null==e?void 0:e.handleRedirectPromise()),"handleRedirect",(0,S.Z6)());if(t)return a.k.log("dual-auth: Signing in through interactive login loginResponse: "+JSON.stringify(t,null,4)),V(t).finally((()=>{(0,p.dy)()})),(0,b.Ov)(r.g4.interactiveLogin,"Success"),t;(0,p.dy)()}));async function W(e){const{userName:t,enforceTimeLimit:n}=e||{};$=!0;const i=await H();if(i)return i;let r;return r=t?(0,v.Df)(await(0,v.RH)(t))||t:(0,v.sA)()||(0,h.E1)()||(0,v.nt)(),!r&&(0,g.mb)()?(V(null,!0),void F()):await J((()=>q(r)),"ssoSilent",n?B:-1)}const q=(0,M.Z)((async e=>{var t;let n;e||a.k.log("dual-auth: login_hint is not available. ssoSilent may not work!");const i=N||await(0,y.Yu)(),o=(0,S.Yb)("SSOSilentCoreAndToken"),d=(0,S.Z6)(),l=d&&d.startMeasure("ssoSilentCore").endMeasure,u={...(0,y.qW)(!0),loginHint:e},h=(0,x.N)()&&(null===(t=history)||void 0===t?void 0:t.length);try{n=await i.ssoSilent(u)}catch(t){a.k.log(`dual-auth: ssoSilent failed! : ${t}`),(0,b.Ov)(r.g4.ssoSilent,(0,s.n)(t));const n=(0,g.x6)();if(t.name===r.BS&&n){if((0,p.m5)(),!(0,p.jG)()||!(0,m.P8)())return void await G(null,!0);{const t={...(0,y.qW)(),loginHint:e};i.acquireTokenRedirect(t)}}(n||(0,m.iG)())&&t.name!==r.BS&&t.name!==r.kQ&&(0,P.h)(c.WB4,"Error in ssoSilent call",t)}finally{a.k.log(`dual-auth: getAllAccounts AFTER ${n?"SUCCESSFUL":"UNSUCCESSFUL"} ssoSilent: ${JSON.stringify((0,v.LT)(),null,4)}`),n&&(a.k.log(`dual-auth: loginResponse AFTER SUCCESSFUL ssoSilent: ${JSON.stringify(n,null,4)}`),(0,b.Ov)(r.g4.ssoSilent,"Success. User: "+(0,v.vp)(n.account.username))),V(n).finally((()=>{o(),(0,p.bf)(),(0,p.bq)()})),l&&l({customSuffix:(n?n.fromCache&&"cache":"error")||void 0})}return h&&history.length===h+1&&dispatchEvent(new CustomEvent("ssoSilentHistChanged")),n}));async function V(e,t=!1){const n=await G(e,t);await z(n)}async function G(e,t=!1){if(e){const t=U.currentAccountInfo=e.account,n=(0,v.Df)(t),i=(0,v.lx)(t);return(0,v.nq)({login_hint:n,account_type:i}),t}t&&((0,v.nq)(),(0,f.tx)(null),(0,p.bf)(),(0,p.bq)(),(0,p.hq)(),await Promise.all([(0,o.fW)((()=>I("Delete")),"tryDelete1SJwtCookies",(0,S.Z6)()),F()]),(0,v.sm)())}async function z(e,t=!1,n=!1,i=!1){let d=U.accessTokenResult1S;const l=new Date(d&&d.expiresOn),u=l&&l.getTime()&&l>new Date;if(d&&3===U.acquireTokenStatus&&u)return void a.k.log(`dual-auth: tryAcquire1STokenSilently: token is still valid - expiry: ${new Date(d&&d.extExpiresOn)}`);const h=(0,v.lx)(e)===E.Qm.AAD,g=h?["https://enterprisenews.microsoft.com/User.Read"]:["https://oneservice.microsoft.com/OneService.Read"];try{if(d=await async function(e,t,n=!1,i=!1){if(!t)return void a.k.log("dual-auth: tryAcquireTokenSilently received empty account -- API calls may not be authenticated!");const o=N||await(0,y.Yu)(),d={...(0,y.Bj)(e),forceRefresh:i,account:t};let l;const u=(0,S.Z6)(),h=u&&u.startMeasure("tryAcquireTokenSilently").endMeasure;try{l=await J((()=>o.acquireTokenSilent(d)),"acquireTokenSilent",n?O:-1)}catch(e){throw a.k.log(`dual-auth: acquireTokenSilent failed! : ${e}`),(0,b.Ov)(r.g4.acquireTokenSilent,(0,s.n)(e)),(0,P.h)(c.Bjk,"acquireTokenSilent call failed",e),e.name===r.BS&&(0,p.jG)()&&o.acquireTokenRedirect(d),l=null,e}finally{h&&h({customSuffix:(l?l.fromCache&&"cache":"error")||void 0}),l&&(0,b.Ov)(r.g4.acquireTokenSilent,"Success"),a.k.log(`dual-auth: acquireTokenSilent for scopes: ${e} was ${l?"SUCCESSFUL":"UNSUCCESSFUL"} accessTokenResult: ${JSON.stringify(l,null,4)}`)}return l}(g,e,n,i),d){if(U.acquireTokenStatus=3,U.accessTokenResult1S=d,(0,f.tx)(d),!d.fromCache){const e=+new Date;(0,S.w0)("OSATExpMins",Math.floor((+d.expiresOn-e)/6e4))}m=d,(0,o.fW)((()=>I("Acquire",m)),"tryAcquire1SJwtCookies",(0,S.Z6)()),h&&(0,A.qs)(d.accessToken)}}catch(e){if(d=U.accessTokenResult1S=null,e.name===r.BS&&e.errorCode===r.w6&&t)return void(U.acquireTokenStatus=2);U.acquireTokenStatus=1}var m;_.set(d);const C=function(e){if(!e)return null;const t=e&&e.extExpiresOn,n=t&&new Date(t),i=n&&n.getTime(),o=(new Date).getTime();let a;const s=6e4,c=1e3*(r.QL-r.Ic),d=1e3*r.Ic;i&&i>o?(a=i-o,a<=d&&(a=0)):a=c;return a+s}(d);C&&setTimeout((()=>z(e)),C)}async function j(){if(U.accessTokenResult1S)return U.accessTokenResult1S;if(!$){const e="Wait for 1SToken failed because auth flow was not started";return a.k.logError(`dual-auth: ${e} -- so returning early without the 1S access token`),(0,b.Ov)(r.g4.waitFor1SToken,e),(0,P.h)(c.YHd,e),void _.set(null)}const e=(0,S.Yb)("Wait1SToken"),t=await(0,o.fW)((()=>_.getResultAsync()),"waitFor1SToken",(0,S.Z6)());return e(),t}function K(){const{currentAccountInfo:e}=U;if(e)return(0,v.lx)(e);const t=(0,g.x6)();return t?t.account_type:void 0}function Q(){return(0,v.lx)(U.currentAccountInfo)===E.Qm.AAD?U.currentAccountInfo.tenantId:""}async function Z(e){(0,y.Oo)();const{loginHint:t,forceLoginPrompt:n,tenantOptions:i,redirectStartPage:o}=e||{},a=N||await(0,y.Yu)(i);if(!a)return;const s=n?"login":"select_account",c={...(0,y.qW)(),prompt:s},{tenantScope:d,tenantId:l}=i||{},u=!(!t||!d&&!l);u&&Object.assign(c,{prompt:void 0,loginHint:t,extraQueryParameters:{domain_hint:"MSA"===d||l===r.bc?"consumers":"organizations"}}),o&&(c.redirectStartPage=o),(0,b.Ov)(r.g4.interactiveLogin,"Redirect start"+(u?" with login hint":"")),await a.loginRedirect(c)}async function J(e,t,n){let i,r=n,o=!1;return(0,x.N)()&&(location.search.includes(`${t}NoTimeout`)?r=999999999:location.search.includes(`${t}ForceDelay`)?(e=()=>(0,l.Kb)(1e4).then(e),r+=2e4):location.search.includes(`${t}ForceTimeout`)?(r=0,o=!0):n<0&&(r=-1)),r<0?await e():(await Promise.race([e().then((e=>i=e)),(0,l.Kb)(r).then((()=>Promise.reject(new Error(`Operation ${t} timed out after ${r}ms`))))]),o?void 0:i)}},44035:function(e,t,n){"use strict";var i;n.d(t,{cN:function(){return o},cq:function(){return r},pb:function(){return i}}),function(e){e[e.Immediately=0]="Immediately",e[e.OnPageLoad=1]="OnPageLoad",e[e.OnUserInteraction=2]="OnUserInteraction",e[e.OnBusinessSearchResultsReady=3]="OnBusinessSearchResultsReady"}(i||(i={}));const r="Search-AutoSuggest",o="q"},47386:function(e,t,n){"use strict";n.d(t,{fF:function(){return m}});var i=n(44035),r=n(21789),o=n(92100),a=n(13334),s=n(31558),c=n(78672),d=n(95815),l=n(85663);class u{constructor(e,t,n,i,r){this.autoSuggestProperties=e,this.osMarket=t,this.osLanguage=n,this.requestId=i,this.isDarkMode=r}addAutoSuggest(e){if(!(0,s.N)())return!1;if(r.jG.CurrentRequestTargetScope&&"kids"===r.jG.CurrentRequestTargetScope.audienceMode)return!1;const t=this.isDisabled(),n=window[u.globalObjectName];if(n)return n.enable(!t),this.updateAutoSuggestSessionId(),!0;if(t)return!1;const i=this.getCompleteUrl(),o=(0,c.b0)(i,void 0,!0,"use-credentials");o.onload=e;return document.getElementsByTagName("head")[0].appendChild(o),!0}invokeCookieSharing(){p((0,d.ej)(u.sharedCookieName),5)||(0,d.sq)(u.sharedCookieName,"SID=00",365,u.cookieDomain,"/")}isDisabled(){return new RegExp("\\b"+u.cookieCrumb+"=0\\b","i").test((0,d.ej)(u.cookieName))}updateAutoSuggestSessionId(){const e=/SID=[\da-z]+/i;if(!this.partnerSessionId){const t=(0,d.ej)(u.sharedCookieName);if(p(t,4)){const n=t.match(e);n&&p(n[0],5)&&(this.partnerSessionId=n[0].substr(4))}}const t=window[u.globalObjectName];if(t){const e=t["sid"];"function"==typeof e&&e(this.partnerSessionId)}}getCompleteUrl(){let e="";const t=o.c.getParamsFromUrl(location.search);return t.find((e=>"autosuggest_hook"===e.key))?this.getHookUrl(t):(e=this.autoSuggestProperties.useMarketBasedUrl?this.getMarketBasedUrl():this.getUrl(),this.shouldInitializeAutoSuggestOnPageLoad()&&(e+="&onload=1"),this.isDarkMode&&(e+="&rt=1"),(0,l.isNullOrUndefined)(this.autoSuggestProperties.zeroInputItemCount)||(e+=`&zict=${this.autoSuggestProperties.zeroInputItemCount}`),this.autoSuggestProperties.disableSearchHistory&&(e+="&shdis=1"),(0,l.isNullOrUndefined)(this.autoSuggestProperties.maxItemCount)||(e+=`&itemCount=${this.autoSuggestProperties.maxItemCount}`),e)}shouldInitializeAutoSuggestOnPageLoad(){return this.autoSuggestProperties.delayBind===i.pb.Immediately||this.autoSuggestProperties.delayBind===i.pb.OnPageLoad||this.autoSuggestProperties.delayBind===i.pb.OnBusinessSearchResultsReady&&this.autoSuggestProperties.businessSearchResultsEnabled}getMarketBasedUrl(){const e=this.osMarket||"US",t=this.osLanguage||"en-US",n=this.autoSuggestProperties.partnerEndpoint||"msnedgentp",i=(0,a.nP)().Locale;let r=["https","://www.bing.com/as/init?","pt="+n,this.osLanguage?"&setlang="+t:"",this.osMarket?"&cc="+e:"","&refig="+this.requestId].join("");return"en-us"!==t.toLowerCase()&&(r+="&endpt=1"),r+=this.getFeatures(),r+=this.autoSuggestProperties.businessSearchResultsEnabled?"&msbqf=true":"&msbqf=false",this.autoSuggestProperties.disableSuggestionFetchOnEmpty&&i&&"en-us"!==i.toLowerCase()&&(r+="&dfoe=1"),r+=this.getAutosuggestWCMobile(),r}getHookUrl(e){const t="muidflt9-ismsft",n=(0,a.nP)().CurrentFlights,i=e.find((e=>"fdhead"===e.key)),r=i?i.value:"",o=e.find((e=>"asinturl"===e.key)),s=o&&o.value;if((n.indexOf(t)>-1||r.indexOf(t)>-1)&&s){return decodeURIComponent(s)}return this.getUrl()}getUrl(){const e=(0,a.nP)().Locale||"en-us";let t=["https","://www.bing.com/as/init?mkt=",e,"&pt=",this.autoSuggestProperties.partnerEndpoint,"&refig=",this.requestId].join("");return this.autoSuggestProperties.enableNewSnrUrl||"en-us"===e.toLowerCase()||(t+="&endpt=1"),t+=this.getAutosuggestWCMobile(),t}getFeatures(){return this.autoSuggestProperties.enableFeatures&&(this.autoSuggestProperties.features||""===this.autoSuggestProperties.features)?"&features="+this.autoSuggestProperties.features:""}getAutosuggestWCMobile(){return this.autoSuggestProperties.enableAutoSuggestforWCMobile?"&asrt=1":""}}function p(e,t){return"string"==typeof e&&(!t||e.length>=t)}u.cookieCrumb="AS",u.globalObjectName="sa_inst",u.cookieName="SRCHHPGUSR",u.sharedCookieName="_SS",u.cookieDomain="msn.com";var h=n(45927),g=n(82898);function m(e){if(!e||e.disableAutoSuggest)return;const{autoSuggestProperties:t,requestId:n,isDarkMode:r,searchBoxContext:o,startPerfMarkerHandler:a}=e,{osMarket:s,osLanguage:c,useMarketBasedUrl:d,delayBind:l,businessSearchResultsEnabled:p,cookieSharingDelayInSeconds:h}=t,g=new u(t,d&&s,d&&c,n,r);if(l===i.pb.OnUserInteraction||l===i.pb.OnBusinessSearchResultsReady&&!p){o.autoSuggestEventHandler=f.bind(o,g),o.registerAutoSuggestOnSearchEventHandler=v.bind(o,e);const t=S(o.inputRef);null==t||t.addEventListener("keyup",o.autoSuggestEventHandler),null==t||t.addEventListener("click",o.autoSuggestEventHandler)}else l!==i.pb.Immediately&&l!==i.pb.OnPageLoad&&l!==i.pb.OnBusinessSearchResultsReady||(a&&a(i.cq),o.registerAutoSuggestOnSearchEventHandler=v.bind(o,e),g.addAutoSuggest(o.registerAutoSuggestOnSearchEventHandler));1===h&&g.invokeCookieSharing()}function f(e,t){if("keyup"===t.type){const e=t.key;if("Tab"===e||"Escape"===e)return}if(e.addAutoSuggest(this.registerAutoSuggestOnSearchEventHandler)){const e=S(this.inputRef);e.removeEventListener("click",this.autoSuggestEventHandler),e.removeEventListener("keyup",this.autoSuggestEventHandler)}}function v(e){const{autoSuggestProperties:t,endPerfMarkerHandler:n,searchBoxContext:o,searchOpenInNewWindow:a,action:c,telemetryCallback:d,enableDetailLogs:l}=e,{delayBind:u}=t;if(u!==i.pb.OnUserInteraction&&u!==i.pb.OnPageLoad&&u!==i.pb.OnBusinessSearchResultsReady||n&&n(i.cq),a)return;const p=window.sj_evt,m=p&&p.fire;m&&(p.fire=function(...e){const[t,n]=e||[];if("AS.Navigate"===t){if(!n)return;const e=S(o.formRef);if(e&&e.attributes&&e.attributes["data-t"]){let t=h.u.get(e);if(!t&&(0,s.N)()&&(window.dispatchEvent(new CustomEvent("telemetrynodeadded",{detail:{element:e}})),t=h.u.get(e)),t.contract.content.type=function(e){if(!e)return g.uH.Undefined;const t=e.toLowerCase();if("hs"===t)return g.uH.SearchHistory;if("pn"===t)return g.uH.TrendingSearch;return g.uH.AutoSuggestSearch}(n.stype),l&&!0===l){const e=n.query??"";if((0,r.Yq)().isAadAccountUser){if(c&&c.startsWith("https://www.bing.com/")){let e=c;const i=n.stype??"",r=new URL(e);r.searchParams.set("astycn",i.toString()),r.searchParams.set("qltype","ccaad"),e=r.href.toString(),t.contract.overrideDestinationUrl=e}}else{let i="";if(n.url&&n.url.length>0&&n.url.startsWith("http")?i=n.url.toString():c&&c.startsWith("https://www.bing.com/")&&(i=c),i&&i.length>0){const n=new URL(i);n.searchParams.set("assgl",e.length.toString()),n.searchParams.set("qltype","ccnotaad"),n.searchParams.set("q",""),i=n.href.toString(),t.contract.overrideDestinationUrl=i}}}h.u.setAttribute(e,t.contract)}}"onSearch"===t&&(o.onAutoSuggestSuggestionClickHandler=y.bind(o,c,d,l),o.onAutoSuggestSuggestionClickHandler()),m.apply(o,e)})}function y(e,t,n){let i=e;const r=S(this.formRef);if(i){const e=(-1!==i.indexOf("?")?"&":"?")+"msnst=AS";if(i+=e,r.attributes&&r.attributes["data-t"]){const e=h.u.get(r);if(n&&!0===n){const t=e.contract.overrideDestinationUrl;if(t&&t.length>0){const e=(-1!==t.indexOf("?")?"&":"?")+"msnst=AS";i=t+e}}e.contract.overrideDestinationUrl=i,h.u.setAttribute(r,e.contract)}}t(r,g.Aw.Submit,g.wu.TextSearch)}function S(e){return e&&e.current?e.current:e}},87574:function(e,t,n){"use strict";n.d(t,{AZ:function(){return a},Gb:function(){return d},Od:function(){return o},hv:function(){return u},qR:function(){return r},rM:function(){return l},vM:function(){return s},wI:function(){return c}});var i=n(45266);const r="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/",o="https://prod-streaming-video-msn-com.akamaized.net/",a="background_setting_preferences",s="ntp.background_image";var c;!function(e){e.changeBackgroundDaily="changeBackgroundDaily",e.includeVideoBackgroundsInRotation="includeVideoBackgroundsInRotation",e.showImageSpotlightText="showImageSpotlightText",e.selectedVideoSetting="selectedVideoSetting",e.imageLikes="imageLikes",e.imageDislikes="imageDislikes",e.videoLikes="videoLikes",e.videoDislikes="videoDislikes",e.backgroundSelectionMetadata="backgroundSelectionMetadata"}(c||(c={}));const d=850,l=new Map([["BrowserLocal",i.HX.custom],["Iris",i.HX.bing],["Theme",i.HX.theme],["Video",i.HX.imageAndVideo],["CMSImage",i.HX.imageAndVideo]]),u=new Map([[i.HX.imageAndVideo,["Video","CMSImage","Iris"]],[i.HX.bing,["Iris"]],[i.HX.custom,["BrowserLocal"]],[i.HX.theme,["Theme"]]])},944:function(e,t,n){"use strict";n.d(t,{D:function(){return o},f:function(){return r}});var i=n(17556);class r{}function o(){r.backgroundDataStateLoaded.unregisterObservers(),r.backgroundDispositionUpdated.unregisterObservers(),r.hotSpotsDisplayStatusUpdated.unregisterObservers(),r.irisImageUpdated.unregisterObservers(),r.refreshBackgroundMetadata.unregisterObservers(),r.updateBackgroundGalleryDisplayed.unregisterObservers(),r.updateGallerySelectedBackground.unregisterObservers(),r.videoSettingsUpdated.unregisterObservers(),r.updateMarqueeAdDisplayStatus.unregisterObservers()}r.backgroundDataStateLoaded=new i.C("backgroundDataStateLoaded"),r.backgroundDispositionUpdated=new i.C("backgroundDispositionUpdated"),r.hotSpotsDisplayStatusUpdated=new i.C("hotSpotsDisplayStatusUpdated"),r.irisImageUpdated=new i.C("irisImageUpdated"),r.refreshBackgroundMetadata=new i.C("refreshBackgroundMetadata"),r.updateBackgroundGalleryDisplayed=new i.C("updateBackgroundGalleryDisplayed"),r.updateGallerySelectedBackground=new i.C("updateGallerySelectedBackground"),r.updateSelectionInGallery=new i.C("updateSelectionInGallery"),r.videoSettingsUpdated=new i.C("videoSettingsUpdated"),r.updateMarqueeAdDisplayStatus=new i.C("updateMarqueeAdDisplayStatus")},33512:function(e,t,n){"use strict";n.d(t,{z:function(){return p}});var i,r=n(87574);!function(e){e.backgroundImageType="backgroundImageType",e.backgroundSettingPreferences="backgroundSettingPreferences",e.irisPreferences="irisPreferences"}(i||(i={}));const o=new Set(["Video","CMSImage"]);var a=n(87172),s=n(944),c=n(76166),d=n(95063),l=n(31558),u=n(16614);class p extends c.e{get backgroundSettingPreferencesState(){return this._backgroundSettingPreferencesState?JSON.parse(this._backgroundSettingPreferencesState):null}set backgroundSettingPreferencesState(e){this._backgroundSettingPreferencesState=e?JSON.stringify(e):null}constructor(e,t,n,i,o,a,s){super(e,t,n,i,o,a,s),this._backgroundSettingPreferencesState=null,this.config&&!this.config.disableBackgroundGallery&&(this.settingsAPI=(0,l.N)()&&window.chrome&&window.chrome.ntpSettingsPrivate,this.initializePreferences(r.AZ,"backgroundSettingPreferencesState"),this.initializeIrisSurfaceInfoPreferences(),this.registerOnPrefsChangeCallback())}backgroundDispositionUpdated(e){var t,n;null===s.f||void 0===s.f||null===(t=s.f.backgroundDispositionUpdated)||void 0===t||null===(n=t.getActionSender(this))||void 0===n||n.send(e)}hotSpotsDisplayStatusUpdated(e){var t,n;null===s.f||void 0===s.f||null===(t=s.f.hotSpotsDisplayStatusUpdated)||void 0===t||null===(n=t.getActionSender(this))||void 0===n||n.send(e)}updateBackgroundGalleryDisplayed(e){var t,n;null===s.f||void 0===s.f||null===(t=s.f.updateBackgroundGalleryDisplayed)||void 0===t||null===(n=t.getActionSender(this))||void 0===n||n.send(e)}updateGallerySelectedBackground(e){var t,n;null===s.f||void 0===s.f||null===(t=s.f.updateGallerySelectedBackground)||void 0===t||null===(n=t.getActionSender(this))||void 0===n||n.send(e)}videoSettingsUpdated(e){var t,n;null===s.f||void 0===s.f||null===(t=s.f.videoSettingsUpdated)||void 0===t||null===(n=t.getActionSender(this))||void 0===n||n.send(e)}marqueAdDisplayStatusUpdated(e){var t,n;null===s.f||void 0===s.f||null===(t=s.f.updateMarqueeAdDisplayStatus)||void 0===t||null===(n=t.getActionSender(this))||void 0===n||n.send(e)}async initializePreferences(e,t){if(!await this.isNurturingApiAvailable())return;const n=await a.U.getPreferenceSetting(e,!0);this[t]=n&&n.value}async initializeIrisSurfaceInfoPreferences(){if(!await this.isNurturingApiAvailable())return;const e=await a.U.getPreferenceSetting("campaigns");if(!e||!e.value||e.value.length<=0)return;const t=e.value;this.irisBackgroundSurfaceInfo=this.getIrisBackgroundSurfaceInfo(t)}async registerOnPrefsChangeCallback(){this.settingsAPI&&this.settingsAPI.onPrefsChanged.addListener((async e=>{const t=e[0],n=this.getModifiedPreference(t);if(n)if(n===i.backgroundSettingPreferences){const e=t.value,n=this.getPreferenceKeyIndex(e,"background_setting_preferences");if(n<0)return;const i=this.backgroundSettingPreferencesState;if(this.backgroundSettingPreferencesState=e[n].value,d.p.setBackgroundSettingsPreferencesCache(this.backgroundSettingPreferencesState),!i||!this.backgroundSettingPreferencesState)return;const g=i.backgroundSelectionMetadata,m=this.backgroundSettingPreferencesState.backgroundSelectionMetadata;if(!d.p.getShouldRerender())return void d.p.setShouldRerender(!0);var r,a;if(i.selectedVideoSetting!==this.backgroundSettingPreferencesState.selectedVideoSetting)null===(r=s.f.videoSettingsUpdated.getActionSender(this))||void 0===r||r.send(this.backgroundSettingPreferencesState.selectedVideoSetting),null===(a=s.f.refreshBackgroundMetadata.getActionSender(this))||void 0===a||a.send();else if(!g&&m){var c;null===(c=s.f.updateGallerySelectedBackground.getActionSender(this))||void 0===c||c.send(m)}else if(g&&!m){var l,p;null===(l=s.f.refreshBackgroundMetadata.getActionSender(this))||void 0===l||l.send(),null===(p=s.f.updateSelectionInGallery.getActionSender(this))||void 0===p||p.send()}else if(g&&m&&!(0,u.Z)(g,m)&&(g.provider===m.provider||o.has(g.provider)&&o.has(m.provider))){var h;null===(h=s.f.updateGallerySelectedBackground.getActionSender(this))||void 0===h||h.send(m)}}else if(n===i.irisPreferences){const e=t.value,n=this.getPreferenceKeyIndex(e,"campaigns");if(n<0)return;const i=this.irisBackgroundSurfaceInfo,r=e[n].value;if(this.irisBackgroundSurfaceInfo=this.getIrisBackgroundSurfaceInfo(r),!i||!this.irisBackgroundSurfaceInfo)return;var g;if(i.currentCreativeId!==this.irisBackgroundSurfaceInfo.currentCreativeId)null===(g=s.f.refreshBackgroundMetadata.getActionSender(this))||void 0===g||g.send()}}))}getIrisBackgroundSurfaceInfo(e){if(e&&!(e.length<=0))return e.find((e=>"88000244"===e.placement))||void 0}getModifiedPreference(e){if("ntp.background_image_type"===e.key)return i.backgroundImageType;if("ntp.user_nurturing"===e.key){const t=e.value,n=this.getPreferenceByKey(t,r.AZ);if(!(0,u.Z)(this.backgroundSettingPreferencesState,n))return i.backgroundSettingPreferences}}getPreferenceByKey(e,t){const n=this.getPreferenceKeyIndex(e,t);return n>-1?e[n].value:{}}getPreferenceKeyIndex(e,t){return e.findIndex((e=>e.key===t))}async isNurturingApiAvailable(){return a.U.isApiAvailableToUse()}}},38918:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var i=n(99551),r=n(944);class o{reduce(e,t){if(!e)return{backgroundGalleryDisplayed:!1};if(!t)return e;let n;return i.G.handleAction(t,r.f.backgroundDataStateLoaded,(t=>{n={...e,...t}})),i.G.handleAction(t,r.f.updateBackgroundGalleryDisplayed,(t=>{n={...e,backgroundGalleryDisplayed:t}})),i.G.handleAction(t,r.f.updateGallerySelectedBackground,(t=>{n={...e,backgroundSelectionMetadata:t}})),i.G.handleAction(t,r.f.backgroundDispositionUpdated,(t=>{n={...e,backgroundDispositionMetadata:t}})),i.G.handleAction(t,r.f.hotSpotsDisplayStatusUpdated,(t=>{n={...e,shouldRenderHotSpots:t}})),i.G.handleAction(t,r.f.videoSettingsUpdated,(t=>{n={...e,selectedVideoSetting:t}})),i.G.handleAction(t,r.f.updateMarqueeAdDisplayStatus,(t=>{n={...e,displayMarqueeAd:t}})),n||e}}},11833:function(e,t,n){"use strict";n.r(t),n.d(t,{BackgroundDataActions:function(){return i.f},BackgroundDataConnector:function(){return r.z},BackgroundDataReducer:function(){return o.L},ToolingInfo:function(){return a},resetBackgroundDataActions:function(){return i.D}});var i=n(944),r=n(33512),o=n(38918);const a={experienceConfigSchema:{}}},59952:function(e,t,n){"use strict";n.d(t,{$u:function(){return l},IG:function(){return a},Nf:function(){return h},Th:function(){return c},fZ:function(){return o},gf:function(){return s},rO:function(){return d},x$:function(){return p}});var i=n(87574),r=n(45266);const o="background_gallery_open_event",a="galleryToastCooldowns",s="irisBackgroundLiked",c=new Set(["overlay","positioning-region"]),d="https://assets.msn.com/staticsb/statics/latest/edgenext/bkgd/images/cms_images_20230301.json",l="https://assets.msn.com/staticsb/statics/latest/edgenext/bkgd/videos/cms_videos_20230301.json";var u;!function(e){e.reducedMotion="reducedMotion"}(u||(u={}));const p=[i.wI.imageLikes,i.wI.imageDislikes,i.wI.videoLikes,i.wI.videoDislikes],h=new Map([[i.wI.imageLikes,i.wI.imageDislikes],[i.wI.imageDislikes,i.wI.imageLikes],[i.wI.videoLikes,i.wI.videoDislikes],[i.wI.videoDislikes,i.wI.videoLikes]]);new Map([[r.HX.imageAndVideo,["Video","CMSImage","Iris"]],[r.HX.bing,["Iris"]],[r.HX.custom,["BrowserLocal"]],[r.HX.theme,["Theme"]]])},27412:function(e,t,n){"use strict";n.d(t,{k:function(){return u}});var i=n(88826),r=n(7476),o=n(56591),a=n(45266),s=n(88456),c=n(74161),d=n(85205),l=n(67044);const u=new class{get chromiumPageSettingsConnector(){return this._chromiumPageSettingsConnector||(this._chromiumPageSettingsConnector=(0,l.K0)(d.z.ChromiumPageSettings)),this._chromiumPageSettingsConnector}setLayoutFromPreset(e){if(!this.chromiumPageSettingsConnector)return void(0,i.H)(r.EuY,"EdgeChromiumPageSettingsConnector is missing in BackgroundLayoutHelper for the setLayoutFromPreset method");const t=this.chromiumPageSettingsConnector.getCurrentState(),n=(0,o.j)(t.selectedFeedDisplaySetting,e,t.greetingEnabled,t.hideDefaultTopSites);if(t.currentLayout!==n){let e;if(n!==a.nP.custom){const i=a.Wi[n];e={currentBackgroundImageType:i.current_background_image_type,originalLayout:t.currentLayout,currentLayout:n,greetingEnabled:i.greeting,imageOfTheDayEnabled:i.current_background_image_type!==a.HX.off,quickLinksEnabled:i.quick_links,hideDefaultTopSites:i.hide_promoted_links,selectedFeedDisplaySetting:i.feeds_position}}else{const t=this.chromiumPageSettingsConnector.getCurrentState();e={...t,originalLayout:t.currentLayout,currentLayout:n}}this.chromiumPageSettingsConnector.updateLayout(e),(0,s.qi)(c.nc.layout_mode,a.Uq[e.currentLayout])}}updateLayoutAndBackgroundImageType(e,t){this.chromiumPageSettingsConnector?(t?this.updateToCustomLayoutMode():this.setLayoutFromPreset(e),this.chromiumPageSettingsConnector.updateBackgroundImageType(e)):(0,i.H)(r.EuY,"EdgeChromiumPageSettingsConnector is missing in BackgroundLayoutHelper for the updateLayoutAndBackgroundImageType method")}updateToCustomLayoutMode(){if(!this.chromiumPageSettingsConnector)return void(0,i.H)(r.EuY,"EdgeChromiumPageSettingsConnector is missing in BackgroundLayoutHelper for the updateToCustomLayoutMode method");const e=this.chromiumPageSettingsConnector.getCurrentState(),t={...e,originalLayout:e.currentLayout,currentLayout:a.nP.custom};this.chromiumPageSettingsConnector.updateLayout(t),(0,s.qi)(c.nc.layout_mode,a.Uq[t.currentLayout])}isImageOfTheDayDisabled(){if(!this.chromiumPageSettingsConnector)return void(0,i.H)(r.EuY,"EdgeChromiumPageSettingsConnector is missing in BackgroundLayoutHelper for the isImageOfTheDayDisabled method");const e=this.chromiumPageSettingsConnector.getCurrentState(),t=e.backgroundImageTypePolicy&&(e.backgroundImageTypePolicy===a.gZ.disableAll||e.backgroundImageTypePolicy===a.gZ.disableImageOfTheDay);return void 0!==t&&0!==t&&t}isCustomImageDisabled(){if(!this.chromiumPageSettingsConnector)return void(0,i.H)(r.EuY,"EdgeChromiumPageSettingsConnector is missing in BackgroundLayoutHelper for the isCustomImageDisabled method");const e=this.chromiumPageSettingsConnector.getCurrentState(),t=e.backgroundImageTypePolicy&&(e.backgroundImageTypePolicy===a.gZ.disableAll||e.backgroundImageTypePolicy===a.gZ.disableCustomImage);return void 0!==t&&0!==t&&t}}},95063:function(e,t,n){"use strict";n.d(t,{p:function(){return w}});var i=n(87574),r=n(76733),o=n(7476),a=n(88826),s=n(45266),c=n(59952),d=n(55524),l=n(78672),u=n(291),p=n(54297),h=n(92100),g=n(87172),m=n(67213),f=n(85205),v=n(23549),y=n(27412),S=n(67044);class C{constructor(){this.imageDislikes=new Set,this.imageLikes=new Set,this.hasSimpleImages=!1,this.dailyRotationOnlySimpleImages=!1,this.shouldRerender=!0,this.videoLikes=new Set,this.videoDislikes=new Set,this.stateInited=!1,this.simpleBkgdKey="simpleBkgd"}static getInstance(){return d.Gq.get("__BackgroundStorageHelper__",(()=>new C))}getCMSImageData(){return this.cmsImageData||this.loadCMSImageData(),this.cmsImageData}async loadCMSImageData(){this.cmsImageData||await fetch(c.rO).then((e=>e.json())).then((e=>this.cmsImageData=null==e?void 0:e.cmsImage))}getCMSVideoData(){return this.cmsVideoData||this.loadCMSVideoData(),this.cmsVideoData}async loadCMSVideoData(){this.cmsVideoData||await fetch(c.$u).then((e=>e.json())).then((e=>this.cmsVideoData=null==e?void 0:e.cmsVideo))}async initState(e){if(this.stateInited)return;this.stateInited=!0;if(await this.getBackgroundGalleryEligibilityAsync()){const t=(0,S.K0)(f.z.ChromiumPageSettings);if(!t)return;const n=await t.getPageSettingsStateAsync();await this.initialBackgroundPSLSetup(n);(0,p.$o)().getItem("clean_meta_flag")||((0,p.$o)().setItem("clean_meta_flag","1"),n.currentLayout===s.nP.focused&&await this.resetAppliedBackgroundAndToggleStorage(n.currentLayout));const i=await this.checkAndRemoveApplicableBackgrounds(!1,n),r=await this.getBackgroundPreferences();if(r){const t={backgroundGalleryDisplayed:!1,shouldRenderHotSpots:r.showImageSpotlightText,selectedVideoSetting:r.selectedVideoSetting,backgroundSelectionMetadata:r.backgroundSelectionMetadata};null==e||e.send(t),this.populateLikeAndDislikeCaches();const o=y.k.isImageOfTheDayDisabled(),a=y.k.isCustomImageDisabled();if(await this.resetGalleryStorageForPolicyCompliance(r,o,a),o||a)return;i&&n.currentBackgroundImageType!==s.HX.off&&this.updateLayoutBasedOnBackgroundType(r)}}}async getBackgroundGalleryEligibilityAsync(){const e=this.shouldDisableGalleryFeature(),t=await g.U.isApiAvailableToUse(),n=(0,m.I9)();return this.isEligibleForTreatment=t&&!n&&!e,this.isEligibleForTreatment}getBackgroundGalleryEligibility(){return this.isEligibleForTreatment}setBackgroundSettingsPreferencesCache(e){this.backgroundSettingsPreferences=e}getBackgroundSettingsPreferencesCache(){return this.backgroundSettingsPreferences}getPreferenceByKeyFromFromPreferencesCache(e){const t=this.backgroundSettingsPreferences;return t?t[e]:void 0}setCurrentBackgroundPreferenceCache(e){this.currentBackgroundMetadata=e}getCurrentBackgroundPreferenceCache(){return this.currentBackgroundMetadata}populateLikeAndDislikeCaches(){for(const e of c.x$){const t=this.backgroundSettingsPreferences[e]||[],n=this.getLikeAndDislikeCacheByType(e);for(const e of t)n.add(e)}}getComplimetaryCacheName(e){return c.Nf.get(e)}getLikeAndDislikeCacheByType(e){switch(e){case i.wI.imageLikes:return this.imageLikes;case i.wI.imageDislikes:return this.imageDislikes;case i.wI.videoLikes:return this.videoLikes;case i.wI.videoDislikes:return this.videoDislikes}}setLikesAndDislikesCache(e,t){const n=this.getLikeAndDislikeCacheByType(e);this.getLikeAndDislikeCacheByType(this.getComplimetaryCacheName(e)).delete(t),n.add(t)}getShouldRerender(){return this.shouldRerender}setShouldRerender(e){this.shouldRerender=e}setSimpleImagesandCMSSize(e,t){this.hasSimpleImages=e,this.cmsImageSize=t-1}getCMSImageSize(){return this.cmsImageSize}async getBackgroundPreferences(){return g.U.getPreferenceSetting(i.AZ,!0).then((e=>{const t=e&&e.value;if(t)return this.setBackgroundSettingsPreferencesCache(t),t;r.k.logError(`PSL: Preferences API does not have ${i.AZ}.`)})).catch((e=>{r.k.logError(`Exception ${e} occurred storing background setting preferences in persistent storage layer`)}))}async getBackgroundPreferenceByKey(e){return g.U.getPreferenceSetting(i.AZ,!0).then((t=>{const n=t&&t.value;if(n)return n[e];r.k.logError(`PSL: Preferences API does not have ${i.AZ}.`)})).catch((e=>{r.k.logError(`Exception ${e} occurred getting background setting preference by key in persistent storage layer`)}))}async setBackgroundPreferences(e){return g.U.savePreferenceSetting(i.AZ,e).then((t=>(t&&this.setBackgroundSettingsPreferencesCache(e),t))).catch((t=>(r.k.logError(`Exception ${t} occurred storing background settings preferences: ${e} in persistent storage layer`),!1)))}async setBackgroundPreferenceByKey(e,t){const n=await g.U.getPreferenceSetting(i.AZ,!0).catch((e=>(r.k.logError(`Exception ${e} occurred getting background settings preferences in persistent storage layer`),this.getNurturingErrorObject())));let o=n&&n.value;return o!==this.getNurturingErrorObject()&&(o||(o={key:i.AZ,value:{}}),e==i.wI.backgroundSelectionMetadata&&(o[i.wI.changeBackgroundDaily]=!1),o[e]=t,g.U.savePreferenceSetting(i.AZ,o).then((e=>(e&&this.setBackgroundSettingsPreferencesCache(o),e))).catch((n=>(r.k.logError(`Exception ${n} occurred storing background preference ${e} and value ${t} in persistent storage layer`),!1))))}async getCurrentBackgroundMetadata(){const e=window&&window.chrome&&window.chrome.ntpSettingsPrivate;if(e&&e.getPref)return new Promise((t=>{e.getPref(i.vM,(function(e){t(null==e?void 0:e.value)}))}))}setCurrentBackgroundMetadata(e){const t=window&&window.chrome&&window.chrome.ntpSettingsPrivate;return!(!t||!t.getPref)&&(t.setPref(i.vM,e),this.setCurrentBackgroundPreferenceCache(e),!0)}setSSRBackgroundMetadata(e){this.ssrBackgroundMetadata=e}async checkAndRemoveApplicableBackgrounds(e,t,n){const i=await this.getBackgroundPreferences();if(!i)return!1;const r=this.overrideCacheAging(),o=i.changeBackgroundDaily||r||e,a=i.backgroundSelectionMetadata;if(!a)return!1;let s=-1;return r||n||(s=a.appliedTimestamp?a.appliedTimestamp+864e5:-1),!!(o&&s<Date.now())&&this.clearCachedBackground(i)}getBackgroundImageTypeFromSettings(e,t){return this.backgroundSettingsPreferences&&this.backgroundSettingsPreferences.backgroundSelectionMetadata?this.getProviderBackgroundType(this.backgroundSettingsPreferences.backgroundSelectionMetadata.provider):t?s.HX.off:e||this.dailyRotationOnlySimpleImages?s.HX.imageAndVideo:s.HX.bing}async initialBackgroundPSLSetup(e){if(await this.getBackgroundPreferences())return;if(!e)return;const t=this.createInitialStateFromChromiumPageSettings(e);if(!t)return void v.M0.sendAppErrorEvent({...o.tvG,message:"Initial state for background gallery is undefined",pb:{...o.tvG.pb,customMessage:`Initial state for background gallery is undefined. Current BackgroundImageType: ${e.currentBackgroundImageType}`}});await this.setBackgroundPreferences(t)&&this.setBackgroundSettingsPreferencesCache(t)}createInitialStateFromChromiumPageSettings(e){switch(e.currentBackgroundImageType){case s.HX.off:case s.HX.custom:case s.HX.theme:return this.createInitialState(!1,!1,!1);case s.HX.bing:return this.createInitialState(!0,!1,!0);case s.HX.imageAndVideo:return this.createInitialState(!0,!0,!0);default:return}}createInitialState(e,t,n){return{changeBackgroundDaily:e,includeVideoBackgroundsInRotation:t,showImageSpotlightText:n,selectedVideoSetting:this.shouldUseEnergySaverMode()?"energySaver":"balanced",imageLikes:[],imageDislikes:[],videoLikes:[],videoDislikes:[]}}shouldUseEnergySaverMode(){const e=window&&window.navigator;if(!e)return!0;const t=e?e.deviceMemory:-1;return!("4g"===e.connection.effectiveType)||!(t>=4)}getProviderBackgroundType(e){switch(e){case"BrowserLocal":return s.HX.custom;case"FREBackground":case"Iris":default:return s.HX.bing;case"Theme":return s.HX.theme;case"Video":case"CMSImage":return s.HX.imageAndVideo}}async backgroundSelectionSet(){return!!await this.getBackgroundPreferenceByKey(i.wI.backgroundSelectionMetadata)}overrideCacheAging(){return"true"===h.c.getQueryParameterByName("ageOutGalleryCache",(0,l.zp)())}async handleRotationToggling(e,t){return!!this.backgroundSettingsPreferences&&(e?(this.isCurrentAndCachedBackgroundIdentical(t)&&this.setShouldRerender(!1),this.checkAndRemoveApplicableBackgrounds(!0,t,!0)):!!this.backgroundSettingsPreferences.backgroundSelectionMetadata||this.getActiveBackgroundSelectionMetadata(t).then((e=>!!e&&(this.setShouldRerender(!1),this.setBackgroundPreferenceByKey(i.wI.backgroundSelectionMetadata,e)))).catch((e=>!1)))}isCurrentAndCachedBackgroundIdentical(e){const t=this.getVideoBackgroundProviderInfo(e);if(!t||!this.backgroundSettingsPreferences||!this.backgroundSettingsPreferences.backgroundSelectionMetadata)return!1;const n=this.backgroundSettingsPreferences.backgroundSelectionMetadata;return t.provider===n.provider&&t.configIndex===n.configIndex}async getActiveBackgroundSelectionMetadata(e){if(!e)return;if(e.currentBackgroundImageType===s.HX.off)return this.buildBackgroundSelectionMetadata("Off");const t=await this.getBackgroundPreferences();if(t){if(t.backgroundSelectionMetadata)return t.backgroundSelectionMetadata;switch(e.currentBackgroundImageType){case s.HX.bing:return this.buildBackgroundSelectionMetadata("Iris");case s.HX.imageAndVideo:return this.getVideoBackgroundProviderInfo(e);case s.HX.custom:return this.buildBackgroundSelectionMetadata("BrowserLocal");case s.HX.theme:return this.buildBackgroundSelectionMetadata("Theme");default:return this.buildBackgroundSelectionMetadata("Iris")}}}isVideoScheduled(){const e=(0,p.$o)().getObject("bkgdV");if(!e)return-1;const t=(new Date).getDay();return e&&e.schedule&&-1!==e.schedule[t]?e.schedule[t]:-1}simpleImageScheduled(){const e=(0,p.$o)().getObject("bkgdV");if(!e)return-1;const t=(new Date).getDay();return e&&e.simpleSchedule?e.simpleSchedule[t]:-1}getVideoBackgroundProviderInfo(e){let t=this.dailyRotationOnlySimpleImages?this.simpleImageScheduled():this.isVideoScheduled();return this.ssrBackgroundMetadata&&this.ssrBackgroundMetadata.configIndex?t=this.ssrBackgroundMetadata.configIndex:this.ssrBackgroundMetadata&&!this.ssrBackgroundMetadata.configIndex&&(t=-1),this.dailyRotationOnlySimpleImages?t>-1?this.buildBackgroundSelectionMetadata("CMSImage",t.toString()):this.buildBackgroundSelectionMetadata("Iris"):t>-1?this.buildBackgroundSelectionMetadata("Video",t.toString()):this.buildBackgroundSelectionMetadata("Iris")}buildBackgroundSelectionMetadata(e,t,n){return{provider:e,configIndex:t||"-1",appliedTimestamp:n||Date.now()}}async shouldOverrideLayoutToCustom(){const e=await this.getBackgroundPreferences();return!!e&&(!!e.backgroundSelectionMetadata||!e.changeBackgroundDaily)}shouldOverrideLayoutToCustomCache(){const e=this.getBackgroundSettingsPreferencesCache();return!!e&&(!!e.backgroundSelectionMetadata||!e.changeBackgroundDaily)}async resetAppliedBackgroundAndToggleStorage(e){if(e===s.nP.informational||e===s.nP.inspirational||e===s.nP.focused){const t=await this.getBackgroundPreferences();if(!t)return;if(delete t[i.wI.backgroundSelectionMetadata],e===s.nP.focused)return void this.setBackgroundPreferences(t);t[i.wI.changeBackgroundDaily]=!0,t[i.wI.includeVideoBackgroundsInRotation]=!0,this.setBackgroundPreferences(t)}}async resetGalleryStorageForPolicyCompliance(e,t,n){return t&&n?this.resetStorageForImagesOff(e):t?this.resetStorageForImageOfTheDayDisabled(e):!n||this.resetStorageForCustomImageDisabled(e)}async resetStorageForImagesOff(e){if(!e)return!1;const t={...e,changeBackgroundDaily:!1,includeVideoBackgroundsInRotation:!1,showImageSpotlightText:!1};return delete t[i.wI.backgroundSelectionMetadata],this.setBackgroundPreferences(t)}async resetStorageForImageOfTheDayDisabled(e){if(!e)return!1;const t={...e,changeBackgroundDaily:!1,includeVideoBackgroundsInRotation:!1,showImageSpotlightText:!1},n=t.backgroundSelectionMetadata;return n&&"BrowserLocal"!==n.provider&&"Theme"!==n.provider&&delete t[i.wI.backgroundSelectionMetadata],this.setBackgroundPreferences(t)}async resetStorageForCustomImageDisabled(e){if(!e)return!1;const t=e.backgroundSelectionMetadata;return!t||("Theme"===t.provider||"BrowserLocal"===t.provider?(delete e[i.wI.backgroundSelectionMetadata],this.setBackgroundPreferences(e)):this.setBackgroundPreferences(e))}async clearCachedBackground(e){const t=e||await this.getBackgroundPreferences();return!!t&&(!t.backgroundSelectionMetadata||(delete t[i.wI.backgroundSelectionMetadata],this.setBackgroundPreferences(t)))}setToastCooldown(e,t){let n=(0,p.$o)().getObject(c.IG);n||(n={reducedMotionNextAvailableTimestamp:0});const i=Date.now()+this.calculateToastCooldown(t);"reducedMotion"===e&&(n.reducedMotionNextAvailableTimestamp=Date.now()+i),(0,p.$o)().setObject(c.IG,n)}toastCooldownExpired(e){const t=(0,p.$o)().getObject(c.IG);return!t||"reducedMotion"===e&&t.reducedMotionNextAvailableTimestamp<Date.now()}calculateToastCooldown(e){return 864e5*e}getNurturingErrorObject(){return{key:i.AZ,value:{isError:!0}}}shouldDisableGalleryFeature(){return"true"===h.c.getQueryParameterByName("disableBackgroundGallery",(0,l.zp)())}async updateLayoutBasedOnBackgroundType(e){if(!(e=e||await this.getBackgroundPreferences()))return;const t=this.getBackgroundImageTypeFromSettings(e.includeVideoBackgroundsInRotation);y.k.updateLayoutAndBackgroundImageType(t)}async checkAndUpdateRotation(){let e=this.getSimpleBkgdRotationData();if(null==e){const t=await this.getBackgroundPreferences();if(!t)return;e={videoTogglePreFlight:t[i.wI.includeVideoBackgroundsInRotation],videoToggleInFlight:void 0},t[i.wI.includeVideoBackgroundsInRotation]=!1,this.setBackgroundPreferences(t),this.storeSimpleBkgdRotationData(e)}this.dailyRotationOnlySimpleImages=void 0===e.videoToggleInFlight||!e.videoToggleInFlight}getDailyRotationOnlySimpleImages(){return this.dailyRotationOnlySimpleImages}async checkAndRemoveSimpleInfo(){const e=this.getSimpleBkgdRotationData();if(null==e)return;const t=await this.getBackgroundPreferences();t&&(t[i.wI.includeVideoBackgroundsInRotation]=void 0!==e.videoToggleInFlight?e.videoToggleInFlight:e.videoTogglePreFlight,this.setBackgroundPreferences(t),this.removeSimpleBkgdRotationData())}toggleVideoInRotationInFlight(e){this.dailyRotationOnlySimpleImages=!e;let t=this.getSimpleBkgdRotationData();t={videoTogglePreFlight:t.videoTogglePreFlight,videoToggleInFlight:e},this.storeSimpleBkgdRotationData(t)}getSimpleBkgdRotationData(){try{return(0,p.$o)().getObject(this.simpleBkgdKey)}catch(e){return}}storeSimpleBkgdRotationData(e){try{(0,p.$o)().setObject(this.simpleBkgdKey,e)}catch(e){return void(0,a.H)(o.ybt,"Local storage for simple background failed.")}}removeSimpleBkgdRotationData(){try{(0,p.$o)().removeObject(this.simpleBkgdKey)}catch(e){return void(0,a.H)(o.ybt,"Local storage for simple background failed.")}}}const w=(0,u.h)(C)},69760:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});var i=n(17556);class r{}r.updateEnabledState=new i.C("UpdateEnabled"),r.updateHeaderExpandedState=new i.C("UpdateHeaderExpanded"),r.updateStickyState=new i.C("UpdateSticky"),r.updateLayoutStatus=new i.C("UpdateLayoutStatus")},84688:function(e,t,n){"use strict";n.d(t,{i:function(){return o}});var i=n(76166),r=n(69760);class o extends i.e{updateEnabledStatus(e){r.A.updateEnabledState.getActionSender(this).send(e)}updateHeaderExpandedStatus(e){r.A.updateHeaderExpandedState.getActionSender(this).send(e)}updateLayoutStatus(e){r.A.updateLayoutStatus.getActionSender(this).send(e)}updateStickyStatus(e){r.A.updateStickyState.getActionSender(this).send(e)}}},77232:function(e,t,n){"use strict";n.d(t,{w:function(){return o}});var i=n(99551),r=n(69760);class o{reduce(e,t){if(!e)return{isEnabled:!1,isExpanded:!1,isHeaderSticky:!1};if(!t)return e;let n;return i.G.handleAction(t,r.A.updateHeaderExpandedState,(t=>{n={...e,isExpanded:t}})),i.G.handleAction(t,r.A.updateStickyState,(t=>{n={...e,isHeaderSticky:t}})),i.G.handleAction(t,r.A.updateEnabledState,(t=>{n={...e,isEnabled:t}})),i.G.handleAction(t,r.A.updateLayoutStatus,(t=>{n={...e,feedDisplaySetting:t}})),n||e}}},88762:function(e,t,n){"use strict";n.d(t,{V:function(){return o}});var i=n(55524),r=n(17556);class o{static get loadLocalStorage(){return i.Gq.get(this.loadLocalStorageKey,(()=>new r.C("loadLocalStorage")))}static set loadLocalStorage(e){i.Gq.set(this.loadLocalStorageKey,e)}static get marketUpdated(){return i.Gq.get(this.marketUpdatedKey,(()=>new r.C("marketUpdated")))}static set marketUpdated(e){i.Gq.set(this.marketUpdatedKey,e)}static get pageLayoutStateLoaded(){return i.Gq.get(this.pageLayoutStateLoadedKey,(()=>new r.C("PageLayoutStateLoaded")))}static set pageLayoutStateLoaded(e){i.Gq.set(this.pageLayoutStateLoadedKey,e)}static get updateConfigData(){return i.Gq.get(this.updateConfigDataKey,(()=>new r.C("updateConfigData")))}static set updateConfigData(e){i.Gq.set(this.updateConfigDataKey,e)}static get updateConfigDataChanged(){return i.Gq.get(this.updateConfigDataChangedKey,(()=>new r.C("updateConfigDataChanged")))}static set updateConfigDataChanged(e){i.Gq.set(this.updateConfigDataChangedKey,e)}static get updateTopSitesQuickLinkEndMarginUsedPadding(){return i.Gq.get(this.updateTopSitesQuickLinkEndMarginUsedPaddingKey,(()=>new r.C("updateTopSitesQuickLinkEndMarginUsedPadding")))}static set updateTopSitesQuickLinkEndMarginUsedPadding(e){i.Gq.set(this.updateTopSitesQuickLinkEndMarginUsedPaddingKey,e)}static get updateLocalStorage(){return i.Gq.get(this.updateLocalStorageKey,(()=>new r.C("updateLocalStorage")))}static set updateLocalStorage(e){i.Gq.set(this.updateLocalStorageKey,e)}static get updateNtpTheme(){return i.Gq.get(this.updateNtpThemeKey,(()=>new r.C("updateNtpTheme")))}static set updateNtpTheme(e){i.Gq.set(this.updateNtpThemeKey,e)}static get updatePrimaryAccountInfo(){return i.Gq.get(this.updatePrimaryAccountInfoKey,(()=>new r.C("updatePrimaryAccountInfo")))}static set updatePrimaryAccountInfo(e){i.Gq.set(this.updatePrimaryAccountInfoKey,e)}static get updateWPOLayoutPromotion(){return i.Gq.get(this.updateWPOLayoutPromotionKey,(()=>new r.C("updateWPOLayoutPromotion")))}static set updateWPOLayoutPromotion(e){i.Gq.set(this.updateWPOLayoutPromotionKey,e)}static get updateWPOLayoutPromotionSource(){return i.Gq.get(this.updateWPOLayoutPromotionSourceKey,(()=>new r.C("updateWPOLayoutPromotionSource")))}static set updateWPOLayoutPromotionSource(e){i.Gq.set(this.updateWPOLayoutPromotionSourceKey,e)}static get updateWPOTopsitesPromotion(){return i.Gq.get(this.updateWPOTopsitesPromotionKey,(()=>new r.C("updateWPOTopsitesPromotion")))}static set updateWPOTopsitesPromotion(e){i.Gq.set(this.updateWPOTopsitesPromotionKey,e)}}o.loadLocalStorageKey=Symbol("loadLocalStorage"),o.marketUpdatedKey=Symbol("marketUpdated"),o.pageLayoutStateLoadedKey=Symbol("pageLayoutStateLoaded"),o.updateConfigDataKey=Symbol("updateConfigData"),o.updateConfigDataChangedKey=Symbol("updateConfigDataChanged"),o.updateTopSitesQuickLinkEndMarginUsedPaddingKey=Symbol("updateTopSitesQuickLinkEndMarginUsedPadding"),o.updateLocalStorageKey=Symbol("updateLocalStorage"),o.updateNtpThemeKey=Symbol("updateNtpTheme"),o.updatePrimaryAccountInfoKey=Symbol("updatePrimaryAccountInfo"),o.updateWPOLayoutPromotionKey=Symbol("updateWPOLayoutPromotion"),o.updateWPOLayoutPromotionSourceKey=Symbol("updateWPOLayoutPromotionSource"),o.updateWPOTopsitesPromotionKey=Symbol("updateWPOTopsitesPromotion")},50176:function(e,t,n){"use strict";var i,r,o;n.d(t,{AL:function(){return s},Aq:function(){return u},BC:function(){return h},HT:function(){return r},WT:function(){return o},YG:function(){return v},_H:function(){return g},dK:function(){return c},gJ:function(){return m},h0:function(){return i},lA:function(){return a},lx:function(){return f},pY:function(){return p},r2:function(){return l},vs:function(){return d}}),function(e){e[e.BOOLEAN_AND_STRING_ENUM=0]="BOOLEAN_AND_STRING_ENUM",e[e.BOOLEAN=1]="BOOLEAN",e[e.STRING_ENUM=2]="STRING_ENUM"}(i||(i={})),function(e){e.redirect="redirect",e.bing="bing"}(r||(r={})),function(e){e[e.user=0]="user",e[e.wpoPrerenderTab=1]="wpoPrerenderTab",e[e.wpoVisibleTab=2]="wpoVisibleTab",e[e.adminPortalVisibleTab=3]="adminPortalVisibleTab",e[e.ntpVisibleTab=4]="ntpVisibleTab"}(o||(o={}));const a={enabledFeatures:"enabledFeatures",IsDefaultSearchProviderLocked:"isInLockdownMode",isEducationEnvironment:"isEducationEnvironment",isInYandexRegions:"isInYandexRegions",isNewTabGreetingEnabled:"isNewTabGreetingEnabled",inPageSearchBoxType:"inPageSearchBoxType",profileCreationTime:"profileCreationTime",showFeedSwitcher:"showFeedSwitcher",isChromePrimaryBrowserAtFre:"isChromePrimaryBrowserAtFre",isEnrolledInProjectEqual:"isEnrolledInProjectEqual",irisAttributes:"irisAttributes",isEdgeSignInAllowed:"isEdgeSignInAllowed",isShowMicrosoftRewardsEnabled:"isShowMicrosoftRewardsEnabled",maxQuickLinks:"maxQuickLinks",isQuickLinksFolderInFavoritesEnabled:"isQuickLinksFolderInFavoritesEnabled",channel:"channel"},s={hasImage:"has_image",resourceUrl:"resource_url",timestamp:"last_modified_time"},c="msQuickLinksDefaultOneRow",d="msQuickLinksDefaultTwoRow",l={accountType:"account_type",accountId:"account_id",email:"email",firstName:"first_name",lastName:"last_name"};var u;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.CHROME=1]="CHROME",e[e.FIREFOX=2]="FIREFOX",e[e.IEXPLORER=4]="IEXPLORER",e[e.SAFARI=11]="SAFARI",e[e.EDGE=12]="EDGE",e[e.MSEDGE=13]="MSEDGE"}(u||(u={}));const p="quick_links_options",h={selected:94608e3,promoted:2592e3},g={STABLE:"",DEV:"dev",BETA:"beta",CANARY:"canary"},m="splitScreenToggle",f="tscollapsed_to_off",v={promotionInfoIsNull:"0",isInEdgeExperience:"1",sameWithCurrentLayout:"2",feedsDisabledByAdmin:"3",isNotOneOfFromLayouts:"4",nurturingApiUnavailable:"5",isLayoutSelectedByUserWithinCoolDown:"6",layoutIsAlreadyApplied:"7",maxRetargetingThreshold:"8",isControlFlight:"9",isFREModalBackground:"10",noSavedWpoPromotionOptions:"11",isContentSelectedByUserWithinCoolDown:"12",canNotUseDom:"13",isNotOneOfFromFeeds:"14"}},88456:function(e,t,n){"use strict";n.d(t,{$W:function(){return C},BA:function(){return I},F0:function(){return A},HG:function(){return k},Mc:function(){return b},O3:function(){return m},OS:function(){return x},U4:function(){return y},VT:function(){return E},WH:function(){return f},_u:function(){return g},eD:function(){return v},gC:function(){return D},k4:function(){return S},oB:function(){return P},qi:function(){return T},tv:function(){return M},zJ:function(){return w},zb:function(){return L}});var i=n(31558),r=n(50176),o=n(45266),a=n(76733),s=n(23549),c=n(7476),d=n(54297),l=n(36867),u=n(87172),p=n(74161),h=n(87574);function g(){return new Promise((e=>{const t=(0,i.N)()&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&t.getConfigData?t.getConfigData((t=>{if(void 0!==t){const n={enabledFeatures:t[r.lA.enabledFeatures],IsDefaultSearchProviderLocked:t[r.lA.IsDefaultSearchProviderLocked],isEducationEnvironment:t[r.lA.isEducationEnvironment],isInYandexRegions:t[r.lA.isInYandexRegions],isNewTabGreetingEnabled:t[r.lA.isNewTabGreetingEnabled],inPageSearchBoxType:t[r.lA.inPageSearchBoxType],profileCreationTime:t[r.lA.profileCreationTime],showFeedSwitcher:t[r.lA.showFeedSwitcher],isChromePrimaryBrowserAtFre:t[r.lA.isChromePrimaryBrowserAtFre],isEnrolledInProjectEqual:t[r.lA.isEnrolledInProjectEqual],irisAttributes:new URLSearchParams(t[r.lA.irisAttributes]),isEdgeSignInAllowed:t[r.lA.isEdgeSignInAllowed],isShowMicrosoftRewardsEnabled:t[r.lA.isShowMicrosoftRewardsEnabled],maxQuickLinks:t[r.lA.maxQuickLinks],isQuickLinksFolderInFavoritesEnabled:t[r.lA.isQuickLinksFolderInFavoritesEnabled],channel:t[r.lA.channel]};e(n)}else a.k.logError("Failed to get config data from Chromium API."),e({})})):e({})}))}function m(){return new Promise((e=>{const t=(0,i.N)()&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&"function"==typeof t.getUserTopic?t.getUserTopic((t=>{e(t)})):e({})}))}async function f(e,t,n=void 0){try{if(await b()&&t){const e=await l.L.getPreferenceSetting(t);if(e&&void 0!==e.value)return JSON.parse(e.value.toString())}if(e){const t=(0,d.$o)().getObject(e,void 0);if(void 0!==t)return JSON.parse(t)}return n}catch(e){return a.k.logError("Failed to parse the key."),!1}}async function v(){const e=await(t=o._9.layout,new Promise((e=>{const n=window.chrome;if(n){const i=n.ntpSettingsPrivate;if(i&&"function"==typeof i.getPref)return void i.getPref(t,(n=>{e(n&&n.key===t?n.value:null)}))}e(null)})));var t;return null===e||isNaN(e)?null:o.F5[e]}function y(e,t,n,i,r,a,s,c){let d=[],l=[];i&&(d=i.split(",")),r&&(l=r.split(","));return{recommendedLayout:e,tmpl:t,control:n,fromLayoutsArray:d.length>0?d:[o.nP.inspirational],fromFeedsArray:l.length>0?l:[],reTargetRecommendedLayout:a,selectedFeedDisplaySetting:s,source:c}}function S(e,t){const n={message:e,type:"information",pb:{...(0,c.mnt)(),customMessage:t}};s.M0.sendClientLogEvent(n)}function C(e,t,n){s.M0.sendAppErrorEvent({...e,message:t,pb:{...e.pb,customMessage:n}})}function w(e,t,n,i,r,o){s.M0.sendAppErrorEvent({...e,message:t,pb:{...e.pb,customMessage:n,customBackgroundImageInfo:JSON.stringify(i),ntpTheme:JSON.stringify(r),currentLayout:o}})}async function b(){return await l.L.isApiAvailableToUse()}function T(e,t){const n={setting:e,source:"ntp",timestamp:(new Date).getTime(),value:t};l.L.savePreferenceSetting(e,n)}function k(e,t){if(e===o.HX.off||!t||!t.provider)return!1;const n=t.provider,i=h.hv.get(e);return!(i&&i.some((e=>e===n)))}function P(e){var t;if(!e||!e.ntpTheme)return!1;const n=e.ntpTheme.usingDefaultTheme,i=(null===(t=e.ntpTheme.backgroundColorRgba)||void 0===t?void 0:t.length)>3,r=!!e.ntpTheme.imageUrl;return!n&&!r&&i}function I(e){if(!e||!e.ntpTheme)return!1;const t=e.ntpTheme.usingDefaultTheme,n=!!e.ntpTheme.imageUrl;return!t&&n}function A(e){if(!e||!e.length)return;const t=e.find((e=>e&&"background_setting_preferences"===e.key));return t&&t.value?t.value:void 0}function E(e){return h.rM.get(e.provider)}function x(){const e=(0,d.$o)().getObject("bkgdV");if(!e)return-1;const t=(new Date).getDay();return e&&e.schedule&&-1!==e.schedule[t]?e.schedule[t]:-1}function M(e){return e&&e.includeVideoBackgroundsInRotation?x():-1}async function L(e,t){if(!e)return!1;if(!await u.U.isApiAvailableToUse())return!1;const n=t>=0?"Video":"Iris",i={...e,backgroundSelectionMetadata:{provider:n,configIndex:t,appliedTimestamp:Date.now()}};return u.U.savePreferenceSetting("background_setting_preferences",i)}const D=async(e,t)=>{var n;null==e||null===(n=e.$emit)||void 0===n||n.call(e,r.gJ,{enabled:t}),await b()&&T(p.nc.enable_split_screen,t)}},62932:function(e,t,n){"use strict";n.d(t,{A:function(){return a},z:function(){return o}});var i=n(45266);const r=new Map;function o(){const e=window&&window.chrome&&window.chrome.ntpSettingsPrivate;if(!e)return;if(!e.setPref)return;const t=e.setPref;e.setPref=function(e,n,i){if(t(e,n,i),d.has(e))return;let o="";const a=(new Error).stack;c.has(e)&&(o=function(e){if(!e)return"";const t=[],n=e.split(/\r?\n/);for(const e of n){const n=e.trim(),i=n.lastIndexOf(" ");if(!n||i<0||n.length<4)continue;const r=n.substring(3,i).split(".").slice(-1)[0];r&&l.has(r)&&t.push(r)}return t.slice(-1)[0]?t.slice(-1)[0]:""}(a)),function(e,t,n,i){if(!e||!i||!n)return;const o=r.get(t);if(!o)return;const a=i+";"+n;e(o,a)}(t,e,n,o)}}function a(e){s.forEach(((t,n)=>{e[n]&&r.set(t,n)}))}const s=new Map([[i._9.layoutModeInstrumentation,i._9.layout],[i._9.newsFeedDsiplayInstrumentation,i._9.feeds]]),c=new Set(["ntp.layout_mode","ntp.background_image_type","ntp.show_image_of_day","ntp.news_feed_display"]),d=new Set(["ntp.record_user_choices","ntp.user_nurturing"]),l=new Set(["updateLayout","onUpdateFeedVisibility","onContentSelectChange","onLayoutModeSelectChange","updateToCustomLayoutMode","updateBackgroundImageType","updateLayoutAndBackgroundImageType","overrideLayoutPreferenceForPolicy","onCustomBackgroundRadioClick","migrateBackgroundPreference","wpoPromoteNewFeedDisplaySetting","wpoPromoteNewLayout"])},49331:function(e,t,n){"use strict";n.r(t),n.d(t,{BrowserBackgroundPrefSupport:function(){return r.h0},BrowserType:function(){return r.Aq},ChromiumPageSettingsActions:function(){return a.V},ChromiumPageSettingsConnector:function(){return ne},ChromiumPageSettingsReducer:function(){return re},EdgeChannel:function(){return r._H},EdgeFeatureFlag:function(){return i},InPageSearchBoxType:function(){return r.HT},LayoutChangeInitiator:function(){return r.WT},PrimaryAccountType:function(){return oe.l},SplitScreenEventKey:function(){return r.gJ},ToolingInfo:function(){return ae},WpoLayoutPromotionFailedScenarios:function(){return r.YG},configDataStringMap:function(){return r.lA},coolDownTimeMap:function(){return r.BC},createLayoutPromotionData:function(){return o.U4},customBackgroundImageInfoStringMap:function(){return r.AL},edgeNextLayoutOptimizer:function(){return W},getBackgroundImageTypeFromSelectionMetadata:function(){return o.VT},getBackgroundSettingsPreferences:function(){return o.F0},getConfigDataAsync:function(){return o._u},getCurrentConfigurationIndex:function(){return o.tv},getCurrentLayoutAsync:function(){return o.eD},getCurrentVideoIndex:function(){return o.OS},getUserSetting:function(){return o.WH},getUserTopicAsync:function(){return o.O3},isBaseBackgroundPreferenceAndGallerySelectionMismatched:function(){return o.HG},isBundledThemeBackground:function(){return o.BA},isPersistentStorageAPIAvailable:function(){return o.Mc},isRGBThemeBackground:function(){return o.oB},logAppError:function(){return o.$W},logVerboseAppError:function(){return o.zJ},msQuickLinksDefaultOneRow:function(){return r.dK},msQuickLinksDefaultTwoRow:function(){return r.vs},overrideGallerySelectionCache:function(){return o.zb},overrideNtpSettingsPrivatePreferenceSetting:function(){return j.z},primaryAccountInfoStringMap:function(){return r.r2},quickLinksOptionsKey:function(){return r.pY},recordAndNotifySplitScreenSettingsChange:function(){return o.gC},recordUserChoice:function(){return o.qi},sendClientLogEvent:function(){return o.k4},topsitesCollapsedToOff:function(){return r.lx}});var i,r=n(50176);!function(e){e.WinHPCustomBackButtonBehavior="msEnableWinHPNewTabBackButtonFocusAndClose"}(i||(i={}));var o=n(88456),a=n(88762);const s={StructuredDataCardsUserPreference:{id:"scp",maxRawLength:250,useCookie:!0,jsonEncoded:!0},CoachmarkUserPreference:{id:"cmp",maxRawLength:1,useCookie:!1,jsonEncoded:!1},LayoutOptimization:{id:"wpolo",maxRawLength:250,useCookie:!1,jsonEncoded:!0}};var c,d;!function(e){e.DefaultShowContent="DefaultShowContent",e.DisplayedCoachMarkWizards="DisplayedCoachMarkWizards",e.DynamicFeedFilters="DynamicFeedFilters",e.FreDialogExistingUser="FreDialogExistingUser",e.HasMsa="HasMsa",e.MarketSelection="MarketSelection",e.OutlookOptIn="OutlookOptIn",e.ProActiveCanvasFRE="ProActiveCanvasFRE",e.StructuredDataCardsUserPreference="StructuredDataCardsUserPreference",e.TopicSelection="TopicSelection",e.Layout="Layout",e.DhpHideNewsFeed="DhpHideNewsFeed",e.HideBingImage="HideBingImage"}(c||(c={})),function(e){e.DefaultShowContent="dsc",e.CoachMarkWizard="cmwr",e.DynamicFeedFilters="dff",e.MarketReset="mktreset",e.HasMsa="msa",e.MarketSelection="ntps",e.OutlookOptIn="olopt",e.ProActiveCanvasFRE="spnewpcfre",e.StructuredDataCardsUserPreference="scp",e.TopicSelection="epnff",e.DhpHideNewsFeed="iedo",e.HideBingImage="bingimage"}(d||(d={}));var l=n(54297);class u{constructor(e=(0,l.$o)()){this.webStorage=e,this.loadSettingsFromStorage=()=>{},this.storage={}}fetchProperty(e){const t=s[e];return t&&this.storage[t.id]}clear(){Object.keys(s).forEach((e=>{const t=s[e];this.webStorage.removeItem(t.id),delete this.storage[t.id]}))}deleteProperty(e){const t=s[e];t&&(this.webStorage.removeItem(t.id),delete this.storage[t.id])}saveProperty(e,t){const n=s[e];if(n){const e=n.jsonEncoded,i=n.maxRawLength,r=typeof t,o=JSON.stringify(t),a=o.length;if(e?"object"===r&&a<=i:("string"===r||"number"===r)&&a<=i+2){const i=e?o:t;return this.webStorage.setItem(n.id,i),!0}}return!1}loadSynchronizedSettingsFromStorage(){Object.keys(s).forEach((e=>{const t=s[e].id,n=this.webStorage.getItem(t);n&&(this.storage[t]=JSON.parse(n))}))}}var p=n(76166),h=n(45266),g=n(25598),m=n(16614),f=n(88826),v=n(7476),y=n(76733),S=n(49155),C=n(91992),w=n(95815),b=n(92100),T=n(13334),k=n(21789),P=n(23357),I=n(98463),A=n(87172),E=n(74161),x=n(36867),M=n(97715),L=n(55524),D=n(31558),R=n(291),F=n(67213),O=n(23549);class B{}const N={0:h.nP.focused,1:h.nP.inspirational,2:h.nP.informational,3:h.nP.custom},$={focused:0,inspirational:1,informational:2,custom:3},U={0:"off",1:"headingsonly",2:"peek",3:"always",4:"onscroll"},_={off:0,headingsonly:1,peek:2,always:3,onscroll:4};class H{constructor(){this.recommendation=new B,this.getRecommendedLayout=async(e,t,n)=>new Promise((async i=>{try{const{coolDownTimeInSecondsPromoted:c,coolDownTimeInSecondsSelected:d,enbWpoPromotionFromPSL:l,forcePromotion:u,enableFeedChoiceCheck:p,enableCleanerPromotion:g,enableFromfeeds:m}=e&&e.layoutPromotion||{};let f=c,v=d;if(this.qualifyForPromotion&&!l)return this.recommendation.control?i(null):i(this.recommendation);let y=null;if(l){if(await A.U.isApiAvailableToUse()){var a;const e=null===(a=await A.U.getPreferenceSetting(E.Xm.layoutPromotion))||void 0===a?void 0:a.value;this.layoutPromotionConfig=e||null}else g&&O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.nurturingApiUnavailable)}else this.layoutPromotionConfig=(0,M.U)();if(this.layoutPromotionConfig&&(y=(0,o.U4)(this.layoutPromotionConfig.layoutRecommended,this.layoutPromotionConfig.tmpl,this.layoutPromotionConfig.isControl,this.layoutPromotionConfig.fromLayouts,this.layoutPromotionConfig.fromFeeds,this.layoutPromotionConfig.reTargetRecommendedLayout,this.layoutPromotionConfig.selectedFeedDisplaySetting,this.layoutPromotionConfig.source),f=this.layoutPromotionConfig.coolDownTimeInSecondsPromoted??f,v=this.layoutPromotionConfig.coolDownTimeInSecondsSelected??v),!y||!y.recommendedLayout)return(0,o.k4)("There is no config to promote."),O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.promotionInfoIsNull),i(null);if(u){const{reTargetRecommendedLayout:e}=y;if(this.recommendation={recommendedLayout:y.recommendedLayout,isRevertFlight:e,shouldReTarget:e,tmpl:y.tmpl,control:y.control,source:y.source},this.qualifyForPromotion=!0,e){var s;const e=await A.U.getPreferenceSetting(E.Xm.wpo),t=e&&e.value,n=null!==(s=t.layoutHistory)&&void 0!==s&&s.length?t.layoutHistory.pop():null;n&&(this.recommendation.recommendedLayout=n.from||y.recommendedLayout)}return this.recommendation.recommendedLayout===h.nP.custom&&y.selectedFeedDisplaySetting&&(this.recommendation.recommendedFeedDisplaySetting=y.selectedFeedDisplaySetting),i(this.recommendation)}return await this.canBePromoted(y,t,f,v,!!p,g,n,m)?(y.selectedFeedDisplaySetting&&y.recommendedLayout===h.nP.custom&&(this.recommendation.recommendedFeedDisplaySetting=y.selectedFeedDisplaySetting),i(this.recommendation)):i(null)}catch(e){return(0,o.$W)(v.nab,"Applying recommended layout failed",`Error:${e}`),i(null)}})),this.qualifyForPromotion=!1}static getInstance(){return L.Gq.get("__EdgeNextLayoutOptimizer__",(()=>new H))}isNurturingLimitsGood(e,t,n,i,a){if(e&&e.recommendedLayoutAppliedTs){const t=(new Date).getTime(),n=a??r.BC.promoted;if(t-e.recommendedLayoutAppliedTs>1e3*n)return(0,o.k4)("Promote again after a long gap"),!0}if(t&&!n){const t=`recommendedLayoutAppliedTs:${e&&e.recommendedLayoutAppliedTs}`;return(0,o.k4)("Recommended layout was already applied",t),O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.layoutIsAlreadyApplied),!1}return!(n&&i>=1)||((0,o.k4)("Max retargeting threshold reached"),O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.maxRetargetingThreshold),!1)}async updateLayoutPromotionUserNurturing(e,t,n){const i=(new Date).getTime(),r=await A.U.getPreferenceSetting(E.Xm.wpo),a=r&&r.value,s=a&&a.recommendedLayoutRetargetHistory||[];n&&s.push(i);const c=a&&a.layoutHistory||[];c.push({time:i,from:e,to:t,reTarget:n||!1});const d={recommendedLayoutAppliedTs:i,recommendedLayoutRetargetHistory:s,layoutHistory:c};await A.U.savePreferenceSetting(E.Xm.wpo,d),(0,o.k4)("Recommended layout applied")}async canBePromoted(e,t,n,i,a,s,c,d){const{enabled:l}=(0,D.N)()&&await(0,F.zx)()||{};if(l&&(l.includes("msNtpExp12")||l.includes("msNtpExp13")||l.includes("msNtpExp14")))return O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.isInEdgeExperience),!1;if(t||(t=await(0,o.eD)()),t===e.recommendedLayout&&t!==h.nP.custom)return(0,o.k4)("Current layout is same as recommended layout"),O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.sameWithCurrentLayout),!1;if(this.areFeedsDisabledByAdmin())return(0,o.k4)("No promotion since this is an enterprise content off promotion and feeds are disabled by admin settings."),O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.feedsDisabledByAdmin),!1;const{fromLayoutsArray:u,reTargetRecommendedLayout:p,fromFeedsArray:g}=e;if(u&&-1===u.indexOf(t))return(0,o.k4)(`Current layout ${t} is not one of the fromLayouts ${u.toString()}`),O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.isNotOneOfFromLayouts),!1;if(d&&g&&g.length&&-1===g.indexOf(c))return(0,o.k4)(`Current layout ${c} is not one of the fromFeeds ${g.toString()}`),O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.isNotOneOfFromFeeds),!1;if(!await A.U.isApiAvailableToUse())return O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.nurturingApiUnavailable),!1;const m=a?h._9.feeds:E.nc.layout_mode;if(await this.isSelectedByUser(m,e.recommendedLayout,i))return!1;const f=await A.U.getPreferenceSetting(E.Xm.wpo),v=f&&f.value,y=v&&v.recommendedLayoutAppliedTs,S=v&&v.recommendedLayoutRetargetHistory&&v.recommendedLayoutRetargetHistory.length;if(!s){if(!this.isNurturingLimitsGood(v,y,p,S,n))return!1}if(this.recommendation={recommendedLayout:e.recommendedLayout,isRevertFlight:p,shouldReTarget:p,tmpl:e.tmpl,control:e.control,source:e.source},this.qualifyForPromotion=!0,p){var C;const t=null!==(C=v.layoutHistory)&&void 0!==C&&C.length?v.layoutHistory.pop():null;t&&(this.recommendation.recommendedLayout=t.from||e.recommendedLayout)}return this.recommendation.recommendedLayout===h.nP.custom&&e.selectedFeedDisplaySetting&&(this.recommendation.recommendedFeedDisplaySetting=e.selectedFeedDisplaySetting),!(this.recommendation.control&&!s)||((0,o.k4)("About to promote, but did not since this is a control flight"),O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.isControlFlight),!1)}areFeedsDisabledByAdmin(){const e=(0,l.$o)().getObject("AdminPortalSettings");if(!e)return!1;const{isOfficeContentEnabled:t,isShowCompanyAndIndustry:n}=e;return!t&&!n}async isSelectedByUser(e,t,n){if(!await x.L.isApiAvailableToUse()){const e="ntp.record_user_choices pref is not present in this version of EDGE; Will try to promote user";return(0,o.k4)(e),!1}let i=await this.getExplicitUserChoice(e);if(e!==h._9.feeds||i||(i=await this.getExplicitUserChoice(E.nc.layout_mode),O.M0.addOrUpdateTmplProperty("f-l")),i){if(await this.isUserChoiceOutOfCooldownTime(i,n)){const e="ntp.record_user_choices pref is present and can be promoted as selected time is larger than cooldowntime";return(0,o.k4)(e),!1}(0,o.k4)(`Did not promote layout to ${t} since user explicitly set layout or content to ${i.value}`);const a="layout_mode"===e?r.YG.isLayoutSelectedByUserWithinCoolDown:r.YG.isContentSelectedByUserWithinCoolDown;return O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",a),!0}return!1}async getExplicitUserChoice(e){const t=await x.L.getPreferenceSetting(e);return t&&"ntp"===t.source?t:null}async isUserChoiceOutOfCooldownTime(e,t){const n=e&&e.timestamp;if(n){if((new Date).getTime()-n>1e3*(t??r.BC.selected))return!0}return!1}async getWpoLayoutPromotionFromBrowser(e){if(this.qualifyForPromotion)return this.recommendation.control&&!e?(O.M0.addOrUpdateTmplProperty("layoutPromotionFailedAdd",r.YG.isControlFlight),null):this.recommendation;if(!await A.U.isApiAvailableToUse())return O.M0.addOrUpdateTmplProperty("layoutPromotionFailedAdd",r.YG.nurturingApiUnavailable),null;const t=await A.U.getPreferenceSetting(E.Xm.wpo_nx);if(t&&void 0!==t.value){const e=t.value;return this.recommendation={recommendedLayout:e.isCtrl?null:N[e.proLayout],recommendedFeedDisplaySetting:e.isCtrl?null:U[e.proContent],isRevertFlight:e.isRvert,shouldReTarget:e.isRvert,tmpl:e.tmpl,control:e.isCtrl,source:e.source},this.qualifyForPromotion=!0,this.recommendation}return O.M0.addOrUpdateTmplProperty("layoutPromotionFailedAdd",r.YG.noSavedWpoPromotionOptions),null}async storeWpoLayoutPromotionToBrowser(e,t,n,i,r,o=""){if(!await A.U.isApiAvailableToUse())return;const a={isRvert:e,isCtrl:t,tmpl:r,proLayout:t?null:$[n],proContent:t?null:_[i],source:o};A.U.savePreferenceSetting(E.Xm.wpo_nx,a)}}const W=(0,R.h)(H);var q=n(78672),V=n(9586);class G{constructor(e){this.numberOfDaysToStoreTmpl=90,this.layoutTmplDataKey=E.Xm.wpoLytTmpl,this.userNurturingManager=e}static getInstance(){return L.Gq.get("__TmplManager__",(()=>new G(A.H.getInstance())))}async persistTmplValueToNurturingPref(e){if(e){const t=await this.userNurturingManager.getPreferenceSetting(this.layoutTmplDataKey),n=t&&t.value||[];if(this.findTmpl(n,e))return;n.push({value:e,expiryDate:this.getExpirationTimestamp(this.numberOfDaysToStoreTmpl)}),await A.U.savePreferenceSetting(this.layoutTmplDataKey,n)}}async persistTmplValueToNurturingPrefAndStampToTelemetry(e){if(e){const t=await this.userNurturingManager.getPreferenceSetting(this.layoutTmplDataKey),n=t&&t.value||[];this.findTmpl(n,e)||n.push({value:e,expiryDate:this.getExpirationTimestamp(this.numberOfDaysToStoreTmpl)});const i=[...new Set(n)];await this.userNurturingManager.savePreferenceSetting(this.layoutTmplDataKey,i),O.M0.addOrUpdateTmplProperty(e,"1")}}async stampExistingTmplValueToTelemetry(){const e=await this.userNurturingManager.getPreferenceSetting(this.layoutTmplDataKey),t=e&&e.value||[];if(!t.length)return;let n=!1;const i=this.getExpirationTimestamp(this.numberOfDaysToStoreTmpl),r=t.map((e=>"string"==typeof e?(n=!0,{value:e,expiryDate:i}):e)),o=(new Date).getTime(),a=r.filter((e=>e.expiryDate>o));a.forEach((e=>{e.value&&O.M0.addOrUpdateTmplProperty(e.value,"1")})),(n||r.length!=a.length)&&await this.userNurturingManager.savePreferenceSetting(this.layoutTmplDataKey,a)}findTmpl(e,t){return e&&-1!=e.findIndex((e=>e===t||e&&e.value===t))}getExpirationTimestamp(e){let t;try{t=(0,V.Z)(new Date,e)}catch(n){const i=new Date;t=i.setDate(i.getDate()+e)}return t.getTime()}}const z=(0,R.h)(G);var j=n(62932),K=n(91046);const Q="myFeed",Z=(e,t,n)=>{if(e===h._9.selectedFeedPivot&&""===t&&(t=Q),e===h._9.selectedFeedPivot&&""===n&&(n=Q),(e!==h._9.feeds||"onscroll"!==t||"headingsonly"!==n)&&t!==n){"true"===(0,K.L)().get("mock-ntp-header")||O.M0.sendAppErrorEvent({...v.sFk,message:"SSR - Edge header mismatch.",pb:{...v.sFk.pb,customMessage:`key: ${e}, header: ${t}, state: ${n}`,edgeHeader:`${T.Al.EdgeNTPHeader}`}})}};var J=n(84424),X=n(88672),Y=n(53629);function ee(e,t=!0){const n=function(){try{var e,t;const n=Y.k.getWpoTreatmentsWithType(X._h.searchBoxCollapse),i=(null==n?void 0:n.length)>0&&(null===(e=n[0])||void 0===e||null===(t=e.properties)||void 0===t?void 0:t.searchBoxCollapsibleControlConfig);if(i)return i}catch(e){const t="Error in getting wpo search box collapsible config";(0,f.H)(v.Od5,t,`error:${e}`)}return null}(),i=n&&!0===n.collapseSearchBox;O.M0.addOrUpdateTmplProperty("hidableSearchBox",i?"1":"0");let r=null;return e&&e.length&&(r=e.find((e=>"hide_search_box"===e.setting))),!i||t&&r?!!r&&!!r.value:(O.M0.addOrUpdateTmplProperty("promotedSearchBoxCollapsed",n.collapseSearchBox?"1":"0"),!!n.collapseSearchBox)}const te=()=>{window.chrome.runtime.lastError};class ne extends p.e{constructor(e,t,n,i,s,d,l){var p;super(e,t,n,i,s,d,l),this.preferenceChangeCallbacks=[],this.marketCookieName="ntps",this.cookieExpireInDays=182,this.didLayoutModeChangeInCurrentTab=!1,this.layoutChangeInitiatorKey="lytupdtinitiator",this.QSPLayoutOverride=null,this.QSPTopSitesOverride=null,this.shouldPromoteTopsitesTop=!1,this.isPageLayoutStateReady=new Promise((e=>{this.resolvePageLayoutState=e})),this.isWindowsIndexerPromotedTopSitesPreferenceAvailable=!1,this.getLayoutStateFromOverrideConfig=(e,t)=>{let n;if(e&&e!==h.nP.custom){const i=h.Wi[e];n={currentBackgroundImageType:i.current_background_image_type,originalLayout:t.currentLayout,currentLayout:e,greetingEnabled:i.greeting,imageOfTheDayEnabled:i.current_background_image_type!==h.HX.off,quickLinksEnabled:i.quick_links,hideDefaultTopSites:i.hide_promoted_links,selectedFeedDisplaySetting:i.feeds_position}}else n={...t,originalLayout:t.currentLayout,currentLayout:h.nP.custom};return n},this.settingsAPI="undefined"!=typeof window&&window&&window.chrome&&window.chrome.ntpSettingsPrivate,this._authPrivateApi="undefined"!=typeof window&&window&&window.chrome&&window.chrome.authPrivate,this.ntpApiHandle="undefined"!=typeof window&&window&&window.chrome&&window.chrome.embeddedSearch&&window.chrome.embeddedSearch.newTabPage,this.chromiumBackgroundPrefType=r.h0.BOOLEAN,this.registerOnConfigDataChangedCallback(),this.registerOnPrefsChangeCallback(),this.checkPromoteTopsitesTop().then((e=>{this.shouldPromoteTopsitesTop=e})),this.edgeChromiumStorageProvider=new u,a.V.updateLocalStorage.registerObserver((e=>{const t=e.params[0];this.edgeChromiumStorageProvider.saveProperty(c.StructuredDataCardsUserPreference,function(e){return{bsk:{v:e.bingShoppingVisible?1:0,p:null},wsk:{v:e.weatherVisible?1:0,p:null},ssk:{v:e.sportsVisible?1:0,p:null},msk:{v:e.moneyVisible?1:0,p:null},hsk:{v:e.horoscopeVisible?1:0,p:null},osk:{v:e.onThisDayVisible?1:0,p:null},esk:{v:e.electionsVisible?1:0,p:null},essk:{v:e.esportsVisible?1:0,p:null},lsk:{v:e.lotteryVisible?1:0,p:null},qsk:{v:e.qnaVisible?1:0,p:null},rsk:{v:e.qnaVisible?1:0,p:null},amsk:{v:e.autosMarketplaceVisible?1:0,p:null},bhsk:{v:e.healthCardVisible?1:0,p:null}}}(t))})),a.V.marketUpdated.registerObserver((e=>{const t=e.params[0];if(t&&""!==t)try{this.updateMarketandRefresh(t)}catch(e){(0,f.OO)(e,v.sMt,"Failed to change the market, cookie doesn't drop from PCS")}})),this.getInitialState().then((e=>{a.V.loadLocalStorage.getActionSender(this).send(e)})),this.QSPLayoutOverride=b.c.getQueryParameterByName("setNTPLayout",(0,q.zp)()),this.QSPTopSitesOverride=b.c.getQueryParameterByName("setNTPTopSites",(0,q.zp)()),this.QSPLayoutOverride=null!==(p=(0,q.zp)())&&void 0!==p&&p.includes("ocid=widgetonlockscreen")?h.nP.custom:this.QSPLayoutOverride,this.getPageLayoutStateAsync().then((e=>{var t;if(this.config&&this.config.promoFormParamList){const t=new URLSearchParams((0,q.zp)()).get("form");if(t){if(this.config.promoFormParamList.includes(t.toUpperCase())&&"always"!==e.selectedFeedDisplaySetting){const t={...e,originalLayout:e.currentLayout,...h.YZ};this.updateLayout(t),e={...t},O.M0.addOrUpdateTmplProperty("formRecommendedLayout",e.currentLayout),O.M0.addOrUpdateTmplProperty("formRecommendedDisplay",e.selectedFeedDisplaySetting)}}}if(this.shouldPromoteTopsitesTop&&(this.saveTopSitesPromotionNurturing(e.selectedQuickLinksDisplaySetting,h.Z3.top),e.selectedQuickLinksDisplaySetting=h.Z3.top,a.V.updateWPOTopsitesPromotion.getActionSender(this).send(!0)),window.isSSREnabled&&(null===(t=this.config.layoutPromotion)||void 0===t||!t.enbWpoPromotionFromPSL))return e.isLoadCompleted=!0,a.V.pageLayoutStateLoaded.getActionSender(this).send(e),void this.resolvePageLayoutState();this.applyWpoLayoutPromotion(e)})),this.getPrimaryAccountInfoAsync().then((e=>{a.V.updatePrimaryAccountInfo.getActionSender(this).send(e)})),this.getConfigDataAsync().then((e=>{a.V.updateConfigData.getActionSender(this).send(e)})),this.ntpApiHandle&&(this.ntpApiHandle.onthemechange=()=>{const e=this.ntpApiHandle.ntpTheme;a.V.updateNtpTheme.getActionSender(this).send(e),e||(0,o.$W)(v.BFw,"Missing theme information detected on theme change.",`ntpTheme: ${e}`)})}updateStateOnce(e){a.V.pageLayoutStateLoaded.getActionSender(this).send(e)}applyWpoLayoutPromotion(e){var t;null!==(t=this.config.layoutPromotion)&&void 0!==t&&t.enbWpoPromotionFromPSL?W.getWpoLayoutPromotionFromBrowser(this.config.layoutPromotion.enableCleanerPromotion).then((t=>{const n=()=>{if((0,D.N)()){const e=this.getCurrentState();W.getRecommendedLayout(this.config,e.currentLayout,e.selectedFeedDisplaySetting).then((e=>{e?W.storeWpoLayoutPromotionToBrowser(e.isRevertFlight,e.control,e.recommendedLayout,e.recommendedFeedDisplaySetting,e.tmpl,e.source):A.U.savePreferenceSetting(E.Xm.wpo_nx,null)}))}else O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.canNotUseDom)};this.layoutPromotionFollowUp(e,t),n(),window.addEventListener("beforeunload",n,{once:!0})})):W.getRecommendedLayout(this.config,e.currentLayout,e.selectedFeedDisplaySetting).then((t=>{this.layoutPromotionFollowUp(e,t)}))}layoutPromotionFollowUp(e,t){var n;if((null!==(n=this.config.layoutPromotion)&&void 0!==n&&n.forceRegisterLayoutPromotionCoachMark||t&&!t.isRevertFlight)&&(a.V.updateWPOLayoutPromotion.getActionSender(this).send(!0),a.V.updateWPOLayoutPromotionSource.getActionSender(this).send(t.source)),t&&t.tmpl&&z.persistTmplValueToNurturingPref(t.tmpl),t&&t.source&&O.M0.addOrUpdateTmplProperty("pSource",t.source),t){const{recommendedLayout:n,recommendedFeedDisplaySetting:i,shouldReTarget:o}=t;if(n){const t=T.Al.IsPrerender?r.WT.wpoPrerenderTab:r.WT.wpoVisibleTab,a=this.getLayoutStateFromOverrideConfig(n,e),s=e.currentLayout;this.wpoPromoteNewLayout(a,t),i&&this.wpoPromoteNewFeedDisplaySetting(i,e.selectedFeedDisplaySetting),(0,l.$o)().setObject("previousLayoutState",{currentLayout:e.currentLayout,selectedFeedDisplaySetting:e.selectedFeedDisplaySetting,currentBackgroundImageType:e.currentBackgroundImageType,greetingEnabled:e.greetingEnabled,imageOfTheDayEnabled:e.imageOfTheDayEnabled,quickLinksEnabled:e.quickLinksEnabled,hideDefaultTopSites:e.hideDefaultTopSites});const c=i||a.selectedFeedDisplaySetting;e={...e,currentLayout:n,selectedFeedDisplaySetting:c,currentBackgroundImageType:a.currentBackgroundImageType,greetingEnabled:a.greetingEnabled,imageOfTheDayEnabled:a.imageOfTheDayEnabled,quickLinksEnabled:a.quickLinksEnabled,hideDefaultTopSites:a.hideDefaultTopSites},O.M0.addOrUpdateTmplProperty("recommendedLayout",n),O.M0.addOrUpdateTmplProperty("recommendedDisplay",c),W.updateLayoutPromotionUserNurturing(s,n,o)}}(0,D.N)()&&z.stampExistingTmplValueToTelemetry(),e.isLoadCompleted=!0,a.V.pageLayoutStateLoaded.getActionSender(this).send(e),this.resolvePageLayoutState()}async updateMarketandRefresh(e){(0,w.sq)(this.marketCookieName,void 0,-1),(0,w.sq)(this.marketCookieName,void 0,-1,void 0,"/edge");const t=JSON.stringify({m:e});(0,w.sq)(this.marketCookieName,t,this.cookieExpireInDays,k.jG.HostPage.topDomain,"/"),await x.L.savePreferenceSetting(this.marketCookieName,{setting:this.marketCookieName,source:"ntp",timestamp:(new Date).getTime(),value:t}),O.M0.addOrUpdateTmplProperty("marketSetToExplicitSelection","1");const n=`/${k.jG.CurrentMarket}/`;if(!location.pathname.startsWith(n))return void(0,S.Z)();const i=new URL(location.href);i.pathname=i.pathname.replace(n,`/${e}/`),(0,S.Z)({newUrl:i.href})}checkAuthApiIsAvailable(){return!!(window&&window.chrome&&window.chrome.authPrivate)&&!!window.chrome.authPrivate.startEdgeSignIn}getPrimaryAccountInfoAsync(e=!0){return new Promise((t=>{const n=this.getCurrentState();e&&n.primaryAccountInfo?t(n.primaryAccountInfo):this._authPrivateApi&&this._authPrivateApi.getPrimaryAccountInfo?this._authPrivateApi.getPrimaryAccountInfo((e=>{if(e){const n={accountId:e[r.r2.accountId],accountType:e[r.r2.accountType],firstName:e[r.r2.firstName],lastName:e[r.r2.lastName],email:e[r.r2.email]};t(n)}else O.M0.sendAppErrorEvent({...v.bKp,message:"Failed to get response from Chromium API.",pb:{...v.bKp.pb}}),t({})})):(y.k.logError("Failed to get auth private api data from Chromium API."),t({}))}))}async getConfigDataAsync(){const e=this.getCurrentState();return e.configData?e.configData:(0,o._u)()}getPageSettingsStateAsync(){const e=this.getCurrentState(),t=this.config&&this.config.forceDisableContent;if(T.Al.CurrentFlightSet.has("prg-usessrlayout")&&(0,D.N)()&&window.isSSREnabled&&window.ssrLayoutState&&!window.isHydrationCompleted){const n=Object.assign({},e,window.ssrLayoutState);return t&&this.setContentDisabled(n),Promise.resolve(n)}return t&&this.setContentDisabled(e),new Promise(((n,i)=>this.settingsAPI?e.isLoadCompleted?(t&&!e&&this.setContentDisabled(e),n(e)):void a.V.pageLayoutStateLoaded.registerObserver((e=>{const r=e&&e.params;if(!r||r.length<1)return i("Load action didn't send any params");const o=r[0];return t&&!o&&this.setContentDisabled(o),o?n(o):i("Chromium Load action params type does not match with expected state type")})):n(e)))}getThemeTextColor(){let e=null;const t=this.getThemeLayoutColor();if(t){const n={r:t[0],g:t[1],b:t[2],a:t[3]};e=C.g.rgbNumberToCssHexColor(C.g.parsedColorToNumber(n))}return e}getThemeLayoutColor(){const e=this.getCurrentState(),t=e.ntpTheme;if(e.currentBackgroundImageType!==h.HX.theme||!t||t.imageUrl||t.usingDefaultTheme||!t.backgroundColorRgba)return null;if(t&&!t.usingDefaultTheme){if(t&&t.isNtpBackgroundDark&&t.textColorRgba&&t.textColorRgba.length>3)return t.textColorRgba;if(t&&!t.isNtpBackgroundDark&&t.textColorLightRgba&&t.textColorLightRgba.length>3)return t.textColorLightRgba}return null}getLayoutStateAsync(){return this.getPageSettingsStateAsync()}addSettingChangeListener(e){this.preferenceChangeCallbacks.push(e)}updateLayout(e,t=r.WT.user,n=!0,i){if(!(0,D.N)()||!this.settingsAPI||this.config&&this.config.forceDisableContent)return;if(T.Al.CurrentFlightSet.has("prg-usessrlayout")&&(0,D.N)()&&window.isSSREnabled&&window.ssrLayoutState&&!window.isHydrationCompleted){const i=L.Gq.get("__hydrationPromise__");if(i)return void i.getResultAsync().then((()=>{this.updateLayout(e,t,n)}))}const o=this.getCurrentState();t!==r.WT.user&&"off"===e.selectedFeedDisplaySetting&&"off"!==o.selectedFeedDisplaySetting&&O.M0.sendAppErrorEvent({...v.MRy,message:`Feed layout is set to content-off by initiator: ${t}`,pb:{...v.MRy.pb}});let a=h.$B[o.selectedQuickLinksDisplaySetting];e.selectedQuickLinksDisplaySetting&&(a=h.$B[e.selectedQuickLinksDisplaySetting]),this.didLayoutModeChangeInCurrentTab=!0,(0,l.$o)().setObject(this.layoutChangeInitiatorKey,t);b.c.getQueryParameterByName("isFREModalBackground",(0,q.zp)())?(O.M0.addOrUpdateTmplString("FREModalBackgroundLayoutNotSaved:1"),t!==r.WT.user&&O.M0.addOrUpdateTmplProperty("layoutPromotionFailed",r.YG.isFREModalBackground)):((0,F.LC)(t===r.WT.user?E.st.User:E.st.Wpo,"layout",h.Uq[e.originalLayout??e.currentLayout],h.Uq[e.currentLayout],(new Date).getTime()),n?this.executeSettingsChange(h._9.layout,h.Uq[e.currentLayout]):this.settingsAPI.setPref(h._9.layout,h.Uq[e.currentLayout],te)),e.isContentFeedManagedByAdminPortal&&this.updateContentFeedAdminPortalSetting(!0),a?this.settingsAPI.setPref(h._9.quickLinksDisplaySetting,a,te):this.settingsAPI.setPref(h._9.quickLinks,e.quickLinksEnabled,te),this.settingsAPI.setPref(h._9.hideDefaultTopSites,e.hideDefaultTopSites,te),this.settingsAPI.setPref(h._9.imageOfTheDay,e.imageOfTheDayEnabled,te),this.settingsAPI.setPref(h._9.currentBackgroundImageType,e.imageOfTheDayEnabled?h.HX.imageAndVideo:h.HX.off,te),this.settingsAPI.setPref(h._9.greeting,e.greetingEnabled,te),this.settingsAPI.setPref(h._9.feeds,e.selectedFeedDisplaySetting,te),t===r.WT.user&&i&&x.L.savePreferenceSetting(h._9.feeds,{setting:h._9.feeds,source:"ntp",timestamp:(new Date).getTime(),value:e.selectedFeedDisplaySetting}),void 0!==e.selectedFeedPivot&&this.settingsAPI.setPref(h._9.selectedFeedPivot,e.selectedFeedPivot,te)}updateQuickLinks(e){const t=this.getCurrentState();if(t&&t.selectedQuickLinksDisplaySetting){const t=e?h.VE.onerow:h.VE.off;this.executeSettingsChange(h._9.quickLinksDisplaySetting,t)}else this.executeSettingsChange(h._9.quickLinks,e)}updateQuickLinksDisplayOption(e,t=!1){this.QSPTopSitesOverride=null;const n=this.getCurrentState();n&&n.configData&&n.configData.enabledFeatures&&(n.configData.enabledFeatures.includes(r.dK)||n.configData.enabledFeatures.includes(r.vs))&&(this.executeSettingsChange(h._9.quickLinksDisplaySetting,h.VE[e]),x.L.savePreferenceSetting(E.nc.tscollapsed,{setting:E.nc.tscollapsed,source:r.lx,timestamp:(new Date).getTime(),value:0}),t?e===h.Z3.off&&A.U.savePreferenceSetting(r.lx,{selectedQuickLinksDisplaySetting:n.selectedQuickLinksDisplaySetting,quickLinkSettingsChanged:!1}):A.U.getPreferenceSetting(r.lx).then((e=>{const t=null==e?void 0:e.value;t&&A.U.savePreferenceSetting(r.lx,{...t,quickLinkSettingsChanged:!0})}))),this.shouldPromoteTopsitesTop&&n.selectedQuickLinksDisplaySetting===h.Z3.top&&e===h.Z3.onerow&&this.updateUIForSettingsChange(h._9.quickLinksDisplaySetting,h.VE[e])}updateHideDefaultLinksOption(e){this.executeSettingsChange(h._9.hideDefaultTopSites,e)}updateBackgroundImageType(e){this.executeSettingsChange(h._9.currentBackgroundImageType,e),this.executeSettingsChange(h._9.imageOfTheDay,e!==h.HX.off)}updateTopSitesQuickLinkEndMarginUsedPadding(e){a.V.updateTopSitesQuickLinkEndMarginUsedPadding.getActionSender(this).send(e)}updateGreeting(e){this.executeSettingsChange(h._9.greeting,e)}updateFeeds(e,t,n=E.st.User){(0,F.LC)(n,"feeds",h.gp[t],h.gp[e],(new Date).getTime()),n!==E.st.User&&"off"===e&&"off"!==t&&O.M0.sendAppErrorEvent({...v.MRy,message:`Feed is set to off by initiator: ${n}`,pb:{...v.MRy.pb}}),this.executeSettingsChange(h._9.feeds,e),n===E.st.User&&x.L.savePreferenceSetting(h._9.feeds,{setting:h._9.feeds,source:"ntp",timestamp:(new Date).getTime(),value:e})}updateOfficeLeftRail(e){(0,l.$o)().setItem(P.JJ,e.toString())}officeLeftRailEnabled(){return(0,l.$o)().getObject(P.JJ,!1)}isContentFeedManagedByAdminPortal(){return(0,l.$o)().getObject("isContentFeedManagedByAdminPortal",!1)}updateContentFeedAdminPortalSetting(e){(0,l.$o)().setItem("isContentFeedManagedByAdminPortal",e.toString())}updatePageSetting(e,t){(0,l.$o)().setItem(e,t.toString())}isPageSettingEnabled(e,t){return(0,l.$o)().getObject(e,t)}executeSettingsChange(e,t){this.settingsAPI&&this.settingsAPI.setPref&&this.settingsAPI.setPref(e,t,te)}async getInitialState(){this.edgeChromiumStorageProvider.loadSynchronizedSettingsFromStorage();const e=this.edgeChromiumStorageProvider.fetchProperty(c.StructuredDataCardsUserPreference)||{};if(e){return{weatherVisible:!e.wsk||!!e.wsk.v,sportsVisible:!e.ssk||!!e.ssk.v,moneyVisible:!e.msk||!!e.msk.v,bingShoppingVisible:!e.bsk||!!e.bsk.v,horoscopeVisible:!e.hsk||!!e.hsk.v,onThisDayVisible:!e.osk||!!e.osk.v,electionsVisible:!e.esk||!!e.esk.v,esportsVisible:!e.essk||!!e.essk.v,lotteryVisible:!e.lsk||!!e.lsk.v,qnaVisible:!e.qsk||!!e.qsk.v,recipesVisible:!e.rsk||!!e.rsk.v,autosMarketplaceVisible:!e.amsk||!!e.amsk.v,healthCardVisible:!e.bhsk||!!e.bhsk.v}}return null}getPageLayoutStateAsync(){const e=this.getCurrentState();return new Promise((t=>{this.ntpApiHandle&&(e.ntpTheme=this.ntpApiHandle.ntpTheme);const n=e;if(this.settingsAPI){let i,a=!1;window.chrome.ntpSettingsPrivate.getAllPrefs((async s=>{if(void 0!==s){var c,d,l;i=this.defineChromiumKeys(s),(0,j.A)(i),n.currentLayout=this.QSPLayoutOverride??h.F5[i[h._9.layout]],T.Al.SelectedFeedPivot=i[h._9.selectedFeedPivot];const y=new URLSearchParams(location.search);y.has("feedPivot")&&(T.Al.SelectedFeedPivot=y.get("feedPivot"));const S=i[h._9.gamerModeEnabled];if(void 0!==S){const e=this.getGroupPolicy(s,h._9.gamerModeEnabled);I.X.UpsellGamerMode=!1===S&&!("USER_POLICY"===e.controlledBy&&"ENFORCED"===e.enforcement)}else I.X.UpsellGamerMode=!1;n.prefDerivedBrowserFeatures={isCustomBackgroundImageFeatureFlightOn:h._9.customBackgroundImageInfo in i};const C=h._9.currentBackgroundImageType in i,w=h._9.imageOfTheDay in i;let P;this.isWindowsIndexerPromotedTopSitesPreferenceAvailable=h._9.windowsIndexerPromotedTopSites in i;if(C&&!this.config.disableBackgroundGallery&&!k.jG.IsFrePage){const e=i[h._9.userNurturingUpdated];P=(0,o.F0)(e)}if(C&&w){this.chromiumBackgroundPrefType=r.h0.BOOLEAN_AND_STRING_ENUM;const t=i[h._9.imageOfTheDay],o=i[h._9.currentBackgroundImageType];t||o===h.HX.off||o===h.HX.theme?t&&o===h.HX.off?(n.currentBackgroundImageType=h.HX.imageAndVideo,a=!0):i[h._9.currentBackgroundImageType]===h.HX.custom&&i[h._9.customBackgroundImageInfo]&&!i[h._9.customBackgroundImageInfo].has_image||i[h._9.currentBackgroundImageType]===h.HX.theme&&e.ntpTheme&&e.ntpTheme.usingDefaultTheme?n.currentBackgroundImageType=h.HX.imageAndVideo:n.currentBackgroundImageType=i[h._9.currentBackgroundImageType]:(n.currentBackgroundImageType=h.HX.off,a=!0)}else if(w){this.chromiumBackgroundPrefType=r.h0.BOOLEAN;const e=i[h._9.imageOfTheDay];n.currentBackgroundImageType=e?h.HX.imageAndVideo:h.HX.off}else C&&(this.chromiumBackgroundPrefType=r.h0.STRING_ENUM,n.currentBackgroundImageType=i[h._9.currentBackgroundImageType]);if(C&&h._9.customBackgroundImageInfo in i){const e=i[h._9.customBackgroundImageInfo],t={hasImage:e[r.AL.hasImage],resourceUrl:e[r.AL.resourceUrl],timestamp:e[r.AL.timestamp]};n.customBackgroundImageInfo=t}let A;const x=i[h._9.currentBackgroundImageType];x!==h.HX.off&&P&&P.backgroundSelectionMetadata&&(A=(0,o.VT)(P.backgroundSelectionMetadata)),!P||P.backgroundSelectionMetadata||P.changeBackgroundDaily||(0,o.$W)(v.LxB,"Rotate Image daily is off with no selection in the gallery cache",`Current background image type (pref): ${i[h._9.currentBackgroundImageType]}, gallery settings: ${JSON.stringify(P)}, current layout: ${h.F5[i[h._9.layout]]}`);const M=i[h._9.customBackgroundImageInfo];if((0,o.HG)(x,null===(c=P)||void 0===c?void 0:c.backgroundSelectionMetadata)&&(0,o.zJ)(v.DnN,"Preference for current background image type and gallery selection do not match.",`Current background image type (pref): ${i[h._9.currentBackgroundImageType]}, gallery settings: ${JSON.stringify(P)}`,M,e.ntpTheme,h.F5[i[h._9.layout]]),P&&x===h.HX.custom&&!M)(0,o.zJ)(v.qP4,"Current BackgroundImageType is custom and custom background information is missing.",`Current background image type (pref): ${i[h._9.currentBackgroundImageType]}, gallery settings: ${JSON.stringify(P)}`,M,e.ntpTheme,h.F5[i[h._9.layout]]);else if(P&&x===h.HX.custom&&M&&!M.has_image){var u,p;(0,o.zJ)(v.qP4,"Current BackgroundImageType is custom and has image flag is false.",`Current background image type (pref): ${i[h._9.currentBackgroundImageType]}, gallery settings: ${JSON.stringify(P)}`,M,e.ntpTheme,h.F5[i[h._9.layout]]);const t=(0,o.tv)(P),r=t>=0?h.HX.imageAndVideo:h.HX.bing;n.currentBackgroundImageType=r,P.changeBackgroundDaily||"BrowserLocal"!==(null===(u=P)||void 0===u||null===(p=u.backgroundSelectionMetadata)||void 0===p?void 0:p.provider)||(0,o.zb)(P,t)}if(P&&x===h.HX.theme&&!e.ntpTheme)(0,o.zJ)(v.BFw,"Current Background Image type is theme and theme information is missing",`Current background image type (pref): ${i[h._9.currentBackgroundImageType]}, gallery settings: ${JSON.stringify(P)}`,M,e.ntpTheme,h.F5[i[h._9.layout]]);else if(P&&x===h.HX.theme&&e.ntpTheme&&e.ntpTheme.usingDefaultTheme){var g,m;(0,o.zJ)(v.Ibk,"Current Background Image type is theme and theme is default. Switching to background in rotation in cache.",`Current background image type (pref): ${i[h._9.currentBackgroundImageType]}, gallery settings: ${JSON.stringify(P)}`,M,e.ntpTheme,h.F5[i[h._9.layout]]);const t=(0,o.tv)(P),r=t>=0?h.HX.imageAndVideo:h.HX.bing;n.currentBackgroundImageType=r,"Theme"===(null===(g=P)||void 0===g||null===(m=g.backgroundSelectionMetadata)||void 0===m?void 0:m.provider)&&(0,o.zb)(P,t)}n.currentBackgroundImageType===h.HX.theme&&(0,o.oB)(n)?(0,o.$W)(v.KY$,"RGB Theme background detected",`Current theme info: ${JSON.stringify(e.ntpTheme)}`):n.currentBackgroundImageType===h.HX.theme&&(0,o.BA)(n)&&(0,o.$W)(v.qkz,"Bundled Theme background detected",`Current theme info: ${JSON.stringify(e.ntpTheme)}`);const L=this.QSPTopSitesOverride??h._U[i[h._9.quickLinksDisplaySetting]];if(n.ntpPrefOptionApiAvailability=!!L,n.currentLayout!==h.nP.custom)n.quickLinksEnabled=L?L!==h.Z3.off:h.Wi[n.currentLayout].quick_links,n.selectedQuickLinksDisplaySetting=L,n.currentBackgroundImageType=h.Wi[n.currentLayout].current_background_image_type,n.selectedFeedDisplaySetting=h.Wi[n.currentLayout].feeds_position,n.hideDefaultTopSites=h.Wi[n.currentLayout].hide_promoted_links;else{n.quickLinksEnabled=L?L!==h.Z3.off:i[h._9.quickLinks],n.selectedQuickLinksDisplaySetting=L,n.greetingEnabled=i[h._9.greeting];const e=i[h._9.feeds];n.selectedFeedDisplaySetting=e,n.hideDefaultTopSites=i[h._9.hideDefaultTopSites]}let R=!1;const F=this.getGroupPolicy(s,h._9.feeds);if((F.isEnabled&&"ENFORCED"===F.enforcement||this.isContentFeedManagedByAdminPortal())&&(n.isContentFeedManagedByPolicy=!0,R=!0,n.currentLayout!==h.nP.custom&&(n.selectedFeedDisplaySetting=i[h._9.feeds])),h._9.quickLinksDisplaySetting in i){const e=this.getGroupPolicy(s,h._9.quickLinksDisplaySetting);e.isEnabled&&"ENFORCED"===e.enforcement&&(n.isQuickLinksManagedByPolicy=!0,R=!0,n.currentLayout!==h.nP.custom&&(n.selectedQuickLinksDisplaySetting=L,n.quickLinksEnabled=L!==h.Z3.off))}if(h._9.defaultBrowserSettingEnabled in i){const e=this.getGroupPolicy(s,h._9.defaultBrowserSettingEnabled);n.defaultBrowserSettingPolicyEnforced="ENFORCED"===e.enforcement}if(h._9.backgroundImageTypePolicy in i){const e=this.getGroupPolicy(s,h._9.backgroundImageTypePolicy);n.backgroundImageTypePolicy=i[h._9.backgroundImageTypePolicy],"ENFORCED"!=e.enforcement&&(n.backgroundImageTypePolicy=h.gZ.allowAll),n.backgroundImageTypePolicy===h.gZ.disableAll&&n.currentBackgroundImageType!==h.HX.off?(n.currentBackgroundImageType=h.HX.off,a=!0):n.backgroundImageTypePolicy!==h.gZ.disableImageOfTheDay||n.currentBackgroundImageType!==h.HX.imageAndVideo&&n.currentBackgroundImageType!==h.HX.bing?n.backgroundImageTypePolicy===h.gZ.disableCustomImage&&n.currentBackgroundImageType===h.HX.custom&&(n.currentBackgroundImageType=h.HX.imageAndVideo,a=!0):(n.currentBackgroundImageType=h.HX.off,a=!0),R=R||n.backgroundImageTypePolicy!==h.gZ.allowAll}if(R&&n.currentLayout!==h.nP.custom&&(n.currentLayout=h.nP.custom,this.overrideLayoutPreferenceForPolicy()),n.imageOfTheDayEnabled=n.currentBackgroundImageType!==h.HX.off,n.currentBackgroundImageType===h.HX.theme&&e.ntpTheme){const t=e.ntpTheme;t.imageUrl||t.backgroundColorRgba||(n.imageOfTheDayEnabled=!1),!t.usingDefaultTheme&&t.isNtpBackgroundDark?n.isNtpThemeBackgroundDark=!0:n.isNtpThemeBackgroundDark=!1}if(a&&this.migrateBackgroundPreference(n.currentBackgroundImageType),n.openSettingsDialogFlyout=i[h._9.showSettings],n.market=T.Al.Locale,n.isAppLauncherEnabledByPolicy=i[h._9.showAppLauncher],n.isCodexBingUpsellEnabledByPolicy=i[h._9.codexBingUpsellEnabled],n.isCompanyLogoEnabledByPolicy=void 0===i[h._9.companyLogoEnabled]||i[h._9.companyLogoEnabled],h._9.verticalTabsCollapsed in i&&(n.verticalTabsCollapsed=i[h._9.verticalTabsCollapsed]),h._9.verticalTabsOpened in i&&(n.verticalTabsOpened=i[h._9.verticalTabsOpened]),h._9.hideDefaultTopSites in i){n.hideDefaultTopSites=i[h._9.hideDefaultTopSites];const e=this.getGroupPolicy(s,h._9.hideDefaultTopSites);e.isEnabled&&"ENFORCED"===e.enforcement&&(n.hideDefaultTopSitesManagedByPolicy=!0)}if("onscroll"===n.selectedFeedDisplaySetting&&(n.selectedFeedDisplaySetting="headingsonly",setTimeout((()=>{const e=window.chrome&&window.chrome.ntpSettingsPrivate;e&&e.setPref(h._9.feeds,n.selectedFeedDisplaySetting,(()=>{}))}))),this.config.dailyDiscoveryInSearchBox){const e=i[h._9.userChoices],t=null==e?void 0:e.find((e=>e.setting===E.nc.daily_discovery_in_search_box));n.dailyDiscoveryInSearchBoxEnabled=!t||t.value}if(this.config.enableMarqueeAd){const e=i[h._9.userChoices];if(e&&e.length){const t=e.find((e=>e.setting===E.nc.enable_sponsored_content));n.sponsoredContentEnabled=!t||t.value}}O.M0.addOrUpdateTmplProperty("wgEnabled",n.greetingEnabled?"1":"0"),this.config.defaultGreetingEnabled&&(n.greetingEnabled=!0);b.c.getQueryParameterByName("isFREModalBackground",(0,q.zp)())&&(n.selectedFeedDisplaySetting="headingsonly",O.M0.addOrUpdateTmplString("FREModalBackgroundLoaded:1"));let B=b.c.getQueryParameterByName("feedDisplay",(0,q.zp)());if(B=null!==(d=(0,q.zp)())&&void 0!==d&&d.includes("ocid=widgetonlockscreen")?"always":B,B&&["always","peek","headingsonly","onscroll","off"].indexOf(B)>-1&&(n.selectedFeedDisplaySetting=B,O.M0.addOrUpdateTmplString("feedDisplay:1")),"headingsonly"===n.selectedFeedDisplaySetting){const e=i[h._9.userChoices],t=null==e?void 0:e.find((e=>e.setting===E.nc.dismiss_scroll_down_button));t&&(n.isScrollDownButtonDismissed=!!t.value)}if((0,D.N)()&&!window.isSSREnabled&&this.config&&this.config.promotedHidableSearchBox){const e=i[h._9.userChoices];if("always"===n.selectedFeedDisplaySetting&&"off"!==n.selectedQuickLinksDisplaySetting&&"top"!==n.selectedQuickLinksDisplaySetting&&!(0,J.r4)(e,this.config.enableTopsitesTopWithWPO)){var f;const t=ee(e,!(null!==(f=this.config)&&void 0!==f&&f.scrollToHideSearchBox));this.config&&(this.config.hidableSearchBox||this.config.scrollToHideSearchBox)&&(n.hideSearchBox=t)}}const N=window.location&&(null===(l=window.location.search)||void 0===l?void 0:l.includes("mock-ntp-header=1"));(0,D.N)()||N||(e=>{const t=T.Al.EdgeNTPHeader;t&&(Z(h._9.selectedFeedPivot,t.selectedFeedPivot,e.selectedFeedPivot||Q),Z(h._9.quickLinksDisplaySetting,h._U[t.quickLinkOption],e.selectedQuickLinksDisplaySetting),Z(h._9.backgroundImageTypePolicy,h.MT[t.backgroundImageTypePolicy],h.MT[e.backgroundImageTypePolicy]),(0,q.zp)().includes("ocid=widgetonlockscreen")||(Z(h._9.layout,h.F5[t.layoutMode],e.currentLayout),Z(h._9.feeds,t.newsFeedDisplay,e.selectedFeedDisplaySetting)))})(n),t(n),(0,D.N)()||O.M0.addOrUpdateTmplProperty("ssrChromiumSettingLayout",n.selectedFeedDisplaySetting)}else y.k.logError("Failed to get saved layout preferences."),t(e)}))}else t(e)}))}registerOnConfigDataChangedCallback(){this.settingsAPI&&this.settingsAPI.onConfigDataChanged&&this.settingsAPI.onConfigDataChanged.addListener((e=>{if(e){const t=e[r.lA.inPageSearchBoxType];t!==r.HT.redirect&&t!==r.HT.bing||a.V.updateConfigDataChanged.getActionSender(this).send(t)}}))}registerOnPrefsChangeCallback(){this.settingsAPI&&this.settingsAPI.onPrefsChanged&&this.settingsAPI.onPrefsChanged.addListener((e=>{if(!this.didLayoutModeChangeInCurrentTab){const e=(0,l.$o)().getObject(this.layoutChangeInitiatorKey);if(e===r.WT.wpoPrerenderTab||e===r.WT.ntpVisibleTab)return}const t=e[0];if(window.isSSREnabled&&t.key===h._9.userChoices){const e=t.value;if(e.sort(((e,t)=>t.timestamp-e.timestamp)),e[0].setting===E.nc.tscollapsed&&"wpo"===e[0].source)return}this.updateUIForSettingsChange(t.key,t.value,e)}))}async updateUIForSettingsChange(e,t,n){const i=await this.getPageSettingsStateAsync(),o={...i};if(e===h._9.backgroundImageTypePolicy&&(0,S.Z)(),e===h._9.feeds){const t=this.getGroupPolicy(n,e);t.isEnabled&&"ENFORCED"===t.enforcement||this.isContentFeedManagedByAdminPortal()?o.isContentFeedManagedByPolicy=!0:o.isContentFeedManagedByPolicy=!1}if(e===h._9.layout){const e=h.F5[t];if(o.currentLayout=e,t!==h.Uq.custom&&(o.quickLinksEnabled=h.Wi[e].quick_links,o.hideDefaultTopSites=!!o.hideDefaultTopSitesManagedByPolicy||h.Wi[e].hide_promoted_links,o.currentBackgroundImageType=h.Wi[e].current_background_image_type,o.selectedFeedDisplaySetting=h.Wi[e].feeds_position,o.selectedQuickLinksDisplaySetting=i.selectedQuickLinksDisplaySetting,await this.checkPromoteTopsitesTop(o)&&(o.selectedQuickLinksDisplaySetting=h.Z3.top,a.V.updateWPOTopsitesPromotion.getActionSender(this).send(!0)),o.imageOfTheDayEnabled=o.currentBackgroundImageType!==h.HX.off),"visible"===document.visibilityState&&n)for(const e of this.preferenceChangeCallbacks)e(n,o)}else{switch(e){case h._9.quickLinks:o.quickLinksEnabled=t;break;case h._9.hideDefaultTopSites:{const e=this.getGroupPolicy(n,h._9.hideDefaultTopSites),i=e.isEnabled&&"ENFORCED"===e.enforcement;o.hideDefaultTopSites=t,o.hideDefaultTopSitesManagedByPolicy=i;break}case h._9.quickLinksDisplaySetting:o.selectedQuickLinksDisplaySetting=h._U[t],o.quickLinksEnabled=h._U[t]!==h.Z3.off;break;case h._9.imageOfTheDay:this.chromiumBackgroundPrefType===r.h0.BOOLEAN&&(o.currentBackgroundImageType=t?h.HX.imageAndVideo:h.HX.off,o.imageOfTheDayEnabled=o.currentBackgroundImageType!==h.HX.off);break;case h._9.currentBackgroundImageType:if(o.currentBackgroundImageType=t,o.imageOfTheDayEnabled=o.currentBackgroundImageType!==h.HX.off,o.isNtpThemeBackgroundDark=void 0,o.currentBackgroundImageType===h.HX.theme&&i.ntpTheme){const e=i.ntpTheme;e.imageUrl||e.backgroundColorRgba||(o.imageOfTheDayEnabled=!1),!e.usingDefaultTheme&&e.isNtpBackgroundDark?o.isNtpThemeBackgroundDark=!0:o.isNtpThemeBackgroundDark=!1}break;case h._9.customBackgroundImageInfo:{const e=t,n={hasImage:e[r.AL.hasImage],resourceUrl:e[r.AL.resourceUrl],timestamp:e[r.AL.timestamp]};o.customBackgroundImageInfo=n;break}case h._9.feeds:o.selectedFeedDisplaySetting=t;break;case h._9.greeting:o.greetingEnabled=t;break;case h._9.showSettings:o.openSettingsDialogFlyout=t;break;case h._9.showAppLauncher:o.isAppLauncherEnabledByPolicy=t}if("visible"===document.visibilityState&&n)for(const e of this.preferenceChangeCallbacks)e(n,o)}if(e===h._9.verticalTabsCollapsed&&(o.verticalTabsCollapsed=t),e===h._9.verticalTabsOpened&&(o.verticalTabsOpened=t),e===h._9.userChoices&&this.config.hidableSearchBox){const e=t.find((e=>"hide_search_box"===e.setting));e&&(o.hideSearchBox=!!e.value)}if(e===h._9.userChoices&&this.config.dailyDiscoveryInSearchBox){const e=t.find((e=>e.setting===E.nc.daily_discovery_in_search_box));e&&(o.dailyDiscoveryInSearchBoxEnabled=!!e.value)}if(e===h._9.userChoices&&this.config.enableMarqueeAd){const e=t.find((e=>e.setting===E.nc.enable_sponsored_content));e&&(o.sponsoredContentEnabled=!!e.value)}if(e===h._9.userChoices){const e=t.find((e=>e.setting===E.nc.dismiss_scroll_down_button));e&&(o.isScrollDownButtonDismissed=!!e.value)}e===h._9.quickLinksDisplaySetting&&(o.selectedQuickLinksDisplaySetting=h._U[t],o.quickLinksEnabled=h._U[t]!==h.Z3.off),e===h._9.companyLogoEnabled&&(o.isCompanyLogoEnabledByPolicy=t),(0,m.Z)(o,i)||g.J.updateLayout.getActionSender(this).send(o)}defineChromiumKeys(e){const t={};let n;for(n of e)t[n.key]=n.value;return t}getGroupPolicy(e,t){const n=e.find((e=>e.key===t)),i={key:n.key,value:n.value,type:n.type};return n&&n.controlledBy&&n.enforcement?(i.isEnabled=!0,i.enforcement=n.enforcement,i.controlledBy=n.controlledBy):i.isEnabled=!1,i}getPromoFormParamList(){return this.config&&this.config.promoFormParamList?this.config.promoFormParamList:null}setContentDisabled(e){e.greetingEnabled=!1,e.selectedFeedDisplaySetting="off",e.currentLayout=h.nP.custom,e.imageOfTheDayEnabled=!1,e.currentBackgroundImageType=h.HX.off}async checkPromoteTopsitesTop(e){if(!this.config.enableTopsitesTopOnlyInformational&&!this.config.enableTopsitesTopAsDefault&&!this.config.enableTopsitesTopWithWPO)return!1;const t=e||this.getCurrentState();if(this.config.enableTopsitesTopWithWPO)return(0,J.VL)(t);if(t.selectedQuickLinksDisplaySetting===h.Z3.top||t.currentLayout===h.nP.custom)return!1;if(this.config.enableTopsitesTopOnlyInformational&&t.currentLayout!==h.nP.informational)return!1;return!!!await x.L.getPreferenceSetting(r.pY)}async saveTopSitesPromotionNurturing(e,t){const n=await A.U.isApiAvailableToUse();if(!this.shouldPromoteTopsitesTop||!n)return;const i={promotedTime:(new Date).getTime(),promotedFrom:e,promotedTo:t};A.U.savePreferenceSetting(E.Xm.topSites,i)}isPromotedTopSitesPreferenceAvailable(){return this.isWindowsIndexerPromotedTopSitesPreferenceAvailable}migrateBackgroundPreference(e){this.settingsAPI.setPref(h._9.imageOfTheDay,e!==h.HX.off,te),this.settingsAPI.setPref(h._9.currentBackgroundImageType,e,te)}overrideLayoutPreferenceForPolicy(){this.settingsAPI.setPref(h._9.layout,h.Uq.custom,te)}wpoPromoteNewLayout(e,t){this.updateLayout(e,t)}wpoPromoteNewFeedDisplaySetting(e,t){this.updateFeeds(e,t,E.st.Wpo)}}var ie=n(99551);class re{reduce(e,t){if(!e)return{...h.L_,contentSource:h.iz.MicrosoftNews,isLoadCompleted:!1,greetingEnabled:!0,openSettingsDialogFlyout:!1,inPageSearchBoxType:null,market:T.Al.Locale};if(!t)return e;let n;return ie.G.handleAction(t,a.V.pageLayoutStateLoaded,(t=>{n={...e,...t,isLoadCompleted:!0}})),ie.G.handleAction(t,g.J.updateLayout,(t=>{n={...e,...t}})),ie.G.handleAction(t,a.V.updateLocalStorage,(t=>{n={...e,sdCardSettings:t}})),ie.G.handleAction(t,a.V.loadLocalStorage,(t=>{n={...e,sdCardSettings:t}})),ie.G.handleAction(t,a.V.updatePrimaryAccountInfo,(t=>{n={...e,primaryAccountInfo:t}})),ie.G.handleAction(t,a.V.updateConfigData,(t=>{n={...e,configData:t}})),ie.G.handleAction(t,a.V.updateConfigDataChanged,(t=>{n={...e,inPageSearchBoxType:t}})),ie.G.handleAction(t,a.V.updateTopSitesQuickLinkEndMarginUsedPadding,(t=>{n={...e,topSitesQuickLinkEndMarginUsedPadding:t}})),ie.G.handleAction(t,a.V.marketUpdated,(t=>{n={...e,market:t}})),ie.G.handleAction(t,a.V.updateNtpTheme,(t=>{n={...e,ntpTheme:t}})),ie.G.handleAction(t,a.V.updateWPOLayoutPromotion,(t=>{n={...e,isLayoutWPOPromoted:t}})),ie.G.handleAction(t,a.V.updateWPOTopsitesPromotion,(t=>{n={...e,isTopsitesWPOPromoted:t}})),ie.G.handleAction(t,a.V.updateWPOLayoutPromotionSource,(t=>{n={...e,promotionSource:t}})),n||e}}var oe=n(59489);const ae={experienceConfigSchema:{}}},79978:function(e,t,n){"use strict";n.d(t,{CR:function(){return i},Mx:function(){return r},_Y:function(){return o}});const i=8,r=2*i,o="coachmarks"},2587:function(e,t,n){"use strict";n.d(t,{Er:function(){return u},Jt:function(){return s},OD:function(){return c},RC:function(){return i},dm:function(){return o},gz:function(){return a},no:function(){return l},p4:function(){return p},pY:function(){return r}});var i,r,o,a,s,c,d=n(79978);function l(e){switch(e){case o.Mini:return 228;case o.Small:return 256;case o.Medium:return 288;case o.Large:return 312;default:return 288}}function u(e,t=!0){const n=`0,0 ${d.CR},${d.CR} ${d.Mx},0`,r=`0,${d.CR} ${d.CR},0 ${d.Mx},${d.CR}`,o=`0,0 ${d.CR},${d.CR} 0,${d.Mx}`,a=`${d.CR},0 0,${d.CR} ${d.CR},${d.Mx}`;switch(e){case i.Above:return n;case i.Below:return r;case i.Left:return t?a:o;case i.Right:return t?o:a;default:return""}}function p(e,t=!0){const n="drop-shadow(2.2px 1px 1px rgba(0, 0, 0, 15%))",r="drop-shadow(-1.5px 2px 1px rgba(0, 0, 0, 15%))";switch(e){case i.Above:return"drop-shadow(-1px 4px 1px rgba(0, 0, 0, 15%))";case i.Below:return"drop-shadow(0px -1px 1px rgba(0, 0, 0, 15%))";case i.Left:return t?r:n;case i.Right:return t?n:r;default:return""}}!function(e){e.Above="Above",e.Below="Below",e.Left="Left",e.Right="Right"}(i||(i={})),function(e){e.TopStart="TopStart",e.TopEnd="TopEnd",e.BottomStart="BottomStart",e.BottomEnd="BottomEnd"}(r||(r={})),function(e){e.Mini="Mini",e.Small="Small",e.Medium="Medium",e.Large="Large"}(o||(o={})),function(e){e.AccountLinkPromoENTP="accountLinkPromoENTP",e.BinaryReactionPromotion="binaryReactionPromotion",e.BinaryReactionControl="binaryReactionControl",e.BingIntlUpsellPromotion="bingIntlUpsellPromotion",e.ChinaLanguageMismatch="chinaLanguageMismatch",e.bingChatDallePromotion="bingChatDallePromotion",e.FollowingFeedPromotion="followingFeedPromotion",e.PersonalizeManageText="personalizeManageText",e.PersonalizeManageImage="personalizeManageImage",e.GamingFeedPromotion="gamingFeedPromotion",e.LayoutPromotion="layoutPromotion",e.LocationAccuracyRevIP="locationAccuracyRevIP",e.MarketLanguage="marketLanguage",e.multiLocationsCarousel="multiLocationsCarousel",e.multiLocationsCarouselV2="multiLocationsCarouselV2",e.NotificationBellPromotion="notificationBellPromotion",e.NotificationBellPromotionWinHP="notificationBellPromotionWinHP",e.PersonalizeFeedControl="personalizeFeedControl",e.PersonalizeFeedPromotion="personalizeFeedPromotion",e.recommendedSitesPromotionNewLine="recommendedSitesPromotionNewLine",e.recommendedSitesPromotionOff="recommendedSitesPromotionOff",e.RecommendedSitesSelection="recommendedSitesSelection",e.TopQuestionsPromotion="topQuestionsPromotion",e.TopSitesPromotion="topSitesPromotion",e.informationalSwitchOffer="informationalSwitchOffer",e.informationalSwitchCompletion="informationalSwitchCompletion",e.informationalKeepCompletion="informationalKeepCompletion",e.OfficeCoachmarkO365Tab="o365tab2_psl",e.OfficeCoachmarkO365Layout="OfficeCoachmarkO365Layout",e.WeatherPromotion="weatherPromotion",e.SplitScreen="splitScreen",e.OfficeCoachmarkWorkFeedTab="OfficeCoachmarkWorkFeedTab",e.EdgeFeedBelowTheFoldCoachmark="EdgeFeedBelowTheFoldCoachmark",e.stickyPeekOnLoadAutoScroll="OnLoadAutoScrollPrompt",e.stickyPeekOnLoad="OptInStickPromptLoad",e.SignInUpsellPromotionSignIn="signInUpsellPromotionSignIn",e.SignInUpsellPromotionToJoin="signInUpsellPromotionToJoin",e.SignInUpsellPromotionJoined="SignInUpsellPromotionJoined",e.SignInUpsellPromotionClaimed="signInUpsellPromotionClaimed",e.BackgroundImageEditPromotion="backgroundImageEditPromotion",e.BackgroundImagePromotion="backgroundImagePromotion",e.BackgroundImageVideoPromotion="backgroundImageVideoPromotion",e.PinProng1Flyout="pinProng1Flyout",e.NewYearThemeStore="newYearThemeStore",e.NewLayoutReviewCoachmark="newLayoutReview",e.LockScreenLocationCoachmark="lockScreenLocationCoachmark",e.LockScreenPersonalizeCoachmark="lockScreenPersonalize",e.OptInFeedLayout="optInFeedLayout",e.prong1RotationSettingsButton="prong1RotationSettingsButton",e.Prong1SettingsButtonDialog="prong1SettingsButtonDialog",e.prong1ShuffleButton="prong1ShuffleButton",e.RefreshAnimationCoarchmarkKey="prong1RefreshButton",e.prong2ProfileMigration="prong2ProfileMigration",e.prong2PersonalizedButton="prong2PersonalizedButton",e.prong2PlayPivotButton="prong2PlayPivotButton",e.NurturingPlacementManagerTestKey="nurturingPlacementManagerTestKey",e.actionTrayComment="actionTrayComment",e.actionTrayCommentControl="actionTrayCommentControl",e.actionTrayCommentFirst="actionTrayCommentFirst",e.actionTrayCommentFirstControl="actionTrayCommentFirstControl",e.consumptionTopicTag="consumptionTopicTag"}(a||(a={})),function(e){e.Adjacent="Adjacent",e.Center="Center",e.Opposite="Opposite"}(s||(s={})),function(e){e.Outside="Outside",e.Target="Target",e.OutsideAndTarget="OutsideAndTarget"}(c||(c={}))},57042:function(e,t,n){"use strict";var i;n.d(t,{F:function(){return i}}),function(e){e.Adult="adult",e.Enterprise="enterprise",e.Kids="kids"}(i||(i={}))},14269:function(e,t,n){"use strict";var i;n.d(t,{Q:function(){return i}}),function(e){e.Android="android",e.Ios="ios",e.Linux="linux",e.Macos="macos",e.Windows="windows",e.Xbox="xbox"}(i||(i={}))},49595:function(e,t,n){"use strict";n.d(t,{GB:function(){return d},Km:function(){return l},Oq:function(){return f},Sp:function(){return m},Wc:function(){return p},_d:function(){return u},cm:function(){return g},e_:function(){return y},kJ:function(){return c},oH:function(){return v},r7:function(){return a},yG:function(){return s},yL:function(){return h}});var i=n(63927);const r=i.z.Alert,o={build:""};function a(e){Object.assign(o,e)}const s={id:22010,severity:r,pb:o},c={id:22011,severity:r,pb:o},d={id:22012,severity:r,pb:o},l={id:22014,severity:i.z.Critical,pb:o},u=(i.z.NoAlert,{id:22021,severity:r,pb:o}),p=(i.z.NoAlert,i.z.NoAlert,i.z.NoAlert,i.z.NoAlert,i.z.NoAlert,{id:22027,severity:i.z.Critical,pb:o}),h=(i.z.Critical,i.z.Critical,{id:22031,severity:r,pb:o}),g={id:22032,severity:r,pb:o},m={id:22033,severity:r,pb:o},f={id:22034,severity:r,pb:o},v={id:22050,severity:r,pb:o},y={id:22051,severity:i.z.NoAlert,pb:o};i.z.NoAlert,i.z.NoAlert,i.z.HighImpact},60826:function(e,t,n){"use strict";n.d(t,{id:function(){return i},ks:function(){return o},pA:function(){return r}});const i="MSCC",r="MUID",o="eupubconsent-v2"},78790:function(e,t,n){"use strict";n.d(t,{e:function(){return r},n:function(){return i}});const i="consent-banner-container",r="onetrust-sdk"},76379:function(e,t,n){"use strict";n.d(t,{C:function(){return i},H:function(){return r}});const i="consent.onetrust",r="widgetHost.cookieConsent"},28467:function(e,t,n){"use strict";var i;n.d(t,{i:function(){return i}}),function(e){e.MSCCBanner="mscc",e.OneTrustBanner="onetrust",e.WidgetHost="widgethost",e.None="none"}(i||(i={}))},68054:function(e,t,n){"use strict";var i;n.d(t,{_:function(){return i}}),function(e){e[e.Unknown=0]="Unknown",e[e.Required=1]="Required",e[e.NotRequired=2]="NotRequired"}(i||(i={}))},15665:function(e,t,n){"use strict";var i;n.d(t,{o:function(){return i}}),function(e){e.Essential="ES",e.Advertising="AD",e.SocialMedia="SM",e.ThirdPartyAnalytics="AL"}(i||(i={}))},60020:function(e,t,n){"use strict";var i;n.d(t,{Q:function(){return i}}),function(e){e.C0001="C0001",e.C0002="C0002",e.C0003="C0003",e.C0004="C0004"}(i||(i={}))},13583:function(e,t,n){"use strict";var i;n.d(t,{f:function(){return i}}),function(e){e.Lax="lax",e.Strict="strict",e.None="none"}(i||(i={}))},34631:function(e,t,n){"use strict";n.d(t,{hI:function(){return p},iF:function(){return u},o4:function(){return d},rv:function(){return l}});var i=n(78790),r=n(60826),o=n(7476),a=n(23549),s=n(31558),c=n(95815);function d(){return(0,s.N)()&&null!=document.getElementById(i.n)}function l(){return d()&&null===(0,c.ej)(r.id)}function u(){return(0,s.N)()&&null!=document.getElementById(i.e)}function p(){if(!(0,s.N)())return!!window.__tcfapi&&null===(0,c.ej)(r.ks);let e;try{e=JSON.parse(document.head.getAttribute("data-client-settings"))}catch(e){a.M0.sendAppErrorEvent(o.GQD)}const{locale:t={},geo_country:n,geo_subdivision:i}=e||{},{language:d="",market:l=""}=t;return("ca"!==l.toLowerCase()||"fr"!==d.toLowerCase()&&"en"!==d.toLowerCase()||"CA"!==n||"Quebec"===i)&&(u()&&null===(0,c.ej)(r.ks))}},43438:function(e,t,n){"use strict";n.d(t,{A:function(){return a},U:function(){return i}});var i,r=n(68054),o=n(59967);!function(e){e[e.Initialized=1]="Initialized",e[e.CookieConsentProvider=2]="CookieConsentProvider",e[e.CookieConsentStatus=3]="CookieConsentStatus",e[e.ActiveCookieCategories=4]="ActiveCookieCategories"}(i||(i={}));const a=new o.v("CookieManagementStateKey");a.set(i.Initialized,!1),a.set(i.CookieConsentStatus,r._.Unknown)},35607:function(e,t,n){"use strict";n.d(t,{Q:function(){return p}});var i=n(28467),r=n(68054),o=n(76379),a=n(15665),s=n(60020);const c={[s.Q.C0001]:a.o.Essential,[s.Q.C0002]:a.o.Advertising,[s.Q.C0003]:a.o.SocialMedia,[s.Q.C0004]:a.o.ThirdPartyAnalytics};var d=n(43438),l=n(34631),u=n(31558);function p(e){if(d.A.get(d.U.Initialized))return;let t=i.i.None,n=r._.NotRequired;(0,u.N)()&&(e&&e.required?(t=i.i.WidgetHost,n=e.categories?r._.NotRequired:r._.Required,h(e.categories),window.addEventListener(o.H,(e=>h(e.detail)))):(0,l.o4)()?(t=i.i.MSCCBanner,n=(0,l.rv)()?r._.Required:r._.NotRequired,n===r._.Required?d.A.set(d.U.ActiveCookieCategories,[a.o.Essential]):d.A.set(d.U.ActiveCookieCategories,[...Object.values(a.o)])):(0,l.iF)()&&(t=i.i.OneTrustBanner,n=(0,l.hI)()?r._.Required:r._.NotRequired,g(),window.addEventListener(o.C,g))),d.A.set(d.U.CookieConsentStatus,n),d.A.set(d.U.CookieConsentProvider,t),d.A.set(d.U.Initialized,!0)}function h(e){const t=e&&Object.keys(e).filter((t=>Object.values(a.o).includes(t)&&1===e[t]))||new Array;t.includes(a.o.Essential)||t.unshift(a.o.Essential),d.A.set(d.U.ActiveCookieCategories,t)}function g(){const e=window.OnetrustActiveGroups,t=e&&e.trim().split(",").filter((e=>{const t=e&&e.trim();return Object.values(s.Q).includes(t)})).map((e=>{const t=e.trim();return c[t]}))||new Array;t.includes(a.o.Essential)||t.unshift(a.o.Essential),d.A.set(d.U.ActiveCookieCategories,t)}},95815:function(e,t,n){"use strict";n.d(t,{ej:function(){return v},jG:function(){return y},aW:function(){return S},sq:function(){return C}});var i=n(60826),r=n(28467),o=n(68054),a=n(15665);const s={[a.o.Essential]:["AL","ALS","AL_ANON","AL_APP_ANNON","AL_STATE","ANON","ANONCKNM","APP_ANON","APP_TWID","APP_WID","BFB","BFBUSR","DefaultLocation","Edgecac","FreWv","GalleryMode","MC1","MS0","MSCC","MSFPC","MSPRequ","MUID","MUIDB","MicrosoftApplicationsTelemetryDeviceId","OSAT","OSATE","OptanonAlertBoxClosed","OptanonConsent","OvrlyTrf","PreferencesMsn","RC","RUM","RecentStocks","SRCHD","SRCHHPGUSR","SRCHUID","SRCHUSR","Sample","TOptOut","TWID","UMH2E","WID","WLMMAC","_EDGE_S","_EDGE_V","_SS","_U","_cb","_cb_ls","_cb_svref","aace","ace","ahs-dismissed","ahs-installed","ahs-showings","ai_session","aqp","at-bing","bcookie","bingimage","bwssoc","cac","cb","cbypass","cfrecnt","cg_new_visit_timestamp","cgusc","child","cmdisp","cmwr","currentaccount","ddlcur","df","ecasession","elt","eub","eupubconsent","eupubconsent-v2","gfrecnt","hidebn","i18next","ipt","ipv6","isdomainmigrated","lt","marketPref","mktreset","mniotd","mnmarket","msaOptout","msaoptout","nactk","no_read_more","ntps","numac","orfc_feeds","pbmi","pglt-edgeChromium-dhp","pglt-edgeChromium-ntp","pglt-microsoftNews-msnews","pglt-microsoftNews-startpage","pop","refresh-reason","sbc-dismissed","sbc-installed","sbc-showings","smd","sptmarket","theme","timeZoneOffsetInMins","uaid","videoCookiesLastCategory","videoerrorcount","vjsusrpref","w10rp","w10rpls"],[a.o.Advertising]:["BizoID","adslrid","dub_downlevel","eAPID","ecadprovider","ecisession","ecmsession","ecsession"],[a.o.SocialMedia]:["promptDisplayCount"],[a.o.ThirdPartyAnalytics]:[]};var c=n(13583),d=n(7476),l=n(43438),u=n(78672),p=n(31558);const h=["at-bing","elt","eupubconsent-v2","lt","AL","ALS","MSNRPSSecAuth","OSAT"],g=[";",","," "];var m=n(23549),f=n(37413);function v(e){const t=(0,u.G8)();return(0,f.F)(t,e)}function y(){return v(i.pA)}function S(){return v(i.ks)}function C(e,t,n,i,u,f,v){try{if(!l.A.get(l.U.Initialized))return(0,p.N)()&&m.M0.sendAppErrorEvent(d.lIV),!1;if(void 0===n||n>0){if(!function(e){if(!(0,p.N)())return!1;const t=l.A.get(l.U.CookieConsentStatus),n=l.A.get(l.U.CookieConsentProvider),i=l.A.get(l.U.ActiveCookieCategories);let c=!1;switch(n){case r.i.MSCCBanner:case r.i.OneTrustBanner:case r.i.WidgetHost:return function(e,t){for(const n of t){if(s[n].includes(e))return!0}let n=!1;const i=Object.keys(s).filter((e=>!t.includes(a.o[e])));for(const t of i){if(s[t].includes(e)){n=!0;break}}n||m.M0.sendAppErrorEvent({...d.sGX,message:`Attempting to write a cookie: "${e}" not present in the cookie category mapping.`});return!1}(e,i);default:c=t===o._.NotRequired,c||m.M0.sendAppErrorEvent({...d.fU5,message:`Consent status should be '2' (NotRequired), but is set to '${t}'`})}return c}(e))return!1;if(null==t)return m.M0.sendAppErrorEvent({...d.AvP,message:`Cookie value is being set to either 'undefined' or 'null'. cookie name: "${e}", cookie value: "${t}"`}),!1;const i=typeof t;"string"!==i&&(t=JSON.stringify(t),m.M0.sendAppErrorEvent({...d.bAs,message:`Cookie value is not of string type. observed type: "${i}". cookie name: "${e}"`}));for(const n of g)if(e.includes(n)||t.includes(n))return m.M0.sendAppErrorEvent({...d.AvP,message:`Cookie name and/or value contains invalid character: '${n}'. cookie name: "${e}"`}),!1;n>365&&m.M0.sendAppErrorEvent({...d.Vwf,message:`Cookie expiration time: ${n} days is greater than suggested max duration of 365 days (1 year). cookie name: "${e}"`});const c=e.length+(t&&t.length||0);c>1e3&&!h.includes(e)&&m.M0.sendAppErrorEvent({...d.HFn,message:`Cookie size: "${c} Bytes" is too big (> 1000 Bytes). cookie name: "${e}"`})}return function(e,t,n,i,r,o,a){let s;const d=[e,"=",t];if(n<0)s="Fri, 31 Dec 1999 23:59:59 GMT";else if(n){const e=new Date;e.setTime(e.getTime()+864e5*n),s=e.toUTCString()}s&&d.push(";expires=",s);i&&d.push(";domain=",i);r&&d.push(";path=",r);o&&d.push(";secure");a&&a!==c.f.Lax&&(d.push(";samesite=",a.toString()),a!==c.f.None||o||d.push(";secure"));document&&(document.cookie=d.join(""))}(e,t,n,i,u,f,v),!0}catch(t){return m.M0.sendAppErrorEvent({...d.sX$,message:`trySetCookie() failed with error: "${t.message}". cookie name: "${e}"`}),!1}}},32671:function(e,t,n){"use strict";var i;n.d(t,{C:function(){return i}}),function(e){e[e.Exceptional=0]="Exceptional",e[e.Fallback=1]="Fallback"}(i||(i={}))},63927:function(e,t,n){"use strict";var i;n.d(t,{z:function(){return i}}),function(e){e[e.Alert=0]="Alert",e[e.NoAlert=1]="NoAlert",e[e.HighImpact=2]="HighImpact",e[e.Critical=3]="Critical"}(i||(i={}))},75592:function(e,t,n){"use strict";var i;n.d(t,{w:function(){return i}}),function(e){e[e.Production=0]="Production",e[e.Local=1]="Local"}(i||(i={}))},56687:function(e,t,n){"use strict";function i(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{return""}}(e)}n.d(t,{n:function(){return i}})},37413:function(e,t,n){"use strict";function i(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}n.d(t,{F:function(){return i}})},76187:function(e,t,n){"use strict";function i(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}n.d(t,{p:function(){return i}})},88975:function(e,t,n){"use strict";function i(e,t,n=!1){return!e||r(e,t)&&o(e,t)&&a(e,t)&&s(e,t)&&c(e,t)&&l(e,t,n)&&u(e,t)&&p(e,t)&&h(e,t)&&g(e,t)}function r(e,t){return!e.audienceMode||t.audienceMode===e.audienceMode}function o(e,t){if(!e.browser)return!0;if(!t.browser)return!1;const{browserType:n,version:i}=t.browser,{browserType:r,version:o}=e.browser;if(r&&r!==n)return!1;if(!o)return!0;if("string"==typeof o)return i===o;if("object"==typeof o){const e=parseInt(i);let t;for(t in o){const n=o[t];if(null!=n)switch(t){case"equals":if(e!==n)return!1;break;case"greaterThan":if(!(e>n))return!1;break;case"lessThan":if(!(e<n))return!1;break;case"notEquals":if(e===n)return!1;break;case"oneOf":if(-1===n.indexOf(e))return!1;break;default:return!1}}return!0}return!1}function a(e,t){return!e.deviceFormFactor||t.deviceFormFactor===e.deviceFormFactor}function s(e,t){return!e.domain||t.domain===e.domain}function c(e,t){return t.pageExperiments=t.pageExperiments||[],"string"!=typeof e.experimentId||0===Object.keys(e.experimentId).length||t.pageExperiments.indexOf(e.experimentId)>=0}function d(e,t){return 0===(e||"").localeCompare(t||"",void 0,{sensitivity:"accent"})}function l(e,t,n){const i=e.locale;if(!i)return!0;let r;return t.locale&&(r=n?t.locale.display:t.locale.content),!!r&&!(i.language&&!d(i.language,r.language)||i.market&&!d(i.market,r.market)||i.script&&!d(i.script,r.script))}function u(e,t){return function(e,t){if(!e)return!0;if(!t)return!1;if("string"==typeof e&&d(e,t))return!0;if("object"!=typeof e)return!1;const n=t.toLowerCase();if(e.startsWith&&!n.startsWith(e.startsWith.toLowerCase()))return!1;if(e.endsWith&&!n.endsWith(e.endsWith.toLowerCase()))return!1;if(e.equals&&!d(e.equals,t))return!1;if(e.notEquals&&d(e.notEquals,t))return!1;if(e.contains&&!n.includes(e.contains.toLowerCase()))return!1;if(e.oneOf&&-1===e.oneOf.indexOf(t))return!1;return!0}(e.ocid,t.ocid)}function p(e,t){return!e.os||t.os===e.os}function h(e,t){const n=e.pageType;if(!n)return!0;const i=t.pageType;if(!i)return!1;if("string"==typeof n)return n===i;if(n.exact&&n.exact.toUpperCase()===i.toUpperCase())return!0;if(n.segments){const e=n.segments,t=i.split("::");if(t&&t.length>0){for(const n in e){const i=parseInt(n),r=e[n];if(!r||isNaN(i)||"string"!=typeof r||i>=t.length||r.toUpperCase()!==t[i].toUpperCase())return!1}return!0}}return!1}function g(e,t){return!e.platform||t.platform===e.platform}n.d(t,{Ev:function(){return a},J4:function(){return i},K3:function(){return u},K4:function(){return o},Sh:function(){return d},Uc:function(){return r},W9:function(){return c},fb:function(){return l},hI:function(){return s},jF:function(){return g},oM:function(){return h},zu:function(){return p}})},34832:function(e,t,n){"use strict";function i(e){try{if(e)return JSON.parse(e)}catch(e){}return null}n.d(t,{d:function(){return i}})},66701:function(e,t,n){"use strict";var i;n.d(t,{n:function(){return i}}),function(e){const t={};e.loadExperience=async e=>{const n=t[e];if(!n)throw new Error(`Attempted to load unknown dynamic bundle "${e}". Make sure it's a registered dynamic experience bundle.`);return n()},e.registerExperience=(e,n)=>{t[e]=n},e.hasExperienceRegistered=e=>!!t[e]}(i||(i={}))},77036:function(e,t,n){"use strict";n.d(t,{U:function(){return Ae}});var i=n(42933),r=n(76733),o=n(7476),a=n(88826),s=n(21789),c=n(99035),d=n(3104),l=n(71778),u=n(9683),p=n(92100),h=n(29597),g=n(22140),m=n(54297),f=n(55524),v=n(291),y=n(78672),S=n(31558),C=n(30291),w=n(79022),b=n(13578),T=n(92170),k=n(7653),P=n(70956);class I extends Error{constructor(e,t){super(e),this.isNetworkFailure=t}}var A=n(23549);const E="-start",x="-end",M="CrsConfig",L="AkCrsConfig",D="FDCrsConfig",R={},F={};let O;function B(e){if(e.endsWith(E)){e=e.slice(0,e.length-6);const t={endMeasure:O&&O.startMeasure(e).endMeasure,startTime:performance.now()};R[e]=t}else if(e.endsWith(x)){if(e=e.slice(0,e.length-4),R[e]){const{endMeasure:t,startTime:n}=R[e],i=Math.round(performance.now()-n);return F[e]=i,t&&t(),{name:e,timeTaken:i}}}else;}var N=n(36941),$=n(48587),U=n(75592);const _="feature-manifests",H="loc-manifests",W="feature-configs",q="loc-configs",V="default";const G=new class{constructor(){this._mocksEnabled=!1,this._shouldInitializeMockMgrConfig=!1,this._mockConfigDictionary={},this._mocksEnabled=this.areMocksEnabled(),this._shouldInitializeMockMgrConfig&&(this._mockConfigDictionary["MockManager/default"]="MockManager/default")}get mockConfigDictionary(){return this._mockConfigDictionary}get mocksEnabled(){return this._mocksEnabled}initialize(e){if(!e)return void this.addMockQspToDictionary();const t=[];if(new URLSearchParams((0,y.zp)()).getAll("mock").forEach((e=>{e.trim().split(",").forEach((e=>{t.indexOf(e)<0&&t.push(e)}))})),0===t.length)return;const n=e&&e.scenarios;for(const e in n)if(n[e]&&t.indexOf(e)>-1){n[e].forEach((e=>{const{experienceType:t,instanceSrc:n}=e.source.configLink,{experienceType:i,instanceSrc:r}=e.target.configRef;this._mockConfigDictionary[`${t}/${n}`]=`${i}/${r}`}))}this.addMockQspToDictionary()}areMocksEnabled(){const e=new URLSearchParams((0,y.zp)());return this._shouldInitializeMockMgrConfig=!!e.get("mock"),this._shouldInitializeMockMgrConfig||e.getAll("item").some((e=>/^mock:/.test(e)))}addMockQspToDictionary(){new URLSearchParams((0,y.zp)()).getAll("item").filter((e=>/^mock:/.test(e))).forEach((e=>{const[t,n]=e.split(":"),[i,r]=n.split("|");this._mockConfigDictionary[i]=r}))}},z=/^\d{8}\.\d+$/;let j="";function K(e,t){if(!e)return;const{experienceType:n,instanceSrc:i,sharedNs:r}=e,o=[t,n,i];return r&&o.push(r),o.map((e=>e||"")).join("/").toLowerCase()}function Q(e){if(!e)return null;if(e.match("^shared/")){const[t,n,i,r]=e.split("/");return{experienceType:i,instanceSrc:r,sharedNs:n}}{const[t,n]=e.split("/");return{experienceType:t,instanceSrc:n}}}function Z(e){const t=new Set;if(e&&e.properties)try{J(e.properties,t)}catch(e){}return t}function J(e,t){const n=e.configRef;n&&n.experienceType&&t.add(n);for(const n of Object.values(e))"object"==typeof n&&n&&J(n,t)}function X(e,t=!1){if(!e)return;const n=(t?V:e.instanceSrc)||V;return!e.sharedNs||t?`${e.experienceType}/${n}`:`shared/${e.sharedNs}/${e.experienceType}/${n}`}function Y(e,t){e&&e(t)}function ee(e,t){return function(e){return e===W||e===_}(e)?te(t&&t.feature):te(t&&t.loc)}function te(e){return e===U.w.Local}function ne(e,t,n){let i=!1;const r=G.mocksEnabled&&G.mockConfigDictionary&&G.mockConfigDictionary[t];let o;r&&(t=r,i=!0),o=i?"mock":e===q?"dev/loc":"prod";return`${o}/${/^shared/.test(t)?t:`${n}/${t}`}`}function ie(e,t){const n=t&&"weather"===t,i=e&&e.length>0&&e.includes($.u_);return n&&i}var re=n(49595);function oe(e,t,n){return{...e,message:t||e.message,pb:n?{...e.pb,customMessage:n}:e.pb}}class ae{constructor(){this.idb=indexedDB}get supported(){return!!this.idb}get isGetAllAllowed(){return!(!IDBObjectStore.prototype||!IDBObjectStore.prototype.getAll)}_setIndexedDb(e){this.idb=e}_getIdbPromise(){return this.idbPromise}async getObject(e){let t;return await this.withIdbStore("readonly","getObject",(n=>{t=n.get(e)})),t.result}async getAll(){let e;return await this.withIdbStore("readonly","getAll",(t=>{e=t.getAll()})),e.result}async getAllObjects(){if(this.isGetAllAllowed)return this.getAll();const e=[];return await this.withIdbStore("readonly","getAllObjects",(t=>{t.openCursor().onsuccess=function(t){const n=t.target&&t.target.result?t.target.result:void 0;n&&n.value&&(e.push(n.value),n.continue())}})),e}async setObject(e,t){return await this.withIdbStore("readwrite","setObject",(n=>{n.put(t,e)}))}async removeObject(e){return await this.withIdbStore("readwrite","removeObject",(t=>{t.delete(e)}))}async clearObjects(){return await this.withIdbStore("readwrite","clearObjects",(e=>{e.clear()}))}async initializeIndexedDb(e=1,t="Default",n="MicrosoftNews",i=null){this.storeName=t,this.idbPromise=i||new Promise(((i,r)=>{const o=this.idb.open(n,e);o.onerror=()=>{r(o.error)},o.onsuccess=()=>{i(o.result)},o.onupgradeneeded=()=>{o.result.createObjectStore(t)}}))}async withIdbStore(e,t,n){return this.idbPromise.then((t=>new Promise(((i,r)=>{const o=t.transaction(this.storeName,e);o.oncomplete=()=>{i()},o.onabort=o.onerror=()=>r(o.error),n(o.objectStore(this.storeName))}))))}}var se=n(9791);class ce{useConfigCaching(){const e=this.resolverEnvironment&&this.resolverEnvironment.configServiceParameters&&this.resolverEnvironment.queryParams;return!e||!e.enableConfigCaching||"true"===e.enableConfigCaching}constructor(e,t=!1){if(this.environment=e,this.enableConfigCaching=this.useConfigCaching(),this.stalenessCheckTimestamp=(new Date).getTime(),this.indexedDbMap=new Map,this.readConfigsFromIdb=(0,se.Z)(this._readConfigsFromIdb),!e||!e.targetScope||!e.appType)throw new Error("ResolverEnvironment or targetScope or appType does not exist.");this.initializeIdb=(0,se.Z)(this.initializeIdb),this.resolverEnvironment=e,this.indexedDb=new ae,t&&this.initializeIdb()}tryGetConfigSync(e){if(e){const t=K(e,this.resolverEnvironment.appType);return this.indexedDbMap.get(t)}}async getConfig(e){if(!e)return;const t=K(e,this.resolverEnvironment.appType);return this.indexedDbMap.has(t)||await this.readConfigsFromIdb(),this.indexedDbMap.get(t)}async updateCache(e){e&&(e.forEach(((e,t)=>{if(e){const n={storageTimestamp:this.stalenessCheckTimestamp,configRefCacheKey:t,properties:e.properties};this.indexedDbMap.set(t,n)}})),await this.writeConfigMapToIdb())}async initializeIdb(){if(this.enableConfigCaching)try{const e=this.resolverEnvironment.configCacheProperties&&this.resolverEnvironment.configCacheProperties.idbConfigOpenPromise;await this.indexedDb.initializeIndexedDb(1,"Configurations_12","wwConfigs",e),this.indexedDbInitialized=!0,this.logMessage("IndexedDB initialized.")}catch(e){this.enableConfigCaching=!1,this.sendAppError(oe(re._d,"Failed to init configs IndexedDB",e))}}async _readConfigsFromIdb(){if(this.enableConfigCaching){this.indexedDbInitialized||await this.initializeIdb();try{const e=this.generateIdbKey();let t,n;const{idbConfigLookup:i=null,idbConfigReadPromise:r=null}=this.resolverEnvironment.configCacheProperties||{};t=(i||{})[e],t?n="pre-initialized config cache":r?(n="pre-initialized IndexedDb read",await r,t=(i||{})[e]):(n="IndexedDb bulk read",t=await this.indexedDb.getObject(e)),t?(t.forEach((e=>{e.configRefCacheKey&&!this.isConfigStale(e.storageTimestamp)&&this.indexedDbMap.set(e.configRefCacheKey,e)})),this.logMessage(`readConfigsFromIdb: Configs in IndexedDB: ${t.size}. Configs in memory: ${this.indexedDbMap.size}. CacheSource: ${n}.`)):this.logMessage(`readConfigsFromIdb: Didn't find any config in IndexedDB. CacheSource: ${n}`)}catch(e){this.sendAppError(oe(re.kJ,"IndexedDb Configs read failed",e))}}}async writeConfigMapToIdb(){if(this.enableConfigCaching&&this.indexedDbMap){this.indexedDbInitialized||await this.initializeIdb();try{const e=this.generateIdbKey();await this.indexedDb.setObject(e,this.indexedDbMap),this.logMessage("writeConfigMapToIdb: completed")}catch(e){this.sendAppError(oe(re.yG,"Failed to write configMap to indexedDb",e))}}}generateIdbKey(){const{audienceMode:e="",locale:t={},pageType:n=""}=this.resolverEnvironment.targetScope||{},i=t.content||t,{language:r,market:o}=i;return[e,r,o,n,this.resolverEnvironment.appType||""].map((e=>e||"")).join("|").toLowerCase()}isConfigStale(e){return!e||this.stalenessCheckTimestamp-e>6048e5}sendAppError(e){this.resolverEnvironment.appErrorCallback&&this.resolverEnvironment.appErrorCallback(e)}logMessage(e){this.resolverEnvironment.loggerCallback&&this.resolverEnvironment.loggerCallback(e)}}var de=n(32671),le=n(16614);class ue{get hadNetworkError(){return this._hadNetworkError}get shouldTryFallbackResolver(){return this._shouldTryFallbackResolver}get configServiceEnabled(){return this.enableConfigService}get configServiceQueryParams(){return this.configServiceParams}get crsActivityId(){return this._crsActivityId}constructor(e){if(this.resolverEnvironment=e,this.configMap=new Map,this.enableConfigService=!0,this.skipBelowTheFold=!1,this.configPromiseMap=new Map,this._shouldTryFallbackResolver=!1,this._hadNetworkError=!1,this._shouldUseCdnFallback=!1,this._initialCrsFetch=!0,this.getCacheKeyFromConfigRef=e=>K(e,this.resolverEnvironment.appType),!(e&&e.configServiceParameters&&e.appType&&e.configServiceParameters.configServiceBaseUrl&&e.targetScope))throw this.enableConfigService=!1,new Error("ResolverEnvironment or configServiceParameters or targetScope does not exist.");e.segmentPlugins&&e.segmentPlugins.skipBelowTheFold&&(this.skipBelowTheFold=!0)}async initialize(){this.shouldUseConfigService(),await this.setConfigServiceParams()}async setConfigServiceParams(){const{appType:e,configServiceParameters:t,targetScope:n}=this.resolverEnvironment,{maxDepth:i}=t;let{buildVersion:r}=t,o=`apptype=${e}`;o+=`&v=${r}`;const a=function(e,t){try{if(e&&e.pageExperiments&&e.pageExperiments.includes("prg-crsfdheadrem")&&"weather"!==t&&"finance"!==t){const t={...e};return t.pageExperiments=[],t}}catch(e){}return e}(n,e);o+="&targetScope="+JSON.stringify(a),i&&(o+=`&maxDepth=${i}`),this.skipBelowTheFold&&(o+="&skipBelowTheFold=true"),this.containsDevOnlyQueryParameters()&&(o+="&citem=dev:true&instance=Int1"),this.configServiceParams=o}sendPerfMarker(e){this.resolverEnvironment.perfMarkerCallback&&this.resolverEnvironment.perfMarkerCallback(e)}shouldUseConfigService(){const e=this.resolverEnvironment&&this.resolverEnvironment.configServiceParameters&&this.resolverEnvironment.queryParams;e&&e.enableConfigService&&(this.enableConfigService="true"===e.enableConfigService)}containsDevOnlyQueryParameters(){const e=this.resolverEnvironment.queryParams;if(!e)return!1;const t=e.item;if(t&&t.length>0)return!0;if(e.citem)return!0;return!!e.pcsonly}getConfigMap(){return this.configMap}tryGetConfigSync(e){if(e){const t=this.getCacheKeyFromConfigRef(e);return this.configMap.get(t)}}async getConfig(e){const{configServiceParameters:t,targetScope:n,isInitialAfdCrsCall:i=!1}=this.resolverEnvironment;if(!t||!n||!e)return Promise.reject(Error("Either of configServiceParameters, targetScope or configRef is not set correctly."));if(!this.enableConfigService)return void(this._shouldTryFallbackResolver=!0);const r=this.getCacheKeyFromConfigRef(e);if(this.configMap.has(r))return this.configMap.get(r);if(this.configPromiseMap.has(r))return this.configPromiseMap.get(r);const o=new Promise((async(t,n)=>{try{i&&(this.resolverEnvironment.configServiceParameters.configServiceBaseUrl=this.resolverEnvironment.crsRetryBaseUrl),this._initialCrsFetch&&this.sendPerfMarker(`${L}${E}`),await this.getConfigTreeFromCrs(e),this._initialCrsFetch&&this.sendPerfMarker(`${L}${x}`),this._shouldTryFallbackResolver&&!i&&(this._shouldUseCdnFallback=!0,this._shouldTryFallbackResolver=!1,this._initialCrsFetch&&this.sendPerfMarker(`${D}${E}`),await this.getConfigTreeFromCrs(e),this._initialCrsFetch&&this.sendPerfMarker(`${D}${x}`),this.sendAppError(oe(re.Sp,"CRS-AFD Retry",`Retryring to call CRS-AFD with ConfigRef ${this.getCacheKeyFromConfigRef(e)} because Akamai call had an error.`))),this._initialCrsFetch=!1,t(this.configMap.get(r))}catch(e){this.sendAppError(oe(re.Km,`Exception in getConfig for ${r}`,e)),n(e)}finally{this.configPromiseMap.delete(r)}}));return this.configPromiseMap.set(r,o),o}async getConfigTreeFromCrs(e){let t="",n="";try{let i;const r=this.getCrsTimeout(),o=performance.now(),a=new Promise((n=>{i=setTimeout((()=>{const i={...re.yL,pb:{...re.yL.pb,errorBehavior:de.C.Fallback,isWebWorker:this.resolverEnvironment.isThisWebWorkerThread}};return this.sendAppError(oe(i,"CRS fetch timeout",`ConfigRef: ${this.getCacheKeyFromConfigRef(e)}. CrsUrl: ${t||""}, timeElapsed: ${performance.now()-o}`)),n(null)}),r)}));t=this.generateCrsUrl(e),!(0,S.N)()&&"edgeChromium"===this.resolverEnvironment.appType&&this.resolverEnvironment.targetScope.pageExperiments.includes("prg-earlycrs")&&(0,le.Z)(e,{experienceType:"AppConfig",instanceSrc:"default"})&&f.Gq.set(pe,{url:t});let s=this.tryGetConfigFromEarlyCrsPromise(e,t);s?n="Prefetch ":s=this.downloadFromCrs(t,r);const c=s.then((e=>(i&&clearTimeout(i),e))),d=await Promise.race([c,a]),l=d&&d.configs;if(!l||(0,b.Z)(l))return void(this._shouldTryFallbackResolver=!0);this._shouldTryFallbackResolver=!1,this.updateCacheUsingConfigs(l)}catch(i){this._shouldTryFallbackResolver=!0,this.sendAppError(oe(re.GB,`${n}CRS fetch network error`,`ConfigRef: ${this.getCacheKeyFromConfigRef(e)}. CrsFetchNetworkError: ${this._hadNetworkError}. Error: ${i}. CrsUrl: ${t||""}`))}}updateCacheUsingConfigs(e){for(const t in e){const n=e[t];if(n&&n.properties){const e=this.getCacheKeyFromConfigRef(Q(t));this.configMap.set(e,n)}}}setDownloadFromCrsBeforeNetwork(e){this.downloadFromCrsBeforeNetwork=e}async downloadFromCrs(e,t){if(this.downloadFromCrsBeforeNetwork){const t=await this.downloadFromCrsBeforeNetwork(e);if(t)return t}const{abortableFetchCallback:n,hostHeaderOverride:i}=this.resolverEnvironment,r=!(0,S.N)()&&i?{headers:{host:i}}:void 0;return(n?n(e,t,r):fetch(e)).then((t=>this.processCrsResponse(e,t))).catch((e=>this.handleCrsDownloadError(e)))}handleCrsDownloadError(e){throw this._shouldTryFallbackResolver=!1,this._hadNetworkError=!0,e}processCrsResponse(e,t){if(this._crsActivityId=function(e){try{if(e&&"string"==typeof e){const t=e.indexOf("|");return e.substring(0,t)}}catch(e){}return""}(t.headers.get("x-ceto-ref")||"")||function(e){try{if(e&&"string"==typeof e)return e.match(/Ref A: [A-Z0-9]+/)[0].substring(7)}catch(e){}return""}(t.headers.get("x-msedge-ref")||"")||"empty",t.ok)return t.json();const{isWebWorkerPresent:n,isThisWebWorkerThread:i}=this.resolverEnvironment,r=t.headers.get("X-Crs-BuildVersion")||"",o=t.headers.get("X-Crs-Env")||"",a=t.headers.get("x-msedge-ref")||"",s=`Url: ${e}, CRS Version: ${r}, CRS Env: ${o}, isWebWorkerPresent: ${n}`,c={...re.Wc,pb:{...re.Wc.pb,userImpacting:!0,errorBehavior:de.C.Fallback,isWebWorker:i,fetchNetworkResponse:{activityId:a,statusCode:t.status}}};return this.sendAppError(oe(c,"CRS returned non-200 response",s)),Promise.resolve()}generateCrsUrl(e){const t=e.sharedNs?`&sharedNs=${e.sharedNs}`:"",n=`?${`expType=${e.experienceType}&expInstance=${e.instanceSrc}${t}`}&${this.configServiceParams}`;return(this._shouldUseCdnFallback?new URL(n,this.resolverEnvironment.crsRetryBaseUrl):new URL(n,this.resolverEnvironment.configServiceParameters.configServiceBaseUrl)).toString()}sendAppError(e){this.resolverEnvironment.appErrorCallback&&this.resolverEnvironment.appErrorCallback(e)}getCrsTimeout(){return(0,S.N)()||this.resolverEnvironment&&this.resolverEnvironment.isThisWebWorkerThread?1e4:3e3}tryGetConfigFromEarlyCrsPromise(e,t){if(!(0,S.N)())return null;const{crsPromise:n,crsRequestData:i}=window,r=null==i?void 0:i.url;return n&&r&&(0,le.Z)(e,{experienceType:"AppConfig",instanceSrc:"default"})?(setTimeout((()=>{const e=new URL(r).search,n=new URL(t).search;n.indexOf(e)<0&&this.sendAppError(oe(re.Oq,"Early CRS URL is different",[e,n].toString()))}),8e3),delete window.crsPromise,delete window.crsRequestData,n.then((e=>this.processCrsResponse(r,e))).catch((e=>this.handleCrsDownloadError(e)))):null}}const pe="crs-request-data";let he=async(e,t,n,i)=>{if(!e)throw new Error("BlobFetcher.ts: Fetch Error: Relative Url is null or undefined.");const r=ee(t,n)?"https://localhost.msn.com:9000/"+e:j+e.toLowerCase(),o=void 0,a=i?i(r,1e4,o):fetch(r);let s;return s=i?a.then((e=>{if(e.ok)return e.json();return i(r,1e4,o).then((e=>{if(e.ok)return e.json();throw new Error(`Non-200 response, failed to fetch 2nd time, Status: ${e.status}, StatusText: ${e.statusText}, fetch url: ${r}`)}))})).catch((e=>{throw new Error(`BlobFetcher.ts: Fetch Error: fetch url: ${r}, error: ${e}.`)})):a.then((e=>{if(e.ok)return e.json();throw new Error(`Non-200 response, Status: ${e.status}, StatusText: ${e.statusText}, fetch url: ${r}`)})).catch((e=>{throw new Error(`BlobFetcher.ts: Fetch Error: fetch url: ${r}, error: ${e}.`)})),s},ge=(0,se.Z)(he);class me{constructor(e,t,n){this.failedConfigIndexFetches=[],this.appType=e,this.configOrigins=t,this.fetchAndParseConfigIndex=(0,se.Z)(this.fetchAndParseConfigIndex,((...e)=>e.join("/"))),this.resolverEnvironment=n}async fetchAndParseConfigIndex(e,t,n){const i=ee(e,this.configOrigins);if(!n&&!i)return;const r=i?`${ne(e,t,this.appType)}/index.json`:`${e}/${t}/index.json/${n}`;try{const t=this.resolverEnvironment&&this.resolverEnvironment.abortableFetchCallback;return await ge(r,e,this.configOrigins,t)}catch(e){i||this.failedConfigIndexFetches.push(e)}}getFailedConfigIndexFetches(){return this.failedConfigIndexFetches}}class fe{constructor(e,t,n){this.failedConfigFetches=[],this.appType=e,this.configOrigins=t,this.fetchAndParseConfig=(0,se.Z)(this.fetchAndParseConfig,((...e)=>e.join("/"))),this.resolverEnvironment=n}async fetchAndParseConfig(e,t,n,i){const r=ee(e,this.configOrigins);if(!i&&!r)return;const o=r?`${ne(e,t,this.appType)}/${n}`:`${e}/${t}/${n}/${i}`;try{const t=this.resolverEnvironment&&this.resolverEnvironment.abortableFetchCallback;return await ge(o,e,this.configOrigins,t)}catch(e){r||this.failedConfigFetches.push(e)}}getFailedConfigFetches(){return this.failedConfigFetches}}class ve{constructor(e,t,n){this.manifestsMap=new Map,this.appType=e,this.configOrigins=t,this.resolverEnvironment=n}async fetchAndParseManifest(e,t){if(ee(e,this.configOrigins))return;const n=`${e}/${this.appType}/${t}.json`;if(!this.manifestsMap.has(e))try{const t=this.resolverEnvironment&&this.resolverEnvironment.abortableFetchCallback,i=await ge(n,void 0,void 0,t);if(this.manifestsMap.set(e,i),(0,b.Z)(i))throw new Error(`Manifest response is ok but empty or undefined, relative url: ${n}`)}catch(t){throw this.manifestsMap.set(e,null),new Error(`ManifestService.ts: ${t}`)}return this.manifestsMap.get(e)}getConfigIndexHashedFileName(e,t){if(ee(t,this.configOrigins))return;const n=`${e}/index.json`;return this.getFromManifest(n,t)}getConfigHashedFileName(e,t,n){if(ee(n,this.configOrigins))return;const i=`${e}/${t}`;return this.getFromManifest(i,n)}getFromManifest(e,t){if(!this.manifestsMap||!this.manifestsMap.get(t))return;const n=this.manifestsMap.get(t);if(n&&n.fileHashes)return n.fileHashes[e.toLowerCase()];throw new Error(`ManifestService.ts: Manifest is defined but does not have fileHashes: ${e}: cacheKey snippet of manifest: ${JSON.stringify(n).substr(0,100)}`)}}function ye(e,t){if((0,T.Z)(e))return t}var Se=n(88975);class Ce{constructor(e){if(!(e&&e.configServiceParameters&&e.appType&&e.configServiceParameters.configServiceBaseUrl&&e.targetScope))throw new Error("SingleConfigResolver.ts: ResolverEnvironment or configServiceParameters or targetScope does not exist.");this.appType=e.appType,this.targetScope=e.targetScope,this.buildVersion=e.configServiceParameters.buildVersion,this.configOrigins=e.configOrigins,this.manifestService=new ve(this.appType,this.configOrigins,e),this.configIndexService=new me(this.appType,this.configOrigins,e),this.configService=new fe(this.appType,this.configOrigins,e)}async resolveConfigAsync(e){const t=X(e),n=X(e,!0);this.buildNumber=this.tryGetBuildNumber()||await async function(e,t){let n;const i=new URLSearchParams((0,y.zp)()).getAll("item"),r=i?i.find((e=>e&&0===e.indexOf("spalink:"))):void 0;r&&(n=r.replace("spalink:","").replace("/debug",""));const o=n||e;if(!o||!t||"latest"!==o&&"rolling"!==o&&!z.test(o))throw new Error(`Arguments are incorrect. Check buildVersion: ${o} appType: ${t}`);const a=`https://assets.msn.com/bundles/v1/${t}/${o}/v?${(new Date).getTime()}`;let s;try{if(s=await fetch(a),!s||!s.ok)throw new Error(`Response not OK, Status: ${s.status}, StatusText: ${s.statusText}`);return(await s.text()).trim()}catch(e){throw new Error(`getBuildNumberAsync Fetch Url: ${a}, ${e}`)}}(this.buildVersion,this.appType);const i=this.manifestService.fetchAndParseManifest(_,this.buildNumber),r=this.manifestService.fetchAndParseManifest(H,this.buildNumber);await Promise.all([i,r]);const o=this.manifestService.getConfigIndexHashedFileName(t,_),a=this.manifestService.getConfigIndexHashedFileName(n,H),s=this.configIndexService.fetchAndParseConfigIndex(W,t,o),c=this.configIndexService.fetchAndParseConfigIndex(q,n,a),d=await Promise.all([s,c]).then((e=>({featureIndex:e[0],localizationIndex:e[1]}))),l=d.featureIndex&&d.featureIndex.configs||void 0,u=d.localizationIndex&&d.localizationIndex.configs||void 0,p=[];if(this.fetchMathingConfigs(p,l,_,W,t),this.fetchMathingConfigs(p,u,H,q,n),this.fetchMathingConfigs(p,u,H,q,n,!0),0==p.length)return;return function(e){if(!e||e.length<1)return null;const t=e[0];for(let n=1;n<e.length;n++)t.properties=(0,C.Z)(t.properties,e[n].properties,ye);return t}((await Promise.all(p).then((e=>e))).filter((e=>null!=e)))}fetchMathingConfigs(e,t,n,i,r,o=!1){t&&0!=t.length&&t.forEach((t=>{if((0,Se.J4)(t.targetScope,this.targetScope,o)){const o=t.src,a=this.manifestService.getConfigHashedFileName(r,o,n);e.push(this.configService.fetchAndParseConfig(i,r,o,a))}}))}getFailedFetches(){const e=[],t=this.configService.getFailedConfigFetches();t.length>0&&e.push(...t);const n=this.configIndexService.getFailedConfigIndexFetches();return n.length>0&&e.push(...n),e}get buildNumber(){return this._buildNumber}set buildNumber(e){this._buildNumber=e}tryGetBuildNumber(){return this.buildNumber?this.buildNumber:this.configOrigins.feature===U.w.Local&&this.configOrigins.loc===U.w.Production?null:this.buildVersion}}class we{constructor(e){if(this.mergedConfigMap=new Map,this.mockManagerInitialized=!1,!(e&&e.configServiceParameters&&e.appType&&e.configServiceParameters.configServiceBaseUrl&&e.targetScope))throw new Error("Resolver.ts: ResolverEnvironment or configServiceParameters or targetScope does not exist.");this.resolverEnvironment=e,this.appType=e.appType,this.singleConfigResolver=new Ce(e)}async getConfig(e,t=!1){const n=K(e,this.appType),{mockManager:i}=this.resolverEnvironment;if(i.mocksEnabled&&!this.mockManagerInitialized){this.mockManagerInitialized=!0;const e={scenarios:(await this.getConfig({experienceType:"MockManager",instanceSrc:"default"})).properties.scenarios};i.initialize(e)}if(!this.mergedConfigMap.has(n)){await this.getConfigRecursive(e,t);const n=this.singleConfigResolver.getFailedFetches();n.length>0&&n.forEach((e=>{Y(this.resolverEnvironment.appErrorCallback,{...re.e_,message:"Fetch failed for a config",pb:{...re.e_.pb,customMessage:`Failed fetch url: ${e}`}})}))}return this.mergedConfigMap.get(n)}getConfigMap(){return this.mergedConfigMap}async getConfigRecursive(e,t=!1){const n=K(e,this.appType);if(n&&!this.mergedConfigMap.has(n))try{const i=await this.singleConfigResolver.resolveConfigAsync(e);if(this.mergedConfigMap.set(n,i),t){const e=Z(i);if(0==e.size)return;const n=[];e.forEach((e=>{n.push(this.getConfigRecursive(e,t))})),await Promise.all(n)}}catch(e){Y(this.resolverEnvironment.appErrorCallback,{...re.oH,message:"Exception in getConfig.",pb:{...re.oH.pb,customMessage:`CacheKey: ${n} / Error: ${e}`}})}}}class be{constructor(e){if(this.resolverEnvironment=e,this.fallbackResolverCalled=!1,this.crsInitComplete=!1,this.enableIdbCaching=!1,this.configResolverMap=new Map,this.configResolverMapSet=!1,!e||!e.targetScope)throw new Error("ResolverEnvironment or targetScope does not exist.");var t,n;this.configService=new ue(e),this.enableIdbCaching=(t=e.targetScope.pageExperiments)&&t.indexOf("prg-gitconfigs-t")>-1,this.configCache=new ce(e,this.enableIdbCaching),n=e.configStaticFallbackBaseUrl,j=n,this.fallbackResolver=new we(e)}get crsHadNetworkError(){return this.configService.hadNetworkError}get crsActivityId(){return this.configService.crsActivityId}tryGetConfigSync(e){if(e)return this.configService.tryGetConfigSync(e)||this.tryToGetFromInMemory(e)||this.configCache.tryGetConfigSync(e)}async getConfig(e){if(this.resolverEnvironment.configOrigins.feature===U.w.Local||this.resolverEnvironment.mockManager.mocksEnabled){const t="function"==typeof this.resolverEnvironment.loggerCallback;try{const n=await this.fallbackResolver.getConfig(e);return n?Promise.resolve(n):(t&&this.resolverEnvironment.loggerCallback(`ConfigResolver: Failed to fetch configs from local configs. Config: ${K(e)}`),Promise.resolve(null))}catch(e){return t&&this.resolverEnvironment.loggerCallback(`${e.message}`),Promise.reject(e)}}if(!this.configResolverMapSet&&null!=e&&e.properties){const t=e.properties;t&&t.configs&&(this.setConfigResolverMap(t.configs),this.configResolverMapSet=!0)}const t=this.configResolverMapSet&&e?this.tryToGetFromInMemory(e):null;if(t)return t;this.crsInitComplete||(this.sendPerfMarker(`${M}${E}`),await this.initiateConfigService(),this.crsInitComplete=!0,this.sendPerfMarker(`${M}${x}`)),this.configResolverMapSet&&this.crsInitComplete&&this.sendAppError(oe(re.cm,"Fallback to network call",`Config Ref ${this.getCacheKeyFromConfigRef(e)} not found in prefetched configs. Network Fallback`));const n=e?this.configService.tryGetConfigSync(e):null;if(n)return n;const i=new Promise((async t=>{if(this.configService.shouldTryFallbackResolver){this.fallbackResolverCalled=!0;const n=await this.fallbackResolver.getConfig(e);if(n)return t(n)}else{const n=await this.configService.getConfig(e);if(n)return t(n)}return t(null)})),r=new Promise((async t=>{if(this.enableIdbCaching){const n=await this.configCache.getConfig(e);if(n)return t(n)}}));return Promise.race([r,i])}getConfigServiceObject(){return this.configService}async initiateConfigService(){await this.configService.initialize(),await this.configService.getConfig({experienceType:"AppConfig",instanceSrc:"default"})}sendPerfMarker(e){this.resolverEnvironment.perfMarkerCallback&&this.resolverEnvironment.perfMarkerCallback(e)}setConfigResolverMap(e){for(const t in e){const n=e[t];if(n&&n.properties){const e=this.getCacheKeyFromConfigRef(Q(t));this.configResolverMap.set(e,n)}}}tryToGetFromInMemory(e){const t=this.getCacheKeyFromConfigRef(e);return this.configResolverMap.get(t)}getCacheKeyFromConfigRef(e){return K(e,this.resolverEnvironment.appType)}sendAppError(e){this.resolverEnvironment.appErrorCallback&&this.resolverEnvironment.appErrorCallback(e)}}const Te=864e5,ke="__ResolverInstance__";class Pe{constructor(){this.currentTargetScope=s.jG.CurrentRequestTargetScope,this.configMap=new Map,this.env=s.jG.Environment||c.q.prod,this.promiseMap=new Map,this.refreshServerCachePromiseMap=new Map,this.stalenessCheckTimestamp=(new Date).getTime(),this.isMultiConfigRetrievalEnabled=!1,this.localOverrideMap={},this.peregrineFlightsKey="prgflights",this.isInitialized=!1,this.initializeCaching()}static getInstance(){return f.Gq.get(ke,(()=>new Pe))}static resetResolverInstance(){const e=new Pe;f.Gq.set(ke,e),Ie=(0,v.h)(Pe)}getConfigResolver(){return this.configResolver}initializeCaching(){this.cdnConfigBaseUrl=s.jG.ConfigRootUrl||s.jG.EnvironmentConfigUrl,this.configServiceBaseUrl=s.jG.ConfigServiceBaseUrl,this.resolverErrors=[],this.configTimings=[],this.useWebWorkerToCache=l.yb;const e=s.jG.EnableCMSPPEConfigs;this.useServerCache=null!==u.o&&!e,this.setTargetScopeAndConfigServiceParams()}setTargetScopeAndConfigServiceParams(){const e=s.jG.EnableCMSPPEConfigs;this.currentTargetScope=this.currentTargetScopeOverride||s.jG.CurrentRequestTargetScope,!s.jG.IsGitConfigs&&this.currentTargetScope&&(this.currentTargetScope.locale=s.jG.LocaleContentMarket);const{AppType:t,WidgetAttributes:n}=s.jG,i=n&&n.clientPerf&&n.clientPerf.shouldUsePWOnlyFlights||"distribution"===t,r=this.currentTargetScope&&(i?(0,k.Kd)(this.currentTargetScope.pageExperiments):(0,P.M)(this.currentTargetScope.pageExperiments));if(r&&r.length>0&&(this.peregrineFlights=r.join(",")),this.scopeWithPeregrineFlights={...this.currentTargetScope,domain:n&&(0,y.Td)()||this.currentTargetScope&&this.currentTargetScope.domain,pageExperiments:r},this.enableConfigService=this.useConfigService(),this.enableConfigService){this.configServiceParameters="?targetScope="+JSON.stringify(this.scopeWithPeregrineFlights),this.configServiceParameters+=`&apptype=${t}`;const{IsMultiConfigRetrievalEnabled:n,CacheBustingIdentifier:i}=s.jG;this.isMultiConfigRetrievalEnabled=n,this.isMultiConfigRetrievalEnabled&&(this.configServiceParameters+=`&maxDepth=${this.getConfigRetrievalMaxDepth()}`);const r=(0,S.N)()&&window._cbid||i;r&&(this.configServiceParameters+=`&cbid=${r}`),this.containsDevOnlyQueryParameters()&&(this.configServiceParameters+="&item=dev:true"),e&&(this.configServiceParameters+="&item=cms:ppe")}this.storageKey=this.generateKey()}initialize(e,t){if(this.isInitialized)return;var n;if(this.perfTimeline=(0,i.oA)("Resolver","Resolver",!0),n=this.perfTimeline,O=n,!s.jG.IsGitConfigs)return;const{_idbConfigOpenPromise:o=null,_idbConfigReadPromise:a=null,_idbConfigLookup:c=null}=(0,S.N)()?window:{},d={idbConfigOpenPromise:o,idbConfigReadPromise:a,idbConfigLookup:c},l={buildVersion:s.jG.BuildVersion,configServiceBaseUrl:s.jG.ConfigServiceBaseUrl.toString()},u=s.jG.CrsRetryBaseUrl,{pageExperiments:g}=this.currentTargetScope,m={appType:s.jG.AppType,configServiceParameters:l,targetScope:this.scopeWithPeregrineFlights,env:s.jG.Environment.toString(),featureFlags:s.jG.FeatureFlags,isThisWebWorkerThread:!1,isWebWorkerPresent:this.useWebWorkerToCache,queryParams:p.c.getParamsObj((0,y.zp)()),appErrorCallback:e,perfMarkerCallback:B,loggerCallback:r.k.log.bind(r.k),logObjectsCallback:r.k.logObjects.bind(r.k),isDebug:r.k.isDebug(),configCacheProperties:d,configOrigins:s.jG.ConfigOrigins,segmentPlugins:t,mockManager:G,crsRetryBaseUrl:u,disableInMemoryCache:s.jG.DisableInMemoryCache,crsDisableServerCache:s.jG.CrsDisableServerCache,abortableFetchCallback:g&&(g.includes("useabortfetch")||g.includes("prg-1sw-abtfetch"))||!(0,S.N)()?h.Sm:void 0,hostHeaderOverride:s.jG.HostHeaderOverride,configStaticFallbackBaseUrl:s.jG.ConfigStaticFallbackBaseUrl,isInitialAfdCrsCall:ie(g,s.jG.AppType)};this.configResolver=new be(m),this.isInitialized=!0}mergeConfig(e){if(!e||e.length<1)return null;const t=e[0];for(let n=1;n<e.length;n++)t.properties=(0,C.Z)(t.properties,e[n].properties,this.customizer);return t}resolveConfigIndex(e){if(!e)return null;const t=[];return e.configs.forEach((e=>{this.targetScopeMatched(e)&&t.push(e.href)})),e.overrideConfig&&g.b.stringHasData(e.overrideConfig.href)&&t.push(e.overrideConfig.href),t}targetScopeMatched(e){const t=e.targetScope;return!t||this.audienceModeMatched(t)&&this.browserTypeMatched(t)&&this.deviceTypeMatched(t)&&this.domainMatched(t)&&this.experimentMatched(t)&&this.marketMatched(t)&&this.osMatched(t)&&this.pageTypeMatched(t)&&this.platformMatched(t)}audienceModeMatched(e){return!e.audienceMode||this.currentTargetScope.audienceMode===e.audienceMode}browserTypeMatched(e){return!e.browser||!e.browser.browserType||!(!this.currentTargetScope.browser||this.currentTargetScope.browser.browserType!==e.browser.browserType||e.browser.version&&this.currentTargetScope.browser.version!==e.browser.version)}deviceTypeMatched(e){return!e.deviceFormFactor||this.currentTargetScope.deviceFormFactor===e.deviceFormFactor}domainMatched(e){return!e.domain||this.currentTargetScope.domain===e.domain}experimentMatched(e){return this.currentTargetScope.pageExperiments=this.currentTargetScope.pageExperiments||[],!!(!(0,w.Z)(e.experimentId)||(0,b.Z)(e.experimentId)||this.currentTargetScope.pageExperiments.indexOf(e.experimentId)>=0)}stringsEqualCaseInsensitive(e,t){return 0===(e||"").localeCompare(t||"",void 0,{sensitivity:"accent"})}marketMatched(e){const t=e.locale||e.locale;if(!t)return!0;const n=this.currentTargetScope.locale;return!(t.language&&!this.stringsEqualCaseInsensitive(t.language,n.language)||t.market&&!this.stringsEqualCaseInsensitive(t.market,n.market)||t.script&&!this.stringsEqualCaseInsensitive(t.script,n.script))}osMatched(e){return!e.os||this.currentTargetScope.os===e.os}pageTypeMatched(e){return!e.pageType||this.currentTargetScope.pageType===e.pageType}platformMatched(e){return!e.platform||this.currentTargetScope.platform===e.platform}customizer(e,t){if((0,T.Z)(e))return t}clearInternalState(){this.configMap.clear()}overrideCurrentRequestTargetScope(e){this.currentTargetScopeOverride=e,this.currentTargetScopeOverride&&(this.currentTargetScope=this.currentTargetScopeOverride)}overrideCurrentRequestEnvironment(e){this.env=e||c.q.prod}overrideConfig(e,t,n){if(this.env!==c.q.prod){const i="string"==typeof e?e:(0,d.B5)(e);this.localOverrideMap[i]={experienceType:t,properties:n,typeVersion:"1.0.0",_name:"index"}}}async getRootConfig(e){if(!s.jG.IsGitConfigs)return await this.getConfig(e);const t=await this.getEntryPointConfigRef();return await this.getConfig(t.configRef)}async getEntryPointConfigRef(){return(await this.getConfig({experienceType:"AppConfig",instanceSrc:"default"})).properties.rootExperience}getConfigSync(e){if(!e||!this.currentTargetScope||!s.jG.IsGitConfigs)return;const t=(0,d.B5)(e),n=t&&this.localOverrideMap[t];if(n)return n;const i=this.configResolver&&this.configResolver.tryGetConfigSync(e);return i?{experienceType:e.experienceType,properties:i.properties||{},typeVersion:"Git",_name:t}:void 0}async getConfig(e){if(!this.currentTargetScope)return Promise.reject(new Error(`getConfig: Invalid target scope when fetching config ${JSON.stringify(e)}`));const t=performance.now();if(s.jG.IsGitConfigs){if("string"==typeof e){const t="Invalid config Id for Git configs flight";return this.resolverErrors.push({...o.lu7,message:t,pb:{...o.lu7.pb,userImpacting:!0,customMessage:e}}),Promise.reject(new Error(`${t}: ${e}`))}if(!this.configResolver){const t="Invalid configResolver object for Git configs flight";return this.resolverErrors.push({...o.ASE,message:t,pb:{...o.ASE.pb,userImpacting:!0,customMessage:JSON.stringify(e)}}),Promise.reject(new Error(`${t}: ${JSON.stringify(e)}`))}const n=(0,d.B5)(e),i=this.localOverrideMap[n];if(i)return i;const r=this.perfTimeline&&this.perfTimeline.startMeasure("config",n).endMeasure;let a,s;try{s=this.configResolver.tryGetConfigSync(e);let n=s;if(!n){this.addConfigTiming(e.experienceType,t,"network"),n=await this.configResolver.getConfig(e);const i=this.configResolver.crsActivityId;i&&A.M0.addOrUpdateCustomProperty("crsActivityId",i)}return n?a={experienceType:e.experienceType,properties:n.properties||{},typeVersion:"Git",_name:(0,d.B5)(e)}:Promise.reject(new I(`Could not fetch Git config id ${JSON.stringify(e)}`,this.configResolver.crsHadNetworkError))}finally{if(r){r({customSuffix:`${n}-${(s?"memory":a&&"network")||"error"}`})}}}const n=e;if(!n||!(0,w.Z)(n)||(0,b.Z)(n))throw new Error("getConfig: Invalid relativeUrl");const i=this.localOverrideMap[n];if(i)return i;const a=this.getCacheKey(n),c=this.configMap.get(a);if(c)return this.addConfigTiming(c.experienceType,t,"cache"),c;const l=this.promiseMap.get(a);if(l)return l;let p=!1;const h=this.perfTimeline&&this.perfTimeline.startMeasure("config",n).endMeasure;let g,m;const f=new Promise((async(e,i)=>{try{if(this.useServerCache){let i=!1,s=!1;const c=await u.o.has(a);if(c){const o=await u.o.get(a),c=o?JSON.parse(o):null;c?(this.configTimings.push({experienceType:c.experienceType,cacheFetchDuration:performance.now()-t}),s=!!c.relatedConfigIndexHref,p=!0,this.promiseMap.delete(a),e(c),this.isServerCacheConfigStale(c.storageTimestamp)&&await this.updateServerCache(n,c)):(r.k.log(`Resolver: cacheKey=${a} Undefined from server cache`),i=!0)}if(r.k.logObjects({serverCacheGetConfig:{cacheKey:a,isHeadConfig:s,isCached:c,hasCacheError:i}}),c&&i){const e="Sever Cache key exists but server cache is undefined. Usually due to timeout when server cache IPC is busy.",t=`cacheKey=${a}`,n=new Error(e);throw A.M0.sendAppErrorEvent({...o.pay,message:e,pb:{...o.pay.pb,customMessage:t}}),n}if(c)return;const d=this.getConfigFromNetwork(n),l=(await d).get(a);g=l.experienceType,this.addConfigTiming(g,t,m="network"),e(l)}else{const i=(await await this.getConfigFromNetwork(n)).get(a);g=i.experienceType,this.addConfigTiming(g,t,m="network"),e(i)}}catch(e){this.resolverErrors.push({...o.Sp_,message:"Exception in getConfig",pb:{...o.Sp_.pb,customMessage:`Relative Url: ${n}. Error ${e.message||e}`}}),i(e)}finally{p=!0,this.promiseMap.delete(a),h&&h({customSuffix:`${g}-${n}-${m}`})}}));return p||this.promiseMap.set(a,f),f}async getConfigFromNetwork(e,t=!1){const n=this.getCacheKey(e),i=new Map;if(this.enableConfigService){const a=this.removeCmsPathFromRelativeUrl(e)+this.configServiceParameters;try{if(this.isMultiConfigRetrievalEnabled){const t=await this.downloadFile(new URL(`${a}${this.configServiceBaseUrl.search}`,this.configServiceBaseUrl),!0);if(t&&t.rootConfigIndexId&&t.configs){const n=Object.keys(t.configs).map((e=>t.configs[e]));for(const t of n)if(t&&t.configIndexHref){const o=t.configIndexHref,a=o===e;await this.addConfigToConfigMap(o,t,a?n:null),i.set(this.getCacheKey(o),t),(0,S.N)()&&r.k.log(`Resolver: ${o} config for ${t.experienceType} fetched from network using CRS url with multi config support.`)}return i}}else{const t=await this.downloadFile(new URL(`${a}${this.configServiceBaseUrl.search}`,this.configServiceBaseUrl),!0);if(t)return await this.addConfigToConfigMap(e,t),i.set(n,t),(0,S.N)()&&r.k.log(`Resolver: ${n} config for ${t.experienceType} fetched from network using CRS url.`),i}}catch(n){const i=`CRS fetch failed for ${e}.`,r=`CRS relative Url: ${a} Error: ${n}`;t?A.M0.sendAppErrorEvent({...o.VI5,message:i,pb:{...o.VI5.pb,customMessage:r}}):this.resolverErrors.push({...o.GB_,message:i,pb:{...o.GB_.pb,customMessage:r}})}}if(i&&!i.has(n)){const t=await this.downloadMergeConfig(e);t&&(await this.addConfigToConfigMap(e,t),i.set(n,t),(0,S.N)()&&r.k.log(`Resolver: ${n} config fetched from network using Akamai url.`),this.enableConfigService&&this.resolverErrors.push({...o.CS7,message:"Configs served from CDN after CRS fetch failed",pb:{...o.CS7.pb,customMessage:`Relative Url: ${e} CRS Params: ${this.configServiceParameters}`}}))}return i}async addConfigToConfigMap(e,t,n){t.storageTimestamp=this.stalenessCheckTimestamp,t.configIndexHref=e;const i=this.getCacheKey(e);if(this.useServerCache){n&&(t.relatedConfigIndexHref=n.map((e=>e.configIndexHref)));const e=JSON.stringify(t);await u.o.set(i,e,Te)}else this.configMap.set(i,t)}async updateServerCache(e,t){if(this.useServerCache)try{if(!this.refreshServerCachePromiseMap.get(e)){if(t.relatedConfigIndexHref){await Promise.all(t.relatedConfigIndexHref.map((n=>{const i=n===e?this.refreshConfigServerCache(e,t):this.refreshConfigServerCache(n);return this.refreshServerCachePromiseMap.set(n,i),i})));for(let e=0;e<t.relatedConfigIndexHref.length;e++)this.refreshServerCachePromiseMap.delete(t.relatedConfigIndexHref[e])}else{const n=this.refreshConfigServerCache(e,t);this.refreshServerCachePromiseMap.set(e,n),await n,this.refreshServerCachePromiseMap.delete(e)}this.getConfigFromNetwork(e)}}catch(t){const n=`Update server cache failed for ${e}.`,i=`Error: ${t}`;A.M0.sendAppErrorEvent({...o.VI5,message:n,pb:{...o.VI5.pb,customMessage:i}})}}async refreshConfigServerCache(e,t){if(!this.useServerCache)return;const n=this.getCacheKey(e);if(!t){const e=await u.o.get(n);t=e?JSON.parse(e):null}if(t){t.storageTimestamp=this.stalenessCheckTimestamp;const e=JSON.stringify(t);await u.o.set(n,e,Te)}}purgeRenderCacheUponConfigChanges(e){if(!e)try{(0,m.$o)().removeSubstringKeys("lastKnown_"),(0,m.$o)().removeSubstringKeys("timestamp_"),(0,m.$o)().removeSubstringKeys("keys_")}catch(e){this.resolverErrors.push({...o.GLL,message:"Failed to purge render cache when cached config and network config is not same.",pb:{...o.GLL.pb,customMessage:e}})}}async downloadMergeConfig(e){const t=await this.downloadFile(new URL(`${e}${this.cdnConfigBaseUrl.search}`,this.cdnConfigBaseUrl),!1),n=this.resolveConfigIndex(t),i=await this.downloadExperienceConfig(this.cdnConfigBaseUrl,n),r=this.mergeConfig(i);return r.experienceType=t.experienceType,r}async downloadExperienceConfig(e,t){const n=[];return t.forEach((t=>{n.push(this.downloadFile(new URL(`${t}${e.search}`,e),!1))})),await Promise.all(n)}async downloadFile(e,t){const n=(0,S.N)()?1e4:900,i=e.toString();return(0,h.Sm)(i,n).then((e=>{if(e.ok)return e.json();let n="";if(t){const t=e.headers.get("X-Crs-BuildVersion")||"";n=`msedge ref: ${e.headers.get("x-msedge-ref")||""} Status: ${e.status}, Status Text: ${e.statusText}, Url: ${i} and CRS Version: ${t}`,this.resolverErrors.push((0,a.Tr)(o.Wct,"CRS sent non-200 response",n))}else n=`Status: ${e.status}, Status Text: ${e.statusText}, Url: ${i}`,this.resolverErrors.push((0,a.Tr)(o.h6w,"Cdn config fetch received non-200 response",n));return Promise.resolve()}))}generateKey(){if((0,S.N)()){const{audienceMode:e="",locale:t={},pageType:n=""}=this.currentTargetScope||{},i=t.content||t,r=i?(0,N.p)(i):"",o=t.display||i;return[e,r,o?(0,N.p)(o):"",n,s.jG.AppType||""].map((e=>e||"")).join("|").toLowerCase()}{let{audienceMode:e="",browser:t=null,deviceFormFactor:n="",locale:i={},os:r={},pageType:o="",platform:a="",pageExperiments:c=null}=this.currentTargetScope||{};const d=i.content||i,{language:l,market:u}=d,{browserType:p="",version:h=""}=t||{};c=(0,P.M)(c);return[e,p,h,n,l,u,r,o,a,c?c.join():"",s.jG.AppType||""].map((e=>e||"")).join("|").toLowerCase()}}useConfigService(){const e=(0,y.zp)();if(e){const t=p.c.getQueryParameterByName("enableConfigService",e);if(t)return"true"===t.toLocaleLowerCase()}return s.jG.EnableConfigService}getConfigRetrievalMaxDepth(){const e=p.c.getQueryParameterByName("maxDepth",(0,y.l4)());return e||(s.jG.FeatureFlags&&s.jG.FeatureFlags.crsMaxDepth?s.jG.FeatureFlags.crsMaxDepth:"10")}containsDevOnlyQueryParameters(){const e=(0,y.zp)(),t=p.c.getQueryParameterByName("item",e);if(t&&t.length>0)return!0;const n=p.c.getQueryParameterByName("pcsonly",e);return!!(n&&n.length>0)}getResolverErrors(){return this.resolverErrors}async refreshConfigCache(){if(this.useWebWorkerToCache)try{const e=await(0,l.ot)({id:"refreshconfigs"});if(e&&e.fetched&&void 0!==e.payload&&null!==e.payload){const t=e.payload;this.purgeRenderCacheUponConfigChanges(t.configsEqual);try{(0,m.$o)().setItem(this.peregrineFlightsKey,this.peregrineFlights)}catch(e){this.resolverErrors.push({...o.g_9,message:"Error writing prg flights to ",pb:{...o.g_9.pb,customMessage:e}})}if(t.liveCbId){const e=t.liveCbId.toString();this.writeCbidInLocalStorage(e);const n=s.jG.CacheBustingIdentifier||"",i=window._cbid||"";s.jG.IsGitConfigs||e===n&&e===i||this.resolverErrors.push({...o.N1V,message:"Different Cbid detected than configured.",pb:{...o.N1V.pb,customMessage:`PcsCbid = ${n}. HighestCbid = ${i}. LiveCbid = ${e}.`}})}}}catch(e){this.resolverErrors.push({...o.rP7,message:"refreshConfigCache error",pb:{...o.rP7.pb,customMessage:e}})}}isConfigStale(e){return!e||this.stalenessCheckTimestamp-e>2592e5}isServerCacheConfigStale(e){return!e||this.stalenessCheckTimestamp-e>3e5}removeCmsPathFromRelativeUrl(e){return e.replace("cms/api/amp/experienceConfigIndex/","")}getConfigServiceParameters(){return this.configServiceParameters}addConfigTiming(e,t,n){this.configTimings.push({experienceType:e,[n+"FetchDuration"]:performance.now()-t})}getConfigTimings(e={},t=!1){if(s.jG.IsGitConfigs)return void Object.assign(e,F);if(!this.configTimings)return;let n=0,i=0;for(const r of this.configTimings){const o=r.experienceType.toLowerCase(),a=r.cacheFetchDuration,c=r.networkFetchDuration;("entrypoint"===o||"river"===o||"contentpreview"===o||s.jG.IsDebug||t)&&(void 0!==c&&(e["ConfigFetch."+o]=Math.round(c)),void 0!==a&&(e["ConfigCache."+o]=Math.round(a))),void 0!==a&&(n+=a),void 0!==c&&(i+=c)}n&&(e["ConfigCache.All"]=Math.round(n)),i&&(e["ConfigFetch.All"]=Math.round(i))}setConfigTimingsObject(e){this.configTimings=e}getCacheKey(e){return null===e?null:this.removeCmsPathFromRelativeUrl(e)+"_"+this.storageKey}prgFlightsSameAsLocalStorage(){try{const e=(0,m.$o)().getItem(this.peregrineFlightsKey);return e&&this.peregrineFlights&&e===this.peregrineFlights}catch(e){this.resolverErrors.push({...o.A5T,message:"Error reading prg flights from localStorage",pb:{...o.A5T.pb,customMessage:e}})}return!1}getConfigsCacheLocalStorageKey(){const{audienceMode:e,pageType:t}=this.currentTargetScope||{},n=s.jG.LocaleContentMarket||{};return`config_hash_${e}_${n.language}_${n.market}_${t}_${s.jG.AppType}`}writeCbidInLocalStorage(e){const t=`cbid_${s.jG.AppType||""}`;try{(0,m.$o)().setItem(t,e)}catch(n){throw`Error writing cbid: ${e} to local storage with key ${t}. Error: ${n}`}}}let Ie=(0,v.h)(Pe);const Ae={getRootConfig:e=>Ie.getRootConfig(e),getEntryPointConfigRef:()=>Ie.getEntryPointConfigRef(),getConfig:e=>Ie.getConfig(e),getConfigSync:e=>Ie.getConfigSync(e),mergeConfig:e=>Ie.mergeConfig(e),resolveConfigIndex:e=>Ie.resolveConfigIndex(e),targetScopeMatched:e=>Ie.targetScopeMatched(e),getConfigTimings:(e={},t=!1)=>Ie.getConfigTimings(e,t),getResolverErrors:()=>Ie.getResolverErrors(),refreshConfigCache:()=>Ie.refreshConfigCache(),getInstance:()=>Ie,setTargetScopeAndConfigServiceParams:()=>Ie.setTargetScopeAndConfigServiceParams(),initialize:(e,t)=>Ie.initialize(e,t),getUseConfigService:()=>Ie.useConfigService(),overrideConfig:(e,t,n)=>Ie.overrideConfig(e,t,n),overrideCurrentRequestTargetScope:e=>Ie.overrideCurrentRequestTargetScope(e),overrideCurrentRequestEnvironment:e=>Ie.overrideCurrentRequestEnvironment(e),generateKey:()=>Ie.generateKey(),clearInternalState:()=>Ie.clearInternalState(),initializeCaching:()=>Ie.initializeCaching(),getConfigServiceParameters:()=>Ie.getConfigServiceParameters(),setConfigTimingsObject:e=>Ie.setConfigTimingsObject(e),getCacheKey:e=>Ie.getCacheKey(e),updateServerCache:(e,t)=>Ie.updateServerCache(e,t)}},3104:function(e,t,n){"use strict";function i(e){return s(e,(e=>e.configRef.experienceType),(e=>e.experienceType),null)}function r(e){return s(e,(e=>e.configRef),(e=>e.href),(e=>e))}function o(e){return`${e.experienceType}_${e.instanceSrc}_${e.sharedNs||""}`}function a(e){return e&&null!=e.instanceId&&!!s(e,(e=>e.configRef&&e.configRef.experienceType&&e.configRef.instanceSrc),(e=>e.experienceType&&null!=e.href),null)}function s(e,t,n,i,r){if(void 0===r&&(r=null),null!=e){if("string"==typeof e)return i&&i(e)||r;const o=e;if(o.configRef)return t&&t(o)||r;if(n)return n(e)||r}return r}n.d(t,{B5:function(){return o},Fr:function(){return r},M:function(){return i},oO:function(){return a}})},40762:function(e,t,n){"use strict";n.d(t,{Uq:function(){return a},YO:function(){return r},ds:function(){return i},k6:function(){return o},vC:function(){return c},w5:function(){return s}});const i="csux_evt",r="csux_evt-",o=9e5,a=new Map([["BackgroundImageWC",864e5],["SuperNav",9e5]]),s=new Map([["BackgroundImageWC",12096e5],["SuperNav",12096e5]]),c={start_year:2023,start_month:1,start_day:31,end_year:2099,end_month:12,end_day:31}},34551:function(e,t,n){"use strict";n.d(t,{Q:function(){return p},Y:function(){return h}});var i=n(7476),r=n(21930),o=n(88826),a=n(76733),s=n(40762),c=n(31558),d=n(55524),l=n(54297),u=n(85663);class p{constructor(){(0,c.N)()&&(this.localstorage_get(null,i.J_l),(0,r.b1)().then((()=>{this.autoCleanup()})))}autoCleanup(){if(!(0,c.N)())return;if(!this.eventData)return;let e;for(e in this.eventData){const t=e;let n;for(n in this.eventData[t]){const e=n,i=this.eventData[t][e],r=(new Date).getTime();i.timestamp_EventStart+s.w5.get(t)<r&&delete this.eventData[t][e]}}this.localstorage_save(null)}dismissCreative(e,t,n,i){if((0,c.N)())if(e&&t&&n){for(const i in this.eventData[t][e].expiredCreatives)if(i===n)return;this.eventData[t][e].expiredCreatives.push(n),this.localstorage_save(e,i)}else{const r=`Missing data to save creative dismissal. Event ID: ${e}, Experience ID: ${t}, Creative ID: ${n}`;i?(0,o.H)(i,r):a.k.logError(r)}}getCMSContent(e,t,n,i){if(!e||!t||!n){const r=`Missing data to return current cms content. Event ID: ${e}, Experience ID: ${t}, Creative IDs: ${n}`;return i?(0,o.H)(i,r):a.k.logError(r),null}return this.eventData&&this.eventData[t]&&this.eventData[t][e]&&this.eventData[t][e].cmsData?this.eventData[t][e].cmsData:null}static getInstance(){return d.Gq.get("__eventLocalStorage__",(()=>new p))}async getCurrentCreativeId(e,t,n,i,r,s){if(!(0,c.N)())return null;if(!e||!t||!n){const i=`Missing data to return current creative. Event ID: ${e}, Experience ID: ${t}, Creative IDs: ${n}`;return s?(0,o.H)(s,i):a.k.logError(i),null}let d;if(!(this.eventData&&this.eventData[t]&&this.eventData[t][e]))return null;d=this.eventData[t][e].currentCreative;return await this.selectCreative(n,e,t,i,r,d,s)}localstorage_get(e,t){if((0,c.N)())try{this.eventData=(0,l.$o)().getObject(s.ds)}catch(n){t?(0,o.H)(t,`Get local storage operation failed for event - ${e}.`):a.k.logError(n)}}localstorage_save(e,t){if((0,c.N)())try{(0,l.$o)().setObject(s.ds,this.eventData)}catch(n){return void(t?(0,o.H)(t,`Save local storage operation failed for event - ${e}.`):a.k.logError(n))}}async selectCreative(e,t,n,i,r,d,l,p){if(!e||0===e.length)return null;if(i){const e=new Date,t=new Date(i.start_year,i.start_month-1,i.start_day);t.setDate(t.getDate()-1);const n=new Date(i.end_year,i.end_month-1,i.end_day);if(n.setDate(n.getDate()+1),!(t<=e&&e<=n))return null}const h=(0,u.isNullOrUndefined)(this.eventData&&this.eventData[n]&&this.eventData[n][t]&&this.eventData[n][t].timestamp_EventStart);if(!d&&h&&!r)return e[0];if(r){const i=(new Date).getTime(),d=this.eventData&&this.eventData[n]&&this.eventData[n][t]&&this.eventData[n][t].timestamp_EventLastUpdate?this.eventData[n][t].timestamp_EventLastUpdate:0;if(!(0,c.N)()||d+s.k6<i){const i=()=>fetch(r),s=i=>{switch(n){case"BackgroundImageWC":this.eventData[n][t]={cmsData:{attribution:i.headlines[0].subtitle,imageSource:i.headlines[1].title,imageHref:i.headlines[2].title,title:i.headlines[0].title},currentCreative:e[0],expiredCreatives:[],timestamp_EventLastUpdate:(new Date).getTime(),timestamp_EventStart:(new Date).getTime()},this.localstorage_save(t,l);break;case"SuperNav":this.eventData[n][t]={cmsData:{display:i.headlines[1].title,id:i.headlines[0].title,url:i.headlines[1].subtitle},currentCreative:e[0],expiredCreatives:[],timestamp_EventLastUpdate:(new Date).getTime(),timestamp_EventStart:(new Date).getTime()},this.localstorage_save(t,l)}};if(!(0,c.N)()){try{const e=await i(),t=await e.json();s(t)}catch(e){l?(0,o.H)(l,`Failed to call CMS data - ${n} - ${t}. url ${r}`,e):a.k.logError(e)}return e[0]}if(p){const t=p.href,n=p.innerText,i=p.id;return s({headlines:[{title:i},{title:n,subtitle:t}]}),e[0]}if(i().then((e=>{e.json().then((e=>{s(e)}))})).catch((e=>{l?(0,o.H)(l,`Failed to call CMS data - ${n} - ${t}. url ${r}`,e):a.k.logError(e)})),(0,u.isNullOrUndefined)(this.eventData&&this.eventData[n]&&this.eventData[n][t]&&this.eventData[n][t].cmsData))return null}}let g=-1;for(let t=0;t<e.length;t++)if(e[t]===d){g=t;break}if(-1===g)return g=0,this.eventData[n][t]={currentCreative:e[g],expiredCreatives:[],timestamp_EventLastUpdate:(new Date).getTime(),timestamp_EventStart:(new Date).getTime()},this.localstorage_save(t,l),e[g];const m=(new Date).getTime();if(this.eventData[n][t].timestamp_EventLastUpdate+s.Uq.get(n)<m&&!i){if(g<e.length-1){const i=e[g+1];return this.dismissCreative(t,n,d,l),this.eventData[n][t]={...this.eventData[n][t],currentCreative:i,timestamp_EventLastUpdate:m},this.localstorage_save(t,l),i}return this.dismissCreative(t,n,e[g],l),null}for(let i=0;i<this.eventData[n][t].expiredCreatives.length;i++)if(this.eventData[n][t].expiredCreatives[i]===e[g])return null;return e[g]}async shouldShowEvent(e,t,n,i,r,o,a){const s=(0,u.isNullOrUndefined)(this.eventData),c=this.eventData&&(0,u.isNullOrUndefined)(this.eventData[t]),d=this.eventData&&this.eventData[t]&&(0,u.isNullOrUndefined)(this.eventData[t][e]);if(s||c||d){s?(this.eventData={},this.eventData[t]={},this.eventData[t][e]={}):c&&(this.eventData[t]={},this.eventData[t][e]={});const d=await this.selectCreative(n,e,t,i,r,null,null,a);return!!d&&(this.eventData[t][e].currentCreative=d,this.localstorage_save(e,o),!0)}const l=this.eventData[t][e].currentCreative;return!!await this.selectCreative(n,e,t,i,r,l,o,a)}}const h=()=>{const e="__eventLocalStorage__";let t=d.Gq.get(e);return t||(t=new p,d.Gq.set(e,t)),t}},20089:function(e,t,n){"use strict";n.d(t,{Gg:function(){return s},St:function(){return d},WW:function(){return c},YN:function(){return l},tk:function(){return i}});var i,r=n(55524),o=n(52058);!function(e){e.actionMenuOpen="actionMenuOpen",e.addTopSite="addTopSite",e.coachmark="coachmark",e.dailyDiscovery="dailyDiscovery",e.editTopSite="editTopSite",e.editWelcomeGreeting="editWelcomeGreeting",e.hamburgerMenu="hamburgerMenu",e.imageSearch="imageSearch",e.locationMarkerCard="locationMarkerCard",e.mobileAppUpsell="mobileAppUpsell",e.msRewards="msRewards",e.museumCard="museumCard",e.navOverflow="navOverflow",e.notificationBell="notificationBell",e.pivot="pivot",e.search="search",e.searchHistoryMoreOptions="searchHistoryMoreOptions",e.settings="settings",e.signInControl="signInControl",e.toast="toast",e.topSiteOverflowPanel="topSiteOverflowPanel",e.voiceSearchWC="voiceSearchWC",e.waffle="waffle",e.recommendedSitesSetting="recommendedSitesSetting",e.newsHeadlineBelowSearchboxMoreOptions="newsHeadlineBelowSearchboxMoreOptions",e.weatherOneLinerActionMenu="weatherOneLinerActionMenu"}(i||(i={}));class a{constructor(){this.flyoutOpen=!1,this.openFlyouts=new Set,this.registeredCallbacks=[]}static getInstance(){return r.Gq.get("__FlyoutCoordinationInstance__",(()=>new a))}reportFlyoutOpen(e,t){t?this.openFlyouts.add(e):this.openFlyouts.delete(e),this.flyoutOpen=this.openFlyouts.size>0;for(const n of this.registeredCallbacks)n(e,t)}registerFlyoutListener(e){this.registeredCallbacks.push(e)}unregisterFlyoutListener(e){(0,o.Z)(this.registeredCallbacks,(t=>e===t))}isFlyoutOpen(){return this.flyoutOpen}}function s(e,t){return a.getInstance().reportFlyoutOpen(e,t)}function c(e){return a.getInstance().registerFlyoutListener(e)}function d(e){return a.getInstance().unregisterFlyoutListener(e)}function l(e){return a.getInstance().openFlyouts.has(e)}},42645:function(e,t,n){"use strict";n.d(t,{HB:function(){return y}});var i=n(92100),r=n(32810),o=n(21789),a=n(13334),s=n(31558),c=n(78672);const d="//assets.msn.com",l="//assets.msn.cn",u=e=>"localhost.msn.com"===e.split(":",1)[0];function p(e){if(/^\/[\w.-]+(\/[\w.-]+)*$/.test(e))return!(e.includes("/../")||e.includes("/./")||e.endsWith("/..")||e.endsWith("/."))}function h(e){return e&&!e.startsWith("/")?"/"+e:e}function g(e){return e.endsWith("/")?e:e+"/"}function m(e){return p(h(e))?(t=e).startsWith("/")?t.slice(1):t:null;var t}function f(e){return e?e.split("/")[0]:null}const v=(e,t,n)=>{const c=new URLSearchParams(e),v="true"===c.get("renderWidget"),y="true"===c.get("useDeployedBundles"),S=((e,t,n)=>{if(!t){if(n)return d;if(u(e))return`//${e}`}return o.jG.IsChinaCompliance?l:d})(t,v,y);if(c.has("entry")){const e=h(c.get("entry").split("/").slice(0,-1).join("/"));return S&&p(e)&&(u(t)||e.startsWith("/bundles"))?g(S+e):g(S)}if(S&&u(t)&&!y){if(!(0,s.N)()){return S+__WEBPACK_LOCAL_STATICS_PATH__}if(n)return S+n}else if(S){var C;const t=(e||"").substring(1),o=decodeURIComponent(t);let s;const c=i.c.getParamsWithItems(o).find((e=>"spalink"===e.key)),d=c&&c.value,l=a.Al.ClientSettings||{},u=null===(C=l.bundleInfo)||void 0===C?void 0:C.alias;if("true"===l.static_page&&u)s=f(u);else if(d)s=f(m(d));else{const e=new r.h(o).get("bundles");e?s=m(e):u&&(s=f(u))}if(n){const e=n.split("/");return e[4]=s||"latest",S+e.join("/")}}return n},y=()=>{n.p=v((0,c.zp)(),(0,c.zw)(),n.p)}},95153:function(e,t,n){"use strict";n.d(t,{DO:function(){return c},Nd:function(){return s},fH:function(){return a}});var i=n(21789),r=n(24478),o=n(32687);class a{constructor({params:e,qspPrefix:t,spec:n}={},i){this.requestData=new r.m4(n||o.j4,t||o.mx),e&&this.requestData.loadQueryParams(e),i&&(this.RequestId=i)}get requestId(){return this.RequestId||this.app.ActivityId}get app(){return i.jG}get data(){return this.requestData.data}}function s(e,t,n=!0){if("function"==typeof e){const t=e();if(t||0===t)return t}if(n)throw new Error("Expected "+t+" to return value. Possible invalid RequestContext spec used or the spec doesn't contain this data.")}function c(e){return s(e.data.locationHref,"locationHref",!1)}},10671:function(e,t,n){"use strict";n.d(t,{E:function(){return i}});const i={prod:"//img-s-msn-com.akamaized.net/tenant/amp/entityid/"}},71486:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var i,r=n(7124);const o=null===(i=n(13334).Al.CurrentFlightSet)||void 0===i?void 0:i.has("prg-scrolldbc"),a=50;function s(e,t=a,n=!0){return o?n?(0,r.Z)(e,t):(0,r.Z)(e,t,{leading:!0,trailing:!1}):e}},96329:function(e,t){"use strict";t.Z=function(e,...t){if(e){const n=/{([\d]+)}/g,i=[];let r=n.exec(e),o=0,a=0;for(;null!==r;)a=r.index,i.push(e.substring(o,a)),i.push(t[r[1]]),o=n.lastIndex,r=n.exec(e);return i.push(e.substring(o)),i}}},68310:function(e,t,n){"use strict";n.d(t,{b:function(){return s}});var i=n(23549),r=n(9498),o=n(30023),a=n(31558);async function s(e,t,s,c){if(!(0,a.N)())return;const d=await n.e("diagnostic-web-vitals").then(n.bind(n,40219));(0,r.lr)().then((()=>{const n=s?{timeToPageReveal:e[o.Y5],timeToPageVisible:e[o.U4]}:void 0;d.initDiagnosticsWebVitals((e=>{c?c({markers:e}):i.M0.sendLoadTimeEvent({markers:e}),Object.entries(e).forEach((([e,n])=>{t[e]=n}))}),e&&e[o.dd]||-1,n)}))}},7476:function(e,t,n){"use strict";n.d(t,{zzx:function(){return aS},bQI:function(){return oS},K_t:function(){return lS},j_y:function(){return dS},XcO:function(){return sS},Was:function(){return cS},vn7:function(){return uS},X4G:function(){return pS},etM:function(){return Ya},N1G:function(){return es},iVH:function(){return ei},oSM:function(){return Zd},rBK:function(){return Jd},etb:function(){return qd},ps7:function(){return zd},HuD:function(){return Gd},Q48:function(){return Vd},Evv:function(){return _n},EoX:function(){return Un},Eh0:function(){return Qn},d1d:function(){return Zn},NMS:function(){return $n},iJb:function(){return Gn},Es0:function(){return Vn},AWv:function(){return Kn},a4J:function(){return Wn},a2y:function(){return Aa},s51:function(){return $a},S2e:function(){return Na},_ig:function(){return Ca},hnc:function(){return wa},ZHI:function(){return Pa},CBH:function(){return Ia},LIN:function(){return Sa},N6m:function(){return Ma},yyJ:function(){return Ba},YSG:function(){return Ra},cL8:function(){return Da},gAu:function(){return ka},MRH:function(){return Ta},bUp:function(){return Ea},EhB:function(){return xa},EXN:function(){return Oa},Vsq:function(){return Fa},CPU:function(){return ba},FQ3:function(){return La},nab:function(){return cp},lr$:function(){return Qy},LeM:function(){return jy},qI3:function(){return Ky},sNr:function(){return ci},Y57:function(){return di},bvO:function(){return si},evM:function(){return ia},amS:function(){return _o},YHd:function(){return na},sNU:function(){return zo},gZU:function(){return ta},c$P:function(){return Wo},PAZ:function(){return Qo},npG:function(){return qo},u8h:function(){return Vo},Mef:function(){return Go},L8S:function(){return ra},G0e:function(){return Ho},FWA:function(){return oa},lz:function(){return jo},fvr:function(){return Yo},Bjk:function(){return Jo},ydI:function(){return ea},D1F:function(){return Xo},WB4:function(){return Zo},ja9:function(){return Ko},nrW:function(){return sa},FTS:function(){return aa},Zfy:function(){return Uf},cpH:function(){return Hf},HCR:function(){return Wf},Ia3:function(){return $f},Mw:function(){return _f},BfX:function(){return qf},Emt:function(){return Nf},m9g:function(){return On},yb9:function(){return am},qkz:function(){return Dm},IIV:function(){return Sm},LnJ:function(){return Cm},EuY:function(){return wm},Ibk:function(){return Im},hNw:function(){return km},qP4:function(){return xm},BFw:function(){return Em},SqC:function(){return bm},KY$:function(){return Lm},gjV:function(){return Am},LxB:function(){return Mm},DnN:function(){return Pm},tvG:function(){return Tm},B5f:function(){return dm},CgS:function(){return lm},LWq:function(){return pm},FtH:function(){return hm},N1Y:function(){return gm},$qz:function(){return um},FEC:function(){return ym},W91:function(){return vm},Cy3:function(){return zn},c$g:function(){return xg},$eW:function(){return vg},UDB:function(){return zf},Hrk:function(){return Gf},MW5:function(){return jf},CLx:function(){return eb},aB8:function(){return tb},a8F:function(){return Xn},Mo$:function(){return gT},jSE:function(){return V},A49:function(){return lu},hj1:function(){return mu},sqX:function(){return gu},gZr:function(){return hu},eqK:function(){return du},Eny:function(){return fu},X66:function(){return au},CBr:function(){return su},N4n:function(){return cu},odB:function(){return uu},a8G:function(){return pu},Z7:function(){return ae},G1z:function(){return re},na5:function(){return se},lM0:function(){return ce},yBI:function(){return de},Xqh:function(){return oe},Kbm:function(){return ie},M2l:function(){return Ay},L_o:function(){return Iy},eto:function(){return Zs},UpF:function(){return Qi},tfk:function(){return Xi},tSD:function(){return Zi},XFJ:function(){return Ji},SPE:function(){return $w},i0u:function(){return Dw},beD:function(){return Iw},Xpg:function(){return xw},x1P:function(){return Aw},oz3:function(){return _w},wyy:function(){return Cd},AWk:function(){return vd},Uf3:function(){return yd},nZQ:function(){return hd},kAq:function(){return ud},ODl:function(){return Sd},czP:function(){return fd},k2Y:function(){return wd},DJm:function(){return gd},T4Y:function(){return pd},xEV:function(){return md},PLs:function(){return Bw},aLD:function(){return qw},BOw:function(){return Mw},lCC:function(){return Ww},jNX:function(){return Uw},RZW:function(){return Nw},GOz:function(){return Hw},fZh:function(){return Vw},j7$:function(){return oT},ATu:function(){return aT},z48:function(){return rT},L_b:function(){return iT},oAH:function(){return Fw},Un$:function(){return Rw},vfM:function(){return Ew},XuA:function(){return Lw},i2m:function(){return Ow},_Gp:function(){return nk},Mqi:function(){return Bp},y7V:function(){return Np},Kp5:function(){return $p},Hvj:function(){return Up},uyV:function(){return _p},o25:function(){return cT},_7Q:function(){return vp},b2C:function(){return uT},Mn5:function(){return lT},jds:function(){return hT},CVs:function(){return pT},HPx:function(){return ik},hmY:function(){return tk},oTO:function(){return yf},qXP:function(){return ff},HKp:function(){return Sf},gEw:function(){return mf},B$y:function(){return vf},YVm:function(){return ab},Q$P:function(){return QT},vC9:function(){return ZT},g_R:function(){return JT},OyK:function(){return KT},h4Z:function(){return YT},$S3:function(){return XT},BW3:function(){return ek},SWs:function(){return ag},e1u:function(){return og},z98:function(){return fg},h6w:function(){return Si},Wct:function(){return yi},Zt_:function(){return Va},BMt:function(){return Oy},OAw:function(){return Ey},Tdm:function(){return xy},a0I:function(){return Ny},xeh:function(){return Fy},ht:function(){return Ly},rnG:function(){return Dy},tJi:function(){return By},PKn:function(){return Hy},P2p:function(){return Wy},ygS:function(){return $y},QzW:function(){return F},gX:function(){return he},iS2:function(){return ge},SBd:function(){return le},SEf:function(){return ue},gbr:function(){return pe},fU5:function(){return be},Vwf:function(){return Ce},lIV:function(){return we},sGX:function(){return ve},HFn:function(){return Se},FvO:function(){return ni},F0_:function(){return ii},Qsh:function(){return ai},if_:function(){return oi},EIi:function(){return ri},hMS:function(){return yg},TVf:function(){return _a},ZHJ:function(){return R},UGs:function(){return D},Lzl:function(){return rb},g8u:function(){return ob},MmB:function(){return Sr},eck:function(){return NT},h_:function(){return $T},YVg:function(){return gp},Sp0:function(){return We},ZZK:function(){return Yf},Ggm:function(){return Yt},lWE:function(){return Xt},MRy:function(){return sn},Jtn:function(){return en},Wzw:function(){return tn},y5G:function(){return cn},v7z:function(){return an},aF1:function(){return rn},u4m:function(){return nn},u6c:function(){return on},F1V:function(){return yT},hii:function(){return ST},X9Z:function(){return Mg},MD5:function(){return Gs},dTs:function(){return tr},huq:function(){return Ks},L90:function(){return zs},V3_:function(){return js},Cn7:function(){return Ts},xXe:function(){return OT},fDq:function(){return BT},GrI:function(){return ne},WXX:function(){return te},jWk:function(){return Wa},ifI:function(){return kg},f$k:function(){return wg},yB4:function(){return bg},ReU:function(){return Tg},I8d:function(){return Cg},bKC:function(){return Sg},IIT:function(){return qm},XD:function(){return f},J_l:function(){return mm},LXY:function(){return fm},fUc:function(){return TC},C35:function(){return kC},lE3:function(){return AC},KwY:function(){return IC},ZJy:function(){return EC},$n1:function(){return PC},OeS:function(){return G},Rln:function(){return xo},u4l:function(){return Mo},$8R:function(){return $o},fCp:function(){return Do},BHd:function(){return Ro},DWx:function(){return Bo},_bN:function(){return za},IrA:function(){return ja},OcW:function(){return Hm},f7W:function(){return yp},H5g:function(){return Et},Ez4:function(){return Ga},jzM:function(){return hp},ZSB:function(){return Yi},Zj1:function(){return er},kPC:function(){return yt},aKV:function(){return Pt},l35:function(){return St},aO:function(){return ut},Psw:function(){return jn},aFk:function(){return Dg},Ecq:function(){return mc},SNZ:function(){return nc},ITJ:function(){return rc},TyC:function(){return ic},rrV:function(){return Qh},vZx:function(){return Jh},YNO:function(){return Zh},m96:function(){return zh},jvv:function(){return Kh},W7q:function(){return jh},H_Z:function(){return uc},IWG:function(){return hc},rHL:function(){return pc},G9t:function(){return fc},Vak:function(){return gg},Jus:function(){return cc},O3:function(){return lc},M_5:function(){return dc},GeL:function(){return Ys},rbA:function(){return tc},nvX:function(){return ec},OFV:function(){return gc},O5R:function(){return oc},U:function(){return sc},Knl:function(){return ac},KzD:function(){return Tw},qjh:function(){return bw},jcj:function(){return Cw},tNY:function(){return ww},rNk:function(){return mp},tCQ:function(){return Tp},yRR:function(){return bp},EF$:function(){return Sp},GJW:function(){return fp},bH3:function(){return Cp},AaR:function(){return Su},tvO:function(){return yu},eb9:function(){return bu},tNl:function(){return Tu},bBT:function(){return ku},d6P:function(){return vu},yLQ:function(){return wu},Gjj:function(){return Cu},NNq:function(){return Iu},_GR:function(){return Pu},UjD:function(){return Au},$RK:function(){return Eu},wxO:function(){return vC},jA_:function(){return yC},neE:function(){return SC},dqy:function(){return CC},AVH:function(){return bC},ZIZ:function(){return wC},lHZ:function(){return fC},wBi:function(){return MC},aaS:function(){return LC},F0i:function(){return xC},tPj:function(){return mC},j3p:function(){return It},OjJ:function(){return Nd},Cfk:function(){return xn},Zmj:function(){return An},v73:function(){return En},rmC:function(){return Ln},I2B:function(){return Dn},vvT:function(){return Mn},ryt:function(){return Fn},K8d:function(){return Rn},IfP:function(){return gs},tkb:function(){return ps},OWM:function(){return hs},HpJ:function(){return up},lu7:function(){return Ci},ASE:function(){return wi},iWd:function(){return ep},h0:function(){return Yu},EYh:function(){return np},O1E:function(){return tp},qtV:function(){return sp},HNI:function(){return rp},ij8:function(){return op},r6p:function(){return ip},qbQ:function(){return ap},Z1Q:function(){return mS},nCk:function(){return hS},qut:function(){return gS},X3I:function(){return ak},JH9:function(){return xp},NFm:function(){return Ip},Z$l:function(){return Ap},$YQ:function(){return Ep},drd:function(){return z},_c7:function(){return j},sd_:function(){return K},ML7:function(){return tg},sHL:function(){return eg},yVj:function(){return kb},Oz9:function(){return tT},l8i:function(){return eT},R9p:function(){return nT},YJ7:function(){return lt},U4N:function(){return dt},fNQ:function(){return et},dxF:function(){return bt},aPD:function(){return kt},mXp:function(){return at},ABv:function(){return st},BnB:function(){return ct},SSg:function(){return ht},DE1:function(){return Je},udk:function(){return wt},yf9:function(){return Xe},qQi:function(){return ot},oxX:function(){return it},jCZ:function(){return nt},Q3G:function(){return Ze},QW8:function(){return Ke},wXh:function(){return Qe},sf4:function(){return Ye},T4K:function(){return rt},jns:function(){return tt},Gm$:function(){return Tt},lNW:function(){return ft},AIp:function(){return Yn},AvP:function(){return ye},MaG:function(){return q},TBk:function(){return Nn},CBf:function(){return Xa},f_s:function(){return Ja},RLb:function(){return Za},VkE:function(){return Rp},dSm:function(){return Fp},fzU:function(){return Op},jD$:function(){return ur},i8g:function(){return Yh},gzO:function(){return Mt},NGC:function(){return xt},KKn:function(){return Vs},hTy:function(){return kf},JGn:function(){return Tf},h2c:function(){return bb},agd:function(){return mb},JNv:function(){return gb},i05:function(){return mT},Xa2:function(){return vT},zm9:function(){return fT},hNX:function(){return Hp},c6N:function(){return tS},VzI:function(){return eS},KPf:function(){return Rm},Q0n:function(){return Fm},HbY:function(){return em},gqg:function(){return rm},_PV:function(){return Kg},$L2:function(){return Xg},jTi:function(){return Qg},j12:function(){return Jg},BY9:function(){return Wg},DH3:function(){return qg},wgD:function(){return om},qCY:function(){return Bg},sn3:function(){return Ng},_dv:function(){return _g},waU:function(){return Hg},oCM:function(){return Vg},xvO:function(){return Gg},Ur5:function(){return $g},Puo:function(){return Ug},J8c:function(){return Zg},xSe:function(){return zg},I78:function(){return nm},lsj:function(){return Yg},ymf:function(){return tm},Z3I:function(){return jg},sao:function(){return Fg},D5c:function(){return Og},Quo:function(){return im},f3z:function(){return pp},UX3:function(){return Ka},MWq:function(){return Ha},hq4:function(){return Pw},KDG:function(){return Mk},X1K:function(){return Ek},NsM:function(){return xk},CR1:function(){return sb},Oee:function(){return dn},jjQ:function(){return un},xz5:function(){return ln},is$:function(){return pn},lxu:function(){return hn},_qL:function(){return mn},t7r:function(){return gn},pa7:function(){return vn},FER:function(){return fn},Mc7:function(){return yn},XWd:function(){return wn},_nz:function(){return Cn},jSV:function(){return kn},qok:function(){return Pn},yL3:function(){return Tn},Z6e:function(){return In},nZ_:function(){return Sn},C$l:function(){return bn},XUn:function(){return bT},TnD:function(){return TT},gDO:function(){return CT},BCc:function(){return kT},e7R:function(){return pf},gsz:function(){return Km},hhW:function(){return cf},pf:function(){return tf},gvI:function(){return zm},i04:function(){return jm},I9d:function(){return df},Yr5:function(){return ef},ceH:function(){return hf},Kz0:function(){return Xm},O0V:function(){return Jm},PwI:function(){return Zm},pGg:function(){return Ym},H1V:function(){return of},RzE:function(){return rf},A9I:function(){return lf},tpK:function(){return Qm},ViJ:function(){return sf},Dzt:function(){return nf},QoC:function(){return uf},PUT:function(){return af},rQV:function(){return Ae},w5f:function(){return Ie},Zdq:function(){return kw},v8C:function(){return qn},yJ4:function(){return Jn},rEw:function(){return Hn},MnT:function(){return sC},xC8:function(){return iC},h5R:function(){return lC},Fyv:function(){return uC},Pq3:function(){return rC},Lux:function(){return cC},PwA:function(){return dC},rlX:function(){return oC},hi0:function(){return aC},a7b:function(){return zi},oQG:function(){return qy},WDJ:function(){return Gy},GF9:function(){return Ry},Iyk:function(){return Uy},_kh:function(){return _y},GZ7:function(){return zy},c_I:function(){return My},BlG:function(){return Vy},gEs:function(){return by},bAs:function(){return Te},apB:function(){return cr},Kuw:function(){return ir},eE5:function(){return rr},g52:function(){return or},gTq:function(){return ar},Ub$:function(){return sr},clq:function(){return lr},l0m:function(){return dr},Qc1:function(){return gf},Qv4:function(){return rw},k8J:function(){return Ql},ipV:function(){return rk},G5r:function(){return ok},T5b:function(){return Kl},pCD:function(){return jl},M6I:function(){return Rf},t1k:function(){return Ff},ubC:function(){return Lf},Mej:function(){return Df},l8W:function(){return Of},Gri:function(){return Ef},hd1:function(){return Bf},Erc:function(){return Mf},CiN:function(){return xf},VyK:function(){return Af},vHJ:function(){return Zw},ydb:function(){return Yw},ldR:function(){return Xw},ejn:function(){return Jw},QRr:function(){return Qw},dYp:function(){return Gw},gY$:function(){return Kw},JtN:function(){return zw},adY:function(){return jw},EDA:function(){return m},K73:function(){return ns},jj$:function(){return ts},wYn:function(){return eC},V3k:function(){return JS},Kpz:function(){return YS},FQj:function(){return nC},LoI:function(){return tC},gWj:function(){return XS},TTr:function(){return Es},WBP:function(){return xs},Me0:function(){return Is},MOe:function(){return As},QQk:function(){return ws},arc:function(){return bs},GYz:function(){return Wp},BlE:function(){return k},u45:function(){return I},yWd:function(){return E},XFR:function(){return A},US9:function(){return M},n82:function(){return T},p3y:function(){return P},pIg:function(){return x},ovB:function(){return L},gX7:function(){return ad},mjE:function(){return cd},SyQ:function(){return od},Abn:function(){return dd},qst:function(){return sd},GQD:function(){return fe},bid:function(){return me},IA3:function(){return Pe},CTH:function(){return X},VHu:function(){return ug},Llr:function(){return ee},IU$:function(){return yr},K$E:function(){return fa},PQq:function(){return Ki},z5u:function(){return _T},dE2:function(){return UT},OUV:function(){return hk},DEv:function(){return fk},UD5:function(){return pk},O4N:function(){return mk},ZfN:function(){return gk},QRq:function(){return uk},mFi:function(){return Bn},bfJ:function(){return jt},T16:function(){return Kt},A_P:function(){return Qt},GH8:function(){return Zt},EoU:function(){return Wt},AKH:function(){return qt},TXH:function(){return Vt},RwL:function(){return Ht},lrn:function(){return Jt},$2m:function(){return Gt},eEO:function(){return zt},MA5:function(){return Y},QCU:function(){return Db},HB9:function(){return Ob},OSS:function(){return Rb},ViC:function(){return Mb},VwB:function(){return Nb},ffw:function(){return Fb},sTd:function(){return Bb},X2x:function(){return Lb},me0:function(){return Yl},MFQ:function(){return Zl},nS9:function(){return Xl},Fe_:function(){return eu},Aps:function(){return Jl},$9$:function(){return tu},Hif:function(){return rs},sEv:function(){return as},vAF:function(){return is},vwD:function(){return os},GI7:function(){return fs},smA:function(){return ys},NKp:function(){return us},aay:function(){return ms},DxP:function(){return vs},bor:function(){return ls},HYO:function(){return cs},lFV:function(){return ss},Cab:function(){return ds},fDI:function(){return fb},MTg:function(){return vb},a7O:function(){return Uu},jet:function(){return _u},kGJ:function(){return Ru},yn8:function(){return Lu},qH0:function(){return Du},ynR:function(){return Gu},fGi:function(){return Fu},g$R:function(){return Nu},oxc:function(){return Ku},Xt4:function(){return Wu},sce:function(){return Ju},e_W:function(){return Hu},Qq4:function(){return Zu},UPy:function(){return qu},H5m:function(){return Xu},RmK:function(){return Bu},mHh:function(){return ju},vq2:function(){return $u},sKq:function(){return Qu},nlU:function(){return xu},VPx:function(){return Vu},DgT:function(){return Mu},$G7:function(){return Ou},Ioz:function(){return zu},H8e:function(){return Ct},Y9r:function(){return Vf},iqH:function(){return ib},fV1:function(){return Yr},AUI:function(){return Oo},EEV:function(){return Fo},zwp:function(){return Um},HWG:function(){return _m},_ni:function(){return gt},_5e:function(){return Jy},O0T:function(){return mt},fcE:function(){return Ss},M7L:function(){return Cs},KWF:function(){return pb},CTB:function(){return hb},ox:function(){return wh},SJe:function(){return kp},lub:function(){return Pp},od1:function(){return ji},GAh:function(){return Ot},dB7:function(){return Dt},Blh:function(){return Lt},nQj:function(){return Rt},SmR:function(){return Ft},NM6:function(){return zT},EY8:function(){return jT},zeR:function(){return nS},CqX:function(){return iS},tkv:function(){return wT},GB_:function(){return li},N1V:function(){return gi},CS7:function(){return vi},GLL:function(){return pi},Sp_:function(){return ui},A5T:function(){return fi},g_9:function(){return mi},rP7:function(){return hi},_8J:function(){return tv},de3:function(){return ev},bKp:function(){return Dp},dHA:function(){return Ab},oyE:function(){return Eb},zxc:function(){return xb},WYS:function(){return Ib},Yym:function(){return gC},Scz:function(){return hC},hJt:function(){return pC},hh6:function(){return sw},m8v:function(){return cw},$h:function(){return ow},oww:function(){return aw},cg9:function(){return Re},UHb:function(){return Le},bwz:function(){return Ee},r_t:function(){return xe},A31:function(){return Me},lZX:function(){return Fe},q6p:function(){return Ne},gr5:function(){return De},I2u:function(){return $e},P8E:function(){return Ue},ZKD:function(){return He},QUT:function(){return Be},Aeb:function(){return Oe},oPt:function(){return _e},O1e:function(){return Gm},_5V:function(){return Vm},paG:function(){return ti},Yg3:function(){return Xd},ItM:function(){return Dh},ViL:function(){return Lh},_I9:function(){return Mh},ZAB:function(){return ma},C3T:function(){return va},XDw:function(){return ga},pay:function(){return ca},VI5:function(){return da},v8K:function(){return ha},sFk:function(){return la},qbM:function(){return ua},O5q:function(){return pa},fLy:function(){return ya},Yon:function(){return cg},ILq:function(){return Yd},IgS:function(){return US},_tv:function(){return vt},N4g:function(){return Wi},DnH:function(){return Bi},Z1G:function(){return Ni},t5z:function(){return _i},hgm:function(){return Hi},Krs:function(){return $i},MMt:function(){return Ui},Y6E:function(){return bh},Q0t:function(){return Ah},dAd:function(){return Eh},RDJ:function(){return Th},zo9:function(){return xh},npe:function(){return Ih},Vm4:function(){return Ph},Nyv:function(){return kh},F14:function(){return Wb},IXH:function(){return Jb},Mr7:function(){return _b},uAr:function(){return Ub},rqK:function(){return Zb},cJZ:function(){return Qb},ePs:function(){return Kb},K1E:function(){return jb},RD7:function(){return Gb},npY:function(){return Vb},T93:function(){return qb},D7p:function(){return $b},Bi$:function(){return zb},Ins:function(){return Hb},a6r:function(){return hg},Fst:function(){return mg},sX$:function(){return ke},WQV:function(){return Mp},DKZ:function(){return Lp},G7x:function(){return lp},vp2:function(){return J},sMt:function(){return Q},FtB:function(){return Z},Hcr:function(){return Xh},xpu:function(){return HS},Z6W:function(){return zS},vn6:function(){return jS},uIr:function(){return qS},d7f:function(){return VS},LPj:function(){return WS},qAf:function(){return _S},Niu:function(){return QS},hEV:function(){return KS},LKs:function(){return ZS},ozy:function(){return rg},hFn:function(){return ng},GJQ:function(){return ig},fcH:function(){return ks},OxM:function(){return Ps},cJy:function(){return Di},Agr:function(){return Li},obn:function(){return Cb},AEH:function(){return Sb},IJ8:function(){return wb},WpB:function(){return Xf},plI:function(){return Ai},MpL:function(){return Ti},Ldg:function(){return bi},Nb$:function(){return Pi},sd7:function(){return ki},bd4:function(){return Ii},Zkl:function(){return lk},zGF:function(){return xi},C4I:function(){return Zf},rVt:function(){return Jf},BPe:function(){return Qf},Sky:function(){return Kf},ADY:function(){return Mi},x_Y:function(){return wk},mvZ:function(){return Sk},HRj:function(){return Ck},nYX:function(){return yk},ZsX:function(){return bk},QN2:function(){return Tk},_sk:function(){return vk},DR1:function(){return GS},E7H:function(){return kc},ToT:function(){return $c},Pdg:function(){return Vc},n$r:function(){return Gc},ic4:function(){return Tc},yRc:function(){return Wc},vHv:function(){return qc},xdR:function(){return _c},tLx:function(){return Oc},sWY:function(){return Kc},Fyn:function(){return Bc},tN1:function(){return Ec},aHf:function(){return Uc},daM:function(){return Ic},F7i:function(){return Nc},HPv:function(){return Rc},Ead:function(){return Mc},Ely:function(){return xc},jyo:function(){return Hc},pjz:function(){return Ac},XDS:function(){return Dc},rVI:function(){return Fc},nvG:function(){return Lc},Gnh:function(){return jc},j3Z:function(){return zc},See:function(){return Zc},QsR:function(){return Qc},xQV:function(){return bc},VWS:function(){return Pc},ZtP:function(){return Pg},WjS:function(){return yc},BXO:function(){return Xc},s22:function(){return Jc},h8f:function(){return vc},ZGw:function(){return Ge},lLp:function(){return je},BWz:function(){return Ve},Iki:function(){return ze},yWu:function(){return qe},KyA:function(){return Eg},_yq:function(){return Ig},lnl:function(){return Ag},Ef6:function(){return Sc},lg8:function(){return Cc},yE1:function(){return wc},$rl:function(){return RT},vHQ:function(){return LT},_dh:function(){return DT},sVY:function(){return FT},L9E:function(){return vl},Ms:function(){return Ol},JaT:function(){return Rl},Qc7:function(){return Bl},t0C:function(){return Ul},EWv:function(){return Nl},NvH:function(){return Pl},hnd:function(){return kl},oYh:function(){return Dl},HkJ:function(){return Al},l$l:function(){return Ll},eBj:function(){return Ml},bfG:function(){return El},U4S:function(){return $l},$mw:function(){return Fl},PTG:function(){return Il},uSd:function(){return xl},wAt:function(){return Tl},yOL:function(){return yl},tFh:function(){return Sl},zl4:function(){return ml},v3e:function(){return gl},QXe:function(){return Cl},TmC:function(){return fl},w9g:function(){return wl},RTd:function(){return bl},oiw:function(){return zl},HN$:function(){return _l},mkE:function(){return Hl},nIM:function(){return Vl},RD:function(){return ql},DWC:function(){return Gl},iNb:function(){return Wl},Huj:function(){return DC},dhI:function(){return zC},$eE:function(){return jC},W56:function(){return KC},HKi:function(){return $C},Nh3:function(){return UC},bV8:function(){return _C},hig:function(){return WC},bIr:function(){return HC},QQY:function(){return qC},rfm:function(){return GC},S8$:function(){return VC},_X1:function(){return NC},I4h:function(){return OC},jhV:function(){return BC},KWu:function(){return FC},Cm8:function(){return RC},nlN:function(){return dT},p0I:function(){return wy},i29:function(){return Ua},LRf:function(){return qa},fG_:function(){return Rg},K_X:function(){return ou},h5L:function(){return iu},yLG:function(){return nu},LO8:function(){return ru},XI8:function(){return Pr},EDN:function(){return Tb},xK1:function(){return sg},sJW:function(){return vy},f2c:function(){return Ev},Lfo:function(){return Av},dp6:function(){return my},NF_:function(){return iv},uW3:function(){return pv},U1E:function(){return ay},Dt$:function(){return mv},np9:function(){return $v},M6G:function(){return Hv},RaX:function(){return yv},MWw:function(){return Uv},ws9:function(){return ry},XbP:function(){return Pv},erD:function(){return Xy},hOL:function(){return Yv},rYN:function(){return ny},Akl:function(){return ty},R5h:function(){return Wv},EkS:function(){return qv},zVA:function(){return ey},FDi:function(){return Vv},Jmv:function(){return Dv},KJ$:function(){return Zv},md3:function(){return Qv},lCX:function(){return Mv},_yJ:function(){return zv},w0e:function(){return Gv},Kzw:function(){return Lv},tYD:function(){return dy},zYr:function(){return Kv},Ps3:function(){return jv},N1:function(){return Jv},uI4:function(){return Xv},E6y:function(){return cy},c2h:function(){return xv},sDN:function(){return hv},K0D:function(){return cv},AeD:function(){return sv},RGj:function(){return dv},jkn:function(){return lv},vpZ:function(){return Sv},CH5:function(){return Iv},vPg:function(){return Fv},G78:function(){return Ov},xPu:function(){return Bv},R0M:function(){return rv},Fid:function(){return ly},kkF:function(){return fy},O6X:function(){return fv},Ipv:function(){return kv},F4k:function(){return oy},gu7:function(){return Rv},AP6:function(){return Cv},RHM:function(){return Sy},Mcu:function(){return _v},K4A:function(){return bv},K$q:function(){return iy},XCT:function(){return wv},uJS:function(){return Tv},Ehx:function(){return nv},IHr:function(){return uy},lsA:function(){return py},UNp:function(){return ov},kyM:function(){return av},A4x:function(){return sy},iLP:function(){return vv},Z49:function(){return gy},WNm:function(){return gv},RtG:function(){return Nv},ddY:function(){return Py},Uq0:function(){return hy},ds2:function(){return uv},Vdp:function(){return If},kzg:function(){return rS},cZM:function(){return Qa},$Ej:function(){return Js},eQj:function(){return QC},MYh:function(){return iw},WJE:function(){return ZC},Oat:function(){return tw},WKi:function(){return nw},mBS:function(){return JC},qXI:function(){return XC},sFl:function(){return ew},STX:function(){return YC},a3w:function(){return Xs},Iye:function(){return Xb},E4i:function(){return Yb},Yfz:function(){return Nh},wD3:function(){return Fh},ecn:function(){return Rh},hAd:function(){return Oh},F_w:function(){return $h},sgf:function(){return Bh},dR$:function(){return Wh},Nrs:function(){return _h},$N1:function(){return Uh},U85:function(){return Gh},UCw:function(){return qh},IHw:function(){return Vh},Fi:function(){return Hh},RJh:function(){return sT},OF8:function(){return C},xKE:function(){return S},bhC:function(){return dw},$Mx:function(){return uw},V5U:function(){return lw},lqy:function(){return y},pqC:function(){return v},A$C:function(){return b},VKG:function(){return w},KdJ:function(){return Om},vlt:function(){return qi},pL3:function(){return Vi},pHN:function(){return Gi},fDR:function(){return Zy},A9S:function(){return At},Php:function(){return pt},c7c:function(){return Id},S5R:function(){return xd},ujK:function(){return _d},m_L:function(){return Md},Y2u:function(){return Ld},chk:function(){return Rd},J5c:function(){return Td},q$m:function(){return kd},q4q:function(){return Ed},PFH:function(){return $d},H79:function(){return Hd},lou:function(){return Wd},Nol:function(){return Dd},IE6:function(){return Ud},MBw:function(){return kk},Wvf:function(){return Ak},_HO:function(){return Ik},gRR:function(){return Pk},KzX:function(){return Pd},$AQ:function(){return bd},bdf:function(){return Ad},om$:function(){return Bd},GKo:function(){return Od},wke:function(){return Fd},fdv:function(){return Nm},vYO:function(){return Bm},cXq:function(){return fS},c$4:function(){return FS},QYr:function(){return RS},wop:function(){return OS},Kdh:function(){return PS},Pc$:function(){return kS},xPl:function(){return yS},LCb:function(){return xS},R9m:function(){return vS},v2K:function(){return AS},oHd:function(){return wS},EuH:function(){return MS},sTM:function(){return $S},oy8:function(){return TS},Wtq:function(){return SS},rHl:function(){return BS},cNQ:function(){return ES},jGO:function(){return bS},R4R:function(){return IS},UKl:function(){return NS},k6j:function(){return LS},M4n:function(){return CS},EIL:function(){return DS},COO:function(){return $m},dhV:function(){return Bt},p_L:function(){return lb},eUy:function(){return ub},m8X:function(){return db},wMp:function(){return _t},QWk:function(){return $t},yHB:function(){return Ut},vo0:function(){return Yy},Bis:function(){return MT},yJi:function(){return xT},$oH:function(){return ET},qS2:function(){return PT},Ay$:function(){return wp},OC2:function(){return AT},w5E:function(){return IT},THd:function(){return Qs},hxo:function(){return wf},PMq:function(){return Cf},srQ:function(){return Yc},dw4:function(){return cb},WiH:function(){return bf},c4Q:function(){return Kd},EOu:function(){return Qd},SpS:function(){return jd},Hx8:function(){return Pf},eEQ:function(){return sm},ybt:function(){return cm},h1Z:function(){return Pb},CCx:function(){return ul},KX1:function(){return rl},h58:function(){return hl},lyH:function(){return nl},BNX:function(){return tl},stP:function(){return al},ZLh:function(){return il},YYA:function(){return ol},n_f:function(){return cl},jWK:function(){return pl},xTX:function(){return el},UWM:function(){return sl},SCD:function(){return dl},ox2:function(){return ll},yaB:function(){return Nt},FsZ:function(){return ld},LwW:function(){return fr},Nxj:function(){return vr},zis:function(){return Cr},Sf4:function(){return ck},tVV:function(){return sk},mOg:function(){return dk},lxm:function(){return Cy},wtK:function(){return ky},kCY:function(){return Ty},My6:function(){return yy},xuo:function(){return Lg},H4x:function(){return W},hT$:function(){return Lr},vQw:function(){return VT},E9T:function(){return GT},TNq:function(){return qT},RPe:function(){return qr},WCL:function(){return Or},b1D:function(){return Tr},ruE:function(){return _r},f7t:function(){return Hr},sq0:function(){return lg},dlb:function(){return xr},gJK:function(){return zr},Xb$:function(){return kr},JIJ:function(){return wr},ZX_:function(){return HT},syw:function(){return WT},_Y2:function(){return _},OPi:function(){return B},s$v:function(){return Fr},A0i:function(){return Er},S6L:function(){return Dr},kgv:function(){return Vr},sCZ:function(){return Gr},TyD:function(){return Wr},_Rg:function(){return Rr},nTL:function(){return U},G1Z:function(){return $},_lB:function(){return N},AYT:function(){return H},DyR:function(){return br},ib1:function(){return pg},XM_:function(){return $r},z$F:function(){return O},pBE:function(){return jr},zEz:function(){return Ar},kKw:function(){return Ir},jUm:function(){return Ur},zpf:function(){return Mr},qq_:function(){return Nr},OLe:function(){return Br},ZI3:function(){return pr},ckW:function(){return mr},s7S:function(){return gr},Z3R:function(){return hr},FLG:function(){return dg},F$$:function(){return Wm},dVt:function(){return dp},K7e:function(){return Lo},oo_:function(){return nb},U7j:function(){return nd},IVG:function(){return td},cM_:function(){return rd},mfB:function(){return ed},kiM:function(){return id},Q3R:function(){return Ao},j0J:function(){return wo},Kdk:function(){return mo},uBh:function(){return Io},m3w:function(){return ko},OrY:function(){return Co},sg4:function(){return yo},B0A:function(){return Po},I9w:function(){return No},nDr:function(){return vo},Uqx:function(){return To},Ijl:function(){return bo},Vl:function(){return So},e8l:function(){return fo},nFE:function(){return Eo},nnD:function(){return po},IX6:function(){return Oi},Zsh:function(){return Fi},B70:function(){return Jr},pzZ:function(){return Qr},v1x:function(){return Zr},nWA:function(){return to},dZj:function(){return go},YlS:function(){return Kr},NYk:function(){return no},uIb:function(){return oo},cFY:function(){return Xr},fSk:function(){return ho},G0I:function(){return so},sep:function(){return co},u$0:function(){return lo},HH2:function(){return ro},Ef_:function(){return yb},LP$:function(){return eo},YhM:function(){return io},uth:function(){return uo},M3l:function(){return ao},tQ2:function(){return Uo},Rgo:function(){return mh},Smg:function(){return gh},W1B:function(){return vh},jQb:function(){return hh},QJe:function(){return ch},CDI:function(){return ah},eD0:function(){return Vp},y6M:function(){return fh},KEP:function(){return qp},YLV:function(){return uh},VPR:function(){return Yp},LLm:function(){return eh},vCG:function(){return zp},V_e:function(){return th},ck_:function(){return sh},iB1:function(){return oh},vxy:function(){return nh},YVN:function(){return yh},jAy:function(){return Gp},vif:function(){return Sh},a$Z:function(){return ph},v5s:function(){return Ch},RSD:function(){return jp},bri:function(){return Zp},e88:function(){return Xp},TRT:function(){return dh},TzH:function(){return lh},Fh_:function(){return ih},hqX:function(){return rh},vas:function(){return Qp},azB:function(){return Jp},MUC:function(){return Kp},$HJ:function(){return _s},Od5:function(){return Ms},lG7:function(){return qs},yPw:function(){return Ws},pOl:function(){return Ls},lGs:function(){return Us},OnJ:function(){return Ns},X1V:function(){return Fs},rUV:function(){return $s},k28:function(){return Hs},_wC:function(){return Bs},OE6:function(){return Os},nsS:function(){return Ds},uSS:function(){return Rs},oq6:function(){return nr},mnt:function(){return p},EYX:function(){return yw},huY:function(){return hw},hy5:function(){return pw},VEM:function(){return Sw},NNy:function(){return fw},rey:function(){return vw},czH:function(){return gw},uzv:function(){return mw},GQ:function(){return u}});var i=n(63927),r=n(32671);const o=i.z.Alert,a=i.z.NoAlert,s=i.z.HighImpact,c=i.z.Critical,d=r.C.Fallback,l=(r.C.Exceptional,{build:""});function u(e){Object.assign(l,e)}function p(){return l}function h(e,t=i.z.Alert,n,r,o){const a={id:e,severity:t,pb:void 0===n?l:n};return void 0!==r&&(a.message=r),void 0!==o&&(a.source=o),a}function g(e,t){return{build:"",userImpacting:e,errorBehavior:t}}const m=h(1399,a),f=h(1405,a),v=h(8017,a),y=h(8018,a),S=h(8021,a),C=h(8022),w=h(8027,a),b=h(8028),T=h(8029),k=h(8030),P=h(8031),I=h(8032,s),A=h(8033,s),E=h(8034),x=h(8035),M=h(8036),L=h(8037),D=h(8038),R=h(8039),F=h(8047),O=h(8100,s,g(!0)),B=h(8101,a),N=h(8102,a),$=h(8103,o,g(!0)),U=h(8104,o,g(!0)),_=h(8105,a),H=h(8107,a),W=h(8109,a),q=h(8183),V=h(8184),G=h(8185),z=h(8186),j=h(8187),K=h(8189),Q=h(8190),Z=h(8191),J=h(8192),X=h(8203),Y=h(8230),ee=h(8291,a),te=h(8380),ne=h(8381),ie=h(8601),re=h(8602),oe=h(8603),ae=h(8604),se=h(8605),ce=h(8606),de=h(8607),le=h(8810,s),ue=h(8811,s),pe=h(8812,s),he=h(8813,s),ge=h(8814,s),me=h(8815,c,l,"Cookie Banner Element is missing"),fe=h(8816,a,l,"Cookie Banner data-client-settings is invalid"),ve=h(8841,s),ye=h(8842,c),Se=h(8843),Ce=h(8844),we=h(8845,c),be=h(8846,c),Te=h(8847),ke=h(8848,s),Pe={LoadExperienceError:h(8941)},Ie=h(9408),Ae=h(9409),Ee=h(9425),xe=h(9426),Me=h(9427),Le=h(9428),De=h(9429),Re=h(9430),Fe=h(9431),Oe=h(9432),Be=h(9433),Ne=h(9434),$e=h(9435),Ue=h(9436),_e=h(9437),He=h(9439),We=h(11103),qe=h(12300,a),Ve=h(12301,a),Ge=h(12302,a),ze=h(12303,a),je=h(12304),Ke=h(13e3),Qe=h(13001),Ze=h(13100),Je=h(13101),Xe=h(13102),Ye=h(13103),et=h(13104),tt=h(13105),nt=h(13108),it=h(13114),rt=h(13115),ot=h(13116),at=h(13117),st=h(13119),ct=h(13120),dt=h(13121),lt=h(13122,s),ut=h(13125),pt=h(13126),ht=h(13127),gt=h(13128),mt=h(13129),ft=h(13131),vt=h(13132),yt=h(13133),St=h(13134),Ct=h(13135),wt=h(13136),bt=h(13137),Tt=h(13138),kt=h(13140),Pt=h(13141),It=h(13142),At=h(13143,a),Et=h(13144),xt=h(14007),Mt=h(14102),Lt=h(15200,a),Dt=h(15201,a),Rt=h(15202,a),Ft=h(15204,a),Ot=h(15205),Bt=h(15250),Nt=h(15303),$t=h(15410),Ut=h(15411),_t=h(15412,a),Ht=h(18100),Wt=h(18103),qt=h(18104),Vt=h(18105),Gt=h(18106),zt=h(18107),jt=h(18108),Kt=h(18109),Qt=h(18110),Zt=h(18111),Jt=h(18113),Xt=h(19e3),Yt=h(19001),en=h(19004,c,g(!0)),tn=h(19006),nn=h(19010),rn=h(19013),on=h(19014),an=h(19016,a),sn=h(19019),cn=h(19021,a),dn=h(20007,a),ln=h(20008),un=h(20009),pn=h(20018),hn=h(20066),gn=h(20068),mn=(i.z.NoAlert,h(20074)),fn=h(20075),vn=h(20076),yn=h(20078),Sn=h(20079),Cn=h(20080),wn=h(20081),bn=h(20082,a),Tn=h(20083),kn=h(20084),Pn=h(20085),In=h(20086),An=h(20150),En=h(20151),xn=h(20152),Mn=h(20153),Ln=h(20154),Dn=h(20155),Rn=h(20156),Fn=h(20157),On=h(20158),Bn=h(20159),Nn=h(20162,s),$n=h(20171),Un=h(20172),_n=h(20173),Hn=h(20174),Wn=h(20175),qn=h(20176),Vn=h(20177),Gn=h(20178),zn=h(20179),jn=h(20180),Kn=h(20181),Qn=h(20182),Zn=h(20184),Jn=h(20186),Xn=h(20188),Yn=h(20189),ei=h(20190,a),ti=h(20191,a),ni=h(20203),ii=h(20204,a),ri=h(20205,a),oi=h(20209,a,l,"Service request failed"),ai=h(20210,a,l,"1S request (assets.msn.*) failed. Retrying using backup domain (assets2.msn.*)"),si=h(20302),ci=h(20303),di=h(20304),li=h(22012),ui=h(22014,c,g(!0)),pi=h(22019),hi=h(22020),gi=h(22022,a),mi=h(22023,a),fi=h(22024,a),vi=h(22025,a),yi=h(22027),Si=h(22028),Ci=h(22029,c),wi=h(22030,c),bi=(i.z.NoAlert,h(24520)),Ti=h(24521),ki=h(24522),Pi=h(24523),Ii=h(24524),Ai=h(24526),Ei="shopping-page-content/ShoppingPageContentClient/Live.ts",xi=h(24563,o,l,void 0,Ei),Mi=h(24571),Li=h(24573),Di=h(24574),Ri="WindowsShellAccountManager.connector.ts",Fi=h(24580,a,l,void 0,Ri),Oi=h(24583,o,l,void 0,Ri),Bi=h(24601),Ni=h(24602),$i=h(24603),Ui=h(24604),_i=h(24606),Hi=h(24607),Wi=h(24608),qi=h(24611),Vi=h(24612),Gi=h(24613),zi=h(24660,c),ji=h(24700),Ki=h(24800),Qi=h(28100,a),Zi=h(28101),Ji=h(28102),Xi=h(28103),Yi=h(28213,a),er=h(28215),tr=h(28216),nr=h(28217),ir=h(28401,a),rr=h(28410),or=h(28411,a),ar=h(28414),sr=h(28415),cr=h(28416),dr=h(28420),lr=h(28421),ur=h(28500),pr=h(29e3),hr=h(29001),gr=h(29002,a),mr=h(29003),fr=h(29100),vr=h(29101),yr=h(29102),Sr=h(29103),Cr=h(29104,a),wr=h(29503,a),br=h(29507,o,g(!0)),Tr=h(29508,o,g(!0)),kr=h(29522,o,g(!0)),Pr=h(29526,o,g(!0)),Ir=h(29530,a),Ar=h(29532,a,g(!1)),Er=h(29533,o,g(!0)),xr=h(29534,a,g(!1)),Mr=h(29535,s,g(!0)),Lr=h(29541,a,g(!1)),Dr=h(29543,o,g(!0)),Rr=h(29544,a,g(!0)),Fr=h(29545,s,g(!0)),Or=h(29547,o,g(!0)),Br=h(29557,o,g(!0)),Nr=h(29566,a,g(!1)),$r=h(29567,a,g(!1,d)),Ur=h(29569,o,g(!0)),_r=h(29580,s,g(!0)),Hr=h(29582,o,g(!0)),Wr=h(29585,a,g(!1)),qr=h(29586,o,g(!0)),Vr=h(29590,a,g(!0)),Gr=h(29591,a,g(!0)),zr=h(29593,a,g(!1)),jr=h(29599,a,g(!0)),Kr=h(29603),Qr=h(29604),Zr=h(29605),Jr=h(29606,a),Xr=h(29608,a),Yr=h(29625,a),eo=h(29690),to=h(29716),no=h(29719),io=h(29729,a),ro=h(29730),oo=h(29734,a),ao=h(29744,a),so=h(29751),co=h(29752),lo=h(29753),uo=h(29754),po=h(29756,a),ho=h(29757),go=h(29758),mo=h(29854),fo=h(29855),vo=h(29856),yo=h(29857),So=h(29858),Co=h(29859),wo=h(29860),bo=h(29861),To=h(29862),ko=h(29863),Po=h(29864),Io=h(29865),Ao=h(29866),Eo=h(29867),xo=h(29901),Mo=h(29903),Lo=h(29910),Do=h(29923),Ro=h(29924),Fo=h(29960),Oo=h(29961),Bo=h(29971),No=h(29972),$o=h(29977),Uo=h(29980),_o=h(33e3,a),Ho=h(33012),Wo=h(33013,a),qo=h(33014),Vo=h(33015,a),Go=h(33016,a),zo=h(33017,a),jo=h(33018,a),Ko=h(33020),Qo=h(33021),Zo=h(33100),Jo=h(33102),Xo=h(33103),Yo=h(33105),ea=h(33110),ta=h(33113,a),na=h(33130,c,g(!0)),ia=h(33140),ra=h(33151),oa=h(33152),aa=h(33160,c,g(!0)),sa=h(33161,c,g(!0)),ca=h(34005,a),da=h(34009,a),la=h(34013,a),ua=h(34014,s),pa=h(34015,s),ha=h(34016,a),ga=h(34022,s),ma=h(34024),fa=h(34025,a),va=h(34027),ya=h(34028,a),Sa=h(35001),Ca=h(35003,a),wa=h(35004),ba=h(35006),Ta=h(35007),ka=h(35008),Pa=h(35009),Ia=h(35010),Aa=h(35013,a),Ea=h(35014),xa=h(35015),Ma=h(35016),La=h(35018),Da=h(35019),Ra=h(35020),Fa=h(35022,a),Oa=h(35023),Ba=h(35024,a),Na=h(35025,a),$a=h(35026),Ua=h(35117),_a=h(35118),Ha=h(35119,a),Wa=h(35120),qa=h(35121),Va=h(35122),Ga=h(35123),za=h(35124),ja=h(35128),Ka=h(35129,a),Qa=h(35130),Za=h(35131),Ja=h(35132),Xa=h(35133),Ya=h(35201),es=h(35203,a),ts=h(35401,a),ns=h(35402),is=h(35600,a),rs=h(35601,a),os=h(35602,a),as=h(35603,a),ss=h(35604,a),cs=h(35605,a),ds=h(35606,a),ls=h(35607,a),us=h(35608,a),ps=h(35609,a),hs=h(35610,a),gs=h(35611,a),ms=h(35613,a),fs=h(35614,a),vs=h(35615,a),ys=h(35616,a),Ss=h(35700),Cs=h(35701),ws=h(36105),bs=h(36106),Ts=h(36107),ks=h(36108),Ps=h(36109,a),Is=h(36111),As=h(36113),Es=h(36121,a),xs=h(36122),Ms=h(36300),Ls=h(36302),Ds=h(36309),Rs=h(36311),Fs=h(36313),Os=h(36314,a),Bs=h(36315),Ns=h(36317,a),$s=h(36319,a),Us=h(36320,a),_s=h(36321),Hs=h(36322),Ws=h(36323,a),qs=h(36324,a),Vs=h(36500),Gs=h(36600),zs=h(36601),js=h(36602),Ks=h(36603),Qs=h(36604),Zs=h(36605),Js=h(36606),Xs=h(36607),Ys=h(36904),ec=h(36905),tc=h(36906),nc=h(36908),ic=h(36909),rc=h(36910),oc=h(36911),ac=h(36912),sc=h(36913),cc=h(36917),dc=h(36918),lc=h(36919),uc=h(36920),pc=h(36921),hc=h(36922),gc=h(36936),mc=h(36962,c,g(!0)),fc=h(36991,o,g(!1)),vc=h(37001),yc=h(37002),Sc=h(37011,o,g(!0)),Cc=h(37012,o,g(!0)),wc=h(37013,o,g(!0)),bc=h(37020),Tc=h(37021),kc=h(37022),Pc=h(37023),Ic=h(37024),Ac=h(37025),Ec=h(37026),xc=h(37028),Mc=h(37029),Lc=h(37030),Dc=h(37031),Rc=h(37032),Fc=h(37033),Oc=h(37035),Bc=h(37036),Nc=h(37037),$c=h(37038),Uc=h(37039),_c=h(37040),Hc=h(37041),Wc=h(37042),qc=h(37043),Vc=h(37044),Gc=h(37045),zc=h(37046),jc=h(37047),Kc=h(37048),Qc=h(37049),Zc=h(37050),Jc=h(37074),Xc=h(37075),Yc=h(37300,a),ed=h(37550),td=h(37551),nd=h(37552),id=h(37553),rd=h(37554,a),od=h(37560),ad=h(37561),sd=h(37562),cd=h(37563),dd=h(37566),ld=h(37568),ud=h(37571,o,g(!0)),pd=h(37573,o,g(!0)),hd=h(37576),gd=h(37577,o,g(!0)),md=h(37578,a),fd=h(37579),vd=h(37580),yd=h(37581),Sd=h(37582),Cd=h(37583,a),wd=h(37584),bd=h(37601),Td=h(37604),kd=h(37605),Pd=h(37609),Id=h(37610),Ad=h(37611),Ed=h(37612,o,g(!0)),xd=h(37613),Md=h(37614),Ld=h(37629),Dd=h(37631),Rd=h(37632),Fd=h(37634,a),Od=h(37635,a),Bd=h(37636,a),Nd=h(37637),$d=h(37638),Ud=h(37639),_d=h(37640),Hd=h(37641),Wd=h(37642),qd=h(38e3),Vd=h(38001,a),Gd=h(38002,a),zd=h(38003,a),jd=h(38005),Kd=h(38006,a),Qd=h(38007,a),Zd=h(38008,a),Jd=h(38009,a),Xd=h(38046,c),Yd=h(38055),el=h(38101),tl=h(38104),nl=h(38105),il=h(38112),rl=h(38116),ol=h(38117),al=h(38118),sl=h(38119,a),cl=h(38120),dl=h(38124,a),ll=h(38125),ul=h(38127),pl=h(38128,a),hl=h(38129),gl=h(38300,s,g(!0)),ml=h(38301,s,g(!0)),fl=h(38302),vl=h(38303),yl=h(38304),Sl=h(38305),Cl=h(38306),wl=h(38307),bl=h(38318),Tl=h(38319,s,g(!0)),kl=h(38320),Pl=h(38321,s,g(!0)),Il=h(38322,s,g(!0)),Al=h(38323),El=h(38324),xl=h(38325),Ml=h(38327,s),Ll=h(38328),Dl=h(38329),Rl=h(38331,s,g(!0)),Fl=h(38342),Ol=h(38344),Bl=h(38345),Nl=h(38346),$l=h(38347),Ul=h(38348),_l=h(38360),Hl=h(38362),Wl=h(38363),ql=h(38364),Vl=h(38365,c),Gl=h(38366),zl=h(38367),jl=h(38600),Kl=h(38601),Ql=h(38602),Zl=h(38603),Jl=h(38604),Xl=h(38605),Yl=h(38606),eu=h(38607,a),tu=h(38608,a),nu=h(38800),iu=h(38801),ru=h(38802),ou=h(38803),au=h(38903),su=h(38904),cu=h(38905),du=h(38906),lu=h(38907),uu=h(38908),pu=h(38909),hu=h(38910),gu=h(38911),mu=h(38912),fu=h(38913),vu=h(39e3),yu=h(39001),Su=h(39002),Cu=h(39003),wu=h(39005),bu=h(39006),Tu=h(39007),ku=h(39008),Pu=h(39009),Iu=h(39010),Au=h(39011),Eu=h(39012),xu=h(39200),Mu=h(39201),Lu=h(39202),Du=h(39203),Ru=h(39204),Fu=h(39205),Ou=h(39206),Bu=h(39207),Nu=h(39208),$u=h(39209),Uu=h(39210),_u=h(39211),Hu=h(39212),Wu=h(39213),qu=h(39214),Vu=h(39215,a),Gu=h(39216,a),zu=h(39217,a),ju=h(39218),Ku=h(39219),Qu=h(39220),Zu=h(39221),Ju=h(39222),Xu=h(39223),Yu=h(39230),ep=h(39231),tp=h(39232),np=h(39233),ip=h(39234,a),rp=h(39235,a),op=h(39236),ap=h(39237,a),sp=h(39238,a),cp=h(39300),dp=h(39400),lp=h(39500),up=h(39501),pp=h(39502),hp=h(39508),gp=h(39509),mp=h(39510),fp=h(39511),vp=h(39512),yp=h(39513),Sp=h(39514),Cp=h(39515),wp=h(39517),bp=h(39518),Tp=h(39519),kp=h(39520),Pp=h(39521),Ip=h(39600),Ap=h(39601),Ep=h(39602),xp=h(39603),Mp=h(39700),Lp=h(39701),Dp=h(39708,a),Rp=h(39712),Fp=h(39713,a),Op=h(39714),Bp=h(39715),Np=h(39716,a),$p=h(39717),Up=h(39718),_p=h(39719),Hp=h(39720),Wp=h(39901),qp=h(40301,s),Vp=h(40302,s),Gp=h(40303,a),zp=h(40304,s),jp=h(40308),Kp=h(40310,a),Qp=h(40312,s),Zp=h(40313,s),Jp=h(40314),Xp=h(40315),Yp=h(40318),eh=h(40319),th=h(40320),nh=h(40321,a),ih=h(40322,s),rh=h(40323,s),oh=h(40324,a),ah=h(40325,a),sh=h(40326,s),ch=h(40327,s),dh=h(40328,a),lh=h(40329,a),uh=h(40331),ph=h(40332),hh=h(40333,a),gh=h(40334,a),mh=h(40335,a),fh=h(40336,s),vh=h(40337,s),yh=h(40338,a),Sh=h(40339,a),Ch=h(40340,a),wh=h(40520,a),bh=h(40600,a),Th=h(40601,a),kh=h(40604),Ph=h(40605),Ih=h(40606),Ah=h(40607),Eh=h(40608),xh=h(40609),Mh=h(40700),Lh=h(40701),Dh=h(40702),Rh=h(41e3),Fh=h(41001),Oh=h(41002),Bh=h(41003),Nh=h(41005),$h=h(41006),Uh=h(41007),_h=h(41009),Hh=h(41010,a),Wh=h(41011,a),qh=h(41012,a),Vh=h(41013,a),Gh=h(41014),zh=h(41216),jh=h(41217),Kh=h(41218),Qh=h(41224),Zh=h(41225),Jh=h(41226),Xh=h(41271,c),Yh=h(41350),eg=h(41402),tg=h(41405),ng=h(41415),ig=h(41416),rg=h(41417,a),og=h(41420),ag=h(41421),sg=h(41611),cg=h(41900),dg=h(42601),lg=h(42602),ug=h(42603),pg=h(42604),hg=h(43e3),gg=h(43011),mg=h(43012,a),fg=h(43310),vg=h(43500),yg=h(43511),Sg=h(43600),Cg=h(43601),wg=h(43602),bg=h(43603,a),Tg=h(43604,c),kg=h(43605),Pg=h(43854),Ig=h(43968),Ag=h(43970),Eg=h(43985),xg=h(44e3),Mg=h(44003),Lg=h(44200),Dg=h(44201,c),Rg=h(44300),Fg=h(44500),Og=h(44501,a),Bg=h(44502),Ng=h(44503,a),$g=h(44504),Ug=h(44505,a),_g=h(44506),Hg=h(44507,a),Wg=h(44508),qg=h(44509,a),Vg=h(44510),Gg=h(44511,a),zg=h(44512),jg=h(44513),Kg=h(44514,a),Qg=h(44515),Zg=h(44516),Jg=h(44517),Xg=h(44518,a),Yg=h(44519),em=h(44520),tm=h(44521),nm=h(44522),im=h(44523,a),rm=h(44524,a),om=h(44525,a),am=h(44700),sm=h(44701),cm=h(44702),dm=h(44703),lm=h(44704),um=h(44705),pm=h(44706),hm=h(44707),gm=h(44708),mm=h(44709),fm=h(44710),vm=h(44711),ym=h(44712),Sm=h(44720),Cm=h(44721),wm=h(44722),bm=h(44724),Tm=h(44725),km=h(44726),Pm=h(44727,a),Im=h(44728,a),Am=h(44729,a),Em=h(44730,a),xm=h(44731,a),Mm=h(44732,a),Lm=h(44733,a),Dm=h(44734,a),Rm=h(44750),Fm=h(44752),Om=h(44900,a),Bm=h(45700),Nm=h(72001),$m=h(45706,o,g(!0)),Um=h(46e3),_m=h(46001),Hm=h(46216,c),Wm=h(46222,c),qm=h(47101),Vm=h(47701),Gm=h(47702),zm=h(50001),jm=h(50005),Km=h(50008),Qm=h(50009),Zm=h(50011,c),Jm=h(50013),Xm=h(50014),Ym=h(50017),ef=h(50025,c),tf=h(50027),nf=h(50030),rf=h(50031),of=h(50032),af=h(50033),sf=h(50041),cf=h(50042),df=h(50043),lf=h(50045),uf=h(50046),pf=h(50048),hf=h(50049),gf=h(50050),mf=h(50053,c),ff=h(50054),vf=h(50061),yf=h(50062),Sf=h(50063),Cf=h(50100),wf=h(50101),bf=h(50400,a),Tf=h(50401),kf=h(50402),Pf=h(50403),If=h(52101),Af=h(53101),Ef=h(53102),xf=h(53103),Mf=h(53104,a),Lf=h(53105),Df=h(53106,a),Rf=h(53107),Ff=h(53108),Of=h(53111),Bf=h(53112,a),Nf=h(53320),$f=h(53321),Uf=h(53322),_f=h(53323),Hf=h(53324),Wf=h(53325),qf=h(53326),Vf=h(53700),Gf=h(53800,o,l,void 0,"libs/feed-layout/.../healthFitnessCardDataMapper.ts"),zf=h(53801),jf=h(53802),Kf=h(53944),Qf=h(53952),Zf=h(53972),Jf=h(54401),Xf=h(54437),Yf=h(60004),ev=h(60020),tv=h(60021),nv=h(60100,a),iv=h(60101),rv=h(60102),ov=h(60103),av=h(60104),sv=h(60105),cv=h(60106),dv=h(60107),lv=h(60108),uv=h(60109),pv=h(60110),hv=h(60111),gv=h(60114),mv=h(60115),fv=h(60116),vv=h(60117,a),yv=h(60118,a),Sv=h(60119),Cv=h(60120),wv=h(60125),bv=h(60126),Tv=h(60127),kv=h(60128),Pv=h(60129),Iv=h(60130),Av=h(60131,a),Ev=h(60132,a),xv=h(60134,a),Mv=h(60135,a),Lv=h(60136,a),Dv=h(60137,a),Rv=h(60138,c),Fv=h(60139,a),Ov=h(60140,a),Bv=h(60141,a),Nv=h(60142,s),$v=h(60143),Uv=h(60145,a),_v=h(60146,a),Hv=h(60147),Wv=h(60148),qv=h(60149),Vv=h(60150),Gv=h(60151,s),zv=h(60152,s),jv=h(60153,a),Kv=h(60154,s),Qv=h(60155,a),Zv=h(60156,s),Jv=h(60157,a),Xv=h(60158,a),Yv=h(60160,a),ey=h(60161,s),ty=h(60162,a),ny=h(60163,a),iy=h(60165),ry=h(60166),oy=h(60168,a),ay=h(60169),sy=h(60239),cy=h(60240),dy=h(60241,a),ly=h(60242),uy=h(60243),py=h(60244),hy=h(60245),gy=h(60246),my=h(60247,c),fy=h(60248,a),vy=h(60250,a),yy=h(60252,a),Sy=h(60259),Cy=h(60260,a),wy=h(60261,a),by=h(60262,a),Ty=h(60266),ky=h(60267),Py=h(60270),Iy=h(60271),Ay=h(60272),Ey=h(60400),xy=h(60401),My=h(60402),Ly=h(60403),Dy=h(60404),Ry=h(60405,a),Fy=h(60406),Oy=h(60407),By=h(60408),Ny=h(60409),$y=h(60410),Uy=h(60411,a),_y=h(60412),Hy=h(60413),Wy=h(60414),qy=h(60416),Vy=h(60417),Gy=h(60418),zy=h(60419,a),jy=h(60420),Ky=h(60421),Qy=h(60422),Zy=h(60430),Jy=h(60475),Xy=h(60500),Yy=h(60600),eS=h(60800),tS=h(60801),nS=h(60900),iS=h(60901),rS=h(61e3),oS=h(7e4,s),aS=h(70001,s),sS=h(70010),cS=h(70011),dS=h(70012),lS=h(70013),uS=h(70014,c),pS=h(70015,c),hS=h(70100),gS=h(70101),mS=h(70104),fS=h(70202),vS=h(70203),yS=h(70204),SS=h(70205),CS=h(70206),wS=h(70207),bS=h(70208),TS=h(70209),kS=h(70210),PS=h(70211),IS=h(70212),AS=h(70213),ES=h(70214),xS=h(70216),MS=h(70217),LS=h(70218),DS=h(70219),RS=h(70221),FS=h(70222),OS=h(70223),BS=h(70224),NS=h(70225),$S=h(70227),US=h(70300),_S=h(70400),HS=h(70401),WS=h(70402),qS=h(70403),VS=h(70404),GS=h(70405),zS=h(70406,i.z.NoAlert),jS=h(70407,i.z.NoAlert),KS=h(70408),QS=h(70409),ZS=h(70410,i.z.NoAlert),JS=h(70602),XS=h(70603),YS=h(70604),eC=h(70605),tC=h(70606),nC=h(70607),iC=h(70700),rC=h(70701),oC=h(70702),aC=h(70703),sC=h(70704),cC=h(70705),dC=h(70706),lC=h(70707),uC=h(70708),pC=h(71002),hC=h(71003),gC=h(71005,i.z.NoAlert),mC=h(73011),fC=h(73012),vC=h(73013),yC=h(73021),SC=h(73040),CC=h(73052),wC=h(73053),bC=h(73054),TC=h(73100),kC=h(73101),PC=h(73102),IC=h(73103),AC=h(73104),EC=h(73105),xC=h(73106),MC=h(73107),LC=h(73108),DC=h(73209,o,g(!1)),RC=h(73210,o,g(!0)),FC=h(73211),OC=h(73212,s),BC=h(73213,s),NC=h(73215,o,g(!0)),$C=h(73255,s,g(!0)),UC=h(73256,s,g(!0)),_C=h(73257,s,g(!0)),HC=h(73258,s,g(!0)),WC=h(73259,s,g(!1)),qC=h(73260),VC=h(73261,o,g(!0)),GC=h(73262,s,g(!0)),zC=h(73263,s,g(!0)),jC=h(73264,s,g(!1)),KC=h(73265),QC=(i.z.HighImpact,i.z.HighImpact,i.z.HighImpact,i.z.HighImpact,h(80050)),ZC=h(80051),JC=h(80052),XC=h(80053),YC=h(80054,a),ew=h(80055,a),tw=h(80056),nw=h(80057),iw=h(80058),rw=h(80105),ow=h(85e3),aw=h(85001),sw=h(85002),cw=h(85003),dw=h(90003),lw=h(90004),uw=h(90005,a),pw=h(90300),hw=h(90301,a),gw=h(90303),mw=h(90305),fw=h(90306),vw=h(90307),yw=h(90308,a),Sw=h(90309,a),Cw=h(91e3),ww=h(91001),bw=h(91002),Tw=h(91004),kw=h(91005),Pw=h(95001),Iw=h(100002),Aw=h(100004),Ew=h(100006),xw=h(100011),Mw=h(100013,o,g(!0)),Lw=h(100014),Dw=h(100017,o,g(!0)),Rw=h(100018,o,g(!0)),Fw=h(100019,o,g(!0)),Ow=h(100022),Bw=h(100024),Nw=h(100032),$w=h(100036),Uw=h(100040),_w=h(100042),Hw=h(100046),Ww=h(100047),qw=h(100054),Vw=h(101003),Gw=h(111001,a),zw=h(111010,a),jw=h(111020,a),Kw=h(111030,a),Qw=h(111041,a),Zw=h(111042,a),Jw=h(111043,a),Xw=h(111050,a),Yw=h(111051,a),eb=h(111100),tb=h(111103),nb=h(111106),ib=h(111110),rb=h(111200),ob=h(111201),ab=h(111300),sb=h(111402),cb=h(112001,a),db=h(120001),lb=h(120002),ub=h(120003),pb=h(120010),hb=h(120011),gb=h(125001),mb=h(125002),fb=h(130002),vb=h(130003),yb=h(131052),Sb=h(133100),Cb=h(133200),wb={id:133300,severity:o,pb:l},bb=h(134e3),Tb=h(135020),kb=h(135021),Pb=h(135022),Ib=h(135040,a),Ab=h(135041,a),Eb=h(135042),xb=h(135043),Mb=h(135100),Lb=h(135101),Db=h(135102,o,g(!0)),Rb=h(135103,o,g(!0)),Fb=h(135104,s,g(!0)),Ob=h(135105),Bb=h(135106,o,g(!0)),Nb=h(135107,o,g(!0)),$b=h(136e3),Ub=h(136001),_b=h(136002),Hb=h(136003,a),Wb=h(136004),qb=h(136005),Vb=h(136006),Gb=h(136007),zb=h(136008),jb=h(136009),Kb=h(136010,a),Qb=h(136011,a),Zb=h(136013,a),Jb=h(136014,a),Xb=h(140010,a),Yb=h(140011,a),eT=(i.z.NoAlert,h(140100)),tT=h(140101),nT=h(140104),iT=h(143e3,a),rT=h(143001,c),oT=h(143002,c),aT=h(143003,c,g(!0)),sT=h(144e3),cT=h(222201,a),dT=h(222223),lT=h(223e3),uT=h(223001),pT=h(223002),hT=h(223004),gT=h(223050),mT=h(223060),fT=h(223061),vT=h(223062,a),yT=h(223100),ST=h(223101),CT=h(223200),wT=h(223201),bT=h(223202),TT=h(223203,c),kT=h(223204),PT=h(223300,a),IT=h(223301),AT=h(223302),ET=h(223303,a),xT=h(223304,a),MT=h(223305,a),LT=h(224100,c,g(!0)),DT=h(224101),RT=h(224102),FT=h(224103),OT=h(224200),BT=h(224201),NT=h(224300),$T=h(224301),UT=h(224400,a),_T=h(224401,a),HT=h(295103,a),WT=h(295104,a),qT=h(295100,a),VT=h(295101,a),GT=h(295102,a),zT=h(295200),jT=h(295201),KT=h(300001),QT=h(30002),ZT=h(30003,i.z.NoAlert),JT=h(30004,i.z.NoAlert),XT=h(30005),YT=h(30006),ek=h(30007,i.z.NoAlert),tk=h(295202,a),nk=h(295203,a),ik=h(295204,a),rk=h(295205,a),ok=h(295206,a),ak=h(295207),sk=h(295251),ck=h(295252),dk=h(295253),lk=h(295254),uk=h(295300),pk=h(295301),hk=h(295302),gk=h(295303),mk=h(295304),fk=h(295305),vk=h(295400),yk=h(295401),Sk=h(295402),Ck=h(295406),wk=h(295407),bk=h(295408),Tk=h(295409),kk=h(295500,c),Pk=h(295501),Ik=h(295502),Ak=h(295503),Ek=h(1600,s),xk=h(1602,s),Mk=h(1606,s)},41181:function(e,t,n){"use strict";n.d(t,{M:function(){return p}});var i=n(1970),r=n(84147),o=n(26482),a=n(95912),s=n(53723);class c extends s.i{constructor(e,t,n,i,r,o,a){super(t,n,i,r,o,a),this.RequestId=e}set isMetrics(e){this._isMetrics=e}get isMetrics(){return this._isMetrics}}var d=n(67509),l=n(31558),u=n(45933);class p{constructor(e,t=""){this.requestId=t,(0,l.N)()?(this.logger=o.e.getInstance("ExperienceLogger",r.i.Info,d.N.Browser),this.isDebugEnabled=((0,u._)(e,"debug")||"").toLowerCase()in{1:1,true:1}||"vp"===((0,u._)(window.location.href,"reqsrc")||"").toLowerCase(),this.isDebugEnabled&&!n.g.TEST_ENV&&(window.webpackRequire=n)):(this.logger=o.e.getInstance("ExperienceLogger",r.i.Info,d.N.NodeJs),this.isDebugEnabled=!1),this.setupLogLevel()}getLoggingService(){return this.logger}isDebug(){return this.isDebugEnabled}setDebug(e){this.isDebugEnabled=e,this.setupLogLevel()}setTags(e){this.tags=e}log(e,t){if(!this.tags||!this.tags.length||t&&t.length&&t.filter((e=>this.tags.includes(e))).length>0){const t=new c(this.requestId,e);this.logger.info(t)}}logError(e){const t=new c(this.requestId,e);this.logger.error(t)}logCallback(e){this.logger.infoCallback(e)}logObjects(...e){const t=new c(this.requestId,null,e);this.logger.info(t)}logSingleObject(e,t=!1){const n=new c(this.requestId,null,e);n.isMetrics=t,this.logger.info(n)}setupLogLevel(){this.logger.setLevel(this.isDebug()?r.i.Info:r.i.Error),this.setupAppenders()}setupAppenders(){this.logger.removeAllAppenders(),(0,l.N)()?this.logger.addAppender(new i.N(this.logger.getLevel())):this.logger.addAppender(new a.m(this.logger.getLevel()))}}},88826:function(e,t,n){"use strict";n.d(t,{H:function(){return s},OO:function(){return a},Tr:function(){return c}});var i=n(23549),r=n(7476),o=n(56687);function a(e,t,n,r,a={}){const s=c(t,n,r||(0,o.n)(e),a);s.pb.stack=e&&e.stack||void 0,i.M0&&i.M0.sendAppErrorEvent(s)}function s(e,t,n,r={},o=!0){i.M0&&i.M0.sendAppErrorEvent(c(e,t,n,r),o)}function c(e,t,n,i={}){const o=(0,r.mnt)();return{...e,message:t||e.message,pb:n?{...o,...e.pb,customMessage:n,...i,w:1}:{...o,...e.pb,...i,w:1}}}},53875:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var i=n(45933),r=n(31558);class o{constructor(){(0,r.N)()?(this.isDebugEnabled=((0,i._)(window.location.href,"debug")||"").toLowerCase()in{1:1,true:1}||"vp"===((0,i._)(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(...e){this.isDebug()&&console.log(...e)}logSingleObject(e,t){this.isDebug()&&console.log(e)}}},76733:function(e,t,n){"use strict";function i(e){r=e}n.d(t,{E:function(){return i},k:function(){return r}});let r=new(n(53875).C)},38869:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var i=n(96489),r=n(78672);const o=(0,i.pn)();!function(){var e,t;const n=null===(e=(0,r.l4)())||void 0===e||null===(t=e.match(/ems=([\d]+)/))||void 0===t?void 0:t[1];o.set(n&&parseInt(n)||5)}();const a=e=>Math.floor(101*Math.random())<=(e||o.get())},45933:function(e,t,n){"use strict";function i(e,t){const n=t.replace(/[[\]]/g,"\\$&"),i=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)").exec(e);if(!i)return null;const r=i[2];return decodeURIComponent(r.replace(/\+/g," "))||""}n.d(t,{_:function(){return i}})},92062:function(e,t,n){"use strict";n.d(t,{Y:function(){return i},c:function(){return o}});var i,r=n(76733);function o(e){try{const t=new URL(e).searchParams,n=t.get("expPerf"),r=t.get("expPerfSkip");if("all"==r)return{enablePerfTimeline:!1};if(!r&&!n)return{};const o={enablePerfTimeline:!0,uploadTrace:!1,sampleRate:1,uploadCriteria:{minimumTTVR:0}};if("all"===n)o.trackAllExp=!0,o.experiencesExcludedForPerf={};else if(n){const e=o.experiencesForPerf={};n.split(",").forEach((t=>e[t]=!0))}if(r){const e=o.experiencesExcludedForPerf={};r.split(",").forEach((t=>e[t]=!0))}"true"===t.get("expPerfMarks")&&(o.addPerformanceMarks=!0),"true"===t.get("expPerfTimings")&&(o.addPageTimings=!0);const a=parseInt(t.get("expPerfLevel"));return o.traceLevel=null!=i[a]?a:i.default,o}catch(e){return r.k.logError("Error parsing URL for detecting experience diagnostic switches: "+e),{}}}!function(e){e[e.default=0]="default",e[e.medium=1]="medium",e[e.high=2]="high"}(i||(i={}))},31718:function(e,t,n){"use strict";n.d(t,{Xn:function(){return M},dj:function(){return I},iG:function(){return x},g7:function(){return P},FH:function(){return A},Im:function(){return E}});var i=n(92062),r=n(42933),o=n(35164),a=n(96489),s=n(31558),c=n(15570),d=n(90048),l=n(10754),u=n(73898);const p=(0,a.WG)((()=>new d.K));p.unset();const h="-start",g="-end";class m{constructor(e,t,n,i,r){var o;this.timelineName=e,this.instanceId=t,this.addPerfMarks=n,this.addPageTimings=i,this.async=r,this.measures=new y,this.timeRange=[1/0,-1/0],this.timelineName=(o=e,p.get().qualifyKey(o))}get timeSpan(){const[e,t]=this.timeRange;if(e!==1/0&&t!==-1/0)return[e,t-e]}startMeasure(e,t,n){const{async:i,startTime:r}=n||{},o=C(r);if(null==o)return{endMeasure:u.Z};const{timeRange:a}=this;o<a[0]&&(a[0]=o);const s=v(e,t),c=this.measures.add({coreName:s,from:o,async:null!=i?i:this.async,idSuffix:""},n);return{endMeasure:n=>{const{customSuffix:i,customData:r,endTime:s}=n||{},d=C(s);if(null==d||d<o)return;if(i&&t!==i){const t=v(e,i);this.measures.rename(c,t)}c.to=d,c.customData=r,d>a[1]&&(a[1]=d);!function(e,t,n,i){if(!n&&!i)return;const{from:r,to:o}=t;if(null!=r){const t=e+h,a=(0,l.Ou)();if(n&&(a[t]=r),i&&performance.mark(t,{startTime:r}),null!=o&&(n&&(a[e]=o-r),i)){const n=e+g;performance.mark(n,{startTime:o}),performance.measure(e,t,n)}}}(S(this.timelineName,c),c,this.addPageTimings,this.addPerfMarks)}}}rename(e){if(this.timelineName!==e){if(this.addPageTimings){const t=this.timelineName,n=(0,l.Ou)();this.measures.get().forEach((i=>{const r=S(t,i);delete n[r+h],delete n[r];const o=S(e,i);n[o+h]=i.from,n[o]=i.to-i.from}))}this.timelineName=e}}getPageMeasures(){return this.measures.get().map((e=>({...e,timelineName:this.timelineName})))}getMeasureValues(e){return this.measures.get(e)}instrumentFunc(e,t,n){return(...i)=>{const r=this.startMeasure(e).endMeasure;try{const e=t.apply(n,i);return e instanceof Promise?f(e,r):r(),e}catch(e){r({customSuffix:"error"})}}}instrumentPromise(e,t,n){const i=this.startMeasure(e,null,n).endMeasure;return f(t(),i)}}function f(e,t){return e.then((()=>t())).catch((()=>t({customSuffix:"error"}))),e}function v(e,t){return t?`${e}-${t}`:e}class y{constructor(){this.list=[],this.entList=[],this.map=new Map}add(e,t){return t&&t.entityMeasure?this.entList.push(e):this.list.push(e),this.addToMap(e)}addToMap(e){const t=e.coreName;let n=this.map.get(t);return!n&&this.map.set(t,n=[]),e.idSuffix=(0,d.p)(n.length),n.push(e),e}get(e){const{coreName:t,entityMeasures:n}=e||{};let i;return i=t?this.map.get(t)||[]:n?this.entList:!1===n?this.list:[...this.list,...this.entList],i}rename(e,t){const n=e.coreName;if(n==t)return;const i=this.map.get(n),r=i.indexOf(e);if(r>=0){i.splice(r,1);for(let e=r,t=i.length;e<t;e++)i[e].idSuffix=(0,d.p)(e);e.coreName=t,this.addToMap(e)}}}function S(e,t){return`${e}-${t.coreName}${t.idSuffix}`}function C(e){return null==e?(0,l.UE)():"number"==typeof e&&e>=0?e:void 0}var w=n(53179),b=n(29330);const T=(0,a.pn)(),k=(0,a.WG)((()=>({})));function P(e,t){(0,r.S4)(t),function(e){Object.assign(k.get(),T.set((0,i.c)(e)))}(e)}function I(){return k.get()}function A(e){const t=k.get();t.enablePerfTimeline=e,t.trackAllExp=e,t.enableEntityMetricsTimeline=e,t.traceLevel=i.Y.default,!(0,s.N)()&&(0,b.xb)(e)}const E=(e,t,n)=>function(e){const t=k.get();if(!t.enablePerfTimeline)return!1;const{experiencesForPerf:n}=t;if(n&&n[e])return!0;const{experiencesExcludedForPerf:i}=t;if(i&&i[e])return!1;return t.trackAllExp}(e)?function(e,t,n){const i=L(e,t),o=w.j.get(),a=k.get();return o[i]||(o[i]=(0,r.uk)(m,e,t,a.addPerformanceMarks,a.addPageTimings,n))}(e,t,n):void 0;function x(){const e=[],t=w.j.get();return Object.keys(t).forEach((n=>e.push(...t[n].getPageMeasures()))),e}function M(e){k.get().enableEntityMetricsTimeline&&(0,c.Yt)(e)}function L(e,t){return`${e}-${t||"0"}`}(0,s.N)()&&(window._getEntityMetricsCollection=e=>(0,c.HK)(Object.values(w.j.get()),(0,o.At)(e)))},96947:function(e,t,n){"use strict";n.d(t,{z:function(){return T}});var i=n(10754),r=n(31718),o=n(11923);function a(e={}){const t={...(0,i.Ou)(),...(0,i.Y9)()},n=[],o={WW:{pid:0},Resolver:{pid:1},Ads:{pid:2},Telemetry:{pid:3},"Content Preview":{pid:4},Images:{pid:5},JS:{pid:6},Statics:{pid:7},Configs:{pid:8},Services:{pid:9},nextPID:{pid:20}},a=100;!function(e,t,n){const i=[{name:"Ads",regex:/(\/srtb\.|taboola|outbrain)/i},{name:"Telemetry",regex:/(otf\.|\/c\.gif)/i},{name:"Content Preview",regex:/\/content\/view\/v[0-9]\/Preview\//i},{name:"Images",regex:/(img-s-msn-com|\.svg)/i},{name:"JS",regex:/\.js/i},{name:"Statics",regex:/statics/i},{name:"Configs",regex:/\/config/i},{name:"Services",regex:/(\/service\/|api|\/getappanoncookie|content|microsoftonline)/i}];let r=performance.getEntriesByType("resource").filter((t=>{const{duration:n,startTime:i}=t;return g(e,i,i+n)}));i.forEach((e=>{p(e.name,n);const i=[];r.filter((t=>{const n=t.name.match(e.regex);return n||i.push(t),n})).forEach(((n,i)=>{const r=new URL(n.name),o=r.pathname.length>1?r.pathname:r.hostname;t.push({async:!0,timelineName:e.name,coreName:o,idSuffix:`-${i}`,from:n.startTime,to:n.startTime+n.duration})})),r=i}))}(e,n,o),function(e,t,n,i){n.forEach((n=>{const{async:r,timelineName:o}=n;r&&p(o,i),g(e,n.from,n.to)&&t.push(n)}))}(e,n,(0,r.iG)(),o),u(e,n,t,o,/^WW\./,"WW");const m={...window._appTimings||{}};u(e,n,m,o,/.*/);const f=[];f.push(c(e,"Global","NavStart",a,0,"g")),Object.keys(t).filter((n=>n.match(/TT/)&&g(e,t[n]))).sort(((e,n)=>t[e]-t[n])).forEach((n=>f.push(c(e,"Global",n,a,t[n],"g")))),Object.keys(t).filter((n=>n.match(/^WW\./i)&&g(e,t[n]))).sort(((e,n)=>t[e]-t[n])).forEach((n=>f.push(c(e,"WW",n,o.WW.pid,t[n],"p")))),f.push(s("process_name",a,{name:"Main"})),f.push(s("process_sort_index",a,{sort_index:a}));const{uploadTrace:v}=e;return l(e,n,!0).forEach(((t,n)=>{const{pid:i}=o[t.name];t.measures.forEach(((t,r)=>{const{timelineName:o,coreName:a,idSuffix:s,from:c,to:l,customData:u}=t,p=("000"+r).substr(-3,3),h=a+s,g=v?function(e){const t=e.lastIndexOf("/");return t>=0?e.substr(t+1):e}(h):h,m=`${p}-${g}`;f.push(...function(e,t,n,i,r,o,a,s,c,l){return[d(e,t,n,l?"B":"b",i,r,a,{id:o}),d(e,t,n,l?"E":"e",i,r,s,{id:o,args:JSON.stringify(c)})]}(e,o,m,i,n,r,c,l,u))})),f.push(s("process_name",i,{name:t.name})),f.push(s("process_sort_index",i,{sort_index:i})),f.push(s("thread_name",i,{name:t.name},n)),f.push(s("thread_sort_index",i,{sort_index:n},n))})),l(e,n,!1).forEach(((t,n)=>{t.measures.forEach((t=>{const{timelineName:i,coreName:r,idSuffix:o,from:a,to:s,customData:c}=t,l=r+o;f.push(function(e,t,n,i,r,o,a,s){const c=h(a-o);return d(e,t,n,"X",i,r,o,{dur:c,args:JSON.stringify(s)})}(e,i,l,100,n,a,s,c))})),f.push(s("thread_name",100,{name:t.name},n)),f.push(s("thread_sort_index",100,{sort_index:n},n))})),f}function s(e,t,n,i){const r={name:e,ph:"M",pid:t,args:n};return null!=i&&(r.tid=i),r}function c(e,t,n,i,r,o){return d(e,t,n,"i",i,null,r,{s:o})}function d(e,t,n,i,r,o=null,a,s){const c={cat:t,name:n,ph:i,pid:r,tid:o,ts:h(a),...s};return null!=o&&(c.tid=o),c}function l(e,t,n){const i=(0,o.Z)(t.filter((t=>!!t.async===n&&g(e,t.from,t.to))),(e=>e.timelineName)),r=[];let a=0;return Object.keys(i).forEach((e=>{const t=i[e].sort(((e,t)=>e.from-t.from));a=Math.max(a,t[t.length-1].to),r.push({name:e,measures:t})})),r.sort(((e,t)=>e.measures[0].from-t.measures[0].from))}function u(e,t,n,i,r,o){const a=/-?[Ss]tart$/,s={"-Start":"-End","-start":"-end",Start:"End",start:"end"},c=[];Object.keys(n).filter((e=>e.match(r))).forEach((r=>{const d=r.match(a);if(!d)return;let l=r.replace(a,"");const u=`${l}${s[d[0]]}`,p=d&&n[u];if(!p)return;c.push(r),c.push(u);let h=o;if(!h){const e=l.match(/(.+)\.(.+)/);if(!e)return;h=e[1],l=e[2]}const m=n[r];g(e,m,p)&&t.push({async:!!i[h],timelineName:h,coreName:l,idSuffix:"",from:m,to:p})}));for(const e of c)delete n[e]}function p(e,t){if(!t[e])return t[e]={pid:t.nextPID.pid++},!0}function h(e){return Math.round(1e3*e)}function g(e,t,n){return!e.uploadTrace||!e.maxTime||(!t||t<=e.maxTime)&&(!n||n<=e.maxTime)}var m=n(42933),f=n(31558),v=n(59349),y=n(92062),S=n(19995),C=n(90215),w=n(15570),b=n(29330);function T(e,t,n,i,o){(0,r.g7)(e,t),(0,v.n1)(),function(e,t,n,i,r){(0,w.TG)(e,n,t,i,r),(0,b.ny)((0,m.oA)("fetch","fetch",!0)),(0,C.DY)((0,m.oA)("custom-em","custom-em",!0))}(o,i,n,(()=>(0,r.FH)(!0)),(()=>(0,r.FH)(!1))),(0,r.dj)().traceLevel>=y.Y.high&&(k("RAF",requestAnimationFrame),k("RAFTimer",S.c)),(0,f.N)()&&(window._getAppPerfTrace=a)}function k(e,t){const n=(0,m.oA)(e,e);n&&function e(){const{endMeasure:i}=n.startMeasure("frame");t((()=>{i(),e()}))}()}},90048:function(e,t,n){"use strict";n.d(t,{K:function(){return i},p:function(){return r}});class i{constructor(){this.counts={}}qualifyKey(e){e||(e="NA");return e+this.qualifySuffix(e)}qualifySuffix(e){return r(this.addCount(e)-1)}reset(){this.counts={}}addCount(e){return this.counts[e]=(this.counts[e]||0)+1}}function r(e){return e<=0?"":"-"+(e+1)}},43047:function(e,t,n){"use strict";n.d(t,{Am:function(){return g},F$:function(){return h},H7:function(){return a},Oq:function(){return s},bg:function(){return o},dw:function(){return d},iA:function(){return l},zV:function(){return c}});var i=n(31558);const r=["vendors","microsoft","common","experience"];function o(e){if(e&&performance.getEntriesByType){const t=performance.getEntriesByType("resource").filter((e=>"script"===e.initiatorType));for(const n of r){const i=t.find((e=>e.name.indexOf(n)>=0));i&&u(e,i,n+"JS")}}}function a(e){if(e&&performance.getEntriesByType){const t=performance.getEntriesByType("resource").filter((e=>"script"===e.initiatorType));for(const n of r){const i=t.find((e=>e.name.indexOf(n)>=0));i&&p(e,i,n+"JS")}}}function s(e){if(e&&performance.getEntriesByType){const t=performance.getEntriesByType("navigation");if(t&&t.length){const n=t[0];n&&u(e,n,"html")}}}function c(e){if(e&&performance.getEntriesByType){const t=performance.getEntriesByType("resource");if(t&&t.length){const n=t.find((e=>e.name.indexOf("/Feed/me")>=0));n&&u(e,n,"feed")}}}function d(e){if(!(0,i.N)()||!e)return;const t=navigator;if(t.connection){const n=t.connection;"rtt"in n&&(e.rtt=n.rtt),"downlink"in n&&(e.downlink=n.downlink)}"hardwareConcurrency"in navigator&&(e.hardwareConcurrency=navigator.hardwareConcurrency)}function l(e){e&&(e.isIDBSupported=window.indexedDB?1:0,e.isSWSupported=window.navigator.serviceWorker?1:0,e.isWWPresent=window._isWebWorkerPresent?1:0)}function u(e,t,n){const i=h(t);null!=i&&(e[n+"Cached"]=i?1:0)}function p(e,t,n){const{responseEnd:i,responseStart:r}=t;e[n+"ResponseTime"]=Math.round(i-r),e[n+"ResponseStart"]=Math.round(r),e[n+"ResponseEnd"]=Math.round(i)}function h(e){return void 0!==e.transferSize?!(0!==e.transferSize&&300!==e.transferSize):void 0!==e.nextHopProtocol?!(""!==e.nextHopProtocol):void 0}function g(e){if(e&&performance.getEntriesByType){const t=performance.getEntriesByType("navigation");if(t.length){const n=t[0],i="useragent_launch";"type"in n&&(e.isBrowserLaunch=n.type===i?1:0)}}}},10754:function(e,t,n){"use strict";n.d(t,{A1:function(){return g},EN:function(){return a},O8:function(){return p},Ou:function(){return d},Th:function(){return m},UE:function(){return h},WP:function(){return u},Y9:function(){return l},fT:function(){return c},pU:function(){return s},zp:function(){return f}});var i=n(31558),r=n(55524);const o="ssrTimeOrigin",a="ssrTimeEnd",s="SSR.InfopaneRendered",c="ssrTimeServerEntry";function d(){return(0,i.N)()?window._pageTimings||(window._pageTimings={}):r.Gq.get("__diagnostics_pageTimings",(()=>({})))}function l(){return(0,i.N)()?window._secondaryPageTimings||(window._secondaryPageTimings={}):r.Gq.get("__diagnostics_secondaryPageTimings",(()=>({})))}function u(){return(0,i.N)()?window._webVitalsPageTimings||(window._webVitalsPageTimings={}):r.Gq.get("__diagnostics_webVitalsPageTimings",(()=>({})))}function p(e,t=!0){const n=d();if(!e||!n||t&&n.TTVR)return;const i=n[e]||(n[e]=0);n[e]=i+1}function h(){return(0,i.N)()?performance.now():performance.now()-d()[o]}function g(){if((0,i.N)()&&navigator)return{memory:navigator.deviceMemory,cpu:navigator.hardwareConcurrency,networkSpeed:navigator.connection&&navigator.connection.effectiveType}}function m(){if(!(0,i.N)())return;const e=(performance.getEntriesByType("navigation")||[])[0],t={};for(const n in e){const i=e[n];t[n]="number"==typeof i?Math.round(i):i}return t}function f(e="navigate"){if(!(0,i.N)())return!1;const t=performance.getEntriesByType("navigation");return t&&t[0]&&t[0].type===e}},36926:function(e,t,n){"use strict";n.d(t,{FF:function(){return a},hf:function(){return s},v0:function(){return c}});var i=n(10754),r=n(21930),o=n(20009);function a(e,t){const n=performance.now(),i=t&&t.firstTimeOnly;t&&t.logStart&&s(`${e}-start`,n,i);const r=t&&t.perfTimeline,o=r&&r.startMeasure(e).endMeasure;return function(){const r=performance.now();t&&t.logEnd&&s(`${e}-end`,r,i),t&&!t.logDuration||s(e,r-n,i),o&&o()}}function s(e,t=performance.now(),n){const r=(0,i.Ou)();return n&&void 0!==r[e]?r[e]:(r[e]=Math.round(10*t)/10,t)}function c(e,t=performance.now()){const n=e&&(0,r.TZ)(o.DB)||0;return t+(n>0?-n:0)}},30440:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var i=n(76733);const r="-start";class o{constructor(){this.endMarkSuffix="-end","undefined"!=typeof window&&this.initialize(window.performance)}static getInstance(){return o.instance||(o.instance=new o),o.instance}initialize(e){this.performance=e}startMark(e){this.singleMark(e+r)}endMark(e){this.singleMark(e+this.endMarkSuffix),this.measureStartEnd(e)}singleMark(e){const t=this.performance;t&&t.mark&&(t.mark(e),i.k.log(`[PerfMarker] ${e}`))}clearMark(e){const t=this.performance;t&&t.clearMarks&&t.clearMarks(e)}clearMeasures(e){const t=this.performance;t&&t.clearMeasures&&t.clearMeasures(e)}async measurePromise(e,t){this.startMark(e);const n=await t();return this.endMark(e),n}measurePerfMarker(e){if(!this.performance)return;const t={},n=this.performance.getEntriesByType("mark");if(!n)return t;for(let i=0;i<n.length;i++){let r=n[i].name;if(!r||null==n[i].startTime)continue;if(r=r.replace(/-(end|start)$/i,""),!r.startsWith(e))continue;const o=t[r]||new s(r);o.processPerfEntry(n[i]),o.isValid&&(t[r]=o)}return t}measureStartEnd(e){const t=this.performance;if(t&&t.measure)try{t.measure(e,e+r,e+this.endMarkSuffix)}catch(t){i.k.logError(`Error while attempting to measure start/end of '${e}'. Error: ${t}`)}}}const a=o.getInstance();class s{constructor(e){this.duration=0,this.markerName=e}get isValid(){return null!=this.startTime}processPerfEntry(e){e.name.endsWith(r)?(this.firstStartTime||(this.firstStartTime=e.startTime),this.startTime=e.startTime):null!=this.startTime&&(this.duration+=e.startTime-this.startTime,this.startTime=null)}}},20009:function(e,t,n){"use strict";n.d(t,{Ak:function(){return c},DB:function(){return d},Fz:function(){return f},Hm:function(){return m},IP:function(){return h},MV:function(){return o},O6:function(){return l},OM:function(){return u},P9:function(){return C},T8:function(){return i},U4:function(){return r},Wk:function(){return S},fR:function(){return g},iL:function(){return v},kc:function(){return s},pJ:function(){return p},qh:function(){return a},w:function(){return y},zJ:function(){return w}});const i="E2E",r="TTPV",o="TTVR",a="TTVS",s="htmlCached",c="feedCached",d="pageRevealStart",l="pageRevealComplete",u="getTabTimingsTime",p="protocolLaunchStart",h="FromProtocolLaunchStart",g="userAgentStart",m="FromUserAgentStart",f="PCSToJSStart",v="JSStartToOnLoad",y="TTJSStart",S="timeToOnLoad",C="timeToFirstByte",w="FCP_Old"},21930:function(e,t,n){"use strict";n.d(t,{BW:function(){return G},EV:function(){return J},Gb:function(){return V},IJ:function(){return Z},IO:function(){return te},Nv:function(){return oe},O0:function(){return Se},OB:function(){return ce},OZ:function(){return Ce},O_:function(){return X},Sc:function(){return he},TZ:function(){return ye},Xl:function(){return ne},YJ:function(){return re},a8:function(){return R},aR:function(){return Te},b1:function(){return se},bO:function(){return ue},bP:function(){return de},cd:function(){return K},e3:function(){return ae},gh:function(){return le},hy:function(){return ke},l6:function(){return we},mb:function(){return j},nz:function(){return B},oN:function(){return i},o_:function(){return z},pT:function(){return Pe},su:function(){return Y},sx:function(){return Ae},tW:function(){return ie},v9:function(){return be},wS:function(){return Ie}});var i,r=n(20009),o=n(31558),a=n(90215),s=n(10754),c=n(85663),d=n(30440),l=n(19995),u=n(47969);let p,h,g,m,f,v,y;!function(e){e.Primary="primary",e.Secondary="secondary"}(i||(i={}));const S=new Map,C=new Map,w=new Map;let b,T,k,P,I,A,E,x=new Map,M=new Map,L=[];const D="TTF.",R="TTVR.",F="TTVS.",O="TTPR.",B="TTSR.";let N="",$=!1,U=!1,_="",H=!1;const W={};let q;function V(){return W}function G(e="",t=!1,n){(0,o.N)()&&(n=n||performance.now(),H?(ee(D,e,t,(0,u.F)(n)),ee(D,e+".original",t,n)):ee(D,e,t,n))}function z(e="",t=!1,n,i=!0){if((0,o.N)()){if(n=n||performance.now(),i&&H&&n>0){const i=(0,u.F)(n);return ee(R,e,t,i),ee(R,e+".original",t,n),Q(e),i}return ee(R,e,t,n),Q(e),n}}function j(e){L.push(e)}function K(e){L=L.filter((t=>t!==e))}function Q(e){if(L.length)try{L.map((t=>t(e)))}catch(e){}}function Z(e="",t=!1,n){(0,l.c)((()=>z(e,t,n)))}function J(e=""){const t=ye(r.DB),n=-1===t?-1:performance.now()-t;ee(O,e,!1,n)}function X(e,t,n){Y(e,n-t)&&(0,a.QP)({name:e,startTime:t,endTime:n})}function Y(e,t){if(M.get(e))return!1;const n=performance.getEntriesByName&&performance.getEntriesByName(e);let i;return Boolean(n&&n.length)?M.has(e)||(M.set(e,Math.round(n[0].startTime)),i=!0):(d.A.singleMark(e),M.set(e,(0,c.isNullOrUndefined)(t)?-1:Math.round(t)),i=!0),h&&h.delete(e)&&0===h.size&&A&&A(le()),i}function ee(e,t,n,i){if(!t||!t.length)return;if(!e||!e.length)return;const o=e+t;if(o.startsWith(R)&&(!f||!f.has(o))&&v&&v.has(o))return void Y(o,n?-1:i);if(w.has(o)&&w.get(o)(o),x.get(o))return;const a=performance.getEntriesByName&&performance.getEntriesByName(o);Boolean(a&&a.length)?x.set(o,Math.round(a[0].startTime)):(d.A.singleMark(o),n?x.set(o,-1):x.set(o,Math.round(i))),o.startsWith(R)&&(W.marker=o,W.value=x.get(o)),g&&g.delete(o)&&0===g.size&&T&&T(me()),p&&p.delete(o)&&0===p.size&&P&&P(ce()),e===F&&(Y("TTVS",n?-1:i),E&&E(fe(F,r.qh)))}function te(e){p=pe(e),g=pe(e,"TTVR"),m=pe(e,"TTPR"),f=new Set(ve(e,"TTVR")),T&&0===g.size&&P(me()),P&&0===p.size&&P(ce()),$=!0}function ne(e){h||(h=new Set,v=new Set,e.forEach((e=>{M.get(e)||h.add(e),e.startsWith(R)&&v.add(e)})),0===h.size&&A&&A(le()))}function ie(e){y||(y=e)}function re(e){e&&$&&p&&g&&(e.startsWith(R)||(e=R+e),x.has(e)||(p.add(e),g.add(e)),f.add(e))}function oe(){return(0,o.N)()?function(){if(!(0,o.N)())return null;if(k)return k;if(p&&0===p.size)return Promise.resolve(ce());return k=new Promise((e=>{P=e})),k}():null}function ae(){return(0,o.N)()?I||(h&&0!==h.size?(I=new Promise((e=>{A=e})),I):Promise.resolve(le())):null}function se(){return(0,o.N)()?b||(g&&0===g.size?Promise.resolve(me()):(b=new Promise((e=>{T=e})),b)):Promise.resolve([])}function ce(){return[...me(),...ge()]}function de(){return[...me(!1),...ge()]}function le(){return[...M]}function ue(e){return e===i.Primary?Array.from(p||[]):Array.from(h||[])}function pe(e,t){const n=new Set;for(const i of ve(e,t))x.get(i)||n.add(i);return n}function he(e){return x.get(O+e)}function ge(){return fe(D)}function me(e=!0){return e&&!1!==q?fe(R,r.MV,!0):fe(R)}function fe(e,t,n){const i=[];let o=0;if(x.forEach(((t,n)=>{if(n.startsWith(e)){var r,a;i.push([n,t]);const e=n.startsWith("TTVR");t>o&&(!e||null!==(r=f)&&void 0!==r&&null!==(a=r.has)&&void 0!==a&&a.call(r,n))&&(o=t,e&&(N=n));const s=S.get(n);null!=s&&s.name&&(C.get(s.name)<t&&C.set(s.name,t),s.preserve||i.pop())}})),C.forEach(((t,n)=>{n.startsWith(e)&&i.push([n,t])})),t&&i.push([t,o]),n&&t===r.MV){const e=(0,s.Ou)().refreshDelay||0;i.push(["TTVR.WithRefreshDelay",o+e])}return i}function ve(e,t){let n=[],i=[],r=[];return!e||!e.TTVR||t&&"TTVR"!==t||(n=e.TTVR.map((e=>R+e))),!e||!e.TTF||t&&"TTF"!==t||(r=e.TTF.map((e=>D+e))),e&&e.TTPR&&"TTPR"===t&&(i=e.TTPR.map((e=>O+e))),[...n,...r,...i]}function ye(e){const t=performance.getEntriesByName(e);return t&&t[0]&&t[0].startTime?t[0].startTime:-1}function Se(e){const t=M.get(e);return null!=t?t:-1}function Ce(){return y}function we(e="",t=!1,n,i){let r=e;r.startsWith(R)||(r=R+e),$&&(f.has(r)||U)&&""!==e?z(e,t,n,i):Q(e)}function be(e="",t=!1,n){let i=e;i.startsWith(R)||(i=R+e),$&&(f.has(i)||U)&&""!==e?Z(e,t,n):Q(e)}function Te(e="",t="",n=!1,i){let r=e,o=t;$&&""!==e&&""!==t&&(U||t!==_)&&(r.startsWith(R)||(r=R+e),o.startsWith(R)||(o=R+t),p.has(r)||x.has(r)||f.has(r)||(re(r),S.set(r,{name:o,preserve:n}),C.set(o,-1),i&&w.set(r,i)))}function ke(e=!1,t=""){U=e,_=t}function Pe(e){H=e}function Ie(){return H}function Ae(){return N}},42933:function(e,t,n){"use strict";function i(e,t,n,i=!1,r=!1,o){return new e(t,n,i,r,o)}n.d(t,{S4:function(){return o},fW:function(){return s},oA:function(){return a},uk:function(){return i}});const r=(0,n(96489).U1)();function o(e){r.set(e)}const a=(e,t,n)=>r.call(e,t,n);function s(e,t,n){return n?n.instrumentPromise(t,e):e()}},53179:function(e,t,n){"use strict";n.d(t,{j:function(){return i}});const i=(0,n(96489).WG)((()=>({})))},19995:function(e,t,n){"use strict";n.d(t,{c:function(){return r},u:function(){return o}});var i=n(31558);function r(e){(0,i.N)()&&requestAnimationFrame((()=>setTimeout((()=>e()),0)))}async function o(){return new Promise((e=>r(e)))}},47969:function(e,t,n){"use strict";function i(e){const t=performance.getEntriesByType("visibility-state").filter((t=>t.startTime<e));if(0===t.length)return e;let n=0;for(let r=0;r<t.length;r++){const o=t[r];var i;if("visible"===o.name)n+=((null===(i=t[r+1])||void 0===i?void 0:i.startTime)??e)-o.startTime}return n}n.d(t,{F:function(){return i}})},59349:function(e,t,n){"use strict";n.d(t,{Dd:function(){return g},d0:function(){return m},n1:function(){return h}});var i=n(42933),r=n(96489),o=n(31558),a=n(19995),s=n(92062),c=n(31718),d=n(10754),l=n(8114);const u=(0,r.WG)((()=>({}))),p=new WeakMap;function h(){if(!(0,o.N)())return;const{enablePerfTimeline:e,traceLevel:t}=(0,c.dj)();if(!e||"undefined"==typeof customElements||t<s.Y.high)return;const n=customElements.define;customElements.define=function(...e){const[t,i]=e,r="connectedCallback",o=i.prototype[r];return"function"!=typeof o||"getExperienceType"in i.prototype||(i.prototype[r]=function(...e){const t=g(this.localName,this.instanceId),n=t&&t.startMeasure("init").endMeasure,i=o.apply(this,e);return n&&n(),m(this,t),(0,d.O8)("WC.Count"),i}),n.apply(customElements,e)}}function g(e,t){const n=u.get(),r=1===(n[e]=(n[e]||0)+1)?t:(0,l.Z)(t);return(0,i.oA)(e,r)}function m(e,t,n=a.u){if(!e||!e.shadowRoot||!t)return;const i=new f("update",t);i.tryStartMeasure(),n().then((()=>i.tryEndMeasure()));const{traceLevel:r}=(0,c.dj)();r&&function(e,t,n){let i=p.get(e);if(i)return;let r=0;i=new MutationObserver((e=>{t.tryStartMeasure();const i=e.reduce(((e,t)=>(t.addedNodes.forEach((t=>e.added.push(t.nodeName))),t.removedNodes.forEach((t=>e.removed.push(t.nodeName))),t.attributeName&&e.attrs.push(t.attributeName),e)),{added:[],removed:[],attrs:[]}),o={added:i.added.length?i.added.join(","):void 0,removed:i.removed.length?i.removed.join(","):void 0,attrs:i.attrs.length?i.attrs.join(","):void 0};t.addCustomData("mutation"+ ++r,o),n().then((()=>t.tryEndMeasure()))})),i.observe(e.shadowRoot,{childList:!0,subtree:!0,attributes:!0}),i.observe(e,{attributes:!0}),p.set(e,i)}(e,i,n||y)}class f{constructor(e,t){this.measureName=e,this.perfTimeline=t,this.customData={}}tryStartMeasure(){if(!this.coreEndMeasure){const e=this.perfTimeline.startMeasure(this.measureName).endMeasure;this.coreEndMeasure=()=>e({customData:this.customData})}}addCustomData(e,t){this.customData[e]=t}tryEndMeasure(){this.coreEndMeasure&&(this.coreEndMeasure(),this.customData={},this.coreEndMeasure=null)}}let v;function y(){return v||(v=new Promise((e=>(0,a.c)((()=>{v=null,e()})))))}},63818:function(e,t,n){"use strict";n.d(t,{m:function(){return a}});var i=n(90215),r=n(10754),o=n(56687);function a(e){const t=e||performance.now();return{end:e=>{const n=performance.now(),a="ClientInit";try{if(!e){(0,r.Ou)()[a]=Math.round(n-t)}(0,i.QP)({name:a,startTime:t,endTime:n,customSuffix:e?"error":void 0})}catch(e){console.error("ClientInit span error: "+(0,o.n)(e))}}}}},90215:function(e,t,n){"use strict";n.d(t,{DY:function(){return d},Ep:function(){return h},QP:function(){return l},ee:function(){return u},el:function(){return m},m8:function(){return g},zI:function(){return p}});var i=n(35164),r=n(96489),o=n(10754);const a=(0,r.pn)(),s=(0,r.pn)(),c=(0,r.pn)();function d(e){s.set([]),c.set([]),a.set(e)}function l(e){var t;null===(t=a.get())||void 0===t||t.startMeasure(e.name,void 0,{entityMeasure:!0,startTime:f(e.startTime,-1)}).endMeasure({endTime:f(e.endTime,-1)})}function u(e){const t=a.get();return t?(0,i.fJ)(t.getMeasureValues({entityMeasures:!0}),e,"from",!1):[]}function p(e){let t;const n=s.get();n&&null!=(t=v(e.duration))&&n.push({time:(0,o.UE)(),name:e.name,duration:t})}function h(e){let t;const n=c.get();n&&null!=(t=v(e.time))&&n.push({name:e.name,time:t})}function g(e){const t=s.get();return t?(0,i.fJ)(t,e,"time",!0):[]}function m(e){const t=c.get();return t?(0,i.fJ)(t,e,"time",!1):[]}function f(e,t){return null!=e?e:t}function v(e){if("number"==typeof e&&e>=0)return e}},59450:function(e,t,n){"use strict";n.d(t,{j:function(){return c},o:function(){return s}});var i=n(69233),r=n(90215),o=n(10754),a=n(20009);function s(e){const t=(0,o.Ou)();for(const[n,i]of e)for(const e of i){const i=t[e];if(null!=i){t[n]=i;break}}}function c(){const e=`${a.MV}.${i.p.basicFeed}`;s([[e,["TTVR.River","TTVR.GridViewFeed","TTVR.StripeFeed","TTVR.WaterfallViewFeed"]]]);const t=(e,t,i)=>{const o=i&&t?i-t:-1;n[e]=o,(0,r.QP)({name:e,startTime:t,endTime:i})},n=(0,o.Ou)(),c=n[e],d=n[`${a.MV}.${i.p.searchBox}`],l=n[`${a.MV}.${i.p.sdCards}`],u=n[i.p.wpoResponseBack];t(i.p.searchBoxToFeed,d,c),t(i.p.feedSDRender,c,l),t(i.p.feedBasicRender,u,c)}},15570:function(e,t,n){"use strict";n.d(t,{TG:function(){return ue},Yt:function(){return he},HK:function(){return pe}});var i=n(35164),r=n(23549),o=n(87603),a=n(96489),s=n(7476);const c=Object.freeze({experience:"e",page:"p",other:"o",script:"js",service:"s",container:"c",custom:"x"});var d;!function(e){e[e.keepPrevious=1]="keepPrevious",e[e.keepThis=2]="keepThis",e[e.keepAll=3]="keepAll"}(d||(d={}));var l=n(29330),u=n(78672),p=n(31558),h=n(90215),g=n(10754),m=n(20009),f=n(90048),v=n(43047),y=n(76733);const S=new Map([["min",e=>e.length?e.reduce(((e,t)=>Math.min(e,t)),1/0):void 0],["max",e=>e.length?e.reduce(((e,t)=>Math.max(e,t)),-1/0):void 0],["first",e=>{for(const t of e)if(null!=t)return t}]]),C={clientrtt:"tcp",origin:"origin",cdntime:"self"},w=/\/\/([^/]+)\/([^?&#]+)/,b=/^assets\.msn\.(com|cn)/i,T=/^(ent-)?api\.msn\.(com|cn)/i,k="service",P="[cdn]/",I="[1s]/",A="[self]/",E=`${A}[root]`,x="[1s-cdn]/",M=(0,a.pn)();function L(e,t,n,r){const o=(0,g.UE)(),a=function(e){const t=new Map,n=e=>function(e,t){const{name:n}=t;let i=e.get(n);i||e.set(n,i=[]);i.push(t)}(t,e);performance.getEntriesByType("navigation").forEach((e=>{n(function(e,t){return{name:e.name,startTime:e.startTime,requestStart:e.requestStart,responseEnd:e.responseEnd,transferSize:e.transferSize,duration:e.duration,serverTiming:e.serverTiming,initiatorType:e.initiatorType,nextHopProtocol:e.nextHopProtocol,...t}}(e,{name:E}))}));const r=(0,i.fJ)(performance.getEntriesByType("resource"),e,"startTime",!0);return r.forEach(n),t}(r),s={networkCounter:new f.K,networkMap:a,filterContext:r},d=function(e,t){const n={name:"experiences",data:{type:c.container}};return e&&e.forEach((e=>{const i=function(e,t){const{filterContext:n,networkMap:i}=t,r=z(e,["min",[["first","scripts","from"],["first","config","from"]]]),o=r?z(e,["max",[["first","scripts","to"],["first","config","to"]]]):void 0,a=r&&o?_(r,o,void 0,n):void 0;let s=j(e,["first","render","to"]);K(s)||(s=j(e,["first","update","to"]),s&&y.k.log(`${e.timelineName} is missing 'render' mark`));const d=s&&z(e,["min",[["first","render","from"],["first","update","from"]]]),u=d?_(d,s,void 0,n):void 0;if(!a&&!u)return;const p={name:e.timelineName,data:{type:c.experience}};U(p,"init",a),U(p,"render",u),a&&u&&U(p,"_self",_(r,s,void 0,n));const h=e.getMeasureValues({coreName:l.JS});h.forEach((e=>{const n=e.customData,r=function(e,t,n){const i=e&&t.get(e);if(!i)return;const r=N(i,(e=>Math.abs(e.startTime-n.from)));if(r>=0){const n=i.splice(r,1)[0];return i.length||t.delete(e),n}}(n&&n.url,i,e);F(R(e)||l.JS,c.service,p,r,e,t)}));const g=e.getMeasureValues({entityMeasures:!0});if(g.length){const e=$(p,{name:"custom",data:{type:c.custom}});g.forEach((t=>{O(e,t,n)}))}return p}(e,t);i&&$(n,i)})),n}(t,s),u=function(e){const t={name:"scripts",data:{type:c.container}},n={name:"services",data:{type:c.container}},i={name:"other",data:{type:c.container}};return(0,p.N)()?function(e,t,n,i){const{networkMap:r}=e;r.forEach((o=>{o.forEach((o=>{const{initiatorType:a,name:s}=o;if("img"===a)return;let d,u,p,h;const g=D(s);if(g&&g.endsWith(".js")){u=g.replace(/(\.[0-9a-f]{20})?\.js$/,"").replace(/bundles\/v1\/\w+\/[\w.]+\//,""),d=t,p=c.script}else if("css"===a||"iframe"===a||"other"===a||"beacon"===a)d=i,p=c.other;else{var m;d=n,p=c.service;const e=null===(m=(0,l.o4)())||void 0===m?void 0:m.getMeasureValues({coreName:s});if(e&&e.length){const{startTime:t}=o;h=e[N(e,(({from:e})=>Math.abs(e-t)))],u=R(h)}}let f=u||g;f&&(f=f.toLowerCase(),F(f,p,d,o,h,e),r.delete(s))}))}))}(e,t,n,i):function(e,t,n){var i;const r=null===(i=(0,l.o4)())||void 0===i?void 0:i.getMeasureValues({entityMeasures:!1});r&&r.forEach((i=>{var r;const{coreName:o,from:a,to:s}=i,d=null===(r=D(o))||void 0===r?void 0:r.toLowerCase();if(!d)return;let l,u;o.endsWith(".js")?(l=t,u=c.script):(l=n,u=c.service);F(d,u,l,{startTime:a,duration:s-a},void 0,e)}))}(e,t,n),[t,n,i]}(s),v=function(e){const t={name:"custom",data:{type:c.custom}};(0,h.ee)(e).forEach((n=>O(t,n,e))),(0,h.m8)(e).forEach((({name:e,duration:n})=>function(e,t,n){H(e,t,n)}(t,e,n))),(0,h.el)(e).forEach((({name:n,time:i})=>W(t,n,i,e)));const n=e===i.d9;if(n){const n=(0,g.Ou)();B(t,m.P9,e,n,m.P9,g.fT),B(t,m.MV,e,n,m.MV,g.EN)}else W(t,m.MV,e.timeFilter.end,e);return t}(r),S={name:"",data:{type:c.container}};U(S,"calc",_(o,(0,g.UE)(),void 0,i.d9));const C={metrics:S.data,...e||{}},w={_meta:C};let b=!1;if([v,d,...u].forEach((e=>{const{data:t}=e;(t.children||t.spans||t.durations||t.scalars||t.instants)&&(w[e.name]=t,b=!0)})),b)return n&&n.length&&(C.pivots=n.map((e=>e.key)),C.pivots64=n.map((e=>e.key64))),w}function D(e){if(e){const t=e.match(w);if(t){let[,e,n]=t;return n=n.toLowerCase(),e.match(b)?n=(n.startsWith(k)?x:P)+n:e.match(T)?n=I+n:e===M.get()&&(n=A+n),n}return e.toLowerCase()}}function R(e){const t=e&&e.customData;if(t){const{requestName:e,url:n,mappedUrl:i}=t;return e||D(i||n)}}function F(e,t,n,i,r,o){const{networkCounter:a,filterContext:s}=o,c=a.qualifyKey(e),d={name:c,data:{type:t}},l=function(e,t){if(!t)return;const{startTime:n,requestStart:i,responseEnd:r,transferSize:o,duration:a,serverTiming:s}=t,c=!!i,d={name:e,hasFullTimings:c,networkDur:a,networkStart:n};if(c){d.connectDur=i-n,d.requestDur=r-i;const e=(0,v.F$)(t);null!=e&&(d.cached=e?1:0,e||(d.transferSize=o))}if(!d.cached&&(e.startsWith(P)||e.startsWith(x))&&s&&s.length){const e=d.cdn={};s.forEach((({name:t,duration:n})=>{const i=C[t];i&&(e[i]=n)}))}return d}(c,i);if(l){const{cdn:e,networkStart:t,networkDur:n}=l;U(d,"network",_(t,void 0,n,s))&&(l.hasFullTimings&&(H(d,"connect",l.connectDur),H(d,"request",l.requestDur),q(d,"size",l.transferSize),q(d,"cache",l.cached)),e&&(H(d,"cdnTCP",e.tcp),H(d,"cdnSelf",e.self),H(d,"cdnOrigin",e.origin)))}if(r&&U(d,"app",_(r.from,r.to,void 0,s))){const e=r.customData,{perfCritical:t,error:n}=e||{};t&&q(d,"critical",1),n&&q(d,"error",1)}d.data.spans&&$(n,d)}function O(e,t,n){const i=_(t.from,t.to,void 0,n);if(i){U(e,t.coreName+t.idSuffix,i)}}function B(e,t,n,i,r,o){W(e,t,i[(0,p.N)()?r:o],n)}function N(e,t){const n=e&&e.length||0;if(n<=1)return n-1;let i=1/0,r=0;return e.length>1&&e.forEach(((e,n)=>{const o=t(e);o<i&&(i=o,r=n)})),r}function $(e,t){return G(e,"children",t.name,t.data),t}function U(e,t,n){return n?G(e,"spans",t,n):void 0}function _(e,t,n,{spanMapperFn:i}){return i(e,t,n)}function H(e,t,n){return V(e,t,n,"durations")}function W(e,t,n,{timeFilterFn:i,timeMapperFn:r}){if(i(n))return V(e,t,r(n),"instants")}function q(e,t,n){return V(e,t,n,"scalars")}function V(e,t,n,r){if(K(n)){return G(e,r,t,(0,i.NM)(n))}}function G(e,t,n,i){return(e.data[t]||(e.data[t]={}))[n]=i,i}function z(e,t){const[n,i]=t,r=[];for(const t of i){const n=j(e,t);null!=n&&r.push(n)}const o=S.get(n),a=o&&o(r);return K(a)?a:void 0}function j(e,t){const[n,i,r]=t,o=e.getMeasureValues({coreName:i});if(o&&o.length){const t=S.get(n);if(t){const n=function(e,t,n){return e.getMeasureValues({coreName:t}).map((e=>e[n])).filter((e=>null!=e))}(e,i,r),o=t(n);if(K(o))return o}}}function K(e){return null!=e&&!isNaN(e)}M.set((0,u.zw)());var Q=n(54096),Z=n(88826),J=n(73898),X=n(53179),Y=n(38869);const ee=6e4,te=(0,a.U1)(),ne=(0,a.pn)(),ie=(0,a.U1)(),re=(0,a.U1)(),oe=(0,a.pn)(),ae=(0,a.pn)(),se=()=>{},ce=(0,a.oN)(),de=(0,a.oN)(),le=(0,a.oN)();function ue(e,t,n,i,r){if([ce,de,le,ne,te,ae,oe].forEach((e=>e.unset())),re.set(i||J.Z),ie.set(r||J.Z),!i||!r||!t)return;const{bundleInfo:a,pcsInfo:s}=t.ClientSettings||{};ae.set({buildAlias:a&&a.alias,env:s&&s.env});const{pivotsFinalized:c}=(0,o.MB)(e,t,n),d=!e&&(0,Y.g)(),l=e&&(0,o._P)();oe.set(!0),l&&c.then((()=>{(0,o._P)()||ge()})),(d||l)&&(ne.set(!0),te.set(me({props:{},dedupeBehavior:2,startTime:0,getMatches:()=>l?(0,o.aM)():[]})))}function pe(e,t,n){if(oe.get())return n=n||(0,o.aM)(),L(ae.get(),e,n,t)}function he(e){if(ge()&&e){ve(e,Object.values(X.j.get()),(0,i.At)())}}function ge(){if(te.get())return te.call(!0),ne.unset(),te.unset(),!0}function me(e){0===ce.size&&(!ne.get()&&performance.clearResourceTimings(),re.call());const{props:t,dedupeBehavior:n,groupId:o,traceId:a}=e,c=(0,Q.s)(t)+`|${a||""}|${o||""}`,d=ce.get(c);if(d&&d.size)if(n&&2!==n){if(1===n)return se}else{const e=o&&le.get(o);e&&e.size&&d.forEach((t=>e.delete(t)));const t=a&&de.get(a);t&&t.size&&d.forEach((e=>t.delete(e))),d.clear()}let l;return l=t=>{const n=ce.get(c);if(n&&n.delete(l)){const d=a&&de.get(a);d&&d.delete(l);const u=o&&le.get(o);u&&(t?u.delete(l):(u.forEach((e=>e!==l&&e(!0))),u.clear())),n.size||!ce.delete(c)||ce.size||ie.call(),t||function(e){const t=(0,i.At)({start:e.startTime,end:performance.now()}),{spanFilterFn:n}=t,o=Object.values(X.j.get()).filter((e=>{const{timeSpan:t}=e;return t&&n(t[0],void 0,t[1])})),a={},c=e.getMatches();if(!ve(a,o,t,c))return;try{r.M0.sendLoadTimeEvent({markers:a})}catch(e){(0,Z.H)(s.GrI,"Failed to upload entity-metrics for manual trace",`Matches: ${c.map((e=>e.key)).join("|")}`)}}(e)}},fe(ce.getObj(),c,l),fe(de.getObj(),a,l),fe(le.getObj(),o,l),setTimeout((()=>l(!0)),e.stopTimeout||ee),l}function fe(e,t,n){if(t){let i=e.get(t);!i&&e.set(t,i=new Set),void 0!==n&&i.add(n)}}function ve(e,t,n,i){if(e&&oe.get()){const r=pe(t,n,i);if(r)return e.entityMetrics=r,!0}}},87603:function(e,t,n){"use strict";n.d(t,{aM:function(){return I},_P:function(){return P},MB:function(){return k},nm:function(){return E},Pj:function(){return x}});var i=n(76187),r=n(88975),o=n(96489),a=n(31558),s=n(43047);const c=/^winp(\d)/i;function d(e){if(!(0,a.N)())return;const{referrer:t}=document;if(t){if(t===location.href)return"self";const e=function(e){try{return new URL(e)}catch{return}}(t);if(e){const{host:t,pathname:n}=e,{host:i,pathname:r}=window.location;let o,a;if(a=t.match(/^([a-z]+)\.msn\.(com|cn)$/)){const[,e]=a;if("ntp"===e)return"edge-hp";if("www"===e){let e;if(!n||"/"===n)return"msn-hp";if(e=n.match(/^\/[a-z]{2}-[a-z]{2}(\/feed)?\/?$/i))return e[1]?"win-hp":"msn-hp";if(n.match(/\/(ar|ss|vi)-[A-Za-z0-9]+$/))return"msn-views"}return t===i&&l(n)===l(r)?"same-seg1-seg2":"msn-other"}if(o=t.match(/\.(bing|google|yahoo)\.com$/))return"search-engine"}}else{const{ocid:t}=e;let n;if(t&&(n=t.match(c)))return`prong-${n[1]}`}return"unknown"}function l(e){const t=e&&e.match(/^\/([^/]+(\/[^/]+)?)?/);return t&&t[0]}var u=n(54096),p=n(7476),h=n(10754),g=n(88826),m=n(38869);const f=(0,o.oN)(),v=(0,o.oN)(),y=(0,o.oN)(),S=(0,o.sR)(),C=null,w=(0,o.pn)(),b=(0,o.U1)(),T=(0,o.WG)((()=>new Promise((e=>b.set(e)))));function k(e,t,n){const{pivots:o,manualPivots:a}=e||{},l={pivotsFinalized:T.get()};if(!(e&&(o&&o.length||a&&a.length)&&t&&n))return l;const u=(0,h.A1)()||{},p=function(e){if(e){const{cpu:t}=e;if(t>=1&&t<=4)return"1-4";if(t>=6&&t<=8)return"6-8";if(t>=10)return"10+"}}(u),g=(0,i.p)((()=>d(n))),f=(0,i.p)((()=>function(e){const{ocid:t}=e;return t&&("windirect"===t||t.match(c))?"winfeed":"default"}(n))),v=(0,i.p)((()=>function(){let e,t=0,n=0;const i=/\/(vendors|microsoft|experience|common)\./,r=performance.getEntriesByType("resource");for(const o of r)if("script"===o.initiatorType&&(e=o.name.match(i))&&((0,s.F$)(o)?t++:n++,t+n>=4))break;return 4===t?"warm":4===n?"cold":n+t===4?"partial":void 0}()));O("audienceMode",(e=>(0,r.Uc)({audienceMode:e},n))),O("browser",(e=>(0,r.K4)({browser:e},n))),O("deviceFormFactor",(e=>(0,r.Ev)({deviceFormFactor:e},n))),O("displayLocale",(e=>(0,r.fb)({locale:e},n,!0))),O("domain",(e=>(0,r.hI)({domain:e},n))),O("experimentId",(e=>(0,r.W9)({experimentId:e},n))),O("locale",(e=>(0,r.fb)({locale:e},n,!1))),O("ocid",(e=>(0,r.K3)({ocid:e},n))),O("os",(e=>(0,r.zu)({os:e},n))),O("platform",(e=>(0,r.jF)({platform:e},n))),O("referrer",(e=>e===g())),O("ocidGroup",(e=>e===f())),O("network",(e=>e===u.networkSpeed)),O("cpu",(e=>e===u.cpu)),O("cpuGroup",(e=>e===p)),O("memory",(e=>e===u.memory)),O("coreJSCache",(e=>e===v()));const{pcsInfo:y,bundleInfo:S}=t.ClientSettings;return O("env",(e=>(0,r.Sh)(e,y&&y.env))),O("buildAlias",(e=>(0,r.Sh)(e,S&&S.alias))),F("pageType",((e,t)=>(0,r.oM)({pageType:t},{pageType:e}))),F("pageProduct",r.Sh),F("pageName",r.Sh),x("preRender",!!t.IsPrerender),w.set(function(e){const t=[],n=[],{pivots:i,manualPivots:r,_sampleRate:o}=e,a=(e,t)=>{e&&e.forEach((e=>{e&&(0,m.g)(e._sampleRate||o)&&t(e)}))},s=e=>{for(const{key:t,matcher:n}of D(e))n||B(t)};return a(i,(e=>{s(e);const n={config:e},i=A(n);(i||i===C)&&t.push(n)})),a(r,(e=>{s(e),n.push(e)})),{defaultPivots:t,manualPivotConfigs:n}}(e)),L(),l}function P(){var e;return!(null===(e=w.get())||void 0===e||!e.defaultPivots.some((e=>e.success||e.success===C)))}function I(){const e=w.get();if(!e)return[];const t=[];for(const n of e.defaultPivots)A(n)&&t.push(R(n.config));return S.size&&(0,g.H)(p.WXX,"Missing pivot field values",[...S.getObj()].toString()),t}function A(e){let{success:t}=e;if(null!=t)return t;t=!0;for(const{key:n,value:i,matcher:r}of D(e.config)){const e=r&&r.matchFn(i);if(e===C)t=C,S.add(n);else if(!e){t=!1;break}}return e.success=t}function E(e,t){y.set(e,t),M(e)}function x(e,t){null!=t&&(v.set(e,t),M(e))}function M(e){w.get()&&S.delete(e)&&L()}function L(){const e=w.get();if(e&&S.size<=0){for(const t of e.defaultPivots)A(t);b.call()}}function*D(e){for(const t in e)if((0,u.L)(t)){const n=f.get(t);yield{key:t,value:e[t],matcher:n}}}function R(e){const t=(0,u.s)(e);return{key:t,key64:btoa(t)}}function F(e,t){O(e,(n=>{const i=y.get(e);return i==C?C:t(i,n)}))}function O(e,t){N(e,(()=>t))}function B(e){N(e,(()=>function(e){return t=>{const n=v.get(e);return n==C?C:n===t}}(e)))}function N(e,t){f.get(e)||f.set(e,{matchFn:t()})}},29330:function(e,t,n){"use strict";n.d(t,{JS:function(){return c},Ud:function(){return p},ny:function(){return s},o4:function(){return a},xb:function(){return u}});var i=n(96489),r=n(31558);const o=(0,i.pn)(),a=o.get;function s(e){o.set(e)}const c="service",d=g().fetch;let l=d;function u(e){Object.defineProperty(g(),"fetch",{value:e?(...e)=>p()(...e):d})}function p(e={}){const{perfTimeline:t=a()}=e,n=e.fetchImpl||l;return t?h.bind(h,t,n):n}async function h(e,t,n,i){const r=(n.url||n).toString(),o={url:r};if(i){o.requestName=i.requestName,o.perfCritical=i.perfCritical,delete i.requestName,delete i.perfCritical;const{urlMapper:e}=i;e&&(o.mappedUrl=e(r),delete i.urlMapper)}const s=e===a()?r:c,d=e&&e.startMeasure(s).endMeasure;let l;try{const e=await t(n,i);return l=!e||!e.ok,e}catch(e){throw l=!0,e}finally{l&&(o.error=!0),d&&d({customData:o})}}function g(){return(0,r.N)()?window:globalThis}},54096:function(e,t,n){"use strict";n.d(t,{L:function(){return o},s:function(){return r}});var i=n(76733);function r(e){const t=[];return e&&a(e,t),t.join(",")}function o(e){return e&&!e.startsWith("_")}function a(e,t,n=""){const r=Object.keys(e).filter(o).sort();for(const o of r){const r=e[o];if(null==r)continue;const s=`${n}${n?".":""}${o}`;if("object"==typeof r)a(r,t,s);else{if(!(t.length<100)){i.k.logError("getSortedObjectKeyValuesDeep: circular reference suspect");break}t.push(`${s}=${r.toString().toLowerCase()}`)}}}},35164:function(e,t,n){"use strict";n.d(t,{At:function(){return p},NM:function(){return h},d9:function(){return s},fJ:function(){return d}});var i=n(51727),r=n(37641);const o=(e,t)=>n=>n>=e&&n<=t,a={start:-1/0,end:1/0},s={timeFilter:a,spanFilterFn:()=>!0,spanMapperFn:(e,t,n)=>l(e,t,n),timeMapperFn:e=>e,timeFilterFn:()=>!0},c={timeFilter:{start:1/0,end:-1/0},spanFilterFn:()=>!1,spanMapperFn:()=>{},timeMapperFn:()=>{},timeFilterFn:()=>!1};function d(e,{timeFilter:t},n,s){if(e&&n&&t!==a){const{start:a,end:c}=t;if(s){const t=(0,i.Z)(e,{[n]:a},n),o=(0,r.Z)(e,{[n]:c},n);e=e.slice(t,o)}else{const t=o(a,c);e=e.filter((e=>t(e[n])))}}return e}function l(e,t,n,i){if(null!=e&&(null!=t&&(n=t-e),null!=n&&n>=0)){if(i&&null==(e=i(e)))return;return[h(e),h(n)]}}function u(e,t){return(n,i,r)=>{if(e(n,i,r))return l(n,i,r,t)}}function p(e){if(!e)return s;const{start:t,end:n}=e;if(null==t||null==n||t>n)return c;const i=o(t,n),r=e=>h(e-t),a=function(e){const{start:t,end:n}=e;return(e,i,r)=>{if(null==e)return!1;let o;if(null!=i)o=i;else{if(null==r)return!1;o=e+r}return!(o<e)&&e<=n&&o>=t}}(e);return{timeFilter:e,spanFilterFn:a,spanMapperFn:u(a,r),timeMapperFn:r,timeFilterFn:e=>i(e)}}const h=e=>e<5?Math.round(10*e)/10:Math.round(e)},14908:function(e,t,n){"use strict";n.d(t,{N:function(){return a}});var i=n(7476),r=n(23549),o=n(31558);class a{constructor(e,t,n,i){this.chromiumApiRetryCount=5,this.isNtpPrivateApiAvailable=e=>window&&window.chrome&&window.chrome.ntpSettingsPrivate&&"function"==typeof window.chrome.ntpSettingsPrivate[e],this.prefSettingKey=e,this.searchForKeyName=t,this.targetKeyName=n,this.defaultItem=i}async getPreferenceSetting(e,t){try{const n=await this.getPreferenceSettingValueArray(t),i=n.findIndex((t=>t[this.searchForKeyName]===e));return i>-1?n[i]:null}catch(t){const n=`Failed to find user preference key: ${e}`;return this.logAppError(i.Aps,n,t),null}}async savePreferenceSetting(e,t){try{const n=await this.getPreferenceSettingValueArray()||[],i=n.findIndex((t=>t[this.searchForKeyName]===e));if(i>-1){const e={...n[i],...t};n[i]=e}else{const i={...this.defaultItem,...t};i[this.searchForKeyName]=e,n.push(i)}return this.setAndSavePreferenceSetting(n)}catch(t){const n="Failed to store user preference setting";return this.logAppError(i.nS9,n,`Key:${e}.Error:${t}`),!1}}isApiAvailableToUse(){return new Promise((e=>{const t="Error in isApiAvailableToUse";try{this.isGoodToUseNtpSettingsPrivate("getAllPrefs")?void 0===this.isPrefSettingKeyAvailable?window.chrome.ntpSettingsPrivate.getAllPrefs((n=>{if(this.isPrefSettingKeyAvailable=n&&n.findIndex((e=>e.key===this.prefSettingKey))>-1,!this.isPrefSettingKeyAvailable){let e="";try{n&&n.forEach((t=>e+=`${t.key}+`))}catch(e){this.logAppError(i.Aps,"Error: Can not log keylist from preference setting",e)}this.logAppError(i.me0,t,`missing preference key: ${this.prefSettingKey}, available keys: ${e}`)}e(this.isPrefSettingKeyAvailable)})):e(this.isPrefSettingKeyAvailable):(this.logAppError(i.MFQ,t,"getAllPrefs not present"),e(!1))}catch(t){this.logAppError(i.MFQ,"Error: Unexpected throw in isApiAvailableToUse",t),e(!1)}}))}logAppError(e,t,n){null===r.M0||void 0===r.M0||r.M0.sendAppErrorEvent({...e,message:t,pb:{...e.pb,customMessage:n}})}async getPreferenceSettingValueArray(e){try{if(this.settingValuesArray&&!e)return this.settingValuesArray;{const e=await this.getPreferenceValueFromBrowser();return this.settingValuesArray=e||[],this.settingValuesArray}}catch(e){const t=`Failed to read ${this.prefSettingKey} preference setting`;return this.logAppError(i.k8J,t,e),[]}}setAndSavePreferenceSetting(e){if(!(0,o.N)())return!1;try{if(this.isGoodToUseNtpSettingsPrivate("setPref"))return this.settingValuesArray=e,window.chrome.ntpSettingsPrivate.setPref(this.prefSettingKey,this.settingValuesArray),!0;{const e="window.chrome.ntpSettingsPrivate.setPref does not exist.";return this.logAppError(i.T5b,e,`Key:${this.prefSettingKey}`),!1}}catch(e){return!1}}isGoodToUseNtpSettingsPrivate(e){let t=this.isNtpPrivateApiAvailable(e),n=0;for(;n<this.chromiumApiRetryCount&&!t;)n++,setTimeout((()=>{t=this.isNtpPrivateApiAvailable(e),t&&r.M0.sendAppErrorEvent({...i.$9$,message:`Chromium API retry succeed after ${n} retry`})}),50);if(!t){const t=`functionName: ${e},\n canUseDOM: ${(0,o.N)()},\n windows: ${window},\n document: ${window&&window.document},\n createElement: ${window&&window.document&&window.document.createElement},\n chrome: ${window&&window.chrome},\n ntpSettingsPrivate: ${window&&window.chrome&&window.chrome.ntpSettingsPrivate},\n ntpSettingsPrivate funtions: ${window&&window.chrome&&window.chrome.ntpSettingsPrivate&&Object.getOwnPropertyNames(window.chrome.ntpSettingsPrivate).toString()}\n `;r.M0.sendAppErrorEvent({...i.Fe_,message:"Failed to get funtion from window.chrome.ntpSettingsPrivate.",pb:{...i.Fe_.pb,customMessage:t}})}return t}getPreferenceValueFromBrowser(){return new Promise(((e,t)=>{if(this.isGoodToUseNtpSettingsPrivate("getPref"))window.chrome.ntpSettingsPrivate.getPref(this.prefSettingKey,(function(t){t&&t.value?e(t.value):e(null)}));else{const e="window.chrome.ntpSettingsPrivate.getPref does not exist.";this.logAppError(i.pCD,e,""),t(e)}}))}}},67213:function(e,t,n){"use strict";n.d(t,{w$:function(){return te},Wt:function(){return $},jL:function(){return j},Kr:function(){return q},Zb:function(){return ee},_W:function(){return P},zx:function(){return b},x5:function(){return z},ZE:function(){return N},UU:function(){return O},H1:function(){return G},aT:function(){return k},a:function(){return T},Qw:function(){return W},y3:function(){return re},n6:function(){return L},$1:function(){return V},VS:function(){return I},OM:function(){return A},Tr:function(){return R},Xq:function(){return F},I9:function(){return E},W6:function(){return x},DH:function(){return M},hK:function(){return ie},nz:function(){return X},Vx:function(){return B},fL:function(){return Y},eq:function(){return U},mY:function(){return J},LC:function(){return _}});var i=n(21789),r=n(31156),o=n(30008),a=n(74161),s=n(9498),c=n(26732),d=n(23549),l=n(7476),u=n(88826),p=n(10754),h=n(31558),g=n(54297),m=n(13334),f=n(87172),v=n(36867),y=n(43356);function S(e){if("undefined"==typeof window||!window.document||window.isRenderServiceEnv)return void(0,u.OO)(new Error("DOM is not available"),l.$oH,"DOM is not available to use trusted types API.");const t=window.trustedTypes;if(!t)return void(0,u.OO)(new Error("Trusted types API is not available"),l.yJi,"Trusted types API is not available to use.");if(!t.createPolicy)return void(0,u.OO)(new Error("Trusted types API createPolicy function is not available"),l.Bis,"Trusted types API createPolicy function is not available to use.");const n=window.trustedTypePolicies||(window.trustedTypePolicies={});if(n[e])return n[e];const i=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",document.location.hostname];let n;try{n=new URL(e,location.origin)}catch(t){return(0,u.OO)(new Error("Failed to construct URL"),l.OC2,"URL is invalid",`Invalid URL: ${e}`),"about:blank#error"}if(n.hostname&&!t.includes(n.hostname))return(0,u.OO)(new Error("URL violates Trusted Types"),l.w5E,"URL hostname is not allowed",`Invalid URL hostname: ${n.hostname}`),"about:blank#error";return e}(e);return t}});return n[e]=i,i}let C=!1;const w=[];function b(){return new Promise((e=>{const t=window.chrome;if(t){const n=t.ntpSettingsPrivate;if(n&&"function"==typeof n.getConfigData)return void n.getConfigData((t=>{e({enabled:(null==t?void 0:t.enabledFeatures)||[],disabled:(null==t?void 0:t.disabledFeatures)||[]})}))}e({enabled:[],disabled:[]})}))}async function T(){const{enabled:e}=await b();return null==e?void 0:e.filter((e=>e.includes("msNtpExp")))}async function k(e){const t=[];return e.forEach((e=>{if(e.startsWith("m")){const n=e.replace("msNtpExp",""),i=Number.parseInt(n);i>=0&&t.push(i)}})),t}function P(e){let t=0;return e.forEach((e=>{e<31&&(t|=1<<e)})),0===t?"":t.toString()}async function I(){const{enabled:e}=await b();return null==e?void 0:e.includes("msReducedNtpAdsForNewDevice_BlockAllAds")}async function A(){const{enabled:e}=await b();return null==e?void 0:e.includes("msReducedNtpAdsForNewDevice_BlockOnly3PAds")}function E(){const e=window&&window.navigator;if(!e)return!1;const{hardwareConcurrency:t=-1,deviceMemory:n=-1}=e;return t<=2||n<4}function x(){const e=window&&window.navigator;if(!e)return!1;const{hardwareConcurrency:t=-1,deviceMemory:n=-1}=e;return t<=2&&n<=2}function M(){const e=window&&window.navigator;if(!e)return!1;const{hardwareConcurrency:t=-1,deviceMemory:n=-1}=e;return t<=2||n<=2}function L(){const e=window&&window.navigator;if(!e)return!1;return"4g"!==(e&&e.connection?e.connection.effectiveType:"4g")}function D(){var e,t;return(null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.deviceMemory)<=4}function R(){return"1"===new URLSearchParams(window.location.search).get("startpage")&&D()}function F(){var e,t;const n="1"!==new URLSearchParams(window.location.search).get("startpage"),i=(null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.deviceMemory)<4;return n&&i}function O(){let e=!1;const t="os-sku";if(!("undefined"==typeof window||!window.document||!window.document.createElement||window.isRenderServiceEnv))try{if(window&&window.external&&window.external.getHostEnvironmentValue(t)){const n=JSON.parse(window.external.getHostEnvironmentValue(t));e=n&&"192"===n[t]}}catch(e){}return e}function B(e){C=e}function N(){return C}function $(e){var t,n,i,r;null===(t=window)||void 0===t||null===(n=t.chrome)||void 0===n||null===(i=n.ntpSettingsPrivate)||void 0===i||null===(r=i.onPrerenderConversionFromDhpToNtp)||void 0===r||r.addListener(e)}async function U(e){var t,n;if(!(D()||(null===i.jG||void 0===i.jG||null===(t=i.jG.CurrentRequestTargetScope)||void 0===t||null===(n=t.pageExperiments)||void 0===n?void 0:n.includes("prg-lowmemdhp"))))return;const r=()=>{setTimeout((()=>{(0,s.oc)(),(0,c.Yc)(!1)}),5e3)};e?r():$(r)}function _(e,t,n,i,r){n!==i&&(d.M0.addOrUpdateTmplProperty("layoutchange",`${e}|${t}|${n}|${i}|${r}`),async function(e,t,n,i,r){const o=await H()||{};e==a.st.User?o.userLayoutHistory={time:r,changeKey:t,from:n,to:i}:o.wpoLayoutHistory={time:r,changeKey:t,from:n,to:i};await f.U.savePreferenceSetting(a.Xm.layoutHistory,o)}(e,t,n,i,r))}async function H(){const e=await f.U.getPreferenceSetting(a.Xm.layoutHistory,!0);return e&&e.value}async function W(){const e=await f.U.getPreferenceSetting(a.Xm.wpo),t=e&&e.value,n=t&&t.recommendedLayoutRetargetHistory&&t.recommendedLayoutRetargetHistory.length;return n?n+"":"0"}function q(){const e=(0,g.$o)().getObject("AdminPortalSettings");if(!e)return!1;const{isOfficeContentEnabled:t,isShowCompanyAndIndustry:n}=e;return!t&&!n}async function V(){const{enabled:e}=await b();return!(null==e||!e.length)&&(e.includes("msNtpExp12")||e.includes("msNtpExp13")||e.includes("msNtpExp14"))}async function G(){try{var e,t;const n=await H();let i=n&&n.wpoLayoutHistory,r=n&&n.userLayoutHistory;const o={};return i||(i=await async function(){const e=await f.U.getPreferenceSetting(a.Xm.wpo),t=e&&e.value,n=t&&t.layoutHistory;if(n&&n.length){const e=n[0];return{time:e.time,changeKey:"layout",from:a.Uq[e.from],to:a.Uq[e.to]}}return null}()),r||(r=await async function(){const e=await v.L.getPreferenceSetting(a.nc.layout_mode,!0),t=e&&e;return t?{time:t.timestamp,changeKey:"layout",from:8,to:t.value}:null}()),null!==(e=i)&&void 0!==e&&e.time&&(o.promotion=`${i.time}_${"layout"==i.changeKey?"l":"f"}_${i.from}_${i.to}`),null!==(t=r)&&void 0!==t&&t.time&&(o.selection=`${r.time}_${"layout"==r.changeKey?"l":"f"}_${r.from}_${r.to}`),o}catch(e){return{}}}async function z(){if((0,h.N)()&&window.caches){return(await window.caches.open("edgenext-pre-V1").then((e=>e.matchAll()))).find((e=>e.url.includes("/common.")))}}function j(){window&&window.chrome&&window.chrome.ntpSettingsPrivate&&window.chrome.ntpSettingsPrivate.onNtpFeedbackSubmitted&&window.chrome.ntpSettingsPrivate.onNtpFeedbackSubmitted.addListener((()=>{K()}))}const K=async()=>{const e=m.Al.ClientSettings?m.Al.ClientSettings.aid:"";let t=d.M0.getPageMetadata().JoinIdProps.IDXId;if(t){const n=t.split(",");t=n.slice(0,10).toString();const i={serviceType:"oneservice",oneServiceTraceId:t,oneServiceActivityId:e};d.M0.sendTraceInfoEvent(i)}};function Q(){const e=m.Al&&m.Al.Diagnostics||{};return e&&(0,r.fB)(JSON.stringify(e))}function Z(){const e=Z;return new Promise((t=>{void 0!==e.cache&&t(e.cache);const n=i=>{i>3&&(e.cache=null,t(null));const r=document.getElementById("ntp-diagnostics");r&&r.innerText?(e.cache=r,t(r)):(i++,setTimeout((()=>n(++i)),3e3))};n(0)}))}async function J(e,t,n,i){try{(e||t)&&w.push({id:e,debug:t}),await Promise.all([(0,y.F_)(),(0,s.lr)()]);const r=await Z();if(r&&r.innerText){const e=JSON.parse(r.innerText);Object.assign(e,{traceInfo:w}),Object.assign(e,{prgDiagnostics:Q()}),Object.assign(e,{authTrail:n}),Object.assign(e,{countryConfidenceFactor:(0,o.q)()}),i&&Object.assign(e,{ocvSource:i}),r.innerText=JSON.stringify(e)}}catch{d.M0.sendAppErrorEvent({...l.vxy,message:"Error throwed during update idxid into diagnostic element"})}}function X(e,t){const n=S(t);return n?n.createScriptURL(e):((0,u.OO)(new Error("Trusted Types policy creation error"),l.qS2,"Trusted Types policy creation failed, Trusted Types API is unavailable."),e)}async function Y(){var e,t,n,i;if(null===(e=window)||void 0===e||null===(t=e.chrome)||void 0===t||null===(n=t.embeddedSearch)||void 0===n||null===(i=n.newTabPage)||void 0===i||!i.getTabTimings)return;const r=(0,p.Ou)();window.chrome.embeddedSearch.newTabPage.getTabTimings(((e,t)=>{e&&t&&void 0!==t.tabStartToNavigationStart&&(r.tabStartToNavigationStart=Math.round(t.tabStartToNavigationStart))}))}async function ee(){var e;const t=await f.U.getPreferenceSetting("background_setting_preferences",!0);return null==t||null===(e=t.value)||void 0===e?void 0:e.backgroundSelectionMetadata}function te(e){var t,n,i,r,o,a,s,c,d;if(null!==(t=window)&&void 0!==t&&null!==(n=t.chrome)&&void 0!==n&&null!==(i=n.ntpSettingsPrivate)&&void 0!==i&&i.activateTriggerWithPageType&&null!==(r=window)&&void 0!==r&&null!==(o=r.chrome)&&void 0!==o&&null!==(a=o.ntpSettingsPrivate)&&void 0!==a&&a.NTPTrigger&&null!==(s=window)&&void 0!==s&&null!==(c=s.chrome)&&void 0!==c&&null!==(d=c.ntpSettingsPrivate)&&void 0!==d&&d.PageType){var l,u,p;const t="1"===new URLSearchParams(null===(l=window)||void 0===l||null===(u=l.location)||void 0===u?void 0:u.search).get("startpage");window.chrome.ntpSettingsPrivate.activateTriggerWithPageType(null===(p=window.chrome.ntpSettingsPrivate.NTPTrigger)||void 0===p?void 0:p[e],t?window.chrome.ntpSettingsPrivate.PageType.DHP:window.chrome.ntpSettingsPrivate.PageType.NTP)}}const ne="widgetLockScreenLandingSessions";async function ie(){const e=await re()||[];return e.push({ts:Date.now()}),await f.U.savePreferenceSetting(ne,e)?e:null}async function re(){return await f.U.getPreferenceSetting(ne).then((e=>null!=e&&e.value?e.value:null))}},28496:function(e,t,n){"use strict";n.d(t,{MN:function(){return s},j0:function(){return i}});var i,r,o,a=n(31558);!function(e){e.NTP_TOP_SITES_CLICK="NTP_TopSites_Click"}(i||(i={})),function(e){e.testTemplate="ntp_profile_scope_tab_functional_notification"}(r||(r={})),function(e){e.PrimaryCTAClicked="PrimaryCTA_Clicked",e.DismissedCTA_Clicked="DismissedCTA_Clicked",e.Notification_Ignored="Notification_Ignored"}(o||(o={}));class s{static isEdgeNurturingAvailable(){var e;return(0,a.N)()&&(null===(e=window.chrome)||void 0===e?void 0:e.edgeNurturingPrivate)}static async getToken(e,t){return new Promise((n=>{var i,r;(0,a.N)()?"function"==typeof(null===(i=window.chrome)||void 0===i||null===(r=i.edgeNurturingPrivate)||void 0===r?void 0:r.GetToken)?window.chrome.edgeNurturingPrivate.GetToken(e,t,"NTP",(e=>{n(e)})):n({Message:"window.chrome.edgeNurturingPrivate.GetToken API Unavailable"}):n({Message:"Cannot use DOM"})}))}static updateCTA(e,t){var n,i;(0,a.N)()&&"function"==typeof(null===(n=window.chrome)||void 0===n||null===(i=n.edgeNurturingPrivate)||void 0===i?void 0:i.UpdateCTA)&&window.chrome.edgeNurturingPrivate.UpdateCTA(e,t)}static notifyTriggerEvent(e){return new Promise((t=>{var n,i;(0,a.N)()&&"function"==typeof(null===(n=window.chrome)||void 0===n||null===(i=n.edgeNurturingPrivate)||void 0===i?void 0:i.NotifyTriggerEvent)&&window.chrome.edgeNurturingPrivate.NotifyTriggerEvent(e,(e=>{t(e)}))}))}}},37423:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var i=n(23549),r=n(7183),o=n(21789);const a=`reloadCount_${"undefined"!=typeof window?window.location.href:""}`;function s(e,t,n){if(i.M0.sendAppErrorEvent({...e,message:"Navigating to local ntp page on exception.",pb:{...e.pb,customMessage:t,stack:n&&n.stack}}),o.jG.IsDebug)return;const r=new URLSearchParams;e&&r.set("ntperror",e.id);const a=i.M0.getRequestId();a&&r.set("rid",a),i.M0.flush(!0,"AppError"),setTimeout((()=>{location.replace("chrome-search://local-ntp/local-ntp.html?"+r.toString())}),2e3)}const c={tryReloadNtpPage:function(e,t,n,o){if(!r.y7.supported)return void s(t,`sessionStorage is not supported. ${n}`);if(r.y7.getItem(a)){const e=r.y7.getItem(a),i=e&&parseInt(e)||0;if(!(i<2))return void s(t,`Max reload count (2) reached. ${n}`,o);r.y7.setItem(a,i+1+"")}else r.y7.setItem(a,"1");i.M0.sendAppErrorEvent({...e,message:"Reloading NTP page on exception.",pb:{...e.pb,customMessage:n,stack:o&&o.stack}}),i.M0.flush(!0,"AppError"),setTimeout((()=>{location.reload()}),2e3)},redirectToLocalNtp:s}},62929:function(e,t,n){"use strict";var i;function r(e,t,n=performance.now()){var i,r,o;const a=null===(i=window)||void 0===i||null===(r=i.chrome)||void 0===r||null===(o=r.embeddedSearch)||void 0===o?void 0:o.newTabPage;a&&(a.logEventWithTimestamp?a.logEventWithTimestamp(e,n,t):a.logEvent(e))}n.d(t,{f:function(){return r}}),function(e){e[e.NTP_ALL_TILES_LOADED=11]="NTP_ALL_TILES_LOADED",e[e.NTP_SHORTCUT_CUSTOMIZED=39]="NTP_SHORTCUT_CUSTOMIZED",e[e.NTP_CUSTOMIZE_ADD_SHORTCUT_CLICKED=44]="NTP_CUSTOMIZE_ADD_SHORTCUT_CLICKED",e[e.NTP_CUSTOMIZE_SHORTCUT_REMOVE=53]="NTP_CUSTOMIZE_SHORTCUT_REMOVE",e[e.NTP_CUSTOMIZE_SHORTCUT_CANCEL=54]="NTP_CUSTOMIZE_SHORTCUT_CANCEL",e[e.NTP_CUSTOMIZE_SHORTCUT_DONE=55]="NTP_CUSTOMIZE_SHORTCUT_DONE",e[e.NTP_CUSTOMIZE_SHORTCUT_ADD=58]="NTP_CUSTOMIZE_SHORTCUT_ADD",e[e.NTP_CUSTOMIZE_SHORTCUT_UPDATE=59]="NTP_CUSTOMIZE_SHORTCUT_UPDATE",e[e.NTP_BACKGROUND_IMAGE_LOADED=60]="NTP_BACKGROUND_IMAGE_LOADED",e[e.NTP_VISUALLY_READY=62]="NTP_VISUALLY_READY",e[e.NTP_SMARTLIST_ENABLED=63]="NTP_SMARTLIST_ENABLED",e[e.NTP_SMARTLIST_DISABLED=64]="NTP_SMARTLIST_DISABLED"}(i||(i={}))},33497:function(e,t,n){"use strict";n.d(t,{J:function(){return c}});var i=n(10754),r=n(13334),o=n(15840),a=n(67213);let s=!1;function c(){if(!s&&((0,a.ZE)()||r.Al&&r.Al.CurrentFlightSet&&r.Al.CurrentFlightSet.has("prg-lowmemdhp"))){const e=(0,i.Ou)();Object.prototype.hasOwnProperty.call(e,"Auth.GetSignInStateAsync-start")&&(e["Auth.GetSignInStateAsync-start"]-=(0,o.my)(),s=!0)}}},36867:function(e,t,n){"use strict";n.d(t,{L:function(){return c}});var i=n(55524),r=n(291),o=n(14908),a=n(7476);class s extends o.N{constructor(){super("ntp.record_user_choices","setting","value",{setting:"default",source:"default layout",timestamp:0,value:-1})}static getInstance(){return i.Gq.get("__RecordUserChoicesManager__",(()=>new s))}async deleteKeyValueFromPSL(e){try{let t=await this.getPreferenceSettingValueArray()||[];return t=t.filter((t=>t&&t[this.searchForKeyName]!==e)),this.setAndSavePreferenceSetting(t)}catch(t){const n="Failed to delete user preference setting";return this.logAppError(a.nS9,n,`Key:${e}.Error:${t}`),!1}}}const c=(0,r.h)(s)},87172:function(e,t,n){"use strict";n.d(t,{H:function(){return h},U:function(){return g}});var i=n(55524),r=n(291),o=n(7476),a=n(14908),s=n(45870),c=n(23549),d=n(31558),l=n(52965);function u(e,t){return(e||[]).find((e=>(null==e?void 0:e.key)===t))||null}function p(e,t){const{key:n,value:i,deleteKey:r=!1}=t;let o=e||[];if(r)o=o.filter((e=>e&&(null==e?void 0:e.key)!==n));else{const e=o.findIndex((e=>(null==e?void 0:e.key)===n));if(e>-1)o[e]={...o[e],value:i};else{const e={key:n,value:i};o.push(e)}}return o}class h extends a.N{constructor(){super("ntp.user_nurturing","key","value",{key:"default",value:"none"}),this._latestItems=[],this._initializeCachedItemsPromise=new s.o}static getInstance(){return i.Gq.get("__UserNurturingManager__",(()=>new h))}async savePreferenceSetting(e,t,n=!1){try{return await this._initializeCachedItems(),this._updateCachedItems({key:e,value:t,deleteKey:n}),await this._updatePersistedItems({key:e,value:t,deleteKey:n})}catch(t){const n="Failed to store user nurturing preference";return this.logAppError(o.nS9,n,`Key:${e}.Error:${t}`),!1}}async getPreferenceSetting(e,t){try{if(await this._initializeCachedItems(),t){const t=await this._getPersistedItemByKey(e);return this._updateCachedItems({key:e,value:null==t?void 0:t.value,deleteKey:!1}),t}return this._getCachedItemByKey(e)}catch(t){const n=`Failed to find user preference key: ${e}`;return this.logAppError(o.Aps,n,t),null}}async getClonedPreferenceSetting(e,t){const n=await this.getPreferenceSetting(e,t);return(0,l.Z)(n)}async _initializeCachedItems(){var e,t,n,i,r,a;if(this._initializeCachedItemsPromise.wasSet())return this._initializeCachedItemsPromise.getResultAsync();const s=Date.now();null!==(e=window)&&void 0!==e&&null!==(t=e.chrome)&&void 0!==t&&null!==(n=t.ntpSettingsPrivate)&&void 0!==n&&n.getPref&&c.M0.addOrUpdateTmplProperty("psl_loading_time","-1");try{this._items=await this.getPreferenceValueFromBrowser()||[],this._latestItems=(0,l.Z)(this._items)}catch(e){const t="Failed to initialize cached items for UserNurturingManager";this.logAppError(o.Aps,t,e)}null!==(i=window)&&void 0!==i&&null!==(r=i.chrome)&&void 0!==r&&null!==(a=r.ntpSettingsPrivate)&&void 0!==a&&a.getPref&&c.M0.addOrUpdateTmplProperty("psl_loading_time",(Date.now()-s).toString()),this._initializeCachedItemsPromise.set(),this._listenToPreferenceChange()}_getCachedItemByKey(e){return u(this._items,e)}async _getPersistedItemByKey(e){return u(this._latestItems,e)}_updateCachedItems(e){this._items=p(this._items,e)}async _updatePersistedItems(e){const t=this._latestItems;return this.setAndSavePreferenceSetting(p(t,(0,l.Z)(e)))}deleteKeyValueFromPSL(e){this.savePreferenceSetting(e,null,!0)}_listenToPreferenceChange(){(0,d.N)()&&window.chrome&&window.chrome.ntpSettingsPrivate&&window.chrome.ntpSettingsPrivate.onPrefsChanged.addListener((e=>{const t=(e||[]).find((e=>(null==e?void 0:e.key)===this.prefSettingKey));t&&(this._latestItems=(0,l.Z)(t.value||[]))}))}}const g=(0,r.h)(h)},74161:function(e,t,n){"use strict";n.d(t,{Nn:function(){return l},Uq:function(){return p},Xm:function(){return i},_9:function(){return d},nc:function(){return s},rr:function(){return a},sj:function(){return o},st:function(){return c},ui:function(){return u}});const i={campaigns:"campaigns",feedLayout:"feed_layout",renderSingleColumn:"render_single_column",wpo:"wpo",wpoLytTmpl:"wpo_lyt_tmpl",topSites:"top_sites",recommendedSites:"recommended_sites",viewport:"viewport",wpo_nx:"wpo_nx",layoutPromotion:"layoutPromotion",layoutHistory:"layoutHistory"};var r,o,a;!function(e){e.Ntp="ntp",e.Wpo="wpo"}(r||(r={})),function(e){e.MultiColumn="multi",e.SingleColumn="single"}(o||(o={})),function(e){e.apiError="api_error"}(a||(a={}));const s={tscollapsed:"tscollapsed",layout_mode:"layout_mode",left_rail:"left_rail",quick_links_options:"quick_links_options",single_column:"single_column",recommended_sites:"recommended_sites",daily_discovery_in_search_box:"daily_discovery_in_search_box",news_below_searchbox:"news_below_searchbox",ntp_tips:"ntp_tips",search_history:"search_history",current_location_enabled:"current_location_enabled",enable_sponsored_content:"enable_sponsored_content",enable_split_screen:"enable_split_screen",hide_search_box:"hide_search_box",seen_interest_fre_count:"seen_interest_fre_count",visited_following_feed:"visited_following_feed",dismiss_scroll_down_button:"dismiss_scroll_down_button",bing_intl_upsell:"bing_intl_upsell",breaking_news_dismissed:"breaking_news_dismissed"};var c;!function(e){e.User="user",e.Wpo="wpo"}(c||(c={}));const d={backgroundImageTypePolicy:"ntp.background_type_blocked_by_policy",currentBackgroundImageType:"ntp.background_image_type",hideDefaultTopSites:"ntp.hide_default_top_sites",customBackgroundImageInfo:"ntp.local_background_image",layout:"ntp.layout_mode",quickLinks:"ntp.show_top_sites",quickLinksDisplaySetting:"ntp.quick_links_options",imageOfTheDay:"ntp.show_image_of_day",feeds:"ntp.news_feed_display",greeting:"ntp.show_greeting",showSettings:"ntp.show_settings",verticalTabsCollapsed:"edge.vertical_tabs.collapsed",verticalTabsOpened:"edge.vertical_tabs.opened",singleColumnEnabled:"ntp.single_column.enabled",userNurturingUpdated:"ntp.user_nurturing",hasUserSeenNewFre:"new_device_fre.has_user_seen_new_fre",defaultBrowserSettingEnabled:"browser.default_browser_setting_enabled",showAppLauncher:"ntp.enable_app_launcher",userChoices:"ntp.record_user_choices",selectedFeedPivot:"ntp.selected_feed_pivot"},l="_split";var u,p;!function(e){e.NotInChinaCoachMarkButton="notInChinaCoachMarkButton",e.FeedbackLink="feedbackLink"}(u||(u={})),function(e){e[e.focused=0]="focused",e[e.inspirational=1]="inspirational",e[e.informational=2]="informational",e[e.custom=3]="custom"}(p||(p={}))},97715:function(e,t,n){"use strict";n.d(t,{U:function(){return s}});var i=n(88826),r=n(7476),o=n(53629),a=n(88672);function s(){try{var e;const t=(o.k.getWpoTreatmentsWithType(a._h.layoutPromotion)??[]).filter((e=>{var t;return"PageContentLayout"===(null==e||null===(t=e.properties)||void 0===t?void 0:t.layoutType)}));return(null==t?void 0:t.length)>0?null===(e=t[0])||void 0===e?void 0:e.properties:null}catch(e){const t="Error in getting wpo layout promotion config";(0,i.H)(r.Od5,t,`error:${e}`)}return null}},20300:function(e,t,n){"use strict";n.d(t,{P6:function(){return f},YZ:function(){return y},vT:function(){return v}});var i=n(88672),r=n(88826),o=n(7476),a=n(23549),s=n(53629),c=n(45266),d=n(2587),l=n(36867),u=n(74161),p=n(87172),h=n(55524);const g="__storedRecommendedSitesState__",m="__storedRecommendedSitesCoachMarkState__";async function f(e){let t=h.Gq.get(g);if(t)return t;if(t=c.yR.tworows,e.enableRecommendedSitesSelection){const n=await async function(){if(!await l.L.isApiAvailableToUse())return null;const e=await l.L.getPreferenceSetting(u.nc.recommended_sites);if(e&&void 0!==e.value)return c.$_[e.value];return null}();if(n)t=n;else{const n=function(){try{var e,t;const n=s.k.getWpoTreatmentsWithType(i._h.recommendedsitesCollapse),r=(null==n?void 0:n.length)>0&&(null===(e=n[0])||void 0===e||null===(t=e.properties)||void 0===t?void 0:t.recommendedSitesCollapsibleControlConfig);if(r)return r}catch(e){const t="Error in getting wpo recommended sites config";(0,r.H)(o.Od5,t,`error:${e}`)}return null}(),l=e.enableWpoRecommededSitesConfigOverride?n:null;if(l&&l.recommendedSiteStatus){const e=await async function(){if(!await p.U.isApiAvailableToUse())return null;const e=await p.U.getPreferenceSetting(u.nc.recommended_sites);if(e&&e.value&&void 0!==e.value.type)return c.$_[e.value.type];return null}();e&&e===l.recommendedSiteStatus?t=e:(t=l.recommendedSiteStatus,a.M0.addOrUpdateTmplProperty("WpoPromRecSite","1"),t===c.yR.off?h.Gq.set(m,d.gz.recommendedSitesPromotionOff):h.Gq.set(m,d.gz.recommendedSitesPromotionNewLine),async function(e){if(!await p.U.isApiAvailableToUse())return;const t={source:"wpo",timestamp:(new Date).getTime(),type:c.$N[e]};p.U.savePreferenceSetting(u.Xm.recommendedSites,t)}(t))}}}return t===c.yR.onerow&&(t=c.yR.tworows),a.M0.addOrUpdateTmplProperty("RecommendedSites",t.toString()),h.Gq.set(g,t),t}async function v(e){if(!await l.L.isApiAvailableToUse())return;const t={setting:u.nc.recommended_sites,source:"ntp",timestamp:(new Date).getTime(),value:c.$N[e]};l.L.savePreferenceSetting(u.nc.recommended_sites,t)}function y(){const e=h.Gq.get(m);return e||null}},84424:function(e,t,n){"use strict";n.d(t,{DU:function(){return S},NU:function(){return C},R:function(){return y},VL:function(){return w},jt:function(){return v},r4:function(){return b}});var i=n(55524),r=n(31558),o=n(45266),a=n(88826),s=n(7476),c=n(88672),d=n(13334),l=n(91046),u=n(23549),p=n(36867),h=n(74161),g=n(53629);const m="__StoredTopSitesState__",f="__TopSitesCollapsibleControlConfig__";function v(e,t){if(t&&i.Gq.set(f,t),e){const e=y();e&&i.Gq.set(f,e)}}function y(){try{var e,t;const n=g.k.getWpoTreatmentsWithType(c._h.topsitesCollapse),r=g.k.getWpoTreatmentsWithType(c._h.topSites),o=[...n||[],...r||[]],a=(null==o?void 0:o.length)>0&&(null===(e=o[0])||void 0===e||null===(t=e.properties)||void 0===t?void 0:t.topSitesCollapsibleControlConfig)||void 0;return(null!=a&&a.promoteTopSitesTop||null!=a&&a.promoteTopSites2Row)&&window.isSSREnabled&&(a.promoteTopSitesTop=!1,a.promoteTopSites2Row=!1),i.Gq.set(f,a),a||null}catch(e){const t="Error in getting wpo topSites config";(0,a.H)(s.Od5,t,`error:${e}`)}return null}function S(){try{const e=g.k.getWpoTreatmentsWithType(c._h.topSitesPromotion),t=g.k.getWpoTreatmentsWithType(c._h.topSites),n=[...e||[],...t||[]];if((null==n?void 0:n.length)>0&&n[0].properties)return n[0].properties}catch(e){const t="Error in getting wpo topSites config";(0,a.H)(s.Od5,t,`error:${e}`)}return null}async function C(e){const t=await p.L.getPreferenceSetting(h.nc.tscollapsed),n=null==t?void 0:t.value;(0,r.N)()||function(e){var t;const n=null===(t=d.Al.EdgeNTPHeader)||void 0===t?void 0:t.tscollapsed;if(void 0!==n&&n!==e){"true"===(0,l.L)().get("mock-ntp-header")||u.M0.sendAppErrorEvent({...s.sFk,message:"SSR - Edge header mismatch.",pb:{...s.sFk.pb,customMessage:`key: tsCollapsed, header: ${n}, state: ${e}`}})}}(n);const a=i.Gq.get(f)||y();if(void 0!==n||!a)return 1===n;const c=i.Gq.get(m);if(void 0!==c)return c;let g=a.collapsibleControlIsDefaultCollapsed;return g&&a.collapseForDefaultInformational&&(g=e.currentLayout===o.nP.informational),i.Gq.set(m,!!g),!!g}async function w(e){if((null==e?void 0:e.selectedQuickLinksDisplaySetting)===o.Z3.top)return!1;const t=await p.L.getPreferenceSetting(h.nc.quick_links_options);let n=!1,r="";if(!(null==t||!t.value))n=t.value===o.Z3.top,r="user";else{const e=i.Gq.get(f)||y();n=!(null==e||!e.promoteTopSitesTop),r="wpo"}return n&&u.M0.addOrUpdateTmplProperty("promoteTopsitesTopFrom",r),n}function b(e,t=!1){var n;let r=null,a=null;if(e&&e.length)for(const t of e)t.setting===h.nc.tscollapsed&&(r=t),t.setting===h.nc.quick_links_options&&(a=t);const s=i.Gq.get(f)||y();if(r&&1===r.value)return!0;if(void 0===(null===(n=r)||void 0===n?void 0:n.value)){if(!0===i.Gq.get(m))return!0;if(s&&s.collapsibleControlIsDefaultCollapsed)return!0}return!(!a||a.value!==o.Z3.top)||!(!t||a||!s||!s.promoteTopSitesTop)}},78419:function(e,t,n){"use strict";n.d(t,{h:function(){return $}});var i=n(98619),r=n(50632),o=n(28467),a=n(76379),s=n(43438),c=n(13334),d=n(21789),l=n(95153),u=n(72322),p=n(23549),h=n(60844),g=n(62433),m=n(67103),f=n(95244),v=n(72626);v.kP&&(window.telemetryEventsClear=()=>{window.telemetryEvents=[]},window.telemetryEventsFlush=()=>{const e={...window.telemetryEvents};return window.telemetryEventsClear(),e});const y=function(e){v.kP&&(window.telemetryEvents=window.telemetryEvents||[],window.telemetryEvents.push(e))},S=[{type:f.G.OneDS,transporterConfig:{key:"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028",endpoint:"https://events-sandbox.data.msn.com/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.msn.com/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}},{type:f.G.Debug,mapper:new m.k,transporterConfig:{callback:y}},{type:f.G.Debug,mapper:new h.P,transporterConfig:{callback:y}},{type:f.G.Debug,mapper:new g.O,transporterConfig:{callback:y}}],C=[{type:f.G.OneDS,transporterConfig:{key:"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028",endpoint:"https://events-sandbox.data.msn.cn/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.msn.cn/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}},{type:f.G.Debug,mapper:new m.k,transporterConfig:{callback:y}},{type:f.G.Debug,mapper:new h.P,transporterConfig:{callback:y}},{type:f.G.Debug,mapper:new g.O,transporterConfig:{callback:y}}],w=[{type:f.G.OneDS,transporterConfig:{key:"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028",endpoint:"https://events-sandbox.data.microsoftstart.com/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.microsoftstart.com/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}},{type:f.G.Debug,mapper:new m.k,transporterConfig:{callback:y}},{type:f.G.Debug,mapper:new h.P,transporterConfig:{callback:y}},{type:f.G.Debug,mapper:new g.O,transporterConfig:{callback:y}}],b=[{type:f.G.OneDS,transporterConfig:{key:"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028",endpoint:"https://events-sandbox.data.microsoftstart.cn/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.microsoftstart.cn/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}},{type:f.G.Debug,mapper:new m.k,transporterConfig:{callback:y}},{type:f.G.Debug,mapper:new h.P,transporterConfig:{callback:y}},{type:f.G.Debug,mapper:new g.O,transporterConfig:{callback:y}}],T=[{type:f.G.OneDS,transporterConfig:{key:"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279",endpoint:"https://browser.events.data.msn.com/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.msn.com/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}}],k=[{type:f.G.OneDS,transporterConfig:{key:"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279",endpoint:"https://browser.events.data.msn.cn/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.msn.cn/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}}],P=[{type:f.G.OneDS,transporterConfig:{key:"c498711f02654edca8a715ca6e1cb4d4-dc31da17-845c-4cca-84e5-547d05dad708-6945",endpoint:"https://browser.events.data.msn.com/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.msn.com/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}}],I=[{type:f.G.OneDS,transporterConfig:{key:"c498711f02654edca8a715ca6e1cb4d4-dc31da17-845c-4cca-84e5-547d05dad708-6945",endpoint:"https://browser.events.data.msn.cn/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.msn.cn/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}}],A=[{type:f.G.OneDS,transporterConfig:{key:"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279",endpoint:"https://browser.events.data.microsoftstart.com/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.microsoftstart.com/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}}],E=[{type:f.G.OneDS,transporterConfig:{key:"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279",endpoint:"https://browser.events.data.microsoftstart.cn/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.microsoftstart.cn/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}}],x=[{type:f.G.OneDS,transporterConfig:{key:"c498711f02654edca8a715ca6e1cb4d4-dc31da17-845c-4cca-84e5-547d05dad708-6945",endpoint:"https://browser.events.data.microsoftstart.com/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.microsoftstart.com/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}}],M=[{type:f.G.OneDS,transporterConfig:{key:"c498711f02654edca8a715ca6e1cb4d4-dc31da17-845c-4cca-84e5-547d05dad708-6945",endpoint:"https://browser.events.data.microsoftstart.cn/OneCollector/1.0"}},{type:f.G.CTag,transporterConfig:{endpoint:"https://c.microsoftstart.cn/c.gif"}},{type:f.G.Comscore,transporterConfig:{endpoint:"https://sb.scorecardresearch.com/b"}}],L=[{type:f.G.SuperApp,transporterConfig:{enableConsoleLog:!0}}],D=[{type:f.G.OneDS,transporterConfig:{key:"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279",endpoint:"https://browser.events.data.msn.com/OneCollector/1.0"}}],R={};R.enterprise=P,R.enterpriseCN=I,R.enterpriseMicrosoftStart=x,R.enterpriseCNMicrosoftStart=M,R.int=S,R.intCN=C,R.intMicrosoftStart=w,R.intCNMicrosoftStart=b,R.prod=T,R.prodCN=k,R.prodMicrosoftStart=A,R.prodCNMicrosoftStart=E,R.superApp=L,R.superAppWeb=D;var F=n(31558),O=n(70956),B=n(85663),N=n(21930);class ${static initPage(e,t,n){const i=c.Al&&c.Al.ClientSettings||{},{pageGenTime:r=null}=i||{};p.M0.initPage(e,n||d.jG.ActivityIdLowerCaseNoHypens,d.jG.BuildVersion,d.jG.FrontDoorMuid,r),t&&(0,N.b1)().then((()=>p.M0.initScrollPerformanceTrackers())),s.A.subscribe(s.U.Initialized,U)}static getAppTypeTelemetryContract(e,t,n,i){const r=c.Al&&c.Al.ClientSettings||{},o=c.Al&&c.Al.Diagnostics||{},{mc:a={}}=o||{},{geo_citycf:s=null,geo_countrycf:p=null,requestTrailInfo:h}=r||{},{cdn:g=null}=h||{},m=r.browser&&"true"===r.browser.ismobile||"phone"===r.deviceFormFactor,f="true"===r.static_page;let v,y,S,C,w=d.jG.CurrentRequestTargetScope&&d.jG.CurrentRequestTargetScope.pageExperiments&&d.jG.CurrentRequestTargetScope.pageExperiments.join(",");i.flights&&(w=i.flights),w=function(e,t,n){if(!n)return n;if("edgeChromium"===e&&t===u.IY.ENUS)return n.includes("prg-keepflt")?n:void 0;return n.includes("prg-remflttel")?void 0:n}(d.jG.AppType,d.jG.CurrentMarket,w),v=i.pageType?i.pageType:r.pagetype,y=i.pageContentTitle?i.pageContentTitle:(0,F.N)()?document.title:"",S=i.pageUrl?i.pageUrl:(0,F.N)()?document.URL:(0,l.DO)(t),C=i.pageViewType?i.pageViewType:$.trackCallbacks(n);let b=d.jG.CurrentMarket;i.locale&&(b=i.locale);return{browser:{isMobile:m},flight:{id:w},locale:{mkt:b,lang:d.jG.MarketRequestInputLanguage,region:d.jG.MarketRequestInputRegion,geo_cc:d.jG.MarketRequestInputGeoCountry,mktReason:d.jG.MarketDetectionType},page:{appType:d.jG.AppType,canvas:e.pageCanvas,config:e.pageConfiguration,content:{title:y,...!(0,B.isNullOrUndefined)(e.pageContentCategory)&&{category:e.pageContentCategory},...!(0,B.isNullOrUndefined)(e.pageContentSubCategory)&&{subcategory:e.pageContentSubCategory},...!(0,B.isNullOrUndefined)(e.pageContentDomainId)&&{domainId:e.pageContentDomainId},...!(0,B.isNullOrUndefined)(e.pageContentId)&&{id:e.pageContentId},...!(0,B.isNullOrUndefined)(e.pageContentVertical)&&{vertical:e.pageContentVertical}},isAdEnabled:!1,isAutoRefresh:!1,isJSEnabled:!0,isStatic:f,name:e.pageName,ocid:e.pageOcid,product:e.pageProduct,type:v,url:S,viewType:C,...!(0,B.isNullOrUndefined)(e.pageTheme)&&{theme:e.pageTheme},...!(0,B.isNullOrUndefined)(e.pageHas3PSearch)&&{has3PSearch:e.pageHas3PSearch}},debug:{cetoId:d.jG.ActivityIdLowerCaseNoHypens||null,cdn:g,cookies:a,geoCityCf:s,geoCountryCf:p,langMismatch:d.jG.MarketMismatchDetail||null},...(!(0,B.isNullOrUndefined)(e.userSignInStatus)||!(0,B.isNullOrUndefined)(e.userSsoStatus)||!(0,B.isNullOrUndefined)(e.userAadState))&&{user:{...!(0,B.isNullOrUndefined)(e.userSignInStatus)&&{isSignedIn:e.userSignInStatus},...!(0,B.isNullOrUndefined)(e.userSsoStatus)&&{isSso:e.userSsoStatus},...!(0,B.isNullOrUndefined)(e.userAadState)&&{aadState:e.userAadState}}}}}static getAppTypeTrackingSystemConfig(e){return function(e,t,n,i){const r=e&&e.includes("microsoftstart.com")?"MicrosoftStart":"";let o;return o="prod"===t?i?"enterprise":"prod":"int",R[`${o}${n?"CN":""}${r}`]}(c.Al&&c.Al.ClientSettings&&c.Al.ClientSettings.domain,d.jG.Environment,d.jG.IsChinaCompliance,e)}static trackCallbacks(e){let t="";switch((0,i.Bn)().currentColumnArrangement){case e.singleColSupported&&r.K$.c1:t="size1column";break;case!e.singleColSupported&&r.K$.c1:case r.K$.c2:t="size2column";break;case r.K$.c3:t="size3column";break;case r.K$.c4:t="size4column";break;case e.fiveColSupported&&r.K$.c5:t="size5column"}return t}static hasFlight(e){const t=d.jG.CurrentRequestTargetScope&&d.jG.CurrentRequestTargetScope.pageExperiments,n=(0,O.M)(t);return n&&n.includes(e)}}function U(e){if(e){s.A.get(s.U.CookieConsentProvider)===o.i.OneTrustBanner&&window.addEventListener(a.C,(()=>{const e=p.M0.getPageMetadata();e&&e.contract&&e.contract.page&&(e.contract.page.consentChanged="occ")}))}}},34780:function(e,t,n){"use strict";n.d(t,{sG:function(){return B},ql:function(){return N},If:function(){return O}});var i=n(21930),r=n(10754),o=n(7476),a=n(88826),s=n(20009),c=n(90215);const d=e=>{let t=-1;const n=e[s.w],i=e[s.P9];n&&i&&(t=n-i),e[s.Fz]=t,(0,c.QP)({name:s.Fz,startTime:i,endTime:n})},l=e=>{let t=-1;const n=e[s.w],i=e[s.Wk];i&&n&&(t=i-n),e[s.iL]=t,(0,c.QP)({name:s.iL,startTime:n,endTime:i})};var u=n(43047);function p(e){window.windowsPerfMarker&&window.windowsPerfMarker(e)}var h=n(59450),g=n(43356),m=n(41074),f=n(61153),v=n(77036),y=n(71778),S=n(21789),C=n(75776),w=n(47640),b=n(85205),T=n(96531),k=n(1573),P=n(13334);const I={didPreload:!1,timeTakenForRevealInMs:0,pageRevealed:!0};function A(){const e=T._.getInstance().rootReducer.connector(b.z.Preload);if(!e||!P.Al.IsPreload)return Promise.resolve(I);const t=e.getCurrentState();if(t&&t.pageRevealedData){const e=t.pageRevealedData;return Promise.resolve(e)}return new Promise((e=>{k.X.pageVisibilityChange.registerObserver((t=>{const n=t.params[0];e(n)}))}))}var E=n(9498),x=n(69233),M=n(23549),L=n(58560),D=n(31558),R=n(98850),F=n(45675);function O(e,t,n){if(!(0,D.N)())return;const s=(0,g.S0)();s&&t===i.oN.Primary&&m.g.updateAboveTheFoldVisuallyReady.getActionSender(s).send(performance.now());const c=t===i.oN.Primary,d=(0,i.bO)(t),l=(0,r.Ou)();if(l.IncompleteMarkers=null==d?void 0:d.join(","),(0,f.L)())return void e([]);let u=[];const p=c?o.LwW:o.Nxj;u=c?(0,i.bP)():(0,i.gh)();const h=(0,i.Gb)(),v=h.marker||"None",y=h.value||"None";let S=", Visual dependency callback was unavailable.";if(n){const e=n();S=e.length?`, Incomplete visual dependencies: ${JSON.stringify(e)}.`:", No pending visual dependencies."}(0,a.H)(p,"Missing perf markers",`Missing perf markers: ${JSON.stringify(d)}${S} Last Marked: ${v} ${y}`);const C=(0,i.OZ)();C&&c&&d.includes(`TTVR.${C}`)&&((0,a.H)(o.MmB,"Expected feed timed out while loading",`Expected feed timed out while loading: ${C}`),l&&console.log(JSON.stringify(l))),window.renderCacheEnabled&&c&&(0,R.cB)(),e(u)}async function B(e,t={}){const n=(0,r.Ou)(),{onAfterPageTimingsUpdated:o,disableLoadTimeEvent:a,reportEntityMetrics:c}=t,g=(0,r.Th)();if(g){const{domComplete:e,loadEventStart:t,responseStart:i,domainLookupEnd:r,domainLookupStart:o,domInteractive:a,domContentLoadedEventStart:c,domContentLoadedEventEnd:p,fetchStart:h,connectEnd:m,connectStart:f,workerStart:v,responseEnd:y,requestStart:C,unloadEventStart:w,unloadEventEnd:b,type:T,systemEntropy:k,secureConnectionStart:P}=g;n.timeToFirstByte=i,n.timeToDomComplete=e,n.timeToOnLoad=t,n.domainLookupTime=r-o,n.timeToFetchStart=h,n.timeToWorkerStart=v,n.connectStart=f,n.connectTime=m-f,n.requestStart=C,n.requestTime=i-C,n.responseStart=i,n.responseTime=y-i,n.requestResponseTime=y-C,n.fetchTime=y-h,n.swInitTime=h-v,n.swFetchTime=o-h,n.timeToUnload=b-w,n.timeToInteractive=a,n.domContentLoadedEventStart=c,n.domContentLoadedEventEnd=p,n.navigationType=T,n.systemEntropy=k,n.timeToSecureConnection=P-f,function(e){e.buildVer=S.jG.BuildVersion||-1}(n),function(e){if(performance.getEntriesByType){const t=performance.getEntriesByType("paint").filter((e=>"first-contentful-paint"===e.name));t.length>0&&(e[s.zJ]=Math.round(t[0].startTime))}}(n),(0,u.Oq)(n),(0,u.bg)(n),(0,u.H7)(n),(0,u.zV)(n),(0,u.Am)(n),d(n),l(n)}(0,u.dw)(n),(0,u.iA)(n);for(const t of e){const e=t[0];n[e]||(n[e]=t[1])}const m=(0,i.sx)();m&&(n.ReasonForTTVR=m);const b=n[C.dd];b&&(p(C.jh),p(C.H$),(0,w.Eu)(b),function(e){if(performance&&performance.getEntriesByType&&e&&e[s.MV]){const t=performance.getEntriesByType("navigation");if(t.length){const n=t[0];let i=0,r=0;s.pJ in n&&s.fR in n&&(i=n[s.pJ],r=n[s.fR]),i<0&&r<0&&(e["TTVR."+s.IP]=Math.round(e[s.MV]-i),e["TTVR."+s.Hm]=Math.round(e[s.MV]-r))}}}(n)),v.U.getConfigTimings(n),(0,L.J)(n),n.wasBrowserHiddenAtLeastOnce=(0,f.L)(),(0,h.j)(),o&&o(),(0,E.wY)(),Promise.all([A(),(0,E.lr)()]).then((()=>{(0,w.fv)(n),a||(0,F.J)(window,{reportEntityMetrics:c})})),v.U.refreshConfigCache().then((()=>{!function(){const e=v.U.getResolverErrors();e&&e.length>0&&e.forEach((e=>{M.M0.sendAppErrorEvent(e)}))}()})),(0,y.mS)({id:"PostTtvr",type:"command"})}async function N(e,t,n){const i=(0,r.Ou)(),o=(0,r.Y9)();if((e=e.filter((e=>!(e[0]in i)))).forEach((e=>{const t=e[0];t in i||(o[t]=e[1],i[t]=e[1])})),y.yb){const e=await(0,y.ot)({id:"perfmarkers"},4e3);if(e&&e.fetched){const t=e.payload;t&&t["WW.MyFeed"]&&(t[x.p.feedRequest]=t["WW.MyFeed"]),Object.assign(o,e.payload),Object.assign(i,e.payload)}}o.TimeToSendSecondaryPerfMarkers=Math.round(performance.now()),t&&t(),n||Promise.all([A(),(0,E.lr)()]).then((()=>{(0,F.J)(window,{isSecondaryBeacon:!0})}))}},56401:function(e,t,n){"use strict";n.d(t,{c:function(){return l},f:function(){return u}});var i=n(34780),r=n(47969),o=n(21930),a=n(23549),s=n(70280),c=n(45870),d=n(31558);function l(e,t){let n,i=t,o=(0,r.F)(performance.now());const a=()=>{const t=(0,r.F)(performance.now());i-=t-o,i<=0?e():(o=t,requestAnimationFrame((()=>{n=window.setTimeout(a,i)})))};return requestAnimationFrame((()=>{n=window.setTimeout(a,i)})),()=>{clearTimeout(n)}}async function u(e){if(!(0,d.N)())return;const t=new c.o;e=e||{};let n=!1;async function r(n){var r;null===(r=l)||void 0===r||r(),a.M0.config.autoCaptureContentView=!0,a.M0.observeElementTree(document);const o=!!e.pageLoadEventsAvailableCallback&&!e.pageLoadEventsAvailableCallback();o||a.M0.scheduleContentViewEvent(s.NS.Load);const{contentViewTimeoutOverride:c,onBeforeNotifyCallback:d,reportEntityMetrics:u}=e;c&&a.M0.setContentViewTimeout(c),(0,i.sG)(n,{onAfterPageTimingsUpdated:d&&(()=>{d(n)}),disableLoadTimeEvent:o,reportEntityMetrics:u}),t.set()}let l;const u=window.setTimeout((()=>{n=!0,(0,i.If)((e=>r(e)),o.oN.Primary,e.incompleteVisualDependencyCallback)}),e.timeoutOverride||2e4);return l=()=>window.clearTimeout(u),(0,o.Nv)().then((e=>{n||r(e)})),await t.getResultAsync()}},45675:function(e,t,n){"use strict";n.d(t,{J:function(){return u},O:function(){return c}});var i=n(23549),r=n(10754),o=n(31718),a=n(7476),s=n(96620);const c={};let d=!1;function l(){c.primaryLoadTimeEventSent=!1,c.secondaryLoadTimeEventSent=!1,d=!1}function u(e,t={}){const{isSecondaryBeacon:n,reportEntityMetrics:s}=t,l=Object.assign({},n?(0,r.Y9)():(0,r.Ou)());d||!s&&!n||((0,o.Xn)(l),d=!0),Object.keys(l).length&&(n?c.primaryLoadTimeEventSent||(l.isPrimaryLoadTimeEventSent=!1):l.TimeToSendPrimaryPageTimings=Math.round(performance.now()),function t(){try{if(i.M0&&i.M0.getPageMetadata()){const e=(0,r.A1)()||{};if(n){if(c.secondaryLoadTimeEventSent)return;c.secondaryLoadTimeEventSent=!0}else{if(c.primaryLoadTimeEventSent)return;c.primaryLoadTimeEventSent=!0}i.M0.sendLoadTimeEvent({markers:l,deviceCapabilities:e});const t=(0,r.Ou)();t&&n&&(t.telemetryBeaconFireTime=Math.round(performance.now()))}else e.setTimeout(t,500)}catch(e){i.M0&&i.M0.sendAppErrorEvent({...a.IU$,message:"Unable to send load time event"})}}())}l(),(0,s.U)(l)},38936:function(e,t,n){"use strict";n.d(t,{f:function(){return r}});var i=n(17556);class r{}r.voiceSearchLoaded=new i.C("VoiceSearchLoaded"),r.imageSearchLoaded=new i.C("ImageSearchLoaded")},30523:function(e,t,n){"use strict";n.d(t,{D:function(){return o}});var i=n(76166),r=n(38936);class o extends i.e{voiceSearchLoaded(){r.f.voiceSearchLoaded.getActionSender(this).send()}imageSearchLoaded(){r.f.imageSearchLoaded.getActionSender(this).send()}}},79453:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var i=n(99551),r=n(38936);class o{reduce(e,t){if(!e)return{voiceSearchIsLoaded:!1,imageSearchIsLoaded:!1};if(!t)return e;let n;return i.G.handleAction(t,r.f.voiceSearchLoaded,(()=>{n={...e,voiceSearchIsLoaded:!0}})),i.G.handleAction(t,r.f.imageSearchLoaded,(()=>{n={...e,imageSearchIsLoaded:!0}})),n||e}}},40701:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var i=n(96531);const r=()=>{const e=i._.getInstance().rootReducer.connectors().find((e=>e.namespace.indexOf("ExperienceTracker")>=0));if(!e)return null;const t=e.getCurrentState().visuallyReadyDependencies;return t&&0!==t.size?[...t.keys()]:null}},59619:function(e,t,n){"use strict";n.r(t),n.d(t,{ExperienceTrackerEdgeNextDataConnector:function(){return N},ExperienceTrackerEdgeNextDataReducer:function(){return U},ToolingInfo:function(){return _}});var i,r=n(45266),o=n(85205),a=n(69233),s=n(79545),c=n(46986),d=n(98669),l=n(43356),u=n(41074),p=n(21930),h=n(9119);!function(e){e.VISUALLY_READY_WILL_FIRE="visuallyReadyWillFire",e.VISUALLY_READY_DID_FIRE="visuallyReadyDidFire",e.PAGE_REVEAL_START_WILL_FIRE="pageRevealStartWillFire",e.PAGE_REVEAL_START_DID_FIRE="pageRevealStartDidFire",e.PAGE_REVEAL_COMPLETE_WILL_FIRE="pageRevealCompleteWillFire",e.PAGE_REVEAL_COMPLETE_DID_FIRE="pageRevealCompleteDidFire"}(i||(i={}));var g=n(76166),m=n(17556);class f{}f.addVisuallyReadyDependencies=new m.C("AddVisuallyReadyDependencies"),f.markVisuallyReadyComplete=new m.C("MarkVisuallyReadyComplete");class v extends g.e{constructor(){super(...arguments),this.ttvrMarkers=[],this.getIncompleteVisualDependencies=()=>{const{visuallyReadyDependencies:e}=this.getCurrentState(),t=[];return e.forEach((e=>{e.visuallyReady||t.push(e.experienceType)})),t}}addVisuallyReadyDependencies(e){f.addVisuallyReadyDependencies.getActionSender(this).send(e),e.forEach((e=>{this.ttvrMarkers.push(e),(0,h.w)(e,!0)}))}registerVisuallyReadyObserver(){u.g.updateVisuallyReadyTiming.registerObserver((e=>{const t=e.params[0];if(!t)return;const{experienceType:n,endTime:i}=t;if(null!=i){this.getCurrentState().visuallyReadyDependencies.has(n)&&this.markVisuallyReadyComplete(n)}}))}registerMarkersIfNecessary(e,t,n=!1){if(!(this.ttvrMarkers&&0!==this.ttvrMarkers.length||e&&0!==e.length||t&&0!==t.length))return;const i={};i.TTVR=t?[...this.ttvrMarkers,...t]:this.ttvrMarkers,e&&(i.TTF=e),n&&(i.TTPR=[...this.ttvrMarkers],i.TTPR.push("OverlayRemoval")),(0,p.IO)(i)}registerSecondaryPerfMarkers(e){(0,p.Xl)(e)}registerFeedPerfMarker(e){(0,p.tW)(e)}async markVisuallyReadyComplete(e){const{visuallyReadyDependencies:t}=this.getCurrentState();if(t.get(e).visuallyReady)return;f.markVisuallyReadyComplete.getActionSender(this).send(e);for(const e of t.values())if(!e.visuallyReady)return;const n=(0,l.S0)();n&&(await(0,l.FQ)(i.VISUALLY_READY_WILL_FIRE),performance.measure("VisuallyReady"),u.g.updateAboveTheFoldVisuallyReady.getActionSender(n).send(performance.now()),await(0,l.FQ)(i.VISUALLY_READY_DID_FIRE))}}var y=n(40701),S=n(67213),C=n(72322),w=n(48204),b=n(13334),T=n(21789),k=n(19233),P=n(47467),I=n(85663),A=n(9498),E=n(67044),x=n(14269),M=n(31558),L=n(23549);const D={eventType:d.Gg.aboveTheFoldVisuallyReady},R={eventType:d.Gg.visuallyReady},F={eventType:d.Gg.belowTheFoldTransitionStart},O="prg-gamingfeed",B=[C.IY.ENUS,C.IY.ENGB,C.IY.ENAU,C.IY.ENCA,C.IY.ENIN];class N extends v{constructor(e,t,n,i,r,o,a){super(e,t,n,i,r,o,a),this.initializePromise=this.initialize()}waitForInitialize(){return this.initializePromise}async initialize(){var e,t;const n=await(0,E.oU)(o.z.ChromiumPageSettings),i=await n.getLayoutStateAsync();L.M0.addOrUpdateTmplProperty("layoutState",i?i.toString():"undefined"),this.milestoneDataConnector=(0,l.S0)();const p=[],h=[],g=["TTF"],m=[a.p.searchBox];let{renderCacheConfig:f,feedContentSourceMap:v,enableWaterfallViewFeed:C}=this.config||{};f=f||{};const N=(0,w.$z)(),$="myFeed"===N||""===N,U=C&&$?s.x.waterfallViewFeed:s.x.gridViewFeed,_=!(0,I.isNullOrUndefined)(i.customBackgroundImageInfo)&&i.customBackgroundImageInfo.hasImage,H=i.imageOfTheDayEnabled&&i.currentBackgroundImageType!==r.HX.custom||i.currentBackgroundImageType===r.HX.custom&&_,W={eventType:d.Gg.visuallyReady,experienceType:s.x.commonSearchBoxEdgeNext};h.push(s.x.edgeChromiumPageWC),h.push(s.x.commonSearchBoxEdgeNext),i.quickLinksEnabled&&i.selectedQuickLinksDisplaySetting!==r.Z3.off&&h.push(s.x.topSitesEdgeNextWC),H&&h.push(s.x.backgroundImageWC),p.push((0,l.Qz)(W,s.x.topSitesEdgeNextWC)),p.push((0,l.Qz)(W,s.x.backgroundImageWC)),this.config.measureWatchTTVR&&h.push(s.x.watch);const q=(null===b.Al||void 0===b.Al||null===(e=b.Al.ClientSettings)||void 0===e?void 0:e.audienceMode)===c.F.Enterprise,V=(null===b.Al||void 0===b.Al||null===(t=b.Al.ClientSettings)||void 0===t?void 0:t.audienceMode)===c.F.Kids,G="always"===i.selectedFeedDisplaySetting||"peek"===i.selectedFeedDisplaySetting&&!q;L.M0.addOrUpdateTmplProperty("alwaysShowFeed",!0===G||!1===G?G.toString():"undefined");const z=v&&(0,P.f)(v)===r.iz.Office365,j=T.jG&&T.jG.CurrentRequestTargetScope&&T.jG.CurrentRequestTargetScope.os===x.Q.Xbox,K=(0,P.f)({gaming:r.iz.Gaming})===r.iz.Gaming,Q=(0,P.f)({play:r.iz.Play})===r.iz.Play;if(G&&!V){const e=await T.jG.unsupportedEnterpriseCloud;if(z&&!e)h.push(s.x.productivityHub),h.push(s.x.frequentSitesCardWC),h.push(s.x.calendarCard),h.push(s.x.todoCardWC),(this.isFlightActive("prg-m365news-t")||this.isFlightActive("prg-3snews-t"))&&h.push(s.x.microsoftFeedCard),h.push("FlagshipFeed.render"),p.push((0,l.Qz)(W,s.x.productivityHub));else if(j&&K)this.isFlightActive(O)||B.includes(T.jG.CurrentMarket)?h.push(s.x.gridViewFeed):h.push(s.x.xboxFeedWC);else if(Q);else{const e=U;h.push(e),this.registerFeedPerfMarker(e),g.push("InfopaneFullyRendered");const t=(0,M.N)()&&window.is1SAdsSSRRendered;this.config.disableAdsPerfMarkers||t||(g.push(k.qG.TimeToRequestAd),g.push(k.qG.TimeToServeAd),g.push(k.qG.ApiDuration),g.push(k.qG.RenderReady),g.push(k.qG.TimeToRenderAd))}}L.M0.addOrUpdateTmplProperty("isGridViewFeedVisualDependency",h?h.includes(s.x.gridViewFeed).toString():"undefined");const Z={eventType:d.Gg.visuallyReady,experienceType:U},J={eventType:d.Gg.visuallyReady,experienceType:s.x.xboxFeedWC},X={eventType:d.Gg.visuallyReady,experienceType:s.x.casualGamesLandingV2};let Y,ee,te;switch(Y=j&&K&&!this.isFlightActive(O)?J:Q?X:Z,i.selectedFeedDisplaySetting){case"headingsonly":case"onscroll":case"off":p.push((0,l.Qz)(D,s.x.breakingNewsWC)),p.push((0,l.Qz)(D,s.x.superBreakingNews)),p.push((0,l.Qz)(F,s.x.cardActionWC));break;default:p.push((0,l.Qz)(D,s.x.breakingNewsWC)),p.push((0,l.Qz)(D,s.x.superBreakingNews)),p.push((0,l.Qz)(Y,s.x.cardActionWC))}if(G?(ee=W,te=z?D:Y):(ee=D,te=D),this.config.delayLoadPoweredByLegend){const e=G?D:F;p.push((0,l.Qz)(e,s.x.poweredByLegendWC))}const ne=[s.x.articleFre,s.x.autosCarousel,s.x.autosGarageCard,s.x.autosMarketplaceCard,s.x.casualGamesCard,s.x.channelFilterCard,s.x.companyNewsCard,s.x.contentGroupCard,s.x.digestCard,s.x.donationNpoCard,s.x.entertainmentPremierCard,s.x.esportsCard,s.x.esportsStreamsCard,s.x.followingFreFullWidth,s.x.gamingCompeteCard,s.x.gamingDiscoverStrip,s.x.gamingGamerModeUpsellCard,s.x.gamingMatchCard,s.x.gamingMediaCarousel,s.x.gamingPersonalizationCard,s.x.gamingRecentlyPlayedCard,s.x.gamingRecommendedCard,s.x.gamingRedditCard,s.x.gamingRewardsCard,s.x.gamingStreamCard,s.x.gamingTournamentCard,s.x.gamingUpcomingCard,s.x.gamingVideoCard,s.x.generalElections,s.x.horoscopeAnswerCardWC,s.x.hotListCard,s.x.mangaCard,s.x.moneyInfoCardWC,s.x.newsGroupsCard,s.x.onThisDayCardWC,s.x.prayerTimesCard,s.x.prismCarouselCard,s.x.prismSdCard,s.x.qna,s.x.realEstateCard,s.x.recommendedSearchesCard,s.x.rewardsDailySetCard,s.x.sharedHeroNewsCard,s.x.shoppingCardWC,s.x.shoppingEdgeInsightsCard,s.x.shoppingEventsDealCard,s.x.shoppingSdCard,s.x.shoppingVerticalListsCard,s.x.sportsCardWC,s.x.sportsOlympicCardWC,s.x.sportsWorldCupCardWC,s.x.spotlightCardWC,s.x.travelDestination,s.x.travelSdThemesCard,s.x.trendingNowWC,s.x.trendingSearchCard,s.x.videoShoppingCard,s.x.videoShoppingCarouselCard,s.x.watchVideosVerticalCarousel,s.x.weatherCardWC];for(const e of ne)p.push((0,l.Qz)(ee,e));const ie=[s.x.articleRelatedStories,s.x.articleTopComment,s.x.backgroundGallery,s.x.conditionalBannerWC,s.x.dailyBriefWC,s.x.devTools,s.x.dailyDiscovery,s.x.feedbackLinkWC,s.x.interestFreCard,s.x.locationMarker,s.x.signInControlWC,s.x.signInFlyoutWC,s.x.msRewardsWC,s.x.mobileAppUpsell,s.x.nextdoorCard,s.x.nurturingCoachMark,s.x.officeCoachmark,s.x.officeLeftRail,s.x.personalizeNavButton,s.x.pillFreOverlay,s.x.pillWC,s.x.signalOverlay,s.x.socialAvatar,s.x.socialBarWC,s.x.socialLeadGenInArticle,s.x.superCoachMarkWC,s.x.superNavCoachMark,s.x.waffleWC,s.x.welcomeGreetingLight,s.x.commonSettingsEdgeNext,s.x.marketLanguageToggleWC,s.x.testBingNudge,s.x.feedLevelFeedbackWC,s.x.codexBingChat,s.x.contextualFeedbackWC,s.x.bingIntlUpsell,s.x.weatherOneLiner];this.config.disableDelayLoadNotification||ie.push(s.x.notificationBellWC),this.config.disableDelayLoadRecommendedSites||ie.push(s.x.recommendedSitesWC);for(const e of ie)p.push((0,l.Qz)(te,e));if(this.config&&this.config.delayLoadStickyPeek){const e=s.x.commonSettingsEdgeNext,t={eventType:d.Gg.rendered,experienceType:e};p.push((0,l.Qz)(t,s.x.stickyPeek))}p.push((0,l.Qz)(D,s.x.toastWC)),p.push((0,l.Qz)(D,s.x.voiceSearchWC)),p.push((0,l.Qz)(D,s.x.imageSearchWC)),p.push((0,l.Qz)(D,s.x.searchHistoryEdgeNextWC)),p.push((0,l.Qz)(D,s.x.newsHeadlineBelowSearchbox)),p.push((0,l.Qz)(D,s.x.recommendedSearchCarouselWC)),p.push((0,l.Qz)(D,s.x.coldStart)),p.push((0,l.Qz)(R,s.x.edgeShopping)),p.push((0,l.Qz)(R,s.x.publisherSubscribeFollowButton)),this.addVisuallyReadyDependencies(h),(0,M.N)()&&window._pageTimings&&(window._pageTimings.visualDependenciesConfigs=h);const re=T.jG&&T.jG.CurrentRequestTargetScope&&"dhp"==T.jG.CurrentRequestTargetScope.pageType?this.config.entireRiverStaleMinutes:this.config.dhpEntireRiverStaleMinutes,oe=await this.disableFeedPrerender();(0,S.Vx)(oe);let ae=(0,y.b)();if(M.N&&window._pageTimings&&(window._pageTimings.visualDependenciesConnector=ae,C&&$&&(ae=h)),(0,A.Qc)(ae,this.config.prerenderForceRefresh,re,this.config.sdCardStaleMinutes,oe,this.config.delayReveal),this.registerSecondaryPerfMarkers(g),(0,M.N)()){var se;const e=null!==(se=window)&&void 0!==se&&se.isSSREnabled?p.filter((e=>e.deferralInfo!==D&&e.deferralInfo!==W&&e.deferralInfo!==Y)):p;u.g.updateExperienceLoadDeferralState.getActionSender(this.milestoneDataConnector).send(e)}this.registerVisuallyReadyObserver(),this.registerMarkersIfNecessary([a.p.searchBox],m,b.Al.IsPrerender)}isFlightActive(e){var t;return!(null===b.Al||void 0===b.Al||null===(t=b.Al.CurrentFlightSet)||void 0===t||!t.has(e))}async isOnBattery(){const e=window&&window.navigator;return await e.getBattery().then((e=>!e.charging))}async disableFeedPrerender(){return!(null===b.Al||void 0===b.Al||!b.Al.IsPrerender||this.config.noDisablePrerenderFeed)&&((0,S.Tr)()||this.config.disableFeedPrerender||this.isFlightActive("prg-prerendoff")&&(0,S.Xq)()||this.config.disableFeedOnBattery&&await this.isOnBattery())}}var $=n(99551);class U{reduce(e,t){if(!e)return{visuallyReadyDependencies:new Map};if(!t)return e;let n=!1;const i={...e};return n=n||$.G.handleAction(t,f.addVisuallyReadyDependencies,(e=>{e&&e.forEach((e=>{e&&!i.visuallyReadyDependencies.has(e)&&i.visuallyReadyDependencies.set(e,{experienceType:e,visuallyReady:!1})}))})),n=n||$.G.handleAction(t,f.markVisuallyReadyComplete,((e,t)=>{if(e){const t=i.visuallyReadyDependencies.get(e);t&&(t.visuallyReady=!0,"GridViewFeed"!==e&&"WaterfallViewFeed"!==e||(0,A.Bj)())}})),n?i:e}}const _={experienceConfigSchema:{}}},40378:function(e,t,n){"use strict";n.d(t,{S:function(){return o},Y:function(){return r}});var i=n(21789);function r(){var e,t,n;if(null===(e=window)||void 0===e||!e.matchMedia)return;const r=null===(t=(0,i.Yq)().WidgetAttributes)||void 0===t||null===(n=t.propertyBag)||void 0===n?void 0:n.theme;if(r)return"dark"===r;const o=window.matchMedia("(prefers-color-scheme: dark)");return o?!!o.matches:void 0}function o(e){return!(null==e||!e.useMobile||null==e||!e.isDarkModeForMobile)}},69416:function(e,t,n){"use strict";n.d(t,{P5:function(){return d},Ve:function(){return c},Yw:function(){return s},dw:function(){return a},m0:function(){return o}});var i=n(33442),r=n(92531);const o="#000000",a="#FFFFFF",s=(0,i.l$)((()=>o))(r.ZP),c=(0,i.s5)((()=>o))(r.ZP),d=(0,i.$B)((()=>a))(r.ZP)},50632:function(e,t,n){"use strict";n.d(t,{GQ:function(){return p},K$:function(){return i},eH:function(){return w},hg:function(){return m},q7:function(){return g},rA:function(){return c},vW:function(){return C}});var i,r=n(97030),o=n(55524),a=n(25257),s=n(42166);!function(e){e.c1="c1",e.c2="c2",e.c3="c3",e.c4="c4",e.c5="c5"}(i||(i={}));const c={c1:1,c2:2,c3:3,c4:4,c5:5},d="__minViewportWidthOverrides__",l="__columnArrangementDefinitions__",u="__columnArrangementMap__",p=()=>(o.Gq.get(l)||v(),o.Gq.get(l)),h=()=>(o.Gq.get(u)||v(),o.Gq.get(u));function g(e){o.Gq.set(d,e)}function m(){const e=p(),t=h();if(a.p.fiveColSupported()&&4===e.length){const n=new f(i.c5,r.sc);e.push(n),t[i.c5]=n}}class f{constructor(e,t,n){this.arrangement=e,this.contentSizePx=t,this.isFirstBreakpoint=n}get minViewportWidthPx(){if(this.isFirstBreakpoint)return 0;const e=o.Gq.get(d);if(e){const t=e.get(this.arrangement);if(t)return t}return this.contentSizePx+y}}function v(){const e=[];e.push(new f(i.c1,r.xs,!0)),e.push(new f(i.c2,r._3)),e.push(new f(i.c3,r.Xn)),e.push(new f(i.c4,r.xX)),a.p.fiveColSupported()&&e.push(new f(i.c5,r.sc));const t={};for(const n of e)t[n.arrangement]=n;o.Gq.set(l,e),o.Gq.set(u,t)}const y=32;!function(){const e=[0],t=p();for(let i=1;i<t.length;i++){var n;e.push(null===(n=t[i])||void 0===n?void 0:n.minViewportWidthPx)}}();function S(e,t){const n=[],i=p(),r=h();if(e){const t=r[e],i=null==t?void 0:t.minViewportWidthPx;i>0&&n.push(`(min-width: ${(0,s.a)(i)})`)}if(t){const e=r[t],a=i.indexOf(e);var o;if(a<i.length-1)n.push(`(max-width: ${(0,s.a)((null===(o=i[a+1])||void 0===o?void 0:o.minViewportWidthPx)-1)})`)}return n.join(" and ")}function C(e,t){const n=S(e,t);return n?"@media "+n:""}function w(e){return C(e,e)}},91992:function(e,t,n){"use strict";n.d(t,{g:function(){return o}});const i=1<<24,r=/\s+/g;const o=new class{rgbNumberToCssHexColor(e){let t=null;return"number"==typeof e&&e>=0&&e<i&&(t=this.rgbNumberToCssHexColorCore(e)),t}parseColor(e){if(e)return this.parseHexColor(e)||this.parseRgbaColor(e)}parsedColorToNumber(e,t){return e&&e.r<<16|e.g<<8|e.b||t}grayScale(e){const t=e.r,n=e.g,i=e.b;return this.isValidColorValue(t)&&this.isValidColorValue(n)&&this.isValidColorValue(i)?Math.min(255,Math.round(.299*t+.587*n+.114*i)):255}isValidColorValue(e){return!isNaN(e)&&null!=e&&e>=0&&e<=255}rgbNumberToCssHexColorCore(e){return"#"+(i|e).toString(16).slice(1)}parseHexColor(e){const t=e&&e.replace("#",""),n=parseInt(t,16);if(isNaN(n))return null;const i=t.length;return 3===i?{r:17*(n>>8),g:17*(n>>4&15),b:17*(15&n),a:1}:6===i||8===i?{r:n>>16&255,g:n>>8&255,b:255&n,a:6===i?1:(n>>24&255)/255}:null}parseRgbaColor(e){if(!e)return null;const t=e.replace(r,"").match(/^(?:rgba?)\(((?:\d+\.)?\d+%?),((?:\d+\.)?\d+%?),((?:\d+\.)?\d+%?)(?:,((:?\d*\.)?\d+))?\)$/);if(t){const e=t[4];return{r:this.normalizeColor(t[1],255,!0),g:this.normalizeColor(t[2],255,!0),b:this.normalizeColor(t[3],255,!0),a:e?this.normalizeColor(e,1,!1):1}}return null}normalizeColor(e,t,n){let i=parseFloat(e);return isNaN(i)?0:(i=e.indexOf("%")>=0?Math.max(0,Math.min(100,i))*t/100:Math.max(0,Math.min(t,i)),n?Math.round(i):Math.round(100*i)/100)}}},97030:function(e,t,n){"use strict";n.d(t,{Xn:function(){return u},_3:function(){return l},gf:function(){return f},iN:function(){return m},jU:function(){return v},lE:function(){return y},sc:function(){return h},xX:function(){return p},xs:function(){return d}});const i=624,r=948,o=1272,a=1596,s=1900,c=24,d=300;let l=i,u=r,p=o,h=a,g=null,m=c;const f=2200;function v(e){m=e;const t=function(e){return{Size1ColumnWidth:d,Size2ColumnWidth:2*d+e,Size3ColumnWidth:3*d+2*e,Size4ColumnWidth:4*d+3*e,Size5ColumnWidth:5*d+4*e,Size6ColumnWidth:6*d+5*e}}(e);g=t.Size6ColumnWidth,h=t.Size5ColumnWidth,p=t.Size4ColumnWidth,u=t.Size3ColumnWidth,l=t.Size2ColumnWidth}function y(){m=c,l=i,u=r,p=o,h=a,g=s}},98619:function(e,t,n){"use strict";n.d(t,{Bn:function(){return u},sZ:function(){return g},vi:function(){return h}});var i=n(50632),r=n(80329),o=n(20654),a=n(95153),s=n(31558),c=n(55524);const d="__FastBreakpointManager__";class l{get currentColumnArrangement(){return this.indexToStandardConverter(this.breakpointTracker.currentBreakpoint())}constructor(e){this.useRequestIsolatedTracker=!1,this.callbackMap=new Map,this.refreshBreakpoints(e)}refreshBreakpoints(e){const t=[0],n=(0,i.GQ)();(0,i.hg)();for(let e=1;e<n.length;e++){var r;t.push(null===(r=n[e])||void 0===r?void 0:r.minViewportWidthPx)}this.breakpointTracker.breakpoints=t,this.breakpointTracker.defaultBreakpoint=void 0!==e?(0,a.Nd)(e.data.breakpoint,"breakpoint"):0}set breakpoints(e){if(this.breakpointTracker.breakpoints=e,r.R1&&Array.isArray(r.R1)){const t=r.R1.length;for(let e=0;e<t;e++)r.R1.pop();e.forEach((e=>r.R1.push(e)))}}get breakpoints(){return this.breakpointTracker.breakpoints}updateBreakpointsBasedFromContainerWidth(e){const t=(0,i.GQ)();if(e>=t[3].contentSizePx)return;const n=[];for(let i=0;i<this.breakpoints.length;i++)(0===i||e>=t[i].contentSizePx)&&n.push(t[i].contentSizePx);this.breakpoints=n}subscribe(e){const t=t=>{e(this.indexToStandardConverter(t))};this.callbackMap.set(e,t),this.breakpointTracker.subscribe(t)}unsubscribe(e){this.breakpointTracker.unsubscribe(this.callbackMap.get(e)),this.callbackMap.delete(e)}indexToStandardConverter(e=0){const t=(0,i.GQ)();return t&&e>=t.length&&t[t.length-1]?t[t.length-1].arrangement:t[e].arrangement}get breakpointTracker(){return!(0,s.N)()&&this.useRequestIsolatedTracker?c.Gq.get("__FastBreakpointManager_breakpointTracker__",(()=>new o.Z.constructor)):o.Z}}const u=(e,t)=>(t&&c.Gq.set(d,new l(e)),c.Gq.get(d,(()=>new l(e)))),p="__FastBreakpointManager_viewType__",h=()=>{let e=null;switch(u().currentColumnArrangement){case i.K$.c1:e="size1column";break;case i.K$.c2:e="size2column";break;case i.K$.c3:e="size3column";break;case i.K$.c4:e="size4column";break;case i.K$.c5:e="size5column";break;default:return c.Gq.get(p,(()=>null))}return c.Gq.set(p,e),e};function g(e){var t;return e&&(null===(t=u())||void 0===t?void 0:t.breakpoints[e])||0}},58616:function(e,t,n){"use strict";n.d(t,{$L:function(){return y},Bg:function(){return c},NU:function(){return f},ZH:function(){return p},_U:function(){return l},a5:function(){return S},bE:function(){return g},iA:function(){return d},l_:function(){return h},po:function(){return v},zb:function(){return b}});var i=n(10754),r=n(21930),o=n(45870),a=n(31558);const s="defer-hydration",c="needs-hydration",d=window.location.search.includes("ssrhydrateperf"),l=new Map,u=e=>t=>{if(!t.hasAttribute(e))return Promise.resolve();const n=new o.o;return new MutationObserver(((i,r)=>{t.hasAttribute(e)||(n.set(),r.disconnect())})).observe(t,{attributeFilter:[e]}),n.getResultAsync()},p=u(s),h=u(c),g=(e,t=!1)=>{if(!(0,a.N)())return{start:()=>{},markEnd:()=>{}};const n=`${e}.start`;return{start:()=>{var e;return null===(e=performance)||void 0===e?void 0:e.mark(n)},markEnd:(r="end",o=t)=>{var a,s;const c=`${e}.${r}`;var d;(null===(a=performance)||void 0===a||a.mark(c),null===(s=performance)||void 0===s||s.measure(`${e}.${r}:duration`,n,c),o)&&((0,i.Ou)()[`${e}.${r}:duration`]=null===(d=performance)||void 0===d?void 0:d.getEntriesByName(`${e}.${r}:duration`)[0].duration)}}};let m=new Set;const f=e=>m=new Set(e.map((e=>e.toLocaleLowerCase()))),v=e=>{l.clear(),e.forEach((e=>{l.set(e.toLocaleLowerCase(),{selfHydrationComplete:new o.o,topDownHydrateComplete:new o.o})}))},y=e=>{e.forEach((e=>{var t,n;const i=e.toLocaleLowerCase();null===(t=l.get(i))||void 0===t||t.selfHydrationComplete.set(),null===(n=l.get(i))||void 0===n||n.topDownHydrateComplete.set()}))};var S;!function(e){e[e.Immediate=0]="Immediate",e[e.Never=1]="Never",e[e.IdleAfterTtvr=2]="IdleAfterTtvr",e[e.OnInteraction=3]="OnInteraction",e[e.OnHover=4]="OnHover",e[e.OnPageResize=5]="OnPageResize"}(S||(S={}));const C=["click","keydown"],w=["mouseenter","focusin"];async function b(e,t,n={}){const i=e.hasAttribute(s);if(i){var o;null==t||t.start(),e.removeAttribute(s),await h(e).then((()=>null==t?void 0:t.markEnd("selfHydrationComplete")));const n=e.tagName.toLocaleLowerCase();null===(o=l.get(n))||void 0===o||o.selfHydrationComplete.set()}let a;var c;e.hasAttribute("needs-recreation")?a=[]:a=Array.from((null===(c=e.shadowRoot)||void 0===c?void 0:c.children)??[]).concat(Array.from(e.children));return Promise.all(a.map(((t,i)=>{var o;let a;const s=t.tagName.toLocaleLowerCase(),c=new AbortController,l=()=>{if(!c.signal.aborted)return c.abort(),m.has(s)?a=g(`${s}:hydration`,!0):d&&(a=g(`${e.tagName.toLocaleLowerCase()}>${s}[${i}]`,!1)),b(t,a,n)},u={once:!0,passive:!0,capture:!0,signal:c.signal},p=null===(o=n.hydrationModes)||void 0===o?void 0:o[s];var h;if(1!==(null==p?void 0:p.mode)){if(!Array.isArray(null==p?void 0:p.mode))return l();var f;null==p||null===(f=p.markTtvr)||void 0===f||f.call(p,t);for(const e of p.mode)switch(e){case 2:(0,r.b1)().then((()=>requestIdleCallback(l)));break;case 3:C.forEach((e=>{t.addEventListener(e,l,u)}));break;case 4:w.forEach((e=>{t.addEventListener(e,l,u)}));break;case 5:window.addEventListener("resize",l,u)}}else null==p||null===(h=p.markTtvr)||void 0===h||h.call(p,t)}))).then((()=>{if(i){var n;null==t||t.markEnd("topDownHydrateComplete");const i=e.tagName.toLocaleLowerCase();null===(n=l.get(i))||void 0===n||n.topDownHydrateComplete.set()}}))}},61633:function(e,t,n){"use strict";n.d(t,{Bs:function(){return g},E7:function(){return h},EH:function(){return m},Eg:function(){return p},Lr:function(){return i},S7:function(){return u},WX:function(){return f},Wi:function(){return l},ZG:function(){return s},d5:function(){return r},hE:function(){return o},il:function(){return c},kO:function(){return y},mw:function(){return v},pt:function(){return a},yV:function(){return d}});const i={PrivacyUrl:"https://go.microsoft.com/fwlink/?LinkID=286759",SamDomain:"https://srtb.msn.com/",SamEndpoint:"auction",SamOpenRtbEndpoint:"auctionopenrtb",AppId:"msnappid",PublisherId:"msn",Ecasession:"init",RiverRegion:"river",RiverDoubleWide:"river-dbl",RiverHalfTextOnly:"river-half-textonly",RiverHalf:"river-half",ReservedRiver:"resriver",UserOptOut:"userOptOut",UserOptOutOptions:"userOptOutOptions",DefaultPartnerCookieSyncTimeout:500,BulkCookieSyncTimeout:1e3,WaitForAdResponseAfterWPOResponseTimeout:1500,DefaultContentServiceBaseUrl:"https://assets.msn.com/content/",SamOpenRTBMinTimeout:800},r={river:"oneriver.main",infopane:"oneriver.spartan.infopane","infopane-tab":"oneriver.spartan.tabinfopane",rivert:"oneriver.maint"},o={BeaconFormatDecoded:"decoded",BeaconFormatEncoded:"encoded",BeaconTypeAdServed:"adserved",BeaconTypeClick:"click",BeaconTypeJsTracker:"jsTracker",BeaconTypeVisibility:"visibility",BeaconTypeVideoProgress:"videoProgress",StartEvent:"start",FirstQuartileEvent:"firstquartile",ThirdQuartileEvent:"thirdquartile",MidPointEvent:"midpoint",CompleteEvent:"complete",ProgressEvent:"progress",UserActionEvent:"userAction"};var a;!function(e){e.Click="click",e.Ready="ready",e.Play="play",e.Pause="pause",e.Ended="ended",e.Telemetry="telemetry",e.VolumeChange="volumechange",e.TimeUpdate="timeupdate",e.Error="error",e.CanPlay="canplay",e.CanPlayThrough="canplaythrough"}(a||(a={}));const s={CMSListServiceUrl:"v1/cms/api/amp/Document/",CMSContentServiceURl:"view/v1/Preview/",DefaultProviderName:"Microsoft"},c={ContentType:"application/json",Method:"POST",CacheControl:"no-cache",Skipsessioncall:"false",ContentTypeKey:"Content-Type",FlightIdKey:"x-ms-flightId",CacheControlKey:"Cache-Control",ClientIdKey:"X-MSEdge-ClientID",MarketKey:"X-MSEdge-Market",AuthCookieNameKey:"x-ms-authCookieName",Timeout:3e3,BCPCookieKey:"BCP",UserAgent:"User-Agent"},d={MSAOptOut:"msaoptout",BrowserOptOut:"TOptOut",AppAnonCookieExist:"aace",TaboolaSessionCookieName:"ecasession",CookieDomain:"msn.com",AnonCookieName:"ANON",LiverampEnvelopeId:"adslrid"},l={"de-de":"BBGgbuP","en-gb":"BBI4NMr","en-us":"BBI4MeJ","it-it":"BBH0fea","de-at":"BBIbKRf","de-ch":"BBH6mkD","pl-pl":"BBGgsgw","tr-tr":"BBH3vBx","es-es":"BBGdmuQ","en-au":"BBGfT6j","es-ar":"BBH69zf","es-cl":"BBH6qTU","es-co":"BBH3TQV","es-pe":"BBIbVzn","es-mx":"BBGg7xs","pt-br":"BBI4jJ6","en-ca":"BBI4FN9","he-il":"BBIbHNd","fr-ch":"BBIfDNl","nl-be":"BBH6zcN","fr-be":"BBIclrE","fr-fr":"BBI4XBF","nl-nl":"BBGgoUg","pt-pt":"BBH3qlj","zh-cn":"BBPRWnl","ja-jp":"AAvs5xw","ko-kr":"AAvrTXp","en-xl":"AAxzSQi","es-us":"AAuAfA8","fr-ca":"BBH6Awm","es-xl":"BBIfH5i","cs-cz":"BBPwecC","da-dk":"BBGKGmb","el-gr":"BBIc8WA","fi-fi":"BBH6Cse","hu-hu":"BBPw6XX","nb-no":"BBI4EVt","ru-ru":"BBH3gvW","sv-se":"BBH3vHp","ar-ae":"BBIf1cG","ar-eg":"BBIcggw","ar-sa":"BBIc6wN","en-ae":"BBIbBRO","en-ie":"BBIclgh","en-za":"BBIc5NR","en-in":"BBGeThK","en-sg":"BBIfqX9","en-nz":"BBIc483","zh-hk":"BBIbPBb","hi-in":"BBH85g2","mr-in":"BBU7J93","te-in":"BBU7JcP","bn-in":"BBU7Qw4","id-id":"BBIc9Ls","th-th":"BBIbPH4","vi-vn":"BBIcbQS","es-ve":"BBIcaTp","fr-xl":"AAD4nFo","en-my":"BBIclH7","en-ph":"BBIcbaP","zh-tw":"BBH3qpv"},u={"de-de":"Anzeige","en-gb":"Ad","en-us":"Ad","it-it":"Ann.","de-at":"Anzeige","de-ch":"Anzeige","pl-pl":"Reklama","tr-tr":"R","es-es":"Publicidad","en-au":"Ad","es-ar":"Patrocinado","es-cl":"Patrocinado","es-co":"Patrocinado","es-pe":"Patrocinado","es-mx":"Patrocinado","pt-br":"Publicidade","en-ca":"Ad","he-il":"מודעה","fr-ch":"Sponsorisé","nl-be":"Advertentie","fr-be":"Sponsorisé","fr-fr":"Sponsorisé","nl-nl":"Advertentie","pt-pt":"Pub","zh-cn":"广告","ja-jp":"PR","ko-kr":"AD","en-xl":"Ad","es-us":"Patrocinado","fr-ca":"Pub","es-xl":"Patrocinado","cs-cz":"Reklama","da-dk":"Annonce","el-gr":"Ad","fi-fi":"Mainos","hu-hu":"Hird.","nb-no":"Annonse","ru-ru":"Реклама","sv-se":"Annons","ar-ae":"إعلان","ar-eg":"إعلان","ar-sa":"إعلان","en-ae":"Ad","en-ie":"Ad","en-za":"Ad","en-in":"Ad","en-sg":"Ad","en-nz":"Ad","zh-hk":"廣告","hi-in":"एड","mr-in":"जाहिरात","te-in":"ప్రకటన","bn-in":"বিজ্ঞাপন","id-id":"Ad","th-th":"Ad","vi-vn":"Ad","es-ve":"Patrocinado","fr-xl":"Sponsorisé","en-my":"Ad","en-ph":"Ad","zh-tw":"廣告"},p=["ja-jp","ko-kr","zh-cn"],h={MyFeedPivotId:"oneriver.myfeed",StripeMyFeedPivotId:"stripe.myfeed",EditInterestPivotId:"oneriver.editinterests"};var g;!function(e){e[e.AdBuffering=1]="AdBuffering",e[e.ContentBuffering=2]="ContentBuffering",e[e.AdError=10]="AdError",e[e.AdPlayStarted=11]="AdPlayStarted",e[e.AdPlayCompleted=13]="AdPlayCompleted",e[e.AdSkipped=15]="AdSkipped",e[e.AdTimeout=16]="AdTimeout",e[e.AdPause=17]="AdPause",e[e.AdResume=18]="AdResume",e[e.ContentError=20]="ContentError",e[e.ContentStart=21]="ContentStart",e[e.ContentContinue=22]="ContentContinue",e[e.ContentComplete=23]="ContentComplete",e[e.CC=30]="CC",e[e.Pause=31]="Pause",e[e.Seek=32]="Seek",e[e.Mute=33]="Mute",e[e.FullScreenEnter=34]="FullScreenEnter",e[e.Info=35]="Info",e[e.VideoQuality=36]="VideoQuality",e[e.Resume=37]="Resume",e[e.FullScreenExit=38]="FullScreenExit",e[e.Replay=39]="Replay",e[e.Unmute=40]="Unmute",e[e.ContentImpression3PP=41]="ContentImpression3PP",e[e.Facebook=51]="Facebook",e[e.Twitter=52]="Twitter",e[e.Email=53]="Email",e[e.CommonPlayerImpression=61]="CommonPlayerImpression",e[e.EndslateVideos=64]="EndslateVideos",e[e.EndslateContinuous=65]="EndslateContinuous",e[e.EndslateCancelCountdown=66]="EndslateCancelCountdown",e[e.EndslateShown=67]="EndslateShown",e[e.PlayerStarting=90]="PlayerStarting",e[e.AdLoading=91]="AdLoading",e[e.AdLoaded=92]="AdLoaded",e[e.VideoLoading=93]="VideoLoading",e[e.ContentOpen=101]="ContentOpen",e[e.Content25Percent=102]="Content25Percent",e[e.Content50Percent=103]="Content50Percent",e[e.Content75Percent=104]="Content75Percent",e[e.Canplay=105]="Canplay",e[e.Canplaythrough=106]="Canplaythrough"}(g||(g={}));const m=["en-it","de-at","fr-be","nl-be","cs-cz","da-dk","fi-fi","fr-fr","de-de","el-gr","hu-hu","it-it","nl-nl","no-no","pl-pl","pt-pt","es-es","sv-se","de-ch","de-fr","en-gb"],f=["cs-cz","da-dk","de-at","de-ch","de-de","en-gb","el-gr","fi-fi","fr-be","fr-ch","fr-fr","hu-hu","it-it","nb-no","nl-be","nl-nl","pl-pl","pt-br","pt-pt","ru-ru","sv-se","tr-tr","zh-cn"],v=["en-us","es-us"],y=["en-au","en-nz"]},82694:function(e,t,n){"use strict";n.d(t,{SI:function(){return o},di:function(){return r},hb:function(){return i},j3:function(){return s}});const i={_lowerBound:"invalid",_1by191:"1x1.91",_9by16:"9x16",_3by4:"3x4",_1by1:"1x1",_4by3:"4x3",_16by9:"16x9",_191by1:"1.91x1"};var r,o,a;!function(e){e.Adult="adult",e.Enterprise="enterprise"}(r||(r={})),function(e){e.AdFeedV2="feedv2-template",e.Default="msft-content-card",e.PatternOverlay="msn-pattern-overlay-card",e.PseudoVideo="msn-pseudo-video-card",e.Slideshow="msn-slideshow-card",e.ZIndex="msn-z-index-card",e.AdCarousel="msn-ad-carousel",e.AnimatedImagery="msn-animated-imagery",e.InfopaneHorizontal_1by1="msn-info-pane-horizontal-1-by-1",e.InfopaneHorizontal_3by4="msn-info-pane-horizontal-3-by-4",e.InfopaneHorizontal_4by3="msn-info-pane-horizontal-4-by-3",e.InfopaneHorizontal_9by16="msn-info-pane-horizontal-9-by-16",e.InfopanePatternOverlay_1by1="msn-info-pane-pattern-overlay-1-by-1",e.InfopanePatternOverlay_4by3="msn-info-pane-pattern-overlay-4-by-3",e.InfopaneDoubleCard_19by10="msn-card-19-by-10",e.RiverAnimatedImagery_9by16="msn-river-animated-imagery-9-by-16",e.RiverZIndex_9by16="msn-river-z-index-9-by-16",e.RiverZIndex_3by4="msn-river-z-index-3-by-4",e.HotspotSingle="msn-hotspot-single",e.BrandStory="msn-brand-story",e.CallToAction="msn-ad-cta",e.CallToActionLearnMore="msn-ad-cta-learn-more",e.CallToActionDarkMode="msn-ad-cta-learn-more-dark-mode",e.CallToActionIcon="msn-ad-cta-icon",e.CallToActionShortTitle="msn-ad-cta-short-title",e.CallToActionMaskMode="msn-ad-cta-mask-mode",e.ContentReveal="msn-content-reveal",e.DiscountScribble="msn-discount-scribble",e.BrandStoryNoDeco="msn-brand-story-no-deco",e.BrandStoryNoProgressiveDisplay="msn-brand-story-no-progressive-display",e.Gamification="msn-gamification",e.HighlightRating="msn-highlight-rating-card",e.DecorationDynamic="msn-decoration-dynamic",e.TitleMaxLine2="msn-title-max-line-2",e.TitleMaxLine2C="msn-title-max-line-2-c",e.InfopaneDynamicRendering="msn-info-pane-dynamic-rendering",e.Logo="msn-native-ad-logo",e.LogoWithBorderRadius="msn-native-ad-logo-radius",e.ShortTitle="msn-native-ad-short-title",e.Spotlight="msn-spotlight-image",e.Disclaimer="msn-ad-disclaimer",e.ZIndexV2Original="msn-ad-zindex-v2-original",e.ZIndexV2Polygon="msn-ad-zindex-v2-polygon",e.AdSlugV3="msn-ad-slug-v3",e.AdSlugV4="msn-ad-slug-v4",e.DrPerf="msn-ad-dr-perf",e.Video="msn-video",e.VideoIAS="msn-video-ias",e.Amplify="msn-amplify",e.SpecialOfferNonDR="msn-special-offer-nondr",e.SpecialOfferNonDRWithExp="msn-special-offer-nondr-with-exp",e.RatingHighlightRedNonDR="msn-highlight-rating-nondr-red",e.RatingHighlightYellowNonDR="msn-highlight-rating-nondr-yellow",e.RatingHighlightYellowNonDRStatic="msn-highlight-rating-nondr-yellow-static",e.RatingDefaultYellowNonDRStatic="msn-default-rating-nondr-yellow-static",e.FreeShippingPlainTextNonDR="msn-freeshipping-plain-text-nondr",e.FreeShippingInlineNonDR="msn-freeshipping-inline-nondr",e.FreeShippingTopLeftNonDR="msn-freeshipping-top-left-nondr",e.FreeShippingTopRightNonDR="msn-freeshipping-top-right-nondr",e.FreeShippingDR="msn-freeshipping-dr",e.ConditionNonDR="msn-condition-nondr",e.ConditionNonDRControl="msn-condition-nondr-c",e.ReturnPolicyNonDR="msn-return-policy-nondr",e.ReturnPolicyNonDRControl="msn-return-policy-nondr-c",e.SoldNonDR="msn-sold-nondr",e.SoldNonDRControl="msn-sold-nondr-c",e.EliteBadge="msn-elite-badge",e.RatingDR="msn-rating-dr",e.Trending="msn-trending",e.LikeButton="msn-like-button",e.SaleHighlightV1="msn-sale-highlight-v1",e.SaleHighlightV1Control="msn-sale-highlight-v1-c",e.SaleHighlightV3="msn-sale-highlight-v3",e.SaleHighlightV4="msn-sale-highlight-v4",e.SaleHighlightV3V4Control="msn-sale-highlight-v3v4-c",e.ShortTitleControl="msn-short-title-c",e.SpecialOfferControl="msn-special-offer-c",e.LogoControl="msn-logo-c",e.FreeShippingControl="msn-freeshipping-c",e.ZIndexControl="msn-z-index-c",e.RatingControl="msn-rating-c",e.TrendingControl="msn-trending-c",e.CallToActionControl="msn-cta-c",e.HoverEffectControl="msn-hover-effect-c",e.HoverEffect="msn-hover-effect",e.ComboRating="msn-combo-rating",e.ComboFreeShipping="msn-combo-freeshipping",e.ComboSpecialOffer="msn-combo-special-offer",e.ComboRatingNonDR="msn-combo-rating-nondr",e.ComboFreeShippingNonDR="msn-combo-freeshipping-nondr",e.ComboSpecialOfferNonDR="msn-combo-special-offer-nondr",e.ComboSaleHighlightNonDR="msn-combo-sale-highlight-nondr",e.ComboRatingNonDRControl="msn-combo-rating-nondr-c",e.ComboFreeShippingNonDRControl="msn-combo-freeshipping-nondr-c",e.ComboSpecialOfferNonDRControl="msn-combo-special-offer-nondr-c",e.ComboSaleHighlightNonDRControl="msn-combo-sale-highlight-nondr-c",e.CallToActionV2="msn-call-to-action-v2",e.CallToActionV3="msn-call-to-action-v3",e.CallToActionV3PA="msn-call-to-action-v3-pa",e.PESeasonalAds="msn-pe-seasonal",e.PESeasonalAdsV1="msn-pe-seasonal-v1",e.PESeasonalAdsV1P="msn-pe-seasonal-v1p",e.PESeasonalAdsControl="msn-pe-seasonal-control",e.ComboSoldNonDR="msn-combo-sold-nondr",e.ComboReturnPolicyNonDR="msn-combo-return-policy-nondr",e.ComboConditionNonDR="msn-combo-condition-nondr",e.ComboSoldNonDRControl="msn-combo-sold-nondr-c",e.ComboReturnPolicyNonDRControl="msn-combo-return-policy-nondr-c",e.ComboConditionNonDRControl="msn-combo-condition-nondr-c",e.ResponsiveImageSizing="msn-responsive-image-sizing",e.ResponsiveDescription="msn-responsive-description",e.GeometricAdWaves1="msn-geometric-ad-waves-1",e.GeometricAdWaves3="msn-geometric-ad-waves-3",e.GeometricAdWaves4="msn-geometric-ad-waves-4",e.GeometricAdNature3="msn-geometric-ad-nature-3",e.GeometricAdSparkles1="msn-geometric-ad-sparkles-1",e.GeometricAdSparkles2="msn-geometric-ad-sparkles-2",e.GeometricAdSparkles3="msn-geometric-ad-sparkles-3",e.GeometricAdSparkles4="msn-geometric-ad-sparkles-4",e.GeometricAdSparkles5="msn-geometric-ad-sparkles-5",e.GPTTitle="msn-native-ad-gpt-title",e.AlignmentRF="msn-native-ad-align-rf",e.AIImg="msn-native-ad-ai-img"}(o||(o={})),function(e){e.ScaleUp="scale-up",e.ScaleDown="scale-down",e.ScaleUpDown="scale-up-down"}(a||(a={}));const s={templateType:o.Default,animatedImage:"",landscapeOverlay:!1,allowedAssets:null,nativeAdMode:r.Adult,adCarousel:!1,progressiveDisplay:!1,discountThreshold:1,imageSizeConfig:{infopane:{w:604,h:296},river:{w:300,h:174}},badgeStyle:"blendedIn",useClickInGamify:!0,configType:void 0}},23019:function(e,t,n){"use strict";n.d(t,{XY:function(){return c},aT:function(){return s},bZ:function(){return i},fs:function(){return l},g2:function(){return r},hy:function(){return o},ih:function(){return a},xs:function(){return d}});const i=["HotelAd"],r={city:"location.svg"},o={img:{required:1,img:{type:3}},title:{required:1,title:{len:100}},providerName:{required:1,data:{type:1}},logo:{required:0,img:{w:16,h:16,type:1}},disclaimer:{required:0,data:{type:513}},city:{required:0,data:{type:9}},price:{required:0,data:{type:6}},callout:{required:0,data:{type:517}}},a={price:e=>e.split(".")[0]},s={providerName:"data-1",rating:"data-3",likes:"data-4",price:"data-6",salePrice:"data-7",city:"data-9",installmentPrice:"data-500",priceDrop:"data-501",freeShipping:"data-502",viewed:"data-503",sold:"data-504",specialOffer:"data-505",eliteBadge:"data-506",condition:"data-507",localInventory:"data-508",curbsidePickup:"data-509",review:"data-510",shortTitle:"data-511",returnPolicy:"data-512",disclaimer:"data-513",callout:"data 517",discount:"data-600",title:"data-601",logo:"image-1",img:"image-3",transparentImage:"image-500"},c={font:"p1",shipping:"p2",ratings:"p3"},d=["specialOffer"],l=[s.disclaimer]},12756:function(e,t,n){"use strict";var i;n.d(t,{r:function(){return i}}),function(e){e[e.Logo=1]="Logo",e[e.HighResolution4K=3]="HighResolution4K",e[e.C1=2e4]="C1",e[e.C2=20001]="C2",e[e.C3=20002]="C3",e[e.C4=20003]="C4",e[e.C5=20004]="C5"}(i||(i={}))},27517:function(e,t,n){"use strict";var i;n.d(t,{x:function(){return i}}),function(e){e.Prong1="11730608",e.Prong2="11730609",e.NtpFeed="11726288"}(i||(i={}))},59489:function(e,t,n){"use strict";var i;n.d(t,{l:function(){return i}}),function(e){e.NO_ACCOUNT="NO_ACCOUNT",e.MSA="MSA",e.AAD="AAD"}(i||(i={}))},85205:function(e,t,n){"use strict";var i;n.d(t,{z:function(){return i}}),function(e){e.AdminPortalData="AdminPortalData",e.AdService="AdService",e.AdsManager="AdsManager",e.BackgroundData="BackgroundData",e.BingAdsManager="BingAdsManager",e.BingAdsService="BingAdsService",e.BingImageData="BingImageData",e.CasualGamesData="CasualGamesData",e.CategoryData="CategoryData",e.ChannelData="ChannelData",e.ChromiumPageSettings="ChromiumPageSettings",e.CoachmarkData="CoachmarkData",e.ConditionalBannerData="ConditionalBannerData",e.DailyBriefServiceClient="DailyBriefServiceClient",e.DisplayAdsManager="DisplayAdsManager",e.Esports="Esports",e.ExperienceLoadedData="ExperienceLoadedData",e.ExperienceLoadedDataConnector="ExperienceLoadedDataConnector",e.ExperienceTrackerCasualGamesLandingData="ExperienceTrackerCasualGamesLandingData",e.ExperienceTrackerChannelData="ExperienceTrackerChannelData",e.ExperienceTrackerCommunityData="ExperienceTrackerCommunityData",e.ExperienceTrackerContentToolsData="ExperienceTrackerContentToolsData",e.ExperienceTrackerData="ExperienceTrackerData",e.ExperienceTrackerEdgeData="ExperienceTrackerEdgeData",e.ExperienceTrackerEdgeNextData="ExperienceTrackerEdgeNextData",e.ExperienceTrackerFinanceData="ExperienceTrackerFinanceData",e.ExperienceTrackerFirstPartyData="ExperienceTrackerFirstPartyData",e.ExperienceTrackerGamingFeedData="ExperienceTrackerGamingFeedData",e.ExperienceTrackerHomePageData="ExperienceTrackerHomePageData",e.ExperienceTrackerHubData="ExperienceTrackerHubData",e.ExperienceTrackerMicrosoftNewsData="ExperienceTrackerMicrosoftNewsData",e.ExperienceTrackerMMXData="ExperienceTrackerMMXData",e.ExperienceTrackerEdgeMobileData="ExperienceTrackerEdgeMobileData",e.ExperienceTrackerPrismData="ExperienceTrackerPrismData",e.ExperienceTrackerQnaData="ExperienceTrackerQnaData",e.ExperienceTrackerRecipesData="ExperienceTrackerRecipesData",e.ExperienceTrackerWidgets="ExperienceTrackerWidgets",e.ExperienceTrackerShoppingData="ExperienceTrackerShoppingData",e.ExperienceTrackerSportsData="ExperienceTrackerSportsData",e.ExperienceTrackerSuperAppData="ExperienceTrackerSuperAppData",e.ExperienceTrackerTrafficData="ExperienceTrackerTrafficData",e.ExperienceTrackerTravelData="ExperienceTrackerTravelData",e.ExperienceTrackerHealthData="ExperienceTrackerHealthData",e.ExperienceTrackerUgcData="ExperienceTrackerUgcData",e.ExperienceTrackerViewsData="ExperienceTrackerViewsData",e.ExperienceTrackerWeatherData="ExperienceTrackerWeatherData",e.ExperienceTrackerWeatherMobileData="ExperienceTrackerWeatherMobileData",e.ExperienceTrackerWindowsNewsAndInterestsData="ExperienceTrackerWindowsNewsAndInterestsData",e.ExperienceTrackerWindowsData="ExperienceTrackerWindowsData",e.ExperienceTrackerSuperWindowsData="ExperienceTrackerSuperWindowsData",e.ExperienceTrackerWindowsShellData="ExperienceTrackerWindowsShellData",e.ExperienceTrackerWindowsShellV2Data="ExperienceTrackerWindowsShellV2Data",e.ExperienceTrackerWindowsWidgetsData="ExperienceTrackerWindowsWidgetsData",e.FeedbackData="FeedbackData",e.GamingChannelData="GamingChannelData",e.HubPageSettings="HubPageSettings",e.IrisData="IrisData",e.LayoutPreferenceData="LayoutPreferenceData",e.LocationFeed="LocationFeed",e.MarketSelector="MarketSelector",e.MilestoneData="MilestoneData",e.MsccCookieBannerData="MsccCookieBannerData",e.MsNewsPageSettings="MsNewsPageSettings",e.NavigationData="NavigationData",e.NurturingPlacementManager="NurturingPlacementManager",e.OfficeSharedData="OfficeSharedData",e.OneTrustCookieConsentData="OneTrustCookieConsentData",e.PageClickTrackerData="PageClickTrackerData",e.PageLayout="PageLayout",e.PageSettingsData="PageSettingsData",e.PlacementManager="PlacementManager",e.PollsService="PollsService",e.PoweredByData="PoweredByData",e.Preload="Preload",e.QnaFeedService="QnaFeedService",e.RewardsData="RewardsData",e.RewardsCoachmarkData="RewardsCoachmarkData",e.SearchHistoryEdgenextData="SearchHistoryEdgenextData",e.SharedState="SharedState",e.SharedTimestampUtil="SharedTimestampUtil",e.SharedStringsUtil="SharedStringsUtil",e.SignInData="SignInData",e.SocialEditorData="SocialEditorData",e.SocialPostData="SocialPostData",e.SportsAroundTheLeagueData="SportsAroundTheLeagueData",e.SportsData="SportsData",e.SportsDataUtils="SportsDataUtils",e.SportsGameSummaryData="SportsGameSummaryData",e.SportsInfoSharedState="SportsInfoSharedState",e.SportsOlympicData="SportsOlympicData",e.SportsPersonalizationData="SportsPersonalizationData",e.SportsPreviousMatchupsData="SportsPreviousMatchupsData",e.SportsWorldCupData="SportsWorldCupData",e.SuperComponentData="SuperComponentData",e.SuperMobileComponentData="SuperMobileComponentData",e.Telemetry="Telemetry",e.ShellNewTabData="ShellNewTabData",e.SmartListSharedData="SmartListSharedData",e.TelemetryData="TelemetryData",e.TelemetryDataEdgeChromium="TelemetryDataEdgeChromium",e.TelemetryEdgeChromium="TelemetryEdgeChromium",e.TopicData="TopicData",e.TopSitesLayoutData="TopSitesLayoutData",e.TravelData="TravelData",e.VerticalPropertyData="VerticalPropertyData",e.VideoDataManager="VideoDataManager",e.ViewsNativeAd="ViewsNativeAdConnector",e.ViewsFullPage="ViewsFullPage",e.WeatherActivityWatchlistData="WeatherActivityWatchlistData",e.WeatherData="WeatherData",e.WeatherCardData="WeatherCardData",e.WeatherFeedbackData="WeatherFeedbackData",e.WeatherPageMeta="WeatherPageMeta",e.WeatherPersonaData="WeatherPersonaData",e.WeatherMapData="WeatherMapData",e.WeatherWinAppHeader="WeatherWinAppHeader",e.FinanceData="FinanceData",e.MoneyInfoSharedState="MoneyInfoSharedState",e.SocialData="SocialData",e.WindowsNewsAndInterestsData="WindowsNewsAndInterestsData",e.WindowsShellData="WindowsShellData",e.WindowsPageSettings="WindowsPageSettings",e.HyperLocalPromotionCardClosedKey="weather-map-hyper-local-promotion-card-closed"}(i||(i={}))},93388:function(e,t,n){"use strict";var i;n.d(t,{g:function(){return i}}),function(e){e.backgroundThemeColorChange="backgroundThemeColorChange",e.trackValuesUpdated="trackvaluesupdated",e.desktopFeedFetchFailed="desktopFeedFetchFailed",e.pageContentViewportUpdated="pageContentViewportUpdated",e.requestPageContentViewport="requestPageContentViewport"}(i||(i={}))},79545:function(e,t,n){"use strict";var i;n.d(t,{x:function(){return i}}),function(e){e.ShoppingCategoryPage="ShoppingCategoryPage",e.aboveRiverBlock="AboveRiverBlock",e.actionTray="ActionTray",e.aiCharacterCard="AiCharacterCard",e.aicharacterLandingPage="AicharacterLandingPage",e.aicharacterPaintPage="AicharacterPaintPage",e.animator="Animator",e.articleCloseButton="ArticleCloseButton",e.articleFre="ArticleFre",e.articlePage="ArticlePage",e.articleRelatedStories="ArticleRelatedStories",e.articleTopComment="ArticleTopComment",e.autosCard="AutosCard",e.autosCarousel="AutosCarousel",e.autosEntityCardWC="AutosEntityCardWC",e.autosEntitySpan="AutosEntitySpan",e.autosGarageCard="AutosGarageCard",e.autosMarketplaceCard="AutosMarketplaceCard",e.backToTopButton="BackToTopButton",e.backgroundGallery="BackgroundGallery",e.backgroundGradient="BackgroundGradient",e.backgroundImageCommon="BackgroundImageCommon",e.backgroundImageEdge="BackgroundImageEdge",e.backgroundImageWC="BackgroundImageWC",e.bannerManager="BannerManager",e.baseHeader="BaseHeader",e.bingAdsManager="BingAdsManager",e.bingAnswers="BingAnswers",e.bingCards="BingCardsExperience",e.bingDailyQuizCard="BingDailyQuizCard",e.bingHealthCard="BingHealthCard",e.bingHealthFitnessCard="BingHealthFitnessCard",e.bingHomepageFeed="BingHomepageFeed",e.bingIntlUpsell="BingIntlUpsell",e.bingMiniShopping="BingMiniShopping",e.bingShopping="BingShopping",e.bingShoppingLifestyleCard="BingShoppingLifestyleCard",e.bingShoppingMeStripe="BingShoppingMeStripe",e.bingThisOrThatCard="BingThisOrThatCard",e.bingWebSSO="BingWebSSO",e.boostAd="BoostAd",e.boostAdCard="BoostAdCard",e.brandZone="BrandZone",e.breakingNews="BreakingNews",e.breakingNewsWC="BreakingNewsWC",e.calendarCard="CalendarCard",e.cardAction="CardAction",e.cardActionV2="CardActionV2",e.cardActionWC="CardActionWC",e.cashbackCarouselCard="CashbackCarouselCard",e.casualGamesBanner="CasualGamesBanner",e.casualGamesCard="CasualGamesCard",e.casualGamesCarouselCard="CasualGamesCarouselCard",e.casualGamesEventCard="CasualGamesEventCard",e.casualGamesDevelopersPage="CasualGamesDevelopersPage",e.casualGamesFeed="CasualGamesFeed",e.casualGamesFrame="CasualGamesFrame",e.casualGamesGameCardCarousel="CasualGamesGameCardCarousel",e.casualGamesGameplay="CasualGamesGameplay",e.casualGamesGameplayRightRail="CasualGamesGameplayRightRail",e.casualGamesHub="CasualGamesHub",e.casualGamesLandingV2="CasualGamesLandingV2",e.casualGamesStripeCarouselCard="CasualGamesStripeCarouselCard",e.channelDesktopContent="ChannelDesktopContent",e.channelEntryPoint="ChannelEntryPoint",e.channelFilterCard="ChannelFilterCard",e.channelList="ChannelList",e.channelMobileContent="ChannelMobileContent",e.channelPage="ChannelPage",e.channelStore="ChannelStore",e.channelsNews="ChannelsNews",e.clarity="Clarity",e.cmsBaseExperience="CmsBaseExperience",e.cmsExperience="CmsExperience",e.codexBingChat="CodexBingChat",e.coldStart="ColdStart",e.coldStartWC="ColdStartWC",e.comboCard="ComboCard",e.comments="Comments",e.commonAutoSuggest="CommonAutoSuggest",e.commonHeader="CommonHeader",e.commonHeaderWC="CommonHeaderWC",e.commonSearchBoxEdgeNext="CommonSearchBoxEdgeNext",e.commonSettingsEdgeNext="CommonSettingsEdgeNext",e.communityCard="CommunityCard",e.communityComposeCopilotWC="CommunityComposeCopilotWC",e.communityInfoCard="CommunityInfoCard",e.commuteCard="CommuteCard",e.companyNewsCard="CompanyNewsCard",e.complexContentPreview="ComplexContentPreview",e.conditionalBanner="ConditionalBanner",e.conditionalBannerHpWC="ConditionalBannerHpWC",e.conditionalBannerWC="ConditionalBannerWC",e.consumptionFeed="ConsumptionFeed",e.consumptionFeedWC="ConsumptionFeedWC",e.consumptionPage="ConsumptionPage",e.contentCarouselMultiple="ContentCarouselMultiple",e.contentFlexInfoPane="ContentFlexInfoPane",e.contentGroup="ContentGroup",e.contentGroupCard="ContentGroupCard",e.contentNavigationBar="ContentNavigationBar",e.contentPreview="ContentPreview",e.contentPreviewSlide="ContentPreviewSlide",e.contentProvider="ContentProvider",e.contentRelated="ContentRelated",e.contentSharingToolbar="ContentSharingToolbar",e.contentTts="ContentTts",e.contextualFeedback="ContextualFeedback",e.contextualFeedbackWC="ContextualFeedbackWC",e.covidChatBot="CovidChatBot",e.cpcMonetizationDashboard="CpcMonetizationDashboard",e.dailyBrief="DailyBrief",e.dailyBriefWC="DailyBriefWC",e.dailyDiscovery="DailyDiscovery",e.dashboardFallback="DashboardFallback",e.dashboardSettings="DashboardSettings",e.debugButton="DebugButton",e.denseCard="DenseCard",e.desktopFeed="DesktopFeed",e.desktopFeedHubWC="DesktopFeedHubWC",e.desktopFeedViewsWC="DesktopFeedViewsWC",e.desktopFeedWC="DesktopFeedWC",e.devTools="DevTools",e.didYouKnowImageWCExperience="DidYouKnowImageWCExperience",e.didYouKnowWCExperience="DidYouKnowWCExperience",e.digestCard="DigestCard",e.displayAds="DisplayAds",e.displayAdsWC="DisplayAdsWC",e.displayAdsWithContentFallback="DisplayAdsWithContentFallback",e.distributionFeed="DistributionFeed",e.distributionHeader="DistributionHeader",e.distributionPage="DistributionPage",e.distributionPivotsNav="DistributionPivotsNav",e.donationNpoCard="DonationNpoCard",e.edgeChromiumPageWC="EdgeChromiumPageWC",e.edgeHeader="EdgeHeader",e.edgeNextPage="EdgeNextPage",e.edgePage="EdgePage",e.edgePageSettings="PageSettings",e.edgeShopping="EdgeShopping",e.editorsChoicePromoCard="EditorsChoicePromoCard",e.electionCard="ElectionCard",e.elections="Elections",e.emmxEntrypoint="EmmxEntrypoint",e.enterpriseComplianceBanner="EnterpriseComplianceBanner",e.entertainmentCard="EntertainmentCard",e.entertainmentPremierCard="EntertainmentPremierCard",e.entertainmentPremieresCard="EntertainmentPremieresCard",e.entryPoint="EntryPoint",e.entryPointEdgeNext="EntryPointEdgeNext",e.entryPointHpMobile="EntryPointHpMobile",e.entryPointHpWC="EntryPointHpWC",e.entryPointMobileHub="EntryPointMobileHub",e.entryPointViewsWC="EntryPointViewsWC",e.eoabViews="EoabViews",e.eoabViewsAutos="EoabViewsAutos",e.eoabViewsFinance="EoabViewsFinance",e.eoabViewsShopping="EoabViewsShopping",e.eoabViewsTravel="EoabViewsTravel",e.esportsCard="EsportsCard",e.esportsCasualGamesCard="EsportsCasualGamesCard",e.esportsLiveStreamCard="EsportsLiveStreamCard",e.esportsLivestreamCarouselWC="EsportsLivestreamCarouselWC",e.esportsStreamsCard="EsportsStreamsCard",e.eventHubFollowHeader="EventHubFollowHeader",e.eventHubHeroNav="EventHubHeroNav",e.eventHubPage="EventHubPage",e.exampleOfferCard="ExampleOfferCard",e.experiencePreviewCta="ExperiencePreviewCta",e.externalContentPreview="ExternalContentPreview",e.externalNativeAd="ExternalNativeAd",e.familyCard="FamilyCard",e.feedContainer="FeedContainer",e.feedLevelFeedbackWC="FeedLevelFeedbackWC",e.feedNavigationHp="FeedNavigationHp",e.feedToggle="FeedToggle",e.feedbackCard="FeedbackCard",e.feedbackDialog="FeedbackDialog",e.feedbackDialogWC="FeedbackDialogWC",e.feedbackLink="FeedbackLink",e.feedbackLinkWC="FeedbackLinkWC",e.financeAdvancedChart="FinanceAdvancedChart",e.financeAnalysisPage="FinanceAnalysisPage",e.financeAnalystRatingCard="FinanceAnalystRatingCard",e.financeAskLandingPage="FinanceAskLandingPage",e.financeBingAds="FinanceBingAds",e.financeCardCommon="FinanceCardCommon",e.financeCarousel="FinanceCarousel",e.financeChartPage="FinanceChartPage",e.financeCollectionDetailTable="FinanceCollectionDetailTable",e.financeCollectionPerformanceCard="FinanceCollectionPerformanceCard",e.financeCombinationCard="FinanceCombinationCard",e.financeCompanyPage="FinanceCompanyPage",e.financeCompanyProfileCard="FinanceCompanyProfileCard",e.financeCompareAdd="FinanceCompareAdd",e.financeCompareChartView="FinanceCompareChartView",e.financeCompareHeader="FinanceCompareHeader",e.financeComparePage="FinanceComparePage",e.financeCompareTable="FinanceCompareTable",e.financeCompositionTemplate="FinanceCompositionTemplate",e.financeCrashCourseFeed="FinanceCrashCourseFeed",e.financeCrashCourseViewer="FinanceCrashCourseViewer",e.financeCryptoInsights="FinanceCryptoInsights",e.financeCryptoLearnCard="FinanceCryptoLearnCard",e.financeCryptoMarketHighlight="FinanceCryptoMarketHighlight",e.financeCryptoQnA="FinanceCryptoQnA",e.financeCryptoTable="FinanceCryptoTable",e.financeCurrencyConverter="FinanceCurrencyConverter",e.financeDetailComposition="FinanceDetailComposition",e.financeDetailHeader="FinanceDetailHeader",e.financeDetailNavigation="FinanceDetailNavigation",e.financeDetailPageV2="FinanceDetailPageV2",e.financeDetailsCard="FinanceDetailsCard",e.financeDetailsCardV2="FinanceDetailsCardV2",e.financeDianomiAds="FinanceDianomiAds",e.financeDiscoverySection="FinanceDiscoverySection",e.financeEarningChart="FinanceEarningChart",e.financeEarningGameCard="FinanceEarningGameCard",e.financeEarningsCalendarCard="FinanceEarningsCalendarCard",e.financeEarningsCard="FinanceEarningsCard",e.financeEarningsEventCard="FinanceEarningsEventCard",e.financeEarningsForecast="FinanceEarningsForecast",e.financeEarningsReport="FinanceEarningsReport",e.financeEconomicIndicator="FinanceEconomicIndicator",e.financeEconomicCalendar="FinanceEconomicCalendar",e.financeEtfInvestors="FinanceEtfInvestors",e.financeEtfL3Holdings="FinanceEtfL3Holdings",e.financeEtfProfile="FinanceEtfProfile",e.financeEventBrief="FinanceEventBrief",e.financeEventLandingPage="FinanceEventLandingPage",e.financeEventsCalendarCard="FinanceEventsCalendarCard",e.financeEventsComposition="FinanceEventsComposition",e.financeEventsTimeline="FinanceEventsTimeline",e.financeExploreCenter="FinanceExploreCenter",e.financeFeeds="FinanceFeeds",e.financeFeedsSection="FinanceFeedsSection",e.financeFinancialsCard="FinanceFinancialsCard",e.financeFinancialsChartCard="FinanceFinancialsChartCard",e.financeFinancialsKeyratiosComposition="FinanceFinancialsKeyratiosComposition",e.financeFinancialsLineChart="FinanceFinancialsLineChart",e.financeFollowButton="FinanceFollowButton",e.financeFundCard="FinanceFundCard",e.financeFundCardWrapper="FinanceFundCardWrapper",e.financeGamificationCard="FinanceGamificationCard",e.financeGradeChart="FinanceGradeChart",e.financeIndicesCard="FinanceIndicesCard",e.financeInsiderTrades="FinanceInsiderTrades",e.financeInsights="FinanceInsights",e.financeInvestorBioCard="FinanceInvestorBioCard",e.financeInvestorDetailPage="FinanceInvestorDetailPage",e.financeInvestorHoldingsHighlight="FinanceInvestorHoldingsHighlight",e.financeInvestorHoldingsTable="FinanceInvestorHoldingsTable",e.financeInvestorNavigationRail="FinanceInvestorNavigationRail",e.financeInvestorPerformanceCard="FinanceInvestorPerformanceCard",e.financeInvestorPerformanceGraph="FinanceInvestorPerformanceGraph",e.financeInvestorPortfolioSectors="FinanceInvestorPortfolioSectors",e.financeInvestorProfileHeader="FinanceInvestorProfileHeader",e.financeKeyFactsCard="FinanceKeyFactsCard",e.financeL1TopStories="FinanceL1TopStories",e.financeL2NewsCard="FinanceL2NewsCard",e.financeL3FinancialsNavigation="FinanceL3FinancialsNavigation",e.financeL3HistoryTab="FinanceL3HistoryTab",e.financeL3OptionsPage="FinanceL3OptionsPage",e.financeL3OwnershipBasic="FinanceL3OwnershipBasic",e.financeL3OwnershipEventsList="FinanceL3OwnershipEventsList",e.financeL3OwnershipGraph="FinanceL3OwnershipGraph",e.financeL3OwnershipHoldersTable="FinanceL3OwnershipHoldersTable",e.financeL3PageComposition="FinanceL3PageComposition",e.financeL3RelatedPage="FinanceL3RelatedPage",e.financeL4IncomeStatementTable="FinanceL4IncomeStatementTable",e.financeL4KeyRatiosTable="FinanceL4KeyRatiosTable",e.financeL4PageComposition="FinanceL4PageComposition",e.financeLandingPageV2="FinanceLandingPageV2",e.financeLearnPage="FinanceLearnPage",e.financeListDetailHeader="FinanceListDetailHeader",e.financeListDetailPage="FinanceListDetailPage",e.financeListLandingPage="FinanceListLandingPage",e.financeMarketCard="FinanceMarketCard",e.financeMarketDescription="FinanceMarketDescription",e.financeMarketMoversCard="FinanceMarketMoversCard",e.financeMarketStatus="FinanceMarketStatus",e.financeMarketSummaryTrend="FinanceMarketSummaryTrend",e.financeMarketsPageComposition="FinanceMarketsPageComposition",e.financeMergeWatchlist="FinanceMergeWatchlist",e.financeMiddleLayer="FinanceMiddleLayer",e.financeNewInvestorQuickStarter="FinanceNewInvestorQuickStarter",e.financeNewsCard="FinanceNewsCard",e.financeNewsContent="FinanceNewsContent",e.financeNewsLandingpage="FinanceNewsLandingpage",e.financeNotificationBar="FinanceNotificationBar",e.financePerfRankCard="FinancePerfRankCard",e.financePortfolioList="FinancePortfolioList",e.financeProjectionPromoteCard="FinanceProjectionPromoteCard",e.financePwaTip="FinancePwaTip",e.financeRecentlyViewedCard="FinanceRecentlyViewedCard",e.financeRecommendationCard="FinanceRecommendationCard",e.financeRecommendationCardV2="FinanceRecommendationCardV2",e.financeRedLine="FinanceRedLine",e.financeRelatedEarnings="FinanceRelatedEarnings",e.financeReturnCalculator="FinanceReturnCalculator",e.financeScreener="FinanceScreener",e.financeSearchBox="FinanceSearchBox",e.financeSectionEarningsCard="FinanceSectionEarningsCard",e.financeSectionHealthCard="FinanceSectionHealthCard",e.financeSectionInvestorsCard="FinanceSectionInvestorsCard",e.financeSectionPerformanceCard="FinanceSectionPerformanceCard",e.financeSectionTopstoriesCard="FinanceSectionTopstoriesCard",e.financeSectionValuationCard="FinanceSectionValuationCard",e.financeSentimentChart="FinanceSentimentChart",e.financeSentimentWizard="FinanceSentimentWizard",e.financeStockL2="FinanceStockL2",e.financeStockL2Navigation="FinanceStockL2Navigation",e.financeTitleCard="FinanceTitleCard",e.financeTopRated="FinanceTopRated",e.financeTrendCard="FinanceTrendCard",e.financeTrendingRelated="FinanceTrendingRelated",e.financeUserNavigation="FinanceUserNavigation",e.financeVideosFeed="FinanceVideosFeed",e.financeWalkthrough="FinanceWalkthrough",e.financeWatchlistCard="FinanceWatchlistCard",e.financeWatchlistListView="FinanceWatchlistListView",e.financeWatchlistManagement="FinanceWatchlistManagement",e.financeWatchlistMiniView="FinanceWatchlistMiniView",e.financeWatchlistPage="FinanceWatchlistPage",e.financeWatchlistPageV2="FinanceWatchlistPageV2",e.financeWatchlistStart="FinanceWatchlistStart",e.financeWatchlistSuggestion="FinanceWatchlistSuggestion",e.financeWatchlistSummary="FinanceWatchlistSummary",e.firstPartyPage="FirstPartyPage",e.fitnessCard="FitnessCard",e.fitnessSingleVideo="FitnessSingleVideo",e.fitnessSingleVideoHealthapp="FitnessSingleVideoHealthapp",e.floatButtonGroupWC="FloatButtonGroupWC",e.flyoutCard="FlyoutCard",e.followingFreConfirmation="FollowingFreConfirmation",e.followingFreFullWidth="FollowingFreFullWidth",e.foodSimilarItems="FoodSimilarItems",e.forumDealsPage="ForumDealsPage",e.freMarketSelector="FreMarketSelector",e.frequentSitesCardWC="FrequentSitesCardWC",e.galleryPage="GalleryPage",e.gameCard="GameCard",e.gamingChannel="GamingChannel",e.gamingCompeteCard="GamingCompeteCard",e.gamingDiscoverStrip="GamingDiscoverStrip",e.gamingGamerModeUpsellCard="GamingGamerModeUpsellCard",e.gamingInterestGroupCard="GamingInterestGroupCard",e.gamingMatchCard="GamingMatchCard",e.gamingMediaCarousel="GamingMediaCarousel",e.gamingPage="GamingPage",e.gamingPersonalizationCard="GamingPersonalizationCard",e.gamingRecentlyPlayedCard="GamingRecentlyPlayedCard",e.gamingRecommendedCard="GamingRecommendedCard",e.gamingRedditCard="GamingRedditCard",e.gamingRewardsCard="GamingRewardsCard",e.gamingStreamCard="GamingStreamCard",e.gamingTournamentCard="GamingTournamentCard",e.gamingUpcomingCard="GamingUpcomingCard",e.gamingVideoCard="GamingVideoCard",e.generalElections="GeneralElections",e.gmailEmailPreview="GmailEmailPreview",e.gridViewFeed="GridViewFeed",e.groceryCouponSdCard="GroceryCouponSdCard",e.headerMenuWindowsShell="HeaderMenuWindowsShell",e.headerNavigationLogo="HeaderNavigationLogo",e.headerUpsellWindowsShell="HeaderUpsellWindowsShell",e.headerWindowsShellV2="HeaderWindowsShellV2",e.headerWindowsShellWC="HeaderWindowsShellWC",e.healthArticlesCardWC="HealthArticlesCardWC",e.healthDietPlanScheduleWC="HealthDietPlanScheduleWC",e.healthDietPlansPage="HealthDietPlansPage",e.healthExpertCommunity="HealthExpertCommunity",e.healthExpertCreation="HealthExpertCreation",e.healthExpertTermsConditions="HealthExpertTermsConditions",e.healthFeedbackWC="HealthFeedbackWC",e.healthFitnessCarousel="HealthFitnessCarousel",e.healthFitnessChallengePage="HealthFitnessChallengePage",e.healthFoodAtoz="HealthFoodAtoz",e.healthFoodHealtheffectsWC="HealthFoodHealtheffectsWC",e.healthFoodRecipesWC="HealthFoodRecipesWC",e.healthHub="HealthHub",e.healthHubAskProfessionals="HealthHubAskProfessionals",e.healthHubCondition="HealthHubCondition",e.healthHubDiagnostics="HealthHubDiagnostics",e.healthHubDrugs="HealthHubDrugs",e.healthHubHealthapp="HealthHubHealthapp",e.healthHubHealthappShell="HealthHubHealthappShell",e.healthHubPage="HealthHubPage",e.healthHubProcedures="HealthHubProcedures",e.healthHubSymptoms="HealthHubSymptoms",e.healthInterestsManager="HealthInterestsManager",e.healthInterestsManagerShell="HealthInterestsManagerShell",e.healthQnAWCExperience="HealthQnAWCExperience",e.healthRiverWC="HealthRiverWC",e.healthTipReact="HealthTipReact",e.healthTipWC="HealthTipWC",e.healthTopSpan="HealthTopSpan",e.healthTopicFlyout="HealthTopicFlyout",e.healthTopicFlyoutShell="HealthTopicFlyoutShell",e.healthTranslationWC="HealthTranslationWC",e.healthWidget="HealthWidget",e.hiddenContent="HiddenContent",e.holidayEffects="HolidayEffects",e.homePage="HomePage",e.homepageFooter="HomepageFooter",e.homepageHeader="HomepageHeader",e.horoscopeAnswerCard="HoroscopeAnswerCard",e.horoscopeAnswerCardWC="HoroscopeAnswerCardWC",e.horoscopeCard="HoroscopeCard",e.hotListCard="HotListCard",e.iframe="IFrame",e.imageSearch="ImageSearch",e.imageSearchWC="ImageSearchWC",e.immersiveFullscreen="ImmersiveFullscreen",e.industryNewsCard="IndustryNewsCard",e.infopane="Infopane",e.inspirationCard="InspirationCard",e.interestFreCard="InterestFreCard",e.interestManagementCard="InterestManagementCard",e.interests="Interests",e.interestsLeftRail="InterestsLeftRail",e.interestsManager="InterestsManager",e.interestsSearch="InterestsSearch",e.interestsV1Wrapper="InterestsV1Wrapper",e.interestsV2="InterestsV2",e.interestsV3="InterestsV3",e.interestsWC="InterestsWC",e.languageToggle="LanguageToggle",e.languageToggleWC="LanguageToggleWC",e.layoutSwitcher="LayoutSwitcher",e.legacySharingToolbar="LegacySharingToolbar",e.linkedInCard="LinkedInCard",e.linkedInNewsCard="LinkedInNewsCard",e.localGuideCard="LocalGuideCard",e.localHubHeader="LocalHubHeader",e.localNews="LocalNews",e.localNewsViewCard="LocalNewsViewCard",e.localizeStringsTempExperience="LocalizeStringsTempExperience",e.locationContentCard="LocationContentCard",e.locationEditorDialog="LocationEditorDialog",e.locationMarker="LocationMarker",e.locationSelector="LocationSelector",e.locationTime="LocationTime",e.lottery="Lottery",e.mailSignoutBanner="MailSignoutBanner",e.mangaCard="MangaCard",e.mangaHub="MangaHub",e.mangaPage="MangaPage",e.mangaSlideShow="MangaSlideShow",e.marketAggregator="MarketAggregator",e.marketLanguageToggleWC="MarketLanguageToggleWC",e.marketSelector="MarketSelector",e.marketplaceCardWC="MarketplaceCardWC",e.meControl="MeControl",e.meControlWC="MeControlWC",e.meStripe="MeStripe",e.meStripeWC="MeStripeWC",e.mediaServices="MediaServices",e.meetNow="MeetNow",e.microsoftEdgeWidget="MicrosoftEdgeWidget",e.microsoftFeedCard="MicrosoftFeedCard",e.microsoftLogo="MicrosoftLogo",e.microsoftNewsPage="MicrosoftNewsPage",e.migrationConsent="MigrationConsent",e.miniHeader="MiniHeader",e.mmxPage="MMXPage",e.mns="Mns",e.mnsCreatorDashboard="MnsCreatorDashboard",e.mobileAppUpsell="MobileAppUpsell",e.mobileChannelSlider="MobileChannelSlider",e.mobileConsumptionPage="MobileConsumptionPage",e.mobileFeed="MobileFeed",e.mobileFeedHub="MobileFeedHub",e.mobileFeedWC="MobileFeedWC",e.mobileFooter="MobileFooter",e.mobileHeader="MobileHeader",e.mobileMarketSelector="MobileMarketSelector",e.mobileNotification="MobileNotification",e.mobilePopupWindow="MobilePopupWindow",e.mobileRewardsCard="MobileRewardsCard",e.mobileShoppingCard="MobileShoppingCard",e.mobileStoryViewer="MobileStoryViewer",e.mobileTip="MobileTip",e.mobileWidget="MobileWidget",e.modernRightRail="ModernRightRail",e.moneyAugmentCard="MoneyAugmentCard",e.moneyCard="MoneyCard",e.moneyInfo="MoneyInfo",e.moneyInfoCard="MoneyInfoCard",e.moneyInfoCardWC="MoneyInfoCardWC",e.moneyInfoSpan="MoneyInfoSpan",e.msRewards="MsRewards",e.msRewardsWC="MsRewardsWC",e.msaAddressForm="MsaAddressForm",e.msnSettingMenu="MsnSettingMenu",e.myBriefRiverCard="MyBriefRiverCard",e.nativeAd="NativeAd",e.nativeAdWC="NativeAdWC",e.nativeTopAd="NativeTopAd",e.navigationPageExperience="NavigationPageExperience",e.newsFlipperCard="NewsFlipperCard",e.newsGroupsCard="NewsGroupsCard",e.newsGuard="NewsGuard",e.newsHeadlineBelowSearchbox="NewsHeadlineBelowSearchbox",e.newsSegmentCarousel="NewsSegmentCarousel",e.newsbarFeedFooter="NewsbarFeedFooter",e.newsbarFeedWC="NewsbarFeedWC",e.newsbarUpsell="NewsbarUpsell",e.newsbarUpsellWC="NewsbarUpsellWC",e.newsletterSignup="NewsletterSignup",e.newsletterSignupPage="NewsletterSignupPage",e.nextdoorCard="NextdoorCard",e.nextdoorPage="NextdoorPage",e.notificationBell="NotificationBell",e.notificationBellWC="NotificationBellWC",e.notificationMiniCard="NotificationMiniCard",e.nudgeSpotlightCard="NudgeSpotlightCard",e.nurturingCoachMark="NurturingCoachMark",e.office="Office",e.officeCoachmark="OfficeCoachmark",e.officeDocumentsTableWC="OfficeDocumentsTableWC",e.officeLeftRail="OfficeLeftRail",e.onThisDayCard="OnThisDayCard",e.onThisDayCardSmall="OnThisDayCardSmall",e.onThisDayCardWC="OnThisDayCardWC",e.oneFooter="OneFooter",e.overlay="Overlay",e.overlayWC="OverlayWC",e.pageRefresh="PageRefresh",e.pageRefreshWC="PageRefreshWC",e.panoPage="PanoPage",e.partnerUpsellCard="PartnerUpsellCard",e.partnerWidget="PartnerWidget",e.personalFinanceExpenseDistribution="PersonalFinanceExpenseDistribution",e.personalFinanceTransactionsCard="PersonalFinanceTransactionsCard",e.personalizeNavButton="PersonalizeNavButton",e.photoCard="PhotoCard",e.pillFreOverlay="PillFreOverlay",e.pillWC="PillWC",e.pivotContent="PivotContent",e.pivotContentV2="PivotContentV2",e.pivotsMobileWC="PivotsMobileWC",e.pivotsNav="PivotsNav",e.pollsCard="PollsCard",e.pollsCardWC="PollsCardWC",e.portugueseElectionExperience="PortugueseElectionExperience",e.poweredByLegend="PoweredbyLegend",e.poweredByLegendWC="PoweredbyLegendWC",e.prayerTimesCard="PrayerTimesCard",e.premiumProfilePromoCard="PremiumProfilePromoCard",e.prideEventCard="PrideEventCard",e.prismCards="PrismCards",e.prismCarouselCard="PrismCarouselCard",e.prismFeed="PrismFeed",e.prismSdCard="PrismSdCard",e.proactiveCanvas="ProactiveCanvas",e.productivityHub="ProductivityHub",e.profileArticles="ProfileArticles",e.profilePromoCard="ProfilePromoCard",e.promoBanner="PromoBanner",e.promotedAdWC="PromotedAdWC",e.publisherCarousel="PublisherCarousel",e.publisherList="PublisherList",e.publisherSubscribeFollowButton="PublisherSubscribeFollowButton",e.publishersManagement="PublishersManagement",e.pullToRefresh="PullToRefresh",e.qna="Qna",e.qnaFeed404Page="QnaFeed404Page",e.qnaFeedCard="QnaFeedCard",e.qnaFeedCardMenu="QnaFeedCardMenu",e.qnaFeedCarousel="QnaFeedCarousel",e.qnaFeedCategoriesMenu="QnaFeedCategoriesMenu",e.qnaFeedExploreTopics="QnaFeedExploreTopics",e.qnaFeedList="QnaFeedList",e.qnaFeedMyTopics="QnaFeedMyTopics",e.qnaFeedPage="QnaFeedPage",e.qnaFeedRelatedQuestions="QnaFeedRelatedQuestions",e.qnaFeedReportCard="QnaFeedReportCard",e.qnaFeedSuggestedTopics="QnaFeedSuggestedTopics",e.qnaFeedTopicDetail="QnaFeedTopicDetail",e.qnaFeedTrendingQuestions="QnaFeedTrendingQuestions",e.quizCard="QuizCard",e.reactionBreakdownDialog="ReactionBreakdownDialog",e.realEstateCard="RealEstateCard",e.recipesCards="RecipesCards",e.recipesFeed="RecipesFeed",e.recipesSdCard="RecipesSdCard",e.recipesSearch="RecipesSearch",e.recipesSingleDetail="RecipesSingleDetail",e.recipesSingleVideo="RecipesSingleVideo",e.recommendedInterests="RecommendedInterests",e.recommendedSearch="RecommendedSearch",e.recommendedSearchBelowSearchBox="RecommendedSearchBelowSearchBox",e.recommendedSearchCarousel="RecommendedSearchCarousel",e.recommendedSearchCarouselWC="RecommendedSearchCarouselWC",e.recommendedSearchesCard="RecommendedSearchesCard",e.recommendedSites="RecommendedSites",e.recommendedSitesWC="RecommendedSitesWC",e.recommendedTopics="RecommendedTopics",e.relatedSearchesCard="RelatedSearchesCard",e.rewardsCardWC="RewardsCardWC",e.rewardsDailyCheckinCard="RewardsDailyCheckinCard",e.rewardsDailySetCard="RewardsDailySetCard",e.richCalendarCard="RichCalendarCard",e.rightRailCarousel="RightRailCarousel",e.rightRailProviderCarousel="RightRailProviderCarousel",e.river="River",e.riverPlaceholder="RiverPlaceholder",e.scrollDownButton="ScrollDownButton",e.sdCardMaskWC="SdCardMaskWC",e.searchBoxCommon="SearchBoxCommon",e.searchBoxEdge="SearchBoxEdge",e.searchBoxWC="SearchBoxWC",e.searchHistoryCommon="SearchHistoryCommon",e.searchHistoryEdge="SearchHistoryEdge",e.searchHistoryEdgeNextWC="SearchHistoryEdgeNextWC",e.seeMoreButtonWindowsShell="SeeMoreButtonWindowsShell",e.selectCarousel="SelectCarousel",e.settingsDialogMsNews="SettingsDialogMsNews",e.sharedHeroNewsCard="SharedHeroNewsCard",e.sharedLinks="SharedLinks",e.sharedState="SharedState",e.sharedStrings="SharedStrings",e.sharepointNewsCard="SharepointNewsCard",e.shopContentCarousel="ShopContentCarousel",e.shoppingAllStoresPage="ShoppingAllStoresPage",e.shoppingArticlePage="ShoppingArticlePage",e.shoppingAugmentCard="ShoppingAugmentCard",e.shoppingBingProductDetails="ShoppingBingProductDetails",e.shoppingBlackjackDealPage="ShoppingBlackjackDealPage",e.shoppingBlackjackPage="ShoppingBlackjackPage",e.shoppingBuyingGuide="ShoppingBuyingGuide",e.shoppingBuyingGuidePremiumCard="ShoppingBuyingGuidePremiumCard",e.shoppingBuyingGuidesCard="ShoppingBuyingGuidesCard",e.shoppingCardWC="ShoppingCardWC",e.shoppingCarousel="ShoppingCarousel",e.shoppingCarouselProngWC="ShoppingCarouselProngWC",e.shoppingCarouselWC="ShoppingCarouselWC",e.shoppingCart="ShoppingCart",e.shoppingCashback="ShoppingCashback",e.shoppingCheckoutModal="ShoppingCheckoutModal",e.shoppingCheckoutPage="ShoppingCheckoutPage",e.shoppingColdStart="ShoppingColdStart",e.shoppingContentCard="ShoppingContentCard",e.shoppingCouponsPage="ShoppingCouponsPage",e.shoppingDealsHomePage="ShoppingDealsHomePage",e.shoppingDebugPage="ShoppingDebugPage",e.shoppingEdgeInsightsCard="ShoppingEdgeInsightsCard",e.shoppingEntryBaseExperience="ShoppingEntryBaseExperience",e.shoppingEventsDealCard="ShoppingEventsDealCard",e.shoppingFashionCarouselWC="ShoppingFashionCarouselWC",e.shoppingFeedCard="ShoppingFeedCard",e.shoppingForumFavorites="ShoppingForumFavorites",e.shoppingForumHome="ShoppingForumHome",e.shoppingForumLandingPage="ShoppingForumLandingPage",e.shoppingForumOrderCancelPage="ShoppingForumOrderCancelPage",e.shoppingForumOrderConfirmation="ShoppingForumOrderConfirmation",e.shoppingForumOrderDetails="ShoppingForumOrderDetails",e.shoppingForumOrdersPage="ShoppingForumOrdersPage",e.shoppingForumProductPage="ShoppingForumProductPage",e.shoppingForumRefundDetailsPage="ShoppingForumRefundDetailsPage",e.shoppingForumRefundOrderPage="ShoppingForumRefundOrderPage",e.shoppingForumReturnDetailsPage="ShoppingForumReturnDetailsPage",e.shoppingForumReturnOrderPage="ShoppingForumReturnOrderPage",e.shoppingForumSellerPage="ShoppingForumSellerPage",e.shoppingGrid="ShoppingGrid",e.shoppingGroupedCarousel="ShoppingGroupedCarousel",e.shoppingGuidesPage="ShoppingGuidesPage",e.shoppingHomepage="ShoppingHomepage",e.shoppingInspiration="ShoppingInspiration",e.shoppingLeaderboard="ShoppingLeaderboard",e.shoppingLiveEmbedPage="ShoppingLiveEmbedPage",e.shoppingLiveFeedPage="ShoppingLiveFeedPage",e.shoppingLiveProductDetailsPage="ShoppingLiveProductDetailsPage",e.shoppingModal="ShoppingModal",e.shoppingModelOverlay="ShoppingModelOverlay",e.shoppingMomentInTimePage="ShoppingMomentInTimePage",e.shoppingMultiTabCarousel="ShoppingMultiTabCarousel",e.shoppingNotification="ShoppingNotification",e.shoppingPage="ShoppingPage",e.shoppingPageBase="ShoppingPageBase",e.shoppingPageContent="ShoppingPageContent",e.shoppingPivotFeed="ShoppingPivotFeed",e.shoppingProductDetailPage="ShoppingProductDetailPage",e.shoppingProductPage="ShoppingProductPage",e.shoppingSdCard="ShoppingSdCard",e.shoppingSearch="ShoppingSearch",e.shoppingSearchNav="ShoppingSearchNav",e.shoppingSearchResultPage="ShoppingSearchResultPage",e.shoppingShippingAddress="ShoppingShippingAddress",e.shoppingShopTheLookPage="ShoppingShopTheLookPage",e.shoppingSmartList="ShoppingSmartList",e.shoppingSpinWheel="ShoppingSpinWheel",e.shoppingTopSpan="ShoppingTopSpan",e.shoppingVerticalListsCard="ShoppingVerticalListsCard",e.shoppingVideoShortsCarousel="ShoppingVideoShortsCarousel",e.shoppingViewsCarousel="ShoppingViewsCarousel",e.showFeed="ShowFeed",e.signInControlWC="SignInControlWC",e.signInFlyoutWC="SignInFlyoutWC",e.signalOverlay="SignalOverlay",e.simpleBanner="SimpleBanner",e.slideShow="SlideShow",e.slideshowWC="SlideshowWC",e.smartList="SmartList",e.social="Social",e.socialAvatar="SocialAvatar",e.socialBar="SocialBar",e.socialBarV2="SocialBarV2",e.socialBarWC="SocialBarWC",e.socialComment="SocialComment",e.socialCommentWC="SocialCommentWC",e.socialEditorData="SocialEditorData",e.socialEntrypoint="SocialEntrypoint",e.socialGiveSupportButton="SocialGiveSupportButton",e.socialLeadGenInArticle="SocialLeadGenInArticle",e.socialNotification="SocialNotification",e.socialPost="SocialPost",e.socialPostCard="SocialPostCard",e.socialPostEditorWC="SocialPostEditorWC",e.socialProfile="SocialProfile",e.socialProfileActionMenu="SocialProfileActionMenu",e.socialProfileAppeal="SocialProfileAppeal",e.socialProfileCard="SocialProfileCard",e.socialProfilePromo="SocialProfilePromotion",e.socialProfileRejectionDetails="SocialProfileRejectionDetails",e.socialProfileTopics="SocialProfileTopics",e.socialRelatedSources="SocialRelatedSources",e.socialReportMenu="SocialReportMenu",e.socialRewardsMedal="SocialRewardsMedal",e.socialRewardsPromotion="SocialRewardsPromotion",e.socialShareButton="SocialShareButton",e.socialStarRating="SocialStarRating",e.socialSubscriptionBanner="SocialSubscriptionBanner",e.socialSubscriptionNotification="SocialSubscriptionNotification",e.socialSubscriptionOverlay="SocialSubscriptionOverlay",e.socialSubscriptionOverlaySummary="SocialSubscriptionOverlaySummary",e.socialSubscriptionPaywall="SocialSubscriptionPaywall",e.socialSubscriptionUpsell="SocialSubscriptionUpsell",e.socialSupportResult="SocialSupportResult",e.socialTipHistory="SocialTipHistory",e.socialTipIntroduction="SocialTipIntroduction",e.socialTipPromotion="SocialTipPromotion",e.socialTipPromotionInArticle="SocialTipPromotionInArticle",e.socialTipSelection="SocialTipSelection",e.sportsAroundTheLeague="SportsAroundTheLeague",e.sportsAugmentCard="SportsAugmentCard",e.sportsBackgroundUx="SportsBackgroundUx",e.sportsBrackets="SportsBrackets",e.sportsCard="SportsCard",e.sportsCardWC="SportsCardWC",e.sportsCommentary="SportsCommentary",e.sportsCountdownTimer="SportsCountdownTimer",e.sportsCricketLayoutManager="SportsCricketLayoutManager",e.sportsCricketLeagueStats="SportsCricketLeagueStats",e.sportsCricketMatchRow="SportsCricketMatchRow",e.sportsCricketPartnerships="SportsCricketPartnerships",e.sportsCricketRankings="SportsCricketRankings",e.sportsCricketScorecard="SportsCricketScorecard",e.sportsCricketScoresAndSchedule="SportsCricketScoresAndSchedule",e.sportsEntityHeader="SportsEntityHeader",e.sportsFeaturedMatchesCard="SportsFeaturedMatchesCard",e.sportsFullStandings="SportsFullStandings",e.sportsFullStats="SportsFullStats",e.sportsGameInformation="SportsGameInformation",e.sportsGameScore="SportsGameScore",e.sportsGameSummary="SportsGameSummary",e.sportsGameSummaryFull="SportsGameSummaryFull",e.sportsGameTimeline="SportsGameTimeline",e.sportsGcPlayerStats="SportsGcPlayerStats",e.sportsGcTeamStats="SportsGcTeamStats",e.sportsGptAnalysis="SportsGptAnalysis",e.sportsHeadlinesTimelines="SportsHeadlinesTimelines",e.sportsInfo="SportsInfo",e.sportsInfoSpan="SportsInfoSpan",e.sportsLayoutRenderer="SportsLayoutRenderer",e.sportsMatchRow="SportsMatchRow",e.sportsMatchupCard="SportsMatchupCard",e.sportsMobileTabPanel="SportsMobileTabPanel",e.sportsOlympicCard="SportsOlympicCard",e.sportsOlympicCardWC="SportsOlympicCardWC",e.sportsPage="SportsPage",e.sportsPageContent="SportsPageContent",e.sportsPersonMatchRow="SportsPersonMatchRow",e.sportsPersonalizationStrip="SportsPersonalizationStrip",e.sportsPinLiveMatch="SportsPinLiveMatch",e.sportsPlayerBio="SportsPlayerBio",e.sportsPlayerInsights="SportsPlayerInsights",e.sportsPreviousMatchups="SportsPreviousMatchups",e.sportsRankingsFull="SportsRankingsFull",e.sportsScoresAndSchedule="SportsScoresAndSchedule",e.sportsScoresAndScheduleFull="SportsScoresAndScheduleFull",e.sportsSquad="SportsSquad",e.sportsStandings="SportsStandings",e.sportsStandingsList="SportsStandingsList",e.sportsStatLeaders="SportsStatLeaders",e.sportsStats="SportsStats",e.sportsTabLayout="SportsTabLayout",e.sportsTeamFormation="SportsTeamFormation",e.sportsTeamProbability="SportsTeamProbability";e.sportsTennisScoresAndScheduleFull="SportsTennisScoresAndScheduleFull",e.sportsTennisTournamentInfo="SportsTennisTournamentInfo",e.sportsTournamentInfo="SportsTournamentInfo",e.sportsTournamentLeaderboard="SportsTournamentLeaderboard",e.sportsTournamentMatchRow="SportsTournamentMatchRow",e.sportsTournamentResultsAndSchedule="SportsTournamentResultsAndSchedule",e.sportsTournamentSchedule="SportsTournamentSchedule",e.sportsTournamentStandings="SportsTournamentStandings",e.sportsUnavailablePlayers="SportsUnavailablePlayers",e.sportsVideoList="SportsVideoList",e.sportsWorldCupCard="SportsWorldCupCard",e.sportsWorldCupCardWC="SportsWorldCupCardWC",e.spotlightCard="SpotlightCard",e.spotlightCardWC="SpotlightCardWC",e.starterKit="StarterKit",e.starterKitWC="StarterKitWC",e.stickyPeek="StickyPeek",e.storyCarousel="StoryCarousel",e.storyPage="StoryPage",e.stripe="Stripe",e.stripeFeed="StripeFeed",e.stripeView="StripeView",e.stripeWC="StripeWC",e.suggestedChannelPrompt="SuggestedChannelPrompt",e.summaryCardWC="SummaryCardWC",e.superAppPage="SuperAppHomepage",e.superBreakingNews="SuperBreakingNews",e.superCoachMark="SuperCoachMark",e.superCoachMarkWC="SuperCoachMarkWC",e.superListCard="SuperListCard",e.superNav="SuperNav",e.superNavCoachMark="SuperNavCoachMark",e.superappBannerWC="SuperappBannerWC",e.superappUpsellCardWC="SuperappUpsellCardWC",e.tabbedFeedWC="TabbedFeedWC",e.tabbedInfopane="TabbedInfopane",e.tabbedInfopaneTabPreview="TabbedInfopaneTabPreview",e.testBingNudge="TestBingNudge",e.themePicker="ThemePicker",e.themePickerWC="ThemePickerWC",e.tipsCard="TipsCard",e.toast="Toast",e.toastWC="ToastWC",e.todoCardWC="TodoCardWC",e.topSites="TopSites",e.topSitesBookmarks="TopSitesBookmarks",e.topSitesCommon="TopSitesCommon",e.topSitesEdge="TopSitesEdge",e.topSitesEdgeNextWC="TopSitesEdgeNextWC",e.topSitesNewsbar="TopSitesNewsbar",e.topSitesSubscription="TopSitesSubscription",e.topicTags="TopicTags",e.topicsHub="TopicsHub",e.trafficCard="TrafficCard",e.trafficCardWC="TrafficCardWC",e.trafficHero="TrafficHero",e.trafficMap="TrafficMap",e.trafficPage="TrafficPage",e.translateTemporary="TranslateTemporary",e.travelArticleCard="TravelArticleCard",e.travelArticlePageCard="TravelArticlePageCard",e.travelArticlePill="TravelArticlePill",e.travelCard="TravelCard",e.travelCarousel="TravelCarousel",e.travelCollectionCard="TravelCollectionCard",e.travelDestination="TravelDestination",e.travelDestinationBanner="TravelDestinationBanner",e.travelDestinationDetailsBanner="TravelDestinationDetailsBanner",e.travelFeed="TravelFeed",e.travelFlightCarousel="TravelFlightCarousel",e.travelHotelCarousel="TravelHotelCarousel",e.travelInspirationCard="TravelInspirationCard",e.travelInspirationCardWC="TravelInspirationCardWC",e.travelLandingPage="TravelLandingPage",e.travelMsnHpCard="TravelMsnHpCard",e.travelPage="TravelPage",e.travelSaveButton="TravelSaveButton",e.travelSdCarrentalsCard="TravelSdCarrentalsCard",e.travelSdDestinationsCard="TravelSdDestinationsCard",e.travelSdFlightsCard="TravelSdFlightsCard",e.travelSdHotelsCard="TravelSdHotelsCard",e.travelSdThemesCard="TravelSdThemesCard",e.travelTabCarousel="TravelTabCarousel",e.travelTourActivityCard="TravelTourActivityCard",e.trendingNews="TrendingNews",e.trendingNow="TrendingNow",e.trendingNowWC="TrendingNowWC",e.trendingSearchCard="TrendingSearchCard",e.trendingTopics="TrendingTopics",e.tripleCard="TripleCard",e.ugcCreator="UgcCreator",e.ugcCreatorHomepage="UgcCreatorHomepage",e.unifiedMobileFeed="UnifiedMobileFeed",e.userInitiatedPageRefresh="UserInitiatedPageRefresh",e.userProfileDisplay="UserProfileDisplay",e.verticalLeftNav="VerticalLeftNav",e.videoCard="VideoCard",e.videoCardWC="VideoCardWC",e.videoDetails="VideoDetails",e.videoList="VideoList",e.videoShoppingCard="VideoShoppingCard",e.videoShoppingCarouselCard="VideoShoppingCarouselCard",e.videosFeed="VideosFeed",e.viewsCoachmark="ViewsCoachmark",e.viewsNativeAd="ViewsNativeAd",e.viewsRail="ViewsRail",e.voiceSearch="VoiceSearch",e.voiceSearchWC="VoiceSearchWC",e.waffleWC="WaffleWC",e.walletPersonalizedOfferSdCardWC="WalletPersonalizedOfferSdCardWC",e.watch="Watch",e.watchVideosVerticalCarousel="WatchVideosVerticalCarousel",e.watchWC="WatchWC",e.watchlistCard="WatchlistCard",e.watchlistView="WatchlistView",e.waterTrackerCard="WaterTrackerCard",e.waterfallViewFeed="WaterfallViewFeed",e.weatherActivityPlanner="WeatherActivityPlanner",e.weatherActivityWatchlist="WeatherActivityWatchlist",e.weatherAds="WeatherAds",e.weatherAtContainer="WeatherAtContainer",e.weatherCard="WeatherCard",e.weatherCardData="WeatherCardData",e.weatherCardWC="WeatherCardWC",e.weatherCarousel="WeatherCarousel",e.weatherColdStartGuide="WeatherColdStartGuide",e.weatherCurrentWC="WeatherCurrentWC",e.weatherDailyTrendChart="WeatherDailyTrendChart",e.weatherDetailsWind="WeatherDetailsWind",e.weatherDetailsPollen="WeatherDetailsPollen",e.weatherDetailsTemperature="WeatherDetailsTemperature",e.weatherDetailsPressure="WeatherDetailsPressure",e.weatherDetailsHumidity="WeatherDetailsHumidity",e.weatherDetailsVisibility="WeatherDetailsVisibility",e.weatherDetailsSunMoon="WeatherDetailsSunMoon",e.weatherDetailsUV="WeatherDetailsUV",e.weatherData="WeatherData",e.weatherDrawerMobile="WeatherDrawerMobile",e.weatherEplant="WeatherEplant",e.weatherEplantTasksPhone="WeatherEplantTasksPhone",e.weatherEventAlert="WeatherEventAlert",e.weatherEventBanner="WeatherEventBanner",e.weatherExperienceTemplate="WeatherExperienceTemplate",e.weatherExtensionSection="WeatherExtensionSection",e.weatherFeedback="WeatherFeedback",e.weatherFloatButtons="WeatherFloatButtons",e.weatherForecast="WeatherForecast",e.weatherForecastDayNightWC="WeatherForecastDayNightWC",e.weatherForecastDayWC="WeatherForecastDayWC",e.weatherForecastHistoryWC="WeatherForecastHistoryWC",e.weatherForecastMobile="WeatherForecastMobile",e.weatherForecastPerHourWC="WeatherForecastPerHourWC",e.weatherForecastSunMoonPhaseWC="WeatherForecastSunMoonPhaseWC",e.weatherForecastSunMoonWC="WeatherForecastSunMoonWC",e.weatherForecastTab="WeatherForecastTab",e.weatherForecastVideo="WeatherForecastVideo",e.weatherFreDialog="WeatherFreDialog",e.weatherFreRightRail="WeatherFreRightRail",e.weatherFunFact="WeatherFunFact",e.weatherGuidedConversation="WeatherGuidedConversation",e.weatherHeroExperience="WeatherHeroExperience",e.weatherHistoricalRecordWC="WeatherHistoricalRecordWC",e.weatherHistoricalTemperatureWC="WeatherHistoricalTemperatureWC",e.weatherHistoricalTrends="WeatherHistoricalTrends",e.weatherHolidayEffects="WeatherHolidayEffects",e.weatherHourlyHistogramWC="WeatherHourlyHistogramWC",e.weatherHourlyTab="WeatherHourlyTab",e.weatherImmersiveForecastWC="WeatherImmersiveForecastWC",e.weatherInfoCard="WeatherInfoCard",e.weatherInfoMini="WeatherInfoMini",e.weatherInfoSpan="WeatherInfoSpan",e.weatherInsightsSection="WeatherInsightsSection",e.weatherLifeAllQuiz="WeatherLifeAllQuiz",e.weatherLifeCurrent="WeatherLifeCurrent",e.weatherLifeCurrentV2="WeatherLifeCurrentV2",e.weatherLifeDayHourPanel="WeatherLifeDayHourPanel",e.weatherLifeEntryWC="WeatherLifeEntryWC",e.weatherLifeFactsCard="WeatherLifeFactsCard",e.weatherLifeHolidayCard="WeatherLifeHolidayCard",e.weatherLifeIndexEntry="WeatherLifeIndexEntry",e.weatherLifeNews="WeatherLifeNews",e.weatherLifeQuizCard="WeatherLifeQuizCard",e.weatherLifeSpecialToday="WeatherLifeSpecialToday",e.weatherLocationCardWC="WeatherLocationCardWC",e.weatherLocationMap="WeatherLocationMap",e.weatherLocationPanel="WeatherLocationPanel",e.weatherLocationPopup="WeatherLocationPopup",e.weatherLocationSearch="WeatherLocationSearch",e.weatherLocationSearchPhoneWC="WeatherLocationSearchPhoneWC",e.weatherLocationWC="WeatherLocationWC",e.weatherMapAlertCard="WeatherMapAlertCard",e.weatherMapAnimationBox="WeatherMapAnimationBox",e.weatherMapCarousel="WeatherMapCarousel",e.weatherMapContentModal="WeatherMapContentModal",e.weatherMapControlBox="WeatherMapControlBox",e.weatherMapDataFilter="WeatherMapDataFilter",e.weatherMapForecastCard="WeatherMapForecastCard",e.weatherMapGroupSwitcher="WeatherMapGroupSwitcher",e.weatherMapGroupSwitcherButtonWC="WeatherMapGroupSwitcherButtonWC",e.weatherMapHurricanePane="WeatherMapHurricanePane",e.weatherMapLayerChooser="WeatherMapLayerChooser",e.weatherMapLegendIndicator="WeatherMapLegendIndicator",e.weatherMapLegendWC="WeatherMapLegendWC",e.weatherMapLifeIndex="WeatherMapLifeIndex",e.weatherMapLifeTips="WeatherMapLifeTips",e.weatherMapMini="WeatherMapMini",e.weatherMapMiniV2="WeatherMapMiniV2",e.weatherMapNaviCard="WeatherMapNaviCard",e.weatherMapNews="WeatherMapNews",e.weatherMapPopup="WeatherMapPopup",e.weatherMapPromotionCard="WeatherMapPromotionCard",e.weatherMapSidebar="WeatherMapSidebar",e.weatherMapTimeline="WeatherMapTimeline",e.weatherMapTimelineWC="WeatherMapTimelineWC",e.weatherMapV2="WeatherMapV2",e.weatherMapWC="WeatherMapWC",e.weatherMapWeatherCard="WeatherMapWeatherCard",e.weatherMapsRotationWC="WeatherMapsRotationWC",e.weatherMinimapWC="WeatherMinimapWC",e.weatherMonthCalendar="WeatherMonthCalendar",e.weatherMonthlyForecastSummary="WeatherMonthlyForecastSummary",e.weatherMonthlySummaryWC="WeatherMonthlySummaryWC",e.weatherMonthlyTrendChart="WeatherMonthlyTrendChart",e.weatherNotification="WeatherNotification",e.weatherNowcastHistogram="WeatherNowcastHistogram",e.weatherNpsCard="WeatherNpsCard",e.weatherOneLiner="WeatherOneLiner",e.weatherOverviewMobile="WeatherOverviewMobile",e.weatherOverviewV2="WeatherOverviewV2",e.weatherOverviewWC="WeatherOverviewWC",e.weatherPageMeta="WeatherPageMeta",e.weatherPageMobile="WeatherPageMobile",e.weatherPageRoot="WeatherPageRoot",e.weatherPageV2="WeatherPageV2",e.weatherPageWC="WeatherPageWC",e.weatherPersonaCard="WeatherPersonaCard",e.weatherPersonaSummary="WeatherPersonaSummary",e.weatherPollenCityList="WeatherPollenCityList",e.weatherPollenDailyInfo="WeatherPollenDailyInfo",e.weatherPollenImages="WeatherPollenImages",e.weatherPollenNodata="WeatherPollenNodata",e.weatherPollenTeaser="WeatherPollenTeaser",e.weatherPollenWeatherForecast="WeatherPollenWeatherForecast",e.weatherRecommendation="WeatherRecommendation",e.weatherRightRail="WeatherRightRail",e.weatherSettingCenter="WeatherSettingCenter",e.weatherSlideDrawer="WeatherSlideDrawer",e.weatherSoftLanding="WeatherSoftLanding",e.weatherToast="WeatherToast",e.weatherTodayCard="WeatherTodayCard",e.weatherTodayHistoryWC="WeatherTodayHistoryWC",e.weatherTodayMini="WeatherTodayMini",e.weatherTodayMiniWC="WeatherTodayMiniWC",e.weatherTravelCarousel="WeatherTravelCarousel",e.weatherTrendClimate="WeatherTrendClimate",e.weatherTrendOverview="WeatherTrendOverview",e.weatherTrendToday="WeatherTrendToday",e.weatherTrivialHoster="WeatherTrivialHoster",e.weatherVideoEntryWC="WeatherVideoEntryWC",e.welcomeGreetingLight="WelcomeGreetingLight",e.welcomeGreetingWC="WelcomeGreetingWC",e.widgetPickerWC="WidgetPickerWC",e.widgets="Widgets",e.widgetsDynamicFeed="WidgetsDynamicFeed",e.widgetsHomePage="WidgetsHomePage",e.widgetsNotificationsCard="WidgetsNotificationsCard",e.winAppWC="WinAppWC",e.windowsOfficeFeed="WindowsOfficeFeed",e.windowsShellAccountManager="WindowsShellAccountManager",e.windowsShellBannerManager="WindowsShellBannerManager",e.windowsShellBannersManager="WindowsShellBannersManager",e.windowsShellColdStartBanner="WindowsShellColdStartBanner",e.windowsShellColdStartCard="WindowsShellColdStartCard",e.windowsShellContentPreview="WindowsShellContentPreview",e.windowsShellDialogBox="WindowsShellDialogBox",e.windowsShellEntry="WindowsShellEntry",e.windowsShellHeader="WindowsShellHeader",e.windowsShellHotList="WindowsShellHotList",e.windowsShellInfopane="WindowsShellInfopane",e.windowsShellLocationDialog="WindowsShellLocationDialog",e.windowsShellMarketMismatchBanner="WindowsShellMarketMismatchBanner",e.windowsShellMorningDigest="WindowsShellMorningDigest",e.windowsShellNewsPromoCard="WindowsShellNewsPromoCard",e.windowsShellNotificationBanner="WindowsShellNotificationBanner",e.windowsShellNotificationCard="WindowsShellNotificationCard",e.windowsShellNotificationSettings="WindowsShellNotificationSettings",e.windowsShellPinOverlay="WindowsShellPinOverlay",e.windowsShellPulse="WindowsShellPulse",e.windowsShellRail="WindowsShellRail",e.windowsShellRecommendedInterests="WindowsShellRecommendedInterests",e.windowsShellRefreshAnimationBanner="WindowsShellRefreshAnimationBanner",e.windowsShellRefreshDiscoveryBanner="WindowsShellRefreshDiscoveryBanner",e.windowsShellRiver="WindowsShellRiver",e.windowsShellSettingsMenu="WindowsShellSettingsMenu",e.windowsShellShoppingBanner="WindowsShellShoppingBanner",e.windowsShellSoftLanding="WindowsShellSoftLanding",e.windowsShellTopicsCard="WindowsShellTopicsCard",e.windowsWidgetsHub="WindowsWidgetsHub",e.xboxFeedWC="XboxFeedWC",e.xfeed="Xfeed",e.xfeedWC="XfeedWC",e.yandexSearchBoxWC="YandexSearchBoxWC"}(i||(i={}))},73298:function(e,t,n){"use strict";var i,r;n.d(t,{V:function(){return i}}),function(e){e[e.init=0]="init",e[e.subsequent=1]="subsequent",e[e.refresh=2]="refresh"}(i||(i={})),function(e){e.Long="long",e.Short="short"}(r||(r={}))},48587:function(e,t,n){"use strict";n.d(t,{NH:function(){return c},PQ:function(){return i},SL:function(){return r},mX:function(){return o},my:function(){return a},pN:function(){return s},u_:function(){return d}});const i="v3",r="v3.1",o="/resolver/api/resolve/",a="prg-crsfdheadrem",s="https://assets.msn.com",c="https://assets.msn.cn",d="callfdcrsweather"},73425:function(e,t,n){"use strict";var i;n.d(t,{U:function(){return i}}),function(e){e.BackfillContentDueToSSRAdsFailed="__backfillContentDueToSSRAdsFailed__",e.DelayNtpSSRFeedDuration="__DelayNtpSSRFeedDuration__",e.ErrorLogHistory="__ErrorLogHistory__",e.HydrationPromise="__hydrationPromise__",e.IsSSRWpoFeedConsumed="__isSSRWpoFeedConsumed__",e.NavEventEnabled="__navEventEnabled__",e.OriginalRequest="__originalRequest__",e.PlaceHolderResponse="__placeHolderResponse__"}(i||(i={}))},69233:function(e,t,n){"use strict";var i;n.d(t,{X:function(){return r},p:function(){return i}}),function(e){e.basicFeed="BasicFeed",e.desktopFeedStart="DesktopFeedStart",e.discoverCarouselSection="FinanceDiscoverSection_carouselCard",e.discoverFirstSection="FinanceDiscoverSection_first",e.discoverFollowedSection="FinanceDiscoverSection_followedCard",e.discoverSecondSection="FinanceDiscoverSection_second",e.feed="Feed",e.feedBasicRender="FeedBasicRender",e.feedRequest="FeedRequest",e.feedRequestFG="FeedRequest.FG",e.feedSDRender="FeedSDRender",e.isPrerenderedAd="isPrerenderedAd",e.firstSectionRenderStart="FirstSectionRenderStart",e.riverFirstSection="RiverFirstSection",e.sdCards="SDCards",e.searchBox="SearchBox",e.searchBoxToFeed="SearchBoxToFeed",e.secondSectionRenderEnd="SecondSectionRenderEnd",e.secondSectionRenderStart="SecondSectionRenderStart",e.TTPR="TTPR",e.viewCards="ViewCards",e.wpoCallStart="WpoCallStart",e.wpoResponseBack="WpoResponseBack",e.feedCallStart="FeedCallStart",e.feedResponseBack="FeedResponseBack",e.feedParse="FeedParse",e.configEndToFeedStart="ConfigEndToFeedStart",e.feedResponseTo1SSectionProcessed="FeedResponseTo1SSectionProcessed",e.isSSREnabled="isSSREnabled",e.isSSRCompleted="isSSRCompleted",e.isSSRAborted="isSSRAborted",e.complete="Complete",e.sectionRenderStart="sectionRenderStart",e.ssrCpuCost="ssrCpuCost"}(i||(i={}));const r="WidgetsConfigsEnd"},67575:function(e,t,n){"use strict";n.d(t,{UH:function(){return i},lU:function(){return r}});const i="news",r="feed/personalize/settings"},58980:function(e,t,n){"use strict";var i;n.d(t,{d:function(){return i}}),function(e){e.InterestsNeedRefresh="interests-need-refresh",e.VideoGameInterestFollowed="video-game-interest-followed",e.GamingFeedEngagement="gaming-feed-engagement"}(i||(i={}))},19233:function(e,t,n){"use strict";var i,r,o;n.d(t,{Q4:function(){return o},qG:function(){return i}}),function(e){e.TimeToRequestAd="TTNativeAd.Request",e.TimeToRequestAdBackground="TTNativeAd.Background.Request",e.TimeToServeAd="TTNativeAd.Serve",e.TimeToServeAdBackground="TTNativeAd.Background.Serve",e.TimeToRenderAd="TTVR.NativeAd",e.TimeToPrerenderAd="TTNativeAd.Prerender",e.TimeToAdResponse="TTNativeAd.Response",e.ApiDuration="NativeAd.ApiDuration",e.RenderReady="NativeAd.RenderReady",e.RequestInitiated="NAdInitiate",e.RequestSent="NAdInitiateToReq",e.AdFetched="NAdFetch",e.AdServerLatency="NAdServerLatency",e.AdProcessed="NAdProcess",e.RespToAdCallback="NAdRespToCallback",e.AdCallbackProcessed="NAdCallbackProcess",e.AdRendered="NAdRender",e.TimeToConsumeAds="TTNativeAd.Consume",e.TimeToConsumeAdsSSR="TTNativeAd.ConsumeSSR"}(i||(i={})),function(e){e.TimeToAdScriptRequest="TTDisplayAd.ScriptRequest",e.TimeToAdScriptLoaded="TTDisplayAd.ScriptLoaded",e.TimeToAdFetchStarted="TTDisplayAd.FetchStarted",e.TimeToAdFetchCompleted="TTDisplayAd.FetchCompleted",e.TimeToAdRenderCompleted="TTDisplayAd.RenderCompleted"}(r||(r={})),function(e){e.TimeToRenderAd="TTVR.MarqueeAd",e.TimeToPrerenderAd="TTPR.MarqueeAd"}(o||(o={}))},46986:function(e,t,n){"use strict";var i,r;n.d(t,{F:function(){return r}}),function(e){e.Article="article",e.ArticleFullScreen="articlefullscreen",e.CasualGames="casualgames",e.CasualGamesPlay="casualgamesplay",e.Channel="channel",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.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"}(i||(i={})),function(e){e.Adult="adult",e.Enterprise="enterprise",e.Kids="kids"}(r||(r={}))},83102:function(e,t,n){"use strict";var i,r,o;n.d(t,{Hy:function(){return i},Qm:function(){return r}}),function(e){e[e.Unknown=0]="Unknown",e[e.NotSignedIn=1]="NotSignedIn",e[e.SignedIn=2]="SignedIn"}(i||(i={})),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"}(o||(o={}))},88249:function(e,t,n){"use strict";n.d(t,{$n:function(){return i},bT:function(){return r},cN:function(){return o}});const i=[{id:"ar-ae",value:"ar-ae",displayString:"الإمارات العربية المتحدة (العربية)",direction:"rtl"},{id:"ar-eg",value:"ar-eg",displayString:"مصر (العربية)",direction:"rtl"},{id:"ar-sa",value:"ar-sa",displayString:"المملكة العربية السعودية (العربية)",direction:"rtl"},{id:"bn-in",value:"bn-in",displayString:"India (বাংলা)",direction:"ltr"},{id:"cs-cz",value:"cs-cz",displayString:"Česká republika (čeština)",direction:"ltr"},{id:"da-dk",value:"da-dk",displayString:"Danmark (Dansk)",direction:"ltr"},{id:"de-at",value:"de-at",displayString:"Österreich (Deutsch)",direction:"ltr"},{id:"de-ch",value:"de-ch",displayString:"Schweiz (Deutsch)",direction:"ltr"},{id:"de-de",value:"de-de",displayString:"Deutschland (Deutsch)",direction:"ltr"},{id:"el-gr",value:"el-gr",displayString:"Ελλάδα (ελληνικά)",direction:"ltr"},{id:"en-ae",value:"en-ae",displayString:"United Arab Emirates (English)",direction:"ltr"},{id:"en-au",value:"en-au",displayString:"Australia (English)",direction:"ltr"},{id:"en-ca",value:"en-ca",displayString:"Canada (English)",direction:"ltr"},{id:"en-gb",value:"en-gb",displayString:"United Kingdom (English)",direction:"ltr"},{id:"en-ie",value:"en-ie",displayString:"Ireland (English)",direction:"ltr"},{id:"en-in",value:"en-in",displayString:"India (English)",direction:"ltr"},{id:"en-my",value:"en-my",displayString:"Malaysia (English)",direction:"ltr"},{id:"en-nz",value:"en-nz",displayString:"New Zealand (English)",direction:"ltr"},{id:"en-ph",value:"en-ph",displayString:"Philippines (English)",direction:"ltr"},{id:"en-sg",value:"en-sg",displayString:"Singapore (English)",direction:"ltr"},{id:"en-us",value:"en-us",displayString:"United States (English)",direction:"ltr"},{id:"en-xl",value:"en-xl",displayString:"International Edition (English)",direction:"ltr"},{id:"en-za",value:"en-za",displayString:"South Africa (English)",direction:"ltr"},{id:"es-ar",value:"es-ar",displayString:"Argentina (español)",direction:"ltr"},{id:"es-cl",value:"es-cl",displayString:"Chile (español)",direction:"ltr"},{id:"es-co",value:"es-co",displayString:"Colombia (español)",direction:"ltr"},{id:"es-es",value:"es-es",displayString:"España (español)",direction:"ltr"},{id:"es-mx",value:"es-mx",displayString:"México (español)",direction:"ltr"},{id:"es-pe",value:"es-pe",displayString:"Perú (español)",direction:"ltr"},{id:"es-us",value:"es-us",displayString:"United States (español)",direction:"ltr"},{id:"es-ve",value:"es-ve",displayString:"Venezuela (español)",direction:"ltr"},{id:"es-xl",value:"es-xl",displayString:"América Latina (español)",direction:"ltr"},{id:"fi-fi",value:"fi-fi",displayString:"Suomi (suomi)",direction:"ltr"},{id:"fr-be",value:"fr-be",displayString:"Belgique (français)",direction:"ltr"},{id:"fr-ca",value:"fr-ca",displayString:"Canada (français)",direction:"ltr"},{id:"fr-ch",value:"fr-ch",displayString:"Suisse (français)",direction:"ltr"},{id:"fr-fr",value:"fr-fr",displayString:"France (français)",direction:"ltr"},{id:"fr-xl",value:"fr-xl",displayString:"Afrique francophone (français)",direction:"ltr"},{id:"he-il",value:"he-il",displayString:"ישראל (עברית)",direction:"rtl"},{id:"hi-in",value:"hi-in",displayString:"India (हिंदी)",direction:"ltr"},{id:"hu-hu",value:"hu-hu",displayString:"Magyarország (magyar)",direction:"ltr"},{id:"id-id",value:"id-id",displayString:"Indonesia (Bahasa Indonesia)",direction:"ltr"},{id:"it-it",value:"it-it",displayString:"Italia (italiano)",direction:"ltr"},{id:"ja-jp",value:"ja-jp",displayString:"日本 (日本語)",direction:"ltr"},{id:"ko-kr",value:"ko-kr",displayString:"한국 (한국어)",direction:"ltr"},{id:"mr-in",value:"mr-in",displayString:"India (मराठी)",direction:"ltr"},{id:"nb-no",value:"nb-no",displayString:"Norge (norsk, bokmål)",direction:"ltr"},{id:"nl-be",value:"nl-be",displayString:"België (Nederlands)",direction:"ltr"},{id:"nl-nl",value:"nl-nl",displayString:"Nederland (Nederlands)",direction:"ltr"},{id:"pl-pl",value:"pl-pl",displayString:"Polska (polski)",direction:"ltr"},{id:"pt-br",value:"pt-br",displayString:"Brasil (português)",direction:"ltr"},{id:"pt-pt",value:"pt-pt",displayString:"Portugal (Português)",direction:"ltr"},{id:"ru-xl",value:"ru-xl",displayString:"Международное издание (Pусский)",direction:"ltr"},{id:"ru-ru",value:"ru-ru",displayString:"Россия (Pусский)",direction:"ltr"},{id:"sv-se",value:"sv-se",displayString:"Sverige (svenska)",direction:"ltr"},{id:"te-in",value:"te-in",displayString:"India (తెలుగు)",direction:"ltr"},{id:"th-th",value:"th-th",displayString:"ไทย (ไทย)",direction:"ltr"},{id:"tr-tr",value:"tr-tr",displayString:"Türkiye (Türkçe)",direction:"ltr"},{id:"vi-vn",value:"vi-vn",displayString:"Việt Nam (Tiếng Việt)",direction:"ltr"},{id:"zh-cn",value:"zh-cn",displayString:"中华人民共和国 (简体中文)",direction:"ltr"},{id:"zh-hk",value:"zh-hk",displayString:"香港特别行政區 (繁體中文)",direction:"ltr"},{id:"zh-tw",value:"zh-tw",displayString:"台灣 (繁體中文)",direction:"ltr"}];function r(e,t){return e.displayString<t.displayString?-1:e.displayString>t.displayString?1:0}function o(e){if(""!==document.dir)return"rtl"===document.dir;const t=i.find((t=>t.id===e));return t&&"rtl"===t.direction}},94546:function(e,t,n){"use strict";n.d(t,{Di:function(){return i},SD:function(){return o},fw:function(){return r}});const i="peregrine-widgets",r="peregrine-widget-settings",o="prg-pw-"},81110:function(e,t,n){"use strict";n.d(t,{$s:function(){return h},$v:function(){return R},CO:function(){return O},GR:function(){return r},H0:function(){return p},I1:function(){return g},IA:function(){return B},J8:function(){return d},L3:function(){return c},LJ:function(){return x},Mo:function(){return a},Mt:function(){return k},P$:function(){return A},Pg:function(){return v},Qn:function(){return b},Qs:function(){return T},S1:function(){return _},SO:function(){return M},Td:function(){return f},UW:function(){return l},UY:function(){return w},YU:function(){return E},_O:function(){return H},bx:function(){return C},di:function(){return D},eK:function(){return S},gr:function(){return F},hE:function(){return i},hM:function(){return P},hZ:function(){return u},hk:function(){return s},i9:function(){return U},kJ:function(){return I},kX:function(){return y},lP:function(){return L},ly:function(){return m},os:function(){return $},vy:function(){return N},xE:function(){return o}});const i={activityId:"activityId",apiKey:"apikey",audienceMode:"audienceMode",bypassTrigger:"bypass_trigger",cm:"cm",complexInfoPaneEnabled:"cipenabled",contentType:"contentType",delta:"delta",disableContent:"disablecontent",disableTypeSerialization:"DisableTypeSerialization",duotone:"duotone",infopaneCount:"infopaneCount",fdhead:"fdhead",feedLayoutRequestType:"t",filter:"$filter",includeFollowingFilters:"iff",ids:"ids",interestIds:"InterestIds",location:"location",market:"market",newsSkip:"newsSkip",newsTop:"newsTop",ocid:"ocid",pageConfiguration:"pgc",parentContentId:"parent-content-id",parentNamespace:"parent-ns",parentTitle:"parent-title",providerId:"ProviderId",queryQ:"q",query:"query",queryType:"queryType",qScope:"qscope",requestId:"rid",responseSchema:"responseschema",select:"$select",session:"session",signInCookieName:"scn",skip:"$skip",source:"source",timeOut:"timeOut",top:"$top",type:"type",user:"user",wrapOData:"wrapodata",wpoitems:"wpoitems",wpoPageId:"wpopageid",wpoSchema:"wposchema",caller:"caller",dhp:"dhp",webWorker:"webWorker",edgeNoAds:"edgenoads",edgeReduceAds:"edgereduceads",column:"column",anaheimPageLayout:"anaheimPageLayout",adRefreshVariant:"adRefreshVariant",gdpr:"gdpr",verticalName:"verticalName"},r="0QfOX3Vn51YCzitbLaRkTTBadtWpgTN8NZLW0C1SEM",o="Uj7u7bqBgMhDGBUVPSbcHUe0pU7X8TbVRviCO2fojo",a="service/news/feed/pages/",s="serviceak/news/feed/pages/",c="news/feed/pages/",d="ntpxfeed",l="wpoxfeed",u="news/feed/pages/",p="winxfeed",h="wpodhp",g="gamingfeed",m="ntpfollowfeed",f="filteredfollowingchannels",v="prong1followfeed",y="prong2followfeed",S="followingxfeed",C="ntp",w="weblayout",b="ntpxfeed",T="prong2xfeed",k="news/feed/Segments",P="https://api.msn.com",I="https://sf-ppe.oneservice-test.msn.com",A="wpo-usebasedomain",E="wpo-useintdomain",x="https://ppe-api.msn.com",M="news/feed/pages/ntpxfeed",L="news/feed/pages/",D=17,R="xbox-browser",F="jY4a3fYtgzb7PIcW0Kj6amp5k6LwDefg6RSnkmxjto",O="prg-useakmaipath",B="prg-ssr-ext1sdns",N="msnkids",$="dy0rQcQaYj5cKZ2Cy0cdaRDJcC5maS5hPj9w2SbeRf",U="anaheim-ntp-following",_="vevII5dbHfpd1fHIMlPxbas6GZQEFOm4CozFHehOgW";function H(e,t){t.set(i.wrapOData,"false").set(i.disableTypeSerialization,"true").set(i.queryType,e.queryType||"myfeed").set(i.timeOut,`${function(e){const{timeoutMs:t,query:n,customFeedTimeoutMs:i}=e;return n&&i?i:t}(e)}`).set(i.contentType,e.contentType).set(i.apiKey,r),(e.useDelta||e.sessionId)&&(t.set(i.delta,"true"),e.sessionId&&t.set(i.session,e.sessionId)),e.ocid&&t.set(i.ocid,e.ocid)}},68963:function(e,t,n){"use strict";n.d(t,{T3:function(){return c},Uo:function(){return a},q1:function(){return s},tz:function(){return o}});var i=n(55524);let r;function o(e){r=e}function a(e,t,n=!0){const i=d();let o=i[e];if(o||(o=[],i[e]=o),o.push(t),n){const n=r(e);if(n){const e=n.getCurrentState();e&&t(e)}}}function s(e,t){const n=d(),i=n[e];if(i&&i.length){for(let e=0;e<i.length;e++)if(i[e]===t){i.splice(e,1);break}n[e]=i}}function c(e,t){const n=d()[e];if(n&&t)for(const e of n)e(t)}function d(){return i.Gq.get("reducers__callbackMap",(()=>({})))}},96531:function(e,t,n){"use strict";n.d(t,{_:function(){return C}});var i=n(27670),r=n(24240),o=n(44446),a=n(90351),s=n(25514),c=n(46728),d=n(31558);const l=new Map;function u(e){return e+"."+r.B.connectorStateKey}const p={registerInjection:function(e,t){let n=l.get(t);n||(n=new Set,l.set(t,n)),n.add(u(e))},initializeExperience:function(e,t,n){const i=u(t),r={...(0,a.Z)(e,i,void 0),[n]:(0,a.Z)(e,u(n),void 0)};(0,s.Z)(e,i,r)},reportStateChange:function(e,t,n){const i=l.get(t);if(i)for(const r of i){const i=(0,a.Z)(e,r,void 0);i&&(0,s.Z)(e,r,{...i,[t]:n})}}};var h=n(85663),g=n(68963);class m{constructor(){this._connectorMap={},this._globalConnectors=[],this._allConnectors=[],this._getDataConnectorPendingPromises=new Map,this.reduce=this.reduce.bind(this)}connectors(){return this._allConnectors}connector(e){return this._connectorMap[e]}globalConnectors(){return this._globalConnectors}getDataConnector(e){const t=this.connector(e);if(t)return Promise.resolve(t);const n=this._getDataConnectorPendingPromises.get(e);if(n)return n.promise;let i,r;const o=new Promise(((e,t)=>{i=e,r=t}));return this._getDataConnectorPendingPromises.set(e,{promise:o,resolve:i,reject:r}),o}reduce(e,t){(0,h.isNullOrUndefined)(e)&&(e={});let n={...e},i=!1;const l=t.key;if(void 0!==t&&void 0!==l){const u="string"==typeof t.type;if(u&&t.type.endsWith(r.B.renderAction)){const t=l+"."+r.B.connectorStateKey,c=(0,o.Z)({},(0,a.Z)(e,t,void 0));(0,s.Z)(n,t,c),i=!0}else if(u&&t.type.endsWith(r.B.dataConnectorMergeInitAction)){const e=l,r=t.params[0];r&&(p.initializeExperience(n,e,r),i=!0)}else{const e=this._connectorMap[l];if(e){e.isGlobal&&(n=(0,c.Z)({},n));const r=this.computeNextStateForConnector(n,l,t);i=r.stateChanged,i&&(p.reportStateChange(n,l,r.newState),(0,d.N)()&&(0,g.T3)(l,r.newState))}else if(!(0,d.N)())throw new Error("Reducer for: "+l+" must not return undefined.")}}else Object.keys(this._connectorMap).forEach((e=>{this.computeNextStateForConnector(n,e,t).stateChanged&&(i=!0)}));return i?n:e}addSubReducerForConnector(e){if(!e)throw new Error("The parameter 'connector' cannot be null.");const t=e.fullNamespace;if(this._connectorMap[t]=e,this._allConnectors.push(e),e.isGlobal&&this._globalConnectors.push(e),this._getDataConnectorPendingPromises.has(e.namespace)){const t=this._getDataConnectorPendingPromises.get(e.namespace);try{t.resolve(e)}catch(e){t.reject(e)}this._getDataConnectorPendingPromises.delete(e.namespace)}e.store.dispatch({key:t,type:"@@connector-view/INIT"})}computeNextStateForConnector(e,t,n){const i=this._connectorMap[t],o=t+"."+r.B.connectorStateKey,c=(0,a.Z)(e,o,void 0),d=this.subReduce(i.reducer,c,n);if(void 0===d)throw new Error("Reducer for: "+t+" must not return undefined.");const l=d!==c;return l&&(0,s.Z)(e,o,d),{newState:d,stateChanged:l}}subReduce(e,t,n){const i=e.reduce(t,n);return i!==t?i:t}}var f=n(11365),v=n(76733),y=n(55524);const S="__PageBaseInstance__";class C{constructor(e){let t;const n=[];if(void 0!==v.k&&v.k&&v.k.isDebug()){t=(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({trace:!0,traceLimit:25})||i.qC)((0,f.md)(...n))}else t=(0,f.md)(...n);this._rootReducer=new m,this._store=(0,i.MT)(this.rootReducer.reduce,e,t)}static resetPageBaseInstance(e){y.Gq.set(S,new C(e))}static deletePageBaseInstance(){y.Gq.delete(S)}get store(){return this._store}get rootReducer(){return this._rootReducer}static getInstance(e){return y.Gq.get(S,(()=>new C(e)))}start(){this.rootReducer.connectors().forEach((e=>e.onApplicationStart()))}}},24240:function(e,t,n){"use strict";var i;n.d(t,{B:function(){return i}}),function(e){e.connectorStateKey="_@STATE@_",e.renderAction="@@connector-view/RENDER",e.dataConnectorMergeInitAction="@@data-connector/MERGE-INIT"}(i||(i={}))},76166:function(e,t,n){"use strict";n.d(t,{e:function(){return l}});var i=n(24240),r=n(68963),o=n(29330),a=n(42933),s=n(11365),c=n(25514),d=n(67044);(0,r.tz)(d.K0);class l{get store(){return this._subspace}get fullNamespace(){return this._fullNamespace}get configHref(){return this._configHref}set configHref(e){this._configHref=e}constructor(e,t,n,i,r,a,c,d=!1){this.namespace=e,this.parentNamespace=t,this.rootReducer=n,this.reducer=i,this.config=a,this.requestContext=c,this.isGlobal=d,this._fullNamespace=void 0!==t&&""!==t?t+"."+e:e,this.selectState=this.selectState.bind(this),this._subspace=(0,s.Z)(this.selectState,this.namespace)(r);const l=this.perfTimeline=this.tryGetPerfTimeline(e);this.fetch=(0,o.Ud)({perfTimeline:l}),n.addSubReducerForConnector(this)}getCurrentState(){const e=this.store.getState()[i.B.connectorStateKey];if(!this.isGlobal){const t=this.rootReducer.globalConnectors();0!==t.length&&t.forEach((t=>{(0,c.Z)(e,t.namespace,t.getCurrentState())}))}return e}onApplicationStart(){}selectState(e){return e[this.namespace]}tryGetPerfTimeline(e){const t=e.split("_"),[n]=t,i=t[t.length-1];return(0,a.oA)(n,i)}}},99551:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var i=n(58043),r=n(32771);class o{static handleAction(e,t,n){return!!o.endsWith(e.type+"",t.type)&&(n.apply(n,e.params),!0)}static handleActions(e,t,n){const r=e.type+"";return!!(0,i.Z)(t,(e=>o.endsWith(r,e.type)))&&(n.apply(n,e.params),!0)}static safeHandleAction(e,t,n){if(!o.endsWith(e.type+"",t.type))throw"The action payload does not match the action type.";return n.apply(n,e.params),!0}}o.endsWith=String.prototype.endsWith?function(e,t){return e.endsWith(t)}:r.Z},17556:function(e,t,n){"use strict";n.d(t,{C:function(){return h}});var i=n(96531);function r(e,t,n,i){let r;return e&&(r=e.parentNamespace?e.parentNamespace+"."+e.namespace:e.namespace),{key:r,experienceInstanceId:i,type:t,params:n}}function o(e,t){return e?e.store.dispatch(t):i._.getInstance().store.dispatch(t)}var a=n(24240);class s{get send(){return this.dispatchAction()}constructor(e,t,n){this.type=e,this.observers=t,this.connector=n}dispatchAction(){return function(...e){const t=this.tryGetPerfTimeline(),n=t&&t.startMeasure("action",this.type).endMeasure,{payload:i,result:s}=this.getDispatchResult(e);return this.observers.forEach((e=>{try{e.filterConnector&&this.connector!==e.filterConnector||e.observer(i)}catch(t){console.log(`Error calling observer: ${JSON.stringify(e.observer)}, with error: ${t}`)}if(e.dispatchConnector){const t=r(e.dispatchConnector,a.B.renderAction,[],void 0);o(e.dispatchConnector,t)}})),n&&n(),s}}}class c extends s{constructor(e,t,n){super(e,t,n)}getDispatchResult(e){const t=r(this.connector,this.type,e,void 0);return{payload:t,result:o(this.connector,t)}}tryGetPerfTimeline(){return this.connector.perfTimeline}}var d=n(42933);class l extends s{constructor(e,t,n){super(e,t,null),this.experienceInstanceId=n}getDispatchResult(e){const t=r(void 0,this.type,e,this.experienceInstanceId);return{payload:t,result:o(void 0,t)}}tryGetPerfTimeline(){return(0,d.oA)("GlobalActionSender",this.experienceInstanceId||"unknown")}}var u=n(55524);let p=1;class h{get observers(){return u.Gq.get(this.observerKey,(()=>[]))}set observers(e){u.Gq.set(this.observerKey,e)}constructor(e){this.type=e,this.observerKey=`__ActionMap_${e}_${p++}`}getActionSender(e){let t;if(t="string"==typeof e?i._.getInstance().rootReducer.connector(e):e,t)return new c(this.type,this.observers,t)}getGlobalActionSender(e){return new l(this.type,this.observers,e)}registerObserver(e,t){const{dispatchConnector:n,filterConnector:i}=t||{};this.observers.push({observer:e,dispatchConnector:n,filterConnector:i})}unregisterObserver(e){const t=this.observers.findIndex((t=>t.observer===e));t>-1&&this.observers.splice(t,1)}unregisterObservers(){this.observers=[]}}},67044:function(e,t,n){"use strict";n.d(t,{K0:function(){return f},Ki:function(){return v},oU:function(){return m}});var i=n(3104),r=n(66701),o=n(77036),a=n(95153),s=n(7476),c=n(88826),d=n(96531),l=n(55524),u=n(31558),p=n(68963);const h="GetDataConnector.skippedConnectors",g={};async function m(e){return e?await d._.getInstance().rootReducer.getDataConnector(e):null}function f(e){return d._.getInstance().rootReducer.connector(e)}async function v(e){const t=(0,i.M)(e);if(l.Gq.get(h,(()=>new Set)).has(t))return Promise.resolve();const n=l.Gq.get("dataConnectorLoadPromiseMap",(()=>({})));let m=n[t];if(m)return m;let f=g[t];return f||(f=r.n.loadExperience(t).catch((()=>{delete g[t]})),g[t]=f),m=new Promise((async t=>{try{const t=(0,i.M)(e),n=(0,i.Fr)(e),r=o.U.getConfig(n),s=await Promise.all([r,f]),c=s[0].properties,l=s[1],h=l[t+"Connector"],g=l[t+"Reducer"],m=d._.getInstance(),v=new h(t,"",m.rootReducer,new g(c),m.store,c,new a.fH);(0,u.N)()&&(0,p.T3)(t,v.getCurrentState())}catch(e){const t={...s.NGC};(0,c.OO)(e,t,"Loading data connector failed.")}t()})),n[t]=m,m}},94746:function(e,t,n){"use strict";n.d(t,{s:function(){return r}});var i=n(17556);class r{}r.signedInStatus=new i.C("SignedInStatus"),r.signedInStatusConfirmed=new i.C("SignedInStatusConfirmed"),r.useEnterpriseCompliance=new i.C("UseEnterpriseCompliance"),r.useHistory=new i.C("UseHistory"),r.updateLocation=new i.C("UpdateLocation")},66365:function(e,t,n){"use strict";n.d(t,{n:function(){return S}});var i=n(85205),r=n(76166),o=n(83102),a=n(65505),s=n(10788),c=n(4619),d=n(21789),l=n(31558),u=n(54911),p=n(99551),h=n(94746),g=n(95815);class m{reduce(e,t){if(!e){return{signedIn:this.getSignInStatus(),useEnterpriseCompliance:!1,useHistory:!1}}if(!t)return e;let n,i=!1;return i=p.G.handleAction(t,h.s.signedInStatus,(t=>{n={...e,signedIn:t}})),i=i||p.G.handleAction(t,h.s.useEnterpriseCompliance,(t=>{n={...e,useEnterpriseCompliance:t}})),i=i||p.G.handleAction(t,h.s.useHistory,(t=>{n={...e,useHistory:t}})),i=i||p.G.handleAction(t,h.s.updateLocation,(t=>{n={...e,location:t}})),n||e}getSignInStatus(){if((0,a.TJ)()){return(0,s.XS)().isSignedIn}if(!(0,l.N)()){const{oneServiceHeaders:e}=(0,u.s)();if(e&&Object.keys(e).length>0&&e.authorization)return o.Hy.SignedIn}if((0,a.hk)())return o.Hy.Unknown;if((0,a.P8)())return(0,c.x6)()?o.Hy.SignedIn:o.Hy.NotSignedIn;const e=d.jG.AuthCookieName;if(""==e)return o.Hy.NotSignedIn;const t="app_anon"==e?"aace":"ace";return(0,g.ej)(t)?o.Hy.SignedIn:o.Hy.NotSignedIn}}var f=n(65774),v=n(23549);class y extends r.e{constructor(e,t,n,i,r,o,a){super(e,t,n,i,r,o,a,!0),this.initOverrides=()=>{}}static initialize(e,t,n){let r=e.connector(i.z.SharedState);return r||(r=new y(i.z.SharedState,"",e,new m,t,void 0,n)),(0,f.A)(r),r}getSignInState(){return this.getCurrentState().signedIn}setSignInState(e){const t=this.getCurrentState().signedIn;t!==e?(h.s.signedInStatus.getActionSender(this).send(e),v.M0.addOrUpdateTmplString(`auth-stateChange-${t}-${e}`)):h.s.signedInStatusConfirmed.getActionSender(this).send()}useEnterpriseCompliance(){return this.getCurrentState().useEnterpriseCompliance}}const S=y.initialize},94285:function(e,t,n){"use strict";n.d(t,{B:function(){return o},c:function(){return a}});var i=n(37477);const r=new Map([["article","ArticlePreview"],["video","VideoPreview"],["slideshow","SlideshowPreview"],["webcontent","WebContentPreview"]]),o=(e,t)=>{const n=e||{},r=t||{},o=n.provider&&n.provider.name,s=n.provider&&n.provider.id,c=r&&r.subCategory||n&&n.category&&n.category.label||n&&n.category,d=n.title,l=n.id,u=r&&r.category||n&&n.category&&n.category.product||n&&n.category,p=a(n.type),h=(0,i.ne)(p||n.type);return{brand:o,brandId:s,category:c,headline:d,id:l,isLocal:n.isLocalContent||r.isLocalContent,type:h,vertical:u}};function a(e){return r.get(e)||""}},82656:function(e,t,n){"use strict";n.d(t,{g:function(){return r}});var i=n(3104);function r(e){return"string"==typeof(t=(0,i.Fr)(e))?t:t.instanceSrc;var t}},69686:function(e,t,n){"use strict";n.d(t,{ITY:function(){return r}});const i={AboveRiverBlock:"above-river-block",ActionTray:"action-tray",AicharacterPaintPage:"aicharacter-paint-page",ArticleCloseButton:"article-close-button",ArticleFre:"article-fre",ArticleRelatedStories:"article-related-stories",ArticleTopComment:"article-top-comment",AutosCarousel:"autos-carousel",AutosEntityCardWC:"autos-entity-card-wc",AutosEntitySpan:"autos-entity-span",AutosGarageCard:"autos-garage-card",AutosMarketplaceCard:"autos-marketplace-card",BackToTopButton:"back-to-top-button",BackgroundGallery:"background-gallery",BackgroundImageWC:"background-image",BingDailyQuizCard:"bing-daily-quiz-card",BingHealthCard:"bing-health-card",BingHealthFitnessCard:"bing-health-fitness-card",BingHomepageFeed:"bing-homepage-feed",BingIntlUpsell:"bing-intl-upsell",BingThisOrThatCard:"bing-this-or-that-card",BoostAdCard:"boost-ad-card",BrandZone:"brand-zone",BreakingNewsWC:"breaking-news-wc",CalendarCard:"calendar-card",CardActionWC:"card-action",CashbackCarouselCard:"cashback-carousel-card",CasualGamesBanner:"casual-games-banner",CasualGamesCard:"casual-games-card",CasualGamesCarouselCard:"casual-games-carousel-card",CasualGamesFeed:"casual-games-feed",CasualGamesFrame:"casual-games-frame",CasualGamesGameCardCarousel:"casual-games-game-card-carousel",CasualGamesGameplay:"casual-games-gameplay",CasualGamesGameplayRightRail:"casual-games-gameplay-right-rail",CasualGamesHub:"casual-games-hub",CasualGamesLandingV2:"casual-games-landing-v2",CasualGamesStripeCarouselCard:"casual-games-stripe-carousel-card",ChannelDesktopContent:"channel-desktop-content",ChannelEntryPoint:"channel-entry-point",ChannelFilterCard:"channel-filter-card",ChannelList:"channel-list",ChannelMobileContent:"channel-mobile-content",ChannelPage:"channel-page",ChannelStore:"channel-store",ChannelsNews:"channels-news",CmsBaseExperience:"cms-base-experience",CmsExperience:"shopping-cms",CodexBingChat:"codex-bing-chat",ColdStartWC:"cold-start",CommonAutoSuggest:"common-auto-suggest",CommonHeaderWC:"common-header",CommonSearchBoxEdgeNext:"common-search-box-edgenext",CommonSettingsEdgeNext:"common-settings-edgenext",CommunityCard:"community-card",CommunityComposeCopilotWC:"community-compose-copilot",CommuteCard:"commute-card",CompanyNewsCard:"company-news-card",ConditionalBannerHpWC:"conditional-banner-hp-wc",ConditionalBannerWC:"conditional-banner-wc",ConsumptionFeedWC:"consumption-feed-wc",ConsumptionPage:"consumption-page",ContentFlexInfoPane:"content-flex-info-pane",ContentGroup:"content-group",ContentGroupCard:"content-group-card",ContentTts:"content-tts",ContextualFeedbackWC:"contextual-feedback-wc",CpcMonetizationDashboard:"cpc-monetization-dashboard",DailyBriefWC:"daily-brief",DailyDiscovery:"daily-discovery",DashboardFallback:"dashboard-fallback",DashboardSettings:"dashboard-settings",DebugButton:"debug-button",DenseCard:"dense-card",DesktopFeedHubWC:"desktop-feed-hub",DesktopFeedViewsWC:"desktop-feed-views",DesktopFeedWC:"desktop-feed",DevTools:"dev-tools",DidYouKnowImageWCExperience:"did-you-know-image-wc-experience",DidYouKnowWCExperience:"did-you-know-wc-experience",DigestCard:"digest-card",DisplayAdsWC:"display-ads",DistributionFeed:"distribution-feed",DistributionHeader:"distribution-header",DistributionPage:"distribution-page",DistributionPivotsNav:"distribution-pivots-nav",DonationNpoCard:"donation-npo-card",EdgeChromiumPageWC:"edge-chromium-page",EdgeShopping:"edge-shopping",ElectionCard:"election-card",EmmxEntrypoint:"emmx-entrypoint",EntertainmentCard:"entertainment-card",EntertainmentPremierCard:"entertainment-premier-card",EntryPointHpMobile:"entry-point-hp-mobile",EntryPointHpWC:"entry-point",EntryPointMobileHub:"entry-point-mobile-hub",EntryPointViewsWC:"entry-point-views",EoabViews:"eoab-views",EoabViewsAutos:"eoab-views-autos",EoabViewsFinance:"eoab-views-finance",EoabViewsShopping:"eoab-views-shopping",EoabViewsTravel:"eoab-views-travel",EsportsCard:"esports-card",EsportsLivestreamCarouselWC:"esports-livestream-carousel-wc",EsportsStreamsCard:"esports-streams-card",EventHubFollowHeader:"event-hub-follow-header",ExampleOfferCard:"example-offer-card",ExperiencePreviewCta:"experience-preview-cta",FamilyCard:"family-card",FeedContainer:"feed-container",FeedLevelFeedbackWC:"feed-level-feedback-wc",FeedNavigationHp:"feed-navigation-hp",FeedbackCard:"feedback-card",FeedbackDialogWC:"feedback-dialog-wc",FeedbackLinkWC:"feedback-link",FinanceCarousel:"finance-carousel",FloatButtonGroupWC:"float-button-group",FollowingFreConfirmation:"following-fre-confirmation",FollowingFreFullWidth:"following-fre-full-width",FoodSimilarItems:"food-similar-items",ForumDealsPage:"forum-deals-page",FrequentSitesCardWC:"frequent-sites-card",GameCard:"game-card",GamingChannel:"gaming-channel",GamingCompeteCard:"gaming-compete-card",GamingDiscoverStrip:"gaming-discover-strip",GamingGamerModeUpsellCard:"gaming-gamer-mode-upsell-card",GamingInterestGroupCard:"gaming-interest-group-card",GamingMatchCard:"gaming-match-card",GamingMediaCarousel:"gaming-media-carousel",GamingPage:"gaming-page",GamingPersonalizationCard:"gaming-personalization-card",GamingRecentlyPlayedCard:"gaming-recentlyplayed-card",GamingRecommendedCard:"gaming-recommended-card",GamingRedditCard:"gaming-reddit-card",GamingRewardsCard:"gaming-rewards-card",GamingStreamCard:"gaming-stream-card",GamingTournamentCard:"gaming-tournament-card",GamingUpcomingCard:"gaming-upcoming-card",GamingVideoCard:"gaming-video-card",GeneralElections:"general-elections",GridViewFeed:"grid-view-feed",GroceryCouponSdCard:"grocery-coupon-sd-card",HeaderWindowsShellWC:"header-windows-shell-wc",HealthArticlesCardWC:"health-articles-card",HealthDietPlanScheduleWC:"health-diet-plan-schedule",HealthFeedbackWC:"health-feedback",HealthFitnessCarousel:"health-fitness-carousel",HealthFoodHealtheffectsWC:"health-food-healtheffects",HealthFoodRecipesWC:"health-food-recipes",HealthHubHealthapp:"healthhub-healthapp",HealthInterestsManager:"health-interests-manager",HealthQnAWCExperience:"health-qna-card-wc",HealthRiverWC:"health-river-wc",HealthTipWC:"health-tip-wc",HealthTopSpan:"health-top-span",HealthTopicFlyout:"health-topic-flyout",HealthTranslationWC:"health-translation",HealthWidget:"health-widget",HolidayEffects:"holiday-effects",HomepageFooter:"homepage-footer",HomepageHeader:"homepage-header",HoroscopeAnswerCardWC:"horoscope-answer-card",HotListCard:"hot-list-card",ImageSearchWC:"image-search-wc",ImmersiveFullscreen:"immersive-fullscreen",IndustryNewsCard:"industry-news-card",InspirationCard:"inspiration-card",InterestFreCard:"interest-fre-card",InterestManagementCard:"interest-management-card",InterestsManager:"interests-manager",InterestsWC:"interests-wc",LanguageToggleWC:"language-toggle",LinkedInCard:"linked-in-card",LocalHubHeader:"local-hub-header",LocalizeStringsTempExperience:"localize-strings-temp-experience",Lottery:"lottery-card",MailSignoutBanner:"mail-signout-banner",MangaCard:"manga-card",MarketLanguageToggleWC:"market-language-toggle",MarketplaceCardWC:"marketplace-card",MeControlWC:"me-control",MeStripeWC:"me-stripe",MicrosoftEdgeWidget:"microsoft-edge-widget",MicrosoftFeedCard:"microsoft-feed-card",MobileAppUpsell:"mobile-app-upsell",MobileChannelSlider:"mobile-channel-slider",MobileConsumptionPage:"mobile-consumption-page",MobileFeedHub:"mobile-feed-hub",MobileFeedWC:"mobile-feed-wc",MobileFooter:"mobile-footer",MobileHeader:"mobile-header",MobileMarketSelector:"mobile-market-selector",MobileNotification:"mobile-notification",MobilePopupWindow:"mobile-popup-window",MobileRewardsCard:"mobile-rewards-card",MobileShoppingCard:"mobile-shopping-card",MobileStoryViewer:"mobile-story-viewer",MobileTip:"mobile-tip",MobileWidget:"mobile-widget",MoneyAugmentCard:"money-augment-card",MoneyInfo:"money-info",MoneyInfoCardWC:"money-info-card",MoneyInfoSpan:"money-info-span",MsRewardsWC:"ms-rewards",MsaAddressForm:"msa-address-form",NativeAdWC:"native-ad-wc",NavigationPageExperience:"navigation-page-experience",NewsGroupsCard:"news-groups-card",NewsGuard:"news-guard",NewsHeadlineBelowSearchbox:"news-headline-below-searchbox",NewsSegmentCarousel:"news-segment-carousel",NewsbarFeedFooter:"newsbar-feed-footer",NewsbarFeedWC:"newsbar-feed",NewsbarUpsellWC:"newsbar-upsell",NewsletterSignup:"newsletter-signup",NewsletterSignupPage:"newsletter-signup-page",NextdoorCard:"nextdoor-card",NextdoorPage:"nextdoor-page",NotificationBellWC:"notification-bell",NotificationMiniCard:"notification-mini-card",NudgeSpotlightCard:"nudge-spotlight-card",NurturingCoachMark:"nurturing-coach-mark",OfficeCoachmark:"office-coachmark",OfficeDocumentsTableWC:"office-documents-table",OfficeLeftRail:"office-leftrail",OnThisDayCardSmall:"on-this-day-card-small",OnThisDayCardWC:"on-this-day-card",OverlayWC:"overlay-wc",PageRefreshWC:"page-refresh",PanoPage:"pano-page",PartnerUpsellCard:"partner-upsell-card",PersonalFinanceExpenseDistribution:"personal-finance-expense-distribution",PersonalFinanceTransactionsCard:"personal-finance-transactions-card",PersonalizeNavButton:"personalize-nav-button",PhotoCard:"photo-card",PillFreOverlay:"pill-fre-overlay",PillWC:"pill-wc",PivotsMobileWC:"pivots-mobile",PollsCardWC:"polls-card",PoweredbyLegendWC:"poweredby-legend",PrayerTimesCard:"prayer-times-card",PremiumProfilePromoCard:"premium-profile-promo-card",PrideEventCard:"pride-event-card",PrismCards:"prism-cards",PrismCarouselCard:"prism-carousel-card",PrismFeed:"prism-feed",PrismSdCard:"prism-sd-card",ProductivityHub:"productivity-hub",ProfileArticles:"profile-articles",ProfilePromoCard:"profile-promo-card",PromotedAdWC:"promoted-ad-wc",PublisherCarousel:"publisher-carousel",PublisherList:"publisher-list",PublisherSubscribeFollowButton:"publisher-subscribe-follow-button",PullToRefresh:"pull-to-refresh",Qna:"qna-card",QnaFeed404Page:"qna-feed-404-page",QnaFeedCard:"qna-feed-card",QnaFeedCardMenu:"qna-feed-card-menu",QnaFeedCarousel:"qna-feed-carousel",QnaFeedCategoriesMenu:"qna-feed-categories-menu",QnaFeedExploreTopics:"qna-feed-explore-topics",QnaFeedList:"qna-feed-list",QnaFeedMyTopics:"qna-feed-my-topics",QnaFeedRelatedQuestions:"qna-feed-related-questions",QnaFeedReportCard:"qna-feed-report-card",QnaFeedSuggestedTopics:"qna-feed-suggested-topics",QnaFeedTopicDetail:"qna-feed-topic-detail",QnaFeedTrendingQuestions:"qna-feed-trending-questions",QuizCard:"quiz-card",ReactionBreakdownDialog:"reaction-breakdown-dialog",RealEstateCard:"real-estate-card",RecipesSdCard:"recipes-sd-card",RecommendedInterests:"recommended-interests",RecommendedSearchCarouselWC:"recommended-search-carousel",RecommendedSearchesCard:"recommended-searches-card",RecommendedSitesWC:"recommended-sites",RewardsCardWC:"rewards-card",RewardsDailyCheckinCard:"rewards-daily-checkin-card",RewardsDailySetCard:"rewards-daily-set-card",RichCalendarCard:"rich-calendar-card",RightRailProviderCarousel:"right-rail-provider-carousel",ScrollDownButton:"scroll-down-button",SdCardMaskWC:"sd-card-mask",SearchBoxWC:"search-box-wc",SearchHistoryEdgeNextWC:"search-history-edgenext",SelectCarousel:"select-carousel",SharedHeroNewsCard:"shared-hero-news-card",SharedLinks:"shared-links",SharepointNewsCard:"sharepoint-news-card",ShoppingAllStoresPage:"shopping-all-stores-page",ShoppingArticlePage:"shopping-article-page",ShoppingAugmentCard:"shopping-augment-card",ShoppingBingProductDetails:"shopping-bing-product-details",ShoppingBlackjackDealPage:"shopping-blackjack-deal-page",ShoppingBlackjackPage:"shopping-blackjack-page",ShoppingBuyingGuide:"shopping-buying-guide",ShoppingBuyingGuidePremiumCard:"shopping-buying-guide-premium-card",ShoppingBuyingGuidesCard:"shopping-buying-guides-card",ShoppingCardWC:"shopping-card-wc",ShoppingCarouselProngWC:"shopping-carousel-prong-wc",ShoppingCarouselWC:"shopping-carousel",ShoppingCart:"shopping-cart",ShoppingCashback:"shopping-cashback",ShoppingCategoryPage:"shopping-category-page",ShoppingCheckoutModal:"shopping-checkout-modal",ShoppingCheckoutPage:"shopping-checkout-page",ShoppingColdStart:"shopping-cold-start",ShoppingCouponsPage:"shopping-coupons-page",ShoppingDealsHomePage:"shopping-deals-home-page",ShoppingDebugPage:"shopping-debug-page",ShoppingEdgeInsightsCard:"shopping-edge-insights-card",ShoppingEntryBaseExperience:"shopping-entry-base-experience",ShoppingEventsDealCard:"shopping-events-deal-card",ShoppingFashionCarouselWC:"shopping-fashion-carousel",ShoppingForumFavorites:"shopping-forum-favorites",ShoppingForumHome:"shopping-forum-home",ShoppingForumLandingPage:"shopping-forum-landing-page",ShoppingForumOrderCancelPage:"shopping-forum-order-cancel-page",ShoppingForumOrderConfirmation:"shopping-forum-order-confirmation",ShoppingForumOrderDetails:"shopping-forum-order-details",ShoppingForumOrdersPage:"shopping-forum-orders-page",ShoppingForumProductPage:"shopping-forum-product-page",ShoppingForumRefundDetailsPage:"shopping-forum-refund-details-page",ShoppingForumRefundOrderPage:"shopping-forum-refund-order-page",ShoppingForumReturnDetailsPage:"shopping-forum-return-details-page",ShoppingForumReturnOrderPage:"shopping-forum-return-order-page",ShoppingForumSellerPage:"shopping-forum-seller-page",ShoppingGrid:"shopping-grid",ShoppingGroupedCarousel:"shopping-grouped-carousel",ShoppingGuidesPage:"shopping-guides-page",ShoppingHomepage:"shopping-homepage",ShoppingInspiration:"shopping-inspiration",ShoppingLeaderboard:"shopping-leaderboard",ShoppingLiveEmbedPage:"shopping-live-embed-page",ShoppingLiveFeedPage:"shopping-live-feed-page",ShoppingLiveProductDetailsPage:"shopping-live-product-details-page",ShoppingModal:"shopping-modal",ShoppingModelOverlay:"shopping-model-overlay",ShoppingMomentInTimePage:"shopping-moment-in-time-page",ShoppingMultiTabCarousel:"shopping-multi-tab-carousel",ShoppingNotification:"shopping-notification",ShoppingPageBase:"shopping-page-base",ShoppingPageContent:"shopping-page-content",ShoppingPivotFeed:"shopping-pivot-feed",ShoppingProductDetailPage:"shopping-product-detail-page",ShoppingProductPage:"shopping-product-page",ShoppingSdCard:"shopping-sd-card",ShoppingSearch:"shopping-search",ShoppingSearchResultPage:"shopping-search-result-page",ShoppingShippingAddress:"shopping-shipping-address",ShoppingShopTheLookPage:"shopping-shopthelook-page",ShoppingTopSpan:"shopping-top-span",ShoppingVerticalListsCard:"shopping-vertical-lists-card",ShoppingVideoShortsCarousel:"shopping-video-shorts-carousel",ShoppingViewsCarousel:"shopping-views-carousel",SignInControlWC:"sign-in-control",SignInFlyoutWC:"sign-in-flyout",SignalOverlay:"signal-overlay",SocialAvatar:"social-avatar",SocialBarWC:"social-bar-wc",SocialCommentWC:"social-comment-wc",SocialEntrypoint:"social-entrypoint",SocialLeadGenInArticle:"social-lead-gen-in-article",SocialNotification:"social-notification",SocialPostEditorWC:"social-post-editor",SocialProfileActionMenu:"social-profile-action-menu",SocialProfileAppeal:"social-profile-appeal",SocialProfileCard:"social-profile-card",SocialProfilePromotion:"social-profile-promotion",SocialProfileRejectionDetails:"social-profile-rejection-details",SocialProfileTopics:"social-profile-topics",SocialRelatedSources:"social-related-sources",SocialReportMenu:"social-report-menu",SocialRewardsMedal:"social-rewards-medal",SocialRewardsPromotion:"social-rewards-promotion",SocialStarRating:"social-star-rating",SocialSubscriptionBanner:"social-subscription-banner",SocialSubscriptionNotification:"social-subscription-notification",SocialSubscriptionOverlay:"social-subscription-overlay",SocialSubscriptionOverlaySummary:"social-subscription-overlay-summary",SocialSubscriptionPaywall:"social-subscription-paywall",SocialSubscriptionUpsell:"social-subscription-upsell",SocialSupportResult:"social-support-result",SocialTipHistory:"social-tip-history",SocialTipIntroduction:"social-tip-introduction",SocialTipPromotion:"social-tip-promotion",SocialTipPromotionInArticle:"social-tip-promotion-in-article",SocialTipSelection:"social-tip-selection",SportsAroundTheLeague:"sports-around-the-league",SportsAugmentCard:"sports-augment-card",SportsBackgroundUx:"sports-background-ux",SportsBrackets:"sports-brackets",SportsCardWC:"sports-card",SportsCommentary:"sports-commentary",SportsCountdownTimer:"sports-countdown-timer",SportsCricketLayoutManager:"sports-cricket-layout-manager",SportsCricketLeagueStats:"sports-cricket-league-stats",SportsCricketMatchRow:"sports-cricket-match-row",SportsCricketPartnerships:"sports-cricket-partnerships",SportsCricketRankings:"sports-cricket-rankings",SportsCricketScorecard:"sports-cricket-scorecard",SportsCricketScoresAndSchedule:"sports-cricket-scores-and-schedule",SportsEntityHeader:"sports-entity-header",SportsFeaturedMatchesCard:"sports-featured-matches-card",SportsFullStandings:"sports-full-standings",SportsFullStats:"sports-full-stats",SportsGameInformation:"sports-game-information",SportsGameScore:"sports-game-score",SportsGameSummary:"sports-game-summary",SportsGameSummaryFull:"sports-game-summary-full",SportsGameTimeline:"sports-game-timeline",SportsGcPlayerStats:"sports-gc-player-stats",SportsGcTeamStats:"sports-gc-team-stats",SportsGptAnalysis:"sports-gpt-analysis",SportsHeadlinesTimelines:"sports-headlines-timelines",SportsInfo:"sports-info",SportsInfoSpan:"sports-info-span",SportsLayoutRenderer:"sports-layout-renderer",SportsMatchRow:"sports-match-row",SportsMobileTabPanel:"sports-mobile-tab-panel",SportsOlympicCardWC:"sports-olympic-card",SportsPersonMatchRow:"sports-person-match-row",SportsPersonalizationStrip:"sports-personalization-strip",SportsPinLiveMatch:"sports-pin-live-match",SportsPlayerBio:"sports-player-bio",SportsPlayerInsights:"sports-player-insights",SportsPreviousMatchups:"sports-previous-matchups",SportsRankingsFull:"sports-rankings-full",SportsScoresAndSchedule:"sports-scores-and-schedule",SportsScoresAndScheduleFull:"sports-scores-and-schedule-full",SportsSquad:"sports-squad",SportsStandings:"sports-standings",SportsStandingsList:"sports-standings-list",SportsStatLeaders:"sports-stat-leaders",SportsStats:"sports-stats",SportsTabLayout:"sports-tab-layout",SportsTeamFormation:"sports-team-formation",SportsTeamProbability:"sports-team-probability",SportsTennisScoresAndScheduleFull:"sports-tennis-scores-and-schedule-full",SportsTennisTournamentInfo:"sports-tennis-tournament-info",SportsTournamentInfo:"sports-tournament-info",SportsTournamentLeaderboard:"sports-tournament-leaderboard",SportsTournamentMatchRow:"sports-tournament-match-row",SportsTournamentResultsAndSchedule:"sports-tournament-result-and-schedule",SportsTournamentSchedule:"sports-tournament-schedule",SportsTournamentStandings:"sports-tournament-standings",SportsUnavailablePlayers:"sports-unavailable-players",SportsVideoList:"sports-video-list",SportsWorldCupCardWC:"sports-worldcup-card",SpotlightCardWC:"spotlight-card",StarterKitWC:"starter-kit",StickyPeek:"sticky-peek",StoryCarousel:"story-carousel",StripeWC:"stripe-wc",SuggestedChannelPrompt:"suggested-channel-prompt",SummaryCardWC:"summary-card-wc",SuperBreakingNews:"super-breaking-news",SuperCoachMarkWC:"super-coach-mark",SuperListCard:"super-list-card",SuperNav:"super-nav",SuperNavCoachMark:"super-nav-coach-mark",SuperappBannerWC:"superapp-banner",SuperappUpsellCardWC:"superapp-upsell-card",TabbedFeedWC:"tabbed-feed-card",TestBingNudge:"test-bing-nudge",ThemePickerWC:"theme-picker",TipsCard:"tips-card",ToastWC:"ms-toast",TodoCardWC:"todo-card",TopSitesBookmarks:"top-sites-bookmarks",TopSitesEdgeNextWC:"top-sites-edgenext",TopSitesNewsbar:"top-sites-newsbar",TopSitesSubscription:"top-sites-subscription",TopicTags:"topic-tags",TrafficCardWC:"traffic-card",TrafficHero:"traffic-hero",TranslateTemporary:"translate-temporary",TravelArticleCard:"travel-article-card",TravelArticlePageCard:"travel-article-page-card",TravelArticlePill:"travel-article-pill",TravelCard:"travel-card",TravelCarousel:"travel-carousel",TravelCollectionCard:"travel-collection-card",TravelDestination:"travel-destination",TravelDestinationBanner:"travel-destination-banner",TravelDestinationDetailsBanner:"travel-destination-details-banner",TravelFeed:"travel-feed",TravelFlightCarousel:"travel-flight-carousel",TravelHotelCarousel:"travel-hotel-carousel",TravelInspirationCardWC:"travel-inspiration-card-wc",TravelLandingPage:"travel-landing-page",TravelMsnHpCard:"travel-msn-hp-card",TravelSaveButton:"travel-save-button",TravelSdCarrentalsCard:"travel-sd-carrentals-card",TravelSdDestinationsCard:"travel-sd-destinations-card",TravelSdFlightsCard:"travel-sd-flights-card",TravelSdHotelsCard:"travel-sd-hotels-card",TravelSdThemesCard:"travel-sd-themes-card",TravelTabCarousel:"travel-tab-carousel",TravelTourActivityCard:"travel-tour-activity-card",TrendingNowWC:"trending-now-card",TrendingSearchCard:"trending-search-card",TrendingTopics:"trending-topics-card",UgcCreatorHomepage:"ugc-creator-homepage",UnifiedMobileFeed:"unified-mobile-feed",VerticalLeftNav:"vertical-left-nav",VideoCardWC:"video-card",VideoDetails:"video-details",VideoShoppingCard:"video-shopping-card",VideoShoppingCarouselCard:"video-shopping-carousel-card",ViewsCoachmark:"views-coachmark",ViewsNativeAd:"views-native-ad",ViewsRail:"views-rail",VoiceSearchWC:"voice-search-wc",WaffleWC:"waffle-wc",WalletPersonalizedOfferSdCardWC:"wallet-personalized-offer-sd-card-wc",WatchVideosVerticalCarousel:"watch-videos-vertical-carousel",WatchWC:"watch-wc",WaterTrackerCard:"water-tracker-card",WaterfallViewFeed:"waterfall-view-feed",WeatherCardWC:"weather-card",WeatherCurrentWC:"weather-current",WeatherForecastDayNightWC:"weather-forecast-day-night",WeatherForecastDayWC:"weather-forecast-day",WeatherForecastHistoryWC:"weather-forecast-history",WeatherForecastPerHourWC:"weather-forecast-per-hour",WeatherForecastSunMoonPhaseWC:"weather-forecast-sun-moon-phase",WeatherForecastSunMoonWC:"weather-forecast-sun-moon",WeatherHeroExperience:"weather-hero-experience",WeatherHistoricalRecordWC:"weather-historical-record",WeatherHistoricalTemperatureWC:"weather-historical-temperature",WeatherHourlyHistogramWC:"weather-hourly-histogram",WeatherImmersiveForecastWC:"weather-immersive-forecast-wc",WeatherInfoSpan:"weather-info-span",WeatherLifeEntryWC:"weather-life-entry",WeatherLocationCardWC:"weather-location-card",WeatherLocationSearchPhoneWC:"weather-location-search-phone",WeatherLocationWC:"weather-location",WeatherMapGroupSwitcherButtonWC:"weather-map-group-switcher-button",WeatherMapLegendWC:"weather-map-legend",WeatherMapTimelineWC:"weather-map-timeline",WeatherMapWC:"weather-map",WeatherMapsRotationWC:"weather-maps-rotation",WeatherMinimapWC:"weather-minimap",WeatherMonthlySummaryWC:"weather-monthly-summary",WeatherOneLiner:"weather-one-liner",WeatherOverviewWC:"weather-overview",WeatherPageWC:"weather-page",WeatherTodayHistoryWC:"weather-today-history",WeatherTodayMiniWC:"weather-today-mini",WeatherTravelCarousel:"weather-travel-carousel",WeatherVideoEntryWC:"weather-video-entry",WelcomeGreetingLight:"welcome-greeting-light",WelcomeGreetingWC:"welcome-greeting",WidgetPickerWC:"widget-picker-wc",WidgetsDynamicFeed:"widgets-dynamic-feed",WidgetsHomePage:"widgets-home-page",WidgetsNotificationsCard:"widgets-notifications-card",WinAppWC:"win-app-wc",WindowsOfficeFeed:"windows-office-feed",WindowsShellBannersManager:"windows-shell-banners-manager",WindowsShellEntry:"windows-shell-entry",WindowsShellHeader:"windows-shell-header",WindowsShellLocationDialog:"windows-shell-location-dialog",WindowsShellNotificationSettings:"windows-shell-notification-settings",WindowsShellSettingsMenu:"windows-shell-settings-menu",WindowsShellSoftLanding:"windows-shell-soft-landing",WindowsWidgetsHub:"windows-widgets-hub",XboxFeedWC:"xbox-feed-wc",XfeedWC:"xfeed-wc",YandexSearchBoxWC:"yandex-search-box"};function r(e){return i[e]}},64902:function(e,t,n){"use strict";n.d(t,{Fg:function(){return x},pE:function(){return D}});var i,r,o,a,s=n(42933),c=n(7476),d=n(88826),l=n(3104),u=n(66701),p=n(77036);!function(e){e.OneColumn="OneColumn",e.TwoColumn="TwoColumn",e.ThreeColumn="ThreeColumn",e.FourColumn="FourColumn",e.FiveColumn="FiveColumn",e.Any="Any"}(i||(i={})),function(e){e.customExperience="customExperience",e.grid="grid",e.horizontalStack="horizontalStack",e.layout="layout",e.rail="rail",e.verticalStack="verticalStack"}(r||(r={})),function(e){e.actionTrigger="ActionTrigger",e.button="Button",e.heading="Heading",e.peregrineExperience="PeregrineExperience",e.typography="Typography",e.webComponentExperience="WebComponentExperience"}(o||(o={})),function(e){e.riverGridChildren="riverGridChildren"}(a||(a={}));var h=n(98619),g=n(50632),m=n(52965),f=n(85663);class v{static registerAppValidator(e){this.expValidatorMap=e.getAllValidators()}static processConfig(e,t){if(!this.expValidatorMap||this.expValidatorMap.size<1||!e||!e.childExpValidatorMap)return e;const n=e.childExpValidatorMap;let i=null,r=null;for(const o in n){const a=n[o];if(this.expValidatorMap.has(o)){this.expValidatorMap.get(o)(a.validationArgs)&&(null===r&&(r=this.expConfigMap.get(t)||e),null===i&&(i=(0,m.Z)(r)),e=this.filterConfig(a,r))}}return i?this.expConfigMap.set(t,i):null===r&&this.expConfigMap.has(t)&&(e=this.expConfigMap.get(t)),e}static removeFromRiverGridChildren(e,t){const n=t.riverGridChildren;return n&&n.forEach((t=>{const n=t.children;if(n){const i=e.childExperienceConfigInfo,r=(0,l.M)(i);t.children=n.filter((e=>{const t=e.childExperienceConfigInfo;return!t||!i||i.instanceId!==t.instanceId||r!==(0,l.M)(t)}))}})),t}static getChildrenDataConnectorConfigInfos(e){const t=[];if(e&&e.dataConnectors&&e.dataConnectors.length>0){const n=v.getOrdinalObjectForCurrentBreakpoint(e.dataConnectors);n&&n.children&&n.children.length>0&&n.children.forEach((e=>{t.push(e)}))}return t}static getMetadataByScreenWidth(e,t){return t.find((t=>t.screenWidth===e))||t.find((e=>e.screenWidth===i.Any))}static getOrdinalObjectForCurrentBreakpoint(e){switch((0,h.Bn)().currentColumnArrangement){case g.K$.c1:return v.getMetadataByScreenWidth(i.OneColumn,e);case g.K$.c2:return v.getMetadataByScreenWidth(i.TwoColumn,e);case g.K$.c3:return v.getMetadataByScreenWidth(i.ThreeColumn,e);case g.K$.c4:return v.getMetadataByScreenWidth(i.FourColumn,e);case g.K$.c5:return v.getMetadataByScreenWidth(i.FiveColumn,e);default:return v.getMetadataByScreenWidth(i.Any,e)}}static compositionOverrideResolver(e,t){const{getCompositionIdOverride:n}=t||{},{composition:i,compositionOverrides:r}=e;return r&&(0,f.isFunction)(n)&&r[n()]||i}static getChildrenExperienceConfigInfos(e,t){const n=[];if(e&&e.composition){const i=v.compositionOverrideResolver(e,t);switch(i.type){case r.rail:case r.horizontalStack:case r.layout:i.page.children.forEach((e=>{void 0!==e.children&&e.children.forEach((e=>{if(!e.children)return;const{childType:t}=e.children;t?t===o.peregrineExperience&&n.push(e.children.child):n.push(e.children)}))}));break;case r.grid:i.grid.rows.forEach((e=>{void 0!==e.columns&&e.columns.forEach((e=>{const{itemType:t}=e.item;t&&t===o.peregrineExperience&&n.push(e.item.child)}))}));break;case r.customExperience:{const e=i;n.push(e.experience);break}}}return n}static filterConfig(e,t){return e&&"string"==typeof e.sectionName&&e.sectionName.toLowerCase()===a.riverGridChildren.toLowerCase()?this.removeFromRiverGridChildren(e,t):t}static resetValidatorMap(){this.expValidatorMap.clear()}static resetConfigMap(){this.expConfigMap.clear()}}v.expValidatorMap=new Map,v.expConfigMap=new Map;var y=n(43356),S=n(69686),C=n(67044),w=n(9791),b=n(43063);const T={DisplayAdsWC:(0,b.V8)("display-ads"),ViewsNativeAd:(0,b.V8)("views-native-ad")};var k=n(31558),P=n(55524);const I="WebComponentLoader.SkippedExperience",A="WebComponentLoader.LoadedExperience",E="WebComponentLoader.ModuleLoadPromiseMap",x=(0,k.N)()?(0,w.Z)(L,(e=>(0,l.B5)(e.configRef))):L,M=()=>P.Gq.get(A,(()=>[]));async function L(e){try{const{configRef:t,configRef:{experienceType:i}}=e;if(P.Gq.get(I,(()=>new Set)).has(i))return;const r=(0,y.gy)(i);r&&r.shouldResolve&&await r.shouldResolve();const o=(0,s.oA)(i,e.instanceId);if((0,k.N)()||M().push(e),window.customElements.get((0,S.ITY)(i)))return void await R(t,o);const a=R(t,o),c=function(e,t){const n=P.Gq.get(E,(()=>({})));let i=n[e];if(i)return i;return i=(0,s.fW)((()=>u.n.loadExperience(e)),"scripts",t),n[e]=i,i}(i,o),d=(await Promise.all([a,c]))[1];await async function(e,t){const i=t[e],r=t[e+"Template"];let o=t[e+"Styles"];if(!(0,k.N)()){const n=t[e+"SSRStyles"];o=n||o}const a=(0,S.ITY)(e),s=function(e,t){if(void 0!==t)return{DisplayAdsWC:(0,b.V8)("display-ads",t),ViewsNativeAd:(0,b.V8)("views-native-ad",t)}[e];return T[e]}(e),c=await Promise.resolve().then(n.bind(n,27815));if(c.FASTElement.define(i,{name:a,template:r,styles:o,...i.definition}),s){class e extends i{}c.FASTElement.define(e,{name:s,template:r,styles:o,...i.definition})}}(i,d)}catch(t){const n={...c.gzO};(0,d.OO)(t,n,"Loading web component experience failed.",void 0,{configInfo:e})}}async function D(e){await Promise.all(e.map((e=>x(e))))}async function R(e,t){const n=await(0,s.fW)((()=>p.U.getConfig(e)),"config",t);if(!n)return;const i=n.properties;if(!i||!i.dataConnectors||i.dataConnectors.length<=0)return;const r=t&&t.startMeasure("loadDataConnectors").endMeasure,o=v.getChildrenDataConnectorConfigInfos(i).map((e=>(0,C.Ki)(e)));await Promise.all(o),r&&r()}},47266:function(e,t,n){"use strict";n.d(t,{l:function(){return A}});var i=n(33940),r=n(77036),o=n(21789),a=n(69233),s=n(28904),c=n(42590),d=n(59349),l=n(29330),u=n(10754),p=n(88826),h=n(7476),g=n(21930),m=n(19995),f=n(41074),v=n(43356),y=n(82898),S=n(58616);class C extends Event{constructor(e){super(C.type,{bubbles:!0,composed:!0}),this.complete=e}static isPendingTask(e){var t;return e.type===C.type&&"function"==typeof(null===(t=e.complete)||void 0===t?void 0:t.then)}}C.type="pending-task";var w=n(78951),b=n(31558);const T={};var k=n(26732),P=n(88070);const I="props-token";class A extends s.H{constructor(){super(...arguments),this.ensureObservableBeforeConnect=!1,this.hydratable=!1,this.isSSRRendered=!1,this.needPendingTask=!1}connectedCallback(){this.initializeCore().then((()=>{var e;return this.ttvrEnd=null===(e=this.perfTimeline)||void 0===e?void 0:e.startMeasure("render").endMeasure}))}async initializeCore(){const e=this.getExperienceType(),t=this.perfTimeline=(0,d.Dd)(e,this.instanceId);if(this.initStart=t&&(()=>this.initEnd=t.startMeasure("init").endMeasure),this.fetch=(0,l.Ud)({perfTimeline:t}),(0,u.O8)("WCE.Count"),(0,b.N)())this.hydratable=this.hasAttribute("defer-hydration")||this.hasAttribute("needs-hydration"),this.isSSRRendered=this.hasAttribute("needs-hydration"),this.initializeAsync();else{const e=this.initializeOnServerSide();this.needPendingTask&&this.dispatchEvent(new C(e))}}async initializeOnServerSide(){var e;null===(e=this.initStart)||void 0===e||e.call(this),this.needPendingTask=!1;const t=this.getExperienceType();try{var n;const e=this.getConfigRef();if(!this.config){let t;if("string"!=typeof e)try{t=r.U.getConfigSync(e)}catch(e){}t||(this.needPendingTask=!0,t=await r.U.getConfig(e)),this.config=t.properties}if(this.strings=this.config.localizedStrings,!this.telemetryObject){const e=this.getTelemetryContract();this.telemetryObject=new w.D(e)}const t=this.experienceConnected();t&&(this.needPendingTask=!0,await t),super.connectedCallback(),this.shadowDomPopulated(),null===(n=this.initEnd)||void 0===n||n.call(this)}catch(e){var i,o;null===(i=this.initEnd)||void 0===i||i.call(this,{customSuffix:"error"}),(0,p.OO)(e,h.xuo,`Exception web component experience(${t}) initializeOnServerSide.`,`ssrLayout:${null===(o=window.ssrLayoutState)||void 0===o?void 0:o.selectedFeedDisplaySetting};edgeHeader:${JSON.stringify(window.edgeNTPHeader)}`)}}async initializeAsync(){var e;this.hydratable&&await(0,S.ZH)(this),null===(e=this.initStart)||void 0===e||e.call(this),this.reportStartTimeToMilestoneConnector(f.g.updateVisuallyReadyTiming);const t=this.getExperienceType();try{var n;const e=this.getConfigRef();if(!this.config){const t=await r.U.getConfig(e);this.config=t.properties}if(this.strings=this.config.localizedStrings,!this.telemetryObject){const e=this.getTelemetryContract();this.telemetryObject=new w.D(e)}const{stalenessInfo:i}=this.config;i&&i.isStaleCheckRequired&&(0,k.MV)({experienceType:t,thresholdMinutes:i.staleThreshold,criticalCallback:()=>this.prerenderRefreshCritical(),delayCallback:()=>this.prerenderRefresh()}),this.ensureObservableBeforeConnect&&this.$fastController.bindObservables();const o=this.experienceConnected();if(o){const e=this.hydratable&&S.iA?(0,S.bE)(`${this.getExperienceType()}:experienceConnected`):void 0;null==e||e.start(),await o,null==e||e.markEnd()}if(this.hydratable){const e=S.iA?(0,S.bE)(`${this.getExperienceType()}:beforeHydration`):void 0;null==e||e.start(),await this.beforeHydration(),null==e||e.markEnd()}super.connectedCallback(),this.shadowDomPopulated(),this.hydratable&&await this.afterHydration(),this.perfTimeline&&(0,d.d0)(this,this.perfTimeline,P.y),null===(n=this.initEnd)||void 0===n||n.call(this)}catch(e){var i,o;(0,p.OO)(e,h.xuo,`Exception web component experience initializeAsync. ExperienceType: ${t}`,`ssrLayout:${null===(i=window.ssrLayoutState)||void 0===i?void 0:i.selectedFeedDisplaySetting};edgeHeader:${JSON.stringify(window.edgeNTPHeader)}`),this.logCriticalException(),null===(o=this.initEnd)||void 0===o||o.call(this,{customSuffix:"error"})}}experienceConnected(){}beforeHydration(){}afterHydration(){}shadowDomPopulated(){}prerenderRefreshCritical(){return Promise.resolve(void 0)}prerenderRefresh(){}logCriticalException(){}getConfigRef(){return o.jG.IsGitConfigs?{instanceSrc:this.instanceSrc,experienceType:this.getExperienceType(),sharedNs:this.sharedNs}:this.instanceSrc}getTelemetryContract(){return{type:y.c9.Module,name:this.getExperienceType()}}getApproxTTVRValue(e){const t=(0,u.Ou)();if(this.isSSRRendered&&t[a.p.isSSRCompleted])return t[g.nz+(e||this.getExperienceType())]||t[g.nz+a.p.complete]}markVisuallyReady(e,t){var n,i;const r=this.getApproxTTVRValue();t??(t=void 0===r),e=r||e;const o=(0,g.o_)(this.getExperienceType(),!1,e,t);return this.reportEndTimeToMilestoneConnector(f.g.updateVisuallyReadyTiming,e),null===(n=this.ttvrEnd)||void 0===n||n.call(this,{endTime:e}),null===(i=this.visualReadinessCallback)||void 0===i||i.call(this),o}markVisuallyReadyRaf(e){(0,m.c)((()=>this.markVisuallyReady(e)))}reportStartTimeToMilestoneConnector(e){this.reportTimeToMilestoneConnector(e,performance.now())}reportEndTimeToMilestoneConnector(e,t){this.reportTimeToMilestoneConnector(e,void 0,t||performance.now())}reportTimeToMilestoneConnector(e,t,n){const i=(0,v.S0)();i&&e.getActionSender(i).send({experienceType:this.getExperienceType(),experienceInstance:this.instanceId,startTime:t,endTime:n})}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),e===I){const e=function(e){const t=T[e];return delete T[e],t}(n);Object.assign(this,e)}}}(0,i.gn)([(0,c.Lj)({attribute:"config-instance-src"})],A.prototype,"instanceSrc",void 0),(0,i.gn)([(0,c.Lj)({attribute:"config-shared-ns"})],A.prototype,"sharedNs",void 0),(0,i.gn)([(0,c.Lj)({attribute:"instance-id"})],A.prototype,"instanceId",void 0),(0,i.gn)([(0,c.Lj)({attribute:I})],A.prototype,"propsToken",void 0)},7275:function(e,t,n){"use strict";n.d(t,{Ot:function(){return S}});var i=n(31699),r=n(85594),o=n(49218),a=n(3104),s=n(82656),c=n(69686),d=n(64902),l=n(23549),u=n(82898),p=n(78951),h=n(7476),g=n(21930),m=n(31558);const f={};function v(e,t){if(!t)return;const{properties:n,attributes:r}=t;if(n&&Object.assign(e,n),r)for(const[t,n]of Object.entries(r))"boolean"==typeof n?i.S.setBooleanAttribute(e,t,n):"number"==typeof n?e.setAttribute(t,n.toString()):e.setAttribute(t,n)}class y extends r.Pq{bind(e){e.onUnbind(this);const t=e.targets[this.targetNodeId],{events:n,properties:i,instanceKey:r}=this.options||{};if(n)for(const[e,i]of Object.entries(n))t.addEventListener(e,i);let o;if(r&&(o=f[r]),o)return o.elements.push(t),!t.telemetryObject&&null!=i&&i.telemetryObject&&(t.telemetryObject=i.telemetryObject),void v(t,o.options);Object.assign(t,i)}unbind(e){var t,n;const i=e.targets[this.targetNodeId];if(null!==(t=this.options)&&void 0!==t&&t.events)for(const[e,t]of Object.entries(null===(r=this.options)||void 0===r?void 0:r.events)){var r;i.removeEventListener(e,t)}const o=null===(n=this.options)||void 0===n?void 0:n.instanceKey;if(o){const e=f[o];if(e){const t=e.elements.indexOf(i);t>=0&&e.elements.splice(t,1)}}}}function S(e,t){if(!e)return;if(!e.configRef||!e.configRef.experienceType)return void l.M0.sendAppErrorEvent({...h.tkv,message:`ConfigRef for InstanceId "${null==e?void 0:e.instanceId}" is ${null!=e&&e.configRef?"invalid":"missing"}`});"CommonSettingsEdgeNext"===e.configRef.experienceType&&t.properties&&t.properties.shouldSendRenderAppError&&l.M0.sendAppErrorEvent({...h.HPx,message:"Rendering common settings wc via renderWce"}),t&&t.ttvrMarkerAggregate&&(0,g.aR)(e.configRef.experienceType,t.ttvrMarkerAggregate,!0);const n=function(e,t){const{configRef:n}=e,i=function(e){const t=null==e?void 0:e.properties;return null==t?void 0:t.cardLayout}(t),r=function(e){const t=null==e?void 0:e.properties;return null==t?void 0:t.cardType}(t),o=r?`_${r}`:"";return`${n.experienceType}_${n.instanceSrc}_${n.sharedNs||""}_${e.instanceId}_${i||""}${o}`}(e,t);if(!1!==(null==t?void 0:t.memoize)&&(0,m.N)()){const i=f[n];let r;if(i){if(t)for(const e of i.elements)v(e,t);i.options=t,r=i.template}else r=C(e,n,t),f[n]={template:r,options:t,elements:[]};return r}return C(e,n,t)}function C(e,t,n){let i=null==n?void 0:n.telemetryObject;if(!i){const t={type:u.c9.Module,name:e.configRef.experienceType};i=new p.D(t)}const r={...null==n?void 0:n.properties,telemetryObject:i};let l;!1!==(null==n?void 0:n.includeTelemetryTag)&&(l=i.getMetadataTag());const h={instanceKey:t,events:null==n?void 0:n.events,properties:r},g=(0,a.M)(e),m=(0,s.g)(e),f=(0,c.ITY)(g);(0,d.Fg)(e);const v=Object.entries((null==n?void 0:n.attributes)??{}).map((([e,t])=>"boolean"==typeof t?t?e:"":`${e}=${t}`)).join(" ");return o.dy`<${o.dy.partial(f)} config-instance-src=${o.dy.partial(m)} config-shared-ns=${t=>{var n;return null===(n=e.configRef)||void 0===n?void 0:n.sharedNs}} instance-id=${o.dy.partial(e.instanceId)} data-t=${e=>l} ${function(e){return e?new y(e):""}(h)} ${o.dy.partial(v)}></${o.dy.partial(f)}>`}r.m0.define(y)},88070:function(e,t,n){"use strict";n.d(t,{a:function(){return a},y:function(){return o}});var i=n(31699),r=n(49218);function o(){return new Promise((e=>i.S.queueUpdate((()=>e()))))}function a(e){return r.dy`<script nonce="${()=>window.NONCE_ID}">${r.dy.partial(`window.markTTSR("${e}");`)}</script>`}},7653:function(e,t,n){"use strict";n.d(t,{Bc:function(){return c},Kd:function(){return a},LB:function(){return o},W_:function(){return s}});var i=n(48587),r=n(94546);function o(e,t,n){return"mmx"===n||!(!n||!e||e<i.PQ)&&!t}function a(e){if(!e||!e.length)return e;const t=[];return e.forEach((e=>{const n=e.trim();n.startsWith(r.SD)&&t.push(n)})),t.sort()}function s(e,t,n){try{return e&&t&&t.includes(i.my)&&"weather"!==n&&"finance"!==n?i.SL:e}catch(e){}return e}function c(e,t=!1){const{itemOverrides:n}=e||{},i=n&&n.find((e=>"should1sUseFdheadQsp"===e.key));if(i&&i.value)return"true"===i.value;if(t)return!1;const r=n&&n.find((e=>"flights"===e.key||"appendflights"===e.key.toLowerCase()));return!!(r&&r.value&&r.value.length>0)}},70956:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});const i="prg-";function r(e){const t=i.length,n=[];return e&&e.length&&(e.forEach((e=>{const r=e&&e.trim();r&&r.length>=t&&r.substring(0,t).toLowerCase()===i&&n.push(r.toLowerCase())})),n.sort()),n}},58608:function(e,t,n){"use strict";n.d(t,{q:function(){return F}});var i=n(81110),r=n(46986),o=n(83102),a=n(62168),s=n(21789),c=n(32810),d=n(13334),l=n(92100),u=n(98463),p=n(45870),h=n(54820),g=n(15165),m=n(91730),f=n(78672),v=n(31558),y=n(55524),S=n(35281),C=n(70169),w=n(34631),b=n(23549),T=n(7476),k=n(5674),P=n(9498),I=n(67213),A=n(36867),E=n(74161);const x="gaming",M="following",L="filteredChannels",D="outlookchannels";function R(e){return!(null==e||""===e||"string"!=typeof e&&"number"!=typeof e||isNaN(e))}var F;!function(e){async function t(e,t,g){const S=new c.h((0,f.zp)()),F=s.jG.UserId,{CurrentRequestTargetScope:O={},WidgetAttributes:B={},CurrentMarket:N}=s.jG;let $=t&&t.flightData;if(B.telemetry&&B.telemetry.tmpl&&B.telemetry.tmpl.includes("pwbingads2")){const e="prg-binghplite";$=$?`${$},${e}`:e}let U=new c.h(e);if(t.nextPageUrl){if(U=new c.h(new URL(t.nextPageUrl).search),!s.jG.SendFeedCallActivityIdInHeader&&s.jG.ActivityId){const e=d.Al.CurrentFlightSet.has("prg-prsw");"channel"===s.jG.AppType||"winWidgets"===s.jG.AppType&&U.get("activityId")||e&&"edgeChromium"===s.jG.AppType&&U.get("activityId")||U.set("activityId",s.jG.ActivityId)}}else{const e=await(0,C.XJ)()===o.Hy.SignedIn;m.n.publish(m.j.userIsSignedIn,{isSignedIn:e,src:"main"});(e?h.$D.getOneServiceParamsWithAuth(F,t.ocid,!1,$||null):h.$D.getOneServiceParamsWithoutAuth(F||t.muidFallback&&`m-${s.jG.ActivityId}`,t.ocid,!1,$||null)).forEach((e=>e.value&&U.set(e.key,e.value))),U.set("contentType",t.contentType),t.requestType===a.xd.wpoService&&function(e,t,n,r){"startgg-feeds"===e.ocid?t.set("apikey",i.xE):t.set("apikey",i.GR);(e.useDelta||e.sessionId)&&(t.set("delta","true"),e.sessionId&&t.set("session",e.sessionId));t.get("newsTop")||"channel"===s.jG.AppType||t.set("newsTop",R(e.numberOfCards)?e.numberOfCards:"48");t.get("newsSkip")||"channel"===s.jG.AppType||t.set("newsSkip","0");e.feedId||t.get("infopaneCount")||"channel"===s.jG.AppType||t.set("infopaneCount",`${R(e.infopaneCount)?e.infopaneCount:i.di}`);if(!t.get("User")){const e=t.get("userid");e?t.set("User",`m-${e}`):(t.set("User",n),null===n&&function(e,t){b.M0.sendAppErrorEvent({...T.jAy,message:"Cannot get MUID.",pb:{...T.jAy.pb,customMessage:`${e}; ProbableCause: cannot access cookie`,url:t,activityId:s.jG.ActivityId}})}("Using OneServiceUrl",r))}t.delete("user")}(t,U,F,g);if(t.feedName&&"default"!=t.feedName&&t.feedName===x){const e=S.get("gamingInterestId");if(e)U.set("query",e);else{const e=window.widget__query??t.query;U.set("query","string"==typeof e?e:"core gaming");const n=window.widget__interestIds??t.interestIds;n&&(U.delete("query"),U.set("InterestIds",n));const{pageType:i}=B;"gamingfeed-widget"===i&&U.set("wpopageid","wponoads");const r=window.widget__satoriId;"string"==typeof r&&U.set("satoriId",r)}}t.feedName===D&&(U.set("channels","true"),U.set("followersCount","true"),U.set("iff","true")),t.feedName===M&&"skype-desktop-following"===t.ocid&&U.set("renderedSegments","FollowCarousel");const n="true"===l.c.getQueryParameterByName("channels_available",window.location.href);("osmhp"===t.pageScenario&&"1s-excludefc"===t.flightData||n)&&U.set("efc","true")}const _=(t.feedName===M||t.feedName===L)&&"skype-desktop-following"!==t.ocid;if(t.feedId){const e=t.useProviderKey||_&&!t.feedId.startsWith("Y_")?"ProviderId":"InterestIds";U.set(e,t.feedId)}1===t.edgeMobile&&U.set("edgeMobile","1"),1===t.edgeMobileAds&&U.set("edgeMobileAds","1"),_&&U.set("iff","true");const H=S.get("OneSvc-Uni-Feat-Tun");H?U.set("OneSvc-Uni-Feat-Tun",H):"url"===y.Gq.get("oneSvcUniTunMode")&&U.set("OneSvc-Uni-Feat-Tun",await h.$D.getUniFeatTunHeader()),!0===t.disableContent&&U.set("disablecontent","true"),t.edgExpMask&&U.set("edgExpMask",t.edgExpMask),t.adsTimeout&&U.set("adsTimeout",t.adsTimeout.toString()),t.timeoutMs&&U.set("timeOut",t.timeoutMs.toString());const W=(0,k.Ee)();W>0&&U.set("cbypass",W.toString()),t.wpoPageId&&("wpoads"===t.wpoPageId.toLowerCase()&&"en-us"!==(null==N?void 0:N.toLowerCase())?U.set("wpopageid","wponoads"):U.set("wpopageid",t.wpoPageId)),t.wpoSchema&&U.set("wposchema",t.wpoSchema),t.newsTop&&"channel"!==s.jG.AppType&&U.set("newsTop",t.newsTop.toString()),t.newsSkip&&null==t.nextPageUrl&&"channel"!==s.jG.AppType&&U.set("newsSkip",t.newsSkip.toString()),(t.enableRightRailColumn||t.renderSingleColumn||t.renderEnterpriseSingleColumn)&&U.set("wpopageid",t.wpoPageId),t.installedWidgets&&t.installedWidgets.length&&U.set("installedWidgets",t.installedWidgets.join(",")),t.clientLayoutVersion&&U.set("clv",t.clientLayoutVersion),t.layout&&U.set("layout",t.layout),s.jG.SendFeedCallActivityIdInHeader&&U.delete("activityId"),s.jG.SendUserIdInHeader&&U.delete("User"),(0,v.N)()?t.isRetry?U.set("caller","retryForTimeout"):t.refreshType&&U.set("caller",t.refreshType):U.set("caller","ssr"),t.isDhp&&U.set("dhp","1"),t.isXFeed&&U.set("rid",t.requestId),t.private&&U.set("private","1"),t.viewportSize&&U.set("vpSize",t.viewportSize),t.apiKey&&U.set("apikey",t.apiKey),t.audienceMode&&(U.set("audienceMode",(null==O?void 0:O.audienceMode)||t.audienceMode),t.audienceMode===r.F.Kids&&n()&&(U.set("apikey",i.os),U.set("ocid",i.vy))),t.feedId&&t.feedName===M&&n()&&(U.set("ocid",i.i9),U.set("apikey",i.S1));const q=(0,I.UU)();if(t.feedName===x&&"anaheim-ntp-feeds"===t.ocid&&q&&(U.set("ocid",i.$v),U.set("apikey",i.gr)),t.enableWpoAdPlacements){const e=d.Al.ClientSettings.browser&&"true"===d.Al.ClientSettings.browser.ismobile||"phone"===d.Al.ClientSettings.deviceFormFactor?"true":"false";U.set("mobile",e);const t=(0,w.rv)()||(0,w.hI)();U.set("cookieWallPresent",t.toString())}const V=S.get("wpoitems");V&&U.set("wpoitems",V.toString());const G=S.get("bypass_trigger");G&&!t.feedId&&U.set("bypass_trigger",G.toString());const z=S.get("adppc");z&&U.set("adppc",z);const j=u.X.UpsellGamerMode&&t.feedName===x,K="prg-gmode-upsell";s.jG.ShouldUseFdheadQsp&&j?U.set("fdhead",`${t.fdhead},${K}`):s.jG.ShouldUseFdheadQsp&&t.fdhead?U.set("fdhead",t.fdhead):j&&U.set("fdhead",K),(0,P.TR)()&&U.set("prerender","1"),t.adRefreshVariant&&U.set("adRefreshVariant",t.adRefreshVariant),t.anaheimPageLayout&&U.set("anaheimPageLayout",t.anaheimPageLayout),t.gdpr&&U.set("gdpr","1"),t.verticalName&&U.set("verticalName",t.verticalName),t.freScenario&&U.set("freScenario",t.freScenario),t.freMode&&U.set("freMode",t.freMode),t.aver&&U.set("aver",t.aver),t.theme&&U.set("theme",t.theme),t.over&&U.set("over",t.over),t.oem&&U.set("oem",t.oem),t.devicetype&&U.set("devicetype",t.devicetype),t.smode&&U.set("smode",t.smode),t.usri&&U.set("usri",t.usri),t.duotone&&U.set("duotone",t.duotone.toString()),t.cardIds&&U.set("cardIds",t.cardIds),t.column&&U.set("column",t.column),t.fcl&&U.set("fcl","true"),t.layout&&U.set("layout",t.layout),t.colstatus&&U.set("colstatus",t.colstatus),t.colwidth&&U.set("colwidth",t.colwidth.toString()),t.adoffsets&&U.set("adoffsets",t.adoffsets),t.l3v&&U.set("l3v",t.l3v.toString()),"freinterests"===t.pageScenario&&(t.start&&U.set("$skip",`${t.start}`),t.count&&U.set("$top",`${t.count}`),t.InterestIds&&U.set("InterestIds",`${t.InterestIds}`)),"number"==typeof t.pageConfiguration&&U.set("pgc",t.pageConfiguration.toString());const Q=window&&window.navigator&&window.navigator.deviceMemory;Q&&"channel"!==s.jG.AppType&&U.set("memory",Q.toString());(d.Al.CurrentFlightSet.has("prg-forcenoads")||await(0,I.VS)())&&U.set("edgenoads","1");(d.Al.CurrentFlightSet.has("prg-forceredads")||await(0,I.OM)())&&U.set("edgereduceads","1"),t.anaheimLayoutPromotion&&U.set("promotion",t.anaheimLayoutPromotion),t.anaheimContentSelection&&U.set("selection",t.anaheimContentSelection),void 0!==t.backgroundImageIsSet&&U.set("backgroundImageIsSet",t.backgroundImageIsSet.toString()),void 0!==t.inEdgeFeatures&&U.set("inEdgeFeatures",t.inEdgeFeatures.toString()),t.revertTimes&&U.set("revertTimes",t.revertTimes),void 0!==t.adminDisabled&&U.set("adminDisabled",t.adminDisabled.toString()),t.pageOcid&&U.set("pageOcid",t.pageOcid),t.segment&&U.set("segment",t.segment),t.scenario&&U.set("scenario",t.scenario);const Z=d.Al.ClientSettings&&d.Al.ClientSettings.queryparams?d.Al.ClientSettings.queryparams:"",J=new c.h(Z).get("canid");J&&U.set("triggerModules","promoxfeedupsell".concat(":",J)),await async function(e,t){const n=e.feedName===M;n&&b.M0.addOrUpdateTmplProperty("following-feed","1");const i=n||"default"===e.feedName&&e.enableFREOverlayMyFeed;if("edgeChromium"===s.jG.AppType&&i&&(d.Al.EdgeNTPHeader||await A.L.isApiAvailableToUse())){var r;let n=d.Al.EdgeNTPHeader&&d.Al.EdgeNTPHeader.freSeenCount&&d.Al.EdgeNTPHeader.freSeenCount.toString();if(!n&&await A.L.isApiAvailableToUse()){const e=await A.L.getPreferenceSetting(E.nc.seen_interest_fre_count,!0);n=e&&e.value?e.value.toString():"0"}let i=null===(r=d.Al.EdgeNTPHeader)||void 0===r?void 0:r.newProfFreTime;if(!i){var o,a,c;const e=new p.o;if(null===(o=window)||void 0===o||null===(a=o.chrome)||void 0===a||null===(c=a.ntpSettingsPrivate)||void 0===c||c.getConfigData((t=>e.set(t&&t.newProfileFreSeenTime||null))),i=await e.getResultAsync(),!i){var u;let e=null===(u=d.Al.EdgeNTPHeader)||void 0===u?void 0:u.seenNewDevFre;if(void 0===e){var h,g,m,f;const t=new p.o;if(null===(h=window)||void 0===h||null===(g=h.chrome)||void 0===g||null===(m=g.ntpSettingsPrivate)||void 0===m||m.getPref(E._9.hasUserSeenNewFre,(e=>t.set(null==e?void 0:e.value))),e=await t.getResultAsync(),i=e&&(null===(f=d.Al.EdgeNTPHeader)||void 0===f?void 0:f.newDevFreTime),e&&!i){var v,y,S;const e=new p.o;null===(v=window)||void 0===v||null===(y=v.chrome)||void 0===y||null===(S=y.ntpSettingsPrivate)||void 0===S||S.getConfigData((t=>e.set(t&&t.newDeviceFreSeenTime||null))),i=await e.getResultAsync()}}}}const s=i&&Date.now()-i<864e5,C=l.c.getQueryParameterByName("firstlaunch",window.location.href);(e.doNotTriggerFREInSession||"1"===C||s)&&(n="10"),b.M0.addOrUpdateTmplProperty("freoverlay-ux","1"),(e.sendFRESeenCount&&e.enableFREOverlayMyFeed&&"default"===e.feedName||e.feedName===M&&e.sendFRESeenCount)&&t.set("overlay",n)}}(t,U);const X=l.c.getParamsWithItems(location.search);if(X){const e=X.find((e=>e.key===a.VL));if(e){const n=t.contentType?t.contentType:"article,video,slideshow",i=[...new Set(`${n},${e.value}`.split(","))];U.set("contentType",i.join(","))}const n=X.find((e=>e.key===a.Ow));n&&n.value&&U.set("installedWidgets",n.value)}const Y=new URLSearchParams((0,f.zp)()).get("feedParams");if(Y){Y.split(",").forEach((e=>{if(e.includes("=")){const[t,n]=e.split("=");U.set(t.trim(),n.trim())}}))}return U.toString()}function n(){return"channel"!==s.jG.AppType}e.requestInit=async function(e){e=e||{};const t={method:"GET"},n=await h.$D.getOneServiceFeedCallHeaders((0,S.VQ)(),e.feedName,e.useXboxAccessToken);t.headers={...n,...e.additionalHeaders},e.credentialsOverride?t.credentials=e.credentialsOverride:t.credentials="include",e.enableWpoAdPlacements&&(t.headers["ads-referer"]=location.href,t.headers["taboola-sessionId"]=e.taboolaSessionId||"init");const i=s.jG.UserId;return e.requestType!==a.xd.wpoService||i||(t.headers.MUID=s.jG.ActivityId),s.jG.SendUserIdInHeader&&(t.headers.MUID=i),t},e.buildRequestURLForOneService=async function(e){let n,r;if((e=e||{}).feedName===M)r=e.feedId?i.eK:i.ly;else r=e.pageScenario;const o=`${i.lP}${r}`;return n=new c.h((0,f.zp)()).get(i.YU)?new URL(o,i.LJ):(0,g.fU)(o),n.search=await t(n.search,e,n.href),n.searchParams.sort(),n},e.buildServiceRequestURL=async function(e){let n;e=e||{};const{CurrentRequestTargetScope:o={},ConfigServiceBaseUrl:a}=s.jG,l=new c.h((0,f.zp)());let u=e.pageScenario??(e.shouldUseNewWpoEndpoint?i.bx:i.$s);"ntp"===e.pageScenario&&e.useWebLayoutEndpoint&&(u=i.UY);let p=e.requestPathOverride?`${e.requestPathOverride}${u}`:`${i.Mo}${u}`;p=function(e){return e&&e===`${i.Mo}${i.bx}`&&d.Al&&d.Al.CurrentFlightSet&&d.Al.CurrentFlightSet.has(i.CO)&&"edgeChromium"===s.jG.AppType?`${i.hk}${i.bx}`:e}(p);const h=e.feedName&&"default"!=e.feedName;if(e.feedId||h)switch(e.feedName){case L:p=`${i.Mo}${i.Td}`;break;case M:var m,y,S;if(e.feedId)p=`${i.Mo}${i.eK}`,b.M0.addOrUpdateTmplProperty("filtered-feed","1"),(null!==(m=e.nextPageUrl)&&void 0!==m&&m.includes(i.ly)||null===(y=e.nextPageUrl)||void 0===y||!y.includes(e.feedId))&&(e.nextPageUrl="");else p=`${i.Mo}${i.ly}`,null!==(S=e.nextPageUrl)&&void 0!==S&&S.includes(i.eK)&&(e.nextPageUrl="");break;case x:p=`${i.Mo}${i.I1}`;break;case"sports":p=`${i.Mo}${i.Qn}`;break;case D:p=`${i.Mo}${D}`;break;default:p="work"===e.feedSource?`${i.Mo}${i.UW}`:`${i.Mo}${i.J8}`}e.isXFeed&&e.xFeedPageScenario&&(p=`${i.Mo}${e.xFeedPageScenario}`);const C=(0,v.N)();if(C&&["enabled","true"].includes(l.get(i.YU)))e.audienceMode===r.F.Kids||(null==o?void 0:o.audienceMode)===r.F.Kids||e.feedId?n=new URL(i.SO,i.LJ):(p=`${i.lP}${u}`,n=new URL(p,i.LJ));else if(C&&"enabled"===l.get(i.P$))n=new URL(p,a.origin);else if(function(e){return!e&&"edgeChromium"===s.jG.AppType&&s.jG.OneServiceOverride&&d.Al&&d.Al.CurrentFlightSet&&d.Al.CurrentFlightSet.has(i.IA)}(C))p=`${i.L3}${i.bx}`,n=new URL(p,s.jG.OneServiceOverride);else{const t=e.domainOverride?e.domainOverride:(0,g.qQ)().origin;n=new URL(p,t)}return n.search=await t(n.search,e,n.href),n.searchParams.sort(),n}}(F||(F={}))},91730:function(e,t,n){"use strict";n.d(t,{j:function(){return s},n:function(){return a}});var i=n(5699),r=n(291),o=n(55524);const a=(0,r.h)({getInstance:()=>o.Gq.get("__feed-card-provider__serviceRequestAuthSubscription__",(()=>new i.X))}),s={userIsSignedIn:"userIsSignedIn"}},62168:function(e,t,n){"use strict";var i,r,o,a;n.d(t,{Ow:function(){return c},Rx:function(){return a},VL:function(){return s},xd:function(){return o}}),function(e){e.activityId="x-client-activityid",e.authorization="Authorization",e.entAuthorization="Ent-Authorization",e.muid="MUID",e.adsReferer="ads-referer",e.taboolaSessionId="taboola-sessionId"}(i||(i={})),function(e){e.actionType="actionType",e.activityId="activityId",e.adsTimeout="adsTimeout",e.apiKey="apikey",e.audienceMode="audienceMode",e.aver="aver",e.bypassTrigger="bypass_trigger",e.cacheBypassQueryStringParamName="cbypass",e.channel="channel",e.channels="channels",e.cm="cm",e.complexInfoPaneEnabled="cipenabled",e.contentType="contentType",e.delta="delta",e.devicetype="devicetype",e.disableContent="disablecontent",e.dhp="dhp",e.disableTypeSerialization="DisableTypeSerialization",e.duotone="duotone",e.edgExpMask="edgExpMask",e.edgeSignalAdppc="adppc",e.gamingInterestId="gamingInterestId",e.infopaneCount="infopaneCount",e.fcl="fcl",e.fdhead="fdhead",e.feedParams="feedParams",e.feedLayoutRequestType="t",e.filter="$filter",e.followersCount="followersCount",e.ids="ids",e.infoPaneItemCount="t =InfoPane.itemCount",e.location="location",e.market="market",e.memory="memory",e.newsTop="newsTop",e.newsSkip="newsSkip",e.ocid="ocid",e.oem="oem",e.oneSvcUni="OneSvc-Uni-Feat-Tun",e.over="over",e.overlay="overlay",e.parentContentId="parent-content-id",e.parentNamespace="parent-ns",e.parentTitle="parent-title",e.queryQ="q",e.query="query",e.queryType="queryType",e.qScope="qscope",e.responseSchema="responseSchema",e.satoriId="satoriId",e.select="$select",e.session="session",e.signInCookieName="scn",e.skip="$skip",e.smode="smode",e.source="source",e.targetType="targetType",e.theme="theme",e.timeOut="timeOut",e.top="$top",e.type="type",e.User="User",e.user="user",e.userid="userid",e.usri="usri",e.wpoitems="wpoitems",e.wpoPageId="wpopageid",e.wpoSchema="wposchema",e.wrapOData="wrapodata",e.caller="caller",e.installedWidgets="installedWidgets",e.clientLayoutVersion="clv",e.pageConfiguration="pgc",e.requestId="rid",e.interestIds="InterestIds",e.providerId="ProviderId",e.includeFollowingFilters="iff",e.freScenario="freScenario",e.freMode="freMode",e.mobile="mobile",e.clientLocation="clientLocation",e.clientLocationProvider="clientLocationProvider",e.clientLocationAccuracy="clientLocationAccuracy",e.clientLocationTimeStamp="clientLocationTimeStamp",e.collectionIds="collectionIds",e.endTime="EndTime",e.eventType="EventType",e.exchangeCode="ExchangeCode",e.listIds="listIds",e.requireQuoteDetail="requireQuoteDetail",e.skipNum="skip",e.startTime="StartTime",e.topNum="top",e.prerender="prerender",e.layout="layout",e.triggerModules="triggerModules",e.promoXFeed="promoxfeedupsell",e.canid="canid",e.edgeNoAds="edgenoads",e.edgeReduceAds="edgereduceads",e.edgeMobile="edgeMobile",e.edgeMobileAds="edgeMobileAds",e.private="private",e.viewportSize="vpSize",e.removeStoryCarousel="efc",e.promotion="promotion",e.selection="selection",e.cardIds="cardIds",e.renderedSegments="renderedSegments",e.column="column",e.colstatus="colstatus",e.colwidth="colwidth",e.adoffsets="adoffsets",e.l3v="l3v",e.cookieWallPresent="cookieWallPresent",e.anaheimPageLayout="anaheimPageLayout",e.adRefreshVariant="adRefreshVariant",e.gdpr="gdpr",e.verticalName="verticalName",e.pageOcid="pageOcid",e.scenario="scenario",e.segment="segment",e.backgroundImageIsSet="backgroundImageIsSet",e.inEdgeFeatures="inEdgeFeatures",e.revertTimes="revertTimes",e.adminDisabled="adminDisabled"}(r||(r={})),function(e){e[e.oneService=0]="oneService",e[e.wpoService=1]="wpoService"}(o||(o={})),function(e){e.Bgtask="bgtask",e.Api="api",e.App="app",e.RetryFetch="retryFetch",e.Scroll="scroll"}(a||(a={}));const s="idxContentTypeOverride",c="installedWidgetsOverride"},4055:function(e,t,n){"use strict";n.d(t,{B:function(){return i}});const i={_60x60:{width:60,height:60},_82x82:{width:82,height:82},_104x84:{width:104,height:84},_141x250:{width:141,height:250},_180x88:{width:180,height:88},_203x114:{width:203,height:114},_216x114:{width:216,height:114},_220x124:{width:220,height:124},_220x178:{width:220,height:178},_238x120:{width:238,height:120},_240x129:{width:240,height:129},_240x253:{width:240,height:253},_242x144:{width:242,height:144},_242x176:{width:242,height:176},_300x156:{width:300,height:156},_300x169:{width:300,height:169},_300x174:{width:300,height:174},_300x179:{width:300,height:179},_300x180:{width:300,height:180},_300x200:{width:300,height:200},_300x225:{width:300,height:225},_300x282:{width:300,height:282},_300x304:{width:300,height:304},_300x326:{width:300,height:326},_300x462:{width:300,height:462},_306x197:{width:306,height:197},_385x225:{width:385,height:225},_362x272:{width:362,height:272},_406x304:{width:406,height:304},_486x304:{width:486,height:304},_468x304:{width:468,height:304},_604x296:{width:604,height:296},_612x304:{width:612,height:304},_612x326:{width:612,height:326},_612x328:{width:612,height:328},_612x462:{width:612,height:462},_628x372:{width:628,height:372}}},69792:function(e,t,n){"use strict";var i,r;n.d(t,{u:function(){return i},w:function(){return r}}),function(e){e[e.ALL=3]="ALL",e[e.VP=1]="VP",e[e.TTVR=2]="TTVR"}(i||(i={})),function(e){e.image="image",e.provider="provider",e.socialBar="socialBar"}(r||(r={}))},67295:function(e,t,n){"use strict";n.d(t,{C7:function(){return a},Nv:function(){return i},OO:function(){return s},X9:function(){return c},sn:function(){return o}});var i,r=n(9791);!function(e){e._halfx_2y="_.5x_2y",e._1x_1y="_1x_1y",e._1x_2y="_1x_2y",e._1x_3y="_1x_3y",e._1x_4y="_1x_4y",e._1x_5y="_1x_5y",e._2x_1y="_2x_1y",e._2x_2y="_2x_2y",e._2x_3y="_2x_3y",e._2x_4y="_2x_4y",e._2x_6y="_2x_6y",e._3x_1y="_3x_1y",e._3x_2y="_3x_2y",e._4x_1y="_4x_1y",e._4x_2y="_4x_2y",e._5x_1y="_5x_1y",e._5x_2y="_5x_2y",e._05u="0.5u",e._075u="0.75u",e._1u="1u",e._125u="1.25u",e._175u="1.75u",e._2c="_2x_2y",e._2u="_1x_4y"}(i||(i={}));const o=146,a=300,s=12,c=(0,r.Z)((e=>Array(e).fill(o)))},15778:function(e,t,n){"use strict";var i;n.d(t,{U:function(){return i}}),function(e){e.TopicFeedCard="topic-feed-card",e.articleFreCard="article-fre-card",e.autosCarouselCard="autos-carousel-card",e.autosGarageCard="autos-garage-card",e.autosMarketplaceCard="autos-marketplace-card",e.bingDailyQuizCard="bing-daily-quiz-card",e.bingThisOrThatCard="bing-this-or-that-card",e.bingVideoCarousel="bing-video-carousel",e.boostAdCard="boost-ad-card",e.cashbackCarouselCard="cashback-carousel-card",e.casualGamesCard="casual-games-card",e.casualGamesCarouselCard="casual-games-carousel-card",e.casualGamesStripeCarouselCard="casual-games-stripe-carousel-card",e.channelCarouselCard="channel-carousel-card",e.channelFilterCard="channel-filter-card",e.coldStartCard="cold-start-card",e.comicsCarouselCard="comics-carousel-card",e.communityCard="community-card",e.commuteCard="commute-card",e.companyNewsCard="company-news-card",e.contentCard="content-card",e.contentCardPreview1x="content-card-preview-1x",e.contentGroup="content-group",e.contentGroupCard="content-group-card",e.dailyFixGamesCarouselCard="daily-fix-games-carousel-card",e.denseCard="dense-card",e.digestCard="digest-card",e.displayAdCard="display-ad-card",e.donationNpoCard="donation-npo-card",e.edgeShoppingCard="edge-shopping-card",e.editorsPickCarouselCard="editors-pick-carousel-card",e.electionCard="election-card",e.electionsCard="elections-card",e.entertainmentPremierCard="entertainment-premier-card",e.esportsCard="esports-card",e.esportsStreamsCard="esports-streams-card",e.flexArticleCard="flex-article-card",e.followingFREInlineCard="following-fre-inline-card",e.gamingCompeteCard="gaming-compete-card",e.gamingGamerModeUpsellCard="gaming-gamer-mode-upsell-card",e.gamingInterestGroupCard="gaming-interest-group-card",e.gamingMatchCard="gaming-match-card",e.gamingMediaCarouselCard="gaming-media-carousel-card",e.gamingPersonalizationCard="gaming-personalization-card",e.gamingRecentlyPlayedCard="gaming-recentlyplayed-card",e.gamingRecommendedCard="gaming-recommended-card",e.gamingRedditCard="gaming-reddit-card",e.gamingRewardsCard="gaming-rewards-card",e.gamingStreamCard="gaming-stream-card",e.gamingTournamentCard="gaming-tournament-card",e.gamingUpcomingCard="gaming-upcoming-card",e.gamingVideoCard="gaming-video-card",e.groceryCouponSdCard="grocery-coupon-sd-card",e.healthArticlesCard="health-articles-card",e.healthCard="health-card",e.healthFitnessCard="health-fitness-card",e.healthRiverCard="health-river-card",e.healthTipCard="health-tip-card",e.hideStoryCard="hide-story-card",e.horoscopeAnswerCard="horoscope-card",e.hotListCard="hot-list-card",e.industryNewsCard="industry-news-card",e.infopaneCard="infopane-card",e.infopaneSlideCard="infopane-slide-card",e.interestManagementCard="interest-management-card",e.leadGenCard="lead-gen-card",e.linkedInCard="linked-in-card",e.localNewsCarCard="local-news-carousel-card",e.lotteryCard="lottery-card",e.mangaCard="manga-card",e.marketplaceCard="marketplace-card",e.microsoftFeedCard="microsoft-feed-card",e.mobileRewardsCard="mobile-rewards-card",e.mobileShoppingCard="mobile-shopping-card",e.moneyAddWatchlistCard="money-add-watchlist-card",e.moneyCard="money-card",e.moneyEdgeCard="money-edge-card",e.moneyInfoCardWC="money-info-card",e.moneyTopicStripeCarouselCard="money-topic-stripe-carousel-card",e.weatherHeroExperienceCarouselCard="weather-hero-experience-carousel-card",e.nativeAdCard="native-ad-card",e.nativeTopAdCard="native-top-ad-card",e.newsGroupsCard="news-groups-card",e.newsSegmentCarousel="news-segment-carousel",e.onThisDayCard="on-this-day-card",e.panoCard="pano-card",e.partnerUpsellCard="partner-upsell",e.perspectiveCard="perspective-card",e.placeholderCard="placeholder-card",e.pollsCard="polls-card",e.prayerTimesCard="prayer-times-card",e.prismCard="prism-card",e.prismCarouselCard="prism-carousel-card",e.profileCarouselCard="profile-carousel-card",e.promotedAdCard="promoted-ad-card",e.publisherCarouselCard="publisher-carousel-card",e.publisherListCard="publisher-list-card",e.qnaCard="qna-card",e.quizCard="quiz-card",e.realEstateCard="real-estate-card",e.recipesCard="recipes-card",e.recommendedInterestsCard="recommended-interests-card",e.recommendedSearchCarousel="recommended-search-carousel",e.recommendedSearchesCard="recommended-searches-card",e.responsiveAdCard="responsive-ad-card",e.responsiveCard="responsive-card",e.responsiveInfopaneCard="responsive-infopane-card",e.rewardsCard="rewards-card",e.rewardsDailyCheckinCard="rewards-daily-checkin-card",e.rewardsDailySetCard="rewards-daily-set-card",e.richCalendarCard="rich-calendar-card",e.sectionHeaderCard="section-header-card",e.selectCarouselCard="select-carousel-card",e.serendipityCard="serendipity-card",e.sharedHeroNewsCard="shared-hero-news-card",e.shoppingBuyingGuidePremiumCard="shopping-buying-guide-premium-card",e.shoppingCard="shopping-card",e.shoppingCarouselCard="shopping-carousel-card",e.shoppingCarouselProngWC="shopping-carousel-prong-wc",e.shoppingEventsDealCard="shopping-events-deal-card",e.shoppingFashionCarouselWC="shopping-fashion-carousel-wc",e.shoppingSdCard="shopping-sd-card",e.shoppingVideoCarouselCard="shopping-video-carousel-card",e.sportsCard="sports-card",e.sportsOlympicCard="sports-olympic-card",e.sportsTopicStripeCarouselCard="sports-topic-stripe-carousel-card",e.sportsWorldCupCard="sports-worldcup-card",e.spotlightCard="spotlight-card",e.superListCard="super-list-card",e.superappUpsellCard="superapp-upsell-card",e.tabbedFeedCard="tabbed-feed-card",e.tabbedInfopaneCard="tabbed-infopane-card",e.topPicksCard="top-picks-card",e.topSitesCard="top-sites-card",e.topStoriesCard="top-stories-card",e.trafficCard="traffic-card",e.trafficHero="traffic-hero",e.travelArticleCard="travel-article-card",e.travelDestinationCard="travel-destination-card",e.travelDestinationCarouselCard="travel-destination-carousel-card",e.trendingNowCard="trending-now-card",e.trendingSearchCard="trending-search-card",e.trendingTopicsCard="trending-topics-card",e.videoCard="video-card",e.videoShoppingCard="video-shopping-card",e.videoShoppingCarouselCard="video-shopping-carousel-card",e.weatherCard="weather-card",e.webContentCard="web-content-card",e.widgetPlaceholderCard="widget-placeholder-card",e.widgetsNotificationsCard="widgets-notifications-card",e.winAppCard="win-app-card"}(i||(i={}))},43879:function(e,t,n){"use strict";n.d(t,{J:function(){return At},Q:function(){return Et}});var i=n(15778),r=n(37477),o=n(76187);const{TopicFeedCard:a,articleFreCard:s,autosCarouselCard:c,autosGarageCard:d,autosMarketplaceCard:l,bingDailyQuizCard:u,bingThisOrThatCard:p,bingVideoCarousel:h,boostAdCard:g,cashbackCarouselCard:m,casualGamesCard:f,casualGamesCarouselCard:v,casualGamesStripeCarouselCard:y,channelCarouselCard:S,channelFilterCard:C,comicsCarouselCard:w,communityCard:b,commuteCard:T,companyNewsCard:k,contentCard:P,contentGroupCard:I,dailyFixGamesCarouselCard:A,denseCard:E,digestCard:x,donationNpoCard:M,editorsPickCarouselCard:L,electionCard:D,electionsCard:R,entertainmentPremierCard:F,esportsCard:O,esportsStreamsCard:B,followingFREInlineCard:N,gamingCompeteCard:$,gamingGamerModeUpsellCard:U,gamingInterestGroupCard:_,gamingMatchCard:H,gamingMediaCarouselCard:W,gamingPersonalizationCard:q,gamingRecentlyPlayedCard:V,gamingRecommendedCard:G,gamingRedditCard:z,gamingRewardsCard:j,gamingStreamCard:K,gamingTournamentCard:Q,gamingUpcomingCard:Z,groceryCouponSdCard:J,healthCard:X,healthFitnessCard:Y,healthRiverCard:ee,healthTipCard:te,horoscopeAnswerCard:ne,industryNewsCard:ie,infopaneCard:re,interestManagementCard:oe,localNewsCarCard:ae,lotteryCard:se,mangaCard:ce,marketplaceCard:de,microsoftFeedCard:le,mobileRewardsCard:ue,mobileShoppingCard:pe,moneyCard:he,moneyInfoCardWC:ge,moneyTopicStripeCarouselCard:me,weatherHeroExperienceCarouselCard:fe,nativeAdCard:ve,nativeTopAdCard:ye,newsGroupsCard:Se,newsSegmentCarousel:Ce,onThisDayCard:we,partnerUpsellCard:be,placeholderCard:Te,pollsCard:ke,prayerTimesCard:Pe,prismCard:Ie,prismCarouselCard:Ae,profileCarouselCard:Ee,promotedAdCard:xe,publisherCarouselCard:Me,publisherListCard:Le,qnaCard:De,quizCard:Re,realEstateCard:Fe,recipesCard:Oe,recommendedInterestsCard:Be,recommendedSearchCarousel:Ne,recommendedSearchesCard:$e,rewardsCard:Ue,rewardsDailyCheckinCard:_e,rewardsDailySetCard:He,richCalendarCard:We,sectionHeaderCard:qe,selectCarouselCard:Ve,serendipityCard:Ge,sharedHeroNewsCard:ze,shoppingBuyingGuidePremiumCard:je,shoppingCard:Ke,shoppingCarouselCard:Qe,shoppingCarouselProngWC:Ze,shoppingEventsDealCard:Je,shoppingFashionCarouselWC:Xe,shoppingSdCard:Ye,shoppingVideoCarouselCard:et,sportsCard:tt,sportsOlympicCard:nt,sportsTopicStripeCarouselCard:it,sportsWorldCupCard:rt,spotlightCard:ot,superListCard:at,tabbedFeedCard:st,tabbedInfopaneCard:ct,topPicksCard:dt,topStoriesCard:lt,trafficCard:ut,trafficHero:pt,travelArticleCard:ht,travelDestinationCard:gt,travelDestinationCarouselCard:mt,trendingNowCard:ft,trendingSearchCard:vt,trendingTopicsCard:yt,videoShoppingCard:St,videoShoppingCarouselCard:Ct,weatherCard:wt,webContentCard:bt,widgetPlaceholderCard:Tt,widgetsNotificationsCard:kt,winAppCard:Pt,leadGenCard:It}=i.U,At={[r.PL.AutosGarageCard]:d,[r.PL.WidgetsNotificationsCard]:kt,[r.PL.DonationNpoCard]:M,[r.PL.EntertainmentPremierCard]:F,[r.PL.EventSDCardOscarsPrm]:F,[r.PL.BingThisOrThatCard]:p,[r.PL.BingDailyQuizCard]:u,[r.PL.GamingGamerModeUpsellCard]:U,[r.PL.RewardsDailyCheckinCard]:_e,[r.PL.EventSDCardElectionMIT1]:D,[r.PL.EventSDCardElectionMIT2]:D,[r.PL.EventSDCardElectionMIT3]:D,[r.PL.RichCalendarCard]:We,[r.PL.CommunityCard]:b,[r.PL.MobileRewardsCard]:ue,[r.PL.TabbedInfopaneCard]:ct,[r.PL.MangaCard]:ce,[r.PL.MobileShoppingCard]:pe,[r.PL.MobileShoppingCard2]:pe,[r.PL.MobileShoppingCard3]:pe,[r.PL.MobileShoppingCard4]:pe,[r.PL.VideoShoppingCard]:St,[r.PL.VideoShoppingCarouselCard]:Ct,[r.PL.SuperListCard]:at,[r.PL.RealEstateCard]:Fe,[r.PL.PrismCarouselCard]:Ae,[r.PL.PrayerTimesCard]:Pe,[r.PL.TrendingSearchCard]:vt,[r.PL.CommuteCard]:T,[r.PL.DigestCard]:x,[r.PL.Article]:P,[r.PL.Slideshow]:P,[r.PL.Video]:P,[r.PL.Infopane]:re,[r.PL.LeadGenCard]:It,[r.PL.PartnerUpsell]:be,[r.PL.GroupedContent]:I,[r.PL.UserInterestTopic]:I,[r.PL.UserInterestNTPProvider]:I,[r.PL.UserInterestTopicAndProvider]:N,[r.PL.ColdStartArticleFreCard]:s,[r.PL.HalfPane]:null,[r.PL.HeadToHead]:null,[r.PL.Mosaic]:null,[r.PL.Triptych]:null,[r.PL.DenseList]:null,[r.PL.WebContent]:bt,[r.PL.ExternalLink]:null,[r.PL.TabbedInfopane]:null,[r.PL.TabbedInfopaneTab]:null,[r.PL.PlaceholderCard]:Te,[r.PL.BingHealthCovid19StatsCard]:X,[r.PL.BingHealthFitnessCard]:Y,[r.PL.HealthTipCard]:te,[r.PL.HealthRiverCard]:ee,[r.PL.AutosCarousel]:c,[r.PL.AutosEntityList]:l,[r.PL.BingVideoCarousel]:h,[r.PL.CashbackAds]:m,[r.PL.CasualGamesCarousel]:v,[r.PL.CasualGamesStripeCarousel]:y,[r.PL.ChannelCarousel]:S,[r.PL.ChannelFilterCard]:C,[r.PL.TabbedFeedCard]:st,[r.PL.EsportsMatch]:O,[r.PL.EsportsCasualGames]:f,[r.PL.EsportsLiveStream]:B,[r.PL.GamingClip]:K,[r.PL.GamingClipsCarousel]:W,[r.PL.GamingHighlightClipsCarousel]:W,[r.PL.GamingCompete]:$,[r.PL.GamingHighlight]:K,[r.PL.GamingHighlightsCarousel]:W,[r.PL.GamingInterestGroup]:_,[r.PL.GamingLiveStream]:K,[r.PL.GamingLiveStreamCarousel]:W,[r.PL.GamingMatch]:H,[r.PL.GamingPersonalize]:q,[r.PL.GamingRecentlyPlayed]:V,[r.PL.GamingRecommendedGames]:G,[r.PL.GamingReddit]:z,[r.PL.GamingRewards]:j,[r.PL.GamingTournament]:Q,[r.PL.GamingUpcomingGames]:Z,[r.PL.GamingVideoCarousel]:W,[r.PL.GamingVod]:K,[r.PL.GroceryCouponSdCard]:J,[r.PL.StockQuote]:he,[r.PL.MoneyInfo]:ge,[r.PL.FinanceHeroMarket]:ge,[r.PL.FinanceHeroNews]:ze,[r.PL.FinanceHeroMovers]:ge,[r.PL.FinanceHerowlsummary]:ge,[r.PL.FinanceHeroSuggested]:ge,[r.PL.FinanceHeroWatchlistIdeas]:ge,[r.PL.FinanceHeroUpcomingEarnings]:ge,[r.PL.FinanceHeroCurrencies]:ge,[r.PL.FinanceHeroCrypto]:ge,[r.PL.MoneyTopicStripe]:me,[r.PL.WeatherHero]:fe,[r.PL.SportsTopicStripe]:it,[r.PL.MoneyPreWL]:ge,[r.PL.MoneyCrypto]:ge,[r.PL.MoneyMarketBrief]:ge,[r.PL.MoneyMoreForYouCard]:ge,[r.PL.SportsMatch]:tt,[r.PL.SportsOlympics]:nt,[r.PL.SportsHeroFre]:tt,[r.PL.SportsHeroMatchStatistics]:tt,[r.PL.SportsHeroNews]:ze,[r.PL.SportsHeroSeasonStatistics]:tt,[r.PL.SportsHeroStandingsRankings]:tt,[r.PL.SportsHeroTeamVsTeam]:tt,[r.PL.SportsHeroVideo]:tt,[r.PL.EventSDCardSportsMIT1]:tt,[r.PL.EventSDCardSportsMIT2]:tt,[r.PL.EventSDCardSportsMIT3]:tt,[r.PL.EventSDCardWorldCup]:rt,[r.PL.EventSDCardWorldCup2]:rt,[r.PL.MyBriefRiverCard]:dt,[r.PL.TrafficDelays]:ut,[r.PL.TrafficInfo]:ut,[r.PL.Transit]:ut,[r.PL.TrafficIncidents]:pt,[r.PL.TrafficCameras]:pt,[r.PL.TrafficCamerasWithSummary]:pt,[r.PL.TravelTimesWithSummary]:pt,[r.PL.TrafficMap]:pt,[r.PL.TrafficNews]:pt,[r.PL.WeatherSummary]:wt,[r.PL.ShoppingCard]:Ye,[r.PL.EdgeShoppingCard]:Qe,[r.PL.ShoppingCarousel]:Qe,[r.PL.ShoppingVideoCarousel]:et,[r.PL.ShoppingRiver]:Qe,[r.PL.EventSDCardShopping]:Je,[r.PL.ComicsCarousel]:w,[r.PL.SelectCarousel]:Ve,[r.PL.EditorsPickCarousel]:L,[r.PL.DailyFixGamesCarousel]:A,[r.PL.SageGroupedFeed]:x,[r.PL.TopicFeed]:a,[r.PL.NewsSegmentCarousel]:Ce,[r.PL.ShoppingProng2c]:je,[r.PL.ShoppingMerchantCategoryDeals]:Ke,[r.PL.ShoppingProngCardResponse]:Ze,[r.PL.ShoppingProngCarousel]:Xe,[r.PL.SectionHeader]:qe,[r.PL.TrendingInTenMinutes]:ft,[r.PL.TopicFeedTrendingNow]:ft,[r.PL.TopicFeedTopStories]:ft,[r.PL.TrendingTopics]:yt,[r.PL.TopStories]:lt,[r.PL.WorkHeadlines]:lt,[r.PL.Trending]:Ge,[r.PL.Horoscope]:ne,[r.PL.Elections]:R,[r.PL.RecommendedInterests]:Be,[r.PL.RecommendedSearchCarousel]:Ne,[r.PL.RecommendedSearchesCard]:$e,[r.PL.OnThisDay]:we,[r.PL.Lottery]:se,[r.PL.Dense]:E,[r.PL.Qna]:De,[r.PL.quizcard]:Re,[r.PL.Recipes]:Oe,[r.PL.Inspiration]:Ie,[r.PL.InterestManagementCard]:oe,[r.PL.Rewards]:Ue,[r.PL.SubscriptionCarousel]:Me,[r.PL.TravelArticleCard]:ht,[r.PL.TravelDestinationCard]:gt,[r.PL.TravelDestinationCarouselCard]:mt,[r.PL.LocalNews]:at,[r.PL.LocalNewsFeed]:ae,[r.PL.BeaconProviderUpsell]:Ee,[r.PL.Marketplace]:de,[r.PL.MarketplaceEvent]:de,[r.PL.PollsCard]:ke,[r.PL.PromotedAd]:xe,[r.PL.NewsGroups]:Se,[r.PL.NewsAnswerModule]:Se,[r.PL.TopicFeedDiversity]:x,[r.PL.TopicFeedLearnSomethingNew]:x,[r.PL.TopicFeedWeekends]:x,[r.PL.TopicFeedMomentInTime1]:ot,[r.PL.TopicFeedShopping]:ot,[r.PL.TopicFeedWeather]:ot,[r.PL.WinAppAds]:Pt,[r.PL.NativeAd]:ve,[r.PL.CmsAd]:ve,[r.PL.FirstPartyAd]:ve,[r.PL.AmplifyAd]:ve,[r.PL.EventSDCardAmplifyAds]:ve,[r.PL.NativeTopAd]:ye,[r.PL.BoostAd]:g,[r.PL.Promotion]:m,[r.PL.IndustryNewsCard]:ie,[r.PL.MicrosoftFeedCard]:le,[r.PL.CompanyNewsCard]:k,[r.PL.Calendar]:Tt,[r.PL.Entertainment]:Tt,[r.PL.Family]:Tt,[r.PL.M365]:Tt,[r.PL.Photos]:Tt,[r.PL.ThirdPartyWidget]:Tt,[r.PL.Tips]:Tt,[r.PL.ToDo]:Tt,[r.PL.XboxGamePass]:Tt,[r.PL.Tombstone]:Tt,[r.PL.RewardsDailySet]:He,[r.PL.UserInterestProvider]:Le},Et=(0,o.p)((()=>{const e=new xt;for(const[t,n]of Object.entries(At))e.set(t,n);return e}));class xt extends Map{set(e,t){return super.set(e.toLowerCase(),t)}get(e){return super.get(e.toLowerCase())}}},8076:function(e,t,n){"use strict";n.d(t,{Ae:function(){return l},UN:function(){return u},Xh:function(){return s},i2:function(){return c},ji:function(){return h},lP:function(){return g},wZ:function(){return p}});var i=n(32614),r=n(37477),o=n(23549),a=n(40378);new(n(95153).fH),new Map;function s(e){try{const t=new Date(e),n=(new Date).getTime()-t.getTime();return Math.ceil(n/864e5)>3}catch(e){return!0}}function c(e,t,n,r){if(!e)return{logoImage:"",name:void 0};const o=r??16;let s="";const c={width:o,height:o,enableDpiScaling:!1,quality:100,format:i.D3.PNG};!t&&e.logo&&e.logo.id?s=(0,i.zz)(e.logo.id,c):(e.logoUrl||e.logo&&e.logo.url)&&(s=(0,i.mL)(e.logoUrl||e.logo.url,c));const l={logoImage:s,id:e.id,name:e.name,profileId:e.profileId};return n&&(l.immersiveCardSvgLogo=d(n,e.darkThemeSVGLogo),l.svgLogo=(0,a.Y)()?l.immersiveCardSvgLogo:d(n,e.lightThemeSVGLogo)),l}function d(e,t){if(!t)return t;const n=t.width&&t.height?e*t.width/t.height:void 0;return{url:t.url,height:e,width:n}}function l(e){var t,n,i,r,o,a,s;if(null!=e&&null!==(t=e.cardContent)&&void 0!==t&&t.isPanoCard&&1==(null==e||null===(n=e.cardContent)||void 0===n?void 0:n.panocardType))e.cardContent.images=[{url:null===(i=e.cardContent)||void 0===i||null===(r=i.panoCaption)||void 0===r||null===(o=r.thumbnail)||void 0===o?void 0:o.url,title:null===(a=e.cardContent)||void 0===a||null===(s=a.panoCaption)||void 0===s?void 0:s.title,width:2e3,height:3e3}];else if(!(e&&e.cardContent&&e.cardContent.images&&e.cardContent.images.length&&e.cardContent.images[0]&&e.cardContent.images[0].url)){var c,d;return null!=e&&null!==(c=e.cardContent)&&void 0!==c&&c.isPanoCard&&2==(null==e||null===(d=e.cardContent)||void 0===d?void 0:d.panocardType)&&(e.cardContent.isPanoCard=!1,e.cardContent.panoCaption=null),null}return e.cardContent.images[0]}function u(e){return e&&e.images&&e.images.length&&e.images[0]&&e.images[0].url?e.images[0]:null}function p(e,t){var n,i,o;const{type:a,cardContent:s}=e;return t&&a==r.PL.Article&&s&&(null==s||null===(n=s.panoCaption)||void 0===n||null===(i=n.publishers)||void 0===i?void 0:i.length)&&(null==s||null===(o=s.panoCaption)||void 0===o?void 0:o.eventId)}function h(e,t){null==t||t.preventDefault(),e&&e.panoCaption&&window.open(e.panoCaption.destinationUrl.toString(),"_blank"),null!=t&&t.currentTarget&&(t.currentTarget.classList.add("clicked"),o.M0.sendActionEvent(null==t?void 0:t.currentTarget))}function g(e,t){e.panoCaption.articleDestinationUrl&&(e&&e.panoCaption&&window.open(e.panoCaption.articleDestinationUrl.toString(),"_blank"),o.M0.sendActionEvent(null==t?void 0:t.currentTarget))}},2186:function(e,t,n){"use strict";n.d(t,{PA:function(){return f},yg:function(){return y}});var i=n(21789),r=n(857),o=n(88826),a=n(7476),s=n(85205),c=n(37477),d=n(29458),l=n(87697),u=n(31983),p=n(67044),h=n(23549),g=n(55524),m=n(291);const f={followingChannelsUpdated:"femFollowingUpdated",recommendedChannelsUpdated:"femRecommendedUpdated",showFallbackFeed:"showFallbackFeed",hideFallbackFeed:"hideFallbackFeed"};class v{constructor(){this.currentFeedId="",this.overrideFeedConfig=null,this.feedManager=null,this.channels=[],this.prevChannelStoreFollows=[],this.isProng2=()=>i.jG.isWindowsDashboard,this.isWinHP=()=>"windows"===i.jG.AppType,this.isNTP=()=>"edgeChromium"===i.jG.AppType,this.isCanvasSupported=()=>this.isProng2()||this.isWinHP()||this.isNTP(),this.transformResponse=(e,t)=>{if(e){var n,i,r;const s=null===(n=e.regions)||void 0===n?void 0:n.filter((e=>"river"===e.region)),d=s&&s.length&&s[0]&&s[0].sections,{type:l}=(null==d||null===(i=d[0])||void 0===i||null===(r=i.cards)||void 0===r?void 0:r[0])||{};var o,a;if(l===c.PL.ChannelFilterCard||t&&l===c.PL.ChannelCarousel)return null==s||null===(o=s[0])||void 0===o||null===(a=o.sections)||void 0===a||a.shift(),!0}return!1},this.fetchChannelFilter=async(e,t)=>{const n=!(null!=t&&t.fcl),i=await(this.isProng2()?this.fetchFromWindowsCardProvider(t):this.fetchFromWpoCardProvider(t,n));if(!i)return void(0,o.H)(a.nZQ,`Failed to load filtered channels for ${e}.`);const r=this.getCardsFromResponse(i)[0];var s;if(!r||r.type===c.PL.ChannelFilterCard)return h.M0.addOrUpdateTmplProperty("numberOfFollowedChannels",(null==r||null===(s=r.subCards)||void 0===s?void 0:s.length.toString())||"0"),r||{};r.type!==c.PL.ChannelCarousel&&(0,o.H)(a.k2Y,"The first card of filtered following channels response is not Channel Filter or Channel Carousel",`{ debugID: ${i.debugId}, nextPageUrl: ${i.nextPageUrl}, sections: ${JSON.stringify(i.sections)} }`)},this.fetchPublishers=async()=>{try{var e;const t=await(null===(e=this.publisherServiceClient)||void 0===e?void 0:e.getUserFollowedSources());if(null!=t&&t.length)return t}catch(e){(0,o.H)(a.T4Y,"Failed to fetch publisher metadata",`{${e}}`)}},this.fetchChannel=async({id:e})=>{const t={feedId:e};return this.isProng2()?this.fetchFromWindowsCardProvider(t):this.fetchFromWpoCardProvider(t)},this.mapChannel=(e,t)=>{var n,i,r,o,a,s;const c=["InterestChannel","InterestFeed"].includes(e.type);return{id:c?null==e||null===(n=e.feed)||void 0===n?void 0:n.id:null==e||null===(i=e.provider)||void 0===i?void 0:i.id,imgSrc:(null===(r=e.images)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.url)||"",title:c?null==e||null===(a=e.feed)||void 0===a?void 0:a.feedName:null==e||null===(s=e.provider)||void 0===s?void 0:s.name,isFollowing:!0,isTopic:c,index:t,providerProfileId:!c&&e.provider&&e.provider.profileId}},this.getCardsFromResponse=e=>{var t,n;if(!e)return[];const i=null===(t=e.sections)||void 0===t?void 0:t.filter((e=>"river"===e.region)),r=i&&i.length?i:e.sections,{cards:o=[],subSections:a}=r&&r.length&&r[0]||{};return(a?null===(n=a[0])||void 0===n?void 0:n.cards:o)||[]},this.fetchFromWindowsCardProvider=(e={})=>{const t={contextSource:"winWidgets",count:12,feedId:"",isXfeed:!0,ocid:"winp2",useRawJson:!0,pivotId:"Following",...e};return(new d.X).fetch(t)},this.fetchFromWpoCardProvider=(e={},t=!0)=>{const n={ocid:(0,r.ku)(),timeoutMs:2e3,feedName:"following",requestId:h.M0.getRequestId(),shouldUseNewWpoEndpoint:!0,wpoSchema:"byregion",...e};return new l.fy({initialRequest:{timeoutMs:2e3}},!1).fetchFromWpoService(n,t)},this.resetChannelFeedId=()=>{this.currentFeedId=""},this.setChannelFeed=async e=>{if(e!==this.currentFeedId&&(e||this.currentFeedId))if(this.currentFeedId=e,this.overrideFeedConfig)this.overrideFeedConfig((t=>{var n;return null!==(n=t.riverSectionCardProviderConfig)&&void 0!==n&&n.initialRequest&&(t.riverSectionCardProviderConfig.initialRequest.feedName="following",t.riverSectionCardProviderConfig.initialRequest.feedId=e,t.riverSectionCardProviderConfig.initialRequest.isXFeed=!0,t.riverSectionCardProviderConfig.initialRequest.timeoutMs=3e3),t}));else if(this.feedManager){const t=this.isProng2()?"Following":"following",n=this.isProng2()?"winWidgets":"",i={isXFeed:!0,feedId:e,pivotId:t,contextSource:n};await this.feedManager.callRefreshRegionsData(i)}},this.setFeedConfigOverrider=e=>{this.overrideFeedConfig=e},this.setFeedManager=e=>{this.feedManager=e},this.setChannels=e=>{this.channels=e,window.dispatchEvent(new CustomEvent(f.followingChannelsUpdated))},this.setChannelsRecommendations=e=>{this.channels=e,window.dispatchEvent(new CustomEvent(f.recommendedChannelsUpdated))},this.isProviderChannel=e=>this.channels.some((({id:t,isTopic:n})=>e===t&&!n)),this.showFallbackFeed=()=>{window.dispatchEvent(new CustomEvent(f.showFallbackFeed))},this.hideFallbackFeed=()=>{window.dispatchEvent(new CustomEvent(f.hideFallbackFeed))},this.isFeedFetching=()=>this.feedManager&&this.feedManager.isFeedFetching()}static getInstance(){return g.Gq.get("__FollowingExperienceManager__",(()=>new v))}initializeServiceClients(){this.topicsDataConnector||(this.topicsDataConnector=(0,p.K0)(s.z.TopicData)),this.publisherServiceClient||(this.publisherServiceClient=this.publisherServiceClient||new u.PublisherServiceClient(window.fetch.bind(window),!1)),this.topicsDataConnector||(0,o.H)(a.T4K,"Topic Data Connector is not defined in ChannelFilterCard WCE.")}}const y=(0,m.h)(v)},20434:function(e,t,n){"use strict";n.d(t,{l:function(){return c}});var i=n(38869),r=n(88826),o=n(7476),a=n(13334),s=n(31558);function c(e){const{debugId:t,fdHead:n,fdFlightingVersion:c,requestHeaderMuid:l}=e||{},{CurrentFlightSet:u,ClientSettings:p}=a.Al;if(!(0,s.N)()||!u||u.size<1||!p||!(0,i.g)(5))return;const{requestMuid:h,requestTrailInfo:g}=p,m=null==g?void 0:g.flightVersion,f=null==h?void 0:h.toLowerCase(),v=null==l?void 0:l.replace(/-/g,"").toLowerCase();f&&v&&v!==f&&(0,r.H)(o.Zdq,"Muid mismatch between PCS and 1S",void 0,{pcsMuid:f,oneServiceMuid:v});const y=n&&n.toLocaleLowerCase().split(",");if(!y)return;const S={prg1sFlights:[],prg1swFlights:[],prgOnlyFlights:[],oneSFlights:[]};for(const e of u)y.includes(e)||d(e,S);const C={prg1sFlights:[],prg1swFlights:[],prgOnlyFlights:[],oneSFlights:[]};y.forEach((e=>{u.has(e)||d(e,C)}));const{prg1sFlights:w=[],prg1swFlights:b,prgOnlyFlights:T,oneSFlights:k}=C,{prg1sFlights:P,prg1swFlights:I,prgOnlyFlights:A,oneSFlights:E}=S,x={pcsFlightBlobVersion:m,oneServicefdHeadVersion:c,pcsMuid:f,oneServiceMuid:v,oneServiceDebugId:t};(w.length>0||P.length>0)&&(0,r.H)(o.jcj,"prg-1s-* flight mismatch between PCS and 1S",void 0,{flightNotPresentInPcs:w,flightNotPresentIn1S:P,commonProps:x}),(b.length>0||I.length>0)&&(0,r.H)(o.tNY,"prg-1sw-* flight mismatch between PCS and 1S",void 0,{flightNotPresentInPcs:b,flightNotPresentIn1S:I,commonProps:x}),(T.length>0||A.length>0)&&(0,r.H)(o.qjh,"prg-* flight mismatch excluding prg-1s-* and prg-1sw-* between PCS and 1S",void 0,{flightNotPresentInPcs:T,flightNotPresentIn1S:A,commonProps:x}),(k.length>0||E.length>0)&&(0,r.H)(o.KzD,"1s-* flight mismatch between PCS and 1S",void 0,{flightNotPresentInPcs:k,flightNotPresentIn1S:E,commonProps:x})}function d(e,t){e&&(e.startsWith("1s-")?t.oneSFlights.push(e):e.startsWith("prg-")&&(e.startsWith("prg-1sw")?t.prg1swFlights.push(e):e.startsWith("prg-1s")?t.prg1sFlights.push(e):t.prgOnlyFlights.push(e)))}},21789:function(e,t,n){"use strict";n.d(t,{Vh:function(){return U},jG:function(){return H},Yq:function(){return _}});var i,r,o,a=n(92095),s=n(46986),c=n(83102),d=n(48587),l=n(7476),u=n(10754),p=n(75592);!function(e){e.WWW="www",e.MicrosoftStart="microsoftstart",e.INT="int",e.INT1="int1",e.MicrosoftStartINT="microsoftstart-int",e.MicrosoftStartINT1="microsoftstart-int1"}(i||(i={})),function(e){e.MSN="msn",e.MicrosoftStart="microsoftstart"}(r||(r={})),function(e){e.COM="com",e.CN="cn"}(o||(o={}));var h,g=n(99035),m=n(23357);!function(e){e.getHostPageFromUrl=function(e){if(!e)return;const t=new URL(e),n=t.hostname,i=t.pathname.split("/"),r=(n.match(/[^.]+\.[^.\d]+$/)||{})[0]||"";if(i.length<=m.Qw)return{originalUrl:e,categoryKey:null,verticalKey:null,hostName:n,topDomain:r};const o=5===i[1].length&&2===i[1].split("-").length?1:0,a={originalUrl:e,categoryKey:i[2+o],verticalKey:i[1+o],hostName:n,topDomain:r};return i.length>=m.Qw&&(a.subcategoryKey=i[3+o]),a}}(h||(h={}));var f,v,y=n(31558),S=n(78672),C=n(55524),w=n(291),b=n(95815);!function(e){e.Anon="ANON",e.AppAnon="APP_ANON",e.Unknown=""}(f||(f={})),function(e){e.AnonCookieExists="ace",e.AppAnonCookieExists="aace"}(v||(v={}));var T=n(37413),k=n(34832),P=n(57042);var I,A=n(36941),E=n(52681);!function(e){e.prod="prod",e.prodssr="prod-ssr",e.staging="staging",e.int1="int1",e.int="int",e.intpr="intpr",e.intperf="intperf"}(I||(I={}));var x=n(7653),M=n(92100),L=n(22140),D=n(65505),R=n(23979),F=n(13334);var O=n(79022),B=n(49595),N=n(82530);const $="__AppEnvironmentInstance__";class U{get ShouldUseFdheadQsp(){return this.shouldUseFdheadQsp}set ShouldUseFdheadQsp(e){this.shouldUseFdheadQsp=e}get DisableInMemoryCache(){return!!this.disableInMemoryCache}set DisableInMemoryCache(e){this.disableInMemoryCache=e}get OneServiceContentMarketQspKey(){return this.oneServiceContentMarketQspKey}get Ecasession(){return void 0===this.ecasession&&(this.ecasession=(0,b.ej)("ecasession")||"init"),this.ecasession}get BrowserOptOut(){return void 0===this.browserOptOut&&(this.browserOptOut="1"===(0,b.ej)("TOptOut")),this.browserOptOut}get isMobile(){var e,t;const n=(null===F.Al||void 0===F.Al||null===(e=F.Al.ClientSettings)||void 0===e?void 0:e.ocid)||"",i=(null===F.Al||void 0===F.Al||null===(t=F.Al.ClientSettings)||void 0===t?void 0:t.deviceFormFactor)||"";return n.startsWith("msnaroverlay")||"phone"===i}get isMiniProgram(){var e;const t=F.Al.ClientSettings||{ocid:"",deviceFormFactor:""},n=(0,y.N)()?"weatherminiprogram"===t.ocid||((null===(e=navigator)||void 0===e?void 0:e.userAgent)||"").indexOf("miniProgram")>-1:"weatherminiprogram"===t.ocid;return"phone"===t.deviceFormFactor&&n}get isOverlayFrame(){var e;return((null===F.Al||void 0===F.Al||null===(e=F.Al.ClientSettings)||void 0===e?void 0:e.ocid)||"").startsWith("msnaroverlay")}get ActivityId(){return this.activityId}set ActivityId(e){this.activityId=e,F.Al.ClientSettings={...F.Al.ClientSettings,aid:e}}get FrontDoorMuid(){return this.frontDoorMuid}get EnvironmentConfigUrl(){const e=new URL("",this.environmentConfigUrl);"dev"===new URLSearchParams((0,S.zp)()).get("env")&&e.searchParams.set("env.config","dev");const t=new URLSearchParams((0,S.zp)()).get("env.config");return t&&e.searchParams.set("env.config",t),e}get ContentServiceUrlBase(){const e=new URL("",this.contentServiceUrlBase);"dev"===new URLSearchParams((0,S.zp)()).get("env")&&e.searchParams.set("env.content","dev");const t=new URLSearchParams((0,S.zp)()).get("env.content");return t&&e.searchParams.set("env.content",t),e}get CurrentRequestTargetScope(){return this.currentRequestTargetScope}set CurrentRequestTargetScope(e){this.currentRequestTargetScope=e}get LocaleContentMarket(){var e,t,n;return(0,A.H)(F.Al.ClientSettings&&F.Al.ClientSettings.locale)||(null===(e=this.currentRequestTargetScope)||void 0===e||null===(t=e.locale)||void 0===t?void 0:t.content)||(null===(n=this.currentRequestTargetScope)||void 0===n?void 0:n.locale)}get LocaleDisplayLanguage(){return(0,A.H)(F.Al.ClientSettings&&F.Al.ClientSettings.locale,!0)||this.LocaleContentMarket}get LocaleContentMarketString(){const e=this.LocaleContentMarket;return e&&e.language&&e.market?(0,A.p)(e):""}get LocaleDisplayLanguageString(){const e=this.LocaleDisplayLanguage;return e&&e.language&&e.market?(0,A.p)(e):""}get SourceUrl(){let e=H.HostPage.originalUrl;const t=H.CurrentRequestTargetScope.pageType,n=H.HostPage.verticalKey;if("localhost.msn.com"===H.HostPage.hostName&&"ntp"===t)return e="https://ntp.msn.com/edge/ntp",e;if(t&&n){const i=t.toLowerCase();(i.indexOf("dhp")>-1||i.indexOf("ntp")>-1)&&(e="https://"+H.HostPage.hostName+"/"+n+"/"+t)}return e}get CurrentMarket(){return this.currentMarket}set CurrentMarket(e){this.currentMarket=e}get EnableFiveColLayout(){return this.enableFiveColLayout}set EnableFiveColLayout(e){this.enableFiveColLayout=e}get Environment(){return this.environment}set Environment(e){this.environment=e}get StaticDomain(){return this.staticDomain}get HostPage(){return this.hostPage}set HostPage(e){this.hostPage=e}get AppType(){return this.appType}get AuthCookieName(){return this.authCookieName}set AuthCookieName(e){this.authCookieName=e}get UseAuthFetch(){return this.useAuthFetch}set UseAuthFetch(e){this.useAuthFetch=e}get AccountInfoPromise(){return this.accountInfoPromise}set AccountInfoPromise(e){this.accountInfoPromise=e}get ResolvedAccountInfo(){return this.resolvedAccountInfo}set ResolvedAccountInfo(e){this.resolvedAccountInfo=e}get BuildVersion(){return this.buildVersion||""}get ClarityEnabled(){return this.clarityEnabled}set ClarityEnabled(e){this.clarityEnabled=e}get IsWinAADUser(){return this.isWinAADUser}set IsWinAADUser(e){this.isWinAADUser=e}get RootTelemetryId(){return this.rootTelemetryId}set RootTelemetryId(e){this.rootTelemetryId=e}get TrackInfo(){return this.trackInfo}set TrackInfo(e){this.trackInfo=e}get UserId(){return this.getUserMuid()||this.userId}set UserId(e){this.userId=e}get OneServiceApiKey(){return this.oneServiceApiKey}set OneServiceApiKey(e){this.oneServiceApiKey=e}get OneServiceOverride(){return this.oneServiceOverride}set OneServiceOverride(e){this.oneServiceOverride=e}get EnvInstanceOverride(){return this.envInstanceOverride}get IsDebug(){return this.isDebug}get ShowMnsCreatorDashboard(){return this.showMnsCreatorDashboard}get NavTargetHostName(){return this.navTargetHost}get NavTargetUrlWithLocale(){return`https://${this.NavTargetHostName}/${this.CurrentMarket}`}get IsChinaCompliance(){return this.isChinaCompliance}get IsCaliforniaRegion(){return this.isCaliforniaRegion}get AssetsUrl(){return this.staticAssetsUrl}set AssetsUrl(e){this.staticAssetsUrl=e}get StaticsUrl(){return this.staticsUrl}get topDomain(){return this.isChinaCompliance?o.CN:o.COM}get isGccModUser(){if((0,D.TJ)()){const e=(0,R.yL)();Promise.resolve(e===a.iN.GCC_MODERATE)}if(this.AccountInfoPromise)return this.AccountInfoPromise.then((e=>(null==e?void 0:e.region_scope)===a.iN.GCC_MODERATE))}get unsupportedEnterpriseCloud(){if((0,D.TJ)()){const e=(0,R.yL)();Promise.resolve(!(e===a.iN.GLOBAL))}if(this.AccountInfoPromise)return this.AccountInfoPromise.then((e=>!((null==e?void 0:e.region_scope)===a.iN.GLOBAL)))}get WidgetAttributes(){return this.widgetAttributes}get ServiceUrlBase(){const e=new URL("",this.serviceUrlBase);"dev"===new URLSearchParams((0,S.zp)()).get("env")&&e.searchParams.set("env.service","dev");const t=new URLSearchParams((0,S.zp)()).get("env.service");return t&&e.searchParams.set("env.service",t),e}get FeedServiceUrlBase(){if(!this.feedServiceUrlBase)return null;const e=new URL("",this.feedServiceUrlBase);"dev"===new URLSearchParams((0,S.zp)()).get("env")&&e.searchParams.set("env.service","dev");const t=new URLSearchParams((0,S.zp)()).get("env.service");return t&&e.searchParams.set("env.service",t),e}get EnterpriseServiceUrlBase(){if(!this.enterpriseServiceDomainUrl)return;const e=new URL("",this.enterpriseServiceDomainUrl);"dev"===new URLSearchParams((0,S.zp)()).get("env")&&e.searchParams.set("env.service","dev");const t=new URLSearchParams((0,S.zp)()).get("env.service");return t&&e.searchParams.set("env.service",t),e}get isAadAccountUser(){return this.CurrentRequestTargetScope&&this.CurrentRequestTargetScope.audienceMode===s.F.Enterprise&&this.ResolvedAccountInfo&&this.ResolvedAccountInfo.account_type&&this.ResolvedAccountInfo.account_type===c.Qm.AAD}get IsFrePage(){return this.isFrePage}get DisableCachingConfigs(){return this.disableCachingConfigs}get EnableConfigService(){const e=M.c.getQueryParameterByName("enableConfigService",(0,S.zp)());return e?"true"===e.toLocaleLowerCase():this.enableConfigService}get EnableCMSPPEConfigs(){return F.Al&&F.Al.EnableCMSPPEConfigs}get IsMultiConfigRetrievalEnabled(){return this.isMultiConfigRetrievalEnabled}get SendFeedCallActivityIdInHeader(){return this.sendFeedCallActivityIdInHeader}get SendUserIdInHeader(){return this.sendUserIdInHeader}set SendUserIdInHeader(e){this.sendUserIdInHeader=e}get ConfigServiceBaseUrl(){return this.configServiceBaseUrl}get CrsRetryBaseUrl(){return this.crsRetryBaseUrl}get FeatureFlags(){return this.featureFlags}get HostHeaderOverride(){return this.hostHeaderOverride}get ConfigRootUrl(){if(!this.configRootUrl)return null;const e=new URL("",this.configRootUrl);"dev"===new URLSearchParams((0,S.zp)()).get("env")&&e.searchParams.set("env.config","dev");const t=new URLSearchParams((0,S.zp)()).get("env.config");return t&&e.searchParams.set("env.config",t),e}get CacheBustingIdentifier(){return this.cacheBustingIdentifier}get IsGitConfigs(){return this.isGitConfigs}get CountryCode(){return this.countryCode}set CountryCode(e){this.countryCode=e}get ActivityIdLowerCaseNoHypens(){return(F.Al&&F.Al.ClientSettings&&F.Al.ClientSettings.aid||"").toLowerCase()}get Latitude(){return this.latitude}get Longitude(){return this.longitude}get ConfigOrigins(){return this.configOrigins}get CrsVersion(){return this.crsVersion}get CrsPath(){return this.crsPath}get CrsDisableServerCache(){return this.crsDisableServerCache}set CrsDisableServerCache(e){this.crsDisableServerCache=e}get LanguageRegionMismatch(){return this.findLanguageRegionMismatch()?"marketmismatch":""}get isWindowsDashboard(){return"newsAndInterests"===H.AppType||"windowsNewsPlus"===H.AppType||"winWidgets"===H.AppType}get LanguageRegionMismatchExplicit(){return this.findLanguageRegionMismatchExplicit()?"marketmismatch":""}get MarketRequestInputLanguage(){return this.marketRequestInputLanguage}get MarketRequestInputRegion(){return this.marketRequestInputRegion}get MarketRequestInputGeoCountry(){return this.marketRequestInputGeoCountry}get MarketDetectionType(){return this.marketDetectionType}get EnableAppErrorBatching(){return F.Al&&F.Al.CurrentFlights&&F.Al.CurrentFlights.includes("batcherrors")}get ConfigStaticFallbackBaseUrl(){return`${this.IsChinaCompliance?d.NH:d.pN}/periconfigs/`}findLanguageRegionMismatch(){var e,t,n,i,r,o,a,s,c;if(F.Al.ClientSettings&&"true"===F.Al.ClientSettings.static_page)return!1;const d=F.Al.ClientSettings&&(null===(e=F.Al.ClientSettings)||void 0===e?void 0:e.market)&&(null===(t=F.Al.ClientSettings)||void 0===t||null===(n=t.market)||void 0===n?void 0:n.detection),l=F.Al.ClientSettings&&(null===(i=F.Al.ClientSettings)||void 0===i?void 0:i.market)&&(null===(r=F.Al.ClientSettings)||void 0===r||null===(o=r.market)||void 0===o?void 0:o.requestInput),u=(0,A.H)(F.Al.ClientSettings&&(null===(a=F.Al.ClientSettings)||void 0===a?void 0:a.locale)&&(null===(s=F.Al.ClientSettings)||void 0===s||null===(c=s.locale)||void 0===c?void 0:c.content));if(d&&("implicitExisting"===d.type||"implicitNew"===d.type||"cm"===d.type||"implicitReset"===d.type)&&l){if(u){if(l.language.toLowerCase()!==u.language.toLowerCase())return this.marketMismatchDetails.type="language",this.marketMismatchDetails.mismatchItem1=l.language.toLowerCase(),this.marketMismatchDetails.mismatchItem2=u.language.toLowerCase(),!0;if(l.region&&l.region.toLowerCase()!==u.market.toLowerCase())return this.marketMismatchDetails.type="region",this.marketMismatchDetails.mismatchItem1=l.region.toLowerCase(),this.marketMismatchDetails.mismatchItem2=u.market.toLowerCase(),!0}if("implicitExisting"===d.type&&l.geo_country.toLowerCase()!==d.geo_country.toLowerCase())return this.marketMismatchDetails.type="geo_country",this.marketMismatchDetails.mismatchItem1=l.geo_country.toLowerCase(),this.marketMismatchDetails.mismatchItem2=d.geo_country.toLowerCase(),!0}return!1}get MarketMismatchDetail(){return this.findLanguageRegionMismatch()||this.findLanguageRegionMismatchExplicit()?this.marketMismatchDetails:null}findLanguageRegionMismatchExplicit(){var e,t,n,i,r,o,a,s,c;if(F.Al.ClientSettings&&"true"===F.Al.ClientSettings.static_page)return!1;const d=F.Al.ClientSettings&&(null===(e=F.Al.ClientSettings)||void 0===e?void 0:e.market)&&(null===(t=F.Al.ClientSettings)||void 0===t||null===(n=t.market)||void 0===n?void 0:n.detection),l=F.Al.ClientSettings&&(null===(i=F.Al.ClientSettings)||void 0===i?void 0:i.market)&&(null===(r=F.Al.ClientSettings)||void 0===r||null===(o=r.market)||void 0===o?void 0:o.requestInput),u=(0,A.H)(F.Al.ClientSettings&&(null===(a=F.Al.ClientSettings)||void 0===a?void 0:a.locale)&&(null===(s=F.Al.ClientSettings)||void 0===s||null===(c=s.locale)||void 0===c?void 0:c.content));if(d&&"compliance"!==d.type&&"url"!==d.type&&l){if(u){if(l.language.toLowerCase()!==u.language.toLowerCase())return this.marketMismatchDetails.type="language",this.marketMismatchDetails.mismatchItem1=l.language.toLowerCase(),this.marketMismatchDetails.mismatchItem2=u.language.toLowerCase(),!0;if(l.region&&l.region.toLowerCase()!==u.market.toLowerCase())return this.marketMismatchDetails.type="region",this.marketMismatchDetails.mismatchItem1=l.region.toLowerCase(),this.marketMismatchDetails.mismatchItem2=u.market.toLowerCase(),!0}if(l.geo_country.toLowerCase()!==d.geo_country.toLowerCase())return this.marketMismatchDetails.type="geo_country",this.marketMismatchDetails.mismatchItem1=l.geo_country.toLowerCase(),this.marketMismatchDetails.mismatchItem2=d.geo_country.toLowerCase(),!0}return!1}setConfigOrigin(){const e={feature:p.w.Production,loc:p.w.Production};return this.IsGitConfigs&&!this.EnableConfigService||(e.feature=p.w.Production,e.loc=p.w.Production),e}constructor(e,t,n,i,r){this.assetsGlobalUrl="https://assets.msn.com",this.assetsCNUrl="https://assets.msn.cn",this.marketMismatchDetails={type:"",mismatchItem1:"",mismatchItem2:""},this.initializeAppEnvironment(e,t,n,i,r)}static getInstance(e=null,t=null,n=null,i=null,r=null){return C.Gq.get($,(()=>new U(e,t,n,i,r)))}static resetInstance(e=null,t=null,n=null,i=null,r=null){const o=new U(e,t,n,i,r);return C.Gq.set($,o),H=(0,w.h)(U),H}initializeAppEnvironment(e,t,n,i,r){const o=(0,S.Td)(),a=(0,y.N)()?(0,S.$w)(m.Xs):null,s=(0,S.l4)(),c=(0,S.Dp)(),u=(0,S.zp)();let p=null;const f=F.Al&&F.Al.ClientSettings,v=M.c.getParamsWithItems(u,!0);let C=!1;if(f){this.isCaliforniaRegion=f.geo_subdivision&&"california"==f.geo_subdivision.toLocaleLowerCase(),this.isChinaCompliance=function(e,t){return!!(e.hostname.toLowerCase().endsWith(".cn")||t.isChinaCompliance||t.useCnDomain||e.search.match(/item=revip:cn/))}({hostname:o,search:u},f),(0,E.sV)(this.isChinaCompliance),this.activityId=this.tryReformatGuid(f.aid),this.currentMarket=this.LocaleContentMarketString||f.apps_locale,this.countryCode=f.geo_country,this.frontDoorMuid=f.fd_muid,this.latitude=f.geo_lat,this.longitude=f.geo_long,this.configRootUrl=f.configRootUrl?new URL("",f.configRootUrl):null,p=(0,g.s)(f.pcsInfo&&f.pcsInfo.env||"prod"),this.setAccountInfoPromise(),this.appType=f.apptype||"",this.authCookieName=this.getAuthCookieName(),this.useAuthFetch=!1;const{featureFlags:e}=f;this.featureFlags=e,C=e&&"true"===e.disableCachingConfigs,this.enableConfigService=!e||!e.enableConfigService||"true"===e.enableConfigService,this.sendFeedCallActivityIdInHeader=(!e||!e.disableActivityIdInHeader||"true"!==e.disableActivityIdInHeader)&&("edge"===this.appType||"hub"===this.appType),this.cacheBustingIdentifier=f.cbid;const{bundleInfo:t,pcsInfo:n}=f||{},i=this.getRunTimePropertyBag(t,n);(0,l.GQ)(i),(0,B.r7)(i),this.configIndexDocId=f.configIndexDocId,this.widgetAttributes=f.widgetAttributes}const w=(0,g.s)(M.c.getQueryParameterByName("env",s));this.environment=w||p||g.q.prod,this.envInstanceOverride=M.c.getQueryParameterByName("instance",s);const b=f&&f.servicesEndpoints,T=b&&b.feedService&&b.feedService.domain||c;this.serviceDomainUrl=n||T,this.oneServiceOverride=r,this.staticDomain=new URL(T).host,this.staticAssetsUrl=b&&b.staticConfig&&b.staticConfig.domain||(this.isChinaCompliance?"https://assets.msn.cn":"https://assets.msn.com"),this.staticsUrl=`${this.staticAssetsUrl}/staticsb/statics/`,this.enterpriseServiceDomainUrl=b&&b.enterpriseFeedService&&b.enterpriseFeedService.domain;const{crs:k={}}=b||{},{v:P,domain:I,path:A}=k;this.crsVersion=P,this.crsDomain=I,this.crsPath=A||d.mX;const{requestInput:L={},detection:D={}}=f&&f.market||{},{language:R="",region:O="",geo_country:N=""}=L||{},{type:$=""}=D||{};this.marketRequestInputLanguage=R,this.marketRequestInputRegion=O,this.marketRequestInputGeoCountry=N,this.marketDetectionType=$,this.serviceUrlBase=e||a&&a.getAttribute(m.X8)&&new URL("",a.getAttribute(m.X8))||new URL("/service/",this.serviceDomainUrl),this.feedServiceUrlBase=this.serviceDomainUrl&&new URL("/service/",this.serviceDomainUrl)||void 0,this.hostPage=h.getHostPageFromUrl(s),this.isFrePage="1"===M.c.getQueryParameterByName("fre",s),this.userId=this.getUserMuid(),this.rootTelemetryId=a?Number(a.getAttribute(m.DB)):0;const U=a&&a.getAttribute(m.uw),_=a&&a.getAttribute(m.Kz);this.trackInfo={sitePage:{page_product:U,page_type:_}},this.setNavTargetHostName(),this.setTargetScope();const H=this.currentRequestTargetScope&&this.currentRequestTargetScope.pageExperiments||[];if(this.disableCachingConfigs=C||(0,y.N)()&&H.includes("inlincrscall"),this.crsVersion=(0,x.W_)(this.crsVersion||"",H,this.appType||""),this.isGitConfigs=this.useGitConfigs(),this.configOrigins=this.setConfigOrigin(),"mmx"===this.appType&&F.Al&&!F.Al.IsMmxWwwContentRequest){const e=(0,S.Td)().endsWith(".cn")?"https://assets.msn.cn":"https://assets.msn.com";this.contentServiceUrlBase=new URL("/content/",e)}else this.contentServiceUrlBase=this.serviceDomainUrl?new URL("/content/",this.serviceDomainUrl):void 0;this.isMultiConfigRetrievalEnabled=this.useMultiConfigsRetrieval();const W=this.getConfigServiceBaseUrl(this.isMultiConfigRetrievalEnabled,t);this.configServiceBaseUrl=W?new URL("",W):null,this.environmentConfigUrl=this.serviceDomainUrl?new URL("/config/v1/",this.serviceDomainUrl):void 0,this.isDebug=(M.c.getQueryParameterByName("debug",s)||"").toLowerCase()in{1:1,true:1}||(M.c.getQueryParameterByName("item",s)||"").toLowerCase().indexOf("/debug")>0||o.includes("localhost"),this.showMnsCreatorDashboard=null!=M.c.getQueryParameterByName("mnsDash",s),this.oneServiceApiKey=this.getOneServiceApiKey(),this.enableFiveColLayout=!1,i&&(this.hostHeaderOverride=i);const q={appType:this.appType,flights:F.Al.CurrentFlights,itemOverrides:v},V=u&&(u.includes("vptest=1")||u.includes("reqsrc=vp")),G="edgeChromium"===this.appType&&!(0,y.N)();this.shouldUseFdheadQsp=V||(0,x.Bc)(q,G),this.oneServiceContentMarketQspKey=this.shouldUseFdheadQsp?"market":"cm"}getOneServiceApiKey(){var e,t,n;if(this.widgetAttributes&&this.widgetAttributes.feed&&this.widgetAttributes.feed.apiKey)return this.widgetAttributes.feed.apiKey;const i="0QfOX3Vn51YCzitbLaRkTTBadtWpgTN8NZLW0C1SEM";let r;switch(this.appType){case"windowsShell":case"windowsShellV2":r="pWw5OmQehOA0XNfgcgrTrwEJZJJJzE83ovtTQx6JRG";break;case"newsAndInterests":case"windowsNewsPlus":r="AEbyVYqTQAPvg4lWwMSFHaLkDzl3weRKKIDDInLQUj";break;case"winWidgets":r="sidebar"===(null===(e=this.currentRequestTargetScope)||void 0===e?void 0:e.pageType)?i:"AEbyVYqTQAPvg4lWwMSFHaLkDzl3weRKKIDDInLQUj";break;case"edgeChromium":r="1hYoJsIRvPEnSkk0hlnJF2092mHqiz7xFenIFKa9uc";break;case"bingHomepage":case"distribution":r="lenovo"===F.Al.ClientSettings.pagetype?"OrorOEMX3w4Hsk49OXMM6YayCYQw3OHcpzqiXEk9xd":"edgewelcome"===F.Al.ClientSettings.pagetype?"oPFhbDSAghltCuG6UvQCcxmngSVye65eXQHHu3voxZ":"QMmdky7jrTlM4mWJmMYQTi71lp678KyZJBKHCAyKCg";break;case"sharedWidgets":r="hFWgtnoLG1BXruRRhEVJo5ACP8414XUG0Ric6JbyND";break;case"gaming":r="play"===(null===(t=this.currentRequestTargetScope)||void 0===t?void 0:t.pageType)?i:"gaming"===(null===(n=this.currentRequestTargetScope)||void 0===n?void 0:n.pageType)?"1hYoJsIRvPEnSkk0hlnJF2092mHqiz7xFenIFKa9uc":"Uj7u7bqBgMhDGBUVPSbcHUe0pU7X8TbVRviCO2fojo";break;case"travel":r="8RwD77wJgNQmmVBdGmZsK6vvPCrG58iRCQRoPsE4JJ";break;case"health":r="FywQv6H345wNCU4yKWraF2esI9qiMQFx90v53mMHrm";break;default:r=i}return r}getUserMuid(){let e;const t=(0,b.jG)();return(0,O.Z)(t)&&(e="m-"+t),e}getConfigServiceBaseUrl(e=!0,t=null){const n=function(e,t,n=!1){let i=null;switch(t){case I.prod:case I.prodssr:case I.staging:i=1==e?"https://assets.msn.cn":"https://assets.msn.com";break;default:i=n?location.origin||null:(0,S.Dp)()||null}return i}(this.isChinaCompliance,this.environment),i=this.isGitConfigs?`${this.crsPath}${this.crsVersion||d.PQ}/config/`:`${this.crsPath}${e?"v2/":""}configindex/`,r=(0,S.Dp)();return this.crsRetryBaseUrl=r?r+i:null,t?t+i:(N&&N.env,(0,y.N)()&&(this.renderWidgets()||"sharedWidgets"===this.appType||"bingHomepage"===this.appType||"distribution"===this.appType||"gaming"===this.appType||("sports"===this.appType||"finance"===this.appType)&&this.widgetAttributes)?n?`${n}`+i:(this.crsDomain||"https://www.msn."+(this.IsChinaCompliance?"cn":"com"))+i:n||(0,S.Dp)()?(n||(0,S.Dp)())+i:null)}useMultiConfigsRetrieval(){const e=(0,S.zp)();if(e){const t=M.c.getQueryParameterByName("isMultiConfigRetrievalEnabled",e);if(t)return"true"===t.toLocaleLowerCase()}return!this.featureFlags||!this.featureFlags.isMultiConfigRetrievalEnabled||"true"===this.featureFlags.isMultiConfigRetrievalEnabled}useGitConfigs(){const e=(0,S.zp)();if(e){const t=M.c.getQueryParameterByName("isGitConfig",e);if(t)return"true"===t.toLocaleLowerCase()}return(0,x.LB)(this.crsVersion,this.configIndexDocId,this.appType)}renderWidgets(){const e=(0,S.zp)();if(e){const t=M.c.getQueryParameterByName("renderWidget",e);if(t)return"true"===t.toLocaleLowerCase()}return!1}getAuthCookieName(){if(this.authCookieName)return this.authCookieName;let e;switch((F.Al&&F.Al.ClientSettings).apptype||""){case"windows":e="windowshp"===F.Al.ClientSettings.pagetype?"anon":"app_anon";break;case"aicharacter":case"bingHomepage":case"community":case"contentTools":case"finance":case"firstParty":case"gaming":case"health":case"homePage":case"hub":case"hybrid":case"microsoftNews":case"personalize":case"recipes":case"sharedWidgets":case"shopping":case"sports":case"traffic":case"travel":case"ugc":case"views":case"weather":default:e="anon";break;case"edge":case"edgeChromium":case"edgeMobile":case"distribution":case"mmx":case"newsAndInterests":case"windowsNewsbar":case"windowsNewsPlus":case"winWidgets":case"windowsShell":case"windowsShellV2":case"office":case"channel":case"superApp":e="app_anon"}return e}setAccountInfoPromise(){this.ResolvedAccountInfo=null,this.AccountInfoPromise=new Promise((e=>{if(!((0,y.N)()&&window.chrome&&window.chrome.authPrivate&&window.chrome.authPrivate.getPrimaryAccountInfo))return e(null);const t=Math.round(performance.now());window.chrome.authPrivate.getPrimaryAccountInfo((n=>{const i=Math.round(performance.now());return(0,u.Ou)()["Auth.GetPrimaryAccountInfo"]=i-t,this.ResolvedAccountInfo=n,e(n)}))})),this.AccountInfoPromise}tryReformatGuid(e){if(e&&32===e.length){const t=e.match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/i);t&&(e=t.slice(1).join("-"))}return e}setTargetScope(){if(!F.Al||!F.Al.ClientSettings)return;const e=function(e,t){let n;const i=decodeURIComponent((0,T.F)(e,"aace")),{child:r}=i&&(0,k.d)(i)||{},o=(0,T.F)(e,"child");return n=i&&(1===r||o)?P.F.Kids:t.audienceMode||P.F.Adult,n}((0,S.G8)(),F.Al.ClientSettings),{browser:t,deviceFormFactor:n,domain:i,ocid:r,os:o,pagetype:a}=F.Al.ClientSettings,s=F.Al.CurrentFlights.split(",");if(this.currentRequestTargetScope={audienceMode:e,browser:t,deviceFormFactor:n,domain:i,locale:{content:this.LocaleContentMarket,display:this.LocaleDisplayLanguage},ocid:r,os:o,platform:"web",pageType:a,pageExperiments:s},!this.currentRequestTargetScope.locale&&L.b.stringHasData(this.LocaleContentMarketString)){const e=this.LocaleContentMarketString.split("-");e.length>1&&(this.currentRequestTargetScope.locale={language:e[0],market:e[e.length-1],content:{language:e[0],market:e[e.length-1]},display:{language:e[0],market:e[e.length-1]}})}}setNavTargetHostName(){let{subDomain:e,domainName:t,topLevelDomain:n}={subDomain:i.WWW,domainName:r.MSN,topLevelDomain:o.COM};const a="homePage"!==this.appType&&F.Al&&F.Al.CurrentFlightSet&&F.Al.CurrentFlightSet.has("1s-viewurldomain");switch(this.environment){case g.q.prod:case g.q.staging:e=a?i.MicrosoftStart:i.WWW;break;case g.q.int1:e=a?i.MicrosoftStartINT1:i.INT1;break;case g.q.int:case g.q.intpr:case g.q.intperf:e=a?i.MicrosoftStartINT:i.INT}this.isChinaCompliance&&(n=o.CN),this.navTargetHost=`${e}.${t}.${n}`}getRunTimePropertyBag(e,t){const n={appType:this.appType};t&&(n.pcsVersion=t.v,n.pcsEnv=t.env);const{alias:i,v:r}=e||{};this.buildVersion=r||"",n.build=this.buildVersion,i&&(n.buildAlias=i);const o=F.Al.CurrentFlights;return o&&(n.shouldDelayUntilLoadTime="edgeChromium"===this.appType&&F.Al.IsPrerender,n.shouldSupressWarnings=o.includes("warningsremoved"),n.shouldSampleErrorsForTreatement1=o.includes("errorsamplingb"),n.shouldSampleErrorsForTreatement2=o.includes("errorsamplingc")),n}getStaticUrls(e){return{com:`${this.assetsGlobalUrl}/staticsb/statics/${e}`,cn:`${this.assetsCNUrl}/staticsb/statics/${e}`}}}const _=U.getInstance;let H=(0,w.h)(U)},62713:function(e,t,n){"use strict";n.d(t,{Qe:function(){return c},_Y:function(){return d}});var i=n(34832),r=n(31156),o=n(31558),a=n(23357),s=n(94546);function c(){var e;return(0,o.N)()?(0,i.d)(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(s.fw)[0])||void 0===e?void 0:e.getAttribute(a.nr))):null}function d(e){if(!(0,o.N)()||!e)return;const t=(0,r.Vm)(e);t&&document.head.setAttribute(a.nr,t)}},30008:function(e,t,n){"use strict";n.d(t,{q:function(){return r}});var i=n(13334);const r=()=>{const e=i.Al&&i.Al.ClientSettings||{},{geo_citycf:t,geo_countrycf:n}=e;return e&&{citycf:t,countrycf:n}}},92095:function(e,t,n){"use strict";var i;n.d(t,{Ak:function(){return a},I4:function(){return r},d3:function(){return o},iN:function(){return i},oD:function(){return s}}),function(e){e.GLOBAL="GLOBAL",e.GCC_MODERATE="GCC_MODERATE"}(i||(i={}));const r="d7b530a4-7680-4c23-a8bf-c52c121d2e87",o="https://enterprisenews.microsoft.com",a="EnterpriseOneService",s=87},99035:function(e,t,n){"use strict";var i;function r(e){switch(e){case i.prod:case i.staging:return i.prod;case i.int1:return i.int1;case i.int:case i.intpr:case i.intperf:return i.int;default:return null}}n.d(t,{q:function(){return i},s:function(){return r}}),function(e){e.prod="prod",e.staging="staging",e.int1="int1",e.int="int",e.intpr="intPR",e.intperf="intPerf"}(i||(i={}))},98463:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});class i{static get UpsellGamerMode(){return i.upsellGamerMode}static set UpsellGamerMode(e){i.upsellGamerMode=e}}},13334:function(e,t,n){"use strict";n.d(t,{nP:function(){return k},Al:function(){return P}});var i=n(61633),r=n(46986),o=n(55524),a=n(291),s=n(78672),c=n(31558),d=n(23357),l=n(36941),u=n(92100),p=n(54297),h=n(7183),g=n(34832),m=n(7476),f=n(76733),v=n(53525);function y(e){return"shd_"+e}var S=n(92095),C=n(94546),w=n(23549);const b="__HeadDataInstance__";class T{get Locale(){return this.locale}get MarketDir(){return this.marketDir}set MarketDir(e){this.marketDir=e}get CurrentFlights(){return this.currentFlights||""}set CurrentFlights(e){this.currentFlights=e,this.currentFlightSet=new Set((e||"").split(",")),this.setSweeperStoredHeadData(i.il.FlightIdKey,this.currentFlights)}get CurrentFlightSet(){return this.currentFlightSet}get ClientSettings(){return this.clientSettings}set ClientSettings(e){this.clientSettings=e}get Diagnostics(){return this.diagnostics}set Diagnostics(e){this.diagnostics=e}get EnableCMSPPEConfigs(){return this.enableCMSPPEConfigs}get EdgeNTPHeader(){return this.edgeNTPHeader}set EdgeNTPHeader(e){this.edgeNTPHeader=e}get UserIsSignedIn(){return this.userIsSignedIn}get IsPreload(){return this.isPreload}set IsPreload(e){this.isPreload=e}get IsPrerender(){return this.isPrerender}set IsPrerender(e){this.isPrerender=e}get IsBlendedEnterprise(){return this.isBlendedEnterprise}set IsBlendedEnterprise(e){this.isBlendedEnterprise=e}get IsMmxWwwContentRequest(){return this.isMmxWwwContentRequest}set IsMmxWwwContentRequest(e){this.isMmxWwwContentRequest=e}get IsServiceWorkerCache(){return this.isServiceWorkerCache}get LastKnownAppVersion(){return this.lastKnownAppVersion}get AnonCookieName(){return this.anonCookieName}set AnonCookieName(e){this.anonCookieName=e}get SsoComplete(){return this.ssoComplete}get AadState(){return this.aadState}set AadState(e){this.aadState=e}set LocaleName(e){this.locale=e}get SelectedFeedPivot(){return this.selectedFeedPivot}set SelectedFeedPivot(e){this.selectedFeedPivot=e}get LastSelectedPivot(){return this.lastSelectedPivot}set LastSelectedPivot(e){this.lastSelectedPivot=e}get SwitchedPivot(){return this.switchedPivot}set SwitchedPivot(e){this.switchedPivot=e}constructor(e){this.enableCMSPPEConfigs=!1,this.initializeHeadData(e)}static getInstance(){return o.Gq.get(b,(()=>new T))}static resetInstance(e){const t=new T(e);return o.Gq.set(b,t),P=(0,a.h)(T),P}initializeHeadData(e){if(e)return void this.initializeFromData(e);if(this.newRidNeeded=void 0,this.lastUsedActivityIdBacking=void 0,this.locationSearch=(0,s.zp)(),this.htmlElement=(0,c.N)()?(0,s.SV)(d.x$.html)[0]:null,this.headElement=(0,c.N)()?(0,s.SV)(d.x$.head)[0]:null,this.applicationCache=(0,c.N)()?window.applicationCache:null,this.selectedFeedPivot="",this.widgetSettingsElement=(0,c.N)()?(0,s.ZI)(C.fw)[0]:null,!this.htmlElement||!this.headElement)return;this.initializeFromDom(),window&&window.navigator&&window.navigator.serviceWorker&&window.navigator.serviceWorker.controller&&(this.isServiceWorkerCache=!0),this.isServiceWorkerCache&&(this.initializeFromStorage(),this.initializeLastUsedActivityId());const t=(0,l.H)(this.clientSettings&&this.clientSettings.locale),n=this.clientSettings&&t&&t.language&&t.market;this.locale=n?(0,l.p)(t):"";const i=this.htmlElement.getAttribute(d.cp);this.marketDir=i&&i.toLocaleLowerCase()||"",this.setQueryItemProvidedValues();const r=(this.widgetSettingsElement||this.headElement).getAttribute(d.js);if(r){const e=(0,g.d)(r);this.anonCookieName=e.anonckname,this.userIsSignedIn=1===e.signedin}u.c.getQueryParameterByName("backgroundpreload",this.locationSearch)&&"hidden"===document.visibilityState&&(this.isPreload=!0,this.logDocumentVisibility()),u.c.getQueryParameterByName("prerender",this.locationSearch)&&"hidden"===document.visibilityState&&(this.isPrerender=!0,this.logDocumentVisibility()),(0,c.N)()&&window.ShellFeedsApp&&window.ShellFeedsApp.shellFeedsExperienceInfo&&!window.ShellFeedsApp.shellFeedsExperienceInfo.isWebviewVisible&&0===window.ShellFeedsApp.shellFeedsExperienceInfo.buttonInteraction&&(this.isPreload=!0),this.setIsBlendedEnterprise(),this.setIsMmxWwwContentRequest()}get lastUsedActivityId(){if(this.lastUsedActivityIdBacking)return this.lastUsedActivityIdBacking;const e=this.getStoredActivityIdKey(),t=(0,p.$o)().getItem(e);return t&&(this.lastUsedActivityIdBacking=(0,g.d)(t)),this.lastUsedActivityIdBacking}set lastUsedActivityId(e){const t=this.getStoredActivityIdKey();if(e){if(e.id&&e.ts){try{(0,p.$o)().setItem(t,JSON.stringify(e),!1)}catch(e){const t=e&&e.message;(0,w.dK)().then((()=>{w.M0.sendAppErrorEvent({...m.dw4,message:t})}))}this.lastUsedActivityIdBacking=e}}else(0,p.$o)().removeItem(t)}get storedHeadData(){return function(e){const t=y(e),n=(0,p.$o)().getItem(t);return n?(0,g.d)(n):null}(this.clientSettings.pagetype)}set storedHeadData(e){!function(e,t){const n=y(e);t?(0,p.$o)().setItem(n,JSON.stringify(t)):(0,p.$o)().removeItem(n)}(this.clientSettings.pagetype,e)}initializeFromData(e){var t,n;this.clientSettings=e.clientSettings,this.edgeNTPHeader=e.edgeNTPHeader,this.selectedFeedPivot=null===(t=e.edgeNTPHeader)||void 0===t?void 0:t.selectedFeedPivot,this.setFlights(e.clientInfo),this.setQueryItemProvidedValues();const i=(0,l.H)(this.clientSettings&&(null===(n=this.clientSettings)||void 0===n?void 0:n.locale)),r=this.clientSettings&&i&&i.language&&i.market;this.locale=r?(0,l.p)(i):"",this.marketDir=e.marketDir&&e.marketDir.toLocaleLowerCase()||"",this.setIsBlendedEnterprise(),this.setIsMmxWwwContentRequest()}initializeFromDom(){this.setFlights((this.widgetSettingsElement||this.headElement).getAttribute(d.um));const e=(this.widgetSettingsElement||this.headElement).getAttribute(d.IX);this.diagnostics=(0,g.d)(e);const t=(this.widgetSettingsElement||this.headElement).getAttribute(d.nr);if(!t)return;if(this.clientSettings=(0,g.d)(t),!this.clientSettings)return;this.calculateForwardableParams();const{pagetype:n}=this.clientSettings;if(!n){const e=(this.widgetSettingsElement||this.headElement).getAttribute(d.AU);this.clientSettings.pagetype=null==e?void 0:e}if(n)try{const e=(0,p.$o)().getObject(d.It.pageVersions)||{};this.lastKnownAppVersion=e[n];const{bundleInfo:t}=this.clientSettings;t&&this.lastKnownAppVersion!==t.v&&(e[n]=t.v,(0,p.$o)().setObject(d.It.pageVersions,e))}catch{f.k.log(`${this.logPrefix()} couldn't complete local storage related operation.`)}}initializeFromStorage(){const e=this.storedHeadData;e&&this.populateFromApiResponse(e)}populateFromApiResponse(e){if(!e)return;const t=e.clientSettings,n=e.info;if(!t||!n)return;if(this.clientSettings.pageGenTime>=t.pageGenTime)return void(this.storedHeadData=null);const i=this.clientSettings.queryparams,r=this.clientSettings&&this.clientSettings.bundleInfo&&this.clientSettings.bundleInfo.v;this.clientSettings=t,this.clientSettings.bundleInfo=Object.assign(this.clientSettings.bundleInfo||{},{v:r}),this.clientSettings.queryparams=i,this.calculateForwardableParams(),this.setFlights(n)}calculateForwardableParams(){const e=this.clientSettings?this.clientSettings.queryparams:"";if(!e)return;const t=e.toLocaleLowerCase(),n=["fdhead","item"].map((e=>{const n=u.c.getQueryParameterByName(e,t);return n?`${e}=${encodeURIComponent(n)}`:null})).filter((e=>e));this.clientSettings.forwardablequeryparams=n.join("&")}initializeLastUsedActivityId(){const e=this.lastUsedActivityId,t=this.clientSettings.aid,n=(0,v.Z)(this.clientSettings.pageGenTime).getTime();this.newRidNeeded=!(!e||!n||e.id!==t),n&&(!e||n>e.ts)&&(this.lastUsedActivityId={id:t,ts:n})}setFlights(e){this.CurrentFlights=((/f:\s*([^;]+)/i.exec(e)||{})[1]||"").toLowerCase(),this.currentFlightSet=new Set(this.currentFlights.split(","))}setSweeperStoredHeadData(e,t){if(!e)return;const n=y("sweeper"),i=h.y7.getObject(n)||{};t?i[e]=t:delete i[e],h.y7.setObject(n,i)}setIsBlendedEnterprise(){this.IsBlendedEnterprise=this.clientSettings&&this.clientSettings.audienceMode===r.F.Enterprise&&this.clientSettings.browser&&"edgeChromium"===this.clientSettings.browser.browserType&&parseInt(this.clientSettings.browser.version)>=S.oD}setIsMmxWwwContentRequest(){this.isMmxWwwContentRequest=this.currentFlights&&this.currentFlights.includes("prg-mmxcontent-t")}setQueryItemProvidedValues(){const e=u.c.getParamsWithItems((0,s.zp)(),!0),t=e.find((e=>"cms"===e.key));this.enableCMSPPEConfigs=t&&"ppe"===t.value,this.setCurrentFlightsTestOverride(e)}setCurrentFlightsTestOverride(e){if((0,s.Td)().toLowerCase().includes("localhost")&&e){const t=e.find((e=>"flights"===e.key));t&&(this.currentFlights=t.value,this.currentFlightSet=new Set(this.currentFlights.split(",")))}}getStoredActivityIdKey(){return"sai_"+this.clientSettings.pagetype}logPrefix(){return"HeadData:"+((0,c.N)()?"":` [Head:${this.widgetSettingsElement||this.headElement}] and [Html:${this.htmlElement}]`)}logDocumentVisibility(){(0,c.N)()&&((0,m.GQ)({isVisible:"visible"===document.visibilityState}),document.addEventListener("visibilitychange",(()=>{(0,m.GQ)({isVisible:"visible"===document.visibilityState})})))}}const k=T.getInstance;let P=(0,a.h)(T)},72322:function(e,t,n){"use strict";var i;n.d(t,{IY:function(){return i}}),function(e){e.BR="pt-br",e.DEDE="de-de",e.ENAU="en-au",e.ENCA="en-ca",e.ENGB="en-gb",e.ENIN="en-in",e.ENUS="en-us",e.ENIE="en-ie",e.ESES="es-es",e.ESMX="es-mx",e.FRCA="fr-ca",e.FRFR="fr-fr",e.ITIT="it-it",e.IN="en-in",e.HUHU="hu-hu",e.KOKR="ko-kr",e.JAJP="ja-jp",e.PLPL="pl-pl",e.PTBR="pt-br",e.RURU="ru-ru",e.RUXL="ru-xl",e.ZHCN="zh-cn"}(i||(i={}))},65505:function(e,t,n){"use strict";n.d(t,{P8:function(){return I},Pz:function(){return R},TJ:function(){return M},_K:function(){return D},aS:function(){return F},hk:function(){return x},iG:function(){return E},lT:function(){return A},me:function(){return O},qn:function(){return k},tx:function(){return B},yd:function(){return U}});var i=n(94546),r=n(67575),o=n(62713),a=n(23357),s=n(89912),c=n(4619),d=n(31558),l=n(78672),u=n(88749),p=n(54557),h=n(18562),g=n(89315),m=n(76733),f=n(76187);const v=(0,o.Qe)()||{},y={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channel:1,mmx:1,edgeMobile:1},S={edgeChromium:1},C={winWidgets:1},w={edgeChromium:1,shopping:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1},b={edge:1,edgeChromium:1,channel:1,cgHomePage:1,distribution:1,mmx:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,superApp:1},T=(0,f.p)((()=>v&&v.apptype)),k=(0,f.p)((()=>(0,d.N)()&&T()in C)),P=(0,f.p)((()=>(0,d.N)()&&!(0,g.pE)()&&!(T()in y)&&!M()&&!L())),I=(0,f.p)((()=>P()&&!(T()in S))),A=((0,f.p)((()=>P()&&(!(T()in S)||!(0,c.mb)()))),(0,f.p)((()=>P()&&!N()&&!$())));function E(){return!!(0,p.AE)(a.Li)}function x(){return $()||N()}const M=(0,f.p)((()=>!(T()in w)&&_()&&function(){const e=new URLSearchParams((0,l.zp)()).get("ocid")||(null==v?void 0:v.ocid),t=null==e?void 0:e.toLowerCase(),n=!a.Oj.has(t)&&"homePage"!==T()&&!a.up.has(t);return n}()&&!function(){const e="windows"==T()&&"windowshp"==(v&&v.pagetype)&&(0,l.l4)().includes(`${r.lU}`);return e}())),L=()=>(0,d.N)()&&document&&document.body&&document.body.getElementsByClassName(i.Di).length>0,D=(0,f.p)((()=>(0,h.Nv)("prg-1s-workid")||(0,h.Nv)("prg-1s-twid"))),R=(0,f.p)((()=>T()in b||M()));function F(){const e=(0,s.nh)();if(e)return m.k.log("dual-auth: tryGet1SAuthToken returned live tokens"),e;const t=(0,s.Wl)();if(t)return m.k.log(`dual-auth: tryGet1SAuthToken returned cached tokens that are ${(0,s.wX)()}`),t;m.k.log("dual-auth: tryGet1SAuthToken returned empty tokens")}function O(e){const t={};return e&&(t[a.Yu.authorization]=`Bearer ${e}`),t}function B(e){const t={};return e&&(t[a.Yu.entAuthorization]=e),t}function N(){return I()&&(0,u.YU)()||function(){const e=I()&&!(0,u.YU)()&&(0,c.x6)()&&("expired"==(0,s.wX)()||(0,u.hU)());return e}()||(0,u.SY)()||(0,u.jG)()}function $(){return I()&&!(0,c.x6)()&&(0,u.KK)()}function U(){(0,c.$v)(),I.cache.clear()}const _=(0,f.p)((()=>{const{browser:e}=v,{browserType:t=""}=e||{};return!!/edgeChromium/i.test(t)}));(0,f.p)((()=>I()&&!M()))},89912:function(e,t,n){"use strict";n.d(t,{Wl:function(){return c},nh:function(){return p},tx:function(){return u},wX:function(){return d}});var i=n(54297);const r="1s-tokens";var o;let a,s;function c(){return a=l(),a&&a.accessToken?a:void 0}function d(){if(a=l(),!a)return"notAvailable";const e=a.expiresOn,t=new Date(e),n="expired";if(!t.getTime())return n;return t>new Date?"valid":n}function l(){return a=a||void 0===a&&(0,i.$o)().getObject(r)||null,a}function u(e){a=void 0,s=e;const{accessToken:t,expiresOn:n}=e||{};t&&n?(0,i.$o)().setObject(r,{accessToken:t,expiresOn:n}):(0,i.$o)().removeItem(r)}function p(){return s}!function(e){e.NotAvailable="notAvailable",e.Expired="expired",e.Valid="valid"}(o||(o={}))},4619:function(e,t,n){"use strict";n.d(t,{$v:function(){return l},ac:function(){return s},mb:function(){return d},sM:function(){return a},x6:function(){return c}});var i=n(54557),r=n(76187),o=n(34832);const a="currentaccount",s=365,c=(0,r.p)((()=>{const e=(0,i.AE)(a,!0),t=e&&(0,o.d)(e),{login_hint:n}=t||{};return n&&t})),d=(0,r.p)((()=>!!(0,i.AE)(a)));function l(){d.cache.clear(),c.cache.clear()}},10788:function(e,t,n){"use strict";n.d(t,{KO:function(){return u},XS:function(){return l},g8:function(){return d}});var i=n(83102),r=n(54557),o=n(34832);const a=()=>{const e=(()=>{const e=(0,r.AE)("els",!0),t=e&&(0,o.d)(e);return t&&Object.prototype.hasOwnProperty.call(t,"account_type")&&t})();if(e){if("MSA"===e.account_type)return i.Qm.MSA;if("AAD"===e.account_type)return i.Qm.AAD}};var s=n(23979),c=n(76187);const d="lt",l=(0,c.p)((()=>{let e,t;return(0,s.vs)()?(e=i.Hy.SignedIn,t=(0,s.Yn)()):(0,r.AE)("els")?(t=a(),e=t?i.Hy.SignedIn:i.Hy.NotSignedIn):(0,r.AE)(d)||(0,r.AE)("aace")?(t=i.Qm.MSA,e=i.Hy.SignedIn):e=i.Hy.NotSignedIn,{isSignedIn:e,accountType:t}}));function u(){l.cache.clear()}},23979:function(e,t,n){"use strict";n.d(t,{E1:function(){return c},Rn:function(){return a},Yn:function(){return s},vs:function(){return l},yL:function(){return d}});var i=n(83102),r=n(54557),o=n(34832);const a=()=>{const e=(0,r.AE)("elt",!0),t=e&&(0,o.d)(e),{access_token:n,account_type:i,login_hint:a,region_scope:s}=t||{};return(n||i||a||s)&&t},s=()=>{const e=a();if(e){if("MSA"===e.account_type)return i.Qm.MSA;if("AAD"===e.account_type)return i.Qm.AAD}},c=()=>{const e=a();return e&&e.login_hint},d=()=>{const e=a();return e&&e.region_scope},l=()=>!!(0,r.AE)("elt")},18562:function(e,t,n){"use strict";n.d(t,{Nv:function(){return s}});var i=n(55524),r=n(31558);const o="__PageExperimentInstance__";function a(e){i.Gq.set(o,e)}function s(e){if(!i.Gq.has(o)&&(0,r.N)()){var t,n;a(c(document.head.dataset.info||(null===(t=window.document.getElementsByClassName("peregrine-widget-settings")[0])||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.info)||""))}const s=i.Gq.get(o);return s&&s.has(e)}function c(e){const t=(e||"").replace(/(^f:|;.*$)/g,"").split(",");return new Set(t)}},65774:function(e,t,n){"use strict";n.d(t,{A:function(){return s},m:function(){return a}});var i=n(83102);class r{constructor(){this._signInState=i.Hy.Unknown,this.initOverrides=()=>{}}getSignInState(){return this._signInState}setSignInState(e){this._signInState=e}useEnterpriseCompliance(){return!1}}r._instance=new r;let o=r._instance;function a(e){if(o!==r._instance||!e)return o;e()}function s(e){o=e}},76716:function(e,t,n){"use strict";n.d(t,{E:function(){return a},M:function(){return i}});var i,r=n(65505),o=n(76187);!function(e){e.App="app",e.EdgeId="edgeid",e.Web="web"}(i||(i={}));const a=(0,o.p)((()=>(0,r.TJ)()?i.EdgeId:(0,r.P8)()?i.Web:i.App))},6914:function(e,t,n){"use strict";n.d(t,{EX:function(){return h},YY:function(){return p},u6:function(){return l}});var i=n(23357),r=n(21789),o=n(52681),a=n(54557),s=n(76187),c=n(34832),d=n(95815);function l(e){const t=e||(0,o.g8)()||"al_app_anon",n=u();return!!(n&&(["anon","al_anon"].includes(t)&&n.AL_ANON||["app_anon","al_app_anon"].includes(t)&&n.AL_APP_ANON))}const u=(0,s.p)((()=>{const e=(0,a.AE)(i.tX,!0);return(0,c.d)(e)}));function p(){(0,d.sq)(i.tX,"",-1,r.jG.HostPage.topDomain,"/"),h()}function h(){u.cache.clear()}},88749:function(e,t,n){"use strict";n.d(t,{KK:function(){return b},SY:function(){return m},YU:function(){return h},bf:function(){return f},bq:function(){return y},dy:function(){return g},hU:function(){return v},hq:function(){return C},jG:function(){return S},m5:function(){return w}});var i=n(91197),r=n(31558),o=n(18562),a=n(76187),s=n(34832);const c="uxlogin",d="uxlogout",l="uxedit",u="useRedirect",p="uxswitch",h=(0,a.p)((()=>{const e=(0,i.U)();return e&&"1"===e.getItem(c)||(0,r.N)()&&location.search&&location.search.includes(`${c}=1`)}));function g(){const e=(0,i.U)();e&&h()&&(e.removeItem(c),h.cache.clear())}const m=(0,a.p)((()=>{const e=(0,i.N)();return e&&!!e.getItem(d)}));function f(){const e=(0,i.N)();e&&m()&&(e.removeItem(d),m.cache.clear())}const v=(0,a.p)((()=>{const e=(0,i.U)();return e&&"1"===e.getItem(l)}));function y(){const e=(0,i.U)();e&&v()&&(e.removeItem(l),v.cache.clear())}const S=(0,a.p)((()=>{const e=(0,i.U)();return!(0,o.Nv)("prg-noredirect")&&e&&"1"===e.getItem(u)&&function(){const e=document.head.dataset.clientSettings||"",{browser:t}=(0,s.d)(e)||{},{browserType:n=""}=t||{};return!!/safari/i.test(n)}()}));function C(){const e=(0,i.U)();e&&"1"===e.getItem(u)&&(e.removeItem(u),S.cache.clear())}function w(){const e=(0,i.U)();e&&e.setItem(u,"1"),S.cache.clear()}const b=(0,a.p)((()=>{const e=(0,i.U)();return e&&"1"===e.getItem(p)}))},23357:function(e,t,n){"use strict";n.d(t,{AU:function(){return s},Cd:function(){return W},DB:function(){return p},Eo:function(){return B},IX:function(){return a},Ib:function(){return U},It:function(){return R},JJ:function(){return I},Ji:function(){return f},Kj:function(){return $},Kz:function(){return g},Li:function(){return y},Oj:function(){return G},Qw:function(){return m},V3:function(){return P},X8:function(){return u},Xs:function(){return i},YH:function(){return A},Yu:function(){return x},Z7:function(){return N},cp:function(){return l},cs:function(){return S},gb:function(){return E},j2:function(){return _},js:function(){return d},m$:function(){return v},nM:function(){return C},nr:function(){return o},og:function(){return T},rD:function(){return M},rq:function(){return H},tX:function(){return w},uD:function(){return q},um:function(){return c},up:function(){return V},uw:function(){return h},wG:function(){return k},x$:function(){return r},yz:function(){return b}});const i="msnewsroot",r={html:"html",head:"head",body:"body"},o="data-client-settings",a="data-diagnostics",s="data-pagetype",c="data-info",d="data-js",l="dir",u="data-service-url",p="data-telemetry-id",h="data-page-product",g="data-page-type",m=2,f="APP_ANON",v="aace",y="ace",S="OSATE",C="child",w="AL_STATE",b="WID",T="APP_WID",k="search-history-enabled",P="split-screen",I="left-rail-enabled",A="brand-zone-ads",E="no-search-history-expected-auth",x={activityId:"x-client-activityid",adsReferer:"ads-referer",authorization:"Authorization",entAuthorization:"Ent-Authorization",muid:"MUID",rpsToken:"UserAuthToken",taboolaSessionId:"taboola-sessionId",xboxToken:"s-xbox-token",traceParent:"traceparent",uniFeatTun:"OneSvc-Uni-Feat-Tun"},M={traceId:"ddd-activityid",debugId:"ddd-debugid",userType:"ddd-usertype",isStatic:"X-Statics-Fallback"};var L,D;!function(e){e.Presentation="presentation"}(L||(L={})),function(e){e.Unknown="Unknown",e.Portrait="Portrait",e.Landscape="Landscape"}(D||(D={}));const R={pageVersions:"pageVersions"},F={instanceId:"InterestsWC",configRef:{experienceType:"InterestsWC",instanceSrc:"default"}},O={instanceId:"InterestsWC",configRef:{experienceType:"InterestsWC",instanceSrc:"default",sharedNs:"msn-ns"}},B=e=>{let t;switch(e){case"default":t=F;break;case"shared":t=O;break;default:t=void 0}return t},N="https://microsoftnews.msn.com/",$="switchedPivot",U="pivotSelectionSource",_="ChannelCoachMarkTimestamp",H="ChannelCoachMarkShowTimes";var W,q;!function(e){e[e.Undefined=0]="Undefined",e[e.Basic=1]="Basic",e[e.Advanced=2]="Advanced",e[e.Premium=3]="Premium"}(W||(W={})),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"}(q||(q={}));new Set(["winp0dash","winp1taskbar","winp1taskbarent","winp1taskbardirect","winp1taskbardirectent","winp1taskbarent","winp2juntaskbar","winp2juntaskbarent","winp2","winp2ent","winp2fp","winp2fpent","winp2fptaskbar","winp2fptaskbarent","winp2fptaskbarhover","winp2fptaskbarhoverent","winp2widget","winp2widgetent"]);const V=new Set(["finance-app-win","weather-app-win","winpstoreapp"]),G=(new Set(["msedgdhp","msedgdhphdr","msedgntphdr","msedgntp","msedgdhp","entnewsntp"]),new Set(["hpmsn"]))},91046:function(e,t,n){"use strict";n.d(t,{L:function(){return a}});var i=n(31558),r=n(96620);let o;function a(){var e;o||(o=new URLSearchParams(null===(e=window)||void 0===e?void 0:e.location.search));return o}(0,i.N)()||(0,r.U)((()=>{o=null}))},8780:function(e,t,n){"use strict";function i(e){return new Promise((t=>setTimeout(t,e)))}n.d(t,{qn:function(){return r},rh:function(){return i}});const r=async(e,t,n)=>{if(!t||isNaN(e))return;if(!e&&0!==e||e<0||e===1/0)return await t;const i=(e=>{let t,n=()=>{},i=()=>!1;const r=new Promise(((r,o)=>{n=()=>{t&&(clearTimeout(t),t=null,o())},i=()=>null!==t,t=setTimeout((()=>{t=null,r()}),e)}));return{cancel:n,isActive:i,promise:r}})(e),r=await Promise.race([t,i.promise]);return i.isActive()?i.cancel():n&&n(),r}},29597:function(e,t,n){"use strict";n.d(t,{Sm:function(){return k},br:function(){return I},cb:function(){return P}});var i=n(31558),r=n(55524),o=n(54911);function a(e){const t=(0,o.s)();return function(n,i){if(i||(i={}),!s(i,"Referer")){const e="string"==typeof n?n:n.url;!function(e,t,n,i){const r=(d[i]||d[c])(e,t);if(delete n.referrerPolicy,!r)return;n.headers=n.headers||{},n.headers.Referer=r}(t.url,e,i,i.referrerPolicy)}return s(i,"User-Agent")||function(e,t){e.headers=e.headers||{},e.headers["User-Agent"]=`${t} (via node-fetch)`}(i,t.userAgent),e(n,i)}}function s(e,t){return e.headers&&void 0!==e.headers[t]}const c="strict-origin-when-cross-origin",d={"no-referrer":(e,t)=>{},"no-referrer-when-downgrade":(e,t)=>l(e,t)?void 0:e.href,origin:(e,t)=>e.origin+"/","origin-when-cross-origin":(e,t)=>u(e,t)?e.href:e.origin+"/","same-origin":(e,t)=>u(e,t)?e.href:void 0,"strict-origin":(e,t)=>l(e,t)?void 0:e.origin+"/","strict-origin-when-cross-origin":(e,t)=>u(e,t)?e.href:d["strict-origin"](e,t),"unsafe-url":(e,t)=>e.href};function l(e,t){return"https:"===e.protocol&&t.startsWith("http:")}function u(e,t){return t.startsWith(e.origin+"/")}n(73040);var p=n(91898),h=n(9683),g=n(92100);async function m(e,t){let n;try{n=await h.o.get(e)}catch(e){throw new Error(`ServerCache thrown the following error, please check if the ServerCache is initialized. Please call ServerCache.initialize() before using it:\n${e.message}`)}return n?Promise.resolve(n):t(e).then((e=>e.blob())).then((e=>e.text())).then((t=>(h.o.set(e,t),t)))}async function f(e,t,n,i){if(!(e&&t&&n))return Promise.resolve();await h.o.set(`${e}-${t}-${n}`,i)}const v="https://peregrinebaselines.blob.core.windows.net/baselines";async function y(e,t,n,i,r,o){var a,s;const c=await m(`${v}/${t}`,o);let d;try{d=JSON.parse(c)}catch{return r()}const l=null===(a=d)||void 0===a||null===(s=a.interceptions)||void 0===s?void 0:s.find((({urlPattern:t})=>g.c.urlPatternToRegExp(t).test(e))),u=null==l?void 0:l.interceptionsHash,y=null==l?void 0:l.urlPattern;if(u){const e=`${d.fileNamePrefix}-interceptions-${u}.json`,t=await m(`${v}/${e}`,o),r=JSON.parse(t),a=await async function(e,t,n){if(!(e&&t&&n))return Promise.resolve(void 0);const i=`${e}-${t}-${n}`,r=await h.o.get(i);return Promise.resolve(r)}(i,y,n);r[n]&&void 0!==r[n].Times&&void 0===a&&await f(i,y,n,r[n].Times-1);const s=r&&0!==a?r[n]:null;if(a>0)await f(i,y,n,a-1);else if(0===a)return null;return new p.Response(null==s?void 0:s.Body,{status:null==s?void 0:s.Status,headers:null==s?void 0:s.Headers,statusText:"OK"})}return r()}var S=n(76733);let C,w,b;class T{constructor(){"undefined"!=typeof AbortController&&(this.controller=new AbortController)}abort(){return!!this.controller&&(this.controller.abort(),!0)}setAbortSignal(e){this.controller&&(e.signal=this.controller.signal)}}async function k(e,t,n,a,s,c,d=!1){var l;s||(s=fetch);const u=()=>async function(e,t,n,o,a,s,c=!1){a||(a=fetch),o||(o=new T),(0,i.N)()&&(s=!1);let d=null,l=null;if(void 0===t?t=b:b>0&&(t=Math.min(t,b)),t>0&&(d=1e4,d=setTimeout((()=>{l=setTimeout((()=>{if(!o.abort())throw new Error(`Fetch for ${e} aborted due to timeout of ${t} ms. AbortController is not supported.`)}),0)}),t)),n||(n={method:"GET"}),!(0,i.N)()&&!n.agent&&C&&w){const e=function(e){return"http:"===e.protocol?C:w};n.agent=e}if((0,i.N)()||n.headers&&n.headers.Connection||(n.headers=new Headers(n.headers),n.headers.set("Connection","keep-alive")),!(0,i.N)()&&r.Gq.get("__originalRequest__")){var u;const e=r.Gq.get("__originalRequest__");n.headers=new Headers(n.headers);const t=e.get("User-Agent"),i=e.get("Accept-Language"),o=e.get("Dnt"),a=null===(u=e.headers)||void 0===u?void 0:u.cookie,s=e.get("Sec-Ch-Ua"),c=e.get("Sec-Ch-Ua-Mobile"),d=e.get("Sec-Ch-Ua-Platform"),l=e.get("X-Client-Data"),p=e.get("X-Edge-Shopping-Flag");t&&n.headers.set("User-Agent",t),a&&n.headers.set("Cookie",a),i&&!n.headers["Accept-Language"]&&n.headers.set("Accept-Language",i),o&&!n.headers.Dnt&&n.headers.set("Dnt",o),s&&!n.headers["Sec-Ch-Ua"]&&n.headers.set("Sec-Ch-Ua",s),c&&!n.headers["Sec-Ch-Ua-Mobile"]&&n.headers.set("Sec-Ch-Ua-Mobile",c),d&&!n.headers["Sec-Ch-Ua-Platform"]&&n.headers.set("Sec-Ch-Ua-Platform",d),l&&!n.headers["X-Client-Data"]&&n.headers.set("X-Client-Data",l),p&&!n.headers["X-Edge-Shopping-Flag"]&&n.headers.set("X-Edge-Shopping-Flag",p)}n.signal||o.setAbortSignal(n);const p=performance.now();let h,g=0;const m={};let f;const v=()=>{if(!(0,i.N)()){const n={abortableFetch:{url:e,statusCode:g,timestamp:(new Date).toISOString(),timeElapsed:(performance.now()-p).toFixed(2),timeOut:t.toFixed(2),oneWebServiceLatency:f,errorMessage:h&&h.message,errorName:h&&h.name,errorCode:h&&h.code,errorType:h&&h.type,cluster:m.cluster,dddDebugId:m.dddDebugId,wpoId:m.wpoId,afd:m.afd}};c||S.k.logSingleObject(n,!0)}d&&clearTimeout(d),l&&clearTimeout(l)};return a(e,n).then((e=>{var t,n,i;return g=e.status,f=null===(t=e.headers)||void 0===t?void 0:t.get("onewebservicelatency"),s&&(m.cluster=e.headers.get("x-fabric-cluster")||(null===(n=e.headers.get("ddd-debugid"))||void 0===n||null===(i=n.split("|"))||void 0===i?void 0:i[3]),m.afd=e.headers.get("x-msedge-ref"),m.dddDebugId=e.headers.get("ddd-debugid"),m.wpoId=e.headers.get("x-wpo-activityid")),e})).catch((n=>{if(h=n,"AbortError"===n.name)throw new Error(`Fetch for ${e} aborted due to timeout of ${t} ms.`);throw new Error(n)})).then((e=>(v(),e)),(e=>{throw v(),e}))}(e,t,n,a,s,c,d);if((0,i.N)())return u();const p=(0,o.s)(),h=null==p||null===(l=p.url)||void 0===l?void 0:l.searchParams,g=null==h?void 0:h.get("interceptions-config-file"),m=null==h?void 0:h.get("ssrTimestamp");return!(!g||null==n||!n.method)?y(e,g,n.method,m,u,s):u()}function P(){return{abortToken:null,timeoutMs:900,fetchImpl:a(fetch)}}async function I(e,t,n){return n||(n=P()),k(e,n.timeoutMs,t,n.abortToken,n.fetchImpl,n.trackApiClusterInServer)}},54557:function(e,t,n){"use strict";n.d(t,{AE:function(){return o}});var i=n(31156);let r;function o(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?(0,i.fB)(n[1]):null}(e);if(!r){const e="undefined"!=typeof document&&document.cookie.split("; ");r={};const t=e&&e.length;for(let n=0;n<t;n++){const t=e[n].indexOf("=");r[e[n].slice(0,t).toLocaleLowerCase()]=(0,i.fB)(e[n].slice(t+1))}}const n=e.toLocaleLowerCase();return r[n]||null}},25586:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var i=n(13334),r=n(21789);function o(){const e=i.Al&&i.Al.Diagnostics||{},t=i.Al&&i.Al.ClientSettings,{mc:n={}}=e||{},{pageGenTime:o="",geo_citycf:a="",geo_countrycf:s="",requestTrailInfo:c}=t||{},{cdn:d=""}=c||{},l={refs:{refA:r.jG.ActivityIdLowerCaseNoHypens||"",refC:o},cookies:n,geoConfidence:{cityConfidence:a,countryConfidence:s},langMismatch:r.jG.MarketMismatchDetail,cdn:d};return JSON.stringify(l)}},21931:function(e,t,n){"use strict";n.d(t,{N6:function(){return s},j3:function(){return a}});var i=n(55524);const r=()=>i.Gq.get("__core_DisplayModeCoordination_displayModeMap__",(()=>({}))),o=()=>i.Gq.get("__core_DisplayModeCoordination_callbackMap__",(()=>({})));function a(e,t){const n=r();if(n[e]===t)return;n[e]=t;const i=o()[e];if(i)for(const e of i)e(t)}function s(e,t){const n=o(),i=r();let a=n[e];a||(a=[],n[e]=a),a.push(t);const s=i[e];s&&t(s)}},84231:function(e,t,n){"use strict";function i(e){return!(e&&e.length)}n.d(t,{x:function(){return i}})},86522:function(e,t,n){"use strict";n.d(t,{Xw:function(){return d},Z3:function(){return u},h_:function(){return p},nF:function(){return h},rP:function(){return l}});var i=n(67575),r=n(92100),o=n(21789),a=n(78672);const s="{hostName}",c=/\{localeCode\}|\{0\}/;function d(e,t){const n=r.c.encodeURIComponentForPrime(t).toLowerCase(),{HostPage:i}=o.jG;if(i){const t=new URL(i.originalUrl);return t.origin+"/"+i.verticalKey+"/"+i.categoryKey+"/interests/"+n+"/"+o.jG.CurrentMarket+"/f-"+e+t.search}return"https://www.msn.com"}function l(){return`${o.jG.NavTargetUrlWithLocale}/${i.lU}`}function u(e=i.UH){return`${o.jG.NavTargetUrlWithLocale}/${e}`}function p(e){return e&&(e=e.replace(s,o.jG.NavTargetHostName).replace(c,o.jG.CurrentMarket)),e}function h(e){if(!e)return;const{Environment:t,EnvInstanceOverride:n}=o.jG;n===t&&(e.host=(0,a.zw)(),e.searchParams.set("instance",n))}},91197:function(e,t,n){"use strict";function i(){try{return localStorage}catch(e){return null}}function r(){try{return sessionStorage}catch(e){return null}}n.d(t,{N:function(){return r},U:function(){return i}})},89315:function(e,t,n){"use strict";n.d(t,{H2:function(){return h},Ko:function(){return C},Rz:function(){return m},_3:function(){return v},aH:function(){return b},dx:function(){return w},pE:function(){return T},tr:function(){return p},wq:function(){return y},yE:function(){return f}});var i=n(31558),r=n(76187);const o={outlookMobile:"OnOOutlookMobile",officeMobile:"OnOOfficeMobile",sapphire:"OnOStartApp",skype:"OnOSkype",winWeatherApp:"weather-app-win",xiaomiApp:"xmweather-",moto:"moto",swiftKey:"swiftKey",winMoneyApp:"finance-app-win"},a="superappdhp",s=["ios","android","ipados"];let c=k("ocid").toLowerCase(),d=k("chpltfm"),[l,u]=d.toLowerCase().split("-");function p(){if(!(0,i.N)())return!1;const e=window.sapphireWebViewBridge,t=window.webkit,n=e&&e.send,r=t&&t.messageHandlers&&t.messageHandlers.send&&t.messageHandlers.send.postMessage;return!(!n&&!r)}function h(){const e=d&&"outlook"===l&&s.includes(u),t=c===o.outlookMobile.toLowerCase();return e||t}function g(){const e=d&&["office","union"].includes(l)&&s.includes(u),t=c===o.officeMobile.toLowerCase();return e||t}function m(){return h()||g()}function f(){return"true"===k("is2ndWV")}function v(){const e=c===o.skype.toLowerCase()||"skype"===l;return(0,i.N)()&&(null===(t=window.skypeWebviewBridge)||void 0===t?void 0:t.isSkype)||e;var t}function y(){return p()||c===o.sapphire.toLowerCase()||c===a.toLowerCase()}function S(){return"3rdp"===l||c.startsWith(o.xiaomiApp)||w()||c===o.swiftKey.toLowerCase()}function C(){return"vivo"===c&&S()}function w(){return c===o.moto.toLowerCase()}function b(){return y()&&!("emmxinterests"===c)&&!S()}const T=(0,r.p)((()=>p()||v()||g()||h()||y()||c===o.winWeatherApp.toLowerCase()||c===o.winMoneyApp.toLowerCase()||function(){const e=k("edge");return("emmx"===l||"1"===e)&&y()}()||S()));function k(e){try{return new URL(location.href).searchParams.get(e)||""}catch(e){return""}}},14792:function(e,t,n){"use strict";n.d(t,{Ie:function(){return i},_T:function(){return s},ou:function(){return u}});var i,r=n(7476),o=n(21789),a=n(31558);function s(){return c}!function(e){e.Unknown="unknown",e.Connected="connected",e.Disconnected="disconnected",e.Aborted="aborted"}(i||(i={}));let c=i.Unknown,d=null,l=!1;function u(e=5e3){(0,a.N)()&&(c=i.Unknown,p(e))}async function p(e=5e3,t){return l=!1,t&&(d=window.setTimeout((()=>{l=!0,t.abort()}),e)),function(e){const t={method:"HEAD",cache:"reload"};e&&(t.signal=e);return fetch(`https://assets.msn.${o.jG.IsChinaCompliance?"cn":"com"}/statics/icons/favicon.ico`,t)}(t&&t.signal).then((()=>(c=i.Connected,(0,r.GQ)({networkStatus:c}),!0))).catch((e=>(c=e&&"AbortError"===e.name?i.Aborted:i.Disconnected,(0,r.GQ)({networkStatus:c}),!1))).finally((()=>{clearTimeout(d)}))}},25257:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var i,r=n(21789),o=n(13334);!function(e){e.isDhpPage=function(){return"dhp"===o.Al.ClientSettings.pagetype},e.isNtpPage=function(){return"ntp"===o.Al.ClientSettings.pagetype},e.fiveColSupported=function(){return r.jG.EnableFiveColLayout}}(i||(i={}))},31156:function(e,t,n){"use strict";function i(e,t){const n=parseInt(e);return isNaN(n)?t:n}function r(e){try{return JSON.stringify(e)}catch{return null}}function o(e){try{return decodeURIComponent(e)}catch(e){}}n.d(t,{Vm:function(){return r},fB:function(){return o},hh:function(){return i}})},5699:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});class i{constructor(e){this.onSubscriptionCallbackError=e,this.eventLookup={}}publish(e,t){let n=this.eventLookup[e];if(void 0!==n){n=n.slice();let i=n.length;for(;i-- >0;)try{n[i](t)}catch(n){this.onSubscriptionCallbackError&&this.onSubscriptionCallbackError(n,e,i,t)}}}subscribe(e,t){void 0===this.eventLookup[e]&&(this.eventLookup[e]=[]);const n=this.eventLookup[e];return n.push(t),{dispose(){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}subscribeOnce(e,t){const n=this.subscribe(e,(function(e){n.dispose(),t(e)}));return n}}},49155:function(e,t,n){"use strict";n.d(t,{Z:function(){return o},l:function(){return a}});var i=n(31558);let r={};function o(e){e=e||{},(async()=>{const{newUrl:t,invalidatePageCache:n=!0}=e;if(n){const{invalidatePageCacheHandler:e}=r;if(e){const t=e();t&&t.then&&await t}}t?window.location.replace(t):window.location.reload(n)})()}const a={resetHandlers:function(){r={}},setHandlers:function(e){(0,i.N)()&&e&&(r=e)}}},20196:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});const i=e=>"function"==typeof requestIdleCallback?requestIdleCallback(e):setTimeout(e,0)},48204:function(e,t,n){"use strict";n.d(t,{$z:function(){return h},Cv:function(){return g},NJ:function(){return f},SD:function(){return p},cf:function(){return m},kJ:function(){return v},ll:function(){return y},nl:function(){return S}});var i=n(23357),r=n(7183),o=n(54297),a=n(31558),s=n(91046),c=n(13334);const d="ntp.selected_feed_pivot",l="selectedPivot",u="gamermode";function p(){m("myFeed")}function h(){if("1"===(0,s.L)().get(u)&&!r.y7.getItem(u))return"gaming";let e=null===c.Al||void 0===c.Al?void 0:c.Al.SelectedFeedPivot;if((0,a.N)()){const t=(0,o.$o)().getItem(l);e&&t!==e?m(e):e=t}return e}function g(e){"1"===e.get("gaming")&&m("gaming")}function m(e){if(v(e),(0,a.N)()){const t="undefined"!=typeof window&&window&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&t.setPref&&t.setPref(d,e)}c.Al.SelectedFeedPivot=e,(0,o.$o)().setItem(l,e),"1"!==(0,s.L)().get(u)||r.y7.getItem(u)||r.y7.setItem(u,"0")}function f(){return(0,o.$o)().getItem(i.Kj)}function v(e){(0,o.$o)().setItem(i.Kj,e)}function y(){return(0,o.$o)().getItem(i.Ib)??i.uD.Init}function S(e){(0,o.$o)().setItem(i.Ib,e)}},45870:function(e,t,n){"use strict";n.d(t,{o:function(){return i}});class i{constructor(e){this.promise=new Promise(((e,t)=>{this.resolver=e})),e&&setTimeout((()=>this.set(void 0)),e)}set(e){this.resolver(e),this.valueSet=!0}wasSet(){return this.valueSet}getResultAsync(){return this.promise}}},96620:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});const i=[];function r(e){i.push(e)}},2518:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});const i=e=>e&&"string"==typeof e&&e.trim&&!!e.trim()},857:function(e,t,n){"use strict";n.d(t,{GI:function(){return d},Qc:function(){return c},ku:function(){return a},w_:function(){return s}});var i=n(23549),r=n(21789),o=n(23357);function a(){var e;if(!i.M0)return;const t=null===(e=i.M0.getPageMetadata)||void 0===e?void 0:e.call(i.M0);return t&&t.contract&&t.contract.page?t.contract.page.ocid:void 0}function s(e){if("windowsShell"===r.jG.AppType||"windowsShellV2"===r.jG.AppType)return c(e);const t=a(),n=e.toLowerCase();if(!t||-1!=n.indexOf("?ocid=")||-1!=n.indexOf("&ocid="))return e;const i=-1==e.indexOf("?")?"?":"&";return`${e}${i}ocid=${encodeURIComponent(t)}`}function c(e){if(!e)return e;try{const t=new URL(e),n=t.searchParams;return a()&&n.set("ocid",a()),n.set("cvid",i.M0.getRequestId()),t.toString()}catch{return e}}function d(e){if(!e)return null;const t={...e};return t[o.Yu.entAuthorization]&&(t[o.Yu.entAuthorization]="*****"),t[o.Yu.rpsToken]&&(t[o.Yu.rpsToken]="*****"),t[o.Yu.authorization]&&(t[o.Yu.authorization]="*****"),t}},34479:function(e,t,n){"use strict";n.d(t,{Kb:function(){return r}});setTimeout;let i=setTimeout;async function r(e){return new Promise(((t,n)=>{i(t,e)}))}},32810:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});class i{constructor(e){this.searchParams=Object.create(null),this.parseQueryString(e)}set(e,t){return null!=t&&(this.searchParams[e]=t),this}get(e){return this.searchParams[e]}delete(e){delete this.searchParams[e]}toString(){const e=Object.keys(this.searchParams);return e.length?e.sort().map((e=>`${e}=${this.searchParams[e]}`)).join("&"):""}parseQueryString(e){if(!e)return;const t=e.indexOf("?");t>-1&&(e=e.substring(t+1)),e.split("&").forEach((e=>{const t=e.split("="),n=t[0];this.get(n)||(this.searchParams[n]=t[1])}))}}},92100:function(e,t,n){"use strict";n.d(t,{K:function(){return g},c:function(){return i}});var i,r=n(22140),o=n(79022),a=n(54433),s=n(92170),c=n(13578),d=n(50769),l=n(37242),u=n(76733),p=n(56687),h=n(78672);function g(e,t){try{const n=new URL(e,(0,h.Dp)());return t&&t.forEach((([e,t])=>e&&null!=t&&n.searchParams.append(e,t))),n}catch(e){u.k.logError((0,p.n)(e))}}!function(e){const t=/[^A-Za-z0-9]+/g;function n(e,t=!1){if(!(0,o.Z)(e))return null;return u((e||"").split("?")[1],t)}function i(e){return e=e.replace(/\+/g," "),e=decodeURIComponent(e)}function u(e,t=!1){const n=[];if(e&&e.startsWith("?")&&(e=e.substring(1)),e){const r=(e=e.split("#")[0]).split("&");for(let e=0;e<r.length;e++){const o=r[e].split("=");let s=o[0],c=o[1];t&&(s=i(s),c&&(c=i(c)));const d={key:s,value:c},l=(0,a.Z)(n,(e=>e.key===d.key));-1===l?n.push(d):n[l]=d}}return n}e.getParamsFromUrl=n,e.encodeURIComponentForPrime=function(e){return encodeURIComponent(e.replace(t,"-"))},e.getParams=u,e.getParamsWithItems=function(e,t=!1,n="item"){const r=[];if(e){e.startsWith("?")&&(e=e.substring(1));const o=(e=e.split("#")[0]).split("&");for(let e=0;e<o.length;e++){const a=o[e].split("=");let s=a[0],c=a[1];if(t&&(s=i(s),c&&(c=i(c))),s.toLowerCase()===n){c=c.replace("::::",";;;;");const e=c.split(":");if(2===e.length){s=e[0],c=e[1].replace(";;;;","::::");const t={key:s,value:c};-1===r.findIndex((e=>e.key===t.key))&&r.push(t)}}}}return r};const p={};function g(e){const t={},i=n(e,!0);return i&&i.length&&i.forEach((e=>t[e.key]=e.value)),t}e.getQueryParameterByName=function(e,t){p[t]||(p[t]=g(t));const n=p[t][e];return void 0!==n?n:null},e.isValidUrl=function(e,t){return(0,o.Z)(e)&&e.length>0&&(!t||t&&0===e.indexOf("http"))},e.keyValueArrayToQueryString=function(e){return!(0,s.Z)(e)||(0,c.Z)(e)?"":e.filter((e=>r.b.isKeyValuePair(e,(e=>"string"==typeof e),(e=>"string"==typeof e)))).map((e=>e.key+"="+e.value)).join("&")},e.getParamsObj=g,e.joinSubpathToURL=function(e,t){const n=e.href,i=(0,d.Z)(n,"/"),r=(0,l.Z)(t,"/");return new URL(`${i}/${r}`)},e.updateSearchParam=function(e,t,n){return e&&e.searchParams&&e.searchParams.get(t)&&e.searchParams.set(t,n),e},e.appendSearchParam=function(e,t,n,i){return e&&(e.searchParams||i?e.searchParams.append(t,n):e=new URL(e.href+(e.search.indexOf("?")>=0?"&":"?")+t+"="+n)),e},e.getAbsoluteUrl=function(e){return e.indexOf("://")>0||0===e.indexOf("//")?e:(0,h.Dp)()+e};const m=new Set(["/","$","^","+",".","(",")","=","!","|"]);e.urlPatternToRegExp=function(e){if(0==e.indexOf("/")&&e.lastIndexOf("/")>0){const t=e.slice(1,e.lastIndexOf("/")),n=e.substring(e.lastIndexOf("/")+1)||void 0;return new RegExp(t,n)}return function(e){const t=["^"];let n;for(let i=0;i<e.length;++i){const r=e[i];if(m.has(r))t.push("\\"+r);else if("*"!==r)switch(r){case"?":t.push(".");break;case"{":n=!0,t.push("(");break;case"}":n=!1,t.push(")");break;case",":if(n){t.push("|");break}t.push("\\"+r);break;default:t.push(r)}else{const n=e[i-1];let r=1;for(;"*"===e[i+1];)r++,i++;const o=e[i+1];!(r>1)||"/"!==n&&void 0!==n||"/"!==o&&void 0!==o?t.push("([^/]*)"):(t.push("((?:[^/]*(?:/|$))*)"),i++)}}return t.push("$"),new RegExp(t.join(""))}(e)},e.compareURLs=function(e,t){try{const n=new URL(e),i=new URL(t),r=n.searchParams,o=i.searchParams,a=[],s=[],c=[];return r.forEach(((e,t)=>{o.has(t)?o.get(t)!==r.get(t)&&c.push(t):s.push(t)})),o.forEach(((e,t)=>{r.has(t)||a.push(t)})),{hostMismatch:n.hostname!==i.hostname,pathMismatch:n.pathname!==i.pathname,paramsMissingLeft:a.join(","),paramsMissingRight:s.join(","),paramsDiff:c.join(",")}}catch(e){return{}}}}(i||(i={}))},22140:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var i,r=n(79022),o=n(43698);!function(e){function t(e){return null!=e}e.isNotNullOrUndefined=t,e.isDefined=function(e){return void 0!==e},e.isKeyValuePair=function(t,n,i){return e.isNonNullObject(t)&&n(t.key)&&i(t.value)},e.isNonNullObject=function(e){return e&&"object"==typeof e},e.isNotNull=function(e){return null!==e},e.isNullOrWhiteSpace=function(e){return!(0,r.Z)(e)||""===e.trim()},e.toNumber=function(e,t=-1){if(!e)return t;const n=(0,o.Z)(e);return isNaN(n)?t:n},e.arrayHasData=function(e){return!!t(e)&&(e.constructor===Array&&e.length>0)},e.stringHasData=function(e){return(0,r.Z)(e)&&e.trim().length>0},e.objectToString=function e(t){let n="",i=!0;if("object"!=typeof t)return n;for(const r in t)"object"==typeof t[r]?n+=i?`${e(t[r])}`:`-${e(t[r])}`:n+=i?`${t[r]}`:`-${t[r]}`,i=!1;return n},e.removeHyphens=function(e){if(e)return e.replace(/-/g,"")}}(i||(i={}))},71778:function(e,t,n){"use strict";n.d(t,{Fr:function(){return m},R0:function(){return l},mS:function(){return v},ot:function(){return f},rh:function(){return y},yb:function(){return d}});var i=n(42933),r=n(7476),o=n(76733),a=n(56687),s=n(31558),c=n(21789);let d,l;const u=new Map;let p;const h=(0,i.oA)("WebWorkerUtility","WebWorkerUtility",!0),g=new Map,m=e=>{if(!e)return;const t=g.get(e);return t?(g.delete(e),t):void 0};function f(e,t,n=!0,i=!0){const a={id:e&&e.id||"",fetched:!1,payload:null};if(!e||!e.id)return Promise.resolve(a);if(!d&&(!l||l&&"appanoncookie"!==e.id))return Promise.resolve(a);const s=h&&h.startMeasure(e.id).endMeasure,c=g.get(e.id);if(c)return i&&g.delete(e.id),s&&s({customSuffix:"standbymessage"}),Promise.resolve(c);let m,f;t&&(f=new Promise((i=>{m=setTimeout((()=>{u.delete(e.id);const c=`Web worker request timed out after ${t}ms for request id: [${e.id}]`;n&&(p?p({...r.s7S,message:"Web worker request timed out",pb:{...r.s7S.pb,customMessage:c}}):o.k.logError(c)),s&&s({customSuffix:"timeout"}),i({...a,timeout:!0})}),t)})));const v=new Promise((t=>{u.set(e.id,{type:e.type||"data",callback:e=>{m&&clearTimeout(m),s&&s(),t(e)}})}));return window.webWorker.postMessage({id:e.id,type:e.type||"data",payload:e.payload}),t?Promise.race([v,f]):v}function v(e){d&&e&&e.id&&window.webWorker.postMessage({id:e.id,type:e.type||"command",payload:e.payload||null})}function y(e){if(!d||!e||"function"!=typeof e)return;p=function(t){try{e(t)}catch(e){o.k.logError(`Failed to log web worker AppError. Error: ${(0,a.n)(e)}`)}},window.webWorker.onerror=S;var t,n;t={id:"WebWorkerError",type:"subscription"},n=e=>{if(e.payload&&"object"==typeof e.payload){const t=e.payload;t.pb={...t.pb,...(0,r.mnt)()},p(t)}else p({...r.ckW,message:"Web worker error",pb:{...r.ckW.pb,customMessage:JSON.stringify(e.payload||"")}})},d&&t&&"subscription"===t.type&&n&&(u.set(t.id,{type:"subscription",callback:n}),window.webWorker.postMessage(t)),setTimeout((()=>{window.webWorkerErrors&&Array.isArray(window.webWorkerErrors)&&(window.webWorkerErrors.forEach((e=>{S(e)})),delete window.webWorkerErrors)}))}function S(e){if(!e.filename)return d=!1,window._isWebWorkerPresent=d,window.webWorker.terminate(),void p({...r.ZI3,message:"Web worker script not found",pb:{...r.ZI3.pb,customMessage:JSON.stringify(C(e))}});p({...r.Z3R,message:"Web worker runtime error",pb:{...r.Z3R.pb,customMessage:JSON.stringify(C(e))}})}function C(e){return JSON.stringify({filename:e.filename,message:e.message,lineno:e.lineno})}var w;d=!1,l=!1,(0,s.N)()&&(d=void 0!==w?w:!!window.webWorker,window._isWebWorkerPresent=d,l=d),"edgeChromium"===c.jG.AppType&&(d=!1,c.jG.StaticDomain&&c.jG.StaticDomain.endsWith("cn")&&(l=!1)),(d||l)&&(window.webWorker.onmessage=e=>{const{data:t}=e,n=u.get(t.id);if(!n)return void g.set(t.id,t);"data"===n.type&&u.delete(t.id);const i=n.callback;i&&i(t)},setTimeout((()=>{window.webWorkerMessages&&Array.isArray(window.webWorkerMessages)&&(window.webWorkerMessages.forEach((e=>{e.id&&g.set(e.id,e)})),delete window.webWorkerMessages)})))},26181:function(e,t,n){"use strict";var i;n.d(t,{K:function(){return i}}),function(e){e[e.Banner=999999]="Banner",e[e.CookieWall=1100]="CookieWall",e[e.Dialog=900]="Dialog",e[e.Flyout=700]="Flyout",e[e.Overlay=600]="Overlay",e[e.Nav=500]="Nav",e[e.Over=300]="Over",e[e.Above=100]="Above",e[e.Default=0]="Default",e[e.Below=-1]="Below",e[e.Buried=-2]="Buried"}(i||(i={}))},30376:function(e,t,n){"use strict";n.d(t,{j:function(){return o}});var i=n(29597),r=n(31558);function o(){return(0,r.N)()?window.fetch.bind(window):i.br}},61153:function(e,t,n){"use strict";n.d(t,{L:function(){return c},j:function(){return d}});var i=n(31558);let r=!1,o=!1,a=!1;function s(){!r&&document.hidden?o=!0:"visible"===document.visibilityState&&(a=!0)}function c(){return o}function d(){return a}(0,i.N)()&&(window.addEventListener&&window.addEventListener("beforeunload",(function(){r=!0})),void 0!==document.hidden&&null!==document.hidden&&document.addEventListener("visibilitychange",s),s())},99528:function(e,t,n){"use strict";n.d(t,{R:function(){return r}});var i=n(34479);async function r(e=1){for(let t=0;t<e;t++)await(0,i.Kb)(0)}},54297:function(e,t,n){"use strict";n.d(t,{$o:function(){return a}});var i=n(18043),r=n(31558);class o extends i.C{constructor(){let e=null;if((0,r.N)())try{e=localStorage}catch(e){}super(e)}}function a(){return s}let s=new o},79993:function(e,t,n){"use strict";n.d(t,{D:function(){return s},z:function(){return c}});var i=n(7476),r=n(31558),o=n(54297),a=n(20196);function s(e){if((0,r.N)()){const t="storageTest";try{return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){(e||"function"==typeof e)&&e({...i.F0_,message:`Local Storage is not defined ${t}`})}}return!1}function c(e,t,n){const i=(0,o.$o)();return null!=i&&i.supported?()=>{let r;const o=i.getObject(e,null);let s=null;return o&&o.version===t&&null!==o.value?(s=o.value,r=n):(s=n(),r=()=>s),(0,a.C)((()=>i.setObject(e,{version:t,value:r()}))),s}:n}},7183:function(e,t,n){"use strict";n.d(t,{G:function(){return s},y7:function(){return a}});var i=n(18043),r=n(31558);class o extends i.C{constructor(){let e=null;if((0,r.N)())try{e="sessionStorage"in window&&window.sessionStorage}catch(e){}super(e)}}let a=new o;function s(){return a}},87188:function(e,t,n){"use strict";n.d(t,{g:function(){return o}});var i=n(7476),r=n(31558);function o(e){if((0,r.N)()){const t="storageTest";try{return window.sessionStorage.setItem(t,t),window.sessionStorage.removeItem(t),!0}catch(t){(e||"function"==typeof e)&&e({...i.EIi,message:`Session Storage is not defined: ${t}`})}}return!1}},18043:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var i=n(34832),r=n(76733);class o{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=(0,i.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(0,i.d)(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;r.k.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<this.storage.length;n++){const i=this.key(n);i&&i.includes(e)&&t.push(i)}for(let e=0;e<t.length;e++)this.removeItem(t[e])}}},84515:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});const i={backgroundInnerHolder:"backgroundInnerHolder",backgroundOuterHolder:"backgroundOuterHolder",cardAction:"cardAction",complianceHyperlink:"complianceHyperlink",feedToggle:"feedToggle",financeGreeting:"financeGreeting",following:"following",myInterests:"myInterests",gaming:"gaming",gridViewFeed:"gridViewFeed",headerSpaceHolder:"headerSpaceHolder",locationGreeting:"locationGreeting",marketSelector:"marketSelector",myFeed:"myFeed",navBar:"navBar",notificationBell:"notificationBell",nurturingCoachMark:"nurturingCoachMark",office365:"office365",overlayArticleReader:"overlayArticleReader",personalizeButton:"personalizeButton",pillWC:"pillWC",recommendedSites:"recommendedSites",rewardsIcon:"rewardsIcon",rewardsButton:"rewardsButton",rightRailSectionKey:"rightRailSectionKey",scrollableContainer:"scrollableContainer",searchBox:"search-box-edgenext",searchBoxInput:"searchBoxInput",searchBoxVoiceButton:"searchBoxVoiceButton",searchHistory:"searchHistoryEdgeNext",settingsButton:"SettingsButton",settingsCloseButton:"settingsCloseButton",settingsInformationalButton:"settingsInformationalButton",shoppingNav:"shoppingNav",signInButton:"signInButton",singleColumnFeedRoot:"singleColumnFeedRoot",superCoachMark:"superCoachMark",topSites:"topSites",unifiedMobileFeed:"unifiedMobileFeed",weatherNav:"weatherNav",waffle:"waffle",watchNav:"watchNav",waterfallViewFeed:"waterfallViewFeed",welcomeGreeting:"welcomeGreeting",navigationPage:"navigationPage",videoPlayButton:"videoPlayButton",imageEditButton:"imageEditButton",headerGrid:"headerGrid",floatButtonGroupWC:"floatButtonGroupWC",weatherHeroExperience:"weatherHeroExperience"}},66415:function(e,t,n){"use strict";n.d(t,{FY:function(){return s},b_:function(){return c},h_:function(){return d}});var i=n(45870),r=n(55524);const o=()=>r.Gq.get("__global-element-map_elementMap__",(()=>new Map)),a=()=>r.Gq.get("__global-element-map_waitForElementMap__",(()=>new Map));function s(e,t){if(!t)return;o().set(e,t);const n=a().get(e);n&&n.set(t)}function c(e){return e?o().get(e):null}function d(e){if(!e)return Promise.reject(null);const t=c(e);if(c(e))return Promise.resolve(t);const n=a();if(n.has(e))return n.get(e).getResultAsync();const r=new i.o;return n.set(e,r),r.getResultAsync()}},66963:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});var i=n(23549);class r{static registerTrackAppErrorEventCallback(e){e&&(this.trackAppErrorEventCallback=e)}static trackAppErrorEvent(e){this.trackAppErrorEventCallback&&this.trackAppErrorEventCallback(e)}}r.trackAppErrorEventCallback=e=>{i.M0&&i.M0.sendAppErrorEvent(e)}},53621:function(e,t,n){"use strict";n.r(t),n.d(t,{IrisDataConnector:function(){return O},IrisDataReducer:function(){return B},IrisImageHotSpotsDataValidator:function(){return $},IrisSurfaceName:function(){return u._l},RegisterErrorTrackingCallback:function(){return y.i},ToolingInfo:function(){return _},irisStorageUtility:function(){return i.Vv},isAadAccount:function(){return i.Jw}});var i=n(51683),r=n(93624),o=n(76733),a=n(7476),s=n(21789),c=n(54297),d=n(22140),l=n(92100),u=n(73348),p=n(52817),h=n(71568),g=n(63815),m=n(95063),f=n(59952),v=n(76166),y=n(66963),S=n(85205),C=n(14269);const w={edge:"1",chrome:"2",internetExplorer:"3",firefox:"4",safari:"5",chromium:"6",edgeChromium:"6",[C.Q.Android]:"12",[C.Q.Ios]:"13"},b={homePage:"1",edgedhp:"2",edgeChromiumdhp:"2",edgentp:"3",edgeChromiumntp:"3",windows:"7",windowsShell:"7",finance:"8",hub:"8",weather:"8",views:"9",microsoftNews:"11",mmxlauncher:"12"},T={[C.Q.Windows]:"WIN10",[C.Q.Macos]:"MACOS",[C.Q.Linux]:"LINUX",[C.Q.Xbox]:"OTHER",[C.Q.Android]:"ANDROID",[C.Q.Ios]:"IOS"};var k=n(59489),P=n(13334),I=n(60189),A=n(90351),E=n(95815),x=n(85663),M=n(67044);class L{static async runValidation(e,t){switch(e){case u._l.MSNAnaheimNewsNTPImages:case u._l.MSNAnaheimNewsNTPImages+u.Yq:{const n=!(0,x.isNullOrUndefined)(t)&&t,r=u.S5[e],a=i.Vv.hasUpdateTimeExpired(r,24),c=i.Vv.hasMarketChanged(r);if(!c&&!a&&!n||s.jG.IsFrePage)return void o.k.log(`IrisDataConnector: Image surface blocked: market changed - ${c}, has image expired - ${a}, dislike triggered - ${n}, FRE - ${s.jG.IsFrePage}.`);let d=null;const l=i.Vv.getImageInfo(r);if(n&&l){d={xSdkIaf:i.Vv.getDislikeList(l.dislikedCreatives)}}const p={addToCall:!0,headers:{...d},parameters:{...await this.getCallParametersWithSessionContext(e,"1")}};return o.k.log(`IrisDataConnector: Image surface validated: market changed - ${c}, has image expired - ${a}, dislike triggered - ${n}, FRE - ${s.jG.IsFrePage}.`),p}case u._l.MSNNewsCoachmark:case u._l.MSNNewsCoachmark+u.Yq:{const t=i.Vv.hasUpdateTimeExpired(u.S5[e],24),n=i.Vv.hasMarketChanged(u.S5[e]);if(!t&&!n)return void o.k.log(`IrisDataConnector: Coachmark surface blocked: last update time expired - ${t}, market changed - ${n}.`);const r={addToCall:!0,parameters:{...await this.getCallParametersWithSessionContext(e,"0")}};return o.k.log(`IrisDataConnector: Coachmark surface validated: last update time expired - ${t}, market changed - ${n}.`),r}case u._l.WinHPCoachmark:case u._l.WinHPCoachmark+u.Yq:if(!e.endsWith(".int")){const t=i.Vv.hasUpdateTimeExpired(u.S5[e],24),n=i.Vv.hasMarketChanged(u.S5[e]);if(!t&&!n)return void o.k.log(`IrisDataConnector: WinHP Coachmark surface blocked: last update time expired - ${t}, market changed - ${n}.`)}return{addToCall:!0,parameters:{...await this.getCallParametersWithSessionContext(e,"0")}};case u._l.ConditionalBanner:case u._l.ConditionalBanner+u.Yq:{const t=i.Vv.hasUpdateTimeExpired(u.S5[e],24),n=i.Vv.hasMarketChanged(u.S5[e]);if(!t&&!n)return void o.k.log(`IrisDataConnector: Conditional Banner surface blocked: last update time expired - ${t}, market changed - ${n}.`);const r={addToCall:!0,parameters:{...await this.getCallParametersWithSessionContext(e,"0"),...L.getConditionalBannerIrisCallParameters(e)}};return o.k.log(`IrisDataConnector: Conditional Banner surface validated: last update time expired - ${t}, market changed - ${n}.`),r}case u._l.MSNewsRewards:case u._l.MSNewsRewards+u.Yq:{const t=i.Vv.hasUpdateTimeExpired(u.S5[e],24),n=i.Vv.hasMarketChanged(u.S5[e]);if(!t&&!n)return void o.k.log(`IrisDataConnector: Rewards surface blocked: last update time expired - ${t}, market changed - ${n}.`);const r={addToCall:!0,parameters:{...await this.getCallParametersWithSessionContext(e,"0")}};return o.k.log(`IrisDataConnector: Rewards surface validated: last update time expired - ${t}, market changed - ${n}.`),r}default:return void y.i.trackAppErrorEvent({...a.i29,message:"Subscriber validation function not found.",pb:{...a.i29.pb,customMessage:"Subscriber: "+e}})}}static async getCallParametersWithSessionContext(e,t){const n={},r=[];n.nocookie="0"===t||"1"===t?t:"0";if("edgeChromium"===s.jG.AppType)for(const e in u.uS){const t=await i.Vv.getIrisSessionContextAttribute(u.uS[e]);(0,x.isNullOrUndefined)(t)||""===t?u.uS[e]!==u.uS.AcquisitionPath&&u.uS[e]!==u.uS.ConsumerVsEnterprise&&u.uS[e]!==u.uS.PrimaryBrowser&&u.uS[e]!==u.uS.DefaultBrowser&&r.push(u.uS[e]):n[u.uS[e]]=t}const o=this.getPageConfiguration();return""!==o&&(n.pageConfig=o),s.jG&&"edgeChromium"===s.jG.AppType&&""===o&&r.push("pg.c"),r.length>0&&y.i.trackAppErrorEvent({...a.UX3,message:"Missing parameters for subscriber",pb:{...a.UX3.pb,customMessage:`parameters ${r.toString()} for subscriber ${e}`}}),n}static getConditionalBannerIrisCallParameters(e){var t,n;const i={nocookie:"0"},r=(0,E.ej)(P.Al.AnonCookieName);i.ISSIGNEDIN=r?"1":"0";const o=(0,A.Z)(P.Al,"ClientSettings.apptype"),c=(0,A.Z)(P.Al,"ClientSettings.pagetype"),d=L.mapCanvasId(o,c),l=null===s.jG||void 0===s.jG||null===(t=s.jG.CurrentRequestTargetScope)||void 0===t?void 0:t.os;d&&(i.MSN_CANVAS=d),l&&("edge"===o&&l===C.Q.Windows?i.OPSYS="WIN10":"homePage"!==o&&"views"!==o||(i.OPSYS=T[l]));const u=(0,A.Z)(P.Al,"ClientSettings.browser"),p=(0,A.Z)(P.Al,"ClientSettings.deviceFormFactor"),h="TRUE"===(null==u||null===(n=u.ismobile)||void 0===n?void 0:n.toUpperCase())||"phone"===p?"1":"0";let g;i.ISMOBILE=h,!l||"1"!==h||"homePage"!==o&&"views"!==o?u&&(g=w[u.browserType]):g=w[l],g&&(i.BROWSER=g);const m=[];return"ISSIGNEDIN"in i||m.push("ISSIGNEDIN"),"MSN_CANVAS"in i||m.push("MSN_CANVAS"),"ISMOBILE"in i||m.push("ISMOBILE"),"BROWSER"in i||m.push("BROWSER"),m.length>0&&y.i.trackAppErrorEvent({...a.MWq,message:"Missing parameters for subscriber",pb:{...a.MWq.pb,customMessage:`parameters ${m.toString()} for subscriber ${e}`}}),i}static getPageConfiguration(){if(s.jG&&"edgeChromium"!==s.jG.AppType)return"";const e=(0,M.K0)(S.z.ChromiumPageSettings);if(!e)return"";const t=e.getCurrentState();if(!t)return"";let n=!1;"function"==typeof e.getPrimaryAccountInfoAsync&&e.getPrimaryAccountInfoAsync().then((e=>{n=e.accountType===k.l.MSA}));const i=(0,I.y)(t,n);return i&&!isNaN(i)?i.toString():void 0}static mapCanvasId(e,t){let n=null;switch(e){case"edge":case"edgeChromium":case"mmx":n=[e+t];break;default:n=e}return b[n]}}var D=n(23549),R=n(78672),F=n(67213);class O extends v.e{constructor(e,t,n,r,o,a,d){if(super(e,t,n,r,o,a,d),this.availableCreatives=new Map,this.headers=[void 0],this.queryParameters=[void 0],this.surfaceInfoMap=new Map,a.disableIrisCalls||!a.subscribers)return void(this.callWasMade=!1);this.irisDataPromise=new Promise((async e=>{await i.Vv.configDataPromise,i.Vv.IrisDataConfig=a,this.appType=s.jG&&s.jG.AppType,this.internalPlacementUsed=this.config.isInternal||(0,u.cF)(),this.appType?(this.isBlackoutPeriodOver="edgeChromium"!==this.appType||await i.Vv.isBlackoutPeriodOver(),await i.Vv.populateCachedSurfaceMap(),Object.keys(this.config.subscribers).forEach((async e=>{const t=this.internalPlacementUsed?e+u.Yq:e,n=u.S5[t],r=i.Vv.getCachedSurface(n);r&&r.placement&&this.surfaceInfoMap.set(n,r)})),await this.prepareCallData(),!this.queryParameters||this.queryParameters.length<1?this.callWasMade=!1:(this.callIris(),this.callWasMade=!0),e()):this.callWasMade=!1})),this.irisDataPromise;const l=this.config.subscribers;Object.keys(l).forEach((e=>{const t=l[e].captureInitialStateOfCampaigns;if(t)for(const e in t)(0,c.$o)().getObject(e)&&D.M0.addOrUpdateTmplString(`userEligibleToSeeCoachmark_${e}:1`)}))}sendActionUpdate(e,t,n,r,a){let s;e&&t&&!this.isImagePlacement(e)&&(n===p.R.Impression?i.Vv.markCreativeAsSeenByUser(e,t):i.Vv.updateAction(e,t,a),i.Vv.persistAllSurfaces()),s=n===p.R.Impression?r.impressionUrl:h._.formatTelemetryActionUrl(r.actionUrl,a);try{g.c.sendActionUpdate(s)}catch(e){o.k.log(`IrisDataConnector: Failed to report iris action update beacon due to error: ${JSON.stringify(e)}`)}}async getImagePayload(e){return e&&(await this.prepareCallData(!0),this.callIris(),this.callWasMade=!0),await this.getPayload(u._l.MSNAnaheimNewsNTPImages)}async tryGetPreviousImagePayload(){return await this.getPayload(u._l.MSNAnaheimNewsNTPImages,!0)}clearPreviousImagePayload(){this.surfaceInfoMap.delete(u.S5[u._l.MSNAnaheimNewsNTPImages+u.u7])}async getPayload(e,t=!1){await this.irisDataPromise,this.callWasMade&&await this.callIrisPromise;let n=this.shouldUseRequestedIrisSurface();if(n&&n===e){this.internalPlacementUsed&&(n+=u.Yq);const e=u.S5[n];return await this.tryGetSurfaceInfo(e)}let i=e;if(this.internalPlacementUsed?i=e+u.Yq:t&&(i=e+u.u7),!(0,x.isNullOrUndefined)(u.S5[i])){const e=u.S5[i];return await this.tryGetSurfaceInfo(e)}return o.k.log(`IrisDataConnector: Surface requested ${i} was not found. `),null}async tryGetSurfaceInfoInternal(e){if(!this.surfaceInfoMap.has(e))return o.k.log(`IrisDataConnector: Placement: ${e} was not populated by local/persistent storage nor downloaded by network call.`),null;let t=this.surfaceInfoMap.get(e);return t=i.Vv.getSurfaceWithSelectedCreative(t),t}async tryGetSurfaceInfo(e){if(!this.surfaceInfoMap.has(e))return o.k.log(`IrisDataConnector: Placement: ${e} was not populated by local/persistent storage nor downloaded by network call.`),null;let t=this.surfaceInfoMap.get(e);return u.S5[u._l.MSNAnaheimNewsNTPImages]===e||u.S5[u._l.MSNAnaheimNewsNTPImages+u.u7]===e||u.S5[u._l.MSNAnaheimNewsNTPImages+u.Yq]===e||this.shouldBlockPsl()?t:await(0,i.Jw)()?(o.k.log(`IrisDataConnector: This is AAD user so not returning SurfaceInfo for: ${e} to experience.`),null):i.Vv.haveWeShownCurrentCreativeRecently(t)?(o.k.log(`IrisDataConnector: Already shown a campaign within 14 days so not returning SurfaceInfo for: ${e} to experience.`),null):i.Vv.haveWeShownCreativeTooManyTimes(t)?(o.k.log(`IrisDataConnector: Already shown a campaign too many times: ${e}.`),null):(t=i.Vv.getSurfaceWithSelectedCreative(t),t.creatives.length>0&&t.creatives[0].creativeId===this.creativeToShowUser?(o.k.log(`IrisDataConnector: Returning SurfaceInfo for: ${e} to experience.`),t):(o.k.log(`IrisDataConnector: Tried to return unselected campaign: ${e}.`),null))}async prepareCallData(e){this.queryParameters=[null],this.headers=[null];const t=[],n=[];let r,o,s=[];for(const l of Object.keys(this.config.subscribers)){let p;if(!this.config.subscribers[l].active)continue;const h=this.queryParameters.length,g=this.internalPlacementUsed?l+u.Yq:l,v=u.S5[g];if(!v){y.i.trackAppErrorEvent({...a.LRf,message:"Subscriber not found in iris placement dictionary",pb:{...a.LRf.pb,customMessage:`Subscriber ${g} not found in dictionary`}});continue}const S=this.isImagePlacement(v),C=!(0,x.isNullOrUndefined)(e)&&e;if(!S&&(C||!this.isBlackoutPeriodOver))continue;const{creativeCount:w,performValidation:b,staticQueryParams:T,aflights:k}=this.config.subscribers[l];let P,I,A;if(this.config.enableBackgroundGallery&&S&&!e&&(P=await m.p.getBackgroundGalleryEligibilityAsync()),P){const e=await m.p.getBackgroundPreferences();I=e&&e.changeBackgroundDaily,A=e&&e.backgroundSelectionMetadata}if(I&&A&&"Iris"===A.provider)continue;if(b&&(p=await L.runValidation(g,C),!p||!p.addToCall))continue;!S||e||i.Vv.hasMarketChanged(v)||(this.previousNtpSurfaceInfoInRotation=this.surfaceInfoMap.get(v)),this.config.enableBackgroundGallery&&S&&(0,c.$o)().removeItem(f.gf);let E=w||1;E=p&&p.parameters&&p.parameters.bcnt?p.parameters.bcnt:E,E<=0?y.i.trackAppErrorEvent({...a.TVf,message:"Creative count value is negative or zero",pb:{...a.TVf.pb,customMessage:`Creative count value is negative or zero : ${g}`}}):(S?this.queryParameters[h]={bcnt:E,placement:v}:(n.push(E),t.push(v)),d.b.isNotNullOrUndefined(T)&&(S?this.queryParameters[h]={...this.queryParameters[h],...T}:o={...o,...T}),p&&p.parameters&&d.b.isNotNullOrUndefined(p.parameters)&&(S?this.queryParameters[h]={...this.queryParameters[h],...p.parameters}:o={...o,...p.parameters}),p&&p.headers&&d.b.isNotNullOrUndefined(p.headers)&&(S?this.headers[h]=p.headers:this.headers[0]={...this.headers[0],...p.headers}),d.b.isNotNullOrUndefined(k)&&"object"==typeof k&&(S?this.queryParameters[h].aflights=k.join(";"):s=k),u.S5[u._l.MSNNewsCoachmark+u.Yq]===v&&(r=(0,u.M1)()))}if(d.b.isNotNullOrUndefined(this.config.dynamicQueryParams)){o={...o,...this.config.dynamicQueryParams};for(let e=1;e<this.queryParameters.length;e++)this.queryParameters[e]={...this.queryParameters[e],...this.config.dynamicQueryParams}}t.length>0&&(this.queryParameters[0]=o||{placement:void 0},this.queryParameters[0].placement=t.join("|"),this.queryParameters[0].bcnt=n.join("|"),this.queryParameters[0].aflights=s.join(";"),r&&parseInt(r)>-1&&(this.queryParameters[0].testingNum=r));const l=(await(0,F.a)()).join(";");for(let e=0;e<this.queryParameters.length;e++)this.queryParameters[e]&&(this.queryParameters[e].SCS_msNtpExp=l||"");const p=(0,u.So)();if(p)for(let e=0;e<this.queryParameters.length;e++)this.queryParameters[e]&&(this.queryParameters[e].ocid=p)}callIris(){this.callIrisPromise=new Promise((async e=>{try{for(let e=0;e<this.queryParameters.length;e++){if((0,x.isNullOrUndefined)(this.queryParameters[e]))continue;this.surfaceCollectionContext=await g.c.requestSurfaceInfo(this.queryParameters[e],this.headers[e]);const t=this.getSurfacesFromCollection();await i.Vv.addSurfacesToStorage(t)}}catch(e){this.callWasMade=!1,D.M0.sendAppErrorEvent({...a.IrA,message:"IrisDataConnector: Exception requesting iris surfaces from data connector.",pb:{...a.IrA.pb,customMessage:`Error: ${JSON.stringify(e)} requestUrl: ${this.config.irisEndpoint} queryParameters: ${JSON.stringify(this.queryParameters)} headers: ${JSON.stringify(this.headers)}`}})}e()})),this.callIrisPromise}getSurfacesFromCollection(){const e=this.config.subscribers;if(!(e&&this.surfaceCollectionContext&&this.surfaceCollectionContext.collection&&this.surfaceCollectionContext.reqContext&&this.surfaceCollectionContext.reqContext.queryParams&&this.surfaceCollectionContext.reqContext.queryParams.placement))return D.M0.sendAppErrorEvent({...a.cZM,message:`Surface collection context missing parameters. Surface Context: ${JSON.stringify(this.surfaceCollectionContext)}`}),null;const t=[];Object.keys(e).forEach((n=>{const i=this.getSurfaceFromCollection(n);if(i&&i.placement){if(o.k.log(`IrisDataConnector: Parsed response for ${i.placement} from Iris network call. Now adding to map.`),t.push(i),this.surfaceInfoMap.set(i.placement,i),this.isImagePlacement(i.placement)){const e=u.S5[u._l.MSNAnaheimNewsNTPImages+u.u7];this.previousNtpSurfaceInfoInRotation&&this.surfaceInfoMap.set(e,this.previousNtpSurfaceInfoInRotation)}this.captureInitialEligibilityStateOfCampaigns(i,e[n].captureInitialStateOfCampaigns)}}));const n=this.shouldUseRequestedIrisSurface(),i=this.internalPlacementUsed&&n?n+u.Yq:n;if((0,x.isNullOrUndefined)(i)){const e=Math.floor(Math.random()*(t.length-1));let n=0;this.availableCreatives.forEach(((t,i)=>{e!==n?n++:this.creativeToShowUser=this.availableCreatives.get(i)}))}else this.creativeToShowUser=this.availableCreatives.get(u.S5[i]);return t}getSurfaceFromCollection(e){const t=this.internalPlacementUsed?e+u.Yq:e,n=u.S5[t];if(this.surfaceCollectionContext.collection.hasUnclaimedErrors()){this.surfaceCollectionContext.collection.getUnclaimedErrors().forEach((e=>{2040!=(e&&e.code?e.code:e.errors&&e.errors.length>0&&e.errors[0].code)&&y.i.trackAppErrorEvent({...a.jWk,message:"Surface errors discovered",pb:{...a.jWk.pb,customMessage:`Error with surface: ${t} Code: ${e.code} Message: ${e.msg} queryParams: ${JSON.stringify(this.surfaceCollectionContext.reqContext.queryParams)}`}})}))}const i=this.surfaceCollectionContext.collection.get(n);return i&&i.placement&&i.creatives&&i.creatives.length>0&&!this.isImagePlacement(i.placement)&&this.availableCreatives.set(i.placement,i.creatives[0].creativeId),i}captureInitialEligibilityStateOfCampaigns(e,t){e.creatives&&t&&"object"==typeof t&&e.creatives.forEach((n=>{let i=!1;for(const r in t)if(e.placement===t[r]&&n.creativeId===r){i=!0;break}const r=(0,c.$o)().getObject(n.creativeId);(0,x.isNullOrUndefined)(r)&&(0,c.$o)().setObject(n.creativeId,i)}))}shouldUseRequestedIrisSurface(){const e=(0,R.zp)();if(e){const t=l.c.getQueryParameterByName("irisSurface",e);if(t)return t}return null}shouldBlockPsl(){const e=(0,R.zp)();if(e){const t=l.c.getQueryParameterByName("blockPsl",e);if(t)return"true"===t.toLocaleLowerCase()}return!1}isImagePlacement(e){return u.S5[u._l.MSNAnaheimNewsNTPImages]===e||u.S5[u._l.MSNAnaheimNewsNTPImages+u.Yq]===e}fetchedNewImage(){const e=this.internalPlacementUsed?u._l.MSNAnaheimNewsNTPImages+u.Yq:u._l.MSNAnaheimNewsNTPImages,t=u.S5[e],n=this.surfaceCollectionContext&&this.surfaceCollectionContext.collection&&this.surfaceCollectionContext.collection.get(t);return!(0,x.isNullOrUndefined)(n)}resetImageLastUpdateTime(){const e=this.internalPlacementUsed?u._l.MSNAnaheimNewsNTPImages+u.Yq:u._l.MSNAnaheimNewsNTPImages,t=u.S5[e];i.Vv.resetSurfaceLastUpdateTime(t)}}class B{reduce(){return null}}var N=n(87095);class ${static hasCTASupportData(e){return!(0,x.isNullOrUndefined)(e)&&this.stringHasLength(e.cta)}static hasHotSpotData(e){return!(0,x.isNullOrUndefined)(e)&&e.hs&&"object"==typeof e.hs&&e.hs.length>0}static hasImageData(e){return!(0,x.isNullOrUndefined)(e)&&this.stringHasLength(e.LANDSCAPE)&&this.stringHasLength(e.PORTRAIT)}static hasImageRefreshData(e){return!(0,x.isNullOrUndefined)(e)&&this.stringHasLength(e.update_period)}static hasMuseumData(e){return!(0,x.isNullOrUndefined)(e)&&this.stringHasLength(e.title)&&this.stringHasLength(e.copyright)}static hasPositionData(e){return this.stringHasLength(e.x_percent)&&this.stringHasLength(e.y_percent)&&e.x_percent.length<=this.MaxPositionLength&&e.y_percent.length<=this.MaxPositionLength&&/^0?\.\d{1,3}$/.test(e.x_percent)&&/^0?\.\d{1,3}$/.test(e.y_percent)}static hasPositions(e){return!(0,x.isNullOrUndefined)(e.landscape)&&this.hasPositionData(e.landscape)&&!(0,x.isNullOrUndefined)(e.portrait)&&this.hasPositionData(e.portrait)}static hasTelemetryIndex(e){return this.stringHasLength(e.hs)}static hasTextComponents(e){return this.stringHasLength(e.title)}static hasValidCTAType(e){return!((0,x.isNullOrUndefined)(e)||!this.stringHasLength(e.cta_type)||e.cta_type!==N.W.offPageNavigation)}static hotSpotIsValid(e){return!(0,x.isNullOrUndefined)(e)&&this.hasTelemetryIndex(e)&&this.hasTextComponents(e)&&this.hasPositions(e)}static isValidImageHotSpotsCreative(e){return $.hasImageData(e)&&$.hasImageRefreshData(e)}static isValidStoredData(e){return!(0,x.isNullOrUndefined)(e)&&!(0,x.isNullOrUndefined)(e.imgExpiration)&&this.stringHasLength(e.imgLandURL)&&this.stringHasLength(e.imgPortURL)&&this.stringHasLength(e.reqMarket)}static stringHasLength(e){return!(0,x.isNullOrUndefined)(e)&&"string"==typeof e&&e.length>0}static hasValidCTASupportData(e,t){return!(!e||!t)&&(e===N.W.offPageNavigation&&this.isValidOffPageNavData(t))}static isValidOffPageNavData(e){return/^((microsoft-edge:)?https:\/\/((www)|(cn)|(go))\.((msn)|(bing)|(skype)|(microsoft))\.com)|(edge:\/\/)/.test(e)}}$.MaxPositionLength=5;var U=n(88642);const _={experienceConfigSchema:r.IrisDataConfigSchema,mockConfig:U.mockConfig}},51683:function(e,t,n){"use strict";n.d(t,{Vv:function(){return b},Jw:function(){return T}});var i=n(76733),r=n(7476),o=n(87172),a=n(23549);const s=new class{getAllCampaigns(){return new Promise((async e=>{try{await o.U.isApiAvailableToUse()?o.U.getPreferenceSetting("campaigns").then((t=>{const n=t&&t.value;n||i.k.logError("PSL: window.chrome.ntpSettingsPrivate.getPref does not have campaigns."),e(n||[])})):(a.M0.sendAppErrorEvent({...r.f_s,message:"PSL: Error fetching campaigns due to window.chrome.ntpSettingsPrivate.getPref api not available for this version of EDGE"}),i.k.logError("PSL: Error fetching campaigns due to window.chrome.ntpSettingsPrivate.getPref api not available for this version of EDGE"),e([]))}catch(t){a.M0.sendAppErrorEvent({...r.CBf,message:`PSL fetch error. ${JSON.stringify(t)}`}),i.k.logError(t),e([])}}))}persistCampaigns(e){return new Promise((async t=>{try{await o.U.isApiAvailableToUse()?(await o.U.savePreferenceSetting("campaigns",e),i.k.log(`PSL: Number of campaigns persisted: ${e.length||0}.`),t(!0)):(a.M0.sendAppErrorEvent({...r.RLb,message:"PSL: Error persisting campaigns due to window.chrome.ntpSettingsPrivate.getPref api not available for this version of EDGE"}),i.k.logError("PSL: Error persisting campaigns due to window.chrome.ntpSettingsPrivate.getPref api not available for this version of EDGE"))}catch(e){a.M0.sendAppErrorEvent({...r.CBf,message:`PSL persist error. ${JSON.stringify(e)}`}),i.k.logError(e)}t(!1)}))}clearPersistentStorage(){return this.persistCampaigns([])}};var c=n(54297);const d=new class{constructor(){this.storageKey="irisNewsLocalStorage"}getAllCampaigns(){try{return(0,c.$o)().getObject(this.storageKey)}catch(e){return i.k.logError(`Exception ${e} occurred retrieving user nurturing campaigns from local storage`),[]}}storeCampaigns(e){try{return(0,c.$o)().setObject(this.storageKey,e),i.k.log(`Number of campaigns persisted in local storage: ${e.length||0}.`),!0}catch(e){return i.k.logError(`Exception ${e} occurred storing user nurturing campaigns in local storage`),!1}}clearLocalStorage(){return this.storeCampaigns([])}};var l=n(21789),u=n(92100),p=n(22140),h=n(13334),g=n(83102),m=n(43438),f=n(73348),v=n(31558),y=n(78672),S=n(68054),C=n(66963),w=n(85663);const b=new class{constructor(){this.cachedSurfaceMap=new Map,this.enabledFeatures=[],this.irisSessionContextAttributes=new Map,this.millisecondsInADay=864e5,this.timeNow=(new Date).getTime(),(0,v.N)()&&(this.appType=l.jG&&l.jG.AppType,"edgeChromium"===this.appType&&(this.configDataPromise=this.getConfigDataAsync()),this.currentURL=(0,y.zp)())}get isEnabled(){return!!this.shouldUseCache()||!(!this.irisDataConfig||!this.irisDataConfig.enableCaching)&&this.isCookieConsentNotRequired()}set IrisDataConfig(e){this.irisDataConfig=e}clearCachedSurfaceMap(){this.isEnabled&&this.cachedSurfaceMap.clear()}async populateCachedSurfaceMap(){if(this.isEnabled)try{if(this.purgeCacheWithQsp())return await this.clearCachedSurfacesFromStorage(),void i.k.log("Cache purged!");this.clearCachedSurfaceMap();let e=[];if(e="edgeChromium"===l.jG.AppType?await s.getAllCampaigns():d.getAllCampaigns(),!e||0===e.length)return void i.k.log("Bulk read of surfaces from local/persistent storage didn't return a surface.");const{subscribers:t}=this.irisDataConfig,n=[];Object.keys(t).forEach((e=>{t[e].active||n.push(f.S5[e])})),e.forEach((e=>{e&&e.placement&&(0===n.length||-1===n.indexOf(e.placement))&&(this.cachedSurfaceMap.set(e.placement,e),i.k.log(`Populated ${e.placement} from local/persistent storage.`))}))}catch(e){i.k.logError(`Bulk read of surfaces from local/persistent storage threw error: ${e}`)}}getCachedSurface(e){if(!e||0===e.length||0===this.cachedSurfaceMap.size)return null;if(!this.cachedSurfaceMap.has(e))return null;const t=this.cachedSurfaceMap.get(e);return t&&t.creatives&&0!==t.creatives.length?t:null}addSurfaceToCachedSurfaceMap(e){if(!e||!e.placement)return;const t=e.placement,n=new Map;let r;if(this.cachedSurfaceMap.has(t)&&(r=this.cachedSurfaceMap.get(t),r.creatives.forEach((e=>{n.set(e.creativeId,e)}))),e.creatives&&e.creatives.length>0){const t=(0,f.cF)()?f._l.MSNAnaheimNewsNTPImages+f.Yq:f._l.MSNAnaheimNewsNTPImages,i=f.S5[t];if(e.placement===i){if(r&&r.imageInfo)e.imageInfo=r.imageInfo;else{const t={dislikedCreatives:[],dislikedCreativeCountCurrentPeriod:0};e.imageInfo=t}this.hasUpdateTimeExpired(i,24)&&(e.imageInfo.dislikedCreativeCountCurrentPeriod=0),n.clear(),n.set(e.creatives[0].creativeId,e.creatives[0])}e.creatives.forEach((e=>{const t=n.get(e.creativeId);if(t&&(t.content=e.content,n.set(e.creativeId,t)),!t){const t={lastAddedTime:this.timeNow,useCount:0,useTime:0};e.storageInfo=t,n.set(e.creativeId,e)}}))}e.creatives=[...n.values()],this.cachedSurfaceMap.set(t,e),i.k.log(`Adding/Updating SurfaceInfo ${t} in storage.`)}async addSurfacesToStorage(e){e&&e.length>0&&(e.forEach((e=>{this.addSurfaceToCachedSurfaceMap(e)})),await this.persistAllSurfaces())}async persistAllSurfaces(){if(this.isEnabled){if("edgeChromium"===l.jG.AppType)return void await s.persistCampaigns([...this.cachedSurfaceMap.values()]);d.storeCampaigns([...this.cachedSurfaceMap.values()])}}async clearCachedSurfacesFromStorage(){this.isEnabled&&(this.clearCachedSurfaceMap(),"edgeChromium"!==l.jG.AppType?d.clearLocalStorage():await s.clearPersistentStorage())}async resetSurfaceLastUpdateTime(e){if(!this.isEnabled&&!this.cachedSurfaceMap.get(e))return;const t=this.cachedSurfaceMap.get(e);t.lastUpdatedTime=-1,this.cachedSurfaceMap.set(e,t),this.persistAllSurfaces()}getCachedSurfaceMap(){return this.cachedSurfaceMap}haveWeShownCurrentCreativeRecently(e){if((0,w.isNullOrUndefined)(e.currentCreativeId))return!0;if(this.ignoreCreativeUseTime())return!1;let t=!0;return e.creatives.forEach((n=>{n.creativeId===e.currentCreativeId&&n.storageInfo&&n.storageInfo.useTime+14*this.millisecondsInADay<this.timeNow&&(t=!1)})),t}haveWeShownCreativeTooManyTimes(e){if((0,w.isNullOrUndefined)(e)||(0,w.isNullOrUndefined)(e.currentCreativeId))return!0;if(this.ignoreMaxCapPerCreative())return!1;let t=!0;return e.creatives.forEach((n=>{e.currentCreativeId===n.creativeId&&n.storageInfo&&n.storageInfo.useCount<=2&&(t=!1)})),t}getSurfaceWithSelectedCreative(e){if((0,w.isNullOrUndefined)(e.currentCreativeId))return null;let t;return e.creatives.forEach((n=>{e.currentCreativeId===n.creativeId&&(t=n)})),{...e,creatives:[t]}}updateAction(e,t,n){if(e&&t&&this.cachedSurfaceMap.has(e)){const i=this.cachedSurfaceMap.get(e);i&&i.creatives&&i.creatives.forEach((e=>{e.creativeId===t&&e.storageInfo&&(e.storageInfo.irisAction=n)}))}}markCreativeAsSeenByUser(e,t){if(e&&t&&this.cachedSurfaceMap.has(e)){const n=this.cachedSurfaceMap.get(e);n&&n.creatives&&n.creatives.forEach((e=>{e&&e.creativeId&&e.creativeId===t&&e.storageInfo&&(e.storageInfo.useCount++,e.storageInfo.lastAddedTime=this.timeNow,e.storageInfo.useTime=this.timeNow)}))}}updateCreativeLatestAddedTime(e,t,n){if(!this.cachedSurfaceMap.has(e))return;const i=this.cachedSurfaceMap.get(e);i&&i.creatives&&0!==i.creatives.length&&i.creatives.forEach((e=>{e&&e.creativeId===t&&e.storageInfo&&e.storageInfo.lastAddedTime&&(e.storageInfo.lastAddedTime=n)}))}purgeCacheWithQsp(){if(this.currentURL){const e=u.c.getQueryParameterByName("purgeCache",this.currentURL);if(e&&"true"===e.toLocaleLowerCase())return!0}return!1}shouldUseCache(){if(this.currentURL){const e=u.c.getQueryParameterByName("useCache",this.currentURL);if(e)return"true"===e.toLocaleLowerCase()}return!1}ignoreMaxCapPerCreative(){if(this.currentURL){const e=u.c.getQueryParameterByName("ignoreMaxCapPerCreative",this.currentURL);if(e)return"true"===e.toLocaleLowerCase()}return!1}ignoreUpdateTimeExpiration(){if(this.currentURL){const e=u.c.getQueryParameterByName("ignoreUpdateTimeExpiration",this.currentURL);if(e)return"true"===e.toLocaleLowerCase()}return!1}ignoreCreativeUseTime(){if(this.currentURL){const e=u.c.getQueryParameterByName("ignoreCreativeUseTime",this.currentURL);if(e)return"true"===e.toLocaleLowerCase()}return!1}ignoreBlackout(){if(this.currentURL){const e=u.c.getQueryParameterByName("ignoreBlackout",this.currentURL);if(e)return"true"===e.toLocaleLowerCase()}return!1}isCookieConsentNotRequired(){return m.A.get(m.U.CookieConsentStatus)===S._.NotRequired}async getConfigDataAsync(){return this.getConfigDataPromise=new Promise((e=>{try{(0,v.N)()&&window&&window.chrome&&window.chrome.ntpSettingsPrivate&&"function"==typeof window.chrome.ntpSettingsPrivate.getConfigData?window.chrome.ntpSettingsPrivate.getConfigData((t=>{void 0!==t?(this.profileCreationTimeInMs=t.profileCreationTime,this.enabledFeatures=t.enabledFeatures,this.setIrisSessionContextAttributes(t.irisAttributes),this.configData=t,e()):(C.i.trackAppErrorEvent({...r.Zt_,message:"Config data is undefined"}),e())})):(C.i.trackAppErrorEvent({...r.Ez4,message:"Failed to fetch config data from chromium API"}),e())}catch(t){C.i.trackAppErrorEvent({...r._bN,message:"Exception fetching config data from chromium API",pb:{...r._bN.pb,customMessage:`Exception: ${t}`}}),e()}})),this.getConfigDataPromise}async isBlackoutPeriodOver(){if(this.ignoreBlackout())return!0;if("edgeChromium"===this.appType){if(l.jG.IsFrePage)return!1;await this.getConfigDataPromise}const e=this.irisDataConfig.blackoutPeriodInDays&&this.irisDataConfig.blackoutPeriodInDays*this.millisecondsInADay||7*this.millisecondsInADay;return!!this.profileCreationTimeInMs&&this.timeNow-this.profileCreationTimeInMs>e}async getIrisSessionContextAttribute(e){return"edgeChromium"===this.appType&&await this.getConfigDataPromise,this.irisSessionContextAttributes.has(e)?this.irisSessionContextAttributes.get(e):""}setIrisSessionContextAttributes(e){if(p.b.isNotNullOrUndefined(e)&&e.length>0){e.startsWith("&")&&e.length>=1&&(e=e.substring(1));e.split("&").map((e=>e.split("="))).forEach((e=>{this.irisSessionContextAttributes.set(e[0],e[1])}))}}getConfigData(){return this.configData}hasUpdateTimeExpired(e,t){if(this.ignoreUpdateTimeExpiration())return!0;const n=this.cachedSurfaceMap.get(e);if((0,w.isNullOrUndefined)(n))return i.k.log(`IrisDataConnector: Has update time expired. placement: ${e}. Placement not in PSL.`),!0;const r=(0,w.isNullOrUndefined)(n.lastUpdatedTime)?-1:n.lastUpdatedTime;if(r<0)return i.k.log(`IrisDataConnector: Has update time expired. placement: ${e}. Invalid lastUpdatedTime.`),!0;const o=r+36e5*t;return i.k.log(`IrisDataConnector: Has update time expired. placement: ${e}. Current time: ${this.timeNow}, lastUpdatedTime: ${o}. Result: ${o<this.timeNow}`),o<this.timeNow}getDislikeList(e){return e&&e.length>0?e.join(";"):""}hasMarketChanged(e){const t=this.cachedSurfaceMap.get(e);if((0,w.isNullOrUndefined)(t))return i.k.log(`IrisDataConnector: has market changed. placement: ${e}. Placement not in PSL.`),!0;const n=!!(0,w.isNullOrUndefined)(t.lastUpdatedMarket)||t.lastUpdatedMarket!==l.jG.CurrentMarket;return i.k.log(`IrisDataConnector: has market changed. placement: ${e} - ${n}.`),n}getImageInfo(e){const t=this.cachedSurfaceMap.get(e);return t&&t.imageInfo?t.imageInfo:null}addImageCreativeToDislikeList(){const e=(0,f.cF)()?f.S5[f._l.MSNAnaheimNewsNTPImages+f.Yq]:f.S5[f._l.MSNAnaheimNewsNTPImages],t=this.cachedSurfaceMap.get(e),n=t.creatives[0].creativeId;if((0,w.isNullOrUndefined)(t)||(0,w.isNullOrUndefined)(t.imageInfo))return!1;if(t.imageInfo.dislikedCreativeCountCurrentPeriod>=5)return!1;if((0,w.isNullOrUndefined)(t.imageInfo.dislikedCreatives))t.imageInfo.dislikedCreatives=[n];else{const e=t.imageInfo.dislikedCreatives.length;let i=!1;if(t.imageInfo.dislikedCreatives.forEach((e=>{e!==n||(i=!0)})),i)return!0;e>=20&&t.imageInfo.dislikedCreatives.shift(),t.imageInfo.dislikedCreatives.push(n)}return t.imageInfo.dislikedCreativeCountCurrentPeriod+=1,b.persistAllSurfaces(),!0}};async function T(){await l.jG.AccountInfoPromise;const e=l.jG.ResolvedAccountInfo;return(0,w.isNullOrUndefined)(h.Al.AadState)?g.Qm.AAD===(e&&e.account_type):h.Al.AadState}},71568:function(e,t,n){"use strict";n.d(t,{_:function(){return u}});var i=n(7476),r=n(76733),o=n(8037),a=n(13015),s=n(73348),c=n(23549),d=n(21789),l=n(85663);class u{static createIrisRequestContext(e,t){return{queryParams:e,...t?{includedHeaders:t}:{}}}static async callIris(e){if((0,l.isNullOrUndefined)(e))throw o.l.create(o.N.MissingContext,"IRIS: Request context undefined or null",i.YSG,`Request context: ${JSON.stringify(e)}`);const t=this.validateQParams(e.queryParams);if(t)throw o.l.create(o.N.QueryParametersInvalid,"IRIS: Invalid query parameters",i.LIN,`Error validating query parameters: ${t} query parameters: ${JSON.stringify(e.queryParams)}`);const n=u.generateGuid();e.queryParams.asid=n;const d=this.assembleQParameters(e.queryParams),p=this.formatQParameters(d),h=new URL(s.TY+"?"+p),g=this.getHeaders(e.includedHeaders),m=this.getRequestInit(g);let f;const v=(0,a.zq)();setTimeout((()=>{f="Timeout occurred.",v.resolve()}),s.KI);const y=await Promise.race([v.waiting,fetch(h,m).catch((e=>{f=`Fetch failure caused by ${JSON.stringify(e)}`}))]),S=y&&y.status;if(!y||S&&!(S>=200&&S<300))throw f&&(/^Timeout/.test(f)||/^Fetch/.test(f))&&(r.k.log(`Iris: Arc call failed due to ${f}`),c.M0.sendAppErrorEvent({...i.S2e,message:`Arc call failed due to ${f}`})),o.l.create(o.N.ResponseFailure,"Iris: Arc call failed.",i._ig,`Request url: ${h} Response status code: ${S} Response: ${JSON.stringify(y)}`);let C;try{if(C=await y.text(),!C)throw"empty response body";const t=JSON.parse(C);if(!t)throw"error parsing json response";return{parsedResponse:t,reqContext:e}}catch(e){const t=C??y;throw o.l.create(o.N.ResponseFailure,`Iris: Unable to parse iris resposne due to ${e}`,i.hnc,`Request url: ${h} Response status code: ${S} Response: ${JSON.stringify(t)}`)}}static formatTelemetryActionUrl(e,t){return e&&t?e.replace(/\{ACTION\}/,t):null}static async updateIris(e,t){if((0,l.isNullOrUndefined)(e))throw o.l.create(o.N.ActionUrlInvalid,"Iris: Action beacon undefined or null",void 0,`Iris action url: ${e} headers: ${JSON.stringify(t)}`);const n=new URL(e),d=this.getHeaders(t),u=this.getRequestInit(d);let p;const h=(0,a.zq)();setTimeout((()=>{p="Timeout occurred.",h.resolve()}),s.VT);const g=await Promise.race([h.waiting,fetch(n,u).catch((e=>{p=`fetch failure caused by: ${JSON.stringify(e)}`}))]),m=g&&g.status;if(!g||m&&m<200&&m>=300)throw p&&(/^Timeout/.test(p)||/^Fetch/.test(p))&&(r.k.log(`Iris: Arc call failed due to ${p}`),c.M0.sendAppErrorEvent({...i.s51,message:`Arc call failed due to ${p}`})),o.l.create(o.N.ActionResponseInvalid,"Iris: Arc call failed.",i.a2y,`Request url: ${n} Response status code: ${m} Response: ${JSON.stringify(g)}`);return g}static createPropertyBagErrorMessage(e,t,n,i){return`Placement=${e}, Asid=${t}, Market=${n}, ${i}`}static getHeaders(e){const t=new Headers;return e&&((0,l.isNullOrUndefined)(e.xSdkIaf)||t.set("x-sdk-iaf",e.xSdkIaf)),t}static formatQParameters(e){if((0,l.isNullOrUndefined)(e))return null;const t=/[^=]/,n=[];for(const i in e)!(0,l.isNullOrUndefined)(e[i])&&t.test(e[i])&&n.push(`${i}=${e[i]}`);return n.length>0?n.join("&"):null}static getDefaultAppParameters(e){if(!d.jG)return r.k.log(`Iris: Missing App Environment Object: ${d.jG}`),c.M0.sendAppErrorEvent({...i.EXN,message:`App environment undefined. Placement: ${JSON.stringify(e.placement)}`}),null;let t;const n={locale:d.jG.CurrentMarket,country:d.jG.CountryCode,muid:d.jG.UserId?d.jG.UserId.replace(/^m-/,""):null};return n.muid||(t=`UserId: ${n.muid}`),n.locale||(t=(t?", ":"")+`Market: ${n.locale}`),n.country||(t=(t?", ":"")+`CountryCode: ${n.country}`),t&&(r.k.log(`Iris: Missing ${t} from App Environment Object`),c.M0.sendAppErrorEvent({...i.yyJ,message:`Missing App environment properties. Placement: ${JSON.stringify(e.placement)}. Error: ${t}`})),n}static getRequiredStaticParameters(){return{nct:"1",fmt:"json",nocookie:"1"}}static assembleQParameters(e){if((0,l.isNullOrUndefined)(e))return c.M0.sendAppErrorEvent({...i.Vsq,message:"Undefined query param for ARC request."}),null;const t=this.getRequiredStaticParameters(),n=this.getDefaultAppParameters(e),r=(0,s.bu)(),o=(0,s.rB)();return Object.assign({},t,n||{},r||{},o,e)}static validateQParams(e){if((0,l.isNullOrUndefined)(e))return"untargetable; no query params";if(!e.placement)return"untargetable; no placement";if(/\|/.test(e.placement)){if(!e.bcnt)return"untargetable; no bcnt for batch request";const t=e.placement.split("|").length,n=e.bcnt.split("|").length;if(t!==n)return"untargetable; batch size mismatch p="+t+" b="+n}}static getDigit(e){let t=(new Date).getTime();const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:7&n|8).toString(16)}static generateGuid(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,u.getDigit)}static getRequestInit(e){return{method:"GET",headers:e,credentials:"include"}}}},52817:function(e,t,n){"use strict";var i,r;n.d(t,{M:function(){return r},R:function(){return i}}),function(e){e.Impression="imp",e.Action="act"}(i||(i={})),function(e){e.Click="click",e.Conversion="conversion",e.Dislike="dislike",e.Dismiss="dismiss",e.Like="like",e.Hover="hover"}(r||(r={}))},73348:function(e,t,n){"use strict";n.d(t,{KI:function(){return r},M1:function(){return p},S5:function(){return l},So:function(){return h},TY:function(){return a},VT:function(){return o},Yq:function(){return s},_l:function(){return d},bu:function(){return m},cF:function(){return u},rB:function(){return g},u7:function(){return c},uS:function(){return f}});var i=n(92100);const r=5e3,o=1e4,a="https://arc.msn.com/v4/api/selection",s=".int",c=".prev";var d;!function(e){e.MSNAnaheimNewsNTPImages="MSNAnaheimNewsNTPImages",e.MSNNewsCoachmark="MSNNewsCoachmark",e.WinHPCoachmark="WinHPCoachmark",e.MSNewsRewards="MSNewsRewards",e.ConditionalBanner="ConditionalBanner"}(d||(d={}));const l={[d.MSNAnaheimNewsNTPImages]:"88000244",[d.MSNAnaheimNewsNTPImages+s]:"88000245",[d.MSNAnaheimNewsNTPImages+c]:"88000246",[d.MSNNewsCoachmark]:"88000308",[d.MSNNewsCoachmark+s]:"88000309",[d.WinHPCoachmark]:"88000789",[d.WinHPCoachmark+s]:"88000788",[d.MSNewsRewards]:"88000321",[d.MSNewsRewards+s]:"88000322",[d.ConditionalBanner]:"10837393",[d.ConditionalBanner+s]:"10837394"},u=()=>{const e=location.search;return!!e&&/(\?|&)irisInternal=true/.test(e)},p=()=>{const e=location.search,t=new URLSearchParams(e);return t.has("testingNum")?t.get("testingNum"):"-1"},h=()=>{const e=location.search,t=new URLSearchParams(e);return t.has("ocid")?t.get("ocid"):""},g=()=>(()=>{const e=location.search;return!!e&&/(\?|&)irisStatic=true/.test(e)})()?{app:"anaheimstatic"}:{},m=()=>{const e=location.search;if(e&&/(\?|&)irisSegment=/.test(e)){const t=i.c.getQueryParameterByName("irisSegment",e);if(t)return{[t]:"1"}}return null};var f;!function(e){e.AcquisitionPath="AREF",e.BrowserChannel="ACHANNEL",e.BrowserVersion="ABUILD",e.Caller="clr",e.ClientID="edgeid",e.ConsumerVsEnterprise="ISU",e.DefaultBrowser="ADEFAB",e.DeviceOSVersion="devosver",e.OperatingSystem="OPSYS",e.PrimaryBrowser="APRIMB",e.TailoredExperiencesToggle="poptin",e.UITheme="UITHEME"}(f||(f={}))},8037:function(e,t,n){"use strict";n.d(t,{N:function(){return i},l:function(){return o}});var i,r=n(85663);!function(e){e[e.Unknown=0]="Unknown",e[e.MissingContext=1]="MissingContext",e[e.QueryParametersInvalid=2]="QueryParametersInvalid",e[e.FetchFailure=3]="FetchFailure",e[e.ResponseFailure=4]="ResponseFailure",e[e.Unparsable=5]="Unparsable",e[e.UnconvertableCreative=6]="UnconvertableCreative",e[e.ActionUrlInvalid=7]="ActionUrlInvalid",e[e.ActionCallFail=8]="ActionCallFail",e[e.ActionResponseInvalid=9]="ActionResponseInvalid"}(i||(i={}));class o{static create(e,t,n,i){return{appError:n,customMessage:i,errorMessage:t,irisErr:e}}static typeCheck(e){return e&&"object"==typeof e&&!(0,r.isNullOrUndefined)(e.irisErr)}}},87095:function(e,t,n){"use strict";var i;n.d(t,{W:function(){return i}}),function(e){e.offPageNavigation="nav-newtab",e.inPageNavigation="nav-inpage",e.executeAction="execute-action"}(i||(i={}))},63815:function(e,t,n){"use strict";n.d(t,{c:function(){return p}});var i=n(71568),r=n(85663),o=n(2518),a=n(7476),s=n(23549);class c{static isError(e){return!(0,r.isNullOrUndefined)(e)&&"object"==typeof e&&!(0,r.isNullOrUndefined)(e.error)||!(0,r.isNullOrUndefined)(e.code)}static handleError(e,t){if(e&&"number"==typeof e.code)if(e.code>=1e3&&e.code<=1999)this.sendAppError(a.ZHI,e.code,t);else if(e.code>=3e3&&e.code<=3999)this.sendAppError(a.gAu,e.code,t);else switch(e.code){case 0:case 2e3:case 2040:break;case 2010:this.sendAppError(a.MRH,e.code,t);break;case 2020:this.sendAppError(a.CBH,e.code,t);break;default:this.sendAppError(a.CPU,e.code,t)}}static isValidSingleResponse(e){return!(0,r.isNullOrUndefined)(e)&&"object"==typeof e&&!(0,r.isNullOrUndefined)(e.prm)&&(0,o.R)(e.prm._id)&&(0,o.R)(e.prm._imp)&&!(0,r.isNullOrUndefined)(e.tracking)&&(0,o.R)(e.tracking.baseUri)&&!(0,r.isNullOrUndefined)(e.ad)&&!(0,r.isNullOrUndefined)(e.rdr)&&e.rdr.length>0&&(0,o.R)(e.rdr[0].c)&&(0,o.R)(e.rdr[0].u)&&(0,o.R)(e.f)&&(0,o.R)(e.v)}static isBatchResponse(e){return!(0,r.isNullOrUndefined)(e)&&"object"==typeof e&&!(0,r.isNullOrUndefined)(e.batchrsp)}static batchContainsItems(e){return e&&!(0,r.isNullOrUndefined)(e.items)&&"object"==typeof e.items&&e.items.length>0}static batchContainsErrors(e){return e&&!(0,r.isNullOrUndefined)(e.errors)&&"object"==typeof e.errors&&e.errors.length>0}static decodeSingleResponseString(e){if(!(0,o.R)(e))return null;try{return JSON.parse(e)}catch(t){return s.M0.sendAppErrorEvent({...a.FQ3,message:"Exception parsing JSON",pb:{...a.FQ3.pb,customMessage:`Error parsing json encodedString: ${e}`}}),null}}static sendAppError(e,t,n){s.M0.sendAppErrorEvent({...e,message:`err: ${t}`,pb:{...e.pb,customMessage:n&&n.queryParams?i._.createPropertyBagErrorMessage(n.queryParams.placement,n.queryParams.asid,n.queryParams.locale):""}})}}var d=n(21789);class l{constructor(){this._infoMap=new Map,this._unknown=[],this._errors=[]}static createSurfaceInfo(e,t,n,i){return{creatives:e||[],currentCreativeId:t,errors:n||[],lastUpdatedMarket:d.jG.CurrentMarket,lastUpdatedTime:(new Date).getTime(),placement:i}}static infoHasId(e){return e&&!(0,r.isNullOrUndefined)(e.placement)}static infoHasCreatives(e){return e&&!(0,r.isNullOrUndefined)(e.creatives)&&e.creatives.length>0}static infoHasErrors(e){return e&&!(0,r.isNullOrUndefined)(e.errors)&&e.errors.length>0}get(e){return!(0,r.isNullOrUndefined)(e)&&this._infoMap.has(e)?this._infoMap.get(e):null}add(e,t){e&&(t?this._infoMap.set(t,e):this._unknown.push(e))}addCreative(e,t){t&&"object"==typeof t?(0,r.isNullOrUndefined)(e)?this._unknown.push(l.createSurfaceInfo([t],null,null,null)):this.addData(e,t,!1):(0,r.isNullOrUndefined)(e)||this._infoMap.set(e,l.createSurfaceInfo(null,null,null,e))}addError(e,t){t&&"object"==typeof t&&0!==Object.keys(t).length&&((0,r.isNullOrUndefined)(e)?this._errors.push(t):this.addData(e,t,!0))}hasUnknowns(){return this._unknown.length>0}getUnknowns(){return this._unknown}hasUnclaimedErrors(){return this._errors.length>0}getUnclaimedErrors(){return this._errors}addData(e,t,n){if((0,r.isNullOrUndefined)(e)){const e=t;this._unknown.push(l.createSurfaceInfo([e],e.creativeId,null,null))}else if(this._infoMap.has(e)){this._infoMap.get(e)[n?"errors":"creatives"].push(t)}else{const i=t;this._infoMap.set(e,l.createSurfaceInfo(n?null:[i],n?null:i.creativeId,n?[t]:null,e))}}}var u=n(8037);class p{static async requestSurfaceInfo(e,t){if(!e)return s.M0.sendAppErrorEvent({...a.cL8,message:"Attempted iris call without any params."}),Promise.reject("Attempted iris call without any params.");const n=i._.createIrisRequestContext(e,t);return await i._.callIris(n).then(p.mapResponse).then(p.handleUnclaimedErrors).catch((e=>{let t,i,r;return u.l.typeCheck(e)&&(t=e.appError,i=e.customMessage,r=e.errorMessage),t=t||a.bUp,s.M0.sendAppErrorEvent({...t,message:r||"Unhandled error encountered requesting/processing iris call",pb:{...t.pb,customMessage:i||`Error: ${JSON.stringify(e)} requestContext: ${JSON.stringify(n)}`}}),Promise.reject(e)}))}static async sendActionUpdate(e,t){try{return await i._.updateIris(e,t)}catch(n){let i,r,o;return u.l.typeCheck(n)&&(i=n.appError,r=n.customMessage,o=n.errorMessage),i=i||a.bUp,s.M0.sendAppErrorEvent({...i,message:o||"Unhandled error encountered requesting/processing iris action update call",pb:{...i.pb,customMessage:r||`Error: ${JSON.stringify(n)} actionUrl: ${JSON.stringify(e)} includedHeaders: ${JSON.stringify(t)}`}}),Promise.reject(n)}}static async handleUnclaimedErrors(e){if(e&&e.collection&&e.collection.hasUnclaimedErrors()){e.collection.getUnclaimedErrors().forEach((t=>{c.handleError(t,e.reqContext)}))}return e}static async mapResponse(e){if(!e||!e.parsedResponse)return Promise.resolve(null);const t=e.parsedResponse,n=e.reqContext&&e.reqContext.queryParams&&/^[^|]*$/.test(e.reqContext.queryParams.placement)?e.reqContext.queryParams.placement:null,i=new l,r={collection:i,reqContext:e.reqContext};if(c.isError(t))return i.addError(n,{...t,placement:n}),Promise.resolve(r);if(c.isBatchResponse(t)){if(c.batchContainsItems(t.batchrsp)){t.batchrsp.items.forEach((e=>{const t=e.placement?e.placement:n;p.extractCreativesFromItem(e,t,i)}))}if(c.batchContainsErrors(t.batchrsp)){t.batchrsp.errors.forEach((e=>{i.addError(e.placement||n,e)}))}}else{const r=p.convertToCreative(t);if(i.addCreative(n,r),!r){const t=e.reqContext&&e.reqContext.queryParams&&e.reqContext.queryParams.asid;s.M0.sendAppErrorEvent({...a.EhB,message:"Iris: Attempt to convert iris response to creative failed",pb:{...a.EhB.pb,customMessage:`ASID: ${t} RequestContext: ${JSON.stringify(e.reqContext)} Response: ${JSON.stringify(e.parsedResponse)}`}})}}return Promise.resolve(r)}static convertToCreative(e){const t=e&&"string"==typeof e?c.decodeSingleResponseString(e):e;if(t&&c.isValidSingleResponse(t))return{creativeName:t.rdr[0].c,creativeNamespace:t.rdr[0].u,content:t.ad,creativeId:t.prm._id,telemetry:{impressionUrl:t.prm._imp,actionUrl:t.tracking.baseUri}};const n=t&&t.prm&&t.prm._id;return s.M0.sendAppErrorEvent({...a.N6m,message:"Iris: Response format invalid - creativeId",pb:{...a.N6m.pb,customMessage:`Error converting response into creative due to invalid format creativeId: ${n}\n encodedString: ${"object"==typeof e?JSON.stringify(e):e}\n decodedString: ${"object"==typeof t?JSON.stringify(t):t}`}}),null}static addIrisEntityToCollection(e,t,n){if(!t||!n)return;const i=p.convertToCreative(t);i&&n.addCreative(e,i)}static extractCreativesFromItem(e,t,n){n&&e&&(e.items&&e.items.length>0&&e.items.forEach((e=>{p.addIrisEntityToCollection(t,e,n)})),e.item&&p.addIrisEntityToCollection(t,e.item,n))}}},78672:function(e,t,n){"use strict";n.d(t,{$w:function(){return g},Dp:function(){return d},FK:function(){return p},G8:function(){return h},SJ:function(){return u},SV:function(){return m},Td:function(){return s},ZI:function(){return f},b0:function(){return S},bs:function(){return v},ij:function(){return o},l4:function(){return a},x_:function(){return y},zp:function(){return l},zw:function(){return c}});var i=n(31558),r=n(54911);function o(){return(0,i.N)()?window.navigator.userAgent:(0,r.s)().userAgent}function a(){return(0,i.N)()?window.location.href:(0,r.s)().url.href}function s(){return(0,i.N)()?window.location.hostname:(0,r.s)().url.hostname}function c(){return(0,i.N)()?window.location.host:(0,r.s)().url.host}function d(){return(0,i.N)()?window.location.origin:(0,r.s)().url.origin}function l(){return(0,i.N)()?window.location.search:(0,r.s)().url.search}function u(){return(0,i.N)()?window.location.protocol:(0,r.s)().url.protocol}function p(){return(0,i.N)()?window.location.hash:(0,r.s)().url.hash}function h(){return(0,i.N)()?window.document.cookie:(0,r.s)().cookie}function g(e){if(!(0,i.N)())throw new Error("getDocumentElementById is unsupported server side. This call should be wrapped in canUseDOM().");return window.document.getElementById(e)}function m(e){if(!(0,i.N)())throw new Error("getDocumentElementsByTagName is unsupported server side. This call should be wrapped in canUseDOM().");return window.document.getElementsByTagName(e)}function f(e){if(!(0,i.N)())throw new Error("getDocumentElementsByClassName is unsupported server side. This call should be wrapped in canUseDOM().");return window.document.getElementsByClassName(e)}function v(){return(0,i.N)()?window.indexedDB:null}function y(){return(0,i.N)()?window.devicePixelRatio:(0,r.s)().devicePixelRatio}function S(e=void 0,t=void 0,n=!0,r="anonymous",o,a){if(!(0,i.N)())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),o&&s.setAttribute("class",o),a&&(s.onload=a),s.type="text/javascript",e&&(s.src=e,s.async=n,s.crossOrigin=r),window&&window.NONCE_ID&&(s.nonce=window.NONCE_ID),s}},31558:function(e,t,n){"use strict";function i(){return!("undefined"==typeof window||!window.document||!window.document.createElement||window.isRenderServiceEnv)}n.d(t,{N:function(){return i}})},55524:function(e,t,n){"use strict";n.d(t,{Gq:function(){return r}});let i=new Map;const r=Object.freeze({set(e,t){return i.set(e,t),this},get:function(e,t){let n=i.get(e);return void 0===n&&t&&(n=t(),i.set(e,n)),n},clear(){i.clear()},delete:e=>i.delete(e),has:e=>i.has(e)})},96489:function(e,t,n){"use strict";n.d(t,{U1:function(){return u},WG:function(){return l},oN:function(){return p},pn:function(){return d},sR:function(){return h}});var i=n(55524);let r=0;function o(){return r>1e8&&(r=0),"__mlv-"+r++}const{get:a,set:s,delete:c}=i.Gq,d=()=>v(g()),l=e=>v(m(e));function u(){const e=g();return v(e,{call:(...t)=>{var n;return null===(n=e.get())||void 0===n?void 0:n(...t)}})}function p(){const e=m((()=>new Map));return v(f(e),{getObj:()=>e.get(),set:(t,n)=>e.get().set(t,n),get:t=>e.get().get(t)})}function h(){const e=m((()=>new Set));return v(f(e),{getObj:()=>e.get(),add:t=>e.get().add(t)})}function g(){const e=o();return{get:()=>a(e),set:t=>(s(e,t),t),unset:()=>{c(e)}}}function m(e){const t=o();return{get:()=>a(t,e),unset:()=>{c(t)}}}function f(e){const t=()=>e.get();return{has:e=>t().has(e),get size(){return t().size},delete:e=>t().delete(e),unset:()=>e.unset()}}function v(e,t){return Object.freeze(t?Object.assign(e,t):e)}},32687:function(e,t,n){"use strict";n.d(t,{Cw:function(){return a},cs:function(){return o},j4:function(){return s},mx:function(){return r}});var i=n(99628);const r="rd",o="OSATE",a="OSAT",s={ver:"0.1.0",spec:{innerWidth:{clientValue:()=>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.A)},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}}}},99628:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});const i=[0,656,980,1304]},291:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});var i=n(31558);function r(e,t={bindMethod:!0}){return"object"==typeof n.g&&n.g.TEST_ENV&&!n.g.TEST_SINGLETONPROXY||(0,i.N)()?e.getInstance():new Proxy(e,{get(e,n,i){const r=e.getInstance(),o=Reflect.get(r,n,r);return t.bindMethod&&"function"==typeof o?o.bind(r):o},set(e,t,n,i){const r=e.getInstance();return Reflect.set(r,t,n,r)}})}},54911:function(e,t,n){"use strict";n.d(t,{s:function(){return d}});var i=n(55524),r=n(32687);const o="__RequestDataInstance__";class a{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=s(r.cs,this.cookie),t=!!e&&"1"===e,n=s(r.Cw,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=i.Gq.get(o);return e||(n.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 a(e,t);return i.Gq.set(o,n),n}}function s(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=a.resetInstance,d=()=>a.getInstance()},59967:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var i=n(7476),r=n(23549);class o extends Map{constructor(e,t={}){super(),this.identifier=e,this.subscriptions=new Map,t.initialState&&Object.keys(t.initialState).forEach((e=>{super.set(e,t.initialState[e])}))}set(e,t){super.set(e,t);const n=this.subscriptions.get(e);return n&&n.size?(n.forEach((n=>{try{n&&n(t)}catch(t){r.M0.sendAppErrorEvent({...i.fG_,message:"Failed to execute subscription callback",pb:{...i.fG_.pb,customMessage:`Error executing subscription callback for key [${e}]`,instanceId:this.identifier,errorMessage:t&&t.message}})}})),this):this}subscribe(e,t,n={}){if(!t||"function"!=typeof t)return;let i=this.subscriptions.get(e);i||(this.subscriptions.set(e,new Set),i=this.subscriptions.get(e)),i.add(t),this.has(e)&&!1!==n.fireImmediately&&t(this.get(e)),n.signal&&n.signal.addEventListener("abort",(()=>{this.unsubscribe(e,t)}))}unsubscribe(e,t){const n=this.subscriptions.get(e);n&&n.delete(t)}reset(){this.clear(),this.subscriptions.clear()}}},25598:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});var i=n(17556);class r{}r.updateLayout=new i.C("updateLayout"),r.initialize=new i.C("initialize")},56591:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});var i=n(45266);function r(e,t,n,r){if(!n||r)return i.nP.custom;const o=i.Wi[i.nP.focused],a=i.Wi[i.nP.informational],s=i.Wi[i.nP.inspirational];return e===o.feeds_position&&t===o.current_background_image_type?i.nP.focused:e===a.feeds_position&&t===a.current_background_image_type?i.nP.informational:e===s.feeds_position&&t===s.current_background_image_type?i.nP.inspirational:i.nP.custom}},98106:function(e,t,n){"use strict";n.d(t,{A$:function(){return r},FQ:function(){return i},FT:function(){return s},Jx:function(){return d},O9:function(){return a},cN:function(){return l},jb:function(){return o}});const i=78,r=50,o=40,a=24;let s;const c=[];function d(e){c.push(e)}function l(e){if(e!==s){s=e;for(const t of c)t(e)}}},45266:function(e,t,n){"use strict";n.d(t,{$B:function(){return f},$N:function(){return y},$_:function(){return S},F5:function(){return w},HX:function(){return l},L_:function(){return C},MT:function(){return m},Uq:function(){return s},VE:function(){return p},Wi:function(){return P},YZ:function(){return I},Z3:function(){return h},_9:function(){return b},_U:function(){return g},gZ:function(){return u},gp:function(){return c},iz:function(){return i},nP:function(){return d},yR:function(){return v}});var i,r=n(46986),o=n(21789);!function(e){e[e.MicrosoftNews=0]="MicrosoftNews",e[e.Office365=1]="Office365",e[e.Gaming=2]="Gaming",e[e.Play=3]="Play",e[e.NavigationPage=4]="NavigationPage",e[e.Following=5]="Following"}(i||(i={}));var a,s,c,d,l,u,p,h;!function(e){e.Enforced="ENFORCED",e.Recommended="RECOMMENDED"}(a||(a={})),function(e){e[e.focused=0]="focused",e[e.inspirational=1]="inspirational",e[e.informational=2]="informational",e[e.custom=3]="custom"}(s||(s={})),function(e){e[e.always=0]="always",e[e.peek=1]="peek",e[e.headingsonly=2]="headingsonly",e[e.onscroll=3]="onscroll",e[e.off=4]="off"}(c||(c={})),function(e){e.focused="focused",e.inspirational="inspirational",e.informational="informational",e.custom="custom"}(d||(d={})),function(e){e.bing="bing",e.custom="custom",e.iris="iris",e.off="off",e.theme="theme",e.enterprise="enterprise",e.imageAndVideo="imageAndVideo"}(l||(l={})),function(e){e[e.allowAll=0]="allowAll",e[e.disableImageOfTheDay=1]="disableImageOfTheDay",e[e.disableCustomImage=2]="disableCustomImage",e[e.disableAll=3]="disableAll"}(u||(u={})),function(e){e[e.off=0]="off",e[e.onerow=1]="onerow",e[e.tworows=2]="tworows",e[e.top=3]="top"}(p||(p={})),function(e){e.off="off",e.onerow="onerow",e.tworows="tworows",e.top="top"}(h||(h={}));const g={0:"off",1:"onerow",2:"tworows",3:"top"},m={0:"allowAll",1:"disableImageOfTheDay",2:"disableCustomImage",3:"disableAll"},f={off:0,onerow:1,tworows:2,threerows:4,top:3};var v;!function(e){e.off="off",e.onerow="onerow",e.tworows="tworows",e.threerows="threerows"}(v||(v={}));const y={off:0,tworows:1,threerows:2,onerow:3},S={0:"off",1:"tworows",2:"threerows",3:"onerow"},C={backgroundImageTypePolicy:u.allowAll,currentBackgroundImageType:l.imageAndVideo,currentLayout:d.inspirational,quickLinksEnabled:!0,hideDefaultTopSites:!1,imageOfTheDayEnabled:!0,selectedFeedDisplaySetting:"headingsonly",selectedQuickLinksDisplaySetting:h.onerow},w={0:"focused",1:"inspirational",2:"informational",3:"custom"},b={backgroundImage:"ntp.background_image",backgroundImageTypePolicy:"ntp.background_type_blocked_by_policy",currentBackgroundImageType:"ntp.background_image_type",hideDefaultTopSites:"ntp.hide_default_top_sites",customBackgroundImageInfo:"ntp.local_background_image",layout:"ntp.layout_mode",quickLinks:"ntp.show_top_sites",quickLinksDisplaySetting:"ntp.quick_links_options",imageOfTheDay:"ntp.show_image_of_day",feeds:"ntp.news_feed_display",greeting:"ntp.show_greeting",showSettings:"ntp.show_settings",verticalTabsCollapsed:"edge.vertical_tabs.collapsed",verticalTabsOpened:"edge.vertical_tabs.opened",singleColumnEnabled:"ntp.single_column.enabled",userNurturingUpdated:"ntp.user_nurturing",hasUserSeenNewFre:"new_device_fre.has_user_seen_new_fre",defaultBrowserSettingEnabled:"browser.default_browser_setting_enabled",showAppLauncher:"ntp.enable_app_launcher",userChoices:"ntp.record_user_choices",selectedFeedPivot:"ntp.selected_feed_pivot",layoutModeInstrumentation:"instrumentation.ntp.layout_mode",newsFeedDsiplayInstrumentation:"instrumentation.ntp.news_feed_display",gamerModeEnabled:"browser.gamer_mode_enabled",codexBingUpsellEnabled:"ntp.enable_bing_chat_by_policy",companyLogoEnabled:"ntp.enable_company_logo_by_policy",windowsIndexerPromotedTopSites:"ntp.promoted_top_sites"},T={focused:{quick_links:!0,feeds_position:"headingsonly",current_background_image_type:l.off,greeting:!0,hide_promoted_links:!1},inspirational:{quick_links:!0,feeds_position:"peek",current_background_image_type:l.imageAndVideo,greeting:!0,hide_promoted_links:!1},informational:{quick_links:!0,feeds_position:"always",current_background_image_type:l.imageAndVideo,greeting:!0,hide_promoted_links:!1}},k={focused:{quick_links:!0,feeds_position:"headingsonly",current_background_image_type:l.off,greeting:!0,hide_promoted_links:!1},inspirational:{quick_links:!0,feeds_position:"peek",current_background_image_type:l.imageAndVideo,greeting:!0,hide_promoted_links:!1},informational:{quick_links:!0,feeds_position:"always",current_background_image_type:l.imageAndVideo,greeting:!0,hide_promoted_links:!1}},P=o.jG.CurrentRequestTargetScope&&o.jG.CurrentRequestTargetScope.audienceMode===r.F.Enterprise?T:k,I={currentBackgroundImageType:P.informational.current_background_image_type,currentLayout:d.informational,quickLinksEnabled:P.informational.quick_links,hideDefaultTopSites:P.informational.hide_promoted_links,imageOfTheDayEnabled:!0,selectedFeedDisplaySetting:P.informational.feeds_position,greetingEnabled:P.informational.greeting}},83710:function(e,t,n){"use strict";n.d(t,{V1:function(){return i}});function i(){return!0===window.__peregrine_litePVSent}},39731:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var i=n(10754),r=n(23549),o=n(83710);function a(e,t,n,a,s){if((0,o.V1)())r.M0.getPageMetadata().updateContract();else{(0,i.Ou)().TimeToSendPageView=Math.round(performance.now()),r.M0.sendPageView(e,t,n,a,s)}}},14959:function(e,t,n){"use strict";n.d(t,{B8:function(){return r}});function i(){window.standbyClickEventsHandler&&(window.removeEventListener("click",window.standbyClickEventsHandler),window.removeEventListener("auxclick",window.standbyClickEventsHandler),window.removeEventListener("contextmenu",window.standbyClickEventsHandler),delete window.standbyClickEventsHandler)}function r(e){window.standbyClickEventsHandler&&(e&&e instanceof Promise?e.then((()=>{i()})):i())}},43356:function(e,t,n){"use strict";n.d(t,{Qz:function(){return w},bn:function(){return b},v:function(){return T},FQ:function(){return f},gy:function(){return h},S0:function(){return u},F_:function(){return g},Qm:function(){return m}});var i,r=n(98669);!function(e){e[e.StandardEventBasedDeferral=0]="StandardEventBasedDeferral",e[e.CustomEventBasedDeferral=1]="CustomEventBasedDeferral"}(i||(i={}));var o=n(41074),a=n(52516),s=n(85205),c=n(96531),d=n(68042);const l={filter:(e,t)=>e.filter((e=>t in e))};function u(){return c._.getInstance().rootReducer.connector(s.z.MilestoneData)}function p(e){const t=u();if(!t)return;const n=t.getCurrentState().perExperienceMilestones,i=n&&n.get(e);let r;return i&&(r=i.perInstanceMilestones.get(a.t)),r}function h(e){const t=p(e);if(!t||function(e){let t;switch(e.loadAfter.eventType){case r.Gg.aboveTheFoldVisuallyReady:t=v();break;case r.Gg.belowTheFoldTransitionStart:t=y();break;case r.Gg.hydrationComplete:t=C();break;default:t=(0,d.c)(e.loadAfter.experienceType,e.loadAfter.eventType)}return t}(t))return null;if(t.shouldLoad&&t.loadAfter){return{deferralType:S(t.loadAfter),shouldResolve:t.shouldLoad}}return null}function g(){return u()?v()?Promise.resolve():new Promise((e=>{o.g.updateAboveTheFoldVisuallyReady.registerObserver((t=>{e()}))})):Promise.resolve()}function m(){return u()?y()?Promise.resolve():new Promise((e=>{o.g.updateBelowTheFoldTransitionStart.registerObserver((t=>{e()}))})):Promise.resolve()}async function f(e){const t=u();if(!t)return;const n=t.getCurrentState().plugins;if(!n||0===n.length)return;const i=l.filter(n,e);for(const t of i)void 0!==t[e]&&await t[e].call(t)}function v(){const e=u();if(!e)return!1;const{aboveTheFoldVisuallyReady:t}=e.getCurrentState();return Boolean(t&&t.endTime!==a.n)}function y(){const e=u();return!!e&&e.getCurrentState().belowTheFoldTransitionStart}function S(e){return e.eventType in r.ic?i.CustomEventBasedDeferral:i.StandardEventBasedDeferral}function C(){const e=u();return!!e&&e.getCurrentState().hydrationComplete}function w(e,t,n,i){return{deferralInfo:e,experienceType:t,experienceGroup:n,experienceInstance:i}}function b(e,t,n,i){return{experienceType:e,currentState:t,experienceGroup:n,experienceInstance:i}}function T(e,t,n,i,r){return{experienceType:e,experienceGroup:t,experienceInstance:n,startTime:i,endTime:r}}},41074:function(e,t,n){"use strict";n.d(t,{g:function(){return o}});var i=n(17556);class r{constructor(){this.updateHydrationComplete=new i.C("updateHydrationRenderComplete"),this.updateRiverHydrationComplete=new i.C("updateRiverHydrationRenderComplete"),this.updateAboveTheFoldVisuallyReady=new i.C("updateAboveTheFoldVisuallyReady"),this.updateBelowTheFoldTransitionStart=new i.C("updateBelowTheFoldTransitionStart"),this.updateExperienceLoadDeferralState=new i.C("updateExperienceLoadDeferralState"),this.updateExperienceCurrentState=new i.C("updateExperienceCurrentState"),this.updateExperiencePublicState=new i.C("updateExperiencePublicState"),this.updateExperienceRenderDeferralState=new i.C("updateExperienceRenderDeferralState"),this.updateInitTiming=new i.C("UpdateInitTiming"),this.updatePageComplete=new i.C("updatePageCompleteTiming"),this.updateRenderTiming=new i.C("UpdateRenderTiming"),this.updateVisuallyReadyTiming=new i.C("UpdateVisuallyReadyTiming"),this.updateStartLoadingTiming=new i.C("UpdateStartLoadingTiming"),this.updateMediaContentReadyTiming=new i.C("UpdateMediaContentReadyTiming"),this.updateDomCompleteTiming=new i.C("UpdateDomCompleteTiming"),this.updateMilestonePlugins=new i.C("updateMilestonePlugin")}resetInstance(){this.updateHydrationComplete.unregisterObservers(),this.updateRiverHydrationComplete.unregisterObservers(),this.updateAboveTheFoldVisuallyReady.unregisterObservers(),this.updateBelowTheFoldTransitionStart.unregisterObservers(),this.updateExperienceLoadDeferralState.unregisterObservers(),this.updateExperienceCurrentState.unregisterObservers(),this.updateExperiencePublicState.unregisterObservers(),this.updateExperienceRenderDeferralState.unregisterObservers(),this.updateInitTiming.unregisterObservers(),this.updatePageComplete.unregisterObservers(),this.updateRenderTiming.unregisterObservers(),this.updateVisuallyReadyTiming.unregisterObservers(),this.updateDomCompleteTiming.unregisterObservers(),this.updateMilestonePlugins.unregisterObservers(),o=new r}}let o=new r},42465:function(e,t,n){"use strict";n.d(t,{m:function(){return g}});var i=n(41074),r=n(98669),o=n(43356),a=n(51602),s=n(68042),c=n(9119);function d(e,t){e.registerObserver((e=>{((e.params||[])[0]||[]).forEach((({deferralInfo:e,experienceType:n})=>{e&&n&&function(e,t,n){if(!e||!t||!(t.eventType in r.Gg)||!t.experienceType&&!t.experienceGroup)return;const{eventType:i,experienceType:o}=t,d=o||t.experienceGroup,l=s.v.get(d);if(l&&l.referencedDependentsDeferralMap){if(l.currentState<i){const t=l.referencedDependentsDeferralMap.get(i);t?t.size>0&&t.set(e,n):l.referencedDependentsDeferralMap.set(i,new Map([[e,n]]))}}else s.v.set(d,{currentState:a.D.notStarted,referencedDependentsDeferralMap:new Map([[i,new Map([[e,n]])]])}),o&&(0,c.w)(o,!0)}(n,e,t)}))}))}function l(){d(i.g.updateExperienceLoadDeferralState,a.D.loadDeferred),d(i.g.updateExperienceRenderDeferralState,a.D.renderDeferred),i.g.updateExperienceCurrentState.registerObserver((e=>{const t=[];if(((e.params||[])[0]||[]).forEach((({experienceType:e,currentState:n})=>{if(!e||!n)return;const i=s.v.get(e);if(!i)return;i.currentState=n;const c=r.ez.get(n),d=c&&i.referencedDependentsDeferralMap.get(c);d&&d.forEach(((e,n)=>{if(!n)return;const i=e===a.D.loadDeferred?a.D.resolvedForLoad:a.D.resolvedForRender;t.push((0,o.bn)(n,i))}))})),t.length){const e=(0,o.S0)();e&&i.g.updateExperienceCurrentState.getActionSender(e).send(t)}}))}var u=n(96620);let p=new Map;(0,u.U)((()=>{p=new Map}));var h=n(76166);class g extends h.e{constructor(e,t,n,r,s,c,d){super(e,t,n,r,s,c,d),this.startObservers(),i.g.updateInitTiming.registerObserver((e=>this.updateExperienceTiming(e.params[0],a.D.initialized))),i.g.updateRenderTiming.registerObserver((e=>this.updateExperienceTiming(e.params[0],a.D.rendered))),i.g.updateVisuallyReadyTiming.registerObserver((e=>this.updateExperienceTiming(e.params[0],a.D.visuallyReady))),i.g.updateStartLoadingTiming.registerObserver((e=>this.updateExperienceTiming(e.params[0],a.D.startLoading))),i.g.updateMediaContentReadyTiming.registerObserver((e=>this.updateExperienceTiming(e.params[0],a.D.mediaContentReady))),i.g.updateDomCompleteTiming.registerObserver((e=>this.updateExperienceTiming(e.params[0],a.D.domComplete))),i.g.updateExperienceLoadDeferralState.registerObserver((e=>{const t=((e.params||[])[0]||[]).map((({experienceType:e,experienceGroup:t,experienceInstance:n})=>(0,o.bn)(e,a.D.loadDeferred,t,n)));t.length&&i.g.updateExperienceCurrentState.getActionSender(this).send(t)})),i.g.updateExperienceRenderDeferralState.registerObserver((e=>{const t=((e.params||[])[0]||[]).map((({experienceType:e,experienceGroup:t,experienceInstance:n})=>(0,o.bn)(e,a.D.renderDeferred,t,n)));t.length&&i.g.updateExperienceCurrentState.getActionSender(this).send(t)}))}startObservers(){l(),i.g.updateExperienceCurrentState.registerObserver((e=>{((e.params||[])[0]||[]).forEach((e=>{e.currentState===a.D.domComplete&&p.forEach(((t,n)=>{let i=!0;const{DomCompleteDependencies:r,DomCompleteCallback:o}=t;for(const t of r.values()){const{dependencyId:{experienceType:n,experienceGroup:r,experienceNamespace:o}}=t;if(n&&n!==e.experienceType||r&&r!==e.experienceGroup||o&&o!==e.experienceInstance||(t.milestoneReached=!0),!t.milestoneReached){i=!1;break}}i&&(t.dependenciesMet=!0,o&&(p.delete(n),o()))}))}))}))}updateExperienceTiming(e,t){e&&e.endTime&&i.g.updateExperienceCurrentState.getActionSender(this).send([(0,o.bn)(e.experienceType,t,e.experienceGroup,e.experienceInstance)])}}},52516:function(e,t,n){"use strict";n.d(t,{n:function(){return r},t:function(){return i}});const i="default",r=-1},39882:function(e,t,n){"use strict";n.d(t,{c:function(){return S}});var i,r=n(99551),o=n(41074);!function(e){e[e.domComplete=0]="domComplete",e[e.error=1]="error",e[e.initialized=2]="initialized",e[e.rendered=3]="rendered",e[e.visuallyReady=5]="visuallyReady",e[e.startLoading=6]="startLoading",e[e.mediaContentReady=7]="mediaContentReady"}(i||(i={}));var a=n(51602),s=n(76733);function c(){return h(o.g.updateAboveTheFoldVisuallyReady,(()=>!0))}function d(){return h(o.g.updateBelowTheFoldTransitionStart,(()=>!0))}function l(e){return p(e,a.D.resolvedForLoad)}function u(e){return p(e,a.D.resolvedForRender)}function p(e,t){return h(o.g.updateExperienceCurrentState,(n=>((n.params||[])[0]||[]).some((n=>n.currentState===t&&n.experienceType===e))))}function h(e,t){return new Promise(((n,i)=>{try{e.registerObserver((e=>{t(e)&&n(!0)}))}catch(e){s.k.logError(e),i(!1)}}))}function g(){return new Promise(((e,t)=>{try{o.g.updateHydrationComplete.registerObserver((()=>{e(!0)}))}catch(e){s.k.logError(e),t(!1)}}))}var m=n(52516),f=n(98669);class v{static updateExperienceCurrentState(e,t,n,i,r){const o=this.getOrCreateExperienceInstanceMilestone(e,t,i,r);o&&(o.currentState=n)}static updateMilestoneTiming(e,t,n,r,o,s,c){const d=this.getOrCreateExperienceInstanceMilestone(e,t,s,c);let l;if(d)switch(n){case i.initialized:l=d.initializationTime;break;case i.rendered:l=d.renderTime;break;case i.visuallyReady:l=d.visuallyReadyTime;break;case i.domComplete:l=d.domCompleteTime;break;case i.startLoading:return void(l=d.startLoadingTime);case i.error:return void(d.currentState=a.D.error);case i.mediaContentReady:l=d.mediaContentReadyTime;break;default:throw new Error("Invalid Argument: Unrecognized eventType")}if(!l)throw new Error(`Invalid experience time object while processing timing update for ${n}`);r&&(l.startTime=r),o&&(l.endTime=o)}static updateHydrationComplete(e,t){if(!e)throw new Error(v.invalidMilestoneModelMessage);e.hydrationComplete=t}static updateBelowTheFoldTransitionStart(e,t){if(!e)throw new Error(v.invalidMilestoneModelMessage);e.belowTheFoldTransitionStart=t}static updateMilestonePlugin(e,t){if(!e)throw new Error(v.invalidMilestoneModelMessage);e.plugins&&0!==e.plugins.length?e.plugins=e.plugins.concat(t):e.plugins=t}static updateAboveTheFoldVisuallyReady(e,t){if(!e)throw new Error(v.invalidMilestoneModelMessage);if(!e.aboveTheFoldVisuallyReady)throw new Error("AboveTheFold start not set");e.aboveTheFoldVisuallyReady.startTime=0,e.aboveTheFoldVisuallyReady.endTime=t}static updatePageComplete(e,t){if(!e)throw new Error(v.invalidMilestoneModelMessage);if(!e.aboveTheFoldVisuallyReady)throw new Error("AboveTheFold start not set");e.pageCompleteTiming.startTime=0,e.pageCompleteTiming.endTime=t}static deferExperienceLoad(e,t,n,i,r){const o=this.getOrCreateExperienceInstanceMilestone(e,t,i,r);o.loadAfter={experienceType:n.experienceType,experienceGroup:n.experienceGroup,eventType:n.eventType},v.updateLoadDeferralHandler(o,t)}static deferExperienceRender(e,t,n,i,r){const o=this.getOrCreateExperienceInstanceMilestone(e,t,i,r);o.renderAfter={experienceType:n.experienceType,experienceGroup:n.experienceGroup,eventType:n.eventType},v.updateRenderDeferralHandler(o,t)}static getOrCreateExperienceMilestone(e,t,n){if(!t)throw new Error("Invalid Argument: experienceType");e||(e={aboveTheFoldVisuallyReady:void 0,pageCompleteTiming:void 0,perExperienceMilestones:void 0}),e.perExperienceMilestones||(e.perExperienceMilestones=new Map);let i=e.perExperienceMilestones.get(t);return i||(i={experienceType:t,experienceGroup:n,perInstanceMilestones:new Map},e.perExperienceMilestones.set(t,i)),i}static getOrCreateExperienceInstanceMilestone(e,t,n,i){const r=this.getOrCreateExperienceMilestone(e,t,n),o=i||m.t;let s=r.perInstanceMilestones.get(o);return s||(s={currentState:a.D.notStarted,initializationTime:{endTime:m.n,startTime:m.n},loadAfter:{experienceType:void 0,eventType:void 0},renderAfter:{experienceType:void 0,eventType:void 0},renderTime:{endTime:m.n,startTime:m.n},visuallyReadyTime:{endTime:m.n,startTime:m.n},startLoadingTime:{endTime:m.n,startTime:m.n},mediaContentReadyTime:{endTime:m.n,startTime:m.n},domCompleteTime:{endTime:m.n,startTime:m.n}},r.perInstanceMilestones.set(o,s)),s}static updateLoadDeferralHandler(e,t){switch(e.loadAfter.eventType){case f.Gg.aboveTheFoldVisuallyReady:e.shouldLoad=c;break;case f.Gg.belowTheFoldTransitionStart:e.shouldLoad=d;break;case f.Gg.hydrationComplete:e.shouldLoad=g;break;default:return void(e.shouldLoad=l.bind(this,t))}}static updateRenderDeferralHandler(e,t){switch(e.renderAfter.eventType){case f.Gg.aboveTheFoldVisuallyReady:e.shouldRender=c;break;case f.Gg.belowTheFoldTransitionStart:e.shouldRender=d;break;case f.Gg.hydrationComplete:e.shouldRender=g;break;default:return void(e.shouldRender=u.bind(this,t))}}}v.invalidMilestoneModelMessage="Invalid Argument: milestoneModel";var y=n(85663);class S{reduce(e,t){let n;if(n=e?{...e}:{aboveTheFoldVisuallyReady:{endTime:m.n,startTime:m.n},pageCompleteTiming:{endTime:m.n,startTime:m.n},perExperienceMilestones:new Map},!t)return n;let i=!1;return i=i||this.handlePageLevelActions(i,t,n),i=i||this.handleExperienceLevelActions(i,t,n),n||e}handleExperienceLevelActions(e,t,n){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e||r.G.handleAction(t,o.g.updateInitTiming,(e=>this.updateTiming(i.initialized,n,e))))||r.G.handleAction(t,o.g.updateRenderTiming,(e=>this.updateTiming(i.rendered,n,e))))||r.G.handleAction(t,o.g.updateVisuallyReadyTiming,(e=>this.updateTiming(i.visuallyReady,n,e))))||r.G.handleAction(t,o.g.updateStartLoadingTiming,(e=>this.updateTiming(i.startLoading,n,e))))||r.G.handleAction(t,o.g.updateMediaContentReadyTiming,(e=>this.updateTiming(i.mediaContentReady,n,e))))||r.G.handleAction(t,o.g.updateDomCompleteTiming,(e=>this.updateTiming(i.domComplete,n,e))))||r.G.handleAction(t,o.g.updateExperienceLoadDeferralState,(e=>e.forEach((({deferralInfo:e,experienceType:t,experienceGroup:i,experienceInstance:r})=>{e&&t&&v.deferExperienceLoad(n,t,e,i,r)})))))||r.G.handleAction(t,o.g.updateExperienceRenderDeferralState,(e=>e.forEach((({deferralInfo:e,experienceType:t,experienceGroup:i,experienceInstance:r})=>{e&&t&&v.deferExperienceRender(n,t,e,i,r)})))))||r.G.handleAction(t,o.g.updateExperienceCurrentState,(e=>e.forEach((({experienceType:e,currentState:t,experienceGroup:i,experienceInstance:r})=>{t&&e&&v.updateExperienceCurrentState(n,e,t,i,r)})))))||r.G.handleAction(t,o.g.updateExperiencePublicState,(e=>{}))}handlePageLevelActions(e,t,n){return e=(e=(e=(e=(e=e||r.G.handleAction(t,o.g.updatePageComplete,(e=>v.updatePageComplete(n,e))))||r.G.handleAction(t,o.g.updateAboveTheFoldVisuallyReady,(e=>v.updateAboveTheFoldVisuallyReady(n,e))))||r.G.handleAction(t,o.g.updateBelowTheFoldTransitionStart,(e=>{(0,y.isNullOrUndefined)(e)||v.updateBelowTheFoldTransitionStart(n,e)})))||r.G.handleAction(t,o.g.updateHydrationComplete,(()=>{v.updateHydrationComplete(n,!0)})))||r.G.handleAction(t,o.g.updateMilestonePlugins,(e=>{e.length>0&&v.updateMilestonePlugin(n,e)}))}updateTiming(e,t,n){const{startTime:i,endTime:r,experienceType:o,experienceGroup:a,experienceInstance:s}=n;v.updateMilestoneTiming(t,o,e,i,r,a,s)}}},68042:function(e,t,n){"use strict";n.d(t,{c:function(){return o},v:function(){return r}});var i=n(96620);let r=new Map;function o(e,t){const n=r.get(e);return!n||n.currentState>=t}(0,i.U)((()=>{r=new Map}))},9119:function(e,t,n){"use strict";n.d(t,{w:function(){return o}});var i=n(96620);let r={};function o(e,t){return null!=t?r[e]=t:r[e]}(0,i.U)((()=>{r={}}))},98669:function(e,t,n){"use strict";n.d(t,{Gg:function(){return r},ez:function(){return a},ic:function(){return i}});var i,r,o=n(51602);!function(e){e[e.belowTheFoldTransitionStart=0]="belowTheFoldTransitionStart"}(i||(i={})),function(e){e[e.startLoading=14]="startLoading",e[e.loaded=4]="loaded",e[e.rendered=8]="rendered",e[e.domComplete=10]="domComplete",e[e.visuallyReady=11]="visuallyReady",e[e.mediaContentReady=15]="mediaContentReady",e[e.aboveTheFoldVisuallyReady=16]="aboveTheFoldVisuallyReady",e[e.belowTheFoldTransitionStart=0]="belowTheFoldTransitionStart",e[e.hydrationComplete=1]="hydrationComplete"}(r||(r={}));const a=new Map([[o.D.loaded,r.loaded],[o.D.rendered,r.rendered],[o.D.domComplete,r.domComplete],[o.D.visuallyReady,r.visuallyReady],[o.D.mediaContentReady,r.mediaContentReady]])},51602:function(e,t,n){"use strict";var i;n.d(t,{D:function(){return i}}),function(e){e[e.notStarted=1]="notStarted",e[e.loadDeferred=2]="loadDeferred",e[e.resolvedForLoad=3]="resolvedForLoad",e[e.loaded=4]="loaded",e[e.initialized=5]="initialized",e[e.renderDeferred=6]="renderDeferred",e[e.resolvedForRender=7]="resolvedForRender",e[e.rendered=8]="rendered",e[e.domComplete=10]="domComplete",e[e.visuallyReady=11]="visuallyReady",e[e.error=12]="error",e[e.startLoading=14]="startLoading",e[e.mediaContentReady=15]="mediaContentReady"}(i||(i={}))},12912:function(e,t,n){"use strict";n.d(t,{$0:function(){return $},og:function(){return O},Qw:function(){return N}});var i=n(98150),r=n(28326);class o extends i.r{getPlacementRules(){return[...super.getPlacementRules(),...this._platformData.placementRules??[]]}get id(){return this._platformData.id}get placementSource(){return r.m.Internal}get group(){return this._platformData.group}}var a=n(55522),s=n(94409),c=n(32002),d=n(60030),l=n(26465);class u extends d.L{get IsValid(){return!!this._contentData&&super.IsValid}get _contentData(){return this._platformData.contentModel}get title(){return this._contentData.title}get description(){return this._contentData.description}get contentImage(){return this._contentData.contentImage}get logoImage(){return this._contentData.logoImage}get disclaimerContent(){return this._contentData.disclaimerContent}get engageContentAction(){if(this._contentData.engageContentAction)return{...this._contentData.engageContentAction,actionDelegate:async()=>{var e,t;this.interactionEvent.dispatchEvent({type:l.p.Engaged,ts:Date.now(),followUpPlacementPromise:null===(e=this._contentData.engageContentAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t?void 0:t.call(e)})}}}get dismissContentAction(){if(this._contentData.dismissContentAction||this._contentData.engageContentAction)return{label:this._platformData.defaultDismissLabel,ariaLabel:this._platformData.defaultDismissAriaLabel,...this._contentData.dismissContentAction,actionDelegate:async()=>{var e,t;this.interactionEvent.dispatchEvent({type:l.p.Dismissed,ts:Date.now(),followUpPlacementPromise:null===(e=this._contentData.dismissContentAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t?void 0:t.call(e)})}}}}var p=n(94608);class h extends p.v{get contentType(){return s.J.CallToChoice}get IsValid(){return!!this.title&&!!this.description}}class g extends h{get IsValid(){return!!this._contentData&&super.IsValid&&this.validateOptionValues()}get _contentData(){return this._platformData.contentModel}get title(){return this._contentData.title}get description(){return this._contentData.description}get contentImage(){return this._contentData.contentImage}get logoImage(){return this._contentData.logoImage}get currentValue(){return this._contentData.currentValue}get choiceOptions(){return this._contentData.choiceOptions||[]}get dismissContentAction(){if(this._contentData.dismissContentAction)return{label:this._platformData.defaultDismissLabel,ariaLabel:this._platformData.defaultDismissAriaLabel,...this._contentData.dismissContentAction,actionDelegate:async()=>{var e,t;this.interactionEvent.dispatchEvent({type:l.p.Dismissed,ts:Date.now(),followUpPlacementPromise:null===(e=this._contentData.dismissContentAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t?void 0:t.call(e)})}}}get engageContentAction(){if(this._contentData.engageContentAction)return{...this._contentData.engageContentAction,actionDelegate:async e=>{var t,n;this.interactionEvent.dispatchEvent({type:l.p.Engaged,ts:Date.now(),followUpPlacementPromise:null===(t=this._contentData.engageContentAction)||void 0===t||null===(n=t.actionDelegate)||void 0===n?void 0:n.call(t,e)})}}}validateOptionValues(){const e=new Set;for(const t of this.choiceOptions){if(!t.value)return!1;if(e.has(t.value))return!1;e.add(t.value)}return!0}}var m=n(26488);class f extends m.r{get IsValid(){return!!this._surfaceData&&super.IsValid}get _surfaceData(){return this._platformData.surfaceModel}get position(){return this._surfaceData.position}get size(){return this._surfaceData.size}get dismissAfterSeconds(){return this._surfaceData.dismissAfterSeconds}get displaySurfaceAction(){return{actionDelegate:()=>{var e,t,n,i;null===(e=(t=super.displaySurfaceAction).actionDelegate)||void 0===e||e.call(t),null===(n=this._surfaceData.displaySurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}get hideSurfaceAction(){return{actionDelegate:()=>{var e,t,n,i;null===(e=super.hideSurfaceAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t||t.call(e),null===(n=this._surfaceData.hideSurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}get closeSurfaceAction(){var e;return{ariaLabel:null===(e=this._platformData)||void 0===e?void 0:e.defaultCloseAriaLabel,...this._surfaceData.closeSurfaceAction,actionDelegate:()=>{var e,t,n,i;null===(e=super.closeSurfaceAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t||t.call(e),null===(n=this._surfaceData.closeSurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}}var v=n(8366);class y extends v.C{get surfaceType(){return a.U.ContextualFeedbackCardLevel}}class S extends y{get IsValid(){return!!this._surfaceData}get _surfaceData(){return this._platformData.surfaceModel}get dismissAfterSeconds(){return this._surfaceData.dismissAfterSeconds}get displaySurfaceAction(){return{actionDelegate:()=>{var e,t,n,i;null===(e=(t=super.displaySurfaceAction).actionDelegate)||void 0===e||e.call(t),null===(n=this._surfaceData.displaySurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}get hideSurfaceAction(){return{actionDelegate:()=>{var e,t,n,i;null===(e=super.hideSurfaceAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t||t.call(e),null===(n=this._surfaceData.hideSurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}}class C extends v.C{get surfaceType(){return a.U.ContextualFeedback}}class w extends C{get IsValid(){return!!this._surfaceData}get _surfaceData(){return this._platformData.surfaceModel}get dismissAfterSeconds(){return this._surfaceData.dismissAfterSeconds}get displaySurfaceAction(){return{actionDelegate:()=>{var e,t,n,i;null===(e=(t=super.displaySurfaceAction).actionDelegate)||void 0===e||e.call(t),null===(n=this._surfaceData.displaySurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}get hideSurfaceAction(){return{actionDelegate:()=>{var e,t,n,i;null===(e=super.hideSurfaceAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t||t.call(e),null===(n=this._surfaceData.hideSurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}}var b=n(33881);class T extends b.F3{get IsValid(){return!!this._surfaceData&&super.IsValid}get _surfaceData(){return this._platformData.surfaceModel}get transitionEffect(){return this._surfaceData.transitionEffect}get position(){return this._surfaceData.position}get dismissAfterSeconds(){return this._surfaceData.dismissAfterSeconds}get bannerType(){return this._surfaceData.bannerType}get displaySurfaceAction(){return{actionDelegate:()=>{var e,t,n,i;null===(e=(t=super.displaySurfaceAction).actionDelegate)||void 0===e||e.call(t),null===(n=this._surfaceData.displaySurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}get hideSurfaceAction(){return{actionDelegate:()=>{var e,t,n,i;null===(e=super.hideSurfaceAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t||t.call(e),null===(n=this._surfaceData.hideSurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}get closeSurfaceAction(){return{...this._surfaceData.closeSurfaceAction,actionDelegate:()=>{var e,t,n,i;null===(e=super.closeSurfaceAction)||void 0===e||null===(t=e.actionDelegate)||void 0===t||t.call(e),null===(n=this._surfaceData.closeSurfaceAction)||void 0===n||null===(i=n.actionDelegate)||void 0===i||i.call(n)}}}}var k,P=n(2587),I=n(92100);!function(e){e.InternalCoachmark="internal-coachmark",e.InternalHorizontalBanner="internal-horizontal-banner",e.InternalContextualFeedback="internal-contextual-feedback",e.WalktroughCoachmark="walktrough-coachmark",e.FloatingCoachmark="floating-coachmark"}(k||(k={}));var A=n(84515),E=n(21789);function x(){return{id:"feedFreCoachmark",group:r.V.Functional,placementSource:r.m.Internal,surfaceModel:{surfaceType:a.U.Coachmark,size:P.dm.Large,position:{coachmarkAnchor:A._.myFeed,anchoringPosition:P.RC.Above,hasPointer:!0,pointerPosition:P.Jt.Opposite}},contentModel:{contentType:s.J.CallToAction,title:"Discover your Feed Experience",description:"Get more out of your feed experience through this walk-thru.",contentImage:{url:`${(0,E.Yq)().StaticsUrl}latest/nurturing/rewards/signin-upsell-signin.png`,altText:"Feed Image"},engageContentAction:{label:"Get Started"},dismissContentAction:{label:"Maybe Later"}}}}const M={[k.InternalCoachmark]:x,[k.InternalHorizontalBanner]:()=>({id:"nurturingPlacementManagerTestKey",placementSource:r.m.Internal,group:r.V.Functional,surfaceModel:{surfaceType:a.U.HorizontalBanner,position:b.bw.Top,displaySurfaceAction:{actionDelegate:()=>{}},hideSurfaceAction:{actionDelegate:()=>{}}},contentModel:{title:"Take Action",description:"Learn about promotion trough descriptions.",contentType:s.J.CallToAction,contentImage:{url:"https://www.bing.com/th?id=OADD2.10239253524416_1IRFPKC9YUHNF27KA&pid=21.2&c=16&roil=0&roit=0&roir=1&roib=1&w=300&h=225&dynsize=1",altText:"Image Alt Text"},engageContentAction:{label:"Engage",actionDelegate:()=>{}},dismissContentAction:{label:"Not Now",actionDelegate:()=>{}},disclaimerContent:{text:"Disclaimer text should be defined here and need to be informative.",links:[{linkText:"Term",linkUrl:"https://microsoft.com"},{linkText:"Privacy",linkUrl:"https://microsoft.com"}]}}}),[k.InternalContextualFeedback]:()=>({id:"nurturingPlacementManagerTestKey",placementSource:r.m.Internal,group:r.V.Functional,surfaceModel:{surfaceType:a.U.ContextualFeedback,displaySurfaceAction:{actionDelegate:()=>{}},hideSurfaceAction:{actionDelegate:()=>{}}},contentModel:{title:"Do you like this feed?",description:"Description should be defined here and need to be informative.",contentType:s.J.CallToChoice,contentImage:{url:"https://www.bing.com/th?id=OADD2.10239253524416_1IRFPKC9YUHNF27KA&pid=21.2&c=16&roil=0&roit=0&roir=1&roib=1&w=300&h=225&dynsize=1",altText:"Image Alt Text"},choiceOptions:[{label:"Yes",actionDelegate:()=>{}},{label:"No",actionDelegate:()=>{}},{label:"Not sure",actionDelegate:()=>{}}],engageContentAction:{label:"Engage",actionDelegate:()=>{}},dismissContentAction:{label:"Not Now",actionDelegate:()=>{}},disclaimerContent:{text:"Disclaimer text should be defined here and need to be informative.",links:[{linkText:"Term",linkUrl:"https://google.com"},{linkText:"Privacy",linkUrl:"https://google.com"}]}}}),[k.WalktroughCoachmark]:()=>{const e=x(),t={id:"personalizeFreCoachmark",group:r.V.Functional,placementSource:r.m.Internal,surfaceModel:{surfaceType:a.U.Coachmark,size:P.dm.Large,position:{coachmarkAnchor:A._.myInterests,anchoringPosition:P.RC.Above,hasPointer:!0,pointerPosition:P.Jt.Opposite}},contentModel:{contentType:s.J.CallToAction,title:"Personalize your feed",description:"This is personalization settings, where you can personalize your feed.",contentImage:{url:`${(0,E.Yq)().StaticsUrl}nurturing/rewards/signin-upsell-signin.png`,altText:"Personalization Image"},engageContentAction:{label:"Next"}}},n={...t,contentModel:{...t.contentModel,engageContentAction:{...t.contentModel.engageContentAction}}};return{...e,contentModel:{...e.contentModel,engageContentAction:{...e.contentModel.engageContentAction,actionDelegate:async()=>(await new Promise((function(e){setTimeout(e,1e4)})),n)}}}},[k.FloatingCoachmark]:function(){return{id:"floatingCoachMark",group:r.V.Functional,placementSource:r.m.Internal,surfaceModel:{surfaceType:a.U.Coachmark,size:P.dm.Medium,position:P.pY.BottomEnd},contentModel:{contentType:s.J.CallToAction,title:"Discover your Feed Experience",description:"Get more out of your feed experience through this walk-thru.",contentImage:{url:`${(0,E.Yq)().StaticsUrl}latest/nurturing/rewards/signin-upsell-signin.png`,altText:"Feed Image"},engageContentAction:{label:"Get Started"},dismissContentAction:{label:"Maybe Later"}}}}};var L=n(7476),D=n(23549);const R={[a.U.Coachmark]:e=>new f(e),[a.U.HorizontalBanner]:e=>new T(e),[a.U.ContextualFeedback]:e=>new w(e),[a.U.ContextualFeedbackCardLevel]:e=>new S(e)},F={[s.J.CallToAction]:e=>new u(e),[s.J.CallToChoice]:e=>new g(e)};class O extends c.Dz{constructor(e={}){super(),this._providerStaticContext=e,this.showMockPlacements()}createPlacement(e){const t=R[e.surfaceModel.surfaceType],n=F[e.contentModel.contentType];if(!t||!n)return;let i;const r={...this._providerStaticContext.localizedStrings};try{i=new o({...e,...r},t,n)}catch(t){return void D.M0.sendAppErrorEvent({...L.ejn,message:"Internal data is not valid or missing.",pb:e})}return i.interactionEvent.dispatchDecorator=e=>{var t;const n=e.followUpPlacementPromise?null===(t=e.followUpPlacementPromise)||void 0===t?void 0:t.then((e=>{if(e)return this.createPlacement(e)})):void 0;return{...e,followUpPlacementPromise:n}},i}sendInternalPlacement(e,t=[]){const n=this.createPlacement({...e,placementRules:t});n&&this.providePlacement(n)}showMockPlacements(){(function(){const e=I.c.getQueryParameterByName("nurturingMockPlacement",window.location.search);return e?e.split(",").map((e=>e.trim())):[]})().forEach((e=>{const t=M[e];t&&this.sendInternalPlacement(t())}))}}let B;const N=e=>{B=e},$=()=>B},98150:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var i=n(76187),r=n(37575);class o{get surfaceModel(){return(0,i.p)((()=>{const e=this._surfaceTemplateMapper(this._platformData);return e.interactionEvent.addEventListener(this.interactionEvent.dispatchEvent.bind(this.interactionEvent)),e}))()}get contentModel(){return(0,i.p)((()=>{const e=this._contentTemplateMapper(this._platformData);return e.interactionEvent.addEventListener(this.interactionEvent.dispatchEvent.bind(this.interactionEvent)),e}))()}get IsValid(){return!!this.id&&this.surfaceModel.IsValid&&this.contentModel.IsValid}constructor(e,t,n){if(this._platformData=e,this._surfaceTemplateMapper=t,this._contentTemplateMapper=n,this.interactionEvent=new r.z,!e)throw new Error("Platform data is required for PlacementModel")}getPlacementRules(){return[]}}},37575:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});class i{constructor(){this._eventListeners=new Set}addEventListener(e){this._eventListeners.add(e)}removeEventListener(e){this._eventListeners.delete(e)}dispatchEvent(e){this._eventListeners.forEach((t=>this.dispatchDecorator?t(this.dispatchDecorator(e)):t(e)))}}},90533:function(e,t,n){"use strict";n.d(t,{ZU:function(){return i},tw:function(){return c}});var i,r=n(45870);!function(e){e[e.FreOverlay=1e3]="FreOverlay"}(i||(i={}));class o{constructor(){this._placementProcessingQueue=new a(((e,t)=>t.priority-e.priority))}enqueuePlacements(e){this._placementProcessingQueue.enqueue(e)}async startProcessing(){for(;;){const e=await this._placementProcessingQueue.dequeue();e.evaluate&&!await e.evaluate()||await e.display()}}}class a{constructor(e){this.compareFn=e,this._itemsArray=[]}enqueue(e){var t;e&&e.length&&(this._itemsArray.push(...e),this._itemsArray.sort(this.compareFn),null===(t=this._settablePromise)||void 0===t||t.set())}async dequeue(){this._itemsArray.length||(this._settablePromise=new r.o,await this._settablePromise.getResultAsync());const e=this._itemsArray.shift();if(!e)throw new Error("Queue is empty but attempted to return an item.");return e}}let s;const c=()=>(s||(s=new o),s)},28326:function(e,t,n){"use strict";var i,r;n.d(t,{V:function(){return r},m:function(){return i}}),function(e){e.Iris="Iris",e.Amplify="Amplify",e.WPO="WPO",e.Internal="Internal"}(i||(i={})),function(e){e.Default="Default",e.Promotional="Promotional",e.Functional="Functional",e.Settings="Settings",e.Exclude="Exclude"}(r||(r={}))},94608:function(e,t,n){"use strict";n.d(t,{v:function(){return r}});var i=n(37575);class r{constructor(e){if(this._platformData=e,this.interactionEvent=new i.z,!e)throw new Error("Platform data is required for ContentTemplateModel")}}},60030:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var i=n(94608),r=n(94409);class o extends i.v{get contentType(){return r.J.CallToAction}get IsValid(){return!!this.title&&!!this.description}}},94409:function(e,t,n){"use strict";var i;n.d(t,{J:function(){return i}}),function(e){e.CallToAction="CallToAction",e.CallToChoice="CallToChoice"}(i||(i={}))},26465:function(e,t,n){"use strict";var i;n.d(t,{p:function(){return i}}),function(e){e.Served="Served",e.Viewed="Viewed",e.Hidden="Hidden",e.Engaged="Engaged",e.Dismissed="Dismissed",e.Closed="Closed"}(i||(i={}))},78617:function(e,t,n){"use strict";n.d(t,{Un:function(){return S},E0:function(){return f},c0:function(){return y}});var i,r,o,a=n(26465),s=n(92100);!function(e){e.IrisCoachmark="iris-coachmark",e.IrisHorizontalBanner="iris-horizontal-banner",e.AmplifyCoachmark="amplify-coachmark",e.AmplifyHorizontalBanner="amplify-horizontal-banner"}(i||(i={})),function(e){e.LocalStore="local-store",e.PersistentStore="persistent-store"}(r||(r={})),function(e){e.Individual="individual",e.Group="group"}(o||(o={}));var c=n(7476);class d{constructor(){this._placementsSurfaceMap={}}addPlacements(e){e&&e.length&&e.forEach((e=>{const t=e.surfaceModel.surfaceType,n=this._placementsSurfaceMap[t];n?n.push(e):this._placementsSurfaceMap[t]=[e]}))}getPlacementsBySurface(e){const{surfaceType:t,supportedContentTypes:n}=e,i=this._placementsSurfaceMap[t];if(i&&i.length)return i.filter((e=>n.includes(e.contentModel.contentType)))}}var l=n(45870);class u{addSurface(e,t){e&&t&&(this.addSurfaceToRegistry(e,t),this._expectedSurfaces.length&&(this._expectedSurfaces=this._expectedSurfaces.filter((t=>t!==e.surfaceType)),this._expectedSurfaces.length)||this._surfacesRegisteredCallback([e]))}getSurfaceCallbackForPlacement(e){const t=e.surfaceModel.surfaceType,n=this._surfaceRegistry[t];if(!n)return;return n[e.contentModel.contentType]}constructor(e,t=[]){this._surfacesRegisteredCallback=e,this._expectedSurfaces=t,this._surfaceRegistry={}}addSurfaceToRegistry(e,t){const{surfaceType:n,supportedContentTypes:i}=e;i.forEach((e=>{const i=this._surfaceRegistry[n];i?i[e]=t:this._surfaceRegistry[n]={[e]:t}}))}}var p=n(23549),h=n(90533),g=n(64726),m=n(43356);class f{getInteractions(){return this._interactionsTracker.getPlacementsInteractions()}registerSurface(e,t){const{surfaceType:n,supportedContentTypes:i}=e||{};n&&i.length&&t?this._surfaceRegistry.addSurface(e,t):p.M0.sendAppErrorEvent({...c.gY$,message:"Surface Type, Supported Content Types or Surface Callback are not provided."})}constructor(e,t,n,i){this._placementProviders=e,this._interactionsTracker=t,this._rules=n,this._extensionContext=i,this._placementRegistry=new d,this._surfaceRegistry=new u(this.onSurfacesRegistered.bind(this),null==i?void 0:i.expectedSurfaces),this.initializeProviders().then((()=>{Promise.all([(0,g.eC)(),(0,m.F_)()]).then((()=>{var e;return null===(e=(0,h.tw)())||void 0===e?void 0:e.startProcessing()}))}))}async initializeProviders(){this._placementProviders.filter((e=>null==e?void 0:e.subscribeForPlacementStream)).forEach((e=>e.subscribeForPlacementStream((e=>this.onPlacementsReceived([e])))));const e=this._placementProviders.filter((e=>null==e?void 0:e.getAvailablePlacements)).map((e=>e.getAvailablePlacements())),t=(await Promise.all(e)).flat();this.onPlacementsReceived(t)}onPlacementsReceived(e){if(null==e||!e.length)return;e.forEach((e=>{e.interactionEvent.addEventListener((t=>{var n,i;null===(n=this._extensionContext)||void 0===n||null===(i=n.onPlacementInteraction)||void 0===i||i.call(n,e,t),this._interactionsTracker.logPlacementInteraction(e.id,t)})),e.interactionEvent.dispatchEvent({type:a.p.Served,ts:Date.now()})})),this._placementRegistry.addPlacements(e);const t=e.filter((e=>!!this._surfaceRegistry.getSurfaceCallbackForPlacement(e)));t.length&&this.enqueuePlacementsForProcessing(t)}onSurfacesRegistered(e){const t=e.flatMap((e=>this._placementRegistry.getPlacementsBySurface(e)||[]));t.length&&this.enqueuePlacementsForProcessing(t)}enqueuePlacementsForProcessing(e){var t;const n=e.map((e=>{var t,n;return{evaluate:async()=>(await(0,g.hR)(),await this.evaluatePlacement(e)),display:async()=>await this.sendPlacementToSurface(e),priority:(null===(t=this._extensionContext)||void 0===t||null===(n=t.priorityCalculator)||void 0===n?void 0:n.call(t,e))||0}}));null===(t=(0,h.tw)())||void 0===t||t.enqueuePlacements(n)}async evaluatePlacement(e){const t=function(){const e=s.c.getQueryParameterByName("ignoreNurturingPlacementRules",window.location.search);return e?e.split(",").map((e=>e.trim())):[]}(),n=await this._interactionsTracker.getPlacementsInteractions(),i=Object.keys(n).map((e=>({placementId:e,interactionsCount:n[e].length})));if(p.M0.addOrUpdateTmplProperty("nf_cache_interactions",i.map((({placementId:e,interactionsCount:t})=>`${e}_${t}`)).join(",")),!t.includes(o.Individual))for(const t of e.getPlacementRules()){if(!await t(e,n))return!1}if(!t.includes(o.Group)){const t=this._rules[e.group]||[];for(const i of t){if(!await i(e,n))return!1}}const r=function(){const e=s.c.getQueryParameterByName("filterNurturingPlacements",window.location.search);return e?e.split(",").map((e=>e.trim())):[]}();return!(("1"===s.c.getQueryParameterByName("vptest",window.location.search)||null!=r&&r.length)&&!r.includes(e.id))}async sendPlacementToSurface(e){const t=this._surfaceRegistry.getSurfaceCallbackForPlacement(e);if(!t)return void p.M0.sendAppErrorEvent({...c.gY$,message:"Surface is not registered for this Content Type."});const n=new l.o,i=new l.o,r=Promise.all([n.getResultAsync(),i.getResultAsync()]);let o;e.interactionEvent.addEventListener((async e=>{e.followUpPlacementPromise&&(o=e.followUpPlacementPromise),e.type===a.p.Viewed&&n.set(),e.type===a.p.Hidden&&(await o,i.set())})),t(e);const s=e.surfaceModel.dismissAfterSeconds?1e3*e.surfaceModel.dismissAfterSeconds:0;s?await Promise.race([r,new Promise((e=>setTimeout(e,s)))]):await r;const d=await o;d&&await this.sendPlacementToSurface(d)}}let v;const y=e=>{v=e},S=()=>v},32002:function(e,t,n){"use strict";n.d(t,{Dz:function(){return r},iU:function(){return i}});class i{}class r extends i{constructor(){super(...arguments),this._placementsQueue=[]}providePlacement(e){this._callback?this._callback(e):this._placementsQueue.push(e)}subscribeForPlacementStream(e){this._callback||(this._callback=e,this._placementsQueue.forEach((t=>e(t))))}}},8366:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var i=n(37575),r=n(26465);class o{get displaySurfaceAction(){return{actionDelegate:()=>{this.interactionEvent.dispatchEvent({type:r.p.Viewed,ts:Date.now()})}}}get hideSurfaceAction(){return{actionDelegate:()=>{this.interactionEvent.dispatchEvent({type:r.p.Hidden,ts:Date.now()})}}}get closeSurfaceAction(){return{actionDelegate:()=>{this.interactionEvent.dispatchEvent({type:r.p.Closed,ts:Date.now()})}}}constructor(e){if(this._platformData=e,this.interactionEvent=new i.z,!e)throw new Error("Platform data is required for PlacementSurfaceModel")}}},26488:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var i=n(8366),r=n(55522);class o extends i.C{get IsValid(){return!!this.size}get surfaceType(){return r.U.Coachmark}}},33881:function(e,t,n){"use strict";n.d(t,{F3:function(){return c},Sy:function(){return r},bw:function(){return o},pp:function(){return i}});var i,r,o,a=n(8366),s=n(55522);!function(e){e.Promotional="Promotional",e.LegalCompliance="LegalCompliance"}(i||(i={})),function(e){e.SlideUp="SlideUp",e.FadeIn="FadeIn",e.SlideRight="SlideRight"}(r||(r={})),function(e){e.Top="Top",e.Bottom="Bottom"}(o||(o={}));class c extends a.C{get IsValid(){return!!this.position}get surfaceType(){return s.U.HorizontalBanner}}},55522:function(e,t,n){"use strict";var i;n.d(t,{U:function(){return i}}),function(e){e.Coachmark="Coachmark",e.HorizontalBanner="HorizontalBanner",e.RiverCard="RiverCard",e.ContextualFeedback="ContextualFeedback",e.ContextualFeedbackCardLevel="ContextualFeedbackCardLevel"}(i||(i={}))},23234:function(e,t,n){"use strict";function i(e,t,n){return(i,r)=>{var o;let a=(null==r?void 0:r[i.id])||[];const{relatedPlacementIds:s,slidingWindowMS:c}=n||{};if(null!=s&&s.length){const e=s.filter((e=>e!==i.id)).flatMap((e=>(null==r?void 0:r[e])||[]));a=[...a,...e]}if(c&&(a=a.filter((e=>e.ts>Date.now()-c))),!a.length)return!0;return((null===(o=a)||void 0===o?void 0:o.filter((t=>t.type===e)).length)||0)<t}}n.d(t,{l:function(){return i}})},76040:function(e,t,n){"use strict";function i(e,t){if(!e||!t)throw new Error("PlacementInteractionsThrottle: Invalid parameters.");return(n,i)=>{if(!n)return!1;if(!i)return!0;let r;return Object.values(i).flat().forEach((t=>{(null==t?void 0:t.type)===e&&null!=t&&t.ts&&(!r||r.ts<t.ts)&&(r=t)})),!(r&&Date.now()-r.ts<=t)}}function r(e,t,n){return(i,r)=>{if(!i)return!1;let o=(null==r?void 0:r[i.id])||[];const{relatedPlacementIds:a}=n||{};if(null!=a&&a.length){const e=a.filter((e=>e!==i.id)).flatMap((e=>(null==r?void 0:r[e])||[]));o=[...o,...e]}if(!o.length)return!0;let s;return o.forEach((t=>{(null==t?void 0:t.type)===e&&null!=t&&t.ts&&(!s||s.ts<t.ts)&&(s=t)})),!s||Date.now()-s.ts>t}}n.d(t,{H:function(){return r},S:function(){return i}})},42809:function(e,t,n){"use strict";n.d(t,{y:function(){return i}});const i=864e5},47467:function(e,t,n){"use strict";n.d(t,{f:function(){return d}});var i=n(45266),r=n(48204),o=n(54297),a=n(14116),s=n(85205),c=n(67044);function d(e,t){const n=(0,r.$z)();let d;if(e&&n&&(d=e[n]),!t){const e=(0,c.K0)(s.z.AdminPortalData),n=e&&e.getCurrentState();t=n?n.settings:(0,o.$o)().getObject(a.Ai)}if(!t)return d;const{adminSelectedNavId:l,isOfficeContentEnabled:u,isShowCompanyAndIndustry:p}=t;let h;return e&&l&&(h=e[l]),u&&p?d||h||i.iz.MicrosoftNews:u?i.iz.Office365:i.iz.MicrosoftNews}},67422:function(e,t,n){"use strict";n.d(t,{$N:function(){return m},$S:function(){return l},AD:function(){return u},De:function(){return T},EB:function(){return c},Gl:function(){return f},H2:function(){return E},IC:function(){return w},JS:function(){return i},Kf:function(){return a},SO:function(){return h},X:function(){return p},Zh:function(){return C},iL:function(){return s},ic:function(){return v},iu:function(){return o},jf:function(){return x},mL:function(){return b},no:function(){return r},o2:function(){return A},r8:function(){return y},sx:function(){return g},uB:function(){return I},v4:function(){return S},xY:function(){return d},yL:function(){return k},ye:function(){return P}});var i,r;!function(e){e.Excel="Excel",e.Forms="Forms",e.OneNote="OneNote",e.Pdf="PdfViewer",e.Portfolio="Portfolio",e.PowerPoint="PowerPoint",e.Project="Project",e.PowerBI="PowerBI",e.Sway="Sway",e.Visio="Visio",e.Word="Word",e.Video="Video",e.NewsArticle="NewsArticle"}(i||(i={})),function(e){e.DocumentsTableMenu="documents-table-menu",e.DocumentsTableHover="documents-table-hover",e.DocumentCardMenu="document-card-menu"}(r||(r={}));const o="edgeEnterpriseNtp",a="ContextMenuItem",s="ContextMenu",c="Copy file",d="-CopyFile",l="DocumentListItem",u="Download file",p="-Download",h="FileLocation",g="Open file location",m="-OpenFileLocation",f="Open file",v="Open in browser",y="-OpenInBrowser",S="Open in desktop",C="-OpenInDesktop",w="Remove file",b="-RemoveFromList",T="More options",k="ShareButton",P="Share file",I="-Share";var A,E,x;!function(e){e.Graph="https://graph.microsoft.com",e.Loki="394866fc-eedb-4f01-8536-3ff84b16be2a",e.MRU="https://api.office.net",e.Sharepoint="https://microsoft.sharepoint.com",e.Substrate="https://substrate.office.com",e.Yammer="https://www.yammer.com"}(A||(A={})),function(e){e.Activity="Activity",e.EnterpriseOneService="EnterpriseOneService",e.EnterpriseWaffle="EnterpriseWaffle",e.Graph="Graph",e.Loki="Loki",e.MRU="MRU",e.Share="Share",e.Sharepoint="Sharepoint",e.SharepointSites="SharepointSites",e.Substrate="Substrate",e.Yammer="Yammer"}(E||(E={})),function(e){e.Activities="Activities",e.AdminPortal="AdminPortal",e.Calendar="Calendar",e.CompanyNewsCard="CompanyNewsCard",e.Discover="Discover",e.DiscoverSharepoint="DiscoverSharepoint",e.EnterpriseWaffle="EnterpriseWaffle",e.EdgeWorth="EdgeWorth",e.EdgeWorthHide="EdgeWorthHide",e.Feeds="Feeds",e.Images="Images",e.IndustryNewsCard="IndustryNewsCard",e.MRU="MRU",e.MRUUpdate="MRUUpdate",e.OneDriveLink="OneDriveLink",e.Pinned="Pinned",e.Recommended="Recommended",e.RemoveRecommended="RemoveRecommended",e.ProfilePhoto="ProfilePhoto",e.RecentFiles="RecentFiles",e.SharedLink="SharedLink",e.SharedWithMe="SharedWithMe",e.SharepointNewsCard="SharepointNewsCard",e.SharepointNewsCardImages="SharepointNewsCardImages",e.SharePointSites="SharePointSites",e.Shell="Shell",e.StreamPreviewImages="StreamPreviewImages",e.TaskCreate="TaskCreate",e.TaskDelete="TaskDelete",e.Tasks="Tasks",e.TaskUpdate="TaskUpdate",e.Topics="Topics"}(x||(x={}))},4470:function(e,t,n){"use strict";n.d(t,{Jw:function(){return c},LZ:function(){return l},N:function(){return S},SY:function(){return d},Sn:function(){return u},TL:function(){return y},XA:function(){return f},_0:function(){return g},cx:function(){return a.c},hA:function(){return h},ni:function(){return s},v9:function(){return v},xD:function(){return p}});var i=n(37477),r=n(7476),o=n(23549),a=n(94285);function s(e,t=!1,n=!1,i){if(!e)return e;if(Array.isArray(e)){if(!e.length)return e;e=e[0]}if(!e||!e.subCards||!Array.isArray(e.subCards))return e;const a=e.subCards.map((e=>c(e,t,n,i)));return!e.subCards.length||a&&a.length&&e.subCards.length===a.length||o.M0.sendAppErrorEvent({...r.eto,message:"Mapper returned invalid data",pb:{...r.eto.pb,customMessage:`Count mismatch - expected count [${e.subCards.length}] - actual count [${a.length}]`}}),{feedItems:a,nextPageUrl:e.nextPageUrl}}function c(e,t=!1,n=!1,r){if(!e)return{};if(e.type===i.PL.AiCharacterCard||e.type===i.PL.BingHealthFitnessCard||e.type===i.PL.BoostAd||e.type===i.PL.CashbackAds||e.type===i.PL.CommunityCard||e.type===i.PL.DonationNpoCard||e.type===i.PL.Elections||e.type===i.PL.EntertainmentPremierCard||e.type===i.PL.EsportsCasualGames||e.type===i.PL.EsportsHighlight||e.type===i.PL.EsportsLiveStream||e.type===i.PL.EventSDCardAmplifyAds||e.type===i.PL.EventSDCardShopping||e.type===i.PL.EventSDCardSportsMIT1||e.type===i.PL.EventSDCardSportsMIT2||e.type===i.PL.EventSDCardSportsMIT3||e.type===i.PL.EventSDCardWorldCup||e.type===i.PL.EventSDCardWorldCup2||e.type===i.PL.GroupedContent||e.type===i.PL.HealthRiverCard||e.type===i.PL.HealthTipCard||e.type===i.PL.LinkedInCard||e.type===i.PL.LocalGuide||e.type===i.PL.LocalNews||e.type===i.PL.LocalNewsFeed||e.type===i.PL.MyBriefRiverCard||e.type===i.PL.RecommendedSearchesCard||e.type===i.PL.Promotion||e.type===i.PL.SageGroupedFeed||e.type===i.PL.ShoppingFeedCard||e.type===i.PL.ShoppingMerchantCategoryDeals||e.type===i.PL.ShoppingProngCardResponse||e.type===i.PL.ShoppingProngTracking||e.type===i.PL.SportsMatch||e.type===i.PL.SportsOlympics||e.type===i.PL.StockQuote||e.type===i.PL.StockQuote_spotlight||e.type===i.PL.TopStories||e.type===i.PL.TrafficDelays||e.type===i.PL.TrafficInfo||e.type===i.PL.Transit||e.type===i.PL.TravelArticleCard||e.type===i.PL.TravelDestinationCard||e.type===i.PL.Upsell||e.type===i.PL.UserInterestNTPProvider||e.type===i.PL.LeadGenCard||e.type===i.PL.UserInterestTopic||e.type===i.PL.UserInterestProvider||e.type===i.PL.UserInterestTopicAndProvider||e.type===i.PL.TopicSuggestionforConsumptionPage||e.type===i.PL.ProviderSuggestionForConsumptionPage||e.type===i.PL.VideoShoppingCard||e.type===i.PL.WeatherSummary||e.type===i.PL.WeatherSummary_spotlight||e.type===i.PL.WorkHeadlines||e.type===i.PL.ColdStartArticleFreCard||e.type===i.PL.MoneyInfo||e.type===i.PL.MoneyMoreForYouCard||e.type===i.PL.WindowsShellMorningDigest)return e;const o=(e.type||"").toLowerCase();if(o.startsWith("gold")||o.startsWith("combo:"))return e;if(e.type===i.PL.TopicFeed)return h(e);const s=e.wpoMetadata&&e.wpoMetadata.contentType,g=s===i.PL.NewsGroups||s===i.PL.NewsAnswerModule;if(n&&e.type===i.PL.Infopane&&!g)return e;if(e.type===i.PL.ComboCard)return u(e);if(e.subCards)return t||e.type===i.PL.NewsPromotionCard?{subItems:e.subCards.map((e=>c(e))),type:e.type||"tabbedInfopane"}:p(e,r);if(e.type===i.PL.ExternalLink)return d(e);if(e.type===i.PL.WebContent&&!n)return l(e);const{abstract:m="",actions:C=[],aiComments:w,badges:b,cardId:T,category:k,colorSamples:P,commentStatus:I,commentSummary:A,dataUrl:E,engagementSummary:x,externalVideoFiles:M,feed:L={},financeMetadata:D,id:R,images:F,isBreaking:O,isFeatured:B,isLocalContent:N,isLocalNews:$,locale:U,placement:_,position:H,provider:W={},publishedDateTime:q,reactionStatus:V,reactionSummary:G,notificationMetadata:z,reasons:j,source:K,recoId:Q,relatedCards:Z,ri:J,rotPos:X,sourceId:Y,spotlightStamp:ee,title:te="",topComments:ne,topics:ie=[],traceIdIndex:re,type:oe,url:ae,videoMetadata:se}=e,ce=y(F)||{},de=M||[],le=ie.find((e=>e.feedId===L.id&&e.locale===U)),ue=v(ae);let pe=f(W.logoUrl);!pe&&W.logo&&W.logo.url&&(pe=f(W.logo.url));const he=C.map((e=>S[e]||e));return b&&b.some((e=>"followedPublisher"===e.type))&&he.push("followedPublisher"),{id:R,cardId:T,cardContent:{abstract:m,aiComments:w,badges:b,colorSamples:P,category:{product:k,label:void 0},destinationUrl:ae,financeMetadata:D,id:R,isLocalContent:N,isLocalNews:$,isBreaking:O||0,isFeatured:B||!1,images:[{id:f(ce.url),height:ce.height,width:ce.width,caption:ce.title,focalRegion:ce.focalRegion,attribution:ce.attribution,source:ce.source,url:ce.url,colorSamples:ce.colorSamples}],kicker:te,locale:U,provider:{id:W.id,name:W.name,logo:{id:pe},logoUrl:W.logoUrl||W.logo&&W.logo.url,profileId:W.profileId,subscribable:!1},publishedDateTime:q,reasons:j,source:K,sourceHref:E,sourceId:Y,notificationMetadata:z,type:(0,a.c)(oe),title:te,topics:ie,tags:[le||{}],uriTitle:ue[6],videoFiles:de},metadata:{abstractLength:m.length,titleLength:te.length,category:k||ue[4],subCategory:ue[5],primaryImage:{height:ce.height,width:ce.width},locale:U,feed:{id:L.id},kicker:[L],actions:he,reactionStatus:V,commentStatus:I,reactionSummary:G,commentSummary:A,engagementSummary:x,reasons:j,source:K,topComments:ne,recoId:Q,relatedCards:Z,ri:J,videoMetadata:se},reasons:j,source:K,placement:_,position:H,rotPos:X,spotlightStamp:ee,type:oe,traceIdIndex:re||r}}function d(e){const{type:t,category:n,images:i,id:r,url:o,abstract:a="",title:s="",provider:c={},feed:d={},cardId:l,position:u,rotPos:p}=e,h=y(i)||{},g=v(o),{uiHint:m,actionText:S}=e.uiMetadata||{};let C=f(c.logoUrl);return!C&&c.logo&&c.logo.url&&(C=f(c.logo.url)),{id:r,cardId:l,position:u,rotPos:p,type:t,metadata:{abstractLength:a.length,title:s,titleLength:s.length,category:n||g[4],subCategory:"other",primaryImage:{height:h.height,width:h.width,url:h.url},locale:g[3],url:o,abstract:a,uiHint:m,actionText:S,feed:{id:d.id},kicker:[{feedName:d.feedName}]},cardContent:{id:r,type:t,title:s,abstract:a,category:{product:n,label:void 0},provider:{id:c.id,name:c.name,logo:{id:C},logoUrl:c.logoUrl||c.logo&&c.logo.url,subscribable:!1},images:[{id:f(h.url),height:h.height,width:h.width,caption:h.title,focalRegion:h.focalRegion,attribution:h.attribution,url:h.url,colorSamples:h.colorSamples}],kicker:s,destinationUrl:o}}}function l(e){const{id:t,cardId:n,type:i,images:r,url:o,category:a,locale:s,reactionStatus:c,commentStatus:d,reactionSummary:l,commentSummary:u,tag:p,abstract:h="",feed:g={},title:m="",provider:C={},actions:w=[],isBreaking:b=0,externalVideoFiles:T={},publishedDateTime:k,colorSamples:P,dataUrl:I,sourceId:A,financeMetadata:E,isLocalContent:x,position:M,rotPos:L,videoMetadata:D={}}=e,R=y(r)||{},F=v(o);return{id:t,cardId:n,position:M,rotPos:L,type:i,metadata:{abstract:h,abstractLength:h.length,titleLength:m.length,category:a||F[4],subCategory:F[5],publishedDateTime:k,externalVideoFiles:T,locale:s,feed:{id:g.id},kicker:[g],actions:w.map((e=>S[e]||e)),reactionStatus:c,commentStatus:d,reactionSummary:l,commentSummary:u,primaryImage:{height:R.height,width:R.width,url:R.url},url:o,title:m,provider:{name:C.name,logo:{url:C.logoUrl}},viewCount:D.viewCount},cardContent:{id:t,type:i,title:m,abstract:h,isBreaking:b,tags:[p||{}],provider:{id:C.id,name:C.name,logoUrl:C.logoUrl,image:{alt:C.name,src:C.logoUrl}},category:{product:a,label:void 0},locale:s,images:[{id:f(R.url),height:R.height,width:R.width,caption:R.title,focalRegion:R.focalRegion,attribution:R.attribution,url:R.url,colorSamples:R.colorSamples}],colorSamples:P,videoFiles:T,publishedDateTime:k,kicker:m,sourceHref:I,destinationUrl:o,sourceId:A,financeMetadata:E,isLocalContent:x}}}function u(e){const{subCards:t}=e||{},n=t&&t.map((e=>c(e)));return{...e,subItems:n,subCards:null}}function p(e,t){const{type:n,title:i,wpoMetadata:r,subType:o,rotPos:a,position:s,cardId:d}=e,l={cardId:d,metadata:{title:i},position:s,subItems:e.subCards.map((e=>c(e))),subType:o,type:n,rotPos:a,traceIdIndex:t};return r&&(l.wpoMetadata=r),l}function h(e){return e.feed&&"linkedinnews"===e.feed.canonicalName?e.type=i.PL.LinkedInCard:(e.feed&&(e.feed.canonicalName===i.PL.TopicFeedWeekends||e.feed.canonicalName===i.PL.TopicFeedMomentInTime1)||e.feed.canonicalName===i.PL.TopicFeedShopping||e.feed.canonicalName===i.PL.TopicFeedWeather)&&(e.type=i.PL.TopicFeedMomentInTime1),e}function g(e){return e}const m=new RegExp(/bing.(com|net)\/th/);function f(e){if(!e)return"";if(m.test(e))return;const t=e.split("/");return y(t)&&t[t.length-1].replace(".img","")}function v(e){return e?e.split("/"):[]}function y(e=[],t=0){return e[t]}const S={liked:"like",unliked:"unlike",saved:"save"}},29458:function(e,t,n){"use strict";n.d(t,{X:function(){return S}});var i=n(32810),r=n(21789),o=n(23357),a=n(13334),s=n(92100),c=n(15165),d=n(44672),l=n(54820),u=n(81110),p=n(83102),h=n(7476),g=n(5674),m=n(23549),f=n(78672),v=n(70169),y=n(95378);class S{constructor(e){this.treatmentQueryStringParam="Treatment",this.wpoitemsStringParam=u.hE.wpoitems,this.cardContext=e}async fetch(e={}){const t=await this.getRequestInit(),{ocid:l,flightData:p,treatment:v,apiVersion:S="v1",scenario:C,feedCluster:w,pivotId:b,templateId:T,nextPageUrl:k}=e||{},P=(0,g.Ee)(),I=e&&("shell"===e.contextSource||"shellv2"===e.contextSource),A=I&&e.isXfeed;let E=`${S}/news/feed/windows/${T}`;E=I?this.buildShellRequest(e,E):this.buildWinWidgetsRequest(e,E);const x=new URLSearchParams((0,f.zp)()).get(u.YU)?new URL(E,u.LJ):(0,c.fU)(E),M="Following"===b;if(k){const t=new i.h(new URL(k).search);P>0&&t.set(g.i$,P.toString()),r.jG.SendFeedCallActivityIdInHeader||!r.jG.ActivityId||I||t.set("activityId",r.jG.ActivityId),I&&!t.get("scn")&&t.set("scn",o.Ji),M&&e.feedId&&t.get("query")&&m.M0.sendAppErrorEvent({...h.cM_,message:"Windows Card Provider's following xfeed next page url has query QSP",pb:{...h.cM_.pb,customMessage:`{ "nextPageUrl": "${k}", "feedID": "${e.feedId}" }`}}),x.search=t.toString()}else{const e=[...await this.getCommonParams(l,p)];P>0&&e.push({key:g.i$,value:P.toString()}),e.forEach((e=>e.value&&x.searchParams.set(e.key,e.value))),v&&x.searchParams.set(this.treatmentQueryStringParam,v)}if(I){x.searchParams.set("caller","peregrine");const{column:t,pivotId:n}=e||{};"following"===n&&x.searchParams.set("wposchema","byregion"),t&&x.searchParams.set("column",t)}if((e&&"winWidgets"===e.contextSource||A)&&e.feedId){const t=M&&!e.feedId.startsWith("Y_")?u.hE.providerId:u.hE.interestIds;x.searchParams.set(t,e.feedId)}M&&(x.searchParams.set(u.hE.includeFollowingFilters,"true"),e.feedId&&(x.searchParams.delete("query"),a.Al.CurrentFlightSet.has("prg-pr2fol-time")&&(x.searchParams.set(u.hE.ocid,u.i9),x.searchParams.set(u.hE.apiKey,u.S1)))),w&&(x.searchParams.set("query","UserFre"),x.searchParams.set("entityids",w),x.searchParams.set("DisableTypeSerialization","true"),x.searchParams.set("wrapodata","false")),e&&e.count&&x.searchParams.set("$top",`${e.count}`);const L=x.searchParams.get(r.jG.OneServiceContentMarketQspKey);L&&x.searchParams.set("osLocale",L),r.jG.SendFeedCallActivityIdInHeader&&x.searchParams.delete("activityId");const D=s.c.getParamsWithItems(location.search);if(D){const t=D.find((e=>"idxExperienceTypeOverride"===e.key)),n=D.find((e=>"idxContentTypeOverride"===e.key)),i=D.find((e=>"idxTreatmentOverride"===e.key)),r=D.find((e=>"idxWpoKnobidsOverride"===e.key)),o=D.find((e=>"idxWpoEventRuleOverride"===e.key));if(t&&x.searchParams.set("Experience",t.value),n){const t=e.contentType?e.contentType:"article,video,slideshow",i=[...new Set(`${t},${n.value}`.split(","))];x.searchParams.set("contentType",i.join(","))}i&&x.searchParams.set(this.treatmentQueryStringParam,i.value),r&&x.searchParams.set(this.wpoitemsStringParam,`knobids:${r.value}`),o&&x.searchParams.set(this.wpoitemsStringParam,`byPassEventRule:${o.value}`)}C&&x.searchParams.set("scenario",C),x.searchParams.sort();try{const i=await(0,d.w)((async()=>await fetch(decodeURIComponent(x.href),t)),"WindowsCardProvider.fetch"),{status:a,statusText:s}=i||{},c="Following"===b,l="following"===b,u=c&&204===a&&!x.searchParams.has("skip");if(!(i&&i.ok||c||l))return void m.M0.sendAppErrorEvent({...h.mfB,message:i?"OneService returned error response":"OneService response was null",pb:{...h.mfB.pb,fetchNetworkResponse:{statusCode:a,statusText:s,activityId:r.jG.ActivityId,requestUrl:x.href,requestHeaders:JSON.stringify(t&&t.headers),xfeed:A?`feedID: ${e.feedId} is not valid with respect to locale and market`:"not XFeed"},responseHeaders:this.getResponseHeaders(i)}});if(204===i.status&&(I&&m.M0.sendAppErrorEvent({...h.U7j,message:"OneService returned empty content 204 response",pb:{...h.U7j.pb,fetchNetworkResponse:{statusCode:i.status,statusText:i.statusText,activityId:r.jG.ActivityId,requestUrl:x.href,requestHeaders:JSON.stringify(t&&t.headers)},responseHeaders:this.getResponseHeaders(i)}}),!u))return{cards:[],netStatus:204};let p,g,f;if(i.headers){if(g=i.headers.get("X-Statics-Fallback"),g){const e={...h.kiM.pb,activityId:r.jG.ActivityId,responseHeaders:this.getResponseHeaders(i),requestUrl:x.href};A&&(e.isXFeed=1),m.M0.sendAppErrorEvent({...h.kiM,pb:e,message:"Static fallback content received"})}const e=i.headers.get(o.rD.traceId);p=m.M0.addOrUpdateIdxId(e,!k)}const v=i&&(!i.ok||204===a||404===a),y=!i||v;if(f=c&&y?await n.e("poweredby-legend-wc").then(n.t.bind(n,81096,19)):l&&y?await n.e("SignInData").then(n.t.bind(n,21158,19)):await i.json(),w&&f){return{layoutTemplate:e&&e.count&&24===e.count?"ShellTwoColumn-14HalfCard-HalfTopstory":"ShellTwoColumn-Four1U",cards:f.subCards}}return"winWidgets"!==e.contextSource&&!A||!f.sections||e.useRawJson?{...f,traceIdIndex:p,isStatic:g}:f.sections[0]}catch(e){const n=(0,y.Z)(t,"headers.Authorization");m.M0.sendAppErrorEvent({...h.IVG,message:"Error while fetching OneService response",pb:{...h.IVG.pb,customMessage:`Error: ${e}`,fetchNetworkResponse:{activityId:r.jG.ActivityId,requestUrl:x.href,requestHeaders:JSON.stringify(n&&n.headers)}}})}}async getRequestInit(e={method:"GET"}){return e.credentials="include",e.headers=await l.$D.getOneServiceFeedCallHeaders(),e}async getCommonParams(e,t){return await(0,v.XJ)()===p.Hy.SignedIn?l.$D.getOneServiceParamsWithAuth(r.jG.UserId,e,!1,t):l.$D.getOneServiceParamsWithoutAuth(r.jG.UserId,e,!1,t)}getResponseHeaders(e){return e&&e.headers?JSON.stringify({"Akamai-Request-ID":e.headers.get("Akamai-Request-ID"),"Akamai-Server-IP":e.headers.get("Akamai-Server-IP"),"X-MSEdge-Ref":e.headers.get("X-MSEdge-Ref")}):null}buildShellRequest(e,t){const{pivotId:n,isXfeed:i}=e||{};let{nextPageUrl:r}=e||{};return i&&("following"===n?(t=`${u.hZ}${u.Pg}`,r&&r.includes(u.H0)&&(r="")):e.feedId&&(t=`${u.hZ}${u.H0}`)),t}buildWinWidgetsRequest(e,t){const{feedCluster:n,pivotId:i,isXfeed:r}=e||{};let{nextPageUrl:o}=e||{};if(r)if("Following"===i)if(e.feedId)t=`${u.hZ}${u.Qs}`,m.M0.addOrUpdateTmplProperty("filtered-feed","1"),o&&(o.includes(u.kX)||o.includes(u.Td)||!o.includes(e.feedId))&&(o="");else{var a;const n="filteredChannels"===e.feedName?u.Td:u.kX;t=`${u.hZ}${n}`,null!==(a=o)&&void 0!==a&&a.includes(u.Qs)&&(o="")}else e.feedId&&(t=n?"news/feed":`${u.hZ}${u.H0}`);return t}}},5674:function(e,t,n){"use strict";n.d(t,{Dz:function(){return S},Ee:function(){return f},N:function(){return y},T1:function(){return g},e5:function(){return C},i$:function(){return c},j9:function(){return m},s6:function(){return v}});var i=n(48503),r=n(21789),o=n(71778),a=n(95815);const s=10/1440,c="cbypass";let d="",l=!1,u=0;const p=10;let h=parseInt((0,a.ej)(c))||0;async function g(){h=Date.now(),(0,a.sq)(c,h.toString(),s,r.jG.HostPage.topDomain,"/"),await i.U.purgeCacheAsync(i.R.river),(0,o.mS)({id:"updatemyfeed",payload:h})}async function m(){h=Date.now(),(0,a.sq)(c,h.toString(),s,r.jG.HostPage.topDomain,"/"),await i.U.purgeCacheAsync(i.R.river)}function f(){return h}function v(e){h>0&&e.searchParams.set(c,h.toString())}function y(){return d}function S(e,t){if(!e)return;if(t)return d=e,void(u=1);if(u>=p)return;const n=d?`${d},${e}`:e;u+=1,d=n}function C(e){!0!==e&&"true"!==e||(l=!0)}},65128:function(e,t,n){"use strict";n.d(t,{fK:function(){return m},rg:function(){return v},tW:function(){return f}});var i=n(88826),r=n(7476),o=n(13334),a=n(29597);const s="OneWebServiceLatency",c="//assets.msn",d="//assets2.msn",l="//api.msn",u="prg-1s-bkupdmnt",p="prg-1s-bkupdmnt1",h="prg-1s-bkupdmnt2",g="prg-1s-bkupdmnt3";function m(){const e=o.Al.CurrentFlightSet;return!(!e||!(e.has(u)||e.has(p)||e.has(h)||e.has(g)))}function f(){const e=o.Al.CurrentFlightSet;return!(!e||!e.has(u)&&!e.has(p))}async function v(e,t={},n,u=!1){let p;try{if(p=await(0,a.Sm)(e,n,t),p&&p.ok)return p}catch(t){(0,i.OO)(t,r.Qsh,r.Qsh.message,`Failed URL: ${e}`)}return p&&p.headers&&p.headers.get(s)||u?p:(e=o.Al.CurrentFlightSet&&o.Al.CurrentFlightSet.has(g)?e.replace(c,l).replace("/service/","/"):e.replace(c,d),(0,a.Sm)(e,n,t))}},54820:function(e,t,n){"use strict";n.d(t,{$D:function(){return L}});var i=n(83102),r=n(21789),o=n(76716),a=n(13334),s=n(23357),c=n(65505),d=n(92095),l=n(54297);var u=n(22140),p=n(32810),h=n(76187),g=n(35281),m=n(96694),f=n(70169),v=n(42429),y=n(31558),S=n(54911),C=n(90158),w=n(11599),b=n(7476),T=n(23549),k=n(56921),P=n(63011),I=n(79022),A=n(34479);const E="prg-telemetry-trace",x="traceparent";function M(e){if("Peregrine"===e){const e=(0,r.Yq)();null===T.M0||void 0===T.M0||T.M0.sendAppErrorEvent({...b.EDA,message:"Generated OneService params with generic ocid value 'Peregrine'.",pb:{...b.EDA.pb,appType:e.AppType,hostPage:e.HostPage,stackTrace:Error().stack}},!1)}}var L;!function(e){function t(e=null,t,n=!1,i=null,s=!1,c=(0,g.VQ)(),d=!1){const l=(0,r.Yq)(),u=[{key:"apikey",value:l.OneServiceApiKey},{key:"activityId",value:l.ActivityId},{key:"ocid",value:n?b(l.TrackInfo,t):t},{key:l.OneServiceContentMarketQspKey,value:l.CurrentMarket},{key:"it",value:(0,o.E)()}];M(u.find((e=>"ocid"==e.key)).value);const p=(0,a.nP)().CurrentFlights;if(l.SendUserIdInHeader||!e||null!=p&&p.includes("1s-r-user-qsp")||u.push({key:"user",value:e}),c&&u.push({key:g.rZ,value:g.AN}),a.Al.IsBlendedEnterprise&&u.push({key:"audienceMode",value:"enterprise"}),l.ShouldUseFdheadQsp){let e=p;if(i){e=e?`${e},${i}`:i;const t="prg-bngimg-t";-1===e.indexOf(t)&&(e+=","+t),!0===s&&(e=i)}u.push({key:"fdhead",value:e})}if(null!=p&&p.includes(E)){const e=k.U.getTraceInstance(),t="00-"+e.getTraceId(!0)+"-"+e.getSpanId(!0)+"-00";u.push({key:"traceparent",value:t})}if(null!=p&&p.includes("authcookie-all-1s")&&!d){const e=l.AuthCookieName;e&&u.push({key:"scn",value:e.toUpperCase()})}return u}async function n(e=(0,g.VQ)(),t,n,o){const u={};let p;const h=(0,r.Yq)()||{};if((0,a.nP)().CurrentFlights&&(0,a.nP)().CurrentFlights.includes("prg-tracingheader")){const e=k.U.getTraceInstance(),t=e.getTraceId(!0),n=e.getSpanId(!0);u[s.Yu.traceParent]="00-"+t+"-"+n+"-00"}if("windowsShell"===h.AppType||"windowsShellV2"===h.AppType)h.IsWinAADUser&&(p=await L(),Object.assign(u,(0,c.tx)(p)));else if("winWidgets"===h.AppType){if((0,y.N)()&&"function"==typeof window.createWindowsWidget1SAuthHeaders){const e=await window.createWindowsWidget1SAuthHeaders();Object.assign(u,e)}}else{if(h.WidgetAttributes){p=(await(0,m.yb)()).tokenValue}if(("shopping"==h.AppType||"views"==h.AppType)&&(0,C.wq)()){if((await(0,f.YX)()).accountType==i.Qm.MSA){Object.assign(u,await(0,w.dG)());for(const e in u)0===e.indexOf("X-MSEdge")&&delete u[e];return u.SiteName=`api.msn.${h.topDomain}`,(0,w.VQ)(u),u}}if(!p)if(e&&!await h.isGccModUser){var b;const e={id:d.d3,friendlyName:d.Ak},t=await(null===(b=(0,P.Kf)())||void 0===b?void 0:b.getAuthData(e));p=null==t?void 0:t.authToken}else if("gaming"===n&&o&&(0,y.N)()){const e=(0,l.$o)().getObject("xboxXTokenId");e&&e.notAfter&&new Date(e.notAfter)>new Date&&(u[s.Yu.xboxToken]=JSON.stringify(e))}else if((null==t||!t.skipDualAuthHeader)&&(0,c.P8)()&&!(0,c.TJ)()){const e=(0,c.hk)()?await(0,v.IY)():(0,c.aS)();p=null==e?void 0:e.accessToken}Object.assign(u,(0,c.me)(p))}if(h.SendUserIdInHeader&&Object.assign(u,function(){var e;const t={},n=document.head.hasAttribute("data-client-settings")?document.head:window.document.getElementsByClassName("peregrine-widget-settings")[0],i=n&&n.getAttribute("data-client-settings"),r=i?null===(e=JSON.parse(i))||void 0===e?void 0:e.fd_muid:void 0;return r&&(t.MUID=`m-${r}`),t}()),!(0,y.N)()){var T,I;const{oneServiceHeaders:e,cookie:t,referer:n,clientData:i,userAgent:r}=(0,S.s)();e&&Object.assign(u,e),i&&(u["X-Client-Data"]=i),t&&(u.Cookie=t),n&&(u.Referer=n),r&&(u["User-Agent"]=r);const o=null===(T=(0,a.nP)().ClientSettings)||void 0===T||null===(I=T.detection)||void 0===I?void 0:I.ip;o&&(u["X-FD-ClientIP"]=o,u["X-MSEdge-ClientIP"]=o)}return u}function b(e,t){return u.b.isNonNullObject(e)&&u.b.isNonNullObject(e.sitePage)&&(0,I.Z)(e.sitePage.page_product)&&(0,I.Z)(e.sitePage.page_type)?e.sitePage.page_product+"-"+e.sitePage.page_type+(t?"-"+t:""):t}e.serviceRequestOnComplete=async function(e,t){try{const n=await e();return t(),n}catch(e){throw t(),e}},e.getOneServiceParamsWithoutAuth=t,e.getOneServiceNonDynamicParamsWithoutAuth=function(e,t=!1){const n=(0,r.Yq)(),i=[{key:"apikey",value:n.OneServiceApiKey},{key:"ocid",value:t?b(n.TrackInfo,e):e},{key:n.OneServiceContentMarketQspKey,value:n.CurrentMarket}];return M(i.find((e=>"ocid"==e.key)).value),(0,g.VQ)()&&i.push({key:g.rZ,value:g.AN}),i},e.getOneServiceParamsWithAuth=function(e=null,n,i=!1,o=null,s=!1){const c=(0,r.Yq)(),d=[...t(e,n,i,o,s)];if(!(0,a.nP)().CurrentFlights||!(0,a.nP)().CurrentFlights.includes("authcookie-all-1s")){const e=c.AuthCookieName;e&&d.push({key:"scn",value:e.toUpperCase()})}return d},e.getOneServiceHeaders=n,e.getOneServiceFeedCallHeaders=async function(e,t,i){const o=await n(e,null,t,i),a=(0,r.Yq)(),c=a.ActivityId;return a.SendFeedCallActivityIdInHeader&&c&&(o[s.Yu.activityId]=c),o},e.getLocationParams=function(e,t){const n=(0,r.Yq)(),i=e||n.Latitude,o=t||n.Longitude;return i&&o?{key:"location",value:`${i}|${o}`}:null},e.getOneServiceOCID=b,e.getBaseRequestData=async function(t,n){return{headers:await e.getOneServiceHeaders((0,g.VQ)(),n),method:t}},e.getCommonParams=function(e,t=!1){return(0,a.nP)().UserIsSignedIn?this.getOneServiceParamsWithAuth((0,r.Yq)().UserId,e,t):this.getOneServiceParamsWithoutAuth((0,r.Yq)().UserId,e,t)},e.getCommonParams2=function(e,t=!1,n=!1){return(0,f.hC)()?this.getOneServiceParamsWithAuth((0,r.Yq)().UserId,e,t,n):this.getOneServiceParamsWithoutAuth((0,r.Yq)().UserId,e,t,n)},e.urlContainsOcidParam=function(e){if(!e)return!1;const t=e.split("?");if(t.length<2)return!1;const n=t[1].split("#")[0];return!!new p.h(n).get("ocid")},e.removeOcidFromUrl=function(e){if(!e)return e;const t=e.split("?");if(t.length<2)return e;const n=t[1].split("#")[0],i=new p.h(n);if(i.get("ocid")){i.delete("ocid");let t=e.replace(n,i.toString());return"?"===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t}return e},e.removeOcidFromRiverCardProviderResponse=function(t){t&&t.cardMetadata&&t.cardMetadata.length&&t.cardMetadata.forEach((t=>{t.cardContent&&t.cardContent.destinationUrl?t.cardContent.destinationUrl=e.removeOcidFromUrl(t.cardContent.destinationUrl):t.subItems&&t.subItems.length&&t.subItems.forEach((t=>{t.cardContent&&t.cardContent.destinationUrl&&(t.cardContent.destinationUrl=e.removeOcidFromUrl(t.cardContent.destinationUrl))})),t.metadata&&t.metadata.relatedCards&&t.metadata.relatedCards.forEach((t=>{t.url=e.removeOcidFromUrl(t.url)}))}))},e.removeOcidFromWindowsOneServiceResponse=function(t){t&&t.cards&&t.cards.forEach((t=>{t.subCards.forEach((t=>{t.url?t.url=e.removeOcidFromUrl(t.url):t.subCards&&t.subCards.forEach((t=>{t.url&&(t.url=e.removeOcidFromUrl(t.url))}))}))}))};const L=(0,h.p)((async()=>{if(!((0,y.N)()&&window&&window.ShellFeedsApp&&window.ShellFeedsApp.getQueryHeadersAsync))return;const e=await Promise.race([window.ShellFeedsApp.getQueryHeadersAsync(),(0,A.Kb)(3e3).then((()=>null))]),t=e&&e[s.Yu.entAuthorization]||null;return t&&setTimeout((()=>L.cache.clear()),36e5),t}));e.getUniFeatTunHeader=async function(){const e={},t=(0,r.Yq)()||{};(0,y.N)()&&"edgeChromium"===t.AppType&&(e.EdgeInterestTier1Ids=(0,l.$o)().getItem("userTopics"));const n=T.M0.getPageMetadata(),i=null==n?void 0:n.combinedContract;var o,a,s,c,d,u,p;return i&&(e.LoginState=null===(o=i.user)||void 0===o?void 0:o.loginState,e.Product=null===(a=i.page)||void 0===a?void 0:a.product,e.PageName=null===(s=i.page)||void 0===s?void 0:s.name,e.PageType=null===(c=i.page)||void 0===c?void 0:c.type,e.OCID=null===(d=i.page)||void 0===d?void 0:d.ocid,e.ViewPortWidth=null===(u=i.browser)||void 0===u?void 0:u.width,e.ViewPortHeight=null===(p=i.browser)||void 0===p?void 0:p.height),function(e){let t="";return Object.keys(e).forEach((n=>{t+=`${n}:${Array.isArray(e[n])?e[n].join(","):e[n]};`})),t}(e)},e._reset=function(){L.cache.clear()},e.addTelemetryTracingQueryParam=function(e){if(a.Al&&a.Al.CurrentFlightSet&&a.Al.CurrentFlightSet.has(E)){const t=k.U.getTraceInstance(),n="00-"+t.getTraceId(!0)+"-"+t.getSpanId(!0)+"-00";e.searchParams.set(x,n)}}}(L||(L={}))},44672:function(e,t,n){"use strict";n.d(t,{O:function(){return S},w:function(){return C}});var i=n(29597),r=n(7476),o=n(9947),a=n(23549),s=n(31558);class c{constructor(e,t,n,i,r,a,d){if(!e)throw new Error("loggingService is required for ExponentialBackoffRetry.");const l=new o.K(e);this.logInvalidParams(l,t,n,i,r,d),this.loggingService=e,this.maxRetries=t||c.defaultMaxRetries,this.baseRetryDelayInMs=n||c.defaultBaseRetryDelayInMs,this.maxRetryDelayInMs=i||c.maxAllowedRetryDelayInMs,this.factor=r||c.defaultFactor,this.minOffsetInMs=a||c.defaultMinOffsetInMs,this.maxOffsetInMs=d||c.defaultMaxOffsetInMs,(0,s.N)()&&this.loggingService.infoCallback((()=>"ExponentialBackoffRetry has been configured."),null,{maxRetries:t,minTimeout:n,maxTimeout:i,factor:r})}async executeRequest(e,t,n,i,r){return new Promise((async(o,a)=>{await this.tryRequest(e,o,a,0,t,n,i,r)}))}logInvalidParams(e,t,n,i,r,o){t&&(t<1||t>c.maxAllowedRetries)&&e.fatal(`maxRetries should be at least 1 and less than ${c.maxAllowedRetries}.`),n&&n<c.defaultBaseRetryDelayInMs&&e.fatal("baseRetryDelay has to be a positive value greater than or equal to 100."),n&&o&&n<=o&&e.fatal("baseRetryDelay must not be smaller than the maximum delay offset."),i&&(i<=0||i>c.maxAllowedRetryDelayInMs)&&e.fatal(`maxRetryDelay has to be a positive value less than ${c.maxAllowedRetryDelayInMs}.`),r&&r<=0&&e.fatal("factor has to be a positive value.")}async tryRequest(e,t,n,i,o,c,d,l){const u=()=>(0,s.N)()&&i<this.maxRetries&&!l;try{const n=d||1e4,r=await this.timeoutServiceRequest(n,e(i));t(r)}catch(s){if(u()){const l=3,u=parseFloat((Math.random()*(this.minOffsetInMs-this.maxOffsetInMs)+this.maxOffsetInMs).toFixed(l)),p=.5,h=Math.random()<p?-1:1,g=Math.min(this.baseRetryDelayInMs*Math.pow(this.factor,i),this.maxRetryDelayInMs)+u*h;if(this.loggingService.warnCallback((()=>`Retrying the request in ${g} milliseconds.`),c,{error:s,currentRetry:i+1,requestInfo:o}),a.M0&&a.M0.sendAppErrorEvent){const e=("string"==typeof s?s:s.message)||"";a.M0.sendAppErrorEvent({...r.if_,pb:{...r.if_.pb,retryAttemptsMade:i,serviceFailed:c&&c.Message,maxRetries:this.maxRetries,customMessage:`${this.getActivityName(c)}. Error details: '${e}'. Retrying the request in ${g} milliseconds`}},!1)}setTimeout((()=>this.tryRequest(e,t,n,i+1,o,c,d)),g)}else this.loggingService.errorCallback((()=>u()?`ExponentialBackoffRetry has exceeded maximum retries ${this.maxRetries}`:"Request has failed."),c,{error:s,currentRetry:i,requestInfo:o}),n(s)}}async timeoutServiceRequest(e,t){return new Promise((async(n,i)=>{const r=setTimeout((()=>i(new Error(`Service Request Timed out after ${e} milliseconds!`))),e);try{n(await t),clearTimeout(r)}catch(e){i(e),clearTimeout(r)}}))}getActivityName(e){return`Activity name: '${e&&e.Message||"None"}'`}}c.defaultBaseRetryDelayInMs=100,c.defaultFactor=2,c.defaultMaxOffsetInMs=25,c.defaultMaxRetries=5,c.defaultMinOffsetInMs=1,c.maxAllowedRetries=10,c.maxAllowedRetryDelayInMs=2e3;var d=n(65128),l=n(13010),u=n(1970),p=n(42147),h=n(84147),g=n(54820),m=n(76733);let f,v;const y=3;function S(e,t={},n,r=!1){return(0,d.fK)()?(0,d.rg)(e,t,n,r):(0,i.Sm)(e,n,t)}async function C(e,t,n,i){const r=w().activityLoggingService.createActivity(t);return i=i||(0,d.tW)(),await g.$D.serviceRequestOnComplete((()=>function(){if(v)return v;return v=new c(w().loggingService,y),v}().executeRequest(e,null,r,n,i)),(()=>w().activityLoggingService.endActivity(r)))}function w(){if(f)return f;const e=l.u.getInstance("ExperienceActivityLogger");return(0,s.N)()&&m.k.isDebug()&&e.addAppender(new u.N(h.i.Activity)),f=new p.N(m.k.getLoggingService(),e),f}},15165:function(e,t,n){"use strict";n.d(t,{PH:function(){return u},Ph:function(){return c},fU:function(){return p},qQ:function(){return d}});var i=n(21789),r=n(13334),o=n(76733);let a,s;const c=new URL("","https://api.msn.com/");function d(){const e=(0,i.Yq)();var t;return a||(t=e.ServiceUrlBase,a=new URL("",t),h(a)),a}function l(){const e=(0,i.Yq)();var t;return s||(t=e.FeedServiceUrlBase,s=new URL("",t),h(s)),s}function u(e,t=d()){return new URL(e+(null==t?void 0:t.search),t)}function p(e,t=l()){return new URL(e+(null==t?void 0:t.search),t)}function h(e){let t=!1;"dev"!==e.searchParams.get("env.service")&&(0,r.nP)().UserIsSignedIn&&(t=!0),o.k.log("u-si: "+(0,i.Yq)().UserId),o.k.log("a-si: "+t),o.k.log("ss-si: "+(0,r.nP)().UserIsSignedIn)}},45539:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var i=n(23615);function r(e){const t=window&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&t.logLoadingError&&(0,i.e)().then((()=>{t.logLoadingError(e)}))}},23615:function(e,t,n){"use strict";n.d(t,{e:function(){return r}});const i="visibilitychange";function r(){return"visible"===document.visibilityState?Promise.resolve():new Promise((e=>{document.addEventListener(i,(()=>{"visible"===document.visibilityState&&e()}))}))}},30023:function(e,t,n){"use strict";n.d(t,{C7:function(){return g},Qf:function(){return p},U4:function(){return m},VX:function(){return r},W1:function(){return o},WM:function(){return a},Y5:function(){return c},Z6:function(){return s},dd:function(){return l},eO:function(){return h},m:function(){return f},pM:function(){return u},pc:function(){return d},v3:function(){return i}});const i="epdu",r="ppreload",o="ppage",a="ppmuid",s="fpr",c="TTPR",d="TTF.SearchBox",l="TTVR",u="TTVR.SearchBox",p="TTVR.BackgroundExecution",h="backgroundpreload",g="prerender",m="TTPV",f="TTVR.E2E"},9498:function(e,t,n){"use strict";n.d(t,{Qc:function(){return $},TR:function(){return G},wY:function(){return W},oc:function(){return H},Bj:function(){return q},VD:function(){return V},lr:function(){return U},Q9:function(){return _}});var i=n(10754),r=n(21930),o=n(7476),a=n(20009),s=n(76733),c=n(19995),d=n(15840),l=n(91735),u=n(54297),p=n(30023),h=n(49155),g=n(95815),m=n(23549);let f,v;function y(){const e=(0,u.$o)().removeObject(p.Z6);if(e){s.k.logObjects("pageRevealDelegate:isForceReloadRequested, time: "+new Date(e.time).toTimeString());const t=e.time;if(f=e.data,t>performance.timeOrigin)return!0}return function(){const e=(0,g.jG)()||"";if(v!==e)return f=1,(0,u.$o)().setItem(p.WM,`Previous MUID: ${e}, New MUID: ${v}`),!0;return!1}()}function S(e,t=!1){!function(e){f&&((0,u.$o)().setItem(p.VX,f+""),(0,u.$o)().setItem(p.W1,Math.round(e-performance.timeOrigin).toString()))}(e),(0,h.Z)({newUrl:C(t),invalidatePageCache:!1})}function C(e=!1){const t=location.href;return t?t.replace(/prerender(=\d)?/,"invalidaterender=1")+(e?"&stale=1":""):""}var w=n(26732),b=n(64726),T=n(45870),k=n(31558),P=n(13334),I=n(43356);let A,E,x,M,L,D=!1;const R=new T.o,F=new T.o,O=new T.o,B=new T.o,N=new T.o;function $(e,t,n,c,h,f){return P.Al.IsPrerender?"visible"===document.visibilityState?(h&&O.set(),void R.set()):(m.M0.addOrUpdateTmplProperty("isprerender","1"),h&&(m.M0.addOrUpdateTmplProperty("feedPrerender","0"),(0,w.Yc)(h)),x=e,M=t,(0,b.Hv)(),v=(0,g.jG)()||"",j()||h?(0,r.su)("PrerenderStart",performance.now()):function(e){if(A=document.createElement("div"),!K()){const t=document.body,n=A.style;e?n.backgroundColor="var(--fill-color)":n.background="transparent",n.position="fixed",n.bottom=n.left=n.right=n.top="0",n.zIndex="2147483647",t?(t.appendChild(A),s.k.logObjects("pageRevealDelegate:addOverlay: Added overlay")):s.k.logObjects("pageRevealDelegate:addOverlay: Document body is not available, failed to add overlay.")}(0,r.su)("PrerenderStart",performance.now())}(f),L=()=>async function(e,t){t&&await new Promise((e=>setTimeout(e,t)));document.removeEventListener("visibilitychange",L);const n=function(){if(!P.Al||!P.Al.CurrentFlightSet)return-1;if(P.Al.CurrentFlightSet.has("prg-prerend12h"))return 43200;if(P.Al.CurrentFlightSet.has("prg-prerend6h"))return 21600;if(P.Al.CurrentFlightSet.has("prg-prerend3h"))return 10800;if(P.Al.CurrentFlightSet.has("prg-prerend1h"))return 3600;if(P.Al.CurrentFlightSet.has("prg-prerend30m"))return 1800;if(P.Al.CurrentFlightSet.has("prg-prerend10m"))return 600;return-1}();if(n>0){Math.round((0,l.Hk)()-performance.timeOrigin)/1e3>n&&(0,l.yV)(11)}P.Al.CurrentFlightSet.has("preinvttvr")&&function(){const e=(0,i.Ou)();if(e.TTVR)return!1;const t=e.IncompleteMarkers;return t&&(t.includes("TTVR.GridViewFeed")||t.includes("TTVR.WaterfallViewFeed"))&&!e.FirstSectionRenderStart}()&&(0,l.yV)(13);if(y())return n>0&&(document.body.style.display="none"),void S((0,l.Hk)());(function(){var e,t,n,r;if(null===(e=window)||void 0===e||null===(t=e.chrome)||void 0===t||null===(n=t.embeddedSearch)||void 0===n||null===(r=n.newTabPage)||void 0===r||!r.getTabTimings)return;const o=(0,i.Ou)();window.chrome.embeddedSearch.newTabPage.getTabTimings(((e,t)=>{e&&t&&void 0!==t.tabStartToNavigationStart&&(o.tabStartToNavigationStart=Math.round(t.tabStartToNavigationStart))}))})(),performance.mark(a.DB);const o=performance.now();(0,i.Ou)()[a.DB]=Math.round(o),e&&(O.set(),await V(),await function(){if(!P.Al.IsPrerender)return Promise.resolve();return B.getResultAsync()}(),performance.mark(d.Jl));await(0,I.F_)(),D=!0;const s=j()||e;s||(E=setTimeout((()=>{z()}),1e3));c=(0,l.Hk)(),void function(e){m.M0.addOrUpdateTmplProperty("isbackgroundpreload","1"),m.M0.addOrUpdateCustomProperty(p.W1,Math.round(e-performance.timeOrigin).toString()),(0,r.su)("PrerenderRevealed",e);const t=(0,r.O0)("PrerenderStart");(0,r.su)("PrerenderAge",e-t)}(c),await(0,w.XX)(o,x,M),A&&!s&&(z(),await F.getResultAsync());var c;s&&(0,r.EV)(d.cA);(0,d.G)(),(0,d.fm)(x,e),performance.mark(a.O6),performance.measure("StaleRevalidation",a.DB,a.O6),R.set(),(0,b.mB)(),(0,w.Gy)(),m.M0.runContentVisibilityCallbacks()}(h,f),document.addEventListener("visibilitychange",L),void function(e,t){e&&window.setTimeout((()=>{"visible"!==document.visibilityState&&m.M0.sendAppErrorEvent({...o.GI7,pb:{...o.GI7.pb,customMessage:"Prerender content staled"}})}),6e4*e);t&&window.setTimeout((()=>{"visible"!==document.visibilityState&&m.M0.sendAppErrorEvent({...o.DxP,pb:{...o.DxP.pb,customMessage:"Prerender sd staled"}})}),6e4*t)}(n,c)):((0,k.N)()&&((0,i.Ou)()[p.C7]=0),void function(){const e=(0,u.$o)().removeItem(p.VX),t=(0,u.$o)().removeItem(p.W1),n=(0,u.$o)().removeItem(p.WM);e&&m.M0.addOrUpdateCustomProperty(p.VX,e),t&&m.M0.addOrUpdateCustomProperty(p.W1,t),n&&m.M0.sendAppErrorEvent({...o.smA,pb:{...o.smA.pb,customMessage:n}},!1)}())}function U(){return P.Al.IsPrerender?R.getResultAsync():Promise.resolve()}function _(){return P.Al.IsPrerender?O.getResultAsync():Promise.resolve()}function H(){O.set()}function W(){B.set()}function q(){N.set()}function V(){return P.Al.IsPrerender?N.getResultAsync():Promise.resolve()}function G(){return P.Al.IsPrerender&&!D}function z(){try{E&&clearTimeout(E),!K()&&document.body.removeChild(A),s.k.logObjects("pageRevealDelegate:removeOverlay: Removed overlay"),(0,c.c)((()=>{(0,r.EV)(d.cA),F.set()}))}catch(e){}A=null}function j(){var e;return!(null===(e=P.Al.CurrentFlightSet)||void 0===e||!e.has("prg-no-overlay"))}function K(){var e;return!(null===(e=P.Al.CurrentFlightSet)||void 0===e||!e.has("prg-no-overlaycss"))}},91735:function(e,t,n){"use strict";n.d(t,{Ge:function(){return a},HQ:function(){return s},Hk:function(){return l},ih:function(){return c},yV:function(){return d}});var i=n(30023),r=n(54297);const o=new Set;function a(e){const t=(0,r.$o)().getObject(i.v3)||{},n=t[e];return!isNaN(n)&&(o.has(e)||o.add(e),delete t[e],(0,r.$o)().setObject(i.v3,t),n>performance.timeOrigin)}function s(e){return o&&o.has(e)}function c(e){const t=(0,r.$o)().getObject(i.v3)||{},n=t[e];isNaN(n)&&(t[e]=l(),(0,r.$o)().setObject(i.v3,t))}function d(e){const t={time:l(),data:e};(0,r.$o)().setObject(i.Z6,t)}function l(){return Math.round(performance.timeOrigin+performance.now())}},15840:function(e,t,n){"use strict";n.d(t,{G:function(){return S},Jl:function(){return h},cA:function(){return p},ew:function(){return C},fm:function(){return y},my:function(){return b},tV:function(){return w}});var i=n(79545),r=n(69233),o=n(19233),a=n(21930),s=n(20009),c=n(7476),d=n(30023),l=n(23549);const u="TTVR.",p="OverlayRemoval",h="disableFeedPrerenderInitComplete",g="disableFeedPrerenderInitTime",m="TTVR.BackgroundExecution.";let f=0,v=0;function y(e,t){t&&function(){const e=["TTVR",r.p.wpoCallStart,r.p.wpoResponseBack,r.p.firstSectionRenderStart,u+r.p.feed,u+r.p.basicFeed,u+r.p.viewCards,u+"GridViewFeed",u+"WaterfallViewFeed",u+r.p.sdCards,u+"MoneyInfoCardWC",u+"WeatherCardWC",u+"WithRefreshDelay",u+"ShoppingCardWC",u+"TrendingNowWC",u+"SportsCardWC","WeatherCardWC.Ready","WeatherCardWC.Start","WeatherGreeting.Render","WelcomeGreeting.Start",s.zJ,o.qG.RequestInitiated,o.qG.AdProcessed,o.qG.AdRendered,o.qG.RenderReady,o.qG.TimeToConsumeAds,o.qG.RenderReady,o.qG.TimeToAdResponse,o.qG.TimeToServeAd],t=window._pageTimings;if(!t)return;const n=v-f;e.forEach((e=>{Object.prototype.hasOwnProperty.call(t,e)&&(t[e]-=n)}));for(const e in t)0==e.indexOf("TTVR.ShoppingCardWC-")&&(t[e]-=n)}();const n=window._pageTimings;if(!n)return;const y=(0,a.TZ)(h),S=(0,a.Sc)(p);n[d.C7]=1,n[d.eO]=1;let C=S,w=-1;e.forEach((e=>{const r=n[u+e];let o=(0,a.Sc)(e);if(o=Math.max(o,S),n[m+e]=r,n[u+e]=o||-1,e===i.x.commonSearchBoxEdgeNext)if(t&&y>-1){const e=performance.measure(g,s.DB,h);w=o-Math.round((null==e?void 0:e.duration)||0)}else w=o;o>C&&(C=o)}));const b=n[d.dd];let T=!1;if(isNaN(b)||null===b){let t=n.IncompleteMarkers;if(!t){const e=(0,a.bO)(a.oN.Primary);t=null==e?void 0:e.join(",")}const i=(0,a.Gb)(),r=i.marker||"None",o=i.value||"None",s=n[u+"WaterfallViewFeed"]||0;let d="";s&&(d=`TTVR.Waterfall: ${s}.`);let p="";const h=n.visualDependenciesConfigs||[];h.length&&(p=`DependenciesConfigs: ${h.join("|")}.`),l.M0.sendAppErrorEvent({...c.lFV,message:"TTVR missing during prerender.",pb:{...c.lFV.pb,customMessage:`Incomplete markers: ${t}. visuallyReadyDependencies: ${e.join("|")}. Last Marked: ${r} ${o}. ${p} ${d}`}}),T=!0}if((isNaN(C)||null===C)&&(l.M0.sendAppErrorEvent({...c.HYO,message:"TTPR missing during prerender."}),T=!0),T)return;const k=Math.min(C,b);if(n[d.Y5]=n[d.dd]=k,n[d.Qf]=b,n.tabStartToNavigationStart&&n[d.U4]){const e=n.tabStartToNavigationStart+n[d.U4];n[d.m]=n[d.dd]+e}const P=n[d.pM],I=n[d.pc],A=n[`${d.Y5}.${r.p.searchBox}`]=Math.min(w,P);isNaN(P)||null===P?l.M0.sendAppErrorEvent({...c.Cab,message:"TTVR.SearchBox missing during prerender."}):n[d.pM]=Math.min(A,P),isNaN(I)||null===I?l.M0.sendAppErrorEvent({...c.bor,message:"TTF.SearchBox missing during prerender."}):n[d.pc]=Math.min(A,I)}function S(){const e=window._pageTimings;if(!e)return;const t=performance.getEntriesByType("visibility-state").find((e=>"visible"===e.name));e[d.U4]=t&&Math.round(t.startTime)||Math.round(performance.now())}function C(){f=Math.round(performance.now())}function w(){v=Math.round(performance.now())}function b(){return v-f}},26732:function(e,t,n){"use strict";n.d(t,{Gy:function(){return f},MV:function(){return S},XX:function(){return m},Yc:function(){return C}});var i=n(21930),r=n(88826),o=n(7476),a=n(45870),s=n(43356),c=n(91735),d=n(19995);let l,u=[],p=[],h=new Set,g=new a.o;function m(e,t,n){const r=(0,s.S0)().getCurrentState().aboveTheFoldVisuallyReady.endTime,o=new Set;for(const e of u){const{experienceType:n}=e;t.includes(n)&&h.add(n)}0==h.size&&g.set();for(const t of u){const{experienceType:a}=t;if(l&&("GridViewFeed"===a||"WaterfallViewFeed"===a)){(0,i.EV)(a),y(a),o.add(a);continue}const s=(0,c.Ge)(a),d=0===t.thresholdMinutes||null!=t.thresholdMinutes&&e-r>6e4*t.thresholdMinutes;n||s||d?(v(t),p.push(t.delayCallback)):((0,i.EV)(a),y(a)),o.add(a)}for(const e of t)o.has(e)||(0,i.EV)(e);return g.getResultAsync()}function f(){for(const e of p)e()}async function v(e){try{await e.criticalCallback(),(0,d.c)((()=>{(0,i.EV)(e.experienceType),y(e.experienceType)}))}catch(t){(0,r.OO)(t,o.NKp,"Exception when running stale revalidate callback","Experience: "+e.experienceType)}}function y(e){h.delete(e)&&0==h.size&&g.set()}function S(e){u.push(e)}function C(e){l=e}},64726:function(e,t,n){"use strict";n.d(t,{Hv:function(){return s},eC:function(){return d},hR:function(){return p},mB:function(){return c}});var i=n(45870);let r,o,a=!1;function s(){a=!0}function c(){a=!1,u()}function d(e){return"visible"!==document.visibilityState||e&&a?(r||(r=new i.o,document.addEventListener("visibilitychange",l)),r.getResultAsync()):Promise.resolve()}function l(){"visible"===document.visibilityState&&u()}function u(){!a&&r&&(r.set(),r=null,document.removeEventListener("visibilitychange",l))}function p(){return o||(o=new Promise((e=>{"visible"===document.visibilityState&&e(),document.addEventListener("visibilitychange",(function t(){"visible"===document.visibilityState&&(e(),document.removeEventListener("visibilitychange",t))}))}))),o}},84237:function(e,t,n){"use strict";n.d(t,{o:function(){return S}});var i=n(30440),r=n(10754),o=n(7476),a=n(69686),s=n(64902),c=n(69233),d=n(23549),l=n(82898),u=n(78951),p=n(59997),h=n(92100),g=n(13334),m=n(78125),f=n(58616);function v(){const e=[];let t=document.body,n=0,i=!1;for(;t;){var r,o;if(e.push(`[index:${n};inShadow:${i}]${t.nodeName}`),t.children&&t.children.length)n=t.children.length-1,t=t.children[n],i=!1;else if(null!==(r=t.shadowRoot)&&void 0!==r&&r.children&&(null===(o=t.shadowRoot)||void 0===o?void 0:o.children.length)>0){var a,s;n=(null===(a=t.shadowRoot)||void 0===a?void 0:a.children.length)-1,t=null===(s=t.shadowRoot)||void 0===s?void 0:s.children[n],i=!0}else t=null}return e.join(">")}function y(e){return e?"#242424":"#F7F7F7"}async function S(e,t,n,S){let C;i.A.startMark("WC.Render"),C=void 0===n||"boolean"==typeof n?{noPaint:!!n}:n;const w=e.configRef,b=(0,a.ITY)(w.experienceType),T=matchMedia("(prefers-color-scheme:dark)");if(window.isSSREnabled&&!window.isSSRCompleted){var k;if(null===d.M0||void 0===d.M0||d.M0.addOrUpdateTmplProperty("SSRIncomplete","1"),(0,r.Ou)()[c.p.isSSRAborted]="1","vp"===h.c.getQueryParameterByName("reqsrc",location.href))return void document.write("SSR didn't complete successfully, CSR fallback is disabled for VP tests");if(null===d.M0||void 0===d.M0||d.M0.sendAppErrorEvent({...o.O5q,message:"SSR didn't complete successfully, remove the existing design system provider element to avoid broken UI",pb:{...o.O5q.pb,lastElements:v()}}),window.isCSRFallback=!0,null===(k=document.querySelector(t))||void 0===k||k.remove(),window.disableCSRFallback)return Promise.resolve()}const P=document.querySelector(t)||document.createElement(t);P.baseLayerLuminance=T.matches?m.h.DarkMode:m.h.LightMode,P.direction="rtl"===g.Al.MarketDir?p.N.rtl:p.N.ltr,P.setAttribute("fill-color",y(T.matches));for(const e in C)Reflect.set(P,e,Reflect.get(C,e));const I=window.isSSREnabled?(0,f.bE)("WholePageHydration",!0):void 0,A=(0,f.zb)(P,I,S);T.addEventListener("change",(e=>{P.baseLayerLuminance=e.matches?m.h.DarkMode:m.h.LightMode,P.setAttribute("fill-color",y(e.matches))})),P.isConnected||document.body.appendChild(P);const E=new u.D({type:l.c9.Module,name:w.experienceType,content:{}});let x=P.querySelector(b);return x||(x=document.createElement(b)),x.parentTelemetry=E,x.setAttribute("config-instance-src",null==w?void 0:w.instanceSrc),x.setAttribute("instance-id",e.instanceId||""),x.setAttribute("data-t",E.getMetadataTag()),await(0,s.Fg)(e),x.isConnected||P.appendChild(x),i.A.endMark("WC.Render"),A}},9565:function(e,t,n){"use strict";var i;n.d(t,{m:function(){return i}}),function(e){e.small="OneByOne",e.medium="OneByTwo",e.large="OneByThree"}(i||(i={}))},92378:function(e,t,n){"use strict";var i;n.d(t,{f:function(){return i}}),function(e){e.AiCharacter="aicharacterCardEnabled",e.AutosMarketplaceCard="autosmarketplaceCardEnabled",e.BoostCard="boostCardEnabled",e.HoroscopeCard="horoscopeCardEnabled",e.WeatherCard="weatherCardEnabled",e.SportsCard="sportsCardEnabled",e.MoneyCard="moneyCardEnabled",e.FinanceCard="financeCardEnabled",e.OnThisDayCard="onthisdayCardEnabled",e.SavingsCard="savingsCardEnabled",e.ShoppingCard="shoppingCardEnabled",e.ShoppingFashionCarousel="shoppingFashionCardEnabled",e.VideoShoppingCard="videoshoppingCardEnabled",e.ShoppingEventCard="eventSDCardShoppingEnabled",e.TrafficCard="trafficCardEnabled",e.EsportsCard="esportsCardEnabled",e.EsportsStreamsCard="esportsStreamsCardEnabled",e.ElectionsCard="genericelectionCardEnabled",e.LotteryCard="lotteryCardEnabled",e.QnaCard="qnaCardEnabled",e.RecipesCard="recipeCardEnabled",e.PrismFeedCard="prismFeedCardEnabled",e.PrismCarouselCard="prismFeedCarouselCardEnabled",e.TravelCard="travelCardEnabled",e.HealthCard="healthCardEnabled",e.TopStoriesCard="topstoriesCardEnabled",e.TrendingTopics="TrendingTopicsUpsellEnabled",e.LocalGuideCard="localGuideCardEnabled",e.GroceryCard="groceryCardEnabled",e.RewardsCard="rewardsCardEnabled",e.RecommendedSearchesCard="recommendedSearchCardEnabled",e.PersonalizedOffersCard="personalizedoffersCardEnabled",e.PollsCard="pollsCardEnabled",e.MarketPlaceCard="marketplaceCardEnabled",e.QuizCard="quizcardCardEnabled",e.CasualGamesCard="esportsCardEnabled",e.CommuteCard="commuteCardEnabled",e.MobileShoppingCard1="mobileShoppingCard1Enabled",e.MobileShoppingCard2="mobileShoppingCard2Enabled",e.MobileShoppingCard3="mobileShoppingCard3Enabled",e.MobileShoppingCard4="mobileShoppingCard4Enabled",e.MobileShoppingCard5="mobileShoppingCard5Enabled",e.TrendingSearchCard="trendingsearchCardEnabled",e.RealEstateCard="realestateCardEnabled",e.MangaCard="mangaCardEnabled",e.RichCalendarCard="richCalendarCardEnabled",e.DonationNpoCard="DonationNpoCardEnabled",e.PrayerTimesCard="prayertimesCardEnabled",e.Crypto="CryptoCard",e.MarketBrief="MarketBriefCard",e.ElectionCard="ElectionCardEnabled",e.EntertainmentPremierCard="entertainmentCardEnabled",e.EntertainmentPremieresCard="entertainmentCardEnabled",e.CommunityCard="CommunityCardEnabled"}(i||(i={}))},45447:function(e,t,n){"use strict";var i;n.d(t,{L:function(){return i}}),function(e){e.Location="Location",e.Weather="Weather",e.Finance="Finance",e.Team="Team",e.League="League",e.Player="Player",e.Traffic="Traffic",e.Widget="Widget",e.TopicFeed="TopicFeed",e.CasualGame="CasualGame"}(i||(i={}))},19779:function(e,t,n){"use strict";n.d(t,{N:function(){return C}});var i=n(76733),r=n(7476),o=n(88826),a=n(83102),s=n(21789),c=n(13334),d=n(71778),l=n(30376),u=n(54820),p=n(15165),h=n(44672),g=n(45447),m=n(92378),f=n(9565),v=n(23549),y=n(70169);class S{constructor(e){this.fetchImpl=e,this.userUpdateEndpoint="msn/user",this.pdpServiceEndpoint="graph/actions",this.locationsServiceEndPoint="v1/news/users/me/locations",this.userActionServiceEndPoint="news/users/me/actions",this.ocid="pdp-peregrine",this.ocidOverride=!0}getCommonParams(e,t){return e?u.$D.getOneServiceParamsWithAuth(t??(0,s.Yq)().UserId,this.ocid,!this.ocidOverride):u.$D.getOneServiceParamsWithoutAuth(t??(0,s.Yq)().UserId,this.ocid,!this.ocidOverride)}async getUserDefaultLocation(e){const t=await this.getRequestInit({method:"GET"}),n=(0,p.PH)(this.locationsServiceEndPoint);let i;[...u.$D.getCommonParams2(this.ocid,!this.ocidOverride),{key:"autodetect",value:e&&`${e}`}].forEach((e=>{e.value&&n.searchParams.set(e.key,e.value)}));try{i=await(0,h.w)((async()=>{const e=await this.fetchImpl(n.href,t);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: getUserDefaultLocation}`;throw new Error(t)}return e}),"getUserDefaultLocation")}catch(e){return i}return i}async addToFavoriteLocation(e,t){const n="Location",i="Follow",r=await this.getRequestInit({method:"POST",body:JSON.stringify({actionType:i,targetType:n,definitionName:t,degree:"FavoriteLocation",metaData:e})}),o=(0,p.PH)(this.pdpServiceEndpoint),s=await(0,y.XJ)()===a.Hy.SignedIn;let c;this.getCommonParams(s).forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));try{c=await(0,h.w)((async()=>{const e=await this.fetchImpl(o.href,r);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: ${i}, targetType: ${n}`;throw new Error(t)}return e.json()}),"addToFavoriteLocation")}catch(e){return!1}return!0}async removeFavoriteLocation(e,t=!1){return await this.deleteFromPdp(g.L.Location,"definitionName",[e],void 0,void 0,void 0,void 0,void 0,t)}async removeLocation(e,t=!1){return await this.deleteFromPdp(g.L.Location,"definitionName",[e],void 0,void 0,void 0,void 0,void 0,t)}async updatePdpHomeLocation(e,t,n={},i,r=!1){const o=g.L.Location,s="Follow",c=await this.getRequestInit({method:"POST"},n,r);c.body=JSON.stringify({actionType:s,targetType:o,definitionName:t,degree:"DefaultLocation",metaData:e});const d=(0,p.PH)(this.pdpServiceEndpoint),l=await(0,y.XJ)()===a.Hy.SignedIn;return this.getCommonParams(l&&!r,i).forEach((e=>{e.value&&d.searchParams.set(e.key,e.value)})),await(0,h.w)((async()=>{const e=await this.fetchImpl(d.href,c);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: ${s}, targetType: ${o}`;throw new Error(t)}return e}),"setPdpHomeLocation"),this.tryInvalidateBulkFetchedPdpTargetType(o),!0}async updateTrafficMyRoutes(e,t,n,r,o,a,s){const c=n.replace(/[^a-zA-Z0-9\-.,_]/g,""),d=g.L.Traffic,l="Follow",u=await this.getRequestInit({method:"POST",body:JSON.stringify({actionType:l,targetType:d,targetId:c,degree:e,definitionName:t,metadata:r,createdDateTime:a})},s),p=await this.getTrafficPdpUrl(null,null,o);try{await(0,h.w)((async()=>{const e=await this.fetchImpl(p.href,u);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: ${l}, targetType: ${d}`;throw new Error(t)}return e.json()}),"updateTrafficMyRoutes");this.tryInvalidateBulkFetchedPdpTargetType(d)}catch(e){return i.k.logError(e.message),!1}return!0}async deleteTrafficMyRoutes(e,t,n){const i=await this.getRequestInit({method:"DELETE"}),r=await this.getTrafficPdpUrl(e,t,n);try{await(0,h.w)((async()=>{const e=await this.fetchImpl(r.href,i);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${g.L.Traffic}`;throw new Error(t)}return e}),"deleteTrafficFromPdp"),this.tryInvalidateBulkFetchedPdpTargetType(g.L.Traffic)}catch(e){return!1}return!0}async getTrafficMyRoutes(e,t){const n=await this.getRequestInit({method:"GET"}),i=await this.getTrafficPdpUrl(e,null,t);try{var r;const e=await(0,h.w)((async()=>{const e=await this.fetchImpl(i.href,n);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${g.L.Traffic}`;throw new Error(t)}return e}),"getTrafficFromPdp");return null===(r=await e.json())||void 0===r?void 0:r.value}catch(e){return null}}async getTrafficPdpUrl(e,t,n,i="Follow",r){const o=(0,p.PH)(this.pdpServiceEndpoint),c=await(0,y.XJ)()===a.Hy.SignedIn,d=(0,s.Yq)().UserId,l=c?u.$D.getOneServiceParamsWithAuth(d,this.ocid,!this.ocidOverride):u.$D.getOneServiceParamsWithoutAuth(d,this.ocid,!this.ocidOverride);if(e||t){const n=`targetType eq '${g.L.Traffic}'`,a=e?`degree eq '${e}'`:"",s=t?`definitionName eq '${t}'`:"",c=r?`targetId eq '${r}'`:"";o.searchParams.set("$filter",`actionType eq '${i}' and (${n})${a?` and (${a})`:""}${s?` and (${s})`:""}${c?` and (${c})`:""}`)}return[...l,...n||[]].forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)})),o}async addToWatchList(e,t=0,n={},i={}){var r;const o=g.L.Finance,d="Follow",l=await this.getRequestInit({method:"POST",body:JSON.stringify({actionType:d,targetType:o,targetId:e,metadata:{securityType:t,tickerId:this.generateUUID(),...i}})},n),m=(0,p.PH)(this.pdpServiceEndpoint),f="zh-cn"!==(0,s.Yq)().CurrentMarket,v=await(0,y.XJ)()===a.Hy.SignedIn,S=(null===(r=(0,c.nP)().CurrentFlights)||void 0===r?void 0:r.split(",").filter((e=>e.includes("1s"))).join(","))||"";let C;(v&&f?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,S,!0):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,S,!0)).forEach((e=>{e.value&&m.searchParams.set(e.key,e.value)}));try{C=await(0,h.w)((async()=>{const e=await this.fetchImpl(m.href,l);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: ${d}, targetType: ${o}`;throw new Error(t)}return e.json()}),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(o)}catch(e){return!1}return!0}async addListToWatchList(e,t={},n={}){var i;const r=g.L.Finance,o="Follow",d=await this.getRequestInit({method:"POST",body:JSON.stringify(e.map((e=>({actionType:o,targetType:r,targetId:e.key,metadata:{securityType:e.value,tickerId:this.generateUUID(),...n}}))))},t),l=(0,p.PH)(this.pdpServiceEndpoint),m="zh-cn"!==(0,s.Yq)().CurrentMarket,f=await(0,y.XJ)()===a.Hy.SignedIn,v=(null===(i=(0,c.nP)().CurrentFlights)||void 0===i?void 0:i.split(",").filter((e=>e.includes("1s"))).join(","))||"";let S;(f&&m?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,v,!0):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,v,!0)).forEach((e=>{e.value&&l.searchParams.set(e.key,e.value)}));try{S=await(0,h.w)((async()=>{const e=await this.fetchImpl(l.href,d);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: ${o}, targetType: ${r}`;throw new Error(t)}return e.json()}),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(r)}catch(e){return!1}return!0}generateUUID(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}async sortWatchList(e,t={}){var n,i;const r=g.L.Finance,o="Follow",d=(null===(n=(0,c.nP)().CurrentFlights)||void 0===n?void 0:n.split(",").filter((e=>e.includes("1s"))).join(","))||"",l=[{key:"fdhead",value:d}],m=await C.readPdpWithTargetType(g.L.Finance,!0,200,t,!1,l),f=m&&(null===(i=m.value)||void 0===i?void 0:i.filter((e=>e.actionType===o&&e.targetId)));if(!f||f.length<e.length)return!1;const v={};let S=e.length;f.forEach((t=>{let n=e.findIndex((e=>e===t.targetId));n<0&&(n=S,S++),v[t.targetId]=JSON.stringify({actionType:o,targetId:t.targetId,targetType:r,rank:n,metadata:t.metadata})}));const w=await this.getRequestInit({method:"PUT",body:JSON.stringify(v)},t),b=(0,p.PH)(this.pdpServiceEndpoint);(await(0,y.XJ)()===a.Hy.SignedIn?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,d,!0):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,d,!0)).forEach((e=>{e.value&&b.searchParams.set(e.key,e.value)}));try{await(0,h.w)((async()=>{const e=await this.fetchImpl(b.href,w);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: ${o}, targetType: ${r}`;throw new Error(t)}return e.json()}),"sortWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(g.L.Finance)}catch(e){return!1}return!0}async updateWeatherInterests(e,t,n={},r){const o=g.L.Weather,s=await this.getRequestInit({method:"POST",body:JSON.stringify({actionType:"Follow",targetType:o,targetId:e,metadata:t})},n),c=(0,p.PH)(this.pdpServiceEndpoint),d=await(0,y.XJ)()===a.Hy.SignedIn;this.getCommonParams(d,r).forEach((e=>{e.value&&c.searchParams.set(e.key,e.value)}));try{const e=await this.fetchImpl(c.href,s);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update weather interests call`;throw new Error(t)}}catch(e){return i.k.logError(e.message),!1}return!0}async getWeatherInterest(e={},t="",n){const i=await this.getRequestInit({method:"GET"},e),r=this.getWeatherInterestUrl(null,t),o=await(0,y.XJ)()===a.Hy.SignedIn;this.getCommonParams(o,n).forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{var s;const e=await(0,h.w)((async()=>{const e=await this.fetchImpl(r.href,i);if(e.status>=400){const t=`returned error response. Status: ${e.status} for actionType: Follow, targetType: ${g.L.Weather}`;throw new Error(t)}return e}),"getWeatherInterest");return null===(s=await e.json())||void 0===s?void 0:s.value}catch(e){return null}}getWeatherInterestUrl(e,t,n="Follow"){const i=(0,p.PH)(this.pdpServiceEndpoint),r=`targetType eq '${g.L.Weather}'`;return i.searchParams.set("$filter",`actionType eq '${n}' and (${r})${t?` and (${t})`:""}`),[...e||[]].forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)})),i}async updateWeatherSettings(e,t,n={},i,r=!1){if(!e&&!t)return!0;let o="";o=e&&!t?'{"weatherDisplayUnit":"'+e+'"}':!e&&t?'{"userSettings":{"weatherLocationSettingMode":"'+t+'"}}':'{"weatherDisplayUnit":"'+e+'","userSettings":{"weatherLocationSettingMode":"'+t+'"}}';const s=await this.getRequestInit({method:"POST"},n,r);s.body=o;const c=(0,p.PH)(this.userUpdateEndpoint),d=await(0,y.XJ)()===a.Hy.SignedIn;this.getCommonParams(d&&!r,i).forEach((e=>{e.value&&c.searchParams.set(e.key,e.value)}));const l=await this.fetchImpl(c.href,s);if(l.status>=400){const e=`OneService returned error response. Status: ${l.status} for update weather setting call`;throw new Error(e)}return!0}async updateFinanceInterests(e){var t;if(!e)return!1;const n={financeInterests:e},i=JSON.stringify(n),r=await this.getRequestInit({method:"POST"});r.body=i;const o=(0,p.PH)(this.userUpdateEndpoint),d="zh-cn"!==(0,s.Yq)().CurrentMarket,l=await(0,y.XJ)()===a.Hy.SignedIn,h=(null===(t=(0,c.nP)().CurrentFlights)||void 0===t?void 0:t.split(",").filter((e=>e.includes("1s"))).join(","))||"";(l&&d?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,h,!0):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,h,!0)).forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));const g=await this.fetchImpl(o.href,r);if(g.status>=400){const e=`OneService returned error response. Status: ${g.status} for update finance interests call`;throw new Error(e)}return!0}async updateUserSettings(e,t={},n){if(!e)return!0;const r=JSON.stringify({userSettings:e},((e,t)=>t??void 0)),o=await this.getRequestInit({method:"POST"},t);o.body=r;const c=(0,p.PH)(this.userUpdateEndpoint),d=await(0,y.XJ)()===a.Hy.SignedIn?u.$D.getOneServiceParamsWithAuth(n??(0,s.Yq)().UserId,this.ocid,!this.ocidOverride):u.$D.getOneServiceParamsWithoutAuth(n??(0,s.Yq)().UserId,this.ocid,!this.ocidOverride);for(const{key:e,value:t}of d)t&&c.searchParams.set(e,t);try{const e=await this.fetchImpl(c.href,o);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update weather setting call`;throw new Error(t)}}catch(e){return i.k.logError(e.message),!1}return!0}async getPdpUserPreference(e,t={},n){const r=await this.getRequestInit({method:"GET"},t),o=(0,p.PH)(this.userUpdateEndpoint),c=await(0,y.XJ)()===a.Hy.SignedIn?u.$D.getOneServiceParamsWithAuth(n||(0,s.Yq)().UserId,this.ocid,!this.ocidOverride):u.$D.getOneServiceParamsWithoutAuth(n||(0,s.Yq)().UserId,this.ocid,!this.ocidOverride);for(const{key:e,value:t}of c)t&&o.searchParams.set(e,t);try{const e=await(0,h.w)((async()=>{const e=await this.fetchImpl(o.href,r);if(!e.ok){if(e.status>=400&&e.status<500&&408!=e.status)return e;throw Error(e.statusText)}return e}),"readPDPData");if(!e.ok&&404!=e.status)throw Error(`code=${e.status}, ${e.statusText}`);return{...await e.json(),is404:404==e.status}}catch(t){if(i.k.logError(t.message),e)throw Error(t.message);return null}}async updatePdpLayoutPreference(e){const t={method:"PUT",credentials:"include",body:JSON.stringify({dummyid:{userLayoutPreference:e}})},n=(0,p.PH)(this.userUpdateEndpoint);(await(0,y.XJ)()===a.Hy.SignedIn?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&n.searchParams.set(e.key,e.value)}));try{const e=await this.fetchImpl(n.href,t);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update layout preference setting call`;throw new Error(t)}}catch(e){return i.k.logError(e.message),!1}return!0}async updateSegmentCardsEnableStatus(e,t=null){if(!e&&!e.length)return!0;const n=[];if(t){let e;for(e in t)null!=t[e]&&n.push('"'+e+'": '+JSON.stringify(t[e]))}const i=e.map((e=>e.cardType!=m.f.TopStoriesCard?`\\"${e.cardType}\\":${e.enabled?'\\"1\\"':'\\"0\\"'}`:"")).join(","),r=n.length>0?'{"segmentCardSettings":"{'+i+'}","userSettings":{'+n.join(", ")+"}}":'{"segmentCardSettings":"{'+i+'}"}';return this.updateUserPreference(r)}async updateProductivityCardsEnableStatus(e){if(!e&&!e.length)return!0;const t=`{userSettings:{enterpriseCardsEnabled:"{${e.map((e=>`\\"is${e.cardType}Enabled\\":${e.enabled?"true":"false"}`)).join(",")}}"}}`;return this.updateUserPreference(t)}async updateGamingCardsEnableStatus(e){if(!e&&!e.length)return!0;const t=`{userSettings:{gamingCards:"{${e.map((e=>`\\"is${e.cardType}Enabled\\":${e.enabled?"true":"false"}`)).join(",")}}"}}`;return this.updateUserPreference(t)}async updateMorningDigestEnableStatus(e){if(!e&&!e.length)return!0;const t=`{userSettings:{WindowsShellMorningDigest:"{${e.map((e=>`\\"is${e.cardType}Enabled\\":${e.enabled?"true":"false"}`)).join(",")}}"}}`;return this.updateUserPreference(t)}async updateCommunitySettingsOptOutStatus(e){if(!e&&!e.length)return!0;const t={};e.forEach((e=>{t[e.settingType]=e.optedOut?"1":"0"}));const n={communitySettings:t};return this.updateUserPreference(JSON.stringify(n))}async updateWidgetSettings(e,t={},n){if(!e)return!1;const i=e.map((e=>({actionType:"Follow",targetId:e.cardType,targetType:g.L.Widget,metadata:{prongsv2:{region:e.region,size:f.m[e.size],position:e.position,widgetDefinitionId:e.widgetDefinitionId}}})));return this.sendGenericActionRequest({additionalHeaders:t,endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(i),appError:n})}async muteWidget(e,t={},n){if(!e||!e.length)return!1;const i=e.map((e=>({actionType:"Mute",targetId:e,targetType:g.L.Widget})));return this.sendGenericActionRequest({additionalHeaders:t,endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(i),appError:n})}async disableSpotlightCard(e,t){if(!e)return!1;const n={actionType:"Disabled",definitionName:e,targetId:e,targetType:g.L.TopicFeed};return this.sendGenericActionRequest({endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(n),appError:t})}async sendGenericActionRequest(e){const{additionalHeaders:t,additionalParams:n,endpoint:i,method:r,payload:o,appError:c}=e;if(!i||!r)return this.logError(new Error("Missing arguments: 'endpoint' and 'method' should be provided and valid"),c),!1;const d=(0,p.PH)(i);let l;(await(0,y.XJ)()===a.Hy.SignedIn?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&d.searchParams.set(e.key,e.value)})),n&&n.forEach((e=>{e.value&&d.searchParams.set(e.key,e.value)}));try{JSON.parse(o),l=o}catch(e){l=JSON.stringify(o)}const g=await this.getRequestInit({method:r,body:l},t),m="GET"==r;try{return await(0,h.w)((async()=>{const e=await this.fetchImpl(d.href,g);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for payload: ${o}`;throw new Error(t)}return!m||await e.json()}),"sendActions")}catch(e){return this.logError(e,c),!1}}async getUserActions(e){const t=[{key:"actionType",value:e}],n=await this.sendGenericActionRequest({additionalParams:t,endpoint:this.userActionServiceEndPoint,method:"GET"});return n&&n.value}async setUserAction(e,t,n){return!!await this.sendGenericActionRequest({endpoint:n?this.pdpServiceEndpoint:this.userActionServiceEndPoint,method:"POST",payload:{actionType:e,...t}})}async deleteUserAction(e,t){const n=[{key:"actionType",value:e},{key:"targetId",value:t.targetId},{key:"definitionName",value:t.definitionName}];return!!await this.sendGenericActionRequest({additionalParams:n,endpoint:this.userActionServiceEndPoint,method:"DELETE"})}async deleteUserActionRelatedTraffic(e,t){const n=await this.getRequestInit({method:"DELETE"}),i=await this.getTrafficPdpUrl("Default",null,null,e,t.targetId);try{await(0,h.w)((async()=>{const t=await this.fetchImpl(i.href,n);if(t.status>=400){const n=`OneService returned error response. Status: ${t.status} for actionType: ${e}, targetType: ${g.L.Traffic}`;throw new Error(n)}return t}),"deleteActionRelatedTraffic"),this.tryInvalidateBulkFetchedPdpTargetType(g.L.Traffic)}catch(e){return!1}return!0}async updateUserPreference(e){const t=await this.getRequestInit({method:"POST"});t.body=e;const n=(0,p.PH)(this.userUpdateEndpoint);(await(0,y.XJ)()===a.Hy.SignedIn?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&n.searchParams.set(e.key,e.value)}));try{const i=await this.fetchImpl(n.href,t);if(i.status>=400){const t=`OneService returned error response while updating user preference. Status: ${i.status}, payload: ${e}`;throw new Error(t)}}catch(e){return!1}return!0}setPdpTargetTypesForBulkLoad(e){e&&e.length&&!this.bulkGraphActionTargetTypes&&(this.bulkGraphActionTargetTypes=e)}async readPdpWithTargetType(e,t=!1,n=void 0,i={},o=!0,a=[]){if(o){const t=await this.getFromWebWorker(e);if(t)return t}if(this.bulkGraphActionTargetTypes&&this.bulkGraphActionTargetTypes.length)if(this.bulkGraphActionTargetTypes.indexOf(e)>=0){this.bulkGraphActionResultCache=this.bulkGraphActionResultCache||await(this.bulkGraphActionPromise||(this.bulkGraphActionPromise=this.fetchPdpWithTargetTypes(this.bulkGraphActionTargetTypes,t,n,i,a)));const r=this.bulkGraphActionResultCache.get(e);if(r)return{value:r}}else v.M0.sendAppErrorEvent({...r.srQ,message:`Received an unknown target type "${e}" that was not in the bulk graph action target types list "${this.bulkGraphActionTargetTypes}". Falling back to new network call. Please update the EntryPoint config's "graphActionsToBulkLoad" property to include this type.`});const s=(await this.fetchPdpWithTargetTypes([e],t,n,i,a)).get(e);if(s)return{value:s}}async deleteFromPdp(e,t,n,i={},r=void 0,o="Follow",s,c=[],d=!1){const l=await this.getRequestInit({method:"DELETE"},i,d),u=(0,p.PH)(this.pdpServiceEndpoint),g=await(0,y.XJ)()===a.Hy.SignedIn,m=this.getCommonParams(g&&!d),f=`targetType eq '${e}'`,S=n.map((e=>`${t} eq '${e}'`)).join(" or ");let C=`actionType eq '${o}' and (${S}) and (${f})`;r&&(C+=` and (degree eq '${r}')`),u.searchParams.set("$filter",C),[...m,...c].forEach((e=>{e.value&&u.searchParams.set(e.key,e.value)}));try{await(0,h.w)((async()=>{const t=await this.fetchImpl(u.href,l);if(t.status>=400){const n=`OneService returned error response. Status: ${t.status} for actionType: ${o}, targetType: ${e}`;throw new Error(n)}return t}),"deleteFromPdp"),this.tryInvalidateBulkFetchedPdpTargetType(e)}catch(e){return s&&v.M0.sendAppErrorEvent({...s,pb:{...s.pb,actionType:o,error:e.message}}),!1}return!0}tryInvalidateBulkFetchedPdpTargetType(e){this.bulkGraphActionResultCache&&this.bulkGraphActionResultCache.delete(e)}async fetchPdpWithTargetTypes(e,t=!1,n=void 0,i={},r=[]){if(!e.length)return new Map;const o=e.map((e=>`targetType eq '${e}'`)).join(" or "),s=[{key:"$top",value:`${n=n||10*e.length*2}`},{key:"$filter",value:`actionType eq 'Follow' and (${o})`}],c=await this.getRequestInit({method:"GET"},i);!0===t&&(c.cache="no-store");const d=(0,p.PH)(this.pdpServiceEndpoint),l=await(0,y.XJ)()===a.Hy.SignedIn;[...s,...this.getCommonParams(l),...r].forEach((e=>{e.value&&d.searchParams.set(e.key,e.value)}));const u=await(0,h.w)((async()=>{const e=await this.fetchImpl(d.href,c);if(!e.ok){if(e.status>=400&&e.status<500&&408!=e.status)return e;throw Error(e.statusText)}return e}),"readPDPData");if(!u.ok)throw Error(`code=${u.status}, ${u.statusText}`);const m=new Map,f=await u.json();if(!f)return m;if(f.value)for(const e of f.value){let t=m.get(e.targetType);t||m.set(e.targetType,t=[]),t.push(e)}for(const t of e)if(m.get(t)||m.set(t,[]),t===g.L.Finance){if("all-cgcombo"===d.searchParams.get("interestType")){const e=m.get(g.L.CasualGame)||[];let n=m.get(g.L.Finance)||[];n=n.concat(e),m.set(t,n)}}return m}async updateMarketPreference(e){const t={method:"POST",credentials:"include",body:JSON.stringify({userSettings:{preferredMarket:e}})},n=(0,p.PH)(this.userUpdateEndpoint);(await(0,y.XJ)()===a.Hy.SignedIn?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&n.searchParams.set(e.key,e.value)}));try{const e=await this.fetchImpl(n.href,t);if(!e.ok)throw new Error(`Failed to update market preference: Status: ${e.status}`);return!0}catch(e){return i.k.logError(e.message),!1}}async getFromWebWorker(e){let t=null;if(d.yb){const n=this.maptoWebWorkerId(e);if(n&&n.trim()){const n=await(0,d.ot)({id:this.maptoWebWorkerId(e)});n.fetched&&(t=n.payload)}}return t}maptoWebWorkerId(e){switch(e){case g.L.Location:return"weatherpdp";case g.L.League:return"sportsleaguepdp";case g.L.Player:return"sportsplayerpdp";case g.L.Team:return"sportsteampdp";case g.L.Finance:return"moneypdp";default:return""}}async getRequestInit(e={method:"GET"},t={},n=!1){const i=await u.$D.getOneServiceHeaders();return e.headers={...n?{}:i,...t},e.credentials="include",e}async getFollowedLists(){var e;const t=await this.getRequestInit({method:"GET"}),n=(0,p.PH)(this.userUpdateEndpoint),d=await(0,y.XJ)()===a.Hy.SignedIn,l=(null===(e=(0,c.nP)().CurrentFlights)||void 0===e?void 0:e.split(",").filter((e=>e.includes("1s"))).join(","))||"",g=d?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,l,!0):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,l,!0);for(const{key:e,value:t}of g)t&&n.searchParams.set(e,t);try{const e=await(0,h.w)((async()=>{const e=await this.fetchImpl(n.href,t);if(!e.ok){if(e.status>=400&&e.status<500&&408!=e.status)return e;(0,o.OO)(null,r.G9t,"Error get followed list")}return e}),"getFollowedLists");return e.ok||(0,o.OO)(null,r.G9t,"Error get followed list"),await e.json()}catch(e){return i.k.logError(e.message),null}}async addToFollowedLists(e){var t;const n=g.L.Finance,i=await this.getRequestInit({method:"POST",body:JSON.stringify({financeListIds:e})}),r=(0,p.PH)(this.userUpdateEndpoint),o=await(0,y.XJ)()===a.Hy.SignedIn,d=(null===(t=(0,c.nP)().CurrentFlights)||void 0===t?void 0:t.split(",").filter((e=>e.includes("1s"))).join(","))||"";let l;(o?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,d,!0):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,d,!0)).forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{l=await(0,h.w)((async()=>{const e=await this.fetchImpl(r.href,i);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: FollowList, targetType: ${n}`;throw new Error(t)}return e.json()}),"addToFollowedLists")}catch(e){return!1}return!0}async deleteFromFollowedLists(e){var t;const n=g.L.Finance,i=await this.getRequestInit({method:"DELETE"}),r=(0,p.PH)(this.userUpdateEndpoint),o=await(0,y.XJ)()===a.Hy.SignedIn,d=(null===(t=(0,c.nP)().CurrentFlights)||void 0===t?void 0:t.split(",").filter((e=>e.includes("1s"))).join(","))||"";let l;[...o?u.$D.getOneServiceParamsWithAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,d,!0):u.$D.getOneServiceParamsWithoutAuth((0,s.Yq)().UserId,this.ocid,!this.ocidOverride,d,!0),...[{key:"financeListIds",value:e.toString()}]].forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{l=await(0,h.w)((async()=>{const e=await this.fetchImpl(r.href,i);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: UnFollowList, targetType: ${n}`;throw new Error(t)}return e.json()}),"deleteFromFollowedLists")}catch(e){return!1}return!0}logError(e,t){t?v.M0.sendAppErrorEvent({...t,pb:{...t.pb,error:e.message}}):i.k.logError(e.message)}}const C=new class extends S{constructor(){var e;(super((0,l.j)()),"windowsNewsPlus"===s.jG.AppType||"newsAndInterests"===s.jG.AppType||"winWidgets"===s.jG.AppType)?(this.ocid="sidebar"===(null===(e=c.Al.ClientSettings)||void 0===e?void 0:e.pagetype)?"shoreline":"winp2",this.ocidOverride=!0):"sharedWidgets"===s.jG.AppType?(this.ocid="hpwidget",this.ocidOverride=!0):"windowsNewsbar"===s.jG.AppType?(this.ocid="winp0dash",this.ocidOverride=!0):"travel"===s.jG.AppType?(this.ocid="travel-verthp-feeds",this.ocidOverride=!0):"gaming"===s.jG.AppType?(this.ocid="startgg-feeds",this.ocidOverride=!0):"bingHomepage"===s.jG.AppType?(this.ocid="BingHp01",this.ocidOverride=!0):"windowsShellV2"===s.jG.AppType&&(this.ocid="pdp-peregrine",this.ocidOverride=!0)}}},3883:function(e,t,n){"use strict";var i=n(38949);function r(e,t){const n=new URLSearchParams(e.location.search);if(n){const e=new URLSearchParams(t.search);if(null==n?void 0:n.keys())for(const t of n.keys())if(n.getAll(t)&&!e.getAll(t).length){n.getAll(t).forEach((n=>e.append(t,n)))}let i="";e.forEach(((e,t)=>i=i.concat(`&${t}=${e}`))),t.search=i.slice(1)}return t}function o(e,t,n){return"string"==typeof e?{pathname:e,state:t,search:n}:e}const a=(0,n(31558).N)()?function(e){const t=e(),n=t.push,i=t.replace;return t.push=(e,i,a)=>n.apply(t,[r(t,o(e,i,a))]),t.replace=(e,n,a)=>i.apply(t,[r(t,o(e,n,a))]),t}(i.lX):null;t.ZP=a},36560:function(e,t,n){"use strict";n.d(t,{lY:function(){return m}});var i,r=n(21789),o=n(19494);!function(e){e.NavigationData="NavigationDataAdapter",e.TopicsData="TopicsDataAdapter"}(i||(i={}));var a=n(7486),s=n(85205),c=n(96531),d=n(43356);class l{constructor(e,t){this.onUpdateFollowedTopics=()=>{if(!this.connector)return this.onRouteUpdateCallback([]);const e=this.connector.getCurrentState(),t=e.followedTopicIds,n=e.topicMap,r=[];t&&n&&t.forEach((e=>{const t=n[e],a={path:(0,o.qC)(t.name||t.canonicalName,e),display:t.name,experienceInfo:this.dynamicRouteExperienceInfo,context:{feedId:e},pivotId:e,dynamicPivotSource:i.TopicsData};r.push(a)})),this.onRouteUpdateCallback(r)},this.onRouteUpdateCallback=e,this.dynamicRouteExperienceInfo=t}async getDynamicPivotsFromDataConnector(e){switch(e){case s.z.TopicData:await this.getPivotsFromTopicData();break;case s.z.NavigationData:await this.getPivotsFromNavigationData();break;default:return}}async getPivotsFromTopicData(){await(0,d.F_)(),c._.getInstance().rootReducer.getDataConnector(s.z.TopicData).then((e=>{this.connector=e,this.connector.getFollowedTopics(!1).then((()=>{this.onUpdateFollowedTopics()}))})),a.G.followedTopics.registerObserver(this.onUpdateFollowedTopics),a.G.updateTopicFollowedState.registerObserver(this.onUpdateFollowedTopics)}async getPivotsFromNavigationData(){if(this.connector=await c._.getInstance().rootReducer.getDataConnector(s.z.NavigationData),this.connector){const e=await this.connector.getNavigationItems(r.jG.HostPage.verticalKey,r.jG.HostPage.categoryKey);this.onRouteUpdateCallback(this.mapNavigationItemsToDynamicRoutes(e))}else this.onRouteUpdateCallback([])}mapNavigationItemsToDynamicRoutes(e){return e.map((e=>({path:e.targetUrl,externalUrl:e.targetUrl,display:e.displayText,pivotId:e.categoryKey,dynamicPivotSource:i.NavigationData})))}}var u,p=n(3883);class h{constructor(e){if(this.staticRoutes=[],this.dynamicRoutes=[],this.onUpdateRoutesCallbacks=[],this.switchListeners=[],this.useCustomRoutingEvent=!1,this.callSwitchListeners=e=>{if(!this.switchListeners.length)return;const t=this.getPivotSelectionInfoFromPath(e.state&&e.state.previousPath),n={newSelection:this.getPivotSelectionInfoFromPath(e.pathname,e),oldSelection:t};this.switchListeners.sort(((e,t)=>e.order-t.order));for(const e of this.switchListeners)e.callback(n)},e&&(this.useCustomRoutingEvent=e.useCustomRoutingEvent,(0,o.Vk)(e.enableLocaleFeedPrefix),(0,o.I8)(e.includeFeedPrefixForAppType),this.setRoutes(e)),p.ZP.listen(this.callSwitchListeners),"windows"===r.jG.AppType||this.useCustomRoutingEvent){const e=window.history.pushState;window.history.pushState=(t,n,i)=>{e.apply(window.history,[t,n,i]);const r=new CustomEvent("pushstate",{detail:{state:t,title:n,url:i}});window.dispatchEvent(r)},window.addEventListener("pushstate",(e=>{e.detail&&e.detail.state&&e.detail.state.shouldPush&&p.ZP.replace(window.location.pathname,{context:e.detail.state},window.location.search)}))}}setRoutes(e){this.config=e,this.setStaticRoutes(),this.config.disableLoadingDynamicRoutes||this.setDynamicRoutes()}pushHistory(e,t,n,i){const r=p.ZP.location.pathname;p.ZP.push((0,o.qC)(e,t,!0,n&&n.excludeFeedPrefix),{previousPath:r,context:n},i)}getStaticRoutes(){return this.staticRoutes}getDynamicRoutes(){return this.dynamicRoutes}getDynamicRoute(){const e=p.ZP.location.pathname.split("/"),t=e.findIndex((e=>"interest"===e.toLowerCase())),n=t>-1&&t<e.length-1?e[t+1]:"";return{path:(0,o.qC)("interest"),experienceInfo:this.config.dynamicRouteExperienceInfo,pivotId:"oneriver.xfeed",display:decodeURIComponent(n)}}isDynamicRoute(e){let t="";return o.T6&&(t="windows"===r.jG.AppType||o.uO?`/${r.jG.CurrentMarket}/feed`:`/${r.jG.CurrentMarket}`),t+="/interest",0===e.indexOf(t)}getCurrentRoute(){const e=p.ZP.location.pathname,t=this.staticRoutes.find((t=>t.path===e));return t||(/\/interest\/.+\//.test(e)?this.getDynamicRoute():null)}addDynamicRouteListener(e){this.onUpdateRoutesCallbacks.push(e)}addSwitchListener(e,t=u.AfterLoadContent){this.switchListeners.push({callback:e,order:t})}getPivotSelectionInfoFromPath(e,t){if(!e)return null;const n=this.config.staticRoutes.find((t=>(0,o.qC)(t.canonicalName,void 0,!0,t.context&&t.context.excludeFeedPrefix)===e));if(n)return{pivotId:n.pivotId,telemetryPageName:n.telemetryPageName,telemetryPivotCategory:n.telemetryPivotCategory,display:n.display||n.canonicalName,categoryKey:n.categoryKey,subCategoryKey:n.subCategoryKey,pageTitle:n.pageTitle};if(!this.isDynamicRoute(e))return null;const i=e.split("/");let a=0;o.T6&&(a="windows"===r.jG.AppType||o.uO?2:1);const s=t&&t.state&&t.state.context;return{telemetryPageName:"xfeed",telemetryPivotCategory:"news",pivotId:s&&t.state.context.feedId||i.length>=4+a&&i[3+a],display:s&&(t.state.context.display||t.state.context.query)||i.length>=3+a&&decodeURIComponent(i[2+a])}}setStaticRoutes(){const{staticRoutes:e}=this.config;e.forEach((e=>{let t;t=e.canonicalName?(0,o.qC)(e.canonicalName,void 0,!0,e.context&&e.context.excludeFeedPrefix):(0,o.Or)(e.externalUrl);const n={path:t,externalUrl:e.externalUrl,experienceInfo:e.experienceInfo,queryParamOverrides:e.queryParamOverrides,display:e.display||e.canonicalName,pivotId:e.pivotId,context:e.context,categoryKey:e.categoryKey,subCategoryKey:e.subCategoryKey,pageTitle:e.pageTitle};this.staticRoutes.push(n)}))}async setDynamicRoutes(){const e=new l(this.onUpdateDynamicRoute.bind(this),this.config.dynamicRouteExperienceInfo);await e.getDynamicPivotsFromDataConnector(this.config.dynamicRouteDataConnector)}onUpdateDynamicRoute(e){this.dynamicRoutes=e;for(const e of this.onUpdateRoutesCallbacks)e(this.dynamicRoutes)}}let g;!function(e){e[e.Telemetry=0]="Telemetry",e[e.Monetization=1]="Monetization",e[e.LoadContent=2]="LoadContent",e[e.AfterLoadContent=3]="AfterLoadContent"}(u||(u={}));const m=e=>g?(e&&g.setRoutes(e),g):(g=new h(e),g)},19494:function(e,t,n){"use strict";n.d(t,{He:function(){return d},I8:function(){return s},Or:function(){return l},T6:function(){return r},Vk:function(){return o},n8:function(){return u},qC:function(){return c},uO:function(){return a}});var i=n(21789);let r=!1;function o(e){r=e}let a=!1;function s(e){a=e}function c(e,t,n=!0,o=!1){if(r&&n){let n=`/${i.jG.CurrentMarket}`;if("windows"!==i.jG.AppType&&!a||o||(n+="/feed"),!e)return n;if(t)return n+`/interest/${encodeURIComponent(e)}/${encodeURIComponent(t)}`;const r="/"===e[0]?e.slice(1):e;return n+(p[r]?`${p[r]}`:`/${r}`)}{if(!e)return"";if(t)return`/interest/${encodeURIComponent(e)}/${encodeURIComponent(t)}`;const n="/"===e[0]?e.slice(1):e;return p[n]||`/${n}`}}function d(e){return!!(e&&e.oldSelection&&e.newSelection)&&(!(!e.oldSelection||!e.oldSelection.pivotId)&&!(!e.newSelection||!e.newSelection.pivotId))}function l(e){try{return new URL(e).pathname}catch{return null}}var u;!function(e){e.MyFeed="myFeed",e.Personalize="personalize",e.Saves="saves"}(u||(u={}));const p={myFeed:"/",personalize:"/personalize",interest:"/interest/*/:id",saves:"/personalize/saves"}},78324:function(e,t,n){"use strict";n.d(t,{l:function(){return l}});var i=n(81949),r=n(23549);class o{constructor(){this.callbacks=[],this.clickCallbacks=[]}getSelectedPivot(){return this.selectedPivot}setSelectedPivot(e){e&&e.pivotId&&(this.selectedPivot={...e})}switchPivot(e,t){var n;const i=this.selectedPivot;this.selectedPivot={...e};const o={hash:null===(n=this.selectedPivot.context)||void 0===n?void 0:n.hash,navIsSticky:this.selectedPivot.navIsSticky,newSelection:this.selectedPivot,oldSelection:i};this.callbacks.sort(((e,t)=>e.switchCallbackOrder-t.switchCallbackOrder)),t&&r.M0.addOrUpdateTmplProperty("pvcb",this.callbacks.length.toString());for(const e of this.callbacks)e.callback(o)}clickPivot(e=!0,t){for(const n of this.clickCallbacks)n(e,t)}addSwitchListener(e,t=i.I.AfterLoadContent){this.callbacks.find((n=>n.callback===e&&n.switchCallbackOrder===t))||this.callbacks.push({callback:e,switchCallbackOrder:t})}removeSwitchListener(e){this.callbacks=this.callbacks.filter((t=>t.callback!==e))}addClickListener(e){this.clickCallbacks.push(e)}removeClickListener(e){this.clickCallbacks=this.clickCallbacks.filter((t=>t!==e))}reportLoadComplete(){this.loadComplete=!0,this.loadCompleteResolveCallback&&this.loadCompleteResolveCallback()}waitForLoadComplete(){return this.loadCompletePromise?this.loadCompletePromise:this.loadComplete?Promise.resolve():(this.loadCompletePromise=new Promise((e=>{this.loadCompleteResolveCallback=e})),this.loadCompletePromise)}}var a=n(96620),s=n(55524);const c="__PivotManager_default__",d="__PivotManager_namedSwitchers__";function l(e){if(e){const t=s.Gq.get(d,(()=>new Map));let n=t.get(e);return n||(n=new o,t.set(e,n)),n}return s.Gq.get(c,(()=>new o))}(0,a.U)((()=>{s.Gq.delete(c),s.Gq.delete(d)}))},81949:function(e,t,n){"use strict";var i;n.d(t,{I:function(){return i}}),function(e){e[e.Telemetry=0]="Telemetry",e[e.Monetization=1]="Monetization",e[e.LoadContent=2]="LoadContent",e[e.AfterLoadContent=3]="AfterLoadContent"}(i||(i={}))},1573:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});var i=n(17556);class r{}r.pageVisibilityChange=new i.C("PageVisibilityChange"),r.timeForPageReveal=new i.C("TimeForPageReveal"),r.forcePageReload=new i.C("ForcePageReload"),r.updateCurrentPageRefreshState=new i.C("UpdateCurrentPageRefreshState"),r.updateDidRenderStartInBackgroundRenderFlag=new i.C("UpdateDidRenderStartInBackgroundRenderFlag")},47640:function(e,t,n){"use strict";n.d(t,{Eu:function(){return p},bY:function(){return u},fv:function(){return h}});var i=n(85205),r=n(75776),o=n(96531),a=n(1573),s=n(52176),c=n(7476),d=n(23549),l=n(13334);function u(e){const t=o._.getInstance().rootReducer.connector(i.z.Preload);t&&a.X.forcePageReload.getActionSender(t).send(e||s.T.SettingsChange)}function p(e){const t=o._.getInstance().rootReducer.connector(i.z.Preload);t&&a.X.timeForPageReveal.getActionSender(t).send(e)}function h(e){if(!l.Al.IsPreload)return;if("windowsShell"===l.Al.ClientSettings.apptype||"windowsShellV2"===l.Al.ClientSettings.apptype)return e.Win10PerfDCREnabled=1,e[r.Qf]=e[r.dd],delete e[r.dd],void delete e.launchType;const t=function(){const e=o._.getInstance().rootReducer.connector(i.z.Preload);if(!e)return!1;return e.getCurrentState().didRenderStartInBackground}();t&&("edgeChromium"===l.Al.ClientSettings.apptype?(e[r.C7]=1,e[r.eO]=1):e[r.eO]=1);const n=e[r.Lh],a=e[r.dd],s=e[r.pM],u=e[r.pc];let p=!1;if((isNaN(a)||null===a)&&(d.M0.sendAppErrorEvent({...c.vAF,message:"TTVR missing during preload."}),p=!0),(isNaN(n)||null===n)&&(d.M0.sendAppErrorEvent({...c.Hif,message:"TFPR missing during preload."}),p=!0),p)return;const h=e[r.Lh]=e[r.dd]=Math.min(n,a);t&&(e[r.Qf]=a),isNaN(s)||null===s?d.M0.sendAppErrorEvent({...c.vwD,message:"TTVR.SearchBox missing during preload."}):e[r.pM]=Math.min(h,s),isNaN(u)||null===u?d.M0.sendAppErrorEvent({...c.sEv,message:"TTF.SearchBox missing during preload."}):e[r.pc]=Math.min(h,u)}},75776:function(e,t,n){"use strict";n.d(t,{C7:function(){return l},H$:function(){return i},Lh:function(){return s},Qf:function(){return c},dd:function(){return o},eO:function(){return d},jh:function(){return u},pM:function(){return a},pc:function(){return r}});const i="TTPR2",r="TTF.SearchBox",o="TTVR",a="TTVR.SearchBox",s="TFPR",c="TTVR.BackgroundExecution",d="backgroundpreload",l="prerender",u="TTAF"},52176:function(e,t,n){"use strict";var i;n.d(t,{T:function(){return i}}),function(e){e[e.StalePage=1]="StalePage",e[e.SettingsChange=2]="SettingsChange",e[e.MuidChange=3]="MuidChange",e[e.GizmoSettingChange=4]="GizmoSettingChange",e[e.TopSites=5]="TopSites",e[e.PivotSwitch=6]="PivotSwitch",e[e.SignInStateChange=7]="SignInStateChange",e[e.MutePublisher=8]="MutePublisher",e[e.UnMutePublisher=9]="UnMutePublisher",e[e.Dislike=10]="Dislike",e[e.Like=11]="Like",e[e.Save=12]="Save",e[e.Hide=13]="Hide",e[e.KidsMode=14]="KidsMode",e[e.MarketChange=15]="MarketChange",e[e.InterestsSdCardSettingChange=16]="InterestsSdCardSettingChange",e[e.InterestsChange=17]="InterestsChange",e[e.WeatherChange=18]="WeatherChange",e[e.MoneyCardChange=19]="MoneyCardChange",e[e.Disabled=20]="Disabled"}(i||(i={}))},21610:function(e,t,n){"use strict";n.d(t,{g:function(){return i}});const i=e=>new Promise((t=>setTimeout(t,e)))},15454:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});var i=n(21610);const r=async(e,t,n,r=3)=>{if(r<1)throw new Error("Maximum number of retries must be more than zero.");let o;for(let a=0;a<r&&(o=await e(a),t(o));++a){const e=n(a,o);await(0,i.g)(e)}return o}},45797:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});const i=async e=>{const t=performance.now(),n=await e(),i=performance.now();return{result:n,durationMilliseconds:Math.round(i-t)}}},4397:function(e,t,n){"use strict";n.d(t,{h:function(){return S}});var i=n(34004),r=n(63011),o=n(21789),a=n(72626),s=n(11083),c=n(31387),d=n(47251),l=n(18860),u=n(88826);const p="color:white;background-color:green;border-radius:6px;padding:2px 5px;font-weight:bold;text-align:center";var h=n(1499);const g=(e,t,n,i,r,o,a=void 0,s=void 0,c=void 0)=>{const d=new Date(Date.now()),l=d.toISOString?d.toISOString():d.toString();return{id:e,type:t,message:n,apiName:r.apiName,name:r.name,clientRequestId:i,retryCount:o,utcNow:l,tokenExpiration:(0,h.b)(a),authenticationMilliseconds:s,fetchMilliseconds:c}},m=e=>{(0,u.H)(e.id,e.message,JSON.stringify(e),{},!1)},f=e=>{((e,...t)=>{console.error(`%c${e}`,p,...t)})(`${e.apiName}.${e.name}`,e.message,e)};var v=n(15454),y=n(45797);const S=async e=>(0,v.X)((t=>C(e,t)),(e=>{var t;return(null===(t=e.error)||void 0===t?void 0:t.authenticationStatus)===i.H.MaySucceedOnRetry||(null==e?void 0:e.status)===s.W.tooManyRequests}),w,3),C=async(e,t)=>{const n=(0,a.pW)();if(await(0,o.Yq)().unsupportedEnterpriseCloud){const i=((e,t,n)=>{const i=g(t.errors.unsupportedEnterpriseCloud,"UnsupportedCloud","Unsupported enterprise cloud.",e,t,n);return m(i),f(i),i})(n,e,t);return{clientRequestId:n,ok:!1,error:i,url:e.url,retryCount:t}}let u,p,h;try{const{result:o,durationMilliseconds:a}=await(0,y.X)((()=>{var t;return null===(t=(0,r.Kf)())||void 0===t?void 0:t.getAuthData(e.authentication)}));if(u=o,p=a,u.error){const r=((e,t,n,r,o)=>{var a,s,c,d,u;let p,h,v;(null===(a=r.error)||void 0===a?void 0:a.status)===i.H.InteractionRequired?(p=t.errors.authenticationUserInteractionRequired,h="UserInteractionRequired",v="Failed to authenticate. User interaction required."):(null===(s=r.error)||void 0===s?void 0:s.status)===i.H.AuthProviderNotSupported?(p=t.errors.authenticationProviderNotSupported,h="AuthenticationProviderNotSupported",v="Failed to authenticate. Authentication provider is not supported."):(p=t.errors.authenticationError,h="AuthenticationFailed",v="Failed to authenticate.");const y={...g(p,h,v,e,t,n,r.authToken,o),authenticationStatus:null===(c=r.error)||void 0===c?void 0:c.status};m(y);const S={...y,authenticationError:r.error?(0,l.P)(r.error,t.authentication):void 0,authenticationErrorString:null===(d=r.error)||void 0===d||null===(u=d.internalError)||void 0===u?void 0:u.error_string};return f(S),S})(n,e,t,u,p);return{clientRequestId:n,ok:!1,error:r,url:e.url,retryCount:t}}u.authToken&&(e.headers={[c.r.authorization]:`Bearer ${u.authToken}`,...e.headers}),e.content&&(e.body=JSON.stringify(e.content),e.headers={[c.r.contentType]:d.z.json,...e.headers});const{result:v,durationMilliseconds:S}=await(0,y.X)((()=>globalThis.fetch(e.url.toString(),e)));h=S;const C=k(e,v);let w,P,I;return C?w=await b(e,v):P=await T(e,v),v.status===s.W.tooManyRequests?I=((e,t,n,i,r,o,a)=>{const s={...g(t.errors.tooManyRequests,"TooManyRequests","Too many requests.",e,t,i,r,o,a),retryAfterHttpHeader:n.headers.get(c.r.retryAfter)};return m(s),f(s),s})(n,e,v,t,u.authToken,p,h):C||(I=((e,t,n,i,r,o,a,c)=>{var d;const l=t.errors.notFoundStatusCode&&c===s.W.notFound?t.errors.notFoundStatusCode:t.errors.unsuccessfulStatusCode,u={...g(l,"UnsuccessfulStatusCode","Unsuccessful status code returned.",e,t,n,i,r,o),contentErrorCode:null==a||null===(d=a.error)||void 0===d?void 0:d.code};return m(u),f(u),u})(n,e,t,u.authToken,p,h,P,v.status)),{ok:v.ok,headers:v.headers,redirected:v.redirected,status:v.status,statusText:v.statusText,type:v.type,url:e.url,clientRequestId:n,content:w,contentError:P,error:I,retryCount:t}}catch(i){var v;const r=((e,t,n,i,r,o,a)=>{const s={...g(t.errors.unhandledException,"UnhandledException","Unhandled exception thrown.",e,t,n,r,o,a),exceptionMessage:null==i?void 0:i.message};return m(s),f(s),s})(n,e,t,i,null===(v=u)||void 0===v?void 0:v.authToken,p,h);return{clientRequestId:n,ok:!1,error:r,url:e.url,retryCount:t}}},w=(e,t)=>{try{var n;const e=null===(n=t.headers)||void 0===n?void 0:n.get(c.r.retryAfter);if(e)return 1e3*parseInt(e)}catch{}return 1e3*(2^e)},b=async(e,t)=>{if(t.body)return e.transform?await e.transform(t):await t.json()},T=async(e,t)=>{if(t.body)return e.transformError?await e.transformError(t):await t.json()},k=(e,t)=>e.isSuccess?e.isSuccess(t):t.ok},1499:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});const i=e=>{var t;const n=new Date(Date.now()),i=n.toISOString?n.toISOString():n.toString();if(!e)return{utcNow:i,invalidReason:"NoToken"};let r;try{r=JSON.parse(atob(e.split(".")[1]))}catch{return{utcNow:i,invalidReason:"InvalidToken"}}if(null===(t=r)||void 0===t||!t.exp)return{utcNow:i,invalidReason:"NoExpiration"};const o=1e3*r.exp,a=new Date(o),s=a.toISOString?a.toISOString():a.toString();return{isExpired:a<n,expiration:s,expirationMilliseconds:o,utcNow:i}}},47251:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});const i={json:"application/json; charset=utf-8"}},31387:function(e,t,n){"use strict";n.d(t,{r:function(){return i}});const i={authorization:"Authorization",clientRequestId:"client-request-id",contentType:"Content-Type",retryAfter:"Retry-After"}},11083:function(e,t,n){"use strict";n.d(t,{W:function(){return i}});const i={badRequest:400,created:201,ok:200,notFound:404,tooManyRequests:429}},31983:function(e,t,n){"use strict";var i;n.d(t,{S:function(){return i},PublisherServiceClient:function(){return v}}),function(e){e.More="More",e.Mute="Mute",e.Read="Read"}(i||(i={}));var r=n(89315),o=n(21789),a=n(13334),s=n(15165),c=n(54820),d=n(44672),l=n(83089),u=n(90158),p=n(11599),h=n(801),g=n(5674),m=n(83102),f=n(70169);class v{constructor(e,t=!0){this.fetchImpl=e,this.addPageInfoToOcid=t,this.followedPublishersEndpoint="v1/News/Users/Me/PreferredProviders",this.followedSourcesEndpoint="msn/sources",this.publishersServiceEndpoint="Msn/Providers",this.actionsServiceEndpoint="Graph/Actions",this.followActionSourceEndpoint="community/follows",this.ocid="feeds"}getOcid(){return this.ocid}async getUserMutedPublishers(){const e=await this.getUserActions(i.Mute);if(!e||!e.value)return null;if(!e.value.length)return[];const t=e.value.reduce(((e,t)=>(e[t.targetId]=t,e)),{}),n=await this.getPublisherDetails(Object.keys(t));if(!n||!n.value||!n.value.length)return null;return n.value.map((e=>{const n={createdDateTime:t[e.id].createdDateTime};return{...e,...n}}))}async getUserFollowedPublishers(e=100){const t=await this.getRequestInit(),n=[...await this.getCommonParams(),{key:"$top",value:`${e}`}],i=(0,s.PH)(this.followedPublishersEndpoint);this.appendQs(n,i),(0,r.aH)()||(0,g.s6)(i);const o=await this.sendRequest(decodeURIComponent(i.href),t,"getFollowedPublishers");return null==o?void 0:o.value}async getUserFollowedSources(e=100){var t,n,i,o;const a=await this.getRequestInit(),c=[...await this.getCommonParams(),{key:"$top",value:`${e}`},{key:"queryType",value:"MyFeed"}],d=(0,s.PH)(this.followedSourcesEndpoint);let l;this.appendQs(c,d),(0,r.aH)()||(0,g.s6)(d);try{l=await this.sendRequest(decodeURIComponent(d.href),a,"getFollowedSources")}catch(e){throw new Error(`{url: ${d.href}}`)}return(null===(t=l)||void 0===t||null===(n=t.value)||void 0===n?void 0:n.length)>0?null===(i=l)||void 0===i||null===(o=i.value[0])||void 0===o?void 0:o.subCards.map((e=>{var t;const n=e.intAttributes&&1==e.intAttributes.disableProfile;return{...e,profileId:n?null:e.profileId,displayName:e.name,logos:[{imageLink:{href:null===(t=e.image)||void 0===t?void 0:t.url}}]}})):[]}async publisherUserAction(e,t,n){if(!e||!t)return null;const i=await this.getRequestInit();i.method=n;let r=await this.getCommonParams();"POST"===n?i.body=JSON.stringify({actionType:t,targetId:e,targetType:"SourceProvider"}):"DELETE"===n&&(r=[...r,{key:"$filter",value:`actionType eq '${t}' and targetId eq '${e}'`}]);const o=(0,s.PH)(this.actionsServiceEndpoint);this.appendQs(r,o);const a=await this.sendRequest(decodeURIComponent(o.href),i,`deleteUserAction ${t}`,!0,!0);if(a.status>=400){const n=`OneService returned error response. Status: ${a.status} for actionType: ${t}, targetId: ${e}`;throw new Error(n)}return a}async updateSourceFollowState(e,t){if(!e)return null;const n=await this.getRequestInit();let i=await this.getCommonParams();i=[...i],t?(n.method="POST",n.body=JSON.stringify({targetId:e})):(n.method="DELETE",i=[...i,{key:"targetId",value:e}]);const r=(0,s.PH)(this.followActionSourceEndpoint);this.appendQs(i,r);const o=t?"follow":"unfollow";try{return await this.sendRequest(decodeURIComponent(r.href),n,`updateSourceFollowState ${o}`,!0,!0)}catch(t){throw new Error(`OneService returned error response. Community follow service for targetId: ${e}, action: ${o}`)}}async updatePublisherReadTime(e,t,n){if(!e)return null;const r=await this.getRequestInit(),o=await this.getCommonParams(),a=i.Read;r.method="POST",r.body=JSON.stringify({actionType:a,targetType:n,targetId:e,updatedDateTime:t});const c=(0,s.PH)(this.actionsServiceEndpoint);this.appendQs(o,c);try{return await this.sendRequest(decodeURIComponent(c.href),r,`updateSourceReadTime ${a}`,!0,!0)}catch(t){throw new Error(`OneService returned error response for actionType: ${a}, targetId: ${e}`)}}async getUserPublishersReadTimes(){try{const e=await this.generatePublisherStatusRequest(void 0,i.Read);return null==e?void 0:e.value}catch(e){throw new Error("OneService returned error response for fetching followed sources read times.")}}async getUserPublisherStatus(e,t){var n;return!(null===(n=(await this.generatePublisherStatusRequest(e,t)).value)||void 0===n||!n.length)}async generatePublisherStatusRequest(e,t){const n=await this.getRequestInit();n.method="GET";const i=e?`and targetId eq '${e}'`:"";let o=await this.getCommonParams();o=[...o,{key:"$filter",value:`actionType eq '${t}' ${i} `}];const a=(0,s.PH)(this.actionsServiceEndpoint);return this.appendQs(o,a),(0,r.aH)()||(0,g.s6)(a),await this.sendRequest(decodeURIComponent(a.href),n,`getUserPublisherStatus ${t}`)}async getUserActions(e,t=100){const n=await this.getRequestInit(),i=[...await this.getCommonParams(),{key:"$filter",value:`actionType eq '${e}' and deleted eq false and targetType eq 'SourceProvider'`},{key:"$top",value:`${t}`}],o=(0,s.PH)(this.actionsServiceEndpoint);return this.appendQs(i,o),(0,r.aH)()||(0,g.s6)(o),await this.sendRequest(decodeURIComponent(o.href),n,`getUserActions ${e}`)}async getPublisherDetails(e){const t=await this.getRequestInit(),n=(0,s.PH)(this.publishersServiceEndpoint),i=[...c.$D.getOneServiceParamsWithoutAuth(null,this.ocid,this.addPageInfoToOcid),{key:"ids",value:e.join(",")}];return this.appendQs(i,n),await this.sendRequest(decodeURIComponent(n.href),t,"getPublisherDetails")}async getCommonParams(){var e;"winWidgets"===o.jG.AppType&&(this.ocid="sidebar"===(null===(e=a.Al.ClientSettings)||void 0===e?void 0:e.pagetype)?"shoreline":"winp2",this.addPageInfoToOcid=!1);if((0,r.aH)())return this.getSapphireQueryParams();this.forcedApiKey&&(this.addPageInfoToOcid=!1),(0,r._3)()&&(this.ocid="OnOSkypeChannels");const t=await this.isUserSignedIn()?c.$D.getOneServiceParamsWithAuth(o.jG.UserId||o.jG.ActivityId,this.ocid,this.addPageInfoToOcid):c.$D.getOneServiceParamsWithoutAuth(o.jG.UserId||o.jG.ActivityId,this.ocid,this.addPageInfoToOcid);if(this.forcedApiKey){t.find((e=>"apikey"==e.key)).value=this.forcedApiKey}return t}getSapphireQueryParams(){const e=c.$D.getOneServiceNonDynamicParamsWithoutAuth(this.ocid,this.addPageInfoToOcid),t=(0,l._4)();return t&&(e.push({key:o.jG.OneServiceContentMarketQspKey,value:t.market}),o.jG.ShouldUseFdheadQsp&&e.push({key:"fdhead",value:t.features}),e.push({key:"activityId",value:t.activityId}),t.latitude&&t.longitude&&e.push({key:"location",value:`${t.latitude}|${t.longitude}`})),e}async getRequestInit(e=null){return null==e&&(e={method:"GET"}),e.credentials="include",e.headers=(0,u.wq)()?await(0,p.dG)():await c.$D.getOneServiceHeaders(),e}async isUserSignedIn(){const e=(0,a.nP)().UserIsSignedIn;if(void 0!==e)return e;return await(0,f.XJ)()===m.Hy.SignedIn}async sendRequest(e,t,n,i,o){return(0,r.aH)()?await this.sapphireRequest(decodeURIComponent(e),t):await this.networkRequest(decodeURIComponent(e),t,n,i,o)}async sapphireRequest(e,t){const n={url:e,headers:t.headers,body:t.body,refresh:!0};let i;switch(t.method){case"POST":i=await(0,h.Ef)(n);break;case"DELETE":i=await(0,h.o9)(n);break;default:i=await(0,h.FM)(n)}return JSON.parse(i||"{}")}async networkRequest(e,t,n,i,r){return(0,d.w)((async()=>{const n=await this.fetchImpl(e,t);if(!n.ok)throw Error(n.statusText);return i&&(0,g.T1)(),r?n:n.json()}),n)}appendQs(e,t){e.forEach((e=>{e.value&&t.searchParams.set(e.key,e.value)}))}setForcedApiKey(e){this.forcedApiKey=e}}},98850:function(e,t,n){"use strict";n.d(t,{cB:function(){return d}});var i=n(54297);"undefined"!=typeof window&&window.location.href;const r="timestamp_",o="force_timestamp_",a="_jssMap",s="keys_",c="lastKnown_";function d(){(0,i.$o)().supported&&((0,i.$o)().removeSubstringKeys(c),(0,i.$o)().removeSubstringKeys(r),(0,i.$o)().removeSubstringKeys(o),(0,i.$o)().removeSubstringKeys(s),(0,i.$o)().removeSubstringKeys(a))}},37477:function(e,t,n){"use strict";n.d(t,{PL:function(){return i},TU:function(){return a},ne:function(){return o}});var i,r=n(82898);function o(e){switch(e){case"ArticlePreview":return r.uH.Article;case"SlideshowPreview":return r.uH.Gallery;case"VideoPreview":return r.uH.Video;case"WebContentPreview":return r.uH.WebContent;case"WebContentExternal":return r.uH.ExternalLink;default:return null}}!function(e){e.AutosGarageCard="AutosCGCard",e.WidgetsNotificationsCard="widgetsNotificationsCard",e.DonationNpoCard="DonationNpoCard",e.EntertainmentPremierCard="premier-sd-card",e.EventSDCardOscarsPrm="EventSDCardOscarsPrm",e.BingThisOrThatCard="bing-this-or-that-card",e.BingDailyQuizCard="bing-daily-quiz-card",e.RewardsDailyCheckinCard="RewardsDailyCheckIn",e.RichCalendarCard="RichCalendarSD",e.EventSDCardElectionMIT1="EventSDCardElectionMIT1",e.EventSDCardElectionMIT2="EventSDCardElectionMIT2",e.EventSDCardElectionMIT3="EventSDCardElectionMIT3",e.CommunityCard="CommunityInfo",e.HotListCard="hotlist",e.MobileRewardsCard="Rewards",e.TabbedInfopaneCard="tabbedinfopane",e.TabbedInfopaneCardTab="tabbed-infopane-tab",e.MangaCard="MangaCard",e.MobileShoppingCard="ShoppingFeed1",e.MobileShoppingCard2="ShoppingFeed2",e.MobileShoppingCard3="ShoppingFeed3",e.MobileShoppingCard4="ShoppingFeed4",e.VideoShoppingCard="VideoShoppingSDCard",e.VideoShoppingCarouselCard="VideoShoppingCarousel",e.SuperListCard="super-list-card",e.RealEstateCard="real-estate-card",e.PrayerTimesCard="PrayerTimes",e.PrismCarouselCard="PrismFeedCarousel",e.TrendingSearchCard="TrendingSearchCard",e.CommuteCard="CommuteMetadata",e.DigestCard="digest-card",e.Article="article",e.Slideshow="slideshow",e.Video="video",e.Spotlight="content360",e.Infopane="infopane",e.TabbedInfopane="tabbedInfopane",e.HalfPane="HalfPane",e.HeadToHead="HeadToHead",e.Mosaic="Mosaic",e.Triptych="Triptych",e.TabbedFeedCard="GroupedXfeedUpsell",e.TabbedInfopaneTab="tabbedInfopaneTab",e.WebContent="webcontent",e.ExternalLink="link",e.ChannelCarousel="followCarousel",e.ChannelFilterCard="filteredChannels",e.InterestManagementCard="InterestManager",e.GamingInterestGroup="GamingInterestGroup",e.DenseList="DenseList",e.BackFillContent="BackfillContent",e.MyBriefRiverCard="toppicks",e.panoCard="panocard",e.NativeAd="nativead",e.NativeTopAd="nativetopad",e.CmsAd="cmsad",e.BuyDirectAd="directbuyad",e.AmplifyAd="amplifyad",e.BoostAd="BoostAd",e.EventSDCardAmplifyAds="EventSDCardAmplifyAds",e.FirstPartyAd="firstpartyad",e.ShoppingCard="ShoppingCard",e.EdgeShoppingCard="EdgeShoppingCard",e.ShoppingCarousel="ShoppingCarousel",e.ShoppingRiver="ShoppingRiver",e.EventSDCardShopping="EventSDCardShopping",e.EventInfopaneShoppingAI="EventInfopaneShoppingAI",e.ComicsCarousel="ComicsCarousel",e.EditorsPickCarousel="EditorsPickCarousel",e.SelectCarousel="SelectCarousel",e.DailyFixGamesCarousel="DailyFixGamesCarousel",e.NewsSegmentCarousel="NewsSegmentCarousel",e.SubscriptionCarousel="SubscriptionCarousel",e.GroceryCouponSdCard="GroceryCouponSdCard",e.BeaconProviderUpsell="BeaconProviderUpsell",e.MoneyTopicStripe="MoneyTopicStripe",e.SportsTopicStripe="SportsTopicStripe",e.LinkedInCard="linkedInNewsCard",e.SectionHeader="GreetingsUpsell",e.TopStories="topStories",e.TopStoriesV2="cgtopStories",e.NewsGroups="newsGroups",e.NewsAnswerModule="NewsAnswerModule",e.WorkHeadlines="workNews",e.Trending="trendingnow",e.TrendingTopics="TrendingTopicsUpsellAnaheim",e.LocalNews="XfeedUpsell",e.LocalNewsFeed="LocalNewsFeed",e.SageGroupedFeed="SageGroupedFeed",e.TrendingInTenMinutes="trendingInTenMinutes",e.Horoscope="Horoscope",e.Elections="EventSDCardElection",e.RecommendedSearchCarousel="RecommendedSearchCarousel",e.RecommendedSearchesCard="RecommendedSearch",e.OnThisDay="OnThisDay",e.Lottery="Lottery",e.PartnerUpsell="PartnerUpsell",e.LeadGenCard="LeadGenCard",e.Qna="qnacard",e.quizcard="quizcard",e.Recipes="recipecard",e.Inspiration="PrismFeedCard",e.Rewards="rewardscard",e.TravelDestinationCard="TravelDestinationCard",e.TravelDestinationCarouselCard="TravelDestinationCarouselCard",e.TravelInspirationCard="TravelInspirationCard",e.TravelArticleCard="TravelArticleCard",e.BingHealthCovid19StatsCard="Covid19Stats",e.BingHealthFitnessCard="healthcard",e.HealthTipCard="healthtipcard",e.HealthRiverCard="healthrivercard",e.PollsCard="pollscard",e.PlaceholderCard="placeholder",e.WinAppAds="WinAppAds",e.CashbackAds="CashbackAds",e.Promotion="Promotion",e.PromotedAd="PromotedAd",e.BingVideo="BingVideo",e.BingVideoCarousel="BingVideoCarousel",e.CasualGamesCarousel="CasualGamesCarousel",e.CasualGamesStripeCarousel="CasualGamesStripeCarousel",e.EsportsCasualGames="esportsCasualGames",e.EsportsHighlight="esportsHighlight",e.EsportsLiveStream="esportsLiveStream",e.EsportsMatch="esportsMatch",e.EsportsTournament="esportsTournament",e.EventSDCardWorldCup="EventSDCardWorldCup",e.EventSDCardWorldCup2="EventSDCardWorldCup2",e.ShoppingFeedCard="ShoppingFeedCard",e.WeatherHero="WeatherHero",e.WeatherSummary="WeatherSummary",e.WeatherSummary_spotlight="WeatherSummary_spotlight",e.StockQuote="StockQuote",e.StockQuote_spotlight="StockQuote_spotlight",e.MoneyInfo="MoneyInfo",e.MoneyPreWL="MoneyPreWL",e.MoneyCrypto="CryptoCard",e.MoneyMarketBrief="MarketBrief",e.MoneyMoreForYouCard="MoneyMoreForYouCard",e.FinanceHeroMarket="FinanceHeroMarket",e.FinanceHeroNews="FinanceHeroNews",e.FinanceHeroMovers="FinanceHeroMovers",e.FinanceHerowlsummary="FinanceHerowlsummary",e.FinanceHeroSuggested="FinanceHeroSuggested",e.FinanceHeroWatchlistIdeas="FinanceHeroWatchlistIdeas",e.FinanceHeroUpcomingEarnings="FinanceHeroUpcomingEarnings",e.FinanceHeroCurrencies="FinanceHeroCurrencies",e.FinanceHeroCrypto="FinanceHeroCrypto",e.SportsMatch="SportsMatch",e.SportsOlympics="SportsOlympics",e.SportsHeroFre="SportsHeroFre",e.SportsHeroMatchStatistics="SportsHeroMatchStatistics",e.SportsHeroNews="SportsHeroNews",e.SportsHeroSeasonStatistics="SportsHeroSeasonStatistics",e.SportsHeroStandingsRankings="SportsHeroStandingsRankings",e.SportsHeroTeamVsTeam="SportsHeroTeamVsTeam",e.SportsHeroVideo="SportsHeroVideo",e.TrafficDelays="TrafficDelays",e.TrafficInfo="TrafficInfo",e.Transit="Transit",e.TrafficIncidents="TrafficIncidents",e.TrafficCameras="TrafficCameras",e.TrafficCamerasWithSummary="TrafficCamerasWithSummary",e.TravelTimesWithSummary="TravelTimesWithSummary",e.TrafficMap="TrafficMap",e.TrafficNews="TrafficNews",e.ShoppingProng2c="ShoppingProng2c",e.ShoppingProngCardResponse="ShoppingProngCardResponse",e.ShoppingProngCarousel="ShoppingProngCarousel",e.ShoppingProngTracking="ShoppingProngTracking",e.ShoppingMerchantCategoryDeals="ShoppingMerchantCategoryDeals",e.ShoppingVideoCarousel="ShoppingVideoCarousel",e.Group="group",e.Upsell="FreUpsell",e.Dense="densetab",e.LocalGuide="localdaycard",e.Marketplace="MarketPlace",e.MarketplaceEvent="EventSDCardMarketplace",e.GamingNews="gaming",e.GamingClip="GamingClip",e.GamingClipsCarousel="GamingClipsCarousel",e.GamingHighlightClipsCarousel="GamingHighlightClipsCarousel",e.GamingCompete="GamingCompete",e.GamingGamerModeUpsellCard="GamingGamerModeUpsell",e.GamingHighlight="GamingHighlight",e.GamingHighlightsCarousel="GamingHighlightsCarousel",e.GamingLiveStream="GamingLiveStream",e.GamingLiveStreamCarousel="GamingLiveStreamCarousel",e.GamingMatch="GamingMatch",e.GamingPersonalize="GamingPersonalize",e.GamingRecentlyPlayed="GamingRecentlyPlayed",e.GamingRecommendedGames="GamingRecommendedGames",e.GamingReddit="GamingReddit",e.GamingRewards="GamingRewardsCard",e.GamingTournament="GamingTournament",e.GamingUpcomingGames="GamingUpcomingGames",e.GamingVideoCarousel="GamingVideoCarousel",e.GamingVod="GamingVod",e.GamingVideo="GamingVideo",e.AiCharacterCard="AicharacterCard",e.MicrosoftFeedCard="MicrosoftFeedCard",e.IndustryNewsCard="IndustryNewsCard",e.RecommendedInterests="RecommendedInterests",e.WindowsShellRecommendedInterests="WindowsShellRecommendedInterests",e.CompanyNewsCard="CompanyNewsCard",e.AutosEntityList="AutosEntityList",e.AutosCarousel="AutosCarousel",e.ContainerizedHalfu="containerizedHalfu",e.ComboCard="Combo",e.TopicFeed="TopicFeed",e.Topics="Topics",e.TopicFeedLearnSomethingNew="learnsomethingnew",e.TopicFeedDiversity="diversitycard",e.TopicFeedWeekends="eventcontentcardweekend",e.TopicFeedMomentInTime1="eventcontentcardmit1",e.TopicFeedSports="eventcontentcardsports",e.TopicFeedTrendingNow="trending now",e.TopicFeedTopStories="topstories",e.TopicFeedShopping="eventcontentcardshopping",e.TopicFeedWeather="eventdynamiccontentcardweather",e.Calendar="Calendar",e.Entertainment="Entertainment",e.Family="Family",e.M365="M365",e.Photos="Photos",e.ThirdPartyWidget="3pwidget",e.Tips="Tips",e.ToDo="ToDo",e.XboxGamePass="xboxgamepass",e.Tombstone="tombstone",e.GroupedContent="GroupedContentFeed",e.UserInterestTopic="UserInterestTopic",e.UserInterestNTPProvider="UserInterestNTPProvider",e.SuggestedInterest="SuggestedInterest",e.TopicSuggestionforConsumptionPage="TopicSuggestionforConsumptionPage",e.ProviderSuggestionForConsumptionPage="ProviderSuggestionForConsumptionPage",e.InterestFeed="InterestFeed",e.ProviderFeed="ProviderFeed",e.InterestChannel="InterestChannel",e.ProviderChannel="ProviderChannel",e.UserInterestTopicAndProvider="UserInterestTopicAndProvider",e.NewsFlipper="NewsFlipper",e.ColdStartArticleFreCard="ArticleFre",e.NewsPromotionCard="PromotionFre",e.WindowsShellTopicsCard="WindowsShellTopicsCard",e.WindowsShellNotificationBanner="genericbadge",e.RewardsDailySet="RewardsDailySet",e.BoostAdsBanner="BoostAdsBanner",e.BoostAdsCoachmark="BoostAdsCoachmark",e.EventSDCardSportsMIT1="EventSDCardSportsMIT1",e.EventSDCardSportsMIT2="EventSDCardSportsMIT2",e.EventSDCardSportsMIT3="EventSDCardSportsMIT3",e.UserInterestProvider="UserInterestProvider",e.WindowsShellMorningDigest="NewsDigest",e.TopicsAndProviders="TopicsAndProviders",e.NotificationCard="NotificationCard",e.NTPMorningDigest="MorningDigest"}(i||(i={}));const a=[i.NativeAd,i.CmsAd,i.AmplifyAd,i.EventSDCardAmplifyAds,i.BoostAd,i.BoostAdsBanner,i.BoostAdsCoachmark,i.BuyDirectAd,i.NativeTopAd,i.FirstPartyAd]},62846:function(e,t,n){"use strict";n.d(t,{Au:function(){return i},Y:function(){return a},pW:function(){return r},tD:function(){return o}});const i="0067acd6d05f4168b92f510d33b9ed74",r="service::api.msn.com::MBI_SSL",o="service::www.msn.com::MBI_SSL",a="api://www.msn.com/OneService.Read"},801:function(e,t,n){"use strict";n.d(t,{o9:function(){return l},Ei:function(){return h},FM:function(){return c},SP:function(){return g},v_:function(){return m},c6:function(){return f},_k:function(){return p},gR:function(){return u},Ef:function(){return d},pk:function(){return v}});var i=n(90158),r=n(62846);function o(e,t){if(function(e){try{return(null==e?void 0:e.needHeader)??!1}catch(e){s(`Failed to get feed needHeader Failed with exception : ${e}`)}}(e))try{const e=JSON.parse(t),n=JSON.parse((null==e?void 0:e.header)??null),i=(null==n?void 0:n["ddd-activityid"])??null;i&&async function(e){const t=window.localStorage.getItem(a);if(void 0!==t&&""!==t&&null!==t){const n=t.split(",");return void(n.length<10&&!n.includes(e)&&window.localStorage.setItem(a,`${t},${e}`))}window.localStorage.setItem(a,e)}(i)}catch(e){s(`Failed to get feed needHeader Failed with exception : ${e}`)}}const a="activityIds";function s(e){(0,i.wq)()&&function(e){new Promise(((t,n)=>{!function(e,t){(0,i.dw)("logEvent",e,t)}(e,(e=>{t(e)}))}))}({appId:r.Au,type:"Debug",name:"HP_WEBVIEW_SERVER_LOG",data:{message:e}})}function c(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("getHttp",e,t)}(e,(n=>{t(n),o(e,n)}))}))}function d(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("postHttp",e,t)}(e,(e=>{t(e)}))}))}function l(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("deleteHttp",e,t)}(e,(e=>{t(e)}))}))}function u(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("logEvent",e,t)}(e,(e=>{t(e)}))}))}function p(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("logError",e,t)}(e,(e=>{t(e)}))}))}function h(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("getDeviceInfo",e,t)}(e,(e=>{t(e)}))}))}function g(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("getLocationInfo",e,t)}(e,(e=>{t(e)}))}))}function m(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("getNetworkInfo",e,t)}(e,(e=>{t(e)}))}))}function f(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("getUserInfo",e,t)}(e,(e=>{t(e)}))}))}function v(e){return new Promise(((t,n)=>{!function(e,t){(0,i.dw)("requestPermission",e,t)}(e,(e=>{t(e)}))}))}},90158:function(e,t,n){"use strict";n.d(t,{dw:function(){return c},wq:function(){return o}});var i=n(31558);const r={};function o(){var e,t,n,r;if(!(0,i.N)())return!1;const o=null===(e=window.sapphireWebViewBridge)||void 0===e?void 0:e.send,a=null===(t=window.webkit)||void 0===t||null===(n=t.messageHandlers)||void 0===n||null===(r=n.send)||void 0===r?void 0:r.postMessage;return o||a}let a;function s(e,t){var n,i,r,o,s,c,d,l;console.log(e,t);const u="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),p={scenario:e,data:{data:t},id:u};a&&!p.data.data.appId&&(p.data.data.appId=a);const h=JSON.stringify(p);return(null===(n=window.webkit)||void 0===n||null===(i=n.messageHandlers)||void 0===i||null===(r=i.send)||void 0===r?void 0:r.postMessage)&&(null===(o=window.webkit)||void 0===o||null===(s=o.messageHandlers)||void 0===s||null===(c=s.send)||void 0===c||c.postMessage(h)),(null===(d=window.sapphireWebViewBridge)||void 0===d?void 0:d.send)&&window.sapphireWebViewBridge.send(h),(null===(l=window.VPsapphireWebViewBridge)||void 0===l?void 0:l.send)&&window.VPsapphireWebViewBridge.send(h),u}function c(e,t,n){const i=s(e,t);n&&function(e,t){r[e]?r[e].push(t):r[e]=[t]}(i,n)}},79834:function(e,t,n){"use strict";var i,r,o;n.d(t,{dO:function(){return i},mk:function(){return r}}),function(e){e.Android="Android",e.iPad="iPadOS",e.iOS="iOS"}(i||(i={})),function(e){e[e.None=0]="None",e[e.Approximate=1]="Approximate",e[e.Precise=2]="Precise"}(r||(r={})),function(e){e.Summarize="summarize",e.TopQuestions="top-questions",e.KeyTakeaways="key-takeaways",e.Panel360Degree="360-degree-panel",e.FactCheck="fact-check"}(o||(o={}))},83089:function(e,t,n){"use strict";n.d(t,{DQ:function(){return s},I$:function(){return B},Vx:function(){return S},_4:function(){return w},hP:function(){return b},mr:function(){return C},qY:function(){return O}});var i=n(79834),r=n(801),o=n(62846);let a;function s(){return void 0!==a||(a=/superapp\.msn\.cn$/i.test(window.location.host)),a}const c=(e,t)=>new URL(t).searchParams.get(e)||null;const d=()=>function(e){const t=`; ${document.cookie}`.split(`; ${e}=`)||[];var n,i;if(2===t.length)return null===(n=t.pop())||void 0===n||null===(i=n.split(";"))||void 0===i?void 0:i.shift()}("MUID");let l,u,p,h,g,m,f,v,y=!1;function S(){return y}async function C(){let e=0;return new Promise(((t,n)=>{if(y)t();else{const i=setInterval((async function(){y?(clearInterval(i),t()):e>30?(clearInterval(i),n()):e++}),50)}}))}function w(){return h}async function b(e){if(l.isSignedIn&&"AAD"===l.accountType){const e=await(0,r.c6)({refresh:!0,accountType:"AAD"});try{const t=JSON.parse(e);if(t.accessToken&&t.accessToken.length>0)return`Bearer ${t.accessToken}`}catch(e){I(e,"SapphireUserConfig.getAccessToken: Failed to parse AAD access token")}}if(l.isSignedIn&&"MSA"===l.accountType){const t=await(0,r.c6)({refresh:!0,accountType:"MSA",type:"AccessToken",scope:e});try{const e=JSON.parse(t);if(e.succeed)return e.accessToken}catch(e){I(e,"SapphireUserConfig.getAccessToken: Failed to parse MSA access token")}}return null}async function T(){const e=await(0,r.Ei)({});try{return JSON.parse(e)}catch(e){I(e,"SapphireUserConfig.getDeviceInformation: Failed to parse response")}}async function k(){const e=await(0,r.c6)({});try{l=JSON.parse(e)}catch(e){I(e,"SapphireUserConfig.getUserInformationInternal: Failed to parse response")}}function P(e){let t=null;try{t=JSON.parse(e)}catch(e){I(e,"SapphireUserConfig.getLocationInformationInternal: Failed to parse response")}return t}function I(e,t){(0,r._k)({type:"Failure",name:"HP_WEBVIEW_APP_ERROR",error:t,data:{error:e,customMessage:t}})}function A(e){if(!e||"null"===e||"undefined"===e||""===e)return"en-us";const t=e.toLowerCase();return"en-id"===t?"en-xl":t}function E(e){"ru-ru"===e.market&&e.detectedCountry&&"RU"!==e.detectedCountry&&(e.market="en-xl");const t=e.market.split("-");t&&2==t.length&&(e.language=t[0],e.countryCode=t[1])}function x(){return I(new Error("SapphireUserConfig.uuidv4: Recieved empty activityId"),"Empty activityId"),"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}async function M(){let e=i.mk.None;if(await L(i.mk.Precise))e=i.mk.Precise;else{await L(i.mk.Approximate)&&(e=i.mk.Approximate)}return e}async function L(e){let t=!1;const n=/android/i.test(window.navigator.userAgent);let o=e===i.mk.Precise?"fineLocation":"location";"zh-cn"!==h.market||n||(o="location");try{const e=await(0,r.pk)({permission:o,check:!0});t=JSON.parse(e).granted}catch(e){I(e,"SapphireUserConfig.isUserLocationPermissionGranted: Failed to parse location permission data for permission type "+o)}return t}function D(e,t,n=new Error("Promise timed out")){const i=new Promise(((e,i)=>{setTimeout((()=>{i(n)}),t)}));return Promise.race([e,i])}!function(e){m=e}((async function(e){var t;h={},window.performance.mark("HP-initUserConfigForOthers-DeviceInformation-Start"),u=await T(),window.performance.mark("HP-initUserConfigForOthers-DeviceInformation-End"),window.performance.measure("HP-initUserConfigForOthers-DeviceInformation","HP-initUserConfigForOthers-DeviceInformation-Start","HP-initUserConfigForOthers-DeviceInformation-End");const n=window.location.href,i=O();if(u){h.muid=`m-${u.sapphireId}`,h.deviceLevel=u.deviceLevel,h.sapphireId=u.sapphireId,h.adid=u.ADID;const e=Object.keys(u).find((e=>"anid"===e.toLowerCase()));h.anid=e?u[e]:void 0,h.market=i&&s?"zh-cn":A(u.market),h.features=u.expFeatures,h.activityId=u.expActivityId?u.expActivityId:x(),h.isDarkMode=u.isDarkMode,h.platform=u.platform,h.bridgeVersionInt=u.bridgeVersionInt,h.fontSize=u.fontSize,h.isChinaBuild=u.isChinaBuild,h.clientVersion=u.clientVersion||"",h.packageName=u.packageName,h.installSource=u.installSource,h.detectedCountry=u.detectedCountry?u.detectedCountry:"",h.isEdge=void 0!==u.isEdge&&u.isEdge,h.isEos=void 0!==u.isEos&&u.isEos,h.screenWidth=u.screenWidth,h.screenWidthPx=u.screenWidthPx,h.screenHeight=u.screenHeight,h.screenHeightPx=u.screenHeightPx,h.isBingApp=u.isBingApp,h.isNewsApp=u.isNewsApp,h.adjustCampaign=u.adjustCampaign,h.attributionNetwork=u.attributionNetwork,h.isFirstSession=u.isFirstSession,h.isProd=u.isProd,h.feedExpFlights=u.feedExpFlights,E(h)}let o;i&&(o=d(),h.sapphireId=null!==o?o:"",h.muid=null!==o?`m-${o}`:"");window.performance.mark("HP-initUserConfigForOthers-UserInformation-Start"),await k(),window.performance.mark("HP-initUserConfigForOthers-UserInformation-End"),window.performance.measure("HP-initUserConfigForOthers-UserInformation","HP-initUserConfigForOthers-UserInformation-Start","HP-initUserConfigForOthers-UserInformation-End");const a=c("isSignedIn",n),m=c("accountType",n);l&&(h.accountType=l.accountType||m,h.isSignedIn=l.isSignedIn||"true"===a,h.isSSO=l.isSSO);window.performance.mark("HP-initUserConfigForOthers-LocationInformation-Start"),await async function(){const e=await(0,r.SP)({fallbackRevIP:!1});p=P(e)}(),window.performance.mark("HP-initUserConfigForOthers-LocationInformation-End"),window.performance.measure("HP-initUserConfigForOthers-LocationInformation","HP-initUserConfigForOthers-LocationInformation-Start","HP-initUserConfigForOthers-LocationInformation-End"),p&&(h.latitude=p.lat,h.longitude=p.lng,h.clientLocationProvider=p.provider,h.clientLocationAccuracy=p.accuracy,h.cityInfo=p.city,p.time&&(h.clientLocationTimeStamp=new Date(Number(p.time)).toISOString()),h.userLocationPermission=await D(M(),500));window.performance.mark("HP-initUserConfigForOthers-NetworkInformation-Start"),await async function(){const e=await(0,r.v_)({});try{g=JSON.parse(e)}catch(e){I(e,"SapphireUserConfig.getNetworkInformation: Failed to parse response")}}(),window.performance.mark("HP-initUserConfigForOthers-NetworkInformation-End"),window.performance.measure("HP-initUserConfigForOthers-NetworkInformation","HP-initUserConfigForOthers-NetworkInformation-Start","HP-initUserConfigForOthers-NetworkInformation-End"),g&&(h.networkInfoType=g.type);const f=new URLSearchParams(window.location.search);h.isPageRefresh=!(!f||!f.get("isPageRefresh"))&&"1"===f.get("isPageRefresh"),e&&(e.muid&&(h.muid=e.muid),e.activityId&&(h.activityId=e.activityId),h.features=e.expFeatures);h&&Object.keys(h).length>0&&(y=!0);if(null===(t=h)||void 0===t||!t.muid){I(new Error("SapphireUserConfig.initUserConfig: Recieved empty muid"),"Empty muid for iOS SA")}})),function(e){f=e}((async function(e){var t;h={};const n=window.location.href,a=O();let s;s=a?d():c("muid",n);h.sapphireId=null!==s?s:"",h.muid=null!==s?`m-${s}`:"";const u=c("adid",n);h.adid=null!==u?u:"";const g=c("market",n);h.market=A(g),E(h);const m=c("features",n);h.features=null!==m?m:"",e&&a&&(h.features=e.expFeatures);const f=c("activityId",n);h.activityId=f||x();const v=c("platform",n);h.platform=null!==v?i.dO[v]:"",h.bridgeVersionInt=1;const S=c("bridgeVersionInt",n);S&&(h.bridgeVersionInt=parseInt(S,10));const C=c("isDarkMode",n);h.isDarkMode="true"===C;const w=c("isSignedIn",n);h.isSignedIn="true"===w;const b=c("isSSO",n);h.isSSO="true"===b;const L=c("accountType",n);h.accountType=null!==L?L:"",a&&(await k(),Object.values(l).forEach((e=>{"MSA"!==e&&"AAD"!==e||(h.accountType=e)})));const R=c("isPageRefresh",n);h.isPageRefresh=null!==R&&"1"===R;const B=c("isChinaBuild",n);h.isChinaBuild="true"===B;const N=c("kids",n);h.isKidsMode=null!==N&&"1"===N;const $=c("fontSize",n);h.fontSize=parseInt($,10);const U=c("latitude",n);h.latitude=null!==U?U:"";const _=c("longitude",n);h.longitude=null!==_?_:"";const H=c("anid",n);h.anid=null!==H?H:"",l={isSignedIn:h.isSignedIn,accountType:h.accountType},p={lat:U,lng:_};const W=c("clientVersion",n);if(null!=W){h.clientVersion=W;const e=c("packageName",n);h.packageName=null!==e?e:""}else window.performance.mark("HP-initUserConfigForSuperAppAndroid-DeviceInformation-Start"),T().then((e=>{!function(e){window.performance.mark("HP-initUserConfigForSuperAppAndroid-DeviceInformation-End"),window.performance.measure("HP-initUserConfigForSuperAppAndroid-DeviceInformation","HP-initUserConfigForSuperAppAndroid-DeviceInformation-Start","HP-initUserConfigForSuperAppAndroid-DeviceInformation-End"),h.clientVersion=e.clientVersion||"",h.packageName=e.packageName,h.isProd=e.isProd}(e)}));window.performance.mark("HP-initUserConfigForSuperAppAndroid-LocationInformation-Start");const q=c("provider",n);if(null!==q){h.clientLocationProvider=null!==q?q:"";const e=c("accuracy",n);h.clientLocationAccuracy=null!==e?e:"";const t=c("time",n);h.clientLocationTimeStamp=null!==t?t:""}else(0,r.SP)({appId:o.Au,fallbackRevIP:!1,detectCity:!0}).then((async e=>{window.performance.mark("HP-initUserConfigForSuperAppAndroid-LocationInformation-End"),window.performance.measure("HP-initUserConfigForSuperAppAndroid-LocationInformation","HP-initUserConfigForSuperAppAndroid-LocationInformation-Start","HP-initUserConfigForSuperAppAndroid-LocationInformation-End"),p=P(e),p&&(h.latitude=p.lat,h.longitude=p.lng,h.clientLocationProvider=p.provider,h.clientLocationAccuracy=p.accuracy,h.cityInfo=p.city,p.time&&(h.clientLocationTimeStamp=new Date(Number(p.time)).toISOString()),h.userLocationPermission=await D(M(),500))}));T().then((e=>{h.installSource=e.installSource,h.detectedCountry=e.detectedCountry?e.detectedCountry:"",h.deviceLevel=e.deviceLevel,h.screenWidth=e.screenWidth,h.screenWidthPx=e.screenWidthPx,h.screenHeight=e.screenHeight,h.screenHeightPx=e.screenHeightPx,h.isBingApp=e.isBingApp,h.isNewsApp=e.isNewsApp,h.adjustCampaign=e.adjustCampaign,h.attributionNetwork=e.attributionNetwork,h.isFirstSession=e.isFirstSession,h.isOEM=F(e.buildChannel),h.feedExpFlights=e.feedExpFlights,E(h)})),h&&Object.keys(h).length>0&&(y=!0);if(null===(t=h)||void 0===t||!t.muid){I(new Error("SapphireUserConfig.initUserConfig: Recieved empty muid"),"Empty muid for Android SA")}}));const R=["Huawei_cn","Xiaomi_cn","Tencent_cn","Oppo_cn","Vivo_cn","Ali_cn","Download_cn","Samxung_cn","Baidu_cn","Lenovo_cn","Meizu_cn","Other_cn","Huawei_store","Huawei_pre","Tcl_pre","Duo_pre","Lenovo_pre","Xiaomi_pre","Honor_pre"],F=e=>R.filter((t=>t.toLowerCase()===(null==e?void 0:e.toLowerCase()))).length>0;function O(){if(!v){const e=window.location.href;v="1"===c("edge",e)}return v}async function B(e){if(l||await k(),l.isSignedIn){if(l.accessToken)return l.accessToken;{const t=await(0,r.c6)({refresh:!0,accountType:l.accountType,type:"AccessToken",scope:e});try{const e=JSON.parse(t);if(null!=e&&e.succeed){const t=e.accessToken.startsWith("t=")?e.accessToken.substring(2):e.accessToken;return l.accessToken=t,t}if(e&&Object.keys(e).length>0){return Object.values(e).find((e=>e&&"boolean"!=typeof e&&"AAD"!==e))||null}}catch(e){I(e,`SapphireUserConfig.getAccessTokenOnEdge: Failed to parse ${l.accountType} access token`)}}}return null}},11599:function(e,t,n){"use strict";n.d(t,{VQ:function(){return u},dG:function(){return d}});var i,r=n(62846),o=n(83089),a=n(801),s=n(90158);!function(e){e.OnlineRetailer="OnlineRetailer",e.Venue="Venue",e.Map="Map",e.Category="Category",e.Promotion="Promotion",e.CardList="Card-List",e.VideoList="Video-List"}(i||(i={}));async function c(e,t){if(e.SiteName="www.msn."+((0,o.DQ)()?"cn":"com"),t){const t=await(0,o.I$)(r.Y);t&&(e.Authorization="Bearer "+t)}}async function d(e=!1,t=!1){const n={},i=(0,o.qY)(),r=(0,o._4)();if(r&&(n.MUID=r.muid,!i)){const i=await(0,o.hP)(l(e,t));"MSA"===r.accountType&&i?n.UserAuthToken=i:"AAD"===r.accountType&&i&&(n.Authorization=i)}return i&&await c(n,r),n}function l(e,t){return t&&e?r.tD:r.pW}function u(e){if(!(0,s.wq)())return;const t=(0,o._4)();null!=t&&t.isProd||(0,a.gR)({appId:r.Au,type:"Debug",name:"HP_WEBVIEW_SERVER_LOG",data:{message:e}})}},58560:function(e,t,n){"use strict";n.d(t,{J:function(){return d},f:function(){return u}});const i={prefix:"SW",startTime:"StartTime",navigationFetchTime:"NavigationFetchTime",navigationCacheReadTime:"NavigationCacheReadTime",navFeedHandlerComplete:"NavFeedHandlerComplete",navFeedHandlerWillRespond:"NavFeedHandlerWillRespond",navFeedHandlerDidRespond:"NavFeedHandlerDidRespond",navFeedHandlerStart:"NavFeedHandlerStart",navFeedCacheDuration:"NavFeedCacheDuration",navParseDuration:"NavParseDuration",navFeedCachedStatus:"NavFeedCachedStatus",navFeedCacheReadTime:"NavFeedCacheReadTime",navFeedFetchTime:"NavFeedFetchTime",navFeedCacheOpenDuration:"NavFeedCacheOpenDuration"};function r(e){return[i.prefix,e].filter((e=>e.length>0)).join(".")}var o=n(74450);var a=n(10754),s=n(20009);const c={hit:1,"hit-mem":2,miss:0};function d(e){const t=(0,a.Th)();l(t)&&(e[r(i.startTime)]=function(e){return e.requestStart-e.workerStart}(t),e[r(i.navigationFetchTime)]=function(e){const t=e.transferSize;if(0===t||300===t)return-1;return e.responseStart-e.requestStart}(t),e[r(i.navigationCacheReadTime)]=function(e){const t=e.transferSize;return 0===t||300===t?e.responseStart-e.requestStart:-1}(t),async function(e){if(!l())return;const t=await async function(){return(0,o.T)({type:"NAV_PERF_DATA"})}();e[s.kc]=t&&"hit"===t.cachedStatus?1:0,t&&t.cacheReadTime&&(e[r(i.navigationCacheReadTime)]=Math.round(t.cacheReadTime));t&&t.fetchTime&&(e[r(i.navigationFetchTime)]=Math.round(t.fetchTime))}(e))}function l(e){return!!(e=e||(0,a.Th)())&&Boolean(e.workerStart)}async function u(e){if(!l())return;const t=await async function(){return(0,o.T)({type:"FEED_FETCH_PERF_DATA"})}();t&&t.navFeedHandlerComplete&&(e[r(i.navFeedHandlerComplete)]=Math.round(t.navFeedHandlerComplete)),t&&t.navFeedHandlerStart&&(e[r(i.navFeedHandlerStart)]=Math.round(t.navFeedHandlerStart)),t&&t.navFeedHandlerWillRespond&&(e[r(i.navFeedHandlerWillRespond)]=Math.round(t.navFeedHandlerWillRespond)),t&&t.navFeedHandlerDidRespond&&(e[r(i.navFeedHandlerDidRespond)]=Math.round(t.navFeedHandlerDidRespond)),t&&t.navFeedCacheDuration&&(e[r(i.navFeedCacheDuration)]=Math.round(t.navFeedCacheDuration)),t&&t.navFeedCacheOpenDuration&&(e[r(i.navFeedCacheOpenDuration)]=Math.round(t.navFeedCacheOpenDuration)),t&&t.navParseDuration&&(e[r(i.navParseDuration)]=Math.round(t.navParseDuration)),t&&t.navFeedCachedStatus&&(e[s.Ak]=c[t.navFeedCachedStatus]),t&&t.navFeedCacheReadTime&&(e[r(i.navFeedCacheReadTime)]=Math.round(t.navFeedCacheReadTime)),t&&t.navFeedFetchTime&&(e[r(i.navFeedFetchTime)]=Math.round(t.navFeedFetchTime))}},48503:function(e,t,n){"use strict";n.d(t,{R:function(){return o},U:function(){return r}});let i=!1;const r={purgeCacheAsync:async function(e){if(this.isServiceWorkerActive()){const t=(await caches.keys()).filter((t=>t.includes(e)));await Promise.all(t.map((e=>caches.delete(e))))}},purgeEntryInCache:async function(e,t,n){if(this.isServiceWorkerActive()){const i=await caches.open(e),r=(await i.keys()).filter((e=>e.url.startsWith(t)&&e.method===n));await Promise.all(r.map((e=>i.delete(e))))}},isServiceWorkerActive:function(){const{navigator:e}=window,t=e&&e.serviceWorker&&e.serviceWorker.controller;return t&&"activated"===t.state},getIsServiceWorkerEnabled:function(){return i},setIsServiceWorkerEnabled:function(e){i=e}};var o;!function(e){e.base="base",e.followedTopics="followedTopics",e.publishersProfile="publishersProfile",e.river="river",e.subscribedPublishers="subscribedPublishers",e.financeGraphAction="financeGraphAction"}(o||(o={}))},74450:function(e,t,n){"use strict";function i(e){if(!navigator.serviceWorker)return;const t=navigator.serviceWorker.controller;return t?r(t,e):navigator.serviceWorker.ready.then((t=>{const n=t.active;if(n)return r(n,e)}))}function r(e,t){return new Promise((n=>{const i=new MessageChannel;i.port1.onmessage=e=>{n(e.data)},e.postMessage(t,[i.port2])}))}n.d(t,{T:function(){return i}})},31499:function(e,t,n){"use strict";n.d(t,{I:function(){return r}});var i=n(17556);class r{}r.layoutAnimationStart=new i.C("layoutAnimationStart"),r.layoutAnimationComplete=new i.C("layoutAnimationComplete"),r.headerTransitionEnd=new i.C("headerTransitionEnd")},81959:function(e,t,n){"use strict";n.d(t,{O:function(){return r},y:function(){return o}});var i=n(17556);class r{}function o(){r.setSignInState.unregisterObservers()}r.setSignInState=new i.C("setSignInStateSignature"),r.updateFlyoutDisplayState=new i.C("setFlyoutDisplayStateSignature")},71247:function(e,t,n){"use strict";n.d(t,{m:function(){return a}});var i=n(76166),r=n(81959),o=n(31558);class a extends i.e{constructor(e,t,n,i,r,a,s){super(e,t,n,i,r,a,s),this._authPrivateApi=(0,o.N)()&&window&&window.chrome&&window.chrome.authPrivate,this.registerSignInEventChangedCallback()}updateSignInState(e){var t,n;null===r.O||void 0===r.O||null===(t=r.O.setSignInState)||void 0===t||null===(n=t.getActionSender(this))||void 0===n||n.send(e)}updateSignInFlyoutDisplayState(e){var t,n;null===r.O||void 0===r.O||null===(t=r.O.updateFlyoutDisplayState)||void 0===t||null===(n=t.getActionSender(this))||void 0===n||n.send(e)}registerSignInEventChangedCallback(){this._authPrivateApi&&this._authPrivateApi.onSignInStateChanged.addListener((e=>{const t=e;this.updateSignInState(!!t.account_id)}))}}},64999:function(e,t,n){"use strict";n.d(t,{e:function(){return o}});var i=n(99551),r=n(81959);class o{reduce(e,t){if(!e)return{isUserSignedIn:void 0,isFlyoutDisplayed:!1};if(!t)return e;let n;return i.G.handleAction(t,r.O.setSignInState,(t=>{n={...e,isUserSignedIn:t}})),i.G.handleAction(t,r.O.updateFlyoutDisplayState,(t=>{n={...e,isFlyoutDisplayed:t}})),n||e}}},56090:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});var i=n(17556);class r{}r.disableSmartList=new i.C("disableSmartList"),r.registerSmartList=new i.C("registerSmartList"),r.persistSmartList=new i.C("persistSmartList"),r.updateSmartListBadgeProps=new i.C("updateSmartListBadgeProps"),r.updateSmartListState=new i.C("updateSmartListState"),r.userSignInSignature=new i.C("userSignInSignature"),r.userSignOutSignature=new i.C("userSignOutSignature"),r.smartListItemsReadySignature=new i.C("smartListItemsReadySignature")},19216:function(e,t,n){"use strict";n.r(t),n.d(t,{SmartListSharedActions:function(){return r.j},SmartListSharedDataConnector:function(){return s},SmartListSharedDataReducer:function(){return d},ToolingInfo:function(){return l}});var i,r=n(56090);!function(e){e[e.notStarted=0]="notStarted",e[e.initialized=1]="initialized",e[e.rendered=2]="rendered",e[e.unmounted=3]="unmounted"}(i||(i={}));var o=n(76166),a=n(79545);class s extends o.e{initSmartList(e,t){if(!e)return;const n=this.getSmartList(e);n&&n.initCallback&&n.currentState===i.notStarted&&(e===a.x.edgeShopping?t&&(n.initCallback(t),r.j.updateSmartListState.getActionSender(this).send(e,i.initialized)):(n.initCallback(),r.j.updateSmartListState.getActionSender(this).send(e,i.initialized)))}moveFocusToSmartList(e,t){const n=this.getSmartList(e);return!!(n&&n.focusCallback&&n.renderCallback&&n.currentState===i.rendered)&&(n.focusCallback(t),!0)}renderSmartList(e,t){if(!e||!t)return;const n=this.getSmartList(e);n&&n.renderCallback&&(n.renderCallback(t),r.j.updateSmartListState.getActionSender(this).send(e,i.rendered))}unmountSmartList(e,t){if(!e||!t)return;const n=this.getSmartList(e);n&&n.unmountCallback&&n.currentState===i.rendered&&(n.unmountCallback(t),r.j.updateSmartListState.getActionSender(this).send(e,i.unmounted))}updateSignInStatus(e,t){const n=this.getSmartList(e);return!(!n||!n.updateSignInStatusCallback)&&(n.updateSignInStatusCallback(t),!0)}getSmartList(e){if(!e)return;const t=this.getCurrentState().smartLists;return t&&0!==t.size?t.get(e):void 0}}var c=n(99551);class d{reduce(e,t){if(!e)return{smartLists:new Map};if(!t)return e;let n=!1;const o={...e};return n=n||c.G.handleAction(t,r.j.disableSmartList,(e=>{if(e){const t=o.smartLists.get(e);t&&(t.currentState=i.notStarted)}})),n=n||c.G.handleAction(t,r.j.registerSmartList,(e=>{e&&(o.smartLists.has(e.experienceType)||o.smartLists.set(e.experienceType,{badgeProps:void 0,currentState:i.notStarted,focusCallback:e.focusShouldMove,initCallback:e.initShouldFire.bind(e),isUserSignedIn:!1,renderCallback:e.renderShouldFire,shouldPersist:void 0,unmountCallback:e.unmountShouldFire,updateSignInStatusCallback:e.updateSignInStatus}))})),n=n||c.G.handleAction(t,r.j.persistSmartList,(e=>{if(e){const t=o.smartLists.get(e);t&&(t.shouldPersist=!0)}})),n=n||c.G.handleAction(t,r.j.updateSmartListState,((e,t)=>{if(e){const n=o.smartLists.get(e);n&&(n.currentState=t)}})),n=n||c.G.handleAction(t,r.j.updateSmartListBadgeProps,((e,t)=>{if(e){const n=o.smartLists.get(e);n&&t&&(n.badgeProps=t)}})),n=n||c.G.handleAction(t,r.j.userSignInSignature,(e=>{if(e){const t=o.smartLists.get(e);t&&(t.isUserSignedIn=!0)}})),n=n||c.G.handleAction(t,r.j.userSignOutSignature,(e=>{if(e){const t=o.smartLists.get(e);t&&(t.badgeProps=null,t.isUserSignedIn=!1)}})),n?o:e}}const l={experienceConfigSchema:{}}},56117:function(e,t,n){"use strict";var i,r,o;n.d(t,{FE:function(){return r},H:function(){return i}}),function(e){e.like="like",e.love="love",e.surprised="surprised",e.thinking="thinking",e.sad="sad",e.angry="angry",e.share="share"}(i||(i={})),function(e){e.upvote="upvote",e.downvote="downvote"}(r||(r={})),function(e){e.star1="star1",e.star2="star2",e.star3="star3",e.star4="star4",e.star5="star5"}(o||(o={}))},28914:function(e,t,n){"use strict";n.d(t,{o:function(){return p}});var i=n(56401),r=n(23549),o=n(47969),a=n(7476);const s=/^fe-b\S+fe-b$/,c=/^fe-repeat\S+fe-repeat$/,d=e=>e.nodeType===Node.COMMENT_NODE&&(s.test(e.textContent)||c.test(e.textContent)),l=(e,t="")=>{const n=[];for(const i in e){const r=e[i],o=t+">"+`[nodeidx:${i}]${r.nodeName}`;if(d(r))n.push({text:r.textContent,path:o.toLowerCase()});else{const e=u(r,o);n.push(...e)}}return n},u=(e,t="")=>{var n;const i=[],r=t+">"+e.nodeName;if(null!==(n=e.shadowRoot)&&void 0!==n&&n.childNodes.length){var o;const t=l(null===(o=e.shadowRoot)||void 0===o?void 0:o.childNodes,r+">shadowRoot");i.push(...t)}if(e.childNodes){const t=l(e.childNodes,r);i.push(...t)}return i},p=(e,t)=>{if(!window.isSSRCompleted)return;const n=(0,o.F)(performance.now());let s=!1;const c=()=>l("10s timeout"),d=()=>l("beforeunload");function l(i){if((0,o.F)(performance.now())-n<1e4||s||t.wasSet())return;s=!0,window.removeEventListener("beforeunload",d);const c=performance.now(),l=u(e,"body"),p=performance.now()-c;l.length&&r.M0.sendAppErrorEvent({...a.fLy,message:"SSR unhydrated marker detected.",pb:{...a.fLy,customMessage:`${l.length} unhydrated marker detected. Trigger condition: ${i}.`+(l.length>10?`Unhydrated markers are truncated due to lenghth ${l.length} > 10.`:""),hydrationMarkers:l.slice(0,10),scanCost:p}})}(0,i.c)((()=>window.requestIdleCallback(c)),1e4),window.addEventListener("beforeunload",d)}},40015:function(e,t,n){"use strict";n.d(t,{AF:function(){return c},li:function(){return d},yC:function(){return a}});var i=n(55524);const r=()=>i.Gq.get("__ssr_util__preload_bundles",(()=>new Set)),o=()=>i.Gq.get("__ssr_util__pending_preload_bundles",(()=>new Set)),a=()=>`<script nonce="${window.NONCE_ID}">window.ssrLoadedBundles.publish(${JSON.stringify((()=>{const e=r(),t=[...e];return e.clear(),t})())});<\/script>`,s=new Map,c=(e,t)=>{if(s.has(e))throw new Error(`Bundle ${e} is already registered.`);s.set(e,t);const n=o();return n.has(e)&&(n.delete(e),t()),()=>(r().add(e),t())},d=e=>{const t=o(),n=e.map((async e=>{if(s.has(e))return s.get(e)();t.add(e)}));return Promise.all(n)}},45492:function(e,t,n){"use strict";let i;function r(){return i||(i=new Promise((e=>{if(!window.isSSREnabled)return void e();const t=new URLSearchParams(location.search).get("delayTopDownHydration");"1"===t||"true"===t?window.startHydration=e:"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{e()}),{once:!0}):e()}))),i}function o(){const e=window.customElements.define,t=window.customElements.get,n=[];window.customElements.define=function(e,t,i){n.push({name:e,ctor:t,options:i})},window.customElements.get=function(e){return t.call(window.customElements,e)||!!n.find((t=>t.name===e))},r().then((()=>{window.customElements.define=e,n.forEach((({name:e,ctor:t,options:n})=>{customElements.define(e,t,n)})),window.customElements.get=t}))}n.d(t,{B:function(){return o},L:function(){return r}})},16356:function(e,t,n){"use strict";n.d(t,{$e:function(){return i}});n(24478);function i(){const e=performance.getEntriesByType("navigation")[0].serverTiming;if(e){const t=e.find((e=>"rsClusterName"===e.name));if(t)return t.description}}},34061:function(e,t,n){"use strict";n(10863);var i=n(7279),r=n(49820),o=n(7476),a=n(56687),s=n(23549);class c extends i.Hi{constructor(e,t){null!=e&&e.shadowRoot&&(null===s.M0||void 0===s.M0||s.M0.observeShadowRoot(e.shadowRoot)),super(e,t)}connect(){try{super.connect()}catch(t){if(this.needsHydration){this.needsHydration=!1;const n={...o.qbM.pb,customMessage:`Error: ${null==t?void 0:t.message}`};if(t instanceof r.AH){const e=new XMLSerializer;n.targetNodeId=t.factory.targetNodeId,n.targetTagName=t.factory.targetTagName,n.viewMarkup=e.serializeToString(t.fragment),n.templateString=t.templateString}var e;if(t.factories)n.factories=JSON.stringify(null===(e=t.factories)||void 0===e?void 0:e.map((e=>{var t,n;return{...e,dataBinding:{...null==e?void 0:e.dataBinding,evaluate:null==e||null===(t=e.dataBinding)||void 0===t||null===(n=t.evaluate)||void 0===n?void 0:n.toString()}}})));t.node&&(n.nodeHTML=t.node.outerHTML||""),t.templateString&&(n.templateString=t.templateString),t.stack&&(n.stack=t.stack),this.source.tagName.includes("HERO")?s.M0.sendAppErrorEvent({...o.C3T,message:`Error while hydrating component: ${this.source.tagName}`,pb:n}):"BACKGROUND-IMAGE"==this.source.tagName?s.M0.sendAppErrorEvent({...o.ZAB,message:`Error while hydrating component: ${this.source.tagName}`,pb:n}):s.M0.sendAppErrorEvent({...o.qbM,message:`Error while hydrating component: ${this.source.tagName}`,pb:n}),super.connect()}else s.M0.sendAppErrorEvent({...o.FvO,message:`Error while connecting component: ${this.source.tagName}`,pb:{...o.FvO.pb,stack:(0,a.n)(t,!0)}})}}}i.t3.setStrategy(c)},93893:function(e,t,n){"use strict";n.d(t,{L:function(){return s}});var i=n(77036),r=n(55524),o=n(291);class a{constructor(){this.config={},this.strings={},this.initialized=!1}static getInstance(){return r.Gq.get("__SuperComponentDataHelper__",(()=>new a))}async initConfig(e){this.initialized||(this.config=await this.getConfigFromRef(e)||{},this.strings=this.config&&this.config.localizedStrings||{},this.initialized=!!this.config&&!!this.config.localizedStrings)}getConfig(){return this.config}getLocStrings(){return this.strings}async getConfigFromRef(e){try{const t=(null==e?void 0:e.configRef)||{experienceType:"SuperComponentData",instanceSrc:"default"},n=await i.U.getConfig(t);return n&&n.properties}catch(e){return{}}}}const s=(0,o.h)(a)},78460:function(e,t,n){"use strict";n.d(t,{k:function(){return w}});var i,r=n(55524),o=n(291),a=n(99452),s=n(33940),c=n(31558),d=n(21789);!function(e){e.MatchMedia="MatchMedia",e.BaseLayerLuminance="BaseLayerLuminance",e.External="External",e.Defalut="MatchMedia"}(i||(i={}));const l="DefaultConfig",u=Object.freeze(new Map([["windows",{notifyThemeSwitch:!0,themeSwitchNotifier:"BaseLayerLuminance"}],["edgeChromium",{notifyThemeSwitch:!0,themeSwitchNotifier:"BaseLayerLuminance"}],["winWidgets",{notifyThemeSwitch:!0,themeSwitchNotifier:"External"}],["superApp",{notifyThemeSwitch:!1,themeSwitchNotifier:"External"}],["homePage",{notifyThemeSwitch:!0,themeSwitchNotifier:"MatchMedia"}],["channel",{notifyThemeSwitch:!0,themeSwitchNotifier:"External"}],[l,{notifyThemeSwitch:!0,themeSwitchNotifier:"MatchMedia"}]]));function p(){const e=d.jG.AppType,t=u.get(e)||u.get(l);return(null==t?void 0:t.notifyThemeSwitch)??!0}var h=n(78125),g=n(38492),m=n(99809);class f{constructor(){this.mediaQueryCallback=()=>{},this.appThemeState=null}eventListener(e){this.appThemeState&&this.appThemeState.setAppInDarkMode(e.currentTarget.matches)}initialize(e){var t;return!(!this.mediaQueryList&&e)||!(null===(t=window)||void 0===t||!t.matchMedia)&&(this.mediaQueryList=window.matchMedia("(prefers-color-scheme: dark)"),!!this.mediaQueryList&&(this.appThemeState=e,this.appThemeState&&this.appThemeState.setAppInDarkMode(this.mediaQueryList.matches),this.mediaQueryCallback=this.eventListener.bind(this),this.mediaQueryList.addEventListener("change",this.mediaQueryCallback),!0))}uninitialize(){return this.mediaQueryList&&(this.mediaQueryList.removeEventListener("change",this.mediaQueryCallback),this.mediaQueryCallback=()=>{},this.mediaQueryList=void 0,this.appThemeState=null),!0}}class v{constructor(e=null){this.initialized=!1,this.source=e,this.appThemeState=null}handleChange(e,t){if(this.source&&t.target===this.source){const t=e.getValueFor(this.source),n=(0,m.s)(t.toColorString())<=h.h.DarkMode;this.appThemeState&&this.appThemeState.setAppInDarkMode(n)}}updateSource(e=null){this.source=e}initialize(e){if(this.initialized)return!0;if(this.appThemeState=e,!this.source){const e=document.querySelector("fluent-design-system-provider[fill-color]");if(null==e)return!1;this.source=e}const t={target:this.source,token:g.I};return this.handleChange(g.I,t),g.I.subscribe(this),this.initialized=!0,this.initialized}uninitialize(){return this.initialized&&(g.I.unsubscribe(this),this.initialized=!1,this.appThemeState=null),!0}}class y{constructor(){this.appThemeInDarkMode=!1,this.themeSwitchSubscription=null;let e=null;if((0,c.N)())switch(function(){const e=d.jG.AppType,t=u.get(e)||u.get(l);return(null==t?void 0:t.themeSwitchNotifier)??"MatchMedia"}()){case"BaseLayerLuminance":e=new v;break;case"External":break;default:e=new f}else e=new f;e&&this.setThemeSubscription(e)}setThemeSubscription(e){if(this.themeSwitchSubscription&&this.themeSwitchSubscription.uninitialize(),this.themeSwitchSubscription=e,!this.themeSwitchSubscription)return;var t;this.themeSwitchSubscription.initialize(this)||(this.themeSwitchSubscription=new f,null===(t=this.themeSwitchSubscription)||void 0===t||t.initialize(this))}setAppInDarkMode(e){this.appThemeInDarkMode=e}appInDarkMode(){return this.appThemeInDarkMode}}(0,s.gn)([a.LO],y.prototype,"appThemeInDarkMode",void 0);const S=new WeakMap;class C{constructor(){this._appThemeMode=null}get appThemeMode(){return this._appThemeMode||(this._appThemeMode=new y),this._appThemeMode}static getInstance(){return r.Gq.get("__SuperComponentThemeHelper__",(()=>new C))}setThemeSwitchSubscription(e){this.appThemeMode.setThemeSubscription(e)}setAppInDarkMode(e){this.appThemeMode.setAppInDarkMode(e)}appInDarkMode(){return this.appThemeMode.appInDarkMode()}subscribeThemeChange(e){if(!e||!this.appThemeMode||S.get(e))return;if(e.handleThemeChange(w.appInDarkMode()),!p())return;const t={handleChange:()=>{e.handleThemeChange(w.appInDarkMode())}};S.set(e,t),a.y$.getNotifier(this.appThemeMode).subscribe(t,"appThemeInDarkMode")}unsubscribeThemeChange(e){if(!p()||!e||!this.appThemeMode)return;const t=S.get(e);t&&(a.y$.getNotifier(this.appThemeMode).unsubscribe(t,"appThemeInDarkMode"),S.delete(e))}}const w=(0,o.h)(C)},548:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var i=n(48204),r=n(79545),o=n(41201);const a=async(e,t,n)=>{const a=(0,i.$z)(),s="headingsonly"===(null==t?void 0:t.selectedFeedDisplaySetting)||"off"===(null==t?void 0:t.selectedFeedDisplaySetting);if(!["gaming","productivityHub","following"].includes(a)&&!s){var c;const t=n?r.x.waterfallViewFeed:r.x.gridViewFeed,i={experienceType:t,instanceSrc:"default"},a=await e.getConfig(i),s=(0,o.e)(a.properties,t,!0);if(null!==(c=a.properties)&&void 0!==c&&c.auctionRidOverride)return;s.fetchSamPredictContent([]),s.fetchCmsPredictContent()}}},96946:function(e,t,n){"use strict";n.d(t,{et:function(){return v},l6:function(){return m},mY:function(){return y}});var i=n(7476),r=n(30008),o=n(13334),a=n(31156),s=n(4470),c=n(94285),d=n(23549),l=n(45106),u=n(50136),p=n(43356),h=n(9498);const g=[],m=e=>{if(u.Qu.includes(e.type))return e;try{const{augments:t,type:n,isBreaking:i,locale:r,category:o,images:a,topics:d=[],dataUrl:l,publishedDateTime:u,id:p,url:h,abstract:g="",title:m="",provider:f={},feed:v={},actions:y=[],externalVideoFiles:S,reactionStatus:C,commentStatus:w,reactionSummary:b,commentSummary:T,reasons:k,source:P,sourceId:I,topComments:A,colorSamples:E,isLocalContent:x,badges:M,relatedCards:L,recoDocMetadata:D,offer:R,recoId:F,ri:O,subType:B,traceIdIndex:N,rowCount:$,videoMetadata:U,isWorkNewsContent:_}=e,H=(0,s.TL)(a)||{},W=S||{},q=d.find((e=>e.feedId===v.id&&e.locale===r)),V=(0,s.v9)(h);let G=(0,s.XA)(f.logoUrl);return!G&&f.logo&&f.logo.url&&(G=(0,s.XA)(f.logo.url)),{augments:t,id:p,type:n,metadata:{abstract:g,abstractLength:g.length,titleLength:m.length,category:o||V[4],subCategory:V[5],primaryImage:{height:H.height,width:H.width},locale:r,feed:{id:v.id},kicker:[v],actions:y.map((e=>s.N[e]||e)),reactionStatus:C,commentStatus:w,reactionSummary:b,commentSummary:T,reasons:k,source:P,topComments:A,relatedCards:L,topics:d,recoId:F,recoDocMetadata:D,ri:O,videoFiles:W,videoMetadata:U},cardContent:{id:p,type:(0,c.c)(n),title:m,uriTitle:V[6],abstract:g,isBreaking:i||0,tags:[q||{}],provider:{id:f.id,name:f.name,logo:{id:G},lightThemeSVGLogo:f.lightThemeSVGLogo,darkThemeSVGLogo:f.darkThemeSVGLogo,profileId:f.profileId,logoUrl:f.logoUrl,subscribable:!1},category:{product:o,label:void 0},locale:r,images:[{id:(0,s.XA)(H.url),height:H.height,width:H.width,caption:H.title,focalRegion:H.focalRegion,attribution:H.attribution,url:H.url,colorSamples:H.colorSamples}],videoFiles:W,publishedDateTime:u,kicker:m,sourceHref:l,destinationUrl:h,sourceId:I,colorSamples:E,isLocalContent:x,isWorkNewsContent:_,badges:M,topics:d},offer:R,subType:B,rowCount:$,traceIdIndex:N}}catch(t){return e}};function f(){const e=f;return new Promise((t=>{void 0!==e.cache&&t(e.cache);const n=i=>{i>3&&(e.cache=null,t(null));const r=document.getElementById("ntp-diagnostics");r&&r.innerText?(e.cache=r,t(r)):(i++,setTimeout((()=>n(++i)),3e3))};n(0)}))}const v=(e,t)=>d.M0.addOrUpdateIdxId(e,t),y=async(e,t)=>{try{(e||t)&&g.push({id:e,debug:t}),await Promise.all([(0,p.F_)(),(0,h.lr)()]);const n=await f();if(n&&n.innerText){const e=JSON.parse(n.innerText);Object.assign(e,{traceInfo:g}),Object.assign(e,{prgDiagnostics:S()}),Object.assign(e,{authTrail:C()}),Object.assign(e,{countryConfidenceFactor:(0,r.q)()}),n.innerText=JSON.stringify(e)}}catch{d.M0.sendAppErrorEvent({...i.vxy,message:"Error throwed during update idxid into diagnostic element"})}},S=()=>{const e=o.Al&&o.Al.Diagnostics||{};return e&&(0,a.fB)(JSON.stringify(e))},C=()=>{try{return(0,l.pD)()}catch{d.M0.sendAppErrorEvent({...i.evM,message:"Error throwed when getCompressedRecords doesn't return anything for NTP"})}}},41201:function(e,t,n){"use strict";n.d(t,{e:function(){return L}});var i=n(27933),r=n(54297);const o="1adindices",a=e=>{try{return JSON.parse(e,c)}catch{return null}},s=(e,t)=>t instanceof Map?{dataType:"Map",value:Array.from(t.entries())}:t,c=(e,t)=>"object"==typeof t&&null!==t&&"Map"===t.dataType?new Map(t.value):t;var d=n(23549),l=n(13334);const u=(e,t,n)=>{p(n,void 0,`Config: ${e}, Response: ${t}`,!0)},p=(e,t,n,i)=>{const r={...e,pb:{...e.pb}};t&&(r.message=t),n&&r.pb&&(r.pb.customMessage=n),i&&r.pb&&(r.pb.isPrerender=null===l.Al||void 0===l.Al?void 0:l.Al.IsPrerender),d.M0.sendAppErrorEvent(r)};var h=n(23019),g=n(46058),m=n(95433),f=n(21882),v=n(31558),y=n(55524),S=n(88826),C=n(7476),w=n(30440),b=n(40755),T=n(52965),k=n(25156),P=n(37477),I=n(45870),A=n(83089),E=n(9498),x=n(5362);class M{constructor(e,t){this.cardsIndexList=[],this.nativeAdIndexList=[],this.cmsAdIndexList=[],this.infopanePlacementList=[],this.originalInfopaneRegion=new Map,this.getCmsAdsConfig=()=>this.cmsAdsConfig,this.getAdRegionTupleListMap=()=>this.adRegionTupleListMap,this.getPlacementsBySectionIndex=(e,t)=>{const n=this.getAdIndexList(t)[this.config.auctionPreSectionsNum||0],i=M.isFilteredRegion[t]?(0,b.Z)(e,(e=>e<=n))+1:e.length,r=[];return e.forEach(((e,t)=>{t<i&&r.push(e)})),r},this.getCmsRequestFromTuple=(e=0)=>{const t={placements:[]};return this.adRegionTupleListMap.forEach(((n,i)=>{if(!n[0]){if(0===e&&this.shouldDeferInfopaneAuctionOnPrerender(i))return;const r=n[1],o=this.getAdIndexList(i)[e]||-1,a=M.isFilteredRegion[i]?(0,b.Z)(r,(e=>e<=o))+1:r.length,s=r.splice(0,a);this.checkAndAddPlacement(t,!n[0],i,s)}})),t},this.fireCmsAuction=async(e=0)=>{var t,n;let i;if(null!==(t=this.cmsRequest)&&void 0!==t&&null!==(n=t.placements)&&void 0!==n&&n.length?(i=this.cmsRequest,this.cmsRequest=void 0):i=this.getCmsRequestFromTuple(e),i&&i.placements.length)try{const{infopane:e,river:t,documentId:n}=this.cmsAdsConfig,r=i.placements.find((({region:e})=>"resinfopane"===e)),o=i.placements.find((({region:e})=>"resriver"===e)),a=e.splice(0,(null==r?void 0:r.indices.length)??0),s=t.splice(0,(null==o?void 0:o.indices.length)??0);this.isFirstCmsAdsBatch=!1,this.cmsRequestPromise=this.nativeAdService.fetchCmsAds(i,n,[...a,...s]);const{placements:c}=await this.cmsRequestPromise;return c}catch(e){(0,S.OO)(e,C.NF_,"Call to CMS Ad Service failed")}},this.getRegionImgForMobile=e=>{const{river:t,infopane:n}=this.overrideImageSize||{};switch(e){case"river":return t;case"infopane":return n;default:return}},this.fetchSamPredictContent=async(e=[])=>{if(this.isFirstSamAdsBatch){this.samPredictResponsePromise=new I.o;try{const t=this.getPredictedAdRequest();if(this.samRequest=t,!t||!t.placements||!t.placements.length)return void(0,S.H)(C.Ehx,"SAM Ad Predicted Placements is Empty",`adRequest: ${JSON.stringify(t)}`);w.A.startMark("AdServiceCall.SuperFeed");const n=this.nativeAdService.fetchSamAds(t,!0,e,this.getIsPrerenderAds());this.samRequestPromise=n;const i=(0,x.pl)(this.config);[this.predictSamResponse]=await Promise.all([n,i])}catch(e){(0,S.OO)(e,C.R0M,"Call to SAM Ad Service failed")}finally{this.samPredictResponsePromise.set(),w.A.endMark("AdServiceCall.SuperFeed")}}},this.waitForSamPredictResponse=async()=>{var e;return null===(e=this.samPredictResponsePromise)||void 0===e?void 0:e.getResultAsync()},this.waitForSamAuctionCall=async()=>this.samRequestPromise,this.addToCallbackList=e=>{this.nativeAdService.addToCallbackList(e)},this.getSamRequestFromTupleWithSectionIndex=(e=0)=>{const t={placements:[],tmax:this.config.adsTmax&&l.Al.IsPrerender&&this.isFirstSamAdsBatch?this.config.adsTmax:void 0};return this.adRegionTupleListMap.forEach(((n,i)=>{if(n[0]){if(0===e&&this.shouldDeferInfopaneAuctionOnPrerender(i))return;const r=n[1],o=this.getAdIndexList(i)[e]||-1,a=M.isFilteredRegion[i]?(0,b.Z)(r,(e=>e<=o))+1:r.length,s=r.splice(0,a);this.checkAndAddPlacement(t,n[0],i,s)}})),t},this.getSamRequestFromTuple=()=>{const e={placements:[]};return this.adRegionTupleListMap.forEach(((t,n)=>{t[0]&&this.checkAndAddPlacement(e,t[0],n,t[1])})),e},this.shouldDeferInfopaneAuctionOnPrerender=e=>this.getIsPrerenderAds()&&e.includes("infopane"),this.getAdIndexList=e=>{var t,n;return null!==(t=this.config.riverSectionCardProviderConfig)&&void 0!==t&&t.useRelativeAdPlacement&&"river"===e?this.nativeAdIndexList:null!==(n=this.config.riverSectionCardProviderConfig)&&void 0!==n&&n.useRelativeAdPlacement&&"resriver"===e?this.cmsAdIndexList:this.cardsIndexList},this.overrideTopAdSamRequest=(e,t)=>{const n=(0,A._4)();var i,r,o;null!=t&&t.isSuperAppTopAd&&this.config.enableTopAdCard&&null!=n&&n.isOEM&&(e[0]&&(e[0].region="top",e[0].img=null===(i=this.config)||void 0===i||null===(r=i.adTemplateConfig)||void 0===r||null===(o=r.imageSizeConfig)||void 0===o?void 0:o.top));return e},this.fireSamAuction=async(e=[],t,n)=>{var i,r;let o;if(null!==(i=this.samRequest)&&void 0!==i&&null!==(r=i.placements)&&void 0!==r&&r.length?(o=this.samRequest,this.samRequest=void 0):o=this.config.enableNativeAdBatchCall?this.getSamRequestFromTuple():this.getSamRequestFromTupleWithSectionIndex(t),o&&o.placements.length)return n?(o={placements:this.overrideTopAdSamRequest(o.placements,n),pageType:n.pageType,locale:n.locale,adid:n.adid,anid:n.anid,muid:n.muid,sapphireid:n.sapphireid,appName:n.appName,clientVersion:n.clientVersion,packageName:n.packageName,tmax:n.tmax},"prime_mobile"===n.appName&&"mobilefeed"===n.pageType&&o.placements.forEach((e=>{e.isStrictIndices=!0}))):o.tmax=this.config.adsTmax&&l.Al.IsPrerender&&this.isFirstSamAdsBatch?this.config.adsTmax:void 0,await this.fetchSamAds(o,e)},this.fetchSamAds=async(e,t=[])=>{try{w.A.startMark("AdServiceCall.SuperFeed");const{isFirstSamAdsBatch:r,nativeAdService:o}=this,a=r?t:[];this.isFirstSamAdsBatch=!1;const s=o.fetchSamAds(e,r,a,this.getIsPrerenderAds());if(!this.config.loadAdTemplate)return await s;if(this.config.enableNativeAdWC||this.config.enableNativeAdWCInfopane){var n,i;const[e]=await Promise.all([s,this.lazyLoadDRBundle(null===(n=this.config)||void 0===n||null===(i=n.adTemplateConfig)||void 0===i?void 0:i.configType)]);return e}{const[e]=await Promise.all([s,(0,x.pl)(this.config)]);return e}}catch(e){(0,S.OO)(e,C.R0M,"Get SAM data failed")}finally{w.A.endMark("AdServiceCall.SuperFeed")}},this.initNativeAdConfig(e),this.initAdRegionTupleListMap(),this.beaconService=new g.A(null==e?void 0:e.adBeaconServiceConfig)}initNativeAdConfig(e){var t,n,i;this.isFirstSamAdsBatch=!0,this.isFirstCmsAdsBatch=!0,this.config=(0,T.Z)(e)||{},this.cmsAdsConfig=(null===(t=this.config)||void 0===t?void 0:t.cmsAds)??{documentId:"",infopane:[],river:[]},this.tallAdProcessed=!(null!==(n=this.config)&&void 0!==n&&n.enableAdsWaterfall);const r={};this.config.backfillContentForMissingPlacements&&(r.useEmptyPlacementsForNoContent=!0),this.config.enablePrerenderAds&&this.config.enablePrerenderAuctionFlag&&(r.enablePrerenderAdsAuctionFlag=!0),this.config.auctionTimeoutOverride&&(r.auctionTimeoutOverride=this.config.auctionTimeoutOverride),this.config.auctionRidOverride&&(r.auctionRidOverride=!0),this.config.enableBuyDirectAd&&(r.enableBuyDirectAd=!0),this.nativeAdService=(0,m.d)((null===(i=this.config)||void 0===i?void 0:i.adTemplateConfig)||{},r)}initAdRegionTupleListMap(){var e,t;this.adRegionTupleListMap=new Map([["infopane",[!0,[],[]]],["rightrail",[!0,[],[]]],["triver",[null===(e=this.config)||void 0===e?void 0:e.enable1stRowAd,[],[]]],["river",[!0,[],[]]],["infopane-tab",[!0,[],[]]],["resinfopane",[this.config.enableInfopaneLeadgenNative,[],[]]],["resriver",[this.config.enableRiverLeadgenNative,[],[]]],["dense-river",[!0,[],[]]],["rivert",[(null===(t=this.config)||void 0===t?void 0:t.enableAdsWaterfall)||!0,[],[]]]])}loadCmsBackfillList(){return this.nativeAdService.loadCmsBackFillList()}fillAdsMap(e){if(!e)return;const{adLabelText:t,isGreyAdsLabelEnabled:n}=this.nativeAdService.getAdTagStyleByLocale(),r=(0,i.AH)({adLabelText:t,isGreyAdsLabelEnabled:n,...this.config},e),o=(0,A._4)();this.adRegionTupleListMap.forEach(((e,t)=>{"river"===t&&this.config.enableTopAdCard&&null!=o&&o.isOEM&&r.top&&e[2].push(...r.top),e[2].push(...r[t]??[])}))}createNativeAdCardMetadata(e,t,n,i,r,o){var a,s,c,d;const l="resinfopane"===e||"resriver"===e?P.PL.CmsAd:P.PL.NativeAd;null!==(a=this.config)&&void 0!==a&&a.enableAdsWaterfall&&"river"===e&&t===(null===(s=this.config)||void 0===s?void 0:s.tallAdsIndex)&&(e="rivert"),null!==(c=this.config)&&void 0!==c&&c.enable1stRowAd&&o===P.PL.FirstPartyAd&&(e="triver");const u=null===(d=this.adRegionTupleListMap.get(e))||void 0===d?void 0:d[2],p=null==u?void 0:u.find((e=>e.regionIndex===t));return p?{type:l,regionIndex:t,id:this.getNativeAdId(e,p.regionIndex),placement:p,wpoRank:n,wpoAdRank:i,wpoId:r}:{type:l,regionIndex:t,placement:{items:[]},wpoRank:n,wpoAdRank:i,wpoId:r}}getPredictCmsAdsData(){var e,t;if(!this.isFirstCmsAdsBatch)return;const n=this.getCmsRequestFromTuple();if(this.predictCmsResponse&&this.validateCmsAdPlacementConfig(n),this.cmsRequest=n,null!==(e=this.cmsRequest)&&void 0!==e&&null!==(t=e.placements)&&void 0!==t&&t.length&&(this.isFirstCmsAdsBatch=!1),this.predictCmsResponse){const e=this.predictCmsResponse;return this.predictCmsResponse=void 0,e}}async waitForCmsAuction(){this.cmsRequestPromise&&await this.cmsRequestPromise}getVAAssets(e){var t;const n=[],i=null===(t=this.config.adTemplateConfig)||void 0===t?void 0:t.supportedVAAssets;if(i){const t=i.reduce(((t,n,i)=>{const r=(0,k.Z)(h.aT,(e=>e===n));if(r){const n={...h.hy[r],id:i+1};"img"===r&&(n.img={...this.getRegionImg(e),...n.img}),t.push(n)}return t}),[]);n.push(t)}return n}checkAndAddPlacement(e,t,n,i){if(e&&t&&i.length){var r;let t,o=this.getRegionImg(n);if(this.config.overrideSAMAdImageSize&&this.overrideImageSize){const e=this.getRegionImgForMobile(n);e&&(o=e)}null!==(r=this.config.adTemplateConfig)&&void 0!==r&&r.enableVA&&!this.config.enableFeed3Cards&&"rightrail"!==n&&(t=this.getVAAssets(n));const a={assets:t,region:n,indices:i.splice(0),img:o};this.config.enableSAMAdStrictIndices&&(a.isStrictIndices=!0),this.config.enable1stRowAd&&"triver"===n&&(a.isStrictIndices=!0),e.placements.push(a)}}async fetchCmsPredictContent(){if(!this.isFirstCmsAdsBatch)return;const e=this.getPredictedAdRequest(!0);if(this.cmsRequest=e,e.placements.length)try{const{infopane:t,river:n,documentId:i}=this.cmsAdsConfig,r=e.placements.find((({region:e})=>"resinfopane"===e)),o=e.placements.find((({region:e})=>"resriver"===e)),a=t.splice(0,(null==r?void 0:r.indices.length)??0),s=n.splice(0,(null==o?void 0:o.indices.length)??0),{placements:c}=await this.nativeAdService.fetchCmsAds(e,i,[...a,...s]);return this.predictCmsResponse=c,c}catch(e){(0,S.OO)(e,C.NF_,"Call to CMS Ad Service failed")}}lazyLoadDRBundle(e){switch(e){case"prg-ad-like":return n.e("na-like-button").then(n.bind(n,85135));case"prg-trending":return n.e("na-trending").then(n.bind(n,18347));case"prg-ad-ctav2":case"prg-ad-ctav3":return n.e("na-call-to-action").then(n.bind(n,44508));case"prg-ad-sh-v1":return n.e("nas-highlight-v1").then(n.bind(n,37756));case"prg-ad-sh-v3":case"prg-ad-sh-v4":return Promise.all([n.e("nas-highlight-v3v4").then(n.bind(n,18235)),n.e("nas-highlight-v3v4").then(n.bind(n,78361))]);case"prg-ad-combo":return Promise.all([n.e("na-decoration-combo").then(n.bind(n,94738)),n.e("na-decoration-combo").then(n.bind(n,32675)),n.e("na-decoration-combo").then(n.bind(n,64295)),n.e("na-decoration-combo").then(n.bind(n,73258))])}}getPredictedAdRequest(e){const t={placements:[]};return this.adRegionTupleListMap.forEach(((n,i)=>{const r=e?this.getCmsIndices(i):this.getSamIndices(i),o=e?!n[0]:n[0];o&&null!=r&&r.length&&this.checkAndAddPlacement(t,o,i,r)})),t}getPredictSamAdsData(){var e,t;if(!this.isFirstSamAdsBatch)return;const n=this.getSamRequestFromTupleWithSectionIndex();if(this.predictSamResponse&&this.validateSamAdPlacementConfig(n),this.samRequest=n,null!==(e=this.samRequest)&&void 0!==e&&null!==(t=e.placements)&&void 0!==t&&t.length&&(this.isFirstSamAdsBatch=!1),this.predictSamResponse){const e=this.predictSamResponse;return this.predictSamResponse=void 0,e}}shouldPrefetchInfopaneSamAds(e){return-1!==this.infopanePlacementList.findIndex((({index:t})=>t===e+i.h2))}prefetchInfopaneSamAds(e){const t=this.getAndUpdateInfopanePrefetchPlacementList(e);if(t.length)return this.fetchSamAdsInPlacementList(t)}getAndUpdateInfopanePrefetchPlacementList(e){if(!this.config.infopaneViewOptAdCount)return[];const t=this.infopanePlacementList.findIndex((({index:t})=>t>e));return-1===t?[]:this.infopanePlacementList.splice(t,this.config.infopaneViewOptAdCount)}mapViewOptimizationRegion(e){if(this.config.infopaneViewOptAdCount){e.placements.forEach((e=>{f.PB.includes(e.region)&&(1===this.config.infopaneViewOptAdCount?e.region=f.BU[0]:2===this.config.infopaneViewOptAdCount&&(e.region=f.BU[1]))}));const t={};e.placements.forEach((e=>{const n=e.region;t[n]?t[n].indices.push(...e.indices):t[n]={...e}})),e.placements=Object.values(t)}}mapSamAdRegionToOriginal(e){var t,n;this.config.infopaneViewOptAdCount&&(null!=e&&null!==(t=e.samResponse)&&void 0!==t&&t.placements&&e.samResponse.placements.forEach((e=>{const{index:t}=e;this.originalInfopaneRegion.get(t)&&(e.region=this.originalInfopaneRegion.get(t))})),null!=e&&null!==(n=e.placeHolderResponse)&&void 0!==n&&n.placements&&e.placeHolderResponse.placements.forEach((e=>{const{regionIndex:t}=e;this.originalInfopaneRegion.get(t)&&(e.region=this.originalInfopaneRegion.get(t))})))}async fetchSamAdsInPlacementList(e){const t={placements:[]};(0,i.EC)(e).forEach(((e,n)=>{this.checkAndAddPlacement(t,!0,n,e)})),this.mapViewOptimizationRegion(t);const n=await this.fetchSamAds(t);return this.mapSamAdRegionToOriginal(n),n}fireServedTrackingCallForPlacements(e){if(!e)return;const t=this.beaconService.sendBeaconForAdServed.bind(this.beaconService);e.map((({beaconsJson:e,bingTrackerUrls:t=[],videoViewabilityData:n,beaconsSupportHttpPOST:i})=>!e||t.length>0&&n?null:{beaconsJson:e,beaconsSupportHttpPOST:i})).filter((e=>!(!e||!e.beaconsJson))).forEach(t)}updateAdRegionTupleListMap(e){var t,n;const{adRegionTupleListMap:i}=this;i.forEach(((t,n)=>{t[1].push(...(e.get(n)??[]).sort(((e,t)=>e-t)))})),null!==(t=this.config)&&void 0!==t&&t.enableAdsWaterfall&&!1===this.tallAdProcessed&&this.updatePlacementsForTallAd(i,this.config.tallAdsIndex),null!==(n=this.config)&&void 0!==n&&n.infopaneViewOptAdCount&&this.updatePlacementsForInfopane(i)}updatePlacementsForTallAd(e,t=0){if(0===t)return;const n=this.getOrDefault(e,"rivert",[!0,[],[]]),i=this.getOrDefault(e,"river",[!0,[],[]]),r=[t],o=this.removeItemFromPlacementArray(i[1],t);e.set("river",[i[0],o,i[2]]),e.set("rivert",[n[0],r,n[2]]),this.tallAdProcessed=!0}updatePlacementsForInfopane(e){e.forEach(((e,t)=>{e[0]&&f.PB.includes(t)&&(e[1].forEach((e=>{this.infopanePlacementList.push({region:t,index:e}),this.originalInfopaneRegion.set(e,t)})),e[1]=[])})),this.infopanePlacementList.sort(((e,t)=>e.index-t.index))}removeItemFromPlacementArray(e,t){return null==e?void 0:e.filter((e=>e!==t))}getOrDefault(e,t,n){return e.get(t)??n}updateAdCache(e){if(!this.isFirstSamAdsBatch)return;const t=new Map;this.adRegionTupleListMap.forEach(((n,i)=>{const r=[...(null==e?void 0:e.get(i))??[],...n[1]],o=this.getPlacementsBySectionIndex(r,i);t.set(i,o)})),((e,t)=>{const n=JSON.stringify(e,s);var i,o;n!==(0,r.$o)().getItem(t)&&(null===(i=(0,r.$o)())||void 0===i||i.setItem(t,n),null===(o=(0,r.$o)())||void 0===o||o.setItem(`${t}_date`,JSON.stringify(new Date)))})(t,o)}isAdsMapEmpty(){let e=!0;return this.adRegionTupleListMap.forEach((t=>{t[2].length>0&&(e=!1)})),e}getRegionImg(e){var t,n,i,r,o,a,s,c,d,l,u,p,h,g,m,f,v,y;switch(e){case"resriver":return null===(t=this.config.adTemplateConfig)||void 0===t||null===(n=t.imageSizeConfig)||void 0===n?void 0:n.river;case"resinfopane":return null===(i=this.config.adTemplateConfig)||void 0===i||null===(r=i.imageSizeConfig)||void 0===r?void 0:r.infopane;case"river":case"triver":return null===(o=this.config.adTemplateConfig)||void 0===o||null===(a=o.imageSizeConfig)||void 0===a?void 0:a.river;case"infopane":return null===(s=this.config.adTemplateConfig)||void 0===s||null===(c=s.imageSizeConfig)||void 0===c?void 0:c.infopane;case"rightrail":return null===(d=this.config.adTemplateConfig)||void 0===d||null===(l=d.imageSizeConfig)||void 0===l?void 0:l.river;case"infopane-tab":return null===(u=this.config.adTemplateConfig)||void 0===u||null===(p=u.imageSizeConfig)||void 0===p?void 0:p.infopaneTab;case"rivert":return null===(h=this.config.adTemplateConfig)||void 0===h||null===(g=h.imageSizeConfig)||void 0===g?void 0:g.rivert;case"inarticlecarousel":return null===(m=this.config.adTemplateConfig)||void 0===m||null===(f=m.imageSizeConfig)||void 0===f?void 0:f.inarticlecarousel;case"inarticle":return null===(v=this.config.adTemplateConfig)||void 0===v||null===(y=v.imageSizeConfig)||void 0===y?void 0:y.inarticle;default:return}}refresh(){this.initNativeAdConfig(this.config),this.initAdRegionTupleListMap(),this.cardsIndexList=[],this.nativeAdIndexList=[],this.cmsAdIndexList=[]}updateCardsIndexPersection(e){e.map((e=>{var t;const n=this.cardsIndexList[this.cardsIndexList.length-1]||0;this.cardsIndexList.push(n+((null===(t=e.cards)||void 0===t?void 0:t.length)||0))}))}updateRelativeAdIndexPersection(e){e.forEach((e=>{var t,n;const i=this.nativeAdIndexList[this.nativeAdIndexList.length-1]||0,r=(null===(t=e.cards)||void 0===t?void 0:t.filter((e=>"nativead"===e.type)).length)||0;this.nativeAdIndexList.push(i+r);const o=this.cmsAdIndexList[this.cmsAdIndexList.length-1]||0,a=(null===(n=e.cards)||void 0===n?void 0:n.filter((e=>"cmsad"===e.type)).length)||0;this.cmsAdIndexList.push(o+a)}))}overrideNativeAdIndexPersection(e){this.nativeAdIndexList=e}updateAndFilterSamAdResponse(e,t){const{placements:n}=this.nativeAdService.updateSamAdResponse(e,t,this.getIsPrerenderAds());return n.filter((e=>e.items.length))}getAdIndices(e){var t;return(null===(t=(e=>{var t;const n=null===(t=(0,r.$o)())||void 0===t?void 0:t.getItem(e);return a(n)})(o))||void 0===t?void 0:t.get(e))||[]}getSamIndices(e){return this.config.avoidPredictInfopaneAd&&e.toLowerCase().indexOf("infopane")>-1?[]:this.config.shouldUseAdCache?this.getAdIndices(e):[]}getPredictedSamIndices(e){var t,n,i;return(null===(t=this.samRequest)||void 0===t||null===(n=t.placements)||void 0===n||null===(i=n.find((t=>t.region===e)))||void 0===i?void 0:i.indices)||[]}getCmsIndices(e){return this.config.avoidPredictInfopaneAd&&e.toLowerCase().indexOf("resinfopane")>-1?[]:this.config.shouldUseAdCache?this.getAdIndices(e):[]}getPredictedCmsIndices(e){var t,n,i;return(null===(t=this.cmsRequest)||void 0===t||null===(n=t.placements)||void 0===n||null===(i=n.find((t=>t.region===e)))||void 0===i?void 0:i.indices)||[]}validateSamAdPlacementConfig(e){var t,n,i;const r=[],o=new Map;for(const t of e.placements){const e=t.region,n=this.getPredictedSamIndices(e);if(!n||!n.length){r.push(t);continue}const i=n.filter((e=>t.indices.indexOf(e)>=0)),a=t.indices.filter((e=>i.indexOf(e)<0));t.indices=a,a.length&&r.push(t),o.set(e,i)}let a=r;var s;(r.length&&this.config.avoidPredictInfopaneAd&&(a=a.filter((e=>e.region.toLowerCase().indexOf("infopane")<0))),a.length)?(u(JSON.stringify(null===(s=this.samRequest)||void 0===s?void 0:s.placements),JSON.stringify(e.placements),C.iLP),d.M0.addOrUpdateTmplProperty("edge_ntp.adMismatched","1")):d.M0.addOrUpdateTmplProperty("edge_ntp.adMatched","1");if(e.placements=r,null!==(t=this.predictSamResponse)&&void 0!==t&&null!==(n=t.samResponse)&&void 0!==n&&null!==(i=n.placements)&&void 0!==i&&i.length){const e=[];this.predictSamResponse.samResponse.placements.forEach((t=>{const n=t.region&&o.get(t.region);t.index&&n&&n.indexOf(t.index)>-1&&e.push(t)})),this.predictSamResponse.samResponse.placements=e}}validateCmsAdPlacementConfig(e){const t=[],n=new Map;for(const i of e.placements){const e=i.region,r=this.getPredictedCmsIndices(e);if(!r||!r.length){t.push(i);continue}const o=r.filter((e=>i.indices.indexOf(e)>=0)),a=i.indices.filter((e=>o.indexOf(e)<0));i.indices=a,a.length&&t.push(i),n.set(e,o)}let i=t;var r;(t.length&&this.config.avoidPredictInfopaneAd&&(i=i.filter((e=>e.region.toLowerCase().indexOf("infopane")<0))),i.length)&&u(JSON.stringify(null===(r=this.cmsRequest)||void 0===r?void 0:r.placements),JSON.stringify(e),C.RaX);if(e.placements=t,this.predictCmsResponse&&this.predictCmsResponse.length){var o;const e=[];null===(o=this.predictCmsResponse)||void 0===o||o.forEach((t=>{const i=n.get(t.region);i&&i.indexOf(t.regionIndex)>-1&&e.push(t)})),this.predictCmsResponse=e}}getNativeAdId(e,t){return`nativead-${e}-${t}`}getIsPrerenderAds(){return!!(this.config.enablePrerenderAds&&(0,E.TR)()&&(0,v.N)()&&"hidden"===document.visibilityState)}async createMetaTags(e){return new Promise((t=>{e.forEach((e=>{if("infopane"==e.region||"river"==e.region){var t;const n=e.items&&(null===(t=e.items[0])||void 0===t?void 0:t.adSelectionReason);if(n){const t=this.getNativeAdId(e.region,e.regionIndex);let i;switch(e.region){case"infopane":i=`tab_panel_${t}`;break;case"river":i=`native_ad_${t}`;break;default:return}try{const e=JSON.parse(n).ads[0].id,t=n.replace(e,i),r=document.head,o=document.createElement("meta");o.name="AdsMetadata",o.content=t,r.appendChild(o)}catch(e){return void(0,S.OO)(e,C.ds2,"Failed to add WhyThisAd meta tag to head")}}}})),t()}))}async loadBuyDirectAd(){await this.nativeAdService.loadBuyDirectAd()}}M.isFilteredRegion={river:!0,resriver:!0};const L=(e,t,n=!1)=>{const i="NATIVE_AD_HELPER_INSTANCE";let r=y.Gq.get(i);return r&&!n||(r=new M(e,t),y.Gq.set(i,r)),r}},99064:function(e,t,n){"use strict";n.d(t,{X:function(){return N}});var i=n(81110),r=n(69233),o=n(58980),a=n(62168),s=n(31558),c=n(55524),d=n(7476),l=n(10754),u=n(88826);var p=n(21789),h=n(92100),g=n(32810),m=n(29597),f=n(857),v=n(23357),y=n(54297),S=n(13334),C=n(5674),w=n(96946),b=n(54820),T=n(44672),k=JSON.parse('{"nextPageUrl":"","sections":[{"region":"river","subSections":[{"dataTemplate":"msft-full-wide-one-card-five-col","layoutTemplate":"msft-full-wide-one-card-five-col","cards":[{"type":"filteredChannels","isLocalContent":false,"galleryItemCount":0,"subCards":[],"subscriptionProductType":"undefined","position":0,"notificationState":"undefined","isWorkNewsContent":false,"isShowSelectMoreMessage":false}]},{"dataTemplate":"msft-full-wide-one-card-five-col","layoutTemplate":"msft-full-wide-one-card-five-col","cards":[{"type":"InterestManager","isLocalContent":false,"galleryItemCount":0,"subscriptionProductType":"undefined","position":0,"notificationState":"undefined","isWorkNewsContent":false}]}]}],"isPartial":false}'),P=n(23549),I=n(67213),A=n(9498),E=n(19547),x=n(37477),M=n(58608);const L=["cbypass","activityId","prerender","timeOut","caller","infopaneCount","edgExpMask","skipRetry","dhp","overlay"],D="ddd-tmpl",R="SuperFeedDataProviderForMobile",F="SuperFeedDataProvider";function O(e,t,n){if("1"===h.c.getQueryParameterByName(e,window.location.href)){const i={logwporeq:d.N1,logwpores:d.uI4},r={};new Headers(n.headers).forEach(((e,t)=>{"Cookie"!==t&&(r[t]=e)}));const o={headers:JSON.stringify(r),url:t,...n};(0,u.H)(i[e],"",void 0,o,!1)}}function B(e){return null!=e&&e.headers?JSON.stringify({"Akamai-Request-ID":e.headers.get("Akamai-Request-ID"),"Akamai-Server-IP":e.headers.get("Akamai-Server-IP"),"X-MSEdge-Ref":e.headers.get("X-MSEdge-Ref")}):""}class N{constructor(e){this.shouldRetryInOtherDomain=!1,this.config=e}async fetchFromWpoService(e,t,n){if(n){var r;const n=(0,s.N)()?1e4:void 0,i=await E.SI.getEarlyWpoFeedData(n),o=void 0===i||(null==i||null===(r=i.appError)||void 0===r?void 0:r.id);if(E.SI.enableEarlyMainFeedRequest=!1,!o||!(0,s.N)())return i;if(!e.skipRetry){const n=await this.fetchFromService(e,t);if(n)return n}}else{const n=await this.fetchFromService(e,t);if(n)return n}if(this.shouldRetryInOtherDomain){e.domainOverride=i.hM,e.requestPathOverride=i.hZ;const n=await this.fetchFromService(e,t,!0);if(n)return n}return this.getCachedResponse(e)}async getCachedResponse(e){if((e.skipRetry||e.enableCachedResponseFallback)&&(0,s.N)()&&window.caches&&e.serviceUrl&&e.serviceWorkerCachePrefix)try{const n=(await caches.keys()).find((t=>t.startsWith(e.serviceWorkerCachePrefix||"")));if(!n)return;const i=await caches.open(n);if(!i)return;const r=this.normalizeUrl(e.serviceUrl),o=await i.keys()||[],a=o.filter((e=>e.url&&this.normalizeUrl(e.url)===r));for(const e of a){const n=await i.match(e.url);if(n){const e=await n.json();if(e){var t;const i=(null===(t=n.headers)||void 0===t?void 0:t.get("date"))||"",r=Date.parse(i),o=isNaN(r)?"":(Date.now()-r)/1e3;return P.M0.sendAppErrorEvent({...d.Akl,pb:{...d.Akl.pb,cacheAgeSeconds:o}}),e}}}P.M0.sendAppErrorEvent({...d.rYN,pb:{...d.rYN.pb,numCachedRequests:o.length,numMatches:a.length,serviceUrl:e.serviceUrl}})}catch(t){P.M0.sendAppErrorEvent({...d.rYN,message:"An error occurred while retrieving a cached response. "+t.message,pb:{...d.rYN.pb,isFirstPage:!e.nextPageUrl,url:e.serviceUrl,requestId:e.requestId,stack:t.stack}})}}async fetchFromService(e,t,n=!1){var E,x,L,N,$;let U;const _=(0,A.TR)(),H=function(e,t,n){var i;let r=t?(null==n||null===(i=n.pageExperiments)||void 0===i?void 0:i.join(","))||"":void 0;return e.additionalFdhead&&t&&(r=r?`${r},${e.additionalFdhead}`:e.additionalFdhead),r}(e,p.jG.ShouldUseFdheadQsp,p.jG.CurrentRequestTargetScope);let W;(0,s.N)()&&(W=!(window&&window.chrome&&window.chrome.embeddedSearch),P.M0.addOrUpdateTmplProperty("privatew",`${W}`)),!(0,s.N)()&&null!==(E=this.config)&&void 0!==E&&E.requestToOrigin&&(e.domainOverride=i.hM,e.requestPathOverride=i.hZ),null!==(x=this.config)&&void 0!==x&&x.enableResetServiceURL&&(e.domainOverride=i.kJ);const q=e.useNextPageUrl&&e.paginationTimeoutMs?e.paginationTimeoutMs:e.timeoutMs,V={enableRightRailColumn:e.powerRightRailWithWpo,fdhead:H,nextPageUrl:e.useNextPageUrl?e.nextPageUrl:"",requestType:e.requestType?a.xd[e.requestType]:a.xd.wpoService,refreshType:_&&!(0,I.ZE)()?a.Rx.Bgtask:void 0,timeoutMs:e.query&&e.customFeedTimeoutMs?e.customFeedTimeoutMs:q||2e3,disableContent:e.disableContent,isRetry:n,private:W,enableWpoAdPlacements:(null===(L=this.config)||void 0===L?void 0:L.auctionRidOverride)&&!_,adsTimeout:null!==(N=this.config)&&void 0!==N&&N.auctionRidOverride?600:void 0},{requestParams:G,url:z}=await async function(e,t,n){const{nextPageUrl:i,requestType:r}=e,o={...e,audienceMode:t,nextPageUrl:i,requestType:r?a.xd[r]:a.xd.wpoService,timeoutMs:2e3,viewportSize:window&&`${window.innerWidth}x${window.innerHeight}`,...n};return{requestParams:await M.q.requestInit(o),url:await M.q.buildServiceRequestURL(o)}}(e,null===($=p.jG.CurrentRequestTargetScope)||void 0===$?void 0:$.audienceMode,V),j=h.c.getQueryParameterByName("ssrFeedTimeOut",window.location.href);!(0,s.N)()&&j&&(V.timeoutMs=parseInt(j));const K=e&&e.isMobile&&e.mobileUrl||z.href,Q=decodeURIComponent(K);O("logwporeq",Q,G),this.requestQueryParams=new g.h(z.search),z.search=this.requestQueryParams.toString(),b.$D.addTelemetryTracingQueryParam(z);const Z=(0,l.Ou)();Z[r.p.wpoCallStart]=Math.round((0,l.UE)());const{nextPageUrl:J,pageScenario:X,overrideCSRTimeoutInMs:Y,overrideSSRTimeoutInMs:ee}=e||{};let te,ne="";try{var ie,re,oe;let i=(0,s.N)()?1e4:800;(0,s.N)()&&Y?i=Y:!(0,s.N)()&&ee&&(i=ee),t&&t();const r=!(e.useNextPageUrl&&J),a=5e3;te=(()=>{let e=0;const t=r?d.IHr:d.lsA;return setInterval((()=>{e+=1,P.M0.sendAppErrorEvent({...t,pb:{...t.pb,url:Q,isFirstPage:r,activityId:p.jG.ActivityId,isPrerender:_},message:`Request didn't finish in ${a*e}ms`})}),a)})();const l=await(0,T.w)((()=>(0,s.N)()?(0,T.O)(Q,G,i,e.skipRetry):(0,m.Sm)(K,i,G)),`${F}.fetchFromWpoService`,i||0,e.skipRetry);te&&(clearInterval(te),te=null),ne=null==l||null===(ie=l.headers)||void 0===ie?void 0:ie.get("ddd-debugid"),c.Gq.set("OneServiceResponseDebugId",ne),O("logwpores",Q,l);const{status:h,statusText:g,headers:S}=l||{};if("following"===e.feedName){const e=new URLSearchParams(z.search),t="activityId",n=e.get(t)||"";if(n&&n!=p.jG.ActivityId&&P.M0.sendAppErrorEvent({...d.hOL,message:"ActivityId mismatched",pb:{...d.hOL.pb,clientActivityId:p.jG.ActivityId,serviceSideActivityId:n,debugId:ne}}),(204===h||404===h)&&r){var ae,se,ce;const e=k;return 204===h&&null!=e&&null!==(ae=e.sections)&&void 0!==ae&&null!==(se=ae[0].subSections)&&void 0!==se&&null!==(ce=se[0].cards)&&void 0!==ce&&ce[0]&&(e.sections[0].subSections[0].cards[0].isShowSelectMoreMessage=!0),e}}const b={url:Q,status:h,statusText:g,requestHeaders:JSON.stringify((0,f.GI)(G.headers)),responseHeaders:B(l),debugId:ne,isPrerender:_,activityId:p.jG.ActivityId,isFirstPage:r,isRetriedRequest:n};if(!e.disableContent&&204===l.status||!l){const e=function(e,t,n,i){let r={};const o="Service returned no content, 204 status.",a="OneService response was null.";r=i?{204:{appError:d.KDG,message:`${R}: ${o}`},0:{appError:d.NsM,message:`${R}: ${a}`}}:{204:{appError:t?d.K4A:d.FDi,message:`${F}: ${o}`},0:{appError:t?d.R5h:d.EkS,message:`${F}: ${a}`}};const{appError:s,message:c}=204===(null==e?void 0:e.status)?r[204]:r[0];return(0,u.H)(s,c||"",void 0,{...n,isFirstPage:t},!1),s}(l,r,b);return!(0,s.N)()&&e===d.R5h?void 0:{sections:[],appError:e,debugId:ne}}let I,E;if(S){if(S.get(v.rD.isStatic)){U=!0;const e=_?d.K$q:d.XCT;(0,C.e5)(U),P.M0.sendAppErrorEvent({...e,pb:{...e.pb,isPrerender:_,isFirstPage:r,activityId:p.jG.ActivityId,responseHeaders:B(l),url:Q,debugId:ne,isRetriedRequest:n},message:"Fell back to static content on the feeds call"})}const e=S.get(D);e&&P.M0.addOrUpdateTmplString(e);const t=S.get(v.rD.traceId);"edgeChromium"==p.jG.AppType?(I=(0,w.et)(t,!J),(0,s.N)()&&(0,w.mY)(t,ne)):(I=(0,w.et)(t,!J),(0,C.Dz)(ne,!J)),E=S.get(v.rD.userType)}const x=(0,s.N)()&&performance.now(),M=await l.json(),{serviceContext:L,cacheAgeSeconds:N,isPartial:$,metadata:H}=M;if(x&&Z&&(Z.FeedResponseJsonReadTime=Math.round(performance.now()-x)),L&&L.tmpl){const e=L.tmpl;P.M0.addOrUpdateTmplString(e)}if(function(e,t,n){const{swCacheEnabled:i,cacheTriggeredReason:r,sections:o}=e;if(o&&o.length){if(i){const e=`${n?R:F}: Service Worker Cached Data Triggered.`;(0,u.H)(d.Y6E,e,void 0,t,!1);const i={40601:{appError:d.RDJ,message:`${n?R:F}: Service Worker Triggered due to fetch error.`},40602:{appError:d.Nyv,message:`${n?R:F}: Service Worker Triggered due to wpo service error.`},40605:{appError:d.Vm4,message:`${n?R:F}: Service Worker Triggered due to Status 204 no content.`},40606:{appError:d.npe,message:`${n?R:F}: Service Worker Triggered due to static content loaded.`},40607:{appError:d.Q0t,message:`${n?R:F}: Service Worker Triggered due to wpo service returns empty section.`},40608:{appError:d.dAd,message:`${n?R:F}: Service Worker Triggered due to static fallback returns empty section.`},40609:{appError:d.zo9,message:`${n?R:F}: Service Worker Triggered due to network timeout.`}};if(r){const{appError:e,message:n}=i[r];(0,u.H)(e,n||"",void 0,t,!1)}}}else{const e=n?d.X1K:d._yJ,i=`${n?R:F}: Empty Section on the feed call.`;(0,u.H)(e,i,void 0,t,!1)}}(M,{...b,cacheAgeSeconds:N}),null!=L&&L.preRenderDisabled)return L.debugId&&P.M0.addOrUpdateCustomProperty("PartialId",L.debugId),{isPartial:$,serviceContext:L};if("following"===e.feedName&&200===l.status&&r){const e=k;if(!(M.sections&&M.sections.some((e=>"river"===e.region)))&&M.sections&&e&&e.sections&&e.sections.length){const t=M.sections.filter((e=>"overlay"===e.region));t&&t.length&&M.sections.push(e.sections[0])}}if("gaming"===e.feedName&&200===l.status&&r&&(0,s.N)()&&null!==(re=M.serviceContext)&&void 0!==re&&re.tmpl&&!(0,y.$o)().getObject(o.d.GamingFeedEngagement))try{const e=Math.floor((new Date).getTime()/1e3),t=M.serviceContext.tmpl.split(";"),n={};for(let e=0;e<t.length;e++)t[e].includes("gamingFeedEngagementCount30D")&&t[e].split(",").forEach((e=>{const t=e.split(":"),[i,r]=t,o=r?Number.parseInt(r,10):null;"gamingFeedEngagementSum7D"!==i&&"gamingFeedEngagementCount7D"!==i&&"gamingFeedEngagementSum30D"!==i&&"gamingFeedEngagementCount30D"!==i||null===o||(n[i]=o)}));n.lastUpdated=e;const i=5;Object.keys(n).length===i&&(0,y.$o)().setObject(o.d.GamingFeedEngagement,n)}catch(e){}if("winfullpage"===X&&M&&M.sections&&M.sections.length>0){const e=M.sections;(e[0].subSections&&e[0].subSections.length>0?e[0].subSections:e).some((e=>!e.layoutTemplate))&&P.M0.sendAppErrorEvent({...d.Z49,pb:{...d.Z49.pb,url:Q,dataTemplate:M.sections.map((e=>e.dataTemplate)).join(","),layoutTemplate:M.sections.map((e=>e.layoutTemplate)).join(",")},message:"LayoutTemplate field missing for sections on the feeds call"})}if(!(M&&(e.disableContent||M.sections&&M.sections.length))){const e=U?d.w0e:d._yJ;P.M0.sendAppErrorEvent({...e,pb:{...e.pb,url:Q,isFirstPage:r,activityId:p.jG.ActivityId,isPrerender:_,debugId:ne,isRetriedRequest:n},message:"Empty Section on the feed call"})}null===(oe=this.config)||void 0===oe||!oe.auctionRidOverride||(0,A.TR)()||(0,s.N)()||this.backfill1SAdWithNews(M);const W="byregion"!=e.wpoSchema,q={traceIdIndex:I,metadata:H,userType:E,debugId:ne,serviceContext:L};return W?function(e,t){var n;if(!e||null==e||!e.sections||null!=e&&null!==(n=e.sections[0])&&void 0!==n&&n.region)return e;const{sections:i,nextPageUrl:r,adsMetadata:o,pageContext:a}=e;return{nextPageUrl:r,sections:[{region:"river",subSections:i}],adsMetadata:o,pageContext:a,...t}}(M,q):{...M,...q}}catch(t){te&&(clearInterval(te),te=null);const i=["Service Request Timed out","Fetch for https://"],r=["TypeError: Failed to fetch"];let o;const a=!J;let s;if(this.shouldRetryInOtherDomain=a&&!e.domainOverride&&S.Al.CurrentFlightSet.has("prg-retryapimsn"),i.some((e=>{var n;return null==t||null===(n=t.message)||void 0===n?void 0:n.includes(e)}))){const e=_?d.lCX:d.Kzw;o=a?e:d.Jmv,s=!0,o===d.Kzw&&this.shouldRetryInOtherDomain&&!n&&(o=d.tYD)}else o=r.some((e=>`${t}`.includes(e)))?this.shouldRetryInOtherDomain?d.Ps3:d.zYr:this.shouldRetryInOtherDomain?d.md3:d.KJ$;const c={...o,message:"Error while fetching OneService response",pb:{...o.pb,url:Q,activityId:p.jG.ActivityId,requestHeaders:JSON.stringify((0,f.GI)(G.headers)),customMessage:`${t}`,isPrerender:_,debugId:ne,isRetry:this.shouldRetryInOtherDomain,domainOverride:e.domainOverride??"",isRetriedRequest:n}};return P.M0.sendAppErrorEvent(c),{appError:c,userEndError:s,debugId:ne}}}backfill1SAdWithNews(e){var t,n,i,r,o,a,s;if(null===(t=e.sections)||void 0===t||!t.length)return;const c=null===(n=e.sections.find((e=>"backup"===e.region)))||void 0===n||null===(i=n.subSections)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.cards,l=null===(o=e.sections.find((e=>"river"===e.region)))||void 0===o||null===(a=o.subSections)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.cards;null==l||l.forEach(((e,t)=>{(e.type===x.PL.NativeAd&&h.c.getQueryParameterByName("mockNo1SNative",window.location.href)||e.type===x.PL.CmsAd&&h.c.getQueryParameterByName("mockNo1SCms",window.location.href))&&(e.data=null),e.type!==x.PL.NativeAd&&e.type!==x.PL.CmsAd||e.data||((0,u.OO)(null,d.paG,`Ad for ${e.type} not found in feed response.`,`cardData: ${JSON.stringify(e)}`),null!=c&&c.length?l[t]=c.shift():(0,u.OO)(null,d.G78,"Empty backup region"))}))}normalizeUrl(e){try{const t=new URL(e);L.forEach((e=>t.searchParams.delete(e)));return decodeURIComponent(t.toString()).replace("/serviceak/","/service/").replace("api.msn.com/","assets.msn.com/").replace("api.msn.cn/","assets.msn.cn/")}catch(e){return""}}}},69734:function(e,t,n){"use strict";n.d(t,{P:function(){return c}});var i=n(84231),r=n(66701),o=n(85205);var a=n(64902);let s=!1;function c(e,t){s||(s=!0,(0,i.x)(e)||t&&t()||requestAnimationFrame((()=>{t&&t()||e.forEach((({experienceType:e,instanceSrc:t})=>{if(e in o.z)r.n.loadExperience(e);else{const n=function(e,t="default",n=e){return{instanceId:e,configRef:{experienceType:n,instanceSrc:t||"default"}}}(e,t);(0,a.Fg)(n)}}))})))}},27933:function(e,t,n){"use strict";n.d(t,{AH:function(){return f},C1:function(){return y},EC:function(){return v},JV:function(){return M},Og:function(){return T},Qz:function(){return E},aR:function(){return A},b:function(){return L},h2:function(){return p},m0:function(){return k},pE:function(){return I},sI:function(){return b},vZ:function(){return P},yy:function(){return x},zX:function(){return C}});var i=n(69233),r=n(19233),o=n(10754),a=n(21930),s=n(36926),c=n(9498),d=n(37477),l=n(90351),u=n(13334);const p=1,h=["river","resriver","river_cms","rightrail"],g=e=>t=>{var n;const i={...t,adLabelText:e.adLabelText,isGreyAdsLabelEnabled:e.isGreyAdsLabelEnabled,isWhiteSlug:e.isWhiteSlug,isTransparentSlug:e.isTransparentSlug,isNarrowTitleFooterGap:e.isNarrowTitleFooterGap,isTransparentAdSlugWithBorder:e.isTransparentAdSlugWithBorder,isTransparentAdSlugWithBorderV2:e.isTransparentAdSlugWithBorderV2,isTransparentAdSlugWithBorderV2NonDr:e.isTransparentAdSlugWithBorderV2NonDr,enableAdsColorBleed:e.enableAdsColorBleed,isAdSlugV4NonDr:e.isAdSlugV4NonDr};return"rightrail"===t.region&&null!==(n=e.rightrail)&&void 0!==n&&n.useTransparentAdCard&&(i.shouldUseWhiteGradient=!0),h.includes(t.region)?(i.isProviderInFooter=e.isProviderInFooter,i.isProviderInHeader=e.isProviderInHeader,((e,t)=>{var n;if(null!==(n=t.items)&&void 0!==n&&n.length){if(e.useArticleCardTemplate){const n=Number(t.items[0].imageWidth)||(0,l.Z)(e.adTemplateConfig,"imageSizeConfig.river.w"),i=Number(t.items[0].imageHeight)||(0,l.Z)(e.adTemplateConfig,"imageSizeConfig.river.h");return t.items[0].imageWidth=(225*n/i).toFixed().toString(),t.items[0].imageHeight="225",t.imageWidth=t.items[0].imageWidth,void(t.imageHeight=t.items[0].imageHeight)}t.items[0].imageWidth="300",t.items[0].imageHeight="156"}})(e,i),i):i},m=(e,t)=>{const n=e[t.region]??[];return{...e,[t.region]:n.concat(t)}},f=(e,t)=>t.map(g(e)).reduce(m,{}),v=e=>e.reduce(((e,{region:t,index:n})=>{const i=e.get(t)||[];return i.push(n),e.set(t,i),e}),new Map),y=(e,t)=>e.reduce(((e,n)=>(t(n)?e[0].push(n):e[1].push(n),e)),[[],[]]),S=()=>{const e=(0,o.Ou)()[a.nz+i.p.complete];(0,s.hf)(r.qG.RenderReady,e),(0,s.hf)(r.qG.AdRendered,1),(0,s.hf)(r.qG.TimeToRenderAd,e)},C=(e=!1)=>{var t;const n=(0,o.Ou)()[i.p.isSSRCompleted]&&(null===(t=window.ssrAdData)||void 0===t?void 0:t.length);n&&S(),window.requestAnimationFrame((()=>{setTimeout((()=>{const t=(0,s.v0)(u.Al.IsPrerender&&!e),i=(0,a.O0)(r.qG.RenderReady);i>-1&&i&&(0,a.su)(r.qG.AdRendered,t-i);const o=(0,a.O0)(r.qG.TimeToAdResponse);o>-1&&(0,a.O_)(r.qG.AdProcessed,o,t);const c=(0,a.O0)(e?r.qG.TimeToServeAdBackground:r.qG.TimeToServeAd);c>-1&&(0,a.su)(r.qG.RespToAdCallback,c-o),e?w():n||(0,a.O_)(r.qG.TimeToRenderAd,0,t)}),0)}));const c=(0,s.v0)(u.Al.IsPrerender&&!e);(0,a.su)(r.qG.RenderReady,c);const d=(0,a.O0)(e?r.qG.TimeToServeAdBackground:r.qG.TimeToServeAd);d>-1&&(0,a.su)(r.qG.AdCallbackProcessed,c-d)};function w(){(0,c.lr)().then((()=>{const e=(0,o.Ou)();(0,a.O_)(r.qG.TimeToRenderAd,0,e.TTPR),(0,a.O_)(r.qG.TimeToRequestAd,0,1)}))}const b=()=>{var e;if((0,o.Ou)()[i.p.isSSRCompleted]&&(null===(e=window.ssrAdData)||void 0===e?void 0:e.length))S();else if((0,c.TR)())w();else{const e=(0,s.v0)(u.Al.IsPrerender);(0,a.O_)(r.qG.TimeToRenderAd,0,e)}},T=e=>{var t,n;return 0===(null===(t=e.placement)||void 0===t||null===(n=t.items)||void 0===n?void 0:n.length)},k=e=>e.type===d.PL.Infopane,P=e=>e.type===d.PL.TabbedInfopaneCard,I=e=>e.type===d.PL.ChannelCarousel||e.type===d.PL.ChannelFilterCard,A=e=>e.type===d.PL.NativeAd||e.type===d.PL.NativeTopAd||e.type===d.PL.FirstPartyAd,E=e=>e.type===d.PL.CmsAd,x=e=>e.type===d.PL.Dense,M=e=>e.type===d.PL.TabbedInfopaneCardTab||e.type===d.PL.TopicFeed,L=e=>e.type===d.PL.BuyDirectAd},74716:function(e,t,n){"use strict";n.d(t,{G8:function(){return p},Jx:function(){return S},TO:function(){return y},Xd:function(){return v},Zn:function(){return m},cP:function(){return u},iM:function(){return f},oE:function(){return l}});var i=n(4055),r=n(67295),o=n(79545),a=n(69233),s=n(15778),c=n(8076),d=n(43879);const l=e=>"WeatherHero"==e.type?o.x.weatherHeroExperience:e.type+(e.id??""),u=`TTVR.${a.p.viewCards}`,p=`TTVR.${a.p.sdCards}`,h=new Map([[s.U.infopaneCard,()=>!0],[s.U.sectionHeaderCard,()=>!0],[s.U.topStoriesCard,()=>!0],[s.U.contentCard,e=>{const t=(0,c.Ae)(e)||(0,c.UN)(e);return t&&t.height>=i.B._300x225.height&&t.width>=i.B._300x225.width}],[s.U.weatherHeroExperienceCarouselCard,()=>!0]]),g=[s.U.contentCard,s.U.infopaneCard,s.U.sectionHeaderCard,s.U.topStoriesCard,s.U.weatherHeroExperienceCarouselCard];function m(e){const t=d.J[e.type];if(t&&g.includes(t)){const n=h.get(t);return!!n&&n(e)}return!1}const f={C1:1,C2:2,C3:3,C4:4,C5:5,C6:6};function v(e,t){return 2*e*(f[t]||1)}const y=e=>{switch(e){case r.Nv._1x_1y:return 1;case r.Nv._1x_2y:case r.Nv._2x_1y:return 2;case r.Nv._3x_1y:return 3;case r.Nv._2x_2y:case r.Nv._4x_1y:return 4;default:return 2}},S={contentGroup:o.x.contentGroup,"content-card":o.x.articlePage,horoscopeCard:o.x.horoscopeAnswerCardWC,linkedInCard:o.x.linkedInCard,moneyInfoCard:o.x.moneyInfoCardWC,onThisDayCard:o.x.onThisDayCardWC,qnaCard:o.x.qna,"shopping-carousel":o.x.shoppingCardWC,sportsCard:o.x.sportsCardWC,trafficCard:o.x.trafficCardWC,travelDestination:o.x.travelDestination,trendingNowCard:o.x.trendingNowWC,weather:o.x.weatherCardWC,autosCarousel:o.x.autosCarousel,autosMarketplaceCard:o.x.autosMarketplaceCard,boostAdCard:o.x.boostAdCard,electionsCard:o.x.generalElections,rewardsCard:o.x.rewardsCardWC,gamingCompeteCard:o.x.gamingCompeteCard,gamingInterestGroupCard:o.x.gamingInterestGroupCard,gamingMatchCard:o.x.gamingMatchCard,gamingMediaCarousel:o.x.gamingMediaCarousel,gamingPersonalizationCard:o.x.gamingPersonalizationCard,gamingRedditCard:o.x.gamingRedditCard,gamingRecentlyPlayedCard:o.x.gamingRecentlyPlayedCard,gamingRecommendedCard:o.x.gamingRecommendedCard,gamingRewardsCard:o.x.gamingRewardsCard,gamingStreamCard:o.x.gamingStreamCard,GamingClip:o.x.gamingStreamCard,GamingHighlight:o.x.gamingStreamCard,GamingLiveStream:o.x.gamingStreamCard,GamingVod:o.x.gamingStreamCard,gamingTournamentCard:o.x.gamingTournamentCard,gamingUpcomingCard:o.x.gamingUpcomingCard,gamingVideoCard:o.x.gamingVideoCard,"trending-in-ten-minutes-id":o.x.selectCarousel,"infopane-id":o.x.selectCarousel,"war-in-ukraine-carousel-id":o.x.selectCarousel,"local-news-carousel-id":o.x.selectCarousel,casualGamesCarouselCard:o.x.casualGamesCarouselCard,trendingSearchCard:o.x.trendingSearchCard,mangaCard:o.x.mangaCard,"shopping-prong-card-response":o.x.selectCarousel,winAppCard:o.x.winAppWC,publisherList:o.x.publisherList,promotedAdCard:o.x.promotedAdWC}},54155:function(e,t,n){"use strict";n.d(t,{Jv:function(){return l},Qf:function(){return c},XI:function(){return d},s2:function(){return u}});var i=n(74716),r=n(50632),o=n(7476),a=n(23549);const s={0:r.K$.c1,1:r.K$.c2,2:r.K$.c3,3:r.K$.c4,4:r.K$.c5};function c(e,t,n,r){const o=i.iM[e];let a="";let s;return a=t?Object.keys(t).slice(0,o).map((e=>`${e}:${t[e].offset}`)).join(","):((e,t="c",n=":0")=>Array.from({length:e},((e,i)=>`${t}${i+1}${n}`)).join(","))(o),r&&2===r&&(s=n?Object.keys(n).slice(0,o).map((e=>`${e}:${n[e].offset}`)).join(","):((e,t="c",n=":-1")=>Array.from({length:e},((e,i)=>`${t}${i+1}${n}`)).join(","))(o)),{layout:e.toLowerCase(),colstatus:a,colwidth:300,adoffsets:s,l3v:r}}function d(e,t){const n={c1:{offset:0},c2:{offset:0},c3:{offset:0},c4:{offset:0},c5:{offset:0}},i=e[0];for(let o=1;o<e.length;o++){var r;const a=s[o],c=(null==t||null===(r=t[a])||void 0===r?void 0:r.offset)??0;n[a].offset=e[o]-i+c}return n}function l(e,t,n){const i={c1:{offset:-1},c2:{offset:-1},c3:{offset:-1},c4:{offset:-1},c5:{offset:-1}};for(let o=0;o<e.length;o++){const a=s[o];var r;if(-1!=e[o])i[a].offset=e[o];else void 0!==(null==n||null===(r=n[a])||void 0===r?void 0:r.offset)?i[a].offset=-1===n[a].offset?-1:n[a].offset+t[o]:i[a].offset=e[o]}return i}function u(e,t,n){var i,r;(n?void 0===e.layout||void 0===e.colstatus||void 0===e.l3v||void 0===e.adoffsets:void 0===e.layout||void 0===e.colstatus)&&a.M0.sendAppErrorEvent({...o.wtK,message:"Waterfall feed request missing QSPs",pb:{...o.wtK.pb,customMessage:`feedName: ${e.feedName}, \n option2: ${n}, \n layout: ${e.layout}, \n colstatus: ${e.colstatus}, \n l3v: ${e.l3v}, \n adoffsets: ${e.adoffsets}, \n requestnextPageUrl: ${e.nextPageUrl},\n requestServiceUrl: ${e.serviceUrl},\n useWebLayoutEndpoint: ${e.useWebLayoutEndpoint},\n pageScenario: ${e.pageScenario},\n traceIdIndex: ${null==t?void 0:t.traceIdIndex}, \n Statics: ${null==t?void 0:t.isStatic}, \n debugId: ${null==t?void 0:t.debugId}, \n fdHead: ${null==t?void 0:t.serviceContext.fdHead},\n responseNextPageUrl: ${null==t?void 0:t.nextPageUrl},\n responseNextPageRequest.nextPageUrl: ${null==t||null===(i=t.nextPageRequest)||void 0===i?void 0:i.nextPageUrl},\n responseNextPageRequest.serviceUrl: ${null==t||null===(r=t.nextPageRequest)||void 0===r?void 0:r.serviceUrl},\n responseSource: ${null==t?void 0:t.responseSource}, \n status: ${null==t?void 0:t.status},\n responseStatus: ${null==t?void 0:t.responseStatus}`}})}},20758:function(e,t,n){"use strict";n.d(t,{uS:function(){return v},jo:function(){return k},U$:function(){return T},$y:function(){return b},Ay:function(){return P},IK:function(){return L},Rc:function(){return M}});var i=n(7476),r=n(88826),o=n(76733),a=n(45266);var s=n(13015),c=n(2518);const d="clickOffice365Button",l="clickPersonalizeButton",u="clickSettingsButton",p="clickSettingsCloseButton",h="clickSettingsInformationalButton",g="openEdgeBrowserNewWindow",m={["clickAddTileButton"]:()=>(0,s.xB)("AddTopSiteButton"),["clickMyFeedPivotButton"]:()=>(0,s.xB)("MyFeedPivotButton"),[d]:()=>(0,s.xB)("office365"),[l]:()=>(0,s.xB)("PersonalizeButton"),["clickSettingsAdvancedButton"]:()=>(0,s.xB)("SettingsAdvancedButton"),[u]:()=>(0,s.xB)("SettingsButton"),[p]:()=>(0,s.xB)("settingsCloseButton"),["clickSettingsCustomButton"]:()=>(0,s.xB)("SettingsCustomButton"),["clickSettingsFocusedButton"]:()=>(0,s.xB)("SettingsFocusedButton"),[h]:()=>(0,s.xB)("settingsInformationalButton"),["clickSettingsInspirationalButton"]:()=>(0,s.xB)("SettingsInspirationalButton"),["clickVoiceSearchButton"]:()=>(0,s.xB)("searchBoxVoiceButton"),[g]:async e=>e&&e.text&&(0,c.R)(e.text)?(window.open(e.text,"_blank").focus(),{actionCompleted:!0,status:"Window opened"}):{actionCompleted:!1,status:"No url provided"},["clickWaffleButton"]:()=>(0,s.xB)("waffle"),["focusOnSearchBar"]:()=>(0,s.yC)("searchBoxInput"),["clickRewardsButton"]:()=>(0,s.xB)("rewardsIcon")};var f,v,y=n(85205),S=n(23549),C=n(31558),w=n(67044);!function(e){e.pinMsnews="pinMsnews",e.tryInformationalMode="tryInformationalMode",e.tryInformationalModeDirect="tryInformationalModeDirect",e.tryInformationalModeProg="tryInformationalModeProg",e.tryPersonalizations="tryPersonalizations",e.focusOnSearchBar="focusOnSearchBar",e.tryOffice365="tryOffice365"}(f||(f={})),function(e){e.setDefaultBrowser="setDefaultBrowser"}(v||(v={}));const b=e=>async()=>{const t=m[g];return t?await t({text:e}):null},T=(e,t)=>{switch(e){case f.tryInformationalMode:return A(t);case f.tryInformationalModeDirect:return x();case f.tryInformationalModeProg:return E(t);case f.tryPersonalizations:return I();case f.tryOffice365:return P()}},k=e=>{if(e===v.setDefaultBrowser)return(()=>{const e=new Promise((e=>{try{(0,C.N)()&&window&&window.chrome&&window.chrome.shellIntegrationPrivate&&"function"==typeof window.chrome.shellIntegrationPrivate.setDefaultBrowser?window.chrome.shellIntegrationPrivate.setDefaultBrowser((t=>{const n=null==t?void 0:t.success;n&&document.dispatchEvent(new CustomEvent("setDefaultBrowserSuccess",{})),e({actionCompleted:n,status:null==t?void 0:t.message})})):(S.M0.sendAppErrorEvent({...i.DKZ,message:"TargetActionLib: window.chrome.shellIntegrationPrivate.setDefaultBrowser chromium API not available"}),e({actionCompleted:!1,status:"set default browser api not available"}))}catch(t){(0,r.OO)(t,i.WQV,"TargetActionLib: Exception executing window.chrome.shellIntegrationPrivate.setDefaultBrowser chromium API to set default browser to Edge"),e({actionCompleted:!1,status:JSON.stringify(t)})}}));return async()=>await e})()},P=()=>async()=>{let e;const t=m[d];return t&&(e=await t({})),o.k.log(`Action completed: ${e.actionCompleted} status: ${e.status}`),e},I=()=>async()=>{let e;const t=m[l];return t&&(e=await t({})),o.k.log(`Action completed: ${e.actionCompleted} status: ${e.status}`),e},A=e=>async()=>{let t;return t=await R(),await(0,s.rT)(e||1e3),t=await D(),t},E=e=>async()=>{let t;t=await R(),await(0,s.rT)(e||1e3),t=await D(),await(0,s.rT)(e||1e3);const n=m[p];return n&&(t=await n({})),t},x=()=>async()=>{const e={actionCompleted:!1},t=await(0,w.oU)(y.z.ChromiumPageSettings);if(!t)return e.status="ChromiumPageSettingsConnector not found",e;const n=t.getCurrentState(),i={...n,originalLayout:n.currentLayout,...a.YZ};return t.updateLayout(i),e.actionCompleted=!0,e.status="Layout mode changed to informational",document.dispatchEvent(new CustomEvent("changeToInformationalSuccess",{})),e},M=()=>async()=>F("always"),L=()=>async()=>F("peek");async function D(){let e;const t=m[h];return t&&(e=await t({})),o.k.log(`Action completed: ${e.actionCompleted} status: ${e.status}`),e}async function R(){let e;const t=m[u];return t&&(e=await t({})),o.k.log(`Action completed: ${e.actionCompleted} status: ${e.status}`),e}async function F(e){const t={actionCompleted:!1},n=await(0,w.oU)(y.z.ChromiumPageSettings);if(!n)return t.status="ChromiumPageSettingsConnector not found",t;const i=n.getCurrentState();if(i.currentLayout!==a.nP.custom){const e={...i,originalLayout:i.currentLayout,currentLayout:a.nP.custom};n.updateLayout(e)}return n.updateFeeds(e,i.selectedFeedDisplaySetting),t.actionCompleted=!0,t.status=`Feed toggle changed to ${e}`,t}},13015:function(e,t,n){"use strict";n.d(t,{rT:function(){return c},xB:function(){return a},yC:function(){return s},zq:function(){return d}});var i=n(2518),r=n(66415);const o=e=>(0,i.R)(e)?(0,r.b_)(e):null,a=e=>{const t=o(e);if(!t)return{actionCompleted:!1,status:`TargetId [${e}] was not found.`};const n=(e=>{const t=e&&e.click;return!(!t||"function"!=typeof t||(e.click.call(e),0))})(t);return{actionCompleted:n,status:`Click status: TargetId [${e}] == ${n}`}},s=e=>{const t=o(e);if(!t)return{actionCompleted:!1,status:`TargetId [${e}] was not found.`};const n=(e=>{const t=e&&e.focus;return!(!t||"function"!=typeof t||(e.focus.call(e),0))})(t);return{actionCompleted:n,status:`Focus status: TargetId [${e}] == ${n}`}},c=async e=>{const t=new Promise((t=>{setTimeout(t,e)}));await t},d=()=>{const e={resolve:null,waiting:null};return e.waiting=new Promise((t=>{e.resolve=t})),e}},70280:function(e,t,n){"use strict";n.d(t,{NS:function(){return r},ob:function(){return s},qP:function(){return i},tM:function(){return o},tW:function(){return a}});const i="data-t";var r;!function(e){e.Auto="auto",e.AutoScroll="autoScroll",e.Load="load",e.OutOfFocus="outoffocus",e.Partial="partial",e.Resize="resize",e.Scroll="scroll",e.Swipe="swipe",e.Tap="tap",e.View="view"}(r||(r={}));const o="TelemetryPageViewNotificationEvent",a="AppErrorNotificationEvent",s="IDXId"},82898:function(e,t,n){"use strict";n.d(t,{Aw:function(){return o},c9:function(){return i},hP:function(){return s},uH:function(){return r},wu:function(){return a}});const i={Undefined:0,Header:1,Footer:2,TopNavBar:3,NavBar:4,DropDown:5,Section:6,Carousel:7,Module:8,SearchBox:9,InputBox:10,ActionButton:11,Interaction:12,Headline:13,Entity:15,Topic:29,Provider:30,NewStories:46,AutoSuggest:47,Tile:49,TrendingNews:50,AllCoverage:51,Report:52,MsccCookieComplianceBanner:54,CookieWallCookieComplianceBanner:57,FRE:60,VideoPlayer:61,ContentCard:62,SubmitForm:63,TrafficCard:64,WeatherCard:65,TravelDestinationCard:66,FitnessWorkoutVideo:67,BingHealthFitnessCard:68,FamilyCard:69,FitnessCard:70,HealthQnACard:71,HealthTipCard:72,HealthFitnessCarousel:73,CovidCard:74,Audio:75,ShoppingAd:76,ContentGroup:77,AicreationCard:78,Game:79,HealthRiverCard:80,Augment:81},r={Undefined:0,StructuredData:1,AppStore:2,CmsPromotions:3,MicrosoftWebStore:4,XboxStore:5,OfficeStore:6,PartnerLinks:7,SponsoredContent:8,ExternalLink:10,SearchPromo:11,Feed:12,Article:13,Gallery:14,Video:15,Audio:16,Settings:17,DisplayAd:18,OfficeDocument:19,App:20,SearchResult:21,VideoAd:22,Map:23,Comment:24,Profile:25,Coachmark:26,TrendingSearch:27,AutoSuggestSearch:28,SearchHistory:29,TextSearch:30,TopSites:31,SearchLink:32,ImageSearch:33,VoiceSearch:34,Toast:35,Greeting:36,Image:37,Banner:38,Waffle:39,Notification:40,QnaTopic:41,QnaContent:42,Publisher:43,Topic:44,LayoutToggle:45,WebContent:46,FinanceTicker:47,CashbackOffer:48,AiCharacter:49,FoodItem:50,FitnessChallenge:51,Overlay:52,Inspiration:53,DailyDiscovery:54,SegmentAugment:55,Upsell:56,UpsellLearnMore:57,WeatherHero:58,TravelArticleCard:59,UpsellTooltip:60,UpsellGetApp:61,UpsellAppStore:62,UpsellGooglePlay:63},o={Click:"click",Hover:"mouseenter",MouseLeave:"mouseleave",Submit:"submit",View:"view",RightClick:"rightclick",Wheel:"wheel",KeyPress:"keypress",HorizontalSwipe:"hswipe",MiddleClick:"middleclick",VerticalSwipe:"vswipe",Launch:"launch"},a={Undefined:0,Navigate:1,ContextMenu:2,Pin:3,Unpin:4,Rearrange:5,Remove:6,Add:7,Open:8,View:9,Follow:10,Unfollow:11,More:12,Close:13,Share:14,Like:15,Dislike:16,Unlike:17,Undislike:18,Mute:19,Unmute:20,Cancel:21,Launch:22,Install:23,Manage:24,Show:25,MuteCancel:26,Save:27,Hide:28,Unhide:29,Customize:30,Suspend:31,Clear:32,SignIn:33,SignOut:34,UndoSave:35,TurnOn:36,TurnOff:37,Forward:38,Response:39,Report:40,ZoomIn:41,ZoomOut:42,Comment:43,Sort:44,Love:45,Surprised:46,Thinking:47,Sad:48,Angry:49,TextSearch:50,ImageSearch:51,UndoRemove:52,Rename:53,SearchLink:54,VoiceSearch:55,Complete:56,Play:57,Pause:58,Seek:59,Volume:60,ClosedCaptions:61,Fullscreen:62,Restore:63,Replay:64,Copy:65,Reactlike:66,UnReactlike:67,UnLove:68,UnSurprised:69,UnThinking:70,UnSad:71,UnAngry:72,ReportAd:73,Refresh:74,Paginate:75,Click:76,Hover:77,SelectProduct:78,Signup:79,CompleteOrder:80,Model3DInteraction:81,PushNotificationReceive:82,PushNotificationShow:83,PushNotificationClick:84,PushNotificationHmsClick:85,Expand:86,Collapse:87,NoSearchQuerySubmit:88,Feedback:89,QualityChange:90,ProtocolLaunch:91,SydneySummary:92,SydneyTopQuestions:93,SydneyKeyTakeaways:94,SydneyDegreeOverview:95,SydneyFactCheck:96,SydneyMore:97,LeftSwipe:98,RightSwipe:99},s={Empty:0,SearchBox:1,TopSites:2,Suggested:4,ContentFeed:8,WinFRE:16,BingImage:32,ContentBelowTheFold:64,CustomModeOption:128,GreetingEnabled:256,HeadingsOnly:512,StripeLayout:1024,Peek:2048}},23549:function(e,t,n){"use strict";let i;n.d(t,{M0:function(){return a},dK:function(){return o},uZ:function(){return s}});const r=new Promise((e=>{i=e}));let o=()=>r,a=null;function s(e,t=i){a=e,t()}},95244:function(e,t,n){"use strict";var i;n.d(t,{G:function(){return i}}),function(e){e[e.All=0]="All",e[e.Otf=1]="Otf",e[e.OneDS=2]="OneDS",e[e.CTag=3]="CTag",e[e.Comscore=4]="Comscore",e[e.Debug=5]="Debug",e[e.SuperApp=6]="SuperApp"}(i||(i={}))},60844:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});var i=n(72626);class r{createPageViewPayload(e){if(!e)return;const t=e&&e.page,n=t&&t.content,r=e&&e.user,o={rnd:(0,i.Xn)(),udc:!0};return t&&(o["pg.n"]=t.name,o["pg.t"]=t.type,o["pg.c"]=t.config,o["pg.p"]=t.product,o.rf=t.referral,o.tp=t.url,o.cvs=t.canvas,t.consentChanged&&(o.ctsa=t.consentChanged)),n&&(o.di=n.domainId,o["st.dpt"]=n.category,o["st.sdpt"]=n.subcategory,o.subcvs=n.vertical),e&&(o.lng=e.locale&&e.locale.mkt,e.request&&(o.rid=e.request.requestId,o.activityId=e.request.activityId),e.browser&&(o["d.imd"]=e.browser.isMobile,o.scr=e.browser.screenSize,o.anoncknm=e.browser.anoncknm)),r&&(o.issso=r.isSso,o.aadState=r.aadState),o}}},62433:function(e,t,n){"use strict";n.d(t,{O:function(){return r}});var i=n(72626);class r{createPageViewPayload(e){if(!e)return;let t=e&&e.page&&e.page.url;try{const n=new URL(t),i=e&&e.page&&e.page.config;(8&i||2048&i)&&(n.searchParams.set("content","1"),t=n.href),e.locale&&e.locale.mkt&&(n.searchParams.set("mkt",e.locale.mkt),t=n.href)}catch{}return{rn:(0,i.Xn)(),c1:2,c2:3000001,cs_ucfr:1,c7:t,c8:e&&e.page&&e.page.content&&e.page.content.title,c9:e&&e.page&&e.page.referral,cs_fpid:e&&e.browser&&e.browser.muid,cs_fpit:"o",cs_fpdm:"*null",cs_fpdt:"*null"}}}},67103:function(e,t,n){"use strict";n.d(t,{k:function(){return l}});var i=n(70280),r=n(82898),o=n(65004),a=n(72626),s=n(45555),c=n(30676),d=n(13578);class l{constructor(e=!1){this.enableBatchingForAllEvents=!1,this.enableBatchingEventList={},!0!==e?Array.isArray(e)&&e.forEach((e=>this.enableBatchingEventList[e]=!0)):this.enableBatchingForAllEvents=!0}createPageViewPayload(e){if(e){return this.createEvent("PageView",{...e},o.zU.RealTime)}}createContentViewPayload(e,t,{contentViewType:n,isMeaningfulScroll:r}){if(!t)return;const s=[];e.forEach((e=>{s.push(this.mapTelemetryObject(e))}));let c;(0,a.d5)()&&(c={content:{docHeight:(0,a.d5)()}});const l={...t,...c,compressedObject:s,contentViewType:n};if(n===i.NS.Scroll&&(l.isMeaningfulScroll=r),!(0,d.Z)(s)){return this.createEvent("ContentView",l,o.zU.RealTime)}}createActionPayload(e,t,n,i){if((0,d.Z)(e)||!t)return;let a;n===r.Aw.RightClick?a="rightclick":t&&t.browser&&!0===t.browser.isMobile?a="tap":n===r.Aw.Click&&(a="click");const s=e.content&&e.content.type,l=e.type||(0,c.Y)(s,i);0!==l&&(e.type=l),delete e.action,delete e.behavior,delete e.overrideId,delete e.overrideDestinationUrl,delete e.overrideEmailIdScrubbing;return this.createEvent("UserAction",{actionType:n,behavior:i,object:e,...t,gesture:a},o.zU.RealTime)}createEventPayload(e,t,n){if(!n)return;return this.createEvent(e,{...n,...t},o.zU.RealTime)}createCustomEventPayload(e,t,n){if(!n&&"AppError"!==e||(0,d.Z)(t))return;return this.createEvent(e,{...n,extSchema:t},o.zU.RealTime)}mapTelemetryObject(e){r.c9.ContentCard;let t;const n=e&&e.content&&e.content.type;(n||e.behavior)&&(t=(0,c.Y)(n,e.behavior));const i={n:e&&e.name,y:e&&e.type||t,l:e&&e.content&&e.content.id,h:e&&e.content&&e.content.headlineIdx,v:e&&e.content&&e.content.vertical,tp:e&&e.content&&e.content.topic,c:e&&e.content&&e.content.category,s:e&&e.content&&e.content.source,f:e&&e.feed&&e.feed.id,ct:e&&e.content&&e.content.type,i:e&&e.placement&&e.placement.id,p:e&&e.placement&&e.placement.parentId,o:e&&e.placement&&e.placement.ordinal,aud:e&&e.content&&e.content.audienceMode,isLocal:e&&e.content&&e.content.isLocal,subscriptionType:e&&e.content&&e.content.subscriptionType,providerType:e&&e.content&&e.content.providerType,zone:e&&e.zone,isMonetized:e&&e.isMonetized,isFeed:e&&e.isFeed};return e.ext&&(i.ext=e.ext),i}createEvent(e,t,n){let i=0;return!a.kP||this.enableBatchingForAllEvents||this.enableBatchingEventList[e]||(i=2),{name:s.id[e],data:t,baseType:s.id.Base,latency:n,sync:i}}}},87552:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});var i=n(90351),r=n(25514);const o={n:"name",t:"type",a:"action",b:"behavior",customHandled:"customHandled",d:"overrideDestinationUrl",oe:"overrideEmailIdScrubbing",z:"zone",ism:"isMonetized",isfeed:"isFeed",isci:"isCI","c.hi":"content.headlineIdx","c.auth":"content.author","c.i":"content.id","c.l":"content.isLocal","c.s":"content.source","c.p":"content.parentId","c.t":"content.type","c.tp":"content.topic","c.v":"content.vertical","c.c":"content.category","c.sc":"content.subcategory","c.pn":"content.partnerName","c.pi":"content.partnerId","c.b":"content.brand","c.bi":"content.brandId","c.st":"content.subscriptionType","c.pl.i":"content.placement.id","c.pl.p":"content.placement.parentId","c.pl.o":"content.placement.ordinal","c.pl.l":"content.placement.lineage","c.pl.lo":"content.placement.lineageOrdinal","c.aud":"content.audienceMode","c.pv":"content.providerType","f.i":"feed.id","f.n":"feed.name","f.t":"feed.type",ext:"ext","m.c":"metrics.isContentCI"};class a{static compress(e){const t={},n=Object.keys(o);for(let r=0;r<n.length;r++){const a=n[r],s=(0,i.Z)(e,o[a]);void 0!==s&&(t[a]=s)}const r=(0,i.Z)(e,"content.headline");return r&&(t["c.hl"]=r),t}static decompress(e){if(!e)return;const t={},n=Object.keys(o);for(let a=0;a<n.length;a++){const s=n[a],c=(0,i.Z)(e,s);void 0!==c&&(0,r.Z)(t,o[s],c)}return e["c.hl"]&&(0,r.Z)(t,"content.headline",e["c.hl"]),t}}},45927:function(e,t,n){"use strict";n.d(t,{u:function(){return d}});var i=n(70280),r=n(23549),o=n(72626),a=n(87552),s=n(78951),c=n(46728);class d{get combinedContract(){if(this.contract){const e=(this.contract.content=this.contract.content||{}).headline;this.contract.content.headline=e||(0,o.tH)(this.element)}return this.hasInheritedProperty?(0,c.Z)({},this.superContract,this.contract,this.internalContract):(0,c.Z)({},this.contract,this.internalContract)}get internalContract(){const{lineage:e,lineageOrdinal:t}=d.getLineage(this)||{},n=d.getInheritedProperties(this),i={placement:{id:this.id,lineage:e,lineageOrdinal:t},...n};return this.parentDOM&&this.parentDOM.id&&0!==this.parentDOM.id&&(i.placement.parentId=this.parentDOM.id,i.placement.ordinal=this.ordinal),i}constructor(e){this.hasInheritedProperty=!1,this.children=[],this.ordinal=0,this.ordinalCount=0,this.contract=e||{},this.ordinalCount=0,this.superContract={}}static addElement(e){if(!e)return;const t=this.parseContract(e);let n=this.get(e);if(n&&n.id?t&&(n.contract=t):(n=new d(t),n.id=this.generateId(),this.set(e,n)),!n)return;let r=e.parentElement;!r&&e.parentNode&&e.parentNode.host&&(r=e.parentNode.host);let a=r&&(0,o.pE)(r,`[${i.qP}]`),s=a&&this.get(a);return a&&!s&&((0,o.t0)("telemetrynodeadded",a),s=this.get(a)),n===s&&(a=a&&a.closest(`[${i.qP}]`),s=a&&this.get(a)),n&&(n.parentDOM=s&&s!==n?s:d.getRoot()),this.inheritProperty(n),this.needUpdate=!0,n}static inheritProperty(e){if(!r.M0||!r.M0.config||r.M0.config.inheritByTraversingDOM||!e||!e.contract)return;const t=e.parentDOM&&e.parentDOM.contract,n=e.parentDOM&&e.parentDOM.superContract,i=e.contract,o=e.superContract;r.M0.config.inheritExt&&(t&&t.ext||n&&n.ext)&&(e.hasInheritedProperty=!0,o.ext={...n&&n.ext,...t&&t.ext,...i.ext})}static isObject(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}static renderObject(e){return e.render()}static renderContract(e){return s.D.render(e)}static setAttribute(e,t,n){if(!e||!e.dataset)return;const r=this.renderContract(t||n&&n.contract);r&&(e.dataset.t=r[i.qP])}static get(e){const t=this.elementMap.get(e);if(!t)return t;const n=this.parseContract(e);return t&&n&&(t.contract=n),t}static getLineage(e,t=">",n=!1){try{if(e&&e.parentDOM&&e.parentDOM!==d.root){const i=this.getLineage(e.parentDOM,t,n),{lineage:r,lineageOrdinal:o}=i||{};return{lineage:r+t+e.contract.name,lineageOrdinal:(o?o+t:"")+e.ordinal}}return e&&e.parentDOM&&e.parentDOM===d.root&&n?{lineage:e.contract.name,lineageOrdinal:`${e.ordinal}`}:{lineage:e&&e.contract.name}}catch(t){if(r.M0&&r.M0.config&&r.M0.config.logElementForLineageFailure){const{id:t,tagName:n}=e&&e.element||{};r.M0.sendAppErrorEvent({id:20203,severity:1,message:"Error while parsing lineage",pb:{customMessage:JSON.stringify({elementId:t,elementTag:n})}})}}}static getInheritedProperties(e){if(!r.M0||!r.M0.config||!e)return;const{inheritByTraversingDOM:t=!1,inheritPropertyList:n=[],memoizeInheritedProperties:i}=r.M0.config,o=t&&n;return o?i?this.getInheritedPropertiesWithMemoize(e,o):this.getInheritedPropertiesWithoutMemoize(e,o):void 0}static getInheritedPropertiesWithoutMemoize(e,t){let n=e;const i={};for(;n&&n!==d.root;){for(const e of t){const t=n.contract&&n.contract[e];void 0!==t&&(void 0===i[e]?i[e]=t:this.isObject(i[e])&&(i[e]={...t,...i[e]}))}n=n.parentDOM}return i}static getInheritedPropertiesWithMemoize(e,t){if(e.memoizedProperties)return e.memoizedProperties;const n={};for(const i of t){n[i]=e.contract[i];let t=e&&e.parentDOM;for(;t&&t!==d.root;){const e=t.memoizedProperties?t.memoizedProperties[i]:t.contract[i];if(void 0!==e&&(void 0===n[i]?n[i]=e:this.isObject(n[i])&&(n[i]={...e,...n[i]})),t.memoizedProperties)break;t=t.parentDOM}}return e.memoizedProperties=n,n}static getRoot(){return d.root}static getTelemetryObject(e){const t=this.get(e);if(t&&t.contract)return new s.D(t.contract)}static parseContract(e){try{const t=e&&e.getAttribute&&e.getAttribute(i.qP);return t?this.parseAttribute(t):void 0}catch{}}static parseAttribute(e){try{const t=e&&JSON.parse(e);return this.parseMetadata(t)}catch{}}static parseMetadata(e){try{return e&&a.v.decompress(e)}catch{}}static set(e,t){t.element=e,this.elementMap.set(e,t)}static updateLayout(){if(!this.needUpdate)return;this.needUpdate=!1,this.root.ordinalCount=0;const e=(0,o.Ux)(document.documentElement);for(const t of e){let e=this.get(t);e&&e.parentDOM||((0,o.t0)("telemetrynodeadded",t),e=this.get(t)),e&&(e.ordinal=e.parentDOM?++e.parentDOM.ordinalCount:0,e.ordinalCount=0)}}static generateId(){return++this.lastId}}d.elementMap=new WeakMap,d.root=new d({name:"root"}),d.lastId=0,d.needUpdate=!1},19580:function(e,t,n){"use strict";n.d(t,{o:function(){return H}});var i=n(70280),r=n(95244),o=n(82898);var a=n(72626);class s{constructor(e,t){this.contentViewCallback=e,this.overrideScrollOffset=t,this.scrollChanged=!0,this.sizeChanged=!0,this.newScrollLeft=null,this.newScrollTop=null,this.firstScrolledMargin=10,this.forceScrollFiring=!1,this.viewportEventIntervalDelayMs=200,this.viewportLeft=0,this.viewportTop=0,this.viewportWidth=0,this.viewportHeight=0,this.userInteracted=!1,this.eventTimerId=0,this.eventTimeoutMS=1e3,this.scrollPerformanceTrackers={},this.syntheticTelemetryScrollCallback=(e,t)=>{e&&(this.userInteracted=!0,this.updateMechanism=i.NS.Scroll,this.scrollChanged=!0,this.triggerCallback(),t(e),this.forceScrollFiring=!0)},this.viewportOffset=0}initListener(e){const t=this.throttle(this.update.bind(this),this.viewportEventIntervalDelayMs);t(),this.scrollContainer=e,this.attachEvent("resize",(e=>{this.userInteracted=!0,this.updateMechanism=i.NS.Resize,this.sizeChanged=!0,this.triggerCallback(),t(e)})),this.attachEvent("scroll",(e=>{e&&!e.preventDefaultScroll&&(this.userInteracted=!0,this.updateMechanism=i.NS.Scroll,this.scrollChanged=!0,this.triggerCallback(),t(e))})),a.kP&&window.addEventListener("telemetryscroll",(e=>{this.syntheticTelemetryScrollCallback(e,t)}))}resetViewportOffset(){this.viewportOffset=this.overrideScrollOffset?this.overrideScrollOffset():(0,a.qC)(this.scrollContainer)}triggerCallback(){this.dispatchEvent("telemetryviewportupdated",this.updateMechanism)}dispatchEvent(e,t){const n=new CustomEvent(e,{detail:{mech:t}});dispatchEvent(n)}throttle(e,t=1e3){let n=0,i=!1;return r=>{if(i)return;const o=(new Date).getTime(),a=o-n;a>t?(n=o,e(r)):(i=!0,setTimeout((()=>{i=!1,e()}),t-a))}}update(e){let t=this.sizeChanged,n=this.scrollChanged;const i=this.viewportWidth,r=this.viewportHeight,o=this.viewportLeft,a=this.viewportTop;this.updateCurrentViewportValues(),t=t&&(r!==this.viewportHeight||i!==this.viewportWidth),n=n&&(o!==this.viewportLeft||a!==this.viewportTop),(this.forceScrollFiring||t||n)&&(this.scheduleViewportEvent(e),this.forceScrollFiring=!1)}updateCurrentViewportValues(){this.scrollChanged&&(this.viewportLeft=this.newScrollLeft||this.getScrollLeft(),this.viewportTop=this.newScrollTop||this.getScrollTop(),this.newScrollLeft=this.newScrollTop=null,!this.firstScroll&&this.viewportTop>this.firstScrolledMargin&&(this.firstScroll=!0)),this.sizeChanged&&(this.viewportWidth=window.innerWidth||document.documentElement.clientWidth,this.viewportHeight=window.innerHeight||document.documentElement.clientHeight),this.scrollChanged=this.sizeChanged=!1}scheduleViewportEvent(e){if(this.userInteracted&&(c(e)&&(this.lastScrollStarted||(this.lastScrollStarted=e&&e.timeStamp||performance.now()),this.scrollPerformanceTrackers.endOfFeedTimeTracker&&this.scrollPerformanceTrackers.endOfFeedTimeTracker.startOrContinue(e),this.scrollPerformanceTrackers.appResponsivenessTracker&&this.scrollPerformanceTrackers.appResponsivenessTracker.startOrContinue(e)),this.eventLastScheduleTime=+new Date,!this.eventTimerId)){const t=()=>{this.eventTimerId=this.userInteracted=!1;const n=Date.now()-this.eventLastScheduleTime;if(n>this.eventTimeoutMS)if(c(e)){const e=performance.now()-this.lastScrollStarted;let t,n,i;this.lastScrollStarted=void 0,this.scrollPerformanceTrackers.scrollInputTracker&&(t=this.scrollPerformanceTrackers.scrollInputTracker.getPendingPotentialInputType(),n=this.scrollPerformanceTrackers.scrollInputTracker.getAndResetPotentialMissedScrollInput(),i=this.scrollPerformanceTrackers.scrollInputTracker.getScrollInstanceData());const r={scrollInputType:t,potentialMissedScrollInput:n,scrollDuration:e,endOfFeedTime:this.scrollPerformanceTrackers.endOfFeedTimeTracker&&this.scrollPerformanceTrackers.endOfFeedTimeTracker.stop(),calculateAri:this.scrollPerformanceTrackers.appResponsivenessTracker&&this.scrollPerformanceTrackers.appResponsivenessTracker.stop(),scrollInstanceData:i};this.contentViewCallback(this.updateMechanism,this.isMeaningfulScroll(),r)}else this.contentViewCallback(this.updateMechanism,this.isMeaningfulScroll());else this.eventTimerId=setTimeout(t,this.eventTimeoutMS-n)};this.eventTimerId=setTimeout(t,this.eventTimeoutMS)}}isMeaningfulScroll(){if(this.updateMechanism!==i.NS.Scroll)return!1;const e=this.overrideScrollOffset?this.overrideScrollOffset():(0,a.qC)(this.scrollContainer),t=(0,a.P6)(this.scrollContainer);return(e>this.viewportOffset&&e-this.viewportOffset>t/2||e<this.viewportOffset&&this.viewportOffset-e>t/2)&&(this.viewportOffset=e,!0)}getScrollTop(){if(this.scrollContainer)return this.scrollContainer.scrollTop;if("undefined"!=typeof pageYOffset)return pageYOffset;{const e=document.body;let t=document.documentElement;return t=t.clientHeight?t:e,t.scrollTop}}getScrollLeft(){if(void 0!==window.pageXOffset)return window.pageXOffset;{const e=document.body;let t=document.documentElement;return t=t.clientWidth?t:e,t.scrollLeft}}attachEvent(e,t){window.addEventListener(e,t,!1),this.scrollContainer&&this.scrollContainer.addEventListener(e,t,!1)}initScrollPerformanceTrackers(e){const{endOfFeedTimeTracker:t,appResponsivenessTracker:n,scrollInputTracker:i}=e;t&&(this.scrollPerformanceTrackers.endOfFeedTimeTracker=t),n&&(this.scrollPerformanceTrackers.appResponsivenessTracker=n),i&&(this.scrollPerformanceTrackers.scrollInputTracker=i,i.start())}}function c(e){return e&&(e.type===i.NS.Scroll||"telemetryscroll"===e.type)}let d,l=new Promise((e=>d=e));const u=new Map;function p(){u.clear()}const h=e=>Math.floor(101*Math.random())<=e;var g=n(45555),m=n(45927);class f{constructor(){this.clickSearchDepth=20,this.contextMenuEventCallback=e=>{const t=this.getClickTarget(e);this.handleClickEvent(t,o.Aw.RightClick,o.wu.ContextMenu)},this.clickEventCallback=e=>{const t=this.getClickTarget(e);1===e.button?this.handleClickEvent(t,o.Aw.MiddleClick,o.wu.Navigate):this.handleClickEvent(t)},this.auxClickEventCallback=e=>{if(1===e.button){const t=this.getClickTarget(e);this.handleClickEvent(t,o.Aw.MiddleClick,o.wu.Navigate)}}}observe(e=window,t){e.addEventListener("click",this.clickEventCallback),e.addEventListener("auxclick",this.auxClickEventCallback),t||e.addEventListener("contextmenu",this.contextMenuEventCallback)}unobserve(e,t){e.removeEventListener("click",this.clickEventCallback),e.removeEventListener("auxclick",this.auxClickEventCallback),t||e.removeEventListener("contextmenu",this.contextMenuEventCallback)}handleClickEvent(e,t,n){const i=this.getTelemetryClickTarget(e);if(!i)return;i&&i.hasAttribute("data-customhandled")||this.dispatchEvent("telemetryclick",i,t,n)}dispatchEvent(e,t,n,i){const r=new CustomEvent(e,{detail:{element:t,action:n,behavior:i}});dispatchEvent(r)}getTelemetryClickTarget(e){let t=e;for(let e=0;e<this.clickSearchDepth&&t&&!this.validTarget(t);e++)t.assignedSlot?t=t.assignedSlot:t.parentElement?t=t.parentElement:t.parentNode&&t.parentNode.host&&(t=t.parentNode.host);if(this.validTarget(t))return t}getClickTarget(e){if(!e.composedPath||"function"!=typeof e.composedPath)return e.target;{const t=e.composedPath();if(t.length>2&&"hasAttribute"in t[0]&&!t[0].hasAttribute(i.qP)&&"[object ShadowRoot]"===Object.prototype.toString.call(t[1])&&"hasAttribute"in t[2]&&t[2].hasAttribute(i.qP))return t[2];if(t.length>0)return t[0]}}validTarget(e){const t=e instanceof Element;if(!e||!t)return!1;const n=m.u.get(e);let i;return i=n?n.contract:m.u.parseContract(e),"BUTTON"===e.nodeName||e.hasAttribute("href")||e.getAttribute&&"button"===e.getAttribute("role")||i&&i.type===o.c9.DropDown||i&&i.type===o.c9.ActionButton||i&&i.behavior&&e.tagName.includes("-")||e.form}}class v{static start(){this.startTime=Date.now(),this.isPause=!1,this.isPauseV2=!1,this.started=!0}static pause(){this.started&&!this.isPause&&(this.isPause=!0,this.dwellTimeElapse+=Date.now()-this.startTime)}static pauseV2(){this.started&&!this.isPauseV2&&(this.isPauseV2=!0,this.dwellTimeElapseV2+=Date.now()-this.startTime)}static getDwellTime(){if(this.isPause){return this.dwellTimeElapse}if(0!==this.startTime&&this.started){return this.dwellTimeElapse+(Date.now()-this.startTime)}return 0}static getDwellTimeV2(){if(this.isPauseV2){return this.dwellTimeElapseV2}if(0!==this.startTime&&this.started){return this.dwellTimeElapseV2+(Date.now()-this.startTime)}return 0}static setDwellTime(e,t){this.startTime=e,this.dwellTimeElapse=t}static reset(){this.dwellTimeElapse=0,this.dwellTimeElapseV2=0,this.startTime=0,this.isPause=!1,this.isPauseV2=!1,this.started=!1}static getIsActive(){return this.started&&!this.isPause}}v.started=!1,v.startTime=0,v.dwellTimeElapse=0,v.dwellTimeElapseV2=0,v.isPause=!1,v.isPauseV2=!1;class y{constructor(){this.filterNodeList=["script"],this.mutationObserver=new MutationObserver(this.mutationCallback.bind(this)),this.processAddedSubtreeAndDispatchEvent(document.documentElement);const e=HTMLElement.prototype.attachShadow;if(!e)return;const t=this;HTMLElement.prototype.attachShadow=function(n){const i=e.call(this,n);return this.shadowRoot&&t.observe(this.shadowRoot),i}}observe(e){e!==window&&this.mutationObserver.observe(e,{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-t"]})}unobserve(e){}mutationCallback(e){setTimeout((()=>{this.processMutationRecord(e)}),10)}processMutationRecord(e){for(let t=0;t<e.length;t++){const n=e[t],i=n.addedNodes;i&&i.length>0?this.processMutatedNodes(Array.from(i)):"attributes"===n.type&&this.processMutatedNodes([n.target])}}processMutatedNodes(e){e&&e.forEach((e=>{(0,a.He)(e)?this.processAddedSubtreeAndDispatchEvent(e):e.nodeType!==Node.ELEMENT_NODE||this.filterNodeList.includes(e.tagName&&e.tagName.toLowerCase())||this.processAddedSubtreeAndDispatchEvent(e)}))}processAddedSubtreeAndDispatchEvent(e){(0,a.jT)(e)&&(0,a.t0)("telemetrynodeadded",e);const t=this.processSubtree(e);for(let e=0;e<t.length;e++)(0,a.t0)("telemetrynodeadded",t[e])}processSubtree(e){if(!e)return;let t;return t=(0,a.He)(e)?e.shadowRoot.querySelectorAll("[data-t]"):e.querySelectorAll("[data-t]"),t}}var S=n(78951);class C{get requestId(){return this.requestIdInternal}get combinedContract(){this.eventIndexInternal=this.eventIndexInternal+1,this.tmplString=this.generateStringFromKeyValueObject(this.tmplProps);const e=this.joinIdProps&&Object.keys(this.joinIdProps).length>0?JSON.stringify(this.joinIdProps):void 0,t=Object.keys(this.customProps).length>0?JSON.stringify(this.customProps):void 0;this.customString=t;try{const e=window;void 0!==e&&e.navigator&&void 0!==typeof e.navigator.globalPrivacyControl&&(this.globalPrivacyControl=e.navigator.globalPrivacyControl)}catch{}const n={page:{...this.contract.page,url:(0,a.Mm)((0,a.XW)(this.contract.page.url,this.contract.page.ocid),this.qspToScrubbed),referral:(0,a.Mm)(this.contract.page.referral||a.kP&&document.referrer,this.qspToScrubbed),content:this.contract.page.content?{...this.contract.page.content}:void 0,dwellTime:v.getDwellTime(),dwellTimeV2:this.getDwellTimeV2(),viewType:this.contract.page.viewType||this.viewTypeCallback&&this.viewTypeCallback()},browser:{...this.contract.browser,width:(0,a.wi)(),height:(0,a.P6)(),screenSize:a.kP?[screen.width,screen.height].join("x"):"0x0",clientId:(0,a.i2)(this.activityIdInternal),scrollOffset:"function"==typeof this.overrideScrollOffset&&this.overrideScrollOffset()||(0,a.qC)(),anoncknm:this.anonCookieName,cookieEnabled:a.kP&&navigator.cookieEnabled,globalPrivacyControl:this.globalPrivacyControl,hiddenOnce:this.browserHiddenOnce,muid:(0,a.FL)()||void 0,cookies:(0,a.tV)(this.cookiesToCollect)||void 0},flight:{...this.contract.flight,tmpl:this.tmplString},integration:{...this.contract.integration,joinIds:e},request:{activityId:this.activityIdInternal,requestId:this.requestIdInternal,afdMuid:this.afdMuidInternal,pageGenTime:this.pageGenTime},timestamp:+Date.now(),eventIndex:this.eventIndexInternal,sdk:{name:"peregrine",ver:"1.0.19",schemaVer:"1.0.19"},user:this.contract.user,locale:this.contract.locale,feed:this.contract.feed,gallery:this.contract.gallery,custom:this.customString,build:this.buildNumber},i=(0,a.F$)();i&&(n.browser.isWin11=i);const r=(0,a.uV)();return r&&(n.browser.isXBox=r),this.isPvEvent&&(n.debug=this.contract.debug),n}constructor(e,t,n,i,r,o,s,c,d){this.eventIndexInternal=0,this.cookiesToCollect=["TOptOut","OptanonConsent","eupubconsent-v2","wid","app_wid"],this.qspToScrubbed=["tid","upn","q","user","username","email","login_hint"],this.isPvEvent=!1,this.contract=e,this.updateActivityId(t),this.anonCookieName=n,this.enableDwelltimeV2=c,this.buildNumber=i||"",this.afdMuidInternal=s,this.customProps={},this.tmplProps={},this.joinIdProps={},this.eventIndexInternal=0,this.browserHiddenOnce=!1,this.overrideScrollOffset=r,this.viewTypeCallback=o,this.pageGenTime=d,a.kP&&document.addEventListener("visibilitychange",this.browserVisibilityCallback.bind(this))}static mergeContract(e,t){if(!e||!t)return e||t;const n=Object.keys(t),i={...e};for(let e=0;e<n.length;e++){const r=n[e];i[r]={...i[r],...t[r]}}return e.page&&e.page.content&&t.page&&t.page.content&&(i.page.content={...e.page.content,...t.page.content}),e.user&&t.user&&(i.user={...e.user,...t.user}),i}update(e,t=!1){e&&(t?this.contract=C.mergeContract(this.contract,e):this.updatedContract=C.mergeContract(this.updatedContract,e))}updateActivityId(e){this.activityIdInternal=e;const t=this.contract&&this.contract.page&&this.contract.page.isStatic&&"true"===this.contract.page.isStatic.toString().toLowerCase()?(0,a.pW)():e;this.updateRequestId(t)}getEventIndexInternal(){return this.eventIndexInternal}updateRequestId(e,t){this.eventIndexInternal=t||0,this.requestIdInternal=e||(0,a.pW)()}updateAfdMuid(e){this.afdMuidInternal=e||""}updateContract(){this.contract=C.mergeContract(this.contract,this.updatedContract),delete this.updatedContract}addOrUpdateCustomProperty(e,t){this.customProps[e]=t}removeCustomProperty(e){e&&delete this.customProps[e]}addOrUpdateTmplProperty(e,t){this.tmplProps[e]=t}removeTmplProperty(e){delete this.tmplProps[e]}addOrUpdateJoinIdProperty(e,t){this.joinIdProps[e]=t}getJoinId(e){return this.joinIdProps[e]}updatePageConfiguration(e){this.update({page:{config:e}})}get JoinIdProps(){return this.joinIdProps}browserVisibilityCallback(){(document.hidden||"hidden"===document.visibilityState)&&(this.browserHiddenOnce=!0)}IsPvEvent(e){this.isPvEvent=e}generateStringFromKeyValueObject(e){const t=[];return e&&Object.keys(e).forEach((n=>{e[n]?t.push(n+":"+e[n]):t.push(n)})),t.length>0?t.join(";"):void 0}getDwellTimeV2(){if(this.enableDwelltimeV2)return v.getDwellTimeV2()}}var w=n(63165),b=n(3232),T=n(14590);class k{get disable(){return this.config.disable}set disable(e){this.config.disable=e}constructor(e){this.config=e}}var P=n(56921),I=n(13578);class A extends k{constructor(e){super(e),this.transporterReady=!1,setTimeout((()=>{this.collectorChannelPlugin=new b.Z,this.appInsightsCore=new w.Z;const t=new T.Z,n={populateBrowserInfo:!1,populateOperatingSystemInfo:!1,enableApplicationInsightsTrace:!1,enableDistributedTracing:!0,enableApplicationInsightsUser:!1,sessionRenewalMs:18e5,sessionExpirationMs:18e5,userConsentCookieName:"OptanonAlertBoxClosed"},i={instrumentationKey:e.key,channels:[[this.collectorChannelPlugin]],extensionConfig:[t],disablePageUnloadEvents:["visibilitychange"]},r=[];if(a.kP||(i.extensionConfig[this.collectorChannelPlugin.identifier]={httpXHROverride:{sendPOST:(t,n,i)=>{delete t.headers["cache-control"],delete t.headers["content-type"];const r={method:"POST",credentials:"include",body:t.data,headers:t.headers};t.data.length>64e3?this.sendRequest(e,t.urlString,r).then((e=>{n(e.status)})).catch((e=>{n(0,{})})):(this.sendRequest(e,t.urlString,{...r,keepalive:!0}).then((e=>{})).catch((e=>{})),n(200,{}))}}}),e.addNoResponse){const e={addNoResponse:!1};i.extensionConfig[this.collectorChannelPlugin.identifier]=e}if(a.kP&&(i.extensionConfig[t.identifier]=n,r.push(t)),e&&e.anonCookieName&&(i.anonCookieName=e.anonCookieName),e.endpoint&&(i.endpointUrl=e.endpoint),this.appInsightsCore.initialize(i,r),e&&e.enableTraceGenerator)try{P.U.getTraceInstance().setTraceObj(this.appInsightsCore)}catch{}this.transporterReady=!0}),100)}sendRequest(e,t,n){return e.abortableFetch?e.abortableFetch(t,e.timeout??1e3,n,void 0,void 0,void 0,!0):fetch(t,n)}transport(e,t=!0,n=0){!e||(0,I.Z)(e)||this.config.disable||(this.transporterReady&&this.appInsightsCore&&this.appInsightsCore.isInitialized&&this.appInsightsCore.isInitialized()&&this.collectorChannelPlugin&&this.collectorChannelPlugin.isInitialized&&this.collectorChannelPlugin.isInitialized()?this.appInsightsCore.track(e):n<50&&setTimeout((()=>this.transport(e,t,n+1)),200))}}class E extends k{constructor(e){super(e)}transport(e){if(!e||!this.config.endpoint||this.config.disable)return;const t=this.generateUrl(this.config.endpoint+"?",e);this.generatePixelBeacon(t)}generatePixelBeacon(e){(new Image).src=e.replace(/&amp;/gi,"&")}generateUrl(e,t){const n=[];let i=e;return Object.keys(t).forEach((e=>{let i=t[e];"object"==typeof i&&i&&(i=JSON.stringify(i)),n.push(this.encodeURIComponent(e)+"="+this.encodeURIComponent(i))})),i=e+n.join("&").replace(/%20/g,"+"),i}encodeURIComponent(e){return null!=e&&encodeURIComponent(e)||""}}let x=null,M={};class L extends k{constructor(e){super(e),x=e&&e.callbackData?e.callbackData.callback:null,M=e&&e.callbackData?e.callbackData.data:null}transport(e){if(!e||this.config.disable)return;let t;try{t=this.flattenObj(e),t.isCoreView=!0,t.platform="app",M&&(t["browser.muid"]=M)}catch(e){return void window.console.error("Error occured while flatterning telemetry payload :",e)}e.name&&x({type:e.eventType,name:e.name,app_id:"0067acd6d05f4168b92f510d33b9ed74",data:{oneds:t}})}flattenObj(e){const t={},n=(e,i)=>{Object.keys(e).forEach((r=>{let o="";o=""===i?`${r}`:`${i}.${r}`,"object"==typeof e[r]&&e[r]?n(e[r],o):t[this.formatKey(o)]=e[r]}))};return n(e,""),t}formatKey(e){return e?"eventType"===e?"type":e.startsWith("data.")?e.substring(5,e.length):e:e}}var D=n(60844);class R extends k{constructor(e){super(e)}transport(e){e&&!this.config.disable&&this.config.callback(e)}}var F=n(62433),O=n(67103),B=n(65004),N=n(30676);class $ extends O.k{createEvent(e,t,n,i=0){return{name:this.getSuperAppOneDSEventName(g.id[e]),eventType:this.getSuperAppOneDSEventType(g.id[e]),data:t,baseType:g.id.Base,latency:n,sync:i}}createContentViewPayload(e,t,n){if(!t)return;const r=[];e.forEach((e=>{r.push(this.mapTelemetryObject(e))}));let o;(0,a.d5)()&&(o={content:{docHeight:(0,a.d5)()}});let s=null;try{s=JSON.stringify(r)}catch(e){s=r}const c={...t,...o,object:s,contentViewType:n.contentViewType};if(n.contentViewType===i.NS.Scroll&&(c.isMeaningfulScroll=n.isMeaningfulScroll),!(0,I.Z)(r)){return this.createEvent("ContentView",c,B.zU.RealTime)}}mapTelemetryObject(e){let t;const n=e&&e.content&&e.content.type;(n||e.behavior)&&(t=(0,N.Y)(n,e.behavior));const i={...e};return delete i.action,delete i.behavior,delete i.overrideId,i}getSuperAppOneDSEventType(e){switch(e){case g.id.PageView:return"Microsoft.Windows.MsnApps.PageView";case g.id.UserAction:return"Microsoft.Windows.MsnApps.PageAction";case g.id.AppError:return"Microsoft.Windows.MsnApps.Failure";case g.id.AppPerfTrace:return"Microsoft.Windows.MsnApps.ClientPerf";case g.id.ContentView:return"Microsoft.Windows.MsnApps.ContentView";case g.id.LoadTime:case g.id.Unload:return"Microsoft.Windows.MsnApps.AppLifeCycle";case g.id.VideoPlay:return"Microsoft.Windows.MsnApps.VideoPlay";case g.id.TraceInfo:return"Microsoft.Windows.MsnApps.TraceInfo";default:return null}}getSuperAppOneDSEventName(e){switch(e){case g.id.PageView:return"PAGE_VIEW_HP_WEBVIEW";case g.id.UserAction:return"PAGE_ACTION_HP_WEBVIEW_CLICK";case g.id.AppError:return"HP_WEBVIEW_APP_ERROR";case g.id.AdFeedback:return"PAGE_ACTION_HP_WEBVIEW_AD_FEEDBACK";case g.id.AdImpression:return"HP_WEBVIEW_AD_IMPRESSION";case g.id.AppPerfTrace:return"HP_WEBVIEW_APP_PERF_TRACE";case g.id.Base:return"PAGE_VIEW_HP_WEBVIEW_BASE";case g.id.ContentView:return"CONTENT_VIEW_HP_WEBVIEW";case g.id.Feedback:return"PAGE_ACTION_HP_WEBVIEW_FEEDBACK";case g.id.LoadTime:return"HP_WEBVIEW_LOAD_TIME";case g.id.ServerLog:return"HP_WEBVIEW_SERVER_LOG";case g.id.Unload:return"HP_WEBVIEW_UNLOAD";case g.id.VideoAdPlay:return"CONTENT_VIEW_HP_WEBVIEW_VIDEO_AD";case g.id.VideoPlay:return"CONTENT_VIEW_HP_WEBVIEW_VIDEO";case g.id.TraceInfo:return"DIAGNOSTIC_HP_WEBVIEW_TRACEINFO";default:return e}}}class U{static getTrackingSystem(e,t){switch(e.type){case r.G.OneDS:return{transporter:new A(e.transporterConfig),mapper:new O.k(e.transporterConfig.enableEventsBatching),type:e.type};case r.G.CTag:return{transporter:new E(e.transporterConfig),mapper:new D.P,type:e.type};case r.G.Comscore:return{transporter:new E(e.transporterConfig),mapper:new F.O,type:e.type};case r.G.Debug:return{transporter:new R(e.transporterConfig),mapper:e.mapper,type:e.type};case r.G.SuperApp:return{transporter:new L(e.transporterConfig),mapper:new $,type:e.type};default:return{transporter:new A(e.transporterConfig),mapper:new O.k,type:e.type}}}}class _{constructor(){this.trackingSystems=[]}add(e){this.trackingSystems.push(e)}sendPageViewEvent(e,t=r.G.All){this.trackingSystems.forEach((n=>{if((t===r.G.All||t===n.type)&&n.mapper.createPageViewPayload){const t=n.mapper.createPageViewPayload(e);n.transporter.transport(t)}}))}sendContentViewEvent(e,t,n={contentViewType:i.NS.Partial}){this.trackingSystems.forEach((i=>{if(i.mapper.createContentViewPayload){const r=i.mapper.createContentViewPayload(e,t,n);i.transporter.transport(r)}}))}sendActionEvent(e,t,n,i){this.trackingSystems.forEach((r=>{if(r.mapper.createActionPayload){const o=r.mapper.createActionPayload(e,t,n,i);r.transporter.transport(o)}}))}sendEventPayload(e,t,n){this.trackingSystems.forEach((i=>{if(i.mapper.createCustomEventPayload){const r=i.mapper.createEventPayload(e,t,n);i.transporter.transport(r)}}))}sendCustomEvent(e,t,n){this.trackingSystems.forEach((i=>{if(i.mapper.createCustomEventPayload){const r=i.mapper.createCustomEventPayload(e,t,n);i.transporter.transport(r)}}))}disable(e=r.G.All){this.trackingSystems.forEach((t=>{e!==r.G.All&&e!==t.type||(t.transporter.disable=!0)}))}enable(e=r.G.All){this.trackingSystems.forEach((t=>{e!==r.G.All&&e!==t.type||(t.transporter.disable=!1)}))}}a.kP&&function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}}();class H{constructor(e){this.internalErrors=[],this.eventQueue=[],this.contentUpdateQueue=new Set,this.partialContentUpdateQueue=new Set,this.contentViewTriggerSource=i.NS.Load,this.contentViewTimeout=1e3,this.contentViewTimer=null,this.contentViewDelay=200,this.scheduledContentViewType=null,this.contentViewTimePassed=0,this.contentViewLastExecution=0,this.contentUpdateDebugQueue=new Set,this.intersectionObserverOptions={root:null,rootMargin:"0px",threshold:0},this.traceIdIndex=-1,this.maxScrollLoadTimeEvents=10,this.contentViewBeaconSent=!1,this.pageViewBeaconSent=!1,this.yieldElementsCount=20,this.batchSendScrollLoadTimeEvent=({scrollInputType:e,scrollDuration:t,endOfFeedTime:n,potentialMissedScrollInput:i,calculateAri:r,scrollInstanceData:o})=>{if(this.scrollLoadTimeEventsBatcher)this.scrollLoadTimeEventsBatcher.defer();else{const e=e=>{let t,n,i,r,a=0;if(e.forEach((e=>{null!=e.eoft&&(t=(t||0)+e.eoft),null!=e.ari&&e.duration&&(n=(n||0)+e.ari*e.duration),e.duration&&(a+=e.duration),e.inputType&&(i||(i={}),i[e.inputType]=(i[e.inputType]||0)+1),!r&&e.potentialMissedScrollInput&&(r=e.potentialMissedScrollInput)})),a<=0||null==t&&null==n)return;const s={scrollDuration:Math.round(a)};i&&(s.scrollInputs=i),r&&(s.potentialMissedScrollInput=r),null!=t&&(s.scrollEoft=Math.round(t/a*1e4)),null!=n&&(s.scrollAri=Math.round(n/a*1e4)),o&&o.length&&(s.scrollInstanceData=[...o],o.length=0),this.sendLoadTimeEvent({markers:s})};this.scrollLoadTimeEventsBatcher=function(e,t){const{autoFlushIntervalInMs:n,maxFlushes:i}={...t};let r,o=[],a=0;const s=()=>{(null==i||a<i)&&(a++,o.length&&(e(o),o=[]))},c=()=>{n&&(r&&clearTimeout(r),r=setTimeout(s,n))};return{enqueue:e=>{o.push(e),c()},flush:s,defer:c}}(e,{maxFlushes:this.maxScrollLoadTimeEvents}),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&this.scrollLoadTimeEventsBatcher.flush()})),window.addEventListener("beforeunload",(()=>this.scrollLoadTimeEventsBatcher.flush())),this.subscribeToAppHidden&&this.subscribeToAppHidden((()=>this.scrollLoadTimeEventsBatcher.flush()))}const a=r&&r();this.scrollLoadTimeEventsBatcher.enqueue({eoft:n,ari:a,duration:t,inputType:e,potentialMissedScrollInput:i})};try{this.config=e,this.config.autoCaptureContentView=void 0===e.autoCaptureContentView||e.autoCaptureContentView,this.config.beacons=e.beacons||{},this.config.beacons.PageOutOfFocus=this.config.beacons.PageOutOfFocus||{},this.config.beacons.PageOutOfFocus.disable=void 0===this.config.beacons.PageOutOfFocus.disable||this.config.beacons.PageOutOfFocus.disable,a.kP&&(this.config.disableLayoutEventManager||(this.layoutEventManager=new y,this.layoutEventManager.observe(document.documentElement)),this.clickEventManager=new f,e.hydrationPromise&&e.hydrationPromise instanceof Promise?this.config.hydrationPromise.then((()=>{this.clickEventManager.observe(window,this.config.disableContextMenu)})):this.clickEventManager.observe(window,this.config.disableContextMenu),window.addEventListener("beforeunload",this.unloadEventCallback.bind(this)),window.addEventListener("telemetrynodeadded",(e=>{e&&e.detail&&e.detail.element&&this.viewportIntersectionObserver&&(m.u.addElement(e.detail.element),this.viewportIntersectionObserver.observe(e.detail.element))})),window.addEventListener("telemetrynodremoved",(e=>{e&&e.detail&&e.detail.element&&this.viewportIntersectionObserver&&this.viewportIntersectionObserver.unobserve(e.detail.element)})),window.addEventListener("telemetryclick",this.clickEventHandler.bind(this)),window.addEventListener("focus",this.onFocusCallback.bind(this)),window.addEventListener("blur",this.onBlurCallback.bind(this))),this.trackingSystemList=new _,e.trackingSystems.forEach((t=>{t.transporterConfig.abortableFetch=e.abortableFetch,t.transporterConfig.anonCookieName=e.anonCookieName,t.transporterConfig.addNoResponse=e.addNoResponse,t.transporterConfig.enableTraceGenerator=e.enableTraceGenerator,t.transporterConfig.enableEventsBatching=e.enableEventsBatching,t.transporterConfig.timeout=e.timeout,this.trackingSystemList.add(U.getTrackingSystem(t))}))}catch(e){this.internalErrors.push({message:"Error in Telemetry Lib constructor.",error:e})}}getTrackingSystemList(){return this.trackingSystemList}setContentViewTimeout(e){this.contentViewTimeout=e}resetContentViewTimeout(){this.contentViewTimeout=g.S8}renderTelemetryAttribute(e,t,n){return new S.D(e).render(t)}observeSingleElement(e){}observeElementTree(e){}observeShadowRoot(e){var t;null===(t=this.layoutEventManager)||void 0===t||t.observe(e)}initPage(e,t,i,r,o){this.pageMetadata=new C(e,t,this.config.anonCookieName,i,this.config.overrideScrollOffset,this.config.viewTypeCallback,r,this.config.enableDwelltimeV2,o),a.kP&&("IntersectionObserver"in n.g&&(this.viewportIntersectionObserver=new IntersectionObserver(this.contentVisibilityCallback.bind(this),this.intersectionObserverOptions),this.contentVisibilityCallbackPromise=(0,a.xI)()),this.runContentVisibilityCallbacksPromise=this.config.deferContentViewIntersectionCallbacks?(0,a.xI)():(0,a.xI)(!0),this.viewportEventManager=new s(((e,t,n)=>{this.config.autoCaptureContentView&&(this.autoSendContentViewEvent({contentViewType:e,isMeaningfulScroll:t}),n&&(null!=n.endOfFeedTime||n.calculateAri)&&this.batchSendScrollLoadTimeEvent(n))}),this.config.overrideScrollOffset),window.addEventListener("telemetryviewportupdated",(e=>{e&&e.detail&&e.detail.mech&&(this.contentViewTriggerSource=e.detail.mech)})),this.viewportEventManager.initListener())}sendPageView(e=null,t=!1,n=null,o=r.G.All,s=!1){this.queueEvent("PageView",(()=>{this.config.beacons&&this.config.beacons.PageView&&this.config.beacons.PageView.disable||!this.pageMetadata||(this.config.resetAppErrorCounterOnPageView&&p(),e=e||{},(0,a.lB)(e),this.contentLoaded=!1,this.config.disableAutoCalculateDwellTime||v.reset(),this.pageMetadata.update(e),n?this.pageMetadata.updateActivityId(n):t||this.updateRequestId(),this.pageMetadata.updateContract(),this.viewportEventManager.resetViewportOffset(),this.updatePageMetadata({page:{isMonetized:!1}},!0),this.pageMetadata.IsPvEvent(!0),this.trackingSystemList.sendPageViewEvent(this.pageMetadata.combinedContract,o),this.pageMetadata.IsPvEvent(!1),this.pageViewBeaconSent=!0,!s||o!==r.G.All&&o!==r.G.Comscore||fetch(g.EE),t||(this.contentViewTriggerSource=i.NS.Load,setTimeout((()=>{this.autoSendContentViewEvent({contentViewType:i.NS.Load})}),1e3)),this.dispatchEvent(i.tM,{requestId:this.pageMetadata.requestId}))}))}getRequestId(){return this.pageMetadata.requestId}getCurrentEventIndex(){return this.pageMetadata.getEventIndexInternal()}updateRequestId(e,t){this.pageMetadata.updateRequestId(e,t)}disableTrackingSystem(e=r.G.All){this.trackingSystemList.disable(e)}enableTrackingSystem(e=r.G.All){this.trackingSystemList.enable(e)}disableBeacon(e){this.config.beacons[e]||(this.config.beacons[e]={}),this.config.beacons[e].disable=!0}enableBeacon(e){this.config.beacons[e]||(this.config.beacons[e]={}),this.config.beacons[e].disable=!1}disableAutoUnloadCallback(){this.ignoreAutoUnloadCallback=!0}enableAutoUnloadCallback(){this.ignoreAutoUnloadCallback=!1}updatePageConfiguration(...e){let t;e.forEach((e=>{t|=e})),this.pageMetadata.updatePageConfiguration(t)}updatePageMetadata(e,t=!1){e&&this.pageMetadata.update(e,t)}addOrUpdateCustomProperty(e,t){this.pageMetadata.addOrUpdateCustomProperty(e,t)}removeCustomProperty(e){this.pageMetadata.removeCustomProperty(e)}addOrUpdateJoinIdProperty(e,t){this.pageMetadata.addOrUpdateJoinIdProperty(e,t)}addOrUpdateTmplProperty(e,t){this.pageMetadata.addOrUpdateTmplProperty(e,t)}removeTmplProperty(e){this.pageMetadata.removeTmplProperty(e)}addOrUpdateTmplString(e){if(!e)return;const t=e.split(";");for(let e=0;e<t.length;e++){const n=t[e].split(":");2===n.length?this.addOrUpdateTmplProperty(n[0],n[1]):1===n.length&&this.addOrUpdateTmplProperty(n[0])}}removeTmplString(e){if(!e)return;const t=e.split(";");for(let e=0;e<t.length;e++){const n=t[e].split(":");n&&n.length&&this.pageMetadata.removeTmplProperty(n[0])}}addOrUpdateIdxId(e,t){if(e){t&&(delete this.pageMetadata.JoinIdProps[i.ob],this.traceIdIndex=-1);const n=this.pageMetadata.getJoinId(i.ob),r=n?`${n},${e}`:e;return this.pageMetadata.addOrUpdateJoinIdProperty(i.ob,r),this.traceIdIndex+=1,this.traceIdIndex}}sendActionEvent(e,t,n,r,s){this.queueEvent("UserAction",(()=>{if(!(this.config.beacons&&this.config.beacons.UserAction&&this.config.beacons.UserAction.disable)&&this.pageMetadata&&e){const c=e;m.u.updateLayout();const d=this.clickEventManager.getTelemetryClickTarget(e);let l;d&&(e=d),l=e.getAttribute&&e.getAttribute(i.qP),e.parentElement&&!l&&(l=(e=e.parentElement).getAttribute&&e.getAttribute(i.qP));let u=m.u.get(e);if(!u){const e=m.u.parseAttribute(l);e&&(u=new m.u(e))}if(this.pageMetadata&&u){s&&((0,a.Vr)(c,this.pageMetadata.contract.page.ocid),(0,a.Zf)(c,this.pageMetadata.contract.page.partnerTrackingCode),(0,a.uK)(c,this.pageMetadata.requestId),(0,a.wC)(c,this.pageMetadata.getEventIndexInternal()+1)),this.config.destinationUrlHash&&(0,a.t_)(c,this.config.destinationUrlHash);const i=e.getAttribute("action")||e.form&&e.form.getAttribute("action"),d=t||u.contract.action,l=void 0===n?u.contract.behavior:n,p=u.contract.overrideDestinationUrl||(0,a.jv)(r)&&r||e.getAttribute("href")||i;if(p&&!p.startsWith("mailto:")?!0===u.contract.overrideEmailIdScrubbing||(0,a.uj)(p)?u.contract.destinationUrl=p:(u.contract.destinationUrl="",this.sendAppErrorEvent({id:54301,severity:0,message:"Email found in the destination url",pb:u.combinedContract})):u.contract.destinationUrl="",d===o.Aw.RightClick&&l===o.wu.ContextMenu&&!(u&&u.contract&&u.contract.destinationUrl))return;this.trackingSystemList.sendActionEvent(u.combinedContract,this.pageMetadata.combinedContract,null==d?o.Aw.Click:d,null==l?o.wu.Navigate:l),u.contract&&u.contract.triggerPageView&&l===o.wu.Navigate&&this.sendPageView(null,!1)}}}))}scheduleContentViewEvent(e=i.NS.Partial,t){if(!a.kP)return;const n=(new Date).getTime();this.contentViewTimePassed=n-this.contentViewLastExecution,this.contentViewTimePassed<=this.contentViewDelay&&e!==i.NS.Partial||(this.contentViewLastExecution=n,this.contentViewTimer&&this.scheduledContentViewType===e&&window.clearTimeout(this.contentViewTimer),this.contentViewTimer=window.setTimeout((()=>this.autoSendContentViewEvent({contentViewType:e})),t||this.contentViewTimeout),this.scheduledContentViewType=e)}sendContentViewEvent(e,t=i.NS.Partial,n=!0){this.queueEvent("ContentView",(()=>{if(this.config.beacons&&this.config.beacons.ContentView&&this.config.beacons.ContentView.disable||!this.pageMetadata)return;m.u.updateLayout();const i=(0,a.Ux)(e),r=[];if(i&&i.length>0){for(let e=0;e<i.length;e++){const t=i[e],o=m.u.get(t);o&&(!n||this.contentUpdateQueue.has(t)||this.partialContentUpdateQueue.has(t))&&(this.setIsMonetizedFlag(o.combinedContract),r.push(o.combinedContract))}this.trackingSystemList.sendContentViewEvent(r,this.pageMetadata.combinedContract,{contentViewType:t})}this.contentLoaded||(this.contentLoaded=!0,this.pageMetadata.addOrUpdateTmplProperty("dwellTimeContentLoaded","true"),this.startAutoDwellTime())}))}sendAppErrorEvent(e,t=!0){if(!this.config.ignoreAppErrorCounter&&function(e){if(!e||!e.id)return!0;u.has(e.id)||u.set(e.id,0);const t=u.get(e.id)+1;return u.set(e.id,t),3===e.severity&&t>25||3!==e.severity&&t>10}(e))return console.error(JSON.stringify(e)),void console.error(`App errors throttled for Id: ${e.id}`);if(!function(e){const{pb:t,severity:n=1}=e;return 3===n||(!(t&&t.shouldSupressWarnings)||1!==n)}(e))return console.error(JSON.stringify(e)),void console.error(`This App error Id: ${e.id} will not be sent!`);if(!function(e){if(!e)return!1;const{pb:t,severity:n=1}=e;if(t&&t.shouldSampleErrorsForTreatement1)switch(n){case 0:return h(10);case 1:return h(1);default:return!0}if(t&&t.shouldSampleErrorsForTreatement2)switch(n){case 0:return h(10);case 1:return h(1);case 2:return h(50);default:return!0}return!0}(e)&&!this.config.shouldNotSampleErrors)return console.error(JSON.stringify(e)),void console.error(`This App error Id: ${e.id} will not be sent due to app error sampling!`);if(!(this.config.beacons&&this.config.beacons.AppError&&this.config.beacons.AppError.disable)&&this.pageMetadata)if(function(e){const{pb:t,severity:n=1}=e;return 3!==n&&!(!t||!t.shouldDelayUntilLoadTime)}(e)){const n={...e,pb:{...e.pb,delayed:1}};l.then((()=>{this.queueAppErrorEvent(n,t)}))}else this.queueAppErrorEvent(e,t)}sendLoadTimeEvent(e){const t=this.config.enableCustomDiagnostic?"LoadTimeDiag":"LoadTime";this.sendEvent(t,e),d()}sendFeedbackEvent(e){this.sendEvent("Feedback",e)}sendAdImpressionEvent(e){this.sendEvent("AdImpression",e)}sendAdFeedbackEvent(e){this.sendEvent("AdFeedback",e)}sendVideoPlayEvent(e,t,n=!1){if(this.config.beacons&&this.config.beacons.VideoPlay&&this.config.beacons.VideoPlay.disable)return;const i=n?"VideoAdPlay":"VideoPlay";t&&m.u.updateLayout();const r=t?m.u.get(t):void 0,o=r?r.combinedContract:{};if(e){const t={...o,...e};this.trackingSystemList.sendEventPayload(i,{object:t},this.pageMetadata.combinedContract)}else t&&this.pageMetadata&&r&&this.trackingSystemList.sendEventPayload(i,{object:o},this.pageMetadata.combinedContract)}sendGamePlayEvent(e,t){if(!(this.config.beacons&&this.config.beacons.GamePlay&&this.config.beacons.GamePlay.disable))if(e)this.trackingSystemList.sendEventPayload("GamePlay",{object:e},this.pageMetadata.combinedContract);else if(t){m.u.updateLayout();const e=m.u.get(t);this.pageMetadata&&e&&this.trackingSystemList.sendEventPayload("GamePlay",{object:e.combinedContract},this.pageMetadata.combinedContract)}}sendAudioPlayEvent(e,t){if(!(this.config.beacons&&this.config.beacons.AudioPlay&&this.config.beacons.AudioPlay.disable))if(e)this.trackingSystemList.sendEventPayload("AudioPlay",{object:e},this.pageMetadata.combinedContract);else if(t){m.u.updateLayout();const e=m.u.get(t);this.pageMetadata&&e&&this.trackingSystemList.sendEventPayload("AudioPlay",{object:e.combinedContract},this.pageMetadata.combinedContract)}}sendServerLogEvent(e){this.sendEvent("ServerLog",e)}sendAppPerfTraceEvent(e){this.sendEvent("AppPerfTrace",e)}sendAuthEvent(e){this.sendEvent("Auth",e)}sendHeartBeatEvent(e){this.sendEvent("HeartBeat",e)}sendClientLogEvent(e){this.config.enableSendClientLogEvent&&this.sendEvent("ClientLog",e)}sendPageOutOfFocusEvent(e){this.queueEvent("PageOutOfFocus",(()=>{this.config.beacons&&this.config.beacons.PageOutOfFocus&&this.config.beacons.PageOutOfFocus.disable||!this.pageMetadata||this.trackingSystemList.sendEventPayload("PageOutOfFocus",null,this.pageMetadata.combinedContract)}))}sendUnloadEvent(){this.queueEvent("Unload",(()=>{this.config.beacons&&this.config.beacons.Unload&&this.config.beacons.Unload.disable||!this.pageMetadata||this.trackingSystemList.sendEventPayload("Unload",null,this.pageMetadata.combinedContract)}))}sendTraceInfoEvent(e){this.queueEvent("TraceInfo",(()=>{this.config.beacons&&this.config.beacons.TraceInfo&&this.config.beacons.TraceInfo.disable||!this.pageMetadata||this.sendEvent("TraceInfo",e)}))}getPageMetadata(){return this.pageMetadata}flush(e=!0,t,n){const i=e=>!(t&&t!==e.eventType||n&&n===e.eventType);for(const e of this.eventQueue)"function"==typeof e.callback&&i(e)&&e.callback();this.eventQueue=this.eventQueue.filter((e=>!i(e))),this.config.useEventQueue=!e}empty(){this.eventQueue=[]}enableEventQueue(){this.config.useEventQueue=!0}disableEventQueue(){this.config.useEventQueue=!1}addEventTypeToForceQueueList(e){this.config.forceUseEventQueueList||(this.config.forceUseEventQueueList=[]),this.config.forceUseEventQueueList.push(e)}removeEventTypeFromForceQueueList(e){this.config.forceUseEventQueueList&&(this.config.forceUseEventQueueList=this.config.forceUseEventQueueList.filter((t=>t!==e)))}startDwellTime(){v.start()}pauseDwellTime(){v.pause()}pauseDwellTimeV2(){v.pauseV2()}resetDwellTime(){v.reset()}isDwellTimeActive(){return v.getIsActive()}setDwellTime(e,t){v.setDwellTime(e,t)}getDwellTime(){return v.getDwellTime()}clickEventHandler(e){if(e&&e.detail&&e.detail.element&&this.pageMetadata){const t=e.detail.element;this.sendActionEvent(t,e.detail.action,e.detail.behavior,void 0,!0),t.attributes&&t.attributes.href&&t.attributes.href.value&&t.attributes.href.value.startsWith&&"function"==typeof t.attributes.href.value.startsWith&&t.attributes.href.value.startsWith("mailto:")&&(this.ignoreUnload=!0)}}queueAppErrorEvent(e,t=!0){var n,r;let o="AppError";!this.config.enableCustomDiagnostic||null!==(n=(r=this.config).shouldAppErrorEscapeCustomDiagnostic)&&void 0!==n&&n.call(r,e)||(o="AppErrorDiag"),this.queueEvent(o,(()=>{if(this.trackingSystemList.sendCustomEvent(o,e,this.pageMetadata.combinedContract),t){const t=new Date+": "+ +new Date+" "+JSON.stringify(e);console.error(t)}this.dispatchEvent(i.tW,{error:e})}))}unloadEventCallback(){this.ignoreAutoUnloadCallback||this.config.beacons&&this.config.beacons.Unload&&this.config.beacons.Unload.disable||(this.pageMetadata&&!this.ignoreUnload&&this.sendUnloadEvent(),this.ignoreUnload=!1)}setIsMonetizedFlag(e){e&&e.isMonetized&&this.updatePageMetadata({page:{isMonetized:!0}},!0)}autoSendContentViewEvent(e){this.queueEvent("ContentView",(()=>{if(this.pageMetadata){let t;if(m.u.updateLayout(),e.contentViewType!==i.NS.Partial&&this.contentUpdateQueue&&this.contentUpdateQueue.size>0?t=this.contentUpdateQueue:this.partialContentUpdateQueue&&this.partialContentUpdateQueue.size>0&&(t=this.partialContentUpdateQueue),t){const n=[...t].map((t=>{const n=m.u.get(t);if(n&&(e.contentViewType!==i.NS.Partial||!n.isCaptured))return n.isCaptured=!0,this.setIsMonetizedFlag(n.combinedContract),n.combinedContract})).filter((e=>e));this.trackingSystemList.sendContentViewEvent(n,this.pageMetadata.combinedContract,e),this.contentViewBeaconSent=!0,this.partialContentUpdateQueue.clear(),this.contentViewTriggerSource=null}this.contentLoaded||(this.contentLoaded=!0,this.pageMetadata.addOrUpdateTmplProperty("dwellTimeContentLoaded","true"),this.startAutoDwellTime())}}))}runContentVisibilityCallbacks(){var e;null===(e=this.runContentVisibilityCallbacksPromise)||void 0===e||e.resolve()}yieldAsync(){return new Promise((e=>setTimeout(e,0)))}contentVisibilityCallback(e){var t;const n=async t=>{for(let n=0;n<e.length;n++){t&&n>0&&n%this.yieldElementsCount==0&&await this.yieldAsync();const i=e[n];i.isIntersecting?(this.contentUpdateQueue.add(i.target),this.contentViewTriggerSource||this.partialContentUpdateQueue.add(i.target)):(this.contentUpdateQueue.delete(i.target),this.partialContentUpdateQueue.delete(i.target))}!this.contentViewTriggerSource&&this.config.autoCaptureContentView&&this.scheduleContentViewEvent(i.NS.Partial,500),this.contentUpdateQueue.size&&this.contentVisibilityCallbackPromise&&this.contentVisibilityCallbackPromise.resolve()};this.config.deferContentViewIntersectionCallbacks&&null!==(t=this.runContentVisibilityCallbacksPromise)&&void 0!==t&&t.promise?this.runContentVisibilityCallbacksPromise.promise.then((()=>n(!0))):n()}sendEvent(e,t){this.queueEvent(e,(()=>{this.config.beacons&&this.config.beacons[e]&&this.config.beacons[e].disable||!this.pageMetadata||this.trackingSystemList.sendCustomEvent(e,t,this.pageMetadata.combinedContract)}))}queueEvent(e,t){this.config.eventTypeAllowList&&!this.config.eventTypeAllowList.includes(e)||(this.config.useEventQueue||this.config.forceUseEventQueueList&&this.config.forceUseEventQueueList.includes(e)?this.eventQueue.push({eventType:e,callback:t}):t())}dispatchEvent(e,t){a.kP&&setTimeout((()=>dispatchEvent(new CustomEvent(e,{detail:t}))),0)}startAutoDwellTime(){document.hasFocus()&&!this.config.disableAutoCalculateDwellTime&&(v.start(),this.pageMetadata.addOrUpdateTmplProperty("dwellTimeStart","true"))}onFocusCallback(){this.contentLoaded&&!this.config.disableAutoCalculateDwellTime&&(v.start(),this.pageMetadata.addOrUpdateTmplProperty("dwellTimeFocusStart","true"))}waitForContentVisibilityObserverInit(){return this.contentVisibilityCallbackPromise?this.contentVisibilityCallbackPromise.promise:Promise.resolve()}onBlurCallback(){this.sendPageOutOfFocusEvent({}),this.config.disableAutoCalculateDwellTime||(v.pause(),this.pageMetadata.addOrUpdateTmplProperty("dwellTimePause","true"))}isEventInQueue(e){return this.eventQueue.some((t=>t.eventType===e))}getQueuedEventCount(){return this.eventQueue.length}isContentViewBeaconSent(){return this.contentViewBeaconSent}isPageViewBeaconSent(){return this.pageViewBeaconSent}initScrollPerformanceTrackers(e){if(!this.viewportEventManager)return;null!=e&&e.scrollContainer&&this.viewportEventManager.initListener(null==e?void 0:e.scrollContainer),this.subscribeToAppHidden=null==e?void 0:e.subscribeToAppHidden;n.e("scrollPerfMetricTrackers").then(n.bind(n,60281)).then((({createEndOfFeedTimeTracker:t,createAppResponsivenessTracker:n,createScrollInputTracker:i})=>{const r=t({scrollContainer:null==e?void 0:e.scrollContainer,scrollEventName:null==e?void 0:e.scrollEventName}),o=n(),a=(null==e?void 0:e.enableScrollInputTracking)&&i&&i(null==e?void 0:e.enableMissedScrollTracking,null==e?void 0:e.enableSectionScrollTracking,e.scrollContainer);this.viewportEventManager.initScrollPerformanceTrackers({endOfFeedTimeTracker:r,appResponsivenessTracker:o,scrollInputTracker:a})}))}}},78951:function(e,t,n){"use strict";n.d(t,{D:function(){return o}});var i=n(70280),r=n(87552);class o{constructor(e,t,n){this.contract=e}static render(e){const t=r.v.compress(e);return{[i.qP]:JSON.stringify(t)}}addChild(e){return new o(e,this)}addOrUpdateChild(e,t){return t?(t.contract=e,t):new o(e,this)}updateContract(e){this.contract=e}render(e){return o.render(this.contract)}getMetadataTag(){return JSON.stringify(this.getMetadata())}getMetadata(){return r.v.compress(this.contract)}}},56921:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var i=n(39860),r=n(23549);class o{constructor(){this.getSpanId=(e=!1)=>{if(o.traceCtrxObj&&!e)return o.traceCtrxObj.getSpanId();const t=(0,i.DO)().substring(0,16);return(0,r.dK)().then((()=>{o.setSpanIdFunc(t)}),(()=>{})),t},this.getTraceId=(e=!1)=>{if(o.traceCtrxObj&&!e)return o.traceCtrxObj.getTraceId();const t=(0,i.DO)();return(0,r.dK)().then((()=>{o.setTraceIdFunc(t)}),(()=>{})),t}}setTraceObj(e){o.traceCtrxObj=e&&e.getTraceCtx()}}o.getTraceInstance=()=>(o.traceInstance||(o.traceInstance=new o),o.traceInstance),o.setSpanIdFunc=e=>{const t=e||(0,i.DO)().substring(0,16);try{o.traceCtrxObj.setSpanId(t)}catch(e){}},o.setTraceIdFunc=e=>{const t=e||(0,i.DO)();try{o.traceCtrxObj.setTraceId(t)}catch(e){}}},45555:function(e,t,n){"use strict";n.d(t,{EE:function(){return i},S8:function(){return o},id:function(){return r}});const i="https://www.msn.com/PV.xml",r={UserAction:"MS.News.Web.PageAction",PageView:"MS.News.Web.PageView",ContentView:"MS.News.Web.ContentView",AppError:"MS.News.Web.AppError",AppErrorDiag:"MS.News.Web.AppErrorDiag",LoadTime:"MS.News.Web.LoadTime",LoadTimeDiag:"MS.News.Web.LoadTimeDiag",Unload:"MS.News.Web.Unload",Base:"MS.News.Web.Base",Feedback:"MS.News.Web.Feedback",AdImpression:"MS.News.Web.AdImpression",AdFeedback:"MS.News.Web.AdFeedback",GamePlay:"MS.News.Web.GamePlay",VideoPlay:"MS.News.Web.VideoPlay",VideoAdPlay:"MS.News.Web.VideoAdPlay",AudioPlay:"MS.News.Web.AudioPlay",ServerLog:"MS.News.Web.ServerLog",AppPerfTrace:"MS.News.Web.AppPerfTrace",Auth:"MS.News.Web.Auth",HeartBeat:"MS.News.Web.HeartBeat",ClientLog:"MS.News.Web.ClientLog",PageOutOfFocus:"MS.News.Web.PageOutOfFocus",TraceInfo:"MS.News.Web.TraceInfo"},o=1e3},72626:function(e,t,n){"use strict";n.d(t,{F$:function(){return U},FL:function(){return v},He:function(){return O},Mm:function(){return W},P6:function(){return g},Ux:function(){return R},Vr:function(){return w},XW:function(){return C},Xn:function(){return p},Zf:function(){return b},d5:function(){return f},i2:function(){return y},jT:function(){return B},jv:function(){return N},kP:function(){return S},lB:function(){return V},pE:function(){return L},pW:function(){return u},qC:function(){return m},t0:function(){return $},tH:function(){return A},tV:function(){return H},t_:function(){return P},uK:function(){return T},uV:function(){return _},uj:function(){return q},wC:function(){return k},wi:function(){return h},xI:function(){return G}});let i,r,o,a,s,c,d=(new Date).getTime();try{s="sessionStorage"in window&&window.sessionStorage}catch(e){}try{navigator&&navigator.userAgentData&&"Windows"===navigator.userAgentData.platform&&navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["platformVersion"])&&navigator.userAgentData.getHighEntropyValues(["platformVersion"]).then((e=>{c=e.platformVersion}))}catch(e){}function l(e){const t=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===e?t:7&t|8).toString(16)}function u(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,l)}function p(){return Date.now()}function h(){return S&&(window.outerWidth||document.documentElement.clientWidth)}function g(e){return e?e.scrollHeight:S&&(window.outerHeight||document.documentElement.clientHeight)}function m(e){if(e)return e.scrollTop||0;return S&&(window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop)||0}function f(){return S&&Math.max(document.body.scrollHeight||0,document.documentElement.scrollHeight||0,document.body.offsetHeight||0,document.documentElement.offsetHeight||0,document.body.clientHeight||0,document.documentElement.clientHeight||0)}function v(){const e="undefined"!=typeof document&&document.cookie;if(!S&&!e)return"";const t=new RegExp("\\bMUID\\s*=\\s*([^;]*)","i").exec(e);return t&&t.length>1?t[1]:""}function y(e){return S?(i||""===i||(i=v()||e||""),i):v()}const S=!("undefined"==typeof window||!window.document||!window.document.createElement||window.isRenderServiceEnv);function C(e,t){return function(e,t){if(t&&e){const n=t.toLowerCase();if(-1==n.indexOf("?ocid=")&&-1==n.indexOf("&ocid=")){const n=-1==t.indexOf("?")?"?":"&";t=`${t}${n}ocid=${encodeURIComponent(e)}`}}return t}(t,e)}function w(e,t){I(e,"ocid",t)}function b(e,t){let n=t;try{const e=new URL(location.href);n=e.searchParams.get("pc")||e.searchParams.get("PC")||e.searchParams.get("pC")||e.searchParams.get("Pc")||n}catch{}I(e,"pc",n||t)}function T(e,t){I(e,"cvid",t,!0)}function k(e,t){I(e,"ei",t.toString(),!0)}function P(e,t){I(e,t,void 0,!1,!0)}function I(e,t,n,i=!1,r=!1){if(!e||!t)return;let o=e;if("a"!==o.nodeName&&o.closest("a")&&(o=o.closest("a")),!o)return;const{href:a}=o;if(a)try{const e=new URL(a);if(r)return e.hash?-1===e.hash.indexOf(t)&&(e.hash+=`&${t}`):e.hash=t,void(o.href=e.href);(!e.searchParams.get(t)||i)&&n&&(e.host.includes("msn.com")||e.host.includes("msn.cn")||e.host.includes("bing.com"))&&(e.searchParams.set(t,n),o.href=e.href)}catch{}}function A(e,t=""){if(!e)return;const n=e.getAttribute("data-hl")||"";if(!t&&!n){const n=e.querySelector("h4")||e.querySelector("h3"),i=function(e,t,n=2){if(!t)return;let i=t,r=0;for(;i&&i!==e;i=i.parentElement,r++)if(r>n)return;return r}(e,n);n&&i&&i<=2&&(t=x(n))}const i=e instanceof HTMLAnchorElement?e.querySelector(".title"):"";!t&&i&&(t=x(i));const r=e instanceof HTMLAnchorElement?e.getAttribute("title"):"";!t&&r&&(t=r);const o=e instanceof HTMLAnchorElement?e.getAttribute("aria-lable"):"";return!t&&o&&(t=o),"string"!=typeof t&&(t=n||e.getAttribute("data-piitxt")||("FORM"==e.nodeName?"[form submit]":e.getAttribute("title")||M(e,"title","img")||x(e)||e.getAttribute("alt")||M(e,"alt")||"")),null!=t.trim&&(t=t.trim()),t}const E=/(^\s+)|(\s+$)/gm;function x(e){return(e&&(e.textContent||e.innerText)||"").replace(E,"")}function M(e,t,n=""){const i=e.children||[];let r,o=0;for(t=t||"alt";o<i.length;o++)if(r=i[o].getAttribute(t)||M(i[o],t,n),r&&n!=i[o].localName)return r}function L(e,t){if(!e||e===document||e===window)return null;const n=e.closest(t);if(n)return n;const i=D(e);return i&&i.host?L(i.host,t):void 0}function D(e){return e.parentNode?D(e.parentNode):e}function R(e){const t=[];if(!e)return;let n;return n=O(e)?e.shadowRoot.querySelectorAll("*"):e.querySelectorAll("*"),F(Array.from(n),t),t}function F(e,t=[]){for(let n=0;n<e.length;n++){const i=e[n];B(i)&&t.push(i),O(i)&&F(Array.from(i.shadowRoot.querySelectorAll("*")),t)}}function O(e){return!!e.shadowRoot}function B(e){return e.hasAttribute&&e.hasAttribute("data-t")}function N(e){try{new URL(e)}catch(e){return!1}return!0}function $(e,t){const n=new CustomEvent(e,{detail:{element:t}});dispatchEvent(n)}function U(){let e=!1;if(S)try{if(c&&parseInt(c.split(".")[0])>=11&&(e=!0),!e&&window&&window.external&&window.external.getHostEnvironmentValue("os-build")){const t=JSON.parse(window.external.getHostEnvironmentValue("os-build"))["os-build"].split(".");(t[0]>10||10===t[0]&&t[1]>0||t[2]>=22e3)&&(e=!0)}}catch(e){}return o=!0===e||null,o}function _(){let e=!1;const t="os-sku";if(S)try{if(window&&window.external&&window.external.getHostEnvironmentValue(t)){const n=JSON.parse(window.external.getHostEnvironmentValue(t));e=n&&"192"===n[t]}}catch(e){}return a=!0===e||null,a}function H(e){if(!r&&""!==r&&S)try{if(!e||0===e.length)return;const t=document.cookie;if(t){let n="";e.forEach((e=>{const i=new RegExp("\\b"+e+"\\s*=\\s*([^;]*)","i").exec(t),r=i&&i.length>1?i[1]:"";""!==r&&(n+=e+"="+r+";")})),r=n}}catch(e){}return r}function W(e,t){if(!e||""===e)return"";let n=!1,i=null;if(S)try{if(i=new URL(e),!t||0===t.length)return;t.forEach((e=>{i.searchParams.has(e)&&(n=!0),i.searchParams.delete(e)}))}catch(t){return e}return n?i.toString():e}function q(e){if(!e||""===e)return"";let t=null,n=!1;if(S)try{t=new URL(e);const i=new RegExp(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi);t.searchParams.forEach((function(e,t){e.match(i)&&(n=!0)}))}catch(e){}return n?"":e}function V(e){const t="sign-in-refreshed-page";S&&s&&s.getItem(t)?(s.removeItem(t),(e.page=e.page||{}).isAutoRefresh=!0):function(e){return!e||!e.page||!0!==e.page.isAutoRefresh&&!1!==e.page.isAutoRefresh}(e)&&((e.page=e.page||{}).isAutoRefresh=!1)}function G(e=!1){let t;const n=new Promise((e=>{t=e}));return e&&t(),{promise:n,resolve:t}}},30676:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var i=n(82898);function r(e,t){const n=function(e){switch(e){case i.uH.AppStore:return 17;case i.uH.StructuredData:return 16;case i.uH.CmsPromotions:return 19;case i.uH.MicrosoftWebStore:return 20;case i.uH.XboxStore:return 21;case i.uH.OfficeStore:return 22;case i.uH.PartnerLinks:return 24;case i.uH.SponsoredContent:return 25;default:return 0}}(e)||function(e){switch(e){case i.wu.Navigate:return 14;case i.wu.Follow:return 26;case i.wu.Unfollow:return 27;case i.wu.More:return 28;case i.wu.Close:return 36;case i.wu.Share:return 37;case i.wu.Like:return 38;case i.wu.Dislike:return 39;case i.wu.Unlike:return 40;case i.wu.Undislike:return 41;case i.wu.Mute:return 42;case i.wu.Unmute:return 43;case i.wu.Cancel:return 44;case i.wu.Manage:return 45;default:return 0}}(t);if(0!==n)return n;if(e===i.uH.App){if(t===i.wu.Install)return 23;if(t===i.wu.Launch)return 18}return 0}},39100:function(e,t,n){"use strict";n.d(t,{D:function(){return m}});var i=n(23549),r=n(48204),o=n(23357),a=n(54297),s=n(78324),c=n(81949),d=n(85205),l=n(76166),u=n(96531);const p="tp";var h=n(31558),g=n(36560);class m extends l.e{constructor(e,t,n,r,o,a,l){super(e,t,n,r,o,a,l);const p=(0,s.l)(),f=p.getSelectedPivot();if(f&&f.telemetryPivotCategory){let e;e.page.pivot=f.telemetryPivotCategory,i.M0.updatePageMetadata(e)}if((0,h.N)()){const e=u._.getInstance().rootReducer.connector(d.z.SharedState);e&&e.getCurrentState().useHistory?(0,g.lY)().addSwitchListener((e=>{window.requestAnimationFrame((()=>m.onPivotSwitch(e)))}),c.I.Telemetry):p.addSwitchListener(m.onPivotSwitch,c.I.Telemetry)}}static onPivotSwitch(e){let t;const n=e.newSelection;if(n&&(i.M0.addOrUpdateCustomProperty(p,n.display),t={feed:{id:n.pivotId,name:n.display,type:"xfeed"===n.telemetryPageName?"category filter":void 0},page:{content:{topic:n.display},pivot:""}},n.telemetryPivotCategory&&(t.page.pivot=n.telemetryPivotCategory),n.telemetryVertical&&(t.page.content.vertical=n.telemetryVertical),n.telemetryPageType&&(t.page.type=n.telemetryPageType),"gaming"===n.pivotId&&(t.feed.id=`gaming/${(0,r.ll)()}`),"following"===n.pivotId&&(t.feed.id=`following/${(0,r.ll)()}`),i.M0.updatePageMetadata(t)),e.oldSelection||m.isPivotManagerSwitched){if(m.isPivotManagerSwitched=!1,n.telemetryPageName)t.page.name=n.telemetryPageName;else if(n.pivotId)switch(n.pivotId){case"productivityHub":t.page.name="entnewshp";break;case"myfeed":case"myFeed":t.page.name="default";break;case"myInterests":t.page.name="cinterests";break;case"gaming":t.page.name="gaming";break;case"play":t.page.name="play";break;case"navigationPage":t.page.name="navigationPage";break;case"following":t.page.name="following",t.feed.id=`following/${o.uD.Manual}`}"gaming"===n.pivotId&&(t.feed.id=`gaming/${o.uD.Manual}`,t.page.isCorePV=!0);const e="IsGamer",r="IsXboxGamer",s="IsPCGamer",c=(0,a.$o)().getItem("userType");return i.M0.addOrUpdateTmplProperty(e,c&&c.includes(e)?"1":"0"),i.M0.addOrUpdateTmplProperty(r,c&&c.includes(r)?"1":"0"),i.M0.addOrUpdateTmplProperty(s,c&&c.includes(s)?"1":"0"),i.M0.updateRequestId(),i.M0.updatePageMetadata(t),void i.M0.sendPageView(null,!0)}}}m.isPivotManagerSwitched=!1},72009:function(e,t,n){"use strict";n.r(t),n.d(t,{TelemetryDataConnector:function(){return i.D},TelemetryDataReducer:function(){return r},ToolingInfo:function(){return o}});var i=n(39100);class r{reduce(e,t){return{}}}const o={experienceConfigSchema:{}}},60189:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var i=n(45266),r=n(82898);function o(e,t){let n=r.hP.SearchBox;switch(e.selectedFeedDisplaySetting){case"always":n|=r.hP.ContentFeed;break;case"headingsonly":n|=r.hP.HeadingsOnly;break;case"onscroll":n|=r.hP.ContentBelowTheFold;break;case"peek":n|=r.hP.Peek;break;default:n|=r.hP.Empty}return e.imageOfTheDayEnabled&&(n|=r.hP.BingImage),e.greetingEnabled&&t&&(n|=r.hP.GreetingEnabled),e.selectedQuickLinksDisplaySetting!==i.Z3.off&&(n|=r.hP.TopSites),e.currentLayout===i.nP.custom&&(n|=r.hP.CustomModeOption),n}},72120:function(e,t,n){"use strict";n.r(t),n.d(t,{TelemetryDataEdgeChromiumConnector:function(){return C},TelemetryDataEdgeChromiumReducer:function(){return w},ToolingInfo:function(){return b},edgeNextGetPageConfiguration:function(){return u.y}});var i=n(59489),r=n(76166),o=n(67044),a=n(31499),s=n(13334),c=n(21789),d=n(95153),l=n(25598),u=n(60189),p=n(9498),h=n(64726),g=n(85205),m=n(23549),f=n(50632),v=n(16614),y=n(95815),S=n(31558);class C extends r.e{constructor(e,t,n,r,o,a,s){super(e,t,n,r,o,a,s),this.fireTelemetryBeacon=!0,this.isMSASignedin=!1,this.edgeChromiumPgltCookieName="pglt",this.cookieExpireInDays=182;const c=new URLSearchParams(window.location.search);this.firstLaunchParam=c.get("firstlaunch"),(0,S.N)()&&(this.setupLayoutTelemetry(),this.getPrimaryAccountInfoAsync().then((e=>{this.isMSASignedin=e.accountType===i.l.MSA})))}async getLayoutStateAsync(){const e=await(0,o.oU)(g.z.ChromiumPageSettings);return await e.getLayoutStateAsync()}async getPrimaryAccountInfoAsync(){const e=await(0,o.oU)(g.z.ChromiumPageSettings);return await e.getPrimaryAccountInfoAsync()}pageSettingTelemetry(e){if("visible"===document.visibilityState){const t=(0,u.y)(e,this.isMSASignedin);m.M0.updatePageConfiguration(t),this.setPgltCookie(String(t)),this.stampTmpl(e)}}initializeTelemetry(e){const t=m.M0.getPageMetadata();if(t&&t.contract&&t.contract.page){const t=(0,u.y)(e,this.isMSASignedin);m.M0.updatePageConfiguration(t),this.setPgltCookie(String(t)),this.stampTmpl(e)}const n=document.createEvent("Event");n.initEvent("trackvaluesupdated",!0,!0),document.dispatchEvent(n)}setupLayoutTelemetry(){this.getLayoutStateAsync().then((e=>{this.currentLayoutState=e,this.initializeTelemetry(e)})),l.J.updateLayout.registerObserver((e=>{const t=e&&e.params;!t||t.length<1||this.pageSettingTelemetry(t[0])})),a.I.layoutAnimationComplete.registerObserver((()=>{this.getLayoutStateAsync().then((e=>{if("1"===this.firstLaunchParam){if(!this.fireTelemetryBeacon)return;this.fireTelemetryBeacon=!1}this.currentLayoutState.backgroundImageTypePolicy===e.backgroundImageTypePolicy&&this.currentLayoutState.currentBackgroundImageType===e.currentBackgroundImageType&&this.currentLayoutState.currentLayout===e.currentLayout&&(0,v.Z)(this.currentLayoutState.customBackgroundImageInfo,e.customBackgroundImageInfo)&&this.currentLayoutState.greetingEnabled===e.greetingEnabled&&this.currentLayoutState.imageOfTheDayEnabled===e.imageOfTheDayEnabled&&this.currentLayoutState.market===e.market&&this.currentLayoutState.quickLinksEnabled===e.quickLinksEnabled&&this.currentLayoutState.selectedFeedDisplaySetting===e.selectedFeedDisplaySetting||(this.currentLayoutState=e,(0,p.TR)()||(0,h.eC)().then((()=>{m.M0.sendPageView(null,!1)})))}))}))}setPgltCookie(e){let t=this.edgeChromiumPgltCookieName;const{apptype:n,pagetype:i}=s.Al.ClientSettings?s.Al.ClientSettings:{apptype:void 0,pagetype:void 0};n&&i&&(t+="-"+s.Al.ClientSettings.apptype+"-"+s.Al.ClientSettings.pagetype),(0,y.sq)(t,e,this.cookieExpireInDays,c.jG.HostPage.topDomain)}stampTmpl(e){this.stampHardware();const t=(0,f.GQ)();if(!t)return;const n=(0,d.Nd)(this.requestContext.data.innerWidth,"innerWidth"),i=(0,d.Nd)(this.requestContext.data.outerWidth,"outerWidth");if(!n||!i)return;let r=0;const o=!(0,d.Nd)(this.requestContext.data.screenTop,"screenTop")&&!(0,d.Nd)(this.requestContext.data.screenY,"screenY")?0:14;e.verticalTabsOpened&&(r=e.verticalTabsCollapsed?48:256);const a=Math.round(1e4*(i-o-r)/innerWidth)/1e4;if(!a)return;const s=Math.round((i-o)/a);if(s&&(m.M0.addOrUpdateTmplProperty("edge.zoom",a+""),m.M0.addOrUpdateTmplProperty("edge_ntp.actualWidth",n+""),m.M0.addOrUpdateTmplProperty("edge_ntp.expectedWidth",s+""),e.verticalTabsOpened)){if(m.M0.addOrUpdateTmplProperty("vertical_tabs.opened","1"),m.M0.addOrUpdateTmplProperty("vertical_tabs.collapsed",e.verticalTabsCollapsed?"1":"0"),s<=n)return;let i=1,r=1;for(let e=t.length-1;e>1;e--){const o=t[e].minViewportWidthPx;if(!o||1!=i&&1!=r)break;1==i&&s>o&&(i=e),1==r&&n>o&&(r=e)}i>r&&(m.M0.addOrUpdateTmplProperty("vertical_tabs.eligiblecol",i+1+""),m.M0.addOrUpdateTmplProperty("vertical_tabs.showncol",r+1+""))}}stampHardware(){if(window&&window.navigator){const e=window.navigator;e.deviceMemory&&m.M0.addOrUpdateTmplProperty("edge.mem",e.deviceMemory+""),e.hardwareConcurrency&&m.M0.addOrUpdateTmplProperty("edge.concurrency",e.hardwareConcurrency+""),e.connection&&e.connection.effectiveType&&m.M0.addOrUpdateTmplProperty("edge.connection",e.connection.effectiveType+"")}}}class w{reduce(e,t){return{}}}const b={experienceConfigSchema:{}}},4578:function(e,t,n){"use strict";n.d(t,{I:function(){return r}});var i=n(17556);class r{}r.setMaxTiles=new i.C("setMaxTilesSignature")},53980:function(e,t,n){"use strict";n.d(t,{L:function(){return y}});var i=n(76166),r=n(67044),o=n(68963),a=n(4578),s=n(50176),c=n(85205),d=n(79545),l=n(84424),u=n(21930),p=n(76733),h=n(45266),g=n(87172),m=n(23549),f=n(64726),v=n(41074);class y extends i.e{constructor(e,t,n,i,a,y,S){super(e,t,n,i,a,y,S);const C=(0,r.K0)(c.z.ChromiumPageSettings);g.U.getPreferenceSetting(s.lx).then((e=>{const t=null==e?void 0:e.value;!1===(null==t?void 0:t.quickLinkSettingsChanged)&&(0,f.eC)().then((()=>{null===m.M0||void 0===m.M0||m.M0.addOrUpdateTmplProperty("tscollapsed_to_off","1")}))}));try{(0,o.Uo)(c.z.ChromiumPageSettings,(async e=>{e.isLoadCompleted&&(0,l.NU)(e).then((e=>{e&&(C.updateQuickLinksDisplayOption(h.Z3.off,!0),(0,r.oU)(c.z.ExperienceTrackerEdgeNextData).then((e=>{window.setTimeout((()=>{(0,u.o_)(d.x.topSitesEdgeNextWC,!0),v.g.updateVisuallyReadyTiming.getActionSender(e).send({experienceType:d.x.topSitesEdgeNextWC,endTime:performance.now()})}))})),(0,f.eC)().then((()=>{null===m.M0||void 0===m.M0||m.M0.addOrUpdateTmplProperty("tscollapsed_to_off","1")})))}))}))}catch(e){p.k.log(e)}}updateMaxTiles(e){a.I.setMaxTiles.getActionSender(this).send(e)}}},8679:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var i=n(99551),r=n(4578);class o{reduce(e,t){if(!e)return{maxTiles:8};if(!t)return e;let n;return i.G.handleAction(t,r.I.setMaxTiles,(t=>{n={...e,maxTiles:t}})),n||e}}},71484:function(e,t,n){"use strict";n.d(t,{$W:function(){return d},EI:function(){return l},JP:function(){return u},Mj:function(){return o},Y2:function(){return c},Zt:function(){return i},_$:function(){return r},fk:function(){return s},u$:function(){return a}});const i="Graph/Actions",r="pdp-peregrine",o="$top",a="20",s="$filter",c="Subscribe",d="__TopSitesSubscriptionHelper__",l="top_site_subscription_campaigns",u=36e5},27681:function(e,t,n){"use strict";n.d(t,{Zl:function(){return h}});var i=n(55524),r=n(291),o=n(74161),a=n(71484),s=n(54820),c=n(15165),d=n(88826),l=n(7476),u=n(21789);class p{constructor(){this.cachedPublisherIdToCampaignDataMap=new Map,this.cachedPublisherIdToStorageLocationMap=new Map,this.cachedSubscriptionIdToCampaignDataMap=new Map,this.cachedSubscriptionIdToStorageLocationMap=new Map,this.followedCount=0,this.isCacheEligibleForFollowingEvaluation=!0,this.matchingFollowedPublisherIds=new Set,this.publisherIdToEligibilityMap=new Map,this.requestsSuccessful=!1,this.shouldOverwritePersistentStorage=!1,this.subscribedCount=0,this.subscriptionResponseProcessed=new Promise((e=>{this.subscriptionResponseResolver=e})),this.targetPublisherIdToSubscriptionIdMap=new Map,this.targetSubscriptionIdToPublisherIdMap=new Map}static getInstance(){return i.Gq.get(a.$W,(()=>new p))}async fetchFollowedPublishers(e,t,n){if(!(e&&t&&t.length&&n))return void this.subscriptionResponseResolver();if(this.populateTargedPublisherData(t),await this.evaluateCachingEligibility(),this.isCacheEligibleForFollowingEvaluation)return void(this.followedCount>0?this.fetchSubscriptions():(this.requestsSuccessful=!0,this.subscriptionResponseResolver()));this.followedCount=0,this.subscribedCount=0,this.shouldOverwritePersistentStorage=!0,this.matchingFollowedPublisherIds=new Set,this.shouldOverwritePersistentStorage=!0;const i=await e.fetchChannelFilter("Top Sites Subscription Helper",{feedName:"filteredChannels"});if(!i)return this.requestsSuccessful=!1,void this.subscriptionResponseResolver();((null==i?void 0:i.subCards)||[]).forEach(((t,n)=>{const i=e.mapChannel(t,n);if(!i.isTopic&&this.targetPublisherIdToSubscriptionIdMap.get(null==i?void 0:i.id)){const e=this.cachedPublisherIdToCampaignDataMap.get(null==i?void 0:i.id),t=this.cachedPublisherIdToStorageLocationMap.get(null==i?void 0:i.id),n=e&&void 0!==t?this.buildUserPublisherCampaignDataFromCache(e,!0):this.buildNewUserPublisherCampaignData(i.id,this.targetPublisherIdToSubscriptionIdMap.get(i.id),!0);if(void 0!==t)this.userPublisherCampaignData[t]=n;else{this.userPublisherCampaignData.push(n);const e=this.targetPublisherIdToSubscriptionIdMap.get(i.id);this.cachedPublisherIdToStorageLocationMap.set(i.id,this.userPublisherCampaignData.length-1),this.cachedSubscriptionIdToStorageLocationMap.set(e,this.userPublisherCampaignData.length-1)}this.matchingFollowedPublisherIds.add(i.id),this.cachedPublisherIdToCampaignDataMap.set(n.publisherId,n),this.cachedSubscriptionIdToCampaignDataMap.set(n.subscriptionId,n);const r=!e||void 0===t||!e.isSubscribed;this.publisherIdToEligibilityMap.set(i.id,r),this.subscribedCount+=void 0!==t&&e&&e.isSubscribed?1:0,this.followedCount++}})),this.targetPublisherIdToSubscriptionIdMap.forEach(((e,t)=>{if(!this.matchingFollowedPublisherIds.has(t)){const e=this.cachedPublisherIdToCampaignDataMap.get(t),n=this.cachedPublisherIdToStorageLocationMap.get(t),i=e&&void 0!==n?this.buildUserPublisherCampaignDataFromCache(e,!0):this.buildNewUserPublisherCampaignData(t,this.targetPublisherIdToSubscriptionIdMap.get(t),!1);void 0!==n?this.userPublisherCampaignData[n]=i:this.userPublisherCampaignData.push(i),this.publisherIdToEligibilityMap.set(t,!1),this.subscribedCount+=void 0!==n&&e&&e.isSubscribed?1:0}})),this.followedCount>0?this.fetchSubscriptions():(this.requestsSuccessful=!0,this.subscriptionResponseResolver())}async fetchSubscriptions(){if(this.subscribedCount===this.targetPublisherIdToSubscriptionIdMap.size)return this.requestsSuccessful=!0,void this.subscriptionResponseResolver();const e=await this.getRequestInit(),t=s.$D.getOneServiceParamsWithoutAuth(u.jG.UserId,a._$),n=[{key:a.fk,value:"actionType+eq+'Subscribe'"},{key:a.Mj,value:a.u$},...t],i=(0,c.PH)(a.Zt);this.appendQsp(n,i);const r=await this.sendRequest(decodeURIComponent(i.href),e).catch((e=>((0,d.H)(l.KdJ,"Error response from subscription API: "+(null==e?void 0:e.message)),null)));if(!r||!r.ok){const e=r?"Missing response":"Non-ok response. Status Code: "+r.status+" Status Text: "+r.statusText;return(0,d.H)(l.KdJ,e),void this.subscriptionResponseResolver()}const o=await r.json();this.requestsSuccessful=!0,this.processSubscriptionInfo(o),this.subscriptionResponseResolver()}async getRequestInit(){const e={method:"GET",credentials:"include"};return e.headers=await s.$D.getOneServiceHeaders(),e}appendQsp(e,t){e.forEach((e=>{e.value&&t.searchParams.append(e.key,e.value)}))}async sendRequest(e,t){return window.fetch(e,t)}processSubscriptionInfo(e){if(!e||!e.value||!e.value.length)return void this.subscriptionResponseResolver();e.value.forEach((e=>{const t=this.cachedSubscriptionIdToCampaignDataMap.get(e.targetId),n=t&&t.publisherId;if(e.actionType===a.Y2&&this.matchingFollowedPublisherIds.has(n)){var i;const t=this.cachedSubscriptionIdToStorageLocationMap.get(e.targetId);if(this.publisherIdToEligibilityMap.set(n,!1),void 0===t||t<=-1||(null===(i=this.userPublisherCampaignData)||void 0===i?void 0:i.length)<=t)return;this.userPublisherCampaignData[t].isSubscribed=!0,this.shouldOverwritePersistentStorage=!0}}))}async getPublisherEligibilityData(){return await this.subscriptionResponseProcessed,{requestsSuccessful:this.requestsSuccessful,publisherIdToEligibilityMap:this.publisherIdToEligibilityMap}}async getShouldOverwritePersistentStorage(){return await this.subscriptionResponseProcessed,this.shouldOverwritePersistentStorage}getUserPublisherCampaignData(){return this.userPublisherCampaignData}async evaluateCachingEligibility(){const e=await this.fetchPublisherFollowedData();e&&e.length?(this.evaluatePersistentStorageAndPopulateCaches(e),this.cachedPublisherIdToCampaignDataMap.size===this.targetPublisherIdToSubscriptionIdMap.size||(this.isCacheEligibleForFollowingEvaluation=!1)):this.isCacheEligibleForFollowingEvaluation=!1}async fetchPublisherFollowedData(){return window&&window.chrome&&window.chrome.ntpSettingsPrivate&&window.chrome.ntpSettingsPrivate.getPref?new Promise((e=>{var t,n,i;null===(t=window)||void 0===t||null===(n=t.chrome)||void 0===n||null===(i=n.ntpSettingsPrivate)||void 0===i||i.getPref(o._9.userNurturingUpdated,(t=>{var n;const i=null==t||null===(n=t.value)||void 0===n?void 0:n.find((e=>e&&e.key===a.EI));this.userPublisherCampaignData=i&&i.value||[],e(this.userPublisherCampaignData)}))})):new Promise((e=>e([])))}hasCacheEntryExpired(e,t){return e+t<Date.now()}evaluatePersistentStorageAndPopulateCaches(e){let t=0;const n=Number.MAX_VALUE;e.forEach((e=>{e&&e.publisherId&&this.targetPublisherIdToSubscriptionIdMap.get(e.publisherId)&&this.targetSubscriptionIdToPublisherIdMap.get(e.subscriptionId)&&(this.followedCount+=e.isFollowed?1:0,this.subscribedCount+=e.isSubscribed?1:0,this.isCacheEligibleForFollowingEvaluation=this.isCacheEligibleForFollowingEvaluation&&!this.hasCacheEntryExpired(Math.min(n,e.lastFetchedTimestamp),a.JP),this.cachedPublisherIdToStorageLocationMap.set(e.publisherId,t),this.cachedSubscriptionIdToStorageLocationMap.set(e.subscriptionId,t),this.cachedPublisherIdToCampaignDataMap.set(e.publisherId,e),this.cachedSubscriptionIdToCampaignDataMap.set(e.subscriptionId,e),e.isFollowed?(this.matchingFollowedPublisherIds.add(e.publisherId),this.publisherIdToEligibilityMap.set(e.publisherId,!e.isSubscribed)):this.publisherIdToEligibilityMap.set(e.publisherId,!1),t++)}))}populateTargedPublisherData(e){e.forEach((e=>{e&&e.publisherId&&e.subscriptionId&&(this.targetPublisherIdToSubscriptionIdMap.set(e.publisherId,e.subscriptionId),this.targetSubscriptionIdToPublisherIdMap.set(e.subscriptionId,e.publisherId))}))}buildUserPublisherCampaignDataFromCache(e,t){return{publisherId:e.publisherId,subscriptionId:e.subscriptionId,isFollowed:t,isSubscribed:e.isSubscribed,timesSeen:e.timesSeen,lastFetchedTimestamp:Date.now()}}buildNewUserPublisherCampaignData(e,t,n){return{publisherId:e,subscriptionId:t,isFollowed:n,isSubscribed:!1,timesSeen:0,lastFetchedTimestamp:Date.now()}}static resetInstance(){const e=new p;return i.Gq.set(a.$W,e),h=(0,r.h)(p),h}}let h=(0,r.h)(p)},7486:function(e,t,n){"use strict";n.d(t,{G:function(){return r}});var i=n(17556);class r{}r.followedTopics=new i.C("FollowedTopics"),r.followedTopicsFailed=new i.C("FollowedTopicsFailedSignature"),r.recommendedTopics=new i.C("RecommendedTopics"),r.recommendedTopicsFailed=new i.C("RecommendedTopicsFailed"),r.hiddenTopics=new i.C("HiddenTopics"),r.hiddenTopicsFailed=new i.C("HiddenTopicsFailed"),r.topic=new i.C("Topic"),r.topicFailed=new i.C("TopicsFailed"),r.topics=new i.C("Topics"),r.topicList=new i.C("TopicList"),r.topicsFailed=new i.C("TopicsFailed"),r.topicGroup=new i.C("TopicGroup"),r.topicGroupFailed=new i.C("TopicGroupFailed"),r.updateTopicFollowedState=new i.C("UpdateTopicFollowedState"),r.updateTopicFollowedStateFailed=new i.C("UpdateTopicFollowedStateFailed"),r.updateTopicHiddenState=new i.C("UpdateTopicHiddenState"),r.updateTopicHiddenStateFailed=new i.C("UpdateTopicHiddenStateFailed")},49915:function(e,t,n){"use strict";var i;n.d(t,{SH:function(){return p},$A:function(){return c},ku:function(){return a},Ol:function(){return s},jI:function(){return l},jC:function(){return d},Jn:function(){return u}}),function(e){e.DesktopL1="weatherdesktopl1",e.DesktopL2="weatherdesktopl2",e.PWA="weatherpwa",e.EdgeFeatured="edgefeatured",e.WINAPP="weather-app-win",e.XIAOMI="xiaomi",e.XIAOMI_ANDROID_GO="xmweather-gominus1",e.XIAOMI_BROWSER="xmweather-browser",e.SKYPE="onoskype",e.WINDOWS_HEADER_PREFIX="win",e.EDGE_ARTICLE_PREFIX="msnar"}(i||(i={}));new Set(["msedgdhphdr","msedgntphdr","msedgntp","msedgdhp","entnewsntp"]);var r=n(21789),o=n(23357);function a(e){let t;if(e instanceof URL)t=e.searchParams;else if(e instanceof URLSearchParams)t=e;else if("string"==typeof e)try{t=new URL(e).searchParams}catch(e){t=void 0}return s(t,"ocid")}function s(e,t,n){if(e&&t){const i={value:e.get(t)||void 0};if(!i.value&&n&&n.length>0)for(let t=0;t<n.length&&(i.value=e.get(n[t])||void 0,!i.value);++t);if(!i.value){const n=t.toLowerCase();e.forEach((function(e,t){!i.value&&t.toLowerCase()===n&&e&&(i.value=e)}))}return i.value}}function c(e,t,n){if(!e)return null;let i;try{i=e instanceof URL?new URL(e.href):new URL(e)}catch(e){return null}if(i&&(n||i.host.includes("msn.com")||i.host.includes(".msn.cn")))for(const[e,n]of Object.entries(t))e&&n&&i.searchParams.set(e,n);return i.href}function d(e,t){if(!e)return null;let n;try{n=new URL(e instanceof URL?e.href:e)}catch(e){return null}return n&&t&&t.length&&t.forEach((e=>{n.searchParams.delete(e)})),n.href}function l(e){const t=new RegExp("^.*/([Aa][Rr]||[Ss]{2}||[Vv][Ii]||[Vv][Pp])-(?<contentId>[a-zA-Z0-9]{6,8})(([?].*)||#.*)?$");return null!==e.match(t)}function u(e){if("edgeChromium"===r.jG.AppType)return!1;const t=a(e),n=null==t?void 0:t.toLowerCase();return o.Oj.has(n)}n(61303);function p(e,t,n){return c(e,{cvid:t,ocid:n})}},10141:function(e,t,n){"use strict";n.d(t,{ti:function(){return r},v1:function(){return o}});var i=n(83089);function r(){return(0,i.Vx)()}function o(){return(0,i._4)()}},66794:function(e,t,n){"use strict";n.d(t,{Vo:function(){return h},XJ:function(){return p}});var i=n(85594),r=n(88070),o=n(43356),a=n(7124);let s=!1;function c(){d()}const d=(0,a.Z)((()=>h(!1)),300),l=new Set;class u extends i.Pq{constructor(e){super(e),this.options=e}bind(e){this.target=e.targets[this.targetNodeId],s||(addEventListener("resize",c),s=!0),this.initialCalc(),l.add(this)}unbind(){l.delete(this)}async initialCalc(){await(0,o.F_)(),this.recalculate(!1)}async recalculate(e){await(0,r.y)();const t=this.target;if("fixed"!==t.style.position&&t.offsetWidth>0&&t.offsetHeight>0){const n={top:t.offsetTop,left:t.offsetLeft};if(e&&this.lastPosition){const e=this.lastPosition.left-n.left,i=this.lastPosition.top-n.top;if(e||i){const n=`translate(${e}px, ${i}px)`;t.style.transform=n,requestAnimationFrame((()=>{const e="transform .3s ease-out",n=t.style.transition;t.style.transition=n?n+", "+e:e,t.style.transform="translate(0, 0)",setTimeout((()=>{t.style.transition=n,t.style.transform=null}),300)}))}}this.lastPosition=n}}}function p(){return new u({})}function h(e){for(const t of l.values())t.recalculate(e)}i.m0.define(u)},16844:function(e,t,n){"use strict";n.d(t,{Fc:function(){return c},Fl:function(){return s},Nu:function(){return d}});var i=n(85594);const r={},o={};class a extends i.Pq{constructor(e){super(e),this.options=e,this.stickyClassApplied=!1,this.refreshSticky=()=>{const e=r[this.options.breakpointName];if(e<0)return;const t=scrollY>e;if(t!==this.stickyClassApplied){const e=this.options.stickyClassName;t?this.target.classList.add(e):this.target.classList.remove(e),this.stickyClassApplied=t}}}bind(e){this.target=e.targets[this.targetNodeId],this.refreshSticky();const{breakpointName:t}=this.options;let n=o[t];n||(n=new Set,o[t]=n),n.add(this),addEventListener("scroll",this.refreshSticky)}unbind(e){o[this.options.breakpointName].delete(this),removeEventListener("scroll",this.refreshSticky)}}function s(e){return new a(e)}function c(e,t){r[e]=t;const n=o[e];if(n)for(const e of n)e.refreshSticky()}function d(e){return r[e]}i.m0.define(a)},36941:function(e,t,n){"use strict";function i(e,t=!1){if(e){if(t&&e.display)return e.display;if(e.content)return e.content}return e}function r(e){return e.language&&e.market&&(e.language+"-"+(e.script?e.script+"-":"")+e.market).toLowerCase()||""}n.d(t,{H:function(){return i},p:function(){return r}})},32614:function(e,t,n){"use strict";n.d(t,{D3:function(){return l},KL:function(){return g},QG:function(){return m},mL:function(){return y},pG:function(){return p},q3:function(){return h},vc:function(){return u},zz:function(){return f}});var i=n(52681),r=n(12697);let o;const a="//img-s-msn-com.akamaized.net/tenant/amp/entityid/",s="//img-s.msn.cn/tenant/amp/entityid/",c="//prod-streaming-video-msn-com.akamaized.net/",d="//prod-streaming-video.msn.cn/";var l,u;!function(e){e.JPG="jpg",e.PNG="png",e.WEBP="webp"}(l||(l={})),function(e){e[e.None=0]="None",e[e.Letterbox=1]="Letterbox",e[e.Scale=2]="Scale",e[e.Stretch=3]="Stretch",e[e.Crop=4]="Crop",e[e.FocalCrop=5]="FocalCrop",e[e.FacialCrop=6]="FacialCrop"}(u||(u={}));const p=90,h="www.bing.com/th",g=new RegExp(/bing\.(com|net)\/th/);function m(e,t){return`${(0,i.PQ)()?d:c}${e}.${t||"mp4"}`}function f(e,t){return y(((0,i.PQ)()?s:a)+e,t)}const v=Math.ceil(4*Math.random())||4;function y(e,t){if(e&&g.test(e))return function(e,t){try{return S(new URL(e),t).href}catch(n){const i=S(new URL(`https://${e}`),t);return`//${i.host}${i.pathname}${i.search}`}}(e,t);const{focalRegion:n,backgroundColor:i}=t;let{width:a=0,height:s=0,format:c=l.JPG}=t,d="";if(n){const e=w(n.x1,n.x2),t=w(n.y1,n.y2);null!=e&&null!=t&&(d+=`&x=${e}&y=${t}`)}i&&(d+=`&b=${i}`);const u=null==t.mode?6:t.mode;if(6===u&&(d+="&u=t"),t.enableDpiScaling){if(!t.devicePixelRatio)throw new Error("A valid devicePixelRatio value must be provided when DPI scaling is enabled");const e=function(e){if(C()&&o)return o;if(e<1)return null;let t=e;(0,r.Z)(4*t)||(t=Math.ceil(10*t)/10);t>3&&(t=3);C()&&(o=t);return t}(t.devicePixelRatio);e&&(a=Math.round(a*e),s=Math.round(s*e))}return`${e}?w=${a}&h=${s}&q=${t.quality||60}&m=${u}&f=${c}${d}`}function S(e,t){(0,i.PQ)()&&(e.hostname=`ts${v}.cn.mm.bing.net`);const{width:n=0,height:r=0}=t,o=t.quality||p,a=t.crop||0===t.crop?t.crop:1;if(e.searchParams.set("w",`${n}`),e.searchParams.set("h",`${r}`),e.searchParams.set("qlt",`${o}`),e.searchParams.set("c",`${a}`),e.searchParams.set("rs","1"),t.enableDpiScaling){e.searchParams.set("dpr",`${t.devicePixelRatio}`);const n=t.padding||0;e.searchParams.set("p",`${n}`)}return e}function C(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function w(e,t){if(null!=e&&null!=t)return Math.floor((e+t)/2)}},52681:function(e,t,n){"use strict";let i,r;function o(e){i=e}function a(){return i}function s(e){r=e}function c(){return r}n.d(t,{PQ:function(){return a},g8:function(){return c},jW:function(){return s},sV:function(){return o}})},9683:function(e,t,n){"use strict";n.d(t,{o:function(){return d}});var i=n(55524),r=n(31558);class o{constructor(){this.cacheMap=new Map}async has(e){return!!this.cacheMap[e]}async get(e){return this.cacheMap[e]}async set(e,t,n){return this.cacheMap[e]=t,!0}async mSet(e,t){return Object.keys(e).forEach((t=>{this.cacheMap[t]=e[t]})),!0}async del(e){delete this.cacheMap[e]}async itemCount(){return Object.keys(this.cacheMap).length}async reset(){this.cacheMap=new Map}}const a="__ServerCacheUpdateMap__";let s,c;const d=(0,r.N)()?null:{emitUpdate:async function(){if(!i.Gq.has(a))return;const e=i.Gq.get(a),t=[];return e.forEach(((e,n)=>{const r=c.mSet(e,n).then((()=>{const e=i.Gq.get(a);e&&e.delete(n)}));t.push(r)})),Promise.all(t)},initialize:function(e,t=!1){c=e,s=t},reset:async function(){await c.reset()},set:async function(e,t,n){if(s)return function(e,t,n){const r=i.Gq.get(a,(()=>new Map)),o=r.get(n);r.set(n,{...o,[e]:t})}(e,t,n);await c.set(e,t,n)},get:async function(e){return await c.get(e)},has:async function(e){return await c.has(e)},del:async function(e){return await c.del(e)},itemCount:async function(){return await c.itemCount()}};n.g.TEST_ENV&&!(0,r.N)()&&d.initialize(new o)},44192:function(e,t,n){"use strict";n.d(t,{Hj:function(){return a},Km:function(){return o},MO:function(){return i},hy:function(){return r}});const i="prg-1sw-projrec",r="prg-1sw-wv2bgup",o="prg-1sw-2wv2bgup",a="prg-1sw-3wv2bgup"},20395:function(e,t,n){"use strict";n.d(t,{Un:function(){return o}});var i=n(44192),r=n(21789);"object"!=typeof window||!window.chrome||window.chrome.webview;const o=()=>{const{shellFeedsExperienceInfo:e}=a()||{};if(!e)return!1;const{CurrentRequestTargetScope:t}=r.jG,n=t&&t.pageExperiments||[],o=0===e.buttonInteraction,s=e.isWebviewVisible;return n.includes(i.hy)?o:n.includes(i.Km)?!s:n.includes(i.Hj)?o||!s:!s&&o};function a(){return window.ShellFeedsApp}},93570:function(e,t,n){"use strict";n.d(t,{Iq:function(){return c},MD:function(){return a},gL:function(){return s}});var i=n(59967),r=n(19995);const o=new i.v("WidgetLoadTracker");function a(e){o.has(e)||("hidden"!==document.visibilityState?(0,r.c)((()=>o.set(e,!0))):o.set(e,!0))}const s=new i.v("WidgetAppState");var c;!function(e){e[e.IsDarkMode=1]="IsDarkMode",e[e.IsDashboardVisible=2]="IsDashboardVisible",e[e.ActionMenuStrings=3]="ActionMenuStrings",e[e.IsDynamicFeed=4]="IsDynamicFeed",e[e.SessionId=5]="SessionId",e[e.NonPeregrineWidgetTelemetryObject=6]="NonPeregrineWidgetTelemetryObject",e[e.FeedRegionWidgets=7]="FeedRegionWidgets",e[e.RecommendedWidgets=8]="RecommendedWidgets",e[e.DefaultPreviewType=9]="DefaultPreviewType",e[e.IsReauthRequired=10]="IsReauthRequired",e[e.IsWindowShown=11]="IsWindowShown",e[e.FeedRefreshPromise=12]="FeedRefreshPromise",e[e.Suspended=13]="Suspended",e[e.ClientLayoutVersion=14]="ClientLayoutVersion",e[e.IsLSCachedFeedUsed=15]="IsLSCachedFeedUsed",e[e.IsExpandedViewEnabled=16]="IsExpandedViewEnabled",e[e.DelayTtvrPromise=17]="DelayTtvrPromise",e[e.TaskbarLaunchState=18]="TaskbarLaunchState",e[e.IsPreferenceMigrationComplete=19]="IsPreferenceMigrationComplete",e[e.WidgetPinnedPreferences=20]="WidgetPinnedPreferences",e[e.IsFeedsShown=21]="IsFeedsShown",e[e.BoardsNavigationState=22]="BoardsNavigationState"}(c||(c={}))},87697:function(e,t,n){"use strict";n.d(t,{fy:function(){return ne},eW:function(){return te}});var i=n(7476),r=n(63927),o=n(10754),a=n(90215),s=n(23549),c=n(73298),d=n(81110),l=n(69233),u=n(58980),p=n(91730),h=n(62168),g=n(58608),m=n(74161),f=n(67213),v=n(31558),y=n(55524),S=n(54820),C=n(44672),w=n(65128),b=n(32400),T=n(13334),k=n(20434),P=n(21789),I=n(71778),A=n(92100),E=n(32810),x=n(23357),M=n(29597),L=n(54297),D=JSON.parse('{"nextPageUrl":"","sections":[{"region":"river","subSections":[{"dataTemplate":"msft-full-wide-one-card-five-col","layoutTemplate":"msft-full-wide-one-card-five-col","cards":[{"type":"followCarousel","isLocalContent":false,"galleryItemCount":0,"subCards":[],"subscriptionProductType":"undefined","position":0,"notificationState":"undefined","isWorkNewsContent":false,"isShowSelectMoreMessage":false}]},{"dataTemplate":"msft-full-wide-one-card-five-col","layoutTemplate":"msft-full-wide-one-card-five-col","cards":[{"type":"InterestManager","isLocalContent":false,"galleryItemCount":0,"subscriptionProductType":"undefined","position":0,"notificationState":"undefined","isWorkNewsContent":false}]}]}],"isPartial":false}'),R=JSON.parse('{"nextPageUrl":"","sections":[{"region":"river","subSections":[{"dataTemplate":"msft-full-wide-one-card-five-col","layoutTemplate":"msft-full-wide-one-card-five-col","cards":[{"type":"filteredChannels","isLocalContent":false,"galleryItemCount":0,"subCards":[],"subscriptionProductType":"undefined","position":0,"notificationState":"undefined","isWorkNewsContent":false,"isShowSelectMoreMessage":false}]},{"dataTemplate":"msft-full-wide-one-card-five-col","layoutTemplate":"msft-full-wide-one-card-five-col","cards":[{"type":"InterestManager","isLocalContent":false,"galleryItemCount":0,"subscriptionProductType":"undefined","position":0,"notificationState":"undefined","isWorkNewsContent":false}]}]}],"isPartial":false}'),F=n(37477),O=n(45870),B=n(50136),N=n(88826),$=n(36871);class U{constructor(){this.infoPaneCardCount=0,this.riverCardCount=0,this.rightrailCardCount=0,this.railCardCount=0,this.denseRiverCardCount=0,this.riverNativeAdRelativeCount=0,this.riverCmsAdRelativeCount=0,this.infopaneCmsAdCount=0,this.sectionIndex=0,this.mapRegionBasedWpoResponseForSuperFeed=(e,t,n,r,o)=>{if(!e||!e.sections.length)return{rawAdRegionTupleMap:_()};this.rawAdRegionTupleMap=_();const a={rawAdRegionTupleMap:this.rawAdRegionTupleMap},c=e.serviceContext?e.serviceContext.debugId:e.debugId,d=function(e){if(e.sections[0].region)return e;return{nextPageUrl:e.nextPageUrl,sections:[{region:"river",subSections:e.sections}],previews:e.previews,pageContext:e.pageContext}}(e),{nextPageUrl:l,sections:u,pageContext:p,previews:h}=d,g=this.riverCardCount,m=this.riverNativeAdRelativeCount;let f,v;const y=u.findIndex((e=>"cardData"===e.region));if(y>-1){const{cardsList:t,subSections:n}=H(e,g);f=t,v=n,u.splice(y,1)}return a.nextPageUrl=l,a.pageContext=p,a.previews=h,a.regions=u.map((e=>{const{subSections:a,region:d,requestedColumnCount:u}=e;let p;if(y>-1&&"river"===d){p=[{dataTemplate:undefined,layoutTemplate:undefined,cards:f.map((e=>this.convertCardForSuperFeed({...e,placement:void 0},d,c,void 0,t,n,r,o,g,m))),column:u,columnLayoutList:v}]}else p=null==a?void 0:a.map((({dataTemplate:e,layoutTemplate:a,cards:u,column:p})=>{if(u){const i={dataTemplate:e,layoutTemplate:a,cards:u.map((e=>this.convertCardForSuperFeed({...e,placement:void 0},d,c,void 0,t,n,r,o,g,m))),column:p};return this.sectionIndex++,i}"river"===d&&s.M0.sendAppErrorEvent({...i.gEs,message:"No cards were sent from WPO in river",pb:{...i.gEs.pb,customMessage:`debugId: ${c}, nextPageUrl: ${l}, column: ${p}, dataTemplate: ${e}, layoutTemplate: ${a}`}})})).filter((e=>void 0!==e));return{region:d,requestedColumnCount:u,sections:p}})),a.raw1sAdRegionTupleMap=this._raw1sAdRegionTupleMap,a.debugId=c,a},this.backfill1SAdWithNews=e=>{var t,n,r,o,a,s,c;if(null===(t=e.sections)||void 0===t||!t.length)return;const d=null===(n=e.sections.find((e=>"backup"===e.region)))||void 0===n||null===(r=n.subSections)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.cards,l=null===(a=e.sections.find((e=>"river"===e.region)))||void 0===a||null===(s=a.subSections)||void 0===s||null===(c=s[0])||void 0===c?void 0:c.cards;null==l||l.forEach(((e,t)=>{(e.type===F.PL.NativeAd&&A.c.getQueryParameterByName("mockNo1SNative",window.location.href)||e.type===F.PL.CmsAd&&A.c.getQueryParameterByName("mockNo1SCms",window.location.href))&&(e.data=null),e.type!==F.PL.NativeAd&&e.type!==F.PL.CmsAd||e.data||((0,N.OO)(null,i.paG,`Ad for ${e.type} not found in feed response.`,`cardData: ${JSON.stringify(e)}`),null!=d&&d.length?l[t]=d.shift():(0,N.OO)(null,i.G78,"Empty backup region"))}))}}get raw1sAdRegionTupleMap(){return this._raw1sAdRegionTupleMap||(this._raw1sAdRegionTupleMap=_()),this._raw1sAdRegionTupleMap}convertCardForSuperFeed(e,t,n,r,o,a=0,s=0,c,d=0,l=0){let u;if("river"===t?(this.riverCardCount++,u=this.riverCardCount):"rightrail"===t?(this.rightrailCardCount++,u=this.rightrailCardCount):"Rail"===t&&(this.railCardCount++,u=this.railCardCount),void 0!==e.wpoRank&&(e.wpoRank+=d),void 0!==e.wpoId&&(e.wpoId+=d),void 0!==e.wpoAdRank&&(e.wpoAdRank+=l),Object.values(F.PL).includes(e.type)||(0,N.OO)(null,i.nsS,`${e.type} undefined error, it is not in OneServiceMetadataType`),e.subCards){let t=B.uq.NotDenseCard;if(e.type===F.PL.Dense&&r===F.PL.Infopane?t=B.uq.IsInfopaneDenseCard:e.type===F.PL.Dense&&r!==F.PL.Infopane&&(t=B.uq.IsRiverDenseCard),e.type===F.PL.Infopane||e.type===F.PL.GroupedContent||e.type===F.PL.ColdStartArticleFreCard||e.type===F.PL.RewardsDailySet||e.type===F.PL.TabbedInfopaneCard||t!==B.uq.NotDenseCard)return this.convertComplexCardForSuperFeed(e,t,n,o,s);if("TopStories"===e.subType)return this.convertNestedCard(e);if(e.type===F.PL.NewsAnswerModule)return this.convertNewsGroupsCard(e)}if(B.Qu.includes(e.type))return e;if(F.TU.includes(e.type)){let n=u;return"river"===t&&(e.type===F.PL.NativeAd?this.riverNativeAdRelativeCount++:e.type===F.PL.CmsAd&&(this.riverCmsAdRelativeCount>=a?(e.type=F.PL.NativeAd,this.riverNativeAdRelativeCount++):this.riverCmsAdRelativeCount++),o&&(n=e.type===F.PL.FirstPartyAd?1:e.type===F.PL.NativeAd?this.riverNativeAdRelativeCount:this.riverCmsAdRelativeCount)),this.convertCardForAds(e,t,n)}try{const{augments:t,type:i,isBreaking:r,locale:o,category:a,images:s,topics:c=[],dataUrl:d,publishedDateTime:l,id:u,url:p,abstract:h="",title:g="",provider:m={},reasons:f,source:v,feed:y={},actions:S=[],externalVideoFiles:C=[],reactionStatus:w,commentStatus:b,reactionSummary:T,commentSummary:k,sourceId:P,topComments:I,topQuestions:A,highlights:E,colorSamples:x,isLocalContent:M,badges:L,relatedCards:D,recoDocMetadata:R,recoId:O,ri:N,offer:$,subType:U,videoMetadata:_,isWorkNewsContent:H,wpoMetadata:z,panoCaption:j,aiComments:K,height:Q,wpoRank:Z,wpoId:J}=e,X=V(s)||{},Y=c.find((e=>e.feedId===y.id&&e.locale===o)),ee=i===F.PL.EventInfopaneShoppingAI?q(p,/[/?]/):q(p);let te=W(m.logoUrl);!te&&m.logo&&m.logo.url&&(te=W(m.logo.url));const ne=S.map((e=>B.N[e]||e));return L&&L.some((e=>"followedPublisher"===e.type))&&ne.push("followedPublisher"),{augments:t,id:u,type:i,height:Q,wpoRank:Z,wpoId:J,metadata:{abstract:h,abstractLength:h.length,titleLength:g.length,category:a||ee[4],subCategory:ee[5],primaryImage:{height:X.height,width:X.width},locale:o,feed:{id:y.id},kicker:[y],actions:ne,reactionStatus:w,commentStatus:b,reactionSummary:T,commentSummary:k,topComments:I,topQuestions:A,highlights:E,reasons:f,source:v,relatedCards:D,panoCaption:j,topics:c,recoDocMetadata:R,recoId:O,ri:N,debugId:n,videoFiles:C,videoMetadata:_,wpoMetadata:z},cardContent:{id:u,type:G(i),title:g,aiComments:K,uriTitle:ee[6],abstract:h,isBreaking:r||0,tags:[Y||{}],provider:{id:m.id,name:m.name,logo:{id:te},profileId:m.profileId,logoUrl:m.logoUrl,subscribable:!1,lightThemeSVGLogo:m.lightThemeSVGLogo,darkThemeSVGLogo:m.darkThemeSVGLogo},category:{product:a,label:void 0},locale:o,images:[{id:W(X.url),height:X.height,width:X.width,caption:X.title,focalRegion:X.focalRegion,attribution:X.attribution,url:X.url,colorSamples:X.colorSamples}],panoCaption:j,videoFiles:C,publishedDateTime:l,kicker:g,sourceHref:d,destinationUrl:p,sourceId:P,colorSamples:x,isLocalContent:M,isWorkNewsContent:H,badges:L,topics:c},offer:$,subType:U}}catch(t){return e}}convertCardForAds(e,t,n){return e.type===F.PL.NativeAd?("river"===t?e.data?this.raw1sAdRegionTupleMap.get("river").push(e.wpoAdRank||n):this.rawAdRegionTupleMap.get("river").push(e.wpoAdRank||n):"rightrail"===t?this.rawAdRegionTupleMap.get("rightrail").push(n):"Rail"===t&&this.rawAdRegionTupleMap.get("Rail").push(n),e.data?{type:F.PL.NativeAd,regionIndex:e.wpoAdRank||n,data:e.data,id:e.id,height:e.height,wpoRank:e.wpoRank,wpoAdRank:e.wpoAdRank,wpoId:e.wpoId}:{type:F.PL.NativeAd,regionIndex:e.wpoAdRank||n,placement:{items:[]},height:e.height,wpoRank:e.wpoRank,wpoAdRank:e.wpoAdRank,wpoId:e.wpoId}):e.type===F.PL.CmsAd?("river"===t&&(e.data?this.raw1sAdRegionTupleMap.get("resriver").push(n):this.rawAdRegionTupleMap.get("resriver").push(n)),e.data?{type:F.PL.CmsAd,regionIndex:e.wpoAdRank||n,data:e.data,id:e.id,height:e.height,wpoRank:e.wpoRank,wpoAdRank:e.wpoAdRank,wpoId:e.wpoId}:{type:F.PL.CmsAd,regionIndex:e.wpoAdRank||n,placement:{items:[]},height:e.height,wpoRank:e.wpoRank,wpoAdRank:e.wpoAdRank,wpoId:e.wpoId}):e.type===F.PL.FirstPartyAd?("river"===t&&(e.data?this.raw1sAdRegionTupleMap.get("triver").push(e.wpoAdRank||n):this.rawAdRegionTupleMap.get("triver").push(e.wpoAdRank||n)),e.data?{type:F.PL.FirstPartyAd,regionIndex:e.wpoAdRank||n,data:e.data,id:e.id,height:e.height,wpoRank:e.wpoRank,wpoAdRank:e.wpoAdRank,wpoId:e.wpoId}:{type:F.PL.FirstPartyAd,regionIndex:e.wpoAdRank||n,placement:{items:[]},height:e.height,wpoRank:e.wpoRank,wpoAdRank:e.wpoAdRank,wpoId:e.wpoId}):e.type===F.PL.AmplifyAd||e.type===F.PL.BoostAdsBanner||e.type===F.PL.BoostAdsCoachmark||e.type===F.PL.EventSDCardAmplifyAds||e.type===F.PL.BoostAd?{type:e.type,regionIndex:e.wpoAdRank||n,data:e.data,id:`${e.type}-${e.section}-${n}`,wpoMetadata:e.wpoMetadata,height:e.height,wpoRank:e.wpoRank,wpoAdRank:e.wpoAdRank,wpoId:e.wpoId}:void 0}convertComplexCardForSuperFeed(e,t,n,i,r=0){const{id:o,type:a,title:s,wpoMetadata:c}=e;let d,l;try{d=e.subCards.map((e=>{if(t===B.uq.IsInfopaneDenseCard){if(e.type===F.PL.NativeAd)return this.rawAdRegionTupleMap.get("infopane-tab").push(this.infoPaneCardCount),{type:F.PL.NativeAd,regionIndex:this.infoPaneCardCount,placement:{items:[]}}}else if(t===B.uq.IsRiverDenseCard){if(this.denseRiverCardCount++,e.type===F.PL.NativeAd)return this.rawAdRegionTupleMap.get("dense-river").push(this.denseRiverCardCount),{type:F.PL.NativeAd,regionIndex:this.denseRiverCardCount,placement:{items:[]}}}else{if(this.infoPaneCardCount++,e.type===F.PL.NativeAd)return this.rawAdRegionTupleMap.get("infopane").push(this.infoPaneCardCount),{type:F.PL.NativeAd,regionIndex:this.infoPaneCardCount,placement:{items:[]}};if(e.type===F.PL.CmsAd){let t="resinfopane";return this.infopaneCmsAdCount>=r&&(e.type=F.PL.NativeAd,t="infopane"),this.rawAdRegionTupleMap.get(t).push(this.infoPaneCardCount),{type:e.type,regionIndex:this.infoPaneCardCount,placement:{items:[]}}}if(e.type===F.PL.BuyDirectAd){const t="infopane";return this.rawAdRegionTupleMap.get(t).push(this.infoPaneCardCount),{type:e.type,regionIndex:this.infoPaneCardCount,placement:{isBuyDirect:!0,items:[]}}}if(e.type===F.PL.EventInfopaneShoppingAI)try{const t=JSON.parse(e.data),n=(0,$.Z)(t);delete e.data,e={...n,...e}}catch(e){return}}if(e.type===F.PL.Dense||e.type===F.PL.TopicFeed||e.type===F.PL.TabbedInfopaneCardTab){let t=B.uq.IsInfopaneDenseCard;return a!==F.PL.Infopane&&a!==F.PL.TabbedInfopaneCard&&(t=B.uq.IsRiverDenseCard),this.convertComplexCardForSuperFeed(e,t,n,i)}return this.convertCardForSuperFeed(e,"none",n,a,i)}))}finally{var u;d=(null===(u=d)||void 0===u?void 0:u.filter((e=>!!e)))||[],l={id:o,type:a,subItems:d,metadata:{title:s},wpoMetadata:c,height:e.height,wpoRank:e.wpoRank,wpoId:e.wpoId},e.type===F.PL.TopicFeed&&(l={id:o,type:a,subItems:d,metadata:{title:s},wpoMetadata:c,feed:e.feed?e.feed:null,height:e.height,wpoRank:e.wpoRank,wpoId:e.wpoId})}return l}convertNestedCard(e){return e.subCards[0].type=e.type,e.subCards[0].subType=e.subType,e=e.subCards[0]}convertNewsGroupsCard(e){return{id:e.id,type:e.type,subType:e.subType,subCards:e.subCards||[],wpoMetadata:e.wpoMetadata,height:e.height,wpoRank:e.wpoRank,wpoId:e.wpoId}}resetCardCountForSuperFeed(){this.infoPaneCardCount=0,this.riverCardCount=0,this.rightrailCardCount=0,this.railCardCount=0,this.denseRiverCardCount=0,this.riverNativeAdRelativeCount=0,this.riverCmsAdRelativeCount=0}}function _(){return new Map([["rightrail",[]],["Rail",[]],["infopane",[]],["river",[]],["resinfopane",[]],["resriver",[]],["infopane-tab",[]],["dense-river",[]],["triver",[]]])}const H=(e,t)=>{const n=null==e?void 0:e.sections,i=n.find((e=>"river"===e.region)).subSections,r=n.find((e=>"cardData"===e.region)).cards,o=[];for(const e of i){var a;if(null!=e&&e.requestedColumnCount)null==e||null===(a=e.subSections)||void 0===a||a.forEach((e=>{e.cards||(e.cards=[]),e.cards.forEach((e=>{e.wpoId+=t,e.wpoRank+=t}))})),o[e.requestedColumnCount-1]=null==e?void 0:e.subSections}return{cardsList:r,subSections:o}};function W(e){if(!e)return"";const t=e.split("/");return V(t)&&t[t.length-1].replace(".img","")}function q(e,t="/"){return e?e.split(t):[]}function V(e,t=0){if(e)return e[t]}function G(e){switch(e){case F.PL.Article:return"ArticlePreview";case F.PL.Video:return"VideoPreview";case F.PL.Slideshow:return"SlideshowPreview";case F.PL.WebContent:return"WebContentPreview";default:return""}}var z=n(5674),j=n(45106),K=n(85663),Q=n(9498),Z=n(95378),J=n(19547);const X="gaming",Y=["cbypass","activityId","prerender","timeOut","caller","infopaneCount","edgExpMask","skipRetry","dhp","overlay"];function ee(e,t=[]){var n,r;if(null==e||!e.serviceContext)return;const o=t.filter((e=>T.Al.CurrentFlightSet.has(e))),a=(null===(n=e.serviceContext.fdHead)||void 0===n||null===(r=n.split(","))||void 0===r?void 0:r.map((e=>e.trim())))??[],c=o.filter((e=>!a.includes(e)));c.length>0&&s.M0.sendAppErrorEvent({...i.YVN,pb:{...i.YVN.pb,cetoRef:e.cetoRef,msEdgeRef:e.msEdgeRef,message:`Flight ids ${c.join(",")} missing in wpo fdhead.`}})}function te(){if(!(0,v.N)()||!window.ssrWpoData)return;const e=window.ssrWpoData;ee(e,["prg-wpo-bkpncbig","prg-wpo-ntpscssr"]);const{debugId:t,traceIdIndex:n,dddTmpl:i}=e;return(0,z.Dz)(t,!0),s.M0.addOrUpdateIdxId(n,!0),s.M0.addOrUpdateTmplString(i),delete window.ssrWpoData,e}class ne{constructor(e,t){this.shouldRetryInOtherDomain=!1,this.traceInfo=[],this.shouldResetRightRailPromise=!1,this.wpoRightRailPromise=new O.o,this.shouldResetRailPromise=!1,this.wpoRailPromise=new O.o,this.noContentRetryCount=0,this.maxContentRetryCount=5,this.isPartialResponse=e=>!!(e&&e.serviceContext&&e.serviceContext.preRenderDisabled),this.getAuthTrail=()=>{try{return(0,j.pD)()}catch{s.M0.sendAppErrorEvent({...i.evM,message:"Error throwed when getCompressedRecords doesn't return anything for NTP"})}},this.mapperHelper=new U,this.config=e,this.initializeRequest(),this.isXFeed=t}async fetch(e,t,n,r,o){let a=this.config.initialRequest;if(this.shouldResetRightRailPromise&&(this.wpoRightRailPromise=new O.o,this.shouldResetRightRailPromise=!1),this.shouldResetRailPromise&&(this.wpoRailPromise=new O.o,this.shouldResetRailPromise=!1),e&&(e.feedId||e.nextPageUrl||(e.feedId=a.feedId),a={...a,...e}),!a)return s.M0.sendAppErrorEvent({...i.eD0,message:"default WpoService fetch configuration was invalid"}),this.responseStatus=b.F_.InvalidRequest,{status:this.responseStatus,isStatic:this.isStatic,regions:void 0,rawAdRegionTupleMap:new Map([["rightRail",[]],["Rail",[]],["infopane",[]],["river",[]],["resinfopane",[]],["resriver",[]],["infopane-tab",[]]])};const d=await this.fetchRiverSectionFeedLayoutData(a,t,n);return t===c.V.init&&d&&d.serviceContext&&((0,k.l)(d.serviceContext),T.Al.CurrentFlightSet.has("1s-ads-ntpriver")&&ee(d,["1s-ads-ntpriver","prg-ad-ridoverride"])),t!==c.V.init||(0,v.N)()||(d?J.SI.setSSRInitialFeedResponse(d):s.M0.sendAppErrorEvent({...i.y6M,pb:{...i.y6M.pb,requestId:a.requestId}})),this.handleResponseMapForSuperFeed(a,d,r,o)}overrideAppErrorSeverity(e){if("hub"===P.jG.AppType&&[i.vas,i.ck_,i.KEP,i.QJe].includes(e))return r.z.Critical}sendAppErrorWithSeverityOverride(e,t){const n=this.overrideAppErrorSeverity(e);n&&(t.severity=n),s.M0.sendAppErrorEvent(t)}handleResponseMapForSuperFeed(e,t,n,r){var o;if(this.isPartialResponse(t))return{status:this.responseStatus,isStatic:!1,rawAdRegionTupleMap:new Map([["rightRail",[]],["Rail",[]],["infopane",[]],["river",[]],["resinfopane",[]],["resriver",[]],["infopane-tab",[]]]),isPartial:t.isPartial,serviceContext:t.serviceContext,previews:t.previews};const a=new Set(["msft-dense-nine-card"]);(null==t||null===(o=t.sections)||void 0===o?void 0:o.length)>0&&"river"===t.sections[0].region&&t.sections[0].subSections.forEach(((e,n)=>{var i;a.has(e.layoutTemplate)&&(t.sections[0].subSections[n].cards=[{type:"densetab",isLocalContent:!1,galleryItemCount:0,subCards:e.cards}]),(null==e||null===(i=e.cards)||void 0===i?void 0:i.length)>0&&e.cards.forEach(((e,i)=>{var r,o;if((null==e?void 0:e.type)===F.PL.Infopane&&(null==e||null===(r=e.subCards)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.type)===F.PL.TabbedInfopaneCardTab){const r=function(e){const t=[];let n=[];for(let i=0;i<e.length;i++){const r=e[i];if(r.type==F.PL.TabbedInfopaneCardTab)n.push(r);else if(r.type==F.PL.TopicFeed)n.push(r);else{if(n.length>0){const e={type:F.PL.TabbedInfopaneCard,subCards:n};t.push(e),n=[]}t.push(r)}}return t}(null==e?void 0:e.subCards);t.sections[0].subSections[n].cards[i]={...e,subCards:r}}}))}));const c=this.mapperHelper.mapRegionBasedWpoResponseForSuperFeed(t,this.config.useRelativeAdPlacement,n,r,this.config.auctionRidOverride&&!(0,Q.TR)()),{nextPageUrl:d,regions:l,rawAdRegionTupleMap:u,raw1sAdRegionTupleMap:p,previews:h,pageContext:g,debugId:m}=c;let f;this.responseStatus===b.F_.Success?(f={...e,nextPageUrl:d},this.noContentRetryCount=0):this.responseStatus===b.F_.Failed?(f={...e},this.noContentRetryCount=0):this.responseStatus===b.F_.NoContent&&(this.noContentCannotRetry()||(f={...e},this.noContentRetryCount++),s.M0.sendAppErrorEvent({...i.a$Z,pb:{...i.a$Z.pb,isFirstPage:!e.nextPageUrl,url:e.nextPageUrl,requestId:e.requestId,status:this.responseStatus,noContentRetryCount:this.noContentRetryCount}}));return{regions:l,nextPageRequest:f,rawAdRegionTupleMap:u,raw1sAdRegionTupleMap:p,status:this.responseStatus,isStatic:this.isStatic,traceIdIndex:t?t.traceIdIndex:void 0,metadata:t?t.metadata:void 0,userType:t?t.userType:void 0,previews:h,pageContext:g,debugId:m,serviceContext:t?t.serviceContext:void 0,responseSource:t?t.responseSource:void 0}}async fetchRiverSectionFeedLayoutData(e,t,n){const r=(null===T.Al||void 0===T.Al?void 0:T.Al.IsPrerender)||this.config.disableWorker,a=t===c.V.init||t===c.V.refresh;if((0,v.N)()&&a){var l;const t=te();if(t)return t&&t&&t.sections&&t.sections.length>0?this.responseStatus=b.F_.Success:this.responseStatus=b.F_.NoContent,y.Gq.set("__isSSRWpoFeedConsumed__",!0),{...t,responseSource:b.H3.FromSSR};if(!y.Gq.has("__isSSRWpoFeedConsumed__")&&null!==(l=window.ssrLayoutState)&&void 0!==l&&l.selectedFeedDisplaySetting){const t=window.ssrLayoutState.selectedFeedDisplaySetting;["off","onscroll","headingsonly"].includes(t)||s.M0.sendAppErrorEvent({...i.W1B,pb:{...i.W1B.pb,requestId:e.requestId}})}}if(t!==c.V.init||this.isXFeed||r||e.feedName===X&&e.dontUseWorkerForFeed)this.checkWebWorkerUrl=!1;else{this.checkWebWorkerUrl=!1;let t="myfeed";e.feedName===X&&(t="gaming"),"following"===e.feedName&&(t="following");const i=this.config.removeTimeoutWebworker?void 0:1e3;n&&n();const r=await(0,I.ot)({id:t},i),c=r&&r.payload;if(c){const e=m.sj.MultiColumn;if(m.sj.MultiColumn===e&&r.fetched){this.checkWebWorkerUrl=!0,this.responseStatus=b.F_.Success;(0,o.Ou)().isFeedFromWW=1;const e=c.traceId;if(c.traceIdIndex=this.addOrUpdateIdxId(e,a),(0,v.N)()){const e=this.getAuthTrail();(0,f.mY)(c.traceId,c.debugId,e)}return c.tmpl&&s.M0.addOrUpdateTmplString(c.tmpl),p.n.publish(p.j.userIsSignedIn,{isSignedIn:c.isSignedIn,src:"WW-wcp"}),{...c,responseSource:b.H3.FromWW}}}}if(J.SI.enableEarlyMainFeedRequest&&t===c.V.init){const t=(0,v.N)()?1e4:void 0,i=await J.SI.getEarlyWpoFeedData(t);if(this.responseStatus=null==i?void 0:i.responseStatus,i&&i&&i.sections&&i.sections.length>0?this.responseStatus=b.F_.Success:this.responseStatus=b.F_.NoContent,J.SI.enableEarlyMainFeedRequest=!1,this.responseStatus===b.F_.Success||!(0,v.N)())return{...i,responseSource:b.H3.FromEarlyResponse};if(!e.skipRetry){const t=await this.fetchFromWpoService(e,a,n);if(t)return{...t,responseSource:b.H3.FromServer}}}else{const t=await this.fetchFromWpoService(e,a,n);if(t)return{...t,responseSource:b.H3.FromServer}}if(this.shouldRetryInOtherDomain){e.domainOverride=d.hM,e.requestPathOverride=d.hZ;const t=await this.fetchFromWpoService(e,a,void 0,!0);if(t)return{...t,responseSource:b.H3.FromServer}}return this.getCachedResponse(e)}async fetchFromWpoService(e,t,n,r=!1){var c,p,m,k;const F=null===T.Al||void 0===T.Al?void 0:T.Al.IsPrerender,O=(0,Q.TR)();!(0,v.N)()&&this.config.requestToOrigin&&(e.domainOverride=d.hM,e.requestPathOverride=d.hZ),this.config.enableResetServiceURL&&(e.domainOverride=d.kJ);const B=!t&&e.paginationTimeoutMs?e.paginationTimeoutMs:e.timeoutMs,N=O&&t?2e3:B,$=P.jG.ShouldUseFdheadQsp?null===(c=P.jG.CurrentRequestTargetScope)||void 0===c||null===(p=c.pageExperiments)||void 0===p?void 0:p.join(","):void 0;let U;(0,v.N)()&&(U=!(window&&window.chrome&&window.chrome.embeddedSearch),s.M0.addOrUpdateTmplProperty("privatew",`${U}`));const _=window&&`${window.innerWidth}x${window.innerHeight}`,H={...e,audienceMode:null===(m=P.jG.CurrentRequestTargetScope)||void 0===m?void 0:m.audienceMode,enableRightRailColumn:e.powerRightRailWithWpo,fdhead:$,isXFeed:this.isXFeed,nextPageUrl:e.useNextPageUrl&&e.nextPageUrl,requestType:h.xd.wpoService,timeoutMs:e.query&&e.customFeedTimeoutMs?e.customFeedTimeoutMs:N,refreshType:O&&!(0,f.ZE)()?h.Rx.Bgtask:void 0,isDhp:O&&this.isDhp(),isRetry:r,private:U,viewportSize:_,enableWpoAdPlacements:this.config.auctionRidOverride&&!O,adsTimeout:this.config.auctionRidOverride&&600},W=A.c.getQueryParameterByName("ssrFeedTimeOut",window.location.href);!(0,v.N)()&&W&&(H.timeoutMs=parseInt(W));const q=await g.q.requestInit(H),V=await g.q.buildServiceRequestURL(H);S.$D.addTelemetryTracingQueryParam(V);const G=decodeURIComponent(V.href);this.requestQueryParams=new E.h(V.search),e.serviceUrl=G;if("1"===A.c.getQueryParameterByName("logwporeq",window.location.href)){const e={};new Headers(null==q?void 0:q.headers).forEach(((t,n)=>{"Cookie"!==n&&(e[n]=t)})),s.M0.sendAppErrorEvent({...i.vif,pb:{...i.vif.pb,headers:JSON.stringify(e),url:G,credentials:q.credentials,referrer:q.referrer}})}const j=(0,o.Ou)();let K;if(j[l.p.wpoCallStart]=Math.round((0,o.UE)()),V.search=this.requestQueryParams.toString(),this.checkWebWorkerUrl){const e=(0,I.Fr)("WebWorkerInitFeedUrl");e&&e.payload&&e.payload!==V.href&&s.M0.sendAppErrorEvent({...i.MUC,message:"Wpo feed fetch url does not match web worker"})}const J=e.useNextPageUrl&&e.nextPageUrl,Y=!J;let ee,te,ne,ie;try{let c;c=(0,v.N)()?(null==e?void 0:e.overrideCSRTimeoutInMs)||1e4:(null==e?void 0:e.overrideSSRTimeoutInMs)||800,n&&n(),ie=(()=>{let e=0;const t=Y?i.TRT:i.TzH;return setInterval((()=>{e+=1,s.M0.sendAppErrorEvent({...t,pb:{...t.pb,url:G,isFirstPage:Y,activityId:P.jG.ActivityId,isPrerender:O},message:`Request didn't finish in ${5e3*e}ms`})}),5e3)})();"header"===y.Gq.get("oneSvcUniTunMode")&&q&&q.headers&&(q.headers[x.Yu.uniFeatTun]=await S.$D.getUniFeatTunHeader());const d=await(0,C.w)((()=>(0,v.N)()?(0,C.O)(G,q,c,e.skipRetry):(0,M.Sm)(G,c,q,void 0,void 0,!0)),"WpoCardProvider.fetch",c,e.skipRetry);let p,h,g,m,w,T,I;if(ie&&(clearInterval(ie),ie=null),d){if("1"===A.c.getQueryParameterByName("logwpores",window.location.href)){var re;const e={};null===(re=d.headers)||void 0===re||re.forEach(((t,n)=>e[n]=t)),s.M0.sendAppErrorEvent({...i.v5s,pb:{...i.v5s.pb,headers:JSON.stringify(e),reqHeaders:JSON.stringify(q.headers),ok:d.ok,status:d.statusText,body:d.body}})}const{ok:n,status:r,statusText:o,headers:a}=d;if(ee=a&&a.get("ddd-debugid"),te=a&&a.get("x-ceto-ref"),ne=a&&a.get("x-msedge-ref"),y.Gq.set("OneServiceResponseDebugId",ee),"following"===e.feedName){const n=new URLSearchParams(V.search),o="activityId",a=n.get(o)||"";if(a&&a!=P.jG.ActivityId&&s.M0.sendAppErrorEvent({...i.jQb,message:"ActivityId mismatched",pb:{...i.jQb.pb,clientActivityId:P.jG.ActivityId,serviceSideActivityId:a,debugId:ee}}),(204===r||404===r)&&Y&&t&&!e.feedId){var oe,ae,se;const t="skype-desktop-following"===e.ocid?D:R;return 204===r&&null!=t&&null!==(oe=t.sections)&&void 0!==oe&&null!==(ae=oe[0].subSections)&&void 0!==ae&&null!==(se=ae[0].cards)&&void 0!==se&&se[0]&&(t.sections[0].subSections[0].cards[0].isShowSelectMoreMessage=!0),t}}n?e.disableContent||204!==r||(p=Y?i.bri:i.e88,m=!1):(p=e.disableContent?i.k28:Y?i.vas:i.azB,"outlookchannels"===e.feedName&&500===r&&(p=i.SPE),"following"!==e.feedName||204!==r&&404!==r?m=!0:(p=i.wyy,m=!1),h=r,g=o)}else p=e.disableContent?i.k28:Y?i.vas:i.azB,m=!0;if(p){var ce;const e=(0,Z.Z)(q,"headers.Authorization"),t=null==d||null===(ce=d.headers)||void 0===ce?void 0:ce.get("ddd-auth-features"),n=null==t?void 0:t.includes("IsBot:1"),o={...p,pb:{...p.pb,url:decodeURIComponent(V.href),requestHeaders:JSON.stringify(e&&e.headers),status:h,statusText:g,isFirstPage:Y,activityId:P.jG.ActivityId,isBot:n,isInitializedAsPrerenderPage:F,isPrerender:O,isRetriedRequest:r,debugId:ee}};if(this.sendAppErrorWithSeverityOverride(p,o),m)return void(this.responseStatus=b.F_.Failed);if(!(0,v.N)()&&p===i.bri)return void(this.responseStatus=b.F_.NoContent)}const E=d.headers&&d.headers.get("X-Statics-Fallback");if(d.headers){if(E){const e=O?i.V_e:i.vCG;s.M0.sendAppErrorEvent({...e,pb:{...i.vCG.pb,url:decodeURIComponent(V.href),isFirstPage:Y,activityId:P.jG.ActivityId,isPrerender:O,isInitializedAsPrerenderPage:F,debugId:ee,isRetriedRequest:r},message:"Fell back to static content on the feeds call"}),this.isStatic=!0}s.M0.addOrUpdateCustomProperty("debugId",ee);const e=d.headers.get(x.rD.traceId);if(w=this.addOrUpdateIdxId(e,t),(0,z.Dz)(ee,!1),(0,v.N)()){const t=this.getAuthTrail();(0,f.mY)(e,ee,t)}T=d.headers.get(x.rD.userType)}if(!J){const e=j[l.p.wpoCallStart],t=j[l.p.wpoResponseBack]=Math.round((0,o.UE)());j[l.p.feedRequestFG]=t-e,(0,a.QP)({name:l.p.feedRequestFG,startTime:e,endTime:t})}if(![i.bri,i.e88,i.RSD].includes(p)){var de,le;const n=(0,v.N)()&&(0,o.UE)();if(K=await d.json(),K&&K.serviceContext&&K.serviceContext.tmpl&&(I=K.serviceContext.tmpl,s.M0.addOrUpdateTmplString(I)),n&&j&&(j.FeedResponseJsonReadTime=Math.round((0,o.UE)()-n)),null!==(de=K)&&void 0!==de&&de.swCacheEnabled){s.M0.sendAppErrorEvent({...i.Y6E,pb:{...i.Y6E.pb,url:decodeURIComponent(V.href),isFirstPage:Y,activityId:P.jG.ActivityId,isPrerender:O,isInitializedAsPrerenderPage:F,debugId:ee,isRetriedRequest:r,cacheAgeSeconds:K.cacheAgeSeconds},message:"Service Worker Cached Data Triggered"});let e=null,t="";switch(null===(k=K)||void 0===k?void 0:k.cacheTriggeredReason){case i.RDJ.id:e=i.RDJ,t="Service Worker Triggered due to fetch error: "+K.cacheTriggeredErrorMessage;break;case i.Nyv.id:e=i.Nyv,t="Service Worker Triggered due to wpo service error";break;case i.Vm4.id:e=i.Vm4,t="Service Worker Triggered due to Status 204 no content";break;case i.npe.id:e=i.npe,t="Service Worker Triggered due to static content loaded";break;case i.Q0t.id:e=i.Q0t,t="Service Worker Triggered due to wpo service returns empty section";break;case i.dAd.id:e=i.dAd,t="Service Worker Triggered due to static fallback returns empty section";break;case i.zo9.id:e=i.zo9,t="Service Worker Triggered due to network timeout"}e&&s.M0.sendAppErrorEvent({...e,pb:{...e.pb,url:decodeURIComponent(V.href),isFirstPage:Y,activityId:P.jG.ActivityId,isPrerender:O,isInitializedAsPrerenderPage:F,debugId:ee,isRetriedRequest:r,cacheAgeSeconds:K.cacheAgeSeconds},message:t})}if(K.traceIdIndex=w,K.userType=T,K.debugId=ee,K.cetoRef=te,K.msEdgeRef=ne,K.dddTmpl=I,"following"===e.feedName&&200===d.status&&Y&&t){const t="skype-desktop-following"===e.ocid?D:R;if(!(K.sections&&K.sections.some((e=>"river"===e.region)))&&K.sections&&t&&t.sections&&t.sections.length){const e=K.sections.filter((e=>"overlay"===e.region));e&&e.length&&K.sections.push(t.sections[0])}}if(e.feedName===X&&200===d.status&&Y&&t&&(0,v.N)()&&null!==(le=K.serviceContext)&&void 0!==le&&le.tmpl&&!(0,L.$o)().getObject(u.d.GamingFeedEngagement))try{const e=Math.floor((new Date).getTime()/1e3),t=K.serviceContext.tmpl.split(";"),n={};for(let e=0;e<t.length;e++)t[e].includes("gamingFeedEngagementCount30D")&&t[e].split(",").forEach((e=>{const t=e.split(":"),[i,r]=t,o=r?Number.parseInt(r,10):null;"gamingFeedEngagementSum7D"!==i&&"gamingFeedEngagementCount7D"!==i&&"gamingFeedEngagementSum30D"!==i&&"gamingFeedEngagementCount30D"!==i||null===o||(n[i]=o)}));n.lastUpdated=e;const i=5;Object.keys(n).length===i&&(0,L.$o)().setObject(u.d.GamingFeedEngagement,n)}catch(e){}if(!(e.disableContent||this.isPartialResponse(K)||K.sections&&K.sections.length>0)){let t=E?i.hqX:i.Fh_;"following"===e.feedName&&(t=i.wyy),s.M0.sendAppErrorEvent({...t,pb:{...t.pb,url:decodeURIComponent(V.href),isFirstPage:Y,activityId:P.jG.ActivityId,isPrerender:O,isInitializedAsPrerenderPage:F,debugId:ee,isRetriedRequest:r},message:"Empty Section on the feed call"})}}}catch(t){ie&&(clearInterval(ie),ie=null);const n=["Service Request Timed out","Fetch for https://"],o=["TypeError: Failed to fetch"];let a;const s=(0,w.fK)();if(this.shouldRetryInOtherDomain=Y&&!e.domainOverride&&!s&&!(!(0,v.N)()&&this.config.requestToOrigin),n.some((e=>{var n;return null==t||null===(n=t.message)||void 0===n?void 0:n.includes(e)}))){const e=O?i.LLm:i.KEP;a=Y?e:i.VPR,a===i.KEP&&this.shouldRetryInOtherDomain&&!r&&(a=i.YLV)}else a=o.some((e=>{var n;return null==t||null===(n=t.message)||void 0===n?void 0:n.includes(e)}))?this.shouldRetryInOtherDomain?i.iB1:i.ck_:this.shouldRetryInOtherDomain?i.CDI:i.QJe;const c=(0,Z.Z)(q,"headers.Authorization"),d={...a,message:"Error while fetching WpoService response",pb:{...a.pb,customMessage:`Error: ${t}`,url:decodeURIComponent(V.href),requestHeaders:JSON.stringify(c.headers),isFirstPage:Y,activityId:P.jG.ActivityId,isPrerender:O,isInitializedAsPrerenderPage:F,domainOverride:e.domainOverride??"",isRetry:this.shouldRetryInOtherDomain,debugId:ee,isRetriedRequest:r,isRetryBackupDomainFlight:s}};return this.sendAppErrorWithSeverityOverride(a,d),void(this.responseStatus=b.F_.Failed)}if(K&&K&&K.sections&&K.sections.length>0)this.responseStatus=b.F_.Success;else if(this.isPartialResponse(K))this.responseStatus=b.F_.Success;else if(this.responseStatus=b.F_.NoContent,!(0,v.N)())return;return"1"===A.c.getQueryParameterByName("testHero",window.location.href)&&K.sections.forEach((e=>{var t;"hero"===e.region&&null!==(t=e.subSections)&&void 0!==t&&t.length&&(e.subSections[0].dataTemplate="msft-full-wide-one-card-five-col",e.subSections[0].layoutTemplate="msft-full-wide-one-card-five-col")})),!this.config.auctionRidOverride||(0,Q.TR)()||(0,v.N)()||this.mapperHelper.backfill1SAdWithNews(K),K}async getCachedResponse(e){if((e.skipRetry||e.enableCachedResponseFallback)&&(0,v.N)()&&window.caches&&e.serviceUrl&&e.serviceWorkerCachePrefix)try{const n=(await caches.keys()).find((t=>t.startsWith(e.serviceWorkerCachePrefix)));if(!n)return;const r=await caches.open(n);if(!r)return;const o=this.normalizeUrl(e.serviceUrl),a=await r.keys()||[],c=a.filter((e=>e.url&&this.normalizeUrl(e.url)===o));for(const e of c)try{const n=await r.match(e.url),o=await n.json();if(o){var t;const e=Date.parse(null===(t=n.headers)||void 0===t?void 0:t.get("date")),r=isNaN(e)?"":(Date.now()-e)/1e3;return s.M0.sendAppErrorEvent({...i.Smg,pb:{...i.Smg.pb,cacheAgeSeconds:r}}),{...o,responseSource:b.H3.FromCache}}}catch(e){}s.M0.sendAppErrorEvent({...i.Rgo,pb:{...i.Rgo.pb,numCachedRequests:a.length,numMatches:c.length,serviceUrl:e.serviceUrl}})}catch(t){s.M0.sendAppErrorEvent({...i.Rgo,message:"An error occurred while retrieving a cached response. "+t.message,pb:{...i.Rgo.pb,isFirstPage:!e.nextPageUrl,url:e.serviceUrl,requestId:e.requestId,stack:t.stack}})}}normalizeUrl(e){try{const t=new URL(e);Y.forEach((e=>t.searchParams.delete(e)));return decodeURIComponent(t.toString()).replace("/serviceak/","/service/").replace("api.msn.com/","assets.msn.com/").replace("api.msn.cn/","assets.msn.cn/")}catch(e){return""}}clearCache(){this.mapperHelper.resetCardCountForSuperFeed()}initializeRequest(){const{initialRequest:e}=this.config;null!==e&&(0,K.isNullOrUndefined)(e.useNextPageUrl)&&(e.useNextPageUrl=!0)}addOrUpdateIdxId(e,t){return s.M0.addOrUpdateIdxId(e,t)}getResponseStatus(){return this.responseStatus}_requestQueryParams(){return this.requestQueryParams}isDhp(){var e;return(null===(e=window.location.search)||void 0===e?void 0:e.indexOf("startpage=1"))>-1}noContentCannotRetry(){return this.noContentRetryCount>=this.maxContentRetryCount}}},32400:function(e,t,n){"use strict";var i,r,o;n.d(t,{F_:function(){return i},H3:function(){return r}}),function(e){e[e.InvalidRequest=0]="InvalidRequest",e[e.Success=1]="Success",e[e.NoContent=2]="NoContent",e[e.Failed=3]="Failed"}(i||(i={})),function(e){e[e.FromSSR=0]="FromSSR",e[e.FromCache=1]="FromCache",e[e.FromWW=2]="FromWW",e[e.FromEarlyResponse=3]="FromEarlyResponse",e[e.FromServer=4]="FromServer"}(r||(r={})),function(e){e.river="river",e.rightRail="rightrail",e.Rail="Rail"}(o||(o={}))},50136:function(e,t,n){"use strict";n.d(t,{N:function(){return o},Qu:function(){return a},uq:function(){return i}});var i,r=n(37477);!function(e){e[e.IsInfopaneDenseCard=0]="IsInfopaneDenseCard",e[e.IsRiverDenseCard=1]="IsRiverDenseCard",e[e.NotDenseCard=2]="NotDenseCard"}(i||(i={}));const o={liked:"like",unliked:"unlike",saved:"save"},a=[r.PL.AutosCarousel,r.PL.AutosEntityList,r.PL.AutosGarageCard,r.PL.BeaconProviderUpsell,r.PL.BingDailyQuizCard,r.PL.BingHealthCovid19StatsCard,r.PL.BingHealthFitnessCard,r.PL.BingThisOrThatCard,r.PL.BingVideoCarousel,r.PL.CasualGamesCarousel,r.PL.ChannelCarousel,r.PL.ChannelFilterCard,r.PL.CommunityCard,r.PL.CommuteCard,r.PL.CompanyNewsCard,r.PL.DigestCard,r.PL.DonationNpoCard,r.PL.EdgeShoppingCard,r.PL.Elections,r.PL.EntertainmentPremierCard,r.PL.EsportsCasualGames,r.PL.EsportsLiveStream,r.PL.EsportsMatch,r.PL.EsportsTournament,r.PL.EventSDCardElectionMIT1,r.PL.EventSDCardElectionMIT2,r.PL.EventSDCardElectionMIT3,r.PL.EventSDCardOscarsPrm,r.PL.EventSDCardShopping,r.PL.EventSDCardSportsMIT1,r.PL.EventSDCardSportsMIT2,r.PL.EventSDCardSportsMIT3,r.PL.EventSDCardWorldCup,r.PL.EventSDCardWorldCup2,r.PL.FinanceHeroMarket,r.PL.FinanceHeroNews,r.PL.FinanceHeroMovers,r.PL.FinanceHerowlsummary,r.PL.FinanceHeroSuggested,r.PL.FinanceHeroWatchlistIdeas,r.PL.FinanceHeroUpcomingEarnings,r.PL.FinanceHeroCurrencies,r.PL.FinanceHeroCrypto,r.PL.GamingClip,r.PL.GamingClipsCarousel,r.PL.GamingCompete,r.PL.GamingGamerModeUpsellCard,r.PL.GamingHighlight,r.PL.GamingHighlightClipsCarousel,r.PL.GamingHighlightsCarousel,r.PL.GamingInterestGroup,r.PL.GamingLiveStream,r.PL.GamingLiveStreamCarousel,r.PL.GamingMatch,r.PL.GamingRecentlyPlayed,r.PL.GamingRecommendedGames,r.PL.GamingReddit,r.PL.GamingRewards,r.PL.GamingTournament,r.PL.GamingUpcomingGames,r.PL.GamingVideoCarousel,r.PL.GamingVod,r.PL.GroceryCouponSdCard,r.PL.HealthTipCard,r.PL.Horoscope,r.PL.HotListCard,r.PL.IndustryNewsCard,r.PL.Inspiration,r.PL.InterestManagementCard,r.PL.LeadGenCard,r.PL.LinkedInCard,r.PL.LocalNewsFeed,r.PL.Lottery,r.PL.MangaCard,r.PL.Marketplace,r.PL.MarketplaceEvent,r.PL.MicrosoftFeedCard,r.PL.MobileRewardsCard,r.PL.MobileShoppingCard,r.PL.MobileShoppingCard2,r.PL.MobileShoppingCard3,r.PL.MobileShoppingCard4,r.PL.MoneyCrypto,r.PL.MoneyInfo,r.PL.MoneyMarketBrief,r.PL.MoneyPreWL,r.PL.MoneyTopicStripe,r.PL.MyBriefRiverCard,r.PL.OnThisDay,r.PL.PrayerTimesCard,r.PL.PrismCarouselCard,r.PL.Qna,r.PL.RealEstateCard,r.PL.Recipes,r.PL.RecommendedInterests,r.PL.RecommendedSearchCarousel,r.PL.Rewards,r.PL.RewardsDailyCheckinCard,r.PL.RewardsDailySet,r.PL.RichCalendarCard,r.PL.SectionHeader,r.PL.ShoppingProng2c,r.PL.ShoppingCard,r.PL.ShoppingCarousel,r.PL.ShoppingRiver,r.PL.SportsHeroFre,r.PL.SportsHeroMatchStatistics,r.PL.SportsHeroNews,r.PL.SportsHeroSeasonStatistics,r.PL.SportsHeroStandingsRankings,r.PL.SportsHeroTeamVsTeam,r.PL.SportsHeroVideo,r.PL.SportsMatch,r.PL.SportsOlympics,r.PL.SportsTopicStripe,r.PL.StockQuote,r.PL.SuperListCard,r.PL.TabbedInfopaneCard,r.PL.TopStories,r.PL.TopicFeed,r.PL.TrafficDelays,r.PL.TrafficIncidents,r.PL.TrafficCameras,r.PL.TrafficCamerasWithSummary,r.PL.TravelTimesWithSummary,r.PL.TrafficMap,r.PL.TrafficNews,r.PL.TrafficInfo,r.PL.Transit,r.PL.TravelDestinationCard,r.PL.TravelDestinationCarouselCard,r.PL.TravelInspirationCard,r.PL.Trending,r.PL.TrendingInTenMinutes,r.PL.TrendingSearchCard,r.PL.TrendingTopics,r.PL.Upsell,r.PL.UserInterestNTPProvider,r.PL.UserInterestProvider,r.PL.UserInterestTopic,r.PL.UserInterestTopicAndProvider,r.PL.VideoShoppingCard,r.PL.VideoShoppingCarouselCard,r.PL.WeatherSummary,r.PL.WeatherHero,r.PL.WidgetsNotificationsCard,r.PL.quizcard]},59887:function(e,t,n){"use strict";function i(e,t){const{audienceMode:n="",locale:i={},pageType:r=""}=t||{},o=i.content??i,{language:a,market:s}=o;return`wpo_data_ ${n}_${a}_${s}_${r}_${e}`}n.d(t,{_:function(){return i}})},53629:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var i=n(88672),r=n(59887),o=n(21789),a=n(54297);const s=new class{constructor(){this.localStorage=new Map,this.wpoTreatmentTypeMap=new Map,this.isLoaded=new Map}getWpoTreatments(e){const t=(0,r._)(o.jG.AppType,o.jG.CurrentRequestTargetScope);if(!this.isLoaded.get(t)||e){this.wpoTreatmentTypeMap.set(t,new Map);const e=this.wpoTreatmentTypeMap.get(t);for(const t in i._h)if(isNaN(Number(t))){const n=i._h[t];null==e||e.set(n,[])}const{treatments:r}=(0,a.$o)().getObject(t)||{};if(this.localStorage.set(t,r||[]),r)for(let t=0;t<r.length;t++){var n;const i=null===(n=r[t])||void 0===n?void 0:n.type;var s;if(i)null==e||null===(s=e.get(i))||void 0===s||s.push(r[t])}this.isLoaded.set(t,!0)}return this.localStorage.get(t)}getWpoTreatmentsWithType(e,t){var n;const i=(0,r._)(o.jG.AppType,o.jG.CurrentRequestTargetScope);return this.isLoaded.get(i)&&!t||this.getWpoTreatments(t),null===(n=this.wpoTreatmentTypeMap.get(i))||void 0===n?void 0:n.get(e)}}},88672:function(e,t,n){"use strict";var i;n.d(t,{_h:function(){return i}}),function(e){e.eventGleam="eventGleam",e.topSites="topsites",e.layoutPromotion="layoutPromotion",e.topSitesPromotion="topsitesPromotion",e.topsitesCollapse="topsitesCollapse",e.recommendedsitesCollapse="recommendedsitesCollapse",e.bellCoachMark="bellCoachMark",e.backupRegionStatus="backupRegionStatus",e.searchBoxCollapse="searchBoxCollapse",e.followedTopics="followedTopics",e.feedContextualFeedback="feedContextualFeedback",e.animationControl="animationControl",e.pinProngCoachMark="pinProngCoachMark",e.shorelineTrigger="shorelineTrigger",e.topNavPivotsPromotion="pivotNav"}(i||(i={}))},59044:function(e,t,n){"use strict";n.d(t,{u:function(){return p}});var i=n(33940),r=n(7476),o=n(23549),a=n(55524),s=n(291),c=n(99452),d=n(45870),l=n(5674);class u{constructor(){this.wpoNotificationPreviewData=new d.o,this.notificationMiniCardDismissed=!1,this.dismissNotificationMiniCard=e=>{this.notificationMiniCardDismissed=!0,null===o.M0||void 0===o.M0||o.M0.addOrUpdateTmplProperty("NotificationMiniCardDismissed",e)}}static getInstance(){return a.Gq.get("__WpoPreview__",(()=>new u))}storeWpoNotificationPreviewData(e){if(!e)return;if(this.wpoNotificationPreviewData.wasSet())return;const t={};try{for(const i of(null===(n=e.previews)||void 0===n?void 0:n.simplePreviews)||[]){var n;for(const e of i.cards)for(const n of e.elements)switch(n.id){case"Icon":t.icon=n.url;break;case"Title":t.title=n.text;break;case"Tooltip":t.tooltip=n.text;break;case"Summary":t.summary=n.text;break;case"Detail":t.detail=n.text}i.previewType&&(t.previewType=i.previewType),i.url&&(t.url=i.url)}const a=Object.keys(t).length;if(0===a)return;if(a>0&&7!==a){var i;const n="Invalid notification preview data.",o=`Parsed data: ${JSON.stringify(t)}. ReceivedPreviewData: ${JSON.stringify(null===(i=e.previews)||void 0===i?void 0:i.simplePreviews).substring(0,32768)}.`;return void this.logAppError(r.clq,n,o)}this.wpoNotificationPreviewData.set(t),null===o.M0||void 0===o.M0||o.M0.addOrUpdateTmplProperty("previewDataReady","1")}catch(t){var a;const n=`Failed to parse notification preview data.Error:${t}`,i=`ReceivedPreviewData: ${JSON.stringify(null===(a=e.previews)||void 0===a?void 0:a.simplePreviews).substring(0,32768)}`;this.logAppError(r.l0m,n,i)}}subscribe(e){this.wpoNotificationPreviewData.getResultAsync().then(e)}logAppError(e,t,n=""){o.M0.sendAppErrorEvent({...e,message:t,pb:{...e.pb,customMessage:n,debugId:(0,l.N)()}})}}(0,i.gn)([c.LO],u.prototype,"notificationMiniCardDismissed",void 0);const p=(0,s.h)(u)},19547:function(e,t,n){"use strict";n.d(t,{C5:function(){return v},SI:function(){return C}});var i=n(7476),r=n(10754),o=n(88826),a=n(88672),s=n(59967),c=n(54297),d=n(74161),l=n(36867),u=n(87172),p=n(59887),h=n(23549),g=n(55524),m=n(291),f=n(45870);const v={Request:"Wpo.Treatments.Request",Response:"Wpo.Treatments.Response",StoreInit:"Wpo.Treatments.StoreInit",Parsed:"Wpo.Treatments.Parsed",Stored:"Wpo.Treatments.Stored"},y="ssr-feed-data";class S{constructor(){this.wpoOptimizationsReady=new Promise((e=>this.wpoOptimizationsResolver=e)),this.wpoFeedDataCache=new s.v("WpoFeedDataCache"),this.enableEarlyMainFeedRequest=!1,this.earlyFeedResponsePromiseV2=new f.o,this.usePromiseForEarlyFeed=!1}static getInstance(){return g.Gq.get("__WpoServiceClient__",(()=>new S))}onWPOFeedReady(e){this.wpoFeedDataCache.subscribe(y,e)}setSSRInitialFeedResponse(e){this.wpoFeedDataCache.set(y,e)}resetFeedDataCache(){this.wpoFeedDataCache.clear()}addWpoOptimizationDataToLocalStorage(e,t,n,o=!1,s=!1,h){const g=(0,p._)(t,n);if(this.optimizationDataReceived)return;if(!e||!e.optimizationItems)return void(h&&"wpo"===h.source&&this.removeWPOUserChoiceFromPSL());if(!e.optimizationItems.length)return this.logAppError(i.lGs,"WPO Optimization data is empty in feed response ",`isFocusedMode:${o}`),(0,c.$o)().removeItem(g),void(h&&"wpo"===h.source&&this.removeWPOUserChoiceFromPSL());const m=(0,r.Ou)();m[v.StoreInit]=Math.round(performance.now());try{const t=this.parseOptimizationItems(e.optimizationItems),n={treatments:t};m[v.Parsed]=Math.round(performance.now()),(0,c.$o)().setObject(g,n),m[v.Stored]=Math.round(performance.now()),this.optimizationDataReceived=!0;const i=t.filter((e=>{var t;return((null==e?void 0:e.type)===a._h.topSites||(null==e?void 0:e.type)===a._h.topsitesCollapse)&&(null==e||null===(t=e.properties)||void 0===t?void 0:t.topSitesCollapsibleControlConfig)}));var f,y,S;if(window.isSSREnabled&&null==h)if(null!=i&&i.length&&null!==(f=i[0])&&void 0!==f&&null!==(y=f.properties)&&void 0!==y&&null!==(S=y.topSitesCollapsibleControlConfig)&&void 0!==S&&S.collapsibleControlIsDefaultCollapsed){const e={setting:d.nc.tscollapsed,source:"wpo",timestamp:(new Date).getTime(),value:1};l.L.savePreferenceSetting(d.nc.tscollapsed,e)}if("wpo"===(null==h?void 0:h.source)&&0==(null==i?void 0:i.length)&&this.removeWPOUserChoiceFromPSL(),s){var C;const e=t.filter((e=>{var t;return(null==e?void 0:e.type)===a._h.layoutPromotion&&"PageContentLayout"===(null==e||null===(t=e.properties)||void 0===t?void 0:t.layoutType)}));if(null==e||!e.length||null===(C=e[0])||void 0===C||!C.properties)return void u.U.savePreferenceSetting(d.Xm.layoutPromotion,null);u.U.savePreferenceSetting(d.Xm.layoutPromotion,e[0].properties)}}catch(t){const n=`Failed to store wpo response to LS.Error:${t}`,r=`WpoServiceResponse: ${JSON.stringify(e)}. key: ${g}`;this.logAppError(i.pOl,n,r)}}setShouldUsePromiseForEarlyFeed(e){this.usePromiseForEarlyFeed||(this.usePromiseForEarlyFeed=e)}storeEarlyWpoFeedData(e){this.usePromiseForEarlyFeed?this.earlyFeedResponsePromiseV2.set(e):this.wpoFeedDataCache.set("feed-ready",e)}getEarlyWpoFeedData(e){if(this.usePromiseForEarlyFeed){let t;const n=new Promise((n=>{t=setTimeout((()=>{const t=`Getting early main feed v2 timeout in ${e}ms`;this.logAppError(i.$HJ,t),n(void 0)}),e||1e4)}));return Promise.race([this.earlyFeedResponsePromiseV2.getResultAsync(),n]).finally((()=>clearTimeout(t)))}return new Promise((t=>{let n;const r=e=>{n&&clearTimeout(n),this.wpoFeedDataCache.unsubscribe("feed-ready",r),this.wpoFeedDataCache.delete("feed-ready"),t(e)};e&&(n=setTimeout((()=>{this.wpoFeedDataCache.unsubscribe("feed-ready",r),this.wpoFeedDataCache.delete("feed-ready");const n=`Getting early main feed timeout in ${e}ms`;this.logAppError(i.$HJ,n),t(void 0)}),e)),this.wpoFeedDataCache.subscribe("feed-ready",r)}))}storeWpoOptimizationData(e){if(e)if(this.wpoOptimizations&&this.wpoOptimizations.length>0)this.wpoOptimizationsResolver();else{try{this.wpoOptimizations=this.parseOptimizationItems(e.pageContext&&e.pageContext.optimizationItems)}catch(t){const n=`Failed to store wpo response to Memory.Error:${t}`,r=`WpoServiceResponse: ${JSON.stringify(e)}.`;this.logAppError(i.yPw,n,r)}this.wpoOptimizationsResolver()}}isShorelineTriggerEnabled(e){var t,n;const i=this.parseOptimizationItems(e.pageContext&&e.pageContext.optimizationItems).filter((e=>(null==e?void 0:e.type)===a._h.shorelineTrigger)),r=!(null==i||null===(t=i[0])||void 0===t||null===(n=t.properties)||void 0===n||!n.trigger);return r&&h.M0.addOrUpdateTmplProperty("shoreline_trigger","1"),r}getWpoOptimizationData(e){if(e){let t;const n=new Promise((n=>{t=setTimeout((()=>{h.M0.addOrUpdateTmplProperty("wpoPromoTimeout",e.toString()),n()}),e)}));return Promise.race([n,this.wpoOptimizationsReady]).then((()=>(clearTimeout(t),this.wpoOptimizations)))}return this.wpoOptimizationsReady.then((()=>this.wpoOptimizations))}tryToGetWpoOptimizationData(){return this.wpoOptimizations}logAppError(e,t,n=""){h.M0.sendAppErrorEvent({...e,message:t,pb:{...e.pb,customMessage:n}})}parseOptimizationItems(e){if(!e||!e.length)return[];return e.map(((e,t)=>{if(e.type&&e.type.trim().length)if(Object.values(a._h).includes(e.type)||this.logAppError(i.OE6,`Unknown Type in WPO optimization items. Type: ${e.type}, Index: ${t}`),e.data){if(e.type&&e.data){let n;try{if(n=JSON.parse(e.data),!Object.entries(n).length)return void this.logAppError(i.OnJ,`Parsed WPO Optimization item but it is empty. Type: ${e.type}, Index: ${t}`)}catch(n){return void(0,o.OO)(n,i.X1V,`${n}. Type: ${e.type}, Index: ${t}`)}if(n)return{type:e.type,properties:n}}}else this.logAppError(i.uSS,`Unable to find data in WPO optimization item. Type: ${e.type}, Index: ${t}`);else this.logAppError(i._wC,`Type not found in WPO optimization items. Index: ${t}`)})).filter(Boolean)}isOptimizationDataReceived(){return this.optimizationDataReceived}removeWPOUserChoiceFromPSL(){l.L.deleteKeyValueFromPSL(d.nc.tscollapsed)}}const C=(0,m.h)(S)},93624:function(){},88642:function(){},74037:function(e,t){"use strict";t.Z='<svg width="14" height="15" viewBox="0 0 12 8"><path d="m11.25.8.53.52-5.9 5.89L0 1.3.53.8l5.36 5.36L11.25.8Z"/></svg>'},3204:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var i=n(33940),r=n(99452),o=n(7476),a=n(69425);class s{constructor(e,t){this.props=e,this.cb=t}connectedCallback(e){const{source:t}=e;this.props.forEach((e=>{r.y$.getNotifier(t).subscribe(this,e)})),this.handleChange(t)}disconnectedCallback(e){const{source:t}=e;this.props.forEach((e=>{r.y$.getNotifier(t).unsubscribe(this,e)})),t.$fastController.removeStyles(this.styles)}handleChange(e){this.styles=this.cb(e),e.$fastController.addStyles(this.styles)}}(0,i.gn)([(0,a.Et)(o.a4J,"CssInjectionBehavior.Bind")],s.prototype,"connectedCallback",null),(0,i.gn)([(0,a.Et)(o.a4J,"CssInjectionBehavior.Unbind")],s.prototype,"disconnectedCallback",null),(0,i.gn)([(0,a.Et)(o.a4J,"CssInjectionBehaviorHandleChange")],s.prototype,"handleChange",null)},90752:function(e,t,n){"use strict";n.d(t,{g:function(){return s}});var i=n(33940),r=n(99452),o=n(7476),a=n(69425);class s{constructor(e){this.propertyName=e}connectedCallback(e){r.y$.getNotifier(e.source).subscribe(this,this.propertyName)}disconnectedCallback(e){this.styles&&e.source.$fastController.removeStyles(this.styles)}handleChange(e,t){this.styles&&e.$fastController.removeStyles(this.styles),this.styles=e[t],e.$fastController.addStyles(this.styles)}}(0,i.gn)([(0,a.Et)(o.a4J,"PropertyBehavior.Bind")],s.prototype,"connectedCallback",null),(0,i.gn)([(0,a.Et)(o.a4J,"PropertyBehavior.Unbind")],s.prototype,"disconnectedCallback",null),(0,i.gn)([(0,a.Et)(o.a4J,"PropertyBehavior.HandleChange")],s.prototype,"handleChange",null)},1152:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var i=n(28904),r=n(92100);function o(){const e="localhost.msn.com"===window.location.hostname,t=!!r.c.getParamsWithItems(decodeURIComponent(window.location.search)).find((e=>"spalink"===e.key&&e.value.toLowerCase().endsWith("/debug")));if(e||t){const e=i.H.prototype.setAttribute;i.H.prototype.setAttribute=function(t,n){if("object"==typeof n||"function"==typeof n||"symbol"==typeof n){const e=`Attribute "${t}" was expected to be string. Received type: ${typeof n}. This is likely a mistake.`;console.warn(e,this);const i=document.createElement("div");i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.right="0",i.style.bottom="0",i.style.backgroundColor="rgba(255, 0, 0, 0.5)",i.style.zIndex="9999",i.style.pointerEvents="none",i.innerText=e,this.shadowRoot?this.shadowRoot.appendChild(i):this.appendChild(i)}return e.call(this,t,n)}}}},54175:function(e,t,n){"use strict";n.d(t,{b:function(){return a}});var i=n(99452),r=n(28904);const o={handleChange(e){e.$fastController.isConnected?e.connected&&e.connected():e.disconnected&&e.disconnected()}};function a(e){return class extends e{constructor(...e){super(...e),i.y$.getNotifier(this.$fastController).subscribe(o,"isConnected")}}}a(r.H)}}]);