O],re.prototype,"toggleSDCardActionMenu",void 0),(0,s.gn)([p.LO],re.prototype,"tabs",void 0),(0,s.gn)([p.LO],re.prototype,"gradientMask",void 0),(0,s.gn)([p.LO],re.prototype,"sdCard",void 0),(0,s.gn)([p.LO],re.prototype,"fdSysProvider",void 0),(0,s.gn)([p.LO],re.prototype,"sdActions",void 0),(0,s.gn)([p.LO],re.prototype,"tabsContainer",void 0);var ne=i(39181),ae=i(58952),oe=i(18864),se=i(81422),de=i(74009),ce=i(13988),le=i(53271);const ue=ne.d`
    <div class="header-icon-container" part="header-icon-container" slot="title-icon">
        ${'<svg viewBox="0 0 14 14" fill="none"><path d="M4 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm1 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm2-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm1 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm2-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4-5.5A2.5 2.5 0 0 0 11.5 0h-9A2.5 2.5 0 0 0 0 2.5v9A2.5 2.5 0 0 0 2.5 14h9a2.5 2.5 0 0 0 2.5-2.5v-9ZM1 4h12v7.5c0 .83-.67 1.5-1.5 1.5h-9A1.5 1.5 0 0 1 1 11.5V4Zm1.5-3h9c.83 0 1.5.67 1.5 1.5V3H1v-.5C1 1.67 1.67 1 2.5 1Z"/></svg>'}
    </div>
`,he=ne.d`
    <fluent-button
        id="more-actions"
        title="${e=>e.strings.actionButtonText}"
        aria-label="${e=>e.strings.actionButtonText}"
        role="button"
        slot="more-actions"
        appearance="neutral"
        ${(0,ae.i)("sdActions")}
        @click="${(e,t)=>e.toggleSDCardActionMenu(t.event)}"
        @keypress="${(e,t)=>e.toggleSDCardActionMenu(t.event)}"
        data-t="${e=>(0,u.q4)(e.actionButtonTelemetryContract)}"       
        class="more-actions"        
    >
        ${le.Z}
    </fluent-button>
`,pe=ne.d`
    <fluent-tabs ${(0,ae.i)("tabsContainer")} class="upcoming-games-container-tablist" part="upcoming-games-container-tablist" ${(0,se.p)({property:"tabs",filter:(0,de.R)("fluent-tab")})}>
        ${(0,oe.rx)((e=>e.upcomingGamesData),ne.d`
                <fluent-tab slot="tab" class="tab-panel" part="tab-panel"
                data-t="${e=>e.tabTelemetryTag}"
    ))}>
                    ${e=>e.tabTitle}
                </fluent-tab>
            `,{positioning:!0})}
        ${(0,oe.rx)((e=>e.upcomingGamesData),(e=>{return t=(0,u.q4)(e.upcomingGamesCarouselCardTelemetryContract),ne.d`
        <msft-gaming-carousel-card slot="tabpanel">
            ${(0,oe.rx)((e=>{var t;return null!==(t=e.gamesData)&&void 0!==t?t:[]}),ne.d`
                <a
                    class="panel-container"
                    part="panel-container"
                    target=${(e,t)=>t.parent.openLinksInNewTab?"_blank":"_self"}
                    href="${e=>e.gameUrl}"
                    data-t="${e=>t}"
                >
                    <div class="mask"></div>

                    <div
                        class="panel-img-container"
                        part="panel-img-container"
                        style=${e=>`width: ${e.gameImageInfo.width}px; height: ${e.gameImageInfo.height}px;`}
                    >
                        <img
                            src="${e=>e.gameImage}"
                            alt="${e=>e.gameImageAltText}"
                            role="presentation"
                        />
                    </div>

                    <div
                        class="panel-text-container"
                        part="panel-text-container"
                    >
                        <div class="game-title" part="game-title">${e=>e.gameTitle}</div>
                        <div class="release-date" part="release-date">${e=>e.releaseDate}</div>
                    </div>
                </a>
            `,{positioning:!0})}
        </msft-gaming-carousel-card>
