var e,t,s={1499(e,t,s){s.d(t,{Z:()=>i}),s(5983),s(23),s(1821),s(6131),s(8552),s(708),s(9613);var i,o=s(9609),r=s(4084),a=s(2927),d=s(2577),l=s(2900),n=s(4242),c=s(8899),h=function(e,t,s,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(a=(r<3?o(a):r>3?o(t,s,a):o(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.title="title",this.subtitle="",this.id="",this.info="",this.infoAriaLabel="Card Info",this.menuAriaLabel="Card Menu",this.menuOptions=[]}static get styles(){return[r.A,n.A]}handleCardClick(){this.dispatchEvent(new CustomEvent("card-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardKeyDown(e){e.code!==l.Uz.Enter&&e.code!==l.Uz.Space||this.dispatchEvent(new CustomEvent("card-keydown",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardMenuEvent(e,t){e.stopPropagation();const s=t.toLowerCase();this.dispatchEvent(new CustomEvent("card-menu-click",{detail:{id:this.id,type:s},bubbles:!0,composed:!0}))}handleCardMenuKeyDown(e,t){e.preventDefault(),this.dispatchEvent(new CustomEvent("card-menu-keydown",{detail:{id:this.id,type:t.toLowerCase(),keyCode:e.code},bubbles:!0,composed:!0}))}render(){return a.html`
        <div
          class="md-card"
          id="${this.id}"
          part="card"
          tabindex="0"
          @click=${()=>this.handleCardClick()}
          @keydown=${e=>this.handleCardKeyDown(e)}
        >
          <div class="md-card-header">
            <slot name="card-header-aside">
              <md-favorite value="${"card-"+this.id}"></md-favorite>
            </slot>
            <div class="md-card-header-title">
              <slot name="card-header-title">
                <h1>${this.title}</h1>
                <h2>${this.subtitle}</h2>
              </slot>
            </div>
            <div class="md-card-header-actions">
              ${this.info?a.html`
                    <md-tooltip message="${this.info}" placement="bottom">
                      <md-button
                        ariaLabel="${this.infoAriaLabel}"
                        class="md-card-info-icon"
                        color="color-none"
                        size="size-none"
                      >
                        <md-icon slot="icon" name="info-circle-bold" size="16" iconSet="momentumDesign"></md-icon>
                      </md-button>
                    </md-tooltip>
                  `:a.nothing}
              ${this.menuOptions.length?a.html`
                    <md-menu-overlay class="md-card-menu" placement="bottom-start">
                      <md-button
                        ariaLabel="${this.menuAriaLabel}"
                        class="md-card-menu-icon"
                        color="color-none"
                        size="size-none"
                        slot="menu-trigger"
                      >
                        <md-icon slot="icon" name="more-adr-bold" size="16" iconSet="momentumDesign"></md-icon>
                      </md-button>
                      <div class="md-card-menu-list-items" style="width: 100%;">
                        <md-list>
                          ${(0,d.repeat)(this.menuOptions,(e,t)=>a.html`
                              <md-list-item
                                class="${"menu-item-"+t}"
                                slot="list-item"
                                @click=${t=>this.handleCardMenuEvent(t,e)}
                                @keydown=${t=>this.handleCardMenuKeyDown(t,e)}
                                >${e}</md-list-item
                              >
                            `)}
                        </md-list>
                      </div>
                    </md-menu-overlay>
                  `:a.nothing}
            </div>
          </div>
          <div class="md-card-content">
            <slot name="content"></slot>
          </div>
          <div class="md-card-footer">
            <slot name="footer"> </slot>
          </div>
        </div>
      `}};h([(0,c.property)({type:String})],t.prototype,"title",void 0),h([(0,c.property)({type:String})],t.prototype,"subtitle",void 0),h([(0,c.property)({type:String})],t.prototype,"id",void 0),h([(0,c.property)({type:String})],t.prototype,"info",void 0),h([(0,c.property)({type:String,attribute:"info-aria-label"})],t.prototype,"infoAriaLabel",void 0),h([(0,c.property)({type:String,attribute:"menu-aria-label"})],t.prototype,"menuAriaLabel",void 0),h([(0,c.property)({type:Array})],t.prototype,"menuOptions",void 0),t=h([(0,o.w)("md-card")],t),e.ELEMENT=t}(i||(i={}))},23(e,t,s){s(1821);var i,o=s(2900),r=s(7704),a=s(9609),d=s(4084),l=s(2927),n=s(8899),c=s(4955),h=s(3517),p=s(6816),m=function(e,t,s,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(a=(r<3?o(a):r>3?o(t,s,a):o(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};!function(e){let t=class extends((0,r.yC)(l.LitElement)){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.value="Select favorite",this.id="",this.label="Favorite"}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleElectKeyDown),this.addEventListener("click",this.handleFavorite)}static get styles(){return[d.A,p.A]}handleFavorite(){this.disabled||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("favorite-toggle",{detail:{active:this.checked,value:this.value},bubbles:!0,composed:!0})))}handleElectKeyDown(e){e.code!==o.Uz.Enter&&e.code!==o.Uz.Space||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("favorite-keydown",{detail:{active:this.checked,value:this.value},bubbles:!0,composed:!0})))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleElectKeyDown),this.removeEventListener("click",this.handleFavorite)}get favoriteClassMap(){return{"md-favorite--active":this.checked,"md-favorite--disabled":this.disabled}}render(){return l.html`
        <label
          for="favorite-checkbox"
          id="${this.id}"
          class="md-favorite ${(0,c.classMap)(this.favoriteClassMap)}"
          tabindex="0"
        >
          <input
            type="checkbox"
            aria-label=${(0,h.ifDefined)(this.label.length?this.label:void 0)}
            value=${this.value}
            ?checked=${this.checked}
            ?disabled=${this.disabled}
            aria-hidden="true"
            name="favorite-checkbox"
          />
          <md-icon
            name="${this.checked?"favorite-filled":"favorite-bold"}"
            iconSet="momentumDesign"
            size="16"
          ></md-icon>
        </label>
      `}};m([(0,n.property)({type:Boolean})],t.prototype,"disabled",void 0),m([(0,n.property)({type:Boolean})],t.prototype,"checked",void 0),m([(0,n.property)({type:String})],t.prototype,"value",void 0),m([(0,n.property)({type:String})],t.prototype,"id",void 0),m([(0,n.property)({type:String})],t.prototype,"label",void 0),t=m([(0,a.w)("md-favorite")],t),e.ELEMENT=t}(i||(i={}))},6131(e,t,s){var i,o=s(2900),r=s(7704),a=s(9609),d=s(4084),l=s(2927),n=s(8899),c=s(3517),h=s(740),p=function(e,t,s,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(a=(r<3?o(a):r>3?o(t,s,a):o(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};!function(e){let t=class extends((0,r.Io)(l.LitElement)){constructor(){super(...arguments),this.alignment="vertical",this.label="option",this.activated=-1,this._role="listbox"}firstUpdated(e){super.firstUpdated(e),"none"!==this._role&&this.setAttribute("aria-label",this.label)}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selected},bubbles:!0,composed:!0}))}isFocusable(e){return!e.hasAttribute("hidden")}connectedCallback(){super.connectedCallback();const e=this.getAttribute("role");this._role=e||"listbox",this.removeAttribute("role"),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}findListItemIndex(e){const t=e.composedPath();return this.slotted.findIndex(e=>t.includes(e))}switchListItemOnArrowPress(e,t=1){const s=super.getAvailableSelectedIndex(e,t);-1!==s&&(this.selected=s)}setActivated(e){-1!==e&&(this.activated=e,this.selected=e,this.setSelected(e))}findSelectedListItemIndex(){return this.slotted.findIndex(e=>e.selected)}setSelected(e){const t=this.findSelectedListItemIndex();-1!==t&&t!==e&&(this.slotted[t].selected=!1),this.slotted[e]&&(this.slotted[e].selected=!0)}updated(e){super.updated(e),e.has("slotted")&&this.setActivated(this.activated),e.has("activated")&&this.setActivated(this.activated),e.has("label")&&"none"!==this._role&&this.setAttribute("aria-label",this.label)}isListItemDisabled(e){var t;const s=this.slotted[e];return null===(t=null==s?void 0:s.disabled)||void 0===t||t}handleClick(e){const t=this.findListItemIndex(e);-1!==t&&(this.isListItemDisabled(t)||(this.setActivated(t),this.notifySelectedChange()))}shouldElementHandleKey(e,t){if(e.hasAttribute("data-handles-keys")||e.closest("[data-handles-keys]"))return!0;const s=e.tagName.toLowerCase(),i=e.nodeName.toLowerCase(),r="input"===i||"textarea"===i||"select"===i,a=e.getAttribute("role"),d=e.hasAttribute("contenteditable")||"false"===e.getAttribute("aria-readonly"),l=[o.Uz.ArrowUp,o.Uz.ArrowDown,o.Uz.ArrowLeft,o.Uz.ArrowRight],n=[o.Uz.Enter,o.Uz.Space];return l.includes(t)?r||d||"textbox"===a||"combobox"===a||"listbox"===a||"menu"===a||"slider"===a||"scrollbar"===a||"tablist"===a||s.startsWith("md-")&&("md-input"===s||"md-select"===s||"md-combobox"===s):n.includes(t)?"button"===a||"link"===a||"checkbox"===a||"radio"===a||"button"===s||"a"===s||"md-button"===s||"md-checkbox"===s||"md-radio"===s||r:(t===o.Uz.Home||t===o.Uz.End)&&(r||d||"textbox"===a||"md-input"===s)}handleKeyDown(e){const t=e.composedPath()[0];if(this.shouldElementHandleKey(t,e.code))return;const{code:s}=e;switch(s){case o.Uz.End:this.switchListItemOnArrowPress(this.slotted.length-1);break;case o.Uz.Home:this.switchListItemOnArrowPress(0);break;case o.Uz.ArrowUp:case o.Uz.ArrowLeft:e.preventDefault(),0===this.selected?this.switchListItemOnArrowPress(this.slotted.length-1,-1):this.switchListItemOnArrowPress(this.selected-1,-1);break;case o.Uz.ArrowDown:case o.Uz.ArrowRight:e.preventDefault(),this.selected===this.slotted.length-1?this.switchListItemOnArrowPress(0):this.switchListItemOnArrowPress(this.selected+1);break;case o.Uz.Enter:case o.Uz.Space:this.isListItemDisabled(this.selected)||(this.setActivated(this.selected),this.notifySelectedChange())}}get slotElement(){return this.listItemSlot}static get styles(){return[d.A,h.A]}render(){return l.html`
        <ul role=${(0,c.ifDefined)("list"!==this._role?this._role:void 0)} class="md-list" part="list">
          <slot name="list-item"></slot>
        </ul>
      `}};p([(0,n.property)({type:String,reflect:!0})],t.prototype,"alignment",void 0),p([(0,n.property)({type:String})],t.prototype,"label",void 0),p([(0,n.property)({type:Number,reflect:!0})],t.prototype,"activated",void 0),p([(0,n.query)("slot[name='list-item']")],t.prototype,"listItemSlot",void 0),t=p([(0,a.w)("md-list")],t),e.ELEMENT=t}(i||(i={}))},8552(e,t,s){var i,o=s(7704),r=s(9609),a=s(4084),d=s(2927),l=s(8899),n=s(4955),c=s(740),h=function(e,t,s,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(a=(r<3?o(a):r>3?o(t,s,a):o(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a};!function(e){let t=class extends((0,o.yC)(d.LitElement)){constructor(){super(...arguments),this.role="option",this.tabIndex=-1,this.shape="rounded",this._disabled=!1,this._selected=!1}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-disabled",`${e}`),this.requestUpdate("disabled",t)}get selected(){return this._selected}set selected(e){const t=this._selected;this._selected=e,"option"===this.role&&this.setAttribute("aria-selected",`${e}`),this.requestUpdate("selected",t)}get listItemTemplateClassMap(){return{[`md-list-item--${this.shape}`]:!!this.shape}}static get styles(){return[a.A,c.A]}render(){return d.html`
        <div class="md-list-item ${(0,n.classMap)(this.listItemTemplateClassMap)}" part="list-item">
          <slot></slot>
        </div>
      `}};h([(0,l.property)({type:String,reflect:!0})],t.prototype,"role",void 0),h([(0,l.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),h([(0,l.property)({type:String,reflect:!0})],t.prototype,"shape",void 0),h([(0,l.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),h([(0,l.property)({type:Boolean,reflect:!0})],t.prototype,"selected",null),t=h([(0,r.w)("md-list-item")],t),e.ELEMENT=t}(i||(i={}))},7704(e,t,s){s.d(t,{Io:()=>r.I,UM:()=>o.U,yC:()=>i.y}),s(2364);var i=s(3203),o=(s(9938),s(5201)),r=s(4781);s(608)}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return s[e](r,r.exports,o),r.exports}o.m=s,e=[],o.O=(t,s,i,r)=>{if(!s){var a=1/0;for(c=0;c<e.length;c++){for(var[s,i,r]=e[c],d=!0,l=0;l<s.length;l++)(!1&r||a>=r)&&Object.keys(o.O).every(e=>o.O[e](s[l]))?s.splice(l--,1):(d=!1,r<a&&(a=r));if(d){e.splice(c--,1);var n=i();void 0!==n&&(t=n)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[s,i,r]},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{o as __webpack_require__};t={23:0,561:0,1462:0,2942:0,5323:0,6131:0,7704:0,8180:0,8552:0},o.C=e=>{var s,i,{__webpack_esm_ids__:r,__webpack_esm_modules__:a,__webpack_esm_runtime__:d}=e,l=0;for(s in a)o.o(a,s)&&(o.m[s]=a[s]);for(d&&d(o);l<r.length;l++)i=r[l],o.o(t,i)&&t[i]&&t[i][0](),t[r[l]]=0;o.O()},o.O.j=e=>0===t[e];import*as r from"../9609.js";o.C(r);import*as a from"../4084.js";o.C(a);import*as d from"../4955.js";o.C(d);import*as l from"../3517.js";o.C(l);import*as n from"../1156.js";o.C(n);import*as c from"../3305.js";o.C(c);import*as h from"../4739.js";o.C(h);import*as p from"../7154.js";o.C(p);import*as m from"../9773.js";o.C(m);import*as u from"../5983.js";o.C(u);import*as b from"../7755.js";o.C(b);import*as f from"../1821.js";o.C(f);import*as v from"../2364.js";o.C(v);import*as y from"../4980.js";o.C(y);import*as C from"../5308.js";o.C(C);import*as g from"../9500.js";o.C(g);import*as w from"../519.js";o.C(w);import*as k from"../2577.js";o.C(k);import*as E from"../2050.js";o.C(E);import*as j from"../8441.js";o.C(j);import*as A from"../608.js";o.C(A);import*as L from"../6343.js";o.C(L);import*as x from"../6525.js";o.C(x);import*as O from"../7582.js";o.C(O);import*as _ from"../7162.js";o.C(_);import*as I from"../708.js";o.C(I);import*as S from"../9613.js";o.C(S);import*as U from"../1756.js";o.C(U);import*as $ from"../740.js";o.C($);import*as z from"../6816.js";o.C(z);import*as D from"../7557.js";o.C(D);import*as P from"../4242.js";o.C(P);var M=o.O(void 0,[9609,4084,4955,3517,1156,3305,4739,7154,9773,5983,7755,1821,2364,4980,5308,9500,519,2577,2050,8441,608,6343,6525,7582,7162,708,9613,1756,740,6816,7557,4242],()=>o(1499));const R=(M=o.O(M)).Z;export{R as Card};