UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

4 lines 116 kB
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["8949"],{95262:function(e,t,i){"use strict";function n(e){return null==e||Array.isArray(e)?e:[e]}i.d(t,{r:()=>n})},92636:function(e,t,i){"use strict";i.d(t,{z:()=>n});i(19083),i(61006);const n=e=>(t,i)=>e.includes(t,i)},84200:function(e,t,i){"use strict";i.d(t,{r:()=>o});i(71695),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(47021);const n=(e,t,i=true)=>{var o;if(!e||e===document.body)return null;if((e=null!==(o=e.assignedSlot)&&void 0!==o?o:e).parentElement)e=e.parentElement;else{const t=e.getRootNode();e=t instanceof ShadowRoot?t.host:null}return(i?Object.prototype.hasOwnProperty.call(e,t):e&&t in e)?e:n(e,t,i)},o=(e,t,i=true)=>{const o=new Set;for(;e;)o.add(e),e=n(e,t,i);return o}},81165:function(e,t,i){"use strict";i.d(t,{j:()=>n});const n=(e=document)=>{var t;return null!==(t=e.activeElement)&&void 0!==t&&null!==(t=t.shadowRoot)&&void 0!==t&&t.activeElement?n(e.activeElement.shadowRoot):e.activeElement}},29567:function(e,t,i){"use strict";i.d(t,{h:()=>a});i(52247),i(71695),i(9359),i(31526),i(47021);var n=i(57243),o=i(92903);const a=(0,o.XM)(class extends o.Xe{constructor(e){if(super(e),this._element=void 0,e.type!==o.pX.CHILD)throw new Error("dynamicElementDirective can only be used in content bindings")}update(e,[t,i]){return this._element&&this._element.localName===t?(i&&Object.entries(i).forEach((([e,t])=>{this._element[e]=t})),n.Jb):this.render(t,i)}render(e,t){return this._element=document.createElement(e),t&&Object.entries(t).forEach((([e,t])=>{this._element[e]=t})),this._element}})},22337:function(e,t,i){"use strict";i.d(t,{J:()=>n});i(9359),i(1331);const n=(e,t=!0)=>{if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)return;const i=e.composedPath().find((e=>"A"===e.tagName));if(!i||i.target||i.hasAttribute("download")||"external"===i.getAttribute("rel"))return;let n=i.href;if(!n||-1!==n.indexOf("mailto:"))return;const o=window.location,a=o.origin||o.protocol+"//"+o.host;return 0===n.indexOf(a)&&(n=n.substr(a.length),"#"!==n)?(t&&e.preventDefault(),n):void 0}},86431:function(e,t,i){"use strict";i.d(t,{jL:()=>o,wZ:()=>a});i(71695),i(81804),i(47021);var n=i(47194);const o=e=>{var t;return null===(t=e.name_by_user||e.name)||void 0===t?void 0:t.trim()},a=(e,t,i)=>o(e)||i&&r(t,i)||t.localize("ui.panel.config.devices.unnamed_device",{type:t.localize(`ui.panel.config.devices.type.${e.entry_type||"device"}`)}),r=(e,t)=>{for(const i of t||[]){const t="string"==typeof i?i:i.entity_id,o=e.states[t];if(o)return(0,n.C)(o)}}},59847:function(e,t,i){"use strict";i.d(t,{N:()=>o});var n=i(73850);const o=e=>(0,n.M)(e.entity_id)},75278:function(e,t,i){"use strict";i.d(t,{e:()=>n});const n=(e,t)=>o(e.attributes,t),o=(e,t)=>!!(e.supported_features&t)},83523:function(e,t,i){"use strict";i.d(t,{c:()=>r});i(40251),i(19134),i(97003);var n=i(76525),o=i(36522),a=i(5111);const r=async(e,t,i=Date.now())=>{var s;const{history:l}=a.E;if(null!==(s=l.state)&&void 0!==s&&s.dialog&&Date.now()-i<500){return await(0,n.ts)()?new Promise((n=>{setTimeout((()=>{r(e,t,i).then(n)}))})):(console.warn("Navigation blocked, because dialog refused to close"),!1)}const d=(null==t?void 0:t.replace)||!1;var c,u,h;return d?l.replaceState(null!==(c=l.state)&&void 0!==c&&c.root?{root:!0}:null!==(u=null==t?void 0:t.data)&&void 0!==u?u:null,"",e):l.pushState(null!==(h=null==t?void 0:t.data)&&void 0!==h?h:null,"",e),(0,o.B)(a.E,"location-changed",{replace:d}),!0}},99426:function(e,t,i){"use strict";i.r(t);var n=i(61701),o=(i(71695),i(47021),i(57243)),a=i(50778),r=i(35359),s=i(36522);i(23334),i(37583);let l,d,c,u,h=e=>e;const p={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};(0,n.Z)([(0,a.Mo)("ha-alert")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)()],key:"title",value(){return""}},{kind:"field",decorators:[(0,a.Cb)({attribute:"alert-type"})],key:"alertType",value(){return"info"}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"dismissable",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,o.dy)(l||(l=h` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,r.$)({[this.alertType]:!0}),this.title?"":"no-title",p[this.alertType],(0,r.$)({content:!0,narrow:this.narrow}),this.title?(0,o.dy)(d||(d=h`<div class="title">${0}</div>`),this.title):o.Ld,this.dismissable?(0,o.dy)(c||(c=h`<ha-icon-button @click="${0}" label="Dismiss alert" .path="${0}"></ha-icon-button>`),this._dismissClicked,"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"):o.Ld)}},{kind:"method",key:"_dismissClicked",value:function(){(0,s.B)(this,"alert-dismissed-clicked")}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(u||(u=h`.issue-type{position:relative;padding:8px;display:flex}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:4px}.icon{z-index:1}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:0}.title{margin-top:2px;font-weight:700}.action ha-icon-button,.action mwc-button{--mdc-theme-primary:var(--primary-text-color);--mdc-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`))}}]}}),o.oi)},81282:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{var n=i(61701),o=(i(19083),i(71695),i(9359),i(68107),i(56475),i(70104),i(52924),i(19423),i(40251),i(61006),i(47021),i(57243)),a=i(50778),r=i(35359),s=i(27486),l=i(36522),d=i(73850),c=i(24360),u=i(82100),h=i(71857),p=i(76131),f=i(61107),v=i(94279),m=(i(23334),i(7285),i(37583),e([v]));v=(m.then?(await m)():m)[0];let g,y,b,_,k=e=>e;const w="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.11 2.9 22 4 22H20C21.11 22 22 21.11 22 20V4C22 2.9 21.11 2 20 2M4 6L6 4H10.9L4 10.9V6M4 13.7L13.7 4H18.6L4 18.6V13.7M20 18L18 20H13.1L20 13.1V18M20 10.3L10.3 20H5.4L20 5.4V10.3Z",x=e=>(0,o.dy)(g||(g=k`<ha-list-item graphic="icon" class="${0}"> ${0} ${0} </ha-list-item>`),(0,r.$)({"add-new":e.area_id===$}),e.icon?(0,o.dy)(y||(y=k`<ha-icon slot="graphic" .icon="${0}"></ha-icon>`),e.icon):(0,o.dy)(b||(b=k`<ha-svg-icon slot="graphic" .path="${0}"></ha-svg-icon>`),w),e.name),$="___ADD_NEW___",C="___NO_ITEMS___",L="___ADD_NEW_SUGGESTION___";(0,n.Z)([(0,a.Mo)("ha-area-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"placeholder",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean,attribute:"no-add"})],key:"noAdd",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Array,attribute:"exclude-domains"})],key:"excludeDomains",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Array,attribute:"exclude-areas"})],key:"excludeAreas",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"deviceFilter",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"entityFilter",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,a.SB)()],key:"_opened",value:void 0},{kind:"field",decorators:[(0,a.IO)("ha-combo-box",!0)],key:"comboBox",value:void 0},{kind:"field",key:"_suggestion",value:void 0},{kind:"field",key:"_init",value(){return!1}},{kind:"method",key:"open",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.open())}},{kind:"method",key:"focus",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.focus())}},{kind:"field",key:"_getAreas",value(){return(0,s.Z)(((e,t,i,n,o,a,r,s,l,c)=>{let u,p,f={};(n||o||a||r||s)&&(f=(0,h.R6)(i),u=t,p=i.filter((e=>e.area_id)),n&&(u=u.filter((e=>{const t=f[e.id];return!(!t||!t.length)&&f[e.id].some((e=>n.includes((0,d.M)(e.entity_id))))})),p=p.filter((e=>n.includes((0,d.M)(e.entity_id))))),o&&(u=u.filter((e=>{const t=f[e.id];return!t||!t.length||i.every((e=>!o.includes((0,d.M)(e.entity_id))))})),p=p.filter((e=>!o.includes((0,d.M)(e.entity_id))))),a&&(u=u.filter((e=>{const t=f[e.id];return!(!t||!t.length)&&f[e.id].some((e=>{const t=this.hass.states[e.entity_id];return!!t&&(t.attributes.device_class&&a.includes(t.attributes.device_class))}))})),p=p.filter((e=>{const t=this.hass.states[e.entity_id];return t.attributes.device_class&&a.includes(t.attributes.device_class)}))),r&&(u=u.filter((e=>r(e)))),s&&(u=u.filter((e=>{const t=f[e.id];return!(!t||!t.length)&&f[e.id].some((e=>{const t=this.hass.states[e.entity_id];return!!t&&s(t)}))})),p=p.filter((e=>{const t=this.hass.states[e.entity_id];return!!t&&s(t)}))));let v,m=e;return u&&(v=u.filter((e=>e.area_id)).map((e=>e.area_id))),p&&(v=(null!=v?v:[]).concat(p.filter((e=>e.area_id)).map((e=>e.area_id)))),v&&(m=m.filter((e=>v.includes(e.area_id)))),c&&(m=m.filter((e=>!c.includes(e.area_id)))),m.length||(m=[{area_id:C,floor_id:null,name:this.hass.localize("ui.components.area-picker.no_areas"),picture:null,icon:null,aliases:[],labels:[],temperature_entity_id:null,humidity_entity_id:null,created_at:0,modified_at:0}]),l?m:[...m,{area_id:$,floor_id:null,name:this.hass.localize("ui.components.area-picker.add_new"),picture:null,icon:"mdi:plus",aliases:[],labels:[],temperature_entity_id:null,humidity_entity_id:null,created_at:0,modified_at:0}]}))}},{kind:"method",key:"updated",value:function(e){if(!this._init&&this.hass||this._init&&e.has("_opened")&&this._opened){this._init=!0;const e=this._getAreas(Object.values(this.hass.areas),Object.values(this.hass.devices),Object.values(this.hass.entities),this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.noAdd,this.excludeAreas).map((e=>Object.assign(Object.assign({},e),{},{strings:[e.area_id,...e.aliases,e.name]})));this.comboBox.items=e,this.comboBox.filteredItems=e}}},{kind:"method",key:"render",value:function(){var e;return(0,o.dy)(_||(_=k` <ha-combo-box .hass="${0}" .helper="${0}" item-value-path="area_id" item-id-path="area_id" item-label-path="name" .value="${0}" .disabled="${0}" .required="${0}" .label="${0}" .placeholder="${0}" .renderer="${0}" @filter-changed="${0}" @opened-changed="${0}" @value-changed="${0}"> </ha-combo-box> `),this.hass,this.helper,this._value,this.disabled,this.required,void 0===this.label&&this.hass?this.hass.localize("ui.components.area-picker.area"):this.label,this.placeholder?null===(e=this.hass.areas[this.placeholder])||void 0===e?void 0:e.name:void 0,x,this._filterChanged,this._openedChanged,this._areaChanged)}},{kind:"method",key:"_filterChanged",value:function(e){var t;const i=e.target,n=e.detail.value;if(!n)return void(this.comboBox.filteredItems=this.comboBox.items);const o=(0,c.q)(n,(null===(t=i.items)||void 0===t?void 0:t.filter((e=>![C,$].includes(e.label_id))))||[]);0===o.length?this.noAdd?(this._suggestion=n,this.comboBox.filteredItems=[{area_id:L,floor_id:null,name:this.hass.localize("ui.components.area-picker.add_new_sugestion",{name:this._suggestion}),icon:"mdi:plus",picture:null,labels:[],aliases:[],temperature_entity_id:null,humidity_entity_id:null,created_at:0,modified_at:0}]):this.comboBox.filteredItems=[{area_id:C,floor_id:null,name:this.hass.localize("ui.components.area-picker.no_match"),icon:null,picture:null,labels:[],aliases:[],temperature_entity_id:null,humidity_entity_id:null,created_at:0,modified_at:0}]:this.comboBox.filteredItems=o}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_areaChanged",value:function(e){e.stopPropagation();let t=e.detail.value;if(t===C)return t="",void this.comboBox.setInputValue("");[L,$].includes(t)?(e.target.value=this._value,this.hass.loadFragmentTranslation("config"),(0,f.E)(this,{suggestedName:t===L?this._suggestion:"",createEntry:async e=>{try{const t=await(0,u.Lo)(this.hass,e),i=[...Object.values(this.hass.areas),t];this.comboBox.filteredItems=this._getAreas(i,Object.values(this.hass.devices),Object.values(this.hass.entities),this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.noAdd,this.excludeAreas),await this.updateComplete,await this.comboBox.updateComplete,this._setValue(t.area_id)}catch(t){(0,p.showAlertDialog)(this,{title:this.hass.localize("ui.components.area-picker.failed_create_area"),text:t.message})}}}),this._suggestion=void 0,this.comboBox.setInputValue("")):t!==this._value&&this._setValue(t)}},{kind:"method",key:"_setValue",value:function(e){this.value=e,setTimeout((()=>{(0,l.B)(this,"value-changed",{value:e}),(0,l.B)(this,"change")}),0)}}]}}),o.oi);t()}catch(g){t(g)}}))},94279:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{var n=i(61701),o=i(72621),a=(i(71695),i(9359),i(31526),i(40251),i(47021),i(2394)),r=i(28737),s=i(43631),l=i(57243),d=i(50778),c=i(20552),u=i(36522),h=(i(23334),i(7285),i(83166),e([r]));r=(h.then?(await h)():h)[0];let p,f,v,m,g,y,b=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",k="M7,10L12,15L17,10H7Z",w="M7,15L12,10L17,15H7Z";(0,s.hC)("vaadin-combo-box-item",(0,l.iv)(p||(p=b`:host{padding:0!important}:host([focused]:not([disabled])){background-color:rgba(var(--rgb-primary-text-color,0,0,0),.12)}:host([selected]:not([disabled])){background-color:transparent;color:var(--mdc-theme-primary);--mdc-ripple-color:var(--mdc-theme-primary);--mdc-theme-text-primary-on-background:var(--mdc-theme-primary)}:host([selected]:not([disabled])):before{background-color:var(--mdc-theme-primary);opacity:.12;content:"";position:absolute;top:0;left:0;width:100%;height:100%}:host([selected][focused]:not([disabled])):before{opacity:.24}:host(:hover:not([disabled])){background-color:transparent}[part=content]{width:100%}[part=checkmark]{display:none}`)));(0,n.Z)([(0,d.Mo)("ha-combo-box")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"placeholder",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"validationMessage",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"invalid",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"items",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"filteredItems",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"dataProvider",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"allow-custom-value",type:Boolean})],key:"allowCustomValue",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({attribute:"item-value-path"})],key:"itemValuePath",value(){return"value"}},{kind:"field",decorators:[(0,d.Cb)({attribute:"item-label-path"})],key:"itemLabelPath",value(){return"label"}},{kind:"field",decorators:[(0,d.Cb)({attribute:"item-id-path"})],key:"itemIdPath",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"renderer",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean,reflect:!0})],key:"opened",value(){return!1}},{kind:"field",decorators:[(0,d.IO)("vaadin-combo-box-light",!0)],key:"_comboBox",value:void 0},{kind:"field",decorators:[(0,d.IO)("ha-textfield",!0)],key:"_inputElement",value:void 0},{kind:"field",key:"_overlayMutationObserver",value:void 0},{kind:"field",key:"_bodyMutationObserver",value:void 0},{kind:"method",key:"open",value:async function(){var e;await this.updateComplete,null===(e=this._comboBox)||void 0===e||e.open()}},{kind:"method",key:"focus",value:async function(){var e,t;await this.updateComplete,await(null===(e=this._inputElement)||void 0===e?void 0:e.updateComplete),null===(t=this._inputElement)||void 0===t||t.focus()}},{kind:"method",key:"disconnectedCallback",value:function(){(0,o.Z)(i,"disconnectedCallback",this,3)([]),this._overlayMutationObserver&&(this._overlayMutationObserver.disconnect(),this._overlayMutationObserver=void 0),this._bodyMutationObserver&&(this._bodyMutationObserver.disconnect(),this._bodyMutationObserver=void 0)}},{kind:"get",key:"selectedItem",value:function(){return this._comboBox.selectedItem}},{kind:"method",key:"setInputValue",value:function(e){this._comboBox.value=e}},{kind:"method",key:"render",value:function(){var e;return(0,l.dy)(f||(f=b` <vaadin-combo-box-light .itemValuePath="${0}" .itemIdPath="${0}" .itemLabelPath="${0}" .items="${0}" .value="${0}" .filteredItems="${0}" .dataProvider="${0}" .allowCustomValue="${0}" .disabled="${0}" .required="${0}" ${0} @opened-changed="${0}" @filter-changed="${0}" @value-changed="${0}" attr-for-value="value"> <ha-textfield label="${0}" placeholder="${0}" ?disabled="${0}" ?required="${0}" validationMessage="${0}" .errorMessage="${0}" class="input" autocapitalize="none" autocomplete="off" autocorrect="off" input-spellcheck="false" .suffix="${0}" .icon="${0}" .invalid="${0}" .helper="${0}" helperPersistent> <slot name="icon" slot="leadingIcon"></slot> </ha-textfield> ${0} <ha-svg-icon role="button" tabindex="-1" aria-label="${0}" aria-expanded="${0}" class="toggle-button" .path="${0}" @click="${0}"></ha-svg-icon> </vaadin-combo-box-light> `),this.itemValuePath,this.itemIdPath,this.itemLabelPath,this.items,this.value||"",this.filteredItems,this.dataProvider,this.allowCustomValue,this.disabled,this.required,(0,a.t)(this.renderer||this._defaultRowRenderer),this._openedChanged,this._filterChanged,this._valueChanged,(0,c.o)(this.label),(0,c.o)(this.placeholder),this.disabled,this.required,(0,c.o)(this.validationMessage),this.errorMessage,(0,l.dy)(v||(v=b`<div style="width:28px" role="none presentation"></div>`)),this.icon,this.invalid,this.helper,this.value?(0,l.dy)(m||(m=b`<ha-svg-icon role="button" tabindex="-1" aria-label="${0}" class="clear-button" .path="${0}" @click="${0}"></ha-svg-icon>`),(0,c.o)(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.clear")),_,this._clearValue):"",(0,c.o)(this.label),this.opened?"true":"false",this.opened?w:k,this._toggleOpen)}},{kind:"field",key:"_defaultRowRenderer",value(){return e=>(0,l.dy)(g||(g=b`<ha-list-item> ${0} </ha-list-item>`),this.itemLabelPath?e[this.itemLabelPath]:e)}},{kind:"method",key:"_clearValue",value:function(e){e.stopPropagation(),(0,u.B)(this,"value-changed",{value:void 0})}},{kind:"method",key:"_toggleOpen",value:function(e){var t,i;this.opened?(null===(t=this._comboBox)||void 0===t||t.close(),e.stopPropagation()):null===(i=this._comboBox)||void 0===i||i.inputElement.focus()}},{kind:"method",key:"_openedChanged",value:function(e){e.stopPropagation();const t=e.detail.value;if(setTimeout((()=>{this.opened=t}),0),(0,u.B)(this,"opened-changed",{value:e.detail.value}),t){const e=document.querySelector("vaadin-combo-box-overlay");e&&this._removeInert(e),this._observeBody()}else{var i;null===(i=this._bodyMutationObserver)||void 0===i||i.disconnect(),this._bodyMutationObserver=void 0}}},{kind:"method",key:"_observeBody",value:function(){"MutationObserver"in window&&!this._bodyMutationObserver&&(this._bodyMutationObserver=new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{"VAADIN-COMBO-BOX-OVERLAY"===e.nodeName&&this._removeInert(e)})),e.removedNodes.forEach((e=>{var t;"VAADIN-COMBO-BOX-OVERLAY"===e.nodeName&&(null===(t=this._overlayMutationObserver)||void 0===t||t.disconnect(),this._overlayMutationObserver=void 0)}))}))})),this._bodyMutationObserver.observe(document.body,{childList:!0}))}},{kind:"method",key:"_removeInert",value:function(e){var t;if(e.inert)return e.inert=!1,null===(t=this._overlayMutationObserver)||void 0===t||t.disconnect(),void(this._overlayMutationObserver=void 0);"MutationObserver"in window&&!this._overlayMutationObserver&&(this._overlayMutationObserver=new MutationObserver((e=>{e.forEach((e=>{if("inert"===e.attributeName){const i=e.target;var t;if(i.inert)null===(t=this._overlayMutationObserver)||void 0===t||t.disconnect(),this._overlayMutationObserver=void 0,i.inert=!1}}))})),this._overlayMutationObserver.observe(e,{attributes:!0}))}},{kind:"method",key:"_filterChanged",value:function(e){e.stopPropagation(),(0,u.B)(this,"filter-changed",{value:e.detail.value})}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation(),this.allowCustomValue||(this._comboBox._closeOnBlurIsPrevented=!0);const t=e.detail.value;t!==this.value&&(0,u.B)(this,"value-changed",{value:t||void 0})}},{kind:"field",static:!0,key:"styles",value(){return(0,l.iv)(y||(y=b`:host{display:block;width:100%}vaadin-combo-box-light{position:relative;--vaadin-combo-box-overlay-max-height:calc(45vh - 56px)}ha-textfield{width:100%}ha-textfield>ha-icon-button{--mdc-icon-button-size:24px;padding:2px;color:var(--secondary-text-color)}ha-svg-icon{color:var(--input-dropdown-icon-color);position:absolute;cursor:pointer}.toggle-button{right:12px;top:-10px;inset-inline-start:initial;inset-inline-end:12px;direction:var(--direction)}:host([opened]) .toggle-button{color:var(--primary-color)}.clear-button{--mdc-icon-size:20px;top:-7px;right:36px;inset-inline-start:initial;inset-inline-end:36px;direction:var(--direction)}`))}}]}}),l.oi);t()}catch(p){t(p)}}))},73729:function(e,t,i){"use strict";i.d(t,{i:()=>v});var n=i(61701),o=i(72621),a=(i(22152),i(71695),i(47021),i(74966)),r=i(51408),s=i(57243),l=i(50778),d=i(76525);i(23334);let c,u,h,p=e=>e;const f=["button","ha-list-item"],v=(e,t)=>{var i;return(0,s.dy)(c||(c=p` <div class="header_title"> <ha-icon-button .label="${0}" .path="${0}" dialogAction="close" class="header_button"></ha-icon-button> <span>${0}</span> </div> `),null!==(i=null==e?void 0:e.localize("ui.common.close"))&&void 0!==i?i:"Close","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",t)};(0,n.Z)([(0,l.Mo)("ha-dialog")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:d.gA,value:void 0},{kind:"method",key:"scrollToPos",value:function(e,t){var i;null===(i=this.contentElement)||void 0===i||i.scrollTo(e,t)}},{kind:"method",key:"renderHeading",value:function(){return(0,s.dy)(u||(u=p`<slot name="heading"> ${0} </slot>`),(0,o.Z)(i,"renderHeading",this,3)([]))}},{kind:"method",key:"firstUpdated",value:function(){var e;(0,o.Z)(i,"firstUpdated",this,3)([]),this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,f].join(", "),this._updateScrolledAttribute(),null===(e=this.contentElement)||void 0===e||e.addEventListener("scroll",this._onScroll,{passive:!0})}},{kind:"method",key:"disconnectedCallback",value:function(){(0,o.Z)(i,"disconnectedCallback",this,3)([]),this.contentElement.removeEventListener("scroll",this._onScroll)}},{kind:"field",key:"_onScroll",value(){return()=>{this._updateScrolledAttribute()}}},{kind:"method",key:"_updateScrolledAttribute",value:function(){this.contentElement&&this.toggleAttribute("scrolled",0!==this.contentElement.scrollTop)}},{kind:"field",static:!0,key:"styles",value(){return[r.W,(0,s.iv)(h||(h=p`:host([scrolled]) ::slotted(ha-dialog-header){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.mdc-dialog{--mdc-dialog-scroll-divider-color:var( --dialog-scroll-divider-color, var(--divider-color) );z-index:var(--dialog-z-index,8);-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));--mdc-dialog-box-shadow:var(--dialog-box-shadow, none);--mdc-typography-headline6-font-weight:400;--mdc-typography-headline6-font-size:1.574rem}.mdc-dialog__actions{justify-content:var(--justify-action-buttons,flex-end);padding-bottom:max(env(safe-area-inset-bottom),24px)}.mdc-dialog__actions span:first-child{flex:var(--secondary-action-button-flex,unset)}.mdc-dialog__actions span:nth-child(2){flex:var(--primary-action-button-flex,unset)}.mdc-dialog__container{align-items:var(--vertical-align-dialog,center)}.mdc-dialog__title{padding:24px 24px 0 24px}.mdc-dialog__title:has(span){padding:12px 12px 0}.mdc-dialog__actions{padding:12px 24px 12px 24px}.mdc-dialog__title::before{content:unset}.mdc-dialog .mdc-dialog__content{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,24px)}:host([hideactions]) .mdc-dialog .mdc-dialog__content{padding-bottom:max(var(--dialog-content-padding,24px),env(safe-area-inset-bottom))}.mdc-dialog .mdc-dialog__surface{position:var(--dialog-surface-position,relative);top:var(--dialog-surface-top);margin-top:var(--dialog-surface-margin-top);min-height:var(--mdc-dialog-min-height,auto);border-radius:var(--ha-dialog-border-radius,28px);-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);background:var(--ha-dialog-surface-background,var(--mdc-theme-surface,#fff))}:host([flexContent]) .mdc-dialog .mdc-dialog__content{display:flex;flex-direction:column}.header_title{display:flex;align-items:center;direction:var(--direction)}.header_title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;padding-left:4px}.header_button{text-decoration:none;color:inherit;inset-inline-start:initial;inset-inline-end:-12px;direction:var(--direction)}.dialog-actions{inset-inline-start:initial!important;inset-inline-end:0px!important;direction:var(--direction)}`))]}}]}}),a.M)},7520:function(e,t,i){"use strict";i.d(t,{x:()=>n});i(63721),i(52247),i(9359),i(31526);const n=e=>{const t={};return e.forEach((e=>{var i,o;if(void 0!==(null===(i=e.description)||void 0===i?void 0:i.suggested_value)&&null!==(null===(o=e.description)||void 0===o?void 0:o.suggested_value))t[e.name]=e.description.suggested_value;else if("default"in e)t[e.name]=e.default;else if("expandable"===e.type){const i=n(e.schema);(e.required||Object.keys(i).length)&&(t[e.name]=i)}else if(e.required){if("boolean"===e.type)t[e.name]=!1;else if("string"===e.type)t[e.name]="";else if("integer"===e.type)t[e.name]="valueMin"in e?e.valueMin:0;else if("constant"===e.type)t[e.name]=e.value;else if("float"===e.type)t[e.name]=0;else if("select"===e.type){if(e.options.length){const i=e.options[0];t[e.name]=Array.isArray(i)?i[0]:i}}else if("positive_time_period_dict"===e.type)t[e.name]={hours:0,minutes:0,seconds:0};else if("selector"in e){const i=e.selector;var a;if("device"in i)t[e.name]=null!==(a=i.device)&&void 0!==a&&a.multiple?[]:"";else if("entity"in i){var r;t[e.name]=null!==(r=i.entity)&&void 0!==r&&r.multiple?[]:""}else if("area"in i){var s;t[e.name]=null!==(s=i.area)&&void 0!==s&&s.multiple?[]:""}else if("label"in i){var l;t[e.name]=null!==(l=i.label)&&void 0!==l&&l.multiple?[]:""}else if("boolean"in i)t[e.name]=!1;else if("addon"in i||"attribute"in i||"file"in i||"icon"in i||"template"in i||"text"in i||"theme"in i||"object"in i)t[e.name]="";else if("number"in i){var d,c;t[e.name]=null!==(d=null===(c=i.number)||void 0===c?void 0:c.min)&&void 0!==d?d:0}else if("select"in i){var u;if(null!==(u=i.select)&&void 0!==u&&u.options.length){const n=i.select.options[0],o="string"==typeof n?n:n.value;t[e.name]=i.select.multiple?[o]:o}}else if("country"in i){var h;null!==(h=i.country)&&void 0!==h&&null!==(h=h.countries)&&void 0!==h&&h.length&&(t[e.name]=i.country.countries[0])}else if("language"in i){var p;null!==(p=i.language)&&void 0!==p&&null!==(p=p.languages)&&void 0!==p&&p.length&&(t[e.name]=i.language.languages[0])}else if("duration"in i)t[e.name]={hours:0,minutes:0,seconds:0};else if("time"in i)t[e.name]="00:00:00";else if("date"in i||"datetime"in i){const i=(new Date).toISOString().slice(0,10);t[e.name]=`${i}T00:00:00`}else if("color_rgb"in i)t[e.name]=[0,0,0];else if("color_temp"in i){var f,v;t[e.name]=null!==(f=null===(v=i.color_temp)||void 0===v?void 0:v.min_mireds)&&void 0!==f?f:153}else if("action"in i||"trigger"in i||"condition"in i)t[e.name]=[];else{if(!("media"in i)&&!("target"in i))throw new Error(`Selector ${Object.keys(i)[0]} not supported in initial form data`);t[e.name]={}}}}else;})),t}},29073:function(e,t,i){"use strict";i.d(t,{u:()=>k});var n=i(61701),o=i(72621),a=(i(71695),i(9359),i(31526),i(70104),i(19423),i(40251),i(47021),i(57243)),r=i(50778),s=i(29567),l=i(36522);i(99426),i(66671);let d,c,u,h,p,f,v,m,g,y=e=>e;const b={boolean:()=>Promise.all([i.e("29570"),i.e("79350")]).then(i.bind(i,8353)),constant:()=>i.e("69654").then(i.bind(i,5606)),float:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("62022")]).then(i.bind(i,53203)),grid:()=>i.e("45036").then(i.bind(i,20018)),expandable:()=>i.e("42653").then(i.bind(i,91624)),integer:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("92139"),i.e("17375"),i.e("42849")]).then(i.bind(i,96116)),multi_select:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("56898"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("5080"),i.e("50408"),i.e("13204"),i.e("99562")]).then(i.bind(i,84545)),positive_time_period_dict:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("17529"),i.e("38336"),i.e("63016")]).then(i.bind(i,15063)),select:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("24199"),i.e("41258"),i.e("56898"),i.e("78943"),i.e("35671"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("7010"),i.e("62524"),i.e("34561"),i.e("47818"),i.e("22542")]).then(i.bind(i,62706)),string:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("36620")]).then(i.bind(i,8327)),optional_actions:()=>i.e("85230").then(i.bind(i,26709))},_=(e,t)=>e?!t.name||t.flatten?e:e[t.name]:null;let k=(0,n.Z)([(0,r.Mo)("ha-form")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"data",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"schema",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"error",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"warning",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeError",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeWarning",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeLabel",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeHelper",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"localizeValue",value:void 0},{kind:"method",key:"getFormProperties",value:function(){return{}}},{kind:"method",key:"focus",value:async function(){await this.updateComplete;const e=this.renderRoot.querySelector(".root");if(e)for(const t of e.children)if("HA-ALERT"!==t.tagName){t instanceof a.fl&&await t.updateComplete,t.focus();break}}},{kind:"method",key:"willUpdate",value:function(e){e.has("schema")&&this.schema&&this.schema.forEach((e=>{var t;"selector"in e||null===(t=b[e.type])||void 0===t||t.call(b)}))}},{kind:"method",key:"render",value:function(){return(0,a.dy)(d||(d=y` <div class="root" part="root"> ${0} ${0} </div> `),this.error&&this.error.base?(0,a.dy)(c||(c=y` <ha-alert alert-type="error"> ${0} </ha-alert> `),this._computeError(this.error.base,this.schema)):"",this.schema.map((e=>{var t;const i=((e,t)=>e&&t.name?e[t.name]:null)(this.error,e),n=((e,t)=>e&&t.name?e[t.name]:null)(this.warning,e);return(0,a.dy)(u||(u=y` ${0} ${0} `),i?(0,a.dy)(h||(h=y` <ha-alert own-margin alert-type="error"> ${0} </ha-alert> `),this._computeError(i,e)):n?(0,a.dy)(p||(p=y` <ha-alert own-margin alert-type="warning"> ${0} </ha-alert> `),this._computeWarning(n,e)):"","selector"in e?(0,a.dy)(f||(f=y`<ha-selector .schema="${0}" .hass="${0}" .name="${0}" .selector="${0}" .value="${0}" .label="${0}" .disabled="${0}" .placeholder="${0}" .helper="${0}" .localizeValue="${0}" .required="${0}" .context="${0}"></ha-selector>`),e,this.hass,e.name,e.selector,_(this.data,e),this._computeLabel(e,this.data),e.disabled||this.disabled||!1,e.required?"":e.default,this._computeHelper(e),this.localizeValue,e.required||!1,this._generateContext(e)):(0,s.h)(this.fieldElementName(e.type),Object.assign({schema:e,data:_(this.data,e),label:this._computeLabel(e,this.data),helper:this._computeHelper(e),disabled:this.disabled||e.disabled||!1,hass:this.hass,localize:null===(t=this.hass)||void 0===t?void 0:t.localize,computeLabel:this.computeLabel,computeHelper:this.computeHelper,localizeValue:this.localizeValue,context:this._generateContext(e)},this.getFormProperties())))})))}},{kind:"method",key:"fieldElementName",value:function(e){return`ha-form-${e}`}},{kind:"method",key:"_generateContext",value:function(e){if(!e.context)return;const t={};for(const[i,n]of Object.entries(e.context))t[i]=this.data[n];return t}},{kind:"method",key:"createRenderRoot",value:function(){const e=(0,o.Z)(i,"createRenderRoot",this,3)([]);return this.addValueChangedListener(e),e}},{kind:"method",key:"addValueChangedListener",value:function(e){e.addEventListener("value-changed",(e=>{e.stopPropagation();const t=e.target.schema;if(e.target===this)return;const i=!t.name||"flatten"in t&&t.flatten?e.detail.value:{[t.name]:e.detail.value};this.data=Object.assign(Object.assign({},this.data),i),(0,l.B)(this,"value-changed",{value:this.data})}))}},{kind:"method",key:"_computeLabel",value:function(e,t){return this.computeLabel?this.computeLabel(e,t):e?e.name:""}},{kind:"method",key:"_computeHelper",value:function(e){return this.computeHelper?this.computeHelper(e):""}},{kind:"method",key:"_computeError",value:function(e,t){return Array.isArray(e)?(0,a.dy)(v||(v=y`<ul> ${0} </ul>`),e.map((e=>(0,a.dy)(m||(m=y`<li> ${0} </li>`),this.computeError?this.computeError(e,t):e)))):this.computeError?this.computeError(e,t):e}},{kind:"method",key:"_computeWarning",value:function(e,t){return this.computeWarning?this.computeWarning(e,t):e}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(g||(g=y`.root>*{display:block}.root>:not([own-margin]):not(:last-child){margin-bottom:24px}ha-alert[own-margin]{margin-bottom:4px}`))}}]}}),a.oi)},13928:function(e,t,i){"use strict";i.r(t),i.d(t,{HaIconNext:()=>s});var n=i(61701),o=(i(71695),i(47021),i(50778)),a=i(5111),r=i(37583);let s=(0,n.Z)([(0,o.Mo)("ha-icon-next")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"path",value(){return"rtl"===a.E.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}]}}),r.HaSvgIcon)},7285:function(e,t,i){"use strict";i.d(t,{M:()=>p});var n=i(61701),o=i(72621),a=(i(71695),i(47021),i(65703)),r=i(46289),s=i(57243),l=i(50778);let d,c,u,h=e=>e,p=(0,n.Z)([(0,l.Mo)("ha-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"renderRipple",value:function(){return this.noninteractive?"":(0,o.Z)(i,"renderRipple",this,3)([])}},{kind:"get",static:!0,key:"styles",value:function(){return[r.W,(0,s.iv)(d||(d=h`:host{padding-left:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-inline-start:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-right:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px));padding-inline-end:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px))}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:48px}span.material-icons:first-of-type{margin-inline-start:0px!important;margin-inline-end:var(--mdc-list-item-graphic-margin,16px)!important;direction:var(--direction)!important}span.material-icons:last-of-type{margin-inline-start:auto!important;margin-inline-end:0px!important;direction:var(--direction)!important}.mdc-deprecated-list-item__meta{display:var(--mdc-list-item-meta-display);align-items:center;flex-shrink:0}:host([graphic=icon]:not([twoline])) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,20px)!important}:host([multiline-secondary]){height:auto}:host([multiline-secondary]) .mdc-deprecated-list-item__text{padding:8px 0}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text{text-overflow:initial;white-space:normal;overflow:auto;display:inline-block;margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text{margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text::before{display:none}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text::before{display:none}:host([disabled]){color:var(--disabled-text-color)}:host([noninteractive]){pointer-events:unset}`)),"rtl"===document.dir?(0,s.iv)(c||(c=h`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,s.iv)(u||(u=h``))]}}]}}),a.K)},53013:function(e,t,i){"use strict";var n=i(61701),o=i(72621),a=i(91179),r=(i(19083),i(71695),i(52805),i(9359),i(56475),i(70104),i(48136),i(40251),i(19134),i(61006),i(47021),i(57243)),s=i(50778),l=i(94886),d=i.n(l),c=i(36522),u=(i(72700),i(8038),i(71513),i(75656),i(50100),i(18084),i(75351));let h;const p=new(i(80262).L)(1e3),f={reType:(0,a.Z)(/((\[!(caution|important|note|tip|warning)\])(?:\s|\\n)?)/i,{input:1,type:3}),typeToHaAlert:{caution:"error",important:"info",note:"info",tip:"success",warning:"warning"}};(0,n.Z)([(0,s.Mo)("ha-markdown-element")],(function(e,t){class n extends t{constructor(...t){super(...t),e(this)}}return{F:n,d:[{kind:"field",decorators:[(0,s.Cb)()],key:"content",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:"allow-svg",type:Boolean})],key:"allowSvg",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"breaks",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,attribute:"lazy-images"})],key:"lazyImages",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"cache",value(){return!1}},{kind:"method",key:"disconnectedCallback",value:function(){if((0,o.Z)(n,"disconnectedCallback",this,3)([]),this.cache){const e=this._computeCacheKey();p.set(e,this.innerHTML)}}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"update",value:function(e){(0,o.Z)(n,"update",this,3)([e]),void 0!==this.content&&this._render()}},{kind:"method",key:"willUpdate",value:function(e){if(!this.innerHTML&&this.cache){const e=this._computeCacheKey();p.has(e)&&(this.innerHTML=p.get(e),this._resize())}}},{kind:"method",key:"_computeCacheKey",value:function(){return d()({content:this.content,allowSvg:this.allowSvg,breaks:this.breaks})}},{kind:"method",key:"_render",value:async function(){this.innerHTML=await(async(e,t,n)=>(h||(h=(0,u.Ud)(new Worker(new URL(i.p+i.u("45845"),i.b)))),h.renderMarkdown(e,t,n)))(String(this.content),{breaks:this.breaks,gfm:!0},{allowSvg:this.allowSvg}),this._resize();const e=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT,null);for(;e.nextNode();){const n=e.currentNode;if(n instanceof HTMLAnchorElement&&n.host!==document.location.host)n.target="_blank",n.rel="noreferrer noopener";else if(n instanceof HTMLImageElement)this.lazyImages&&(n.loading="lazy"),n.addEventListener("load",this._resize);else if(n instanceof HTMLQuoteElement){var t;const i=(null===(t=n.firstElementChild)||void 0===t||null===(t=t.firstChild)||void 0===t?void 0:t.textContent)&&f.reType.exec(n.firstElementChild.firstChild.textContent);if(i){const{type:t}=i.groups,o=document.createElement("ha-alert");o.alertType=f.typeToHaAlert[t.toLowerCase()],o.append(...Array.from(n.childNodes).map((e=>{const t=Array.from(e.childNodes);if(!this.breaks&&t.length){var n;const e=t[0];e.nodeType===Node.TEXT_NODE&&e.textContent===i.input&&null!==(n=e.textContent)&&void 0!==n&&n.includes("\n")&&(e.textContent=e.textContent.split("\n").slice(1).join("\n"))}return t})).reduce(((e,t)=>e.concat(t)),[]).filter((e=>e.textContent&&e.textContent!==i.input))),e.parentNode().replaceChild(o,n)}}else n instanceof HTMLElement&&["ha-alert","ha-qr-code","ha-icon","ha-svg-icon"].includes(n.localName)&&i(23265)(`./${n.localName}`)}}},{kind:"field",key:"_resize",value(){return()=>(0,c.B)(this,"content-resize")}}]}}),r.fl)},99254:function(e,t,i){"use strict";var n=i(61701),o=(i(71695),i(47021),i(57243)),a=i(50778);i(53013);let r,s,l=e=>e;(0,n.Z)([(0,a.Mo)("ha-markdown")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)()],key:"content",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:"allow-svg",type:Boolean})],key:"allowSvg",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"breaks",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean,attribute:"lazy-images"})],key:"lazyImages",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"cache",value(){return!1}},{kind:"method",key:"render",value:function(){return this.content?(0,o.dy)(r||(r=l`<ha-markdown-element .content="${0}" .allowSvg="${0}" .breaks="${0}" .lazyImages="${0}" .cache="${0}"></ha-markdown-element>`),this.content,this.allowSvg,this.breaks,this.lazyImages,this.cache):o.Ld}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(s||(s=l`:host{display:block}ha-markdown-element{-ms-user-select:text;-webkit-user-select:text;-moz-user-select:text}ha-markdown-element>:first-child{margin-top:0}ha-markdown-element>:last-child{margin-bottom:0}ha-alert{display:block;margin:4px 0}a{color:var(--primary-color)}img{max-width:100%}code,pre{background-color:var(--markdown-code-background-color,none);border-radius:3px}svg{background-color:var(--markdown-svg-background-color,none);color:var(--markdown-svg-color,none)}code{font-size:85%;padding:.2em .4em}pre code{padding:0}pre{padding:16px;overflow:auto;line-height:1.45;font-family:var(--code-font-family, monospace)}h1,h2,h3,h4,h5,h6{line-height:initial}h2{font-size:1.5em;font-weight:700}hr{border-color:var(--divider-color);border-bottom:none;margin:16px 0}`))}}]}}),o.oi)},66671:function(e,t,i){"use strict";var n=i(61701),o=(i(71695),i(40251),i(19134),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(97003),i(47021),i(57243)),a=i(50778),r=i(27486),s=i(29567),l=i(41063);let d,c=e=>e;const u={action:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("91552"),i.e("78456"),i.e("24199"),i.e("41258"),i.e("56898"),i.e("78943"),i.e("35671"),i.e("42950"),i.e("2142"),i.e("29570"),i.e("65505"),i.e("99287"),i.e("5080"),i.e("8795"),i.e("50408"),i.e("71588"),i.e("26023"),i.e("82261"),i.e("16350"),i.e("84942"),i.e("18865"),i.e("27090"),i.e("44959"),i.e("3049"),i.e("70147"),i.e("38336"),i.e("78823"),i.e("68889"),i.e("4192"),i.e("7193"),i.e("61628"),i.e("57828"),i.e("31674"),i.e("40503")]).then(i.bind(i,32669)),addon:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("24199"),i.e("78943"),i.e("91842"),i.e("7478")]).then(i.bind(i,51489)),area:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("24199"),i.e("78943"),i.e("83364"),i.e("27090"),i.e("91509")]).then(i.bind(i,54446)),areas_display:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("42950"),i.e("65505"),i.e("5080"),i.e("32491"),i.e("4438"),i.e("86431"),i.e("16498")]).then(i.bind(i,2218)),attribute:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("24199"),i.e("78943"),i.e("82261"),i.e("57828"),i.e("28751")]).then(i.bind(i,47622)),assist_pipeline:()=>Promise.all([i.e("66031"),i.e("72206"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("91583"),i.e("5027")]).then(i.bind(i,30363)),boolean:()=>Promise.all([i.e("26304"),i.e("29579")]).then(i.bind(i,56070)),color_rgb:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("55470")]).then(i.bind(i,52064)),condition:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("91552"),i.e("78456"),i.e("24199"),i.e("41258"),i.e("56898"),i.e("78943"),i.e("35671"),i.e("42950"),i.e("2142"),i.e("65505"),i.e("5080"),i.e("8795"),i.e("50408"),i.e("71588"),i.e("26023"),i.e("82261"),i.e("98938"),i.e("18865"),i.e("27090"),i.e("44959"),i.e("3049"),i.e("70147"),i.e("68889"),i.e("4192"),i.e("61628"),i.e("57828"),i.e("74592")]).then(i.bind(i,57071)),config_entry:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("24199"),i.e("78943"),i.e("28080"),i.e("80513")]).then(i.bind(i,2314)),conversation_agent:()=>Promise.all([i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("49975"),i.e("56500")]).then(i.bind(i,91838)),constant:()=>i.e("8751").then(i.bind(i,83268)),country:()=>Promise.all([i.e("66031"),i.e("72206"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("88406"),i.e("95424")]).then(i.bind(i,8331)),date:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("33809")]).then(i.bind(i,47807)),datetime:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("38336"),i.e("46962")]).then(i.bind(i,75677)),device:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("24199"),i.e("78943"),i.e("79625"),i.e("27090"),i.e("71680")]).then(i.bind(i,92793)),duration:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("87096"),i.e("38336"),i.e("29262")]).then(i.bind(i,73875)),entity:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("24199"),i.e("78943"),i.e("70243"),i.e("18865"),i.e("27090"),i.e("44959"),i.e("3049"),i.e("88008")]).then(i.bind(i,56208)),statistic:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("24199"),i.e("78943"),i.e("47308"),i.e("18865"),i.e("27090"),i.e("44959"),i.e("40119")]).then(i.bind(i,30490)),file:()=>Promise.all([i.e("65856"),i.e("99594")]).then(i.bind(i,96167)),floor:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("24199"),i.e("78943"),i.e("60210"),i.e("27090"),i.e("38311"),i.e("48332")]).then(i.bind(i,83390)),label:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("24199"),i.e("78943"),i.e("42950"),i.e("65505"),i.e("29381"),i.e("27090"),i.e("84958"),i.e("77378")]).then(i.bind(i,71670)),image:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("7010"),i.e("42311"),i.e("49577"),i.e("72308"),i.e("12223")]).then(i.bind(i,30030)),background:()=>Promise.all([i.e("42311"),i.e("72308"),i.e("25022")]).then(i.bind(i,24730)),language:()=>Promise.all([i.e("66031"),i.e("72206"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("57907"),i.e("26443")]).then(i.bind(i,74783)),navigation:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("24199"),i.e("78943"),i.e("68824"),i.e("85567"),i.e("54739")]).then(i.bind(i,5739)),number:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("42950"),i.e("65505"),i.e("92139"),i.e("30304")]).then(i.bind(i,69695)),object:()=>Promise.all([i.e("2142"),i.e("8795"),i.e("22975"),i.e("70147"),i.e("18482")]).then(i.bind(i,11530)),qr_code:()=>Promise.all([i.e("2142"),i.e("53750"),