`;var t}))}
    </fluent-tabs>
`,ge=ne.d`
    <a class="clickable" 
        target=${e=>e.openLinksInNewTab?"_blank":"_self"}
        href="${e=>e.singleUpcomingGameData&&e.singleUpcomingGameData.gameUrl}"
        tabindex="0"
        data-t="${e=>(0,u.q4)(e.singleCardTelemetryContract)}">
    </a>
    <div
        class="game-container" 
        part="game-container"
    >
        <div
            class="game-image-container"
            part="game-image-container"
            style=${e=>`${e.singleUpcomingGameData&&`width: ${e.singleUpcomingGameData.gameImageInfo.width}px;`} ${e.singleUpcomingGameData&&`height: ${e.singleUpcomingGameData.gameImageInfo.height}px`}`}>
            <img 
                class="game-image" 
                part="game-image"
                src="${e=>e.singleUpcomingGameData&&e.singleUpcomingGameData.gameImage}"
                alt="${e=>e.singleUpcomingGameData&&e.singleUpcomingGameData.gameImageAltText}"
                role="presentation"
            >
            </img>
        </div>

        <div class="game-details" part="game-details">
            <div class="game-details-title" part="game-details-title">${e=>e.singleUpcomingGameData&&e.singleUpcomingGameData.gameTitle}</div>
            <div class="game-details-description" part="game-details-description">${e=>e.singleUpcomingGameData&&e.singleUpcomingGameData.gameDescription}</div>
        </div>
    </div>
`,me=ne.d`
    <div class="upcoming-games-container" part="upcoming-games-container">
        ${(0,ce.g)((e=>e.cardLayout===d.X.EsportsCardLayout._1x_1y),ge)}
        ${(0,ce.g)((e=>e.cardLayout!==d.X.EsportsCardLayout._1x_1y),pe)}
    </div>
`,fe=ne.d`
    <fluent-design-system-provider ${(0,ae.i)("fdSysProvider")} fill-color="#242424" use-defaults style="height: 100%;"> 
        <msft-structured-data-card
            target=${e=>e.openLinksInNewTab?"_blank":"_self"}
            :data=${e=>e.cardData}
            :headerTelemetryTag=${e=>(0,u.q4)(e.upcomingGamesCardTelemetryContract)}
            data-t="${e=>(0,u.q4)(e.upcomingGamesCardTelemetryContract)}"
            ${(0,ae.i)("sdCard")}
        >
            ${ue}
            ${he}
            ${me}

            <slot name="footer-start" slot="footer-start"></slot>
            <slot name="footer-end" slot="footer-end"></slot>
        </msft-structured-data-card>
    </fluent-design-system-provider>
`;var ve=i(32804),be=i(53046),ye=i(40082),xe=i(95263),we=i(15933);const Te=be.i`
    msft-structured-data-card {
        background: linear-gradient(44.24deg, #C2CEE8 0%, rgba(241, 246, 255, 0.6) 100%);
    }

    .tab-panel:hover,
    .tab-panel:active,
    .tab-panel:focus-visible {
        background-color: RGBA(0, 0, 0, 0.12);
    }

    .clickable:hover + .game-container,
    .clickable:active + .game-container,
    .clickable:focus-visible + .game-container,
    .more-actions {
        background-color: RGBA(0, 0, 0, 0.07);
    }
`,$e=be.i`
    msft-structured-data-card {
        background: linear-gradient(44.24deg, #2B3C59 0%, rgba(43, 60, 89, 0.6) 100%);
    }

    .tab-panel:hover,
    .tab-panel:active,
    .tab-panel:focus-visible {
        background-color: RGBA(255, 255, 255, 0.12);
    }

    .clickable:hover + .game-container,
    .clickable:active + .game-container,
    .clickable:focus-visible + .game-container,
    .more-actions {
        background-color: RGBA(255, 255, 255, 0.07);
    }

    fluent-tabs::part(activeIndicator) {
        background-color: #FFF;
    }
`,Ce=be.i`
:host {
    font-family: ${ve.SVJ};
    --content-padding: 12px 0;
    --sequence-indicator-padding: 7px 0;
    --title-padding: 0 16px 4px 16px;
}

msft-structured-data-card {
    z-index: 1;
}

msft-structured-data-card:before,
.panel-img-container:before {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.panel-img-container:hover:before,
.panel-img-container:active:before,
.panel-img-container:focus-visible:before {
    background: RGBA(0, 0, 0, 0.4);
}

.mask-gradient {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    transition-duration: 700ms;
    opacity: 0;
    background: linear-gradient(223.12deg, #328E32 2.22%, #10242E 100%);
}

msft-structured-data-card::part(title-content) {
    font-weight: 600;
}

msft-structured-data-card::part(title-link) {
    text-decoration: none;
    cursor: default;
}

.clickable {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
}

.clickable:focus-visible + .game-container {
    outline: 1px solid;
}

msft-structured-data-card([background="gradient"]) {
    background: ${xe.Sf};
}

msft-structured-data-card[background="dynamic"]) {
    background: ${xe.w_};
}

.header-icon-container {
    margin-top: 5px;
}

.header-icon-container > svg {
    width: 14px;
    height: 14px;
}

.header-icon-container > svg > path {
    fill: ${ve.CHi};
}

.game-container {
    cursor: pointer;
    text-decoration: none;
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    width: 100%;
    height: 84px;
    padding: 6px;
    margin: -6px;
    border-radius: 6px;
}

.game-details {
    font-size: ${ve.sNp};
    line-height: ${ve.vgC};
}

.game-details-title {
    color: ${ve.CHi};
    display: -webkit-box;
    overflow: hidden;
    font-weight: 600;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
}

.game-details-description {
    color: ${ve.Q5n};
    margin-top: calc(${ve.LQ3} * 1px);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    text-overflow: ellipsis;
}

.game-image-container {
    height: fit-content;
}

.game-image {
    position: relative;
    width: ${F.width.toString()}px;
    height: ${F.height.toString()}px;
    vertical-align: top;
    border-radius: 4px;
}

.upcoming-games-container {
    grid-row: 2 / -1;
    margin-top: 5px;
}

:host([card-layout=${d.X.EsportsCardLayout._1x_1y}]) .upcoming-games-container {
    padding: 0 16px;
}

:host([card-layout=${d.X.EsportsCardLayout._1x_2y}]) .upcoming-games-container {
    margin-top: 8px;
}

.upcoming-games-container-tablist {
    height: -webkit-fill-available;
}

fluent-tabs::part(tablist) {
    width: fit-content;
    padding-inline-start: 16px;
    padding-inline-end: 16px;
    column-gap: 12px;
}

fluent-tabs::part(activeIndicator) {
    width: 100%;
    height: 2px;
}

fluent-tab[aria-selected="true"] {
    font-weight: 600;
}

fluent-tab[aria-selected="false"] {
    color: ${ve.Q5n}
}

.tab-panel {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    height: auto;
    padding: 4px;
    margin: -4px;
}

msft-gaming-carousel-card::part(content-container) {
    margin-top: 12px;
}

.panel-container {
    position: relative;
}

.mask {
    position: absolute;
    width: 100%;
    height: 133px;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 100%);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    pointer-events: none;
}

.panel-img-container > img {
    width: ${_.width.toString()}px;
    height: ${_.height.toString()}px;
    border-radius: 4px;
    vertical-align: top;
}

.panel-text-container {
    position: absolute;
    bottom: 0;
    font-size: ${ve.sNp};
    line-height: ${ve.vgC};
    padding: 6px 8px;
    font-weight: 600;
    pointer-events: none;
}

.game-title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.83);
}

.release-date {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 1);
}

.arrow-container > svg {
    vertical-align: top;
    width: 24px;
    height: 24px;
}

.arrow-container  > svg > rect {
    fill: ${ve.Avx};
}

.arrow-container  > svg > rect:hover {
    fill: ${ve.OCG};
}

.arrow-container  > svg > path {
    fill: ${ve.s55};
}

.sd-action {
    height: auto;
}

.more-actions {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-width: 0;
    border-radius: 16px;
    cursor: pointer;
    z-index: 2;
}

/* Hard Force Styles Dark Mode for Xbox Tab Panel */

.tab-panel.dark-tab-panel:hover,
.tab-panel.dark-tab-panel:active,
.tab-panel.dark-tab-panel:focus-visible {
    background-color: RGBA(255, 255, 255, 0.12);
}

.dark-fluent-tabs::part(activeIndicator) {
    background-color: #FFF;
}

.more-actions.dark-more-actions {
    background-color: RGBA(255, 255, 255, 0.07);
}

/* Hard Force Styles Dark Mode for Xbox Tab Panel */

`.withBehaviors((0,ye.Uu)($e),(0,ye.zw)(Te),(0,ye.vF)(be.i`
            :host {
                forced-color-adjust: auto;
            }
            :host([href]) {
                color: ${we.H.LinkText};
            }
        `)),Ie={experienceConfigSchema:o}},79703:function(e,t,i){"use strict";i.d(t,{$:function(){return a}});var r,n=i(19628);!function(e){e[e.Default=0]="Default",e[e.Medium=1]="Medium",e[e.MonthDate=2]="MonthDate",e[e.Weekday=3]="Weekday",e[e.Time=4]="Time"}(r||(r={}));class a{constructor(){this.dateFormatOptionsMap=new Map,this.setSupportsLocaleSpecifiers(),this.dateFormatOptionsMap.set(r.Medium,{year:"numeric",month:"short",day:"numeric"}),this.dateFormatOptionsMap.set(r.MonthDate,{month:"short",day:"numeric"}),this.dateFormatOptionsMap.set(r.Weekday,{weekday:"short"}),this.dateFormatOptionsMap.set(r.Time,{hour:"numeric",minute:"numeric"})}overrideDateFormat(e,t){e&&t&&this.dateFormatOptionsMap.set(e,t)}localizedDateString(e,t){return this.formatDate(e,r.Default,t)}localizedDateStringMedium(e,t){return this.formatDate(e,r.Medium,t)}localizedMonthDate(e,t){return this.formatDate(e,r.MonthDate,t)}localizedWeekday(e,t){return this.formatDate(e,r.Weekday,t)}formatTimeFromDate(e,t){return this.supportsLocaleSpecifiers&&this.dateFormatOptionsMap?e.toLocaleTimeString(t,this.dateFormatOptionsMap.get(r.Time)):e.toTimeString()}format(e,...t){return e?n.Ld.Format(e,...t):""}localizedNumberString(e,t){return this.supportsLocaleSpecifiers?e.toLocaleString(t):e.toString()}formatDate(e,t,i){let n=null;if(this.supportsLocaleSpecifiers)if(t===r.Default)n=e.toLocaleDateString(i);else if(this.dateFormatOptionsMap){const r=this.dateFormatOptionsMap.get(t);n=e.toLocaleDateString(i,r)}return null===n&&(n=e.toDateString()),null!==n?n.replace(/\u200E/g,"").replace(/\u200F/g,""):n}setSupportsLocaleSpecifiers(){this.supportsLocaleSpecifiers=(()=>{try{(0).toLocaleString("i")}catch(e){return"RangeError"===e.name}return!1})()}}},19280:function(e,t,i){"use strict";i.d(t,{d:function(){return r}});var r,n=i(33940),a=i(33799),o=i(68364),s=i(26415),d=i(16517),c=i(65337),l=i(67267),u=i(63535),h=i(87298),p=i(17157),g=i(59207),m=i(66861),f=i(11708),v=i(65135),b=i(99478),y=i(791),x=i(51671);!function(e){function t(e,t,i,r,d){return(0,n.mG)(this,void 0,void 0,(function*(){if((0,b.TF)(e))return null;const c=e,p={displayName:t,idType:"Satori",dataType:d},g={method:"POST",body:JSON.stringify({actionType:i,targetId:c,targetType:r,metadata:p}),headers:yield l.$.getOneServiceHeaders()},f=yield(0,x.rr)();f===a.Hy.SignedIn&&(g.credentials="include");const v=(0,u.PH)(m.X.interestServiceEndpoint);let y;(yield w(f,m.X.interestServiceOcid)).forEach((e=>e.value&&v.searchParams.set(e.key,e.value)));try{return y=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield fetch(v.href,g);if(e.status>=400){const t=`postActionRequest OneService returned error response. Status: ${e.status} for actionType: ${i}, targetId: ${c}, targetType: ${r}`;return(0,o.OO)(new Error,s.IIT,t),null}return e.json()}))),`postCardAction${i}`),yield y}catch(e){(0,o.OO)(e,s.IIT,"Error while posting action for card interest action",`Url: ${v.href}`)}return y}))}function i({apiUrl:e,ocid:t=null,addPageInfoToOcid:i=!1,appendCommonParams:r=!0,appendMarket:o=!1,method:c="GET",body:u=null,additionalHeaders:h=null,withRetries:m=!0,logErrorAsWarning:f=!1}){return(0,n.mG)(this,void 0,void 0,(function*(){let b,y;try{b=new URL(e)}catch(t){return void v.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.I8d),{message:"Error while request esports data with URL exception.",pb:Object.assign(Object.assign({},s.I8d.pb),{fetchNetworkResponse:{activityId:(0,d.Yq)().ActivityId,requestUrl:e},customMessage:`Error while request esports data with URL exception: ${t&&t.message} URL: ${e}`})}))}if(r){y=yield l.$.getBaseRequestData(c),u&&(y.body=JSON.stringify(u));const e=yield(0,x.rr)();e===a.Hy.SignedIn&&(y.credentials="include"),function(e){(0,n.mG)(this,void 0,void 0,(function*(){const t="undefined"!=typeof window&&(0,p.wq)()&&(0,g._4)(),i=t?t.market||"en-us":(0,d.Yq)().CurrentMarket||"en-us",r=t?t.latitude:(0,d.Yq)().Latitude,n=t?t.longitude:(0,d.Yq)().Longitude;e.set("market",i),r&&n&&(e.set("lat",r),e.set("long",n))}))}(b.searchParams);(yield w(e,t,i)).forEach((e=>e.value&&b.searchParams.set(e.key,e.value)))}if(o){const e="undefined"!=typeof window&&(0,p.wq)()&&(0,g._4)(),t=e?e.market:(0,d.Yq)().CurrentMarket;b.searchParams.set("market",t)}return h&&h.length&&h.forEach((e=>{e.value&&b.searchParams.set(e.key,e.value)})),T(b.href,y,"fetchEsportsData",m,f)}))}function r(e,t,i,r=!1){return(0,n.mG)(this,void 0,void 0,(function*(){const n=yield fetch(decodeURIComponent(e),t);if(n&&n.ok)return n;{const a={statusCode:n.status,statusText:n.statusText,activityId:(0,d.Yq)().ActivityId,requestUrl:e,requestHeaders:JSON.stringify(t&&t.headers)},o=`Error while calling ${i}`,c=`${o}: URL: ${e}, responseMessage: ${JSON.stringify(n)}`;r?v.M0.sendClientLogEvent({message:o,type:"information",pb:Object.assign(Object.assign({},(0,s.mnt)()),{fetchNetworkResponse:a,customMessage:c})}):v.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.bKC),{message:o,pb:Object.assign(Object.assign({},s.bKC.pb),{fetchNetworkResponse:a,customMessage:c})}))}}))}function w(e,t=null,i=!0){return(0,n.mG)(this,void 0,void 0,(function*(){return e===a.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,t,i):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,t,i)}))}function T(e,t,i,a=!0,o=!1){return(0,n.mG)(this,void 0,void 0,(function*(){let n;try{return n=a?yield(0,h.w)((()=>r(e,t,i,o)),i):yield r(e,t,i,o),yield n.json()}catch(r){const n={activityId:(0,d.Yq)().ActivityId,requestUrl:e,requestHeaders:JSON.stringify(t&&t.headers)},a=`Error while requesting ${i}`,c=`${a}}: ${r&&r.message} URL: ${e} headers: ${(null==t?void 0:t.headers)&&JSON.stringify(null==t?void 0:t.headers)}`;o?v.M0.sendClientLogEvent({message:a,type:"information",pb:Object.assign(Object.assign({},(0,s.mnt)()),{fetchNetworkResponse:n,customMessage:c})}):v.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.I8d),{message:a,pb:Object.assign(Object.assign({},s.I8d.pb),{fetchNetworkResponse:n,customMessage:c})}))}}))}function $(){return(0,n.mG)(this,void 0,void 0,(function*(){const e="xboxXTokenId";let t=(0,c.$o)().getObject(e);const i=new Date;if(i.setHours(i.getHours()+1),!t||!t.xid||!t.notAfter||new Date(t.notAfter)<=i){const r=yield function(){return(0,n.mG)(this,void 0,void 0,(function*(){const e={"x-xbl-contract-version":"1","content-type":"application/json"};return yield function(){return(0,n.mG)(this,void 0,void 0,(function*(){if((yield(0,x.rr)())===a.Hy.SignedIn&&d.jG&&d.jG.ResolvedAccountInfo&&(!d.jG.ResolvedAccountInfo||d.jG.ResolvedAccountInfo.account_type===a.Qm.MSA))return new Promise(((e,t)=>{if(!window.chrome||!window.chrome.authPrivate||!window.chrome.authPrivate.acquireAccessTokenSilently)return e(null);const i={account_id:d.jG.ResolvedAccountInfo.account_id,account_type:window.chrome.authPrivate.AccountType.MSA,client_id:"f3222e55-ab35-49de-81f3-88a3be08cf77",scope_or_resource:"service::xboxlive.signin::DELEGATION",use_msa_v2_api:!0};window.chrome.authPrivate.acquireAccessTokenSilently(i,(i=>{i&&i.is_success&&i.is_token_valid?e(i.access_token):(v.M0.sendClientLogEvent({message:"Failed to fetch access_token from privateAuth API",type:"information",pb:Object.assign({},(0,s.mnt)())}),t(null))}))}));v.M0.sendClientLogEvent({message:"Unable to get xbox authentication token as account type is not MSA",type:"information",pb:Object.assign({},(0,s.mnt)())})}))}().then((t=>{if(!t)return null;const i={method:"POST",body:JSON.stringify({RelyingParty:"http://auth.xboxlive.com",TokenType:"JWT",Properties:{AuthMethod:"RPS",SiteName:"user.auth.xboxlive.com",RpsTicket:`d=[${t}]`}}),headers:e};return T(m.X.getXboxUserTokenUrl,i,"getXboxUserToken",!1,!0)})).then((t=>{if(!t||!t.Token)return null;const i={method:"POST",body:JSON.stringify({Properties:{SandboxId:"RETAIL",UserTokens:[`${t.Token}`]},RelyingParty:"http://xboxlive.com",TokenType:"JWT"}),headers:e};return T(m.X.getXboxXTokenUrl,i,"getXboxXToken",!1,!0)}))}))}();if(r&&r.IssueInstant&&r.NotAfter&&r.Token&&r.DisplayClaims&&r.DisplayClaims.xui&&r.DisplayClaims.xui.length&&r.DisplayClaims.xui[0].xid&&r.DisplayClaims.xui[0].uhs)t={issueInstant:r.IssueInstant,notAfter:r.NotAfter,token:r.Token,xid:r.DisplayClaims.xui[0].xid,uhs:r.DisplayClaims.xui[0].uhs};else{v.M0.sendClientLogEvent({message:"Unable to get Xbox XToken",type:"information",pb:Object.assign({},(0,s.mnt)())});const e=new Date;e.setFullYear(i.getFullYear()+1),t={issueInstant:null,notAfter:e,token:"NoToken",xid:null,uhs:null}}(0,c.$o)().setObject(e,t)}}))}function C(){return(0,n.mG)(this,void 0,void 0,(function*(){const e=(0,c.$o)().getObject(m.X.localStorageXboxXTokenId);return e&&e.token&&e.xid&&e.uhs&&e.notAfter&&new Date(e.notAfter)>new Date?yield I().then((t=>(0,n.mG)(this,void 0,void 0,(function*(){if(!t)return null;const i={};i.authorization=`XBL3.0 x=${e.uhs};${e.token}`,i["x-xbl-contract-version"]="2",i["x-xbl-client-name"]="Gaming",i["x-xbl-client-type"]="Service",i["xbl-scenario-type"]="EdgeGNTP",i["Accept-Language"]=(0,d.Yq)().CurrentMarket.substring(0,2),i["content-type"]="application/json";const r={method:"GET",headers:i},n=m.X.xboxTitleHubUrlTemplate.replace("{xuidValue}",e.xid),a=yield T(n,r,"fetchXboxTitleHubData",!1,!0);if(!a||!a.titles||!a.titles.length)return null;const o=a.titles.filter((e=>e.type&&"game"===e.type.toLowerCase()&&e.titleRecord&&e.titleRecord.lastTimePlayed)).sort((function(e,t){return new Date(t.titleRecord.lastTimePlayed).getTime()-new Date(e.titleRecord.lastTimePlayed).getTime()}));if(!o||!o.length)return null;const s=o[0];if(s&&s.images&&s.images.length){const e=s.images.find((e=>e.type&&"poster"===e.type.toLowerCase()));e&&e.url&&(s.displayImage=e.url)}const c=new Array;return c.push(o[0]),o.slice(1).filter((e=>e.isStreamable)).forEach((e=>{c.push(e)})),c.slice(0,6)})))):null}))}function I(){return(0,n.mG)(this,void 0,void 0,(function*(){const e=yield i({apiUrl:m.X.pdpUserSettingsUrl,ocid:m.X.anaheimNtpFeedsOcid,addPageInfoToOcid:!1,appendCommonParams:!0,appendMarket:!1,method:"GET",body:null,additionalHeaders:null,withRetries:!1,logErrorAsWarning:!0});if(!(e&&e.value&&e.value.length&&e.value[0]&&e.value[0].userSettings&&e.value[0].userSettings.gamingCards))return!1;let t;try{t=JSON.parse(e.value[0].userSettings.gamingCards)}catch(e){v.M0.sendClientLogEvent({message:"Error in getXboxUserConsent(). Unable to parse user settings",type:"information",pb:Object.assign({},(0,s.mnt)())})}return t&&t.isConnectToXboxEnabled}))}e.hideEsportsCard=function(){return(0,n.mG)(this,void 0,void 0,(function*(){const e=f.f.EsportsCard;try{return yield y.N.updateSegmentCardsEnableStatus([{cardType:e,enabled:!1}]),!0}catch(t){return(0,o.OO)(t,s.IIT,`'${e.toString()}' card settings save failed while hiding esports card.`),!1}}))},e.updateGamingCardEnableStatus=function(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i=[{cardType:e,enabled:t}];try{return yield y.N.updateGamingCardsEnableStatus(i),!0}catch(t){return(0,o.OO)(t,s.aKV,`User ${e} settings update failed`),!1}}))},e.notInterestedCard=function(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e||(0,b.TF)(e.videoGame.id))return!1;try{return yield t(e.videoGame.id,e.videoGame.name,m.X.dislikeAction,e.videoGame.type,e.dataType),!0}catch(t){return(0,o.OO)(t,s.IIT,`Esports card settings save failed while dislike esports live stream card videogame Id: ${e.videoGame.id}`),!1}}))},e.esportsFetch=function(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){if((0,b.TF)(e))return null;try{const i=yield fetch(e,t);return i&&i.ok?i.json():void v.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.bKC),{message:"Error while calling esports fetch.",pb:Object.assign(Object.assign({},s.bKC.pb),{fetchNetworkResponse:{statusCode:i.status,statusText:i.statusText,activityId:(0,d.Yq)().ActivityId,requestUrl:e,requestHeaders:JSON.stringify(t&&t.headers)},customMessage:`Error while calling esports fetch, URL: ${e}, responseMessage: ${JSON.stringify(i)}`})}))}catch(t){(0,o.OO)(t,s.bKC,"Error while calling esports fetch",`Url: ${e}`)}}))},e.postActionRequest=t,e.isEsportsUserGamer=function(){return(0,n.mG)(this,void 0,void 0,(function*(){const e=yield i({apiUrl:m.X.checkIfUserGamerUrl,ocid:m.X.anaheimNtpFeedsOcid,addPageInfoToOcid:!1,appendCommonParams:!0,appendMarket:!1,method:"GET",body:null,additionalHeaders:null,withRetries:!1,logErrorAsWarning:!0}),t=e&&e.value&&e.value.length&&e.value.filter((e=>e.metadata&&e.metadata.score&&"Follow"===e.actionType&&Number(e.metadata.score)>=.2));let r="";const n=t&&t.some((e=>e.metadata.satoriId&&m.X.userGamerGames.includes(e.metadata.satoriId))),a=t&&t.some((e=>e.targetId&&"Y_xboxSpecialInterest"===e.targetId)),o=t&&t.some((e=>e.targetId&&"Y_windowsSpecialInterest"===e.targetId));return n&&(r=m.X.GamerUserType.Gamer),a&&(r&&(r+=";"),r+=m.X.GamerUserType.XboxGamer),o&&(r&&(r+=";"),r+=m.X.GamerUserType.PCGamer),r}))},e.postRewards=function(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=yield i({apiUrl:m.X.PostRewardsEventApiUrl,ocid:m.X.anaheimNtpFeedsOcid,addPageInfoToOcid:!1,appendCommonParams:!0,appendMarket:!1,method:"POST",body:{offerid:e},additionalHeaders:null,withRetries:!1,logErrorAsWarning:!0});return t&&t.value}))},e.fetchEsportsData=i,e.sendRequestWithRetries=T,e.setXboxXToken=$,e.setXboxTitleHubData=function(){return(0,n.mG)(this,void 0,void 0,(function*(){yield $();const e=(0,c.$o)().getObject(m.X.localStorageXboxTitleHubDataId);if(e&&e.timestamp){const t=((new Date).getTime()-new Date(e.timestamp).getTime())/1e3/60;if(Math.round(t)<30)return}yield C().then((e=>{if(!e)return null;const t={timestamp:new Date,games:e};(0,c.$o)().setObject(m.X.localStorageXboxTitleHubDataId,t)}))}))},e.fetchXboxTitleHubData=C,e.getXboxUserConsent=I}(r||(r={}))},66861:function(e,t,i){"use strict";i.d(t,{X:function(){return r}});var r,n=i(83227),a=i(53909);!function(e){let t,i,r,o;e.startggStreamBaseUrl="https://www.start.gg/game",e.hubBaseUrl="https://www.msn.com/{0}/esports",e.edgeForGamersOcid="e4gntp",e.interestServiceEndpoint="graph/actions",e.interestServiceOcid="Peregrine",e.gamingShorelineOcid="gaming-shoreline",e.anaheimNtpFeedsOcid="anaheim-ntp-feeds",e.dislikeAction="Dislike",e.bingImagePartnerId="uxf",e.thFallbackImage="hubstream_fallback.jpg",e.streamImagePlaceholderThId="OUWL.streamer_placeholder",e.actionMenuItemKeyNotInterested="notInterested",e.actionMenuItemKeyHideCard="hideCard",e.actionMenuItemKeyMoreSettings="moreSettings",e.esportsAppKey="LszQbGWEXeh76bQTAnx4q79cOFDP2WLYWpLDIpKfpJ",e.gamePlayEventCollectionUrl=`https://api.msn.com/sports/RecordGamePlayEvent?apikey=${e.esportsAppKey}&ocid=${e.gamingShorelineOcid}`,e.checkIfUserGamerUrl="https://api.msn.com/news/users/me/actions?actionType=Follow&domain=Sports&interestType=All",e.pdpUserSettingsUrl="https://api.msn.com/Msn/User",e.PostRewardsEventApiUrl="https://api.msn.com/sports/GamingPostRewardsEvent",e.getXboxUserTokenUrl="https://user.auth.xboxlive.com/user/authenticate",e.getXboxXTokenUrl="https://xsts.auth.xboxlive.com/xsts/authorize",e.xboxTitleHubUrlTemplate="https://titlehub.xboxlive.com/users/xuid({xuidValue})/titles/TitleRecord/decoration/image,productid,titlerecord",e.localStorageXboxXTokenId="xboxXTokenId",e.localStorageXboxTitleHubDataId="xboxTitleHubDataId",function(e){e._1x_1y="_1x_1y",e._1x_2y="_1x_2y",e._2x_2y="_2x_2y",e._1x_3y="_1x_3y",e._1x_4y="_1x_4y",e._3x_2y="_3x_2y",e._4x_2y="_4x_2y",e._5x_2y="_5x_2y"}(t=e.EsportsCardLayout||(e.EsportsCardLayout={})),function(e){e.ALL="All",e.APEXLEGEND="2781507b-9bd4-4c47-416f-d433779a2d6a",e.BRAWLHALLA="b1f5c13d-8516-a262-f45c-0fe77103db58",e.COD="ea104807-e8bd-68bf-a85b-c01c90fd5e18",e.COD_MODERN_WARFARE="873504a6-feb4-e8af-fe27-e46326e4b8be",e.CSGO="8f345aa7-ff29-2efd-48fd-8230fd8795aa",e.DOTA2="51b8bf37-fede-45d5-3943-fef79b0fa628",e.FIFA="4e3a60d9-f3ec-ad0f-82ab-472cd8d340a2",e.FORTNITE="13cbc36a-9316-174d-9f11-61ed80751dc8",e.FREEFIRE="4e01bfde-542a-46b7-8c3e-658af348176a",e.GEARS="d98409bb-18ff-541b-1ceb-1d1632e5442a",e.LOL="dcd754dc-9f53-0f8b-3bfc-9c401f16138b",e.MINECRAFT="a9646932-a188-6101-5549-da706613afa0",e.NBA="a3cac10a-d3a0-ac0e-0c04-e23c12a6b4b3",e.NFL="d15fca59-bf56-d81f-d64a-6f44c3bc6a03",e.OVERWATCH="c7762702-92e8-4ab9-87d5-4aac3f34a16c",e.PUBG="a002f1d4-ea2f-ea92-db95-ddeb4e8206f9",e.RAINBOWSIX="8d2a217f-dbef-13a0-708b-53618a35ab1c",e.ROBLOX="3312f0b2-0877-a9cf-aa03-547a861a96f3",e.ROCKETLEAGUE="b872778f-614c-a7ea-e82a-6c42c6c6ccb9",e.SMASH="8b505cf6-ee61-5e74-143b-6db3fc488f26",e.TEKKEN7="ff53a039-d7ac-8c35-39ab-0748e4c8825f",e.VALORANT="72d5fb42-ec96-44e0-ae93-2e1cfb2c1836",e.HALO="9fb23673-5160-bfc9-6234-f986b96819b2",e.WOW="a5c80c6b-1c83-2986-81b7-ca9d8465e940"}(i=e.Game||(e.Game={})),e.userGamerGames=[i.LOL,i.DOTA2,i.FORTNITE,i.VALORANT,i.APEXLEGEND,i.CSGO,i.COD_MODERN_WARFARE,i.ROCKETLEAGUE,i.OVERWATCH,i.WOW],e.csgo={id:i.CSGO,abbreviation:"csgo",thId:"OUWL.esportshub_gamelogo_CSGO"},e.cod={id:i.COD,abbreviation:"cod",thId:"OUWL.esportshub_gamelogo_callofduty"},e.dota2={id:i.DOTA2,abbreviation:"dota2",thId:"OUWL.esportshub_gamelogo_dota2"},e.fortnite={id:i.FORTNITE,abbreviation:"fortnite",thId:"OUWL.esportshub_gamelogo_Fortnite"},e.lol={id:i.LOL,abbreviation:"lol",thId:"OUWL.esportshub_gamelogo_leagueoflegends"},e.overwatch={id:i.OVERWATCH,abbreviation:"overwatch",thId:"OUWL.esportshub_gamelogo_overwatch"},e.pubg={id:i.PUBG,abbreviation:"pubg",thId:"OUWL.esportshub_gamelogo_pubg"},e.rainbowSix={id:i.RAINBOWSIX,abbreviation:"rainbowsix",thId:"OUWL.esportshub_gamelogo_rainboxsix"},e.rocketLeague={id:i.ROCKETLEAGUE,abbreviation:"rocketleague",thId:"OUWL.esportshub_gamelogo_rocketleague"},e.valorant={id:i.VALORANT,abbreviation:"valorant",thId:"OUWL.esportshub_gamelogo_valorant"},e.fifa={id:i.FIFA,abbreviation:"fifa",thId:"OUWL.esportshub_gamelogo_fifa"},e.gears={id:i.GEARS,abbreviation:"gears",thId:"OUWL.esportshub_gamelogo_gears5"},e.smashBros={id:i.SMASH,abbreviation:"smash",thId:"OUWL.esportshub_gamelogo_smashbros"},e.apexLegends={id:i.APEXLEGEND,abbreviation:"apexlegend",thId:"OUWL.esportshub_gamelogo_apex"},e.brawlhalla={id:i.BRAWLHALLA,abbreviation:"brawlhalla",thId:"OUWL.esportshub_gamelogo_brawlhalla"},e.minecraft={id:i.MINECRAFT,abbreviation:"minecraft",thId:"OUWL.esportshub_gamelogo_minecraft"},e.nba={id:i.NBA,abbreviation:"nba",thId:"OUWL.esportshub_gamelogo_nba"},e.roblox={id:i.ROBLOX,abbreviation:"roblox",thId:"OUWL.esportshub_gamelogo_roblox"},e.tekken7={id:i.TEKKEN7,abbreviation:"tekken7",thId:"OUWL.esportshub_gamelogo_tekken"},e.freeFire={id:i.FREEFIRE,abbreviation:"freefire",thId:"OUWL.esportshub_gamelogo_freefirte"},e.nfl={id:i.NFL,abbreviation:"nfl",thId:"OUWL.esportshub_gamelogo_madden"},e.halo={id:i.HALO,abbreviation:"halo",thId:"OUWL.esportshub_gamelogo_haloinfinite"},e.GameMap=new Map([[e.csgo.id,e.csgo],[e.lol.id,e.lol],[e.valorant.id,e.valorant],[e.fortnite.id,e.fortnite],[e.rocketLeague.id,e.rocketLeague],[e.csgo.id,e.csgo],[e.dota2.id,e.dota2],[e.overwatch.id,e.overwatch],[e.pubg.id,e.pubg],[e.cod.id,e.cod],[e.rainbowSix.id,e.rainbowSix],[e.fifa.id,e.fifa],[e.gears.id,e.gears],[e.smashBros.id,e.smashBros],[e.apexLegends.id,e.apexLegends],[e.freeFire.id,e.freeFire],[e.minecraft.id,e.minecraft],[e.roblox.id,e.roblox],[e.tekken7.id,e.tekken7],[e.nfl.id,e.nfl],[e.nba.id,e.nba],[e.brawlhalla.id,e.brawlhalla],[e.halo.id,e.halo]]),e.esportsTelemetryConstants={vertical:"esports",esportsCard:"esports_{cardtype}_card",header:"esports_{cardtype}_header",stream:"esports_{cardtype}_stream",game:"esports_{cardtype}_game",customization:"esports_{cardtype}_customization",moreSettings:"esports_{cardtype}_customization_moresettings",hideCard:"esports_{cardtype}customization_hidecard",notInterested:"esports_{cardtype}_customization_notinterested"},e.gamingTelemetryVertical="gaming",e.gamingTelemetryProviderType="publisher",e.gamingTelemetryAudienceMode="consumer",e.GamingExperienceTelemetryMap=new Map([[n.x.gamingCompeteCard,"GamingCompeteCard"],[n.x.gamingMediaCarousel,"GamingMediaCarousel"],[n.x.gamingPersonalizationCard,"GamingPersonalizeCTACard"],[n.x.gamingRecentlyPlayedCard,"GamingRecentlyPlayedCard"],[n.x.gamingRecommendedCard,"GamingRecommendedCard"],[n.x.gamingRedditCard,"GamingRedditCard"],[n.x.gamingRewardsCard,"GamingRewardsCard"],[n.x.gamingStreamCard,"GamingLiveStreamsCard"],[n.x.gamingTournamentCard,"GamingProTournamentsCard"],[n.x.gamingUpcomingCard,"GamingUpcomingGamesCard"],[n.x.gamingVideoCard,"GamingYoutubeCard"],[n.x.gamingMatchCard,"GamingProMatchesCard"],[n.x.casualGamesCard,"GamingCasualGamesCard"],[n.x.esportsCasualGamesCard,"GamingCasualGamesCard"]]),function(e){e.TitleLink="TitleLink",e.SubredditLink="SubredditLink",e.SingleEventLink="SingleEventLink",e.XboxPlayLink="XboxPlayLink",e.AchievementGuideLink="AchievementGuideLink",e.GameGuideLink="GameGuideLink",e.XCloudGameLink="XCloudGameLink",e.DiscoverLink="DiscoverLink",e.ConnectToXboxButton="ConnectToXboxButton",e.JoinButton="JoinButton",e.TermsButton="TermsButton",e.PrivacyButton="PrivacyButton",e.TournamentContentCard="TournamentContentCard",e.MatchContentCard="MatchContentCard",e.ContentCard="ContentCard",e.GameCarouselCard="GameCarouselCard",e.SeeMore="SeeMore",e.SeeAll="SeeAll",e.UpNextTab="UpNextTab",e.MyEventsTab="MyEventsTab",e.EventCard="EventCarouselCard",e.GamingCarousel="GamingCarousel",e.SequenceIndicator="SequenceIndicator",e.NextFlipper="NextFlipper",e.PreviousFlipper="PreviousFlipper",e.PaginationDot="PaginationDot",e.NewReleasesTab="NewReleasesTab",e.ComingSoonTab="ComingSoonTab",e.GamePassTab="GamePassTab",e.CarouselCard="CarouselCard",e.PersonalizeNowButton="PersonalizeNowButton",e.Header="Header",e.ActionButton="ActionButton",e.MoreSettings="MoreSettingsAction",e.MoreOptions="MoreOptionsAction",e.HideCard="HideCardAction",e.NotInterested="NotInterestedAction",e.HeadCard="HeadCard",e.genreMenuButton="genreMenuButton",e.genreMenuItem="genreMenuItem",e.genreCard="genreCard",e.CarouselHeaderLink="CarouselHeaderLink",e.CarouselHeaderIconLink="CarouselHeaderIconLink"}(r=e.GamingTelemetryComponent||(e.GamingTelemetryComponent={})),e.cardImageInfo={width:300,height:146,enableDpiScaling:!1,format:a.D3.PNG},e.cardImage1uInfo={width:300,height:304,enableDpiScaling:!1,format:a.D3.PNG},e.cardImage16_9Info={width:300,height:157,enableDpiScaling:!1,format:a.D3.PNG},e.timeIconThid="OUWL.gaming_time",e.timeIconSettings={width:12,height:12,enableDpiScaling:!1},e.viewsIconThid="OUWL.gaming_views",e.viewsIconSettings={width:12,height:8,enableDpiScaling:!1},e.youtubeIconThid="OUWL.gaming_youtube",e.twitchIconPurpleThid="OUWL.gaming_twitch_purple",e.twitchIconWhiteThid="OUWL.gaming_twitch_white",e.facebookgamingIconBlueThid="OUWL.gaming_facebookgaming_blue",e.facebookgamingIconWhiteThid="OUWL.gaming_facebookgaming_white",e.providerIconSettings={width:16,height:16,enableDpiScaling:!0},e.gameIconSettings={width:20,height:20,enableDpiScaling:!0},e.streamerIcon={width:32,height:32,enableDpiScaling:!0,format:a.D3.PNG},e.streamerIconLarge={width:60,height:60,enableDpiScaling:!0,format:a.D3.PNG},function(e){e.Gamer="IsGamer",e.XboxGamer="IsXboxGamer",e.PCGamer="IsPCGamer"}(o=e.GamerUserType||(e.GamerUserType={}))}(r||(r={}))},4936:function(e,t,i){"use strict";i.d(t,{At:function(){return m},I$:function(){return l},J_:function(){return g},Lj:function(){return f},tY:function(){return d},xx:function(){return p},zI:function(){return h}});var r=i(53909),n=i(16517),a=i(66861),o=i(76859),s=i(49088);const d=new Map([[o.Nv._1x_1y,a.X.EsportsCardLayout._1x_1y],[o.Nv._1x_2y,a.X.EsportsCardLayout._1x_2y],[o.Nv._2x_2y,a.X.EsportsCardLayout._2x_2y],[o.Nv._1x_3y,a.X.EsportsCardLayout._1x_3y],[o.Nv._1x_4y,a.X.EsportsCardLayout._1x_4y],[o.Nv._3x_2y,a.X.EsportsCardLayout._3x_2y],[o.Nv._4x_2y,a.X.EsportsCardLayout._4x_2y],[o.Nv._5x_2y,a.X.EsportsCardLayout._5x_2y]]);var c;!function(e){e.VideoGame="VideoGame",e.Streamer="Streamer",e.Stream="Stream"}(c||(c={}));function l(e){if(!e||0==e.length)return null;return e[Math.floor(Math.random()*e.length)]}const u=Math.ceil(4*Math.random())||4;function h(){return`ts${u}.cn.mm.bing.net/th`}function p(e,t,i=!1){if((0,s.T)(e))return i?(0,r.zz)(a.X.streamImagePlaceholderThId,t):null;let o=r.q3;return n.jG.IsChinaCompliance&&(o=h()),(0,r.mL)(`${o}?id=${e}&pid=${a.X.bingImagePartnerId}&rf=${a.X.thFallbackImage}`,t)}function g(e){let t=0;for(let i=0;i<e.length;i++)if("0"!==e.charAt(i)&&":"!==e.charAt(i)||i>=e.length-4){t=i;break}return e.substring(t)}function m(e){if(null==e||isNaN(e)||e<=0)return"";return g(new Date(1e3*e).toISOString().slice(11,19))}function f(e,t){if(!e.includes("?"))return"";const i=e.split("?")[1].split("&");for(let e=0;e<i.length;e++){const r=i[e];if(!r.includes("="))continue;const n=r.split("="),a=n[0],o=n[1];if(a==t)return o}return""}},58239:function(e,t,i){"use strict";i.d(t,{BR:function(){return l},cZ:function(){return s},q4:function(){return d},t6:function(){return c}});var r=i(38156),n=i(39860),a=i(60483),o=i(66861);const s=(e,t)=>{if(!t||!t.name)throw new Error("Invalid telemetry contract. Contract must include 'name' property.");return Object.assign(Object.assign(Object.assign({},h),t),{content:Object.assign(Object.assign({},h.content),t.content)})};function d(e){if(!e)return;return new a.D(e).getMetadataTag()}const c=(e,t,i)=>Object.assign(Object.assign({},u(e,i)),{ext:t}),l=(e,t)=>Object.assign(Object.assign({},e),{content:Object.assign(Object.assign({},e.content),t)}),u=(e,t)=>l(e,{id:null!=t?t:(0,n.GW)()}),h={content:{vertical:o.X.gamingTelemetryVertical,type:r.uH.StructuredData},type:r.c9.ActionButton}},49088:function(e,t,i){"use strict";function r(e){return!e||!function(e){if(!e)return e;if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}(e)}i.d(t,{T:function(){return r}})},76859:function(e,t,i){"use strict";i.d(t,{C7:function(){return o},Nv:function(){return r},OO:function(){return s},X9:function(){return d},sn:function(){return a}});var r,n=i(9791);!function(e){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"}(r||(r={}));const a=146,o=300,s=12,d=(0,n.Z)((e=>Array(e).fill(a)))},65437:function(e,t,i){"use strict";i.d(t,{Gw:function(){return c}});var r=i(53046),n=i(67020),a=i(13220);var o=i(13626),s=i(61291);class d extends s.x{}const c=d.compose({baseName:"gaming-carousel-card-sequence-indicator",tabTemplate:o.O,styles:(e,t)=>r.i`
    ${(0,a.oS)(e,t)}
    ${(0,n.j)("inline-flex")} :host {
        min-height: 4px;
        height: 4px;
        width: 4px;
        min-width: 4px;
        margin: 0;
        transition: transform 0.2s ease-in-out;
    }

    :host([aria-selected="true"]) {
        z-index: 2;
        opacity: 1;
        min-height: 6px;
        min-width: 6px;
        height: 6px;
        width: 6px;
    }
`,shadowOptions:{delegatesFocus:!0}})},51676:function(e,t,i){"use strict";i.d(t,{FJ:function(){return S}});var r=i(39181),n=i(90960),a=i(58952),o=i(74009),s=i(51208),d=i(26007),c=i(97881),l=i(7092),u=i(58239),h=i(66861),p=i(38156);const g=()=>e=>r.d`
    <div slot="previous">
        ${c.Z}
    </div>
    <div slot="next">
        ${l.Z}
    </div>
    `;var m=i(32804),f=i(62734),v=i(53046),b=i(67020),y=i(40082);var x=i(33940),w=i(65620),T=i(87697),$=i(33832),C=i(94731),I=i(48839);class k extends I.I{constructor(){super(...arguments),this.handleResize=()=>{this.scrollItems&&this.$fastController.isConnected&&this.setStops()},this.isDisabledElement=e=>"true"===e.getAttribute("aria-disabled"),this.isFocusableElement=e=>!this.isDisabledElement(e),this.tabs=[],this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach(((e,t)=>{"tab"===e.slot&&this.isFocusableElement(e)&&(e.setAttribute("id",`tab-${t+1}`),e.setAttribute("aria-selected",this.activeTabIndex===t?"true":"false"),e.setAttribute("aria-controls",`item-${this.itemIndexByTab[t].map((e=>e+1)).join(" item-")}`),e.addEventListener("click",this.handleTabClick),e.addEventListener("keydown",this.handleTabKeyDown),e.setAttribute("tabindex",this.activeTabIndex===t?"0":"-1"),this.activeTabIndex===t&&(this.activetab=e)),e.style.gridColumn=`${t+1}`,this.tabIds=this.getTabIds()}))},this.handleTabClick=e=>{const t=e.currentTarget;1===t.nodeType&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(t),this.setComponent()),e.preventDefault()},this.handleTabKeyDown=e=>{switch(e.keyCode){case $.BJ:e.preventDefault(),this.direction===d.N.rtl?this.adjustForward(e):this.adjustBackward(e);break;case $.ho:e.preventDefault(),this.direction===d.N.rtl?this.adjustBackward(e):this.adjustForward(e);break;case $.wn:e.preventDefault(),this.adjust(-this.activeTabIndex);break;case $.$B:e.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1)}},this.scrollStops=[],this.scrollItems=[],this.setScrollItems=()=>{this.scrollItemIds=this.getScrollItemIds(),this.scrollItems.forEach(((e,t)=>{const i=this.scrollItemIds[t];e.setAttribute("id","string"!=typeof i?`item-${t+1}`:i),e.setAttribute("aria-labelledby",`tab-${this.tabIndexByItem[t]+1}`),e.addEventListener("keydown",this.handleItemKeyDown),e.addEventListener("focus",this.handleItemFocus)}));const e=this.scrollStops[this.activeTabIndex];this.content&&this.content.style.setProperty("margin-inline-start",`-${e}px`)},this.handleItemKeyDown=e=>{const t=e.keyCode,i=this.scrollItems.indexOf(e.currentTarget),r=(0,C.w)(0,this.scrollItems.length-1,i+1);if(t===$.RN)i!==this.scrollItems.length-1&&(e.preventDefault(),this.tabIndexByItem[r]!==this.activeTabIndex&&this.adjustForward(e),this.scrollItems[r].focus())},this.handleItemFocus=e=>{const t=e.currentTarget,i=this.scrollItems.indexOf(t),r=this.tabIndexByItem[i];i!==this.activeTabIndex&&(e.preventDefault(),this.moveToTabByIndex(this.tabs,r),t.focus())},this.slideKeyPressHandler=(e,t)=>{this.adjust(t)},this.activeTabIndex=0,this.prevActiveTabIndex=0,this.tabIds=[],this.scrollItemIds=[],this.itemIndexByTab=[],this.tabIndexByItem=[],this.adjustForward=e=>{const t=this.tabs;let i=0;for(i=this.activetab?t.indexOf(this.activetab)+1:1,i===t.length&&(i=0);i<t.length&&t.length>1;){if(this.isFocusableElement(t[i])){this.moveToTabByIndex(t,i);break}if(this.activetab&&i===t.indexOf(this.activetab))break;i+1>=t.length?i=0:i+=1}},this.adjustBackward=e=>{const t=this.tabs;let i=0;for(i=this.activetab?t.indexOf(this.activetab)-1:0,i=i<0?t.length-1:i;i>=0&&t.length>1;){if(this.isFocusableElement(t[i])){this.moveToTabByIndex(t,i);break}i-1<0?i=t.length-1:i-=1}},this.moveToTabByIndex=(e,t)=>{const i=e[t];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,this.setComponent()}}handleChange(){this.direction=m.o7V.getValueFor(this)}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.scrollItemIds=this.getScrollItemIds(),this.activeTabIndex=this.getActiveIndex(),this.direction=m.o7V.getValueFor(this),m.o7V.subscribe(this);new ResizeObserver(this.handleResize).observe(this)}disconnectedCallback(){super.disconnectedCallback(),m.o7V.unsubscribe(this)}activeidChanged(){this.$fastController.isConnected&&this.tabs.length<=this.scrollStops.length&&(this.setTabs(),this.setScrollItems(),this.setTitles())}getActiveIndex(){var e;const t=null!==(e=this.activeid)&&void 0!==e?e:null;return null!==t?-1===this.tabIds.indexOf(t)?0:this.tabIds.indexOf(t):0}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.scrollStops.length&&(this.setTabs(),this.setScrollItems(),this.setTitles())}getTabIds(){return void 0===this.tabs?[null]:this.tabs.map((e=>e.getAttribute("id")))}getScrollItemIds(){return void 0===this.scrollItems?[null]:this.scrollItems.map((e=>e.getAttribute("id")))}setTitles(){const e=this.tabs.length,t=0===this.activeTabIndex?e-1:this.activeTabIndex-1,i=e-1===this.activeTabIndex?0:this.activeTabIndex+1;this.nextFlipperTitle=this.tabs[i].id,this.previousFlipperTitle=this.tabs[t].id}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab())}focusTab(){this.tabs[this.activeTabIndex].focus()}scrollItemsChanged(e,t){t&&this.$fastController.isConnected&&this.setStops()}setStops(){this.width=this.scrollContainer&&this.scrollContainer.offsetWidth;let e=0,t=0,i=[];const r=[],n=[];this.scrollItems.forEach((({offsetLeft:a,offsetWidth:o},s)=>{0===e&&0===i.length?(i.push(a),r.push([s])):this.width&&a+o>e+this.width?(i.push(a),e=a,r.push([s]),t++):r[t].push(s),n.push(t)})),i=this.fixScrollPositionMisalign(i),i=this.fixScrollMisalign(i),i.sort(((e,t)=>Math.abs(e)-Math.abs(t))),this.scrollStops=i,this.itemIndexByTab=r,this.tabIndexByItem=n;const a=this.tabs?this.scrollStops.length-this.tabs.length:this.scrollStops.length,o=document.createElement("msft-gaming-carousel-card-sequence-indicator");o.slot="tab";for(let e=0;e<a;e++)o.setAttribute("data-t",(0,u.q4)((0,u.cZ)(h.X.GamingTelemetryComponent.GamingCarousel,{name:`${h.X.GamingTelemetryComponent.SequenceIndicator}_${(e+1).toString()}`}))),this.appendChild(o.cloneNode(!0))}fixScrollPositionMisalign(e){if(e&&e[0]>0){const t=e[0];e=e.map((e=>e-t))}return e}fixScrollMisalign(e){if(this.direction===d.N.rtl&&e.some((e=>e>0))){e.sort(((e,t)=>t-e));const t=e[0];e=e.map((e=>e-t))}return e}adjust(e){void 0!==this.tabs&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=(0,C.w)(0,this.tabs.length-1,this.activeTabIndex+e),this.setComponent())}}(0,x.gn)([(0,w.Lj)({attribute:"previous-flipper-title"})],k.prototype,"previousFlipperTitle",void 0),(0,x.gn)([(0,w.Lj)({attribute:"next-flipper-title"})],k.prototype,"nextFlipperTitle",void 0),(0,x.gn)([T.LO],k.prototype,"direction",void 0),(0,x.gn)([w.Lj],k.prototype,"activeid",void 0),(0,x.gn)([T.LO],k.prototype,"tabs",void 0),(0,x.gn)([T.LO],k.prototype,"scrollItems",void 0);const S=k.compose({baseName:"gaming-carousel-card",template:(e,t)=>r.d`
    <template>
        <slot name="previous-flipper">
            <fluent-flipper
                part="previous-flipper"
                class="previous-flipper"
                title="${e=>e.previousFlipperTitle}"
                direction="${e=>e.direction===d.N.rtl?"next":"previous"}"
                @click="${(e,t)=>e.slideKeyPressHandler(t.event,-1)}"
                data-t="${e=>(0,u.q4)((0,u.cZ)(h.X.GamingTelemetryComponent.GamingCarousel,{name:h.X.GamingTelemetryComponent.PreviousFlipper,behavior:p.wu.Paginate}))}">
                ${g()}
            </fluent-flipper>
        </slot>
        ${(0,s.m9)(e,t)}
        <div class="tablist" part="tablist" role="tablist">
            <slot class="tab" name="tab" part="tab" ${(0,n.Q)("tabs")}></slot>
        </div>
        <slot name="footer-end"></slot>
        <slot name="next-flipper">
            <fluent-flipper
                part="next-flipper"
                class="next-flipper"
                title="${e=>e.nextFlipperTitle}"
                direction="${e=>e.direction===d.N.rtl?"previous":"next"}"
                @click="${(e,t)=>e.slideKeyPressHandler(t.event,1)}"
                data-t="${e=>(0,u.q4)((0,u.cZ)(h.X.GamingTelemetryComponent.GamingCarousel,{name:h.X.GamingTelemetryComponent.NextFlipper,behavior:p.wu.Paginate}))}"
            >
                ${g()}
            </fluent-flipper>
        </slot>

        ${(0,s.LC)(e,t)}
        <div class="scroll-area" part="scroll-area">
            <div
                class="scroll-view"
                part="scroll-view"
                @scroll="${e=>""}"
                ${(0,a.i)("scrollContainer")}
            >
                <div class="content-container" part="content-container" ${(0,a.i)("content")}>
                    <slot
                        ${(0,n.Q)({property:"scrollItems",filter:(0,o.R)()})}
                    ></slot>
                </div>
            </div>
        </div>
    </template>
`,styles:(e,t)=>v.i`
        ${(0,b.j)("grid")} :host {
            --elevation: 4;
            box-sizing: border-box;
            font-family: ${m.SVJ};
            font-size: ${m.cSu};
            line-height: ${m.RUt};
            color: ${m.CHi};
            background: none;
            border-radius: calc(${m.rSr} * 1px);
            ${f.XC};
            overflow: hidden;
            height: 100%;
            border-radius: 0;
            box-shadow: none;
            grid-template-columns: auto 1fr auto;
            grid-template-rows: 1fr auto;
            width: 100%;
        }

        :host(:hover) ::slotted([slot="previous-flipper"]),
        :host(:hover) .previous-flipper,
        :host(:hover) ::slotted([slot="next-flipper"]),
        :host(:hover) .next-flipper {
            opacity: 1;
            transition: opacity 0.2s ease-in-out;
        }

        ::slotted([slot="previous-flipper"]),
        .previous-flipper {
            margin: 0;
            height: 38px;
            width: 16px;
            grid-column: 1;
            grid-row: 1 / span 2;
            align-self: center;
            z-index: 2;
            opacity: 0;
        }

        ::slotted([slot="next-flipper"]),
        .next-flipper {
            margin: 0;
            height: 38px;
            width: 16px;
            grid-column: 3;
            grid-row: 1 / span 2;
            align-self: center;
            z-index: 2;
            opacity: 0;
        }

        .next-flipper::before,
        .previous-flipper::before {
            border-radius: 3px;
            border: calc(${m.Han} * 1px) solid transparent;
            background: ${m.jql};
        }

        .next-flipper:hover::before,
        .previous-flipper:hover::before {
            background: ${m.QpD};
        }

        .next-flipper:active::before,
        .previous-flipper:active::before {
            background: ${m.sG3};
        }

        .next-flipper::part(previous),
        .next-flipper::part(next),
        .previous-flipper::part(previous),
        .previous-flipper::part(next) {
            width: auto;
            height: auto;
            display: flex;
            align-items: center;
        }

        .tablist {
            display: grid;
            grid-row: 2;
            grid-gap: 6px;
            padding: var(--sequence-indicator-padding, 10px 0);
            align-items: center;
            justify-items: center;
            grid-template-rows: auto;
            grid-template-columns: auto;
            position: relative;
            width: max-content;
            grid-row: 2;
            grid-column: 2;
            z-index: 3;
            cursor: pointer;
        }

        .scroll-area {
            grid-row: 1 / span 3;
            grid-column: 1 / span 3;
            position: relative;
            padding-inline-start: 16px;
        }

        .scroll-view {
            overflow: hidden;
            width: 100%;
            height: 100%;
        }

        .content-container {
            display: grid;
            grid-template-columns: auto;
            grid-auto-flow: column;
            position: relative;
            transition-duration: 700ms;
            grid-gap: 8px;
            width: fit-content;
        }

        ::slotted([slot="footer-end"]) {
            grid-row: 2;
            grid-column: 2;
            place-self: end;
            z-index: 3;
        }
    `.withBehaviors((0,y.vF)(v.i`
                :host {
                    forced-color-adjust: auto;
                }
            `)),shadowOptions:{delegatesFocus:!0}})},68384:function(e,t,i){"use strict";var r;i.d(t,{S:function(){return r}}),function(e){e.ClipCard="ClipCard",e.ConnectToXbox="ConnectToXbox",e.CasualGamesCard="CasualGamesCard",e.CompeteCard="CompeteCard",e.HighlightsCard="HighlightsCard",e.PersonalizationCard="PersonalizationCard",e.LivestreamCard="LivestreamCard",e.ProMatchesCard="ProMatchesCard",e.ProTournamentsCard="ProTournamentsCard",e.RecentlyPlayedCard="RecentlyPlayedCard",e.RecommendedCard="RecommendedCard",e.RecoVideoCard="RecoVideoCard",e.RedditCard="RedditCard",e.RewardsCard="RewardsCard",e.UpcomingGamesCard="UpcomingGamesCard",e.VideoCard="VideoCard"}(r||(r={}))},30113:function(e,t,i){"use strict";var r;i.d(t,{m:function(){return r}}),function(e){e.small="OneByOne",e.medium="OneByTwo",e.large="OneByThree"}(r||(r={}))},11708:function(e,t,i){"use strict";var r;i.d(t,{f:function(){return r}}),function(e){e.AiCharacter="aicharacterCardEnabled",e.AutosMarketplaceCard="autosmarketplaceCardEnabled",e.HoroscopeCard="horoscopeCardEnabled",e.WeatherCard="weatherCardEnabled",e.SportsCard="sportsCardEnabled",e.MoneyCard="moneyCardEnabled",e.FinanceCard="financeCardEnabled",e.OnThisDayCard="onthisdayCardEnabled",e.ShoppingCard="shoppingCardEnabled",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.InspirationCard="inspirationCardEnabled",e.TravelCard="travelCardEnabled",e.HealthCard="healthCardEnabled",e.TopStoriesCard="topstoriesCardEnabled",e.TrendingTopics="TrendingTopicsUpsellEnabled",e.LocalGuideCard="localGuideCardEnabled",e.GroceryCard="groceryCardEnabled",e.RewardsCard="rewardsCardEnabled",e.RecommendedSearchesCard="recommendedSearchesCardEnabled",e.PersonalizedOffersCard="personalizedoffersCardEnabled",e.PollsCard="pollsCardEnabled",e.MarketPlaceCard="marketplaceCardEnabled",e.QuizCard="quizCardEnabled",e.CasualGamesCard="esportsCardEnabled",e.CommuteCard="commuteCardEnabled",e.Crypto="CryptoCard",e.MarketBrief="MarketBriefCard"}(r||(r={}))},83152:function(e,t,i){"use strict";var r;i.d(t,{L:function(){return r}}),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"}(r||(r={}))},791:function(e,t,i){"use strict";i.d(t,{N:function(){return y}});var r=i(33940),n=i(33954),a=i(26415),o=i(68364),s=i(33799),d=i(16517),c=i(94788),l=i(67267),u=i(63535),h=i(87298),p=i(83152),g=i(11708),m=i(30113),f=i(65135),v=i(33379),b=i(51671);const y=new class extends class{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="Peregrine",this.ocidOverride=!1}getUserDefaultLocation(e){return(0,r.mG)(this,void 0,void 0,(function*(){const t={method:"GET",headers:yield l.$.getOneServiceHeaders(),credentials:"include"},i=(0,u.PH)(this.locationsServiceEndPoint);let n;[...l.$.getCommonParams2(this.ocid,!this.ocidOverride),{key:"autodetect",value:e&&`${e}`}].forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{n=yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(i.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 n}return n}))}addToFavoriteLocation(e,t){return(0,r.mG)(this,void 0,void 0,(function*(){const i="Location",n="Follow",a={method:"POST",body:JSON.stringify({actionType:n,targetType:i,definitionName:t,degree:"FavoriteLocation",metaData:e}),headers:yield l.$.getOneServiceHeaders(),credentials:"include"},o=(0,u.PH)(this.pdpServiceEndpoint);let c;((yield(0,b.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));try{c=yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(o.href,a);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: Location`;throw new Error(t)}return e.json()}))),"addToFavoriteLocation")}catch(e){return!1}return!0}))}removeFavoriteLocation(e){return(0,r.mG)(this,void 0,void 0,(function*(){return yield this.deleteFromPdp(p.L.Location,"definitionName",[e])}))}removeLocation(e){return(0,r.mG)(this,void 0,void 0,(function*(){return yield this.deleteFromPdp(p.L.Location,"definitionName",[e])}))}updatePdpHomeLocation(e,t,i={},n){return(0,r.mG)(this,void 0,void 0,(function*(){const a=p.L.Location,o="Follow",c=yield this.getRequestInit({method:"POST"},i);c.body=JSON.stringify({actionType:o,targetType:a,definitionName:t,degree:"DefaultLocation",metaData:e});const g=(0,u.PH)(this.pdpServiceEndpoint);return((yield(0,b.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(null!=n?n:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(null!=n?n:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)})),yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,c);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${a}`;throw new Error(t)}return e}))),"setPdpHomeLocation"),this.tryInvalidateBulkFetchedPdpTargetType(a),!0}))}updateTrafficMyRoutes(e,t,i,a,o,s){return(0,r.mG)(this,void 0,void 0,(function*(){const d=i.replace(/[^a-zA-Z0-9\-.,_]/g,""),c=p.L.Traffic,u="Follow",g={method:"POST",body:JSON.stringify({actionType:u,targetType:c,targetId:d,degree:e,definitionName:t,metadata:a,createdDateTime:s}),headers:yield l.$.getOneServiceHeaders(),credentials:"include"},m=yield this.getTrafficPdpUrl(null,null,o);try{yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(m.href,g);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${c}`;throw new Error(t)}return e.json()}))),"updateTrafficMyRoutes");this.tryInvalidateBulkFetchedPdpTargetType(c)}catch(e){return n.k.logError(e.message),!1}return!0}))}deleteTrafficMyRoutes(e,t,i){return(0,r.mG)(this,void 0,void 0,(function*(){const n={method:"DELETE",headers:yield this.getOneserviceHeaders(),credentials:"include"},a=yield this.getTrafficPdpUrl(e,t,i);try{yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(a.href,n);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${p.L.Traffic}`;throw new Error(t)}return e}))),"deleteTrafficFromPdp"),this.tryInvalidateBulkFetchedPdpTargetType(p.L.Traffic)}catch(e){return!1}return!0}))}getTrafficMyRoutes(e,t){var i;return(0,r.mG)(this,void 0,void 0,(function*(){const n={method:"GET",headers:yield this.getOneserviceHeaders(),credentials:"include"},a=yield this.getTrafficPdpUrl(e,null,t);try{const e=yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(a.href,n);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${p.L.Traffic}`;throw new Error(t)}return e}))),"getTrafficFromPdp");return null===(i=yield e.json())||void 0===i?void 0:i.value}catch(e){return null}}))}getTrafficPdpUrl(e,t,i){return(0,r.mG)(this,void 0,void 0,(function*(){const r=(0,u.PH)(this.pdpServiceEndpoint),n=(yield(0,b.XJ)())===s.Hy.SignedIn,a=(0,d.Yq)().UserId,o=n?l.$.getOneServiceParamsWithAuth(a,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(a,this.ocid,!this.ocidOverride);if(e||t){const i=`targetType eq '${p.L.Traffic}'`,n=e?`degree eq '${e}'`:"",a=t?`definitionName eq '${t}'`:"";r.searchParams.set("$filter",`actionType eq 'Follow' and (${i})${n?` and (${n})`:""}${a?` and (${a})`:""}`)}return[...o,...i||[]].forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)})),r}))}addToWatchList(e,t=0,i={},n={}){return(0,r.mG)(this,void 0,void 0,(function*(){const a=p.L.Finance,o="Follow",c={method:"POST",body:JSON.stringify({actionType:o,targetType:a,targetId:e,metadata:Object.assign({securityType:t,tickerId:this.generateUUID()},n)}),headers:yield this.getOneserviceHeaders(i),credentials:"include"},g=(0,u.PH)(this.pdpServiceEndpoint),m="zh-cn"!==(0,d.Yq)().CurrentMarket;let f;((yield(0,b.XJ)())===s.Hy.SignedIn&&m?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)}));try{f=yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,c);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${a}`;throw new Error(t)}return e.json()}))),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(a)}catch(e){return!1}return!0}))}addListToWatchList(e,t={},i={}){return(0,r.mG)(this,void 0,void 0,(function*(){const n=p.L.Finance,a="Follow",o={method:"POST",body:JSON.stringify(e.map((e=>({actionType:a,targetType:n,targetId:e.key,metadata:Object.assign({securityType:e.value,tickerId:this.generateUUID()},i)})))),headers:yield this.getOneserviceHeaders(t),credentials:"include"},c=(0,u.PH)(this.pdpServiceEndpoint),g="zh-cn"!==(0,d.Yq)().CurrentMarket;let m;((yield(0,b.XJ)())===s.Hy.SignedIn&&g?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&c.searchParams.set(e.key,e.value)}));try{m=yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(c.href,o);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${n}`;throw new Error(t)}return e.json()}))),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(n)}catch(e){return!1}return!0}))}generateUUID(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)}))}sortWatchList(e,t={}){var i;return(0,r.mG)(this,void 0,void 0,(function*(){const n=p.L.Finance,a="Follow",o=yield y.readPdpWithTargetType(p.L.Finance,!0,200,t),c=o&&(null===(i=o.value)||void 0===i?void 0:i.filter((e=>e.actionType===a&&e.targetId)));if(!c||c.length<e.length)return!1;const g={};let m=e.length;c.forEach((t=>{let i=e.findIndex((e=>e===t.targetId));i<0&&(i=m,m++),g[t.targetId]=JSON.stringify({actionType:a,targetId:t.targetId,targetType:n,rank:i,metadata:t.metadata})}));const f={method:"PUT",body:JSON.stringify(g),headers:yield this.getOneserviceHeaders(t),credentials:"include"},v=(0,u.PH)(this.pdpServiceEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&v.searchParams.set(e.key,e.value)}));try{yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(v.href,f);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${n}`;throw new Error(t)}return e.json()}))),"sortWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(p.L.Finance)}catch(e){return!1}return!0}))}updateWeatherInterests(e,t,i,a={},o){return(0,r.mG)(this,void 0,void 0,(function*(){const t=p.L.Weather,r={method:"POST",body:JSON.stringify({actionType:"Follow",targetType:t,targetId:e,metadata:{UserAction:{0:{UpdateTime:new Date,Location:i}}}}),headers:yield this.getOneserviceHeaders(a),credentials:"include"},c=(0,u.PH)(this.pdpServiceEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(null!=o?o:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(null!=o?o:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&c.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(c.href,r);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 n.k.logError(e.message),!1}return!0}))}updateWeatherSettings(e,t,i={},n){return(0,r.mG)(this,void 0,void 0,(function*(){if(!e&&!t)return!0;let r="";r=e&&!t?'{"weatherDisplayUnit":"'+e+'"}':!e&&t?'{"userSettings":{"weatherLocationSettingMode":"'+t+'"}}':'{"weatherDisplayUnit":"'+e+'","userSettings":{"weatherLocationSettingMode":"'+t+'"}}';const a=yield this.getRequestInit({method:"POST"},i);a.body=r;const o=(0,u.PH)(this.userUpdateEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(null!=n?n:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(null!=n?n:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));const c=yield this.fetchImpl(o.href,a);if(c.status>=400){const e=`OneService returned error response. Status: ${c.status} for update weather setting call`;throw new Error(e)}return!0}))}updateFinanceInterests(e){return(0,r.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const t={financeInterests:e},i=JSON.stringify(t),r=yield this.getRequestInit({method:"POST"});r.body=i;const n=(0,u.PH)(this.userUpdateEndpoint),a="zh-cn"!==(0,d.Yq)().CurrentMarket;((yield(0,b.XJ)())===s.Hy.SignedIn&&a?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&n.searchParams.set(e.key,e.value)}));const o=yield this.fetchImpl(n.href,r);if(o.status>=400){const e=`OneService returned error response. Status: ${o.status} for update finance interests call`;throw new Error(e)}return!0}))}updateUserSettings(e,t={},i){return(0,r.mG)(this,void 0,void 0,(function*(){if(!e)return!0;const r=[];let a;for(a in e)null!=e[a]&&r.push('"'+a+'": '+JSON.stringify(e[a]));const o='{"userSettings":{'+r.join(", ")+"}}",c=yield this.getRequestInit({method:"POST"},t);c.body=o;const h=(0,u.PH)(this.userUpdateEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(null!=i?i:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(null!=i?i:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&h.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(h.href,c);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 n.k.logError(e.message),!1}return!0}))}getPdpUserPreference(e,t={},i){return(0,r.mG)(this,void 0,void 0,(function*(){const a=yield this.getRequestInit({method:"GET"},t),o=(0,u.PH)(this.userUpdateEndpoint);[...(yield(0,b.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(i||(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(i||(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)].forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));try{const e=yield(0,h.w)((()=>(0,r.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(o.href,a);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 Object.assign(Object.assign({},yield e.json()),{is404:404==e.status})}catch(t){if(n.k.logError(t.message),e)throw Error(t.message);return null}}))}updatePdpLayoutPreference(e){return(0,r.mG)(this,void 0,void 0,(function*(){const t={method:"PUT",credentials:"include",body:JSON.stringify({dummyid:{userLayoutPreference:e}})},i=(0,u.PH)(this.userUpdateEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(i.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 n.k.logError(e.message),!1}return!0}))}updateSegmentCardsEnableStatus(e,t=null){return(0,r.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const i=[];if(t){let e;for(e in t)null!=t[e]&&i.push('"'+e+'": '+JSON.stringify(t[e]))}const r=e.map((e=>e.cardType!=g.f.TopStoriesCard?`\\"${e.cardType}\\":${e.enabled?'\\"1\\"':'\\"0\\"'}`:"")).join(","),n=i.length>0?'{"segmentCardSettings":"{'+r+'}","userSettings":{'+i.join(", ")+"}}":'{"segmentCardSettings":"{'+r+'}"}';return this.updateUserPreference(n)}))}updateProductivityCardsEnableStatus(e){return(0,r.mG)(this,void 0,void 0,(function*(){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)}))}updateGamingCardsEnableStatus(e){return(0,r.mG)(this,void 0,void 0,(function*(){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)}))}updateCommunitySettingsOptOutStatus(e){return(0,r.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const t={};e.forEach((e=>{t[e.settingType]=e.optedOut?"1":"0"}));const i={communitySettings:t};return this.updateUserPreference(JSON.stringify(i))}))}updateWidgetSettings(e,t={},i){return(0,r.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const r=e.map((e=>({actionType:"Follow",targetId:e.cardType,targetType:p.L.Widget,metadata:{prongsv2:{region:e.region,size:m.m[e.size],position:e.position}}})));return this.sendGenericAW