iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
55 lines • 78.7 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[65464],{16629:function(t,e,o){o.d(e,{E7:function(){return u},Mn:function(){return n},P9:function(){return l},lf:function(){return h}});o(18111),o(61701),o(62953);var i=o(63004);const n=t=>{const e=t/100;return[Math.round(a(e)),Math.round(r(e)),Math.round(s(e))]},a=t=>{if(t<=66)return 255;const e=329.698727446*(t-60)**-.1332047592;return(0,i.q)(e,0,255)},r=t=>{let e;return e=t<=66?99.4708025861*Math.log(t)-161.1195681661:288.1221695283*(t-60)**-.0755148492,(0,i.q)(e,0,255)},s=t=>{if(t>=66)return 255;if(t<=19)return 0;const e=138.5177312231*Math.log(t-10)-305.0447927307;return(0,i.q)(e,0,255)},c=(t,e)=>{const o=Math.max(...t),i=Math.max(...e);let n;return n=0===i?0:o/i,e.map(t=>Math.round(t*n))},l=t=>0===t?1e6:Math.floor(1e6/t),d=t=>0===t?1e6:Math.floor(1e6/t),h=(t,e,o)=>{const[i,a,r,s,h]=t,u=d(null!=e?e:2700),p=d(null!=o?o:6500),m=u-p;let f;try{f=h/(s+h)}catch(C){f=.5}const g=p+f*m,v=g?l(g):0,[b,y,_]=n(v),w=Math.max(s,h)/255;return c([i,a,r,s,h],[i+b*w,a+y*w,r+_*w])},u=t=>{const[e,o,i,n]=t;return c([e,o,i,n],[e+n,o+n,i+n])}},36356:function(t,e,o){o.d(e,{q:function(){return i}});class i{get enabled(){return this._enabled}set enabled(t){t!==this._enabled&&(this._enabled=t,this._enabled?this._attach():this._detach(),this._host.requestUpdate())}hostUpdated(){this.enabled&&!this._scrollContainer&&this._attach()}hostDisconnected(){this._detach()}_attach(){var t;this._scrollContainer=null===(t=this._host.renderRoot)||void 0===t?void 0:t.querySelector(this._selector),this._scrollContainer&&this._scrollContainer.addEventListener("mousedown",this._mouseDown)}_detach(){window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._scrollContainer&&(this._scrollContainer.removeEventListener("mousedown",this._mouseDown),this._scrollContainer=void 0),this.scrolled=!1,this.scrolling=!1,this.mouseIsDown=!1,this.scrollStartX=0,this.scrollLeft=0}constructor(t,{selector:e,enabled:o}){this.mouseIsDown=!1,this.scrolled=!1,this.scrolling=!1,this.scrollStartX=0,this.scrollLeft=0,this._enabled=!0,this._mouseDown=t=>{const e=this._scrollContainer;e&&(this.scrollStartX=t.pageX-e.offsetLeft,this.scrollLeft=e.scrollLeft,this.mouseIsDown=!0,this.scrolled=!1,window.addEventListener("mousemove",this._mouseMove),window.addEventListener("mouseup",this._mouseUp,{once:!0}))},this._mouseUp=()=>{this.mouseIsDown=!1,this.scrolling=!1,this._host.requestUpdate(),window.removeEventListener("mousemove",this._mouseMove)},this._mouseMove=t=>{if(!this.mouseIsDown)return;const e=this._scrollContainer;if(!e)return;const o=t.pageX-e.offsetLeft-this.scrollStartX;this.scrolled||(this.scrolled=Math.abs(o)>1,this.scrolling=this.scrolled,this._host.requestUpdate()),e.scrollLeft=this.scrollLeft-o},this._selector=e,this._host=t,this.enabled=null==o||o,t.addController(this)}}},80785:function(t,e,o){function i(t){return!!t&&(t instanceof Date&&!isNaN(t.valueOf()))}o.d(e,{A:function(){return i}})},72487:function(t,e,o){o.a(t,async function(t,i){try{o.d(e,{CA:function(){return x},Mi:function(){return $},Pm:function(){return M},Wq:function(){return y},Yq:function(){return l},bl:function(){return I},c2:function(){return w},fr:function(){return v},gu:function(){return H},kz:function(){return h},m9:function(){return D},sl:function(){return f},ur:function(){return V},zB:function(){return p}});o(18111),o(20116);var n=o(74487),a=o(22786),r=o(46927),s=o(8480),c=t([n,s]);[n,s]=c.then?(await c)():c;(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)}));const l=(t,e,o)=>d(e,o.time_zone).format(t),d=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),h=(t,e,o)=>u(e,o.time_zone).format(t),u=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),p=(t,e,o)=>{var i,n,a,s;const c=m(e,o.time_zone);if(e.date_format===r.ow.language||e.date_format===r.ow.system)return c.format(t);const l=c.formatToParts(t),d=null===(i=l.find(t=>"literal"===t.type))||void 0===i?void 0:i.value,h=null===(n=l.find(t=>"day"===t.type))||void 0===n?void 0:n.value,u=null===(a=l.find(t=>"month"===t.type))||void 0===a?void 0:a.value,p=null===(s=l.find(t=>"year"===t.type))||void 0===s?void 0:s.value,f=l[l.length-1];let g="literal"===(null==f?void 0:f.type)?null==f?void 0:f.value:"";"bg"===e.language&&e.date_format===r.ow.YMD&&(g="");return{[r.ow.DMY]:`${h}${d}${u}${d}${p}${g}`,[r.ow.MDY]:`${u}${d}${h}${d}${p}${g}`,[r.ow.YMD]:`${p}${d}${u}${d}${h}${g}`}[e.date_format]},m=(0,a.A)((t,e)=>{const o=t.date_format===r.ow.system?void 0:t.language;return t.date_format===r.ow.language||(t.date_format,r.ow.system),new Intl.DateTimeFormat(o,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),f=(t,e,o)=>g(e,o.time_zone).format(t),g=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),v=(t,e,o)=>b(e,o.time_zone).format(t),b=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),y=(t,e,o)=>_(e,o.time_zone).format(t),_=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),w=(t,e,o)=>C(e,o.time_zone).format(t),C=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),M=(t,e,o)=>A(e,o.time_zone).format(t),A=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),x=(t,e,o)=>L(e,o.time_zone).format(t),L=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),H=(t,e,o)=>k(e,o.time_zone).format(t),k=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),$=(t,e,o)=>E(e,o.time_zone).format(t),E=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),V=(t,e,o)=>T(e,o.time_zone).format(t),T=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),I=(t,e,o)=>{const i=(0,s.wj)(e.time_zone,o.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:i}).format(t)},D=(t,e,o,i)=>`${I(t,o,i)}/${I(e,o,i)}`;i()}catch(l){i(l)}})},82591:function(t,e,o){o.a(t,async function(t,i){try{o.d(e,{E2:function(){return p},Z8:function(){return m},a3:function(){return b},i:function(){return h},nR:function(){return l}});o(16280);var n=o(74487),a=o(22786),r=o(79791),s=t([n]);n=(s.then?(await s)():s)[0];const c=t=>t<10?`0${t}`:t,l=(t,e)=>{const o=e.days||0,i=e.hours||0,n=e.minutes||0,a=e.seconds||0,r=e.milliseconds||0;return o>0?`${Intl.NumberFormat(t.language,{style:"unit",unit:"day",unitDisplay:"long"}).format(o)} ${i}:${c(n)}:${c(a)}`:i>0?`${i}:${c(n)}:${c(a)}`:n>0?`${n}:${c(a)}`:a>0?Intl.NumberFormat(t.language,{style:"unit",unit:"second",unitDisplay:"long"}).format(a):r>0?Intl.NumberFormat(t.language,{style:"unit",unit:"millisecond",unitDisplay:"long"}).format(r):null},d=(0,a.A)(t=>new Intl.DurationFormat(t.language,{style:"long"})),h=(t,e)=>d(t).format(e),u=(0,a.A)(t=>new Intl.DurationFormat(t.language,{style:"digital",hoursDisplay:"auto"})),p=(t,e)=>u(t).format(e),m=["min","h","d"],f=(0,a.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",daysDisplay:"always"})),g=(0,a.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",hoursDisplay:"always"})),v=(0,a.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",minutesDisplay:"always"})),b=(t,e,o,i)=>{const n=void 0!==i?(0,r.L)(parseFloat(e),i):parseFloat(e);switch(o){case"d":{const e=Math.floor(n),o={days:e,hours:Math.floor(24*(n-e))};return f(t).format(o)}case"h":{const e=Math.floor(n),o={hours:e,minutes:Math.floor(60*(n-e))};return g(t).format(o)}case"min":{const e=Math.floor(n),o={minutes:e,seconds:Math.floor(60*(n-e))};return v(t).format(o)}default:throw new Error("Invalid duration unit")}};i()}catch(c){i(c)}})},30162:function(t,e,o){o.a(t,async function(t,i){try{o.d(e,{LW:function(){return f},Xs:function(){return p},fU:function(){return l},ie:function(){return h}});var n=o(74487),a=o(22786),r=o(8480),s=o(69543),c=t([n,r]);[n,r]=c.then?(await c)():c;const l=(t,e,o)=>d(e,o.time_zone).format(t),d=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),h=(t,e,o)=>u(e,o.time_zone).format(t),u=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),p=(t,e,o)=>m(e,o.time_zone).format(t),m=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),f=(t,e,o)=>g(e,o.time_zone).format(t),g=(0,a.A)((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,r.wj)(t.time_zone,e)}));i()}catch(l){i(l)}})},98975:function(t,e,o){o.a(t,async function(t,i){try{o.d(e,{K:function(){return l}});var n=o(74487),a=o(22786),r=o(63927),s=t([n,r]);[n,r]=s.then?(await s)():s;const c=(0,a.A)(t=>new Intl.RelativeTimeFormat(t.language,{numeric:"auto"})),l=(t,e,o,i=!0)=>{const n=(0,r.x)(t,o,e);return i?c(e).format(n.value,n.unit):Intl.NumberFormat(e.language,{style:"unit",unit:n.unit,unitDisplay:"long"}).format(Math.abs(n.value))};i()}catch(c){i(c)}})},69543:function(t,e,o){o.d(e,{J:function(){return a}});o(74423);var i=o(22786),n=o(46927);const a=(0,i.A)(t=>{if(t.time_format===n.Hg.language||t.time_format===n.Hg.system){const e=t.time_format===n.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===n.Hg.am_pm})},26218:function(t,e,o){o.d(e,{a:function(){return n}});o(16280);const i=(0,o(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function n(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const n=e.connectedCallback;e.connectedCallback=function(){n.call(this);const e=this[o];e&&this.updateComplete.then(()=>{const o=this.renderRoot.querySelector(t);o&&setTimeout(()=>{o.scrollTop=e},0)})};const a=Object.getOwnPropertyDescriptor(e,o);let r;if(void 0===a)r={get(){var t;return this[`__${String(o)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){i(t),this[`__${String(o)}`]=t},configurable:!0,enumerable:!0};else{const t=a.set;r=Object.assign(Object.assign({},a),{},{set(e){i(e),this[`__${String(o)}`]=e,null==t||t.call(this,e)}})}Object.defineProperty(e,o,r)}}},32172:function(t,e,o){o.d(e,{p:function(){return i}});o(16280),o(18111),o(7588),o(45367),o(92731),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);function i(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const i=String(o),n=e;if(n._transformers){if(!n.hasOwnProperty("_transformers")){const t=n._transformers;n._transformers=new Map,t.forEach((t,e)=>n._transformers.set(e,t))}}else{n._transformers=new Map,n._watching=new Map;const t=n.willUpdate;n.willUpdate=function(e){t.call(this,e);const o=new Set;e.forEach((t,e)=>{const i=this._watching.get(e);void 0!==i&&i.forEach(t=>o.add(t))}),o.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}n._transformers.set(o,t.transformer),t.watch&&t.watch.forEach(t=>{let e=n._watching.get(t);e||(e=new Set,n._watching.set(t,e)),e.add(o)});const a=Object.getOwnPropertyDescriptor(e,o);let r;if(void 0===a)r={get(){return this[`__transform_${i}`]},set(t){const e=this[`__transform_${i}`],o=this._transformers.get(i);this[`__transform_${i}`]=o?o.call(this,t):t,this[`__original_${i}`]=t,this.requestUpdate(i,e)},configurable:!0,enumerable:!0};else{const t=a.set;r=Object.assign(Object.assign({},a),{},{set(e){const o=this[`__transform_${i}`],n=this._transformers.get(i);this[`__transform_${i}`]=n?n.call(this,e):e,this[`__original_${i}`]=e,this.requestUpdate(i,o),null==t||t.call(this,e)}})}Object.defineProperty(e,o,r)}}},69093:function(t,e,o){o.d(e,{t:function(){return n}});var i=o(71727);const n=t=>(0,i.m)(t.entity_id)},82286:function(t,e,o){o.d(e,{$:function(){return i}});const i=(t,e)=>n(t.attributes,e),n=(t,e)=>0!==(t.supported_features&e)},79791:function(t,e,o){o.d(e,{L:function(){return i}});const i=(t,e=2)=>Math.round(t*10**e)/10**e},31290:function(t,e,o){o.d(e,{n:function(){return i}});o(27495),o(25440);const i=t=>t.replace(/^_*(.)|_+(.)/g,(t,e,o)=>e?e.toUpperCase():" "+o.toUpperCase())},67258:function(t,e,o){o.d(e,{d:function(){return i}});const i=t=>{switch(t.language){case"cs":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}},8549:function(t,e,o){o.d(e,{A:function(){return n}});var i=o(67258);const n=(t,e)=>"°"===t?"":e&&"%"===t?(0,i.d)(e):" "},51758:function(t,e,o){o.d(e,{Z:function(){return i}});const i=t=>{const e=window.location.pathname;return t?e+"?"+t:e}},63927:function(t,e,o){o.a(t,async function(t,i){try{o.d(e,{x:function(){return p}});var n=o(6946),a=o(52640),r=o(38684),s=o(380),c=t([s]);s=(c.then?(await c)():c)[0];const d=1e3,h=60,u=60*h;function p(t,e=Date.now(),o,i={}){const c=Object.assign(Object.assign({},m),i||{}),l=(+t-+e)/d;if(Math.abs(l)<c.second)return{value:Math.round(l),unit:"second"};const p=l/h;if(Math.abs(p)<c.minute)return{value:Math.round(p),unit:"minute"};const f=l/u;if(Math.abs(f)<c.hour)return{value:Math.round(f),unit:"hour"};const g=new Date(t),v=new Date(e);g.setHours(0,0,0,0),v.setHours(0,0,0,0);const b=(0,n.c)(g,v);if(0===b)return{value:Math.round(f),unit:"hour"};if(Math.abs(b)<c.day)return{value:b,unit:"day"};const y=(0,s.P)(o),_=(0,a.k)(g,{weekStartsOn:y}),w=(0,a.k)(v,{weekStartsOn:y}),C=(0,r.I)(_,w);if(0===C)return{value:b,unit:"day"};if(Math.abs(C)<c.week)return{value:C,unit:"week"};const M=g.getFullYear()-v.getFullYear(),A=12*M+g.getMonth()-v.getMonth();return 0===A?{value:C,unit:"week"}:Math.abs(A)<c.month||0===M?{value:A,unit:"month"}:{value:Math.round(M),unit:"year"}}const m={second:59,minute:59,hour:22,day:5,week:4,month:11};i()}catch(l){i(l)}})},58139:function(t,e,o){o.d(e,{d:function(){return i},t:function(){return n}});o(3362);const i=async(t,e)=>new Promise(o=>{const i=e(t,t=>{i(),o(t)})}),n=async t=>new Promise(e=>{const o=t.subscribe(t=>{o(),e(t)})})},77796:function(t,e,o){o.d(e,{n:function(){return i}});o(62953);const i=(t,e,o=!0,i=!0)=>{let n,a=0;const r=(...r)=>{const s=()=>{a=!1===o?0:Date.now(),n=void 0,t(...r)},c=Date.now();a||!1!==o||(a=c);const l=e-(c-a);l<=0||l>e?(n&&(clearTimeout(n),n=void 0),a=c,t(...r)):n||!1===i||(n=window.setTimeout(s,l))};return r.cancel=()=>{clearTimeout(n),n=void 0,a=0},r}},34296:function(t,e,o){o(62953);var i=o(40445),n=o(96229),a=o(26069),r=o(91735),s=o(42034),c=o(5124),l=o(67576);let d,h,u,p,m=t=>t;class f extends n.k{renderOutline(){return this.filled?(0,c.qy)(d||(d=m`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,c.qy)(h||(h=m` <span class="leading icon" aria-hidden="true"> ${0} </span> <span class="label">${0}</span> <span class="touch"></span> <span class="trailing leading icon" aria-hidden="true"> ${0} </span> `),this.renderLeadingIcon(),this.label,this.renderTrailingIcon())}renderTrailingIcon(){return(0,c.qy)(u||(u=m`<slot name="trailing-icon"></slot>`))}constructor(...t){super(...t),this.filled=!1,this.active=!1}}f.styles=[r.R,s.R,a.R,(0,c.AH)(p||(p=m`:host{--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-surface:var(--primary-text-color);--md-assist-chip-container-shape:var(
--ha-assist-chip-container-shape,
16px
);--md-assist-chip-outline-color:var(--outline-color);--md-assist-chip-label-text-weight:400}.filled{display:flex;pointer-events:none;border-radius:inherit;inset:0;position:absolute;background-color:var(--ha-assist-chip-filled-container-color)}::slotted([slot=icon]),::slotted([slot=trailing-icon]){display:flex;--mdc-icon-size:var(--md-input-chip-icon-size, 18px);font-size:var(--_label-text-size)!important}.trailing.icon ::slotted(*),.trailing.icon svg{margin-inline-end:unset;margin-inline-start:var(--_icon-label-space)}::before{background:var(--ha-assist-chip-container-color,transparent);opacity:var(--ha-assist-chip-container-opacity, 1)}:where(.active)::before{background:var(--ha-assist-chip-active-container-color);opacity:var(--ha-assist-chip-active-container-opacity)}.label{font-family:var(--ha-font-family-body)}`))],(0,i.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],f.prototype,"filled",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean})],f.prototype,"active",void 0),f=(0,i.Cg)([(0,l.EM)("ha-assist-chip")],f)},9503:function(t,e,o){var i=o(40445),n=o(97577),a=o(5124),r=o(67576);let s,c=t=>t;class l extends n.A{get value(){var t;return null!==(t=this._value)&&void 0!==t?t:null}set value(t){this._value=t}static get styles(){return[n.A.styles,(0,a.AH)(s||(s=c`:host{--wa-form-control-toggle-size:var(--ha-checkbox-size, 20px);--wa-form-control-border-color:var(
--ha-checkbox-border-color,
var(--ha-color-border-neutral-normal)
);--wa-form-control-background-color:var(
--ha-checkbox-background-color,
var(--wa-form-control-background-color)
);--checked-icon-color:var(
--ha-checkbox-checked-icon-color,
var(--wa-color-brand-on-loud)
);--wa-form-control-activated-color:var(
--ha-checkbox-checked-background-color,
var(--ha-color-fill-primary-loud-resting)
);-webkit-tap-highlight-color:transparent;--checked-icon-scale:var(--ha-checkbox-checked-icon-scale, 0.9);--wa-form-control-required-content:var(
--ha-checkbox-required-marker,
var(--ha-input-required-marker, "*")
);--wa-form-control-required-content-offset:var(
--ha-checkbox-required-marker-offset,
0.1rem
)}[part~=base]{align-items:center;gap:var(--ha-space-2)}[part~=control]{border-radius:var(--ha-checkbox-border-radius,var(--ha-border-radius-sm));border-width:var(--ha-checkbox-border-width,var(--ha-border-width-md));margin-inline-end:0}[part~=label]{line-height:1}#hint{font-size:var(--ha-font-size-xs);color:var(--ha-color-text-secondary)}label:has(input:not(:disabled)):hover{--wa-form-control-border-color:var(
--ha-checkbox-border-color-hover,
var(--ha-checkbox-border-color, var(--ha-color-border-neutral-loud))
)}label:has(input:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-background-color-hover,var(--ha-color-form-background-hover))}label:has(input:checked:not(:disabled)):hover [part~=control],label:has(input:indeterminate:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover));border-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover))}`))]}}l=(0,i.Cg)([(0,r.EM)("ha-checkbox")],l)},59174:function(t,e,o){o.a(t,async function(t,e){try{var i=o(40445),n=o(35211),a=o(5124),r=o(67576),s=o(91450),c=o(22792),l=o(85694),d=o(44144),h=(o(47680),t([l]));l=(h.then?(await h)():h)[0];let u,p,m,f,g,v,b,y=t=>t;class _ extends a.WF{render(){if(this.icon)return(0,a.qy)(u||(u=y`<ha-icon .icon="${0}"></ha-icon>`),this.icon);if(!this.domain)return a.s6;if(!this._connection||!this._hassConfig)return this._renderFallback();const t=(0,l._4)(this._connection.connection,this._hassConfig.config,this.domain,this.deviceClass,this.state).then(t=>t?(0,a.qy)(p||(p=y`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,a.qy)(m||(m=y`${0}`),(0,s.T)(t))}_renderFallback(){if(this.domain&&this.domain in l.l)return(0,a.qy)(f||(f=y` <ha-svg-icon .path="${0}"></ha-svg-icon> `),l.l[this.domain]);if(this.brandFallback){var t,e;const o=(0,d.MR)({domain:this.domain,type:"icon",darkOptimized:null===(t=this._hassUi)||void 0===t?void 0:t.themes.darkMode},null===(e=this._hassConfig)||void 0===e?void 0:e.auth.data.hassUrl);return(0,a.qy)(g||(g=y` <img alt="" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer"> `),o)}return(0,a.qy)(v||(v=y`<ha-svg-icon .path="${0}"></ha-svg-icon>`),l.lW)}}_.styles=(0,a.AH)(b||(b=y`img{width:var(--mdc-icon-size,24px)}`)),(0,i.Cg)([(0,r.MZ)()],_.prototype,"domain",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],_.prototype,"deviceClass",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],_.prototype,"state",void 0),(0,i.Cg)([(0,r.MZ)()],_.prototype,"icon",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"brand-fallback",type:Boolean})],_.prototype,"brandFallback",void 0),(0,i.Cg)([(0,r.wk)(),(0,n.Fg)({context:c.WF,subscribe:!0})],_.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,r.wk)(),(0,n.Fg)({context:c.Wq,subscribe:!0})],_.prototype,"_connection",void 0),(0,i.Cg)([(0,r.wk)(),(0,n.Fg)({context:c.EK,subscribe:!0})],_.prototype,"_hassUi",void 0),_=(0,i.Cg)([(0,r.EM)("ha-domain-icon")],_),e()}catch(u){e(u)}})},11382:function(t,e,o){o(3362),o(62953);var i=o(40445),n=o(5124),a=o(67576),r=o(6412),s=o(1087),c=o(12587);o(67094);let l,d,h,u,p=t=>t;class m extends n.WF{render(){const t=this.noCollapse?n.s6:(0,n.qy)(l||(l=p` <ha-svg-icon .path="${0}" class="summary-icon ${0}"></ha-svg-icon> `),"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",(0,r.H)({expanded:this.expanded}));return(0,n.qy)(d||(d=p` <div class="top ${0}"> <div id="summary" class="${0}" @click="${0}" @keydown="${0}" @focus="${0}" @blur="${0}" role="button" tabindex="${0}" aria-expanded="${0}" aria-controls="sect1" part="summary"> ${0} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${0} <slot class="secondary" name="secondary">${0}</slot> </div> </slot> <slot name="event"></slot> ${0} <slot name="icons"></slot> </div> </div> <div class="container ${0}" @transitionend="${0}" role="region" aria-labelledby="summary" aria-hidden="${0}" tabindex="-1"> ${0} </div> `),(0,r.H)({expanded:this.expanded}),(0,r.H)({noCollapse:this.noCollapse}),this._toggleContainer,this._toggleContainer,this._focusChanged,this._focusChanged,this.noCollapse?-1:0,this.expanded,this.leftChevron?t:n.s6,this.header,this.secondary,this.leftChevron?n.s6:t,(0,r.H)({expanded:this.expanded}),this._handleTransitionEnd,!this.expanded,this._showContent?(0,n.qy)(h||(h=p`<slot></slot>`)):"")}willUpdate(t){super.willUpdate(t),t.has("expanded")&&(this._showContent=this.expanded,setTimeout(()=>{this._container.style.overflow=this.expanded?"initial":"hidden"},300))}_handleTransitionEnd(){this._container.style.removeProperty("height"),this._container.style.overflow=this.expanded?"initial":"hidden",this._showContent=this.expanded}async _toggleContainer(t){if(t.defaultPrevented)return;if("keydown"===t.type&&"Enter"!==t.key&&" "!==t.key)return;if(t.preventDefault(),this.noCollapse)return;const e=!this.expanded;(0,s.r)(this,"expanded-will-change",{expanded:e}),this._container.style.overflow="hidden",e&&(this._showContent=!0,await(0,c.E)());const o=this._container.scrollHeight;this._container.style.height=`${o}px`,e||setTimeout(()=>{this._container.style.height="0px"},0),this.expanded=e,(0,s.r)(this,"expanded-changed",{expanded:this.expanded})}_focusChanged(t){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===t.type)}constructor(...t){super(...t),this.expanded=!1,this.outlined=!1,this.leftChevron=!1,this.noCollapse=!1,this._showContent=this.expanded}}m.styles=(0,n.AH)(u||(u=p`:host{display:block}.top{display:flex;align-items:center;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.top.expanded{border-bottom-left-radius:0px;border-bottom-right-radius:0px}.top.focused{background:var(--input-fill-color)}:host([outlined]){box-shadow:none;border-width:1px;border-style:solid;border-color:var(--outline-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.summary-icon{transition:transform 150ms cubic-bezier(.4, 0, .2, 1);direction:var(--direction);margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;border-radius:var(--ha-border-radius-circle)}#summary:focus-visible ha-svg-icon.summary-icon{background-color:var(--ha-color-fill-neutral-normal-active)}::slotted([slot=leading-icon]),:host([left-chevron]) .summary-icon{margin-left:0;margin-right:8px;margin-inline-start:0;margin-inline-end:8px}#summary{flex:1;display:flex;padding:var(--expansion-panel-summary-padding,0 8px);min-height:48px;align-items:center;cursor:pointer;overflow:hidden;font-weight:var(--ha-font-weight-medium);outline:0}#summary.noCollapse{cursor:default}.summary-icon.expanded{transform:rotate(180deg)}.header,::slotted([slot=header]){flex:1;overflow-wrap:anywhere;color:var(--primary-text-color)}.container{padding:var(--expansion-panel-content-padding,0 8px);overflow:hidden;transition:height .3s cubic-bezier(.4, 0, .2, 1);height:0px}.container.expanded{height:auto}.secondary{display:block;color:var(--secondary-text-color);font-size:var(--ha-font-size-s)}`)),(0,i.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],m.prototype,"expanded",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],m.prototype,"outlined",void 0),(0,i.Cg)([(0,a.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],m.prototype,"leftChevron",void 0),(0,i.Cg)([(0,a.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],m.prototype,"noCollapse",void 0),(0,i.Cg)([(0,a.MZ)()],m.prototype,"header",void 0),(0,i.Cg)([(0,a.MZ)()],m.prototype,"secondary",void 0),(0,i.Cg)([(0,a.wk)()],m.prototype,"_showContent",void 0),(0,i.Cg)([(0,a.P)(".container")],m.prototype,"_container",void 0),m=(0,i.Cg)([(0,a.EM)("ha-expansion-panel")],m)},90248:function(t,e,o){o.a(t,async function(t,i){try{o.r(e),o.d(e,{HaIconButtonArrowPrev:function(){return m}});o(62953);var n=o(40445),a=o(5124),r=o(67576),s=o(63091),c=o(26300),l=t([c]);c=(l.then?(await l)():l)[0];let d,h=t=>t;const u="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",p="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class m extends a.WF{render(){var t;return(0,a.qy)(d||(d=h` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?p:u}}(0,n.Cg)([(0,r.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,n.Cg)([(0,r.MZ)({type:Boolean})],m.prototype,"disabled",void 0),(0,n.Cg)([(0,r.MZ)()],m.prototype,"label",void 0),(0,n.Cg)([(0,r.MZ)()],m.prototype,"href",void 0),(0,n.Cg)([(0,r.MZ)()],m.prototype,"target",void 0),(0,n.Cg)([(0,r.MZ)()],m.prototype,"rel",void 0),(0,n.Cg)([(0,r.MZ)()],m.prototype,"download",void 0),(0,n.Cg)([(0,r.wk)()],m.prototype,"_icon",void 0),m=(0,n.Cg)([(0,r.EM)("ha-icon-button-arrow-prev")],m),i()}catch(d){i(d)}})},26300:function(t,e,o){o.a(t,async function(t,i){try{o.r(e),o.d(e,{HaIconButton:function(){return f}});o(62953);var n=o(40445),a=o(5124),r=o(67576),s=o(63672),c=o(18350),l=(o(67094),t([c]));c=(l.then?(await l)():l)[0];let d,h,u,p,m=t=>t;class f extends a.WF{render(){return(0,a.qy)(d||(d=m` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,s.J)(this.label),(0,s.J)(this.hideTitle?void 0:this.label),(0,s.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,a.qy)(h||(h=m`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,a.qy)(u||(u=m`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}f.shadowRootOptions={mode:"open",delegatesFocus:!0},f.styles=(0,a.AH)(p||(p=m`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
--ha-icon-button-padding-inline,
--ha-space-2
);--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,n.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,n.Cg)([(0,r.MZ)({type:String})],f.prototype,"path",void 0),(0,n.Cg)([(0,r.MZ)({type:String})],f.prototype,"label",void 0),(0,n.Cg)([(0,r.MZ)({type:String,attribute:"aria-haspopup"})],f.prototype,"ariaHasPopup",void 0),(0,n.Cg)([(0,r.MZ)({attribute:"hide-title",type:Boolean})],f.prototype,"hideTitle",void 0),(0,n.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"selected",void 0),(0,n.Cg)([(0,r.MZ)()],f.prototype,"href",void 0),(0,n.Cg)([(0,r.MZ)()],f.prototype,"target",void 0),(0,n.Cg)([(0,r.MZ)()],f.prototype,"rel",void 0),(0,n.Cg)([(0,r.MZ)()],f.prototype,"download",void 0),f=(0,n.Cg)([(0,r.EM)("ha-icon-button")],f),i()}catch(d){i(d)}})},43661:function(t,e,o){o.r(e),o.d(e,{HaIconNext:function(){return s}});o(62953);var i=o(40445),n=o(67576),a=o(63091),r=o(67094);class s extends r.HaSvgIcon{constructor(...t){super(...t),this.path="rtl"===a.G.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"}}(0,i.Cg)([(0,n.MZ)()],s.prototype,"path",void 0),s=(0,i.Cg)([(0,n.EM)("ha-icon-next")],s)},8630:function(t,e,o){var i=o(40445),n=o(68618),a=o(11081),r=o(67576);class s extends n.iY{}s.styles=a.R,s=(0,i.Cg)([(0,r.EM)("ha-list")],s)},2054:function(t,e,o){o.a(t,async function(t,e){try{o(16280),o(62953);var i=o(40445),n=o(5124),a=o(67576),r=o(1087),s=o(44249),c=o(26300),l=t([c]);c=(l.then?(await l)():l)[0];let d,h,u,p=t=>t;const m="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class f extends n.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return n.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,n.qy)(d||(d=p` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),m,this._toggleMenu,t?(0,n.qy)(h||(h=p`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,o=t.has("narrow")?t.get("narrow"):this.narrow,i=!1===(null==e?void 0:e.kioskMode)&&(o||"always_hidden"===(null==e?void 0:e.dockedSidebar)),n=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&i===n||(this._show=n||this._alwaysVisible,n?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,r.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}f.styles=(0,n.AH)(u||(u=p`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,i.Cg)([(0,a.MZ)({type:Boolean})],f.prototype,"narrow",void 0),(0,i.Cg)([(0,a.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,a.wk)()],f.prototype,"_hasNotifications",void 0),(0,i.Cg)([(0,a.wk)()],f.prototype,"_show",void 0),f=(0,i.Cg)([(0,a.EM)("ha-menu-button")],f),e()}catch(d){e(d)}})},67094:function(t,e,o){o.r(e),o.d(e,{HaSvgIcon:function(){return h}});var i=o(40445),n=o(5124),a=o(67576);let r,s,c,l,d=t=>t;class h extends n.WF{render(){return(0,n.JW)(r||(r=d` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,n.JW)(s||(s=d`<path class="primary-path" d="${0}"></path>`),this.path):n.s6,this.secondaryPath?(0,n.JW)(c||(c=d`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):n.s6)}}h.styles=(0,n.AH)(l||(l=d`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`)),(0,i.Cg)([(0,a.MZ)()],h.prototype,"path",void 0),(0,i.Cg)([(0,a.MZ)({attribute:!1})],h.prototype,"secondaryPath",void 0),(0,i.Cg)([(0,a.MZ)({attribute:!1})],h.prototype,"viewBox",void 0),h=(0,i.Cg)([(0,a.EM)("ha-svg-icon")],h)},59646:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var i=o(40445),n=o(29344),a=o(5124),r=o(67576),s=o(88360),c=t([n]);n=(c.then?(await c)():c)[0];let l,d=t=>t;class h extends n.A{updated(t){super.updated(t),t.has("haptic")&&(this.haptic?this.addEventListener("change",this._forwardHaptic):this.removeEventListener("change",this._forwardHaptic))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this._forwardHaptic)}static get styles(){return[n.A.styles,(0,a.AH)(l||(l=d`:host{--wa-form-control-toggle-size:var(--ha-switch-size, 24px);--wa-form-control-required-content:var(
--ha-switch-required-marker,
var(--ha-input-required-marker, "*")
);--wa-form-control-required-content-offset:var(
--ha-switch-required-marker-offset,
0.1rem
);--thumb-size:var(--ha-switch-thumb-size, 18px);--width:var(--ha-switch-width, 48px)}label{position:relative;height:max(var(--thumb-size),var(--wa-form-control-toggle-size))}label::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-width:var(--ha-switch-min-touch-size,40px);min-height:var(--ha-switch-min-touch-size,40px)}label.disabled::before{pointer-events:none}.switch{background-color:var(--ha-switch-background-color,var(--ha-color-fill-disabled-quiet-resting));border-color:var(--ha-switch-border-color,var(--ha-color-border-neutral-normal))}label:not(.disabled) .input:focus-visible~.switch,label:not(.disabled):hover .switch{background-color:var(--ha-switch-background-color-hover,var(--ha-switch-background-color,var(--ha-color-fill-disabled-quiet-hover)))}.checked .switch{background-color:var(--ha-switch-checked-background-color,var(--ha-color-fill-primary-normal-resting));border-color:var(--ha-switch-checked-border-color,var(--ha-color-border-primary-loud))}label:not(.disabled).checked .input:focus-visible~.switch,label:not(.disabled).checked:hover .switch{background-color:var(--ha-switch-checked-background-color-hover,var(--ha-switch-checked-background-color,var(--ha-color-fill-primary-normal-hover)));border-color:var(--ha-switch-checked-border-color-hover,var(--ha-switch-checked-border-color,var(--ha-color-border-primary-loud)))}.switch .thumb{background-color:var(--ha-switch-thumb-background-color,var(--ha-color-on-neutral-normal));border-color:var(--ha-switch-thumb-border-color,var(--ha-color-on-neutral-normal));border-style:var(--wa-form-control-border-style);border-width:var(--wa-form-control-border-width);box-shadow:var(--ha-switch-thumb-box-shadow,var(--ha-box-shadow-s))}label:not(.disabled) .input:focus-visible~.switch .thumb,label:not(.disabled):hover .switch .thumb{background-color:var(--ha-switch-thumb-background-color-hover,var(--ha-switch-thumb-background-color,var(--ha-color-on-neutral-normal)));border-color:var(--ha-switch-thumb-border-color-hover,var(--ha-switch-thumb-border-color,var(--ha-color-on-neutral-normal)))}.checked .switch .thumb{background-color:var(--ha-switch-checked-thumb-background-color,var(--ha-color-on-primary-normal));border-color:var(--ha-switch-checked-thumb-border-color,var(--ha-color-on-primary-normal))}label:not(.disabled).checked .input:focus-visible~.switch .thumb,label:not(.disabled).checked:hover .switch .thumb{background-color:var(--ha-switch-checked-thumb-background-color-hover,var(--ha-switch-checked-thumb-background-color,var(--ha-color-on-primary-normal)));border-color:var(--ha-switch-checked-thumb-border-color-hover,var(--ha-switch-checked-thumb-border-color,var(--ha-color-on-primary-normal)))}label.disabled{opacity:var(--ha-switch-disabled-opacity, .3);cursor:not-allowed}label:not(.disabled) .input:focus-visible~.switch .thumb{outline:0;outline-offset:none}label:not(.disabled) .input:focus-visible~.switch{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}:host(:empty) slot.label{display:none}`))]}constructor(...t){super(...t),this.haptic=!1,this._forwardHaptic=()=>{(0,s.j)(this,"light")}}}(0,i.Cg)([(0,r.MZ)({type:Boolean})],h.prototype,"haptic",void 0),h=(0,i.Cg)([(0,r.EM)("ha-switch")],h),e()}catch(l){e(l)}})},34127:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var i=o(40445),n=o(52630),a=o(5124),r=o(67576),s=t([n]);n=(s.then?(await s)():s)[0];let c,l=t=>t;class d extends n.A{static get styles(){return[n.A.styles,(0,a.AH)(c||(c=l`:host{--wa-tooltip-background-color:var(
--ha-tooltip-background-color,
var(--ha-color-surface-default)
);--wa-tooltip-content-color:var(
--ha-tooltip-text-color,
var(--primary-text-color)
);--wa-tooltip-font-family:var(
--ha-tooltip-font-family,
var(--ha-font-family-body)
);--wa-tooltip-font-size:var(
--ha-tooltip-font-size,
var(--ha-font-size-m)
);--wa-tooltip-font-weight:var(
--ha-tooltip-font-weight,
var(--ha-font-weight-medium)
);--wa-tooltip-line-height:var(
--ha-tooltip-line-height,
var(--ha-line-height-condensed)
);--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
--ha-tooltip-border-radius,
var(--ha-border-radius-md)
);--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`))]}constructor(...t){super(...t),this.showDelay=350,this.hideDelay=150}}(0,i.Cg)([(0,r.MZ)({attribute:"show-delay",type:Number})],d.prototype,"showDelay",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"hide-delay",type:Number})],d.prototype,"hideDelay",void 0),d=(0,i.Cg)([(0,r.EM)("ha-tooltip")],d),e()}catch(c){e(c)}})},27330:function(t,e,o){o.d(e,{L:function(){return b},p:function(){return v}});o(62953);var i=o(40445),n=o(5124),a=o(67576),r=o(6412);let s,c,l,d,h,u,p,m,f=t=>t;const g={passive:!0},v=(0,n.AH)(s||(s=f`:host{display:block}.top-app-bar{box-sizing:border-box;color:var(--app-header-text-color,#fff);background-color:var(--app-header-background-color,var(--primary-color));position:fixed;top:0;inset-inline-end:0;width:var(--ha-top-app-bar-width,100%);z-index:4;padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right);transition:box-shadow var(--ha-animation-duration-normal) ease,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}:host([narrow]) .top-app-bar{padding-left:var(--safe-area-inset-left)}.top-app-bar.scrolled:not(.pane-header){box-shadow:var(--ha-box-shadow-s)}.row{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--header-height);border-bottom:var(--app-header-border-bottom)}.section{display:flex;align-items:center;box-sizing:border-box;min-width:0;height:100%;padding:0 var(--ha-space-3)}#navigation{flex:1 1 auto}.section.center{flex:1 1 auto;justify-content:center;text-align:center}.section.end{flex:none;justify-content:flex-end}.title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--header-height);padding-inline-start:var(--ha-space-6)}:host([narrow]) .title{padding-inline-start:var(--ha-space-2)}.top-app-bar-fixed-adjust{padding-top:calc(var(--header-height,0px) + var(--safe-area-inset-top,0px));padding-bottom:var(--safe-area-inset-bottom);padding-right:var(--safe-area-inset-right)}:host([narrow]) .top-app-bar-fixed-adjust{padding-left:var(--safe-area-inset-left)}`));class b extends n.WF{get scrollTarget(){return this._scrollTarget||window}set scrollTarget(t){const e=this.scrollTarget;this._unregisterListeners(),this._scrollTarget=t,this._updateBarPosition(),this.requestUpdate("scrollTarget",e),this.isConnected&&(this._registerListeners(),this._syncScrollState())}_isPaneHeader(){return!1}render(){return(0,n.qy)(c||(c=f`${0}${0}`),this._renderHeader(),this._renderContent())}connectedCallback(){super.connectedCallback(),this.hasUpdated&&(this._updateBarPosition(),this._registerListeners(),this._syncScrollState())}_renderHeader(){const t=(0,n.qy)(l||(l=f`<span class="title"> <slot name="title"></slot> </span>`)),e=this._isPaneHeader();return(0,n.qy)(d||(d=f` <header class="top-app-bar ${0}"> <div class="row"> ${0} <section class="section" id="navigation"> ${0} </section> ${0} <section class="section end" id="actions" role="toolbar"> <slot name="actionItems"></slot> </section> </div> </header> `),(0,r.H)({"pane-header":e}),e?(0,n.qy)(h||(h=f`<section class="section" id="title"> <slot name="navigationIcon"></slot> ${0} </section>`),t):n.s6,e?n.s6:(0,n.qy)(u||(u=f`<slot name="navigationIcon"></slot> ${0}`),this.centerTitle?n.s6:t),!e&&this.centerTitle?(0,n.qy)(p||(p=f`<section class="section center">${0}</section>`),t):n.s6)}_renderContent(){return(0,n.qy)(m||(m=f`<div class="top-app-bar-fixed-adjust"> <slot></slot> </div>`))}firstUpdated(t){super.firstUpdated(t),this._updateBarPosition(),this._registerListeners(),this._syncScrollState()}disconnectedCallback(){super.disconnectedCallback(),this._unregisterListeners()}_updateBarPosition(){this._barElement&&(this._barElement.style.position=this.scrollTarget===window?"":"absolute")}_registerListeners(){this.scrollTarget.addEventListener("scroll",this._syncScrollState,g)}_unregisterListeners(){this.scrollTarget.removeEventListener("scroll",this._syncScrollState)}constructor(...t){super(...t),this.narrow=!1,this.centerTitle=!1,this._syncScrollState=()=>{var t;const e=this.scrollTarget instanceof Window?this.scrollTarget.pageYOffset:this.scrollTarget.scrollTop;null===(t=this._barElement)||void 0===t||t.classList.toggle("scrolled",e>0)}}}b.styles=v,(0,i.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],b.prototype,"narrow",void 0),(0,i.Cg)([(0,a.MZ)({attribute:"center-title",type:Boolean})],b.prototype,"centerTitle",void 0),(0,i.Cg)([(0,a.P)(".top-app-bar")],b.prototype,"_barElement",void 0),(0,i.Cg)([(0,a.MZ)({attribute:!1})],b.prototype,"scrollTarget",null),b=(0,i.Cg)([(0,a.EM)("ha-top-app-bar-fixed")],b)},10897:function(t,e,o){o.d(e,{C4:function(){return l},CK:function(){return c},FX:function(){return f},UC:function(){return p},_Z:function(){return y},bT:function(){return _},j4:function(){return v},sd:function(){return a},su:function(){return s},vc:function(){return b},w8:function(){return u},wv:function(){return h},y3:function(){return m},zS:function(){return r}});o(3362);var i=o(3931),n=o(82e3);const a=[1,2,3,4,6,8],r="web_rtc",s=(t,e,o)=>`${t}&width=${e}&height=${o}`,c=t=>t.attributes.access_token?`/api/camera_proxy_stream/${t.entity_id}?token=${t.attributes.access_token}`:void 0,l=async(t,e,o,n)=>{const a=await(0,i.U)("_cameraTmbUrl",9e3,d,t,e);return s(a,o,n)},d=async(t,e)=>{const o=await(0,n.e0)(t,`/api/camera_proxy/${e}`);return t.hassUrl(o.path)},h=async(t,e,o)=>{const i={type:"camera/stream",entity_id:e};o&&(i.format=o);const n=await t.callWS(i);return n.url=t.hassUrl(n.url),n},u=(t,e,o,i)=>t.connection.subscribeMessage(i,{type:"camera/webrtc/offer",entity_id:e,offer:o}),p=(t,e,o,i)=>t.callWS({type:"camera/webrtc/candidate",entity_id:e,session_id:o,candidate:i}),m=(t,e)=>t.callWS({type:"camera/get_prefs",entity_id:e}),f=(t,e,o)=>t.callWS(Object.assign({type:"camera/update_prefs",entity_id:e},o)),g="media-source://camera/",v=t=>t.startsWith(g),b=t=>t.substring(22),y=async(t,e)=>t.callWS({type:"camera/capabilities",entity_id:e}),_=async(t,e)=>t.callWS({type:"camera/webrtc/get_client_config",entity_id:e})},99129:function(t,e,o){o.d(e,{EG:function(){return a},ML:function(){return r}});var i=o(90889),n=o(35952);const a=(t,e,o)=>t.subscribeEvents(t=>{t.data.url_path===e&&o()},"lovelace_updated"),r=(t,e=null)=>(0,i.X)(t,`_lovelace_${null!=e?e:""}`,t=>(0,n.Dz)(t,e,!1),(o,i)=>a(t,e,()=>(0,n.Dz)(t,e,!1).then(t=>i.setState(t,!0))))},28918:function(t,e,o){o.d(e,{H:function(){return n},o:function(){return i}});function i(t){return"boolean"==typeof t?t?{}:void 0:t}function n(t){return"strategy"in t}},35952:function(t,e,o){function i(t){return"strategy"in t}o.d(e,{Dz:function(){return n},Wu:function(){return i},ql:function(){return a}});const n=(t,e,o)=>t.sendMessagePromise({type:"lovelace/config",url_path:e,force:o}),a=(t,e,o)=>t.callWS({type:"lovelace/config/save",url_path:e,config:o})},91984:function(t,e,o){o.d(e,{R6:function(){return n},TQ:function(){return a},cg:function(){return r}});var i=o(31290);function n(t){return"strategy"in t}const a=(t,e)=>{var o;return null!==(o=t.title)&&void 0!==o?o:t.path?(0,i.n)(t.path):String(e)},r=t=>{var e;return null!==(e=t.icon)&&void 0!==e?e:"mdi:view-compact"}},71730:function(t,e,o){o.d(e,{A_:function(){return r},SJ:function(){return i},mQ:function(){return a},n6:function(){return n}});const i=t=>t.callWS({type:"lovelace/dashboards/list"}),n=(t,e)=>t.callWS(Object.assign({type:"lovelace/dashboards/create"},e)),a=(t,e,o)=>t.callWS(Object.assign({type:"lovelace/dashboards/update",dashboard_id:e},o)),r=(t,e)=>t.callWS({type:"lovelace/dashboards/delete",dashboard_id:e})},45291:function(t,e,o){o.d(e,{IP:function(){return i},Iu:function(){return h},J_:function(){return a},O9:function(){return s},b$:function(){return l},bH:function(){return r},c8:function(){return d},wi:function(){return c}});o(18111),o(20116),o(62953);const i="custom:",n=window;"customCards"in n||(n.customCards=[]),"customCardFeatures"in n||(n.customCardFeatures=[]),"customBadges"in n||(n.customBadges=[]),"customTileFeatures"in n||(n.customTileFeatures=[]);const a=n.customCards,r=()=>[...n.customCardFeatures,...n.customTileFeatures],s=n.customBadges,c=t=>a.find(e=>e.type===t),l=t=>s.find(e=>e.type===t),d=t=>t.startsWith(i),h=t=>t.slice(i.length)},53072:function(t,e,o){o.d(e,{$6:function(){return v},EC:function(){return f},ET:function(){return g},H1:function(){return m},HN:function(){return w},Im:function(){return x},QI:function(){return C},Un:function(){return y},Xm:function(){return _},ce:function(){return M},fh:function(){return L},ie:function(){return A},mm:function(){return b},vj:function(){return p}});o(44114);var i=o(47129),n=o(82286),a=o(22675),r=o(52069);const s="M11,14C12,14 13.05,14.16 14.2,14.44C13.39,15.31 13,16.33 13,17.5C13,18.39 13.25,19.23 13.78,20H3V18C3,16.81 3.91,15.85 5.74,15.12C7.57,14.38 9.33,14 11,14M11,12C9.92,12 9,11.61 8.18,10.83C7.38,10.05 7,9.11 7,8C7,6.92 7.38,6 8.18,5.18C9,4.38 9.92,4 11,4C12.11,4 13.05,4.38 13.83,5.18C14.61,6 15,6.92 15,8C15,9.11 14.61,10.05 13.83,10.83C13.05,11.61 12.11,12 11,12M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",c="M14,19H18V5H14M6,19H10V5H6V19Z",l="M8,5.14V19.14L19,12.14L8,5.14Z",d="M13,3H11V13H13V3M17.83,5.17L16.41,6.59C18.05,7.91 19,9.9 19,12A7,7 0 0,1 12,19C8.14,19 5,15.88 5,12C5,9.91 5.95,7.91 7.58,6.58L6.17,5.17C2.38,8.39 1.92,14.07 5.14,17.86C8.36,21.64 14.04,22.1 17.83,18.88C19.85,17.17 21,14.65 21,12C21,9.37 19.84,6.87 17.83,5.17Z",h="M18,18H6V6H18V18Z",u="M8.16,3L6.75,4.41L9.34,7H4C2.89,7 2,7.89 2,9V19C2,20.11 2.89,21 4,21H20C21.11,21 22,20.11 22,19V9C22,7.89 21.11,7 20,7H14.66L17.25,4.41L15.84,3L12,6.84L8.16,3M4,9H17V19H4V9M19.5,9A1,1 0 0,1 20.5,10A1,1 0 0,1 19.5,11A1,1 0 0,1 18.5,10A1,1 0 0,1 19.5,9M19.5,12A1,1 0 0,1 20.5,13A1,1 0 0,1 19.5,14A1,1 0 0,1 18.5,13A1,1 0 0,1 19.5,12Z";var p=function(t){return t[t.PAUSE=1]="PAUSE",t[t.SEEK=2]="SEEK",t[t.VOLUME_SET=4]="VOLUME_SET",t[t.VOLUME_MUTE=8]="VOLUME_MUTE",t[t.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",t[t.NEXT_TRACK=32]="NEXT_TRACK",t[t.TURN_ON=128]="TURN_ON",t[t.TURN_OFF=256]="TURN_OFF",t[t.PLAY_MEDIA=512]="PLAY_MEDIA",t[t.VOLUME_STEP=1024]="VOLUME_STEP",t[t.SELECT_SOURCE=2048]="SELECT_SOURCE",t[t.STOP=4096]="STOP",t[t.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",t[t.PLAY=16384]="PLAY",t[t.SHUFFLE_SET=32768]="SHUFFLE_SET",t[t.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",t[t.BROWSE_MEDIA=131072]="BROWSE_MEDIA",t[t.REPEAT_SET=262144]="REPEAT_SET",t[t.GROUPING=524288]="GROUPING",t}({});const m="browser",f={album:{icon:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12,16.5C9.5,16.5 7.5,14.5 7.5,12C7.5,9.5 9.5,7.5 12,7.5C14.5,7.5 16.5,9.5 16.5,12C16.5,14.5 14.5,16.5 12,16.5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",layout:"grid"},app:{icon:"M21 2H3C1.9 2 1 2.9 1 4V20C1 21.1 1.9 22 3 22H21C22.1 22 23 21.1 23 20V4C23 2.9 22.1 2 21 2M21 7H3V4H21V7Z",layout:"grid",show_list_images:!0},artist:{icon:s,layout:"grid",show_list_images:!0},channel:{icon:u,thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},composer:{icon:"M11,4A4,4 0 0,1 15,8A4,4 0 0,1 11,12A4,4 0 0,1 7,8A4,4 0 0,1 11,4M11,6A2,2 0 0,0 9,8A2,2 0 0,0 11,10A2,2 0 0,0 13,8A2,2 0 0,0 11,6M11,13C12.1,13 13.66,13.23 15.11,13.69C14.5,14.07 14,14.6 13.61,15.23C12.79,15.03 11.89,14.9 11,14.9C8.03,14.9 4.9,16.36 4.9,17V18.1H13.04C13.13,18.8 13.38,19.44 13.76,20H3V17C3,14.34 8.33,13 11,13M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",layout:"grid",show_list_images:!0},contributing_artist:{icon:s,layout:"grid",show_list_images:!0},directory:{icon:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",layout:"grid",show_list_images:!0},episode:{icon:u,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},game:{icon:"M7,6H17A6,6 0 0,1 23,12A6,6 0 0,1 17,18C15.22,18 13.63,17.23 12.53,16H11.47C10.37,17.23 8.78,18 7,18A6,6 0 0,1 1,12A6,6 0 0,1 7,6M6,9V11H4V13H6V15H8V13H10V11H8V9H6M15.5,12A1.5,1.5 0 0,0 14,13.5A1.5,1.5 0 0,0 15.5,15A1.5,1.5 0 0,0 17,13.5A1.5,1.5 0 0,0 15.5,12M18.5,9A1.5,1.5 0 0,0 17,10.5A1.5,1.5 0 0,0 18.5,12A1.5,1.5 0 0,0 20,10.5A1.5,1.5 0 0,0 18.5,9Z",layout:"grid",thumbnail_ratio:"portrait"},genre:{icon:"M8.11,19.45C5.94,18.65 4.22,16.78 3.71,14.35L2.05,6.54C1.81,5.46 2.5,4.4 3.58,4.17L13.35,2.1L13.38,2.09C14.45,1.88 15.5,2.57 15.72,3.63L16.07,5.3L20.42,6.23H20.45C21.5,6.47 22.18,7.53 21.96,8.59L20.3,16.41C19.5,20.18 15.78,22.6 12,21.79C10.42,21.46 9.08,20.61 8.11,19.45V19.45M20,8.18L10.23,6.1L8.57,13.92V13.95C8,16.63 9.73,19.27 12.42,19.84C15.11,20.41 17.77,18.69 18.34,16L20,8.18M16,16.5C15.37,17.57 14.11,18.16 12.83,17.89C11.56,17.62 10.65,16.57 10.5,15.34L16,16.5M8.47,5.17L4,6.13L5.66,13.94L5.67,13.97C5.82,14.68 6.12,15.32 6.53,15.87C6.43,15.1 6.45,14.3 6.62,13.5L7.05,11.5C6.6,11.42 6.21,11.17 6,10.81C6.06,10.2 6.56,9.66 7.25,9.5C7.33,9.5 7.4,9.5 7.5,9.5L8.28,5.69C8.32,5.5 8.38,5.33 8.47,5.17M15.03,12.23C15.35,11.7 16.03,11.42 16.72,11.57C17.41,11.71 17.91,12.24 18,12.86C17.67,13.38 17,13.66 16.3,13.5C15.61,13.37 15.11,12.84 15.03,12.23M10.15,11.19C10.47,10.66 11.14,10.38 11.83,10.53C12.5,10.67 13.03,11.21 13.11,11.82C12.78,12.34 12.11,12.63 11.42,12.5C10.73,12.33 10.23,11.8 10.15,11.19M11.97,4.43L13.93,4.85L13.77,4.05L11.97,4.43Z",layout:"grid",show_list_images:!0},image:{icon:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z",layout:"grid",show_list_images:!0},movie:{icon:"M18,4L20,8H17L15,4H13L15,8H12L10,4H8L10,8H7L5,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V4H18Z",thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},music:{icon:"M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z",show_list_images:!0},playlist:{icon:"M15,6H3V8H15V6M15,10H3V12H15V10M3,16H11V14H3V16M17,6V14.18C16.69,14.07 16.35,14 16,14A3,3 0 0,0 13,17A3,3 0 0,0 16,20A3,3 0 0,0 19,17V8H22V6H17Z",layout:"grid",show_list_images:!0},podcast:{icon:"M17,18.25V21.5H7V18.25C7,16.87 9.24,15.75 12,15.75C14.76,15.75 17,16.87 17,18.25M12,5.5A6.5,6.5 0 0,1 18.5,12C18.5,13.25 18.15,14.42 17.54,15.41L16,14.04C16.32,13.43 16.5,12.73 16.5,12C16.5,9.5 14.5,7.5 12,7.5C9.5,7.5 7.5,9.5 7.5,12C7.5,12.73 7.68,13.43 8,14.04L6.46,15.41C5.85,14.42 5.5,13.25 5.5,12A6.5,6.5 0 0,1 12,5.5M12,1.5A10.5,10.5 0 0,1 22.5,12C22.5,14.28 21.77,16.39 20.54,18.11L19.04,16.76C19.96,15.4 20.5,13.76 20.5,12A8.5,8.5 0 0,0 12,3.5A8.5,8.5 0 0,0 3.5,12C3.5,13.76 4.04,15.4 4.96,16.76L3.46,18.11C2.23,16.39 1.5,14.28 1.5,12A10.5,10.5 0 0,1 12,1.5M12,9.5A2.5,2.5 0 0,1 14.5,12A2.5,2.5 0 0,1 12,14.5A2.5,2.5 0 0,1 9.5,12A2.5,2.5 0 0,1 12,9.5Z",layout:"grid"},season:{icon:u,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},track:{icon:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13,13H11V18A2,2 0 0,1 9,20A2,2 0 0,1 7,18A2,2 0 0,1 9,16C9.4,16 9.7,16.1 10,16.3V11H13V13M13,9V3.5L18.5,9H13Z"},tv_show:{icon:u,layout:"grid",thumbnail_ratio:"portrait"},url:{icon:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,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,2Z"},video:{icon:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z",layout:"grid",show_list_images:!0}},g=(t,e,o,i)=>t.callWS({type:"media_player/browse_media",entity_id:e,media_content_id:o,media_content_type:i}),v=t=>{let e=t.attributes.media_position;return"playing"!==t.state?e:(e+=(Date.now()-new Date(t.attributes.media_position_updated_at).getTime())/1e3,e<0?0:e)},b=t=>{let e;switch(t.attributes.media_content_type){case"music":case"image":e=t.attributes.media_artist;break;case"playlist":e=t.attributes.media_playlist||t.attributes.media_artist;break;case"tvshow":e=t.attributes.media_series_title,t.attributes.media_season&&(e+=" S"+t.attributes.media_season,t.attributes.media_episode&&(e+="E"+t.attributes.media_episode));break;case"channel":e=t.attributes.media_channel;break;default:e=t.attributes.app_name||""}return e},y=(t,e=!1)=>{if(!t)return;const o=t.state;if(o===a.Hh)return;const r=!0===t.attributes.assumed_state;if(!(0,i.a)(t)&&!r)return(0,n.$)(t,128)?[{icon:d,action:"turn_on"}]:void 0;const s=[];r&&(0,n.$)(t,128)&&s.push({icon:"M11,3H13V21H11V3Z",action:"turn_on"}),(0,n.$)(t,256)&&s.push({icon:r?"M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M12,19A7,7 0 0,1 5,12A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19Z":d,action:"turn_off"});const u=t.attributes;return("playing"===o||"paused"===o||r)&&(0,n.$)(t,32768)&&e&&s.push({icon:!0===u.shuffle?"M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z":"M16,4.5V7H5V9H16V11.5L19.5,8M16,12.5V15H5V17H16V19.5L19.5,16",action:"shuffle_set"}),("playing"===o||"paused"===o||r)&&(0,n.$)(t,16)&&s.push({icon:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z",action:"media_previous_track"}),!r&&("playing"===o&&((0,n.$)(t,1)||(0,n.$)(t,4096))||("paused"===o||"idle"===o)&&(0,n.$)(t,16384)||"on"===o&&((0,n.$)(t,16384)||(0,n.$)(t,1)))&&s.push({icon:"on"===o?"M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5":"playing"!==o?l:(0,n.$)(t,1)?c:h,action:"playing"!==o?"media_play":(0,n.$)(t,1)?"media_pause":"media_stop"}),r&&(0,n.$)(t,16384)&&s.push({icon:l,action:"media_play"}),r&&(0,n.$)(t,1)&&s.push({icon:c,action:"media_pause"}),r&&(0,n.$)(t,4096)&&s.push({icon:h,action:"media_stop"}),("playing"===o||"paused"===o||r)&&(0,n.$)(t,32)&&s.push({icon:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z",action:"media_next_track"}),("playing"===o||"paused"===o||r)&&(0,n.$)(t,262144)&&e&&s.push({icon:"all"===u.repeat?"M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"one"===u.repeat?"M13,15V9H12L10,10V11H11.5V15M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"M2,5.27L3.28,4L20,20.72L18.73,22L15.73,19H7V22L3,18L7,14V17H13.73L7,10.27V11H5V8.27L2,5.27M17,13H19V17.18L17,15.18V13M17,5V2L21,6L17,10V7H8.82L6.82,5H17Z",action:"repeat_set"}),s.length>0?s:void 0},_=t=>{if(void 0===t||t===1/0)return"";const e=Math.max(0,Math.floor(t)),o=Math.floor(e/3600),i=Math.floor(e%3600/60),n=e%60,a=t=>t.toString().padStart(2,"0");return o>0?`${a(o)}:${a(i)}:${a(n)}`:`${a(i)}:${a(n)}`},w=t=>{if(!t)return;const e=t.indexOf("?authSig=");let o=e>0?t.slice(0,e):t;return o.startsWith("http")&&(o=decodeURIComponent(o.split("/").pop())),o},C=(t,e,o)=>t.callService("media_player","volume_set",{entity_id:e,volume_level:o}),M=(t,e,o)=>t.callService("media_player",o,"shuffle_set"===o?{entity_id:e.entity_id,shuffle:!e.attributes.shuffle}:"repeat_set"===o?{entity_id:e.entity_id,repeat:"all"===e.attributes.repeat?"one":"off"===e.attributes.repeat?"all":"off"}:{entity_id:e.entity_id}),A=(t,e,o,i,n={})=>(!n.enqueue&&void 0===n.announce&&(0,r.ni)(o)&&(n.announce=!0),t.callService("media_player","play_media",Object.assign({entity_id:e,media_content_id:o,media_content_type:i},n))),x=(t,e,o)=>t.callService("media_player","join",{group_members:o},{entity_id:e}),L=(t,e)=>t.callService("media_player","unjoin",{},{entity_id:e})},44249:function(t,e,o){o.d(e,{V:function(){return i}});o(62953);const i=(t,e)=>{const o=new n,i=t.subscribeMessage(t=>e(o.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{i.then(t=>null==t?void 0:t())}};class n{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},61557:function(t,e,o){o.d(e,{uw:function(){return n}});o(3362);const i={type:"supervisor/api",method:"GET"},n=(t,e)=>t.sendMessagePromise(Object.assign(Object.assign({},i),e))},65590:function(t,e,o){o.d(e,{EE:function(){return c},Ed:function(){return l},K1:function(){return m},Pe:function(){return f},Xf:function(){return h},aO:function(){return s},fk:function(){return u},wE:function(){return p},yU:function(){return d}});o(89463),o(74423),o(26910),o(18111),o(22489),o(61701),o(3362);var i=o(71727),n=o(28978),a=o(52220),r=o(22675),s=function(t){return t.NeedsAction="needs_action",t.Completed="completed",t}({}),c=function(t){return t.NONE="none",t.ALPHA_ASC="alpha_asc",t.ALPHA_DESC="alpha_desc",t.DUEDATE_ASC="duedate_asc",t.DUEDATE_DESC="duedate_desc",t}({}),l=function(t){return t[t.CREATE_TODO_ITEM=1]="CREATE_TODO_ITEM",t[t.DELETE_TODO_ITEM=2]="DELETE_TODO_ITEM",t[t.UPDATE_TODO_ITEM=4]="UPDATE_TODO_ITEM",t[t.MOVE_TODO_ITEM=8]="MOVE_TODO_ITEM",t[t.SET_DUE_DATE_ON_ITEM=16]="SET_DUE_DATE_ON_ITEM",t[t.SET_DUE_DATETIME_ON_ITEM=32]="SET_DUE_DATETIME_ON_ITEM",t[t.SET_DESCRIPTION_ON_ITEM=64]="SET_DESCRIPTION_ON_ITEM",t}({});const d=(t,e=!0)=>Object.keys(t.states).filter(o=>{var n;return"todo"===(0,i.m)(o)&&t.states[o].state!==r.Hh&&(e||!0!==(null===(n=t.entities[o])||void 0===n?void 0:n.hidden))}).map(e=>Object.assign(Object.assign({},t.states[e]),{},{entity_id:e,name:(0,n.u)(t.states[e])})).sort((e,o)=>(0,a.xL)(e.name,o.name,t.locale.language)),h=(t,e,o)=>t.connection.subscribeMessage(o,{type:"todo/item/subscribe",entity_id:e}),u=(t,e,o)=>{var i,n;return t.callService("todo","update_item",{item:o.uid,rename:o.summary,status:o.status,description:o.description,due_datetime:null!==(i=o.due)&&void 0!==i&&i.includes("T")?o.due:void 0,due_date:void 0===o.due||null!==(n=o.due)&&void 0!==n&&n.includes("T")?void 0:o.due},{entity_id:e})},p=(t,e,o)=>{var i,n;return t.callService("todo","add_item",{item:o.summary,description:o.description||void 0,due_datetime:null!==(i=o.due)&&void 0!==i&&i.includes("T")?o.due:void 0,due_date:void 0===o.due||null!==(n=o.due)&&void 0!==n&&n.includes("T")?void 0:o.due},{entity_id:e})},m=(t,e,o)=>t.callService("todo","remove_item",{item:o},{entity_id:e}),f=(t,e,o,i)=>t.callWS({type:"todo/item/move",entity_id:e,uid:o,previous_uid:i})},42269:function(t,e,o){o.d(e,{p:function(){return n}});var i=o(1087);const n=(t,e)=>(0,i.r)(t,"hass-more-info",e)},24367:function(t,e,o){o.d(e,{L:function(){return n},z:function(){return a}});var i=o(23832);const n=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],a=(0,i.g)(n)},20939:function(t,e,o){o.d(e,{L:function(){return n}});o(16280),o(18111),o(61701);var i=o(78649);const n=(t,e=!0)=>{if(!t||!Array.isArray(t))throw new Error("Entities need to be an array");return t.map((t,o)=>{if("object"==typeof t&&!Array.isArray(t)&&t.type)return t;let n;if("string"==typeof t)n={entity:t};else{if("object"!=typeof t||Array.isArray(t))throw new Error(`Invalid entity ID at position ${o}`);if(!("entity"in t))throw new Error(`Object at position ${o} is missing entity field`);n=t}if(e&&!(0,i.n)(n.entity))throw new Error(`Invalid entity ID at position ${o}: ${n.entity}`);return n})}},15656:function(t,e,o){o.d(e,{Nu:function(){return p},TG:function(){return y},Xd:function(){return g},d4:function(){return b},uN:function(){return f},xC:function(){return v}});var i=o(86518),n=(o(16280),o(18111),o(61701),o(3362),o(62953),o(28918)),a=o(35952),r=o(91984),s=o(53338);const c=["strategy"],l=["strategy"],d=["strategy"],h="custom:",u={dashboard:{"original-states":()=>o.e(60134).then(o.bind(o,43845)),map:()=>o.e(74994).then(o.bind(o,56009)),iframe:()=>o.e(1732).then(o.bind(o,38287)),areas:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(9209)]).then(o.bind(o,80821)),home:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(86201)]).then(o.bind(o,67293)),energy:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(19343)]).then(o.bind(o,94429))},view:{"original-states":()=>Promise.all([o.e(67218),o.e(92610),o.e(662),o.e(77183),o.e(94530)]).then(o.bind(o,16330)),"energy-overview":()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(51016)]).then(o.bind(o,3260)),energy:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(20984)]).then(o.bind(o,86242)),water:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(8969)]).then(o.bind(o,88615)),gas:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(17423)]).then(o.bind(o,21733)),power:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(17879)]).then(o.bind(o,60093)),map:()=>o.e(6875).then(o.bind(o,14966)),iframe:()=>o.e(73441).then(o.bind(o,51480)),area:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(74271)]).then(o.bind(o,44979)),"areas-overview":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(88964)]).then(o.bind(o,69140)),"home-overview":()=>Promise.all([o.e(67218),o.e(92610),o.e(99788),o.e(45193),o.e(77183),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(58709)]).then(o.bind(o,8892)),"home-media-players":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(59022)]).then(o.bind(o,24876)),"home-area":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(50362)]).then(o.bind(o,47302)),"home-other-devices":()=>o.e(27800).then(o.bind(o,78859)),light:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(71780)]).then(o.bind(o,71776)),security:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(34442)]).then(o.bind(o,31758)),climate:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(98874)]).then(o.bind(o,73026)),maintenance:()=>o.e(82691).then(o.bind(o,78030))},section:{"common-controls":()=>o.e(8717).then(o.bind(o,44124))}},p=async(t,e)=>{var o;if(e in u[t]){await u[t][e]();const o=`${e}-${t}-strategy`;return customElements.get(o)}if(!e.startsWith(h))throw new Error("Unknown strategy");const i=`ll-strategy-${e.slice(7)}`,n=`ll-strategy-${t}-${e.slice(7)}`;if(!0===await Promise.race([customElements.whenDefined(i),customElements.whenDefined(n),new Promise(t=>{setTimeout(()=>t(!0),5e3)})]))throw new Error(`Timeout waiting for strategy element ${n} to be registered`);return null!==(o=customElements.get(n))&&void 0!==o?o:customElements.get(i)},m=async(t,e,o,i)=>{const n=o.type;if(!n)return e("No strategy type found");try{const e=await p(t,n);if((0,s.Xo)(e)){if("dashboard"===t&&"generateDashboard"in e)return await e.generateDashboard({config:{strategy:o,views:[]},hass:i});if("view"===t&&"generateView"in e)return await e.generateView({config:{views:[]},view:{strategy:o},hass:i})}const a=(0,s._V)(o);return await e.generate(a,i)}catch(a){return"timeout"!==a.message&&console.error(a),e(a)}},f=async(t,e)=>{const{strategy:o}=t,n=(0,i.A)(t,c),a=await m("dashboard",t=>({views:[{title:"Error",cards:[{type:"markdown",content:`Error loading the dashboard strategy:\n> ${t}`}]}]}),o,e);return Object.assign(Object.assign({},n),a)},g=async(t,e)=>{const{strategy:o}=t,n=(0,i.A)(t,l),a=await m("view",t=>({cards:[{type:"markdown",content:`Error loading the view strategy:\n> ${t}`}]}),o,e);return Object.assign(Object.assign({},n),a)},v=async(t,e)=>{const{strategy:o}=t,n=(0,i.A)(t,d),a=await m("section",t=>({cards:[{type:"markdown",content:`Error loading the section strategy:\n> ${t}`}]}),o,e);return Object.assign(Object.assign({},n),a)},b=async(t,e)=>{const o=(0,a.Wu)(t)?await f(t,e):Object.assign({},t);return o.views=await Promise.all(o.views.map(async t=>{const o=(0,r.R6)(t)?await g(t,e):Object.assign({},t);return o.sections&&(o.sections=await Promise.all(o.sections.map(async t=>(0,n.H)(t)?await v(t,e):Object.assign({},t)))),o})),o};async function y(t,e){const o=await p("dashboard",e),i=await async function(t,e){const o=e.getCreateSuggestions;if("function"==typeof o)return o.call(e,t)}(t,o);return{strategyClass:o,fieldSuggestions:i}}},53338:function(t,e,o){o.d(e,{B2:function(){return n},Xo:function(){return i},_V:function(){return a}});const i=t=>!("generate"in t),n=t=>2===Object.keys(t).length&&"options"in t&&"object"==typeof t.options,a=t=>{if(!n(t))return t;const e=Object.assign(Object.assign({},t),t.options);return delete e.options,e}},69179:function(t,e,o){o.a(t,async function(t,i){try{o.r(e);o(18111),o(61701),o(3362),o(62953);var n=o(40445),a=(o(68825),o(88696)),r=o(5124),s=o(67576),c=o(22786),l=o(36312),d=o(93905),h=o(1087),u=o(28978),p=o(82286),m=o(91926),f=o(51758),g=o(6030),v=o(18350),b=o(29823),y=(o(70947),o(26300)),_=(o(8630),o(28732),o(2054)),w=o(93367),C=(o(67094),o(81762),o(77423)),M=o(59241),A=o(95350),x=o(65590),L=o(77763),H=o(65063),k=o(27560),$=o(14503),E=o(46856),V=o(12295),T=t([v,b,y,_,w,E,a]);[v,b,y,_,w,E,a]=T.then?(await T)():T;let I,D,S,O,Z,z,P,U,j,F,q=t=>t;const N="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",R="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M17,11H15V9H17V11M13,11H11V9H13V11M9,11H7V9H9V11Z",W="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",B="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",X="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",Y="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z";class J extends r.WF{connectedCallback(){super.connectedCallback(),this._mql=window.matchMedia("(max-width: 450px), all and (max-height: 500px)"),this._mql.addListener(this._setIsMobile),this.mobile=this._mql.matches}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._mql)||void 0===t||t.removeListener(this._setIsMobile),this._mql=void 0}willUpdate(t){if(super.willUpdate(t),!this.hasUpdated){this.hass.loadFragmentTranslation("lovelace");const t=(0,g.p9)("entity_id");var e;if(this._openAddItemFromUrl="true"===(0,g.p9)("add_item"),t)this._entityId=t;else if(this._entityId&&!(this._entityId in this.hass.states)&&(this._entityId=void 0),!this._entityId)this._entityId=null===(e=(0,x.yU)(this.hass,!1)[0])||void 0===e?void 0:e.entity_id}!t.has("_entityId")&&this.hasUpdated||this._setupTodoElement(),this._openAddItemFromUrl&&this._entityId&&(this._openAddItemFromUrl=!1,(0,m.oo)((0,f.Z)((0,g.s8)("add_item")),{replace:!0}),(0,p.$)(this.hass.states[this._entityId],x.Ed.CREATE_TODO_ITEM)&&this._addItem())}_setupTodoElement(){this._entityId?(0,m.oo)((0,f.Z)((0,g.KH)({entity_id:this._entityId})),{replace:!0}):(0,m.oo)((0,f.Z)(""),{replace:!0})}render(){var t,e,o;const i=this._entityId?this.hass.entities[this._entityId]:void 0,n=this._entityId?this.hass.states[this._entityId]:void 0,a=null!==(t=this._showPaneController.value)&&void 0!==t?t:!this.narrow,s=(0,x.yU)(this.hass,!1).map(t=>(0,r.qy)(I||(I=q`<ha-dropdown-item @click="${0}" value="${0}" .selected="${0}"> <ha-state-icon .stateObj="${0}" slot="icon"></ha-state-icon>${0} </ha-dropdown-item> `),this._setEntityId,t.entity_id,t.entity_id===this._entityId,t,t.name));return(0,r.qy)(D||(D=q` <ha-two-pane-top-app-bar-fixed .pane="${0}" footer .narrow="${0}"> <ha-menu-button slot="navigationIcon" .hass="${0}" .narrow="${0}"></ha-menu-button> <div slot="title"> ${0} </div> <ha-list slot="pane" activatable>${0}</ha-list> ${0} <ha-dropdown slot="actionItems" @wa-select="${0}"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> ${0} <wa-divider></wa-divider> <ha-dropdown-item value="assist"> <ha-svg-icon .path="${0}" slot="icon"> </ha-svg-icon> ${0} </ha-dropdown-item> ${0} </ha-dropdown> <div id="columns"> <div class="column"> ${0} </div> </div> ${0} </ha-two-pane-top-app-bar-fixed> `),a,this.narrow,this.hass,this.narrow,a?this.hass.localize("panel.todo"):(0,r.qy)(S||(S=q`<ha-dropdown class="lists"> <ha-button slot="trigger"> <div> ${0} </div> <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-button> ${0} ${0} </ha-dropdown>`),this._entityId?n?(0,u.u)(n):this._entityId:r.s6,N,s,null!==(e=this.hass.user)&&void 0!==e&&e.is_admin?(0,r.qy)(O||(O=q`<wa-divider></wa-divider> <ha-dropdown-item @click="${0}"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} </ha-dropdown-item>`),this._addList,Y,this.hass.localize("ui.panel.todo.create_list")):r.s6),s,a&&null!==(o=this.hass.user)&&void 0!==o&&o.is_admin?(0,r.qy)(Z||(Z=q`<ha-list-item graphic="icon" slot="pane-footer" @click="${0}"> <ha-svg-icon .path="${0}" slot="graphic"></ha-svg-icon> ${0} </ha-list-item>`),this._addList,Y,this.hass.localize("ui.panel.todo.create_list")):r.s6,this._handleDropdownSelect,"",B,this._conversation(this.hass.config.components)?(0,r.qy)(z||(z=q`<ha-dropdown-item value="info" .disabled="${0}"> <ha-svg-icon .path="${0}" slot="icon"> </ha-svg-icon> ${0} </ha-dropdown-item>`),!this._entityId,X,this.hass.localize("ui.panel.todo.information")):r.s6,R,this.hass.localize("ui.panel.todo.assist"),"local_todo"===(null==i?void 0:i.platform)?(0,r.qy)(P||(P=q` <wa-divider></wa-divider> <ha-dropdown-item value="delete" variant="danger" .disabled="${0}"> <ha-svg-icon .path="${0}" slot="icon" class="warning"> </ha-svg-icon> ${0} </ha-dropdown-item>`),!this._entityId,W,this.hass.localize("ui.panel.todo.delete_list")):r.s6,this._entityId?(0,r.qy)(U||(U=q` <hui-card .hass="${0}" .config="${0}"></hui-card> `),this.hass,this._cardConfig(this._entityId)):r.s6,n&&(0,p.$)(n,x.Ed.CREATE_TODO_ITEM)?(0,r.qy)(j||(j=q`<ha-button class="fab" size="large" @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button>`),this._addItem,Y,this.hass.localize("ui.panel.todo.add_item")):r.s6)}async _addList(){(0,L.W)(this,{startFlowHandler:"local_todo",manifest:await(0,A.QC)(this.hass,"local_todo")})}_showMoreInfoDialog(){this._entityId&&(0,h.r)(this,"hass-more-info",{entityId:this._entityId})}async _deleteList(){var t;if(!this._entityId)return;const e=await(0,M.v)(this.hass,this._entityId);if("local_todo"!==e.platform)return;const o=e.config_entry_id;if(!o)return;if(!(await(0,H.dk)(this,{title:this.hass.localize("ui.panel.todo.delete_confirm_title",{name:this._entityId in this.hass.states?(0,u.u)(this.hass.states[this._entityId]):this._entityId}),text:this.hass.localize("ui.panel.todo.delete_confirm_text"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0})))return;const i=await(0,C.eM)(this.hass,o);this._entityId=null===(t=(0,x.yU)(this.hass,!1)[0])||void 0===t?void 0:t.entity_id,i.require_restart&&(0,H.showAlertDialog)(this,{text:this.hass.localize("ui.panel.todo.restart_confirm")})}_showVoiceCommandDialog(){(0,k.z)(this,this.hass,{pipeline_id:"last_used"})}_addItem(){(0,V.X)(this,{entity:this._entityId})}_handleDropdownSelect(t){var e;const o=null===(e=t.detail)||void 0===e||null===(e=e.item)||void 0===e?void 0:e.value;if(o)switch(o){case"info":this._showMoreInfoDialog();break;case"assist":this._showVoiceCommandDialog();break;case"delete":this._deleteList()}}_setEntityId(t){const e=t.currentTarget;this._entityId=e.value}static get styles(){return[$.RF,(0,r.AH)(F||(F=q`:host{display:block}#columns{display:flex;flex-direction:row;justify-content:center;margin:8px;padding-bottom:70px}.column{flex:1 0 0;max-width:500px;min-width:0}ha-dropdown{display:inline-block;max-width:100%}ha-dropdown ha-button{--ha-font-size-m:var(--ha-font-size-l)}ha-dropdown ha-button div{text-overflow:ellipsis;width:100%;overflow:hidden;white-space:nowrap;display:block}.fab{position:fixed;right:calc(16px + var(--safe-area-inset-right,0px));bottom:calc(16px + var(--safe-area-inset-bottom,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;--ha-button-box-shadow:var(--ha-box-shadow-l)}ha-dropdown.lists ha-dropdown-item{max-width:80vw}`))]}constructor(...t){super(...t),this.narrow=!1,this.mobile=!1,this._openAddItemFromUrl=!1,this._showPaneController=new a.P(this,{callback:t=>{var e;return(null===(e=t[0])||void 0===e?void 0:e.contentRect.width)>750}}),this._conversation=(0,c.A)(t=>(0,l.x)(this.hass.config,"conversation")),this._setIsMobile=t=>{this.mobile=t.matches},this._cardConfig=(0,c.A)(t=>({type:"todo-list",entity:t}))}}(0,n.Cg)([(0,s.MZ)({attribute:!1})],J.prototype,"hass",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],J.prototype,"narrow",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],J.prototype,"mobile",void 0),(0,n.Cg)([(0,s.wk)(),(0,d.I)({key:"selectedTodoEntity",state:!0})],J.prototype,"_entityId",void 0),J=(0,n.Cg)([(0,s.EM)("ha-panel-todo")],J),i()}catch(I){i(I)}})},12295:function(t,e,o){o.d(e,{X:function(){return a}});o(3362),o(62953);var i=o(1087);const n=()=>o.e(10734).then(o.bind(o,54653)),a=(t,e)=>{(0,i.r)(t,"show-dialog",{dialogTag:"dialog-todo-item-editor",dialogImport:n,dialogParams:e})}},53580:function(t,e,o){o.d(e,{mdiHomeAssistant:function(){return i}});const i="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"},36918:function(t,e,o){o.d(e,{o:function(){return i}});const i=(t,e)=>`https://www.iobroker.net/#${t.language&&t.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`}}]);