           fill="url(#paint0_linear)"
                />
                <ellipse
                    cx="8.00015"
                    cy="11.9998"
                    rx="5.6"
                    ry="5.59986"
                    fill="url(#paint1_linear)"
                />
                <defs>
                    <linearGradient
                        id="paint0_linear"
                        x1="8"
                        y1="4.00002"
                        x2="8"
                        y2="19.9996"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stop-color="#C08000" />
                        <stop offset="1" stop-color="#E2A62E" />
                    </linearGradient>
                    <linearGradient
                        id="paint1_linear"
                        x1="8.00015"
                        y1="6.3999"
                        x2="8.00015"
                        y2="17.5996"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stop-color="#C08000" />
                        <stop offset="1" stop-color="#E2A62E" />
                    </linearGradient>
                </defs>
            </svg>`;case u:return o.d`<svg
                width="16"
                height="20"
                viewBox="0 0 16 20"
                fill="none"
                xmlns="http://www.w3.org/2000/svg"
            >
                <g clip-path="url(#clip0)">
                    <path
                        fill-rule="evenodd"
                        clip-rule="evenodd"
                        d="M1 1H4.85646L8 4.1977L11.2839 1H15L8 8L1 1Z"
                        fill="#767676"
                    />
                    <ellipse
                        cx="8"
                        cy="11.9998"
                        rx="8"
                        ry="7.99981"
                        fill="url(#paint0_linear1)"
                    />
                    <ellipse
                        cx="7.99985"
                        cy="11.9999"
                        rx="5.6"
                        ry="5.59986"
                        transform="rotate(-180 7.99985 11.9999)"
                        fill="url(#paint1_linear1)"
                    />
                </g>
                <defs>
                    <linearGradient
                        id="paint0_linear1"
                        x1="8"
                        y1="4"
                        x2="8"
                        y2="19.9996"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stop-color="#A9A9A9" stop-opacity="0.99" />
                        <stop offset="1" stop-color="#767676" />
                    </linearGradient>
                    <linearGradient
                        id="paint1_linear1"
                        x1="7.99985"
                        y1="6.40001"
                        x2="7.99985"
                        y2="17.5997"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stop-color="#A9A9A9" stop-opacity="0.99" />
                        <stop offset="1" stop-color="#767676" />
                    </linearGradient>
                    <clipPath id="clip0">
                        <rect width="16" height="20" fill="white" />
                    </clipPath>
                </defs>
            </svg>`;case h:return o.d`<svg
                width="16"
                height="20"
                viewBox="0 0 16 20"
                fill="none"
                xmlns="http://www.w3.org/2000/svg"
            >
                <g clip-path="url(#clip3)">
                    <path
                        fill-rule="evenodd"
                        clip-rule="evenodd"
                        d="M1 1H4.85646L8 4.1977L11.2839 1H15L8 8L1 1Z"
                        fill="#973A0C"
                    />
                    <ellipse
                        cx="8"
                        cy="11.9998"
                        rx="8"
                        ry="7.99981"
                        fill="url(#paint0_linear2)"
                    />
                    <ellipse
                        cx="7.99985"
                        cy="11.9999"
                        rx="5.6"
                        ry="5.59986"
                        transform="rotate(-180 7.99985 11.9999)"
                        fill="url(#paint1_linear2)"
                    />
                </g>
                <defs>
                    <linearGradient
                        id="paint0_linear2"
                        x1="8"
                        y1="4"
                        x2="8"
                        y2="19.9996"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stop-color="#D57D2C" />
                        <stop offset="1" stop-color="#852C00" />
                    </linearGradient>
                    <linearGradient
                        id="paint1_linear2"
                        x1="7.99985"
                        y1="6.40001"
                        x2="7.99985"
                        y2="17.5997"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stop-color="#D57D2C" />
                        <stop offset="1" stop-color="#852C00" />
                    </linearGradient>
                    <clipPath id="clip3">
                        <rect width="16" height="20" fill="white" />
                    </clipPath>
                </defs>
            </svg>`;default:return null}}(0,a.gn)([(0,i.Lj)({attribute:"card-layout"})],y.prototype,"cardLayout",void 0),(0,a.gn)([i.Lj],y.prototype,"cardType",void 0),(0,a.gn)([(0,i.Lj)({attribute:"clickthrough-target"})],y.prototype,"clickthroughTarget",void 0),(0,a.gn)([n.LO],y.prototype,"headerTitle",void 0),(0,a.gn)([n.LO],y.prototype,"headerTitleUrl",void 0),(0,a.gn)([n.LO],y.prototype,"seeMoreUrl",void 0),(0,a.gn)([n.LO],y.prototype,"seeMoreText",void 0),(0,a.gn)([n.LO],y.prototype,"olympicsResultsData",void 0),(0,a.gn)([n.LO],y.prototype,"olympicsMedalData",void 0),(0,a.gn)([n.LO],y.prototype,"matchTelemetryTags",void 0),(0,a.gn)([n.LO],y.prototype,"headerTelemetryTag",void 0),(0,a.gn)([n.LO],y.prototype,"seeMoreTelemetryTag",void 0);o.d`<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
    <path d="M14.82 8.7l.85-1.48-1.47-.85-.85 1.47 1.47.85z" />
    <path d="M14.5 3.5v1.7h1.7V3.5h-1.7z" />
    <path d="M12.49 17.38l2.01-1.16-.31-.54-2.01 1.16.3.54z" />
    <path d="M17.38 10.17H18V7.84h-.62v2.33z" />
    <path d="M15.67 14.2l.54.31 1.16-2.01-.54-.31-1.16 2z" />
    <path d="M11.02 14.2v2.32h.62V14.2h-.62z" />
    <path d="M14.2 15.68l1.47-1.48-.85-.85-1.47 1.48.85.85z" />
    <path d="M14.2 11.02l1.47-1.48-.85-.85-1.47 1.48.85.85z" />
    <path d="M13.34 12.5l-1.16-.31-.54 2.01 1.16.31.54-2.01z" />
    <path d="M16.84 12.18l.54-2.01-1.16-.31-.54 2.01 1.16.31z" />
    <path d="M16.21 5.2l-.54 2 1.17.32.54-2.01-1.17-.32z" />
    <path d="M12.49 4.66l-.31 1.16 2.01.54.31-1.16-2.01-.54z" />
    <path d="M5.82 4.12h-1.7v1.7h1.7v-1.7z" />
    <path d="M1.47 6.98l1.48-.85-.85-1.47-1.48.85.85 1.47z" />
    <path d="M14.5 1.8l-2-1.17-.32.54 2.01 1.16.32-.54z" />
    <path d="M5.51.63L3.5 1.79l.3.54 2.02-1.16-.31-.54z" />
    <path d="M10.17 0H7.84v.62h2.33V0z" />
    <path d="M14.2 2.95l-2.02 1.17.31.54 2.02-1.17-.31-.54z" />
    <path d="M12.18 1.17L10.17.63l-.32 1.16 2.02.54.3-1.16z" />
    <path d="M8.14 3.5l-2-.55-.32 1.17 2.01.54.31-1.17z" />
    <path d="M9.85 3.5l.31 1.16 2.02-.54-.31-1.17-2.02.54z" />
    <path d="M7.84.63l-2.02.54.31 1.16 2.02-.54L7.84.63z" />
    <path d="M3.8 2.95L1.8 3.5l.3 1.17 2.02-.54-.3-1.17z" />
    <path d="M3.5 8.15l1.15-.3-.53-2.02-1.17.3.54 2.02z" />
    <path d="M6.36 14.2l.85 1.47 1.47-.85-.85-1.47-1.47.85z" />
    <path d="M11.02 16.53l-1.48-.86-.85 1.48 1.47.85.86-1.47z" />
    <path d="M.62 7.84H0v2.32h.62V7.84z" />
    <path d="M3.5 16.22l2 1.16.32-.54-2.02-1.16-.3.54z" />
    <path d="M.62 12.5l1.16 2.01.54-.31-1.16-2.01-.54.3z" />
    <path d="M3.5 8.15L1.47 7l-.31.54 2.01 1.16.31-.54z" />
    <path d="M2.33 11.87l-.54-2.01-1.16.3.54 2.02 1.16-.3z" />
    <path d="M4.66 12.5l.53 2.01 1.17-.31-.54-2.01-1.16.3z" />
    <path d="M4.66 10.16L3.18 8.7l-.85.85 1.47 1.47.86-.85z" />
    <path d="M2.33 14.2l1.47 1.47.85-.85-1.47-1.47-.85.85z" />
    <path d="M6.36 16.53L7.83 18l.85-.85-1.47-1.48-.85.86z" />
    <path d="M11.02 14.2l-.86-.85-1.47 1.47.85.85 1.48-1.47z" />
    <path d="M14.2 11.02l-.85 1.47 1.47.85.85-1.47-1.47-.85z" />
    <path d="M12.8 14.5l-1.16 2.02.54.31 1.16-2.01-.54-.31z" />
    <path d="M15.67 9.54l.54.31 1.16-2.01-.54-.32-1.16 2.02z" />
    <path d="M9.85 1.79h-1.7v1.7h1.7v-1.7z" />
    <path d="M11.87 2.96h2.32v-.63h-2.32v.63z" />
    <path d="M6.13 2.33H3.8v.63h2.32v-.63h.01z" />
    <path d="M4.66 12.5l-.86-1.48-1.47.85.85 1.48 1.48-.85z" />
    <path d="M2.33 9.54L1.17 7.52l-.54.32 1.16 2.01.54-.31z" />
    <path d="M4.66 14.82l1.16 2.02.54-.31-1.17-2.02-.53.31z" />
    <path d="M15.56 15.61h.2v.5h.06v-.5h.2v-.04h-.46v.04z" />
    <path
        d="M16.5 15.56l-.16.4-.18-.4h-.08v.55h.06v-.43l.15.35h.07l.14-.36v.45h.06v-.55h-.06v-.01z"
    />
