UNPKG

iobroker.lovelace

Version:

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

1 lines 32.2 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[81476],{93421:function(e,t,i){i.d(t,{IW:function(){return d},dH:function(){return c},fI:function(){return l}});i(44114),i(62953);var r=i(35211),o=i(22792),n=i(32172);const a=(e,t)=>{let i=e;for(const r of t){if(null==i)return;i=i[r]}return i},s=(e,t,i)=>{const o=(0,n.p)({transformer:function(e){return i.call(this,e)},watch:t?[t]:[]}),a=(0,r.Fg)({context:e,subscribe:!0});return(e,t)=>{o(e,t),a(e,t)}},l=e=>s(o.iN,e.entityIdPath[0],function(t){const i=a(this,e.entityIdPath);return"string"==typeof i?null==t?void 0:t[i]:void 0}),c=e=>s(o.X1,e.entityIdPath[0],function(t){const i=a(this,e.entityIdPath);return"string"==typeof i?null==t?void 0:t[i]:void 0}),d=()=>s(o.D5,void 0,({localize:e})=>e)},32172:function(e,t,i){i.d(t,{p:function(){return r}});i(16280),i(18111),i(7588),i(45367),i(92731),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);function r(e){return(t,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const r=String(i),o=t;if(o._transformers){if(!o.hasOwnProperty("_transformers")){const e=o._transformers;o._transformers=new Map,e.forEach((e,t)=>o._transformers.set(t,e))}}else{o._transformers=new Map,o._watching=new Map;const e=o.willUpdate;o.willUpdate=function(t){e.call(this,t);const i=new Set;t.forEach((e,t)=>{const r=this._watching.get(t);void 0!==r&&r.forEach(e=>i.add(e))}),i.forEach(e=>{this[e]=this[`__original_${String(e)}`]})}}o._transformers.set(i,e.transformer),e.watch&&e.watch.forEach(e=>{let t=o._watching.get(e);t||(t=new Set,o._watching.set(e,t)),t.add(i)});const n=Object.getOwnPropertyDescriptor(t,i);let a;if(void 0===n)a={get(){return this[`__transform_${r}`]},set(e){const t=this[`__transform_${r}`],i=this._transformers.get(r);this[`__transform_${r}`]=i?i.call(this,e):e,this[`__original_${r}`]=e,this.requestUpdate(r,t)},configurable:!0,enumerable:!0};else{const e=n.set;a=Object.assign(Object.assign({},n),{},{set(t){const i=this[`__transform_${r}`],o=this._transformers.get(r);this[`__transform_${r}`]=o?o.call(this,t):t,this[`__original_${r}`]=t,this.requestUpdate(r,i),null==e||e.call(this,t)}})}Object.defineProperty(t,i,a)}}},38962:function(e,t,i){i.a(e,async function(e,r){try{i.r(t);i(62953);var o=i(40445),n=i(5124),a=i(67576),s=i(6412),l=i(93421),c=i(1087),d=i(26300),h=(i(67094),e([d]));d=(h.then?(await h)():h)[0];let u,p,m,f,v=e=>e;const b="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",g={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"};class _ extends n.WF{render(){var e;return(0,n.qy)(u||(u=v` <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,s.H)({[this.alertType]:!0}),this.title?"":"no-title",g[this.alertType],(0,s.H)({content:!0,narrow:this.narrow}),this.title?(0,n.qy)(p||(p=v`<div class="title">${0}</div>`),this.title):n.s6,this.dismissable?(0,n.qy)(m||(m=v`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(e=this._localize)||void 0===e?void 0:e.call(this,"ui.common.dismiss_alert"),b):n.s6)}_dismissClicked(){(0,c.r)(this,"alert-dismissed-clicked")}constructor(...e){super(...e),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}_.styles=(0,n.AH)(f||(f=v`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.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;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-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}`)),(0,o.Cg)([(0,a.MZ)()],_.prototype,"title",void 0),(0,o.Cg)([(0,a.MZ)({attribute:"alert-type"})],_.prototype,"alertType",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],_.prototype,"dismissable",void 0),(0,o.Cg)([(0,a.wk)(),(0,l.IW)()],_.prototype,"_localize",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],_.prototype,"narrow",void 0),_=(0,o.Cg)([(0,a.EM)("ha-alert")],_),r()}catch(u){r(u)}})},52763:function(e,t,i){i.a(e,async function(e,r){try{i.d(t,{U:function(){return $}});i(74423),i(18111),i(7588),i(61701),i(3362),i(62953);var o=i(40445),n=i(5124),a=i(67576),s=i(69558),l=i(1087),c=i(38962),d=(i(11399),e([c]));c=(d.then?(await d)():d)[0];let h,u,p,m,f,v,b,g,_,y=e=>e;const w={boolean:()=>i.e(81347).then(i.bind(i,46990)),constant:()=>i.e(65733).then(i.bind(i,90820)),float:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(51868),i.e(62574),i.e(16113)]).then(i.bind(i,20676)),grid:()=>i.e(60761).then(i.bind(i,70208)),expandable:()=>i.e(45001).then(i.bind(i,40003)),integer:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(21543),i.e(86712),i.e(62574),i.e(12145)]).then(i.bind(i,20036)),multi_select:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(80131),i.e(58303),i.e(71739),i.e(78219)]).then(i.bind(i,36182)),positive_time_period_dict:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(67943),i.e(62574),i.e(16508),i.e(21486)]).then(i.bind(i,89422)),select:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(81034),i.e(99463),i.e(62574),i.e(26092),i.e(39005),i.e(35873),i.e(63577)]).then(i.bind(i,63804)),string:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(84725),i.e(62574),i.e(6762)]).then(i.bind(i,54753)),optional_actions:()=>Promise.all([i.e(72850),i.e(39763),i.e(34995),i.e(67395)]).then(i.bind(i,8456))},P=(e,t)=>e?!t.name||t.flatten?e:e[t.name]:void 0,C=(e,t)=>e&&t.name?e[t.name]:null,M=(e,t)=>e&&t.name?e[t.name]:null;class $ extends n.WF{getFormProperties(){return{}}reportValidity(){const e=this._root;if(!e)return!0;const t=[...e.children].filter(e=>"ha-alert"!==e.localName);let i,r=!0;var o,n;(this.schema.forEach((e,o)=>{var n;const a=t[o];if(!a)return;let s=!0;if("reportValidity"in a&&"function"==typeof a.reportValidity)s=a.reportValidity();else if(e.required&&(!("type"in e)||!["boolean","constant"].includes(null!==(n=e.type)&&void 0!==n?n:""))&&(!("selector"in e)||!("boolean"in e.selector)&&!("constant"in e.selector))){const t=P(this.data,e);s=null!=t&&""!==t}s||(r=!1,i||(i=a))}),i)&&(null===(o=(n=i).focus)||void 0===o||o.call(n));return r}willUpdate(e){e.has("schema")&&this.schema&&this.schema.forEach(e=>{var t;"selector"in e||null===(t=w[e.type])||void 0===t||t.call(w)})}render(){return(0,n.qy)(h||(h=y` <div class="root" part="root"> ${0} ${0} </div> `),this.error&&this.error.base?(0,n.qy)(u||(u=y` <ha-alert alert-type="error"> ${0} </ha-alert> `),this._computeError(this.error.base,this.schema)):"",this.schema.map(e=>{var t;const i=C(this.error,e),r=M(this.warning,e);return(0,n.qy)(p||(p=y` ${0} ${0} `),i?(0,n.qy)(m||(m=y` <ha-alert own-margin alert-type="error"> ${0} </ha-alert> `),this._computeError(i,e)):r?(0,n.qy)(f||(f=y` <ha-alert own-margin alert-type="warning"> ${0} </ha-alert> `),this._computeWarning(r,e)):"","selector"in e?(0,n.qy)(v||(v=y`<ha-selector .schema="${0}" .hass="${0}" .narrow="${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,this.narrow,e.name,e.selector,P(this.data,e),this._computeLabel(e,this.data),e.disabled||this.disabled||!1,e.required?void 0:e.default,this._computeHelper(e),this.localizeValue,e.required||!1,this._generateContext(e)):(0,s._)(this.fieldElementName(e.type),Object.assign({schema:e,data:P(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())))}))}fieldElementName(e){return`ha-form-${e}`}_generateContext(e){if(!e.context&&!this.context)return;const t=Object.assign({},this.context);if(e.context)for(const[i,r]of Object.entries(e.context))t[i]=this.data[r];return t}createRenderRoot(){const e=super.createRenderRoot();return this.addValueChangedListener(e),e}addValueChangedListener(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.r)(this,"value-changed",{value:this.data})})}_computeLabel(e,t){return this.computeLabel?this.computeLabel(e,t):e?e.name:""}_computeHelper(e){return this.computeHelper?this.computeHelper(e):""}_computeError(e,t){return Array.isArray(e)?(0,n.qy)(b||(b=y`<ul> ${0} </ul>`),e.map(e=>(0,n.qy)(g||(g=y`<li> ${0} </li>`),this.computeError?this.computeError(e,t):e))):this.computeError?this.computeError(e,t):e}_computeWarning(e,t){return this.computeWarning?this.computeWarning(e,t):e}constructor(...e){super(...e),this.narrow=!1,this.disabled=!1}}$.shadowRootOptions={mode:"open",delegatesFocus:!0},$.styles=(0,n.AH)(_||(_=y`.root>*{display:block}.root>:not([own-margin]):not(:last-child){margin-bottom:24px}ha-alert[own-margin]{margin-bottom:4px}`)),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"hass",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"narrow",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"data",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"schema",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"error",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"warning",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"disabled",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"computeError",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"computeWarning",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"computeLabel",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"computeHelper",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"localizeValue",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"context",void 0),(0,o.Cg)([(0,a.P)(".root")],$.prototype,"_root",void 0),$=(0,o.Cg)([(0,a.EM)("ha-form")],$),r()}catch(h){r(h)}})},11399:function(e,t,i){i(3362),i(27495),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(25440),i(62953);var r=i(40445),o=i(5124),n=i(67576),a=i(22786),s=i(69558),l=i(95311);let c,d=e=>e;const h={action:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(80131),i.e(72130),i.e(85010),i.e(67218),i.e(98470),i.e(58303),i.e(81034),i.e(23659),i.e(54066),i.e(25950),i.e(64006),i.e(79185),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(34310),i.e(55392),i.e(12009),i.e(20282),i.e(13628),i.e(16508),i.e(28501),i.e(84207),i.e(31863),i.e(283),i.e(30513),i.e(33547)]).then(i.bind(i,6274)),addon:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(26787),i.e(62574),i.e(26092),i.e(39005),i.e(71625),i.e(43305)]).then(i.bind(i,36784)),automation_behavior:()=>Promise.all([i.e(72850),i.e(81034),i.e(99220)]).then(i.bind(i,66034)),app:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(26787),i.e(62574),i.e(26092),i.e(39005),i.e(71625)]).then(i.bind(i,48585)),area:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(83523),i.e(62574),i.e(26092),i.e(39005),i.e(13905)]).then(i.bind(i,81857)),areas_display:()=>Promise.all([i.e(46095),i.e(64657),i.e(68273),i.e(64280),i.e(47956)]).then(i.bind(i,38235)),attribute:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(49168),i.e(62574),i.e(26092),i.e(39005),i.e(58072)]).then(i.bind(i,71498)),assist_pipeline:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(43048),i.e(63071)]).then(i.bind(i,83642)),boolean:()=>Promise.all([i.e(93282),i.e(19623)]).then(i.bind(i,30714)),choose:()=>i.e(93934).then(i.bind(i,58141)),color_rgb:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(7106),i.e(62574),i.e(21332)]).then(i.bind(i,34931)),condition:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(72130),i.e(85010),i.e(67218),i.e(23659),i.e(54066),i.e(25950),i.e(48106),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(34310),i.e(12009),i.e(20282),i.e(13628),i.e(28501),i.e(84207),i.e(283),i.e(77190)]).then(i.bind(i,81539)),config_entry:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(8706),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(81594)]).then(i.bind(i,49347)),conversation_agent:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(20667),i.e(44770)]).then(i.bind(i,94215)),constant:()=>i.e(77057).then(i.bind(i,39032)),country:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(84887),i.e(65799),i.e(62574),i.e(26092),i.e(39005),i.e(64157),i.e(47352)]).then(i.bind(i,94164)),date:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(81178),i.e(62574),i.e(36553)]).then(i.bind(i,94351)),datetime:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(62574),i.e(12466)]).then(i.bind(i,39045)),device:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(23659),i.e(33246),i.e(62574),i.e(26092),i.e(39005),i.e(83128)]).then(i.bind(i,2270)),duration:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(90324),i.e(62574),i.e(16508),i.e(24858)]).then(i.bind(i,79488)),entity:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(69923),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(1535),i.e(34435)]).then(i.bind(i,73863)),entity_name:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(80607),i.e(62574),i.e(26092),i.e(39005),i.e(3067)]).then(i.bind(i,7563)),statistic:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(72224),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(54884),i.e(88493)]).then(i.bind(i,28072)),file:()=>Promise.all([i.e(72850),i.e(49224)]).then(i.bind(i,25078)),floor:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(89100),i.e(54192),i.e(62574),i.e(26092),i.e(39005),i.e(33790),i.e(94628)]).then(i.bind(i,9040)),label:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(79808),i.e(62574),i.e(26092),i.e(39005),i.e(66201),i.e(40231)]).then(i.bind(i,99560)),language:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(82025),i.e(62574),i.e(26092),i.e(39005),i.e(59324)]).then(i.bind(i,15430)),navigation:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(83113),i.e(99788),i.e(54066),i.e(83502),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(19112),i.e(30002),i.e(59704),i.e(25322),i.e(89747),i.e(71572),i.e(12009),i.e(20282),i.e(28501),i.e(46152),i.e(33173)]).then(i.bind(i,58350)),number:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(21543),i.e(62574),i.e(64809)]).then(i.bind(i,31157)),numeric_threshold:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(88992),i.e(99386)]).then(i.bind(i,18719)),object:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(72130),i.e(85010),i.e(42981),i.e(34310),i.e(87352)]).then(i.bind(i,97951)),period:()=>i.e(54234).then(i.bind(i,40929)),qr_code:()=>Promise.all([i.e(72850),i.e(51343),i.e(90791)]).then(i.bind(i,35313)),select:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(81034),i.e(62574),i.e(26092),i.e(39005),i.e(35873),i.e(99457)]).then(i.bind(i,856)),selector:()=>i.e(77810).then(i.bind(i,13897)),serial_port:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(68432),i.e(62574),i.e(26092),i.e(39005),i.e(87464)]).then(i.bind(i,82178)),state:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(19269),i.e(62574),i.e(26092),i.e(39005),i.e(48007)]).then(i.bind(i,12995)),backup_location:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(80131),i.e(83241),i.e(72777)]).then(i.bind(i,16360)),stt:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(98286),i.e(87890)]).then(i.bind(i,42999)),target:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(40420),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(13628),i.e(14351),i.e(24891),i.e(45862)]).then(i.bind(i,84909)),template:()=>Promise.all([i.e(72850),i.e(39763),i.e(72130),i.e(33387),i.e(34310),i.e(15732)]).then(i.bind(i,62166)),text:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(37694),i.e(62574),i.e(55844)]).then(i.bind(i,47971)),time:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(92351),i.e(62574),i.e(17066)]).then(i.bind(i,42945)),icon:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(86325),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(82568)]).then(i.bind(i,14885)),media:()=>Promise.all([i.e(72850),i.e(33887),i.e(91845),i.e(22308)]).then(i.bind(i,59422)),theme:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(4406),i.e(62574),i.e(26092),i.e(39005),i.e(5127)]).then(i.bind(i,77655)),timezone:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(56253),i.e(12727),i.e(62574),i.e(26092),i.e(39005),i.e(78464),i.e(41460)]).then(i.bind(i,6719)),button_toggle:()=>i.e(7774).then(i.bind(i,79949)),trigger:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(80131),i.e(72130),i.e(85010),i.e(67218),i.e(58303),i.e(81034),i.e(23659),i.e(54066),i.e(25950),i.e(4379),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(34310),i.e(12009),i.e(20282),i.e(13628),i.e(28501),i.e(84207),i.e(31863),i.e(155)]).then(i.bind(i,45078)),tts:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(75905),i.e(56146)]).then(i.bind(i,59447)),tts_voice:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(53524),i.e(58485)]).then(i.bind(i,41188)),location:()=>Promise.all([i.e(72850),i.e(66139),i.e(70622),i.e(73512),i.e(8851),i.e(12122),i.e(76696),i.e(83462)]).then(i.bind(i,21160)),color_temp:()=>Promise.all([i.e(72850),i.e(39763),i.e(99788),i.e(21543),i.e(29628),i.e(59704),i.e(20282),i.e(68611)]).then(i.bind(i,90780)),ui_action:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(72130),i.e(85010),i.e(83113),i.e(98470),i.e(99788),i.e(54066),i.e(25950),i.e(31746),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(19112),i.e(34310),i.e(30002),i.e(59704),i.e(25322),i.e(55392),i.e(89747),i.e(71572),i.e(36332),i.e(12009),i.e(20282),i.e(28501),i.e(46152),i.e(59800)]).then(i.bind(i,38389)),ui_color:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(46051),i.e(62574),i.e(26092),i.e(39005),i.e(80651)]).then(i.bind(i,52744)),ui_state_content:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(67493),i.e(62574),i.e(26092),i.e(39005),i.e(48408)]).then(i.bind(i,96074))},u=new Set(["ui-action","ui-color"]);class p extends o.WF{reportValidity(){var e,t;return this._selectorElement&&"reportValidity"in this._selectorElement&&"function"==typeof this._selectorElement.reportValidity?null===(e=null===(t=this._selectorElement)||void 0===t?void 0:t.reportValidity())||void 0===e||e:!this.required||void 0!==this.value&&null!==this.value&&""!==this.value}async focus(){var e;await this.updateComplete,null===(e=this._selectorElement)||void 0===e||e.focus()}get _type(){const e=Object.keys(this.selector)[0];return u.has(e)?e.replace("-","_"):e}willUpdate(e){var t;e.has("selector")&&this.selector&&(null===(t=h[this._type])||void 0===t||t.call(h))}render(){return(0,o.qy)(c||(c=d` ${0} `),(0,s._)(`ha-selector-${this._type}`,{hass:this.hass,narrow:this.narrow,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"}))}constructor(...e){super(...e),this.narrow=!1,this.disabled=!1,this.required=!0,this._handleLegacySelector=(0,a.A)(e=>{if("entity"in e)return(0,l.UU)(e);if("device"in e)return(0,l.tD)(e);const t=Object.keys(this.selector)[0];return u.has(t)?{[t.replace("-","_")]:e[t]}:e})}}(0,r.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean})],p.prototype,"narrow",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"name",void 0),(0,r.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"selector",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"value",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"label",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"helper",void 0),(0,r.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"localizeValue",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"placeholder",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean})],p.prototype,"required",void 0),(0,r.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"context",void 0),(0,r.Cg)([(0,n.P)("#selector",!0)],p.prototype,"_selectorElement",void 0),p=(0,r.Cg)([(0,n.EM)("ha-selector")],p)},95311:function(e,t,i){i.d(t,{DF:function(){return v},Lo:function(){return P},MH:function(){return u},MM:function(){return b},Qz:function(){return f},Ru:function(){return _},UU:function(){return y},_7:function(){return m},bZ:function(){return p},m0:function(){return h},tD:function(){return w},vX:function(){return g},wY:function(){return C}});var r=i(86518),o=(i(78350),i(74423),i(44114),i(30237),i(18111),i(22489),i(30531),i(7588),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953),i(44537)),n=i(69093),a=i(82286),s=i(24367),l=i(58594);const c=["domain","integration","device_class"],d=["integration","manufacturer","model"],h=(e,t,i,r,o,n,a)=>{const s=[],l=[],c=[];return Object.values(i).forEach(i=>{i.labels.includes(t)&&f(e,o,r,i.area_id,n,a)&&c.push(i.area_id)}),Object.values(r).forEach(i=>{i.labels.includes(t)&&v(e.states,Object.values(o),i,n,a)&&l.push(i.id)}),Object.values(o).forEach(i=>{i.labels.includes(t)&&b(e.states[i.entity_id],n,a)&&s.push(i.entity_id)}),{areas:c,devices:l,entities:s}},u=(e,t,i,r,o)=>{const n=[];return Object.values(i).forEach(i=>{i.floor_id===t&&f(e,e.entities,e.devices,i.area_id,r,o)&&n.push(i.area_id)}),{areas:n}},p=(e,t,i,r,o,n)=>{const a=[],s=[];return Object.values(i).forEach(i=>{i.area_id===t&&v(e.states,Object.values(r),i,o,n)&&s.push(i.id)}),Object.values(r).forEach(i=>{i.area_id===t&&b(e.states[i.entity_id],o,n)&&a.push(i.entity_id)}),{devices:s,entities:a}},m=(e,t,i,r,o)=>{const n=[];return Object.values(i).forEach(i=>{i.device_id===t&&b(e.states[i.entity_id],r,o)&&n.push(i.entity_id)}),{entities:n}},f=(e,t,i,r,o,n)=>!!Object.values(i).some(i=>!(i.area_id!==r||!v(e.states,Object.values(t),i,o,n)))||Object.values(t).some(t=>!(t.area_id!==r||!b(e.states[t.entity_id],o,n))),v=(e,t,i,r,n)=>{var a,s;const c=n?(0,l.fk)(n,t):void 0;if(null!==(a=r.target)&&void 0!==a&&a.device&&!(0,o.e)(r.target.device).some(e=>g(e,i,c)))return!1;if(null!==(s=r.target)&&void 0!==s&&s.entity){return t.filter(e=>e.device_id===i.id).some(t=>{const i=e[t.entity_id];return b(i,r,n)})}return!0},b=(e,t,i)=>{var r;return!!e&&(null===(r=t.target)||void 0===r||!r.entity||(0,o.e)(t.target.entity).some(t=>_(t,e,i)))},g=(e,t,i)=>{const{manufacturer:r,model:o,model_id:n,integration:a}=e;if(r&&t.manufacturer!==r)return!1;if(o&&t.model!==o)return!1;if(n&&t.model_id!==n)return!1;var s;if(a&&i&&(null==i||null===(s=i[t.id])||void 0===s||!s.has(a)))return!1;return!0},_=(e,t,i)=>{var r;const{domain:s,device_class:l,supported_features:c,unit_of_measurement:d,integration:h}=e;if(s){const e=(0,n.t)(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}if(c&&!(0,o.e)(c).some(e=>(0,a.$)(t,e)))return!1;if(d){const e=t.attributes.unit_of_measurement;if(!e||(Array.isArray(d)?!d.includes(e):e!==d))return!1}return!h||(null==i||null===(r=i[t.entity_id])||void 0===r?void 0:r.domain)===h},y=e=>{if(!e.entity)return{entity:null};if("filter"in e.entity)return e;const t=e.entity,{domain:i,integration:o,device_class:n}=t,a=(0,r.A)(t,c);return i||o||n?{entity:Object.assign(Object.assign({},a),{},{filter:{domain:i,integration:o,device_class:n}})}:{entity:a}},w=e=>{if(!e.device)return{device:null};if("filter"in e.device)return e;const t=e.device,{integration:i,manufacturer:o,model:n}=t,a=(0,r.A)(t,d);return i||o||n?{device:Object.assign(Object.assign({},a),{},{filter:{integration:i,manufacturer:o,model:n}})}:{device:a}},P=e=>{let t;var i;if("target"in e)t=(0,o.e)(null===(i=e.target)||void 0===i?void 0:i.entity);else if("entity"in e){var r,n;if(null!==(r=e.entity)&&void 0!==r&&r.include_entities)return;t=(0,o.e)(null===(n=e.entity)||void 0===n?void 0:n.filter)}if(!t)return;const a=t.flatMap(e=>e.integration||e.device_class||e.supported_features||!e.domain?[]:(0,o.e)(e.domain).filter(e=>(0,s.z)(e)));return[...new Set(a)]},C=(e,t,i,r,n,a={target:{}})=>{if(!t)return[];const s=new Set((0,o.e)(t.entity_id)),l=new Set((0,o.e)(t.device_id)),c=new Set((0,o.e)(t.area_id)),d=new Set((0,o.e)(t.floor_id));return new Set((0,o.e)(t.label_id)).forEach(t=>{const o=h(e,t,n,r,i,a);o.devices.forEach(e=>l.add(e)),o.entities.forEach(e=>s.add(e)),o.areas.forEach(e=>c.add(e))}),d.forEach(t=>{u(e,t,n,a).areas.forEach(e=>c.add(e))}),c.forEach(t=>{const o=p(e,t,r,i,a);o.devices.forEach(e=>l.add(e)),o.entities.forEach(e=>s.add(e))}),l.forEach(t=>{m(e,t,i,a).entities.forEach(e=>s.add(e))}),Array.from(s)}},70319:function(e,t,i){i.a(e,async function(e,r){try{i.r(t);i(62953);var o=i(40445),n=i(5124),a=i(22786),s=i(67576),l=i(1087),c=(i(93444),i(72554)),d=i(52763),h=i(18350),u=i(14503),p=e([c,d,h]);[c,d,h]=p.then?(await p)():p;let m,f=e=>e;class v extends n.WF{showDialog(e){var t;this._params=e,this._error=void 0,this._data=e.block,this._expand=!(null===(t=e.block)||void 0===t||!t.data),this._open=!0}closeDialog(){this._open=!1}_dialogClosed(){this._params=void 0,this._data=void 0,(0,l.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._params&&this._data?(0,n.qy)(m||(m=f` <ha-dialog .open="${0}" header-title="${0}" @closed="${0}"> <div> <ha-form autofocus .hass="${0}" .schema="${0}" .data="${0}" .error="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> </div> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" @click="${0}" appearance="filled" variant="danger"> ${0} </ha-button> <ha-button slot="primaryAction" @click="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this._open,this.hass.localize("ui.dialogs.helper_settings.schedule.edit_schedule_block"),this._dialogClosed,this.hass,this._schema(this._expand),this._data,this._error,this._computeLabelCallback,this._valueChanged,this._deleteBlock,this.hass.localize("ui.common.delete"),this._updateBlock,this.hass.localize("ui.common.save")):n.s6}_valueChanged(e){this._error=void 0,this._data=e.detail.value}_updateBlock(){try{this._params.updateBlock(this._data),this.closeDialog()}catch(e){this._error={base:e?e.message:"Unknown error"}}}_deleteBlock(){try{this._params.deleteBlock(),this.closeDialog()}catch(e){this._error={base:e?e.message:"Unknown error"}}}static get styles(){return[u.nA]}constructor(...e){super(...e),this._open=!1,this._expand=!1,this._schema=(0,a.A)(e=>[{name:"from",required:!0,selector:{time:{no_second:!0}}},{name:"to",required:!0,selector:{time:{no_second:!0}}},{name:"advanced_settings",type:"expandable",flatten:!0,expanded:e,schema:[{name:"data",required:!1,selector:{object:{}}}]}]),this._computeLabelCallback=e=>{switch(e.name){case"from":return this.hass.localize("ui.dialogs.helper_settings.schedule.start");case"to":return this.hass.localize("ui.dialogs.helper_settings.schedule.end");case"data":return this.hass.localize("ui.dialogs.helper_settings.schedule.data");case"advanced_settings":return this.hass.localize("ui.dialogs.helper_settings.generic.advanced_settings")}return""}}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,o.Cg)([(0,s.wk)()],v.prototype,"_error",void 0),(0,o.Cg)([(0,s.wk)()],v.prototype,"_data",void 0),(0,o.Cg)([(0,s.wk)()],v.prototype,"_params",void 0),(0,o.Cg)([(0,s.wk)()],v.prototype,"_open",void 0),v=(0,o.Cg)([(0,s.EM)("dialog-schedule-block-info")],v),r()}catch(m){r(m)}})},48646:function(e,t,i){var r=i(69565),o=i(28551),n=i(1767),a=i(50851);e.exports=function(e,t){t&&"string"==typeof e||o(e);var i=a(e);return n(o(void 0!==i?r(i,e):e))}},78350:function(e,t,i){var r=i(46518),o=i(70259),n=i(79306),a=i(48981),s=i(26198),l=i(1469);r({target:"Array",proto:!0},{flatMap:function(e){var t,i=a(this),r=s(i);return n(e),t=l(i,0),o(t,i,i,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},30237:function(e,t,i){i(6469)("flatMap")},30531:function(e,t,i){var r=i(46518),o=i(69565),n=i(79306),a=i(28551),s=i(1767),l=i(48646),c=i(19462),d=i(9539),h=i(96395),u=i(30684),p=i(84549);var m=!h&&!u("flatMap",function(){}),f=!h&&!m&&p("flatMap",TypeError),v=h||m||f||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e.return()}catch(t){return!0}}(),b=c(function(){for(var e,t,i=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=a(o(t.next,t.iterator))).done)return e.value;this.inner=null}catch(n){d(i,"throw",n)}if(e=a(o(this.next,i)),this.done=!!e.done)return;try{this.inner=l(r(e.value,this.counter++),!1)}catch(n){d(i,"throw",n)}}});r({target:"Iterator",proto:!0,real:!0,forced:v},{flatMap:function(e){a(this);try{n(e)}catch(t){d(this,"throw",t)}return f?o(f,this,e):new b(s(this),{mapper:e,inner:null})}})}}]);