iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
23 lines • 24 kB
JavaScript
/*! For license information please see 55328.41b2b6d46ce2bb76.js.LICENSE.txt */
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[55328],{75064:function(e,t,i){i(62953);var o=i(40445),a=i(5124),s=i(67576),r=i(2846);let l;class n extends r.G{constructor(...e){super(...e),this.borderTop=!1}}n.styles=[...r.J,(0,a.AH)(l||(l=(e=>e)`:host{--md-list-item-one-line-container-height:48px;--md-list-item-two-line-container-height:64px}:host([border-top]) md-item{border-top:1px solid var(--divider-color)}[slot=start]{--state-icon-color:var(--secondary-text-color)}[slot=overline]{line-height:1.15rem;font-size:calc(var(--mdc-typography-subtitle1-font-size, 1rem) * .75);font-weight:var(--mdc-typography-subtitle1-font-weight,400);font-family:var(
--mdc-typography-subtitle1-font-family,
var(--mdc-typography-font-family)
);color:var(--mdc-select-label-ink-color,rgba(0,0,0,.6))}[slot=headline]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-m);white-space:nowrap}[slot=supporting-text]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-s);white-space:nowrap}::slotted(img),::slotted(state-badge){width:32px;height:32px}::slotted(.code){font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-xs)}::slotted(.domain){font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);align-self:flex-end;max-width:30%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`))],(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],n.prototype,"borderTop",void 0),n=(0,o.Cg)([(0,s.EM)("ha-combo-box-item")],n)},3449:function(e,t,i){i(62953);var o=i(40445),a=i(5124),s=i(67576);let r,l,n=e=>e;class d extends a.WF{render(){return(0,a.qy)(r||(r=n`<slot></slot>`))}constructor(...e){super(...e),this.disabled=!1}}d.styles=(0,a.AH)(l||(l=n`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var(
--mdc-typography-caption-letter-spacing,
.0333333333em
);line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`)),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),d=(0,o.Cg)([(0,s.EM)("ha-input-helper-text")],d)},2846:function(e,t,i){i.d(t,{G:function(){return p},J:function(){return c}});var o=i(40445),a=i(58168),s=i(82553),r=i(5124),l=i(67576);i(54276);let n,d,h=e=>e;const c=[s.R,(0,r.AH)(n||(n=h`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`))];class p extends a.n{renderRipple(){return"text"===this.type?r.s6:(0,r.qy)(d||(d=h`<ha-ripple part="ripple" for="item" ?disabled="${0}"></ha-ripple>`),this.disabled&&"link"!==this.type)}}p.styles=c,p=(0,o.Cg)([(0,l.EM)("ha-md-list-item")],p)},88285:function(e,t,i){i.a(e,async function(e,t){try{i(3362),i(62953);var o=i(40445),a=i(35211),s=i(5124),r=i(67576),l=i(63672),n=i(1087),d=i(22792),h=i(17894),c=(i(75064),i(47680),i(26300)),p=e([c]);c=(p.then?(await p)():p)[0];let m,g,u,y,v,f,b,x,w,$,C=e=>e;const k="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",_="M7,10L12,15L17,10H7Z";class M extends((0,h.c)(s.WF)){async focus(){var e;await this.updateComplete,await(null===(e=this.item)||void 0===e?void 0:e.focus())}render(){var e,t,i,o;const a=!!this.value,r=!(!this.value||this.required||this.disabled||this.hideClearIcon),n=null!==(e=this.placeholder)&&void 0!==e?e:this.label,d=this.label&&a?(0,s.qy)(m||(m=C`<span slot="overline">${0}${0}</span>`),this.label,this.required?" *":""):s.s6,h=a?this.valueRenderer?this.valueRenderer(null!==(t=this.value)&&void 0!==t?t:""):(0,s.qy)(g||(g=C`<span slot="headline">${0}</span>`),this.value):n?(0,s.qy)(u||(u=C`<span slot="headline" class="placeholder"> ${0}${0} </span>`),n,this.required?" *":""):s.s6;return(0,s.qy)(y||(y=C` <ha-combo-box-item aria-label="${0}" .disabled="${0}" type="button" compact="compact"> ${0} ${0}${0} ${0} ${0} <ha-svg-icon class="arrow" slot="end" .path="${0}"></ha-svg-icon> </ha-combo-box-item> `),(0,l.J)(this.label||this.placeholder),this.disabled,this.image?(0,s.qy)(v||(v=C`<img alt="${0}" slot="start" .src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer">`),null!==(i=this.label)&&void 0!==i?i:"",this.image):this.icon?(0,s.qy)(f||(f=C`<ha-icon slot="start" .icon="${0}"></ha-icon>`),this.icon):(0,s.qy)(b||(b=C`<slot name="start"></slot>`)),d,h,this.unknown?(0,s.qy)(x||(x=C`<div slot="supporting-text" class="unknown"> ${0} </div>`),this.unknownItemText||(null===(o=this._i18n)||void 0===o?void 0:o.localize("ui.components.combo-box.unknown_item"))):s.s6,r?(0,s.qy)(w||(w=C` <ha-icon-button class="clear" slot="end" ="${0}" .path="${0}"></ha-icon-button> `),this._clear,k):s.s6,_)}_clear(e){e.stopPropagation(),(0,n.r)(this,"clear")}static get styles(){return[(0,s.AH)($||($=C`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`))]}constructor(...e){super(...e),this.invalid=!1}}(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],M.prototype,"invalid",void 0),(0,o.Cg)([(0,r.P)("ha-combo-box-item",!0)],M.prototype,"item",void 0),(0,o.Cg)([(0,r.wk)(),(0,a.Fg)({context:d.D5,subscribe:!0})],M.prototype,"_i18n",void 0),M=(0,o.Cg)([(0,r.EM)("ha-picker-field")],M),t()}catch(m){t(m)}})},606:function(e,t,i){i.a(e,async function(e,t){try{i(74423),i(18111),i(61701),i(62953);var o=i(40445),a=i(5124),s=i(67576),r=i(63672),l=i(22786),n=i(1087),d=i(29823),h=(i(70947),i(3449),i(88285)),c=(i(67094),e([d,h]));[d,h]=c.then?(await c)():c;let p,m,g,u,y,v,f,b,x,w=e=>e;class $ extends a.WF{render(){return this.disabled?(0,a.qy)(p||(p=w`${0}${0}`),this._renderField(),this._renderHelper()):(0,a.qy)(m||(m=w` <ha-dropdown placement="bottom" -select="${0}" -show="${0}" -hide="${0}"> ${0} ${0} </ha-dropdown> ${0} `),this._handleSelect,this._handleShow,this._handleHide,this._renderField(),this.options?this.options.map(e=>{var t;const i=["string","number"].includes(typeof e);return(0,a.qy)(g||(g=w` <ha-dropdown-item .value="${0}" .disabled="${0}" .selected="${0}"> ${0} <div class="content"> ${0} ${0} </div> </ha-dropdown-item> `),i?e:e.value,!i&&(null!==(t=e.disabled)&&void 0!==t&&t),this.value===(i?e:e.value),e.iconPath?(0,a.qy)(u||(u=w`<ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon>`),e.iconPath):a.s6,i?e:e.label||e.value,e.secondary?(0,a.qy)(y||(y=w`<div class="secondary">${0}</div>`),e.secondary):a.s6)}):(0,a.qy)(v||(v=w`<slot></slot>`)),this._renderHelper())}_renderField(){const e=this._getValueLabel(this.options,this.value);return(0,a.qy)(f||(f=w` <ha-picker-field slot="trigger" type="button" class="${0}" compact="compact" aria-label="${0}" ="${0}" .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" .hideClearIcon="${0}"> </ha-picker-field> `),this._opened?"opened":"",(0,r.J)(this.label),this._clearValue,this.label,e,this.required,this.disabled,!this.clearable||this.required||this.disabled||!String(this.value))}_renderHelper(){return this.helper?(0,a.qy)(b||(b=w`<ha-input-helper-text .disabled="${0}">${0}</ha-input-helper-text>`),this.disabled,this.helper):a.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,n.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,n.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,l.A)((e,t)=>{const i=void 0!==t?String(t):void 0;if(!e||!i)return i;for(const o of e){const e=["string","number"].includes(typeof o);if(e&&o===i||!e&&String(o.value)===i)return e?o:o.label||o.value}return i})}}$.styles=(0,a.AH)(x||(x=w`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`)),(0,o.Cg)([(0,s.MZ)({type:Boolean})],$.prototype,"clearable",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],$.prototype,"options",void 0),(0,o.Cg)([(0,s.MZ)()],$.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)()],$.prototype,"helper",void 0),(0,o.Cg)([(0,s.MZ)()],$.prototype,"value",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],$.prototype,"required",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],$.prototype,"disabled",void 0),(0,o.Cg)([(0,s.wk)()],$.prototype,"_opened",void 0),(0,o.Cg)([(0,s.P)("ha-picker-field")],$.prototype,"_triggerField",void 0),$=(0,o.Cg)([(0,s.EM)("ha-select")],$),t()}catch(p){t(p)}})},70491:function(e,t,i){i.d(t,{P:function(){return o}});const o=(e,t,i)=>{e.callService("datetime","set_value",{entity_id:t,datetime:i.toISOString()})}},17894:function(e,t,i){i.d(t,{c:function(){return s}});i(62953);var o=i(40445),a=i(67576);const s=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,o.Cg)([(0,a.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,o.Cg)([(0,a.MZ)()],t.prototype,"icon",void 0),(0,o.Cg)([(0,a.MZ)()],t.prototype,"image",void 0),(0,o.Cg)([(0,a.MZ)()],t.prototype,"label",void 0),(0,o.Cg)([(0,a.MZ)()],t.prototype,"placeholder",void 0),(0,o.Cg)([(0,a.MZ)()],t.prototype,"helper",void 0),(0,o.Cg)([(0,a.MZ)()],t.prototype,"value",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,o.Cg)([(0,a.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,o.Cg)([(0,a.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},69690:function(e,t,i){i.a(e,async function(e,o){try{i.r(t);i(16280),i(18111),i(61701);var a=i(40445),s=i(37313),r=i(5124),l=i(67576),n=i(19463),d=i(50286),h=i(70491),c=i(22675),p=i(784),m=i(79757),g=i(85979),u=e([n,d,m,g]);[n,d,m,g]=u.then?(await u)():u;let y,v,f,b=e=>e;class x extends r.WF{setConfig(e){if(!e)throw new Error("Invalid configuration");this._config=e}shouldUpdate(e){return(0,p.LX)(this,e)}render(){if(!this._config||!this.hass)return r.s6;const e=this.hass.states[this._config.entity];if(!e)return(0,r.qy)(y||(y=b` <hui-warning .hass="${0}"> ${0} </hui-warning> `),this.hass,(0,g.j)(this.hass,this._config.entity));const t=e.state===c.Hh,i=e.state===c.Hh||e.state===c.HV?void 0:new Date(e.state),o=i?(0,s.GP)(i,"HH:mm:ss"):void 0,a=i?(0,s.GP)(i,"yyyy-MM-dd"):void 0,l=this.hass.formatEntityName(e,this._config.name);return(0,r.qy)(v||(v=b` <hui-generic-entity-row .hass="${0}" .config="${0}" hide-name> <div> <ha-date-input .label="${0}" .locale="${0}" .value="${0}" .disabled="${0}" -changed="${0}"> </ha-date-input> <ha-time-input .value="${0}" .disabled="${0}" .locale="${0}" -changed="${0}" ="${0}"></ha-time-input> </div> </hui-generic-entity-row> `),this.hass,this._config,l,this.hass.locale,a,t,this._dateChanged,o,t,this.hass.locale,this._timeChanged,this._stopEventPropagation)}_stopEventPropagation(e){e.stopPropagation()}_timeChanged(e){if(e.detail.value){const t=this.hass.states[this._config.entity],i=new Date(t.state),o=e.detail.value.split(":").map(Number);i.setHours(o[0],o[1],o[2]),(0,h.P)(this.hass,t.entity_id,i)}}_dateChanged(e){if(e.detail.value){const t=this.hass.states[this._config.entity],i=new Date(t.state),o=e.detail.value.split("-").map(Number);i.setFullYear(o[0],o[1]-1,o[2]),(0,h.P)(this.hass,t.entity_id,i)}}}x.styles=(0,r.AH)(f||(f=b`ha-time-input{margin-left:4px;margin-inline-start:4px;margin-inline-end:initial;direction:var(--direction)}div{display:flex;justify-content:flex-end;width:100%}`)),(0,a.Cg)([(0,l.MZ)({attribute:!1})],x.prototype,"hass",void 0),(0,a.Cg)([(0,l.wk)()],x.prototype,"_config",void 0),x=(0,a.Cg)([(0,l.EM)("hui-datetime-entity-row")],x),o()}catch(y){o(y)}})},82553:function(e,t,i){i.d(t,{R:function(){return a}});let o;const a=(0,i(5124).AH)(o||(o=(e=>e)`:host{display:flex;-webkit-tap-highlight-color:transparent;--md-ripple-hover-color:var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity:var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color:var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity:var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape:8px}a,button,li{background:0 0;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:0;-webkit-tap-highlight-color:transparent;width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, .3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color,var(--md-sys-color-on-surface,#1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight,var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400)));min-height:var(--md-list-item-one-line-container-height,56px);padding-top:var(--md-list-item-top-space,12px);padding-bottom:var(--md-list-item-bottom-space,12px);padding-inline-start:var(--md-list-item-leading-space,16px);padding-inline-end:var(--md-list-item-trailing-space,16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height,72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, .875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight,var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, .6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight,var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}{.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}`))},58168:function(e,t,i){i.d(t,{n:function(){return q}});i(62953);var o=i(40445),a=(i(75275),i(67576)),s=(i(27495),i(5124));let r,l=e=>e;class n extends s.WF{render(){return(0,s.qy)(r||(r=l` <slot name="container"></slot> <slot class="non-text" name="start"></slot> <div class="text"> <slot name="overline" ="${0}"></slot> <slot class="default-slot" ="${0}"></slot> <slot name="headline" ="${0}"></slot> <slot name="supporting-text" ="${0}"></slot> </div> <slot class="non-text" name="trailing-supporting-text"></slot> <slot class="non-text" name="end"></slot> `),this.handleTextSlotChange,this.handleTextSlotChange,this.handleTextSlotChange,this.handleTextSlotChange)}handleTextSlotChange(){let e=!1,t=0;for(const i of this.textSlots)if(d(i)&&(t+=1),t>1){e=!0;break}this.multiline=e}constructor(){super(...arguments),this.multiline=!1}}function d(e){for(const i of e.assignedNodes({flatten:!0})){var t;const e=i.nodeType===Node.ELEMENT_NODE,o=i.nodeType===Node.TEXT_NODE&&(null===(t=i.textContent)||void 0===t?void 0:t.match(/\S/));if(e||o)return!0}return!1}(0,o.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],n.prototype,"multiline",void 0),(0,o.Cg)([(0,a.YG)(".text slot")],n.prototype,"textSlots",void 0);let h;const c=(0,s.AH)(h||(h=(e=>e)`:host{color:var(--md-sys-color-on-surface,#1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, .875rem);font-weight:var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}`));let p=class extends n{};p.styles=[c],p=(0,o.Cg)([(0,a.EM)("md-item")],p);i(71970);var m=i(6412),g=i(7872),u=i(1024),y=i(27525);let v,f,b,x,w,$,C,k,_=e=>e;const M=(0,u.n)(s.WF);class q extends M{get isDisabled(){return this.disabled&&"link"!==this.type}willUpdate(e){this.href&&(this.type="link"),super.willUpdate(e)}render(){return this.renderListItem((0,s.qy)(v||(v=_` <md-item> <div slot="container"> ${0} ${0} </div> <slot name="start" slot="start"></slot> <slot name="end" slot="end"></slot> ${0} </md-item> `),this.renderRipple(),this.renderFocusRing(),this.renderBody()))}renderListItem(e){const t="link"===this.type;let i;switch(this.type){case"link":i=(0,g.eu)(f||(f=_`a`));break;case"button":i=(0,g.eu)(b||(b=_`button`));break;default:i=(0,g.eu)(x||(x=_`li`))}const o="text"!==this.type,a=t&&this.target?this.target:s.s6;return(0,g.qy)(w||(w=_`
<${0}
id="item"
tabindex="${0}"
?disabled=${0}
role="listitem"
aria-selected=${0}
aria-checked=${0}
aria-expanded=${0}
aria-haspopup=${0}
class="list-item ${0}"
href=${0}
target=${0}
=${0}
>${0}</${0}>
`),i,this.isDisabled||!o?-1:0,this.isDisabled,this.ariaSelected||s.s6,this.ariaChecked||s.s6,this.ariaExpanded||s.s6,this.ariaHasPopup||s.s6,(0,m.H)(this.getRenderClasses()),this.href||s.s6,a,this.onFocus,e,i)}renderRipple(){return"text"===this.type?s.s6:(0,s.qy)($||($=_` <md-ripple part="ripple" for="item" ?disabled="${0}"></md-ripple>`),this.isDisabled)}renderFocusRing(){return"text"===this.type?s.s6:(0,s.qy)(C||(C=_` <md-focus-ring -changed="${0}" part="focus-ring" for="item" inward></md-focus-ring>`),this.onFocusRingVisibilityChanged)}onFocusRingVisibilityChanged(e){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return(0,s.qy)(k||(k=_` <slot></slot> <slot name="overline" slot="overline"></slot> <slot name="headline" slot="headline"></slot> <slot name="supporting-text" slot="supporting-text"></slot> <slot name="trailing-supporting-text" slot="trailing-supporting-text"></slot> `))}onFocus(){-1===this.tabIndex&&this.dispatchEvent((0,y.cG)())}focus(){var e;null===(e=this.listItemRoot)||void 0===e||e.focus()}click(){this.listItemRoot?this.listItemRoot.click():super.click()}constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}}q.shadowRootOptions=Object.assign(Object.assign({},s.WF.shadowRootOptions),{},{delegatesFocus:!0}),(0,o.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],q.prototype,"disabled",void 0),(0,o.Cg)([(0,a.MZ)({reflect:!0})],q.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,attribute:"md-list-item",reflect:!0})],q.prototype,"isListItem",void 0),(0,o.Cg)([(0,a.MZ)()],q.prototype,"href",void 0),(0,o.Cg)([(0,a.MZ)()],q.prototype,"target",void 0),(0,o.Cg)([(0,a.P)(".list-item")],q.prototype,"listItemRoot",void 0)}}]);