iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
34 lines • 27.6 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[78219],{57237:function(e,t,a){a.d(t,{d:function(){return o}});const o=e=>e.stopPropagation()},7553:function(e,t,a){a.d(t,{h:function(){return r}});a(16280),a(3362),a(62953);class o extends Error{constructor(e,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,o),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const r=(e,t)=>{const a=new Promise((t,a)=>{setTimeout(()=>{a(new o(e))},e)});return Promise.race([t,a])}},30716:function(e,t,a){a(3362),a(62953);var o=a(40445),r=a(72274),i=a(34875),c=a(7731),n=a(5124),s=a(67576),d=a(1087);const l=e=>e.preventDefault();var h=a(57237);a(9503);let p,f,u=e=>e;class b extends r.h{async onChange(e){e.stopPropagation(),super.onChange(e),(0,d.r)(this,e.type)}render(){const e=this.renderText(),t=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():n.s6,a=this.hasMeta&&this.left?this.renderMeta():n.s6,o=this.renderRipple();return(0,n.qy)(p||(p=u` ${0} ${0} ${0} <ha-checkbox tabindex="${0}" .checked="${0}" .indeterminate="${0}" ?disabled="${0}" ="${0}" ="${0}" class="${0}"> </ha-checkbox> ${0} ${0}`),o,t,this.left?"":e,this.separateCheckboxClick?this.tabindex:-1,this.selected,this.indeterminate,this.disabled||this.checkboxDisabled,this.onChange,this.separateCheckboxClick?h.d:l,this.left?"left":"",this.left?e:"",a)}constructor(...e){super(...e),this.checkboxDisabled=!1,this.indeterminate=!1,this.separateCheckboxClick=!1}}b.styles=[c.R,i.R,(0,n.AH)(f||(f=u`:host{--mdc-theme-secondary:var(--primary-color)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,16px);margin-inline-start:0px;direction:var(--direction)}ha-checkbox{flex-shrink:0;direction:var(--direction);margin-inline-start:auto;margin-inline-end:0;height:100%;justify-content:center}ha-checkbox.left{margin-inline-start:0}.mdc-deprecated-list-item__graphic{margin-top:var(--check-list-item-graphic-margin-top)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{margin-inline-start:0;margin-inline-end:var(--mdc-list-item-graphic-margin,32px)}`))],(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"checkbox-disabled"})],b.prototype,"checkboxDisabled",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],b.prototype,"indeterminate",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"separate-checkbox-click"})],b.prototype,"separateCheckboxClick",void 0),b=(0,o.Cg)([(0,s.EM)("ha-check-list-item")],b)},9503:function(e,t,a){var o=a(40445),r=a(97577),i=a(5124),c=a(67576);let n,s=e=>e;class d extends r.A{get value(){var e;return null!==(e=this._value)&&void 0!==e?e:null}set value(e){this._value=e}static get styles(){return[r.A.styles,(0,i.AH)(n||(n=s`:host{--wa-form-control-toggle-size:var(--ha-checkbox-size, 20px);--wa-form-control-border-color:var(
--ha-checkbox-border-color,
var(--ha-color-border-neutral-normal)
);--wa-form-control-background-color:var(
--ha-checkbox-background-color,
var(--wa-form-control-background-color)
);--checked-icon-color:var(
--ha-checkbox-checked-icon-color,
var(--wa-color-brand-on-loud)
);--wa-form-control-activated-color:var(
--ha-checkbox-checked-background-color,
var(--ha-color-fill-primary-loud-resting)
);-webkit-tap-highlight-color:transparent;--checked-icon-scale:var(--ha-checkbox-checked-icon-scale, 0.9);--wa-form-control-required-content:var(
--ha-checkbox-required-marker,
var(--ha-input-required-marker, "*")
);--wa-form-control-required-content-offset:var(
--ha-checkbox-required-marker-offset,
0.1rem
)}[part~=base]{align-items:center;gap:var(--ha-space-2)}[part~=control]{border-radius:var(--ha-checkbox-border-radius,var(--ha-border-radius-sm));border-width:var(--ha-checkbox-border-width,var(--ha-border-width-md));margin-inline-end:0}[part~=label]{line-height:1}#hint{font-size:var(--ha-font-size-xs);color:var(--ha-color-text-secondary)}label:has(input:not(:disabled)):hover{--wa-form-control-border-color:var(
--ha-checkbox-border-color-hover,
var(--ha-checkbox-border-color, var(--ha-color-border-neutral-loud))
)}label:has(input:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-background-color-hover,var(--ha-color-form-background-hover))}label:has(input:checked:not(:disabled)):hover [part~=control],label:has(input:indeterminate:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover));border-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover))}`))]}}d=(0,o.Cg)([(0,c.EM)("ha-checkbox")],d)},75064:function(e,t,a){a(62953);var o=a(40445),r=a(5124),i=a(67576),c=a(2846);let n;class s extends c.G{constructor(...e){super(...e),this.borderTop=!1}}s.styles=[...c.J,(0,r.AH)(n||(n=(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,i.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],s.prototype,"borderTop",void 0),s=(0,o.Cg)([(0,i.EM)("ha-combo-box-item")],s)},70947:function(e,t,a){a(62953);var o=a(40445),r=a(50759),i=(a(38625),a(5124)),c=a(67576);a(67094);let n,s,d=e=>e;class l extends r.A{renderCheckboxIcon(){return(0,i.qy)(n||(n=d` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z")}static get styles(){return[r.A.styles,(0,i.AH)(s||(s=d`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...e){super(...e),this.selected=!1}}(0,o.Cg)([(0,c.MZ)({type:Boolean,reflect:!0})],l.prototype,"selected",void 0),l=(0,o.Cg)([(0,c.EM)("ha-dropdown-item")],l)},29823:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var o=a(40445),r=a(52254),i=a(5124),c=a(67576),n=e([r]);r=(n.then?(await n)():n)[0];let s,d=e=>e;class l extends r.A{get anchorElement(){var e;return null===(e=this.popup)||void 0===e?void 0:e.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[r.A.styles,(0,i.AH)(s||(s=d`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
--card-background-color,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
)}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`))]}constructor(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,o.Cg)([(0,c.MZ)({attribute:!1})],l.prototype,"dropdownTag",void 0),(0,o.Cg)([(0,c.MZ)({attribute:!1})],l.prototype,"dropdownItemTag",void 0),l=(0,o.Cg)([(0,c.EM)("ha-dropdown")],l),t()}catch(s){t(s)}})},36182:function(e,t,a){a.a(e,async function(e,o){try{a.r(t),a.d(t,{HaFormMultiSelect:function(){return x}});a(49255),a(74423),a(18111),a(22489),a(20116),a(61701),a(62953);var r=a(40445),i=a(5124),c=a(67576),n=a(1087),s=(a(30716),a(9503),a(29823)),d=(a(70947),a(26300)),l=a(88285),h=e([s,d,l]);[s,d,l]=h.then?(await h)():h;let f,u,b,m,v,g=e=>e;function y(e){return Array.isArray(e)?e[0]:e}function w(e){return Array.isArray(e)?e[1]||e[0]:e}const k=6;class x extends i.WF{focus(){var e;null===(e=this._dropdown)||void 0===e||e.focus()}reportValidity(){return!(this.schema.required&&!(this.data&&this.data.length>0))}render(){const e=Array.isArray(this.schema.options)?this.schema.options:Object.entries(this.schema.options),t=this.data||[];return e.length<k?(0,i.qy)(f||(f=g`<div> ${0}${0} </div> `),this.label,e.map(e=>{const a=y(e);return(0,i.qy)(u||(u=g` <ha-checkbox .checked="${0}" .value="${0}" .disabled="${0}" ="${0}"> ${0} </ha-checkbox> `),t.includes(a),a,this.disabled,this._valueChanged,w(e))})):(0,i.qy)(b||(b=g` <ha-dropdown -select="${0}" -show="${0}" placement="bottom" tabindex="0" ="${0}"> <ha-picker-field slot="trigger" .label="${0}" .value="${0}" .disabled="${0}" hide-clear-icon> </ha-picker-field> ${0} </ha-dropdown> `),this._toggleItem,this._showDropdown,this._handleKeydown,this.label,t.map(t=>w(e.find(e=>y(e)===t))||t).join(", "),this.disabled,e.map(e=>{const a=y(e),o=t.includes(a);return(0,i.qy)(m||(m=g`<ha-dropdown-item .value="${0}" .action="${0}" type="checkbox" .checked="${0}"> ${0} </ha-dropdown-item>`),a,o?"remove":"add",o,w(e))}))}_toggleItem(e){e.preventDefault();const t=e.detail.item.value,a=e.detail.item.action,o=this.data||[];let r;r="add"===a?[...o,t]:o.filter(e=>e!==t),(0,n.r)(this,"value-changed",{value:r})}updated(e){e.has("schema")&&this.toggleAttribute("own-margin",Object.keys(this.schema.options).length>=k&&!!this.schema.required)}_valueChanged(e){const{value:t,checked:a}=e.target;this._handleValueChanged(t,a)}_handleValueChanged(e,t){let a;if(t)if(this.data){if(this.data.includes(e))return;a=[...this.data,e]}else a=[e];else{if(!this.data.includes(e))return;a=this.data.filter(t=>t!==e)}(0,n.r)(this,"value-changed",{value:a})}_showDropdown(e){this.disabled&&e.preventDefault(),this.style.setProperty("--dropdown-width",`${this._dropdown.offsetWidth}px`)}_handleKeydown(e){"Space"!==e.code&&"Enter"!==e.code||!this._dropdown||(this._dropdown.open=!0)}constructor(...e){super(...e),this.disabled=!1}}x.styles=(0,i.AH)(v||(v=g`:host([own-margin]){margin-bottom:5px}ha-dropdown{display:block}ha-checkbox{display:flex;padding-inline-end:var(--ha-space-4);padding-inline-start:initial;min-height:40px;justify-content:center;direction:var(--direction)}ha-icon-button{color:var(--input-dropdown-icon-color);position:absolute;right:1em;top:4px;cursor:pointer;inset-inline-end:1em;inset-inline-start:initial;direction:var(--direction)}:host([opened]) ha-icon-button{color:var(--primary-color)}ha-dropdown::part(menu){border-top-left-radius:0;border-top-right-radius:0;width:var(--dropdown-width)}:host([disabled]) ha-dropdown ha-picker-field{cursor:not-allowed}`)),(0,r.Cg)([(0,c.MZ)({attribute:!1})],x.prototype,"schema",void 0),(0,r.Cg)([(0,c.MZ)({attribute:!1})],x.prototype,"data",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"label",void 0),(0,r.Cg)([(0,c.MZ)({type:Boolean,reflect:!0})],x.prototype,"disabled",void 0),(0,r.Cg)([(0,c.P)("ha-dropdown")],x.prototype,"_dropdown",void 0),x=(0,r.Cg)([(0,c.EM)("ha-form-multi_select")],x),o()}catch(p){o(p)}})},47680:function(e,t,a){a.r(t),a.d(t,{HaIcon:function(){return M}});a(74423),a(3362),a(62953);var o=a(40445),r=a(5124),i=a(67576),c=a(1087),n=a(9899),s=a(700),d=(a(44114),a(18111),a(7588),a(96167),a(95192)),l=a(7553);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let p;const f=()=>(p||(p=u().catch(e=>{throw p=void 0,e})),p),u=async()=>{const e=(0,d.y$)("hass-icon-db","mdi-icon-store"),t=await(0,d.Jt)("_version",e);return t?t!==h.version&&(await(0,d.IU)(e),(0,d.hZ)("_version",h.version,e)):(0,d.hZ)("_version",h.version,e),e},b=["mdi","hass","hassio","hademo"];let m=[];a(67094);let v,g,y,w=e=>e;const k={},x={},C=(0,n.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await f())("readwrite",o=>{a.forEach((a,r)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{o.put(t,e)}),delete e[t[r]]})})})(x),2e3),_={},$={"home-assistant":()=>a.e(58781).then(a.bind(a,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>a.e(56009).then(a.bind(a,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>a.e(88800).then(a.bind(a,45091)).then(e=>e.mdiEsphomeLogo)};class M extends r.WF{willUpdate(e){super.willUpdate(e),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?(0,r.qy)(v||(v=w` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,r.qy)(g||(g=w`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):r.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let o,r=a;if(!t||!r)return;if(!b.includes(t)){const a=s.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(r),e)):void(this._legacy=!0)}if(this._legacy=!1,r in k){const e=k[r];let a;e.newName?(a=`Icon ${t}:${r} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,r=e.newName):a=`Icon ${t}:${r} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(a),(0,c.r)(this,"write_log",{level:"warning",message:a})}if(r in _)return void(this._path=_[r]);if(r in $){const t=await $[r]();return this.icon===e&&(this._path=t),void(_[r]=t)}try{o=await(e=>new Promise((t,a)=>{if(m.push([e,t,a]),m.length>1)return;const o=f();(0,l.h)(1e3,(async()=>{(await o)("readonly",e=>{for(const[t,a,o]of m)(0,d.Yd)(e.get(t)).then(e=>a(e)).catch(e=>o(e));m=[]})})()).catch(e=>{for(const[,,t]of m)t(e);m=[]})}))(r)}catch(p){o=void 0}if(o)return this.icon===e&&(this._path=o),void(_[r]=o);const i=(e=>{let t;for(const a of h.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(r);if(i in x)return void this._setPath(x[i],r,e);const n=fetch(`/static/mdi/${i}.json`).then(e=>e.json());x[i]=n,this._setPath(n,r,e),n.catch(()=>{delete x[i]}),C()}async _setCustomPath(e,t){const a=await e;this.icon===t&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}async _setPath(e,t,a){try{const o=await e;this.icon===a&&(this._path=o[t]),_[t]=o[t]}catch(o){}}constructor(...e){super(...e),this._legacy=!1}}M.styles=(0,r.AH)(y||(y=w`:host{fill:currentcolor}`)),(0,o.Cg)([(0,i.MZ)()],M.prototype,"icon",void 0),(0,o.Cg)([(0,i.wk)()],M.prototype,"_path",void 0),(0,o.Cg)([(0,i.wk)()],M.prototype,"_secondaryPath",void 0),(0,o.Cg)([(0,i.wk)()],M.prototype,"_viewBox",void 0),(0,o.Cg)([(0,i.wk)()],M.prototype,"_legacy",void 0),M=(0,o.Cg)([(0,i.EM)("ha-icon")],M)},2846:function(e,t,a){a.d(t,{G:function(){return p},J:function(){return h}});var o=a(40445),r=a(58168),i=a(82553),c=a(5124),n=a(67576);a(54276);let s,d,l=e=>e;const h=[i.R,(0,c.AH)(s||(s=l`: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 r.n{renderRipple(){return"text"===this.type?c.s6:(0,c.qy)(d||(d=l`<ha-ripple part="ripple" for="item" ?disabled="${0}"></ha-ripple>`),this.disabled&&"link"!==this.type)}}p.styles=h,p=(0,o.Cg)([(0,n.EM)("ha-md-list-item")],p)},88285:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var o=a(40445),r=a(35211),i=a(5124),c=a(67576),n=a(63672),s=a(1087),d=a(22792),l=a(17894),h=(a(75064),a(47680),a(26300)),p=e([h]);h=(p.then?(await p)():p)[0];let f,u,b,m,v,g,y,w,k,x,C=e=>e;const _="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,l.c)(i.WF)){async focus(){var e;await this.updateComplete,await(null===(e=this.item)||void 0===e?void 0:e.focus())}render(){var e,t,a,o;const r=!!this.value,c=!(!this.value||this.required||this.disabled||this.hideClearIcon),s=null!==(e=this.placeholder)&&void 0!==e?e:this.label,d=this.label&&r?(0,i.qy)(f||(f=C`<span slot="overline">${0}${0}</span>`),this.label,this.required?" *":""):i.s6,l=r?this.valueRenderer?this.valueRenderer(null!==(t=this.value)&&void 0!==t?t:""):(0,i.qy)(u||(u=C`<span slot="headline">${0}</span>`),this.value):s?(0,i.qy)(b||(b=C`<span slot="headline" class="placeholder"> ${0}${0} </span>`),s,this.required?" *":""):i.s6;return(0,i.qy)(m||(m=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,n.J)(this.label||this.placeholder),this.disabled,this.image?(0,i.qy)(v||(v=C`<img alt="${0}" slot="start" .src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer">`),null!==(a=this.label)&&void 0!==a?a:"",this.image):this.icon?(0,i.qy)(g||(g=C`<ha-icon slot="start" .icon="${0}"></ha-icon>`),this.icon):(0,i.qy)(y||(y=C`<slot name="start"></slot>`)),d,l,this.unknown?(0,i.qy)(w||(w=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"))):i.s6,c?(0,i.qy)(k||(k=C` <ha-icon-button class="clear" slot="end" ="${0}" .path="${0}"></ha-icon-button> `),this._clear,_):i.s6,$)}_clear(e){e.stopPropagation(),(0,s.r)(this,"clear")}static get styles(){return[(0,i.AH)(x||(x=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,c.MZ)({type:Boolean,reflect:!0})],M.prototype,"invalid",void 0),(0,o.Cg)([(0,c.P)("ha-combo-box-item",!0)],M.prototype,"item",void 0),(0,o.Cg)([(0,c.wk)(),(0,r.Fg)({context:d.D5,subscribe:!0})],M.prototype,"_i18n",void 0),M=(0,o.Cg)([(0,c.EM)("ha-picker-field")],M),t()}catch(f){t(f)}})},54276:function(e,t,a){a(62953);var o=a(40445),r=a(76482),i=a(91382),c=a(96245),n=a(5124),s=a(67576);let d;class l extends i.n{attach(e){super.attach(e),this.attachableTouchController.attach(e)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){null==e||e.removeEventListener("touchend",this._handleTouchEnd),null==t||t.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new r.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}l.styles=[c.R,(0,n.AH)(d||(d=(e=>e)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
--ha-ripple-hover-color,
var(--ha-ripple-color, var(--secondary-text-color))
);--md-ripple-pressed-color:var(
--ha-ripple-pressed-color,
var(--ha-ripple-color, var(--secondary-text-color))
)}`))],l=(0,o.Cg)([(0,s.EM)("ha-ripple")],l)},700:function(e,t,a){a.d(t,{y:function(){return c}});const o=window;"customIconsets"in o||(o.customIconsets={});const r=o.customIconsets,i=window;"customIcons"in i||(i.customIcons={});const c=new Proxy(i.customIcons,{get:(e,t)=>{var a;return null!==(a=e[t])&&void 0!==a?a:r[t]?{getIcon:r[t]}:void 0}})},17894:function(e,t,a){a.d(t,{c:function(){return i}});a(62953);var o=a(40445),r=a(67576);const i=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,r.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,o.Cg)([(0,r.MZ)()],t.prototype,"icon",void 0),(0,o.Cg)([(0,r.MZ)()],t.prototype,"image",void 0),(0,o.Cg)([(0,r.MZ)()],t.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)()],t.prototype,"placeholder",void 0),(0,o.Cg)([(0,r.MZ)()],t.prototype,"helper",void 0),(0,o.Cg)([(0,r.MZ)()],t.prototype,"value",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},69235:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await a.e(71055).then(a.bind(a,52370))).default),t()}catch(o){t(o)}},1)}}]);