;
}`,et=N.i`
:host([layout="tall"]) .edit-header {
    left: 25px;
}

.suggest-item-text {
    text-align: left;
}

:host([is-widget]) .location {
    left: 25px;
}

:host([layout="tall"]) .commute-settings {
    left: 25px;
}
`,it=N.i`
:host([layout="tall"]) .edit-header {
    right: 25px;
}

.suggest-item-text {
    text-align: right;
}

:host([is-widget]) .location {
    right: 25px;
}

:host([layout="tall"]) .commute-settings {
    right: 25px;
}
`;var at=i(39181),ot=i(58952),nt=i(13988),rt=i(18864),st='<svg width="16" height="16" viewBox="0 0 16 16"><path d="M8 16a7.92 7.92 0 0 1-6.91-3.96A8.22 8.22 0 0 1 0 8a7.83 7.83 0 0 1 1.09-4.04A8.09 8.09 0 0 1 8 0a7.83 7.83 0 0 1 5.65 2.35A7.8 7.8 0 0 1 16 8a7.92 7.92 0 0 1-3.96 6.91A8 8 0 0 1 8 16ZM8 1.14a6.9 6.9 0 0 0-5.92 3.4A7 7 0 0 0 1.14 8a6.83 6.83 0 0 0 10.32 5.92A6.78 6.78 0 0 0 14.86 8a6.6 6.6 0 0 0-.94-3.46A6.78 6.78 0 0 0 8 1.14Zm3.43 7.43H4.57V7.43h6.86v1.14Z"/></svg>',lt=i(51208);const dt=at.d`
    <svg
        width="20"
        height="20"
        viewBox="0 0 20 20"
        class="location-icon"
        xmlns="http://www.w3.org/2000/svg"
    >
        <path
            d="M8.5 3a5.5 5.5 0 014.23 9.02l4.12 4.13a.5.5 0 01-.63.76l-.07-.06-4.13-4.12A5.5 5.5 0 118.5 3zm0 1a4.5 4.5 0 100 9 4.5 4.5 0 000-9z"
        />
    </svg>
`,ct=(t,e)=>at.d`
    <li
        role="option"
        title="${t=>t}"
        aria-label="${t=>t}"
        @click="${(t,e)=>e.parent.selectSuggestLocation(t,e.index)}"
        data-t="${(t,e)=>e.parent.suggestTelemetryTag}"
    >
        <fluent-button class="suggest-item" part="suggest-item" appearance="stealth">
            <div class="suggest-item-text">${t=>t}</div>
        </fluent-button>
    </li>
`,ut=(t,e)=>at.d`
    <div class="auto-suggest">
        <fluent-text-field
            class="location-input"
            part="location-input"
            id="traffic_location_input"
            tabindex="0"
            title=${t=>t.searchPlaceHolderText}
            placeholder="${t=>t.searchPlaceHolderText}"
            @input=${t=>t.handleInputForSuggest()}
            @keydown="${(t,e)=>t.handleOnKeyDownSearchBox(e.event)}"
            ?disabled=${t=>"AutoDetect"===t.locationMode}
            type="search"
            appearance="filled"
            autofocus="autofocus"
            autoComplete="off"
            aria-autocomplete="both"
            aria-controls="traffic_location_search_list"
            aria-owns="traffic_location_search_list"
            ${(0,ot.i)("inputControl")}
        >
            <span slot=${t=>t.isWidget?"end":"start"}>${dt}</span>
        </fluent-text-field>
    </div>
`,ht=(t,e)=>at.d`<div class="location">
<fluent-radio-group
    value="${t=>t.locationMode}"
    @change="${(t,e)=>t.chooseLocationMode(e.event)}"
    aria-labelledby="setlocationmode"
    name="set-location-mode"
    orientation="vertical"