</svg>`;var v=r(53046),w=r(56201),S=r(40082),x=r(32804),b=r(22674),C=r(95263),$=r(13543);const T=v.i`
    .header-action-button {
        right: 12px;
        left: unset;
    }
    .score {
        flex-direction: row;
    }
    .result-header-title,
    .medal-total {
        text-align: right;
    }
`,D=v.i`
    .header-action-button {
        left: 12px;
        right: unset;
    }
    .score {
        flex-direction: row-reverse;
    }
    .result-header-title,
    .medal-total {
        text-align: left;
    }
`;var O=r(13988),k=r(18864);const M=o.d`
    <slot name="olympics-header-icon"></slot>
    <a
        class="header-title"
        href="${e=>e.headerTitleUrl}"
        target=${e=>e.clickthroughTarget}
        data-t="${e=>e.headerTelemetryTag}"
    >
        ${e=>e.headerTitle}
    </a>
    <div class="header-action-button">
        <slot name="more-actions" tabindex="1"></slot>
    </div>
`,U=o.d`
    <fluent-anchor
        class="sd-action"
        part="sd-action"
        title=${e=>e.seeMoreText}
        href=${e=>e.seeMoreUrl}
        target=${e=>e.clickthroughTarget}
        data-t="${e=>e.seeMoreTelemetryTag}"
    >
        ${e=>e.seeMoreText}
    </fluent-anchor>
`,I=o.d`
    <div class="participant ${(e,t)=>e.rank<4&&e.rank>0&&t.index<4?"":"participant-last"} tabindex="1">
        <div class="participant-rank" alt="${e=>e.rank}" title="${e=>e.rank}">
            ${(0,O.g)((e=>e.rank<4&&e.rank>0),o.d`<div class="rank-index">${e=>e.rank}</div>`)}
            ${e=>f(e.rank)||(e.rank>0?e.rank:"-")}
        </div>
        <div class="participant-image">
            <img
                role="presentation"
                src="${e=>e.imageUrl}"
                alt="${e=>e.participant||e.country}"
            />
        </div>
        <div class="participant-name" title="${e=>e.participant||e.country}">
            ${e=>e.participant||e.country}
        </div>
        <div class="participant-score" title="${e=>e.score}">
            ${e=>e.score}
        </div>
    </div>
`,P=o.d`
    <div class=${e=>e.selectedCountry?"medal-line medal-line-local":"medal-line"}>
        <div class="medal-index">
            ${e=>e.rank>0?e.rank:"-"}
        </div>
        <div class="country-icon">
            <img role="presentation" src="${e=>e.imageUrl}" alt="${e=>e.country}" />
        </div>
        <div class="country-name" title="${e=>e.country}">
            ${e=>e.country}
        </div>
        <div class="medal-count">
            ${e=>e.goldMedalCount}
        </div>
        <div class="medal-count">
            ${e=>e.silverMedalCount}
        </div>
        <div class="medal-count">
            ${e=>e.bronzeMedalCount}
        </div>
        <div class="medal-count count-total">
            ${e=>e.totalMedalCount}
        </div>
    </div>
`,E=o.d`
    <a
        class="medal-data"
        href="${e=>e.olympicsMedalData.medalUrl}"
        target="${e=>e.clickthroughTarget}"
        data-t="${e=>e.olympicsMedalData.medalTelemetryTag}"
    >
        <div class="medal-header">
            <div class="result-title" title="${e=>e.olympicsMedalData.medalTitle}">
                ${e=>e.olympicsMedalData.medalTitle}
            </div>
            <div class="medal-icon">
                ${f(p)}
            </div>
            <div class="medal-icon">
                ${f(u)}
            </div>
            <div class="medal-icon">
                ${f(h)}
            </div>
            <div class="medal-total" title="${e=>e.olympicsMedalData.total}">
                ${e=>e.olympicsMedalData.total}
            </div>
        </div>
        <div class="medal-list">
            ${(0,k.rx)((e=>e.olympicsMedalData.countryMedals),P,{positioning:!0})}
        </div>
    </a>
`,F=o.d`
    <a
        href="${e=>e.olympicsResultsData.resultLink}"
        target="${e=>e.clickthroughTarget}"
        data-t="${e=>{var t;return null===(t=e.olympicsResultsData)||void 0===t?void 0:t.eventTelemetryTag}}">
        <div class="result-header">
            <div class="result-title" title="${e=>e.olympicsResultsData.game.name}">
                ${e=>e.olympicsResultsData.game.name}
            </div>
            <div class="result-header-title">
                ${e=>e.olympicsResultsData.resultTitle}
            </div>
        </div>
        ${(0,k.rx)((e=>e.olympicsResultsData.participants),I,{positioning:!0})}
    </a>
`,A=o.d`
    ${(0,O.g)(((e,t)=>t.index%2>0),o.d` <a
            class="result-group"
            href="${(e,t)=>t.parent.olympicsResultsData.game.clickthroughUrl}"
        >
            <div class="result-match" tabindex="1">
                <div class="match-participants">
                    <div class="match-participant">
                        <div
                            class="participant-rank"
                            alt="${e=>e.rank}"
                            title="${e=>e.rank}"
                        >
                            ${(0,O.g)((e=>e.rank<=4),o.d`<div class="rank-index">${e=>e.rank-1}</div>`)}
                            ${(e,t)=>f(t.parent.olympicsResultsData.participants[t.index-1].rank)||t.parent.olympicsResultsData.participants[t.index-1].rank}
                        </div>
                        <div class="country-icon">
                            <img
                                role="presentation"
                                src="${(e,t)=>t.parent.olympicsResultsData.participants[t.index-1].imageUrl}"
                                alt="${(e,t)=>t.parent.olympicsResultsData.participants[t.index-1].participant}"
                            />
                        </div>
                        <div
                            class="country-name"
                            title="${(e,t)=>t.parent.olympicsResultsData.participants[t.index-1].country}"
                        >
                            ${(e,t)=>t.parent.olympicsResultsData.participants[t.index-1].country}
                        </div>
                        <div class="score">
                            <div
                                class="winner"
                                title="${(e,t)=>t.parent.olympicsResultsData.participants[t.index-1].score}"
                            >
                                ${(e,t)=>t.parent.olympicsResultsData.participants[t.index-1].score}
                            </div>
                            <div class="winner-tag">
                                ${(0,O.g)(((e,t)=>1==t.parent.olympicsResultsData.participants[t.index-1].isWinner),o.d`
                                        <svg
                                            width="5"
                                            height="10"
                                            viewBox="0 0 5 10"
                                            fill="none"
                                            xmlns="http://www.w3.org/2000/svg"
                                        >
                                            <path d="M5 0L0 5.21739L5 10V0Z" />
                                        </svg>
                                    `)}
                            </div>
                        </div>
                    </div>
                    <div class="match-participant">
                        <div
                            class="participant-rank"
                            alt="${e=>e.rank}"
                            title="${e=>e.rank}"
                        >
                            ${(0,O.g)((e=>e.rank<4),o.d`<div class="rank-index">${e=>e.rank}</div>`)}
                            ${(e,t)=>f(e.rank)||e.rank}
                        </div>
                        <div class="country-icon">
                            <img
                                role="presentation"
                                src="${(e,t)=>e.imageUrl}"
                                alt="${(e,t)=>e.participant}"
                            />
                        </div>
                        <div class="country-name" title="${e=>e.country}">
                            ${(e,t)=>e.country}
                        </div>
                        <div class="score" title="${e=>e.score}">
                            ${(e,t)=>e.score}
                        </div>
                    </div>
                </div>
                <div class="match-info">
                    <div class="match-state">
                        ${(e,t)=>t.parent.olympicsResultsData.game.state}
                    </div>
                    <div class="match-date">
                        ${(e,t)=>t.parent.olympicsResultsData.game.gameDate}
                    </div>
                </div>
            </div>
        </a>`)}
