UNPKG

iobroker.lovelace

Version:

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

15 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("3688"),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("48281"),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("64766"),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("56129"),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"),i.e("37328")]).then(i.bind(i,23534)),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("47818"),i.e("16816")]).then(i.bind(i,98491)),selector:()=>i.e("94377").then(i.bind(i,61320)),state:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("24199"),i.e("78943"),i.e("91842"),i.e("71373")]).then(i.bind(i,93650)),backup_location:()=>Promise.all([i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("57907"),i.e("37979")]).then(i.bind(i,52922)),stt:()=>Promise.all([i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("88355"),i.e("6888")]).then(i.bind(i,51974)),target:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("78456"),i.e("24199"),i.e("78943"),i.e("99287"),i.e("90660"),i.e("18865"),i.e("27090"),i.e("44959"),i.e("3049"),i.e("71958"),i.e("55523")]).then(i.bind(i,17628)),template:()=>i.e("74347").then(i.bind(i,12234)),text:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("76542")]).then(i.bind(i,91126)),time:()=>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("25436")]).then(i.bind(i,92472)),icon:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("24199"),i.e("78943"),i.e("52405"),i.e("18865"),i.e("21138")]).then(i.bind(i,28203)),media:()=>i.e("73856").then(i.bind(i,19326)),theme:()=>Promise.all([i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("66697"),i.e("59810")]).then(i.bind(i,93408)),button_toggle:()=>Promise.all([i.e("41850"),i.e("95627")]).then(i.bind(i,96364)),trigger:()=>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("5080"),i.e("8795"),i.e("50408"),i.e("71588"),i.e("26023"),i.e("82261"),i.e("49877"),i.e("18865"),i.e("27090"),i.e("44959"),i.e("3049"),i.e("70147"),i.e("68889"),i.e("4192"),i.e("7193"),i.e("57828"),i.e("7988")]).then(i.bind(i,45127)),tts:()=>Promise.all([i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("91799"),i.e("73355")]).then(i.bind(i,65697)),tts_voice:()=>Promise.all([i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("92023"),i.e("80515")]).then(i.bind(i,12596)),location:()=>Promise.all([i.e("72206"),i.e("2142"),i.e("35637"),i.e("85109"),i.e("18865"),i.e("49554"),i.e("13197"),i.e("40837")]).then(i.bind(i,70579)),color_temp:()=>Promise.all([i.e("72206"),i.e("42950"),i.e("65505"),i.e("92139"),i.e("32146"),i.e("54597"),i.e("65005"),i.e("81696")]).then(i.bind(i,48563)),ui_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("2142"),i.e("29570"),i.e("99287"),i.e("8795"),i.e("17284"),i.e("18865"),i.e("70147"),i.e("78823"),i.e("85567"),i.e("87471"),i.e("64143")]).then(i.bind(i,86772)),ui_color:()=>Promise.all([i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("62396"),i.e("8058")]).then(i.bind(i,13329)),ui_state_content:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("24199"),i.e("78943"),i.e("42950"),i.e("65505"),i.e("21323"),i.e("17009")]).then(i.bind(i,92884))},h=new Set(["ui-action","ui-color"]);(0,n.Z)([(0,a.Mo)("ha-selector")],(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:"name",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"localizeValue",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"placeholder",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!0}},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"context",value:void 0},{kind:"method",key:"focus",value:async function(){var e;await this.updateComplete,null===(e=this.renderRoot.querySelector("#selector"))||void 0===e||e.focus()}},{kind:"get",key:"_type",value:function(){const e=Object.keys(this.selector)[0];return h.has(e)?e.replace("-","_"):e}},{kind:"method",key:"willUpdate",value:function(e){var t;e.has("selector")&&this.selector&&(null===(t=u[this._type])||void 0===t||t.call(u))}},{kind:"field",key:"_handleLegacySelector",value(){return(0,r.Z)((e=>{if("entity"in e)return(0,l.CM)(e);if("device"in e)return(0,l.c9)(e);const t=Object.keys(this.selector)[0];return h.has(t)?{[t.replace("-","_")]:e[t]}:e}))}},{kind:"method",key:"render",value:function(){return(0,o.dy)(d||(d=c` ${0} `),(0,s.h)(`ha-selector-${this._type}`,{hass:this.hass,name:this.name,selector:this._handleLegacySelector(this.selector),value:this.value,label:this.label,placeholder:this.placeholder,disabled:this.disabled,required:this.required,helper:this.helper,context:this.context,localizeValue:this.localizeValue,id:"selector"}))}}]}}),o.oi)},17170:function(e,t,i){"use strict";i.a(e,(async function(e,n){try{i.r(t),i.d(t,{HaSpinner:()=>p});var o=i(61701),a=i(72621),r=(i(71695),i(47021),i(97677)),s=i(43580),l=i(57243),d=i(50778),c=e([r]);r=(c.then?(await c)():c)[0];let u,h=e=>e,p=(0,o.Z)([(0,d.Mo)("ha-spinner")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,a.Z)(i,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}},{kind:"field",static:!0,key:"styles",value(){return[s.Z,(0,l.iv)(u||(u=h`:host{--indicator-color:var(
          --ha-spinner-indicator-color,
          var(--primary-color)
        );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}]}}),r.Z);n()}catch(u){n(u)}}))},83166:function(e,t,i){"use strict";i.d(t,{f:()=>v});var n=i(61701),o=i(72621),a=(i(71695),i(47021),i(1105)),r=i(33990),s=i(57243),l=i(50778),d=i(5111);let c,u,h,p,f=e=>e,v=(0,n.Z)([(0,l.Mo)("ha-textfield")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,l.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,l.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,l.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,l.Cb)({type:Boolean})],key:"iconTrailing",value(){return!1}},{kind:"field",decorators:[(0,l.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,l.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,l.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,l.IO)("input")],key:"formElement",value:void 0},{kind:"method",key:"updated",value:function(e){(0,o.Z)(i,"updated",this,3)([e]),(e.has("invalid")||e.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||this.validationMessage||"Invalid":""),(this.invalid||this.validateOnInitialRender||e.has("invalid")&&void 0!==e.get("invalid"))&&this.reportValidity()),e.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),e.has("autocorrect")&&(this.autocorrect?this.formElement.setAttribute("autocorrect",this.autocorrect):this.formElement.removeAttribute("autocorrect")),e.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}},{kind:"method",key:"renderIcon",value:function(e,t=!1){const i=t?"trailing":"leading";return(0,s.dy)(c||(c=f` <span class="mdc-text-field__icon mdc-text-field__icon--${0}" tabindex="${0}"> <slot name="${0}Icon"></slot> </span> `),i,t?1:-1,i)}},{kind:"field",static:!0,key:"styles",value(){return[r.W,(0,s.iv)(u||(u=f`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding:var(--text-field-padding,0px 16px)}.mdc-text-field__affix--suffix{padding-left:var(--text-field-suffix-padding-left,12px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:ltr}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:var(--text-field-suffix-padding-left,0px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,0px)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){text-overflow:ellipsis;width:inherit;padding-right:30px;padding-inline-end:30px;padding-inline-start:initial;box-sizing:border-box;direction:var(--direction)}input{text-align:var(--text-field-text-align,start)}input[type=color]{height:20px}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-field{overflow:var(--text-field-overflow)}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start);direction:var(--direction);text-align:var(--float-start)}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px - var(--text-field-suffix-padding-left,0px));inset-inline-start:calc(48px + var(--text-field-suffix-padding-left,0px))!important;inset-inline-end:initial!important;direction:var(--direction)}.mdc-text-field__input[type=number]{direction:var(--direction)}.mdc-text-field__affix--prefix{padding-right:var(--text-field-prefix-padding-right,2px);padding-inline-end:var(--text-field-prefix-padding-right,2px);padding-inline-start:initial}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:var(--mdc-text-field-label-ink-color)}#helper-text ha-markdown{display:inline-block}`)),"rtl"===d.E.document.dir?(0,s.iv)(h||(h=f`.mdc-floating-label,.mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field__icon--leading,.mdc-text-field__input[type=number]{direction:rtl;--direction:rtl}`)):(0,s.iv)(p||(p=f``))]}}]}}),a.P)},82100:function(e,t,i){"use strict";i.d(t,{IO:()=>r,Lo:()=>a,a:()=>l,qv:()=>s,sG:()=>o.s});i(71695),i(92745),i(19423),i(47021);var n=i(1416),o=i(43839);const a=(e,t)=>e.callWS(Object.assign({type:"config/area_registry/create"},t)),r=(e,t,i)=>e.callWS(Object.assign({type:"config/area_registry/update",area_id:t},i)),s=(e,t)=>e.callWS({type:"config/area_registry/delete",area_id:t}),l=(e,t)=>(i,o)=>{const a=t?t.indexOf(i):-1,r=t?t.indexOf(o):-1;if(-1===a&&-1===r){var s,l,d,c;const t=null!==(s=null==e||null===(l=e[i])||void 0===l?void 0:l.name)&&void 0!==s?s:i,a=null!==(d=null==e||null===(c=e[o])||void 0===c?void 0:c.name)&&void 0!==d?d:o;return(0,n.$K)(t,a)}return-1===a?1:-1===r?-1:a-r}},41927:function(e,t,i){"use strict";i.d(t,{Bg:()=>u,DT:()=>c,SY:()=>l,aJ:()=>r,cz:()=>s,ko:()=>d});var n=i(75278),o=i(96194);let a=function(e){return e[e.ANNOUNCE=1]="ANNOUNCE",e}({});const r=(e,t,i)=>e.connection.subscribeMessage(i,{type:"assist_satellite/intercept_wake_word",entity_id:t}),s=(e,t)=>e.callWS({type:"assist_satellite/test_connection",entity_id:t}),l=(e,t,i)=>e.callService("assist_satellite","announce",i,{entity_id:t}),d=(e,t)=>e.callWS({type:"assist_satellite/get_configuration",entity_id:t}),c=(e,t,i)=>e.callWS({type:"assist_satellite/set_wake_words",entity_id:t,wake_word_ids:i}),u=e=>e&&e.state!==o.nZ&&(0,n.e)(e,a.ANNOUNCE)},43546:function(e,t,i){"use strict";i.d(t,{Cp:()=>h,GX:()=>d,PC:()=>s,TZ:()=>p,W2:()=>u,WD:()=>r,YY:()=>v,et:()=>l,iI:()=>a,j2:()=>f,lU:()=>c,oT:()=>o,uw:()=>n});i(19083),i(9359),i(70104),i(77439),i(19423),i(40251),i(97499),i(61006);const n=28639==i.j?`${location.protocol}//${location.host}`:null,o=e=>e.map((e=>{if("string"!==e.type)return e;switch(e.name){case"username":return Object.assign(Object.assign({},e),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},e),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},e),{},{autocomplete:"one-time-code",autofocus:!0});default:return e}})),a=(e,t)=>e.callWS({type:"auth/sign_path",path:t}),r=()=>fetch("/auth/providers",{credentials:"same-origin"}),s=(e,t,i)=>fetch("/auth/login_flow",{method:"POST",credentials:"same-origin",body:JSON.stringify({client_id:e,handler:i,redirect_uri:t})}),l=(e,t)=>fetch(`/auth/login_flow/${e}`,{method:"POST",credentials:"same-origin",body:JSON.stringify(t)}),d=e=>fetch(`/auth/login_flow/${e}`,{method:"DELETE",credentials:"same-origin"}),c=(e,t,i,n)=>{e.includes("?")?e.endsWith("&")||(e+="&"):e+="?",e+=`code=${encodeURIComponent(t)}`,i&&(e+=`&state=${encodeURIComponent(i)}`),n&&(e+="&storeToken=true"),document.location.assign(e)},u=async(e,t,i,n)=>e.callWS({type:"config/auth_provider/homeassistant/create",user_id:t,username:i,password:n}),h=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:t,new_password:i}),p=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:t,password:i}),f=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:t,username:i}),v=(e,t,i)=>e.callWS({type:"auth/delete_all_refresh_tokens",token_type:t,delete_current_token:i})},15681:function(e,t,i){"use strict";if(i.d(t,{D4:()=>c,D7:()=>v,Ky:()=>d,P3:()=>s,V3:()=>y,WW:()=>b,XO:()=>u,ZJ:()=>g,d4:()=>f,oi:()=>p,pV:()=>r,zO:()=>h}),66977!=i.j)var n=i(62212);var o=i(22381),a=i(57816);const r=99387==i.j?["bluetooth","dhcp","discovery","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"]:null,s=99387==i.j?["reauth"]:null,l={"HA-Frontend-Base":`${location.protocol}//${location.host}`},d=(e,t,i)=>{var n;return e.callApi("POST","config/config_entries/flow",{handler:t,show_advanced_options:Boolean(null===(n=e.userData)||void 0===n?void 0:n.showAdvanced),entry_id:i},l)},c=(e,t)=>e.callApi("GET",`config/config_entries/flow/${t}`,void 0,l),u=(e,t,i)=>e.callApi("POST",`config/config_entries/flow/${t}`,i,l),h=(e,t,i)=>e.callWS({type:"config_entries/ignore_flow",flow_id:t,title:i}),p=(e,t)=>e.callApi("DELETE",`config/config_entries/flow/${t}`),f=(e,t)=>e.callApi("GET","config/config_entries/flow_handlers"+(t?`?type=${t}`:"")),v=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),m=(e,t)=>e.subscribeEvents((0,o.D)((()=>v(e).then((e=>t.setState(e,!0)))),500,!0),"config_entry_discovered"),g=e=>(0,n._)(e,"_configFlowProgress",v,m),y=(e,t)=>g(e.connection).subscribe(t),b=(e,t)=>t.context.title_placeholders&&0!==Object.keys(t.context.title_placeholders).length?e(`component.${t.handler}.config.flow_title`,t.context.title_placeholders)||("name"in t.context.title_placeholders?t.context.title_placeholders.name:(0,a.Lh)(e,t.handler)):(0,a.Lh)(e,t.handler)},99595:function(e,t,i){"use strict";i.d(t,{X:()=>n});const n=(e,t)=>e.subscribeEvents(t,"data_entry_flow_progressed")},96194:function(e,t,i){"use strict";i.d(t,{ON:()=>r,PX:()=>s,V_:()=>l,lz:()=>a,nZ:()=>o,rk:()=>c});var n=i(92636);const o="unavailable",a="unknown",r="on",s="off",l=[o,a],d=[o,a,s],c=(0,n.z)(l);(0,n.z)(d)},55290:function(e,t,i){"use strict";i.d(t,{H:()=>o,O:()=>a});i(19083);const n=["generic_camera","template"],o=(e,t,i,n,o,a)=>e.connection.subscribeMessage(a,{type:`${t}/start_preview`,flow_id:i,flow_type:n,user_input:o}),a=e=>n.includes(e)?e:"generic"},41063:function(e,t,i){"use strict";i.d(t,{CM:()=>_,QQ:()=>g,aV:()=>f,bq:()=>w,c9:()=>k,dh:()=>x,lE:()=>y,lV:()=>b,o1:()=>u,qJ:()=>m,qR:()=>h,vI:()=>v,xO:()=>p});var n=i(58814),o=(i(60933),i(19083),i(71695),i(92745),i(32126),i(9359),i(56475),i(25677),i(31526),i(52924),i(19423),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(61006),i(47021),i(95262)),a=i(59847),r=i(75278),s=i(96530),l=i(71857);const d=["domain","integration","device_class"],c=["integration","manufacturer","model"],u=(e,t,i,n,o,a,r)=>{const s=[],l=[],d=[];return Object.values(i).forEach((i=>{i.labels.includes(t)&&v(e,o,n,i.area_id,a,r)&&d.push(i.area_id)})),Object.values(n).forEach((i=>{i.labels.includes(t)&&m(e,Object.values(o),i,a,r)&&l.push(i.id)})),Object.values(o).forEach((i=>{i.labels.includes(t)&&g(e.states[i.entity_id],a,r)&&s.push(i.entity_id)})),{areas:d,devices:l,entities:s}},h=(e,t,i,n,o)=>{const a=[];return Object.values(i).forEach((i=>{i.floor_id===t&&v(e,e.entities,e.devices,i.area_id,n,o)&&a.push(i.area_id)})),{areas:a}},p=(e,t,i,n,o,a)=>{const r=[],s=[];return Object.values(i).forEach((i=>{i.area_id===t&&m(e,Object.values(n),i,o,a)&&s.push(i.id)})),Object.values(n).forEach((i=>{i.area_id===t&&g(e.states[i.entity_id],o,a)&&r.push(i.entity_id)})),{devices:s,entities:r}},f=(e,t,i,n,o)=>{const a=[];return Object.values(i).forEach((i=>{i.device_id===t&&g(e.states[i.entity_id],n,o)&&a.push(i.entity_id)})),{entities:a}},v=(e,t,i,n,o,a)=>!!Object.values(i).some((i=>!(i.area_id!==n||!m(e,Object.values(t),i,o,a))))||Object.values(t).some((t=>!(t.area_id!==n||!g(e.states[t.entity_id],o,a)))),m=(e,t,i,n,a)=>{var r,s;const d=a?(0,l.HP)(a,t):void 0;if(null!==(r=n.target)&&void 0!==r&&r.device&&!(0,o.r)(n.target.device).some((e=>y(e,i,d))))return!1;if(null!==(s=n.target)&&void 0!==s&&s.entity){return t.filter((e=>e.device_id===i.id)).some((t=>{const i=e.states[t.entity_id];return g(i,n,a)}))}return!0},g=(e,t,i)=>{var n;return!!e&&(null===(n=t.target)||void 0===n||!n.entity||(0,o.r)(t.target.entity).some((t=>b(t,e,i))))},y=(e,t,i)=>{const{manufacturer:n,model:o,model_id:a,integration:r}=e;if(n&&t.manufacturer!==n)return!1;if(o&&t.model!==o)return!1;if(a&&t.model_id!==a)return!1;var s;if(r&&i&&(null==i||null===(s=i[t.id])||void 0===s||!s.has(r)))return!1;return!0},b=(e,t,i)=>{var n;const{domain:s,device_class:l,supported_features:d,integration:c}=e;if(s){const e=(0,a.N)(t);if(Array.isArray(s)?!s.includes(e):e!==s)return!1}if(l){const e=t.attributes.device_class;if(e&&Array.isArray(l)?!l.includes(e):e!==l)return!1}return!(d&&!(0,o.r)(d).some((e=>(0,r.e)(t,e))))&&(!c||(null==i||null===(n=i[t.entity_id])||void 0===n?void 0:n.domain)===c)},_=e=>{if(!e.entity)return{entity:null};if("filter"in e.entity)return e;const t=e.entity,{domain:i,integration:o,device_class:a}=t,r=(0,n.Z)(t,d);return i||o||a?{entity:Object.assign(Object.assign({},r),{},{filter:{domain:i,integration:o,device_class:a}})}:{entity:r}},k=e=>{if(!e.device)return{device:null};if("filter"in e.device)return e;const t=e.device,{integration:i,manufacturer:o,model:a}=t,r=(0,n.Z)(t,c);return i||o||a?{device:Object.assign(Object.assign({},r),{},{filter:{integration:i,manufacturer:o,model:a}})}:{device:r}},w=e=>{let t;var i;if("target"in e)t=(0,o.r)(null===(i=e.target)||void 0===i?void 0:i.entity);else if("entity"in e){var n,a;if(null!==(n=e.entity)&&void 0!==n&&n.include_entities)return;t=(0,o.r)(null===(a=e.entity)||void 0===a?void 0:a.filter)}if(!t)return;const r=t.flatMap((e=>e.integration||e.device_class||e.supported_features||!e.domain?[]:(0,o.r)(e.domain).filter((e=>(0,s.X)(e)))));return[...new Set(r)]},x=(e,t,i,n,a)=>{if(!t)return[];const r={target:{}},s=new Set((0,o.r)(t.entity_id)),l=new Set((0,o.r)(t.device_id)),d=new Set((0,o.r)(t.area_id)),c=new Set((0,o.r)(t.floor_id));return new Set((0,o.r)(t.label_id)).forEach((t=>{const o=u(e,t,a,n,i,r);o.devices.forEach((e=>l.add(e))),o.entities.forEach((e=>s.add(e))),o.areas.forEach((e=>d.add(e)))})),c.forEach((t=>{h(e,t,a,r).areas.forEach((e=>d.add(e)))})),d.forEach((t=>{const o=p(e,t,n,i,r);o.devices.forEach((e=>l.add(e))),o.entities.forEach((e=>s.add(e)))})),l.forEach((t=>{f(e,t,i,r).entities.forEach((e=>s.add(e)))})),Array.from(s)}},43839:function(e,t,i){"use strict";i.d(t,{s:()=>l});i(61893);if(66977!=i.j)var n=i(62212);var o=i(1416),a=i(22381);const r=e=>e.sendMessagePromise({type:"config/area_registry/list"}).then((e=>e.sort(((e,t)=>(0,o.$K)(e.name,t.name))))),s=(e,t)=>e.subscribeEvents((0,a.D)((()=>r(e).then((e=>t.setState(e,!0)))),500,!0),"area_registry_updated"),l=(e,t)=>(0,n.B)("_areaRegistry",r,s,e,t)},12656:function(e,t,i){"use strict";i.a(e,(async function(e,n){try{i.r(t);var o=i(61701),a=i(72621),r=(i(19083),i(71695),i(77439),i(40251),i(47021),i(31622),i(57243)),s=i(50778),l=i(36522),d=(i(73729),i(23334),i(99595)),c=i(28008),u=i(73192),h=i(76131),p=(i(58522),i(50274)),f=(i(33410),i(8290)),v=i(10965),m=(i(73895),i(88299)),g=e([p,f,v,m]);[p,f,v,m]=g.then?(await g)():g;let y,b,_,k,w,x,$,C,L,P,E,O=e=>e;const M="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",S="M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z";let z=0;(0,o.Z)([(0,s.Mo)("dialog-data-entry-flow")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_params",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_loading",value:void 0},{kind:"field",key:"_instance",value(){return z}},{kind:"field",decorators:[(0,s.SB)()],key:"_step",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_handler",value:void 0},{kind:"field",key:"_unsubDataEntryFlowProgressed",value:void 0},{kind:"method",key:"showDialog",value:async function(e){this._params=e,this._instance=z++;const t=this._instance;let i;if(e.startFlowHandler){this._loading="loading_flow",this._handler=e.startFlowHandler;try{i=await this._params.flowConfig.createFlow(this.hass,e.startFlowHandler)}catch(n){this.closeDialog();let e=n.message||n.body||"Unknown error";return"string"!=typeof e&&(e=JSON.stringify(e)),void(0,h.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.error"),text:`${this.hass.localize("ui.panel.config.integrations.config_flow.could_not_load")}: ${e}`})}if(t!==this._instance)return}else{if(!e.continueFlowId)return;this._loading="loading_flow";try{i=await e.flowConfig.fetchFlow(this.hass,e.continueFlowId)}catch(n){this.closeDialog();let e=n.message||n.body||"Unknown error";return"string"!=typeof e&&(e=JSON.stringify(e)),void(0,h.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.error"),text:`${this.hass.localize("ui.panel.config.integrations.config_flow.could_not_load")}: ${e}`})}}t===this._instance&&(this._processStep(i),this._loading=void 0)}},{kind:"method",key:"closeDialog",value:function(){if(!this._params)return;const e=Boolean(this._step&&["create_entry","abort"].includes(this._step.type));var t;(!this._step||e||this._params.continueFlowId||this._params.flowConfig.deleteFlow(this.hass,this._step.flow_id),this._step&&this._params.dialogClosedCallback)&&this._params.dialogClosedCallback({flowFinished:e,entryId:"result"in this._step?null===(t=this._step.result)||void 0===t?void 0:t.entry_id:void 0});this._loading=void 0,this._step=void 0,this._params=void 0,this._handler=void 0,this._unsubDataEntryFlowProgressed&&(this._unsubDataEntryFlowProgressed.then((e=>{e()})),this._unsubDataEntryFlowProgressed=void 0),(0,l.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){var e,t,i,n;return this._params?(0,r.dy)(y||(y=O` <ha-dialog open @closed="${0}" scrimClickAction escapeKeyAction hideActions> <div> ${0} </div> </ha-dialog> `),this.closeDialog,this._loading||null===this._step?(0,r.dy)(b||(b=O` <step-flow-loading .flowConfig="${0}" .hass="${0}" .loadingReason="${0}" .handler="${0}" .step="${0}"></step-flow-loading> `),this._params.flowConfig,this.hass,this._loading,this._handler,this._step):void 0===this._step?"":(0,r.dy)(_||(_=O` <div class="dialog-actions"> ${0} <ha-icon-button .label="${0}" .path="${0}" dialogAction="close"></ha-icon-button> </div> ${0} `),["form","menu","external","progress","data_entry_flow_progressed"].includes(null===(e=this._step)||void 0===e?void 0:e.type)&&null!==(t=this._params.manifest)&&void 0!==t&&t.is_built_in||null!==(i=this._params.manifest)&&void 0!==i&&i.documentation?(0,r.dy)(k||(k=O` <a href="${0}" target="_blank" rel="noreferrer noopener"> <ha-icon-button .label="${0}" .path="${0}"> </ha-icon-button></a> `),this._params.manifest.is_built_in?(0,u.R)(this.hass,`/integrations/${this._params.manifest.domain}`):null===(n=this._params)||void 0===n||null===(n=n.manifest)||void 0===n?void 0:n.documentation,this.hass.localize("ui.common.help"),S):"",this.hass.localize("ui.common.close"),M,"form"===this._step.type?(0,r.dy)(w||(w=O` <step-flow-form .flowConfig="${0}" .step="${0}" .hass="${0}"></step-flow-form> `),this._params.flowConfig,this._step,this.hass):"external"===this._step.type?(0,r.dy)(x||(x=O` <step-flow-external .flowConfig="${0}" .step="${0}" .hass="${0}"></step-flow-external> `),this._params.flowConfig,this._step,this.hass):"abort"===this._step.type?(0,r.dy)($||($=O` <step-flow-abort .params="${0}" .step="${0}" .hass="${0}" .domain="${0}"></step-flow-abort> `),this._params,this._step,this.hass,this._step.handler):"progress"===this._step.type?(0,r.dy)(C||(C=O` <step-flow-progress .flowConfig="${0}" .step="${0}" .hass="${0}"></step-flow-progress> `),this._params.flowConfig,this._step,this.hass):"menu"===this._step.type?(0,r.dy)(L||(L=O` <step-flow-menu .flowConfig="${0}" .step="${0}" .hass="${0}"></step-flow-menu> `),this._params.flowConfig,this._step,this.hass):(0,r.dy)(P||(P=O` <step-flow-create-entry .flowConfig="${0}" .step="${0}" .hass="${0}" .navigateToResult="${0}"></step-flow-create-entry> `),this._params.flowConfig,this._step,this.hass,this._params.navigateToResult))):r.Ld}},{kind:"method",key:"firstUpdated",value:function(e){(0,a.Z)(i,"firstUpdated",this,3)([e]),this.addEventListener("flow-update",(e=>{const{step:t,stepPromise:i}=e.detail;this._processStep(t||i)}))}},{kind:"method",key:"willUpdate",value:function(e){(0,a.Z)(i,"willUpdate",this,3)([e]),e.has("_step")&&this._step&&["external","progress"].includes(this._step.type)&&this._subscribeDataEntryFlowProgressed()}},{kind:"method",key:"_processStep",value:async function(e){if(void 0===e)return void this.closeDialog();let t;this._loading="loading_step";try{t=await e}catch(n){var i;return this.closeDialog(),void(0,h.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.error"),text:null==n||null===(i=n.body)||void 0===i?void 0:i.message})}finally{this._loading=void 0}this._step=void 0,await this.updateComplete,this._step=t}},{kind:"method",key:"_subscribeDataEntryFlowProgressed",value:async function(){this._unsubDataEntryFlowProgressed||(this._unsubDataEntryFlowProgressed=(0,d.X)(this.hass.connection,(async e=>{var t;e.data.flow_id===(null===(t=this._step)||void 0===t?void 0:t.flow_id)&&this._processStep(this._params.flowConfig.fetchFlow(this.hass,this._step.flow_id))})))}},{kind:"get",static:!0,key:"styles",value:function(){return[c.yu,(0,r.iv)(E||(E=O`ha-dialog{--dialog-content-padding:0}.dialog-actions{padding:16px;position:absolute;top:0;right:0;inset-inline-start:initial;inset-inline-end:0px;direction:var(--direction)}.dialog-actions>*{color:var(--secondary-text-color)}`))]}}]}}),r.oi);n()}catch(y){n(y)}}))},38572:function(e,t,i){"use strict";i.d(t,{t:()=>g});i(63721),i(71695),i(40251),i(47021);var n=i(57243),o=i(15681),a=i(57816),r=i(7956);let s,l,d,c,u,h,p,f,v,m=e=>e;const g=(e,t)=>(0,r.w)(e,t,{flowType:"config_flow",showDevices:!0,createFlow:async(e,i)=>{const[n]=await Promise.all([(0,o.Ky)(e,i,t.entryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config",i),e.loadBackendTranslation("selector",i),e.loadBackendTranslation("title",i)]);return n},fetchFlow:async(e,t)=>{const i=await(0,o.D4)(e,t);return await e.loadFragmentTranslation("config"),await e.loadBackendTranslation("config",i.handler),await e.loadBackendTranslation("selector",i.handler),i},handleFlowStep:o.XO,deleteFlow:o.oi,renderAbortDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.abort.${t.reason}`,t.description_placeholders);return i?(0,n.dy)(s||(s=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):t.reason},renderShowFormStepHeader(e,t){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.title`,t.description_placeholders)||e.localize(`component.${t.handler}.title`)},renderShowFormStepDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return i?(0,n.dy)(l||(l=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderShowFormStepFieldLabel(e,t,i,n){var o;if("expandable"===i.type)return e.localize(`component.${t.handler}.config.step.${t.step_id}.sections.${i.name}.name`);const a=null!=n&&null!==(o=n.path)&&void 0!==o&&o[0]?`sections.${n.path[0]}.`:"";return e.localize(`component.${t.handler}.config.step.${t.step_id}.${a}data.${i.name}`)||i.name},renderShowFormStepFieldHelper(e,t,i,o){var a;if("expandable"===i.type)return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.sections.${i.name}.description`);const r=null!=o&&null!==(a=o.path)&&void 0!==a&&a[0]?`sections.${o.path[0]}.`:"",s=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.${r}data_description.${i.name}`,t.description_placeholders);return s?(0,n.dy)(d||(d=m`<ha-markdown breaks .content="${0}"></ha-markdown>`),s):""},renderShowFormStepFieldError(e,t,i){return e.localize(`component.${t.translation_domain||t.translation_domain||t.handler}.config.error.${i}`,t.description_placeholders)||i},renderShowFormStepFieldLocalizeValue(e,t,i){return e.localize(`component.${t.handler}.selector.${i}`)},renderShowFormStepSubmitButton(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===t.last_step?"next":"submit"))},renderExternalStepHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.${t.step_id}.description`,t.description_placeholders);return(0,n.dy)(c||(c=m` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),i?(0,n.dy)(u||(u=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):"")},renderCreateEntryDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.create_entry.${t.description||"default"}`,t.description_placeholders);return(0,n.dy)(h||(h=m` ${0} <p> ${0} </p> `),i?(0,n.dy)(p||(p=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):"",e.localize("ui.panel.config.integrations.config_flow.created_config",{name:t.title}))},renderShowFormProgressHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`)},renderShowFormProgressDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.progress.${t.progress_action}`,t.description_placeholders);return i?(0,n.dy)(f||(f=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderMenuHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`)},renderMenuDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return i?(0,n.dy)(v||(v=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderMenuOption(e,t,i){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_options.${i}`,t.description_placeholders)},renderLoadingDescription(e,t,i,n){if("loading_flow"!==t&&"loading_step"!==t)return"";const o=(null==n?void 0:n.handler)||i;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:o?(0,a.Lh)(e.localize,o):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},58522:function(e,t,i){"use strict";var n=i(61701),o=i(72621),a=(i(71695),i(40251),i(47021),i(31622),i(57243)),r=i(50778),s=i(36522),l=i(81773),d=i(38572),c=i(88553);let u,h=e=>e;(0,n.Z)([(0,r.Mo)("step-flow-abort")],(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:"params",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"step",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"domain",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){(0,o.Z)(i,"firstUpdated",this,3)([e]),"missing_credentials"===this.step.reason&&this._handleMissingCreds()}},{kind:"method",key:"render",value:function(){return"missing_credentials"===this.step.reason?a.Ld:(0,a.dy)(u||(u=h` <h2> ${0} </h2> <div class="content"> ${0} </div> <div class="buttons"> <mwc-button @click="${0}">${0}</mwc-button> </div> `),this.params.flowConfig.renderAbortHeader?this.params.flowConfig.renderAbortHeader(this.hass,this.step):this.hass.localize(`component.${this.domain}.title`),this.params.flowConfig.renderAbortDescription(this.hass,this.step),this._flowDone,this.hass.localize("ui.panel.config.integrations.config_flow.close"))}},{kind:"method",key:"_handleMissingCreds",value:async function(){(0,l.L)(this.params.dialogParentElement,{selectedDomain:this.domain,manifest:this.params.manifest,applicationCredentialAddedCallback:()=>{var e;(0,d.t)(this.params.dialogParentElement,{dialogClosedCallback:this.params.dialogClosedCallback,startFlowHandler:this.domain,showAdvanced:null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced,navigateToResult:this.params.navigateToResult})}}),this._flowDone()}},{kind:"method",key:"_flowDone",value:function(){(0,s.B)(this,"flow-update",{step:void 0})}},{kind:"get",static:!0,key:"styles",value:function(){return c.i}}]}}),a.oi)},50274: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(56475),i(70104),i(52924),i(40251),i(61006),i(47021),i(31622),i(57243)),a=i(50778),r=i(27486),s=i(36522),l=i(86431),d=i(73850),c=i(83523),u=i(81282),h=i(41927),p=i(71857),f=i(76131),v=i(21168),m=i(88553),g=e([u]);u=(g.then?(await g)():g)[0];let y,b,_,k,w,x,$,C,L=e=>e;(0,n.Z)([(0,a.Mo)("step-flow-create-entry")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"flowConfig",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"step",value:void 0},{kind:"field",key:"navigateToResult",value(){return!1}},{kind:"field",key:"_devices",value(){return(0,r.Z)(((e,t,i)=>e&&i?t.filter((e=>e.config_entries.includes(i))):[]))}},{kind:"field",key:"_deviceEntities",value(){return(0,r.Z)(((e,t,i)=>t.filter((t=>t.device_id===e&&(!i||(0,d.M)(t.entity_id)===i)))))}},{kind:"method",key:"willUpdate",value:function(e){var t,i;if(!e.has("devices")&&!e.has("hass"))return;const n=this._devices(this.flowConfig.showDevices,Object.values(this.hass.devices),null===(t=this.step.result)||void 0===t?void 0:t.entry_id);if(1!==n.length||n[0].primary_config_entry!==(null===(i=this.step.result)||void 0===i?void 0:i.entry_id)||"voip"===this.step.result.domain)return;const o=this._deviceEntities(n[0].id,Object.values(this.hass.entities),"assist_satellite");o.length&&o.some((e=>(0,h.Bg)(this.hass.states[e.entity_id])))&&(this.navigateToResult=!1,this._flowDone(),(0,v.k)(this,{deviceId:n[0].id}))}},{kind:"method",key:"render",value:function(){var e,t;const i=this.hass.localize,n=this._devices(this.flowConfig.showDevices,Object.values(this.hass.devices),null===(e=this.step.result)||void 0===e?void 0:e.entry_id);return(0,o.dy)(y||(y=L` <h2>${0}!</h2> <div class="content"> ${0} ${0} ${0} </div> <div class="buttons"> <mwc-button @click="${0}">${0}</mwc-button> </div> `),i("ui.panel.config.integrations.config_flow.success"),this.flowConfig.renderCreateEntryDescription(this.hass,this.step),"not_loaded"===(null===(t=this.step.result)||void 0===t?void 0:t.state)?(0,o.dy)(b||(b=L`<span class="error">${0}</span>`),i("ui.panel.config.integrations.config_flow.not_loaded")):o.Ld,0===n.length?o.Ld:(0,o.dy)(_||(_=L` <p> ${0}: </p> <div class="devices"> ${0} </div> `),i("ui.panel.config.integrations.config_flow.found_following_devices"),n.map((e=>{var t;return(0,o.dy)(k||(k=L` <div class="device"> <div> <b>${0}</b><br> ${0} </div> <ha-area-picker .hass="${0}" .device="${0}" .value="${0}" @value-changed="${0}"></ha-area-picker> </div> `),(0,l.wZ)(e,this.hass),e.model||e.manufacturer?(0,o.dy)(x||(x=L`${0} ${0}`),e.model,e.manufacturer?(0,o.dy)($||($=L`(${0})`),e.manufacturer):""):(0,o.dy)(w||(w=L` `)),this.hass,e.id,null!==(t=e.area_id)&&void 0!==t?t:void 0,this._areaPicked)}))),this._flowDone,i("ui.panel.config.integrations.config_flow.finish"))}},{kind:"method",key:"_flowDone",value:function(){(0,s.B)(this,"flow-update",{step:void 0}),this.step.result&&this.navigateToResult&&(0,c.c)(`/config/integrations/integration/${this.step.result.domain}#config_entry=${this.step.result.entry_id}`)}},{kind:"method",key:"_areaPicked",value:async function(e){const t=e.currentTarget,i=t.device,n=e.detail.value;try{await(0,p.t1)(this.hass,i,{area_id:n})}catch(o){(0,f.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_flow.error_saving_area",{error:o.message})}),t.value=null}}},{kind:"get",static:!0,key:"styles",value:function(){return[m.i,(0,o.iv)(C||(C=L`.devices{display:flex;flex-wrap:wrap;margin:-4px;max-height:600px;overflow-y:auto}.device{border:1px solid var(--divider-color);padding:5px;border-radius:4px;margin:4px;display:inline-block;width:250px}.buttons>:last-child{margin-left:auto;margin-inline-start:auto;margin-inline-end:initial}@media all and (max-width:450px),all and (max-height:500px){.device{width:100%}}.error{color:var(--error-color)}`))]}}]}}),o.oi);t()}catch(y){t(y)}}))},33410:function(e,t,i){"use strict";var n=i(61701),o=i(72621),a=(i(71695),i(47021),i(31622),i(57243)),r=i(50778),s=i(88553);let l,d,c=e=>e;(0,n.Z)([(0,r.Mo)("step-flow-external")],(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:"flowConfig",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"step",value:void 0},{kind:"method",key:"render",value:function(){const e=this.hass.localize;return(0,a.dy)(l||(l=c` <h2>${0}</h2> <div class="content"> ${0} <div class="open-button"> <a href="${0}" target="_blank" rel="noreferrer"> <mwc-button raised> ${0} </mwc-button> </a> </div> </div> `),this.flowConfig.renderExternalStepHeader(this.hass,this.step),this.flowConfig.renderExternalStepDescription(this.hass,this.step),this.step.url,e("ui.panel.config.integrations.config_flow.external_step.open_site"))}},{kind:"method",key:"firstUpdated",value:function(e){(0,o.Z)(i,"firstUpdated",this,3)([e]),window.open(this.step.url)}},{kind:"get",static:!0,key:"styles",value:function(){return[s.i,(0,a.iv)(d||(d=c`.open-button{text-align:center;padding:24px 0}.open-button a{text-decoration:none}`))]}}]}}),a.oi)},8290:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{var n=i(61701),o=i(72621),a=(i(19083),i(71695),i(9359),i(68107),i(1331),i(31526),i(19423),i(40251),i(47021),i(31622),i(57243)),r=i(50778),s=i(29567),l=i(36522),d=i(22337),c=(i(99426),i(17170)),u=i(7520),h=(i(29073),i(99254),i(43546)),p=i(88553),f=i(28008),v=i(55290),m=e([c]);c=(m.then?(await m)():m)[0];let g,y,b,_,k,w,x=e=>e;(0,n.Z)([(0,r.Mo)("step-flow-form")],(function(e,t){class n extends t{constructor(...t){super(...t),e(this)}}return{F:n,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"flowConfig",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"step",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_loading",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_stepData",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_errorMsg",value:void 0},{kind:"method",key:"disconnectedCallback",value:function(){(0,o.Z)(n,"disconnectedCallback",this,3)([]),this.removeEventListener("keydown",this._handleKeyDown)}},{kind:"method",key:"render",value:function(){const e=this.step,t=this._stepDataProcessed;return(0,a.dy)(g||(g=x` <h2>${0}</h2> <div class="content" @click="${0}"> ${0} ${0} <ha-form .hass="${0}" .data="${0}" .disabled="${0}" @value-changed="${0}" .schema="${0}" .error="${0}" .computeLabel="${0}" .computeHelper="${0}" .computeError="${0}" .localizeValue="${0}"></ha-form> </div> ${0} <div class="buttons"> ${0} </div> `),this.flowConfig.renderShowFormStepHeader(this.hass,this.step),this._clickHandler,this.flowConfig.renderShowFormStepDescription(this.hass,this.step),this._errorMsg?(0,a.dy)(y||(y=x`<ha-alert alert-type="error">${0}</ha-alert>`),this._errorMsg):"",this.hass,t,this._loading,this._stepDataChanged,(0,h.oT)(e.data_schema),e.errors,this._labelCallback,this._helperCallback,this._errorCallback,this._localizeValueCallback,e.preview?(0,a.dy)(b||(b=x`<div class="preview" @set-flow-errors="${0}"> <h3> ${0}: </h3> ${0} </div>`),this._setError,this.hass.localize("ui.panel.config.integrations.config_flow.preview"),(0,s.h)(`flow-preview-${(0,v.O)(e.preview)}`,{hass:this.hass,domain:e.preview,flowType:this.flowConfig.flowType,handler:e.handler,stepId:e.step_id,flowId:e.flow_id,stepData:t})):a.Ld,this._loading?(0,a.dy)(_||(_=x` <div class="submit-spinner"> <ha-spinner></ha-spinner> </div> `)):(0,a.dy)(k||(k=x` <div> <mwc-button @click="${0}"> ${0} </mwc-button> </div> `),this._submitStep,this.flowConfig.renderShowFormStepSubmitButton(this.hass,this.step)))}},{kind:"method",key:"_setError",value:function(e){this.step=Object.assign(Object.assign({},this.step),{},{errors:e.detail})}},{kind:"method",key:"firstUpdated",value:function(e){(0,o.Z)(n,"firstUpdated",this,3)([e]),setTimeout((()=>this.shadowRoot.querySelector("ha-form").focus()),0),this.addEventListener("keydown",this._handleKeyDown)}},{kind:"method",key:"willUpdate",value:function(e){var t;(0,o.Z)(n,"willUpdate",this,3)([e]),e.has("step")&&null!==(t=this.step)&&void 0!==t&&t.preview&&i(56592)(`./flow-preview-${(0,v.O)(this.step.preview)}`)}},{kind:"method",key:"_clickHandler",value:function(e){(0,d.J)(e,!1)&&(0,l.B)(this,"flow-update",{step:void 0})}},{kind:"field",key:"_handleKeyDown",value(){return e=>{"Enter"===e.key&&this._submitStep()}}},{kind:"get",key:"_stepDataProcessed",value:function(){return void 0!==this._stepData||(this._stepData=(0,u.x)(this.step.data_schema)),this._stepData}},{kind:"method",key:"_submitStep",value:async function(){const e=this._stepData||{},t=(e,i)=>e.every((e=>(!e.required||!["",void 0].includes(i[e.name]))&&("expandable"!==e.type||!e.required&&void 0===i[e.name]||t(e.schema,i[e.name]))));if(!(void 0===e?void 0===this.step.data_schema.find((e=>e.required)):t(this.step.data_schema,e)))return void(this._errorMsg=this.hass.localize("ui.panel.config.integrations.config_flow.not_all_required_fields"));this._loading=!0,this._errorMsg=void 0;const i=this.step.flow_id,n={};Object.keys(e).forEach((t=>{const i=e[t];[void 0,""].includes(i)||(n[t]=i)}));try{const e=await this.flowConfig.handleFlowStep(this.hass,this.step.flow_id,n);if(!this.step||i!==this.step.flow_id)return;(0,l.B)(this,"flow-update",{step:e})}catch(o){o&&o.body?(o.body.message&&(this._errorMsg=o.body.message),o.body.errors&&(this.step=Object.assign(Object.assign({},this.step),{},{errors:o.body.errors})),o.body.message||o.body.errors||(this._errorMsg="Unknown error occurred")):this._errorMsg="Unknown error occurred"}finally{this._loading=!1}}},{kind:"method",key:"_stepDataChanged",value:function(e){this._stepData=e.detail.value}},{kind:"field",key:"_labelCallback",value(){return(e,t,i)=>this.flowConfig.renderShowFormStepFieldLabel(this.hass,this.step,e,i)}},{kind:"field",key:"_helperCallback",value(){return(e,t)=>this.flowConfig.renderShowFormStepFieldHelper(this.hass,this.step,e,t)}},{kind:"field",key:"_errorCallback",value(){return e=>this.flowConfig.renderShowFormStepFieldError(this.hass,this.step,e)}},{kind:"field",key:"_localizeValueCallback",value(){return e=>this.flowConfig.renderShowFormStepFieldLocalizeValue(this.hass,this.step,e)}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,p.i,(0,a.iv)(w||(w=x`.error{color:red}.submit-spinner{margin-right:16px;margin-inline-end:16px;margin-inline-start:initial}ha-alert,ha-form{margin-top:24px;display:block}h2{word-break:break-word;padding-inline-end:72px;direction:var(--direction)}`))]}}]}}),a.oi);t()}catch(g){t(g)}}))},10965:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{var n=i(61701),o=(i(71695),i(47021),i(57243)),a=i(50778),r=i(17170),s=e([r]);r=(s.then?(await s)():s)[0];let l,d,c,u=e=>e;(0,n.Z)([(0,a.Mo)("step-flow-loading")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"flowConfig",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"loadingReason",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"handler",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"step",value:void 0},{kind:"method",key:"render",value:function(){const e=this.flowConfig.renderLoadingDescription(this.hass,this.loadingReason,this.handler,this.step);return(0,o.dy)(l||(l=u` <div class="init-spinner"> ${0} <ha-spinner></ha-spinner> </div> `),e?(0,o.dy)(d||(d=u`<div>${0}</div>`),e):"")}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(c||(c=u`.init-spinner{padding:50px 100px;text-align:center}ha-spinner{margin-top:16px}`))}}]}}),o.oi);t()}catch(l){t(l)}}))},73895:function(e,t,i){"use strict";var n=i(61701),o=(i(71695),i(9359),i(70104),i(47021),i(87319),i(57243)),a=i(50778),r=(i(13928),i(88553)),s=i(36522);let l,d,c,u,h=e=>e;(0,n.Z)([(0,a.Mo)("step-flow-menu")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"flowConfig",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"step",value:void 0},{kind:"method",key:"render",value:function(){let e,t;if(Array.isArray(this.step.menu_options)){e=this.step.menu_options,t={};for(const i of e)t[i]=this.flowConfig.renderMenuOption(this.hass,this.step,i)}else e=Object.keys(this.step.menu_options),t=this.step.menu_options;const i=this.flowConfig.renderMenuDescription(this.hass,this.step);return(0,o.dy)(l||(l=h` <h2>${0}</h2> ${0} <div class="options"> ${0} </div> `),this.flowConfig.renderMenuHeader(this.hass,this.step),i?(0,o.dy)(d||(d=h`<div class="content">${0}</div>`),i):"",e.map((e=>(0,o.dy)(c||(c=h` <mwc-list-item hasMeta .step="${0}" @click="${0}"> <span>${0}</span> <ha-icon-next slot="meta"></ha-icon-next> </mwc-list-item> `),e,this._handleStep,t[e]))))}},{kind:"method",key:"_handleStep",value:function(e){(0,s.B)(this,"flow-update",{stepPromise:this.flowConfig.handleFlowStep(this.hass,this.step.flow_id,{next_step_id:e.currentTarget.step})})}},{kind:"field",static:!0,key:"styles",value(){return[r.i,(0,o.iv)(u||(u=h`.options{margin-top:20px;margin-bottom:8px}.content{padding-bottom:16px;border-bottom:1px solid var(--divider-color)}.content+.options{margin-top:8px}mwc-list-item{--mdc-list-side-padding:24px}`))]}}]}}),o.oi)},88299:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{var n=i(61701),o=(i(71695),i(47021),i(31622),i(57243)),a=i(50778),r=i(17170),s=i(88553),l=e([r]);r=(l.then?(await l)():l)[0];let d,c,u=e=>e;(0,n.Z)([(0,a.Mo)("step-flow-progress")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"flowConfig",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"step",value:void 0},{kind:"method",key:"render",value:function(){return(0,o.dy)(d||(d=u` <h2> ${0} </h2> <div class="content"> <ha-spinner></ha-spinner> ${0} </div> `),this.flowConfig.renderShowFormProgressHeader(this.hass,this.step),this.flowConfig.renderShowFormProgressDescription(this.hass,this.step))}},{kind:"get",static:!0,key:"styles",value:function(){return[s.i,(0,o.iv)(c||(c=u`.content{padding:50px 100px;text-align:center}ha-spinner{margin-bottom:16px}`))]}}]}}),o.oi);t()}catch(d){t(d)}}))},88553:function(e,t,i){"use strict";i.d(t,{i:()=>o});let n;const o=(0,i(57243).iv)(n||(n=(e=>e)`h2{margin:24px 38px 0 0;margin-inline-start:0px;margin-inline-end:38px;padding:0 24px;padding-inline-start:24px;padding-inline-end:24px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(
      --mdc-typography-headline6-font-family,
      var(--mdc-typography-font-family, Roboto, sans-serif)
    );font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:var(--mdc-typography-headline6-font-weight,500);letter-spacing:var(--mdc-typography-headline6-letter-spacing, .0125em);text-decoration:var(--mdc-typography-headline6-text-decoration,inherit);text-transform:var(--mdc-typography-headline6-text-transform,inherit);box-sizing:border-box}.content,.preview{margin-top:20px;padding:0 24px}.buttons{position:relative;padding:8px 16px 8px 24px;margin:8px 0 0;color:var(--primary-color);display:flex;justify-content:flex-end}ha-markdown{overflow-wrap:break-word}ha-markdown a{color:var(--primary-color)}ha-markdown img:first-child:last-child{display:block;margin:0 auto}`))},76131:function(e,t,i){"use strict";i.r(t),i.d(t,{loadGenericDialog:()=>o,showAlertDialog:()=>r,showConfirmationDialog:()=>s,showPromptDialog:()=>l});i(71695),i(19423),i(40251),i(47021);var n=i(36522);const o=()=>Promise.all([i.e("46379"),i.e("66031"),i.e("25618"),i.e("7442"),i.e("61454"),i.e("19145")]).then(i.bind(i,79740)),a=(e,t,i)=>new Promise((a=>{const r=t.cancel,s=t.confirm;(0,n.B)(e,"show-dialog",{dialogTag:"dialog-box",dialogImport:o,dialogParams:Object.assign(Object.assign(Object.assign({},t),i),{},{cancel:()=>{a(!(null==i||!i.prompt)&&null),r&&r()},confirm:e=>{a(null==i||!i.prompt||e),s&&s(e)}})})})),r=(e,t)=>a(e,t),s=(e,t)=>a(e,t,{confirmation:!0}),l=(e,t)=>a(e,t,{prompt:!0})},76525:function(e,t,i){"use strict";i.d(t,{L$:()=>h,gA:()=>d,lD:()=>v,ts:()=>p,vC:()=>c});i(71695),i(92745),i(19423),i(40251),i(47021);var n=i(5111),o=i(84200);if(66977!=i.j)var a=i(81165);var r=i(76320);const s={},l=[],d=Symbol.for("HA focus target"),c=async(e,t,i,r,u,h=!0)=>{if(!(i in s)){if(!u)return!1;s[i]={element:u().then((()=>{const t=document.createElement(i);return e.provideHass(t),t.addEventListener("dialog-closed",f),t.addEventListener("dialog-closed",m),t}))}}if(h){var p,v;const{history:o}=n.E;if(null!==(p=o.state)&&void 0!==p&&p.dialog&&!l.length)return await new Promise((e=>{setTimeout(e)})),c(e,t,i,r,u,h);const a=l.findIndex((e=>e.dialogTag===i));-1!==a&&l.splice(a,1),l.push({element:e,root:t,dialogTag:i,dialogParams:r,dialogImport:u,addHistory:h});const s={dialog:i};null!==(v=o.state)&&void 0!==v&&v.dialog?o.replaceState(s,""):(o.replaceState(Object.assign(Object.assign({},o.state),{},{opensDialog:!0}),""),o.pushState(s,""))}s[i].closedFocusTargets=(0,o.r)((0,a.j)(),d);const g=await s[i].element;return t.appendChild(g),g.showDialog(r),!0},u=async e=>{if(!(e in s))return!0;const t=await s[e].element;return!t.closeDialog||!1!==t.closeDialog()},h=async()=>{if(l.length){var e;const t=l.pop(),i=await u(t.dialogTag);return i||l.push(t),l.length&&null!==(e=n.E.history.state)&&void 0!==e&&e.opensDialog&&n.E.history.pushState({dialog:l[l.length-1].dialogTag},""),i}return!0},p=async()=>{for(let e=l.length-1;e>=0;e--){if(!(!l[e]||await u(l[e].dialogTag)))return!1}return!0},f=e=>{var t;const i=l.findIndex((t=>t.dialogTag===e.detail.dialog));-1!==i&&l.splice(i,1),(null===(t=n.E.history.state)||void 0===t?void 0:t.dialog)===e.detail.dialog&&(l.length?n.E.history.replaceState({dialog:l[l.length-1].dialogTag},""):-1!==i&&n.E.history.back())},v=(e,t)=>{e.addEventListener("show-dialog",(i=>{const{dialogTag:n,dialogImport:o,dialogParams:a,addHistory:r}=i.detail;c(e,t,n,a,o,r)}))},m=async e=>{if(!s[e.detail.dialog])return;const t=s[e.detail.dialog].closedFocusTargets;if(delete s[e.detail.dialog].closedFocusTargets,!t)return;let i=(0,a.j)();i instanceof HTMLElement&&i.blur(),await(0,r.y)();for(const n of t)if(n instanceof HTMLElement&&(n.focus(),i=(0,a.j)(),i&&i!==document.body))return}},21168:function(e,t,i){"use strict";i.d(t,{k:()=>a});i(71695),i(40251),i(47021);var n=i(36522);const o=()=>Promise.all([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("65505"),i.e("5080"),i.e("50408"),i.e("7010"),i.e("88482"),i.e("66429"),i.e("18865"),i.e("27090"),i.e("44959"),i.e("80809"),i.e("90296")]).then(i.bind(i,42474)),a=(e,t)=>{(0,n.B)(e,"show-dialog",{dialogTag:"ha-voice-assistant-setup-dialog",dialogImport:o,dialogParams:t})}},81773:function(e,t,i){"use strict";i.d(t,{L:()=>a});i(71695),i(40251),i(47021);var n=i(36522);const o=()=>Promise.all([i.e("24199"),i.e("78943"),i.e("2142"),i.e("52430"),i.e("38175"),i.e("16703")]).then(i.bind(i,58670)),a=(e,t)=>{(0,n.B)(e,"show-dialog",{dialogTag:"dialog-add-application-credential",dialogImport:o,dialogParams:t})}},61107:function(e,t,i){"use strict";i.d(t,{E:()=>a,O:()=>o});i(71695),i(40251),i(47021);var n=i(36522);const o=()=>Promise.all([i.e("46379"),i.e("66031"),i.e("72206"),i.e("97983"),i.e("24199"),i.e("78943"),i.e("42950"),i.e("65505"),i.e("58640"),i.e("42311"),i.e("17283"),i.e("18865"),i.e("27090"),i.e("44959"),i.e("3049"),i.e("72308"),i.e("84958"),i.e("38311"),i.e("17674")]).then(i.bind(i,2711)),a=(e,t)=>{(0,n.B)(e,"show-dialog",{dialogTag:"dialog-area-registry-detail",dialogImport:o,dialogParams:t})}},96530:function(e,t,i){"use strict";i.d(t,{X:()=>a,y:()=>o});var n=i(92636);const o=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],a=(0,n.z)(o)},22152:function(){Element.prototype.toggleAttribute||(Element.prototype.toggleAttribute=function(e,t){return void 0!==t&&(t=!!t),this.hasAttribute(e)?!!t||(this.removeAttribute(e),!1):!1!==t&&(this.setAttribute(e,""),!0)})},16485:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{i(71695),i(92745),i(40251),i(47021);var n=i(61449),o=i(40574),a=i(30532),r=i(41674),s=i(49722),l=i(76632),d=i(7884),c=i(35185),u=i(65401),h=i(44180),p=i(49447);const e=async()=>{const e=(0,h.sS)(),t=[];(0,a.shouldPolyfill)()&&await Promise.all([i.e("80210"),i.e("74055")]).then(i.bind(i,98133)),(0,s.shouldPolyfill)()&&await Promise.all([i.e("2142"),i.e("75297"),i.e("80210"),i.e("60251")]).then(i.bind(i,59095)),(0,n.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("68250")]).then(i.bind(i,80561)).then((()=>(0,p.H)()))),(0,u.shouldPolyfill)()&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("65578")]).then(i.bind(i,97995))),(0,o.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("59826")]).then(i.bind(i,31514))),(0,r.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("23649")]).then(i.bind(i,93840))),(0,l.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("42831")]).then(i.bind(i,29559))),(0,d.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("57377")]).then(i.bind(i,39030)).then((()=>i.e("61236").then(i.t.bind(i,4121,23))))),(0,c.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("13870")]).then(i.bind(i,74546))),0!==t.length&&await Promise.all(t).then((()=>(0,p.n)(e)))};await e(),t()}catch(f){t(f)}}),1)},31948:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{i(71695),i(40251),i(47021);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await i.e("73378").then(i.bind(i,88198))).default),t()}catch(n){t(n)}}),1)},28008:function(e,t,i){"use strict";i.d(t,{$c:()=>p,Qx:()=>u,k1:()=>c,yu:()=>h});var n=i(57243);let o,a,r,s,l,d=e=>e;const c=(0,n.iv)(o||(o=d`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),u=(0,n.iv)(a||(a=d`:host{font-family:var(--paper-font-body1_-_font-family);-webkit-font-smoothing:var(--paper-font-body1_-_-webkit-font-smoothing);font-size:var(--paper-font-body1_-_font-size);font-weight:var(--paper-font-body1_-_font-weight);line-height:var(--paper-font-body1_-_line-height)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}h1{font-family:var(--paper-font-headline_-_font-family);-webkit-font-smoothing:var(--paper-font-headline_-_-webkit-font-smoothing);white-space:var(--paper-font-headline_-_white-space);overflow:var(--paper-font-headline_-_overflow);text-overflow:var(--paper-font-headline_-_text-overflow);font-size:var(--paper-font-headline_-_font-size);font-weight:var(--paper-font-headline_-_font-weight);line-height:var(--paper-font-headline_-_line-height)}h2{font-family:var(--paper-font-title_-_font-family);-webkit-font-smoothing:var(--paper-font-title_-_-webkit-font-smoothing);white-space:var(--paper-font-title_-_white-space);overflow:var(--paper-font-title_-_overflow);text-overflow:var(--paper-font-title_-_text-overflow);font-size:var(--paper-font-title_-_font-size);font-weight:var(--paper-font-title_-_font-weight);line-height:var(--paper-font-title_-_line-height)}h3{font-family:var(--paper-font-subhead_-_font-family);-webkit-font-smoothing:var(--paper-font-subhead_-_-webkit-font-smoothing);white-space:var(--paper-font-subhead_-_white-space);overflow:var(--paper-font-subhead_-_overflow);text-overflow:var(--paper-font-subhead_-_text-overflow);font-size:var(--paper-font-subhead_-_font-size);font-weight:var(--paper-font-subhead_-_font-weight);line-height:var(--paper-font-subhead_-_line-height)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),c),h=(0,n.iv)(r||(r=d`ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between}ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-dialog{--mdc-dialog-min-width:calc(
        100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
      );--mdc-dialog-max-width:calc(
        100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
      );--mdc-dialog-min-height:100%;--mdc-dialog-max-height:100%;--vertical-align-dialog:flex-end;--ha-dialog-border-radius:0}}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}.error{color:var(--error-color)}`)),p=(0,n.iv)(s||(s=d`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{-webkit-border-radius:4px;border-radius:4px;background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,n.iv)(l||(l=d`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},80262:function(e,t,i){"use strict";i.d(t,{L:()=>n});i(71695),i(47021);class n{constructor(e){this._expiration=void 0,this._cache=new Map,this._expiration=e}get(e){return this._cache.get(e)}set(e,t){this._cache.set(e,t),this._expiration&&window.setTimeout((()=>this._cache.delete(e)),this._expiration)}has(e){return this._cache.has(e)}}},73192:function(e,t,i){"use strict";i.d(t,{R:()=>n});const n=(e,t)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},23265:function(e,t,i){var n={"./ha-icon":["65981","97406"],"./ha-icon-button-toggle":["79505","80175"],"./ha-svg-icon":["37583"],"./ha-icon-button-group":["45747","97792"],"./ha-svg-icon.ts":["37583"],"./ha-icon.ts":["65981","97406"],"./ha-icon-overflow-menu":["59959","91552","78456","56898","99287","14932"],"./ha-icon-next":["13928","99172"],"./ha-icon-picker":["21393","46379","66031","24199","78943","45760"],"./ha-qr-code.ts":["50634","53750","70472"],"./ha-icon-button-arrow-prev.ts":["54202","41069"],"./ha-icon-button-arrow-prev":["54202","41069"],"./ha-icon-overflow-menu.ts":["59959","91552","78456","56898","99287","14932"],"./ha-alert":["99426","4809"],"./ha-icon-button-next":["4635","51577"],"./ha-icon-button":["23334"],"./ha-icon-button-next.ts":["4635","51577"],"./ha-icon-picker.ts":["21393","46379","66031","24199","78943","45760"],"./ha-icon-button-group.ts":["45747","97792"],"./ha-icon-button-toggle.ts":["79505","80175"],"./ha-icon-button-arrow-next.ts":["54237","21559"],"./ha-icon-button-prev.ts":["5828","43537"],"./ha-icon-prev":["95499","87557"],"./ha-icon-prev.ts":["95499","87557"],"./ha-icon-button.ts":["23334"],"./ha-alert.ts":["99426","4809"],"./ha-icon-button-prev":["5828","43537"],"./ha-qr-code":["50634","53750","70472"],"./ha-icon-next.ts":["13928","99172"],"./ha-icon-button-arrow-next":["54237","21559"]};function o(e){if(!i.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],o=t[0];return Promise.all(t.slice(1).map(i.e)).then((function(){return i(o)}))}o.keys=()=>Object.keys(n),o.id=23265,e.exports=o},56592:function(e,t,i){var n={"./flow-preview-generic.ts":["79381","91552","78456","41258","56898","35671","42950","65505","3134","92139","44233","18865","44959","38336","93890","2987"],"./flow-preview-generic_camera.ts":["97556","91552","78456","41258","56898","35671","42950","65505","3134","92139","44233","18865","44959","38336","93890","95273"],"./flow-preview-generic":["79381","91552","78456","41258","56898","35671","42950","65505","3134","92139","44233","18865","44959","38336","93890","2987"],"./flow-preview-generic_camera":["97556","91552","78456","41258","56898","35671","42950","65505","3134","92139","44233","18865","44959","38336","93890","95273"],"./flow-preview-template.ts":["20699","91552","78456","41258","56898","35671","42950","65505","3134","92139","44233","18865","44959","38336","93890","87498"],"./flow-preview-template":["20699","91552","78456","41258","56898","35671","42950","65505","3134","92139","44233","18865","44959","38336","93890","87498"]};function o(e){if(!i.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],o=t[0];return Promise.all(t.slice(1).map(i.e)).then((function(){return i(o)}))}o.keys=()=>Object.keys(n),o.id=56592,e.exports=o}}]);
//# sourceMappingURL=8949.50f9050fa0766f72.js.map