>
    <fluent-radio
        value="Specify"
        id="specify-location-mode"
        data-t="${t=>t.specifyLocationTelemetryTag}"
        >
        ${t=>t.specifyLocationText}
    </fluent-radio>
    <fluent-radio
        value="AutoDetect"
        class="auto-detect"
        data-t="${t=>t.detectLocationTelemetryTag}"
        >${t=>t.detectLocationText}</fluent-radio
    >
</fluent-radio-group>
${ut}
</div>`,gt=(t,e)=>at.d`
<fluent-option value=${(t,e)=>e.index}>${t=>(0,u.G1)(t)}</fluent-option>
`,pt=(t,e)=>(t.loadCommuteLocations(),at.d`
<div class="commute-settings">
    ${(0,nt.g)((t=>"tall"===t.layout),at.d`<div class="commute-header">${t=>{var e;return null===(e=t.localizedStrings)||void 0===e?void 0:e.editHomeWorkHeader}}</div>`)}
    <div class="commute-row">
            ${'<svg width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M20 10c0 5.5-4.5 10-10 10S0 15.5 0 10 4.5 0 10 0s10 4.5 10 10Z" fill="#444"/><path d="m15.35 9.02-5-4.84c-.23-.24-.47-.24-.7 0l-5 4.84c-.12.11 0 .47.12.47h.95v5.31h3.2v-3.78h2.15v3.78h3.21V9.49h.95c.12 0 .24-.36.12-.47Z" fill="#fff"/></svg>'}
            <span>
                <msn-traffic-combobox 
                    class="commute-text-field"
                    placeholder=${t=>t.searchPlaceHolderText}
                    id="home-input"
                    ${(0,ot.i)("homeCombobox")}
                    current-value=${t=>{var e,i;return null===(i=null===(e=t.commuteLocations)||void 0===e?void 0:e.home)||void 0===i?void 0:i.displayName}}
                    @change=${t=>t.changeSignal=1}
                    @input=${(t,e)=>(0,c.mG)(void 0,void 0,void 0,(function*(){return yield t.handleCommuteAutosuggest(e.event,"home")}))}>
                        ${(0,rt.rx)((t=>t.homeOptions),gt,{positioning:!0})}
                </msn-traffic-combobox>
            </span>
            <span
                @click=${t=>t.clearCommuteOptions("home")}
                class="delete-svg">
                ${st}
            </span>
    </div>
    <div class="commute-row">
            ${'<svg width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M20 10c0 5.5-4.5 10-10 10S0 15.5 0 10 4.5 0 10 0s10 4.5 10 10Z" fill="#444"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15.4 9.94V8.48c0-.73-.6-1.45-1.46-1.45h-.48l-.37-1.22c-.24-.6-.97-1.21-1.7-1.21H8.6c-.72 0-1.45.49-1.7 1.21l-.36 1.1h-.48c-.85 0-1.46.72-1.46 1.45v1.58h10.8ZM4.6 11.15v2.3c0 .86.73 1.46 1.58 1.46h7.76c.85 0 1.46-.6 1.46-1.45v-2.3H4.6Zm4.49-5.34c-.36 0-.85.12-.97.49L8 6.9h4.12l-.24-.6c-.12-.37-.49-.49-.97-.49H9.09Z" fill="#fff"/></svg>'}
            <span>
                <msn-traffic-combobox 
                    class="commute-text-field"
                    placeholder=${t=>t.searchPlaceHolderText}
                    id="work-input"
                    current-value=${t=>{var e,i;return null===(i=null===(e=t.commuteLocations)||void 0===e?void 0:e.work)||void 0===i?void 0:i.displayName}}
                    @input=${(t,e)=>(0,c.mG)(void 0,void 0,void 0,(function*(){return yield t.handleCommuteAutosuggest(e.event,"work")}))}
                    ${(0,ot.i)("workCombobox")}>
                    ${(0,rt.rx)((t=>t.workOptions),gt,{positioning:!0})}
                </msn-traffic-combobox>
            </span>
            <span 
                @click=${t=>t.clearCommuteOptions("work")}
                class="delete-svg">${st}</span>
    </div>