`,L=o.d`
    <div
        class="${e=>e.olympicsResultsData.participants.length>2?"result-title":"result-title-flat"}"
        title="${e=>e.olympicsResultsData.game.name}"
    >
        ${e=>e.olympicsResultsData.game.name}
    </div>
    ${(0,k.rx)((e=>e.olympicsResultsData.participants),A,{positioning:!0})}
`,H=o.d`
    ${(0,O.g)((e=>e.olympicsResultsData.type==m),F)}
    ${(0,O.g)((e=>e.olympicsResultsData.type==g),L)}
`,z=y.compose({baseName:"sports-olympics-card",template:(e,t)=>o.d`
    <div class="olympics-card">
        <div class="header">
            ${M}
        </div>
        <div
            class="${e=>{var t;return e.cardType==c&&(null===(t=e.olympicsResultsData)||void 0===t?void 0:t.type)==g?e.olympicsResultsData.participants.length>2?"team-data":"team-data-flat":"data"}}"
        >
            ${(0,O.g)((e=>e.cardType==c),H)}
            ${(0,O.g)((e=>e.cardType==d),E)}
        </div>
        <div class="footer">
            ${U}
        </div>
    </div>
`,styles:(e,t)=>v.i`
    ${$.U}
    :host {
        font-family: ${x.SVJ};
    }

    .olympics-card {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        height: 100%;
        background: ${C.Sf};
        padding: 16px 0;
    }

    .olympics-card a {
        cursor: pointer;
        color: currentcolor;
        text-decoration: none;
    }

    .header {
        display: flex;
        flex-direction: row;
        min-height: 24px;
        padding: 0 16px;
    }

    ::slotted([slot="sports-header-icon"]) {
        padding-inline-end: 6px;
        margin-top: 6px;
    }

    .header-title {
        color: currentcolor;
        opacity: .83;
        text-decoration: none;
        font-weight: 500;
        text-transform: uppercase;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-inline-end: 20px;
    }

    .header-action-button {
        z-index: 2;
        display: flex;
        position: absolute;
    }

    .header-title:hover,
    .header-title:active,
    .header-title:${w.b} {
        text-decoration: underline;
        outline: none;
    }

    .data,
    .team-data,
    .team-data-flat {
        font-size: var(--type-ramp-minus-1-font-size);
        line-height: var(--type-ramp-minus-1-line-height);
        margin: 0px 16px;
        border-radius: 4px;
    }

    .team-data {
        display: grid;
        grid-template-rows: 40px auto 88px;
    }

    .team-data-flat {
        display: grid;
        grid-template-rows: 24px auto;
    }

    .result-group {
        border-radius: 4px;
        display: inline-grid;
        text-decoration: none;
        color: currentcolor;
    }

    .result-title {
        padding: 8px 0;
        font-size: ${x.sNp};
        line-height: ${x.vgC};
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
    }

    .result-title-flat {
        padding: 4px 0;
    }

    .result-header {
        grid-template-columns: 172px auto;
        align-items: center;
        padding: 6px 0;
        display: grid;
        font-weight: 600;
    }

    .medal-header,
    .medal-line,
    .participant,
    .match-participant {
        display: grid;
        grid-column-gap: 12px;
        align-items: center;
    }

    .medal-header {
        grid-template-columns: 138px repeat(3, 16px) 34px;
        padding: 4px 0;
        align-items: center;
    }

    .result-header-title,
    .medal-total {
        text-transform: capitalize;
        font-size: ${x.G8g};
        line-height: ${x.MwG};
        text-align: right;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
    }

    .rank-index {
        position: absolute;
        color: white;
        font-size: 11px;
        height: 20px;
        padding-top: 8px;
    }
    .medal-icon,
    .medal-count,
    .participant-rank,
    .participant-score {
        justify-content: center;
        align-items: center;
        display: flex;
    }

    .participant .participant-score {
        justify-content: flex-end;
        width: 100px;
    }

    .count-total {
        font-weight: 500;
        justify-content: flex-end;
    }

    .medal-line {
        padding: 4px 0;
        padding-block-end: 14px;
        grid-template-columns: 16px 24px auto repeat(3, 16px) 34px;
    }

    .medal-line:last-child {
        padding-block-end: 4px;
    }

    .medal-line-local {
        font-weight: 600;
    }

    .participant {
        padding-block-end: 20px;
        grid-template-columns: 20px 24px auto 100px;
    }

    .medal-line,
    .match-participant:first-child,
    .winner {
        font-weight: 600;
    }

    .participant.participant-last {
        padding-block-end: 8px;
    }

    .participant:nth-of-type(1) {
        font-weight: 600;
    }

    .country-icon,
    .participant-image {
        width: 24px;
        height: 16px;
    }

    .country-icon>img,
    .participant-image>img {
        width: 100%;
    }

    .medal-index,
    .country-name,
    .participant-name {
        font-size: ${x.cSu};
        line-height: ${x.RUt};
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .medal-index {
        text-align: center;
    }

    .result-match {
        display: flex;
        align-items: center;
    }

    .match-participant {
        grid-template-columns: 24px 28px auto 40px;
    }

    .match-participants {
        width: calc(100% - 64px);
    }

    .match-info {
        font-size: ${x.sNp};
        line-height: ${x.vgC};
        width: 64px;
        color: ${x.CHi};
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
    }

    .match-state,
    .match-date {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        color: ${x.CHi};
    }

    .score {
        display: flex;
        flex-direction: row;
    }

    .winner {
        padding-inline-end: 4px;
    }

    .winner-tag {
        padding-inline-end: 4px;
        width: 5px;
        height: 24px;
    }

    .winner-tag > svg > path {
        fill: currentColor;
    }

    .footer {
        display: flex;
        justify-content: center;
        height: 24px;
        box-sizing: border-box;
        position: absolute;
        bottom: 8px;
        width: 100%;
        padding: 0px 16px;
    }

    ::slotted([slot="olympics-header-icon"]) {
        width: 18px;
        height: 18px;
        padding-top: 8px;
        fill: #ffffff;
    }

    ::slotted([slot="more-actions"]) {
        --control-corner-radius: 20;
        height: 24px;
        width: 24px;
        min-width: 24px;
        background: ${x.wFS};
    }

    ::slotted([slot="more-actions"])::part(control) {
        padding: 0;
    }

    ::slotted([slot="more-actions"]:hover) {
        background: ${x.XiB};
    }

    .sd-action {
        height: 24px;
    }

    .sd-action::part(control) {
        padding: 0 24px;
        width: auto;
    }

    :host([uxstyle="widget"]) .sd-action {
        background: transparent
    }
`.withBehaviors(new b.O(T,D),(0,S.vF)(v.i`
                :host {
                    forced-color-adjust: auto;
                }

                ::slotted([slot="olympics-header-background-image"]) {
                    display: none;
                }
            `))});var R=r(63070),N=r(7511),G=r(69298),j=r(57905),B=r(64690),W=r(12517),q=r(84289),V=r(83227);const _=(0,B.e)(V.x.sportsOlympicCardWC,"Sports Olympic Card Web Component experience",Object.assign(Object.assign(Object.assign({},(0,W.u)({sportsSeeMore:"See More",olympicSeeMore:"See more on Olympics.com",olympicSeeMoreResults:"See more results on Olympics.com",paralympicSeeMore:"See more Paralympics",sportsMoreSetting:"More settings",sportsActionButton:"More options",sportsNotInterested:"Not interested in {0}",sportsHideCard:"Hide sports card",sportsOlympicHeader:"Summer games 2020",sportsOlympicWinterHeader:"Winter games 2022",sportsParalympicWinterHeader:"Winter Paralympics 2022",olympicMedalTitle:"Medal count",olympicTotal:"Total",olympicName:"Summer Games",olympicWinterName:"Winter Games",sportsStateFinal:"Final",sportsOlympic:"Sports",olympicScheduleTitle:"Today's events",olympicSeeMoreSchedule:"See more schedule on Olympics.com",sportsWorldRecord:"World record",sportsOlympicRecord:"Olympic record",sportsOlympicPrevious:"Previous",sportsOlympicNext:"Next"})),(0,q.JJ)("enableCardAction","show action button in olympic card")),(0,q.JJ)("enableHideCard","show hide olympic card menu in action menus")));var Y=r(22938),J=r(38156);const Z={OlympicCard:"SportsOlympicsCard",Header:"header",SeeMore:"seemore",Customization:"cardactionellipsis",MoreSettings:"moresettings",Vertical:"olympic",HideOlympics:"hide_olympic",HideCard:"hide_sports",Country:"country",Participant:"participant",ContentCard:"contentcard",MedalContent:"medal",EventContent:"event",ScheduleContent:"schedule",Previous:"PreviousSlideArrow",Next:"NextSlideArrow"},X="OlympicResults",K="OlympicMedals",Q="OlympicSchedule",ee=1,te=2,re=3,ae="individual",ie="team",ne="WR",oe="OR",se="summer",le="winter",ce="paralympics",de="2022";var pe,ue=r(68364),he=r(26415),me=r(36068),ge=r(53909),ye=r(79703),fe=r(44772),ve=r(16517),we=r(99478);!function(e){function t(t,i,n=1){if(!t||!t.Model||!t.Model.Tabs)return(0,ue.H)(he.PTG,"Sports Olympics card data has no Model or Tabs value."),null;const o=(0,me.pc)(),s={cardType:t.Model.DataType,defaultTabFocus:t.Model.DefaultTabFocus,tabData:[],selectedCountryIndex:0};let l=null,c=null,d=null;return t.Model.Tabs.forEach((t=>{if(t&&t.TabContent){let p=null;try{p=JSON.parse(t.TabContent)}catch(e){return void(0,ue.OO)(e,he.WA8,`Sports Olympics card TabConent parse exception. TabType=${t.TabType} TabContent=${t.TabContent} error=${e&&e.message}`)}if(!p)return void(0,ue.H)(he.WA8,"Sports Olympics card TabConent is null.",` TabType=${t.TabType} TabContent=${t.TabContent}`);const u=function(t,i,n,o,s,l){switch(t){case K:return function(e,t,i,n=5){if(!e||!e.Model||!e.Model.SportsOlympicsCard)return null;let o=[];if(e.Model.SportsOlympicsCard.forEach((t=>{t&&t.Country&&o.push({country:(0,me.Sz)(t.Loc,i,e.Trans),goldMedalCount:t.GoldMedalCount,silverMedalCount:t.SilverMedalCount,bronzeMedalCount:t.BronzeMedalCount,totalMedalCount:t.TotalMedalCount,rank:"-"==t.Rank?-1:t.Rank,imageUrl:a(t.ImageUrl),selectedCountry:"1"==t.SelectedCountry})})),1==n&&o&&o.length>1){const e=o.filter((e=>e.selectedCountry));o=0==e.length?o.slice(0,1):e.slice(0,1)}return{medalTitle:t.olympicMedalTitle,medalUrl:r("medal",i,e.Trans),total:t.olympicTotal,countryMedals:o.slice(0,n),seeMoreUrl:r("seemoremedal",i,e.Trans),seeMoreText:t.paralympicSeeMore}}(i,s,o,l);case X:{const e=function(e,t,i,n=5){if(!e||!e.Model||!e.Model.SportsOlympicsCard)return null;const o=new ye.$,s=e.Model.MsnSportEventOverviewLink||"",l=(0,me.Sz)("OlympicEventName_Trans",i,e.Trans)||"",c=(0,me.Sz)(e.Model.FinalMatchLoc||"",i,e.Trans)||"",d=(0,me.Sz)(e.Model.ThirdPlaceMatchLoc||"",i,e.Trans)||l,p=[];let u=-1;if(e.Model.SportsOlympicsCard.forEach(((t,r)=>{t&&(p.push({country:(0,me.Sz)(`${t.Country}_TeamLocalizedShortName`,i,e.Trans)||t.Country,participant:(0,me.Sz)(t.Loc,i,e.Trans)||t.Participant,score:t.Score,rank:"-"==t.Rank?-1:parseInt(t.Rank),imageUrl:a(t.ImageUrl),isWinner:(0,me.z3)(t.IsWinner),isWorldRecord:(0,me.z3)(t.IsWorldRecord),isOlympicRecord:(0,me.z3)(t.IsOlympicRecord)}),"1"==t.SelectedCountry&&u<0&&(u=r))})),(0,we.TF)(e.Model.FinalOlympicStartDate)){const a={name:l,clickthroughUrl:r("event",i,e.Trans,s)};return{resultsData:{type:ae,resultLink:r("event",i,e.Trans,s),seeMoreUrl:r("seemoreresults",i,e.Trans,s),seeMoreText:t.paralympicSeeMore,game:a,participants:u>=0&&1==n?p.slice(u,u+n):p.slice(0,n),eventId:e.Model.EventId,finalMatchName:c,thirdPlaceMatchName:d},selectedCountryIndex:u}}{const a={name:l,clickthroughUrl:r("event",i,e.Trans,s),gameState:t.sportsStateFinal,gameDate:o.localizedMonthDate(new Date(parseInt(e.Model.FinalOlympicStartDate)),i)};return{resultsData:{type:ie,resultLink:r("event",i,e.Trans,s),game:a,participants:u>=0&&1==n?p.slice(u-u%2,u+u%2==0?2:1):p.slice(0,n),eventId:e.Model.EventId,finalMatchName:c,thirdPlaceMatchName:d},selectedCountryIndex:u}}}(i,s,o,l);return n.selectedCountryIndex=e.selectedCountryIndex,e.resultsData}case Q:return function(t,a,i,n=5){if(!t||!t.Model||!t.Model.SportsOlympicsCard||t.Model.SportsOlympicsCard.length<1)return null;const o=[],s=new ye.$;return t.Model.SportsOlympicsCard.forEach((r=>{if(r){const a=parseInt(r.GameStartDateTime),n=isNaN(a)?new Date:new Date(a);o.push({eventName:(0,me.Sz)(r.Loc,i,t.Trans)||r.EventName,sportName:(0,me.Sz)(r.SportLoc,i,t.Trans)||r.SportName,imageUrl:(0,me.xx)(r.ImageUrl,e.eventImageInfo),eventStartDateTime:r.GameStartDateTime,eventStartDate:s.localizedMonthDate(n,i),eventStartTime:s.formatTimeFromDate(n,i)})}})),o.length>0?{seeMoreUrl:r("seemoreschedule",i,t.Trans),seeMoreText:a.paralympicSeeMore,events:o.slice(0,n),scheduleTitle:a.olympicScheduleTitle,scheduleUrl:r("schedule",i,t.Trans)}:null}(i,s,o,l);default:return(0,ue.H)(he.WA8,"Sports Olympics unknown tab type",` value: dataType=${t} market=${o} tabContent=${i}`),null}}(t.TabType,p,s,o,i,n);u&&(s.tabData.push({tabType:t.TabType,tabContent:u}),s.headerTitleUrl||(s.headerTitleUrl=r("header",o,p.Trans),s.seeMoreText=i.paralympicSeeMore),!l&&p.Model&&(l=p.Model.PrimaryEntityId,c=(0,me.Sz)(p.Model.PrimaryEntityLoc,o,p.Trans),d=p.Model.PrimaryEntityType))}})),{olympicCardData:s,primaryEntityId:l,primaryEntityName:c,primaryEntityType:d}}function r(e,t,r,a=""){let i=t||"en";const n=i.split("-");i=n.length>=1?n[0]:"en";const o=(0,me.Sz)("UrlSegment_verticalname_sports",t,r)||"";switch(e){case"header":{const e=(0,me.Sz)("UrlSegment_olympics_overview",t,r)||"";return ve.jG.IsChinaCompliance||"zh"==i?`https://www.msn.cn/${t}/${o}/${e}`:`https://www.msn.com/${t}/${o}/${e}`}case"medal":case"seemoremedal":{const e=(0,me.Sz)("UrlSegment_olympics_medalcount",t,r)||"";return ve.jG.IsChinaCompliance||"zh"==i?`https://www.msn.cn/${t}/${o}/${e}`:`https://www.msn.com/${t}/${o}/${e}`}case"event":case"seemoreresults":{const e=(0,me.Sz)("UrlSegment_olympics",t,r)||"",n=a||"";return ve.jG.IsChinaCompliance||"zh"==i?`https://www.msn.cn/${t}/${o}/${e}/${n}`:`https://www.msn.com/${t}/${o}/${e}/${n}`}case"schedule":case"seemoreschedule":{const e=(0,me.Sz)("UrlSegment_olympics_schedule",t,r)||"";return ve.jG.IsChinaCompliance||"zh"==i?`https://www.msn.cn/${t}/${o}/${e}/`:`https://www.msn.com/${t}/${o}/${e}`}default:return null}}function a(t){if((0,we.TF)(t))return t;const r=t.indexOf("/");return(0,me.Xy)(t.slice(-1==r?0:r),e.olympicCountryImageInfo)}e.olympicCountryImageInfo={width:24,height:16,enableDpiScaling:!1,format:ge.D3.PNG},e.eventImageInfo={width:22,height:22,enableDpiScaling:!1,format:ge.D3.PNG},e.mapSubCardToSportsOlympicData=function(e,r,a=1,i=null){if(!e||!e.data)return null;let n;try{n=JSON.parse(e.data)}catch(t){(0,ue.OO)(t,he.WA8,`Sports Olympics card parse exception. CardId=${e.id} data=${e.data} error=${t&&t.message}`)}return n?e.type===fe.PL.SportsOlympics?t(n,r,a):((0,ue.H)(he.WA8,"Sports Olympics card unknown type",` value: type=${e.type}`),null):((0,ue.H)(he.PTG,"Sports Olympics card data has no value."),null)},e.transformSportsOlympicDataWithTrans=t,e.getOlympicsUrl=function(e,t,r,a=""){let i=t||"en";const n=i.split("-");n.length>=1&&(i=n[0]),i&&0!=i.length&&-1!==["ar","en","es","de","fr","hi","it","ja","ko","pt","zh","ru"].indexOf(i.toLowerCase())||(i="en");let o="";switch(ve.jG.AppType){case"bingHomepage":o="dp_bing";break;case"edge":case"edgeChromium":o="dp_edge";break;case"windows":o="dp_msn";break;case"windowsShell":o="dp_windows"}const s=(0,me.Sz)("UrlSegment_verticalname_sports",t,r)||"";switch(e){case"header":{const e=(0,me.Sz)("UrlSegment_olympics_overview",t,r)||"";return ve.jG.IsChinaCompliance||"zh"==i?`https://www.msn.cn/${t}/${s}/${e}`:`https://www.msn.com/${t}/${s}/${e}`}case"seemoremedal":switch(i){case"es":return`https://olympics.com/beijing-2022/olympic-games/es/resultados/todos-los-deportes/medallero.htm?utm_campaign=${o}`;case"de":return`https://olympics.com/beijing-2022/olympic-games/de/ergebnisse/alle-sportarten/medaillenspiegel.htm?utm_campaign=${o}`;case"fr":return`https://olympics.com/beijing-2022/olympic-games/fr/resultats/tous-les-sports/compte-de-medailles.htm?utm_campaign=${o}`;case"it":return`https://olympics.com/beijing-2022/olympic-games/it/risultati/tutti-gli-sport/medagliere.htm?utm_campaign=${o}`;case"pt":return`https://olympics.com/beijing-2022/olympic-games/pt/resultados/todos-os-esportes/tabela-de-medalha?utm_campaign=${o}`;default:return`https://olympics.com/beijing-2022/olympic-games/${i}/results/all-sports/medal-standings.htm?utm_campaign=${o}`}case"medal":{const e=(0,me.Sz)("UrlSegment_olympics_medalcount",t,r)||"";return ve.jG.IsChinaCompliance||"zh"==i?`https://www.msn.cn/${t}/${s}/${e}`:`https://www.msn.com/${t}/${s}/${e}`}case"event":{const e=(0,me.Sz)("UrlSegment_olympics",t,r)||"",n=a||"";return ve.jG.IsChinaCompliance||"zh"==i?`https://www.msn.cn/${t}/${s}/${e}/${n}`:`https://www.msn.com/${t}/${s}/${e}/${n}`}case"schedule":{const e=(0,me.Sz)("UrlSegment_olympics_schedule",t,r)||"";return ve.jG.IsChinaCompliance||"zh"==i?`https://www.msn.cn/${t}/${s}/${e}/`:`https://www.msn.com/${t}/${s}/${e}`}case"seemoreresults":switch(i){case"es":return`https://olympics.com/beijing-2022/olympic-games/es/resultados/todos-los-deportes/records.htm?utm_campaign=${o}`;case"de":return`https://olympics.com/beijing-2022/olympic-games/de/ergebnisse/alle-sportarten/nok-profil-kanada.htm?utm_campaign=${o}`;case"fr":return`https://olympics.com/beijing-2022/olympic-games/fr/resultats/tous-les-sports/profil-du-cno-canada.htm?utm_campaign=${o}`;case"it":return`https://olympics.com/beijing-2022/olympic-games/it/risultati/tutti-gli-sport/profilo-del-noc-canada.htm?utm_campaign=${o}`;case"pt":return`https://olympics.com/beijing-2022/olympic-games/pt/resultados/todos-os-esportes/perfil-do-noc-canada?utm_campaign=${o}`;default:return`https://olympics.com/beijing-2022/olympic-games/${i}/results/all-sports/records.htm?utm_campaign=${o}`}case"seemoreschedule":return`https://${(0,me.Sz)("UrlSegment_olympics_ioc_schedule",t,r)||"olympics.com/beijing-2022/olympic-games/en/results/all-sports/olympic-schedule.htm"}?utm_campaign=${o}`;case"seemore":return`https://olympics.com/${i}/beijing-2022/sports/?utm_campaign=${o}`;default:return null}},e.getParalympicsUrl=r}(pe||(pe={}));var Se=r(65135),xe=r(53813),be=r(47224),Ce=r(60483),$e=r(9610),Te=r(9375),De=r(19388),Oe=r(58958);class ke extends $e.l{constructor(){super(...arguments),this.isActionMenuOpen=!1,this.colorSchemeChangeHandler=()=>{this.setNeutralBase()},this.handleClickForActionMenu=e=>{e&&(e.target instanceof ke||this.actionButtonControl&&this.actionButtonControl.contains(e.path[0]))||this.toggleActionMenu(null)},this.handleKeyDownForActionMenu=e=>{"Escape"!==e.code?this.handleClickForActionMenu(e):this.toggleActionMenu(e)},this.getOlympicHeader=()=>{switch(this.config.olympicsType){case se:return this.strings.sportsOlympicHeader&&(0,we.WU)(this.strings.sportsOlympicHeader,de).toLocaleUpperCase();case le:return this.strings.sportsOlympicWinterHeader&&(0,we.WU)(this.strings.sportsOlympicWinterHeader,de).toLocaleUpperCase();case ce:return this.strings.sportsParalympicWinterHeader&&(0,we.WU)(this.strings.sportsParalympicWinterHeader,de).toLocaleUpperCase();default:return this.strings.sportsOlympicWinterHeader&&(0,we.WU)(this.strings.sportsOlympicWinterHeader,de).toLocaleUpperCase()}},this.getOlympicSeemoreText=()=>{switch(this.config.olympicsType){case se:case le:return this.strings.olympicSeeMore;case ce:return this.strings.paralympicSeeMore;default:return this.strings.olympicSeeMore}},this.handleNotInterested=()=>(0,a.mG)(this,void 0,void 0,(function*(){if(this.isActionMenuOpen=!1,!this.olympicData||(0,we.TF)(this.olympicData.primaryEntityId))return;const e={id:this.olympicData.primaryEntityId,name:this.olympicData.primaryEntityName||this.strings.olympicName,type:this.olympicData.primaryEntityType};(yield Y.d.notInterestedSportsCard(e))&&(this.refreshFeed?this.refreshFeed():this.$emit("refreshSDCardSection"))})),this.handleMoreSettings=()=>{this.isActionMenuOpen=!1,this.goToPersonalizeCallback?this.goToPersonalizeCallback():this.$emit("goToPersonalizeCallback")},this.setNeutralBase=()=>{this.neutralBaseColor=(0,Oe.Y)()?"#284C95":"#BED1E7"}}experienceConnected(){this.telemetryObject||(this.telemetryObject=new Ce.D({name:Z.OlympicCard,type:J.c9.Module})),this.id="sports-olympic-card-wc",this.initialOlympicData(),this.initActionMenuItems(),this.setNeutralBase()}disconnectedCallback(){super.disconnectedCallback(),window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",this.colorSchemeChangeHandler)}getExperienceType(){return V.x.sportsOlympicCardWC}shadowDomPopulated(){(0,De.v9)(this.getExperienceType()),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.colorSchemeChangeHandler)}actionButtonClickHandler(e){e&&(e.preventDefault(),Se.M0.sendActionEvent(e.target,J.Aw.Click,J.wu.Customize)),this.toggleActionMenu(e,!this.isActionMenuOpen)}toggleActionMenu(e,t=!1){this.isActionMenuOpen=t,t&&e?(this.actionButtonControl=e&&e.currentTarget,document.addEventListener("click",this.handleClickForActionMenu),document.addEventListener("keydown",this.handleKeyDownForActionMenu)):(this.actionButtonControl=null,document.removeEventListener("click",this.handleClickForActionMenu),document.removeEventListener("keydown",this.handleKeyDownForActionMenu))}cardClickHandler(e){return!(!e||!e.target||"FLUENT-ANCHOR"!==e.target.tagName&&"FLUENT-BUTTON"!==e.target.tagName&&"SPORTS-OLYMPIC"!==e.target.tagName&&"A"!==e.target.tagName)||(e&&this.olympicData&&this.olympicData.olympicCardData.headerTitleUrl&&this.handleCardClick(e,this.olympicData.olympicCardData.headerTitleUrl),!1)}cardKeyDown(e,t=""){"Enter"==e.key&&e.target.id===this.id&&t.length&&this.handleCardClick(e,t)}getUrlWithOcid(e){const t=(0,Te.ku)(),r=new URL(e);return t&&r.searchParams.append("ocid",t),r.href}handleCardClick(e,t){e.preventDefault(),e.stopPropagation(),t&&window.open(this.getUrlWithOcid(t),this.openLinksInNewTab?"_blank":"_self"),Se.M0.sendActionEvent(e.target,J.Aw.Click)}initialOlympicData(){this.olympicData=pe.mapSubCardToSportsOlympicData(this.cardMetaData,this.strings,"1x_2y"===this.cardLayout?5:1),this.olympicData&&this.olympicData.olympicCardData&&this.strings&&(this.cardType=this.olympicData.olympicCardData.cardType,this.olympicData.olympicCardData.seeMoreText=this.getOlympicSeemoreText()||this.strings.olympicSeeMore,this.olympicData.olympicCardData.seeMoreUrl=this.olympicData.olympicCardData.tabData&&this.olympicData.olympicCardData.tabData.length&&this.olympicData.olympicCardData.tabData[0].tabContent.seeMoreUrl,this.olympicData.olympicCardData.headerTitle=this.getOlympicHeader()||this.strings.sportsOlympic.toLocaleUpperCase(),this.telemetryContext=((e,t,r)=>{if(!e||!t)return;const a=e.addOrUpdateChild({name:Z.OlympicCard,type:J.c9.Module}),i=t.cardType,n=t.headerTitle,o=t.headerTitleUrl,s=t.seeMoreUrl,l=a.addOrUpdateChild({name:Z.OlympicCard,content:{vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r}),c=a.addOrUpdateChild({name:Z.ContentCard,content:{vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r}),d=a.addOrUpdateChild({name:Z.Header,behavior:J.wu.Navigate,destinationUrl:o,content:{vertical:Z.Vertical,category:i,type:J.uH.StructuredData,headline:n,id:""},ext:r}),p=a.addOrUpdateChild({name:Z.Customization,behavior:J.wu.More,destinationUrl:"",type:J.c9.Interaction,content:{headline:Z.Customization,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r}),u=a.addOrUpdateChild({name:Z.SeeMore,behavior:J.wu.Navigate,destinationUrl:s,content:{vertical:Z.Vertical,category:i,headline:Z.SeeMore,type:J.uH.StructuredData,id:""},ext:r}),h=a.addOrUpdateChild({name:Z.MoreSettings,type:J.c9.ActionButton,overrideDestinationUrl:`${window.location.origin||""}/personalize`,content:{headline:Z.MoreSettings,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r}),m=a.addOrUpdateChild({name:Z.HideCard,behavior:J.wu.Hide,destinationUrl:"",type:J.c9.ActionButton,content:{headline:Z.HideCard,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r}),g=a.addOrUpdateChild({name:Z.HideOlympics,behavior:J.wu.Hide,destinationUrl:"",type:J.c9.ActionButton,content:{headline:Z.HideOlympics,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r}),y=a.addOrUpdateChild({name:Z.Previous.toLowerCase(),behavior:J.wu.Paginate,destinationUrl:"",type:J.c9.ActionButton,content:{headline:Z.Previous,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r}),f=a.addOrUpdateChild({name:Z.Next.toLowerCase(),behavior:J.wu.Paginate,destinationUrl:"",type:J.c9.ActionButton,content:{headline:Z.Next,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r});let v,w,S;return t.tabData&&t.tabData.forEach((e=>{if(e)switch(e.tabType){case K:v=a.addOrUpdateChild({name:Z.MedalContent,behavior:J.wu.Navigate,destinationUrl:e.tabContent.medalUrl,content:{headline:Z.MedalContent,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""},ext:r});break;case X:w=a.addOrUpdateChild({name:Z.EventContent,behavior:J.wu.Navigate,destinationUrl:e.tabContent.resultLink,content:{headline:Z.EventContent,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:e.tabContent.eventId}});break;case Q:S=a.addOrUpdateChild({name:Z.ScheduleContent,behavior:J.wu.Navigate,destinationUrl:e.tabContent.scheduleUrl,content:{headline:Z.ScheduleContent,vertical:Z.Vertical,category:i,type:J.uH.StructuredData,id:""}})}})),{olympicCard:l,header:d,actionButton:p,seeMore:u,menuMoreSettings:h,menuHideCard:m,menuHideOlympics:g,contentCard:c,medalContent:v,resultsContent:w,scheduleContent:S,previous:y,next:f}})(this.telemetryObject,this.olympicData.olympicCardData,this.telemetryExt),this.olympicData.olympicCardData.tabData&&this.olympicData.olympicCardData.tabData.forEach((e=>{switch(e.tabType){case K:e.tabContent.medalTitle=this.strings.olympicMedalTitle,e.tabContent.total=this.strings.olympicTotal,e.tabContent.telemetry=this.telemetryContext&&this.telemetryContext.medalContent;break;case X:e.tabContent.telemetry=this.telemetryContext&&this.telemetryContext.resultsContent;break;case Q:e.tabContent.scheduleTitle=this.strings.olympicScheduleTitle,e.tabContent.telemetry=this.telemetryContext&&this.telemetryContext.scheduleContent}})),this.shouldUseCarousel=this.olympicData.olympicCardData.tabData&&this.olympicData.olympicCardData.tabData.length>1)}initActionMenuItems(){this.config.enableCardAction&&this.olympicData&&(this.actionMenuItems=[],!this.config.enableHideCard||(0,we.TF)(this.strings.sportsNotInterested)||(0,we.TF)(this.strings.sportsParalympicWinterHeader)||this.actionMenuItems.push({glyph:xe.Z,title:(0,we.WU)(this.strings.sportsNotInterested,(0,we.WU)(this.strings.sportsParalympicWinterHeader,"").trim()),id:"dislike",telemetryTag:this.telemetryContext&&this.telemetryContext.menuHideCard&&this.telemetryContext.menuHideCard.getMetadataTag(),onClick:()=>(0,a.mG)(this,void 0,void 0,(function*(){this.handleNotInterested()}))}),this.actionMenuItems.push({glyph:be.Z,id:"more",title:this.strings.sportsMoreSetting,telemetryTag:this.telemetryContext&&this.telemetryContext.menuMoreSettings&&this.telemetryContext.menuMoreSettings.getMetadataTag(),onClick:()=>(0,a.mG)(this,void 0,void 0,(function*(){this.handleMoreSettings()}))}))}}(0,a.gn)([n.LO],ke.prototype,"telemetryContext",void 0),(0,a.gn)([n.LO],ke.prototype,"cardType",void 0),(0,a.gn)([n.LO],ke.prototype,"actionMenuItems",void 0),(0,a.gn)([n.LO],ke.prototype,"isActionMenuOpen",void 0),(0,a.gn)([n.LO],ke.prototype,"olympicData",void 0),(0,a.gn)([n.LO],ke.prototype,"shouldUseCarousel",void 0),(0,a.gn)([n.LO],ke.prototype,"neutralBaseColor",void 0);var Me=r(53271),Ue=r(33763),Ie=r(89346);const Pe=v.i`
    .score {
        flex-direction: row;
    }

    .result-header-title,
    .medal-total {
        text-align: right;
    }
`,Ee=v.i`
    .score {
        flex-direction: row-reverse;
    }

    .result-header-title,
    .medal-total {
        text-align: left;
    }
`,Fe=v.i`
    :host {
        font-family: ${x.SVJ};
    }
`.withBehaviors(new b.O(Pe,Ee),(0,S.vF)(v.i`
            :host {
                forced-color-adjust: auto;
            }

            ::slotted([slot="olympics-header-background-image"]) {
                display: none;
            }
        `));class Ae extends Ie.H{constructor(){super(...arguments),this.paginateCallback=(e,t)=>{e&&(e.preventDefault(),e.stopPropagation(),Se.M0.sendActionEvent(e.currentTarget,J.Aw.Click)),this.currentPageIndex=t?(this.currentPageIndex+1)%this.pageCount:0==this.currentPageIndex?this.pageCount-1:this.currentPageIndex-1,this.carouselStyle=this.getCarouselContainerStyle()},this.carouselClickHandler=e=>!e||!e.target||"OLYMPIC-SCHEDULE"==e.target.tagName||"OLYMPIC-MEDAL"==e.target.tagName||"OLYMPIC-RESULTS"==e.target.tagName||(e.preventDefault(),e.stopPropagation(),Se.M0.sendActionEvent(e.currentTarget,J.Aw.Click),this.headerUrl&&window.open(this.headerUrl,this.linkTarget||"_blank"),!1),this.getCarouselContainerStyle=()=>{var e;this.getSeemoreUrl();const t=this.currentPageIndex*((null===(e=this.parentElement)||void 0===e?void 0:e.getBoundingClientRect().width)||0);return"rtl"===this.rtl?`margin-right: -${t}px`:`margin-left: -${t}px`},this.getSeemoreUrl=()=>{this.seeMoreUrl=this.contentsData[this.currentPageIndex].tabContent.seeMoreUrl}}connectedCallback(){super.connectedCallback(),this.pageCount=this.carouselContents.length,this.currentPageIndex=this.currentPageIndex||0,this.carouselStyle=this.getCarouselContainerStyle()}isPageDataValid(){return null!=this.carouselContents}}(0,a.gn)([n.LO],Ae.prototype,"seeMoreText",void 0),(0,a.gn)([n.LO],Ae.prototype,"seeMoreUrl",void 0),(0,a.gn)([n.LO],Ae.prototype,"headerUrl",void 0),(0,a.gn)([n.LO],Ae.prototype,"currentPageIndex",void 0),(0,a.gn)([n.LO],Ae.prototype,"pageCount",void 0),(0,a.gn)([n.LO],Ae.prototype,"carouselContents",void 0),(0,a.gn)([n.LO],Ae.prototype,"rtl",void 0),(0,a.gn)([n.LO],Ae.prototype,"carouselStyle",void 0),(0,a.gn)([n.LO],Ae.prototype,"contentsData",void 0);const Le=v.i`
`,He=v.i`
.see-more-arrow  > svg {
    float: right;
}
.carousel-seemore-content > svg {
    transform: rotateY(180deg);
}
`,ze=v.i`
.flipper.backplate > svg > path {
    fill: rgba(0, 0, 0, 0.5);
}

.flipper.backplate > svg:hover path {
    fill: rgba(0, 0, 0, 0.83);
}


.carousel-seemore-content > svg > path {
    fill: #7DBAE9;
}
.carousel-seemore-content > svg > rect {
    fill: none;
    stroke: #7DBAE9;
}
.carousel-seemore-text {
    color: #7DBAE9;
}
.see-more-text {
    color: rgba(255, 255, 255, 255);
}
`,Re=v.i`
button {
    outline: none;
    border: none;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
}

.flipper {
    width: 20px;
    height: 20px;
}

.flipper:${w.b} {
    outline: ${x.CHi} auto 1px;
}

.flipper.previous {
    transform: rotateY(180deg);
}

.flipper > svg > path {
    fill: ${x.Q5n};
}

.flipper > svg:hover path {
    fill: rgba(0, 0, 0, 0.83);
}

.flipper.backplate > svg > rect {
    fill: rgba(255, 255, 255, 0.54);
}

.flipper.backplate > svg > rect:hover{
    fill: rgba(255, 255, 255, 0.54);
}

.flipper-content {
    height: 14px;
    padding: 3px 0px;
    color: ${x.CHi};
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    line-height: 14px;
}

.flipper-content:hover,
.flipper-content:active,
.flipper-content:${w.b} {
    color: ${x.D9J};
    text-decoration: underline;
}

.carousel-container {
    white-space: nowrap;
    padding-inline-start: 0;
    transition-duration: 700ms;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    display: flex;
}

.carousel-item {
    display: inline-block;
    width: 300px;
    height: 100%;
}

.carousel-item-content {
    display: block;
    width: inherit;
}

.carousel-footer {
    display: grid;
    grid-template-columns: 75px auto;
    margin: 0px 16px;
    width: 268px;
    padding-top: 4px;
}

:host([uxstyle="article"]) .carousel-footer {
    margin-top: 10px;
}

.pagination-container {
    width: 67px; 
    height: 20px; 
    padding: 2px 0; 
    display: grid; 
    grid-template-columns: 20px 27px 20px; 
    align-items: center;
}

.see-more {
    padding: 0 0px;
    align-items: end;
    display: flex;
    flex-direction: row;
    flex: 1;
    min-width: 0;
    margin-top: 2px;
    justify-content: center;
    text-decoration: none;
    margin-left: auto;
}
.see-more:${w.b} {
    outline: 2px solid;
}

.see-more-with-arrow {
    width: 200px;
    display: grid;
    text-decoration: none;
    grid-template-columns: 161px 24px;
    grid-column-gap: 4px;
    align-items: center;
}

.see-more-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 20px;
    padding: 0 24px;
    height: 24px;
    font-size: 12px;
    font-weight: 400;
    line-height: 24px;
    color: ${x.CHi};
    background: ${x.jql};
    margin-top: -4px;
    border: solid 1px;
    border-color: ${x.goi};
    max-width: 156px;
}
.see-more-text:hover,
.see-more-text:active,
.see-more-text:${w.b} {
    border-color: ${x.D9J};
    background: ${x.QpD};
    text-decoration: underline;
}

