      margin-top: 2px;
    }
    ${Ui} .followed,
    ${Ui} .unfollowed {
        padding: 0px;
        width: 64px;
        text-align: center;
    }
    ${Ui} .topic-title {
        padding: 22px 12px;
    }
    ${Ui} .img-mask-container {
        filter: drop-shadow(0 0 1px rgb(0 0 0 / 20%));
    }
    ${Ui} img {
        border-radius: 0;
        height: 44px;
        width: 44px;
        margin: 9px;
        -webkit-mask-image: url(${"\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44' width='44' height='44'%3E%3Cpath id='mask' d='M 0 22 C 0 6.82 6.82 0 22 0 C 37.18 0 44 6.82 44 22 C 44 37.18 37.18 44 22 44 C 6.82 44 0 37.18 0 22 Z' fill='%23FF2828'%3E%3C/path%3E%3C/svg%3E\""});
    }

    @media (max-width: 655px) {
        ${Ui} {
            grid-auto-columns: max-content;
            grid-template-columns: calc(var(--image-side-size) - 9px) auto;
            width: auto;
        }
        ${Ui} img {
            border-radius: 0;
            margin: 9px;
        }
        ${Ui} .img-content {
            grid-template-columns: calc(var(--image-side-size) - 9px) auto;
        }
        ${Ui} .followed,
        ${Ui} .unfollowed {
            width: 44px;
        }
    }
`,Bi=O.i`
    .follow-btn.topic-item {
        border-left: calc(${$.Han} * 1px) solid ${$.QpD};
    }

    img {
        border-radius: 4px 0 0 4px;
    }

    @media (max-width: 655px) {
        img {
            border-radius: 4px;
        }
    }
`,zi=O.i`
    .follow-btn.topic-item {
        border-right: calc(${$.Han} * 1px) solid ${$.QpD};
    }

    img {
        border-radius: 0 4px 4px 0;
    }

    @media (max-width: 655px) {
        img {
            border-radius: 4px;
        }
    }
`,Gi=O.i`
    :hover(.vnext) .follow-btn,
    :hover(.vnext) .hide-btn {
        background: rgba(255, 255, 255, 0.1);
        fill: white;
    }

    :host(.vnext) .follow-btn.followed,
    :host(.vnext) .hide-btn.hidden-topic
    {
        border: none;
    }

    :host(.vnext) .button-group div,
    :host(.vnext:hover) .follow-btn.followed,
    :host(.vnext:hover) .hide-btn.hidden-topic,
    :host(.vnext) .follow-btn.followed:${pe.b},
    :host(.vnext) .hide-btn.hidden-topic:${pe.b} {
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
`,qi=O.i`
    :host(.vnext:hover) .button-group div
    {
        --elevation: 8;
    }

    :host .button-group div:${pe.b}
    {
        --elevation: 8;
    }

    :host(.vnext:hover) .button-group div:hover
    {
        --elevation: 0;
    }

    .button-group div:not(.followed):not(.hidden-topic) svg:last-child
    {
        display: none;
    }

    .button-group :not(.followed):not(.hidden-topic):hover svg:first-child
    {
        display: none;
    }

    .button-group :not(.followed):not(.hidden-topic):hover svg:last-child
    {
        display: block;
    }

    :host(.vnext:${pe.b}),
    :host(.vnext:hover) {
        border: none;
    }
`,Vi=O.i`
    ${qi}

    :host(.vnext) {
        --image-side-size: 60px;
        --span-vertical-padding: 20px;
        cursor: default;
        --elevation: 0;
        border: none;
    }

    .hide-btn,
    :host(.vnext) .follow-btn {
        height: 20px;
        width: 20px;
        border-radius: 100px;
        border: 1px solid rgba(0, 0, 0, 0.25);
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .button-group {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .button-group div {
        ${F.XC};
    }

    .hide-btn.hidden-topic {
        border-color: #D40000;
        background: #D40000;
        fill: white;
    }

    :host(.vnext) .follow-btn.followed {
        border-color: ${$.Avx};
        background: ${$.Avx};
        fill: white;
    }

    .button-group > div
    {
        cursor: pointer;
    }

    :host(.vnext) .content {
        grid-template-columns: auto 68px;
    }

    :host(.vnext) a.source-profile-link {
        color: inherit;
        display: inherit;
        font-weight: 600;
        margin-top: 0;
        place-self: center start;
        width: auto;
    }

    :host(.vnext) a.source-profile-link:hover {
        text-decoration: underline;
    }
`,_i=O.i`
    ${Vi}
    :host {
        --image-side-size: 80px;
        --span-vertical-padding: 30px;
        align-items: center;
        border-radius: 4px;
        box-sizing: border-box;
        border: calc(${$.Han} * 1px) solid transparent;
        cursor: pointer;
        display: grid;
        font-size: ${$.cSu};
        font-weight: 600;
        grid-template-columns: var(--image-side-size) auto;
        grid-template-rows: var(--image-side-size);
        height: var(--image-side-size);
        width: 300px;
        fill: currentColor;
        outline: none;
    }

    :host(:${pe.b}) {
        border: calc(${$.Han} * 1px) solid ${$.akT};
    }

    :host(:hover) {
        border: calc(${$.Han} * 1px) solid ${$.QpD};
    }
    
    :host(.follow-card:hover), .img-content:hover, .topic-item:hover  {
        background: ${$.QpD};
    }

    .content {
        display: grid;
        height: 100%;
        grid-template-columns: auto 60px;
        grid-area: 1 / 2 / 2 / 3;
    }

    .img-mask-container {
        display: flex;
    }

    .img-content {
        display: grid;
        height: 100%;
        grid-template-columns: var(--image-side-size) auto;
        width: 240px;
        grid-area: 1 / 1 / 1 / 3;
    }

    .img-content img{
        grid-area: unset;
    }

    .follow-btn {
        height:100%;
        display: flex;
    }

    .follow-btn.topic-item {
        grid-area: 1 / 4 / 1 / 5;
        width: 60px;
        border-left: calc(${$.Han} * 1px) solid ${$.QpD};
    }

    .follow-btn span {
        margin: auto;
    }

    .followed slot[name="followed"] > svg {
        background-color: ${$.Avx};
        border-radius: 16px;
        fill: ${$.jql};
    }

    img {
        grid-area: 1 / 1 / 2 / 2;
        height: var(--image-side-size);
        width: var(--image-side-size);
    }

    span {
        overflow: hidden;
        padding: var(--span-vertical-padding) 12px;
        text-overflow: ellipsis;
        text-align: start;
        white-space: nowrap;
    }

    a.source-profile-link {
        color: ${$.goi};
        font-weight: normal;
        margin-top: -2px;
        place-self: center end;
        width: max-content;
    }

    a.source-profile-link:not(:hover) {
        text-decoration: none;
    }

    @media (max-width: 655px) {
        :host,
        :host(.vnext) {
            --image-side-size: 42px;
            border-radius: 0;
            grid-template-columns: calc(var(--image-side-size) + 30px) auto;
            grid-template-rows: 62px;
            height: 62px;
            width: 334px;
        }

        .divider {
            display: none;
        }

        .topic-section {
            height: 100%;
        }

        .topic-section:hover .topic {
            background: none;
        }

        img {
            margin: 10px;
            margin-inline-start: 20px;
        }

        span {
            padding: 18px 10px;
        }

        .img-content {
            grid-template-columns: calc(var(--image-side-size) + 30px) auto;
            width: 272px;
        }
    }

    /* Styles by Theme */
    ${ji}
`.withBehaviors(new R.O(Bi,zi),(0,G.vF)(O.i`
                :host {
                    background: ${q.H.ButtonFace};
                    color: ${q.H.ButtonText};
                }
                :host(:hover) {
                    background: ${q.H.Highlight};
                    color: ${q.H.HighlightText};
                }
                :host(:${pe.b}) {
                    border-color: ${q.H.Highlight};
                }
                .followed slot[name="followed"] > svg {
                    background-color: ${q.H.ButtonText};
                    fill: ${q.H.ButtonFace};
                }
                :host(:hover) .followed slot[name="followed"] > svg {
                    background-color: ${q.H.HighlightText};
                    fill: ${q.H.Highlight};
                }
                :host(.follow-card:hover), .img-content:hover, .topic-item:hover  {
                    background: ${q.H.Highlight};
                }
            `),(0,G.Uu)(Gi)),Wi=L.d`
<div 
    role="button"
    class="${e=>e.enableNavToXfeed?"follow-btn topic-item":"follow-btn"}" 
    part="follow-btn"
    aria-label="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatAriaLabel,e.topicTitle):(0,Mt.WU)(e.followFormatAriaLabel,e.topicTitle)}"
    title="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatText,e.topicTitle):(0,Mt.WU)(e.followFormatText,e.topicTitle)}"
    @click="${e=>e.toggleFollow&&e.toggleFollow()}"
    data-t="${e=>e.followed?e.followButtonTelemetryTag:e.unfollowButtonTelemetryTag}"
>
    ${(0,I.g)((e=>e.followed),L.d`
    <span part="followed" class="followed">
        <slot name="followed">
            <svg
                width="16"
                height="16"
                viewBox="0 0 16 16"
                xmlns="http://www.w3.org/2000/svg"
            >
                <path
                    d="M12.76 5.26L6.5 11.53 3.24 8.26l.52-.52 2.74 2.73 5.74-5.73.52.52z"
                />
            </svg>
        </slot>
    </span>`)}
    ${(0,I.g)((e=>!e.followed),L.d`
    <span part="unfollowed" class="unfollowed">
        <slot name="unfollowed">
            <svg
                width="16"
                height="16"
                viewBox="0 0 16 16"
                xmlns="http://www.w3.org/2000/svg"
            >
                <path
                    d="M7.5 0a7.39 7.39 0 015.3 2.2 7.2 7.2 0 011.93 3.3 7.39 7.39 0 010 4 7.46 7.46 0 01-5.24 5.23 7.39 7.39 0 01-3.99 0 7.65 7.65 0 01-3.31-1.92A7.75 7.75 0 01.27 9.5a7.47 7.47 0 010-4 7.61 7.61 0 011.92-3.3A7.38 7.38 0 015.5.27C6.14.09 6.8 0 7.5 0zm0 14a6.3 6.3 0 003.27-.9 6.42 6.42 0 003-3.87 6.3 6.3 0 000-3.46 6.58 6.58 0 00-4.54-4.54 6.3 6.3 0 00-3.46 0 6.73 6.73 0 00-2.86 1.68 6.41 6.41 0 00-1.68 2.86 6.3 6.3 0 000 3.46 6.73 6.73 0 001.68 2.86A6.51 6.51 0 007.5 14zM8 7h4v1H8v4H7V8H3V7h4V3h1v4z"
                />
            </svg>
        </slot>
    </span>`)}
</div>`;const Zi=L.d`
<div 
    role="button"
    class="follow-btn ${e=>e.followed?"followed":""}"
    part="follow-btn"
    aria-label="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatAriaLabel,e.topicTitle):(0,Mt.WU)(e.followFormatAriaLabel,e.topicTitle)}"
    title="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatText,e.topicTitle):(0,Mt.WU)(e.followFormatText,e.topicTitle)}"
    tabindex="0"
    @click="${e=>e.toggleFollow&&e.toggleFollow()}"
    @keypress="${(e,t)=>e.followKeyPress&&e.followKeyPress(t.event)}"
    data-t="${e=>e.followed?e.followButtonTelemetryTag:e.unfollowButtonTelemetryTag}"
>
    ${(0,I.g)((e=>e.followed),L.d`
        ${'<svg width="8" height="6" viewBox="0 0 8 6"><path d="M7.76.2c.3.29.32.76.04 1.06l-4.25 4.5a.75.75 0 0 1-1.08.02L.22 3.53a.75.75 0 1 1 1.06-1.06l1.7 1.7L6.7.24A.75.75 0 0 1 7.76.2Z"/></svg>'}
    `)}
    ${(0,I.g)((e=>!e.followed),L.d`
        ${'<svg width="10" height="10" viewBox="0 0 10 10"><path d="M5.56.56a.56.56 0 0 0-1.12 0v3.88H.56a.56.56 0 0 0 0 1.12h3.88v3.88a.56.56 0 0 0 1.12 0V5.56h3.88a.56.56 0 1 0 0-1.12H5.56V.56Z"/></svg>'}
        ${'<svg width="10" height="10" viewBox="0 0 10 10"><path d="M5.79.79a.79.79 0 1 0-1.58 0V4.2H.8a.79.79 0 1 0 0 1.58H4.2V9.2a.79.79 0 0 0 1.58 0V5.8H9.2a.79.79 0 0 0 0-1.58H5.8V.8Z"/></svg>'}
    `)}
</div>`;var Ji='<svg width="11" height="10" viewBox="0 0 11 10"><path d="M10.42 5a5 5 0 1 1-10 0 5 5 0 0 1 10 0Zm-1.5 0c0-.7-.2-1.34-.56-1.89L3.53 7.95A3.5 3.5 0 0 0 8.92 5ZM7.3 2.05A3.5 3.5 0 0 0 2.46 6.9L7.3 2.05Z"/></svg>';const Yi=L.d`
<div 
    role="button"
    class="hide-btn ${e=>e.hiddenTopic?"hidden-topic":""}"
    part="hide-btn"
    aria-label="${e=>e.hiddenTopic?(0,Mt.WU)(e.unhideFormatAriaLabel,e.topicTitle):(0,Mt.WU)(e.hideFormatAriaLabel,e.topicTitle)}"
    title="${e=>e.hiddenTopic?(0,Mt.WU)(e.unhideText,e.topicTitle):(0,Mt.WU)(e.hideText,e.topicTitle)}"
    tabindex="0"
    @click="${e=>e.toggleHide&&e.toggleHide()}"
    @keypress="${(e,t)=>e.hideKeyPress&&e.hideKeyPress(t.event)}"
    data-t="${e=>e.hiddenTopic?e.unhideButtonTelemetryTag:e.hideButtonTelemetryTag}"
>
    ${(0,I.g)((e=>e.hiddenTopic),L.d`${Ji}`)}
    ${(0,I.g)((e=>!e.hiddenTopic),L.d`
        ${'<svg width="10" height="10" viewBox="0 0 10 10"><path d="M5 0a5 5 0 1 0 0 10A5 5 0 0 0 5 0ZM1 5a4 4 0 0 1 6.45-3.16l-5.6 5.61A3.98 3.98 0 0 1 1 5Zm1.55 3.16 5.61-5.61a4 4 0 0 1-5.61 5.61Z"/></svg>'}
        ${Ji}
    `)}
</div>`,Ki=L.d`
    <img
        class="image"
        part="image"
        src="${e=>e.imgSrc}"
        alt="${e=>e.imgAltText}"
        @load="${e=>e.imgOnloadCallback&&e.imgOnloadCallback()}"
        @error="${e=>e.imgOnloadCallback&&e.imgOnloadCallback()}"
    />
`,Xi=L.d`
    <span
        class="topic-title"
        part="topic-title"
    >
        ${e=>e.topicTitle}
    </span>
`,Qi=L.d`
    <a
        class="source-profile-link"
        href="${e=>e.sourceProfileLinkData.url}"
        title="${e=>e.sourceProfileLinkData.label}"
        target="_blank"
        data-t="${e=>e.sourceProfileLinkData.telemetryTag}"
    >
        ${Ki}
    </a>
    <div class="content" part="content">
        <a
            class="source-profile-link"
            href="${e=>e.sourceProfileLinkData.url}"
            title="${e=>e.sourceProfileLinkData.label}"
            target="_blank"
            data-t="${e=>e.sourceProfileLinkData.telemetryTag}"
        >
            ${Xi}
        </a>
        <div class="button-group">
            ${(0,I.g)((e=>e.topicTitle),Zi)}
            ${(0,I.g)((e=>e.topicTitle&&e.enableVNextStyles&&"UserQuery"!==e.feedType),Yi)}
        </div>
    </div>
`,en=L.d`
    ${Ki}
    <div class="content" part="content">
        ${Xi}
        <div class="button-group">
            ${(0,I.g)((e=>e.topicTitle),Zi)}
            ${(0,I.g)((e=>e.topicTitle&&e.enableVNextStyles&&"UserQuery"!==e.feedType),Yi)}
        </div>
    </div>
`,tn=L.d`
    ${(0,I.g)((e=>e.sourceProfileLinkData),Qi)}
    ${(0,I.g)((e=>!e.sourceProfileLinkData),en)}
`,nn=L.d`
    ${(0,I.g)((e=>e.sourceProfileLinkData),L.d`
        <a 
            class="source-profile-link"
            href="${e=>e.sourceProfileLinkData.url}"
            target="_blank"
            data-t="${e=>e.sourceProfileLinkData.telemetryTag}"
        >
            ${e=>e.sourceProfileLinkData.label}
        </a>`)}
`,on=L.d`
${(0,I.g)((e=>!e.enableNavToXfeed),L.d`
    <div class="img-mask-container">
        <img
            role="button"
            class="image"
            part="image"
            src="${e=>e.imgSrc}"
            alt="${e=>e.imgAltText}"
            aria-label="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatAriaLabel,e.topicTitle):(0,Mt.WU)(e.followFormatAriaLabel,e.topicTitle)}"
            title="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatText,e.topicTitle):(0,Mt.WU)(e.followFormatText,e.topicTitle)}"
            @load="${e=>e.imgOnloadCallback&&e.imgOnloadCallback()}"
            @error="${e=>e.imgOnloadCallback&&e.imgOnloadCallback()}"
            @click="${e=>e.toggleFollow&&e.toggleFollow()}"
            data-t="${e=>e.followed?e.followButtonTelemetryTag:e.unfollowButtonTelemetryTag}"
        />
    </div>
    <div class="content" part="content">
        <span 
            role="button"
            class="topic-title" 
            part="topic-title" 
            aria-label="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatAriaLabel,e.topicTitle):(0,Mt.WU)(e.followFormatAriaLabel,e.topicTitle)}"
            title="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatText,e.topicTitle):(0,Mt.WU)(e.followFormatText,e.topicTitle)}"
            @click="${e=>e.toggleFollow&&e.toggleFollow()}"
            data-t="${e=>e.followed?e.followButtonTelemetryTag:e.unfollowButtonTelemetryTag}"
        >
            ${e=>e.topicTitle}
        </span>
        ${(0,I.g)((e=>e.sourceProfileLinkData&&e.sourceProfileLinkData.url),nn)}
        ${(0,I.g)((e=>e.topicTitle),Wi)}
    </div>
`)}
${(0,I.g)((e=>e.enableNavToXfeed),L.d`
    <div class="img-content img-mask-container" part="img-content">
        <img
            role="button"
            class="image"
            part="image"
            src="${e=>e.imgSrc}"
            alt="${e=>e.imgAltText}"
            aria-label="${e=>(0,Mt.WU)(e.contentLinkFormatText,e.topicTitle)}"
            title="${e=>(0,Mt.WU)(e.contentLinkFormatText,e.topicTitle)}"
            @load="${e=>e.imgOnloadCallback&&e.imgOnloadCallback()}"
            @error="${e=>e.imgOnloadCallback&&e.imgOnloadCallback()}"
            @click="${e=>e.topicSelected&&e.topicSelected()}"
            data-t="${e=>e.contentLinkButtonTelemetryTag}"
        />
        <span
            role="button"
            class="topic-title topic-item" 
            part="topic-title"
            aria-label="${e=>(0,Mt.WU)(e.contentLinkFormatText,e.topicTitle)}"
            title="${e=>(0,Mt.WU)(e.contentLinkFormatText,e.topicTitle)}"
            @click="${e=>e.topicSelected&&e.topicSelected()}"
            data-t="${e=>e.contentLinkButtonTelemetryTag}"
        >
            ${e=>e.topicTitle}
        </span>
    </div>
    ${(0,I.g)((e=>e.sourceProfileLinkData&&e.sourceProfileLinkData.url),nn)}
    ${(0,I.g)((e=>e.topicTitle),Wi)}
`)}
`,an=L.d`
<template
    role="button"
    tabindex="${e=>e.enableVNextStyles?"":"0"}"
    class="topic-card ${e=>e.classes}"
    aria-label="${e=>e.topicCardAriaLabel}"
    @keypress="${e=>e.enableNavToXfeed?e.topicSelected&&e.topicSelected():e.toggleFollow&&!e.enableVNextStyles&&e.toggleFollow()}"
    title="${e=>e.topicCardTitle}"
    data-theme=${e=>e.theme}
    data-t="${e=>e.topicCardTelemetryTag}"
>
${(0,I.g)((e=>e.enableVNextStyles),tn)}
${(0,I.g)((e=>!e.enableVNextStyles),on)}
</template>
`;let sn=class extends Ni{};sn=(0,T.gn)([(0,Ri.M)({name:"msn-topic-card",template:an,styles:_i})],sn);var rn,ln,dn,cn,un=i(88352),hn=i(41115),gn=i(40537),pn=i(54804),mn=i(94329),fn=i(56698),vn=i(94546),yn=i(55128),bn=i(22938),Sn=i(2314),wn=i(9683),Tn=i(66925),Cn=i(85334),xn=i(44772),kn=i(67267),$n=i(63535),On=i(87298),Ln=i(51125);!function(e){e.Cancel="cancel",e.Share="share",e.Save="save",e.Like="like",e.Dislike="dislike",e.Dismiss="dismiss",e.FollowPublisher="followPublisher",e.HideStory="hide",e.MutePublisher="mute",e.ReportArticle="reportArticle",e.Report="report",e.AdChoice="adChoice",e.ShowMore="showMore",e.ShowFewer="showFewer",e.Divider="divider",e.ManageInterests="manageInterests",e.BlockTopic="blockTopic"}(rn||(rn={})),function(e){e.Top="top",e.Middle="middle",e.Bottom="bottom"}(ln||(ln={})),function(e){e[e.OffensiveOrAdult=1]="OffensiveOrAdult",e[e.InaccurateOrMisleading=2]="InaccurateOrMisleading",e[e.Outdated=3]="Outdated",e[e.Duplicate=4]="Duplicate",e[e.DisplayIssue=5]="DisplayIssue",e[e.Other=6]="Other"}(dn||(dn={})),function(e){e[e.Misleading=1]="Misleading",e[e.Inappropriate=2]="Inappropriate",e[e.BadImage=3]="BadImage",e[e.Other=4]="Other"}(cn||(cn={}));var In,An=i(62938),En=i(12611);!function(e){e.SavedContent="SavedContent",e.ReadHistory="ReadHistory"}(In||(In={}));class Mn{constructor(e){this.config=e,this.requestUserFeedBase="MSN/User/me/"}getUserStoriesFromFeed(e,t=!1){return(0,T.mG)(this,void 0,void 0,(function*(){const i=this.config.initialRequest;if(!i)return ce.M0.sendAppErrorEvent(Object.assign(Object.assign({},e===In.SavedContent?Me.UBn.InterestsSavedStoriesInvalidConfigError:Me.UBn.InterestsReadStoriesInvalidConfigError),{message:"default OneService fetch configuration was invalid"})),null;const n=(yield(0,Be.XJ)())===je.Hy.SignedIn?kn.$.getOneServiceParamsWithAuth(ct.jG.UserId,i.ocid,i.addPageInfoToOcid):kn.$.getOneServiceParamsWithoutAuth(ct.jG.UserId,i.ocid,i.addPageInfoToOcid),o=(0,Ln.Ee)(),a=[...n,{key:"responseSchema",value:t?An.c.CardView:An.c.FlatView},{key:"timeOut",value:`${i.timeoutMs}`},{key:"$top",value:`${i.count}`},{key:"$select",value:"title,id,url,images,provider"},{key:Ln.i$,value:o?o.toString():null}],s=(0,$n.PH)(this.requestUserFeedBase+e);let r;a.forEach((e=>{e.value&&s.searchParams.set(e.key,e.value)}));try{const e=yield(0,On.w)((()=>(0,T.mG)(this,void 0,void 0,(function*(){const e={credentials:"include",method:"GET",headers:yield kn.$.getOneServiceHeaders()},t=yield fetch(decodeURIComponent(s.href),e);if(!t||!t.ok)throw Error(t.statusText);return t}))),"OneServiceCardProvider.fetch");r=e&&e.ok?yield e.json():null}catch(t){return void ce.M0.sendAppErrorEvent(Object.assign(Object.assign({},e===In.SavedContent?Me.UBn.InterestsRetrieveSavedStoriesError:Me.UBn.InterestsRetrieveReadStoriesError),{message:"Error while fetching OneService user stories response",pb:Object.assign(Object.assign({},e===In.SavedContent?Me.UBn.InterestsRetrieveSavedStoriesError.pb:Me.UBn.InterestsRetrieveReadStoriesError.pb),{customMessage:`url: ${s.href}, Error: ${t}`})}))}if(!r)return void ce.M0.sendAppErrorEvent(Object.assign(Object.assign({},e===In.SavedContent?Me.UBn.InterestsSavedStoriesInvalidJsonError:Me.UBn.InterestsReadStoriesInvalidJsonError),{message:"Didn't get valid JSON from user stories response."}));const{value:l}=r;if(l&&un.b.arrayHasData(l))return t?this.mapUserStoriesToContentResponseCardView(l[0],e):this.mapUserStoriesToContentResponse(l[0].feedItems,e);ce.M0.sendAppErrorEvent(Object.assign(Object.assign(Object.assign({},Me.UBn.InterestsSavedStoriesInvalidListError),e===In.SavedContent?Me.UBn.InterestsSavedStoriesInvalidListError:Me.UBn.InterestsReadStoriesInvalidListError),{message:"Didn't get valid user stories feed items list from response.",pb:Object.assign(Object.assign({},e===In.SavedContent?Me.UBn.InterestsSavedStoriesInvalidListError.pb:Me.UBn.InterestsReadStoriesInvalidListError.pb),{customMessage:`serviceUrl.href: ${s.href}`})}))}))}mapUserStoriesToContentResponse(e,t){if(e)return{cardMetadata:e.map((e=>Object.assign(Object.assign({},e),{type:e.type||xn.PL.Article,metadata:Object.assign(Object.assign({},e.metadata),{abstractLength:null,actions:t===In.SavedContent?[rn.Save]:e.metadata.actions,kicker:[{feedName:" ",id:""}]})})))}}mapUserStoriesToContentResponseCardView(e,t){if(!e)return;const i=(0,En.ni)(e).feedItems;return t===In.SavedContent&&i.map((e=>e.metadata.actions=[rn.Save])),{cardMetadata:i}}}var Pn=i(13578),Dn=i(52965),Hn=i(77162),Fn=i(90846);function Rn(){(0,Fn.G5)()?(0,qe.x4)():function(){const e=`https://api.msn.${ct.jG.IsChinaCompliance?"cn":"com"}/auth/cookie/securepassport?apikey=${ct.jG.OneServiceApiKey}&activityId=${ct.jG.ActivityId}&ocid=Peregrine&secure=true&ru=${encodeURIComponent((0,Je.l4)())}`,t=`https://login.live.com/login.srf?wa=wsignin1.0&wp=MBI_SSL&mkt=${ct.jG.CurrentMarket}&wreply=${encodeURIComponent(e)}`;window.open(t,"_self")}()}var Nn=i(33832),Un=i(91608),jn=i(41067),Bn=i.n(jn),zn=i(61436),Gn=i(11310),qn=i.n(Gn),Vn=i(50825),_n=i.n(Vn),Wn=i(82204),Zn=i(18828),Jn=i.n(Zn),Yn=i(31702),Kn=i(9610),Xn=i(83721),Qn=i(82423),eo=i(62661),to=i(14989),io=i(18544);const no={DarkMode:"radial-gradient(100% 194% at 100% 0%, #2B3033 0%, #2B2E33 16%, #332B30 32%, #33292F 50%, #332B30 64%, #2B2C33 82%, #2D3238 100%, #2B2F33 100%)",LightMode:"radial-gradient(100% 193.51% at 100% 0%, #EDF4F8 0%, #EFF2FA 16.92%, #FAEFF6 34.8%, #FAE6F2 48.8%, #FAF0F7 63.79%, #F1F1FB 81.34%, #F0F4F8 100%)"},oo=(e,t)=>t.replace(/\{([\s\S]+?)\}/g,(t=>`{ .${e} ${t} }`)),ao=`\n${(0,to.vW)(to.K$.c3,null)} {\n    width: 620px;\n}`,so=`\n${(0,to.vW)(to.K$.c1,to.K$.c2)} {\n    max-width: 334px;\n}\n${(0,to.vW)(to.K$.c3,null)} {\n    max-width: 620px;\n}`,ro=`\n${(0,to.vW)(to.K$.c1,to.K$.c1)} {\n    width: 334px;\n}\n${(0,to.vW)(to.K$.c2,to.K$.c2)} {\n    width: 304px;\n}\n`,lo=`\n${(0,to.vW)(to.K$.c1,to.K$.c2)} {\n    max-width: 430px;\n    margin: auto;\n    overflow: hidden;\n}\n${(0,to.vW)(to.K$.c2,to.K$.c2)} {\n    max-width: 314px;\n}\n${(0,to.vW)(null,to.K$.c2)} {\n    --searchbox-width: 280px\n    margin: 0 auto;\n    padding: 0;\n}\n${(0,to.vW)(to.K$.c3,to.K$.c3)} {\n    padding-inline-start: 30px;\n}`,co=`\n${(0,to.vW)(to.K$.c1,to.K$.c2)} {\n    grid-template-columns: 1fr;\n    grid-column-gap: 0;\n    grid-row-gap: 12px;\n}`,uo=`\n${(0,to.vW)(to.K$.c2,to.K$.c2)} {\n    width: 640px;\n}\n${(0,to.vW)(to.K$.c3,to.K$.c3)} {\n    width: 990px;\n}\n${(0,to.vW)(to.K$.c4,null)} {\n    width: 990px;\n    margin: 0;\n}\n${(0,to.vW)(null,to.K$.c3)} {\n    --side-pane-min-width: 272px;\n}\n${(0,to.vW)(to.K$.c4,null)} {\n    --side-pane-min-width: 300px;\n}`,ho=`\n${(0,to.vW)(to.K$.c2,to.K$.c5)} {\n    background-color: ${$.IfY};\n}`,go=`\n    msn-interests-search.vnext::part(indicator) {\n        padding-inline-start: 0;\n    }\n\n    msn-interests-search.vnext svg {\n        width: 15px;\n        height: 15px;\n        fill: ${$.Q5n};\n    }\n\n    msn-interests-search.vnext::part(selected-value) {\n        padding-inline-end: 31px;\n        padding-inline-start: 12px;\n    }\n`,po=O.i`
    msn-interests-search.vnext::part(indicator) {
        right: 8px;
    }
`,mo=O.i`
    msn-interests-search.vnext::part(indicator) {
        left: 8px;
    }
`,fo=O.i`
${oo("settings-container",so)}

.setting-heading {
    font-size: ${$.mWK};
    line-height: ${$.I7_};
    font-weight: 600;
}

.settings-container {
    padding: 20px 2px;
}
`,vo=O.i`
${oo("setting-card-container",ao)}

.setting-card-container {
    padding-inline-end: 2px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.setting-card-button {
    margin: 20px 0;
    border-radius: 20px;
}

.setting-card-toggle {
    min-height: 48px;
    margin-top: 0
}

.setting-card-toggle-text {
    display: block;
    max-width: 100%;
    font-size: ${$.cSu};
    line-height: ${$.RUt};
    margin-top: 10px;
    margin-bottom: 10px;
}

.setting-card-item-title-text {
    padding: 8px 21px;
    margin: 0;
}

.setting-card-item-title-description {
    font-size: ${$.sNp};
    line-height: ${$.vgC};
}

.inline-settings {
    border-top: 1px solid ${$.dtw};
}

.setting-card-item-text {
    display: flex;
    max-width: 100%;
    font-size: ${$.cSu};
    line-height: ${$.RUt};
    align-items: center;
}

.setting-card-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    padding-inline-end: 20px;
}

.setting-card-sub-item-line {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0 21px;
    min-height: 52px;
}

.setting-card-sub-item-line:nth-child(1n+2) {
    border-top: 1px solid ${$.dtw}
}

.setting-card-link-icon {
    width: 16px !important;
    height: 16px !important;
    padding-inline-end: 16px;
    fill: accentFillRest
}

.setting-card-link {
    display: flex;
    align-items: center;
    font-size: ${$.cSu};
    padding-inline-start: 21px;
    font-weight: 600;
    line-height: ${$.RUt};
    height: 48px;
    border-top: 1px solid ${$.dtw};
    text-decoration: none;
    cursor: pointer;
    color: accentFillRest;
    background-color: ${$.qDs};
}
`,yo=O.i`
${go}

:host {
    border-radius: 6px;
}

/* Content constraints the WindowsHomePage used to provide */
.content {
    margin: 0 auto;
}
@media (max-width: 643px) {
    .content {
        max-width: 440px;
        padding: 0 24px;
    }
}
@media (min-width: 644px) and (max-width: 955px) {
    .content {
        width: 612px;
    }
}
@media (min-width: 956px) and (max-width: 1267px) {
    .content {
        width: 924px;
    }
}
@media (min-width: 1268px) {
    .content {
        width: 1236px;
    }
}

.title {
    height: 48px;
    border-bottom: 1px solid ${$.dtw};
}

.interests-river {
    padding-inline-start: 40px;
    outline: none;
    --searchbox-width: 540px;
}

${oo("interests-river",lo)}

msn-followed-interests-river-section {
    display: block;
}

.interests-river > *:last-child {
    padding-bottom: 80vh
}

.mute-dialog {
    --action-dialog-z-index: ${we.K.Dialog.toString()};
    --layer-corner-radius: 6px;
    --neutral-divider-rest: ${$.dtw};
    --action-dialog-width: 368px;
    --button-min-width: 150px;
    position: absolute;
}

.action-dialog-controls-container {
    display: grid;
    grid-template-columns: var(--button-min-width) var(--button-min-width);
    justify-content: center;
    grid-gap: var(--space-between-buttons);
}

.action-dialog-control-buttons {
    border-radius: var(--button-border-radius);
    font-size: var(--type-ramp-minus-1-font-size, 12px);
}

.mute-dialog-img {
    display: flex;
    justify-content: center;
    margin: 27px auto;
}

.mute-dialog-img > img {
    height: 64px;
    width: 64px;
}

.mute-dialog-content {
    margin: 27px 0;
}

${oo("muted-publishers",ro)}

.side-pane-layout-container-search {
    --search-background: white;
}

.side-pane-layout-container-search msft-side-pane-layout::part(header-container) {
    bottom: 55px;
}

.side-pane-layout-container msft-side-pane-layout::part(navigation-pane) {
    padding-top: 21px;
}

.side-pane-layout-container msft-side-pane-layout[is-responsive]::part(navigation-pane) {
    top: calc(var(--navigation-pane-wrapper-sticky-top) - 21px);
    padding-top: 21px;
    z-index: ${we.K.Over.toString()};
}

.side-pane-layout-container msft-side-pane-layout, 
.side-pane-layout-container msft-side-pane-layout::part(wrapper), 
.side-pane-layout-container msft-side-pane-layout::part(content-pane) {
    outline: none;
    padding: 0px;
}

.side-pane-layout-container msft-side-pane-layout::part(content-pane) {
    padding-inline-end: 2px;
    padding-top: 1px;
    width: 100%;
    --content-pane-min-width: 350px;
}

.side-pane-layout-container msft-side-pane-layout::part(navigation-menu-button) {
    background-color: ${$.Avx};
    height: 64px;
    width: 64px;
}

@media (max-width: 624px) {
    .side-pane-layout-container msft-side-pane-layout fluent-tree-item#menuItem-tune-feed {
        display: none;
    }
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-view {
    border-radius: calc(${$.rSr} * 1px);
    width: var(--side-pane-min-width);
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item#menuItem-tune-feed {
    color: ${$.goi};
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item#menuItem-tune-feed:hover {
    text-decoration: underline;
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item#menuItem-tune-feed svg {
    fill: ${$.goi};
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item#menuItem-tune-feed::after {
    content: none;
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item#menuItem-tune-feed::part(positioning-region) {
    background: none;
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item#menuItem-tune-feed::part(end) {
    margin-inline-start: 6px;
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item:focus:not:${pe.b} {
    border: none;
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item {
    border-radius: 4px;
}

.side-pane-layout-container msft-side-pane-layout fluent-tree-item.selected::after {
    background: transparent;
}

${oo("side-pane-layout-container",uo)}

msft-side-pane-layout::part(navigation-pane-wrapper) {
    position: relative;
}

msft-side-pane-layout.sticky::part(navigation-pane-wrapper) {
    position: fixed;
    top: var(--navigation-pane-wrapper-sticky-top);
    padding-top: 21px;
}

.tree-item-glyph-start-container {
    display: flex;
}

msn-discover-interests-river-section msn-topics-section::part(heading) {
    font-size: ${$.PwC};
    font-weight: 600;
    padding-bottom: 15px;
}

msn-interests-river-section {
    padding: 0;
}

.content-card-section {
    padding: 20px 2px;
}

.content-card-section-heading {
    font-size: ${$.mWK};
    line-height: ${$.I7_};
    font-weight: 600;
}

.content-card-description {
    font-size: ${$.sNp};
    line-height: ${$.vgC};
    padding-top: 2px;
    padding-bottom: 20px;
}

.content-cards-list {
    display: grid;
    grid-area: 2 / 1 / 3 / 3;
    grid-gap: 20px;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 620px;
    padding-top: 15px;
}

${oo("content-cards-list",co)}

.content-card-button-icon {
    vertical-align: bottom
}

._1x_1y {
    height: 119px;
    max-width: 351px;
    min-width: 300px;
    --heading-start-padding: 12px;
    --heading-end-padding: 12px;
    --media-inline-padding: 12px;
    --footer-start-padding: 4px;
}

._1x_1y msft-content-card::part(media-wrapper) {
    margin-top: 12px
}

._1x_1y msft-content-card::part(heading-container) {
    padding-top: 12px;
    --heading-max-lines: 2;
}

${fo}
${vo}

msn-market-selector::part(select) {
    max-width: unset;
    margin-bottom: 0px;
}

.market-settings-container {
    background: ${$.RJY};
    margin-bottom: 30px;
    border-radius: 6px;
    --elevation: 4;
    ${F.XC};
}

.market-settings-content {
    padding: 20px;
}

.market-settings-container {
    margin-top: 15px;
}

.notification-setting-card-container {
    background-color: ${$.RJY};
    box-shadow: 0px 1.6px 3.6px rgba(0, 0, 0, 0.13), 0px 0px 2.9px rgba(0, 0, 0, 0.11);
    border-radius: 2px;
    margin-top: 30px;
    padding-top: 0px;
    padding-bottom: 0px
}

.notification-setting-card-container > .notification-setting-card:not(:last-child) {
    border-bottom: 0.5px solid #E1E1E1;
}

.notification-setting-card {
    height: 62px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.notification-setting-card .left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.notification-setting-card .notification-setting-card-title {
    color: ${$.CHi};
    font-size: ${$.PwC};
    line-height: ${$.b3W};
}
    
.notification-setting-card .notification-setting-card-desc {
    font-size: ${$.cSu};
    line-height: ${$.RUt};
    color: ${$.yGg};
}

.notification-setting-card .left > *:only-child {
    font-weight: normal;
    color: ${$.CHi};
} 

.notification-setting-card.notification-topic-setting-card {
    height: 48px;
}

.notification-setting-card .left > .notification-setting-card-title.notification-topic-setting-card-title {
    font-weight: 600;
}

.compliance-disclaimer-message {
    align-items: center;
    padding-top: 8px;
    padding-right: 16px;
    padding-bottom: 8px;
    padding-left: 24px;
    max-height: 88px;
    max-width: 280px;
    font-family: Segoe UI;
    font-size: 14px;
    line-height: 24px;
    margin-top: 30px;
    background: ${$.sG3};
}

.compliance-text {
    margin: 0px;
    width: 240px;
}

${oo("translucentBackground fluent-tree-view",ho)}

.translucentBackground msn-topics-section::part(heading),
.translucentBackground fluent-tree-item:not(.selected),
.translucentBackground div.setting-heading,
.translucentBackground div.content-card-section-heading,
.translucentBackground span.content-card-description {
    color: white;
}
.translucentBackground fluent-tree-item:not(.selected) fluent-tree-item:hover {
    color: ${$.CHi};
}

`.withBehaviors((0,G.vF)(O.i`
                :host fluent-tree-item#menuItem-tune-feed::part(content-region){
                    color: ${$.goi};
                }
            `),new R.O(po,mo),(0,G.Uu)(O.i`
                msft-side-pane-layout {
                    --discover-interests-header-background: radial-gradient(100% 194% at 100% 0%, #2B3033 0%, #2B2E33 16%, #332B30 32%, #33292F 50%, #332B30 64%, #2B2C33 82%, #2D3238 100%, #2B2F33 100%);
                }

                .side-pane-layout-container-search {
                    --search-background: ${io.Yw};
                }
            `));var bo=i(38349),So='<svg width="16" height="16" viewBox="0 0 14 14"><path d="M3.57 1.75h-.9C2.87.75 3.75 0 4.8 0h5.69A3.5 3.5 0 0 1 14 3.5v5.69c0 1.06-.75 1.94-1.75 2.14v-.9c.51-.18.88-.67.88-1.24V3.5A2.62 2.62 0 0 0 10.5.87H4.81c-.57 0-1.06.37-1.24.88Zm-1.38.88C.98 2.63 0 3.6 0 4.8v7C0 13.02.98 14 2.19 14h7c1.2 0 2.19-.98 2.19-2.19v-7c0-1.2-.98-2.18-2.2-2.18h-7ZM.88 4.8c0-.72.58-1.31 1.3-1.31h7c.73 0 1.32.59 1.32 1.31v7c0 .73-.59 1.31-1.31 1.31h-7c-.73 0-1.31-.58-1.31-1.3v-7Z"/></svg>',wo=i(60134),To=i.n(wo),Co='<svg width="16" height="16" viewBox="0 0 18 15"><path xmlns="http://www.w3.org/2000/svg" d="M0 .13h18v14.62H0V.12Zm16.88 13.5V1.24H1.13v12.38h15.75ZM13.5 3.5v1.13h-9V3.5h9ZM5.62 8v3.38H2.25V8h3.38ZM4.5 10.25V9.12H3.37v1.13H4.5Zm2.81 1.13V8h3.38v3.38H7.3Zm1.13-2.26v1.13h1.12V9.12H8.44Zm3.94 2.26V8h3.37v3.38h-3.38Zm1.12-2.26v1.13h1.13V9.12H13.5Z"/></svg>',xo=i(61095),ko=i(22532),$o=i.n(ko),Oo=i(34526),Lo=i.n(Oo),Io=i(67735),Ao=i.n(Io),Eo=i(67707),Mo=i.n(Eo),Po=i(97825),Do=i.n(Po),Ho=i(72546),Fo=i.n(Ho),Ro=i(9146),No=i.n(Ro),Uo=i(72803),jo=i.n(Uo),Bo=i(20503),zo=i.n(Bo),Go=i(12689),qo=i.n(Go),Vo=i(51725),_o=i(50338),Wo=i.n(_o),Zo=i(4935),Jo=i.n(Zo),Yo=i(82277),Ko=i(13493),Xo=i(83926),Qo=i.n(Xo),ea=i(54348),ta=i.n(ea),ia=i(20367),na=i.n(ia),oa=i(33932),aa=i.n(oa),sa='<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.86 6.86H9a.43.43 0 0 0 0 .85h.86a.43.43 0 0 0 0-.85ZM1.29 0C.58 0 0 .58 0 1.29v8.57C0 11.04.96 12 2.14 12h8.57c.71 0 1.29-.58 1.29-1.29V3c0-.56-.36-1.04-.86-1.21v-.5C11.14.58 10.57 0 9.86 0H1.29ZM.86 9.86V2.5c.13.05.28.07.43.07h9.42c.24 0 .43.2.43.43v7.71c0 .24-.19.43-.43.43H2.14c-.7 0-1.28-.57-1.28-1.28Zm.43-9h8.57c.23 0 .43.19.43.43v.42h-9a.43.43 0 0 1 0-.85Z" fill-opacity=".83"/></svg>',ra=i(7508),la=i.n(ra),da=i(7981),ca=i.n(da),ua=i(11798),ha=i(98610),ga=i.n(ha),pa=i(56933),ma=i.n(pa),fa=i(83404),va=i.n(fa),ya=i(65732),ba=i(70076),Sa=i(27897),wa=i.n(Sa),Ta=i(55096),Ca=i.n(Ta),xa=i(46146),ka=i.n(xa),$a=i(50443),Oa=i.n($a),La=i(75688),Ia=i(86775),Aa=i.n(Ia),Ea=i(17447),Ma=i.n(Ea),Pa=i(18520),Da=i.n(Pa);const Ha={aicharacter:'<svg width="16" height="14" viewBox="0 0 16 14"><path d="M.05 5.83A5.9 5.9 0 0 1 6.03 0a5.9 5.9 0 0 1 5.98 5.83 5.9 5.9 0 0 1-5.98 5.83 6.1 6.1 0 0 1-2.46-.51l-2.34.54c-.73.18-1.38-.47-1.2-1.18L.61 8.3a5.7 5.7 0 0 1-.56-2.47Zm5.98-4.66a4.73 4.73 0 0 0-4.78 4.66c0 .77.19 1.5.52 2.14l.1.2-.05.2-.55 2.12 2.23-.52.2-.05.2.1c.64.3 1.36.48 2.13.48a4.73 4.73 0 0 0 4.78-4.67 4.73 4.73 0 0 0-4.78-4.66Zm-.08 11.27a6.04 6.04 0 0 0 6.53 1.04c.83.2 1.74.38 2.32.5a.98.98 0 0 0 1.17-1.17c-.13-.54-.33-1.4-.53-2.18.36-.75.56-1.58.56-2.47a5.85 5.85 0 0 0-4.03-5.5c.28.49.5 1.02.64 1.58a4.63 4.63 0 0 1 1.66 6.06l-.1.2.05.21c.19.7.38 1.48.52 2.06-.62-.12-1.45-.3-2.19-.47l-.2-.05-.2.1a4.86 4.86 0 0 1-4.46-.1 6.96 6.96 0 0 1-1.74.2ZM4.92 6.38h1.16L6.3 7H7L5.8 4h-.6L4 7h.7l.22-.62Zm.98-.5h-.8l.4-1.12.4 1.12ZM7.34 7H8V4h-.66v3Z"/></svg>',arrowsort:Lo(),open:la(),myinterests:Fo(),workinterests:'<svg width="16" height="13" viewBox="0 0 16 13"><path fill-rule="evenodd" clip-rule="evenodd" d="M5 1v1H1.5C.67 2 0 2.67 0 3.5v8c0 .83.67 1.5 1.5 1.5h13c.83 0 1.5-.67 1.5-1.5v-8c0-.83-.67-1.5-1.5-1.5H11V1a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1Zm5 0H6v1h4V1Zm4.5 2c.28 0 .5.22.5.5v2c0 .83-.67 1.5-1.5 1.5H9v-.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5V7H2.5A1.5 1.5 0 0 1 1 5.5v-2c0-.28.22-.5.5-.5h13ZM7 8H2.5c-.56 0-1.08-.19-1.5-.5v4c0 .28.22.5.5.5h13a.5.5 0 0 0 .5-.5v-4c-.42.31-.94.5-1.5.5H9v.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V8Z"/></svg>',news:na(),entertainment:'<svg viewBox="0 0 16 16" width="16" height="16"><path d="M16 7a.97.97 0 0 0-.71.3 1 1 0 0 0 .32 1.62c.12.05.25.08.39.08v4H0V9a.97.97 0 0 0 .7-.29A.97.97 0 0 0 1 8a.97.97 0 0 0-.3-.7A.94.94 0 0 0 0 7V3h16v4Zm-1-3H1v2.27A1.99 1.99 0 0 1 2 8a1.97 1.97 0 0 1-1 1.73V12h14V9.73A1.99 1.99 0 0 1 14 8a1.97 1.97 0 0 1 1-1.73V4Z"/></svg>',sports:ka(),esports:qo(),business:ta(),yourmoney:ta(),lifestyle:ga(),fashionbeauty:'<svg viewBox="0 0 16 16" width="16" height="16"><path d="M10 0c.08 0 .16.02.23.05L16 2.94V4a.48.48 0 0 0-.35.15c-.1.1-.15.21-.15.35v1A3.54 3.54 0 0 1 12 9a3.45 3.45 0 0 1-2.48-1.02A3.45 3.45 0 0 1 8.5 5.5a.48.48 0 0 0-.15-.35A.48.48 0 0 0 8 5a.48.48 0 0 0-.35.15c-.1.1-.15.21-.15.35A3.54 3.54 0 0 1 4 9a3.45 3.45 0 0 1-2.48-1.02A3.45 3.45 0 0 1 .5 5.5v-1a.48.48 0 0 0-.15-.35A.48.48 0 0 0 0 4V2.94L5.77.05A.47.47 0 0 1 6 0c.14 0 .25.05.35.15a7.16 7.16 0 0 0 .4.38c.08.07.13.15.18.23.05.08.07.16.07.24 0 .14-.05.25-.15.35-.1.1-.21.15-.35.15a.49.49 0 0 1-.34-.13l-.26-.26L2.12 3H6c.2 0 .37.03.5.08a1.78 1.78 0 0 1 .69.42l.26.24c.08.08.16.14.25.19.1.05.2.07.3.07.1 0 .2-.02.3-.07a5.33 5.33 0 0 0 .5-.43l.3-.24A1.73 1.73 0 0 1 10 3h3.88L10.1 1.1l-.27.27a.46.46 0 0 1-.33.13.48.48 0 0 1-.35-.15.48.48 0 0 1-.08-.6c.05-.07.1-.15.17-.22l.21-.2.2-.18c.1-.1.21-.15.35-.15ZM6.5 5a.95.95 0 0 0-.08-.38.92.92 0 0 0-.22-.32.92.92 0 0 0-.32-.22A.95.95 0 0 0 5.5 4H2a.48.48 0 0 0-.35.15c-.1.1-.15.21-.15.35v1A2.48 2.48 0 0 0 4 8a2.42 2.42 0 0 0 1.76-.73A2.54 2.54 0 0 0 6.5 5.5V5ZM12 8a2.42 2.42 0 0 0 1.76-.73 2.53 2.53 0 0 0 .74-1.77 9.23 9.23 0 0 0-.02-.76l.02-.38c.02-.13.04-.25.09-.36H10.5a1 1 0 0 0-.71.3.98.98 0 0 0-.21.32.95.95 0 0 0-.08.38v.5A2.48 2.48 0 0 0 12 8Z"/></svg>',health:Wo(),hiddenTopics:To(),home:Jo(),autos:Ao(),autosmarketplace:Ao(),self:'<svg viewBox="0 0 16 16" width="16" height="16"><path d="M12.67 7.16c.26.12.46.3.6.56a1.48 1.48 0 0 1-.22 1.84A1.5 1.5 0 0 1 12 10c0 .28-.08.54-.23.79a1.4 1.4 0 0 1-.6.55l-3.94 1.97a.47.47 0 0 1-.23.06.45.45 0 0 1-.22-.06l-3.95-1.97a1.4 1.4 0 0 1-.61-.55c-.14-.24-.21-.5-.21-.8a1.56 1.56 0 0 1-1.07-.42 1.5 1.5 0 0 1-.22-1.85c.15-.25.35-.44.6-.56l1.72-.86 1.23-2.47c.1-.2.25-.37.43-.51s.38-.23.6-.28A2.14 2.14 0 0 1 5 2 2 2 0 0 1 7.77.16 2 2 0 0 1 9 2a2.14 2.14 0 0 1-.3 1.04 1.54 1.54 0 0 1 1.02.79l1.24 2.47 1.71.86ZM7 1a.97.97 0 0 0-.71.3 1 1 0 0 0 .32 1.62c.12.05.25.08.39.08a.97.97 0 0 0 .7-.29A.97.97 0 0 0 8 2a.97.97 0 0 0-.3-.7A.94.94 0 0 0 7 1Zm3.73 9.45c.09-.05.15-.1.2-.18A.53.53 0 0 0 11 10a.46.46 0 0 0-.15-.35.48.48 0 0 0-.57-.1l-3.05 1.53a.57.57 0 0 1-.23.05.56.56 0 0 1-.22-.05L3.73 9.55a.47.47 0 0 0-.23-.05.48.48 0 0 0-.35.15c-.1.1-.15.21-.15.35 0 .1.02.18.07.27.05.07.12.13.2.18L7 12.3l3.73-1.86ZM12 9c.14 0 .25-.05.35-.15a.48.48 0 0 0 .07-.6.44.44 0 0 0-.2-.2l-1.85-.93a.53.53 0 0 1-.23-.22L8.83 4.27a.45.45 0 0 0-.19-.2.48.48 0 0 0-.26-.07H5.62a.48.48 0 0 0-.26.08.45.45 0 0 0-.19.2L3.86 6.9a.53.53 0 0 1-.23.22l-1.85.93a.49.49 0 0 0-.13.8c.1.1.21.15.35.15.07 0 .14-.02.23-.05l2.32-1.16.5-1.02c.05-.08.1-.14.2-.2a.48.48 0 0 1 .6.08c.1.1.15.21.15.35 0 .07-.02.14-.05.23l-.58 1.15a.5.5 0 0 1-.15.17 1.95 1.95 0 0 1-.43.24l-.19.09L7 10.06l2.4-1.2a4.1 4.1 0 0 1-.63-.32.54.54 0 0 1-.14-.17l-.58-1.15A.57.57 0 0 1 8 7c0-.14.05-.25.15-.35a.48.48 0 0 1 .6-.07c.1.04.15.11.2.2l.5 1 2.32 1.17c.09.03.16.05.23.05Z"/></svg>',video:Ma(),local:Qo(),society:Oa(),shopping:Oa(),passions:'<svg viewBox="0 0 16 16" width="16" height="16"><path d="M16 11.6a2.11 2.11 0 0 1-.6 1.47l-2.9 2.88-2.9-2.88a2.07 2.07 0 0 1 0-2.95 2.06 2.06 0 0 1 2.24-.48c.25.09.47.22.66.4.2-.18.42-.31.66-.4a2.06 2.06 0 0 1 1.57.02c.25.11.47.26.66.46a2.1 2.1 0 0 1 .61 1.47Zm-1 0c0-.16-.03-.3-.09-.43a1.1 1.1 0 0 0-1-.67c-.3 0-.56.1-.77.32l-.64.64-.64-.64c-.1-.1-.22-.18-.36-.23a1.1 1.1 0 0 0-1.18 1.77l2.18 2.18 2.18-2.18c.21-.21.32-.47.32-.77ZM9 9a4.95 4.95 0 0 0-4.96-.6A4.91 4.91 0 0 0 1 13H0a6 6 0 0 1 3.88-5.62 3.82 3.82 0 0 1-1.37-1.45A4.34 4.34 0 0 1 2 4a3.9 3.9 0 0 1 1.17-2.82A4.04 4.04 0 0 1 6 0a3.95 3.95 0 0 1 3.68 2.45A3.81 3.81 0 0 1 9.87 5a4.12 4.12 0 0 1-1.75 2.38c.34.12.66.28.94.46.3.19.58.4.85.64A2.55 2.55 0 0 0 9 9Zm0-5a2.95 2.95 0 0 0-.9-2.1 2.95 2.95 0 0 0-3.26-.66A3.06 3.06 0 0 0 3 4a2.92 2.92 0 0 0 .88 2.12 2.92 2.92 0 0 0 3.27.65 3.12 3.12 0 0 0 1.6-1.6C8.93 4.8 9 4.4 9 4Z"/></svg>',savedstories:Do(),followedPublishers:No(),hiddenpublishers:ma(),informationcards:Co,globewestlegacy:'<svg viewBox="0 0 16 16" width="16" height="16"><path d="M7.93 0h.18c2.23 0 4.2.91 5.92 2.74A7.91 7.91 0 0 1 16 7.93v.14c0 2.57-1.13 4.72-3.38 6.46A7.9 7.9 0 0 1 8.07 16h-.14c-2.57 0-4.72-1.13-6.46-3.38A7.86 7.86 0 0 1 0 8.07v-.14C0 5.36 1.13 3.2 3.38 1.47A7.9 7.9 0 0 1 7.93 0ZM3.14 2.98c.19 0 .45.2.77.63l.2.04c0-.05.04-.07.1-.07v-.2l.24-.34-.17-.63c.11-.07.2-.1.27-.1h.23c.26 0 .48.19.67.57h.04l.26-.2c.56.2.9.4 1.04.6v.17c0 .12-.38.27-1.14.43l-.06.1v.03l.4.1v.07c-.07.08-.28.23-.64.44 0 .11-.23.25-.7.4a.26.26 0 0 0-.13-.04v.07l.03.07c-.05 0-.07.03-.07.06s.05.1.14.2v.04c-.43.25-.64.45-.64.6a.33.33 0 0 0-.03.17l.03.4h-.03c-.21-.36-.47-.54-.77-.54h-.2l-.17.04v.03h.07v.07l-.34-.04h-.17c-.37 0-.56.2-.56.6.03.36.2.54.5.54.16 0 .44-.06.83-.2h.04c-.16.39-.24.6-.24.64l.1.03a.4.4 0 0 1 .2-.07c.13 0 .44.27.94.82l.1.03v.03c0 .06-.09.1-.27.14-.34-.2-.53-.3-.56-.3 0 .02-.02.03-.04.03-.15-.32-.28-.48-.4-.48-.48 0-1.12-.26-1.94-.77l-.03.14L1 8.2c0 1.71.75 3.36 2.24 4.95.6.49 1.06.8 1.38.93v-.13l.23-1.14v-.03c0-.34-.26-1.1-.77-2.28a1.5 1.5 0 0 1-.07-.4v-.1l.04-.16-.1-.07c.3-.43.47-.7.47-.8v-.04c0-.06-.03-.16-.07-.3l.07-.03h.03l.07.03c0-.28.27-.46.83-.53h.07c.71.14 1.07.3 1.07.5.45.27.75.4.9.4.66.24 1.34.69 2.02 1.34.11.14.17.25.17.33v.04a.9.9 0 0 1-.27.3l.03.1c0 .54-.25.9-.77 1.1-.35.1-.53.28-.53.54-.19.4-.42.65-.71.76h-.17l-.27-.2-.07.04.04.06v.24c0 .23-.18.6-.54 1.1v.04c.63.13 1.2.2 1.72.2 2.33 0 4.28-1.07 5.85-3.21-.2-.4-.3-.76-.3-1.07 0-.23.05-.54.14-.94a2.57 2.57 0 0 0-.47-1c.04-.22.06-.39.06-.5 0-.16-.14-.25-.43-.29-.11 0-.26-.06-.44-.2a2.4 2.4 0 0 1-.76.25l-.14-.08a.94.94 0 0 1-.37.11h-.06c-.6-.15-.9-.36-.9-.61-.19-.08-.3-.17-.34-.27v-.03l.07-.1c-.14 0-.2-.07-.2-.2a.2.2 0 0 1 .1-.04V6.8c-.16-.05-.24-.1-.24-.17.05-.07.1-.22.17-.43l-.07-.5c0-.27.26-.58.77-.94l.2-.23a.26.26 0 0 1-.03-.1c.35-.43.54-.64.57-.64h.03c.6 0 1.3-.08 2.1-.23V3.5a7.42 7.42 0 0 0-1.06-1.03c-.5.2-.74.4-.74.56l.03.2c-.11.25-.36.37-.73.37l-.34-.03-.33.07a.65.65 0 0 1-.13-.27c.06-.24.1-.4.1-.5-.04 0-.07-.05-.1-.14a9.9 9.9 0 0 1 1.3-.4c0-.23-.22-.39-.67-.47v-.03c0-.05.14-.09.4-.1V1.7A7.6 7.6 0 0 0 7.96 1c-1.79 0-3.4.65-4.82 1.97Zm10.35.73-.03.17v.03c0 .17.15.3.47.4-.15-.26-.3-.46-.44-.6ZM4.6 5.08h.06v.14h-.07v-.14ZM3.7 6.9h.2c.1 0 .39.09.84.27v.07h-.3a3.5 3.5 0 0 0-.74-.27v-.07Zm-.06.03V7l-.17.03c0-.04.05-.07.17-.1Zm1.3.3c.34.04.5.09.5.14v.03c-.2.05-.34.07-.43.07h-.04l-.16-.03v-.04l.13-.16Z"/></svg>',soccerball:'<svg viewBox="0 0 16 16" width="16" height="16"><path d="m7.95 4.88 2.94 2.14-1.12 3.46H6.13L5.01 7.02l2.94-2.14ZM10 7.3 7.95 5.81l-2.06 1.5.78 2.42h2.55L10 7.3ZM7.88.5a7.13 7.13 0 0 1 3.71 1c.56.33 1.05.71 1.5 1.16.44.46.82.95 1.14 1.5a7.24 7.24 0 0 1 .75 5.67 7.78 7.78 0 0 1-.74 1.76c-.32.56-.7 1.05-1.15 1.5-.46.44-.95.82-1.5 1.14a7.24 7.24 0 0 1-5.67.75 7.77 7.77 0 0 1-1.76-.74 6.86 6.86 0 0 1-1.5-1.15 7.24 7.24 0 0 1-1.9-7.16A7.33 7.33 0 0 1 7.87.5Zm4.58 3.79-.34 2.2 1.58 1.6.78-.78a6.46 6.46 0 0 0-.93-2.86l-1.09-.16ZM5.87 2.4l2 1 2-1-.49-.99a6.26 6.26 0 0 0-1.5-.17 7.31 7.31 0 0 0-1.51.17l-.5.99ZM2.2 4.45a6.56 6.56 0 0 0-.93 2.86l.78.78 1.58-1.6-.34-2.2-1.09.16Zm4.07 9.03-1.02-1.99-2.2-.37-.18 1.08a6.48 6.48 0 0 0 2.43 1.78l.97-.5Zm4.18.5a6.71 6.71 0 0 0 2.43-1.78l-.18-1.07-2.2.36-1.02 1.99.97.5Zm3.06-2.62a6.65 6.65 0 0 0 .97-3l-.8.78-2.35-2.39.5-3.32 1.1.17a6.67 6.67 0 0 0-2.55-1.86l.5 1-3 1.5-3-1.5.5-1A6.27 6.27 0 0 0 2.81 3.6l1.1-.17.5 3.32-2.36 2.4-.79-.8a6.74 6.74 0 0 0 .97 3l.19-1.08 3.31.54L7.3 13.8l-1 .51a8.14 8.14 0 0 0 1.58.19 6.6 6.6 0 0 0 1.58-.19l-.99-.51 1.55-2.99 3.31-.54.19 1.09Z"/></svg>',suitcase:Mo(),entertainmentlogolegacy:zo(),readStories:ya.Z,discover:jo(),notificationBell:$o(),notificationGeneral:Ca(),notificationNews:na(),notificationSports:'<svg width="16" height="16" viewBox="0 0 16 16"><path d="M15.75 4.01a.88.88 0 0 0-1.17 0L13.21 5.3a.5.5 0 0 1-.69 0L7.8.77a1.9 1.9 0 0 0-2.55 0L3.17 2.71c-.32.3-.32.8 0 1.1.31.3.85.3 1.17 0L6.4 1.88c.06-.06.16-.06.21 0l1.43 1.33-1.4 1.3c-.57.54-.57 1.4 0 1.95.28.26.66.4 1.03.4s.75-.13 1.03-.4l1.37-1.3 1.27 1.22c.42.4.97.59 1.51.59.55 0 1.1-.2 1.52-.59l1.37-1.28A.7.7 0 0 0 15.75 4ZM5.7 6.54a.92.92 0 0 0-.97-.17.82.82 0 0 0-.53.79l.07 3.76H.9c-.5 0-.89.37-.89.84 0 .46.4.83.89.83h3.75c.38 0 .74-.14 1.02-.39.27-.26.4-.6.4-.95l-.05-2.08 2.45 2.26-3.37 3.15a.8.8 0 0 0 0 1.18c.17.17.4.24.62.24.22 0 .46-.08.62-.24l4-3.75a.82.82 0 0 0 .27-.6c0-.22-.1-.44-.26-.6L5.7 6.55Z" fill-opacity=".83"/><path d="M11.87 3.26a1.63 1.63 0 1 0 0-3.26 1.63 1.63 0 0 0 0 3.26Z" fill-opacity=".83"/></svg>',notificationFinance:'<svg width="16" height="16" viewBox="0 0 16 16"><path d="M5.17 6.45 1.61 9.57l5.8 2.9 8.46-5.29V8.4l-8.4 5.25-6.22-3.1v4.2h14.63v1.13H.12V.13h1.13v8.38l3.97-3.48 2.22 2.24 6.18-6.19 2.26 2.25V4.8l-2.26-2.25-6.18 6.19-2.27-2.28Z" fill-opacity=".55"/></svg>',notificationShopping:Oa(),notificationCommunity:ca(),notificationWallet:sa,notificationTraffic:'<svg width="14" height="16" viewBox="0 0 14 16"><path d="M4.92 16a1.96 1.96 0 0 1-1.37-.59c-.17-.18-.32-.39-.42-.62-.11-.24-.17-.49-.17-.75v-.16a3.8 3.8 0 0 1-1.98-1.2c-.26-.3-.47-.62-.63-.98A4.93 4.93 0 0 1 0 10.57v-.06c0-.15.05-.27.14-.36.1-.1.21-.14.36-.15h2.46v-.13a3.8 3.8 0 0 1-1.98-1.2C.72 8.4.51 8.07.35 7.7A4.93 4.93 0 0 1 0 6.57v-.06c0-.15.05-.27.14-.36.1-.1.21-.14.36-.15h2.46v-.13a3.8 3.8 0 0 1-1.98-1.2C.72 4.4.51 4.07.35 3.7A4.93 4.93 0 0 1 0 2.57v-.06c0-.15.05-.27.14-.36.1-.1.21-.14.36-.15h2.46v-.04c0-.26.05-.5.16-.74A2.06 2.06 0 0 1 4.92 0H9c.26 0 .5.05.73.16A2.13 2.13 0 0 1 10.8 1.2c.1.24.16.49.16.74V2h2.46c.15 0 .27.05.36.14.1.1.14.22.14.37v.06a4.15 4.15 0 0 1-1.87 2.84c-.32.21-.69.37-1.09.46V6h2.46c.15 0 .27.05.36.14.1.1.14.22.14.37v.06a4.15 4.15 0 0 1-1.87 2.84c-.32.21-.69.37-1.09.46V10h2.46c.15 0 .27.05.36.14.1.1.14.22.14.37v.06a4.15 4.15 0 0 1-1.87 2.84c-.32.21-.69.37-1.09.46v.17c0 .26-.05.5-.16.74A2.06 2.06 0 0 1 9 16H4.92Zm4.04-1a.97.97 0 0 0 .7-.29c.1-.09.17-.2.22-.32a.85.85 0 0 0 .08-.39V2a.95.95 0 0 0-.08-.38 1.1 1.1 0 0 0-.2-.32 1 1 0 0 0-.71-.3h-4a.97.97 0 0 0-.71.29c-.1.09-.16.2-.22.32a.85.85 0 0 0-.08.39v12c0 .14.03.27.08.4.05.11.12.22.21.31.09.1.2.16.31.21.12.05.26.07.4.08h4Zm-4-11v-.04c0-.27.06-.52.17-.76.1-.23.25-.44.43-.62s.4-.32.64-.42a1.95 1.95 0 0 1 2.17.43c.17.18.32.4.43.64a1.92 1.92 0 0 1-.42 2.18 2 2 0 0 1-2.83 0A2.03 2.03 0 0 1 4.96 4Zm-2-1H1.13a2.78 2.78 0 0 0 .7 1.12 2.9 2.9 0 0 0 1.13.7V3Zm5 1a.95.95 0 0 0-.08-.38 1.1 1.1 0 0 0-.2-.32 1 1 0 0 0-1.71.7c0 .14.02.27.07.4.05.11.12.22.21.31.09.1.2.17.31.21.12.05.26.07.4.08a.97.97 0 0 0 .7-.29c.1-.09.17-.2.22-.32A.85.85 0 0 0 7.96 4Zm3 .83a2.78 2.78 0 0 0 1.12-.7 2.9 2.9 0 0 0 .7-1.13h-1.82v1.83ZM4.96 8v-.04c0-.27.06-.52.17-.76.1-.23.25-.44.43-.62s.4-.32.64-.42a1.95 1.95 0 0 1 2.17.43c.17.18.32.4.43.64a1.92 1.92 0 0 1-.42 2.18 2 2 0 0 1-2.83 0A2.03 2.03 0 0 1 4.96 8Zm-2-1H1.13a2.78 2.78 0 0 0 .7 1.12 2.9 2.9 0 0 0 1.13.7V7Zm5 1a.95.95 0 0 0-.08-.38 1.1 1.1 0 0 0-.2-.32 1 1 0 0 0-1.71.7c0 .14.02.27.07.4.05.11.12.22.21.31.09.1.2.16.31.21.12.05.26.07.4.08a.97.97 0 0 0 .7-.29c.1-.09.17-.2.22-.32A.85.85 0 0 0 7.96 8Zm3 .83a2.78 2.78 0 0 0 1.12-.7 2.9 2.9 0 0 0 .7-1.13h-1.82v1.83Zm-6 3.17v-.04c0-.27.06-.52.17-.76.1-.23.25-.44.43-.62s.4-.32.64-.42a1.96 1.96 0 0 1 2.17.43c.17.18.32.4.43.64a1.92 1.92 0 0 1-.42 2.18 2 2 0 0 1-3.26-.63c-.1-.24-.15-.5-.16-.78Zm-2-1H1.13a2.78 2.78 0 0 0 .7 1.12 2.9 2.9 0 0 0 1.13.7V11Zm5 1a.95.95 0 0 0-.08-.38 1.1 1.1 0 0 0-.2-.32 1 1 0 0 0-1.63 1.1c.04.11.11.22.2.31.09.1.2.16.31.21.12.05.26.07.4.08a.97.97 0 0 0 .7-.29c.1-.09.17-.2.22-.32a.85.85 0 0 0 .08-.39Zm3 .83a2.78 2.78 0 0 0 1.12-.7 2.9 2.9 0 0 0 .7-1.13h-1.82v1.83Z" fill-opacity=".83"/></svg>',notificationTravel:Mo(),notificationHealth:Vo.Z,weather:Da(),finance:ta(),traffic:'<svg viewBox="0 0 16 13" width="16" height="16"><path d="M12.84 0c.21 0 .42.03.61.1a2.01 2.01 0 0 1 1.28 1.27l.13.36.24.73a190.94 190.94 0 0 1 .81 2.45l.09.26V9a.97.97 0 0 1-.3.71 1 1 0 0 1-.7.29h-1a.97.97 0 0 1-.4-.08 1.1 1.1 0 0 1-.31-.2 1.1 1.1 0 0 1-.21-.33A.97.97 0 0 1 13 9h-1v3a.97.97 0 0 1-.3.71 1 1 0 0 1-.7.29h-1a.97.97 0 0 1-.4-.08 1.1 1.1 0 0 1-.31-.2 1.1 1.1 0 0 1-.21-.33A.97.97 0 0 1 9 12H3a.97.97 0 0 1-.3.71A1 1 0 0 1 2 13H1a.97.97 0 0 1-.4-.08 1.1 1.1 0 0 1-.31-.2 1.1 1.1 0 0 1-.21-.33A.97.97 0 0 1 0 12V8.17l.09-.26a81.48 81.48 0 0 1 .8-2.45l.25-.73.13-.36a1.94 1.94 0 0 1 .72-.99A1.96 1.96 0 0 1 3.16 3h1.57l.54-1.63a1.94 1.94 0 0 1 .72-.99A1.96 1.96 0 0 1 7.16 0h5.68ZM7.16 1a.98.98 0 0 0-.95.68L5.79 3h8.44l-.44-1.32a.97.97 0 0 0-.94-.68H7.16Zm-4 3a.98.98 0 0 0-.95.68L1.79 6h8.44l-.44-1.32a.98.98 0 0 0-.36-.48.92.92 0 0 0-.57-.2H3.16ZM1 11h1.94l1-2h4.12l1 2H11V8.33l-.03-.1-.08-.23-.1-.3a10.92 10.92 0 0 0-.24-.7h-9.1a10.25 10.25 0 0 1-.14.38l-.1.32-.1.3-.08.23-.03.1V11Zm6.94 0-.5-1H4.56l-.49 1h3.88ZM15 8V5.33l-.03-.1-.08-.23-.1-.3a10.92 10.92 0 0 0-.24-.7h-3.98l.09.18.07.19L11.95 8H15Zm-1.5-3.13c.17 0 .32.07.44.2.12.11.19.26.19.43a.6.6 0 0 1-.2.45.6.6 0 0 1-.43.17.62.62 0 0 1-.45-.17.62.62 0 0 1-.18-.45.6.6 0 0 1 .18-.44.6.6 0 0 1 .45-.18Zm-11 4.25a.62.62 0 0 1-.45-.17.62.62 0 0 1-.17-.45.6.6 0 0 1 .17-.44.6.6 0 0 1 .45-.19c.17 0 .32.07.44.2.12.11.19.26.19.43a.6.6 0 0 1-.2.45.6.6 0 0 1-.43.18Zm7 0a.62.62 0 0 1-.45-.17.62.62 0 0 1-.18-.45.6.6 0 0 1 .18-.44.6.6 0 0 1 .45-.19c.17 0 .32.07.44.2.12.11.19.26.19.43a.6.6 0 0 1-.2.45.6.6 0 0 1-.43.18Z"/></svg>',horoscope:'<svg width="16" height="16" viewBox="0 0 2048 2048"><path d="M1024 0q141 0 272 36t245 103 207 160 160 208 103 245 37 272q0 141-36 272t-103 245-160 207-208 160-245 103-272 37q-141 0-272-36t-245-103-207-160-160-208-103-244-37-273q0-141 36-272t103-245 160-207 208-160T751 37t273-37zm-64 1789q-71-5-134-23t-129-47l-64 111q155 76 327 88v-129zm128 129q172-12 327-88l-64-111q-65 28-128 46t-135 24v129zm-64-254q88 0 170-23t153-64 129-100 100-130 65-153 23-170q0-88-23-170t-64-153-100-129-130-100-153-65-170-23q-88 0-170 23t-153 64-129 100-100 130-65 153-23 170q0 88 23 170t64 153 100 129 130 100 153 65 170 23zM259 960q5-71 23-134t47-129l-111-64q-76 155-88 327h129zm-129 128q12 172 88 327l111-64q-28-65-46-128t-24-135H130zm958-829q71 5 134 23t129 47l64-111q-155-76-327-88v129zM960 130q-172 12-327 88l64 111q65-28 128-46t135-24V130zm829 958q-5 71-23 134t-47 129l111 64q76-155 88-327h-129zm129-128q-12-172-88-327l-111 64q28 65 46 128t24 135h129zm-152-438q-97-143-240-240l-64 111q57 38 106 87t87 106l111-64zM522 282q-143 97-240 240l111 64q38-57 87-106t106-87l-64-111zM282 1526q97 143 240 240l64-111q-57-38-106-87t-87-106l-111 64zm1244 240q143-97 240-240l-111-64q-38 57-87 106t-106 87l64 111zm-278-966q46 0 87 17t71 48 48 72 18 87q0 46-17 87t-48 71-72 48-87 18q0 46-17 87t-48 71-72 48-87 18q-46 0-87-17t-71-48-48-72-18-87q-46 0-87-17t-71-48-48-72-18-87q0-46 17-87t48-71 72-48 87-18q0-46 17-87t48-71 72-48 87-18q46 0 87 17t71 48 48 72 18 87zm-448 320q40 0 68-28t28-68q0-40-28-68t-68-28q-40 0-68 28t-28 68q0 40 28 68t68 28zm224 224q40 0 68-28t28-68q0-40-28-68t-68-28q-40 0-68 28t-28 68q0 40 28 68t68 28zm0-448q40 0 68-28t28-68q0-40-28-68t-68-28q-40 0-68 28t-28 68q0 40 28 68t68 28zm224 224q40 0 68-28t28-68q0-40-28-68t-68-28q-40 0-68 28t-28 68q0 40 28 68t68 28z"/></svg>',qna:va(),recipe:ba.Z,onthisday:'<svg width="16" height="16" viewBox="0 0 2048 2048"><path d="M1544 128q75 0 143 30t120 82 82 120 31 144v1040q0 75-30 143t-82 120-120 82-144 31H504q-75 0-143-30t-120-82-82-120-31-144V504q0-75 30-143t82-120 120-82 144-31h1040zM507 256q-50 0-95 20t-80 55-55 80-21 96v5h1536v-5q0-50-20-95t-55-80-80-55-96-21H507zm1034 1536q50 0 95-20t80-55 55-80 21-96V640H256v901q0 50 20 95t55 80 80 55 96 21h1034zm-69-683q0 18-8 34t-23 28l-187 142 72 229q4 11 4 24 0 32-21 54t-53 23q-12 0-23-3t-22-11l-187-141-187 141q-10 8-21 11t-24 3q-32 0-53-22t-21-55q0-13 4-24l72-229-187-142q-14-11-22-27t-9-35q0-31 21-55t54-24h231l71-229q8-24 26-39t45-15q26 0 44 15t27 39l71 229h231q16 0 29 6t24 18 16 26 6 29z"/></svg>',reactions:Aa(),comments:'<svg width="16" height="16" viewBox="0 0 16 15"><path d="M0 0h16v11H5.71L2 14.71V11H0V0Zm15 10V1H1v9h2v2.29L5.29 10H15Z"/></svg>',feedsettings:So,genericelection:'<svg viewBox="0 0 2048 2048" width="16" height="16"><path d="M448 2048q-39 0-74-15t-61-41-42-62-15-74V320q0-39 15-74t41-61 62-42 74-15h203q10-29 28-52t42-41 52-26 59-9h384q31 0 59 9t52 26 42 40 28 53h203q39 0 74 15t61 41 42 62 15 74v1536q0 39-15 74t-41 61-62 42-74 15H448zm768-1792q26 0 45-19t19-45q0-26-19-45t-45-19H832q-26 0-45 19t-19 45q0 26 19 45t45 19h384zm384 1664q26 0 45-19t19-45V320q0-26-19-45t-45-19h-203q-10 29-28 52t-42 41-52 26-59 9H832q-31 0-59-9t-52-26-42-40-28-53H448q-26 0-45 19t-19 45v1536q0 26 19 45t45 19h1152zM512 872q0-26 19-45t45-19q14 0 27 7t25 16 22 21 20 19l181-180q19-19 45-19t45 19 19 45q0 26-19 45l-224 224q-19 19-45 19-24 0-43-17l-96-87q-11-9-16-21t-5-27zm640 24q-26 0-45-19t-19-45q0-26 19-45t45-19h320q26 0 45 19t19 45q0 26-19 45t-45 19h-320zm-640 616q0-26 19-45t45-19q14 0 27 7t25 16 22 21 20 19l181-180q19-19 45-19t45 19 19 45q0 26-19 45l-224 224q-19 19-45 19-24 0-43-17l-96-87q-11-9-16-21t-5-27zm640 24q-26 0-45-19t-19-45q0-26 19-45t45-19h320q26 0 45 19t19 45q0 26-19 45t-45 19h-320z"/></svg>',topstories:na(),industrynewscard:aa(),recommendedcardfeed:'<svg width="16" height="16" viewBox="0 0 16 16"><path fill-opacity=".83" d="M1.6 1.6h5.6v5.6H1.6zM8.8 1.6h5.6v5.6H8.8zM8.8 8.8h5.6v5.6H8.8zM1.6 8.8h5.6v5.6H1.6z"/></svg>',linkedincard:Ko.Z,rewards:wa(),travel:Mo(),inspiration:Yo.Z,personalizedoffers:sa,marketPlace:La.Z,contentrecommendations:'<svg width="16" height="16"><path d="M8 0a4.89 4.89 0 0 1 3.53 1.46c.3.3.56.65.78 1.02A4.98 4.98 0 0 1 13 5c0 .36-.04.7-.13 1.02a4.81 4.81 0 0 1-.37.98L8 16 3.5 7a4.91 4.91 0 0 1-.37-.97A4.37 4.37 0 0 1 3 5a4.89 4.89 0 0 1 1.46-3.53A5.27 5.27 0 0 1 5.48.69 4.97 4.97 0 0 1 8 0Zm3.72 6.61v-.02a3.4 3.4 0 0 0 .4-1.59 4.07 4.07 0 0 0-1.2-2.91A4.25 4.25 0 0 0 9.6 1.2 4.1 4.1 0 0 0 8 .88a4.07 4.07 0 0 0-2.91 1.2c-.38.39-.67.82-.89 1.32A4.1 4.1 0 0 0 3.87 5a3.37 3.37 0 0 0 .4 1.6h.01L8 14.06l3.72-7.44ZM8 2.06c.4 0 .79.08 1.14.23a2.95 2.95 0 0 1 1.56 1.56 2.88 2.88 0 0 1 0 2.29A2.95 2.95 0 0 1 9.16 7.7 3.16 3.16 0 0 1 8 7.94c-.4 0-.79-.08-1.14-.23A2.95 2.95 0 0 1 5.3 6.15 3.16 3.16 0 0 1 5.06 5c0-.4.08-.79.23-1.14A2.95 2.95 0 0 1 6.85 2.3 3.16 3.16 0 0 1 8 2.06Zm0 5a1.95 1.95 0 0 0 1.46-.6 2.13 2.13 0 0 0 .44-.66 2.11 2.11 0 0 0 0-1.6 1.96 1.96 0 0 0-.44-.66 2.13 2.13 0 0 0-.66-.44 2.13 2.13 0 0 0-.8-.16 1.95 1.95 0 0 0-1.46.6 2.13 2.13 0 0 0-.44.66 2.13 2.13 0 0 0-.16.8 2.08 2.08 0 0 0 .6 1.46 2.15 2.15 0 0 0 1.46.6Z"/></svg>',connecttoxbox:'<svg width="16" height="16" viewBox="0 0 16 16"><path d="M8 .04a7.9 7.9 0 0 1 7.67 5.84 7.7 7.7 0 0 1 .01 4.24 7.77 7.77 0 0 1-2.05 3.51 7.3 7.3 0 0 1-1.6 1.24c-.6.34-1.24.6-1.91.8a7.7 7.7 0 0 1-4.24.01 7.77 7.77 0 0 1-3.51-2.05 7.3 7.3 0 0 1-1.25-1.6c-.33-.6-.6-1.24-.8-1.91a7.7 7.7 0 0 1 0-4.24 7.77 7.77 0 0 1 2.05-3.51 7.3 7.3 0 0 1 1.6-1.25c.6-.33 1.24-.6 1.91-.8A7.7 7.7 0 0 1 8 .05ZM4.29 1.99l.03.02c.18-.04.35-.06.5-.06.25 0 .52.03.8.09s.56.14.83.25A11.16 11.16 0 0 1 7.98 3h.04a6.2 6.2 0 0 1 1.53-.72c.3-.1.58-.18.86-.24A3.55 3.55 0 0 1 11.67 2l.03-.02v-.03A6.94 6.94 0 0 0 8 .92a7 7 0 0 0-3.7 1.03L4.29 2ZM2.4 12.27a1.68 1.68 0 0 1-.07-.49c0-.32.06-.67.18-1.07.13-.4.3-.81.5-1.25.21-.44.45-.87.71-1.31a33.36 33.36 0 0 1 1.62-2.4l.7-.9.01-.02V4.8a24.7 24.7 0 0 0-.79-.73 10.3 10.3 0 0 0-1.04-.79c-.19-.11-.36-.2-.53-.27a1.25 1.25 0 0 0-.57-.1.2.2 0 0 0-.1.04 6.58 6.58 0 0 0-1.56 2.32A6.28 6.28 0 0 0 .92 8a7.07 7.07 0 0 0 1.44 4.3h.04v-.03ZM8 15.09a7.14 7.14 0 0 0 4.66-1.75.62.62 0 0 0 .16-.26 1 1 0 0 0 .05-.3c0-.3-.1-.63-.27-1-.18-.37-.4-.75-.69-1.15A21.05 21.05 0 0 0 8.85 7.3c-.32-.29-.6-.52-.83-.7h-.04a23.9 23.9 0 0 0-3.88 4.02c-.3.4-.53.8-.7 1.16-.17.37-.26.7-.27 1 0 .1.02.2.05.3.03.1.08.18.16.26.1.1.2.19.33.28l.36.25A7.35 7.35 0 0 0 8 15.09Zm5.64-2.8a6.95 6.95 0 0 0 1.3-5.68 7.68 7.68 0 0 0-1.06-2.58 7.7 7.7 0 0 0-.9-1.08c-.02-.02-.06-.03-.1-.04h-.1c-.15 0-.3.03-.47.1a3.81 3.81 0 0 0-1.06.64 22.25 22.25 0 0 0-.96.83c-.13.13-.24.24-.34.32v.01l-.01.02v.01a99.47 99.47 0 0 1 1.52 2.04 22.61 22.61 0 0 1 1.5 2.56c.22.42.38.84.5 1.24.13.4.2.77.2 1.1 0 .17-.02.33-.07.49l.01.03h.04Z"/></svg>',gamingcards:Co,followedListNav:Fo(),blockedListNav:ma(),sourceNavItem:na(),topicNavItem:To(),localday:'<svg viewBox="0 0 2048 2048" width="16" height="16"><path d="M128 895q0-124 32-238t90-214 140-181 181-138 214-89 239-32q124 0 239 31t214 89 181 139 140 180 90 214 32 239q0 91-17 178t-52 169-85 156-115 138l-448 439q-36 35-82 54t-97 19q-51 0-97-19t-82-54l-448-439q-130-128-199-293t-70-348zm896 1024q52 0 90-36l448-438q111-109 170-252t60-298q0-106-27-204t-78-184-120-154-155-119-183-77-205-27q-106 0-204 27t-184 77-155 119-120 155-77 183-28 205q0 77 15 152t45 146 73 133 98 118l447 438q18 18 41 27t49 9zM640 896v-8q0-78 31-146t84-120 122-80 147-30q80 0 150 30t122 82 82 122 30 150q0 80-30 150t-82 122-122 82-150 30q-80 0-150-30t-122-82-82-122-30-150zm640 0v-5q0-52-21-97t-56-80-81-54-98-20q-53 0-99 20t-81 55-55 82-21 99q0 53 20 99t55 81 81 55 100 21q52 0 99-20t81-55 55-81 21-100z"/></svg>',polls:ua.Z};var Fa=i(26993);const Ra={behavior:de.wu.Show};function Na(e,t,i,n,o){const{localizedStrings:a,stickyHeaderHeightPx:s}=e;let r;switch(o){case"AADSetting":r=Ua(e,i,n,!0);break;case"Setting":r=Ua(e,i,n);break;case"Notification":r=ja.call(this,e,i,n);break;case"MyInterests":r=za.call(this,e,t,i,n,o),r.navItems=r.navItems.filter((e=>e.id!==zn.S.sectionIds.notification));break;default:r=za.call(this,e,t,i,n,o)}const l=function(e,t){const i=Ya({name:di,type:de.c9.ActionButton,behavior:de.wu.Open},e,t).getMetadataTag(),n=Ya({name:ci,type:de.c9.ActionButton,behavior:de.wu.Close},e,t).getMetadataTag();return{navigationMenuTelemetryTag:i,navigationMenuDismissTelemetryTag:n}}(i,n);return{sidePaneLayoutTitle:null==a?void 0:a.sideNavigationTitle,sidePaneTreeViewData:r,sidePaneMenuTelemetryTags:l,stickyHeaderHeightPx:s||zn.S.defaultStickyHeaderHeightPx}}function Ua(e,t,i,n=!1){const{root:o,Market:a}=zn.S.sdSettingsSectionIds,{heading:s}=e.localizedStrings.settings,{marketSettingsHeading:r}=e.localizedStrings,l=Ya(Object.assign({name:Qt},Ra),t,i),d=Ya(Object.assign({name:Zt},Ra),l,i),c=Ya(Object.assign({name:Jt},Ra),l,i),u=Ya(Object.assign({name:Yt},Ra),l,i),h=Ya(Object.assign({name:Kt},Ra),l,i),g=Ya(Object.assign({name:ui},Ra),l,i),p=Ya({name:"AccountLinking",type:de.c9.Module},l,i),m=[{id:o,display:s,glyphStart:Co,childItems:Wa(e.sdSettingCards,e.localizedStrings.settings,zn.S.SdSettingsOrder,zn.S.sdSettingsSectionIds,d,i),telemetryTag:d.getMetadataTag()}];return e.feedSettingCards&&m.unshift({id:zn.S.feedSettingsSectionIds.root,display:e.localizedStrings.feedSettings&&e.localizedStrings.feedSettings.heading,glyphStart:So,childItems:Wa(e.feedSettingCards,e.localizedStrings.feedSettings,zn.S.FeedSettingsOrder,zn.S.feedSettingsSectionIds,c,i),telemetryTag:c.getMetadataTag()}),e.productivitySettingCards&&m.push({id:zn.S.productivitySettingsSectionIds.root,display:e.localizedStrings.productivitySettings&&e.localizedStrings.productivitySettings.heading,glyphStart:Fa.Z,childItems:Wa(e.productivitySettingCards,e.localizedStrings.productivitySettings,zn.S.ProductivitySettingsOrder,zn.S.productivitySettingsSectionIds,u,i),telemetryTag:u.getMetadataTag()}),e.gamingSettingCards&&m.push({id:zn.S.gamingSettingsSectionIds.root,display:e.localizedStrings.gamingSettings&&e.localizedStrings.gamingSettings.heading,glyphStart:'<svg viewBox="0 0 16 13" width="16" height="16"><path d="M6.27 5.93H5.4v-.86a.4.4 0 1 0-.8 0v.86h-.87a.4.4 0 1 0 0 .8h.87v.87a.4.4 0 1 0 .8 0v-.87h.87a.4.4 0 1 0 0-.8zm4.4.74a.67.67 0 1 0 0 1.33.67.67 0 0 0 0-1.33zm1.33-2A.67.67 0 1 0 12 6a.67.67 0 0 0 0-1.33zm3.9 5.5v-.03l-1.24-4.98v-.01A4.2 4.2 0 0 0 10.69 2H5.33c-1.8 0-3.4 1.28-3.95 3.15L.11 10.14a2.53 2.53 0 0 0 .72 2.63c.4.37.87.57 1.32.57l.27-.02c.54-.1 1.08-.45 1.6-1.08l.01-.02.01-.01 1.35-1.57A1.92 1.92 0 0 1 7 10h2.03c.22 0 .48 0 .71.08.26.08.49.22.72.53l.02.02 1.44 1.58.01.02c.55.63 1.1.98 1.64 1.08l.27.02c.45 0 .9-.2 1.3-.54l.02-.02h.01c.42-.42.67-.84.78-1.26.05-.19.08-.37.08-.56 0-.26-.04-.52-.12-.79zm-.92 1.07c-.06.22-.2.47-.5.8-.28.23-.47.28-.64.29l-.11-.01c-.23-.04-.6-.22-1.06-.77h-.01l-.01-.02-.02-.01-1.4-1.55a2.43 2.43 0 0 0-1.2-.85C9.62 9 9.25 9 9.03 9H6.97a2.93 2.93 0 0 0-2.3.94h-.02v.01l-.01.02-1.37 1.58v.01l-.02.01c-.42.54-.78.71-1 .75h-.1c-.18 0-.39-.06-.68-.3A1.54 1.54 0 0 1 1 10.87c0-.15.02-.3.07-.45v-.02l1.27-4.97C2.8 3.93 4.02 3 5.34 3h5.35a3.2 3.2 0 0 1 3 2.42l1.23 4.95v.03l.01.02c.06.2.09.38.09.52 0 .11-.01.21-.04.3z"/></svg>',childItems:Wa(e.gamingSettingCards,e.localizedStrings.gamingSettings,zn.S.GamingSettingsOrder,zn.S.gamingSettingsSectionIds,h,i),telemetryTag:h.getMetadataTag()}),(0,ct.Yq)().IsChinaCompliance||m.unshift({id:a,display:r||"Language & content",glyphStart:To(),telemetryTag:g.getMetadataTag()}),n&&m.unshift({id:zn.S.accountLinkingSettingsSectionIds.root,display:e.localizedStrings.accountLinkingSettingStrings&&e.localizedStrings.accountLinkingSettingStrings.heading,glyphStart:xo.Z,telemetryTag:p.getMetadataTag()}),{navItems:m,telemetryTag:l.getMetadataTag()}}function ja(e,t,i){const n=[],o=Ya(Object.assign({name:Qt},Ra),t,i);return e.enableNotificationExperience&&n.push(Ba(e,o,i,this.strings)),{navItems:n,telemetryTag:o.getMetadataTag()}}function Ba(e,t,i,n,o){var a;const{notification:s}=zn.S.sectionIds,{enableNotificationExperience:r,notification:l}=e;if(!r)return null;const d=Ya(Object.assign({name:mi},Ra),t,i);return{id:s,display:null===(a=null==n?void 0:n.notification)||void 0===a?void 0:a.cardName,glyphStart:Ja(Ha.notificationBell),telemetryTag:Ya(Object.assign({name:mi},Ra),t,i).getMetadataTag(),childItems:Ga(l,n.notification,d,i),showDivider:o}}function za(e,t,i,n,o){var a,s;const{discoverInterests:r,savedStories:l,readStories:d,tuneFeed:c,followedList:u,blockedList:h,refreshPage:g}=zn.S.sectionIds,{localizedStrings:p,enableSavedStoriesExperience:m,enableReadStoriesExperience:f,enableNotificationExperience:v,childExperienceReferencesWC:y}=e,{discoverTopicsListSectionTitle:b,savedStoriesSectionHeader:S,readStoriesSectionHeader:w,tuneFeedButtonTitle:T,followedListSectionTitle:C,blockedListSectionTitle:x,backHeaderText:k}=p||{},$=Ya(Object.assign({name:Qt},Ra),i,n),O=Ya(Object.assign({name:Rt},Ra),$,n),L=Ya(Object.assign({name:yi},Ra),$,n),I=Ya(Object.assign({name:bi},Ra),$,n),A={id:r,display:b,glyphStart:Ja(Ha.discover),childItems:qa(e,t,O,n),telemetryTag:O.getMetadataTag()},E={id:u,display:C,glyphStart:Ja(Ha.followedListNav),childItems:Va(e,$,n),telemetryTag:L.getMetadataTag(),showDivider:!0},M={id:h,display:x,glyphStart:Ja(Ha.blockedListNav),childItems:_a(e,$,n),telemetryTag:I.getMetadataTag(),showDivider:!0},P={id:g,display:k,glyphStart:Ja(Ha.home),telemetryTag:Ya({name:si,behavior:de.wu.Navigate,type:de.c9.ActionButton,content:{headline:k}},$,n).getMetadataTag()},D=e.enableBackToFeedButton?[P,A,E,M]:[A,E,M];return"Personalize"===o&&(m&&D.push({id:l,display:S,glyphStart:Ja(Ha.savedstories),showDivider:!0,telemetryTag:Ya(Object.assign({name:Ut},Ra),$,n).getMetadataTag()}),f&&D.push({id:d,display:w,glyphStart:Ja(Ha.readStories),telemetryTag:Ya(Object.assign({name:jt},Ra),$,n).getMetadataTag()}),e.feedSettingCards&&D.push({id:zn.S.feedSettingsSectionIds.root,display:null===(a=e.localizedStrings)||void 0===a?void 0:a.feedSettings.heading,glyphStart:So,telemetryTag:Ya(Object.assign({name:Jt},Ra),$,n).getMetadataTag()}),D.push({id:zn.S.sdSettingsSectionIds.root,display:null===(s=e.localizedStrings)||void 0===s?void 0:s.settings.heading,glyphStart:Co,telemetryTag:Ya(Object.assign({name:Zt},Ra),$,n).getMetadataTag()})),(null==y?void 0:y.coldStartModal)&&D.push({id:c,display:T,glyphStart:Ja(Ha.open),showDivider:!0,telemetryTag:Ya({name:ai,behavior:de.wu.Open,type:de.c9.FRE,content:{headline:T}},$,n).getMetadataTag()}),v&&D.push(Ba(e,$,n,this.strings,!0)),{navItems:D,telemetryTag:$.getMetadataTag()}}function Ga(e,t,i,n){var o,a;const s=[{id:mn.Rn.AllNotifications,display:null===(a=null===(o=null==t?void 0:t.topics)||void 0===o?void 0:o.General)||void 0===a?void 0:a.menuName,glyphStart:Ja(Ha.notificationGeneral),telemetryTag:Ya(Object.assign({name:mn.Rn.AllNotifications},Ra),i,n).getMetadataTag()}];return(null==e?void 0:e.children)&&e.children.forEach((e=>{var o;s.push({id:e.type,display:(null===(o=t.topics[e.name])||void 0===o?void 0:o.topicName)||"",glyphStart:Ja(Ha[`notification${e.name}`]),telemetryTag:Ya(Object.assign({name:e.type},Ra),i,n).getMetadataTag()})})),s}function qa(e,t,i,n){const{iconsMapping:o}=e,{topicListIds:a,topicListMap:s}=t,r=[];if(!a)return r;const l=a.map((e=>{const t=s[e],a=Ya(Object.assign({name:t.title},Ra),i,n).getMetadataTag();return{display:t.title,id:e,glyphStart:Ja(Ha[o[t.title]]),telemetryTag:a}}));return r.concat(l)}function Va(e,t,i){const{localizedStrings:n}=e,{followedInterests:o,followedPublishers:a}=zn.S.sectionIds;return[{id:a,display:n.followedListSourceNavItem,glyphStart:Ja(Ha.sourceNavItem),telemetryTag:Ya(Object.assign({name:_t},Ra),t,i).getMetadataTag()},{id:o,display:n.followedListTopicNavItem,glyphStart:Ja(Ha.topicNavItem),telemetryTag:Ya(Object.assign({name:Ft},Ra),t,i).getMetadataTag()}]}function _a(e,t,i){const{enableHiddenTopicsExperience:n,localizedStrings:o}=e,{hiddenTopics:a,mutedPublishers:s}=zn.S.sectionIds,r=[{id:s,display:o.followedListSourceNavItem,glyphStart:Ja(Ha.sourceNavItem),telemetryTag:Ya(Object.assign({name:Wt},Ra),t,i).getMetadataTag()}];return n&&r.push({id:a,display:o.followedListTopicNavItem,glyphStart:Ja(Ha.topicNavItem),telemetryTag:Ya(Object.assign({name:vi},Ra),t,i).getMetadataTag()}),r}function Wa(e,t,i,n,o,a){const s=[];return i.forEach((i=>{if(e&&e[i]&&Za(t,i)){const e=n[i],r=Za(t,i),l=Ya(Object.assign({name:r},Ra),o,a).getMetadataTag();s.push({display:r,id:e,glyphStart:Ja(Ha[i.toLowerCase()]),telemetryTag:l})}})),s}function Za(e,t){return e&&e.settingCardDict&&e.settingCardDict[t]&&e.settingCardDict[t].cardName}function Ja(e){return e||""}function Ya(e,t,i){const n=`${t.contract.name}-${e.name}`;return i[n]||(i[n]=t.addOrUpdateChild(e)),i[n]}var Ka=i(35928);var Xa=i(65932);class Qa extends Kn.l{constructor(){super(),this.viewportChangeHandler=e=>{this.useStickyHeaderHeightSmallScreen=this.config.stickyHeaderSmallScreenHeightPx&&(e===at.c1||e===at.c2)},this.handleClick=e=>{var t;if(!this.marketSelectorRef||!(null===(t=this.marketSelectorRef)||void 0===t?void 0:t.select.open))return;const i=e.path.some((e=>e instanceof Node&&this.marketSelectorRef.shadowRoot.contains(e)));!this.marketSelectorRef.select.open||i||(this.marketSelectorRef.select.open=!1)},this.mapInterestsData=async()=>{var e;const t=(null===(e=this.context)||void 0===e?void 0:e.pageType)||"Personalize",{interestsRiverData:i,sidePaneLayoutData:n}=this.mapPersonalizeData(t);if(this.interestsData={interestsRiverData:i,interestsPageType:t,sidePaneLayoutData:n,rootTelemetryObject:(0,Pn.Z)(this.interestsTelemetryObject)?null:this.interestsTelemetryObject,trackAppErrorEvent:this.onAppError,postCardActionStatus:this.postCardActionStatus,resetNonTopicFetchingStatesCallback:this.resetNonTopicFetchingStatesCallback,getScrollToSection:this.sectionScrollTo&&this.getScrollToSection,updateSegmentCardsEnabledStatus:this.updateSegmentCardsEnabledStatusData,updateFeedSettingsOptOutStatus:this.updateFeedSettingsOptOutStatusData,updateProductivityCardsEnabledStatus:this.updateProductivitySettingsEnableStatusData,updateGamingCardsEnabledStatus:this.updateGamingSettingsEnableStatusData,getPdpUserPreference:this.getPdpUserPreference,searchData:this.getSearchData()},this.triggerTtvrMarker(t),this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{settings:this.interestsData.interestsRiverData.settings}),this.setInterestsRiverBottomPadding(),this.interestsData&&!1===this.navTreeFocus){await function(e=1){return(0,T.mG)(this,void 0,void 0,(function*(){for(let t=0;t<e;t++)yield(0,ot.Kb)(0)}))}();const e=this.shadowRoot.querySelector("fluent-tree-item");e&&(e.focus(),this.navTreeFocus=!0)}ki.SO.queueUpdate((()=>{this.cardActionRef&&this.cardActionRef.ref||(this.cardActionRef.ref=this.shadowRoot.querySelector("card-action"))}))},this.triggerTtvrMarker=e=>{var t,i,n,o,a,s,r;const{interestsRiverData:l}=this.interestsData;if(!this.ttvrFired&&l){let d=!1;switch(e){case"MyInterests":d=!(!(null===(i=null===(t=l.discoverSectionData)||void 0===t?void 0:t.topicSections)||void 0===i?void 0:i.length)&&!(null===(a=null===(o=null===(n=l.followedListSectionData)||void 0===n?void 0:n.followedTopicsSectionData)||void 0===o?void 0:o.followedTopics)||void 0===a?void 0:a.length));break;case"MySaves":d=!!l.savedStoriesSectionData;break;case"History":d=!!l.readStoriesSectionData;break;case"AADSetting":case"Setting":d=!!(null===(r=null===(s=l.settings)||void 0===s?void 0:s.cards)||void 0===r?void 0:r.length);break;case"Notification":d=!!l.notification;break;default:return void(this.ttvrFired=!0)}d&&(this.setVisuallyReadyMarkers(),this.ttvrFired=!0)}},this.setVisuallyReadyMarkers=()=>{window.requestAnimationFrame((async()=>{this.markVisuallyReady()}))},this.sidePaneSticky=!1,this.searchBoxSticky=!1,this.useStickyHeaderHeightSmallScreen=!1,this.notificationSettingMap={},this.discoverSectionsToRender=1,this.isUserMsaAuthenticated=!1,this.sectionIds=new Set,this.renderedDiscoverSections=0,this.needToScroll=!1,this.scrollDebounceTimerMs=50,this.navTreeFocus=!1,this.searchInputValue="",this.expandedTreeItems={[zn.S.sectionIds.discoverInterests]:!0,[zn.S.sdSettingsSectionIds.root]:!0,[zn.S.feedSettingsSectionIds.root]:!0,[zn.S.productivitySettingsSectionIds.root]:!0,[zn.S.gamingSettingsSectionIds.root]:!0,[zn.S.sectionIds.notification]:!0},this.interestsRiverTelemetryObjects={},this.sidePaneLayoutTelemetryObjects={},this.cardActionRef={ref:void 0},this.mutedPublishersChanged=()=>{this.mapInterestsData()},this.followedPublishersChanged=()=>{this.mapInterestsData()},this.savedStoriesChanged=()=>{this.mapInterestsData()},this.readStoriesChanged=()=>{this.mapInterestsData()},this.suggestionsChanged=()=>{this.mapInterestsData()},this.notificationSettingMapChanged=()=>{this.mapInterestsData()},this.onMenuClick=e=>{if(!e||!e.target||!e.currentTarget||e.currentTarget.tagName!=zn.S.treeItemTag)return!0;const t=e.key;if(t&&t!==Nn.kL)return!0;let i=e.target;for(;null!=i&&i.tagName!=zn.S.treeItemTag;)i=i.parentElement;if(null==i)return!0;const n=i.id;return Yn.k.focusItem(i),this.changeSelectedTreeItem(n),n.indexOf(zn.S.sectionIds.refreshPage)>=0&&(0,st.Z)(),n.indexOf(zn.S.sectionIds.tuneFeed)>=0?this.startColdStartExperience():this.scrollToSection(n),this.sidePaneLayoutContainerRef&&this.sidePaneLayoutContainerRef.clientWidth<=zn.S.sidePaneLayoutResponsiveWidth&&(this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{sidePaneVisible:!1})),!1},this.startColdStartExperience=()=>{try{(0,wn._n)().getFreArtifacts().then((e=>{e&&e.subCards&&e.subCards.length&&e.stage?(this.freArtifact=e,this.renderColdStart=!0):((0,Ee.H)(Me.Ay$,"FRE request was made but returned insufficent data to render ColdStart"),this.requestTuneYourFeedToast())})).catch((()=>{this.requestTuneYourFeedToast()}))}catch(e){(0,Ee.OO)(e,Me.HpJ,"Getting data for the required artifacts failed in interests wc when initializing cold start experience"),this.requestTuneYourFeedToast()}},this.coldStartConfirmHandler=()=>{if(this.renderColdStart=!1,this.config.freGoBackToFeed)if(Ka.Nd.getRouteById("myfeed"))Ka.Nd.navigate("myfeed");else{const e=new URL(window.location.href);e.pathname=`/${(0,ct.Yq)().CurrentMarket}/feed/`,window.history.pushState({shouldPush:!0},"",e.toString())}},this.closeColdStart=async()=>{this.renderColdStart=!1,this.freArtifact=null,await this.fetchFollowedPublishers(),await this.fetchTopicsAndUserInterests(),this.mapInterestsData()},this.onExpandedChange=e=>{if(!e.target)return;const t=e.target;this.expandedTreeItems[t.id.replace("menuItem-","")]=t.expanded},this.sidePaneAndSearchBoxScrollHandler=()=>{var e;const t=Math.max(document.documentElement.scrollTop,document.body.scrollTop),i=this.topStickyBreakpoint>=0&&t>this.topStickyBreakpoint,n=this.config.enableStickySearch&&this.topStickyBreakpoint>=0&&t>this.topStickyBreakpoint+zn.S.searchBoxHalfHeight;if(this.sidePaneSticky!==i&&(this.sidePaneSticky=i),this.searchBoxSticky!==n&&(this.searchBoxSticky=n),this.ignoreNextScrollEvent)return this.ignoreNextScrollEvent=!1,void(this.currentScrollTarget&&this.correctScrollPosition(this.currentScrollTarget));const o=this.getHeaderBottom();for(const t of this.sectionIds){let i=this.shadowRoot.getElementById(un.b.removeHyphens(t));if(t===zn.S.sectionIds.discoverInterests&&(i=this.searchBoxRef),t===zn.S.sectionIds.notification&&(i=null==i?void 0:i.firstElementChild),t!==zn.S.sectionIds.followedList&&t!==zn.S.sectionIds.blockedList||(i=null===(e=null==i?void 0:i.shadowRoot)||void 0===e?void 0:e.firstElementChild),i&&this.isSectionVisible(i,o))return void this.changeSelectedTreeItem(`menuItem-${t}`)}},this.sidePaneExpandedHandler=e=>{if(!e.target)return;const t=e.target;this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{sidePaneVisible:null==t?void 0:t.paneVisible})},this.openCardActions=(e,t,i,n)=>{const o=n,a=this.interestsNextState.cardActionStatusMap.get(e)||it.O7.enabled,s={enabled:!0,buttonElement:o.currentTarget,cardStatus:a,article:t,onStatusChange:this.setCardActionState,isUserStoryCardAction:!0,parentTelemetryObject:i};this.cardActionRef.ref.updateCardActionProps(s)},this.onCardActionClick=(e,t,i)=>{const n=(this.interestsNextState.cardActionStatusMap.get(e)||it.O7.enabled)^it.O7.saved;ce.M0.sendActionEvent(i.currentTarget,de.Aw.Click),this.interestsData.postCardActionStatus(i,e,n,t),this.setCardActionState(e,n)},this.setCardActionState=(e,t)=>{const i=this.interestsNextState.cardActionStatusMap;if(i.set(e,t),this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{cardActionStatusMap:i}),t&it.O7.saved){const t=this.savedStories&&this.savedStories.filter((t=>t.id===e)),i=this.readStories&&this.readStories.filter((t=>t.id===e));this.savedStories=t&&t.length||!i||!i.length?this.savedStories:this.savedStories.concat(i)}},this.onScroll=()=>{var e,t;"MySaves"!==(null===(e=this.interestsData)||void 0===e?void 0:e.interestsPageType)&&"History"!==(null===(t=this.interestsData)||void 0===t?void 0:t.interestsPageType)&&this.sidePaneAndSearchBoxScrollHandler()},this.handleSegmentCardsEnabledSwitchClick=(e=null)=>{const t=e.id;if(this.isActionBasedSettingCard(t))return e.dirtyChecked=!1,void this.updateActionBasedSegmentCardEnabledStatus(t);this.updateSegmentCardsEnabledStatus(t,(e=>!e))},this.setTrafficCardEnabledState=(e,t)=>{this.updateSegmentCardsEnabledStatus("Traffic",(t=>e),t)},this.updateProductivitySettingsEnableStatus=e=>{ce.M0.sendActionEvent(e,de.Aw.Click);const t=[],i=this.interestsNextState.settings.productivitySettings;i.cards.forEach((i=>{const n=i.cardType;i.cardType===e.id&&(i.toggleChecked=!i.toggleChecked),n&&t.push({cardType:n,enabled:i.toggleChecked})})),t.length>0&&this.interestsData.updateProductivityCardsEnabledStatus&&(async()=>{await this.interestsData.updateProductivityCardsEnabledStatus(t).then((e=>{e&&this.updateSettingsState({productivitySettings:i})}))})()},this.updateGamingSettingsEnableStatus=e=>{ce.M0.sendActionEvent(e,de.Aw.Click);const t=[],i=this.interestsNextState.settings.gamingSettings;let n,o=!0;i.cards.forEach((i=>{const a=i.cardType;i.cardType===e.id&&(i.toggleChecked=!i.toggleChecked),a&&"GamingCards"!==i.cardType&&t.push({cardType:a,enabled:i.toggleChecked});const s=this.shadowRoot.getElementById("RecentlyPlayedCard");"ConnectToXbox"===i.cardType?n=i.toggleChecked:"GamingCards"===i.cardType&&i.inlineContentsMapping&&i.inlineContentsMapping.cards&&Array.isArray(i.inlineContentsMapping.cards)&&i.inlineContentsMapping.cards.length>0&&i.inlineContentsMapping.cards.forEach((i=>{const a=i.cardType;if("RecentlyPlayedCard"===i.cardType){if("ConnectToXbox"===e.id&&void 0!==n)i.toggleChecked=n,s.checked=n;else if("RecentlyPlayedCard"===e.id){if(i.toggleChecked===s.checked)return void(o=!1);i.toggleChecked=!i.toggleChecked}}else i.cardType===e.id&&(i.toggleChecked=!i.toggleChecked);a&&t.push({cardType:a,enabled:i.toggleChecked})}))})),o&&t.length>0&&this.interestsData.updateGamingCardsEnabledStatus&&(async()=>{await this.interestsData.updateGamingCardsEnabledStatus(t).then((e=>{e&&this.updateSettingsState({gamingSettings:i})}))})()},this.updateFeedSettingsOptOutStatus=e=>{const t=[],i=this.interestsNextState.settings.feedSettings;i.cards.forEach((i=>{const n=this.getOptOutFeedSettingName(i.cardType);i.cardType===e.id&&(i.toggleChecked=!i.toggleChecked),n&&t.push({settingType:n,optedOut:!i.toggleChecked})})),t.length>0&&this.interestsData.updateFeedSettingsOptOutStatus&&(async()=>{await this.interestsData.updateFeedSettingsOptOutStatus(t).then((e=>{e&&this.updateSettingsState({feedSettings:i})}))})()},this.updateActionBasedSegmentCardEnabledStatus=e=>{const t=this.interestsNextState.settings.cards.find((t=>t.cardType==e));if(!t)return void(0,Ee.OO)(new Error(`Null card for actionBasedCardType: ${e}`),Me.aO,"Action-based segment card setting update failed. Card not found");const i=t.toggleChecked;(async()=>{await this.updateActionBasedSegmentCardsEnabledStatusData(e,i).then((e=>{if(e){t.toggleChecked=!i;const e={cards:[...this.interestsNextState.settings.cards]};this.updateSettingsState(e)}}))})()},this.updateNotificationSetting=e=>{const t=e.id,i=e.checked;this.notificationSettingMap=Object.assign({},this.notificationSettingMap,{[t]:i}),e.dirtyChecked=!1,(async()=>{await this.notificationServiceClient.updateNotificationSetting({[t]:i})})()},this.getCardEnabledSettingName=e=>e?`${e.toLowerCase()}CardEnabled`:"",this.getOptOutFeedSettingName=e=>e?`${e.toLowerCase()}OptOut`:"",this.unmuteDialogToggleCallback=(e,t)=>{this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{publisherOnDialog:t}),document.addEventListener("keydown",this.onTabKeydown),this.calcUnmutedPublishersCardFocus(e,t)},this.onTabKeydown=e=>{"Tab"===e.key&&(e.shiftKey?this.shadowRoot.activeElement&&"actionDialogCloseButton"===this.shadowRoot.activeElement.id&&(e.preventDefault(),this.shadowRoot.getElementById("actionDialogCancelButton").focus()):this.shadowRoot.activeElement&&"actionDialogCancelButton"===this.shadowRoot.activeElement.id&&(e.preventDefault(),this.shadowRoot.getElementById("actionDialogCloseButton").focus()))},this.followSourceCallback=async e=>{const{followedSourcesSectionData:t}=this.interestsData.interestsRiverData.followedListSectionData,i=e.target,{followed:n,topicId:o,topicTitle:a,hiddenTopic:s}=i||{};ce.M0.sendActionEvent(e.currentTarget,de.Aw.Click);let r=s;const l=(()=>{if(t){t.publisherCards||(t.publisherCards=[]);const{publisherCards:e}=t,i=null==e?void 0:e.findIndex((e=>e.publisherId===o)),a=i>-1&&e[i];return a&&(a.followed=n),a}})(),d=this.mutedPublishers;let c=!0;try{n&&(await this.publisherServiceClient.publisherUserAction(o,yn.S.Mute,"DELETE"),this.mutedPublishers=this.mutedPublishers&&this.mutedPublishers.filter((e=>e.id!==o))),await this.publisherServiceClient.updateSourceFollowState(o,n),n?((0,fn.bY)(vn.T.InterestsChange),this.fetchFollowedPublishers()):this.followedPublishers=this.followedPublishers.filter((e=>e.publisherId!==o))}catch(e){c=!1,r=!1,n&&(this.mutedPublishers=d),l&&(l.followed=!l.followed);const t=`Error: ${e&&e.message}, Source Id: ${o}, Source Name: ${a}`;this.onAppError(n?Object.assign(Object.assign({},Me._ni),{message:"Failed following source",pb:Object.assign(Object.assign({},Me._ni.pb),{customMessage:t})}):Object.assign(Object.assign({},Me.O0T),{message:"Failed unfollowing source",pb:Object.assign(Object.assign({},Me.O0T.pb),{customMessage:t})}))}this.requestInterestToast(o,a,n,c,r)},this.muteSourceCallback=async e=>{const t=e.target,{topicId:i,cmsProviderId:n,topicTitle:o,followed:a}=t;try{await Promise.all([this.publisherServiceClient.publisherUserAction(n||i,yn.S.Mute,"POST"),this.publisherServiceClient.updateSourceFollowState(i,!1)]),this.followedPublishers=this.followedPublishers.filter((e=>e.publisherId!==i))}catch(e){return this.requestHideTopicToast(i,o,!1,!1,!1,n,!0),void this.onAppError(Object.assign(Object.assign({},Me.aPD),{message:"Failed muting source",pb:Object.assign(Object.assign({},Me.aPD),{customMessage:`Error: ${(0,Ae.n)(e)}. topicId: ${i}. cmsProviderId: ${n}.`})}))}this.requestHideTopicToast(i,o,!0,!0,a,n,!0),await this.fetchMutedPublishers()},this.followedClickedHandler=async(e,t,i)=>{const n=e.target,{topicId:o,topicTitle:a}=n||{};let s;if(i&&this.hiddenTopics&&this.hiddenTopics.find((e=>e.id===o)))s=await this.setHideState(n,t,!1),s?(this.hiddenTopics=this.hiddenTopics.filter((e=>e.id!==o)),s=await this.setFollowState(n,t,i),this.requestInterestToast(o,a,i,s,!0)):this.requestInterestToast(o,a,i,s,!1);else{const e=this.followedTopics;i||(this.followedTopics=this.followedTopics.filter((e=>e.id!==o))),s=await this.setFollowState(n,t,i),s||(this.followedTopics=e),this.requestInterestToast(o,a,i,s,!1)}this.mapInterestsData()},this.setFollowState=async(e,t,i)=>{const{topicId:n,topicTitle:o}=e||{},{topicMap:a}=this.topicsDataConnector.getCurrentState(),s=a[n],r=Object.keys(a).some((e=>a[e].followState===$i.t.Followed));let l,d;r||(l=await this.topicsDataConnector.getOneServiceFollowedTopics());try{let e;e=i?(null==s?void 0:s.isInferred)?await this.topicsDataConnector.followTopic(n,o,!0):await this.topicsDataConnector.followTopic(n,o):await this.topicsDataConnector.unfollowTopic(n),r||(delete l[n],this.restoreDefaultFollowedTopics(Object.keys(l))),d=e}catch(e){this.onAppError(i?Me.UBn.InterestsFollowTopicError:Me.UBn.InterestsUnfollowTopicError),d=!1}return d?(this.updateRepeatedTopicCardInstances(n,i),this.updateTopicListsAfterFollow(n,o,i),!0):(this.restoreTopicCardFollowState(t,n,!i),!1)},this.hideClickHandler=async(e,t,i)=>{const n=e.target,{topicId:o,topicTitle:a}=n||{},{topicMap:s}=this.topicsDataConnector.getCurrentState(),r=s[o];let l;if(i&&(r.followState==$i.t.Followed||this.followedTopics&&this.followedTopics.find((e=>e.id===o)))){const e=this.followedTopics;this.followedTopics=this.followedTopics.filter((e=>e.id!==o)),l=await this.setFollowState(n,t,!1),l?(l=await this.setHideState(n,t,i),this.requestHideTopicToast(o,a,i,l,!0,"")):(this.followedTopics=e,this.requestHideTopicToast(o,a,i,l,!1,""))}else{const e=this.hiddenTopics;l=await this.setHideState(n,t,i),l||(this.hiddenTopics=e),i||(this.hiddenTopics=this.hiddenTopics.filter((e=>e.id!==o))),this.requestHideTopicToast(o,a,i,l,!1,"")}this.mapInterestsData()},this.setHideState=async(e,t,i)=>{const{topicId:n}=e||{};let o;const{topicMap:a}=this.topicsDataConnector.getCurrentState(),s=a[n];try{let e;e=i?await this.topicsDataConnector.setTopicHiddenState(s,!0):await this.topicsDataConnector.setTopicHiddenState(s,!1),o=e}catch(e){this.onAppError(i?Me.dxF:Me.Gm$),o=!1}return o?(this.updateTopicListsAfterHide(s,i),!0):(this.restoreTopicCardHiddenState(t,n,!i),!1)},this.updateTopicListsAfterFollow=(e,t,i)=>{var n,o;let a=null===(n=this.followedTopics)||void 0===n?void 0:n.find((t=>t.id===e));const s=null===(o=this.hiddenTopics)||void 0===o?void 0:o.find((t=>t.id===e));let r=this.topicDataState.topicMap[e];if(!r&&t){const e=Object.entries(this.topicDataState.topicMap).find((e=>e[1].name===t));r=e&&e.length>1&&e[1]}e||a||(a=this.followedTopics.find((e=>e.name===t)),a&&(a.id=r.id)),a?a.followState=i?$i.t.Followed:$i.t.Unfollowed:i&&this.followedTopics.push(Object.assign(Object.assign({},r),{followState:i?$i.t.Followed:$i.t.Unfollowed,hidden:!1})),s&&(s.followState=i?$i.t.Followed:$i.t.Unfollowed)},this.updateTopicListsAfterHide=(e,t)=>{const{id:i}=e,n=this.followedTopics&&this.followedTopics.find((e=>e.id===i)),o=this.hiddenTopics&&this.hiddenTopics.find((e=>e.id===i));e.hidden=t,o?o.hidden=t:this.hiddenTopics.push(Object.assign(Object.assign({},e),{hidden:!0,followState:$i.t.Unfollowed})),n&&(n.hidden=t)},this.restoreFollowedInterestsButtonClickedHandler=async()=>{await this.topicsDataConnector.restoreDefaultTopics(),this.mapInterestsData()},this.topicSelectedHandler=e=>{const t=e.target,{topicId:i}=t||{};this.loadXFeedCallback(i)},this.loadXFeedCallback=e=>{var t,i,n;const o=this.topicsDataConnector.getCurrentState().topicMap[e],{xfeedConfigIndexHref:a,xfeedConfigIndexRef:s}=this.config;(a||s)&&(0,eo.l)().switchPivot({pivotId:e,configIndexHref:a,configIndexRef:s,context:{feedId:e,overwriteBaseApiURL:null===(t=o.apiSource)||void 0===t?void 0:t.baseUrl,forceEnterpriseCompliance:(null===(i=o.apiSource)||void 0===i?void 0:i.id)===Oi.A.work,apiSourceId:null===(n=o.apiSource)||void 0===n?void 0:n.id},telemetryPageName:"Xfeed",display:o.name,branding:o.branding})},this.onAppError=e=>ce.M0.sendAppErrorEvent(e),this.fetchTopicsAndUserInterests=async()=>{const{topicListIds:e,followedTopicIds:t,recommendedTopics:i}=this.topicDataState||{},{enableRecommendedTopics:n}=this.config;return!(!(null==e?void 0:e.length)&&!await this.topicsDataConnector.getTopics(zn.S.ImageSize.TopicCardImageStandardDimensions))&&(!(!t.length&&!await this.topicsDataConnector.getFollowedTopics())&&(n&&!i.length&&await this.topicsDataConnector.getRecommendedTopics(),this.topicsAndInterestsLoaded=!0,this.mapInterestsData(),!0))},this.fetchFollowedPublishers=async()=>{this.publisherServiceClient=this.publisherServiceClient||new yn.b(window.fetch.bind(window));try{const e=await this.publisherServiceClient.getUserFollowedSources();this.followedPublishers=e.sort(((e,t)=>e.displayName.localeCompare(t.displayName,e.locale,{sensitivity:"base"}))).map((e=>Object.assign(Object.assign({},this.mapPublisher(e)),{followed:!0})))}catch(e){this.onAppError(Object.assign(Object.assign({},Me.SSg),{message:"Failed fetching followed publishers"}))}},this.fetchMutedPublishers=async()=>{this.publisherServiceClient=this.publisherServiceClient||new yn.b(window.fetch.bind(window));try{const e=await this.publisherServiceClient.getUserMutedPublishers();this.mutedPublishersLoaded=!0,this.mutedPublishers!==e&&(this.mutedPublishers=e)}catch(e){this.onAppError(Object.assign(Object.assign({},Me.UBn.InterestsRetrieveMutedPublishersError),{message:"Failed fetching muted publishers.",pb:Object.assign(Object.assign({},Me.UBn.InterestsRetrieveMutedPublishersError),{customMessage:`Error: ${(0,Ae.n)(e)}.`})})),this.mutedPublishersError=!0,this.mutedPublishersLoaded=!0,this.mutedPublishers=[]}},this.fetchHiddenTopics=async()=>{const{hiddenTopics:e}=this.topicDataState||{};e&&e.length||(await this.topicsDataConnector.getHiddenTopics(),this.mapInterestsData())},this.fetchSavedStories=async()=>{let e;this.userStoriesServiceClient=this.userStoriesServiceClient||new Mn(this.config.cardProviderConfig);try{e=await this.userStoriesServiceClient.getUserStoriesFromFeed(In.SavedContent,!0),this.savedStoriesLoaded=!0}catch(e){return this.onAppError(Me.UBn.InterestsRetrieveSavedStoriesError),!1}return this.savedStories=null==e?void 0:e.cardMetadata,!!(e&&e.cardMetadata&&e.cardMetadata.length)},this.fetchNotificationSetting=async()=>{const e=async()=>{var e;this.notificationServiceClient=this.notificationServiceClient||new mn.IL;const t=await this.notificationServiceClient.getNotificationSetting();if(!t||!t.featureLevelSettings)return void this.onAppError(Object.assign(Object.assign({},Me.MPp.WCSettingFetchError),{message:`Error while fetching notification settings, response data is null: ${JSON.stringify(t)}`}));const i={};for(const e in mn.Rn)i[e]=!0;for(const n in t.featureLevelSettings)i[n]=null===(e=t.featureLevelSettings[n])||void 0===e?void 0:e.isConsumptionAllowed;this.notificationSettingMap=i};e(),this.updateNotificationTrigger=this.updateNotificationTrigger||e},this.fetchReadStories=async()=>{let e;this.userStoriesServiceClient=this.userStoriesServiceClient||new Mn(this.config.cardProviderConfig);try{e=await this.userStoriesServiceClient.getUserStoriesFromFeed(In.ReadHistory,!0),this.readStoriesLoaded=!0}catch(e){return this.onAppError(Object.assign(Object.assign({},Me.UBn.InterestsRetrieveReadStoriesError),{message:e.toString()})),!1}return this.readStories=null==e?void 0:e.cardMetadata,!!(e&&e.cardMetadata&&e.cardMetadata.length)},this.mapSettingCardsData=()=>{var e;const{localizedStrings:t}=this.config;return{heading:(null===(e=null==t?void 0:t.settings)||void 0===e?void 0:e.heading)||"",cards:this.settingCards||this.initializeSettingCards(),sectionId:un.b.removeHyphens(zn.S.sdSettingsSectionIds.root),emptyListMessage:this.settingLoaded?null==t?void 0:t.informationCardEmptyListMessage:null==t?void 0:t.sectionLoadingMessage,feedSettings:this.mapFeedSettingCardsData(),productivitySettings:this.mapProductivitySettingCardsData(),gamingSettings:this.mapGamingSettingCardsData()}},this.mapFeedSettingCardsData=()=>{if(!this.config.feedSettingCards)return;return{heading:this.strings.feedSettings&&this.strings.feedSettings.heading||"",cards:this.feedSettingCards||this.initializeFeedSettingCards(),sectionId:un.b.removeHyphens(zn.S.feedSettingsSectionIds.root),emptyListMessage:this.settingLoaded?this.strings.feedSettingsEmptyListMessage:this.strings.sectionLoadingMessage}},this.mapAccountLinkingSettingsData=()=>this.accountLinkingData?this.config.accountLinkingConfig.faqLink?{heading:this.strings.accountLinkingSettingStrings.heading,sectionId:un.b.removeHyphens(zn.S.accountLinkingSettingsSectionIds.root),data:this.accountLinkingData,faqLink:this.config.accountLinkingConfig.faqLink}:(Pe.k.log("account-linking: faqLink should be defined in config."),null):null,this.mapProductivitySettingCardsData=()=>{if(!this.config.productivitySettingCards)return;return{heading:this.strings.productivitySettings&&this.strings.productivitySettings.heading||"",cards:this.productivitySettingCards||this.initializeProductivitySettingCards(),sectionId:un.b.removeHyphens(zn.S.productivitySettingsSectionIds.root),emptyListMessage:this.settingLoaded?this.strings.productivitySettingsEmptyListMessage:this.strings.sectionLoadingMessage}},this.mapGamingSettingCardsData=()=>{if(!this.config.gamingSettingCards)return;return{heading:this.strings.gamingSettings&&this.strings.gamingSettings.heading||"",cards:this.gamingSettingCards||this.initializeGamingSettingCards(),sectionId:un.b.removeHyphens(zn.S.gamingSettingsSectionIds.root),emptyListMessage:this.settingLoaded?this.strings.gamingSettingsEmptyListMessage:this.strings.sectionLoadingMessage}},this.fetchUserPreferences=async()=>{var e;const t=this.initializeSettingCards(),i=this.initializeProductivitySettingCards(),n=this.initializeFeedSettingCards(),o=this.initializeGamingSettingCards(),a=(0,Lt.zo)();if(await this.shouldCallAccountLinking())try{this.accountLinkingData=await Ke(!0),(null===(e=this.config.accountLinkingConfig)||void 0===e?void 0:e.enabled)||this.accountLinkingData.anid?(Pe.k.log("account-linking: experience enabled."),this.context.pageType="AADSetting",this.sectionScrollTo=zn.S.accountLinkingSettingsSectionIds.root):(Pe.k.log("account-linking: experience disabled because user is not in flight or has no account linked."),this.accountLinkingData=void 0)}catch(e){this.accountLinkingData=void 0,(0,Ee.OO)(e,Me.UBn.FailedAccountLinkingSettingsInitialization,"There was an exception while initially fetching Account Linking data.",(0,qe.tE)())}const{segmentCardSettings:s,userSettings:r,communitySettings:l,disabledActionBasedSegmentCardTypes:d}=await this.getPdpUserPreference();this.settingLoaded=!0,s&&(t.forEach((e=>{if("TopStories"===e.cardType)Object.prototype.hasOwnProperty.call(r,zn.S.TopStoriesEnabledId)&&(e.toggleChecked="1"===r[zn.S.TopStoriesEnabledId]);else if(this.isActionBasedSettingCard(e.cardType))e.toggleChecked=!(d&&d.includes(e.cardType));else{const t=this.getCardEnabledSettingName(e.cardType);t&&Object.prototype.hasOwnProperty.call(s,t)&&(e.toggleChecked="1"===s[t])}})),this.settingCards=t),(null==r?void 0:r.enterpriseCardsEnabled)&&(i.forEach((e=>{var t;const i=`is${e.cardType}Enabled`;i&&Object.prototype.hasOwnProperty.call(null==r?void 0:r.enterpriseCardsEnabled,i)&&(e.toggleChecked=null===(t=null==r?void 0:r.enterpriseCardsEnabled[i])||void 0===t||t)})),this.productivitySettingCards=i),l&&(n.forEach((e=>{const t=this.getOptOutFeedSettingName(e.cardType);if(t&&Object.prototype.hasOwnProperty.call(l,t)){const i=l[t];e.toggleChecked="0"===i}})),this.feedSettingCards=n),(null==r?void 0:r.gamingCards)&&(o.forEach((e=>{var t;const i=`is${e.cardType}Enabled`;if(i&&Object.prototype.hasOwnProperty.call(null==r?void 0:r.gamingCards,i)&&(e.toggleChecked=null===(t=null==r?void 0:r.gamingCards[i])||void 0===t||t),"GamingCards"===e.cardType&&e.inlineContentsMapping){const t=e.inlineContentsMapping.cards;t&&Array.isArray(t)&&t.length>0&&t.forEach((e=>{var t;const i=`is${e.cardType}Enabled`;i&&Object.prototype.hasOwnProperty.call(null==r?void 0:r.gamingCards,i)&&(e.toggleChecked=null===(t=null==r?void 0:r.gamingCards[i])||void 0===t||t)}))}})),this.gamingSettingCards=o),this.config.displayCommuteOptions&&(this.commuteLocations=await a,this.userSettings=r),this.mapInterestsData()},this.shouldCallAccountLinking=async()=>((0,Ge.Oo)(),await(0,Be.rr)(),(0,Hn.B9)()?(Pe.k.log("account-linking: enabled because it is an AAD user."),!0):(Pe.k.log("account-linking: disabled because it is not AAD user."),!1)),this.initializeSettingCards=()=>this.initializeSettingCardsForSection(this.config.sdSettingCards,this.strings.settings,zn.S.SdSettingsOrder,zn.S.sdSettingsSectionIds),this.initializeProductivitySettingCards=()=>this.initializeSettingCardsForSection(this.config.productivitySettingCards,this.strings.productivitySettings,zn.S.ProductivitySettingsOrder,zn.S.productivitySettingsSectionIds),this.initializeFeedSettingCards=()=>this.initializeSettingCardsForSection(this.config.feedSettingCards,this.strings.feedSettings,zn.S.FeedSettingsOrder,zn.S.feedSettingsSectionIds),this.initializeGamingSettingCards=()=>{const e=this.initializeSettingCardsForSection(this.config.gamingSettingCards,this.strings.gamingSettings,zn.S.GamingSettingsOrder,zn.S.gamingSettingsSectionIds);return e.forEach((e=>{"ConnectToXbox"==e.cardType?e.toggleChecked=!1:"GamingCards"==e.cardType&&(e.inlineContentsMapping={cards:this.initializeSettingCardsForSection(this.config.gamingInlineSettingCards,this.strings.gamingSettings,zn.S.GamingInlineSettingsOrder,zn.S.gamingInlineSettingsSectionIds)})})),e},this.initializeSettingCardsForSection=(e,t,i,n)=>{const o=[];if(e&&t){const{settingCardDict:a={}}=t;i.forEach((t=>{e[t]&&o.push(Object.assign(Object.assign({},a[t]),{id:un.b.removeHyphens(n[t]),cardType:t,toggleChecked:!0}))}))}return o},this.updateDiscoverSectionsToRender=()=>{var e,t;const i=null===(t=null===(e=this.interestsData.interestsRiverData.discoverSectionData)||void 0===e?void 0:e.topicSections)||void 0===t?void 0:t.length;if(!i||i===this.renderedDiscoverSections||!this.lastRenderedDiscoverSectionId)return void this.handleInitialScroll();const n=this.shadowRoot.getElementById(this.lastRenderedDiscoverSectionId),{bottom:o}=n.getBoundingClientRect();o>(window.innerHeight||document.documentElement.clientHeight)?this.discoverSectionsToRender=i:this.discoverSectionsToRender=this.discoverSectionsToRender+1},this.unmutePublisherClickHandler=async(e,t)=>{try{await this.publisherServiceClient.publisherUserAction(e,yn.S.Mute,"DELETE"),this.mutedPublishers=this.mutedPublishers.filter((t=>t.id!==e))}catch(i){return t&&this.requestHideTopicToast(e,t,!1,!1,!1,"",!0),this.onAppError(Me.UBn.InterestsUnMutePublisherError),!1}return t&&this.requestHideTopicToast(e,t,!1,!0,!1,"",!0),!0},this.onInputChange=async e=>{var t,i,n,o;this.interestsSearchServiceClient=this.interestsSearchServiceClient||new Li.c(window.fetch.bind(window),this.onAppError);let a=(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)||(null===(o=null===(n=null===(i=null==e?void 0:e.detail)||void 0===i?void 0:i.event)||void 0===n?void 0:n.target)||void 0===o?void 0:o.value);if(a=a&&a.replace(/[[@^_=;\]&/\\#,+()$~%.'":*?!<>{}]/g," ").trim(),!a)return void(this.suggestions=[]);this.searchInputValue=a;const s=await this.interestsSearchServiceClient.getSuggestedInterestsAndSources(encodeURIComponent(a),zn.S.maxNumberOfResults,this.config.searchSuggestionSourceType)||[];if(this.searchInputValue!==a)return;const r=s.slice(0,zn.S.maxNumberOfResults).map((e=>this.mapSuggestionItemToTopicListboxData(e)));this.suggestions=r},this.postCardActionStatus=(e,t,i,n)=>{(0,nt.I)().PostCardActionEvent(i,n,t,void 0,null,null,!0,null==e?void 0:e.target)},this.resetNonTopicFetchingStatesCallback=()=>{this.mutedPublishersLoaded=!1,this.readStoriesLoaded=!1,this.savedStoriesLoaded=!1,this.settingLoaded=!1},this.getScrollToSection=()=>{const{accountLinkingSettingsSectionIds:e,sectionIds:{savedStories:t,mutedPublishers:i}}=zn.S;if(this.sectionScrollTo===i){if(this.mutedPublishersLoaded)return this.sectionScrollTo=void 0,i}else if(this.sectionScrollTo===t){if(this.savedStoriesLoaded)return this.sectionScrollTo=void 0,t}else if(this.sectionScrollTo===e.root)return this.sectionScrollTo=void 0,e.root;return null},this.updateSegmentCardsEnabledStatusData=async(e,t)=>{let i=!1;try{i=await Ot.N.updateSegmentCardsEnableStatus(e,t)}catch(e){(0,Ee.OO)(e,Me.aO,"User settings update failed"),i=!1}return i},this.updateActionBasedSegmentCardsEnabledStatusData=async(e,t)=>{let i=!1;try{const n=zn.S.ActionBasedSettingCardTargetMap[e];i=t?await Ot.N.setUserAction("Disabled",n):await Ot.N.deleteUserAction("Disabled",n)}catch(e){(0,Ee.OO)(e,Me.aO,"Action-based user settings update failed"),i=!1}return i},this.updateFeedSettingsOptOutStatusData=async e=>{let t=!1;try{t=await Ot.N.updateCommunitySettingsOptOutStatus(e)}catch(e){(0,Ee.OO)(e,Me.kPC,"User feed settings update failed"),t=!1}return t},this.updateProductivitySettingsEnableStatusData=async e=>{let t=!1;try{t=await Ot.N.updateProductivityCardsEnableStatus(e)}catch(e){(0,Ee.OO)(e,Me.l35,"User productivity settings update failed"),t=!1}return t},this.updateGamingSettingsEnableStatusData=async e=>{let t=!1;try{t=await Ot.N.updateGamingCardsEnableStatus(e)}catch(e){(0,Ee.OO)(e,Me.aKV,"User gaming settings update failed"),t=!1}return t},this.getPdpUserPreference=async()=>{let e;const t={};try{e=await Ot.N.getPdpUserPreference(!0)}catch(e){(0,Ee.OO)(e,Me.H5g,"Failed getting Pdp user preference data")}if(e&&e.value&&e.value.length>0){const i=e.value[0];if(i.segmentCardSettings)try{t.segmentCardSettings=JSON.parse(i.segmentCardSettings)}catch(e){this.onAppError(Object.assign(Object.assign({},Me._tv),{message:"Invalid JSON format for segmentCard settings",pb:Object.assign(Object.assign({},Me._tv),{customMessage:`Error: ${(0,Ae.n)(e)}. User settings: ${i.segmentCardSettings}`})}))}t.communitySettings=i.communitySettings,t.userSettings=i.userSettings||{};try{t.userSettings.enterpriseCardsEnabled=i.userSettings&&i.userSettings.enterpriseCardsEnabled&&JSON.parse(i.userSettings.enterpriseCardsEnabled)}catch(e){this.onAppError(Object.assign(Object.assign({},Me.H8e),{message:"Invalid JSON format for enterpriseCardsEnabled settings",pb:Object.assign(Object.assign({},Me.H8e),{customMessage:`Error: ${(0,Ae.n)(e)}. User settings: ${i.userSettings&&i.userSettings.enterpriseCardsEnabled}`})}))}try{t.userSettings.gamingCards=i.userSettings&&i.userSettings.gamingCards&&JSON.parse(i.userSettings.gamingCards)}catch(e){this.onAppError(Object.assign(Object.assign({},Me.j3p),{message:"Invalid JSON format for gamingCards settings",pb:Object.assign(Object.assign({},Me.j3p),{customMessage:`Error: ${JSON.stringify(e)}. User settings: ${i.userSettings&&i.userSettings.gamingCards}`})}))}}t.disabledActionBasedSegmentCardTypes=[];const i=await Ot.N.getUserActions(it.Us.Disabled);return i&&i.length>0&&(t.disabledActionBasedSegmentCardTypes=Object.keys(zn.S.ActionBasedSettingCardTargetMap).filter((e=>i.filter((t=>t.targetId==zn.S.ActionBasedSettingCardTargetMap[e].targetId)).length>0)).map((e=>e))),t},this.marketUpdatedCallback=e=>{Ot.N.updateMarketPreference(e).then((()=>{const t="ntps";(0,ht.sq)(t,void 0,-1),(0,ht.sq)(t,JSON.stringify({m:e}),182,ct.jG.HostPage.topDomain,"/"),Promise.all([dt.U.purgeCacheAsync(dt.R.base),dt.U.purgeCacheAsync(dt.R.followedTopics)]).then((()=>{location.href=location.href.replace(`/${ct.jG.CurrentMarket}/`,`/${e}/`)}))}))},this.backgroundColorChangeHandler=()=>{this.isDarkMode=(0,rt.Y)(),this.backgroundColors={coldStartBackground:`--cold-start-background: ${this.isDarkMode?no.DarkMode:no.LightMode}`}},this.getSportsSettings=async()=>{bn.d.getDislikeSportsEntities((e=>{this.sportsDislikes=e,this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{settings:this.interestsNextState.settings})}))},this.updateNotificationTrigger=null,kt(),mn._d.subscribe(mn.jo.update,(()=>{this.updateNotificationTrigger&&this.updateNotificationTrigger()}))}experienceConnected(){var e,t,i;try{if(this.interestsNextState={cardActionStatusMap:new Map,publisherOnDialog:null,settings:null!==(i=null===(t=null===(e=this.interestsData)||void 0===e?void 0:e.interestsRiverData)||void 0===t?void 0:t.settings)&&void 0!==i?i:null,sidePaneVisible:!0},this.context)switch(this.context.pageType){case"MyInterests":this.dataInitializer=new Ai("MyInterests");break;case"MySaves":this.dataInitializer=new Ei;break;case"History":this.dataInitializer=new Mi;break;case"AADSetting":case"Setting":this.dataInitializer=new Pi;break;case"Notification":this.dataInitializer=new Di;break;default:this.dataInitializer=new Ai}else this.dataInitializer=new Ai;this.loadAndSubscribeInterestsDataConnector(),this.toast=this.config.childExperienceReferencesWC[String("toastWC")],this.scrollHandler=(0,E.Z)(this.onScroll,this.scrollDebounceTimerMs),this.config.isTranslucentFeedEnabled?(0,Xa.Uo)(It.z.ChromiumPageSettings,(e=>{this.onTranslucentBackgroundClass="off"!==e.currentBackgroundImageType?"translucentBackground":""})):(0,hn.N6)("navBar",(e=>{this.onTranslucentBackgroundClass="translucentBackground"===e?"translucentBackground":""})),this.backgroundColorChangeHandler()}catch(e){this.onAppError(Object.assign(Object.assign({},Me.UBn.UndefinedTopicDataConnector),{message:"Uncaught error occurred in InterestsWC"+e}))}this.getSportsSettings(),(0,Be.rr)().then((e=>{this.isUserMsaAuthenticated=(0,Hn.B0)(),e===je.Hy.NotSignedIn&&(this.isEditingHomeLocation()||this.isEditingWorkLocation())&&Rn()})),this.trafficAutosuggestClient=(0,Fi.b)(this.config&&this.config.autoSuggestConfig)}shadowDomPopulated(){var e,t;ft.H.subscribe(ft.a.ColumnArrangement,this.viewportChangeHandler);const i=ft.H.get(ft.a.ColumnArrangement);this.viewportChangeHandler(i),(0,Un.Jx)((e=>{this.topStickyBreakpoint=e})),this.topStickyBreakpoint=Un.FT||0;const{sectionIds:{mutedPublishers:n},publishersHash:o,followedInterestsHash:a}=zn.S,s=this.context||{};this.needToScroll=!!((null===(e=this.context)||void 0===e?void 0:e.isRequestFromSdCardAddRemoveClick)||s.isRequestFromSavedStoryToast||s.isRequestFromMutePublisherToast||(null===(t=this.context)||void 0===t?void 0:t.scrollToFollowedInterests)||0===(0,Je.FK)().indexOf(o)||0===(0,Je.FK)().indexOf(`#${n}`)||0===(0,Je.FK)().indexOf(a)||s.isRequestForReadingHistory),addEventListener("scroll",this.scrollHandler),addEventListener("resize",this.scrollHandler),addEventListener("mouseup",this.handleClick),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.backgroundColorChangeHandler)}disconnectedCallback(){ft.H.unsubscribe(ft.a.ColumnArrangement,this.viewportChangeHandler),removeEventListener("scroll",this.scrollHandler),removeEventListener("resize",this.scrollHandler),removeEventListener("mouseup",this.handleClick),window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",this.backgroundColorChangeHandler)}getExperienceType(){return re.x.interestsWC}async loadAndSubscribeInterestsDataConnector(){this.topicsDataConnector=await(0,Qn.oU)(It.z.TopicData),this.topicsDataConnector||this.onAppError(Object.assign(Object.assign({},Me.UBn.UndefinedTopicDataConnector),{message:"Topic Data Connector is not defined."})),this.interestsTelemetryObject=new Et.D({name:Ht,type:de.c9.Module}),this.interestsTelemetry=new Si(this.interestsTelemetryObject),(0,Xa.Uo)(It.z.TopicData,(e=>{this.topicDataState=e})),await this.dataInitializer.initializeData(this)}mapPersonalizeData(e){const{enableSavedStoriesExperience:t,enableReadStoriesExperience:i,enableNotificationExperience:n,enableHiddenTopicsExperience:o}=this.config;let a,s;const r=Na.bind(this);switch(e){case"MyInterests":a={discoverSectionData:this.mapDiscoverInterestsProps(this.topicDataState),followedListSectionData:this.mapFollowedListSectionData(this.topicDataState),blockedListSectionData:this.mapBlockedListSectionData(this.topicDataState)},s=r(this.config,this.topicDataState,this.interestsTelemetryObject,this.sidePaneLayoutTelemetryObjects,e);break;case"History":a={readStoriesSectionData:i&&this.mapReadStoriesCardProps()};break;case"MySaves":a={savedStoriesSectionData:t&&this.mapSavedStoriesCardProps()};break;case"AADSetting":a={settings:Object.assign(Object.assign({},this.mapSettingCardsData()),{marketSettings:{sectionId:un.b.removeHyphens(zn.S.sdSettingsSectionIds.Market),heading:this.config.localizedStrings.marketSettingsHeading,description:this.config.localizedStrings.marketSettingsDescription},accountLinkingSettings:this.mapAccountLinkingSettingsData()})},s=r(this.config,this.topicDataState,this.interestsTelemetryObject,this.sidePaneLayoutTelemetryObjects,e);break;case"Setting":a={settings:Object.assign(Object.assign({},this.mapSettingCardsData()),{marketSettings:{sectionId:un.b.removeHyphens(zn.S.sdSettingsSectionIds.Market),heading:this.config.localizedStrings.marketSettingsHeading,description:this.config.localizedStrings.marketSettingsDescription}})},s=r(this.config,this.topicDataState,this.interestsTelemetryObject,this.sidePaneLayoutTelemetryObjects,e);break;case"Notification":a={notification:n},s=r(this.config,this.topicDataState,this.interestsTelemetryObject,this.sidePaneLayoutTelemetryObjects,e);break;default:a={discoverSectionData:this.mapDiscoverInterestsProps(this.topicDataState),followedListSectionData:this.mapFollowedListSectionData(this.topicDataState),blockedListSectionData:this.mapBlockedListSectionData(this.topicDataState),savedStoriesSectionData:t&&this.mapSavedStoriesCardProps(),readStoriesSectionData:i&&this.mapReadStoriesCardProps(),settings:this.mapSettingCardsData(),notification:n},s=r(this.config,this.topicDataState,this.interestsTelemetryObject,this.sidePaneLayoutTelemetryObjects,e)}return{interestsRiverData:a,sidePaneLayoutData:s}}get sidePaneLayoutStyle(){if(!this.interestsData)return null;let e=" ";if(this.sidePaneSticky){const t=this.config.enableHorizontalNav?40:0;e+=`--navigation-pane-wrapper-sticky-top: ${this.getHeaderBottom()-t}px`}return e}get sidePaneHeaderElement(){return this.interestsNextState.sidePaneVisible?Bn():'<svg width="24" height="21" viewBox="0 0 24 21"><path d="M17.43 6a6.13 6.13 0 0 0-2.44 1.5H12V6h5.43Zm-4.3 6a6.03 6.03 0 0 0 .2 1.5H12V12h1.13ZM24 3v4.49a7.36 7.36 0 0 0-1.5-1.08V4.5H21v1.32a6.32 6.32 0 0 0-1.5-.2V1.5h-18v12.08a1.44 1.44 0 0 0 .41 1.01 1.44 1.44 0 0 0 1 .41h9.88l-1.5 1.5H2.92c-.4 0-.78-.07-1.14-.22a3.04 3.04 0 0 1-1.56-1.56A2.95 2.95 0 0 1 0 13.58V0h21v3h3Zm-6 1.5H3V3h15v1.5ZM3 6h7.5v7.5H3V6Zm1.5 6H9V7.5H4.5V12ZM12 9h1.5v.93l-.18.57H12V9Zm7.5-1.5a4.39 4.39 0 0 1 3.18 1.32A4.42 4.42 0 0 1 24 12a4.41 4.41 0 0 1-1.32 3.19 4.51 4.51 0 0 1-4.55 1.1 4.71 4.71 0 0 1-1.23-.63l-5.12 5.12a.72.72 0 0 1-.53.22.72.72 0 0 1-.53-.22.72.72 0 0 1-.22-.53c0-.2.07-.38.22-.53l5.12-5.12a4.53 4.53 0 0 1 3.66-7.1Zm0 7.5a3.01 3.01 0 0 0 2.77-4.16 3.01 3.01 0 0 0-3.94-1.6A3.05 3.05 0 0 0 16.5 12a2.96 2.96 0 0 0 1.83 2.77c.37.15.76.23 1.17.23Z"/></svg>'}get sidePaneMenuElement(){if(!this.interestsData)return null;const{sidePaneLayoutData:e,interestsRiverData:t,getScrollToSection:i,interestsPageType:n}=this.interestsData;if(!e||!e.sidePaneTreeViewData||!e.sidePaneTreeViewData.navItems)return null;this.selectedNavId||(this.selectedNavId=i?i():zn.S.defaultSelectedSection[n]);const o=`overflow-y: auto; max-height: calc(100vh - ${this.getHeaderBottom()}px - 60px)`,a=e.sidePaneTreeViewData.navItems.map((e=>this.getMenuItem(e)));return{styles:o,expandedChange:this.onExpandedChange,interestMenuItem:null,menuItems:a,telemetryTag:e.sidePaneTreeViewData.telemetryTag}}getMenuItem(e){let t,i;this.sectionIds.add(e.id),e.childItems&&(t=e.childItems.map((e=>this.getMenuItem(e))),i=this.expandedTreeItems[e.id]);const n={selected:this.selectedNavId===e.id,"aria-current":this.selectedNavId===e.id};return{id:"menuItem-"+e.id,selected:n.selected,expanded:i,display:e.display,glyphStart:e.glyphStart,glyphEnd:e.glyphEnd,menuItems:t,telemetryTag:e.telemetryTag,showDivider:e.showDivider,onClick:this.onMenuClick}}handleInitialScroll(){var e,t,i,n,o,a,s,r;const{sdSettingsSectionIds:l,sectionIds:{savedStories:d,mutedPublishers:c,readStories:u,notification:h,followedInterests:g},publishersHash:p,followedInterestsHash:m}=zn.S;let f;(null===(e=this.context)||void 0===e?void 0:e.isRequestFromSdCardAddRemoveClick)?f=l.root:(null===(t=this.context)||void 0===t?void 0:t.isRequestFromSavedStoryToast)?f=d:(null===(i=this.context)||void 0===i?void 0:i.isRequestFromMutePublisherToast)||0===(0,Je.FK)().indexOf(p)||0===(0,Je.FK)().indexOf(`#${c}`)?f=c:(null===(n=this.context)||void 0===n?void 0:n.isRequestForReadingHistory)?f=u:(null===(o=this.context)||void 0===o?void 0:o.scrollToSection)?f=null===(a=this.context)||void 0===a?void 0:a.scrollToSection:(null===(s=this.context)||void 0===s?void 0:s.scrollToNotification)?f=h:((null===(r=this.context)||void 0===r?void 0:r.scrollToFollowedInterests)||0===(0,Je.FK)().indexOf(m))&&(f=g),this.shadowRoot.getElementById(un.b.removeHyphens(f))&&(this.changeSelectedTreeItem(`menuItem-${f}`),this.scrollToSection(f)),this.needToScroll=!1}scrollToSection(e){const t=this.getScrollDestination(e);this.ignoreNextScrollEvent=!0,this.currentScrollTarget=e,window.scrollTo({left:0,top:t})}correctScrollPosition(e,t=0){this.currentScrollTarget=null,setTimeout((()=>{const i=this.getScrollDestination(e);Math.abs(i-window.scrollY)<6||(this.ignoreNextScrollEvent=!0,window.scrollTo({left:0,top:i}),t<3&&this.correctScrollPosition(e,t+1))}),0)}getScrollDestination(e){let t=0;if(e!=="menuItem-"+zn.S.sectionIds.discoverInterests){const i=e.replace("menuItem-",""),n=un.b.removeHyphens(i),o=this.shadowRoot.getElementById(n);if(!o)return t;const a=this.useStickyHeaderHeightSmallScreen?this.config.stickyHeaderSmallScreenHeightPx:this.config.stickyHeaderHeightPx;if(t=o.getBoundingClientRect().top+window.pageYOffset-a-zn.S.sectionVisibilityBufferPx,this.searchBoxRef&&this.config.enableStickySearch){const e=ft.H.get(ft.a.ColumnArrangement);this.useStickyHeaderHeightSmallScreen?t-=zn.S.stickySearchHeights[e]:t-=zn.S.stickySearchHeights.default}}return t}changeSelectedTreeItem(e){const t=this.shadowRoot.getElementById(`menuItem-${this.selectedNavId}`),i=this.shadowRoot.getElementById(e);t&&(t.selected=!1,t.ariaCurrent="false"),i&&(i.selected||(i.selected=!0,i.ariaCurrent="true"),this.selectedNavId=i.id.replace("menuItem-",""),i.parentElement.tagName===zn.S.treeItemTag&&(i.parentElement.expanded=!0))}getHeaderBottom(){let e;e=this.useStickyHeaderHeightSmallScreen?this.config.stickyHeaderSmallScreenHeightPx:this.config.stickyHeaderHeightPx||zn.S.defaultStickyHeaderHeightPx;const t=document.getElementById("bnb");if(t){const i=t.getBoundingClientRect().bottom;e=Math.max(i,e)}return this.config.enableOneColumn&&ft.H.get(ft.a.ColumnArrangement)===at.c1&&(e=zn.S.oneColumnStickyHeaderHeightPx),e}isSectionVisible(e,t){const i=e.getBoundingClientRect(),n=this.searchBoxRef&&this.searchBoxSticky?zn.S.stickySearchHeights.default:0;return Math.floor(i.bottom)>t+zn.S.sectionVisibilityBufferPx+n}get followedListSectionElement(){if(!this.interestsData||!this.interestsData.interestsRiverData||!this.interestsData.interestsRiverData.followedListSectionData)return null;const{sectionTitle:e,sectionSubTitle:t,sectionId:i,followedSourcesSectionData:n,followedTopicsSectionData:o}=this.interestsData.interestsRiverData.followedListSectionData;return{id:i,description:t,heading:e,followedSourcesSectionData:n,followedTopicsSectionData:o}}get followedTopicsSectionElement(){if(!(this.interestsData&&this.interestsData.interestsRiverData&&this.interestsData.interestsRiverData.followedListSectionData&&this.interestsData.interestsRiverData.followedListSectionData.followedTopicsSectionData))return null;const{emptyStateCardTitle:e,sectionTitle:t,sectionSubTitle:i,sectionId:n,followedTopics:o,resetFollowedInterestsActionText:a,moreOptionsAriaLabel:s}=this.interestsData.interestsRiverData.followedListSectionData.followedTopicsSectionData,r=this.mapTopicsSectionProps(o,`${n}-topic`,this.interestsTelemetry.followedInterestsSectionTelemetryObject,this.interestsTelemetry.followedInterestsSectionTelemetryTag);return{id:n,description:i,heading:t,emptyStateCardTitle:e,topicsSection:{id:`${n}-topic`,topics:r.topics,followedClickedHandler:r.followedClickedHandler,hideClickHandler:r.hideClickHandler,topicSelectedHandler:r.topicSelectedHandler,topicsSectionTelemetryTag:r.topicsSectionTelemetryTag},moreOptionsAriaLabel:this.config.enableDefaultInterests?s:"",restoreFollowedInterestsActionText:this.config.enableDefaultInterests?a:"",restoreFollowedInterestsButtonClickedHandler:()=>this.restoreFollowedInterestsButtonClickedHandler()}}get followedSourcesSectionElement(){if(!(this.interestsData&&this.interestsData.interestsRiverData&&this.interestsData.interestsRiverData.followedListSectionData&&this.interestsData.interestsRiverData.followedListSectionData.followedSourcesSectionData))return null;const{emptyStateCardTitle:e,sectionTitle:t,sectionSubTitle:i,sectionId:n,publisherCards:o}=this.interestsData.interestsRiverData.followedListSectionData.followedSourcesSectionData;return{id:n,description:i,heading:t,emptyStateCardTitle:e,topicsSection:{id:`${n}-topic`,topics:this.mapFollowedPublishersDataToTopicSectionCards(o,this.interestsTelemetry.followedPublishersSectionTelemetryObject),topicsSectionTelemetryTag:this.interestsTelemetry.followedPublishersSectionTelemetryTag,followedClickedHandler:this.followSourceCallback,hideClickHandler:this.muteSourceCallback}}}get blockedListSectionElement(){if(!this.interestsData||!this.interestsData.interestsRiverData||!this.interestsData.interestsRiverData.blockedListSectionData)return null;const{sectionTitle:e,sectionSubTitle:t,sectionId:i,blockedSourcesSectionData:n,blockedTopicsSectionData:o}=this.interestsData.interestsRiverData.blockedListSectionData;return{id:i,description:t,heading:e,blockedSourcesSectionData:n,blockedTopicsSectionData:o}}get blockedSourcesSectionElement(){if(!(this.interestsData&&this.interestsData.interestsRiverData&&this.interestsData.interestsRiverData.blockedListSectionData&&this.interestsData.interestsRiverData.blockedListSectionData.blockedSourcesSectionData))return null;const{blockedSourcesSectionData:e}=this.interestsData.interestsRiverData.blockedListSectionData,{sectionTitle:t,publisherCards:i,emptyListMessage:n,emptyStateCardTitle:o,sectionId:a}=e;return{id:a,description:i&&i.length?null:n,heading:t,emptyStateCardTitle:o,topicsSection:{id:`${a}-topic`,topics:this.mapFollowedPublishersDataToTopicSectionCards(i,this.interestsTelemetry.hiddenPublishersSectionTelemetryObject).map((e=>Object.assign(Object.assign({},e),{hidden:!0}))),followedClickedHandler:this.followSourceCallback,hideClickHandler:e=>{const t=e.target,{topicId:i,topicTitle:n}=t;this.unmutePublisherClickHandler(i,n)},topicsSectionTelemetryTag:this.interestsTelemetry.hiddenPublishersSectionTelemetryTag}}}get blockedTopicsSectionElement(){return this.interestsData&&this.interestsData.interestsRiverData&&this.interestsData.interestsRiverData.blockedListSectionData&&this.interestsData.interestsRiverData.blockedListSectionData.blockedTopicsSectionData}get discoverInterestsRiverElement(){if(!this.interestsData||!this.interestsData.interestsRiverData||!this.interestsData.interestsRiverData.discoverSectionData)return null;const{sectionTitle:e,sectionSubTitle:t,stickyHeader:i,sectionId:n,topicSections:o}=this.interestsData.interestsRiverData.discoverSectionData,{placeHolderText:a,suggestionItems:s}=this.interestsData.searchData||{},{localizedStrings:r,enableHiddenTopicsExperience:l}=this.config;this.needToScroll?this.renderedDiscoverSections=(null==o?void 0:o.length)||0:this.renderedDiscoverSections=Math.max(Math.min(this.discoverSectionsToRender,(null==o?void 0:o.length)||0),this.renderedDiscoverSections);const d=[];for(let e=0;e<this.renderedDiscoverSections;e++){const{id:t,title:i,topics:n,emptyStateCardTitle:a}=o[e],s=this.mapTopicsSectionProps(n,t,this.interestsTelemetry.topicsSectionTelemetryObject(i),this.interestsTelemetry.topicsSectionTelemetryTag(i),this.renderedDiscoverSections-1===e);d.push({id:t,sectionTitle:i,topics:s.topics,emptyStateCardTitle:null!=a?a:"",followedClickedHandler:s.followedClickedHandler,hideClickHandler:s.hideClickHandler,topicSelectedHandler:s.topicSelectedHandler,topicsSectionTelemetryTag:s.topicsSectionTelemetryTag}),this.lastRenderedDiscoverSectionId=t}const c={placeholder:a,handleFollowStateChange:e=>{e.target.type===zn.S.sourceNameTag?this.followSourceCallback(e):this.followedClickedHandler(e,n,e.target.followed)},inputChange:this.onInputChange,glyphType:l?Wn.Z:Jn(),telemetryTag:this.interestsTelemetry.interestsSearchBoxTelemetryTag,telemtryObject:this.interestsTelemetry.interestsSearchBoxTelemetryObject},u=s&&s.map((e=>{var t;let i;return this.config.searchSuggestionSourceType.kind.indexOf(zn.S.sourceNameTag)>-1&&(i=(null===(t=e.type)||void 0===t?void 0:t.toLowerCase())===zn.S.sourceNameTag?r.interestsSearchTopicTypeAsPublisher:r.interestsSearchTopicTypeAsInterest),{topicCardData:e,topicType:i}}));return{id:n,description:t,heading:e,stickyHeader:i,topicSections:d,interestsSearch:c,suggestionItems:u}}get unmuteDialogElement(){if(!this.interestsData||!this.interestsNextState.publisherOnDialog)return null;const{interestsRiverData:{blockedListSectionData:{blockedSourcesSectionData:{unmuteData:e,unmutePublisherCallback:t}}}}=this.interestsData,{unmuteDialogData:i}=e,{publisherOnDialog:n}=this.interestsNextState,o=new Ci(this.interestsTelemetry.hiddenPublishersSectionTelemetryObject,this.interestsRiverTelemetryObjects,i.localizedStrings.actionButtonText,i.localizedStrings.cancelButtonText);return{actionButtonTelemetryTag:null==o?void 0:o.actionButtonTelemetryTag,cancelButtonTelemetryTag:null==o?void 0:o.cancelButtonTelemetryTag,closeButtonTelemetryTag:null==o?void 0:o.closeButtonTelemetryTag,telemetryTag:null==o?void 0:o.dialogTelemetryTag,actionButtonCallback:()=>{t(n.publisherId).then((e=>{e?(this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{publisherOnDialog:null}),this.confirmHiddenFocusElement.tagName.toLocaleLowerCase()===zn.S.FluentTreeItemTagName?Yn.k.focusItem(this.confirmHiddenFocusElement):this.confirmHiddenFocusElement.focus()):this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{publisherOnDialog:null}),document.removeEventListener("keydown",this.onTabKeydown)}))},cancelButtonCallback:e=>this.unmuteDialogToggleCallback(e),localizedStrings:Object.assign(Object.assign({},i.localizedStrings),{dialogHeadline:i.localizedStrings.dialogHeadline.replace("${publisher}",n.publisherTitle)}),actionDialogDismiss:()=>{this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{publisherOnDialog:null}),this.cancelHiddenFocusElement.focus(),document.removeEventListener("keydown",this.onTabKeydown)}}}get unmuteDialogBodyElement(){if(!this.interestsData||!this.interestsNextState.publisherOnDialog)return null;const{interestsRiverData:{blockedListSectionData:{blockedSourcesSectionData:{unmuteData:e}}}}=this.interestsData,{publisherOnDialog:{imgSrc:t,publisherTitle:i}}=this.interestsNextState,n=`<b key="provider-name">${i}</b>`;return{imgSrc:t,providerContent:(0,gn.Z)(e.dialogContent,[n])}}get savedStoriesSectionElement(){if(!this.interestsData||!this.interestsData.interestsRiverData||!this.interestsData.interestsRiverData.savedStoriesSectionData)return null;try{const{emptyListMessage:e,sectionTitle:t,cards:i}=this.interestsData.interestsRiverData.savedStoriesSectionData,{sectionIds:{savedStories:n}}=zn.S,o=n;let a=[];return i&&(this.mapCardActionStatuses(i),a=i.map((e=>this.getContentCard(e,this.interestsTelemetry.savedStoriesSectionTelemetryObject)))),{sectionId:un.b.removeHyphens(o),sectionTitle:t,emptyListMessage:e,cardProps:a}}catch(e){this.fireUncaughtSectionError(zn.S.sectionIds.savedStories,e);const{savedStoriesSectionHeader:t,errorMessageHeading:i}=this.config.localizedStrings;return{sectionId:zn.S.sectionIds.savedStories,sectionTitle:t,emptyListMessage:i,cardProps:[]}}}get readStoriesSectionElement(){if(!this.interestsData||!this.interestsData.interestsRiverData||!this.interestsData.interestsRiverData.readStoriesSectionData)return null;try{const{emptyListMessage:e,sectionTitle:t,cards:i}=this.interestsData.interestsRiverData.readStoriesSectionData,{sectionIds:{readStories:n}}=zn.S,o=n;let a=[];return i&&(this.mapCardActionStatuses(i),a=i.map((e=>this.getContentCard(e,this.interestsTelemetry.readStoriesSectionTelemetryObject)))),{sectionId:un.b.removeHyphens(o),sectionTitle:t,emptyListMessage:e,cardProps:a}}catch(e){this.fireUncaughtSectionError(zn.S.sectionIds.readStories,e);const{readStoriesSectionHeader:t,errorMessageHeading:i}=this.config.localizedStrings;return{sectionId:zn.S.sectionIds.readStories,sectionTitle:t,emptyListMessage:i,cardProps:[]}}}get sdSettingPageElement(){var e,t;return this.getSettingPageElement(null===(t=null===(e=this.interestsData)||void 0===e?void 0:e.interestsRiverData)||void 0===t?void 0:t.settings,this.interestsTelemetry.informationCardSectionTelemetryTag,this.interestsTelemetry.informationCardSectionTelemetryObject,zn.S.SettingCardTelemetryMapping,this.strings.informationCardEmptyListMessage,zn.S.sdSettingsSectionIds.root,this.handleSegmentCardsEnabledSwitchClick)}get feedSettingPageElement(){var e,t,i;return this.getSettingPageElement(null===(i=null===(t=null===(e=this.interestsData)||void 0===e?void 0:e.interestsRiverData)||void 0===t?void 0:t.settings)||void 0===i?void 0:i.feedSettings,this.interestsTelemetry.feedSettingsSectionTelemetryTag,this.interestsTelemetry.feedSettingsSectionTelemetryObject,zn.S.FeedSettingCardTelemetryMapping,this.strings.feedSettingsEmptyListMessage,zn.S.feedSettingsSectionIds.root,this.updateFeedSettingsOptOutStatus)}get productivitySettingPageElement(){var e,t,i;return this.getSettingPageElement(null===(i=null===(t=null===(e=this.interestsData)||void 0===e?void 0:e.interestsRiverData)||void 0===t?void 0:t.settings)||void 0===i?void 0:i.productivitySettings,this.interestsTelemetry.productivitySettingsSectionTelemetryTag,this.interestsTelemetry.productivitySettingsSectionTelemetryObject,zn.S.ProductivitySettingCardTelemetryMapping,this.strings.productivitySettingsEmptyListMessage,zn.S.productivitySettingsSectionIds.root,this.updateProductivitySettingsEnableStatus)}get gamingSettingPageElement(){var e,t,i;return this.getSettingPageElement(null===(i=null===(t=null===(e=this.interestsData)||void 0===e?void 0:e.interestsRiverData)||void 0===t?void 0:t.settings)||void 0===i?void 0:i.gamingSettings,this.interestsTelemetry.gamingSettingsSectionTelemetryTag,this.interestsTelemetry.gamingSettingsSectionTelemetryObject,zn.S.GamingSettingCardTelemetryMapping,this.strings.gamingSettingsEmptyListMessage,zn.S.gamingSettingsSectionIds.root,this.updateGamingSettingsEnableStatus)}get notificationRiverElement(){if(!this.interestsData||!this.interestsData.interestsRiverData||!this.interestsData.interestsRiverData.notification)return null;const{notification:e}=this.config,{notification:t}=this.strings,i=[];return e&&e.children&&i.push([{name:t.topics.General.children.AllNotifications.topicName,type:e.type,menuItemId:mn.Rn.AllNotifications,toggleChecked:this.notificationSettingMap[mn.Rn.AllNotifications],toggleEnabled:!0,updateNotificationSetting:this.updateNotificationSetting,telemetryTag:this.interestsTelemetry.notificationSwitchClickTelemetryTag(e.type,!this.notificationSettingMap[mn.Rn.AllNotifications])}]),e&&e.children.forEach((e=>{const n=[{name:t.topics[e.name].topicName,desc:t.topics[e.name].description,menuItemId:e.type}];n.push({name:t.topics[e.name].children[e.type].topicName,desc:t.topics[e.name].children[e.type].description,type:e.type,toggleChecked:this.notificationSettingMap[e.type],toggleEnabled:this.notificationSettingMap[mn.Rn.AllNotifications],updateNotificationSetting:this.updateNotificationSetting,telemetryTag:this.interestsTelemetry.notificationSwitchClickTelemetryTag(e.type,!this.notificationSettingMap[e.type])}),e.children.forEach((i=>{const o=i.type.split("_")[1];n.push({name:t.topics[e.name].children[o].topicName,desc:t.topics[e.name].children[o].description,type:i.type,toggleChecked:this.notificationSettingMap[i.type],toggleEnabled:this.notificationSettingMap[e.type]&&this.notificationSettingMap[mn.Rn.AllNotifications],updateNotificationSetting:this.updateNotificationSetting,telemetryTag:this.interestsTelemetry.notificationSwitchClickTelemetryTag(i.type,!this.notificationSettingMap[i.type])})})),i.push(n)})),i}get settingMarketSelectorElement(){var e,t,i;if(!(null===(i=null===(t=null===(e=this.interestsData)||void 0===e?void 0:e.interestsRiverData)||void 0===t?void 0:t.settings)||void 0===i?void 0:i.marketSettings)||(0,ct.Yq)().IsChinaCompliance)return null;try{const{sectionId:e,heading:t,description:i}=this.interestsData.interestsRiverData.settings.marketSettings;return this.settingsMarkets=this.settingsMarkets||At.$n.sort(At.bT).map((e=>Object.assign(Object.assign({},e),{marketSelectorOptionMetaTag:new Et.D({name:"MarketSelector",behavior:de.wu.Customize,content:{type:de.uH.Settings,headline:e.displayString}}).getMetadataTag()}))),{heading:t,settingsId:e,defaultSelection:(0,ct.Yq)().CurrentMarket||"en-us",description:i,telemetryTag:this.interestsTelemetry.marketSettingsSectionTelemetryTag}}catch(e){return this.fireUncaughtSectionError(zn.S.sdSettingsSectionIds.Market,e),{heading:this.config.localizedStrings.marketSettingsHeading,description:this.config.localizedStrings.errorMessageHeading,settingsId:null,defaultSelection:"en-us",telemetryTag:this.interestsTelemetry.marketSettingsSectionTelemetryTag}}}get settingAccountLinkingElement(){var e,t,i;if(!(null===(i=null===(t=null===(e=this.interestsData)||void 0===e?void 0:e.interestsRiverData)||void 0===t?void 0:t.settings)||void 0===i?void 0:i.accountLinkingSettings))return null;const{accountLinkingSettings:n}=this.interestsData.interestsRiverData.settings;return n.data?{heading:n.heading,sectionId:n.sectionId,data:n.data,faqLink:n.faqLink}:null}fireUncaughtSectionError(e,t){this.onAppError(Object.assign(Object.assign({},Me.lNW),{message:`Uncaught exception occurred in section ${e}`,pb:Object.assign(Object.assign({},Me.lNW),{customMessage:t})}))}setInterestsRiverBottomPadding(){if(this.interestsRiverRef){const e=this.interestsRiverRef.lastElementChild;if(e){const t=e.querySelector(":last-child").getBoundingClientRect().height,i=this.searchBoxRef&&this.config.enableStickySearch?zn.S.stickySearchHeights.default:0;e.style.paddingBottom=`calc(100vh - ${this.getHeaderBottom()}px - ${t}px - ${i}px - 21px)`}}}getSettingPageElement(e,t,i,n,o,a,s){if(!e)return null;try{const o=e.cards&&e.cards.map((e=>{const t=Object.assign(Object.assign({},e),{updateSettingStatus:s,telemetryTag:this.interestsTelemetry.settingCardTelemetryTag(i,n[e.cardType]),inlineSettingsType:"None",displayToggle:!0});return"Traffic"==t.cardType&&this.canDisplayCommuteOptions()?Object.assign(Object.assign({},t),{inlineSettingsType:"Traffic",displayToggle:!1}):"Sports"==t.cardType?Object.assign(Object.assign({},t),{inlineSettingsType:"Sports"}):"GamingCards"==t.cardType?(t.inlineContentsMapping&&t.inlineContentsMapping.cards&&(t.inlineContentsMapping.cards=e.inlineContentsMapping.cards.map((e=>Object.assign(Object.assign({},e),{updateSettingStatus:s,telemetryTag:this.interestsTelemetry.settingCardTelemetryTag(i,zn.S.GamingInlineSettingCardTelemetryMapping[e.cardType]),inlineSettingsType:"None",displayToggle:!0})))),Object.assign(Object.assign({},t),{inlineSettingsType:"GamingCards",displayToggle:!1})):t}));return{heading:e.heading,cards:o,settingsId:e.sectionId,emptyListMessage:e.emptyListMessage,telemetryTag:t}}catch(e){return this.fireUncaughtSectionError(a,e),{heading:"",cards:[],settingsId:"",emptyListMessage:o,telemetryTag:t}}}getContentCard(e,t){const{id:i,destinationUrl:n,title:o,category:a,providerName:s,imageProps:r,providerProps:l,articleProps:d,titleAriaLabel:c,titleLabel:u,saveButtonText:h,undoSaveButtonText:g,actionsButtonText:p}=e,m=new wi(t,i,o,a,s,n);return{id:i,href:n,ariaLabel:c,titleLabel:u,title:o,imageProps:null!=r?r:null,articleProps:null!=d?d:null,providerProps:null!=l?l:null,providerName:s,saveActionTrigger:this.getSaveActionTrigger(i,h,g,null==m?void 0:m.saveButtonTelemetryTag,null==m?void 0:m.undoSaveButtonTelemetryTag),actionTrigger:this.getActionTrigger(p,null==m?void 0:m.moreButtonTelemetryTag),telemetryTag:null==m?void 0:m.contentCardTelemetryTag,anchorTelemetryTag:null==m?void 0:m.destinationTelemetryTag,moreButtonTelemetryObject:null==m?void 0:m.moreButtonTelemetryObject}}getSaveActionTrigger(e,t,i,n,o){const{cardActionStatusMap:a}=this.interestsNextState,s=((null==a?void 0:a.get(e))||it.O7.enabled)&it.O7.saved,r=s?i:t;return{ariaLabel:r,title:r,click:this.onCardActionClick,glyphType:s?(l=!this.config.enableNeutralFilledSaveIconOnCard&&Xn.m,`<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n    <path ${l?"fill="+l:""} d="M3.77935 13.9187C3.4471 14.1406 3.00171 13.9024 3.00171 13.5029V4.01174C3.00171 2.90856 3.89496 2.01372 4.99813 2.01174L10.9981 2.00098C12.1027 1.99901 12.9997 2.89284 13.0017 3.9974V13.5029C13.0017 13.9024 12.5563 14.1406 12.2241 13.9187L8.00171 11.0995L3.77935 13.9187Z"/>\n</svg>`):_n(),telemetryTag:s?o:n};var l}getActionTrigger(e,t){return{ariaLabel:e,title:e,click:this.openCardActions,glyphType:qn(),telemetryTag:t}}mapCardActionStatuses(e){if(!e||!e.length)return;const t=this.interestsNextState.cardActionStatusMap;e.forEach((e=>{t.has(e.id)||this.setCardActionState(e.id,e.actions.length?it.O7.saved:it.O7.enabled)}))}updateSegmentCardsEnabledStatus(e,t,i=null){const n=[];let o=i;const a=this.interestsNextState.settings.cards.filter((e=>!this.isActionBasedSettingCard(e.cardType)));a.forEach((i=>{const a=this.getCardEnabledSettingName(i.cardType);i.cardType===e&&(i.toggleChecked=t(i.toggleChecked),"TopStories"===e&&(o=Object.assign(Object.assign({},o),{IsTopStoriesEnabled:i.toggleChecked?"1":"0"}))),a&&n.push({cardType:a,enabled:i.toggleChecked})})),n.length>0&&this.interestsData.updateSegmentCardsEnabledStatus&&(async()=>{await this.interestsData.updateSegmentCardsEnabledStatus(n,o).then((e=>{if(e){const e=this.interestsNextState.settings.cards.filter((e=>this.isActionBasedSettingCard(e.cardType))),t={cards:[...e,...a]};this.updateSettingsState(t)}}))})()}updateSettingsState(e){this.interestsNextState=Object.assign(Object.assign({},this.interestsNextState),{settings:Object.assign(Object.assign({},this.interestsNextState.settings),e)}),mt()}mapPublishersData(e){return e?e.map((e=>Object.assign(Object.assign({},e),{actionButtonCallback:t=>this.unmuteDialogToggleCallback(t,e)}))):[]}mapTopicsSectionProps(e,t,i,n,o){return{topics:this.mapDataToTopicSectionCards(e,i,o),topicsSectionTelemetryTag:n,topicSelectedHandler:e=>this.topicSelectedHandler(e),followedClickedHandler:e=>this.followedClickedHandler(e,t,e.target.followed),hideClickHandler:e=>this.hideClickHandler(e,t,e.target.hiddenTopic)}}restoreTopicCardFollowState(e,t,i){const n=document.getElementById(e),o=n&&n.shadowRoot.querySelectorAll(`msn-topic-card[topicid=${t}]`);if((null==o?void 0:o.length)>0){const e=o[0];e instanceof sn&&(e.followed=i)}}restoreTopicCardHiddenState(e,t,i){const n=document.getElementById(e),o=n&&n.shadowRoot.querySelectorAll(`msn-topic-card[topicid=${t}]`);if((null==o?void 0:o.length)>0){const e=o[0];e instanceof sn&&(e.hidden=i)}}updateRepeatedTopicCardInstances(e,t){const i=this.shadowRoot.querySelectorAll("msn-topics-section");(null==i?void 0:i.length)>0&&i.forEach((i=>{const n=i.shadowRoot.querySelectorAll(`msn-topic-card[topicid=${e}]`);(null==n?void 0:n.length)>0&&n.forEach((e=>{e instanceof sn&&(e.followed=t)}))}))}mapDataToTopicSectionCards(e,t,i){if(!e||e.length<1)return null;const{localizedStrings:n,enableHiddenTopicsExperience:o}=this.config||{},{followFormatAriaLabel:a,followFormatText:s,unfollowFormatAriaLabel:r,unfollowFormatText:l,contentLinkFormatText:d,hideTopicText:c,hideFormatAriaLabel:u,unhideTopicText:h,unhideFormatAriaLabel:g,followedTopicStateText:p,hiddenTopicStateText:m,unfollowedTopicStateText:f}=n||{},v=[];return e.map(((n,y)=>{if(!n)return;const b=new Ti(t,n.id,n.name,l,s,d,de.uH.Topic,c,h,o);v.push({followFormatAriaLabel:null!=a?a:"",followFormatText:null!=s?s:"",imgAltText:n.name,imgSrc:n.imgSrc,followed:"followed"===n.followState,topicId:n.id,topicTitle:n.name,unfollowFormatAriaLabel:null!=r?r:"",unfollowFormatText:null!=l?l:"",enableNavToXfeed:this.config.enableTopicCardNav,contentLinkFormatText:null!=d?d:"",followButtonTelemetryTag:null==b?void 0:b.followButtonTelemetryTag,unfollowButtonTelemetryTag:null==b?void 0:b.unfollowButtonTelemetryTag,imgOnloadCallback:i&&y===e.length-1?this.updateDiscoverSectionsToRender:null,contentLinkButtonTelemetryTag:null==b?void 0:b.contentLinkButtonTelemetryTag,enableVNextStyles:this.config.enableHiddenTopicsExperience,hideButtonTelemetryTag:b&&b.hideButtonTelemetryTag,unhideButtonTelemetryTag:b&&b.unhideButtonTelemetryTag,topicCardTelemetryTag:b&&b.topicCardTelemetryTag,hidden:n.hidden,hideFormatAriaLabel:u||"",hideText:c||"",unhideFormatAriaLabel:g||"",unhideText:h||"",followedStateTitle:p,hiddenStateTitle:m,neutralStateTitle:f,feedType:n.feedType})})),v}mapFollowedPublishersDataToTopicSectionCards(e,t){if(!e||e.length<1)return[];const{localizedStrings:i}=this.config,{followFormatAriaLabel:n,followSourceText:o,unfollowFormatAriaLabel:a,unfollowSourceText:s,profileLinkLabel:r,hideSourceText:l,hideFormatAriaLabel:d,unhideSourceText:c,unhideFormatAriaLabel:u}=i,h=[];return e.map((e=>{var i;let g;t&&(g=new Ti(t,e.publisherId,e.publisherTitle,s,o,null,de.uH.Publisher));const p=e.profileId&&e.profileId===e.publisherId&&e.locale&&r&&{label:r,telemetryTag:new Et.D({name:"ViewProfile",content:{id:e.profileId,headline:e.publisherTitle}}).getMetadataTag(),url:`${ct.jG.NavTargetUrlWithLocale}/community/channel/${e.profileId}`};h.push({followButtonTelemetryTag:g&&g.followButtonTelemetryTag,followFormatAriaLabel:n,followFormatText:o,imgAltText:e.publisherTitle,imgSrc:`${null===(i=e.imgSrc)||void 0===i?void 0:i.split("?")[0]}?w=80&h=80&q=90&m=6&f=${Hi.D3.JPG}`,followed:e.followed,topicId:e.publisherId,cmsProviderId:e.cmsProviderId,topicTitle:e.publisherTitle,enableNavToXfeed:this.config.enableTopicCardNav,unfollowButtonTelemetryTag:g&&g.unfollowButtonTelemetryTag,unfollowFormatAriaLabel:a,unfollowFormatText:s,sourceProfileLinkData:p,enableVNextStyles:!1,hideButtonTelemetryTag:g&&g.hideButtonTelemetryTag,unhideButtonTelemetryTag:g&&g.unhideButtonTelemetryTag,topicCardTelemetryTag:null,hidden:!1,hideText:l,hideFormatAriaLabel:d,unhideText:c,unhideFormatAriaLabel:u,followedStateTitle:null,hiddenStateTitle:null,neutralStateTitle:null})})),h}mapFollowedTopicsSectionProps(e){var t;const{followedTopicIds:i,topicMap:n}=e,{enableDefaultInterests:o,enableWorkTopicInterests:a,localizedStrings:s}=this.config,{followFormatText:r,unfollowFormatText:l,followFormatAriaLabel:d,unfollowFormatAriaLabel:c,contentLinkFormatText:u,resetFollowedInterestsActionText:h,moreOptionsAriaLabel:g,explicitlyFollowedInterestsSectionEmptyListInfoText:p,followedInterestsEmptyStateCardTitle:m,followedTopicSectionHeader:f,hideTopicText:v,hideFormatAriaLabel:y,unhideTopicText:b,unhideFormatAriaLabel:S}=s||{},w=[...new Set(i)];this.followedTopics=(null===(t=this.followedTopics)||void 0===t?void 0:t.length)&&this.followedTopics||w.map((e=>{var t;const i=n[e];if((null==i?void 0:i.followState)===$i.t.Followed){if(o)return i;if(!(null==i?void 0:i.isInferred)||a&&(null===(t=i.apiSource)||void 0===t?void 0:t.id)===Oi.A.work)return i}})).filter((e=>e));const T=(0,Dn.Z)(this.followedTopics);return{sectionTitle:f,sectionSubTitle:void 0,sectionId:un.b.removeHyphens(zn.S.sectionIds.followedInterests),emptyListMessage:p,emptyStateCardTitle:m,followedTopics:T,followFormatText:r,unfollowFormatText:l,followFormatAriaLabel:d,unfollowFormatAriaLabel:c,contentLinkFormatText:u,resetFollowedInterestsActionText:h,moreOptionsAriaLabel:g,hideText:v,hideFormatAriaLabel:y,unhideText:b,unhideFormatAriaLabel:S}}mapFollowedSourcesSectionProps(){const{localizedStrings:e}=this.config,{followFormatAriaLabel:t,followSourceText:i,unfollowFormatAriaLabel:n,unfollowSourceText:o,followedPublishersEmptyMessage:a,followedSourceSectionHeader:s,profileLinkLabel:r,hideTopicText:l,hideFormatAriaLabel:d,unhideTopicText:c,unhideFormatAriaLabel:u}=e;return{sectionTitle:s,sectionSubTitle:void 0,sectionId:un.b.removeHyphens(zn.S.sectionIds.followedPublishers),emptyStateCardTitle:a,publisherCards:(0,Dn.Z)(this.followedPublishers),followFormatText:i,unfollowFormatText:o,followFormatAriaLabel:t,unfollowFormatAriaLabel:n,profileLinkLabel:r,hideText:l,hideFormatAriaLabel:d,unhideText:c,unhideFormatAriaLabel:u}}mapDiscoverInterestsProps(e){const{topicListMap:t,topicListIds:i}=e,{localizedStrings:n,enableHiddenTopicsExperience:o}=this.config,{followFormatText:a,unfollowFormatText:s,followFormatAriaLabel:r,unfollowFormatAriaLabel:l,contentLinkFormatText:d,discoverTopicsListSectionTitle:c,discoverTopicsListSectionTitleVNext:u,discoverTopicsListSectionSubtitle:h,discoverTopicsListSectionSubtitleVNext:g,interestsSearchStickyHeader:p,hideTopicText:m,hideFormatAriaLabel:f,unhideTopicText:v,unhideFormatAriaLabel:y}=n||{},b=[];return i.map((i=>{const n=t[i];b.push({topics:this.mapDiscoverTopicSectionTopics(n.topicIds,e),id:un.b.removeHyphens(n.id),title:n.title})})),{sectionTitle:o?u:c,sectionSubTitle:o?g:h,sectionId:un.b.removeHyphens(zn.S.sectionIds.discoverInterests),stickyHeader:o?p:c,topicSections:b,followFormatText:a,unfollowFormatText:s,followFormatAriaLabel:r,unfollowFormatAriaLabel:l,contentLinkFormatText:d,hideText:m,hideFormatAriaLabel:f,unhideText:v,unhideFormatAriaLabel:y}}mapBlockedListSectionData(e){const{localizedStrings:t,enableHiddenTopicsExperience:i}=this.config,{followFormatText:n,unfollowFormatText:o,followFormatAriaLabel:a,unfollowFormatAriaLabel:s,contentLinkFormatText:r,blockedListSectionTitle:l,blockedListSectionDescription:d,hideTopicText:c,hideFormatAriaLabel:u,unhideTopicText:h,unhideFormatAriaLabel:g}=t||{};return{sectionTitle:l,sectionSubTitle:d,sectionId:un.b.removeHyphens(zn.S.sectionIds.blockedList),blockedSourcesSectionData:this.mapBlockedSourcesSectionData(),blockedTopicsSectionData:i&&this.mapBlockedTopicsSectionData(e),followFormatText:n,unfollowFormatText:o,followFormatAriaLabel:a,unfollowFormatAriaLabel:s,contentLinkFormatText:r,hideText:c,hideFormatAriaLabel:u,unhideText:h,unhideFormatAriaLabel:g}}mapFollowedListSectionData(e){const{localizedStrings:t}=this.config,{followFormatText:i,unfollowFormatText:n,followFormatAriaLabel:o,unfollowFormatAriaLabel:a,contentLinkFormatText:s,followedListSectionTitle:r,followedListSectionDescription:l,hideTopicText:d,hideFormatAriaLabel:c,unhideTopicText:u,unhideFormatAriaLabel:h}=t||{};return{sectionTitle:r,sectionSubTitle:l,sectionId:un.b.removeHyphens(zn.S.sectionIds.followedList),followedTopicsSectionData:this.mapFollowedTopicsSectionProps(e),followedSourcesSectionData:this.mapFollowedSourcesSectionProps(),followFormatText:i,unfollowFormatText:n,followFormatAriaLabel:o,unfollowFormatAriaLabel:a,contentLinkFormatText:s,hideText:d,hideFormatAriaLabel:c,unhideText:u,unhideFormatAriaLabel:h}}mapDiscoverTopicSectionTopics(e,t){const{topicMap:i}=t,{enableDefaultInterests:n,enableWorkTopicInterests:o}=this.config;return e.map((e=>{var t;const a=i[e];return(null==a?void 0:a.followState)===$i.t.Followed?n||!(null==a?void 0:a.isInferred)||o&&(null===(t=a.apiSource)||void 0===t?void 0:t.id)===Oi.A.work?a:Object.assign(Object.assign({},a),{followState:$i.t.Unfollowed,isInferred:!1}):a}))}mapBlockedTopicsSectionData(e){const{hiddenTopics:t}=e,{localizedStrings:i}=this.config,{blockedTopicSectionHeader:n,blockedTopicSectionEmptyListMessage:o}=i||{};(!this.hiddenTopics||this.hiddenTopics.length<1)&&(this.hiddenTopics=(0,Dn.Z)(t));const a=un.b.removeHyphens(zn.S.sectionIds.hiddenTopics);return Object.assign(Object.assign({},this.mapTopicsSectionProps(this.hiddenTopics,a,this.interestsTelemetry.hiddenTopicsSectionTelemetryObject,this.interestsTelemetry.hiddenTopicsSectionTelemetryTag)),{sectionTitle:n,sectionId:a,sectionSubTitle:null,emptyStateCardTitle:o})}requestInterestToast(e,t,i,n,o){n?Tn.h.renderToast({id:`${e}-${i}`,toastType:i?Cn.p.Follow:Cn.p.Unfollow,inputText:t,expirationInMs:zn.S.defaultToastNotificationTimeoutMs,buttonText:this.config.localizedStrings.undoToastButtonText,onClick:()=>this.undoFollow(e,i,o)}):Tn.h.renderToast({id:`${e}-${i}`,toastType:Cn.p.InterestFailure,expirationInMs:zn.S.defaultToastNotificationTimeoutMs})}requestHideTopicToast(e,t,i,n,o,a,s){if(n){let n=i?Cn.p.HideTopic:Cn.p.UnhideTopic;s&&(n=i?Cn.p.HideSource:Cn.p.UnhideSource),Tn.h.renderToast({id:`${e}-${i}`,toastType:n,inputText:t,expirationInMs:zn.S.defaultToastNotificationTimeoutMs,buttonText:this.config.localizedStrings.undoToastButtonText,onClick:()=>this.undoHide(e,i,o,a)})}else Tn.h.renderToast({id:`${e}-${i}`,toastType:Cn.p.InterestFailure,expirationInMs:zn.S.defaultToastNotificationTimeoutMs})}requestTuneYourFeedToast(){const{localizedStrings:e}=this.config,{tuneFeedFailureToastText:t}=e||{};t&&Tn.h.renderToast({id:"tuneYourFeed",toastType:Cn.p.TuneYourFeed,expirationInMs:zn.S.defaultToastNotificationTimeoutMs,inputText:t})}async undoFollow(e,t,i){const{topicMap:n}=this.topicsDataConnector.getCurrentState(),o=n[e];o?t?(i&&(this.topicsDataConnector.setTopicHiddenState(o,!0),this.updateTopicListsAfterHide(o,!0)),this.topicsDataConnector.unfollowTopic(e),this.followedTopics=this.followedTopics.filter((t=>t.id!==e))):(this.topicsDataConnector.followTopic(e,"",!0),this.updateTopicListsAfterFollow(e,"",!0)):t?(this.publisherServiceClient.updateSourceFollowState(e,!1),i&&(await this.publisherServiceClient.publisherUserAction(e,yn.S.Mute,"POST"),this.mutedPublishers=this.mutedPublishers.filter((t=>t.id!==e)))):this.publisherServiceClient.updateSourceFollowState(e,!0),this.fetchFollowedPublishers(),this.fetchMutedPublishers(),this.mapInterestsData()}async undoHide(e,t,i,n){const{topicMap:o}=this.topicsDataConnector.getCurrentState(),a=o[e];a?(t?(this.topicsDataConnector.setTopicHiddenState(a,!1),this.hiddenTopics=this.hiddenTopics.filter((t=>t.id!==e)),i&&(this.topicsDataConnector.followTopic(e,"",!0),this.updateTopicListsAfterFollow(e,"",!0))):(this.topicsDataConnector.setTopicHiddenState(a,!0),this.updateTopicListsAfterHide(a,!0)),this.mapInterestsData()):t?(i&&this.publisherServiceClient.updateSourceFollowState(e,!0),await this.publisherServiceClient.publisherUserAction(n||e,yn.S.Mute,"DELETE"),this.mutedPublishers=this.mutedPublishers.filter((t=>t.id!==e))):this.publisherServiceClient.publisherUserAction(n||e,yn.S.Mute,"POST"),this.fetchFollowedPublishers(),this.fetchMutedPublishers(),this.mapInterestsData()}async restoreDefaultFollowedTopics(e){await Promise.all(e.map((e=>this.topicsDataConnector.unfollowTopic(e,!0)))),(0,fn.bY)(vn.T.InterestsChange),(0,bo.ih)(re.x.gridViewFeed),mt()}mapBlockedSourcesSectionData(){var e;let t;const{localizedStrings:i}=this.config,{blockedSourceSectionHeader:n,errorMessage:o,mutedPublisherEmptyStateCardTitle:a}=i||{};return(null===(e=this.mutedPublishers)||void 0===e?void 0:e.length)&&(t=this.mutedPublishers.map((e=>this.mapPublisher(e)))),{publisherCards:t,emptyStateCardTitle:this.mutedPublishersError?o:a,emptyListMessage:this.mapPublisherEmptyListMessage(i),sectionId:un.b.removeHyphens(zn.S.sectionIds.mutedPublishers),sectionTitle:n,sectionSubTitle:void 0,unmutePublisherCallback:this.unmutePublisherClickHandler,unmuteData:this.mapUnmuteProps()}}mapPublisher(e){const{logos:t,displayName:i,createdDateTime:n,id:o,profileId:a,cmsProviderId:s,locale:r}=e,{localizedStrings:l,mutedPublisherPlaceholderImageUrl:d}=this.config,c=t.length?t[0].imageLink.href:null,u=pn.Al.Locale||"en-us";return{publisherId:o,imgSrc:`${c||d}?w=80&h=80&q=90&m=6&f=${Hi.D3.JPG}`,imgAltText:i,publisherTitle:i,actionDateLabel:`${l.mutedActionText} ${new Date(n).toLocaleDateString(u)}`,actionButtonAriaLabel:(0,Mt.WU)(l.unMuteActionButtonAriaLabel,i),actionButtonText:l.unMuteActionButtonText,actionButtonCallback:null,actionButtonTelemetryTag:this.interestsTelemetry.publisherActionButtonTelemetryTag(l.unMuteActionButtonText,o),followed:!1,profileId:a,cmsProviderId:s,locale:r}}mapUnmuteProps(){const{dialogConfirmButtonText:e,dialogConfirmButtonAriaLabel:t,dialogCancelButtonText:i,dialogCancelButtonAriaLabel:n,dialogCloseButtonAriaLabel:o,unMutePublisherDialogMessageTemplate:a,unMutePublisherDialogHeaderTemplate:s,dialogAriaText:r}=this.config.localizedStrings;return{dialogContent:a,unmuteDialogData:{actionButtonCallback:null,cancelButtonCallback:null,localizedStrings:{actionButtonAriaLabel:t,actionButtonText:e,actionButtonTitleLabel:t,cancelButtonAriaLabel:n,cancelButtonText:i,cancelButtonTitleLabel:n,closeButtonAriaLabel:o,closeButtonTitleLabel:o,dialogHeadline:s,dialogAriaText:r}}}}mapPublisherEmptyListMessage(e){return e?this.mutedPublishersLoaded?this.mutedPublishersError?e.errorMessageHeading:e.mutedPublisherEmptyListMessage:e.sectionLoadingMessage:""}getSearchData(){var e;const{localizedStrings:t,enableHiddenTopicsExperience:i}=this.config;return{placeHolderText:i?t.interestsSearchPlaceholderVNext:t.interestsSearchPlaceholder,suggestionItems:null!==(e=this.suggestions)&&void 0!==e?e:[]}}mapSuggestionItemToTopicListboxData(e){var t,i;const{enableDefaultInterests:n,enableWorkTopicInterests:o}=this.config,{followFormatAriaLabel:a,followFormatText:s,followSourceText:r,unfollowFormatAriaLabel:l,unfollowFormatText:d,unfollowSourceText:c}=this.config.localizedStrings,{displayText:u,id:h,imageUrl:g,name:p,kind:m}=e,f=(0,Mt.WU)(m===zn.S.sourceNameTag?pi:gi,u),v=new xi(h,f,d,s,u,m===zn.S.sourceNameTag?de.uH.Publisher:de.uH.Topic);let y;m===zn.S.sourceNameTag&&(null===(t=this.followedPublishers)||void 0===t?void 0:t.some((e=>e.publisherId===h&&e.followed)))&&(y=!0);const{topicMap:b}=this.topicsDataConnector.getCurrentState(),S=b[h];if(m!==zn.S.sourceNameTag&&S&&(y=n?S.followState===$i.t.Followed:S.followState===$i.t.Followed&&(!S.isInferred||o&&(null===(i=S.apiSource)||void 0===i?void 0:i.id)===Oi.A.work)),m===Ii.u.UserQuery){const{followedTopicNames:t,followedTopicIds:i}=this.topicsDataConnector.getCurrentState(),n=t.find((e=>e.toLowerCase()===p.trim().toLowerCase()));if(y=!!n,y){const o=t.indexOf(n);e=Object.assign(Object.assign({},e),{id:i[o]})}}return{followButtonTelemetryTag:v.followButtonTelemetryTag,followFormatAriaLabel:a,followFormatText:m===zn.S.sourceNameTag?r:s,imgAltText:u,imgSrc:(0,Hi.mL)(g||zn.S.topicCardBackupImageUrl,{width:zn.S.ImageSize.SuggestionCardImgStandardDimensions.width,height:zn.S.ImageSize.SuggestionCardImgStandardDimensions.height,quality:90,enableDpiScaling:!1}),followed:y,topicId:e.id,topicTitle:u,unfollowButtonTelemetryTag:v.unfollowButtonTelemetryTag,unfollowFormatAriaLabel:l,unfollowFormatText:m===zn.S.sourceNameTag?c:d,type:m}}mapSavedStoriesCardProps(){var e;let t;const{localizedStrings:i}=this.config;return(null===(e=this.savedStories)||void 0===e?void 0:e.length)&&(t=this.savedStories.map((e=>this.mapStory(e)))),{emptyListMessage:this.savedStoriesLoaded?i.savedStoriesEmptyListMessage:i.sectionLoadingMessage,sectionId:un.b.removeHyphens(zn.S.sectionIds.savedStories),sectionTitle:i.savedStoriesSectionHeader,sectionSubTitle:null,cards:t}}mapStory(e,t){var i,n,o,a,s,r,l,d,c,u;const{id:h,title:g,destinationUrl:p,provider:m,images:f}=e.cardContent,{category:v,actions:y}=e.metadata,{titleFormatAriaLabel:b,titleFormatText:S,imgAltFormatText:w,saveButtonText:T,undoSaveButtonText:C,moreOptionsAriaLabel:x}=this.config.localizedStrings,k=(0,Mt.WU)(b,g,null==m?void 0:m.name),$=(0,Mt.WU)(S,g,null===(i=null==f?void 0:f[0])||void 0===i?void 0:i.attribution),O=(0,Mt.WU)(w,g,null===(n=null==f?void 0:f[0])||void 0===n?void 0:n.attribution);return{id:h,title:g,destinationUrl:p,category:v,actions:t&&t.indexOf(h)>-1?["save"]:y,providerName:null==m?void 0:m.name,titleAriaLabel:k,titleLabel:$,saveButtonText:T,undoSaveButtonText:C,actionsButtonText:x,articleProps:{id:h,headlineTitle:g,href:p,image:{alt:null===(o=null==f?void 0:f[0])||void 0===o?void 0:o.caption,src:null===(a=null==f?void 0:f[0])||void 0===a?void 0:a.url},provider:m&&{id:m.id,name:m.name,image:{alt:m.id,src:m.logoUrl}}},imageProps:(null===(s=null==f?void 0:f[0])||void 0===s?void 0:s.url)&&{src:(0,Hi.mL)(null===(r=null==f?void 0:f[0])||void 0===r?void 0:r.url,{width:zn.S.ImageSize.ContentCardImageStandardDimensions.width,height:zn.S.ImageSize.ContentCardImageStandardDimensions.height,focalRegion:null===(l=null==f?void 0:f[0])||void 0===l?void 0:l.focalRegion,quality:null===(d=null==f?void 0:f[0])||void 0===d?void 0:d.quality,enableDpiScaling:!1}),alt:O,"aria-label":null===(c=null==f?void 0:f[0])||void 0===c?void 0:c.caption,title:null===(u=null==f?void 0:f[0])||void 0===u?void 0:u.caption,width:zn.S.ImageSize.ContentCardImageStandardDimensions.width,height:zn.S.ImageSize.ContentCardImageStandardDimensions.height},providerProps:m&&{src:m.logoUrl&&(0,Hi.mL)(m.logoUrl,{width:zn.S.ImageSize.ContentCardProviderImgStandardDimensions.width,height:zn.S.ImageSize.ContentCardProviderImgStandardDimensions.height,enableDpiScaling:!1}),alt:m.name}}}mapReadStoriesCardProps(){var e,t;let i,n;const{localizedStrings:o}=this.config;return(null===(e=this.savedStories)||void 0===e?void 0:e.length)&&(n=this.savedStories.map((e=>e.cardContent.id))),(null===(t=this.readStories)||void 0===t?void 0:t.length)&&(i=this.readStories.map((e=>this.mapStory(e,n)))),{emptyListMessage:this.readStoriesLoaded?null==o?void 0:o.readStoriesEmptyListMessage:null==o?void 0:o.sectionLoadingMessage,sectionId:un.b.removeHyphens(zn.S.sectionIds.readStories),sectionTitle:null==o?void 0:o.readStoriesSectionHeader,sectionSubTitle:null,cards:i}}getSportsEntityTypeDescription(e){if((0,Mt.TF)(e))return null;switch(e.toLowerCase()){case Sn.fs.Team.toLowerCase():return this.strings.sportsTeam;case Sn.fs.League.toLowerCase():return this.strings.sportsLeague;default:return null}}clickOnSportsEntitySwitch(e){if(!e||(0,Mt.TF)(e.id))return;const t=e.id.split(Sn.I4),i=t.length;if(!i)return;const n=t[0],o=i>1?t[1]:"";e.checked?bn.d.removeDislikeSportsCard({id:n,type:o}):bn.d.notInterestedSportsCard({id:n,name:e.title,type:o})}calcUnmutedPublishersCardFocus(e,t){const i=this.shadowRoot.getElementById(zn.S.MutedPublishersId),n=i&&i.querySelector(zn.S.MsftPublishersCardTagName).shadowRoot.querySelectorAll(".publishers-card .publisher");this.cancelHiddenFocusElement=t&&e.path[0]||this.cancelHiddenFocusElement,t&&n&&1===n.length?this.confirmHiddenFocusElement=this.shadowRoot.getElementById(zn.S.MutedPublishersMenuItemId):(t&&n&&n.length&&Array.from(n).map(((e,i)=>{if(e.id===t.publisherId){const e=i?n[i-1]:n[i];this.confirmHiddenFocusElement=e&&e.querySelector("fluent-button.action-button.outline")}})),!t&&this.cancelHiddenFocusElement.focus())}canDisplayCommuteOptions(){return!!(this.strings.trafficSettingsStrings&&this.trafficAutosuggestClient&&this.commuteLocations)&&(this.config.displayCommuteOptions&&this.isUserMsaAuthenticated)}isActionBasedSettingCard(e){return Object.keys(zn.S.ActionBasedSettingCardTargetMap).includes(e)}isEditingHomeLocation(){return!!new URL(location.href).searchParams.get("edithomelocation")}isEditingWorkLocation(){return!!new URL(location.href).searchParams.get("editworklocation")}}(0,T.gn)([B.LO],Qa.prototype,"interestsData",void 0),(0,T.gn)([B.LO],Qa.prototype,"topicDataState",void 0),(0,T.gn)([B.LO],Qa.prototype,"interestsNextState",void 0),(0,T.gn)([B.LO],Qa.prototype,"interestsTelemetry",void 0),(0,T.gn)([B.LO],Qa.prototype,"sidePaneSticky",void 0),(0,T.gn)([B.LO],Qa.prototype,"searchBoxSticky",void 0),(0,T.gn)([B.LO],Qa.prototype,"useStickyHeaderHeightSmallScreen",void 0),(0,T.gn)([B.LO],Qa.prototype,"toast",void 0),(0,T.gn)([B.LO],Qa.prototype,"suggestions",void 0),(0,T.gn)([B.LO],Qa.prototype,"followedPublishers",void 0),(0,T.gn)([B.LO],Qa.prototype,"mutedPublishers",void 0),(0,T.gn)([B.LO],Qa.prototype,"savedStories",void 0),(0,T.gn)([B.LO],Qa.prototype,"readStories",void 0),(0,T.gn)([B.LO],Qa.prototype,"notificationSettingMap",void 0),(0,T.gn)([B.LO],Qa.prototype,"accountLinkingData",void 0),(0,T.gn)([B.LO],Qa.prototype,"topicsAndInterestsLoaded",void 0),(0,T.gn)([B.LO],Qa.prototype,"mutedPublishersLoaded",void 0),(0,T.gn)([B.LO],Qa.prototype,"readStoriesLoaded",void 0),(0,T.gn)([B.LO],Qa.prototype,"isDarkMode",void 0),(0,T.gn)([B.LO],Qa.prototype,"freArtifact",void 0),(0,T.gn)([B.LO],Qa.prototype,"renderColdStart",void 0),(0,T.gn)([B.LO],Qa.prototype,"discoverSectionsToRender",void 0),(0,T.gn)([B.LO],Qa.prototype,"onTranslucentBackgroundClass",void 0),(0,T.gn)([B.LO],Qa.prototype,"sportsDislikes",void 0),(0,T.gn)([B.LO],Qa.prototype,"commuteLocations",void 0),(0,T.gn)([B.LO],Qa.prototype,"userSettings",void 0),(0,T.gn)([(0,C.Lj)({mode:"boolean"})],Qa.prototype,"isUserMsaAuthenticated",void 0),(0,T.gn)([C.Lj],Qa.prototype,"backgroundColors",void 0),(0,T.gn)([B.lk],Qa.prototype,"sidePaneLayoutStyle",null),(0,T.gn)([B.lk],Qa.prototype,"sidePaneHeaderElement",null),(0,T.gn)([B.lk],Qa.prototype,"sidePaneMenuElement",null),(0,T.gn)([B.lk],Qa.prototype,"followedListSectionElement",null),(0,T.gn)([B.lk],Qa.prototype,"followedTopicsSectionElement",null),(0,T.gn)([B.lk],Qa.prototype,"followedSourcesSectionElement",null),(0,T.gn)([B.lk],Qa.prototype,"blockedListSectionElement",null),(0,T.gn)([B.lk],Qa.prototype,"blockedSourcesSectionElement",null),(0,T.gn)([B.lk],Qa.prototype,"blockedTopicsSectionElement",null),(0,T.gn)([B.lk],Qa.prototype,"discoverInterestsRiverElement",null),(0,T.gn)([B.lk],Qa.prototype,"unmuteDialogElement",null),(0,T.gn)([B.lk],Qa.prototype,"unmuteDialogBodyElement",null),(0,T.gn)([B.lk],Qa.prototype,"savedStoriesSectionElement",null),(0,T.gn)([B.lk],Qa.prototype,"readStoriesSectionElement",null),(0,T.gn)([B.lk],Qa.prototype,"sdSettingPageElement",null),(0,T.gn)([B.lk],Qa.prototype,"feedSettingPageElement",null),(0,T.gn)([B.lk],Qa.prototype,"productivitySettingPageElement",null),(0,T.gn)([B.lk],Qa.prototype,"gamingSettingPageElement",null),(0,T.gn)([B.lk],Qa.prototype,"notificationRiverElement",null),(0,T.gn)([B.lk],Qa.prototype,"settingMarketSelectorElement",null),(0,T.gn)([B.lk],Qa.prototype,"settingAccountLinkingElement",null);class es extends x.I{constructor(){super(...arguments),this.headingLevel=2}}(0,T.gn)([C.Lj],es.prototype,"heading",void 0),(0,T.gn)([(0,C.Lj)({attribute:"heading-level",mode:"fromView",converter:C.Id})],es.prototype,"headingLevel",void 0),(0,T.gn)([C.Lj],es.prototype,"description",void 0);class ts extends es{constructor(){super(...arguments),this.enableSticky=!1,this.enableSearchImage=!1,this.stickyHeader=""}}(0,T.gn)([(0,C.Lj)({mode:"boolean",attribute:"enable-sticky"})],ts.prototype,"enableSticky",void 0),(0,T.gn)([(0,C.Lj)({mode:"boolean",attribute:"enable-search-image"})],ts.prototype,"enableSearchImage",void 0),(0,T.gn)([(0,C.Lj)({attribute:"sticky-header"})],ts.prototype,"stickyHeader",void 0);const is=O.i`
    .discover-header.discover-header-search-image {
        --discover-header-height: 188px;
        width: var(--discover-header-width, 612px);
    }

    .discover-header .search-image {
        display: none;
    }

    .discover-header-search-image .discover-header-content {
        padding: var(--searchbox-padding-top, 12px) 0;
    }

    .discover-header-search-image .discover-header-heading {
        font-weight: 700;
        padding-top: 12px;
        padding-bottom: 8px;
        text-align: center;
    }

    .discover-header-search-image .discover-header-sub-heading {
        color: var(neutralForegroundHint);
        padding: 0 12px;
        text-align: initial;
    }

    .sticky .discover-header-heading-group {
        display: flex;
    }

    .sticky .discover-header-search-image .discover-header-heading-group {
        height: 0;
    }

    .sticky .discover-header-search-image .discover-header-content {
        padding-top: 12px;
        padding-inline-start: 16px;
    }

    .sticky .discover-header-search-image .discover-header-heading {
        font-weight: 600;
    }

    :host .sticky .discover-header-search-image .header-content-heading {
        padding-inline-start: 0;
    }

    @media (max-width: 655.98px) {
        .discover-header-search-image {
            --searchbox-width: 310px;
        }

        .discover-header {
            margin: 0 auto;
        }

        .sticky .discover-header-search-image .discover-header-content {
            padding-inline-start: 0;
        }
    }

    @media (min-width: 655.98px) {
        .discover-header.discover-header-search-image {
            --discover-header-height: 203px;
        }

        .sticky .discover-header-search-image .discover-header-content {
            text-align: initial;
        }
    }

    @media (min-width: 979.98px) {
        .discover-header-search-image {
            --searchbox-width: 360px;
        }

        .discover-header-search-image .discover-header-content {
            display: inline-block;
            padding-top: 0;
            padding-inline-start: 24px;
            margin: 0;
        }

        .discover-header-search-image .discover-header-heading-group {
            width: 370px;
            padding-inline-start: 24px;
            height: 148px;
        }

        .discover-header-search-image .discover-header-heading {
            padding-top: var(--discover-heading-padding-top, 24px);
            padding-bottom: 12px;
            text-align: initial;
        }

        .discover-header-search-image .discover-header-sub-heading {
            padding: 0px;
        }

        .discover-header-search-image .discover-header-heading,
        .discover-header-search-image .discover-header-sub-heading {
            display: block;
        }

        .discover-header-search-image .search-image {
            display: inline-block;
            padding-inline-start: 15px;
            position: absolute;
        }
    }
`,ns=O.i`
    ${is}

    .discover-header {
        --elevation: 4;
        width: var(--discover-header-width, 620px);
        height: var(--discover-header-height, 172px);
        margin-top: 21px;
        max-width: 660px;
        min-width: 300px;
        background: var(--discover-interests-header-background, radial-gradient(100% 193.51% at 100% 0%, #EDF4F8 0%, #EFF2FA 16.92%, #FAEFF6 34.8%, #FAE6F2 48.8%, #FAF0F7 63.79%, #F1F1FB 81.34%, #F0F4F8 100%));
        border: calc(var(--outline-width) * 1px) solid transparent;
        border-radius: calc(${$.rSr} * 1px);
        ${F.XC};
        transition: width 0.3s, margin-inline-start 0.3s;
    }

    .discover-header-heading-group {
        width: 100%;
        display: inline-flex;
        flex-direction: column;
        position: relative;
    }

    .discover-header-content {
        margin: 0 auto;
        padding-top: var(--searchbox-padding-top, 30px);
        text-align: center;
    }

    .discover-header-heading, .discover-header-sub-heading {
        text-align: center;
    }

    .discover-header-heading {
        font-weight: 600;
        font-size: ${$.mWK};
        line-height: ${$.I7_};
        padding-top: var(--discover-heading-padding-top, 30px);
        transition: opacity 1s;
    }
    
    .discover-header-sub-heading {
        font-size: ${$.cSu};
        line-height: ${$.RUt};
        transition: opacity 1s;
    }

    .discover-header-heading:focus, .discover-header-sub-heading:focus {
        outline: none;
    }

    .header-content-heading {
        display: block;
        opacity: var(--header-content-heading-opacity, 0);
        line-height: 0;
        font-size: 0;
    }

    .placeholder {
        display: inline-block;
        height: var(--placeholder-height, 172px);
        z-index: 1;
    }

    .sticky .search-image {
        display: none;
    }

    .sticky .header-content-heading {
        display: block;
        font-weight: 600;
        font-size: var(--discover-heading-font-size, ${$.mWK});
        line-height: var(--heading-line-height, ${$.I7_});
        transition: var(--header-content-heading-transition, opacity 1s);
        text-align: initial;
        padding-inline-start: 15px;
    }
    
    .sticky .discover-header {
        position: fixed;
        top: var(--discover-header-sticky-top);
        margin-top: 0px;
        margin-inline-start: var(--discover-header-margin-inline-start, -20px);
        z-index: ${we.K.Above.toString()};
    }
    
    .sticky .discover-header-heading {
        opacity: 0;
        line-height: 0;
        font-size: 0;
    }
    
    .sticky .discover-header-sub-heading {
        opacity: 0;
        line-height: 0;
        font-size: 0;
    }

    @media (max-width: 655.98px) {
        :host {
            --discover-header-width: 334px;
            --placeholder-height: 140px;
        }
        :host .sticky,
        :host .sticky .discover-header-search-image {
            --discover-header-width: 100%;
            --discover-header-height: 56px;
            --discover-heading-padding-top: 0px;
            --discover-header-margin-inline-start: 0;
            --header-content-heading-opacity: 0;
            --header-content-heading-transition: opacity 0s;
            --heading-line-height: 0px;
            --searchbox-width: 334px;
            --searchbox-padding-top: 12px;
        }
        :host .sticky .discover-header {
            margin-left: auto;
            margin-right: auto;
            left: 0;
            right: 0;
        }
    }

    @media (min-width: 655.98px) and (max-width: 979.98px) {
        :host {
            --discover-header-width: 303px;
            --searchbox-width: 280px;
        }
        :host .sticky,
        :host .sticky .discover-header-search-image {
            --discover-header-width: 334px;
            --discover-header-height: 82px;
            --discover-heading-padding-top: 0px;
            --discover-heading-font-size: ${$.PwC};
            --header-content-heading-opacity: 1;
            --heading-line-height: 22px;
            --searchbox-width: 302px;
            --searchbox-padding-top: 12px;
            --search-margin-top: 4px;
        }
    }

    @media (min-width: 979.98px) {
        :host .sticky,
        :host .sticky .discover-header-search-image {
            --discover-header-width: 660px;
            --discover-header-height: 100px;
            --discover-heading-padding-top: 0px;
            --header-content-heading-opacity: 1;
            --searchbox-width: 620px;
            --searchbox-padding-top: 15px;
            --search-margin-top: 10px;
        }

        :host .sticky .header-content-heading {
            padding-inline-start: 19px;
        }
    }
`.withBehaviors((0,G.vF)(O.i`
            .discover-header {
                background: ${$.IfY};
            }
        `)),os=L.d`
    <template>
        <div role="search" class="${e=>e.enableSticky?"sticky":""}" aria-label=${e=>e.heading}>
            <div class="discover-header${e=>e.enableSearchImage?" discover-header-search-image":""}" part="discover-header">
                <div class="discover-header-heading-group" part="discover-header-heading-group">
                    <span class="discover-header-heading" part="discover-header-heading" role="heading" aria-level="1">${e=>e.heading}</span>
                    <span class="discover-header-sub-heading" part="discover-header-sub-heading" role="heading" aria-level="2">${e=>e.description}</span>
                </div>
                ${(0,I.g)((e=>e.enableSearchImage),L.d`
                    <img class="search-image" src="${"https://assets.msn.com/staticsb/statics/latest/interests-manager/header-image.png"}" aria-hidden="true"/>
                `)}
                <div class="discover-header-content" part="discover-header-content">
                    <span class="header-content-heading" part="header-content-heading" role="heading" aria-level="1">${e=>e.stickyHeader}</span>
                    <slot name="content"></slot>
                </div>
            </div>
        </div>
        ${(0,I.g)((e=>e.enableSticky),L.d`<span class="placeholder"></span>`)}
        <msn-interests-river-section>
            <!-- This slot is used to render topics-section instances -->
            <slot></slot>
        </msn-interests-river-section>
    </template>
`;let as=class extends ts{};as=(0,T.gn)([(0,Ri.M)({name:"msn-discover-interests-river-section",template:os,styles:ns})],as);const ss=es.compose({baseName:"interests-river-section",template:(e,t)=>L.d`
    <div class="header">
        <span
            class="heading"
            part="heading"
            role="heading"
            aria-level="${e=>e.headingLevel}"
        >
            ${e=>e.heading}
        </span>
        <slot name="extra"></slot>
        ${(0,I.g)((e=>e.description),L.d`<span class="description">${e=>e.description}</span>`)}
    </div>
    <section>
        <slot></slot>
    </section>
`,styles:(e,t)=>O.i`
    :host {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        padding-bottom: 20px;
        padding-top: 20px;
        width: 620px;
    }

    .header {
        grid-area: 1 / 1 / 3 / 3;
        display: grid;
    }

    .header .heading {
        font-size: ${$.mWK};
        font-weight: 600;
        grid-area: 1 / 1 / 2 / 2;
        line-height: ${$.I7_};
    }

    .header .description {
        font-size: ${$.sNp};
        grid-area: 2 / 1 / 3 / 3;
        line-height: ${$.vgC};
        padding-bottom: 20px;
        padding-top: 2px;
    }

    section {
        grid-area: 3 / 1 / 4 / 3;
    }

    ::slotted([slot="extra"]) {
        grid-area: 1 / 2 / 2 / 3;
        justify-self: end;
    }

    @media (max-width: 655.98px) {
        :host {
            grid-template-columns: 1fr;
        }
    }

    @media (min-width: 656px) and (max-width: 979.98px) {
        :host {
            grid-template-columns: 1fr;
            width: 311px;
        }
    }
`});class rs extends es{toggleRestoreDefaultSettingsButton(){this.isRestoreButtonVisible=!this.isRestoreButtonVisible}handleUserActionOnRestoreButton(){this.isRestoreButtonVisible=!1,this.restoreFollowedInterestsButtonClickedHandler&&this.restoreFollowedInterestsButtonClickedHandler()}}(0,T.gn)([(0,C.Lj)({attribute:"more-options-telemetry-tag"})],rs.prototype,"moreOptionsTelemetryTag",void 0),(0,T.gn)([(0,C.Lj)({attribute:"more-options-aria-label"})],rs.prototype,"moreOptionsAriaLabel",void 0),(0,T.gn)([(0,C.Lj)({attribute:"restore-followed-interests-action-text"})],rs.prototype,"restoreFollowedInterestsActionText",void 0),(0,T.gn)([(0,C.Lj)({attribute:"restore-followed-interests-button-telemetry-tag"})],rs.prototype,"restoreFollowedInterestsButtonTelemetryTag",void 0),(0,T.gn)([B.LO],rs.prototype,"isRestoreButtonVisible",void 0),(0,T.gn)([B.LO],rs.prototype,"restoreFollowedInterestsButtonClickedHandler",void 0);const ls=O.i`
    .restore-icon svg {
        transform: scale(-1, 1) rotate(90deg);
    }
`,ds=O.i`
    .restore-icon svg {
        transform: scale(1) rotate(90deg);
    }
`,cs=O.i`
    msft-interests-river-section {
        padding-bottom: 0;
    }

    msft-interests-river-section.no-description::part(heading) {
        padding-bottom: 20px;
    }

    .more {
        display: var(--display);
        height: 32px;
        text-align: center;
    }

    .restore {
        --elevation: 11;
        display: var(--display);
        ${F.XC}
        grid-area: 2 / 2 / 3 / 3;
        height: 44px;
        position: absolute;
        top: -5px;
        z-index: 1;
    }

    .restore-icon {
        display: inline;
        padding-left: 6px;
        padding-right: 6px;
        position: relative;
        top: 3px;
    }

    .restore-text {
        display: inline;
    }

    fluent-button::part(control) {
        border:0;
        box-shadow: none;
    }

    @media (max-width: 655.98px) {
        msft-interests-river-section {
            max-width: 334px;
        }
    }
`.withBehaviors(new R.O(ls,ds)),us=L.d`
    <fluent-button
        appearance="stealth"
        class="restore"
        slot="extra"
        style="--display: ${e=>e.isRestoreButtonVisible?"block":"none"}"
        @click=${e=>e.handleUserActionOnRestoreButton()}
        @keypress=${e=>e.handleUserActionOnRestoreButton()}
        data-t="${e=>e.restoreFollowedInterestsButtonTelemetryTag}"
    >
        <div class="restore-icon">
            <svg viewBox="0 0 16 16" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
                <path
                    d="M10.1328 0.296875C10.9974 0.53125 11.7891 0.898438 12.5078 1.39844C13.2266 1.89323 13.8438 2.48177 14.3594 3.16406C14.8802 3.84115 15.2839 4.59375 15.5703 5.42188C15.8568 6.24479 16 7.10417 16 8C16 8.73438 15.9036 9.44271 15.7109 10.125C15.5234 10.8073 15.2552 11.4453 14.9062 12.0391C14.5625 12.6328 14.1458 13.1745 13.6562 13.6641C13.1719 14.1484 12.6328 14.5651 12.0391 14.9141C11.4453 15.2578 10.8073 15.526 10.125 15.7188C9.44271 15.9062 8.73438 16 8 16C7.26562 16 6.55729 15.9062 5.875 15.7188C5.19271 15.526 4.55469 15.2578 3.96094 14.9141C3.36719 14.5651 2.82552 14.1484 2.33594 13.6641C1.85156 13.1745 1.4349 12.6328 1.08594 12.0391C0.742188 11.4453 0.473958 10.8099 0.28125 10.1328C0.09375 9.45052 0 8.73958 0 8C0 7.27083 0.0963542 6.5625 0.289062 5.875C0.481771 5.1875 0.755208 4.54167 1.10938 3.9375C1.46875 3.32812 1.90365 2.77604 2.41406 2.28125C2.92448 1.78125 3.5 1.35417 4.14062 1H2V0H6V4H5V1.67969C4.39062 1.97135 3.83854 2.33854 3.34375 2.78125C2.85417 3.21875 2.4349 3.71354 2.08594 4.26562C1.73698 4.8125 1.46875 5.40365 1.28125 6.03906C1.09375 6.67448 1 7.32812 1 8C1 8.64062 1.08333 9.26042 1.25 9.85938C1.41667 10.4531 1.65104 11.0104 1.95312 11.5312C2.26042 12.0469 2.6276 12.5182 3.05469 12.9453C3.48177 13.3724 3.95312 13.7396 4.46875 14.0469C4.98958 14.349 5.54688 14.5833 6.14062 14.75C6.73438 14.9167 7.35417 15 8 15C8.64062 15 9.25781 14.9167 9.85156 14.75C10.4505 14.5833 11.0078 14.349 11.5234 14.0469C12.0443 13.7396 12.5182 13.3724 12.9453 12.9453C13.3724 12.5182 13.737 12.0469 14.0391 11.5312C14.3464 11.0104 14.5833 10.4531 14.75 9.85938C14.9167 9.26562 15 8.64583 15 8C15 7.21875 14.8724 6.46615 14.6172 5.74219C14.3672 5.01823 14.0156 4.35938 13.5625 3.76562C13.1094 3.17188 12.5677 2.65885 11.9375 2.22656C11.3125 1.78906 10.6224 1.46615 9.86719 1.25781L10.1328 0.296875Z"
                />
            </svg>
        </div>
        <div class="restore-text">
            ${e=>e.restoreFollowedInterestsActionText}
        </div>
    </fluent-button>
`,hs=L.d`
    <fluent-button
        appearance="stealth"
        aria-label="${e=>e.moreOptionsAriaLabel}"
        role="button"
        class="more"
        slot="extra"
        style="--display: ${e=>e.restoreFollowedInterestsActionText?"block":"none"}"
        title="${e=>e.moreOptionsAriaLabel}"
        @click=${e=>e.toggleRestoreDefaultSettingsButton&&e.toggleRestoreDefaultSettingsButton()}
        @keypress=${e=>e.toggleRestoreDefaultSettingsButton&&e.toggleRestoreDefaultSettingsButton()}
        data-t="${e=>e.moreOptionsTelemetryTag}"
    >
        <svg viewBox="0 0 16 16" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
            <path
                d="M2 7C2.14063 7 2.27083 7.02607 2.39063 7.07813C2.51041 7.1302 2.61459 7.20313 2.70313 7.29687C2.79687 7.3854 2.86979 7.4896 2.92187 7.6094C2.97396 7.7292 3 7.8594 3 8C3 8.1406 2.97396 8.2708 2.92187 8.3906C2.86979 8.5104 2.79687 8.6172 2.70313 8.71093C2.61459 8.79947 2.51041 8.8698 2.39063 8.92187C2.27083 8.97393 2.14063 9 2 9C1.85937 9 1.72917 8.97393 1.60937 8.92187C1.48959 8.8698 1.38281 8.79947 1.28906 8.71093C1.20052 8.6172 1.13021 8.5104 1.07813 8.3906C1.02604 8.2708 1 8.1406 1 8C1 7.8594 1.02604 7.7292 1.07813 7.6094C1.13021 7.4896 1.20052 7.3854 1.28906 7.29687C1.38281 7.20313 1.48959 7.1302 1.60937 7.07813C1.72917 7.02607 1.85937 7 2 7ZM8 7C8.1406 7 8.2708 7.02607 8.3906 7.07813C8.5104 7.1302 8.6146 7.20313 8.70313 7.29687C8.79687 7.3854 8.8698 7.4896 8.92187 7.6094C8.97393 7.7292 9 7.8594 9 8C9 8.1406 8.97393 8.2708 8.92187 8.3906C8.8698 8.5104 8.79687 8.6172 8.70313 8.71093C8.6146 8.79947 8.5104 8.8698 8.3906 8.92187C8.2708 8.97393 8.1406 9 8 9C7.8594 9 7.7292 8.97393 7.6094 8.92187C7.4896 8.8698 7.3828 8.79947 7.28907 8.71093C7.20053 8.6172 7.1302 8.5104 7.07813 8.3906C7.02607 8.2708 7 8.1406 7 8C7 7.8594 7.02607 7.7292 7.07813 7.6094C7.1302 7.4896 7.20053 7.3854 7.28907 7.29687C7.3828 7.20313 7.4896 7.1302 7.6094 7.07813C7.7292 7.02607 7.8594 7 8 7ZM14 7C14.1406 7 14.2708 7.02607 14.3906 7.07813C14.5104 7.1302 14.6146 7.20313 14.7031 7.29687C14.7969 7.3854 14.8698 7.4896 14.9219 7.6094C14.9739 7.7292 15 7.8594 15 8C15 8.1406 14.9739 8.2708 14.9219 8.3906C14.8698 8.5104 14.7969 8.6172 14.7031 8.71093C14.6146 8.79947 14.5104 8.8698 14.3906 8.92187C14.2708 8.97393 14.1406 9 14 9C13.8594 9 13.7292 8.97393 13.6094 8.92187C13.4896 8.8698 13.3828 8.79947 13.2891 8.71093C13.2005 8.6172 13.1302 8.5104 13.0781 8.3906C13.0261 8.2708 13 8.1406 13 8C13 7.8594 13.0261 7.7292 13.0781 7.6094C13.1302 7.4896 13.2005 7.3854 13.2891 7.29687C13.3828 7.20313 13.4896 7.1302 13.6094 7.07813C13.7292 7.02607 13.8594 7 14 7Z"
            />
        </svg>
    </fluent-button>
`,gs=L.d`
    <msft-interests-river-section
        class=${e=>e.description?"":"no-description"}
        description=${e=>e.description}
        heading=${e=>e.heading}
        style="position: relative"
    >
        ${hs}
        ${us}
        <slot></slot>
    </msft-interests-river-section>
`;let ps=class extends rs{};var ms;ps=(0,T.gn)([(0,Ri.M)({name:"msn-followed-interests-river-section",template:gs,styles:cs})],ps),n.K.getOrCreate().withShadowRootMode("open").withElementDisambiguation((()=>n.h.ignoreDuplicate)).withPrefix("msft").register(ss()),function(e){e.staging="https://www.staging-bing-int.com/orgId/acclink/redirect?refreshcookie=1&ru={returnUrl}",e.production="https://www.bing.com/orgId/acclink/redirect?refreshcookie=1&ru={returnUrl}"}(ms||(ms={}));var fs,vs,ys;!function(e){e.FamilyName="family_name",e.GivenName="given_name",e.PreferredUsername="preferred_username",e.Puid="puid"}(fs||(fs={})),function(e){e[e.Ready=0]="Ready",e[e.Linking=1]="Linking",e[e.Unlinking=2]="Unlinking"}(vs||(vs={})),function(e){e.ApiError="accountLinking-apiError",e.LinkError="accountlinking-linkError",e.LinkSuccess="accountlinking-linkSuccess",e.UnlinkSuccess="accountlinking-unlinkSuccess"}(ys||(ys={}));const bs=8e3;var Ss;!function(e){e.Root="AccountLinking",e.LinkButton="AccountLinkingLink",e.LinkCancelButton="AccountLinkingLinkCancel",e.LinkConfirmButton="AccountLinkingLinkConfirm",e.UnlinkButton="AccountLinkingUnlink",e.UnlinkCancelButton="AccountLinkingUnlinkCancel",e.UnlinkConfirmButton="AccountLinkingUnlinkConfirm"}(Ss||(Ss={}));const ws="AccountLinkingToast";var Ts=i(79814),Cs=i(3072),xs=i(27002),ks=i(28803),$s=i(54297),Os=i(10495);var Ls=i(51403),Is=i(71828);class As extends Ri.H{constructor(){super(),this.faqLink="https://marketingsites-prod.microsoft.com/en-us/bing/account-linking-faq?preview=inprogress&variationChoices=*:default",this.handleClickLink=async()=>{this.msaAuthResult=await function(e,t,i=!0){return(0,T.mG)(this,void 0,void 0,(function*(){const n=yield(0,Ge.Yu)();if(n)try{const o=yield n.loginPopup(Object.assign(Object.assign({},(0,Ge.qW)()),{prompt:e||t?"login":"select_account",loginHint:e||""}));if(o)(0,Cs.Ov)(Ts.g4.loginPopup,"Success");else{const e="authResult is empty";Pe.k.logError(`dual-auth: loginPopup failed: ${e}`),(0,Cs.Ov)(Ts.g4.loginPopup,e)}if(i){yield(0,qe.vW)(o);const e=yield(0,$s.zj)(o),t=(0,Os.Jz)(e);(0,xs.OE)(t)}return o}catch(e){const t=(0,Ae.n)(e);Pe.k.logError(`dual-auth: loginPopup failed: ${t}`),(0,Cs.Ov)(Ts.g4.loginPopup,t),(0,ks.h)(Me.MCu.MsalLoginPopupException,t)}}))}(null,!1,!1),this.msaAuthResult?"9188040d-6c67-4c5b-b112-36a304b66dad"!==this.msaAuthResult.tenantId?((0,Ee.H)(Me.jR0.FailedMsaLogin,"Account that user signed into is not MSA.",(0,qe.tE)()),Tn.h.renderToast({id:"accountlinking-linkError",toastType:Cn.p.Error,inputText:this.strings.errorMessages.wrongAccountType,expirationInMs:bs})):(this.linkingFlowContract=await this.fetchProfilesData(this.msaAuthResult),this.linkingFlowContract?this.state=Object.assign(Object.assign({},this.state),{currentState:1}):Tn.h.renderToast({id:"accountlinking-linkError",toastType:Cn.p.Error,inputText:this.strings.errorMessages.apiException,expirationInMs:bs})):((0,Ee.H)(Me.jR0.FailedMsaLogin,"loginPopup() did not return an AuthenticationResult.",(0,qe.tE)()),Tn.h.renderToast({id:"accountlinking-linkError",toastType:Cn.p.Error,inputText:this.strings.errorMessages.unsuccessfulSignIn,expirationInMs:bs}))},this.handleClickLinkConfirm=async()=>{this.state=Object.assign(Object.assign({},this.state),{isLoading:!0});try{await function(e){return(0,T.mG)(this,void 0,void 0,(function*(){if(!e)throw new Error("MSA ID token is undefined or empty.");const t=yield Qe("POST");if(!t)throw new Error("Request preparation failed.");const i=t.baseRequest;i.msaToken=e,t.requestParams.body=JSON.stringify(i);try{tt("/create",t.requestParams);const e=yield fetch(et("/v2/create"),t.requestParams);if(!e||!e.ok)throw new Error(`Response was not successful, status: ${e.statusText}`);let i,n,o=!1;if(201===e.status)i=!0,o=!0;else{if(n=yield e.json(),5e3!==n.ErrorCode&&5001!==n.ErrorCode)throw new Error(`API error code ${n.ErrorCode}: ${n.ErrorDescription}`);i=5001!==n.ErrorCode,o=5001!==n.ErrorCode}return{isLinked:o,tenantEnabled:i}}catch(e){const t=(0,Ae.n)(e);throw(0,Ee.OO)(e,Me.Xw0.ApiCallException,"Exception in createLink()",(0,qe.tE)()),Pe.k.logError(`account-linking: Exception in createLink with error ${t}`),new Error(`Exception in createLink: ${t}`)}}))}(this.msaAuthResult.idToken),this.apiData=await Ke(!0),this.setToastSignal("accountlinking-linkSuccess"),window.location.replace(this.bingRedirectUrl)}catch(e){(0,Ee.OO)(e,Me.jR0.FailedToLinkAccounts,"Exception caught when creating link.",(0,qe.tE)()),this.state=Object.assign(Object.assign({},this.state),{isLoading:!1}),Tn.h.renderToast({id:"accountLinking-apiError",toastType:Cn.p.Error,inputText:this.strings.errorMessages.apiException,expirationInMs:bs})}},this.handleClickLinkCancel=async()=>{this.linkingFlowContract=void 0,this.state=Object.assign(Object.assign({},this.state),{currentState:0})},this.handleClickUnlink=()=>{ce.M0.sendActionEvent(this,de.Aw.Click),this.state=Object.assign(Object.assign({},this.state),{currentState:2})},this.handleClickUnlinkConfirm=async()=>{this.state=Object.assign(Object.assign({},this.state),{isLoading:!0});try{this.apiData=await function(){return(0,T.mG)(this,void 0,void 0,(function*(){const e=yield Qe("DELETE");if(!e)throw new Error("Request preparation failed.");e.requestParams.body=JSON.stringify(e.baseRequest);try{tt("/delete",e.requestParams);const t=yield fetch(et("/delete"),e.requestParams);if(!t||!t.ok)throw new Error(`Response was not successful, status: ${t.statusText}`);let i;if(200===t.status)i={tenantEnabled:!0,isLinked:!1};else{const e=yield t.json();if(5e3!==e.ErrorCode&&5001!==e.ErrorCode)throw new Error(`API error code ${e.ErrorCode}: ${e.ErrorDescription}`);i={tenantEnabled:5001!==e.ErrorCode,isLinked:!1}}return i}catch(e){const t=(0,Ae.n)(e);throw(0,Ee.OO)(e,Me.Xw0.ApiCallException,"Exception in deleteLink()",(0,qe.tE)()),Pe.k.logError(`account-linking: Exception in deleteLink with error ${t}`),new Error(`Exception in deleteLink: ${t}`)}}))}(),this.setToastSignal("accountlinking-unlinkSuccess"),window.location.replace(this.bingRedirectUrl)}catch(e){(0,Ee.OO)(e,Me.jR0.FailedToDeleteLink,"Exception caught when deleting link.",(0,qe.tE)()),this.state=Object.assign(Object.assign({},this.state),{isLoading:!1}),Tn.h.renderToast({id:"accountLinking-apiError",toastType:Cn.p.Error,inputText:this.strings.errorMessages.apiException,expirationInMs:bs})}},this.handleClickUnlinkCancel=()=>{this.state=Object.assign(Object.assign({},this.state),{currentState:0})},this.setToastSignal=e=>{sessionStorage.setItem(ws,e)},this.removeToastSignal=()=>{sessionStorage.removeItem(ws)},this.handleToastSignal=()=>{const e=sessionStorage.getItem(ws);("accountlinking-linkSuccess"==e||"accountlinking-unlinkSuccess"==e)&&Tn.h.renderToast({id:e,toastType:Cn.p.Default,inputText:"accountlinking-linkSuccess"===e?this.strings.infoMessages.linkSuccess:this.strings.infoMessages.unlinkSuccess,expirationInMs:bs}),this.removeToastSignal()}}connectedCallback(){super.connectedCallback(),this.initTelemetry(),this.mapAccountLinkingCardSettings(),addEventListener(Is.M.ready,this.handleToastSignal)}disconnectedCallback(){super.disconnectedCallback(),removeEventListener(Is.M.ready,this.handleToastSignal)}get bingRedirectUrl(){let e="https://www.bing.com/orgId/acclink/redirect?refreshcookie=1&ru={returnUrl}";return(0,Je.Td)().match(/(localhost|int).msn\.(com)$/i)&&(e="https://www.staging-bing-int.com/orgId/acclink/redirect?refreshcookie=1&ru={returnUrl}"),e=e.replace("{returnUrl}",encodeURIComponent((0,Je.l4)())),e}initTelemetry(){this.rootTelemetryObject||(this.rootTelemetryObject=new Et.D({name:"AccountLinking",type:de.c9.Module}));const e=this.rootTelemetryObject.addOrUpdateChild({name:"AccountLinkingLink",type:de.c9.ActionButton}),t=e.addOrUpdateChild({name:"AccountLinkingUnlink",type:de.c9.Module}),i=this.rootTelemetryObject.addOrUpdateChild({name:"AccountLinkingUnlink",type:de.c9.ActionButton}),n=i.addOrUpdateChild({name:"AccountLinkingUnlink",type:de.c9.Module});this.accountLinkingTelemetry={linkAction:e,unlinkAction:i,linkingFlow:{cancelLink:t.addOrUpdateChild({name:"AccountLinkingLinkCancel",type:de.c9.ActionButton}),confirmLink:t.addOrUpdateChild({name:"AccountLinkingLinkConfirm",type:de.c9.ActionButton})},unlinkingFlow:{cancelUnlink:n.addOrUpdateChild({name:"AccountLinkingUnlinkCancel",type:de.c9.ActionButton}),confirmUnlink:n.addOrUpdateChild({name:"AccountLinkingUnlinkConfirm",type:de.c9.ActionButton})}}}async fetchProfilesData(e){if(!e)return(0,Ee.H)(Me.jR0.FailedToFetchProfilesData,"MSA auth result is undefined when trying to fetch Profiles Data.",(0,qe.tE)()),null;try{const t=await(0,Ls.a)(e.accessToken,e.idTokenClaims.preferred_username),i=await(0,$s.zj)(await _e());return{profiles:[{profilePictureUrl:i.profilePictureUrl,email:i.memberName,fullName:`${i.firstName} ${i.lastName} (${this.strings.linkingStrings.workTag})`},{profilePictureUrl:t,email:e.idTokenClaims.preferred_username,fullName:`${e.idTokenClaims.given_name} ${e.idTokenClaims.family_name} (${this.strings.linkingStrings.personalTag})`}]}}catch(e){return(0,Ee.OO)(e,Me.jR0.FailedToFetchProfilesData,"Exception when fetching profiles data.",(0,qe.tE)()),null}}mapAccountLinkingCardSettings(){this.strings&&this.apiData&&this.faqLink?this.state={currentState:0,isLoading:!1,isTenantEnabled:this.apiData.tenantEnabled,isLinked:this.apiData.isLinked,msaAnid:this.apiData.anid,msaEmail:this.apiData.msaEmail}:(0,Ee.H)(Me.jR0.FailedToMapAccountLinkingCardSettings,"Could not map 'state' property due to missing required props, will not render component.",(0,qe.tE)())}get settingCardElement(){if(!this.state)return;let e;return e=this.state.isTenantEnabled?this.state.isLinked?this.state.msaEmail?this.state.msaEmail:this.strings.errorMessages.noMsaEmail:this.strings.description:this.strings.tenantNotEnabled,{text:e,actionButtonConfig:this.state.isTenantEnabled?this.getAccountLinkingButtonConfig(this.state.isLinked):null}}get linkingAccountElement(){if(this.linkingFlowContract)return{cancelButtonConfig:{ariaLabel:this.strings.linkingStrings.cancelAction,title:this.strings.linkingStrings.cancelAction,click:this.handleClickLinkCancel,appearance:"lightweight",glyphType:"",telemetryTag:this.accountLinkingTelemetry.linkingFlow.cancelLink.getMetadataTag()},linkButtonConfig:{ariaLabel:this.strings.linkingStrings.linkAction,title:this.strings.linkingStrings.linkAction,click:this.handleClickLinkConfirm,appearance:"accent",glyphType:"",telemetryTag:this.accountLinkingTelemetry.linkingFlow.confirmLink.getMetadataTag()},title:this.strings.linkingStrings.heading,explanation:this.strings.linkingStrings.explanation,learnMore:this.strings.linkingStrings.learnMore,disclaimer:this.strings.linkingStrings.disclaimer,profiles:this.linkingFlowContract.profiles}}get unlinkingAccountElement(){return{cancelButtonConfig:{ariaLabel:this.strings.unlinkingStrings.cancelAction,title:this.strings.unlinkingStrings.cancelAction,click:this.handleClickUnlinkCancel,appearance:"lightweight",glyphType:"",telemetryTag:this.accountLinkingTelemetry.unlinkingFlow.cancelUnlink.getMetadataTag()},unlinkButtonConfig:{ariaLabel:this.strings.unlinkingStrings.unlinkAction,title:this.strings.unlinkingStrings.unlinkAction,click:this.handleClickUnlinkConfirm,appearance:"accent",glyphType:"",telemetryTag:this.accountLinkingTelemetry.unlinkingFlow.confirmUnlink.getMetadataTag()},title:this.strings.unlinkingStrings.heading,explanation:this.strings.unlinkingStrings.explanation,learnMore:this.strings.unlinkingStrings.learnMore}}getAccountLinkingButtonConfig(e){return e?{ariaLabel:this.strings.unlinkAction,title:this.strings.unlinkAction,click:this.handleClickUnlink,telemetryTag:this.accountLinkingTelemetry.unlinkAction.getMetadataTag(),appearance:"outline"}:{ariaLabel:this.strings.linkAction,title:this.strings.linkAction,click:this.handleClickLink,telemetryTag:this.accountLinkingTelemetry.linkAction.getMetadataTag(),appearance:"outline"}}}(0,T.gn)([C.Lj],As.prototype,"faqLink",void 0),(0,T.gn)([B.LO],As.prototype,"apiData",void 0),(0,T.gn)([B.LO],As.prototype,"strings",void 0),(0,T.gn)([B.LO],As.prototype,"state",void 0),(0,T.gn)([B.LO],As.prototype,"rootTelemetryObject",void 0),(0,T.gn)([B.lk],As.prototype,"settingCardElement",null),(0,T.gn)([B.lk],As.prototype,"linkingAccountElement",null),(0,T.gn)([B.lk],As.prototype,"unlinkingAccountElement",null);const Es=O.i`
    :host {
        --picture-width: 40px;
        --picture-height: 40px;
        --picture-radius: 50%;
    }

    h1 {
        font-size: 1.5em;
    }

    .icon-container {
        display: flex;
        justify-content: center;
        padding-top: 57px;
        padding-bottom: 17px;
    }

    #unlink-icon {
        width: 57px;
        height: 57px;
        background-color: #2868B2;
        border-radius: 50%;
        display: flex;
        justify-items: center;
        align-items: center;
        justify-content: center;
    }

    #unlink-icon svg {
        margin-top: 8px;
    }

    .accounts-container {
        position: relative;
    }

    .account {
        display: flex;
        align-items: center;
    }

    .account-picture {
        width: var(--picture-width);
        height: var(--picture-height);
        margin: 19px 22px 19px 28px;
    }
    
    .account-picture img {
        border-radius: var(--picture-radius);
        width: var(--picture-width);
        height: var(--picture-height);
    }

    .link-icon {
        align-items: center;
        position: absolute;
        display: flex;
        justify-content: center;
        height: 28px;
        width: 28px;
        top: calc(50% - 14px);
        background: #fff;
        border-radius: 50%;
        box-shadow: rgb(0 0 0 / 14%) 0px 1.75px 3.5px;
        z-index: 1;
    }

    .link-line {
        position: absolute;
        height: 78px;
        width: 26px;
        top: calc(50% - 41px);
        left: 13px;
        border: 2px solid #8A8886;
        border-radius: 5px;
        clip-path: inset(0px 13px 0px 0px);
    }
`,Ms=O.i`
    .logo svg path:first-child {
        fill: ${$.CHi};
    }
`,Ps=O.i`
    :host {
        --overlay-dialog-height: 100%;
        --overlay-dialog-width: 100%;
        --overlay-container-padding: 22px;
        /* Different to other sides to accomodate 'feedback button' */
        --overlay-container-padding-bottom: 32px;
        --overlay-body-height: fit-content;

        z-index: ${we.K.Dialog.toString()};
        background: #fff;
        position: fixed;
        inset: 0;
        touch-action: none;
    }

    fluent-dialog {
        --dialog-height: var(--overlay-dialog-height);
        --dialog-width: var(--overlay-dialog-width);
    }

    .container {
        height: var(--overlay-body-height);
        padding: var(--overlay-container-padding);
        padding-bottom: var(--overlay-container-padding-bottom);
    }

    /* Hi-res mobile */
    @media screen and (max-width: 320px) {
        :host {
            --overlay-dialog-width: 320px;
        }
    }

    @media screen and (min-width: 480px) {
        :host {
            --overlay-body-height: calc(100% - calc(var(--overlay-container-padding) + var(--overlay-container-padding-bottom)));
            --overlay-dialog-height: calc(100% - 2px);
            --overlay-dialog-width: 100%;
        }
    }

    /* Desktop or bigger */
    @media screen and (min-width: 768px) {
        :host {
            --overlay-body-height: calc(100% - calc(var(--overlay-container-padding) * 2));
            --overlay-container-padding: 44px;
            --overlay-container-padding-bottom: 44px;
            --overlay-dialog-height: auto;
            --overlay-dialog-width: 460px;
        }
    }

    /* COMMON STYLES */
    .background {
        background-size: cover;
        background-repeat: no-repeat;
        position: absolute;
        z-index: ${we.K.Below.toString()};
        margin-left: auto;
        margin-right: auto;
        inset: 0;
    }

    .background svg {
        width: 100%;
        height: 100%;
    }

    .logo svg {
        max-height: 24px;
    }

    .logo svg path:first-child {
        fill: #737373;
    }

    .body {
        display: flex;
        height: var(--overlay-body-height);
        flex-direction: column;
    }

    .body .content {
        padding-bottom: 30px;
        flex-grow: 1;
    }

    .controls {
        display: flex;
        justify-content: flex-end;
        gap: 20px;
    }


    .footer {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        min-height: 28px;
    }`.withBehaviors((0,G.Uu)(Ms));class Ds extends Ri.H{onDialogCancel(){this.$emit("cancel",null)}}const Hs=Object.freeze({contentSlot:"identity-overlay-content",primaryAction:"identity-overlay-primary",secondaryAction:"identity-overlay-secondary"});const Fs=L.d`
    <div class="background">${'<svg width="1920" height="1080" fill="none"><g opacity=".2"><path d="M1466.4 1795.2c950.37 0 1720.8-627.52 1720.8-1401.6S2416.77-1008 1466.4-1008-254.4-380.48-254.4 393.6s770.43 1401.6 1720.8 1401.6z" fill="url(#A)"/><path d="M394.2 1815.6c746.58 0 1351.8-493.2 1351.8-1101.6S1140.78-387.6 394.2-387.6-957.6 105.6-957.6 714s605.22 1101.6 1351.8 1101.6z" fill="url(#B)"/><path d="M1548.6 1885.2c631.92 0 1144.2-417.45 1144.2-932.4S2180.52 20.4 1548.6 20.4 404.4 437.85 404.4 952.8s512.28 932.4 1144.2 932.4z" fill="url(#C)"/><path d="M265.8 1215.6c690.25 0 1249.8-455.6 1249.8-1017.6S956.05-819.6 265.8-819.6-984-364-984 198s559.56 1017.6 1249.8 1017.6z" fill="url(#D)"/></g><defs><radialGradient id="A" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 1401.6 -1720.8 0 1466.4 393.6)"><stop stop-color="#107c10"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="B" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 1101.6 -1351.8 0 394.2 714)"><stop stop-color="#0078d4"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="C" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 932.4 -1144.2 0 1548.6 952.8)"><stop stop-color="#ffb900" stop-opacity=".75"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="D" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 1017.6 -1249.8 0 265.8 198)"><stop stop-color="#d83b01" stop-opacity=".75"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient></defs></svg>'}</div>
    <fluent-dialog
        trap-focus
        modal="true"
        @cancel=${e=>e.onDialogCancel()}
    >
        <div class="container" part="container">
            <div class="header" part="header">
                <div class="logo" role="logo"  aria-hidden="true">${'<svg viewBox="0 0 226 48" fill="none"><path key="MicrosoftLogo1" id="microsoft" d="M93.6 9.6v28.8h-5V15.8h-.1l-8.9 22.6h-3.3l-9.1-22.6h-.1v22.6h-4.6V9.6h7.2L78 30.9h.1l8.7-21.3h6.8zm4.1 2.2c0-.8.3-1.5.9-2 .6-.5 1.3-.8 2.1-.8.9 0 1.6.3 2.1.9.5.5.9 1.2.9 2s-.3 1.5-.9 2c-.6.5-1.3.8-2.1.8-.9 0-1.5-.3-2.1-.8-.5-.7-.9-1.4-.9-2.1zm5.4 5.9v20.7h-4.9V17.7h4.9zm14.8 17.2a9.2 9.2 0 0 0 4.8-1.8v4.5c-.8.5-1.7.8-2.7 1-1 .2-2.1.3-3.3.3-3.1 0-5.5-.9-7.4-2.9-1.9-1.9-2.9-4.4-2.9-7.3 0-3.3 1-6.1 2.9-8.2 1.9-2.1 4.7-3.2 8.3-3.2.9 0 1.8.1 2.7.3.9.3 1.7.5 2.2.8v4.7c-.7-.5-1.5-1-2.3-1.3-.8-.3-1.6-.5-2.4-.5-1.9 0-3.5.6-4.7 1.9-1.2 1.3-1.8 2.9-1.8 5.1 0 2.1.5 3.7 1.7 4.9 1.4 1.1 2.9 1.7 4.9 1.7zm18.6-17.5c.4 0 .7 0 1.1.1.3.1.6.1.8.2v4.9c-.3-.2-.6-.3-1.1-.5-.5-.2-1.1-.3-1.8-.3-1.2 0-2.2.5-3 1.5-.8 1-1.3 2.5-1.3 4.7v10.4h-4.9V17.7h4.9V21h.1c.5-1.1 1.1-2 2-2.7.8-.6 1.9-.9 3.2-.9zm2.1 11c0-3.4.9-6.1 2.9-8.1 1.9-2 4.6-3 8.1-3 3.2 0 5.7.9 7.5 2.9 1.8 1.9 2.7 4.5 2.7 7.8s-.9 6-2.9 8c-1.9 2-4.5 3-7.9 3-3.2 0-5.7-.9-7.6-2.8-1.9-2-2.8-4.6-2.8-7.8zm5.1-.2c0 2.1.5 3.8 1.5 4.9 1 1.1 2.4 1.7 4.2 1.7 1.8 0 3.1-.6 4.1-1.7.9-1.1 1.4-2.8 1.4-5.1 0-2.2-.5-3.9-1.5-5-.9-1.1-2.3-1.7-4-1.7-1.8 0-3.1.6-4.1 1.8-1.2 1.2-1.6 2.9-1.6 5.1zm23.3-5c0 .7.2 1.3.7 1.7.5.4 1.4.9 2.9 1.5 1.9.8 3.3 1.7 4.1 2.6.8 1 1.2 2.1 1.2 3.5 0 1.9-.7 3.5-2.3 4.7-1.5 1.2-3.5 1.8-6.1 1.8-.9 0-1.8-.1-2.9-.3-1.1-.2-1.9-.5-2.7-.8V33c.9.6 1.9 1.1 2.9 1.5 1 .3 1.9.5 2.8.5 1.1 0 1.9-.1 2.4-.5.5-.3.8-.8.8-1.5s-.3-1.3-.8-1.7c-.5-.5-1.6-1-3.1-1.6-1.8-.7-3.1-1.6-3.8-2.5s-1.1-2.1-1.1-3.6c0-1.9.7-3.4 2.2-4.6 1.5-1.2 3.4-1.8 5.7-1.8.7 0 1.5.1 2.4.3.9.1 1.7.4 2.3.6v4.6c-.7-.4-1.4-.8-2.3-1.1-.9-.3-1.7-.5-2.5-.5-.9 0-1.7.2-2.1.5-.4.5-.7.9-.7 1.6zm10.9 5.2c0-3.4.9-6.1 2.9-8.1s4.6-3 8.1-3c3.2 0 5.7.9 7.5 2.9 1.8 1.9 2.7 4.5 2.7 7.8s-.9 6-2.9 8c-1.9 2-4.5 3-7.9 3-3.2 0-5.7-.9-7.6-2.8-1.8-2-2.8-4.6-2.8-7.8zm5.1-.2c0 2.1.5 3.8 1.5 4.9 1 1.1 2.4 1.7 4.2 1.7 1.8 0 3.1-.6 4.1-1.7.9-1.1 1.4-2.8 1.4-5.1 0-2.2-.5-3.9-1.5-5-.9-1.1-2.3-1.7-4-1.7-1.8 0-3.1.6-4.1 1.8-1.1 1.2-1.6 2.9-1.6 5.1zm32.3-6.5H208v16.7h-4.9V21.7h-3.5v-4h3.5v-2.9c0-2.2.7-3.9 2.1-5.3 1.4-1.4 3.2-2.1 5.4-2.1.6 0 1.1 0 1.6.1s.9.1 1.2.3V12c-.1-.1-.5-.2-.9-.3-.4-.1-.9-.2-1.4-.2-1 0-1.8.3-2.3.9-.5.7-.8 1.6-.8 2.8v2.5h7.3V13l4.9-1.5v6.1h4.9v4h-4.9v9.7c0 1.3.2 2.2.7 2.7.5.5 1.2.8 2.2.8.3 0 .6-.1 1-.2s.7-.3 1.1-.5v4c-.3.2-.8.3-1.5.5-.7.1-1.4.2-2.1.2-2.1 0-3.6-.5-4.6-1.7-1-1.1-1.5-2.7-1.5-4.9V21.7h-.2z"/><path key="MicrosoftLogo2" id="blue" d="M22.8 25.2H0V48h22.8V25.2z" fill="#00A4EF"/><path key="MicrosoftLogo3" id="yellow" d="M48 25.2H25.2V48H48V25.2z" fill="#FFB900"/><path key="MicrosoftLogo4" id="green" d="M48 0H25.2v22.8H48V0z" fill="#7FBA00"/><path key="MicrosoftLogo5" id="red" d="M22.8 0H0v22.8h22.8V0z" fill="#F25022"/></svg>'}</div>
            </div>
            <div class="body" part="body">
                <div class="content" part="content" id="${Hs.contentSlot}">
                    <slot name="content"></slot>
                </div>
                <div class="controls" part="controls">
                    <slot name="secondary-action" id="${Hs.secondaryAction}"></slot>
                    <slot name="primary-action"  id="${Hs.secondaryAction}"></slot>
                </div>
            </div>
        </div>
    </fluent-dialog>
    <div class="footer" part="footer"></div>
`;let Rs=class extends Ds{};Rs=(0,T.gn)([(0,Ri.M)({name:"identity-overlay",template:Fs,styles:[Ps],shadowOptions:{delegatesFocus:!0}})],Rs);const Ns=L.d`
    <div class="account">
        <div class="account-picture">
            ${(0,I.g)((e=>e.profilePictureUrl),L.d`
                <img src="${e=>e.profilePictureUrl}" aria-hidden="true"></img>
            `)}
            ${(0,I.g)((e=>!e.profilePictureUrl),L.d`${'<svg viewBox="0 0 64 64" stroke="#707070"><g class="mectrl_stroke" fill="none"><circle cx="32" cy="32" r="30.25" stroke-width="1.5"/><g transform="matrix(.9 0 0 .9 10.43 10.43)" stroke-width="2"><circle cx="24.25" cy="18" r="9"/><path d="M11.2 40a1 1 0 1 1 26.1 0"/></g></g></svg>'}`)}
        </div>
        <div class="account-details">
            <b class="account-email">${e=>e.email}</b>
            <div class="account-name">${e=>e.fullName}</div>
        </div>
    </div>
`,Us=L.d`
    <identity-overlay
        @cancel=${e=>e.linkingAccountElement.cancelButtonConfig.click()}
    >
        <div slot="content">
            <h1>${e=>e.linkingAccountElement.title}</h1>
            <p>${e=>e.linkingAccountElement.explanation}</p>
            <div class="accounts-container">
                ${(0,_.rx)((e=>e.linkingAccountElement.profiles),Ns)}
                <div class="link-icon" aria-hidden="true">${'<svg width="22" height="12" viewBox="0 0 22 12" fill="none"><path d="M7.85.75a1.05 1.05 0 0 1 .12 2.1H5.75a3.15 3.15 0 0 0-.19 6.3h2.29a1.05 1.05 0 0 1 .12 2.1H5.75A5.25 5.25 0 0 1 5.52.75h2.33Zm8.4 0a5.25 5.25 0 0 1 .23 10.5h-2.33a1.05 1.05 0 0 1-.12-2.1h2.22a3.15 3.15 0 0 0 .19-6.3h-2.29a1.05 1.05 0 0 1-.12-2.1h2.22Zm-10.5 4.2h10.5a1.05 1.05 0 0 1 .12 2.1H5.75a1.05 1.05 0 0 1-.12-2.1h10.62-10.5Z" fill="#767676"/></svg>'}</div>
                <div class="link-line"></div>
            </div>
            <small>
                ${e=>e.linkingAccountElement.disclaimer}<br>
                <fluent-anchor href="${e=>e.faqLink}" appearance="hypertext" target="_blank">${e=>e.linkingAccountElement.learnMore}</fluent-anchor>
            </small>
        </div>

        <div slot="secondary-action">
            <fluent-button
                appearance=${e=>e.linkingAccountElement.cancelButtonConfig.appearance}
                role="button"
                title=${e=>e.linkingAccountElement.cancelButtonConfig.title}
                data-t="${e=>e.linkingAccountElement.cancelButtonConfig.telemetryTag}"
                @click=${e=>e.linkingAccountElement.cancelButtonConfig.click()}
                ?disabled=${e=>e.state.isLoading}
            >
                ${e=>e.linkingAccountElement.cancelButtonConfig.title}
            </fluent-button>
        </div>

        <div slot="primary-action">
            <fluent-button
                appearance=${e=>e.linkingAccountElement.linkButtonConfig.appearance}
                role="button"
                title=${e=>e.linkingAccountElement.linkButtonConfig.title}
                data-t="${e=>e.linkingAccountElement.linkButtonConfig.telemetryTag}"
                @click=${e=>e.linkingAccountElement.linkButtonConfig.click()}
                ?disabled=${e=>e.state.isLoading}
            >
                ${e=>e.linkingAccountElement.linkButtonConfig.title}
            </fluent-button>
        </div>
    </identity-overlay>
`,js=L.d`
    <identity-overlay
        @cancel=${e=>e.unlinkingAccountElement.cancelButtonConfig.click()}
    >
        <div slot="content">
            <div class="icon-container">
                <div id="unlink-icon" class="icon" aria-hidden="true">${'<svg width="28" height="24" viewBox="0 0 28 24" fill="none"><path d="M11.2 1.4c0-.77-.63-1.4-1.4-1.4H6.7A7 7 0 0 0 7 14h2.8l.16-.01a1.4 1.4 0 0 0-.16-2.8H6.75A4.2 4.2 0 0 1 7 2.8h2.8l.16-.01A1.4 1.4 0 0 0 11.2 1.4ZM28 7a7 7 0 0 0-7-7h-2.96a1.4 1.4 0 0 0 .16 2.8h3.04A4.2 4.2 0 0 1 25.2 7v.02c.97.08 1.92.47 2.7 1.18.06-.4.1-.8.1-1.2Zm-5.92.9c-.14.1-.28.2-.4.33a1.4 1.4 0 0 1-.52.16H7a1.4 1.4 0 0 1-.16-2.78L7 5.6h14a1.4 1.4 0 0 1 1.08 2.3Zm.46 1.44-8.26 8.26a3.76 3.76 0 0 0-1 1.75l-.63 2.56a1.52 1.52 0 0 0 1.84 1.84l2.56-.64c.66-.16 1.27-.5 1.75-.99l8.26-8.26a3.2 3.2 0 0 0-4.52-4.52Z" fill="#fff"/></svg>'}</div>
            </div>
            <h1>${e=>e.unlinkingAccountElement.title}</h1>
            <p>${e=>e.unlinkingAccountElement.explanation}</p>
            <small><fluent-anchor href="${e=>e.faqLink}" appearance="hypertext" target="_blank">${e=>e.unlinkingAccountElement.learnMore}</fluent-anchor></small>
        </div>

        <div slot="secondary-action">
            <fluent-button
                appearance=${e=>e.unlinkingAccountElement.cancelButtonConfig.appearance}
                role="button"
                title=${e=>e.unlinkingAccountElement.cancelButtonConfig.title}
                data-t="${e=>e.unlinkingAccountElement.cancelButtonConfig.telemetryTag}"
                @click=${e=>e.unlinkingAccountElement.cancelButtonConfig.click()}
                ?disabled=${e=>e.state.isLoading}
            >
                ${e=>e.unlinkingAccountElement.cancelButtonConfig.title}
            </fluent-button>
        </div>

        <div slot="primary-action">
            <fluent-button
                appearance=${e=>e.unlinkingAccountElement.unlinkButtonConfig.appearance}
                role="button"
                title=${e=>e.unlinkingAccountElement.unlinkButtonConfig.title}
                data-t="${e=>e.unlinkingAccountElement.unlinkButtonConfig.telemetryTag}"
                @click=${e=>e.unlinkingAccountElement.unlinkButtonConfig.click()}
                ?disabled=${e=>e.state.isLoading}
            >
                ${e=>e.unlinkingAccountElement.unlinkButtonConfig.title}
            </fluent-button>
        </div>
    </identity-overlay>
`,Bs=L.d`
    <div class="setting-card-container">
        <msn-setting-card cardTitle=${e=>e.strings.cardName}>
            <span class="setting-card-toggle-text">${e=>e.settingCardElement.text}</span>
            ${(0,I.g)((e=>e.settingCardElement.actionButtonConfig),L.d`
                <fluent-button
                    class="setting-card-button"
                    appearance=${e=>e.settingCardElement.actionButtonConfig.appearance}
                    aria-label=${e=>e.settingCardElement.actionButtonConfig.ariaLabel}
                    title=${e=>e.settingCardElement.actionButtonConfig.title}
                    data-t="${e=>e.settingCardElement.actionButtonConfig.telemetryTag}"
                    @click=${e=>e.settingCardElement.actionButtonConfig.click()}
                    ?disabled=${e=>e.settingCardElement.actionButtonConfig.disabled}
                >
                    ${e=>e.settingCardElement.actionButtonConfig.title}
                </fluent-button>
            `)}
        </msn-setting-card>
    </div>
`,zs=L.d`
${(0,I.g)((e=>e.apiData),L.d`
    ${(0,I.g)((e=>e.state),L.d`
        ${Bs}
        ${(0,I.g)((e=>2===e.state.currentState),js)}
        ${(0,I.g)((e=>1===e.state.currentState),Us)}
    `)}
`)}
`;let Gs=class extends As{};Gs=(0,T.gn)([(0,Ri.M)({name:"msn-account-linking-setting",template:zs,styles:[fo,vo,Es]})],Gs);var qs=i(90282);class Vs extends Ri.H{constructor(){super(...arguments),this.headingLevel=2}}(0,T.gn)([C.Lj],Vs.prototype,"heading",void 0),(0,T.gn)([(0,C.Lj)({attribute:"heading-level",mode:"fromView",converter:C.Id})],Vs.prototype,"headingLevel",void 0),(0,T.gn)([C.Lj],Vs.prototype,"description",void 0);const _s=O.i`
    :host {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        padding-bottom: 20px;
        padding-top: 20px;
        width: 620px;
    }

    .header {
        grid-area: 1 / 1 / 3 / 3;
        display: grid;
    }

    .header .heading {
        font-size: ${$.mWK};
        font-weight: 600;
        grid-area: 1 / 1 / 2 / 2;
        line-height: ${$.I7_};
    }

    .header .description {
        font-size: ${$.cSu};
        grid-area: 2 / 1 / 3 / 3;
        line-height: ${$.RUt};
        padding-bottom: 20px;
        padding-top: 2px;
    }

    section {
        grid-area: 3 / 1 / 4 / 3;
    }

    ::slotted([slot="extra"]) {
        grid-area: 1 / 2 / 2 / 3;
        justify-self: end;
    }

    @media (max-width: 655.98px) {
        :host {
            grid-template-columns: 1fr;
            max-width: 334px;
            margin: 0 auto;
        }
    }

    @media (min-width: 656px) and (max-width: 979.98px) {
        :host {
            grid-template-columns: 1fr;
            width: 311px;
        }
    }
`,Ws=L.d`
    <div class="header">
        <span class="heading" part="heading" role="heading" aria-level="${e=>e.headingLevel}">
            ${e=>e.heading}
        </span>
        <slot name="extra"></slot>
        ${(0,I.g)((e=>e.description),L.d`<span class="description">${e=>e.description}</span>`)}
    </div>
    <section>
        <slot></slot>
    </section>
`;let Zs=class extends Vs{};Zs=(0,T.gn)([(0,Ri.M)({name:"msn-interests-river-section",template:Ws,styles:_s})],Zs);var Js=i(67131);class Ys extends Ri.H{}(0,T.gn)([C.Lj],Ys.prototype,"cardTitle",void 0);const Ks=O.i`
    :host {
        --elevation: 4;
        width: 100%;
        max-width: 620px;
        min-width: 300px;
        display: block;
    }

    .items, .subitems {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        padding: 0 21px;
        background-color: ${V.A4};
    }

    .inlineSettings {
        background-color: ${V.A4};
    }

    .root {
        ${F.XC};
        border-radius: 6px;
    }

    .title {
        display: flex;
        align-items: center;
        font-size: ${$.cSu};
        padding-inline-start: 21px;
        font-weight: 600;
        line-height: ${$.RUt};
        height: 48px;
        border-bottom: 1px solid ${$.dtw};
        background-color: ${V.A4};
    }
`,Xs=L.d`
    <div class="root">
        <div class="title"><span>${e=>e.cardTitle}</span></div>
        <div class="items"><slot></slot></div>
        <div class="inlineSettings"><slot name="inline-settings-content"></slot></div>
    </div>
`;let Qs=class extends Ys{};Qs=(0,T.gn)([(0,Ri.M)({name:"msn-setting-card",template:Xs,styles:Ks})],Qs);class er extends be.wt{topicCardDataChanged(){this.topicCardData&&this.topicCardData.topicTitle&&(this.textContent=this.topicCardData.topicTitle)}}(0,T.gn)([B.LO],er.prototype,"topicCardData",void 0),(0,T.gn)([B.LO],er.prototype,"topicType",void 0);const tr=O.i`
    :host {
        max-width: 540px;
        width: 100%;
    }

    :host([aria-selected="true"]) msn-suggestion-topic-card {
        background: ${$.QpD};
    }
    `.withBehaviors((0,G.vF)(O.i`
            :host([aria-selected="true"]) msn-suggestion-topic-card {
                background: ${q.H.Highlight};
            }
        `));var ir=i(65130);class nr extends x.I{constructor(){super(...arguments),this.followed=!1}toggleFollow(){this.followed=!this.followed,this.$emit("follow-state-changed")}}(0,T.gn)([(0,C.Lj)({attribute:"follow-button-telemetry-tag"})],nr.prototype,"followButtonTelemetryTag",void 0),(0,T.gn)([(0,C.Lj)({attribute:"follow-format-aria-label"})],nr.prototype,"followFormatAriaLabel",void 0),(0,T.gn)([(0,C.Lj)({attribute:"follow-format-text"})],nr.prototype,"followFormatText",void 0),(0,T.gn)([(0,C.Lj)({attribute:"img-alt-text"})],nr.prototype,"imgAltText",void 0),(0,T.gn)([(0,C.Lj)({attribute:"img-src"})],nr.prototype,"imgSrc",void 0),(0,T.gn)([(0,C.Lj)({attribute:"followed",mode:"boolean"})],nr.prototype,"followed",void 0),(0,T.gn)([(0,C.Lj)({attribute:"topic-id"})],nr.prototype,"topicId",void 0),(0,T.gn)([(0,C.Lj)({attribute:"topic-title"})],nr.prototype,"topicTitle",void 0),(0,T.gn)([(0,C.Lj)({attribute:"unfollow-button-telemetry-tag"})],nr.prototype,"unfollowButtonTelemetryTag",void 0),(0,T.gn)([(0,C.Lj)({attribute:"unfollow-format-aria-label"})],nr.prototype,"unfollowFormatAriaLabel",void 0),(0,T.gn)([(0,C.Lj)({attribute:"unfollow-format-text"})],nr.prototype,"unfollowFormatText",void 0);class or extends nr{}(0,T.gn)([C.Lj],or.prototype,"type",void 0),(0,T.gn)([C.Lj],or.prototype,"topicType",void 0);const ar=O.i`
    :host {
        align-items: center;
        box-sizing: border-box;
        cursor: pointer;
        display: grid;
        font-size: ${$.cSu};
        font-weight: 600;
        fill: currentColor;
        width: 100%;
        height: 62px;
        --image-side-size: 42px;
        grid-template-columns: calc(var(--image-side-size) + 30px) auto;
        grid-template-rows: 62px;
        border-top: 1px solid ${$.dtw};
    }

    :host(:hover) {
        background: ${$.QpD};
    }

    .content {
        display: grid;
        height: 100%;
        grid-template-columns: auto 60px;
        grid-area: 1 / 2 / 2 / 3;
    }

    .follow-btn {
        margin: auto;
    }

    .followed, .unfollowed {
        display: flex;
        padding: 22px 0;
    }

    .followed slot[name="followed"] > svg {
        background-color: ${$.Avx};
        border-radius: 16px;
        fill: ${$.jql};
    }

    .image {
        margin: 10px;
        margin-inline-start: 24px;
        border-radius: 4px;
    }

    .topic {
        display: flex;
        flex-flow: column nowrap;
        margin-top: 10px;
        margin-inline-start: 12px;
        text-overflow: ellipsis;
        text-align: start;
        white-space: nowrap;
        overflow: hidden;
    }

    .topic-title {
        font-size: ${$.PwC};
        line-height: ${$.b3W};
    }

    .topic-type {
        font-weight: 500;
        color: ${$.Q5n};
        font-size: ${$.cSu};
        line-height: ${$.RUt};
    }

    img {
        grid-area: 1 / 1 / 2 / 2;
        height: var(--image-side-size);
        width: var(--image-side-size);
    }

    span {
        overflow: hidden;
        padding: 30px 12px;
        text-overflow: ellipsis;
        text-align: start;
        white-space: nowrap;
        width: 100%;
    }
`.withBehaviors((0,G.vF)(O.i`
            :host {
                background: ${q.H.ButtonFace};
                color: ${q.H.ButtonText};
            }
            :host(:hover) {
                background: ${q.H.Highlight};
            }
            :host(:${pe.b}) {
                border-color: ${q.H.Highlight};
            }
            .followed slot[name="followed"] > svg {
                background-color: ${q.H.ButtonText};
                fill: ${q.H.ButtonFace};
            }
            :host(:hover) .followed slot[name="followed"] > svg {
                background-color: ${q.H.HighlightText};
                fill: ${q.H.Highlight};
            }
            .unfollowed slot[name="unfollowed"] > svg {
                fill: ${q.H.ButtonText};
            }
            :host(:hover) .unfollowed slot[name="unfollowed"] > svg {
                fill: ${q.H.HighlightText};
            }
        `)),sr=L.d`
    <template
        role="button"
        @click="${e=>e.toggleFollow&&e.toggleFollow()}"
        title="${e=>e.followed?(0,Mt.WU)(e.unfollowFormatText,e.topicTitle):(0,Mt.WU)(e.followFormatText,e.topicTitle)}"
        data-t="${e=>e.followed?e.followButtonTelemetryTag:e.unfollowButtonTelemetryTag}">
        <img
            class="image"
            part="image"
            src="${e=>e.imgSrc}"
            alt="${e=>e.imgAltText}"/>
        <div class="content" part="content">
            <div class="topic">
                <div class="topic-title" part="topic-title">${e=>e.topicTitle}</div>
                <div class="topic-type">${e=>e.topicType}</div>
            </div>
            <div class="follow-btn" part="follow-btn">
                ${(0,I.g)((e=>e.followed),L.d`
                        <span part="followed" class="followed">
                            <slot name="followed">
                                <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
                                    <path d="M12.76 5.26L6.5 11.53 3.24 8.26l.52-.52 2.74 2.73 5.74-5.73.52.52z"/>
                                </svg>
                            </slot>
                        </span>
                    `)}
                ${(0,I.g)((e=>!e.followed),L.d`
                        <span part="unfollowed" class="unfollowed">
                            <slot name="unfollowed">
                                <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
                                    <path d="M7.5 0a7.39 7.39 0 015.3 2.2 7.2 7.2 0 011.93 3.3 7.39 7.39 0 010 4 7.46 7.46 0 01-5.24 5.23 7.39 7.39 0 01-3.99 0 7.65 7.65 0 01-3.31-1.92A7.75 7.75 0 01.27 9.5a7.47 7.47 0 010-4 7.61 7.61 0 011.92-3.3A7.38 7.38 0 015.5.27C6.14.09 6.8 0 7.5 0zm0 14a6.3 6.3 0 003.27-.9 6.42 6.42 0 003-3.87 6.3 6.3 0 000-3.46 6.58 6.58 0 00-4.54-4.54 6.3 6.3 0 00-3.46 0 6.73 6.73 0 00-2.86 1.68 6.41 6.41 0 00-1.68 2.86 6.3 6.3 0 000 3.46 6.73 6.73 0 001.68 2.86A6.51 6.51 0 007.5 14zM8 7h4v1H8v4H7V8H3V7h4V3h1v4z"/>
                                </svg>
                            </slot>
                        </span>
                    `)}
            </div>
        </div>
    </template>
`;let rr=class extends or{};rr=(0,T.gn)([(0,Ri.M)({name:"msn-suggestion-topic-card",template:sr,styles:ar,shadowOptions:{delegatesFocus:!0}})],rr),ir.Z,be.wt;const lr=L.d`
    <msn-suggestion-topic-card
        follow-button-telemetry-tag=${e=>e.topicCardData.followButtonTelemetryTag}
        follow-format-text=${e=>e.topicCardData.followFormatText}
        img-alt-text=${e=>e.topicCardData.imgAltText}
        img-src=${e=>e.topicCardData.imgSrc}
        ?followed=${e=>e.topicCardData.followed}
        topic-id=${e=>e.topicCardData.topicId}
        topic-title=${e=>e.topicCardData.topicTitle}
        unfollow-button-telemetry-tag=${e=>e.topicCardData.unfollowButtonTelemetryTag}
        unfollow-format-text=${e=>e.topicCardData.unfollowFormatText}
        type=${e=>e.topicCardData.type}
        topicType=${e=>e.topicType}
    />
`,dr=L.d`
    <template
        aria-selected="${e=>e.selected}"
        class="${e=>e.selected?"selected":""} ${e=>e.disabled?"disabled":""}"
        role="option"
        aria-label="${e=>e.topicCardData?(0,Mt.WU)(e.topicCardData.followed?e.topicCardData.unfollowFormatAriaLabel:e.topicCardData.followFormatAriaLabel,e.topicCardData.topicTitle)+" "+(e.topicType||""):""}"
    >
        ${(0,I.g)((e=>e.topicCardData),lr)}
    </template>
`;let cr=class extends er{};cr=(0,T.gn)([(0,Ri.M)({name:"msn-topic-listbox-option",template:dr,styles:tr,shadowOptions:{delegatesFocus:!0}})],cr);const ur='.topics-section[data-theme="Theme2"] .topic-cards-list ',hr=O.i`
    ${ur} {
        --layer-corner-radius: 0;
        display: flex;
        --elevation: 4;
        ${F.XC};
        flex-direction: column;
        grid-row-gap: 0px;
        width: auto;
    }

    ${ur} fluent-card {
        --elevation: 0;
        contain-intrinsic-size: 62px;
    }

    @media (max-width: 655px) {
        ${ur} fluent-card {
            --card-width: auto;
        }
    }
`,gr=O.i`
    :host {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .heading {
        font-size: ${$.PwC};
        font-weight: 600;
        grid-area: 1 / 1 / 2 / 3;
        line-height: ${$.b3W};
        padding-bottom: 16px;
    }

    .no-topics {
        grid-area: 2 / 1 / 3 / 4;
    }

    .topic-cards-list {
        display: grid;
        grid-area: 2 / 1 / 3 / 3;
        grid-gap: 20px;
        grid-template-columns: 1fr 1fr;
    }

    .topics-section {
        display: grid;
        grid-area: 3 / 1 / 4 / 3;
        grid-template-columns: 1fr 1fr;
        padding-bottom: 20px;
    }

    fluent-card {
        contain-intrinsic-size: 80px;
    }

    fluent-card.vnext {
        contain-intrinsic-size: 60px;
    }

    fluent-card.vnext:hover {
        --elevation: 4;
    }

    /* Styles by Theme */
    ${hr}

    @media (max-width: 979.98px) {
        .topic-cards-list {
            grid-template-columns: 1fr;
            grid-column-gap: 0;
            grid-row-gap: 20px;
            width: 300px;
        }
    }

    @media (max-width: 655px) {
        fluent-card {
            --card-width: 334px;
            contain-intrinsic-size: 62px;
            border-radius: 0;
        }

        fluent-card:last-child {
            border-bottom-left-radius: 4px;
            border-bottom-right-radius: 4px;
        }
        
        .heading {
            background: ${$.wFS};
            border-top-left-radius: 4px;
            border-top-right-radius: 4px;
            box-shadow: 0px 1.6px 3.6px rgba(0, 0, 0, 0.13),
                0px 0px 2.9px rgba(0, 0, 0, 0.11);
            box-sizing: border-box;
            height: 48px;
            width: 334px;
            padding: 10px;
            padding-inline-start: 20px;
        }

        .topic-cards-list {
            grid-row-gap: 0px;
        }

    }
`;class pr extends Ri.H{constructor(){super(...arguments),this.headingLevel=2}}(0,T.gn)([C.Lj],pr.prototype,"heading",void 0),(0,T.gn)([(0,C.Lj)({attribute:"heading-level",mode:"fromView",converter:C.Id})],pr.prototype,"headingLevel",void 0);const mr=O.i`
    ${(0,H.j)("flex")} :host {
        background: ${$.RJY};
        border: 1px solid ${$.dtw};
        width: 100%;
        max-width: 612px;
        min-width: 300px;
        height: 60px;
        border-radius: 6px;
        justify-content: center;
        align-items: center;
    }

    .empty-card {
        max-width: 580px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .heading {
        line-height: ${$.RUt};
        font-size: ${$.cSu};
        color: ${$.CHi};
    }
`,fr=L.d`
    <div class="empty-card">
        <span
            class="heading"
            part="heading"
            role="heading"
            aria-level="${e=>e.headingLevel}"
        >
            ${e=>e.heading}
        </span>
    </div>
`;let vr=class extends pr{};vr=(0,T.gn)([(0,Ri.M)({name:"msn-empty-section-card",template:fr,styles:mr})],vr);const yr=L.d`
    <fluent-card class="${e=>e.enableVNextStyles?"vnext":""}">
        <msn-topic-card
            follow-button-telemetry-tag=${e=>e.followButtonTelemetryTag}
            follow-format-aria-label=${e=>e.followFormatAriaLabel}
            follow-format-text=${e=>e.followFormatText}
            img-alt-text=${e=>e.imgAltText}
            img-src=${e=>e.imgSrc}
            ?followed=${e=>e.followed}
            topic-id=${e=>e.topicId}
            cms-provider-id=${e=>e.cmsProviderId}
            topic-title=${e=>e.topicTitle}
            feed-type=${e=>e.feedType}
            unfollow-button-telemetry-tag=${e=>e.unfollowButtonTelemetryTag}
            unfollow-format-aria-label=${e=>e.unfollowFormatAriaLabel}
            unfollow-format-text=${e=>e.unfollowFormatText}
            content-link-format-text=${e=>e.contentLinkFormatText}
            content-link-button-telemetry-tag=${e=>e.contentLinkButtonTelemetryTag}
            ?enable-nav-to-xfeed=${e=>e.enableNavToXfeed}
            :sourceProfileLinkData=${e=>e.sourceProfileLinkData}
            :theme=${(e,t)=>t.parent.theme}
            :imgOnloadCallback=${e=>e.imgOnloadCallback}
            @topic-selected=${(e,t)=>t.parent.handleTopicSelected(t.event)}
            @follow-state-changed=${(e,t)=>t.parent.handleFollowStateChange(t.event)}
            :enableVNextStyles=${(e,t)=>t.parent.enableVNextStyles}
            ?hidden-topic=${e=>e.hidden}
            @hidden-state-changed=${(e,t)=>t.parent.handleHiddenStateChange(t.event)}
            hide-format-aria-label=${e=>e.hideFormatAriaLabel}
            hide-text=${e=>e.hideText}
            unhide-format-aria-label=${e=>e.unhideFormatAriaLabel}
            unhide-text=${e=>e.unhideText}
            hide-button-telemetry-tag=${e=>e.hideButtonTelemetryTag}
            unhide-button-telemetry-tag=${e=>e.unhideButtonTelemetryTag}
            topic-card-telemetry-tag=${e=>e.topicCardTelemetryTag}
            followed-state-title=${e=>e.followedStateTitle}
            hidden-state-title=${e=>e.hiddenStateTitle}
            neutral-state-title=${e=>e.neutralStateTitle}
        />
    </fluent-card>
`,br=L.d`
    <div
        class="topics-section"
        part="topics-section"
        data-theme=${e=>e.theme}
        data-t="${e=>e.topicsSectionTelemetryTag}"
    >
        ${(0,I.g)((e=>e.sectionTitle),L.d`
        <span
            class="heading"
            part="heading"
            role="heading"
            aria-level="${e=>e.sectionLevel}"
        >
            ${e=>e.sectionTitle}
        </span>`)}
        ${(0,I.g)((e=>!(e.topics&&e.topics.length)&&e.noTopicsMessage),L.d`
            <div class="no-topics">
                <msn-empty-section-card heading=${e=>e.noTopicsMessage}></msn-empty-section-card>
            </div>
        `)}
        ${(0,I.g)((e=>e.topics&&e.topics.length),L.d`
            <div class="topic-cards-list">
                ${(0,_.rx)((e=>e.topics),yr)}
            </div>
        `)}
    </div>
`;class Sr extends Ri.H{constructor(){super(...arguments),this.enableVNextStyles=!1,this.sectionLevel=3,this.topics=[],this.theme="Default"}handleTopicSelected(e){this.topicSelectedHandler&&this.topicSelectedHandler(e)}handleFollowStateChange(e){this.followedClickedHandler&&this.followedClickedHandler(e)}handleHiddenStateChange(e){this.hideClickHandler&&this.hideClickHandler(e)}}(0,T.gn)([C.Lj],Sr.prototype,"id",void 0),(0,T.gn)([(0,C.Lj)({attribute:"section-title"})],Sr.prototype,"sectionTitle",void 0),(0,T.gn)([(0,C.Lj)({attribute:"no-topics-message"})],Sr.prototype,"noTopicsMessage",void 0),(0,T.gn)([(0,C.Lj)({attribute:"section-level",mode:"fromView",converter:C.Id}),(0,C.Lj)({attribute:"enable-v-next-styles",mode:"boolean"})],Sr.prototype,"enableVNextStyles",void 0),(0,T.gn)([B.LO],Sr.prototype,"topics",void 0),(0,T.gn)([B.LO],Sr.prototype,"topicSelectedHandler",void 0),(0,T.gn)([B.LO],Sr.prototype,"followedClickedHandler",void 0),(0,T.gn)([B.LO],Sr.prototype,"hideClickHandler",void 0),(0,T.gn)([B.LO],Sr.prototype,"topicsSectionTelemetryTag",void 0),(0,T.gn)([B.LO],Sr.prototype,"theme",void 0);let wr=class extends Sr{};wr=(0,T.gn)([(0,Ri.M)({name:"msn-topics-section",template:br,styles:gr})],wr),(0,o.z)().withShadowRootMode("closed").withElementDisambiguation((()=>n.h.ignoreDuplicate)).register((0,s.hb)(),(0,r.ay)());const Tr="TurnOn",Cr="TurnOff",xr="TrafficCard",kr="CommuteCard",$r="DaysCommuting",Or="Home",Lr="Work",Ir="Commute",Ar="AddLocation",Er="Save",Mr="Cancel",Pr="EditLocation",Dr="RemoveLocation",Hr="CommuteDayPicker",Fr="AtWorkDropdown",Rr="AtHomeDropdown";class Nr{constructor(){this.trafficCardSectionTelemetryTag=new Et.D({name:xr}).getMetadataTag(),this.commuteCardSectionTelemetryTag=new Et.D({name:kr}).getMetadataTag(),this.daysCommutingSectionTelemetryTag=new Et.D({name:$r}).getMetadataTag(),this.commuteSectionTelemetryTag=new Et.D({name:Ir}).getMetadataTag(),this.trafficOffTelemetryTag=new Et.D({name:Tr,behavior:de.wu.TurnOn,action:de.Aw.Click}).getMetadataTag(),this.trafficOnTelemetryTag=new Et.D({name:Cr,behavior:de.wu.TurnOff,action:de.Aw.Click}).getMetadataTag(),this.commuteOffTelemetryTag=new Et.D({name:Tr,behavior:de.wu.TurnOn,action:de.Aw.Click}).getMetadataTag(),this.commuteOnTelemetryTag=new Et.D({name:Cr,behavior:de.wu.TurnOff,action:de.Aw.Click}).getMetadataTag(),this.commuteDayPickerTelemetryTag=new Et.D({name:Hr,behavior:de.wu.Customize,action:de.Aw.Click}).getMetadataTag(),this.arriveAtWorkTelemetryTag=new Et.D({name:Fr,behavior:de.wu.Customize,action:de.Aw.Click}).getMetadataTag(),this.arriveAtHomeTelemetryTag=new Et.D({name:Rr,behavior:de.wu.Customize,action:de.Aw.Click}).getMetadataTag(),this.homeTelemetry=new Ur(Or),this.workTelemetry=new Ur(Lr)}}class Ur{constructor(e){this.commuteLocationSectionTelemetryTag=new Et.D({name:e}).getMetadataTag(),this.addTelemetryTag=new Et.D({name:Ar,behavior:de.wu.Add,action:de.Aw.Click}).getMetadataTag(),this.saveTelemetryTag=new Et.D({name:Er,behavior:de.wu.Save,action:de.Aw.Click}).getMetadataTag(),this.cancelTelemetryTag=new Et.D({name:Mr,behavior:de.wu.Cancel,action:de.Aw.Click}).getMetadataTag(),this.editTelemetryTag=new Et.D({name:Pr,behavior:de.wu.Customize,action:de.Aw.Click}).getMetadataTag(),this.removeTelemetryTag=new Et.D({name:Dr,behavior:de.wu.Remove,action:de.Aw.Click}).getMetadataTag()}}var jr=i(36569);class Br extends Ri.H{constructor(){super(...arguments),this.settingsTelemetry=new Nr,this.handleClick=e=>{this.state&&(this.state=Object.assign(Object.assign({},this.state),{locations:this.state.locations.map((e=>Object.assign(Object.assign({},e),{autosuggestOpen:!1})))}))}}connectedCallback(){super.connectedCallback(),this.mapTrafficCardSettings(),addEventListener("mouseup",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),removeEventListener("mouseup",this.handleClick)}mapLocation(e,t,i,n,o,a,s,r){return{isEditing:a,autofocus:s,locationName:e,locationType:i,searchPlaceholder:t,locationIcon:n,setLocation:o,tentativeLocation:o,autosuggestOpen:!1,suggestions:null,handleInput:(e,t)=>this.handleLocationSearch(e,i,t),handleSelectSuggestion:e=>this.handleLocationSuggestionSelect(i,e),handleCancelEditLocation:e=>this.handleCancelEditLocation(i,e),handleSaveLocation:()=>{this.handleSaveLocation(i)},handleRemoveLocation:e=>this.handleRemoveLocation(i,e),handleEditLocation:(e,t)=>this.handleEditLocation(e,i,t),telemetry:r}}mapTrafficCardSettings(){if(!this.strings)return;const e=this.commuteLocations&&this.commuteLocations.home,t=this.commuteLocations&&this.commuteLocations.work,i=(0,Lt.Du)(this.userSettings,this.trafficCardEnabled),n=new jr.Q((0,ct.Yq)().CurrentMarket),o=[...Array(48).keys()].map((e=>30*e*60)),a=o.map((e=>n.formatHourMinute(new Date(0,0,0,0,0,e))));this.state={commuteDaysOfWeek:i.commuteDaysOfWeek,distanceUnit:i.distanceUnit,enableDistanceUnitOption:!1,isTrafficCardEnabled:i.isTrafficScenarioEnabled,isCommuteCardEnabled:i.isCommuteScenarioEnabled,locations:[this.mapLocation(this.strings.homeLocationName,this.strings.homeSearchPlaceholderText,"Home",'<svg width="14" height="13" viewBox="0 0 14 13" fill="none"><path d="m7 .1 6.43 6.43-.61.61-.57-.56v5.5h-3.5V7.71h-3.5v4.37h-3.5v-5.5l-.57.56-.61-.61L7 .09Z" fill="#979797"/></svg>',e,this.editingHomeLocation,this.editingHomeLocation&&!this.editingWorkLocation,this.settingsTelemetry&&this.settingsTelemetry.homeTelemetry),this.mapLocation(this.strings.workLocationName,this.strings.workSearchPlaceholderText,"Work",'<svg width="13" height="12" viewBox="0 0 13 12" fill="none"><rect y="3.65" width="13" height="8" rx=".25" fill="#979797"/><path d="M3.5 4.65v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" stroke="#979797"/></svg>',t,this.editingWorkLocation,this.editingWorkLocation,this.settingsTelemetry&&this.settingsTelemetry.workTelemetry)],timeOfDayOptions:o,timeOfDayOptionsStrings:a,selectedArriveAtHomeTime:Math.round(i.arriveAtHomeTime/1800),selectedArriveAtWorkTime:Math.round(i.arriveAtWorkTime/1800)}}clickOnCommuteDayOfWeekButton(e){this.state=Object.assign(Object.assign({},this.state),{commuteDaysOfWeek:Object.assign(Object.assign({},this.state.commuteDaysOfWeek),{[e]:!this.state.commuteDaysOfWeek[e]})}),(0,Lt.bo)(this.state.commuteDaysOfWeek)}clickOnDistanceUnitButton(e){e&&!(0,Mt.TF)(e.id)&&e.id in Lt.Rb&&(this.state=Object.assign(Object.assign({},this.state),{distanceUnit:Lt.Rb[e.id]}),(0,Lt.eB)(this.state.distanceUnit))}isCommuteCardAvailable(){return!!this.state&&this.state.locations.every((e=>e.setLocation))}updateCommuteLocation(e,t){this.state=Object.assign(Object.assign({},this.state),{locations:this.state.locations.map((i=>i.locationType!=e?i:t(i)))})}async handleLocationSearch(e,t,i){if(!e)return;const n=e;if(!n)return;n.value=n.control.value;const o=i?await this.autosuggestClient.getAutoSuggestResponse(n.control.value):null;this.updateCommuteLocation(t,(e=>{const t=i?o:e.suggestions,n=t&&t.length>0;return Object.assign(Object.assign({},e),{autosuggestOpen:n,suggestions:t,tentativeLocation:i?null:e.tentativeLocation})}))}handleLocationSuggestionSelect(e,t){let i;this.updateCommuteLocation(e,(e=>(i=e.suggestions&&e.suggestions[t.selectedIndex],i=i&&Object.assign(Object.assign({},i),{displayName:(0,Lt.G1)(i)}),Object.assign(Object.assign({},e),{autosuggestOpen:!1,tentativeLocation:i})))),t.value=i?i.displayName:"",i&&this.autosuggestClient.geocodeSuggestion(i).then((t=>{t&&this.updateCommuteLocation(e,(e=>Object.assign(Object.assign({},e),{tentativeLocation:t})))}))}handleEditLocation(e,t,i){this.setIsEditing(t,!0)}handleCancelEditLocation(e,t){t.value="",this.setIsEditing(e,!1)}setIsEditing(e,t){this.updateCommuteLocation(e,(e=>(e.autofocus=!0,Object.assign(Object.assign({},e),{isEditing:t}))))}handleSaveLocation(e){let t;this.updateCommuteLocation(e,(e=>(t=Object.assign(Object.assign({},e),{setLocation:e.tentativeLocation,isEditing:!1}),t)));const i=t&&t.setLocation;if(!i)return;const n=parseFloat(i.latitude),o=parseFloat(i.longitude),a=(0,Lt.xk)(i);return t&&n&&o?(0,Lt.Be)("Home"==e,n,o,(0,Lt.V1)(t.setLocation),(0,Lt.H5)(t.setLocation),a,i.typeV6,i.subType,null).then((t=>{t&&(0,Lt.jb)(e,(0,Lt.$q)(n,o))})):Promise.resolve()}handleChangeCommuteTime(e,t){if(!t||!t.currentTarget)return;const i=t.currentTarget;"Home"==e?this.state.selectedArriveAtHomeTime=i.selectedIndex:this.state.selectedArriveAtWorkTime=i.selectedIndex,(0,Lt.gZ)(e,this.state.timeOfDayOptions[i.selectedIndex])}handleRemoveLocation(e,t){t&&(t.value=""),this.updateCommuteLocation(e,(e=>Object.assign(Object.assign({},e),{setLocation:void 0}))),(0,Lt.jb)(e)}handleClickTrafficSwitch(){this.state=Object.assign(Object.assign({},this.state),{isTrafficCardEnabled:!this.state.isTrafficCardEnabled}),this.saveTrafficCardScenariosEnabled()}handleClickCommuteSwitch(){this.state=Object.assign(Object.assign({},this.state),{isCommuteCardEnabled:!this.state.isCommuteCardEnabled}),this.saveTrafficCardScenariosEnabled()}saveTrafficCardScenariosEnabled(){this.updateTrafficCardEnabled(this.state.isTrafficCardEnabled||this.state.isCommuteCardEnabled,{isTrafficScenarioEnabled:this.state.isTrafficCardEnabled?"1":"0",isCommuteScenarioEnabled:this.state.isCommuteCardEnabled?"1":"0"})}}(0,T.gn)([C.Lj],Br.prototype,"commuteLocations",void 0),(0,T.gn)([C.Lj],Br.prototype,"userSettings",void 0),(0,T.gn)([C.Lj],Br.prototype,"autosuggestClient",void 0),(0,T.gn)([(0,C.Lj)({mode:"boolean"})],Br.prototype,"trafficCardEnabled",void 0),(0,T.gn)([(0,C.Lj)({mode:"boolean"})],Br.prototype,"enableFluentUIIcons",void 0),(0,T.gn)([C.Lj],Br.prototype,"updateTrafficCardEnabled",void 0),(0,T.gn)([(0,C.Lj)({attribute:"editinghomelocation",mode:"boolean"})],Br.prototype,"editingHomeLocation",void 0),(0,T.gn)([(0,C.Lj)({attribute:"editingworklocation",mode:"boolean"})],Br.prototype,"editingWorkLocation",void 0),(0,T.gn)([B.LO],Br.prototype,"strings",void 0),(0,T.gn)([B.LO],Br.prototype,"state",void 0),(0,T.gn)([B.LO],Br.prototype,"settingsTelemetry",void 0);var zr,Gr=i(26007),qr=i(86572),Vr=i(81281);!function(e){e.daysOfWeek=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],e.trafficDistanceUnits=[Lt.Rb.Miles,Lt.Rb.Kilometers]}(zr||(zr={}));var _r=i(11433);const Wr=L.d`
${(0,I.g)(((e,t)=>!e.isEditing),L.d`
    ${(0,I.g)(((e,t)=>!e.setLocation),L.d`
        <div class="uneditable-text">${(e,t)=>t.parent.strings.noLocationSavedText}</div>
        <fluent-button
            appearance="lightweight"
            class="endofline-btn"
            aria-labelledby=${e=>"label-"+e.locationType}
            role="button"
            @click=${e=>e.handleEditLocation()}
            data-t="${e=>e.telemetry&&e.telemetry.addTelemetryTag}"
        >
            ${(e,t)=>t.parent.strings.addBtnText}
        </fluent-button>
    `)}
    ${(0,I.g)(((e,t)=>e.setLocation),L.d`
        <div class="uneditable-text">${e=>e.setLocation&&e.setLocation.displayName}</div>
        <fluent-button
            appearance="lightweight"
            class="endofline-btn"
            aria-labelledby=${e=>"label-"+e.locationType}
            @click=${(e,t)=>e.handleEditLocation(t.event,e.locationCombobox)}
            data-t="${e=>e.telemetry&&e.telemetry.editTelemetryTag}"
        >
            ${(e,t)=>t.parent.strings.editBtnText}
        </fluent-button>
        <fluent-button
            appearance="lightweight"
            class="endofline-btn"
            aria-labelledby=${e=>"label-"+e.locationType}
            @click=${e=>e.handleRemoveLocation(e.locationCombobox)}
            data-t="${e=>e.telemetry&&e.telemetry.removeTelemetryTag}"
        >
            ${(e,t)=>t.parent.strings.removeBtnText}
        </fluent-button>
    `)}
`)}
${(0,I.g)(((e,t)=>e.isEditing),L.d`
    <div class="traffic-location-input-container">
    <msn-traffic-combobox
        class="traffic-location-input"
        appearance="outline"
        position="below"
        open=${e=>e.autosuggestOpen?"true":"false"}
        value=${(e,t)=>e.setLocation?e.setLocation.displayName:""}
        placeholder=${e=>e.searchPlaceholder}
        @input=${(e,t)=>e.handleInput(t.event.currentTarget,!0)}
        @change=${(e,t)=>e.handleSelectSuggestion(t.event.currentTarget)}
        ${(0,P.i)("locationCombobox")}
        ?autofocus=${e=>e.autofocus}
    >
        <span slot="start">
            ${Jn()}
        </span>
        <span slot="indicator"></span>
        ${(0,_.rx)(((e,t)=>e.suggestions),L.d`
            <msn-location-option
                class="autosuggest-item"
                overrideText="${(e,t)=>(0,Lt.G1)(e)}"
            >
                <div class="setting-card-item-text">
                    <div class="setting-card-item-icon">
                        ${'<svg width="42" height="42" viewBox="0 0 42 42" fill="none"><path d="m17.05 18.83-4.98 4.36 8.1 4.05L32 19.84v1.7l-11.75 7.34-8.68-4.33v5.88H32V32H10V10h1.57v11.7l5.55-4.86 3.1 3.13 8.64-8.64L32 14.47v2.04l-3.14-3.15-8.65 8.65-3.16-3.18Z" fill="#fff"/><rect width="42" height="42" rx="4" fill="url(#autosuggestLocation_paint0_linear)"/><path d="M32 33H10l4.4-13.5h5.87v-3.07a3.66 3.66 0 0 1-2.72-2.4A3.77 3.77 0 0 1 21 9a3.58 3.58 0 0 1 2.58 1.11 3.67 3.67 0 0 1 1.09 2.64 3.77 3.77 0 0 1-2.94 3.68v3.07h5.87L32 33ZM18.8 12.75a2.25 2.25 0 0 0 1.34 2.07 2.12 2.12 0 0 0 2.42-.48 2.26 2.26 0 0 0 .64-1.59 2.25 2.25 0 0 0-1.34-2.07 2.12 2.12 0 0 0-.86-.18 2.12 2.12 0 0 0-1.56.66 2.26 2.26 0 0 0-.64 1.59ZM12.04 31.5h17.92L26.55 21h-4.82v5.63c0 .07-.03.13-.09.18a.66.66 0 0 1-.2.12l-.25.06a1.96 1.96 0 0 1-.4 0 3.56 3.56 0 0 1-.24-.06.9.9 0 0 1-.2-.12.26.26 0 0 1-.08-.18V21h-4.82l-3.41 10.5Z" fill="#fff"/><defs><linearGradient id="autosuggestLocation_paint0_linear" x1=".33" y1="0" x2="48.74" y2="9.56" gradientUnits="userSpaceOnUse"><stop stop-color="#7FBA00"/><stop offset=".5" stop-color="#86BA16"/><stop offset="1" stop-color="#669209"/></linearGradient></defs></svg>'}
                    </div>
                    <div style="min-width: 0;">
                        <div class="hide-overflow">${e=>e.firstLine}</div>
                        <div class="setting-card-item-title-description hide-overflow">${e=>e.formattedAddress}</div>
                    </div>
                </div>
            </msn-location-option>
        `,{positioning:!0})}
    </msn-traffic-combobox>
    </div>
    <fluent-button
        appearance="lightweight"
        class="endofline-btn"
        aria-labelledby=${e=>"label-"+e.locationType}
        ?disabled=${e=>!e.tentativeLocation||!e.tentativeLocation.latitude||!e.tentativeLocation.longitude}
        @click=${e=>e.handleSaveLocation()}
        data-t="${e=>e.telemetry&&e.telemetry.saveTelemetryTag}"
    >
        ${(e,t)=>t.parent.strings.saveBtnText}
    </fluent-button>
    <fluent-button
        appearance="lightweight"
        class="endofline-btn"
        aria-labelledby=${e=>"label-"+e.locationType}
        @click=${e=>e.handleCancelEditLocation(e.locationCombobox)}
        data-t="${e=>e.telemetry&&e.telemetry.cancelTelemetryTag}"
    >
        ${(e,t)=>t.parent.strings.cancelBtnText}
    </fluent-button>
`)}
`,Zr=L.d`
${(0,I.g)((e=>e.state),L.d`
    <div class="traffic-inline-settings">
        ${(0,I.g)((e=>e.state.enableDistanceUnitOption),L.d`
            <div class="setting-card-sub-item-line">
                <label class="setting-card-item-text" id="distance-unit">
                    ${e=>e.strings.distanceUnitTitle}
                </label>
                <div class="setting-card-item-text">
                    ${(0,_.rx)((()=>zr.trafficDistanceUnits),L.d`
                        <span class="options">
                            ${(0,I.g)(((e,t)=>t.parent.state.distanceUnit==e),L.d`
                                <fluent-button
                                    appearance="lightweight"
                                    class="options-selected"
                                    style="font-weight: normal;"
                                    aria-labelledby="distance-unit"
                                    id=${e=>e}
                                    @click=${(e,t)=>{var i;return t.parent.clickOnDistanceUnitButton(null!==(i=t.event)&&void 0!==i?i:t.event.currentTarget)}}
                                >
                                    ${(e,t)=>t.parent.strings.distanceUnitBtnTexts[e]}
                                </fluent-button>
                            `)}
                            ${(0,I.g)(((e,t)=>t.parent.state.distanceUnit!=e),L.d`
                                <fluent-button
                                    appearance="lightweight"
                                    id=${e=>e}
                                    style="font-weight: normal; color: var(--neutral-foreground-rest);"
                                    aria-labelledby="distance-unit"
                                    @click=${(e,t)=>{var i;return t.parent.clickOnDistanceUnitButton(t.parent,null!==(i=t.event)&&void 0!==i?i:t.event.currentTarget)}}
                                >
                                    ${(e,t)=>t.parent.strings.distanceUnitBtnTexts[e]}
                                </fluent-button>
                            `)}
                        </span>
                        ${(0,I.g)(((e,t)=>!t.isLast),L.d`
                            <span class="options">|</span>
                        `)}
                    `,{positioning:!0})}
                </div>
            </div>
        `)}
        <div class="setting-card-sub-item-line"
            data-t="${e=>e.settingsTelemetry&&e.settingsTelemetry.trafficCardSectionTelemetryTag}"
        >
            <div class="setting-card-item-text">
                ${e=>e.strings.trafficScenarioEnableTitle}
            </div>
            <fluent-switch
                class="setting-card-toggle"
                checked=${e=>e.state.isTrafficCardEnabled}
                aria-label=${e=>e.strings.trafficScenarioEnableTitle}
                @change=${e=>e.handleClickTrafficSwitch()}
                data-t="${e=>e.settingsTelemetry&&(e.state.isTrafficCardEnabled?e.settingsTelemetry.trafficOnTelemetryTag:e.settingsTelemetry.trafficOffTelemetryTag)}"
            />
        </div>
        <div class="setting-card-sub-item-line"
            data-t="${e=>e.settingsTelemetry&&e.settingsTelemetry.commuteCardSectionTelemetryTag}"
        >
            <div class="setting-card-item-text">
                <div>${e=>e.strings.commuteScenarioEnableTitle}</div>
                ${(0,I.g)((e=>!e.isCommuteCardAvailable()),L.d`
                    <div>
                        <fluent-tooltip
                            anchor="commute-tooltip"
                            position=${(0,_r.M)(document.body)==Gr.N.rtl?"left":"right"}
                            class="tooltip show-commute"
                        >
                            ${e=>e.strings.commuteCardDisabledTooltip}
                        </fluent-tooltip>
                        <div id="commute-tooltip" class="tooltip-icon">${L.d`${Vr.Z}`}</div>
                    </div>
                `)}
            </div>
            ${(0,I.g)((e=>!e.isCommuteCardAvailable()),L.d`
                <fluent-switch
                    class="setting-card-toggle"
                    aria-label=${e=>e.strings.commuteScenarioEnableTitle}
                    disabled
                />
            `)}
            ${(0,I.g)((e=>e.isCommuteCardAvailable()),L.d`
                <fluent-switch
                    class="setting-card-toggle"
                    checked=${e=>e.state.isCommuteCardEnabled}
                    aria-label=${e=>e.strings.commuteScenarioEnableTitle}
                    @change=${e=>e.handleClickCommuteSwitch()}
                    data-t="${e=>e.settingsTelemetry&&(e.state.isCommuteCardEnabled?e.settingsTelemetry.commuteOnTelemetryTag:e.settingsTelemetry.commuteOffTelemetryTag)}"
                />
            `)}
        </div>
        <div class="setting-card-sub-item-line">
            <div>
                <div>${e=>e.strings.commuteSectionTitle}</div>
                <div class="setting-card-item-title-description">${e=>e.strings.commuteSectionSubtitle}</div>
            </div>
        </div>
        <div class="setting-card-sub-item-line"
            data-t="${e=>e.settingsTelemetry&&e.settingsTelemetry.commuteSectionTelemetryTag}"
        >
            <div class="multirow">
                ${(0,_.rx)((e=>e.state.locations),L.d`
                    <div class="location-row"
                        data-t="${e=>e.telemetry&&e.telemetry.commuteLocationSectionTelemetryTag}"
                    >
                        <div class="location-label">
                            ${e=>L.d`${e.locationIcon}`}
                            <label id=${e=>"label-"+e.locationType}>${e=>e.locationName}</label>
                        </div>
                        ${Wr}
                    </div>
                `,{positioning:!0})}
            </div>
        </div>
        ${(0,I.g)((e=>e.state.isCommuteCardEnabled&&e.isCommuteCardAvailable()),L.d`
            <div class="setting-card-sub-item-line"
                key=${(e,t)=>t.index}
                data-t="${e=>e.settingsTelemetry&&e.settingsTelemetry.daysCommutingSectionTelemetryTag}"
            >
                <div class="setting-card-item-text">
                    <label id="days-commuting">${e=>e.strings.daysCommutingTitle}</label>
                </div>
                ${(0,I.g)(((e,t)=>e.state.commuteDaysOfWeek),L.d`
                    <div class="dayofweek-picker">
                        ${(0,_.rx)((()=>zr.daysOfWeek),L.d`
                        <fluent-button
                            class="dayofweek-picker-btn"
                            appearance=${(e,t)=>t.parent.state.commuteDaysOfWeek[e]?"accent":"neutral"}
                            aria-labelledby="days-commuting"
                            aria-label="${(e,t)=>t.parent.strings.daysOfWeek[e]}"
                            role="button"
                            title="${(e,t)=>t.parent.strings.daysOfWeek[e]}"
                            aria-pressed="${(e,t)=>t.parent.state.commuteDaysOfWeek[e]?"true":"false"}"
                            @click=${(e,t)=>t.parent.clickOnCommuteDayOfWeekButton(e)}
                            id=${(e,t)=>e}
                            data-t="${(e,t)=>t.parent.settingsTelemetry.commuteDayPickerTelemetryTag}"
                        >
                            ${(e,t)=>t.parent.strings.commuteDayOfWeekBtnTexts[e]}
                        </fluent-button>`)}
                    </div>
                `)}
            </div>
            <div class="setting-card-sub-item-line"
                key=${(e,t)=>t.index}
                data-t="${e=>e.settingsTelemetry&&e.settingsTelemetry.daysCommutingSectionTelemetryTag}"
            >
                <div class="setting-card-item-text">
                    <div class="multirow">
                        <div class="commute-time-row">
                            <div class="setting-card-item-text">
                                <div>${e=>e.strings.arriveAtWorkTimeTitle}</div>
                                <div>
                                    <fluent-tooltip
                                        anchor="commute-time-tooltip"
                                        position=${(0,_r.M)(document.body)==Gr.N.rtl?"left":"right"}
                                        class="tooltip arrive-at"
                                    >
                                        ${e=>e.strings.arriveTimeTooltip}
                                    </fluent-tooltip>
                                    <div id="commute-time-tooltip" class="tooltip-icon">${L.d`${Vr.Z}`}</div>
                                </div>
                            </div>
                            <msn-traffic-select
                                class="commute-time-dropdown"
                                aria-label=${e=>e.strings.arriveAtWorkTimeTitle}
                                @change=${(e,t)=>e.handleChangeCommuteTime("Work",t.event)}
                                data-t="${e=>e.settingsTelemetry&&e.settingsTelemetry.arriveAtWorkTelemetryTag}"
                            >
                                ${(0,_.rx)((e=>e.state.timeOfDayOptionsStrings),L.d`
                                    <fluent-option
                                        ?selected=${(e,t)=>t.parent.state.selectedArriveAtWorkTime==t.index}
                                    >
                                        ${e=>e}
                                    </fluent-option>
                                `,{positioning:!0})}
                                <span slot="indicator">${qr.Z}</span>
                            </msn-traffic-select>
                        </div>
                        <div class="commute-time-row">
                            <div class="setting-card-item-text">
                                <div>${e=>e.strings.arriveAtHomeTimeTitle}</div>
                            </div>
                            <msn-traffic-select
                                class="commute-time-dropdown"
                                aria-label=${e=>e.strings.arriveAtHomeTimeTitle}
                                @change=${(e,t)=>e.handleChangeCommuteTime("Home",t.event)}
                                data-t="${e=>e.settingsTelemetry&&e.settingsTelemetry.arriveAtHomeTelemetryTag}"
                            >
                                ${(0,_.rx)((e=>e.state.timeOfDayOptionsStrings),L.d`
                                    <fluent-option
                                        ?selected=${(e,t)=>t.parent.state.selectedArriveAtHomeTime==t.index}
                                    >
                                        ${e=>e}
                                    </fluent-option>
                                `,{positioning:!0})}
                                <span slot="indicator">${qr.Z}</span>
                            </msn-traffic-select>
                        </div>
                    </div>
                </div>
            </div>
        `)}
    </div>
`)}`;let Jr=class extends Br{};Jr=(0,T.gn)([(0,Ri.M)({name:"msn-traffic-settings",template:Zr,styles:[Te,yo]})],Jr);var Yr=i(81563);qs.q,Js.S;const Kr=L.d`
<msn-interests-river-section
    id=${e=>e.followedSourcesSectionElement.id}
>
    <msn-topics-section
        id=${e=>e.followedSourcesSectionElement.topicsSection.id}
        section-title=${e=>e.followedSourcesSectionElement.heading}
        no-topics-message=${e=>e.followedSourcesSectionElement.emptyStateCardTitle}
        :topics=${e=>e.followedSourcesSectionElement.topicsSection.topics}
        data-t="${e=>e.followedSourcesSectionElement.topicsSection.topicsSectionTelemetryTag}"
        :topicSelectedHandler=${e=>e.followedSourcesSectionElement.topicsSection.topicSelectedHandler}
        :followedClickedHandler=${e=>e.followedSourcesSectionElement.topicsSection.followedClickedHandler}
        :hideClickHandler=${e=>e.followedSourcesSectionElement.topicsSection.hideClickHandler}
        :enableVNextStyles=${e=>!0}
    ></msn-topics-section>
</msn-interests-river-section>`,Xr=L.d`
<msn-interests-river-section
    id=${e=>e.followedTopicsSectionElement.id}
>
    <msn-topics-section
        id=${e=>e.followedTopicsSectionElement.topicsSection.id}
        section-title=${e=>e.followedTopicsSectionElement.heading}
        no-topics-message=${e=>e.followedTopicsSectionElement.emptyStateCardTitle}
        :topics=${e=>e.followedTopicsSectionElement.topicsSection.topics}
        data-t="${e=>e.followedTopicsSectionElement.topicsSection.topicsSectionTelemetryTag}"
        :topicSelectedHandler=${e=>e.followedTopicsSectionElement.topicsSection.topicSelectedHandler}
        :followedClickedHandler=${e=>e.followedTopicsSectionElement.topicsSection.followedClickedHandler}
        :hideClickHandler=${e=>e.followedTopicsSectionElement.topicsSection.hideClickHandler}
        :enableVNextStyles=${e=>e.config.enableHiddenTopicsExperience}
    ></msn-topics-section>
</msn-interests-river-section>`,Qr=L.d`
<msn-interests-river-section
    description=${e=>e.followedListSectionElement.description}
    heading=${e=>e.followedListSectionElement.heading}
    id=${e=>e.followedListSectionElement.id}
>
    ${(0,I.g)((e=>e.followedSourcesSectionElement),Kr)}
    ${(0,I.g)((e=>e.sidePaneMenuElement&&e.followedTopicsSectionElement),Xr)}
</msn-interests-river-section>`,el=L.d`
<msn-interests-river-section
    id=${e=>e.blockedSourcesSectionElement.id}
>
    <msn-topics-section
        id=${e=>e.blockedSourcesSectionElement.topicsSection.id}
        section-title=${e=>e.blockedSourcesSectionElement.heading}
        no-topics-message=${e=>e.blockedSourcesSectionElement.emptyStateCardTitle}
        :topics=${e=>e.blockedSourcesSectionElement.topicsSection.topics}
        :followedClickedHandler=${e=>e.blockedSourcesSectionElement.topicsSection.followedClickedHandler}
        :hideClickHandler=${e=>e.blockedSourcesSectionElement.topicsSection.hideClickHandler}
        :enableVNextStyles=${e=>!0}
        data-t="${e=>{var t;return null===(t=e.interestsTelemetry)||void 0===t?void 0:t.hiddenPublishersSectionTelemetryTag}}"
    ></msn-topics-section>
</msn-interests-river-section>`,tl=L.d`
<msn-interests-river-section
    id=${e=>e.blockedTopicsSectionElement.sectionId}
>
    <msn-topics-section
        id=${e=>e.blockedTopicsSectionElement.sectionId}
        section-title=${e=>e.blockedTopicsSectionElement.sectionTitle}
        no-topics-message=${e=>e.blockedTopicsSectionElement.emptyStateCardTitle}
        :topics=${e=>e.blockedTopicsSectionElement.topics}
        :topicSelectedHandler=${e=>e.blockedTopicsSectionElement.topicSelectedHandler}
        :followedClickedHandler=${e=>e.blockedTopicsSectionElement.followedClickedHandler}
        :hideClickHandler=${e=>e.blockedTopicsSectionElement.hideClickHandler}
        :enableVNextStyles=${e=>!0}
        data-t="${e=>{var t;return null===(t=e.interestsTelemetry)||void 0===t?void 0:t.hiddenTopicsSectionTelemetryTag}}"
    ></msn-topics-section>
</msn-interests-river-section>`,il=L.d`
<msn-interests-river-section
    description=${e=>e.blockedListSectionElement.description}
    heading=${e=>e.blockedListSectionElement.heading}
    id=${e=>e.blockedListSectionElement.id}
>

    ${(0,I.g)((e=>e.blockedSourcesSectionElement),el)}
    ${(0,I.g)((e=>e.blockedTopicsSectionElement),tl)}
</msn-interests-river-section>`,nl=L.d`
<msn-topics-section
    id=${e=>e.id}
    section-title=${e=>e.sectionTitle}
    :topics=${e=>e.topics}
    data-t="${e=>e.topicsSectionTelemetryTag}"
    :topicSelectedHandler=${e=>e.topicSelectedHandler}
    :followedClickedHandler=${e=>e.followedClickedHandler}
    :hideClickHandler=${e=>e.hideClickHandler}
    :enableVNextStyles=${(e,t)=>t.parent.config.enableHiddenTopicsExperience}
    part="topics-section"
></msn-topics-section>`,ol=L.d`
<msn-topic-listbox-option
    :topicCardData=${e=>e.topicCardData}
    :topicType=${e=>e.topicType}
></msn-topic-listbox-option>`,al=L.d`
    ${(0,_.rx)((e=>e.discoverInterestsRiverElement.topicSections),nl)}
`,sl=L.d`
    <msn-discover-interests-river-section
        style="--discover-header-sticky-top: var(--navigation-pane-wrapper-sticky-top)"
        id=${e=>e.discoverInterestsRiverElement.id}
        description=${e=>e.discoverInterestsRiverElement.description}
        heading=${e=>e.discoverInterestsRiverElement.heading}
        enable-sticky=${e=>e.searchBoxSticky}
        enable-search-image=${e=>e.config.enableHiddenTopicsExperience}
        sticky-header=${e=>e.discoverInterestsRiverElement.stickyHeader}
    >
        <msn-interests-search
            class=${e=>e.config.enableHiddenTopicsExperience?"vnext":""}
            slot="content"
            :telemtryObject=${e=>e.discoverInterestsRiverElement.interestsSearch.telemtryObject}
            placeholder=${e=>e.discoverInterestsRiverElement.interestsSearch.placeholder}
            :handleFollowStateChange = ${e=>e.discoverInterestsRiverElement.interestsSearch.handleFollowStateChange}
            @input-change= ${(e,t)=>e.discoverInterestsRiverElement.interestsSearch.inputChange(t.event)}
            data-t="${e=>e.discoverInterestsRiverElement.interestsSearch.telemetryTag}"
            ${(0,P.i)("searchBoxRef")}
        >
            <span slot="indicator">${e=>L.d`${e.discoverInterestsRiverElement.interestsSearch.glyphType}`}</span>
            ${(0,_.rx)((e=>e.discoverInterestsRiverElement.suggestionItems),ol)}
        </msn-interests-search>
        ${al}
    </msn-discover-interests-river-section>
`,rl=L.d`
<div>
    <div class="mute-dialog-img">
        <img src=${e=>e.unmuteDialogBodyElement.imgSrc} />
    </div>
    <div class="mute-dialog-content">
        <p>
            ${(0,_.rx)((e=>e.unmuteDialogBodyElement.providerContent),L.d`${e=>e&&L.d`${e}`}`)}
        </p>
    </div>
</div>`,ll=L.d`
<msn-action-dialog
    class="mute-dialog"
    headline=${e=>e.unmuteDialogElement.localizedStrings.dialogHeadline}
    data-t="${e=>e.unmuteDialogElement.telemetryTag}"
    @action-dialog-dismiss=${e=>e.unmuteDialogElement.actionDialogDismiss()}
>
    <fluent-button
        slot="close-button"
        tabindex="0"
        appearance="stealth"
        id="actionDialogCloseButton"
        @click=${e=>e.unmuteDialogElement.actionDialogDismiss()}
        aria-label=${e=>e.unmuteDialogElement.localizedStrings.closeButtonAriaLabel}
        role="button"
        title=${e=>e.unmuteDialogElement.localizedStrings.closeButtonTitleLabel}
        data-t="${e=>e.unmuteDialogElement.closeButtonTelemetryTag}"
    >
        ${Bn()}
    </fluent-button>
    ${(0,I.g)((e=>e.unmuteDialogBodyElement),rl)}
    <div class="action-dialog-controls-container">
        <fluent-button
            slot="action-button"
            tabindex="0"
            title=${e=>e.unmuteDialogElement.localizedStrings.actionButtonTitleLabel}
            aria-label=${e=>e.unmuteDialogElement.localizedStrings.actionButtonAriaLabel}
            role="button"
            class="action-dialog-control-buttons"
            @click=${(e,t)=>e.unmuteDialogElement.actionButtonCallback&&e.unmuteDialogElement.actionButtonCallback(t.event)}
            @keypress=${(e,t)=>e.unmuteDialogElement.actionButtonCallback&&e.unmuteDialogElement.actionButtonCallback(t.event)}
            appearance="accent"
            data-t="${e=>e.unmuteDialogElement.actionButtonTelemetryTag}"
        >
            ${e=>e.unmuteDialogElement.localizedStrings.actionButtonText}
        </fluent-button>
        <fluent-button
            slot="cancel-button"
            tabindex="0"
            id="actionDialogCancelButton"
            title=${e=>e.unmuteDialogElement.localizedStrings.cancelButtonTitleLabel}
            aria-label=${e=>e.unmuteDialogElement.localizedStrings.cancelButtonAriaLabel}
            role="button"
            class="action-dialog-control-buttons"
            @click=${(e,t)=>e.unmuteDialogElement.cancelButtonCallback&&e.unmuteDialogElement.cancelButtonCallback(t.event)}
            @keypress=${(e,t)=>e.unmuteDialogElement.cancelButtonCallback&&e.unmuteDialogElement.cancelButtonCallback(t.event)}
            ?disabled=${e=>e.unmuteDialogElement.disableCancelButton}
            data-t="${e=>e.unmuteDialogElement.cancelButtonTelemetryTag}"
        >
            ${e=>e.unmuteDialogElement.localizedStrings.cancelButtonText}
        </fluent-button>
    </div>
</msn-action-dialog>`,dl=L.d`
${(0,I.g)((e=>e.strings.complianceBannerText&&e.strings.complianceBannerHyperlinkText),L.d`
<div class="tree-view-menu-items">
    <div class="compliance-disclaimer-message">
        <p class="compliance-text">
        ${e=>e.strings.complianceBannerText} <a href="https://www.microsoft.com/en-us/trust-center?rtc=1"> ${e=>e.strings.complianceBannerHyperlinkText} </a>
        </p>
    </div>
</div>
`)}`,cl=L.d`
<img
    slot="media"
    src=${e=>e.imageProps.src}
    alt=${e=>e.imageProps.alt}
    aria-label=${e=>e.imageProps.title}
    title=${e=>e.imageProps.title}
    width=${e=>e.imageProps.width}
    height=${e=>e.imageProps.height}
/>`,ul=L.d`
<msft-attribution slot="attribution">
    ${(0,I.g)((e=>e.providerProps.src),L.d`
        <img
            slot="image"
            src=${e=>e.providerProps.src}
            alt=${e=>e.providerProps.alt}
        />`)}
    ${e=>e.providerName}
</msft-attribution>`,hl=L.d`
<fluent-card class="_1x_1y" data-t="${e=>e.telemetryTag}">
    <msft-content-card
        href=${e=>e.href}
        target="_blank"
        aria-label=${e=>e.ariaLabel}
        title=${e=>e.titleLabel}
        anchorTelemetryTag=${e=>e.anchorTelemetryTag}
    >
        ${e=>e.title}
        ${(0,I.g)((e=>e.imageProps),cl)}
        ${(0,I.g)((e=>e.providerProps),ul)}
        <div slot="end-actions">
            <fluent-button
                @click=${(e,t)=>e.saveActionTrigger&&e.saveActionTrigger.click&&e.saveActionTrigger.click(e.id,it.Us.Save,t.event)}
                appearance="stealth"
                aria-label=${e=>e.saveActionTrigger&&e.saveActionTrigger.ariaLabel}
                role="button"
                title=${e=>e.saveActionTrigger&&e.saveActionTrigger.title}
                data-t="${e=>{var t;return null===(t=e.saveActionTrigger)||void 0===t?void 0:t.telemetryTag}}"
                data-customhandled="true"
            >
                ${(0,I.g)((e=>e.saveActionTrigger&&e.saveActionTrigger.glyphType),(e=>L.d`${e.saveActionTrigger.glyphType}`))}
            </fluent-button>
            <fluent-button
                @click=${(e,t)=>e.actionTrigger&&e.actionTrigger.click&&e.actionTrigger.click(e.id,e.articleProps,e.moreButtonTelemetryObject,t.event)}
                appearance="stealth"
                aria-label=${e=>e.actionTrigger&&e.actionTrigger.ariaLabel}
                role="button"
                title=${e=>e.actionTrigger&&e.actionTrigger.title}
                data-t="${e=>{var t;return null===(t=e.actionTrigger)||void 0===t?void 0:t.telemetryTag}}"
            >
                ${(0,I.g)((e=>e.actionTrigger&&e.actionTrigger.glyphType),(e=>L.d`${e.actionTrigger.glyphType}`))}
            </fluent-button>
        </div>
    </msft-content-card>
</fluent-card>`,gl=L.d`
<div
    class="content-card-section"
    data-t="${e=>{var t;return null===(t=e.interestsTelemetry)||void 0===t?void 0:t.savedStoriesSectionTelemetryTag}}"
    id="${e=>e.savedStoriesSectionElement&&e.savedStoriesSectionElement.sectionId}"
>
    <div class="content-card-section-heading">${e=>e.savedStoriesSectionElement&&e.savedStoriesSectionElement.sectionTitle}</div>
    ${(0,I.g)((e=>e.savedStoriesSectionElement&&e.savedStoriesSectionElement.cardProps&&e.savedStoriesSectionElement.cardProps.length),L.d`
        <div class="content-cards-list">
        ${(0,_.rx)((e=>e.savedStoriesSectionElement.cardProps),hl)}
        </div>
    `)}
    ${(0,I.g)((e=>!(e.savedStoriesSectionElement&&e.savedStoriesSectionElement.cardProps&&e.savedStoriesSectionElement.cardProps.length)),L.d`
        <span class="content-card-description">${e=>e.savedStoriesSectionElement&&e.savedStoriesSectionElement.emptyListMessage}</span>
    `)}
</div>`,pl=L.d`
<div
    class="content-card-section"
    data-t="${e=>{var t;return null===(t=e.interestsTelemetry)||void 0===t?void 0:t.readStoriesSectionTelemetryTag}}"
    id="${e=>e.readStoriesSectionElement&&e.readStoriesSectionElement.sectionId}"
>
    <div class="content-card-section-heading">${e=>e.readStoriesSectionElement&&e.readStoriesSectionElement.sectionTitle}</div>
    ${(0,I.g)((e=>e.readStoriesSectionElement&&e.readStoriesSectionElement.cardProps&&e.readStoriesSectionElement.cardProps.length),L.d`
        <div class="content-cards-list">
            ${(0,_.rx)((e=>e.readStoriesSectionElement.cardProps),hl)}
        </div>
    `)}
    ${(0,I.g)((e=>!(e.readStoriesSectionElement&&e.readStoriesSectionElement.cardProps&&e.readStoriesSectionElement.cardProps.length)),L.d`
        <span class="content-card-description">${e=>e.readStoriesSectionElement&&e.readStoriesSectionElement.emptyListMessage}</span>
    `)}
</div>`,ml=L.d`
    <div class="setting-card-sub-item-line">
        <div class="setting-card-item-text">
            ${e=>e.toggleDescription}
        </div>
        <fluent-switch
            data-t="${e=>e.telemetryTag}"
            aria-label=${e=>e.cardName}
            class="setting-card-toggle"
            checked=${e=>e.toggleChecked}
            id=${e=>e.cardType}
            @change=${(e,t)=>{var i;return e.updateSettingStatus(null===(i=t.event)||void 0===i?void 0:i.currentTarget)}}
        ></fluent-switch>
    </div>
`,fl=L.d`
    <div slot="inline-settings-content" class="inline-settings">
        <div class="subitems">
            ${(0,_.rx)((e=>e.inlineContentsMapping.cards),ml)}
        </div>
    </div>
`,vl=L.d`
    ${(0,I.g)(((e,t)=>t.parent.sportsDislikes&&t.parent.sportsDislikes.length>0),L.d`
        <div slot="inline-settings-content" class="inline-settings">
            <div class="setting-card-toggle-text setting-card-item-title-text">${(e,t)=>t.parent.strings.sportsInformationTitle||""}</div>
            <div class="subitems">
                ${(0,_.rx)(((e,t)=>t.parent.sportsDislikes),L.d`
                    <div class="setting-card-sub-item-line" key=${(e,t)=>t.index}>
                        <div class="setting-card-item-text">
                            <div class="setting-card-item-icon">
                                ${'<svg width="42" height="42" viewBox="0 0 42 42" fill="none"><rect width="42" height="42" rx="4" fill="url(#paint0_linear)"/><g clip-path="url(#clip0)" fill="#fff"><path d="M31.68 15.52c-.41-.41-1.12-.41-1.53 0l-1.8 1.76a.64.64 0 0 1-.9 0l-6.22-6.22c-.92-.9-2.43-.9-3.35 0l-2.72 2.67c-.42.41-.42 1.1 0 1.5.41.42 1.12.42 1.53 0l2.7-2.64c.09-.09.22-.09.3 0l1.86 1.83-1.84 1.78a1.86 1.86 0 0 0 0 2.67c.37.36.87.56 1.36.56.48 0 .98-.18 1.35-.56l1.8-1.77 1.67 1.67c.55.54 1.27.8 1.99.8.71 0 1.43-.26 1.98-.8l1.8-1.76a1 1 0 0 0 .02-1.5ZM18.5 18.99a1.17 1.17 0 0 0-1.29-.23c-.43.18-.72.6-.7 1.08l.1 5.17h-4.44c-.65 0-1.17.5-1.17 1.15 0 .63.52 1.14 1.17 1.14h4.92c.5 0 .97-.2 1.34-.54.35-.36.53-.82.53-1.3l-.06-2.86 3.2 3.1-4.42 4.34a1.14 1.14 0 0 0 .82 1.94c.28 0 .6-.11.81-.32l5.26-5.16c.22-.21.35-.5.35-.82 0-.31-.13-.6-.35-.82L18.5 19Z"/><path d="M26.72 14.49c1.27 0 2.3-1 2.3-2.25a2.27 2.27 0 0 0-2.3-2.24c-1.26 0-2.28 1-2.28 2.24a2.27 2.27 0 0 0 2.28 2.25Z"/></g><defs><linearGradient id="paint0_linear" x1=".33" y1="0" x2="48.74" y2="9.56" gradientUnits="userSpaceOnUse"><stop stop-color="#6B52ED"/><stop offset=".5" stop-color="#6451C8"/><stop offset="1" stop-color="#5846AE"/></linearGradient><clipPath id="clip0"><path fill="#fff" transform="translate(11 10)" d="M0 0h21v22H0z"/></clipPath></defs></svg>'}
                            </div>
                            <div class="setting-card-item-icon-title">
                                <div>${e=>e.name}</div>
                                <div class="setting-card-item-title-description">${(e,t)=>t.parent.getSportsEntityTypeDescription&&t.parent.getSportsEntityTypeDescription(e.type)}</div>
                            </div>
                        </div>
                        <fluent-switch
                            class="setting-card-toggle"
                            id=${e=>`${e.id}${Sn.I4}${e.type}`}
                            aria-label=${e=>e.name}
                            title=${e=>e.name}
                            @change=${(e,t)=>{var i;return t.parentContext.parent.clickOnSportsEntitySwitch&&t.parentContext.parent.clickOnSportsEntitySwitch(null===(i=t.event)||void 0===i?void 0:i.currentTarget)}}
                        />
                    </div>
                `)}
            </div>
        </div>
    `)}
`,yl=L.d`${(0,I.g)((e=>e.cardName),L.d`
        <div
            key="${e=>e.cardName}"
            class="setting-card-container"
            id="${e=>e.id}"
        >
            <msn-setting-card cardTitle=${e=>e.cardName}>
                ${(0,I.g)((e=>e.displayToggle&&e.toggleDescription),L.d`
                    <span class="setting-card-toggle-text">${e=>e.toggleDescription}</span>
                    <fluent-switch
                        data-t="${e=>e.telemetryTag}"
                        aria-label=${e=>e.cardName}
                        class="setting-card-toggle"
                        checked=${e=>e.toggleChecked}
                        id=${e=>e.cardType}
                        @change=${(e,t)=>{var i;return e.updateSettingStatus(null===(i=t.event)||void 0===i?void 0:i.currentTarget)}}
                    ></fluent-switch>
                `)}
                ${(0,I.g)((e=>"Sports"==e.inlineSettingsType),vl)}
                ${(0,I.g)((e=>"GamingCards"==e.inlineSettingsType),fl)}
                ${(0,I.g)((e=>"Traffic"==e.inlineSettingsType),L.d`
                    <msn-traffic-settings
                        slot="inline-settings-content"
                        :commuteLocations=${(e,t)=>t.parent.commuteLocations}
                        :userSettings=${(e,t)=>t.parent.userSettings}
                        :autosuggestClient=${(e,t)=>t.parent.trafficAutosuggestClient}
                        :strings=${(e,t)=>t.parent.strings.trafficSettingsStrings}
                        :trafficCardEnabled=${(e,t)=>e.toggleChecked}
                        :updateTrafficCardEnabled=${(e,t)=>t.parent.setTrafficCardEnabledState}
                        ?editinghomelocation=${(e,t)=>t.parent.isEditingHomeLocation()}
                        ?editingworklocation=${(e,t)=>t.parent.isEditingWorkLocation()}
                        data-t="${(e,t)=>t.parent.interestsTelemetry&&t.parent.interestsTelemetry.trafficSettingsSectionTelemetryTag}"
                    ></msn-traffic-settings>
                `)}
            </msn-setting-card>
        </div>`)}`,bl=L.d`
<div
    class="settings-container"
    data-t="${e=>{var t;return null===(t=e.sdSettingPageElement)||void 0===t?void 0:t.telemetryTag}}"
>
    <div
        class="setting-heading"
        id="${e=>e.sdSettingPageElement&&e.sdSettingPageElement.settingsId}"
    >
        ${e=>e.sdSettingPageElement&&e.sdSettingPageElement.heading}
    </div>
    ${(0,I.g)((e=>e.sdSettingPageElement&&e.sdSettingPageElement.cards&&e.sdSettingPageElement.cards.length),L.d`
        ${(0,_.rx)((e=>e.sdSettingPageElement.cards),yl)}
    `)}
    ${(0,I.g)((e=>!(e.sdSettingPageElement&&e.sdSettingPageElement.cards&&e.sdSettingPageElement.cards.length)),L.d`
        <span class="content-card-description">${e=>e.sdSettingPageElement&&e.sdSettingPageElement.emptyListMessage}</span>
    `)}
</div>`,Sl=L.d`
<div
    class="settings-container"
    data-t="${e=>{var t;return null===(t=e.feedSettingPageElement)||void 0===t?void 0:t.telemetryTag}}"
>
    <div
        class="setting-heading"
        id="${e=>e.feedSettingPageElement&&e.feedSettingPageElement.settingsId}"
    >
        ${e=>e.feedSettingPageElement&&e.feedSettingPageElement.heading}
    </div>
    ${(0,I.g)((e=>e.feedSettingPageElement&&e.feedSettingPageElement.cards&&e.feedSettingPageElement.cards.length),L.d`
        ${(0,_.rx)((e=>e.feedSettingPageElement.cards),yl)}
    `)}
    ${(0,I.g)((e=>!(e.feedSettingPageElement&&e.feedSettingPageElement.cards&&e.feedSettingPageElement.cards.length)),L.d`
        <span class="content-card-description">${e=>e.feedSettingPageElement&&e.feedSettingPageElement.emptyListMessage}</span>
    `)}
</div>`,wl=L.d`
<div
    class="settings-container"
    data-t="${e=>{var t;return null===(t=e.productivitySettingPageElement)||void 0===t?void 0:t.telemetryTag}}"
>
    <div
        class="setting-heading"
        id="${e=>e.productivitySettingPageElement&&e.productivitySettingPageElement.settingsId}"
    >
        ${e=>e.productivitySettingPageElement&&e.productivitySettingPageElement.heading}
    </div>
    ${(0,I.g)((e=>e.productivitySettingPageElement&&e.productivitySettingPageElement.cards&&e.productivitySettingPageElement.cards.length),L.d`
        ${(0,_.rx)((e=>e.productivitySettingPageElement.cards),yl)}
    `)}
    ${(0,I.g)((e=>!(e.productivitySettingPageElement&&e.productivitySettingPageElement.cards&&e.productivitySettingPageElement.cards.length)),L.d`
        <span class="content-card-description">${e=>e.productivitySettingPageElement&&e.productivitySettingPageElement.emptyListMessage}</span>
    `)}
</div>`,Tl=L.d`
<div
    class="settings-container"
    data-t="${e=>{var t;return null===(t=e.gamingSettingPageElement)||void 0===t?void 0:t.telemetryTag}}"
>
    <div
        class="setting-heading"
        id="${e=>e.gamingSettingPageElement&&e.gamingSettingPageElement.settingsId}"
    >
        ${e=>e.gamingSettingPageElement&&e.gamingSettingPageElement.heading}
    </div>
    ${(0,I.g)((e=>e.gamingSettingPageElement&&e.gamingSettingPageElement.cards&&e.gamingSettingPageElement.cards.length),L.d`
        ${(0,_.rx)((e=>e.gamingSettingPageElement.cards),yl)}
    `)}
    ${(0,I.g)((e=>!(e.gamingSettingPageElement&&e.gamingSettingPageElement.cards&&e.gamingSettingPageElement.cards.length)),L.d`
        <span class="content-card-description">${e=>e.gamingSettingPageElement&&e.gamingSettingPageElement.emptyListMessage}</span>
    `)}
</div>`,Cl=L.d`
<div
    class="settings-container"
    id="${e=>{var t;return null===(t=e.settingMarketSelectorElement)||void 0===t?void 0:t.settingsId}}"
>
    <div class="setting-heading">
        ${e=>{var t;return null===(t=e.settingMarketSelectorElement)||void 0===t?void 0:t.heading}}
    </div>
    <div class="market-settings-container">
        <div class="market-settings-content">
            <msn-market-selector
                :onValueChange=${e=>e.marketUpdatedCallback}
                :defaultMarketId=${e=>{var t;return null===(t=e.settingMarketSelectorElement)||void 0===t?void 0:t.defaultSelection}}
                :marketList=${e=>e.settingsMarkets}
                :label=${e=>{var t;return null===(t=e.settingMarketSelectorElement)||void 0===t?void 0:t.description}}
                :marketSelectorMetaTag=${e=>{var t;return null===(t=e.interestsTelemetry)||void 0===t?void 0:t.marketSettingsSectionTelemetryTag}}
                ${(0,P.i)("marketSelectorRef")}
            ></msn-market-selector>
        </div>
    </div>
</div>`,xl=L.d`
<div
    class="settings-container"
    id="${e=>e.settingAccountLinkingElement.sectionId}"
>
    <div class="setting-heading">
        ${e=>e.settingAccountLinkingElement.heading}
    </div>
    <msn-account-linking-setting
        :apiData=${e=>e.settingAccountLinkingElement.data}
        :faqLink=${e=>e.settingAccountLinkingElement.faqLink}
        :strings=${e=>e.strings.accountLinkingSettingStrings}
        :rootTelemetryObject=${e=>e.interestsTelemetry.accountLinkingSettingsSectionTelemetryObject}
        >
    </msn-account-linking-setting>
</div>
`,kl=L.d`
${(0,I.g)((e=>e.showDivider),L.d`<fluent-divider />`)}
<fluent-tree-item
    id=${e=>e.id}
    :focusable=${(e,t)=>t.isFirst}
    data-t="${e=>e.telemetryTag}"
    key=${e=>e.id}
    :selected=${e=>e.selected}
    :expanded=${e=>e.expanded}
    @click=${(e,t)=>e.onClick(t.event)}
    @keydown=${(e,t)=>e.onClick(t.event)}
    class="nested"
    style="background: transparent"
>
    ${(0,I.g)((e=>e.glyphStart),L.d`<span slot="start" class="tree-item-glyph-start-container">${e=>L.d`${e.glyphStart}`}</span>`)}
    ${e=>e.display}
    ${(0,I.g)((e=>e.glyphEnd),L.d`<span slot="end" class="tree-item-glyph-end-container">${e=>L.d`${e.glyphEnd}`}</span>`)}
    ${(0,_.rx)((e=>e.menuItems),L.d`
        ${(0,I.g)((e=>e.showDivider),L.d`<fluent-divider />`)}
        <fluent-tree-item
            id=${e=>e.id}
            data-t="${e=>e.telemetryTag}"
            key=${e=>e.id}
            :selected=${e=>e.selected}
            :expanded=${e=>e.expanded}
            class="nested"
            style="background: transparent"
        >
            ${(0,I.g)((e=>e.glyphStart),L.d`<span slot="start" class="tree-item-glyph-start-container">${e=>L.d`${e.glyphStart}`}</span>`)}
            ${e=>e.display}
            ${(0,I.g)((e=>e.glyphEnd),L.d`<span slot="end" class="tree-item-glyph-end-container">${e=>L.d`${e.glyphEnd}`}</span>`)}
        </fluent-tree-item>
    `)}
</fluent-tree-item>`,$l=L.d`
<fluent-tree-view
    style=${e=>e.sidePaneMenuElement.styles}
    @expanded-change=${(e,t)=>e.sidePaneMenuElement.expandedChange(t.event)}
    slot="navigation"
    part="navigation"
    data-t="${e=>e.sidePaneMenuElement.telemetryTag}"
>
    ${(0,I.g)((e=>{var t;return null===(t=e.sidePaneMenuElement.menuItems)||void 0===t?void 0:t.length}),L.d`
        <div class="tree-view-menu-items">
            ${(0,_.rx)((e=>e.sidePaneMenuElement.menuItems),kl,{positioning:!0})}
        </div>
    `)}
    ${(0,I.g)((e=>e.config.displayComplianceMessage),dl)}
</fluent-tree-view>
`,Ol=L.d`
    <div
        class="settings-container notification-setting-card-container"
        data-t="${(e,t)=>{var i;return null===(i=t.parent.interestsTelemetry)||void 0===i?void 0:i.notificationTopicTelemetryTag(e[0])}}"
    >
    ${(0,_.rx)((e=>e),L.d`
        <div class="notification-setting-card${e=>e.type?"":" notification-topic-setting-card"}" id=${e=>e.menuItemId}>
            <div class="left">
                <div class="notification-setting-card-title${e=>e.type?"":" notification-topic-setting-card-title"}">${e=>e.name}</div>
                ${(0,I.g)((e=>e.desc),L.d`<div class="notification-setting-card-desc">${e=>e.desc}</div>`)}
            </div>
            ${(0,I.g)((e=>e.type),L.d`
            <div class="right">
                <fluent-switch
                    data-t="${e=>e.telemetryTag}"
                    aria-label=${e=>e.type}
                    id=${e=>e.type}
                    class="setting-card-toggle"
                    checked=${e=>e.toggleChecked}
                    ?disabled=${e=>!e.toggleEnabled}
                    @change=${(e,t)=>{var i;return e.updateNotificationSetting(null===(i=t.event)||void 0===i?void 0:i.currentTarget)}}
                >
                </fluent-switch>
            </div>
            `)}
        </div>
    `)}
    </div>
`,Ll=L.d`
<div
    class="content-card-section"
    data-t="${e=>{var t;return null===(t=e.interestsTelemetry)||void 0===t?void 0:t.notificationSectionTelemetryTag}}"
    id="${zn.S.sectionIds.notification}"
>
    <div class="content-card-section-heading">${e=>e.strings.notification.topics.General.topicName}</div>
    <span class="content-card-description">${e=>e.strings.notification.topics.General.description}</span>
    ${(0,_.rx)((e=>e.notificationRiverElement),L.d`
        ${(0,I.g)((e=>e.length),Ol)}
    `)}
</div>`,Il=L.d`
    <div class="side-pane-layout-container side-pane-layout-container-search ${e=>e.onTranslucentBackgroundClass}">
    ${(0,I.g)((e=>e.interestsData),L.d`
        <msft-side-pane-layout
            style=${e=>e.sidePaneLayoutStyle}
            responsive-width=${zn.S.sidePaneLayoutResponsiveWidth}
            pane-visible=${e=>e.interestsNextState.sidePaneVisible}
            navigation-button-telemetry-tag=${e=>{var t,i;return e.interestsNextState.sidePaneVisible?null===(t=e.interestsData.sidePaneLayoutData)||void 0===t?void 0:t.sidePaneMenuTelemetryTags.navigationMenuDismissTelemetryTag:null===(i=e.interestsData.sidePaneLayoutData)||void 0===i?void 0:i.sidePaneMenuTelemetryTags.navigationMenuTelemetryTag}}
            class="${e=>e.sidePaneSticky?"sticky":""}"
            @pane-expanded-change=${(e,t)=>e.sidePaneExpandedHandler(t.event)}
            ${(0,P.i)("sidePaneLayoutContainerRef")}
        >

            <span slot="navigation-icon" style="display: flex; height: auto; width: auto;">
                ${e=>L.d`${e.sidePaneHeaderElement}`}
            </span>
            ${(0,I.g)((e=>e.sidePaneMenuElement),$l)}
            <div class="interests-river" ${(0,P.i)("interestsRiverRef")}>
                ${(0,I.g)((e=>e.discoverSectionsToRender&&e.discoverInterestsRiverElement),sl)}
                ${(0,I.g)((e=>e.followedListSectionElement),Qr)}
                ${(0,I.g)((e=>e.blockedListSectionElement),il)}
                ${(0,I.g)((e=>e.unmuteDialogElement),ll)}
                ${(0,I.g)((e=>e.savedStoriesSectionElement),gl)}
                ${(0,I.g)((e=>e.readStoriesSectionElement),pl)}
                ${(0,I.g)((e=>e.settingAccountLinkingElement),xl)}
                ${(0,I.g)((e=>e.settingMarketSelectorElement),Cl)}
                ${(0,I.g)((e=>e.feedSettingPageElement),Sl)}
                ${(0,I.g)((e=>e.sdSettingPageElement),bl)}
                ${(0,I.g)((e=>e.productivitySettingPageElement),wl)}
                ${(0,I.g)((e=>e.gamingSettingPageElement),Tl)}
                ${(0,I.g)((e=>e.config.enableNotificationExperience&&e.notificationRiverElement),Ll)}
            </div>
        </msft-side-pane-layout>
    `)}
    </div>
    ${e=>(0,Yr.O)(e.toast)}
    ${e=>(0,Yr.O)(e.config.childExperienceReferencesWC.cardActionWC,{properties:{cardActionRef:e.cardActionRef}})}
    ${(0,I.g)((e=>e.renderColdStart),L.d`
        <div ${(0,P.i)("freContainerElement")} @cold-start-close=${e=>e.closeColdStart()} @cold-start-confirm=${e=>e.coldStartConfirmHandler()}}>
            ${e=>(0,Yr.O)(e.config.childExperienceReferencesWC.coldStartModal,{properties:{coldStartArtifact:e.freArtifact,enabled:!0,parentContainerElement:e.freContainerElement}})}
        </div>
    `)}
`,Al=L.d`
    ${(0,I.g)((e=>e.sidePaneLayoutStyle),L.d`
        <div class="content" data-t="${e=>{var t;return null===(t=e.interestsTelemetry)||void 0===t?void 0:t.interestsTelemetryTag}}">
            <fluent-design-system-provider
                style="background:transparent; ${e=>e.backgroundColors.coldStartBackground}"
            >
                ${Il}
            </fluent-design-system-provider>
        </div>
    `)}
`,El={experienceConfigSchema:le};(0,o.z)().withShadowRootMode("closed").withElementDisambiguation((()=>n.h.ignoreDuplicate)).register((0,a.k)(),(0,s.hb)(),(0,r.ay)(),(0,l.xg)(),(0,d.wF)(),(0,c.TI)(),(0,u.ue)(),(0,h.$M)(),(0,g.QT)(),(0,p.d$)(),(0,m.oM)(),(0,f.P)(),(0,v.x)(),(0,y.ee)(),(0,b.i0)(),(0,S.tT)()),(0,o.z)().withShadowRootMode("open").withElementDisambiguation((()=>n.h.ignoreDuplicate)).register((0,w.Ad)()),n.K.getOrCreate().withShadowRootMode("open").withElementDisambiguation((()=>n.h.ignoreDuplicate)).withPrefix("msft").register(A(),j(),J(),(0,K.ZX)(),(0,X.B4)(),(0,Q.On)()),n.K.getOrCreate().withShadowRootMode("open").withElementDisambiguation((()=>n.h.ignoreDuplicate)).withPrefix("msn").register(ve(),Ce(),Le(),(0,Ie.i)())},71828:function(e,t,i){"use strict";i.d(t,{I:function(){return o},M:function(){return a}});var n=i(38156);const o={telemetryContracts:{toastCloseButton:{name:"Close",behavior:n.wu.Close,action:n.Aw.Click,type:n.c9.ActionButton}},savedStoriesWithinPersonalizeUrl:"/{locale}/feed/personalize#saves",standaloneSavedStoriesUrl:"/{locale}/feed/personalize/saves",urlBase:"https://www.msn.com",locale:"{locale}",defaultBottomPosition:32},a={ready:"toast-wc-ready"}},74045:function(e,t,i){"use strict";var n,o;i.d(t,{KE:function(){return s},O7:function(){return n},Qp:function(){return r},Us:function(){return o},XQ:function(){return a}}),function(e){e[e.none=0]="none",e[e.enabled=1]="enabled",e[e.saved=2]="saved",e[e.hide=4]="hide",e[e.showMore=8]="showMore",e[e.showFewer=16]="showFewer",e[e.mute=32]="mute",e[e.hidden=64]="hidden",e[e.report=128]="report",e[e.adFeedbackSubmitted=256]="adFeedbackSubmitted",e[e.hideTopic=512]="hideTopic",e[e.dismiss=1024]="dismiss",e[e.adPrivacy=2048]="adPrivacy"}(n||(n={})),function(e){e.Hide="Hide",e.Like="Like",e.Disabled="Disabled",e.Dislike="Dislike",e.Mute="Mute",e.Save="Save",e.Share="Share",e.ShowMore="ShowMore",e.ShowFewer="ShowFewer",e.Divider="Divider",e.Report="Report",e.ManageInterests="ManageInterests",e.ReportAd="ReportAd",e.AdPrivacy="AdPrivacy",e.HideTopic="HideTopic"}(o||(o={}));const a=e=>{const t=[],i={AdultImage:"AdultImage",RacyImage:"RacyImage",TextProfanity:"TextProfanity",SubstanceAbuse:"SubstanceAbuse",Violence:"Violence",Misinformation:"Misinformation",Other:"Other"};return e&&Object.keys(e).forEach((n=>{e[n]&&t.push(i[n])})),t},s="/service/feedback/api/reportanissue",r="https://assets.msn.cn/service/feedback/api/reportanissue"},39935:function(e,t,i){"use strict";i.d(t,{I:function(){return A}});var n,o=i(33940),a=i(83097),s=i(33799),r=i(74045),l=i(26415),d=i(68364),c=i(16517),u=i(54804),h=i(38156),g=i(65135),p=i(63535),m=i(67267),f=i(87298),v=i(56698),y=i(94546),b=i(66925),S=i(85334);!function(e){e[e.feedbackDefault=2224]="feedbackDefault",e[e.windowsFeed=2475]="windowsFeed"}(n||(n={}));class w{constructor(){this.manifestType="Sas",this.appId=n.feedbackDefault,this.source="Client",this.type="Idea"}}var T=i(33379),C=i(98429),x=i(90351),k=i(9344),$=i(51671),O=i(51125);class L extends class{constructor(e,t){this.fetchImpl=e,this.additionalHeaders=t,this.isWindowsDashboard="newsAndInterests"===c.jG.AppType||"windowsNewsPlus"===c.jG.AppType||"winWidgets"===c.jG.AppType,this.isWindowsNewsbar="windowsNewsbar"===c.jG.AppType,this.isStartGG="gaming"===c.jG.AppType,this.providersServiceEndpointURL=(0,p.PH)("./Msn/Providers"),this.cardActionsServiceEndpointURL=(0,p.PH)("./Graph/Actions"),this.userFeedbackEventhubUrl="/labs/api/feedbackSignal",this.ocid="feeds",this.isWindowsDashboard?this.ocid="winp2":this.isWindowsNewsbar?this.ocid="winp0dash":u.Al.IsBlendedEnterprise?this.ocid="entnewsntp":this.isStartGG&&(this.ocid="startgg-feeds")}ShowFewer(e){return(0,o.mG)(this,void 0,void 0,(function*(){return this.PostCardActionRequest(e,r.Us.Dislike,null)}))}UnshowFewer(e){return(0,o.mG)(this,void 0,void 0,(function*(){return this.DeleteCardActionRequest(e,r.Us.Dislike)}))}ShowMore(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){return this.PostCardActionRequest(e,r.Us.Like,null,t)}))}UnshowMore(e){return(0,o.mG)(this,void 0,void 0,(function*(){return this.DeleteCardActionRequest(e,r.Us.Like)}))}Save(e){return(0,o.mG)(this,void 0,void 0,(function*(){return this.PostCardActionRequest(e,r.Us.Save)}))}Unsave(e){return(0,o.mG)(this,void 0,void 0,(function*(){return this.DeleteCardActionRequest(e,r.Us.Save)}))}Hide(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){return this.PostCardActionRequest(e,r.Us.Dislike,null,t)}))}Unhide(e){return(0,o.mG)(this,void 0,void 0,(function*(){return this.DeleteCardActionRequest(e,r.Us.Dislike)}))}Mute(e){return(0,o.mG)(this,void 0,void 0,(function*(){return this.PostCardActionRequest(e,r.Us.Mute,"SourceProvider")}))}Unmute(e){return(0,o.mG)(this,void 0,void 0,(function*(){return this.DeleteCardActionRequest(e,r.Us.Mute)}))}Disable(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){return this.PostCardActionRequest(e,r.Us.Disabled,t)}))}Report(e,t,i,n,a,s,l,d,f){return(0,o.mG)(this,void 0,void 0,(function*(){const o=u.Al.ClientSettings?u.Al.ClientSettings.aid:"",v=c.jG&&c.jG.HostPage.topDomain,y=a===h.uH.WebContent?"web":"msn",b=(0,r.XQ)(f),S=(0,C.pW)();let w="";const T={serviceType:"oneservice",oneServiceTraceId:"",oneServiceActivityId:o};"windows"===c.jG.AppType&&(w=g.M0.getPageMetadata().JoinIdProps.IDXId,T.oneServiceTraceId="",T.oneServiceActivityId=o),g.M0.sendTraceInfoEvent(T);const x=JSON.stringify({article:{id:e},canvas:{name:c.jG.AppType,version:navigator.userAgent,pageType:u.Al.ClientSettings.pagetype},data:{activityId:o,feedbackTags:t,feedbackText:i},appEnvironment:c.jG,clientSettings:u.Al.ClientSettings,extSchema:T}),k=JSON.stringify({activityId:S,market:c.jG&&c.jG.CurrentMarket||"",contentId:e,source:y,headlineImage:l&&l.src,headlineText:n,abstract:s,offensive:b,url:d}),$=(0,p.qQ)().origin+this.userFeedbackEventhubUrl,O="msn.cn"===v?r.Qp:(0,p.qQ)().origin+r.KE,L=Object.assign(Object.assign({},yield m.$.getOneServiceHeaders()),this.additionalHeaders),I=Object.assign(Object.assign({},L),{"Content-Type":"application/json"});this.reportFeedbackService(x,$,L),0!=b.length&&this.reportFeedbackService(k,O,I)}))}reportFeedbackService(e,t,i){return(0,o.mG)(this,void 0,void 0,(function*(){const n={method:"POST",headers:i,body:e,credentials:"include"};let o;try{if(o=yield fetch(t,n),o.status>=400)throw new Error(o.statusText)}catch(e){g.M0.sendAppErrorEvent(Object.assign(Object.assign({},l.Ceo.CardActionPostActionError),{message:"Error while posting action for card action",pb:Object.assign(Object.assign({},l.Ceo.CardActionPostActionError.pb),{customMessage:`url: ${t}, error: ${e}`})}))}return o}))}reportNonCMS(e,t,i,n){return(0,o.mG)(this,void 0,void 0,(function*(){this.ReportOCV(e,t,i,n)}))}ReportOCV(e,t,i,n){return(0,o.mG)(this,void 0,void 0,(function*(){let o=!1;const a="https://petrol.office.microsoft.com/v1/feedback",s=this.createOcvFeedbackData(e,t,i,n),r={method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)};try{const e=yield this.fetchImpl(a,r);if(e.ok)o=!0;else{const t=`Error code: ${e.status} Error message: ${e.statusText} Request params: ${r} Service url: ${a}`;(0,d.H)(l.Ceo.CardActionBadRequestReportingToOcv,"Request is not valid, it has no content, or the manifest is not formatted correctly",t)}}catch(e){const t=`Error code: ${e?e.code:"undefined"} Error message: ${e?e.message:"undefined"} Request params: ${r} Service url: ${a}`;(0,d.OO)(e,l.Ceo.CardActionExceptionReportingToOcv,"Exception reporting feedback to OCV",t)}}))}createOcvFeedbackData(e,t,i,n){var o,a,s,r;const l=new w,d=null===u.Al||void 0===u.Al?void 0:u.Al.ClientSettings,h=null===c.jG||void 0===c.jG?void 0:c.jG.HostPage,p=(null==d?void 0:d.aid)||"";let m="";const f=(null===(a=null===(o=null===c.jG||void 0===c.jG?void 0:c.jG.CurrentRequestTargetScope)||void 0===o?void 0:o.pageExperiments)||void 0===a?void 0:a.join(","))||"",v=null===(s=null===c.jG||void 0===c.jG?void 0:c.jG.CurrentRequestTargetScope)||void 0===s?void 0:s.browser;return m=g.M0.getPageMetadata().JoinIdProps.IDXId,l.submitTime=(new Date).toISOString(),l.clientFeedbackId=(0,C.pW)(),l.comment=i,l.rating=4,l.application={appData:JSON.stringify({ScreenResolution:window&&window.screen?[screen.width,screen.height].join("x"):"",DDDActivityId:m,articleId:e,vertical:h&&h.verticalKey||"Prod"})},l.telemetry={audience:(null===c.jG||void 0===c.jG?void 0:c.jG.CurrentMarket)||"",audienceGroup:"Production",channel:(null==h?void 0:h.categoryKey)||"",deviceType:(null==d?void 0:d.deviceFormFactor)||"",errorClassification:JSON.stringify({NotRelevant:t.NotRelevant,ImageQuality:t.BlurryImage,MisleadingTitle:t.Misleading,OutdatedArticle:t.Outdated,DuplicateArticle:t.Duplicate,OffensiveContent:t.Offensive,Vertical:n}),featureArea:(null==d?void 0:d.pagetype)||"",flights:f,isUserSubscriber:(0,$.hC)(),platform:null===(r=c.jG.CurrentRequestTargetScope)||void 0===r?void 0:r.os,processSessionId:p,sourceContext:c.jG.AppType},l.web={browser:(null==v?void 0:v.browserType)||"",browserVersion:(null==v?void 0:v.version)||"",sourcePageName:(null==h?void 0:h.subcategoryKey)||"",sourcePageURI:""},l}ReportAd(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){const i=e.concat(`&f=${t}`);let n=new Image(1,1);n.src=i,n=null}))}GetProviderIcon(e){return(0,o.mG)(this,void 0,void 0,(function*(){const t=yield this.GetPublisherDetails(e);return(0,x.Z)(t,"value[0].logos[0].imageLink.href",void 0)}))}PostCardActionEvent(e,t,i,n=(()=>null),a,s,l=!0,d,c=5e3,u=!1,h,g){return(0,o.mG)(this,void 0,void 0,(function*(){let o;switch(t){case r.Us.ShowMore:e&r.O7.showMore?(l&&b.h.renderToast({id:S.p.ShowMore+`-${i}`,toastType:S.p.ShowMore,expirationInMs:c,onClick:()=>{a?a(i,e^r.O7.showMore,t,!0):this.PostCardActionEvent(e^r.O7.showMore,t,i,n)},referrerButton:d}),o=yield this.ShowMore(i,g)):(b.h.expireToast(S.p.ShowMore+`-${i}`),o=yield this.UnshowMore(i)),n(i,e);break;case r.Us.ShowFewer:e&r.O7.showFewer?(l&&b.h.renderToast({id:S.p.ShowFewer+`-${i}`,toastType:S.p.ShowFewer,expirationInMs:c,onClick:()=>{a?a(i,e^r.O7.showFewer,t,!0):this.PostCardActionEvent(e^r.O7.showFewer,t,i,n)},referrerButton:d}),o=yield this.ShowFewer(i)):(b.h.expireToast(S.p.ShowFewer+`-${i}`),o=yield this.UnshowFewer(i)),n(i,e);break;case r.Us.Save:e&r.O7.saved?(l&&!u&&b.h.renderToast({id:S.p.Save+`-${i}`,toastType:S.p.Save,expirationInMs:c,referrerButton:d}),o=yield this.Save(i),l&&u&&o&&b.h.renderToast({id:S.p.Save+`-${i}`,toastType:S.p.Save,expirationInMs:c,onClick:()=>this.PostCardActionEvent(e^r.O7.saved,t,i,n),referrerButton:d})):(b.h.expireToast(S.p.Save+`-${i}`),o=yield this.Unsave(i),l&&u&&o&&b.h.renderToast({id:S.p.Unsave+`-${i}`,toastType:S.p.Unsave,onClick:()=>this.PostCardActionEvent(e^r.O7.saved,t,i,n),expirationInMs:c,referrerButton:d})),n(i,e);break;case r.Us.Hide:o=e&r.O7.hide?yield this.Hide(i,g):yield this.Unhide(i),n(i,e);break;case r.Us.HideTopic:o=e&r.O7.hideTopic?yield this.PostCardActionRequest(s,r.Us.Mute,"TagBase"):yield this.DeleteCardActionRequest(s,r.Us.Mute);break;case r.Us.Mute:e&r.O7.mute?(o=yield this.Mute(s),n(i,e,r.Us.Mute,void 0,void 0,s)):o=yield this.Unmute(s);break;case r.Us.ReportAd:n(i,e);break;default:return}if(u&&!o){const{saveStoryErrorText:n,personalizationErrorText:o}=h||{},a=t===r.Us.Save&&e&r.O7.saved?n:o;b.h.renderToast({id:`${S.p.ConnectionError}-${t}-${i}`,toastType:S.p.ConnectionError,inputText:a,expirationInMs:c,referrerButton:d})}}))}GetPublisherDetails(e){return(0,o.mG)(this,void 0,void 0,(function*(){const t=this.providersServiceEndpointURL,i={method:"GET",headers:Object.assign(Object.assign({},yield m.$.getOneServiceHeaders()),this.additionalHeaders)};[{key:"ids",value:e},...yield this.getOneServiceCommonParam()].forEach((e=>e.value&&t.searchParams.set(e.key,e.value)));try{const n=yield(0,f.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){return yield this.fetchImpl(t.href,i)}))),"getProviderDetails");if(!n.ok){const t=`OneService returned error response. Status: ${n.status} for providerId: ${e}`;throw new Error(t)}return n.json()}catch(e){g.M0.sendAppErrorEvent(Object.assign(Object.assign({},l.Ceo.CardActionGetActionError),{message:"Error while calling getPublisherDetails action for card action",pb:Object.assign(Object.assign({},l.Ceo.CardActionDeleteActionError.pb),{customMessage:`url: ${t.href}, error: ${e}`})}))}}))}DeleteCardActionRequest(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){const i=this.cardActionsServiceEndpointURL,n={method:"DELETE",credentials:"include",headers:Object.assign(Object.assign({},yield m.$.getOneServiceHeaders()),this.additionalHeaders)};[{key:"$filter",value:`actionType eq '${t}' and targetId eq '${e}'`},...yield this.getOneServiceCommonParam()].forEach((e=>e.value&&i.searchParams.set(e.key,e.value)));try{const a=yield(0,f.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){return yield this.fetchImpl(i.href,n)}))),`deleteCardAction${t}`);if(a.status>=400){const i=`OneService returned error response. Status: ${a.status} for actionType: ${t} and targetId: ${e}`;throw new Error(i)}return(0,v.bY)(this.getPreloadReloadReason(t)),(0,O.j9)(),a}catch(e){g.M0.sendAppErrorEvent(Object.assign(Object.assign({},l.Ceo.CardActionDeleteActionError),{message:"Error while calling delete action for card action",pb:Object.assign(Object.assign({},l.Ceo.CardActionDeleteActionError.pb),{customMessage:`url: ${i.href}, error: ${e}`})}))}}))}PostCardActionRequest(e,t,i,n){return(0,o.mG)(this,void 0,void 0,(function*(){const a=this.cardActionsServiceEndpointURL,s={method:"POST",body:JSON.stringify({actionType:t,targetId:e,targetType:i,metadata:n}),headers:Object.assign(Object.assign({},yield m.$.getOneServiceHeaders()),this.additionalHeaders),credentials:"include"};(yield this.getOneServiceCommonParam()).forEach((e=>e.value&&a.searchParams.set(e.key,e.value)));try{const n=yield(0,f.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){return yield this.fetchImpl(a.href,s)}))),`getCardAction${t}`);if(n.status>=400){const o=`OneService returned error response. Status: ${n.status} for actionType: ${t}, targetId: ${e} and targetType: ${i}`;throw new Error(o)}return(0,v.bY)(this.getPreloadReloadReason(t)),(0,O.j9)(),n.json()}catch(e){g.M0.sendAppErrorEvent(Object.assign(Object.assign({},l.Ceo.CardActionPostActionError),{message:"Error while posting action for card action",pb:Object.assign(Object.assign({},l.Ceo.CardActionPostActionError.pb),{customMessage:`url: ${a.href}, error: ${e}`})}))}}))}getOneServiceCommonParam(){return(0,o.mG)(this,void 0,void 0,(function*(){return this.isWindowsDashboard||this.isWindowsNewsbar||this.isStartGG?m.$.getOneServiceParamsWithoutAuth(c.jG.UserId,this.ocid,!1):(yield this.isUserSignedIn())?m.$.getOneServiceParamsWithAuth(c.jG.UserId,this.ocid,!u.Al.IsBlendedEnterprise):"edgeChromium"===c.jG.AppType&&(0,k.ej)("lt")&&(0,k.ej)(a.IR.AppAnonCookieExists)?(g.M0.sendAppErrorEvent(Object.assign(Object.assign({},l.MCu.LtCookieFoundUserNotAuthenticated),{message:"CardActionServiceClient: lt cookie present. "+a.IR.AppAnonCookieExists+" cookie present.",pb:Object.assign({},l.MCu.LtCookieFoundUserNotAuthenticated.pb)})),m.$.getOneServiceParamsWithAuth(c.jG.UserId,this.ocid,!u.Al.IsBlendedEnterprise)):m.$.getOneServiceParamsWithoutAuth(c.jG.UserId,this.ocid,!u.Al.IsBlendedEnterprise)}))}isUserSignedIn(){return(0,o.mG)(this,void 0,void 0,(function*(){if(u.Al.UserIsSignedIn)return!0;return(yield(0,$.XJ)())===s.Hy.SignedIn}))}getPreloadReloadReason(e){switch(e){case r.Us.Mute:return y.T.MutePublisher;case r.Us.Save:return y.T.Save;case r.Us.Like:return y.T.Like;case r.Us.Dislike:return y.T.Dislike;case r.Us.Disabled:return y.T.Disabled;default:return y.T.SettingsChange}}}{constructor(e,t){let i;i=e||((0,T.N)()?window.fetch.bind(window):fetch),super(i,t)}}let I;const A=(e,t)=>I||(I=new L(e,t),I)},44421:function(e,t,i){"use strict";i.d(t,{G:function(){return s},Q:function(){return a}});var n=i(84289),o=i(99502);const a=(e,t,i,a,s,r,l,d)=>{const c=(0,n.NU)(e,t,l,d);r&&Object.assign(c,{[o.a.propertyNames]:{enum:r}});const u=Object.assign(Object.assign({},s),{[o.a.title]:a});return Object.assign(c,{[o.a.additionalProperties]:u})},s=(e,t,i,n,o,s,r,l,d)=>({[e]:Object.assign({},a(t,i,n,o,s,r,l,d))})},51542:function(e,t,i){"use strict";i.d(t,{S:function(){return a}});var n=i(12090),o=i(84925);const a=(e,t,i,a,s)=>Object.assign(Object.assign({},(0,o.sz)(e,`${i} for CMS`,`${a||i} for CMS`)),(0,n._)(t,`${i} for Git`,`${a||i} for Git`,s))},51165:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},36569:function(e,t,i){"use strict";var n;i.d(t,{Q:function(){return d}}),function(e){e.Hour="Hour",e.HourMin="HourMin",e.HourTimezone="HourTimezone",e.HourMinTimezone="HourMinTimezone",e.HourTimezoneLong="HourTimezoneLong",e.HourMinTimezoneLong="HourMinTimezoneLong",e.DayWeek="DayWeek",e.MonthDayYear="MonthDayYear",e.LongMonthDayYear="LongMonthDayYear",e.MonthDay="MonthDay",e.Year="Year",e.Month="Month",e.MonthShort="MonthShort",e.Day="Day",e.Week="Week",e.MonthDayWeek="MonthDayWeek",e.MonthDayWeekLong="MonthDayWeekLong"}(n||(n={}));const o=new Map([[n.DayWeek,{weekday:"short",day:"numeric"}],[n.LongMonthDayYear,{month:"long",day:"numeric",year:"numeric"}],[n.MonthDayYear,{month:"short",day:"numeric",year:"numeric"}],[n.MonthDay,{month:"short",day:"numeric"}],[n.Year,{year:"numeric"}],[n.Month,{month:"numeric"}],[n.MonthShort,{month:"short"}],[n.Day,{day:"numeric"}],[n.Hour,{hour:"numeric"}],[n.HourMin,{hour:"numeric",minute:"numeric"}],[n.HourTimezone,{hour:"numeric",timeZoneName:"short"}],[n.HourMinTimezone,{hour:"numeric",minute:"numeric",timeZoneName:"short"}],[n.HourTimezoneLong,{hour:"numeric",timeZoneName:"long"}],[n.HourMinTimezoneLong,{hour:"numeric",minute:"numeric",timeZoneName:"long"}],[n.Week,{weekday:"short"}],[n.MonthDayWeek,{weekday:"short",month:"short",day:"numeric"}],[n.MonthDayWeekLong,{weekday:"long",month:"long",day:"numeric"}]]),a=["en-us","en-gb","el-gr"],s=[n.DayWeek,n.HourTimezoneLong,n.HourMinTimezoneLong,n.MonthDay,n.MonthShort,n.Week,n.MonthDayWeek],r=new Map([["default",{longPm:"pm",shortPm:"p",longAm:"am",shortAm:"a"}],["el-gr",{longPm:"μ.μ.",shortPm:"μ",longAm:"π.μ.",shortAm:"π"}]]),l=new Map([["default",{hour:"numeric"}],["zh-cn",{hour:"numeric",hour12:!1}],["zh-tw",{hour:"numeric",hour12:!1}],["zh-hk",{hour:"numeric",hour12:!1}]]);class d{constructor(e,t){this.locale=e||"en-us",this.timeZone=t||void 0,this.hour12=Intl.DateTimeFormat(this.locale,l.get(this.locale)||l.get("default")).resolvedOptions().hour12,this.localeOption=r.get(this.locale)||r.get("default"),this.timeFormats=new Map,this.timeFormatsEnGb=new Map,this.timeFormatsEnUs=new Map}formatHour(e,t){return this.formatDateTimeFormatText(e,n.Hour,Object.assign({},t))}formatYear(e,t){return this.formatDateTimeFormatText(e,n.Year,Object.assign({},t))}formatMonth(e,t){return this.formatDateTimeFormatText(e,n.Month,Object.assign({},t))}formatMonthShort(e,t){return this.formatDateTimeFormatText(e,n.MonthShort,Object.assign({},t))}formatDay(e,t){return this.formatDateTimeFormatText(e,n.Day,Object.assign({},t))}formatHourLabel(e){return this.formatHour(e,{excludeSpace:!1})}formatHourMinute(e,t){return this.formatDateTimeFormatText(e,n.HourMin,Object.assign({},t))}formatHourTimezone(e,t,i=!1){let o=n.HourTimezone;return i&&(o=n.HourTimezoneLong),this.formatDateTimeFormatText(e,o,Object.assign({},t))}formatHourMinuteTimezone(e,t,i=!1){let o=n.HourMinTimezone;return i&&(o=n.HourMinTimezoneLong),this.formatDateTimeFormatText(e,o,Object.assign({},t))}formatDayWithWeek(e,t){let i=this.formatDateTimeFormatText(e,n.DayWeek,Object.assign({},t));if(t&&i.indexOf(",")<0&&i.indexOf(" ")>0){const e=i.split(" ");2!=e.length||isNaN(parseInt(e[0]))||(t.removeWeek?i=e[0]:t.forceWeekdayAhead&&(i=`${e[1]} ${e[0]}`))}return i}formatWeek(e,t){let i=this.formatDateTimeFormatText(e,n.DayWeek,Object.assign({},t));if(i.indexOf(",")<0&&i.indexOf(" ")>0){const e=i.split(" ");2!=e.length||isNaN(parseInt(e[0]))||(i=e[1])}return i}formatLongMonthDayYear(e,t){let i=this.formatDateTimeFormatText(e,n.LongMonthDayYear,Object.assign({},t));if(t&&t.useComma){const o=this.formatDateTimeFormatText(e,n.LongMonthDayYear,Object.assign({},t));i=i.replace(`${o} `,`${o}, `)}return i}formatMonthDayYear(e,t){let i=this.formatDateTimeFormatText(e,n.MonthDayYear,Object.assign({},t));if(t&&t.useComma){const o=this.formatDateTimeFormatText(e,n.MonthDay,Object.assign({},t));i=i.replace(`${o} `,`${o}, `)}return i}formatMonthDay(e,t){return this.formatDateTimeFormatText(e,n.MonthDay,Object.assign({},t))}formatWeekShort(e,t){let i=this.formatDateTimeFormatText(e,n.Week,Object.assign({},t));if(i.indexOf(",")<0&&i.indexOf(" ")>0){const e=i.split(" ");2!=e.length||isNaN(parseInt(e[0]))||(i=e[1])}return i}formatMonthDayWithWeek(e,t){let i=this.formatDateTimeFormatText(e,n.MonthDayWeek,Object.assign({},t));if(t&&t.forceWeekdayAhead&&i.indexOf(",")<0&&i.indexOf(" ")>0){const e=i.split(" ");2!=e.length||isNaN(parseInt(e[0]))||(i=`${e[1]} ${e[0]}`)}return i}formatMonthDayWithWeekLong(e,t){let i=this.formatDateTimeFormatText(e,n.MonthDayWeekLong,Object.assign({},t));if(t&&!t.forceWeekdayAhead&&i.indexOf(",")<i.indexOf(" ")){const e=i.split(",");2==e.length&&(i=`${e[1]}, ${e[0]}`)}return i}getFormatObj(e){let t=e;return this.hour12||(e===n.Hour&&(t=n.HourMin),e===n.HourTimezone&&(t=n.HourMinTimezone),e===n.HourTimezoneLong&&(t=n.HourMinTimezoneLong)),a.indexOf(this.locale)<0&&s.indexOf(t)<0?this.hour12?(this.timeFormatsEnUs.has(t)||this.timeFormatsEnUs.set(t,new Intl.DateTimeFormat("en-us",Object.assign({timeZone:this.timeZone},o.get(t)))),this.timeFormatsEnUs.get(t)):(this.timeFormatsEnGb.has(t)||this.timeFormatsEnGb.set(t,new Intl.DateTimeFormat("en-gb",Object.assign({timeZone:this.timeZone},o.get(t)))),this.timeFormatsEnGb.get(t)):(this.timeFormats.has(t)||this.timeFormats.set(t,new Intl.DateTimeFormat(this.locale,Object.assign({timeZone:this.timeZone},o.get(t)))),this.timeFormats.get(t))}formatDateTimeFormatText(e,t,i){const n=this.getFormatObj(t).format(e);return this.postProcess(n,i)}postProcess(e,t){let i=e;return t&&t.excludeComma&&(i=i.replace(/,/g,"")),t&&t.excludeSpace&&(i=i.replace(/\s/g,"")),i}}},64893:function(e,t,i){"use strict";i.d(t,{$n:function(){return n},bT:function(){return o},cN:function(){return a}});const n=[{id:"ar-ae",value:"ar-ae",displayString:"الإمارات العربية المتحدة (العربية)",direction:"rtl"},{id:"ar-eg",value:"ar-eg",displayString:"مصر (العربية)",direction:"rtl"},{id:"ar-sa",value:"ar-sa",displayString:"المملكة العربية السعودية (العربية)",direction:"rtl"},{id:"bn-in",value:"bn-in",displayString:"India (বাংলা)",direction:"ltr"},{id:"cs-cz",value:"cs-cz",displayString:"Česká republika (čeština)",direction:"ltr"},{id:"da-dk",value:"da-dk",displayString:"Danmark (Dansk)",direction:"ltr"},{id:"de-at",value:"de-at",displayString:"Österreich (Deutsch)",direction:"ltr"},{id:"de-ch",value:"de-ch",displayString:"Schweiz (Deutsch)",direction:"ltr"},{id:"de-de",value:"de-de",displayString:"Deutschland (Deutsch)",direction:"ltr"},{id:"el-gr",value:"el-gr",displayString:"Ελλάδα (ελληνικά)",direction:"ltr"},{id:"en-ae",value:"en-ae",displayString:"United Arab Emirates (English)",direction:"ltr"},{id:"en-au",value:"en-au",displayString:"Australia (English)",direction:"ltr"},{id:"en-ca",value:"en-ca",displayString:"Canada (English)",direction:"ltr"},{id:"en-gb",value:"en-gb",displayString:"United Kingdom (English)",direction:"ltr"},{id:"en-ie",value:"en-ie",displayString:"Ireland (English)",direction:"ltr"},{id:"en-in",value:"en-in",displayString:"India (English)",direction:"ltr"},{id:"en-my",value:"en-my",displayString:"Malaysia (English)",direction:"ltr"},{id:"en-nz",value:"en-nz",displayString:"New Zealand (English)",direction:"ltr"},{id:"en-ph",value:"en-ph",displayString:"Philippines (English)",direction:"ltr"},{id:"en-sg",value:"en-sg",displayString:"Singapore (English)",direction:"ltr"},{id:"en-us",value:"en-us",displayString:"United States (English)",direction:"ltr"},{id:"en-xl",value:"en-xl",displayString:"International Edition (English)",direction:"ltr"},{id:"en-za",value:"en-za",displayString:"South Africa (English)",direction:"ltr"},{id:"es-ar",value:"es-ar",displayString:"Argentina (español)",direction:"ltr"},{id:"es-cl",value:"es-cl",displayString:"Chile (español)",direction:"ltr"},{id:"es-co",value:"es-co",displayString:"Colombia (español)",direction:"ltr"},{id:"es-es",value:"es-es",displayString:"España (español)",direction:"ltr"},{id:"es-mx",value:"es-mx",displayString:"México (español)",direction:"ltr"},{id:"es-pe",value:"es-pe",displayString:"Perú (español)",direction:"ltr"},{id:"es-us",value:"es-us",displayString:"United States (español)",direction:"ltr"},{id:"es-ve",value:"es-ve",displayString:"Venezuela (español)",direction:"ltr"},{id:"es-xl",value:"es-xl",displayString:"América Latina (español)",direction:"ltr"},{id:"fi-fi",value:"fi-fi",displayString:"Suomi (suomi)",direction:"ltr"},{id:"fr-be",value:"fr-be",displayString:"Belgique (français)",direction:"ltr"},{id:"fr-ca",value:"fr-ca",displayString:"Canada (français)",direction:"ltr"},{id:"fr-ch",value:"fr-ch",displayString:"Suisse (français)",direction:"ltr"},{id:"fr-fr",value:"fr-fr",displayString:"France (français)",direction:"ltr"},{id:"fr-xl",value:"fr-xl",displayString:"Afrique francophone (français)",direction:"ltr"},{id:"he-il",value:"he-il",displayString:"ישראל (עברית)",direction:"rtl"},{id:"hi-in",value:"hi-in",displayString:"India (हिंदी)",direction:"ltr"},{id:"hu-hu",value:"hu-hu",displayString:"Magyarország (magyar)",direction:"ltr"},{id:"id-id",value:"id-id",displayString:"Indonesia (Bahasa Indonesia)",direction:"ltr"},{id:"it-it",value:"it-it",displayString:"Italia (italiano)",direction:"ltr"},{id:"ja-jp",value:"ja-jp",displayString:"日本 (日本語)",direction:"ltr"},{id:"ko-kr",value:"ko-kr",displayString:"한국 (한국어)",direction:"ltr"},{id:"mr-in",value:"mr-in",displayString:"India (मराठी)",direction:"ltr"},{id:"nb-no",value:"nb-no",displayString:"Norge (norsk, bokmål)",direction:"ltr"},{id:"nl-be",value:"nl-be",displayString:"België (Nederlands)",direction:"ltr"},{id:"nl-nl",value:"nl-nl",displayString:"Nederland (Nederlands)",direction:"ltr"},{id:"pl-pl",value:"pl-pl",displayString:"Polska (polski)",direction:"ltr"},{id:"pt-br",value:"pt-br",displayString:"Brasil (português)",direction:"ltr"},{id:"pt-pt",value:"pt-pt",displayString:"Portugal (Português)",direction:"ltr"},{id:"ru-xl",value:"ru-xl",displayString:"Международное издание (Pусский)",direction:"ltr"},{id:"ru-ru",value:"ru-ru",displayString:"Россия (Pусский)",direction:"ltr"},{id:"sv-se",value:"sv-se",displayString:"Sverige (svenska)",direction:"ltr"},{id:"te-in",value:"te-in",displayString:"India (తెలుగు)",direction:"ltr"},{id:"th-th",value:"th-th",displayString:"ไทย (ไทย)",direction:"ltr"},{id:"tr-tr",value:"tr-tr",displayString:"Türkiye (Türkçe)",direction:"ltr"},{id:"vi-vn",value:"vi-vn",displayString:"Việt Nam (Tiếng Việt)",direction:"ltr"},{id:"zh-cn",value:"zh-cn",displayString:"中华人民共和国 (简体中文)",direction:"ltr"},{id:"zh-hk",value:"zh-hk",displayString:"香港特别行政區 (繁體中文)",direction:"ltr"},{id:"zh-tw",value:"zh-tw",displayString:"台灣 (繁體中文)",direction:"ltr"}];function o(e,t){return e.displayString<t.displayString?-1:e.displayString>t.displayString?1:0}function a(e){if(""!==document.dir)return"rtl"===document.dir;const t=n.find((t=>t.id===e));return t&&"rtl"===t.direction}},48328:function(e,t,i){"use strict";var n;i.d(t,{Hf:function(){return s},Ik:function(){return a},Kr:function(){return o},e7:function(){return n},hp:function(){return r}}),function(e){e.Publisher="Publisher",e.Article="Article",e.Topic="Topic"}(n||(n={}));const o={Publisher:{actionType:"More",targetType:"SourceProvider"},Article:{actionType:"Like"},Topic:{actionType:"Follow"}};var a,s;!function(e){e.Get="GET",e.Post="POST",e.Delete="DELETE"}(a||(a={})),function(e){e.Providers="Providers",e.ArticlesMulti="ArticlesMulti",e.Confirmation="Confirmation",e.Topics="Topics",e.Upsell="Upsell"}(s||(s={}));const r=-1},9683:function(e,t,i){"use strict";i.d(t,{_n:function(){return S}});var n=i(33940),o=i(48328),a=i(33954),s=i(26415),r=i(33799),l=i(16517),d=i(67267),c=i(63535),u=i(51671),h=i(87298);class g{constructor(e){this.fetchImpl=e,this.actionsEndpoint="./Graph/Actions",this.defaultOcid="Peregrine"}sendPostActionRequest(e,t=this.defaultOcid,i=!0){return(0,n.mG)(this,void 0,void 0,(function*(){const o=JSON.stringify(e),a={method:"POST",body:o,headers:yield d.$.getOneServiceHeaders()};(yield(0,u.hC)())&&(a.credentials="include");const s=(0,c.PH)(this.actionsEndpoint);(yield d.$.getCommonParams2(t,i)).forEach((e=>e.value&&s.searchParams.set(e.key,e.value)));return yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(s.href,a);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for Post request: ${s.href} with params ${JSON.stringify(a)}`;throw new Error(t)}return e}))),`postAction${o}`)}))}sendDeleteActionRequest(e,t=this.defaultOcid,i=!0){return(0,n.mG)(this,void 0,void 0,(function*(){const o=yield d.$.getBaseRequestData("DELETE");(yield(0,u.hC)())&&(o.credentials="include");let a="";const s=Object.keys(e),r=s.length;for(let t=0;t<r;t++)a+=`${s[t]} eq '${e[s[t]]}'`,t!=r-1&&r>1&&(a+=" and ");const l={key:"$filter",value:a},g=(0,c.PH)(this.actionsEndpoint);[l,...yield d.$.getCommonParams2(t,i)].forEach((e=>e.value&&g.searchParams.set(e.key,e.value)));return yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,o);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for Delete request: ${g.href} with params: ${JSON.stringify(o)}`;throw new Error(t)}return e}))),`deleteAction${a}`)}))}}var p=i(51125),m=i(65135),f=i(33379),v=i(791);class y extends class{constructor(e){this.fetchImpl=e,this.ocid="feeds",this.freServiceEndpoint="news/fre",this.userEndpoint="./msn/user",this.addPageInfoToOcid=!0,this.actionsClient=new g(e),"newsAndInterests"===l.jG.AppType||"windowsNewsPlus"===l.jG.AppType||"winWidgets"===l.jG.AppType?(this.addPageInfoToOcid=!1,this.ocid="winp2"):"gaming"===l.jG.AppType&&(this.addPageInfoToOcid=!1,this.ocid="startgg-feeds")}getFreArtifacts(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i=(0,c.PH)(this.freServiceEndpoint);i.searchParams.set("bypass_trigger","true"),e&&i.searchParams.set("query",e),t&&i.searchParams.set("$top",t.toString());return[...(yield(0,u.XJ)())===r.Hy.SignedIn?d.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,this.addPageInfoToOcid):d.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,this.addPageInfoToOcid),{key:p.i$,value:Date.now().toString()}].forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)})),this.getFreArtifactsWithUrl(i.href)}))}getFreArtifactsWithUrl(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e||"-1"===e)return null;const t={method:o.Ik.Get,credentials:"include",headers:yield d.$.getOneServiceHeaders()};try{const i=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){return yield this.fetchImpl(e,t)}))),"getFreArtifacts");if(!i.ok)throw Error(`[FreServiceClient.getFreArtifacts] Failed with response: ${JSON.stringify(i)}`);const o=i.headers&&i.headers.get("ddd-tmpl");return m.M0.addOrUpdateTmplString(o),i.json()}catch(e){throw a.k.logError(e.message),e}}))}setFreArtifactForUser(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){if(e&&t){const i={method:t,credentials:"include",headers:yield d.$.getOneServiceHeaders()};(0,c.PH)(this.freServiceEndpoint);let o=0;try{if(o=(yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){return yield this.fetchImpl(e,i)}))),"setFreArtifact")).status,o>=400){const e=`OneService returned error response. Status: ${o} for done action`;throw new Error(e)}}catch(e){return a.k.logError(e.message),o}return o}return m.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.G7x),{message:`Any of the required parameters was not properly set by the caller. callbackUrl: ${e} method: ${t}.`})),0}))}updateArtifactInActionsEndpoint(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){let i;o.Kr[e.type]&&(i=Object.assign({},o.Kr[e.type])),i.targetId=e.id;try{t?yield this.actionsClient.sendPostActionRequest(i,this.ocid,this.addPageInfoToOcid):yield this.actionsClient.sendDeleteActionRequest(i,this.ocid,this.addPageInfoToOcid),(0,p.T1)()}catch(i){return m.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.rNk),{message:"Fre Actions call failed",pb:Object.assign(Object.assign({},s.rNk.pb),{customMessage:`artifact: ${JSON.stringify(e)} following: ${t} error message: ${i}`})})),!1}return!0}))}setDoneFreState(e){return(0,n.mG)(this,void 0,void 0,(function*(){yield this.setFreState(JSON.stringify({stage:e||o.hp}),s.YVg)}))}setMaybeLaterFreState(){return(0,n.mG)(this,void 0,void 0,(function*(){yield this.setFreState(JSON.stringify({dismiss_timestamp:new Date(Date.now()).toJSON()}),s.GJW)}))}incrementUserImpression(){return(0,n.mG)(this,void 0,void 0,(function*(){let e=0;try{const t=yield this.getFreState();e=Number(t.impressionCount)||0}catch(e){if(m.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.tCQ),{message:"Error getting the stored count",pb:Object.assign(Object.assign({},s.tCQ.pb),{customMessage:`${e}`})})),!(e instanceof SyntaxError))return}yield this.setFreState(JSON.stringify({impressionCount:e+1}),s.yRR)}))}getFreState(){return(0,n.mG)(this,void 0,void 0,(function*(){const e=yield v.N.getPdpUserPreference(!0),t=e&&(e.is404?{}:e.value&&e.value[0]);if(!t)throw"User object invalid or missing from response";return t.freMultiStepState?JSON.parse(t.freMultiStepState):{}}))}setFreState(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i={method:"POST",body:JSON.stringify({freMultiStepState:e}),headers:yield d.$.getOneServiceHeaders()};(yield(0,u.XJ)())===r.Hy.SignedIn&&(i.credentials="include");const o=(0,c.PH)(this.userEndpoint);(yield d.$.getCommonParams2(this.ocid,this.addPageInfoToOcid)).forEach((e=>e.value&&o.searchParams.set(e.key,e.value)));try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(o.href,i);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for call to set user state`;throw new Error(t)}return e.json()}))),"sendFreDoneAction")}catch(i){m.M0.sendAppErrorEvent(Object.assign(Object.assign({},t),{message:"Service call to set fre state failed",pb:Object.assign(Object.assign({},t.pb),{customMessage:`state: ${e} error: ${i}`})}))}}))}getShuffleState(){return(0,n.mG)(this,void 0,void 0,(function*(){try{const e=(yield this.getFreState()).shuffle||{};e.impressionCount||(e.impressionCount=0),e.dismissTimestamp=e.dismissTimestamp?new Date(e.dismissTimestamp):null,e.impressionDates=e.impressionDates?e.impressionDates.map((e=>new Date(e))):[],e.setNumbersSeenOn||(e.setNumbersSeenOn={});for(const t in e.setNumbersSeenOn)e.setNumbersSeenOn[t]=new Date(e.setNumbersSeenOn[t]);return e}catch(e){return m.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.rNk),{message:"Service call to get fre state failed",pb:Object.assign(Object.assign({},s.rNk.pb),{customMessage:e.message})})),null}}))}setShuffleState(e){return(0,n.mG)(this,void 0,void 0,(function*(){yield this.setFreState(JSON.stringify({shuffle:e}),s.pY1)}))}}{constructor(e){let t;t=e||((0,f.N)()?window.fetch.bind(window):fetch),super(t)}}let b;const S=e=>b||(b=new y(e),b)},89589:function(e,t,i){"use strict";i.d(t,{b:function(){return x}});var n=i(33379),o=i(33940),a=i(54804),s=i(58155),r=i(68364),l=i(26415),d=i(33954),c=i(4596),u=i(29422);class h{constructor(e,t,i=null){this.fetchImpl=e,this.config=t,this.xhrFetch=i,this.cfg=t||h.defaultConfig,this.cfg.appId=this.cfg.appId||h.defaultConfig.appId,this.cfg.num=this.cfg.num||h.defaultConfig.num}geocodeSuggestion(e){return Promise.resolve(null)}getAutoSuggestResponse(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){const i=[{key:"appid",value:this.cfg.appId},{key:"mr",value:""+this.cfg.num},{key:"q",value:e},{key:"setmkt",value:!this.cfg.redirectZhCnJaJpMarket||"ja-jp"!==a.Al.Locale&&"zh-cn"!==a.Al.Locale?a.Al.Locale:"en-us"},{key:"setlang",value:a.Al.Locale},{key:"ul",value:a.Al.ClientSettings?`${a.Al.ClientSettings.geo_lat},${a.Al.ClientSettings.geo_long},100`:""}];let n=[];if(!e||!e.trim||!e.trim().length)return n;const o=new URL(h.bingAutosuggestApi,h.bingAutoSuggestServiceHost);return o.search=s.c.keyValueArrayToQueryString(i),n=yield this.fetchImpl(o.href,{jsonpCallback:"cb"}).then((e=>e.json())).then((e=>this.getLocationFromResponse(e))).catch((e=>(t&&(0,r.H)(l.hTy,"Autosuggest request failed for client v1",JSON.stringify({urlWithoutQuery:this.getLoggableUrlString(o)})),d.k.log("failed: "+e),null))),n}))}getLocationFromResponse(e){const t=[];if(e&&e["@graph"]){const i=e["@graph"];for(let e=0;e<i.length;e++){const n=i[e];if(n){switch(n["b:stype"]){case"Island":case"PopulatedPlace":case"Postcode1":case"Other":{const e=n["s:address"]||{},i=n["s:geo"]||{},o=i["s:latitude"],s=i["s:longitude"];if("number"==typeof o&&"number"==typeof s){const i={locality:e["s:addressLocality"]||e["s:name"]||"",region:c.abbreviateUSState(e["s:addressRegion"]||"",a.Al.Locale,e["b:countryIso"]||""),subRegion:e["b:addressSubregion"]||"",country:e["s:addressCountry"]||"",latitude:Number(o).toString(),longitude:Number(s).toString(),isoCode:e["b:countryIso"]||"",language:a.Al.Locale};u.isValidLocationToSuggest(i)&&t.push(i)}}}}}}return t}getLoggableUrlString(e){return e?(e.searchParams&&e.searchParams.delete&&e.searchParams.delete("q"),e.href):""}getLocationSearchResponse(e){return(0,o.mG)(this,void 0,void 0,(function*(){const t=[{key:"appid",value:this.cfg.appId},{key:"locale",value:a.Al.Locale},{key:"query",value:e}],i=[];if(!e||!e.trim||!e.trim().length)return i;const n=new URL(h.msnLocationSearchApi,h.msnApiServiceHost);n.search=s.c.keyValueArrayToQueryString(t);(new Headers).append("contentType","application/json");const o=yield(this.xhrFetch?this.xhrFetch:fetch)(n.href,{method:"GET",headers:{"Content-Type":"application/json"}});return o.ok||500===o.status?this.getLocationFromSearchResponse(yield o.json()):null}))}isSameLocation(e,t){return e==t||null!=e&&null!=t&&(e.locationType==t.locationType&&(Math.abs(parseFloat(e.latitude)-parseFloat(t.latitude))<.001&&Math.abs(parseFloat(e.longitude)-parseFloat(t.longitude))<.001||(this.distance(e,t)<150||void 0)))}distance(e,t){const i=parseFloat(e.latitude)*Math.PI/180,n=parseFloat(e.longitude)*Math.PI/180,o=parseFloat(t.latitude)*Math.PI/180,a=o-i,s=parseFloat(t.longitude)*Math.PI/180-n,r=Math.sin(a/2)*Math.sin(a/2)+Math.sin(s/2)*Math.sin(s/2)*Math.cos(i)*Math.cos(o);return 6371*(2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r)))}getLocationFromSearchResponse(e){if(!(e.value&&e.value[0]&&e.value[0].responses&&e.value[0].responses[0]))return[];const t=e.value[0].responses[0];if(t.error)return[];const i=t.locations.filter((e=>("admindivision1"!==e.entityType.toLowerCase()||"jp"===e.countryCode.toLowerCase())&&e.coordinates&&e.coordinates.lat&&e.coordinates.lon)).map((e=>({isoCode:e.countryCode,locality:e.locality,region:e.state||e.adminDistrict,country:e.countryRegion,latitude:e.coordinates.lat.toString(),longitude:e.coordinates.lon.toString(),displayName:e.displayName}))),n=[];return i.forEach((e=>{0==n.map((t=>this.isSameLocation(t,e))).filter((e=>e)).values.length&&n.push(e)})),n}populateSearchMoreResponse(){}}h.bingAutoSuggestServiceHost="https://platform.bing.com",h.bingAutosuggestApi="geo/AutoSuggest/v1",h.defaultConfig={num:4,appId:"C98EA5B0842DBB9405BBF071E1DA76512D21FE36"},h.msnLocationSearchApi="/v0/weather/locations/search",h.msnApiServiceHost="https://api.msn.com";var g=i(16517),p=i(63535),m=i(67267);class f{constructor(e,t,i,n,o,a,s,r){this.fetchImpl=e,this.host=t,this.api=i,this.appId=n,this.excludeSubTypes=o,this.flightId=a,this.useOneService=s,this.includeSubTypes=r,this.filterSuggestion=e=>-1===this.excludeSubTypes.indexOf(e.subType)&&(!this.includeSubTypes||!e.subType||-1!==this.includeSubTypes.indexOf(e.subType)),this._parseLocationFromAS=!0}addExtraASParams(e,t){return e}_getDefaultSuggestions(){return[]}getSuggestions(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){if(e.disableThisRequest)return null;if((!e.searchText||""===e.searchText.trim())&&(e.disableFavorites||!this._useFavoriteSuggestions))return{suggestions:[]};const i=this._constructASRequestUrl(e);return this.fetchImpl(i.href).then((e=>e.json())).then((t=>{const i=this.useOneService?this._parseOneServiceSuggestions(t):this._parseSuggestionsV6(t),n=e.searchText&&""!==e.searchText.trim()?[]:this._getDefaultSuggestions();return i.suggestions=this._combineSuggestions(i.suggestions,n),this._updateSuggestionsRank(i.suggestions),i})).catch((i=>{if(t){const t=this._constructASRequestUrl(Object.assign(Object.assign({},e),{searchText:""}));(0,r.H)(l.hTy,"Autosuggest request failed for client v6",JSON.stringify({urlWithoutQuery:t&&t.href,error:i}))}return null}))}))}getHistorySuggestions(e){return[]}_constructASRequestUrl(e){let t,i;return this.useOneService?(t=this.getOneServiceQueryParams(e),i=(0,p.PH)(this.api,(0,p.qQ)())):(t=this.getBingQueryParams(e),i=new URL(this.api,this.host)),i.search=s.c.keyValueArrayToQueryString(t),i}getBingQueryParams(e){return[{key:"appid",value:this.appId},{key:"count",value:""+e.maxResults},{key:"q",value:e.searchText},{key:"localcircularview",value:e.userLocation&&`${e.userLocation},100`},{key:"setmkt",value:a.Al.Locale},{key:"setlang",value:a.Al.Locale},{key:"types",value:e.suggestionTypes||""},{key:"abbrtext",value:e.abbrSuggestions?"1":""},{key:"structuredaddress",value:"true"},{key:"strucaddrread",value:"1"},{key:"setflight",value:this.flightId}]}getOneServiceQueryParams(e){return[{key:"apikey",value:g.jG.OneServiceApiKey},{key:"type",value:e.suggestionTypes||""},{key:"$top",value:""+e.maxResults},{key:"q",value:e.searchText},{key:"location",value:e.userLocation&&`${e.userLocation}`},{key:"market",value:a.Al.Locale},{key:"setflight",value:this.flightId},{key:"qscope",value:"locations"},{key:"activityId",value:g.jG.ActivityId},{key:"ocid",value:m.$.getOneServiceOCID(g.jG.TrackInfo,"feeds")}]}_combineSuggestions(e,t){let i=[];if(t&&t.length){i=t;let n=!1;for(let o=0;o<e.length;o++){e[o].root;const a=e[o].address,s=a&&a.streetAddress,r=a&&a.addressLocality,l=e[o].name;for(let e=0;e<t.length;e++){const i=t[e];if(s&&i.formatedAddress&&i.formatedAddress.indexOf(s)>-1&&(r&&i.formatedAddress.indexOf(r)>-1||l&&i.title&&i.title.indexOf(l)>-1)){n=!0;break}}n?n=!1:i.push(e[o])}}else i=e;return i}_updateSuggestionsRank(e){for(let t=0;t<e.length;t++)e[t].suggestionRank=t}_parseSuggestionsV6(e){const t={},i=[];if(e){const n=e.instrumentation;t.formattingRules=this._createFormattingRulesV6(e.formattingRules);const o=this._getDefaultFormattingRuleV6(t.formattingRules),s=e.value;for(let e=0;e<s.length;e++){const r={},l=s[e];try{r.root=l,r.type=l._type,r.readLink=l.readLink,r.readLinkPingSuffix=l.readLinkPingSuffix,r.instrumentationInfo=n,r.suggestionRank=e,r.formattingRuleId=l.formattingRuleId,r.formattingRule=r.formattingRuleId&&t.formattingRules[r.formattingRuleId]||o,r.entityId=l.id,r.name=l.name,r.query=l.query;const s=l.categories;r.primaryCategoryPath=s&&s.length&&s[0],r.entityId&&0===r.entityId.indexOf("local_geoid")&&(r.geoId=r.entityId,r.entityId="");const d=l.entityPresentationInfo;d&&d.entitySubTypeHints&&d.entitySubTypeHints.length&&(r.subType=d.entitySubTypeHints[0]);const u=l.geo;if(u&&this._parseLocationFromAS){const e=u.latitude,t=u.longitude;e&&t&&(r.location={latitude:e,longitude:t})}l.address?(r.address=l.address,r.address.addressRegion=c.abbreviateUSState(r.address.addressRegion,a.Al.Locale,r.address.countryIso)):l.location&&l.location.length?r.address=l.location[0].address:"PostalAddress"===r.type&&(r.address=l),"Favorite"==r.type&&(r.alternateName=l.alternateName,r.subType=l.subType,this._processFavoriteItemId(l,r)),i.push(r)}catch(e){}}}return t.suggestions=i.filter(this.filterSuggestion),t}_parseOneServiceSuggestions(e){const t={},i=e.value[0].groups[0].suggestionItems;for(let e=0;e<i.length;e++){const t={},n=i[e];try{t.readLink=n.dataUrl,t.suggestionRank=e,t.name=n.name,t.entityId=n.id,t.formattingRuleId=n.metadata.formattingRuleId,t.formattingRule=n.metadata.formattingRules&&JSON.parse(n.metadata.formattingRules),t.address=n.metadata,t.address.addressRegion=c.abbreviateUSState(n.metadata.addressRegion,a.Al.Locale,n.metadata.countryIso);const o=n.metadata.latitude,s=n.metadata.longitude;o&&s&&(t.location={latitude:o,longitude:s}),t.subType=n.metadata.entitySubTypeHints,i[e]=t}catch(e){}}return t.suggestions=i.filter(this.filterSuggestion),t}_createFormattingRulesV6(e){const t={};if(e)for(let i=0;i<e.length;i++){const n=JSON.parse(e[i]);t[n.identifier]=n}return t}_getDefaultFormattingRuleV6(e){let t=e&&e.Default||null;for(const i in e){t||(t=e[i]);if(a.Al.Locale.indexOf(i.toLowerCase())>-1){t=e[i];break}}return t}_processFavoriteItemId(e,t){const i=e.bingId;!i||0!==i.indexOf("local_ypid:")&&0!==i.indexOf("sid")&&0!==i.indexOf("local_vdpid")||(t.entityId=i),t.bingId=i}}f.autosuggestCallerId="autosug";class v{constructor(e,t){this.key=e,this.fetchImpl=t,this.geocode=(e,t,i,n,r)=>(0,o.mG)(this,void 0,void 0,(function*(){const o={success:!1,statusCode:null,authenticationResultCode:null,statusDescription:null,name:e,results:null};if(!location)return null;const l=i&&i<=v._maxNumberOfResults?i:v._defaultResultCount,d=[{key:"key",value:this.key},{key:"maxResults",value:""+l},{key:"q",value:encodeURIComponent(e)},{key:"inclnb",value:n?"1":"0"},{key:"incl",value:r?"ciso2":""},{key:"userMapView",value:v._getBoundsString(t)},{key:"culture",value:a.Al.Locale}],c=new URL(v.geoApi,v.geoHost);return c.search=s.c.keyValueArrayToQueryString(d),this.fetchImpl(c.href).then((e=>e.json())).then((e=>{if(e&&e.authenticationResultCode===v._validAuthenticationCode&&e.statusCode===v._validStatusCode&&e.statusDescription===v._validStatusDescription&&e.resourceSets&&0!==e.resourceSets.length){let t;o.success=!0,o.statusCode=v._validStatusCode,o.authenticationResultCode=v._validAuthenticationCode,o.statusDescription=v._validStatusDescription;for(let i=0,n=e.resourceSets.length;i<n;i++)if(t=e.resourceSets[i].resources,t&&0!==t.length){o.results=t;break}o.traceId=e.traceId}else e?(o.statusCode=e.statusCode,o.authenticationResultCode=e.authenticationResultCode,o.statusDescription=e.statusDescription,o.errorMessage=e.errorDetails&&e.errorDetails.length>0&&e.errorDetails[0],o.traceId=e.traceId):(o.statusCode=400,o.authenticationResultCode="Unknown",o.statusDescription="Unknown");return o})).catch((e=>(o.authenticationResultCode="Unknown",o.statusCode=404,o.statusDescription="Http Error",o)))}))}static _getBoundsString(e){return e?e.south+","+e.west+","+e.north+","+e.east:""}}v._validAuthenticationCode="ValidCredentials",v._validStatusCode=200,v._validStatusDescription="OK",v._defaultResultCount=5,v._maxNumberOfResults=20,v.geoHost="https://dev.virtualearth.net",v.geoApi="/REST/v1/Locations";class y{constructor(e){this.suggestion=e,this._formatSuggestion(this.suggestion),this.setSimpleSearchText(),this._setDisplayName()}_setDisplayName(){const e=this._formattingRule&&this._formattingRule["b:groupSeparator"]||", ";this.suggestionTextLine2?this.suggestion.displayName=this.suggestionTextLine1+e+this.suggestionTextLine2:this.suggestion.displayName=this.suggestionTextLine1}setSimpleSearchText(){const e=this._formattingRule&&this._formattingRule["b:groupSeparator"]||", ";if("Favorite"===this.suggestion.type){const t=this.suggestion,i=t.name,n=t.address&&t.address.streetAddress;this._searchText=i!==n&&n?i+e+n:i}else this.suggestionTextLine2?this._searchText=this.suggestionTextLine2+e+this.suggestionTextLine1:this._searchText=this.suggestionTextLine1;this.suggestion&&(this.suggestion.searchText=this._searchText)}_removeCountry(e){let t=", ";this._formattingRule&&(t=this._formattingRule["b:groupSeparator"]||this._formattingRule.groupSeparator||", ");const i=this.suggestion.address||this.suggestion.root,n=i&&i.addressCountry;if(n&&e&&e.slice(e.length-n.length)===n){const i=e.slice(0,e.length-n.length);return i.slice(i.length-t.length)===t?i.slice(0,i.length-t.length):i}return e}_formatSuggestion(e){const t=this.suggestion.formattingRule,i=e;if("Favorite"===e.type)return i.alternateName?this.suggestionTextLine1=i.alternateName:this.suggestionTextLine1=i.name,this.suggestionTextLine2=i.address&&i.address.streetAddress,this.suggestion.formatedAddress=i.address&&i.address.streetAddress,void(this.suggestion.title=i.name);i.name&&(this.suggestionTextLine1=i.name,e.title=i.name),i.query&&(this.suggestionTextLine1=i.query),t?(this._formattingRule=t,this.suggestion.address?this._applyFormattingRule(this.suggestion.address):this._applyFormattingRule(e.root)):(this.suggestionTextLine1=e.title,this.suggestionTextLine2=e.formatedAddress),this.suggestion.formatedLine1=this.suggestionTextLine1,this.suggestion.formatedLine2=this.suggestionTextLine2,this.suggestion.formatedLine2WithoutCountry=this._removeCountry(this.suggestionTextLine2)}_applyFormattingRule(e){let t=0;const i=this._formattingRule["b:fieldGroups"]||this._formattingRule.fieldGroups;if(!this.suggestionTextLine1)for(;t<i.length;t++){const n=this._getFormattedGroupString(e,i[t]);if(n){this.suggestionTextLine1=n,this.suggestion.title=n,++t;break}}const n=[];for(;t<i.length;t++){const o=this._getFormattedGroupString(e,i[t]);o&&n.push(o)}const o=this._formattingRule["b:groupSeparator"]||this._formattingRule.groupSeparator||", ";this.suggestionTextLine2=n.join(o),this.suggestion.formatedAddress=this.suggestionTextLine2}_getFormattedGroupString(e,t){const i=[];let n;const o=t.fields;for(let t=0;t<o.length;t++)n=this._getPrimaryField(e,o[t]),n||(n=this._getAlternateField(e,o[t])),n&&i.push(n);const a=t.fieldSeparator||" ";return i.join(a)}_getPrimaryField(e,t){let i;return e&&t&&(i=e[t.name]),i}_getAlternateField(e,t){let i;if(e&&t){const n=t.alternateField;if(n){const t=n.split(",");for(let n=0;n<t.length&&(i=e[t[n]],!i);n++);}}return i}}y.HistorySuggestionType="history";var b=i(65135);class S{constructor(e,t,i=null,n=null){this.fetchImpl=e,this.userLocation=i,this.xhrFetch=n,this._translateSuggestion=e=>{var t,i;const n=e.suggestion.address||e.suggestion.root,o=null===(t=e.suggestion.location)||void 0===t?void 0:t.latitude,s=null===(i=e.suggestion.location)||void 0===i?void 0:i.longitude,r={language:a.Al.Locale,addressLine:e.suggestion.name||(null==n?void 0:n.streetAddress)||(null==n?void 0:n.postalCode),locality:null==n?void 0:n.addressLocality,region:(0,c.abbreviateUSState)(null==n?void 0:n.addressRegion,a.Al.Locale,null==n?void 0:n.countryIso),subRegion:null==n?void 0:n.addressSubregion,country:n&&(n.addressCountry||""),latitude:o&&Number(o).toString(),longitude:s&&Number(s).toString(),typeV6:e.suggestion.type,subType:e.suggestion.subType,searchText:e.suggestion.searchText,formattedAddress:e.suggestion.formatedAddress,readLink:e.suggestion.readLink,locationType:u.getHyperlocalType(e.suggestion.type,e.suggestion.subType),isoCode:n&&(n.countryIso||""),entityId:e.suggestion.entityId,geoId:e.suggestion.geoId};return!r.locality&&r.addressLine&&(r.locality=r.addressLine,r.addressLine=void 0),r.firstLine=u.getAutoSuggestLocationFirstLine(r),r.secondLine=u.getAutoSuggestLocationSecondLine(r),r},this.cfg=Object.assign(Object.assign({},S.defaultConfig),t||{}),"CN"==(null==i?void 0:i.isoCode)&&(this.cfg.endpoint="https://cn.bing.com"),this._extraResult=this.cfg.latinPercentageLimit>0?5:0,this._geocoder=new v(this.cfg.geocoderKey,e),this._autoSuggestModel=new f(e,this.cfg.endpoint,S[this.cfg.useOneServiceProxy?"oneServiceAutosuggestApi":"bingAutosuggestApi"],this.cfg.appId,this.cfg.excludeSubTypes,this.cfg.flightId,this.cfg.useOneServiceProxy,this.cfg.includeSubTypes)}getLocationSearchResponse(e){return Promise.resolve(null)}getAutoSuggestResponse(e,t){var i,n,s;return(0,o.mG)(this,void 0,void 0,(function*(){if(e){const o="zh-cn"===(null===(i=null===a.Al||void 0===a.Al?void 0:a.Al.Locale)||void 0===i?void 0:i.toLowerCase())&&"zh"!==(null===(s=null===(n=null===a.Al||void 0===a.Al?void 0:a.Al.ClientSettings)||void 0===n?void 0:n.geo_country)||void 0===s?void 0:s.toLowerCase())?"40,116":this.userLocation&&`${this.userLocation.latitude},${this.userLocation.longitude}`,r={searchText:e,maxResults:this.cfg.num+this._extraResult,userLocation:o,suggestionTypes:this.cfg.suggestionTypes,abbrSuggestions:!0,localMapView:null},l=yield this._autoSuggestModel.getSuggestions(r,t);return this._parseSuggestions(l)}}))}_latinPercentage(e){const t=e.locality+e.country+e.region+e.subRegion;if(!t)return 0;return t.match(S.latinParttern).join("").length/t.length}_parseSuggestions(e){const t=[],i=null==e?void 0:e.suggestions;if(i&&i.length>0)for(let e=0;e<i.length;e++)t.push(this._getSuggestionResult(i[e]));let n=t.map(this._translateSuggestion);return this.cfg.latinPercentageLimit>0&&(n=n.filter((e=>this._latinPercentage(e)>this.cfg.latinPercentageLimit)).slice(0,this.cfg.num)),n=n.filter((e=>u.isValidLocationToSuggest(e))),n}_getSuggestionResult(e){return new y(e)}_getLatLongFromReadLink(e){return(0,o.mG)(this,void 0,void 0,(function*(){if(!e.readLink)return null;const t=new URL(e.readLink);return t.searchParams.append("appid",this.cfg.appId),this.fetchImpl(t.href).then((e=>e.json())).then((t=>{var i,n;const o=t.geo||(null===(n=null===(i=t.value)||void 0===i?void 0:i[0])||void 0===n?void 0:n.geo);if(o&&o.latitude&&o.longitude)return Object.assign(Object.assign({},e),{latitude:o.latitude.toString(),longitude:o.longitude.toString()})})).catch((e=>null))}))}geocodeSuggestion(e){return(0,o.mG)(this,void 0,void 0,(function*(){try{const t=yield this._doGeoCodeSuggestion(e);if(null!==t)return Object.assign(Object.assign({},e),{longitude:t.longitude,latitude:t.latitude});b.M0.sendAppErrorEvent(Object.assign(Object.assign({},l.H4x),{message:"failed to fetch location latitude and longitude in auto suggestion v6",pb:Object.assign(Object.assign({},l.H4x.pb),{customMessage:e.searchText})}))}catch(e){(0,r.OO)(e,l.H4x,"error in library [location-service],Geocoder exception for autosuggestion v6")}return null}))}_doGeoCodeSuggestion(e){return(0,o.mG)(this,void 0,void 0,(function*(){const t=e;if(t.longitude&&t.latitude)return t;const i=yield this._getLatLongFromReadLink(e);if(i)return i;const n=this._getSuggestionAddress(t);return this._geocoder.geocode(n,null,1).then((e=>{if(e.success&&e.results&&e.results.length>0){const i=e.results[0];i.bbox;if(i.point){const e=i.point.coordinates;return t.latitude=e[0].toString(),t.longitude=e[1].toString(),t}}return null}))}))}_getSuggestionAddress(e){return e&&"LocalBusiness"===e.typeV6&&e.formattedAddress?e.formattedAddress:e&&e.searchText}}S.bingAutosuggestApi="/api/v6/Places/AutoSuggest",S.oneServiceAutosuggestApi="msn/suggestions",S.defaultConfig={num:5,appId:"D41D8CD98F00B204E9800998ECF8427E1FBE79C2",geocoderKey:"AnTcaqBi2ypp0xI-OZNi4W_ik2KhjgpqioTAtXLC8GzkMBQRMlyxvxyTnd5b73im ",suggestionTypes:"Place,Address,Business",endpoint:"https://www.bing.com",excludeSubTypes:["CountryRegion","AdminDivision1"],flightId:""},S.latinParttern=/[\u00C0-\u00ff\w\s\d.,/#!$%^&*;:{}=\-_`~()]+/gu;var w=i(17318),T=i(26740),C=i.n(T);function x(e){if(e&&e.useV6){const t=(0,n.N)()?window.fetch.bind(window):w.br;return new S(t,e,u.headLocation())}return new h(C(),e)}},94329:function(e,t,i){"use strict";var n,o,a,s,r,l;i.d(t,{A:function(){return r},jo:function(){return T},IL:function(){return S},Rn:function(){return o},mG:function(){return a},k$:function(){return n},_d:function(){return w}}),function(e){e.BroadcastNews_BreakingNews="BroadcastNews_BreakingNews",e.BroadcastNews_DailyBrief="BroadcastNews_DailyBrief",e.BroadcastNews_TopStories="BroadcastNews_TopStories",e.Community_SocialAchievements="Community_SocialAchievements",e.Community_SocialAlerts="Community_SocialAlerts",e.Community_SocialFollowers="Community_SocialFollowers",e.Community_SocialReactions="Community_SocialReactions",e.Community_SocialReplies="Community_SocialReplies",e.Elections_Deadline="Elections_Deadline",e.Elections_PrimaryResults="Elections_PrimaryResults",e.Elections_ScheduleChange="Elections_ScheduleChange",e.EsportsTeam_MatchUpcoming="EsportsTeam_MatchUpcoming",e.Finance_StockChangeAtMarketClose="Finance_StockChangeAtMarketClose",e.Finance_Watchlist="Finance_Watchlist",e.Flight_Info="Flight_Info",e.Flight_Info_TimerBased="Flight_Info_TimerBased",e.HotelReservation_PriceDrop="HotelReservation_PriceDrop",e.Lottery_DrawHappened="Lottery_DrawHappened",e.MsnNews_DailyBriefCoronavirus="MsnNews_DailyBriefCoronavirus",e.QuizType_NewQuizAvailable="QuizType_NewQuizAvailable",e.RealEstateCategory_ListingsUpdated="RealEstateCategory_ListingsUpdated",e.RealEstateEntity_Updated="RealEstateEntity_Updated",e.Rebates_CashOutAvailable="Rebates_CashOutAvailable",e.Rebates_PurchaseCancelled="Rebates_PurchaseCancelled",e.Rebates_PurchaseConfirmed="Rebates_PurchaseConfirmed",e.Rewards_ConfirmationOfDonation="Rewards_ConfirmationOfDonation",e.Rewards_ReminderToRedeem="Rewards_ReminderToRedeem",e.SapphireClient_Recall="SapphireClient_Recall",e.Shopping_DealOfTheDay="Shopping_DealOfTheDay",e.Shopping_DealOfTheDay_2="Shopping_DealOfTheDay_2",e.Shopping_PriceDrop="Shopping_PriceDrop",e.SportsTeam_GameEnded="SportsTeam_GameEnded",e.SportsTeam_SportsTopStories="SportsTeam_SportsTopStories",e.Wallet_PersonalizedOffer="Wallet_PersonalizedOffer",e.Travel_DestinationHotelSuggestion="Travel_DestinationHotelSuggestion",e.Traffic_HighestImpactIncident="Traffic_HighestImpactIncident",e.HealthTeam_AskExpert="HealthTeam_AskExpert"}(n||(n={})),function(e){e.AllNotifications="AllNotifications",e.AllCommunityNotifications="AllCommunityNotifications",e.AllFinanceNotifications="AllFinanceNotifications",e.AllShoppingNotifications="AllShoppingNotifications",e.AllNewsNotifications="AllNewsNotifications",e.AllSportsNotifications="AllSportsNotifications",e.AllWalletNotifications="AllWalletNotifications",e.AllTravelNotifications="AllTravelNotifications",e.AllHealthNotifications="AllHealthNotifications",e.AllTrafficNotifications="AllTrafficNotifications",e.Community_SocialAchievements="Community_SocialAchievements",e.Community_SocialAlerts="Community_SocialAlerts",e.Community_SocialFollowers="Community_SocialFollowers",e.Community_SocialReactions="Community_SocialReactions",e.Community_SocialReplies="Community_SocialReplies",e.News_BreakingNews="News_BreakingNews",e.News_DailyBrief="News_DailyBrief",e.News_TopStories="News_TopStories",e.Finance_StockChangeAtMarketClose="Finance_StockChangeAtMarketClose",e.Shopping_DealOfTheDay="Shopping_DealOfTheDay",e.SportsTeam_GameEnded="SportsTeam_GameEnded",e.SportsTeam_SportsTopStories="SportsTeam_SportsTopStories",e.Wallet_PersonalizedOffer="Wallet_PersonalizedOffer",e.Travel_DestinationHotelSuggestion="Travel_DestinationHotelSuggestion",e.Traffic_HighestImpactIncident="Traffic_HighestImpactIncident",e.HealthTeam_AskExpert="HealthTeam_AskExpert"}(o||(o={})),function(e){e.New="New",e.Seen="Seen"}(a||(a={})),function(e){e.AddInterest="AddInterest",e.BlockInference="BlockInference",e.DisableFeatureConsumption="DisableFeatureConsumption"}(s||(s={})),function(e){e.Follow="Follow",e.NotInterested="NotInterested",e.Disable="Disable",e.StopNotifying="StopNotifying"}(r||(r={})),function(e){e.Post="Post"}(l||(l={}));var d=i(33940),c=i(16517),u=i(65337),h=i(54804),g=i(47903),p=i(970),m=i(26415),f=i(65135),v=i(9344),y=i(99347),b=i(76148);class S{constructor(){this.notificationHost="https://www.bing.com",this.notificationHostCN="https://cn.bing.com",this.getNotificationSettingClientPath="pnp/api/v1/notifications/settings/read",this.updateNotificationSettingClientPath="profile/interestmanager/update",this.getNotificationCountClientPath="bnc/notifications/count",this.getNotificationListClientPath="bnc/notifications","zh-cn"===(0,c.Yq)().CurrentMarket&&(this.notificationHost=this.notificationHostCN)}getNotificationHeaders(){const e={"X-PERSONALBING-CSRF":"1"},t=(0,c.Yq)().CurrentMarket;t&&(e["X-Search-UILang"]=t);const i=(0,u.$o)().getItem(y.I0);i&&(e["X-Search-RPSToken"]=i);const n=(0,v.jG)();return n&&(e["X-Search-ClientID"]=n),h.Al.CurrentFlights&&(e["X-PERSONALBING-FLIGHTS"]=h.Al.CurrentFlights),e}getNotificationSetting(){return(0,d.mG)(this,void 0,void 0,(function*(){const e={service:"Anaheim"},t=new g.h;for(const i in e)t.set(i,e[i]);const i=new URL(this.getNotificationSettingClientPath,this.notificationHost);let n;i.search=t.toString();try{const e=yield fetch(i.href,{credentials:"same-origin",headers:this.getNotificationHeaders()});if(!e.ok)throw Error(e.statusText);n=yield e.json()}catch(e){return void f.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.MPp.WCDataFetchError),{message:"Error while fetching notifications",pb:Object.assign(Object.assign({},m.MPp.WCDataFetchError.pb),{customMessage:`Error: ${e}`})}))}if(n)return n;f.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.MPp.WCJsonParseError),{message:"Didn't get valid JSON from notifications response."}))}))}updateNotificationSetting(e){return(0,d.mG)(this,void 0,void 0,(function*(){const t=new URL(this.updateNotificationSettingClientPath,this.notificationHost),i=[];let n,o={};try{if("string"==typeof e){o[JSON.parse(JSON.parse(e)[0].ParametersJson).FeatureName]=!1}else o=e}catch(e){return void f.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.MPp.WCSettingUpdateError),{message:"Error while updating notification settings",pb:Object.assign(Object.assign({},m.MPp.WCSettingUpdateError.pb),{customMessage:`Error: ${e}`})}))}for(const t in o)i.push({Partner:"Platform",Name:"SetIsConsumptionAllowedAllUp",ParametersJson:JSON.stringify({InterestConsumingService:"Anaheim",FeatureName:t,NewIsConsumptionAllowed:e[t]})});if(i.length){try{const e=yield fetch(t.href,{credentials:"same-origin",headers:this.getNotificationHeaders(),method:"POST",body:JSON.stringify(i)});if(!e.ok)throw Error(e.statusText);n=yield e.json()}catch(e){return void f.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.MPp.WCSettingUpdateError),{message:"Error while updating notification settings",pb:Object.assign(Object.assign({},m.MPp.WCSettingUpdateError.pb),{customMessage:`Error: ${e}`})}))}return n}}))}getRequestQueryParamsString(){const e=new g.h,{pagetype:t}=h.Al.ClientSettings||{},[i,n]=(0,b.EQ)({pagetype:t}).with({pagetype:(0,b.gx)((e=>["ntp","dhp"].includes(e)))},(()=>["anaheim","ntp"])).with({pagetype:"windowshp"},(()=>["anaheim","winfullpage"])).with({pagetype:"hp"},(()=>["msn","msnhp"])).with({pagetype:(0,b.gx)((e=>e.includes("news")))},(()=>["verticalNews","news"===t?"news":t.split("::")[1]])).with({pagetype:"shoppinglivedetails"},(()=>["verticalShopping","shopping"])).otherwise((()=>{const e=t.split("::")[0];return["vertical"+e.replace(/^\S/,(e=>e.toUpperCase())),e]}));return e.set("app",i),e.set("pageId",n),e.set("ocid",(0,p.L)().get("ocid")),e.toString()}getNotificationCount(){return(0,d.mG)(this,void 0,void 0,(function*(){const e=new URL(this.getNotificationCountClientPath,this.notificationHost);e.search=this.getRequestQueryParamsString();let t=null;try{const i=yield fetch(e.href,{credentials:"same-origin",headers:this.getNotificationHeaders()});if(!i.ok)throw Error(i.statusText);t=yield i.json()}catch(e){return void f.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.MPp.WCDataFetchError),{message:"Error while fetching notification count",pb:Object.assign(Object.assign({},m.MPp.WCDataFetchError.pb),{customMessage:`Error: ${e}`})}))}if(t)return t;f.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.MPp.WCJsonParseError),{message:"Didn't get valid JSON from notification count response."}))}))}getNotificationList(){return(0,d.mG)(this,void 0,void 0,(function*(){const e=new URL(this.getNotificationListClientPath,this.notificationHost);let t;e.search=this.getRequestQueryParamsString();try{const i=yield fetch(e.href,{credentials:"same-origin",headers:this.getNotificationHeaders()});if(!i.ok)throw Error(i.statusText);t=yield i.json()}catch(e){return void f.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.MPp.WCSettingFetchError),{message:"Error while fetching notification settings",pb:Object.assign(Object.assign({},m.MPp.WCSettingFetchError.pb),{customMessage:`Error: ${e}`})}))}if(t)return t;f.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.MPp.WCJsonParseError),{message:"Didn't get valid JSON from notification settings response."}))}))}}const w=new(i(17913).X),T={update:"update"}},62938:function(e,t,i){"use strict";var n,o;i.d(t,{c:function(){return n}}),function(e){e.CardView="cardview",e.FlatView="flatview"}(n||(n={})),function(e){e.t3="T3",e.t6="T6"}(o||(o={}))},30113:function(e,t,i){"use strict";var n;i.d(t,{m:function(){return n}}),function(e){e.small="OneByOne",e.medium="OneByTwo",e.large="OneByThree"}(n||(n={}))},11708:function(e,t,i){"use strict";var n;i.d(t,{f:function(){return n}}),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"}(n||(n={}))},83152:function(e,t,i){"use strict";var n;i.d(t,{L:function(){return n}}),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"}(n||(n={}))},791:function(e,t,i){"use strict";i.d(t,{N:function(){return b}});var n=i(33940),o=i(33954),a=i(26415),s=i(68364),r=i(33799),l=i(16517),d=i(94788),c=i(67267),u=i(63535),h=i(87298),g=i(83152),p=i(11708),m=i(30113),f=i(65135),v=i(33379),y=i(51671);const b=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,n.mG)(this,void 0,void 0,(function*(){const t={method:"GET",headers:yield c.$.getOneServiceHeaders(),credentials:"include"},i=(0,u.PH)(this.locationsServiceEndPoint);let o;[...c.$.getCommonParams2(this.ocid,!this.ocidOverride),{key:"autodetect",value:e&&`${e}`}].forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{o=yield(0,h.w)((()=>(0,n.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 o}return o}))}addToFavoriteLocation(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i="Location",o="Follow",a={method:"POST",body:JSON.stringify({actionType:o,targetType:i,definitionName:t,degree:"FavoriteLocation",metaData:e}),headers:yield c.$.getOneServiceHeaders(),credentials:"include"},s=(0,u.PH)(this.pdpServiceEndpoint);let d;((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&s.searchParams.set(e.key,e.value)}));try{d=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(s.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,n.mG)(this,void 0,void 0,(function*(){return yield this.deleteFromPdp(g.L.Location,"definitionName",[e])}))}removeLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){return yield this.deleteFromPdp(g.L.Location,"definitionName",[e])}))}updatePdpHomeLocation(e,t,i={},o){return(0,n.mG)(this,void 0,void 0,(function*(){const a=g.L.Location,s="Follow",d=yield this.getRequestInit({method:"POST"},i);d.body=JSON.stringify({actionType:s,targetType:a,definitionName:t,degree:"DefaultLocation",metaData:e});const p=(0,u.PH)(this.pdpServiceEndpoint);return((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(null!=o?o:(0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(null!=o?o:(0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&p.searchParams.set(e.key,e.value)})),yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(p.href,d);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,s,r){return(0,n.mG)(this,void 0,void 0,(function*(){const l=i.replace(/[^a-zA-Z0-9\-.,_]/g,""),d=g.L.Traffic,u="Follow",p={method:"POST",body:JSON.stringify({actionType:u,targetType:d,targetId:l,degree:e,definitionName:t,metadata:a,createdDateTime:r}),headers:yield c.$.getOneServiceHeaders(),credentials:"include"},m=yield this.getTrafficPdpUrl(null,null,s);try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(m.href,p);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${d}`;throw new Error(t)}return e.json()}))),"updateTrafficMyRoutes");this.tryInvalidateBulkFetchedPdpTargetType(d)}catch(e){return o.k.logError(e.message),!1}return!0}))}deleteTrafficMyRoutes(e,t,i){return(0,n.mG)(this,void 0,void 0,(function*(){const o={method:"DELETE",headers:yield this.getOneserviceHeaders(),credentials:"include"},a=yield this.getTrafficPdpUrl(e,t,i);try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(a.href,o);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${g.L.Traffic}`;throw new Error(t)}return e}))),"deleteTrafficFromPdp"),this.tryInvalidateBulkFetchedPdpTargetType(g.L.Traffic)}catch(e){return!1}return!0}))}getTrafficMyRoutes(e,t){var i;return(0,n.mG)(this,void 0,void 0,(function*(){const o={method:"GET",headers:yield this.getOneserviceHeaders(),credentials:"include"},a=yield this.getTrafficPdpUrl(e,null,t);try{const e=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(a.href,o);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${g.L.Traffic}`;throw new Error(t)}return e}))),"getTrafficFromPdp");return null===(i=yield e.json())||void 0===i?void 0:i.value}catch(e){return null}}))}getTrafficPdpUrl(e,t,i){return(0,n.mG)(this,void 0,void 0,(function*(){const n=(0,u.PH)(this.pdpServiceEndpoint),o=(yield(0,y.XJ)())===r.Hy.SignedIn,a=(0,l.Yq)().UserId,s=o?c.$.getOneServiceParamsWithAuth(a,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(a,this.ocid,!this.ocidOverride);if(e||t){const i=`targetType eq '${g.L.Traffic}'`,o=e?`degree eq '${e}'`:"",a=t?`definitionName eq '${t}'`:"";n.searchParams.set("$filter",`actionType eq 'Follow' and (${i})${o?` and (${o})`:""}${a?` and (${a})`:""}`)}return[...s,...i||[]].forEach((e=>{e.value&&n.searchParams.set(e.key,e.value)})),n}))}addToWatchList(e,t=0,i={},o={}){return(0,n.mG)(this,void 0,void 0,(function*(){const a=g.L.Finance,s="Follow",d={method:"POST",body:JSON.stringify({actionType:s,targetType:a,targetId:e,metadata:Object.assign({securityType:t,tickerId:this.generateUUID()},o)}),headers:yield this.getOneserviceHeaders(i),credentials:"include"},p=(0,u.PH)(this.pdpServiceEndpoint),m="zh-cn"!==(0,l.Yq)().CurrentMarket;let f;((yield(0,y.XJ)())===r.Hy.SignedIn&&m?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&p.searchParams.set(e.key,e.value)}));try{f=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(p.href,d);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,n.mG)(this,void 0,void 0,(function*(){const o=g.L.Finance,a="Follow",s={method:"POST",body:JSON.stringify(e.map((e=>({actionType:a,targetType:o,targetId:e.key,metadata:Object.assign({securityType:e.value,tickerId:this.generateUUID()},i)})))),headers:yield this.getOneserviceHeaders(t),credentials:"include"},d=(0,u.PH)(this.pdpServiceEndpoint),p="zh-cn"!==(0,l.Yq)().CurrentMarket;let m;((yield(0,y.XJ)())===r.Hy.SignedIn&&p?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&d.searchParams.set(e.key,e.value)}));try{m=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(d.href,s);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${o}`;throw new Error(t)}return e.json()}))),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(o)}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,n.mG)(this,void 0,void 0,(function*(){const o=g.L.Finance,a="Follow",s=yield b.readPdpWithTargetType(g.L.Finance,!0,200,t),d=s&&(null===(i=s.value)||void 0===i?void 0:i.filter((e=>e.actionType===a&&e.targetId)));if(!d||d.length<e.length)return!1;const p={};let m=e.length;d.forEach((t=>{let i=e.findIndex((e=>e===t.targetId));i<0&&(i=m,m++),p[t.targetId]=JSON.stringify({actionType:a,targetId:t.targetId,targetType:o,rank:i,metadata:t.metadata})}));const f={method:"PUT",body:JSON.stringify(p),headers:yield this.getOneserviceHeaders(t),credentials:"include"},v=(0,u.PH)(this.pdpServiceEndpoint);((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&v.searchParams.set(e.key,e.value)}));try{yield(0,h.w)((()=>(0,n.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: ${o}`;throw new Error(t)}return e.json()}))),"sortWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(g.L.Finance)}catch(e){return!1}return!0}))}updateWeatherInterests(e,t,i,a={},s){return(0,n.mG)(this,void 0,void 0,(function*(){const t=g.L.Weather,n={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"},d=(0,u.PH)(this.pdpServiceEndpoint);((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(null!=s?s:(0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(null!=s?s:(0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&d.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(d.href,n);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 o.k.logError(e.message),!1}return!0}))}updateWeatherSettings(e,t,i={},o){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!t)return!0;let n="";n=e&&!t?'{"weatherDisplayUnit":"'+e+'"}':!e&&t?'{"userSettings":{"weatherLocationSettingMode":"'+t+'"}}':'{"weatherDisplayUnit":"'+e+'","userSettings":{"weatherLocationSettingMode":"'+t+'"}}';const a=yield this.getRequestInit({method:"POST"},i);a.body=n;const s=(0,u.PH)(this.userUpdateEndpoint);((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(null!=o?o:(0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(null!=o?o:(0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&s.searchParams.set(e.key,e.value)}));const d=yield this.fetchImpl(s.href,a);if(d.status>=400){const e=`OneService returned error response. Status: ${d.status} for update weather setting call`;throw new Error(e)}return!0}))}updateFinanceInterests(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const t={financeInterests:e},i=JSON.stringify(t),n=yield this.getRequestInit({method:"POST"});n.body=i;const o=(0,u.PH)(this.userUpdateEndpoint),a="zh-cn"!==(0,l.Yq)().CurrentMarket;((yield(0,y.XJ)())===r.Hy.SignedIn&&a?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));const s=yield this.fetchImpl(o.href,n);if(s.status>=400){const e=`OneService returned error response. Status: ${s.status} for update finance interests call`;throw new Error(e)}return!0}))}updateUserSettings(e,t={},i){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!0;const n=[];let a;for(a in e)null!=e[a]&&n.push('"'+a+'": '+JSON.stringify(e[a]));const s='{"userSettings":{'+n.join(", ")+"}}",d=yield this.getRequestInit({method:"POST"},t);d.body=s;const h=(0,u.PH)(this.userUpdateEndpoint);((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(null!=i?i:(0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(null!=i?i:(0,l.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,d);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 o.k.logError(e.message),!1}return!0}))}getPdpUserPreference(e,t={},i){return(0,n.mG)(this,void 0,void 0,(function*(){const a=yield this.getRequestInit({method:"GET"},t),s=(0,u.PH)(this.userUpdateEndpoint);[...(yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(i||(0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(i||(0,l.Yq)().UserId,this.ocid,!this.ocidOverride)].forEach((e=>{e.value&&s.searchParams.set(e.key,e.value)}));try{const e=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(s.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(o.k.logError(t.message),e)throw Error(t.message);return null}}))}updatePdpLayoutPreference(e){return(0,n.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,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.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 o.k.logError(e.message),!1}return!0}))}updateSegmentCardsEnableStatus(e,t=null){return(0,n.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 n=e.map((e=>e.cardType!=p.f.TopStoriesCard?`\\"${e.cardType}\\":${e.enabled?'\\"1\\"':'\\"0\\"'}`:"")).join(","),o=i.length>0?'{"segmentCardSettings":"{'+n+'}","userSettings":{'+i.join(", ")+"}}":'{"segmentCardSettings":"{'+n+'}"}';return this.updateUserPreference(o)}))}updateProductivityCardsEnableStatus(e){return(0,n.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,n.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,n.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,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const n=e.map((e=>({actionType:"Follow",targetId:e.cardType,targetType:g.L.Widget,metadata:{prongsv2:{region:e.region,size:m.m[e.size],position:e.position}}})));return this.sendGenericActionRequest({additionalHeaders:t,endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(n),appError:i})}))}muteWidget(e,t={},i){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e||!e.length)return!1;const n=e.map((e=>({actionType:"Mute",targetId:e,targetType:g.L.Widget})));return this.sendGenericActionRequest({additionalHeaders:t,endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(n),appError:i})}))}disableSpotlightCard(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const i={actionType:"Disabled",definitionName:e,targetType:g.L.TopicFeed};return this.sendGenericActionRequest({endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(i),appError:t})}))}enableSpotlightCard(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){return!!e&&(yield this.deleteFromPdp(g.L.TopicFeed,"definitionName",[e],{},void 0,"Disabled",t))}))}sendGenericActionRequest(e){return(0,n.mG)(this,void 0,void 0,(function*(){const{additionalHeaders:t,additionalParams:i,endpoint:o,method:a,payload:s,appError:d}=e;if(!o||!a)return this.logError(new Error("Missing arguments: 'endpoint' and 'method' should be provided and valid"),d),!1;const g=(0,u.PH)(o);let p;((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)})),i&&i.forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)}));try{JSON.parse(s),p=s}catch(e){p=JSON.stringify(s)}const m={method:a,body:p,headers:yield this.getOneserviceHeaders(t),credentials:"include"},f="GET"==a;try{return yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,m);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for payload: ${s}`;throw new Error(t)}return!f||(yield e.json())}))),"sendActions")}catch(e){return this.logError(e,d),!1}}))}getUserActions(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=[{key:"actionType",value:e}],i=yield this.sendGenericActionRequest({additionalParams:t,endpoint:this.userActionServiceEndPoint,method:"GET"});return i&&i.value}))}setUserAction(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){return!!(yield this.sendGenericActionRequest({endpoint:this.userActionServiceEndPoint,method:"POST",payload:Object.assign({actionType:e},t)}))}))}deleteUserAction(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i=[{key:"actionType",value:e},{key:"targetId",value:t.targetId},{key:"definitionName",value:t.definitionName}];return!!(yield this.sendGenericActionRequest({additionalParams:i,endpoint:this.userActionServiceEndPoint,method:"DELETE"}))}))}updateUserPreference(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=yield this.getRequestInit({method:"POST"});t.body=e;const i=(0,u.PH)(this.userUpdateEndpoint);((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{const n=yield this.fetchImpl(i.href,t);if(n.status>=400){const t=`OneService returned error response while updating user preference. Status: ${n.status}, payload: ${e}`;throw new Error(t)}}catch(e){return!1}return!0}))}setPdpTargetTypesForBulkLoad(e){e&&e.length&&!this.bulkGraphActionTargetTypes&&(this.bulkGraphActionTargetTypes=e)}readPdpWithTargetType(e,t=!1,i,o={},s=!0,r=[]){return(0,n.mG)(this,void 0,void 0,(function*(){if(s){const t=yield this.getFromWebWorker(e);if(t)return t}if(this.bulkGraphActionTargetTypes&&this.bulkGraphActionTargetTypes.length)if(this.bulkGraphActionTargetTypes.indexOf(e)>=0){this.bulkGraphActionResultCache=this.bulkGraphActionResultCache||(yield this.bulkGraphActionPromise||(this.bulkGraphActionPromise=this.fetchPdpWithTargetTypes(this.bulkGraphActionTargetTypes,t,i,o,r)));const n=this.bulkGraphActionResultCache.get(e);if(n)return{value:n}}else f.M0.sendAppErrorEvent(Object.assign(Object.assign({},a.srQ),{message:`Received an unknown target type "${e}" that was not in the bulk graph action target types list "${this.bulkGraphActionTargetTypes}". Falling back to new network call. Please update the EntryPoint config's "graphActionsToBulkLoad" property to include this type.`}));const n=(yield this.fetchPdpWithTargetTypes([e],t,i,o,r)).get(e);if(n)return{value:n}}))}deleteFromPdp(e,t,i,o={},a,s="Follow",d,g=[]){return(0,n.mG)(this,void 0,void 0,(function*(){const p={method:"DELETE",headers:yield this.getOneserviceHeaders(o),credentials:"include"},m=(0,u.PH)(this.pdpServiceEndpoint),v=(yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride),b=`targetType eq '${e}'`,S=i.map((e=>`${t} eq '${e}'`)).join(" or ");let w=`actionType eq '${s}' and (${S}) and (${b})`;a&&(w+=` and (degree eq '${a}')`),m.searchParams.set("$filter",w),[...v,...g].forEach((e=>{e.value&&m.searchParams.set(e.key,e.value)}));try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const t=yield this.fetchImpl(m.href,p);if(t.status>=400){const i=`OneService returned error response. Status: ${t.status} for actionType: ${s}, targetType: ${e}`;throw new Error(i)}return t}))),"deleteFromPdp"),this.tryInvalidateBulkFetchedPdpTargetType(e)}catch(e){return d&&f.M0.sendAppErrorEvent(Object.assign(Object.assign({},d),{pb:Object.assign(Object.assign({},d.pb),{actionType:s,error:e.message})})),!1}return!0}))}tryInvalidateBulkFetchedPdpTargetType(e){this.bulkGraphActionResultCache&&this.bulkGraphActionResultCache.delete(e)}fetchPdpWithTargetTypes(e,t=!1,i,o={},a=[]){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e.length)return new Map;const s=e.map((e=>`targetType eq '${e}'`)).join(" or "),d=[{key:"$top",value:`${i=i||10*e.length*2}`},{key:"$filter",value:`actionType eq 'Follow' and (${s})`}],g=yield this.getRequestInit({method:"GET"},o);!0===t&&(g.cache="no-store");const p=(0,u.PH)(this.pdpServiceEndpoint);[...d,...(yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride),...a].forEach((e=>{e.value&&p.searchParams.set(e.key,e.value)}));const m=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(p.href,g);if(!e.ok){if(e.status>=400&&e.status<500&&408!=e.status)return e;throw Error(e.statusText)}return e}))),"readPDPData");if(!m.ok)throw Error(`code=${m.status}, ${m.statusText}`);const f=new Map,v=yield m.json();if(!v)return f;if(v.value)for(const e of v.value){let t=f.get(e.targetType);t||f.set(e.targetType,t=[]),t.push(e)}for(const t of e)f.get(t)||f.set(t,[]);return f}))}updateMarketPreference(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={method:"POST",credentials:"include",body:JSON.stringify({userSettings:{preferredMarket:e}})},i=(0,u.PH)(this.userUpdateEndpoint);((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.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.ok)throw new Error(`Failed to update market preference: Status: ${e.status}`);return!0}catch(e){return o.k.logError(e.message),!1}}))}getFromWebWorker(e){return(0,n.mG)(this,void 0,void 0,(function*(){let t=null;if(d.yb){const i=this.maptoWebWorkerId(e);if(i&&i.trim()){const i=yield(0,d.ot)({id:this.maptoWebWorkerId(e)});i.fetched&&(t=i.payload)}}return t}))}maptoWebWorkerId(e){switch(e){case g.L.Location:return"weatherpdp";case g.L.League:return"sportsleaguepdp";case g.L.Player:return"sportsplayerpdp";case g.L.Team:return"sportsteampdp";case g.L.Finance:return"moneypdp";default:return""}}getRequestInit(e={method:"GET"},t={}){return(0,n.mG)(this,void 0,void 0,(function*(){const i=yield c.$.getOneServiceHeaders();return e.headers=Object.assign(Object.assign({},i),t),e.credentials="include",e}))}getOneserviceHeaders(e={}){return(0,n.mG)(this,void 0,void 0,(function*(){const t=yield c.$.getOneServiceHeaders();return Object.assign(Object.assign({},t),e)}))}getFollowedLists(){return(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.getRequestInit({method:"GET"}),t=(0,u.PH)(this.userUpdateEndpoint);[...(yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)].forEach((e=>{e.value&&t.searchParams.set(e.key,e.value)}));try{const i=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const i=yield this.fetchImpl(t.href,e);if(!i.ok){if(i.status>=400&&i.status<500&&408!=i.status)return i;(0,s.OO)(null,a.G9t,"Error get followed list")}return i}))),"getFollowedLists");return i.ok||(0,s.OO)(null,a.G9t,"Error get followed list"),yield i.json()}catch(e){return o.k.logError(e.message),null}}))}addToFollowedLists(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=g.L.Finance,i={method:"POST",body:JSON.stringify({financeListIds:e}),headers:yield c.$.getOneServiceHeaders(),credentials:"include"},o=(0,u.PH)(this.userUpdateEndpoint);let a;((yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));try{a=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(o.href,i);if(e.status>=400){const i=`OneService returned error response. Status: ${e.status} for actionType: FollowList, targetType: ${t}`;throw new Error(i)}return e.json()}))),"addToFollowedLists")}catch(e){return!1}return!0}))}deleteFromFollowedLists(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=g.L.Finance,i={method:"DELETE",body:null,headers:yield c.$.getOneServiceHeaders(),credentials:"include"},o=(0,u.PH)(this.userUpdateEndpoint);let a;[...(yield(0,y.XJ)())===r.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId,this.ocid,!this.ocidOverride),...[{key:"financeListIds",value:e.toString()}]].forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));try{a=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(o.href,i);if(e.status>=400){const i=`OneService returned error response. Status: ${e.status} for actionType: UnFollowList, targetType: ${t}`;throw new Error(i)}return e.json()}))),"deleteFromFollowedLists")}catch(e){return!1}return!0}))}logError(e,t){t?f.M0.sendAppErrorEvent(Object.assign(Object.assign({},t),{pb:Object.assign(Object.assign({},t.pb),{error:e.message})})):o.k.logError(e.message)}}{constructor(){super((0,v.N)()?window.fetch.bind(window):fetch),"windowsNewsPlus"===l.jG.AppType||"newsAndInterests"===l.jG.AppType||"winWidgets"===l.jG.AppType?(this.ocid="winp2",this.ocidOverride=!0):"sharedWidgets"===l.jG.AppType?(this.ocid="hpwidget",this.ocidOverride=!0):"windowsNewsbar"===l.jG.AppType?(this.ocid="winp0dash",this.ocidOverride=!0):"travel"===l.jG.AppType?(this.ocid="travel-verthp-feeds",this.ocidOverride=!0):"gaming"===l.jG.AppType&&(this.ocid="startgg-feeds",this.ocidOverride=!0)}}},55128:function(e,t,i){"use strict";var n;i.d(t,{S:function(){return n},b:function(){return y}}),function(e){e.More="More",e.Mute="Mute"}(n||(n={}));var o=i(33940),a=i(16517),s=i(54804),r=i(63535),l=i(67267),d=i(87298),c=i(17157),u=i(59207),h=i(28687),g=i(96345),p=i(51125),m=i(33799),f=i(82855),v=i(51671);class y{constructor(e,t=!0){this.fetchImpl=e,this.addPageInfoToOcid=t,this.followedPublishersEndpoint="v1/News/Users/Me/PreferredProviders",this.followedSourcesEndpoint="msn/sources",this.publishersServiceEndpoint="Msn/Providers",this.actionsServiceEndpoint="Graph/Actions",this.followActionSourceEndpoint="community/follows",this.ocid="feeds"}getUserMutedPublishers(){return(0,o.mG)(this,void 0,void 0,(function*(){const e=yield this.getUserActions(n.Mute);if(!e||!e.value)return null;if(!e.value.length)return[];const t=e.value.reduce(((e,t)=>(e[t.targetId]=t,e)),{}),i=yield this.getPublisherDetails(Object.keys(t));if(!i||!i.value||!i.value.length)return null;return i.value.map((e=>{const i={createdDateTime:t[e.id].createdDateTime};return Object.assign(Object.assign({},e),i)}))}))}getUserFollowedPublishers(e=100){return(0,o.mG)(this,void 0,void 0,(function*(){const t=yield this.getRequestInit(),i=[...yield this.getCommonParams(),{key:"$top",value:`${e}`}],n=(0,r.PH)(this.followedPublishersEndpoint);this.appendQs(i,n),(0,c.wq)()||(0,p.s6)(n);const o=yield this.sendRequest(decodeURIComponent(n.href),t,"getFollowedPublishers");return null==o?void 0:o.value}))}getUserFollowedSources(e=100){var t,i;return(0,o.mG)(this,void 0,void 0,(function*(){const n=yield this.getRequestInit(),o=[...yield this.getCommonParams(),{key:"$top",value:`${e}`},{key:"queryType",value:"MyFeed"}];this.isUserSignedIn()&&o.push({key:"scn",value:"MSNRPSAuth"});const a=(0,r.PH)(this.followedSourcesEndpoint);this.appendQs(o,a),(0,c.wq)()||(0,p.s6)(a);const s=yield this.sendRequest(decodeURIComponent(a.href),n,"getFollowedSources");return(null===(t=null==s?void 0:s.value)||void 0===t?void 0:t.length)>0?null===(i=null==s?void 0:s.value[0])||void 0===i?void 0:i.subCards.map((e=>{var t;const i=e.intAttributes&&1==e.intAttributes.disableProfile;return Object.assign(Object.assign({},e),{profileId:i?null:e.profileId,displayName:e.name,logos:[{imageLink:{href:null===(t=e.image)||void 0===t?void 0:t.url}}]})})):[]}))}publisherUserAction(e,t,i){return(0,o.mG)(this,void 0,void 0,(function*(){if(!e||!t)return null;const n=yield this.getRequestInit();n.method=i;let o=yield this.getCommonParams();"POST"===i?n.body=JSON.stringify({actionType:t,targetId:e,targetType:"SourceProvider"}):"DELETE"===i&&(o=[...o,{key:"$filter",value:`actionType eq '${t}' and targetId eq '${e}'`}]);const a=(0,r.PH)(this.actionsServiceEndpoint);this.appendQs(o,a);const s=yield this.sendRequest(decodeURIComponent(a.href),n,`deleteUserAction ${t}`,!0,!0);if(s.status>=400){const i=`OneService returned error response. Status: ${s.status} for actionType: ${t}, targetId: ${e}`;throw new Error(i)}return s}))}updateSourceFollowState(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){if(!e)return null;const i=yield this.getRequestInit();let n=yield this.getCommonParams();n=[...n],t?(i.method="POST",i.body=JSON.stringify({targetId:e})):(i.method="DELETE",n=[...n,{key:"targetId",value:e}]),this.isUserSignedIn()&&n.push({key:"scn",value:"MSNRPSAuth"});const o=(0,r.PH)(this.followActionSourceEndpoint);this.appendQs(n,o);const a=t?"follow":"unfollow";try{return yield this.sendRequest(decodeURIComponent(o.href),i,`updateSourceFollowState ${a}`,!0,!0)}catch(t){throw new Error(`OneService returned error response. Community follow service  for targetId: ${e}, action: ${a}`)}}))}getUserPublisherStatus(e,t){var i;return(0,o.mG)(this,void 0,void 0,(function*(){const n=yield this.getRequestInit();n.method="GET";const o=[...yield this.getCommonParams(),{key:"$filter",value:`actionType eq '${t}' and targetId eq '${e}'`}],a=(0,r.PH)(this.actionsServiceEndpoint);this.appendQs(o,a),(0,c.wq)()||(0,p.s6)(a);const s=yield this.sendRequest(decodeURIComponent(a.href),n,`getUserPublisherStatus ${t}`);return!!(null===(i=s.value)||void 0===i?void 0:i.length)}))}getUserActions(e,t=100){return(0,o.mG)(this,void 0,void 0,(function*(){const i=yield this.getRequestInit(),n=[...yield this.getCommonParams(),{key:"$filter",value:`actionType eq '${e}' and deleted eq false`},{key:"$top",value:`${t}`}],o=(0,r.PH)(this.actionsServiceEndpoint);return this.appendQs(n,o),(0,c.wq)()||(0,p.s6)(o),yield this.sendRequest(decodeURIComponent(o.href),i,`getUserActions ${e}`)}))}getPublisherDetails(e){return(0,o.mG)(this,void 0,void 0,(function*(){const t=yield this.getRequestInit(),i=(0,r.PH)(this.publishersServiceEndpoint),n=[...l.$.getOneServiceParamsWithoutAuth(null,this.ocid,this.addPageInfoToOcid),{key:"ids",value:e.join(",")}];return this.appendQs(n,i),yield this.sendRequest(decodeURIComponent(i.href),t,"getPublisherDetails")}))}getCommonParams(){return(0,o.mG)(this,void 0,void 0,(function*(){if((0,c.wq)())return this.getSapphireQueryParams();return(yield this.isUserSignedIn())?l.$.getOneServiceParamsWithAuth(a.jG.UserId||a.jG.ActivityId,this.ocid,this.addPageInfoToOcid):l.$.getOneServiceParamsWithoutAuth(a.jG.UserId||a.jG.ActivityId,this.ocid,this.addPageInfoToOcid)}))}getSapphireQueryParams(){const e=l.$.getOneServiceNonDynamicParamsWithoutAuth(this.ocid,this.addPageInfoToOcid),t=(0,u._4)();if(t){e.push({key:"market",value:t.market});const i=(0,f.rU)(t.features,a.jG.HasFlightsOverriden);i&&e.push({key:"fdhead",value:i}),e.push({key:"activityId",value:t.activityId}),t.latitude&&t.longitude&&e.push({key:"location",value:`${t.latitude}|${t.longitude}`})}return e}getRequestInit(e=null){return(0,o.mG)(this,void 0,void 0,(function*(){return null==e&&(e={method:"GET"}),(yield this.isUserSignedIn())&&(e.credentials="include"),e.headers=(0,c.wq)()?yield(0,h.dG)():yield l.$.getOneServiceHeaders(),e}))}isUserSignedIn(){return(0,o.mG)(this,void 0,void 0,(function*(){const e=(0,s.nP)().UserIsSignedIn;if(void 0!==e)return e;return(yield(0,v.XJ)())===m.Hy.SignedIn}))}sendRequest(e,t,i,n,a){return(0,o.mG)(this,void 0,void 0,(function*(){return(0,c.wq)()?yield this.sapphireRequest(decodeURIComponent(e),t):yield this.networkRequest(decodeURIComponent(e),t,i,n,a)}))}sapphireRequest(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){const i={url:e,headers:t.headers,body:t.body,refresh:!0};let n;switch(t.method){case"POST":n=yield(0,g.Ef)(i);break;case"DELETE":n=yield(0,g.o9)(i);break;default:n=yield(0,g.FM)(i)}return JSON.parse(n||"{}")}))}networkRequest(e,t,i,n,a){return(0,o.mG)(this,void 0,void 0,(function*(){return(0,d.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){const i=yield this.fetchImpl(e,t);if(!i.ok)throw Error(i.statusText);return n&&(0,p.T1)(),a?i:i.json()}))),i)}))}appendQs(e,t){e.forEach((e=>{e.value&&t.searchParams.set(e.key,e.value)}))}}},96345:function(e,t,i){"use strict";i.d(t,{$x:function(){return a},Ef:function(){return l},Ei:function(){return h},FM:function(){return r},SP:function(){return g},_k:function(){return u},_u:function(){return s},c6:function(){return m},dP:function(){return v},gR:function(){return c},o9:function(){return d},pQ:function(){return f},v_:function(){return p}});var n=i(17157);function o(e,t){(0,n.dw)("navigate",e,t)}function a(e){return new Promise(((t,i)=>{o(e,(e=>{t(e)}))}))}function s(e,t){o(e,t)}function r(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("getHttp",e,t)}(e,(e=>{t(e)}))}))}function l(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("postHttp",e,t)}(e,(e=>{t(e)}))}))}function d(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("deleteHttp",e,t)}(e,(e=>{t(e)}))}))}function c(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("logEvent",e,t)}(e,(e=>{t(e)}))}))}function u(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("logError",e,t)}(e,(e=>{t(e)}))}))}function h(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("getDeviceInfo",e,t)}(e,(e=>{t(e)}))}))}function g(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("getLocationInfo",e,t)}(e,(e=>{t(e)}))}))}function p(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("getNetworkInfo",e,t)}(e,(e=>{t(e)}))}))}function m(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("getUserInfo",e,t)}(e,(e=>{t(e)}))}))}function f(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("requestSnackBar",e,t)}(e,(e=>{t(e)}))}))}function v(e){return new Promise(((t,i)=>{!function(e,t){(0,n.dw)("requestCustom",e,t)}(e,(e=>{t(e)}))}))}},17157:function(e,t,i){"use strict";i.d(t,{dw:function(){return r},wq:function(){return o}});i(83648);const n={};function o(){var e,t,i,n;const o=null===(e=window.sapphireWebViewBridge)||void 0===e?void 0:e.send,a=null===(n=null===(i=null===(t=window.webkit)||void 0===t?void 0:t.messageHandlers)||void 0===i?void 0:i.send)||void 0===n?void 0:n.postMessage;return o||a}let a;function s(e,t){var i,n,o,s,r,l,d;console.log(e,t);const c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),u={scenario:e,data:{data:t},id:c};a&&!u.data.data.appId&&(u.data.data.appId=a);const h=JSON.stringify(u);return(null===(o=null===(n=null===(i=window.webkit)||void 0===i?void 0:i.messageHandlers)||void 0===n?void 0:n.send)||void 0===o?void 0:o.postMessage)&&(null===(l=null===(r=null===(s=window.webkit)||void 0===s?void 0:s.messageHandlers)||void 0===r?void 0:r.send)||void 0===l||l.postMessage(h)),(null===(d=window.sapphireWebViewBridge)||void 0===d?void 0:d.send)&&window.sapphireWebViewBridge.send(h),c}function r(e,t,i){const o=s(e,t);i&&function(e,t){n[e]?n[e].push(t):n[e]=[t]}(o,i)}},59207:function(e,t,i){"use strict";i.d(t,{hP:function(){return y},_4:function(){return v}});var n,o=i(33940);!function(e){e.Android="Android",e.iOS="iOS"}(n||(n={}));var a=i(96345),s=i(54433),r=i(9344),l=i(58155);let d,c,u,h,g,p,m;const f={};function v(){return h}function y(e){return(0,o.mG)(this,void 0,void 0,(function*(){if(d.isSignedIn&&"AAD"===d.accountType){const e=yield(0,a.c6)({refresh:!0,accountType:"AAD"});try{const t=JSON.parse(e);if(t.accessToken&&t.accessToken.length>0)return`Bearer ${t.accessToken}`}catch(e){S(e,"SapphireUserConfig.getAccessToken: Failed to parse AAD access token")}}if(d.isSignedIn&&"MSA"===d.accountType){const t=yield(0,a.c6)({refresh:!0,accountType:"MSA",type:"AccessToken",scope:e});try{const e=JSON.parse(t);if(e.succeed)return e.accessToken}catch(e){S(e,"SapphireUserConfig.getAccessToken: Failed to parse MSA access token")}}return null}))}function b(){return(0,o.mG)(this,void 0,void 0,(function*(){const e=yield(0,a.Ei)({});try{return JSON.parse(e)}catch(e){S(e,"SapphireUserConfig.getDeviceInformation: Failed to parse response")}}))}function S(e,t){(0,a._k)({type:"Failure",name:"HP_WEBVIEW_APP_ERROR",error:t,data:{error:e,customMessage:t}})}function w(e){if(!e)return"en-us";const t=e.toLowerCase();return"en-id"===t?"en-xl":t}function T(e){"ru-ru"===e.market&&e.detectedCountry&&"RU"!==e.detectedCountry&&(e.market="en-xl");const t=e.market.split("-");t&&2==t.length&&(e.language=t[0],e.countryCode=t[1])}function C(e,t){f[t]||(f[t]=function(e){const t={},i=function(e,t=!1){if(!e)return null;return function(e,t=!1){const i=[];e&&e.startsWith("?")&&(e=e.substring(1));if(e){const n=(e=e.split("#")[0]).split("&");for(let e=0;e<n.length;e++){const o=n[e].split("=");let a=o[0],r=o[1];t&&(a=x(a),r&&(r=x(r)));const l={key:a,value:r},d=(0,s.Z)(i,(e=>e.key===l.key));-1===d?i.push(l):i[d]=l}}return i}((e||"").split("?")[1],t)}(e,!0);i&&i.length&&i.forEach((e=>t[e.key]=e.value));return t}(t));const i=f[t][e];return void 0!==i?i:null}function x(e){return e=e.replace(/\+/g," "),e=decodeURIComponent(e)}function k(){return S(new Error("SapphireUserConfig.uuidv4: Recieved empty activityId"),"Empty activityId"),"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}!function(e){p=e}((function(e){return(0,o.mG)(this,void 0,void 0,(function*(){h={},window.performance.mark("HP-initUserConfigForOthers-DeviceInformation-Start"),c=yield b(),window.performance.mark("HP-initUserConfigForOthers-DeviceInformation-End"),window.performance.measure("HP-initUserConfigForOthers-DeviceInformation","HP-initUserConfigForOthers-DeviceInformation-Start","HP-initUserConfigForOthers-DeviceInformation-End"),c&&(h.muid=`m-${c.sapphireId}`,h.sapphireId=c.sapphireId,h.anid=c.ANID,h.adid=c.ADID,h.market=w(c.market),h.features=c.expFeatures,h.activityId=c.expActivityId?c.expActivityId:k(),h.isDarkMode=c.isDarkMode,h.platform=c.platform,h.bridgeVersionInt=c.bridgeVersionInt,h.fontSize=c.fontSize,h.isChinaBuild=c.isChinaBuild,h.clientVersion=c.clientVersion,h.packageName=c.packageName,h.installSource=c.installSource,h.detectedCountry=c.detectedCountry?c.detectedCountry:"",h.isEdge=void 0!==c.isEdge&&c.isEdge,h.isEos=void 0!==c.isEos&&c.isEos,h.screenWidth=c.screenWidth,h.screenWidthPx=c.screenWidthPx,h.screenHeight=c.screenHeight,h.screenHeightPx=c.screenHeightPx,h.isBingApp=c.isBingApp,h.isNewsApp=c.isNewsApp,h.adjustCampaign=c.adjustCampaign,h.isFirstSession=c.isFirstSession,T(h)),window.performance.mark("HP-initUserConfigForOthers-UserInformation-Start"),yield function(){return(0,o.mG)(this,void 0,void 0,(function*(){const e=yield(0,a.c6)({});try{d=JSON.parse(e)}catch(e){S(e,"SapphireUserConfig.getUserInformationInternal: Failed to parse response")}}))}(),window.performance.mark("HP-initUserConfigForOthers-UserInformation-End"),window.performance.measure("HP-initUserConfigForOthers-UserInformation","HP-initUserConfigForOthers-UserInformation-Start","HP-initUserConfigForOthers-UserInformation-End"),d&&(h.accountType=d.accountType,h.isSignedIn=d.isSignedIn),window.performance.mark("HP-initUserConfigForOthers-LocationInformation-Start"),yield function(){return(0,o.mG)(this,void 0,void 0,(function*(){const e=yield(0,a.SP)({fallbackRevIP:!1});try{u=JSON.parse(e)}catch(e){S(e,"SapphireUserConfig.getLocationInformationInternal: Failed to parse response")}}))}(),window.performance.mark("HP-initUserConfigForOthers-LocationInformation-End"),window.performance.measure("HP-initUserConfigForOthers-LocationInformation","HP-initUserConfigForOthers-LocationInformation-Start","HP-initUserConfigForOthers-LocationInformation-End"),u&&(h.latitude=u.lat,h.longitude=u.lng,h.clientLocationProvider=u.provider,h.clientLocationAccuracy=u.accuracy,h.clientLocationTimeStamp=u.time),window.performance.mark("HP-initUserConfigForOthers-NetworkInformation-Start"),yield function(){return(0,o.mG)(this,void 0,void 0,(function*(){const e=yield(0,a.v_)({});try{g=JSON.parse(e)}catch(e){S(e,"SapphireUserConfig.getNetworkInformation: Failed to parse response")}}))}(),window.performance.mark("HP-initUserConfigForOthers-NetworkInformation-End"),window.performance.measure("HP-initUserConfigForOthers-NetworkInformation","HP-initUserConfigForOthers-NetworkInformation-Start","HP-initUserConfigForOthers-NetworkInformation-End"),g&&(h.networkInfoType=g.type);const t=new URLSearchParams(window.location.search);h.isPageRefresh=!(!t||!t.get("isPageRefresh"))&&"1"===t.get("isPageRefresh"),e&&(e.muid&&(h.muid=e.muid),h.activityId=e.activityId,h.features=e.expFeatures)}))})),function(e){m=e}((function(){return(0,o.mG)(this,void 0,void 0,(function*(){h={};const e=window.location.href;let t;t=null!==l.c.getQueryParameterByName("edge",e)?(0,r.jG)():C("muid",e),h.sapphireId=null!==t?t:"",h.muid=null!==t?`m-${t}`:"";const i=C("adid",e);h.adid=null!==i?i:"";const o=C("market",e);h.market=w(o),T(h);const s=C("features",e);h.features=null!==s?s:"";const c=C("activityId",e);h.activityId=c||k();const g=C("platform",e);h.platform=null!==g?n[g]:"",h.bridgeVersionInt=1;const p=C("bridgeVersionInt",e);p&&(h.bridgeVersionInt=parseInt(p,10));const m=C("isDarkMode",e);h.isDarkMode="true"===m;const f=C("isSignedIn",e);h.isSignedIn="true"===f;const v=C("accountType",e);h.accountType=null!==v?v:"";const y=C("isPageRefresh",e);h.isPageRefresh=null!==y&&"1"===y;const x=C("isChinaBuild",e);h.isChinaBuild="true"===x;const $=C("kids",e);h.isKidsMode=null!==$&&"1"===$;const O=C("fontSize",e);h.fontSize=parseInt(O,10);const L=C("latitude",e);h.latitude=null!==L?L:"";const I=C("longitude",e);h.longitude=null!==I?I:"";const A=C("anid",e);h.anid=null!==A?A:"",d={isSignedIn:h.isSignedIn,accountType:h.accountType},u={lat:L,lng:I};const E=C("clientVersion",e);if(null!==E){h.clientVersion=null!==E?E:"";const t=C("packageName",e);h.packageName=null!==t?t:""}else window.performance.mark("HP-initUserConfigForSuperAppAndroid-DeviceInformation-Start"),b().then((e=>{console.log("getDeviceInfomation Bridge call complete"),window.performance.mark("HP-initUserConfigForSuperAppAndroid-DeviceInformation-End"),window.performance.measure("HP-initUserConfigForSuperAppAndroid-DeviceInformation","HP-initUserConfigForSuperAppAndroid-DeviceInformation-Start","HP-initUserConfigForSuperAppAndroid-DeviceInformation-End"),h.clientVersion=e.clientVersion,h.packageName=e.packageName}));window.performance.mark("HP-initUserConfigForSuperAppAndroid-LocationInformation-Start");const M=C("provider",e);if(null!==M){h.clientLocationProvider=null!==M?M:"";const t=C("accuracy",e);h.clientLocationAccuracy=null!==t?t:"";const i=C("time",e);h.clientLocationTimeStamp=null!==i?i:""}else(0,a.SP)({fallbackRevIP:!1}).then((e=>{console.log("getLocationInfo Bridge call complete"),window.performance.mark("HP-initUserConfigForSuperAppAndroid-LocationInformation-End"),window.performance.measure("HP-initUserConfigForSuperAppAndroid-LocationInformation","HP-initUserConfigForSuperAppAndroid-LocationInformation-Start","HP-initUserConfigForSuperAppAndroid-LocationInformation-End");try{u=JSON.parse(e),console.log("locInfo:",u),u&&(h.latitude=u.lat,h.longitude=u.lng,h.clientLocationProvider=u.provider,h.clientLocationAccuracy=u.accuracy,u.time&&(h.clientLocationTimeStamp=new Date(u.time).toISOString()))}catch(e){S(e,"SapphireUserConfig.initUserConfigForSuperAppAndroid: Failed to parse location response")}}));b().then((e=>{console.log("deviceInfo:",e),h.installSource=e.installSource,h.detectedCountry=e.detectedCountry?e.detectedCountry:"",h.screenWidth=e.screenWidth,h.screenWidthPx=e.screenWidthPx,h.screenHeight=e.screenHeight,h.screenHeightPx=e.screenHeightPx,h.isBingApp=e.isBingApp,h.isNewsApp=e.isNewsApp,h.adjustCampaign=e.adjustCampaign,h.isFirstSession=e.isFirstSession,T(h)}))}))}))},28687:function(e,t,i){"use strict";i.d(t,{XF:function(){return c},Cw:function(){return h},_o:function(){return u},oh:function(){return g},dG:function(){return v},wR:function(){return y},w8:function(){return d},cc:function(){return p},VQ:function(){return b},AG:function(){return l},AJ:function(){return m}});var n=i(33940),o=i(59207),a=i(96345);var s,r=i(17157);!function(e){e.OnlineRetailer="OnlineRetailer",e.Venue="Venue",e.Map="Map",e.Category="Category",e.Promotion="Promotion",e.CardList="Card-List"}(s||(s={}));function l(e,t){const i={action:"requestActionMenu",items:e};(0,a._u)(i,t)}function d(e,t,i,n){f({action:"requestShare",title:t,content:e,image:i,description:n})}function c(e,t,i,o,s,r,l,d,c,u,h,g){return(0,n.mG)(this,void 0,void 0,(function*(){const n={partner:"MySaves",scenario:"Add",category:"News",data:{title:e,key:t,newsId:s,type:r,url:i,timestamp:o,image:d,icon:h,imageHeight:c,imageWidth:u,provider:l,firstCard:g}};return yield(0,a.dP)(n)}))}function u(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={partner:"MySaves",scenario:"Delete",category:"News",filters:{conditions:[{key:"key",value:e,operator:"="}]}};return yield(0,a.dP)(t)}))}function h(e){var t;return(0,n.mG)(this,void 0,void 0,(function*(){const i={partner:"MySaves",scenario:"Get",category:"News",filters:{conditions:[{key:"key",value:e,operator:"="}]}},n=yield(0,a.dP)(i);try{const e=JSON.parse(n);return!0===(null==e?void 0:e.success)&&!!(null===(t=e.result)||void 0===t?void 0:t.length)}catch(e){}return!1}))}function g(e,t,i,o,s,r="long"){return(0,n.mG)(this,void 0,void 0,(function*(){const n={message:e,action:s,period:r,bgColor:t,textColor:i,actionColor:o};return yield(0,a.pQ)(n)}))}function p(e,t){f({deeplink:e,action:t||"requestNativePage"})}function m(e,t,i){f({action:"requestMiniApp",targetAppId:e,page:t,params:i})}function f(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=yield(0,a.$x)(e);console.log(t)}))}function v(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={};e&&(t.SiteName="www.msn.com");const i=(0,o._4)();if(i){t.MUID=i.muid;const e=yield(0,o.hP)("service::api.msn.com::MBI_SSL");"MSA"===i.accountType&&e?t.UserAuthToken=e:"AAD"===i.accountType&&e&&(t.Authorization=e)}return t}))}function y(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={};e&&(t.SiteName="www.msn.com");const i=(0,o._4)();if(i){const e=yield(0,o.hP)("service::api.msn.com::MBI_SSL");"MSA"===i.accountType&&e?t.UserAuthToken=e:"AAD"===i.accountType&&e&&(t.Authorization=e)}return t}))}function b(e){(0,r.wq)()&&(0,a.gR)({appId:"0067acd6d05f4168b92f510d33b9ed74",type:"Debug",name:"HP_WEBVIEW_SERVER_LOG",data:{message:e}})}},2314:function(e,t,i){"use strict";i.d(t,{Ai:function(){return J},Am:function(){return P},D8:function(){return y},FJ:function(){return j},Fd:function(){return R},H9:function(){return Q},HN:function(){return d},I4:function(){return E},I8:function(){return s},J4:function(){return O},K8:function(){return B},KN:function(){return D},N_:function(){return U},O7:function(){return m},Ou:function(){return v},P0:function(){return A},Pe:function(){return M},Rf:function(){return G},TV:function(){return k},UN:function(){return x},Us:function(){return S},Xk:function(){return a},Zt:function(){return T},bj:function(){return z},ck:function(){return W},d:function(){return N},eD:function(){return $},fs:function(){return b},gW:function(){return K},mW:function(){return C},o1:function(){return Z},q$:function(){return c},qD:function(){return l},rI:function(){return g},sl:function(){return V},tY:function(){return f},tm:function(){return u},uj:function(){return q},wF:function(){return I},w_:function(){return r},x5:function(){return X},xI:function(){return L},xR:function(){return _},x_:function(){return h},zL:function(){return w},zw:function(){return p}});var n=i(38156),o=i(99478);const a="https://go.microsoft.com/fwlink/?LinkId=521839",s=" - ";var r,l,d,c;!function(e){e.preGame="pre-game",e.inprogressGame="inprogress-game",e.postGame="post-game",e.nonlive="non-live"}(r||(r={})),function(e){e.toss="Toss",e.dinner="Dinner",e.drinks="Drinks",e.fog="Fog",e.innings="Innings",e.lunch="Lunch",e.stumps="Stumps",e.tea="Tea",e.break="Break"}(l||(l={})),function(e){e.singleparticipant="single",e.dualparticipants="dual"}(d||(d={})),function(e){e.unknown="Unknown",e.football="Football",e.baseball="Baseball",e.basketball="Basketball",e.basketball3x3="Basketball3x3",e.cricket="Cricket",e.icehockey="IceHockey",e.fieldhockey="FieldHockey",e["auto racing"]="Racing",e.racing="Racing",e.tennis="Tennis",e.soccer="Soccer",e.golf="Golf",e.australianrules="AustralianRules",e.rugbyunion="RugbyUnion",e.rugbyleague="RugbyLeague",e.archery="Archery",e.athletics="Athletics",e.badminton="Badminton",e.cycling="Cycling",e.boxing="Boxing",e.canoeing="Canoeing",e.climbing="Climbing",e.equestrianism="Equestrianism",e.fencing="Fencing",e.gymnasticsartistic="GymnasticsArtistic",e.gymnasticsrhytmic="GymnasticsRhytmic",e.gymnasticstrampoline="GymnasticsTrampoline",e.handball="Handball",e.judo="Judo",e.karate="Karate",e.summerolympics="SummerOlympics",e.paralympics="Paralympics",e.pentathlon="Pentathlon",e.swimmingartistic="SwimmingArtistic",e.swimming="Swimming",e.diving="Diving",e.waterpolo="WaterPolo",e.rowing="Rowing",e.sailing="Sailing",e.shooting="Shooting",e.skateboarding="Skateboarding",e.surfing="Surfing",e.taekwondo="Taekwondo",e.triathlon="Triathlon",e.tabletennis="TableTennis",e.volleyballteam="VolleyballTeam",e.volleyballbeach="VolleyballBeach",e.weightlifting="Weightlifting",e.wrestling="Wrestling",e.softball="Softball",e.trackandfield="TrackAndField",e.mma="MMA",e.netball="Netball",e.boccia="Boccia"}(c||(c={}));const u=new Map([[c.soccer,new Set(["*"])],[c.football,new Set(["Football_NFL","Football_CollegeFootball"])],[c.baseball,new Set(["Baseball_MLB"])],[c.icehockey,new Set(["*"])],[c.basketball,new Set(["*"])]]);var h,g;!function(e){e.singleRace="MotorSportsSingleRace",e.raceList="MotorSportsRaceList"}(h||(h={}));!function(e){e[e.MotorSports=0]="MotorSports",e[e.GolfSports=1]="GolfSports",e[e.NFLDraft=2]="NFLDraft",e[e.Default=3]="Default"}(g||(g={}));const p={TeamStandings:"MotorSportsTeamStandings",DriverStandings:"MotorSportsDriverStandings"};var m;!function(e){e.scheduledTournaments="GolfSchedule",e.leaderboard="GolfLeaderBoard"}(m||(m={}));const f={Badge:"Badge",Preview:"PreviewCard"},v={SportsCard:"SportsCard",SportsPreview:"SportsPreview",SportsSptlgt:"SportsSptlgt",Badge:"SportsBadge",TaskbarRotation:"SportsTBR"};var y;!function(e){e.SportsCard="SportsCard",e.Homepage="homepage",e.Game="sports_game",e.Header="sports_header",e.SeeMore="seemore",e.SeeMoreSports="seemore_sportsvertical",e.Customization="sportscard_customization",e.MoreSettings="sportscard_customization_moresettings",e.Vertical="sports",e.DislikeSports="HideSport",e.HideSportsCard="HideSportsCard",e.SaveSetting="done",e.CancelSetting="Cancel",e.SportsInput="searchsports",e.SportsSuggest="suggestresult",e.SportsSuggestUrl="suggesturl",e.ConfidenceScoreKey="cs",e.PreviousMatch="PreviousSlideArrow",e.NextMatch="NextSlideArrow",e.AddSports="FollowWizard",e.AddSportsMenu="FollowTeamOrLeague",e.FollowSports="Follow",e.UnFollowSports="Unfollow",e.GoBack="Goback",e.EditSports="FollowWizard",e.ClickCarouselDot="CarouselDotClick",e.MotorSports="Motorsports",e.MotorRace="sing",e.MotorRaceTime="sports_gametime",e.MotorRaceScore="sports_gamescore",e.GolfSports="Golfsports",e.GolfParticipantScore="sports_participantscore",e.GolfParticipantTeeTime="sports_participantteetime",e.SportsVideo="sports_video",e.SportsNavButton="sports_header",e.SportsNavList="sports_header",e.SportsNavSearchButton="sports_nav_search",e.ReminderLink="FollowReminderLink",e.ReminderClose="FollowReminderClose",e.FREDone="done",e.FRESeemore="fre_seemore",e.SportsFRE="freexperience",e.SportsItem="sportsitem",e.HoverTeam="hover_team",e.FollowTeam="follow_team",e.SuperBowlCard="SuperBowlCard",e.SportsFeedback="SportsFeedback",e.ChangeLeagueTeam="ChangeLeagueTeam",e.Feedback="Feedback",e.PopupHideSport="PopupHideSport",e.PopupHide="popup_hide",e.PopupCancel="popup_cancel",e.PopupClose="popup_close",e.SendFeedback="feedback_send",e.CancelFeedback="feedback_cancel",e.CloseFeedback="feedback_close",e.HideReminder="SportsHideReminder",e.HideReminderSetting="reminder_settings",e.HideReminderManageCard="reminder_managecard",e.HideReminderRefreshFeed="reminder_refreshfeed",e.MarchMadnessCard="MarchMadnessCard",e.NFLDraft="NFLDraft",e.SportsArticle="sports_article",e.NBAFinals="NBAFinals",e.NHLFinals="NHLFinals",e.Articles="Articles",e.Standings="Standings",e.SportsCarousel="SportsCarousel",e.RevertFollow="RevertFollow"}(y||(y={}));const b={League:"League",Team:"Team"},S={Dislike:"Dislike",Follow:"Follow"},w={TeamVsTeam:"TeamVsTeam",ColdStart:"ColdStart"},T={SportsMatches:"SportsMatches",Standings:"Standings",Articles:"Articles"};var C;!function(e){e.SuperDesign="SuperDesign",e.MarchMadness="MarchMadness",e.NFLDraft="NFLDraft",e.NBAFinals="NBAFinals",e.NHLFinals="NHLFinals",e.SeriesFinals="SeriesFinals",e.Articles="Articles",e.Standings="Standings",e.SideBySide="SideBySide",e.LeaderBoard="LeaderBoard",e.Formular1="Formular1",e.Video="Video",e.Default="Default",e.Combined="Combined"}(C||(C={}));const x={NBA:"Basketball_NBA",NHL:"IceHockey_NHL"},k=new Set(["Basketball_NBA","IceHockey_NHL"]),$="b7a76276-375a-718b-52d9-49eae9b263a4";var O,L;!function(e){e.Small="_1x_1y",e.Medium="_1x_2y",e.Large="_1x_3y"}(O||(O={})),function(e){e.fullFill="fullwidth",e.continuous="continuous"}(L||(L={}));const I={dark:"dark",light:"light"},A=3,E="#",M=e=>{const t={video:"video",highlight:"videoHighlight",preview:"videoPreview"};return e&&t[e.toLowerCase()]||t.video};const P=(e,t,i,o,a)=>{var s;if(!e)return;const r=a&&a.zone,l=t||[],d=i||{},u=d.leagueName||y.SportsFRE,h=d.leagueId||y.SportsFRE,g=d.sportType||c.unknown,p=d.cardTitleClickthroughUrl,m=null!==(s=d.primaryEntityId)&&void 0!==s?s:h,f=d.seeMoreLeagueClickthroughUrl,v=d.seeMoreSportsClickthroughUrl,b=e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:r}),S=b.addOrUpdateChild({name:y.SportsCard,behavior:n.wu.Navigate,destinationUrl:p,overrideDestinationUrl:p,content:{vertical:y.Vertical,category:u,headline:g,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),w=b.addOrUpdateChild({name:y.Header,behavior:n.wu.Navigate,destinationUrl:p,overrideDestinationUrl:p,content:{vertical:y.Vertical,category:u,headline:g,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),T=b.addOrUpdateChild({name:y.Customization,behavior:n.wu.More,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.Customization,type:n.uH.StructuredData,id:h,brandId:m},type:n.c9.Interaction,ext:o,zone:r}),C=b.addOrUpdateChild({name:y.SeeMore,behavior:n.wu.Navigate,destinationUrl:f||v,content:{vertical:y.Vertical,category:u,headline:g,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),x=b.addOrUpdateChild({name:y.SeeMoreSports,behavior:n.wu.Navigate,destinationUrl:v||f,content:{vertical:y.Vertical,category:u,headline:g,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),k=b.addOrUpdateChild({name:y.MoreSettings,behavior:n.wu.Navigate,overrideDestinationUrl:`${window.location.origin||""}/personalize`,content:{vertical:y.Vertical,category:u,headline:g,type:n.uH.StructuredData,id:h,brandId:m},type:n.c9.ActionButton,ext:o,zone:r}),$=b.addOrUpdateChild({name:y.DislikeSports,behavior:n.wu.Dislike,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.DislikeSports,type:n.uH.StructuredData,id:m,brandId:m},type:n.c9.ActionButton,ext:o,zone:r}),O=b.addOrUpdateChild({name:y.HideSportsCard,behavior:n.wu.Hide,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.HideSportsCard,type:n.uH.StructuredData,id:m,brandId:m},type:n.c9.ActionButton,ext:o,zone:r}),L=b.addOrUpdateChild({name:y.Feedback,behavior:n.wu.Report,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:m,brandId:m},type:n.c9.ActionButton,ext:o,zone:r}),I=new Map,A=new Map,E=new Map,M=new Map;l.length>0&&l.forEach((e=>{if(!e||!e.sportsMatchData)return;const t=e.sportsMatchData.gameId,i=b.addOrUpdateChild({name:y.Game,behavior:n.wu.Navigate,destinationUrl:e.sportsMatchData.matchClickthroughUrl||p,content:{vertical:y.Vertical,category:u,headline:g,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r});if(I.set(e.sportsMatchData.matchClickthroughUrl,null==i?void 0:i.getMetadataTag()),A.set(t,i),e.sportsMatchData.videoImageUrl){const i=b.addOrUpdateChild({name:y.SportsVideo,behavior:n.wu.Navigate,destinationUrl:e.sportsMatchData.matchClickthroughUrl||p,content:{vertical:y.Vertical,category:u,headline:g,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r});M.set(t,i)}e.sportsMatchData.participantOne&&e.sportsMatchData.participantOne.satoriId&&E.set(e.sportsMatchData.participantOne.satoriId,{hoverTeam:b.addOrUpdateChild({name:y.HoverTeam,behavior:n.wu.Show,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.HoverTeam,type:n.uH.StructuredData,id:e.sportsMatchData.participantOne.satoriId,brandId:m},ext:o,zone:r}),followTeam:b.addOrUpdateChild({name:y.FollowTeam,behavior:n.wu.Follow,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.FollowTeam,type:n.uH.StructuredData,id:e.sportsMatchData.participantOne.satoriId,brandId:m},ext:o,zone:r})}),e.sportsMatchData.participantTwo&&e.sportsMatchData.participantTwo.satoriId&&E.set(e.sportsMatchData.participantTwo.satoriId,{hoverTeam:b.addOrUpdateChild({name:y.HoverTeam,behavior:n.wu.Show,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.HoverTeam,type:n.uH.StructuredData,id:e.sportsMatchData.participantTwo.satoriId,brandId:m},ext:o,zone:r}),followTeam:b.addOrUpdateChild({name:y.FollowTeam,behavior:n.wu.Follow,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.FollowTeam,type:n.uH.StructuredData,id:e.sportsMatchData.participantTwo.satoriId,brandId:m},ext:o,zone:r})})}));const P=b.addOrUpdateChild({name:y.SaveSetting,behavior:n.wu.Save,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.SaveSetting,type:n.uH.StructuredData,id:m,brandId:m},ext:o,zone:r}),D=b.addOrUpdateChild({name:y.CancelSetting,behavior:n.wu.Cancel,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.CancelSetting,type:n.uH.StructuredData,id:m,brandId:m},ext:o,zone:r}),H=b.addOrUpdateChild({name:y.SportsInput,behavior:n.wu.TextSearch,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.SportsInput,type:n.uH.StructuredData,id:m,brandId:m},type:n.c9.InputBox,ext:o,zone:r}),F=b.addOrUpdateChild({name:y.PreviousMatch.toLowerCase(),behavior:n.wu.Paginate,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.PreviousMatch,type:n.uH.StructuredData,id:m,brandId:m},ext:o,zone:r}),R=b.addOrUpdateChild({name:y.NextMatch.toLowerCase(),behavior:n.wu.Paginate,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.NextMatch,type:n.uH.StructuredData,id:m,brandId:m},ext:o,zone:r}),N=b.addOrUpdateChild({name:y.AddSports,action:n.Aw.View,behavior:n.wu.Customize,destinationUrl:"",content:{vertical:y.Vertical,type:n.uH.StructuredData,id:m,brandId:m},type:n.c9.Module,ext:o,zone:r}),U=b.addOrUpdateChild({name:y.AddSportsMenu,behavior:n.wu.Open,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.AddSportsMenu,type:n.uH.StructuredData,id:m,brandId:m},type:n.c9.ActionButton,ext:o,zone:r}),j=b.addOrUpdateChild({name:y.SportsItem,behavior:n.wu.Follow,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.SportsItem,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),B=b.addOrUpdateChild({name:y.GoBack,behavior:n.wu.Paginate,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.GoBack,type:n.uH.StructuredData,id:h,brandId:m},type:n.c9.Interaction,ext:o,zone:r}),z=b.addOrUpdateChild({name:y.EditSports,behavior:n.wu.Customize,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:y.EditSports,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),G=b.addOrUpdateChild({name:y.SportsCarousel,behavior:n.wu.View,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),q=b.addOrUpdateChild({name:y.ClickCarouselDot,behavior:n.wu.Paginate,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),V=b.addOrUpdateChild({name:y.SportsNavButton,behavior:n.wu.Show,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),_=b.addOrUpdateChild({name:y.SportsNavList,behavior:n.wu.View,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),W=b.addOrUpdateChild({name:y.ReminderClose,behavior:n.wu.Close,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),Z=b.addOrUpdateChild({name:y.SportsFRE,behavior:n.wu.View,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),J=b.addOrUpdateChild({name:y.FREDone,behavior:n.wu.Complete,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r}),Y=b.addOrUpdateChild({name:y.SportsNavSearchButton,behavior:n.wu.Customize,destinationUrl:"",content:{vertical:y.Vertical,category:u,headline:u,type:n.uH.StructuredData,id:h,brandId:m},ext:o,zone:r});return{componentRoot:e,sportsCard:S,destinations:I,games:A,header:w,actionButton:T,seeMoreLeague:C,seeMoreSports:x,menuMoreSettings:k,menuHideSportsCard:O,menuDislikeSport:$,saveSetting:P,cancelSetting:D,sportsInput:H,previousMatch:F,nextMatch:R,addSports:N,menuAddSports:U,followSports:j,goBack:B,editSports:z,sportsCarousel:G,clickCarouselDot:q,videos:M,sportsNavButton:V,sportsNavList:_,sportsNavSearchButton:Y,reminderClose:W,freExperience:Z,freDone:J,teams:E,menuFeedback:L}},D=(e,t,i,o,a)=>{if(!e||!t)return null;const s=a&&a.zone,r=a&&a.behavior,l=e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:s}),d=t.primaryEntityId,u=t.leagueName,h=t.leagueId,g=t.sportType||c.unknown;let p;switch(i){case C.SuperDesign:p=y.SuperBowlCard;break;case C.MarchMadness:p=y.MarchMadnessCard;break;case C.NFLDraft:p=y.NFLDraft;break;case C.NBAFinals:p=y.NBAFinals;break;case C.NHLFinals:p=y.NHLFinals;break;case C.Articles:p=y.Articles;break;case C.Standings:p=y.Standings;break;default:return null}return l.addOrUpdateChild({name:p,behavior:r||n.wu.View,destinationUrl:t.cardTitleClickthroughUrl,content:{vertical:y.Vertical,category:u,headline:g,type:n.uH.StructuredData,id:h,brandId:d},ext:o,zone:s})};function H(e){const t=null==e?void 0:e.dataType;return t==m.leaderboard||t==m.scheduledTournaments?y.GolfSports:t==h.raceList||t==h.singleRace?y.MotorSports:y.SportsCard}function F(e,t,i){switch(null==e?void 0:e.dataType){case m.leaderboard:return y.GolfParticipantScore;case m.scheduledTournaments:return H(e);case h.singleRace:return t?y.MotorRaceTime:y.MotorRaceScore;case h.raceList:return H(e)}return y.SportsCard}const R=(e,t,i,o,a)=>{if(!e||!t)return null;const s=null!=i?i:"",r=a&&a.zone;return e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:r}).addOrUpdateChild({name:y.ReminderLink,behavior:n.wu.Navigate,content:{headline:t.sportType||c.unknown,vertical:y.Vertical,category:t.name,type:n.uH.StructuredData,id:t.leagueId,brandId:s},overrideDestinationUrl:t.webSearchUrl||(null==a?void 0:a.fallbackUrl),ext:o,zone:r})},N=(e,t,i,o,a)=>{if(!e||!t)return null;const s=null!=i?i:"",r=a&&a.zone;return e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:r}).addOrUpdateChild({name:y.RevertFollow,behavior:n.wu.Follow,content:{headline:t.name,vertical:y.Vertical,category:t.name,type:n.uH.StructuredData,id:t.id,brandId:s},destinationUrl:"",ext:o,zone:r})},U=(e,t,i,o,a,s)=>{if(!e)return null;const r=s&&s.zone;return e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:r}).addOrUpdateChild({name:y.SportsInput,behavior:n.wu.TextSearch,destinationUrl:"",content:{vertical:y.Vertical,category:i,subcategory:t,headline:y.SportsInput,type:n.uH.StructuredData,id:o,brandId:o},type:n.c9.InputBox,ext:a,zone:r})},j=(e,t,i,o,a=!1,s)=>{if(!e||!t)return null;const r=null!=i?i:"",l=s&&s.zone,d=t.sportType||c.unknown,u=e.addOrUpdateChild({name:a?y.AddSports:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:l});return{componentRoot:e,webSearchUrl:u.addOrUpdateChild({name:y.SportsSuggestUrl,behavior:n.wu.Navigate,content:{headline:d,vertical:y.Vertical,category:t.name,type:n.uH.StructuredData,id:t.leagueId,brandId:r},overrideDestinationUrl:t.webSearchUrl||(null==s?void 0:s.fallbackUrl),ext:o,zone:l}),followEntity:u.addOrUpdateChild({name:a?y.FollowSports:y.SportsItem,behavior:n.wu.Follow,content:{headline:t.name,vertical:y.Vertical,category:t.name,type:n.uH.StructuredData,id:t.id,brandId:r},destinationUrl:"",ext:o,zone:l}),unFollowEntity:u.addOrUpdateChild({name:a?y.UnFollowSports:y.SportsItem,behavior:n.wu.Unfollow,content:{headline:t.name,vertical:y.Vertical,category:t.name,type:n.uH.StructuredData,id:t.id,brandId:r},destinationUrl:"",ext:o,zone:l}),navToEntity:u.addOrUpdateChild({name:y.SportsItem,behavior:n.wu.Refresh,content:{headline:t.name,vertical:y.Vertical,category:t.name,type:n.uH.StructuredData,id:t.id,brandId:r},overrideDestinationUrl:t.webSearchUrl,ext:o,zone:l})}},B=(e,t,i,o,a)=>{var s,l,d,u;if(!e||!t)return null;const h=a&&a.zone,g=e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,ext:o,zone:h}),p=P(e,t,i,o);null===(s=p.games)||void 0===s||s.clear();const m=t||[],f=null!==(l=i.primaryEntityId)&&void 0!==l?l:"",v=t.sportType||c.unknown;if((null==t?void 0:t.length)>0&&t[0]&&(null===(d=t[0].sportsMatchData)||void 0===d?void 0:d.gameStateCatetory)===r.preGame&&m.forEach((e=>{const t=g.addOrUpdateChild({name:F(i,!1),behavior:n.wu.Navigate,content:{vertical:y.Vertical,category:H(i),subcategory:i.leagueName,headline:v,type:n.uH.StructuredData,id:e.sportsMatchData.gameId,brandId:f},overrideDestinationUrl:e.sportsMatchData.matchClickthroughUrl||i.headerClickThroughUrl,ext:o,zone:h});p.games.set(e.sportsMatchData.gameId,t)})),(null==t?void 0:t.length)>0&&t[0]&&t[0].sportsMatchData&&(null===(u=t[0].sportsMatchData)||void 0===u?void 0:u.gameStateCatetory)!==r.preGame&&m.length>0){const e=g.addOrUpdateChild({name:m[0].sportsMatchData.gameStateCatetory===r.inprogressGame?F(i,!0):F(i,!1),behavior:n.wu.Navigate,content:{vertical:y.Vertical,category:H(i),headline:v,subcategory:i.leagueName,type:n.uH.StructuredData,id:m[0].sportsMatchData.gameId,brandId:f},overrideDestinationUrl:m[0].sportsMatchData.matchClickthroughUrl||i.headerClickThroughUrl,ext:o,zone:h});p.games.set(m[0].sportsMatchData.gameId,e)}return p},z=(e,t,i,o)=>{if(!e)return null;const a=o&&o.zone,s=e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:a}),r=t&&t.sportsMatchupCardData.primaryEntityId,l=t&&t.sportsMatchupCardData.primaryEntityName,d=t&&t.sportsMatchupCardData.leagueName,c=y.PopupHideSport;return{componentRoot:e,hidePopupView:s.addOrUpdateChild({name:y.PopupHideSport,behavior:n.wu.View,content:{headline:y.PopupHideSport,vertical:y.Vertical,category:c,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),changeLeagueTeam:s.addOrUpdateChild({name:y.ChangeLeagueTeam,behavior:n.wu.Customize,content:{headline:y.ChangeLeagueTeam,vertical:y.Vertical,category:c,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),feedback:s.addOrUpdateChild({name:y.Feedback,behavior:n.wu.Paginate,content:{headline:y.Feedback,vertical:y.Vertical,category:c,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),popupHideSport:s.addOrUpdateChild({name:y.PopupHide,behavior:n.wu.Hide,content:{headline:y.PopupHide,vertical:y.Vertical,category:c,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),popupCancel:s.addOrUpdateChild({name:y.PopupCancel,behavior:n.wu.Cancel,content:{headline:y.PopupCancel,vertical:y.Vertical,category:c,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),popupClose:s.addOrUpdateChild({name:y.PopupClose,behavior:n.wu.Close,content:{headline:y.PopupClose,vertical:y.Vertical,category:c,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),menuDislikeSport:s.addOrUpdateChild({name:y.DislikeSports,behavior:n.wu.Dislike,destinationUrl:"",content:{vertical:y.Vertical,category:d,headline:y.DislikeSports,type:n.uH.StructuredData,id:r,brandId:r},type:n.c9.ActionButton,ext:i,zone:a})}},G=(e,t,i,o)=>{if(!e)return null;const a=o&&o.zone,s=e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:a}),r=t&&t.sportsMatchupCardData.primaryEntityId,l=t&&t.sportsMatchupCardData.primaryEntityName,d=y.HideReminder;return{componentRoot:e,reminderView:s.addOrUpdateChild({name:y.HideReminder,behavior:n.wu.View,content:{headline:y.HideReminder,vertical:y.Vertical,category:d,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),reminderSetting:s.addOrUpdateChild({name:y.HideReminderSetting,behavior:n.wu.Paginate,content:{headline:y.HideReminderSetting,vertical:y.Vertical,category:d,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),reminderManageCard:s.addOrUpdateChild({name:y.HideReminderManageCard,behavior:n.wu.Paginate,content:{headline:y.HideReminderManageCard,vertical:y.Vertical,category:d,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),reminderRefreshFeed:s.addOrUpdateChild({name:y.HideReminderRefreshFeed,behavior:n.wu.Refresh,content:{headline:y.HideReminderRefreshFeed,vertical:y.Vertical,category:d,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a})}},q=(e,t,i,o)=>{if(!e)return null;const a=o&&o.zone,s=e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:a}),r=t&&t.sportsMatchupCardData.primaryEntityId,l=t&&t.sportsMatchupCardData.primaryEntityName,d=y.SportsFeedback;return{componentRoot:e,feedbackView:s.addOrUpdateChild({name:y.SportsFeedback,behavior:n.wu.View,content:{headline:y.SportsFeedback,vertical:y.Vertical,category:d,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),sendFeedback:s.addOrUpdateChild({name:y.SendFeedback,behavior:n.wu.Report,content:{headline:y.SendFeedback,vertical:y.Vertical,category:d,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),cancelFeedback:s.addOrUpdateChild({name:y.CancelFeedback,behavior:n.wu.Cancel,content:{headline:y.CancelFeedback,vertical:y.Vertical,category:d,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a}),closeFeedback:s.addOrUpdateChild({name:y.CloseFeedback,behavior:n.wu.Close,content:{headline:y.CloseFeedback,vertical:y.Vertical,category:d,type:n.uH.StructuredData,id:l,brandId:r},ext:i,zone:a})}},V=(e,t,i,o)=>{if(!e||!t||!t.sportsMatchupCardData)return null;const a=o&&o.zone,s=e.addOrUpdateChild({name:y.SportsCard,action:n.Aw.View,type:n.c9.Module,zone:a}),r=t.sportsMatchupCardData,l=r.primaryEntityId,d=r.leagueName||y.SportsFRE,u=r.leagueId||y.SportsFRE,h=r.sportType||c.unknown,g=new Map;t.articleData&&t.articleData.articles&&t.articleData.articles.length>0&&t.articleData.articles.forEach((e=>{if(!e||!e.articleId)return;const t=s.addOrUpdateChild({name:y.SportsArticle,behavior:n.wu.Navigate,destinationUrl:e.articleUrl,overrideDestinationUrl:e.articleUrl,content:{vertical:y.Vertical,category:d,headline:h,type:n.uH.StructuredData,id:u,brandId:l},ext:i,zone:a});g.set(e.articleId,t)}));return{componentRoot:e,articles:g}};function _(e){return!!e&&("cricket"===e.toLowerCase()||"tennis"===e.toLowerCase())}function W(e){return e===$}function Z(e,t=2){if(!e||e.length<2)return e;let i=e.filter((e=>e.sportsMatchData.gameStateCatetory==r.inprogressGame)),n=e.filter((e=>e.sportsMatchData.gameStateCatetory==r.preGame)),o=e.filter((e=>e.sportsMatchData.gameStateCatetory!=r.inprogressGame&&e.sportsMatchData.gameStateCatetory!=r.preGame));const a=(new Date).getTime();i=i&&i.sort(((e,t)=>a-e.sportsMatchData.gameStartDateTime-(a-t.sportsMatchData.gameStartDateTime)))||[],n=n&&n.sort(((e,t)=>e.sportsMatchData.gameStartDateTime-t.sportsMatchData.gameStartDateTime))||[],o=o&&o.sort(((e,t)=>t.sportsMatchData.gameStartDateTime-e.sportsMatchData.gameStartDateTime))||[];const s=i.length,l=n.length,d=o.length;switch(s){case 0:return 0==l?o:1==l?n.concat(o):d>0?n.slice(0,t).concat(o).concat(n.slice(t)):n;case 1:return 0==l?i.concat(o):1==l?n.concat(i).concat(o):d>0?n.slice(0,1).concat(i).concat(o).concat(n.slice(1)):n.slice(0,t).concat(i).concat(n.slice(t));case 2:return 0==l?i.concat(o):d>0?n.slice(0,1).concat(i).concat(o).concat(n.slice(1)):n.slice(0,1).concat(i).concat(n.slice(1));default:return i.concat(n).concat(o)}}function J(e){if(!e||e.length<2)return{todayMatches:e||[],preGameMatches:[],finalMatches:[]};const t=(new Date).getTime(),i=e.filter((e=>e.sportsMatchData.gameStateCatetory==r.inprogressGame||!e.sportsMatchData.gameStateCatetory&&e.sportsMatchData.cricketGameCategory))||[];let n=e.filter((e=>e.sportsMatchData.gameStateCatetory&&e.sportsMatchData.gameStateCatetory!=r.inprogressGame&&Y(t,e.sportsMatchData.gameStartDateTime)));n=(null==n?void 0:n.sort(((e,t)=>e.sportsMatchData.gameStateCatetory==r.preGame&&t.sportsMatchData.gameStateCatetory==r.preGame?e.sportsMatchData.gameStartDateTime-t.sportsMatchData.gameStartDateTime:e.sportsMatchData.gameStateCatetory==r.preGame||t.sportsMatchData.gameStateCatetory==r.preGame?e.sportsMatchData.gameStateCatetory==r.preGame?-1:1:t.sportsMatchData.gameStartDateTime-e.sportsMatchData.gameStartDateTime)))||[];const o=i.concat(n);let a=e.filter((e=>e.sportsMatchData.gameStateCatetory==r.preGame&&!Y(t,e.sportsMatchData.gameStartDateTime)));a=(null==a?void 0:a.sort(((e,t)=>e.sportsMatchData.gameStartDateTime-t.sportsMatchData.gameStartDateTime)))||[];let s=e.filter((e=>e.sportsMatchData.gameStateCatetory&&e.sportsMatchData.gameStateCatetory!=r.inprogressGame&&e.sportsMatchData.gameStateCatetory!=r.preGame&&!Y(t,e.sportsMatchData.gameStartDateTime)));return s=(null==s?void 0:s.sort(((e,t)=>t.sportsMatchData.gameStartDateTime-e.sportsMatchData.gameStartDateTime)))||[],{todayMatches:o,preGameMatches:a,finalMatches:s}}function Y(e,t){return new Date(e).getDate()===new Date(t).getDate()&&Math.abs(e-t)<864e5}function K(e){return e.sort(((e,t)=>e.sportsMatchData.gameStartDateTime-t.sportsMatchData.gameStartDateTime))}function X(e){return(0,o.TF)(e)?c.unknown:Q(e.split("_")[0])}function Q(e){if(!e)return c.unknown;const t=c[e.toLowerCase()];return t||c.unknown}},22938:function(e,t,i){"use strict";i.d(t,{d:function(){return n}});var n,o=i(33940),a=i(2314),s=i(36803),r=i(9375),l=i(16517),d=i(58155),c=i(46336),u=i(54804),h=i(67267),g=i(87298),p=i(63535),m=i(26415),f=i(68364),v=i(36068),y=i(17157),b=i(59207),S=i(96345),w=i(53909),T=i(11708),C=i(33799),x=i(65135),k=i(51671),$=i(85663),O=i(99478),L=i(95378),I=i(791);!function(e){e.sportsApi="https://api.sports.microsoft.com/SportsReco/v1/SportsRecommendation?apikey=be5b9e52150e49f1b58fafff97d11487",e.recordPollApi="https://api.msn.com/sports/RecordPollRequest/";const t="graph/actions",i="Peregrine",n={width:32,height:32,enableDpiScaling:!1,format:w.D3.PNG};let A,E;const M=e=>JSON.stringify((0,L.Z)(e,"Authorization"));function P(e,i,n,s,d=null,c=!1,u=null){return(0,o.mG)(this,void 0,void 0,(function*(){if((0,O.TF)(e))return null;const f=n===a.Us.Follow?`sid:${e}`:e,v={Title:i,Sid:e},y={method:"POST",body:JSON.stringify({actionType:n,targetId:f,targetType:n===a.Us.Follow?null:s,metadata:v}),headers:yield h.$.getOneServiceHeaders()};R()&&(y.credentials="include");const b=(0,p.PH)(t);let S;(yield F(d,c)).forEach((e=>e.value&&b.searchParams.set(e.key,e.value))),u&&u.forEach((e=>e.value&&b.searchParams.set(e.key,e.value)));try{return S=yield(0,g.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){const e=yield fetch(b.href,y);if(!e||e.status>=400){const t=`POST action error. Status: ${null==e?void 0:e.status} for actionType: ${n}, targetId: ${f}, targetType: ${s}.`;if(400==(null==e?void 0:e.status)){const e=(null==y?void 0:y.headers)&&(0,r.GI)(y.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.tFh),{message:"POST action 400 error",pb:Object.assign(Object.assign({},m.tFh.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:b.href,requestHeaders:e&&M(e)},customMessage:t})}))}throw new Error(t)}return null==e?void 0:e.json()}))),`postCardAction${n}`),yield S}catch(e){const t=(null==y?void 0:y.headers)&&(0,r.GI)(y.headers);return x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.yOL),{message:"Error while POST action for card interest",pb:Object.assign(Object.assign({},m.zl4.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:b.href,requestHeaders:t&&M(t)},customMessage:`Error while POST action for card interest: URL: ${b.href} Params: ${y.body} Error: ${e&&e.message}`})})),null}return S}))}function D(e=null,i=null,n=null){return(0,o.mG)(this,void 0,void 0,(function*(){const s=yield function(e=null,i=null,n=null){return(0,o.mG)(this,void 0,void 0,(function*(){const a={method:"GET",headers:yield h.$.getOneServiceHeaders()};R()&&(a.credentials="include");const s=(0,p.PH)(t);(yield F(e,(0,$.isNullOrUndefined)(e))).forEach((e=>e.value&&s.searchParams.set(e.key,e.value))),n&&n.forEach((e=>e.value&&s.searchParams.set(e.key,e.value))),s.searchParams.set("$top","100");const d=i?`${s.href}&$filter=actionType+eq+'${i}'`:s.href;let c;try{return c=yield(0,g.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){const e=yield fetch(d,a);if(!e||e.status>=400){const t=`getActionRequest OneService returned error response. Status: ${null==e?void 0:e.status}`;throw new Error(t)}return null==e?void 0:e.json()}))),"getCardAction"),yield c}catch(e){const t=(null==a?void 0:a.headers)&&(0,r.GI)(a.headers);return x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.yOL),{message:"Error while GET action for card interest",pb:Object.assign(Object.assign({},m.zl4.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:d,requestHeaders:t&&M(t)},customMessage:`Error while GET action for card interest: URL: ${d} Params: ${a.body} Error: ${e&&e.message}`})})),null}}))}(e,i,n);s&&s.value&&s.value.length?function(e){if(!e)return;A=[],E=[];const t=e.filter((e=>null!=e&&0===e.actionType.localeCompare(a.Us.Dislike,void 0,{sensitivity:"accent"})&&(0===e.targetType.localeCompare(a.fs.League,void 0,{sensitivity:"accent"})||0===e.targetType.localeCompare(a.fs.Team,void 0,{sensitivity:"accent"})))),i=e.filter((e=>{var t;return null!=e&&0===e.actionType.localeCompare(a.Us.Follow,void 0,{sensitivity:"accent"})&&((null===(t=e.targetId)||void 0===t?void 0:t.startsWith("Y_"))||"TagBase"==e.targetType)}));t.length>0&&t.forEach((e=>{e.metadata&&e.metadata.Title&&A.push({id:e.targetId,name:e.metadata.Title,type:e.targetType})}));i.length>0&&i.slice(0,200).forEach((e=>{var t,i;E.push({id:(null===(t=e.metadata)||void 0===t?void 0:t.Sid)||"",yId:e.targetId,name:null===(i=e.metadata)||void 0===i?void 0:i.Title,type:e.targetType,feedId:e.targetId})}))}(s.value):s&&(A=[],E=[])}))}function H(e,i,n,a=null,s=!1){return(0,o.mG)(this,void 0,void 0,(function*(){if((0,O.TF)(e))return null;const d=e,c={method:"DELETE",headers:yield h.$.getOneServiceHeaders()};R()&&(c.credentials="include");const u=(0,p.PH)(t);(yield F(a,s)).forEach((e=>e.value&&u.searchParams.set(e.key,e.value)));const f=`${u.href}&$filter=actionType+eq+'${i}'+and+targetId+eq+'${d}'+and+targetType+eq+'${n}'`;let v;try{return v=yield(0,g.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){const e=yield fetch(f,c);if(e.status>=400){const t=`DELETE action error. Status: ${e.status} for actionType: ${i}, targetId: ${d}, targetType: ${n}.`;if(400==e.status){const e=(null==c?void 0:c.headers)&&(0,r.GI)(c.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.tFh),{message:"DELETE action 400 error",pb:Object.assign(Object.assign({},m.tFh.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:u.href,requestHeaders:e&&M(e)},customMessage:t})}))}throw new Error(t)}return e}))),`deleteCardAction${i}`),yield v}catch(e){const t=(null==c?void 0:c.headers)&&(0,r.GI)(c.headers);return x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.yOL),{message:"Error while DELETE action for card interest",pb:Object.assign(Object.assign({},m.zl4.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:u.href,requestHeaders:t&&M(t)},customMessage:`Error while DELETE action for card interest: URL: ${f} Params: ${c.body} Error: ${e&&e.message}`})})),null}return v}))}function F(e=null,t=!0){return(0,o.mG)(this,void 0,void 0,(function*(){return R()?h.$.getOneServiceParamsWithAuth((0,l.Yq)().UserId||(0,l.Yq)().ActivityId,e||i,t):h.$.getOneServiceParamsWithoutAuth((0,l.Yq)().UserId||(0,l.Yq)().ActivityId,e||i,t)}))}function R(){return(0,o.mG)(this,void 0,void 0,(function*(){return!!u.Al.UserIsSignedIn||(yield(0,k.XJ)())===C.Hy.SignedIn}))}function N(e){const t="undefined"!=typeof window&&(0,y.wq)()&&(0,b._4)(),i=t?t.market||"en-us":(0,l.Yq)().CurrentMarket||"en-us",n=t?t.anid:(0,l.Yq)().UserId,o=t?t.latitude:(0,l.Yq)().Latitude,a=t?t.longitude:(0,l.Yq)().Longitude;e.set("market",i),(0,O.TF)(n)||e.set("user",n),o&&a&&(e.set("lat",o),e.set("long",a))}e.fetchSports=function(){return(0,o.mG)(this,void 0,void 0,(function*(){const t=e.sportsApi;if((0,s.R)(t)){const e=new URL(t),i=yield h.$.getBaseRequestData("GET");N(e.searchParams);try{const t=yield(0,g.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){const t=yield fetch(decodeURIComponent(e.href),i);if(!t||!t.ok){const n=(null==i?void 0:i.headers)&&(0,r.GI)(i.headers);throw x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.v3e),{message:"Error while calling fetch for sports data ",pb:Object.assign(Object.assign({},m.v3e.pb),{fetchNetworkResponse:{statusCode:null==t?void 0:t.status,statusText:null==t?void 0:t.statusText,activityId:(0,l.Yq)().ActivityId,requestUrl:e.href,requestHeaders:n&&M(n)},customMessage:`URL: ${e.href}, responseMessage: ${JSON.stringify(t)}`})})),Error(t.statusText)}return t}))),"FetchSports");return yield null==t?void 0:t.json()}catch(t){const n=(null==i?void 0:i.headers)&&(0,r.GI)(i.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.zl4),{message:"Error while request sports data with exception.",pb:Object.assign(Object.assign({},m.zl4.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:e.href,requestHeaders:n&&M(n)},customMessage:`Error: ${t&&t.message} URL: ${e.href}`})}))}}}))},e.fetchSportsFeed=function(e=null,t=null,i=!1,n=!0,a=!1,s=null){return(0,o.mG)(this,void 0,void 0,(function*(){const u=e;if(!(0,O.TF)(u)){let e,p;try{if(e=new URL(u),!e||!d.c.isValidUrl(e.href,!0))return}catch(e){return void x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.zl4),{message:"Error while request sports feed data with URL exception.",pb:Object.assign(Object.assign({},m.zl4.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:u},customMessage:`Error while request sports feed data with URL exception: ${e&&e.message} URL: ${u}`})}))}if(n){p=yield h.$.getBaseRequestData("GET"),N(e.searchParams);(yield F(t,i)).forEach((t=>t.value&&e.searchParams.set(t.key,t.value)))}if(s&&s.length&&s.forEach((t=>{t.value&&e.searchParams.set(t.key,t.value)})),a){const t="undefined"!=typeof window&&(0,y.wq)()&&(0,b._4)(),i=(t?t.market:(0,l.Yq)().CurrentMarket)||(0,l.Yq)().CurrentMarket;e.searchParams.set("market",i||"en-us")}try{const t=yield(0,g.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){if((0,y.wq)()){const t=yield(0,S.FM)({url:decodeURIComponent(e.href),refresh:!0,processError:!0});try{return{json:()=>(0,c.dW)(t)}}catch(i){const n=(null==p?void 0:p.headers)&&(0,r.GI)(p.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.v3e),{message:"Error while calling fetch sports feed data from super app bridge",pb:Object.assign(Object.assign({},m.v3e.pb),{fetchBridgeResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:e.href,requestHeaders:n&&M(n)},customMessage:`Error while calling fetch sports feed data from super app bridge: URL: ${e.href}, responseMessage: ${JSON.stringify(t)}`})}))}}const t=yield fetch(decodeURIComponent(e.href),n?p:null);if(t&&t.ok)return t;{const i=(null==p?void 0:p.headers)&&(0,r.GI)(p.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.v3e),{message:"Error while calling fetch sports feed data.",pb:Object.assign(Object.assign({},m.v3e.pb),{fetchNetworkResponse:{statusCode:null==t?void 0:t.status,statusText:null==t?void 0:t.statusText,activityId:(0,l.Yq)().ActivityId,requestUrl:e.href,requestHeaders:i&&M(i)},customMessage:`Error while calling fetch sports feed data: URL: ${e.href}, responseMessage: ${t&&JSON.stringify(t)}`})}))}}))),"FetchSportsFeed");return yield null==t?void 0:t.json()}catch(t){const i=(null==p?void 0:p.headers)&&(0,r.GI)(p.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.zl4),{message:"Error while request sports feed data with exception.",pb:Object.assign(Object.assign({},m.zl4.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:e.href,requestHeaders:i&&M(i)},customMessage:`Error while request sports feed data with exception: ${t&&t.message} URL: ${e.href}`})}))}}}))},e.hideSportsCard=function(){return(0,o.mG)(this,void 0,void 0,(function*(){try{return yield I.N.updateSegmentCardsEnableStatus([{cardType:T.f.SportsCard,enabled:!1}]),!0}catch(e){return(0,f.OO)(e,m.TmC,"Sports card settings save failed while hide sports card."),!1}}))},e.notInterestedSportsCard=function(e,t=null,i=!1){return(0,o.mG)(this,void 0,void 0,(function*(){if(!e||(0,O.TF)(e.id))return!1;try{return null!=(yield P(e.id,e.name,a.Us.Dislike,e.type||"",t,i))}catch(t){return(0,f.OO)(t,m.TmC,"Sports card settings save failed while remove dislike",`sports card id: ${e.id}, type: ${e.type}`),!1}}))},e.removeDislikeSportsCard=function(e,t=null,i=!1){return(0,o.mG)(this,void 0,void 0,(function*(){if(!e||(0,O.TF)(e.id))return!1;try{const n=yield H(e.id,a.Us.Dislike,e.type||a.fs.League,t,i);return A=null,E=null,null!=n}catch(t){return(0,f.OO)(t,m.TmC,"Sports card settings save failed while remove dislike",`sports card id: ${e.id}, type: ${e.type}`),!1}}))},e.getDislikeSportsEntities=function(e,t=null){D(t,a.Us.Dislike).then((()=>{A&&e(A)}))},e.getFollowSportsEntities=function(e,t=null,i){D(e,a.Us.Follow,t).then((()=>{E&&i(E)}))},e.fetchSuggestions=function(t,i,s=null,r=!1){return(0,o.mG)(this,void 0,void 0,(function*(){const o=i.replace("{searchText}",t),d=(0,l.Yq)().CurrentMarket||"en-us",c=[];return yield e.fetchSportsFeed(o,s,r,!1,!0).then((e=>e?e.length||e.suggestionGroups&&e.suggestionGroups.length&&e.suggestionGroups[0].searchSuggestions&&e.suggestionGroups[0].searchSuggestions.length?void(e&&!e.suggestionGroups?function(e,t,i){let o=0;for(let s=0;s<e.length;s++){const r=e[s];if(r){let e=r.requery;e=e&&(e.startsWith("/")?e:`/${e}`);const s=r.thumbnailId;let l=(0,v.nB)(s,n,!0);l=l&&l.startsWith("//")?`https:${l}`:l,t.push({index:o++,id:r.satoriId,yId:r.yId,name:r.originalName,type:r.dataType,sportType:(0,a.x5)(r.sportWithLeagueId),leagueId:r.sportWithLeagueId,displayText:r.displayText,typeDisplayHint:r.dataType,webSearchUrl:e&&`https://${(0,v.FD)(i)}/${i}${e}`,imageUrl:l})}}}(e,c,d):function(e,t,i){let o=0;e.forEach((e=>{var s,r,l,d;if((null===(r=null===(s=e.entityPresentationInfo)||void 0===s?void 0:s.formattedFacts)||void 0===r?void 0:r.length)&&(null===(d=null===(l=e.entityPresentationInfo)||void 0===l?void 0:l.formattedFacts[0].items)||void 0===d?void 0:d.length)&&e.contractualRules.length){let s=e.richContent&&e.richContent.length&&e.richContent[0].webSearchUrl;s=s&&(s.startsWith("/")?s:`/${s}`);const r=e.richContent&&e.richContent.length&&e.richContent[0].screenshot&&e.richContent[0].screenshot.imageId;let l=(0,v.nB)(r,n,!0);l=l&&l.startsWith("//")?`https:${l}`:l;const d=e.entityPresentationInfo.formattedFacts,c=d&&d.length||0;t.push({index:o++,id:c>0?d[0].items&&d[0].items[0].text:null,yId:c>1?d[1].items&&d[1].items[0].text:null,name:e.displayText,type:e.contractualRules[0].targetPropertyName,sportType:(0,a.x5)(e.sportWithLeagueId),leagueId:e.sportWithLeagueId,displayText:e.displayText,typeDisplayHint:e.entityPresentationInfo.entityTypeDisplayHint,webSearchUrl:s&&`https://${(0,v.FD)(i)}/${i}${s}`,imageUrl:l})}}))}(e.suggestionGroups[0].searchSuggestions,c,d)):((0,f.H)(m.L9E,"Fetch sports suggestion get empty groups.",`market=${d}, input:${t}, searchUrl:${o}`),c):((0,f.H)(m.L9E,"Fetch sports suggestion get null response.",`market=${d}, input:${t}, searchUrl:${o}`),c))),c}))},e.postActionRecordPollRequest=function(t,i,n=null,a=null,s=null,d=!1,c=null){return(0,o.mG)(this,void 0,void 0,(function*(){if((0,O.TF)(t)||(0,$.isNullOrUndefined)(i))return null;const u=new URL(e.recordPollApi),p=(0,l.Yq)().UserId,f={};f.UserId=p.split("-")[1],p.startsWith("m-")?f.UserType="MUID":f.UserType="ANID";const v={method:"POST",body:JSON.stringify({Market:"EN-IN",PartnerName:"BingSports",PollID:i,OptionId:t,User:f}),headers:yield h.$.getOneServiceHeaders()};R()&&(v.credentials="include");let y;(yield F(s,d)).forEach((e=>e.value&&u.searchParams.set(e.key,e.value))),c&&c.forEach((e=>e.value&&u.searchParams.set(e.key,e.value)));try{return y=yield(0,g.w)((()=>(0,o.mG)(this,void 0,void 0,(function*(){const e=yield fetch(u.href,v);if(!e||e.status>=400){const t=`POST action error. Status: ${null==e?void 0:e.status} for actionType: ${n}, targetType: ${a}.`;if(400==(null==e?void 0:e.status)){const e=(null==v?void 0:v.headers)&&(0,r.GI)(v.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.tFh),{message:"POST action 400 error",pb:Object.assign(Object.assign({},m.tFh.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:u.href,requestHeaders:e&&M(e)},customMessage:t})}))}throw new Error(t)}return null==e?void 0:e.json()}))),`postCardAction${n}`),yield y}catch(e){const t=(null==v?void 0:v.headers)&&(0,r.GI)(v.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.yOL),{message:"Error while POST action for card interest",pb:Object.assign(Object.assign({},m.zl4.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:u.href,requestHeaders:t&&M(t)},customMessage:`Error while POST action for card interest: URL: ${u.href} Params: ${v.body} Error: ${e&&e.message}`})}))}return y}))},e.postActionRequest=P,e.deleteActionRequest=H,e.updateUserSettings=function(e,t=null,i=null,n=!1){return(0,o.mG)(this,void 0,void 0,(function*(){if(e){const o=(0,p.PH)("msn/user"),a={method:"POST",body:JSON.stringify(e),headers:yield h.$.getOneServiceHeaders()};R()&&(a.credentials="include");(yield F(i,n)).forEach((e=>e.value&&o.searchParams.set(e.key,e.value))),t&&t.forEach((e=>e.value&&o.searchParams.set(e.key,e.value)));try{const e=yield fetch(o.href,a);if(e.status>=400){const t=`OneService returned error response for Update user settings. Status: ${e.status}`;throw new Error(t)}}catch(t){const i=(null==a?void 0:a.headers)&&(0,r.GI)(a.headers);x.M0.sendAppErrorEvent(Object.assign(Object.assign({},m.TmC),{message:"Update user settings error",pb:Object.assign(Object.assign({},m.zl4.pb),{fetchNetworkResponse:{activityId:(0,l.Yq)().ActivityId,requestUrl:o.href,requestHeaders:i&&M(i)},customMessage:`Update user settings error: URL: ${o.href} Params: ${a.body} UserSettings: ${JSON.stringify(e)} Error:${t&&t.message}`})}))}}}))}}(n||(n={}))},36068:function(e,t,i){"use strict";i.d(t,{FD:function(){return f},IO:function(){return $},Sb:function(){return S},Sz:function(){return g},UP:function(){return p},Uq:function(){return T},Xy:function(){return b},a7:function(){return C},h2:function(){return m},iq:function(){return O},jY:function(){return w},n$:function(){return L},nB:function(){return y},pc:function(){return h},wj:function(){return k},xx:function(){return v},z3:function(){return x}});var n=i(53909),o=i(16517),a=i(9375),s=i(17157),r=i(59207),l=i(99478),d=i(65135),c=i(38156);const u="BB1dV8FG";function h(){let e,t=null;return(0,s.wq)()&&(t=(0,r._4)()),e=t?t.market:o.jG.CurrentMarket,e||"en-us"}function g(e,t,i){if(!(i&&e&&t&&i[e]))return null;if(t in i[e])return i[e][t];const n=t?t.substr(0,2):"en";return i[e][n]?i[e][n]:i[e].en}function p(e){if(!e||!e.length||e.includes("ocid="))return e;const t=(0,a.ku)();return t?e+`?ocid=${t}`:e}const m=(e,t,i=null,n=!1,o=!0,a=!0)=>{if(t){let s=o?p(t):t;if(s=a?function(e){if(!e||!e.length)return e;try{const t=new RegExp("cvid=([^&]?)+").exec(e);if(t&&"cvid="!==t[0])return e;const i=new URL(e),n=d.M0.getRequestId();return n&&i.searchParams.set("cvid",n),i.toString()}catch(t){return e}}(s):s,e){e.preventDefault(),e.stopPropagation();const t=i||e.currentTarget,n="keydown"===e.type||"keypress"===e.type||"keyup"===e.type?c.Aw.KeyPress:c.Aw.Click;d.M0.sendActionEvent(t,n,c.wu.Navigate,s)}window.open(s,n?"_self":"_blank")}};function f(e){return"zh-cn"===e?"www.msn.cn":"www.msn.com"}function v(e,t,i=!1){return(0,l.TF)(e)?i?(0,n.zz)(u,t):null:e.indexOf(".")>0?(0,n.mL)(`${n.q3}?id=${e}&pid=MSports`,t):(0,n.zz)(e,t)}function y(e,t,i=!1){return(0,l.TF)(e)?i?(0,n.zz)(u,t):null:(0,n.mL)(`${n.q3}?id=${e}&pid=MSports`,t)}function b(e,t,i=!1){return(0,l.TF)(e)?i?(0,n.zz)(u,t):null:(0,n.mL)(e,t)}function S(e="",t=40,i=40,n=!1){return e?e.replace(/w=([\d]*)?&h=([\d]*)?/,`w=${n?i+20:i}&h=${n?t+20:t}`):null}function w(e){return!!e&&("cricket"===e.toLowerCase()||"tennis"===e.toLowerCase())}function T(e,t=""){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)?e:t}const C=(e,t=1)=>{const[i,n,o]=e.match(/\w\w/g).map((e=>parseInt(e,16)));return`rgba(${i},${n},${o},${t})`};function x(e){if("string"==typeof e){if(e&&!(0,l.TF)(e)){return/^\s*(true|1)\s*$/i.test(e.toLowerCase())}return!1}return"boolean"==typeof e&&e}function k(e){return!!e&&"cricket"===e.toLowerCase()}function $(e,t,i){if((0,l.TF)(e)||!i||(0,l.TF)(i.secondAgo)||(0,l.TF)(i.minuteAgo)||(0,l.TF)(i.hourAgo)||(0,l.TF)(i.dayAgo))return e;const n=Date.parse(e);if(isNaN(n))return e;const o=Date.now(),a=Math.trunc((o-n)/1e3);if(a>0&&a<60)return 1===a?`${a} ${i.secondAgo}`:`${a} ${i.secondsAgo}`;const s=Math.trunc(a/60);if(s>0&&s<60)return 1===s?`${s} ${i.minuteAgo}`:`${s} ${i.minutesAgo}`;const r=Math.trunc(s/60);if(r>0&&r<24)return 1===r?`${r} ${i.hourAgo}`:`${r} ${i.hoursAgo}`;const d=Math.trunc(r/24);return d>0&&d<7?1===d?`${d} ${i.dayAgo}`:`${d} ${i.daysAgo}`:new Date(e).toLocaleDateString(t)}function O(e){const t=Date.now();if(e<=t)return{days:0,hours:0,minutes:0,seconds:0};const i=e-t;return{days:Math.floor(i/864e5),hours:Math.floor(i%864e5/36e5),minutes:Math.floor(i%36e5/6e4),seconds:Math.floor(i%6e4/1e3)}}function L(e){return!e||"object"==typeof e&&0===Object.keys(e).length}},66925:function(e,t,i){"use strict";i.d(t,{h:function(){return s}});var n=i(65135),o=i(68364),a=i(26415);class s{static renderToast(e){this.renderToastCallback?this.renderToastCallback(e):n.M0.sendAppErrorEvent((0,o.Tr)(a.PMq,"Undefined toast render callback function"))}static setRenderToastCallback(e){this.renderToastCallback=e,this.readyResolveFn()}static expireToast(e){this.expireToastCallback?this.expireToastCallback(e):n.M0.sendAppErrorEvent((0,o.Tr)(a.hxo,"Undefined toast expire callback function"))}static setExpireToastCallback(e){this.expireToastCallback=e}static setCurrentToast(e,t){this.currentToastId!==e&&(this.currentToastId=e,this.renderToastCallback=t,this.currentToastIdChangeCallbacks.forEach((t=>t(e))),this.renderToast())}static addCurrentToastIdChangeCallback(e){e&&this.currentToastIdChangeCallbacks.push(e)}}s.ready=new Promise((e=>s.readyResolveFn=e)),s.currentToastIdChangeCallbacks=[]},85334:function(e,t,i){"use strict";var n;i.d(t,{p:function(){return n}}),function(e){e.Save="Save",e.Unsave="Unsave",e.Mute="Mute",e.Follow="Follow",e.Unfollow="Unfollow",e.InterestFailure="InterestFailure",e.ShowMore="ShowMore",e.ShowFewer="ShowFewer",e.Hide="Hide",e.DisableNotification="DisableNotification",e.EnableNotification="EnableNotification",e.RecommendedInterestsFailure="RecommendedInterestsFailure",e.Refresh="Refresh",e.Pin="Pin",e.Unpin="Unpin",e.HideTopic="HideTopic",e.UnhideTopic="UnhideTopic",e.HideSource="HideSource",e.UnhideSource="UnhideSource",e.WindowsInformation="WindowsInformation",e.Error="Error",e.Default="Default",e.ConnectionError="ConnectionError",e.Fre="Fre",e.TuneYourFeed="TuneYourFeed"}(n||(n={}))},57391:function(e,t,i){"use strict";i.d(t,{c:function(){return y}});var n=i(33940),o=i(88352),a=i(16517),s=i(63535),r=i(67267),l=i(87298),d=i(17157),c=i(28687),u=i(59207),h=i(96345),g=i(26415),p=i(33799),m=i(82855),f=i(51671),v=i(44070);class y{constructor(e,t){this.fetchImpl=e,this.handleAppErrorEventCall=t,this.endPoint="msn/suggestions",this.servicdeOcid="feeds"}getSuggestedInterests(e,t,i){return(0,n.mG)(this,void 0,void 0,(function*(){if(o.b.isNullOrWhiteSpace(e))return[];const n=e.trim(),a=yield this.getRequestInit(),r=[...yield this.getCommonParams(this.servicdeOcid),{key:"qscope",value:"news"},{key:"q",value:n},{key:"Type",value:i||"provider,bingtopic,category"},{key:"$top",value:String(t)}],l=(0,s.PH)(this.endPoint);return r.forEach((e=>e.value&&l.searchParams.set(e.key,e.value))),yield this.fetchSuggestionItems(l,a)}))}getSuggestedInterestsAndSources(e,t,i){return(0,n.mG)(this,void 0,void 0,(function*(){if(o.b.isNullOrWhiteSpace(e))return[];const n=e.trim(),a=yield this.getRequestInit(),r=[...yield this.getCommonParams(this.servicdeOcid),{key:"qscope",value:"news"},{key:"q",value:n},{key:"kind",value:(null==i?void 0:i.kind)||"topic"},{key:"subKind",value:(null==i?void 0:i.subKind)||"bingtopic,category"},{key:"$top",value:String(t)}],l=(0,s.PH)(`v1/${this.endPoint}`);return r.forEach((e=>e.value&&l.searchParams.set(e.key,e.value))),yield this.fetchSuggestionItems(l,a)}))}fetchSuggestionItems(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i=yield this.sendRequest(decodeURIComponent(e.href),t);if(!i)return null;let n=null;try{n=i.value[0].groups[0].suggestionItems}catch(e){this.handleAppErrorEventCall(g.j4V.ErrorResponseFromOneServiceIsInvalid)}return(0,v.Z)(n,"id")}))}getRequestInit(e=null){return(0,n.mG)(this,void 0,void 0,(function*(){return null==e&&(e={method:"GET"}),(yield(0,f.XJ)())===p.Hy.SignedIn&&(e.credentials="include"),e.headers=(0,d.wq)()?yield(0,c.dG)():yield r.$.getOneServiceHeaders(),e}))}getCommonParams(e){return(0,n.mG)(this,void 0,void 0,(function*(){if((0,d.wq)())return this.getSapphireQueryParams();return(yield(0,f.XJ)())===p.Hy.SignedIn?r.$.getOneServiceParamsWithAuth(a.jG.UserId,e):r.$.getOneServiceParamsWithoutAuth(a.jG.UserId,e)}))}getSapphireQueryParams(){const e=r.$.getOneServiceNonDynamicParamsWithoutAuth(this.servicdeOcid),t=(0,u._4)();if(t){e.push({key:"market",value:t.market});const i=(0,m.rU)(t.features,a.jG.HasFlightsOverriden);i&&e.push({key:"fdhead",value:i}),e.push({key:"activityId",value:t.activityId}),t.latitude&&t.longitude&&e.push({key:"location",value:`${t.latitude}|${t.longitude}`})}return e}sendRequest(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){return(0,d.wq)()?yield this.sapphireRequest(decodeURIComponent(e),t):yield this.networkRequest(decodeURIComponent(e),t)}))}sapphireRequest(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i={url:e,headers:t.headers,body:t.body,refresh:!0},n=yield(0,h.FM)(i);return JSON.parse(n||"{}")}))}networkRequest(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){return yield(0,l.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const i=yield this.fetchImpl(e,t);return i.ok?i.json():(this.handleAppErrorEventCall(g.j4V.ErrorResponseFromOneService),null)}))),"getSuggestedInterests")}))}}},60164:function(e,t,i){"use strict";var n;i.d(t,{u:function(){return n}}),function(e){e.SysTag="SysTag",e.UserQuery="UserQuery"}(n||(n={}))},4977:function(e,t,i){"use strict";var n;i.d(t,{t:function(){return n}}),function(e){e.Followed="followed",e.Unfollowed="unfollowed",e.Locked="locked",e.None="none"}(n||(n={}))},17752:function(e,t,i){"use strict";var n;i.d(t,{A:function(){return n}}),function(e){e.consumer="consumer",e.work="work"}(n||(n={}))},98793:function(e,t,i){"use strict";var n,o,a,s,r,l,d,c,u,h;i.d(t,{DL:function(){return d},NK:function(){return u},Rb:function(){return h},L0:function(){return m},iA:function(){return ct},m2:function(){return Xe},Oh:function(){return D},g2:function(){return l},P_:function(){return O},Yd:function(){return s},GU:function(){return I},KS:function(){return p},i8:function(){return $},MV:function(){return L},W6:function(){return k},Ht:function(){return ut},TO:function(){return x},I3:function(){return ge},_d:function(){return ye},lX:function(){return J},jb:function(){return Ge},JH:function(){return Ve},DK:function(){return G},H5:function(){return Be},xk:function(){return We},V1:function(){return je},Du:function(){return He},zo:function(){return Fe},vQ:function(){return Ke},im:function(){return we},xy:function(){return re},K5:function(){return ae},Zx:function(){return W},As:function(){return Ye},FK:function(){return _},Qe:function(){return q},pG:function(){return le},H0:function(){return H},jS:function(){return xe},My:function(){return Ce},FS:function(){return Oe},aB:function(){return V},$q:function(){return ze},G1:function(){return _e},bo:function(){return Pe},gZ:function(){return De},eB:function(){return Me},kq:function(){return qe},jC:function(){return ne},xo:function(){return oe},Be:function(){return Ue}}),function(e){e[e.Driving=0]="Driving",e[e.Transit=1]="Transit"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Highways=1]="Highways",e[e.Tolls=2]="Tolls",e[e.Ferries=4]="Ferries",e[e.CountryBorders=8]="CountryBorders"}(o||(o={})),function(e){e[e.Driving=10]="Driving",e[e.Transit=20]="Transit"}(a||(a={})),function(e){e[e.None=0]="None",e[e.Light=1]="Light",e[e.Moderate=2]="Moderate",e[e.Heavy=3]="Heavy"}(s||(s={})),function(e){e.Unknown="Unknown",e.None="None",e.Mild="Mild",e.Medium="Medium",e.Heavy="Heavy"}(r||(r={})),function(e){e.Full="full",e.Half="half",e.Both="both",e.Tall="tall"}(l||(l={})),function(e){e[e.Home=0]="Home",e[e.Work=1]="Work",e[e.Other=2]="Other"}(d||(d={})),function(e){e[e.Api=0]="Api",e[e.None=1]="None",e[e.Static=2]="Static"}(c||(c={})),function(e){e.SCHEDULE_CHANGED="ScheduleChanged",e.OPERATIONAL_RESUMED="OperationalResumed",e.TRAINS_DELAYED="TrainsDelayed",e.OPERATIONA_STATUS="OperationalStatus",e.OPERATIONAL_HALTED="OperationalHalted",e.OTHER="Other"}(u||(u={})),function(e){e.Miles="Miles",e.Kilometers="Kilometers"}(h||(h={}));const g="traffic",p={cameraMapImageZoom:13,halfMapImageZoom:12,fullMapImageZoom:12,quarterMapImageZoom:11,clickThroughMapZoom:13,incidentClickThroughMapZoom:16,mapImageResolutionFactorQuarter:1.5,mapImageResolutionFactor:1,quarterMapWidth:144,quarterMapHeight:146,commuteHalfMapWidth:202,incidentMapWidth:268,incidentMapHeight:171,incidentMapZoom:13,gasStationMapWidth:268,gasStationMapHeight:144,gasStationMapTallHeight:294,gasStationMapZoom:12,incidentMapHalfCardItemOffsetX:80,incidentMapFullCardItemOffsetX:40,incidentMapFullCardItemOffsetY:40,incidentMapHalfCardItemOffsetXV1:110,incidentMapHalfCardItemOffsetXV2:100,cameraMapFullCardItemOffsetX:-64,cameraMapFullCardItemOffsetY:19,cardWidth:300,halfCardHeight:146,fullCardHeight:304,tallCardHeight:460,lightModeMapStyle:"RoadVibrant",darkModeMapStyle:"RoadVibrantDark",informationalMapLayers:"TrafficFlow,Basemap,TrafficIncidents,OsmBuildings",cameraCardMapLayersV2:"TrafficFlow,Basemap,OsmBuildings",cameraCardMapLayersV2Jp:"Basemap,OsmBuildings",trafficFlowMapLayer:"TrafficFlow",landingPageUrl:"https://{hostName}/{localeCode}/traffic",personalizationUrl:"https://{hostName}/{localeCode}/feed/personalize/settings",transitLandingPageUrl:"https://www.bing.com/maps/directions?addfeaturesnoexpansion=transitalert&mode=T",transitMyPlacesUrl:"https://www.bing.com/maps/myplaces",mapsVerticalUrl:"https://www.bing.com/maps/traffic?setlang={0}",mapsVerticalQueryUrl:"https://www.bing.com/maps?setlang={locale}&q={query}&cp={coordinates}&lvl={zoom}&child=ypid%3D{ypid}&form={formCode}",msnAssetsHost:"https://assets.msn.com",msnAssetsHostCn:"https://assets.msn.cn",oneServiceTrafficApi:"service/news/feed/segments/traffic?apikey={APIKEY}&market={MARKET}&ocid={OCID}&user={USER}&Vertical=Common&StrategyDataCategory=dataInOneService&Experience={EXPERIENCE}",cameraImageUrlTemplate:"https://ecn.dev.virtualearth.net{cameraId}&key=AnTcaqBi2ypp0xI-OZNi4W_ik2KhjgpqioTAtXLC8GzkMBQRMlyxvxyTnd5b73im&ur=us&c=en-US&animated=false&setfeatures=mp4cameras",ocid:"weather-peregrine",apiKey:"UhJ4G66OjyLbn9mXARgajXLiLw6V75sHnfpU60aJBB",apiKey2:"0QfOX3Vn51YCzitbLaRkTTBadtWpgTN8NZLW0C1SEM",customRoutesApiKey:"AmatwaYC9IkJ8pLYPLjaNPRaIXRihR07x51Ah4SGuct-87N_PakuRE4fpCEP5ciD",ocid2Set:new Set(["winp1taskbar","msedgdhp","windirect","Peregrine","hponeservicefeed"]),appTypeToExperience:new Map([["windowsShell","WindowsTaskbarHeadlines"],["windowsNewsPlus","Window11Dashboard"],["winWidgets","Window11Dashboard"],["edgeChromium","EdgeNtp"],["bingHomepage","BingHomePage"],["windows","WindowsHomePage"]]),commuteBoundingBoxesHalf:[{start:{x:166,y:16},end:{x:284,y:130}}],commuteBoundingBoxesFull:[{start:{x:166,y:16},end:{x:284,y:280}},{start:{x:16,y:144},end:{x:284,y:280}}],commuteBoundingBoxesTall:[{start:{x:16,y:144},end:{x:284,y:422}}],transitLineUrlSubpath:"staticsb/statics/latest/traffic/transitCard/transitLineNames.txt"};var m,f,v,y;!function(e){e[e.Undefined=0]="Undefined",e[e.Collision=1]="Collision",e[e.Congestion=2]="Congestion",e[e.DisabledVehicle=3]="DisabledVehicle",e[e.MassTransit=4]="MassTransit",e[e.Miscellaneous=5]="Miscellaneous",e[e.OtherNews=6]="OtherNews",e[e.PlannedEvent=7]="PlannedEvent",e[e.RoadHazard=8]="RoadHazard",e[e.Construction=9]="Construction",e[e.Alert=10]="Alert",e[e.Weather=11]="Weather",e[e.Camera=12]="Camera"}(m||(m={})),function(e){e[e.Traffic=0]="Traffic",e[e.Camera=1]="Camera",e[e.CityToCity=2]="CityToCity",e[e.Summary=3]="Summary",e[e.CollisionAndConstruction=4]="CollisionAndConstruction",e[e.MyRoutes=5]="MyRoutes",e[e.MyRoutesUpsell=6]="MyRoutesUpsell",e[e.GasPrice=7]="GasPrice",e[e.Commute=8]="Commute",e[e.TransitAlert=9]="TransitAlert",e[e.CommuteUpsell=10]="CommuteUpsell",e[e.AreaSummary=11]="AreaSummary"}(f||(f={})),function(e){e[e.Unknown=0]="Unknown",e[e.Regular=1]="Regular",e[e.Midgrade=2]="Midgrade",e[e.Premium=3]="Premium",e[e.Diesel=4]="Diesel"}(v||(v={})),function(e){e[e.USD=1]="USD"}(y||(y={}));const b={closure:"cls.f",collision:"acd.f",construction:"cnst.f",defaultIncident:"in.f",backgroundGasStation:"gsp.i",selectedGasStation:"gsp.s"},S={closure:"S15|{severity},Default",collision:"S15|{severity},Accident",construction:"S15|{severity},Construction",defaultIncident:"S15|{severity},Default",backgroundGasStation:"S541|InactivePointStateLandmark",selectedGasStation:"S541|SelectedPointStateSearch"},w="LowSeverity",T="MediumSeverity",C="HighSeverity",x={large:"_1x_3y",medium:"_1x_2y",small:"_1x_1y"},k=["accidents","construction","roadClosures","events"];var $;!function(e){e.TrafficSettingsCard="TrafficSettingsCard",e.DetectLocation="trafficcard_customization_detectlocation",e.TrafficVertical="Traffic",e.AutoSuggestLocation="trafficcard_customization_location",e.SpecifyLocation="trafficcard_customization_specifylocation",e.Save="Save",e.Cancel="Cancel"}($||($={}));const O={TrafficCard:"TrafficCard",TrafficVertical:"Traffic",TrafficMap:"TrafficMap",Incidents:["Incident1","Incident2"],IncidentDescription:"TrafficIncidentDescription",Header:"TrafficHeader",Customization:"trafficcard_customization",MenuEdit:"trafficcard_customization_editloc",MenuMore:"TrafficCardCustomizationMore",MenuHide:"trafficcard_customization_hide",EditHome:"TrafficCardEditHome",AddHome:"TrafficCardAddHome",EditWork:"TrafficCardEditWork",AddWork:"TrafficCardAddWork",Commute:"TrafficCardCommute",SummaryCategory:"TrafficSummaryCategory",CarouselPreviousFlipper:"TrafficPreviousFlipper",CarouselNextFlipper:"TrafficNextFlipper",SeeMore:"SeeMore",ReverseRoute:"ReverseRoute",AlertPage:"1-TransitCard",AddLocationsButton:"1-AddLocationsButton",AddLinesButton:"1-AddLinesButton",AlertItem:"1-AlertItem",AddLinesIndexPage:"2-AddLineIndexPage​",AddLinesBox:"2-AddLinesBox​",AddLinesIcon:"2-StatusAdd​​",DeleteLinesIcon:"2-StatusDelete​",ConfirmButton:"2-ConfirmButton​",CancelButton:"2-CancelButton",AddLinesSearchPage:"2-AddLineSearchPage​"};var L,I;!function(e){e[e.Unknown=1]="Unknown",e[e.Heavy=2]="Heavy",e[e.Moderate=4]="Moderate",e[e.Light=8]="Light",e[e.None=16]="None"}(L||(L={})),function(e){e[e.Unknown=0]="Unknown",e[e.Delays=1]="Delays",e[e.Incidents=2]="Incidents",e[e.Camera=3]="Camera",e[e.Mixed=4]="Mixed",e[e.TravelTimes=5]="TravelTimes",e[e.Commute=6]="Commute",e[e.Summary=7]="Summary",e[e.AreaSummary=8]="AreaSummary",e[e.CollisionAndConstruction=9]="CollisionAndConstruction",e[e.GasPrice=10]="GasPrice",e[e.Insights=11]="Insights",e[e.MyRoutes=12]="MyRoutes",e[e.TransitUpsell=13]="TransitUpsell",e[e.MyTransit=14]="MyTransit",e[e.MyRoutesUpsell=15]="MyRoutesUpsell",e[e.TransitAlert=16]="TransitAlert",e[e.CommuteUpsell=17]="CommuteUpsell",e[e.TrafficUnclassified=255]="TrafficUnclassified"}(I||(I={}));var A=i(33940),E=i(16517),M=i(23401),P=i(87298);class D extends class{constructor(e,t){this.fetchImpl=e,this._unitMile="mi",this._unitKm="km",this._config=t}getAvoidsParam(e){if(e==o.None)return;const t=[];return e&o.Tolls&&t.push("tolls"),e&o.CountryBorders&&t.push("borderCrossing"),e&o.Highways&&t.push("highways"),e&o.Ferries&&t.push("ferry"),["avoid",t.join(",")]}getTravelModeParam(e){return e==n.Driving?"Driving":e==n.Transit?"Transit":"Driving"}getDirectionsWithLocationStrings(e,t,i,a,s,r,l,d=o.None,c=n.Driving){return(0,A.mG)(this,void 0,void 0,(function*(){const n=this.getUserRegion(l),o="us"===n||"gb"===n?this._unitMile:this._unitKm,u=new URL(this._config.directionsBaseUrl.replace("{key}",e).replace("{c}",l).replace("{wp.0}",`${i},${a}`).replace("{wp.1}",`${s},${r}`).replace("{du}",o).replace("{travelMode}",this.getTravelModeParam(c))),h=this.getAvoidsParam(d);h&&u.searchParams.append(h[0],h[1]);const g=yield(0,P.w)((()=>(0,A.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(u.href);if(!e.ok)throw Error(e.statusText);return e.json()}))),"getDirections");let p;const m=g&&g.resourceSets&&g.resourceSets[0]&&g.resourceSets[0].resources;return m&&(p={routeId:t,results:m}),p}))}getDirections(e,t,i,a,s,r,l,d=o.None,c=n.Driving){return(0,A.mG)(this,void 0,void 0,(function*(){return this.getDirectionsWithLocationStrings(e,t,`${i}`,`${a}`,`${s}`,`${r}`,l,d,c)}))}getUserRegion(e){return e.split("-")[1]}}{constructor(e,t=fetch){super(t,e)}getDirectionsForMyRoute(e,t,i){return(0,A.mG)(this,void 0,void 0,(function*(){if(!e||!e.stops||e.stops.length<2)return;const n=e.stops[0],o=e.stops[e.stops.length-1],a=this.getWaypointForRoute(n),s=this.getWaypointForRoute(o);return a&&s?yield this.getDirections(t,"",a.latitude,a.longitude,s.latitude,s.longitude,i,n.itineraryToNextInfo&&n.itineraryToNextInfo.routeAvoids,n.itineraryToNextInfo&&n.itineraryToNextInfo.mode):void 0}))}getWaypointForRoute(e){if(e){if(this.areCoordinatesValid(e.routableCoordinates))return e.routableCoordinates;if(this.areCoordinatesValid(e.displayCoordinates))return e.displayCoordinates}}areCoordinatesValid(e){return!!(e&&e.latitude&&e.longitude)}}function H(e,t){if(!e)return;const i=e.routeLabel,n=e.stops;let o;if(t&&n&&n.length>=2){const e=F(n[0]),i=F(n[n.length-1]);e&&i&&(o=t.replace("{0}",e).replace("{1}",i))}return i||o}function F(e){return e?e.originalName||e.address:null}function R(e){if(!e)return;const t={id:e.targetId||e.TargetId,createdDateTime:e.createdDateTime||e.CreatedDateTime},i=e.metadata||e.Metadata;return i&&(t.routeLabel=i.Name,i.Items&&(t.stops=i.Items.map((e=>{if(!e||!e.Metadata||!e.Metadata.Value)return{};const t=e.Metadata.Value;return{displayCoordinates:t.DisplayCoordinates&&t.DisplayCoordinates.Latitude&&t.DisplayCoordinates.Longitude?{latitude:t.DisplayCoordinates.Latitude,longitude:t.DisplayCoordinates.Longitude}:void 0,routableCoordinates:t.RoutableCoordinates&&t.RoutableCoordinates.Latitude&&t.RoutableCoordinates.Longitude?{latitude:t.RoutableCoordinates.Latitude,longitude:t.RoutableCoordinates.Longitude}:void 0,address:t.Address&&t.Address.SingleLine,itineraryToNextInfo:t.ItineraryInformation&&{mode:N(t.ItineraryInformation.ModeToNext),routeAvoids:t.ItineraryInformation.RouteAvoid},originalName:t.OriginalName,entityId:t.EntityId}})))),t}function N(e){switch(e){case a.Driving:return n.Driving;case a.Transit:return n.Transit;default:return n.Driving}}var U=i(68364),j=i(26415),B=i(791),z=i(11708);function G(){return(0,A.mG)(this,void 0,void 0,(function*(){try{return yield B.N.updateSegmentCardsEnableStatus([{cardType:z.f.TrafficCard,enabled:!1}]),!0}catch(e){return(0,U.OO)(e,j.q$m,"Traffic user settings update failed"),!1}}))}function q(e,t,i,n,o,a,s,r,l,d,c,u){let h=null;if(e&&e.latitude&&e.longitude){const g=p,m=t?g.darkModeMapStyle:g.lightModeMapStyle,f=se(i,!!r,a);let v;v=o?`${parseFloat(e.latitude).toFixed(2)},${parseFloat(e.longitude).toFixed(2)}`:`${parseFloat(e.latitude).toFixed(4)},${parseFloat(e.longitude).toFixed(4)}`;const y=null!=s?s:V(i,r),b=d||g.informationalMapLayers;let S;if(S=c||(i?"37":"54"),h=n.replace("{style}",m).replace("{coordinates}",v).replace("{zoom}",y.toString()).replace("{resolution}",f).replace("{layers}",b).replace("{culture}",(0,E.Yq)().CurrentMarket),l){h+="&pushpin="+(u?`${u.latitude},${u.longitude}`:v)+";"+S}}return h}function V(e,t){const i=p;return e?i.fullMapImageZoom:t?i.quarterMapImageZoom:i.halfMapImageZoom}function _(e,t,i,n,o,a,s){const r=p,l=(0,E.Yq)().CurrentMarket===M.I.ZHCN,d=l?S:b;let c;if(c=e.category===m.Collision?d.collision:e.category===m.Construction?d.construction:e.isClosedForRouting?d.closure:d.defaultIncident,l){let t;switch(e.delayColor){case"delay-green":t=w;break;case"delay-orange":default:t=T;break;case"delay-red":t=C}c=c.replace("{severity}",t)}const u=r.incidentMapZoom;let h,g=!0;if(n&&e.location){const o=s||r.incidentMapHeight;return q(e.location,t,n,i,!1,{height:o,width:r.incidentMapWidth},u,void 0,!0,r.trafficFlowMapLayer,c,e.location)}h={x:a?r.incidentMapHalfCardItemOffsetXV2:r.incidentMapHalfCardItemOffsetXV1,y:0},g=!1,o&&(h.x=-h.x);const f=e.location&&ye(e.location,h,u);return f&&q(f,t,n,i,!1,void 0,u,void 0,g,r.trafficFlowMapLayer,c,e.location)}function W(e,t,i,n,o){let a;if(e&&e.latitude&&e.longitude){const s=p,r="tall"===o?s.gasStationMapTallHeight:s.gasStationMapHeight,l=`${(s.gasStationMapWidth*s.mapImageResolutionFactor).toFixed()},${(r*s.mapImageResolutionFactor).toFixed()}`;a=i.replace("{layers}",s.cameraCardMapLayersV2).replace("{style}",t?s.darkModeMapStyle:s.lightModeMapStyle).replace("{coordinates}",`${e.latitude},${e.longitude}`).replace("{zoom}",s.gasStationMapZoom.toString()).replace("{culture}",(0,E.Yq)().CurrentMarket).replace("{resolution}",l),n&&(a=a.concat("",n))}return a}function Z(e,t){if(!e||!e.Routes||!t)return null;const i=e.Routes[0],n=i.End&&i.End.AddressType,o=Q(i,t,n);let a,s;return i&&(a={longitude:i.Start&&i.Start.Location.Longitude,latitude:i.Start&&i.Start.Location.Latitude},s={longitude:i.End&&i.End.Location.Longitude,latitude:i.End&&i.End.Location.Latitude}),{commuteDetails:o,start:a,end:s,destinationAddressType:n}}function J(e){if(!e)return;return{longitude:e.longitude.toString(),latitude:e.latitude.toString()}}function Y(e,t){return e?e.map((e=>({calculatedRoute:t&&Q(e.CalculatedRoute,t),routeDefinition:R(e.RouteDefinition)}))):null}function K(e,t,i,n,o,a,s){let r,l;const c=e.commuteTexts;return void 0!==s&&c&&(s===d.Home?(r=c.work,l=c.home):(r=c.home,l=c.work)),{commuteTime:`${(n/60).toFixed()} ${e.min}`,delay:i,viaRoads:e.via&&e.via.replace("{0}",o),delayColor:t,travelDurationMin:Math.ceil(n/60),commuteStart:r,commuteEnd:l,boundingBoxLatLon:a}}function X(e){if(e&&Array.isArray(e)&&4===e.length&&e.every((e=>"number"==typeof e)))return{start:{latitude:e[0],longitude:e[1]},end:{latitude:e[2],longitude:e[3]}}}function Q(e,t,i){if(!e)return null;const[n,o]=te(e.TrafficCongestion,t),a=X(e.BoundingBox);return K(t,n,o,e.TravelDuration,e.ViaRoads,a,i)}function ee(e,t,i){if(!e)return null;const[n,o]=te(function(e){switch(e){case r.Mild:return s.Light;case r.Medium:return s.Moderate;case r.Heavy:return s.Heavy;default:return s.None}}(e.trafficCongestion),t),a=e&&e.routeLegs&&e.routeLegs[0].description,l=X(e.bbox);return K(t,n,o,e.travelDurationTraffic,a,l,i)}function te(e,t){return e===s.Light?["delay-green",t.noTraffic]:e===s.Moderate?["delay-orange",t.moderateTraffic]:e===s.Heavy?["delay-red",t.heavyTraffic]:["delay-green",t.fasterThanUsual]}function ie(e){if(!e)return null;return{congestion:e.AreaTrafficCongestion,delayColor:e.DelayColor,supported:e.AreaDelaySupported}}function ne(e,t,i,n,o){if(!t)return null;const a=e?new Map([["accidents",e.accidents],["construction",e.construction],["roadClosures",e.roadClosures],["news",e.news],["events",e.events]]):new Map,s=e&&e.trafficSummaryItemSingular?new Map([["accidents",e.trafficSummaryItemSingular.accidents],["construction",e.trafficSummaryItemSingular.construction],["roadClosures",e.trafficSummaryItemSingular.roadClosures],["news",e.news],["events",e.trafficSummaryItemSingular.events]]):new Map;return t.filter((e=>(k.includes(e.key)||"news"===e.key&&i)&&0!=e.statValue)).map((t=>{let i;if(o){const e=new URL(o);e.searchParams.append("intent",t.key),i=e.href}const r=function(e,t){switch(e){case"Last24hrs":return t.lastXHours&&t.lastXHours.replace("{0}","24");case"Last48hrs":return t.lastXHours&&t.lastXHours.replace("{0}","48");case"In24hrs":return t.inXHours&&t.inXHours.replace("{0}","24");case"In48hrs":return t.inXHours&&t.inXHours.replace("{0}","48")}}(t.period,e);let l;const d=a.get(t.key),c=s.get(t.key);l=t.statValue>1?d||c:c||d;const u=l&&e&&e.summaryTooltipText?e.summaryTooltipText.replace("{0}",t.statValue.toString()).replace("{1}",l):l;return{categoryNameText:l,categoryItemCount:t.statValue,period:t.period,categoryType:t.key,itemTelemetryTag:n&&n.getMetadataTag(),clickthroughUrl:i,periodDisplayText:r,tooltipText:u}}))}function oe(e,t,i,n){if(!t||!i)return e&&e.title;const o=1!==i,a=t.congestionText;if(o||!e){const i=t.city;return i&&a?n?a+" — "+i:a.toLocaleUpperCase((0,E.Yq)().CurrentMarket)+" — "+i.toLocaleUpperCase((0,E.Yq)().CurrentMarket):e&&e.title}if(n&&e.trafficNearYou)return e.trafficNearYou;{const i=t.areaCongestion;if(i===s.Heavy&&e.heavyTrafficNearYou)return e.heavyTrafficNearYou.toLocaleUpperCase((0,E.Yq)().CurrentMarket);if(i===s.Moderate&&e.moderateTrafficNearYou)return e.moderateTrafficNearYou.toLocaleUpperCase((0,E.Yq)().CurrentMarket);if(i===s.Light&&e.lightTrafficNearYou)return e.lightTrafficNearYou.toLocaleUpperCase((0,E.Yq)().CurrentMarket);if(e.noTrafficNearYou)return e.noTrafficNearYou.toLocaleUpperCase((0,E.Yq)().CurrentMarket)}return null}function ae(e,t){switch(e){case s.Heavy:return[t?"#e87979":"#d83b01","delay-red"];case s.Moderate:return[t?"#e98f6d":"#be5a00","delay-orange"];case s.Light:case s.None:default:return[t?"#74b374":"#107c10","delay-green"]}}function se(e,t,i){const n=p;return i&&i.width&&i.height?`${(i.width*n.mapImageResolutionFactor).toFixed()},${(i.height*n.mapImageResolutionFactor).toFixed()}`:e?`${(n.cardWidth*n.mapImageResolutionFactor).toFixed()},${((i&&i.height||n.fullCardHeight)*n.mapImageResolutionFactor).toFixed()}`:t?`${(n.quarterMapWidth*n.mapImageResolutionFactorQuarter).toFixed()},${(n.quarterMapHeight*n.mapImageResolutionFactorQuarter).toFixed()}`:`${(n.cardWidth*n.mapImageResolutionFactor).toFixed()},${((i&&i.height||n.halfCardHeight)*n.mapImageResolutionFactor).toFixed()}`}function re(e,t){return(0,A.mG)(this,void 0,void 0,(function*(){return yield t.getDirectionsForMyRoute(e,p.customRoutesApiKey,(0,E.Yq)().CurrentMarket).then((e=>{if(e&&e.results){let t="Light Traffic",i="delay-green";switch(e.results[0].trafficCongestion){case r.Mild:t="Light Traffic",i="delay-green";break;case r.Medium:t="Moderate Traffic",i="delay-orange";break;case r.Heavy:t="Heavy Traffic",i="delay-red"}return{commuteTime:(e.results[0].travelDurationTraffic/60).toString(),delay:t,viaRoads:"",delayColor:i,travelDurationMin:Math.round(e.results[0].travelDurationTraffic/60)}}})).catch((e=>{}))}))}function le(e,t,i){return(0,A.mG)(this,void 0,void 0,(function*(){let n;if(!(t.end&&t.end.latitude&&t.end.longitude&&t.start&&t.start.latitude&&t.start.longitude))return(0,U.H)(j.Nol,"failed to get reverse commute data: malformed current commute data"),null;try{n=yield e.getDirectionsWithLocationStrings(p.customRoutesApiKey,"",t.end.latitude,t.end.longitude,t.start.latitude,t.start.longitude,(0,E.Yq)().CurrentMarket)}catch(e){return(0,U.OO)(e,j.Nol,"failed to get reverse commute directions data"),null}if(n&&n.results&&n.results.length>0){const e=n.results[0],o=t.destinationAddressType===d.Work?d.Home:d.Work;return{destinationAddressType:o,commuteDetails:ee(e,i,o),start:t.end,end:t.start}}return(0,U.H)(j.Nol,"failed to get reverse commute directions data: empty directionsResponse"),null}))}function de(e){return e?{latitude:e.Latitude,longitude:e.Longitude,locality:e.City,accuracy:e.Accuracy}:null}function ce(e){new URL(location.href).searchParams.forEach(((t,i)=>{"item"===i&&e.searchParams.append(i,t)}))}function ue(e){return e?e.map((e=>({start:de(e.Start&&e.Start.Location),end:de(e.End&&e.End.Location),congestion:e.TrafficCongestion,duration:e.TravelDuration}))):null}function he(e){if(!e)return new Array;const t=new Array;for(const i of e){const e={id:i.Id,location:{latitude:i.Location.Latitude,longitude:i.Location.Longitude},name:i.Name,url:i.Url,temporaryPassword:i.TemporaryPassword,copyrightNotice:i.CopyrightNotice,gridId:i.GridId,isAreaCamera:i.IsAreaCamera,score:i.Score,labels:i.Labels,congestion:i.TrafficCongestion};t.push(e)}return t}function ge(e,t,i,n,o){var a,s,r;if(!i)return;const{location:l,locationDetectionMode:d,cameras:c,collisionsAndConstructions:u,trafficStatusList:h}=i;if(e.searchParams.append("tzo",`${(new Date).getTimezoneOffset()}`),e.searchParams.append("lh",`${(new Date).getHours()}`),e.searchParams.append("cardSize",`${t}`),e.searchParams.append("ldm",`${d}`),l){const{latitude:t,longitude:i}=l;t&&i&&e.searchParams.append("cp",`${t},${i}`)}e.searchParams.append("tfsumct",`${null!==(a=h&&h.length)&&void 0!==a?a:0}`),e.searchParams.append("tfsums",(h?h.map((e=>`${e.key}:${e.statValue}`)):[]).join(",")),e.searchParams.append("tfcamct",`${c&&c.length>0?c.filter((e=>!e.isAreaCamera)).length:0}`),e.searchParams.append("tfareacamct",`${c&&c.length>0?c.filter((e=>e.isAreaCamera)).length:0}`),e.searchParams.append("tfcolconst",`${null!==(s=u&&u.length)&&void 0!==s?s:0}`),e.searchParams.append("tfddct",`${null!==(r=n&&n.length)&&void 0!==r?r:0}`),e.searchParams.append("tfdd",`${(null!=n?n:[]).join(",")}`),e.searchParams.append("tfview",`${o}`),e.searchParams.append("home",i&&i.home?"1":"0"),e.searchParams.append("work",i&&i.work?"1":"0"),e.searchParams.append("homedist",`${Se(i&&i.home,i&&i.location)}`),e.searchParams.append("workdist",`${Se(i&&i.work,i&&i.location)}`),e.searchParams.append("accuracy",`${i&&i.location&&i.location.accuracy}`),e.searchParams.append("cmoutcome",`${i&&i.commuteOutcome}`)}function pe(e){return 256<<e}function me(e,t,i){return Math.min(Math.max(e,t),i)}function fe(e,t){const i=me(e.latitude,-85.05112878,85.05112878),n=(me(e.longitude,-180,180)+180)/360,o=Math.sin(i*Math.PI/180),a=.5-Math.log((1+o)/(1-o))/(4*Math.PI),s=pe(t);return{x:me(n*s+.5,0,s-1),y:me(a*s+.5,0,s-1)}}function ve(e,t){const i=pe(t),n=me(e.x,0,i-1)/i-.5,o=.5-me(e.y,0,i-1)/i;return{latitude:90-360*Math.atan(Math.exp(2*-o*Math.PI))/Math.PI,longitude:360*n}}function ye(e,t,i){const n=function(e){if(e)return{latitude:parseFloat(e.latitude),longitude:parseFloat(e.longitude)}}(e),o=n&&fe(n,i);let a=null;o&&(a={x:o.x-t.x,y:o.y-t.y});const s=a&&ve(a,i);return s?{latitude:`${s.latitude}`,longitude:`${s.longitude}`}:null}function be(e){return e/360*2*Math.PI}function Se(e,t){if(!(e&&t&&e.latitude&&e.longitude&&t.latitude&&t.longitude))return-1;const i=be(parseFloat(e.latitude)),n=be(parseFloat(e.longitude)),o=be(parseFloat(t.latitude)),a=be(parseFloat(t.longitude));if(!(i&&n&&i&&n))return-1;const s=a-n,r=o-i,l=Math.sin(r/2),d=Math.sin(s/2),c=l*l+Math.cos(i)*Math.cos(o)*d*d;return 6371010*(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)))}function we(e){if(e&&e.start&&e.start.latitude&&e.end&&e.end.latitude&&e.xSizeInPx&&e.ySizeInPx&&e.urlTemplate){if(e.boundingBoxesPx){let t=-1,i="";return e.mirrorBoundingBoxes&&(e=Object.assign(Object.assign({},e),{boundingBoxesPx:e.boundingBoxesPx.map((t=>function(e,t){return{start:{x:t-e.end.x,y:e.start.y},end:{x:t-e.start.x,y:e.end.y}}}(t,e.xSizeInPx)))})),e.boundingBoxesPx.forEach((n=>{const o=Te(Object.assign(Object.assign({},e),{boundingBoxesPx:[n]}));o.zoomLevel>t&&(i=o.url,t=o.zoomLevel)})),i}return Te(e).url}return""}function Te(e){const t=e.urlTemplate.replace("{style}",e.isDarkMode?p.darkModeMapStyle:p.lightModeMapStyle).replace("{routeWaypoint1}",`${e.start.latitude},${e.start.longitude}`).replace("{routeWaypoint2}",`${e.end.latitude},${e.end.longitude}`).replace("{culture}",(0,E.Yq)().CurrentMarket).replace("{resolution}",`${e.xSizeInPx},${e.ySizeInPx}`);if(e.boundingBoxesPx&&e.boundingBoxLatLon){const i=e.boundingBoxesPx[0].end.x-e.boundingBoxesPx[0].start.x,n=e.boundingBoxesPx[0].end.y-e.boundingBoxesPx[0].start.y;for(let o=15;o>0;o--){const a=fe(e.boundingBoxLatLon.start,o),s=fe(e.boundingBoxLatLon.end,o),r=s.x-a.x,l=a.y-s.y;if(r<i&&l<n){const i={x:(s.x+a.x)/2,y:(s.y+a.y)/2},n={x:e.xSizeInPx/2-(e.boundingBoxesPx[0].start.x+e.boundingBoxesPx[0].end.x)/2,y:e.ySizeInPx/2-(e.boundingBoxesPx[0].start.y+e.boundingBoxesPx[0].end.y)/2},r=ve({x:i.x+n.x,y:i.y+n.y},o);return{url:t.replace("{zoom}",String(o)).replace("{center}",`${r.latitude},${r.longitude}`),zoomLevel:o}}}}return{url:t.replace("/{center}/{zoom}",""),zoomLevel:-1}}function Ce(){return p.cardWidth}function xe(e){switch(e){case l.Tall:return p.tallCardHeight;case l.Full:return p.fullCardHeight;case l.Half:default:return p.halfCardHeight}}var ke=i(38156),$e=i(60483);function Oe(e){return new $e.D({name:e,action:ke.Aw.View,behavior:ke.wu.View,content:{type:ke.uH.StructuredData,vertical:g}})}new Set([f.MyRoutes,f.MyRoutesUpsell,f.TransitAlert,f.CommuteUpsell]);var Le=i(83152);const Ie=new Map([["default",h.Kilometers],["en-us",h.Miles],["es-us",h.Miles],["haw-us",h.Miles],["en-bz",h.Miles]]),Ae={Sunday:!0,Monday:!0,Tuesday:!0,Wednesday:!0,Thursday:!0,Friday:!0,Saturday:!0},Ee=new Map([["default",Object.assign(Object.assign({},Ae),{Saturday:!1,Sunday:!1})]]);function Me(e){return(0,A.mG)(this,void 0,void 0,(function*(){B.N.updateUserSettings({commuteDistanceUnit:e})}))}function Pe(e){return(0,A.mG)(this,void 0,void 0,(function*(){B.N.updateUserSettings({commuteDaysOfWeek:JSON.stringify(e)})}))}function De(e,t){return(0,A.mG)(this,void 0,void 0,(function*(){"Home"==e?B.N.updateUserSettings({arriveAtHomeTime:String(t)}):B.N.updateUserSettings({arriveAtWorkTime:String(t)})}))}function He(e,t){let i,n=null;i=e&&e.commuteDistanceUnit&&e.commuteDistanceUnit in h?e.commuteDistanceUnit:Ie.get((0,E.Yq)().CurrentMarket?(0,E.Yq)().CurrentMarket.toLowerCase():"default");try{e.commuteDaysOfWeek&&(n=JSON.parse(e.commuteDaysOfWeek))}catch(e){}n||(n=Ze((0,E.Yq)().CountryCode));let o=!e||"0"!=e.isTrafficScenarioEnabled,a=!e||"0"!=e.isCommuteScenarioEnabled;return t||!o&&!a?!t||o||a||(o=!0,a=!0):(o=!1,a=!1),{isTrafficScenarioEnabled:o,isCommuteScenarioEnabled:a,commuteDaysOfWeek:n,arriveAtHomeTime:e&&e.arriveAtHomeTime?parseInt(e.arriveAtHomeTime):64800,arriveAtWorkTime:e&&e.arriveAtWorkTime?parseInt(e.arriveAtWorkTime):32400,distanceUnit:i}}function Fe(){return(0,A.mG)(this,void 0,void 0,(function*(){try{const e=[{key:"$filter",value:`actionType eq 'Follow' and targetType eq '${Le.L.Traffic}' and (degree eq 'HomeLocation' or degree eq 'WorkLocation')`}],t=yield B.N.readPdpWithTargetType(Le.L.Traffic,!1,void 0,void 0,!0,e);if(t&&t.value)return{home:Ne(Re(t.value,"HomeLocation")),work:Ne(Re(t.value,"WorkLocation"))}}catch(e){}return{home:null,work:null}}))}["np","my"].forEach((e=>Ee.set(e,Object.assign(Object.assign({},Ae),{Saturday:!1})))),["jo","il","af","dz","bh","bd","eg","iq","ly","mv","om","qa","sa","sd","sy","ye","kw"].forEach((e=>Ee.set(e,Object.assign(Object.assign({},Ae),{Friday:!1,Saturday:!1})))),["id","uz","co","pk","ph","gq","hk","mx","kp","ug","bo","in"].forEach((e=>Ee.set(e,Object.assign(Object.assign({},Ae),{Sunday:!1})))),["bn"].forEach((e=>Ee.set(e,Object.assign(Object.assign({},Ae),{Friday:!1,Sunday:!1})))),["ps","so","ir","dj"].forEach((e=>Ee.set(e,Object.assign(Object.assign({},Ae),{Friday:!1}))));const Re=(e,t)=>{const i=e.filter((e=>e.degree==t));if(0==i.length)return null;let n=i[0];return i.forEach((e=>{e.updatedDateTime>n.updatedDateTime&&(n=e)})),n},Ne=e=>{if(!e||!e.definitionName||!e.metadata)return null;try{const t=JSON.parse(e.metadata);return{latitude:t.DisplayCoordinates.Latitude,longitude:t.DisplayCoordinates.Longitude,displayName:t.Address.SingleLine}}catch(e){}return null},Ue=(e,t,i,n,o,a,s,r,l)=>"number"!=typeof t||"number"!=typeof i?Promise.resolve(!1):B.N.updateTrafficMyRoutes(e?"HomeLocation":"WorkLocation",ze(t,i),a,JSON.stringify({DisplayCoordinates:{Latitude:t,Longitude:i},Name:n,OriginalName:n,Address:{SingleLine:o},EntityId:a,properties:{locationType:s,entitySubTypeHints:r},bond_metadata:"Microsoft.Bing.GeoNotes.V1.Place"}),l),je=e=>"PostalAddress"==e.typeV6?e.displayName:e.firstLine,Be=e=>"PostalAddress"==e.typeV6?e.displayName:e.formattedAddress,ze=(e,t)=>`${t},${e}`,Ge=(e,t=null)=>{const i="Home"==e?"HomeLocation":"WorkLocation";return B.N.readPdpWithTargetType(Le.L.Traffic).then((e=>(e.value.filter((e=>e.degree==i)).forEach((e=>{e.definitionName!=t&&B.N.deleteFromPdp(Le.L.Traffic,"definitionName",[e.definitionName],{},i)})),!0)))},qe=(e,t,i,n,o,a,s,r)=>(0,A.mG)(void 0,void 0,void 0,(function*(){const l=yield B.N.updateTrafficMyRoutes("MyTransit",e,o,{Value:{StopId:i,StopName:n,StopLatitude:s,StopLongitude:r,BusLineName:t,EntityId:o}},a);return l||(0,U.H)(j.wke,"TrafficCard Error saving a transit line"),l}));function Ve(e,t){return(0,A.mG)(this,void 0,void 0,(function*(){const i=yield B.N.deleteFromPdp(Le.L.Traffic,"definitionName",[t],{},e);return i||(0,U.H)(j.GKo,"TrafficCard Error deleting a transit line"),i}))}const _e=e=>e?`${e.firstLine}, ${e.formattedAddress}`:"",We=e=>{const t=e.geoId?e.geoId:e.entityId;if(t){const e=t.search(":"),i=t.search('"'),n=t.lastIndexOf('"');if(e>=0&&i==e+1&&n>i&&n==t.length-1)return t.substring(i+1,n)}return t},Ze=e=>{if(e){const t=Ee.get(e.toLowerCase());if(t)return t}return Ee.get("default")},Je="trgas1";function Ye(e,t){if(t.gasPriceTexts&&t.gasPriceTexts.genericGas){const e=t.gasPriceTexts.genericGas;return{heading:e.display,title:e.toolTip}}const i=new Map([[v.Regular,t.gasPriceTexts&&t.gasPriceTexts.regularGas],[v.Midgrade,t.gasPriceTexts&&t.gasPriceTexts.midgradeGas],[v.Premium,t.gasPriceTexts&&t.gasPriceTexts.premiumGas],[v.Diesel,t.gasPriceTexts&&t.gasPriceTexts.dieselGas]]).get(e);if(i)return{heading:i.display,title:i.toolTip}}function Ke(e,t,i,n){if(!e.gasStation)return;const o=e.gasStation.location,a=e.gasStation.ypid;let s;if(t&&o&&o.latitude&&o.longitude&&a){s=t.replace("{query}",i.gasPriceTexts&&i.gasPriceTexts.gasStations&&i.gasPriceTexts.gasStations.replace(" ","+")).replace("{locale}",(0,E.Yq)().CurrentMarket).replace("{zoom}","13").replace("{coordinates}",`${o.latitude}~${o.longitude}`).replace("{ypid}",a).replace("{formCode}",null!=n?n:Je);const e=new URL(s);return ce(e),e&&e.href}}var Xe,Qe=i(9375),et=i(49972);function tt(e,t,i={},n=!1){return new Promise((function(o,a){const s=new XMLHttpRequest;if(s.open(e,t),s.timeout=1e4,s.onload=function(){o(s)},s.onerror=function(){a(new Error(`Call failed. Status code: ${s.status}. Status text: ${s.statusText}`))},i)for(const e in i)s.setRequestHeader(e,i[e]);n&&(s.responseType="arraybuffer"),s.send()}))}function it(e,t){return tt(e,t,{},!0)}function nt(e){const t=new Uint8Array(e);let i=t.length;const n=new Array(i);for(;i--;)n[i]=String.fromCharCode(t[i]);const o=n.join("");return window.btoa(o)}!function(e){e.getbase64FromApiResponse=nt,e.makeImageRequest=it,e.makeRequest=tt}(Xe||(Xe={}));var ot,at=i(36569),st=i(67267),rt=i(33799),lt=i(33379),dt=i(51671);!function(e){e[e.Green=0]="Green",e[e.Orange=1]="Orange",e[e.Red=2]="Red"}(ot||(ot={}));class ct{constructor(e){this.delayClassToColorMap={0:"delay-green",1:"delay-orange",2:"delay-red"},this.fetchImpl=e||((0,lt.N)()?window.fetch.bind(window):fetch)}getIncidentsResponse(e,t,i={},n=!0,o){return(0,A.mG)(this,void 0,void 0,(function*(){let a=(0,Qe.ku)(),s=p.apiKey;a&&p.ocid2Set.has(a)?s=p.apiKey2:a=p.ocid;const r=(0,E.Yq)().AppType,l=p.appTypeToExperience.get(r),d=p.oneServiceTrafficApi.replace("{APIKEY}",s).replace("{MARKET}",(0,E.Yq)().CurrentMarket).replace("{OCID}",a).replace("{USER}",null!=e?e:(0,E.Yq)().UserId).replace("{EXPERIENCE}",null!=l?l:"Unknown"),c=(0,E.Yq)().IsChinaCompliance?p.msnAssetsHostCn:p.msnAssetsHost,u=new URL(d,c),h=(yield(0,dt.XJ)())===rt.Hy.SignedIn?st.$.getOneServiceParamsWithAuth((0,E.Yq)().UserId,a):st.$.getOneServiceParamsWithoutAuth((0,E.Yq)().UserId,a),g=new Set(["apikey","ocid"]);var m;(m=h)&&m.forEach((e=>{e.value&&!g.has(e.key)&&u.searchParams.set(e.key,e.value)}));const f={method:"GET",headers:i};o&&(f.credentials="include");const v=this.fetchImpl(u.href,f).then((e=>(0,A.mG)(this,void 0,void 0,(function*(){const i=yield e.text();let n;try{n=JSON.parse(i)}catch(t){throw"string"==typeof i&&(t.message=`${t.message}. Beginning of response: ${i}. Status code: ${e.status}`),t}return yield this.getIncidentsFromApiResponse(n,t)}))));return yield Promise.resolve(v).then((e=>e)).catch((e=>(n&&(0,U.OO)(e,j.KzX,"Getting the proper json response from the datatstore and parsing it failed",`URL: ${u.href}, Error: ${(0,et.n)(e)}`),null)))}))}getIncidentsFromApiResponse(e,t){return(0,A.mG)(this,void 0,void 0,(function*(){if(e&&e.length>0&&"TrafficDelays"==e[0].type){const i=JSON.parse(e[0].data);return yield this.parseIncidentsFromJson(i,t)}return null}))}parseIncidentsFromJson(e,t){return(0,A.mG)(this,void 0,void 0,(function*(){if(!e)return null;const n=e.TrafficIncidents&&e.TrafficIncidents.length>0&&e.TrafficIncidents[0].IsPriorityOnCard,o=e.Home&&de(e.Home.Location);o&&(o.displayName=e.Home&&e.Home.Address);const a=e.Work&&de(e.Work.Location);a&&(a.displayName=e.Work&&e.Work.Address);const s={roads:this.getRoads(e.TrafficDelays),collisionsAndConstructions:n?this.getCollisionsAndConstructions(e.TrafficIncidents):null,zoomLevel:e.SuggestedZoomLevel,cameras:he(e.TrafficCameras),areaTrafficDelay:ie(e.AreaTrafficDelay),commuteData:t&&Z(e,t),location:e.Location&&de(e.Location),centerLocation:e.CenterLocation&&de(e.CenterLocation),home:o,work:a,trafficTimes:ue(e.TrafficTime),trafficStatusList:this.getTrafficStatusItems(e.TrafficStatusList),impressions:e.ImpressionFlights,isSupportedArea:e.SupportedArea,initialTrafficInfoType:e.TrafficInfoType,availableInfoTypes:e.AvailableInfoTypes,gasStation:this.getGasStationToDisplay(e.GasStations),customRoutes:e.CustomRoutes&&Y(e.CustomRoutes,t),transitLines:e.TransitNearbyLines?this.getTransitLines(e.TransitNearbyLines.TransitLines):null,myTransit:e.MyTransitInfoByStop?this.getTransitDepartures(e.MyTransitInfoByStop.InfoByStopList):null,commuteOutcome:e.CommuteOutcome,previewInfo:e.PreviewInfo,badgeInfo:e.BadgeInfo};if(e.TrafficAnalytics){const{parseAnalytics:t}=yield i.e("libs_traffic-chart-utils_dist_index_js").then(i.bind(i,47593));s.analytics=t(e.TrafficAnalytics,!0)}return s.collisionsAndConstructions&&s.collisionsAndConstructions.length>0||(s.roads=this.combineRoadsAndIncidents(s.roads,e.TrafficIncidents)),e.LocationMode&&(s.locationDetectionMode="AutoDetect"===e.LocationMode?1:2),this.containsInfoTypeData(s)||((0,U.H)(j.Y2u,"traffic infotype and data mismatch",JSON.stringify(e)),s.initialTrafficInfoType=I.Unknown),s}))}containsInfoTypeData(e){switch(e.initialTrafficInfoType){case I.AreaSummary:return!!e.areaTrafficDelay;case I.Camera:return e.cameras.length>0;case I.CollisionAndConstruction:return!!(e.collisionsAndConstructions&&e.collisionsAndConstructions.length>0);case I.Commute:return!!e.commuteData;case I.GasPrice:return!!e.gasStation;case I.Delays:case I.Incidents:case I.Mixed:return e.roads.length>0;case I.MyRoutes:return e.customRoutes.length>0;case I.Summary:return e.trafficStatusList.length>0;case I.TravelTimes:return!!(e.trafficTimes&&e.trafficTimes.length>0);default:return!0}}getRoads(e){const t=new Array;return e&&e.forEach((e=>{const i={delay:e.Delay,name:e.Incident,locality:e.Locality,congestion:e.TrafficCongestion,isIncident:!1},n=e.BoundingBoxMin,o=e.BoundingBoxMax;n&&o&&"number"==typeof n.Latitude&&"number"==typeof n.Longitude&&"number"==typeof o.Longitude&&"number"==typeof o.Longitude&&(i.location={latitude:((n.Latitude+o.Latitude)/2).toString(),longitude:((n.Longitude+o.Longitude)/2).toString()}),t.push(i)})),t}combineRoadsAndIncidents(e,t){const i=new Array,n=new Array;return t&&(t.filter((e=>1==e.ShowOnCard)).forEach((e=>{i.push(this.convertIncidentToRoad(e))})),t.filter((e=>null==e.ShowOnCard||0==e.ShowOnCard)).forEach((e=>{n.push(this.convertIncidentToRoad(e))}))),e.concat(i).concat(n)}getCollisionsAndConstructions(e){if(!e)return null;const t=new Array;return e&&e.forEach((e=>{if(!e.IsPriorityOnCard)return;const i={id:e.IncidentId,delay:e.Delay,name:e.Incident,description:e.Description,delayColor:this.delayClassToColorMap[e.DelayColor],alertCCodes:e.AlertCCodes,isClosedForRouting:e.IsClosedForRouting,isIncident:!0,isHighPriorityIncident:e.IsPriorityOnCard,category:e.Category,updateTime:new Date};e.StartTime&&(i.startTime=new Date(e.StartTime)),e.EndTime&&(i.endTime=new Date(e.EndTime)),e.Location&&"number"==typeof e.Location.Latitude&&"number"==typeof e.Location.Longitude&&(i.location={latitude:e.Location.Latitude,longitude:e.Location.Longitude}),t.push(i)})),t}getGasStationToDisplay(e){if(!e||0===e.length)return null;const t=[v.Regular,v.Midgrade,v.Premium,v.Diesel];let i;for(i of t){const t=[];if(e.forEach((e=>{const n=e.GasPrices.filter((e=>e.Grade===i&&e.Unit in y));n.length>0&&t.push(this.convertGasStation(e,n[0]))})),t.length>0){const e=t.sort(((e,t)=>e.gasPrice-t.gasPrice)),i=e[0],n=e.reduce(((e,t,i)=>e+`&pushpin=${t.location.latitude},${t.location.longitude};${0===i?b.selectedGasStation:b.backgroundGasStation}`),""),o=(0,E.Yq)().CurrentMarket,a=i&&new Intl.NumberFormat(o,{currency:i.currency,style:"currency",minimumFractionDigits:2,maximumFractionDigits:2}),s=a&&a.format(i.gasPrice);return Object.assign(Object.assign({},i),{mapPushPins:n,formattedGasPrice:s})}}return(0,U.H)(j.S5R,"get best gas station failed",JSON.stringify(e)),null}getTransitLines(e){if(!e||0===e.length)return null;const t=new Array;return e.forEach((e=>{const i=new Array,n=new Array;e.Stops.forEach((e=>{const t={stopId:e.StopId,name:e.StopName,latitude:e.Latitude,longitude:e.Longitude,distanceMi:e.DistanceInMiles};i.push(t)})),e.ServiceAlerts&&e.ServiceAlerts.forEach((e=>{const t={Severity:e.Severity,Type:e.Type,description:e.description,startTime:e.startTime};n.push(t)}));const o={name:e.Name,headSign:e.HeadSign,direction:e.Direction||"",stops:i,serviceAlerts:n};t.push(o)})),t}getTransitDepartures(e){if(!e||0===e.length)return null;const t=new Array;return e.forEach((e=>{const i=new Array,n=new Set,o=new Map;e.BusLines.forEach((e=>{n.add(e.abbreviatedName),16777215!==e.lineColor&&o.set(e.abbreviatedName,e.lineColor)}));const a=Math.min(e.Trips.length,4);for(let t=0;t<a;t+=1){const n=e.Trips[t],a={line:{name:n.AbbreviatedName,headSign:n.HeadSign,color:o.get(n.AbbreviatedName)},departure:n.Departure,predictedDepature:n.PredictedDeparture,hasRealTime:n.hasRealTime};i.push(a)}const s={stopId:e.StopId,name:e.StopName,latitude:e.Position.coordinates[0],longitude:e.Position.coordinates[1],departures:i,busLinesSaved:n};t.push(s)})),t}convertGasStation(e,t){return{name:e.Name,gasPrice:t.Price,ypid:e.Ypid,currency:y[t.Unit],grade:t.Grade,location:{latitude:e.Location.Latitude,longitude:e.Location.Longitude}}}convertIncidentToRoad(e){const t={id:e.IncidentId,delay:e.Delay,name:e.Incident,description:e.Description,delayColor:this.delayClassToColorMap[e.DelayColor],alertCCodes:e.AlertCCodes,isIncident:!0};return e.StartTime&&(t.startTime=new Date(e.StartTime)),e.EndTime&&(t.endTime=new Date(e.EndTime)),e.Location&&"number"==typeof e.Location.Latitude&&"number"==typeof e.Location.Longitude&&(t.location={latitude:e.Location.Latitude,longitude:e.Location.Longitude}),t}cacheCameras(e,t){return(0,A.mG)(this,void 0,void 0,(function*(){return e?(yield Promise.all(e.map((e=>this.cacheIndividualCamera(e,t)))),e):null}))}cacheIndividualCamera(e,t){return(0,A.mG)(this,void 0,void 0,(function*(){if(!e.isCaching){e.isCaching=!0;const i=p.cameraImageUrlTemplate.replace("{cameraId}",e.url);yield Xe.makeImageRequest("GET",i).then((i=>{const n=Xe.getbase64FromApiResponse(i.response);null!=n&&(e.base64=n,e.cachedUrl="data:image/png;base64,"+e.base64);const o=i.getResponseHeader("x-bm-collecteddate");if(o){const i=o.split(" "),n=new Date(i[0]);if(e.timestamp=new Date(i[0]+i[1]),t&&t.today&&t.yesterday){const i=this.isSameDay(o)?t.today:t.yesterday,a=new at.Q((0,E.Yq)().CurrentMarket).formatHourMinute(n);e.timestampText=`${i} · ${a}`}}e.isCached=!0})).catch((e=>((0,U.OO)(e,j.c7c,"fetch camera image failed",i),null)))}return e.base64}))}getTrafficStatusItems(e){if(!e)return new Array;const t=new Array;return e.forEach((e=>{const i={key:e.Key,statValue:e.StatValue,period:e.Period};t.push(i)})),t}parseDateCollected(e){const t=new Date(e);return t.setTime(t.getTime()-60*t.getTimezoneOffset()*1e3),t}getTimezoneOffsetInMs(e){const t=e.split(":"),i=parseInt(t[0]);return 3600*i*1e3+(i>=0?1:-1)*parseInt(t[1])*60*1e3}isSameDay(e,t=new Date){const i=e.split(" "),n=i[0],o=i[1],a=this.getTimezoneOffsetInMs(o),s=this.parseDateCollected(n);return t.setTime(t.getTime()+a),t.getUTCDate()===s.getUTCDate()&&t.getUTCMonth()===s.getUTCMonth()&&t.getUTCFullYear()===s.getUTCFullYear()}}class ut{constructor(e){this.fetchImpl=e,this.getTransitLines=()=>(0,A.mG)(this,void 0,void 0,(function*(){const e=[],t=yield this.fetchAllTransitLines();return null!==t&&t.split("\n").forEach((t=>{const i=t.split("\t");if(i.length>=3){const t=i[0],n=i[1],o=i[2];e.push({lineId:t,shortName:n,longName:o})}})),e})),this.fetchFavoriteTransitLines=e=>(0,A.mG)(this,void 0,void 0,(function*(){var t;try{const i=yield B.N.readPdpWithTargetType(Le.L.Traffic,!0,void 0,void 0,!0),n=i&&(null===(t=i.value)||void 0===t?void 0:t.filter((t=>"Follow"===t.actionType&&t.degree===e)));if(n){const e=[];if(n.forEach((t=>{var i,n,o,a;if(null===(n=null===(i=null==t?void 0:t.metadata)||void 0===i?void 0:i.Value)||void 0===n?void 0:n.BusLineName){const i=null==t?void 0:t.definitionName,n=null===(a=null===(o=null==t?void 0:t.metadata)||void 0===o?void 0:o.Value)||void 0===a?void 0:a.BusLineName;e.push({lineId:i,shortName:n,longName:n})}})),e&&e.length>0)return e}}catch(e){}return null}))}fetchAllTransitLines(e=!1){return(0,A.mG)(this,void 0,void 0,(function*(){const t={method:"GET"};e&&(t.cache="no-store");const i=new URL(p.transitLineUrlSubpath,p.msnAssetsHost);try{const e=yield(0,P.w)((()=>(0,A.mG)(this,void 0,void 0,(function*(){return yield this.fetchImpl(i.href,t)}))),"readAllTransitLines");if(!e||!e.ok)throw Error(`code=${e.status}, ${e.statusText}`);return yield e.text()}catch(e){return null}}))}}},83721:function(e,t,i){"use strict";i.d(t,{m:function(){return n}});const n="#0078D4"},29422:function(e,t,i){"use strict";i.r(t),i.d(t,{AUTOSUGGEST_SUBTYPE:function(){return c},AUTOSUGGEST_TYPE:function(){return d},addLocation:function(){return H},addLocationForMobileWC:function(){return D},contains:function(){return V},dedup:function(){return _},distance:function(){return y},extractLanguageTag:function(){return N},formatLocation:function(){return P},getAutoSuggestLocationFirstLine:function(){return E},getAutoSuggestLocationSecondLine:function(){return M},getAutoSuggestionName:function(){return L},getDisplayName:function(){return q},getHyperlocalType:function(){return g},headLocation:function(){return U},hyperlocalLabeled:function(){return h},isAbnormalLatLon:function(){return x},isCurrentLocaleName:function(){return R},isHyperlocal:function(){return u},isSameLocationName:function(){return m},isSameLocationPoint:function(){return p},isValid:function(){return T},isValidLatLon:function(){return C},isValidLocationNameStructure:function(){return I},isValidLocationToSuggest:function(){return k},normalizeLatLong:function(){return O},parseDetailShortInfo:function(){return S},removeLocation:function(){return F},reset:function(){return w},resolveNameFromLocalityRegionCountry:function(){return z},shouldIgnoreSubRegion:function(){return v},showReverseName:function(){return G},toDebugString:function(){return $},toDetailShortInfo:function(){return b},toLatLong:function(){return j},transformToClientLocation:function(){return B},truncateFloatTo3Decimal:function(){return f}});var n=i(16517),o=i(54804),a=i(4596),s=i(38573);new Set(["CN","JP","TW"]);const r=new Set(["河北省","山西省","辽宁省","吉林省","黑龙江省","江苏省","浙江省","安徽省","福建省","江西省","山东省","河南省","湖北省","湖南省","广东省","海南省","四川省","贵州省","云南省","陕西省","甘肃省","青海省","台湾省","内蒙古自治区","广西壮族自治区","西藏自治区","宁夏回族自治区","新疆维吾尔自治区"]);var l;!function(e){e[e.HYPERLOCAL=101]="HYPERLOCAL",e[e.NONHYPERLOCAL=102]="NONHYPERLOCAL",e[e.UNKNOWN=103]="UNKNOWN"}(l||(l={}));const d={PLACE:"Place",LOCAL_BUSINESS:"LocalBusiness",ADDRESS:"PostalAddress"},c={ADDRESS:"Address",ROAD:"Road"};function u(e){return e.locationType===l.HYPERLOCAL||e.locationType===l.UNKNOWN}function h(e){return!!(null==e?void 0:e.locationType)&&(e.locationType===l.HYPERLOCAL||e.locationType===l.NONHYPERLOCAL||e.locationType===l.UNKNOWN)}function g(e,t){switch(e){case d.PLACE:return l.NONHYPERLOCAL;case d.LOCAL_BUSINESS:return l.HYPERLOCAL;case d.ADDRESS:return t===c.ADDRESS?l.HYPERLOCAL:t===c.ROAD?l.NONHYPERLOCAL:l.UNKNOWN;default:return l.UNKNOWN}}function p(e,t,i=!1){if(e&&t){let n=""+(e[0]||e.latitude),o=""+(t[0]||t.latitude),a=""+(e[1]||e.longitude),s=""+(t[1]||t.longitude);return i&&(n=f(n).toString(),a=f(a).toString(),o=f(o).toString(),s=f(s).toString()),n===o&&a==s}return!1}function m(e,t){return!(!e||!t)&&q(e)===q(t)}function f(e){const t="number"==typeof e?e:parseFloat(e);return Math.trunc(1e3*t)/1e3}function v(e){return(0,s.vt)(e)}function y(e,t){function i(e){const t=Math.sin(e/2);return t*t}function n(e){return e*Math.PI/180}t=t||{};const o=[n(+(e=e||{}).latitude),n(+e.longitude)],a=[n(+t.latitude),n(+t.longitude)],s=i(Math.abs(o[0]-a[0]))+Math.cos(o[0])*Math.cos(a[0])*i(Math.abs(o[1]-a[1]));return 12742*Math.asin(Math.sqrt(s))}function b(e,t=!1){return(0,s.gl)(e,t)}function S(e,t=!1){return(0,s.$i)(e,t)}function w(e){const t=e||{};Object.keys(t).forEach((e=>{t[e]=null}))}function T(e){return(0,s.JY)(e)}function C(e){return(0,s.JY)(e)}function x(e){return(void 0!==e.latitude||void 0!==e.longitude)&&(!C(e)||""+e.latitude=="-1"&&""+e.longitude=="-1")}function k(e){var t;if("zh-cn"===(null===(t=null==e?void 0:e.language)||void 0===t?void 0:t.toLowerCase())){if(!(null==e?void 0:e.country))return!1;if(null==e?void 0:e.addressLine){if(!(null==e?void 0:e.locality)&&!(null==e?void 0:e.subRegion)&&!(null==e?void 0:e.region)&&r.has(e.addressLine))return!1}else if(!(null==e?void 0:e.subRegion)&&!(null==e?void 0:e.region)&&r.has(null==e?void 0:e.locality))return!1}return!(!e||!e.addressLine&&!e.locality)}function $(e){if(e)return e.el?`el=[${e.el}]`:`lat=${e.latitude},long=${e.longitude}`}function O(e,t){return(0,s.br)(e,t)}function L(e){if(e){if(e.autoSuggestionName)return e.autoSuggestionName;return z(e,{enforceSmallLocaleFirst:!0})}}function I(e){const t=n.jG.AppType;return["windowsShell","windows","newsAndInterests","windowsNewsPlus","winWidgets"].indexOf(t)>=0?!(!e||!(e.addressLine||e.locality||e.region)):"zh-cn"===e.language||"CN"===e.isoCode?!(!e||!(e.addressLine||e.locality||e.subRegion||e.addressLine)):!(!e||!e.locality&&!e.addressLine)}function A(e,t){var i;const o=null===(i=null===n.jG||void 0===n.jG?void 0:n.jG.LocaleContentMarket)||void 0===i?void 0:i.market,a=(e.isoCode||"").toUpperCase(),s=a&&o&&o.substr(-a.length).toUpperCase()===a,r=[e.addressLine,e.locality,!v(e.isoCode)&&e.subRegion,!(null==t?void 0:t.skipRegionAndCountry)&&e.region,!(null==t?void 0:t.skipRegionAndCountry)&&!s&&e.country].filter((e=>!!e));return r.filter(((e,t)=>e!==r[t+1]))}function E(e){return A(e)[0]}function M(e){return A(e).slice(1).join(", ")}function P(e,t){const i=A(e,t);return G(e.language)&&i.reverse(),i.join(", ")}function D(e,t){if(!t)return e;if(!e||!e.length)return[t];e=e||[];const i=t.isDetected?[t,...e]:[e[0],t,...e.slice(1)],n={},o=[];for(let e=0;e<i.length;++e){const t=q(i[e]),a=`${i[e].latitude},${i[e].longitude}`;n[t]||n[a]||(0!=e&&(i[e].isDetected=!1),o.push(i[e]),n[t]=e+1,n[a]=e+1)}return o}function H(e,t){if(!t)return e;e=e||[];const i=[Object.assign({},t),...e],n={},o=[];for(let e=0;e<i.length;++e){const t=q(i[e]),a=`${i[e].latitude},${i[e].longitude}`;n[t]||n[a]||(o.push(i[e]),n[t]=e+1,n[a]=e+1)}return o}function F(e,t){if(!e||!t)return e;for(let i=0;i<e.length;++i)if(q(e[i])===q(t)||e[i].latitude===t.latitude&&e[i].longitude===t.longitude){e.splice(i,1);break}return e}function R(e){const t=o.Al.Locale;return e&&e.language&&(e.language===t||/en-/i.test(e.language)&&/en-/i.test(t))}function N(e){return(/,g=([a-z]+-[a-z]+)$/i.exec(e)||[])[1]}function U(){if(o.Al.ClientSettings&&o.Al.ClientSettings.geo_lat&&o.Al.ClientSettings.geo_long&&""!==o.Al.ClientSettings.geo_lat&&""!==o.Al.ClientSettings.geo_long){const e={latitude:o.Al.ClientSettings.geo_lat,longitude:o.Al.ClientSettings.geo_long,locality:o.Al.ClientSettings.geo_city,region:o.Al.ClientSettings.geo_subdivision,country:o.Al.ClientSettings.geo_countryname,isoCode:o.Al.ClientSettings.geo_country,isDetected:!0,language:"en-us"};return e.region=(0,a.abbreviateUSState)(e.region,e.language,e.isoCode),e.displayName=q(e),e}return null}function j(e){return`${e.latitude},${e.longitude}`}function B(e){return e?{country:e.Country,region:e.State,addressLine:e.AddressLine,locality:e.City,subRegion:e.SubRegion,postalCode:e.PostalCode,isoCode:e.CountryCode,latitude:e.Latitude,longitude:e.Longitude,displayName:void 0,language:e.Language||o.Al.Locale}:{}}function z(e,t){return(0,s.zl)(e,t)}function G(e){return(0,s.EC)(e)}function q(e,t){return(0,s.Gf)(e,t)}function V(e,t){if(!e)return!1;for(const i of e)if(p(i,t))return!0;return!1}function _(e){if(!e)return[];const t=new Set,i=[];for(const n of e){const e=q(n);t.has(e)||(t.add(e),i.push(n))}return i}},4596:function(e,t,i){"use strict";i.r(t),i.d(t,{abbreviateUSState:function(){return o},toCamelCase:function(){return a}});const n={Alabama:"AL",Alaska:"AK",Arizona:"AZ",Arkansas:"AR",California:"CA",Colorado:"CO",Connecticut:"CT",Delaware:"DE",Florida:"FL",Georgia:"GA",Hawaii:"HI",Idaho:"ID",Illinois:"IL",Indiana:"IN",Iowa:"IA",Kansas:"KS",Kentucky:"KY",Louisiana:"LA",Maine:"ME",Maryland:"MD",Massachusetts:"MA",Michigan:"MI",Minnesota:"MN",Mississippi:"MS",Missouri:"MO",Montana:"MT",Nebraska:"NE",Nevada:"NV","New Hampshire":"NH","New Jersey":"NJ","New Mexico":"NM","New York":"NY","North Carolina":"NC","North Dakota":"ND",Ohio:"OH",Oklahoma:"OK",Oregon:"OR",Pennsylvania:"PA","Rhode Island":"RI","South Carolina":"SC","South Dakota":"SD",Tennessee:"TN",Texas:"TX",Utah:"UT",Vermont:"VT",Virginia:"VA",Washington:"WA","West Virginia":"WV",Wisconsin:"WI",Wyoming:"WY","American Samoa":"AS","District of Columbia":"DC",Guam:"GU","Marshall Islands":"MH","Northern Mariana Island":"MP","Puerto Rico":"PR","Virgin Islands":"VI"};function o(e,t,i){return"US"!==i&&"us"!==i||"en-us"!==t?e:n[e]||e}function a(e,t){return e&&JSON.parse(JSON.stringify(e,(function(e,i){if(i&&"object"==typeof i&&!Array.isArray(i)){const e={};for(const n in i)if(Object.hasOwnProperty.call(i,n)){e[t&&t[n]||n&&n.charAt(0).toLowerCase()+n.substring(1)]=i[n]}return e}return i})))}},38573:function(e,t,i){"use strict";i.d(t,{$i:function(){return b},DF:function(){return c},EC:function(){return u},Gf:function(){return s},JY:function(){return f},XA:function(){return S},aQ:function(){return l},br:function(){return y},gl:function(){return g},mH:function(){return r},vt:function(){return m},zl:function(){return d}});var n=i(16517),o=i(65135),a=i(26415);function s(e,t){if(e)return e.displayName?e.displayName:d(e,t)}function r(e,t){const i=e&&e.displayName,n=c(e,{enforceOnlySmallLocal:!0}),s=n.length>0?n[0]:i;return s||o.M0.sendAppErrorEvent(Object.assign(Object.assign({},a.s$v),{message:`ShortlocationNameArr: ${n}.\n             CurrentLocation: ${JSON.stringify(e)}. \n             Error: Short location name in ${t} is empty.`})),s}function l(e){return`${e.latitude},${e.longitude}`}function d(e,t){return c(e,t).join(", ")}function c(e,t){const i=!t||!t.skipLocale,o=!(null==t?void 0:t.skipAddressLine),a=n.jG&&n.jG.LocaleContentMarket&&n.jG.LocaleContentMarket.market,s=(e.isoCode||"").toUpperCase(),r=s&&a&&a.substr(-s.length).toUpperCase()===s,l=m(e.isoCode)?null:e.subRegion,d=[o&&e.addressLine,i?e.locality:"",l,e.region,e.country].filter((e=>!!e));let c=0;for(;d[c+1];)d[c+1]===d[c]?d.splice(c+1,1):c++;const h="CN"==(null==a?void 0:a.toUpperCase())?1:2;if(e.country&&r&&d.length>h&&d.splice(-1,1),t&&t.enforceOnlySmallLocal&&d.length>0){return[/,/.test(d[0])?d[0].split(",")[0]:d[0]]}return t&&t.enforceSmallLocaleFirst||u(e.language)&&d.reverse(),d}function u(e){return e&&h.has(e.toUpperCase())}const h=new Set(["ZH-CN","KO-KR","JA-JP"]);function g(e,t=!1){const i={a:e.addressLine,l:e.locality,r:e.region,r2:e.subRegion,c:e.country,i:e.isoCode,t:e.locationType,g:e.language,x:t?e.longitude:void 0,y:t?e.latitude:void 0,n:n.jG.isMiniProgram?e.displayName:void 0},o=JSON.stringify(i,((e,t)=>null!=t&&""!==t?t:void 0));return"{}"!==o?o:void 0}const p=new Set(["CN","JP","TW"]);function m(e){return!p.has((e||"").toUpperCase())}function f(e){const t=parseFloat(null==e?void 0:e.latitude),i=parseFloat(null==e?void 0:e.longitude);return v(t,-85,85)&&v(i,-180,180)&&(0!==t||0!==i)}function v(e,t,i){return!isNaN(e)&&e>=t&&e<=i}function y(e,t){return{latitude:""+parseFloat(e),longitude:""+parseFloat(t)}}function b(e,t=!1){if(e)try{const i=JSON.parse(e),o={};return o.addressLine=i.a,o.locality=i.l,o.region=i.r,o.subRegion=i.r2,o.country=i.c,o.isoCode=i.i,o.locationType=i.t,o.language=i.g,t&&(o.latitude=i.y,o.longitude=i.x),n.jG.isMiniProgram&&(o.displayName=i.n),o}catch(e){return}}function S(e,t){return w(null==e?void 0:e.longitude,null==t?void 0:t.longitude)&&w(null==e?void 0:e.latitude,null==t?void 0:t.latitude)}function w(e,t){return!(!e||!t)&&T(e)===T(t)}function T(e){const t=parseFloat(e),i=Math.pow(10,6);return Math.round(t*i)/i}},53909:function(e,t,i){"use strict";i.d(t,{D3:function(){return s},KL:function(){return c},mL:function(){return g},pG:function(){return l},q3:function(){return d},vc:function(){return r},zz:function(){return u}});var n=i(12697),o=i(80983);let a;var s,r;!function(e){e.JPG="jpg",e.PNG="png"}(s||(s={})),function(e){e[e.None=0]="None",e[e.Letterbox=1]="Letterbox",e[e.Scale=2]="Scale",e[e.Stretch=3]="Stretch",e[e.Crop=4]="Crop",e[e.FocalCrop=5]="FocalCrop",e[e.FacialCrop=6]="FacialCrop"}(r||(r={}));const l=90,d="www.bing.com/th",c=new RegExp(/bing\.(com|net)\/th/);function u(e,t){return g(((0,o.P)()?"//img-s.msn.cn/tenant/amp/entityid/":"//img-s-msn-com.akamaized.net/tenant/amp/entityid/")+e,t)}const h=Math.ceil(4*Math.random())||4;function g(e,t){if(e&&c.test(e))return function(e,t){try{return p(new URL(e),t).href}catch(i){const n=p(new URL(`https://${e}`),t);return`//${n.host}${n.pathname}${n.search}`}}(e,t);const{focalRegion:i,backgroundColor:o}=t;let{width:r=0,height:l=0,format:d=s.JPG}=t,u="";if(i){const e=f(i.x1,i.x2),t=f(i.y1,i.y2);null!=e&&null!=t&&(u+=`&x=${e}&y=${t}`)}o&&(u+=`&b=${o}`);const h=null==t.mode?6:t.mode;if(6===h&&(u+="&u=t"),t.enableDpiScaling){if(!t.devicePixelRatio)throw new Error("A valid devicePixelRatio value must be provided when DPI scaling is enabled");const e=function(e){if(m()&&a)return a;if(e<1)return null;let t=e;(0,n.Z)(4*t)