</div>
`),ft=P.compose({baseName:"inline-location-settings",template:(t,e)=>at.d`
    <div class="container">
        ${(0,nt.g)((t=>"full"===t.layout||"tall"===t.layout),at.d`
                <div class="edit-location-region">
                    ${(0,nt.g)((t=>t.isWidget),at.d`<div id="setlocationmode" class="edit-header">
                            ${t=>t.isMsa&&t.enableCommuteSettings&&"tall"!==t.layout?at.d`
<fluent-select
    position="below"
    class="content-select"
    ${(0,ot.i)("dropdown")}
    @change=${t=>t.switchSettingsScenario()}
>
    <fluent-option
        value="traffic"
    >
        ${t=>t.editHeader}
    </fluent-option>
    <fluent-option
        value="commute"
    >
        ${t=>{var e;return null===(e=t.localizedStrings)||void 0===e?void 0:e.editHomeWorkHeader}}
    </fluent-option>
</fluent-select>`:t.editHeader}
                        </div>`)}
                    ${(0,nt.g)((t=>"traffic"===t.scenario||"tall"===t.layout),ht)}
                    ${(0,nt.g)((t=>"commute"===t.scenario||"tall"===t.layout&&t.isMsa),pt)}
                </div>
                ${lt.zq}
            `)}
        ${(0,nt.g)((t=>"half"===t.layout),at.d`
                <div class="location">
                    <fluent-radio-group
                        class="location-options"
                        value="${t=>t.locationMode}"
                        @change="${(t,e)=>t.chooseLocationMode(e.event)}"
                        aria-labelledby="setlocationmode"
                        name="set-location-mode"
                        orientation="vertical"
                    >
                        <fluent-radio
                            value="AutoDetect"
                            data-t="${t=>t.detectLocationTelemetryTag}"
                            ><div class="user-option">
                                ${t=>t.detectLocationText}
                            </div></fluent-radio
                        >
                        <fluent-radio
                            value="Specify"
                            id="specify-location-mode"
                            data-t="${t=>t.specifyLocationTelemetryTag}"
                            ><div class="user-option">
                                ${t=>t.specifyLocationText}
                            </div></fluent-radio
                        >
                    </fluent-radio-group>
                    ${ut}
                </div>
            `)}
        <div
            class="suggest-list-container"
            aria-live="polite"
            aria-expanded="true"
            id="traffic_location_search_list"
            aria-label="${t=>t.searchPlaceHolderText}"
        >
            ${(0,nt.g)((t=>t.showSuggests&&t.suggestedLocations),at.d`
                    <ul
                        class="suggest-list"
                        part="suggest-list"
                        ${(0,ot.i)("selectedSuggestion")}
                        @keydown="${(t,e)=>t.handleOnKeyDownAutoSuggestBox(e.event)}"
                    >
                        ${(0,nt.g)((t=>t.showSuggests&&t.suggestedLocations&&t.suggestedLocations.length>0),at.d`${(0,rt.rx)((t=>t.suggestedLocations),ct,{positioning:!0})}`)}
                        ${(0,nt.g)((t=>t.suggestedLocations&&0===t.suggestedLocations.length),at.d`<li
                                role="option"
                                title="${t=>t.searchNoResultText}"
                                class="suggest-item"
                                part="suggest-item"
                            >
                                ${t=>t.searchNoResultText}
                            </li>`)}
                    </ul>
                `)}
        </div>
        <div class="action-button">
            <fluent-button
                class="save-button"
                part="save-button"
                appearance="accent"
                @click="${t=>t.saveSetting()}"
                :disabled=${t=>!t.changeSignal}
                data-t="${t=>t.saveTelemetryTag}"
                >${t=>t.saveButtonText}</fluent-button
            >
            <fluent-button
                class="cancel-button"
                part="cancel-button"
                appearance="outline"
                @click="${t=>t.cancelSetting()}"
                data-t="${t=>t.cancelTelemetryTag}"
                >${t=>t.cancelButtonText}</fluent-button
            >
        </div>
    </div>