.see-more-text.with-arrow {
    text-align: right;
    text-decoration: none;
    cursor: pointer;
    vertical-align: middle;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
}

.see-more-text.with-arrow:hover,
.see-more-text.with-arrow:${w.b} {
    text-decoration: underline;
    color: ${x.D9J};
}

.see-more-text.with-arrow:active {
    color: ${x.D9J};
}

.see-more-arrow {
    width: 24px;
    height: 24px;
}

.see-more-arrow  > svg {
    float: left;
}

.see-more-arrow  > svg > rect {
    fill: ${x.Avx};
}

.see-more-arrow  > svg > rect:hover {
    fill: ${x.OCG};
}

.see-more-arrow  > svg > path {
    fill: #FFFFFF;
}

.carousel-seemore {
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.carousel-seemore-content {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.carousel-seemore-content > svg {
    transform: none;
}
.carousel-seemore-content > svg > path {
    fill: #0078D4;
}
.carousel-seemore-content > svg > rect {
    fill: none;
    stroke: #0078D4;
}

`.withBehaviors((0,S.Uu)(ze),new b.O(Le,He),(0,S.vF)(v.i`
                :host {
                    forced-color-adjust: auto;
                }
            `));var Ne=r(79826),Ge=r(86758);const je=o.d`
    <li class="carousel-item" key="${(e,t)=>t.index}">
        <div class="carousel-item-content">
            ${e=>e}
        </div>
    </li>
`,Be=o.d`
    <div data-t="${e=>{var t,r;return null===(r=null===(t=e.telemetryContext)||void 0===t?void 0:t.contentCard)||void 0===r?void 0:r.getMetadataTag()}}"
        @click="${(e,t)=>e.carouselClickHandler&&e.carouselClickHandler(t.event)}">
        <ul class="carousel-container" key="olympic-carousel" style="${e=>e.carouselStyle}" >
            ${(0,k.rx)((e=>e.carouselContents),je,{positioning:!0})}
        </ul>
    </div>
`,We=o.d`
    <button class="flipper previous backplate"
        tabindex="0"
        title="${e=>{var t;return null===(t=e.strings)||void 0===t?void 0:t.sportsOlympicPrevious}}"
        @click="${(e,t)=>e.paginateCallback(t.event,!1)}"
        data-t="${e=>{var t,r;return null===(r=null===(t=e.telemetryContext)||void 0===t?void 0:t.previous)||void 0===r?void 0:r.getMetadataTag()}}"
    >
        ${Ne.Z}
    </button>
`,qe=o.d`
    <button class="flipper next backplate"
        tabindex="0"
        title="${e=>{var t;return null===(t=e.strings)||void 0===t?void 0:t.sportsOlympicNext}}"
        @click="${(e,t)=>e.paginateCallback(t.event,!0)}"
        data-t="${e=>e.telemetryContext&&e.telemetryContext.next&&e.telemetryContext.next.getMetadataTag()}"
    >
        ${Ne.Z}
    </button>
`,Ve=o.d`
    <div class="flipper-content">
        ${e=>e.currentPageIndex+1+"/"+e.pageCount}
    </div>
`,_e=o.d`
    <a
        class="see-more-with-arrow"
        title=${e=>e.seeMoreText}
        aria-label=${e=>e.seeMoreText}
        href=${e=>e.seeMoreUrl}
        target=${e=>e.linkTarget}
        data-t="${e=>{var t,r;return null===(r=null===(t=e.telemetryContext)||void 0===t?void 0:t.seeMore)||void 0===r?void 0:r.getMetadataTag()}}"
    >
        <span class="see-more-text with-arrow">
            ${e=>e.seeMoreText}
        </span>
        <span class="see-more-arrow">
            ${Ge.Z}
        </span>
    </a>
`,Ye=o.d`
    <div class="carousel-footer">
        ${(0,O.g)((e=>e.isPageDataValid()),o.d`
            <div class="pagination-container">
                ${We}
                ${Ve}
                ${qe}
            </div>
        `)}
        ${_e}
    </div>
`,Je=o.d`
    ${(0,O.g)((e=>e.isPageDataValid()),o.d`
        ${Be}
        ${Ye}
    `)}
`;let Ze=class extends Ae{};Ze=(0,a.gn)([(0,Ie.M)({name:"olympic-carousel",styles:Re,template:Je,shadowOptions:{delegatesFocus:!0}})],Ze);const Xe=v.i`
    .event-image > img {
        filter: saturate(2) brightness(5);
    }

    .event-time {
        font-weight: 300;
    }

    .schedule-header {
        color: rgba(255, 255, 255, 0.7)
    }
`,Ke=v.i`
    :host {
        font-family: ${x.SVJ};
    }

    .data a {
        display: block;
        width: inherit;
        padding: 0 16px;
        cursor: pointer;
        color: currentcolor;
        text-decoration: none;
    }

    .schedule-header,
    .event-name,
    .sport-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .schedule-header {
        font-size: ${x.sNp};
        font-weight: 600;
        line-height: ${x.vgC};
        padding: 8px 0;
        text-transform: uppercase;
        color: #666666
    }
    .event {
        display: flex;
        align-items: center;
    }
    .single-event {
    }
    .multi-event {
        padding-bottom: 12px;
    }
    .event-image {
        width: 22px;
        overflow: hidden;
    }
    .event-image > img {
        width: 22px;
        height: 22px;
    }

    .sport-name {
        padding: 0 8px;
        width: 180px;
        font-weight: 600;
        font-size: ${x.cSu};
        line-height: ${x.RUt};
    }

    .event-name {
        padding: 0 8px;
        width: 180px;
        color: ${x.CHi};
        font-size: ${x.sNp};
        line-height: ${x.vgC};
    }

    .event-starttime {
        width: 60px;
        text-align: end;
    }
    .event-time,
    .event-date {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: ${x.sNp};
        line-height: ${x.vgC};
    }
    .event-date {
        font-weight: 600;
    }

`.withBehaviors((0,S.Uu)(Xe),(0,S.vF)(v.i`
            :host {
                forced-color-adjust: auto;
            }
        `)),Qe=o.d`
    <div class="event ${(e,t)=>t.parent.olympicScheduleData&&t.parent.olympicScheduleData.events&&1==t.parent.olympicScheduleData.events.length?"single-event":"multi-event"}" tabindex="1">
        <div class="event-image">
            <img
                role="presentation"
                src="${e=>e.imageUrl}"
            />
        </div>
        <div>
            <div class="sport-name" title="${e=>e.sportName}">
                ${e=>e.sportName}
            </div>
            <div class="event-name" title="${e=>e.eventName}">
                ${e=>e.eventName}
            </div>
        </div>
        <div class="event-starttime">
            <div class="event-date" title="${e=>e.eventStartTime}">${e=>e.eventStartDate}</div>
            <div class="event-time" title="${e=>e.eventStartTime}">${e=>e.eventStartTime}</div>
        </div>
    </div>
`,et=o.d`
    <div class="data">
        <a
            href="${e=>e.olympicScheduleData&&e.olympicScheduleData.scheduleUrl||void 0}"
            target="${e=>e.clickthroughTarget}"
            data-t="${e=>{var t;return null===(t=e.olympicScheduleData.telemetry)||void 0===t?void 0:t.getMetadataTag()}}"
        >
            <div class="schedule-header" title="${e=>e.olympicScheduleData&&e.olympicScheduleData.scheduleTitle}">
                ${e=>e.olympicScheduleData&&e.olympicScheduleData.scheduleTitle}
            </div>
            ${(0,k.rx)((e=>e.olympicScheduleData&&e.olympicScheduleData.events),Qe)}
        </a>
    </div>
`;class tt extends Ie.H{connectedCallback(){super.connectedCallback()}}(0,a.gn)([n.LO],tt.prototype,"clickthroughTarget",void 0),(0,a.gn)([n.LO],tt.prototype,"olympicScheduleData",void 0),(0,a.gn)([n.LO],tt.prototype,"telemetryContext",void 0);let rt=class extends tt{};rt=(0,a.gn)([(0,Ie.M)({name:"olympic-schedule",template:et,styles:Ke,shadowOptions:{delegatesFocus:!0}})],rt);const at=v.i`
    .score {
        flex-direction: row;
    }

    .result-header-title {
        text-align: right;
    }
`,it=v.i`
    .score {
        flex-direction: row-reverse;
    }

    .result-header-title {
        text-align: left;
    }
`,nt=v.i`
    .world-record,
    .olympic-record {
        color: #FFFFFF;
        border: 1px solid #FFFFFF;
    }

    .result-title {
        color: rgba(255, 255, 255, 0.7);
    }
`,ot=v.i`
    :host {
        font-family: ${x.SVJ};
    }

    a {
        cursor: pointer;
        color: currentcolor;
        text-decoration: none;
    }

    .data,
    .team-data {
        font-size: ${x.sNp};
        line-height: ${x.vgC};
        padding: 0px 16px;
        border-radius: 4px;
        width: 268px;
    }

    .team-data,
    .team-data-flat {
        display: grid;
        grid-template-rows: 72px auto auto;
        grid-gap: 20px;
    }
    .team-data {
        grid-template-rows: 72px auto auto;
    }

    .result-group {
        border-radius: 4px;
        display: inline-grid;
        text-decoration: none;
        color: currentcolor;
    }

    .result-title,
    .result-title-flat {
        font-size: ${x.sNp};
        line-height: ${x.vgC};
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
        text-transform: uppercase;
        color: #666666
    }

    .result-title {
        padding: 8px 0;
    }
    .result-title-flat {
        padding: 4px 0;
    }

    .match-result {
        padding: 0 16px;
    }
    .result-header {
        align-items: center;
        display: grid;
    }
    .header-grid {
        grid-template-columns: 232px auto;
    }
    .participant,
    .match-participant {
        display: grid;
        grid-column-gap: 8px;
        align-items: center;
    }

    .result-header-title {
        text-transform: capitalize;
        font-size: ${x.G8g};
        font-weight: 600;
        line-height: ${x.MwG};
        text-align: right;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .participant-rank {
        justify-content: center;
        align-items: center;
        display: flex;
        color: currentcolor;
        font-size: ${x.sNp};
    }

    .participant .participant-score {
        justify-content: flex-end;
        max-width: 80px;
        min-width: 40px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: end;
        font-size: ${x.sNp};
    }

    .count-total {
        font-weight: 500;
        justify-content: flex-end;
    }

    .participant {
        padding-block-end: 20px;
        grid-template-columns: 20px 24px auto 80px;
    }
    .participant.with-wr-or {
        grid-template-columns: 20px 24px auto 66px auto;
    }
    .participant.with-wr {
        grid-template-columns: 20px 24px auto 30px auto;
    }

    .medal-line,
    .match-participant:first-child,
    .winner {
        font-weight: 600;
    }

    .participant.participant-last {
        padding-block-end: 8px;
    }

    .participant:nth-of-type(1) {
        font-weight: 600;
    }

    .country-icon,
    .participant-image {
        width: 24px;
        height: 16px;
    }

    .country-icon>img,
    .participant-image>img {
        width: 100%;
    }

    .country-name,
    .participant-name {
        font-size: ${x.cSu};
        line-height: ${x.RUt};
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .result-match {
        display: flex;
        align-items: center;
    }

    .match-participant {
        grid-template-columns: 24px 28px auto 40px;
    }

    .match-participants {
        width: calc(100% - 64px);
    }

    .match-info {
        font-size: ${x.sNp};
        line-height: ${x.vgC};
        width: 64px;
        color: ${x.CHi};
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
    }

    .match-state,
    .match-date {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        color: ${x.CHi};
    }

    .score {
        display: flex;
        flex-direction: row;
    }

    .winner {
        padding-inline-end: 4px;
    }

    .winner-tag {
        padding-inline-end: 4px;
        width: 5px;
        height: 24px;
    }

    .winner-tag > svg > path {
        fill: currentColor;
    }

    .world-record,
    .olympic-record {
        border: 1px solid #000000;
        border-radius: 4px;
        width: 30px;
        height: 20px;
        text-align: center;
        font-size: ${x.sNp};
        line-height: 18px;
        color: #444444;
    }
    .result-record {
        display: grid;
        grid-column-gap: 4px;
        align-items: center;
        grid-template-columns: 30px auto;
    }
    .participant.with-wr-or .result-record {
        grid-template-columns: 30px auto;
    }
    .participant.with-wr .result-record {
        grid-template-columns: 30px;
    }
`.withBehaviors(new b.O(at,it),(0,S.Uu)(nt),(0,S.vF)(v.i`
            :host {
                forced-color-adjust: auto;
            }

            ::slotted([slot="olympics-header-background-image"]) {
                display: none;
            }
        `));var st=r(53039);const lt=e=>{switch(e){case ee:return o.d`${'<svg width="16" height="20" viewBox="0 0 16 20" fill="red"><path fill-rule="evenodd" clip-rule="evenodd" d="M1 1h3.86L8 4.2 11.28 1H15L8 8 1 1Z" fill="#C68C1A"/><circle cx="8" cy="12" transform="rotate(-180 8 12)" fill="url(#gold0_linear)" r="8"/><circle cx="8" cy="12" fill="url(#gold1_linear)" r="5.6"/><defs><linearGradient id="gold0_linear" x1="8" y1="4" x2="8" y2="20" gradientUnits="userSpaceOnUse"><stop stop-color="#C08000"/><stop offset="1" stop-color="#E2A62E"/></linearGradient><linearGradient id="gold1_linear" x1="8" y1="6.4" x2="8" y2="17.6" gradientUnits="userSpaceOnUse"><stop stop-color="#C08000"/><stop offset="1" stop-color="#E2A62E"/></linearGradient></defs></svg>'}`;case te:return o.d`${'<svg width="16" height="20" viewBox="0 0 16 20" fill="none"><g clip-path="url(#silver_clip0)"><path fill-rule="evenodd" clip-ru