              :matchUXType="${()=>a}"
                :linkTarget=${()=>this.getLinkClickTarget()}
                :rtl=${()=>document.dir}
                :telemetryContext=${()=>this.telemetryContext}
                :cardData=${()=>t}
                :matchData=${()=>e}
                :followSportsCallback=${()=>this.followSports}
                :unfollowSportsCallback=${()=>this.unfollowSports}
                :isSportsFollowed=${()=>this.isSportsFollowed}
                :cardClickHandler="${()=>this.cardClickHandler}"
            ></sports-series-finals>
        `},this.getArticlesContentTemplate=(t,e)=>{var a;if(!e||!e||!(null===(a=e.articles)||void 0===a?void 0:a.length))return null;const i=this.shouldRenderSeriesFinals();return O.d`
            <sports-article
                role="button"
                style="width: 100%; height: 100%; margin: 0;"
                uxstyle="${()=>this.uxstyle}"
                cardlayout="${()=>this.sportsCardLayout}"
                colormode=${()=>this.colormode}
                :config=${()=>this.config}
                :strings=${()=>this.strings}
                :matchUXType="${()=>m.mW.Articles}"
                :linkTarget=${()=>this.getLinkClickTarget()}
                :rtl=${()=>document.dir}
                :telemetryContext=${()=>this.telemetryContext}
                :cardData=${()=>t}
                :matchData=${()=>i?this.currentSportsMatchupData.sportsMatchOverallData:null}
                :articleData=${()=>e}
                :showOverview=${()=>this.sportsCardLayout==m.J4.Large&&(i||this.sportsMatchUXType==m.mW.NFLDraft)}
                :cardClickHandler="${()=>this.cardClickHandler}"
            />
        `},this.getStandingsContentTemplate=(t,e)=>O.d`
            <sports-standings
                style="${()=>this.sportsCardLayout==m.J4.Small&&this.config.isDynamicFeed?"display: block; padding-top: 8px;":""}"
                uxstyle="${()=>this.uxstyle}"
                cardlayout="${()=>this.sportsCardLayout}"
                colormode=${()=>this.colormode}
                :config=${()=>this.config}
                :strings=${()=>this.strings}
                :linkTarget="${()=>this.getLinkClickTarget()}"
                :telemetryContext=${()=>this.telemetryContext}
                :matchUXType="${t=>m.mW.Standings}"
                :cardData=${()=>t}
                :standingsData=${()=>e}
                :cardClickHandler="${()=>this.cardClickHandler}"
            >
            </sports-standings>
        `,this.getSeriesFinalsOverviewTemplate=(t,e)=>{const a=this.getSeriesUXType(t),i=this.shouldRenderTabs()?this.currentSportsMatchupData.sportsTabData&&this.currentSportsMatchupData.sportsTabData.get(m.Zt.SportsMatches):this.currentSportsMatchupData.sportsMatchOverallData;return O.d`
            <sports-match-overview
                role="button"
                style="${()=>this.sportsCardLayout==m.J4.Small&&this.config.isDynamicFeed?"display: block; padding-top: 8px;":""}"
                uxstyle="${()=>this.uxstyle}"
                cardlayout="${()=>this.sportsCardLayout}"
                colormode=${()=>this.colormode}
                :config=${()=>this.config}
                :strings=${()=>this.strings}
                :linkTarget="${()=>this.getLinkClickTarget()}"
                :telemetryContext=${()=>this.telemetryContext}
                :matchUXType="${t=>a}"
                :overviewType="${()=>this.sportsCardLayout==m.J4.Small?at.df.smallInRow:at.df.largeInPale}"
                :cardData=${()=>t}
                :data=${()=>i}
                :cardClickHandler="${()=>this.cardClickHandler}"
            >
            </sports-match-overview>
        `},this.getLeaderboardBlendedContentTemplate=(t,e)=>{const a=e&&this.getCardMatchData(e).map((t=>t.sportsMatchData));return O.d`
            <sports-leaderboard-blended class="${()=>this.showCardHeader||this.config.isDynamicFeed?"sports-match-content":"sports-widget-content"}"
                style="width: 100%; height: 100%; margin: 0;"
                uxstyle="${()=>this.uxstyle}"
                cardlayout="${()=>this.sportsCardLayout}"
                colormode=${()=>this.colormode}
                :config=${()=>this.config}
                :strings=${()=>this.strings}
                :matchUXType="${()=>m.mW.LeaderBoard}"
                :telemetryContext=${()=>this.telemetryContext}
                :linkTarget="${()=>this.getLinkClickTarget()}"
                :cardSize="${()=>this.cardSize}"
                :cardData="${()=>t}"
                :matchData="${()=>a}"
                :sportContext="${()=>At.getLeaderBoardSportContext(t,a)}"
                :cardClickHandler="${()=>this.cardClickHandler}"
            >
            </sports-leaderboard-blended>
        `},this.getContentTemplate=()=>{var t;if(!this.currentSportsMatchupData)return;if(this.shouldRenderColdStart())return void this.switchToColdStart();const e=this.currentSportsMatchupData.sportsMatchupCardData,a=this.shouldRenderVideo()?this.currentSportsMatchupData.sportsMatchWithVideoData:this.currentSportsMatchupData.sportsMatchOverallData;if(this.enableSportsCarousel){let i=this.getCarouselItems(e,a);if(1==i.length){const r=this.getCardMatchData(this.shouldRenderTabs()?this.currentSportsMatchupData.sportsTabData.get(m.Zt.SportsMatches):a);if(!(this.sportsCardLayout==m.J4.Small&&r&&r.length>1))return this.enableSportsCarousel=!1,void(this.matchContent=null===(t=i[0])||void 0===t?void 0:t.contentView);{i=[];const t=this.getSportsMatchUXType(r);r.map((a=>{if(a){const r=this.mapForTemplate[t](e,[a]);r&&i.push({contentView:r})}}))}}this.matchContent=O.d`
                <sports-carousel
                    :config=${()=>this.config}
                    :strings=${()=>this.strings}
                    cardlayout="${()=>this.sportsCardLayout}"
                    colormode="${()=>this.colormode}"
                    carouselmode="${()=>m.xI.fullFill}"
                    :currentPageIndex=${()=>this.currentMatchIndex}
                    :linkTarget=${()=>this.getLinkClickTarget()}
                    :rtl=${()=>document.dir}
                    ?pinned="${()=>this.isPinned}"
                    :telemetryContext=${()=>this.telemetryContext}
                    :seeMoreLeagueText="${()=>e.seeMoreLeagueText}"
                    :seeMoreLeagueClickthroughUrl=${()=>e.seeMoreLeagueClickthroughUrl}
                    :seeMoreSportsClickthroughUrl=${()=>e.seeMoreSportsClickthroughUrl}
                    :carouselContents=${()=>i}
                    :matchData=${()=>a.map((t=>t.sportsMatchData))}
                    :cardClickHandler="${()=>this.cardClickHandler}"
                />
            `}else this.shouldRenderTabs()?this.matchContent=this.getTabContentTemplate(e,Array.from(this.currentSportsMatchupData.sportsTabData)[0][0],Array.from(this.currentSportsMatchupData.sportsTabData)[0][1]):this.matchContent=this.getMatchContentTemplate(e,a)},this.getCarouselItems=(t,e)=>{if(this.shouldRenderSeriesFinals())return this.getSeriesFinalsCarouselItems(t,e);if(this.shouldRenderLeaderboardBlendedUX())return this.getLeaderboardCarouselItems(t,e);const a=[];return this.shouldRenderTabs()?this.currentSportsMatchupData.sportsTabData.forEach(((e,i)=>{const r=this.getTabContentTemplate(t,i,e),s=this.getCarouselSeemore(i);a.push({contentView:r,seemoreText:s.seemoreText,seemoreUrl:s.seemoreUrl})})):this.getCardMatchData(e).map((e=>{if(e){const i=this.getMatchContentTemplate(t,[e]);i&&a.push({contentView:i})}})),a},this.getSeriesFinalsCarouselItems=(t,e)=>{const a=[];if(this.shouldRenderTabs()){if(this.sportsCardLayout!=m.J4.Large){const i=this.getSeriesFinalsOverviewTemplate(t,e);i&&a.push({contentView:i,seemoreText:(0,X.WU)(this.strings.seeMoreSports,this.getSeriesFinalsName(t))})}const i=this.getTabContentTemplate(t,m.Zt.SportsMatches,this.currentSportsMatchupData.sportsTabData.get(m.Zt.SportsMatches));i&&a.push({contentView:i,seemoreText:this.strings.sportsSeeMoreOnMsn});const r=this.getTabContentTemplate(t,m.Zt.Articles,this.currentSportsMatchupData.sportsTabData.get(m.Zt.Articles));r&&a.push({contentView:r,seemoreText:this.strings.readMoreNews||(0,X.WU)(this.strings.seeMoreSports,this.getSeriesFinalsName(t))})}else{const i=this.getSeriesFinalsOverviewTemplate(t,e);i&&a.push({contentView:i,seemoreText:(0,X.WU)(this.strings.seeMoreSports,this.getSeriesFinalsName(t))});const r=this.getSeriesFinalsContentTemplate(t,e);r&&a.push({contentView:r,seemoreText:this.strings.sportsSeeMoreOnMsn})}return a},this.getLeaderboardCarouselItems=(t,e)=>{const a=[],i=this.getLeaderboardBlendedContentTemplate(t,e);if(i&&a.push({contentView:i,seemoreText:this.strings.sportsSeeMoreOnMsn}),this.shouldRenderTabs()){const e=this.getTabContentTemplate(t,m.Zt.SportsMatches,this.currentSportsMatchupData.sportsTabData.get(m.Zt.SportsMatches));e&&a.push({contentView:e,seemoreText:this.strings.sportsSeeMoreOnMsn});const i=this.getTabContentTemplate(t,m.Zt.Articles,this.currentSportsMatchupData.sportsTabData.get(m.Zt.Articles));i&&a.push({contentView:i,seemoreText:this.strings.readMoreNews||(0,X.WU)(this.strings.seeMoreSports,this.getSeriesFinalsName(t))})}else{const i=this.getLeaderboardBlendedContentTemplate(t,e);i&&a.push({contentView:i,seemoreText:this.strings.sportsSeeMoreOnMsn})}return a},this.getCarouselSeemore=t=>{switch(t){case m.Zt.SportsMatches:return{seemoreText:this.getSeemoreText(),seemoreUrl:this.getSeemoreUrl()};case m.Zt.Articles:return{seemoreText:this.strings.readMoreNews||(0,X.WU)(this.strings.seeMoreSports,this.currentSportsMatchupData.sportsMatchupCardData.cardTitle)};default:return{seemoreText:this.getSeemoreText()}}},this.getCarouselPaginationClass=()=>{if(this.enableSportsCarousel){if(this.sportsMatchUXType!=m.mW.Combined)return"with-pagination";if(this.config.isDynamicFeed)return"dynamic-bld-pagination"}return""},this.getTabContentTemplate=(t,e,a)=>{let i=e,r=a;return e==m.Zt.SportsMatches&&(r=a,i=this.getSportsMatchUXType(r)),this.mapForTemplate[i](t,r)},this.shouldShowHeaderIcon=()=>{var t;return this.currentSportsMatchupData&&(null===(t=this.currentSportsMatchupData)||void 0===t?void 0:t.sportsMatchupCardData)&&!(0,wt.T)(this.currentSportsMatchupData.sportsMatchupCardData.cardTitleImageUrl)},this.getCardTitle=()=>{var t,e,a;return this.currentSportsMatchupData&&(null===(t=this.currentSportsMatchupData)||void 0===t?void 0:t.sportsMatchupCardData)&&!(0,wt.T)(null===(e=this.currentSportsMatchupData)||void 0===e?void 0:e.sportsMatchupCardData.cardTitle)?null===(a=this.currentSportsMatchupData)||void 0===a?void 0:a.sportsMatchupCardData.cardTitle:this.strings&&this.strings.widgetHeader},this.isClickableTarget=t=>t&&("A"===t.tagName||"FLUENT-ANCHOR"===t.tagName)||"SPORTS-COLDSTART"===t.tagName||"SPORTS-CAROUSEL"===t.tagName,this.cardClickHandler=t=>{var e,a;if(t&&this.isClickableTarget(t.target))return!0;if(t&&t.target==this.actionButton)return t.preventDefault(),t.stopPropagation(),!0;if(t&&t.target==this.sportsNavFooter)return t.preventDefault(),t.stopPropagation(),!0;if(t&&t.target==this.selectedNavigationItem)return t.preventDefault(),t.stopPropagation(),!0;let i=!1;return t&&t.path&&t.path.forEach((t=>{!t||"A"!==t.tagName&&"FLUENT-ANCHOR"!==t.tagName||(i=!0)})),!!i||(this.config.isDynamicFeed&&(0,w.j)({name:"OnWidgetClick",clickType:1,oneServiceCardType:"SportsMatch"}),(0,ft.h2)(t,null===(a=null===(e=this.currentSportsMatchupData)||void 0===e?void 0:e.sportsMatchupCardData)||void 0===a?void 0:a.cardTitleClickthroughUrl,t.target,!this.openLinksInNewTab),!1)},this.cardKeydownHandler=t=>{"Enter"==t.key&&this.cardClickHandler(t)},this.handleNavigationMouseEnter=t=>{this.navHoverStartTime=(new Date).getTime(),this.displayNavList(),this.isActionMenuOpen&&this.toggleActionMenu(null),t&&t.target&&ht.M0.sendActionEvent(t.target,ut.Aw.Hover,ut.wu.Show)},this.handleNavigationMouseLeave=t=>{this.navHoverStartTime=-1,this.hideNavList(),t&&t.target&&ht.M0.sendActionEvent(t.target,ut.Aw.MouseLeave,ut.wu.Close)},this.displayNavList=()=>{clearTimeout(this.displayNavListTimer),clearTimeout(this.hideNavListTimer),this.displayNavListTimer=setTimeout((()=>{this.navHoverStartTime>0&&(this.showNavList=!0)}),500)},this.hideNavList=()=>{clearTimeout(this.displayNavListTimer),clearTimeout(this.hideNavListTimer),this.hideNavListTimer=setTimeout((()=>{this.isShowingEntityList||(this.showNavList=!1)}),1e3)},this.handleNavigationClick=t=>{var e;if(t){if(this.config.isDynamicFeed&&("click"===t.type&&t.target&&"A"!=t.target.tagName||"Enter"===t.key))return"Enter"===t.key&&(ht.M0.sendActionEvent(t.target,ut.Aw.KeyPress,this.showNavList?ut.wu.Close:ut.wu.Show),this.toggleNavigationList(!this.showNavList)),!1;t.preventDefault(),t.stopPropagation(),"click"===t.type||"Enter"===t.key?(ht.M0.sendActionEvent(t.target,"Enter"===t.key?ut.Aw.KeyPress:ut.Aw.Click,this.showNavList?ut.wu.Close:ut.wu.Show),this.toggleNavigationList(!this.showNavList)):"Tab"===t.key&&t.shiftKey?this.sportsHeader&&this.sportsHeader.focus():"ArrowDown"!==t.key&&"Tab"!==t.key||(this.config.dropDownSeeMoreOnTop&&this.sportsNavFooter?this.sportsNavFooter.focus():this.navigationList&&this.getNavigationItem(0)?(this.toggleNavigationList(!0),null===(e=this.getNavigationItem(0))||void 0===e||e.focus()):this.actionButton&&this.actionButton.focus())}},this.handleNavigationFocus=t=>{t&&t.target&&!this.showNavList&&(ht.M0.sendActionEvent(t.target,ut.Aw.KeyPress,ut.wu.Show),this.toggleNavigationList(!0))},this.handleSportsHeaderKeyUp=t=>{t&&(t.preventDefault(),t.stopPropagation(),"Tab"==t.key&&this.showNavList&&t.target!=this.navigationButton&&this.toggleNavigationList(!1))},this.handleClickForNavigationList=()=>{this.toggleNavigationList(!1)},this.handleKeyDownNavigationList=t=>{"Escape"!==t.code||this.toggleNavigationList(!1)},this.handleEntityListMouseEnter=t=>{t&&(t.preventDefault(),t.stopPropagation()),this.isShowingEntityList=!0},this.handleEntityListMouseLeave=t=>{t&&(t.preventDefault(),t.stopPropagation()),this.isShowingEntityList=!1,this.hideNavList()},this.handleSportsEntityClick=(t,e)=>(0,u.mG)(this,void 0,void 0,(function*(){if(t){t.preventDefault(),t.stopPropagation();if(this.config.hoverNavToMsn&&e&&e.webSearchUrl)return void(0,ft.h2)(t,e.webSearchUrl,t.target,!this.openLinksInNewTab);this.config.navClickWithFollow&&!this.isSportsFollowed(e.id,e.yId)&&this.followSports(e,!1);const a="keydown"===t.type||"keypress"===t.type||"keyup"===t.type;ht.M0.sendActionEvent(t.target,a?ut.Aw.KeyPress:ut.Aw.Click,ut.wu.Refresh),this.isShowingEntityList=!1,this.showNavList=!1,this.selectedEntity=e;const i=this.entityDataMap.get(e.id);i?(e.id&&(this.selectedNavEntityId=e.id),this.updateSportsData(i)):(this.isShowDataErrorReminder=!(yield this.fetchSportsMatchData(this.selectedEntity.id)),setTimeout((()=>{this.isShowDataErrorReminder=!1}),5e3))}})),this.handleSportsEntityKeyDown=(t,e)=>{if(t&&("ArrowDown"==t.key||"ArrowUp"==t.key||"Tab"===t.key)){let e=0;const a=this.allRecommendations.length;for(;e<a&&t.target!=this.getNavigationItem(e)&&t.target!=this.getNavigationItem(e).querySelector("sports-follow-icon");)e+=1;if("Tab"===t.key)return!0;t.stopPropagation(),t.preventDefault(),"ArrowUp"===t.key?0===e?(this.config.dropDownSeeMoreOnTop&&this.sportsNavFooter?this.sportsNavFooter.focus():this.navigationButton&&this.navigationButton.focus(),this.selectedNavigationItem=void 0):this.navigationList&&(this.selectedNavigationItem=this.getNavigationItem(e-1),this.selectedNavigationItem&&this.selectedNavigationItem.focus()):"ArrowDown"===t.key&&(e<a-1?this.navigationList&&(this.selectedNavigationItem=this.getNavigationItem(e+1),this.selectedNavigationItem&&this.selectedNavigationItem.focus()):e===a-1&&(this.config.dropDownSeeMoreOnTop||(this.sportsNavFooter&&this.sportsNavFooter.focus(),this.selectedNavigationItem=void 0)))}},this.handleClickDropdownSeeMore=t=>{t&&(t.preventDefault(),t.stopPropagation(),ht.M0.sendActionEvent(t.target,ut.Aw.Click)),this.isShowingEntityList=!1,this.showNavList=!1,this.switchToSetting()},this.handleKeydownDropdownSeeMore=t=>{t&&(t.stopPropagation(),this.config.dropDownSeeMoreOnTop?"ArrowUp"===t.key||"Tab"===t.key&&t.shiftKey?this.navigationButton&&this.navigationButton.focus():("ArrowDown"===t.key||"Tab"===t.key&&!t.shiftKey)&&this.allRecommendations.length>0&&(this.selectedNavigationItem=this.getNavigationItem(0),this.selectedNavigationItem&&this.selectedNavigationItem.focus()):"Tab"!==t.key||t.shiftKey?("ArrowUp"===t.key||"Tab"===t.key&&t.shiftKey)&&this.allRecommendations.length>0&&(this.selectedNavigationItem=this.getNavigationItem(this.allRecommendations.length-1),this.selectedNavigationItem&&this.selectedNavigationItem.focus()):(this.toggleNavigationList(!1),this.actionButton&&this.actionButton.focus()))},this.ignoreClickHandler=t=>{t&&(t.preventDefault(),t.stopPropagation())},this.getLiveText=()=>this.strings.sportsLive||"Live",this.getSeemoreText=()=>{if(this.currentSportsMatchupData)return this.config.enableLiveDetailClick3&&this.currentSportsMatchupData.sportsMatchOverallData&&this.currentSportsMatchupData.sportsMatchOverallData.some((t=>t.sportsMatchData.gameStateCatetory==m.w_.inprogressGame))?this.strings.seeLiveScore:this.currentSportsMatchupData.sportsMatchupCardData&&this.currentSportsMatchupData.sportsMatchupCardData.seeMoreLeagueText},this.getSeemoreUrl=()=>{if(this.currentSportsMatchupData)return this.config.enableLiveDetailClick3&&this.currentSportsMatchupData.sportsMatchOverallData&&this.currentSportsMatchupData.sportsMatchOverallData.some((t=>t.sportsMatchData.gameStateCatetory==m.w_.inprogressGame))?this.currentSportsMatchupData.sportsMatchupCardData&&this.currentSportsMatchupData.sportsMatchupCardData.sportsScoresUrl||this.currentSportsMatchupData.sportsMatchupCardData.cardTitleClickthroughUrl:this.currentSportsMatchupData.sportsMatchupCardData&&this.currentSportsMatchupData.sportsMatchupCardData.seeMoreLeagueClickthroughUrl},this.isSportsCarouselEnabled=()=>{if(this.uxstyle==at.n9.widget)return!1;let t=m.Zt.SportsMatches,e=this.sportsMatchDataList;if(this.shouldRenderTabs()){const a=this.sportsMatchupData[0].sportsTabData&&this.sportsMatchupData[0].sportsTabData;if(!a)return!1;if(a.size>1||this.shouldRenderSeriesFinals())return!0;const i=a.keys(),r=a.values();switch(t=null==i?void 0:i.next().value,e=null==r?void 0:r.next().value,t){case m.Zt.SportsMatches:e=e;break;case m.Zt.Articles:e=null==e?void 0:e.articles;break;case m.Zt.Standings:e=null==e?void 0:e.conferences}}return!(!this.config.enablePaginationCarousel||this.config.isDynamicFeed&&!this.config.enableCarouselForDynamic)&&(!!this.shouldRenderSeriesFinals()||!!(t==m.Zt.SportsMatches&&(this.sportsCardLayout==m.J4.Small||this.shouldRenderVideo())&&this.config.enableSideBySideLayout&&(this.config.enableTeamColorStripes||this.config.enableTeamColorGradientBackground)&&e&&e.length>1))},this.getShowMatchCount=t=>{switch(t){case"medium":return 3;case"large":return this.uxstyle===at.n9.widget?4:Rt.maxMatchCount;default:return 1}},this.getCricketMatchCount=t=>{switch(t){case"medium":return 2;case"large":return 3;default:return 1}},this.handleClickForActionMenu=t=>{const e=t.composedPath()&&t.composedPath()[0];t&&(t.target instanceof Rt||this.actionButtonControl&&this.actionButtonControl.contains(e))||this.toggleActionMenu(null)},this.handleKeyDownForActionMenu=t=>{"Escape"!==t.code||this.toggleActionMenu(t)},this.initActionMenuItems=()=>(0,u.mG)(this,void 0,void 0,(function*(){this.config.enableCardAction&&(this.actionMenuItems=[],this.shouldRenderColdStart()||!this.config.enableAddSports||(0,wt.T)(this.strings.addSports)||this.actionMenuItems.push({glyph:this.config.enableFluentUIIcons?Ct():It.Z,title:this.strings.addSports,id:"addSports",telemetryTag:this.telemetryContext&&this.telemetryContext.menuAddSports&&this.telemetryContext.menuAddSports.getMetadataTag(),onClick:()=>(0,u.mG)(this,void 0,void 0,(function*(){this.isActionMenuOpen=!1,this.switchToSetting()}))}),this.config.enableHideCard&&this.currentSportsMatchupData&&this.currentSportsMatchupData.sportsMatchupCardData&&!(0,wt.T)(this.currentSportsMatchupData.sportsMatchupCardData.primaryEntityType)&&!(0,wt.T)(this.currentSportsMatchupData.sportsMatchupCardData.primaryEntityName)&&this.actionMenuItems.push({glyph:this.config.enableFluentUIIcons?kt():$.Z,title:(0,X.WU)(this.strings.sportsNotInterested,this.currentSportsMatchupData.sportsMatchupCardData.primaryEntityName),id:"dislike",telemetryTag:this.telemetryContext&&this.telemetryContext.menuDislikeSport&&this.telemetryContext.menuDislikeSport.getMetadataTag(),onClick:()=>(0,u.mG)(this,void 0,void 0,(function*(){this.handleSportsNotInterested()}))}),(0,wt.T)(this.strings.sportsHideCard)||this.actionMenuItems.push({glyph:this.config.enableFluentUIIcons?kt():$.Z,title:this.strings.sportsHideCard,id:"hide",telemetryTag:this.telemetryContext&&this.telemetryContext.menuHideSportsCard&&this.telemetryContext.menuHideSportsCard.getMetadataTag(),onClick:()=>(0,u.mG)(this,void 0,void 0,(function*(){this.config.enableHidePopup?this.showHidePopup=!0:this.handleHideSports()}))}),this.actionMenuItems.push({glyph:this.config.enableFluentUIIcons?Ft():k.Z,id:"more",title:this.strings.sportsMoreSetting,telemetryTag:this.telemetryContext&&this.telemetryContext.menuMoreSettings&&this.telemetryContext.menuMoreSettings.getMetadataTag(),onClick:()=>(0,u.mG)(this,void 0,void 0,(function*(){this.handleMoreSettings()}))}),this.config.enableHidePopup&&!(0,wt.T)(this.strings.feedback)&&this.actionMenuItems.push({glyph:this.config.enableFluentUIIcons?Mt():Tt.Z,id:"feedback",title:this.strings.feedback,telemetryTag:this.telemetryContext&&this.telemetryContext.menuFeedback&&this.telemetryContext.menuFeedback.getMetadataTag(),onClick:()=>(0,u.mG)(this,void 0,void 0,(function*(){this.showFeedback=!0,this.showHidePopup=!1}))}))})),this.handleSportsNotInterested=()=>(0,u.mG)(this,void 0,void 0,(function*(){if(this.isActionMenuOpen=!1,!this.currentSportsMatchupData||!this.currentSportsMatchupData.sportsMatchupCardData||(0,wt.T)(this.currentSportsMatchupData.sportsMatchupCardData.primaryEntityId))return;const t={id:this.currentSportsMatchupData.sportsMatchupCardData.primaryEntityId,name:this.currentSportsMatchupData.sportsMatchupCardData.primaryEntityName,type:this.currentSportsMatchupData.sportsMatchupCardData.primaryEntityType};(yield g.d.notInterestedSportsCard(t,this.config.ocid))&&this.refreshFeedCard()})),this.handleHideSports=(t=!0)=>(0,u.mG)(this,void 0,void 0,(function*(){this.isActionMenuOpen=!1;(yield g.d.hideSportsCard())&&t&&this.refreshFeedCard()})),this.hideSportsCallback=()=>{this.handleHideSports(!1),this.closeHidePopup(),this.showHideReminder=!0,setTimeout((()=>{this.refreshFeedCard()}),5e3)},this.refreshFeedCard=()=>{this.showHideReminder=!1,this.refreshFeed?this.refreshFeed():this.$emit("refreshSDCardSection")},this.handleMoreSettings=()=>{this.isActionMenuOpen=!1,this.showHideReminder=!1,this.goToPersonalizeCallback?this.goToPersonalizeCallback():this.$emit("goToPersonalizeCallback")},this.getMoreActionsStyles=()=>this.config.isDynamicFeed?this.sportsViewMode==at._4.Settings?"opacity: var(--disabled-opacity); cursor: not-allowed; pointer-events: none;":"":"width: 24px; height: 24px; min-width: 24px; border-width: 0; border-radius: 16px; cursor: pointer;",this.settingsHandler=t=>{try{switch(t){case"onShowSettingsEnd":this.shouldCardOverflow=this.config.isDynamicFeed&&"small"==this.cardSize,this.shouldCardOverflow&&(0,b.f3)(this.parentElement,this.sizeChangeHandler,"SportsMatch"),this.closeActionMenu(),this.switchToSetting();break;case"onHideSettingsEnd":this.switchToMatchCard()}}catch(e){ht.M0.sendAppErrorEvent(Object.assign(Object.assign({},rt.qF2),{message:"Sports: Exception when respond to settingsEvent",pb:Object.assign(Object.assign({},rt.qF2.pb),{customMessage:`event:${t} isDynamic:${this.config.isDynamicFeed} size:${this.cardSize} error: ${e&&e.message}`,isPinned:this.isPinned})})),this.switchToMatchCard()}},this.visibilityHandler=t=>{"visible"===t?(this.setRefreshTimer(this.refreshIntervalInMs),this.checkTimer=setInterval((()=>this.updateRefreshTimer()),Rt.minuteInMs),this.setCardProperties()):"notvisible"===t&&this.clearRefreshTimer()},this.interactionsHandler=t=>{try{"titleInteracted"===t?(this.headerTitle||(this.headerTitle=(0,S.gd)("sports",this.widgetProperties.activationUrl,this.widgetProperties.title)),ht.M0.sendActionEvent(this.headerTitle,ut.Aw.Click,ut.wu.Navigate)):"settingsInteracted"===t&&(this.seeMoreButton||(this.seeMoreButton=(0,S.vh)("sports")),ht.M0.sendActionEvent(this.seeMoreButton,ut.Aw.Click,ut.wu.More))}catch(e){ht.M0.sendAppErrorEvent(Object.assign(Object.assign({},rt.qF2),{message:"Sports: Exception when interactionsHandler",pb:Object.assign(Object.assign({},rt.qF2.pb),{customMessage:`event:${t} isDynamic:${this.config.isDynamicFeed} size:${this.cardSize} error: ${e&&e.message}`,isPinned:this.isPinned})})),this.switchToMatchCard()}},this.lifecycleHandler=t=>(0,u.mG)(this,void 0,void 0,(function*(){"removing"===t&&this.clearRefreshTimer()})),this.propertiesHandler=t=>{"colorMode"===t&&(this.widgetBackgroundMode=this.widgetProperties.getProperty(t)||"light",this.config.isDynamicFeed?this.colorSchemeChangeHandler():(this.isDarkMode="dark"===this.widgetBackgroundMode,this.setCardProperties()))},this.switchToSetting=()=>(0,u.mG)(this,void 0,void 0,(function*(){try{this.showHidePopup=!1,this.showFeedback=!1,this.sportsViewMode=at._4.Settings,this.setCardProperties()}catch(t){ht.M0.sendAppErrorEvent(Object.assign(Object.assign({},rt.qF2),{message:"Sports: Exception when switchToSetting",pb:Object.assign(Object.assign({},rt.qF2.pb),{customMessage:`isDynamic:${this.config.isDynamicFeed} size:${this.cardSize} sportsViewMode:${this.sportsViewMode} error: ${t&&t.message}`,isPinned:this.isPinned})}))}})),this.loadDelayLoadViews=()=>(0,u.mG)(this,void 0,void 0,(function*(){if(this.actionMenu||(this.actionMenu=O.d`
                <msn-actions-menu
                    :referrerButton=${()=>this.actionButtonControl}
                    :menuItems=${()=>this.actionMenuItems}
                    :useFastAnchoredRegion=${t=>"winWidgets"!=T.jG.AppType}
                />
            `),this.searchSuggestion||(this.searchSuggestion=O.d`
                <sports-search class="sports-search"
                    :config=${()=>this.config}
                    :strings=${()=>this.strings}
                    uxStyle="${()=>this.uxstyle}"
                    colormode="${()=>this.colormode}"
                    cardlayout="${()=>this.sportsCardLayout}"
                    :cancelCallback=${()=>this.cancelSetting}
                    :followSportsCallback=${()=>this.followSports}
                    :unfollowSportsCallback=${()=>this.unfollowSports}
                    :refreshCardCallback=${()=>this.sportsSearchRefreshCard}
                    :telemetryObject=${()=>this.telemetryObject}
                    :telemetryContext=${()=>this.telemetryContext}
                    :allRecommendations=${()=>this.allRecommendations}
                    :selectedEntityId=${()=>{var t;return this.uxstyle==at.n9.widget?this.widgetSportsEntityId:null===(t=this.selectedEntity)||void 0===t?void 0:t.id}}
                    :followedSports=${()=>this.followedSports}
                />
            `),this.config.enableHidePopup&&!this.hidePopupView){const{SportsHidePopup:t}=yield a.e("experiences_sports-card-wc_dist_components_sports-hidepopup_index_js").then(a.bind(a,98846));this.hidePopupView=O.d`
                <sports-hidepopup
                    :strings=${()=>this.strings}
                    :colormode=${()=>this.colormode}
                    :sportsMatchData=${()=>this.currentSportsMatchupData}
                    :telemetryContext=${()=>this.telemetryContext}
                    :changeLeagueTeamCallback=${()=>this.switchToSetting}
                    :hideSportsCardCallback=${t=>()=>{this.hideSportsCallback()}}
                    :cancelHideCallback=${t=>()=>{this.closeHidePopup()}}
                    :gobackToSportsCard=${t=>()=>{this.closeHidePopup()}}
                    :sendFeedbackCallback=${t=>()=>{this.openFeedback()}}
                    :handleSportsNotInterested=${t=>()=>{this.handleSportsNotInterested()}}
                />
            `}if(this.config.enableHidePopup&&!this.hideReminderView){const{SportsHideReminder:t}=yield a.e("experiences_sports-card-wc_dist_components_sports-hidereminder_index_js").then(a.bind(a,63920));this.hideReminderView=O.d`
                <sports-hidereminder
                    :strings=${()=>this.strings}
                    :colormode=${()=>this.colormode}
                    :sportsMatchData=${()=>this.currentSportsMatchupData}
                    :telemetryContext=${()=>this.telemetryContext}
                    :openMoreSettingsCallback=${t=>()=>{this.handleMoreSettings()}}
                    :manageCardCallback=${t=>()=>{this.handleMoreSettings()}}
                    :refreshFeedCallback=${t=>()=>{this.refreshFeedCard()}}
                    :showChecker=${()=>this.sportsCardLayout!=m.J4.Small}
                    style=${()=>this.sportsCardLayout==m.J4.Small?"margin-top: -146px; height: 146px;":"margin-top: -304px; height: 304px;"}
                />
            `}if(this.config.enableHidePopup&&!this.feedbackView){const{SportsFeedback:t}=yield a.e("experiences_sports-card-wc_dist_components_sports-feedback_index_js").then(a.bind(a,14064));this.feedbackView=O.d`
                <sports-feedback
                    :strings=${()=>this.strings}
                    :colormode=${()=>this.colormode}
                    :sportsMatchData=${()=>this.currentSportsMatchupData}
                    :telemetryContext=${()=>this.telemetryContext}
                    :gobackToSportsCard=${t=>()=>{this.closeFeedback()}}
                    style="position: absolute; z-index: 900;"
                />
            `}})),this.sportsSearchRefreshCard=(t,e)=>(0,u.mG)(this,void 0,void 0,(function*(){yield this.fetchSportsMatchData(t),e&&this.switchToMatchCard()})),this.switchToColdStart=()=>(0,u.mG)(this,void 0,void 0,(function*(){yield this.setColdStartView(),this.sportsViewMode=at._4.ColdStart})),this.setColdStartView=(t=0)=>(0,u.mG)(this,void 0,void 0,(function*(){const{SportsColdStart:e}=yield a.e("experiences_sports-card-wc_dist_components_sports-coldstart_index_js").then(a.bind(a,310));this.coldStartView=O.d`
            <sports-coldstart class="sports-cold-start"
                style="width: 100%; height: 100%; margin: 0;"
                :config=${()=>this.config}
                :strings=${()=>this.strings}
                uxStyle="${()=>this.uxstyle}"
                colormode="${()=>this.colormode}"
                cardlayout="${()=>this.sportsCardLayout}"
                :currentPageIndex=${()=>t}
                :doneCallback=${()=>this.doneSelectionCallback}
                :selectEntityCallback=${()=>this.selectEntityCallback}
                :telemetryContext=${()=>this.telemetryContext}
                :entityData=${()=>this.currentSportsMatchupData.sportsFREData}
                :seeMoreClickCallback=${()=>this.switchToSetting}
            />
        `})),this.getSportsCardClassName=()=>{let t="sports-match-card sports-match-card-t1";return this.enableSportsCarousel&&(t+=" with-pagination"),this.config.enableCardlessStyles&&(t+=" cardless-styles"),this.sportsMatchUXType!=m.mW.SeriesFinals&&this.sportsMatchUXType!=m.mW.NFLDraft&&this.sportsMatchUXType!=m.mW.MarchMadness&&this.sportsMatchUXType!=m.mW.SuperDesign||(t+=" with-background-image"),this.noGradient&&(t+=" no-background"),this.config.cardBackgroundMode==at.wF.light&&(t+=" light-background"),t},this.getSportsCardTelemetry=()=>{if(!this.sportsMatchCardData)return;this.setTmplTelemetry();const t=this.getTelemetryExt(),e={zone:this.zoneType};return this.shouldRenderColdStart()?(0,m.Am)(this.telemetryObject,this.sportsMatchDataList,this.sportsMatchCardData,t,e):this.isLeaderBoardSportsCard()?(0,m.K8)(this.telemetryObject,this.sportsMatchDataList,this.sportsMatchCardData,t,e):(0,m.Am)(this.telemetryObject,this.sportsMatchDataList,this.sportsMatchCardData,t,e)},this.getWidgetOneServiceHeaders=()=>(0,u.mG)(this,void 0,void 0,(function*(){let t=null;if(this.widgetInstance){const e=yield(0,x.ss)(this.widgetInstance,!1);if(e){t=[];for(const a in e)e[a]&&t.push({key:a,value:e[a]});this.widgetMuid=e[Rt.muidKey]}}return t})),this.getTelemetryExt=()=>{var t;const e=this.telemetryExt||(0,S.$x)(null===(t=this.widgetSize)||void 0===t?void 0:t.getSize(),this.widgetPosition,this.widgetColumn),a=this.currentSportsMatchupData&&this.currentSportsMatchupData.logMessage||{};return Object.assign(Object.assign({},e),a)},this.fetchSportsMatchData=(t=null,e=!1)=>(0,u.mG)(this,void 0,void 0,(function*(){var a,i,r;let s=null,n=!1,o=!0,l=null;if((0,wt.T)(t)){const t=(0,Ut.fU)("news/feed/segments/sports");s=t&&(null==t?void 0:t.href)||"https://assets.msn.com/service/news/feed/segments/sports",n=!0,o=!1,l=this.widgetMuid?[{key:Rt.muidKey,value:this.widgetMuid}]:yield this.getWidgetOneServiceHeaders()}else(0,wt.T)(this.config.fetchEntityApiUrl)?s=this.config.fetchEntityUrl.replace("{entityId}",t):(s=this.config.fetchEntityApiUrl.replace("{entityId}",t),l=(0,wt.T)(this.flightId)?null:[{key:Rt.fdHead,value:this.flightId}]),this.config.enableptw&&(s=this.updateSportsEntityUrl(s,t));(0,at.$c)("SportsCardWC.FetchStart");let d,c=yield g.d.fetchSportsFeed(s,this.config.ocid,!1,n,o,l);if(c||(0,wt.T)(t)||!this.config.fetchEntityApiUrl||(s=this.config.fetchEntityUrl.replace("{entityId}",t),this.config.enableptw&&(s=this.updateSportsEntityUrl(s,t)),c=yield g.d.fetchSportsFeed(s,this.config.ocid,!1,n,o,l)),!c)return(0,it.H)(rt.bf5,"Fetch sports feed get null response",`market:${(0,T.Yq)().CurrentMarket}, entityId:${t}, Url:${s}, ocid:${this.config.ocid}`),e&&(0,it.H)(rt.Jj8,"Fetch sports entity get null response",`market:${(0,T.Yq)().CurrentMarket}, entityId:${t}, Url:${s}, ocid:${this.config.ocid}`),!1;let p=!1;if(Array.isArray(c)&&c.length)d=c.find((t=>this.config.sportsTypesForWidget&&this.config.sportsTypesForWidget.includes(t.type)&&this.config.sportsDataTypesForWidget&&this.config.sportsDataTypesForWidget.includes(t.dataType)));else if(c.value&&Array.isArray(c.value)&&c.value.length){if(c.value[0].blendedResponse)try{d=JSON.parse(c.value[0].blendedResponse)}catch(a){return(0,it.H)(rt.bf5,"Fetch sports feed get error response",`entityId:${t}, Url:${s}, ocid:${this.config.ocid}, response:${c.value[0].blendedResponse}`),e&&(0,it.H)(rt.Jj8,"Fetch sports entity get error response",`entityId:${t}, Url:${s}, ocid:${this.config.ocid}, response:${c.value[0].blendedResponse}`),!1}else d=c.value[0];p=!0}if(!d)return(0,it.H)(rt.bf5,"Fetch sports feed get null sports match data",`market:${(0,T.Yq)().CurrentMarket}, entityId:${t}, Url:${s}, ocid:${this.config.ocid}`),e&&(0,it.H)(rt.Jj8,"Fetch sports entity get null sports match data",`market:${(0,T.Yq)().CurrentMarket}, entityId:${t}, Url:${s}, ocid:${this.config.ocid}`),!1;(0,at.$c)("SportsCardWC.FetchEnd"),(0,at.$c)("SportsCardWC.ParseStart");const h=new Map;h.teamImageSize=this.getTeamImageSize();const u=p?v._.transformSportsMatchDataWithTrans(d,Rt.maxMatchCount,h):v._.mapSubCardToSportsMatchData(d,Rt.maxMatchCount,h);return u?((0,at.$c)("SportsCardWC.ParseEnd"),u.logMessage=u.logMessage||(null===(a=this.currentSportsMatchupData)||void 0===a?void 0:a.logMessage),u.notifications=u.notifications||(null===(i=this.currentSportsMatchupData)||void 0===i?void 0:i.notifications),u.sportsSkinnyData=u.sportsSkinnyData||(null===(r=this.currentSportsMatchupData)||void 0===r?void 0:r.sportsSkinnyData),this.updateSportsData(u),t&&(this.selectedNavEntityId=t),this.saveEntityData(t,u),this.uxstyle!=at.n9.widget||this.allRecommendations.length||this.getRecommendations(c),!0):((0,it.H)(rt.bf5,"Parse sports feed data error",`market:${(0,T.Yq)().CurrentMarket}, entityId:${t}, Url:${s}, ocid:${this.config.ocid}, response:${d}`),e&&(0,it.H)(rt.Jj8,"Parse sports entity data error",`market:${(0,T.Yq)().CurrentMarket}, entityId:${t}, Url:${s}, ocid:${this.config.ocid}, response:${d}`),!1)})),this.saveEntityData=(t,e)=>(0,u.mG)(this,void 0,void 0,(function*(){t&&e&&!this.entityDataMap.has(t)&&this.entityDataMap.set(t,e)})),this.fetchSportsRecommendations=t=>(0,u.mG)(this,void 0,void 0,(function*(){this.getRecommendationsFromSkinnyData(t),this.showNavButton})),this.getRecommendationsFromSkinnyData=t=>{this.allRecommendations=[],this.useSuperDesignEntityIdList=[],this.currentSportsMatchupData&&this.currentSportsMatchupData.sportsSkinnyData&&this.currentSportsMatchupData.sportsSkinnyData.length>0&&(this.currentSportsMatchupData.sportsSkinnyData.forEach((e=>{e&&!(0,wt.T)(e.imageUrl)&&(this.allRecommendations.push(Object.assign(Object.assign({},e),{typeDisplayHint:e.typeDisplayHint||(e.type&&0===e.type.localeCompare(m.fs.Team,void 0,{sensitivity:"accent"})?this.strings.teamDescription:this.strings.leagueDescription),telemetryContext:(0,m.FJ)(this.telemetryObject,e,null!=t?t:"",this.getTelemetryExt(),!1,{zone:this.zoneType})})),!this.isSuperDesignEntity(e.id)&&e.useSuperDesign&&this.useSuperDesignEntityIdList.push(e.id))})),this.selectedEntity&&this.selectedEntity.id&&!this.allRecommendations.some((t=>t.id===this.selectedEntity.id))&&this.allRecommendations.push({id:this.selectedEntity.id,name:this.selectedEntity.name,type:this.selectedEntity.type}),this.showNavButton=this.config.enableHoverNav&&this.allRecommendations.length>0,this.sdTemplateClassName=this.getSDCardTemplateClass())},this.fetchFollowedSports=(t=null,e=null)=>(0,u.mG)(this,void 0,void 0,(function*(){g.d.getFollowSportsEntities(t,e,(t=>{t&&(this.followedSports=t)}))})),this.announceFRESeen=()=>(0,u.mG)(this,void 0,void 0,(function*(){const t={freSeen:`${Date.now()}`};g.d.updateUserSettings({userSettings:{sportsCard:JSON.stringify(t)}})})),this.handleKeydown=t=>{"Escape"===t.code&&this.isActionMenuOpen&&(this.isActionMenuOpen=!1)},this.closeActionMenu=()=>{this.config.isDynamicFeed&&this.sdCardActionClickHandler&&this.dismissActionMenu&&this.dismissActionMenu()},this.sportsMatchDataList=[],this.allRecommendations=[],this.isInitialSetup=!0,this.sportsViewMode=at._4.Initial,this.widgetSportsEntityId=null,this.entityDataMap=new Map,this.initialTemplateMap(),this.navigationListStyle="",(0,ot.z)().withShadowRootMode("closed").withElementDisambiguation((()=>C.h.ignoreDuplicate)).register((0,lt.k)(),(0,dt.hb)(),(0,ct.ay)(),(0,pt.EK)()),C.K.getOrCreate().withShadowRootMode("open").withElementDisambiguation((()=>C.h.ignoreDuplicate)).withPrefix("msft").register(tt(),(0,et.xb)())}sportsCardLayoutChanged(t,e){t!=e&&(this.sdTemplateClassName=this.getSDCardTemplateClass())}showNavListChanged(t,e){t!=e&&(this.sdTemplateClassName=this.getSDCardTemplateClass())}experienceConnected(){var t;return(0,u.mG)(this,void 0,void 0,(function*(){try{if((0,at.$c)("SportsCardWC.Start"),!this.cardLayout&&this.config.isDynamicFeed&&(this.cardLayout=this.parentElement.getAttribute("cardsize")),this.isInitialSetup){if(this.isInitialSetup=!1,this.isGA&&this.config.enableEyeSdCardMask&&(null===(t=this.config.childExperienceReferences)||void 0===t?void 0:t.sdCardMaskWC)&&(yield(0,Ht.Fg)(this.config.childExperienceReferences.sdCardMaskWC)),this.telemetryObject=new mt.D({name:m.D8.SportsCard,type:ut.c9.Module}),this.uxstyle=at.n9.feed,this.sportsDataJson&&!this.sportsData){const t=Rt.maxMatchCount,e=new Map;if(e.teamImageSize=this.getTeamImageSize(),this.sportsData=v._.transformSportsMatchDataWithTrans(this.sportsDataJson,this.cardLayout==m.J4.Medium?3:t,e),!this.sportsData)return void(0,it.H)(rt.bf5,"Parse sports feed data error for Article integrated card.",`market:${(0,T.Yq)().CurrentMarket}, ocid:${this.config.ocid}, JSON response:${this.sportsDataJson}`);this.uxstyle=at.n9.article}"windowsNewsPlus"!=T.jG.AppType?(this.sportsViewMode=at._4.Default,this.config.isDynamicFeed?(document.addEventListener("CardResized",this.sizeChangeHandler),this.isPinned=this.supportedSdCardActionMenuItems&&this.supportedSdCardActionMenuItems.includes(b.B$.Unpin),this.setLayoutAndSizeForWidget()):(this.sportsCardLayout=this.cardLayout,this.cardSize=this.sportsCardLayout==m.J4.Small?"small":"medium"),this.zoneType=this.isPinned?"pinned":"feed",this.initialSportsData(this.sportsData)):(this.uxstyle=at.n9.widget,this.cardSize=this.config.cardLayout==m.J4.Small?"small":"medium",this.sportsCardLayout="small"==this.cardSize?m.J4.Small:m.J4.Medium,this.openLinksInNewTab=!0,this.readSportsDataFromIndexDb(),this.refreshIntervalInMs=this.config.refreshIntervalInMs),this.showCardHeader=this.uxstyle!=at.n9.widget&&1!=this.config.isDynamicFeed,this.initialWidgetInstance()}else this.addWidgetEvents();const e=this.widgetBackgroundMode?"dark"===this.widgetBackgroundMode:this.shouldUseDarkMode();this.isDarkMode!=e&&(this.isDarkMode=e,this.teamColorGradientBackgrdStyle=this.getMatchupCardGradientBackground(),this.setCardProperties())}catch(t){ht.M0.sendAppErrorEvent(Object.assign(Object.assign({},rt._vs),{message:"Sports: Exception when initialize SportsCardWC",pb:Object.assign(Object.assign({},rt._vs.pb),{customMessage:`Failed with exception : ${t}. type=${this.uxstyle} size=${this.cardSize} layout=${this.sportsCardLayout} isdynamic=${this.config.isDynamicFeed}`,isPinned:this.isPinned})}))}this.strings||(0,it.H)(rt._vs,"Sports card strings is null",`isInitial=${this.isInitialSetup} type=${this.uxstyle} size=${this.cardSize} layout=${this.sportsCardLayout} isdynamic=${this.config.isDynamicFeed}`),this.markVisuallyReadyRaf(),(0,at.$c)("SportsCardWC.Ready"),this.addEventListener("keydown",this.handleKeydown)}))}shadowDomPopulated(){if((0,y.MD)(l.x.sportsCardWC),(0,st.v9)(l.x.sportsCardWC),this.navHoverStartTime=0,this.postDomTasks(),this.uxstyle==at.n9.feed){this.config.isDynamicFeed||window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.colorSchemeChangeHandler),this.setIntersectionObserver();const t=this.cardSize;this.cardSize=this.sportsCardLayout==m.J4.Small?"small":"medium",this.sportsCardLayout==m.J4.Large&&this.config.isDynamicFeed&&(this.cardSize="large"),t!=this.cardSize&&(this.currentSportsMatchupData=this.getCurrentSportsMatchupData(),this.teamColorGradientBackgrdStyle=this.getMatchupCardGradientBackground())}}telemetryExtChanged(t,e){!(0,bt.Z)(t,e)&&this.telemetryExt&&t&&e&&(t.col!=e.col||t.row!=e.row||t.slot!=e.slot)&&(this.isCardExtChanged=!0)}sportsDataChanged(t,e){this.uxstyle!=at.n9.widget&&((0,bt.Z)(t,e)||!this.sportsData||!this.config||this.isCardSizeJustChanged||this.isCardExtChanged||((0,St.Z)(this.isCardExtChanged)||(0,St.Z)(this.isCardSizeJustChanged)?this.initialSportsData(e):setTimeout((()=>{this.isCardExtChanged||this.isCardSizeJustChanged||this.initialSportsData(e),this.isCardExtChanged=!1,this.isCardSizeJustChanged=!1}),300)))}initialSportsData(t){var e;t&&(this.sportsMatchCardData=t.sportsMatchupCardData,this.sportsMatchupData=[],this.sportsMatchDataList=[],this.sportsMatchupData.push(t),this.sportsMatchDataList=this.shouldRenderVideo()?t.sportsMatchWithVideoData||[]:t.sportsMatchOverallData,this.currentSportsMatchupData=this.getCurrentSportsMatchupData(),this.telemetryContext=this.getSportsCardTelemetry(),this.getContentTemplate(),this.teamColorGradientBackgrdStyle=this.getMatchupCardGradientBackground(),this.setCardProperties(),(null===(e=this.config)||void 0===e?void 0:e.isDynamicFeed)&&(this.sdCardData={titleContent:this.sportsViewMode==at._4.Settings?this.strings.widgetHeader:this.sportsMatchCardData&&this.sportsMatchCardData.cardTitle||this.strings.widgetHeader,link:this.sportsMatchCardData&&this.sportsMatchCardData.cardTitleClickthroughUrl}),this.isCardExtChanged=!1,this.isCardSizeJustChanged=!1)}setTmplTelemetry(){var t;if(this.currentSportsMatchupData&&this.currentSportsMatchupData.notifications&&this.currentSportsMatchupData.notifications.length>0){const e=null===(t=this.currentSportsMatchupData.notifications.filter((t=>t.type==m.tY.Badge)))||void 0===t?void 0:t.map((t=>`${t.gameId||""}-${t.gameState||""}`)).join("+"),a=this.currentSportsMatchupData.notifications.filter((t=>t.type.includes(m.tY.Preview))).map((t=>`${t.gameId||""}-${t.gameState||""}`)).join("+");(0,wt.T)(a)?ht.M0.removeTmplProperty(m.Ou.TaskbarRotation):(this.isTaskbarRotationTriggered=!0,ht.M0.addOrUpdateTmplProperty(m.Ou.TaskbarRotation,a)),(0,wt.T)(e)?ht.M0.removeTmplProperty(m.Ou.Badge):(this.isBadgingTriggered=!0,ht.M0.addOrUpdateTmplProperty(m.Ou.Badge,e))}else ht.M0.removeTmplProperty(m.Ou.Badge),ht.M0.removeTmplProperty(m.Ou.TaskbarRotation)}initialTemplateMap(){this.mapForTemplate={[m.mW.Default]:this.getMatchDefaultContentTemplate,[m.mW.SideBySide]:this.getSideBySideContentTemplate,[m.mW.LeaderBoard]:this.getLeaderBoardContentTemplate,[m.mW.Video]:this.getVideoContentTemplate,[m.mW.SuperDesign]:this.getSuperBowlContentTemplate,[m.mW.MarchMadness]:this.getMarchMadnessContentTemplate,[m.mW.NFLDraft]:this.getNFLDraftContentTemplate,[m.mW.SeriesFinals]:this.getSeriesFinalsContentTemplate,[m.mW.Articles]:this.getArticlesContentTemplate,[m.mW.Standings]:this.getStandingsContentTemplate,[m.mW.Formular1]:this.getLeaderboardBlendedContentTemplate}}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeydown),this.widgetSize&&this.widgetSize.removeEventListener(this.sizeChangeHandler),this.widgetSettings&&this.widgetSettings.removeEventListener(this.settingsHandler),this.widgetVisibility&&this.widgetVisibility.removeEventListener(this.visibilityHandler),this.widgetLifecycle&&this.widgetLifecycle.removeEventListener(this.lifecycleHandler),this.widgetProperties&&this.widgetProperties.removePropertyChangeListener(this.propertiesHandler),this.widgetInteractions&&this.widgetInteractions.removeEventListener(this.interactionsHandler),this.uxstyle==at.n9.feed&&(this.config.isDynamicFeed||window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",this.colorSchemeChangeHandler),this.unsetIntersectionObserver())}initialWidgetInstance(){var t,e,a,i;if(this.widgetInstanceId){const r=document.getElementById(this.widgetInstanceId);if(this.widgetInstance=r&&r.instance,this.config.isDynamicFeed)return void this.initDynamicWidgetProperties();if(this.uxstyle!=at.n9.widget)return;(0,at.$c)("SportsCardWC.WidgetStart"),this.widgetInstance?(this.widgetProperties=this.widgetInstance.tryGetApi("properties",x.l1,x.l1),this.widgetProperties&&(this.widgetProperties.title=(this.sportsViewMode==at._4.Settings?null===(t=this.strings)||void 0===t?void 0:t.widgetHeader:(null===(e=this.sportsMatchCardData)||void 0===e?void 0:e.cardTitle)||(null===(a=this.strings)||void 0===a?void 0:a.widgetHeader))||"",this.widgetProperties.attribution=null===(i=this.strings)||void 0===i?void 0:i.poweredByMSSports,this.widgetBackgroundMode=this.widgetProperties.getProperty("colorMode")||"light",this.widgetPosition=this.widgetProperties.getProperty("position"),this.widgetColumn=this.widgetProperties.getProperty("column"),this.widgetProperties.addPropertyChangeListener(this.propertiesHandler)),this.widgetSize=this.widgetInstance.tryGetApi("sizes",x.l1,x.l1),this.widgetSize&&(this.cardSize=this.widgetSize.getSize()||"small",this.widgetSize.addEventListener(this.sizeChangeHandler),this.getCurrentLayout()),this.widgetStatus=this.widgetInstance.tryGetApi("status",x.l1,x.l1),this.widgetSettings=this.widgetInstance.tryGetApi("settings",x.l1,x.l1),this.widgetSettings&&this.widgetSettings.addEventListener(this.settingsHandler),this.widgetVisibility=this.widgetInstance.tryGetApi("visibility",x.l1,x.l1),this.widgetVisibility&&this.widgetVisibility.addEventListener(this.visibilityHandler),this.widgetLifecycle=this.widgetInstance.tryGetApi("lifecycle",x.l1,x.l1),this.widgetLifecycle&&this.widgetLifecycle.addEventListener(this.lifecycleHandler),this.widgetInteractions=this.widgetInstance.tryGetApi("interactions",x.l1,x.l1),this.widgetInteractions&&this.widgetInteractions.addEventListener(this.interactionsHandler)):ht.M0.sendAppErrorEvent(Object.assign(Object.assign({},rt.QrA),{message:"Fail to get sports widget instance"})),(0,at.$c)("SportsCardWC.WidgetEnd")}}initDynamicWidgetProperties(){this.widgetInstance&&(this.widgetProperties=this.widgetInstance.tryGetApi("properties",x.l1,x.l1),this.widgetProperties&&(this.widgetBackgroundMode=this.widgetProperties.getProperty("colorMode")||"light",this.widgetProperties.addPropertyChangeListener(this.propertiesHandler)))}addWidgetEvents(){this.widgetProperties&&this.widgetProperties.addPropertyChangeListener(this.propertiesHandler),this.widgetSize&&this.widgetSize.addEventListener(this.sizeChangeHandler),this.widgetSettings&&this.widgetSettings.addEventListener(this.settingsHandler),this.widgetVisibility&&this.widgetVisibility.addEventListener(this.visibilityHandler),this.widgetLifecycle&&this.widgetLifecycle.addEventListener(this.lifecycleHandler),this.widgetInteractions&&this.widgetInteractions.addEventListener(this.interactionsHandler)}getExperienceType(){return l.x.sportsCardWC}getCurrentSportsMatchupData(){if(!this.sportsMatchupData||!this.sportsMatchupData.length)return;if