`,styles:(t,e)=>N.i`
        ${(0,G.j)("flex")} :host {
            position: relative;
            width: auto;
            height: 100%;
            box-sizing: border-box;
            font-family: ${j.SVJ};
            flex-direction: column;
            outline: none;
        }

        .container {
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            border-radius: ${j.rSr};
            height: 100%;
        }

        :host([layout="half"]) .container {
            padding: 4px 12px;
        }

        :host([layout="full"]) .container {
            padding: 16px 16px;
        }

        :host([layout="tall"]) .container {
            padding: 60px 15px;
        }

        .edit-header {
            display: flex;
            align-items: center;
        }

        .edit-header, .commute-header {
            font-size: ${j.cSu};
            line-height: ${j.RUt};
            color: ${j.CHi};
            font-weight: 500;
        }

        .commute-header {
            margin-bottom: 12px;
        }

        :host([layout="tall"]) .edit-header {
            position: absolute;
        }

        :host([layout="full"]) .edit-header {
            justify-content: center;
        }

        .location-label {
            font-size: ${j.cSu};
            line-height: ${j.RUt};
            margin-bottom: 10px;
        }

        :host([is-widget]) .location-icon {
            transform: scaleX(-1);
        }

        .location-icon {
            fill: ${j.CHi};
            margin: 6px;
        }

        .location-input {
            height: 30px;
            margin-bottom: 2px;
            flex: 1 0 0px;
            background: transparent;
            width: 250px;
            border: none;
        }

        .location-input::part(start) {
            margin-inline-start: 0px;
        }

        .location-input::part(end) {
            margin-inline-end: 0px;
        }

        .location-input::part(root) {
            background: none;
            border-color: ${j.wFS};
        }

        .location-input::part(control) {
            padding-inline-end: 0px;
            text-overflow: ellipsis;
        }

        .suggest-list-container {
            position: absolute;
        }

        :host([layout="half"]) .suggest-list {
            top: 97px;
            width: 274px;
        }

        :host([layout="full"]) .suggest-list,
        :host([layout="tall"]) .suggest-list {
            top: 110px;
        }

        :host([layout="full"]):host([is-widget]) .suggest-list {
            top: 180px;
        }

        .suggest-list {
            display: block;
            position: absolute;
            list-style: none;
            background: ${j.jql};
            border: calc(${j.Han} * 1px) solid ${j.akT};
            border-radius: ${j.UWU};
            margin: 0;
            padding: 0;
            z-index: 99;
            outline: none;
            width: 266px;
        }

        .suggest-item {
            text-overflow: ellipsis;
            word-wrap: break-word;
            font-size: ${j.sNp};
            line-height: ${j.vgC};
            position: relative;
            width: 100%;
        }

        .suggest-item::part(control) {
            justify-content: flex-start;
        }

        .suggest-item-text {
            overflow: hidden;
            width: 240px;
            text-overflow: ellipsis;
        }

        .save-button,
        .cancel-button {
            min-width: 131px;
            font-size: ${j.sNp};
            line-height: ${j.vgC};
            align-self: center;
            border-radius: 20px;
        }

        :host([is-widget]) .save-button,
        :host([is-widget]) .cancel-button {
            border-radius: 4px;
            min-width: 120px;
        }

        :host([is-widget]) .auto-suggest {
           position: absolute;
           top: 43px;
        }

        :host([is-widget]) .auto-detect {
            position: absolute;
            top: 87px;
            width: 259px;
        }

        .user-option {
            overflow: hidden;
            text-overflow: ellipsis;
            width: 225px;
            white-space: nowrap;
            font-family: ${j.CHi};
            font-size: ${j.cSu};
            line-height: ${j.RUt};
        }

        fluent-radio {
            margin: 8px 0 0;
        }

        .traffic-icon {
            margin-right: 5px;
            position: relative;
            top: 3px;
        }

        .location-options {
            margin: 4px 0;
        }

        .action-button {
            width: 275px;
        }

        :host([is-widget]) .action-button {
            display: flex;
            flex-direction: row;
            justify-content: space-around;
            width: 100%;
        }

        :host([layout="tall"]) .action-button {
            position: relative;
            bottom: -45px;
        }

        :host([layout="full"]):host([is-widget]) .edit-location-region {
            padding: 44px 10px;
        }

        :host([is-widget]) .location { 
            position: absolute;
            top: 92px;
        }

        .content-select {
            min-width: auto;
            background: transparent;
            border: none;
            position: absolute;
            top: 56px;
        }

        .commute-settings {
            position: absolute;
            top: 105px;
        }

        :host([layout="tall"]) .commute-settings {
            top: 230px;
        }
        
        .commute-row {
            display: inline-flex;
            width: 252px;
            justify-content: space-between;
            margin-bottom: 13px;
            align-items: center;
        }

        .commute-text-field {
            width: 200px;
            min-width: 200px;
        }

        .commute-text-field::part(indicator) {
            visibility: hidden;
        }

        .delete-svg {
            opacity: 0.3;
        }
    `.withBehaviors((0,V.vF)(N.i`
                :host {
                    forced-color-adjust: auto;
                }
            `),new X(_,tt),new E.O(et,it))});var mt=i(82891),vt=i(9375),yt=i(16517),bt=i(23401),xt=i(44979),Ct=i(68364),wt=i(26415),Tt=i(79664),kt=i(49972),Dt=i(7511),It=i(31258),St=i(1393),At=i(60712),Lt=i(65033),Ot=i(42355),Mt=i(65135),Ft=i(38156);const Ht="TrafficCardContainer",zt=416,Bt=200,$t=146,Rt=462,Ut=304,Pt=308,jt=300,Et="https://www.bing.com/maps?setlang={locale}&q={query}&cp={coordinates}&lvl={zoom}&child=ypid%3D{ypid}&form={formCode}",Gt="Trafi2",Vt=new Map([[u.g2.Half,{x:0,y:$t*(.51-.5)}],[u.g2.Full,{x:jt*(.29-.5),y:Ut*(.57-.5)}],[u.g2.Tall,{x:0,y:Rt*(.41-.5)}]]),Nt={full:210,tall:366};var Wt;!function(t){t.TrafficCard="TrafficCard",t.TrafficBadge="TrafficBadge",t.TrafficTaskbar="TrafficTaskbar"}(Wt||(Wt={}));var qt=i(60483);const Qt=(t,e,i,a,o,n)=>{var r;const s=t&&t.trafficDataItems;let l,d=null,c=0,h=u.GU.Unknown;return t&&("commute"===t.scenario?h=u.GU.Commute:"cameras"==t.scenario?h=u.GU.Camera:"summary"===t.scenario?(h=u.GU.Summary,d=t.areaTrafficData?[t.areaTrafficData.areaCongestion]:null):"incidents"===t.scenario?h=u.GU.CollisionAndConstruction:"gas"===t.scenario?h=u.GU.GasPrice:"myRoutes"===t.scenario?h=u.GU.MyRoutes:"areaSummary"===t.scenario?h=u.GU.AreaSummary:"transitAlert"===t.scenario?h=u.GU.TransitAlert:"traffic"===t.scenario&&(!s||s.some((t=>null==t.isIncident||null==t.isIncident))?c=u.MV.Unknown:s.length>0&&(h=s.every((t=>t.isIncident))?u.GU.Incidents:s.every((t=>!t.isIncident))?u.GU.Delays:u.GU.Mixed,d=s.map((t=>t.congestion))))),d&&d.forEach((t=>{c|=void 0===t?u.MV.Unknown:t})),e&&(l=new URL("h